@vitessce/sets-utils 3.6.0 → 3.6.2

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 +291 -774
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -7098,11 +7098,25 @@ function requireConstants() {
7098
7098
  const MAX_SAFE_INTEGER2 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
7099
7099
  9007199254740991;
7100
7100
  const MAX_SAFE_COMPONENT_LENGTH = 16;
7101
+ const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
7102
+ const RELEASE_TYPES = [
7103
+ "major",
7104
+ "premajor",
7105
+ "minor",
7106
+ "preminor",
7107
+ "patch",
7108
+ "prepatch",
7109
+ "prerelease"
7110
+ ];
7101
7111
  constants = {
7102
- SEMVER_SPEC_VERSION,
7103
7112
  MAX_LENGTH,
7113
+ MAX_SAFE_COMPONENT_LENGTH,
7114
+ MAX_SAFE_BUILD_LENGTH,
7104
7115
  MAX_SAFE_INTEGER: MAX_SAFE_INTEGER2,
7105
- MAX_SAFE_COMPONENT_LENGTH
7116
+ RELEASE_TYPES,
7117
+ SEMVER_SPEC_VERSION,
7118
+ FLAG_INCLUDE_PRERELEASE: 1,
7119
+ FLAG_LOOSE: 2
7106
7120
  };
7107
7121
  return constants;
7108
7122
  }
