oxlint 1.75.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;
@@ -562,7 +562,7 @@ const getTokenLoc = getTokenLocTemp, resetLoc = resetLocTemp, TOKEN_TYPES = [
562
562
  * Called by `ast.tokens` getter.
563
563
  */
564
564
  function initTokens() {
565
- allTokensDeserialized || deserializeTokens(), previousTokens.length >= tokensLen ? (previousTokens.length = tokensLen, tokens = previousTokens) : tokens = previousTokens = cachedTokens.slice(0, tokensLen);
565
+ allTokensDeserialized === !1 && deserializeTokens(), previousTokens.length >= tokensLen ? (previousTokens.length = tokensLen, tokens = previousTokens) : tokens = previousTokens = cachedTokens.slice(0, tokensLen);
566
566
  }
567
567
  /**
568
568
  * Deserialize all tokens into `cachedTokens`.
@@ -601,7 +601,7 @@ function initTokensBuffer() {
601
601
  * @returns Deserialized token
602
602
  */
603
603
  function getToken(index) {
604
- if (!allTokensDeserialized) {
604
+ if (allTokensDeserialized === !1) {
605
605
  let token = deserializeTokenIfNeeded(index);
606
606
  if (token !== null) return deserializedTokenIndexes[deserializedTokensLen++] = index, token;
607
607
  }
@@ -723,7 +723,7 @@ const getCommentLoc = getCommentLocTemp, resetCommentLoc = resetCommentLocTemp;
723
723
  * Called by `ast.comments` getter.
724
724
  */
725
725
  function initComments() {
726
- allCommentsDeserialized || deserializeComments(), comments === null && (previousComments.length >= commentsLen ? (previousComments.length = commentsLen, comments = previousComments) : comments = previousComments = cachedComments.slice(0, commentsLen));
726
+ allCommentsDeserialized === !1 && deserializeComments(), comments === null && (previousComments.length >= commentsLen ? (previousComments.length = commentsLen, comments = previousComments) : comments = previousComments = cachedComments.slice(0, commentsLen));
727
727
  }
728
728
  /**
729
729
  * Deserialize all comments into `cachedComments`.
@@ -768,7 +768,7 @@ function initCommentsBuffer() {
768
768
  * @returns Deserialized comment
769
769
  */
770
770
  function getComment(index) {
771
- if (!allCommentsDeserialized) {
771
+ if (allCommentsDeserialized === !1) {
772
772
  let comment = deserializeCommentIfNeeded(index);
773
773
  if (comment !== null) return deserializedCommentIndexes[deserializedCommentsLen++] = index, comment;
774
774
  }
@@ -1282,7 +1282,7 @@ function deserializeImportMeta(pos) {
1282
1282
  end: end = deserializeI32(pos + 4),
1283
1283
  range: [start, end],
1284
1284
  parent
1285
- }, importStart = deserializeI32(pos), importEnd = importStart + 6, importIdent = {
1285
+ }, importStart = deserializeI32(pos), importEnd = deserializeI32(pos + 4) === 0 ? 0 : importStart + 6, importIdent = {
1286
1286
  __proto__: NodeProto,
1287
1287
  type: "Identifier",
1288
1288
  decorators: [],
@@ -1293,7 +1293,7 @@ function deserializeImportMeta(pos) {
1293
1293
  end: importEnd,
1294
1294
  range: [importStart, importEnd],
1295
1295
  parent
1296
- }, metaEnd = deserializeI32(pos + 4), metaStart = metaEnd - 4, metaIdent = {
1296
+ }, metaEnd = deserializeI32(pos + 4), metaStart = metaEnd === 0 ? 0 : metaEnd - 4, metaIdent = {
1297
1297
  __proto__: NodeProto,
1298
1298
  type: "Identifier",
1299
1299
  decorators: [],
@@ -1317,7 +1317,7 @@ function deserializeNewTarget(pos) {
1317
1317
  end: end = deserializeI32(pos + 4),
1318
1318
  range: [start, end],
1319
1319
  parent
1320
- }, newStart = deserializeI32(pos), newEnd = newStart + 3, newIdent = {
1320
+ }, newStart = deserializeI32(pos), newEnd = deserializeI32(pos + 4) === 0 ? 0 : newStart + 3, newIdent = {
1321
1321
  __proto__: NodeProto,
1322
1322
  type: "Identifier",
1323
1323
  decorators: [],
@@ -1328,7 +1328,7 @@ function deserializeNewTarget(pos) {
1328
1328
  end: newEnd,
1329
1329
  range: [newStart, newEnd],
1330
1330
  parent
1331
- }, targetEnd = deserializeI32(pos + 4), targetStart = targetEnd - 6, targetIdent = {
1331
+ }, targetEnd = deserializeI32(pos + 4), targetStart = targetEnd === 0 ? 0 : targetEnd - 6, targetIdent = {
1332
1332
  __proto__: NodeProto,
1333
1333
  type: "Identifier",
1334
1334
  decorators: [],
@@ -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
  }
@@ -5554,7 +5631,7 @@ function getTokensAndComments() {
5554
5631
  if (tokensAndComments !== null) return tokensAndComments;
5555
5632
  if (tokensInt32 === null && initTokensBuffer(), commentsInt32 === null && initCommentsBuffer(), commentsLen === 0) return tokens === null && initTokens(), tokensAndComments = tokens;
5556
5633
  if (tokensLen === 0) return comments === null && initComments(), tokensAndComments = comments;
5557
- allTokensDeserialized || deserializeTokens(), allCommentsDeserialized || deserializeComments(), tokensAndCommentsInt32 === null && initTokensAndCommentsBuffer(), previousTokensAndComments.length >= tokensAndCommentsLen ? (tokensAndComments = previousTokensAndComments, tokensAndComments.length = tokensAndCommentsLen) : (tokensAndComments = previousTokensAndComments = Array(tokensAndCommentsLen).fill(0), tokensAndComments[0] = null);
5634
+ allTokensDeserialized === !1 && deserializeTokens(), allCommentsDeserialized === !1 && deserializeComments(), tokensAndCommentsInt32 === null && initTokensAndCommentsBuffer(), previousTokensAndComments.length >= tokensAndCommentsLen ? (tokensAndComments = previousTokensAndComments, tokensAndComments.length = tokensAndCommentsLen) : (tokensAndComments = previousTokensAndComments = Array(tokensAndCommentsLen).fill(0), tokensAndComments[0] = null);
5558
5635
  for (let i = 0; i < tokensAndCommentsLen; i++) {
5559
5636
  let pos32 = i << 2, originalIndex = tokensAndCommentsInt32[pos32 + 1];
5560
5637
  tokensAndComments[i] = tokensAndCommentsInt32[pos32 + 2] === 0 ? cachedTokens[originalIndex] : cachedComments[originalIndex];
@@ -5689,32 +5766,30 @@ function getJSDocComment(node) {
5689
5766
  }
5690
5767
  //#endregion
5691
5768
  //#region src-js/plugins/directives.ts
5692
- const LABEL_PATTERN = /^\s*(?<label>(?:eslint|oxlint)-(?:disable(?:(?:-next)?-line)?|enable))(?:\s|$)/u, LINE_DIRECTIVE_PATTERN = /^(?:eslint|oxlint)-disable-(?:-next)?-line$/u, JUSTIFICATION_SEP_PATTERN = /\s-{2,}\s/u;
5769
+ const LABEL_PATTERN = /^\s*((?:eslint|oxlint)-(disable(?:(?:-next)?-line)?|enable))(?:\s|$)/u, JUSTIFICATION_SEP_PATTERN = /\s-{2,}\s/u;
5693
5770
  function getDisableDirectives() {
5694
- let problems = [], directives = [];
5695
- return getAllComments().forEach((comment) => {
5696
- if (comment.type === "Shebang") return;
5697
- let match = LABEL_PATTERN.exec(comment.value);
5698
- if (!match?.groups?.label || comment.type === "Line" && LINE_DIRECTIVE_PATTERN.test(match.groups.label)) return;
5699
- let { label } = match.groups;
5700
- if ((label === "eslint-disable-line" || label === "oxlint-disable-line") && comment.loc.start.line !== comment.loc.end.line) {
5771
+ let problems = [], directives = [], comments = getAllComments(), i = +(comments.length > 0 && comments[0].type === "Shebang");
5772
+ for (; i < comments.length; i++) {
5773
+ let comment = comments[i], match = LABEL_PATTERN.exec(comment.value);
5774
+ if (match === null) continue;
5775
+ let label = match[1], type = match[2];
5776
+ if (type === "disable-line" && comment.loc.start.line !== comment.loc.end.line) {
5701
5777
  problems.push({
5702
5778
  ruleId: null,
5703
5779
  message: `${label} comment should not span multiple lines.`,
5704
5780
  loc: comment.loc
5705
5781
  });
5706
- return;
5782
+ continue;
5707
5783
  }
5708
- let rest = comment.value.slice(match[0].length).trim();
5709
- match = JUSTIFICATION_SEP_PATTERN.exec(rest);
5710
- let [value, justification] = match ? [rest.slice(0, match.index).trim(), rest.slice(match.index + match[0].length).trim()] : [rest, ""];
5711
- directives.push({
5712
- type: label.slice(7),
5784
+ let rest = comment.value.slice(match[0].length).trim(), sepMatch = JUSTIFICATION_SEP_PATTERN.exec(rest), value = rest, justification = "";
5785
+ sepMatch !== null && (value = rest.slice(0, sepMatch.index).trim(), justification = rest.slice(sepMatch.index + sepMatch[0].length).trim()), directives.push({
5786
+ type,
5713
5787
  node: comment,
5714
5788
  value,
5715
5789
  justification
5716
5790
  });
5717
- }), {
5791
+ }
5792
+ return {
5718
5793
  problems,
5719
5794
  directives
5720
5795
  };
@@ -11745,9 +11820,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
11745
11820
  case types_1.AST_NODE_TYPES.TSParameterProperty:
11746
11821
  this.visitFunctionParameterTypeAnnotation(node.parameter);
11747
11822
  break;
11748
- default:
11749
- this.visitType(node.typeAnnotation);
11750
- break;
11823
+ default: this.visitType(node.typeAnnotation);
11751
11824
  }
11752
11825
  }
11753
11826
  visitJSXElement(node) {
@@ -12795,12 +12868,12 @@ function addGlobals() {
12795
12868
  }
12796
12869
  globalScope.through = globalScope.through.filter((ref) => {
12797
12870
  let { name } = ref.identifier, variable = globalScope.set.get(name);
12798
- return variable ? (ref.resolved = variable, variable.references.push(ref), !1) : !0;
12871
+ return !variable || (ref.resolved = variable, variable.references.push(ref), !1);
12799
12872
  });
12800
12873
  let { implicit } = globalScope;
12801
12874
  implicit.variables = implicit.variables.filter((variable) => {
12802
12875
  let { name } = variable;
12803
- return globalScope.set.has(name) ? (implicit.set.delete(name), !1) : !0;
12876
+ return !globalScope.set.has(name) || (implicit.set.delete(name), !1);
12804
12877
  }), implicit.leftToBeResolved = implicit.leftToBeResolved.filter((ref) => !globalScope.set.has(ref.identifier.name));
12805
12878
  }
12806
12879
  /**
@@ -14176,7 +14249,7 @@ function resetSettings() {
14176
14249
  }
14177
14250
  //#endregion
14178
14251
  //#region package.json
14179
- var version = "1.75.0";
14252
+ var version = "1.77.0";
14180
14253
  //#endregion
14181
14254
  //#region src-js/plugins/context.ts
14182
14255
  const ObjectFreeze$1 = Object.freeze, ObjectCreate = Object.create, ObjectAssign = Object.assign, ObjectPreventExtensions = Object.preventExtensions;
@@ -14483,7 +14556,8 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14483
14556
  sets[0] = sets[0].slice(0, -1);
14484
14557
  for (var xl = sets.length - 1, x = 1; x < xl; ++x) sets[x] = sets[x].slice(1, -1);
14485
14558
  return sets[xl] = sets[xl].slice(1), sets.join("");
14486
- } else return sets[0];
14559
+ }
14560
+ return sets[0];
14487
14561
  }
14488
14562
  function subexp(str) {
14489
14563
  return "(?:" + str + ")";
@@ -14561,7 +14635,8 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14561
14635
  if (Array.isArray(arr)) {
14562
14636
  for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
14563
14637
  return arr2;
14564
- } else return Array.from(arr);
14638
+ }
14639
+ return Array.from(arr);
14565
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 = {
14566
14641
  overflow: "Overflow: input needs wider integers to process",
14567
14642
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
@@ -14817,7 +14892,8 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14817
14892
  newHost = newFirst.join(":") + "::" + newLast.join(":");
14818
14893
  } else newHost = fields.join(":");
14819
14894
  return zone && (newHost += "%" + zone), newHost;
14820
- } else return host;
14895
+ }
14896
+ return host;
14821
14897
  }
14822
14898
  var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i, NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0;
14823
14899
  function parse(uriString) {
@@ -14825,7 +14901,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14825
14901
  options.reference === "suffix" && (uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString);
14826
14902
  var matches = uriString.match(URI_PARSE);
14827
14903
  if (matches) {
14828
- 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.");
14829
14905
  var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
14830
14906
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
14831
14907
  if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) try {
@@ -14877,7 +14953,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14877
14953
  }
14878
14954
  function resolveComponents(base, relative) {
14879
14955
  var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, skipNormalization = arguments[3], target = {};
14880
- 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;
14881
14957
  }
14882
14958
  function resolve(baseURI, relativeURI, options) {
14883
14959
  var schemelessOptions = assign({ scheme: "null" }, options);
@@ -14955,9 +15031,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
14955
15031
  case "body":
14956
15032
  mailtoComponents.body = unescapeComponent(hfield[1], options);
14957
15033
  break;
14958
- default:
14959
- unknownHeaders = !0, headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
14960
- break;
15034
+ default: unknownHeaders = !0, headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
14961
15035
  }
14962
15036
  }
14963
15037
  unknownHeaders && (mailtoComponents.headers = headers);
@@ -15490,8 +15564,10 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15490
15564
  var $$outStack = $$outStack || [];
15491
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 += " } ");
15492
15566
  var __err = out;
15493
- 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++; ";
15494
- } 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; ";
15495
15571
  return it.isTop && (out += " }; return validate; "), out;
15496
15572
  }
15497
15573
  if (it.isTop) {
@@ -15524,21 +15600,25 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15524
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 + "]; ");
15525
15601
  out += " else { ";
15526
15602
  var $$outStack = $$outStack || [];
15527
- $$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 += " } ");
15528
15604
  var __err = out;
15529
- 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) { ";
15530
15608
  var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty";
15531
15609
  out += " " + $data + " = " + $coerced + "; ", $dataLvl || (out += "if (" + $parentData + " !== undefined)"), out += " " + $parentData + "[" + $parentDataProperty + "] = " + $coerced + "; } ";
15532
15610
  } else {
15533
15611
  var $$outStack = $$outStack || [];
15534
- $$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 += " } ");
15535
15613
  var __err = out;
15536
- 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++; ";
15537
15617
  }
15538
15618
  out += " } ";
15539
15619
  }
15540
15620
  }
15541
- 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 += "}");
15542
15622
  else {
15543
15623
  var arr2 = it.RULES;
15544
15624
  if (arr2) {
@@ -15586,11 +15666,13 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15586
15666
  if ($breakOnError && (out += " " + $closingBraces1 + " ", $closingBraces1 = ""), $rulesGroup.type && (out += " } ", $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes)) {
15587
15667
  out += " else { ";
15588
15668
  var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type", $$outStack = $$outStack || [];
15589
- $$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 += " } ");
15590
15670
  var __err = out;
15591
- 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 += " } ";
15592
15674
  }
15593
- $breakOnError && (out += " if (errors === ", $top ? out += "0" : out += "errs_" + $lvl, out += ") { ", $closingBraces2 += "}");
15675
+ $breakOnError && (out += " if (errors === ", out += $top ? "0" : "errs_" + $lvl, out += ") { ", $closingBraces2 += "}");
15594
15676
  }
15595
15677
  }
15596
15678
  }
@@ -15938,7 +16020,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15938
16020
  var $$outStack = $$outStack || [];
15939
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 += " } ");
15940
16022
  var __err = out;
15941
- 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) { ");
15942
16026
  } else if (it.opts.missingRefs == "ignore") it.logger.warn($message), $breakOnError && (out += " if (true) { ");
15943
16027
  else throw new it.MissingRefError(it.baseId, $schema, $message);
15944
16028
  } else if ($refVal.inline) {
@@ -15969,7 +16053,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15969
16053
  $it.level++;
15970
16054
  var $nextValid = "valid" + $it.level, $currentBaseId = $it.baseId, $allSchemasEmpty = !0, arr1 = $schema;
15971
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 += "}"));
15972
- return $breakOnError && ($allSchemasEmpty ? out += " if (true) { " : out += " " + $closingBraces.slice(0, -1) + " "), out;
16056
+ return $breakOnError && (out += $allSchemasEmpty ? " if (true) { " : " " + $closingBraces.slice(0, -1) + " "), out;
15973
16057
  };
15974
16058
  })), require_anyOf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15975
16059
  module.exports = function generate_anyOf(it, $keyword, $ruleType) {
@@ -15985,7 +16069,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15985
16069
  it.compositeRule = $it.compositeRule = !0;
15986
16070
  var arr1 = $schema;
15987
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 += "}";
15988
- 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 += " } ");
15989
16075
  } else $breakOnError && (out += " if (true) { ");
15990
16076
  return out;
15991
16077
  };
@@ -16003,7 +16089,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16003
16089
  var $$outStack = $$outStack || [];
16004
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 += " } ");
16005
16091
  var __err = out;
16006
- 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;
16007
16095
  };
16008
16096
  })), require_contains = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16009
16097
  module.exports = function generate_contains(it, $keyword, $ruleType) {
@@ -16021,7 +16109,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16021
16109
  var $$outStack = $$outStack || [];
16022
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 += " } ");
16023
16111
  var __err = out;
16024
- 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;
16025
16115
  };
16026
16116
  })), require_dependencies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16027
16117
  module.exports = function generate_dependencies(it, $keyword, $ruleType) {
@@ -16049,7 +16139,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16049
16139
  var $$outStack = $$outStack || [];
16050
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 += " } ");
16051
16141
  var __err = out;
16052
- 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++; ";
16053
16145
  } else {
16054
16146
  out += " ) { ";
16055
16147
  var arr2 = $deps;
@@ -16078,7 +16170,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16078
16170
  var $$outStack = $$outStack || [];
16079
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 += " } ");
16080
16172
  var __err = out;
16081
- 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;
16082
16176
  };
16083
16177
  })), require_format = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16084
16178
  module.exports = function generate_format(it, $keyword, $ruleType) {
@@ -16110,13 +16204,15 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16110
16204
  } else {
16111
16205
  out += " if (! ";
16112
16206
  var $formatRef = "formats" + it.util.getProperty($schema);
16113
- $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 += ") { ";
16114
16208
  }
16115
16209
  }
16116
16210
  var $$outStack = $$outStack || [];
16117
- $$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 += " } ");
16118
16212
  var __err = out;
16119
- 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;
16120
16216
  };
16121
16217
  })), require_if = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16122
16218
  module.exports = function generate_if(it, $keyword, $ruleType) {
@@ -16127,7 +16223,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16127
16223
  var $ifClause;
16128
16224
  $it.createErrors = !1, $it.schema = $schema, $it.schemaPath = $schemaPath, $it.errSchemaPath = $errSchemaPath, out += " var " + $errs + " = errors; var " + $valid + " = true; ";
16129
16225
  var $wasComposite = it.compositeRule;
16130
- 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 { ");
16131
16229
  } else $breakOnError && (out += " if (true) { ");
16132
16230
  return out;
16133
16231
  };
@@ -16145,7 +16243,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16145
16243
  var $$outStack = $$outStack || [];
16146
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 += " } ");
16147
16245
  var __err = out;
16148
- 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 { ");
16149
16249
  }
16150
16250
  var arr1 = $schema;
16151
16251
  if (arr1) {
@@ -16186,7 +16286,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16186
16286
  var $errorKeyword = $exclusiveKeyword, $$outStack = $$outStack || [];
16187
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 += " } ");
16188
16288
  var __err = out;
16189
- 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);
16190
16292
  } else {
16191
16293
  var $exclIsNumber = typeof $schemaExcl == "number", $opStr = $op;
16192
16294
  if ($exclIsNumber && $isData) {
@@ -16200,9 +16302,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16200
16302
  }
16201
16303
  $errorKeyword ||= $keyword;
16202
16304
  var $$outStack = $$outStack || [];
16203
- $$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 += " } ");
16204
16306
  var __err = out;
16205
- 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;
16206
16310
  };
16207
16311
  })), require__limitItems = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16208
16312
  module.exports = function generate__limitItems(it, $keyword, $ruleType) {
@@ -16211,9 +16315,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16211
16315
  var $op = $keyword == "maxItems" ? ">" : "<";
16212
16316
  out += "if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), out += " " + $data + ".length " + $op + " " + $schemaValue + ") { ";
16213
16317
  var $errorKeyword = $keyword, $$outStack = $$outStack || [];
16214
- $$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 += " } ");
16215
16319
  var __err = out;
16216
- 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;
16217
16323
  };
16218
16324
  })), require__limitLength = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16219
16325
  module.exports = function generate__limitLength(it, $keyword, $ruleType) {
@@ -16222,9 +16328,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16222
16328
  var $op = $keyword == "maxLength" ? ">" : "<";
16223
16329
  out += "if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), it.opts.unicode === !1 ? out += " " + $data + ".length " : out += " ucs2length(" + $data + ") ", out += " " + $op + " " + $schemaValue + ") { ";
16224
16330
  var $errorKeyword = $keyword, $$outStack = $$outStack || [];
16225
- $$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 += " } ");
16226
16332
  var __err = out;
16227
- 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;
16228
16336
  };
16229
16337
  })), require__limitProperties = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16230
16338
  module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
@@ -16233,9 +16341,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16233
16341
  var $op = $keyword == "maxProperties" ? ">" : "<";
16234
16342
  out += "if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "), out += " Object.keys(" + $data + ").length " + $op + " " + $schemaValue + ") { ";
16235
16343
  var $errorKeyword = $keyword, $$outStack = $$outStack || [];
16236
- $$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 += " } ");
16237
16345
  var __err = out;
16238
- 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;
16239
16349
  };
16240
16350
  })), require_multipleOf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16241
16351
  module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
@@ -16243,9 +16353,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16243
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");
16244
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 += " ) { ";
16245
16355
  var $$outStack = $$outStack || [];
16246
- $$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 += " } ");
16247
16357
  var __err = out;
16248
- 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;
16249
16361
  };
16250
16362
  })), require_not = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16251
16363
  module.exports = function generate_not(it, $keyword, $ruleType) {
@@ -16261,7 +16373,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16261
16373
  var $$outStack = $$outStack || [];
16262
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 += " } ");
16263
16375
  var __err = out;
16264
- 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 += " } ");
16265
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) { ");
16266
16380
  return out;
16267
16381
  };
@@ -16275,7 +16389,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16275
16389
  it.compositeRule = $it.compositeRule = !0;
16276
16390
  var arr1 = $schema;
16277
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 + "; }";
16278
- 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;
16279
16395
  };
16280
16396
  })), require_pattern = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16281
16397
  module.exports = function generate_pattern(it, $keyword, $ruleType) {
@@ -16288,9 +16404,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16288
16404
  out += " if ( ", $isData && (out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'string') || "), out += " !" + $regexp + ".test(" + $data + ") ) {";
16289
16405
  }
16290
16406
  var $$outStack = $$outStack || [];
16291
- $$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 += " } ");
16292
16408
  var __err = out;
16293
- 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;
16294
16412
  };
16295
16413
  })), require_properties = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16296
16414
  module.exports = function generate_properties(it, $keyword, $ruleType) {
@@ -16302,7 +16420,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16302
16420
  return p !== "__proto__";
16303
16421
  }
16304
16422
  if (out += "var " + $errs + " = errors;var " + $nextValid + " = true;", $ownProperties && (out += " var " + $dataProperties + " = undefined;"), $checkAdditional) {
16305
- 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) {
16306
16424
  if (out += " var isAdditional" + $lvl + " = !(false ", $schemaKeys.length) if ($schemaKeys.length > 8) out += " || validate.schema" + $schemaPath + ".hasOwnProperty(" + $key + ") ";
16307
16425
  else {
16308
16426
  var arr1 = $schemaKeys;
@@ -16325,7 +16443,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16325
16443
  var $$outStack = $$outStack || [];
16326
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 += " } ");
16327
16445
  var __err = out;
16328
- 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; ");
16329
16449
  }
16330
16450
  else if ($additionalIsSchema) if ($removeAdditional == "failing") {
16331
16451
  out += " var " + $errs + " = errors; ";
@@ -16372,7 +16492,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16372
16492
  var $$outStack = $$outStack || [];
16373
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 += " } ");
16374
16494
  var __err = out;
16375
- 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 { ";
16376
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 += " ) { ");
16377
16499
  out += " " + $code + " } ";
16378
16500
  }
@@ -16386,7 +16508,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16386
16508
  $pProperty = arr4[i4 += 1];
16387
16509
  var $sch = $pProperties[$pProperty];
16388
16510
  if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === !1 : it.util.schemaHasRules($sch, it.RULES.all)) {
16389
- $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);
16390
16512
  var $passData = $data + "[" + $key + "]";
16391
16513
  $it.dataPathArr[$dataNxt] = $key;
16392
16514
  var $code = it.validate($it);
@@ -16404,11 +16526,13 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16404
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)) {
16405
16527
  $it.schema = $schema, $it.schemaPath = $schemaPath, $it.errSchemaPath = $errSchemaPath;
16406
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;
16407
- $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; ";
16408
16530
  var $passData = $key, $wasComposite = it.compositeRule;
16409
16531
  it.compositeRule = $it.compositeRule = !0;
16410
16532
  var $code = it.validate($it);
16411
- $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 += " } }";
16412
16536
  }
16413
16537
  return $breakOnError && (out += " " + $closingBraces + " if (" + $errs + " == errors) {"), out;
16414
16538
  };
@@ -16434,7 +16558,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16434
16558
  var $$outStack = $$outStack || [];
16435
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 += " } ");
16436
16560
  var __err = out;
16437
- 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 { ";
16438
16564
  } else {
16439
16565
  out += " if ( ";
16440
16566
  var arr2 = $required;
@@ -16449,7 +16575,9 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16449
16575
  var $$outStack = $$outStack || [];
16450
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 += " } ");
16451
16577
  var __err = out;
16452
- 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 { ";
16453
16581
  }
16454
16582
  else if ($loopRequired) {
16455
16583
  $isData || (out += " var " + $vSchema + " = validate.schema" + $schemaPath + "; ");
@@ -16481,9 +16609,11 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16481
16609
  }
16482
16610
  out += " } ", $isData && (out += " } "), out += " if (!" + $valid + ") { ";
16483
16611
  var $$outStack = $$outStack || [];
16484
- $$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 += " } ");
16485
16613
  var __err = out;
16486
- 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 { ");
16487
16617
  } else $breakOnError && (out += " if (true) { ");
16488
16618
  return out;
16489
16619
  };
@@ -16741,15 +16871,19 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16741
16871
  }
16742
16872
  if ($rDef.modifying && (out += " if (" + $parentData + ") " + $data + " = " + $parentData + "[" + $parentDataProperty + "];"), out += "" + $closingBraces, $rDef.valid) $breakOnError && (out += " if (true) { ");
16743
16873
  else {
16744
- 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;
16745
16875
  var $$outStack = $$outStack || [];
16746
16876
  $$outStack.push(out), out = "";
16747
16877
  var $$outStack = $$outStack || [];
16748
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 += " } ");
16749
16879
  var __err = out;
16750
- 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++; ";
16751
16883
  var def_customError = out;
16752
- 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 { ");
16753
16887
  }
16754
16888
  return out;
16755
16889
  };
@@ -17437,7 +17571,7 @@ var require_uri_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17437
17571
  function switchWorkspace(workspaceUri) {
17438
17572
  if (currentWorkspaceUri === workspaceUri) return;
17439
17573
  let workspace = workspaces.get(workspaceUri);
17440
- 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);
17441
17575
  }
17442
17576
  //#endregion
17443
17577
  //#region src-js/plugins/options.ts
@@ -17602,7 +17736,7 @@ function mergeValues(configValue, defaultValue) {
17602
17736
  //#endregion
17603
17737
  //#region src-js/plugins/load.ts
17604
17738
  const JSONStringify$1 = JSON.stringify, ObjectKeys$1 = Object.keys, ArrayIsArray$2 = Array.isArray, ObjectDefineProperty$2 = Object.defineProperty, JSONParse = JSON.parse;
17605
- let registeredRules = [];
17739
+ let registeredRules = [], registeredPluginNames = /* @__PURE__ */ new Set();
17606
17740
  /**
17607
17741
  * Set `registeredRules`. Used when switching workspaces.
17608
17742
  * @param rules - Array of `RuleDetails` objects
@@ -17610,6 +17744,13 @@ let registeredRules = [];
17610
17744
  function setRegisteredRules(rules) {
17611
17745
  registeredRules = rules;
17612
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
+ }
17613
17754
  const neverRunBeforeHook = () => !1;
17614
17755
  /**
17615
17756
  * Load a plugin.
@@ -17639,11 +17780,12 @@ async function loadPlugin(url, pluginName, pluginNameIsAlias, workspaceUri) {
17639
17780
  * @param workspaceUri - Workspace URI (`null` in CLI, string in LSP)
17640
17781
  * @returns - Plugin details
17641
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
17642
17784
  * @throws {TypeError} If one of plugin's rules is malformed, or its `createOnce` method returns invalid visitor
17643
17785
  * @throws {TypeError} If `plugin.meta.name` is not a string
17644
17786
  */
17645
17787
  function registerPlugin(plugin, pluginName, pluginNameIsAlias, workspaceUri) {
17646
- 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\`.`);
17647
17789
  let offset = registeredRules.length, { rules } = plugin, ruleNames = ObjectKeys$1(rules), ruleNamesLen = ruleNames.length;
17648
17790
  for (let i = 0; i < ruleNamesLen; i++) {
17649
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;
@@ -17693,7 +17835,7 @@ function registerPlugin(plugin, pluginName, pluginNameIsAlias, workspaceUri) {
17693
17835
  }
17694
17836
  ObjectDefineProperty$2(ruleDetails.context, "id", { value: fullRuleName }), registeredRules.push(ruleDetails);
17695
17837
  }
17696
- return {
17838
+ return registeredPluginNames.add(pluginName), {
17697
17839
  name: pluginName,
17698
17840
  offset,
17699
17841
  ruleNames
@@ -17799,7 +17941,7 @@ function conformHookFn(hookFn, hookName) {
17799
17941
  return hookFn;
17800
17942
  }
17801
17943
  //#endregion
17802
- //#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
17803
17945
  /**
17804
17946
  * @fileoverview Assertion utilities equivalent to the Node.js node:asserts module.
17805
17947
  * @author Josh Goldberg
@@ -18343,7 +18485,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18343
18485
  * Detect Electron renderer / nwjs process, which is node, but we should
18344
18486
  * treat as a browser.
18345
18487
  */
18346
- 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();
18347
18489
  })), require_debug_helpers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18348
18490
  let debug = require_src()("eslint:code-path");
18349
18491
  /**
@@ -18396,7 +18538,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18396
18538
  * @param {boolean} leaving A flag whether or not it's leaving
18397
18539
  * @returns {void}
18398
18540
  */
18399
- dumpState: debug.enabled ? function(node, state, leaving) {
18541
+ dumpState: debug.enabled ? /* c8 ignore next */ function(node, state, leaving) {
18400
18542
  for (let i = 0; i < state.currentSegments.length; ++i) {
18401
18543
  let segInternal = state.currentSegments[i].internal;
18402
18544
  if (leaving) {
@@ -18411,10 +18553,10 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18411
18553
  * The DOT code can be visualized with Graphvis.
18412
18554
  * @param {CodePath} codePath A code path to dump.
18413
18555
  * @returns {void}
18414
- * @see http://www.graphviz.org
18556
+ * @see https://www.graphviz.org
18415
18557
  * @see http://www.webgraphviz.com
18416
18558
  */
18417
- dumpDot: debug.enabled ? function(codePath) {
18559
+ dumpDot: debug.enabled ? /* c8 ignore next */ function(codePath) {
18418
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";
18419
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");
18420
18562
  let traceMap = Object.create(null), arrows = this.makeDotArrows(codePath, traceMap);
@@ -20053,10 +20195,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20053
20195
  case "ForOfStatement":
20054
20196
  parent.left === node ? state.makeForInOfLeft() : parent.right === node ? state.makeForInOfRight() : (assert(parent.body === node), state.makeForInOfBody());
20055
20197
  break;
20056
- case "AssignmentPattern":
20057
- parent.right === node && (state.pushForkContext(), state.forkBypassPath(), state.forkPath());
20058
- break;
20059
- default: break;
20198
+ case "AssignmentPattern": parent.right === node && (state.pushForkContext(), state.forkBypassPath(), state.forkPath());
20060
20199
  }
20061
20200
  }
20062
20201
  /**
@@ -20128,10 +20267,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20128
20267
  case "ForOfStatement":
20129
20268
  state.pushLoopContext(node.type, getLabel(node));
20130
20269
  break;
20131
- case "LabeledStatement":
20132
- breakableTypePattern.test(node.body.type) || state.pushBreakContext(!1, node.label.name);
20133
- break;
20134
- default: break;
20270
+ case "LabeledStatement": breakableTypePattern.test(node.body.type) || state.pushBreakContext(!1, node.label.name);
20135
20271
  }
20136
20272
  forwardCurrentToHead(analyzer, node), debug.dumpState(node, state, !1);
20137
20273
  }
@@ -20200,10 +20336,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20200
20336
  case "AssignmentPattern":
20201
20337
  state.popForkContext();
20202
20338
  break;
20203
- case "LabeledStatement":
20204
- breakableTypePattern.test(node.body.type) || state.popBreakContext();
20205
- break;
20206
- default: break;
20339
+ case "LabeledStatement": breakableTypePattern.test(node.body.type) || state.popBreakContext();
20207
20340
  }
20208
20341
  dontForward || forwardCurrentToHead(analyzer, node), debug.dumpState(node, state, !0);
20209
20342
  }
@@ -20230,10 +20363,7 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20230
20363
  case "StaticBlock":
20231
20364
  endCodePath();
20232
20365
  break;
20233
- case "CallExpression":
20234
- node.optional === !0 && node.arguments.length === 0 && CodePath.getState(analyzer.codePath).makeOptionalRight();
20235
- break;
20236
- default: break;
20366
+ case "CallExpression": node.optional === !0 && node.arguments.length === 0 && CodePath.getState(analyzer.codePath).makeOptionalRight();
20237
20367
  }
20238
20368
  isPropertyDefinitionValue(node) && endCodePath();
20239
20369
  }
@@ -23705,7 +23835,7 @@ function lintFileImpl(filePath, bufferId, buffer, ruleIds, optionsIds, settingsJ
23705
23835
  let hasBOM = buffer[2147483574] === 1;
23706
23836
  setupSourceForFile(buffer, hasBOM), setSettingsForFile(settingsJSON), setGlobalsForFile(globalsJSON);
23707
23837
  for (let i = 0, len = ruleIds.length; i < len; i++) {
23708
- let ruleDetails = registeredRules[ruleIds[i]];
23838
+ let ruleId = ruleIds[i], ruleDetails = registeredRules[ruleId];
23709
23839
  ruleDetails.ruleIndex = i;
23710
23840
  let optionsId = optionsIds[i];
23711
23841
  OPTIONS_DESCRIPTOR.value = optionsId === 0 ? ruleDetails.defaultOptions : allOptions[optionsId], ObjectDefineProperty(ruleDetails.context, "options", OPTIONS_DESCRIPTOR);
@@ -23763,4 +23893,4 @@ function resetStateAfterError() {
23763
23893
  runAfterHooks(!1), finalizeCompiledVisitor(), resetCompiledVisitor(), diagnostics.length = 0, ancestors.length = 0, resetFile(), resetCfgWalk();
23764
23894
  }
23765
23895
  //#endregion
23766
- 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 };