@html-validate/commitlint-config 4.0.2 → 4.1.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.
@@ -18,11 +18,20 @@ var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? requir
18
18
  if (typeof require !== "undefined") return require.apply(this, arguments);
19
19
  throw Error('Dynamic require of "' + x2 + '" is not supported');
20
20
  });
21
- var __esm = (fn, res) => function __init() {
22
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
21
+ var __esm = (fn, res, err) => function __init() {
22
+ if (err) throw err[0];
23
+ try {
24
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
25
+ } catch (e2) {
26
+ throw err = [e2], e2;
27
+ }
23
28
  };
24
29
  var __commonJS = (cb, mod) => function __require2() {
25
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
30
+ try {
31
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
32
+ } catch (e2) {
33
+ throw mod = 0, e2;
34
+ }
26
35
  };
27
36
  var __copyProps = (to, from, except, desc) => {
28
37
  if (from && typeof from === "object" || typeof from === "function") {
@@ -224,6 +233,18 @@ var require_semver = __commonJS({
224
233
  var { safeRe: re, t: t2 } = require_re();
225
234
  var parseOptions = require_parse_options();
226
235
  var { compareIdentifiers } = require_identifiers();
236
+ var isPrereleaseIdentifier = (prerelease, identifier) => {
237
+ const identifiers = identifier.split(".");
238
+ if (identifiers.length > prerelease.length) {
239
+ return false;
240
+ }
241
+ for (let i2 = 0; i2 < identifiers.length; i2++) {
242
+ if (compareIdentifiers(prerelease[i2], identifiers[i2]) !== 0) {
243
+ return false;
244
+ }
245
+ }
246
+ return true;
247
+ };
227
248
  var SemVer = class _SemVer {
228
249
  constructor(version, options) {
229
250
  options = parseOptions(options);
@@ -470,8 +491,9 @@ var require_semver = __commonJS({
470
491
  if (identifierBase === false) {
471
492
  prerelease = [identifier];
472
493
  }
473
- if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
474
- if (isNaN(this.prerelease[1])) {
494
+ if (isPrereleaseIdentifier(this.prerelease, identifier)) {
495
+ const prereleaseBase = this.prerelease[identifier.split(".").length];
496
+ if (isNaN(prereleaseBase)) {
475
497
  this.prerelease = prerelease;
476
498
  }
477
499
  } else {
@@ -1141,20 +1163,22 @@ var require_range = __commonJS({
1141
1163
  return comp;
1142
1164
  };
1143
1165
  var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
1166
+ var invalidXRangeOrder = (M, m2, p2) => isX(M) && !isX(m2) || isX(m2) && p2 && !isX(p2);
1144
1167
  var replaceTildes = (comp, options) => {
1145
1168
  return comp.trim().split(/\s+/).map((c2) => replaceTilde(c2, options)).join(" ");
1146
1169
  };
1147
1170
  var replaceTilde = (comp, options) => {
1148
1171
  const r2 = options.loose ? re[t2.TILDELOOSE] : re[t2.TILDE];
1172
+ const z2 = options.includePrerelease ? "-0" : "";
1149
1173
  return comp.replace(r2, (_2, M, m2, p2, pr) => {
1150
1174
  debug("tilde", comp, _2, M, m2, p2, pr);
1151
1175
  let ret;
1152
1176
  if (isX(M)) {
1153
1177
  ret = "";
1154
1178
  } else if (isX(m2)) {
1155
- ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
1179
+ ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`;
1156
1180
  } else if (isX(p2)) {
1157
- ret = `>=${M}.${m2}.0 <${M}.${+m2 + 1}.0-0`;
1181
+ ret = `>=${M}.${m2}.0${z2} <${M}.${+m2 + 1}.0-0`;
1158
1182
  } else if (pr) {
1159
1183
  debug("replaceTilde pr", pr);
1160
1184
  ret = `>=${M}.${m2}.${p2}-${pr} <${M}.${+m2 + 1}.0-0`;
@@ -1200,9 +1224,9 @@ var require_range = __commonJS({
1200
1224
  debug("no pr");
1201
1225
  if (M === "0") {
1202
1226
  if (m2 === "0") {
1203
- ret = `>=${M}.${m2}.${p2}${z2} <${M}.${m2}.${+p2 + 1}-0`;
1227
+ ret = `>=${M}.${m2}.${p2} <${M}.${m2}.${+p2 + 1}-0`;
1204
1228
  } else {
1205
- ret = `>=${M}.${m2}.${p2}${z2} <${M}.${+m2 + 1}.0-0`;
1229
+ ret = `>=${M}.${m2}.${p2} <${M}.${+m2 + 1}.0-0`;
1206
1230
  }
1207
1231
  } else {
1208
1232
  ret = `>=${M}.${m2}.${p2} <${+M + 1}.0.0-0`;
@@ -1221,6 +1245,9 @@ var require_range = __commonJS({
1221
1245
  const r2 = options.loose ? re[t2.XRANGELOOSE] : re[t2.XRANGE];
1222
1246
  return comp.replace(r2, (ret, gtlt, M, m2, p2, pr) => {
1223
1247
  debug("xRange", comp, ret, gtlt, M, m2, p2, pr);
1248
+ if (invalidXRangeOrder(M, m2, p2)) {
1249
+ return comp;
1250
+ }
1224
1251
  const xM = isX(M);
1225
1252
  const xm = xM || isX(m2);
1226
1253
  const xp = xm || isX(p2);
@@ -10397,19 +10424,18 @@ var require_common = __commonJS({
10397
10424
  return [sequence];
10398
10425
  }
10399
10426
  function extend(target, source) {
10400
- var index, length, key, sourceKeys;
10401
10427
  if (source) {
10402
- sourceKeys = Object.keys(source);
10403
- for (index = 0, length = sourceKeys.length; index < length; index += 1) {
10404
- key = sourceKeys[index];
10428
+ const sourceKeys = Object.keys(source);
10429
+ for (let index = 0, length = sourceKeys.length; index < length; index += 1) {
10430
+ const key = sourceKeys[index];
10405
10431
  target[key] = source[key];
10406
10432
  }
10407
10433
  }
10408
10434
  return target;
10409
10435
  }
10410
10436
  function repeat(string, count) {
10411
- var result = "", cycle;
10412
- for (cycle = 0; cycle < count; cycle += 1) {
10437
+ let result = "";
10438
+ for (let cycle = 0; cycle < count; cycle += 1) {
10413
10439
  result += string;
10414
10440
  }
10415
10441
  return result;
@@ -10431,7 +10457,8 @@ var require_exception = __commonJS({
10431
10457
  "node_modules/cosmiconfig/node_modules/js-yaml/lib/exception.js"(exports, module) {
10432
10458
  "use strict";
10433
10459
  function formatError(exception, compact) {
10434
- var where = "", message2 = exception.reason || "(unknown reason)";
10460
+ let where = "";
10461
+ const message2 = exception.reason || "(unknown reason)";
10435
10462
  if (!exception.mark) return message2;
10436
10463
  if (exception.mark.name) {
10437
10464
  where += 'in "' + exception.mark.name + '" ';
@@ -10469,9 +10496,9 @@ var require_snippet = __commonJS({
10469
10496
  "use strict";
10470
10497
  var common = require_common();
10471
10498
  function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
10472
- var head = "";
10473
- var tail = "";
10474
- var maxHalfLength = Math.floor(maxLineLength / 2) - 1;
10499
+ let head = "";
10500
+ let tail = "";
10501
+ const maxHalfLength = Math.floor(maxLineLength / 2) - 1;
10475
10502
  if (position - lineStart > maxHalfLength) {
10476
10503
  head = " ... ";
10477
10504
  lineStart = position - maxHalfLength + head.length;
@@ -10496,11 +10523,11 @@ var require_snippet = __commonJS({
10496
10523
  if (typeof options.indent !== "number") options.indent = 1;
10497
10524
  if (typeof options.linesBefore !== "number") options.linesBefore = 3;
10498
10525
  if (typeof options.linesAfter !== "number") options.linesAfter = 2;
10499
- var re = /\r?\n|\r|\0/g;
10500
- var lineStarts = [0];
10501
- var lineEnds = [];
10502
- var match;
10503
- var foundLineNo = -1;
10526
+ const re = /\r?\n|\r|\0/g;
10527
+ const lineStarts = [0];
10528
+ const lineEnds = [];
10529
+ let match;
10530
+ let foundLineNo = -1;
10504
10531
  while (match = re.exec(mark.buffer)) {
10505
10532
  lineEnds.push(match.index);
10506
10533
  lineStarts.push(match.index + match[0].length);
@@ -10509,33 +10536,33 @@ var require_snippet = __commonJS({
10509
10536
  }
10510
10537
  }
10511
10538
  if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;
10512
- var result = "", i2, line;
10513
- var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
10514
- var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
10515
- for (i2 = 1; i2 <= options.linesBefore; i2++) {
10539
+ let result = "";
10540
+ const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
10541
+ const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
10542
+ for (let i2 = 1; i2 <= options.linesBefore; i2++) {
10516
10543
  if (foundLineNo - i2 < 0) break;
10517
- line = getLine(
10544
+ const line2 = getLine(
10518
10545
  mark.buffer,
10519
10546
  lineStarts[foundLineNo - i2],
10520
10547
  lineEnds[foundLineNo - i2],
10521
10548
  mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i2]),
10522
10549
  maxLineLength
10523
10550
  );
10524
- result = common.repeat(" ", options.indent) + padStart((mark.line - i2 + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result;
10551
+ result = common.repeat(" ", options.indent) + padStart((mark.line - i2 + 1).toString(), lineNoLength) + " | " + line2.str + "\n" + result;
10525
10552
  }
10526
- line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
10553
+ const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
10527
10554
  result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n";
10528
10555
  result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n";
10529
- for (i2 = 1; i2 <= options.linesAfter; i2++) {
10556
+ for (let i2 = 1; i2 <= options.linesAfter; i2++) {
10530
10557
  if (foundLineNo + i2 >= lineEnds.length) break;
10531
- line = getLine(
10558
+ const line2 = getLine(
10532
10559
  mark.buffer,
10533
10560
  lineStarts[foundLineNo + i2],
10534
10561
  lineEnds[foundLineNo + i2],
10535
10562
  mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i2]),
10536
10563
  maxLineLength
10537
10564
  );
10538
- result += common.repeat(" ", options.indent) + padStart((mark.line + i2 + 1).toString(), lineNoLength) + " | " + line.str + "\n";
10565
+ result += common.repeat(" ", options.indent) + padStart((mark.line + i2 + 1).toString(), lineNoLength) + " | " + line2.str + "\n";
10539
10566
  }
10540
10567
  return result.replace(/\n$/, "");
10541
10568
  }
@@ -10566,7 +10593,7 @@ var require_type = __commonJS({
10566
10593
  "mapping"
10567
10594
  ];
10568
10595
  function compileStyleAliases(map) {
10569
- var result = {};
10596
+ const result = {};
10570
10597
  if (map !== null) {
10571
10598
  Object.keys(map).forEach(function(style) {
10572
10599
  map[style].forEach(function(alias) {
@@ -10614,9 +10641,9 @@ var require_schema = __commonJS({
10614
10641
  var YAMLException = require_exception();
10615
10642
  var Type = require_type();
10616
10643
  function compileList(schema2, name) {
10617
- var result = [];
10644
+ const result = [];
10618
10645
  schema2[name].forEach(function(currentType) {
10619
- var newIndex = result.length;
10646
+ let newIndex = result.length;
10620
10647
  result.forEach(function(previousType, previousIndex) {
10621
10648
  if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
10622
10649
  newIndex = previousIndex;
@@ -10627,7 +10654,7 @@ var require_schema = __commonJS({
10627
10654
  return result;
10628
10655
  }
10629
10656
  function compileMap() {
10630
- var result = {
10657
+ const result = {
10631
10658
  scalar: {},
10632
10659
  sequence: {},
10633
10660
  mapping: {},
@@ -10638,7 +10665,7 @@ var require_schema = __commonJS({
10638
10665
  mapping: [],
10639
10666
  fallback: []
10640
10667
  }
10641
- }, index, length;
10668
+ };
10642
10669
  function collectType(type) {
10643
10670
  if (type.multi) {
10644
10671
  result.multi[type.kind].push(type);
@@ -10647,7 +10674,7 @@ var require_schema = __commonJS({
10647
10674
  result[type.kind][type.tag] = result["fallback"][type.tag] = type;
10648
10675
  }
10649
10676
  }
10650
- for (index = 0, length = arguments.length; index < length; index += 1) {
10677
+ for (let index = 0, length = arguments.length; index < length; index += 1) {
10651
10678
  arguments[index].forEach(collectType);
10652
10679
  }
10653
10680
  return result;
@@ -10656,8 +10683,8 @@ var require_schema = __commonJS({
10656
10683
  return this.extend(definition);
10657
10684
  }
10658
10685
  Schema.prototype.extend = function extend(definition) {
10659
- var implicit = [];
10660
- var explicit = [];
10686
+ let implicit = [];
10687
+ let explicit = [];
10661
10688
  if (definition instanceof Type) {
10662
10689
  explicit.push(definition);
10663
10690
  } else if (Array.isArray(definition)) {
@@ -10684,7 +10711,7 @@ var require_schema = __commonJS({
10684
10711
  throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
10685
10712
  }
10686
10713
  });
10687
- var result = Object.create(Schema.prototype);
10714
+ const result = Object.create(Schema.prototype);
10688
10715
  result.implicit = (this.implicit || []).concat(implicit);
10689
10716
  result.explicit = (this.explicit || []).concat(explicit);
10690
10717
  result.compiledImplicit = compileList(result, "implicit");
@@ -10760,7 +10787,7 @@ var require_null = __commonJS({
10760
10787
  var Type = require_type();
10761
10788
  function resolveYamlNull(data) {
10762
10789
  if (data === null) return true;
10763
- var max = data.length;
10790
+ const max = data.length;
10764
10791
  return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL");
10765
10792
  }
10766
10793
  function constructYamlNull() {
@@ -10803,7 +10830,7 @@ var require_bool = __commonJS({
10803
10830
  var Type = require_type();
10804
10831
  function resolveYamlBoolean(data) {
10805
10832
  if (data === null) return false;
10806
- var max = data.length;
10833
+ const max = data.length;
10807
10834
  return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE");
10808
10835
  }
10809
10836
  function constructYamlBoolean(data) {
@@ -10840,19 +10867,21 @@ var require_int = __commonJS({
10840
10867
  var common = require_common();
10841
10868
  var Type = require_type();
10842
10869
  function isHexCode(c2) {
10843
- return 48 <= c2 && c2 <= 57 || 65 <= c2 && c2 <= 70 || 97 <= c2 && c2 <= 102;
10870
+ return c2 >= 48 && c2 <= 57 || c2 >= 65 && c2 <= 70 || c2 >= 97 && c2 <= 102;
10844
10871
  }
10845
10872
  function isOctCode(c2) {
10846
- return 48 <= c2 && c2 <= 55;
10873
+ return c2 >= 48 && c2 <= 55;
10847
10874
  }
10848
10875
  function isDecCode(c2) {
10849
- return 48 <= c2 && c2 <= 57;
10876
+ return c2 >= 48 && c2 <= 57;
10850
10877
  }
10851
10878
  function resolveYamlInteger(data) {
10852
10879
  if (data === null) return false;
10853
- var max = data.length, index = 0, hasDigits = false, ch;
10880
+ const max = data.length;
10881
+ let index = 0;
10882
+ let hasDigits = false;
10854
10883
  if (!max) return false;
10855
- ch = data[index];
10884
+ let ch = data[index];
10856
10885
  if (ch === "-" || ch === "+") {
10857
10886
  ch = data[++index];
10858
10887
  }
@@ -10863,51 +10892,41 @@ var require_int = __commonJS({
10863
10892
  index++;
10864
10893
  for (; index < max; index++) {
10865
10894
  ch = data[index];
10866
- if (ch === "_") continue;
10867
10895
  if (ch !== "0" && ch !== "1") return false;
10868
10896
  hasDigits = true;
10869
10897
  }
10870
- return hasDigits && ch !== "_";
10898
+ return hasDigits && isFinite(parseYamlInteger(data));
10871
10899
  }
10872
10900
  if (ch === "x") {
10873
10901
  index++;
10874
10902
  for (; index < max; index++) {
10875
- ch = data[index];
10876
- if (ch === "_") continue;
10877
10903
  if (!isHexCode(data.charCodeAt(index))) return false;
10878
10904
  hasDigits = true;
10879
10905
  }
10880
- return hasDigits && ch !== "_";
10906
+ return hasDigits && isFinite(parseYamlInteger(data));
10881
10907
  }
10882
10908
  if (ch === "o") {
10883
10909
  index++;
10884
10910
  for (; index < max; index++) {
10885
- ch = data[index];
10886
- if (ch === "_") continue;
10887
10911
  if (!isOctCode(data.charCodeAt(index))) return false;
10888
10912
  hasDigits = true;
10889
10913
  }
10890
- return hasDigits && ch !== "_";
10914
+ return hasDigits && isFinite(parseYamlInteger(data));
10891
10915
  }
10892
10916
  }
10893
- if (ch === "_") return false;
10894
10917
  for (; index < max; index++) {
10895
- ch = data[index];
10896
- if (ch === "_") continue;
10897
10918
  if (!isDecCode(data.charCodeAt(index))) {
10898
10919
  return false;
10899
10920
  }
10900
10921
  hasDigits = true;
10901
10922
  }
10902
- if (!hasDigits || ch === "_") return false;
10903
- return true;
10923
+ if (!hasDigits) return false;
10924
+ return isFinite(parseYamlInteger(data));
10904
10925
  }
10905
- function constructYamlInteger(data) {
10906
- var value = data, sign = 1, ch;
10907
- if (value.indexOf("_") !== -1) {
10908
- value = value.replace(/_/g, "");
10909
- }
10910
- ch = value[0];
10926
+ function parseYamlInteger(data) {
10927
+ let value = data;
10928
+ let sign = 1;
10929
+ let ch = value[0];
10911
10930
  if (ch === "-" || ch === "+") {
10912
10931
  if (ch === "-") sign = -1;
10913
10932
  value = value.slice(1);
@@ -10921,6 +10940,9 @@ var require_int = __commonJS({
10921
10940
  }
10922
10941
  return sign * parseInt(value, 10);
10923
10942
  }
10943
+ function constructYamlInteger(data) {
10944
+ return parseYamlInteger(data);
10945
+ }
10924
10946
  function isInteger(object) {
10925
10947
  return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object));
10926
10948
  }
@@ -10939,7 +10961,6 @@ var require_int = __commonJS({
10939
10961
  decimal: function(obj) {
10940
10962
  return obj.toString(10);
10941
10963
  },
10942
- /* eslint-disable max-len */
10943
10964
  hexadecimal: function(obj) {
10944
10965
  return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1);
10945
10966
  }
@@ -10963,21 +10984,24 @@ var require_float = __commonJS({
10963
10984
  var Type = require_type();
10964
10985
  var YAML_FLOAT_PATTERN = new RegExp(
10965
10986
  // 2.5e4, 2.5 and integers
10966
- "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
10987
+ "^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
10988
+ );
10989
+ var YAML_FLOAT_SPECIAL_PATTERN = new RegExp(
10990
+ "^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
10967
10991
  );
10968
10992
  function resolveYamlFloat(data) {
10969
10993
  if (data === null) return false;
10970
- if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_`
10971
- // Probably should update regexp & check speed
10972
- data[data.length - 1] === "_") {
10994
+ if (!YAML_FLOAT_PATTERN.test(data)) {
10973
10995
  return false;
10974
10996
  }
10975
- return true;
10997
+ if (isFinite(parseFloat(data, 10))) {
10998
+ return true;
10999
+ }
11000
+ return YAML_FLOAT_SPECIAL_PATTERN.test(data);
10976
11001
  }
10977
11002
  function constructYamlFloat(data) {
10978
- var value, sign;
10979
- value = data.replace(/_/g, "").toLowerCase();
10980
- sign = value[0] === "-" ? -1 : 1;
11003
+ let value = data.toLowerCase();
11004
+ const sign = value[0] === "-" ? -1 : 1;
10981
11005
  if ("+-".indexOf(value[0]) >= 0) {
10982
11006
  value = value.slice(1);
10983
11007
  }
@@ -10990,7 +11014,6 @@ var require_float = __commonJS({
10990
11014
  }
10991
11015
  var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
10992
11016
  function representYamlFloat(object, style) {
10993
- var res;
10994
11017
  if (isNaN(object)) {
10995
11018
  switch (style) {
10996
11019
  case "lowercase":
@@ -11021,7 +11044,7 @@ var require_float = __commonJS({
11021
11044
  } else if (common.isNegativeZero(object)) {
11022
11045
  return "-0.0";
11023
11046
  }
11024
- res = object.toString(10);
11047
+ const res = object.toString(10);
11025
11048
  return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
11026
11049
  }
11027
11050
  function isFloat(object) {
@@ -11079,19 +11102,20 @@ var require_timestamp = __commonJS({
11079
11102
  return false;
11080
11103
  }
11081
11104
  function constructYamlTimestamp(data) {
11082
- var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;
11083
- match = YAML_DATE_REGEXP.exec(data);
11105
+ let fraction = 0;
11106
+ let delta = null;
11107
+ let match = YAML_DATE_REGEXP.exec(data);
11084
11108
  if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
11085
11109
  if (match === null) throw new Error("Date resolve error");
11086
- year = +match[1];
11087
- month = +match[2] - 1;
11088
- day = +match[3];
11110
+ const year = +match[1];
11111
+ const month = +match[2] - 1;
11112
+ const day = +match[3];
11089
11113
  if (!match[4]) {
11090
11114
  return new Date(Date.UTC(year, month, day));
11091
11115
  }
11092
- hour = +match[4];
11093
- minute = +match[5];
11094
- second = +match[6];
11116
+ const hour = +match[4];
11117
+ const minute = +match[5];
11118
+ const second = +match[6];
11095
11119
  if (match[7]) {
11096
11120
  fraction = match[7].slice(0, 3);
11097
11121
  while (fraction.length < 3) {
@@ -11100,12 +11124,12 @@ var require_timestamp = __commonJS({
11100
11124
  fraction = +fraction;
11101
11125
  }
11102
11126
  if (match[9]) {
11103
- tz_hour = +match[10];
11104
- tz_minute = +(match[11] || 0);
11105
- delta = (tz_hour * 60 + tz_minute) * 6e4;
11127
+ const tzHour = +match[10];
11128
+ const tzMinute = +(match[11] || 0);
11129
+ delta = (tzHour * 60 + tzMinute) * 6e4;
11106
11130
  if (match[9] === "-") delta = -delta;
11107
11131
  }
11108
- date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
11132
+ const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
11109
11133
  if (delta) date.setTime(date.getTime() - delta);
11110
11134
  return date;
11111
11135
  }
@@ -11145,9 +11169,11 @@ var require_binary = __commonJS({
11145
11169
  var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
11146
11170
  function resolveYamlBinary(data) {
11147
11171
  if (data === null) return false;
11148
- var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;
11149
- for (idx = 0; idx < max; idx++) {
11150
- code = map.indexOf(data.charAt(idx));
11172
+ let bitlen = 0;
11173
+ const max = data.length;
11174
+ const map = BASE64_MAP;
11175
+ for (let idx = 0; idx < max; idx++) {
11176
+ const code = map.indexOf(data.charAt(idx));
11151
11177
  if (code > 64) continue;
11152
11178
  if (code < 0) return false;
11153
11179
  bitlen += 6;
@@ -11155,8 +11181,12 @@ var require_binary = __commonJS({
11155
11181
  return bitlen % 8 === 0;
11156
11182
  }
11157
11183
  function constructYamlBinary(data) {
11158
- var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = [];
11159
- for (idx = 0; idx < max; idx++) {
11184
+ const input = data.replace(/[\r\n=]/g, "");
11185
+ const max = input.length;
11186
+ const map = BASE64_MAP;
11187
+ let bits = 0;
11188
+ const result = [];
11189
+ for (let idx = 0; idx < max; idx++) {
11160
11190
  if (idx % 4 === 0 && idx) {
11161
11191
  result.push(bits >> 16 & 255);
11162
11192
  result.push(bits >> 8 & 255);
@@ -11164,7 +11194,7 @@ var require_binary = __commonJS({
11164
11194
  }
11165
11195
  bits = bits << 6 | map.indexOf(input.charAt(idx));
11166
11196
  }
11167
- tailbits = max % 4 * 6;
11197
+ const tailbits = max % 4 * 6;
11168
11198
  if (tailbits === 0) {
11169
11199
  result.push(bits >> 16 & 255);
11170
11200
  result.push(bits >> 8 & 255);
@@ -11178,8 +11208,11 @@ var require_binary = __commonJS({
11178
11208
  return new Uint8Array(result);
11179
11209
  }
11180
11210
  function representYamlBinary(object) {
11181
- var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP;
11182
- for (idx = 0; idx < max; idx++) {
11211
+ let result = "";
11212
+ let bits = 0;
11213
+ const max = object.length;
11214
+ const map = BASE64_MAP;
11215
+ for (let idx = 0; idx < max; idx++) {
11183
11216
  if (idx % 3 === 0 && idx) {
11184
11217
  result += map[bits >> 18 & 63];
11185
11218
  result += map[bits >> 12 & 63];
@@ -11188,7 +11221,7 @@ var require_binary = __commonJS({
11188
11221
  }
11189
11222
  bits = (bits << 8) + object[idx];
11190
11223
  }
11191
- tail = max % 3;
11224
+ const tail = max % 3;
11192
11225
  if (tail === 0) {
11193
11226
  result += map[bits >> 18 & 63];
11194
11227
  result += map[bits >> 12 & 63];
@@ -11229,11 +11262,13 @@ var require_omap = __commonJS({
11229
11262
  var _toString = Object.prototype.toString;
11230
11263
  function resolveYamlOmap(data) {
11231
11264
  if (data === null) return true;
11232
- var objectKeys2 = [], index, length, pair, pairKey, pairHasKey, object = data;
11233
- for (index = 0, length = object.length; index < length; index += 1) {
11234
- pair = object[index];
11235
- pairHasKey = false;
11265
+ const objectKeys2 = [];
11266
+ const object = data;
11267
+ for (let index = 0, length = object.length; index < length; index += 1) {
11268
+ const pair = object[index];
11269
+ let pairHasKey = false;
11236
11270
  if (_toString.call(pair) !== "[object Object]") return false;
11271
+ let pairKey;
11237
11272
  for (pairKey in pair) {
11238
11273
  if (_hasOwnProperty.call(pair, pairKey)) {
11239
11274
  if (!pairHasKey) pairHasKey = true;
@@ -11265,12 +11300,12 @@ var require_pairs = __commonJS({
11265
11300
  var _toString = Object.prototype.toString;
11266
11301
  function resolveYamlPairs(data) {
11267
11302
  if (data === null) return true;
11268
- var index, length, pair, keys, result, object = data;
11269
- result = new Array(object.length);
11270
- for (index = 0, length = object.length; index < length; index += 1) {
11271
- pair = object[index];
11303
+ const object = data;
11304
+ const result = new Array(object.length);
11305
+ for (let index = 0, length = object.length; index < length; index += 1) {
11306
+ const pair = object[index];
11272
11307
  if (_toString.call(pair) !== "[object Object]") return false;
11273
- keys = Object.keys(pair);
11308
+ const keys = Object.keys(pair);
11274
11309
  if (keys.length !== 1) return false;
11275
11310
  result[index] = [keys[0], pair[keys[0]]];
11276
11311
  }
@@ -11278,11 +11313,11 @@ var require_pairs = __commonJS({
11278
11313
  }
11279
11314
  function constructYamlPairs(data) {
11280
11315
  if (data === null) return [];
11281
- var index, length, pair, keys, result, object = data;
11282
- result = new Array(object.length);
11283
- for (index = 0, length = object.length; index < length; index += 1) {
11284
- pair = object[index];
11285
- keys = Object.keys(pair);
11316
+ const object = data;
11317
+ const result = new Array(object.length);
11318
+ for (let index = 0, length = object.length; index < length; index += 1) {
11319
+ const pair = object[index];
11320
+ const keys = Object.keys(pair);
11286
11321
  result[index] = [keys[0], pair[keys[0]]];
11287
11322
  }
11288
11323
  return result;
@@ -11303,8 +11338,8 @@ var require_set = __commonJS({
11303
11338
  var _hasOwnProperty = Object.prototype.hasOwnProperty;
11304
11339
  function resolveYamlSet(data) {
11305
11340
  if (data === null) return true;
11306
- var key, object = data;
11307
- for (key in object) {
11341
+ const object = data;
11342
+ for (const key in object) {
11308
11343
  if (_hasOwnProperty.call(object, key)) {
11309
11344
  if (object[key] !== null) return false;
11310
11345
  }
@@ -11359,31 +11394,30 @@ var require_loader = __commonJS({
11359
11394
  var CHOMPING_KEEP = 3;
11360
11395
  var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
11361
11396
  var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
11362
- var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
11363
- var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
11364
- var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
11397
+ var PATTERN_FLOW_INDICATORS = /[,\[\]{}]/;
11398
+ var PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/;
11399
+ var PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;
11365
11400
  function _class(obj) {
11366
11401
  return Object.prototype.toString.call(obj);
11367
11402
  }
11368
- function is_EOL(c2) {
11403
+ function isEol(c2) {
11369
11404
  return c2 === 10 || c2 === 13;
11370
11405
  }
11371
- function is_WHITE_SPACE(c2) {
11406
+ function isWhiteSpace(c2) {
11372
11407
  return c2 === 9 || c2 === 32;
11373
11408
  }
11374
- function is_WS_OR_EOL(c2) {
11409
+ function isWsOrEol(c2) {
11375
11410
  return c2 === 9 || c2 === 32 || c2 === 10 || c2 === 13;
11376
11411
  }
11377
- function is_FLOW_INDICATOR(c2) {
11412
+ function isFlowIndicator(c2) {
11378
11413
  return c2 === 44 || c2 === 91 || c2 === 93 || c2 === 123 || c2 === 125;
11379
11414
  }
11380
11415
  function fromHexCode(c2) {
11381
- var lc;
11382
- if (48 <= c2 && c2 <= 57) {
11416
+ if (c2 >= 48 && c2 <= 57) {
11383
11417
  return c2 - 48;
11384
11418
  }
11385
- lc = c2 | 32;
11386
- if (97 <= lc && lc <= 102) {
11419
+ const lc = c2 | 32;
11420
+ if (lc >= 97 && lc <= 102) {
11387
11421
  return lc - 97 + 10;
11388
11422
  }
11389
11423
  return -1;
@@ -11401,13 +11435,52 @@ var require_loader = __commonJS({
11401
11435
  return 0;
11402
11436
  }
11403
11437
  function fromDecimalCode(c2) {
11404
- if (48 <= c2 && c2 <= 57) {
11438
+ if (c2 >= 48 && c2 <= 57) {
11405
11439
  return c2 - 48;
11406
11440
  }
11407
11441
  return -1;
11408
11442
  }
11409
11443
  function simpleEscapeSequence(c2) {
11410
- return c2 === 48 ? "\0" : c2 === 97 ? "\x07" : c2 === 98 ? "\b" : c2 === 116 ? " " : c2 === 9 ? " " : c2 === 110 ? "\n" : c2 === 118 ? "\v" : c2 === 102 ? "\f" : c2 === 114 ? "\r" : c2 === 101 ? "\x1B" : c2 === 32 ? " " : c2 === 34 ? '"' : c2 === 47 ? "/" : c2 === 92 ? "\\" : c2 === 78 ? "\x85" : c2 === 95 ? "\xA0" : c2 === 76 ? "\u2028" : c2 === 80 ? "\u2029" : "";
11444
+ switch (c2) {
11445
+ case 48:
11446
+ return "\0";
11447
+ case 97:
11448
+ return "\x07";
11449
+ case 98:
11450
+ return "\b";
11451
+ case 116:
11452
+ return " ";
11453
+ case 9:
11454
+ return " ";
11455
+ case 110:
11456
+ return "\n";
11457
+ case 118:
11458
+ return "\v";
11459
+ case 102:
11460
+ return "\f";
11461
+ case 114:
11462
+ return "\r";
11463
+ case 101:
11464
+ return "\x1B";
11465
+ case 32:
11466
+ return " ";
11467
+ case 34:
11468
+ return '"';
11469
+ case 47:
11470
+ return "/";
11471
+ case 92:
11472
+ return "\\";
11473
+ case 78:
11474
+ return "\x85";
11475
+ case 95:
11476
+ return "\xA0";
11477
+ case 76:
11478
+ return "\u2028";
11479
+ case 80:
11480
+ return "\u2029";
11481
+ default:
11482
+ return "";
11483
+ }
11411
11484
  }
11412
11485
  function charFromCodepoint(c2) {
11413
11486
  if (c2 <= 65535) {
@@ -11432,11 +11505,10 @@ var require_loader = __commonJS({
11432
11505
  }
11433
11506
  var simpleEscapeCheck = new Array(256);
11434
11507
  var simpleEscapeMap = new Array(256);
11435
- for (i2 = 0; i2 < 256; i2++) {
11508
+ for (let i2 = 0; i2 < 256; i2++) {
11436
11509
  simpleEscapeCheck[i2] = simpleEscapeSequence(i2) ? 1 : 0;
11437
11510
  simpleEscapeMap[i2] = simpleEscapeSequence(i2);
11438
11511
  }
11439
- var i2;
11440
11512
  function State(input, options) {
11441
11513
  this.input = input;
11442
11514
  this.filename = options["filename"] || null;
@@ -11445,6 +11517,8 @@ var require_loader = __commonJS({
11445
11517
  this.legacy = options["legacy"] || false;
11446
11518
  this.json = options["json"] || false;
11447
11519
  this.listener = options["listener"] || null;
11520
+ this.maxDepth = typeof options["maxDepth"] === "number" ? options["maxDepth"] : 100;
11521
+ this.maxTotalMergeKeys = typeof options["maxTotalMergeKeys"] === "number" ? options["maxTotalMergeKeys"] : 1e4;
11448
11522
  this.implicitTypes = this.schema.compiledImplicit;
11449
11523
  this.typeMap = this.schema.compiledTypeMap;
11450
11524
  this.length = input.length;
@@ -11452,11 +11526,14 @@ var require_loader = __commonJS({
11452
11526
  this.line = 0;
11453
11527
  this.lineStart = 0;
11454
11528
  this.lineIndent = 0;
11529
+ this.depth = 0;
11530
+ this.totalMergeKeys = 0;
11455
11531
  this.firstTabInLine = -1;
11456
11532
  this.documents = [];
11533
+ this.anchorMapTransactions = [];
11457
11534
  }
11458
11535
  function generateError(state, message2) {
11459
- var mark = {
11536
+ const mark = {
11460
11537
  name: state.filename,
11461
11538
  buffer: state.input.slice(0, -1),
11462
11539
  // omit trailing \0
@@ -11475,21 +11552,85 @@ var require_loader = __commonJS({
11475
11552
  state.onWarning.call(null, generateError(state, message2));
11476
11553
  }
11477
11554
  }
11555
+ function storeAnchor(state, name, value) {
11556
+ const transactions = state.anchorMapTransactions;
11557
+ if (transactions.length !== 0) {
11558
+ const transaction = transactions[transactions.length - 1];
11559
+ if (!_hasOwnProperty.call(transaction, name)) {
11560
+ transaction[name] = {
11561
+ existed: _hasOwnProperty.call(state.anchorMap, name),
11562
+ value: state.anchorMap[name]
11563
+ };
11564
+ }
11565
+ }
11566
+ state.anchorMap[name] = value;
11567
+ }
11568
+ function beginAnchorTransaction(state) {
11569
+ state.anchorMapTransactions.push(/* @__PURE__ */ Object.create(null));
11570
+ }
11571
+ function commitAnchorTransaction(state) {
11572
+ const transaction = state.anchorMapTransactions.pop();
11573
+ const transactions = state.anchorMapTransactions;
11574
+ if (transactions.length === 0) return;
11575
+ const parent = transactions[transactions.length - 1];
11576
+ const names = Object.keys(transaction);
11577
+ for (let index = 0, length = names.length; index < length; index += 1) {
11578
+ const name = names[index];
11579
+ if (!_hasOwnProperty.call(parent, name)) {
11580
+ parent[name] = transaction[name];
11581
+ }
11582
+ }
11583
+ }
11584
+ function rollbackAnchorTransaction(state) {
11585
+ const transaction = state.anchorMapTransactions.pop();
11586
+ const names = Object.keys(transaction);
11587
+ for (let index = names.length - 1; index >= 0; index -= 1) {
11588
+ const entry = transaction[names[index]];
11589
+ if (entry.existed) {
11590
+ state.anchorMap[names[index]] = entry.value;
11591
+ } else {
11592
+ delete state.anchorMap[names[index]];
11593
+ }
11594
+ }
11595
+ }
11596
+ function snapshotState(state) {
11597
+ return {
11598
+ position: state.position,
11599
+ line: state.line,
11600
+ lineStart: state.lineStart,
11601
+ lineIndent: state.lineIndent,
11602
+ firstTabInLine: state.firstTabInLine,
11603
+ tag: state.tag,
11604
+ anchor: state.anchor,
11605
+ kind: state.kind,
11606
+ result: state.result
11607
+ };
11608
+ }
11609
+ function restoreState(state, snapshot) {
11610
+ state.position = snapshot.position;
11611
+ state.line = snapshot.line;
11612
+ state.lineStart = snapshot.lineStart;
11613
+ state.lineIndent = snapshot.lineIndent;
11614
+ state.firstTabInLine = snapshot.firstTabInLine;
11615
+ state.tag = snapshot.tag;
11616
+ state.anchor = snapshot.anchor;
11617
+ state.kind = snapshot.kind;
11618
+ state.result = snapshot.result;
11619
+ }
11478
11620
  var directiveHandlers = {
11479
11621
  YAML: function handleYamlDirective(state, name, args) {
11480
- var match, major, minor;
11481
11622
  if (state.version !== null) {
11482
11623
  throwError(state, "duplication of %YAML directive");
11483
11624
  }
11484
11625
  if (args.length !== 1) {
11485
11626
  throwError(state, "YAML directive accepts exactly one argument");
11486
11627
  }
11487
- match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
11628
+ const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
11488
11629
  if (match === null) {
11489
11630
  throwError(state, "ill-formed argument of the YAML directive");
11490
11631
  }
11491
- major = parseInt(match[1], 10);
11492
- minor = parseInt(match[2], 10);
11632
+ const major = parseInt(match[1], 10);
11633
+ const minor = parseInt(match[2], 10);
11493
11634
  if (major !== 1) {
11494
11635
  throwError(state, "unacceptable YAML version of the document");
11495
11636
  }
@@ -11500,11 +11641,11 @@ var require_loader = __commonJS({
11500
11641
  }
11501
11642
  },
11502
11643
  TAG: function handleTagDirective(state, name, args) {
11503
- var handle, prefix2;
11644
+ let prefix2;
11504
11645
  if (args.length !== 2) {
11505
11646
  throwError(state, "TAG directive accepts exactly two arguments");
11506
11647
  }
11507
- handle = args[0];
11648
+ const handle = args[0];
11508
11649
  prefix2 = args[1];
11509
11650
  if (!PATTERN_TAG_HANDLE.test(handle)) {
11510
11651
  throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
@@ -11524,13 +11665,12 @@ var require_loader = __commonJS({
11524
11665
  }
11525
11666
  };
11526
11667
  function captureSegment(state, start, end, checkJson) {
11527
- var _position, _length, _character, _result;
11528
11668
  if (start < end) {
11529
- _result = state.input.slice(start, end);
11669
+ const _result = state.input.slice(start, end);
11530
11670
  if (checkJson) {
11531
- for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
11532
- _character = _result.charCodeAt(_position);
11533
- if (!(_character === 9 || 32 <= _character && _character <= 1114111)) {
11671
+ for (let _position = 0, _length = _result.length; _position < _length; _position += 1) {
11672
+ const _character = _result.charCodeAt(_position);
11673
+ if (!(_character === 9 || _character >= 32 && _character <= 1114111)) {
11534
11674
  throwError(state, "expected valid JSON character");
11535
11675
  }
11536
11676
  }
@@ -11541,13 +11681,15 @@ var require_loader = __commonJS({
11541
11681
  }
11542
11682
  }
11543
11683
  function mergeMappings(state, destination, source, overridableKeys) {
11544
- var sourceKeys, key, index, quantity;
11545
11684
  if (!common.isObject(source)) {
11546
11685
  throwError(state, "cannot merge mappings; the provided source object is unacceptable");
11547
11686
  }
11548
- sourceKeys = Object.keys(source);
11549
- for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
11550
- key = sourceKeys[index];
11687
+ const sourceKeys = Object.keys(source);
11688
+ for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
11689
+ const key = sourceKeys[index];
11690
+ if (state.maxTotalMergeKeys !== -1 && ++state.totalMergeKeys > state.maxTotalMergeKeys) {
11691
+ throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
11692
+ }
11551
11693
  if (!_hasOwnProperty.call(destination, key)) {
11552
11694
  setProperty(destination, key, source[key]);
11553
11695
  overridableKeys[key] = true;
@@ -11555,10 +11697,9 @@ var require_loader = __commonJS({
11555
11697
  }
11556
11698
  }
11557
11699
  function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) {
11558
- var index, quantity;
11559
11700
  if (Array.isArray(keyNode)) {
11560
11701
  keyNode = Array.prototype.slice.call(keyNode);
11561
- for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {
11702
+ for (let index = 0, quantity = keyNode.length; index < quantity; index += 1) {
11562
11703
  if (Array.isArray(keyNode[index])) {
11563
11704
  throwError(state, "nested arrays are not supported inside keys");
11564
11705
  }
@@ -11576,7 +11717,7 @@ var require_loader = __commonJS({
11576
11717
  }
11577
11718
  if (keyTag === "tag:yaml.org,2002:merge") {
11578
11719
  if (Array.isArray(valueNode)) {
11579
- for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
11720
+ for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) {
11580
11721
  mergeMappings(state, _result, valueNode[index], overridableKeys);
11581
11722
  }
11582
11723
  } else {
@@ -11595,8 +11736,7 @@ var require_loader = __commonJS({
11595
11736
  return _result;
11596
11737
  }
11597
11738
  function readLineBreak(state) {
11598
- var ch;
11599
- ch = state.input.charCodeAt(state.position);
11739
+ const ch = state.input.charCodeAt(state.position);
11600
11740
  if (ch === 10) {
11601
11741
  state.position++;
11602
11742
  } else if (ch === 13) {
@@ -11612,9 +11752,10 @@ var require_loader = __commonJS({
11612
11752
  state.firstTabInLine = -1;
11613
11753
  }
11614
11754
  function skipSeparationSpace(state, allowComments, checkIndent) {
11615
- var lineBreaks = 0, ch = state.input.charCodeAt(state.position);
11755
+ let lineBreaks = 0;
11756
+ let ch = state.input.charCodeAt(state.position);
11616
11757
  while (ch !== 0) {
11617
- while (is_WHITE_SPACE(ch)) {
11758
+ while (isWhiteSpace(ch)) {
11618
11759
  if (ch === 9 && state.firstTabInLine === -1) {
11619
11760
  state.firstTabInLine = state.position;
11620
11761
  }
@@ -11625,7 +11766,7 @@ var require_loader = __commonJS({
11625
11766
  ch = state.input.charCodeAt(++state.position);
11626
11767
  } while (ch !== 10 && ch !== 13 && ch !== 0);
11627
11768
  }
11628
- if (is_EOL(ch)) {
11769
+ if (isEol(ch)) {
11629
11770
  readLineBreak(state);
11630
11771
  ch = state.input.charCodeAt(state.position);
11631
11772
  lineBreaks++;
@@ -11644,12 +11785,12 @@ var require_loader = __commonJS({
11644
11785
  return lineBreaks;
11645
11786
  }
11646
11787
  function testDocumentSeparator(state) {
11647
- var _position = state.position, ch;
11648
- ch = state.input.charCodeAt(_position);
11788
+ let _position = state.position;
11789
+ let ch = state.input.charCodeAt(_position);
11649
11790
  if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
11650
11791
  _position += 3;
11651
11792
  ch = state.input.charCodeAt(_position);
11652
- if (ch === 0 || is_WS_OR_EOL(ch)) {
11793
+ if (ch === 0 || isWsOrEol(ch)) {
11653
11794
  return true;
11654
11795
  }
11655
11796
  }
@@ -11663,14 +11804,21 @@ var require_loader = __commonJS({
11663
11804
  }
11664
11805
  }
11665
11806
  function readPlainScalar(state, nodeIndent, withinFlowCollection) {
11666
- var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch;
11667
- ch = state.input.charCodeAt(state.position);
11668
- if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) {
11807
+ let captureStart;
11808
+ let captureEnd;
11809
+ let hasPendingContent;
11810
+ let _line;
11811
+ let _lineStart;
11812
+ let _lineIndent;
11813
+ const _kind = state.kind;
11814
+ const _result = state.result;
11815
+ let ch = state.input.charCodeAt(state.position);
11816
+ if (isWsOrEol(ch) || isFlowIndicator(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) {
11669
11817
  return false;
11670
11818
  }
11671
11819
  if (ch === 63 || ch === 45) {
11672
- following = state.input.charCodeAt(state.position + 1);
11673
- if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
11820
+ const following = state.input.charCodeAt(state.position + 1);
11821
+ if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) {
11674
11822
  return false;
11675
11823
  }
11676
11824
  }
@@ -11680,18 +11828,18 @@ var require_loader = __commonJS({
11680
11828
  hasPendingContent = false;
11681
11829
  while (ch !== 0) {
11682
11830
  if (ch === 58) {
11683
- following = state.input.charCodeAt(state.position + 1);
11684
- if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
11831
+ const following = state.input.charCodeAt(state.position + 1);
11832
+ if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) {
11685
11833
  break;
11686
11834
  }
11687
11835
  } else if (ch === 35) {
11688
- preceding = state.input.charCodeAt(state.position - 1);
11689
- if (is_WS_OR_EOL(preceding)) {
11836
+ const preceding = state.input.charCodeAt(state.position - 1);
11837
+ if (isWsOrEol(preceding)) {
11690
11838
  break;
11691
11839
  }
11692
- } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) {
11840
+ } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && isFlowIndicator(ch)) {
11693
11841
  break;
11694
- } else if (is_EOL(ch)) {
11842
+ } else if (isEol(ch)) {
11695
11843
  _line = state.line;
11696
11844
  _lineStart = state.lineStart;
11697
11845
  _lineIndent = state.lineIndent;
@@ -11714,7 +11862,7 @@ var require_loader = __commonJS({
11714
11862
  captureStart = captureEnd = state.position;
11715
11863
  hasPendingContent = false;
11716
11864
  }
11717
- if (!is_WHITE_SPACE(ch)) {
11865
+ if (!isWhiteSpace(ch)) {
11718
11866
  captureEnd = state.position + 1;
11719
11867
  }
11720
11868
  ch = state.input.charCodeAt(++state.position);
@@ -11728,8 +11876,9 @@ var require_loader = __commonJS({
11728
11876
  return false;
11729
11877
  }
11730
11878
  function readSingleQuotedScalar(state, nodeIndent) {
11731
- var ch, captureStart, captureEnd;
11732
- ch = state.input.charCodeAt(state.position);
11879
+ let captureStart;
11880
+ let captureEnd;
11881
+ let ch = state.input.charCodeAt(state.position);
11733
11882
  if (ch !== 39) {
11734
11883
  return false;
11735
11884
  }
@@ -11748,7 +11897,7 @@ var require_loader = __commonJS({
11748
11897
  } else {
11749
11898
  return true;
11750
11899
  }
11751
- } else if (is_EOL(ch)) {
11900
+ } else if (isEol(ch)) {
11752
11901
  captureSegment(state, captureStart, captureEnd, true);
11753
11902
  writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
11754
11903
  captureStart = captureEnd = state.position;
@@ -11756,14 +11905,18 @@ var require_loader = __commonJS({
11756
11905
  throwError(state, "unexpected end of the document within a single quoted scalar");
11757
11906
  } else {
11758
11907
  state.position++;
11759
- captureEnd = state.position;
11908
+ if (!isWhiteSpace(ch)) {
11909
+ captureEnd = state.position;
11910
+ }
11760
11911
  }
11761
11912
  }
11762
11913
  throwError(state, "unexpected end of the stream within a single quoted scalar");
11763
11914
  }
11764
11915
  function readDoubleQuotedScalar(state, nodeIndent) {
11765
- var captureStart, captureEnd, hexLength, hexResult, tmp, ch;
11766
- ch = state.input.charCodeAt(state.position);
11916
+ let captureStart;
11917
+ let captureEnd;
11918
+ let tmp;
11919
+ let ch = state.input.charCodeAt(state.position);
11767
11920
  if (ch !== 34) {
11768
11921
  return false;
11769
11922
  }
@@ -11779,14 +11932,14 @@ var require_loader = __commonJS({
11779
11932
  } else if (ch === 92) {
11780
11933
  captureSegment(state, captureStart, state.position, true);
11781
11934
  ch = state.input.charCodeAt(++state.position);
11782
- if (is_EOL(ch)) {
11935
+ if (isEol(ch)) {
11783
11936
  skipSeparationSpace(state, false, nodeIndent);
11784
11937
  } else if (ch < 256 && simpleEscapeCheck[ch]) {
11785
11938
  state.result += simpleEscapeMap[ch];
11786
11939
  state.position++;
11787
11940
  } else if ((tmp = escapedHexLen(ch)) > 0) {
11788
- hexLength = tmp;
11789
- hexResult = 0;
11941
+ let hexLength = tmp;
11942
+ let hexResult = 0;
11790
11943
  for (; hexLength > 0; hexLength--) {
11791
11944
  ch = state.input.charCodeAt(++state.position);
11792
11945
  if ((tmp = fromHexCode(ch)) >= 0) {
@@ -11801,7 +11954,7 @@ var require_loader = __commonJS({
11801
11954
  throwError(state, "unknown escape sequence");
11802
11955
  }
11803
11956
  captureStart = captureEnd = state.position;
11804
- } else if (is_EOL(ch)) {
11957
+ } else if (isEol(ch)) {
11805
11958
  captureSegment(state, captureStart, captureEnd, true);
11806
11959
  writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
11807
11960
  captureStart = captureEnd = state.position;
@@ -11809,14 +11962,30 @@ var require_loader = __commonJS({
11809
11962
  throwError(state, "unexpected end of the document within a double quoted scalar");
11810
11963
  } else {
11811
11964
  state.position++;
11812
- captureEnd = state.position;
11965
+ if (!isWhiteSpace(ch)) {
11966
+ captureEnd = state.position;
11967
+ }
11813
11968
  }
11814
11969
  }
11815
11970
  throwError(state, "unexpected end of the stream within a double quoted scalar");
11816
11971
  }
11817
11972
  function readFlowCollection(state, nodeIndent) {
11818
- var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch;
11819
- ch = state.input.charCodeAt(state.position);
11973
+ let readNext = true;
11974
+ let _line;
11975
+ let _lineStart;
11976
+ let _pos;
11977
+ const _tag = state.tag;
11978
+ let _result;
11979
+ const _anchor = state.anchor;
11980
+ let terminator;
11981
+ let isPair;
11982
+ let isExplicitPair;
11983
+ let isMapping;
11984
+ const overridableKeys = /* @__PURE__ */ Object.create(null);
11985
+ let keyNode;
11986
+ let keyTag;
11987
+ let valueNode;
11988
+ let ch = state.input.charCodeAt(state.position);
11820
11989
  if (ch === 91) {
11821
11990
  terminator = 93;
11822
11991
  isMapping = false;
@@ -11829,7 +11998,7 @@ var require_loader = __commonJS({
11829
11998
  return false;
11830
11999
  }
11831
12000
  if (state.anchor !== null) {
11832
- state.anchorMap[state.anchor] = _result;
12001
+ storeAnchor(state, state.anchor, _result);
11833
12002
  }
11834
12003
  ch = state.input.charCodeAt(++state.position);
11835
12004
  while (ch !== 0) {
@@ -11850,8 +12019,8 @@ var require_loader = __commonJS({
11850
12019
  keyTag = keyNode = valueNode = null;
11851
12020
  isPair = isExplicitPair = false;
11852
12021
  if (ch === 63) {
11853
- following = state.input.charCodeAt(state.position + 1);
11854
- if (is_WS_OR_EOL(following)) {
12022
+ const following = state.input.charCodeAt(state.position + 1);
12023
+ if (isWsOrEol(following)) {
11855
12024
  isPair = isExplicitPair = true;
11856
12025
  state.position++;
11857
12026
  skipSeparationSpace(state, true, nodeIndent);
@@ -11891,8 +12060,15 @@ var require_loader = __commonJS({
11891
12060
  throwError(state, "unexpected end of the stream within a flow collection");
11892
12061
  }
11893
12062
  function readBlockScalar(state, nodeIndent) {
11894
- var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch;
11895
- ch = state.input.charCodeAt(state.position);
12063
+ let folding;
12064
+ let chomping = CHOMPING_CLIP;
12065
+ let didReadContent = false;
12066
+ let detectedIndent = false;
12067
+ let textIndent = nodeIndent;
12068
+ let emptyLines = 0;
12069
+ let atMoreIndented = false;
12070
+ let tmp;
12071
+ let ch = state.input.charCodeAt(state.position);
11896
12072
  if (ch === 124) {
11897
12073
  folding = false;
11898
12074
  } else if (ch === 62) {
@@ -11923,14 +12099,14 @@ var require_loader = __commonJS({
11923
12099
  break;
11924
12100
  }
11925
12101
  }
11926
- if (is_WHITE_SPACE(ch)) {
12102
+ if (isWhiteSpace(ch)) {
11927
12103
  do {
11928
12104
  ch = state.input.charCodeAt(++state.position);
11929
- } while (is_WHITE_SPACE(ch));
12105
+ } while (isWhiteSpace(ch));
11930
12106
  if (ch === 35) {
11931
12107
  do {
11932
12108
  ch = state.input.charCodeAt(++state.position);
11933
- } while (!is_EOL(ch) && ch !== 0);
12109
+ } while (!isEol(ch) && ch !== 0);
11934
12110
  }
11935
12111
  }
11936
12112
  while (ch !== 0) {
@@ -11944,10 +12120,13 @@ var require_loader = __commonJS({
11944
12120
  if (!detectedIndent && state.lineIndent > textIndent) {
11945
12121
  textIndent = state.lineIndent;
11946
12122
  }
11947
- if (is_EOL(ch)) {
12123
+ if (isEol(ch)) {
11948
12124
  emptyLines++;
11949
12125
  continue;
11950
12126
  }
12127
+ if (!detectedIndent && textIndent === 0) {
12128
+ throwError(state, "missing indentation for block scalar");
12129
+ }
11951
12130
  if (state.lineIndent < textIndent) {
11952
12131
  if (chomping === CHOMPING_KEEP) {
11953
12132
  state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
@@ -11959,7 +12138,7 @@ var require_loader = __commonJS({
11959
12138
  break;
11960
12139
  }
11961
12140
  if (folding) {
11962
- if (is_WHITE_SPACE(ch)) {
12141
+ if (isWhiteSpace(ch)) {
11963
12142
  atMoreIndented = true;
11964
12143
  state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
11965
12144
  } else if (atMoreIndented) {
@@ -11978,8 +12157,8 @@ var require_loader = __commonJS({
11978
12157
  didReadContent = true;
11979
12158
  detectedIndent = true;
11980
12159
  emptyLines = 0;
11981
- captureStart = state.position;
11982
- while (!is_EOL(ch) && ch !== 0) {
12160
+ const captureStart = state.position;
12161
+ while (!isEol(ch) && ch !== 0) {
11983
12162
  ch = state.input.charCodeAt(++state.position);
11984
12163
  }
11985
12164
  captureSegment(state, captureStart, state.position, false);
@@ -11987,12 +12166,15 @@ var require_loader = __commonJS({
11987
12166
  return true;
11988
12167
  }
11989
12168
  function readBlockSequence(state, nodeIndent) {
11990
- var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch;
12169
+ const _tag = state.tag;
12170
+ const _anchor = state.anchor;
12171
+ const _result = [];
12172
+ let detected = false;
11991
12173
  if (state.firstTabInLine !== -1) return false;
11992
12174
  if (state.anchor !== null) {
11993
- state.anchorMap[state.anchor] = _result;
12175
+ storeAnchor(state, state.anchor, _result);
11994
12176
  }
11995
- ch = state.input.charCodeAt(state.position);
12177
+ let ch = state.input.charCodeAt(state.position);
11996
12178
  while (ch !== 0) {
11997
12179
  if (state.firstTabInLine !== -1) {
11998
12180
  state.position = state.firstTabInLine;
@@ -12001,8 +12183,8 @@ var require_loader = __commonJS({
12001
12183
  if (ch !== 45) {
12002
12184
  break;
12003
12185
  }
12004
- following = state.input.charCodeAt(state.position + 1);
12005
- if (!is_WS_OR_EOL(following)) {
12186
+ const following = state.input.charCodeAt(state.position + 1);
12187
+ if (!isWsOrEol(following)) {
12006
12188
  break;
12007
12189
  }
12008
12190
  detected = true;
@@ -12014,7 +12196,7 @@ var require_loader = __commonJS({
12014
12196
  continue;
12015
12197
  }
12016
12198
  }
12017
- _line = state.line;
12199
+ const _line = state.line;
12018
12200
  composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
12019
12201
  _result.push(state.result);
12020
12202
  skipSeparationSpace(state, true, -1);
@@ -12035,20 +12217,32 @@ var require_loader = __commonJS({
12035
12217
  return false;
12036
12218
  }
12037
12219
  function readBlockMapping(state, nodeIndent, flowIndent) {
12038
- var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch;
12220
+ let allowCompact;
12221
+ let _keyLine;
12222
+ let _keyLineStart;
12223
+ let _keyPos;
12224
+ const _tag = state.tag;
12225
+ const _anchor = state.anchor;
12226
+ const _result = {};
12227
+ const overridableKeys = /* @__PURE__ */ Object.create(null);
12228
+ let keyTag = null;
12229
+ let keyNode = null;
12230
+ let valueNode = null;
12231
+ let atExplicitKey = false;
12232
+ let detected = false;
12039
12233
  if (state.firstTabInLine !== -1) return false;
12040
12234
  if (state.anchor !== null) {
12041
- state.anchorMap[state.anchor] = _result;
12235
+ storeAnchor(state, state.anchor, _result);
12042
12236
  }
12043
- ch = state.input.charCodeAt(state.position);
12237
+ let ch = state.input.charCodeAt(state.position);
12044
12238
  while (ch !== 0) {
12045
12239
  if (!atExplicitKey && state.firstTabInLine !== -1) {
12046
12240
  state.position = state.firstTabInLine;
12047
12241
  throwError(state, "tab characters must not be used in indentation");
12048
12242
  }
12049
- following = state.input.charCodeAt(state.position + 1);
12050
- _line = state.line;
12051
- if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) {
12243
+ const following = state.input.charCodeAt(state.position + 1);
12244
+ const _line = state.line;
12245
+ if ((ch === 63 || ch === 58) && isWsOrEol(following)) {
12052
12246
  if (ch === 63) {
12053
12247
  if (atExplicitKey) {
12054
12248
  storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
@@ -12074,12 +12268,12 @@ var require_loader = __commonJS({
12074
12268
  }
12075
12269
  if (state.line === _line) {
12076
12270
  ch = state.input.charCodeAt(state.position);
12077
- while (is_WHITE_SPACE(ch)) {
12271
+ while (isWhiteSpace(ch)) {
12078
12272
  ch = state.input.charCodeAt(++state.position);
12079
12273
  }
12080
12274
  if (ch === 58) {
12081
12275
  ch = state.input.charCodeAt(++state.position);
12082
- if (!is_WS_OR_EOL(ch)) {
12276
+ if (!isWsOrEol(ch)) {
12083
12277
  throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
12084
12278
  }
12085
12279
  if (atExplicitKey) {
@@ -12144,8 +12338,11 @@ var require_loader = __commonJS({
12144
12338
  return detected;
12145
12339
  }
12146
12340
  function readTagProperty(state) {
12147
- var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch;
12148
- ch = state.input.charCodeAt(state.position);
12341
+ let isVerbatim = false;
12342
+ let isNamed = false;
12343
+ let tagHandle;
12344
+ let tagName;
12345
+ let ch = state.input.charCodeAt(state.position);
12149
12346
  if (ch !== 33) return false;
12150
12347
  if (state.tag !== null) {
12151
12348
  throwError(state, "duplication of a tag property");
@@ -12161,7 +12358,7 @@ var require_loader = __commonJS({
12161
12358
  } else {
12162
12359
  tagHandle = "!";
12163
12360
  }
12164
- _position = state.position;
12361
+ let _position = state.position;
12165
12362
  if (isVerbatim) {
12166
12363
  do {
12167
12364
  ch = state.input.charCodeAt(++state.position);
@@ -12173,7 +12370,7 @@ var require_loader = __commonJS({
12173
12370
  throwError(state, "unexpected end of the stream within a verbatim tag");
12174
12371
  }
12175
12372
  } else {
12176
- while (ch !== 0 && !is_WS_OR_EOL(ch)) {
12373
+ while (ch !== 0 && !isWsOrEol(ch)) {
12177
12374
  if (ch === 33) {
12178
12375
  if (!isNamed) {
12179
12376
  tagHandle = state.input.slice(_position - 1, state.position + 1);
@@ -12215,15 +12412,14 @@ var require_loader = __commonJS({
12215
12412
  return true;
12216
12413
  }
12217
12414
  function readAnchorProperty(state) {
12218
- var _position, ch;
12219
- ch = state.input.charCodeAt(state.position);
12415
+ let ch = state.input.charCodeAt(state.position);
12220
12416
  if (ch !== 38) return false;
12221
12417
  if (state.anchor !== null) {
12222
12418
  throwError(state, "duplication of an anchor property");
12223
12419
  }
12224
12420
  ch = state.input.charCodeAt(++state.position);
12225
- _position = state.position;
12226
- while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
12421
+ const _position = state.position;
12422
+ while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) {
12227
12423
  ch = state.input.charCodeAt(++state.position);
12228
12424
  }
12229
12425
  if (state.position === _position) {
@@ -12233,18 +12429,17 @@ var require_loader = __commonJS({
12233
12429
  return true;
12234
12430
  }
12235
12431
  function readAlias(state) {
12236
- var _position, alias, ch;
12237
- ch = state.input.charCodeAt(state.position);
12432
+ let ch = state.input.charCodeAt(state.position);
12238
12433
  if (ch !== 42) return false;
12239
12434
  ch = state.input.charCodeAt(++state.position);
12240
- _position = state.position;
12241
- while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
12435
+ const _position = state.position;
12436
+ while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) {
12242
12437
  ch = state.input.charCodeAt(++state.position);
12243
12438
  }
12244
12439
  if (state.position === _position) {
12245
12440
  throwError(state, "name of an alias node must contain at least one character");
12246
12441
  }
12247
- alias = state.input.slice(_position, state.position);
12442
+ const alias = state.input.slice(_position, state.position);
12248
12443
  if (!_hasOwnProperty.call(state.anchorMap, alias)) {
12249
12444
  throwError(state, 'unidentified alias "' + alias + '"');
12250
12445
  }
@@ -12252,8 +12447,36 @@ var require_loader = __commonJS({
12252
12447
  skipSeparationSpace(state, true, -1);
12253
12448
  return true;
12254
12449
  }
12450
+ function tryReadBlockMappingFromProperty(state, propertyStart, nodeIndent, flowIndent) {
12451
+ const fallbackState = snapshotState(state);
12452
+ beginAnchorTransaction(state);
12453
+ restoreState(state, propertyStart);
12454
+ state.tag = null;
12455
+ state.anchor = null;
12456
+ state.kind = null;
12457
+ state.result = null;
12458
+ if (readBlockMapping(state, nodeIndent, flowIndent) && state.kind === "mapping") {
12459
+ commitAnchorTransaction(state);
12460
+ return true;
12461
+ }
12462
+ rollbackAnchorTransaction(state);
12463
+ restoreState(state, fallbackState);
12464
+ return false;
12465
+ }
12255
12466
  function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
12256
- var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type, flowIndent, blockIndent;
12467
+ let allowBlockScalars;
12468
+ let allowBlockCollections;
12469
+ let indentStatus = 1;
12470
+ let atNewLine = false;
12471
+ let hasContent = false;
12472
+ let propertyStart = null;
12473
+ let type;
12474
+ let flowIndent;
12475
+ let blockIndent;
12476
+ if (state.depth >= state.maxDepth) {
12477
+ throwError(state, "nesting exceeded maxDepth (" + state.maxDepth + ")");
12478
+ }
12479
+ state.depth += 1;
12257
12480
  if (state.listener !== null) {
12258
12481
  state.listener("open", state);
12259
12482
  }
@@ -12261,7 +12484,7 @@ var require_loader = __commonJS({
12261
12484
  state.anchor = null;
12262
12485
  state.kind = null;
12263
12486
  state.result = null;
12264
- allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
12487
+ const allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
12265
12488
  if (allowToSeek) {
12266
12489
  if (skipSeparationSpace(state, true, -1)) {
12267
12490
  atNewLine = true;
@@ -12275,7 +12498,18 @@ var require_loader = __commonJS({
12275
12498
  }
12276
12499
  }
12277
12500
  if (indentStatus === 1) {
12278
- while (readTagProperty(state) || readAnchorProperty(state)) {
12501
+ while (true) {
12502
+ const ch = state.input.charCodeAt(state.position);
12503
+ const propertyState = snapshotState(state);
12504
+ if (atNewLine && (ch === 33 && state.tag !== null || ch === 38 && state.anchor !== null)) {
12505
+ break;
12506
+ }
12507
+ if (!readTagProperty(state) && !readAnchorProperty(state)) {
12508
+ break;
12509
+ }
12510
+ if (propertyStart === null) {
12511
+ propertyStart = propertyState;
12512
+ }
12279
12513
  if (skipSeparationSpace(state, true, -1)) {
12280
12514
  atNewLine = true;
12281
12515
  allowBlockCollections = allowBlockStyles;
@@ -12305,7 +12539,15 @@ var require_loader = __commonJS({
12305
12539
  if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) {
12306
12540
  hasContent = true;
12307
12541
  } else {
12308
- if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {
12542
+ const ch = state.input.charCodeAt(state.position);
12543
+ if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty(
12544
+ state,
12545
+ propertyStart,
12546
+ propertyStart.position - propertyStart.lineStart,
12547
+ flowIndent
12548
+ )) {
12549
+ hasContent = true;
12550
+ } else if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {
12309
12551
  hasContent = true;
12310
12552
  } else if (readAlias(state)) {
12311
12553
  hasContent = true;
@@ -12319,7 +12561,7 @@ var require_loader = __commonJS({
12319
12561
  }
12320
12562
  }
12321
12563
  if (state.anchor !== null) {
12322
- state.anchorMap[state.anchor] = state.result;
12564
+ storeAnchor(state, state.anchor, state.result);
12323
12565
  }
12324
12566
  }
12325
12567
  } else if (indentStatus === 0) {
@@ -12328,19 +12570,19 @@ var require_loader = __commonJS({
12328
12570
  }
12329
12571
  if (state.tag === null) {
12330
12572
  if (state.anchor !== null) {
12331
- state.anchorMap[state.anchor] = state.result;
12573
+ storeAnchor(state, state.anchor, state.result);
12332
12574
  }
12333
12575
  } else if (state.tag === "?") {
12334
12576
  if (state.result !== null && state.kind !== "scalar") {
12335
12577
  throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
12336
12578
  }
12337
- for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
12579
+ for (let typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
12338
12580
  type = state.implicitTypes[typeIndex];
12339
12581
  if (type.resolve(state.result)) {
12340
12582
  state.result = type.construct(state.result);
12341
12583
  state.tag = type.tag;
12342
12584
  if (state.anchor !== null) {
12343
- state.anchorMap[state.anchor] = state.result;
12585
+ storeAnchor(state, state.anchor, state.result);
12344
12586
  }
12345
12587
  break;
12346
12588
  }
@@ -12350,8 +12592,8 @@ var require_loader = __commonJS({
12350
12592
  type = state.typeMap[state.kind || "fallback"][state.tag];
12351
12593
  } else {
12352
12594
  type = null;
12353
- typeList = state.typeMap.multi[state.kind || "fallback"];
12354
- for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
12595
+ const typeList = state.typeMap.multi[state.kind || "fallback"];
12596
+ for (let typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
12355
12597
  if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
12356
12598
  type = typeList[typeIndex];
12357
12599
  break;
@@ -12369,17 +12611,20 @@ var require_loader = __commonJS({
12369
12611
  } else {
12370
12612
  state.result = type.construct(state.result, state.tag);
12371
12613
  if (state.anchor !== null) {
12372
- state.anchorMap[state.anchor] = state.result;
12614
+ storeAnchor(state, state.anchor, state.result);
12373
12615
  }
12374
12616
  }
12375
12617
  }
12376
12618
  if (state.listener !== null) {
12377
12619
  state.listener("close", state);
12378
12620
  }
12621
+ state.depth -= 1;
12379
12622
  return state.tag !== null || state.anchor !== null || hasContent;
12380
12623
  }
12381
12624
  function readDocument(state) {
12382
- var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch;
12625
+ const documentStart = state.position;
12626
+ let hasDirectives = false;
12627
+ let ch;
12383
12628
  state.version = null;
12384
12629
  state.checkLineBreaks = state.legacy;
12385
12630
  state.tagMap = /* @__PURE__ */ Object.create(null);
@@ -12392,28 +12637,28 @@ var require_loader = __commonJS({
12392
12637
  }
12393
12638
  hasDirectives = true;
12394
12639
  ch = state.input.charCodeAt(++state.position);
12395
- _position = state.position;
12396
- while (ch !== 0 && !is_WS_OR_EOL(ch)) {
12640
+ let _position = state.position;
12641
+ while (ch !== 0 && !isWsOrEol(ch)) {
12397
12642
  ch = state.input.charCodeAt(++state.position);
12398
12643
  }
12399
- directiveName = state.input.slice(_position, state.position);
12400
- directiveArgs = [];
12644
+ const directiveName = state.input.slice(_position, state.position);
12645
+ const directiveArgs = [];
12401
12646
  if (directiveName.length < 1) {
12402
12647
  throwError(state, "directive name must not be less than one character in length");
12403
12648
  }
12404
12649
  while (ch !== 0) {
12405
- while (is_WHITE_SPACE(ch)) {
12650
+ while (isWhiteSpace(ch)) {
12406
12651
  ch = state.input.charCodeAt(++state.position);
12407
12652
  }
12408
12653
  if (ch === 35) {
12409
12654
  do {
12410
12655
  ch = state.input.charCodeAt(++state.position);
12411
- } while (ch !== 0 && !is_EOL(ch));
12656
+ } while (ch !== 0 && !isEol(ch));
12412
12657
  break;
12413
12658
  }
12414
- if (is_EOL(ch)) break;
12659
+ if (isEol(ch)) break;
12415
12660
  _position = state.position;
12416
- while (ch !== 0 && !is_WS_OR_EOL(ch)) {
12661
+ while (ch !== 0 && !isWsOrEol(ch)) {
12417
12662
  ch = state.input.charCodeAt(++state.position);
12418
12663
  }
12419
12664
  directiveArgs.push(state.input.slice(_position, state.position));
@@ -12447,8 +12692,6 @@ var require_loader = __commonJS({
12447
12692
  }
12448
12693
  if (state.position < state.length - 1) {
12449
12694
  throwError(state, "end of the stream or a document separator is expected");
12450
- } else {
12451
- return;
12452
12695
  }
12453
12696
  }
12454
12697
  function loadDocuments(input, options) {
@@ -12462,8 +12705,8 @@ var require_loader = __commonJS({
12462
12705
  input = input.slice(1);
12463
12706
  }
12464
12707
  }
12465
- var state = new State(input, options);
12466
- var nullpos = input.indexOf("\0");
12708
+ const state = new State(input, options);
12709
+ const nullpos = input.indexOf("\0");
12467
12710
  if (nullpos !== -1) {
12468
12711
  state.position = nullpos;
12469
12712
  throwError(state, "null byte is not allowed in input");
@@ -12483,16 +12726,16 @@ var require_loader = __commonJS({
12483
12726
  options = iterator;
12484
12727
  iterator = null;
12485
12728
  }
12486
- var documents = loadDocuments(input, options);
12729
+ const documents = loadDocuments(input, options);
12487
12730
  if (typeof iterator !== "function") {
12488
12731
  return documents;
12489
12732
  }
12490
- for (var index = 0, length = documents.length; index < length; index += 1) {
12733
+ for (let index = 0, length = documents.length; index < length; index += 1) {
12491
12734
  iterator(documents[index]);
12492
12735
  }
12493
12736
  }
12494
12737
  function load2(input, options) {
12495
- var documents = loadDocuments(input, options);
12738
+ const documents = loadDocuments(input, options);
12496
12739
  if (documents.length === 0) {
12497
12740
  return void 0;
12498
12741
  } else if (documents.length === 1) {
@@ -12575,17 +12818,16 @@ var require_dumper = __commonJS({
12575
12818
  ];
12576
12819
  var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
12577
12820
  function compileStyleMap(schema2, map) {
12578
- var result, keys, index, length, tag, style, type;
12579
12821
  if (map === null) return {};
12580
- result = {};
12581
- keys = Object.keys(map);
12582
- for (index = 0, length = keys.length; index < length; index += 1) {
12583
- tag = keys[index];
12584
- style = String(map[tag]);
12822
+ const result = {};
12823
+ const keys = Object.keys(map);
12824
+ for (let index = 0, length = keys.length; index < length; index += 1) {
12825
+ let tag = keys[index];
12826
+ let style = String(map[tag]);
12585
12827
  if (tag.slice(0, 2) === "!!") {
12586
12828
  tag = "tag:yaml.org,2002:" + tag.slice(2);
12587
12829
  }
12588
- type = schema2.compiledTypeMap["fallback"][tag];
12830
+ const type = schema2.compiledTypeMap["fallback"][tag];
12589
12831
  if (type && _hasOwnProperty.call(type.styleAliases, style)) {
12590
12832
  style = type.styleAliases[style];
12591
12833
  }
@@ -12594,8 +12836,9 @@ var require_dumper = __commonJS({
12594
12836
  return result;
12595
12837
  }
12596
12838
  function encodeHex(character) {
12597
- var string, handle, length;
12598
- string = character.toString(16).toUpperCase();
12839
+ let handle;
12840
+ let length;
12841
+ const string = character.toString(16).toUpperCase();
12599
12842
  if (character <= 255) {
12600
12843
  handle = "x";
12601
12844
  length = 2;
@@ -12635,9 +12878,13 @@ var require_dumper = __commonJS({
12635
12878
  this.usedDuplicates = null;
12636
12879
  }
12637
12880
  function indentString(string, spaces) {
12638
- var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length;
12881
+ const ind = common.repeat(" ", spaces);
12882
+ let position = 0;
12883
+ let result = "";
12884
+ const length = string.length;
12639
12885
  while (position < length) {
12640
- next = string.indexOf("\n", position);
12886
+ let line;
12887
+ const next = string.indexOf("\n", position);
12641
12888
  if (next === -1) {
12642
12889
  line = string.slice(position);
12643
12890
  position = length;
@@ -12654,9 +12901,8 @@ var require_dumper = __commonJS({
12654
12901
  return "\n" + common.repeat(" ", state.indent * level);
12655
12902
  }
12656
12903
  function testImplicitResolving(state, str) {
12657
- var index, length, type;
12658
- for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
12659
- type = state.implicitTypes[index];
12904
+ for (let index = 0, length = state.implicitTypes.length; index < length; index += 1) {
12905
+ const type = state.implicitTypes[index];
12660
12906
  if (type.resolve(str)) {
12661
12907
  return true;
12662
12908
  }
@@ -12667,30 +12913,39 @@ var require_dumper = __commonJS({
12667
12913
  return c2 === CHAR_SPACE || c2 === CHAR_TAB;
12668
12914
  }
12669
12915
  function isPrintable(c2) {
12670
- return 32 <= c2 && c2 <= 126 || 161 <= c2 && c2 <= 55295 && c2 !== 8232 && c2 !== 8233 || 57344 <= c2 && c2 <= 65533 && c2 !== CHAR_BOM || 65536 <= c2 && c2 <= 1114111;
12916
+ return c2 >= 32 && c2 <= 126 || c2 >= 161 && c2 <= 55295 && c2 !== 8232 && c2 !== 8233 || c2 >= 57344 && c2 <= 65533 && c2 !== CHAR_BOM || c2 >= 65536 && c2 <= 1114111;
12671
12917
  }
12672
12918
  function isNsCharOrWhitespace(c2) {
12673
- return isPrintable(c2) && c2 !== CHAR_BOM && c2 !== CHAR_CARRIAGE_RETURN && c2 !== CHAR_LINE_FEED;
12919
+ return isPrintable(c2) && c2 !== CHAR_BOM && // - b-char
12920
+ c2 !== CHAR_CARRIAGE_RETURN && c2 !== CHAR_LINE_FEED;
12674
12921
  }
12675
12922
  function isPlainSafe(c2, prev, inblock) {
12676
- var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c2);
12677
- var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c2);
12923
+ const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c2);
12924
+ const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c2);
12678
12925
  return (
12679
12926
  // ns-plain-safe
12680
- (inblock ? (
12681
- // c = flow-in
12682
- cIsNsCharOrWhitespace
12683
- ) : cIsNsCharOrWhitespace && c2 !== CHAR_COMMA && c2 !== CHAR_LEFT_SQUARE_BRACKET && c2 !== CHAR_RIGHT_SQUARE_BRACKET && c2 !== CHAR_LEFT_CURLY_BRACKET && c2 !== CHAR_RIGHT_CURLY_BRACKET) && c2 !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c2 === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar
12927
+ (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && // - c-flow-indicator
12928
+ c2 !== CHAR_COMMA && c2 !== CHAR_LEFT_SQUARE_BRACKET && c2 !== CHAR_RIGHT_SQUARE_BRACKET && c2 !== CHAR_LEFT_CURLY_BRACKET && c2 !== CHAR_RIGHT_CURLY_BRACKET) && // ns-plain-char
12929
+ c2 !== CHAR_SHARP && // false on '#'
12930
+ !(prev === CHAR_COLON && !cIsNsChar) || // false on ': '
12931
+ isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c2 === CHAR_SHARP || // change to true on '[^ ]#'
12932
+ prev === CHAR_COLON && cIsNsChar
12684
12933
  );
12685
12934
  }
12686
12935
  function isPlainSafeFirst(c2) {
12687
- return isPrintable(c2) && c2 !== CHAR_BOM && !isWhitespace(c2) && c2 !== CHAR_MINUS && c2 !== CHAR_QUESTION && c2 !== CHAR_COLON && c2 !== CHAR_COMMA && c2 !== CHAR_LEFT_SQUARE_BRACKET && c2 !== CHAR_RIGHT_SQUARE_BRACKET && c2 !== CHAR_LEFT_CURLY_BRACKET && c2 !== CHAR_RIGHT_CURLY_BRACKET && c2 !== CHAR_SHARP && c2 !== CHAR_AMPERSAND && c2 !== CHAR_ASTERISK && c2 !== CHAR_EXCLAMATION && c2 !== CHAR_VERTICAL_LINE && c2 !== CHAR_EQUALS && c2 !== CHAR_GREATER_THAN && c2 !== CHAR_SINGLE_QUOTE && c2 !== CHAR_DOUBLE_QUOTE && c2 !== CHAR_PERCENT && c2 !== CHAR_COMMERCIAL_AT && c2 !== CHAR_GRAVE_ACCENT;
12936
+ return isPrintable(c2) && c2 !== CHAR_BOM && !isWhitespace(c2) && // - s-white
12937
+ // - (c-indicator ::=
12938
+ // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”
12939
+ c2 !== CHAR_MINUS && c2 !== CHAR_QUESTION && c2 !== CHAR_COLON && c2 !== CHAR_COMMA && c2 !== CHAR_LEFT_SQUARE_BRACKET && c2 !== CHAR_RIGHT_SQUARE_BRACKET && c2 !== CHAR_LEFT_CURLY_BRACKET && c2 !== CHAR_RIGHT_CURLY_BRACKET && // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"”
12940
+ c2 !== CHAR_SHARP && c2 !== CHAR_AMPERSAND && c2 !== CHAR_ASTERISK && c2 !== CHAR_EXCLAMATION && c2 !== CHAR_VERTICAL_LINE && c2 !== CHAR_EQUALS && c2 !== CHAR_GREATER_THAN && c2 !== CHAR_SINGLE_QUOTE && c2 !== CHAR_DOUBLE_QUOTE && // | “%” | “@” | “`”)
12941
+ c2 !== CHAR_PERCENT && c2 !== CHAR_COMMERCIAL_AT && c2 !== CHAR_GRAVE_ACCENT;
12688
12942
  }
12689
12943
  function isPlainSafeLast(c2) {
12690
12944
  return !isWhitespace(c2) && c2 !== CHAR_COLON;
12691
12945
  }
12692
12946
  function codePointAt(string, pos) {
12693
- var first = string.charCodeAt(pos), second;
12947
+ const first = string.charCodeAt(pos);
12948
+ let second;
12694
12949
  if (first >= 55296 && first <= 56319 && pos + 1 < string.length) {
12695
12950
  second = string.charCodeAt(pos + 1);
12696
12951
  if (second >= 56320 && second <= 57343) {
@@ -12700,7 +12955,7 @@ var require_dumper = __commonJS({
12700
12955
  return first;
12701
12956
  }
12702
12957
  function needIndentIndicator(string) {
12703
- var leadingSpaceRe = /^\n* /;
12958
+ const leadingSpaceRe = /^\n* /;
12704
12959
  return leadingSpaceRe.test(string);
12705
12960
  }
12706
12961
  var STYLE_PLAIN = 1;
@@ -12709,14 +12964,14 @@ var require_dumper = __commonJS({
12709
12964
  var STYLE_FOLDED = 4;
12710
12965
  var STYLE_DOUBLE = 5;
12711
12966
  function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {
12712
- var i2;
12713
- var char = 0;
12714
- var prevChar = null;
12715
- var hasLineBreak = false;
12716
- var hasFoldableLine = false;
12717
- var shouldTrackWidth = lineWidth !== -1;
12718
- var previousLineBreak = -1;
12719
- var plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1));
12967
+ let i2;
12968
+ let char = 0;
12969
+ let prevChar = null;
12970
+ let hasLineBreak = false;
12971
+ let hasFoldableLine = false;
12972
+ const shouldTrackWidth = lineWidth !== -1;
12973
+ let previousLineBreak = -1;
12974
+ let plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1));
12720
12975
  if (singleLineOnly || forceQuotes) {
12721
12976
  for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) {
12722
12977
  char = codePointAt(string, i2);
@@ -12768,9 +13023,10 @@ var require_dumper = __commonJS({
12768
13023
  return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'";
12769
13024
  }
12770
13025
  }
12771
- var indent = state.indent * Math.max(1, level);
12772
- var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
12773
- var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel;
13026
+ const indent = state.indent * Math.max(1, level);
13027
+ const lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
13028
+ const singleLineOnly = iskey || // No block styles in flow mode.
13029
+ state.flowLevel > -1 && level >= state.flowLevel;
12774
13030
  function testAmbiguity(string2) {
12775
13031
  return testImplicitResolving(state, string2);
12776
13032
  }
@@ -12800,28 +13056,29 @@ var require_dumper = __commonJS({
12800
13056
  })();
12801
13057
  }
12802
13058
  function blockHeader(string, indentPerLevel) {
12803
- var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
12804
- var clip = string[string.length - 1] === "\n";
12805
- var keep = clip && (string[string.length - 2] === "\n" || string === "\n");
12806
- var chomp = keep ? "+" : clip ? "" : "-";
13059
+ const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
13060
+ const clip = string[string.length - 1] === "\n";
13061
+ const keep = clip && (string[string.length - 2] === "\n" || string === "\n");
13062
+ const chomp = keep ? "+" : clip ? "" : "-";
12807
13063
  return indentIndicator + chomp + "\n";
12808
13064
  }
12809
13065
  function dropEndingNewline(string) {
12810
13066
  return string[string.length - 1] === "\n" ? string.slice(0, -1) : string;
12811
13067
  }
12812
13068
  function foldString(string, width) {
12813
- var lineRe = /(\n+)([^\n]*)/g;
12814
- var result = (function() {
12815
- var nextLF = string.indexOf("\n");
13069
+ const lineRe = /(\n+)([^\n]*)/g;
13070
+ let result = (function() {
13071
+ let nextLF = string.indexOf("\n");
12816
13072
  nextLF = nextLF !== -1 ? nextLF : string.length;
12817
13073
  lineRe.lastIndex = nextLF;
12818
13074
  return foldLine(string.slice(0, nextLF), width);
12819
13075
  })();
12820
- var prevMoreIndented = string[0] === "\n" || string[0] === " ";
12821
- var moreIndented;
12822
- var match;
13076
+ let prevMoreIndented = string[0] === "\n" || string[0] === " ";
13077
+ let moreIndented;
13078
+ let match;
12823
13079
  while (match = lineRe.exec(string)) {
12824
- var prefix2 = match[1], line = match[2];
13080
+ const prefix2 = match[1];
13081
+ const line = match[2];
12825
13082
  moreIndented = line[0] === " ";
12826
13083
  result += prefix2 + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width);
12827
13084
  prevMoreIndented = moreIndented;
@@ -12830,10 +13087,13 @@ var require_dumper = __commonJS({
12830
13087
  }
12831
13088
  function foldLine(line, width) {
12832
13089
  if (line === "" || line[0] === " ") return line;
12833
- var breakRe = / [^ ]/g;
12834
- var match;
12835
- var start = 0, end, curr = 0, next = 0;
12836
- var result = "";
13090
+ const breakRe = / [^ ]/g;
13091
+ let match;
13092
+ let start = 0;
13093
+ let end;
13094
+ let curr = 0;
13095
+ let next = 0;
13096
+ let result = "";
12837
13097
  while (match = breakRe.exec(line)) {
12838
13098
  next = match.index;
12839
13099
  if (next - start > width) {
@@ -12852,12 +13112,11 @@ var require_dumper = __commonJS({
12852
13112
  return result.slice(1);
12853
13113
  }
12854
13114
  function escapeString(string) {
12855
- var result = "";
12856
- var char = 0;
12857
- var escapeSeq;
12858
- for (var i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) {
13115
+ let result = "";
13116
+ let char = 0;
13117
+ for (let i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) {
12859
13118
  char = codePointAt(string, i2);
12860
- escapeSeq = ESCAPE_SEQUENCES[char];
13119
+ const escapeSeq = ESCAPE_SEQUENCES[char];
12861
13120
  if (!escapeSeq && isPrintable(char)) {
12862
13121
  result += string[i2];
12863
13122
  if (char >= 65536) result += string[i2 + 1];
@@ -12868,9 +13127,10 @@ var require_dumper = __commonJS({
12868
13127
  return result;
12869
13128
  }
12870
13129
  function writeFlowSequence(state, level, object) {
12871
- var _result = "", _tag = state.tag, index, length, value;
12872
- for (index = 0, length = object.length; index < length; index += 1) {
12873
- value = object[index];
13130
+ let _result = "";
13131
+ const _tag = state.tag;
13132
+ for (let index = 0, length = object.length; index < length; index += 1) {
13133
+ let value = object[index];
12874
13134
  if (state.replacer) {
12875
13135
  value = state.replacer.call(object, String(index), value);
12876
13136
  }
@@ -12883,9 +13143,10 @@ var require_dumper = __commonJS({
12883
13143
  state.dump = "[" + _result + "]";
12884
13144
  }
12885
13145
  function writeBlockSequence(state, level, object, compact) {
12886
- var _result = "", _tag = state.tag, index, length, value;
12887
- for (index = 0, length = object.length; index < length; index += 1) {
12888
- value = object[index];
13146
+ let _result = "";
13147
+ const _tag = state.tag;
13148
+ for (let index = 0, length = object.length; index < length; index += 1) {
13149
+ let value = object[index];
12889
13150
  if (state.replacer) {
12890
13151
  value = state.replacer.call(object, String(index), value);
12891
13152
  }
@@ -12905,13 +13166,15 @@ var require_dumper = __commonJS({
12905
13166
  state.dump = _result || "[]";
12906
13167
  }
12907
13168
  function writeFlowMapping(state, level, object) {
12908
- var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer;
12909
- for (index = 0, length = objectKeyList.length; index < length; index += 1) {
12910
- pairBuffer = "";
13169
+ let _result = "";
13170
+ const _tag = state.tag;
13171
+ const objectKeyList = Object.keys(object);
13172
+ for (let index = 0, length = objectKeyList.length; index < length; index += 1) {
13173
+ let pairBuffer = "";
12911
13174
  if (_result !== "") pairBuffer += ", ";
12912
13175
  if (state.condenseFlow) pairBuffer += '"';
12913
- objectKey = objectKeyList[index];
12914
- objectValue = object[objectKey];
13176
+ const objectKey = objectKeyList[index];
13177
+ let objectValue = object[objectKey];
12915
13178
  if (state.replacer) {
12916
13179
  objectValue = state.replacer.call(object, objectKey, objectValue);
12917
13180
  }
@@ -12930,7 +13193,9 @@ var require_dumper = __commonJS({
12930
13193
  state.dump = "{" + _result + "}";
12931
13194
  }
12932
13195
  function writeBlockMapping(state, level, object, compact) {
12933
- var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer;
13196
+ let _result = "";
13197
+ const _tag = state.tag;
13198
+ const objectKeyList = Object.keys(object);
12934
13199
  if (state.sortKeys === true) {
12935
13200
  objectKeyList.sort();
12936
13201
  } else if (typeof state.sortKeys === "function") {
@@ -12938,20 +13203,20 @@ var require_dumper = __commonJS({
12938
13203
  } else if (state.sortKeys) {
12939
13204
  throw new YAMLException("sortKeys must be a boolean or a function");
12940
13205
  }
12941
- for (index = 0, length = objectKeyList.length; index < length; index += 1) {
12942
- pairBuffer = "";
13206
+ for (let index = 0, length = objectKeyList.length; index < length; index += 1) {
13207
+ let pairBuffer = "";
12943
13208
  if (!compact || _result !== "") {
12944
13209
  pairBuffer += generateNextLine(state, level);
12945
13210
  }
12946
- objectKey = objectKeyList[index];
12947
- objectValue = object[objectKey];
13211
+ const objectKey = objectKeyList[index];
13212
+ let objectValue = object[objectKey];
12948
13213
  if (state.replacer) {
12949
13214
  objectValue = state.replacer.call(object, objectKey, objectValue);
12950
13215
  }
12951
13216
  if (!writeNode(state, level + 1, objectKey, true, true, true)) {
12952
13217
  continue;
12953
13218
  }
12954
- explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
13219
+ const explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
12955
13220
  if (explicitPair) {
12956
13221
  if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
12957
13222
  pairBuffer += "?";
@@ -12978,10 +13243,9 @@ var require_dumper = __commonJS({
12978
13243
  state.dump = _result || "{}";
12979
13244
  }
12980
13245
  function detectType(state, object, explicit) {
12981
- var _result, typeList, index, length, type, style;
12982
- typeList = explicit ? state.explicitTypes : state.implicitTypes;
12983
- for (index = 0, length = typeList.length; index < length; index += 1) {
12984
- type = typeList[index];
13246
+ const typeList = explicit ? state.explicitTypes : state.implicitTypes;
13247
+ for (let index = 0, length = typeList.length; index < length; index += 1) {
13248
+ const type = typeList[index];
12985
13249
  if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {
12986
13250
  if (explicit) {
12987
13251
  if (type.multi && type.representName) {
@@ -12993,7 +13257,8 @@ var require_dumper = __commonJS({
12993
13257
  state.tag = "?";
12994
13258
  }
12995
13259
  if (type.represent) {
12996
- style = state.styleMap[type.tag] || type.defaultStyle;
13260
+ const style = state.styleMap[type.tag] || type.defaultStyle;
13261
+ let _result;
12997
13262
  if (_toString.call(type.represent) === "[object Function]") {
12998
13263
  _result = type.represent(object, style);
12999
13264
  } else if (_hasOwnProperty.call(type.represent, style)) {
@@ -13014,13 +13279,14 @@ var require_dumper = __commonJS({
13014
13279
  if (!detectType(state, object, false)) {
13015
13280
  detectType(state, object, true);
13016
13281
  }
13017
- var type = _toString.call(state.dump);
13018
- var inblock = block;
13019
- var tagStr;
13282
+ const type = _toString.call(state.dump);
13283
+ const inblock = block;
13020
13284
  if (block) {
13021
13285
  block = state.flowLevel < 0 || state.flowLevel > level;
13022
13286
  }
13023
- var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate;
13287
+ const objectOrArray = type === "[object Object]" || type === "[object Array]";
13288
+ let duplicateIndex;
13289
+ let duplicate;
13024
13290
  if (objectOrArray) {
13025
13291
  duplicateIndex = state.duplicates.indexOf(object);
13026
13292
  duplicate = duplicateIndex !== -1;
@@ -13073,7 +13339,7 @@ var require_dumper = __commonJS({
13073
13339
  throw new YAMLException("unacceptable kind of an object to dump " + type);
13074
13340
  }
13075
13341
  if (state.tag !== null && state.tag !== "?") {
13076
- tagStr = encodeURI(
13342
+ let tagStr = encodeURI(
13077
13343
  state.tag[0] === "!" ? state.tag.slice(1) : state.tag
13078
13344
  ).replace(/!/g, "%21");
13079
13345
  if (state.tag[0] === "!") {
@@ -13089,17 +13355,18 @@ var require_dumper = __commonJS({
13089
13355
  return true;
13090
13356
  }
13091
13357
  function getDuplicateReferences(object, state) {
13092
- var objects = [], duplicatesIndexes = [], index, length;
13358
+ const objects = [];
13359
+ const duplicatesIndexes = [];
13093
13360
  inspectNode(object, objects, duplicatesIndexes);
13094
- for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {
13361
+ const length = duplicatesIndexes.length;
13362
+ for (let index = 0; index < length; index += 1) {
13095
13363
  state.duplicates.push(objects[duplicatesIndexes[index]]);
13096
13364
  }
13097
13365
  state.usedDuplicates = new Array(length);
13098
13366
  }
13099
13367
  function inspectNode(object, objects, duplicatesIndexes) {
13100
- var objectKeyList, index, length;
13101
13368
  if (object !== null && typeof object === "object") {
13102
- index = objects.indexOf(object);
13369
+ const index = objects.indexOf(object);
13103
13370
  if (index !== -1) {
13104
13371
  if (duplicatesIndexes.indexOf(index) === -1) {
13105
13372
  duplicatesIndexes.push(index);
@@ -13107,13 +13374,13 @@ var require_dumper = __commonJS({
13107
13374
  } else {
13108
13375
  objects.push(object);
13109
13376
  if (Array.isArray(object)) {
13110
- for (index = 0, length = object.length; index < length; index += 1) {
13111
- inspectNode(object[index], objects, duplicatesIndexes);
13377
+ for (let i2 = 0, length = object.length; i2 < length; i2 += 1) {
13378
+ inspectNode(object[i2], objects, duplicatesIndexes);
13112
13379
  }
13113
13380
  } else {
13114
- objectKeyList = Object.keys(object);
13115
- for (index = 0, length = objectKeyList.length; index < length; index += 1) {
13116
- inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
13381
+ const objectKeyList = Object.keys(object);
13382
+ for (let i2 = 0, length = objectKeyList.length; i2 < length; i2 += 1) {
13383
+ inspectNode(object[objectKeyList[i2]], objects, duplicatesIndexes);
13117
13384
  }
13118
13385
  }
13119
13386
  }
@@ -13121,9 +13388,9 @@ var require_dumper = __commonJS({
13121
13388
  }
13122
13389
  function dump(input, options) {
13123
13390
  options = options || {};
13124
- var state = new State(options);
13391
+ const state = new State(options);
13125
13392
  if (!state.noRefs) getDuplicateReferences(input, state);
13126
- var value = input;
13393
+ let value = input;
13127
13394
  if (state.replacer) {
13128
13395
  value = state.replacer.call({ "": value }, "", value);
13129
13396
  }
@@ -227083,7 +227350,9 @@ var require_defaults2 = __commonJS({
227083
227350
  "node_modules/cosmiconfig/dist/defaults.js"(exports) {
227084
227351
  "use strict";
227085
227352
  Object.defineProperty(exports, "__esModule", { value: true });
227086
- exports.defaultLoadersSync = exports.defaultLoaders = exports.metaSearchPlaces = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = exports.getDefaultSearchPlacesSync = exports.getDefaultSearchPlaces = void 0;
227353
+ exports.defaultLoadersSync = exports.defaultLoaders = exports.metaSearchPlaces = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = void 0;
227354
+ exports.getDefaultSearchPlaces = getDefaultSearchPlaces;
227355
+ exports.getDefaultSearchPlacesSync = getDefaultSearchPlacesSync;
227087
227356
  var loaders_1 = require_loaders();
227088
227357
  function getDefaultSearchPlaces(moduleName2) {
227089
227358
  return [
@@ -227110,7 +227379,6 @@ var require_defaults2 = __commonJS({
227110
227379
  `${moduleName2}.config.mjs`
227111
227380
  ];
227112
227381
  }
227113
- exports.getDefaultSearchPlaces = getDefaultSearchPlaces;
227114
227382
  function getDefaultSearchPlacesSync(moduleName2) {
227115
227383
  return [
227116
227384
  "package.json",
@@ -227133,7 +227401,6 @@ var require_defaults2 = __commonJS({
227133
227401
  `${moduleName2}.config.cjs`
227134
227402
  ];
227135
227403
  }
227136
- exports.getDefaultSearchPlacesSync = getDefaultSearchPlacesSync;
227137
227404
  exports.globalConfigSearchPlaces = [
227138
227405
  "config",
227139
227406
  "config.json",
@@ -227271,17 +227538,31 @@ var require_util3 = __commonJS({
227271
227538
  }) : function(o2, v2) {
227272
227539
  o2["default"] = v2;
227273
227540
  });
227274
- var __importStar = exports && exports.__importStar || function(mod) {
227275
- if (mod && mod.__esModule) return mod;
227276
- var result = {};
227277
- if (mod != null) {
227278
- for (var k2 in mod) if (k2 !== "default" && Object.prototype.hasOwnProperty.call(mod, k2)) __createBinding(result, mod, k2);
227279
- }
227280
- __setModuleDefault(result, mod);
227281
- return result;
227282
- };
227541
+ var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function() {
227542
+ var ownKeys = function(o2) {
227543
+ ownKeys = Object.getOwnPropertyNames || function(o3) {
227544
+ var ar = [];
227545
+ for (var k2 in o3) if (Object.prototype.hasOwnProperty.call(o3, k2)) ar[ar.length] = k2;
227546
+ return ar;
227547
+ };
227548
+ return ownKeys(o2);
227549
+ };
227550
+ return function(mod) {
227551
+ if (mod && mod.__esModule) return mod;
227552
+ var result = {};
227553
+ if (mod != null) {
227554
+ for (var k2 = ownKeys(mod), i2 = 0; i2 < k2.length; i2++) if (k2[i2] !== "default") __createBinding(result, mod, k2[i2]);
227555
+ }
227556
+ __setModuleDefault(result, mod);
227557
+ return result;
227558
+ };
227559
+ })();
227283
227560
  Object.defineProperty(exports, "__esModule", { value: true });
227284
- exports.isDirectorySync = exports.isDirectory = exports.removeUndefinedValuesFromObject = exports.getPropertyByPath = exports.emplace = void 0;
227561
+ exports.emplace = emplace;
227562
+ exports.getPropertyByPath = getPropertyByPath;
227563
+ exports.removeUndefinedValuesFromObject = removeUndefinedValuesFromObject;
227564
+ exports.isDirectory = isDirectory;
227565
+ exports.isDirectorySync = isDirectorySync;
227285
227566
  var fs_1 = __importStar(__require("fs"));
227286
227567
  function emplace(map, key, fn) {
227287
227568
  const cached = map.get(key);
@@ -227292,7 +227573,6 @@ var require_util3 = __commonJS({
227292
227573
  map.set(key, result);
227293
227574
  return result;
227294
227575
  }
227295
- exports.emplace = emplace;
227296
227576
  function getPropertyByPath(source, path9) {
227297
227577
  if (typeof path9 === "string" && Object.prototype.hasOwnProperty.call(source, path9)) {
227298
227578
  return source[path9];
@@ -227305,11 +227585,9 @@ var require_util3 = __commonJS({
227305
227585
  return previous[key];
227306
227586
  }, source);
227307
227587
  }
227308
- exports.getPropertyByPath = getPropertyByPath;
227309
227588
  function removeUndefinedValuesFromObject(options) {
227310
227589
  return Object.fromEntries(Object.entries(options).filter(([, value]) => value !== void 0));
227311
227590
  }
227312
- exports.removeUndefinedValuesFromObject = removeUndefinedValuesFromObject;
227313
227591
  async function isDirectory(path9) {
227314
227592
  try {
227315
227593
  const stat2 = await fs_1.promises.stat(path9);
@@ -227321,7 +227599,6 @@ var require_util3 = __commonJS({
227321
227599
  throw e2;
227322
227600
  }
227323
227601
  }
227324
- exports.isDirectory = isDirectory;
227325
227602
  function isDirectorySync(path9) {
227326
227603
  try {
227327
227604
  const stat2 = fs_1.default.statSync(path9);
@@ -227333,7 +227610,6 @@ var require_util3 = __commonJS({
227333
227610
  throw e2;
227334
227611
  }
227335
227612
  }
227336
- exports.isDirectorySync = isDirectorySync;
227337
227613
  }
227338
227614
  });
227339
227615
 
@@ -227345,7 +227621,8 @@ var require_ExplorerBase = __commonJS({
227345
227621
  return mod && mod.__esModule ? mod : { "default": mod };
227346
227622
  };
227347
227623
  Object.defineProperty(exports, "__esModule", { value: true });
227348
- exports.getExtensionDescription = exports.ExplorerBase = void 0;
227624
+ exports.ExplorerBase = void 0;
227625
+ exports.getExtensionDescription = getExtensionDescription;
227349
227626
  var env_paths_1 = __importDefault(require_env_paths());
227350
227627
  var os_1 = __importDefault(__require("os"));
227351
227628
  var path_1 = __importDefault(__require("path"));
@@ -227451,7 +227728,6 @@ ${[...importStack, fullPath].map((path9, i2) => `${i2 + 1}. ${path9}`).join("\n"
227451
227728
  function getExtensionDescription(extension) {
227452
227729
  return extension ? `extension "${extension}"` : "files without extensions";
227453
227730
  }
227454
- exports.getExtensionDescription = getExtensionDescription;
227455
227731
  }
227456
227732
  });
227457
227733
 
@@ -227460,7 +227736,8 @@ var require_merge2 = __commonJS({
227460
227736
  "node_modules/cosmiconfig/dist/merge.js"(exports) {
227461
227737
  "use strict";
227462
227738
  Object.defineProperty(exports, "__esModule", { value: true });
227463
- exports.mergeAll = exports.hasOwn = void 0;
227739
+ exports.hasOwn = void 0;
227740
+ exports.mergeAll = mergeAll;
227464
227741
  exports.hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
227465
227742
  var objToString = Function.prototype.call.bind(Object.prototype.toString);
227466
227743
  function isPlainObject3(obj) {
@@ -227468,6 +227745,9 @@ var require_merge2 = __commonJS({
227468
227745
  }
227469
227746
  function merge2(target, source, options) {
227470
227747
  for (const key of Object.keys(source)) {
227748
+ if (key === "__proto__" || key === "constructor") {
227749
+ continue;
227750
+ }
227471
227751
  const newValue = source[key];
227472
227752
  if ((0, exports.hasOwn)(target, key)) {
227473
227753
  if (Array.isArray(target[key]) && Array.isArray(newValue)) {
@@ -227487,7 +227767,6 @@ var require_merge2 = __commonJS({
227487
227767
  function mergeAll(objects, options) {
227488
227768
  return objects.reduce((target, source) => merge2(target, source, options), {});
227489
227769
  }
227490
- exports.mergeAll = mergeAll;
227491
227770
  }
227492
227771
  });
227493
227772
 
@@ -227625,19 +227904,23 @@ var require_Explorer = __commonJS({
227625
227904
  let currentDir = startDir;
227626
227905
  while (true) {
227627
227906
  yield { path: currentDir, isGlobalConfig: false };
227907
+ let foundPackageFile = false;
227628
227908
  for (const ext of ["json", "yaml"]) {
227629
227909
  const packageFile = path_1.default.join(currentDir, `package.${ext}`);
227630
227910
  if (await this.#fileExists(packageFile)) {
227911
+ foundPackageFile = true;
227631
227912
  break;
227632
227913
  }
227633
227914
  }
227915
+ if (foundPackageFile) {
227916
+ return;
227917
+ }
227634
227918
  const parentDir = path_1.default.dirname(currentDir);
227635
227919
  if (parentDir === currentDir) {
227636
- break;
227920
+ return;
227637
227921
  }
227638
227922
  currentDir = parentDir;
227639
227923
  }
227640
- return;
227641
227924
  }
227642
227925
  case "global": {
227643
227926
  yield* this.getGlobalDirs(startDir);
@@ -227783,19 +228066,23 @@ var require_ExplorerSync = __commonJS({
227783
228066
  let currentDir = startDir;
227784
228067
  while (true) {
227785
228068
  yield { path: currentDir, isGlobalConfig: false };
228069
+ let foundPackageFile = false;
227786
228070
  for (const ext of ["json", "yaml"]) {
227787
228071
  const packageFile = path_1.default.join(currentDir, `package.${ext}`);
227788
228072
  if (this.#fileExists(packageFile)) {
228073
+ foundPackageFile = true;
227789
228074
  break;
227790
228075
  }
227791
228076
  }
228077
+ if (foundPackageFile) {
228078
+ return;
228079
+ }
227792
228080
  const parentDir = path_1.default.dirname(currentDir);
227793
228081
  if (parentDir === currentDir) {
227794
- break;
228082
+ return;
227795
228083
  }
227796
228084
  currentDir = parentDir;
227797
228085
  }
227798
- return;
227799
228086
  }
227800
228087
  case "global": {
227801
228088
  yield* this.getGlobalDirs(startDir);
@@ -227826,7 +228113,9 @@ var require_dist = __commonJS({
227826
228113
  "node_modules/cosmiconfig/dist/index.js"(exports) {
227827
228114
  "use strict";
227828
228115
  Object.defineProperty(exports, "__esModule", { value: true });
227829
- exports.defaultLoadersSync = exports.defaultLoaders = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = exports.getDefaultSearchPlacesSync = exports.getDefaultSearchPlaces = exports.cosmiconfigSync = exports.cosmiconfig = void 0;
228116
+ exports.defaultLoadersSync = exports.defaultLoaders = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = exports.getDefaultSearchPlacesSync = exports.getDefaultSearchPlaces = void 0;
228117
+ exports.cosmiconfig = cosmiconfig2;
228118
+ exports.cosmiconfigSync = cosmiconfigSync;
227830
228119
  var defaults_1 = require_defaults2();
227831
228120
  Object.defineProperty(exports, "defaultLoaders", { enumerable: true, get: function() {
227832
228121
  return defaults_1.defaultLoaders;
@@ -227968,7 +228257,6 @@ var require_dist = __commonJS({
227968
228257
  clearCaches: explorer.clearCaches.bind(explorer)
227969
228258
  };
227970
228259
  }
227971
- exports.cosmiconfig = cosmiconfig2;
227972
228260
  function cosmiconfigSync(moduleName2, options = {}) {
227973
228261
  const normalizedOptions = mergeOptionsSync(moduleName2, options);
227974
228262
  const explorerSync = new ExplorerSync_js_1.ExplorerSync(normalizedOptions);
@@ -227980,7 +228268,6 @@ var require_dist = __commonJS({
227980
228268
  clearCaches: explorerSync.clearCaches.bind(explorerSync)
227981
228269
  };
227982
228270
  }
227983
- exports.cosmiconfigSync = cosmiconfigSync;
227984
228271
  }
227985
228272
  });
227986
228273
 
@@ -231180,6 +231467,18 @@ var require_semver3 = __commonJS({
231180
231467
  var { safeRe: re, t: t2 } = require_re2();
231181
231468
  var parseOptions = require_parse_options2();
231182
231469
  var { compareIdentifiers } = require_identifiers2();
231470
+ var isPrereleaseIdentifier = (prerelease, identifier) => {
231471
+ const identifiers = identifier.split(".");
231472
+ if (identifiers.length > prerelease.length) {
231473
+ return false;
231474
+ }
231475
+ for (let i2 = 0; i2 < identifiers.length; i2++) {
231476
+ if (compareIdentifiers(prerelease[i2], identifiers[i2]) !== 0) {
231477
+ return false;
231478
+ }
231479
+ }
231480
+ return true;
231481
+ };
231183
231482
  var SemVer = class _SemVer {
231184
231483
  constructor(version, options) {
231185
231484
  options = parseOptions(options);
@@ -231426,8 +231725,9 @@ var require_semver3 = __commonJS({
231426
231725
  if (identifierBase === false) {
231427
231726
  prerelease = [identifier];
231428
231727
  }
231429
- if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
231430
- if (isNaN(this.prerelease[1])) {
231728
+ if (isPrereleaseIdentifier(this.prerelease, identifier)) {
231729
+ const prereleaseBase = this.prerelease[identifier.split(".").length];
231730
+ if (isNaN(prereleaseBase)) {
231431
231731
  this.prerelease = prerelease;
231432
231732
  }
231433
231733
  } else {
@@ -232097,20 +232397,22 @@ var require_range2 = __commonJS({
232097
232397
  return comp;
232098
232398
  };
232099
232399
  var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
232400
+ var invalidXRangeOrder = (M, m2, p2) => isX(M) && !isX(m2) || isX(m2) && p2 && !isX(p2);
232100
232401
  var replaceTildes = (comp, options) => {
232101
232402
  return comp.trim().split(/\s+/).map((c2) => replaceTilde(c2, options)).join(" ");
232102
232403
  };
232103
232404
  var replaceTilde = (comp, options) => {
232104
232405
  const r2 = options.loose ? re[t2.TILDELOOSE] : re[t2.TILDE];
232406
+ const z2 = options.includePrerelease ? "-0" : "";
232105
232407
  return comp.replace(r2, (_2, M, m2, p2, pr) => {
232106
232408
  debug("tilde", comp, _2, M, m2, p2, pr);
232107
232409
  let ret;
232108
232410
  if (isX(M)) {
232109
232411
  ret = "";
232110
232412
  } else if (isX(m2)) {
232111
- ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
232413
+ ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`;
232112
232414
  } else if (isX(p2)) {
232113
- ret = `>=${M}.${m2}.0 <${M}.${+m2 + 1}.0-0`;
232415
+ ret = `>=${M}.${m2}.0${z2} <${M}.${+m2 + 1}.0-0`;
232114
232416
  } else if (pr) {
232115
232417
  debug("replaceTilde pr", pr);
232116
232418
  ret = `>=${M}.${m2}.${p2}-${pr} <${M}.${+m2 + 1}.0-0`;
@@ -232156,9 +232458,9 @@ var require_range2 = __commonJS({
232156
232458
  debug("no pr");
232157
232459
  if (M === "0") {
232158
232460
  if (m2 === "0") {
232159
- ret = `>=${M}.${m2}.${p2}${z2} <${M}.${m2}.${+p2 + 1}-0`;
232461
+ ret = `>=${M}.${m2}.${p2} <${M}.${m2}.${+p2 + 1}-0`;
232160
232462
  } else {
232161
- ret = `>=${M}.${m2}.${p2}${z2} <${M}.${+m2 + 1}.0-0`;
232463
+ ret = `>=${M}.${m2}.${p2} <${M}.${+m2 + 1}.0-0`;
232162
232464
  }
232163
232465
  } else {
232164
232466
  ret = `>=${M}.${m2}.${p2} <${+M + 1}.0.0-0`;
@@ -232177,6 +232479,9 @@ var require_range2 = __commonJS({
232177
232479
  const r2 = options.loose ? re[t2.XRANGELOOSE] : re[t2.XRANGE];
232178
232480
  return comp.replace(r2, (ret, gtlt, M, m2, p2, pr) => {
232179
232481
  debug("xRange", comp, ret, gtlt, M, m2, p2, pr);
232482
+ if (invalidXRangeOrder(M, m2, p2)) {
232483
+ return comp;
232484
+ }
232180
232485
  const xM = isX(M);
232181
232486
  const xm = xM || isX(m2);
232182
232487
  const xp = xm || isX(p2);
@@ -233375,42 +233680,24 @@ var breakingChangeExclamationMark = (parsed, when = "always") => {
233375
233680
  ];
233376
233681
  };
233377
233682
 
233378
- // node_modules/es-toolkit/dist/predicate/isLength.mjs
233379
- function isLength(value) {
233380
- return Number.isSafeInteger(value) && value >= 0;
233381
- }
233382
-
233383
- // node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
233384
- function isArrayLike(value) {
233385
- return value != null && typeof value !== "function" && isLength(value.length);
233386
- }
233387
-
233388
- // node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
233389
- function isUnsafeProperty(key) {
233390
- return key === "__proto__";
233391
- }
233392
-
233393
- // node_modules/es-toolkit/dist/compat/util/toString.mjs
233394
- function toString(value) {
233395
- if (value == null) {
233396
- return "";
233397
- }
233398
- if (typeof value === "string") {
233399
- return value;
233400
- }
233401
- if (Array.isArray(value)) {
233402
- return value.map(toString).join(",");
233403
- }
233404
- const result = String(value);
233405
- if (result === "0" && Object.is(Number(value), -0)) {
233406
- return "-0";
233683
+ // node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
233684
+ function isPlainObject(object) {
233685
+ if (typeof object !== "object") return false;
233686
+ if (object == null) return false;
233687
+ if (Object.getPrototypeOf(object) === null) return true;
233688
+ if (Object.prototype.toString.call(object) !== "[object Object]") {
233689
+ const tag = object[Symbol.toStringTag];
233690
+ if (tag == null) return false;
233691
+ if (!Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)?.writable) return false;
233692
+ return object.toString() === `[object ${tag}]`;
233407
233693
  }
233408
- return result;
233694
+ let proto = object;
233695
+ while (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);
233696
+ return Object.getPrototypeOf(object) === proto;
233409
233697
  }
233410
233698
 
233411
- // node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
233412
- function isPrimitive(value) {
233413
- return value == null || typeof value !== "object" && typeof value !== "function";
233699
+ // node_modules/es-toolkit/dist/function/noop.mjs
233700
+ function noop() {
233414
233701
  }
233415
233702
 
233416
233703
  // node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
@@ -233420,9 +233707,7 @@ function getSymbols(object) {
233420
233707
 
233421
233708
  // node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
233422
233709
  function getTag(value) {
233423
- if (value == null) {
233424
- return value === void 0 ? "[object Undefined]" : "[object Null]";
233425
- }
233710
+ if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
233426
233711
  return Object.prototype.toString.call(value);
233427
233712
  }
233428
233713
 
@@ -233453,13 +233738,43 @@ var float64ArrayTag = "[object Float64Array]";
233453
233738
  // node_modules/es-toolkit/dist/_internal/globalThis.mjs
233454
233739
  var globalThis_ = typeof globalThis === "object" && globalThis || typeof window === "object" && window || typeof self === "object" && self || typeof global === "object" && global || /* @__PURE__ */ (function() {
233455
233740
  return this;
233456
- })() || Function("return this")();
233741
+ })();
233457
233742
 
233458
233743
  // node_modules/es-toolkit/dist/predicate/isBuffer.mjs
233459
233744
  function isBuffer(x2) {
233460
233745
  return typeof globalThis_.Buffer !== "undefined" && globalThis_.Buffer.isBuffer(x2);
233461
233746
  }
233462
233747
 
233748
+ // node_modules/es-toolkit/dist/predicate/isLength.mjs
233749
+ function isLength(value) {
233750
+ return Number.isSafeInteger(value) && value >= 0;
233751
+ }
233752
+
233753
+ // node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
233754
+ function isArrayLike(value) {
233755
+ return value != null && typeof value !== "function" && isLength(value.length);
233756
+ }
233757
+
233758
+ // node_modules/es-toolkit/dist/compat/util/toString.mjs
233759
+ function toString(value) {
233760
+ if (value == null) return "";
233761
+ if (typeof value === "string") return value;
233762
+ if (Array.isArray(value)) return value.map(toString).join(",");
233763
+ const result = String(value);
233764
+ if (result === "0" && Object.is(Number(value), -0)) return "-0";
233765
+ return result;
233766
+ }
233767
+
233768
+ // node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
233769
+ function isUnsafeProperty(key) {
233770
+ return key === "__proto__";
233771
+ }
233772
+
233773
+ // node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
233774
+ function isPrimitive(value) {
233775
+ return value == null || typeof value !== "object" && typeof value !== "function";
233776
+ }
233777
+
233463
233778
  // node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
233464
233779
  function isTypedArray(x2) {
233465
233780
  return ArrayBuffer.isView(x2) && !(x2 instanceof DataView);
@@ -233471,32 +233786,18 @@ function cloneDeepWith(obj, cloneValue) {
233471
233786
  }
233472
233787
  function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) {
233473
233788
  const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);
233474
- if (cloned !== void 0) {
233475
- return cloned;
233476
- }
233477
- if (isPrimitive(valueToClone)) {
233478
- return valueToClone;
233479
- }
233480
- if (stack.has(valueToClone)) {
233481
- return stack.get(valueToClone);
233482
- }
233789
+ if (cloned !== void 0) return cloned;
233790
+ if (isPrimitive(valueToClone)) return valueToClone;
233791
+ if (stack.has(valueToClone)) return stack.get(valueToClone);
233483
233792
  if (Array.isArray(valueToClone)) {
233484
233793
  const result = new Array(valueToClone.length);
233485
233794
  stack.set(valueToClone, result);
233486
- for (let i2 = 0; i2 < valueToClone.length; i2++) {
233487
- result[i2] = cloneDeepWithImpl(valueToClone[i2], i2, objectToClone, stack, cloneValue);
233488
- }
233489
- if (Object.hasOwn(valueToClone, "index")) {
233490
- result.index = valueToClone.index;
233491
- }
233492
- if (Object.hasOwn(valueToClone, "input")) {
233493
- result.input = valueToClone.input;
233494
- }
233795
+ for (let i2 = 0; i2 < valueToClone.length; i2++) result[i2] = cloneDeepWithImpl(valueToClone[i2], i2, objectToClone, stack, cloneValue);
233796
+ if (Object.hasOwn(valueToClone, "index")) result.index = valueToClone.index;
233797
+ if (Object.hasOwn(valueToClone, "input")) result.input = valueToClone.input;
233495
233798
  return result;
233496
233799
  }
233497
- if (valueToClone instanceof Date) {
233498
- return new Date(valueToClone.getTime());
233499
- }
233800
+ if (valueToClone instanceof Date) return new Date(valueToClone.getTime());
233500
233801
  if (valueToClone instanceof RegExp) {
233501
233802
  const result = new RegExp(valueToClone.source, valueToClone.flags);
233502
233803
  result.lastIndex = valueToClone.lastIndex;
@@ -233505,33 +233806,23 @@ function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @
233505
233806
  if (valueToClone instanceof Map) {
233506
233807
  const result = /* @__PURE__ */ new Map();
233507
233808
  stack.set(valueToClone, result);
233508
- for (const [key, value] of valueToClone) {
233509
- result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
233510
- }
233809
+ for (const [key, value] of valueToClone) result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
233511
233810
  return result;
233512
233811
  }
233513
233812
  if (valueToClone instanceof Set) {
233514
233813
  const result = /* @__PURE__ */ new Set();
233515
233814
  stack.set(valueToClone, result);
233516
- for (const value of valueToClone) {
233517
- result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
233518
- }
233815
+ for (const value of valueToClone) result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
233519
233816
  return result;
233520
233817
  }
233521
- if (isBuffer(valueToClone)) {
233522
- return valueToClone.subarray();
233523
- }
233818
+ if (isBuffer(valueToClone)) return valueToClone.subarray();
233524
233819
  if (isTypedArray(valueToClone)) {
233525
233820
  const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
233526
233821
  stack.set(valueToClone, result);
233527
- for (let i2 = 0; i2 < valueToClone.length; i2++) {
233528
- result[i2] = cloneDeepWithImpl(valueToClone[i2], i2, objectToClone, stack, cloneValue);
233529
- }
233822
+ for (let i2 = 0; i2 < valueToClone.length; i2++) result[i2] = cloneDeepWithImpl(valueToClone[i2], i2, objectToClone, stack, cloneValue);
233530
233823
  return result;
233531
233824
  }
233532
- if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && valueToClone instanceof SharedArrayBuffer) {
233533
- return valueToClone.slice(0);
233534
- }
233825
+ if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && valueToClone instanceof SharedArrayBuffer) return valueToClone.slice(0);
233535
233826
  if (valueToClone instanceof DataView) {
233536
233827
  const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);
233537
233828
  stack.set(valueToClone, result);
@@ -233539,9 +233830,7 @@ function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @
233539
233830
  return result;
233540
233831
  }
233541
233832
  if (typeof File !== "undefined" && valueToClone instanceof File) {
233542
- const result = new File([valueToClone], valueToClone.name, {
233543
- type: valueToClone.type
233544
- });
233833
+ const result = new File([valueToClone], valueToClone.name, { type: valueToClone.type });
233545
233834
  stack.set(valueToClone, result);
233546
233835
  copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
233547
233836
  return result;
@@ -233594,9 +233883,7 @@ function copyProperties(target, source, objectToClone = target, stack, cloneValu
233594
233883
  for (let i2 = 0; i2 < keys.length; i2++) {
233595
233884
  const key = keys[i2];
233596
233885
  const descriptor = Object.getOwnPropertyDescriptor(target, key);
233597
- if (descriptor == null || descriptor.writable) {
233598
- target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
233599
- }
233886
+ if (descriptor == null || descriptor.writable) target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
233600
233887
  }
233601
233888
  }
233602
233889
  function isCloneableObject(object) {
@@ -233622,12 +233909,10 @@ function isCloneableObject(object) {
233622
233909
  case uint8ArrayTag:
233623
233910
  case uint8ClampedArrayTag:
233624
233911
  case uint16ArrayTag:
233625
- case uint32ArrayTag: {
233912
+ case uint32ArrayTag:
233626
233913
  return true;
233627
- }
233628
- default: {
233914
+ default:
233629
233915
  return false;
233630
- }
233631
233916
  }
233632
233917
  }
233633
233918
 
@@ -233635,13 +233920,9 @@ function isCloneableObject(object) {
233635
233920
  function cloneDeepWith2(obj, customizer) {
233636
233921
  return cloneDeepWith(obj, (value, key, object, stack) => {
233637
233922
  const cloned = customizer?.(value, key, object, stack);
233638
- if (cloned !== void 0) {
233639
- return cloned;
233640
- }
233641
- if (typeof obj !== "object") {
233642
- return void 0;
233643
- }
233644
- if (getTag(obj) === objectTag && typeof obj.constructor !== "function") {
233923
+ if (cloned !== void 0) return cloned;
233924
+ if (typeof obj !== "object") return;
233925
+ if (getTag(obj) === "[object Object]" && typeof obj.constructor !== "function") {
233645
233926
  const result = {};
233646
233927
  stack.set(obj, result);
233647
233928
  copyProperties(result, obj, object, stack);
@@ -233662,9 +233943,8 @@ function cloneDeepWith2(obj, customizer) {
233662
233943
  result[Symbol.iterator] = obj[Symbol.iterator];
233663
233944
  return result;
233664
233945
  }
233665
- default: {
233666
- return void 0;
233667
- }
233946
+ default:
233947
+ return;
233668
233948
  }
233669
233949
  });
233670
233950
  }
@@ -233689,87 +233969,38 @@ function isArrayLikeObject(value) {
233689
233969
  return isObjectLike(value) && isArrayLike(value);
233690
233970
  }
233691
233971
 
233692
- // node_modules/es-toolkit/dist/function/noop.mjs
233693
- function noop() {
233694
- }
233695
-
233696
233972
  // node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
233697
233973
  function isTypedArray2(x2) {
233698
233974
  return isTypedArray(x2);
233699
233975
  }
233700
233976
 
233701
- // node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
233702
- function isPlainObject(object) {
233703
- if (typeof object !== "object") {
233704
- return false;
233705
- }
233706
- if (object == null) {
233707
- return false;
233708
- }
233709
- if (Object.getPrototypeOf(object) === null) {
233710
- return true;
233711
- }
233712
- if (Object.prototype.toString.call(object) !== "[object Object]") {
233713
- const tag = object[Symbol.toStringTag];
233714
- if (tag == null) {
233715
- return false;
233716
- }
233717
- const isTagReadonly = !Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)?.writable;
233718
- if (isTagReadonly) {
233719
- return false;
233720
- }
233721
- return object.toString() === `[object ${tag}]`;
233722
- }
233723
- let proto = object;
233724
- while (Object.getPrototypeOf(proto) !== null) {
233725
- proto = Object.getPrototypeOf(proto);
233726
- }
233727
- return Object.getPrototypeOf(object) === proto;
233728
- }
233729
-
233730
233977
  // node_modules/es-toolkit/dist/object/clone.mjs
233731
233978
  function clone(obj) {
233732
- if (isPrimitive(obj)) {
233733
- return obj;
233734
- }
233735
- if (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && obj instanceof SharedArrayBuffer) {
233736
- return obj.slice(0);
233737
- }
233979
+ if (isPrimitive(obj)) return obj;
233980
+ if (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && obj instanceof SharedArrayBuffer) return obj.slice(0);
233738
233981
  const prototype = Object.getPrototypeOf(obj);
233739
- if (prototype == null) {
233740
- return Object.assign(Object.create(prototype), obj);
233741
- }
233982
+ if (prototype == null) return Object.assign(Object.create(prototype), obj);
233742
233983
  const Constructor = prototype.constructor;
233743
- if (obj instanceof Date || obj instanceof Map || obj instanceof Set) {
233744
- return new Constructor(obj);
233745
- }
233984
+ if (obj instanceof Date || obj instanceof Map || obj instanceof Set) return new Constructor(obj);
233746
233985
  if (obj instanceof RegExp) {
233747
233986
  const newRegExp = new Constructor(obj);
233748
233987
  newRegExp.lastIndex = obj.lastIndex;
233749
233988
  return newRegExp;
233750
233989
  }
233751
- if (obj instanceof DataView) {
233752
- return new Constructor(obj.buffer.slice(0));
233753
- }
233990
+ if (obj instanceof DataView) return new Constructor(obj.buffer.slice(0));
233754
233991
  if (obj instanceof Error) {
233755
233992
  let newError;
233756
- if (obj instanceof AggregateError) {
233757
- newError = new Constructor(obj.errors, obj.message, { cause: obj.cause });
233758
- } else {
233759
- newError = new Constructor(obj.message, { cause: obj.cause });
233760
- }
233993
+ if (obj instanceof AggregateError) newError = new Constructor(obj.errors, obj.message, { cause: obj.cause });
233994
+ else newError = new Constructor(obj.message, { cause: obj.cause });
233761
233995
  newError.stack = obj.stack;
233762
233996
  Object.assign(newError, obj);
233763
233997
  return newError;
233764
233998
  }
233765
- if (typeof File !== "undefined" && obj instanceof File) {
233766
- const newFile = new Constructor([obj], obj.name, { type: obj.type, lastModified: obj.lastModified });
233767
- return newFile;
233768
- }
233769
- if (typeof obj === "object") {
233770
- const newObject = Object.create(prototype);
233771
- return Object.assign(newObject, obj);
233772
- }
233999
+ if (typeof File !== "undefined" && obj instanceof File) return new Constructor([obj], obj.name, {
234000
+ type: obj.type,
234001
+ lastModified: obj.lastModified
234002
+ });
234003
+ if (typeof obj === "object") return Object.assign(Object.create(prototype), obj);
233773
234004
  return obj;
233774
234005
  }
233775
234006
 
@@ -233785,72 +234016,43 @@ function mergeWith(object, ...otherArgs) {
233785
234016
  return result;
233786
234017
  }
233787
234018
  function mergeWithDeep(target, source, merge2, stack) {
233788
- if (isPrimitive(target)) {
233789
- target = Object(target);
233790
- }
233791
- if (source == null || typeof source !== "object") {
233792
- return target;
233793
- }
233794
- if (stack.has(source)) {
233795
- return clone(stack.get(source));
233796
- }
234019
+ if (isPrimitive(target)) target = Object(target);
234020
+ if (source == null || typeof source !== "object") return target;
234021
+ if (stack.has(source)) return clone(stack.get(source));
233797
234022
  stack.set(source, target);
233798
234023
  if (Array.isArray(source)) {
233799
234024
  source = source.slice();
233800
- for (let i2 = 0; i2 < source.length; i2++) {
233801
- source[i2] = source[i2] ?? void 0;
233802
- }
234025
+ for (let i2 = 0; i2 < source.length; i2++) source[i2] = source[i2] ?? void 0;
233803
234026
  }
233804
234027
  const sourceKeys = [...Object.keys(source), ...getSymbols(source)];
233805
234028
  for (let i2 = 0; i2 < sourceKeys.length; i2++) {
233806
234029
  const key = sourceKeys[i2];
233807
- if (isUnsafeProperty(key)) {
233808
- continue;
233809
- }
234030
+ if (isUnsafeProperty(key)) continue;
233810
234031
  let sourceValue = source[key];
233811
234032
  let targetValue = target[key];
233812
- if (isArguments(sourceValue)) {
233813
- sourceValue = { ...sourceValue };
233814
- }
233815
- if (isArguments(targetValue)) {
233816
- targetValue = { ...targetValue };
233817
- }
233818
- if (isBuffer(sourceValue)) {
233819
- sourceValue = cloneDeep(sourceValue);
233820
- }
233821
- if (Array.isArray(sourceValue)) {
233822
- if (Array.isArray(targetValue)) {
233823
- const cloned = [];
233824
- const targetKeys = Reflect.ownKeys(targetValue);
233825
- for (let i3 = 0; i3 < targetKeys.length; i3++) {
233826
- const targetKey = targetKeys[i3];
233827
- cloned[targetKey] = targetValue[targetKey];
233828
- }
233829
- targetValue = cloned;
233830
- } else if (isArrayLikeObject(targetValue)) {
233831
- const cloned = [];
233832
- for (let i3 = 0; i3 < targetValue.length; i3++) {
233833
- cloned[i3] = targetValue[i3];
233834
- }
233835
- targetValue = cloned;
233836
- } else {
233837
- targetValue = [];
233838
- }
233839
- }
234033
+ if (isArguments(sourceValue)) sourceValue = { ...sourceValue };
234034
+ if (isArguments(targetValue)) targetValue = { ...targetValue };
234035
+ if (isBuffer(sourceValue)) sourceValue = cloneDeep(sourceValue);
234036
+ if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) {
234037
+ const cloned = [];
234038
+ const targetKeys = Reflect.ownKeys(targetValue);
234039
+ for (let i3 = 0; i3 < targetKeys.length; i3++) {
234040
+ const targetKey = targetKeys[i3];
234041
+ cloned[targetKey] = targetValue[targetKey];
234042
+ }
234043
+ targetValue = cloned;
234044
+ } else if (isArrayLikeObject(targetValue)) {
234045
+ const cloned = [];
234046
+ for (let i3 = 0; i3 < targetValue.length; i3++) cloned[i3] = targetValue[i3];
234047
+ targetValue = cloned;
234048
+ } else targetValue = [];
233840
234049
  const merged = merge2(targetValue, sourceValue, key, target, source, stack);
233841
- if (merged !== void 0) {
233842
- target[key] = merged;
233843
- } else if (Array.isArray(sourceValue)) {
233844
- target[key] = mergeWithDeep(targetValue, sourceValue, merge2, stack);
233845
- } else if (isObjectLike(targetValue) && isObjectLike(sourceValue) && (isPlainObject(targetValue) || isPlainObject(sourceValue) || isTypedArray2(targetValue) || isTypedArray2(sourceValue))) {
233846
- target[key] = mergeWithDeep(targetValue, sourceValue, merge2, stack);
233847
- } else if (targetValue == null && isPlainObject(sourceValue)) {
233848
- target[key] = mergeWithDeep({}, sourceValue, merge2, stack);
233849
- } else if (targetValue == null && isTypedArray2(sourceValue)) {
233850
- target[key] = cloneDeep(sourceValue);
233851
- } else if (targetValue === void 0 || sourceValue !== void 0) {
233852
- target[key] = sourceValue;
233853
- }
234050
+ if (merged !== void 0) target[key] = merged;
234051
+ else if (Array.isArray(sourceValue)) target[key] = mergeWithDeep(targetValue, sourceValue, merge2, stack);
234052
+ else if (isObjectLike(targetValue) && isObjectLike(sourceValue) && (isPlainObject(targetValue) || isPlainObject(sourceValue) || isTypedArray2(targetValue) || isTypedArray2(sourceValue))) target[key] = mergeWithDeep(targetValue, sourceValue, merge2, stack);
234053
+ else if (targetValue == null && isPlainObject(sourceValue)) target[key] = mergeWithDeep({}, sourceValue, merge2, stack);
234054
+ else if (targetValue == null && isTypedArray2(sourceValue)) target[key] = cloneDeep(sourceValue);
234055
+ else if (targetValue === void 0 || sourceValue !== void 0) target[key] = sourceValue;
233854
234056
  }
233855
234057
  return target;
233856
234058
  }
@@ -233902,9 +234104,7 @@ function deburr(str) {
233902
234104
  let result = "";
233903
234105
  for (let i2 = 0; i2 < str.length; i2++) {
233904
234106
  const char = str[i2];
233905
- if (char >= "\u0300" && char <= "\u036F" || char >= "\uFE20" && char <= "\uFE23") {
233906
- continue;
233907
- }
234107
+ if (char >= "\u0300" && char <= "\u036F" || char >= "\uFE20" && char <= "\uFE23") continue;
233908
234108
  result += deburrMap.get(char) ?? char;
233909
234109
  }
233910
234110
  return result;
@@ -233924,18 +234124,14 @@ function words(str) {
233924
234124
  // node_modules/es-toolkit/dist/string/camelCase.mjs
233925
234125
  function camelCase(str) {
233926
234126
  const words$1 = words(str);
233927
- if (words$1.length === 0) {
233928
- return "";
233929
- }
234127
+ if (words$1.length === 0) return "";
233930
234128
  const [first, ...rest] = words$1;
233931
234129
  return `${first.toLowerCase()}${rest.map((word) => capitalize(word)).join("")}`;
233932
234130
  }
233933
234131
 
233934
234132
  // node_modules/es-toolkit/dist/compat/_internal/normalizeForCase.mjs
233935
234133
  function normalizeForCase(str) {
233936
- if (typeof str !== "string") {
233937
- str = toString(str);
233938
- }
234134
+ if (typeof str !== "string") str = toString(str);
233939
234135
  return str.replace(/['\u2019]/g, "");
233940
234136
  }
233941
234137
 
@@ -233946,8 +234142,7 @@ function camelCase2(str) {
233946
234142
 
233947
234143
  // node_modules/es-toolkit/dist/string/kebabCase.mjs
233948
234144
  function kebabCase(str) {
233949
- const words$1 = words(str);
233950
- return words$1.map((word) => word.toLowerCase()).join("-");
234145
+ return words(str).map((word) => word.toLowerCase()).join("-");
233951
234146
  }
233952
234147
 
233953
234148
  // node_modules/es-toolkit/dist/compat/string/kebabCase.mjs
@@ -233957,8 +234152,7 @@ function kebabCase2(str) {
233957
234152
 
233958
234153
  // node_modules/es-toolkit/dist/string/snakeCase.mjs
233959
234154
  function snakeCase(str) {
233960
- const words$1 = words(str);
233961
- return words$1.map((word) => word.toLowerCase()).join("_");
234155
+ return words(str).map((word) => word.toLowerCase()).join("_");
233962
234156
  }
233963
234157
 
233964
234158
  // node_modules/es-toolkit/dist/compat/string/snakeCase.mjs
@@ -233972,14 +234166,9 @@ function startCase(str) {
233972
234166
  let result = "";
233973
234167
  for (let i2 = 0; i2 < words$1.length; i2++) {
233974
234168
  const word = words$1[i2];
233975
- if (result) {
233976
- result += " ";
233977
- }
233978
- if (word === word.toUpperCase()) {
233979
- result += word;
233980
- } else {
233981
- result += word[0].toUpperCase() + word.slice(1).toLowerCase();
233982
- }
234169
+ if (result) result += " ";
234170
+ if (word === word.toUpperCase()) result += word;
234171
+ else result += word[0].toUpperCase() + word.slice(1).toLowerCase();
233983
234172
  }
233984
234173
  return result;
233985
234174
  }
@@ -234675,7 +234864,7 @@ async function lint(message2, rawRulesConfig, rawOpts) {
234675
234864
  input: message2
234676
234865
  };
234677
234866
  }
234678
- const parsed = message2 === "" ? { header: null, body: null, footer: null } : await lib_default(message2, void 0, opts.parserOpts);
234867
+ const parsed = message2 === "" ? { header: null, body: null, footer: null } : await lib_default(message2, opts.parser, opts.parserOpts);
234679
234868
  if (parsed.header === null && parsed.body === null && parsed.footer === null) {
234680
234869
  return {
234681
234870
  valid: true,
@@ -240330,10 +240519,10 @@ var previouslyVisitedConfigs = [];
240330
240519
  var shim2;
240331
240520
  function applyExtends(config, cwd, mergeExtends, _shim) {
240332
240521
  shim2 = _shim;
240333
- let defaultConfig = {};
240522
+ let defaultConfig2 = {};
240334
240523
  if (Object.prototype.hasOwnProperty.call(config, "extends")) {
240335
240524
  if (typeof config.extends !== "string")
240336
- return defaultConfig;
240525
+ return defaultConfig2;
240337
240526
  const isPath = /\.json|\..*rc$/.test(config.extends);
240338
240527
  let pathToDefault = null;
240339
240528
  if (!isPath) {
@@ -240347,12 +240536,12 @@ function applyExtends(config, cwd, mergeExtends, _shim) {
240347
240536
  }
240348
240537
  checkForCircularExtends(pathToDefault);
240349
240538
  previouslyVisitedConfigs.push(pathToDefault);
240350
- defaultConfig = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : _shim.require(config.extends);
240539
+ defaultConfig2 = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : _shim.require(config.extends);
240351
240540
  delete config.extends;
240352
- defaultConfig = applyExtends(defaultConfig, shim2.path.dirname(pathToDefault), mergeExtends, shim2);
240541
+ defaultConfig2 = applyExtends(defaultConfig2, shim2.path.dirname(pathToDefault), mergeExtends, shim2);
240353
240542
  }
240354
240543
  previouslyVisitedConfigs = [];
240355
- return mergeExtends ? mergeDeep(defaultConfig, config) : Object.assign({}, defaultConfig, config);
240544
+ return mergeExtends ? mergeDeep(defaultConfig2, config) : Object.assign({}, defaultConfig2, config);
240356
240545
  }
240357
240546
  function checkForCircularExtends(cfgPath) {
240358
240547
  if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
@@ -241911,6 +242100,7 @@ var dynamicImport3 = async (id) => {
241911
242100
  };
241912
242101
  var pkg = require7("../package.json");
241913
242102
  var gitDefaultCommentChar = "#";
242103
+ var defaultConfig = "@commitlint/config-conventional";
241914
242104
  var cli = yargs_default(process.argv.slice(2)).options({
241915
242105
  color: {
241916
242106
  alias: "c",
@@ -241923,6 +242113,10 @@ var cli = yargs_default(process.argv.slice(2)).options({
241923
242113
  description: "path to the config file; result code 9 if config is missing",
241924
242114
  type: "string"
241925
242115
  },
242116
+ "default-config": {
242117
+ description: "use built-in default config (@commitlint/config-conventional) when no rules are found",
242118
+ type: "boolean"
242119
+ },
241926
242120
  "print-config": {
241927
242121
  choices: ["", "text", "json"],
241928
242122
  description: "print resolved config",
@@ -242057,10 +242251,7 @@ async function main(args) {
242057
242251
  throw err;
242058
242252
  }
242059
242253
  if (typeof options["print-config"] === "string") {
242060
- const loaded2 = await load(getSeed(flags), {
242061
- cwd: flags.cwd,
242062
- file: flags.config
242063
- });
242254
+ const loaded2 = await loadConfig2(flags);
242064
242255
  switch (options["print-config"]) {
242065
242256
  case "json":
242066
242257
  console.log(JSON.stringify(loaded2));
@@ -242100,10 +242291,7 @@ async function main(args) {
242100
242291
  console.log(err.message);
242101
242292
  throw err;
242102
242293
  }
242103
- const loaded = await load(getSeed(flags), {
242104
- cwd: flags.cwd,
242105
- file: flags.config
242106
- });
242294
+ const loaded = await loadConfig2(flags);
242107
242295
  const parserOpts = selectParserOpts(loaded.parserPreset);
242108
242296
  const opts = {
242109
242297
  parserOpts: {},
@@ -242151,7 +242339,8 @@ async function main(args) {
242151
242339
  message: [
242152
242340
  "Please add rules to your `commitlint.config.js`",
242153
242341
  " - Getting started guide: https://commitlint.js.org/guides/getting-started",
242154
- " - Example config: https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional/src/index.ts"
242342
+ " - Example config: https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional/src/index.ts",
242343
+ " - Or run commitlint with the built-in default config: commitlint --default-config"
242155
242344
  ].join("\n")
242156
242345
  }
242157
242346
  ],
@@ -242244,6 +242433,26 @@ function getEditValue(flags) {
242244
242433
  }
242245
242434
  return edit;
242246
242435
  }
242436
+ async function loadConfig2(flags) {
242437
+ const loaded = await load(getSeed(flags), {
242438
+ cwd: flags.cwd,
242439
+ file: flags.config
242440
+ });
242441
+ if (flags["default-config"] && Object.keys(loaded.rules).length === 0) {
242442
+ const extendsWithDefault = [resolveDefaultConfig(flags), ...flags.extends || []];
242443
+ return load(getSeed({ ...flags, extends: extendsWithDefault }), {
242444
+ cwd: flags.cwd,
242445
+ file: flags.config
242446
+ });
242447
+ }
242448
+ return loaded;
242449
+ }
242450
+ function resolveDefaultConfig(flags) {
242451
+ return resolveModulePath(defaultConfig, flags) || defaultConfig;
242452
+ }
242453
+ function resolveModulePath(moduleName2, flags) {
242454
+ return resolveFromSilent(moduleName2, __dirname4) || resolveFromSilent(moduleName2, flags.cwd) || resolveGlobalSilent(moduleName2);
242455
+ }
242247
242456
  function getSeed(flags) {
242248
242457
  const n2 = (flags.extends || []).filter((i2) => typeof i2 === "string");
242249
242458
  return n2.length > 0 ? { extends: n2, parserPreset: flags["parser-preset"] } : { parserPreset: flags["parser-preset"] };
@@ -242259,7 +242468,7 @@ function selectParserOpts(parserPreset) {
242259
242468
  }
242260
242469
  function loadFormatter(config, flags) {
242261
242470
  const moduleName2 = flags.format || config.formatter || "@commitlint/format";
242262
- const modulePath = resolveFromSilent(moduleName2, __dirname4) || resolveFromSilent(moduleName2, flags.cwd) || resolveGlobalSilent(moduleName2);
242471
+ const modulePath = resolveModulePath(moduleName2, flags);
242263
242472
  if (modulePath) {
242264
242473
  return dynamicImport3(modulePath);
242265
242474
  }
@@ -242289,6 +242498,7 @@ typescript/lib/typescript.js:
242289
242498
 
242290
242499
  cosmiconfig/dist/loaders.js:
242291
242500
  cosmiconfig/dist/util.js:
242501
+ cosmiconfig/dist/merge.js:
242292
242502
  (* istanbul ignore next -- @preserve *)
242293
242503
 
242294
242504
  cosmiconfig/dist/ExplorerBase.js: