semantic-release-lerna 2.9.0 → 2.11.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.
Files changed (2) hide show
  1. package/dist/index.js +509 -1881
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -332,8 +332,8 @@ var require_escape = __commonJS({
332
332
  }
333
333
  function escapeArgument(arg, doubleEscapeMetaChars) {
334
334
  arg = `${arg}`;
335
- arg = arg.replace(/(\\*)"/g, '$1$1\\"');
336
- arg = arg.replace(/(\\*)$/, "$1$1");
335
+ arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
336
+ arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
337
337
  arg = `"${arg}"`;
338
338
  arg = arg.replace(metaCharsRegExp, "^$1");
339
339
  if (doubleEscapeMetaChars) {
@@ -479,7 +479,7 @@ var require_enoent = __commonJS({
479
479
  const originalEmit = cp.emit;
480
480
  cp.emit = function(name, arg1) {
481
481
  if (name === "exit") {
482
- const err = verifyENOENT(arg1, parsed, "spawn");
482
+ const err = verifyENOENT(arg1, parsed);
483
483
  if (err) {
484
484
  return originalEmit.call(cp, "error", err);
485
485
  }
@@ -1263,6 +1263,7 @@ var require_re = __commonJS({
1263
1263
  var re = exports.re = [];
1264
1264
  var safeRe = exports.safeRe = [];
1265
1265
  var src = exports.src = [];
1266
+ var safeSrc = exports.safeSrc = [];
1266
1267
  var t = exports.t = {};
1267
1268
  var R = 0;
1268
1269
  var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
@@ -1283,6 +1284,7 @@ var require_re = __commonJS({
1283
1284
  debug2(name, index, value);
1284
1285
  t[name] = index;
1285
1286
  src[index] = value;
1287
+ safeSrc[index] = safe;
1286
1288
  re[index] = new RegExp(value, isGlobal ? "g" : void 0);
1287
1289
  safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
1288
1290
  };
@@ -1379,7 +1381,7 @@ var require_semver = __commonJS({
1379
1381
  "node_modules/semver/classes/semver.js"(exports, module) {
1380
1382
  var debug2 = require_debug();
1381
1383
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
1382
- var { safeRe: re, t } = require_re();
1384
+ var { safeRe: re, safeSrc: src, t } = require_re();
1383
1385
  var parseOptions = require_parse_options();
1384
1386
  var { compareIdentifiers } = require_identifiers();
1385
1387
  var SemVer = class _SemVer {
@@ -1519,6 +1521,18 @@ var require_semver = __commonJS({
1519
1521
  // preminor will bump the version up to the next minor release, and immediately
1520
1522
  // down to pre-release. premajor and prepatch work the same way.
1521
1523
  inc(release, identifier, identifierBase) {
1524
+ if (release.startsWith("pre")) {
1525
+ if (!identifier && identifierBase === false) {
1526
+ throw new Error("invalid increment argument: identifier is empty");
1527
+ }
1528
+ if (identifier) {
1529
+ const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`);
1530
+ const match2 = `-${identifier}`.match(r);
1531
+ if (!match2 || match2[1] !== identifier) {
1532
+ throw new Error(`invalid identifier: ${identifier}`);
1533
+ }
1534
+ }
1535
+ }
1522
1536
  switch (release) {
1523
1537
  case "premajor":
1524
1538
  this.prerelease.length = 0;
@@ -1546,6 +1560,12 @@ var require_semver = __commonJS({
1546
1560
  }
1547
1561
  this.inc("pre", identifier, identifierBase);
1548
1562
  break;
1563
+ case "release":
1564
+ if (this.prerelease.length === 0) {
1565
+ throw new Error(`version ${this.raw} is not a prerelease`);
1566
+ }
1567
+ this.prerelease.length = 0;
1568
+ break;
1549
1569
  case "major":
1550
1570
  if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
1551
1571
  this.major++;
@@ -1571,9 +1591,6 @@ var require_semver = __commonJS({
1571
1591
  // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
1572
1592
  case "pre": {
1573
1593
  const base = Number(identifierBase) ? 1 : 0;
1574
- if (!identifier && identifierBase === false) {
1575
- throw new Error("invalid increment argument: identifier is empty");
1576
- }
1577
1594
  if (this.prerelease.length === 0) {
1578
1595
  this.prerelease = [base];
1579
1596
  } else {
@@ -4694,7 +4711,7 @@ var require_pattern = __commonJS({
4694
4711
  "node_modules/fast-glob/out/utils/pattern.js"(exports) {
4695
4712
  "use strict";
4696
4713
  Object.defineProperty(exports, "__esModule", { value: true });
4697
- exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
4714
+ exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
4698
4715
  var path22 = __require("path");
4699
4716
  var globParent = require_glob_parent();
4700
4717
  var micromatch = require_micromatch();
@@ -4834,6 +4851,23 @@ var require_pattern = __commonJS({
4834
4851
  return pattern.replace(DOUBLE_SLASH_RE, "/");
4835
4852
  }
4836
4853
  exports.removeDuplicateSlashes = removeDuplicateSlashes;
4854
+ function partitionAbsoluteAndRelative(patterns) {
4855
+ const absolute = [];
4856
+ const relative = [];
4857
+ for (const pattern of patterns) {
4858
+ if (isAbsolute(pattern)) {
4859
+ absolute.push(pattern);
4860
+ } else {
4861
+ relative.push(pattern);
4862
+ }
4863
+ }
4864
+ return [absolute, relative];
4865
+ }
4866
+ exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
4867
+ function isAbsolute(pattern) {
4868
+ return path22.isAbsolute(pattern);
4869
+ }
4870
+ exports.isAbsolute = isAbsolute;
4837
4871
  }
4838
4872
  });
4839
4873
 
@@ -5920,17 +5954,19 @@ var require_queue = __commonJS({
5920
5954
  return p;
5921
5955
  }
5922
5956
  function drained() {
5923
- if (queue.idle()) {
5924
- return new Promise(function(resolve2) {
5925
- resolve2();
5926
- });
5927
- }
5928
- var previousDrain = queue.drain;
5929
5957
  var p = new Promise(function(resolve2) {
5930
- queue.drain = function() {
5931
- previousDrain();
5932
- resolve2();
5933
- };
5958
+ process.nextTick(function() {
5959
+ if (queue.idle()) {
5960
+ resolve2();
5961
+ } else {
5962
+ var previousDrain = queue.drain;
5963
+ queue.drain = function() {
5964
+ if (typeof previousDrain === "function") previousDrain();
5965
+ resolve2();
5966
+ queue.drain = previousDrain;
5967
+ };
5968
+ }
5969
+ });
5934
5970
  });
5935
5971
  return p;
5936
5972
  }
@@ -6628,11 +6664,19 @@ var require_entry = __commonJS({
6628
6664
  this.index = /* @__PURE__ */ new Map();
6629
6665
  }
6630
6666
  getFilter(positive, negative) {
6631
- const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
6632
- const negativeRe = utils.pattern.convertPatternsToRe(negative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }));
6633
- return (entry) => this._filter(entry, positiveRe, negativeRe);
6667
+ const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative);
6668
+ const patterns = {
6669
+ positive: {
6670
+ all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions)
6671
+ },
6672
+ negative: {
6673
+ absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })),
6674
+ relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }))
6675
+ }
6676
+ };
6677
+ return (entry) => this._filter(entry, patterns);
6634
6678
  }
6635
- _filter(entry, positiveRe, negativeRe) {
6679
+ _filter(entry, patterns) {
6636
6680
  const filepath = utils.path.removeLeadingDotSegment(entry.path);
6637
6681
  if (this._settings.unique && this._isDuplicateEntry(filepath)) {
6638
6682
  return false;
@@ -6640,11 +6684,7 @@ var require_entry = __commonJS({
6640
6684
  if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
6641
6685
  return false;
6642
6686
  }
6643
- if (this._isSkippedByAbsoluteNegativePatterns(filepath, negativeRe)) {
6644
- return false;
6645
- }
6646
- const isDirectory2 = entry.dirent.isDirectory();
6647
- const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory2) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory2);
6687
+ const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory());
6648
6688
  if (this._settings.unique && isMatched) {
6649
6689
  this._createIndexRecord(filepath);
6650
6690
  }
@@ -6662,14 +6702,32 @@ var require_entry = __commonJS({
6662
6702
  _onlyDirectoryFilter(entry) {
6663
6703
  return this._settings.onlyDirectories && !entry.dirent.isDirectory();
6664
6704
  }
6665
- _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
6666
- if (!this._settings.absolute) {
6705
+ _isMatchToPatternsSet(filepath, patterns, isDirectory2) {
6706
+ const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2);
6707
+ if (!isMatched) {
6708
+ return false;
6709
+ }
6710
+ const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2);
6711
+ if (isMatchedByRelativeNegative) {
6712
+ return false;
6713
+ }
6714
+ const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2);
6715
+ if (isMatchedByAbsoluteNegative) {
6667
6716
  return false;
6668
6717
  }
6669
- const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath);
6670
- return utils.pattern.matchAny(fullpath, patternsRe);
6718
+ return true;
6719
+ }
6720
+ _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) {
6721
+ if (patternsRe.length === 0) {
6722
+ return false;
6723
+ }
6724
+ const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath);
6725
+ return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2);
6671
6726
  }
6672
6727
  _isMatchToPatterns(filepath, patternsRe, isDirectory2) {
6728
+ if (patternsRe.length === 0) {
6729
+ return false;
6730
+ }
6673
6731
  const isMatched = utils.pattern.matchAny(filepath, patternsRe);
6674
6732
  if (!isMatched && isDirectory2) {
6675
6733
  return utils.pattern.matchAny(filepath + "/", patternsRe);
@@ -9067,7 +9125,7 @@ var require_hosts = __commonJS({
9067
9125
  "use strict";
9068
9126
  var maybeJoin = (...args) => args.every((arg) => arg) ? args.join("") : "";
9069
9127
  var maybeEncode = (arg) => arg ? encodeURIComponent(arg) : "";
9070
- var formatHashFragment = (f) => f.toLowerCase().replace(/^\W+|\/|\W+$/g, "").replace(/\W+/g, "-");
9128
+ var formatHashFragment = (f) => f.toLowerCase().replace(/^\W+/g, "").replace(/(?<!\W)\W+$/, "").replace(/\//g, "").replace(/\W+/g, "-");
9071
9129
  var defaults2 = {
9072
9130
  sshtemplate: ({ domain, user, project, committish }) => `git@${domain}:${user}/${project}.git${maybeJoin("#", committish)}`,
9073
9131
  sshurltemplate: ({ domain, user, project, committish }) => `git+ssh://git@${domain}/${user}/${project}.git${maybeJoin("#", committish)}`,
@@ -9585,13 +9643,12 @@ var require_diff = __commonJS({
9585
9643
  if (!lowVersion.patch && !lowVersion.minor) {
9586
9644
  return "major";
9587
9645
  }
9588
- if (highVersion.patch) {
9646
+ if (lowVersion.compareMain(highVersion) === 0) {
9647
+ if (lowVersion.minor && !lowVersion.patch) {
9648
+ return "minor";
9649
+ }
9589
9650
  return "patch";
9590
9651
  }
9591
- if (highVersion.minor) {
9592
- return "minor";
9593
- }
9594
- return "major";
9595
9652
  }
9596
9653
  const prefix = highHasPre ? "pre" : "";
9597
9654
  if (v1.major !== v2.major) {
@@ -11184,22 +11241,22 @@ var require_lib3 = __commonJS({
11184
11241
  var require_npa = __commonJS({
11185
11242
  "node_modules/npm-package-arg/lib/npa.js"(exports, module) {
11186
11243
  "use strict";
11187
- module.exports = npa2;
11188
- module.exports.resolve = resolve2;
11189
- module.exports.toPurl = toPurl;
11190
- module.exports.Result = Result;
11191
- var { URL: URL3 } = __require("url");
11244
+ var isWindows = process.platform === "win32";
11245
+ var { URL: URL3 } = __require("node:url");
11246
+ var path22 = isWindows ? __require("node:path/win32") : __require("node:path");
11247
+ var { homedir } = __require("node:os");
11192
11248
  var HostedGit = require_lib();
11193
11249
  var semver = require_semver2();
11194
- var path22 = global.FAKE_WINDOWS ? __require("path").win32 : __require("path");
11195
11250
  var validatePackageName = require_lib2();
11196
- var { homedir } = __require("os");
11197
11251
  var { log } = require_lib3();
11198
- var isWindows = process.platform === "win32" || global.FAKE_WINDOWS;
11199
11252
  var hasSlashes = isWindows ? /\\|[/]/ : /[/]/;
11200
11253
  var isURL = /^(?:git[+])?[a-z]+:/i;
11201
11254
  var isGit = /^[^@]+@[^:.]+\.[^:]+:.+$/i;
11202
- var isFilename = /[.](?:tgz|tar.gz|tar)$/i;
11255
+ var isFileType = /[.](?:tgz|tar.gz|tar)$/i;
11256
+ var isPortNumber = /:[0-9]+(\/|$)/i;
11257
+ var isWindowsFile = /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/;
11258
+ var isPosixFile = /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/;
11259
+ var defaultRegistry = "https://registry.npmjs.org";
11203
11260
  function npa2(arg, where) {
11204
11261
  let name;
11205
11262
  let spec;
@@ -11212,13 +11269,13 @@ var require_npa = __commonJS({
11212
11269
  return npa2(arg.raw, where || arg.where);
11213
11270
  }
11214
11271
  }
11215
- const nameEndsAt = arg[0] === "@" ? arg.slice(1).indexOf("@") + 1 : arg.indexOf("@");
11272
+ const nameEndsAt = arg.indexOf("@", 1);
11216
11273
  const namePart = nameEndsAt > 0 ? arg.slice(0, nameEndsAt) : arg;
11217
11274
  if (isURL.test(arg)) {
11218
11275
  spec = arg;
11219
11276
  } else if (isGit.test(arg)) {
11220
11277
  spec = `git+ssh://${arg}`;
11221
- } else if (namePart[0] !== "@" && (hasSlashes.test(namePart) || isFilename.test(namePart))) {
11278
+ } else if (!namePart.startsWith("@") && (hasSlashes.test(namePart) || isFileType.test(namePart))) {
11222
11279
  spec = arg;
11223
11280
  } else if (nameEndsAt > 0) {
11224
11281
  name = namePart;
@@ -11234,7 +11291,24 @@ var require_npa = __commonJS({
11234
11291
  }
11235
11292
  return resolve2(name, spec, where, arg);
11236
11293
  }
11237
- var isFilespec = isWindows ? /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ : /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/;
11294
+ function isFileSpec(spec) {
11295
+ if (!spec) {
11296
+ return false;
11297
+ }
11298
+ if (spec.toLowerCase().startsWith("file:")) {
11299
+ return true;
11300
+ }
11301
+ if (isWindows) {
11302
+ return isWindowsFile.test(spec);
11303
+ }
11304
+ return isPosixFile.test(spec);
11305
+ }
11306
+ function isAliasSpec(spec) {
11307
+ if (!spec) {
11308
+ return false;
11309
+ }
11310
+ return spec.toLowerCase().startsWith("npm:");
11311
+ }
11238
11312
  function resolve2(name, spec, where, arg) {
11239
11313
  const res = new Result({
11240
11314
  raw: arg,
@@ -11243,11 +11317,14 @@ var require_npa = __commonJS({
11243
11317
  fromArgument: arg != null
11244
11318
  });
11245
11319
  if (name) {
11246
- res.setName(name);
11320
+ res.name = name;
11247
11321
  }
11248
- if (spec && (isFilespec.test(spec) || /^file:/i.test(spec))) {
11322
+ if (!where) {
11323
+ where = process.cwd();
11324
+ }
11325
+ if (isFileSpec(spec)) {
11249
11326
  return fromFile(res, where);
11250
- } else if (spec && /^npm:/i.test(spec)) {
11327
+ } else if (isAliasSpec(spec)) {
11251
11328
  return fromAlias(res, where);
11252
11329
  }
11253
11330
  const hosted = HostedGit.fromUrl(spec, {
@@ -11258,13 +11335,12 @@ var require_npa = __commonJS({
11258
11335
  return fromHostedGit(res, hosted);
11259
11336
  } else if (spec && isURL.test(spec)) {
11260
11337
  return fromURL(res);
11261
- } else if (spec && (hasSlashes.test(spec) || isFilename.test(spec))) {
11338
+ } else if (spec && (hasSlashes.test(spec) || isFileType.test(spec))) {
11262
11339
  return fromFile(res, where);
11263
11340
  } else {
11264
11341
  return fromRegistry(res);
11265
11342
  }
11266
11343
  }
11267
- var defaultRegistry = "https://registry.npmjs.org";
11268
11344
  function toPurl(arg, reg = defaultRegistry) {
11269
11345
  const res = npa2(arg);
11270
11346
  if (res.type !== "version") {
@@ -11291,54 +11367,57 @@ var require_npa = __commonJS({
11291
11367
  err.code = "EINVALIDPURLTYPE";
11292
11368
  return err;
11293
11369
  }
11294
- function Result(opts) {
11295
- this.type = opts.type;
11296
- this.registry = opts.registry;
11297
- this.where = opts.where;
11298
- if (opts.raw == null) {
11299
- this.raw = opts.name ? opts.name + "@" + opts.rawSpec : opts.rawSpec;
11300
- } else {
11301
- this.raw = opts.raw;
11302
- }
11303
- this.name = void 0;
11304
- this.escapedName = void 0;
11305
- this.scope = void 0;
11306
- this.rawSpec = opts.rawSpec || "";
11307
- this.saveSpec = opts.saveSpec;
11308
- this.fetchSpec = opts.fetchSpec;
11309
- if (opts.name) {
11310
- this.setName(opts.name);
11311
- }
11312
- this.gitRange = opts.gitRange;
11313
- this.gitCommittish = opts.gitCommittish;
11314
- this.gitSubdir = opts.gitSubdir;
11315
- this.hosted = opts.hosted;
11316
- }
11317
- Result.prototype.setName = function(name) {
11318
- const valid = validatePackageName(name);
11319
- if (!valid.validForOldPackages) {
11320
- throw invalidPackageName(name, valid, this.raw);
11321
- }
11322
- this.name = name;
11323
- this.scope = name[0] === "@" ? name.slice(0, name.indexOf("/")) : void 0;
11324
- this.escapedName = name.replace("/", "%2f");
11325
- return this;
11326
- };
11327
- Result.prototype.toString = function() {
11328
- const full = [];
11329
- if (this.name != null && this.name !== "") {
11330
- full.push(this.name);
11370
+ var Result = class {
11371
+ constructor(opts) {
11372
+ this.type = opts.type;
11373
+ this.registry = opts.registry;
11374
+ this.where = opts.where;
11375
+ if (opts.raw == null) {
11376
+ this.raw = opts.name ? `${opts.name}@${opts.rawSpec}` : opts.rawSpec;
11377
+ } else {
11378
+ this.raw = opts.raw;
11379
+ }
11380
+ this.name = void 0;
11381
+ this.escapedName = void 0;
11382
+ this.scope = void 0;
11383
+ this.rawSpec = opts.rawSpec || "";
11384
+ this.saveSpec = opts.saveSpec;
11385
+ this.fetchSpec = opts.fetchSpec;
11386
+ if (opts.name) {
11387
+ this.setName(opts.name);
11388
+ }
11389
+ this.gitRange = opts.gitRange;
11390
+ this.gitCommittish = opts.gitCommittish;
11391
+ this.gitSubdir = opts.gitSubdir;
11392
+ this.hosted = opts.hosted;
11393
+ }
11394
+ // TODO move this to a getter/setter in a semver major
11395
+ setName(name) {
11396
+ const valid = validatePackageName(name);
11397
+ if (!valid.validForOldPackages) {
11398
+ throw invalidPackageName(name, valid, this.raw);
11399
+ }
11400
+ this.name = name;
11401
+ this.scope = name[0] === "@" ? name.slice(0, name.indexOf("/")) : void 0;
11402
+ this.escapedName = name.replace("/", "%2f");
11403
+ return this;
11331
11404
  }
11332
- const spec = this.saveSpec || this.fetchSpec || this.rawSpec;
11333
- if (spec != null && spec !== "") {
11334
- full.push(spec);
11405
+ toString() {
11406
+ const full = [];
11407
+ if (this.name != null && this.name !== "") {
11408
+ full.push(this.name);
11409
+ }
11410
+ const spec = this.saveSpec || this.fetchSpec || this.rawSpec;
11411
+ if (spec != null && spec !== "") {
11412
+ full.push(spec);
11413
+ }
11414
+ return full.length ? full.join("@") : this.raw;
11415
+ }
11416
+ toJSON() {
11417
+ const result = Object.assign({}, this);
11418
+ delete result.hosted;
11419
+ return result;
11335
11420
  }
11336
- return full.length ? full.join("@") : this.raw;
11337
- };
11338
- Result.prototype.toJSON = function() {
11339
- const result = Object.assign({}, this);
11340
- delete result.hosted;
11341
- return result;
11342
11421
  };
11343
11422
  function setGitAttrs(res, committish) {
11344
11423
  if (!committish) {
@@ -11377,20 +11456,50 @@ var require_npa = __commonJS({
11377
11456
  log.warn("npm-package-arg", `ignoring unknown key "${name}"`);
11378
11457
  }
11379
11458
  }
11380
- function fromFile(res, where) {
11381
- if (!where) {
11382
- where = process.cwd();
11459
+ var encodedPathChars = /* @__PURE__ */ new Map([
11460
+ ["\0", "%00"],
11461
+ [" ", "%09"],
11462
+ ["\n", "%0A"],
11463
+ ["\r", "%0D"],
11464
+ [" ", "%20"],
11465
+ ['"', "%22"],
11466
+ ["#", "%23"],
11467
+ ["%", "%25"],
11468
+ ["?", "%3F"],
11469
+ ["[", "%5B"],
11470
+ ["\\", isWindows ? "/" : "%5C"],
11471
+ ["]", "%5D"],
11472
+ ["^", "%5E"],
11473
+ ["|", "%7C"],
11474
+ ["~", "%7E"]
11475
+ ]);
11476
+ function pathToFileURL3(str2) {
11477
+ let result = "";
11478
+ for (let i2 = 0; i2 < str2.length; i2++) {
11479
+ result = `${result}${encodedPathChars.get(str2[i2]) ?? str2[i2]}`;
11480
+ }
11481
+ if (result.startsWith("file:")) {
11482
+ return result;
11383
11483
  }
11384
- res.type = isFilename.test(res.rawSpec) ? "file" : "directory";
11484
+ return `file:${result}`;
11485
+ }
11486
+ function fromFile(res, where) {
11487
+ res.type = isFileType.test(res.rawSpec) ? "file" : "directory";
11385
11488
  res.where = where;
11386
- let specUrl;
11489
+ let rawSpec = pathToFileURL3(res.rawSpec);
11490
+ if (rawSpec.startsWith("file:/")) {
11491
+ if (/^file:\/\/[^/]/.test(rawSpec)) {
11492
+ rawSpec = `file:/${rawSpec.slice(5)}`;
11493
+ }
11494
+ if (/^\/{1,3}\.\.?(\/|$)/.test(rawSpec.slice(5))) {
11495
+ rawSpec = rawSpec.replace(/^file:\/{1,3}/, "file:");
11496
+ }
11497
+ }
11387
11498
  let resolvedUrl;
11388
- const prefix = !/^file:/.test(res.rawSpec) ? "file:" : "";
11389
- const rawWithPrefix = prefix + res.rawSpec;
11390
- let rawNoPrefix = rawWithPrefix.replace(/^file:/, "");
11499
+ let specUrl;
11391
11500
  try {
11392
- resolvedUrl = new URL3(rawWithPrefix, `file://${path22.resolve(where)}/`);
11393
- specUrl = new URL3(rawWithPrefix);
11501
+ resolvedUrl = new URL3(rawSpec, `${pathToFileURL3(path22.resolve(where))}/`);
11502
+ specUrl = new URL3(rawSpec);
11394
11503
  } catch (originalError) {
11395
11504
  const er = new Error("Invalid file: URL, must comply with RFC 8089");
11396
11505
  throw Object.assign(er, {
@@ -11400,18 +11509,6 @@ var require_npa = __commonJS({
11400
11509
  originalError
11401
11510
  });
11402
11511
  }
11403
- if (resolvedUrl.host && resolvedUrl.host !== "localhost") {
11404
- const rawSpec = res.rawSpec.replace(/^file:\/\//, "file:///");
11405
- resolvedUrl = new URL3(rawSpec, `file://${path22.resolve(where)}/`);
11406
- specUrl = new URL3(rawSpec);
11407
- rawNoPrefix = rawSpec.replace(/^file:/, "");
11408
- }
11409
- if (/^\/{1,3}\.\.?(\/|$)/.test(rawNoPrefix)) {
11410
- const rawSpec = res.rawSpec.replace(/^file:\/{1,3}/, "file:");
11411
- resolvedUrl = new URL3(rawSpec, `file://${path22.resolve(where)}/`);
11412
- specUrl = new URL3(rawSpec);
11413
- rawNoPrefix = rawSpec.replace(/^file:/, "");
11414
- }
11415
11512
  let specPath = decodeURIComponent(specUrl.pathname);
11416
11513
  let resolvedPath = decodeURIComponent(resolvedUrl.pathname);
11417
11514
  if (isWindows) {
@@ -11421,12 +11518,16 @@ var require_npa = __commonJS({
11421
11518
  if (/^\/~(\/|$)/.test(specPath)) {
11422
11519
  res.saveSpec = `file:${specPath.substr(1)}`;
11423
11520
  resolvedPath = path22.resolve(homedir(), specPath.substr(3));
11424
- } else if (!path22.isAbsolute(rawNoPrefix)) {
11521
+ } else if (!path22.isAbsolute(rawSpec.slice(5))) {
11425
11522
  res.saveSpec = `file:${path22.relative(where, resolvedPath)}`;
11426
11523
  } else {
11427
11524
  res.saveSpec = `file:${path22.resolve(resolvedPath)}`;
11428
11525
  }
11429
11526
  res.fetchSpec = path22.resolve(where, resolvedPath);
11527
+ res.saveSpec = res.saveSpec.split("\\").join("/");
11528
+ if (res.saveSpec.startsWith("file://")) {
11529
+ res.saveSpec = `file:/${res.saveSpec.slice(7)}`;
11530
+ }
11430
11531
  return res;
11431
11532
  }
11432
11533
  function fromHostedGit(res, hosted) {
@@ -11447,7 +11548,7 @@ var require_npa = __commonJS({
11447
11548
  res.saveSpec = rawSpec;
11448
11549
  if (rawSpec.startsWith("git+ssh:")) {
11449
11550
  const matched = rawSpec.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i);
11450
- if (matched && !matched[1].match(/:[0-9]+\/?.*$/i)) {
11551
+ if (matched && !matched[1].match(isPortNumber)) {
11451
11552
  res.type = "git";
11452
11553
  setGitAttrs(res, matched[2]);
11453
11554
  res.fetchSpec = matched[1];
@@ -11524,6 +11625,10 @@ var require_npa = __commonJS({
11524
11625
  }
11525
11626
  return res;
11526
11627
  }
11628
+ module.exports = npa2;
11629
+ module.exports.resolve = resolve2;
11630
+ module.exports.toPurl = toPurl;
11631
+ module.exports.Result = Result;
11527
11632
  }
11528
11633
  });
11529
11634
 
@@ -11746,50 +11851,64 @@ var require_common3 = __commonJS({
11746
11851
  createDebug2.namespaces = namespaces;
11747
11852
  createDebug2.names = [];
11748
11853
  createDebug2.skips = [];
11749
- let i2;
11750
- const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
11751
- const len = split.length;
11752
- for (i2 = 0; i2 < len; i2++) {
11753
- if (!split[i2]) {
11754
- continue;
11854
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
11855
+ for (const ns of split) {
11856
+ if (ns[0] === "-") {
11857
+ createDebug2.skips.push(ns.slice(1));
11858
+ } else {
11859
+ createDebug2.names.push(ns);
11755
11860
  }
11756
- namespaces = split[i2].replace(/\*/g, ".*?");
11757
- if (namespaces[0] === "-") {
11758
- createDebug2.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
11861
+ }
11862
+ }
11863
+ function matchesTemplate(search, template) {
11864
+ let searchIndex = 0;
11865
+ let templateIndex = 0;
11866
+ let starIndex = -1;
11867
+ let matchIndex = 0;
11868
+ while (searchIndex < search.length) {
11869
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
11870
+ if (template[templateIndex] === "*") {
11871
+ starIndex = templateIndex;
11872
+ matchIndex = searchIndex;
11873
+ templateIndex++;
11874
+ } else {
11875
+ searchIndex++;
11876
+ templateIndex++;
11877
+ }
11878
+ } else if (starIndex !== -1) {
11879
+ templateIndex = starIndex + 1;
11880
+ matchIndex++;
11881
+ searchIndex = matchIndex;
11759
11882
  } else {
11760
- createDebug2.names.push(new RegExp("^" + namespaces + "$"));
11883
+ return false;
11761
11884
  }
11762
11885
  }
11886
+ while (templateIndex < template.length && template[templateIndex] === "*") {
11887
+ templateIndex++;
11888
+ }
11889
+ return templateIndex === template.length;
11763
11890
  }
11764
11891
  function disable() {
11765
11892
  const namespaces = [
11766
- ...createDebug2.names.map(toNamespace),
11767
- ...createDebug2.skips.map(toNamespace).map((namespace) => "-" + namespace)
11893
+ ...createDebug2.names,
11894
+ ...createDebug2.skips.map((namespace) => "-" + namespace)
11768
11895
  ].join(",");
11769
11896
  createDebug2.enable("");
11770
11897
  return namespaces;
11771
11898
  }
11772
11899
  function enabled(name) {
11773
- if (name[name.length - 1] === "*") {
11774
- return true;
11775
- }
11776
- let i2;
11777
- let len;
11778
- for (i2 = 0, len = createDebug2.skips.length; i2 < len; i2++) {
11779
- if (createDebug2.skips[i2].test(name)) {
11900
+ for (const skip of createDebug2.skips) {
11901
+ if (matchesTemplate(name, skip)) {
11780
11902
  return false;
11781
11903
  }
11782
11904
  }
11783
- for (i2 = 0, len = createDebug2.names.length; i2 < len; i2++) {
11784
- if (createDebug2.names[i2].test(name)) {
11905
+ for (const ns of createDebug2.names) {
11906
+ if (matchesTemplate(name, ns)) {
11785
11907
  return true;
11786
11908
  }
11787
11909
  }
11788
11910
  return false;
11789
11911
  }
11790
- function toNamespace(regexp) {
11791
- return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
11792
- }
11793
11912
  function coerce(val) {
11794
11913
  if (val instanceof Error) {
11795
11914
  return val.stack || val.message;
@@ -11980,12 +12099,11 @@ var require_browser = __commonJS({
11980
12099
  var require_has_flag = __commonJS({
11981
12100
  "node_modules/has-flag/index.js"(exports, module) {
11982
12101
  "use strict";
11983
- module.exports = (flag, argv) => {
11984
- argv = argv || process.argv;
12102
+ module.exports = (flag, argv = process.argv) => {
11985
12103
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
11986
- const pos = argv.indexOf(prefix + flag);
11987
- const terminatorPos = argv.indexOf("--");
11988
- return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
12104
+ const position = argv.indexOf(prefix + flag);
12105
+ const terminatorPosition = argv.indexOf("--");
12106
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
11989
12107
  };
11990
12108
  }
11991
12109
  });
@@ -11995,16 +12113,23 @@ var require_supports_color = __commonJS({
11995
12113
  "node_modules/supports-color/index.js"(exports, module) {
11996
12114
  "use strict";
11997
12115
  var os3 = __require("os");
12116
+ var tty3 = __require("tty");
11998
12117
  var hasFlag = require_has_flag();
11999
- var env = process.env;
12118
+ var { env } = process;
12000
12119
  var forceColor;
12001
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
12002
- forceColor = false;
12120
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
12121
+ forceColor = 0;
12003
12122
  } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
12004
- forceColor = true;
12123
+ forceColor = 1;
12005
12124
  }
12006
12125
  if ("FORCE_COLOR" in env) {
12007
- forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
12126
+ if (env.FORCE_COLOR === "true") {
12127
+ forceColor = 1;
12128
+ } else if (env.FORCE_COLOR === "false") {
12129
+ forceColor = 0;
12130
+ } else {
12131
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
12132
+ }
12008
12133
  }
12009
12134
  function translateLevel(level) {
12010
12135
  if (level === 0) {
@@ -12017,8 +12142,8 @@ var require_supports_color = __commonJS({
12017
12142
  has16m: level >= 3
12018
12143
  };
12019
12144
  }
12020
- function supportsColor(stream) {
12021
- if (forceColor === false) {
12145
+ function supportsColor(haveStream, streamIsTTY) {
12146
+ if (forceColor === 0) {
12022
12147
  return 0;
12023
12148
  }
12024
12149
  if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
@@ -12027,19 +12152,22 @@ var require_supports_color = __commonJS({
12027
12152
  if (hasFlag("color=256")) {
12028
12153
  return 2;
12029
12154
  }
12030
- if (stream && !stream.isTTY && forceColor !== true) {
12155
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
12031
12156
  return 0;
12032
12157
  }
12033
- const min = forceColor ? 1 : 0;
12158
+ const min = forceColor || 0;
12159
+ if (env.TERM === "dumb") {
12160
+ return min;
12161
+ }
12034
12162
  if (process.platform === "win32") {
12035
12163
  const osRelease = os3.release().split(".");
12036
- if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
12164
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
12037
12165
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
12038
12166
  }
12039
12167
  return 1;
12040
12168
  }
12041
12169
  if ("CI" in env) {
12042
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
12170
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
12043
12171
  return 1;
12044
12172
  }
12045
12173
  return min;
@@ -12068,19 +12196,16 @@ var require_supports_color = __commonJS({
12068
12196
  if ("COLORTERM" in env) {
12069
12197
  return 1;
12070
12198
  }
12071
- if (env.TERM === "dumb") {
12072
- return min;
12073
- }
12074
12199
  return min;
12075
12200
  }
12076
12201
  function getSupportLevel(stream) {
12077
- const level = supportsColor(stream);
12202
+ const level = supportsColor(stream, stream && stream.isTTY);
12078
12203
  return translateLevel(level);
12079
12204
  }
12080
12205
  module.exports = {
12081
12206
  supportsColor: getSupportLevel,
12082
- stdout: getSupportLevel(process.stdout),
12083
- stderr: getSupportLevel(process.stderr)
12207
+ stdout: translateLevel(supportsColor(true, tty3.isatty(1))),
12208
+ stderr: translateLevel(supportsColor(true, tty3.isatty(2)))
12084
12209
  };
12085
12210
  }
12086
12211
  });
@@ -12270,6 +12395,78 @@ var require_src = __commonJS({
12270
12395
  }
12271
12396
  });
12272
12397
 
12398
+ // node_modules/picocolors/picocolors.js
12399
+ var require_picocolors = __commonJS({
12400
+ "node_modules/picocolors/picocolors.js"(exports, module) {
12401
+ var p = process || {};
12402
+ var argv = p.argv || [];
12403
+ var env = p.env || {};
12404
+ var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
12405
+ var formatter = (open, close, replace = open) => (input) => {
12406
+ let string = "" + input, index = string.indexOf(close, open.length);
12407
+ return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
12408
+ };
12409
+ var replaceClose = (string, close, replace, index) => {
12410
+ let result = "", cursor = 0;
12411
+ do {
12412
+ result += string.substring(cursor, index) + replace;
12413
+ cursor = index + close.length;
12414
+ index = string.indexOf(close, cursor);
12415
+ } while (~index);
12416
+ return result + string.substring(cursor);
12417
+ };
12418
+ var createColors = (enabled = isColorSupported) => {
12419
+ let f = enabled ? formatter : () => String;
12420
+ return {
12421
+ isColorSupported: enabled,
12422
+ reset: f("\x1B[0m", "\x1B[0m"),
12423
+ bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
12424
+ dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
12425
+ italic: f("\x1B[3m", "\x1B[23m"),
12426
+ underline: f("\x1B[4m", "\x1B[24m"),
12427
+ inverse: f("\x1B[7m", "\x1B[27m"),
12428
+ hidden: f("\x1B[8m", "\x1B[28m"),
12429
+ strikethrough: f("\x1B[9m", "\x1B[29m"),
12430
+ black: f("\x1B[30m", "\x1B[39m"),
12431
+ red: f("\x1B[31m", "\x1B[39m"),
12432
+ green: f("\x1B[32m", "\x1B[39m"),
12433
+ yellow: f("\x1B[33m", "\x1B[39m"),
12434
+ blue: f("\x1B[34m", "\x1B[39m"),
12435
+ magenta: f("\x1B[35m", "\x1B[39m"),
12436
+ cyan: f("\x1B[36m", "\x1B[39m"),
12437
+ white: f("\x1B[37m", "\x1B[39m"),
12438
+ gray: f("\x1B[90m", "\x1B[39m"),
12439
+ bgBlack: f("\x1B[40m", "\x1B[49m"),
12440
+ bgRed: f("\x1B[41m", "\x1B[49m"),
12441
+ bgGreen: f("\x1B[42m", "\x1B[49m"),
12442
+ bgYellow: f("\x1B[43m", "\x1B[49m"),
12443
+ bgBlue: f("\x1B[44m", "\x1B[49m"),
12444
+ bgMagenta: f("\x1B[45m", "\x1B[49m"),
12445
+ bgCyan: f("\x1B[46m", "\x1B[49m"),
12446
+ bgWhite: f("\x1B[47m", "\x1B[49m"),
12447
+ blackBright: f("\x1B[90m", "\x1B[39m"),
12448
+ redBright: f("\x1B[91m", "\x1B[39m"),
12449
+ greenBright: f("\x1B[92m", "\x1B[39m"),
12450
+ yellowBright: f("\x1B[93m", "\x1B[39m"),
12451
+ blueBright: f("\x1B[94m", "\x1B[39m"),
12452
+ magentaBright: f("\x1B[95m", "\x1B[39m"),
12453
+ cyanBright: f("\x1B[96m", "\x1B[39m"),
12454
+ whiteBright: f("\x1B[97m", "\x1B[39m"),
12455
+ bgBlackBright: f("\x1B[100m", "\x1B[49m"),
12456
+ bgRedBright: f("\x1B[101m", "\x1B[49m"),
12457
+ bgGreenBright: f("\x1B[102m", "\x1B[49m"),
12458
+ bgYellowBright: f("\x1B[103m", "\x1B[49m"),
12459
+ bgBlueBright: f("\x1B[104m", "\x1B[49m"),
12460
+ bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
12461
+ bgCyanBright: f("\x1B[106m", "\x1B[49m"),
12462
+ bgWhiteBright: f("\x1B[107m", "\x1B[49m")
12463
+ };
12464
+ };
12465
+ module.exports = createColors();
12466
+ module.exports.createColors = createColors;
12467
+ }
12468
+ });
12469
+
12273
12470
  // node_modules/js-tokens/index.js
12274
12471
  var require_js_tokens = __commonJS({
12275
12472
  "node_modules/js-tokens/index.js"(exports) {
@@ -12463,1568 +12660,49 @@ var require_lib4 = __commonJS({
12463
12660
  }
12464
12661
  });
12465
12662
 
12466
- // node_modules/picocolors/picocolors.js
12467
- var require_picocolors = __commonJS({
12468
- "node_modules/picocolors/picocolors.js"(exports, module) {
12469
- var argv = process.argv || [];
12470
- var env = process.env;
12471
- var isColorSupported = !("NO_COLOR" in env || argv.includes("--no-color")) && ("FORCE_COLOR" in env || argv.includes("--color") || process.platform === "win32" || __require != null && __require("tty").isatty(1) && env.TERM !== "dumb" || "CI" in env);
12472
- var formatter = (open, close, replace = open) => (input) => {
12473
- let string = "" + input;
12474
- let index = string.indexOf(close, open.length);
12475
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
12476
- };
12477
- var replaceClose = (string, close, replace, index) => {
12478
- let result = "";
12479
- let cursor = 0;
12480
- do {
12481
- result += string.substring(cursor, index) + replace;
12482
- cursor = index + close.length;
12483
- index = string.indexOf(close, cursor);
12484
- } while (~index);
12485
- return result + string.substring(cursor);
12486
- };
12487
- var createColors = (enabled = isColorSupported) => {
12488
- let init = enabled ? formatter : () => String;
12489
- return {
12490
- isColorSupported: enabled,
12491
- reset: init("\x1B[0m", "\x1B[0m"),
12492
- bold: init("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
12493
- dim: init("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
12494
- italic: init("\x1B[3m", "\x1B[23m"),
12495
- underline: init("\x1B[4m", "\x1B[24m"),
12496
- inverse: init("\x1B[7m", "\x1B[27m"),
12497
- hidden: init("\x1B[8m", "\x1B[28m"),
12498
- strikethrough: init("\x1B[9m", "\x1B[29m"),
12499
- black: init("\x1B[30m", "\x1B[39m"),
12500
- red: init("\x1B[31m", "\x1B[39m"),
12501
- green: init("\x1B[32m", "\x1B[39m"),
12502
- yellow: init("\x1B[33m", "\x1B[39m"),
12503
- blue: init("\x1B[34m", "\x1B[39m"),
12504
- magenta: init("\x1B[35m", "\x1B[39m"),
12505
- cyan: init("\x1B[36m", "\x1B[39m"),
12506
- white: init("\x1B[37m", "\x1B[39m"),
12507
- gray: init("\x1B[90m", "\x1B[39m"),
12508
- bgBlack: init("\x1B[40m", "\x1B[49m"),
12509
- bgRed: init("\x1B[41m", "\x1B[49m"),
12510
- bgGreen: init("\x1B[42m", "\x1B[49m"),
12511
- bgYellow: init("\x1B[43m", "\x1B[49m"),
12512
- bgBlue: init("\x1B[44m", "\x1B[49m"),
12513
- bgMagenta: init("\x1B[45m", "\x1B[49m"),
12514
- bgCyan: init("\x1B[46m", "\x1B[49m"),
12515
- bgWhite: init("\x1B[47m", "\x1B[49m"),
12516
- blackBright: init("\x1B[90m", "\x1B[39m"),
12517
- redBright: init("\x1B[91m", "\x1B[39m"),
12518
- greenBright: init("\x1B[92m", "\x1B[39m"),
12519
- yellowBright: init("\x1B[93m", "\x1B[39m"),
12520
- blueBright: init("\x1B[94m", "\x1B[39m"),
12521
- magentaBright: init("\x1B[95m", "\x1B[39m"),
12522
- cyanBright: init("\x1B[96m", "\x1B[39m"),
12523
- whiteBright: init("\x1B[97m", "\x1B[39m"),
12524
- bgBlackBright: init("\x1B[100m", "\x1B[49m"),
12525
- bgRedBright: init("\x1B[101m", "\x1B[49m"),
12526
- bgGreenBright: init("\x1B[102m", "\x1B[49m"),
12527
- bgYellowBright: init("\x1B[103m", "\x1B[49m"),
12528
- bgBlueBright: init("\x1B[104m", "\x1B[49m"),
12529
- bgMagentaBright: init("\x1B[105m", "\x1B[49m"),
12530
- bgCyanBright: init("\x1B[106m", "\x1B[49m"),
12531
- bgWhiteBright: init("\x1B[107m", "\x1B[49m")
12532
- };
12533
- };
12534
- module.exports = createColors();
12535
- module.exports.createColors = createColors;
12536
- }
12537
- });
12538
-
12539
- // node_modules/escape-string-regexp/index.js
12540
- var require_escape_string_regexp = __commonJS({
12541
- "node_modules/escape-string-regexp/index.js"(exports, module) {
12542
- "use strict";
12543
- var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
12544
- module.exports = function(str2) {
12545
- if (typeof str2 !== "string") {
12546
- throw new TypeError("Expected a string");
12547
- }
12548
- return str2.replace(matchOperatorsRe, "\\$&");
12549
- };
12550
- }
12551
- });
12552
-
12553
- // node_modules/color-name/index.js
12554
- var require_color_name = __commonJS({
12555
- "node_modules/color-name/index.js"(exports, module) {
12556
- "use strict";
12557
- module.exports = {
12558
- "aliceblue": [240, 248, 255],
12559
- "antiquewhite": [250, 235, 215],
12560
- "aqua": [0, 255, 255],
12561
- "aquamarine": [127, 255, 212],
12562
- "azure": [240, 255, 255],
12563
- "beige": [245, 245, 220],
12564
- "bisque": [255, 228, 196],
12565
- "black": [0, 0, 0],
12566
- "blanchedalmond": [255, 235, 205],
12567
- "blue": [0, 0, 255],
12568
- "blueviolet": [138, 43, 226],
12569
- "brown": [165, 42, 42],
12570
- "burlywood": [222, 184, 135],
12571
- "cadetblue": [95, 158, 160],
12572
- "chartreuse": [127, 255, 0],
12573
- "chocolate": [210, 105, 30],
12574
- "coral": [255, 127, 80],
12575
- "cornflowerblue": [100, 149, 237],
12576
- "cornsilk": [255, 248, 220],
12577
- "crimson": [220, 20, 60],
12578
- "cyan": [0, 255, 255],
12579
- "darkblue": [0, 0, 139],
12580
- "darkcyan": [0, 139, 139],
12581
- "darkgoldenrod": [184, 134, 11],
12582
- "darkgray": [169, 169, 169],
12583
- "darkgreen": [0, 100, 0],
12584
- "darkgrey": [169, 169, 169],
12585
- "darkkhaki": [189, 183, 107],
12586
- "darkmagenta": [139, 0, 139],
12587
- "darkolivegreen": [85, 107, 47],
12588
- "darkorange": [255, 140, 0],
12589
- "darkorchid": [153, 50, 204],
12590
- "darkred": [139, 0, 0],
12591
- "darksalmon": [233, 150, 122],
12592
- "darkseagreen": [143, 188, 143],
12593
- "darkslateblue": [72, 61, 139],
12594
- "darkslategray": [47, 79, 79],
12595
- "darkslategrey": [47, 79, 79],
12596
- "darkturquoise": [0, 206, 209],
12597
- "darkviolet": [148, 0, 211],
12598
- "deeppink": [255, 20, 147],
12599
- "deepskyblue": [0, 191, 255],
12600
- "dimgray": [105, 105, 105],
12601
- "dimgrey": [105, 105, 105],
12602
- "dodgerblue": [30, 144, 255],
12603
- "firebrick": [178, 34, 34],
12604
- "floralwhite": [255, 250, 240],
12605
- "forestgreen": [34, 139, 34],
12606
- "fuchsia": [255, 0, 255],
12607
- "gainsboro": [220, 220, 220],
12608
- "ghostwhite": [248, 248, 255],
12609
- "gold": [255, 215, 0],
12610
- "goldenrod": [218, 165, 32],
12611
- "gray": [128, 128, 128],
12612
- "green": [0, 128, 0],
12613
- "greenyellow": [173, 255, 47],
12614
- "grey": [128, 128, 128],
12615
- "honeydew": [240, 255, 240],
12616
- "hotpink": [255, 105, 180],
12617
- "indianred": [205, 92, 92],
12618
- "indigo": [75, 0, 130],
12619
- "ivory": [255, 255, 240],
12620
- "khaki": [240, 230, 140],
12621
- "lavender": [230, 230, 250],
12622
- "lavenderblush": [255, 240, 245],
12623
- "lawngreen": [124, 252, 0],
12624
- "lemonchiffon": [255, 250, 205],
12625
- "lightblue": [173, 216, 230],
12626
- "lightcoral": [240, 128, 128],
12627
- "lightcyan": [224, 255, 255],
12628
- "lightgoldenrodyellow": [250, 250, 210],
12629
- "lightgray": [211, 211, 211],
12630
- "lightgreen": [144, 238, 144],
12631
- "lightgrey": [211, 211, 211],
12632
- "lightpink": [255, 182, 193],
12633
- "lightsalmon": [255, 160, 122],
12634
- "lightseagreen": [32, 178, 170],
12635
- "lightskyblue": [135, 206, 250],
12636
- "lightslategray": [119, 136, 153],
12637
- "lightslategrey": [119, 136, 153],
12638
- "lightsteelblue": [176, 196, 222],
12639
- "lightyellow": [255, 255, 224],
12640
- "lime": [0, 255, 0],
12641
- "limegreen": [50, 205, 50],
12642
- "linen": [250, 240, 230],
12643
- "magenta": [255, 0, 255],
12644
- "maroon": [128, 0, 0],
12645
- "mediumaquamarine": [102, 205, 170],
12646
- "mediumblue": [0, 0, 205],
12647
- "mediumorchid": [186, 85, 211],
12648
- "mediumpurple": [147, 112, 219],
12649
- "mediumseagreen": [60, 179, 113],
12650
- "mediumslateblue": [123, 104, 238],
12651
- "mediumspringgreen": [0, 250, 154],
12652
- "mediumturquoise": [72, 209, 204],
12653
- "mediumvioletred": [199, 21, 133],
12654
- "midnightblue": [25, 25, 112],
12655
- "mintcream": [245, 255, 250],
12656
- "mistyrose": [255, 228, 225],
12657
- "moccasin": [255, 228, 181],
12658
- "navajowhite": [255, 222, 173],
12659
- "navy": [0, 0, 128],
12660
- "oldlace": [253, 245, 230],
12661
- "olive": [128, 128, 0],
12662
- "olivedrab": [107, 142, 35],
12663
- "orange": [255, 165, 0],
12664
- "orangered": [255, 69, 0],
12665
- "orchid": [218, 112, 214],
12666
- "palegoldenrod": [238, 232, 170],
12667
- "palegreen": [152, 251, 152],
12668
- "paleturquoise": [175, 238, 238],
12669
- "palevioletred": [219, 112, 147],
12670
- "papayawhip": [255, 239, 213],
12671
- "peachpuff": [255, 218, 185],
12672
- "peru": [205, 133, 63],
12673
- "pink": [255, 192, 203],
12674
- "plum": [221, 160, 221],
12675
- "powderblue": [176, 224, 230],
12676
- "purple": [128, 0, 128],
12677
- "rebeccapurple": [102, 51, 153],
12678
- "red": [255, 0, 0],
12679
- "rosybrown": [188, 143, 143],
12680
- "royalblue": [65, 105, 225],
12681
- "saddlebrown": [139, 69, 19],
12682
- "salmon": [250, 128, 114],
12683
- "sandybrown": [244, 164, 96],
12684
- "seagreen": [46, 139, 87],
12685
- "seashell": [255, 245, 238],
12686
- "sienna": [160, 82, 45],
12687
- "silver": [192, 192, 192],
12688
- "skyblue": [135, 206, 235],
12689
- "slateblue": [106, 90, 205],
12690
- "slategray": [112, 128, 144],
12691
- "slategrey": [112, 128, 144],
12692
- "snow": [255, 250, 250],
12693
- "springgreen": [0, 255, 127],
12694
- "steelblue": [70, 130, 180],
12695
- "tan": [210, 180, 140],
12696
- "teal": [0, 128, 128],
12697
- "thistle": [216, 191, 216],
12698
- "tomato": [255, 99, 71],
12699
- "turquoise": [64, 224, 208],
12700
- "violet": [238, 130, 238],
12701
- "wheat": [245, 222, 179],
12702
- "white": [255, 255, 255],
12703
- "whitesmoke": [245, 245, 245],
12704
- "yellow": [255, 255, 0],
12705
- "yellowgreen": [154, 205, 50]
12706
- };
12707
- }
12708
- });
12709
-
12710
- // node_modules/color-convert/conversions.js
12711
- var require_conversions = __commonJS({
12712
- "node_modules/color-convert/conversions.js"(exports, module) {
12713
- var cssKeywords = require_color_name();
12714
- var reverseKeywords = {};
12715
- for (key in cssKeywords) {
12716
- if (cssKeywords.hasOwnProperty(key)) {
12717
- reverseKeywords[cssKeywords[key]] = key;
12718
- }
12719
- }
12720
- var key;
12721
- var convert = module.exports = {
12722
- rgb: { channels: 3, labels: "rgb" },
12723
- hsl: { channels: 3, labels: "hsl" },
12724
- hsv: { channels: 3, labels: "hsv" },
12725
- hwb: { channels: 3, labels: "hwb" },
12726
- cmyk: { channels: 4, labels: "cmyk" },
12727
- xyz: { channels: 3, labels: "xyz" },
12728
- lab: { channels: 3, labels: "lab" },
12729
- lch: { channels: 3, labels: "lch" },
12730
- hex: { channels: 1, labels: ["hex"] },
12731
- keyword: { channels: 1, labels: ["keyword"] },
12732
- ansi16: { channels: 1, labels: ["ansi16"] },
12733
- ansi256: { channels: 1, labels: ["ansi256"] },
12734
- hcg: { channels: 3, labels: ["h", "c", "g"] },
12735
- apple: { channels: 3, labels: ["r16", "g16", "b16"] },
12736
- gray: { channels: 1, labels: ["gray"] }
12737
- };
12738
- for (model in convert) {
12739
- if (convert.hasOwnProperty(model)) {
12740
- if (!("channels" in convert[model])) {
12741
- throw new Error("missing channels property: " + model);
12742
- }
12743
- if (!("labels" in convert[model])) {
12744
- throw new Error("missing channel labels property: " + model);
12745
- }
12746
- if (convert[model].labels.length !== convert[model].channels) {
12747
- throw new Error("channel and label counts mismatch: " + model);
12748
- }
12749
- channels = convert[model].channels;
12750
- labels = convert[model].labels;
12751
- delete convert[model].channels;
12752
- delete convert[model].labels;
12753
- Object.defineProperty(convert[model], "channels", { value: channels });
12754
- Object.defineProperty(convert[model], "labels", { value: labels });
12755
- }
12756
- }
12757
- var channels;
12758
- var labels;
12759
- var model;
12760
- convert.rgb.hsl = function(rgb) {
12761
- var r = rgb[0] / 255;
12762
- var g = rgb[1] / 255;
12763
- var b = rgb[2] / 255;
12764
- var min = Math.min(r, g, b);
12765
- var max = Math.max(r, g, b);
12766
- var delta = max - min;
12767
- var h2;
12768
- var s;
12769
- var l;
12770
- if (max === min) {
12771
- h2 = 0;
12772
- } else if (r === max) {
12773
- h2 = (g - b) / delta;
12774
- } else if (g === max) {
12775
- h2 = 2 + (b - r) / delta;
12776
- } else if (b === max) {
12777
- h2 = 4 + (r - g) / delta;
12778
- }
12779
- h2 = Math.min(h2 * 60, 360);
12780
- if (h2 < 0) {
12781
- h2 += 360;
12782
- }
12783
- l = (min + max) / 2;
12784
- if (max === min) {
12785
- s = 0;
12786
- } else if (l <= 0.5) {
12787
- s = delta / (max + min);
12788
- } else {
12789
- s = delta / (2 - max - min);
12790
- }
12791
- return [h2, s * 100, l * 100];
12792
- };
12793
- convert.rgb.hsv = function(rgb) {
12794
- var rdif;
12795
- var gdif;
12796
- var bdif;
12797
- var h2;
12798
- var s;
12799
- var r = rgb[0] / 255;
12800
- var g = rgb[1] / 255;
12801
- var b = rgb[2] / 255;
12802
- var v = Math.max(r, g, b);
12803
- var diff = v - Math.min(r, g, b);
12804
- var diffc = function(c3) {
12805
- return (v - c3) / 6 / diff + 1 / 2;
12806
- };
12807
- if (diff === 0) {
12808
- h2 = s = 0;
12809
- } else {
12810
- s = diff / v;
12811
- rdif = diffc(r);
12812
- gdif = diffc(g);
12813
- bdif = diffc(b);
12814
- if (r === v) {
12815
- h2 = bdif - gdif;
12816
- } else if (g === v) {
12817
- h2 = 1 / 3 + rdif - bdif;
12818
- } else if (b === v) {
12819
- h2 = 2 / 3 + gdif - rdif;
12820
- }
12821
- if (h2 < 0) {
12822
- h2 += 1;
12823
- } else if (h2 > 1) {
12824
- h2 -= 1;
12825
- }
12826
- }
12827
- return [
12828
- h2 * 360,
12829
- s * 100,
12830
- v * 100
12831
- ];
12832
- };
12833
- convert.rgb.hwb = function(rgb) {
12834
- var r = rgb[0];
12835
- var g = rgb[1];
12836
- var b = rgb[2];
12837
- var h2 = convert.rgb.hsl(rgb)[0];
12838
- var w = 1 / 255 * Math.min(r, Math.min(g, b));
12839
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
12840
- return [h2, w * 100, b * 100];
12841
- };
12842
- convert.rgb.cmyk = function(rgb) {
12843
- var r = rgb[0] / 255;
12844
- var g = rgb[1] / 255;
12845
- var b = rgb[2] / 255;
12846
- var c3;
12847
- var m;
12848
- var y;
12849
- var k;
12850
- k = Math.min(1 - r, 1 - g, 1 - b);
12851
- c3 = (1 - r - k) / (1 - k) || 0;
12852
- m = (1 - g - k) / (1 - k) || 0;
12853
- y = (1 - b - k) / (1 - k) || 0;
12854
- return [c3 * 100, m * 100, y * 100, k * 100];
12855
- };
12856
- function comparativeDistance(x, y) {
12857
- return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
12858
- }
12859
- convert.rgb.keyword = function(rgb) {
12860
- var reversed = reverseKeywords[rgb];
12861
- if (reversed) {
12862
- return reversed;
12863
- }
12864
- var currentClosestDistance = Infinity;
12865
- var currentClosestKeyword;
12866
- for (var keyword in cssKeywords) {
12867
- if (cssKeywords.hasOwnProperty(keyword)) {
12868
- var value = cssKeywords[keyword];
12869
- var distance = comparativeDistance(rgb, value);
12870
- if (distance < currentClosestDistance) {
12871
- currentClosestDistance = distance;
12872
- currentClosestKeyword = keyword;
12873
- }
12874
- }
12875
- }
12876
- return currentClosestKeyword;
12877
- };
12878
- convert.keyword.rgb = function(keyword) {
12879
- return cssKeywords[keyword];
12880
- };
12881
- convert.rgb.xyz = function(rgb) {
12882
- var r = rgb[0] / 255;
12883
- var g = rgb[1] / 255;
12884
- var b = rgb[2] / 255;
12885
- r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
12886
- g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
12887
- b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
12888
- var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
12889
- var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
12890
- var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
12891
- return [x * 100, y * 100, z * 100];
12892
- };
12893
- convert.rgb.lab = function(rgb) {
12894
- var xyz = convert.rgb.xyz(rgb);
12895
- var x = xyz[0];
12896
- var y = xyz[1];
12897
- var z = xyz[2];
12898
- var l;
12899
- var a2;
12900
- var b;
12901
- x /= 95.047;
12902
- y /= 100;
12903
- z /= 108.883;
12904
- x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
12905
- y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
12906
- z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
12907
- l = 116 * y - 16;
12908
- a2 = 500 * (x - y);
12909
- b = 200 * (y - z);
12910
- return [l, a2, b];
12911
- };
12912
- convert.hsl.rgb = function(hsl) {
12913
- var h2 = hsl[0] / 360;
12914
- var s = hsl[1] / 100;
12915
- var l = hsl[2] / 100;
12916
- var t1;
12917
- var t2;
12918
- var t3;
12919
- var rgb;
12920
- var val;
12921
- if (s === 0) {
12922
- val = l * 255;
12923
- return [val, val, val];
12924
- }
12925
- if (l < 0.5) {
12926
- t2 = l * (1 + s);
12927
- } else {
12928
- t2 = l + s - l * s;
12929
- }
12930
- t1 = 2 * l - t2;
12931
- rgb = [0, 0, 0];
12932
- for (var i2 = 0; i2 < 3; i2++) {
12933
- t3 = h2 + 1 / 3 * -(i2 - 1);
12934
- if (t3 < 0) {
12935
- t3++;
12936
- }
12937
- if (t3 > 1) {
12938
- t3--;
12939
- }
12940
- if (6 * t3 < 1) {
12941
- val = t1 + (t2 - t1) * 6 * t3;
12942
- } else if (2 * t3 < 1) {
12943
- val = t2;
12944
- } else if (3 * t3 < 2) {
12945
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
12946
- } else {
12947
- val = t1;
12948
- }
12949
- rgb[i2] = val * 255;
12950
- }
12951
- return rgb;
12952
- };
12953
- convert.hsl.hsv = function(hsl) {
12954
- var h2 = hsl[0];
12955
- var s = hsl[1] / 100;
12956
- var l = hsl[2] / 100;
12957
- var smin = s;
12958
- var lmin = Math.max(l, 0.01);
12959
- var sv;
12960
- var v;
12961
- l *= 2;
12962
- s *= l <= 1 ? l : 2 - l;
12963
- smin *= lmin <= 1 ? lmin : 2 - lmin;
12964
- v = (l + s) / 2;
12965
- sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
12966
- return [h2, sv * 100, v * 100];
12967
- };
12968
- convert.hsv.rgb = function(hsv) {
12969
- var h2 = hsv[0] / 60;
12970
- var s = hsv[1] / 100;
12971
- var v = hsv[2] / 100;
12972
- var hi = Math.floor(h2) % 6;
12973
- var f = h2 - Math.floor(h2);
12974
- var p = 255 * v * (1 - s);
12975
- var q = 255 * v * (1 - s * f);
12976
- var t = 255 * v * (1 - s * (1 - f));
12977
- v *= 255;
12978
- switch (hi) {
12979
- case 0:
12980
- return [v, t, p];
12981
- case 1:
12982
- return [q, v, p];
12983
- case 2:
12984
- return [p, v, t];
12985
- case 3:
12986
- return [p, q, v];
12987
- case 4:
12988
- return [t, p, v];
12989
- case 5:
12990
- return [v, p, q];
12991
- }
12992
- };
12993
- convert.hsv.hsl = function(hsv) {
12994
- var h2 = hsv[0];
12995
- var s = hsv[1] / 100;
12996
- var v = hsv[2] / 100;
12997
- var vmin = Math.max(v, 0.01);
12998
- var lmin;
12999
- var sl;
13000
- var l;
13001
- l = (2 - s) * v;
13002
- lmin = (2 - s) * vmin;
13003
- sl = s * vmin;
13004
- sl /= lmin <= 1 ? lmin : 2 - lmin;
13005
- sl = sl || 0;
13006
- l /= 2;
13007
- return [h2, sl * 100, l * 100];
13008
- };
13009
- convert.hwb.rgb = function(hwb) {
13010
- var h2 = hwb[0] / 360;
13011
- var wh = hwb[1] / 100;
13012
- var bl = hwb[2] / 100;
13013
- var ratio = wh + bl;
13014
- var i2;
13015
- var v;
13016
- var f;
13017
- var n2;
13018
- if (ratio > 1) {
13019
- wh /= ratio;
13020
- bl /= ratio;
13021
- }
13022
- i2 = Math.floor(6 * h2);
13023
- v = 1 - bl;
13024
- f = 6 * h2 - i2;
13025
- if ((i2 & 1) !== 0) {
13026
- f = 1 - f;
13027
- }
13028
- n2 = wh + f * (v - wh);
13029
- var r;
13030
- var g;
13031
- var b;
13032
- switch (i2) {
13033
- default:
13034
- case 6:
13035
- case 0:
13036
- r = v;
13037
- g = n2;
13038
- b = wh;
13039
- break;
13040
- case 1:
13041
- r = n2;
13042
- g = v;
13043
- b = wh;
13044
- break;
13045
- case 2:
13046
- r = wh;
13047
- g = v;
13048
- b = n2;
13049
- break;
13050
- case 3:
13051
- r = wh;
13052
- g = n2;
13053
- b = v;
13054
- break;
13055
- case 4:
13056
- r = n2;
13057
- g = wh;
13058
- b = v;
13059
- break;
13060
- case 5:
13061
- r = v;
13062
- g = wh;
13063
- b = n2;
13064
- break;
13065
- }
13066
- return [r * 255, g * 255, b * 255];
13067
- };
13068
- convert.cmyk.rgb = function(cmyk) {
13069
- var c3 = cmyk[0] / 100;
13070
- var m = cmyk[1] / 100;
13071
- var y = cmyk[2] / 100;
13072
- var k = cmyk[3] / 100;
13073
- var r;
13074
- var g;
13075
- var b;
13076
- r = 1 - Math.min(1, c3 * (1 - k) + k);
13077
- g = 1 - Math.min(1, m * (1 - k) + k);
13078
- b = 1 - Math.min(1, y * (1 - k) + k);
13079
- return [r * 255, g * 255, b * 255];
13080
- };
13081
- convert.xyz.rgb = function(xyz) {
13082
- var x = xyz[0] / 100;
13083
- var y = xyz[1] / 100;
13084
- var z = xyz[2] / 100;
13085
- var r;
13086
- var g;
13087
- var b;
13088
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
13089
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
13090
- b = x * 0.0557 + y * -0.204 + z * 1.057;
13091
- r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92;
13092
- g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92;
13093
- b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92;
13094
- r = Math.min(Math.max(0, r), 1);
13095
- g = Math.min(Math.max(0, g), 1);
13096
- b = Math.min(Math.max(0, b), 1);
13097
- return [r * 255, g * 255, b * 255];
13098
- };
13099
- convert.xyz.lab = function(xyz) {
13100
- var x = xyz[0];
13101
- var y = xyz[1];
13102
- var z = xyz[2];
13103
- var l;
13104
- var a2;
13105
- var b;
13106
- x /= 95.047;
13107
- y /= 100;
13108
- z /= 108.883;
13109
- x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
13110
- y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
13111
- z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
13112
- l = 116 * y - 16;
13113
- a2 = 500 * (x - y);
13114
- b = 200 * (y - z);
13115
- return [l, a2, b];
13116
- };
13117
- convert.lab.xyz = function(lab) {
13118
- var l = lab[0];
13119
- var a2 = lab[1];
13120
- var b = lab[2];
13121
- var x;
13122
- var y;
13123
- var z;
13124
- y = (l + 16) / 116;
13125
- x = a2 / 500 + y;
13126
- z = y - b / 200;
13127
- var y2 = Math.pow(y, 3);
13128
- var x2 = Math.pow(x, 3);
13129
- var z2 = Math.pow(z, 3);
13130
- y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
13131
- x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
13132
- z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
13133
- x *= 95.047;
13134
- y *= 100;
13135
- z *= 108.883;
13136
- return [x, y, z];
13137
- };
13138
- convert.lab.lch = function(lab) {
13139
- var l = lab[0];
13140
- var a2 = lab[1];
13141
- var b = lab[2];
13142
- var hr;
13143
- var h2;
13144
- var c3;
13145
- hr = Math.atan2(b, a2);
13146
- h2 = hr * 360 / 2 / Math.PI;
13147
- if (h2 < 0) {
13148
- h2 += 360;
13149
- }
13150
- c3 = Math.sqrt(a2 * a2 + b * b);
13151
- return [l, c3, h2];
13152
- };
13153
- convert.lch.lab = function(lch) {
13154
- var l = lch[0];
13155
- var c3 = lch[1];
13156
- var h2 = lch[2];
13157
- var a2;
13158
- var b;
13159
- var hr;
13160
- hr = h2 / 360 * 2 * Math.PI;
13161
- a2 = c3 * Math.cos(hr);
13162
- b = c3 * Math.sin(hr);
13163
- return [l, a2, b];
13164
- };
13165
- convert.rgb.ansi16 = function(args) {
13166
- var r = args[0];
13167
- var g = args[1];
13168
- var b = args[2];
13169
- var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2];
13170
- value = Math.round(value / 50);
13171
- if (value === 0) {
13172
- return 30;
13173
- }
13174
- var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
13175
- if (value === 2) {
13176
- ansi += 60;
13177
- }
13178
- return ansi;
13179
- };
13180
- convert.hsv.ansi16 = function(args) {
13181
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
13182
- };
13183
- convert.rgb.ansi256 = function(args) {
13184
- var r = args[0];
13185
- var g = args[1];
13186
- var b = args[2];
13187
- if (r === g && g === b) {
13188
- if (r < 8) {
13189
- return 16;
13190
- }
13191
- if (r > 248) {
13192
- return 231;
13193
- }
13194
- return Math.round((r - 8) / 247 * 24) + 232;
13195
- }
13196
- var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
13197
- return ansi;
13198
- };
13199
- convert.ansi16.rgb = function(args) {
13200
- var color = args % 10;
13201
- if (color === 0 || color === 7) {
13202
- if (args > 50) {
13203
- color += 3.5;
13204
- }
13205
- color = color / 10.5 * 255;
13206
- return [color, color, color];
13207
- }
13208
- var mult = (~~(args > 50) + 1) * 0.5;
13209
- var r = (color & 1) * mult * 255;
13210
- var g = (color >> 1 & 1) * mult * 255;
13211
- var b = (color >> 2 & 1) * mult * 255;
13212
- return [r, g, b];
13213
- };
13214
- convert.ansi256.rgb = function(args) {
13215
- if (args >= 232) {
13216
- var c3 = (args - 232) * 10 + 8;
13217
- return [c3, c3, c3];
13218
- }
13219
- args -= 16;
13220
- var rem;
13221
- var r = Math.floor(args / 36) / 5 * 255;
13222
- var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
13223
- var b = rem % 6 / 5 * 255;
13224
- return [r, g, b];
13225
- };
13226
- convert.rgb.hex = function(args) {
13227
- var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
13228
- var string = integer.toString(16).toUpperCase();
13229
- return "000000".substring(string.length) + string;
13230
- };
13231
- convert.hex.rgb = function(args) {
13232
- var match2 = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
13233
- if (!match2) {
13234
- return [0, 0, 0];
13235
- }
13236
- var colorString = match2[0];
13237
- if (match2[0].length === 3) {
13238
- colorString = colorString.split("").map(function(char) {
13239
- return char + char;
13240
- }).join("");
13241
- }
13242
- var integer = parseInt(colorString, 16);
13243
- var r = integer >> 16 & 255;
13244
- var g = integer >> 8 & 255;
13245
- var b = integer & 255;
13246
- return [r, g, b];
13247
- };
13248
- convert.rgb.hcg = function(rgb) {
13249
- var r = rgb[0] / 255;
13250
- var g = rgb[1] / 255;
13251
- var b = rgb[2] / 255;
13252
- var max = Math.max(Math.max(r, g), b);
13253
- var min = Math.min(Math.min(r, g), b);
13254
- var chroma = max - min;
13255
- var grayscale;
13256
- var hue;
13257
- if (chroma < 1) {
13258
- grayscale = min / (1 - chroma);
13259
- } else {
13260
- grayscale = 0;
13261
- }
13262
- if (chroma <= 0) {
13263
- hue = 0;
13264
- } else if (max === r) {
13265
- hue = (g - b) / chroma % 6;
13266
- } else if (max === g) {
13267
- hue = 2 + (b - r) / chroma;
13268
- } else {
13269
- hue = 4 + (r - g) / chroma + 4;
13270
- }
13271
- hue /= 6;
13272
- hue %= 1;
13273
- return [hue * 360, chroma * 100, grayscale * 100];
13274
- };
13275
- convert.hsl.hcg = function(hsl) {
13276
- var s = hsl[1] / 100;
13277
- var l = hsl[2] / 100;
13278
- var c3 = 1;
13279
- var f = 0;
13280
- if (l < 0.5) {
13281
- c3 = 2 * s * l;
13282
- } else {
13283
- c3 = 2 * s * (1 - l);
13284
- }
13285
- if (c3 < 1) {
13286
- f = (l - 0.5 * c3) / (1 - c3);
13287
- }
13288
- return [hsl[0], c3 * 100, f * 100];
13289
- };
13290
- convert.hsv.hcg = function(hsv) {
13291
- var s = hsv[1] / 100;
13292
- var v = hsv[2] / 100;
13293
- var c3 = s * v;
13294
- var f = 0;
13295
- if (c3 < 1) {
13296
- f = (v - c3) / (1 - c3);
13297
- }
13298
- return [hsv[0], c3 * 100, f * 100];
13299
- };
13300
- convert.hcg.rgb = function(hcg) {
13301
- var h2 = hcg[0] / 360;
13302
- var c3 = hcg[1] / 100;
13303
- var g = hcg[2] / 100;
13304
- if (c3 === 0) {
13305
- return [g * 255, g * 255, g * 255];
13306
- }
13307
- var pure = [0, 0, 0];
13308
- var hi = h2 % 1 * 6;
13309
- var v = hi % 1;
13310
- var w = 1 - v;
13311
- var mg = 0;
13312
- switch (Math.floor(hi)) {
13313
- case 0:
13314
- pure[0] = 1;
13315
- pure[1] = v;
13316
- pure[2] = 0;
13317
- break;
13318
- case 1:
13319
- pure[0] = w;
13320
- pure[1] = 1;
13321
- pure[2] = 0;
13322
- break;
13323
- case 2:
13324
- pure[0] = 0;
13325
- pure[1] = 1;
13326
- pure[2] = v;
13327
- break;
13328
- case 3:
13329
- pure[0] = 0;
13330
- pure[1] = w;
13331
- pure[2] = 1;
13332
- break;
13333
- case 4:
13334
- pure[0] = v;
13335
- pure[1] = 0;
13336
- pure[2] = 1;
13337
- break;
13338
- default:
13339
- pure[0] = 1;
13340
- pure[1] = 0;
13341
- pure[2] = w;
13342
- }
13343
- mg = (1 - c3) * g;
13344
- return [
13345
- (c3 * pure[0] + mg) * 255,
13346
- (c3 * pure[1] + mg) * 255,
13347
- (c3 * pure[2] + mg) * 255
13348
- ];
13349
- };
13350
- convert.hcg.hsv = function(hcg) {
13351
- var c3 = hcg[1] / 100;
13352
- var g = hcg[2] / 100;
13353
- var v = c3 + g * (1 - c3);
13354
- var f = 0;
13355
- if (v > 0) {
13356
- f = c3 / v;
13357
- }
13358
- return [hcg[0], f * 100, v * 100];
13359
- };
13360
- convert.hcg.hsl = function(hcg) {
13361
- var c3 = hcg[1] / 100;
13362
- var g = hcg[2] / 100;
13363
- var l = g * (1 - c3) + 0.5 * c3;
13364
- var s = 0;
13365
- if (l > 0 && l < 0.5) {
13366
- s = c3 / (2 * l);
13367
- } else if (l >= 0.5 && l < 1) {
13368
- s = c3 / (2 * (1 - l));
13369
- }
13370
- return [hcg[0], s * 100, l * 100];
13371
- };
13372
- convert.hcg.hwb = function(hcg) {
13373
- var c3 = hcg[1] / 100;
13374
- var g = hcg[2] / 100;
13375
- var v = c3 + g * (1 - c3);
13376
- return [hcg[0], (v - c3) * 100, (1 - v) * 100];
13377
- };
13378
- convert.hwb.hcg = function(hwb) {
13379
- var w = hwb[1] / 100;
13380
- var b = hwb[2] / 100;
13381
- var v = 1 - b;
13382
- var c3 = v - w;
13383
- var g = 0;
13384
- if (c3 < 1) {
13385
- g = (v - c3) / (1 - c3);
13386
- }
13387
- return [hwb[0], c3 * 100, g * 100];
13388
- };
13389
- convert.apple.rgb = function(apple) {
13390
- return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
13391
- };
13392
- convert.rgb.apple = function(rgb) {
13393
- return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
13394
- };
13395
- convert.gray.rgb = function(args) {
13396
- return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
13397
- };
13398
- convert.gray.hsl = convert.gray.hsv = function(args) {
13399
- return [0, 0, args[0]];
13400
- };
13401
- convert.gray.hwb = function(gray2) {
13402
- return [0, 100, gray2[0]];
13403
- };
13404
- convert.gray.cmyk = function(gray2) {
13405
- return [0, 0, 0, gray2[0]];
13406
- };
13407
- convert.gray.lab = function(gray2) {
13408
- return [gray2[0], 0, 0];
13409
- };
13410
- convert.gray.hex = function(gray2) {
13411
- var val = Math.round(gray2[0] / 100 * 255) & 255;
13412
- var integer = (val << 16) + (val << 8) + val;
13413
- var string = integer.toString(16).toUpperCase();
13414
- return "000000".substring(string.length) + string;
13415
- };
13416
- convert.rgb.gray = function(rgb) {
13417
- var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
13418
- return [val / 255 * 100];
13419
- };
13420
- }
13421
- });
13422
-
13423
- // node_modules/color-convert/route.js
13424
- var require_route = __commonJS({
13425
- "node_modules/color-convert/route.js"(exports, module) {
13426
- var conversions = require_conversions();
13427
- function buildGraph() {
13428
- var graph = {};
13429
- var models = Object.keys(conversions);
13430
- for (var len = models.length, i2 = 0; i2 < len; i2++) {
13431
- graph[models[i2]] = {
13432
- // http://jsperf.com/1-vs-infinity
13433
- // micro-opt, but this is simple.
13434
- distance: -1,
13435
- parent: null
13436
- };
13437
- }
13438
- return graph;
13439
- }
13440
- function deriveBFS(fromModel) {
13441
- var graph = buildGraph();
13442
- var queue = [fromModel];
13443
- graph[fromModel].distance = 0;
13444
- while (queue.length) {
13445
- var current = queue.pop();
13446
- var adjacents = Object.keys(conversions[current]);
13447
- for (var len = adjacents.length, i2 = 0; i2 < len; i2++) {
13448
- var adjacent = adjacents[i2];
13449
- var node = graph[adjacent];
13450
- if (node.distance === -1) {
13451
- node.distance = graph[current].distance + 1;
13452
- node.parent = current;
13453
- queue.unshift(adjacent);
13454
- }
13455
- }
13456
- }
13457
- return graph;
13458
- }
13459
- function link(from, to) {
13460
- return function(args) {
13461
- return to(from(args));
13462
- };
13463
- }
13464
- function wrapConversion(toModel, graph) {
13465
- var path22 = [graph[toModel].parent, toModel];
13466
- var fn = conversions[graph[toModel].parent][toModel];
13467
- var cur = graph[toModel].parent;
13468
- while (graph[cur].parent) {
13469
- path22.unshift(graph[cur].parent);
13470
- fn = link(conversions[graph[cur].parent][cur], fn);
13471
- cur = graph[cur].parent;
13472
- }
13473
- fn.conversion = path22;
13474
- return fn;
13475
- }
13476
- module.exports = function(fromModel) {
13477
- var graph = deriveBFS(fromModel);
13478
- var conversion = {};
13479
- var models = Object.keys(graph);
13480
- for (var len = models.length, i2 = 0; i2 < len; i2++) {
13481
- var toModel = models[i2];
13482
- var node = graph[toModel];
13483
- if (node.parent === null) {
13484
- continue;
13485
- }
13486
- conversion[toModel] = wrapConversion(toModel, graph);
13487
- }
13488
- return conversion;
13489
- };
13490
- }
13491
- });
13492
-
13493
- // node_modules/color-convert/index.js
13494
- var require_color_convert = __commonJS({
13495
- "node_modules/color-convert/index.js"(exports, module) {
13496
- var conversions = require_conversions();
13497
- var route = require_route();
13498
- var convert = {};
13499
- var models = Object.keys(conversions);
13500
- function wrapRaw(fn) {
13501
- var wrappedFn = function(args) {
13502
- if (args === void 0 || args === null) {
13503
- return args;
13504
- }
13505
- if (arguments.length > 1) {
13506
- args = Array.prototype.slice.call(arguments);
13507
- }
13508
- return fn(args);
13509
- };
13510
- if ("conversion" in fn) {
13511
- wrappedFn.conversion = fn.conversion;
13512
- }
13513
- return wrappedFn;
13514
- }
13515
- function wrapRounded(fn) {
13516
- var wrappedFn = function(args) {
13517
- if (args === void 0 || args === null) {
13518
- return args;
13519
- }
13520
- if (arguments.length > 1) {
13521
- args = Array.prototype.slice.call(arguments);
13522
- }
13523
- var result = fn(args);
13524
- if (typeof result === "object") {
13525
- for (var len = result.length, i2 = 0; i2 < len; i2++) {
13526
- result[i2] = Math.round(result[i2]);
13527
- }
13528
- }
13529
- return result;
13530
- };
13531
- if ("conversion" in fn) {
13532
- wrappedFn.conversion = fn.conversion;
13533
- }
13534
- return wrappedFn;
13535
- }
13536
- models.forEach(function(fromModel) {
13537
- convert[fromModel] = {};
13538
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
13539
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
13540
- var routes = route(fromModel);
13541
- var routeModels = Object.keys(routes);
13542
- routeModels.forEach(function(toModel) {
13543
- var fn = routes[toModel];
13544
- convert[fromModel][toModel] = wrapRounded(fn);
13545
- convert[fromModel][toModel].raw = wrapRaw(fn);
13546
- });
13547
- });
13548
- module.exports = convert;
13549
- }
13550
- });
13551
-
13552
- // node_modules/ansi-styles/index.js
13553
- var require_ansi_styles = __commonJS({
13554
- "node_modules/ansi-styles/index.js"(exports, module) {
13555
- "use strict";
13556
- var colorConvert = require_color_convert();
13557
- var wrapAnsi16 = (fn, offset) => function() {
13558
- const code = fn.apply(colorConvert, arguments);
13559
- return `\x1B[${code + offset}m`;
13560
- };
13561
- var wrapAnsi256 = (fn, offset) => function() {
13562
- const code = fn.apply(colorConvert, arguments);
13563
- return `\x1B[${38 + offset};5;${code}m`;
13564
- };
13565
- var wrapAnsi16m = (fn, offset) => function() {
13566
- const rgb = fn.apply(colorConvert, arguments);
13567
- return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
13568
- };
13569
- function assembleStyles() {
13570
- const codes2 = /* @__PURE__ */ new Map();
13571
- const styles = {
13572
- modifier: {
13573
- reset: [0, 0],
13574
- // 21 isn't widely supported and 22 does the same thing
13575
- bold: [1, 22],
13576
- dim: [2, 22],
13577
- italic: [3, 23],
13578
- underline: [4, 24],
13579
- inverse: [7, 27],
13580
- hidden: [8, 28],
13581
- strikethrough: [9, 29]
13582
- },
13583
- color: {
13584
- black: [30, 39],
13585
- red: [31, 39],
13586
- green: [32, 39],
13587
- yellow: [33, 39],
13588
- blue: [34, 39],
13589
- magenta: [35, 39],
13590
- cyan: [36, 39],
13591
- white: [37, 39],
13592
- gray: [90, 39],
13593
- // Bright color
13594
- redBright: [91, 39],
13595
- greenBright: [92, 39],
13596
- yellowBright: [93, 39],
13597
- blueBright: [94, 39],
13598
- magentaBright: [95, 39],
13599
- cyanBright: [96, 39],
13600
- whiteBright: [97, 39]
13601
- },
13602
- bgColor: {
13603
- bgBlack: [40, 49],
13604
- bgRed: [41, 49],
13605
- bgGreen: [42, 49],
13606
- bgYellow: [43, 49],
13607
- bgBlue: [44, 49],
13608
- bgMagenta: [45, 49],
13609
- bgCyan: [46, 49],
13610
- bgWhite: [47, 49],
13611
- // Bright color
13612
- bgBlackBright: [100, 49],
13613
- bgRedBright: [101, 49],
13614
- bgGreenBright: [102, 49],
13615
- bgYellowBright: [103, 49],
13616
- bgBlueBright: [104, 49],
13617
- bgMagentaBright: [105, 49],
13618
- bgCyanBright: [106, 49],
13619
- bgWhiteBright: [107, 49]
13620
- }
13621
- };
13622
- styles.color.grey = styles.color.gray;
13623
- for (const groupName of Object.keys(styles)) {
13624
- const group = styles[groupName];
13625
- for (const styleName of Object.keys(group)) {
13626
- const style = group[styleName];
13627
- styles[styleName] = {
13628
- open: `\x1B[${style[0]}m`,
13629
- close: `\x1B[${style[1]}m`
13630
- };
13631
- group[styleName] = styles[styleName];
13632
- codes2.set(style[0], style[1]);
13633
- }
13634
- Object.defineProperty(styles, groupName, {
13635
- value: group,
13636
- enumerable: false
13637
- });
13638
- Object.defineProperty(styles, "codes", {
13639
- value: codes2,
13640
- enumerable: false
13641
- });
13642
- }
13643
- const ansi2ansi = (n2) => n2;
13644
- const rgb2rgb = (r, g, b) => [r, g, b];
13645
- styles.color.close = "\x1B[39m";
13646
- styles.bgColor.close = "\x1B[49m";
13647
- styles.color.ansi = {
13648
- ansi: wrapAnsi16(ansi2ansi, 0)
13649
- };
13650
- styles.color.ansi256 = {
13651
- ansi256: wrapAnsi256(ansi2ansi, 0)
13652
- };
13653
- styles.color.ansi16m = {
13654
- rgb: wrapAnsi16m(rgb2rgb, 0)
13655
- };
13656
- styles.bgColor.ansi = {
13657
- ansi: wrapAnsi16(ansi2ansi, 10)
13658
- };
13659
- styles.bgColor.ansi256 = {
13660
- ansi256: wrapAnsi256(ansi2ansi, 10)
13661
- };
13662
- styles.bgColor.ansi16m = {
13663
- rgb: wrapAnsi16m(rgb2rgb, 10)
13664
- };
13665
- for (let key of Object.keys(colorConvert)) {
13666
- if (typeof colorConvert[key] !== "object") {
13667
- continue;
13668
- }
13669
- const suite = colorConvert[key];
13670
- if (key === "ansi16") {
13671
- key = "ansi";
13672
- }
13673
- if ("ansi16" in suite) {
13674
- styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
13675
- styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
13676
- }
13677
- if ("ansi256" in suite) {
13678
- styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
13679
- styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
13680
- }
13681
- if ("rgb" in suite) {
13682
- styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
13683
- styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
13684
- }
13685
- }
13686
- return styles;
13687
- }
13688
- Object.defineProperty(module, "exports", {
13689
- enumerable: true,
13690
- get: assembleStyles
13691
- });
13692
- }
13693
- });
13694
-
13695
- // node_modules/chalk/templates.js
13696
- var require_templates = __commonJS({
13697
- "node_modules/chalk/templates.js"(exports, module) {
13698
- "use strict";
13699
- var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
13700
- var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
13701
- var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
13702
- var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
13703
- var ESCAPES = /* @__PURE__ */ new Map([
13704
- ["n", "\n"],
13705
- ["r", "\r"],
13706
- ["t", " "],
13707
- ["b", "\b"],
13708
- ["f", "\f"],
13709
- ["v", "\v"],
13710
- ["0", "\0"],
13711
- ["\\", "\\"],
13712
- ["e", "\x1B"],
13713
- ["a", "\x07"]
13714
- ]);
13715
- function unescape2(c3) {
13716
- if (c3[0] === "u" && c3.length === 5 || c3[0] === "x" && c3.length === 3) {
13717
- return String.fromCharCode(parseInt(c3.slice(1), 16));
13718
- }
13719
- return ESCAPES.get(c3) || c3;
13720
- }
13721
- function parseArguments2(name, args) {
13722
- const results = [];
13723
- const chunks = args.trim().split(/\s*,\s*/g);
13724
- let matches;
13725
- for (const chunk of chunks) {
13726
- if (!isNaN(chunk)) {
13727
- results.push(Number(chunk));
13728
- } else if (matches = chunk.match(STRING_REGEX)) {
13729
- results.push(matches[2].replace(ESCAPE_REGEX, (m, escape2, chr) => escape2 ? unescape2(escape2) : chr));
13730
- } else {
13731
- throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
13732
- }
13733
- }
13734
- return results;
13735
- }
13736
- function parseStyle(style) {
13737
- STYLE_REGEX.lastIndex = 0;
13738
- const results = [];
13739
- let matches;
13740
- while ((matches = STYLE_REGEX.exec(style)) !== null) {
13741
- const name = matches[1];
13742
- if (matches[2]) {
13743
- const args = parseArguments2(name, matches[2]);
13744
- results.push([name].concat(args));
13745
- } else {
13746
- results.push([name]);
13747
- }
13748
- }
13749
- return results;
13750
- }
13751
- function buildStyle(chalk, styles) {
13752
- const enabled = {};
13753
- for (const layer of styles) {
13754
- for (const style of layer.styles) {
13755
- enabled[style[0]] = layer.inverse ? null : style.slice(1);
13756
- }
13757
- }
13758
- let current = chalk;
13759
- for (const styleName of Object.keys(enabled)) {
13760
- if (Array.isArray(enabled[styleName])) {
13761
- if (!(styleName in current)) {
13762
- throw new Error(`Unknown Chalk style: ${styleName}`);
13763
- }
13764
- if (enabled[styleName].length > 0) {
13765
- current = current[styleName].apply(current, enabled[styleName]);
13766
- } else {
13767
- current = current[styleName];
13768
- }
13769
- }
13770
- }
13771
- return current;
13772
- }
13773
- module.exports = (chalk, tmp) => {
13774
- const styles = [];
13775
- const chunks = [];
13776
- let chunk = [];
13777
- tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse2, style, close, chr) => {
13778
- if (escapeChar) {
13779
- chunk.push(unescape2(escapeChar));
13780
- } else if (style) {
13781
- const str2 = chunk.join("");
13782
- chunk = [];
13783
- chunks.push(styles.length === 0 ? str2 : buildStyle(chalk, styles)(str2));
13784
- styles.push({ inverse: inverse2, styles: parseStyle(style) });
13785
- } else if (close) {
13786
- if (styles.length === 0) {
13787
- throw new Error("Found extraneous } in Chalk template literal");
13788
- }
13789
- chunks.push(buildStyle(chalk, styles)(chunk.join("")));
13790
- chunk = [];
13791
- styles.pop();
13792
- } else {
13793
- chunk.push(chr);
13794
- }
13795
- });
13796
- chunks.push(chunk.join(""));
13797
- if (styles.length > 0) {
13798
- const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
13799
- throw new Error(errMsg);
13800
- }
13801
- return chunks.join("");
13802
- };
13803
- }
13804
- });
13805
-
13806
- // node_modules/chalk/index.js
13807
- var require_chalk = __commonJS({
13808
- "node_modules/chalk/index.js"(exports, module) {
13809
- "use strict";
13810
- var escapeStringRegexp2 = require_escape_string_regexp();
13811
- var ansiStyles = require_ansi_styles();
13812
- var stdoutColor = require_supports_color().stdout;
13813
- var template = require_templates();
13814
- var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
13815
- var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
13816
- var skipModels = /* @__PURE__ */ new Set(["gray"]);
13817
- var styles = /* @__PURE__ */ Object.create(null);
13818
- function applyOptions(obj, options) {
13819
- options = options || {};
13820
- const scLevel = stdoutColor ? stdoutColor.level : 0;
13821
- obj.level = options.level === void 0 ? scLevel : options.level;
13822
- obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
13823
- }
13824
- function Chalk(options) {
13825
- if (!this || !(this instanceof Chalk) || this.template) {
13826
- const chalk = {};
13827
- applyOptions(chalk, options);
13828
- chalk.template = function() {
13829
- const args = [].slice.call(arguments);
13830
- return chalkTag.apply(null, [chalk.template].concat(args));
13831
- };
13832
- Object.setPrototypeOf(chalk, Chalk.prototype);
13833
- Object.setPrototypeOf(chalk.template, chalk);
13834
- chalk.template.constructor = Chalk;
13835
- return chalk.template;
13836
- }
13837
- applyOptions(this, options);
13838
- }
13839
- if (isSimpleWindowsTerm) {
13840
- ansiStyles.blue.open = "\x1B[94m";
13841
- }
13842
- for (const key of Object.keys(ansiStyles)) {
13843
- ansiStyles[key].closeRe = new RegExp(escapeStringRegexp2(ansiStyles[key].close), "g");
13844
- styles[key] = {
13845
- get() {
13846
- const codes2 = ansiStyles[key];
13847
- return build.call(this, this._styles ? this._styles.concat(codes2) : [codes2], this._empty, key);
13848
- }
13849
- };
13850
- }
13851
- styles.visible = {
13852
- get() {
13853
- return build.call(this, this._styles || [], true, "visible");
13854
- }
13855
- };
13856
- ansiStyles.color.closeRe = new RegExp(escapeStringRegexp2(ansiStyles.color.close), "g");
13857
- for (const model of Object.keys(ansiStyles.color.ansi)) {
13858
- if (skipModels.has(model)) {
13859
- continue;
13860
- }
13861
- styles[model] = {
13862
- get() {
13863
- const level = this.level;
13864
- return function() {
13865
- const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
13866
- const codes2 = {
13867
- open,
13868
- close: ansiStyles.color.close,
13869
- closeRe: ansiStyles.color.closeRe
13870
- };
13871
- return build.call(this, this._styles ? this._styles.concat(codes2) : [codes2], this._empty, model);
13872
- };
13873
- }
13874
- };
13875
- }
13876
- ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp2(ansiStyles.bgColor.close), "g");
13877
- for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
13878
- if (skipModels.has(model)) {
13879
- continue;
13880
- }
13881
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
13882
- styles[bgModel] = {
13883
- get() {
13884
- const level = this.level;
13885
- return function() {
13886
- const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
13887
- const codes2 = {
13888
- open,
13889
- close: ansiStyles.bgColor.close,
13890
- closeRe: ansiStyles.bgColor.closeRe
13891
- };
13892
- return build.call(this, this._styles ? this._styles.concat(codes2) : [codes2], this._empty, model);
13893
- };
13894
- }
13895
- };
13896
- }
13897
- var proto = Object.defineProperties(() => {
13898
- }, styles);
13899
- function build(_styles, _empty, key) {
13900
- const builder = function() {
13901
- return applyStyle.apply(builder, arguments);
13902
- };
13903
- builder._styles = _styles;
13904
- builder._empty = _empty;
13905
- const self = this;
13906
- Object.defineProperty(builder, "level", {
13907
- enumerable: true,
13908
- get() {
13909
- return self.level;
13910
- },
13911
- set(level) {
13912
- self.level = level;
13913
- }
13914
- });
13915
- Object.defineProperty(builder, "enabled", {
13916
- enumerable: true,
13917
- get() {
13918
- return self.enabled;
13919
- },
13920
- set(enabled) {
13921
- self.enabled = enabled;
13922
- }
13923
- });
13924
- builder.hasGrey = this.hasGrey || key === "gray" || key === "grey";
13925
- builder.__proto__ = proto;
13926
- return builder;
13927
- }
13928
- function applyStyle() {
13929
- const args = arguments;
13930
- const argsLen = args.length;
13931
- let str2 = String(arguments[0]);
13932
- if (argsLen === 0) {
13933
- return "";
13934
- }
13935
- if (argsLen > 1) {
13936
- for (let a2 = 1; a2 < argsLen; a2++) {
13937
- str2 += " " + args[a2];
13938
- }
13939
- }
13940
- if (!this.enabled || this.level <= 0 || !str2) {
13941
- return this._empty ? "" : str2;
13942
- }
13943
- const originalDim = ansiStyles.dim.open;
13944
- if (isSimpleWindowsTerm && this.hasGrey) {
13945
- ansiStyles.dim.open = "";
13946
- }
13947
- for (const code of this._styles.slice().reverse()) {
13948
- str2 = code.open + str2.replace(code.closeRe, code.open) + code.close;
13949
- str2 = str2.replace(/\r?\n/g, `${code.close}$&${code.open}`);
13950
- }
13951
- ansiStyles.dim.open = originalDim;
13952
- return str2;
13953
- }
13954
- function chalkTag(chalk, strings) {
13955
- if (!Array.isArray(strings)) {
13956
- return [].slice.call(arguments, 1).join(" ");
13957
- }
13958
- const args = [].slice.call(arguments, 2);
13959
- const parts = [strings.raw[0]];
13960
- for (let i2 = 1; i2 < strings.length; i2++) {
13961
- parts.push(String(args[i2 - 1]).replace(/[{}\\]/g, "\\$&"));
13962
- parts.push(String(strings.raw[i2]));
13963
- }
13964
- return template(chalk, parts.join(""));
13965
- }
13966
- Object.defineProperties(Chalk.prototype, styles);
13967
- module.exports = Chalk();
13968
- module.exports.supportsColor = stdoutColor;
13969
- module.exports.default = module.exports;
13970
- }
13971
- });
13972
-
13973
- // node_modules/@babel/highlight/lib/index.js
12663
+ // node_modules/@babel/code-frame/lib/index.js
13974
12664
  var require_lib5 = __commonJS({
13975
- "node_modules/@babel/highlight/lib/index.js"(exports) {
12665
+ "node_modules/@babel/code-frame/lib/index.js"(exports) {
13976
12666
  "use strict";
13977
- Object.defineProperty(exports, "__esModule", {
13978
- value: true
13979
- });
13980
- exports.default = highlight;
13981
- exports.shouldHighlight = shouldHighlight;
13982
- var _jsTokens = require_js_tokens();
13983
- var _helperValidatorIdentifier = require_lib4();
13984
- var _picocolors = _interopRequireWildcard(require_picocolors(), true);
13985
- function _getRequireWildcardCache(e) {
13986
- if ("function" != typeof WeakMap) return null;
13987
- var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
13988
- return (_getRequireWildcardCache = function(e2) {
13989
- return e2 ? t : r;
13990
- })(e);
13991
- }
13992
- function _interopRequireWildcard(e, r) {
13993
- if (!r && e && e.__esModule) return e;
13994
- if (null === e || "object" != typeof e && "function" != typeof e) return { default: e };
13995
- var t = _getRequireWildcardCache(r);
13996
- if (t && t.has(e)) return t.get(e);
13997
- var n2 = { __proto__: null }, a2 = Object.defineProperty && Object.getOwnPropertyDescriptor;
13998
- for (var u2 in e) if ("default" !== u2 && {}.hasOwnProperty.call(e, u2)) {
13999
- var i2 = a2 ? Object.getOwnPropertyDescriptor(e, u2) : null;
14000
- i2 && (i2.get || i2.set) ? Object.defineProperty(n2, u2, i2) : n2[u2] = e[u2];
14001
- }
14002
- return n2.default = e, t && t.set(e, n2), n2;
14003
- }
14004
- var colors = typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? (0, _picocolors.createColors)(false) : _picocolors.default;
12667
+ Object.defineProperty(exports, "__esModule", { value: true });
12668
+ var picocolors = require_picocolors();
12669
+ var jsTokens = require_js_tokens();
12670
+ var helperValidatorIdentifier = require_lib4();
12671
+ function isColorSupported() {
12672
+ return typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported;
12673
+ }
14005
12674
  var compose = (f, g) => (v) => f(g(v));
14006
- var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
14007
- function getDefs(colors2) {
12675
+ function buildDefs(colors) {
14008
12676
  return {
14009
- keyword: colors2.cyan,
14010
- capitalized: colors2.yellow,
14011
- jsxIdentifier: colors2.yellow,
14012
- punctuator: colors2.yellow,
14013
- number: colors2.magenta,
14014
- string: colors2.green,
14015
- regex: colors2.magenta,
14016
- comment: colors2.gray,
14017
- invalid: compose(compose(colors2.white, colors2.bgRed), colors2.bold)
12677
+ keyword: colors.cyan,
12678
+ capitalized: colors.yellow,
12679
+ jsxIdentifier: colors.yellow,
12680
+ punctuator: colors.yellow,
12681
+ number: colors.magenta,
12682
+ string: colors.green,
12683
+ regex: colors.magenta,
12684
+ comment: colors.gray,
12685
+ invalid: compose(compose(colors.white, colors.bgRed), colors.bold),
12686
+ gutter: colors.gray,
12687
+ marker: compose(colors.red, colors.bold),
12688
+ message: compose(colors.red, colors.bold),
12689
+ reset: colors.reset
14018
12690
  };
14019
12691
  }
14020
- var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
12692
+ var defsOn = buildDefs(picocolors.createColors(true));
12693
+ var defsOff = buildDefs(picocolors.createColors(false));
12694
+ function getDefs(enabled) {
12695
+ return enabled ? defsOn : defsOff;
12696
+ }
12697
+ var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
12698
+ var NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/;
14021
12699
  var BRACKET = /^[()[\]{}]$/;
14022
12700
  var tokenize;
14023
12701
  {
14024
12702
  const JSX_TAG = /^[a-z][\w-]*$/i;
14025
12703
  const getTokenType = function(token, offset, text) {
14026
12704
  if (token.type === "name") {
14027
- if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
12705
+ if (helperValidatorIdentifier.isKeyword(token.value) || helperValidatorIdentifier.isStrictReservedWord(token.value, true) || sometimesKeywords.has(token.value)) {
14028
12706
  return "keyword";
14029
12707
  }
14030
12708
  if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) === "</")) {
@@ -14044,8 +12722,8 @@ var require_lib5 = __commonJS({
14044
12722
  };
14045
12723
  tokenize = function* (text) {
14046
12724
  let match2;
14047
- while (match2 = _jsTokens.default.exec(text)) {
14048
- const token = _jsTokens.matchToToken(match2);
12725
+ while (match2 = jsTokens.default.exec(text)) {
12726
+ const token = jsTokens.matchToToken(match2);
14049
12727
  yield {
14050
12728
  type: getTokenType(token, match2.index, text),
14051
12729
  value: token.value
@@ -14053,111 +12731,23 @@ var require_lib5 = __commonJS({
14053
12731
  }
14054
12732
  };
14055
12733
  }
14056
- function highlightTokens(defs, text) {
12734
+ function highlight(text) {
12735
+ if (text === "") return "";
12736
+ const defs = getDefs(true);
14057
12737
  let highlighted = "";
14058
12738
  for (const {
14059
12739
  type: type2,
14060
12740
  value
14061
12741
  } of tokenize(text)) {
14062
- const colorize = defs[type2];
14063
- if (colorize) {
14064
- highlighted += value.split(NEWLINE).map((str2) => colorize(str2)).join("\n");
12742
+ if (type2 in defs) {
12743
+ highlighted += value.split(NEWLINE$1).map((str2) => defs[type2](str2)).join("\n");
14065
12744
  } else {
14066
12745
  highlighted += value;
14067
12746
  }
14068
12747
  }
14069
12748
  return highlighted;
14070
12749
  }
14071
- function shouldHighlight(options) {
14072
- return colors.isColorSupported || options.forceColor;
14073
- }
14074
- var pcWithForcedColor = void 0;
14075
- function getColors(forceColor) {
14076
- if (forceColor) {
14077
- var _pcWithForcedColor;
14078
- (_pcWithForcedColor = pcWithForcedColor) != null ? _pcWithForcedColor : pcWithForcedColor = (0, _picocolors.createColors)(true);
14079
- return pcWithForcedColor;
14080
- }
14081
- return colors;
14082
- }
14083
- function highlight(code, options = {}) {
14084
- if (code !== "" && shouldHighlight(options)) {
14085
- const defs = getDefs(getColors(options.forceColor));
14086
- return highlightTokens(defs, code);
14087
- } else {
14088
- return code;
14089
- }
14090
- }
14091
- {
14092
- let chalk, chalkWithForcedColor;
14093
- exports.getChalk = ({
14094
- forceColor
14095
- }) => {
14096
- var _chalk;
14097
- (_chalk = chalk) != null ? _chalk : chalk = require_chalk();
14098
- if (forceColor) {
14099
- var _chalkWithForcedColor;
14100
- (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new chalk.constructor({
14101
- enabled: true,
14102
- level: 1
14103
- });
14104
- return chalkWithForcedColor;
14105
- }
14106
- return chalk;
14107
- };
14108
- }
14109
- }
14110
- });
14111
-
14112
- // node_modules/@babel/code-frame/lib/index.js
14113
- var require_lib6 = __commonJS({
14114
- "node_modules/@babel/code-frame/lib/index.js"(exports) {
14115
- "use strict";
14116
- Object.defineProperty(exports, "__esModule", {
14117
- value: true
14118
- });
14119
- exports.codeFrameColumns = codeFrameColumns2;
14120
- exports.default = _default2;
14121
- var _highlight = require_lib5();
14122
- var _picocolors = _interopRequireWildcard(require_picocolors(), true);
14123
- function _getRequireWildcardCache(e) {
14124
- if ("function" != typeof WeakMap) return null;
14125
- var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
14126
- return (_getRequireWildcardCache = function(e2) {
14127
- return e2 ? t : r;
14128
- })(e);
14129
- }
14130
- function _interopRequireWildcard(e, r) {
14131
- if (!r && e && e.__esModule) return e;
14132
- if (null === e || "object" != typeof e && "function" != typeof e) return { default: e };
14133
- var t = _getRequireWildcardCache(r);
14134
- if (t && t.has(e)) return t.get(e);
14135
- var n2 = { __proto__: null }, a2 = Object.defineProperty && Object.getOwnPropertyDescriptor;
14136
- for (var u2 in e) if ("default" !== u2 && {}.hasOwnProperty.call(e, u2)) {
14137
- var i2 = a2 ? Object.getOwnPropertyDescriptor(e, u2) : null;
14138
- i2 && (i2.get || i2.set) ? Object.defineProperty(n2, u2, i2) : n2[u2] = e[u2];
14139
- }
14140
- return n2.default = e, t && t.set(e, n2), n2;
14141
- }
14142
- var colors = typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? (0, _picocolors.createColors)(false) : _picocolors.default;
14143
- var compose = (f, g) => (v) => f(g(v));
14144
- var pcWithForcedColor = void 0;
14145
- function getColors(forceColor) {
14146
- if (forceColor) {
14147
- var _pcWithForcedColor;
14148
- (_pcWithForcedColor = pcWithForcedColor) != null ? _pcWithForcedColor : pcWithForcedColor = (0, _picocolors.createColors)(true);
14149
- return pcWithForcedColor;
14150
- }
14151
- return colors;
14152
- }
14153
12750
  var deprecationWarningShown = false;
14154
- function getDefs(colors2) {
14155
- return {
14156
- gutter: colors2.gray,
14157
- marker: compose(colors2.red, colors2.bold),
14158
- message: compose(colors2.red, colors2.bold)
14159
- };
14160
- }
14161
12751
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
14162
12752
  function getMarkerLines(loc, source, opts) {
14163
12753
  const startLoc = Object.assign({
@@ -14216,12 +12806,8 @@ var require_lib6 = __commonJS({
14216
12806
  };
14217
12807
  }
14218
12808
  function codeFrameColumns2(rawLines, loc, opts = {}) {
14219
- const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
14220
- const colors2 = getColors(opts.forceColor);
14221
- const defs = getDefs(colors2);
14222
- const maybeHighlight = (fmt, string) => {
14223
- return highlighted ? fmt(string) : string;
14224
- };
12809
+ const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
12810
+ const defs = getDefs(shouldHighlight);
14225
12811
  const lines = rawLines.split(NEWLINE);
14226
12812
  const {
14227
12813
  start,
@@ -14230,9 +12816,9 @@ var require_lib6 = __commonJS({
14230
12816
  } = getMarkerLines(loc, lines, opts);
14231
12817
  const hasColumns = loc.start && typeof loc.start.column === "number";
14232
12818
  const numberMaxWidth = String(end).length;
14233
- const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
14234
- let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {
14235
- const number = start + 1 + index;
12819
+ const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines;
12820
+ let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index2) => {
12821
+ const number = start + 1 + index2;
14236
12822
  const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
14237
12823
  const gutter = ` ${paddedNumber} |`;
14238
12824
  const hasMarker = markerLines[number];
@@ -14242,27 +12828,27 @@ var require_lib6 = __commonJS({
14242
12828
  if (Array.isArray(hasMarker)) {
14243
12829
  const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
14244
12830
  const numberOfMarkers = hasMarker[1] || 1;
14245
- markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
12831
+ markerLine = ["\n ", defs.gutter(gutter.replace(/\d/g, " ")), " ", markerSpacing, defs.marker("^").repeat(numberOfMarkers)].join("");
14246
12832
  if (lastMarkerLine && opts.message) {
14247
- markerLine += " " + maybeHighlight(defs.message, opts.message);
12833
+ markerLine += " " + defs.message(opts.message);
14248
12834
  }
14249
12835
  }
14250
- return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
12836
+ return [defs.marker(">"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
14251
12837
  } else {
14252
- return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
12838
+ return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ""}`;
14253
12839
  }
14254
12840
  }).join("\n");
14255
12841
  if (opts.message && !hasColumns) {
14256
12842
  frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}
14257
12843
  ${frame}`;
14258
12844
  }
14259
- if (highlighted) {
14260
- return colors2.reset(frame);
12845
+ if (shouldHighlight) {
12846
+ return defs.reset(frame);
14261
12847
  } else {
14262
12848
  return frame;
14263
12849
  }
14264
12850
  }
14265
- function _default2(rawLines, lineNumber, colNumber, opts = {}) {
12851
+ function index(rawLines, lineNumber, colNumber, opts = {}) {
14266
12852
  if (!deprecationWarningShown) {
14267
12853
  deprecationWarningShown = true;
14268
12854
  const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
@@ -14283,6 +12869,9 @@ ${frame}`;
14283
12869
  };
14284
12870
  return codeFrameColumns2(rawLines, location, opts);
14285
12871
  }
12872
+ exports.codeFrameColumns = codeFrameColumns2;
12873
+ exports.default = index;
12874
+ exports.highlight = highlight;
14286
12875
  }
14287
12876
  });
14288
12877
 
@@ -14380,6 +12969,7 @@ var require_spdx_license_ids = __commonJS({
14380
12969
  "Bitstream-Vera",
14381
12970
  "BlueOak-1.0.0",
14382
12971
  "Boehm-GC",
12972
+ "Boehm-GC-without-fee",
14383
12973
  "Borceux",
14384
12974
  "Brian-Gladman-2-Clause",
14385
12975
  "Brian-Gladman-3-Clause",
@@ -14439,6 +13029,8 @@ var require_spdx_license_ids = __commonJS({
14439
13029
  "CC-BY-SA-3.0-IGO",
14440
13030
  "CC-BY-SA-4.0",
14441
13031
  "CC-PDDC",
13032
+ "CC-PDM-1.0",
13033
+ "CC-SA-1.0",
14442
13034
  "CC0-1.0",
14443
13035
  "CDDL-1.0",
14444
13036
  "CDDL-1.1",
@@ -14489,6 +13081,7 @@ var require_spdx_license_ids = __commonJS({
14489
13081
  "DRL-1.1",
14490
13082
  "DSDP",
14491
13083
  "DocBook-Schema",
13084
+ "DocBook-Stylesheet",
14492
13085
  "DocBook-XML",
14493
13086
  "Dotseqn",
14494
13087
  "ECL-1.0",
@@ -14596,6 +13189,7 @@ var require_spdx_license_ids = __commonJS({
14596
13189
  "Imlib2",
14597
13190
  "Info-ZIP",
14598
13191
  "Inner-Net-2.0",
13192
+ "InnoSetup",
14599
13193
  "Intel",
14600
13194
  "Intel-ACPI",
14601
13195
  "Interbase-1.0",
@@ -14640,9 +13234,11 @@ var require_spdx_license_ids = __commonJS({
14640
13234
  "Linux-man-pages-copyleft-2-para",
14641
13235
  "Linux-man-pages-copyleft-var",
14642
13236
  "Lucida-Bitmap-Fonts",
13237
+ "MIPS",
14643
13238
  "MIT",
14644
13239
  "MIT-0",
14645
13240
  "MIT-CMU",
13241
+ "MIT-Click",
14646
13242
  "MIT-Festival",
14647
13243
  "MIT-Khronos-old",
14648
13244
  "MIT-Modern-Variant",
@@ -14793,6 +13389,7 @@ var require_spdx_license_ids = __commonJS({
14793
13389
  "SISSL",
14794
13390
  "SISSL-1.2",
14795
13391
  "SL",
13392
+ "SMAIL-GPL",
14796
13393
  "SMLNJ",
14797
13394
  "SMPPL",
14798
13395
  "SNIA",
@@ -14806,6 +13403,7 @@ var require_spdx_license_ids = __commonJS({
14806
13403
  "SchemeReport",
14807
13404
  "Sendmail",
14808
13405
  "Sendmail-8.23",
13406
+ "Sendmail-Open-Source-1.1",
14809
13407
  "SimPL-2.0",
14810
13408
  "Sleepycat",
14811
13409
  "Soundex",
@@ -14831,6 +13429,8 @@ var require_spdx_license_ids = __commonJS({
14831
13429
  "TU-Berlin-1.0",
14832
13430
  "TU-Berlin-2.0",
14833
13431
  "TermReadKey",
13432
+ "ThirdEye",
13433
+ "TrustedQSL",
14834
13434
  "UCAR",
14835
13435
  "UCL-1.0",
14836
13436
  "UMich-Merit",
@@ -14874,6 +13474,7 @@ var require_spdx_license_ids = __commonJS({
14874
13474
  "Zimbra-1.4",
14875
13475
  "Zlib",
14876
13476
  "any-OSI",
13477
+ "any-OSI-perl-modules",
14877
13478
  "bcrypt-Solar-Designer",
14878
13479
  "blessing",
14879
13480
  "bzip2-1.0.6",
@@ -14890,6 +13491,7 @@ var require_spdx_license_ids = __commonJS({
14890
13491
  "etalab-2.0",
14891
13492
  "fwlw",
14892
13493
  "gSOAP-1.3b",
13494
+ "generic-xts",
14893
13495
  "gnuplot",
14894
13496
  "gtkbook",
14895
13497
  "hdparm",
@@ -14918,6 +13520,7 @@ var require_spdx_license_ids = __commonJS({
14918
13520
  "threeparttable",
14919
13521
  "ulem",
14920
13522
  "w3m",
13523
+ "wwl",
14921
13524
  "xinetd",
14922
13525
  "xkeyboard-config-Zinoviev",
14923
13526
  "xlock",
@@ -17361,7 +15964,7 @@ var require_from_url2 = __commonJS({
17361
15964
  });
17362
15965
 
17363
15966
  // node_modules/hosted-git-info/lib/index.js
17364
- var require_lib7 = __commonJS({
15967
+ var require_lib6 = __commonJS({
17365
15968
  "node_modules/hosted-git-info/lib/index.js"(exports, module) {
17366
15969
  "use strict";
17367
15970
  var { LRUCache } = require_commonjs2();
@@ -17567,7 +16170,7 @@ var require_fixer = __commonJS({
17567
16170
  var isValidSemver = require_valid();
17568
16171
  var cleanSemver = require_clean();
17569
16172
  var validateLicense = require_validate_npm_package_license();
17570
- var hostedGitInfo = require_lib7();
16173
+ var hostedGitInfo = require_lib6();
17571
16174
  var moduleBuiltin = __require("node:module");
17572
16175
  var depTypes = ["dependencies", "devDependencies", "optionalDependencies"];
17573
16176
  var extractDescription = require_extract_description();
@@ -18151,7 +16754,7 @@ function indentString(string, count2 = 1, options = {}) {
18151
16754
  return string.replace(regex, indent.repeat(count2));
18152
16755
  }
18153
16756
 
18154
- // node_modules/clean-stack/node_modules/escape-string-regexp/index.js
16757
+ // node_modules/escape-string-regexp/index.js
18155
16758
  function escapeStringRegexp(string) {
18156
16759
  if (typeof string !== "string") {
18157
16760
  throw new TypeError("Expected a string");
@@ -18380,12 +16983,14 @@ function isPlainObject(value) {
18380
16983
  // node_modules/execa/lib/arguments/file-url.js
18381
16984
  import { fileURLToPath } from "node:url";
18382
16985
  var safeNormalizeFileUrl = (file, name) => {
18383
- const fileString = normalizeFileUrl(file);
16986
+ const fileString = normalizeFileUrl(normalizeDenoExecPath(file));
18384
16987
  if (typeof fileString !== "string") {
18385
16988
  throw new TypeError(`${name} must be a string or a file URL: ${fileString}.`);
18386
16989
  }
18387
16990
  return fileString;
18388
16991
  };
16992
+ var normalizeDenoExecPath = (file) => isDenoExecPath(file) ? file.toString() : file;
16993
+ var isDenoExecPath = (file) => typeof file !== "string" && file && Object.getPrototypeOf(file) === String.prototype;
18389
16994
  var normalizeFileUrl = (file) => file instanceof URL ? fileURLToPath(file) : file;
18390
16995
 
18391
16996
  // node_modules/execa/lib/methods/parameters.js
@@ -18507,7 +17112,10 @@ var splitByWhitespaces = (template, rawTemplate) => {
18507
17112
  templateStart = templateIndex + 1;
18508
17113
  } else if (rawCharacter === "\\") {
18509
17114
  const nextRawCharacter = rawTemplate[rawIndex + 1];
18510
- if (nextRawCharacter === "u" && rawTemplate[rawIndex + 2] === "{") {
17115
+ if (nextRawCharacter === "\n") {
17116
+ templateIndex -= 1;
17117
+ rawIndex += 1;
17118
+ } else if (nextRawCharacter === "u" && rawTemplate[rawIndex + 2] === "{") {
18511
17119
  rawIndex = rawTemplate.indexOf("}", rawIndex + 3);
18512
17120
  } else {
18513
17121
  rawIndex += ESCAPE_LENGTH[nextRawCharacter] ?? 1;
@@ -18652,7 +17260,6 @@ var isVerboseFunction = (fdVerbose) => typeof fdVerbose === "function";
18652
17260
  var VERBOSE_VALUES = ["none", "short", "full"];
18653
17261
 
18654
17262
  // node_modules/execa/lib/verbose/log.js
18655
- import { writeFileSync } from "node:fs";
18656
17263
  import { inspect } from "node:util";
18657
17264
 
18658
17265
  // node_modules/execa/lib/arguments/escape.js
@@ -19116,7 +17723,9 @@ var verboseLog = ({ type: type2, verboseMessage, fdNumber, verboseInfo, result }
19116
17723
  const verboseObject = getVerboseObject({ type: type2, result, verboseInfo });
19117
17724
  const printedLines = getPrintedLines(verboseMessage, verboseObject);
19118
17725
  const finalLines = applyVerboseOnLines(printedLines, verboseInfo, fdNumber);
19119
- writeFileSync(STDERR_FD, finalLines);
17726
+ if (finalLines !== "") {
17727
+ console.warn(finalLines.slice(0, -1));
17728
+ }
19120
17729
  };
19121
17730
  var getVerboseObject = ({
19122
17731
  type: type2,
@@ -19136,7 +17745,6 @@ var getPrintedLine = (verboseObject) => {
19136
17745
  const verboseLine = defaultVerboseFunction(verboseObject);
19137
17746
  return { verboseLine, verboseObject };
19138
17747
  };
19139
- var STDERR_FD = 2;
19140
17748
  var serializeVerboseMessage = (message) => {
19141
17749
  const messageString = typeof message === "string" ? message : inspect(message);
19142
17750
  const escapedMessage = escapeLines(messageString);
@@ -21481,38 +20089,48 @@ function prettyMilliseconds(milliseconds, options) {
21481
20089
  };
21482
20090
  const parsed = parseMilliseconds(milliseconds);
21483
20091
  const days = BigInt(parsed.days);
21484
- add(days / 365n, "year", "y");
21485
- add(days % 365n, "day", "d");
21486
- add(Number(parsed.hours), "hour", "h");
20092
+ if (options.hideYearAndDays) {
20093
+ add(BigInt(days) * 24n + BigInt(parsed.hours), "hour", "h");
20094
+ } else {
20095
+ if (options.hideYear) {
20096
+ add(days, "day", "d");
20097
+ } else {
20098
+ add(days / 365n, "year", "y");
20099
+ add(days % 365n, "day", "d");
20100
+ }
20101
+ add(Number(parsed.hours), "hour", "h");
20102
+ }
21487
20103
  add(Number(parsed.minutes), "minute", "m");
21488
- if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
21489
- const seconds = Number(parsed.seconds);
21490
- const milliseconds2 = Number(parsed.milliseconds);
21491
- const microseconds = Number(parsed.microseconds);
21492
- const nanoseconds = Number(parsed.nanoseconds);
21493
- add(seconds, "second", "s");
21494
- if (options.formatSubMilliseconds) {
21495
- add(milliseconds2, "millisecond", "ms");
21496
- add(microseconds, "microsecond", "\xB5s");
21497
- add(nanoseconds, "nanosecond", "ns");
20104
+ if (!options.hideSeconds) {
20105
+ if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
20106
+ const seconds = Number(parsed.seconds);
20107
+ const milliseconds2 = Number(parsed.milliseconds);
20108
+ const microseconds = Number(parsed.microseconds);
20109
+ const nanoseconds = Number(parsed.nanoseconds);
20110
+ add(seconds, "second", "s");
20111
+ if (options.formatSubMilliseconds) {
20112
+ add(milliseconds2, "millisecond", "ms");
20113
+ add(microseconds, "microsecond", "\xB5s");
20114
+ add(nanoseconds, "nanosecond", "ns");
20115
+ } else {
20116
+ const millisecondsAndBelow = milliseconds2 + microseconds / 1e3 + nanoseconds / 1e6;
20117
+ const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
20118
+ const roundedMilliseconds = millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
20119
+ const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : roundedMilliseconds;
20120
+ add(
20121
+ Number.parseFloat(millisecondsString),
20122
+ "millisecond",
20123
+ "ms",
20124
+ millisecondsString
20125
+ );
20126
+ }
21498
20127
  } else {
21499
- const millisecondsAndBelow = milliseconds2 + microseconds / 1e3 + nanoseconds / 1e6;
21500
- const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
21501
- const roundedMilliseconds = millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
21502
- const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : roundedMilliseconds;
21503
- add(
21504
- Number.parseFloat(millisecondsString),
21505
- "millisecond",
21506
- "ms",
21507
- millisecondsString
21508
- );
20128
+ const seconds = (isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) / 1e3 % 60;
20129
+ const secondsDecimalDigits = typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1;
20130
+ const secondsFixed = floorDecimals(seconds, secondsDecimalDigits);
20131
+ const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
20132
+ add(Number.parseFloat(secondsString), "second", "s", secondsString);
21509
20133
  }
21510
- } else {
21511
- const seconds = (isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) / 1e3 % 60;
21512
- const secondsDecimalDigits = typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1;
21513
- const secondsFixed = floorDecimals(seconds, secondsDecimalDigits);
21514
- const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
21515
- add(Number.parseFloat(secondsString), "second", "s", secondsString);
21516
20134
  }
21517
20135
  if (result.length === 0) {
21518
20136
  return sign + "0" + (options.verbose ? " milliseconds" : "ms");
@@ -21658,7 +20276,8 @@ var isSyncGenerator = (value) => Object.prototype.toString.call(value) === "[obj
21658
20276
  var isTransformOptions = (value) => isPlainObject(value) && (value.transform !== void 0 || value.final !== void 0);
21659
20277
  var isUrl = (value) => Object.prototype.toString.call(value) === "[object URL]";
21660
20278
  var isRegularUrl = (value) => isUrl(value) && value.protocol !== "file:";
21661
- var isFilePathObject = (value) => isPlainObject(value) && Object.keys(value).length === 1 && isFilePathString(value.file);
20279
+ var isFilePathObject = (value) => isPlainObject(value) && Object.keys(value).length > 0 && Object.keys(value).every((key) => FILE_PATH_KEYS.has(key)) && isFilePathString(value.file);
20280
+ var FILE_PATH_KEYS = /* @__PURE__ */ new Set(["file", "append"]);
21662
20281
  var isFilePathString = (file) => typeof file === "string";
21663
20282
  var isUnknownStdioString = (type2, value) => type2 === "native" && typeof value === "string" && !KNOWN_STDIO_STRINGS.has(value);
21664
20283
  var KNOWN_STDIO_STRINGS = /* @__PURE__ */ new Set(["ipc", "ignore", "inherit", "overlapped", "pipe"]);
@@ -22270,7 +20889,7 @@ var addPropertiesSync = {
22270
20889
  output: {
22271
20890
  ...addProperties,
22272
20891
  fileUrl: ({ value }) => ({ path: value }),
22273
- filePath: ({ value: { file } }) => ({ path: file }),
20892
+ filePath: ({ value: { file, append } }) => ({ path: file, append }),
22274
20893
  fileNumber: ({ value }) => ({ path: value }),
22275
20894
  iterable: forbiddenIfSync,
22276
20895
  string: forbiddenIfSync,
@@ -22607,7 +21226,7 @@ var validateSerializable = (newContents) => {
22607
21226
  };
22608
21227
 
22609
21228
  // node_modules/execa/lib/io/output-sync.js
22610
- import { writeFileSync as writeFileSync2, appendFileSync } from "node:fs";
21229
+ import { writeFileSync, appendFileSync } from "node:fs";
22611
21230
 
22612
21231
  // node_modules/execa/lib/verbose/output.js
22613
21232
  var shouldLogOutput = ({ stdioItems, encoding, verboseInfo, fdNumber }) => fdNumber !== "all" && isFullVerbose(verboseInfo, fdNumber) && !BINARY_ENCODINGS.has(encoding) && fdUsesVerbose(fdNumber) && (stdioItems.some(({ type: type2, value }) => type2 === "native" && PIPED_STDIO_VALUES.has(value)) || stdioItems.every(({ type: type2 }) => TRANSFORM_TYPES.has(type2)));
@@ -22728,13 +21347,13 @@ var logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encoding,
22728
21347
  }
22729
21348
  };
22730
21349
  var writeToFiles = (serializedResult, stdioItems, outputFiles) => {
22731
- for (const { path: path22 } of stdioItems.filter(({ type: type2 }) => FILE_TYPES.has(type2))) {
21350
+ for (const { path: path22, append } of stdioItems.filter(({ type: type2 }) => FILE_TYPES.has(type2))) {
22732
21351
  const pathString = typeof path22 === "string" ? path22 : path22.toString();
22733
- if (outputFiles.has(pathString)) {
21352
+ if (append || outputFiles.has(pathString)) {
22734
21353
  appendFileSync(path22, serializedResult);
22735
21354
  } else {
22736
21355
  outputFiles.add(pathString);
22737
- writeFileSync2(path22, serializedResult);
21356
+ writeFileSync(path22, serializedResult);
22738
21357
  }
22739
21358
  }
22740
21359
  };
@@ -23218,7 +21837,7 @@ var addPropertiesAsync = {
23218
21837
  output: {
23219
21838
  ...addProperties2,
23220
21839
  fileUrl: ({ value }) => ({ stream: createWriteStream(value) }),
23221
- filePath: ({ value: { file } }) => ({ stream: createWriteStream(file) }),
21840
+ filePath: ({ value: { file, append } }) => ({ stream: createWriteStream(file, append ? { flags: "a" } : {}) }),
23222
21841
  webStream: ({ value }) => ({ stream: Writable2.fromWeb(value) }),
23223
21842
  iterable: forbiddenIfAsync,
23224
21843
  asyncIterable: forbiddenIfAsync,
@@ -23848,7 +22467,7 @@ var getDestination = (boundOptions, createNested, firstArgument, ...pipeArgument
23848
22467
  const destination = createNested(mapDestinationArguments, boundOptions)(firstArgument, ...pipeArguments);
23849
22468
  return { destination, pipeOptions: boundOptions };
23850
22469
  }
23851
- if (typeof firstArgument === "string" || firstArgument instanceof URL) {
22470
+ if (typeof firstArgument === "string" || firstArgument instanceof URL || isDenoExecPath(firstArgument)) {
23852
22471
  if (Object.keys(boundOptions).length > 0) {
23853
22472
  throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');
23854
22473
  }
@@ -28410,7 +27029,7 @@ async function pMap(iterable, mapper, {
28410
27029
  stopOnError = true,
28411
27030
  signal
28412
27031
  } = {}) {
28413
- return new Promise((resolve2, reject_) => {
27032
+ return new Promise((resolve_, reject_) => {
28414
27033
  if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) {
28415
27034
  throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
28416
27035
  }
@@ -28429,18 +27048,27 @@ async function pMap(iterable, mapper, {
28429
27048
  let resolvingCount = 0;
28430
27049
  let currentIndex = 0;
28431
27050
  const iterator = iterable[Symbol.iterator] === void 0 ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
27051
+ const signalListener = () => {
27052
+ reject(signal.reason);
27053
+ };
27054
+ const cleanup = () => {
27055
+ signal?.removeEventListener("abort", signalListener);
27056
+ };
27057
+ const resolve2 = (value) => {
27058
+ resolve_(value);
27059
+ cleanup();
27060
+ };
28432
27061
  const reject = (reason) => {
28433
27062
  isRejected = true;
28434
27063
  isResolved = true;
28435
27064
  reject_(reason);
27065
+ cleanup();
28436
27066
  };
28437
27067
  if (signal) {
28438
27068
  if (signal.aborted) {
28439
27069
  reject(signal.reason);
28440
27070
  }
28441
- signal.addEventListener("abort", () => {
28442
- reject(signal.reason);
28443
- });
27071
+ signal.addEventListener("abort", signalListener, { once: true });
28444
27072
  }
28445
27073
  const next = async () => {
28446
27074
  if (isResolved) {
@@ -32758,7 +31386,7 @@ import fsPromises4 from "node:fs/promises";
32758
31386
  import path19 from "node:path";
32759
31387
 
32760
31388
  // node_modules/read-package-up/node_modules/parse-json/index.js
32761
- var import_code_frame = __toESM(require_lib6(), 1);
31389
+ var import_code_frame = __toESM(require_lib5(), 1);
32762
31390
 
32763
31391
  // node_modules/index-to-position/index.js
32764
31392
  var safeLastIndexOf = (string, searchString, index) => index < 0 ? -1 : string.lastIndexOf(searchString, index);