@modern-js/repo-generator 0.0.0-next-20221129072133 → 0.0.0-next-20221129091510

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 +525 -2091
  2. package/package.json +13 -13
package/dist/index.js CHANGED
@@ -44808,8 +44808,10 @@ check path: ${_utils.chalk.blue.underline(generator)} exist a package.json file
44808
44808
  };
44809
44809
  }
44810
44810
  async runGenerator(generator, config = {}) {
44811
- const spinner = (0, _utils.ora)("Loading...").start();
44812
- spinner.color = "yellow";
44811
+ const spinner = (0, _utils.ora)({
44812
+ text: "Load Generator...",
44813
+ spinner: "runner"
44814
+ }).start();
44813
44815
  const {
44814
44816
  materialKey,
44815
44817
  generatorPkg,
@@ -44828,8 +44830,10 @@ check path: ${_utils.chalk.blue.underline(generator)} exist a package.json file
44828
44830
  this.setCurrent(null);
44829
44831
  }
44830
44832
  async runSubGenerator(subGenerator, relativePwdPath = "", config) {
44831
- const spinner = (0, _utils.ora)("Loading...").start();
44832
- spinner.color = "yellow";
44833
+ const spinner = (0, _utils.ora)({
44834
+ text: "Load Generator...",
44835
+ spinner: "runner"
44836
+ }).start();
44833
44837
  const {
44834
44838
  materialKey,
44835
44839
  generatorPkg,
@@ -45976,7 +45980,6 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
45976
45980
  this._redirectable.emit(event, arg1, arg2, arg3);
45977
45981
  };
45978
45982
  });
45979
- var InvalidUrlError = createErrorType("ERR_INVALID_URL", "Invalid URL", TypeError);
45980
45983
  var RedirectionError = createErrorType("ERR_FR_REDIRECTION_FAILURE", "Redirected request failed");
45981
45984
  var TooManyRedirectsError = createErrorType("ERR_FR_TOO_MANY_REDIRECTS", "Maximum number of redirects exceeded");
45982
45985
  var MaxBodyLengthExceededError = createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED", "Request body larger than maxBodyLength limit");
@@ -46009,10 +46012,10 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
46009
46012
  if (this._ending) {
46010
46013
  throw new WriteAfterEndError();
46011
46014
  }
46012
- if (!isString3(data) && !isBuffer(data)) {
46015
+ if (!(typeof data === "string" || typeof data === "object" && "length" in data)) {
46013
46016
  throw new TypeError("data should be a string, Buffer or Uint8Array");
46014
46017
  }
46015
- if (isFunction4(encoding)) {
46018
+ if (typeof encoding === "function") {
46016
46019
  callback = encoding;
46017
46020
  encoding = null;
46018
46021
  }
@@ -46032,10 +46035,10 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
46032
46035
  }
46033
46036
  };