@@ -7121,30 +7135,49 @@ function requireRe() {
7121
7135
  if (hasRequiredRe) return re.exports;
7122
7136
  hasRequiredRe = 1;
7123
7137
  (function(module2, exports2) {
7124
- const { MAX_SAFE_COMPONENT_LENGTH } = requireConstants();
7138
+ const {
7139
+ MAX_SAFE_COMPONENT_LENGTH,
7140
+ MAX_SAFE_BUILD_LENGTH,
7141
+ MAX_LENGTH
7142
+ } = requireConstants();
7125
7143
  const debug = requireDebug();
7126
7144
  exports2 = module2.exports = {};
7127
7145
  const re2 = exports2.re = [];
7146
+ const safeRe = exports2.safeRe = [];
7128
7147
  const src = exports2.src = [];
7129
7148
  const t = exports2.t = {};
7130
7149
  let R = 0;
7150
+ const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
7151
+ const safeRegexReplacements = [
7152
+ ["\\s", 1],
7153
+ ["\\d", MAX_LENGTH],
7154
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
7155
+ ];
7156
+ const makeSafeRegex = (value) => {
7157
+ for (const [token, max] of safeRegexReplacements) {
7158
+ value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
7159
+ }
7160
+ return value;
7161
+ };
7131
7162
  const createToken = (name, value, isGlobal) => {
7163
+ const safe = makeSafeRegex(value);
7132
7164
  const index = R++;
7133
7165
  debug(name, index, value);
7134
7166
  t[name] = index;
7135
7167
  src[index] = value;
7136
7168
  re2[index] = new RegExp(value, isGlobal ? "g" : void 0);
7169
+ safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
7137
7170
  };
7138
7171
  createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
7139
- createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+");
7140
- createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*");
7172
+ createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
7173
+ createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
7141
7174
  createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
7142
7175
  createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
7143
7176
  createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
7144
7177
  createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
7145
7178
  createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
7146
7179
  createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
7147
- createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+");
7180
+ createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
7148
7181
  createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
7149
7182
  createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
7150
7183
  createToken("FULL", `^${src[t.FULLPLAIN]}$`);
@@ -7157,8 +7190,11 @@ function requireRe() {
7157
7190
  createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
7158
7191
  createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
7159
7192
  createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
7160
- createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`);
7193
+ createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
7194
+ createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
7195
+ createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
7161
7196
  createToken("COERCERTL", src[t.COERCE], true);
7197
+ createToken("COERCERTLFULL", src[t.COERCEFULL], true);
7162
7198
  createToken("LONETILDE", "(?:~>?)");
7163
7199
  createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
7164
7200
  exports2.tildeTrimReplace = "$1~";
@@ -7186,11 +7222,17 @@ var hasRequiredParseOptions;
7186
7222
  function requireParseOptions() {
7187
7223
  if (hasRequiredParseOptions) return parseOptions_1;
7188
7224
  hasRequiredParseOptions = 1;
7189
- const opts = ["includePrerelease", "loose", "rtl"];
7190
- const parseOptions = (options) => !options ? {} : typeof options !== "object" ? { loose: true } : opts.filter((k) => options[k]).reduce((o, k) => {
7191
- o[k] = true;
7192
- return o;
7193
- }, {});
7225
+ const looseOption = Object.freeze({ loose: true });
7226
+ const emptyOpts = Object.freeze({});
7227
+ const parseOptions = (options) => {
7228
+ if (!options) {
7229
+ return emptyOpts;
7230
+ }
7231
+ if (typeof options !== "object") {
7232
+ return looseOption;
7233
+ }
7234
+ return options;
7235
+ };
7194
7236
  parseOptions_1 = parseOptions;
7195
7237
  return parseOptions_1;
7196
7238
  }
@@ -7223,7 +7265,7 @@ function requireSemver$1() {
7223
7265
  hasRequiredSemver$1 = 1;
7224
7266
  const debug = requireDebug();
7225
7267
  const { MAX_LENGTH, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER2 } = requireConstants();
7226
- const { re: re2, t } = requireRe();
7268
+ const { safeRe: re2, t } = requireRe();
7227
7269
  const parseOptions = requireParseOptions();
7228
7270
  const { compareIdentifiers } = requireIdentifiers();
7229
7271
  class SemVer {
@@ -7236,7 +7278,7 @@ function requireSemver$1() {
7236
7278
  version = version.version;
7237
7279
  }
7238
7280
  } else if (typeof version !== "string") {
7239
- throw new TypeError(`Invalid Version: ${version}`);
7281
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
7240
7282
  }
7241
7283
  if (version.length > MAX_LENGTH) {
7242
7284
  throw new TypeError(
@@ -7346,7 +7388,7 @@ function requireSemver$1() {
7346
7388
  do {
7347
7389
  const a = this.build[i];
7348
7390
  const b = other.build[i];
7349
- debug("prerelease compare", i, a, b);
7391
+ debug("build compare", i, a, b);
7350
7392
  if (a === void 0 && b === void 0) {
7351
7393
  return 0;
7352
7394
  } else if (b === void 0) {
@@ -7362,33 +7404,33 @@ function requireSemver$1() {
7362
7404
  }
7363
7405
  // preminor will bump the version up to the next minor release, and immediately
7364
7406
  // down to pre-release. premajor and prepatch work the same way.
7365
- inc(release, identifier) {
7407
+ inc(release, identifier, identifierBase) {
7366
7408
  switch (release) {
7367
7409
  case "premajor":
7368
7410
  this.prerelease.length = 0;
7369
7411
  this.patch = 0;
7370
7412
  this.minor = 0;
7371
7413
  this.major++;
7372
- this.inc("pre", identifier);
7414
+ this.inc("pre", identifier, identifierBase);
7373
7415
  break;
7374
7416
  case "preminor":
7375
7417
  this.prerelease.length = 0;
7376
7418
  this.patch = 0;
7377
7419
  this.minor++;
7378
- this.inc("pre", identifier);
7420
+ this.inc("pre", identifier, identifierBase);
7379
7421
  break;
7380
7422
  case "prepatch":
7381
7423
  this.prerelease.length = 0;
7382
- this.inc("patch", identifier);
7383
- this.inc("pre", identifier);
7424
+ this.inc("patch", identifier, identifierBase);
7425
+ this.inc("pre", identifier, identifierBase);
7384
7426
  break;
7385
7427
  // If the input is a non-prerelease version, this acts the same as
7386
7428
  // prepatch.
7387
7429
  case "prerelease":
7388
7430
  if (this.prerelease.length === 0) {
7389
- this.inc("patch", identifier);
7431
+ this.inc("patch", identifier, identifierBase);
7390
7432
  }
7391
- this.inc("pre", identifier);
7433
+ this.inc("pre", identifier, identifierBase);
7392
7434
  break;
7393
7435
  case "major":
7394
7436
  if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
@@ -7413,9 +7455,13 @@ function requireSemver$1() {
7413
7455
  break;
7414
7456
  // This probably shouldn't be used publicly.
7415
7457
  // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
7416
- case "pre":
7458
+ case "pre": {
7459
+ const base = Number(identifierBase) ? 1 : 0;
7460
+ if (!identifier && identifierBase === false) {
7461
+ throw new Error("invalid increment argument: identifier is empty");
7462
+ }
7417
7463
  if (this.prerelease.length === 0) {
7418
- this.prerelease = [0];
7464
+ this.prerelease = [base];
7419
7465
  } else {
7420
7466
  let i = this.prerelease.length;
7421
7467
  while (--i >= 0) {
@@ -7425,24 +7471,34 @@ function requireSemver$1() {
7425
7471
  }
7426
7472
  }
7427
7473
  if (i === -1) {
7428
- this.prerelease.push(0);
7474
+ if (identifier === this.prerelease.join(".") && identifierBase === false) {
7475
+ throw new Error("invalid increment argument: identifier already exists");
7476
+ }
7477
+ this.prerelease.push(base);
7429
7478
  }
7430
7479
  }
7431
7480
  if (identifier) {
7481
+ let prerelease = [identifier, base];
7482
+ if (identifierBase === false) {
7483
+ prerelease = [identifier];
7484
+ }
7432
7485
  if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
7433
7486
  if (isNaN(this.prerelease[1])) {
7434
- this.prerelease = [identifier, 0];
7487
+ this.prerelease = prerelease;
7435
7488
  }
7436
7489
  } else {
7437
- this.prerelease = [identifier, 0];
7490
+ this.prerelease = prerelease;
7438
7491
  }
7439
7492
  }
7440
7493
  break;
7494
+ }
7441
7495
  default:
7442
7496
  throw new Error(`invalid increment argument: ${release}`);
7443
7497
  }
7444
- this.format();
7445
- this.raw = this.version;
7498
+ this.raw = this.format();
7499
+ if (this.build.length) {
7500
+ this.raw += `+${this.build.join(".")}`;
7501
+ }
7446
7502
  return this;
7447
7503
  }
7448
7504
  }
@@ -7454,29 +7510,18 @@ var hasRequiredParse;
7454
7510
  function requireParse() {
7455
7511
  if (hasRequiredParse) return parse_1;
7456
7512
  hasRequiredParse = 1;
7457
- const { MAX_LENGTH } = requireConstants();
7458
- const { re: re2, t } = requireRe();
7459
7513
  const SemVer = requireSemver$1();
7460
- const parseOptions = requireParseOptions();
7461
- const parse = (version, options) => {
7462
- options = parseOptions(options);
7514
+ const parse = (version, options, throwErrors = false) => {
7463
7515
  if (version instanceof SemVer) {
7464
7516
  return version;
7465
7517
  }
7466
- if (typeof version !== "string") {
7467
- return null;
7468
- }
7469
- if (version.length > MAX_LENGTH) {
7470
- return null;
7471
- }
7472
- const r = options.loose ? re2[t.LOOSE] : re2[t.FULL];
7473
- if (!r.test(version)) {
7474
- return null;
7475
- }
7476
7518
  try {
7477
7519
  return new SemVer(version, options);
7478
7520
  } catch (er) {
7479
- return null;
7521
+ if (!throwErrors) {
7522
+ return null;
7523
+ }
7524
+ throw er;
7480
7525
  }
7481
7526
  };
7482
7527
  parse_1 = parse;
@@ -7514,8 +7559,9 @@ function requireInc() {
7514
7559
  if (hasRequiredInc) return inc_1;
7515
7560
  hasRequiredInc = 1;
7516
7561
  const SemVer = requireSemver$1();
7517
- const inc = (version, release, options, identifier) => {
7562
+ const inc = (version, release, options, identifier, identifierBase) => {
7518
7563
  if (typeof options === "string") {
7564
+ identifierBase = identifier;
7519
7565
  identifier = options;
7520
7566
  options = void 0;
7521
7567
  }
@@ -7523,7 +7569,7 @@ function requireInc() {
7523
7569
  return new SemVer(
7524
7570
  version instanceof SemVer ? version.version : version,
7525
7571
  options
7526
- ).inc(release, identifier).version;
7572
+ ).inc(release, identifier, identifierBase).version;
7527
7573
  } catch (er) {
7528
7574
  return null;
7529
7575
  }
@@ -7531,51 +7577,47 @@ function requireInc() {
7531
7577
  inc_1 = inc;
7532
7578
  return inc_1;
7533
7579
  }
7534
- var compare_1;
7535
- var hasRequiredCompare;
7536
- function requireCompare() {
7537
- if (hasRequiredCompare) return compare_1;
7538
- hasRequiredCompare = 1;
7539
- const SemVer = requireSemver$1();
7540
- const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
7541
- compare_1 = compare;
7542
- return compare_1;
7543
- }
7544
- var eq_1;
7545
- var hasRequiredEq;
7546
- function requireEq() {
7547
- if (hasRequiredEq) return eq_1;
7548
- hasRequiredEq = 1;
7549
- const compare = requireCompare();
7550
- const eq2 = (a, b, loose) => compare(a, b, loose) === 0;
7551
- eq_1 = eq2;
7552
- return eq_1;
7553
- }
7554
7580
  var diff_1;
7555
7581
  var hasRequiredDiff;
7556
7582
  function requireDiff() {
7557
7583
  if (hasRequiredDiff) return diff_1;
7558
7584
  hasRequiredDiff = 1;
7559
7585
  const parse = requireParse();
7560
- const eq2 = requireEq();
7561
7586
  const diff = (version1, version2) => {
7562
- if (eq2(version1, version2)) {
7587
+ const v1 = parse(version1, null, true);
7588
+ const v2 = parse(version2, null, true);
7589
+ const comparison = v1.compare(v2);
7590
+ if (comparison === 0) {
7563
7591
  return null;
7564
- } else {
7565
- const v1 = parse(version1);
7566
- const v2 = parse(version2);
7567
- const hasPre = v1.prerelease.length || v2.prerelease.length;
7568
- const prefix = hasPre ? "pre" : "";
7569
- const defaultResult = hasPre ? "prerelease" : "";
7570
- for (const key in v1) {
7571
- if (key === "major" || key === "minor" || key === "patch") {
7572
- if (v1[key] !== v2[key]) {
7573
- return prefix + key;
7574
- }
7575
- }
7592
+ }
7593
+ const v1Higher = comparison > 0;
7594
+ const highVersion = v1Higher ? v1 : v2;
7595
+ const lowVersion = v1Higher ? v2 : v1;
7596
+ const highHasPre = !!highVersion.prerelease.length;
7597
+ const lowHasPre = !!lowVersion.prerelease.length;
7598
+ if (lowHasPre && !highHasPre) {
7599
+ if (!lowVersion.patch && !lowVersion.minor) {
7600
+ return "major";
7601
+ }
7602
+ if (highVersion.patch) {
7603
+ return "patch";
7576
7604
  }
7577
- return defaultResult;
7605
+ if (highVersion.minor) {
7606
+ return "minor";
7607
+ }
7608
+ return "major";
7609
+ }
7610
+ const prefix = highHasPre ? "pre" : "";
7611
+ if (v1.major !== v2.major) {
7612
+ return prefix + "major";
7613
+ }
7614
+ if (v1.minor !== v2.minor) {
7615
+ return prefix + "minor";
7578
7616
  }
7617
+ if (v1.patch !== v2.patch) {
7618
+ return prefix + "patch";
7619
+ }
7620
+ return "prerelease";
7579
7621
  };
7580
7622
  diff_1 = diff;
7581
7623
  return diff_1;
@@ -7623,6 +7665,16 @@ function requirePrerelease() {
7623
7665
  prerelease_1 = prerelease;
7624
7666
  return prerelease_1;
7625
7667
  }
7668
+ var compare_1;
7669
+ var hasRequiredCompare;
7670
+ function requireCompare() {
7671
+ if (hasRequiredCompare) return compare_1;
7672
+ hasRequiredCompare = 1;
7673
+ const SemVer = requireSemver$1();
7674
+ const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
7675
+ compare_1 = compare;
7676
+ return compare_1;
7677
+ }
7626
7678
  var rcompare_1;
7627
7679
  var hasRequiredRcompare;
7628
7680
  function requireRcompare() {
@@ -7697,6 +7749,16 @@ function requireLt() {
7697
7749
  lt_1 = lt;
7698
7750
  return lt_1;
7699
7751
  }
7752
+ var eq_1;
7753
+ var hasRequiredEq;
7754
+ function requireEq() {
7755
+ if (hasRequiredEq) return eq_1;
7756
+ hasRequiredEq = 1;
7757
+ const compare = requireCompare();
7758
+ const eq2 = (a, b, loose) => compare(a, b, loose) === 0;
7759
+ eq_1 = eq2;
7760
+ return eq_1;
7761
+ }
7700
7762
  var neq_1;
7701
7763
  var hasRequiredNeq;
7702
7764
  function requireNeq() {
@@ -7784,7 +7846,7 @@ function requireCoerce() {
7784
7846
  hasRequiredCoerce = 1;
7785
7847
  const SemVer = requireSemver$1();
7786
7848
  const parse = requireParse();
7787
- const { re: re2, t } = requireRe();
7849
+ const { safeRe: re2, t } = requireRe();
7788
7850
  const coerce2 = (version, options) => {
7789
7851
  if (version instanceof SemVer) {
7790
7852
  return version;
@@ -7798,682 +7860,75 @@ function requireCoerce() {
7798
7860
  options = options || {};
7799
7861
  let match = null;
7800
7862
  if (!options.rtl) {
7801
- match = version.match(re2[t.COERCE]);
7863
+ match = version.match(options.includePrerelease ? re2[t.COERCEFULL] : re2[t.COERCE]);
7802
7864
  } else {
7865
+ const coerceRtlRegex = options.includePrerelease ? re2[t.COERCERTLFULL] : re2[t.COERCERTL];
7803
7866
  let next;
7804
- while ((next = re2[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
7867
+ while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
7805
7868
  if (!match || next.index + next[0].length !== match.index + match[0].length) {
7806
7869
  match = next;
7807
7870
  }
7808
- re2[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
7871
+ coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
7809
7872
  }
7810
- re2[t.COERCERTL].lastIndex = -1;
7873
+ coerceRtlRegex.lastIndex = -1;
7811
7874
  }
7812
7875
  if (match === null) {
7813
7876
  return null;
7814
7877
  }
7815
- return parse(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options);
7878
+ const major = match[2];
7879
+ const minor = match[3] || "0";
7880
+ const patch = match[4] || "0";
7881
+ const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
7882
+ const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
7883
+ return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
7816
7884
  };
7817
7885
  coerce_1 = coerce2;
7818
7886
  return coerce_1;
7819
7887
  }
7820
- var iterator;
7821
- var hasRequiredIterator;
7822
- function requireIterator() {
7823
- if (hasRequiredIterator) return iterator;
7824
- hasRequiredIterator = 1;
7825
- iterator = function(Yallist) {
7826
- Yallist.prototype[Symbol.iterator] = function* () {
7827
- for (let walker = this.head; walker; walker = walker.next) {
7828
- yield walker.value;
7829
- }
7830
- };
7831
- };
7832
- return iterator;
7833
- }
7834
- var yallist;
7835
- var hasRequiredYallist;
7836
- function requireYallist() {
7837
- if (hasRequiredYallist) return yallist;
7838
- hasRequiredYallist = 1;
7839
- yallist = Yallist;
7840
- Yallist.Node = Node;
7841
- Yallist.create = Yallist;
7842
- function Yallist(list) {
7843
- var self2 = this;
7844
- if (!(self2 instanceof Yallist)) {
7845
- self2 = new Yallist();
7846
- }
7847
- self2.tail = null;
7848
- self2.head = null;
7849
- self2.length = 0;
7850
- if (list && typeof list.forEach === "function") {
7851
- list.forEach(function(item) {
7852
- self2.push(item);
7853
- });
7854
- } else if (arguments.length > 0) {
7855
- for (var i = 0, l = arguments.length; i < l; i++) {
7856
- self2.push(arguments[i]);
7857
- }
7858
- }
7859
- return self2;
7860
- }
7861
- Yallist.prototype.removeNode = function(node) {
7862
- if (node.list !== this) {
7863
- throw new Error("removing node which does not belong to this list");
7864
- }
7865
- var next = node.next;
7866
- var prev = node.prev;
7867
- if (next) {
7868
- next.prev = prev;
7869
- }
7870
- if (prev) {
7871
- prev.next = next;
7872
- }
7873
- if (node === this.head) {
7874
- this.head = next;
7875
- }
7876
- if (node === this.tail) {
7877
- this.tail = prev;
7878
- }
7879
- node.list.length--;
7880
- node.next = null;
7881
- node.prev = null;
7882
- node.list = null;
7883
- return next;
7884
- };
7885
- Yallist.prototype.unshiftNode = function(node) {
7886
- if (node === this.head) {
7887
- return;
7888
- }
7889
- if (node.list) {
7890
- node.list.removeNode(node);
7891
- }
7892
- var head = this.head;
7893
- node.list = this;
7894
- node.next = head;
7895
- if (head) {
7896
- head.prev = node;
7897
- }
7898
- this.head = node;
7899
- if (!this.tail) {
7900
- this.tail = node;
7901
- }
7902
- this.length++;
7903
- };
7904
- Yallist.prototype.pushNode = function(node) {
7905
- if (node === this.tail) {
7906
- return;
7907
- }
7908
- if (node.list) {
7909
- node.list.removeNode(node);
7910
- }
7911
- var tail = this.tail;
7912
- node.list = this;
7913
- node.prev = tail;
7914
- if (tail) {
7915
- tail.next = node;
7916
- }
7917
- this.tail = node;
7918
- if (!this.head) {
7919
- this.head = node;
7920
- }
7921
- this.length++;
7922
- };
7923
- Yallist.prototype.push = function() {
7924
- for (var i = 0, l = arguments.length; i < l; i++) {
7925
- push(this, arguments[i]);
7926
- }
7927
- return this.length;
7928
- };
7929
- Yallist.prototype.unshift = function() {
7930
- for (var i = 0, l = arguments.length; i < l; i++) {
7931
- unshift(this, arguments[i]);
7932
- }
7933
- return this.length;
7934
- };
7935
- Yallist.prototype.pop = function() {
7936
- if (!this.tail) {
7937
- return void 0;
7938
- }
7939
- var res = this.tail.value;
7940
- this.tail = this.tail.prev;
7941
- if (this.tail) {
7942
- this.tail.next = null;
7943
- } else {
7944
- this.head = null;
7945
- }
7946
- this.length--;
7947
- return res;
7948
- };
7949
- Yallist.prototype.shift = function() {
7950
- if (!this.head) {
7951
- return void 0;
7952
- }
7953
- var res = this.head.value;
7954
- this.head = this.head.next;
7955
- if (this.head) {
7956
- this.head.prev = null;
7957
- } else {
7958
- this.tail = null;
7959
- }
7960
- this.length--;
7961
- return res;
7962
- };
7963
- Yallist.prototype.forEach = function(fn, thisp) {
7964
- thisp = thisp || this;
7965
- for (var walker = this.head, i = 0; walker !== null; i++) {
7966
- fn.call(thisp, walker.value, i, this);
7967
- walker = walker.next;
7968
- }
7969
- };
7970
- Yallist.prototype.forEachReverse = function(fn, thisp) {
7971
- thisp = thisp || this;
7972
- for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
7973
- fn.call(thisp, walker.value, i, this);
7974
- walker = walker.prev;
7975
- }
7976
- };
7977
- Yallist.prototype.get = function(n) {
7978
- for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
7979
- walker = walker.next;
7980
- }
7981
- if (i === n && walker !== null) {
7982
- return walker.value;
7983
- }
7984
- };
7985
- Yallist.prototype.getReverse = function(n) {
7986
- for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
7987
- walker = walker.prev;
7988
- }
7989
- if (i === n && walker !== null) {
7990
- return walker.value;
7991
- }
7992
- };
7993
- Yallist.prototype.map = function(fn, thisp) {
7994
- thisp = thisp || this;
7995
- var res = new Yallist();
7996
- for (var walker = this.head; walker !== null; ) {
7997
- res.push(fn.call(thisp, walker.value, this));
7998
- walker = walker.next;
7999
- }
8000
- return res;
8001
- };
8002
- Yallist.prototype.mapReverse = function(fn, thisp) {
8003
- thisp = thisp || this;
8004
- var res = new Yallist();
8005
- for (var walker = this.tail; walker !== null; ) {
8006
- res.push(fn.call(thisp, walker.value, this));
8007
- walker = walker.prev;
8008
- }
8009
- return res;
8010
- };
8011
- Yallist.prototype.reduce = function(fn, initial) {
8012
- var acc;
8013
- var walker = this.head;
8014
- if (arguments.length > 1) {
8015
- acc = initial;
8016
- } else if (this.head) {
8017
- walker = this.head.next;
8018
- acc = this.head.value;
8019
- } else {
8020
- throw new TypeError("Reduce of empty list with no initial value");
8021
- }
8022
- for (var i = 0; walker !== null; i++) {
8023
- acc = fn(acc, walker.value, i);
8024
- walker = walker.next;
8025
- }
8026
- return acc;
8027
- };
8028
- Yallist.prototype.reduceReverse = function(fn, initial) {
8029
- var acc;
8030
- var walker = this.tail;
8031
- if (arguments.length > 1) {
8032
- acc = initial;
8033
- } else if (this.tail) {
8034
- walker = this.tail.prev;
8035
- acc = this.tail.value;
8036
- } else {
8037
- throw new TypeError("Reduce of empty list with no initial value");
8038
- }
8039
- for (var i = this.length - 1; walker !== null; i--) {
8040
- acc = fn(acc, walker.value, i);
8041
- walker = walker.prev;
8042
- }
8043
- return acc;
8044
- };
8045
- Yallist.prototype.toArray = function() {
8046
- var arr = new Array(this.length);
8047
- for (var i = 0, walker = this.head; walker !== null; i++) {
8048
- arr[i] = walker.value;
8049
- walker = walker.next;
8050
- }
8051
- return arr;
8052
- };
8053
- Yallist.prototype.toArrayReverse = function() {
8054
- var arr = new Array(this.length);
8055
- for (var i = 0, walker = this.tail; walker !== null; i++) {
8056
- arr[i] = walker.value;
8057
- walker = walker.prev;
8058
- }
8059
- return arr;
8060
- };
8061
- Yallist.prototype.slice = function(from, to) {
8062
- to = to || this.length;
8063
- if (to < 0) {
8064
- to += this.length;
8065
- }
8066
- from = from || 0;
8067
- if (from < 0) {
8068
- from += this.length;
8069
- }
8070
- var ret = new Yallist();
8071
- if (to < from || to < 0) {
8072
- return ret;
8073
- }
8074
- if (from < 0) {
8075
- from = 0;
8076
- }
8077
- if (to > this.length) {
8078
- to = this.length;
8079
- }
8080
- for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
8081
- walker = walker.next;
8082
- }
8083
- for (; walker !== null && i < to; i++, walker = walker.next) {
8084
- ret.push(walker.value);
8085
- }
8086
- return ret;
8087
- };
8088
- Yallist.prototype.sliceReverse = function(from, to) {
8089
- to = to || this.length;
8090
- if (to < 0) {
8091
- to += this.length;
8092
- }
8093
- from = from || 0;
8094
- if (from < 0) {
8095
- from += this.length;
8096
- }
8097
- var ret = new Yallist();
8098
- if (to < from || to < 0) {
8099
- return ret;
8100
- }
8101
- if (from < 0) {
8102
- from = 0;
8103
- }
8104
- if (to > this.length) {
8105
- to = this.length;
8106
- }
8107
- for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
8108
- walker = walker.prev;
8109
- }
8110
- for (; walker !== null && i > from; i--, walker = walker.prev) {
8111
- ret.push(walker.value);
8112
- }
8113
- return ret;
8114
- };
8115
- Yallist.prototype.splice = function(start, deleteCount, ...nodes) {
8116
- if (start > this.length) {
8117
- start = this.length - 1;
8118
- }
8119
- if (start < 0) {
8120
- start = this.length + start;
8121
- }
8122
- for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
8123
- walker = walker.next;
8124
- }
8125
- var ret = [];
8126
- for (var i = 0; walker && i < deleteCount; i++) {
8127
- ret.push(walker.value);
8128
- walker = this.removeNode(walker);
8129
- }
8130
- if (walker === null) {
8131
- walker = this.tail;
8132
- }
8133
- if (walker !== this.head && walker !== this.tail) {
8134
- walker = walker.prev;
8135
- }
8136
- for (var i = 0; i < nodes.length; i++) {
8137
- walker = insert(this, walker, nodes[i]);
8138
- }
8139
- return ret;
8140
- };
8141
- Yallist.prototype.reverse = function() {
8142
- var head = this.head;
8143
- var tail = this.tail;
8144
- for (var walker = head; walker !== null; walker = walker.prev) {
8145
- var p = walker.prev;
8146
- walker.prev = walker.next;
8147
- walker.next = p;
8148
- }
8149
- this.head = tail;
8150
- this.tail = head;
8151
- return this;
8152
- };
8153
- function insert(self2, node, value) {
8154
- var inserted = node === self2.head ? new Node(value, null, node, self2) : new Node(value, node, node.next, self2);
8155
- if (inserted.next === null) {
8156
- self2.tail = inserted;
8157
- }
8158
- if (inserted.prev === null) {
8159
- self2.head = inserted;
8160
- }
8161
- self2.length++;
8162
- return inserted;
8163
- }
8164
- function push(self2, item) {
8165
- self2.tail = new Node(item, self2.tail, null, self2);
8166
- if (!self2.head) {
8167
- self2.head = self2.tail;
8168
- }
8169
- self2.length++;
8170
- }
8171
- function unshift(self2, item) {
8172
- self2.head = new Node(item, null, self2.head, self2);
8173
- if (!self2.tail) {
8174
- self2.tail = self2.head;
8175
- }
8176
- self2.length++;
8177
- }
8178
- function Node(value, prev, next, list) {
8179
- if (!(this instanceof Node)) {
8180
- return new Node(value, prev, next, list);
8181
- }
8182
- this.list = list;
8183
- this.value = value;
8184
- if (prev) {
8185
- prev.next = this;
8186
- this.prev = prev;
8187
- } else {
8188
- this.prev = null;
8189
- }
8190
- if (next) {
8191
- next.prev = this;
8192
- this.next = next;
8193
- } else {
8194
- this.next = null;
8195
- }
8196
- }
8197
- try {
8198
- requireIterator()(Yallist);
8199
- } catch (er) {
8200
- }
8201
- return yallist;
8202
- }
8203
- var lruCache;
8204
- var hasRequiredLruCache;
8205
- function requireLruCache() {
8206
- if (hasRequiredLruCache) return lruCache;
8207
- hasRequiredLruCache = 1;
8208
- const Yallist = requireYallist();
8209
- const MAX = Symbol("max");
8210
- const LENGTH = Symbol("length");
8211
- const LENGTH_CALCULATOR = Symbol("lengthCalculator");
8212
- const ALLOW_STALE = Symbol("allowStale");
8213
- const MAX_AGE = Symbol("maxAge");
8214
- const DISPOSE = Symbol("dispose");
8215
- const NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
8216
- const LRU_LIST = Symbol("lruList");
8217
- const CACHE = Symbol("cache");
8218
- const UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
8219
- const naiveLength = () => 1;
7888
+ var lrucache;
7889
+ var hasRequiredLrucache;
7890
+ function requireLrucache() {
7891
+ if (hasRequiredLrucache) return lrucache;
7892
+ hasRequiredLrucache = 1;
8220
7893
  class LRUCache {
8221
- constructor(options) {
8222
- if (typeof options === "number")
8223
- options = { max: options };
8224
- if (!options)
8225
- options = {};
8226
- if (options.max && (typeof options.max !== "number" || options.max < 0))
8227
- throw new TypeError("max must be a non-negative number");
8228
- this[MAX] = options.max || Infinity;
8229
- const lc = options.length || naiveLength;
8230
- this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
8231
- this[ALLOW_STALE] = options.stale || false;
8232
- if (options.maxAge && typeof options.maxAge !== "number")
8233
- throw new TypeError("maxAge must be a number");
8234
- this[MAX_AGE] = options.maxAge || 0;
8235
- this[DISPOSE] = options.dispose;
8236
- this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
8237
- this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
8238
- this.reset();
8239
- }
8240
- // resize the cache when the max changes.
8241
- set max(mL) {
8242
- if (typeof mL !== "number" || mL < 0)
8243
- throw new TypeError("max must be a non-negative number");
8244
- this[MAX] = mL || Infinity;
8245
- trim(this);
8246
- }
8247
- get max() {
8248
- return this[MAX];
8249
- }
8250
- set allowStale(allowStale) {
8251
- this[ALLOW_STALE] = !!allowStale;
8252
- }
8253
- get allowStale() {
8254
- return this[ALLOW_STALE];
8255
- }
8256
- set maxAge(mA) {
8257
- if (typeof mA !== "number")
8258
- throw new TypeError("maxAge must be a non-negative number");
8259
- this[MAX_AGE] = mA;
8260
- trim(this);
8261
- }
8262
- get maxAge() {
8263
- return this[MAX_AGE];
8264
- }
8265
- // resize the cache when the lengthCalculator changes.
8266
- set lengthCalculator(lC) {
8267
- if (typeof lC !== "function")
8268
- lC = naiveLength;
8269
- if (lC !== this[LENGTH_CALCULATOR]) {
8270
- this[LENGTH_CALCULATOR] = lC;
8271
- this[LENGTH] = 0;
8272
- this[LRU_LIST].forEach((hit) => {
8273
- hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
8274
- this[LENGTH] += hit.length;
8275
- });
8276
- }
8277
- trim(this);
8278
- }
8279
- get lengthCalculator() {
8280
- return this[LENGTH_CALCULATOR];
8281
- }
8282
- get length() {
8283
- return this[LENGTH];
8284
- }
8285
- get itemCount() {
8286
- return this[LRU_LIST].length;
8287
- }
8288
- rforEach(fn, thisp) {
8289
- thisp = thisp || this;
8290
- for (let walker = this[LRU_LIST].tail; walker !== null; ) {
8291
- const prev = walker.prev;
8292
- forEachStep(this, fn, walker, thisp);
8293
- walker = prev;
8294
- }
8295
- }
8296
- forEach(fn, thisp) {
8297
- thisp = thisp || this;
8298
- for (let walker = this[LRU_LIST].head; walker !== null; ) {
8299
- const next = walker.next;
8300
- forEachStep(this, fn, walker, thisp);
8301
- walker = next;
8302
- }
8303
- }
8304
- keys() {
8305
- return this[LRU_LIST].toArray().map((k) => k.key);
8306
- }
8307
- values() {
8308
- return this[LRU_LIST].toArray().map((k) => k.value);
8309
- }
8310
- reset() {
8311
- if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
8312
- this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
8313
- }
8314
- this[CACHE] = /* @__PURE__ */ new Map();
8315
- this[LRU_LIST] = new Yallist();
8316
- this[LENGTH] = 0;
8317
- }
8318
- dump() {
8319
- return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
8320
- k: hit.key,
8321
- v: hit.value,
8322
- e: hit.now + (hit.maxAge || 0)
8323
- }).toArray().filter((h) => h);
8324
- }
8325
- dumpLru() {
8326
- return this[LRU_LIST];
8327
- }
8328
- set(key, value, maxAge) {
8329
- maxAge = maxAge || this[MAX_AGE];
8330
- if (maxAge && typeof maxAge !== "number")
8331
- throw new TypeError("maxAge must be a number");
8332
- const now = maxAge ? Date.now() : 0;
8333
- const len = this[LENGTH_CALCULATOR](value, key);
8334
- if (this[CACHE].has(key)) {
8335
- if (len > this[MAX]) {
8336
- del(this, this[CACHE].get(key));
8337
- return false;
8338
- }
8339
- const node = this[CACHE].get(key);
8340
- const item = node.value;
8341
- if (this[DISPOSE]) {
8342
- if (!this[NO_DISPOSE_ON_SET])
8343
- this[DISPOSE](key, item.value);
8344
- }
8345
- item.now = now;
8346
- item.maxAge = maxAge;
8347
- item.value = value;
8348
- this[LENGTH] += len - item.length;
8349
- item.length = len;
8350
- this.get(key);
8351
- trim(this);
8352
- return true;
8353
- }
8354
- const hit = new Entry(key, value, len, now, maxAge);
8355
- if (hit.length > this[MAX]) {
8356
- if (this[DISPOSE])
8357
- this[DISPOSE](key, value);
8358
- return false;
8359
- }
8360
- this[LENGTH] += hit.length;
8361
- this[LRU_LIST].unshift(hit);
8362
- this[CACHE].set(key, this[LRU_LIST].head);
8363
- trim(this);
8364
- return true;
8365
- }
8366
- has(key) {
8367
- if (!this[CACHE].has(key)) return false;
8368
- const hit = this[CACHE].get(key).value;
8369
- return !isStale(this, hit);
7894
+ constructor() {
7895
+ this.max = 1e3;
7896
+ this.map = /* @__PURE__ */ new Map();
8370
7897
  }
8371
7898
  get(key) {
8372
- return get(this, key, true);
8373
- }
8374
- peek(key) {
8375
- return get(this, key, false);
8376
- }
8377
- pop() {
8378
- const node = this[LRU_LIST].tail;
8379
- if (!node)
8380
- return null;
8381
- del(this, node);
8382
- return node.value;
8383
- }
8384
- del(key) {
8385
- del(this, this[CACHE].get(key));
8386
- }
8387
- load(arr) {
8388
- this.reset();
8389
- const now = Date.now();
8390
- for (let l = arr.length - 1; l >= 0; l--) {
8391
- const hit = arr[l];
8392
- const expiresAt = hit.e || 0;
8393
- if (expiresAt === 0)
8394
- this.set(hit.k, hit.v);
8395
- else {
8396
- const maxAge = expiresAt - now;
8397
- if (maxAge > 0) {
8398
- this.set(hit.k, hit.v, maxAge);
8399
- }
8400
- }
7899
+ const value = this.map.get(key);
7900
+ if (value === void 0) {
7901
+ return void 0;
7902
+ } else {
7903
+ this.map.delete(key);
7904
+ this.map.set(key, value);
7905
+ return value;
8401
7906
  }
8402
7907
  }
8403
- prune() {
8404
- this[CACHE].forEach((value, key) => get(this, key, false));
7908
+ delete(key) {
7909
+ return this.map.delete(key);
8405
7910
  }
8406
- }
8407
- const get = (self2, key, doUse) => {
8408
- const node = self2[CACHE].get(key);
8409
- if (node) {
8410
- const hit = node.value;
8411
- if (isStale(self2, hit)) {
8412
- del(self2, node);
8413
- if (!self2[ALLOW_STALE])
8414
- return void 0;
8415
- } else {
8416
- if (doUse) {
8417
- if (self2[UPDATE_AGE_ON_GET])
8418
- node.value.now = Date.now();
8419
- self2[LRU_LIST].unshiftNode(node);
7911
+ set(key, value) {
7912
+ const deleted = this.delete(key);
7913
+ if (!deleted && value !== void 0) {
7914
+ if (this.map.size >= this.max) {
7915
+ const firstKey = this.map.keys().next().value;
7916
+ this.delete(firstKey);
8420
7917
  }
7918
+ this.map.set(key, value);
8421
7919
  }
8422
- return hit.value;
8423
- }
8424
- };
8425
- const isStale = (self2, hit) => {
8426
- if (!hit || !hit.maxAge && !self2[MAX_AGE])
8427
- return false;
8428
- const diff = Date.now() - hit.now;
8429
- return hit.maxAge ? diff > hit.maxAge : self2[MAX_AGE] && diff > self2[MAX_AGE];
8430
- };
8431
- const trim = (self2) => {
8432
- if (self2[LENGTH] > self2[MAX]) {
8433
- for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) {
8434
- const prev = walker.prev;
8435
- del(self2, walker);
8436
- walker = prev;
8437
- }
8438
- }
8439
- };
8440
- const del = (self2, node) => {
8441
- if (node) {
8442
- const hit = node.value;
8443
- if (self2[DISPOSE])
8444
- self2[DISPOSE](hit.key, hit.value);
8445
- self2[LENGTH] -= hit.length;
8446
- self2[CACHE].delete(hit.key);
8447
- self2[LRU_LIST].removeNode(node);
7920
+ return this;
8448
7921
  }
8449
- };
8450
- class Entry {
8451
- constructor(key, value, length, now, maxAge) {
8452
- this.key = key;
8453
- this.value = value;
8454
- this.length = length;
8455
- this.now = now;
8456
- this.maxAge = maxAge || 0;
8457
- }
8458
- }
8459
- const forEachStep = (self2, fn, node, thisp) => {
8460
- let hit = node.value;
8461
- if (isStale(self2, hit)) {
8462
- del(self2, node);
8463
- if (!self2[ALLOW_STALE])
8464
- hit = void 0;
8465
- }
8466
- if (hit)
8467
- fn.call(thisp, hit.value, hit.key, self2);
8468
- };
8469
- lruCache = LRUCache;
8470
- return lruCache;
7922
+ }
7923
+ lrucache = LRUCache;
7924
+ return lrucache;
8471
7925
  }
8472
7926
  var range;
8473
7927
  var hasRequiredRange;
8474
7928
  function requireRange() {
8475
7929
  if (hasRequiredRange) return range;
8476
7930
  hasRequiredRange = 1;
7931
+ const SPACE_CHARACTERS = /\s+/g;
8477
7932
  class Range {
8478
7933
  constructor(range2, options) {
8479
7934
  options = parseOptions(options);
@@ -8487,16 +7942,16 @@ function requireRange() {
8487
7942
  if (range2 instanceof Comparator) {
8488
7943
  this.raw = range2.value;
8489
7944
  this.set = [[range2]];
8490
- this.format();
7945
+ this.formatted = void 0;
8491
7946
  return this;
8492
7947
  }
8493
7948
  this.options = options;
8494
7949
  this.loose = !!options.loose;
8495
7950
  this.includePrerelease = !!options.includePrerelease;
8496
- this.raw = range2;
8497
- this.set = range2.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
7951
+ this.raw = range2.trim().replace(SPACE_CHARACTERS, " ");
7952
+ this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
8498
7953
  if (!this.set.length) {
8499
- throw new TypeError(`Invalid SemVer Range: ${range2}`);
7954
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
8500
7955
  }
8501
7956
  if (this.set.length > 1) {
8502
7957
  const first = this.set[0];
@@ -8512,21 +7967,35 @@ function requireRange() {
8512
7967
  }
8513
7968
  }
8514
7969
  }
8515
- this.format();
7970
+ this.formatted = void 0;
7971
+ }
7972
+ get range() {
7973
+ if (this.formatted === void 0) {
7974
+ this.formatted = "";
7975
+ for (let i = 0; i < this.set.length; i++) {
7976
+ if (i > 0) {
7977
+ this.formatted += "||";
7978
+ }
7979
+ const comps = this.set[i];
7980
+ for (let k = 0; k < comps.length; k++) {
7981
+ if (k > 0) {
7982
+ this.formatted += " ";
7983
+ }
7984
+ this.formatted += comps[k].toString().trim();
7985
+ }
7986
+ }
7987
+ }
7988
+ return this.formatted;
8516
7989
  }
8517
7990
  format() {
8518
- this.range = this.set.map((comps) => {
8519
- return comps.join(" ").trim();
8520
- }).join("||").trim();
8521
7991
  return this.range;
8522
7992
  }
8523
7993
  toString() {
8524
7994
  return this.range;
8525
7995
  }
8526
7996
  parseRange(range2) {
8527
- range2 = range2.trim();
8528
- const memoOpts = Object.keys(this.options).join(",");
8529
- const memoKey = `parseRange:${memoOpts}:${range2}`;
7997
+ const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
7998
+ const memoKey = memoOpts + ":" + range2;
8530
7999
  const cached = cache.get(memoKey);
8531
8000
  if (cached) {
8532
8001
  return cached;
@@ -8538,8 +8007,9 @@ function requireRange() {
8538
8007
  range2 = range2.replace(re2[t.COMPARATORTRIM], comparatorTrimReplace);
8539
8008
  debug("comparator trim", range2);
8540
8009
  range2 = range2.replace(re2[t.TILDETRIM], tildeTrimReplace);
8010
+ debug("tilde trim", range2);
8541
8011
  range2 = range2.replace(re2[t.CARETTRIM], caretTrimReplace);
8542
- range2 = range2.split(/\s+/).join(" ");
8012
+ debug("caret trim", range2);
8543
8013
  let rangeList = range2.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
8544
8014
  if (loose) {
8545
8015
  rangeList = rangeList.filter((comp) => {
@@ -8598,19 +8068,20 @@ function requireRange() {
8598
8068
  }
8599
8069
  }
8600
8070
  range = Range;
8601
- const LRU = requireLruCache();
8602
- const cache = new LRU({ max: 1e3 });
8071
+ const LRU = requireLrucache();
8072
+ const cache = new LRU();
8603
8073
  const parseOptions = requireParseOptions();
8604
8074
  const Comparator = requireComparator();
8605
8075
  const debug = requireDebug();
8606
8076
  const SemVer = requireSemver$1();
8607
8077
  const {
8608
- re: re2,
8078
+ safeRe: re2,
8609
8079
  t,
8610
8080
  comparatorTrimReplace,
8611
8081
  tildeTrimReplace,
8612
8082
  caretTrimReplace
8613
8083
  } = requireRe();
8084
+ const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = requireConstants();
8614
8085
  const isNullSet = (c) => c.value === "<0.0.0-0";
8615
8086
  const isAny = (c) => c.value === "";
8616
8087
  const isSatisfiable = (comparators, options) => {
@@ -8638,9 +8109,9 @@ function requireRange() {
8638
8109
  return comp;
8639
8110
  };
8640
8111
  const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
8641
- const replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => {
8642
- return replaceTilde(c, options);
8643
- }).join(" ");
8112
+ const replaceTildes = (comp, options) => {
8113
+ return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
8114
+ };
8644
8115
  const replaceTilde = (comp, options) => {
8645
8116
  const r = options.loose ? re2[t.TILDELOOSE] : re2[t.TILDE];
8646
8117
  return comp.replace(r, (_, M, m, p, pr) => {
@@ -8662,9 +8133,9 @@ function requireRange() {
8662
8133
  return ret;
8663
8134
  });
8664
8135
  };
8665
- const replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => {
8666
- return replaceCaret(c, options);
8667
- }).join(" ");
8136
+ const replaceCarets = (comp, options) => {
8137
+ return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
8138
+ };
8668
8139
  const replaceCaret = (comp, options) => {
8669
8140
  debug("caret", comp, options);
8670
8141
  const r = options.loose ? re2[t.CARETLOOSE] : re2[t.CARET];
@@ -8711,9 +8182,7 @@ function requireRange() {
8711
8182
  };
8712
8183
  const replaceXRanges = (comp, options) => {
8713
8184
  debug("replaceXRanges", comp, options);
8714
- return comp.split(/\s+/).map((c) => {
8715
- return replaceXRange(c, options);
8716
- }).join(" ");
8185
+ return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
8717
8186
  };
8718
8187
  const replaceXRange = (comp, options) => {
8719
8188
  comp = comp.trim();
@@ -8778,7 +8247,7 @@ function requireRange() {
8778
8247
  debug("replaceGTE0", comp, options);
8779
8248
  return comp.trim().replace(re2[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
8780
8249
  };
8781
- const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
8250
+ const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
8782
8251
  if (isX(fM)) {
8783
8252
  from = "";
8784
8253
  } else if (isX(fm)) {
@@ -8849,6 +8318,7 @@ function requireComparator() {
8849
8318
  comp = comp.value;
8850
8319
  }
8851
8320
  }
8321
+ comp = comp.trim().split(/\s+/).join(" ");
8852
8322
  debug("comparator", comp, options);
8853
8323
  this.options = options;
8854
8324
  this.loose = !!options.loose;
@@ -8897,12 +8367,6 @@ function requireComparator() {
8897
8367
  if (!(comp instanceof Comparator)) {
8898
8368
  throw new TypeError("a Comparator is required");
8899
8369
  }
8900
- if (!options || typeof options !== "object") {
8901
- options = {
8902
- loose: !!options,
8903
- includePrerelease: false
8904
- };
8905
- }
8906
8370
  if (this.operator === "") {
8907
8371
  if (this.value === "") {
8908
8372
  return true;
@@ -8914,18 +8378,34 @@ function requireComparator() {
8914
8378
  }
8915
8379
  return new Range(this.value, options).test(comp.semver);
8916
8380
  }
8917
- const sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">");
8918
- const sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<");
8919
- const sameSemVer = this.semver.version === comp.semver.version;
8920
- const differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<=");
8921
- const oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<");
8922
- const oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">");
8923
- return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
8381
+ options = parseOptions(options);
8382
+ if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
8383
+ return false;
8384
+ }
8385
+ if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
8386
+ return false;
8387
+ }
8388
+ if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
8389
+ return true;
8390
+ }
8391
+ if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
8392
+ return true;
8393
+ }
8394
+ if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
8395
+ return true;
8396
+ }
8397
+ if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
8398
+ return true;
8399
+ }
8400
+ if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
8401
+ return true;
8402
+ }
8403
+ return false;
8924
8404
  }
8925
8405
  }
8926
8406
  comparator = Comparator;
8927
8407
  const parseOptions = requireParseOptions();
8928
- const { re: re2, t } = requireRe();
8408
+ const { safeRe: re2, t } = requireRe();
8929
8409
  const cmp = requireCmp();
8930
8410
  const debug = requireDebug();
8931
8411
  const SemVer = requireSemver$1();
@@ -9190,7 +8670,7 @@ function requireIntersects() {
9190
8670
  const intersects = (r1, r2, options) => {
9191
8671
  r1 = new Range(r1, options);
9192
8672
  r2 = new Range(r2, options);
9193
- return r1.intersects(r2);
8673
+ return r1.intersects(r2, options);
9194
8674
  };
9195
8675
  intersects_1 = intersects;
9196
8676
  return intersects_1;
@@ -9276,6 +8756,8 @@ function requireSubset() {
9276
8756
  }
9277
8757
  return true;
9278
8758
  };
8759
+ const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
8760
+ const minimumVersion = [new Comparator(">=0.0.0")];
9279
8761
  const simpleSubset = (sub, dom, options) => {
9280
8762
  if (sub === dom) {
9281
8763
  return true;
@@ -9284,16 +8766,16 @@ function requireSubset() {
9284
8766
  if (dom.length === 1 && dom[0].semver === ANY) {
9285
8767
  return true;
9286
8768
  } else if (options.includePrerelease) {
9287
- sub = [new Comparator(">=0.0.0-0")];
8769
+ sub = minimumVersionWithPreRelease;
9288
8770
  } else {
9289
- sub = [new Comparator(">=0.0.0")];
8771
+ sub = minimumVersion;
9290
8772
  }
9291
8773
  }
9292
8774
  if (dom.length === 1 && dom[0].semver === ANY) {
9293
8775
  if (options.includePrerelease) {
9294
8776
  return true;
9295
8777
  } else {
9296
- dom = [new Comparator(">=0.0.0")];
8778
+ dom = minimumVersion;
9297
8779
  }
9298
8780
  }
9299
8781
  const eqSet = /* @__PURE__ */ new Set();
@@ -9494,6 +8976,7 @@ function requireSemver() {
9494
8976
  src: internalRe.src,
9495
8977
  tokens: internalRe.t,
9496
8978
  SEMVER_SPEC_VERSION: constants2.SEMVER_SPEC_VERSION,
8979
+ RELEASE_TYPES: constants2.RELEASE_TYPES,
9497
8980
  compareIdentifiers: identifiers2.compareIdentifiers,
9498
8981
  rcompareIdentifiers: identifiers2.rcompareIdentifiers
9499
8982
  };
@@ -10049,11 +9532,45 @@ const CoordinationType$1 = {
10049
9532
  CoordinationType$1.EMBEDDING_OBS_SET_LABEL_SIZE,
10050
9533
  CoordinationType$1.EMBEDDING_OBS_RADIUS,
10051
9534
  CoordinationType$1.EMBEDDING_OBS_OPACITY,
9535
+ CoordinationType$1.SPATIAL_ZOOM,
9536
+ CoordinationType$1.SPATIAL_ROTATION,
9537
+ CoordinationType$1.SPATIAL_ROTATION_X,
9538
+ CoordinationType$1.SPATIAL_ROTATION_Y,
9539
+ CoordinationType$1.SPATIAL_ROTATION_Z,
9540
+ CoordinationType$1.SPATIAL_ROTATION_ORBIT,
9541
+ CoordinationType$1.SPATIAL_TARGET_X,
9542
+ CoordinationType$1.SPATIAL_TARGET_Y,
9543
+ CoordinationType$1.SPATIAL_TARGET_Z,
9544
+ CoordinationType$1.SPATIAL_AXIS_FIXED,
9545
+ CoordinationType$1.SPATIAL_ORBIT_AXIS,
10052
9546
  CoordinationType$1.FEATURE_AGGREGATION_STRATEGY
10053
9547
  ];
10054
9548
  ({
10055
9549
  [ViewType$1.NEUROGLANCER]: [
10056
- CoordinationType$1.DATASET
9550
+ CoordinationType$1.DATASET,
9551
+ CoordinationType$1.SPATIAL_TARGET_X,
9552
+ CoordinationType$1.SPATIAL_TARGET_Y,
9553
+ CoordinationType$1.SPATIAL_TARGET_Z,
9554
+ CoordinationType$1.SPATIAL_ROTATION_X,
9555
+ CoordinationType$1.SPATIAL_ROTATION_Y,
9556
+ CoordinationType$1.SPATIAL_ROTATION_Z,
9557
+ CoordinationType$1.SPATIAL_AXIS_FIXED,
9558
+ CoordinationType$1.SPATIAL_ORBIT_AXIS,
9559
+ CoordinationType$1.SPATIAL_ZOOM,
9560
+ CoordinationType$1.OBS_FILTER,
9561
+ CoordinationType$1.OBS_HIGHLIGHT,
9562
+ CoordinationType$1.OBS_SET_SELECTION,
9563
+ CoordinationType$1.OBS_SET_FILTER,
9564
+ CoordinationType$1.OBS_SET_HIGHLIGHT,
9565
+ CoordinationType$1.OBS_SET_COLOR,
9566
+ CoordinationType$1.OBS_TYPE,
9567
+ CoordinationType$1.ADDITIONAL_OBS_SETS,
9568
+ CoordinationType$1.OBS_SET_COLOR,
9569
+ CoordinationType$1.OBS_COLOR_ENCODING,
9570
+ CoordinationType$1.OBS_SET_SELECTION,
9571
+ CoordinationType$1.EMBEDDING_TYPE,
9572
+ CoordinationType$1.OBS_COLOR_ENCODING,
9573
+ CoordinationType$1.TOOLTIPS_VISIBLE
10057
9574
  ],
10058
9575
  [ViewType$1.SCATTERPLOT]: [
10059
9576
  CoordinationType$1.DATASET,