@modern-js/repo-generator 0.0.0-next-20221124073657 → 0.0.0-next-20221124095716
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2016 -501
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -45976,6 +45976,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
|
|
|
45976
45976
|
this._redirectable.emit(event, arg1, arg2, arg3);
|
|
45977
45977
|
};
|
|
45978
45978
|
});
|
|
45979
|
+
var InvalidUrlError = createErrorType("ERR_INVALID_URL", "Invalid URL", TypeError);
|
|
45979
45980
|
var RedirectionError = createErrorType("ERR_FR_REDIRECTION_FAILURE", "Redirected request failed");
|
|
45980
45981
|
var TooManyRedirectsError = createErrorType("ERR_FR_TOO_MANY_REDIRECTS", "Maximum number of redirects exceeded");
|
|
45981
45982
|
var MaxBodyLengthExceededError = createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED", "Request body larger than maxBodyLength limit");
|
|
@@ -46008,10 +46009,10 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
|
|
|
46008
46009
|
if (this._ending) {
|
|
46009
46010
|
throw new WriteAfterEndError();
|
|
46010
46011
|
}
|
|
46011
|
-
if (!(
|
|
46012
|
+
if (!isString3(data) && !isBuffer(data)) {
|
|
46012
46013
|
throw new TypeError("data should be a string, Buffer or Uint8Array");
|
|
46013
46014
|
}
|
|
46014
|
-
if (
|
|
46015
|
+
if (isFunction4(encoding)) {
|
|
46015
46016
|
callback = encoding;
|
|
46016
46017
|
encoding = null;
|
|
46017
46018
|
}
|
|
@@ -46031,10 +46032,10 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
|
|
|
46031
46032
|
}
|
|
46032
46033
|
};
|
|
46033
46034
|
RedirectableRequest.prototype.end = function(data, encoding, callback) {
|
|
46034
|
-
if (
|
|
46035
|
+
if (isFunction4(data)) {
|
|
46035
46036
|
callback = data;
|
|
46036
46037
|
data = encoding = null;
|
|
46037
|
-
} else if (
|
|
46038
|
+
} else if (isFunction4(encoding)) {
|
|
46038
46039
|
callback = encoding;
|
|
46039
46040
|
encoding = null;
|
|
46040
46041
|
}
|
|
@@ -46158,7 +46159,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
|
|
|
46158
46159
|
for (var event of events) {
|
|
46159
46160
|
request.on(event, eventHandlers[event]);
|
|
46160
46161
|
}
|
|
46161
|
-
this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : this.
|
|
46162
|
+
this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : this._options.path;
|
|
46162
46163
|
if (this._isRedirect) {
|
|
46163
46164
|
var i = 0;
|
|
46164
46165
|
var self3 = this;
|
|
@@ -46223,7 +46224,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
|
|
|
46223
46224
|
try {
|
|
46224
46225
|
redirectUrl = url.resolve(currentUrl, location);
|
|
46225
46226
|
} catch (cause) {
|
|
46226
|
-
this.emit("error", new RedirectionError(cause));
|
|
46227
|
+
this.emit("error", new RedirectionError({ cause }));
|
|
46227
46228
|
return;
|
|
46228
46229
|
}
|
|
46229
46230
|
debug("redirecting to", redirectUrl);
|
|
@@ -46233,7 +46234,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
|
|
|
46233
46234
|
if (redirectUrlParts.protocol !== currentUrlParts.protocol && redirectUrlParts.protocol !== "https:" || redirectUrlParts.host !== currentHost && !isSubdomain(redirectUrlParts.host, currentHost)) {
|
|
46234
46235
|
removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
|
|
46235
46236
|
}
|
|
46236
|
-
if (
|
|
46237
|
+
if (isFunction4(beforeRedirect)) {
|
|
46237
46238
|
var responseDetails = {
|
|
46238
46239
|
headers: response.headers,
|
|
46239
46240
|
statusCode
|
|
@@ -46254,7 +46255,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
|
|
|
46254
46255
|
try {
|
|
46255
46256
|
this._performRequest();
|
|
46256
46257
|
} catch (cause) {
|
|
46257
|
-
this.emit("error", new RedirectionError(cause));
|
|
46258
|
+
this.emit("error", new RedirectionError({ cause }));
|
|
46258
46259
|
}
|
|
46259
46260
|
};
|
|
46260
46261
|
function wrap(protocols) {
|
|
@@ -46268,13 +46269,17 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
|
|
|
46268
46269
|
var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
|
|
46269
46270
|
var wrappedProtocol = exports2[scheme] = Object.create(nativeProtocol);
|
|
46270
46271
|
function request(input, options3, callback) {
|
|
46271
|
-
if (
|
|
46272
|
-
var
|
|
46272
|
+
if (isString3(input)) {
|
|
46273
|
+
var parsed;
|
|
46273
46274
|
try {
|
|
46274
|
-
|
|
46275
|
+
parsed = urlToOptions(new URL(input));
|
|
46275
46276
|
} catch (err) {
|
|
46276
|
-
|
|
46277
|
+
parsed = url.parse(input);
|
|
46277
46278
|
}
|
|
46279
|
+
if (!isString3(parsed.protocol)) {
|
|
46280
|
+
throw new InvalidUrlError({ input });
|
|
46281
|
+
}
|
|
46282
|
+
input = parsed;
|
|
46278
46283
|
} else if (URL && input instanceof URL) {
|
|
46279
46284
|
input = urlToOptions(input);
|
|
46280
46285
|
} else {
|
|
@@ -46282,7 +46287,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
|
|
|
46282
46287
|
options3 = input;
|
|
46283
46288
|
input = { protocol };
|
|
46284
46289
|
}
|
|
46285
|
-
if (
|
|
46290
|
+
if (isFunction4(options3)) {
|
|
46286
46291
|
callback = options3;
|
|
46287
46292
|
options3 = null;
|
|
46288
46293
|
}
|
|
@@ -46291,6 +46296,9 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
|
|
|
46291
46296
|
maxBodyLength: exports2.maxBodyLength
|
|
46292
46297
|
}, input, options3);
|
|
46293
46298
|
options3.nativeProtocols = nativeProtocols;
|
|
46299
|
+
if (!isString3(options3.host) && !isString3(options3.hostname)) {
|
|
46300
|
+
options3.hostname = "::1";
|
|
46301
|
+
}
|
|
46294
46302
|
assert.equal(options3.protocol, protocol, "protocol mismatch");
|
|
46295
46303
|
debug("options", options3);
|
|
46296
46304
|
return new RedirectableRequest(options3, callback);
|
|
@@ -46334,20 +46342,16 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
|
|
|
46334
46342
|
}
|
|
46335
46343
|
return lastValue === null || typeof lastValue === "undefined" ? void 0 : String(lastValue).trim();
|
|
46336
46344
|
}
|
|
46337
|
-
function createErrorType(code,
|
|
46338
|
-
function CustomError(
|
|
46345
|
+
function createErrorType(code, message, baseClass) {
|
|
46346
|
+
function CustomError(properties) {
|
|
46339
46347
|
Error.captureStackTrace(this, this.constructor);
|
|
46340
|
-
|
|
46341
|
-
|
|
46342
|
-
|
|
46343
|
-
this.message = defaultMessage + ": " + cause.message;
|
|
46344
|
-
this.cause = cause;
|
|
46345
|
-
}
|
|
46348
|
+
Object.assign(this, properties || {});
|
|
46349
|
+
this.code = code;
|
|
46350
|
+
this.message = this.cause ? message + ": " + this.cause.message : message;
|
|
46346
46351
|
}
|
|
46347
|
-
CustomError.prototype = new Error();
|
|
46352
|
+
CustomError.prototype = new (baseClass || Error)();
|
|
46348
46353
|
CustomError.prototype.constructor = CustomError;
|
|
46349
46354
|
CustomError.prototype.name = "Error [" + code + "]";
|
|
46350
|
-
CustomError.prototype.code = code;
|
|
46351
46355
|
return CustomError;
|
|
46352
46356
|
}
|
|
46353
46357
|
function abortRequest(request) {
|
|
@@ -46358,9 +46362,19 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
|
|
|
46358
46362
|
request.abort();
|
|
46359
46363
|
}
|
|
46360
46364
|
function isSubdomain(subdomain, domain) {
|
|
46361
|
-
|
|
46365
|
+
assert(isString3(subdomain) && isString3(domain));
|
|
46366
|
+
var dot = subdomain.length - domain.length - 1;
|
|
46362
46367
|
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
|
|
46363
46368
|
}
|
|
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
|
+
}
|
|
46364
46378
|
module2.exports = wrap({ http, https });
|
|
46365
46379
|
module2.exports.wrap = wrap;
|
|
46366
46380
|
});
|
|
@@ -48190,8 +48204,9 @@ var require_read_entry = __commonJSMin((exports, module2) => {
|
|
|
48190
48204
|
}
|
|
48191
48205
|
this.path = normPath(header.path);
|
|
48192
48206
|
this.mode = header.mode;
|
|
48193
|
-
if (this.mode)
|
|
48207
|
+
if (this.mode) {
|
|
48194
48208
|
this.mode = this.mode & 4095;
|
|
48209
|
+
}
|
|
48195
48210
|
this.uid = header.uid;
|
|
48196
48211
|
this.gid = header.gid;
|
|
48197
48212
|
this.uname = header.uname;
|
|
@@ -48203,29 +48218,35 @@ var require_read_entry = __commonJSMin((exports, module2) => {
|
|
|
48203
48218
|
this.linkpath = normPath(header.linkpath);
|
|
48204
48219
|
this.uname = header.uname;
|
|
48205
48220
|
this.gname = header.gname;
|
|
48206
|
-
if (ex)
|
|
48221
|
+
if (ex) {
|
|
48207
48222
|
this[SLURP](ex);
|
|
48208
|
-
|
|
48223
|
+
}
|
|
48224
|
+
if (gex) {
|
|
48209
48225
|
this[SLURP](gex, true);
|
|
48226
|
+
}
|
|
48210
48227
|
}
|
|
48211
48228
|
write(data) {
|
|
48212
48229
|
const writeLen = data.length;
|
|
48213
|
-
if (writeLen > this.blockRemain)
|
|
48230
|
+
if (writeLen > this.blockRemain) {
|
|
48214
48231
|
throw new Error("writing more to entry than is appropriate");
|
|
48232
|
+
}
|
|
48215
48233
|
const r = this.remain;
|
|
48216
48234
|
const br = this.blockRemain;
|
|
48217
48235
|
this.remain = Math.max(0, r - writeLen);
|
|
48218
48236
|
this.blockRemain = Math.max(0, br - writeLen);
|
|
48219
|
-
if (this.ignore)
|
|
48237
|
+
if (this.ignore) {
|
|
48220
48238
|
return true;
|
|
48221
|
-
|
|
48239
|
+
}
|
|
48240
|
+
if (r >= writeLen) {
|
|
48222
48241
|
return super.write(data);
|
|
48242
|
+
}
|
|
48223
48243
|
return super.write(data.slice(0, r));
|
|
48224
48244
|
}
|
|
48225
48245
|
[SLURP](ex, global2) {
|
|
48226
48246
|
for (const k in ex) {
|
|
48227
|
-
if (ex[k] !== null && ex[k] !== void 0 && !(global2 && k === "path"))
|
|
48247
|
+
if (ex[k] !== null && ex[k] !== void 0 && !(global2 && k === "path")) {
|
|
48228
48248
|
this[k] = k === "path" || k === "linkpath" ? normPath(ex[k]) : ex[k];
|
|
48249
|
+
}
|
|
48229
48250
|
}
|
|
48230
48251
|
}
|
|
48231
48252
|
};
|
|
@@ -48260,12 +48281,13 @@ var require_types = __commonJSMin((exports) => {
|
|
|
48260
48281
|
var require_large_numbers = __commonJSMin((exports, module2) => {
|
|
48261
48282
|
"use strict";
|
|
48262
48283
|
var encode = (num, buf) => {
|
|
48263
|
-
if (!Number.isSafeInteger(num))
|
|
48284
|
+
if (!Number.isSafeInteger(num)) {
|
|
48264
48285
|
throw Error("cannot encode number outside of javascript safe integer range");
|
|
48265
|
-
else if (num < 0)
|
|
48286
|
+
} else if (num < 0) {
|
|
48266
48287
|
encodeNegative(num, buf);
|
|
48267
|
-
else
|
|
48288
|
+
} else {
|
|
48268
48289
|
encodePositive(num, buf);
|
|
48290
|
+
}
|
|
48269
48291
|
return buf;
|
|
48270
48292
|
};
|
|
48271
48293
|
var encodePositive = (num, buf) => {
|
|
@@ -48282,11 +48304,11 @@ var require_large_numbers = __commonJSMin((exports, module2) => {
|
|
|
48282
48304
|
for (var i = buf.length; i > 1; i--) {
|
|
48283
48305
|
var byte = num & 255;
|
|
48284
48306
|
num = Math.floor(num / 256);
|
|
48285
|
-
if (flipped)
|
|
48307
|
+
if (flipped) {
|
|
48286
48308
|
buf[i - 1] = onesComp(byte);
|
|
48287
|
-
else if (byte === 0)
|
|
48309
|
+
} else if (byte === 0) {
|
|
48288
48310
|
buf[i - 1] = 0;
|
|
48289
|
-
else {
|
|
48311
|
+
} else {
|
|
48290
48312
|
flipped = true;
|
|
48291
48313
|
buf[i - 1] = twosComp(byte);
|
|
48292
48314
|
}
|
|
@@ -48295,10 +48317,12 @@ var require_large_numbers = __commonJSMin((exports, module2) => {
|
|
|
48295
48317
|
var parse2 = (buf) => {
|
|
48296
48318
|
const pre = buf[0];
|
|
48297
48319
|
const value = pre === 128 ? pos(buf.slice(1, buf.length)) : pre === 255 ? twos(buf) : null;
|
|
48298
|
-
if (value === null)
|
|
48320
|
+
if (value === null) {
|
|
48299
48321
|
throw Error("invalid base256 encoding");
|
|
48300
|
-
|
|
48322
|
+
}
|
|
48323
|
+
if (!Number.isSafeInteger(value)) {
|
|
48301
48324
|
throw Error("parsed number outside of javascript safe integer range");
|
|
48325
|
+
}
|
|
48302
48326
|
return value;
|
|
48303
48327
|
};
|
|
48304
48328
|
var twos = (buf) => {
|
|
@@ -48308,16 +48332,17 @@ var require_large_numbers = __commonJSMin((exports, module2) => {
|
|
|
48308
48332
|
for (var i = len - 1; i > -1; i--) {
|
|
48309
48333
|
var byte = buf[i];
|
|
48310
48334
|
var f;
|
|
48311
|
-
if (flipped)
|
|
48335
|
+
if (flipped) {
|
|
48312
48336
|
f = onesComp(byte);
|
|
48313
|
-
else if (byte === 0)
|
|
48337
|
+
} else if (byte === 0) {
|
|
48314
48338
|
f = byte;
|
|
48315
|
-
else {
|
|
48339
|
+
} else {
|
|
48316
48340
|
flipped = true;
|
|
48317
48341
|
f = twosComp(byte);
|
|
48318
48342
|
}
|
|
48319
|
-
if (f !== 0)
|
|
48343
|
+
if (f !== 0) {
|
|
48320
48344
|
sum -= f * Math.pow(256, len - i - 1);
|
|
48345
|
+
}
|
|
48321
48346
|
}
|
|
48322
48347
|
return sum;
|
|
48323
48348
|
};
|
|
@@ -48326,8 +48351,9 @@ var require_large_numbers = __commonJSMin((exports, module2) => {
|
|
|
48326
48351
|
var sum = 0;
|
|
48327
48352
|
for (var i = len - 1; i > -1; i--) {
|
|
48328
48353
|
var byte = buf[i];
|
|
48329
|
-
if (byte !== 0)
|
|
48354
|
+
if (byte !== 0) {
|
|
48330
48355
|
sum += byte * Math.pow(256, len - i - 1);
|
|
48356
|
+
}
|
|
48331
48357
|
}
|
|
48332
48358
|
return sum;
|
|
48333
48359
|
};
|
|
@@ -48366,16 +48392,19 @@ var require_header = __commonJSMin((exports, module2) => {
|
|
|
48366
48392
|
this.devmin = 0;
|
|
48367
48393
|
this.atime = null;
|
|
48368
48394
|
this.ctime = null;
|
|
48369
|
-
if (Buffer.isBuffer(data))
|
|
48395
|
+
if (Buffer.isBuffer(data)) {
|
|
48370
48396
|
this.decode(data, off || 0, ex, gex);
|
|
48371
|
-
else if (data)
|
|
48397
|
+
} else if (data) {
|
|
48372
48398
|
this.set(data);
|
|
48399
|
+
}
|
|
48373
48400
|
}
|
|
48374
48401
|
decode(buf, off, ex, gex) {
|
|
48375
|
-
if (!off)
|
|
48402
|
+
if (!off) {
|
|
48376
48403
|
off = 0;
|
|
48377
|
-
|
|
48404
|
+
}
|
|
48405
|
+
if (!buf || !(buf.length >= off + 512)) {
|
|
48378
48406
|
throw new Error("need 512 bytes for header");
|
|
48407
|
+
}
|
|
48379
48408
|
this.path = decString(buf, off, 100);
|
|
48380
48409
|
this.mode = decNumber(buf, off + 100, 8);
|
|
48381
48410
|
this.uid = decNumber(buf, off + 108, 8);
|
|
@@ -48386,12 +48415,15 @@ var require_header = __commonJSMin((exports, module2) => {
|
|
|
48386
48415
|
this[SLURP](ex);
|
|
48387
48416
|
this[SLURP](gex, true);
|
|
48388
48417
|
this[TYPE] = decString(buf, off + 156, 1);
|
|
48389
|
-
if (this[TYPE] === "")
|
|
48418
|
+
if (this[TYPE] === "") {
|
|
48390
48419
|
this[TYPE] = "0";
|
|
48391
|
-
|
|
48420
|
+
}
|
|
48421
|
+
if (this[TYPE] === "0" && this.path.slice(-1) === "/") {
|
|
48392
48422
|
this[TYPE] = "5";
|
|
48393
|
-
|
|
48423
|
+
}
|
|
48424
|
+
if (this[TYPE] === "5") {
|
|
48394
48425
|
this.size = 0;
|
|
48426
|
+
}
|
|
48395
48427
|
this.linkpath = decString(buf, off + 157, 100);
|
|
48396
48428
|
if (buf.slice(off + 257, off + 265).toString() === "ustar\x0000") {
|
|
48397
48429
|
this.uname = decString(buf, off + 265, 32);
|
|
@@ -48403,25 +48435,30 @@ var require_header = __commonJSMin((exports, module2) => {
|
|
|
48403
48435
|
this.path = prefix + "/" + this.path;
|
|
48404
48436
|
} else {
|
|
48405
48437
|
const prefix = decString(buf, off + 345, 130);
|
|
48406
|
-
if (prefix)
|
|
48438
|
+
if (prefix) {
|
|
48407
48439
|
this.path = prefix + "/" + this.path;
|
|
48440
|
+
}
|
|
48408
48441
|
this.atime = decDate(buf, off + 476, 12);
|
|
48409
48442
|
this.ctime = decDate(buf, off + 488, 12);
|
|
48410
48443
|
}
|
|
48411
48444
|
}
|
|
48412
48445
|
let sum = 8 * 32;
|
|
48413
|
-
for (let i = off; i < off + 148; i++)
|
|
48446
|
+
for (let i = off; i < off + 148; i++) {
|
|
48414
48447
|
sum += buf[i];
|
|
48415
|
-
|
|
48448
|
+
}
|
|
48449
|
+
for (let i = off + 156; i < off + 512; i++) {
|
|
48416
48450
|
sum += buf[i];
|
|
48451
|
+
}
|
|
48417
48452
|
this.cksumValid = sum === this.cksum;
|
|
48418
|
-
if (this.cksum === null && sum === 8 * 32)
|
|
48453
|
+
if (this.cksum === null && sum === 8 * 32) {
|
|
48419
48454
|
this.nullBlock = true;
|
|
48455
|
+
}
|
|
48420
48456
|
}
|
|
48421
48457
|
[SLURP](ex, global2) {
|
|
48422
48458
|
for (const k in ex) {
|
|
48423
|
-
if (ex[k] !== null && ex[k] !== void 0 && !(global2 && k === "path"))
|
|
48459
|
+
if (ex[k] !== null && ex[k] !== void 0 && !(global2 && k === "path")) {
|
|
48424
48460
|
this[k] = ex[k];
|
|
48461
|
+
}
|
|
48425
48462
|
}
|
|
48426
48463
|
}
|
|
48427
48464
|
encode(buf, off) {
|
|
@@ -48429,10 +48466,12 @@ var require_header = __commonJSMin((exports, module2) => {
|
|
|
48429
48466
|
buf = this.block = Buffer.alloc(512);
|
|
48430
48467
|
off = 0;
|
|
48431
48468
|
}
|
|
48432
|
-
if (!off)
|
|
48469
|
+
if (!off) {
|
|
48433
48470
|
off = 0;
|
|
48434
|
-
|
|
48471
|
+
}
|
|
48472
|
+
if (!(buf.length >= off + 512)) {
|
|
48435
48473
|
throw new Error("need 512 bytes for header");
|
|
48474
|
+
}
|
|
48436
48475
|
const prefixSize = this.ctime || this.atime ? 130 : 155;
|
|
48437
48476
|
const split = splitPrefix(this.path || "", prefixSize);
|
|
48438
48477
|
const path6 = split[0];
|
|
@@ -48452,18 +48491,20 @@ var require_header = __commonJSMin((exports, module2) => {
|
|
|
48452
48491
|
this.needPax = encNumber(buf, off + 329, 8, this.devmaj) || this.needPax;
|
|
48453
48492
|
this.needPax = encNumber(buf, off + 337, 8, this.devmin) || this.needPax;
|
|
48454
48493
|
this.needPax = encString(buf, off + 345, prefixSize, prefix) || this.needPax;
|
|
48455
|
-
if (buf[off + 475] !== 0)
|
|
48494
|
+
if (buf[off + 475] !== 0) {
|
|
48456
48495
|
this.needPax = encString(buf, off + 345, 155, prefix) || this.needPax;
|
|
48457
|
-
else {
|
|
48496
|
+
} else {
|
|
48458
48497
|
this.needPax = encString(buf, off + 345, 130, prefix) || this.needPax;
|
|
48459
48498
|
this.needPax = encDate(buf, off + 476, 12, this.atime) || this.needPax;
|
|
48460
48499
|
this.needPax = encDate(buf, off + 488, 12, this.ctime) || this.needPax;
|
|
48461
48500
|
}
|
|
48462
48501
|
let sum = 8 * 32;
|
|
48463
|
-
for (let i = off; i < off + 148; i++)
|
|
48502
|
+
for (let i = off; i < off + 148; i++) {
|
|
48464
48503
|
sum += buf[i];
|
|
48465
|
-
|
|
48504
|
+
}
|
|
48505
|
+
for (let i = off + 156; i < off + 512; i++) {
|
|
48466
48506
|
sum += buf[i];
|
|
48507
|
+
}
|
|
48467
48508
|
this.cksum = sum;
|
|
48468
48509
|
encNumber(buf, off + 148, 8, this.cksum);
|
|
48469
48510
|
this.cksumValid = true;
|
|
@@ -48471,8 +48512,9 @@ var require_header = __commonJSMin((exports, module2) => {
|
|
|
48471
48512
|
}
|
|
48472
48513
|
set(data) {
|
|
48473
48514
|
for (const i in data) {
|
|
48474
|
-
if (data[i] !== null && data[i] !== void 0)
|
|
48515
|
+
if (data[i] !== null && data[i] !== void 0) {
|
|
48475
48516
|
this[i] = data[i];
|
|
48517
|
+
}
|
|
48476
48518
|
}
|
|
48477
48519
|
}
|
|
48478
48520
|
get type() {
|
|
@@ -48482,10 +48524,11 @@ var require_header = __commonJSMin((exports, module2) => {
|
|
|
48482
48524
|
return this[TYPE];
|
|
48483
48525
|
}
|
|
48484
48526
|
set type(type) {
|
|
48485
|
-
if (types.code.has(type))
|
|
48527
|
+
if (types.code.has(type)) {
|
|
48486
48528
|
this[TYPE] = types.code.get(type);
|
|
48487
|
-
else
|
|
48529
|
+
} else {
|
|
48488
48530
|
this[TYPE] = type;
|
|
48531
|
+
}
|
|
48489
48532
|
}
|
|
48490
48533
|
};
|
|
48491
48534
|
var splitPrefix = (p, prefixSize) => {
|
|
@@ -48494,23 +48537,24 @@ var require_header = __commonJSMin((exports, module2) => {
|
|
|
48494
48537
|
let prefix = "";
|
|
48495
48538
|
let ret;
|
|
48496
48539
|
const root = pathModule.parse(p).root || ".";
|
|
48497
|
-
if (Buffer.byteLength(pp) < pathSize)
|
|
48540
|
+
if (Buffer.byteLength(pp) < pathSize) {
|
|
48498
48541
|
ret = [pp, prefix, false];
|
|
48499
|
-
else {
|
|
48542
|
+
} else {
|
|
48500
48543
|
prefix = pathModule.dirname(pp);
|
|
48501
48544
|
pp = pathModule.basename(pp);
|
|
48502
48545
|
do {
|
|
48503
|
-
if (Buffer.byteLength(pp) <= pathSize && Buffer.byteLength(prefix) <= prefixSize)
|
|
48546
|
+
if (Buffer.byteLength(pp) <= pathSize && Buffer.byteLength(prefix) <= prefixSize) {
|
|
48504
48547
|
ret = [pp, prefix, false];
|
|
48505
|
-
else if (Buffer.byteLength(pp) > pathSize && Buffer.byteLength(prefix) <= prefixSize)
|
|
48506
|
-
ret = [pp.
|
|
48507
|
-
else {
|
|
48548
|
+
} else if (Buffer.byteLength(pp) > pathSize && Buffer.byteLength(prefix) <= prefixSize) {
|
|
48549
|
+
ret = [pp.slice(0, pathSize - 1), prefix, true];
|
|
48550
|
+
} else {
|
|
48508
48551
|
pp = pathModule.join(pathModule.basename(prefix), pp);
|
|
48509
48552
|
prefix = pathModule.dirname(prefix);
|
|
48510
48553
|
}
|
|
48511
48554
|
} while (prefix !== root && !ret);
|
|
48512
|
-
if (!ret)
|
|
48513
|
-
ret = [p.
|
|
48555
|
+
if (!ret) {
|
|
48556
|
+
ret = [p.slice(0, pathSize - 1), "", true];
|
|
48557
|
+
}
|
|
48514
48558
|
}
|
|
48515
48559
|
return ret;
|
|
48516
48560
|
};
|
|
@@ -48558,13 +48602,15 @@ var require_pax = __commonJSMin((exports, module2) => {
|
|
|
48558
48602
|
}
|
|
48559
48603
|
encode() {
|
|
48560
48604
|
const body = this.encodeBody();
|
|
48561
|
-
if (body === "")
|
|
48605
|
+
if (body === "") {
|
|
48562
48606
|
return null;
|
|
48607
|
+
}
|
|
48563
48608
|
const bodyLen = Buffer.byteLength(body);
|
|
48564
48609
|
const bufLen = 512 * Math.ceil(1 + bodyLen / 512);
|
|
48565
48610
|
const buf = Buffer.allocUnsafe(bufLen);
|
|
48566
|
-
for (let i = 0; i < 512; i++)
|
|
48611
|
+
for (let i = 0; i < 512; i++) {
|
|
48567
48612
|
buf[i] = 0;
|
|
48613
|
+
}
|
|
48568
48614
|
new Header({
|
|
48569
48615
|
path: ("PaxHeader/" + path6.basename(this.path)).slice(0, 99),
|
|
48570
48616
|
mode: this.mode || 420,
|
|
@@ -48582,22 +48628,25 @@ var require_pax = __commonJSMin((exports, module2) => {
|
|
|
48582
48628
|
ctime: this.ctime || null
|
|
48583
48629
|
}).encode(buf);
|
|
48584
48630
|
buf.write(body, 512, bodyLen, "utf8");
|
|
48585
|
-
for (let i = bodyLen + 512; i < buf.length; i++)
|
|
48631
|
+
for (let i = bodyLen + 512; i < buf.length; i++) {
|
|
48586
48632
|
buf[i] = 0;
|
|
48633
|
+
}
|
|
48587
48634
|
return buf;
|
|
48588
48635
|
}
|
|
48589
48636
|
encodeBody() {
|
|
48590
48637
|
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");
|
|
48591
48638
|
}
|
|
48592
48639
|
encodeField(field) {
|
|
48593
|
-
if (this[field] === null || this[field] === void 0)
|
|
48640
|
+
if (this[field] === null || this[field] === void 0) {
|
|
48594
48641
|
return "";
|
|
48642
|
+
}
|
|
48595
48643
|
const v = this[field] instanceof Date ? this[field].getTime() / 1e3 : this[field];
|
|
48596
48644
|
const s = " " + (field === "dev" || field === "ino" || field === "nlink" ? "SCHILY." : "") + field + "=" + v + "\n";
|
|
48597
48645
|
const byteLen = Buffer.byteLength(s);
|
|
48598
48646
|
let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1;
|
|
48599
|
-
if (byteLen + digits >= Math.pow(10, digits))
|
|
48647
|
+
if (byteLen + digits >= Math.pow(10, digits)) {
|
|
48600
48648
|
digits += 1;
|
|
48649
|
+
}
|
|
48601
48650
|
const len = digits + byteLen;
|
|
48602
48651
|
return len + s;
|
|
48603
48652
|
}
|
|
@@ -48607,13 +48656,15 @@ var require_pax = __commonJSMin((exports, module2) => {
|
|
|
48607
48656
|
var parseKV = (string) => string.replace(/\n$/, "").split("\n").reduce(parseKVLine, /* @__PURE__ */ Object.create(null));
|
|
48608
48657
|
var parseKVLine = (set, line3) => {
|
|
48609
48658
|
const n = parseInt(line3, 10);
|
|
48610
|
-
if (n !== Buffer.byteLength(line3) + 1)
|
|
48659
|
+
if (n !== Buffer.byteLength(line3) + 1) {
|
|
48611
48660
|
return set;
|
|
48612
|
-
|
|
48661
|
+
}
|
|
48662
|
+
line3 = line3.slice((n + " ").length);
|
|
48613
48663
|
const kv = line3.split("=");
|
|
48614
48664
|
const k = kv.shift().replace(/^SCHILY\.(dev|ino|nlink)/, "$1");
|
|
48615
|
-
if (!k)
|
|
48665
|
+
if (!k) {
|
|
48616
48666
|
return set;
|
|
48667
|
+
}
|
|
48617
48668
|
const v = kv.join("=");
|
|
48618
48669
|
set[k] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) ? new Date(v * 1e3) : /^[0-9]+$/.test(v) ? +v : v;
|
|
48619
48670
|
return set;
|
|
@@ -48635,10 +48686,12 @@ var require_warn_mixin = __commonJSMin((exports, module2) => {
|
|
|
48635
48686
|
"use strict";
|
|
48636
48687
|
module2.exports = (Base) => class extends Base {
|
|
48637
48688
|
warn(code, message, data = {}) {
|
|
48638
|
-
if (this.file)
|
|
48689
|
+
if (this.file) {
|
|
48639
48690
|
data.file = this.file;
|
|
48640
|
-
|
|
48691
|
+
}
|
|
48692
|
+
if (this.cwd) {
|
|
48641
48693
|
data.cwd = this.cwd;
|
|
48694
|
+
}
|
|
48642
48695
|
data.code = message instanceof Error && message.code || code;
|
|
48643
48696
|
data.tarCode = code;
|
|
48644
48697
|
if (!this.strict && data.recoverable !== false) {
|
|
@@ -48647,10 +48700,11 @@ var require_warn_mixin = __commonJSMin((exports, module2) => {
|
|
|
48647
48700
|
message = message.message;
|
|
48648
48701
|
}
|
|
48649
48702
|
this.emit("warn", data.tarCode, message, data);
|
|
48650
|
-
} else if (message instanceof Error)
|
|
48703
|
+
} else if (message instanceof Error) {
|
|
48651
48704
|
this.emit("error", Object.assign(message, data));
|
|
48652
|
-
else
|
|
48705
|
+
} else {
|
|
48653
48706
|
this.emit("error", Object.assign(new Error(`${code}: ${message}`), data));
|
|
48707
|
+
}
|
|
48654
48708
|
}
|
|
48655
48709
|
};
|
|
48656
48710
|
});
|
|
@@ -48678,7 +48732,7 @@ var require_strip_absolute_path = __commonJSMin((exports, module2) => {
|
|
|
48678
48732
|
let parsed = parse2(path6);
|
|
48679
48733
|
while (isAbsolute(path6) || parsed.root) {
|
|
48680
48734
|
const root = path6.charAt(0) === "/" && path6.slice(0, 4) !== "//?/" ? "/" : parsed.root;
|
|
48681
|
-
path6 = path6.
|
|
48735
|
+
path6 = path6.slice(root.length);
|
|
48682
48736
|
r += root;
|
|
48683
48737
|
parsed = parse2(path6);
|
|
48684
48738
|
}
|
|
@@ -48689,15 +48743,19 @@ var require_mode_fix = __commonJSMin((exports, module2) => {
|
|
|
48689
48743
|
"use strict";
|
|
48690
48744
|
module2.exports = (mode, isDir, portable) => {
|
|
48691
48745
|
mode &= 4095;
|
|
48692
|
-
if (portable)
|
|
48746
|
+
if (portable) {
|
|
48693
48747
|
mode = (mode | 384) & ~18;
|
|
48748
|
+
}
|
|
48694
48749
|
if (isDir) {
|
|
48695
|
-
if (mode & 256)
|
|
48750
|
+
if (mode & 256) {
|
|
48696
48751
|
mode |= 64;
|
|
48697
|
-
|
|
48752
|
+
}
|
|
48753
|
+
if (mode & 32) {
|
|
48698
48754
|
mode |= 8;
|
|
48699
|
-
|
|
48755
|
+
}
|
|
48756
|
+
if (mode & 4) {
|
|
48700
48757
|
mode |= 1;
|
|
48758
|
+
}
|
|
48701
48759
|
}
|
|
48702
48760
|
return mode;
|
|
48703
48761
|
};
|
|
@@ -48712,8 +48770,9 @@ var require_write_entry = __commonJSMin((exports, module2) => {
|
|
|
48712
48770
|
var normPath = require_normalize_windows_path();
|
|
48713
48771
|
var stripSlash = require_strip_trailing_slashes();
|
|
48714
48772
|
var prefixPath = (path7, prefix) => {
|
|
48715
|
-
if (!prefix)
|
|
48773
|
+
if (!prefix) {
|
|
48716
48774
|
return normPath(path7);
|
|
48775
|
+
}
|
|
48717
48776
|
path7 = normPath(path7).replace(/^\.(\/|$)/, "");
|
|
48718
48777
|
return stripSlash(prefix) + "/" + path7;
|
|
48719
48778
|
};
|
|
@@ -48745,8 +48804,9 @@ var require_write_entry = __commonJSMin((exports, module2) => {
|
|
|
48745
48804
|
constructor(p, opt) {
|
|
48746
48805
|
opt = opt || {};
|
|
48747
48806
|
super(opt);
|
|
48748
|
-
if (typeof p !== "string")
|
|
48807
|
+
if (typeof p !== "string") {
|
|
48749
48808
|
throw new TypeError("path is required");
|
|
48809
|
+
}
|
|
48750
48810
|
this.path = normPath(p);
|
|
48751
48811
|
this.portable = !!opt.portable;
|
|
48752
48812
|
this.myuid = process.getuid && process.getuid() || 0;
|
|
@@ -48769,8 +48829,9 @@ var require_write_entry = __commonJSMin((exports, module2) => {
|
|
|
48769
48829
|
this.length = null;
|
|
48770
48830
|
this.pos = null;
|
|
48771
48831
|
this.remain = null;
|
|
48772
|
-
if (typeof opt.onwarn === "function")
|
|
48832
|
+
if (typeof opt.onwarn === "function") {
|
|
48773
48833
|
this.on("warn", opt.onwarn);
|
|
48834
|
+
}
|
|
48774
48835
|
let pathWarn = false;
|
|
48775
48836
|
if (!this.preservePaths) {
|
|
48776
48837
|
const [root, stripped] = stripAbsolutePath(this.path);
|
|
@@ -48785,36 +48846,41 @@ var require_write_entry = __commonJSMin((exports, module2) => {
|
|
|
48785
48846
|
p = p.replace(/\\/g, "/");
|
|
48786
48847
|
}
|
|
48787
48848
|
this.absolute = normPath(opt.absolute || path6.resolve(this.cwd, p));
|
|
48788
|
-
if (this.path === "")
|
|
48849
|
+
if (this.path === "") {
|
|
48789
48850
|
this.path = "./";
|
|
48851
|
+
}
|
|
48790
48852
|
if (pathWarn) {
|
|
48791
48853
|
this.warn("TAR_ENTRY_INFO", `stripping ${pathWarn} from absolute path`, {
|
|
48792
48854
|
entry: this,
|
|
48793
48855
|
path: pathWarn + this.path
|
|
48794
48856
|
});
|
|
48795
48857
|
}
|
|
48796
|
-
if (this.statCache.has(this.absolute))
|
|
48858
|
+
if (this.statCache.has(this.absolute)) {
|
|
48797
48859
|
this[ONLSTAT](this.statCache.get(this.absolute));
|
|
48798
|
-
else
|
|
48860
|
+
} else {
|
|
48799
48861
|
this[LSTAT]();
|
|
48862
|
+
}
|
|
48800
48863
|
}
|
|
48801
48864
|
emit(ev, ...data) {
|
|
48802
|
-
if (ev === "error")
|
|
48865
|
+
if (ev === "error") {
|
|
48803
48866
|
this[HAD_ERROR] = true;
|
|
48867
|
+
}
|
|
48804
48868
|
return super.emit(ev, ...data);
|
|
48805
48869
|
}
|
|
48806
48870
|
[LSTAT]() {
|
|
48807
48871
|
fs4.lstat(this.absolute, (er, stat) => {
|
|
48808
|
-
if (er)
|
|
48872
|
+
if (er) {
|
|
48809
48873
|
return this.emit("error", er);
|
|
48874
|
+
}
|
|
48810
48875
|
this[ONLSTAT](stat);
|
|
48811
48876
|
});
|
|
48812
48877
|
}
|
|
48813
48878
|
[ONLSTAT](stat) {
|
|
48814
48879
|
this.statCache.set(this.absolute, stat);
|
|
48815
48880
|
this.stat = stat;
|
|
48816
|
-
if (!stat.isFile())
|
|
48881
|
+
if (!stat.isFile()) {
|
|
48817
48882
|
stat.size = 0;
|
|
48883
|
+
}
|
|
48818
48884
|
this.type = getType2(stat);
|
|
48819
48885
|
this.emit("stat", stat);
|
|
48820
48886
|
this[PROCESS]();
|
|
@@ -48838,8 +48904,9 @@ var require_write_entry = __commonJSMin((exports, module2) => {
|
|
|
48838
48904
|
return prefixPath(path7, this.prefix);
|
|
48839
48905
|
}
|
|
48840
48906
|
[HEADER]() {
|
|
48841
|
-
if (this.type === "Directory" && this.portable)
|
|
48907
|
+
if (this.type === "Directory" && this.portable) {
|
|
48842
48908
|
this.noMtime = true;
|
|
48909
|
+
}
|
|
48843
48910
|
this.header = new Header({
|
|
48844
48911
|
path: this[PREFIX](this.path),
|
|
48845
48912
|
linkpath: this.type === "Link" ? this[PREFIX](this.linkpath) : this.linkpath,
|
|
@@ -48872,16 +48939,18 @@ var require_write_entry = __commonJSMin((exports, module2) => {
|
|
|
48872
48939
|
super.write(this.header.block);
|
|
48873
48940
|
}
|
|
48874
48941
|
[DIRECTORY]() {
|
|
48875
|
-
if (this.path.
|
|
48942
|
+
if (this.path.slice(-1) !== "/") {
|
|
48876
48943
|
this.path += "/";
|
|
48944
|
+
}
|
|
48877
48945
|
this.stat.size = 0;
|
|
48878
48946
|
this[HEADER]();
|
|
48879
48947
|
this.end();
|
|
48880
48948
|
}
|
|
48881
48949
|
[SYMLINK]() {
|
|
48882
48950
|
fs4.readlink(this.absolute, (er, linkpath) => {
|
|
48883
|
-
if (er)
|
|
48951
|
+
if (er) {
|
|
48884
48952
|
return this.emit("error", er);
|
|
48953
|
+
}
|
|
48885
48954
|
this[ONREADLINK](linkpath);
|
|
48886
48955
|
});
|
|
48887
48956
|
}
|
|
@@ -48902,27 +48971,31 @@ var require_write_entry = __commonJSMin((exports, module2) => {
|
|
|
48902
48971
|
const linkKey = this.stat.dev + ":" + this.stat.ino;
|
|
48903
48972
|
if (this.linkCache.has(linkKey)) {
|
|
48904
48973
|
const linkpath = this.linkCache.get(linkKey);
|
|
48905
|
-
if (linkpath.indexOf(this.cwd) === 0)
|
|
48974
|
+
if (linkpath.indexOf(this.cwd) === 0) {
|
|
48906
48975
|
return this[HARDLINK](linkpath);
|
|
48976
|
+
}
|
|
48907
48977
|
}
|
|
48908
48978
|
this.linkCache.set(linkKey, this.absolute);
|
|
48909
48979
|
}
|
|
48910
48980
|
this[HEADER]();
|
|
48911
|
-
if (this.stat.size === 0)
|
|
48981
|
+
if (this.stat.size === 0) {
|
|
48912
48982
|
return this.end();
|
|
48983
|
+
}
|
|
48913
48984
|
this[OPENFILE]();
|
|
48914
48985
|
}
|
|
48915
48986
|
[OPENFILE]() {
|
|
48916
48987
|
fs4.open(this.absolute, "r", (er, fd) => {
|
|
48917
|
-
if (er)
|
|
48988
|
+
if (er) {
|
|
48918
48989
|
return this.emit("error", er);
|
|
48990
|
+
}
|
|
48919
48991
|
this[ONOPENFILE](fd);
|
|
48920
48992
|
});
|
|
48921
48993
|
}
|
|
48922
48994
|
[ONOPENFILE](fd) {
|
|
48923
48995
|
this.fd = fd;
|
|
48924
|
-
if (this[HAD_ERROR])
|
|
48996
|
+
if (this[HAD_ERROR]) {
|
|
48925
48997
|
return this[CLOSE]();
|
|
48998
|
+
}
|
|
48926
48999
|
this.blockLen = 512 * Math.ceil(this.stat.size / 512);
|
|
48927
49000
|
this.blockRemain = this.blockLen;
|
|
48928
49001
|
const bufLen = Math.min(this.blockLen, this.maxReadSize);
|
|
@@ -48969,10 +49042,11 @@ var require_write_entry = __commonJSMin((exports, module2) => {
|
|
|
48969
49042
|
}
|
|
48970
49043
|
const writeBuf = this.offset === 0 && bytesRead === this.buf.length ? this.buf : this.buf.slice(this.offset, this.offset + bytesRead);
|
|
48971
49044
|
const flushed = this.write(writeBuf);
|
|
48972
|
-
if (!flushed)
|
|
49045
|
+
if (!flushed) {
|
|
48973
49046
|
this[AWAITDRAIN](() => this[ONDRAIN]());
|
|
48974
|
-
else
|
|
49047
|
+
} else {
|
|
48975
49048
|
this[ONDRAIN]();
|
|
49049
|
+
}
|
|
48976
49050
|
}
|
|
48977
49051
|
[AWAITDRAIN](cb) {
|
|
48978
49052
|
this.once("drain", cb);
|
|
@@ -48991,8 +49065,9 @@ var require_write_entry = __commonJSMin((exports, module2) => {
|
|
|
48991
49065
|
}
|
|
48992
49066
|
[ONDRAIN]() {
|
|
48993
49067
|
if (!this.remain) {
|
|
48994
|
-
if (this.blockRemain)
|
|
49068
|
+
if (this.blockRemain) {
|
|
48995
49069
|
super.write(Buffer.alloc(this.blockRemain));
|
|
49070
|
+
}
|
|
48996
49071
|
return this[CLOSE]((er) => er ? this.emit("error", er) : this.end());
|
|
48997
49072
|
}
|
|
48998
49073
|
if (this.offset >= this.length) {
|
|
@@ -49049,8 +49124,9 @@ var require_write_entry = __commonJSMin((exports, module2) => {
|
|
|
49049
49124
|
this.noMtime = !!opt.noMtime;
|
|
49050
49125
|
this.readEntry = readEntry;
|
|
49051
49126
|
this.type = readEntry.type;
|
|
49052
|
-
if (this.type === "Directory" && this.portable)
|
|
49127
|
+
if (this.type === "Directory" && this.portable) {
|
|
49053
49128
|
this.noMtime = true;
|
|
49129
|
+
}
|
|
49054
49130
|
this.prefix = opt.prefix || null;
|
|
49055
49131
|
this.path = normPath(readEntry.path);
|
|
49056
49132
|
this.mode = this[MODE](readEntry.mode);
|
|
@@ -49063,8 +49139,9 @@ var require_write_entry = __commonJSMin((exports, module2) => {
|
|
|
49063
49139
|
this.atime = this.portable ? null : readEntry.atime;
|
|
49064
49140
|
this.ctime = this.portable ? null : readEntry.ctime;
|
|
49065
49141
|
this.linkpath = normPath(readEntry.linkpath);
|
|
49066
|
-
if (typeof opt.onwarn === "function")
|
|
49142
|
+
if (typeof opt.onwarn === "function") {
|
|
49067
49143
|
this.on("warn", opt.onwarn);
|
|
49144
|
+
}
|
|
49068
49145
|
let pathWarn = false;
|
|
49069
49146
|
if (!this.preservePaths) {
|
|
49070
49147
|
const [root, stripped] = stripAbsolutePath(this.path);
|
|
@@ -49121,14 +49198,16 @@ var require_write_entry = __commonJSMin((exports, module2) => {
|
|
|
49121
49198
|
}
|
|
49122
49199
|
write(data) {
|
|
49123
49200
|
const writeLen = data.length;
|
|
49124
|
-
if (writeLen > this.blockRemain)
|
|
49201
|
+
if (writeLen > this.blockRemain) {
|
|
49125
49202
|
throw new Error("writing more to entry than is appropriate");
|
|
49203
|
+
}
|
|
49126
49204
|
this.blockRemain -= writeLen;
|
|
49127
49205
|
return super.write(data);
|
|
49128
49206
|
}
|
|
49129
49207
|
end() {
|
|
49130
|
-
if (this.blockRemain)
|
|
49208
|
+
if (this.blockRemain) {
|
|
49131
49209
|
super.write(Buffer.alloc(this.blockRemain));
|
|
49210
|
+
}
|
|
49132
49211
|
return super.end();
|
|
49133
49212
|
}
|
|
49134
49213
|
});
|
|
@@ -49574,22 +49653,26 @@ var require_pack = __commonJSMin((exports, module2) => {
|
|
|
49574
49653
|
this.statCache = opt.statCache || /* @__PURE__ */ new Map();
|
|
49575
49654
|
this.readdirCache = opt.readdirCache || /* @__PURE__ */ new Map();
|
|
49576
49655
|
this[WRITEENTRYCLASS] = WriteEntry;
|
|
49577
|
-
if (typeof opt.onwarn === "function")
|
|
49656
|
+
if (typeof opt.onwarn === "function") {
|
|
49578
49657
|
this.on("warn", opt.onwarn);
|
|
49658
|
+
}
|
|
49579
49659
|
this.portable = !!opt.portable;
|
|
49580
49660
|
this.zip = null;
|
|
49581
49661
|
if (opt.gzip) {
|
|
49582
|
-
if (typeof opt.gzip !== "object")
|
|
49662
|
+
if (typeof opt.gzip !== "object") {
|
|
49583
49663
|
opt.gzip = {};
|
|
49584
|
-
|
|
49664
|
+
}
|
|
49665
|
+
if (this.portable) {
|
|
49585
49666
|
opt.gzip.portable = true;
|
|
49667
|
+
}
|
|
49586
49668
|
this.zip = new zlib.Gzip(opt.gzip);
|
|
49587
49669
|
this.zip.on("data", (chunk) => super.write(chunk));
|
|
49588
49670
|
this.zip.on("end", (_) => super.end());
|
|
49589
49671
|
this.zip.on("drain", (_) => this[ONDRAIN]());
|
|
49590
49672
|
this.on("resume", (_) => this.zip.resume());
|
|
49591
|
-
} else
|
|
49673
|
+
} else {
|
|
49592
49674
|
this.on("drain", this[ONDRAIN]);
|
|
49675
|
+
}
|
|
49593
49676
|
this.noDirRecurse = !!opt.noDirRecurse;
|
|
49594
49677
|
this.follow = !!opt.follow;
|
|
49595
49678
|
this.noMtime = !!opt.noMtime;
|
|
@@ -49609,26 +49692,29 @@ var require_pack = __commonJSMin((exports, module2) => {
|
|
|
49609
49692
|
return this;
|
|
49610
49693
|
}
|
|
49611
49694
|
end(path7) {
|
|
49612
|
-
if (path7)
|
|
49695
|
+
if (path7) {
|
|
49613
49696
|
this.write(path7);
|
|
49697
|
+
}
|
|
49614
49698
|
this[ENDED] = true;
|
|
49615
49699
|
this[PROCESS]();
|
|
49616
49700
|
return this;
|
|
49617
49701
|
}
|
|
49618
49702
|
write(path7) {
|
|
49619
|
-
if (this[ENDED])
|
|
49703
|
+
if (this[ENDED]) {
|
|
49620
49704
|
throw new Error("write after end");
|
|
49621
|
-
|
|
49705
|
+
}
|
|
49706
|
+
if (path7 instanceof ReadEntry) {
|
|
49622
49707
|
this[ADDTARENTRY](path7);
|
|
49623
|
-
else
|
|
49708
|
+
} else {
|
|
49624
49709
|
this[ADDFSENTRY](path7);
|
|
49710
|
+
}
|
|
49625
49711
|
return this.flowing;
|
|
49626
49712
|
}
|
|
49627
49713
|
[ADDTARENTRY](p) {
|
|
49628
49714
|
const absolute = normPath(path6.resolve(this.cwd, p.path));
|
|
49629
|
-
if (!this.filter(p.path, p))
|
|
49715
|
+
if (!this.filter(p.path, p)) {
|
|
49630
49716
|
p.resume();
|
|
49631
|
-
else {
|
|
49717
|
+
} else {
|
|
49632
49718
|
const job = new PackJob(p.path, absolute, false);
|
|
49633
49719
|
job.entry = new WriteEntryTar(p, this[ENTRYOPT](job));
|
|
49634
49720
|
job.entry.on("end", (_) => this[JOBDONE](job));
|
|
@@ -49649,17 +49735,19 @@ var require_pack = __commonJSMin((exports, module2) => {
|
|
|
49649
49735
|
fs4[stat](job.absolute, (er, stat2) => {
|
|
49650
49736
|
job.pending = false;
|
|
49651
49737
|
this[JOBS] -= 1;
|
|
49652
|
-
if (er)
|
|
49738
|
+
if (er) {
|
|
49653
49739
|
this.emit("error", er);
|
|
49654
|
-
else
|
|
49740
|
+
} else {
|
|
49655
49741
|
this[ONSTAT](job, stat2);
|
|
49742
|
+
}
|
|
49656
49743
|
});
|
|
49657
49744
|
}
|
|
49658
49745
|
[ONSTAT](job, stat) {
|
|
49659
49746
|
this.statCache.set(job.absolute, stat);
|
|
49660
49747
|
job.stat = stat;
|
|
49661
|
-
if (!this.filter(job.path, stat))
|
|
49748
|
+
if (!this.filter(job.path, stat)) {
|
|
49662
49749
|
job.ignore = true;
|
|
49750
|
+
}
|
|
49663
49751
|
this[PROCESS]();
|
|
49664
49752
|
}
|
|
49665
49753
|
[READDIR](job) {
|
|
@@ -49668,8 +49756,9 @@ var require_pack = __commonJSMin((exports, module2) => {
|
|
|
49668
49756
|
fs4.readdir(job.absolute, (er, entries) => {
|
|
49669
49757
|
job.pending = false;
|
|
49670
49758
|
this[JOBS] -= 1;
|
|
49671
|
-
if (er)
|
|
49759
|
+
if (er) {
|
|
49672
49760
|
return this.emit("error", er);
|
|
49761
|
+
}
|
|
49673
49762
|
this[ONREADDIR](job, entries);
|
|
49674
49763
|
});
|
|
49675
49764
|
}
|
|
@@ -49679,8 +49768,9 @@ var require_pack = __commonJSMin((exports, module2) => {
|
|
|
49679
49768
|
this[PROCESS]();
|
|
49680
49769
|
}
|
|
49681
49770
|
[PROCESS]() {
|
|
49682
|
-
if (this[PROCESSING])
|
|
49771
|
+
if (this[PROCESSING]) {
|
|
49683
49772
|
return;
|
|
49773
|
+
}
|
|
49684
49774
|
this[PROCESSING] = true;
|
|
49685
49775
|
for (let w = this[QUEUE].head; w !== null && this[JOBS] < this.jobs; w = w.next) {
|
|
49686
49776
|
this[PROCESSJOB](w.value);
|
|
@@ -49692,9 +49782,9 @@ var require_pack = __commonJSMin((exports, module2) => {
|
|
|
49692
49782
|
}
|
|
49693
49783
|
this[PROCESSING] = false;
|
|
49694
49784
|
if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) {
|
|
49695
|
-
if (this.zip)
|
|
49785
|
+
if (this.zip) {
|
|
49696
49786
|
this.zip.end(EOF);
|
|
49697
|
-
else {
|
|
49787
|
+
} else {
|
|
49698
49788
|
super.write(EOF);
|
|
49699
49789
|
super.end();
|
|
49700
49790
|
}
|
|
@@ -49709,38 +49799,46 @@ var require_pack = __commonJSMin((exports, module2) => {
|
|
|
49709
49799
|
this[PROCESS]();
|
|
49710
49800
|
}
|
|
49711
49801
|
[PROCESSJOB](job) {
|
|
49712
|
-
if (job.pending)
|
|
49802
|
+
if (job.pending) {
|
|
49713
49803
|
return;
|
|
49804
|
+
}
|
|
49714
49805
|
if (job.entry) {
|
|
49715
|
-
if (job === this[CURRENT] && !job.piped)
|
|
49806
|
+
if (job === this[CURRENT] && !job.piped) {
|
|
49716
49807
|
this[PIPE](job);
|
|
49808
|
+
}
|
|
49717
49809
|
return;
|
|
49718
49810
|
}
|
|
49719
49811
|
if (!job.stat) {
|
|
49720
|
-
if (this.statCache.has(job.absolute))
|
|
49812
|
+
if (this.statCache.has(job.absolute)) {
|
|
49721
49813
|
this[ONSTAT](job, this.statCache.get(job.absolute));
|
|
49722
|
-
else
|
|
49814
|
+
} else {
|
|
49723
49815
|
this[STAT](job);
|
|
49816
|
+
}
|
|
49724
49817
|
}
|
|
49725
|
-
if (!job.stat)
|
|
49818
|
+
if (!job.stat) {
|
|
49726
49819
|
return;
|
|
49727
|
-
|
|
49820
|
+
}
|
|
49821
|
+
if (job.ignore) {
|
|
49728
49822
|
return;
|
|
49823
|
+
}
|
|
49729
49824
|
if (!this.noDirRecurse && job.stat.isDirectory() && !job.readdir) {
|
|
49730
|
-
if (this.readdirCache.has(job.absolute))
|
|
49825
|
+
if (this.readdirCache.has(job.absolute)) {
|
|
49731
49826
|
this[ONREADDIR](job, this.readdirCache.get(job.absolute));
|
|
49732
|
-
else
|
|
49827
|
+
} else {
|
|
49733
49828
|
this[READDIR](job);
|
|
49734
|
-
|
|
49829
|
+
}
|
|
49830
|
+
if (!job.readdir) {
|
|
49735
49831
|
return;
|
|
49832
|
+
}
|
|
49736
49833
|
}
|
|
49737
49834
|
job.entry = this[ENTRY](job);
|
|
49738
49835
|
if (!job.entry) {
|
|
49739
49836
|
job.ignore = true;
|
|
49740
49837
|
return;
|
|
49741
49838
|
}
|
|
49742
|
-
if (job === this[CURRENT] && !job.piped)
|
|
49839
|
+
if (job === this[CURRENT] && !job.piped) {
|
|
49743
49840
|
this[PIPE](job);
|
|
49841
|
+
}
|
|
49744
49842
|
}
|
|
49745
49843
|
[ENTRYOPT](job) {
|
|
49746
49844
|
return {
|
|
@@ -49768,8 +49866,9 @@ var require_pack = __commonJSMin((exports, module2) => {
|
|
|
49768
49866
|
}
|
|
49769
49867
|
}
|
|
49770
49868
|
[ONDRAIN]() {
|
|
49771
|
-
if (this[CURRENT] && this[CURRENT].entry)
|
|
49869
|
+
if (this[CURRENT] && this[CURRENT].entry) {
|
|
49772
49870
|
this[CURRENT].entry.resume();
|
|
49871
|
+
}
|
|
49773
49872
|
}
|
|
49774
49873
|
[PIPE](job) {
|
|
49775
49874
|
job.piped = true;
|
|
@@ -49784,19 +49883,22 @@ var require_pack = __commonJSMin((exports, module2) => {
|
|
|
49784
49883
|
const zip = this.zip;
|
|
49785
49884
|
if (zip) {
|
|
49786
49885
|
source.on("data", (chunk) => {
|
|
49787
|
-
if (!zip.write(chunk))
|
|
49886
|
+
if (!zip.write(chunk)) {
|
|
49788
49887
|
source.pause();
|
|
49888
|
+
}
|
|
49789
49889
|
});
|
|
49790
49890
|
} else {
|
|
49791
49891
|
source.on("data", (chunk) => {
|
|
49792
|
-
if (!super.write(chunk))
|
|
49892
|
+
if (!super.write(chunk)) {
|
|
49793
49893
|
source.pause();
|
|
49894
|
+
}
|
|
49794
49895
|
});
|
|
49795
49896
|
}
|
|
49796
49897
|
}
|
|
49797
49898
|
pause() {
|
|
49798
|
-
if (this.zip)
|
|
49899
|
+
if (this.zip) {
|
|
49799
49900
|
this.zip.pause();
|
|
49901
|
+
}
|
|
49800
49902
|
return super.pause();
|
|
49801
49903
|
}
|
|
49802
49904
|
});
|
|
@@ -50208,6 +50310,7 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50208
50310
|
var Entry = require_read_entry();
|
|
50209
50311
|
var Pax = require_pax();
|
|
50210
50312
|
var zlib = require_minizlib();
|
|
50313
|
+
var { nextTick } = __require("process");
|
|
50211
50314
|
var gzipHeader = Buffer.from([31, 139]);
|
|
50212
50315
|
var STATE = Symbol("state");
|
|
50213
50316
|
var WRITEENTRY = Symbol("writeEntry");
|
|
@@ -50238,6 +50341,7 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50238
50341
|
var SAW_VALID_ENTRY = Symbol("sawValidEntry");
|
|
50239
50342
|
var SAW_NULL_BLOCK = Symbol("sawNullBlock");
|
|
50240
50343
|
var SAW_EOF = Symbol("sawEOF");
|
|
50344
|
+
var CLOSESTREAM = Symbol("closeStream");
|
|
50241
50345
|
var noop = (_) => true;
|
|
50242
50346
|
module2.exports = warner(class Parser extends EE {
|
|
50243
50347
|
constructor(opt) {
|
|
@@ -50250,14 +50354,13 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50250
50354
|
this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
50251
50355
|
}
|
|
50252
50356
|
});
|
|
50253
|
-
if (opt.ondone)
|
|
50357
|
+
if (opt.ondone) {
|
|
50254
50358
|
this.on(DONE, opt.ondone);
|
|
50255
|
-
else {
|
|
50359
|
+
} else {
|
|
50256
50360
|
this.on(DONE, (_) => {
|
|
50257
50361
|
this.emit("prefinish");
|
|
50258
50362
|
this.emit("finish");
|
|
50259
50363
|
this.emit("end");
|
|
50260
|
-
this.emit("close");
|
|
50261
50364
|
});
|
|
50262
50365
|
}
|
|
50263
50366
|
this.strict = !!opt.strict;
|
|
@@ -50278,14 +50381,18 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50278
50381
|
this[ABORTED] = false;
|
|
50279
50382
|
this[SAW_NULL_BLOCK] = false;
|
|
50280
50383
|
this[SAW_EOF] = false;
|
|
50281
|
-
|
|
50384
|
+
this.on("end", () => this[CLOSESTREAM]());
|
|
50385
|
+
if (typeof opt.onwarn === "function") {
|
|
50282
50386
|
this.on("warn", opt.onwarn);
|
|
50283
|
-
|
|
50387
|
+
}
|
|
50388
|
+
if (typeof opt.onentry === "function") {
|
|
50284
50389
|
this.on("entry", opt.onentry);
|
|
50390
|
+
}
|
|
50285
50391
|
}
|
|
50286
50392
|
[CONSUMEHEADER](chunk, position) {
|
|
50287
|
-
if (this[SAW_VALID_ENTRY] === null)
|
|
50393
|
+
if (this[SAW_VALID_ENTRY] === null) {
|
|
50288
50394
|
this[SAW_VALID_ENTRY] = false;
|
|
50395
|
+
}
|
|
50289
50396
|
let header;
|
|
50290
50397
|
try {
|
|
50291
50398
|
header = new Header(chunk, position, this[EX], this[GEX]);
|
|
@@ -50295,8 +50402,9 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50295
50402
|
if (header.nullBlock) {
|
|
50296
50403
|
if (this[SAW_NULL_BLOCK]) {
|
|
50297
50404
|
this[SAW_EOF] = true;
|
|
50298
|
-
if (this[STATE] === "begin")
|
|
50405
|
+
if (this[STATE] === "begin") {
|
|
50299
50406
|
this[STATE] = "header";
|
|
50407
|
+
}
|
|
50300
50408
|
this[EMIT]("eof");
|
|
50301
50409
|
} else {
|
|
50302
50410
|
this[SAW_NULL_BLOCK] = true;
|
|
@@ -50304,27 +50412,29 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50304
50412
|
}
|
|
50305
50413
|
} else {
|
|
50306
50414
|
this[SAW_NULL_BLOCK] = false;
|
|
50307
|
-
if (!header.cksumValid)
|
|
50415
|
+
if (!header.cksumValid) {
|
|
50308
50416
|
this.warn("TAR_ENTRY_INVALID", "checksum failure", { header });
|
|
50309
|
-
else if (!header.path)
|
|
50417
|
+
} else if (!header.path) {
|
|
50310
50418
|
this.warn("TAR_ENTRY_INVALID", "path is required", { header });
|
|
50311
|
-
else {
|
|
50419
|
+
} else {
|
|
50312
50420
|
const type = header.type;
|
|
50313
|
-
if (/^(Symbolic)?Link$/.test(type) && !header.linkpath)
|
|
50421
|
+
if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) {
|
|
50314
50422
|
this.warn("TAR_ENTRY_INVALID", "linkpath required", { header });
|
|
50315
|
-
else if (!/^(Symbolic)?Link$/.test(type) && header.linkpath)
|
|
50423
|
+
} else if (!/^(Symbolic)?Link$/.test(type) && header.linkpath) {
|
|
50316
50424
|
this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header });
|
|
50317
|
-
else {
|
|
50425
|
+
} else {
|
|
50318
50426
|
const entry = this[WRITEENTRY] = new Entry(header, this[EX], this[GEX]);
|
|
50319
50427
|
if (!this[SAW_VALID_ENTRY]) {
|
|
50320
50428
|
if (entry.remain) {
|
|
50321
50429
|
const onend = () => {
|
|
50322
|
-
if (!entry.invalid)
|
|
50430
|
+
if (!entry.invalid) {
|
|
50323
50431
|
this[SAW_VALID_ENTRY] = true;
|
|
50432
|
+
}
|
|
50324
50433
|
};
|
|
50325
50434
|
entry.on("end", onend);
|
|
50326
|
-
} else
|
|
50435
|
+
} else {
|
|
50327
50436
|
this[SAW_VALID_ENTRY] = true;
|
|
50437
|
+
}
|
|
50328
50438
|
}
|
|
50329
50439
|
if (entry.meta) {
|
|
50330
50440
|
if (entry.size > this.maxMetaEntrySize) {
|
|
@@ -50345,31 +50455,35 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50345
50455
|
this[STATE] = entry.remain ? "ignore" : "header";
|
|
50346
50456
|
entry.resume();
|
|
50347
50457
|
} else {
|
|
50348
|
-
if (entry.remain)
|
|
50458
|
+
if (entry.remain) {
|
|
50349
50459
|
this[STATE] = "body";
|
|
50350
|
-
else {
|
|
50460
|
+
} else {
|
|
50351
50461
|
this[STATE] = "header";
|
|
50352
50462
|
entry.end();
|
|
50353
50463
|
}
|
|
50354
50464
|
if (!this[READENTRY]) {
|
|
50355
50465
|
this[QUEUE].push(entry);
|
|
50356
50466
|
this[NEXTENTRY]();
|
|
50357
|
-
} else
|
|
50467
|
+
} else {
|
|
50358
50468
|
this[QUEUE].push(entry);
|
|
50469
|
+
}
|
|
50359
50470
|
}
|
|
50360
50471
|
}
|
|
50361
50472
|
}
|
|
50362
50473
|
}
|
|
50363
50474
|
}
|
|
50364
50475
|
}
|
|
50476
|
+
[CLOSESTREAM]() {
|
|
50477
|
+
nextTick(() => this.emit("close"));
|
|
50478
|
+
}
|
|
50365
50479
|
[PROCESSENTRY](entry) {
|
|
50366
50480
|
let go = true;
|
|
50367
50481
|
if (!entry) {
|
|
50368
50482
|
this[READENTRY] = null;
|
|
50369
50483
|
go = false;
|
|
50370
|
-
} else if (Array.isArray(entry))
|
|
50484
|
+
} else if (Array.isArray(entry)) {
|
|
50371
50485
|
this.emit.apply(this, entry);
|
|
50372
|
-
else {
|
|
50486
|
+
} else {
|
|
50373
50487
|
this[READENTRY] = entry;
|
|
50374
50488
|
this.emit("entry", entry);
|
|
50375
50489
|
if (!entry.emittedEnd) {
|
|
@@ -50386,10 +50500,12 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50386
50500
|
const re = this[READENTRY];
|
|
50387
50501
|
const drainNow = !re || re.flowing || re.size === re.remain;
|
|
50388
50502
|
if (drainNow) {
|
|
50389
|
-
if (!this[WRITING])
|
|
50503
|
+
if (!this[WRITING]) {
|
|
50390
50504
|
this.emit("drain");
|
|
50391
|
-
|
|
50505
|
+
}
|
|
50506
|
+
} else {
|
|
50392
50507
|
re.once("drain", (_) => this.emit("drain"));
|
|
50508
|
+
}
|
|
50393
50509
|
}
|
|
50394
50510
|
}
|
|
50395
50511
|
[CONSUMEBODY](chunk, position) {
|
|
@@ -50407,15 +50523,17 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50407
50523
|
[CONSUMEMETA](chunk, position) {
|
|
50408
50524
|
const entry = this[WRITEENTRY];
|
|
50409
50525
|
const ret = this[CONSUMEBODY](chunk, position);
|
|
50410
|
-
if (!this[WRITEENTRY])
|
|
50526
|
+
if (!this[WRITEENTRY]) {
|
|
50411
50527
|
this[EMITMETA](entry);
|
|
50528
|
+
}
|
|
50412
50529
|
return ret;
|
|
50413
50530
|
}
|
|
50414
50531
|
[EMIT](ev, data, extra) {
|
|
50415
|
-
if (!this[QUEUE].length && !this[READENTRY])
|
|
50532
|
+
if (!this[QUEUE].length && !this[READENTRY]) {
|
|
50416
50533
|
this.emit(ev, data, extra);
|
|
50417
|
-
else
|
|
50534
|
+
} else {
|
|
50418
50535
|
this[QUEUE].push([ev, data, extra]);
|
|
50536
|
+
}
|
|
50419
50537
|
}
|
|
50420
50538
|
[EMITMETA](entry) {
|
|
50421
50539
|
this[EMIT]("meta", this[META]);
|
|
@@ -50446,8 +50564,9 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50446
50564
|
this.warn("TAR_ABORT", error, { recoverable: false });
|
|
50447
50565
|
}
|
|
50448
50566
|
write(chunk) {
|
|
50449
|
-
if (this[ABORTED])
|
|
50567
|
+
if (this[ABORTED]) {
|
|
50450
50568
|
return;
|
|
50569
|
+
}
|
|
50451
50570
|
if (this[UNZIP] === null && chunk) {
|
|
50452
50571
|
if (this[BUFFER]) {
|
|
50453
50572
|
chunk = Buffer.concat([this[BUFFER], chunk]);
|
|
@@ -50458,8 +50577,9 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50458
50577
|
return true;
|
|
50459
50578
|
}
|
|
50460
50579
|
for (let i = 0; this[UNZIP] === null && i < gzipHeader.length; i++) {
|
|
50461
|
-
if (chunk[i] !== gzipHeader[i])
|
|
50580
|
+
if (chunk[i] !== gzipHeader[i]) {
|
|
50462
50581
|
this[UNZIP] = false;
|
|
50582
|
+
}
|
|
50463
50583
|
}
|
|
50464
50584
|
if (this[UNZIP] === null) {
|
|
50465
50585
|
const ended = this[ENDED];
|
|
@@ -50478,19 +50598,22 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50478
50598
|
}
|
|
50479
50599
|
}
|
|
50480
50600
|
this[WRITING] = true;
|
|
50481
|
-
if (this[UNZIP])
|
|
50601
|
+
if (this[UNZIP]) {
|
|
50482
50602
|
this[UNZIP].write(chunk);
|
|
50483
|
-
else
|
|
50603
|
+
} else {
|
|
50484
50604
|
this[CONSUMECHUNK](chunk);
|
|
50605
|
+
}
|
|
50485
50606
|
this[WRITING] = false;
|
|
50486
50607
|
const ret = this[QUEUE].length ? false : this[READENTRY] ? this[READENTRY].flowing : true;
|
|
50487
|
-
if (!ret && !this[QUEUE].length)
|
|
50608
|
+
if (!ret && !this[QUEUE].length) {
|
|
50488
50609
|
this[READENTRY].once("drain", (_) => this.emit("drain"));
|
|
50610
|
+
}
|
|
50489
50611
|
return ret;
|
|
50490
50612
|
}
|
|
50491
50613
|
[BUFFERCONCAT](c) {
|
|
50492
|
-
if (c && !this[ABORTED])
|
|
50614
|
+
if (c && !this[ABORTED]) {
|
|
50493
50615
|
this[BUFFER] = this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c;
|
|
50616
|
+
}
|
|
50494
50617
|
}
|
|
50495
50618
|
[MAYBEEND]() {
|
|
50496
50619
|
if (this[ENDED] && !this[EMITTEDEND] && !this[ABORTED] && !this[CONSUMING]) {
|
|
@@ -50499,27 +50622,29 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50499
50622
|
if (entry && entry.blockRemain) {
|
|
50500
50623
|
const have = this[BUFFER] ? this[BUFFER].length : 0;
|
|
50501
50624
|
this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`, { entry });
|
|
50502
|
-
if (this[BUFFER])
|
|
50625
|
+
if (this[BUFFER]) {
|
|
50503
50626
|
entry.write(this[BUFFER]);
|
|
50627
|
+
}
|
|
50504
50628
|
entry.end();
|
|
50505
50629
|
}
|
|
50506
50630
|
this[EMIT](DONE);
|
|
50507
50631
|
}
|
|
50508
50632
|
}
|
|
50509
50633
|
[CONSUMECHUNK](chunk) {
|
|
50510
|
-
if (this[CONSUMING])
|
|
50634
|
+
if (this[CONSUMING]) {
|
|
50511
50635
|
this[BUFFERCONCAT](chunk);
|
|
50512
|
-
else if (!chunk && !this[BUFFER])
|
|
50636
|
+
} else if (!chunk && !this[BUFFER]) {
|
|
50513
50637
|
this[MAYBEEND]();
|
|
50514
|
-
else {
|
|
50638
|
+
} else {
|
|
50515
50639
|
this[CONSUMING] = true;
|
|
50516
50640
|
if (this[BUFFER]) {
|
|
50517
50641
|
this[BUFFERCONCAT](chunk);
|
|
50518
50642
|
const c = this[BUFFER];
|
|
50519
50643
|
this[BUFFER] = null;
|
|
50520
50644
|
this[CONSUMECHUNKSUB](c);
|
|
50521
|
-
} else
|
|
50645
|
+
} else {
|
|
50522
50646
|
this[CONSUMECHUNKSUB](chunk);
|
|
50647
|
+
}
|
|
50523
50648
|
while (this[BUFFER] && this[BUFFER].length >= 512 && !this[ABORTED] && !this[SAW_EOF]) {
|
|
50524
50649
|
const c = this[BUFFER];
|
|
50525
50650
|
this[BUFFER] = null;
|
|
@@ -50527,8 +50652,9 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50527
50652
|
}
|
|
50528
50653
|
this[CONSUMING] = false;
|
|
50529
50654
|
}
|
|
50530
|
-
if (!this[BUFFER] || this[ENDED])
|
|
50655
|
+
if (!this[BUFFER] || this[ENDED]) {
|
|
50531
50656
|
this[MAYBEEND]();
|
|
50657
|
+
}
|
|
50532
50658
|
}
|
|
50533
50659
|
[CONSUMECHUNKSUB](chunk) {
|
|
50534
50660
|
let position = 0;
|
|
@@ -50552,17 +50678,18 @@ var require_parse2 = __commonJSMin((exports, module2) => {
|
|
|
50552
50678
|
}
|
|
50553
50679
|
}
|
|
50554
50680
|
if (position < length) {
|
|
50555
|
-
if (this[BUFFER])
|
|
50681
|
+
if (this[BUFFER]) {
|
|
50556
50682
|
this[BUFFER] = Buffer.concat([chunk.slice(position), this[BUFFER]]);
|
|
50557
|
-
else
|
|
50683
|
+
} else {
|
|
50558
50684
|
this[BUFFER] = chunk.slice(position);
|
|
50685
|
+
}
|
|
50559
50686
|
}
|
|
50560
50687
|
}
|
|
50561
50688
|
end(chunk) {
|
|
50562
50689
|
if (!this[ABORTED]) {
|
|
50563
|
-
if (this[UNZIP])
|
|
50690
|
+
if (this[UNZIP]) {
|
|
50564
50691
|
this[UNZIP].end(chunk);
|
|
50565
|
-
else {
|
|
50692
|
+
} else {
|
|
50566
50693
|
this[ENDED] = true;
|
|
50567
50694
|
this.write(chunk);
|
|
50568
50695
|
}
|
|
@@ -50579,25 +50706,32 @@ var require_list = __commonJSMin((exports, module2) => {
|
|
|
50579
50706
|
var path6 = __require("path");
|
|
50580
50707
|
var stripSlash = require_strip_trailing_slashes();
|
|
50581
50708
|
module2.exports = (opt_, files, cb) => {
|
|
50582
|
-
if (typeof opt_ === "function")
|
|
50709
|
+
if (typeof opt_ === "function") {
|
|
50583
50710
|
cb = opt_, files = null, opt_ = {};
|
|
50584
|
-
else if (Array.isArray(opt_))
|
|
50711
|
+
} else if (Array.isArray(opt_)) {
|
|
50585
50712
|
files = opt_, opt_ = {};
|
|
50586
|
-
|
|
50713
|
+
}
|
|
50714
|
+
if (typeof files === "function") {
|
|
50587
50715
|
cb = files, files = null;
|
|
50588
|
-
|
|
50716
|
+
}
|
|
50717
|
+
if (!files) {
|
|
50589
50718
|
files = [];
|
|
50590
|
-
else
|
|
50719
|
+
} else {
|
|
50591
50720
|
files = Array.from(files);
|
|
50721
|
+
}
|
|
50592
50722
|
const opt = hlo(opt_);
|
|
50593
|
-
if (opt.sync && typeof cb === "function")
|
|
50723
|
+
if (opt.sync && typeof cb === "function") {
|
|
50594
50724
|
throw new TypeError("callback not supported for sync tar functions");
|
|
50595
|
-
|
|
50725
|
+
}
|
|
50726
|
+
if (!opt.file && typeof cb === "function") {
|
|
50596
50727
|
throw new TypeError("callback only supported with file option");
|
|
50597
|
-
|
|
50728
|
+
}
|
|
50729
|
+
if (files.length) {
|
|
50598
50730
|
filesFilter(opt, files);
|
|
50599
|
-
|
|
50731
|
+
}
|
|
50732
|
+
if (!opt.noResume) {
|
|
50600
50733
|
onentryFunction(opt);
|
|
50734
|
+
}
|
|
50601
50735
|
return opt.file && opt.sync ? listFileSync(opt) : opt.file ? listFile(opt, cb) : list(opt);
|
|
50602
50736
|
};
|
|
50603
50737
|
var onentryFunction = (opt) => {
|
|
@@ -50626,9 +50760,9 @@ var require_list = __commonJSMin((exports, module2) => {
|
|
|
50626
50760
|
try {
|
|
50627
50761
|
const stat = fs4.statSync(file);
|
|
50628
50762
|
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
|
|
50629
|
-
if (stat.size < readSize)
|
|
50763
|
+
if (stat.size < readSize) {
|
|
50630
50764
|
p.end(fs4.readFileSync(file));
|
|
50631
|
-
else {
|
|
50765
|
+
} else {
|
|
50632
50766
|
let pos = 0;
|
|
50633
50767
|
const buf = Buffer.allocUnsafe(readSize);
|
|
50634
50768
|
fd = fs4.openSync(file, "r");
|
|
@@ -50657,9 +50791,9 @@ var require_list = __commonJSMin((exports, module2) => {
|
|
|
50657
50791
|
parse2.on("error", reject);
|
|
50658
50792
|
parse2.on("end", resolve);
|
|
50659
50793
|
fs4.stat(file, (er, stat) => {
|
|
50660
|
-
if (er)
|
|
50794
|
+
if (er) {
|
|
50661
50795
|
reject(er);
|
|
50662
|
-
else {
|
|
50796
|
+
} else {
|
|
50663
50797
|
const stream = new fsm.ReadStream(file, {
|
|
50664
50798
|
readSize,
|
|
50665
50799
|
size: stat.size
|
|
@@ -50681,18 +50815,23 @@ var require_create = __commonJSMin((exports, module2) => {
|
|
|
50681
50815
|
var t = require_list();
|
|
50682
50816
|
var path6 = __require("path");
|
|
50683
50817
|
module2.exports = (opt_, files, cb) => {
|
|
50684
|
-
if (typeof files === "function")
|
|
50818
|
+
if (typeof files === "function") {
|
|
50685
50819
|
cb = files;
|
|
50686
|
-
|
|
50820
|
+
}
|
|
50821
|
+
if (Array.isArray(opt_)) {
|
|
50687
50822
|
files = opt_, opt_ = {};
|
|
50688
|
-
|
|
50823
|
+
}
|
|
50824
|
+
if (!files || !Array.isArray(files) || !files.length) {
|
|
50689
50825
|
throw new TypeError("no files or directories specified");
|
|
50826
|
+
}
|
|
50690
50827
|
files = Array.from(files);
|
|
50691
50828
|
const opt = hlo(opt_);
|
|
50692
|
-
if (opt.sync && typeof cb === "function")
|
|
50829
|
+
if (opt.sync && typeof cb === "function") {
|
|
50693
50830
|
throw new TypeError("callback not supported for sync tar functions");
|
|
50694
|
-
|
|
50831
|
+
}
|
|
50832
|
+
if (!opt.file && typeof cb === "function") {
|
|
50695
50833
|
throw new TypeError("callback only supported with file option");
|
|
50834
|
+
}
|
|
50696
50835
|
return opt.file && opt.sync ? createFileSync(opt, files) : opt.file ? createFile(opt, files, cb) : opt.sync ? createSync(opt, files) : create(opt, files);
|
|
50697
50836
|
};
|
|
50698
50837
|
var createFileSync = (opt, files) => {
|
|
@@ -50721,13 +50860,14 @@ var require_create = __commonJSMin((exports, module2) => {
|
|
|
50721
50860
|
files.forEach((file) => {
|
|
50722
50861
|
if (file.charAt(0) === "@") {
|
|
50723
50862
|
t({
|
|
50724
|
-
file: path6.resolve(p.cwd, file.
|
|
50863
|
+
file: path6.resolve(p.cwd, file.slice(1)),
|
|
50725
50864
|
sync: true,
|
|
50726
50865
|
noResume: true,
|
|
50727
50866
|
onentry: (entry) => p.add(entry)
|
|
50728
50867
|
});
|
|
50729
|
-
} else
|
|
50868
|
+
} else {
|
|
50730
50869
|
p.add(file);
|
|
50870
|
+
}
|
|
50731
50871
|
});
|
|
50732
50872
|
p.end();
|
|
50733
50873
|
};
|
|
@@ -50736,12 +50876,13 @@ var require_create = __commonJSMin((exports, module2) => {
|
|
|
50736
50876
|
const file = files.shift();
|
|
50737
50877
|
if (file.charAt(0) === "@") {
|
|
50738
50878
|
return t({
|
|
50739
|
-
file: path6.resolve(p.cwd, file.
|
|
50879
|
+
file: path6.resolve(p.cwd, file.slice(1)),
|
|
50740
50880
|
noResume: true,
|
|
50741
50881
|
onentry: (entry) => p.add(entry)
|
|
50742
50882
|
}).then((_) => addFilesAsync(p, files));
|
|
50743
|
-
} else
|
|
50883
|
+
} else {
|
|
50744
50884
|
p.add(file);
|
|
50885
|
+
}
|
|
50745
50886
|
}
|
|
50746
50887
|
p.end();
|
|
50747
50888
|
};
|
|
@@ -50767,12 +50908,15 @@ var require_replace = __commonJSMin((exports, module2) => {
|
|
|
50767
50908
|
var Header = require_header();
|
|
50768
50909
|
module2.exports = (opt_, files, cb) => {
|
|
50769
50910
|
const opt = hlo(opt_);
|
|
50770
|
-
if (!opt.file)
|
|
50911
|
+
if (!opt.file) {
|
|
50771
50912
|
throw new TypeError("file is required");
|
|
50772
|
-
|
|
50913
|
+
}
|
|
50914
|
+
if (opt.gzip) {
|
|
50773
50915
|
throw new TypeError("cannot append to compressed archives");
|
|
50774
|
-
|
|
50916
|
+
}
|
|
50917
|
+
if (!files || !Array.isArray(files) || !files.length) {
|
|
50775
50918
|
throw new TypeError("no files or directories specified");
|
|
50919
|
+
}
|
|
50776
50920
|
files = Array.from(files);
|
|
50777
50921
|
return opt.sync ? replaceSync(opt, files) : replace2(opt, files, cb);
|
|
50778
50922
|
};
|
|
@@ -50785,10 +50929,11 @@ var require_replace = __commonJSMin((exports, module2) => {
|
|
|
50785
50929
|
try {
|
|
50786
50930
|
fd = fs4.openSync(opt.file, "r+");
|
|
50787
50931
|
} catch (er) {
|
|
50788
|
-
if (er.code === "ENOENT")
|
|
50932
|
+
if (er.code === "ENOENT") {
|
|
50789
50933
|
fd = fs4.openSync(opt.file, "w+");
|
|
50790
|
-
else
|
|
50934
|
+
} else {
|
|
50791
50935
|
throw er;
|
|
50936
|
+
}
|
|
50792
50937
|
}
|
|
50793
50938
|
const st = fs4.fstatSync(fd);
|
|
50794
50939
|
const headBuf = Buffer.alloc(512);
|
|
@@ -50796,20 +50941,25 @@ var require_replace = __commonJSMin((exports, module2) => {
|
|
|
50796
50941
|
for (position = 0; position < st.size; position += 512) {
|
|
50797
50942
|
for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) {
|
|
50798
50943
|
bytes = fs4.readSync(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos);
|
|
50799
|
-
if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139)
|
|
50944
|
+
if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139) {
|
|
50800
50945
|
throw new Error("cannot append to compressed archives");
|
|
50801
|
-
|
|
50946
|
+
}
|
|
50947
|
+
if (!bytes) {
|
|
50802
50948
|
break POSITION;
|
|
50949
|
+
}
|
|
50803
50950
|
}
|
|
50804
50951
|
const h = new Header(headBuf);
|
|
50805
|
-
if (!h.cksumValid)
|
|
50952
|
+
if (!h.cksumValid) {
|
|
50806
50953
|
break;
|
|
50954
|
+
}
|
|
50807
50955
|
const entryBlockSize = 512 * Math.ceil(h.size / 512);
|
|
50808
|
-
if (position + entryBlockSize + 512 > st.size)
|
|
50956
|
+
if (position + entryBlockSize + 512 > st.size) {
|
|
50809
50957
|
break;
|
|
50958
|
+
}
|
|
50810
50959
|
position += entryBlockSize;
|
|
50811
|
-
if (opt.mtimeCache)
|
|
50960
|
+
if (opt.mtimeCache) {
|
|
50812
50961
|
opt.mtimeCache.set(h.path, h.mtime);
|
|
50962
|
+
}
|
|
50813
50963
|
}
|
|
50814
50964
|
threw = false;
|
|
50815
50965
|
streamSync(opt, p, position, fd, files);
|
|
@@ -50835,38 +50985,47 @@ var require_replace = __commonJSMin((exports, module2) => {
|
|
|
50835
50985
|
const p = new Pack(opt);
|
|
50836
50986
|
const getPos = (fd, size, cb_) => {
|
|
50837
50987
|
const cb2 = (er, pos) => {
|
|
50838
|
-
if (er)
|
|
50988
|
+
if (er) {
|
|
50839
50989
|
fs4.close(fd, (_) => cb_(er));
|
|
50840
|
-
else
|
|
50990
|
+
} else {
|
|
50841
50991
|
cb_(null, pos);
|
|
50992
|
+
}
|
|
50842
50993
|
};
|
|
50843
50994
|
let position = 0;
|
|
50844
|
-
if (size === 0)
|
|
50995
|
+
if (size === 0) {
|
|
50845
50996
|
return cb2(null, 0);
|
|
50997
|
+
}
|
|
50846
50998
|
let bufPos = 0;
|
|
50847
50999
|
const headBuf = Buffer.alloc(512);
|
|
50848
51000
|
const onread = (er, bytes) => {
|
|
50849
|
-
if (er)
|
|
51001
|
+
if (er) {
|
|
50850
51002
|
return cb2(er);
|
|
51003
|
+
}
|
|
50851
51004
|
bufPos += bytes;
|
|
50852
51005
|
if (bufPos < 512 && bytes) {
|
|
50853
51006
|
return fs4.read(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos, onread);
|
|
50854
51007
|
}
|
|
50855
|
-
if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139)
|
|
51008
|
+
if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139) {
|
|
50856
51009
|
return cb2(new Error("cannot append to compressed archives"));
|
|
50857
|
-
|
|
51010
|
+
}
|
|
51011
|
+
if (bufPos < 512) {
|
|
50858
51012
|
return cb2(null, position);
|
|
51013
|
+
}
|
|
50859
51014
|
const h = new Header(headBuf);
|
|
50860
|
-
if (!h.cksumValid)
|
|
51015
|
+
if (!h.cksumValid) {
|
|
50861
51016
|
return cb2(null, position);
|
|
51017
|
+
}
|
|
50862
51018
|
const entryBlockSize = 512 * Math.ceil(h.size / 512);
|
|
50863
|
-
if (position + entryBlockSize + 512 > size)
|
|
51019
|
+
if (position + entryBlockSize + 512 > size) {
|
|
50864
51020
|
return cb2(null, position);
|
|
51021
|
+
}
|
|
50865
51022
|
position += entryBlockSize + 512;
|
|
50866
|
-
if (position >= size)
|
|
51023
|
+
if (position >= size) {
|
|
50867
51024
|
return cb2(null, position);
|
|
50868
|
-
|
|
51025
|
+
}
|
|
51026
|
+
if (opt.mtimeCache) {
|
|
50869
51027
|
opt.mtimeCache.set(h.path, h.mtime);
|
|
51028
|
+
}
|
|
50870
51029
|
bufPos = 0;
|
|
50871
51030
|
fs4.read(fd, headBuf, 0, 512, position, onread);
|
|
50872
51031
|
};
|
|
@@ -50880,14 +51039,17 @@ var require_replace = __commonJSMin((exports, module2) => {
|
|
|
50880
51039
|
flag = "w+";
|
|
50881
51040
|
return fs4.open(opt.file, flag, onopen);
|
|
50882
51041
|
}
|
|
50883
|
-
if (er)
|
|
51042
|
+
if (er) {
|
|
50884
51043
|
return reject(er);
|
|
51044
|
+
}
|
|
50885
51045
|
fs4.fstat(fd, (er2, st) => {
|
|
50886
|
-
if (er2)
|
|
51046
|
+
if (er2) {
|
|
50887
51047
|
return fs4.close(fd, () => reject(er2));
|
|
51048
|
+
}
|
|
50888
51049
|
getPos(fd, st.size, (er3, position) => {
|
|
50889
|
-
if (er3)
|
|
51050
|
+
if (er3) {
|
|
50890
51051
|
return reject(er3);
|
|
51052
|
+
}
|
|
50891
51053
|
const stream = new fsm.WriteStream(opt.file, {
|
|
50892
51054
|
fd,
|
|
50893
51055
|
start: position
|
|
@@ -50907,13 +51069,14 @@ var require_replace = __commonJSMin((exports, module2) => {
|
|
|
50907
51069
|
files.forEach((file) => {
|
|
50908
51070
|
if (file.charAt(0) === "@") {
|
|
50909
51071
|
t({
|
|
50910
|
-
file: path6.resolve(p.cwd, file.
|
|
51072
|
+
file: path6.resolve(p.cwd, file.slice(1)),
|
|
50911
51073
|
sync: true,
|
|
50912
51074
|
noResume: true,
|
|
50913
51075
|
onentry: (entry) => p.add(entry)
|
|
50914
51076
|
});
|
|
50915
|
-
} else
|
|
51077
|
+
} else {
|
|
50916
51078
|
p.add(file);
|
|
51079
|
+
}
|
|
50917
51080
|
});
|
|
50918
51081
|
p.end();
|
|
50919
51082
|
};
|
|
@@ -50922,12 +51085,13 @@ var require_replace = __commonJSMin((exports, module2) => {
|
|
|
50922
51085
|
const file = files.shift();
|
|
50923
51086
|
if (file.charAt(0) === "@") {
|
|
50924
51087
|
return t({
|
|
50925
|
-
file: path6.resolve(p.cwd, file.
|
|
51088
|
+
file: path6.resolve(p.cwd, file.slice(1)),
|
|
50926
51089
|
noResume: true,
|
|
50927
51090
|
onentry: (entry) => p.add(entry)
|
|
50928
51091
|
}).then((_) => addFilesAsync(p, files));
|
|
50929
|
-
} else
|
|
51092
|
+
} else {
|
|
50930
51093
|
p.add(file);
|
|
51094
|
+
}
|
|
50931
51095
|
}
|
|
50932
51096
|
p.end();
|
|
50933
51097
|
};
|
|
@@ -50938,20 +51102,24 @@ var require_update = __commonJSMin((exports, module2) => {
|
|
|
50938
51102
|
var r = require_replace();
|
|
50939
51103
|
module2.exports = (opt_, files, cb) => {
|
|
50940
51104
|
const opt = hlo(opt_);
|
|
50941
|
-
if (!opt.file)
|
|
51105
|
+
if (!opt.file) {
|
|
50942
51106
|
throw new TypeError("file is required");
|
|
50943
|
-
|
|
51107
|
+
}
|
|
51108
|
+
if (opt.gzip) {
|
|
50944
51109
|
throw new TypeError("cannot append to compressed archives");
|
|
50945
|
-
|
|
51110
|
+
}
|
|
51111
|
+
if (!files || !Array.isArray(files) || !files.length) {
|
|
50946
51112
|
throw new TypeError("no files or directories specified");
|
|
51113
|
+
}
|
|
50947
51114
|
files = Array.from(files);
|
|
50948
51115
|
mtimeFilter(opt);
|
|
50949
51116
|
return r(opt, files, cb);
|
|
50950
51117
|
};
|
|
50951
51118
|
var mtimeFilter = (opt) => {
|
|
50952
51119
|
const filter = opt.filter;
|
|
50953
|
-
if (!opt.mtimeCache)
|
|
51120
|
+
if (!opt.mtimeCache) {
|
|
50954
51121
|
opt.mtimeCache = /* @__PURE__ */ new Map();
|
|
51122
|
+
}
|
|
50955
51123
|
opt.filter = filter ? (path6, stat) => filter(path6, stat) && !(opt.mtimeCache.get(path6) > stat.mtime) : (path6, stat) => !(opt.mtimeCache.get(path6) > stat.mtime);
|
|
50956
51124
|
};
|
|
50957
51125
|
});
|
|
@@ -51303,8 +51471,9 @@ var require_mkdir = __commonJSMin((exports, module2) => {
|
|
|
51303
51471
|
var cSet = (cache2, key, val) => cache2.set(normPath(key), val);
|
|
51304
51472
|
var checkCwd = (dir, cb) => {
|
|
51305
51473
|
fs4.stat(dir, (er, st) => {
|
|
51306
|
-
if (er || !st.isDirectory())
|
|
51474
|
+
if (er || !st.isDirectory()) {
|
|
51307
51475
|
er = new CwdError(dir, er && er.code || "ENOTDIR");
|
|
51476
|
+
}
|
|
51308
51477
|
cb(er);
|
|
51309
51478
|
});
|
|
51310
51479
|
};
|
|
@@ -51321,35 +51490,41 @@ var require_mkdir = __commonJSMin((exports, module2) => {
|
|
|
51321
51490
|
const cache2 = opt.cache;
|
|
51322
51491
|
const cwd = normPath(opt.cwd);
|
|
51323
51492
|
const done = (er, created) => {
|
|
51324
|
-
if (er)
|
|
51493
|
+
if (er) {
|
|
51325
51494
|
cb(er);
|
|
51326
|
-
else {
|
|
51495
|
+
} else {
|
|
51327
51496
|
cSet(cache2, dir, true);
|
|
51328
|
-
if (created && doChown)
|
|
51497
|
+
if (created && doChown) {
|
|
51329
51498
|
chownr(created, uid2, gid, (er2) => done(er2));
|
|
51330
|
-
else if (needChmod)
|
|
51499
|
+
} else if (needChmod) {
|
|
51331
51500
|
fs4.chmod(dir, mode, cb);
|
|
51332
|
-
else
|
|
51501
|
+
} else {
|
|
51333
51502
|
cb();
|
|
51503
|
+
}
|
|
51334
51504
|
}
|
|
51335
51505
|
};
|
|
51336
|
-
if (cache2 && cGet(cache2, dir) === true)
|
|
51506
|
+
if (cache2 && cGet(cache2, dir) === true) {
|
|
51337
51507
|
return done();
|
|
51338
|
-
|
|
51508
|
+
}
|
|
51509
|
+
if (dir === cwd) {
|
|
51339
51510
|
return checkCwd(dir, done);
|
|
51340
|
-
|
|
51511
|
+
}
|
|
51512
|
+
if (preserve) {
|
|
51341
51513
|
return mkdirp(dir, { mode }).then((made) => done(null, made), done);
|
|
51514
|
+
}
|
|
51342
51515
|
const sub = normPath(path6.relative(cwd, dir));
|
|
51343
51516
|
const parts = sub.split("/");
|
|
51344
51517
|
mkdir_(cwd, parts, mode, cache2, unlink, cwd, null, done);
|
|
51345
51518
|
};
|
|
51346
51519
|
var mkdir_ = (base, parts, mode, cache2, unlink, cwd, created, cb) => {
|
|
51347
|
-
if (!parts.length)
|
|
51520
|
+
if (!parts.length) {
|
|
51348
51521
|
return cb(null, created);
|
|
51522
|
+
}
|
|
51349
51523
|
const p = parts.shift();
|
|
51350
51524
|
const part = normPath(path6.resolve(base + "/" + p));
|
|
51351
|
-
if (cGet(cache2, part))
|
|
51525
|
+
if (cGet(cache2, part)) {
|
|
51352
51526
|
return mkdir_(part, parts, mode, cache2, unlink, cwd, created, cb);
|
|
51527
|
+
}
|
|
51353
51528
|
fs4.mkdir(part, mode, onmkdir(part, parts, mode, cache2, unlink, cwd, created, cb));
|
|
51354
51529
|
};
|
|
51355
51530
|
var onmkdir = (part, parts, mode, cache2, unlink, cwd, created, cb) => (er) => {
|
|
@@ -51358,18 +51533,20 @@ var require_mkdir = __commonJSMin((exports, module2) => {
|
|
|
51358
51533
|
if (statEr) {
|
|
51359
51534
|
statEr.path = statEr.path && normPath(statEr.path);
|
|
51360
51535
|
cb(statEr);
|
|
51361
|
-
} else if (st.isDirectory())
|
|
51536
|
+
} else if (st.isDirectory()) {
|
|
51362
51537
|
mkdir_(part, parts, mode, cache2, unlink, cwd, created, cb);
|
|
51363
|
-
else if (unlink) {
|
|
51538
|
+
} else if (unlink) {
|
|
51364
51539
|
fs4.unlink(part, (er2) => {
|
|
51365
|
-
if (er2)
|
|
51540
|
+
if (er2) {
|
|
51366
51541
|
return cb(er2);
|
|
51542
|
+
}
|
|
51367
51543
|
fs4.mkdir(part, mode, onmkdir(part, parts, mode, cache2, unlink, cwd, created, cb));
|
|
51368
51544
|
});
|
|
51369
|
-
} else if (st.isSymbolicLink())
|
|
51545
|
+
} else if (st.isSymbolicLink()) {
|
|
51370
51546
|
return cb(new SymlinkError(part, part + "/" + parts.join("/")));
|
|
51371
|
-
else
|
|
51547
|
+
} else {
|
|
51372
51548
|
cb(er);
|
|
51549
|
+
}
|
|
51373
51550
|
});
|
|
51374
51551
|
} else {
|
|
51375
51552
|
created = created || part;
|
|
@@ -51384,8 +51561,9 @@ var require_mkdir = __commonJSMin((exports, module2) => {
|
|
|
51384
51561
|
} catch (er) {
|
|
51385
51562
|
code = er.code;
|
|
51386
51563
|
} finally {
|
|
51387
|
-
if (!ok)
|
|
51564
|
+
if (!ok) {
|
|
51388
51565
|
throw new CwdError(dir, code);
|
|
51566
|
+
}
|
|
51389
51567
|
}
|
|
51390
51568
|
};
|
|
51391
51569
|
module2.exports.sync = (dir, opt) => {
|
|
@@ -51402,26 +51580,31 @@ var require_mkdir = __commonJSMin((exports, module2) => {
|
|
|
51402
51580
|
const cwd = normPath(opt.cwd);
|
|
51403
51581
|
const done = (created2) => {
|
|
51404
51582
|
cSet(cache2, dir, true);
|
|
51405
|
-
if (created2 && doChown)
|
|
51583
|
+
if (created2 && doChown) {
|
|
51406
51584
|
chownr.sync(created2, uid2, gid);
|
|
51407
|
-
|
|
51585
|
+
}
|
|
51586
|
+
if (needChmod) {
|
|
51408
51587
|
fs4.chmodSync(dir, mode);
|
|
51588
|
+
}
|
|
51409
51589
|
};
|
|
51410
|
-
if (cache2 && cGet(cache2, dir) === true)
|
|
51590
|
+
if (cache2 && cGet(cache2, dir) === true) {
|
|
51411
51591
|
return done();
|
|
51592
|
+
}
|
|
51412
51593
|
if (dir === cwd) {
|
|
51413
51594
|
checkCwdSync(cwd);
|
|
51414
51595
|
return done();
|
|
51415
51596
|
}
|
|
51416
|
-
if (preserve)
|
|
51597
|
+
if (preserve) {
|
|
51417
51598
|
return done(mkdirp.sync(dir, mode));
|
|
51599
|
+
}
|
|
51418
51600
|
const sub = normPath(path6.relative(cwd, dir));
|
|
51419
51601
|
const parts = sub.split("/");
|
|
51420
51602
|
let created = null;
|
|
51421
51603
|
for (let p = parts.shift(), part = cwd; p && (part += "/" + p); p = parts.shift()) {
|
|
51422
51604
|
part = normPath(path6.resolve(part));
|
|
51423
|
-
if (cGet(cache2, part))
|
|
51605
|
+
if (cGet(cache2, part)) {
|
|
51424
51606
|
continue;
|
|
51607
|
+
}
|
|
51425
51608
|
try {
|
|
51426
51609
|
fs4.mkdirSync(part, mode);
|
|
51427
51610
|
created = created || part;
|
|
@@ -51437,8 +51620,9 @@ var require_mkdir = __commonJSMin((exports, module2) => {
|
|
|
51437
51620
|
created = created || part;
|
|
51438
51621
|
cSet(cache2, part, true);
|
|
51439
51622
|
continue;
|
|
51440
|
-
} else if (st.isSymbolicLink())
|
|
51623
|
+
} else if (st.isSymbolicLink()) {
|
|
51441
51624
|
return new SymlinkError(part, part + "/" + parts.join("/"));
|
|
51625
|
+
}
|
|
51442
51626
|
}
|
|
51443
51627
|
}
|
|
51444
51628
|
return done(created);
|
|
@@ -51448,8 +51632,9 @@ var require_normalize_unicode = __commonJSMin((exports, module2) => {
|
|
|
51448
51632
|
var normalizeCache = /* @__PURE__ */ Object.create(null);
|
|
51449
51633
|
var { hasOwnProperty: hasOwnProperty6 } = Object.prototype;
|
|
51450
51634
|
module2.exports = (s) => {
|
|
51451
|
-
if (!hasOwnProperty6.call(normalizeCache, s))
|
|
51635
|
+
if (!hasOwnProperty6.call(normalizeCache, s)) {
|
|
51452
51636
|
normalizeCache[s] = s.normalize("NFKD");
|
|
51637
|
+
}
|
|
51453
51638
|
return normalizeCache[s];
|
|
51454
51639
|
};
|
|
51455
51640
|
});
|
|
@@ -51465,8 +51650,9 @@ var require_path_reservations = __commonJSMin((exports, module2) => {
|
|
|
51465
51650
|
const reservations = /* @__PURE__ */ new Map();
|
|
51466
51651
|
const getDirs = (path6) => {
|
|
51467
51652
|
const dirs = path6.split("/").slice(0, -1).reduce((set, path7) => {
|
|
51468
|
-
if (set.length)
|
|
51653
|
+
if (set.length) {
|
|
51469
51654
|
path7 = join(set[set.length - 1], path7);
|
|
51655
|
+
}
|
|
51470
51656
|
set.push(path7 || "/");
|
|
51471
51657
|
return set;
|
|
51472
51658
|
}, []);
|
|
@@ -51475,8 +51661,9 @@ var require_path_reservations = __commonJSMin((exports, module2) => {
|
|
|
51475
51661
|
const running = /* @__PURE__ */ new Set();
|
|
51476
51662
|
const getQueues = (fn) => {
|
|
51477
51663
|
const res = reservations.get(fn);
|
|
51478
|
-
if (!res)
|
|
51664
|
+
if (!res) {
|
|
51479
51665
|
throw new Error("function does not have any path reservations");
|
|
51666
|
+
}
|
|
51480
51667
|
return {
|
|
51481
51668
|
paths: res.paths.map((path6) => queues.get(path6)),
|
|
51482
51669
|
dirs: [...res.dirs].map((path6) => queues.get(path6))
|
|
@@ -51487,40 +51674,44 @@ var require_path_reservations = __commonJSMin((exports, module2) => {
|
|
|
51487
51674
|
return paths.every((q) => q[0] === fn) && dirs.every((q) => q[0] instanceof Set && q[0].has(fn));
|
|
51488
51675
|
};
|
|
51489
51676
|
const run = (fn) => {
|
|
51490
|
-
if (running.has(fn) || !check(fn))
|
|
51677
|
+
if (running.has(fn) || !check(fn)) {
|
|
51491
51678
|
return false;
|
|
51679
|
+
}
|
|
51492
51680
|
running.add(fn);
|
|
51493
51681
|
fn(() => clear(fn));
|
|
51494
51682
|
return true;
|
|
51495
51683
|
};
|
|
51496
51684
|
const clear = (fn) => {
|
|
51497
|
-
if (!running.has(fn))
|
|
51685
|
+
if (!running.has(fn)) {
|
|
51498
51686
|
return false;
|
|
51687
|
+
}
|
|
51499
51688
|
const { paths, dirs } = reservations.get(fn);
|
|
51500
51689
|
const next = /* @__PURE__ */ new Set();
|
|
51501
51690
|
paths.forEach((path6) => {
|
|
51502
51691
|
const q = queues.get(path6);
|
|
51503
51692
|
assert.equal(q[0], fn);
|
|
51504
|
-
if (q.length === 1)
|
|
51693
|
+
if (q.length === 1) {
|
|
51505
51694
|
queues.delete(path6);
|
|
51506
|
-
else {
|
|
51695
|
+
} else {
|
|
51507
51696
|
q.shift();
|
|
51508
|
-
if (typeof q[0] === "function")
|
|
51697
|
+
if (typeof q[0] === "function") {
|
|
51509
51698
|
next.add(q[0]);
|
|
51510
|
-
else
|
|
51699
|
+
} else {
|
|
51511
51700
|
q[0].forEach((fn2) => next.add(fn2));
|
|
51701
|
+
}
|
|
51512
51702
|
}
|
|
51513
51703
|
});
|
|
51514
51704
|
dirs.forEach((dir) => {
|
|
51515
51705
|
const q = queues.get(dir);
|
|
51516
51706
|
assert(q[0] instanceof Set);
|
|
51517
|
-
if (q[0].size === 1 && q.length === 1)
|
|
51707
|
+
if (q[0].size === 1 && q.length === 1) {
|
|
51518
51708
|
queues.delete(dir);
|
|
51519
|
-
else if (q[0].size === 1) {
|
|
51709
|
+
} else if (q[0].size === 1) {
|
|
51520
51710
|
q.shift();
|
|
51521
51711
|
next.add(q[0]);
|
|
51522
|
-
} else
|
|
51712
|
+
} else {
|
|
51523
51713
|
q[0].delete(fn);
|
|
51714
|
+
}
|
|
51524
51715
|
});
|
|
51525
51716
|
running.delete(fn);
|
|
51526
51717
|
next.forEach((fn2) => run(fn2));
|
|
@@ -51534,19 +51725,21 @@ var require_path_reservations = __commonJSMin((exports, module2) => {
|
|
|
51534
51725
|
reservations.set(fn, { dirs, paths });
|
|
51535
51726
|
paths.forEach((path6) => {
|
|
51536
51727
|
const q = queues.get(path6);
|
|
51537
|
-
if (!q)
|
|
51728
|
+
if (!q) {
|
|
51538
51729
|
queues.set(path6, [fn]);
|
|
51539
|
-
else
|
|
51730
|
+
} else {
|
|
51540
51731
|
q.push(fn);
|
|
51732
|
+
}
|
|
51541
51733
|
});
|
|
51542
51734
|
dirs.forEach((dir) => {
|
|
51543
51735
|
const q = queues.get(dir);
|
|
51544
|
-
if (!q)
|
|
51736
|
+
if (!q) {
|
|
51545
51737
|
queues.set(dir, [/* @__PURE__ */ new Set([fn])]);
|
|
51546
|
-
else if (q[q.length - 1] instanceof Set)
|
|
51738
|
+
} else if (q[q.length - 1] instanceof Set) {
|
|
51547
51739
|
q[q.length - 1].add(fn);
|
|
51548
|
-
else
|
|
51740
|
+
} else {
|
|
51549
51741
|
q.push(/* @__PURE__ */ new Set([fn]));
|
|
51742
|
+
}
|
|
51550
51743
|
});
|
|
51551
51744
|
return run(fn);
|
|
51552
51745
|
};
|
|
@@ -51607,18 +51800,21 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
51607
51800
|
var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
51608
51801
|
var isWindows = platform === "win32";
|
|
51609
51802
|
var unlinkFile = (path7, cb) => {
|
|
51610
|
-
if (!isWindows)
|
|
51803
|
+
if (!isWindows) {
|
|
51611
51804
|
return fs4.unlink(path7, cb);
|
|
51805
|
+
}
|
|
51612
51806
|
const name5 = path7 + ".DELETE." + crypto.randomBytes(16).toString("hex");
|
|
51613
51807
|
fs4.rename(path7, name5, (er) => {
|
|
51614
|
-
if (er)
|
|
51808
|
+
if (er) {
|
|
51615
51809
|
return cb(er);
|
|
51810
|
+
}
|
|
51616
51811
|
fs4.unlink(name5, cb);
|
|
51617
51812
|
});
|
|
51618
51813
|
};
|
|
51619
51814
|
var unlinkFileSync = (path7) => {
|
|
51620
|
-
if (!isWindows)
|
|
51815
|
+
if (!isWindows) {
|
|
51621
51816
|
return fs4.unlinkSync(path7);
|
|
51817
|
+
}
|
|
51622
51818
|
const name5 = path7 + ".DELETE." + crypto.randomBytes(16).toString("hex");
|
|
51623
51819
|
fs4.renameSync(path7, name5);
|
|
51624
51820
|
fs4.unlinkSync(name5);
|
|
@@ -51629,18 +51825,21 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
51629
51825
|
abs = cacheKeyNormalize(abs);
|
|
51630
51826
|
for (const path7 of cache2.keys()) {
|
|
51631
51827
|
const pnorm = cacheKeyNormalize(path7);
|
|
51632
|
-
if (pnorm === abs || pnorm.indexOf(abs + "/") === 0)
|
|
51828
|
+
if (pnorm === abs || pnorm.indexOf(abs + "/") === 0) {
|
|
51633
51829
|
cache2.delete(path7);
|
|
51830
|
+
}
|
|
51634
51831
|
}
|
|
51635
51832
|
};
|
|
51636
51833
|
var dropCache = (cache2) => {
|
|
51637
|
-
for (const key of cache2.keys())
|
|
51834
|
+
for (const key of cache2.keys()) {
|
|
51638
51835
|
cache2.delete(key);
|
|
51836
|
+
}
|
|
51639
51837
|
};
|
|
51640
51838
|
var Unpack = class extends Parser2 {
|
|
51641
51839
|
constructor(opt) {
|
|
51642
|
-
if (!opt)
|
|
51840
|
+
if (!opt) {
|
|
51643
51841
|
opt = {};
|
|
51842
|
+
}
|
|
51644
51843
|
opt.ondone = (_) => {
|
|
51645
51844
|
this[ENDED] = true;
|
|
51646
51845
|
this[MAYBECLOSE]();
|
|
@@ -51655,8 +51854,9 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
51655
51854
|
this[ENDED] = false;
|
|
51656
51855
|
this.dirCache = opt.dirCache || /* @__PURE__ */ new Map();
|
|
51657
51856
|
if (typeof opt.uid === "number" || typeof opt.gid === "number") {
|
|
51658
|
-
if (typeof opt.uid !== "number" || typeof opt.gid !== "number")
|
|
51857
|
+
if (typeof opt.uid !== "number" || typeof opt.gid !== "number") {
|
|
51659
51858
|
throw new TypeError("cannot set owner without number uid and gid");
|
|
51859
|
+
}
|
|
51660
51860
|
if (opt.preserveOwner) {
|
|
51661
51861
|
throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
51662
51862
|
}
|
|
@@ -51668,10 +51868,11 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
51668
51868
|
this.gid = null;
|
|
51669
51869
|
this.setOwner = false;
|
|
51670
51870
|
}
|
|
51671
|
-
if (opt.preserveOwner === void 0 && typeof opt.uid !== "number")
|
|
51871
|
+
if (opt.preserveOwner === void 0 && typeof opt.uid !== "number") {
|
|
51672
51872
|
this.preserveOwner = process.getuid && process.getuid() === 0;
|
|
51673
|
-
else
|
|
51873
|
+
} else {
|
|
51674
51874
|
this.preserveOwner = !!opt.preserveOwner;
|
|
51875
|
+
}
|
|
51675
51876
|
this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : null;
|
|
51676
51877
|
this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : null;
|
|
51677
51878
|
this.forceChown = opt.forceChown === true;
|
|
@@ -51690,8 +51891,9 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
51690
51891
|
this.on("entry", (entry) => this[ONENTRY](entry));
|
|
51691
51892
|
}
|
|
51692
51893
|
warn(code, msg, data = {}) {
|
|
51693
|
-
if (code === "TAR_BAD_ARCHIVE" || code === "TAR_ABORT")
|
|
51894
|
+
if (code === "TAR_BAD_ARCHIVE" || code === "TAR_ABORT") {
|
|
51694
51895
|
data.recoverable = false;
|
|
51896
|
+
}
|
|
51695
51897
|
return super.warn(code, msg, data);
|
|
51696
51898
|
}
|
|
51697
51899
|
[MAYBECLOSE]() {
|
|
@@ -51699,21 +51901,22 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
51699
51901
|
this.emit("prefinish");
|
|
51700
51902
|
this.emit("finish");
|
|
51701
51903
|
this.emit("end");
|
|
51702
|
-
this.emit("close");
|
|
51703
51904
|
}
|
|
51704
51905
|
}
|
|
51705
51906
|
[CHECKPATH](entry) {
|
|
51706
51907
|
if (this.strip) {
|
|
51707
51908
|
const parts = normPath(entry.path).split("/");
|
|
51708
|
-
if (parts.length < this.strip)
|
|
51909
|
+
if (parts.length < this.strip) {
|
|
51709
51910
|
return false;
|
|
51911
|
+
}
|
|
51710
51912
|
entry.path = parts.slice(this.strip).join("/");
|
|
51711
51913
|
if (entry.type === "Link") {
|
|
51712
51914
|
const linkparts = normPath(entry.linkpath).split("/");
|
|
51713
|
-
if (linkparts.length >= this.strip)
|
|
51915
|
+
if (linkparts.length >= this.strip) {
|
|
51714
51916
|
entry.linkpath = linkparts.slice(this.strip).join("/");
|
|
51715
|
-
else
|
|
51917
|
+
} else {
|
|
51716
51918
|
return false;
|
|
51919
|
+
}
|
|
51717
51920
|
}
|
|
51718
51921
|
}
|
|
51719
51922
|
if (!this.preservePaths) {
|
|
@@ -51735,10 +51938,11 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
51735
51938
|
});
|
|
51736
51939
|
}
|
|
51737
51940
|
}
|
|
51738
|
-
if (path6.isAbsolute(entry.path))
|
|
51941
|
+
if (path6.isAbsolute(entry.path)) {
|
|
51739
51942
|
entry.absolute = normPath(path6.resolve(entry.path));
|
|
51740
|
-
else
|
|
51943
|
+
} else {
|
|
51741
51944
|
entry.absolute = normPath(path6.resolve(this.cwd, entry.path));
|
|
51945
|
+
}
|
|
51742
51946
|
if (!this.preservePaths && entry.absolute.indexOf(this.cwd + "/") !== 0 && entry.absolute !== this.cwd) {
|
|
51743
51947
|
this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
|
|
51744
51948
|
entry,
|
|
@@ -51748,25 +51952,28 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
51748
51952
|
});
|
|
51749
51953
|
return false;
|
|
51750
51954
|
}
|
|
51751
|
-
if (entry.absolute === this.cwd && entry.type !== "Directory" && entry.type !== "GNUDumpDir")
|
|
51955
|
+
if (entry.absolute === this.cwd && entry.type !== "Directory" && entry.type !== "GNUDumpDir") {
|
|
51752
51956
|
return false;
|
|
51957
|
+
}
|
|
51753
51958
|
if (this.win32) {
|
|
51754
51959
|
const { root: aRoot } = path6.win32.parse(entry.absolute);
|
|
51755
|
-
entry.absolute = aRoot + wc.encode(entry.absolute.
|
|
51960
|
+
entry.absolute = aRoot + wc.encode(entry.absolute.slice(aRoot.length));
|
|
51756
51961
|
const { root: pRoot } = path6.win32.parse(entry.path);
|
|
51757
|
-
entry.path = pRoot + wc.encode(entry.path.
|
|
51962
|
+
entry.path = pRoot + wc.encode(entry.path.slice(pRoot.length));
|
|
51758
51963
|
}
|
|
51759
51964
|
return true;
|
|
51760
51965
|
}
|
|
51761
51966
|
[ONENTRY](entry) {
|
|
51762
|
-
if (!this[CHECKPATH](entry))
|
|
51967
|
+
if (!this[CHECKPATH](entry)) {
|
|
51763
51968
|
return entry.resume();
|
|
51969
|
+
}
|
|
51764
51970
|
assert.equal(typeof entry.absolute, "string");
|
|
51765
51971
|
switch (entry.type) {
|
|
51766
51972
|
case "Directory":
|
|
51767
51973
|
case "GNUDumpDir":
|
|
51768
|
-
if (entry.mode)
|
|
51974
|
+
if (entry.mode) {
|
|
51769
51975
|
entry.mode = entry.mode | 448;
|
|
51976
|
+
}
|
|
51770
51977
|
case "File":
|
|
51771
51978
|
case "OldFile":
|
|
51772
51979
|
case "ContiguousFile":
|
|
@@ -51781,9 +51988,9 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
51781
51988
|
}
|
|
51782
51989
|
}
|
|
51783
51990
|
[ONERROR](er, entry) {
|
|
51784
|
-
if (er.name === "CwdError")
|
|
51991
|
+
if (er.name === "CwdError") {
|
|
51785
51992
|
this.emit("error", er);
|
|
51786
|
-
else {
|
|
51993
|
+
} else {
|
|
51787
51994
|
this.warn("TAR_ENTRY_ERROR", er, { entry });
|
|
51788
51995
|
this[UNPEND]();
|
|
51789
51996
|
entry.resume();
|
|
@@ -51821,9 +52028,10 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
51821
52028
|
autoClose: false
|
|
51822
52029
|
});
|
|
51823
52030
|
stream.on("error", (er) => {
|
|
51824
|
-
if (stream.fd)
|
|
52031
|
+
if (stream.fd) {
|
|
51825
52032
|
fs4.close(stream.fd, () => {
|
|
51826
52033
|
});
|
|
52034
|
+
}
|
|
51827
52035
|
stream.write = () => true;
|
|
51828
52036
|
this[ONERROR](er, entry);
|
|
51829
52037
|
fullyDone();
|
|
@@ -51831,19 +52039,21 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
51831
52039
|
let actions = 1;
|
|
51832
52040
|
const done = (er) => {
|
|
51833
52041
|
if (er) {
|
|
51834
|
-
if (stream.fd)
|
|
52042
|
+
if (stream.fd) {
|
|
51835
52043
|
fs4.close(stream.fd, () => {
|
|
51836
52044
|
});
|
|
52045
|
+
}
|
|
51837
52046
|
this[ONERROR](er, entry);
|
|
51838
52047
|
fullyDone();
|
|
51839
52048
|
return;
|
|
51840
52049
|
}
|
|
51841
52050
|
if (--actions === 0) {
|
|
51842
52051
|
fs4.close(stream.fd, (er2) => {
|
|
51843
|
-
if (er2)
|
|
52052
|
+
if (er2) {
|
|
51844
52053
|
this[ONERROR](er2, entry);
|
|
51845
|
-
else
|
|
52054
|
+
} else {
|
|
51846
52055
|
this[UNPEND]();
|
|
52056
|
+
}
|
|
51847
52057
|
fullyDone();
|
|
51848
52058
|
});
|
|
51849
52059
|
}
|
|
@@ -51931,15 +52141,17 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
51931
52141
|
[CHECKFS](entry) {
|
|
51932
52142
|
this[PEND]();
|
|
51933
52143
|
const paths = [entry.path];
|
|
51934
|
-
if (entry.linkpath)
|
|
52144
|
+
if (entry.linkpath) {
|
|
51935
52145
|
paths.push(entry.linkpath);
|
|
52146
|
+
}
|
|
51936
52147
|
this.reservations.reserve(paths, (done) => this[CHECKFS2](entry, done));
|
|
51937
52148
|
}
|
|
51938
52149
|
[PRUNECACHE](entry) {
|
|
51939
|
-
if (entry.type === "SymbolicLink")
|
|
52150
|
+
if (entry.type === "SymbolicLink") {
|
|
51940
52151
|
dropCache(this.dirCache);
|
|
51941
|
-
else if (entry.type !== "Directory")
|
|
52152
|
+
} else if (entry.type !== "Directory") {
|
|
51942
52153
|
pruneCache(this.dirCache, entry.absolute);
|
|
52154
|
+
}
|
|
51943
52155
|
}
|
|
51944
52156
|
[CHECKFS2](entry, fullyDone) {
|
|
51945
52157
|
this[PRUNECACHE](entry);
|
|
@@ -51981,29 +52193,33 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
51981
52193
|
done();
|
|
51982
52194
|
return;
|
|
51983
52195
|
}
|
|
51984
|
-
if (lstatEr || this[ISREUSABLE](entry, st))
|
|
52196
|
+
if (lstatEr || this[ISREUSABLE](entry, st)) {
|
|
51985
52197
|
return this[MAKEFS](null, entry, done);
|
|
52198
|
+
}
|
|
51986
52199
|
if (st.isDirectory()) {
|
|
51987
52200
|
if (entry.type === "Directory") {
|
|
51988
52201
|
const needChmod = !this.noChmod && entry.mode && (st.mode & 4095) !== entry.mode;
|
|
51989
52202
|
const afterChmod = (er) => this[MAKEFS](er, entry, done);
|
|
51990
|
-
if (!needChmod)
|
|
52203
|
+
if (!needChmod) {
|
|
51991
52204
|
return afterChmod();
|
|
52205
|
+
}
|
|
51992
52206
|
return fs4.chmod(entry.absolute, entry.mode, afterChmod);
|
|
51993
52207
|
}
|
|
51994
52208
|
if (entry.absolute !== this.cwd) {
|
|
51995
52209
|
return fs4.rmdir(entry.absolute, (er) => this[MAKEFS](er, entry, done));
|
|
51996
52210
|
}
|
|
51997
52211
|
}
|
|
51998
|
-
if (entry.absolute === this.cwd)
|
|
52212
|
+
if (entry.absolute === this.cwd) {
|
|
51999
52213
|
return this[MAKEFS](null, entry, done);
|
|
52214
|
+
}
|
|
52000
52215
|
unlinkFile(entry.absolute, (er) => this[MAKEFS](er, entry, done));
|
|
52001
52216
|
});
|
|
52002
52217
|
};
|
|
52003
|
-
if (this[CHECKED_CWD])
|
|
52218
|
+
if (this[CHECKED_CWD]) {
|
|
52004
52219
|
start();
|
|
52005
|
-
else
|
|
52220
|
+
} else {
|
|
52006
52221
|
checkCwd();
|
|
52222
|
+
}
|
|
52007
52223
|
}
|
|
52008
52224
|
[MAKEFS](er, entry, done) {
|
|
52009
52225
|
if (er) {
|
|
@@ -52027,9 +52243,9 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
52027
52243
|
}
|
|
52028
52244
|
[LINK](entry, linkpath, link, done) {
|
|
52029
52245
|
fs4[link](linkpath, entry.absolute, (er) => {
|
|
52030
|
-
if (er)
|
|
52246
|
+
if (er) {
|
|
52031
52247
|
this[ONERROR](er, entry);
|
|
52032
|
-
else {
|
|
52248
|
+
} else {
|
|
52033
52249
|
this[UNPEND]();
|
|
52034
52250
|
entry.resume();
|
|
52035
52251
|
}
|
|
@@ -52053,23 +52269,27 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
52053
52269
|
this[PRUNECACHE](entry);
|
|
52054
52270
|
if (!this[CHECKED_CWD]) {
|
|
52055
52271
|
const er2 = this[MKDIR](this.cwd, this.dmode);
|
|
52056
|
-
if (er2)
|
|
52272
|
+
if (er2) {
|
|
52057
52273
|
return this[ONERROR](er2, entry);
|
|
52274
|
+
}
|
|
52058
52275
|
this[CHECKED_CWD] = true;
|
|
52059
52276
|
}
|
|
52060
52277
|
if (entry.absolute !== this.cwd) {
|
|
52061
52278
|
const parent = normPath(path6.dirname(entry.absolute));
|
|
52062
52279
|
if (parent !== this.cwd) {
|
|
52063
52280
|
const mkParent = this[MKDIR](parent, this.dmode);
|
|
52064
|
-
if (mkParent)
|
|
52281
|
+
if (mkParent) {
|
|
52065
52282
|
return this[ONERROR](mkParent, entry);
|
|
52283
|
+
}
|
|
52066
52284
|
}
|
|
52067
52285
|
}
|
|
52068
52286
|
const [lstatEr, st] = callSync(() => fs4.lstatSync(entry.absolute));
|
|
52069
|
-
if (st && (this.keep || this.newer && st.mtime > entry.mtime))
|
|
52287
|
+
if (st && (this.keep || this.newer && st.mtime > entry.mtime)) {
|
|
52070
52288
|
return this[SKIP](entry);
|
|
52071
|
-
|
|
52289
|
+
}
|
|
52290
|
+
if (lstatEr || this[ISREUSABLE](entry, st)) {
|
|
52072
52291
|
return this[MAKEFS](null, entry);
|
|
52292
|
+
}
|
|
52073
52293
|
if (st.isDirectory()) {
|
|
52074
52294
|
if (entry.type === "Directory") {
|
|
52075
52295
|
const needChmod = !this.noChmod && entry.mode && (st.mode & 4095) !== entry.mode;
|
|
@@ -52093,8 +52313,9 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
52093
52313
|
} catch (e) {
|
|
52094
52314
|
closeError = e;
|
|
52095
52315
|
}
|
|
52096
|
-
if (er || closeError)
|
|
52316
|
+
if (er || closeError) {
|
|
52097
52317
|
this[ONERROR](er || closeError, entry);
|
|
52318
|
+
}
|
|
52098
52319
|
done();
|
|
52099
52320
|
};
|
|
52100
52321
|
let fd;
|
|
@@ -52209,23 +52430,29 @@ var require_extract = __commonJSMin((exports, module2) => {
|
|
|
52209
52430
|
var path6 = __require("path");
|
|
52210
52431
|
var stripSlash = require_strip_trailing_slashes();
|
|
52211
52432
|
module2.exports = (opt_, files, cb) => {
|
|
52212
|
-
if (typeof opt_ === "function")
|
|
52433
|
+
if (typeof opt_ === "function") {
|
|
52213
52434
|
cb = opt_, files = null, opt_ = {};
|
|
52214
|
-
else if (Array.isArray(opt_))
|
|
52435
|
+
} else if (Array.isArray(opt_)) {
|
|
52215
52436
|
files = opt_, opt_ = {};
|
|
52216
|
-
|
|
52437
|
+
}
|
|
52438
|
+
if (typeof files === "function") {
|
|
52217
52439
|
cb = files, files = null;
|
|
52218
|
-
|
|
52440
|
+
}
|
|
52441
|
+
if (!files) {
|
|
52219
52442
|
files = [];
|
|
52220
|
-
else
|
|
52443
|
+
} else {
|
|
52221
52444
|
files = Array.from(files);
|
|
52445
|
+
}
|
|
52222
52446
|
const opt = hlo(opt_);
|
|
52223
|
-
if (opt.sync && typeof cb === "function")
|
|
52447
|
+
if (opt.sync && typeof cb === "function") {
|
|
52224
52448
|
throw new TypeError("callback not supported for sync tar functions");
|
|
52225
|
-
|
|
52449
|
+
}
|
|
52450
|
+
if (!opt.file && typeof cb === "function") {
|
|
52226
52451
|
throw new TypeError("callback only supported with file option");
|
|
52227
|
-
|
|
52452
|
+
}
|
|
52453
|
+
if (files.length) {
|
|
52228
52454
|
filesFilter(opt, files);
|
|
52455
|
+
}
|
|
52229
52456
|
return opt.file && opt.sync ? extractFileSync(opt) : opt.file ? extractFile(opt, cb) : opt.sync ? extractSync(opt) : extract(opt);
|
|
52230
52457
|
};
|
|
52231
52458
|
var filesFilter = (opt, files) => {
|
|
@@ -52258,9 +52485,9 @@ var require_extract = __commonJSMin((exports, module2) => {
|
|
|
52258
52485
|
u.on("error", reject);
|
|
52259
52486
|
u.on("close", resolve);
|
|
52260
52487
|
fs4.stat(file, (er, stat) => {
|
|
52261
|
-
if (er)
|
|
52488
|
+
if (er) {
|
|
52262
52489
|
reject(er);
|
|
52263
|
-
else {
|
|
52490
|
+
} else {
|
|
52264
52491
|
const stream = new fsm.ReadStream(file, {
|
|
52265
52492
|
readSize,
|
|
52266
52493
|
size: stat.size
|
|
@@ -59173,7 +59400,9 @@ function _regeneratorRuntime() {
|
|
|
59173
59400
|
_regeneratorRuntime = function _regeneratorRuntime2() {
|
|
59174
59401
|
return exports;
|
|
59175
59402
|
};
|
|
59176
|
-
var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty,
|
|
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";
|
|
59177
59406
|
function define3(obj, key, value) {
|
|
59178
59407
|
return Object.defineProperty(obj, key, {
|
|
59179
59408
|
value,
|
|
@@ -59191,48 +59420,9 @@ function _regeneratorRuntime() {
|
|
|
59191
59420
|
}
|
|
59192
59421
|
function wrap(innerFn, outerFn, self3, tryLocsList) {
|
|
59193
59422
|
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []);
|
|
59194
|
-
return generator
|
|
59195
|
-
|
|
59196
|
-
|
|
59197
|
-
if (state === "executing")
|
|
59198
|
-
throw new Error("Generator is already running");
|
|
59199
|
-
if (state === "completed") {
|
|
59200
|
-
if (method === "throw")
|
|
59201
|
-
throw arg;
|
|
59202
|
-
return doneResult();
|
|
59203
|
-
}
|
|
59204
|
-
for (context2.method = method, context2.arg = arg; ; ) {
|
|
59205
|
-
var delegate = context2.delegate;
|
|
59206
|
-
if (delegate) {
|
|
59207
|
-
var delegateResult = maybeInvokeDelegate(delegate, context2);
|
|
59208
|
-
if (delegateResult) {
|
|
59209
|
-
if (delegateResult === ContinueSentinel)
|
|
59210
|
-
continue;
|
|
59211
|
-
return delegateResult;
|
|
59212
|
-
}
|
|
59213
|
-
}
|
|
59214
|
-
if (context2.method === "next")
|
|
59215
|
-
context2.sent = context2._sent = context2.arg;
|
|
59216
|
-
else if (context2.method === "throw") {
|
|
59217
|
-
if (state === "suspendedStart")
|
|
59218
|
-
throw state = "completed", context2.arg;
|
|
59219
|
-
context2.dispatchException(context2.arg);
|
|
59220
|
-
} else
|
|
59221
|
-
context2.method === "return" && context2.abrupt("return", context2.arg);
|
|
59222
|
-
state = "executing";
|
|
59223
|
-
var record = tryCatch(innerFn2, self4, context2);
|
|
59224
|
-
if (record.type === "normal") {
|
|
59225
|
-
if (state = context2.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel)
|
|
59226
|
-
continue;
|
|
59227
|
-
return {
|
|
59228
|
-
value: record.arg,
|
|
59229
|
-
done: context2.done
|
|
59230
|
-
};
|
|
59231
|
-
}
|
|
59232
|
-
record.type === "throw" && (state = "completed", context2.method = "throw", context2.arg = record.arg);
|
|
59233
|
-
}
|
|
59234
|
-
};
|
|
59235
|
-
}(innerFn, self3, context), generator;
|
|
59423
|
+
return defineProperty(generator, "_invoke", {
|
|
59424
|
+
value: makeInvokeMethod(innerFn, self3, context)
|
|
59425
|
+
}), generator;
|
|
59236
59426
|
}
|
|
59237
59427
|
function tryCatch(fn, obj, arg) {
|
|
59238
59428
|
try {
|
|
@@ -59287,13 +59477,57 @@ function _regeneratorRuntime() {
|
|
|
59287
59477
|
reject(record.arg);
|
|
59288
59478
|
}
|
|
59289
59479
|
var previousPromise;
|
|
59290
|
-
this
|
|
59291
|
-
function
|
|
59292
|
-
|
|
59293
|
-
|
|
59294
|
-
|
|
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);
|
|
59295
59530
|
}
|
|
59296
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
59297
59531
|
};
|
|
59298
59532
|
}
|
|
59299
59533
|
function maybeInvokeDelegate(delegate, context) {
|
|
@@ -59355,7 +59589,13 @@ function _regeneratorRuntime() {
|
|
|
59355
59589
|
done: true
|
|
59356
59590
|
};
|
|
59357
59591
|
}
|
|
59358
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
59592
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
59593
|
+
value: GeneratorFunctionPrototype,
|
|
59594
|
+
configurable: true
|
|
59595
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
59596
|
+
value: GeneratorFunction,
|
|
59597
|
+
configurable: true
|
|
59598
|
+
}), GeneratorFunction.displayName = define3(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function(genFun) {
|
|
59359
59599
|
var ctor = typeof genFun == "function" && genFun.constructor;
|
|
59360
59600
|
return !!ctor && (ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction");
|
|
59361
59601
|
}, exports.mark = function(genFun) {
|
|
@@ -59376,8 +59616,8 @@ function _regeneratorRuntime() {
|
|
|
59376
59616
|
return this;
|
|
59377
59617
|
}), define3(Gp, "toString", function() {
|
|
59378
59618
|
return "[object Generator]";
|
|
59379
|
-
}), exports.keys = function(
|
|
59380
|
-
var keys = [];
|
|
59619
|
+
}), exports.keys = function(val) {
|
|
59620
|
+
var object = Object(val), keys = [];
|
|
59381
59621
|
for (var key in object) {
|
|
59382
59622
|
keys.push(key);
|
|
59383
59623
|
}
|
|
@@ -61161,7 +61401,6 @@ var init_matcher = __esmMin(() => {
|
|
|
61161
61401
|
this.record = record;
|
|
61162
61402
|
}
|
|
61163
61403
|
Matcher2.prototype.next = function(node, pos) {
|
|
61164
|
-
var isLastToken = pos === this.path.length - 1;
|
|
61165
61404
|
if (node.after) {
|
|
61166
61405
|
return this.matchNode(node.after, pos);
|
|
61167
61406
|
}
|
|
@@ -61174,6 +61413,7 @@ var init_matcher = __esmMin(() => {
|
|
|
61174
61413
|
return !!this.take(pos);
|
|
61175
61414
|
}
|
|
61176
61415
|
}
|
|
61416
|
+
var isLastToken = pos === this.path.length - 1;
|
|
61177
61417
|
if (isLastToken) {
|
|
61178
61418
|
return !!this.take(pos);
|
|
61179
61419
|
} else {
|
|
@@ -61831,10 +62071,7 @@ var init_esm = __esmMin(() => {
|
|
|
61831
62071
|
return matcher;
|
|
61832
62072
|
};
|
|
61833
62073
|
Path2.isPathPattern = function(target) {
|
|
61834
|
-
|
|
61835
|
-
return true;
|
|
61836
|
-
}
|
|
61837
|
-
return false;
|
|
62074
|
+
return !!(isStr2(target) || isArr2(target) || isRegExp2(target) || isFn2(target) && target[isMatcher]);
|
|
61838
62075
|
};
|
|
61839
62076
|
Path2.transform = function(pattern, regexp, callback) {
|
|
61840
62077
|
return Path2.parse(pattern).transform(regexp, callback);
|
|
@@ -64288,10 +64525,10 @@ var init_registry = __esmMin(() => {
|
|
|
64288
64525
|
};
|
|
64289
64526
|
getISOCode = function(language) {
|
|
64290
64527
|
var isoCode = registry.locales.language;
|
|
64291
|
-
var lang = lowerCase(language);
|
|
64292
64528
|
if (registry.locales.messages[language]) {
|
|
64293
64529
|
return language;
|
|
64294
64530
|
}
|
|
64531
|
+
var lang = lowerCase(language);
|
|
64295
64532
|
each(registry.locales.messages, function(messages, key) {
|
|
64296
64533
|
var target = lowerCase(key);
|
|
64297
64534
|
if (target.indexOf(lang) > -1 || lang.indexOf(target) > -1) {
|
|
@@ -66398,7 +66635,7 @@ var init_internals2 = __esmMin(() => {
|
|
|
66398
66635
|
noEmit = false;
|
|
66399
66636
|
}
|
|
66400
66637
|
return __awaiter4(void 0, void 0, void 0, function() {
|
|
66401
|
-
var typedDefaultValue;
|
|
66638
|
+
var typedDefaultValue, initialValue;
|
|
66402
66639
|
return __generator4(this, function(_a2) {
|
|
66403
66640
|
switch (_a2.label) {
|
|
66404
66641
|
case 0:
|
|
@@ -66414,7 +66651,8 @@ var init_internals2 = __esmMin(() => {
|
|
|
66414
66651
|
if (options3 === null || options3 === void 0 ? void 0 : options3.forceClear) {
|
|
66415
66652
|
target.value = typedDefaultValue;
|
|
66416
66653
|
} else {
|
|
66417
|
-
|
|
66654
|
+
initialValue = target.initialValue;
|
|
66655
|
+
target.value = toJS(!isUndef(initialValue) ? initialValue : typedDefaultValue);
|
|
66418
66656
|
}
|
|
66419
66657
|
}
|
|
66420
66658
|
if (!noEmit) {
|
|
@@ -66458,15 +66696,10 @@ var init_internals2 = __esmMin(() => {
|
|
|
66458
66696
|
return value;
|
|
66459
66697
|
};
|
|
66460
66698
|
allowAssignDefaultValue = function(target, source) {
|
|
66461
|
-
var isEmptyTarget = target !== null && isEmpty(target);
|
|
66462
|
-
var isEmptySource = source !== null && isEmpty(source);
|
|
66463
66699
|
var isValidTarget = !isUndef(target);
|
|
66464
66700
|
var isValidSource = !isUndef(source);
|
|
66465
66701
|
if (!isValidTarget) {
|
|
66466
|
-
|
|
66467
|
-
return true;
|
|
66468
|
-
}
|
|
66469
|
-
return false;
|
|
66702
|
+
return isValidSource;
|
|
66470
66703
|
}
|
|
66471
66704
|
if (typeof target === typeof source) {
|
|
66472
66705
|
if (target === "")
|
|
@@ -66474,12 +66707,10 @@ var init_internals2 = __esmMin(() => {
|
|
|
66474
66707
|
if (target === 0)
|
|
66475
66708
|
return false;
|
|
66476
66709
|
}
|
|
66710
|
+
var isEmptyTarget = target !== null && isEmpty(target);
|
|
66711
|
+
var isEmptySource = source !== null && isEmpty(source);
|
|
66477
66712
|
if (isEmptyTarget) {
|
|
66478
|
-
|
|
66479
|
-
return false;
|
|
66480
|
-
} else {
|
|
66481
|
-
return true;
|
|
66482
|
-
}
|
|
66713
|
+
return !isEmptySource;
|
|
66483
66714
|
}
|
|
66484
66715
|
return false;
|
|
66485
66716
|
};
|
|
@@ -67384,8 +67615,14 @@ var init_Field = __esmMin(() => {
|
|
|
67384
67615
|
return _this.value;
|
|
67385
67616
|
}, function(value) {
|
|
67386
67617
|
_this.notify(LifeCycleTypes.ON_FIELD_VALUE_CHANGE);
|
|
67387
|
-
if (isValid(value)
|
|
67388
|
-
|
|
67618
|
+
if (isValid(value)) {
|
|
67619
|
+
if (_this.selfModified && !_this.caches.inputting) {
|
|
67620
|
+
validateSelf(_this);
|
|
67621
|
+
}
|
|
67622
|
+
if (!isEmpty(value) && _this.display === "none") {
|
|
67623
|
+
_this.caches.value = toJS(value);
|
|
67624
|
+
_this.form.deleteValuesIn(_this.path);
|
|
67625
|
+
}
|
|
67389
67626
|
}
|
|
67390
67627
|
}), createReaction(function() {
|
|
67391
67628
|
return _this.initialValue;
|
|
@@ -67396,16 +67633,14 @@ var init_Field = __esmMin(() => {
|
|
|
67396
67633
|
}, function(display) {
|
|
67397
67634
|
var _a2;
|
|
67398
67635
|
var value = _this.value;
|
|
67399
|
-
if (display
|
|
67400
|
-
if (
|
|
67636
|
+
if (display !== "none") {
|
|
67637
|
+
if (!isValid(value)) {
|
|
67401
67638
|
_this.setValue(_this.caches.value);
|
|
67402
67639
|
_this.caches.value = void 0;
|
|
67403
67640
|
}
|
|
67404
67641
|
} else {
|
|
67405
67642
|
_this.caches.value = (_a2 = toJS(value)) !== null && _a2 !== void 0 ? _a2 : toJS(_this.initialValue);
|
|
67406
|
-
|
|
67407
|
-
_this.form.deleteValuesIn(_this.path);
|
|
67408
|
-
}
|
|
67643
|
+
_this.form.deleteValuesIn(_this.path);
|
|
67409
67644
|
}
|
|
67410
67645
|
if (display === "none" || display === "hidden") {
|
|
67411
67646
|
_this.setFeedback({
|
|
@@ -68139,13 +68374,14 @@ var init_Form = __esmMin(() => {
|
|
|
68139
68374
|
if (!isPlainObj(values))
|
|
68140
68375
|
return;
|
|
68141
68376
|
if (strategy === "merge" || strategy === "deepMerge") {
|
|
68142
|
-
|
|
68377
|
+
merge(_this.values, values, {
|
|
68143
68378
|
arrayMerge: function(target, source) {
|
|
68144
68379
|
return source;
|
|
68145
|
-
}
|
|
68380
|
+
},
|
|
68381
|
+
assign: true
|
|
68146
68382
|
});
|
|
68147
68383
|
} else if (strategy === "shallowMerge") {
|
|
68148
|
-
|
|
68384
|
+
Object.assign(_this.values, values);
|
|
68149
68385
|
} else {
|
|
68150
68386
|
_this.values = values;
|
|
68151
68387
|
}
|
|
@@ -68157,13 +68393,14 @@ var init_Form = __esmMin(() => {
|
|
|
68157
68393
|
if (!isPlainObj(initialValues))
|
|
68158
68394
|
return;
|
|
68159
68395
|
if (strategy === "merge" || strategy === "deepMerge") {
|
|
68160
|
-
|
|
68396
|
+
merge(_this.initialValues, initialValues, {
|
|
68161
68397
|
arrayMerge: function(target, source) {
|
|
68162
68398
|
return source;
|
|
68163
|
-
}
|
|
68399
|
+
},
|
|
68400
|
+
assign: true
|
|
68164
68401
|
});
|
|
68165
68402
|
} else if (strategy === "shallowMerge") {
|
|
68166
|
-
|
|
68403
|
+
Object.assign(_this.initialValues, initialValues);
|
|
68167
68404
|
} else {
|
|
68168
68405
|
_this.initialValues = initialValues;
|
|
68169
68406
|
}
|
|
@@ -68612,6 +68849,7 @@ function createFormEffect(type) {
|
|
|
68612
68849
|
}
|
|
68613
68850
|
var onFormInit, onFormMount, onFormUnmount, onFormValuesChange, onFormInitialValuesChange, onFormInputChange, onFormSubmit, onFormReset, onFormSubmitStart, onFormSubmitEnd, onFormSubmitSuccess, onFormSubmitFailed, onFormSubmitValidateStart, onFormSubmitValidateSuccess, onFormSubmitValidateFailed, onFormSubmitValidateEnd, onFormValidateStart, onFormValidateSuccess, onFormValidateFailed, onFormValidateEnd, onFormGraphChange, onFormLoading;
|
|
68614
68851
|
var init_onFormEffects = __esmMin(() => {
|
|
68852
|
+
init_esm2();
|
|
68615
68853
|
init_esm3();
|
|
68616
68854
|
init_types4();
|
|
68617
68855
|
init_effective();
|
|
@@ -71736,7 +71974,6 @@ var require_animationFrames = __commonJSMin((exports) => {
|
|
|
71736
71974
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
71737
71975
|
exports.animationFrames = void 0;
|
|
71738
71976
|
var Observable_1 = require_Observable();
|
|
71739
|
-
var Subscription_1 = require_Subscription();
|
|
71740
71977
|
var performanceTimestampProvider_1 = require_performanceTimestampProvider();
|
|
71741
71978
|
var animationFrameProvider_1 = require_animationFrameProvider();
|
|
71742
71979
|
function animationFrames(timestampProvider) {
|
|
@@ -71744,23 +71981,29 @@ var require_animationFrames = __commonJSMin((exports) => {
|
|
|
71744
71981
|
}
|
|
71745
71982
|
exports.animationFrames = animationFrames;
|
|
71746
71983
|
function animationFramesFactory(timestampProvider) {
|
|
71747
|
-
var schedule = animationFrameProvider_1.animationFrameProvider.schedule;
|
|
71748
71984
|
return new Observable_1.Observable(function(subscriber) {
|
|
71749
|
-
var subscription = new Subscription_1.Subscription();
|
|
71750
71985
|
var provider = timestampProvider || performanceTimestampProvider_1.performanceTimestampProvider;
|
|
71751
71986
|
var start = provider.now();
|
|
71752
|
-
var
|
|
71753
|
-
|
|
71754
|
-
subscriber.next({
|
|
71755
|
-
timestamp: timestampProvider ? now : timestamp,
|
|
71756
|
-
elapsed: now - start
|
|
71757
|
-
});
|
|
71987
|
+
var id = 0;
|
|
71988
|
+
var run = function() {
|
|
71758
71989
|
if (!subscriber.closed) {
|
|
71759
|
-
|
|
71990
|
+
id = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function(timestamp) {
|
|
71991
|
+
id = 0;
|
|
71992
|
+
var now = provider.now();
|
|
71993
|
+
subscriber.next({
|
|
71994
|
+
timestamp: timestampProvider ? now : timestamp,
|
|
71995
|
+
elapsed: now - start
|
|
71996
|
+
});
|
|
71997
|
+
run();
|
|
71998
|
+
});
|
|
71999
|
+
}
|
|
72000
|
+
};
|
|
72001
|
+
run();
|
|
72002
|
+
return function() {
|
|
72003
|
+
if (id) {
|
|
72004
|
+
animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id);
|
|
71760
72005
|
}
|
|
71761
72006
|
};
|
|
71762
|
-
subscription.add(schedule(run));
|
|
71763
|
-
return subscription;
|
|
71764
72007
|
});
|
|
71765
72008
|
}
|
|
71766
72009
|
var DEFAULT_ANIMATION_FRAMES = animationFramesFactory();
|
|
@@ -72329,6 +72572,7 @@ var require_AsyncAction = __commonJSMin((exports) => {
|
|
|
72329
72572
|
return _this;
|
|
72330
72573
|
}
|
|
72331
72574
|
AsyncAction2.prototype.schedule = function(state, delay) {
|
|
72575
|
+
var _a2;
|
|
72332
72576
|
if (delay === void 0) {
|
|
72333
72577
|
delay = 0;
|
|
72334
72578
|
}
|
|
@@ -72343,7 +72587,7 @@ var require_AsyncAction = __commonJSMin((exports) => {
|
|
|
72343
72587
|
}
|
|
72344
72588
|
this.pending = true;
|
|
72345
72589
|
this.delay = delay;
|
|
72346
|
-
this.id = this.id
|
|
72590
|
+
this.id = (_a2 = this.id) !== null && _a2 !== void 0 ? _a2 : this.requestAsyncId(scheduler, this.id, delay);
|
|
72347
72591
|
return this;
|
|
72348
72592
|
};
|
|
72349
72593
|
AsyncAction2.prototype.requestAsyncId = function(scheduler, _id, delay) {
|
|
@@ -72359,7 +72603,9 @@ var require_AsyncAction = __commonJSMin((exports) => {
|
|
|
72359
72603
|
if (delay != null && this.delay === delay && this.pending === false) {
|
|
72360
72604
|
return id;
|
|
72361
72605
|
}
|
|
72362
|
-
|
|
72606
|
+
if (id != null) {
|
|
72607
|
+
intervalProvider_1.intervalProvider.clearInterval(id);
|
|
72608
|
+
}
|
|
72363
72609
|
return void 0;
|
|
72364
72610
|
};
|
|
72365
72611
|
AsyncAction2.prototype.execute = function(state, delay) {
|
|
@@ -72537,15 +72783,15 @@ var require_AsapAction = __commonJSMin((exports) => {
|
|
|
72537
72783
|
return scheduler._scheduled || (scheduler._scheduled = immediateProvider_1.immediateProvider.setImmediate(scheduler.flush.bind(scheduler, void 0)));
|
|
72538
72784
|
};
|
|
72539
72785
|
AsapAction2.prototype.recycleAsyncId = function(scheduler, id, delay) {
|
|
72786
|
+
var _a2;
|
|
72540
72787
|
if (delay === void 0) {
|
|
72541
72788
|
delay = 0;
|
|
72542
72789
|
}
|
|
72543
|
-
if (delay != null
|
|
72790
|
+
if (delay != null ? delay > 0 : this.delay > 0) {
|
|
72544
72791
|
return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
|
|
72545
72792
|
}
|
|
72546
|
-
|
|
72547
|
-
|
|
72548
|
-
})) {
|
|
72793
|
+
var actions = scheduler.actions;
|
|
72794
|
+
if (id != null && ((_a2 = actions[actions.length - 1]) === null || _a2 === void 0 ? void 0 : _a2.id) !== id) {
|
|
72549
72795
|
immediateProvider_1.immediateProvider.clearImmediate(id);
|
|
72550
72796
|
scheduler._scheduled = void 0;
|
|
72551
72797
|
}
|
|
@@ -72614,7 +72860,6 @@ var require_AsyncScheduler = __commonJSMin((exports) => {
|
|
|
72614
72860
|
var _this = _super.call(this, SchedulerAction, now) || this;
|
|
72615
72861
|
_this.actions = [];
|
|
72616
72862
|
_this._active = false;
|
|
72617
|
-
_this._scheduled = void 0;
|
|
72618
72863
|
return _this;
|
|
72619
72864
|
}
|
|
72620
72865
|
AsyncScheduler2.prototype.flush = function(action2) {
|
|
@@ -72771,7 +73016,8 @@ var require_QueueAction = __commonJSMin((exports) => {
|
|
|
72771
73016
|
if (delay != null && delay > 0 || delay == null && this.delay > 0) {
|
|
72772
73017
|
return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
|
|
72773
73018
|
}
|
|
72774
|
-
|
|
73019
|
+
scheduler.flush(this);
|
|
73020
|
+
return 0;
|
|
72775
73021
|
};
|
|
72776
73022
|
return QueueAction2;
|
|
72777
73023
|
}(AsyncAction_1.AsyncAction);
|
|
@@ -72869,15 +73115,15 @@ var require_AnimationFrameAction = __commonJSMin((exports) => {
|
|
|
72869
73115
|
}));
|
|
72870
73116
|
};
|
|
72871
73117
|
AnimationFrameAction2.prototype.recycleAsyncId = function(scheduler, id, delay) {
|
|
73118
|
+
var _a2;
|
|
72872
73119
|
if (delay === void 0) {
|
|
72873
73120
|
delay = 0;
|
|
72874
73121
|
}
|
|
72875
|
-
if (delay != null
|
|
73122
|
+
if (delay != null ? delay > 0 : this.delay > 0) {
|
|
72876
73123
|
return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
|
|
72877
73124
|
}
|
|
72878
|
-
|
|
72879
|
-
|
|
72880
|
-
})) {
|
|
73125
|
+
var actions = scheduler.actions;
|
|
73126
|
+
if (id != null && ((_a2 = actions[actions.length - 1]) === null || _a2 === void 0 ? void 0 : _a2.id) !== id) {
|
|
72881
73127
|
animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id);
|
|
72882
73128
|
scheduler._scheduled = void 0;
|
|
72883
73129
|
}
|
|
@@ -73056,7 +73302,7 @@ var require_VirtualTimeScheduler = __commonJSMin((exports) => {
|
|
|
73056
73302
|
var actions = scheduler.actions;
|
|
73057
73303
|
actions.push(this);
|
|
73058
73304
|
actions.sort(VirtualAction2.sortActions);
|
|
73059
|
-
return
|
|
73305
|
+
return 1;
|
|
73060
73306
|
};
|
|
73061
73307
|
VirtualAction2.prototype.recycleAsyncId = function(scheduler, id, delay) {
|
|
73062
73308
|
if (delay === void 0) {
|
|
@@ -76155,7 +76401,7 @@ var require_connect = __commonJSMin((exports) => {
|
|
|
76155
76401
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76156
76402
|
exports.connect = void 0;
|
|
76157
76403
|
var Subject_1 = require_Subject();
|
|
76158
|
-
var
|
|
76404
|
+
var innerFrom_1 = require_innerFrom();
|
|
76159
76405
|
var lift_1 = require_lift();
|
|
76160
76406
|
var fromSubscribable_1 = require_fromSubscribable();
|
|
76161
76407
|
var DEFAULT_CONFIG = {
|
|
@@ -76170,7 +76416,7 @@ var require_connect = __commonJSMin((exports) => {
|
|
|
76170
76416
|
var connector = config.connector;
|
|
76171
76417
|
return lift_1.operate(function(source, subscriber) {
|
|
76172
76418
|
var subject = connector();
|
|
76173
|
-
|
|
76419
|
+
innerFrom_1.innerFrom(selector(fromSubscribable_1.fromSubscribable(subject))).subscribe(subscriber);
|
|
76174
76420
|
subscriber.add(source.subscribe(subject));
|
|
76175
76421
|
});
|
|
76176
76422
|
}
|
|
@@ -76586,39 +76832,6 @@ var require_every = __commonJSMin((exports) => {
|
|
|
76586
76832
|
}
|
|
76587
76833
|
exports.every = every;
|
|
76588
76834
|
});
|
|
76589
|
-
var require_exhaustAll = __commonJSMin((exports) => {
|
|
76590
|
-
"use strict";
|
|
76591
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76592
|
-
exports.exhaustAll = void 0;
|
|
76593
|
-
var lift_1 = require_lift();
|
|
76594
|
-
var innerFrom_1 = require_innerFrom();
|
|
76595
|
-
var OperatorSubscriber_1 = require_OperatorSubscriber();
|
|
76596
|
-
function exhaustAll() {
|
|
76597
|
-
return lift_1.operate(function(source, subscriber) {
|
|
76598
|
-
var isComplete = false;
|
|
76599
|
-
var innerSub = null;
|
|
76600
|
-
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(inner) {
|
|
76601
|
-
if (!innerSub) {
|
|
76602
|
-
innerSub = innerFrom_1.innerFrom(inner).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, void 0, function() {
|
|
76603
|
-
innerSub = null;
|
|
76604
|
-
isComplete && subscriber.complete();
|
|
76605
|
-
}));
|
|
76606
|
-
}
|
|
76607
|
-
}, function() {
|
|
76608
|
-
isComplete = true;
|
|
76609
|
-
!innerSub && subscriber.complete();
|
|
76610
|
-
}));
|
|
76611
|
-
});
|
|
76612
|
-
}
|
|
76613
|
-
exports.exhaustAll = exhaustAll;
|
|
76614
|
-
});
|
|
76615
|
-
var require_exhaust = __commonJSMin((exports) => {
|
|
76616
|
-
"use strict";
|
|
76617
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76618
|
-
exports.exhaust = void 0;
|
|
76619
|
-
var exhaustAll_1 = require_exhaustAll();
|
|
76620
|
-
exports.exhaust = exhaustAll_1.exhaustAll;
|
|
76621
|
-
});
|
|
76622
76835
|
var require_exhaustMap = __commonJSMin((exports) => {
|
|
76623
76836
|
"use strict";
|
|
76624
76837
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -76657,6 +76870,24 @@ var require_exhaustMap = __commonJSMin((exports) => {
|
|
|
76657
76870
|
}
|
|
76658
76871
|
exports.exhaustMap = exhaustMap;
|
|
76659
76872
|
});
|
|
76873
|
+
var require_exhaustAll = __commonJSMin((exports) => {
|
|
76874
|
+
"use strict";
|
|
76875
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76876
|
+
exports.exhaustAll = void 0;
|
|
76877
|
+
var exhaustMap_1 = require_exhaustMap();
|
|
76878
|
+
var identity_1 = require_identity();
|
|
76879
|
+
function exhaustAll() {
|
|
76880
|
+
return exhaustMap_1.exhaustMap(identity_1.identity);
|
|
76881
|
+
}
|
|
76882
|
+
exports.exhaustAll = exhaustAll;
|
|
76883
|
+
});
|
|
76884
|
+
var require_exhaust = __commonJSMin((exports) => {
|
|
76885
|
+
"use strict";
|
|
76886
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76887
|
+
exports.exhaust = void 0;
|
|
76888
|
+
var exhaustAll_1 = require_exhaustAll();
|
|
76889
|
+
exports.exhaust = exhaustAll_1.exhaustAll;
|
|
76890
|
+
});
|
|
76660
76891
|
var require_expand = __commonJSMin((exports) => {
|
|
76661
76892
|
"use strict";
|
|
76662
76893
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -77649,8 +77880,7 @@ var require_share = __commonJSMin((exports) => {
|
|
|
77649
77880
|
};
|
|
77650
77881
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
77651
77882
|
exports.share = void 0;
|
|
77652
|
-
var
|
|
77653
|
-
var take_1 = require_take();
|
|
77883
|
+
var innerFrom_1 = require_innerFrom();
|
|
77654
77884
|
var Subject_1 = require_Subject();
|
|
77655
77885
|
var Subscriber_1 = require_Subscriber();
|
|
77656
77886
|
var lift_1 = require_lift();
|
|
@@ -77662,19 +77892,19 @@ var require_share = __commonJSMin((exports) => {
|
|
|
77662
77892
|
return new Subject_1.Subject();
|
|
77663
77893
|
} : _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;
|
|
77664
77894
|
return function(wrapperSource) {
|
|
77665
|
-
var connection
|
|
77666
|
-
var resetConnection
|
|
77667
|
-
var subject
|
|
77895
|
+
var connection;
|
|
77896
|
+
var resetConnection;
|
|
77897
|
+
var subject;
|
|
77668
77898
|
var refCount = 0;
|
|
77669
77899
|
var hasCompleted = false;
|
|
77670
77900
|
var hasErrored = false;
|
|
77671
77901
|
var cancelReset = function() {
|
|
77672
77902
|
resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();
|
|
77673
|
-
resetConnection =
|
|
77903
|
+
resetConnection = void 0;
|
|
77674
77904
|
};
|
|
77675
77905
|
var reset = function() {
|
|
77676
77906
|
cancelReset();
|
|
77677
|
-
connection = subject =
|
|
77907
|
+
connection = subject = void 0;
|
|
77678
77908
|
hasCompleted = hasErrored = false;
|
|
77679
77909
|
};
|
|
77680
77910
|
var resetAndUnsubscribe = function() {
|
|
@@ -77695,7 +77925,7 @@ var require_share = __commonJSMin((exports) => {
|
|
|
77695
77925
|
}
|
|
77696
77926
|
});
|
|
77697
77927
|
dest.subscribe(subscriber);
|
|
77698
|
-
if (!connection) {
|
|
77928
|
+
if (!connection && refCount > 0) {
|
|
77699
77929
|
connection = new Subscriber_1.SafeSubscriber({
|
|
77700
77930
|
next: function(value) {
|
|
77701
77931
|
return dest.next(value);
|
|
@@ -77713,7 +77943,7 @@ var require_share = __commonJSMin((exports) => {
|
|
|
77713
77943
|
dest.complete();
|
|
77714
77944
|
}
|
|
77715
77945
|
});
|
|
77716
|
-
|
|
77946
|
+
innerFrom_1.innerFrom(source).subscribe(connection);
|
|
77717
77947
|
}
|
|
77718
77948
|
})(wrapperSource);
|
|
77719
77949
|
};
|
|
@@ -77726,14 +77956,18 @@ var require_share = __commonJSMin((exports) => {
|
|
|
77726
77956
|
}
|
|
77727
77957
|
if (on === true) {
|
|
77728
77958
|
reset();
|
|
77729
|
-
return
|
|
77959
|
+
return;
|
|
77730
77960
|
}
|
|
77731
77961
|
if (on === false) {
|
|
77732
|
-
return
|
|
77962
|
+
return;
|
|
77733
77963
|
}
|
|
77734
|
-
|
|
77735
|
-
|
|
77964
|
+
var onSubscriber = new Subscriber_1.SafeSubscriber({
|
|
77965
|
+
next: function() {
|
|
77966
|
+
onSubscriber.unsubscribe();
|
|
77967
|
+
reset();
|
|
77968
|
+
}
|
|
77736
77969
|
});
|
|
77970
|
+
return on.apply(void 0, __spreadArray8([], __read9(args))).subscribe(onSubscriber);
|
|
77737
77971
|
}
|
|
77738
77972
|
});
|
|
77739
77973
|
var require_shareReplay = __commonJSMin((exports) => {
|
|
@@ -82166,6 +82400,1237 @@ var require_string_width = __commonJSMin((exports, module2) => {
|
|
|
82166
82400
|
module2.exports = stringWidth;
|
|
82167
82401
|
module2.exports.default = stringWidth;
|
|
82168
82402
|
});
|
|
82403
|
+
var require_color_name = __commonJSMin((exports, module2) => {
|
|
82404
|
+
"use strict";
|
|
82405
|
+
module2.exports = {
|
|
82406
|
+
"aliceblue": [240, 248, 255],
|
|
82407
|
+
"antiquewhite": [250, 235, 215],
|
|
82408
|
+
"aqua": [0, 255, 255],
|
|
82409
|
+
"aquamarine": [127, 255, 212],
|
|
82410
|
+
"azure": [240, 255, 255],
|
|
82411
|
+
"beige": [245, 245, 220],
|
|
82412
|
+
"bisque": [255, 228, 196],
|
|
82413
|
+
"black": [0, 0, 0],
|
|
82414
|
+
"blanchedalmond": [255, 235, 205],
|
|
82415
|
+
"blue": [0, 0, 255],
|
|
82416
|
+
"blueviolet": [138, 43, 226],
|
|
82417
|
+
"brown": [165, 42, 42],
|
|
82418
|
+
"burlywood": [222, 184, 135],
|
|
82419
|
+
"cadetblue": [95, 158, 160],
|
|
82420
|
+
"chartreuse": [127, 255, 0],
|
|
82421
|
+
"chocolate": [210, 105, 30],
|
|
82422
|
+
"coral": [255, 127, 80],
|
|
82423
|
+
"cornflowerblue": [100, 149, 237],
|
|
82424
|
+
"cornsilk": [255, 248, 220],
|
|
82425
|
+
"crimson": [220, 20, 60],
|
|
82426
|
+
"cyan": [0, 255, 255],
|
|
82427
|
+
"darkblue": [0, 0, 139],
|
|
82428
|
+
"darkcyan": [0, 139, 139],
|
|
82429
|
+
"darkgoldenrod": [184, 134, 11],
|
|
82430
|
+
"darkgray": [169, 169, 169],
|
|
82431
|
+
"darkgreen": [0, 100, 0],
|
|
82432
|
+
"darkgrey": [169, 169, 169],
|
|
82433
|
+
"darkkhaki": [189, 183, 107],
|
|
82434
|
+
"darkmagenta": [139, 0, 139],
|
|
82435
|
+
"darkolivegreen": [85, 107, 47],
|
|
82436
|
+
"darkorange": [255, 140, 0],
|
|
82437
|
+
"darkorchid": [153, 50, 204],
|
|
82438
|
+
"darkred": [139, 0, 0],
|
|
82439
|
+
"darksalmon": [233, 150, 122],
|
|
82440
|
+
"darkseagreen": [143, 188, 143],
|
|
82441
|
+
"darkslateblue": [72, 61, 139],
|
|
82442
|
+
"darkslategray": [47, 79, 79],
|
|
82443
|
+
"darkslategrey": [47, 79, 79],
|
|
82444
|
+
"darkturquoise": [0, 206, 209],
|
|
82445
|
+
"darkviolet": [148, 0, 211],
|
|
82446
|
+
"deeppink": [255, 20, 147],
|
|
82447
|
+
"deepskyblue": [0, 191, 255],
|
|
82448
|
+
"dimgray": [105, 105, 105],
|
|
82449
|
+
"dimgrey": [105, 105, 105],
|
|
82450
|
+
"dodgerblue": [30, 144, 255],
|
|
82451
|
+
"firebrick": [178, 34, 34],
|
|
82452
|
+
"floralwhite": [255, 250, 240],
|
|
82453
|
+
"forestgreen": [34, 139, 34],
|
|
82454
|
+
"fuchsia": [255, 0, 255],
|
|
82455
|
+
"gainsboro": [220, 220, 220],
|
|
82456
|
+
"ghostwhite": [248, 248, 255],
|
|
82457
|
+
"gold": [255, 215, 0],
|
|
82458
|
+
"goldenrod": [218, 165, 32],
|
|
82459
|
+
"gray": [128, 128, 128],
|
|
82460
|
+
"green": [0, 128, 0],
|
|
82461
|
+
"greenyellow": [173, 255, 47],
|
|
82462
|
+
"grey": [128, 128, 128],
|
|
82463
|
+
"honeydew": [240, 255, 240],
|
|
82464
|
+
"hotpink": [255, 105, 180],
|
|
82465
|
+
"indianred": [205, 92, 92],
|
|
82466
|
+
"indigo": [75, 0, 130],
|
|
82467
|
+
"ivory": [255, 255, 240],
|
|
82468
|
+
"khaki": [240, 230, 140],
|
|
82469
|
+
"lavender": [230, 230, 250],
|
|
82470
|
+
"lavenderblush": [255, 240, 245],
|
|
82471
|
+
"lawngreen": [124, 252, 0],
|
|
82472
|
+
"lemonchiffon": [255, 250, 205],
|
|
82473
|
+
"lightblue": [173, 216, 230],
|
|
82474
|
+
"lightcoral": [240, 128, 128],
|
|
82475
|
+
"lightcyan": [224, 255, 255],
|
|
82476
|
+
"lightgoldenrodyellow": [250, 250, 210],
|
|
82477
|
+
"lightgray": [211, 211, 211],
|
|
82478
|
+
"lightgreen": [144, 238, 144],
|
|
82479
|
+
"lightgrey": [211, 211, 211],
|
|
82480
|
+
"lightpink": [255, 182, 193],
|
|
82481
|
+
"lightsalmon": [255, 160, 122],
|
|
82482
|
+
"lightseagreen": [32, 178, 170],
|
|
82483
|
+
"lightskyblue": [135, 206, 250],
|
|
82484
|
+
"lightslategray": [119, 136, 153],
|
|
82485
|
+
"lightslategrey": [119, 136, 153],
|
|
82486
|
+
"lightsteelblue": [176, 196, 222],
|
|
82487
|
+
"lightyellow": [255, 255, 224],
|
|
82488
|
+
"lime": [0, 255, 0],
|
|
82489
|
+
"limegreen": [50, 205, 50],
|
|
82490
|
+
"linen": [250, 240, 230],
|
|
82491
|
+
"magenta": [255, 0, 255],
|
|
82492
|
+
"maroon": [128, 0, 0],
|
|
82493
|
+
"mediumaquamarine": [102, 205, 170],
|
|
82494
|
+
"mediumblue": [0, 0, 205],
|
|
82495
|
+
"mediumorchid": [186, 85, 211],
|
|
82496
|
+
"mediumpurple": [147, 112, 219],
|
|
82497
|
+
"mediumseagreen": [60, 179, 113],
|
|
82498
|
+
"mediumslateblue": [123, 104, 238],
|
|
82499
|
+
"mediumspringgreen": [0, 250, 154],
|
|
82500
|
+
"mediumturquoise": [72, 209, 204],
|
|
82501
|
+
"mediumvioletred": [199, 21, 133],
|
|
82502
|
+
"midnightblue": [25, 25, 112],
|
|
82503
|
+
"mintcream": [245, 255, 250],
|
|
82504
|
+
"mistyrose": [255, 228, 225],
|
|
82505
|
+
"moccasin": [255, 228, 181],
|
|
82506
|
+
"navajowhite": [255, 222, 173],
|
|
82507
|
+
"navy": [0, 0, 128],
|
|
82508
|
+
"oldlace": [253, 245, 230],
|
|
82509
|
+
"olive": [128, 128, 0],
|
|
82510
|
+
"olivedrab": [107, 142, 35],
|
|
82511
|
+
"orange": [255, 165, 0],
|
|
82512
|
+
"orangered": [255, 69, 0],
|
|
82513
|
+
"orchid": [218, 112, 214],
|
|
82514
|
+
"palegoldenrod": [238, 232, 170],
|
|
82515
|
+
"palegreen": [152, 251, 152],
|
|
82516
|
+
"paleturquoise": [175, 238, 238],
|
|
82517
|
+
"palevioletred": [219, 112, 147],
|
|
82518
|
+
"papayawhip": [255, 239, 213],
|
|
82519
|
+
"peachpuff": [255, 218, 185],
|
|
82520
|
+
"peru": [205, 133, 63],
|
|
82521
|
+
"pink": [255, 192, 203],
|
|
82522
|
+
"plum": [221, 160, 221],
|
|
82523
|
+
"powderblue": [176, 224, 230],
|
|
82524
|
+
"purple": [128, 0, 128],
|
|
82525
|
+
"rebeccapurple": [102, 51, 153],
|
|
82526
|
+
"red": [255, 0, 0],
|
|
82527
|
+
"rosybrown": [188, 143, 143],
|
|
82528
|
+
"royalblue": [65, 105, 225],
|
|
82529
|
+
"saddlebrown": [139, 69, 19],
|
|
82530
|
+
"salmon": [250, 128, 114],
|
|
82531
|
+
"sandybrown": [244, 164, 96],
|
|
82532
|
+
"seagreen": [46, 139, 87],
|
|
82533
|
+
"seashell": [255, 245, 238],
|
|
82534
|
+
"sienna": [160, 82, 45],
|
|
82535
|
+
"silver": [192, 192, 192],
|
|
82536
|
+
"skyblue": [135, 206, 235],
|
|
82537
|
+
"slateblue": [106, 90, 205],
|
|
82538
|
+
"slategray": [112, 128, 144],
|
|
82539
|
+
"slategrey": [112, 128, 144],
|
|
82540
|
+
"snow": [255, 250, 250],
|
|
82541
|
+
"springgreen": [0, 255, 127],
|
|
82542
|
+
"steelblue": [70, 130, 180],
|
|
82543
|
+
"tan": [210, 180, 140],
|
|
82544
|
+
"teal": [0, 128, 128],
|
|
82545
|
+
"thistle": [216, 191, 216],
|
|
82546
|
+
"tomato": [255, 99, 71],
|
|
82547
|
+
"turquoise": [64, 224, 208],
|
|
82548
|
+
"violet": [238, 130, 238],
|
|
82549
|
+
"wheat": [245, 222, 179],
|
|
82550
|
+
"white": [255, 255, 255],
|
|
82551
|
+
"whitesmoke": [245, 245, 245],
|
|
82552
|
+
"yellow": [255, 255, 0],
|
|
82553
|
+
"yellowgreen": [154, 205, 50]
|
|
82554
|
+
};
|
|
82555
|
+
});
|
|
82556
|
+
var require_conversions = __commonJSMin((exports, module2) => {
|
|
82557
|
+
var cssKeywords = require_color_name();
|
|
82558
|
+
var reverseKeywords = {};
|
|
82559
|
+
for (const key of Object.keys(cssKeywords)) {
|
|
82560
|
+
reverseKeywords[cssKeywords[key]] = key;
|
|
82561
|
+
}
|
|
82562
|
+
var convert = {
|
|
82563
|
+
rgb: { channels: 3, labels: "rgb" },
|
|
82564
|
+
hsl: { channels: 3, labels: "hsl" },
|
|
82565
|
+
hsv: { channels: 3, labels: "hsv" },
|
|
82566
|
+
hwb: { channels: 3, labels: "hwb" },
|
|
82567
|
+
cmyk: { channels: 4, labels: "cmyk" },
|
|
82568
|
+
xyz: { channels: 3, labels: "xyz" },
|
|
82569
|
+
lab: { channels: 3, labels: "lab" },
|
|
82570
|
+
lch: { channels: 3, labels: "lch" },
|
|
82571
|
+
hex: { channels: 1, labels: ["hex"] },
|
|
82572
|
+
keyword: { channels: 1, labels: ["keyword"] },
|
|
82573
|
+
ansi16: { channels: 1, labels: ["ansi16"] },
|
|
82574
|
+
ansi256: { channels: 1, labels: ["ansi256"] },
|
|
82575
|
+
hcg: { channels: 3, labels: ["h", "c", "g"] },
|
|
82576
|
+
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
|
82577
|
+
gray: { channels: 1, labels: ["gray"] }
|
|
82578
|
+
};
|
|
82579
|
+
module2.exports = convert;
|
|
82580
|
+
for (const model of Object.keys(convert)) {
|
|
82581
|
+
if (!("channels" in convert[model])) {
|
|
82582
|
+
throw new Error("missing channels property: " + model);
|
|
82583
|
+
}
|
|
82584
|
+
if (!("labels" in convert[model])) {
|
|
82585
|
+
throw new Error("missing channel labels property: " + model);
|
|
82586
|
+
}
|
|
82587
|
+
if (convert[model].labels.length !== convert[model].channels) {
|
|
82588
|
+
throw new Error("channel and label counts mismatch: " + model);
|
|
82589
|
+
}
|
|
82590
|
+
const { channels, labels } = convert[model];
|
|
82591
|
+
delete convert[model].channels;
|
|
82592
|
+
delete convert[model].labels;
|
|
82593
|
+
Object.defineProperty(convert[model], "channels", { value: channels });
|
|
82594
|
+
Object.defineProperty(convert[model], "labels", { value: labels });
|
|
82595
|
+
}
|
|
82596
|
+
convert.rgb.hsl = function(rgb) {
|
|
82597
|
+
const r = rgb[0] / 255;
|
|
82598
|
+
const g = rgb[1] / 255;
|
|
82599
|
+
const b = rgb[2] / 255;
|
|
82600
|
+
const min = Math.min(r, g, b);
|
|
82601
|
+
const max = Math.max(r, g, b);
|
|
82602
|
+
const delta = max - min;
|
|
82603
|
+
let h;
|
|
82604
|
+
let s;
|
|
82605
|
+
if (max === min) {
|
|
82606
|
+
h = 0;
|
|
82607
|
+
} else if (r === max) {
|
|
82608
|
+
h = (g - b) / delta;
|
|
82609
|
+
} else if (g === max) {
|
|
82610
|
+
h = 2 + (b - r) / delta;
|
|
82611
|
+
} else if (b === max) {
|
|
82612
|
+
h = 4 + (r - g) / delta;
|
|
82613
|
+
}
|
|
82614
|
+
h = Math.min(h * 60, 360);
|
|
82615
|
+
if (h < 0) {
|
|
82616
|
+
h += 360;
|
|
82617
|
+
}
|
|
82618
|
+
const l = (min + max) / 2;
|
|
82619
|
+
if (max === min) {
|
|
82620
|
+
s = 0;
|
|
82621
|
+
} else if (l <= 0.5) {
|
|
82622
|
+
s = delta / (max + min);
|
|
82623
|
+
} else {
|
|
82624
|
+
s = delta / (2 - max - min);
|
|
82625
|
+
}
|
|
82626
|
+
return [h, s * 100, l * 100];
|
|
82627
|
+
};
|
|
82628
|
+
convert.rgb.hsv = function(rgb) {
|
|
82629
|
+
let rdif;
|
|
82630
|
+
let gdif;
|
|
82631
|
+
let bdif;
|
|
82632
|
+
let h;
|
|
82633
|
+
let s;
|
|
82634
|
+
const r = rgb[0] / 255;
|
|
82635
|
+
const g = rgb[1] / 255;
|
|
82636
|
+
const b = rgb[2] / 255;
|
|
82637
|
+
const v = Math.max(r, g, b);
|
|
82638
|
+
const diff = v - Math.min(r, g, b);
|
|
82639
|
+
const diffc = function(c) {
|
|
82640
|
+
return (v - c) / 6 / diff + 1 / 2;
|
|
82641
|
+
};
|
|
82642
|
+
if (diff === 0) {
|
|
82643
|
+
h = 0;
|
|
82644
|
+
s = 0;
|
|
82645
|
+
} else {
|
|
82646
|
+
s = diff / v;
|
|
82647
|
+
rdif = diffc(r);
|
|
82648
|
+
gdif = diffc(g);
|
|
82649
|
+
bdif = diffc(b);
|
|
82650
|
+
if (r === v) {
|
|
82651
|
+
h = bdif - gdif;
|
|
82652
|
+
} else if (g === v) {
|
|
82653
|
+
h = 1 / 3 + rdif - bdif;
|
|
82654
|
+
} else if (b === v) {
|
|
82655
|
+
h = 2 / 3 + gdif - rdif;
|
|
82656
|
+
}
|
|
82657
|
+
if (h < 0) {
|
|
82658
|
+
h += 1;
|
|
82659
|
+
} else if (h > 1) {
|
|
82660
|
+
h -= 1;
|
|
82661
|
+
}
|
|
82662
|
+
}
|
|
82663
|
+
return [
|
|
82664
|
+
h * 360,
|
|
82665
|
+
s * 100,
|
|
82666
|
+
v * 100
|
|
82667
|
+
];
|
|
82668
|
+
};
|
|
82669
|
+
convert.rgb.hwb = function(rgb) {
|
|
82670
|
+
const r = rgb[0];
|
|
82671
|
+
const g = rgb[1];
|
|
82672
|
+
let b = rgb[2];
|
|
82673
|
+
const h = convert.rgb.hsl(rgb)[0];
|
|
82674
|
+
const w = 1 / 255 * Math.min(r, Math.min(g, b));
|
|
82675
|
+
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
82676
|
+
return [h, w * 100, b * 100];
|
|
82677
|
+
};
|
|
82678
|
+
convert.rgb.cmyk = function(rgb) {
|
|
82679
|
+
const r = rgb[0] / 255;
|
|
82680
|
+
const g = rgb[1] / 255;
|
|
82681
|
+
const b = rgb[2] / 255;
|
|
82682
|
+
const k = Math.min(1 - r, 1 - g, 1 - b);
|
|
82683
|
+
const c = (1 - r - k) / (1 - k) || 0;
|
|
82684
|
+
const m = (1 - g - k) / (1 - k) || 0;
|
|
82685
|
+
const y = (1 - b - k) / (1 - k) || 0;
|
|
82686
|
+
return [c * 100, m * 100, y * 100, k * 100];
|
|
82687
|
+
};
|
|
82688
|
+
function comparativeDistance(x, y) {
|
|
82689
|
+
return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
|
|
82690
|
+
}
|
|
82691
|
+
convert.rgb.keyword = function(rgb) {
|
|
82692
|
+
const reversed = reverseKeywords[rgb];
|
|
82693
|
+
if (reversed) {
|
|
82694
|
+
return reversed;
|
|
82695
|
+
}
|
|
82696
|
+
let currentClosestDistance = Infinity;
|
|
82697
|
+
let currentClosestKeyword;
|
|
82698
|
+
for (const keyword of Object.keys(cssKeywords)) {
|
|
82699
|
+
const value = cssKeywords[keyword];
|
|
82700
|
+
const distance = comparativeDistance(rgb, value);
|
|
82701
|
+
if (distance < currentClosestDistance) {
|
|
82702
|
+
currentClosestDistance = distance;
|
|
82703
|
+
currentClosestKeyword = keyword;
|
|
82704
|
+
}
|
|
82705
|
+
}
|
|
82706
|
+
return currentClosestKeyword;
|
|
82707
|
+
};
|
|
82708
|
+
convert.keyword.rgb = function(keyword) {
|
|
82709
|
+
return cssKeywords[keyword];
|
|
82710
|
+
};
|
|
82711
|
+
convert.rgb.xyz = function(rgb) {
|
|
82712
|
+
let r = rgb[0] / 255;
|
|
82713
|
+
let g = rgb[1] / 255;
|
|
82714
|
+
let b = rgb[2] / 255;
|
|
82715
|
+
r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
|
|
82716
|
+
g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
|
|
82717
|
+
b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
|
|
82718
|
+
const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
|
|
82719
|
+
const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
|
|
82720
|
+
const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
|
|
82721
|
+
return [x * 100, y * 100, z * 100];
|
|
82722
|
+
};
|
|
82723
|
+
convert.rgb.lab = function(rgb) {
|
|
82724
|
+
const xyz = convert.rgb.xyz(rgb);
|
|
82725
|
+
let x = xyz[0];
|
|
82726
|
+
let y = xyz[1];
|
|
82727
|
+
let z = xyz[2];
|
|
82728
|
+
x /= 95.047;
|
|
82729
|
+
y /= 100;
|
|
82730
|
+
z /= 108.883;
|
|
82731
|
+
x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
82732
|
+
y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
82733
|
+
z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
82734
|
+
const l = 116 * y - 16;
|
|
82735
|
+
const a = 500 * (x - y);
|
|
82736
|
+
const b = 200 * (y - z);
|
|
82737
|
+
return [l, a, b];
|
|
82738
|
+
};
|
|
82739
|
+
convert.hsl.rgb = function(hsl) {
|
|
82740
|
+
const h = hsl[0] / 360;
|
|
82741
|
+
const s = hsl[1] / 100;
|
|
82742
|
+
const l = hsl[2] / 100;
|
|
82743
|
+
let t2;
|
|
82744
|
+
let t3;
|
|
82745
|
+
let val;
|
|
82746
|
+
if (s === 0) {
|
|
82747
|
+
val = l * 255;
|
|
82748
|
+
return [val, val, val];
|
|
82749
|
+
}
|
|
82750
|
+
if (l < 0.5) {
|
|
82751
|
+
t2 = l * (1 + s);
|
|
82752
|
+
} else {
|
|
82753
|
+
t2 = l + s - l * s;
|
|
82754
|
+
}
|
|
82755
|
+
const t1 = 2 * l - t2;
|
|
82756
|
+
const rgb = [0, 0, 0];
|
|
82757
|
+
for (let i = 0; i < 3; i++) {
|
|
82758
|
+
t3 = h + 1 / 3 * -(i - 1);
|
|
82759
|
+
if (t3 < 0) {
|
|
82760
|
+
t3++;
|
|
82761
|
+
}
|
|
82762
|
+
if (t3 > 1) {
|
|
82763
|
+
t3--;
|
|
82764
|
+
}
|
|
82765
|
+
if (6 * t3 < 1) {
|
|
82766
|
+
val = t1 + (t2 - t1) * 6 * t3;
|
|
82767
|
+
} else if (2 * t3 < 1) {
|
|
82768
|
+
val = t2;
|
|
82769
|
+
} else if (3 * t3 < 2) {
|
|
82770
|
+
val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
|
82771
|
+
} else {
|
|
82772
|
+
val = t1;
|
|
82773
|
+
}
|
|
82774
|
+
rgb[i] = val * 255;
|
|
82775
|
+
}
|
|
82776
|
+
return rgb;
|
|
82777
|
+
};
|
|
82778
|
+
convert.hsl.hsv = function(hsl) {
|
|
82779
|
+
const h = hsl[0];
|
|
82780
|
+
let s = hsl[1] / 100;
|
|
82781
|
+
let l = hsl[2] / 100;
|
|
82782
|
+
let smin = s;
|
|
82783
|
+
const lmin = Math.max(l, 0.01);
|
|
82784
|
+
l *= 2;
|
|
82785
|
+
s *= l <= 1 ? l : 2 - l;
|
|
82786
|
+
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
82787
|
+
const v = (l + s) / 2;
|
|
82788
|
+
const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
|
|
82789
|
+
return [h, sv * 100, v * 100];
|
|
82790
|
+
};
|
|
82791
|
+
convert.hsv.rgb = function(hsv) {
|
|
82792
|
+
const h = hsv[0] / 60;
|
|
82793
|
+
const s = hsv[1] / 100;
|
|
82794
|
+
let v = hsv[2] / 100;
|
|
82795
|
+
const hi = Math.floor(h) % 6;
|
|
82796
|
+
const f = h - Math.floor(h);
|
|
82797
|
+
const p = 255 * v * (1 - s);
|
|
82798
|
+
const q = 255 * v * (1 - s * f);
|
|
82799
|
+
const t = 255 * v * (1 - s * (1 - f));
|
|
82800
|
+
v *= 255;
|
|
82801
|
+
switch (hi) {
|
|
82802
|
+
case 0:
|
|
82803
|
+
return [v, t, p];
|
|
82804
|
+
case 1:
|
|
82805
|
+
return [q, v, p];
|
|
82806
|
+
case 2:
|
|
82807
|
+
return [p, v, t];
|
|
82808
|
+
case 3:
|
|
82809
|
+
return [p, q, v];
|
|
82810
|
+
case 4:
|
|
82811
|
+
return [t, p, v];
|
|
82812
|
+
case 5:
|
|
82813
|
+
return [v, p, q];
|
|
82814
|
+
}
|
|
82815
|
+
};
|
|
82816
|
+
convert.hsv.hsl = function(hsv) {
|
|
82817
|
+
const h = hsv[0];
|
|
82818
|
+
const s = hsv[1] / 100;
|
|
82819
|
+
const v = hsv[2] / 100;
|
|
82820
|
+
const vmin = Math.max(v, 0.01);
|
|
82821
|
+
let sl;
|
|
82822
|
+
let l;
|
|
82823
|
+
l = (2 - s) * v;
|
|
82824
|
+
const lmin = (2 - s) * vmin;
|
|
82825
|
+
sl = s * vmin;
|
|
82826
|
+
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
|
82827
|
+
sl = sl || 0;
|
|
82828
|
+
l /= 2;
|
|
82829
|
+
return [h, sl * 100, l * 100];
|
|
82830
|
+
};
|
|
82831
|
+
convert.hwb.rgb = function(hwb) {
|
|
82832
|
+
const h = hwb[0] / 360;
|
|
82833
|
+
let wh = hwb[1] / 100;
|
|
82834
|
+
let bl = hwb[2] / 100;
|
|
82835
|
+
const ratio = wh + bl;
|
|
82836
|
+
let f;
|
|
82837
|
+
if (ratio > 1) {
|
|
82838
|
+
wh /= ratio;
|
|
82839
|
+
bl /= ratio;
|
|
82840
|
+
}
|
|
82841
|
+
const i = Math.floor(6 * h);
|
|
82842
|
+
const v = 1 - bl;
|
|
82843
|
+
f = 6 * h - i;
|
|
82844
|
+
if ((i & 1) !== 0) {
|
|
82845
|
+
f = 1 - f;
|
|
82846
|
+
}
|
|
82847
|
+
const n = wh + f * (v - wh);
|
|
82848
|
+
let r;
|
|
82849
|
+
let g;
|
|
82850
|
+
let b;
|
|
82851
|
+
switch (i) {
|
|
82852
|
+
default:
|
|
82853
|
+
case 6:
|
|
82854
|
+
case 0:
|
|
82855
|
+
r = v;
|
|
82856
|
+
g = n;
|
|
82857
|
+
b = wh;
|
|
82858
|
+
break;
|
|
82859
|
+
case 1:
|
|
82860
|
+
r = n;
|
|
82861
|
+
g = v;
|
|
82862
|
+
b = wh;
|
|
82863
|
+
break;
|
|
82864
|
+
case 2:
|
|
82865
|
+
r = wh;
|
|
82866
|
+
g = v;
|
|
82867
|
+
b = n;
|
|
82868
|
+
break;
|
|
82869
|
+
case 3:
|
|
82870
|
+
r = wh;
|
|
82871
|
+
g = n;
|
|
82872
|
+
b = v;
|
|
82873
|
+
break;
|
|
82874
|
+
case 4:
|
|
82875
|
+
r = n;
|
|
82876
|
+
g = wh;
|
|
82877
|
+
b = v;
|
|
82878
|
+
break;
|
|
82879
|
+
case 5:
|
|
82880
|
+
r = v;
|
|
82881
|
+
g = wh;
|
|
82882
|
+
b = n;
|
|
82883
|
+
break;
|
|
82884
|
+
}
|
|
82885
|
+
return [r * 255, g * 255, b * 255];
|
|
82886
|
+
};
|
|
82887
|
+
convert.cmyk.rgb = function(cmyk) {
|
|
82888
|
+
const c = cmyk[0] / 100;
|
|
82889
|
+
const m = cmyk[1] / 100;
|
|
82890
|
+
const y = cmyk[2] / 100;
|
|
82891
|
+
const k = cmyk[3] / 100;
|
|
82892
|
+
const r = 1 - Math.min(1, c * (1 - k) + k);
|
|
82893
|
+
const g = 1 - Math.min(1, m * (1 - k) + k);
|
|
82894
|
+
const b = 1 - Math.min(1, y * (1 - k) + k);
|
|
82895
|
+
return [r * 255, g * 255, b * 255];
|
|
82896
|
+
};
|
|
82897
|
+
convert.xyz.rgb = function(xyz) {
|
|
82898
|
+
const x = xyz[0] / 100;
|
|
82899
|
+
const y = xyz[1] / 100;
|
|
82900
|
+
const z = xyz[2] / 100;
|
|
82901
|
+
let r;
|
|
82902
|
+
let g;
|
|
82903
|
+
let b;
|
|
82904
|
+
r = x * 3.2406 + y * -1.5372 + z * -0.4986;
|
|
82905
|
+
g = x * -0.9689 + y * 1.8758 + z * 0.0415;
|
|
82906
|
+
b = x * 0.0557 + y * -0.204 + z * 1.057;
|
|
82907
|
+
r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
|
|
82908
|
+
g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
|
|
82909
|
+
b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
|
|
82910
|
+
r = Math.min(Math.max(0, r), 1);
|
|
82911
|
+
g = Math.min(Math.max(0, g), 1);
|
|
82912
|
+
b = Math.min(Math.max(0, b), 1);
|
|
82913
|
+
return [r * 255, g * 255, b * 255];
|
|
82914
|
+
};
|
|
82915
|
+
convert.xyz.lab = function(xyz) {
|
|
82916
|
+
let x = xyz[0];
|
|
82917
|
+
let y = xyz[1];
|
|
82918
|
+
let z = xyz[2];
|
|
82919
|
+
x /= 95.047;
|
|
82920
|
+
y /= 100;
|
|
82921
|
+
z /= 108.883;
|
|
82922
|
+
x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
82923
|
+
y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
82924
|
+
z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
82925
|
+
const l = 116 * y - 16;
|
|
82926
|
+
const a = 500 * (x - y);
|
|
82927
|
+
const b = 200 * (y - z);
|
|
82928
|
+
return [l, a, b];
|
|
82929
|
+
};
|
|
82930
|
+
convert.lab.xyz = function(lab) {
|
|
82931
|
+
const l = lab[0];
|
|
82932
|
+
const a = lab[1];
|
|
82933
|
+
const b = lab[2];
|
|
82934
|
+
let x;
|
|
82935
|
+
let y;
|
|
82936
|
+
let z;
|
|
82937
|
+
y = (l + 16) / 116;
|
|
82938
|
+
x = a / 500 + y;
|
|
82939
|
+
z = y - b / 200;
|
|
82940
|
+
const y2 = y ** 3;
|
|
82941
|
+
const x2 = x ** 3;
|
|
82942
|
+
const z2 = z ** 3;
|
|
82943
|
+
y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
|
|
82944
|
+
x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
|
|
82945
|
+
z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
|
|
82946
|
+
x *= 95.047;
|
|
82947
|
+
y *= 100;
|
|
82948
|
+
z *= 108.883;
|
|
82949
|
+
return [x, y, z];
|
|
82950
|
+
};
|
|
82951
|
+
convert.lab.lch = function(lab) {
|
|
82952
|
+
const l = lab[0];
|
|
82953
|
+
const a = lab[1];
|
|
82954
|
+
const b = lab[2];
|
|
82955
|
+
let h;
|
|
82956
|
+
const hr = Math.atan2(b, a);
|
|
82957
|
+
h = hr * 360 / 2 / Math.PI;
|
|
82958
|
+
if (h < 0) {
|
|
82959
|
+
h += 360;
|
|
82960
|
+
}
|
|
82961
|
+
const c = Math.sqrt(a * a + b * b);
|
|
82962
|
+
return [l, c, h];
|
|
82963
|
+
};
|
|
82964
|
+
convert.lch.lab = function(lch) {
|
|
82965
|
+
const l = lch[0];
|
|
82966
|
+
const c = lch[1];
|
|
82967
|
+
const h = lch[2];
|
|
82968
|
+
const hr = h / 360 * 2 * Math.PI;
|
|
82969
|
+
const a = c * Math.cos(hr);
|
|
82970
|
+
const b = c * Math.sin(hr);
|
|
82971
|
+
return [l, a, b];
|
|
82972
|
+
};
|
|
82973
|
+
convert.rgb.ansi16 = function(args, saturation = null) {
|
|
82974
|
+
const [r, g, b] = args;
|
|
82975
|
+
let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
|
|
82976
|
+
value = Math.round(value / 50);
|
|
82977
|
+
if (value === 0) {
|
|
82978
|
+
return 30;
|
|
82979
|
+
}
|
|
82980
|
+
let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
|
|
82981
|
+
if (value === 2) {
|
|
82982
|
+
ansi += 60;
|
|
82983
|
+
}
|
|
82984
|
+
return ansi;
|
|
82985
|
+
};
|
|
82986
|
+
convert.hsv.ansi16 = function(args) {
|
|
82987
|
+
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
|
82988
|
+
};
|
|
82989
|
+
convert.rgb.ansi256 = function(args) {
|
|
82990
|
+
const r = args[0];
|
|
82991
|
+
const g = args[1];
|
|
82992
|
+
const b = args[2];
|
|
82993
|
+
if (r === g && g === b) {
|
|
82994
|
+
if (r < 8) {
|
|
82995
|
+
return 16;
|
|
82996
|
+
}
|
|
82997
|
+
if (r > 248) {
|
|
82998
|
+
return 231;
|
|
82999
|
+
}
|
|
83000
|
+
return Math.round((r - 8) / 247 * 24) + 232;
|
|
83001
|
+
}
|
|
83002
|
+
const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
|
83003
|
+
return ansi;
|
|
83004
|
+
};
|
|
83005
|
+
convert.ansi16.rgb = function(args) {
|
|
83006
|
+
let color = args % 10;
|
|
83007
|
+
if (color === 0 || color === 7) {
|
|
83008
|
+
if (args > 50) {
|
|
83009
|
+
color += 3.5;
|
|
83010
|
+
}
|
|
83011
|
+
color = color / 10.5 * 255;
|
|
83012
|
+
return [color, color, color];
|
|
83013
|
+
}
|
|
83014
|
+
const mult = (~~(args > 50) + 1) * 0.5;
|
|
83015
|
+
const r = (color & 1) * mult * 255;
|
|
83016
|
+
const g = (color >> 1 & 1) * mult * 255;
|
|
83017
|
+
const b = (color >> 2 & 1) * mult * 255;
|
|
83018
|
+
return [r, g, b];
|
|
83019
|
+
};
|
|
83020
|
+
convert.ansi256.rgb = function(args) {
|
|
83021
|
+
if (args >= 232) {
|
|
83022
|
+
const c = (args - 232) * 10 + 8;
|
|
83023
|
+
return [c, c, c];
|
|
83024
|
+
}
|
|
83025
|
+
args -= 16;
|
|
83026
|
+
let rem;
|
|
83027
|
+
const r = Math.floor(args / 36) / 5 * 255;
|
|
83028
|
+
const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
|
83029
|
+
const b = rem % 6 / 5 * 255;
|
|
83030
|
+
return [r, g, b];
|
|
83031
|
+
};
|
|
83032
|
+
convert.rgb.hex = function(args) {
|
|
83033
|
+
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
|
83034
|
+
const string = integer.toString(16).toUpperCase();
|
|
83035
|
+
return "000000".substring(string.length) + string;
|
|
83036
|
+
};
|
|
83037
|
+
convert.hex.rgb = function(args) {
|
|
83038
|
+
const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
83039
|
+
if (!match) {
|
|
83040
|
+
return [0, 0, 0];
|
|
83041
|
+
}
|
|
83042
|
+
let colorString = match[0];
|
|
83043
|
+
if (match[0].length === 3) {
|
|
83044
|
+
colorString = colorString.split("").map((char) => {
|
|
83045
|
+
return char + char;
|
|
83046
|
+
}).join("");
|
|
83047
|
+
}
|
|
83048
|
+
const integer = parseInt(colorString, 16);
|
|
83049
|
+
const r = integer >> 16 & 255;
|
|
83050
|
+
const g = integer >> 8 & 255;
|
|
83051
|
+
const b = integer & 255;
|
|
83052
|
+
return [r, g, b];
|
|
83053
|
+
};
|
|
83054
|
+
convert.rgb.hcg = function(rgb) {
|
|
83055
|
+
const r = rgb[0] / 255;
|
|
83056
|
+
const g = rgb[1] / 255;
|
|
83057
|
+
const b = rgb[2] / 255;
|
|
83058
|
+
const max = Math.max(Math.max(r, g), b);
|
|
83059
|
+
const min = Math.min(Math.min(r, g), b);
|
|
83060
|
+
const chroma = max - min;
|
|
83061
|
+
let grayscale;
|
|
83062
|
+
let hue;
|
|
83063
|
+
if (chroma < 1) {
|
|
83064
|
+
grayscale = min / (1 - chroma);
|
|
83065
|
+
} else {
|
|
83066
|
+
grayscale = 0;
|
|
83067
|
+
}
|
|
83068
|
+
if (chroma <= 0) {
|
|
83069
|
+
hue = 0;
|
|
83070
|
+
} else if (max === r) {
|
|
83071
|
+
hue = (g - b) / chroma % 6;
|
|
83072
|
+
} else if (max === g) {
|
|
83073
|
+
hue = 2 + (b - r) / chroma;
|
|
83074
|
+
} else {
|
|
83075
|
+
hue = 4 + (r - g) / chroma;
|
|
83076
|
+
}
|
|
83077
|
+
hue /= 6;
|
|
83078
|
+
hue %= 1;
|
|
83079
|
+
return [hue * 360, chroma * 100, grayscale * 100];
|
|
83080
|
+
};
|
|
83081
|
+
convert.hsl.hcg = function(hsl) {
|
|
83082
|
+
const s = hsl[1] / 100;
|
|
83083
|
+
const l = hsl[2] / 100;
|
|
83084
|
+
const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
|
|
83085
|
+
let f = 0;
|
|
83086
|
+
if (c < 1) {
|
|
83087
|
+
f = (l - 0.5 * c) / (1 - c);
|
|
83088
|
+
}
|
|
83089
|
+
return [hsl[0], c * 100, f * 100];
|
|
83090
|
+
};
|
|
83091
|
+
convert.hsv.hcg = function(hsv) {
|
|
83092
|
+
const s = hsv[1] / 100;
|
|
83093
|
+
const v = hsv[2] / 100;
|
|
83094
|
+
const c = s * v;
|
|
83095
|
+
let f = 0;
|
|
83096
|
+
if (c < 1) {
|
|
83097
|
+
f = (v - c) / (1 - c);
|
|
83098
|
+
}
|
|
83099
|
+
return [hsv[0], c * 100, f * 100];
|
|
83100
|
+
};
|
|
83101
|
+
convert.hcg.rgb = function(hcg) {
|
|
83102
|
+
const h = hcg[0] / 360;
|
|
83103
|
+
const c = hcg[1] / 100;
|
|
83104
|
+
const g = hcg[2] / 100;
|
|
83105
|
+
if (c === 0) {
|
|
83106
|
+
return [g * 255, g * 255, g * 255];
|
|
83107
|
+
}
|
|
83108
|
+
const pure = [0, 0, 0];
|
|
83109
|
+
const hi = h % 1 * 6;
|
|
83110
|
+
const v = hi % 1;
|
|
83111
|
+
const w = 1 - v;
|
|
83112
|
+
let mg = 0;
|
|
83113
|
+
switch (Math.floor(hi)) {
|
|
83114
|
+
case 0:
|
|
83115
|
+
pure[0] = 1;
|
|
83116
|
+
pure[1] = v;
|
|
83117
|
+
pure[2] = 0;
|
|
83118
|
+
break;
|
|
83119
|
+
case 1:
|
|
83120
|
+
pure[0] = w;
|
|
83121
|
+
pure[1] = 1;
|
|
83122
|
+
pure[2] = 0;
|
|
83123
|
+
break;
|
|
83124
|
+
case 2:
|
|
83125
|
+
pure[0] = 0;
|
|
83126
|
+
pure[1] = 1;
|
|
83127
|
+
pure[2] = v;
|
|
83128
|
+
break;
|
|
83129
|
+
case 3:
|
|
83130
|
+
pure[0] = 0;
|
|
83131
|
+
pure[1] = w;
|
|
83132
|
+
pure[2] = 1;
|
|
83133
|
+
break;
|
|
83134
|
+
case 4:
|
|
83135
|
+
pure[0] = v;
|
|
83136
|
+
pure[1] = 0;
|
|
83137
|
+
pure[2] = 1;
|
|
83138
|
+
break;
|
|
83139
|
+
default:
|
|
83140
|
+
pure[0] = 1;
|
|
83141
|
+
pure[1] = 0;
|
|
83142
|
+
pure[2] = w;
|
|
83143
|
+
}
|
|
83144
|
+
mg = (1 - c) * g;
|
|
83145
|
+
return [
|
|
83146
|
+
(c * pure[0] + mg) * 255,
|
|
83147
|
+
(c * pure[1] + mg) * 255,
|
|
83148
|
+
(c * pure[2] + mg) * 255
|
|
83149
|
+
];
|
|
83150
|
+
};
|
|
83151
|
+
convert.hcg.hsv = function(hcg) {
|
|
83152
|
+
const c = hcg[1] / 100;
|
|
83153
|
+
const g = hcg[2] / 100;
|
|
83154
|
+
const v = c + g * (1 - c);
|
|
83155
|
+
let f = 0;
|
|
83156
|
+
if (v > 0) {
|
|
83157
|
+
f = c / v;
|
|
83158
|
+
}
|
|
83159
|
+
return [hcg[0], f * 100, v * 100];
|
|
83160
|
+
};
|
|
83161
|
+
convert.hcg.hsl = function(hcg) {
|
|
83162
|
+
const c = hcg[1] / 100;
|
|
83163
|
+
const g = hcg[2] / 100;
|
|
83164
|
+
const l = g * (1 - c) + 0.5 * c;
|
|
83165
|
+
let s = 0;
|
|
83166
|
+
if (l > 0 && l < 0.5) {
|
|
83167
|
+
s = c / (2 * l);
|
|
83168
|
+
} else if (l >= 0.5 && l < 1) {
|
|
83169
|
+
s = c / (2 * (1 - l));
|
|
83170
|
+
}
|
|
83171
|
+
return [hcg[0], s * 100, l * 100];
|
|
83172
|
+
};
|
|
83173
|
+
convert.hcg.hwb = function(hcg) {
|
|
83174
|
+
const c = hcg[1] / 100;
|
|
83175
|
+
const g = hcg[2] / 100;
|
|
83176
|
+
const v = c + g * (1 - c);
|
|
83177
|
+
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
|
83178
|
+
};
|
|
83179
|
+
convert.hwb.hcg = function(hwb) {
|
|
83180
|
+
const w = hwb[1] / 100;
|
|
83181
|
+
const b = hwb[2] / 100;
|
|
83182
|
+
const v = 1 - b;
|
|
83183
|
+
const c = v - w;
|
|
83184
|
+
let g = 0;
|
|
83185
|
+
if (c < 1) {
|
|
83186
|
+
g = (v - c) / (1 - c);
|
|
83187
|
+
}
|
|
83188
|
+
return [hwb[0], c * 100, g * 100];
|
|
83189
|
+
};
|
|
83190
|
+
convert.apple.rgb = function(apple) {
|
|
83191
|
+
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
|
83192
|
+
};
|
|
83193
|
+
convert.rgb.apple = function(rgb) {
|
|
83194
|
+
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
|
|
83195
|
+
};
|
|
83196
|
+
convert.gray.rgb = function(args) {
|
|
83197
|
+
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
|
83198
|
+
};
|
|
83199
|
+
convert.gray.hsl = function(args) {
|
|
83200
|
+
return [0, 0, args[0]];
|
|
83201
|
+
};
|
|
83202
|
+
convert.gray.hsv = convert.gray.hsl;
|
|
83203
|
+
convert.gray.hwb = function(gray) {
|
|
83204
|
+
return [0, 100, gray[0]];
|
|
83205
|
+
};
|
|
83206
|
+
convert.gray.cmyk = function(gray) {
|
|
83207
|
+
return [0, 0, 0, gray[0]];
|
|
83208
|
+
};
|
|
83209
|
+
convert.gray.lab = function(gray) {
|
|
83210
|
+
return [gray[0], 0, 0];
|
|
83211
|
+
};
|
|
83212
|
+
convert.gray.hex = function(gray) {
|
|
83213
|
+
const val = Math.round(gray[0] / 100 * 255) & 255;
|
|
83214
|
+
const integer = (val << 16) + (val << 8) + val;
|
|
83215
|
+
const string = integer.toString(16).toUpperCase();
|
|
83216
|
+
return "000000".substring(string.length) + string;
|
|
83217
|
+
};
|
|
83218
|
+
convert.rgb.gray = function(rgb) {
|
|
83219
|
+
const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
|
83220
|
+
return [val / 255 * 100];
|
|
83221
|
+
};
|
|
83222
|
+
});
|
|
83223
|
+
var require_route = __commonJSMin((exports, module2) => {
|
|
83224
|
+
var conversions = require_conversions();
|
|
83225
|
+
function buildGraph() {
|
|
83226
|
+
const graph = {};
|
|
83227
|
+
const models = Object.keys(conversions);
|
|
83228
|
+
for (let len = models.length, i = 0; i < len; i++) {
|
|
83229
|
+
graph[models[i]] = {
|
|
83230
|
+
distance: -1,
|
|
83231
|
+
parent: null
|
|
83232
|
+
};
|
|
83233
|
+
}
|
|
83234
|
+
return graph;
|
|
83235
|
+
}
|
|
83236
|
+
function deriveBFS(fromModel) {
|
|
83237
|
+
const graph = buildGraph();
|
|
83238
|
+
const queue = [fromModel];
|
|
83239
|
+
graph[fromModel].distance = 0;
|
|
83240
|
+
while (queue.length) {
|
|
83241
|
+
const current = queue.pop();
|
|
83242
|
+
const adjacents = Object.keys(conversions[current]);
|
|
83243
|
+
for (let len = adjacents.length, i = 0; i < len; i++) {
|
|
83244
|
+
const adjacent = adjacents[i];
|
|
83245
|
+
const node = graph[adjacent];
|
|
83246
|
+
if (node.distance === -1) {
|
|
83247
|
+
node.distance = graph[current].distance + 1;
|
|
83248
|
+
node.parent = current;
|
|
83249
|
+
queue.unshift(adjacent);
|
|
83250
|
+
}
|
|
83251
|
+
}
|
|
83252
|
+
}
|
|
83253
|
+
return graph;
|
|
83254
|
+
}
|
|
83255
|
+
function link(from, to) {
|
|
83256
|
+
return function(args) {
|
|
83257
|
+
return to(from(args));
|
|
83258
|
+
};
|
|
83259
|
+
}
|
|
83260
|
+
function wrapConversion(toModel, graph) {
|
|
83261
|
+
const path6 = [graph[toModel].parent, toModel];
|
|
83262
|
+
let fn = conversions[graph[toModel].parent][toModel];
|
|
83263
|
+
let cur = graph[toModel].parent;
|
|
83264
|
+
while (graph[cur].parent) {
|
|
83265
|
+
path6.unshift(graph[cur].parent);
|
|
83266
|
+
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
83267
|
+
cur = graph[cur].parent;
|
|
83268
|
+
}
|
|
83269
|
+
fn.conversion = path6;
|
|
83270
|
+
return fn;
|
|
83271
|
+
}
|
|
83272
|
+
module2.exports = function(fromModel) {
|
|
83273
|
+
const graph = deriveBFS(fromModel);
|
|
83274
|
+
const conversion = {};
|
|
83275
|
+
const models = Object.keys(graph);
|
|
83276
|
+
for (let len = models.length, i = 0; i < len; i++) {
|
|
83277
|
+
const toModel = models[i];
|
|
83278
|
+
const node = graph[toModel];
|
|
83279
|
+
if (node.parent === null) {
|
|
83280
|
+
continue;
|
|
83281
|
+
}
|
|
83282
|
+
conversion[toModel] = wrapConversion(toModel, graph);
|
|
83283
|
+
}
|
|
83284
|
+
return conversion;
|
|
83285
|
+
};
|
|
83286
|
+
});
|
|
83287
|
+
var require_color_convert = __commonJSMin((exports, module2) => {
|
|
83288
|
+
var conversions = require_conversions();
|
|
83289
|
+
var route = require_route();
|
|
83290
|
+
var convert = {};
|
|
83291
|
+
var models = Object.keys(conversions);
|
|
83292
|
+
function wrapRaw(fn) {
|
|
83293
|
+
const wrappedFn = function(...args) {
|
|
83294
|
+
const arg0 = args[0];
|
|
83295
|
+
if (arg0 === void 0 || arg0 === null) {
|
|
83296
|
+
return arg0;
|
|
83297
|
+
}
|
|
83298
|
+
if (arg0.length > 1) {
|
|
83299
|
+
args = arg0;
|
|
83300
|
+
}
|
|
83301
|
+
return fn(args);
|
|
83302
|
+
};
|
|
83303
|
+
if ("conversion" in fn) {
|
|
83304
|
+
wrappedFn.conversion = fn.conversion;
|
|
83305
|
+
}
|
|
83306
|
+
return wrappedFn;
|
|
83307
|
+
}
|
|
83308
|
+
function wrapRounded(fn) {
|
|
83309
|
+
const wrappedFn = function(...args) {
|
|
83310
|
+
const arg0 = args[0];
|
|
83311
|
+
if (arg0 === void 0 || arg0 === null) {
|
|
83312
|
+
return arg0;
|
|
83313
|
+
}
|
|
83314
|
+
if (arg0.length > 1) {
|
|
83315
|
+
args = arg0;
|
|
83316
|
+
}
|
|
83317
|
+
const result = fn(args);
|
|
83318
|
+
if (typeof result === "object") {
|
|
83319
|
+
for (let len = result.length, i = 0; i < len; i++) {
|
|
83320
|
+
result[i] = Math.round(result[i]);
|
|
83321
|
+
}
|
|
83322
|
+
}
|
|
83323
|
+
return result;
|
|
83324
|
+
};
|
|
83325
|
+
if ("conversion" in fn) {
|
|
83326
|
+
wrappedFn.conversion = fn.conversion;
|
|
83327
|
+
}
|
|
83328
|
+
return wrappedFn;
|
|
83329
|
+
}
|
|
83330
|
+
models.forEach((fromModel) => {
|
|
83331
|
+
convert[fromModel] = {};
|
|
83332
|
+
Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
|
|
83333
|
+
Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
|
|
83334
|
+
const routes = route(fromModel);
|
|
83335
|
+
const routeModels = Object.keys(routes);
|
|
83336
|
+
routeModels.forEach((toModel) => {
|
|
83337
|
+
const fn = routes[toModel];
|
|
83338
|
+
convert[fromModel][toModel] = wrapRounded(fn);
|
|
83339
|
+
convert[fromModel][toModel].raw = wrapRaw(fn);
|
|
83340
|
+
});
|
|
83341
|
+
});
|
|
83342
|
+
module2.exports = convert;
|
|
83343
|
+
});
|
|
83344
|
+
var require_ansi_styles = __commonJSMin((exports, module2) => {
|
|
83345
|
+
"use strict";
|
|
83346
|
+
var wrapAnsi16 = (fn, offset) => (...args) => {
|
|
83347
|
+
const code = fn(...args);
|
|
83348
|
+
return `\x1B[${code + offset}m`;
|
|
83349
|
+
};
|
|
83350
|
+
var wrapAnsi256 = (fn, offset) => (...args) => {
|
|
83351
|
+
const code = fn(...args);
|
|
83352
|
+
return `\x1B[${38 + offset};5;${code}m`;
|
|
83353
|
+
};
|
|
83354
|
+
var wrapAnsi16m = (fn, offset) => (...args) => {
|
|
83355
|
+
const rgb = fn(...args);
|
|
83356
|
+
return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
|
83357
|
+
};
|
|
83358
|
+
var ansi2ansi = (n) => n;
|
|
83359
|
+
var rgb2rgb = (r, g, b) => [r, g, b];
|
|
83360
|
+
var setLazyProperty = (object, property, get4) => {
|
|
83361
|
+
Object.defineProperty(object, property, {
|
|
83362
|
+
get: () => {
|
|
83363
|
+
const value = get4();
|
|
83364
|
+
Object.defineProperty(object, property, {
|
|
83365
|
+
value,
|
|
83366
|
+
enumerable: true,
|
|
83367
|
+
configurable: true
|
|
83368
|
+
});
|
|
83369
|
+
return value;
|
|
83370
|
+
},
|
|
83371
|
+
enumerable: true,
|
|
83372
|
+
configurable: true
|
|
83373
|
+
});
|
|
83374
|
+
};
|
|
83375
|
+
var colorConvert;
|
|
83376
|
+
var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
|
|
83377
|
+
if (colorConvert === void 0) {
|
|
83378
|
+
colorConvert = require_color_convert();
|
|
83379
|
+
}
|
|
83380
|
+
const offset = isBackground ? 10 : 0;
|
|
83381
|
+
const styles = {};
|
|
83382
|
+
for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
|
|
83383
|
+
const name5 = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
|
|
83384
|
+
if (sourceSpace === targetSpace) {
|
|
83385
|
+
styles[name5] = wrap(identity, offset);
|
|
83386
|
+
} else if (typeof suite === "object") {
|
|
83387
|
+
styles[name5] = wrap(suite[targetSpace], offset);
|
|
83388
|
+
}
|
|
83389
|
+
}
|
|
83390
|
+
return styles;
|
|
83391
|
+
};
|
|
83392
|
+
function assembleStyles() {
|
|
83393
|
+
const codes = /* @__PURE__ */ new Map();
|
|
83394
|
+
const styles = {
|
|
83395
|
+
modifier: {
|
|
83396
|
+
reset: [0, 0],
|
|
83397
|
+
bold: [1, 22],
|
|
83398
|
+
dim: [2, 22],
|
|
83399
|
+
italic: [3, 23],
|
|
83400
|
+
underline: [4, 24],
|
|
83401
|
+
inverse: [7, 27],
|
|
83402
|
+
hidden: [8, 28],
|
|
83403
|
+
strikethrough: [9, 29]
|
|
83404
|
+
},
|
|
83405
|
+
color: {
|
|
83406
|
+
black: [30, 39],
|
|
83407
|
+
red: [31, 39],
|
|
83408
|
+
green: [32, 39],
|
|
83409
|
+
yellow: [33, 39],
|
|
83410
|
+
blue: [34, 39],
|
|
83411
|
+
magenta: [35, 39],
|
|
83412
|
+
cyan: [36, 39],
|
|
83413
|
+
white: [37, 39],
|
|
83414
|
+
blackBright: [90, 39],
|
|
83415
|
+
redBright: [91, 39],
|
|
83416
|
+
greenBright: [92, 39],
|
|
83417
|
+
yellowBright: [93, 39],
|
|
83418
|
+
blueBright: [94, 39],
|
|
83419
|
+
magentaBright: [95, 39],
|
|
83420
|
+
cyanBright: [96, 39],
|
|
83421
|
+
whiteBright: [97, 39]
|
|
83422
|
+
},
|
|
83423
|
+
bgColor: {
|
|
83424
|
+
bgBlack: [40, 49],
|
|
83425
|
+
bgRed: [41, 49],
|
|
83426
|
+
bgGreen: [42, 49],
|
|
83427
|
+
bgYellow: [43, 49],
|
|
83428
|
+
bgBlue: [44, 49],
|
|
83429
|
+
bgMagenta: [45, 49],
|
|
83430
|
+
bgCyan: [46, 49],
|
|
83431
|
+
bgWhite: [47, 49],
|
|
83432
|
+
bgBlackBright: [100, 49],
|
|
83433
|
+
bgRedBright: [101, 49],
|
|
83434
|
+
bgGreenBright: [102, 49],
|
|
83435
|
+
bgYellowBright: [103, 49],
|
|
83436
|
+
bgBlueBright: [104, 49],
|
|
83437
|
+
bgMagentaBright: [105, 49],
|
|
83438
|
+
bgCyanBright: [106, 49],
|
|
83439
|
+
bgWhiteBright: [107, 49]
|
|
83440
|
+
}
|
|
83441
|
+
};
|
|
83442
|
+
styles.color.gray = styles.color.blackBright;
|
|
83443
|
+
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
|
|
83444
|
+
styles.color.grey = styles.color.blackBright;
|
|
83445
|
+
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
|
|
83446
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
83447
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
83448
|
+
styles[styleName] = {
|
|
83449
|
+
open: `\x1B[${style[0]}m`,
|
|
83450
|
+
close: `\x1B[${style[1]}m`
|
|
83451
|
+
};
|
|
83452
|
+
group[styleName] = styles[styleName];
|
|
83453
|
+
codes.set(style[0], style[1]);
|
|
83454
|
+
}
|
|
83455
|
+
Object.defineProperty(styles, groupName, {
|
|
83456
|
+
value: group,
|
|
83457
|
+
enumerable: false
|
|
83458
|
+
});
|
|
83459
|
+
}
|
|
83460
|
+
Object.defineProperty(styles, "codes", {
|
|
83461
|
+
value: codes,
|
|
83462
|
+
enumerable: false
|
|
83463
|
+
});
|
|
83464
|
+
styles.color.close = "\x1B[39m";
|
|
83465
|
+
styles.bgColor.close = "\x1B[49m";
|
|
83466
|
+
setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
|
|
83467
|
+
setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
|
|
83468
|
+
setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
|
|
83469
|
+
setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
|
|
83470
|
+
setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
|
|
83471
|
+
setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
|
|
83472
|
+
return styles;
|
|
83473
|
+
}
|
|
83474
|
+
Object.defineProperty(module2, "exports", {
|
|
83475
|
+
enumerable: true,
|
|
83476
|
+
get: assembleStyles
|
|
83477
|
+
});
|
|
83478
|
+
});
|
|
83479
|
+
var require_wrap_ansi = __commonJSMin((exports, module2) => {
|
|
83480
|
+
"use strict";
|
|
83481
|
+
var stringWidth = require_string_width();
|
|
83482
|
+
var stripAnsi2 = require_strip_ansi2();
|
|
83483
|
+
var ansiStyles = require_ansi_styles();
|
|
83484
|
+
var ESCAPES = /* @__PURE__ */ new Set([
|
|
83485
|
+
"\x1B",
|
|
83486
|
+
"\x9B"
|
|
83487
|
+
]);
|
|
83488
|
+
var END_CODE = 39;
|
|
83489
|
+
var ANSI_ESCAPE_BELL = "\x07";
|
|
83490
|
+
var ANSI_CSI = "[";
|
|
83491
|
+
var ANSI_OSC = "]";
|
|
83492
|
+
var ANSI_SGR_TERMINATOR = "m";
|
|
83493
|
+
var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
83494
|
+
var wrapAnsi = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
|
83495
|
+
var wrapAnsiHyperlink = (uri) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`;
|
|
83496
|
+
var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
|
|
83497
|
+
var wrapWord = (rows, word, columns) => {
|
|
83498
|
+
const characters = [...word];
|
|
83499
|
+
let isInsideEscape = false;
|
|
83500
|
+
let isInsideLinkEscape = false;
|
|
83501
|
+
let visible = stringWidth(stripAnsi2(rows[rows.length - 1]));
|
|
83502
|
+
for (const [index, character] of characters.entries()) {
|
|
83503
|
+
const characterLength = stringWidth(character);
|
|
83504
|
+
if (visible + characterLength <= columns) {
|
|
83505
|
+
rows[rows.length - 1] += character;
|
|
83506
|
+
} else {
|
|
83507
|
+
rows.push(character);
|
|
83508
|
+
visible = 0;
|
|
83509
|
+
}
|
|
83510
|
+
if (ESCAPES.has(character)) {
|
|
83511
|
+
isInsideEscape = true;
|
|
83512
|
+
isInsideLinkEscape = characters.slice(index + 1).join("").startsWith(ANSI_ESCAPE_LINK);
|
|
83513
|
+
}
|
|
83514
|
+
if (isInsideEscape) {
|
|
83515
|
+
if (isInsideLinkEscape) {
|
|
83516
|
+
if (character === ANSI_ESCAPE_BELL) {
|
|
83517
|
+
isInsideEscape = false;
|
|
83518
|
+
isInsideLinkEscape = false;
|
|
83519
|
+
}
|
|
83520
|
+
} else if (character === ANSI_SGR_TERMINATOR) {
|
|
83521
|
+
isInsideEscape = false;
|
|
83522
|
+
}
|
|
83523
|
+
continue;
|
|
83524
|
+
}
|
|
83525
|
+
visible += characterLength;
|
|
83526
|
+
if (visible === columns && index < characters.length - 1) {
|
|
83527
|
+
rows.push("");
|
|
83528
|
+
visible = 0;
|
|
83529
|
+
}
|
|
83530
|
+
}
|
|
83531
|
+
if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
|
|
83532
|
+
rows[rows.length - 2] += rows.pop();
|
|
83533
|
+
}
|
|
83534
|
+
};
|
|
83535
|
+
var stringVisibleTrimSpacesRight = (string) => {
|
|
83536
|
+
const words = string.split(" ");
|
|
83537
|
+
let last = words.length;
|
|
83538
|
+
while (last > 0) {
|
|
83539
|
+
if (stringWidth(words[last - 1]) > 0) {
|
|
83540
|
+
break;
|
|
83541
|
+
}
|
|
83542
|
+
last--;
|
|
83543
|
+
}
|
|
83544
|
+
if (last === words.length) {
|
|
83545
|
+
return string;
|
|
83546
|
+
}
|
|
83547
|
+
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
83548
|
+
};
|
|
83549
|
+
var exec = (string, columns, options3 = {}) => {
|
|
83550
|
+
if (options3.trim !== false && string.trim() === "") {
|
|
83551
|
+
return "";
|
|
83552
|
+
}
|
|
83553
|
+
let returnValue = "";
|
|
83554
|
+
let escapeCode;
|
|
83555
|
+
let escapeUrl;
|
|
83556
|
+
const lengths = wordLengths(string);
|
|
83557
|
+
let rows = [""];
|
|
83558
|
+
for (const [index, word] of string.split(" ").entries()) {
|
|
83559
|
+
if (options3.trim !== false) {
|
|
83560
|
+
rows[rows.length - 1] = rows[rows.length - 1].trimStart();
|
|
83561
|
+
}
|
|
83562
|
+
let rowLength = stringWidth(rows[rows.length - 1]);
|
|
83563
|
+
if (index !== 0) {
|
|
83564
|
+
if (rowLength >= columns && (options3.wordWrap === false || options3.trim === false)) {
|
|
83565
|
+
rows.push("");
|
|
83566
|
+
rowLength = 0;
|
|
83567
|
+
}
|
|
83568
|
+
if (rowLength > 0 || options3.trim === false) {
|
|
83569
|
+
rows[rows.length - 1] += " ";
|
|
83570
|
+
rowLength++;
|
|
83571
|
+
}
|
|
83572
|
+
}
|
|
83573
|
+
if (options3.hard && lengths[index] > columns) {
|
|
83574
|
+
const remainingColumns = columns - rowLength;
|
|
83575
|
+
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
83576
|
+
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
|
83577
|
+
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
83578
|
+
rows.push("");
|
|
83579
|
+
}
|
|
83580
|
+
wrapWord(rows, word, columns);
|
|
83581
|
+
continue;
|
|
83582
|
+
}
|
|
83583
|
+
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
83584
|
+
if (options3.wordWrap === false && rowLength < columns) {
|
|
83585
|
+
wrapWord(rows, word, columns);
|
|
83586
|
+
continue;
|
|
83587
|
+
}
|
|
83588
|
+
rows.push("");
|
|
83589
|
+
}
|
|
83590
|
+
if (rowLength + lengths[index] > columns && options3.wordWrap === false) {
|
|
83591
|
+
wrapWord(rows, word, columns);
|
|
83592
|
+
continue;
|
|
83593
|
+
}
|
|
83594
|
+
rows[rows.length - 1] += word;
|
|
83595
|
+
}
|
|
83596
|
+
if (options3.trim !== false) {
|
|
83597
|
+
rows = rows.map(stringVisibleTrimSpacesRight);
|
|
83598
|
+
}
|
|
83599
|
+
const pre = [...rows.join("\n")];
|
|
83600
|
+
for (const [index, character] of pre.entries()) {
|
|
83601
|
+
returnValue += character;
|
|
83602
|
+
if (ESCAPES.has(character)) {
|
|
83603
|
+
const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join("")) || { groups: {} };
|
|
83604
|
+
if (groups.code !== void 0) {
|
|
83605
|
+
const code2 = Number.parseFloat(groups.code);
|
|
83606
|
+
escapeCode = code2 === END_CODE ? void 0 : code2;
|
|
83607
|
+
} else if (groups.uri !== void 0) {
|
|
83608
|
+
escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
83609
|
+
}
|
|
83610
|
+
}
|
|
83611
|
+
const code = ansiStyles.codes.get(Number(escapeCode));
|
|
83612
|
+
if (pre[index + 1] === "\n") {
|
|
83613
|
+
if (escapeUrl) {
|
|
83614
|
+
returnValue += wrapAnsiHyperlink("");
|
|
83615
|
+
}
|
|
83616
|
+
if (escapeCode && code) {
|
|
83617
|
+
returnValue += wrapAnsi(code);
|
|
83618
|
+
}
|
|
83619
|
+
} else if (character === "\n") {
|
|
83620
|
+
if (escapeCode && code) {
|
|
83621
|
+
returnValue += wrapAnsi(escapeCode);
|
|
83622
|
+
}
|
|
83623
|
+
if (escapeUrl) {
|
|
83624
|
+
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
83625
|
+
}
|
|
83626
|
+
}
|
|
83627
|
+
}
|
|
83628
|
+
return returnValue;
|
|
83629
|
+
};
|
|
83630
|
+
module2.exports = (string, columns, options3) => {
|
|
83631
|
+
return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line3) => exec(line3, columns, options3)).join("\n");
|
|
83632
|
+
};
|
|
83633
|
+
});
|
|
82169
83634
|
var spinners_exports = {};
|
|
82170
83635
|
__export2(spinners_exports, {
|
|
82171
83636
|
aesthetic: () => aesthetic,
|
|
@@ -82192,6 +83657,7 @@ __export2(spinners_exports, {
|
|
|
82192
83657
|
dots10: () => dots10,
|
|
82193
83658
|
dots11: () => dots11,
|
|
82194
83659
|
dots12: () => dots12,
|
|
83660
|
+
dots13: () => dots13,
|
|
82195
83661
|
dots2: () => dots2,
|
|
82196
83662
|
dots3: () => dots3,
|
|
82197
83663
|
dots4: () => dots4,
|
|
@@ -82225,6 +83691,7 @@ __export2(spinners_exports, {
|
|
|
82225
83691
|
point: () => point,
|
|
82226
83692
|
pong: () => pong,
|
|
82227
83693
|
runner: () => runner,
|
|
83694
|
+
sand: () => sand,
|
|
82228
83695
|
shark: () => shark,
|
|
82229
83696
|
simpleDots: () => simpleDots,
|
|
82230
83697
|
simpleDotsScrolling: () => simpleDotsScrolling,
|
|
@@ -82252,7 +83719,7 @@ __export2(spinners_exports, {
|
|
|
82252
83719
|
triangle: () => triangle,
|
|
82253
83720
|
weather: () => weather
|
|
82254
83721
|
});
|
|
82255
|
-
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;
|
|
83722
|
+
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;
|
|
82256
83723
|
var init_spinners = __esmMin(() => {
|
|
82257
83724
|
dots = {
|
|
82258
83725
|
interval: 80,
|
|
@@ -82529,6 +83996,19 @@ var init_spinners = __esmMin(() => {
|
|
|
82529
83996
|
"\u2800\u2840"
|
|
82530
83997
|
]
|
|
82531
83998
|
};
|
|
83999
|
+
dots13 = {
|
|
84000
|
+
interval: 80,
|
|
84001
|
+
frames: [
|
|
84002
|
+
"\u28FC",
|
|
84003
|
+
"\u28F9",
|
|
84004
|
+
"\u28BB",
|
|
84005
|
+
"\u283F",
|
|
84006
|
+
"\u285F",
|
|
84007
|
+
"\u28CF",
|
|
84008
|
+
"\u28E7",
|
|
84009
|
+
"\u28F6"
|
|
84010
|
+
]
|
|
84011
|
+
};
|
|
82532
84012
|
dots8Bit = {
|
|
82533
84013
|
interval: 80,
|
|
82534
84014
|
frames: [
|
|
@@ -82790,6 +84270,46 @@ var init_spinners = __esmMin(() => {
|
|
|
82790
84270
|
"\u28FF"
|
|
82791
84271
|
]
|
|
82792
84272
|
};
|
|
84273
|
+
sand = {
|
|
84274
|
+
interval: 80,
|
|
84275
|
+
frames: [
|
|
84276
|
+
"\u2801",
|
|
84277
|
+
"\u2802",
|
|
84278
|
+
"\u2804",
|
|
84279
|
+
"\u2840",
|
|
84280
|
+
"\u2848",
|
|
84281
|
+
"\u2850",
|
|
84282
|
+
"\u2860",
|
|
84283
|
+
"\u28C0",
|
|
84284
|
+
"\u28C1",
|
|
84285
|
+
"\u28C2",
|
|
84286
|
+
"\u28C4",
|
|
84287
|
+
"\u28CC",
|
|
84288
|
+
"\u28D4",
|
|
84289
|
+
"\u28E4",
|
|
84290
|
+
"\u28E5",
|
|
84291
|
+
"\u28E6",
|
|
84292
|
+
"\u28EE",
|
|
84293
|
+
"\u28F6",
|
|
84294
|
+
"\u28F7",
|
|
84295
|
+
"\u28FF",
|
|
84296
|
+
"\u287F",
|
|
84297
|
+
"\u283F",
|
|
84298
|
+
"\u289F",
|
|
84299
|
+
"\u281F",
|
|
84300
|
+
"\u285B",
|
|
84301
|
+
"\u281B",
|
|
84302
|
+
"\u282B",
|
|
84303
|
+
"\u288B",
|
|
84304
|
+
"\u280B",
|
|
84305
|
+
"\u280D",
|
|
84306
|
+
"\u2849",
|
|
84307
|
+
"\u2809",
|
|
84308
|
+
"\u2811",
|
|
84309
|
+
"\u2821",
|
|
84310
|
+
"\u2881"
|
|
84311
|
+
]
|
|
84312
|
+
};
|
|
82793
84313
|
line = {
|
|
82794
84314
|
interval: 130,
|
|
82795
84315
|
frames: [
|
|
@@ -83680,7 +85200,9 @@ var init_spinners = __esmMin(() => {
|
|
|
83680
85200
|
dots10,
|
|
83681
85201
|
dots11,
|
|
83682
85202
|
dots12,
|
|
85203
|
+
dots13,
|
|
83683
85204
|
dots8Bit,
|
|
85205
|
+
sand,
|
|
83684
85206
|
line,
|
|
83685
85207
|
line2,
|
|
83686
85208
|
pipe,
|
|
@@ -87593,6 +89115,7 @@ var require_screen_manager = __commonJSMin((exports, module2) => {
|
|
|
87593
89115
|
"use strict";
|
|
87594
89116
|
var util = require_readline();
|
|
87595
89117
|
var cliWidth = require_cli_width();
|
|
89118
|
+
var wrapAnsi = require_wrap_ansi();
|
|
87596
89119
|
var stripAnsi2 = require_strip_ansi2();
|
|
87597
89120
|
var stringWidth = require_string_width();
|
|
87598
89121
|
var ora = require_ora2();
|
|
@@ -87687,12 +89210,7 @@ var require_screen_manager = __commonJSMin((exports, module2) => {
|
|
|
87687
89210
|
return width;
|
|
87688
89211
|
}
|
|
87689
89212
|
breakLines(lines, width = this.normalizedCliWidth()) {
|
|
87690
|
-
|
|
87691
|
-
return lines.map((line3) => {
|
|
87692
|
-
const chunk = line3.match(regex2);
|
|
87693
|
-
chunk.pop();
|
|
87694
|
-
return chunk || "";
|
|
87695
|
-
});
|
|
89213
|
+
return lines.map((line3) => wrapAnsi(line3, width, { trim: false, hard: true }).split("\n"));
|
|
87696
89214
|
}
|
|
87697
89215
|
forceLineReturn(content, width = this.normalizedCliWidth()) {
|
|
87698
89216
|
return this.breakLines(content.split("\n"), width).flat().join("\n");
|
|
@@ -88063,7 +89581,7 @@ var require_input = __commonJSMin((exports, module2) => {
|
|
|
88063
89581
|
this.render(isValid5);
|
|
88064
89582
|
}
|
|
88065
89583
|
onKeypress() {
|
|
88066
|
-
this.
|
|
89584
|
+
this.status = "touched";
|
|
88067
89585
|
this.render();
|
|
88068
89586
|
}
|
|
88069
89587
|
};
|
|
@@ -88076,7 +89594,7 @@ var require_number = __commonJSMin((exports, module2) => {
|
|
|
88076
89594
|
filterInput(input) {
|
|
88077
89595
|
if (input && typeof input === "string") {
|
|
88078
89596
|
input = input.trim();
|
|
88079
|
-
const numberMatch = input.match(/(^-?\d
|
|
89597
|
+
const numberMatch = input.match(/(^-?\d+|^-?\d+\.\d*|^\d*\.\d+)(e\d+)?$/);
|
|
88080
89598
|
if (numberMatch) {
|
|
88081
89599
|
return Number(numberMatch[0]);
|
|
88082
89600
|
}
|
|
@@ -107887,9 +109405,6 @@ var require_inquirer2 = __commonJSMin((exports, module2) => {
|
|
|
107887
109405
|
inquirer2.prompt.restoreDefaultPrompts();
|
|
107888
109406
|
};
|
|
107889
109407
|
});
|
|
107890
|
-
var require_lodash4 = __commonJSMin((exports, module2) => {
|
|
107891
|
-
module2.exports = require_lodash();
|
|
107892
|
-
});
|
|
107893
109408
|
function getObjKeyMap(obj) {
|
|
107894
109409
|
var prefix = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
107895
109410
|
var result = {};
|
|
@@ -107904,7 +109419,7 @@ function getObjKeyMap(obj) {
|
|
|
107904
109419
|
}
|
|
107905
109420
|
var import_lodash3;
|
|
107906
109421
|
var init_utils = __esmMin(() => {
|
|
107907
|
-
import_lodash3 = __toESM2(
|
|
109422
|
+
import_lodash3 = __toESM2(require_lodash3());
|
|
107908
109423
|
});
|
|
107909
109424
|
var treeshaking_exports2 = {};
|
|
107910
109425
|
__export2(treeshaking_exports2, {
|
|
@@ -107915,7 +109430,7 @@ var init_treeshaking2 = __esmMin(() => {
|
|
|
107915
109430
|
init_classCallCheck();
|
|
107916
109431
|
init_createClass();
|
|
107917
109432
|
init_defineProperty();
|
|
107918
|
-
import_lodash4 = __toESM2(
|
|
109433
|
+
import_lodash4 = __toESM2(require_lodash3());
|
|
107919
109434
|
init_utils();
|
|
107920
109435
|
I18n = /* @__PURE__ */ function() {
|
|
107921
109436
|
function I18n3() {
|