46034
46037
  RedirectableRequest.prototype.end = function(data, encoding, callback) {
46035
- if (isFunction4(data)) {
46038
+ if (typeof data === "function") {
46036
46039
  callback = data;
46037
46040
  data = encoding = null;
46038
- } else if (isFunction4(encoding)) {
46041
+ } else if (typeof encoding === "function") {
46039
46042
  callback = encoding;
46040
46043
  encoding = null;
46041
46044
  }
@@ -46159,7 +46162,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
46159
46162
  for (var event of events) {
46160
46163
  request.on(event, eventHandlers[event]);
46161
46164
  }
46162
- this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : this._options.path;
46165
+ this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : this._currentUrl = this._options.path;
46163
46166
  if (this._isRedirect) {
46164
46167
  var i = 0;
46165
46168
  var self3 = this;
@@ -46224,7 +46227,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
46224
46227
  try {
46225
46228
  redirectUrl = url.resolve(currentUrl, location);
46226
46229
  } catch (cause) {
46227
- this.emit("error", new RedirectionError({ cause }));
46230
+ this.emit("error", new RedirectionError(cause));
46228
46231
  return;
46229
46232
  }
46230
46233
  debug("redirecting to", redirectUrl);
@@ -46234,7 +46237,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
46234
46237
  if (redirectUrlParts.protocol !== currentUrlParts.protocol && redirectUrlParts.protocol !== "https:" || redirectUrlParts.host !== currentHost && !isSubdomain(redirectUrlParts.host, currentHost)) {
46235
46238
  removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
46236
46239
  }
46237
- if (isFunction4(beforeRedirect)) {
46240
+ if (typeof beforeRedirect === "function") {
46238
46241
  var responseDetails = {
46239
46242
  headers: response.headers,
46240
46243
  statusCode
@@ -46255,7 +46258,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
46255
46258
  try {
46256
46259
  this._performRequest();
46257
46260
  } catch (cause) {
46258
- this.emit("error", new RedirectionError({ cause }));
46261
+ this.emit("error", new RedirectionError(cause));
46259
46262
  }
46260
46263
  };
46261
46264
  function wrap(protocols) {
@@ -46269,17 +46272,13 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
46269
46272
  var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
46270
46273
  var wrappedProtocol = exports2[scheme] = Object.create(nativeProtocol);
46271
46274
  function request(input, options3, callback) {
46272
- if (isString3(input)) {
46273
- var parsed;
46275
+ if (typeof input === "string") {
46276
+ var urlStr = input;
46274
46277
  try {
46275
- parsed = urlToOptions(new URL(input));
46278
+ input = urlToOptions(new URL(urlStr));
46276
46279
  } catch (err) {
46277
- parsed = url.parse(input);
46280
+ input = url.parse(urlStr);
46278
46281
  }
46279
- if (!isString3(parsed.protocol)) {
46280
- throw new InvalidUrlError({ input });
46281
- }
46282
- input = parsed;
46283
46282
  } else if (URL && input instanceof URL) {
46284
46283
  input = urlToOptions(input);
46285
46284
  } else {
@@ -46287,7 +46286,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
46287
46286
  options3 = input;
46288
46287
  input = { protocol };
46289
46288
  }
46290
- if (isFunction4(options3)) {
46289
+ if (typeof options3 === "function") {
46291
46290
  callback = options3;
46292
46291
  options3 = null;
46293
46292
  }
@@ -46296,9 +46295,6 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
46296
46295
  maxBodyLength: exports2.maxBodyLength
46297
46296
  }, input, options3);
46298
46297
  options3.nativeProtocols = nativeProtocols;
46299
- if (!isString3(options3.host) && !isString3(options3.hostname)) {
46300
- options3.hostname = "::1";
46301
- }
46302
46298
  assert.equal(options3.protocol, protocol, "protocol mismatch");
46303
46299
  debug("options", options3);
46304
46300
  return new RedirectableRequest(options3, callback);
@@ -46342,16 +46338,20 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
46342
46338
  }
46343
46339
  return lastValue === null || typeof lastValue === "undefined" ? void 0 : String(lastValue).trim();
46344
46340
  }
46345
- function createErrorType(code, message, baseClass) {
46346
- function CustomError(properties) {
46341
+ function createErrorType(code, defaultMessage) {
46342
+ function CustomError(cause) {
46347
46343
  Error.captureStackTrace(this, this.constructor);
46348
- Object.assign(this, properties || {});
46349
- this.code = code;
46350
- this.message = this.cause ? message + ": " + this.cause.message : message;
46344
+ if (!cause) {
46345
+ this.message = defaultMessage;
46346
+ } else {
46347
+ this.message = defaultMessage + ": " + cause.message;
46348
+ this.cause = cause;
46349
+ }
46351
46350
  }
46352
- CustomError.prototype = new (baseClass || Error)();
46351
+ CustomError.prototype = new Error();
46353
46352
  CustomError.prototype.constructor = CustomError;
46354
46353
  CustomError.prototype.name = "Error [" + code + "]";
46354
+ CustomError.prototype.code = code;
46355
46355
  return CustomError;
46356
46356
  }
46357
46357
  function abortRequest(request) {
@@ -46362,19 +46362,9 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
46362
46362
  request.abort();
46363
46363
  }
46364
46364
  function isSubdomain(subdomain, domain) {
46365
- assert(isString3(subdomain) && isString3(domain));
46366
- var dot = subdomain.length - domain.length - 1;
46365
+ const dot = subdomain.length - domain.length - 1;
46367
46366
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
46368
46367
  }
46369
- function isString3(value) {
46370
- return typeof value === "string" || value instanceof String;
46371
- }
46372
- function isFunction4(value) {
46373
- return typeof value === "function";
46374
- }
46375
- function isBuffer(value) {
46376
- return typeof value === "object" && "length" in value;
46377
- }
46378
46368
  module2.exports = wrap({ http, https });
46379
46369
  module2.exports.wrap = wrap;
46380
46370
  });
@@ -48204,9 +48194,8 @@ var require_read_entry = __commonJSMin((exports, module2) => {
48204
48194
  }
48205
48195
  this.path = normPath(header.path);
48206
48196
  this.mode = header.mode;
48207
- if (this.mode) {
48197
+ if (this.mode)
48208
48198
  this.mode = this.mode & 4095;
48209
- }
48210
48199
  this.uid = header.uid;
48211
48200
  this.gid = header.gid;
48212
48201
  this.uname = header.uname;
@@ -48218,35 +48207,29 @@ var require_read_entry = __commonJSMin((exports, module2) => {
48218
48207
  this.linkpath = normPath(header.linkpath);
48219
48208
  this.uname = header.uname;
48220
48209
  this.gname = header.gname;
48221
- if (ex) {
48210
+ if (ex)
48222
48211
  this[SLURP](ex);
48223
- }
48224
- if (gex) {
48212
+ if (gex)
48225
48213
  this[SLURP](gex, true);
48226
- }
48227
48214
  }
48228
48215
  write(data) {
48229
48216
  const writeLen = data.length;
48230
- if (writeLen > this.blockRemain) {
48217
+ if (writeLen > this.blockRemain)
48231
48218
  throw new Error("writing more to entry than is appropriate");
48232
- }
48233
48219
  const r = this.remain;
48234
48220
  const br = this.blockRemain;
48235
48221
  this.remain = Math.max(0, r - writeLen);
48236
48222
  this.blockRemain = Math.max(0, br - writeLen);
48237
- if (this.ignore) {
48223
+ if (this.ignore)
48238
48224
  return true;
48239
- }
48240
- if (r >= writeLen) {
48225
+ if (r >= writeLen)
48241
48226
  return super.write(data);
48242
- }
48243
48227
  return super.write(data.slice(0, r));
48244
48228
  }
48245
48229
  [SLURP](ex, global2) {
48246
48230
  for (const k in ex) {
48247
- if (ex[k] !== null && ex[k] !== void 0 && !(global2 && k === "path")) {
48231
+ if (ex[k] !== null && ex[k] !== void 0 && !(global2 && k === "path"))
48248
48232
  this[k] = k === "path" || k === "linkpath" ? normPath(ex[k]) : ex[k];
48249
- }
48250
48233
  }
48251
48234
  }
48252
48235
  };
@@ -48281,13 +48264,12 @@ var require_types = __commonJSMin((exports) => {
48281
48264
  var require_large_numbers = __commonJSMin((exports, module2) => {
48282
48265
  "use strict";
48283
48266
  var encode = (num, buf) => {
48284
- if (!Number.isSafeInteger(num)) {
48267
+ if (!Number.isSafeInteger(num))
48285
48268
  throw Error("cannot encode number outside of javascript safe integer range");
48286
- } else if (num < 0) {
48269
+ else if (num < 0)
48287
48270
  encodeNegative(num, buf);
48288
- } else {
48271
+ else
48289
48272
  encodePositive(num, buf);
48290
- }
48291
48273
  return buf;
48292
48274
  };
48293
48275
  var encodePositive = (num, buf) => {
@@ -48304,11 +48286,11 @@ var require_large_numbers = __commonJSMin((exports, module2) => {
48304
48286
  for (var i = buf.length; i > 1; i--) {
48305
48287
  var byte = num & 255;
48306
48288
  num = Math.floor(num / 256);
48307
- if (flipped) {
48289
+ if (flipped)
48308
48290
  buf[i - 1] = onesComp(byte);
48309
- } else if (byte === 0) {
48291
+ else if (byte === 0)
48310
48292
  buf[i - 1] = 0;
48311
- } else {
48293
+ else {
48312
48294
  flipped = true;
48313
48295
  buf[i - 1] = twosComp(byte);
48314
48296
  }
@@ -48317,12 +48299,10 @@ var require_large_numbers = __commonJSMin((exports, module2) => {
48317
48299
  var parse2 = (buf) => {
48318
48300
  const pre = buf[0];
48319
48301
  const value = pre === 128 ? pos(buf.slice(1, buf.length)) : pre === 255 ? twos(buf) : null;
48320
- if (value === null) {
48302
+ if (value === null)
48321
48303
  throw Error("invalid base256 encoding");
48322
- }
48323
- if (!Number.isSafeInteger(value)) {
48304
+ if (!Number.isSafeInteger(value))
48324
48305
  throw Error("parsed number outside of javascript safe integer range");
48325
- }
48326
48306
  return value;
48327
48307
  };
48328
48308
  var twos = (buf) => {
@@ -48332,17 +48312,16 @@ var require_large_numbers = __commonJSMin((exports, module2) => {
48332
48312
  for (var i = len - 1; i > -1; i--) {
48333
48313
  var byte = buf[i];
48334
48314
  var f;
48335
- if (flipped) {
48315
+ if (flipped)
48336
48316
  f = onesComp(byte);
48337
- } else if (byte === 0) {
48317
+ else if (byte === 0)
48338
48318
  f = byte;
48339
- } else {
48319
+ else {
48340
48320
  flipped = true;
48341
48321
  f = twosComp(byte);
48342
48322
  }
48343
- if (f !== 0) {
48323
+ if (f !== 0)
48344
48324
  sum -= f * Math.pow(256, len - i - 1);
48345
- }
48346
48325
  }
48347
48326
  return sum;
48348
48327
  };
@@ -48351,9 +48330,8 @@ var require_large_numbers = __commonJSMin((exports, module2) => {
48351
48330
  var sum = 0;
48352
48331
  for (var i = len - 1; i > -1; i--) {
48353
48332
  var byte = buf[i];
48354
- if (byte !== 0) {
48333
+ if (byte !== 0)
48355
48334
  sum += byte * Math.pow(256, len - i - 1);
48356
- }
48357
48335
  }
48358
48336
  return sum;
48359
48337
  };
@@ -48392,19 +48370,16 @@ var require_header = __commonJSMin((exports, module2) => {
48392
48370
  this.devmin = 0;
48393
48371
  this.atime = null;
48394
48372
  this.ctime = null;
48395
- if (Buffer.isBuffer(data)) {
48373
+ if (Buffer.isBuffer(data))
48396
48374
  this.decode(data, off || 0, ex, gex);
48397
- } else if (data) {
48375
+ else if (data)
48398
48376
  this.set(data);
48399
- }
48400
48377
  }
48401
48378
  decode(buf, off, ex, gex) {
48402
- if (!off) {
48379
+ if (!off)
48403
48380
  off = 0;
48404
- }
48405
- if (!buf || !(buf.length >= off + 512)) {
48381
+ if (!buf || !(buf.length >= off + 512))
48406
48382
  throw new Error("need 512 bytes for header");
48407
- }
48408
48383
  this.path = decString(buf, off, 100);
48409
48384
  this.mode = decNumber(buf, off + 100, 8);
48410
48385
  this.uid = decNumber(buf, off + 108, 8);
@@ -48415,15 +48390,12 @@ var require_header = __commonJSMin((exports, module2) => {
48415
48390
  this[SLURP](ex);
48416
48391
  this[SLURP](gex, true);
48417
48392
  this[TYPE] = decString(buf, off + 156, 1);
48418
- if (this[TYPE] === "") {
48393
+ if (this[TYPE] === "")
48419
48394
  this[TYPE] = "0";
48420
- }
48421
- if (this[TYPE] === "0" && this.path.slice(-1) === "/") {
48395
+ if (this[TYPE] === "0" && this.path.substr(-1) === "/")
48422
48396
  this[TYPE] = "5";
48423
- }
48424
- if (this[TYPE] === "5") {
48397
+ if (this[TYPE] === "5")
48425
48398
  this.size = 0;
48426
- }
48427
48399
  this.linkpath = decString(buf, off + 157, 100);
48428
48400
  if (buf.slice(off + 257, off + 265).toString() === "ustar\x0000") {
48429
48401
  this.uname = decString(buf, off + 265, 32);
@@ -48435,30 +48407,25 @@ var require_header = __commonJSMin((exports, module2) => {
48435
48407
  this.path = prefix + "/" + this.path;
48436
48408
  } else {
48437
48409
  const prefix = decString(buf, off + 345, 130);
48438
- if (prefix) {
48410
+ if (prefix)
48439
48411
  this.path = prefix + "/" + this.path;
48440
- }
48441
48412
  this.atime = decDate(buf, off + 476, 12);
48442
48413
  this.ctime = decDate(buf, off + 488, 12);
48443
48414
  }
48444
48415
  }
48445
48416
  let sum = 8 * 32;
48446
- for (let i = off; i < off + 148; i++) {
48417
+ for (let i = off; i < off + 148; i++)
48447
48418
  sum += buf[i];
48448
- }
48449
- for (let i = off + 156; i < off + 512; i++) {
48419
+ for (let i = off + 156; i < off + 512; i++)
48450
48420
  sum += buf[i];
48451
- }
48452
48421
  this.cksumValid = sum === this.cksum;
48453
- if (this.cksum === null && sum === 8 * 32) {
48422
+ if (this.cksum === null && sum === 8 * 32)
48454
48423
  this.nullBlock = true;
48455
- }
48456
48424
  }
48457
48425
  [SLURP](ex, global2) {
48458
48426
  for (const k in ex) {
48459
- if (ex[k] !== null && ex[k] !== void 0 && !(global2 && k === "path")) {
48427
+ if (ex[k] !== null && ex[k] !== void 0 && !(global2 && k === "path"))
48460
48428
  this[k] = ex[k];
48461
- }
48462
48429
  }
48463
48430
  }
48464
48431
  encode(buf, off) {
@@ -48466,12 +48433,10 @@ var require_header = __commonJSMin((exports, module2) => {
48466
48433
  buf = this.block = Buffer.alloc(512);
48467
48434
  off = 0;
48468
48435
  }
48469
- if (!off) {
48436
+ if (!off)
48470
48437
  off = 0;
48471
- }
48472
- if (!(buf.length >= off + 512)) {
48438
+ if (!(buf.length >= off + 512))
48473
48439
  throw new Error("need 512 bytes for header");
48474
- }
48475
48440
  const prefixSize = this.ctime || this.atime ? 130 : 155;
48476
48441
  const split = splitPrefix(this.path || "", prefixSize);
48477
48442
  const path6 = split[0];
@@ -48491,20 +48456,18 @@ var require_header = __commonJSMin((exports, module2) => {
48491
48456
  this.needPax = encNumber(buf, off + 329, 8, this.devmaj) || this.needPax;
48492
48457
  this.needPax = encNumber(buf, off + 337, 8, this.devmin) || this.needPax;
48493
48458
  this.needPax = encString(buf, off + 345, prefixSize, prefix) || this.needPax;
48494
- if (buf[off + 475] !== 0) {
48459
+ if (buf[off + 475] !== 0)
48495
48460
  this.needPax = encString(buf, off + 345, 155, prefix) || this.needPax;
48496
- } else {
48461
+ else {
48497
48462
  this.needPax = encString(buf, off + 345, 130, prefix) || this.needPax;
48498
48463
  this.needPax = encDate(buf, off + 476, 12, this.atime) || this.needPax;
48499
48464
  this.needPax = encDate(buf, off + 488, 12, this.ctime) || this.needPax;
48500
48465
  }
48501
48466
  let sum = 8 * 32;
48502
- for (let i = off; i < off + 148; i++) {
48467
+ for (let i = off; i < off + 148; i++)
48503
48468
  sum += buf[i];
48504
- }
48505
- for (let i = off + 156; i < off + 512; i++) {
48469
+ for (let i = off + 156; i < off + 512; i++)
48506
48470
  sum += buf[i];
48507
- }
48508
48471
  this.cksum = sum;
48509
48472
  encNumber(buf, off + 148, 8, this.cksum);
48510
48473
  this.cksumValid = true;
@@ -48512,9 +48475,8 @@ var require_header = __commonJSMin((exports, module2) => {
48512
48475
  }
48513
48476
  set(data) {
48514
48477
  for (const i in data) {
48515
- if (data[i] !== null && data[i] !== void 0) {
48478
+ if (data[i] !== null && data[i] !== void 0)
48516
48479
  this[i] = data[i];
48517
- }
48518
48480
  }
48519
48481
  }
48520
48482
  get type() {
@@ -48524,11 +48486,10 @@ var require_header = __commonJSMin((exports, module2) => {
48524
48486
  return this[TYPE];
48525
48487
  }
48526
48488
  set type(type) {
48527
- if (types.code.has(type)) {
48489
+ if (types.code.has(type))
48528
48490
  this[TYPE] = types.code.get(type);
48529
- } else {
48491
+ else
48530
48492
  this[TYPE] = type;
48531
- }
48532
48493
  }
48533
48494
  };
48534
48495
  var splitPrefix = (p, prefixSize) => {
@@ -48537,24 +48498,23 @@ var require_header = __commonJSMin((exports, module2) => {
48537
48498
  let prefix = "";
48538
48499
  let ret;
48539
48500
  const root = pathModule.parse(p).root || ".";
48540
- if (Buffer.byteLength(pp) < pathSize) {
48501
+ if (Buffer.byteLength(pp) < pathSize)
48541
48502
  ret = [pp, prefix, false];
48542
- } else {
48503
+ else {
48543
48504
  prefix = pathModule.dirname(pp);
48544
48505
  pp = pathModule.basename(pp);
48545
48506
  do {
48546
- if (Buffer.byteLength(pp) <= pathSize && Buffer.byteLength(prefix) <= prefixSize) {
48507
+ if (Buffer.byteLength(pp) <= pathSize && Buffer.byteLength(prefix) <= prefixSize)
48547
48508
  ret = [pp, prefix, false];
48548
- } else if (Buffer.byteLength(pp) > pathSize && Buffer.byteLength(prefix) <= prefixSize) {
48549
- ret = [pp.slice(0, pathSize - 1), prefix, true];
48550
- } else {
48509
+ else if (Buffer.byteLength(pp) > pathSize && Buffer.byteLength(prefix) <= prefixSize)
48510
+ ret = [pp.substr(0, pathSize - 1), prefix, true];
48511
+ else {
48551
48512
  pp = pathModule.join(pathModule.basename(prefix), pp);
48552
48513
  prefix = pathModule.dirname(prefix);
48553
48514
  }
48554
48515
  } while (prefix !== root && !ret);
48555
- if (!ret) {
48556
- ret = [p.slice(0, pathSize - 1), "", true];
48557
- }
48516
+ if (!ret)
48517
+ ret = [p.substr(0, pathSize - 1), "", true];
48558
48518
  }
48559
48519
  return ret;
48560
48520
  };
@@ -48602,15 +48562,13 @@ var require_pax = __commonJSMin((exports, module2) => {
48602
48562
  }
48603
48563
  encode() {
48604
48564
  const body = this.encodeBody();
48605
- if (body === "") {
48565
+ if (body === "")
48606
48566
  return null;
48607
- }
48608
48567
  const bodyLen = Buffer.byteLength(body);
48609
48568
  const bufLen = 512 * Math.ceil(1 + bodyLen / 512);
48610
48569
  const buf = Buffer.allocUnsafe(bufLen);
48611
- for (let i = 0; i < 512; i++) {
48570
+ for (let i = 0; i < 512; i++)
48612
48571
  buf[i] = 0;
48613
- }
48614
48572
  new Header({
48615
48573
  path: ("PaxHeader/" + path6.basename(this.path)).slice(0, 99),
48616
48574
  mode: this.mode || 420,
@@ -48628,25 +48586,22 @@ var require_pax = __commonJSMin((exports, module2) => {
48628
48586
  ctime: this.ctime || null
48629
48587
  }).encode(buf);
48630
48588
  buf.write(body, 512, bodyLen, "utf8");
48631
- for (let i = bodyLen + 512; i < buf.length; i++) {
48589
+ for (let i = bodyLen + 512; i < buf.length; i++)
48632
48590
  buf[i] = 0;
48633
- }
48634
48591
  return buf;
48635
48592
  }
48636
48593
  encodeBody() {
48637
48594
  return this.encodeField("path") + this.encodeField("ctime") + this.encodeField("atime") + this.encodeField("dev") + this.encodeField("ino") + this.encodeField("nlink") + this.encodeField("charset") + this.encodeField("comment") + this.encodeField("gid") + this.encodeField("gname") + this.encodeField("linkpath") + this.encodeField("mtime") + this.encodeField("size") + this.encodeField("uid") + this.encodeField("uname");
48638
48595
  }
48639
48596
  encodeField(field) {
48640
- if (this[field] === null || this[field] === void 0) {
48597
+ if (this[field] === null || this[field] === void 0)
48641
48598
  return "";
48642
- }
48643
48599
  const v = this[field] instanceof Date ? this[field].getTime() / 1e3 : this[field];
48644
48600
  const s = " " + (field === "dev" || field === "ino" || field === "nlink" ? "SCHILY." : "") + field + "=" + v + "\n";
48645
48601
  const byteLen = Buffer.byteLength(s);
48646
48602
  let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1;
48647
- if (byteLen + digits >= Math.pow(10, digits)) {
48603
+ if (byteLen + digits >= Math.pow(10, digits))
48648
48604
  digits += 1;
48649
- }
48650
48605
  const len = digits + byteLen;
48651
48606
  return len + s;
48652
48607
  }
@@ -48656,15 +48611,13 @@ var require_pax = __commonJSMin((exports, module2) => {
48656
48611
  var parseKV = (string) => string.replace(/\n$/, "").split("\n").reduce(parseKVLine, /* @__PURE__ */ Object.create(null));
48657
48612
  var parseKVLine = (set, line3) => {
48658
48613
  const n = parseInt(line3, 10);
48659
- if (n !== Buffer.byteLength(line3) + 1) {
48614
+ if (n !== Buffer.byteLength(line3) + 1)
48660
48615
  return set;
48661
- }
48662
- line3 = line3.slice((n + " ").length);
48616
+ line3 = line3.substr((n + " ").length);
48663
48617
  const kv = line3.split("=");
48664
48618
  const k = kv.shift().replace(/^SCHILY\.(dev|ino|nlink)/, "$1");
48665
- if (!k) {
48619
+ if (!k)
48666
48620
  return set;
48667
- }
48668
48621
  const v = kv.join("=");
48669
48622
  set[k] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) ? new Date(v * 1e3) : /^[0-9]+$/.test(v) ? +v : v;
48670
48623
  return set;
@@ -48686,12 +48639,10 @@ var require_warn_mixin = __commonJSMin((exports, module2) => {
48686
48639
  "use strict";
48687
48640
  module2.exports = (Base) => class extends Base {
48688
48641
  warn(code, message, data = {}) {
48689
- if (this.file) {
48642
+ if (this.file)
48690
48643
  data.file = this.file;
48691
- }
48692
- if (this.cwd) {
48644
+ if (this.cwd)
48693
48645
  data.cwd = this.cwd;
48694
- }
48695
48646
  data.code = message instanceof Error && message.code || code;
48696
48647
  data.tarCode = code;
48697
48648
  if (!this.strict && data.recoverable !== false) {
@@ -48700,11 +48651,10 @@ var require_warn_mixin = __commonJSMin((exports, module2) => {
48700
48651
  message = message.message;
48701
48652
  }
48702
48653
  this.emit("warn", data.tarCode, message, data);
48703
- } else if (message instanceof Error) {
48654
+ } else if (message instanceof Error)
48704
48655
  this.emit("error", Object.assign(message, data));
48705
- } else {
48656
+ else
48706
48657
  this.emit("error", Object.assign(new Error(`${code}: ${message}`), data));
48707
- }
48708
48658
  }
48709
48659
  };
48710
48660
  });
@@ -48732,7 +48682,7 @@ var require_strip_absolute_path = __commonJSMin((exports, module2) => {
48732
48682
  let parsed = parse2(path6);
48733
48683
  while (isAbsolute(path6) || parsed.root) {
48734
48684
  const root = path6.charAt(0) === "/" && path6.slice(0, 4) !== "//?/" ? "/" : parsed.root;
48735
- path6 = path6.slice(root.length);
48685
+ path6 = path6.substr(root.length);
48736
48686
  r += root;
48737
48687
  parsed = parse2(path6);
48738
48688
  }
@@ -48743,19 +48693,15 @@ var require_mode_fix = __commonJSMin((exports, module2) => {
48743
48693
  "use strict";
48744
48694
  module2.exports = (mode, isDir, portable) => {
48745
48695
  mode &= 4095;
48746
- if (portable) {
48696
+ if (portable)
48747
48697
  mode = (mode | 384) & ~18;
48748
- }
48749
48698
  if (isDir) {
48750
- if (mode & 256) {
48699
+ if (mode & 256)
48751
48700
  mode |= 64;
48752
- }
48753
- if (mode & 32) {
48701
+ if (mode & 32)
48754
48702
  mode |= 8;
48755
- }
48756
- if (mode & 4) {
48703
+ if (mode & 4)
48757
48704
  mode |= 1;
48758
- }
48759
48705
  }
48760
48706
  return mode;
48761
48707
  };
@@ -48770,9 +48716,8 @@ var require_write_entry = __commonJSMin((exports, module2) => {
48770
48716
  var normPath = require_normalize_windows_path();
48771
48717
  var stripSlash = require_strip_trailing_slashes();
48772
48718
  var prefixPath = (path7, prefix) => {
48773
- if (!prefix) {
48719
+ if (!prefix)
48774
48720
  return normPath(path7);
48775
- }
48776
48721
  path7 = normPath(path7).replace(/^\.(\/|$)/, "");
48777
48722
  return stripSlash(prefix) + "/" + path7;
48778
48723
  };
@@ -48804,9 +48749,8 @@ var require_write_entry = __commonJSMin((exports, module2) => {
48804
48749
  constructor(p, opt) {
48805
48750
  opt = opt || {};
48806
48751
  super(opt);
48807
- if (typeof p !== "string") {
48752
+ if (typeof p !== "string")
48808
48753
  throw new TypeError("path is required");
48809
- }
48810
48754
  this.path = normPath(p);
48811
48755
  this.portable = !!opt.portable;
48812
48756
  this.myuid = process.getuid && process.getuid() || 0;
@@ -48829,9 +48773,8 @@ var require_write_entry = __commonJSMin((exports, module2) => {
48829
48773
  this.length = null;
48830
48774
  this.pos = null;
48831
48775
  this.remain = null;
48832
- if (typeof opt.onwarn === "function") {
48776
+ if (typeof opt.onwarn === "function")
48833
48777
  this.on("warn", opt.onwarn);
48834
- }
48835
48778
  let pathWarn = false;
48836
48779
  if (!this.preservePaths) {
48837
48780
  const [root, stripped] = stripAbsolutePath(this.path);
@@ -48846,41 +48789,36 @@ var require_write_entry = __commonJSMin((exports, module2) => {
48846
48789
  p = p.replace(/\\/g, "/");
48847
48790
  }
48848
48791
  this.absolute = normPath(opt.absolute || path6.resolve(this.cwd, p));
48849
- if (this.path === "") {
48792
+ if (this.path === "")
48850
48793
  this.path = "./";
48851
- }
48852
48794
  if (pathWarn) {
48853
48795
  this.warn("TAR_ENTRY_INFO", `stripping ${pathWarn} from absolute path`, {
48854
48796
  entry: this,
48855
48797
  path: pathWarn + this.path
48856
48798
  });
48857
48799
  }
48858
- if (this.statCache.has(this.absolute)) {
48800
+ if (this.statCache.has(this.absolute))
48859
48801
  this[ONLSTAT](this.statCache.get(this.absolute));
48860
- } else {
48802
+ else
48861
48803
  this[LSTAT]();
48862
- }
48863
48804
  }
48864
48805
  emit(ev, ...data) {
48865
- if (ev === "error") {
48806
+ if (ev === "error")
48866
48807
  this[HAD_ERROR] = true;
48867
- }
48868
48808
  return super.emit(ev, ...data);
48869
48809
  }
48870
48810
  [LSTAT]() {
48871
48811
  fs4.lstat(this.absolute, (er, stat) => {
48872
- if (er) {
48812
+ if (er)
48873
48813
  return this.emit("error", er);
48874
- }
48875
48814
  this[ONLSTAT](stat);
48876
48815
  });
48877
48816
  }
48878
48817
  [ONLSTAT](stat) {
48879
48818
  this.statCache.set(this.absolute, stat);
48880
48819
  this.stat = stat;
48881
- if (!stat.isFile()) {
48820
+ if (!stat.isFile())
48882
48821
  stat.size = 0;
48883
- }
48884
48822
  this.type = getType2(stat);
48885
48823
  this.emit("stat", stat);
48886
48824
  this[PROCESS]();
@@ -48904,9 +48842,8 @@ var require_write_entry = __commonJSMin((exports, module2) => {
48904
48842
  return prefixPath(path7, this.prefix);
48905
48843
  }
48906
48844
  [HEADER]() {
48907
- if (this.type === "Directory" && this.portable) {
48845
+ if (this.type === "Directory" && this.portable)
48908
48846
  this.noMtime = true;
48909
- }
48910
48847
  this.header = new Header({
48911
48848
  path: this[PREFIX](this.path),
48912
48849
  linkpath: this.type === "Link" ? this[PREFIX](this.linkpath) : this.linkpath,
@@ -48939,18 +48876,16 @@ var require_write_entry = __commonJSMin((exports, module2) => {
48939
48876
  super.write(this.header.block);
48940
48877
  }
48941
48878
  [DIRECTORY]() {
48942
- if (this.path.slice(-1) !== "/") {
48879
+ if (this.path.substr(-1) !== "/")
48943
48880
  this.path += "/";
48944
- }
48945
48881
  this.stat.size = 0;
48946
48882
  this[HEADER]();
48947
48883
  this.end();
48948
48884
  }
48949
48885
  [SYMLINK]() {
48950
48886
  fs4.readlink(this.absolute, (er, linkpath) => {
48951
- if (er) {
48887
+ if (er)
48952
48888
  return this.emit("error", er);
48953
- }
48954
48889
  this[ONREADLINK](linkpath);
48955
48890
  });
48956
48891
  }
@@ -48971,31 +48906,27 @@ var require_write_entry = __commonJSMin((exports, module2) => {
48971
48906
  const linkKey = this.stat.dev + ":" + this.stat.ino;
48972
48907
  if (this.linkCache.has(linkKey)) {
48973
48908
  const linkpath = this.linkCache.get(linkKey);
48974
- if (linkpath.indexOf(this.cwd) === 0) {
48909
+ if (linkpath.indexOf(this.cwd) === 0)
48975
48910
  return this[HARDLINK](linkpath);
48976
- }
48977
48911
  }
48978
48912
  this.linkCache.set(linkKey, this.absolute);
48979
48913
  }
48980
48914
  this[HEADER]();
48981
- if (this.stat.size === 0) {
48915
+ if (this.stat.size === 0)
48982
48916
  return this.end();
48983
- }
48984
48917
  this[OPENFILE]();
48985
48918
  }
48986
48919
  [OPENFILE]() {
48987
48920
  fs4.open(this.absolute, "r", (er, fd) => {
48988
- if (er) {
48921
+ if (er)
48989
48922
  return this.emit("error", er);
48990
- }
48991
48923
  this[ONOPENFILE](fd);
48992
48924
  });
48993
48925
  }
48994
48926
  [ONOPENFILE](fd) {
48995
48927
  this.fd = fd;
48996
- if (this[HAD_ERROR]) {
48928
+ if (this[HAD_ERROR])
48997
48929
  return this[CLOSE]();
48998
- }
48999
48930
  this.blockLen = 512 * Math.ceil(this.stat.size / 512);
49000
48931
  this.blockRemain = this.blockLen;
49001
48932
  const bufLen = Math.min(this.blockLen, this.maxReadSize);
@@ -49042,11 +48973,10 @@ var require_write_entry = __commonJSMin((exports, module2) => {
49042
48973
  }
49043
48974
  const writeBuf = this.offset === 0 && bytesRead === this.buf.length ? this.buf : this.buf.slice(this.offset, this.offset + bytesRead);
49044
48975
  const flushed = this.write(writeBuf);
49045
- if (!flushed) {
48976
+ if (!flushed)
49046
48977
  this[AWAITDRAIN](() => this[ONDRAIN]());
49047
- } else {
48978
+ else
49048
48979
  this[ONDRAIN]();
49049
- }
49050
48980
  }
49051
48981
  [AWAITDRAIN](cb) {
49052
48982
  this.once("drain", cb);
@@ -49065,9 +48995,8 @@ var require_write_entry = __commonJSMin((exports, module2) => {
49065
48995
  }
49066
48996
  [ONDRAIN]() {
49067
48997
  if (!this.remain) {
49068
- if (this.blockRemain) {
48998
+ if (this.blockRemain)
49069
48999
  super.write(Buffer.alloc(this.blockRemain));
49070
- }
49071
49000
  return this[CLOSE]((er) => er ? this.emit("error", er) : this.end());
49072
49001
  }
49073
49002
  if (this.offset >= this.length) {
@@ -49124,9 +49053,8 @@ var require_write_entry = __commonJSMin((exports, module2) => {
49124
49053
  this.noMtime = !!opt.noMtime;
49125
49054
  this.readEntry = readEntry;
49126
49055
  this.type = readEntry.type;
49127
- if (this.type === "Directory" && this.portable) {
49056
+ if (this.type === "Directory" && this.portable)
49128
49057
  this.noMtime = true;
49129
- }
49130
49058
  this.prefix = opt.prefix || null;
49131
49059
  this.path = normPath(readEntry.path);
49132
49060
  this.mode = this[MODE](readEntry.mode);
@@ -49139,9 +49067,8 @@ var require_write_entry = __commonJSMin((exports, module2) => {
49139
49067
  this.atime = this.portable ? null : readEntry.atime;
49140
49068
  this.ctime = this.portable ? null : readEntry.ctime;
49141
49069
  this.linkpath = normPath(readEntry.linkpath);
49142
- if (typeof opt.onwarn === "function") {
49070
+ if (typeof opt.onwarn === "function")
49143
49071
  this.on("warn", opt.onwarn);
49144
- }
49145
49072
  let pathWarn = false;
49146
49073
  if (!this.preservePaths) {
49147
49074
  const [root, stripped] = stripAbsolutePath(this.path);
@@ -49198,16 +49125,14 @@ var require_write_entry = __commonJSMin((exports, module2) => {
49198
49125
  }
49199
49126
  write(data) {
49200
49127
  const writeLen = data.length;
49201
- if (writeLen > this.blockRemain) {
49128
+ if (writeLen > this.blockRemain)
49202
49129
  throw new Error("writing more to entry than is appropriate");
49203
- }
49204
49130
  this.blockRemain -= writeLen;
49205
49131
  return super.write(data);
49206
49132
  }
49207
49133
  end() {
49208
- if (this.blockRemain) {
49134
+ if (this.blockRemain)
49209
49135
  super.write(Buffer.alloc(this.blockRemain));
49210
- }
49211
49136
  return super.end();
49212
49137
  }
49213
49138
  });
@@ -49653,26 +49578,22 @@ var require_pack = __commonJSMin((exports, module2) => {
49653
49578
  this.statCache = opt.statCache || /* @__PURE__ */ new Map();
49654
49579
  this.readdirCache = opt.readdirCache || /* @__PURE__ */ new Map();
49655
49580
  this[WRITEENTRYCLASS] = WriteEntry;
49656
- if (typeof opt.onwarn === "function") {
49581
+ if (typeof opt.onwarn === "function")
49657
49582
  this.on("warn", opt.onwarn);
49658
- }
49659
49583
  this.portable = !!opt.portable;
49660
49584
  this.zip = null;
49661
49585
  if (opt.gzip) {
49662
- if (typeof opt.gzip !== "object") {
49586
+ if (typeof opt.gzip !== "object")
49663
49587
  opt.gzip = {};
49664
- }
49665
- if (this.portable) {
49588
+ if (this.portable)
49666
49589
  opt.gzip.portable = true;
49667
- }
49668
49590
  this.zip = new zlib.Gzip(opt.gzip);
49669
49591
  this.zip.on("data", (chunk) => super.write(chunk));
49670
49592
  this.zip.on("end", (_) => super.end());
49671
49593
  this.zip.on("drain", (_) => this[ONDRAIN]());
49672
49594
  this.on("resume", (_) => this.zip.resume());
49673
- } else {
49595
+ } else
49674
49596
  this.on("drain", this[ONDRAIN]);
49675
- }
49676
49597
  this.noDirRecurse = !!opt.noDirRecurse;
49677
49598
  this.follow = !!opt.follow;
49678
49599
  this.noMtime = !!opt.noMtime;
@@ -49692,29 +49613,26 @@ var require_pack = __commonJSMin((exports, module2) => {
49692
49613
  return this;
49693
49614
  }
49694
49615
  end(path7) {
49695
- if (path7) {
49616
+ if (path7)
49696
49617
  this.write(path7);
49697
- }
49698
49618
  this[ENDED] = true;
49699
49619
  this[PROCESS]();
49700
49620
  return this;
49701
49621
  }
49702
49622
  write(path7) {
49703
- if (this[ENDED]) {
49623
+ if (this[ENDED])
49704
49624
  throw new Error("write after end");
49705
- }
49706
- if (path7 instanceof ReadEntry) {
49625
+ if (path7 instanceof ReadEntry)
49707
49626
  this[ADDTARENTRY](path7);
49708
- } else {
49627
+ else
49709
49628
  this[ADDFSENTRY](path7);
49710
- }
49711
49629
  return this.flowing;
49712
49630
  }
49713
49631
  [ADDTARENTRY](p) {
49714
49632
  const absolute = normPath(path6.resolve(this.cwd, p.path));
49715
- if (!this.filter(p.path, p)) {
49633
+ if (!this.filter(p.path, p))
49716
49634
  p.resume();
49717
- } else {
49635
+ else {
49718
49636
  const job = new PackJob(p.path, absolute, false);
49719
49637
  job.entry = new WriteEntryTar(p, this[ENTRYOPT](job));
49720
49638
  job.entry.on("end", (_) => this[JOBDONE](job));
@@ -49735,19 +49653,17 @@ var require_pack = __commonJSMin((exports, module2) => {
49735
49653
  fs4[stat](job.absolute, (er, stat2) => {
49736
49654
  job.pending = false;
49737
49655
  this[JOBS] -= 1;
49738
- if (er) {
49656
+ if (er)
49739
49657
  this.emit("error", er);
49740
- } else {
49658
+ else
49741
49659
  this[ONSTAT](job, stat2);
49742
- }
49743
49660
  });
49744
49661
  }
49745
49662
  [ONSTAT](job, stat) {
49746
49663
  this.statCache.set(job.absolute, stat);
49747
49664
  job.stat = stat;
49748
- if (!this.filter(job.path, stat)) {
49665
+ if (!this.filter(job.path, stat))
49749
49666
  job.ignore = true;
49750
- }
49751
49667
  this[PROCESS]();
49752
49668
  }
49753
49669
  [READDIR](job) {
@@ -49756,9 +49672,8 @@ var require_pack = __commonJSMin((exports, module2) => {
49756
49672
  fs4.readdir(job.absolute, (er, entries) => {
49757
49673
  job.pending = false;
49758
49674
  this[JOBS] -= 1;
49759
- if (er) {
49675
+ if (er)
49760
49676
  return this.emit("error", er);
49761
- }
49762
49677
  this[ONREADDIR](job, entries);
49763
49678
  });
49764
49679
  }
@@ -49768,9 +49683,8 @@ var require_pack = __commonJSMin((exports, module2) => {
49768
49683
  this[PROCESS]();
49769
49684
  }
49770
49685
  [PROCESS]() {
49771
- if (this[PROCESSING]) {
49686
+ if (this[PROCESSING])
49772
49687
  return;
49773
- }
49774
49688
  this[PROCESSING] = true;
49775
49689
  for (let w = this[QUEUE].head; w !== null && this[JOBS] < this.jobs; w = w.next) {
49776
49690
  this[PROCESSJOB](w.value);
@@ -49782,9 +49696,9 @@ var require_pack = __commonJSMin((exports, module2) => {
49782
49696
  }
49783
49697
  this[PROCESSING] = false;
49784
49698
  if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) {
49785
- if (this.zip) {
49699
+ if (this.zip)
49786
49700
  this.zip.end(EOF);
49787
- } else {
49701
+ else {
49788
49702
  super.write(EOF);
49789
49703
  super.end();
49790
49704
  }
@@ -49799,46 +49713,38 @@ var require_pack = __commonJSMin((exports, module2) => {
49799
49713
  this[PROCESS]();
49800
49714
  }
49801
49715
  [PROCESSJOB](job) {
49802
- if (job.pending) {
49716
+ if (job.pending)
49803
49717
  return;
49804
- }
49805
49718
  if (job.entry) {
49806
- if (job === this[CURRENT] && !job.piped) {
49719
+ if (job === this[CURRENT] && !job.piped)
49807
49720
  this[PIPE](job);
49808
- }
49809
49721
  return;
49810
49722
  }
49811
49723
  if (!job.stat) {
49812
- if (this.statCache.has(job.absolute)) {
49724
+ if (this.statCache.has(job.absolute))
49813
49725
  this[ONSTAT](job, this.statCache.get(job.absolute));
49814
- } else {
49726
+ else
49815
49727
  this[STAT](job);
49816
- }
49817
49728
  }
49818
- if (!job.stat) {
49729
+ if (!job.stat)
49819
49730
  return;
49820
- }
49821
- if (job.ignore) {
49731
+ if (job.ignore)
49822
49732
  return;
49823
- }
49824
49733
  if (!this.noDirRecurse && job.stat.isDirectory() && !job.readdir) {
49825
- if (this.readdirCache.has(job.absolute)) {
49734
+ if (this.readdirCache.has(job.absolute))
49826
49735
  this[ONREADDIR](job, this.readdirCache.get(job.absolute));
49827
- } else {
49736
+ else
49828
49737
  this[READDIR](job);
49829
- }
49830
- if (!job.readdir) {
49738
+ if (!job.readdir)
49831
49739
  return;
49832
- }
49833
49740
  }
49834
49741
  job.entry = this[ENTRY](job);
49835
49742
  if (!job.entry) {
49836
49743
  job.ignore = true;
49837
49744
  return;
49838
49745
  }
49839
- if (job === this[CURRENT] && !job.piped) {
49746
+ if (job === this[CURRENT] && !job.piped)
49840
49747
  this[PIPE](job);
49841
- }
49842
49748
  }
49843
49749
  [ENTRYOPT](job) {
49844
49750
  return {
@@ -49866,9 +49772,8 @@ var require_pack = __commonJSMin((exports, module2) => {
49866
49772
  }
49867
49773
  }
49868
49774
  [ONDRAIN]() {
49869
- if (this[CURRENT] && this[CURRENT].entry) {
49775
+ if (this[CURRENT] && this[CURRENT].entry)
49870
49776
  this[CURRENT].entry.resume();
49871
- }
49872
49777
  }
49873
49778
  [PIPE](job) {
49874
49779
  job.piped = true;
@@ -49883,22 +49788,19 @@ var require_pack = __commonJSMin((exports, module2) => {
49883
49788
  const zip = this.zip;
49884
49789
  if (zip) {
49885
49790
  source.on("data", (chunk) => {
49886
- if (!zip.write(chunk)) {
49791
+ if (!zip.write(chunk))
49887
49792
  source.pause();
49888
- }
49889
49793
  });
49890
49794
  } else {
49891
49795
  source.on("data", (chunk) => {
49892
- if (!super.write(chunk)) {
49796
+ if (!super.write(chunk))
49893
49797
  source.pause();
49894
- }
49895
49798
  });
49896
49799
  }
49897
49800
  }
49898
49801
  pause() {
49899
- if (this.zip) {
49802
+ if (this.zip)
49900
49803
  this.zip.pause();
49901
- }
49902
49804
  return super.pause();
49903
49805
  }
49904
49806
  });
@@ -50310,7 +50212,6 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50310
50212
  var Entry = require_read_entry();
50311
50213
  var Pax = require_pax();
50312
50214
  var zlib = require_minizlib();
50313
- var { nextTick } = __require("process");
50314
50215
  var gzipHeader = Buffer.from([31, 139]);
50315
50216
  var STATE = Symbol("state");
50316
50217
  var WRITEENTRY = Symbol("writeEntry");
@@ -50341,7 +50242,6 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50341
50242
  var SAW_VALID_ENTRY = Symbol("sawValidEntry");
50342
50243
  var SAW_NULL_BLOCK = Symbol("sawNullBlock");
50343
50244
  var SAW_EOF = Symbol("sawEOF");
50344
- var CLOSESTREAM = Symbol("closeStream");
50345
50245
  var noop = (_) => true;
50346
50246
  module2.exports = warner(class Parser extends EE {
50347
50247
  constructor(opt) {
@@ -50354,13 +50254,14 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50354
50254
  this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
50355
50255
  }
50356
50256
  });
50357
- if (opt.ondone) {
50257
+ if (opt.ondone)
50358
50258
  this.on(DONE, opt.ondone);
50359
- } else {
50259
+ else {
50360
50260
  this.on(DONE, (_) => {
50361
50261
  this.emit("prefinish");
50362
50262
  this.emit("finish");
50363
50263
  this.emit("end");
50264
+ this.emit("close");
50364
50265
  });
50365
50266
  }
50366
50267
  this.strict = !!opt.strict;
@@ -50381,18 +50282,14 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50381
50282
  this[ABORTED] = false;
50382
50283
  this[SAW_NULL_BLOCK] = false;
50383
50284
  this[SAW_EOF] = false;
50384
- this.on("end", () => this[CLOSESTREAM]());
50385
- if (typeof opt.onwarn === "function") {
50285
+ if (typeof opt.onwarn === "function")
50386
50286
  this.on("warn", opt.onwarn);
50387
- }
50388
- if (typeof opt.onentry === "function") {
50287
+ if (typeof opt.onentry === "function")
50389
50288
  this.on("entry", opt.onentry);
50390
- }
50391
50289
  }
50392
50290
  [CONSUMEHEADER](chunk, position) {
50393
- if (this[SAW_VALID_ENTRY] === null) {
50291
+ if (this[SAW_VALID_ENTRY] === null)
50394
50292
  this[SAW_VALID_ENTRY] = false;
50395
- }
50396
50293
  let header;
50397
50294
  try {
50398
50295
  header = new Header(chunk, position, this[EX], this[GEX]);
@@ -50402,9 +50299,8 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50402
50299
  if (header.nullBlock) {
50403
50300
  if (this[SAW_NULL_BLOCK]) {
50404
50301
  this[SAW_EOF] = true;
50405
- if (this[STATE] === "begin") {
50302
+ if (this[STATE] === "begin")
50406
50303
  this[STATE] = "header";
50407
- }
50408
50304
  this[EMIT]("eof");
50409
50305
  } else {
50410
50306
  this[SAW_NULL_BLOCK] = true;
@@ -50412,29 +50308,27 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50412
50308
  }
50413
50309
  } else {
50414
50310
  this[SAW_NULL_BLOCK] = false;
50415
- if (!header.cksumValid) {
50311
+ if (!header.cksumValid)
50416
50312
  this.warn("TAR_ENTRY_INVALID", "checksum failure", { header });
50417
- } else if (!header.path) {
50313
+ else if (!header.path)
50418
50314
  this.warn("TAR_ENTRY_INVALID", "path is required", { header });
50419
- } else {
50315
+ else {
50420
50316
  const type = header.type;
50421
- if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) {
50317
+ if (/^(Symbolic)?Link$/.test(type) && !header.linkpath)
50422
50318
  this.warn("TAR_ENTRY_INVALID", "linkpath required", { header });
50423
- } else if (!/^(Symbolic)?Link$/.test(type) && header.linkpath) {
50319
+ else if (!/^(Symbolic)?Link$/.test(type) && header.linkpath)
50424
50320
  this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header });
50425
- } else {
50321
+ else {
50426
50322
  const entry = this[WRITEENTRY] = new Entry(header, this[EX], this[GEX]);
50427
50323
  if (!this[SAW_VALID_ENTRY]) {
50428
50324
  if (entry.remain) {
50429
50325
  const onend = () => {
50430
- if (!entry.invalid) {
50326
+ if (!entry.invalid)
50431
50327
  this[SAW_VALID_ENTRY] = true;
50432
- }
50433
50328
  };
50434
50329
  entry.on("end", onend);
50435
- } else {
50330
+ } else
50436
50331
  this[SAW_VALID_ENTRY] = true;
50437
- }
50438
50332
  }
50439
50333
  if (entry.meta) {
50440
50334
  if (entry.size > this.maxMetaEntrySize) {
@@ -50455,35 +50349,31 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50455
50349
  this[STATE] = entry.remain ? "ignore" : "header";
50456
50350
  entry.resume();
50457
50351
  } else {
50458
- if (entry.remain) {
50352
+ if (entry.remain)
50459
50353
  this[STATE] = "body";
50460
- } else {
50354
+ else {
50461
50355
  this[STATE] = "header";
50462
50356
  entry.end();
50463
50357
  }
50464
50358
  if (!this[READENTRY]) {
50465
50359
  this[QUEUE].push(entry);
50466
50360
  this[NEXTENTRY]();
50467
- } else {
50361
+ } else
50468
50362
  this[QUEUE].push(entry);
50469
- }
50470
50363
  }
50471
50364
  }
50472
50365
  }
50473
50366
  }
50474
50367
  }
50475
50368
  }
50476
- [CLOSESTREAM]() {
50477
- nextTick(() => this.emit("close"));
50478
- }
50479
50369
  [PROCESSENTRY](entry) {
50480
50370
  let go = true;
50481
50371
  if (!entry) {
50482
50372
  this[READENTRY] = null;
50483
50373
  go = false;
50484
- } else if (Array.isArray(entry)) {
50374
+ } else if (Array.isArray(entry))
50485
50375
  this.emit.apply(this, entry);
50486
- } else {
50376
+ else {
50487
50377
  this[READENTRY] = entry;
50488
50378
  this.emit("entry", entry);
50489
50379
  if (!entry.emittedEnd) {
@@ -50500,12 +50390,10 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50500
50390
  const re = this[READENTRY];
50501
50391
  const drainNow = !re || re.flowing || re.size === re.remain;
50502
50392
  if (drainNow) {
50503
- if (!this[WRITING]) {
50393
+ if (!this[WRITING])
50504
50394
  this.emit("drain");
50505
- }
50506
- } else {
50395
+ } else
50507
50396
  re.once("drain", (_) => this.emit("drain"));
50508
- }
50509
50397
  }
50510
50398
  }
50511
50399
  [CONSUMEBODY](chunk, position) {
@@ -50523,17 +50411,15 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50523
50411
  [CONSUMEMETA](chunk, position) {
50524
50412
  const entry = this[WRITEENTRY];
50525
50413
  const ret = this[CONSUMEBODY](chunk, position);
50526
- if (!this[WRITEENTRY]) {
50414
+ if (!this[WRITEENTRY])
50527
50415
  this[EMITMETA](entry);
50528
- }
50529
50416
  return ret;
50530
50417
  }
50531
50418
  [EMIT](ev, data, extra) {
50532
- if (!this[QUEUE].length && !this[READENTRY]) {
50419
+ if (!this[QUEUE].length && !this[READENTRY])
50533
50420
  this.emit(ev, data, extra);
50534
- } else {
50421
+ else
50535
50422
  this[QUEUE].push([ev, data, extra]);
50536
- }
50537
50423
  }
50538
50424
  [EMITMETA](entry) {
50539
50425
  this[EMIT]("meta", this[META]);
@@ -50564,9 +50450,8 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50564
50450
  this.warn("TAR_ABORT", error, { recoverable: false });
50565
50451
  }
50566
50452
  write(chunk) {
50567
- if (this[ABORTED]) {
50453
+ if (this[ABORTED])
50568
50454
  return;
50569
- }
50570
50455
  if (this[UNZIP] === null && chunk) {
50571
50456
  if (this[BUFFER]) {
50572
50457
  chunk = Buffer.concat([this[BUFFER], chunk]);
@@ -50577,9 +50462,8 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50577
50462
  return true;
50578
50463
  }
50579
50464
  for (let i = 0; this[UNZIP] === null && i < gzipHeader.length; i++) {
50580
- if (chunk[i] !== gzipHeader[i]) {
50465
+ if (chunk[i] !== gzipHeader[i])
50581
50466
  this[UNZIP] = false;
50582
- }
50583
50467
  }
50584
50468
  if (this[UNZIP] === null) {
50585
50469
  const ended = this[ENDED];
@@ -50598,22 +50482,19 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50598
50482
  }
50599
50483
  }
50600
50484
  this[WRITING] = true;
50601
- if (this[UNZIP]) {
50485
+ if (this[UNZIP])
50602
50486
  this[UNZIP].write(chunk);
50603
- } else {
50487
+ else
50604
50488
  this[CONSUMECHUNK](chunk);
50605
- }
50606
50489
  this[WRITING] = false;
50607
50490
  const ret = this[QUEUE].length ? false : this[READENTRY] ? this[READENTRY].flowing : true;
50608
- if (!ret && !this[QUEUE].length) {
50491
+ if (!ret && !this[QUEUE].length)
50609
50492
  this[READENTRY].once("drain", (_) => this.emit("drain"));
50610
- }
50611
50493
  return ret;
50612
50494
  }
50613
50495
  [BUFFERCONCAT](c) {
50614
- if (c && !this[ABORTED]) {
50496
+ if (c && !this[ABORTED])
50615
50497
  this[BUFFER] = this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c;
50616
- }
50617
50498
  }
50618
50499
  [MAYBEEND]() {
50619
50500
  if (this[ENDED] && !this[EMITTEDEND] && !this[ABORTED] && !this[CONSUMING]) {
@@ -50622,29 +50503,27 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50622
50503
  if (entry && entry.blockRemain) {
50623
50504
  const have = this[BUFFER] ? this[BUFFER].length : 0;
50624
50505
  this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`, { entry });
50625
- if (this[BUFFER]) {
50506
+ if (this[BUFFER])
50626
50507
  entry.write(this[BUFFER]);
50627
- }
50628
50508
  entry.end();
50629
50509
  }
50630
50510
  this[EMIT](DONE);
50631
50511
  }
50632
50512
  }
50633
50513
  [CONSUMECHUNK](chunk) {
50634
- if (this[CONSUMING]) {
50514
+ if (this[CONSUMING])
50635
50515
  this[BUFFERCONCAT](chunk);
50636
- } else if (!chunk && !this[BUFFER]) {
50516
+ else if (!chunk && !this[BUFFER])
50637
50517
  this[MAYBEEND]();
50638
- } else {
50518
+ else {
50639
50519
  this[CONSUMING] = true;
50640
50520
  if (this[BUFFER]) {
50641
50521
  this[BUFFERCONCAT](chunk);
50642
50522
  const c = this[BUFFER];
50643
50523
  this[BUFFER] = null;
50644
50524
  this[CONSUMECHUNKSUB](c);
50645
- } else {
50525
+ } else
50646
50526
  this[CONSUMECHUNKSUB](chunk);
50647
- }
50648
50527
  while (this[BUFFER] && this[BUFFER].length >= 512 && !this[ABORTED] && !this[SAW_EOF]) {
50649
50528
  const c = this[BUFFER];
50650
50529
  this[BUFFER] = null;
@@ -50652,9 +50531,8 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50652
50531
  }
50653
50532
  this[CONSUMING] = false;
50654
50533
  }
50655
- if (!this[BUFFER] || this[ENDED]) {
50534
+ if (!this[BUFFER] || this[ENDED])
50656
50535
  this[MAYBEEND]();
50657
- }
50658
50536
  }
50659
50537
  [CONSUMECHUNKSUB](chunk) {
50660
50538
  let position = 0;
@@ -50678,18 +50556,17 @@ var require_parse2 = __commonJSMin((exports, module2) => {
50678
50556
  }
50679
50557
  }
50680
50558
  if (position < length) {
50681
- if (this[BUFFER]) {
50559
+ if (this[BUFFER])
50682
50560
  this[BUFFER] = Buffer.concat([chunk.slice(position), this[BUFFER]]);
50683
- } else {
50561
+ else
50684
50562
  this[BUFFER] = chunk.slice(position);
50685
- }
50686
50563
  }
50687
50564
  }
50688
50565
  end(chunk) {
50689
50566
  if (!this[ABORTED]) {
50690
- if (this[UNZIP]) {
50567
+ if (this[UNZIP])
50691
50568
  this[UNZIP].end(chunk);
50692
- } else {
50569
+ else {
50693
50570
  this[ENDED] = true;
50694
50571
  this.write(chunk);
50695
50572
  }
@@ -50706,32 +50583,25 @@ var require_list = __commonJSMin((exports, module2) => {
50706
50583
  var path6 = __require("path");
50707
50584
  var stripSlash = require_strip_trailing_slashes();
50708
50585
  module2.exports = (opt_, files, cb) => {
50709
- if (typeof opt_ === "function") {
50586
+ if (typeof opt_ === "function")
50710
50587
  cb = opt_, files = null, opt_ = {};
50711
- } else if (Array.isArray(opt_)) {
50588
+ else if (Array.isArray(opt_))
50712
50589
  files = opt_, opt_ = {};
50713
- }
50714
- if (typeof files === "function") {
50590
+ if (typeof files === "function")
50715
50591
  cb = files, files = null;
50716
- }
50717
- if (!files) {
50592
+ if (!files)
50718
50593
  files = [];
50719
- } else {
50594
+ else
50720
50595
  files = Array.from(files);
50721
- }
50722
50596
  const opt = hlo(opt_);
50723
- if (opt.sync && typeof cb === "function") {
50597
+ if (opt.sync && typeof cb === "function")
50724
50598
  throw new TypeError("callback not supported for sync tar functions");
50725
- }
50726
- if (!opt.file && typeof cb === "function") {
50599
+ if (!opt.file && typeof cb === "function")
50727
50600
  throw new TypeError("callback only supported with file option");
50728
- }
50729
- if (files.length) {
50601
+ if (files.length)
50730
50602
  filesFilter(opt, files);
50731
- }
50732
- if (!opt.noResume) {
50603
+ if (!opt.noResume)
50733
50604
  onentryFunction(opt);
50734
- }
50735
50605
  return opt.file && opt.sync ? listFileSync(opt) : opt.file ? listFile(opt, cb) : list(opt);
50736
50606
  };
50737
50607
  var onentryFunction = (opt) => {
@@ -50760,9 +50630,9 @@ var require_list = __commonJSMin((exports, module2) => {
50760
50630
  try {
50761
50631
  const stat = fs4.statSync(file);
50762
50632
  const readSize = opt.maxReadSize || 16 * 1024 * 1024;
50763
- if (stat.size < readSize) {
50633
+ if (stat.size < readSize)
50764
50634
  p.end(fs4.readFileSync(file));
50765
- } else {
50635
+ else {
50766
50636
  let pos = 0;
50767
50637
  const buf = Buffer.allocUnsafe(readSize);
50768
50638
  fd = fs4.openSync(file, "r");
@@ -50791,9 +50661,9 @@ var require_list = __commonJSMin((exports, module2) => {
50791
50661
  parse2.on("error", reject);
50792
50662
  parse2.on("end", resolve);
50793
50663
  fs4.stat(file, (er, stat) => {
50794
- if (er) {
50664
+ if (er)
50795
50665
  reject(er);
50796
- } else {
50666
+ else {
50797
50667
  const stream = new fsm.ReadStream(file, {
50798
50668
  readSize,
50799
50669
  size: stat.size
@@ -50815,23 +50685,18 @@ var require_create = __commonJSMin((exports, module2) => {
50815
50685
  var t = require_list();
50816
50686
  var path6 = __require("path");
50817
50687
  module2.exports = (opt_, files, cb) => {
50818
- if (typeof files === "function") {
50688
+ if (typeof files === "function")
50819
50689
  cb = files;
50820
- }
50821
- if (Array.isArray(opt_)) {
50690
+ if (Array.isArray(opt_))
50822
50691
  files = opt_, opt_ = {};
50823
- }
50824
- if (!files || !Array.isArray(files) || !files.length) {
50692
+ if (!files || !Array.isArray(files) || !files.length)
50825
50693
  throw new TypeError("no files or directories specified");
50826
- }
50827
50694
  files = Array.from(files);
50828
50695
  const opt = hlo(opt_);
50829
- if (opt.sync && typeof cb === "function") {
50696
+ if (opt.sync && typeof cb === "function")
50830
50697
  throw new TypeError("callback not supported for sync tar functions");
50831
- }
50832
- if (!opt.file && typeof cb === "function") {
50698
+ if (!opt.file && typeof cb === "function")
50833
50699
  throw new TypeError("callback only supported with file option");
50834
- }
50835
50700
  return opt.file && opt.sync ? createFileSync(opt, files) : opt.file ? createFile(opt, files, cb) : opt.sync ? createSync(opt, files) : create(opt, files);
50836
50701
  };
50837
50702
  var createFileSync = (opt, files) => {
@@ -50860,14 +50725,13 @@ var require_create = __commonJSMin((exports, module2) => {
50860
50725
  files.forEach((file) => {
50861
50726
  if (file.charAt(0) === "@") {
50862
50727
  t({
50863
- file: path6.resolve(p.cwd, file.slice(1)),
50728
+ file: path6.resolve(p.cwd, file.substr(1)),
50864
50729
  sync: true,
50865
50730
  noResume: true,
50866
50731
  onentry: (entry) => p.add(entry)
50867
50732
  });
50868
- } else {
50733
+ } else
50869
50734
  p.add(file);
50870
- }
50871
50735
  });
50872
50736
  p.end();
50873
50737
  };
@@ -50876,13 +50740,12 @@ var require_create = __commonJSMin((exports, module2) => {
50876
50740
  const file = files.shift();
50877
50741
  if (file.charAt(0) === "@") {
50878
50742
  return t({
50879
- file: path6.resolve(p.cwd, file.slice(1)),
50743
+ file: path6.resolve(p.cwd, file.substr(1)),
50880
50744
  noResume: true,
50881
50745
  onentry: (entry) => p.add(entry)
50882
50746
  }).then((_) => addFilesAsync(p, files));
50883
- } else {
50747
+ } else
50884
50748
  p.add(file);
50885
- }
50886
50749
  }
50887
50750
  p.end();
50888
50751
  };
@@ -50908,15 +50771,12 @@ var require_replace = __commonJSMin((exports, module2) => {
50908
50771
  var Header = require_header();
50909
50772
  module2.exports = (opt_, files, cb) => {
50910
50773
  const opt = hlo(opt_);
50911
- if (!opt.file) {
50774
+ if (!opt.file)
50912
50775
  throw new TypeError("file is required");
50913
- }
50914
- if (opt.gzip) {
50776
+ if (opt.gzip)
50915
50777
  throw new TypeError("cannot append to compressed archives");
50916
- }
50917
- if (!files || !Array.isArray(files) || !files.length) {
50778
+ if (!files || !Array.isArray(files) || !files.length)
50918
50779
  throw new TypeError("no files or directories specified");
50919
- }
50920
50780
  files = Array.from(files);
50921
50781
  return opt.sync ? replaceSync(opt, files) : replace2(opt, files, cb);
50922
50782
  };
@@ -50929,11 +50789,10 @@ var require_replace = __commonJSMin((exports, module2) => {
50929
50789
  try {
50930
50790
  fd = fs4.openSync(opt.file, "r+");
50931
50791
  } catch (er) {
50932
- if (er.code === "ENOENT") {
50792
+ if (er.code === "ENOENT")
50933
50793
  fd = fs4.openSync(opt.file, "w+");
50934
- } else {
50794
+ else
50935
50795
  throw er;
50936
- }
50937
50796
  }
50938
50797
  const st = fs4.fstatSync(fd);
50939
50798
  const headBuf = Buffer.alloc(512);
@@ -50941,25 +50800,20 @@ var require_replace = __commonJSMin((exports, module2) => {
50941
50800
  for (position = 0; position < st.size; position += 512) {
50942
50801
  for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) {
50943
50802
  bytes = fs4.readSync(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos);
50944
- if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139) {
50803
+ if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139)
50945
50804
  throw new Error("cannot append to compressed archives");
50946
- }
50947
- if (!bytes) {
50805
+ if (!bytes)
50948
50806
  break POSITION;
50949
- }
50950
50807
  }
50951
50808
  const h = new Header(headBuf);
50952
- if (!h.cksumValid) {
50809
+ if (!h.cksumValid)
50953
50810
  break;
50954
- }
50955
50811
  const entryBlockSize = 512 * Math.ceil(h.size / 512);
50956
- if (position + entryBlockSize + 512 > st.size) {
50812
+ if (position + entryBlockSize + 512 > st.size)
50957
50813
  break;
50958
- }
50959
50814
  position += entryBlockSize;
50960
- if (opt.mtimeCache) {
50815
+ if (opt.mtimeCache)
50961
50816
  opt.mtimeCache.set(h.path, h.mtime);
50962
- }
50963
50817
  }
50964
50818
  threw = false;
50965
50819
  streamSync(opt, p, position, fd, files);
@@ -50985,47 +50839,38 @@ var require_replace = __commonJSMin((exports, module2) => {
50985
50839
  const p = new Pack(opt);
50986
50840
  const getPos = (fd, size, cb_) => {
50987
50841
  const cb2 = (er, pos) => {
50988
- if (er) {
50842
+ if (er)
50989
50843
  fs4.close(fd, (_) => cb_(er));
50990
- } else {
50844
+ else
50991
50845
  cb_(null, pos);
50992
- }
50993
50846
  };
50994
50847
  let position = 0;
50995
- if (size === 0) {
50848
+ if (size === 0)
50996
50849
  return cb2(null, 0);
50997
- }
50998
50850
  let bufPos = 0;
50999
50851
  const headBuf = Buffer.alloc(512);
51000
50852
  const onread = (er, bytes) => {
51001
- if (er) {
50853
+ if (er)
51002
50854
  return cb2(er);
51003
- }
51004
50855
  bufPos += bytes;
51005
50856
  if (bufPos < 512 && bytes) {
51006
50857
  return fs4.read(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos, onread);
51007
50858
  }
51008
- if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139) {
50859
+ if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139)
51009
50860
  return cb2(new Error("cannot append to compressed archives"));
51010
- }
51011
- if (bufPos < 512) {
50861
+ if (bufPos < 512)
51012
50862
  return cb2(null, position);
51013
- }
51014
50863
  const h = new Header(headBuf);
51015
- if (!h.cksumValid) {
50864
+ if (!h.cksumValid)
51016
50865
  return cb2(null, position);
51017
- }
51018
50866
  const entryBlockSize = 512 * Math.ceil(h.size / 512);
51019
- if (position + entryBlockSize + 512 > size) {
50867
+ if (position + entryBlockSize + 512 > size)
51020
50868
  return cb2(null, position);
51021
- }
51022
50869
  position += entryBlockSize + 512;
51023
- if (position >= size) {
50870
+ if (position >= size)
51024
50871
  return cb2(null, position);
51025
- }
51026
- if (opt.mtimeCache) {
50872
+ if (opt.mtimeCache)
51027
50873
  opt.mtimeCache.set(h.path, h.mtime);
51028
- }
51029
50874
  bufPos = 0;
51030
50875
  fs4.read(fd, headBuf, 0, 512, position, onread);
51031
50876
  };
@@ -51039,17 +50884,14 @@ var require_replace = __commonJSMin((exports, module2) => {
51039
50884
  flag = "w+";
51040
50885
  return fs4.open(opt.file, flag, onopen);
51041
50886
  }
51042
- if (er) {
50887
+ if (er)
51043
50888
  return reject(er);
51044
- }
51045
50889
  fs4.fstat(fd, (er2, st) => {
51046
- if (er2) {
50890
+ if (er2)
51047
50891
  return fs4.close(fd, () => reject(er2));
51048
- }
51049
50892
  getPos(fd, st.size, (er3, position) => {
51050
- if (er3) {
50893
+ if (er3)
51051
50894
  return reject(er3);
51052
- }
51053
50895
  const stream = new fsm.WriteStream(opt.file, {
51054
50896
  fd,
51055
50897
  start: position
@@ -51069,14 +50911,13 @@ var require_replace = __commonJSMin((exports, module2) => {
51069
50911
  files.forEach((file) => {
51070
50912
  if (file.charAt(0) === "@") {
51071
50913
  t({
51072
- file: path6.resolve(p.cwd, file.slice(1)),
50914
+ file: path6.resolve(p.cwd, file.substr(1)),
51073
50915
  sync: true,
51074
50916
  noResume: true,
51075
50917
  onentry: (entry) => p.add(entry)
51076
50918
  });
51077
- } else {
50919
+ } else
51078
50920
  p.add(file);
51079
- }
51080
50921
  });
51081
50922
  p.end();
51082
50923
  };
@@ -51085,13 +50926,12 @@ var require_replace = __commonJSMin((exports, module2) => {
51085
50926
  const file = files.shift();
51086
50927
  if (file.charAt(0) === "@") {
51087
50928
  return t({
51088
- file: path6.resolve(p.cwd, file.slice(1)),
50929
+ file: path6.resolve(p.cwd, file.substr(1)),
51089
50930
  noResume: true,
51090
50931
  onentry: (entry) => p.add(entry)
51091
50932
  }).then((_) => addFilesAsync(p, files));
51092
- } else {
50933
+ } else
51093
50934
  p.add(file);
51094
- }
51095
50935
  }
51096
50936
  p.end();
51097
50937
  };
@@ -51102,24 +50942,20 @@ var require_update = __commonJSMin((exports, module2) => {
51102
50942
  var r = require_replace();
51103
50943
  module2.exports = (opt_, files, cb) => {
51104
50944
  const opt = hlo(opt_);
51105
- if (!opt.file) {
50945
+ if (!opt.file)
51106
50946
  throw new TypeError("file is required");
51107
- }
51108
- if (opt.gzip) {
50947
+ if (opt.gzip)
51109
50948
  throw new TypeError("cannot append to compressed archives");
51110
- }
51111
- if (!files || !Array.isArray(files) || !files.length) {
50949
+ if (!files || !Array.isArray(files) || !files.length)
51112
50950
  throw new TypeError("no files or directories specified");
51113
- }
51114
50951
  files = Array.from(files);
51115
50952
  mtimeFilter(opt);
51116
50953
  return r(opt, files, cb);
51117
50954
  };
51118
50955
  var mtimeFilter = (opt) => {
51119
50956
  const filter = opt.filter;
51120
- if (!opt.mtimeCache) {
50957
+ if (!opt.mtimeCache)
51121
50958
  opt.mtimeCache = /* @__PURE__ */ new Map();
51122
- }
51123
50959
  opt.filter = filter ? (path6, stat) => filter(path6, stat) && !(opt.mtimeCache.get(path6) > stat.mtime) : (path6, stat) => !(opt.mtimeCache.get(path6) > stat.mtime);
51124
50960
  };
51125
50961
  });
@@ -51471,9 +51307,8 @@ var require_mkdir = __commonJSMin((exports, module2) => {
51471
51307
  var cSet = (cache2, key, val) => cache2.set(normPath(key), val);
51472
51308
  var checkCwd = (dir, cb) => {
51473
51309
  fs4.stat(dir, (er, st) => {
51474
- if (er || !st.isDirectory()) {
51310
+ if (er || !st.isDirectory())
51475
51311
  er = new CwdError(dir, er && er.code || "ENOTDIR");
51476
- }
51477
51312
  cb(er);
51478
51313
  });
51479
51314
  };
@@ -51490,41 +51325,35 @@ var require_mkdir = __commonJSMin((exports, module2) => {
51490
51325
  const cache2 = opt.cache;
51491
51326
  const cwd = normPath(opt.cwd);
51492
51327
  const done = (er, created) => {
51493
- if (er) {
51328
+ if (er)
51494
51329
  cb(er);
51495
- } else {
51330
+ else {
51496
51331
  cSet(cache2, dir, true);
51497
- if (created && doChown) {
51332
+ if (created && doChown)
51498
51333
  chownr(created, uid2, gid, (er2) => done(er2));
51499
- } else if (needChmod) {
51334
+ else if (needChmod)
51500
51335
  fs4.chmod(dir, mode, cb);
51501
- } else {
51336
+ else
51502
51337
  cb();
51503
- }
51504
51338
  }
51505
51339
  };
51506
- if (cache2 && cGet(cache2, dir) === true) {
51340
+ if (cache2 && cGet(cache2, dir) === true)
51507
51341
  return done();
51508
- }
51509
- if (dir === cwd) {
51342
+ if (dir === cwd)
51510
51343
  return checkCwd(dir, done);
51511
- }
51512
- if (preserve) {
51344
+ if (preserve)
51513
51345
  return mkdirp(dir, { mode }).then((made) => done(null, made), done);
51514
- }
51515
51346
  const sub = normPath(path6.relative(cwd, dir));
51516
51347
  const parts = sub.split("/");
51517
51348
  mkdir_(cwd, parts, mode, cache2, unlink, cwd, null, done);
51518
51349
  };
51519
51350
  var mkdir_ = (base, parts, mode, cache2, unlink, cwd, created, cb) => {
51520
- if (!parts.length) {
51351
+ if (!parts.length)
51521
51352
  return cb(null, created);
51522
- }
51523
51353
  const p = parts.shift();
51524
51354
  const part = normPath(path6.resolve(base + "/" + p));
51525
- if (cGet(cache2, part)) {
51355
+ if (cGet(cache2, part))
51526
51356
  return mkdir_(part, parts, mode, cache2, unlink, cwd, created, cb);
51527
- }
51528
51357
  fs4.mkdir(part, mode, onmkdir(part, parts, mode, cache2, unlink, cwd, created, cb));
51529
51358
  };
51530
51359
  var onmkdir = (part, parts, mode, cache2, unlink, cwd, created, cb) => (er) => {
@@ -51533,20 +51362,18 @@ var require_mkdir = __commonJSMin((exports, module2) => {
51533
51362
  if (statEr) {
51534
51363
  statEr.path = statEr.path && normPath(statEr.path);
51535
51364
  cb(statEr);
51536
- } else if (st.isDirectory()) {
51365
+ } else if (st.isDirectory())
51537
51366
  mkdir_(part, parts, mode, cache2, unlink, cwd, created, cb);
51538
- } else if (unlink) {
51367
+ else if (unlink) {
51539
51368
  fs4.unlink(part, (er2) => {
51540
- if (er2) {
51369
+ if (er2)
51541
51370
  return cb(er2);
51542
- }
51543
51371
  fs4.mkdir(part, mode, onmkdir(part, parts, mode, cache2, unlink, cwd, created, cb));
51544
51372
  });
51545
- } else if (st.isSymbolicLink()) {
51373
+ } else if (st.isSymbolicLink())
51546
51374
  return cb(new SymlinkError(part, part + "/" + parts.join("/")));
51547
- } else {
51375
+ else
51548
51376
  cb(er);
51549
- }
51550
51377
  });
51551
51378
  } else {
51552
51379
  created = created || part;
@@ -51561,9 +51388,8 @@ var require_mkdir = __commonJSMin((exports, module2) => {
51561
51388
  } catch (er) {
51562
51389
  code = er.code;
51563
51390
  } finally {
51564
- if (!ok) {
51391
+ if (!ok)
51565
51392
  throw new CwdError(dir, code);
51566
- }
51567
51393
  }
51568
51394
  };
51569
51395
  module2.exports.sync = (dir, opt) => {
@@ -51580,31 +51406,26 @@ var require_mkdir = __commonJSMin((exports, module2) => {
51580
51406
  const cwd = normPath(opt.cwd);
51581
51407
  const done = (created2) => {
51582
51408
  cSet(cache2, dir, true);
51583
- if (created2 && doChown) {
51409
+ if (created2 && doChown)
51584
51410
  chownr.sync(created2, uid2, gid);
51585
- }
51586
- if (needChmod) {
51411
+ if (needChmod)
51587
51412
  fs4.chmodSync(dir, mode);
51588
- }
51589
51413
  };
51590
- if (cache2 && cGet(cache2, dir) === true) {
51414
+ if (cache2 && cGet(cache2, dir) === true)
51591
51415
  return done();
51592
- }
51593
51416
  if (dir === cwd) {
51594
51417
  checkCwdSync(cwd);
51595
51418
  return done();
51596
51419
  }
51597
- if (preserve) {
51420
+ if (preserve)
51598
51421
  return done(mkdirp.sync(dir, mode));
51599
- }
51600
51422
  const sub = normPath(path6.relative(cwd, dir));
51601
51423
  const parts = sub.split("/");
51602
51424
  let created = null;
51603
51425
  for (let p = parts.shift(), part = cwd; p && (part += "/" + p); p = parts.shift()) {
51604
51426
  part = normPath(path6.resolve(part));
51605
- if (cGet(cache2, part)) {
51427
+ if (cGet(cache2, part))
51606
51428
  continue;
51607
- }
51608
51429
  try {
51609
51430
  fs4.mkdirSync(part, mode);
51610
51431
  created = created || part;
@@ -51620,9 +51441,8 @@ var require_mkdir = __commonJSMin((exports, module2) => {
51620
51441
  created = created || part;
51621
51442
  cSet(cache2, part, true);
51622
51443
  continue;
51623
- } else if (st.isSymbolicLink()) {
51444
+ } else if (st.isSymbolicLink())
51624
51445
  return new SymlinkError(part, part + "/" + parts.join("/"));
51625
- }
51626
51446
  }
51627
51447
  }
51628
51448
  return done(created);
@@ -51632,9 +51452,8 @@ var require_normalize_unicode = __commonJSMin((exports, module2) => {
51632
51452
  var normalizeCache = /* @__PURE__ */ Object.create(null);
51633
51453
  var { hasOwnProperty: hasOwnProperty6 } = Object.prototype;
51634
51454
  module2.exports = (s) => {
51635
- if (!hasOwnProperty6.call(normalizeCache, s)) {
51455
+ if (!hasOwnProperty6.call(normalizeCache, s))
51636
51456
  normalizeCache[s] = s.normalize("NFKD");
51637
- }
51638
51457
  return normalizeCache[s];
51639
51458
  };
51640
51459
  });
@@ -51650,9 +51469,8 @@ var require_path_reservations = __commonJSMin((exports, module2) => {
51650
51469
  const reservations = /* @__PURE__ */ new Map();
51651
51470
  const getDirs = (path6) => {
51652
51471
  const dirs = path6.split("/").slice(0, -1).reduce((set, path7) => {
51653
- if (set.length) {
51472
+ if (set.length)
51654
51473
  path7 = join(set[set.length - 1], path7);
51655
- }
51656
51474
  set.push(path7 || "/");
51657
51475
  return set;
51658
51476
  }, []);
@@ -51661,9 +51479,8 @@ var require_path_reservations = __commonJSMin((exports, module2) => {
51661
51479
  const running = /* @__PURE__ */ new Set();
51662
51480
  const getQueues = (fn) => {
51663
51481
  const res = reservations.get(fn);
51664
- if (!res) {
51482
+ if (!res)
51665
51483
  throw new Error("function does not have any path reservations");
51666
- }
51667
51484
  return {
51668
51485
  paths: res.paths.map((path6) => queues.get(path6)),
51669
51486
  dirs: [...res.dirs].map((path6) => queues.get(path6))
@@ -51674,44 +51491,40 @@ var require_path_reservations = __commonJSMin((exports, module2) => {
51674
51491
  return paths.every((q) => q[0] === fn) && dirs.every((q) => q[0] instanceof Set && q[0].has(fn));
51675
51492
  };
51676
51493
  const run = (fn) => {
51677
- if (running.has(fn) || !check(fn)) {
51494
+ if (running.has(fn) || !check(fn))
51678
51495
  return false;
51679
- }
51680
51496
  running.add(fn);
51681
51497
  fn(() => clear(fn));
51682
51498
  return true;
51683
51499
  };
51684
51500
  const clear = (fn) => {
51685
- if (!running.has(fn)) {
51501
+ if (!running.has(fn))
51686
51502
  return false;
51687
- }
51688
51503
  const { paths, dirs } = reservations.get(fn);
51689
51504
  const next = /* @__PURE__ */ new Set();
51690
51505
  paths.forEach((path6) => {
51691
51506
  const q = queues.get(path6);
51692
51507
  assert.equal(q[0], fn);
51693
- if (q.length === 1) {
51508
+ if (q.length === 1)
51694
51509
  queues.delete(path6);
51695
- } else {
51510
+ else {
51696
51511
  q.shift();
51697
- if (typeof q[0] === "function") {
51512
+ if (typeof q[0] === "function")
51698
51513
  next.add(q[0]);
51699
- } else {
51514
+ else
51700
51515
  q[0].forEach((fn2) => next.add(fn2));
51701
- }
51702
51516
  }
51703
51517
  });
51704
51518
  dirs.forEach((dir) => {
51705
51519
  const q = queues.get(dir);
51706
51520
  assert(q[0] instanceof Set);
51707
- if (q[0].size === 1 && q.length === 1) {
51521
+ if (q[0].size === 1 && q.length === 1)
51708
51522
  queues.delete(dir);
51709
- } else if (q[0].size === 1) {
51523
+ else if (q[0].size === 1) {
51710
51524
  q.shift();
51711
51525
  next.add(q[0]);
51712
- } else {
51526
+ } else
51713
51527
  q[0].delete(fn);
51714
- }
51715
51528
  });
51716
51529
  running.delete(fn);
51717
51530
  next.forEach((fn2) => run(fn2));
@@ -51725,21 +51538,19 @@ var require_path_reservations = __commonJSMin((exports, module2) => {
51725
51538
  reservations.set(fn, { dirs, paths });
51726
51539
  paths.forEach((path6) => {
51727
51540
  const q = queues.get(path6);
51728
- if (!q) {
51541
+ if (!q)
51729
51542
  queues.set(path6, [fn]);
51730
- } else {
51543
+ else
51731
51544
  q.push(fn);
51732
- }
51733
51545
  });
51734
51546
  dirs.forEach((dir) => {
51735
51547
  const q = queues.get(dir);
51736
- if (!q) {
51548
+ if (!q)
51737
51549
  queues.set(dir, [/* @__PURE__ */ new Set([fn])]);
51738
- } else if (q[q.length - 1] instanceof Set) {
51550
+ else if (q[q.length - 1] instanceof Set)
51739
51551
  q[q.length - 1].add(fn);
51740
- } else {
51552
+ else
51741
51553
  q.push(/* @__PURE__ */ new Set([fn]));
51742
- }
51743
51554
  });
51744
51555
  return run(fn);
51745
51556
  };
@@ -51800,21 +51611,18 @@ var require_unpack = __commonJSMin((exports, module2) => {
51800
51611
  var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
51801
51612
  var isWindows = platform === "win32";
51802
51613
  var unlinkFile = (path7, cb) => {
51803
- if (!isWindows) {
51614
+ if (!isWindows)
51804
51615
  return fs4.unlink(path7, cb);
51805
- }
51806
51616
  const name5 = path7 + ".DELETE." + crypto.randomBytes(16).toString("hex");
51807
51617
  fs4.rename(path7, name5, (er) => {
51808
- if (er) {
51618
+ if (er)
51809
51619
  return cb(er);
51810
- }
51811
51620
  fs4.unlink(name5, cb);
51812
51621
  });
51813
51622
  };
51814
51623
  var unlinkFileSync = (path7) => {
51815
- if (!isWindows) {
51624
+ if (!isWindows)
51816
51625
  return fs4.unlinkSync(path7);
51817
- }
51818
51626
  const name5 = path7 + ".DELETE." + crypto.randomBytes(16).toString("hex");
51819
51627
  fs4.renameSync(path7, name5);
51820
51628
  fs4.unlinkSync(name5);
@@ -51825,21 +51633,18 @@ var require_unpack = __commonJSMin((exports, module2) => {
51825
51633
  abs = cacheKeyNormalize(abs);
51826
51634
  for (const path7 of cache2.keys()) {
51827
51635
  const pnorm = cacheKeyNormalize(path7);
51828
- if (pnorm === abs || pnorm.indexOf(abs + "/") === 0) {
51636
+ if (pnorm === abs || pnorm.indexOf(abs + "/") === 0)
51829
51637
  cache2.delete(path7);
51830
- }
51831
51638
  }
51832
51639
  };
51833
51640
  var dropCache = (cache2) => {
51834
- for (const key of cache2.keys()) {
51641
+ for (const key of cache2.keys())
51835
51642
  cache2.delete(key);
51836
- }
51837
51643
  };
51838
51644
  var Unpack = class extends Parser2 {
51839
51645
  constructor(opt) {
51840
- if (!opt) {
51646
+ if (!opt)
51841
51647
  opt = {};
51842
- }
51843
51648
  opt.ondone = (_) => {
51844
51649
  this[ENDED] = true;
51845
51650
  this[MAYBECLOSE]();
@@ -51854,9 +51659,8 @@ var require_unpack = __commonJSMin((exports, module2) => {
51854
51659
  this[ENDED] = false;
51855
51660
  this.dirCache = opt.dirCache || /* @__PURE__ */ new Map();
51856
51661
  if (typeof opt.uid === "number" || typeof opt.gid === "number") {
51857
- if (typeof opt.uid !== "number" || typeof opt.gid !== "number") {
51662
+ if (typeof opt.uid !== "number" || typeof opt.gid !== "number")
51858
51663
  throw new TypeError("cannot set owner without number uid and gid");
51859
- }
51860
51664
  if (opt.preserveOwner) {
51861
51665
  throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
51862
51666
  }
@@ -51868,11 +51672,10 @@ var require_unpack = __commonJSMin((exports, module2) => {
51868
51672
  this.gid = null;
51869
51673
  this.setOwner = false;
51870
51674
  }
51871
- if (opt.preserveOwner === void 0 && typeof opt.uid !== "number") {
51675
+ if (opt.preserveOwner === void 0 && typeof opt.uid !== "number")
51872
51676
  this.preserveOwner = process.getuid && process.getuid() === 0;
51873
- } else {
51677
+ else
51874
51678
  this.preserveOwner = !!opt.preserveOwner;
51875
- }
51876
51679
  this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : null;
51877
51680
  this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : null;
51878
51681
  this.forceChown = opt.forceChown === true;
@@ -51891,9 +51694,8 @@ var require_unpack = __commonJSMin((exports, module2) => {
51891
51694
  this.on("entry", (entry) => this[ONENTRY](entry));
51892
51695
  }
51893
51696
  warn(code, msg, data = {}) {
51894
- if (code === "TAR_BAD_ARCHIVE" || code === "TAR_ABORT") {
51697
+ if (code === "TAR_BAD_ARCHIVE" || code === "TAR_ABORT")
51895
51698
  data.recoverable = false;
51896
- }
51897
51699
  return super.warn(code, msg, data);
51898
51700
  }
51899
51701
  [MAYBECLOSE]() {
@@ -51901,22 +51703,21 @@ var require_unpack = __commonJSMin((exports, module2) => {
51901
51703
  this.emit("prefinish");
51902
51704
  this.emit("finish");
51903
51705
  this.emit("end");
51706
+ this.emit("close");
51904
51707
  }
51905
51708
  }
51906
51709
  [CHECKPATH](entry) {
51907
51710
  if (this.strip) {
51908
51711
  const parts = normPath(entry.path).split("/");
51909
- if (parts.length < this.strip) {
51712
+ if (parts.length < this.strip)
51910
51713
  return false;
51911
- }
51912
51714
  entry.path = parts.slice(this.strip).join("/");
51913
51715
  if (entry.type === "Link") {
51914
51716
  const linkparts = normPath(entry.linkpath).split("/");
51915
- if (linkparts.length >= this.strip) {
51717
+ if (linkparts.length >= this.strip)
51916
51718
  entry.linkpath = linkparts.slice(this.strip).join("/");
51917
- } else {
51719
+ else
51918
51720
  return false;
51919
- }
51920
51721
  }
51921
51722
  }
51922
51723
  if (!this.preservePaths) {
@@ -51938,11 +51739,10 @@ var require_unpack = __commonJSMin((exports, module2) => {
51938
51739
  });
51939
51740
  }
51940
51741
  }
51941
- if (path6.isAbsolute(entry.path)) {
51742
+ if (path6.isAbsolute(entry.path))
51942
51743
  entry.absolute = normPath(path6.resolve(entry.path));
51943
- } else {
51744
+ else
51944
51745
  entry.absolute = normPath(path6.resolve(this.cwd, entry.path));
51945
- }
51946
51746
  if (!this.preservePaths && entry.absolute.indexOf(this.cwd + "/") !== 0 && entry.absolute !== this.cwd) {
51947
51747
  this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
51948
51748
  entry,
@@ -51952,28 +51752,25 @@ var require_unpack = __commonJSMin((exports, module2) => {
51952
51752
  });
51953
51753
  return false;
51954
51754
  }
51955
- if (entry.absolute === this.cwd && entry.type !== "Directory" && entry.type !== "GNUDumpDir") {
51755
+ if (entry.absolute === this.cwd && entry.type !== "Directory" && entry.type !== "GNUDumpDir")
51956
51756
  return false;
51957
- }
51958
51757
  if (this.win32) {
51959
51758
  const { root: aRoot } = path6.win32.parse(entry.absolute);
51960
- entry.absolute = aRoot + wc.encode(entry.absolute.slice(aRoot.length));
51759
+ entry.absolute = aRoot + wc.encode(entry.absolute.substr(aRoot.length));
51961
51760
  const { root: pRoot } = path6.win32.parse(entry.path);
51962
- entry.path = pRoot + wc.encode(entry.path.slice(pRoot.length));
51761
+ entry.path = pRoot + wc.encode(entry.path.substr(pRoot.length));
51963
51762
  }
51964
51763
  return true;
51965
51764
  }
51966
51765
  [ONENTRY](entry) {
51967
- if (!this[CHECKPATH](entry)) {
51766
+ if (!this[CHECKPATH](entry))
51968
51767
  return entry.resume();
51969
- }
51970
51768
  assert.equal(typeof entry.absolute, "string");
51971
51769
  switch (entry.type) {
51972
51770
  case "Directory":
51973
51771
  case "GNUDumpDir":
51974
- if (entry.mode) {
51772
+ if (entry.mode)
51975
51773
  entry.mode = entry.mode | 448;
51976
- }
51977
51774
  case "File":
51978
51775
  case "OldFile":
51979
51776
  case "ContiguousFile":
@@ -51988,9 +51785,9 @@ var require_unpack = __commonJSMin((exports, module2) => {
51988
51785
  }
51989
51786
  }
51990
51787
  [ONERROR](er, entry) {
51991
- if (er.name === "CwdError") {
51788
+ if (er.name === "CwdError")
51992
51789
  this.emit("error", er);
51993
- } else {
51790
+ else {
51994
51791
  this.warn("TAR_ENTRY_ERROR", er, { entry });
51995
51792
  this[UNPEND]();
51996
51793
  entry.resume();
@@ -52028,10 +51825,9 @@ var require_unpack = __commonJSMin((exports, module2) => {
52028
51825
  autoClose: false
52029
51826
  });
52030
51827
  stream.on("error", (er) => {
52031
- if (stream.fd) {
51828
+ if (stream.fd)
52032
51829
  fs4.close(stream.fd, () => {
52033
51830
  });
52034
- }
52035
51831
  stream.write = () => true;
52036
51832
  this[ONERROR](er, entry);
52037
51833
  fullyDone();
@@ -52039,21 +51835,19 @@ var require_unpack = __commonJSMin((exports, module2) => {
52039
51835
  let actions = 1;
52040
51836
  const done = (er) => {
52041
51837
  if (er) {
52042
- if (stream.fd) {
51838
+ if (stream.fd)
52043
51839
  fs4.close(stream.fd, () => {
52044
51840
  });
52045
- }
52046
51841
  this[ONERROR](er, entry);
52047
51842
  fullyDone();
52048
51843
  return;
52049
51844
  }
52050
51845
  if (--actions === 0) {
52051
51846
  fs4.close(stream.fd, (er2) => {
52052
- if (er2) {
51847
+ if (er2)
52053
51848
  this[ONERROR](er2, entry);
52054
- } else {
51849
+ else
52055
51850
  this[UNPEND]();
52056
- }
52057
51851
  fullyDone();
52058
51852
  });
52059
51853
  }
@@ -52141,17 +51935,15 @@ var require_unpack = __commonJSMin((exports, module2) => {
52141
51935
  [CHECKFS](entry) {
52142
51936
  this[PEND]();
52143
51937
  const paths = [entry.path];
52144
- if (entry.linkpath) {
51938
+ if (entry.linkpath)
52145
51939
  paths.push(entry.linkpath);
52146
- }
52147
51940
  this.reservations.reserve(paths, (done) => this[CHECKFS2](entry, done));
52148
51941
  }
52149
51942
  [PRUNECACHE](entry) {
52150
- if (entry.type === "SymbolicLink") {
51943
+ if (entry.type === "SymbolicLink")
52151
51944
  dropCache(this.dirCache);
52152
- } else if (entry.type !== "Directory") {
51945
+ else if (entry.type !== "Directory")
52153
51946
  pruneCache(this.dirCache, entry.absolute);
52154
- }
52155
51947
  }
52156
51948
  [CHECKFS2](entry, fullyDone) {
52157
51949
  this[PRUNECACHE](entry);
@@ -52193,33 +51985,29 @@ var require_unpack = __commonJSMin((exports, module2) => {
52193
51985
  done();
52194
51986
  return;
52195
51987
  }
52196
- if (lstatEr || this[ISREUSABLE](entry, st)) {
51988
+ if (lstatEr || this[ISREUSABLE](entry, st))
52197
51989
  return this[MAKEFS](null, entry, done);
52198
- }
52199
51990
  if (st.isDirectory()) {
52200
51991
  if (entry.type === "Directory") {
52201
51992
  const needChmod = !this.noChmod && entry.mode && (st.mode & 4095) !== entry.mode;
52202
51993
  const afterChmod = (er) => this[MAKEFS](er, entry, done);
52203
- if (!needChmod) {
51994
+ if (!needChmod)
52204
51995
  return afterChmod();
52205
- }
52206
51996
  return fs4.chmod(entry.absolute, entry.mode, afterChmod);
52207
51997
  }
52208
51998
  if (entry.absolute !== this.cwd) {
52209
51999
  return fs4.rmdir(entry.absolute, (er) => this[MAKEFS](er, entry, done));
52210
52000
  }
52211
52001
  }
52212
- if (entry.absolute === this.cwd) {
52002
+ if (entry.absolute === this.cwd)
52213
52003
  return this[MAKEFS](null, entry, done);
52214
- }
52215
52004
  unlinkFile(entry.absolute, (er) => this[MAKEFS](er, entry, done));
52216
52005
  });
52217
52006
  };
52218
- if (this[CHECKED_CWD]) {
52007
+ if (this[CHECKED_CWD])
52219
52008
  start();
52220
- } else {
52009
+ else
52221
52010
  checkCwd();
52222
- }
52223
52011
  }
52224
52012
  [MAKEFS](er, entry, done) {
52225
52013
  if (er) {
@@ -52243,9 +52031,9 @@ var require_unpack = __commonJSMin((exports, module2) => {
52243
52031
  }
52244
52032
  [LINK](entry, linkpath, link, done) {
52245
52033
  fs4[link](linkpath, entry.absolute, (er) => {
52246
- if (er) {
52034
+ if (er)
52247
52035
  this[ONERROR](er, entry);
52248
- } else {
52036
+ else {
52249
52037
  this[UNPEND]();
52250
52038
  entry.resume();
52251
52039
  }
@@ -52269,27 +52057,23 @@ var require_unpack = __commonJSMin((exports, module2) => {
52269
52057
  this[PRUNECACHE](entry);
52270
52058
  if (!this[CHECKED_CWD]) {
52271
52059
  const er2 = this[MKDIR](this.cwd, this.dmode);
52272
- if (er2) {
52060
+ if (er2)
52273
52061
  return this[ONERROR](er2, entry);
52274
- }
52275
52062
  this[CHECKED_CWD] = true;
52276
52063
  }
52277
52064
  if (entry.absolute !== this.cwd) {
52278
52065
  const parent = normPath(path6.dirname(entry.absolute));
52279
52066
  if (parent !== this.cwd) {
52280
52067
  const mkParent = this[MKDIR](parent, this.dmode);
52281
- if (mkParent) {
52068
+ if (mkParent)
52282
52069
  return this[ONERROR](mkParent, entry);
52283
- }
52284
52070
  }
52285
52071
  }
52286
52072
  const [lstatEr, st] = callSync(() => fs4.lstatSync(entry.absolute));
52287
- if (st && (this.keep || this.newer && st.mtime > entry.mtime)) {
52073
+ if (st && (this.keep || this.newer && st.mtime > entry.mtime))
52288
52074
  return this[SKIP](entry);
52289
- }
52290
- if (lstatEr || this[ISREUSABLE](entry, st)) {
52075
+ if (lstatEr || this[ISREUSABLE](entry, st))
52291
52076
  return this[MAKEFS](null, entry);
52292
- }
52293
52077
  if (st.isDirectory()) {
52294
52078
  if (entry.type === "Directory") {
52295
52079
  const needChmod = !this.noChmod && entry.mode && (st.mode & 4095) !== entry.mode;
@@ -52313,9 +52097,8 @@ var require_unpack = __commonJSMin((exports, module2) => {
52313
52097
  } catch (e) {
52314
52098
  closeError = e;
52315
52099
  }
52316
- if (er || closeError) {
52100
+ if (er || closeError)
52317
52101
  this[ONERROR](er || closeError, entry);
52318
- }
52319
52102
  done();
52320
52103
  };
52321
52104
  let fd;
@@ -52430,29 +52213,23 @@ var require_extract = __commonJSMin((exports, module2) => {
52430
52213
  var path6 = __require("path");
52431
52214
  var stripSlash = require_strip_trailing_slashes();
52432
52215
  module2.exports = (opt_, files, cb) => {
52433
- if (typeof opt_ === "function") {
52216
+ if (typeof opt_ === "function")
52434
52217
  cb = opt_, files = null, opt_ = {};
52435
- } else if (Array.isArray(opt_)) {
52218
+ else if (Array.isArray(opt_))
52436
52219
  files = opt_, opt_ = {};
52437
- }
52438
- if (typeof files === "function") {
52220
+ if (typeof files === "function")
52439
52221
  cb = files, files = null;
52440
- }
52441
- if (!files) {
52222
+ if (!files)
52442
52223
  files = [];
52443
- } else {
52224
+ else
52444
52225
  files = Array.from(files);
52445
- }
52446
52226
  const opt = hlo(opt_);
52447
- if (opt.sync && typeof cb === "function") {
52227
+ if (opt.sync && typeof cb === "function")
52448
52228
  throw new TypeError("callback not supported for sync tar functions");
52449
- }
52450
- if (!opt.file && typeof cb === "function") {
52229
+ if (!opt.file && typeof cb === "function")
52451
52230
  throw new TypeError("callback only supported with file option");
52452
- }
52453
- if (files.length) {
52231
+ if (files.length)
52454
52232
  filesFilter(opt, files);
52455
- }
52456
52233
  return opt.file && opt.sync ? extractFileSync(opt) : opt.file ? extractFile(opt, cb) : opt.sync ? extractSync(opt) : extract(opt);
52457
52234
  };
52458
52235
  var filesFilter = (opt, files) => {
@@ -52485,9 +52262,9 @@ var require_extract = __commonJSMin((exports, module2) => {
52485
52262
  u.on("error", reject);
52486
52263
  u.on("close", resolve);
52487
52264
  fs4.stat(file, (er, stat) => {
52488
- if (er) {
52265
+ if (er)
52489
52266
  reject(er);
52490
- } else {
52267
+ else {
52491
52268
  const stream = new fsm.ReadStream(file, {
52492
52269
  readSize,
52493
52270
  size: stat.size
@@ -59400,9 +59177,7 @@ function _regeneratorRuntime() {
59400
59177
  _regeneratorRuntime = function _regeneratorRuntime2() {
59401
59178
  return exports;
59402
59179
  };
59403
- var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function(obj, key, desc) {
59404
- obj[key] = desc.value;
59405
- }, $Symbol = typeof Symbol == "function" ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
59180
+ var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = typeof Symbol == "function" ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
59406
59181
  function define3(obj, key, value) {
59407
59182
  return Object.defineProperty(obj, key, {
59408
59183
  value,
@@ -59420,9 +59195,48 @@ function _regeneratorRuntime() {
59420
59195
  }
59421
59196
  function wrap(innerFn, outerFn, self3, tryLocsList) {
59422
59197
  var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []);
59423
- return defineProperty(generator, "_invoke", {
59424
- value: makeInvokeMethod(innerFn, self3, context)
59425
- }), generator;
59198
+ return generator._invoke = function(innerFn2, self4, context2) {
59199
+ var state = "suspendedStart";
59200
+ return function(method, arg) {
59201
+ if (state === "executing")
59202
+ throw new Error("Generator is already running");
59203
+ if (state === "completed") {
59204
+ if (method === "throw")
59205
+ throw arg;
59206
+ return doneResult();
59207
+ }
59208
+ for (context2.method = method, context2.arg = arg; ; ) {
59209
+ var delegate = context2.delegate;
59210
+ if (delegate) {
59211
+ var delegateResult = maybeInvokeDelegate(delegate, context2);
59212
+ if (delegateResult) {
59213
+ if (delegateResult === ContinueSentinel)
59214
+ continue;
59215
+ return delegateResult;
59216
+ }
59217
+ }
59218
+ if (context2.method === "next")
59219
+ context2.sent = context2._sent = context2.arg;
59220
+ else if (context2.method === "throw") {
59221
+ if (state === "suspendedStart")
59222
+ throw state = "completed", context2.arg;
59223
+ context2.dispatchException(context2.arg);
59224
+ } else
59225
+ context2.method === "return" && context2.abrupt("return", context2.arg);
59226
+ state = "executing";
59227
+ var record = tryCatch(innerFn2, self4, context2);
59228
+ if (record.type === "normal") {
59229
+ if (state = context2.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel)
59230
+ continue;
59231
+ return {
59232
+ value: record.arg,
59233
+ done: context2.done
59234
+ };
59235
+ }
59236
+ record.type === "throw" && (state = "completed", context2.method = "throw", context2.arg = record.arg);
59237
+ }
59238
+ };
59239
+ }(innerFn, self3, context), generator;
59426
59240
  }
59427
59241
  function tryCatch(fn, obj, arg) {
59428
59242
  try {
@@ -59477,63 +59291,25 @@ function _regeneratorRuntime() {
59477
59291
  reject(record.arg);
59478
59292
  }
59479
59293
  var previousPromise;
59480
- defineProperty(this, "_invoke", {
59481
- value: function value(method, arg) {
59482
- function callInvokeWithMethodAndArg() {
59483
- return new PromiseImpl(function(resolve, reject) {
59484
- invoke(method, arg, resolve, reject);
59485
- });
59486
- }
59487
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
59488
- }
59489
- });
59490
- }
59491
- function makeInvokeMethod(innerFn, self3, context) {
59492
- var state = "suspendedStart";
59493
- return function(method, arg) {
59494
- if (state === "executing")
59495
- throw new Error("Generator is already running");
59496
- if (state === "completed") {
59497
- if (method === "throw")
59498
- throw arg;
59499
- return doneResult();
59500
- }
59501
- for (context.method = method, context.arg = arg; ; ) {
59502
- var delegate = context.delegate;
59503
- if (delegate) {
59504
- var delegateResult = maybeInvokeDelegate(delegate, context);
59505
- if (delegateResult) {
59506
- if (delegateResult === ContinueSentinel)
59507
- continue;
59508
- return delegateResult;
59509
- }
59510
- }
59511
- if (context.method === "next")
59512
- context.sent = context._sent = context.arg;
59513
- else if (context.method === "throw") {
59514
- if (state === "suspendedStart")
59515
- throw state = "completed", context.arg;
59516
- context.dispatchException(context.arg);
59517
- } else
59518
- context.method === "return" && context.abrupt("return", context.arg);
59519
- state = "executing";
59520
- var record = tryCatch(innerFn, self3, context);
59521
- if (record.type === "normal") {
59522
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel)
59523
- continue;
59524
- return {
59525
- value: record.arg,
59526
- done: context.done
59527
- };
59528
- }
59529
- record.type === "throw" && (state = "completed", context.method = "throw", context.arg = record.arg);
59294
+ this._invoke = function(method, arg) {
59295
+ function callInvokeWithMethodAndArg() {
59296
+ return new PromiseImpl(function(resolve, reject) {
59297
+ invoke(method, arg, resolve, reject);
59298
+ });
59530
59299
  }
59300
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
59531
59301
  };
59532
59302
  }
59533
59303
  function maybeInvokeDelegate(delegate, context) {
59534
- var methodName = context.method, method = delegate.iterator[methodName];
59535
- if (method === void 0)
59536
- return context.delegate = null, methodName === "throw" && delegate.iterator["return"] && (context.method = "return", context.arg = void 0, maybeInvokeDelegate(delegate, context), context.method === "throw") || methodName !== "return" && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
59304
+ var method = delegate.iterator[context.method];
59305
+ if (method === void 0) {
59306
+ if (context.delegate = null, context.method === "throw") {
59307
+ if (delegate.iterator["return"] && (context.method = "return", context.arg = void 0, maybeInvokeDelegate(delegate, context), context.method === "throw"))
59308
+ return ContinueSentinel;
59309
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
59310
+ }
59311
+ return ContinueSentinel;
59312
+ }
59537
59313
  var record = tryCatch(method, delegate.iterator, context.arg);
59538
59314
  if (record.type === "throw")
59539
59315
  return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
@@ -59583,13 +59359,7 @@ function _regeneratorRuntime() {
59583
59359
  done: true
59584
59360
  };
59585
59361
  }
59586
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
59587
- value: GeneratorFunctionPrototype,
59588
- configurable: true
59589
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
59590
- value: GeneratorFunction,
59591
- configurable: true
59592
- }), GeneratorFunction.displayName = define3(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function(genFun) {
59362
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define3(Gp, "constructor", GeneratorFunctionPrototype), define3(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define3(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function(genFun) {
59593
59363
  var ctor = typeof genFun == "function" && genFun.constructor;
59594
59364
  return !!ctor && (ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction");
59595
59365
  }, exports.mark = function(genFun) {
@@ -59610,8 +59380,8 @@ function _regeneratorRuntime() {
59610
59380
  return this;
59611
59381
  }), define3(Gp, "toString", function() {
59612
59382
  return "[object Generator]";
59613
- }), exports.keys = function(val) {
59614
- var object = Object(val), keys = [];
59383
+ }), exports.keys = function(object) {
59384
+ var keys = [];
59615
59385
  for (var key in object) {
59616
59386
  keys.push(key);
59617
59387
  }
@@ -59756,29 +59526,6 @@ function _classCallCheck(instance, Constructor) {
59756
59526
  }
59757
59527
  var init_classCallCheck = __esmMin(() => {
59758
59528
  });
59759
- function _toPrimitive(input, hint) {
59760
- if (_typeof(input) !== "object" || input === null)
59761
- return input;
59762
- var prim = input[Symbol.toPrimitive];
59763
- if (prim !== void 0) {
59764
- var res = prim.call(input, hint || "default");
59765
- if (_typeof(res) !== "object")
59766
- return res;
59767
- throw new TypeError("@@toPrimitive must return a primitive value.");
59768
- }
59769
- return (hint === "string" ? String : Number)(input);
59770
- }
59771
- var init_toPrimitive = __esmMin(() => {
59772
- init_typeof();
59773
- });
59774
- function _toPropertyKey(arg) {
59775
- var key = _toPrimitive(arg, "string");
59776
- return _typeof(key) === "symbol" ? key : String(key);
59777
- }
59778
- var init_toPropertyKey = __esmMin(() => {
59779
- init_typeof();
59780
- init_toPrimitive();
59781
- });
59782
59529
  function _defineProperties(target, props) {
59783
59530
  for (var i = 0; i < props.length; i++) {
59784
59531
  var descriptor = props[i];
@@ -59786,7 +59533,7 @@ function _defineProperties(target, props) {
59786
59533
  descriptor.configurable = true;
59787
59534
  if ("value" in descriptor)
59788
59535
  descriptor.writable = true;
59789
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
59536
+ Object.defineProperty(target, descriptor.key, descriptor);
59790
59537
  }
59791
59538
  }
59792
59539
  function _createClass(Constructor, protoProps, staticProps) {
@@ -59800,10 +59547,8 @@ function _createClass(Constructor, protoProps, staticProps) {
59800
59547
  return Constructor;
59801
59548
  }
59802
59549
  var init_createClass = __esmMin(() => {
59803
- init_toPropertyKey();
59804
59550
  });
59805
59551
  function _defineProperty(obj, key, value) {
59806
- key = _toPropertyKey(key);
59807
59552
  if (key in obj) {
59808
59553
  Object.defineProperty(obj, key, {
59809
59554
  value,
@@ -59817,7 +59562,6 @@ function _defineProperty(obj, key, value) {
59817
59562
  return obj;
59818
59563
  }
59819
59564
  var init_defineProperty = __esmMin(() => {
59820
- init_toPropertyKey();
59821
59565
  });
59822
59566
  function ownKeys(object, enumerableOnly) {
59823
59567
  var keys = Object.keys(object);
@@ -60407,7 +60151,7 @@ var init_tokens = __esmMin(() => {
60407
60151
  });
60408
60152
  dbStarTok = TokenType("**", {
60409
60153
  expectNext: function(next) {
60410
- return next === dotTok || next === bracketLTok || next === eofTok || next === commaTok || next === parenRTok;
60154
+ return next === dotTok || next === parenLTok || next === bracketLTok || next === eofTok || next === commaTok || next === parenRTok;
60411
60155
  }
60412
60156
  });
60413
60157
  dotTok = TokenType(".", {
@@ -60544,11 +60288,11 @@ var init_tokens = __esmMin(() => {
60544
60288
  });
60545
60289
  eofTok = TokenType("eof");
60546
60290
  });
60547
- var nonASCIIWhitespace, fullCharCodeAtPos, isRewordCode, getError, slice, Tokenizer;
60291
+ var nonASCIIwhitespace, fullCharCodeAtPos, isRewordCode, getError, slice, Tokenizer;
60548
60292
  var init_tokenizer = __esmMin(() => {
60549
60293
  init_tokens();
60550
60294
  init_contexts();
60551
- nonASCIIWhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
60295
+ nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
60552
60296
  fullCharCodeAtPos = function(input, pos) {
60553
60297
  if (String.fromCharCode)
60554
60298
  return input.codePointAt(pos);
@@ -60645,7 +60389,7 @@ var init_tokenizer = __esmMin(() => {
60645
60389
  ++this.state.pos;
60646
60390
  break;
60647
60391
  default:
60648
- if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIWhitespace.test(String.fromCharCode(ch))) {
60392
+ if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
60649
60393
  ++this.state.pos;
60650
60394
  } else {
60651
60395
  break loop;
@@ -60693,7 +60437,7 @@ var init_tokenizer = __esmMin(() => {
60693
60437
  string = slice(this.input, startPos, this.state.pos);
60694
60438
  break;
60695
60439
  }
60696
- if (code > 8 && code < 14 || code >= 5760 && nonASCIIWhitespace.test(String.fromCharCode(code))) {
60440
+ if (code > 8 && code < 14 || code >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(code))) {
60697
60441
  string = slice(this.input, startPos, this.state.pos);
60698
60442
  break;
60699
60443
  }
@@ -60705,7 +60449,7 @@ var init_tokenizer = __esmMin(() => {
60705
60449
  }
60706
60450
  this.finishToken(nameTok, string);
60707
60451
  };
60708
- Tokenizer2.prototype.readIgnoreString = function() {
60452
+ Tokenizer2.prototype.readIngoreString = function() {
60709
60453
  var startPos = this.state.pos, prevCode, string = "";
60710
60454
  while (true) {
60711
60455
  var code = this.getCode();
@@ -60744,7 +60488,7 @@ var init_tokenizer = __esmMin(() => {
60744
60488
  if (this.input.length <= this.state.pos) {
60745
60489
  this.finishToken(eofTok);
60746
60490
  } else if (this.curContext() === bracketDContext) {
60747
- this.readIgnoreString();
60491
+ this.readIngoreString();
60748
60492
  } else if (code === 123) {
60749
60493
  this.state.pos++;
60750
60494
  this.finishToken(braceLTok);
@@ -61421,6 +61165,7 @@ var init_matcher = __esmMin(() => {
61421
61165
  this.record = record;
61422
61166
  }
61423
61167
  Matcher2.prototype.next = function(node, pos) {
61168
+ var isLastToken = pos === this.path.length - 1;
61424
61169
  if (node.after) {
61425
61170
  return this.matchNode(node.after, pos);
61426
61171
  }
@@ -61433,7 +61178,6 @@ var init_matcher = __esmMin(() => {
61433
61178
  return !!this.take(pos);
61434
61179
  }
61435
61180
  }
61436
- var isLastToken = pos === this.path.length - 1;
61437
61181
  if (isLastToken) {
61438
61182
  return !!this.take(pos);
61439
61183
  } else {
@@ -62091,7 +61835,10 @@ var init_esm = __esmMin(() => {
62091
61835
  return matcher;
62092
61836
  };
62093
61837
  Path2.isPathPattern = function(target) {
62094
- return !!(isStr2(target) || isArr2(target) || isRegExp2(target) || isFn2(target) && target[isMatcher]);
61838
+ if (isStr2(target) || isArr2(target) || isRegExp2(target) || isFn2(target) && target[isMatcher]) {
61839
+ return true;
61840
+ }
61841
+ return false;
62095
61842
  };
62096
61843
  Path2.transform = function(pattern, regexp, callback) {
62097
61844
  return Path2.parse(pattern).transform(regexp, callback);
@@ -64545,10 +64292,10 @@ var init_registry = __esmMin(() => {
64545
64292
  };
64546
64293
  getISOCode = function(language) {
64547
64294
  var isoCode = registry.locales.language;
64295
+ var lang = lowerCase(language);
64548
64296
  if (registry.locales.messages[language]) {
64549
64297
  return language;
64550
64298
  }
64551
- var lang = lowerCase(language);
64552
64299
  each(registry.locales.messages, function(messages, key) {
64553
64300
  var target = lowerCase(key);
64554
64301
  if (target.indexOf(lang) > -1 || lang.indexOf(target) > -1) {
@@ -66655,7 +66402,7 @@ var init_internals2 = __esmMin(() => {
66655
66402
  noEmit = false;
66656
66403
  }
66657
66404
  return __awaiter4(void 0, void 0, void 0, function() {
66658
- var typedDefaultValue, initialValue;
66405
+ var typedDefaultValue;
66659
66406
  return __generator4(this, function(_a2) {
66660
66407
  switch (_a2.label) {
66661
66408
  case 0:
@@ -66671,8 +66418,7 @@ var init_internals2 = __esmMin(() => {
66671
66418
  if (options3 === null || options3 === void 0 ? void 0 : options3.forceClear) {
66672
66419
  target.value = typedDefaultValue;
66673
66420
  } else {
66674
- initialValue = target.initialValue;
66675
- target.value = toJS(!isUndef(initialValue) ? initialValue : typedDefaultValue);
66421
+ target.value = toJS(!isUndef(target.initialValue) ? target.initialValue : typedDefaultValue);
66676
66422
  }
66677
66423
  }
66678
66424
  if (!noEmit) {
@@ -66716,10 +66462,15 @@ var init_internals2 = __esmMin(() => {
66716
66462
  return value;
66717
66463
  };
66718
66464
  allowAssignDefaultValue = function(target, source) {
66465
+ var isEmptyTarget = target !== null && isEmpty(target);
66466
+ var isEmptySource = source !== null && isEmpty(source);
66719
66467
  var isValidTarget = !isUndef(target);
66720
66468
  var isValidSource = !isUndef(source);
66721
66469
  if (!isValidTarget) {
66722
- return isValidSource;
66470
+ if (isValidSource) {
66471
+ return true;
66472
+ }
66473
+ return false;
66723
66474
  }
66724
66475
  if (typeof target === typeof source) {
66725
66476
  if (target === "")
@@ -66727,10 +66478,12 @@ var init_internals2 = __esmMin(() => {
66727
66478
  if (target === 0)
66728
66479
  return false;
66729
66480
  }
66730
- var isEmptyTarget = target !== null && isEmpty(target);
66731
- var isEmptySource = source !== null && isEmpty(source);
66732
66481
  if (isEmptyTarget) {
66733
- return !isEmptySource;
66482
+ if (isEmptySource) {
66483
+ return false;
66484
+ } else {
66485
+ return true;
66486
+ }
66734
66487
  }
66735
66488
  return false;
66736
66489
  };
@@ -67635,14 +67388,8 @@ var init_Field = __esmMin(() => {
67635
67388
  return _this.value;
67636
67389
  }, function(value) {
67637
67390
  _this.notify(LifeCycleTypes.ON_FIELD_VALUE_CHANGE);
67638
- if (isValid(value)) {
67639
- if (_this.selfModified && !_this.caches.inputting) {
67640
- validateSelf(_this);
67641
- }
67642
- if (!isEmpty(value) && _this.display === "none") {
67643
- _this.caches.value = toJS(value);
67644
- _this.form.deleteValuesIn(_this.path);
67645
- }
67391
+ if (isValid(value) && _this.selfModified && !_this.caches.inputting) {
67392
+ validateSelf(_this);
67646
67393
  }
67647
67394
  }), createReaction(function() {
67648
67395
  return _this.initialValue;
@@ -67653,14 +67400,16 @@ var init_Field = __esmMin(() => {
67653
67400
  }, function(display) {
67654
67401
  var _a2;
67655
67402
  var value = _this.value;
67656
- if (display !== "none") {
67657
- if (!isValid(value)) {
67403
+ if (display === "visible") {
67404
+ if (isEmpty(value)) {
67658
67405
  _this.setValue(_this.caches.value);
67659
67406
  _this.caches.value = void 0;
67660
67407
  }
67661
67408
  } else {
67662
67409
  _this.caches.value = (_a2 = toJS(value)) !== null && _a2 !== void 0 ? _a2 : toJS(_this.initialValue);
67663
- _this.form.deleteValuesIn(_this.path);
67410
+ if (display === "none") {
67411
+ _this.form.deleteValuesIn(_this.path);
67412
+ }
67664
67413
  }
67665
67414
  if (display === "none" || display === "hidden") {
67666
67415
  _this.setFeedback({
@@ -68394,14 +68143,13 @@ var init_Form = __esmMin(() => {
68394
68143
  if (!isPlainObj(values))
68395
68144
  return;
68396
68145
  if (strategy === "merge" || strategy === "deepMerge") {
68397
- merge(_this.values, values, {
68146
+ _this.values = merge(_this.values, values, {
68398
68147
  arrayMerge: function(target, source) {
68399
68148
  return source;
68400
- },
68401
- assign: true
68149
+ }
68402
68150
  });
68403
68151
  } else if (strategy === "shallowMerge") {
68404
- Object.assign(_this.values, values);
68152
+ _this.values = Object.assign(_this.values, values);
68405
68153
  } else {
68406
68154
  _this.values = values;
68407
68155
  }
@@ -68413,14 +68161,13 @@ var init_Form = __esmMin(() => {
68413
68161
  if (!isPlainObj(initialValues))
68414
68162
  return;
68415
68163
  if (strategy === "merge" || strategy === "deepMerge") {
68416
- merge(_this.initialValues, initialValues, {
68164
+ _this.initialValues = merge(_this.initialValues, initialValues, {
68417
68165
  arrayMerge: function(target, source) {
68418
68166
  return source;
68419
- },
68420
- assign: true
68167
+ }
68421
68168
  });
68422
68169
  } else if (strategy === "shallowMerge") {
68423
- Object.assign(_this.initialValues, initialValues);
68170
+ _this.initialValues = Object.assign(_this.initialValues, initialValues);
68424
68171
  } else {
68425
68172
  _this.initialValues = initialValues;
68426
68173
  }
@@ -68869,7 +68616,6 @@ function createFormEffect(type) {
68869
68616
  }
68870
68617
  var onFormInit, onFormMount, onFormUnmount, onFormValuesChange, onFormInitialValuesChange, onFormInputChange, onFormSubmit, onFormReset, onFormSubmitStart, onFormSubmitEnd, onFormSubmitSuccess, onFormSubmitFailed, onFormSubmitValidateStart, onFormSubmitValidateSuccess, onFormSubmitValidateFailed, onFormSubmitValidateEnd, onFormValidateStart, onFormValidateSuccess, onFormValidateFailed, onFormValidateEnd, onFormGraphChange, onFormLoading;
68871
68618
  var init_onFormEffects = __esmMin(() => {
68872
- init_esm2();
68873
68619
  init_esm3();
68874
68620
  init_types4();
68875
68621
  init_effective();
@@ -71994,6 +71740,7 @@ var require_animationFrames = __commonJSMin((exports) => {
71994
71740
  Object.defineProperty(exports, "__esModule", { value: true });
71995
71741
  exports.animationFrames = void 0;
71996
71742
  var Observable_1 = require_Observable();
71743
+ var Subscription_1 = require_Subscription();
71997
71744
  var performanceTimestampProvider_1 = require_performanceTimestampProvider();
71998
71745
  var animationFrameProvider_1 = require_animationFrameProvider();
71999
71746
  function animationFrames(timestampProvider) {
@@ -72001,29 +71748,23 @@ var require_animationFrames = __commonJSMin((exports) => {
72001
71748
  }
72002
71749
  exports.animationFrames = animationFrames;
72003
71750
  function animationFramesFactory(timestampProvider) {
71751
+ var schedule = animationFrameProvider_1.animationFrameProvider.schedule;
72004
71752
  return new Observable_1.Observable(function(subscriber) {
71753
+ var subscription = new Subscription_1.Subscription();
72005
71754
  var provider = timestampProvider || performanceTimestampProvider_1.performanceTimestampProvider;
72006
71755
  var start = provider.now();
72007
- var id = 0;
72008
- var run = function() {
71756
+ var run = function(timestamp) {
71757
+ var now = provider.now();
71758
+ subscriber.next({
71759
+ timestamp: timestampProvider ? now : timestamp,
71760
+ elapsed: now - start
71761
+ });
72009
71762
  if (!subscriber.closed) {
72010
- id = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function(timestamp) {
72011
- id = 0;
72012
- var now = provider.now();
72013
- subscriber.next({
72014
- timestamp: timestampProvider ? now : timestamp,
72015
- elapsed: now - start
72016
- });
72017
- run();
72018
- });
72019
- }
72020
- };
72021
- run();
72022
- return function() {
72023
- if (id) {
72024
- animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id);
71763
+ subscription.add(schedule(run));
72025
71764
  }
72026
71765
  };
71766
+ subscription.add(schedule(run));
71767
+ return subscription;
72027
71768
  });
72028
71769
  }
72029
71770
  var DEFAULT_ANIMATION_FRAMES = animationFramesFactory();
@@ -72592,7 +72333,6 @@ var require_AsyncAction = __commonJSMin((exports) => {
72592
72333
  return _this;
72593
72334
  }
72594
72335
  AsyncAction2.prototype.schedule = function(state, delay) {
72595
- var _a2;
72596
72336
  if (delay === void 0) {
72597
72337
  delay = 0;
72598
72338
  }
@@ -72607,7 +72347,7 @@ var require_AsyncAction = __commonJSMin((exports) => {
72607
72347
  }
72608
72348
  this.pending = true;
72609
72349
  this.delay = delay;
72610
- this.id = (_a2 = this.id) !== null && _a2 !== void 0 ? _a2 : this.requestAsyncId(scheduler, this.id, delay);
72350
+ this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
72611
72351
  return this;
72612
72352
  };
72613
72353
  AsyncAction2.prototype.requestAsyncId = function(scheduler, _id, delay) {
@@ -72623,9 +72363,7 @@ var require_AsyncAction = __commonJSMin((exports) => {
72623
72363
  if (delay != null && this.delay === delay && this.pending === false) {
72624
72364
  return id;
72625
72365
  }
72626
- if (id != null) {
72627
- intervalProvider_1.intervalProvider.clearInterval(id);
72628
- }
72366
+ intervalProvider_1.intervalProvider.clearInterval(id);
72629
72367
  return void 0;
72630
72368
  };
72631
72369
  AsyncAction2.prototype.execute = function(state, delay) {
@@ -72803,15 +72541,15 @@ var require_AsapAction = __commonJSMin((exports) => {
72803
72541
  return scheduler._scheduled || (scheduler._scheduled = immediateProvider_1.immediateProvider.setImmediate(scheduler.flush.bind(scheduler, void 0)));
72804
72542
  };
72805
72543
  AsapAction2.prototype.recycleAsyncId = function(scheduler, id, delay) {
72806
- var _a2;
72807
72544
  if (delay === void 0) {
72808
72545
  delay = 0;
72809
72546
  }
72810
- if (delay != null ? delay > 0 : this.delay > 0) {
72547
+ if (delay != null && delay > 0 || delay == null && this.delay > 0) {
72811
72548
  return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
72812
72549
  }
72813
- var actions = scheduler.actions;
72814
- if (id != null && ((_a2 = actions[actions.length - 1]) === null || _a2 === void 0 ? void 0 : _a2.id) !== id) {
72550
+ if (!scheduler.actions.some(function(action2) {
72551
+ return action2.id === id;
72552
+ })) {
72815
72553
  immediateProvider_1.immediateProvider.clearImmediate(id);
72816
72554
  scheduler._scheduled = void 0;
72817
72555
  }
@@ -72880,6 +72618,7 @@ var require_AsyncScheduler = __commonJSMin((exports) => {
72880
72618
  var _this = _super.call(this, SchedulerAction, now) || this;
72881
72619
  _this.actions = [];
72882
72620
  _this._active = false;
72621
+ _this._scheduled = void 0;
72883
72622
  return _this;
72884
72623
  }
72885
72624
  AsyncScheduler2.prototype.flush = function(action2) {
@@ -73036,8 +72775,7 @@ var require_QueueAction = __commonJSMin((exports) => {
73036
72775
  if (delay != null && delay > 0 || delay == null && this.delay > 0) {
73037
72776
  return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
73038
72777
  }
73039
- scheduler.flush(this);
73040
- return 0;
72778
+ return scheduler.flush(this);
73041
72779
  };
73042
72780
  return QueueAction2;
73043
72781
  }(AsyncAction_1.AsyncAction);
@@ -73135,15 +72873,15 @@ var require_AnimationFrameAction = __commonJSMin((exports) => {
73135
72873
  }));
73136
72874
  };
73137
72875
  AnimationFrameAction2.prototype.recycleAsyncId = function(scheduler, id, delay) {
73138
- var _a2;
73139
72876
  if (delay === void 0) {
73140
72877
  delay = 0;
73141
72878
  }
73142
- if (delay != null ? delay > 0 : this.delay > 0) {
72879
+ if (delay != null && delay > 0 || delay == null && this.delay > 0) {
73143
72880
  return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
73144
72881
  }
73145
- var actions = scheduler.actions;
73146
- if (id != null && ((_a2 = actions[actions.length - 1]) === null || _a2 === void 0 ? void 0 : _a2.id) !== id) {
72882
+ if (!scheduler.actions.some(function(action2) {
72883
+ return action2.id === id;
72884
+ })) {
73147
72885
  animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id);
73148
72886
  scheduler._scheduled = void 0;
73149
72887
  }
@@ -73322,7 +73060,7 @@ var require_VirtualTimeScheduler = __commonJSMin((exports) => {
73322
73060
  var actions = scheduler.actions;
73323
73061
  actions.push(this);
73324
73062
  actions.sort(VirtualAction2.sortActions);
73325
- return 1;
73063
+ return true;
73326
73064
  };
73327
73065
  VirtualAction2.prototype.recycleAsyncId = function(scheduler, id, delay) {
73328
73066
  if (delay === void 0) {
@@ -76421,7 +76159,7 @@ var require_connect = __commonJSMin((exports) => {
76421
76159
  Object.defineProperty(exports, "__esModule", { value: true });
76422
76160
  exports.connect = void 0;
76423
76161
  var Subject_1 = require_Subject();
76424
- var innerFrom_1 = require_innerFrom();
76162
+ var from_1 = require_from();
76425
76163
  var lift_1 = require_lift();
76426
76164
  var fromSubscribable_1 = require_fromSubscribable();
76427
76165
  var DEFAULT_CONFIG = {
@@ -76436,7 +76174,7 @@ var require_connect = __commonJSMin((exports) => {
76436
76174
  var connector = config.connector;
76437
76175
  return lift_1.operate(function(source, subscriber) {
76438
76176
  var subject = connector();
76439
- innerFrom_1.innerFrom(selector(fromSubscribable_1.fromSubscribable(subject))).subscribe(subscriber);
76177
+ from_1.from(selector(fromSubscribable_1.fromSubscribable(subject))).subscribe(subscriber);
76440
76178
  subscriber.add(source.subscribe(subject));
76441
76179
  });
76442
76180
  }
@@ -76852,6 +76590,39 @@ var require_every = __commonJSMin((exports) => {
76852
76590
  }
76853
76591
  exports.every = every;
76854
76592
  });
76593
+ var require_exhaustAll = __commonJSMin((exports) => {
76594
+ "use strict";
76595
+ Object.defineProperty(exports, "__esModule", { value: true });
76596
+ exports.exhaustAll = void 0;
76597
+ var lift_1 = require_lift();
76598
+ var innerFrom_1 = require_innerFrom();
76599
+ var OperatorSubscriber_1 = require_OperatorSubscriber();
76600
+ function exhaustAll() {
76601
+ return lift_1.operate(function(source, subscriber) {
76602
+ var isComplete = false;
76603
+ var innerSub = null;
76604
+ source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(inner) {
76605
+ if (!innerSub) {
76606
+ innerSub = innerFrom_1.innerFrom(inner).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, function() {
76607
+ innerSub = null;
76608
+ isComplete && subscriber.complete();
76609
+ }));
76610
+ }
76611
+ }, function() {
76612
+ isComplete = true;
76613
+ !innerSub && subscriber.complete();
76614
+ }));
76615
+ });
76616
+ }
76617
+ exports.exhaustAll = exhaustAll;
76618
+ });
76619
+ var require_exhaust = __commonJSMin((exports) => {
76620
+ "use strict";
76621
+ Object.defineProperty(exports, "__esModule", { value: true });
76622
+ exports.exhaust = void 0;
76623
+ var exhaustAll_1 = require_exhaustAll();
76624
+ exports.exhaust = exhaustAll_1.exhaustAll;
76625
+ });
76855
76626
  var require_exhaustMap = __commonJSMin((exports) => {
76856
76627
  "use strict";
76857
76628
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -76890,24 +76661,6 @@ var require_exhaustMap = __commonJSMin((exports) => {
76890
76661
  }
76891
76662
  exports.exhaustMap = exhaustMap;
76892
76663
  });
76893
- var require_exhaustAll = __commonJSMin((exports) => {
76894
- "use strict";
76895
- Object.defineProperty(exports, "__esModule", { value: true });
76896
- exports.exhaustAll = void 0;
76897
- var exhaustMap_1 = require_exhaustMap();
76898
- var identity_1 = require_identity();
76899
- function exhaustAll() {
76900
- return exhaustMap_1.exhaustMap(identity_1.identity);
76901
- }
76902
- exports.exhaustAll = exhaustAll;
76903
- });
76904
- var require_exhaust = __commonJSMin((exports) => {
76905
- "use strict";
76906
- Object.defineProperty(exports, "__esModule", { value: true });
76907
- exports.exhaust = void 0;
76908
- var exhaustAll_1 = require_exhaustAll();
76909
- exports.exhaust = exhaustAll_1.exhaustAll;
76910
- });
76911
76664
  var require_expand = __commonJSMin((exports) => {
76912
76665
  "use strict";
76913
76666
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -77900,7 +77653,8 @@ var require_share = __commonJSMin((exports) => {
77900
77653
  };
77901
77654
  Object.defineProperty(exports, "__esModule", { value: true });
77902
77655
  exports.share = void 0;
77903
- var innerFrom_1 = require_innerFrom();
77656
+ var from_1 = require_from();
77657
+ var take_1 = require_take();
77904
77658
  var Subject_1 = require_Subject();
77905
77659
  var Subscriber_1 = require_Subscriber();
77906
77660
  var lift_1 = require_lift();
@@ -77912,19 +77666,19 @@ var require_share = __commonJSMin((exports) => {
77912
77666
  return new Subject_1.Subject();
77913
77667
  } : _a2, _b = options3.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options3.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options3.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d;
77914
77668
  return function(wrapperSource) {
77915
- var connection;
77916
- var resetConnection;
77917
- var subject;
77669
+ var connection = null;
77670
+ var resetConnection = null;
77671
+ var subject = null;
77918
77672
  var refCount = 0;
77919
77673
  var hasCompleted = false;
77920
77674
  var hasErrored = false;
77921
77675
  var cancelReset = function() {
77922
77676
  resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();
77923
- resetConnection = void 0;
77677
+ resetConnection = null;
77924
77678
  };
77925
77679
  var reset = function() {
77926
77680
  cancelReset();
77927
- connection = subject = void 0;
77681
+ connection = subject = null;
77928
77682
  hasCompleted = hasErrored = false;
77929
77683
  };
77930
77684
  var resetAndUnsubscribe = function() {
@@ -77945,7 +77699,7 @@ var require_share = __commonJSMin((exports) => {
77945
77699
  }
77946
77700
  });
77947
77701
  dest.subscribe(subscriber);
77948
- if (!connection && refCount > 0) {
77702
+ if (!connection) {
77949
77703
  connection = new Subscriber_1.SafeSubscriber({
77950
77704
  next: function(value) {
77951
77705
  return dest.next(value);
@@ -77963,7 +77717,7 @@ var require_share = __commonJSMin((exports) => {
77963
77717
  dest.complete();
77964
77718
  }
77965
77719
  });
77966
- innerFrom_1.innerFrom(source).subscribe(connection);
77720
+ from_1.from(source).subscribe(connection);
77967
77721
  }
77968
77722
  })(wrapperSource);
77969
77723
  };
@@ -77976,18 +77730,14 @@ var require_share = __commonJSMin((exports) => {
77976
77730
  }
77977
77731
  if (on === true) {
77978
77732
  reset();
77979
- return;
77733
+ return null;
77980
77734
  }
77981
77735
  if (on === false) {
77982
- return;
77736
+ return null;
77983
77737
  }
77984
- var onSubscriber = new Subscriber_1.SafeSubscriber({
77985
- next: function() {
77986
- onSubscriber.unsubscribe();
77987
- reset();
77988
- }
77738
+ return on.apply(void 0, __spreadArray8([], __read9(args))).pipe(take_1.take(1)).subscribe(function() {
77739
+ return reset();
77989
77740
  });
77990
- return on.apply(void 0, __spreadArray8([], __read9(args))).subscribe(onSubscriber);
77991
77741
  }
77992
77742
  });
77993
77743
  var require_shareReplay = __commonJSMin((exports) => {
@@ -82420,1237 +82170,6 @@ var require_string_width = __commonJSMin((exports, module2) => {
82420
82170
  module2.exports = stringWidth;
82421
82171
  module2.exports.default = stringWidth;
82422
82172
  });
82423
- var require_color_name = __commonJSMin((exports, module2) => {
82424
- "use strict";
82425
- module2.exports = {
82426
- "aliceblue": [240, 248, 255],
82427
- "antiquewhite": [250, 235, 215],
82428
- "aqua": [0, 255, 255],
82429
- "aquamarine": [127, 255, 212],
82430
- "azure": [240, 255, 255],
82431
- "beige": [245, 245, 220],
82432
- "bisque": [255, 228, 196],
82433
- "black": [0, 0, 0],
82434
- "blanchedalmond": [255, 235, 205],
82435
- "blue": [0, 0, 255],
82436
- "blueviolet": [138, 43, 226],
82437
- "brown": [165, 42, 42],
82438
- "burlywood": [222, 184, 135],
82439
- "cadetblue": [95, 158, 160],
82440
- "chartreuse": [127, 255, 0],
82441
- "chocolate": [210, 105, 30],
82442
- "coral": [255, 127, 80],
82443
- "cornflowerblue": [100, 149, 237],
82444
- "cornsilk": [255, 248, 220],
82445
- "crimson": [220, 20, 60],
82446
- "cyan": [0, 255, 255],
82447
- "darkblue": [0, 0, 139],
82448
- "darkcyan": [0, 139, 139],
82449
- "darkgoldenrod": [184, 134, 11],
82450
- "darkgray": [169, 169, 169],
82451
- "darkgreen": [0, 100, 0],
82452
- "darkgrey": [169, 169, 169],
82453
- "darkkhaki": [189, 183, 107],
82454
- "darkmagenta": [139, 0, 139],
82455
- "darkolivegreen": [85, 107, 47],
82456
- "darkorange": [255, 140, 0],
82457
- "darkorchid": [153, 50, 204],
82458
- "darkred": [139, 0, 0],
82459
- "darksalmon": [233, 150, 122],
82460
- "darkseagreen": [143, 188, 143],
82461
- "darkslateblue": [72, 61, 139],
82462
- "darkslategray": [47, 79, 79],
82463
- "darkslategrey": [47, 79, 79],
82464
- "darkturquoise": [0, 206, 209],
82465
- "darkviolet": [148, 0, 211],
82466
- "deeppink": [255, 20, 147],
82467
- "deepskyblue": [0, 191, 255],
82468
- "dimgray": [105, 105, 105],
82469
- "dimgrey": [105, 105, 105],
82470
- "dodgerblue": [30, 144, 255],
82471
- "firebrick": [178, 34, 34],
82472
- "floralwhite": [255, 250, 240],
82473
- "forestgreen": [34, 139, 34],
82474
- "fuchsia": [255, 0, 255],
82475
- "gainsboro": [220, 220, 220],
82476
- "ghostwhite": [248, 248, 255],
82477
- "gold": [255, 215, 0],
82478
- "goldenrod": [218, 165, 32],
82479
- "gray": [128, 128, 128],
82480
- "green": [0, 128, 0],
82481
- "greenyellow": [173, 255, 47],
82482
- "grey": [128, 128, 128],
82483
- "honeydew": [240, 255, 240],
82484
- "hotpink": [255, 105, 180],
82485
- "indianred": [205, 92, 92],
82486
- "indigo": [75, 0, 130],
82487
- "ivory": [255, 255, 240],
82488
- "khaki": [240, 230, 140],
82489
- "lavender": [230, 230, 250],
82490
- "lavenderblush": [255, 240, 245],
82491
- "lawngreen": [124, 252, 0],
82492
- "lemonchiffon": [255, 250, 205],
82493
- "lightblue": [173, 216, 230],
82494
- "lightcoral": [240, 128, 128],
82495
- "lightcyan": [224, 255, 255],
82496
- "lightgoldenrodyellow": [250, 250, 210],
82497
- "lightgray": [211, 211, 211],
82498
- "lightgreen": [144, 238, 144],
82499
- "lightgrey": [211, 211, 211],
82500
- "lightpink": [255, 182, 193],
82501
- "lightsalmon": [255, 160, 122],
82502
- "lightseagreen": [32, 178, 170],
82503
- "lightskyblue": [135, 206, 250],
82504
- "lightslategray": [119, 136, 153],
82505
- "lightslategrey": [119, 136, 153],
82506
- "lightsteelblue": [176, 196, 222],
82507
- "lightyellow": [255, 255, 224],
82508
- "lime": [0, 255, 0],
82509
- "limegreen": [50, 205, 50],
82510
- "linen": [250, 240, 230],
82511
- "magenta": [255, 0, 255],
82512
- "maroon": [128, 0, 0],
82513
- "mediumaquamarine": [102, 205, 170],
82514
- "mediumblue": [0, 0, 205],
82515
- "mediumorchid": [186, 85, 211],
82516
- "mediumpurple": [147, 112, 219],
82517
- "mediumseagreen": [60, 179, 113],
82518
- "mediumslateblue": [123, 104, 238],
82519
- "mediumspringgreen": [0, 250, 154],
82520
- "mediumturquoise": [72, 209, 204],
82521
- "mediumvioletred": [199, 21, 133],
82522
- "midnightblue": [25, 25, 112],
82523
- "mintcream": [245, 255, 250],
82524
- "mistyrose": [255, 228, 225],
82525
- "moccasin": [255, 228, 181],
82526
- "navajowhite": [255, 222, 173],
82527
- "navy": [0, 0, 128],
82528
- "oldlace": [253, 245, 230],
82529
- "olive": [128, 128, 0],
82530
- "olivedrab": [107, 142, 35],
82531
- "orange": [255, 165, 0],
82532
- "orangered": [255, 69, 0],
82533
- "orchid": [218, 112, 214],
82534
- "palegoldenrod": [238, 232, 170],
82535
- "palegreen": [152, 251, 152],
82536
- "paleturquoise": [175, 238, 238],
82537
- "palevioletred": [219, 112, 147],
82538
- "papayawhip": [255, 239, 213],
82539
- "peachpuff": [255, 218, 185],
82540
- "peru": [205, 133, 63],
82541
- "pink": [255, 192, 203],
82542
- "plum": [221, 160, 221],
82543
- "powderblue": [176, 224, 230],
82544
- "purple": [128, 0, 128],
82545
- "rebeccapurple": [102, 51, 153],
82546
- "red": [255, 0, 0],
82547
- "rosybrown": [188, 143, 143],
82548
- "royalblue": [65, 105, 225],
82549
- "saddlebrown": [139, 69, 19],
82550
- "salmon": [250, 128, 114],
82551
- "sandybrown": [244, 164, 96],
82552
- "seagreen": [46, 139, 87],
82553
- "seashell": [255, 245, 238],
82554
- "sienna": [160, 82, 45],
82555
- "silver": [192, 192, 192],
82556
- "skyblue": [135, 206, 235],
82557
- "slateblue": [106, 90, 205],
82558
- "slategray": [112, 128, 144],
82559
- "slategrey": [112, 128, 144],
82560
- "snow": [255, 250, 250],
82561
- "springgreen": [0, 255, 127],
82562
- "steelblue": [70, 130, 180],
82563
- "tan": [210, 180, 140],
82564
- "teal": [0, 128, 128],
82565
- "thistle": [216, 191, 216],
82566
- "tomato": [255, 99, 71],
82567
- "turquoise": [64, 224, 208],
82568
- "violet": [238, 130, 238],
82569
- "wheat": [245, 222, 179],
82570
- "white": [255, 255, 255],
82571
- "whitesmoke": [245, 245, 245],
82572
- "yellow": [255, 255, 0],
82573
- "yellowgreen": [154, 205, 50]
82574
- };
82575
- });
82576
- var require_conversions = __commonJSMin((exports, module2) => {
82577
- var cssKeywords = require_color_name();
82578
- var reverseKeywords = {};
82579
- for (const key of Object.keys(cssKeywords)) {
82580
- reverseKeywords[cssKeywords[key]] = key;
82581
- }
82582
- var convert = {
82583
- rgb: { channels: 3, labels: "rgb" },
82584
- hsl: { channels: 3, labels: "hsl" },
82585
- hsv: { channels: 3, labels: "hsv" },
82586
- hwb: { channels: 3, labels: "hwb" },
82587
- cmyk: { channels: 4, labels: "cmyk" },
82588
- xyz: { channels: 3, labels: "xyz" },
82589
- lab: { channels: 3, labels: "lab" },
82590
- lch: { channels: 3, labels: "lch" },
82591
- hex: { channels: 1, labels: ["hex"] },
82592
- keyword: { channels: 1, labels: ["keyword"] },
82593
- ansi16: { channels: 1, labels: ["ansi16"] },
82594
- ansi256: { channels: 1, labels: ["ansi256"] },
82595
- hcg: { channels: 3, labels: ["h", "c", "g"] },
82596
- apple: { channels: 3, labels: ["r16", "g16", "b16"] },
82597
- gray: { channels: 1, labels: ["gray"] }
82598
- };
82599
- module2.exports = convert;
82600
- for (const model of Object.keys(convert)) {
82601
- if (!("channels" in convert[model])) {
82602
- throw new Error("missing channels property: " + model);
82603
- }
82604
- if (!("labels" in convert[model])) {
82605
- throw new Error("missing channel labels property: " + model);
82606
- }
82607
- if (convert[model].labels.length !== convert[model].channels) {
82608
- throw new Error("channel and label counts mismatch: " + model);
82609
- }
82610
- const { channels, labels } = convert[model];
82611
- delete convert[model].channels;
82612
- delete convert[model].labels;
82613
- Object.defineProperty(convert[model], "channels", { value: channels });
82614
- Object.defineProperty(convert[model], "labels", { value: labels });
82615
- }
82616
- convert.rgb.hsl = function(rgb) {
82617
- const r = rgb[0] / 255;
82618
- const g = rgb[1] / 255;
82619
- const b = rgb[2] / 255;
82620
- const min = Math.min(r, g, b);
82621
- const max = Math.max(r, g, b);
82622
- const delta = max - min;
82623
- let h;
82624
- let s;
82625
- if (max === min) {
82626
- h = 0;
82627
- } else if (r === max) {
82628
- h = (g - b) / delta;
82629
- } else if (g === max) {
82630
- h = 2 + (b - r) / delta;
82631
- } else if (b === max) {
82632
- h = 4 + (r - g) / delta;
82633
- }
82634
- h = Math.min(h * 60, 360);
82635
- if (h < 0) {
82636
- h += 360;
82637
- }
82638
- const l = (min + max) / 2;
82639
- if (max === min) {
82640
- s = 0;
82641
- } else if (l <= 0.5) {
82642
- s = delta / (max + min);
82643
- } else {
82644
- s = delta / (2 - max - min);
82645
- }
82646
- return [h, s * 100, l * 100];
82647
- };
82648
- convert.rgb.hsv = function(rgb) {
82649
- let rdif;
82650
- let gdif;
82651
- let bdif;
82652
- let h;
82653
- let s;
82654
- const r = rgb[0] / 255;
82655
- const g = rgb[1] / 255;
82656
- const b = rgb[2] / 255;
82657
- const v = Math.max(r, g, b);
82658
- const diff = v - Math.min(r, g, b);
82659
- const diffc = function(c) {
82660
- return (v - c) / 6 / diff + 1 / 2;
82661
- };
82662
- if (diff === 0) {
82663
- h = 0;
82664
- s = 0;
82665
- } else {
82666
- s = diff / v;
82667
- rdif = diffc(r);
82668
- gdif = diffc(g);
82669
- bdif = diffc(b);
82670
- if (r === v) {
82671
- h = bdif - gdif;
82672
- } else if (g === v) {
82673
- h = 1 / 3 + rdif - bdif;
82674
- } else if (b === v) {
82675
- h = 2 / 3 + gdif - rdif;
82676
- }
82677
- if (h < 0) {
82678
- h += 1;
82679
- } else if (h > 1) {
82680
- h -= 1;
82681
- }
82682
- }
82683
- return [
82684
- h * 360,
82685
- s * 100,
82686
- v * 100
82687
- ];
82688
- };
82689
- convert.rgb.hwb = function(rgb) {
82690
- const r = rgb[0];
82691
- const g = rgb[1];
82692
- let b = rgb[2];
82693
- const h = convert.rgb.hsl(rgb)[0];
82694
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
82695
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
82696
- return [h, w * 100, b * 100];
82697
- };
82698
- convert.rgb.cmyk = function(rgb) {
82699
- const r = rgb[0] / 255;
82700
- const g = rgb[1] / 255;
82701
- const b = rgb[2] / 255;
82702
- const k = Math.min(1 - r, 1 - g, 1 - b);
82703
- const c = (1 - r - k) / (1 - k) || 0;
82704
- const m = (1 - g - k) / (1 - k) || 0;
82705
- const y = (1 - b - k) / (1 - k) || 0;
82706
- return [c * 100, m * 100, y * 100, k * 100];
82707
- };
82708
- function comparativeDistance(x, y) {
82709
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
82710
- }
82711
- convert.rgb.keyword = function(rgb) {
82712
- const reversed = reverseKeywords[rgb];
82713
- if (reversed) {
82714
- return reversed;
82715
- }
82716
- let currentClosestDistance = Infinity;
82717
- let currentClosestKeyword;
82718
- for (const keyword of Object.keys(cssKeywords)) {
82719
- const value = cssKeywords[keyword];
82720
- const distance = comparativeDistance(rgb, value);
82721
- if (distance < currentClosestDistance) {
82722
- currentClosestDistance = distance;
82723
- currentClosestKeyword = keyword;
82724
- }
82725
- }
82726
- return currentClosestKeyword;
82727
- };
82728
- convert.keyword.rgb = function(keyword) {
82729
- return cssKeywords[keyword];
82730
- };
82731
- convert.rgb.xyz = function(rgb) {
82732
- let r = rgb[0] / 255;
82733
- let g = rgb[1] / 255;
82734
- let b = rgb[2] / 255;
82735
- r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
82736
- g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
82737
- b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
82738
- const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
82739
- const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
82740
- const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
82741
- return [x * 100, y * 100, z * 100];
82742
- };
82743
- convert.rgb.lab = function(rgb) {
82744
- const xyz = convert.rgb.xyz(rgb);
82745
- let x = xyz[0];
82746
- let y = xyz[1];
82747
- let z = xyz[2];
82748
- x /= 95.047;
82749
- y /= 100;
82750
- z /= 108.883;
82751
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
82752
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
82753
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
82754
- const l = 116 * y - 16;
82755
- const a = 500 * (x - y);
82756
- const b = 200 * (y - z);
82757
- return [l, a, b];
82758
- };
82759
- convert.hsl.rgb = function(hsl) {
82760
- const h = hsl[0] / 360;
82761
- const s = hsl[1] / 100;
82762
- const l = hsl[2] / 100;
82763
- let t2;
82764
- let t3;
82765
- let val;
82766
- if (s === 0) {
82767
- val = l * 255;
82768
- return [val, val, val];
82769
- }
82770
- if (l < 0.5) {
82771
- t2 = l * (1 + s);
82772
- } else {
82773
- t2 = l + s - l * s;
82774
- }
82775
- const t1 = 2 * l - t2;
82776
- const rgb = [0, 0, 0];
82777
- for (let i = 0; i < 3; i++) {
82778
- t3 = h + 1 / 3 * -(i - 1);
82779
- if (t3 < 0) {
82780
- t3++;
82781
- }
82782
- if (t3 > 1) {
82783
- t3--;
82784
- }
82785
- if (6 * t3 < 1) {
82786
- val = t1 + (t2 - t1) * 6 * t3;
82787
- } else if (2 * t3 < 1) {
82788
- val = t2;
82789
- } else if (3 * t3 < 2) {
82790
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
82791
- } else {
82792
- val = t1;
82793
- }
82794
- rgb[i] = val * 255;
82795
- }
82796
- return rgb;
82797
- };
82798
- convert.hsl.hsv = function(hsl) {
82799
- const h = hsl[0];
82800
- let s = hsl[1] / 100;
82801
- let l = hsl[2] / 100;
82802
- let smin = s;
82803
- const lmin = Math.max(l, 0.01);
82804
- l *= 2;
82805
- s *= l <= 1 ? l : 2 - l;
82806
- smin *= lmin <= 1 ? lmin : 2 - lmin;
82807
- const v = (l + s) / 2;
82808
- const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
82809
- return [h, sv * 100, v * 100];
82810
- };
82811
- convert.hsv.rgb = function(hsv) {
82812
- const h = hsv[0] / 60;
82813
- const s = hsv[1] / 100;
82814
- let v = hsv[2] / 100;
82815
- const hi = Math.floor(h) % 6;
82816
- const f = h - Math.floor(h);
82817
- const p = 255 * v * (1 - s);
82818
- const q = 255 * v * (1 - s * f);
82819
- const t = 255 * v * (1 - s * (1 - f));
82820
- v *= 255;
82821
- switch (hi) {
82822
- case 0:
82823
- return [v, t, p];
82824
- case 1:
82825
- return [q, v, p];
82826
- case 2:
82827
- return [p, v, t];
82828
- case 3:
82829
- return [p, q, v];
82830
- case 4:
82831
- return [t, p, v];
82832
- case 5:
82833
- return [v, p, q];
82834
- }
82835
- };
82836
- convert.hsv.hsl = function(hsv) {
82837
- const h = hsv[0];
82838
- const s = hsv[1] / 100;
82839
- const v = hsv[2] / 100;
82840
- const vmin = Math.max(v, 0.01);
82841
- let sl;
82842
- let l;
82843
- l = (2 - s) * v;
82844
- const lmin = (2 - s) * vmin;
82845
- sl = s * vmin;
82846
- sl /= lmin <= 1 ? lmin : 2 - lmin;
82847
- sl = sl || 0;
82848
- l /= 2;
82849
- return [h, sl * 100, l * 100];
82850
- };
82851
- convert.hwb.rgb = function(hwb) {
82852
- const h = hwb[0] / 360;
82853
- let wh = hwb[1] / 100;
82854
- let bl = hwb[2] / 100;
82855
- const ratio = wh + bl;
82856
- let f;
82857
- if (ratio > 1) {
82858
- wh /= ratio;
82859
- bl /= ratio;
82860
- }
82861
- const i = Math.floor(6 * h);
82862
- const v = 1 - bl;
82863
- f = 6 * h - i;
82864
- if ((i & 1) !== 0) {
82865
- f = 1 - f;
82866
- }
82867
- const n = wh + f * (v - wh);
82868
- let r;
82869
- let g;
82870
- let b;
82871
- switch (i) {
82872
- default:
82873
- case 6:
82874
- case 0:
82875
- r = v;
82876
- g = n;
82877
- b = wh;
82878
- break;
82879
- case 1:
82880
- r = n;
82881
- g = v;
82882
- b = wh;
82883
- break;
82884
- case 2:
82885
- r = wh;
82886
- g = v;
82887
- b = n;
82888
- break;
82889
- case 3:
82890
- r = wh;
82891
- g = n;
82892
- b = v;
82893
- break;
82894
- case 4:
82895
- r = n;
82896
- g = wh;
82897
- b = v;
82898
- break;
82899
- case 5:
82900
- r = v;
82901
- g = wh;
82902
- b = n;
82903
- break;
82904
- }
82905
- return [r * 255, g * 255, b * 255];
82906
- };
82907
- convert.cmyk.rgb = function(cmyk) {
82908
- const c = cmyk[0] / 100;
82909
- const m = cmyk[1] / 100;
82910
- const y = cmyk[2] / 100;
82911
- const k = cmyk[3] / 100;
82912
- const r = 1 - Math.min(1, c * (1 - k) + k);
82913
- const g = 1 - Math.min(1, m * (1 - k) + k);
82914
- const b = 1 - Math.min(1, y * (1 - k) + k);
82915
- return [r * 255, g * 255, b * 255];
82916
- };
82917
- convert.xyz.rgb = function(xyz) {
82918
- const x = xyz[0] / 100;
82919
- const y = xyz[1] / 100;
82920
- const z = xyz[2] / 100;
82921
- let r;
82922
- let g;
82923
- let b;
82924
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
82925
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
82926
- b = x * 0.0557 + y * -0.204 + z * 1.057;
82927
- r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
82928
- g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
82929
- b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
82930
- r = Math.min(Math.max(0, r), 1);
82931
- g = Math.min(Math.max(0, g), 1);
82932
- b = Math.min(Math.max(0, b), 1);
82933
- return [r * 255, g * 255, b * 255];
82934
- };
82935
- convert.xyz.lab = function(xyz) {
82936
- let x = xyz[0];
82937
- let y = xyz[1];
82938
- let z = xyz[2];
82939
- x /= 95.047;
82940
- y /= 100;
82941
- z /= 108.883;
82942
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
82943
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
82944
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
82945
- const l = 116 * y - 16;
82946
- const a = 500 * (x - y);
82947
- const b = 200 * (y - z);
82948
- return [l, a, b];
82949
- };
82950
- convert.lab.xyz = function(lab) {
82951
- const l = lab[0];
82952
- const a = lab[1];
82953
- const b = lab[2];
82954
- let x;
82955
- let y;
82956
- let z;
82957
- y = (l + 16) / 116;
82958
- x = a / 500 + y;
82959
- z = y - b / 200;
82960
- const y2 = y ** 3;
82961
- const x2 = x ** 3;
82962
- const z2 = z ** 3;
82963
- y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
82964
- x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
82965
- z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
82966
- x *= 95.047;
82967
- y *= 100;
82968
- z *= 108.883;
82969
- return [x, y, z];
82970
- };
82971
- convert.lab.lch = function(lab) {
82972
- const l = lab[0];
82973
- const a = lab[1];
82974
- const b = lab[2];
82975
- let h;
82976
- const hr = Math.atan2(b, a);
82977
- h = hr * 360 / 2 / Math.PI;
82978
- if (h < 0) {
82979
- h += 360;
82980
- }
82981
- const c = Math.sqrt(a * a + b * b);
82982
- return [l, c, h];
82983
- };
82984
- convert.lch.lab = function(lch) {
82985
- const l = lch[0];
82986
- const c = lch[1];
82987
- const h = lch[2];
82988
- const hr = h / 360 * 2 * Math.PI;
82989
- const a = c * Math.cos(hr);
82990
- const b = c * Math.sin(hr);
82991
- return [l, a, b];
82992
- };
82993
- convert.rgb.ansi16 = function(args, saturation = null) {
82994
- const [r, g, b] = args;
82995
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
82996
- value = Math.round(value / 50);
82997
- if (value === 0) {
82998
- return 30;
82999
- }
83000
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
83001
- if (value === 2) {
83002
- ansi += 60;
83003
- }
83004
- return ansi;
83005
- };
83006
- convert.hsv.ansi16 = function(args) {
83007
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
83008
- };
83009
- convert.rgb.ansi256 = function(args) {
83010
- const r = args[0];
83011
- const g = args[1];
83012
- const b = args[2];
83013
- if (r === g && g === b) {
83014
- if (r < 8) {
83015
- return 16;
83016
- }
83017
- if (r > 248) {
83018
- return 231;
83019
- }
83020
- return Math.round((r - 8) / 247 * 24) + 232;
83021
- }
83022
- const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
83023
- return ansi;
83024
- };
83025
- convert.ansi16.rgb = function(args) {
83026
- let color = args % 10;
83027
- if (color === 0 || color === 7) {
83028
- if (args > 50) {
83029
- color += 3.5;
83030
- }
83031
- color = color / 10.5 * 255;
83032
- return [color, color, color];
83033
- }
83034
- const mult = (~~(args > 50) + 1) * 0.5;
83035
- const r = (color & 1) * mult * 255;
83036
- const g = (color >> 1 & 1) * mult * 255;
83037
- const b = (color >> 2 & 1) * mult * 255;
83038
- return [r, g, b];
83039
- };
83040
- convert.ansi256.rgb = function(args) {
83041
- if (args >= 232) {
83042
- const c = (args - 232) * 10 + 8;
83043
- return [c, c, c];
83044
- }
83045
- args -= 16;
83046
- let rem;
83047
- const r = Math.floor(args / 36) / 5 * 255;
83048
- const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
83049
- const b = rem % 6 / 5 * 255;
83050
- return [r, g, b];
83051
- };
83052
- convert.rgb.hex = function(args) {
83053
- const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
83054
- const string = integer.toString(16).toUpperCase();
83055
- return "000000".substring(string.length) + string;
83056
- };
83057
- convert.hex.rgb = function(args) {
83058
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
83059
- if (!match) {
83060
- return [0, 0, 0];
83061
- }
83062
- let colorString = match[0];
83063
- if (match[0].length === 3) {
83064
- colorString = colorString.split("").map((char) => {
83065
- return char + char;
83066
- }).join("");
83067
- }
83068
- const integer = parseInt(colorString, 16);
83069
- const r = integer >> 16 & 255;
83070
- const g = integer >> 8 & 255;
83071
- const b = integer & 255;
83072
- return [r, g, b];
83073
- };
83074
- convert.rgb.hcg = function(rgb) {
83075
- const r = rgb[0] / 255;
83076
- const g = rgb[1] / 255;
83077
- const b = rgb[2] / 255;
83078
- const max = Math.max(Math.max(r, g), b);
83079
- const min = Math.min(Math.min(r, g), b);
83080
- const chroma = max - min;
83081
- let grayscale;
83082
- let hue;
83083
- if (chroma < 1) {
83084
- grayscale = min / (1 - chroma);
83085
- } else {
83086
- grayscale = 0;
83087
- }
83088
- if (chroma <= 0) {
83089
- hue = 0;
83090
- } else if (max === r) {
83091
- hue = (g - b) / chroma % 6;
83092
- } else if (max === g) {
83093
- hue = 2 + (b - r) / chroma;
83094
- } else {
83095
- hue = 4 + (r - g) / chroma;
83096
- }
83097
- hue /= 6;
83098
- hue %= 1;
83099
- return [hue * 360, chroma * 100, grayscale * 100];
83100
- };
83101
- convert.hsl.hcg = function(hsl) {
83102
- const s = hsl[1] / 100;
83103
- const l = hsl[2] / 100;
83104
- const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
83105
- let f = 0;
83106
- if (c < 1) {
83107
- f = (l - 0.5 * c) / (1 - c);
83108
- }
83109
- return [hsl[0], c * 100, f * 100];
83110
- };
83111
- convert.hsv.hcg = function(hsv) {
83112
- const s = hsv[1] / 100;
83113
- const v = hsv[2] / 100;
83114
- const c = s * v;
83115
- let f = 0;
83116
- if (c < 1) {
83117
- f = (v - c) / (1 - c);
83118
- }
83119
- return [hsv[0], c * 100, f * 100];
83120
- };
83121
- convert.hcg.rgb = function(hcg) {
83122
- const h = hcg[0] / 360;
83123
- const c = hcg[1] / 100;
83124
- const g = hcg[2] / 100;
83125
- if (c === 0) {
83126
- return [g * 255, g * 255, g * 255];
83127
- }
83128
- const pure = [0, 0, 0];
83129
- const hi = h % 1 * 6;
83130
- const v = hi % 1;
83131
- const w = 1 - v;
83132
- let mg = 0;
83133
- switch (Math.floor(hi)) {
83134
- case 0:
83135
- pure[0] = 1;
83136
- pure[1] = v;
83137
- pure[2] = 0;
83138
- break;
83139
- case 1:
83140
- pure[0] = w;
83141
- pure[1] = 1;
83142
- pure[2] = 0;
83143
- break;
83144
- case 2:
83145
- pure[0] = 0;
83146
- pure[1] = 1;
83147
- pure[2] = v;
83148
- break;
83149
- case 3:
83150
- pure[0] = 0;
83151
- pure[1] = w;
83152
- pure[2] = 1;
83153
- break;
83154
- case 4:
83155
- pure[0] = v;
83156
- pure[1] = 0;
83157
- pure[2] = 1;
83158
- break;
83159
- default:
83160
- pure[0] = 1;
83161
- pure[1] = 0;
83162
- pure[2] = w;
83163
- }
83164
- mg = (1 - c) * g;
83165
- return [
83166
- (c * pure[0] + mg) * 255,
83167
- (c * pure[1] + mg) * 255,
83168
- (c * pure[2] + mg) * 255
83169
- ];
83170
- };
83171
- convert.hcg.hsv = function(hcg) {
83172
- const c = hcg[1] / 100;
83173
- const g = hcg[2] / 100;
83174
- const v = c + g * (1 - c);
83175
- let f = 0;
83176
- if (v > 0) {
83177
- f = c / v;
83178
- }
83179
- return [hcg[0], f * 100, v * 100];
83180
- };
83181
- convert.hcg.hsl = function(hcg) {
83182
- const c = hcg[1] / 100;
83183
- const g = hcg[2] / 100;
83184
- const l = g * (1 - c) + 0.5 * c;
83185
- let s = 0;
83186
- if (l > 0 && l < 0.5) {
83187
- s = c / (2 * l);
83188
- } else if (l >= 0.5 && l < 1) {
83189
- s = c / (2 * (1 - l));
83190
- }
83191
- return [hcg[0], s * 100, l * 100];
83192
- };
83193
- convert.hcg.hwb = function(hcg) {
83194
- const c = hcg[1] / 100;
83195
- const g = hcg[2] / 100;
83196
- const v = c + g * (1 - c);
83197
- return [hcg[0], (v - c) * 100, (1 - v) * 100];
83198
- };
83199
- convert.hwb.hcg = function(hwb) {
83200
- const w = hwb[1] / 100;
83201
- const b = hwb[2] / 100;
83202
- const v = 1 - b;
83203
- const c = v - w;
83204
- let g = 0;
83205
- if (c < 1) {
83206
- g = (v - c) / (1 - c);
83207
- }
83208
- return [hwb[0], c * 100, g * 100];
83209
- };
83210
- convert.apple.rgb = function(apple) {
83211
- return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
83212
- };
83213
- convert.rgb.apple = function(rgb) {
83214
- return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
83215
- };
83216
- convert.gray.rgb = function(args) {
83217
- return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
83218
- };
83219
- convert.gray.hsl = function(args) {
83220
- return [0, 0, args[0]];
83221
- };
83222
- convert.gray.hsv = convert.gray.hsl;
83223
- convert.gray.hwb = function(gray) {
83224
- return [0, 100, gray[0]];
83225
- };
83226
- convert.gray.cmyk = function(gray) {
83227
- return [0, 0, 0, gray[0]];
83228
- };
83229
- convert.gray.lab = function(gray) {
83230
- return [gray[0], 0, 0];
83231
- };
83232
- convert.gray.hex = function(gray) {
83233
- const val = Math.round(gray[0] / 100 * 255) & 255;
83234
- const integer = (val << 16) + (val << 8) + val;
83235
- const string = integer.toString(16).toUpperCase();
83236
- return "000000".substring(string.length) + string;
83237
- };
83238
- convert.rgb.gray = function(rgb) {
83239
- const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
83240
- return [val / 255 * 100];
83241
- };
83242
- });
83243
- var require_route = __commonJSMin((exports, module2) => {
83244
- var conversions = require_conversions();
83245
- function buildGraph() {
83246
- const graph = {};
83247
- const models = Object.keys(conversions);
83248
- for (let len = models.length, i = 0; i < len; i++) {
83249
- graph[models[i]] = {
83250
- distance: -1,
83251
- parent: null
83252
- };
83253
- }
83254
- return graph;
83255
- }
83256
- function deriveBFS(fromModel) {
83257
- const graph = buildGraph();
83258
- const queue = [fromModel];
83259
- graph[fromModel].distance = 0;
83260
- while (queue.length) {
83261
- const current = queue.pop();
83262
- const adjacents = Object.keys(conversions[current]);
83263
- for (let len = adjacents.length, i = 0; i < len; i++) {
83264
- const adjacent = adjacents[i];
83265
- const node = graph[adjacent];
83266
- if (node.distance === -1) {
83267
- node.distance = graph[current].distance + 1;
83268
- node.parent = current;
83269
- queue.unshift(adjacent);
83270
- }
83271
- }
83272
- }
83273
- return graph;
83274
- }
83275
- function link(from, to) {
83276
- return function(args) {
83277
- return to(from(args));
83278
- };
83279
- }
83280
- function wrapConversion(toModel, graph) {
83281
- const path6 = [graph[toModel].parent, toModel];
83282
- let fn = conversions[graph[toModel].parent][toModel];
83283
- let cur = graph[toModel].parent;
83284
- while (graph[cur].parent) {
83285
- path6.unshift(graph[cur].parent);
83286
- fn = link(conversions[graph[cur].parent][cur], fn);
83287
- cur = graph[cur].parent;
83288
- }
83289
- fn.conversion = path6;
83290
- return fn;
83291
- }
83292
- module2.exports = function(fromModel) {
83293
- const graph = deriveBFS(fromModel);
83294
- const conversion = {};
83295
- const models = Object.keys(graph);
83296
- for (let len = models.length, i = 0; i < len; i++) {
83297
- const toModel = models[i];
83298
- const node = graph[toModel];
83299
- if (node.parent === null) {
83300
- continue;
83301
- }
83302
- conversion[toModel] = wrapConversion(toModel, graph);
83303
- }
83304
- return conversion;
83305
- };
83306
- });
83307
- var require_color_convert = __commonJSMin((exports, module2) => {
83308
- var conversions = require_conversions();
83309
- var route = require_route();
83310
- var convert = {};
83311
- var models = Object.keys(conversions);
83312
- function wrapRaw(fn) {
83313
- const wrappedFn = function(...args) {
83314
- const arg0 = args[0];
83315
- if (arg0 === void 0 || arg0 === null) {
83316
- return arg0;
83317
- }
83318
- if (arg0.length > 1) {
83319
- args = arg0;
83320
- }
83321
- return fn(args);
83322
- };
83323
- if ("conversion" in fn) {
83324
- wrappedFn.conversion = fn.conversion;
83325
- }
83326
- return wrappedFn;
83327
- }
83328
- function wrapRounded(fn) {
83329
- const wrappedFn = function(...args) {
83330
- const arg0 = args[0];
83331
- if (arg0 === void 0 || arg0 === null) {
83332
- return arg0;
83333
- }
83334
- if (arg0.length > 1) {
83335
- args = arg0;
83336
- }
83337
- const result = fn(args);
83338
- if (typeof result === "object") {
83339
- for (let len = result.length, i = 0; i < len; i++) {
83340
- result[i] = Math.round(result[i]);
83341
- }
83342
- }
83343
- return result;
83344
- };
83345
- if ("conversion" in fn) {
83346
- wrappedFn.conversion = fn.conversion;
83347
- }
83348
- return wrappedFn;
83349
- }
83350
- models.forEach((fromModel) => {
83351
- convert[fromModel] = {};
83352
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
83353
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
83354
- const routes = route(fromModel);
83355
- const routeModels = Object.keys(routes);
83356
- routeModels.forEach((toModel) => {
83357
- const fn = routes[toModel];
83358
- convert[fromModel][toModel] = wrapRounded(fn);
83359
- convert[fromModel][toModel].raw = wrapRaw(fn);
83360
- });
83361
- });
83362
- module2.exports = convert;
83363
- });
83364
- var require_ansi_styles = __commonJSMin((exports, module2) => {
83365
- "use strict";
83366
- var wrapAnsi16 = (fn, offset) => (...args) => {
83367
- const code = fn(...args);
83368
- return `\x1B[${code + offset}m`;
83369
- };
83370
- var wrapAnsi256 = (fn, offset) => (...args) => {
83371
- const code = fn(...args);
83372
- return `\x1B[${38 + offset};5;${code}m`;
83373
- };
83374
- var wrapAnsi16m = (fn, offset) => (...args) => {
83375
- const rgb = fn(...args);
83376
- return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
83377
- };
83378
- var ansi2ansi = (n) => n;
83379
- var rgb2rgb = (r, g, b) => [r, g, b];
83380
- var setLazyProperty = (object, property, get4) => {
83381
- Object.defineProperty(object, property, {
83382
- get: () => {
83383
- const value = get4();
83384
- Object.defineProperty(object, property, {
83385
- value,
83386
- enumerable: true,
83387
- configurable: true
83388
- });
83389
- return value;
83390
- },
83391
- enumerable: true,
83392
- configurable: true
83393
- });
83394
- };
83395
- var colorConvert;
83396
- var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
83397
- if (colorConvert === void 0) {
83398
- colorConvert = require_color_convert();
83399
- }
83400
- const offset = isBackground ? 10 : 0;
83401
- const styles = {};
83402
- for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
83403
- const name5 = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
83404
- if (sourceSpace === targetSpace) {
83405
- styles[name5] = wrap(identity, offset);
83406
- } else if (typeof suite === "object") {
83407
- styles[name5] = wrap(suite[targetSpace], offset);
83408
- }
83409
- }
83410
- return styles;
83411
- };
83412
- function assembleStyles() {
83413
- const codes = /* @__PURE__ */ new Map();
83414
- const styles = {
83415
- modifier: {
83416
- reset: [0, 0],
83417
- bold: [1, 22],
83418
- dim: [2, 22],
83419
- italic: [3, 23],
83420
- underline: [4, 24],
83421
- inverse: [7, 27],
83422
- hidden: [8, 28],
83423
- strikethrough: [9, 29]
83424
- },
83425
- color: {
83426
- black: [30, 39],
83427
- red: [31, 39],
83428
- green: [32, 39],
83429
- yellow: [33, 39],
83430
- blue: [34, 39],
83431
- magenta: [35, 39],
83432
- cyan: [36, 39],
83433
- white: [37, 39],
83434
- blackBright: [90, 39],
83435
- redBright: [91, 39],
83436
- greenBright: [92, 39],
83437
- yellowBright: [93, 39],
83438
- blueBright: [94, 39],
83439
- magentaBright: [95, 39],
83440
- cyanBright: [96, 39],
83441
- whiteBright: [97, 39]
83442
- },
83443
- bgColor: {
83444
- bgBlack: [40, 49],
83445
- bgRed: [41, 49],
83446
- bgGreen: [42, 49],
83447
- bgYellow: [43, 49],
83448
- bgBlue: [44, 49],
83449
- bgMagenta: [45, 49],
83450
- bgCyan: [46, 49],
83451
- bgWhite: [47, 49],
83452
- bgBlackBright: [100, 49],
83453
- bgRedBright: [101, 49],
83454
- bgGreenBright: [102, 49],
83455
- bgYellowBright: [103, 49],
83456
- bgBlueBright: [104, 49],
83457
- bgMagentaBright: [105, 49],
83458
- bgCyanBright: [106, 49],
83459
- bgWhiteBright: [107, 49]
83460
- }
83461
- };
83462
- styles.color.gray = styles.color.blackBright;
83463
- styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
83464
- styles.color.grey = styles.color.blackBright;
83465
- styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
83466
- for (const [groupName, group] of Object.entries(styles)) {
83467
- for (const [styleName, style] of Object.entries(group)) {
83468
- styles[styleName] = {
83469
- open: `\x1B[${style[0]}m`,
83470
- close: `\x1B[${style[1]}m`
83471
- };
83472
- group[styleName] = styles[styleName];
83473
- codes.set(style[0], style[1]);
83474
- }
83475
- Object.defineProperty(styles, groupName, {
83476
- value: group,
83477
- enumerable: false
83478
- });
83479
- }
83480
- Object.defineProperty(styles, "codes", {
83481
- value: codes,
83482
- enumerable: false
83483
- });
83484
- styles.color.close = "\x1B[39m";
83485
- styles.bgColor.close = "\x1B[49m";
83486
- setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
83487
- setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
83488
- setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
83489
- setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
83490
- setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
83491
- setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
83492
- return styles;
83493
- }
83494
- Object.defineProperty(module2, "exports", {
83495
- enumerable: true,
83496
- get: assembleStyles
83497
- });
83498
- });
83499
- var require_wrap_ansi = __commonJSMin((exports, module2) => {
83500
- "use strict";
83501
- var stringWidth = require_string_width();
83502
- var stripAnsi2 = require_strip_ansi2();
83503
- var ansiStyles = require_ansi_styles();
83504
- var ESCAPES = /* @__PURE__ */ new Set([
83505
- "\x1B",
83506
- "\x9B"
83507
- ]);
83508
- var END_CODE = 39;
83509
- var ANSI_ESCAPE_BELL = "\x07";
83510
- var ANSI_CSI = "[";
83511
- var ANSI_OSC = "]";
83512
- var ANSI_SGR_TERMINATOR = "m";
83513
- var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
83514
- var wrapAnsi = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
83515
- var wrapAnsiHyperlink = (uri) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`;
83516
- var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
83517
- var wrapWord = (rows, word, columns) => {
83518
- const characters = [...word];
83519
- let isInsideEscape = false;
83520
- let isInsideLinkEscape = false;
83521
- let visible = stringWidth(stripAnsi2(rows[rows.length - 1]));
83522
- for (const [index, character] of characters.entries()) {
83523
- const characterLength = stringWidth(character);
83524
- if (visible + characterLength <= columns) {
83525
- rows[rows.length - 1] += character;
83526
- } else {
83527
- rows.push(character);
83528
- visible = 0;
83529
- }
83530
- if (ESCAPES.has(character)) {
83531
- isInsideEscape = true;
83532
- isInsideLinkEscape = characters.slice(index + 1).join("").startsWith(ANSI_ESCAPE_LINK);
83533
- }
83534
- if (isInsideEscape) {
83535
- if (isInsideLinkEscape) {
83536
- if (character === ANSI_ESCAPE_BELL) {
83537
- isInsideEscape = false;
83538
- isInsideLinkEscape = false;
83539
- }
83540
- } else if (character === ANSI_SGR_TERMINATOR) {
83541
- isInsideEscape = false;
83542
- }
83543
- continue;
83544
- }
83545
- visible += characterLength;
83546
- if (visible === columns && index < characters.length - 1) {
83547
- rows.push("");
83548
- visible = 0;
83549
- }
83550
- }
83551
- if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
83552
- rows[rows.length - 2] += rows.pop();
83553
- }
83554
- };
83555
- var stringVisibleTrimSpacesRight = (string) => {
83556
- const words = string.split(" ");
83557
- let last = words.length;
83558
- while (last > 0) {
83559
- if (stringWidth(words[last - 1]) > 0) {
83560
- break;
83561
- }
83562
- last--;
83563
- }
83564
- if (last === words.length) {
83565
- return string;
83566
- }
83567
- return words.slice(0, last).join(" ") + words.slice(last).join("");
83568
- };
83569
- var exec = (string, columns, options3 = {}) => {
83570
- if (options3.trim !== false && string.trim() === "") {
83571
- return "";
83572
- }
83573
- let returnValue = "";
83574
- let escapeCode;
83575
- let escapeUrl;
83576
- const lengths = wordLengths(string);
83577
- let rows = [""];
83578
- for (const [index, word] of string.split(" ").entries()) {
83579
- if (options3.trim !== false) {
83580
- rows[rows.length - 1] = rows[rows.length - 1].trimStart();
83581
- }
83582
- let rowLength = stringWidth(rows[rows.length - 1]);
83583
- if (index !== 0) {
83584
- if (rowLength >= columns && (options3.wordWrap === false || options3.trim === false)) {
83585
- rows.push("");
83586
- rowLength = 0;
83587
- }
83588
- if (rowLength > 0 || options3.trim === false) {
83589
- rows[rows.length - 1] += " ";
83590
- rowLength++;
83591
- }
83592
- }
83593
- if (options3.hard && lengths[index] > columns) {
83594
- const remainingColumns = columns - rowLength;
83595
- const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
83596
- const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
83597
- if (breaksStartingNextLine < breaksStartingThisLine) {
83598
- rows.push("");
83599
- }
83600
- wrapWord(rows, word, columns);
83601
- continue;
83602
- }
83603
- if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
83604
- if (options3.wordWrap === false && rowLength < columns) {
83605
- wrapWord(rows, word, columns);
83606
- continue;
83607
- }
83608
- rows.push("");
83609
- }
83610
- if (rowLength + lengths[index] > columns && options3.wordWrap === false) {
83611
- wrapWord(rows, word, columns);
83612
- continue;
83613
- }
83614
- rows[rows.length - 1] += word;
83615
- }
83616
- if (options3.trim !== false) {
83617
- rows = rows.map(stringVisibleTrimSpacesRight);
83618
- }
83619
- const pre = [...rows.join("\n")];
83620
- for (const [index, character] of pre.entries()) {
83621
- returnValue += character;
83622
- if (ESCAPES.has(character)) {
83623
- const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join("")) || { groups: {} };
83624
- if (groups.code !== void 0) {
83625
- const code2 = Number.parseFloat(groups.code);
83626
- escapeCode = code2 === END_CODE ? void 0 : code2;
83627
- } else if (groups.uri !== void 0) {
83628
- escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
83629
- }
83630
- }
83631
- const code = ansiStyles.codes.get(Number(escapeCode));
83632
- if (pre[index + 1] === "\n") {
83633
- if (escapeUrl) {
83634
- returnValue += wrapAnsiHyperlink("");
83635
- }
83636
- if (escapeCode && code) {
83637
- returnValue += wrapAnsi(code);
83638
- }
83639
- } else if (character === "\n") {
83640
- if (escapeCode && code) {
83641
- returnValue += wrapAnsi(escapeCode);
83642
- }
83643
- if (escapeUrl) {
83644
- returnValue += wrapAnsiHyperlink(escapeUrl);
83645
- }
83646
- }
83647
- }
83648
- return returnValue;
83649
- };
83650
- module2.exports = (string, columns, options3) => {
83651
- return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line3) => exec(line3, columns, options3)).join("\n");
83652
- };
83653
- });
83654
82173
  var spinners_exports = {};
83655
82174
  __export2(spinners_exports, {
83656
82175
  aesthetic: () => aesthetic,
@@ -83677,7 +82196,6 @@ __export2(spinners_exports, {
83677
82196
  dots10: () => dots10,
83678
82197
  dots11: () => dots11,
83679
82198
  dots12: () => dots12,
83680
- dots13: () => dots13,
83681
82199
  dots2: () => dots2,
83682
82200
  dots3: () => dots3,
83683
82201
  dots4: () => dots4,
@@ -83711,7 +82229,6 @@ __export2(spinners_exports, {
83711
82229
  point: () => point,
83712
82230
  pong: () => pong,
83713
82231
  runner: () => runner,
83714
- sand: () => sand,
83715
82232
  shark: () => shark,
83716
82233
  simpleDots: () => simpleDots,
83717
82234
  simpleDotsScrolling: () => simpleDotsScrolling,
@@ -83739,7 +82256,7 @@ __export2(spinners_exports, {
83739
82256
  triangle: () => triangle,
83740
82257
  weather: () => weather
83741
82258
  });
83742
- var dots, dots2, dots3, dots4, dots5, dots6, dots7, dots8, dots9, dots10, dots11, dots12, dots13, dots8Bit, sand, line, line2, pipe, simpleDots, simpleDotsScrolling, star, star2, flip, hamburger, growVertical, growHorizontal, balloon, balloon2, noise, bounce, boxBounce, boxBounce2, triangle, arc, circle, squareCorners, circleQuarters, circleHalves, squish, toggle, toggle2, toggle3, toggle4, toggle5, toggle6, toggle7, toggle8, toggle9, toggle10, toggle11, toggle12, toggle13, arrow, arrow2, arrow3, bouncingBar, bouncingBall, smiley, monkey, hearts, clock, earth, material, moon, runner, pong, shark, dqpb, weather, christmas, grenade, point, layer, betaWave, fingerDance, fistBump, soccerHeader, mindblown, speaker, orangePulse, bluePulse, orangeBluePulse, timeTravel, aesthetic, spinners_default;
82259
+ var dots, dots2, dots3, dots4, dots5, dots6, dots7, dots8, dots9, dots10, dots11, dots12, dots8Bit, line, line2, pipe, simpleDots, simpleDotsScrolling, star, star2, flip, hamburger, growVertical, growHorizontal, balloon, balloon2, noise, bounce, boxBounce, boxBounce2, triangle, arc, circle, squareCorners, circleQuarters, circleHalves, squish, toggle, toggle2, toggle3, toggle4, toggle5, toggle6, toggle7, toggle8, toggle9, toggle10, toggle11, toggle12, toggle13, arrow, arrow2, arrow3, bouncingBar, bouncingBall, smiley, monkey, hearts, clock, earth, material, moon, runner, pong, shark, dqpb, weather, christmas, grenade, point, layer, betaWave, fingerDance, fistBump, soccerHeader, mindblown, speaker, orangePulse, bluePulse, orangeBluePulse, timeTravel, aesthetic, spinners_default;
83743
82260
  var init_spinners = __esmMin(() => {
83744
82261
  dots = {
83745
82262
  interval: 80,
@@ -84016,19 +82533,6 @@ var init_spinners = __esmMin(() => {
84016
82533
  "\u2800\u2840"
84017
82534
  ]
84018
82535
  };
84019
- dots13 = {
84020
- interval: 80,
84021
- frames: [
84022
- "\u28FC",
84023
- "\u28F9",
84024
- "\u28BB",
84025
- "\u283F",
84026
- "\u285F",
84027
- "\u28CF",
84028
- "\u28E7",
84029
- "\u28F6"
84030
- ]
84031
- };
84032
82536
  dots8Bit = {
84033
82537
  interval: 80,
84034
82538
  frames: [
@@ -84290,46 +82794,6 @@ var init_spinners = __esmMin(() => {
84290
82794
  "\u28FF"
84291
82795
  ]
84292
82796
  };
84293
- sand = {
84294
- interval: 80,
84295
- frames: [
84296
- "\u2801",
84297
- "\u2802",
84298
- "\u2804",
84299
- "\u2840",
84300
- "\u2848",
84301
- "\u2850",
84302
- "\u2860",
84303
- "\u28C0",
84304
- "\u28C1",
84305
- "\u28C2",
84306
- "\u28C4",
84307
- "\u28CC",
84308
- "\u28D4",
84309
- "\u28E4",
84310
- "\u28E5",
84311
- "\u28E6",
84312
- "\u28EE",
84313
- "\u28F6",
84314
- "\u28F7",
84315
- "\u28FF",
84316
- "\u287F",
84317
- "\u283F",
84318
- "\u289F",
84319
- "\u281F",
84320
- "\u285B",
84321
- "\u281B",
84322
- "\u282B",
84323
- "\u288B",
84324
- "\u280B",
84325
- "\u280D",
84326
- "\u2849",
84327
- "\u2809",
84328
- "\u2811",
84329
- "\u2821",
84330
- "\u2881"
84331
- ]
84332
- };
84333
82797
  line = {
84334
82798
  interval: 130,
84335
82799
  frames: [
@@ -85220,9 +83684,7 @@ var init_spinners = __esmMin(() => {
85220
83684
  dots10,
85221
83685
  dots11,
85222
83686
  dots12,
85223
- dots13,
85224
83687
  dots8Bit,
85225
- sand,
85226
83688
  line,
85227
83689
  line2,
85228
83690
  pipe,
@@ -89135,7 +87597,6 @@ var require_screen_manager = __commonJSMin((exports, module2) => {
89135
87597
  "use strict";
89136
87598
  var util = require_readline();
89137
87599
  var cliWidth = require_cli_width();
89138
- var wrapAnsi = require_wrap_ansi();
89139
87600
  var stripAnsi2 = require_strip_ansi2();
89140
87601
  var stringWidth = require_string_width();
89141
87602
  var ora = require_ora2();
@@ -89230,7 +87691,12 @@ var require_screen_manager = __commonJSMin((exports, module2) => {
89230
87691
  return width;
89231
87692
  }
89232
87693
  breakLines(lines, width = this.normalizedCliWidth()) {
89233
- return lines.map((line3) => wrapAnsi(line3, width, { trim: false, hard: true }).split("\n"));
87694
+ const regex2 = new RegExp(`(?:(?:\\033[[0-9;]*m)*.?){1,${width}}`, "g");
87695
+ return lines.map((line3) => {
87696
+ const chunk = line3.match(regex2);
87697
+ chunk.pop();
87698
+ return chunk || "";
87699
+ });
89234
87700
  }
89235
87701
  forceLineReturn(content, width = this.normalizedCliWidth()) {
89236
87702
  return this.breakLines(content.split("\n"), width).flat().join("\n");
@@ -89601,7 +88067,7 @@ var require_input = __commonJSMin((exports, module2) => {
89601
88067
  this.render(isValid5);
89602
88068
  }
89603
88069
  onKeypress() {
89604
- this.status = "touched";
88070
+ this.state = "touched";
89605
88071
  this.render();
89606
88072
  }
89607
88073
  };
@@ -89614,7 +88080,7 @@ var require_number = __commonJSMin((exports, module2) => {
89614
88080
  filterInput(input) {
89615
88081
  if (input && typeof input === "string") {
89616
88082
  input = input.trim();
89617
- const numberMatch = input.match(/(^-?\d+|^-?\d+\.\d*|^\d*\.\d+)(e\d+)?$/);
88083
+ const numberMatch = input.match(/(^-?\d+|^\d+\.\d*|^\d*\.\d+)(e\d+)?$/);
89618
88084
  if (numberMatch) {
89619
88085
  return Number(numberMatch[0]);
89620
88086
  }
@@ -142138,8 +140604,10 @@ var require_node7 = __commonJSMin((exports) => {
142138
140604
  return obj && obj.__esModule ? obj : { default: obj };
142139
140605
  }
142140
140606
  async function getPackageVersion(packageName, registry2) {
142141
- const spinner = (0, _utils.ora)("Loading...").start();
142142
- spinner.color = "yellow";
140607
+ const spinner = (0, _utils.ora)({
140608
+ text: "Load Generator...",
140609
+ spinner: "runner"
140610
+ }).start();
142143
140611
  if (await (0, _utils.canUsePnpm)()) {
142144
140612
  const args = ["info", packageName, "version"];
142145
140613
  if (registry2) {
@@ -143319,7 +141787,6 @@ var require_mwa = __commonJSMin((exports) => {
143319
141787
  return target;
143320
141788
  }
143321
141789
  function _defineProperty2(obj, key, value) {
143322
- key = _toPropertyKey2(key);
143323
141790
  if (key in obj) {
143324
141791
  Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
143325
141792
  } else {
@@ -143327,22 +141794,6 @@ var require_mwa = __commonJSMin((exports) => {
143327
141794
  }
143328
141795
  return obj;
143329
141796
  }
143330
- function _toPropertyKey2(arg) {
143331
- var key = _toPrimitive2(arg, "string");
143332
- return typeof key === "symbol" ? key : String(key);
143333
- }
143334
- function _toPrimitive2(input, hint) {
143335
- if (typeof input !== "object" || input === null)
143336
- return input;
143337
- var prim = input[Symbol.toPrimitive];
143338
- if (prim !== void 0) {
143339
- var res = prim.call(input, hint || "default");
143340
- if (typeof res !== "object")
143341
- return res;
143342
- throw new TypeError("@@toPrimitive must return a primitive value.");
143343
- }
143344
- return (hint === "string" ? String : Number)(input);
143345
- }
143346
141797
  var MWANewAction2 = async (options3) => {
143347
141798
  const {
143348
141799
  locale = "zh",
@@ -143463,7 +141914,6 @@ var require_module = __commonJSMin((exports) => {
143463
141914
  return target;
143464
141915
  }
143465
141916
  function _defineProperty2(obj, key, value) {
143466
- key = _toPropertyKey2(key);
143467
141917
  if (key in obj) {
143468
141918
  Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
143469
141919
  } else {
@@ -143471,22 +141921,6 @@ var require_module = __commonJSMin((exports) => {
143471
141921
  }
143472
141922
  return obj;
143473
141923
  }
143474
- function _toPropertyKey2(arg) {
143475
- var key = _toPrimitive2(arg, "string");
143476
- return typeof key === "symbol" ? key : String(key);
143477
- }
143478
- function _toPrimitive2(input, hint) {
143479
- if (typeof input !== "object" || input === null)
143480
- return input;
143481
- var prim = input[Symbol.toPrimitive];
143482
- if (prim !== void 0) {
143483
- var res = prim.call(input, hint || "default");
143484
- if (typeof res !== "object")
143485
- return res;
143486
- throw new TypeError("@@toPrimitive must return a primitive value.");
143487
- }
143488
- return (hint === "string" ? String : Number)(input);
143489
- }
143490
141924
  var ModuleNewAction2 = async (options3) => {
143491
141925
  const {
143492
141926
  locale = "zh",