pinme 2.0.2-beta.0 → 2.0.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1163 -2278
- package/package.json +1 -1
- package/dist/utils/getDeviceId.js +0 -61
package/dist/index.js
CHANGED
|
@@ -8,10 +8,6 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
|
8
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
9
9
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
10
|
};
|
|
11
|
-
var __export = (target, all3) => {
|
|
12
|
-
for (var name in all3)
|
|
13
|
-
__defProp(target, name, { get: all3[name], enumerable: true });
|
|
14
|
-
};
|
|
15
11
|
var __copyProps = (to, from, except, desc) => {
|
|
16
12
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
13
|
for (let key of __getOwnPropNames(from))
|
|
@@ -29,12 +25,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
25
|
mod
|
|
30
26
|
));
|
|
31
27
|
|
|
32
|
-
// node_modules/dotenv/package.json
|
|
28
|
+
// node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json
|
|
33
29
|
var require_package = __commonJS({
|
|
34
|
-
"node_modules/dotenv/package.json"(exports2, module2) {
|
|
30
|
+
"node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json"(exports2, module2) {
|
|
35
31
|
module2.exports = {
|
|
36
32
|
name: "dotenv",
|
|
37
|
-
version: "16.
|
|
33
|
+
version: "16.5.0",
|
|
38
34
|
description: "Loads environment variables from .env file",
|
|
39
35
|
main: "lib/main.js",
|
|
40
36
|
types: "lib/main.d.ts",
|
|
@@ -57,7 +53,7 @@ var require_package = __commonJS({
|
|
|
57
53
|
lint: "standard",
|
|
58
54
|
pretest: "npm run lint && npm run dts-check",
|
|
59
55
|
test: "tap run --allow-empty-coverage --disable-coverage --timeout=60000",
|
|
60
|
-
"test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=
|
|
56
|
+
"test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",
|
|
61
57
|
prerelease: "npm test",
|
|
62
58
|
release: "standard-version"
|
|
63
59
|
},
|
|
@@ -97,13 +93,13 @@ var require_package = __commonJS({
|
|
|
97
93
|
}
|
|
98
94
|
});
|
|
99
95
|
|
|
100
|
-
// node_modules/dotenv/lib/main.js
|
|
96
|
+
// node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js
|
|
101
97
|
var require_main = __commonJS({
|
|
102
|
-
"node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
98
|
+
"node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
103
99
|
var fs17 = require("fs");
|
|
104
100
|
var path18 = require("path");
|
|
105
101
|
var os6 = require("os");
|
|
106
|
-
var
|
|
102
|
+
var crypto3 = require("crypto");
|
|
107
103
|
var packageJson = require_package();
|
|
108
104
|
var version2 = packageJson.version;
|
|
109
105
|
var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
|
@@ -127,10 +123,8 @@ var require_main = __commonJS({
|
|
|
127
123
|
return obj;
|
|
128
124
|
}
|
|
129
125
|
function _parseVault(options) {
|
|
130
|
-
options = options || {};
|
|
131
126
|
const vaultPath = _vaultPath(options);
|
|
132
|
-
|
|
133
|
-
const result = DotenvModule.configDotenv(options);
|
|
127
|
+
const result = DotenvModule.configDotenv({ path: vaultPath });
|
|
134
128
|
if (!result.parsed) {
|
|
135
129
|
const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
|
|
136
130
|
err.code = "MISSING_DATA";
|
|
@@ -159,9 +153,6 @@ var require_main = __commonJS({
|
|
|
159
153
|
function _debug(message) {
|
|
160
154
|
console.log(`[dotenv@${version2}][DEBUG] ${message}`);
|
|
161
155
|
}
|
|
162
|
-
function _log(message) {
|
|
163
|
-
console.log(`[dotenv@${version2}] ${message}`);
|
|
164
|
-
}
|
|
165
156
|
function _dotenvKey(options) {
|
|
166
157
|
if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {
|
|
167
158
|
return options.DOTENV_KEY;
|
|
@@ -229,9 +220,8 @@ var require_main = __commonJS({
|
|
|
229
220
|
}
|
|
230
221
|
function _configVault(options) {
|
|
231
222
|
const debug = Boolean(options && options.debug);
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
_log("Loading env from encrypted .env.vault");
|
|
223
|
+
if (debug) {
|
|
224
|
+
_debug("Loading env from encrypted .env.vault");
|
|
235
225
|
}
|
|
236
226
|
const parsed = DotenvModule._parseVault(options);
|
|
237
227
|
let processEnv = process.env;
|
|
@@ -245,7 +235,6 @@ var require_main = __commonJS({
|
|
|
245
235
|
const dotenvPath = path18.resolve(process.cwd(), ".env");
|
|
246
236
|
let encoding = "utf8";
|
|
247
237
|
const debug = Boolean(options && options.debug);
|
|
248
|
-
const quiet = options && "quiet" in options ? options.quiet : true;
|
|
249
238
|
if (options && options.encoding) {
|
|
250
239
|
encoding = options.encoding;
|
|
251
240
|
} else {
|
|
@@ -282,22 +271,6 @@ var require_main = __commonJS({
|
|
|
282
271
|
processEnv = options.processEnv;
|
|
283
272
|
}
|
|
284
273
|
DotenvModule.populate(processEnv, parsedAll, options);
|
|
285
|
-
if (debug || !quiet) {
|
|
286
|
-
const keysCount = Object.keys(parsedAll).length;
|
|
287
|
-
const shortPaths = [];
|
|
288
|
-
for (const filePath of optionPaths) {
|
|
289
|
-
try {
|
|
290
|
-
const relative = path18.relative(process.cwd(), filePath);
|
|
291
|
-
shortPaths.push(relative);
|
|
292
|
-
} catch (e) {
|
|
293
|
-
if (debug) {
|
|
294
|
-
_debug(`Failed to load ${filePath} ${e.message}`);
|
|
295
|
-
}
|
|
296
|
-
lastError = e;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
_log(`injecting env (${keysCount}) from ${shortPaths.join(",")}`);
|
|
300
|
-
}
|
|
301
274
|
if (lastError) {
|
|
302
275
|
return { parsed: parsedAll, error: lastError };
|
|
303
276
|
} else {
|
|
@@ -322,7 +295,7 @@ var require_main = __commonJS({
|
|
|
322
295
|
const authTag = ciphertext.subarray(-16);
|
|
323
296
|
ciphertext = ciphertext.subarray(12, -16);
|
|
324
297
|
try {
|
|
325
|
-
const aesgcm =
|
|
298
|
+
const aesgcm = crypto3.createDecipheriv("aes-256-gcm", key, nonce);
|
|
326
299
|
aesgcm.setAuthTag(authTag);
|
|
327
300
|
return `${aesgcm.update(ciphertext)}${aesgcm.final()}`;
|
|
328
301
|
} catch (error) {
|
|
@@ -387,9 +360,9 @@ var require_main = __commonJS({
|
|
|
387
360
|
}
|
|
388
361
|
});
|
|
389
362
|
|
|
390
|
-
// node_modules/proxy-from-env/index.js
|
|
363
|
+
// node_modules/.pnpm/proxy-from-env@1.1.0/node_modules/proxy-from-env/index.js
|
|
391
364
|
var require_proxy_from_env = __commonJS({
|
|
392
|
-
"node_modules/proxy-from-env/index.js"(exports2) {
|
|
365
|
+
"node_modules/.pnpm/proxy-from-env@1.1.0/node_modules/proxy-from-env/index.js"(exports2) {
|
|
393
366
|
"use strict";
|
|
394
367
|
var parseUrl = require("url").parse;
|
|
395
368
|
var DEFAULT_PORTS = {
|
|
@@ -403,7 +376,7 @@ var require_proxy_from_env = __commonJS({
|
|
|
403
376
|
var stringEndsWith = String.prototype.endsWith || function(s) {
|
|
404
377
|
return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
|
|
405
378
|
};
|
|
406
|
-
function
|
|
379
|
+
function getProxyForUrl2(url2) {
|
|
407
380
|
var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {};
|
|
408
381
|
var proto = parsedUrl.protocol;
|
|
409
382
|
var hostname = parsedUrl.host;
|
|
@@ -453,13 +426,13 @@ var require_proxy_from_env = __commonJS({
|
|
|
453
426
|
function getEnv(key) {
|
|
454
427
|
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
455
428
|
}
|
|
456
|
-
exports2.getProxyForUrl =
|
|
429
|
+
exports2.getProxyForUrl = getProxyForUrl2;
|
|
457
430
|
}
|
|
458
431
|
});
|
|
459
432
|
|
|
460
|
-
// node_modules/ms/index.js
|
|
433
|
+
// node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
|
|
461
434
|
var require_ms = __commonJS({
|
|
462
|
-
"node_modules/ms/index.js"(exports2, module2) {
|
|
435
|
+
"node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports2, module2) {
|
|
463
436
|
var s = 1e3;
|
|
464
437
|
var m = s * 60;
|
|
465
438
|
var h = m * 60;
|
|
@@ -573,9 +546,10 @@ var require_ms = __commonJS({
|
|
|
573
546
|
}
|
|
574
547
|
});
|
|
575
548
|
|
|
576
|
-
// node_modules/debug/src/common.js
|
|
549
|
+
// node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/common.js
|
|
577
550
|
var require_common = __commonJS({
|
|
578
|
-
"node_modules/debug/src/common.js"(exports2, module2) {
|
|
551
|
+
"node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/common.js"(exports2, module2) {
|
|
552
|
+
"use strict";
|
|
579
553
|
function setup(env) {
|
|
580
554
|
createDebug.debug = createDebug;
|
|
581
555
|
createDebug.default = createDebug;
|
|
@@ -584,16 +558,16 @@ var require_common = __commonJS({
|
|
|
584
558
|
createDebug.enable = enable;
|
|
585
559
|
createDebug.enabled = enabled;
|
|
586
560
|
createDebug.humanize = require_ms();
|
|
587
|
-
|
|
588
|
-
Object.keys(env).forEach((key) => {
|
|
561
|
+
Object.keys(env).forEach(function(key) {
|
|
589
562
|
createDebug[key] = env[key];
|
|
590
563
|
});
|
|
564
|
+
createDebug.instances = [];
|
|
591
565
|
createDebug.names = [];
|
|
592
566
|
createDebug.skips = [];
|
|
593
567
|
createDebug.formatters = {};
|
|
594
568
|
function selectColor(namespace) {
|
|
595
|
-
|
|
596
|
-
for (
|
|
569
|
+
var hash = 0;
|
|
570
|
+
for (var i = 0; i < namespace.length; i++) {
|
|
597
571
|
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
598
572
|
hash |= 0;
|
|
599
573
|
}
|
|
@@ -601,17 +575,17 @@ var require_common = __commonJS({
|
|
|
601
575
|
}
|
|
602
576
|
createDebug.selectColor = selectColor;
|
|
603
577
|
function createDebug(namespace) {
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
let namespacesCache;
|
|
607
|
-
let enabledCache;
|
|
608
|
-
function debug(...args) {
|
|
578
|
+
var prevTime;
|
|
579
|
+
function debug() {
|
|
609
580
|
if (!debug.enabled) {
|
|
610
581
|
return;
|
|
611
582
|
}
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
583
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
584
|
+
args[_key] = arguments[_key];
|
|
585
|
+
}
|
|
586
|
+
var self2 = debug;
|
|
587
|
+
var curr = Number(/* @__PURE__ */ new Date());
|
|
588
|
+
var ms = curr - (prevTime || curr);
|
|
615
589
|
self2.diff = ms;
|
|
616
590
|
self2.prev = prevTime;
|
|
617
591
|
self2.curr = curr;
|
|
@@ -620,15 +594,15 @@ var require_common = __commonJS({
|
|
|
620
594
|
if (typeof args[0] !== "string") {
|
|
621
595
|
args.unshift("%O");
|
|
622
596
|
}
|
|
623
|
-
|
|
624
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format)
|
|
597
|
+
var index = 0;
|
|
598
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
|
|
625
599
|
if (match === "%%") {
|
|
626
|
-
return
|
|
600
|
+
return match;
|
|
627
601
|
}
|
|
628
602
|
index++;
|
|
629
|
-
|
|
603
|
+
var formatter = createDebug.formatters[format];
|
|
630
604
|
if (typeof formatter === "function") {
|
|
631
|
-
|
|
605
|
+
var val = args[index];
|
|
632
606
|
match = formatter.call(self2, val);
|
|
633
607
|
args.splice(index, 1);
|
|
634
608
|
index--;
|
|
@@ -636,99 +610,71 @@ var require_common = __commonJS({
|
|
|
636
610
|
return match;
|
|
637
611
|
});
|
|
638
612
|
createDebug.formatArgs.call(self2, args);
|
|
639
|
-
|
|
613
|
+
var logFn = self2.log || createDebug.log;
|
|
640
614
|
logFn.apply(self2, args);
|
|
641
615
|
}
|
|
642
616
|
debug.namespace = namespace;
|
|
617
|
+
debug.enabled = createDebug.enabled(namespace);
|
|
643
618
|
debug.useColors = createDebug.useColors();
|
|
644
|
-
debug.color =
|
|
619
|
+
debug.color = selectColor(namespace);
|
|
620
|
+
debug.destroy = destroy;
|
|
645
621
|
debug.extend = extend2;
|
|
646
|
-
debug.destroy = createDebug.destroy;
|
|
647
|
-
Object.defineProperty(debug, "enabled", {
|
|
648
|
-
enumerable: true,
|
|
649
|
-
configurable: false,
|
|
650
|
-
get: () => {
|
|
651
|
-
if (enableOverride !== null) {
|
|
652
|
-
return enableOverride;
|
|
653
|
-
}
|
|
654
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
655
|
-
namespacesCache = createDebug.namespaces;
|
|
656
|
-
enabledCache = createDebug.enabled(namespace);
|
|
657
|
-
}
|
|
658
|
-
return enabledCache;
|
|
659
|
-
},
|
|
660
|
-
set: (v) => {
|
|
661
|
-
enableOverride = v;
|
|
662
|
-
}
|
|
663
|
-
});
|
|
664
622
|
if (typeof createDebug.init === "function") {
|
|
665
623
|
createDebug.init(debug);
|
|
666
624
|
}
|
|
625
|
+
createDebug.instances.push(debug);
|
|
667
626
|
return debug;
|
|
668
627
|
}
|
|
628
|
+
function destroy() {
|
|
629
|
+
var index = createDebug.instances.indexOf(this);
|
|
630
|
+
if (index !== -1) {
|
|
631
|
+
createDebug.instances.splice(index, 1);
|
|
632
|
+
return true;
|
|
633
|
+
}
|
|
634
|
+
return false;
|
|
635
|
+
}
|
|
669
636
|
function extend2(namespace, delimiter) {
|
|
670
|
-
|
|
671
|
-
newDebug.log = this.log;
|
|
672
|
-
return newDebug;
|
|
637
|
+
return createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
673
638
|
}
|
|
674
639
|
function enable(namespaces) {
|
|
675
640
|
createDebug.save(namespaces);
|
|
676
|
-
createDebug.namespaces = namespaces;
|
|
677
641
|
createDebug.names = [];
|
|
678
642
|
createDebug.skips = [];
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
643
|
+
var i;
|
|
644
|
+
var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
|
|
645
|
+
var len = split.length;
|
|
646
|
+
for (i = 0; i < len; i++) {
|
|
647
|
+
if (!split[i]) {
|
|
648
|
+
continue;
|
|
685
649
|
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
let searchIndex = 0;
|
|
690
|
-
let templateIndex = 0;
|
|
691
|
-
let starIndex = -1;
|
|
692
|
-
let matchIndex = 0;
|
|
693
|
-
while (searchIndex < search.length) {
|
|
694
|
-
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
695
|
-
if (template[templateIndex] === "*") {
|
|
696
|
-
starIndex = templateIndex;
|
|
697
|
-
matchIndex = searchIndex;
|
|
698
|
-
templateIndex++;
|
|
699
|
-
} else {
|
|
700
|
-
searchIndex++;
|
|
701
|
-
templateIndex++;
|
|
702
|
-
}
|
|
703
|
-
} else if (starIndex !== -1) {
|
|
704
|
-
templateIndex = starIndex + 1;
|
|
705
|
-
matchIndex++;
|
|
706
|
-
searchIndex = matchIndex;
|
|
650
|
+
namespaces = split[i].replace(/\*/g, ".*?");
|
|
651
|
+
if (namespaces[0] === "-") {
|
|
652
|
+
createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
|
|
707
653
|
} else {
|
|
708
|
-
|
|
654
|
+
createDebug.names.push(new RegExp("^" + namespaces + "$"));
|
|
709
655
|
}
|
|
710
656
|
}
|
|
711
|
-
|
|
712
|
-
|
|
657
|
+
for (i = 0; i < createDebug.instances.length; i++) {
|
|
658
|
+
var instance = createDebug.instances[i];
|
|
659
|
+
instance.enabled = createDebug.enabled(instance.namespace);
|
|
713
660
|
}
|
|
714
|
-
return templateIndex === template.length;
|
|
715
661
|
}
|
|
716
662
|
function disable() {
|
|
717
|
-
const namespaces = [
|
|
718
|
-
...createDebug.names,
|
|
719
|
-
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
720
|
-
].join(",");
|
|
721
663
|
createDebug.enable("");
|
|
722
|
-
return namespaces;
|
|
723
664
|
}
|
|
724
665
|
function enabled(name) {
|
|
725
|
-
|
|
726
|
-
|
|
666
|
+
if (name[name.length - 1] === "*") {
|
|
667
|
+
return true;
|
|
668
|
+
}
|
|
669
|
+
var i;
|
|
670
|
+
var len;
|
|
671
|
+
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
672
|
+
if (createDebug.skips[i].test(name)) {
|
|
727
673
|
return false;
|
|
728
674
|
}
|
|
729
675
|
}
|
|
730
|
-
for (
|
|
731
|
-
if (
|
|
676
|
+
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
677
|
+
if (createDebug.names[i].test(name)) {
|
|
732
678
|
return true;
|
|
733
679
|
}
|
|
734
680
|
}
|
|
@@ -740,9 +686,6 @@ var require_common = __commonJS({
|
|
|
740
686
|
}
|
|
741
687
|
return val;
|
|
742
688
|
}
|
|
743
|
-
function destroy() {
|
|
744
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
745
|
-
}
|
|
746
689
|
createDebug.enable(createDebug.load());
|
|
747
690
|
return createDebug;
|
|
748
691
|
}
|
|
@@ -750,101 +693,29 @@ var require_common = __commonJS({
|
|
|
750
693
|
}
|
|
751
694
|
});
|
|
752
695
|
|
|
753
|
-
// node_modules/debug/src/browser.js
|
|
696
|
+
// node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js
|
|
754
697
|
var require_browser = __commonJS({
|
|
755
|
-
"node_modules/debug/src/browser.js"(exports2, module2) {
|
|
698
|
+
"node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
699
|
+
"use strict";
|
|
700
|
+
function _typeof(obj) {
|
|
701
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
702
|
+
_typeof = function _typeof2(obj2) {
|
|
703
|
+
return typeof obj2;
|
|
704
|
+
};
|
|
705
|
+
} else {
|
|
706
|
+
_typeof = function _typeof2(obj2) {
|
|
707
|
+
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
return _typeof(obj);
|
|
711
|
+
}
|
|
712
|
+
exports2.log = log;
|
|
756
713
|
exports2.formatArgs = formatArgs;
|
|
757
714
|
exports2.save = save;
|
|
758
715
|
exports2.load = load;
|
|
759
716
|
exports2.useColors = useColors;
|
|
760
717
|
exports2.storage = localstorage();
|
|
761
|
-
exports2.
|
|
762
|
-
let warned = false;
|
|
763
|
-
return () => {
|
|
764
|
-
if (!warned) {
|
|
765
|
-
warned = true;
|
|
766
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
767
|
-
}
|
|
768
|
-
};
|
|
769
|
-
})();
|
|
770
|
-
exports2.colors = [
|
|
771
|
-
"#0000CC",
|
|
772
|
-
"#0000FF",
|
|
773
|
-
"#0033CC",
|
|
774
|
-
"#0033FF",
|
|
775
|
-
"#0066CC",
|
|
776
|
-
"#0066FF",
|
|
777
|
-
"#0099CC",
|
|
778
|
-
"#0099FF",
|
|
779
|
-
"#00CC00",
|
|
780
|
-
"#00CC33",
|
|
781
|
-
"#00CC66",
|
|
782
|
-
"#00CC99",
|
|
783
|
-
"#00CCCC",
|
|
784
|
-
"#00CCFF",
|
|
785
|
-
"#3300CC",
|
|
786
|
-
"#3300FF",
|
|
787
|
-
"#3333CC",
|
|
788
|
-
"#3333FF",
|
|
789
|
-
"#3366CC",
|
|
790
|
-
"#3366FF",
|
|
791
|
-
"#3399CC",
|
|
792
|
-
"#3399FF",
|
|
793
|
-
"#33CC00",
|
|
794
|
-
"#33CC33",
|
|
795
|
-
"#33CC66",
|
|
796
|
-
"#33CC99",
|
|
797
|
-
"#33CCCC",
|
|
798
|
-
"#33CCFF",
|
|
799
|
-
"#6600CC",
|
|
800
|
-
"#6600FF",
|
|
801
|
-
"#6633CC",
|
|
802
|
-
"#6633FF",
|
|
803
|
-
"#66CC00",
|
|
804
|
-
"#66CC33",
|
|
805
|
-
"#9900CC",
|
|
806
|
-
"#9900FF",
|
|
807
|
-
"#9933CC",
|
|
808
|
-
"#9933FF",
|
|
809
|
-
"#99CC00",
|
|
810
|
-
"#99CC33",
|
|
811
|
-
"#CC0000",
|
|
812
|
-
"#CC0033",
|
|
813
|
-
"#CC0066",
|
|
814
|
-
"#CC0099",
|
|
815
|
-
"#CC00CC",
|
|
816
|
-
"#CC00FF",
|
|
817
|
-
"#CC3300",
|
|
818
|
-
"#CC3333",
|
|
819
|
-
"#CC3366",
|
|
820
|
-
"#CC3399",
|
|
821
|
-
"#CC33CC",
|
|
822
|
-
"#CC33FF",
|
|
823
|
-
"#CC6600",
|
|
824
|
-
"#CC6633",
|
|
825
|
-
"#CC9900",
|
|
826
|
-
"#CC9933",
|
|
827
|
-
"#CCCC00",
|
|
828
|
-
"#CCCC33",
|
|
829
|
-
"#FF0000",
|
|
830
|
-
"#FF0033",
|
|
831
|
-
"#FF0066",
|
|
832
|
-
"#FF0099",
|
|
833
|
-
"#FF00CC",
|
|
834
|
-
"#FF00FF",
|
|
835
|
-
"#FF3300",
|
|
836
|
-
"#FF3333",
|
|
837
|
-
"#FF3366",
|
|
838
|
-
"#FF3399",
|
|
839
|
-
"#FF33CC",
|
|
840
|
-
"#FF33FF",
|
|
841
|
-
"#FF6600",
|
|
842
|
-
"#FF6633",
|
|
843
|
-
"#FF9900",
|
|
844
|
-
"#FF9933",
|
|
845
|
-
"#FFCC00",
|
|
846
|
-
"#FFCC33"
|
|
847
|
-
];
|
|
718
|
+
exports2.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33"];
|
|
848
719
|
function useColors() {
|
|
849
720
|
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
850
721
|
return true;
|
|
@@ -852,11 +723,10 @@ var require_browser = __commonJS({
|
|
|
852
723
|
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
853
724
|
return false;
|
|
854
725
|
}
|
|
855
|
-
let m;
|
|
856
726
|
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
857
727
|
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
858
728
|
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
859
|
-
typeof navigator !== "undefined" && navigator.userAgent &&
|
|
729
|
+
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
860
730
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
861
731
|
}
|
|
862
732
|
function formatArgs(args) {
|
|
@@ -864,11 +734,11 @@ var require_browser = __commonJS({
|
|
|
864
734
|
if (!this.useColors) {
|
|
865
735
|
return;
|
|
866
736
|
}
|
|
867
|
-
|
|
737
|
+
var c = "color: " + this.color;
|
|
868
738
|
args.splice(1, 0, c, "color: inherit");
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
args[0].replace(/%[a-zA-Z%]/g, (match)
|
|
739
|
+
var index = 0;
|
|
740
|
+
var lastC = 0;
|
|
741
|
+
args[0].replace(/%[a-zA-Z%]/g, function(match) {
|
|
872
742
|
if (match === "%%") {
|
|
873
743
|
return;
|
|
874
744
|
}
|
|
@@ -879,8 +749,10 @@ var require_browser = __commonJS({
|
|
|
879
749
|
});
|
|
880
750
|
args.splice(lastC, 0, c);
|
|
881
751
|
}
|
|
882
|
-
|
|
883
|
-
|
|
752
|
+
function log() {
|
|
753
|
+
var _console;
|
|
754
|
+
return (typeof console === "undefined" ? "undefined" : _typeof(console)) === "object" && console.log && (_console = console).log.apply(_console, arguments);
|
|
755
|
+
}
|
|
884
756
|
function save(namespaces) {
|
|
885
757
|
try {
|
|
886
758
|
if (namespaces) {
|
|
@@ -892,9 +764,9 @@ var require_browser = __commonJS({
|
|
|
892
764
|
}
|
|
893
765
|
}
|
|
894
766
|
function load() {
|
|
895
|
-
|
|
767
|
+
var r;
|
|
896
768
|
try {
|
|
897
|
-
r = exports2.storage.getItem("debug")
|
|
769
|
+
r = exports2.storage.getItem("debug");
|
|
898
770
|
} catch (error) {
|
|
899
771
|
}
|
|
900
772
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
@@ -909,7 +781,7 @@ var require_browser = __commonJS({
|
|
|
909
781
|
}
|
|
910
782
|
}
|
|
911
783
|
module2.exports = require_common()(exports2);
|
|
912
|
-
var
|
|
784
|
+
var formatters = module2.exports.formatters;
|
|
913
785
|
formatters.j = function(v) {
|
|
914
786
|
try {
|
|
915
787
|
return JSON.stringify(v);
|
|
@@ -920,9 +792,9 @@ var require_browser = __commonJS({
|
|
|
920
792
|
}
|
|
921
793
|
});
|
|
922
794
|
|
|
923
|
-
// node_modules/has-flag/index.js
|
|
795
|
+
// node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
|
|
924
796
|
var require_has_flag = __commonJS({
|
|
925
|
-
"node_modules/has-flag/index.js"(exports2, module2) {
|
|
797
|
+
"node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports2, module2) {
|
|
926
798
|
"use strict";
|
|
927
799
|
module2.exports = (flag, argv) => {
|
|
928
800
|
argv = argv || process.argv;
|
|
@@ -934,9 +806,9 @@ var require_has_flag = __commonJS({
|
|
|
934
806
|
}
|
|
935
807
|
});
|
|
936
808
|
|
|
937
|
-
// node_modules/supports-color/index.js
|
|
809
|
+
// node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
|
|
938
810
|
var require_supports_color = __commonJS({
|
|
939
|
-
"node_modules/supports-color/index.js"(exports2, module2) {
|
|
811
|
+
"node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports2, module2) {
|
|
940
812
|
"use strict";
|
|
941
813
|
var os6 = require("os");
|
|
942
814
|
var hasFlag = require_has_flag();
|
|
@@ -1029,114 +901,34 @@ var require_supports_color = __commonJS({
|
|
|
1029
901
|
}
|
|
1030
902
|
});
|
|
1031
903
|
|
|
1032
|
-
// node_modules/debug/src/node.js
|
|
904
|
+
// node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/node.js
|
|
1033
905
|
var require_node = __commonJS({
|
|
1034
|
-
"node_modules/debug/src/node.js"(exports2, module2) {
|
|
906
|
+
"node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/node.js"(exports2, module2) {
|
|
907
|
+
"use strict";
|
|
1035
908
|
var tty = require("tty");
|
|
1036
|
-
var
|
|
909
|
+
var util2 = require("util");
|
|
1037
910
|
exports2.init = init;
|
|
1038
911
|
exports2.log = log;
|
|
1039
912
|
exports2.formatArgs = formatArgs;
|
|
1040
913
|
exports2.save = save;
|
|
1041
914
|
exports2.load = load;
|
|
1042
915
|
exports2.useColors = useColors;
|
|
1043
|
-
exports2.destroy = util3.deprecate(
|
|
1044
|
-
() => {
|
|
1045
|
-
},
|
|
1046
|
-
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
|
1047
|
-
);
|
|
1048
916
|
exports2.colors = [6, 2, 3, 4, 5, 1];
|
|
1049
917
|
try {
|
|
1050
|
-
|
|
918
|
+
supportsColor = require_supports_color();
|
|
1051
919
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
1052
|
-
exports2.colors = [
|
|
1053
|
-
20,
|
|
1054
|
-
21,
|
|
1055
|
-
26,
|
|
1056
|
-
27,
|
|
1057
|
-
32,
|
|
1058
|
-
33,
|
|
1059
|
-
38,
|
|
1060
|
-
39,
|
|
1061
|
-
40,
|
|
1062
|
-
41,
|
|
1063
|
-
42,
|
|
1064
|
-
43,
|
|
1065
|
-
44,
|
|
1066
|
-
45,
|
|
1067
|
-
56,
|
|
1068
|
-
57,
|
|
1069
|
-
62,
|
|
1070
|
-
63,
|
|
1071
|
-
68,
|
|
1072
|
-
69,
|
|
1073
|
-
74,
|
|
1074
|
-
75,
|
|
1075
|
-
76,
|
|
1076
|
-
77,
|
|
1077
|
-
78,
|
|
1078
|
-
79,
|
|
1079
|
-
80,
|
|
1080
|
-
81,
|
|
1081
|
-
92,
|
|
1082
|
-
93,
|
|
1083
|
-
98,
|
|
1084
|
-
99,
|
|
1085
|
-
112,
|
|
1086
|
-
113,
|
|
1087
|
-
128,
|
|
1088
|
-
129,
|
|
1089
|
-
134,
|
|
1090
|
-
135,
|
|
1091
|
-
148,
|
|
1092
|
-
149,
|
|
1093
|
-
160,
|
|
1094
|
-
161,
|
|
1095
|
-
162,
|
|
1096
|
-
163,
|
|
1097
|
-
164,
|
|
1098
|
-
165,
|
|
1099
|
-
166,
|
|
1100
|
-
167,
|
|
1101
|
-
168,
|
|
1102
|
-
169,
|
|
1103
|
-
170,
|
|
1104
|
-
171,
|
|
1105
|
-
172,
|
|
1106
|
-
173,
|
|
1107
|
-
178,
|
|
1108
|
-
179,
|
|
1109
|
-
184,
|
|
1110
|
-
185,
|
|
1111
|
-
196,
|
|
1112
|
-
197,
|
|
1113
|
-
198,
|
|
1114
|
-
199,
|
|
1115
|
-
200,
|
|
1116
|
-
201,
|
|
1117
|
-
202,
|
|
1118
|
-
203,
|
|
1119
|
-
204,
|
|
1120
|
-
205,
|
|
1121
|
-
206,
|
|
1122
|
-
207,
|
|
1123
|
-
208,
|
|
1124
|
-
209,
|
|
1125
|
-
214,
|
|
1126
|
-
215,
|
|
1127
|
-
220,
|
|
1128
|
-
221
|
|
1129
|
-
];
|
|
920
|
+
exports2.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
|
|
1130
921
|
}
|
|
1131
922
|
} catch (error) {
|
|
1132
923
|
}
|
|
1133
|
-
|
|
924
|
+
var supportsColor;
|
|
925
|
+
exports2.inspectOpts = Object.keys(process.env).filter(function(key) {
|
|
1134
926
|
return /^debug_/i.test(key);
|
|
1135
|
-
}).reduce((obj, key)
|
|
1136
|
-
|
|
927
|
+
}).reduce(function(obj, key) {
|
|
928
|
+
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
|
|
1137
929
|
return k.toUpperCase();
|
|
1138
930
|
});
|
|
1139
|
-
|
|
931
|
+
var val = process.env[key];
|
|
1140
932
|
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
1141
933
|
val = true;
|
|
1142
934
|
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
@@ -1153,11 +945,11 @@ var require_node = __commonJS({
|
|
|
1153
945
|
return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
1154
946
|
}
|
|
1155
947
|
function formatArgs(args) {
|
|
1156
|
-
|
|
948
|
+
var name = this.namespace, useColors2 = this.useColors;
|
|
1157
949
|
if (useColors2) {
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
950
|
+
var c = this.color;
|
|
951
|
+
var colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
952
|
+
var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m");
|
|
1161
953
|
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
1162
954
|
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
|
|
1163
955
|
} else {
|
|
@@ -1170,8 +962,8 @@ var require_node = __commonJS({
|
|
|
1170
962
|
}
|
|
1171
963
|
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
1172
964
|
}
|
|
1173
|
-
function log(
|
|
1174
|
-
return process.stderr.write(
|
|
965
|
+
function log() {
|
|
966
|
+
return process.stderr.write(util2.format.apply(util2, arguments) + "\n");
|
|
1175
967
|
}
|
|
1176
968
|
function save(namespaces) {
|
|
1177
969
|
if (namespaces) {
|
|
@@ -1185,27 +977,30 @@ var require_node = __commonJS({
|
|
|
1185
977
|
}
|
|
1186
978
|
function init(debug) {
|
|
1187
979
|
debug.inspectOpts = {};
|
|
1188
|
-
|
|
1189
|
-
for (
|
|
980
|
+
var keys = Object.keys(exports2.inspectOpts);
|
|
981
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1190
982
|
debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
|
|
1191
983
|
}
|
|
1192
984
|
}
|
|
1193
985
|
module2.exports = require_common()(exports2);
|
|
1194
|
-
var
|
|
986
|
+
var formatters = module2.exports.formatters;
|
|
1195
987
|
formatters.o = function(v) {
|
|
1196
988
|
this.inspectOpts.colors = this.useColors;
|
|
1197
|
-
return
|
|
989
|
+
return util2.inspect(v, this.inspectOpts).split("\n").map(function(str) {
|
|
990
|
+
return str.trim();
|
|
991
|
+
}).join(" ");
|
|
1198
992
|
};
|
|
1199
993
|
formatters.O = function(v) {
|
|
1200
994
|
this.inspectOpts.colors = this.useColors;
|
|
1201
|
-
return
|
|
995
|
+
return util2.inspect(v, this.inspectOpts);
|
|
1202
996
|
};
|
|
1203
997
|
}
|
|
1204
998
|
});
|
|
1205
999
|
|
|
1206
|
-
// node_modules/debug/src/index.js
|
|
1000
|
+
// node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/index.js
|
|
1207
1001
|
var require_src = __commonJS({
|
|
1208
|
-
"node_modules/debug/src/index.js"(exports2, module2) {
|
|
1002
|
+
"node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/index.js"(exports2, module2) {
|
|
1003
|
+
"use strict";
|
|
1209
1004
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
1210
1005
|
module2.exports = require_browser();
|
|
1211
1006
|
} else {
|
|
@@ -1214,9 +1009,9 @@ var require_src = __commonJS({
|
|
|
1214
1009
|
}
|
|
1215
1010
|
});
|
|
1216
1011
|
|
|
1217
|
-
// node_modules/follow-redirects/debug.js
|
|
1012
|
+
// node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/debug.js
|
|
1218
1013
|
var require_debug = __commonJS({
|
|
1219
|
-
"node_modules/follow-redirects/debug.js"(exports2, module2) {
|
|
1014
|
+
"node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/debug.js"(exports2, module2) {
|
|
1220
1015
|
var debug;
|
|
1221
1016
|
module2.exports = function() {
|
|
1222
1017
|
if (!debug) {
|
|
@@ -1234,43 +1029,16 @@ var require_debug = __commonJS({
|
|
|
1234
1029
|
}
|
|
1235
1030
|
});
|
|
1236
1031
|
|
|
1237
|
-
// node_modules/follow-redirects/index.js
|
|
1032
|
+
// node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/index.js
|
|
1238
1033
|
var require_follow_redirects = __commonJS({
|
|
1239
|
-
"node_modules/follow-redirects/index.js"(exports2, module2) {
|
|
1034
|
+
"node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/index.js"(exports2, module2) {
|
|
1240
1035
|
var url2 = require("url");
|
|
1241
1036
|
var URL5 = url2.URL;
|
|
1242
|
-
var
|
|
1037
|
+
var http3 = require("http");
|
|
1243
1038
|
var https2 = require("https");
|
|
1244
1039
|
var Writable = require("stream").Writable;
|
|
1245
1040
|
var assert = require("assert");
|
|
1246
1041
|
var debug = require_debug();
|
|
1247
|
-
(function detectUnsupportedEnvironment() {
|
|
1248
|
-
var looksLikeNode = typeof process !== "undefined";
|
|
1249
|
-
var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined";
|
|
1250
|
-
var looksLikeV8 = isFunction3(Error.captureStackTrace);
|
|
1251
|
-
if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) {
|
|
1252
|
-
console.warn("The follow-redirects package should be excluded from browser builds.");
|
|
1253
|
-
}
|
|
1254
|
-
})();
|
|
1255
|
-
var useNativeURL = false;
|
|
1256
|
-
try {
|
|
1257
|
-
assert(new URL5(""));
|
|
1258
|
-
} catch (error) {
|
|
1259
|
-
useNativeURL = error.code === "ERR_INVALID_URL";
|
|
1260
|
-
}
|
|
1261
|
-
var preservedUrlFields = [
|
|
1262
|
-
"auth",
|
|
1263
|
-
"host",
|
|
1264
|
-
"hostname",
|
|
1265
|
-
"href",
|
|
1266
|
-
"path",
|
|
1267
|
-
"pathname",
|
|
1268
|
-
"port",
|
|
1269
|
-
"protocol",
|
|
1270
|
-
"query",
|
|
1271
|
-
"search",
|
|
1272
|
-
"hash"
|
|
1273
|
-
];
|
|
1274
1042
|
var events = ["abort", "aborted", "connect", "error", "socket", "timeout"];
|
|
1275
1043
|
var eventHandlers = /* @__PURE__ */ Object.create(null);
|
|
1276
1044
|
events.forEach(function(event) {
|
|
@@ -1289,8 +1057,7 @@ var require_follow_redirects = __commonJS({
|
|
|
1289
1057
|
);
|
|
1290
1058
|
var TooManyRedirectsError = createErrorType(
|
|
1291
1059
|
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
1292
|
-
"Maximum number of redirects exceeded"
|
|
1293
|
-
RedirectionError
|
|
1060
|
+
"Maximum number of redirects exceeded"
|
|
1294
1061
|
);
|
|
1295
1062
|
var MaxBodyLengthExceededError = createErrorType(
|
|
1296
1063
|
"ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
|
|
@@ -1300,7 +1067,6 @@ var require_follow_redirects = __commonJS({
|
|
|
1300
1067
|
"ERR_STREAM_WRITE_AFTER_END",
|
|
1301
1068
|
"write after end"
|
|
1302
1069
|
);
|
|
1303
|
-
var destroy = Writable.prototype.destroy || noop2;
|
|
1304
1070
|
function RedirectableRequest(options, responseCallback) {
|
|
1305
1071
|
Writable.call(this);
|
|
1306
1072
|
this._sanitizeOptions(options);
|
|
@@ -1316,25 +1082,15 @@ var require_follow_redirects = __commonJS({
|
|
|
1316
1082
|
}
|
|
1317
1083
|
var self2 = this;
|
|
1318
1084
|
this._onNativeResponse = function(response) {
|
|
1319
|
-
|
|
1320
|
-
self2._processResponse(response);
|
|
1321
|
-
} catch (cause) {
|
|
1322
|
-
self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
|
|
1323
|
-
}
|
|
1085
|
+
self2._processResponse(response);
|
|
1324
1086
|
};
|
|
1325
1087
|
this._performRequest();
|
|
1326
1088
|
}
|
|
1327
1089
|
RedirectableRequest.prototype = Object.create(Writable.prototype);
|
|
1328
1090
|
RedirectableRequest.prototype.abort = function() {
|
|
1329
|
-
|
|
1330
|
-
this._currentRequest.abort();
|
|
1091
|
+
abortRequest(this._currentRequest);
|
|
1331
1092
|
this.emit("abort");
|
|
1332
1093
|
};
|
|
1333
|
-
RedirectableRequest.prototype.destroy = function(error) {
|
|
1334
|
-
destroyRequest(this._currentRequest, error);
|
|
1335
|
-
destroy.call(this, error);
|
|
1336
|
-
return this;
|
|
1337
|
-
};
|
|
1338
1094
|
RedirectableRequest.prototype.write = function(data, encoding, callback) {
|
|
1339
1095
|
if (this._ending) {
|
|
1340
1096
|
throw new WriteAfterEndError();
|
|
@@ -1342,7 +1098,7 @@ var require_follow_redirects = __commonJS({
|
|
|
1342
1098
|
if (!isString2(data) && !isBuffer2(data)) {
|
|
1343
1099
|
throw new TypeError("data should be a string, Buffer or Uint8Array");
|
|
1344
1100
|
}
|
|
1345
|
-
if (
|
|
1101
|
+
if (isFunction2(encoding)) {
|
|
1346
1102
|
callback = encoding;
|
|
1347
1103
|
encoding = null;
|
|
1348
1104
|
}
|
|
@@ -1362,10 +1118,10 @@ var require_follow_redirects = __commonJS({
|
|
|
1362
1118
|
}
|
|
1363
1119
|
};
|
|
1364
1120
|
RedirectableRequest.prototype.end = function(data, encoding, callback) {
|
|
1365
|
-
if (
|
|
1121
|
+
if (isFunction2(data)) {
|
|
1366
1122
|
callback = data;
|
|
1367
1123
|
data = encoding = null;
|
|
1368
|
-
} else if (
|
|
1124
|
+
} else if (isFunction2(encoding)) {
|
|
1369
1125
|
callback = encoding;
|
|
1370
1126
|
encoding = null;
|
|
1371
1127
|
}
|
|
@@ -1415,7 +1171,6 @@ var require_follow_redirects = __commonJS({
|
|
|
1415
1171
|
self2.removeListener("abort", clearTimer);
|
|
1416
1172
|
self2.removeListener("error", clearTimer);
|
|
1417
1173
|
self2.removeListener("response", clearTimer);
|
|
1418
|
-
self2.removeListener("close", clearTimer);
|
|
1419
1174
|
if (callback) {
|
|
1420
1175
|
self2.removeListener("timeout", callback);
|
|
1421
1176
|
}
|
|
@@ -1435,7 +1190,6 @@ var require_follow_redirects = __commonJS({
|
|
|
1435
1190
|
this.on("abort", clearTimer);
|
|
1436
1191
|
this.on("error", clearTimer);
|
|
1437
1192
|
this.on("response", clearTimer);
|
|
1438
|
-
this.on("close", clearTimer);
|
|
1439
1193
|
return this;
|
|
1440
1194
|
};
|
|
1441
1195
|
[
|
|
@@ -1479,7 +1233,8 @@ var require_follow_redirects = __commonJS({
|
|
|
1479
1233
|
var protocol = this._options.protocol;
|
|
1480
1234
|
var nativeProtocol = this._options.nativeProtocols[protocol];
|
|
1481
1235
|
if (!nativeProtocol) {
|
|
1482
|
-
|
|
1236
|
+
this.emit("error", new TypeError("Unsupported protocol " + protocol));
|
|
1237
|
+
return;
|
|
1483
1238
|
}
|
|
1484
1239
|
if (this._options.agents) {
|
|
1485
1240
|
var scheme = protocol.slice(0, -1);
|
|
@@ -1532,10 +1287,11 @@ var require_follow_redirects = __commonJS({
|
|
|
1532
1287
|
this._requestBodyBuffers = [];
|
|
1533
1288
|
return;
|
|
1534
1289
|
}
|
|
1535
|
-
|
|
1290
|
+
abortRequest(this._currentRequest);
|
|
1536
1291
|
response.destroy();
|
|
1537
1292
|
if (++this._redirectCount > this._options.maxRedirects) {
|
|
1538
|
-
|
|
1293
|
+
this.emit("error", new TooManyRedirectsError());
|
|
1294
|
+
return;
|
|
1539
1295
|
}
|
|
1540
1296
|
var requestHeaders;
|
|
1541
1297
|
var beforeRedirect = this._options.beforeRedirect;
|
|
@@ -1556,17 +1312,24 @@ var require_follow_redirects = __commonJS({
|
|
|
1556
1312
|
removeMatchingHeaders(/^content-/i, this._options.headers);
|
|
1557
1313
|
}
|
|
1558
1314
|
var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
|
|
1559
|
-
var currentUrlParts =
|
|
1315
|
+
var currentUrlParts = url2.parse(this._currentUrl);
|
|
1560
1316
|
var currentHost = currentHostHeader || currentUrlParts.host;
|
|
1561
1317
|
var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost }));
|
|
1562
|
-
var redirectUrl
|
|
1563
|
-
|
|
1318
|
+
var redirectUrl;
|
|
1319
|
+
try {
|
|
1320
|
+
redirectUrl = url2.resolve(currentUrl, location);
|
|
1321
|
+
} catch (cause) {
|
|
1322
|
+
this.emit("error", new RedirectionError({ cause }));
|
|
1323
|
+
return;
|
|
1324
|
+
}
|
|
1325
|
+
debug("redirecting to", redirectUrl);
|
|
1564
1326
|
this._isRedirect = true;
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1327
|
+
var redirectUrlParts = url2.parse(redirectUrl);
|
|
1328
|
+
Object.assign(this._options, redirectUrlParts);
|
|
1329
|
+
if (redirectUrlParts.protocol !== currentUrlParts.protocol && redirectUrlParts.protocol !== "https:" || redirectUrlParts.host !== currentHost && !isSubdomain(redirectUrlParts.host, currentHost)) {
|
|
1330
|
+
removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
|
|
1568
1331
|
}
|
|
1569
|
-
if (
|
|
1332
|
+
if (isFunction2(beforeRedirect)) {
|
|
1570
1333
|
var responseDetails = {
|
|
1571
1334
|
headers: response.headers,
|
|
1572
1335
|
statusCode
|
|
@@ -1576,10 +1339,19 @@ var require_follow_redirects = __commonJS({
|
|
|
1576
1339
|
method,
|
|
1577
1340
|
headers: requestHeaders
|
|
1578
1341
|
};
|
|
1579
|
-
|
|
1342
|
+
try {
|
|
1343
|
+
beforeRedirect(this._options, responseDetails, requestDetails);
|
|
1344
|
+
} catch (err) {
|
|
1345
|
+
this.emit("error", err);
|
|
1346
|
+
return;
|
|
1347
|
+
}
|
|
1580
1348
|
this._sanitizeOptions(this._options);
|
|
1581
1349
|
}
|
|
1582
|
-
|
|
1350
|
+
try {
|
|
1351
|
+
this._performRequest();
|
|
1352
|
+
} catch (cause) {
|
|
1353
|
+
this.emit("error", new RedirectionError({ cause }));
|
|
1354
|
+
}
|
|
1583
1355
|
};
|
|
1584
1356
|
function wrap(protocols) {
|
|
1585
1357
|
var exports3 = {
|
|
@@ -1592,16 +1364,25 @@ var require_follow_redirects = __commonJS({
|
|
|
1592
1364
|
var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
|
|
1593
1365
|
var wrappedProtocol = exports3[scheme] = Object.create(nativeProtocol);
|
|
1594
1366
|
function request(input, options, callback) {
|
|
1595
|
-
if (
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1367
|
+
if (isString2(input)) {
|
|
1368
|
+
var parsed;
|
|
1369
|
+
try {
|
|
1370
|
+
parsed = urlToOptions(new URL5(input));
|
|
1371
|
+
} catch (err) {
|
|
1372
|
+
parsed = url2.parse(input);
|
|
1373
|
+
}
|
|
1374
|
+
if (!isString2(parsed.protocol)) {
|
|
1375
|
+
throw new InvalidUrlError({ input });
|
|
1376
|
+
}
|
|
1377
|
+
input = parsed;
|
|
1378
|
+
} else if (URL5 && input instanceof URL5) {
|
|
1379
|
+
input = urlToOptions(input);
|
|
1599
1380
|
} else {
|
|
1600
1381
|
callback = options;
|
|
1601
|
-
options =
|
|
1382
|
+
options = input;
|
|
1602
1383
|
input = { protocol };
|
|
1603
1384
|
}
|
|
1604
|
-
if (
|
|
1385
|
+
if (isFunction2(options)) {
|
|
1605
1386
|
callback = options;
|
|
1606
1387
|
options = null;
|
|
1607
1388
|
}
|
|
@@ -1631,43 +1412,23 @@ var require_follow_redirects = __commonJS({
|
|
|
1631
1412
|
}
|
|
1632
1413
|
function noop2() {
|
|
1633
1414
|
}
|
|
1634
|
-
function
|
|
1635
|
-
var
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
function validateUrl(input) {
|
|
1650
|
-
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
|
1651
|
-
throw new InvalidUrlError({ input: input.href || input });
|
|
1652
|
-
}
|
|
1653
|
-
if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) {
|
|
1654
|
-
throw new InvalidUrlError({ input: input.href || input });
|
|
1655
|
-
}
|
|
1656
|
-
return input;
|
|
1657
|
-
}
|
|
1658
|
-
function spreadUrlObject(urlObject, target) {
|
|
1659
|
-
var spread3 = target || {};
|
|
1660
|
-
for (var key of preservedUrlFields) {
|
|
1661
|
-
spread3[key] = urlObject[key];
|
|
1662
|
-
}
|
|
1663
|
-
if (spread3.hostname.startsWith("[")) {
|
|
1664
|
-
spread3.hostname = spread3.hostname.slice(1, -1);
|
|
1665
|
-
}
|
|
1666
|
-
if (spread3.port !== "") {
|
|
1667
|
-
spread3.port = Number(spread3.port);
|
|
1415
|
+
function urlToOptions(urlObject) {
|
|
1416
|
+
var options = {
|
|
1417
|
+
protocol: urlObject.protocol,
|
|
1418
|
+
hostname: urlObject.hostname.startsWith("[") ? (
|
|
1419
|
+
/* istanbul ignore next */
|
|
1420
|
+
urlObject.hostname.slice(1, -1)
|
|
1421
|
+
) : urlObject.hostname,
|
|
1422
|
+
hash: urlObject.hash,
|
|
1423
|
+
search: urlObject.search,
|
|
1424
|
+
pathname: urlObject.pathname,
|
|
1425
|
+
path: urlObject.pathname + urlObject.search,
|
|
1426
|
+
href: urlObject.href
|
|
1427
|
+
};
|
|
1428
|
+
if (urlObject.port !== "") {
|
|
1429
|
+
options.port = Number(urlObject.port);
|
|
1668
1430
|
}
|
|
1669
|
-
|
|
1670
|
-
return spread3;
|
|
1431
|
+
return options;
|
|
1671
1432
|
}
|
|
1672
1433
|
function removeMatchingHeaders(regex, headers) {
|
|
1673
1434
|
var lastValue;
|
|
@@ -1681,32 +1442,22 @@ var require_follow_redirects = __commonJS({
|
|
|
1681
1442
|
}
|
|
1682
1443
|
function createErrorType(code, message, baseClass) {
|
|
1683
1444
|
function CustomError(properties) {
|
|
1684
|
-
|
|
1685
|
-
Error.captureStackTrace(this, this.constructor);
|
|
1686
|
-
}
|
|
1445
|
+
Error.captureStackTrace(this, this.constructor);
|
|
1687
1446
|
Object.assign(this, properties || {});
|
|
1688
1447
|
this.code = code;
|
|
1689
1448
|
this.message = this.cause ? message + ": " + this.cause.message : message;
|
|
1690
1449
|
}
|
|
1691
1450
|
CustomError.prototype = new (baseClass || Error)();
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
value: CustomError,
|
|
1695
|
-
enumerable: false
|
|
1696
|
-
},
|
|
1697
|
-
name: {
|
|
1698
|
-
value: "Error [" + code + "]",
|
|
1699
|
-
enumerable: false
|
|
1700
|
-
}
|
|
1701
|
-
});
|
|
1451
|
+
CustomError.prototype.constructor = CustomError;
|
|
1452
|
+
CustomError.prototype.name = "Error [" + code + "]";
|
|
1702
1453
|
return CustomError;
|
|
1703
1454
|
}
|
|
1704
|
-
function
|
|
1455
|
+
function abortRequest(request) {
|
|
1705
1456
|
for (var event of events) {
|
|
1706
1457
|
request.removeListener(event, eventHandlers[event]);
|
|
1707
1458
|
}
|
|
1708
1459
|
request.on("error", noop2);
|
|
1709
|
-
request.
|
|
1460
|
+
request.abort();
|
|
1710
1461
|
}
|
|
1711
1462
|
function isSubdomain(subdomain, domain) {
|
|
1712
1463
|
assert(isString2(subdomain) && isString2(domain));
|
|
@@ -1716,16 +1467,13 @@ var require_follow_redirects = __commonJS({
|
|
|
1716
1467
|
function isString2(value) {
|
|
1717
1468
|
return typeof value === "string" || value instanceof String;
|
|
1718
1469
|
}
|
|
1719
|
-
function
|
|
1470
|
+
function isFunction2(value) {
|
|
1720
1471
|
return typeof value === "function";
|
|
1721
1472
|
}
|
|
1722
1473
|
function isBuffer2(value) {
|
|
1723
1474
|
return typeof value === "object" && "length" in value;
|
|
1724
1475
|
}
|
|
1725
|
-
|
|
1726
|
-
return URL5 && value instanceof URL5;
|
|
1727
|
-
}
|
|
1728
|
-
module2.exports = wrap({ http: http4, https: https2 });
|
|
1476
|
+
module2.exports = wrap({ http: http3, https: https2 });
|
|
1729
1477
|
module2.exports.wrap = wrap;
|
|
1730
1478
|
}
|
|
1731
1479
|
});
|
|
@@ -1775,7 +1523,7 @@ var import_chalk24 = __toESM(require("chalk"));
|
|
|
1775
1523
|
var import_figlet5 = __toESM(require("figlet"));
|
|
1776
1524
|
|
|
1777
1525
|
// package.json
|
|
1778
|
-
var version = "2.0.2-beta.
|
|
1526
|
+
var version = "2.0.2-beta.2";
|
|
1779
1527
|
|
|
1780
1528
|
// bin/upload.ts
|
|
1781
1529
|
var import_path7 = __toESM(require("path"));
|
|
@@ -1783,17 +1531,16 @@ var import_chalk5 = __toESM(require("chalk"));
|
|
|
1783
1531
|
var import_inquirer = __toESM(require("inquirer"));
|
|
1784
1532
|
var import_figlet = __toESM(require("figlet"));
|
|
1785
1533
|
|
|
1786
|
-
// node_modules/axios/lib/helpers/bind.js
|
|
1534
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/bind.js
|
|
1787
1535
|
function bind(fn, thisArg) {
|
|
1788
1536
|
return function wrap() {
|
|
1789
1537
|
return fn.apply(thisArg, arguments);
|
|
1790
1538
|
};
|
|
1791
1539
|
}
|
|
1792
1540
|
|
|
1793
|
-
// node_modules/axios/lib/utils.js
|
|
1541
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/utils.js
|
|
1794
1542
|
var { toString } = Object.prototype;
|
|
1795
1543
|
var { getPrototypeOf } = Object;
|
|
1796
|
-
var { iterator, toStringTag } = Symbol;
|
|
1797
1544
|
var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
|
|
1798
1545
|
const str = toString.call(thing);
|
|
1799
1546
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -1827,52 +1574,20 @@ var isPlainObject = (val) => {
|
|
|
1827
1574
|
if (kindOf(val) !== "object") {
|
|
1828
1575
|
return false;
|
|
1829
1576
|
}
|
|
1830
|
-
const
|
|
1831
|
-
return (
|
|
1832
|
-
};
|
|
1833
|
-
var isEmptyObject = (val) => {
|
|
1834
|
-
if (!isObject(val) || isBuffer(val)) {
|
|
1835
|
-
return false;
|
|
1836
|
-
}
|
|
1837
|
-
try {
|
|
1838
|
-
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
1839
|
-
} catch (e) {
|
|
1840
|
-
return false;
|
|
1841
|
-
}
|
|
1577
|
+
const prototype3 = getPrototypeOf(val);
|
|
1578
|
+
return (prototype3 === null || prototype3 === Object.prototype || Object.getPrototypeOf(prototype3) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
|
1842
1579
|
};
|
|
1843
1580
|
var isDate = kindOfTest("Date");
|
|
1844
1581
|
var isFile = kindOfTest("File");
|
|
1845
|
-
var isReactNativeBlob = (value) => {
|
|
1846
|
-
return !!(value && typeof value.uri !== "undefined");
|
|
1847
|
-
};
|
|
1848
|
-
var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
|
|
1849
1582
|
var isBlob = kindOfTest("Blob");
|
|
1850
1583
|
var isFileList = kindOfTest("FileList");
|
|
1851
1584
|
var isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
1852
|
-
function getGlobal() {
|
|
1853
|
-
if (typeof globalThis !== "undefined") return globalThis;
|
|
1854
|
-
if (typeof self !== "undefined") return self;
|
|
1855
|
-
if (typeof window !== "undefined") return window;
|
|
1856
|
-
if (typeof global !== "undefined") return global;
|
|
1857
|
-
return {};
|
|
1858
|
-
}
|
|
1859
|
-
var G = getGlobal();
|
|
1860
|
-
var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0;
|
|
1861
1585
|
var isFormData = (thing) => {
|
|
1862
|
-
|
|
1863
|
-
return thing && (
|
|
1864
|
-
kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
|
|
1586
|
+
const pattern = "[object FormData]";
|
|
1587
|
+
return thing && (typeof FormData === "function" && thing instanceof FormData || toString.call(thing) === pattern || isFunction(thing.toString) && thing.toString() === pattern);
|
|
1865
1588
|
};
|
|
1866
1589
|
var isURLSearchParams = kindOfTest("URLSearchParams");
|
|
1867
|
-
var
|
|
1868
|
-
"ReadableStream",
|
|
1869
|
-
"Request",
|
|
1870
|
-
"Response",
|
|
1871
|
-
"Headers"
|
|
1872
|
-
].map(kindOfTest);
|
|
1873
|
-
var trim = (str) => {
|
|
1874
|
-
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1875
|
-
};
|
|
1590
|
+
var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1876
1591
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
1877
1592
|
if (obj === null || typeof obj === "undefined") {
|
|
1878
1593
|
return;
|
|
@@ -1887,9 +1602,6 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
|
1887
1602
|
fn.call(null, obj[i], i, obj);
|
|
1888
1603
|
}
|
|
1889
1604
|
} else {
|
|
1890
|
-
if (isBuffer(obj)) {
|
|
1891
|
-
return;
|
|
1892
|
-
}
|
|
1893
1605
|
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
1894
1606
|
const len = keys.length;
|
|
1895
1607
|
let key;
|
|
@@ -1900,9 +1612,6 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
|
1900
1612
|
}
|
|
1901
1613
|
}
|
|
1902
1614
|
function findKey(obj, key) {
|
|
1903
|
-
if (isBuffer(obj)) {
|
|
1904
|
-
return null;
|
|
1905
|
-
}
|
|
1906
1615
|
key = key.toLowerCase();
|
|
1907
1616
|
const keys = Object.keys(obj);
|
|
1908
1617
|
let i = keys.length;
|
|
@@ -1921,12 +1630,9 @@ var _global = (() => {
|
|
|
1921
1630
|
})();
|
|
1922
1631
|
var isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
1923
1632
|
function merge() {
|
|
1924
|
-
const { caseless
|
|
1633
|
+
const { caseless } = isContextDefined(this) && this || {};
|
|
1925
1634
|
const result = {};
|
|
1926
1635
|
const assignValue = (val, key) => {
|
|
1927
|
-
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
1928
|
-
return;
|
|
1929
|
-
}
|
|
1930
1636
|
const targetKey = caseless && findKey(result, key) || key;
|
|
1931
1637
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
1932
1638
|
result[targetKey] = merge(result[targetKey], val);
|
|
@@ -1934,7 +1640,7 @@ function merge() {
|
|
|
1934
1640
|
result[targetKey] = merge({}, val);
|
|
1935
1641
|
} else if (isArray(val)) {
|
|
1936
1642
|
result[targetKey] = val.slice();
|
|
1937
|
-
} else
|
|
1643
|
+
} else {
|
|
1938
1644
|
result[targetKey] = val;
|
|
1939
1645
|
}
|
|
1940
1646
|
};
|
|
@@ -1944,27 +1650,13 @@ function merge() {
|
|
|
1944
1650
|
return result;
|
|
1945
1651
|
}
|
|
1946
1652
|
var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
1947
|
-
forEach(
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
enumerable: true,
|
|
1955
|
-
configurable: true
|
|
1956
|
-
});
|
|
1957
|
-
} else {
|
|
1958
|
-
Object.defineProperty(a, key, {
|
|
1959
|
-
value: val,
|
|
1960
|
-
writable: true,
|
|
1961
|
-
enumerable: true,
|
|
1962
|
-
configurable: true
|
|
1963
|
-
});
|
|
1964
|
-
}
|
|
1965
|
-
},
|
|
1966
|
-
{ allOwnKeys }
|
|
1967
|
-
);
|
|
1653
|
+
forEach(b, (val, key) => {
|
|
1654
|
+
if (thisArg && isFunction(val)) {
|
|
1655
|
+
a[key] = bind(val, thisArg);
|
|
1656
|
+
} else {
|
|
1657
|
+
a[key] = val;
|
|
1658
|
+
}
|
|
1659
|
+
}, { allOwnKeys });
|
|
1968
1660
|
return a;
|
|
1969
1661
|
};
|
|
1970
1662
|
var stripBOM = (content) => {
|
|
@@ -1973,14 +1665,9 @@ var stripBOM = (content) => {
|
|
|
1973
1665
|
}
|
|
1974
1666
|
return content;
|
|
1975
1667
|
};
|
|
1976
|
-
var inherits = (constructor, superConstructor, props,
|
|
1977
|
-
constructor.prototype = Object.create(superConstructor.prototype,
|
|
1978
|
-
|
|
1979
|
-
value: constructor,
|
|
1980
|
-
writable: true,
|
|
1981
|
-
enumerable: false,
|
|
1982
|
-
configurable: true
|
|
1983
|
-
});
|
|
1668
|
+
var inherits = (constructor, superConstructor, props, descriptors2) => {
|
|
1669
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
|
|
1670
|
+
constructor.prototype.constructor = constructor;
|
|
1984
1671
|
Object.defineProperty(constructor, "super", {
|
|
1985
1672
|
value: superConstructor.prototype
|
|
1986
1673
|
});
|
|
@@ -2033,10 +1720,10 @@ var isTypedArray = /* @__PURE__ */ ((TypedArray) => {
|
|
|
2033
1720
|
};
|
|
2034
1721
|
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
|
|
2035
1722
|
var forEachEntry = (obj, fn) => {
|
|
2036
|
-
const generator = obj && obj[iterator];
|
|
2037
|
-
const
|
|
1723
|
+
const generator = obj && obj[Symbol.iterator];
|
|
1724
|
+
const iterator = generator.call(obj);
|
|
2038
1725
|
let result;
|
|
2039
|
-
while ((result =
|
|
1726
|
+
while ((result = iterator.next()) && !result.done) {
|
|
2040
1727
|
const pair = result.value;
|
|
2041
1728
|
fn.call(obj, pair[0], pair[1]);
|
|
2042
1729
|
}
|
|
@@ -2051,19 +1738,21 @@ var matchAll = (regExp, str) => {
|
|
|
2051
1738
|
};
|
|
2052
1739
|
var isHTMLForm = kindOfTest("HTMLFormElement");
|
|
2053
1740
|
var toCamelCase = (str) => {
|
|
2054
|
-
return str.toLowerCase().replace(
|
|
2055
|
-
|
|
2056
|
-
|
|
1741
|
+
return str.toLowerCase().replace(
|
|
1742
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
1743
|
+
function replacer(m, p1, p2) {
|
|
1744
|
+
return p1.toUpperCase() + p2;
|
|
1745
|
+
}
|
|
1746
|
+
);
|
|
2057
1747
|
};
|
|
2058
1748
|
var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
2059
1749
|
var isRegExp = kindOfTest("RegExp");
|
|
2060
1750
|
var reduceDescriptors = (obj, reducer) => {
|
|
2061
|
-
const
|
|
1751
|
+
const descriptors2 = Object.getOwnPropertyDescriptors(obj);
|
|
2062
1752
|
const reducedDescriptors = {};
|
|
2063
|
-
forEach(
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
reducedDescriptors[name] = ret || descriptor;
|
|
1753
|
+
forEach(descriptors2, (descriptor, name) => {
|
|
1754
|
+
if (reducer(descriptor, name, obj) !== false) {
|
|
1755
|
+
reducedDescriptors[name] = descriptor;
|
|
2067
1756
|
}
|
|
2068
1757
|
});
|
|
2069
1758
|
Object.defineProperties(obj, reducedDescriptors);
|
|
@@ -2100,10 +1789,26 @@ var toObjectSet = (arrayOrString, delimiter) => {
|
|
|
2100
1789
|
var noop = () => {
|
|
2101
1790
|
};
|
|
2102
1791
|
var toFiniteNumber = (value, defaultValue) => {
|
|
2103
|
-
|
|
1792
|
+
value = +value;
|
|
1793
|
+
return Number.isFinite(value) ? value : defaultValue;
|
|
1794
|
+
};
|
|
1795
|
+
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
1796
|
+
var DIGIT = "0123456789";
|
|
1797
|
+
var ALPHABET = {
|
|
1798
|
+
DIGIT,
|
|
1799
|
+
ALPHA,
|
|
1800
|
+
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
1801
|
+
};
|
|
1802
|
+
var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
1803
|
+
let str = "";
|
|
1804
|
+
const { length } = alphabet;
|
|
1805
|
+
while (size--) {
|
|
1806
|
+
str += alphabet[Math.random() * length | 0];
|
|
1807
|
+
}
|
|
1808
|
+
return str;
|
|
2104
1809
|
};
|
|
2105
1810
|
function isSpecCompliantForm(thing) {
|
|
2106
|
-
return !!(thing && isFunction(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
|
|
1811
|
+
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
|
|
2107
1812
|
}
|
|
2108
1813
|
var toJSONObject = (obj) => {
|
|
2109
1814
|
const stack = new Array(10);
|
|
@@ -2112,9 +1817,6 @@ var toJSONObject = (obj) => {
|
|
|
2112
1817
|
if (stack.indexOf(source) >= 0) {
|
|
2113
1818
|
return;
|
|
2114
1819
|
}
|
|
2115
|
-
if (isBuffer(source)) {
|
|
2116
|
-
return source;
|
|
2117
|
-
}
|
|
2118
1820
|
if (!("toJSON" in source)) {
|
|
2119
1821
|
stack[i] = source;
|
|
2120
1822
|
const target = isArray(source) ? [] : {};
|
|
@@ -2130,30 +1832,6 @@ var toJSONObject = (obj) => {
|
|
|
2130
1832
|
};
|
|
2131
1833
|
return visit(obj, 0);
|
|
2132
1834
|
};
|
|
2133
|
-
var isAsyncFn = kindOfTest("AsyncFunction");
|
|
2134
|
-
var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
2135
|
-
var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
2136
|
-
if (setImmediateSupported) {
|
|
2137
|
-
return setImmediate;
|
|
2138
|
-
}
|
|
2139
|
-
return postMessageSupported ? ((token, callbacks) => {
|
|
2140
|
-
_global.addEventListener(
|
|
2141
|
-
"message",
|
|
2142
|
-
({ source, data }) => {
|
|
2143
|
-
if (source === _global && data === token) {
|
|
2144
|
-
callbacks.length && callbacks.shift()();
|
|
2145
|
-
}
|
|
2146
|
-
},
|
|
2147
|
-
false
|
|
2148
|
-
);
|
|
2149
|
-
return (cb) => {
|
|
2150
|
-
callbacks.push(cb);
|
|
2151
|
-
_global.postMessage(token, "*");
|
|
2152
|
-
};
|
|
2153
|
-
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
2154
|
-
})(typeof setImmediate === "function", isFunction(_global.postMessage));
|
|
2155
|
-
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
2156
|
-
var isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
2157
1835
|
var utils_default = {
|
|
2158
1836
|
isArray,
|
|
2159
1837
|
isArrayBuffer,
|
|
@@ -2165,16 +1843,9 @@ var utils_default = {
|
|
|
2165
1843
|
isBoolean,
|
|
2166
1844
|
isObject,
|
|
2167
1845
|
isPlainObject,
|
|
2168
|
-
isEmptyObject,
|
|
2169
|
-
isReadableStream,
|
|
2170
|
-
isRequest,
|
|
2171
|
-
isResponse,
|
|
2172
|
-
isHeaders,
|
|
2173
1846
|
isUndefined,
|
|
2174
1847
|
isDate,
|
|
2175
1848
|
isFile,
|
|
2176
|
-
isReactNativeBlob,
|
|
2177
|
-
isReactNative,
|
|
2178
1849
|
isBlob,
|
|
2179
1850
|
isRegExp,
|
|
2180
1851
|
isFunction,
|
|
@@ -2208,57 +1879,29 @@ var utils_default = {
|
|
|
2208
1879
|
findKey,
|
|
2209
1880
|
global: _global,
|
|
2210
1881
|
isContextDefined,
|
|
1882
|
+
ALPHABET,
|
|
1883
|
+
generateString,
|
|
2211
1884
|
isSpecCompliantForm,
|
|
2212
|
-
toJSONObject
|
|
2213
|
-
isAsyncFn,
|
|
2214
|
-
isThenable,
|
|
2215
|
-
setImmediate: _setImmediate,
|
|
2216
|
-
asap,
|
|
2217
|
-
isIterable
|
|
1885
|
+
toJSONObject
|
|
2218
1886
|
};
|
|
2219
1887
|
|
|
2220
|
-
// node_modules/axios/lib/core/AxiosError.js
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
axiosError.status = error.status;
|
|
2228
|
-
}
|
|
2229
|
-
customProps && Object.assign(axiosError, customProps);
|
|
2230
|
-
return axiosError;
|
|
2231
|
-
}
|
|
2232
|
-
/**
|
|
2233
|
-
* Create an Error with the specified message, config, error code, request and response.
|
|
2234
|
-
*
|
|
2235
|
-
* @param {string} message The error message.
|
|
2236
|
-
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
2237
|
-
* @param {Object} [config] The config.
|
|
2238
|
-
* @param {Object} [request] The request.
|
|
2239
|
-
* @param {Object} [response] The response.
|
|
2240
|
-
*
|
|
2241
|
-
* @returns {Error} The created error.
|
|
2242
|
-
*/
|
|
2243
|
-
constructor(message, code, config, request, response) {
|
|
2244
|
-
super(message);
|
|
2245
|
-
Object.defineProperty(this, "message", {
|
|
2246
|
-
value: message,
|
|
2247
|
-
enumerable: true,
|
|
2248
|
-
writable: true,
|
|
2249
|
-
configurable: true
|
|
2250
|
-
});
|
|
2251
|
-
this.name = "AxiosError";
|
|
2252
|
-
this.isAxiosError = true;
|
|
2253
|
-
code && (this.code = code);
|
|
2254
|
-
config && (this.config = config);
|
|
2255
|
-
request && (this.request = request);
|
|
2256
|
-
if (response) {
|
|
2257
|
-
this.response = response;
|
|
2258
|
-
this.status = response.status;
|
|
2259
|
-
}
|
|
1888
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/AxiosError.js
|
|
1889
|
+
function AxiosError(message, code, config, request, response) {
|
|
1890
|
+
Error.call(this);
|
|
1891
|
+
if (Error.captureStackTrace) {
|
|
1892
|
+
Error.captureStackTrace(this, this.constructor);
|
|
1893
|
+
} else {
|
|
1894
|
+
this.stack = new Error().stack;
|
|
2260
1895
|
}
|
|
2261
|
-
|
|
1896
|
+
this.message = message;
|
|
1897
|
+
this.name = "AxiosError";
|
|
1898
|
+
code && (this.code = code);
|
|
1899
|
+
config && (this.config = config);
|
|
1900
|
+
request && (this.request = request);
|
|
1901
|
+
response && (this.response = response);
|
|
1902
|
+
}
|
|
1903
|
+
utils_default.inherits(AxiosError, Error, {
|
|
1904
|
+
toJSON: function toJSON() {
|
|
2262
1905
|
return {
|
|
2263
1906
|
// Standard
|
|
2264
1907
|
message: this.message,
|
|
@@ -2274,29 +1917,51 @@ var AxiosError = class _AxiosError extends Error {
|
|
|
2274
1917
|
// Axios
|
|
2275
1918
|
config: utils_default.toJSONObject(this.config),
|
|
2276
1919
|
code: this.code,
|
|
2277
|
-
status: this.status
|
|
1920
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
2278
1921
|
};
|
|
2279
1922
|
}
|
|
1923
|
+
});
|
|
1924
|
+
var prototype = AxiosError.prototype;
|
|
1925
|
+
var descriptors = {};
|
|
1926
|
+
[
|
|
1927
|
+
"ERR_BAD_OPTION_VALUE",
|
|
1928
|
+
"ERR_BAD_OPTION",
|
|
1929
|
+
"ECONNABORTED",
|
|
1930
|
+
"ETIMEDOUT",
|
|
1931
|
+
"ERR_NETWORK",
|
|
1932
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
1933
|
+
"ERR_DEPRECATED",
|
|
1934
|
+
"ERR_BAD_RESPONSE",
|
|
1935
|
+
"ERR_BAD_REQUEST",
|
|
1936
|
+
"ERR_CANCELED",
|
|
1937
|
+
"ERR_NOT_SUPPORT",
|
|
1938
|
+
"ERR_INVALID_URL"
|
|
1939
|
+
// eslint-disable-next-line func-names
|
|
1940
|
+
].forEach((code) => {
|
|
1941
|
+
descriptors[code] = { value: code };
|
|
1942
|
+
});
|
|
1943
|
+
Object.defineProperties(AxiosError, descriptors);
|
|
1944
|
+
Object.defineProperty(prototype, "isAxiosError", { value: true });
|
|
1945
|
+
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
1946
|
+
const axiosError = Object.create(prototype);
|
|
1947
|
+
utils_default.toFlatObject(error, axiosError, function filter2(obj) {
|
|
1948
|
+
return obj !== Error.prototype;
|
|
1949
|
+
}, (prop) => {
|
|
1950
|
+
return prop !== "isAxiosError";
|
|
1951
|
+
});
|
|
1952
|
+
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
1953
|
+
axiosError.cause = error;
|
|
1954
|
+
axiosError.name = error.name;
|
|
1955
|
+
customProps && Object.assign(axiosError, customProps);
|
|
1956
|
+
return axiosError;
|
|
2280
1957
|
};
|
|
2281
|
-
AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
2282
|
-
AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
2283
|
-
AxiosError.ECONNABORTED = "ECONNABORTED";
|
|
2284
|
-
AxiosError.ETIMEDOUT = "ETIMEDOUT";
|
|
2285
|
-
AxiosError.ERR_NETWORK = "ERR_NETWORK";
|
|
2286
|
-
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
2287
|
-
AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
2288
|
-
AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
2289
|
-
AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
2290
|
-
AxiosError.ERR_CANCELED = "ERR_CANCELED";
|
|
2291
|
-
AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
2292
|
-
AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
2293
1958
|
var AxiosError_default = AxiosError;
|
|
2294
1959
|
|
|
2295
|
-
// node_modules/axios/lib/platform/node/classes/FormData.js
|
|
1960
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/platform/node/classes/FormData.js
|
|
2296
1961
|
var import_form_data = __toESM(require("form-data"), 1);
|
|
2297
1962
|
var FormData_default = import_form_data.default;
|
|
2298
1963
|
|
|
2299
|
-
// node_modules/axios/lib/helpers/toFormData.js
|
|
1964
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/toFormData.js
|
|
2300
1965
|
function isVisitable(thing) {
|
|
2301
1966
|
return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
|
|
2302
1967
|
}
|
|
@@ -2321,18 +1986,13 @@ function toFormData(obj, formData, options) {
|
|
|
2321
1986
|
throw new TypeError("target must be an object");
|
|
2322
1987
|
}
|
|
2323
1988
|
formData = formData || new (FormData_default || FormData)();
|
|
2324
|
-
options = utils_default.toFlatObject(
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
false,
|
|
2332
|
-
function defined(option, source) {
|
|
2333
|
-
return !utils_default.isUndefined(source[option]);
|
|
2334
|
-
}
|
|
2335
|
-
);
|
|
1989
|
+
options = utils_default.toFlatObject(options, {
|
|
1990
|
+
metaTokens: true,
|
|
1991
|
+
dots: false,
|
|
1992
|
+
indexes: false
|
|
1993
|
+
}, false, function defined(option, source) {
|
|
1994
|
+
return !utils_default.isUndefined(source[option]);
|
|
1995
|
+
});
|
|
2336
1996
|
const metaTokens = options.metaTokens;
|
|
2337
1997
|
const visitor = options.visitor || defaultVisitor;
|
|
2338
1998
|
const dots = options.dots;
|
|
@@ -2347,9 +2007,6 @@ function toFormData(obj, formData, options) {
|
|
|
2347
2007
|
if (utils_default.isDate(value)) {
|
|
2348
2008
|
return value.toISOString();
|
|
2349
2009
|
}
|
|
2350
|
-
if (utils_default.isBoolean(value)) {
|
|
2351
|
-
return value.toString();
|
|
2352
|
-
}
|
|
2353
2010
|
if (!useBlob && utils_default.isBlob(value)) {
|
|
2354
2011
|
throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
|
|
2355
2012
|
}
|
|
@@ -2360,10 +2017,6 @@ function toFormData(obj, formData, options) {
|
|
|
2360
2017
|
}
|
|
2361
2018
|
function defaultVisitor(value, key, path18) {
|
|
2362
2019
|
let arr = value;
|
|
2363
|
-
if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
|
|
2364
|
-
formData.append(renderKey(path18, key, dots), convertValue(value));
|
|
2365
|
-
return false;
|
|
2366
|
-
}
|
|
2367
2020
|
if (value && !path18 && typeof value === "object") {
|
|
2368
2021
|
if (utils_default.endsWith(key, "{}")) {
|
|
2369
2022
|
key = metaTokens ? key : key.slice(0, -2);
|
|
@@ -2399,7 +2052,13 @@ function toFormData(obj, formData, options) {
|
|
|
2399
2052
|
}
|
|
2400
2053
|
stack.push(value);
|
|
2401
2054
|
utils_default.forEach(value, function each(el, key) {
|
|
2402
|
-
const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(
|
|
2055
|
+
const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(
|
|
2056
|
+
formData,
|
|
2057
|
+
el,
|
|
2058
|
+
utils_default.isString(key) ? key.trim() : key,
|
|
2059
|
+
path18,
|
|
2060
|
+
exposedHelpers
|
|
2061
|
+
);
|
|
2403
2062
|
if (result === true) {
|
|
2404
2063
|
build(el, path18 ? path18.concat(key) : [key]);
|
|
2405
2064
|
}
|
|
@@ -2414,7 +2073,7 @@ function toFormData(obj, formData, options) {
|
|
|
2414
2073
|
}
|
|
2415
2074
|
var toFormData_default = toFormData;
|
|
2416
2075
|
|
|
2417
|
-
// node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
2076
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
2418
2077
|
function encode(str) {
|
|
2419
2078
|
const charMap = {
|
|
2420
2079
|
"!": "%21",
|
|
@@ -2433,11 +2092,11 @@ function AxiosURLSearchParams(params, options) {
|
|
|
2433
2092
|
this._pairs = [];
|
|
2434
2093
|
params && toFormData_default(params, this, options);
|
|
2435
2094
|
}
|
|
2436
|
-
var
|
|
2437
|
-
|
|
2095
|
+
var prototype2 = AxiosURLSearchParams.prototype;
|
|
2096
|
+
prototype2.append = function append(name, value) {
|
|
2438
2097
|
this._pairs.push([name, value]);
|
|
2439
2098
|
};
|
|
2440
|
-
|
|
2099
|
+
prototype2.toString = function toString2(encoder) {
|
|
2441
2100
|
const _encode = encoder ? function(value) {
|
|
2442
2101
|
return encoder.call(this, value, encode);
|
|
2443
2102
|
} : encode;
|
|
@@ -2447,24 +2106,21 @@ prototype.toString = function toString2(encoder) {
|
|
|
2447
2106
|
};
|
|
2448
2107
|
var AxiosURLSearchParams_default = AxiosURLSearchParams;
|
|
2449
2108
|
|
|
2450
|
-
// node_modules/axios/lib/helpers/buildURL.js
|
|
2109
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/buildURL.js
|
|
2451
2110
|
function encode2(val) {
|
|
2452
|
-
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
2111
|
+
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
2453
2112
|
}
|
|
2454
2113
|
function buildURL(url2, params, options) {
|
|
2455
2114
|
if (!params) {
|
|
2456
2115
|
return url2;
|
|
2457
2116
|
}
|
|
2458
2117
|
const _encode = options && options.encode || encode2;
|
|
2459
|
-
const
|
|
2460
|
-
serialize: options
|
|
2461
|
-
} : options;
|
|
2462
|
-
const serializeFn = _options && _options.serialize;
|
|
2118
|
+
const serializeFn = options && options.serialize;
|
|
2463
2119
|
let serializedParams;
|
|
2464
2120
|
if (serializeFn) {
|
|
2465
|
-
serializedParams = serializeFn(params,
|
|
2121
|
+
serializedParams = serializeFn(params, options);
|
|
2466
2122
|
} else {
|
|
2467
|
-
serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params,
|
|
2123
|
+
serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, options).toString(_encode);
|
|
2468
2124
|
}
|
|
2469
2125
|
if (serializedParams) {
|
|
2470
2126
|
const hashmarkIndex = url2.indexOf("#");
|
|
@@ -2476,7 +2132,7 @@ function buildURL(url2, params, options) {
|
|
|
2476
2132
|
return url2;
|
|
2477
2133
|
}
|
|
2478
2134
|
|
|
2479
|
-
// node_modules/axios/lib/core/InterceptorManager.js
|
|
2135
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/InterceptorManager.js
|
|
2480
2136
|
var InterceptorManager = class {
|
|
2481
2137
|
constructor() {
|
|
2482
2138
|
this.handlers = [];
|
|
@@ -2486,7 +2142,6 @@ var InterceptorManager = class {
|
|
|
2486
2142
|
*
|
|
2487
2143
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
2488
2144
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
2489
|
-
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
2490
2145
|
*
|
|
2491
2146
|
* @return {Number} An ID used to remove interceptor later
|
|
2492
2147
|
*/
|
|
@@ -2504,7 +2159,7 @@ var InterceptorManager = class {
|
|
|
2504
2159
|
*
|
|
2505
2160
|
* @param {Number} id The ID that was returned by `use`
|
|
2506
2161
|
*
|
|
2507
|
-
* @returns {
|
|
2162
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
2508
2163
|
*/
|
|
2509
2164
|
eject(id) {
|
|
2510
2165
|
if (this.handlers[id]) {
|
|
@@ -2541,39 +2196,18 @@ var InterceptorManager = class {
|
|
|
2541
2196
|
};
|
|
2542
2197
|
var InterceptorManager_default = InterceptorManager;
|
|
2543
2198
|
|
|
2544
|
-
// node_modules/axios/lib/defaults/transitional.js
|
|
2199
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/defaults/transitional.js
|
|
2545
2200
|
var transitional_default = {
|
|
2546
2201
|
silentJSONParsing: true,
|
|
2547
2202
|
forcedJSONParsing: true,
|
|
2548
|
-
clarifyTimeoutError: false
|
|
2549
|
-
legacyInterceptorReqResOrdering: true
|
|
2203
|
+
clarifyTimeoutError: false
|
|
2550
2204
|
};
|
|
2551
2205
|
|
|
2552
|
-
// node_modules/axios/lib/platform/node/
|
|
2553
|
-
var import_crypto = __toESM(require("crypto"), 1);
|
|
2554
|
-
|
|
2555
|
-
// node_modules/axios/lib/platform/node/classes/URLSearchParams.js
|
|
2206
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
|
|
2556
2207
|
var import_url = __toESM(require("url"), 1);
|
|
2557
2208
|
var URLSearchParams_default = import_url.default.URLSearchParams;
|
|
2558
2209
|
|
|
2559
|
-
// node_modules/axios/lib/platform/node/index.js
|
|
2560
|
-
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
2561
|
-
var DIGIT = "0123456789";
|
|
2562
|
-
var ALPHABET = {
|
|
2563
|
-
DIGIT,
|
|
2564
|
-
ALPHA,
|
|
2565
|
-
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
2566
|
-
};
|
|
2567
|
-
var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
2568
|
-
let str = "";
|
|
2569
|
-
const { length } = alphabet;
|
|
2570
|
-
const randomValues = new Uint32Array(size);
|
|
2571
|
-
import_crypto.default.randomFillSync(randomValues);
|
|
2572
|
-
for (let i = 0; i < size; i++) {
|
|
2573
|
-
str += alphabet[randomValues[i] % length];
|
|
2574
|
-
}
|
|
2575
|
-
return str;
|
|
2576
|
-
};
|
|
2210
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/platform/node/index.js
|
|
2577
2211
|
var node_default = {
|
|
2578
2212
|
isNode: true,
|
|
2579
2213
|
classes: {
|
|
@@ -2581,50 +2215,23 @@ var node_default = {
|
|
|
2581
2215
|
FormData: FormData_default,
|
|
2582
2216
|
Blob: typeof Blob !== "undefined" && Blob || null
|
|
2583
2217
|
},
|
|
2584
|
-
ALPHABET,
|
|
2585
|
-
generateString,
|
|
2586
2218
|
protocols: ["http", "https", "file", "data"]
|
|
2587
2219
|
};
|
|
2588
2220
|
|
|
2589
|
-
// node_modules/axios/lib/
|
|
2590
|
-
var utils_exports = {};
|
|
2591
|
-
__export(utils_exports, {
|
|
2592
|
-
hasBrowserEnv: () => hasBrowserEnv,
|
|
2593
|
-
hasStandardBrowserEnv: () => hasStandardBrowserEnv,
|
|
2594
|
-
hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,
|
|
2595
|
-
navigator: () => _navigator,
|
|
2596
|
-
origin: () => origin
|
|
2597
|
-
});
|
|
2598
|
-
var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
|
2599
|
-
var _navigator = typeof navigator === "object" && navigator || void 0;
|
|
2600
|
-
var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
|
|
2601
|
-
var hasStandardBrowserWebWorkerEnv = (() => {
|
|
2602
|
-
return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
|
|
2603
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
2604
|
-
})();
|
|
2605
|
-
var origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
2606
|
-
|
|
2607
|
-
// node_modules/axios/lib/platform/index.js
|
|
2608
|
-
var platform_default = {
|
|
2609
|
-
...utils_exports,
|
|
2610
|
-
...node_default
|
|
2611
|
-
};
|
|
2612
|
-
|
|
2613
|
-
// node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
2221
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
2614
2222
|
function toURLEncodedForm(data, options) {
|
|
2615
|
-
return toFormData_default(data, new
|
|
2223
|
+
return toFormData_default(data, new node_default.classes.URLSearchParams(), Object.assign({
|
|
2616
2224
|
visitor: function(value, key, path18, helpers) {
|
|
2617
|
-
if (
|
|
2225
|
+
if (node_default.isNode && utils_default.isBuffer(value)) {
|
|
2618
2226
|
this.append(key, value.toString("base64"));
|
|
2619
2227
|
return false;
|
|
2620
2228
|
}
|
|
2621
2229
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
2622
|
-
}
|
|
2623
|
-
|
|
2624
|
-
});
|
|
2230
|
+
}
|
|
2231
|
+
}, options));
|
|
2625
2232
|
}
|
|
2626
2233
|
|
|
2627
|
-
// node_modules/axios/lib/helpers/formDataToJSON.js
|
|
2234
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/formDataToJSON.js
|
|
2628
2235
|
function parsePropPath(name) {
|
|
2629
2236
|
return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
2630
2237
|
return match[0] === "[]" ? "" : match[1] || match[0];
|
|
@@ -2645,7 +2252,6 @@ function arrayToObject(arr) {
|
|
|
2645
2252
|
function formDataToJSON(formData) {
|
|
2646
2253
|
function buildPath(path18, value, target, index) {
|
|
2647
2254
|
let name = path18[index++];
|
|
2648
|
-
if (name === "__proto__") return true;
|
|
2649
2255
|
const isNumericKey = Number.isFinite(+name);
|
|
2650
2256
|
const isLast = index >= path18.length;
|
|
2651
2257
|
name = !name && utils_default.isArray(target) ? target.length : name;
|
|
@@ -2677,7 +2283,10 @@ function formDataToJSON(formData) {
|
|
|
2677
2283
|
}
|
|
2678
2284
|
var formDataToJSON_default = formDataToJSON;
|
|
2679
2285
|
|
|
2680
|
-
// node_modules/axios/lib/defaults/index.js
|
|
2286
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/defaults/index.js
|
|
2287
|
+
var DEFAULT_CONTENT_TYPE = {
|
|
2288
|
+
"Content-Type": void 0
|
|
2289
|
+
};
|
|
2681
2290
|
function stringifySafely(rawValue, parser, encoder) {
|
|
2682
2291
|
if (utils_default.isString(rawValue)) {
|
|
2683
2292
|
try {
|
|
@@ -2693,75 +2302,71 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
2693
2302
|
}
|
|
2694
2303
|
var defaults = {
|
|
2695
2304
|
transitional: transitional_default,
|
|
2696
|
-
adapter: ["xhr", "http"
|
|
2697
|
-
transformRequest: [
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
if (
|
|
2707
|
-
return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
|
|
2708
|
-
}
|
|
2709
|
-
if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
|
|
2305
|
+
adapter: ["xhr", "http"],
|
|
2306
|
+
transformRequest: [function transformRequest(data, headers) {
|
|
2307
|
+
const contentType = headers.getContentType() || "";
|
|
2308
|
+
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
2309
|
+
const isObjectPayload = utils_default.isObject(data);
|
|
2310
|
+
if (isObjectPayload && utils_default.isHTMLForm(data)) {
|
|
2311
|
+
data = new FormData(data);
|
|
2312
|
+
}
|
|
2313
|
+
const isFormData2 = utils_default.isFormData(data);
|
|
2314
|
+
if (isFormData2) {
|
|
2315
|
+
if (!hasJSONContentType) {
|
|
2710
2316
|
return data;
|
|
2711
2317
|
}
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
if (utils_default.isURLSearchParams(data)) {
|
|
2716
|
-
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
2717
|
-
return data.toString();
|
|
2718
|
-
}
|
|
2719
|
-
let isFileList2;
|
|
2720
|
-
if (isObjectPayload) {
|
|
2721
|
-
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
2722
|
-
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
2723
|
-
}
|
|
2724
|
-
if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
2725
|
-
const _FormData = this.env && this.env.FormData;
|
|
2726
|
-
return toFormData_default(
|
|
2727
|
-
isFileList2 ? { "files[]": data } : data,
|
|
2728
|
-
_FormData && new _FormData(),
|
|
2729
|
-
this.formSerializer
|
|
2730
|
-
);
|
|
2731
|
-
}
|
|
2732
|
-
}
|
|
2733
|
-
if (isObjectPayload || hasJSONContentType) {
|
|
2734
|
-
headers.setContentType("application/json", false);
|
|
2735
|
-
return stringifySafely(data);
|
|
2736
|
-
}
|
|
2318
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
|
|
2319
|
+
}
|
|
2320
|
+
if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data)) {
|
|
2737
2321
|
return data;
|
|
2738
2322
|
}
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2323
|
+
if (utils_default.isArrayBufferView(data)) {
|
|
2324
|
+
return data.buffer;
|
|
2325
|
+
}
|
|
2326
|
+
if (utils_default.isURLSearchParams(data)) {
|
|
2327
|
+
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
2328
|
+
return data.toString();
|
|
2329
|
+
}
|
|
2330
|
+
let isFileList2;
|
|
2331
|
+
if (isObjectPayload) {
|
|
2332
|
+
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
2333
|
+
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
2747
2334
|
}
|
|
2748
|
-
if (
|
|
2749
|
-
const
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2335
|
+
if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
2336
|
+
const _FormData = this.env && this.env.FormData;
|
|
2337
|
+
return toFormData_default(
|
|
2338
|
+
isFileList2 ? { "files[]": data } : data,
|
|
2339
|
+
_FormData && new _FormData(),
|
|
2340
|
+
this.formSerializer
|
|
2341
|
+
);
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
2345
|
+
headers.setContentType("application/json", false);
|
|
2346
|
+
return stringifySafely(data);
|
|
2347
|
+
}
|
|
2348
|
+
return data;
|
|
2349
|
+
}],
|
|
2350
|
+
transformResponse: [function transformResponse(data) {
|
|
2351
|
+
const transitional2 = this.transitional || defaults.transitional;
|
|
2352
|
+
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
2353
|
+
const JSONRequested = this.responseType === "json";
|
|
2354
|
+
if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
2355
|
+
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
2356
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
2357
|
+
try {
|
|
2358
|
+
return JSON.parse(data);
|
|
2359
|
+
} catch (e) {
|
|
2360
|
+
if (strictJSONParsing) {
|
|
2361
|
+
if (e.name === "SyntaxError") {
|
|
2362
|
+
throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
|
|
2759
2363
|
}
|
|
2364
|
+
throw e;
|
|
2760
2365
|
}
|
|
2761
2366
|
}
|
|
2762
|
-
return data;
|
|
2763
2367
|
}
|
|
2764
|
-
|
|
2368
|
+
return data;
|
|
2369
|
+
}],
|
|
2765
2370
|
/**
|
|
2766
2371
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
2767
2372
|
* timeout is not created.
|
|
@@ -2772,25 +2377,27 @@ var defaults = {
|
|
|
2772
2377
|
maxContentLength: -1,
|
|
2773
2378
|
maxBodyLength: -1,
|
|
2774
2379
|
env: {
|
|
2775
|
-
FormData:
|
|
2776
|
-
Blob:
|
|
2380
|
+
FormData: node_default.classes.FormData,
|
|
2381
|
+
Blob: node_default.classes.Blob
|
|
2777
2382
|
},
|
|
2778
2383
|
validateStatus: function validateStatus(status) {
|
|
2779
2384
|
return status >= 200 && status < 300;
|
|
2780
2385
|
},
|
|
2781
2386
|
headers: {
|
|
2782
2387
|
common: {
|
|
2783
|
-
Accept: "application/json, text/plain, */*"
|
|
2784
|
-
"Content-Type": void 0
|
|
2388
|
+
"Accept": "application/json, text/plain, */*"
|
|
2785
2389
|
}
|
|
2786
2390
|
}
|
|
2787
2391
|
};
|
|
2788
|
-
utils_default.forEach(["delete", "get", "head",
|
|
2392
|
+
utils_default.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
|
|
2789
2393
|
defaults.headers[method] = {};
|
|
2790
2394
|
});
|
|
2395
|
+
utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
2396
|
+
defaults.headers[method] = utils_default.merge(DEFAULT_CONTENT_TYPE);
|
|
2397
|
+
});
|
|
2791
2398
|
var defaults_default = defaults;
|
|
2792
2399
|
|
|
2793
|
-
// node_modules/axios/lib/helpers/parseHeaders.js
|
|
2400
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/parseHeaders.js
|
|
2794
2401
|
var ignoreDuplicateOf = utils_default.toObjectSet([
|
|
2795
2402
|
"age",
|
|
2796
2403
|
"authorization",
|
|
@@ -2835,7 +2442,7 @@ var parseHeaders_default = (rawHeaders) => {
|
|
|
2835
2442
|
return parsed;
|
|
2836
2443
|
};
|
|
2837
2444
|
|
|
2838
|
-
// node_modules/axios/lib/core/AxiosHeaders.js
|
|
2445
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/AxiosHeaders.js
|
|
2839
2446
|
var $internals = Symbol("internals");
|
|
2840
2447
|
function normalizeHeader(header) {
|
|
2841
2448
|
return header && String(header).trim().toLowerCase();
|
|
@@ -2855,14 +2462,13 @@ function parseTokens(str) {
|
|
|
2855
2462
|
}
|
|
2856
2463
|
return tokens;
|
|
2857
2464
|
}
|
|
2858
|
-
|
|
2859
|
-
|
|
2465
|
+
function isValidHeaderName(str) {
|
|
2466
|
+
return /^[-_a-zA-Z]+$/.test(str.trim());
|
|
2467
|
+
}
|
|
2468
|
+
function matchHeaderValue(context, value, header, filter2) {
|
|
2860
2469
|
if (utils_default.isFunction(filter2)) {
|
|
2861
2470
|
return filter2.call(this, value, header);
|
|
2862
2471
|
}
|
|
2863
|
-
if (isHeaderNameFilter) {
|
|
2864
|
-
value = header;
|
|
2865
|
-
}
|
|
2866
2472
|
if (!utils_default.isString(value)) return;
|
|
2867
2473
|
if (utils_default.isString(filter2)) {
|
|
2868
2474
|
return value.indexOf(filter2) !== -1;
|
|
@@ -2908,15 +2514,6 @@ var AxiosHeaders = class {
|
|
|
2908
2514
|
setHeaders(header, valueOrRewrite);
|
|
2909
2515
|
} else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
2910
2516
|
setHeaders(parseHeaders_default(header), valueOrRewrite);
|
|
2911
|
-
} else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
|
|
2912
|
-
let obj = {}, dest, key;
|
|
2913
|
-
for (const entry of header) {
|
|
2914
|
-
if (!utils_default.isArray(entry)) {
|
|
2915
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
2916
|
-
}
|
|
2917
|
-
obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
2918
|
-
}
|
|
2919
|
-
setHeaders(obj, valueOrRewrite);
|
|
2920
2517
|
} else {
|
|
2921
2518
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
2922
2519
|
}
|
|
@@ -2978,7 +2575,7 @@ var AxiosHeaders = class {
|
|
|
2978
2575
|
let deleted = false;
|
|
2979
2576
|
while (i--) {
|
|
2980
2577
|
const key = keys[i];
|
|
2981
|
-
if (!matcher || matchHeaderValue(this, this[key], key, matcher
|
|
2578
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher)) {
|
|
2982
2579
|
delete this[key];
|
|
2983
2580
|
deleted = true;
|
|
2984
2581
|
}
|
|
@@ -3020,9 +2617,6 @@ var AxiosHeaders = class {
|
|
|
3020
2617
|
toString() {
|
|
3021
2618
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
3022
2619
|
}
|
|
3023
|
-
getSetCookie() {
|
|
3024
|
-
return this.get("set-cookie") || [];
|
|
3025
|
-
}
|
|
3026
2620
|
get [Symbol.toStringTag]() {
|
|
3027
2621
|
return "AxiosHeaders";
|
|
3028
2622
|
}
|
|
@@ -3039,11 +2633,11 @@ var AxiosHeaders = class {
|
|
|
3039
2633
|
accessors: {}
|
|
3040
2634
|
};
|
|
3041
2635
|
const accessors = internals.accessors;
|
|
3042
|
-
const
|
|
2636
|
+
const prototype3 = this.prototype;
|
|
3043
2637
|
function defineAccessor(_header) {
|
|
3044
2638
|
const lHeader = normalizeHeader(_header);
|
|
3045
2639
|
if (!accessors[lHeader]) {
|
|
3046
|
-
buildAccessors(
|
|
2640
|
+
buildAccessors(prototype3, _header);
|
|
3047
2641
|
accessors[lHeader] = true;
|
|
3048
2642
|
}
|
|
3049
2643
|
}
|
|
@@ -3051,27 +2645,12 @@ var AxiosHeaders = class {
|
|
|
3051
2645
|
return this;
|
|
3052
2646
|
}
|
|
3053
2647
|
};
|
|
3054
|
-
AxiosHeaders.accessor([
|
|
3055
|
-
|
|
3056
|
-
"Content-Length",
|
|
3057
|
-
"Accept",
|
|
3058
|
-
"Accept-Encoding",
|
|
3059
|
-
"User-Agent",
|
|
3060
|
-
"Authorization"
|
|
3061
|
-
]);
|
|
3062
|
-
utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
3063
|
-
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
3064
|
-
return {
|
|
3065
|
-
get: () => value,
|
|
3066
|
-
set(headerValue) {
|
|
3067
|
-
this[mapped] = headerValue;
|
|
3068
|
-
}
|
|
3069
|
-
};
|
|
3070
|
-
});
|
|
2648
|
+
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
2649
|
+
utils_default.freezeMethods(AxiosHeaders.prototype);
|
|
3071
2650
|
utils_default.freezeMethods(AxiosHeaders);
|
|
3072
2651
|
var AxiosHeaders_default = AxiosHeaders;
|
|
3073
2652
|
|
|
3074
|
-
// node_modules/axios/lib/core/transformData.js
|
|
2653
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/transformData.js
|
|
3075
2654
|
function transformData(fns, response) {
|
|
3076
2655
|
const config = this || defaults_default;
|
|
3077
2656
|
const context = response || config;
|
|
@@ -3084,92 +2663,76 @@ function transformData(fns, response) {
|
|
|
3084
2663
|
return data;
|
|
3085
2664
|
}
|
|
3086
2665
|
|
|
3087
|
-
// node_modules/axios/lib/cancel/isCancel.js
|
|
2666
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/cancel/isCancel.js
|
|
3088
2667
|
function isCancel(value) {
|
|
3089
2668
|
return !!(value && value.__CANCEL__);
|
|
3090
2669
|
}
|
|
3091
2670
|
|
|
3092
|
-
// node_modules/axios/lib/cancel/CanceledError.js
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
*
|
|
3101
|
-
* @returns {CanceledError} The created error.
|
|
3102
|
-
*/
|
|
3103
|
-
constructor(message, config, request) {
|
|
3104
|
-
super(message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
|
|
3105
|
-
this.name = "CanceledError";
|
|
3106
|
-
this.__CANCEL__ = true;
|
|
3107
|
-
}
|
|
3108
|
-
};
|
|
2671
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/cancel/CanceledError.js
|
|
2672
|
+
function CanceledError(message, config, request) {
|
|
2673
|
+
AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
|
|
2674
|
+
this.name = "CanceledError";
|
|
2675
|
+
}
|
|
2676
|
+
utils_default.inherits(CanceledError, AxiosError_default, {
|
|
2677
|
+
__CANCEL__: true
|
|
2678
|
+
});
|
|
3109
2679
|
var CanceledError_default = CanceledError;
|
|
3110
2680
|
|
|
3111
|
-
// node_modules/axios/lib/core/settle.js
|
|
2681
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/settle.js
|
|
3112
2682
|
function settle(resolve, reject, response) {
|
|
3113
2683
|
const validateStatus2 = response.config.validateStatus;
|
|
3114
2684
|
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
3115
2685
|
resolve(response);
|
|
3116
2686
|
} else {
|
|
3117
|
-
reject(
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
)
|
|
3125
|
-
);
|
|
2687
|
+
reject(new AxiosError_default(
|
|
2688
|
+
"Request failed with status code " + response.status,
|
|
2689
|
+
[AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
2690
|
+
response.config,
|
|
2691
|
+
response.request,
|
|
2692
|
+
response
|
|
2693
|
+
));
|
|
3126
2694
|
}
|
|
3127
2695
|
}
|
|
3128
2696
|
|
|
3129
|
-
// node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
2697
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
3130
2698
|
function isAbsoluteURL(url2) {
|
|
3131
|
-
if (typeof url2 !== "string") {
|
|
3132
|
-
return false;
|
|
3133
|
-
}
|
|
3134
2699
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
|
|
3135
2700
|
}
|
|
3136
2701
|
|
|
3137
|
-
// node_modules/axios/lib/helpers/combineURLs.js
|
|
2702
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/combineURLs.js
|
|
3138
2703
|
function combineURLs(baseURL, relativeURL) {
|
|
3139
|
-
return relativeURL ? baseURL.replace(
|
|
2704
|
+
return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
3140
2705
|
}
|
|
3141
2706
|
|
|
3142
|
-
// node_modules/axios/lib/core/buildFullPath.js
|
|
3143
|
-
function buildFullPath(baseURL, requestedURL
|
|
3144
|
-
|
|
3145
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
|
|
2707
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/buildFullPath.js
|
|
2708
|
+
function buildFullPath(baseURL, requestedURL) {
|
|
2709
|
+
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
3146
2710
|
return combineURLs(baseURL, requestedURL);
|
|
3147
2711
|
}
|
|
3148
2712
|
return requestedURL;
|
|
3149
2713
|
}
|
|
3150
2714
|
|
|
3151
|
-
// node_modules/axios/lib/adapters/http.js
|
|
2715
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/http.js
|
|
3152
2716
|
var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
|
|
3153
2717
|
var import_http = __toESM(require("http"), 1);
|
|
3154
2718
|
var import_https = __toESM(require("https"), 1);
|
|
3155
|
-
var import_http2 = __toESM(require("http2"), 1);
|
|
3156
2719
|
var import_util2 = __toESM(require("util"), 1);
|
|
3157
2720
|
var import_follow_redirects = __toESM(require_follow_redirects(), 1);
|
|
3158
2721
|
var import_zlib = __toESM(require("zlib"), 1);
|
|
3159
2722
|
|
|
3160
|
-
// node_modules/axios/lib/env/data.js
|
|
3161
|
-
var VERSION = "1.
|
|
2723
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/env/data.js
|
|
2724
|
+
var VERSION = "1.3.2";
|
|
3162
2725
|
|
|
3163
|
-
// node_modules/axios/lib/helpers/parseProtocol.js
|
|
2726
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/parseProtocol.js
|
|
3164
2727
|
function parseProtocol(url2) {
|
|
3165
2728
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
|
|
3166
2729
|
return match && match[1] || "";
|
|
3167
2730
|
}
|
|
3168
2731
|
|
|
3169
|
-
// node_modules/axios/lib/helpers/fromDataURI.js
|
|
2732
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/fromDataURI.js
|
|
3170
2733
|
var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
|
|
3171
2734
|
function fromDataURI(uri, asBlob, options) {
|
|
3172
|
-
const _Blob = options && options.Blob ||
|
|
2735
|
+
const _Blob = options && options.Blob || node_default.classes.Blob;
|
|
3173
2736
|
const protocol = parseProtocol(uri);
|
|
3174
2737
|
if (asBlob === void 0 && _Blob) {
|
|
3175
2738
|
asBlob = true;
|
|
@@ -3195,53 +2758,140 @@ function fromDataURI(uri, asBlob, options) {
|
|
|
3195
2758
|
throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
|
|
3196
2759
|
}
|
|
3197
2760
|
|
|
3198
|
-
// node_modules/axios/lib/adapters/http.js
|
|
2761
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/http.js
|
|
3199
2762
|
var import_stream4 = __toESM(require("stream"), 1);
|
|
3200
2763
|
|
|
3201
|
-
// node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
2764
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
3202
2765
|
var import_stream = __toESM(require("stream"), 1);
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
},
|
|
3216
|
-
null,
|
|
3217
|
-
(prop, source) => {
|
|
3218
|
-
return !utils_default.isUndefined(source[prop]);
|
|
3219
|
-
}
|
|
3220
|
-
);
|
|
3221
|
-
super({
|
|
3222
|
-
readableHighWaterMark: options.chunkSize
|
|
3223
|
-
});
|
|
3224
|
-
const internals = this[kInternals] = {
|
|
3225
|
-
timeWindow: options.timeWindow,
|
|
3226
|
-
chunkSize: options.chunkSize,
|
|
3227
|
-
maxRate: options.maxRate,
|
|
3228
|
-
minChunkSize: options.minChunkSize,
|
|
3229
|
-
bytesSeen: 0,
|
|
3230
|
-
isCaptured: false,
|
|
3231
|
-
notifiedBytesLoaded: 0,
|
|
3232
|
-
ts: Date.now(),
|
|
3233
|
-
bytes: 0,
|
|
3234
|
-
onReadCallback: null
|
|
3235
|
-
};
|
|
3236
|
-
this.on("newListener", (event) => {
|
|
3237
|
-
if (event === "progress") {
|
|
3238
|
-
if (!internals.isCaptured) {
|
|
3239
|
-
internals.isCaptured = true;
|
|
3240
|
-
}
|
|
2766
|
+
|
|
2767
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/throttle.js
|
|
2768
|
+
function throttle(fn, freq) {
|
|
2769
|
+
let timestamp = 0;
|
|
2770
|
+
const threshold = 1e3 / freq;
|
|
2771
|
+
let timer = null;
|
|
2772
|
+
return function throttled(force, args) {
|
|
2773
|
+
const now = Date.now();
|
|
2774
|
+
if (force || now - timestamp > threshold) {
|
|
2775
|
+
if (timer) {
|
|
2776
|
+
clearTimeout(timer);
|
|
2777
|
+
timer = null;
|
|
3241
2778
|
}
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
2779
|
+
timestamp = now;
|
|
2780
|
+
return fn.apply(null, args);
|
|
2781
|
+
}
|
|
2782
|
+
if (!timer) {
|
|
2783
|
+
timer = setTimeout(() => {
|
|
2784
|
+
timer = null;
|
|
2785
|
+
timestamp = Date.now();
|
|
2786
|
+
return fn.apply(null, args);
|
|
2787
|
+
}, threshold - (now - timestamp));
|
|
2788
|
+
}
|
|
2789
|
+
};
|
|
2790
|
+
}
|
|
2791
|
+
var throttle_default = throttle;
|
|
2792
|
+
|
|
2793
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/speedometer.js
|
|
2794
|
+
function speedometer(samplesCount, min) {
|
|
2795
|
+
samplesCount = samplesCount || 10;
|
|
2796
|
+
const bytes = new Array(samplesCount);
|
|
2797
|
+
const timestamps = new Array(samplesCount);
|
|
2798
|
+
let head = 0;
|
|
2799
|
+
let tail = 0;
|
|
2800
|
+
let firstSampleTS;
|
|
2801
|
+
min = min !== void 0 ? min : 1e3;
|
|
2802
|
+
return function push(chunkLength) {
|
|
2803
|
+
const now = Date.now();
|
|
2804
|
+
const startedAt = timestamps[tail];
|
|
2805
|
+
if (!firstSampleTS) {
|
|
2806
|
+
firstSampleTS = now;
|
|
2807
|
+
}
|
|
2808
|
+
bytes[head] = chunkLength;
|
|
2809
|
+
timestamps[head] = now;
|
|
2810
|
+
let i = tail;
|
|
2811
|
+
let bytesCount = 0;
|
|
2812
|
+
while (i !== head) {
|
|
2813
|
+
bytesCount += bytes[i++];
|
|
2814
|
+
i = i % samplesCount;
|
|
2815
|
+
}
|
|
2816
|
+
head = (head + 1) % samplesCount;
|
|
2817
|
+
if (head === tail) {
|
|
2818
|
+
tail = (tail + 1) % samplesCount;
|
|
2819
|
+
}
|
|
2820
|
+
if (now - firstSampleTS < min) {
|
|
2821
|
+
return;
|
|
2822
|
+
}
|
|
2823
|
+
const passed = startedAt && now - startedAt;
|
|
2824
|
+
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
|
2825
|
+
};
|
|
2826
|
+
}
|
|
2827
|
+
var speedometer_default = speedometer;
|
|
2828
|
+
|
|
2829
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
2830
|
+
var kInternals = Symbol("internals");
|
|
2831
|
+
var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
2832
|
+
constructor(options) {
|
|
2833
|
+
options = utils_default.toFlatObject(options, {
|
|
2834
|
+
maxRate: 0,
|
|
2835
|
+
chunkSize: 64 * 1024,
|
|
2836
|
+
minChunkSize: 100,
|
|
2837
|
+
timeWindow: 500,
|
|
2838
|
+
ticksRate: 2,
|
|
2839
|
+
samplesCount: 15
|
|
2840
|
+
}, null, (prop, source) => {
|
|
2841
|
+
return !utils_default.isUndefined(source[prop]);
|
|
2842
|
+
});
|
|
2843
|
+
super({
|
|
2844
|
+
readableHighWaterMark: options.chunkSize
|
|
2845
|
+
});
|
|
2846
|
+
const self2 = this;
|
|
2847
|
+
const internals = this[kInternals] = {
|
|
2848
|
+
length: options.length,
|
|
2849
|
+
timeWindow: options.timeWindow,
|
|
2850
|
+
ticksRate: options.ticksRate,
|
|
2851
|
+
chunkSize: options.chunkSize,
|
|
2852
|
+
maxRate: options.maxRate,
|
|
2853
|
+
minChunkSize: options.minChunkSize,
|
|
2854
|
+
bytesSeen: 0,
|
|
2855
|
+
isCaptured: false,
|
|
2856
|
+
notifiedBytesLoaded: 0,
|
|
2857
|
+
ts: Date.now(),
|
|
2858
|
+
bytes: 0,
|
|
2859
|
+
onReadCallback: null
|
|
2860
|
+
};
|
|
2861
|
+
const _speedometer = speedometer_default(internals.ticksRate * options.samplesCount, internals.timeWindow);
|
|
2862
|
+
this.on("newListener", (event) => {
|
|
2863
|
+
if (event === "progress") {
|
|
2864
|
+
if (!internals.isCaptured) {
|
|
2865
|
+
internals.isCaptured = true;
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
});
|
|
2869
|
+
let bytesNotified = 0;
|
|
2870
|
+
internals.updateProgress = throttle_default(function throttledHandler() {
|
|
2871
|
+
const totalBytes = internals.length;
|
|
2872
|
+
const bytesTransferred = internals.bytesSeen;
|
|
2873
|
+
const progressBytes = bytesTransferred - bytesNotified;
|
|
2874
|
+
if (!progressBytes || self2.destroyed) return;
|
|
2875
|
+
const rate = _speedometer(progressBytes);
|
|
2876
|
+
bytesNotified = bytesTransferred;
|
|
2877
|
+
process.nextTick(() => {
|
|
2878
|
+
self2.emit("progress", {
|
|
2879
|
+
"loaded": bytesTransferred,
|
|
2880
|
+
"total": totalBytes,
|
|
2881
|
+
"progress": totalBytes ? bytesTransferred / totalBytes : void 0,
|
|
2882
|
+
"bytes": progressBytes,
|
|
2883
|
+
"rate": rate ? rate : void 0,
|
|
2884
|
+
"estimated": rate && totalBytes && bytesTransferred <= totalBytes ? (totalBytes - bytesTransferred) / rate : void 0
|
|
2885
|
+
});
|
|
2886
|
+
});
|
|
2887
|
+
}, internals.ticksRate);
|
|
2888
|
+
const onFinish = () => {
|
|
2889
|
+
internals.updateProgress(true);
|
|
2890
|
+
};
|
|
2891
|
+
this.once("end", onFinish);
|
|
2892
|
+
this.once("error", onFinish);
|
|
2893
|
+
}
|
|
2894
|
+
_read(size) {
|
|
3245
2895
|
const internals = this[kInternals];
|
|
3246
2896
|
if (internals.onReadCallback) {
|
|
3247
2897
|
internals.onReadCallback();
|
|
@@ -3249,6 +2899,7 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
3249
2899
|
return super._read(size);
|
|
3250
2900
|
}
|
|
3251
2901
|
_transform(chunk, encoding, callback) {
|
|
2902
|
+
const self2 = this;
|
|
3252
2903
|
const internals = this[kInternals];
|
|
3253
2904
|
const maxRate = internals.maxRate;
|
|
3254
2905
|
const readableHighWaterMark = this.readableHighWaterMark;
|
|
@@ -3256,12 +2907,14 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
3256
2907
|
const divider = 1e3 / timeWindow;
|
|
3257
2908
|
const bytesThreshold = maxRate / divider;
|
|
3258
2909
|
const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
|
|
3259
|
-
|
|
2910
|
+
function pushChunk(_chunk, _callback) {
|
|
3260
2911
|
const bytes = Buffer.byteLength(_chunk);
|
|
3261
2912
|
internals.bytesSeen += bytes;
|
|
3262
2913
|
internals.bytes += bytes;
|
|
3263
|
-
|
|
3264
|
-
|
|
2914
|
+
if (internals.isCaptured) {
|
|
2915
|
+
internals.updateProgress();
|
|
2916
|
+
}
|
|
2917
|
+
if (self2.push(_chunk)) {
|
|
3265
2918
|
process.nextTick(_callback);
|
|
3266
2919
|
} else {
|
|
3267
2920
|
internals.onReadCallback = () => {
|
|
@@ -3269,7 +2922,7 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
3269
2922
|
process.nextTick(_callback);
|
|
3270
2923
|
};
|
|
3271
2924
|
}
|
|
3272
|
-
}
|
|
2925
|
+
}
|
|
3273
2926
|
const transformChunk = (_chunk, _callback) => {
|
|
3274
2927
|
const chunkSize = Buffer.byteLength(_chunk);
|
|
3275
2928
|
let chunkRemainder = null;
|
|
@@ -3300,12 +2953,9 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
3300
2953
|
chunkRemainder = _chunk.subarray(maxChunkSize);
|
|
3301
2954
|
_chunk = _chunk.subarray(0, maxChunkSize);
|
|
3302
2955
|
}
|
|
3303
|
-
pushChunk(
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
process.nextTick(_callback, null, chunkRemainder);
|
|
3307
|
-
} : _callback
|
|
3308
|
-
);
|
|
2956
|
+
pushChunk(_chunk, chunkRemainder ? () => {
|
|
2957
|
+
process.nextTick(_callback, null, chunkRemainder);
|
|
2958
|
+
} : _callback);
|
|
3309
2959
|
};
|
|
3310
2960
|
transformChunk(chunk, function transformNextChunk(err, _chunk) {
|
|
3311
2961
|
if (err) {
|
|
@@ -3318,17 +2968,21 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
3318
2968
|
}
|
|
3319
2969
|
});
|
|
3320
2970
|
}
|
|
2971
|
+
setLength(length) {
|
|
2972
|
+
this[kInternals].length = +length;
|
|
2973
|
+
return this;
|
|
2974
|
+
}
|
|
3321
2975
|
};
|
|
3322
2976
|
var AxiosTransformStream_default = AxiosTransformStream;
|
|
3323
2977
|
|
|
3324
|
-
// node_modules/axios/lib/adapters/http.js
|
|
3325
|
-
var import_events = require("events");
|
|
2978
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/http.js
|
|
2979
|
+
var import_events = __toESM(require("events"), 1);
|
|
3326
2980
|
|
|
3327
|
-
// node_modules/axios/lib/helpers/formDataToStream.js
|
|
3328
|
-
var import_util =
|
|
2981
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/formDataToStream.js
|
|
2982
|
+
var import_util = require("util");
|
|
3329
2983
|
var import_stream2 = require("stream");
|
|
3330
2984
|
|
|
3331
|
-
// node_modules/axios/lib/helpers/readBlob.js
|
|
2985
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/readBlob.js
|
|
3332
2986
|
var { asyncIterator } = Symbol;
|
|
3333
2987
|
var readBlob = async function* (blob) {
|
|
3334
2988
|
if (blob.stream) {
|
|
@@ -3343,9 +2997,9 @@ var readBlob = async function* (blob) {
|
|
|
3343
2997
|
};
|
|
3344
2998
|
var readBlob_default = readBlob;
|
|
3345
2999
|
|
|
3346
|
-
// node_modules/axios/lib/helpers/formDataToStream.js
|
|
3347
|
-
var BOUNDARY_ALPHABET =
|
|
3348
|
-
var textEncoder =
|
|
3000
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/formDataToStream.js
|
|
3001
|
+
var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_";
|
|
3002
|
+
var textEncoder = new import_util.TextEncoder();
|
|
3349
3003
|
var CRLF = "\r\n";
|
|
3350
3004
|
var CRLF_BYTES = textEncoder.encode(CRLF);
|
|
3351
3005
|
var CRLF_BYTES_COUNT = 2;
|
|
@@ -3376,21 +3030,18 @@ var FormDataPart = class {
|
|
|
3376
3030
|
yield CRLF_BYTES;
|
|
3377
3031
|
}
|
|
3378
3032
|
static escapeName(name) {
|
|
3379
|
-
return String(name).replace(
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
'"': "%22"
|
|
3385
|
-
})[match]
|
|
3386
|
-
);
|
|
3033
|
+
return String(name).replace(/[\r\n"]/g, (match) => ({
|
|
3034
|
+
"\r": "%0D",
|
|
3035
|
+
"\n": "%0A",
|
|
3036
|
+
'"': "%22"
|
|
3037
|
+
})[match]);
|
|
3387
3038
|
}
|
|
3388
3039
|
};
|
|
3389
3040
|
var formDataToStream = (form, headersHandler, options) => {
|
|
3390
3041
|
const {
|
|
3391
3042
|
tag = "form-data-boundary",
|
|
3392
3043
|
size = 25,
|
|
3393
|
-
boundary = tag + "-" +
|
|
3044
|
+
boundary = tag + "-" + utils_default.generateString(size, BOUNDARY_ALPHABET)
|
|
3394
3045
|
} = options || {};
|
|
3395
3046
|
if (!utils_default.isFormData(form)) {
|
|
3396
3047
|
throw TypeError("FormData instance required");
|
|
@@ -3399,7 +3050,7 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
|
3399
3050
|
throw Error("boundary must be 10-70 characters long");
|
|
3400
3051
|
}
|
|
3401
3052
|
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
|
|
3402
|
-
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
|
|
3053
|
+
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF + CRLF);
|
|
3403
3054
|
let contentLength = footerBytes.byteLength;
|
|
3404
3055
|
const parts = Array.from(form.entries()).map(([name, value]) => {
|
|
3405
3056
|
const part = new FormDataPart(name, value);
|
|
@@ -3415,19 +3066,17 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
|
3415
3066
|
computedHeaders["Content-Length"] = contentLength;
|
|
3416
3067
|
}
|
|
3417
3068
|
headersHandler && headersHandler(computedHeaders);
|
|
3418
|
-
return import_stream2.Readable.from(
|
|
3419
|
-
(
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
})()
|
|
3426
|
-
);
|
|
3069
|
+
return import_stream2.Readable.from(async function* () {
|
|
3070
|
+
for (const part of parts) {
|
|
3071
|
+
yield boundaryBytes;
|
|
3072
|
+
yield* part.encode();
|
|
3073
|
+
}
|
|
3074
|
+
yield footerBytes;
|
|
3075
|
+
}());
|
|
3427
3076
|
};
|
|
3428
3077
|
var formDataToStream_default = formDataToStream;
|
|
3429
3078
|
|
|
3430
|
-
// node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
|
|
3079
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
|
|
3431
3080
|
var import_stream3 = __toESM(require("stream"), 1);
|
|
3432
3081
|
var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
|
|
3433
3082
|
__transform(chunk, encoding, callback) {
|
|
@@ -3449,182 +3098,7 @@ var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
|
|
|
3449
3098
|
};
|
|
3450
3099
|
var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
|
|
3451
3100
|
|
|
3452
|
-
// node_modules/axios/lib/
|
|
3453
|
-
var callbackify = (fn, reducer) => {
|
|
3454
|
-
return utils_default.isAsyncFn(fn) ? function(...args) {
|
|
3455
|
-
const cb = args.pop();
|
|
3456
|
-
fn.apply(this, args).then((value) => {
|
|
3457
|
-
try {
|
|
3458
|
-
reducer ? cb(null, ...reducer(value)) : cb(null, value);
|
|
3459
|
-
} catch (err) {
|
|
3460
|
-
cb(err);
|
|
3461
|
-
}
|
|
3462
|
-
}, cb);
|
|
3463
|
-
} : fn;
|
|
3464
|
-
};
|
|
3465
|
-
var callbackify_default = callbackify;
|
|
3466
|
-
|
|
3467
|
-
// node_modules/axios/lib/helpers/speedometer.js
|
|
3468
|
-
function speedometer(samplesCount, min) {
|
|
3469
|
-
samplesCount = samplesCount || 10;
|
|
3470
|
-
const bytes = new Array(samplesCount);
|
|
3471
|
-
const timestamps = new Array(samplesCount);
|
|
3472
|
-
let head = 0;
|
|
3473
|
-
let tail = 0;
|
|
3474
|
-
let firstSampleTS;
|
|
3475
|
-
min = min !== void 0 ? min : 1e3;
|
|
3476
|
-
return function push(chunkLength) {
|
|
3477
|
-
const now = Date.now();
|
|
3478
|
-
const startedAt = timestamps[tail];
|
|
3479
|
-
if (!firstSampleTS) {
|
|
3480
|
-
firstSampleTS = now;
|
|
3481
|
-
}
|
|
3482
|
-
bytes[head] = chunkLength;
|
|
3483
|
-
timestamps[head] = now;
|
|
3484
|
-
let i = tail;
|
|
3485
|
-
let bytesCount = 0;
|
|
3486
|
-
while (i !== head) {
|
|
3487
|
-
bytesCount += bytes[i++];
|
|
3488
|
-
i = i % samplesCount;
|
|
3489
|
-
}
|
|
3490
|
-
head = (head + 1) % samplesCount;
|
|
3491
|
-
if (head === tail) {
|
|
3492
|
-
tail = (tail + 1) % samplesCount;
|
|
3493
|
-
}
|
|
3494
|
-
if (now - firstSampleTS < min) {
|
|
3495
|
-
return;
|
|
3496
|
-
}
|
|
3497
|
-
const passed = startedAt && now - startedAt;
|
|
3498
|
-
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
|
3499
|
-
};
|
|
3500
|
-
}
|
|
3501
|
-
var speedometer_default = speedometer;
|
|
3502
|
-
|
|
3503
|
-
// node_modules/axios/lib/helpers/throttle.js
|
|
3504
|
-
function throttle(fn, freq) {
|
|
3505
|
-
let timestamp = 0;
|
|
3506
|
-
let threshold = 1e3 / freq;
|
|
3507
|
-
let lastArgs;
|
|
3508
|
-
let timer;
|
|
3509
|
-
const invoke = (args, now = Date.now()) => {
|
|
3510
|
-
timestamp = now;
|
|
3511
|
-
lastArgs = null;
|
|
3512
|
-
if (timer) {
|
|
3513
|
-
clearTimeout(timer);
|
|
3514
|
-
timer = null;
|
|
3515
|
-
}
|
|
3516
|
-
fn(...args);
|
|
3517
|
-
};
|
|
3518
|
-
const throttled = (...args) => {
|
|
3519
|
-
const now = Date.now();
|
|
3520
|
-
const passed = now - timestamp;
|
|
3521
|
-
if (passed >= threshold) {
|
|
3522
|
-
invoke(args, now);
|
|
3523
|
-
} else {
|
|
3524
|
-
lastArgs = args;
|
|
3525
|
-
if (!timer) {
|
|
3526
|
-
timer = setTimeout(() => {
|
|
3527
|
-
timer = null;
|
|
3528
|
-
invoke(lastArgs);
|
|
3529
|
-
}, threshold - passed);
|
|
3530
|
-
}
|
|
3531
|
-
}
|
|
3532
|
-
};
|
|
3533
|
-
const flush = () => lastArgs && invoke(lastArgs);
|
|
3534
|
-
return [throttled, flush];
|
|
3535
|
-
}
|
|
3536
|
-
var throttle_default = throttle;
|
|
3537
|
-
|
|
3538
|
-
// node_modules/axios/lib/helpers/progressEventReducer.js
|
|
3539
|
-
var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
3540
|
-
let bytesNotified = 0;
|
|
3541
|
-
const _speedometer = speedometer_default(50, 250);
|
|
3542
|
-
return throttle_default((e) => {
|
|
3543
|
-
const loaded = e.loaded;
|
|
3544
|
-
const total = e.lengthComputable ? e.total : void 0;
|
|
3545
|
-
const progressBytes = loaded - bytesNotified;
|
|
3546
|
-
const rate = _speedometer(progressBytes);
|
|
3547
|
-
const inRange = loaded <= total;
|
|
3548
|
-
bytesNotified = loaded;
|
|
3549
|
-
const data = {
|
|
3550
|
-
loaded,
|
|
3551
|
-
total,
|
|
3552
|
-
progress: total ? loaded / total : void 0,
|
|
3553
|
-
bytes: progressBytes,
|
|
3554
|
-
rate: rate ? rate : void 0,
|
|
3555
|
-
estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
|
|
3556
|
-
event: e,
|
|
3557
|
-
lengthComputable: total != null,
|
|
3558
|
-
[isDownloadStream ? "download" : "upload"]: true
|
|
3559
|
-
};
|
|
3560
|
-
listener(data);
|
|
3561
|
-
}, freq);
|
|
3562
|
-
};
|
|
3563
|
-
var progressEventDecorator = (total, throttled) => {
|
|
3564
|
-
const lengthComputable = total != null;
|
|
3565
|
-
return [
|
|
3566
|
-
(loaded) => throttled[0]({
|
|
3567
|
-
lengthComputable,
|
|
3568
|
-
total,
|
|
3569
|
-
loaded
|
|
3570
|
-
}),
|
|
3571
|
-
throttled[1]
|
|
3572
|
-
];
|
|
3573
|
-
};
|
|
3574
|
-
var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
|
|
3575
|
-
|
|
3576
|
-
// node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
|
|
3577
|
-
function estimateDataURLDecodedBytes(url2) {
|
|
3578
|
-
if (!url2 || typeof url2 !== "string") return 0;
|
|
3579
|
-
if (!url2.startsWith("data:")) return 0;
|
|
3580
|
-
const comma = url2.indexOf(",");
|
|
3581
|
-
if (comma < 0) return 0;
|
|
3582
|
-
const meta = url2.slice(5, comma);
|
|
3583
|
-
const body = url2.slice(comma + 1);
|
|
3584
|
-
const isBase64 = /;base64/i.test(meta);
|
|
3585
|
-
if (isBase64) {
|
|
3586
|
-
let effectiveLen = body.length;
|
|
3587
|
-
const len = body.length;
|
|
3588
|
-
for (let i = 0; i < len; i++) {
|
|
3589
|
-
if (body.charCodeAt(i) === 37 && i + 2 < len) {
|
|
3590
|
-
const a = body.charCodeAt(i + 1);
|
|
3591
|
-
const b = body.charCodeAt(i + 2);
|
|
3592
|
-
const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102);
|
|
3593
|
-
if (isHex) {
|
|
3594
|
-
effectiveLen -= 2;
|
|
3595
|
-
i += 2;
|
|
3596
|
-
}
|
|
3597
|
-
}
|
|
3598
|
-
}
|
|
3599
|
-
let pad = 0;
|
|
3600
|
-
let idx = len - 1;
|
|
3601
|
-
const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && // '%'
|
|
3602
|
-
body.charCodeAt(j - 1) === 51 && // '3'
|
|
3603
|
-
(body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
|
|
3604
|
-
if (idx >= 0) {
|
|
3605
|
-
if (body.charCodeAt(idx) === 61) {
|
|
3606
|
-
pad++;
|
|
3607
|
-
idx--;
|
|
3608
|
-
} else if (tailIsPct3D(idx)) {
|
|
3609
|
-
pad++;
|
|
3610
|
-
idx -= 3;
|
|
3611
|
-
}
|
|
3612
|
-
}
|
|
3613
|
-
if (pad === 1 && idx >= 0) {
|
|
3614
|
-
if (body.charCodeAt(idx) === 61) {
|
|
3615
|
-
pad++;
|
|
3616
|
-
} else if (tailIsPct3D(idx)) {
|
|
3617
|
-
pad++;
|
|
3618
|
-
}
|
|
3619
|
-
}
|
|
3620
|
-
const groups = Math.floor(effectiveLen / 4);
|
|
3621
|
-
const bytes = groups * 3 - (pad || 0);
|
|
3622
|
-
return bytes > 0 ? bytes : 0;
|
|
3623
|
-
}
|
|
3624
|
-
return Buffer.byteLength(body, "utf8");
|
|
3625
|
-
}
|
|
3626
|
-
|
|
3627
|
-
// node_modules/axios/lib/adapters/http.js
|
|
3101
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/http.js
|
|
3628
3102
|
var zlibOptions = {
|
|
3629
3103
|
flush: import_zlib.default.constants.Z_SYNC_FLUSH,
|
|
3630
3104
|
finishFlush: import_zlib.default.constants.Z_SYNC_FLUSH
|
|
@@ -3636,95 +3110,21 @@ var brotliOptions = {
|
|
|
3636
3110
|
var isBrotliSupported = utils_default.isFunction(import_zlib.default.createBrotliDecompress);
|
|
3637
3111
|
var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
|
|
3638
3112
|
var isHttps = /https:?/;
|
|
3639
|
-
var supportedProtocols =
|
|
3113
|
+
var supportedProtocols = node_default.protocols.map((protocol) => {
|
|
3640
3114
|
return protocol + ":";
|
|
3641
3115
|
});
|
|
3642
|
-
|
|
3643
|
-
stream4.on("end", flush).on("error", flush);
|
|
3644
|
-
return throttled;
|
|
3645
|
-
};
|
|
3646
|
-
var Http2Sessions = class {
|
|
3647
|
-
constructor() {
|
|
3648
|
-
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
3649
|
-
}
|
|
3650
|
-
getSession(authority, options) {
|
|
3651
|
-
options = Object.assign(
|
|
3652
|
-
{
|
|
3653
|
-
sessionTimeout: 1e3
|
|
3654
|
-
},
|
|
3655
|
-
options
|
|
3656
|
-
);
|
|
3657
|
-
let authoritySessions = this.sessions[authority];
|
|
3658
|
-
if (authoritySessions) {
|
|
3659
|
-
let len = authoritySessions.length;
|
|
3660
|
-
for (let i = 0; i < len; i++) {
|
|
3661
|
-
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
3662
|
-
if (!sessionHandle.destroyed && !sessionHandle.closed && import_util2.default.isDeepStrictEqual(sessionOptions, options)) {
|
|
3663
|
-
return sessionHandle;
|
|
3664
|
-
}
|
|
3665
|
-
}
|
|
3666
|
-
}
|
|
3667
|
-
const session = import_http2.default.connect(authority, options);
|
|
3668
|
-
let removed;
|
|
3669
|
-
const removeSession = () => {
|
|
3670
|
-
if (removed) {
|
|
3671
|
-
return;
|
|
3672
|
-
}
|
|
3673
|
-
removed = true;
|
|
3674
|
-
let entries = authoritySessions, len = entries.length, i = len;
|
|
3675
|
-
while (i--) {
|
|
3676
|
-
if (entries[i][0] === session) {
|
|
3677
|
-
if (len === 1) {
|
|
3678
|
-
delete this.sessions[authority];
|
|
3679
|
-
} else {
|
|
3680
|
-
entries.splice(i, 1);
|
|
3681
|
-
}
|
|
3682
|
-
return;
|
|
3683
|
-
}
|
|
3684
|
-
}
|
|
3685
|
-
};
|
|
3686
|
-
const originalRequestFn = session.request;
|
|
3687
|
-
const { sessionTimeout } = options;
|
|
3688
|
-
if (sessionTimeout != null) {
|
|
3689
|
-
let timer;
|
|
3690
|
-
let streamsCount = 0;
|
|
3691
|
-
session.request = function() {
|
|
3692
|
-
const stream4 = originalRequestFn.apply(this, arguments);
|
|
3693
|
-
streamsCount++;
|
|
3694
|
-
if (timer) {
|
|
3695
|
-
clearTimeout(timer);
|
|
3696
|
-
timer = null;
|
|
3697
|
-
}
|
|
3698
|
-
stream4.once("close", () => {
|
|
3699
|
-
if (!--streamsCount) {
|
|
3700
|
-
timer = setTimeout(() => {
|
|
3701
|
-
timer = null;
|
|
3702
|
-
removeSession();
|
|
3703
|
-
}, sessionTimeout);
|
|
3704
|
-
}
|
|
3705
|
-
});
|
|
3706
|
-
return stream4;
|
|
3707
|
-
};
|
|
3708
|
-
}
|
|
3709
|
-
session.once("close", removeSession);
|
|
3710
|
-
let entry = [session, options];
|
|
3711
|
-
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
3712
|
-
return session;
|
|
3713
|
-
}
|
|
3714
|
-
};
|
|
3715
|
-
var http2Sessions = new Http2Sessions();
|
|
3716
|
-
function dispatchBeforeRedirect(options, responseDetails) {
|
|
3116
|
+
function dispatchBeforeRedirect(options) {
|
|
3717
3117
|
if (options.beforeRedirects.proxy) {
|
|
3718
3118
|
options.beforeRedirects.proxy(options);
|
|
3719
3119
|
}
|
|
3720
3120
|
if (options.beforeRedirects.config) {
|
|
3721
|
-
options.beforeRedirects.config(options
|
|
3121
|
+
options.beforeRedirects.config(options);
|
|
3722
3122
|
}
|
|
3723
3123
|
}
|
|
3724
3124
|
function setProxy(options, configProxy, location) {
|
|
3725
3125
|
let proxy = configProxy;
|
|
3726
3126
|
if (!proxy && proxy !== false) {
|
|
3727
|
-
const proxyUrl = import_proxy_from_env.
|
|
3127
|
+
const proxyUrl = (0, import_proxy_from_env.getProxyForUrl)(location);
|
|
3728
3128
|
if (proxyUrl) {
|
|
3729
3129
|
proxy = new URL(proxyUrl);
|
|
3730
3130
|
}
|
|
@@ -3734,11 +3134,8 @@ function setProxy(options, configProxy, location) {
|
|
|
3734
3134
|
proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
|
|
3735
3135
|
}
|
|
3736
3136
|
if (proxy.auth) {
|
|
3737
|
-
|
|
3738
|
-
if (validProxyAuth) {
|
|
3137
|
+
if (proxy.auth.username || proxy.auth.password) {
|
|
3739
3138
|
proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
|
|
3740
|
-
} else if (typeof proxy.auth === "object") {
|
|
3741
|
-
throw new AxiosError_default("Invalid proxy authorization", AxiosError_default.ERR_BAD_OPTION, { proxy });
|
|
3742
3139
|
}
|
|
3743
3140
|
const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
|
|
3744
3141
|
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
@@ -3758,152 +3155,57 @@ function setProxy(options, configProxy, location) {
|
|
|
3758
3155
|
};
|
|
3759
3156
|
}
|
|
3760
3157
|
var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
|
|
3761
|
-
var wrapAsync = (asyncExecutor) => {
|
|
3762
|
-
return new Promise((resolve, reject) => {
|
|
3763
|
-
let onDone;
|
|
3764
|
-
let isDone;
|
|
3765
|
-
const done = (value, isRejected) => {
|
|
3766
|
-
if (isDone) return;
|
|
3767
|
-
isDone = true;
|
|
3768
|
-
onDone && onDone(value, isRejected);
|
|
3769
|
-
};
|
|
3770
|
-
const _resolve = (value) => {
|
|
3771
|
-
done(value);
|
|
3772
|
-
resolve(value);
|
|
3773
|
-
};
|
|
3774
|
-
const _reject = (reason) => {
|
|
3775
|
-
done(reason, true);
|
|
3776
|
-
reject(reason);
|
|
3777
|
-
};
|
|
3778
|
-
asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject);
|
|
3779
|
-
});
|
|
3780
|
-
};
|
|
3781
|
-
var resolveFamily = ({ address, family }) => {
|
|
3782
|
-
if (!utils_default.isString(address)) {
|
|
3783
|
-
throw TypeError("address must be a string");
|
|
3784
|
-
}
|
|
3785
|
-
return {
|
|
3786
|
-
address,
|
|
3787
|
-
family: family || (address.indexOf(".") < 0 ? 6 : 4)
|
|
3788
|
-
};
|
|
3789
|
-
};
|
|
3790
|
-
var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
3791
|
-
var http2Transport = {
|
|
3792
|
-
request(options, cb) {
|
|
3793
|
-
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
|
|
3794
|
-
const { http2Options, headers } = options;
|
|
3795
|
-
const session = http2Sessions.getSession(authority, http2Options);
|
|
3796
|
-
const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = import_http2.default.constants;
|
|
3797
|
-
const http2Headers = {
|
|
3798
|
-
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
3799
|
-
[HTTP2_HEADER_METHOD]: options.method,
|
|
3800
|
-
[HTTP2_HEADER_PATH]: options.path
|
|
3801
|
-
};
|
|
3802
|
-
utils_default.forEach(headers, (header, name) => {
|
|
3803
|
-
name.charAt(0) !== ":" && (http2Headers[name] = header);
|
|
3804
|
-
});
|
|
3805
|
-
const req = session.request(http2Headers);
|
|
3806
|
-
req.once("response", (responseHeaders) => {
|
|
3807
|
-
const response = req;
|
|
3808
|
-
responseHeaders = Object.assign({}, responseHeaders);
|
|
3809
|
-
const status = responseHeaders[HTTP2_HEADER_STATUS];
|
|
3810
|
-
delete responseHeaders[HTTP2_HEADER_STATUS];
|
|
3811
|
-
response.headers = responseHeaders;
|
|
3812
|
-
response.statusCode = +status;
|
|
3813
|
-
cb(response);
|
|
3814
|
-
});
|
|
3815
|
-
return req;
|
|
3816
|
-
}
|
|
3817
|
-
};
|
|
3818
3158
|
var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
3819
|
-
return
|
|
3820
|
-
let
|
|
3821
|
-
const
|
|
3159
|
+
return new Promise(async function dispatchHttpRequest(resolvePromise, rejectPromise) {
|
|
3160
|
+
let data = config.data;
|
|
3161
|
+
const responseType = config.responseType;
|
|
3162
|
+
const responseEncoding = config.responseEncoding;
|
|
3822
3163
|
const method = config.method.toUpperCase();
|
|
3164
|
+
let isFinished;
|
|
3823
3165
|
let isDone;
|
|
3824
3166
|
let rejected = false;
|
|
3825
3167
|
let req;
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
if (httpVersion !== 1 && httpVersion !== 2) {
|
|
3831
|
-
throw TypeError(`Unsupported protocol version '${httpVersion}'`);
|
|
3832
|
-
}
|
|
3833
|
-
const isHttp2 = httpVersion === 2;
|
|
3834
|
-
if (lookup) {
|
|
3835
|
-
const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
|
|
3836
|
-
lookup = (hostname, opt, cb) => {
|
|
3837
|
-
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
3838
|
-
if (err) {
|
|
3839
|
-
return cb(err);
|
|
3840
|
-
}
|
|
3841
|
-
const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
3842
|
-
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
3843
|
-
});
|
|
3844
|
-
};
|
|
3845
|
-
}
|
|
3846
|
-
const abortEmitter = new import_events.EventEmitter();
|
|
3847
|
-
function abort(reason) {
|
|
3848
|
-
try {
|
|
3849
|
-
abortEmitter.emit(
|
|
3850
|
-
"abort",
|
|
3851
|
-
!reason || reason.type ? new CanceledError_default(null, config, req) : reason
|
|
3852
|
-
);
|
|
3853
|
-
} catch (err) {
|
|
3854
|
-
console.warn("emit error", err);
|
|
3855
|
-
}
|
|
3856
|
-
}
|
|
3857
|
-
abortEmitter.once("abort", reject);
|
|
3858
|
-
const onFinished = () => {
|
|
3168
|
+
const emitter = new import_events.default();
|
|
3169
|
+
function onFinished() {
|
|
3170
|
+
if (isFinished) return;
|
|
3171
|
+
isFinished = true;
|
|
3859
3172
|
if (config.cancelToken) {
|
|
3860
3173
|
config.cancelToken.unsubscribe(abort);
|
|
3861
3174
|
}
|
|
3862
3175
|
if (config.signal) {
|
|
3863
3176
|
config.signal.removeEventListener("abort", abort);
|
|
3864
3177
|
}
|
|
3865
|
-
|
|
3866
|
-
};
|
|
3867
|
-
if (config.cancelToken || config.signal) {
|
|
3868
|
-
config.cancelToken && config.cancelToken.subscribe(abort);
|
|
3869
|
-
if (config.signal) {
|
|
3870
|
-
config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
|
|
3871
|
-
}
|
|
3178
|
+
emitter.removeAllListeners();
|
|
3872
3179
|
}
|
|
3873
|
-
|
|
3180
|
+
function done(value, isRejected) {
|
|
3181
|
+
if (isDone) return;
|
|
3874
3182
|
isDone = true;
|
|
3875
3183
|
if (isRejected) {
|
|
3876
3184
|
rejected = true;
|
|
3877
3185
|
onFinished();
|
|
3878
|
-
return;
|
|
3879
3186
|
}
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3187
|
+
isRejected ? rejectPromise(value) : resolvePromise(value);
|
|
3188
|
+
}
|
|
3189
|
+
const resolve = function resolve2(value) {
|
|
3190
|
+
done(value);
|
|
3191
|
+
};
|
|
3192
|
+
const reject = function reject2(value) {
|
|
3193
|
+
done(value, true);
|
|
3194
|
+
};
|
|
3195
|
+
function abort(reason) {
|
|
3196
|
+
emitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
|
|
3197
|
+
}
|
|
3198
|
+
emitter.once("abort", reject);
|
|
3199
|
+
if (config.cancelToken || config.signal) {
|
|
3200
|
+
config.cancelToken && config.cancelToken.subscribe(abort);
|
|
3201
|
+
if (config.signal) {
|
|
3202
|
+
config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
|
|
3888
3203
|
}
|
|
3889
|
-
}
|
|
3890
|
-
const fullPath = buildFullPath(config.baseURL, config.url
|
|
3891
|
-
const parsed = new URL(fullPath,
|
|
3204
|
+
}
|
|
3205
|
+
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
3206
|
+
const parsed = new URL(fullPath, "http://localhost");
|
|
3892
3207
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
3893
3208
|
if (protocol === "data:") {
|
|
3894
|
-
if (config.maxContentLength > -1) {
|
|
3895
|
-
const dataUrl = String(config.url || fullPath || "");
|
|
3896
|
-
const estimated = estimateDataURLDecodedBytes(dataUrl);
|
|
3897
|
-
if (estimated > config.maxContentLength) {
|
|
3898
|
-
return reject(
|
|
3899
|
-
new AxiosError_default(
|
|
3900
|
-
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
3901
|
-
AxiosError_default.ERR_BAD_RESPONSE,
|
|
3902
|
-
config
|
|
3903
|
-
)
|
|
3904
|
-
);
|
|
3905
|
-
}
|
|
3906
|
-
}
|
|
3907
3209
|
let convertedData;
|
|
3908
3210
|
if (method !== "GET") {
|
|
3909
3211
|
return settle(resolve, reject, {
|
|
@@ -3937,38 +3239,37 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3937
3239
|
});
|
|
3938
3240
|
}
|
|
3939
3241
|
if (supportedProtocols.indexOf(protocol) === -1) {
|
|
3940
|
-
return reject(
|
|
3941
|
-
|
|
3942
|
-
|
|
3242
|
+
return reject(new AxiosError_default(
|
|
3243
|
+
"Unsupported protocol " + protocol,
|
|
3244
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
3245
|
+
config
|
|
3246
|
+
));
|
|
3943
3247
|
}
|
|
3944
3248
|
const headers = AxiosHeaders_default.from(config.headers).normalize();
|
|
3945
3249
|
headers.set("User-Agent", "axios/" + VERSION, false);
|
|
3946
|
-
const
|
|
3250
|
+
const onDownloadProgress = config.onDownloadProgress;
|
|
3251
|
+
const onUploadProgress = config.onUploadProgress;
|
|
3947
3252
|
const maxRate = config.maxRate;
|
|
3948
3253
|
let maxUploadRate = void 0;
|
|
3949
3254
|
let maxDownloadRate = void 0;
|
|
3950
3255
|
if (utils_default.isSpecCompliantForm(data)) {
|
|
3951
3256
|
const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
|
|
3952
|
-
data = formDataToStream_default(
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
tag: `axios-${VERSION}-boundary`,
|
|
3959
|
-
boundary: userBoundary && userBoundary[1] || void 0
|
|
3960
|
-
}
|
|
3961
|
-
);
|
|
3257
|
+
data = formDataToStream_default(data, (formHeaders) => {
|
|
3258
|
+
headers.set(formHeaders);
|
|
3259
|
+
}, {
|
|
3260
|
+
tag: `axios-${VERSION}-boundary`,
|
|
3261
|
+
boundary: userBoundary && userBoundary[1] || void 0
|
|
3262
|
+
});
|
|
3962
3263
|
} else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders)) {
|
|
3963
3264
|
headers.set(data.getHeaders());
|
|
3964
3265
|
if (!headers.hasContentLength()) {
|
|
3965
3266
|
try {
|
|
3966
3267
|
const knownLength = await import_util2.default.promisify(data.getLength).call(data);
|
|
3967
|
-
|
|
3268
|
+
headers.setContentLength(knownLength);
|
|
3968
3269
|
} catch (e) {
|
|
3969
3270
|
}
|
|
3970
3271
|
}
|
|
3971
|
-
} else if (utils_default.isBlob(data)
|
|
3272
|
+
} else if (utils_default.isBlob(data)) {
|
|
3972
3273
|
data.size && headers.setContentType(data.type || "application/octet-stream");
|
|
3973
3274
|
headers.setContentLength(data.size || 0);
|
|
3974
3275
|
data = import_stream4.default.Readable.from(readBlob_default(data));
|
|
@@ -3979,23 +3280,19 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3979
3280
|
} else if (utils_default.isString(data)) {
|
|
3980
3281
|
data = Buffer.from(data, "utf-8");
|
|
3981
3282
|
} else {
|
|
3982
|
-
return reject(
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
)
|
|
3988
|
-
);
|
|
3283
|
+
return reject(new AxiosError_default(
|
|
3284
|
+
"Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
|
|
3285
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
3286
|
+
config
|
|
3287
|
+
));
|
|
3989
3288
|
}
|
|
3990
3289
|
headers.setContentLength(data.length, false);
|
|
3991
3290
|
if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
|
|
3992
|
-
return reject(
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
)
|
|
3998
|
-
);
|
|
3291
|
+
return reject(new AxiosError_default(
|
|
3292
|
+
"Request body larger than maxBodyLength limit",
|
|
3293
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
3294
|
+
config
|
|
3295
|
+
));
|
|
3999
3296
|
}
|
|
4000
3297
|
}
|
|
4001
3298
|
const contentLength = utils_default.toFiniteNumber(headers.getContentLength());
|
|
@@ -4009,25 +3306,15 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4009
3306
|
if (!utils_default.isStream(data)) {
|
|
4010
3307
|
data = import_stream4.default.Readable.from(data, { objectMode: false });
|
|
4011
3308
|
}
|
|
4012
|
-
data = import_stream4.default.pipeline(
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
);
|
|
4021
|
-
onUploadProgress && data.on(
|
|
4022
|
-
"progress",
|
|
4023
|
-
flushOnFinish(
|
|
4024
|
-
data,
|
|
4025
|
-
progressEventDecorator(
|
|
4026
|
-
contentLength,
|
|
4027
|
-
progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
|
|
4028
|
-
)
|
|
4029
|
-
)
|
|
4030
|
-
);
|
|
3309
|
+
data = import_stream4.default.pipeline([data, new AxiosTransformStream_default({
|
|
3310
|
+
length: contentLength,
|
|
3311
|
+
maxRate: utils_default.toFiniteNumber(maxUploadRate)
|
|
3312
|
+
})], utils_default.noop);
|
|
3313
|
+
onUploadProgress && data.on("progress", (progress) => {
|
|
3314
|
+
onUploadProgress(Object.assign(progress, {
|
|
3315
|
+
upload: true
|
|
3316
|
+
}));
|
|
3317
|
+
});
|
|
4031
3318
|
}
|
|
4032
3319
|
let auth = void 0;
|
|
4033
3320
|
if (config.auth) {
|
|
@@ -4067,42 +3354,31 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4067
3354
|
agents: { http: config.httpAgent, https: config.httpsAgent },
|
|
4068
3355
|
auth,
|
|
4069
3356
|
protocol,
|
|
4070
|
-
family,
|
|
4071
3357
|
beforeRedirect: dispatchBeforeRedirect,
|
|
4072
|
-
beforeRedirects: {}
|
|
4073
|
-
http2Options
|
|
3358
|
+
beforeRedirects: {}
|
|
4074
3359
|
};
|
|
4075
|
-
!utils_default.isUndefined(lookup) && (options.lookup = lookup);
|
|
4076
3360
|
if (config.socketPath) {
|
|
4077
3361
|
options.socketPath = config.socketPath;
|
|
4078
3362
|
} else {
|
|
4079
|
-
options.hostname = parsed.hostname
|
|
3363
|
+
options.hostname = parsed.hostname;
|
|
4080
3364
|
options.port = parsed.port;
|
|
4081
|
-
setProxy(
|
|
4082
|
-
options,
|
|
4083
|
-
config.proxy,
|
|
4084
|
-
protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path
|
|
4085
|
-
);
|
|
3365
|
+
setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
|
|
4086
3366
|
}
|
|
4087
3367
|
let transport;
|
|
4088
3368
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
4089
3369
|
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
4090
|
-
if (
|
|
4091
|
-
transport =
|
|
3370
|
+
if (config.transport) {
|
|
3371
|
+
transport = config.transport;
|
|
3372
|
+
} else if (config.maxRedirects === 0) {
|
|
3373
|
+
transport = isHttpsRequest ? import_https.default : import_http.default;
|
|
4092
3374
|
} else {
|
|
4093
|
-
if (config.
|
|
4094
|
-
|
|
4095
|
-
}
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
if (config.maxRedirects) {
|
|
4099
|
-
options.maxRedirects = config.maxRedirects;
|
|
4100
|
-
}
|
|
4101
|
-
if (config.beforeRedirect) {
|
|
4102
|
-
options.beforeRedirects.config = config.beforeRedirect;
|
|
4103
|
-
}
|
|
4104
|
-
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
3375
|
+
if (config.maxRedirects) {
|
|
3376
|
+
options.maxRedirects = config.maxRedirects;
|
|
3377
|
+
}
|
|
3378
|
+
if (config.beforeRedirect) {
|
|
3379
|
+
options.beforeRedirects.config = config.beforeRedirect;
|
|
4105
3380
|
}
|
|
3381
|
+
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
4106
3382
|
}
|
|
4107
3383
|
if (config.maxBodyLength > -1) {
|
|
4108
3384
|
options.maxBodyLength = config.maxBodyLength;
|
|
@@ -4115,21 +3391,17 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4115
3391
|
req = transport.request(options, function handleResponse(res) {
|
|
4116
3392
|
if (req.destroyed) return;
|
|
4117
3393
|
const streams = [res];
|
|
4118
|
-
const responseLength =
|
|
4119
|
-
if (onDownloadProgress
|
|
3394
|
+
const responseLength = +res.headers["content-length"];
|
|
3395
|
+
if (onDownloadProgress) {
|
|
4120
3396
|
const transformStream = new AxiosTransformStream_default({
|
|
3397
|
+
length: utils_default.toFiniteNumber(responseLength),
|
|
4121
3398
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
|
4122
3399
|
});
|
|
4123
|
-
onDownloadProgress && transformStream.on(
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
responseLength,
|
|
4129
|
-
progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
|
|
4130
|
-
)
|
|
4131
|
-
)
|
|
4132
|
-
);
|
|
3400
|
+
onDownloadProgress && transformStream.on("progress", (progress) => {
|
|
3401
|
+
onDownloadProgress(Object.assign(progress, {
|
|
3402
|
+
download: true
|
|
3403
|
+
}));
|
|
3404
|
+
});
|
|
4133
3405
|
streams.push(transformStream);
|
|
4134
3406
|
}
|
|
4135
3407
|
let responseStream = res;
|
|
@@ -4138,7 +3410,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4138
3410
|
if (method === "HEAD" || res.statusCode === 204) {
|
|
4139
3411
|
delete res.headers["content-encoding"];
|
|
4140
3412
|
}
|
|
4141
|
-
switch (
|
|
3413
|
+
switch (res.headers["content-encoding"]) {
|
|
4142
3414
|
/*eslint default-case:0*/
|
|
4143
3415
|
case "gzip":
|
|
4144
3416
|
case "x-gzip":
|
|
@@ -4160,6 +3432,10 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4160
3432
|
}
|
|
4161
3433
|
}
|
|
4162
3434
|
responseStream = streams.length > 1 ? import_stream4.default.pipeline(streams, utils_default.noop) : streams[0];
|
|
3435
|
+
const offListeners = import_stream4.default.finished(responseStream, () => {
|
|
3436
|
+
offListeners();
|
|
3437
|
+
onFinished();
|
|
3438
|
+
});
|
|
4163
3439
|
const response = {
|
|
4164
3440
|
status: res.statusCode,
|
|
4165
3441
|
statusText: res.statusMessage,
|
|
@@ -4179,14 +3455,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4179
3455
|
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
4180
3456
|
rejected = true;
|
|
4181
3457
|
responseStream.destroy();
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
)
|
|
4189
|
-
);
|
|
3458
|
+
reject(new AxiosError_default(
|
|
3459
|
+
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
3460
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
3461
|
+
config,
|
|
3462
|
+
lastRequest
|
|
3463
|
+
));
|
|
4190
3464
|
}
|
|
4191
3465
|
});
|
|
4192
3466
|
responseStream.on("aborted", function handlerStreamAborted() {
|
|
@@ -4194,7 +3468,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4194
3468
|
return;
|
|
4195
3469
|
}
|
|
4196
3470
|
const err = new AxiosError_default(
|
|
4197
|
-
"
|
|
3471
|
+
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
4198
3472
|
AxiosError_default.ERR_BAD_RESPONSE,
|
|
4199
3473
|
config,
|
|
4200
3474
|
lastRequest
|
|
@@ -4217,24 +3491,21 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4217
3491
|
}
|
|
4218
3492
|
response.data = responseData;
|
|
4219
3493
|
} catch (err) {
|
|
4220
|
-
|
|
3494
|
+
reject(AxiosError_default.from(err, null, config, response.request, response));
|
|
4221
3495
|
}
|
|
4222
3496
|
settle(resolve, reject, response);
|
|
4223
3497
|
});
|
|
4224
3498
|
}
|
|
4225
|
-
|
|
3499
|
+
emitter.once("abort", (err) => {
|
|
4226
3500
|
if (!responseStream.destroyed) {
|
|
4227
3501
|
responseStream.emit("error", err);
|
|
4228
3502
|
responseStream.destroy();
|
|
4229
3503
|
}
|
|
4230
3504
|
});
|
|
4231
3505
|
});
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
} else {
|
|
4236
|
-
req.destroy(err);
|
|
4237
|
-
}
|
|
3506
|
+
emitter.once("abort", (err) => {
|
|
3507
|
+
reject(err);
|
|
3508
|
+
req.destroy(err);
|
|
4238
3509
|
});
|
|
4239
3510
|
req.on("error", function handleRequestError(err) {
|
|
4240
3511
|
reject(AxiosError_default.from(err, null, config, req));
|
|
@@ -4244,15 +3515,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4244
3515
|
});
|
|
4245
3516
|
if (config.timeout) {
|
|
4246
3517
|
const timeout = parseInt(config.timeout, 10);
|
|
4247
|
-
if (
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
)
|
|
4255
|
-
);
|
|
3518
|
+
if (isNaN(timeout)) {
|
|
3519
|
+
reject(new AxiosError_default(
|
|
3520
|
+
"error trying to parse `config.timeout` to int",
|
|
3521
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
3522
|
+
config,
|
|
3523
|
+
req
|
|
3524
|
+
));
|
|
4256
3525
|
return;
|
|
4257
3526
|
}
|
|
4258
3527
|
req.setTimeout(timeout, function handleRequestTimeout() {
|
|
@@ -4262,17 +3531,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4262
3531
|
if (config.timeoutErrorMessage) {
|
|
4263
3532
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
4264
3533
|
}
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
);
|
|
3534
|
+
reject(new AxiosError_default(
|
|
3535
|
+
timeoutErrorMessage,
|
|
3536
|
+
transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
|
|
3537
|
+
config,
|
|
3538
|
+
req
|
|
3539
|
+
));
|
|
3540
|
+
abort();
|
|
4273
3541
|
});
|
|
4274
|
-
} else {
|
|
4275
|
-
req.setTimeout(0);
|
|
4276
3542
|
}
|
|
4277
3543
|
if (utils_default.isStream(data)) {
|
|
4278
3544
|
let ended = false;
|
|
@@ -4291,211 +3557,149 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4291
3557
|
});
|
|
4292
3558
|
data.pipe(req);
|
|
4293
3559
|
} else {
|
|
4294
|
-
|
|
4295
|
-
req.end();
|
|
3560
|
+
req.end(data);
|
|
4296
3561
|
}
|
|
4297
3562
|
});
|
|
4298
3563
|
};
|
|
4299
3564
|
|
|
4300
|
-
// node_modules/axios/lib/helpers/
|
|
4301
|
-
var
|
|
4302
|
-
url2 = new URL(url2, platform_default.origin);
|
|
4303
|
-
return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
|
|
4304
|
-
})(
|
|
4305
|
-
new URL(platform_default.origin),
|
|
4306
|
-
platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)
|
|
4307
|
-
) : () => true;
|
|
4308
|
-
|
|
4309
|
-
// node_modules/axios/lib/helpers/cookies.js
|
|
4310
|
-
var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
3565
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/cookies.js
|
|
3566
|
+
var cookies_default = node_default.isStandardBrowserEnv ? (
|
|
4311
3567
|
// Standard browser envs support document.cookie
|
|
4312
|
-
{
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
3568
|
+
/* @__PURE__ */ function standardBrowserEnv() {
|
|
3569
|
+
return {
|
|
3570
|
+
write: function write(name, value, expires, path18, domain, secure) {
|
|
3571
|
+
const cookie = [];
|
|
3572
|
+
cookie.push(name + "=" + encodeURIComponent(value));
|
|
3573
|
+
if (utils_default.isNumber(expires)) {
|
|
3574
|
+
cookie.push("expires=" + new Date(expires).toGMTString());
|
|
3575
|
+
}
|
|
3576
|
+
if (utils_default.isString(path18)) {
|
|
3577
|
+
cookie.push("path=" + path18);
|
|
3578
|
+
}
|
|
3579
|
+
if (utils_default.isString(domain)) {
|
|
3580
|
+
cookie.push("domain=" + domain);
|
|
3581
|
+
}
|
|
3582
|
+
if (secure === true) {
|
|
3583
|
+
cookie.push("secure");
|
|
3584
|
+
}
|
|
3585
|
+
document.cookie = cookie.join("; ");
|
|
3586
|
+
},
|
|
3587
|
+
read: function read(name) {
|
|
3588
|
+
const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
3589
|
+
return match ? decodeURIComponent(match[3]) : null;
|
|
3590
|
+
},
|
|
3591
|
+
remove: function remove(name) {
|
|
3592
|
+
this.write(name, "", Date.now() - 864e5);
|
|
4327
3593
|
}
|
|
4328
|
-
|
|
4329
|
-
|
|
3594
|
+
};
|
|
3595
|
+
}()
|
|
3596
|
+
) : (
|
|
3597
|
+
// Non standard browser env (web workers, react-native) lack needed support.
|
|
3598
|
+
/* @__PURE__ */ function nonStandardBrowserEnv() {
|
|
3599
|
+
return {
|
|
3600
|
+
write: function write() {
|
|
3601
|
+
},
|
|
3602
|
+
read: function read() {
|
|
3603
|
+
return null;
|
|
3604
|
+
},
|
|
3605
|
+
remove: function remove() {
|
|
4330
3606
|
}
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
3607
|
+
};
|
|
3608
|
+
}()
|
|
3609
|
+
);
|
|
3610
|
+
|
|
3611
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
3612
|
+
var isURLSameOrigin_default = node_default.isStandardBrowserEnv ? (
|
|
3613
|
+
// Standard browser envs have full support of the APIs needed to test
|
|
3614
|
+
// whether the request URL is of the same origin as current location.
|
|
3615
|
+
function standardBrowserEnv2() {
|
|
3616
|
+
const msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
3617
|
+
const urlParsingNode = document.createElement("a");
|
|
3618
|
+
let originURL;
|
|
3619
|
+
function resolveURL(url2) {
|
|
3620
|
+
let href = url2;
|
|
3621
|
+
if (msie) {
|
|
3622
|
+
urlParsingNode.setAttribute("href", href);
|
|
3623
|
+
href = urlParsingNode.href;
|
|
3624
|
+
}
|
|
3625
|
+
urlParsingNode.setAttribute("href", href);
|
|
3626
|
+
return {
|
|
3627
|
+
href: urlParsingNode.href,
|
|
3628
|
+
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
|
|
3629
|
+
host: urlParsingNode.host,
|
|
3630
|
+
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
|
|
3631
|
+
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
|
|
3632
|
+
hostname: urlParsingNode.hostname,
|
|
3633
|
+
port: urlParsingNode.port,
|
|
3634
|
+
pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
|
|
3635
|
+
};
|
|
4340
3636
|
}
|
|
4341
|
-
|
|
3637
|
+
originURL = resolveURL(window.location.href);
|
|
3638
|
+
return function isURLSameOrigin(requestURL) {
|
|
3639
|
+
const parsed = utils_default.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
3640
|
+
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
3641
|
+
};
|
|
3642
|
+
}()
|
|
4342
3643
|
) : (
|
|
4343
|
-
// Non
|
|
4344
|
-
{
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
},
|
|
4350
|
-
remove() {
|
|
4351
|
-
}
|
|
4352
|
-
}
|
|
3644
|
+
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
3645
|
+
/* @__PURE__ */ function nonStandardBrowserEnv2() {
|
|
3646
|
+
return function isURLSameOrigin() {
|
|
3647
|
+
return true;
|
|
3648
|
+
};
|
|
3649
|
+
}()
|
|
4353
3650
|
);
|
|
4354
3651
|
|
|
4355
|
-
// node_modules/axios/lib/
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
function valueFromConfig2(a, b) {
|
|
4378
|
-
if (!utils_default.isUndefined(b)) {
|
|
4379
|
-
return getMergedValue(void 0, b);
|
|
4380
|
-
}
|
|
4381
|
-
}
|
|
4382
|
-
function defaultToConfig2(a, b) {
|
|
4383
|
-
if (!utils_default.isUndefined(b)) {
|
|
4384
|
-
return getMergedValue(void 0, b);
|
|
4385
|
-
} else if (!utils_default.isUndefined(a)) {
|
|
4386
|
-
return getMergedValue(void 0, a);
|
|
4387
|
-
}
|
|
4388
|
-
}
|
|
4389
|
-
function mergeDirectKeys(a, b, prop) {
|
|
4390
|
-
if (prop in config2) {
|
|
4391
|
-
return getMergedValue(a, b);
|
|
4392
|
-
} else if (prop in config1) {
|
|
4393
|
-
return getMergedValue(void 0, a);
|
|
4394
|
-
}
|
|
4395
|
-
}
|
|
4396
|
-
const mergeMap = {
|
|
4397
|
-
url: valueFromConfig2,
|
|
4398
|
-
method: valueFromConfig2,
|
|
4399
|
-
data: valueFromConfig2,
|
|
4400
|
-
baseURL: defaultToConfig2,
|
|
4401
|
-
transformRequest: defaultToConfig2,
|
|
4402
|
-
transformResponse: defaultToConfig2,
|
|
4403
|
-
paramsSerializer: defaultToConfig2,
|
|
4404
|
-
timeout: defaultToConfig2,
|
|
4405
|
-
timeoutMessage: defaultToConfig2,
|
|
4406
|
-
withCredentials: defaultToConfig2,
|
|
4407
|
-
withXSRFToken: defaultToConfig2,
|
|
4408
|
-
adapter: defaultToConfig2,
|
|
4409
|
-
responseType: defaultToConfig2,
|
|
4410
|
-
xsrfCookieName: defaultToConfig2,
|
|
4411
|
-
xsrfHeaderName: defaultToConfig2,
|
|
4412
|
-
onUploadProgress: defaultToConfig2,
|
|
4413
|
-
onDownloadProgress: defaultToConfig2,
|
|
4414
|
-
decompress: defaultToConfig2,
|
|
4415
|
-
maxContentLength: defaultToConfig2,
|
|
4416
|
-
maxBodyLength: defaultToConfig2,
|
|
4417
|
-
beforeRedirect: defaultToConfig2,
|
|
4418
|
-
transport: defaultToConfig2,
|
|
4419
|
-
httpAgent: defaultToConfig2,
|
|
4420
|
-
httpsAgent: defaultToConfig2,
|
|
4421
|
-
cancelToken: defaultToConfig2,
|
|
4422
|
-
socketPath: defaultToConfig2,
|
|
4423
|
-
responseEncoding: defaultToConfig2,
|
|
4424
|
-
validateStatus: mergeDirectKeys,
|
|
4425
|
-
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
3652
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/xhr.js
|
|
3653
|
+
function progressEventReducer(listener, isDownloadStream) {
|
|
3654
|
+
let bytesNotified = 0;
|
|
3655
|
+
const _speedometer = speedometer_default(50, 250);
|
|
3656
|
+
return (e) => {
|
|
3657
|
+
const loaded = e.loaded;
|
|
3658
|
+
const total = e.lengthComputable ? e.total : void 0;
|
|
3659
|
+
const progressBytes = loaded - bytesNotified;
|
|
3660
|
+
const rate = _speedometer(progressBytes);
|
|
3661
|
+
const inRange = loaded <= total;
|
|
3662
|
+
bytesNotified = loaded;
|
|
3663
|
+
const data = {
|
|
3664
|
+
loaded,
|
|
3665
|
+
total,
|
|
3666
|
+
progress: total ? loaded / total : void 0,
|
|
3667
|
+
bytes: progressBytes,
|
|
3668
|
+
rate: rate ? rate : void 0,
|
|
3669
|
+
estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
|
|
3670
|
+
event: e
|
|
3671
|
+
};
|
|
3672
|
+
data[isDownloadStream ? "download" : "upload"] = true;
|
|
3673
|
+
listener(data);
|
|
4426
3674
|
};
|
|
4427
|
-
utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
4428
|
-
if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
|
|
4429
|
-
const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
4430
|
-
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
4431
|
-
utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
4432
|
-
});
|
|
4433
|
-
return config;
|
|
4434
3675
|
}
|
|
4435
|
-
|
|
4436
|
-
// node_modules/axios/lib/helpers/resolveConfig.js
|
|
4437
|
-
var resolveConfig_default = (config) => {
|
|
4438
|
-
const newConfig = mergeConfig({}, config);
|
|
4439
|
-
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
4440
|
-
newConfig.headers = headers = AxiosHeaders_default.from(headers);
|
|
4441
|
-
newConfig.url = buildURL(
|
|
4442
|
-
buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
|
|
4443
|
-
config.params,
|
|
4444
|
-
config.paramsSerializer
|
|
4445
|
-
);
|
|
4446
|
-
if (auth) {
|
|
4447
|
-
headers.set(
|
|
4448
|
-
"Authorization",
|
|
4449
|
-
"Basic " + btoa(
|
|
4450
|
-
(auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")
|
|
4451
|
-
)
|
|
4452
|
-
);
|
|
4453
|
-
}
|
|
4454
|
-
if (utils_default.isFormData(data)) {
|
|
4455
|
-
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
|
|
4456
|
-
headers.setContentType(void 0);
|
|
4457
|
-
} else if (utils_default.isFunction(data.getHeaders)) {
|
|
4458
|
-
const formHeaders = data.getHeaders();
|
|
4459
|
-
const allowedHeaders = ["content-type", "content-length"];
|
|
4460
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
4461
|
-
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
4462
|
-
headers.set(key, val);
|
|
4463
|
-
}
|
|
4464
|
-
});
|
|
4465
|
-
}
|
|
4466
|
-
}
|
|
4467
|
-
if (platform_default.hasStandardBrowserEnv) {
|
|
4468
|
-
withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
|
4469
|
-
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
|
|
4470
|
-
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
|
|
4471
|
-
if (xsrfValue) {
|
|
4472
|
-
headers.set(xsrfHeaderName, xsrfValue);
|
|
4473
|
-
}
|
|
4474
|
-
}
|
|
4475
|
-
}
|
|
4476
|
-
return newConfig;
|
|
4477
|
-
};
|
|
4478
|
-
|
|
4479
|
-
// node_modules/axios/lib/adapters/xhr.js
|
|
4480
3676
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
4481
3677
|
var xhr_default = isXHRAdapterSupported && function(config) {
|
|
4482
3678
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
const
|
|
4486
|
-
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
3679
|
+
let requestData = config.data;
|
|
3680
|
+
const requestHeaders = AxiosHeaders_default.from(config.headers).normalize();
|
|
3681
|
+
const responseType = config.responseType;
|
|
4487
3682
|
let onCanceled;
|
|
4488
|
-
let uploadThrottled, downloadThrottled;
|
|
4489
|
-
let flushUpload, flushDownload;
|
|
4490
3683
|
function done() {
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
3684
|
+
if (config.cancelToken) {
|
|
3685
|
+
config.cancelToken.unsubscribe(onCanceled);
|
|
3686
|
+
}
|
|
3687
|
+
if (config.signal) {
|
|
3688
|
+
config.signal.removeEventListener("abort", onCanceled);
|
|
3689
|
+
}
|
|
3690
|
+
}
|
|
3691
|
+
if (utils_default.isFormData(requestData) && (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv)) {
|
|
3692
|
+
requestHeaders.setContentType(false);
|
|
4495
3693
|
}
|
|
4496
3694
|
let request = new XMLHttpRequest();
|
|
4497
|
-
|
|
4498
|
-
|
|
3695
|
+
if (config.auth) {
|
|
3696
|
+
const username = config.auth.username || "";
|
|
3697
|
+
const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
|
|
3698
|
+
requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
|
|
3699
|
+
}
|
|
3700
|
+
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
3701
|
+
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
|
3702
|
+
request.timeout = config.timeout;
|
|
4499
3703
|
function onloadend() {
|
|
4500
3704
|
if (!request) {
|
|
4501
3705
|
return;
|
|
@@ -4512,17 +3716,13 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
4512
3716
|
config,
|
|
4513
3717
|
request
|
|
4514
3718
|
};
|
|
4515
|
-
settle(
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
done();
|
|
4523
|
-
},
|
|
4524
|
-
response
|
|
4525
|
-
);
|
|
3719
|
+
settle(function _resolve(value) {
|
|
3720
|
+
resolve(value);
|
|
3721
|
+
done();
|
|
3722
|
+
}, function _reject(err) {
|
|
3723
|
+
reject(err);
|
|
3724
|
+
done();
|
|
3725
|
+
}, response);
|
|
4526
3726
|
request = null;
|
|
4527
3727
|
}
|
|
4528
3728
|
if ("onloadend" in request) {
|
|
@@ -4545,51 +3745,49 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
4545
3745
|
reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request));
|
|
4546
3746
|
request = null;
|
|
4547
3747
|
};
|
|
4548
|
-
request.onerror = function handleError(
|
|
4549
|
-
|
|
4550
|
-
const err = new AxiosError_default(msg, AxiosError_default.ERR_NETWORK, config, request);
|
|
4551
|
-
err.event = event || null;
|
|
4552
|
-
reject(err);
|
|
3748
|
+
request.onerror = function handleError() {
|
|
3749
|
+
reject(new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request));
|
|
4553
3750
|
request = null;
|
|
4554
3751
|
};
|
|
4555
3752
|
request.ontimeout = function handleTimeout() {
|
|
4556
|
-
let timeoutErrorMessage =
|
|
4557
|
-
const transitional2 =
|
|
4558
|
-
if (
|
|
4559
|
-
timeoutErrorMessage =
|
|
4560
|
-
}
|
|
4561
|
-
reject(
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
)
|
|
4568
|
-
);
|
|
3753
|
+
let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
|
|
3754
|
+
const transitional2 = config.transitional || transitional_default;
|
|
3755
|
+
if (config.timeoutErrorMessage) {
|
|
3756
|
+
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
3757
|
+
}
|
|
3758
|
+
reject(new AxiosError_default(
|
|
3759
|
+
timeoutErrorMessage,
|
|
3760
|
+
transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
|
|
3761
|
+
config,
|
|
3762
|
+
request
|
|
3763
|
+
));
|
|
4569
3764
|
request = null;
|
|
4570
3765
|
};
|
|
3766
|
+
if (node_default.isStandardBrowserEnv) {
|
|
3767
|
+
const xsrfValue = (config.withCredentials || isURLSameOrigin_default(fullPath)) && config.xsrfCookieName && cookies_default.read(config.xsrfCookieName);
|
|
3768
|
+
if (xsrfValue) {
|
|
3769
|
+
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
3770
|
+
}
|
|
3771
|
+
}
|
|
4571
3772
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
4572
3773
|
if ("setRequestHeader" in request) {
|
|
4573
3774
|
utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
4574
3775
|
request.setRequestHeader(key, val);
|
|
4575
3776
|
});
|
|
4576
3777
|
}
|
|
4577
|
-
if (!utils_default.isUndefined(
|
|
4578
|
-
request.withCredentials = !!
|
|
3778
|
+
if (!utils_default.isUndefined(config.withCredentials)) {
|
|
3779
|
+
request.withCredentials = !!config.withCredentials;
|
|
4579
3780
|
}
|
|
4580
3781
|
if (responseType && responseType !== "json") {
|
|
4581
|
-
request.responseType =
|
|
3782
|
+
request.responseType = config.responseType;
|
|
4582
3783
|
}
|
|
4583
|
-
if (onDownloadProgress) {
|
|
4584
|
-
|
|
4585
|
-
request.addEventListener("progress", downloadThrottled);
|
|
3784
|
+
if (typeof config.onDownloadProgress === "function") {
|
|
3785
|
+
request.addEventListener("progress", progressEventReducer(config.onDownloadProgress, true));
|
|
4586
3786
|
}
|
|
4587
|
-
if (onUploadProgress && request.upload) {
|
|
4588
|
-
|
|
4589
|
-
request.upload.addEventListener("progress", uploadThrottled);
|
|
4590
|
-
request.upload.addEventListener("loadend", flushUpload);
|
|
3787
|
+
if (typeof config.onUploadProgress === "function" && request.upload) {
|
|
3788
|
+
request.upload.addEventListener("progress", progressEventReducer(config.onUploadProgress));
|
|
4591
3789
|
}
|
|
4592
|
-
if (
|
|
3790
|
+
if (config.cancelToken || config.signal) {
|
|
4593
3791
|
onCanceled = (cancel) => {
|
|
4594
3792
|
if (!request) {
|
|
4595
3793
|
return;
|
|
@@ -4598,373 +3796,24 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
4598
3796
|
request.abort();
|
|
4599
3797
|
request = null;
|
|
4600
3798
|
};
|
|
4601
|
-
|
|
4602
|
-
if (
|
|
4603
|
-
|
|
3799
|
+
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
3800
|
+
if (config.signal) {
|
|
3801
|
+
config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
|
|
4604
3802
|
}
|
|
4605
3803
|
}
|
|
4606
|
-
const protocol = parseProtocol(
|
|
4607
|
-
if (protocol &&
|
|
4608
|
-
reject(
|
|
4609
|
-
new AxiosError_default(
|
|
4610
|
-
"Unsupported protocol " + protocol + ":",
|
|
4611
|
-
AxiosError_default.ERR_BAD_REQUEST,
|
|
4612
|
-
config
|
|
4613
|
-
)
|
|
4614
|
-
);
|
|
3804
|
+
const protocol = parseProtocol(fullPath);
|
|
3805
|
+
if (protocol && node_default.protocols.indexOf(protocol) === -1) {
|
|
3806
|
+
reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
|
|
4615
3807
|
return;
|
|
4616
3808
|
}
|
|
4617
3809
|
request.send(requestData || null);
|
|
4618
3810
|
});
|
|
4619
3811
|
};
|
|
4620
3812
|
|
|
4621
|
-
// node_modules/axios/lib/
|
|
4622
|
-
var composeSignals = (signals, timeout) => {
|
|
4623
|
-
const { length } = signals = signals ? signals.filter(Boolean) : [];
|
|
4624
|
-
if (timeout || length) {
|
|
4625
|
-
let controller = new AbortController();
|
|
4626
|
-
let aborted;
|
|
4627
|
-
const onabort = function(reason) {
|
|
4628
|
-
if (!aborted) {
|
|
4629
|
-
aborted = true;
|
|
4630
|
-
unsubscribe();
|
|
4631
|
-
const err = reason instanceof Error ? reason : this.reason;
|
|
4632
|
-
controller.abort(
|
|
4633
|
-
err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)
|
|
4634
|
-
);
|
|
4635
|
-
}
|
|
4636
|
-
};
|
|
4637
|
-
let timer = timeout && setTimeout(() => {
|
|
4638
|
-
timer = null;
|
|
4639
|
-
onabort(new AxiosError_default(`timeout of ${timeout}ms exceeded`, AxiosError_default.ETIMEDOUT));
|
|
4640
|
-
}, timeout);
|
|
4641
|
-
const unsubscribe = () => {
|
|
4642
|
-
if (signals) {
|
|
4643
|
-
timer && clearTimeout(timer);
|
|
4644
|
-
timer = null;
|
|
4645
|
-
signals.forEach((signal2) => {
|
|
4646
|
-
signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
|
|
4647
|
-
});
|
|
4648
|
-
signals = null;
|
|
4649
|
-
}
|
|
4650
|
-
};
|
|
4651
|
-
signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
|
|
4652
|
-
const { signal } = controller;
|
|
4653
|
-
signal.unsubscribe = () => utils_default.asap(unsubscribe);
|
|
4654
|
-
return signal;
|
|
4655
|
-
}
|
|
4656
|
-
};
|
|
4657
|
-
var composeSignals_default = composeSignals;
|
|
4658
|
-
|
|
4659
|
-
// node_modules/axios/lib/helpers/trackStream.js
|
|
4660
|
-
var streamChunk = function* (chunk, chunkSize) {
|
|
4661
|
-
let len = chunk.byteLength;
|
|
4662
|
-
if (!chunkSize || len < chunkSize) {
|
|
4663
|
-
yield chunk;
|
|
4664
|
-
return;
|
|
4665
|
-
}
|
|
4666
|
-
let pos = 0;
|
|
4667
|
-
let end;
|
|
4668
|
-
while (pos < len) {
|
|
4669
|
-
end = pos + chunkSize;
|
|
4670
|
-
yield chunk.slice(pos, end);
|
|
4671
|
-
pos = end;
|
|
4672
|
-
}
|
|
4673
|
-
};
|
|
4674
|
-
var readBytes = async function* (iterable, chunkSize) {
|
|
4675
|
-
for await (const chunk of readStream(iterable)) {
|
|
4676
|
-
yield* streamChunk(chunk, chunkSize);
|
|
4677
|
-
}
|
|
4678
|
-
};
|
|
4679
|
-
var readStream = async function* (stream4) {
|
|
4680
|
-
if (stream4[Symbol.asyncIterator]) {
|
|
4681
|
-
yield* stream4;
|
|
4682
|
-
return;
|
|
4683
|
-
}
|
|
4684
|
-
const reader = stream4.getReader();
|
|
4685
|
-
try {
|
|
4686
|
-
for (; ; ) {
|
|
4687
|
-
const { done, value } = await reader.read();
|
|
4688
|
-
if (done) {
|
|
4689
|
-
break;
|
|
4690
|
-
}
|
|
4691
|
-
yield value;
|
|
4692
|
-
}
|
|
4693
|
-
} finally {
|
|
4694
|
-
await reader.cancel();
|
|
4695
|
-
}
|
|
4696
|
-
};
|
|
4697
|
-
var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
|
|
4698
|
-
const iterator2 = readBytes(stream4, chunkSize);
|
|
4699
|
-
let bytes = 0;
|
|
4700
|
-
let done;
|
|
4701
|
-
let _onFinish = (e) => {
|
|
4702
|
-
if (!done) {
|
|
4703
|
-
done = true;
|
|
4704
|
-
onFinish && onFinish(e);
|
|
4705
|
-
}
|
|
4706
|
-
};
|
|
4707
|
-
return new ReadableStream(
|
|
4708
|
-
{
|
|
4709
|
-
async pull(controller) {
|
|
4710
|
-
try {
|
|
4711
|
-
const { done: done2, value } = await iterator2.next();
|
|
4712
|
-
if (done2) {
|
|
4713
|
-
_onFinish();
|
|
4714
|
-
controller.close();
|
|
4715
|
-
return;
|
|
4716
|
-
}
|
|
4717
|
-
let len = value.byteLength;
|
|
4718
|
-
if (onProgress) {
|
|
4719
|
-
let loadedBytes = bytes += len;
|
|
4720
|
-
onProgress(loadedBytes);
|
|
4721
|
-
}
|
|
4722
|
-
controller.enqueue(new Uint8Array(value));
|
|
4723
|
-
} catch (err) {
|
|
4724
|
-
_onFinish(err);
|
|
4725
|
-
throw err;
|
|
4726
|
-
}
|
|
4727
|
-
},
|
|
4728
|
-
cancel(reason) {
|
|
4729
|
-
_onFinish(reason);
|
|
4730
|
-
return iterator2.return();
|
|
4731
|
-
}
|
|
4732
|
-
},
|
|
4733
|
-
{
|
|
4734
|
-
highWaterMark: 2
|
|
4735
|
-
}
|
|
4736
|
-
);
|
|
4737
|
-
};
|
|
4738
|
-
|
|
4739
|
-
// node_modules/axios/lib/adapters/fetch.js
|
|
4740
|
-
var DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
4741
|
-
var { isFunction: isFunction2 } = utils_default;
|
|
4742
|
-
var globalFetchAPI = (({ Request, Response }) => ({
|
|
4743
|
-
Request,
|
|
4744
|
-
Response
|
|
4745
|
-
}))(utils_default.global);
|
|
4746
|
-
var { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = utils_default.global;
|
|
4747
|
-
var test = (fn, ...args) => {
|
|
4748
|
-
try {
|
|
4749
|
-
return !!fn(...args);
|
|
4750
|
-
} catch (e) {
|
|
4751
|
-
return false;
|
|
4752
|
-
}
|
|
4753
|
-
};
|
|
4754
|
-
var factory = (env) => {
|
|
4755
|
-
env = utils_default.merge.call(
|
|
4756
|
-
{
|
|
4757
|
-
skipUndefined: true
|
|
4758
|
-
},
|
|
4759
|
-
globalFetchAPI,
|
|
4760
|
-
env
|
|
4761
|
-
);
|
|
4762
|
-
const { fetch: envFetch, Request, Response } = env;
|
|
4763
|
-
const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function";
|
|
4764
|
-
const isRequestSupported = isFunction2(Request);
|
|
4765
|
-
const isResponseSupported = isFunction2(Response);
|
|
4766
|
-
if (!isFetchSupported) {
|
|
4767
|
-
return false;
|
|
4768
|
-
}
|
|
4769
|
-
const isReadableStreamSupported = isFetchSupported && isFunction2(ReadableStream2);
|
|
4770
|
-
const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
4771
|
-
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
4772
|
-
let duplexAccessed = false;
|
|
4773
|
-
const hasContentType = new Request(platform_default.origin, {
|
|
4774
|
-
body: new ReadableStream2(),
|
|
4775
|
-
method: "POST",
|
|
4776
|
-
get duplex() {
|
|
4777
|
-
duplexAccessed = true;
|
|
4778
|
-
return "half";
|
|
4779
|
-
}
|
|
4780
|
-
}).headers.has("Content-Type");
|
|
4781
|
-
return duplexAccessed && !hasContentType;
|
|
4782
|
-
});
|
|
4783
|
-
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
|
|
4784
|
-
const resolvers = {
|
|
4785
|
-
stream: supportsResponseStream && ((res) => res.body)
|
|
4786
|
-
};
|
|
4787
|
-
isFetchSupported && (() => {
|
|
4788
|
-
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
|
|
4789
|
-
!resolvers[type] && (resolvers[type] = (res, config) => {
|
|
4790
|
-
let method = res && res[type];
|
|
4791
|
-
if (method) {
|
|
4792
|
-
return method.call(res);
|
|
4793
|
-
}
|
|
4794
|
-
throw new AxiosError_default(
|
|
4795
|
-
`Response type '${type}' is not supported`,
|
|
4796
|
-
AxiosError_default.ERR_NOT_SUPPORT,
|
|
4797
|
-
config
|
|
4798
|
-
);
|
|
4799
|
-
});
|
|
4800
|
-
});
|
|
4801
|
-
})();
|
|
4802
|
-
const getBodyLength = async (body) => {
|
|
4803
|
-
if (body == null) {
|
|
4804
|
-
return 0;
|
|
4805
|
-
}
|
|
4806
|
-
if (utils_default.isBlob(body)) {
|
|
4807
|
-
return body.size;
|
|
4808
|
-
}
|
|
4809
|
-
if (utils_default.isSpecCompliantForm(body)) {
|
|
4810
|
-
const _request = new Request(platform_default.origin, {
|
|
4811
|
-
method: "POST",
|
|
4812
|
-
body
|
|
4813
|
-
});
|
|
4814
|
-
return (await _request.arrayBuffer()).byteLength;
|
|
4815
|
-
}
|
|
4816
|
-
if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
|
|
4817
|
-
return body.byteLength;
|
|
4818
|
-
}
|
|
4819
|
-
if (utils_default.isURLSearchParams(body)) {
|
|
4820
|
-
body = body + "";
|
|
4821
|
-
}
|
|
4822
|
-
if (utils_default.isString(body)) {
|
|
4823
|
-
return (await encodeText(body)).byteLength;
|
|
4824
|
-
}
|
|
4825
|
-
};
|
|
4826
|
-
const resolveBodyLength = async (headers, body) => {
|
|
4827
|
-
const length = utils_default.toFiniteNumber(headers.getContentLength());
|
|
4828
|
-
return length == null ? getBodyLength(body) : length;
|
|
4829
|
-
};
|
|
4830
|
-
return async (config) => {
|
|
4831
|
-
let {
|
|
4832
|
-
url: url2,
|
|
4833
|
-
method,
|
|
4834
|
-
data,
|
|
4835
|
-
signal,
|
|
4836
|
-
cancelToken,
|
|
4837
|
-
timeout,
|
|
4838
|
-
onDownloadProgress,
|
|
4839
|
-
onUploadProgress,
|
|
4840
|
-
responseType,
|
|
4841
|
-
headers,
|
|
4842
|
-
withCredentials = "same-origin",
|
|
4843
|
-
fetchOptions
|
|
4844
|
-
} = resolveConfig_default(config);
|
|
4845
|
-
let _fetch = envFetch || fetch;
|
|
4846
|
-
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
4847
|
-
let composedSignal = composeSignals_default(
|
|
4848
|
-
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
4849
|
-
timeout
|
|
4850
|
-
);
|
|
4851
|
-
let request = null;
|
|
4852
|
-
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
4853
|
-
composedSignal.unsubscribe();
|
|
4854
|
-
});
|
|
4855
|
-
let requestContentLength;
|
|
4856
|
-
try {
|
|
4857
|
-
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
|
4858
|
-
let _request = new Request(url2, {
|
|
4859
|
-
method: "POST",
|
|
4860
|
-
body: data,
|
|
4861
|
-
duplex: "half"
|
|
4862
|
-
});
|
|
4863
|
-
let contentTypeHeader;
|
|
4864
|
-
if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
4865
|
-
headers.setContentType(contentTypeHeader);
|
|
4866
|
-
}
|
|
4867
|
-
if (_request.body) {
|
|
4868
|
-
const [onProgress, flush] = progressEventDecorator(
|
|
4869
|
-
requestContentLength,
|
|
4870
|
-
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
4871
|
-
);
|
|
4872
|
-
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
4873
|
-
}
|
|
4874
|
-
}
|
|
4875
|
-
if (!utils_default.isString(withCredentials)) {
|
|
4876
|
-
withCredentials = withCredentials ? "include" : "omit";
|
|
4877
|
-
}
|
|
4878
|
-
const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
|
|
4879
|
-
const resolvedOptions = {
|
|
4880
|
-
...fetchOptions,
|
|
4881
|
-
signal: composedSignal,
|
|
4882
|
-
method: method.toUpperCase(),
|
|
4883
|
-
headers: headers.normalize().toJSON(),
|
|
4884
|
-
body: data,
|
|
4885
|
-
duplex: "half",
|
|
4886
|
-
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
4887
|
-
};
|
|
4888
|
-
request = isRequestSupported && new Request(url2, resolvedOptions);
|
|
4889
|
-
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
|
|
4890
|
-
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
4891
|
-
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
4892
|
-
const options = {};
|
|
4893
|
-
["status", "statusText", "headers"].forEach((prop) => {
|
|
4894
|
-
options[prop] = response[prop];
|
|
4895
|
-
});
|
|
4896
|
-
const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
|
|
4897
|
-
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
4898
|
-
responseContentLength,
|
|
4899
|
-
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
4900
|
-
) || [];
|
|
4901
|
-
response = new Response(
|
|
4902
|
-
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
4903
|
-
flush && flush();
|
|
4904
|
-
unsubscribe && unsubscribe();
|
|
4905
|
-
}),
|
|
4906
|
-
options
|
|
4907
|
-
);
|
|
4908
|
-
}
|
|
4909
|
-
responseType = responseType || "text";
|
|
4910
|
-
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](
|
|
4911
|
-
response,
|
|
4912
|
-
config
|
|
4913
|
-
);
|
|
4914
|
-
!isStreamResponse && unsubscribe && unsubscribe();
|
|
4915
|
-
return await new Promise((resolve, reject) => {
|
|
4916
|
-
settle(resolve, reject, {
|
|
4917
|
-
data: responseData,
|
|
4918
|
-
headers: AxiosHeaders_default.from(response.headers),
|
|
4919
|
-
status: response.status,
|
|
4920
|
-
statusText: response.statusText,
|
|
4921
|
-
config,
|
|
4922
|
-
request
|
|
4923
|
-
});
|
|
4924
|
-
});
|
|
4925
|
-
} catch (err) {
|
|
4926
|
-
unsubscribe && unsubscribe();
|
|
4927
|
-
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
4928
|
-
throw Object.assign(
|
|
4929
|
-
new AxiosError_default(
|
|
4930
|
-
"Network Error",
|
|
4931
|
-
AxiosError_default.ERR_NETWORK,
|
|
4932
|
-
config,
|
|
4933
|
-
request,
|
|
4934
|
-
err && err.response
|
|
4935
|
-
),
|
|
4936
|
-
{
|
|
4937
|
-
cause: err.cause || err
|
|
4938
|
-
}
|
|
4939
|
-
);
|
|
4940
|
-
}
|
|
4941
|
-
throw AxiosError_default.from(err, err && err.code, config, request, err && err.response);
|
|
4942
|
-
}
|
|
4943
|
-
};
|
|
4944
|
-
};
|
|
4945
|
-
var seedCache = /* @__PURE__ */ new Map();
|
|
4946
|
-
var getFetch = (config) => {
|
|
4947
|
-
let env = config && config.env || {};
|
|
4948
|
-
const { fetch: fetch2, Request, Response } = env;
|
|
4949
|
-
const seeds = [Request, Response, fetch2];
|
|
4950
|
-
let len = seeds.length, i = len, seed, target, map = seedCache;
|
|
4951
|
-
while (i--) {
|
|
4952
|
-
seed = seeds[i];
|
|
4953
|
-
target = map.get(seed);
|
|
4954
|
-
target === void 0 && map.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env));
|
|
4955
|
-
map = target;
|
|
4956
|
-
}
|
|
4957
|
-
return target;
|
|
4958
|
-
};
|
|
4959
|
-
var adapter = getFetch();
|
|
4960
|
-
|
|
4961
|
-
// node_modules/axios/lib/adapters/adapters.js
|
|
3813
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/adapters.js
|
|
4962
3814
|
var knownAdapters = {
|
|
4963
3815
|
http: http_default,
|
|
4964
|
-
xhr: xhr_default
|
|
4965
|
-
fetch: {
|
|
4966
|
-
get: getFetch
|
|
4967
|
-
}
|
|
3816
|
+
xhr: xhr_default
|
|
4968
3817
|
};
|
|
4969
3818
|
utils_default.forEach(knownAdapters, (fn, value) => {
|
|
4970
3819
|
if (fn) {
|
|
@@ -4975,55 +3824,38 @@ utils_default.forEach(knownAdapters, (fn, value) => {
|
|
|
4975
3824
|
Object.defineProperty(fn, "adapterName", { value });
|
|
4976
3825
|
}
|
|
4977
3826
|
});
|
|
4978
|
-
var renderReason = (reason) => `- ${reason}`;
|
|
4979
|
-
var isResolvedHandle = (adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false;
|
|
4980
|
-
function getAdapter(adapters, config) {
|
|
4981
|
-
adapters = utils_default.isArray(adapters) ? adapters : [adapters];
|
|
4982
|
-
const { length } = adapters;
|
|
4983
|
-
let nameOrAdapter;
|
|
4984
|
-
let adapter2;
|
|
4985
|
-
const rejectedReasons = {};
|
|
4986
|
-
for (let i = 0; i < length; i++) {
|
|
4987
|
-
nameOrAdapter = adapters[i];
|
|
4988
|
-
let id;
|
|
4989
|
-
adapter2 = nameOrAdapter;
|
|
4990
|
-
if (!isResolvedHandle(nameOrAdapter)) {
|
|
4991
|
-
adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
4992
|
-
if (adapter2 === void 0) {
|
|
4993
|
-
throw new AxiosError_default(`Unknown adapter '${id}'`);
|
|
4994
|
-
}
|
|
4995
|
-
}
|
|
4996
|
-
if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
|
|
4997
|
-
break;
|
|
4998
|
-
}
|
|
4999
|
-
rejectedReasons[id || "#" + i] = adapter2;
|
|
5000
|
-
}
|
|
5001
|
-
if (!adapter2) {
|
|
5002
|
-
const reasons = Object.entries(rejectedReasons).map(
|
|
5003
|
-
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
5004
|
-
);
|
|
5005
|
-
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
5006
|
-
throw new AxiosError_default(
|
|
5007
|
-
`There is no suitable adapter to dispatch the request ` + s,
|
|
5008
|
-
"ERR_NOT_SUPPORT"
|
|
5009
|
-
);
|
|
5010
|
-
}
|
|
5011
|
-
return adapter2;
|
|
5012
|
-
}
|
|
5013
3827
|
var adapters_default = {
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
3828
|
+
getAdapter: (adapters) => {
|
|
3829
|
+
adapters = utils_default.isArray(adapters) ? adapters : [adapters];
|
|
3830
|
+
const { length } = adapters;
|
|
3831
|
+
let nameOrAdapter;
|
|
3832
|
+
let adapter;
|
|
3833
|
+
for (let i = 0; i < length; i++) {
|
|
3834
|
+
nameOrAdapter = adapters[i];
|
|
3835
|
+
if (adapter = utils_default.isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter) {
|
|
3836
|
+
break;
|
|
3837
|
+
}
|
|
3838
|
+
}
|
|
3839
|
+
if (!adapter) {
|
|
3840
|
+
if (adapter === false) {
|
|
3841
|
+
throw new AxiosError_default(
|
|
3842
|
+
`Adapter ${nameOrAdapter} is not supported by the environment`,
|
|
3843
|
+
"ERR_NOT_SUPPORT"
|
|
3844
|
+
);
|
|
3845
|
+
}
|
|
3846
|
+
throw new Error(
|
|
3847
|
+
utils_default.hasOwnProp(knownAdapters, nameOrAdapter) ? `Adapter '${nameOrAdapter}' is not available in the build` : `Unknown adapter '${nameOrAdapter}'`
|
|
3848
|
+
);
|
|
3849
|
+
}
|
|
3850
|
+
if (!utils_default.isFunction(adapter)) {
|
|
3851
|
+
throw new TypeError("adapter is not a function");
|
|
3852
|
+
}
|
|
3853
|
+
return adapter;
|
|
3854
|
+
},
|
|
5023
3855
|
adapters: knownAdapters
|
|
5024
3856
|
};
|
|
5025
3857
|
|
|
5026
|
-
// node_modules/axios/lib/core/dispatchRequest.js
|
|
3858
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/dispatchRequest.js
|
|
5027
3859
|
function throwIfCancellationRequested(config) {
|
|
5028
3860
|
if (config.cancelToken) {
|
|
5029
3861
|
config.cancelToken.throwIfRequested();
|
|
@@ -5035,36 +3867,119 @@ function throwIfCancellationRequested(config) {
|
|
|
5035
3867
|
function dispatchRequest(config) {
|
|
5036
3868
|
throwIfCancellationRequested(config);
|
|
5037
3869
|
config.headers = AxiosHeaders_default.from(config.headers);
|
|
5038
|
-
config.data = transformData.call(
|
|
3870
|
+
config.data = transformData.call(
|
|
3871
|
+
config,
|
|
3872
|
+
config.transformRequest
|
|
3873
|
+
);
|
|
5039
3874
|
if (["post", "put", "patch"].indexOf(config.method) !== -1) {
|
|
5040
3875
|
config.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
5041
3876
|
}
|
|
5042
|
-
const
|
|
5043
|
-
return
|
|
5044
|
-
|
|
3877
|
+
const adapter = adapters_default.getAdapter(config.adapter || defaults_default.adapter);
|
|
3878
|
+
return adapter(config).then(function onAdapterResolution(response) {
|
|
3879
|
+
throwIfCancellationRequested(config);
|
|
3880
|
+
response.data = transformData.call(
|
|
3881
|
+
config,
|
|
3882
|
+
config.transformResponse,
|
|
3883
|
+
response
|
|
3884
|
+
);
|
|
3885
|
+
response.headers = AxiosHeaders_default.from(response.headers);
|
|
3886
|
+
return response;
|
|
3887
|
+
}, function onAdapterRejection(reason) {
|
|
3888
|
+
if (!isCancel(reason)) {
|
|
5045
3889
|
throwIfCancellationRequested(config);
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
if (reason && reason.response) {
|
|
5054
|
-
reason.response.data = transformData.call(
|
|
5055
|
-
config,
|
|
5056
|
-
config.transformResponse,
|
|
5057
|
-
reason.response
|
|
5058
|
-
);
|
|
5059
|
-
reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
|
|
5060
|
-
}
|
|
3890
|
+
if (reason && reason.response) {
|
|
3891
|
+
reason.response.data = transformData.call(
|
|
3892
|
+
config,
|
|
3893
|
+
config.transformResponse,
|
|
3894
|
+
reason.response
|
|
3895
|
+
);
|
|
3896
|
+
reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
|
|
5061
3897
|
}
|
|
5062
|
-
return Promise.reject(reason);
|
|
5063
3898
|
}
|
|
5064
|
-
|
|
3899
|
+
return Promise.reject(reason);
|
|
3900
|
+
});
|
|
3901
|
+
}
|
|
3902
|
+
|
|
3903
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/mergeConfig.js
|
|
3904
|
+
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? thing.toJSON() : thing;
|
|
3905
|
+
function mergeConfig(config1, config2) {
|
|
3906
|
+
config2 = config2 || {};
|
|
3907
|
+
const config = {};
|
|
3908
|
+
function getMergedValue(target, source, caseless) {
|
|
3909
|
+
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
|
|
3910
|
+
return utils_default.merge.call({ caseless }, target, source);
|
|
3911
|
+
} else if (utils_default.isPlainObject(source)) {
|
|
3912
|
+
return utils_default.merge({}, source);
|
|
3913
|
+
} else if (utils_default.isArray(source)) {
|
|
3914
|
+
return source.slice();
|
|
3915
|
+
}
|
|
3916
|
+
return source;
|
|
3917
|
+
}
|
|
3918
|
+
function mergeDeepProperties(a, b, caseless) {
|
|
3919
|
+
if (!utils_default.isUndefined(b)) {
|
|
3920
|
+
return getMergedValue(a, b, caseless);
|
|
3921
|
+
} else if (!utils_default.isUndefined(a)) {
|
|
3922
|
+
return getMergedValue(void 0, a, caseless);
|
|
3923
|
+
}
|
|
3924
|
+
}
|
|
3925
|
+
function valueFromConfig2(a, b) {
|
|
3926
|
+
if (!utils_default.isUndefined(b)) {
|
|
3927
|
+
return getMergedValue(void 0, b);
|
|
3928
|
+
}
|
|
3929
|
+
}
|
|
3930
|
+
function defaultToConfig2(a, b) {
|
|
3931
|
+
if (!utils_default.isUndefined(b)) {
|
|
3932
|
+
return getMergedValue(void 0, b);
|
|
3933
|
+
} else if (!utils_default.isUndefined(a)) {
|
|
3934
|
+
return getMergedValue(void 0, a);
|
|
3935
|
+
}
|
|
3936
|
+
}
|
|
3937
|
+
function mergeDirectKeys(a, b, prop) {
|
|
3938
|
+
if (prop in config2) {
|
|
3939
|
+
return getMergedValue(a, b);
|
|
3940
|
+
} else if (prop in config1) {
|
|
3941
|
+
return getMergedValue(void 0, a);
|
|
3942
|
+
}
|
|
3943
|
+
}
|
|
3944
|
+
const mergeMap = {
|
|
3945
|
+
url: valueFromConfig2,
|
|
3946
|
+
method: valueFromConfig2,
|
|
3947
|
+
data: valueFromConfig2,
|
|
3948
|
+
baseURL: defaultToConfig2,
|
|
3949
|
+
transformRequest: defaultToConfig2,
|
|
3950
|
+
transformResponse: defaultToConfig2,
|
|
3951
|
+
paramsSerializer: defaultToConfig2,
|
|
3952
|
+
timeout: defaultToConfig2,
|
|
3953
|
+
timeoutMessage: defaultToConfig2,
|
|
3954
|
+
withCredentials: defaultToConfig2,
|
|
3955
|
+
adapter: defaultToConfig2,
|
|
3956
|
+
responseType: defaultToConfig2,
|
|
3957
|
+
xsrfCookieName: defaultToConfig2,
|
|
3958
|
+
xsrfHeaderName: defaultToConfig2,
|
|
3959
|
+
onUploadProgress: defaultToConfig2,
|
|
3960
|
+
onDownloadProgress: defaultToConfig2,
|
|
3961
|
+
decompress: defaultToConfig2,
|
|
3962
|
+
maxContentLength: defaultToConfig2,
|
|
3963
|
+
maxBodyLength: defaultToConfig2,
|
|
3964
|
+
beforeRedirect: defaultToConfig2,
|
|
3965
|
+
transport: defaultToConfig2,
|
|
3966
|
+
httpAgent: defaultToConfig2,
|
|
3967
|
+
httpsAgent: defaultToConfig2,
|
|
3968
|
+
cancelToken: defaultToConfig2,
|
|
3969
|
+
socketPath: defaultToConfig2,
|
|
3970
|
+
responseEncoding: defaultToConfig2,
|
|
3971
|
+
validateStatus: mergeDirectKeys,
|
|
3972
|
+
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
3973
|
+
};
|
|
3974
|
+
utils_default.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
|
|
3975
|
+
const merge2 = mergeMap[prop] || mergeDeepProperties;
|
|
3976
|
+
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
3977
|
+
utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
3978
|
+
});
|
|
3979
|
+
return config;
|
|
5065
3980
|
}
|
|
5066
3981
|
|
|
5067
|
-
// node_modules/axios/lib/helpers/validator.js
|
|
3982
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/validator.js
|
|
5068
3983
|
var validators = {};
|
|
5069
3984
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
5070
3985
|
validators[type] = function validator(thing) {
|
|
@@ -5095,12 +4010,6 @@ validators.transitional = function transitional(validator, version2, message) {
|
|
|
5095
4010
|
return validator ? validator(value, opt, opts) : true;
|
|
5096
4011
|
};
|
|
5097
4012
|
};
|
|
5098
|
-
validators.spelling = function spelling(correctSpelling) {
|
|
5099
|
-
return (value, opt) => {
|
|
5100
|
-
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
5101
|
-
return true;
|
|
5102
|
-
};
|
|
5103
|
-
};
|
|
5104
4013
|
function assertOptions(options, schema, allowUnknown) {
|
|
5105
4014
|
if (typeof options !== "object") {
|
|
5106
4015
|
throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
|
|
@@ -5114,10 +4023,7 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
5114
4023
|
const value = options[opt];
|
|
5115
4024
|
const result = value === void 0 || validator(value, opt, options);
|
|
5116
4025
|
if (result !== true) {
|
|
5117
|
-
throw new AxiosError_default(
|
|
5118
|
-
"option " + opt + " must be " + result,
|
|
5119
|
-
AxiosError_default.ERR_BAD_OPTION_VALUE
|
|
5120
|
-
);
|
|
4026
|
+
throw new AxiosError_default("option " + opt + " must be " + result, AxiosError_default.ERR_BAD_OPTION_VALUE);
|
|
5121
4027
|
}
|
|
5122
4028
|
continue;
|
|
5123
4029
|
}
|
|
@@ -5131,11 +4037,11 @@ var validator_default = {
|
|
|
5131
4037
|
validators
|
|
5132
4038
|
};
|
|
5133
4039
|
|
|
5134
|
-
// node_modules/axios/lib/core/Axios.js
|
|
4040
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/Axios.js
|
|
5135
4041
|
var validators2 = validator_default.validators;
|
|
5136
4042
|
var Axios = class {
|
|
5137
4043
|
constructor(instanceConfig) {
|
|
5138
|
-
this.defaults = instanceConfig
|
|
4044
|
+
this.defaults = instanceConfig;
|
|
5139
4045
|
this.interceptors = {
|
|
5140
4046
|
request: new InterceptorManager_default(),
|
|
5141
4047
|
response: new InterceptorManager_default()
|
|
@@ -5149,27 +4055,7 @@ var Axios = class {
|
|
|
5149
4055
|
*
|
|
5150
4056
|
* @returns {Promise} The Promise to be fulfilled
|
|
5151
4057
|
*/
|
|
5152
|
-
|
|
5153
|
-
try {
|
|
5154
|
-
return await this._request(configOrUrl, config);
|
|
5155
|
-
} catch (err) {
|
|
5156
|
-
if (err instanceof Error) {
|
|
5157
|
-
let dummy = {};
|
|
5158
|
-
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
5159
|
-
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
|
|
5160
|
-
try {
|
|
5161
|
-
if (!err.stack) {
|
|
5162
|
-
err.stack = stack;
|
|
5163
|
-
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
|
|
5164
|
-
err.stack += "\n" + stack;
|
|
5165
|
-
}
|
|
5166
|
-
} catch (e) {
|
|
5167
|
-
}
|
|
5168
|
-
}
|
|
5169
|
-
throw err;
|
|
5170
|
-
}
|
|
5171
|
-
}
|
|
5172
|
-
_request(configOrUrl, config) {
|
|
4058
|
+
request(configOrUrl, config) {
|
|
5173
4059
|
if (typeof configOrUrl === "string") {
|
|
5174
4060
|
config = config || {};
|
|
5175
4061
|
config.url = configOrUrl;
|
|
@@ -5179,52 +4065,30 @@ var Axios = class {
|
|
|
5179
4065
|
config = mergeConfig(this.defaults, config);
|
|
5180
4066
|
const { transitional: transitional2, paramsSerializer, headers } = config;
|
|
5181
4067
|
if (transitional2 !== void 0) {
|
|
5182
|
-
validator_default.assertOptions(
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
4068
|
+
validator_default.assertOptions(transitional2, {
|
|
4069
|
+
silentJSONParsing: validators2.transitional(validators2.boolean),
|
|
4070
|
+
forcedJSONParsing: validators2.transitional(validators2.boolean),
|
|
4071
|
+
clarifyTimeoutError: validators2.transitional(validators2.boolean)
|
|
4072
|
+
}, false);
|
|
4073
|
+
}
|
|
4074
|
+
if (paramsSerializer !== void 0) {
|
|
4075
|
+
validator_default.assertOptions(paramsSerializer, {
|
|
4076
|
+
encode: validators2.function,
|
|
4077
|
+
serialize: validators2.function
|
|
4078
|
+
}, true);
|
|
5192
4079
|
}
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
serialize: validators2.function
|
|
5204
|
-
},
|
|
5205
|
-
true
|
|
5206
|
-
);
|
|
4080
|
+
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
4081
|
+
let contextHeaders;
|
|
4082
|
+
contextHeaders = headers && utils_default.merge(
|
|
4083
|
+
headers.common,
|
|
4084
|
+
headers[config.method]
|
|
4085
|
+
);
|
|
4086
|
+
contextHeaders && utils_default.forEach(
|
|
4087
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
4088
|
+
(method) => {
|
|
4089
|
+
delete headers[method];
|
|
5207
4090
|
}
|
|
5208
|
-
}
|
|
5209
|
-
if (config.allowAbsoluteUrls !== void 0) {
|
|
5210
|
-
} else if (this.defaults.allowAbsoluteUrls !== void 0) {
|
|
5211
|
-
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
5212
|
-
} else {
|
|
5213
|
-
config.allowAbsoluteUrls = true;
|
|
5214
|
-
}
|
|
5215
|
-
validator_default.assertOptions(
|
|
5216
|
-
config,
|
|
5217
|
-
{
|
|
5218
|
-
baseUrl: validators2.spelling("baseURL"),
|
|
5219
|
-
withXsrfToken: validators2.spelling("withXSRFToken")
|
|
5220
|
-
},
|
|
5221
|
-
true
|
|
5222
4091
|
);
|
|
5223
|
-
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
5224
|
-
let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
|
|
5225
|
-
headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
|
|
5226
|
-
delete headers[method];
|
|
5227
|
-
});
|
|
5228
4092
|
config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
|
|
5229
4093
|
const requestInterceptorChain = [];
|
|
5230
4094
|
let synchronousRequestInterceptors = true;
|
|
@@ -5233,13 +4097,7 @@ var Axios = class {
|
|
|
5233
4097
|
return;
|
|
5234
4098
|
}
|
|
5235
4099
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
5236
|
-
|
|
5237
|
-
const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering;
|
|
5238
|
-
if (legacyInterceptorReqResOrdering) {
|
|
5239
|
-
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
5240
|
-
} else {
|
|
5241
|
-
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
5242
|
-
}
|
|
4100
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
5243
4101
|
});
|
|
5244
4102
|
const responseInterceptorChain = [];
|
|
5245
4103
|
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
@@ -5250,8 +4108,8 @@ var Axios = class {
|
|
|
5250
4108
|
let len;
|
|
5251
4109
|
if (!synchronousRequestInterceptors) {
|
|
5252
4110
|
const chain = [dispatchRequest.bind(this), void 0];
|
|
5253
|
-
chain.unshift(
|
|
5254
|
-
chain.push(
|
|
4111
|
+
chain.unshift.apply(chain, requestInterceptorChain);
|
|
4112
|
+
chain.push.apply(chain, responseInterceptorChain);
|
|
5255
4113
|
len = chain.length;
|
|
5256
4114
|
promise = Promise.resolve(config);
|
|
5257
4115
|
while (i < len) {
|
|
@@ -5261,6 +4119,7 @@ var Axios = class {
|
|
|
5261
4119
|
}
|
|
5262
4120
|
len = requestInterceptorChain.length;
|
|
5263
4121
|
let newConfig = config;
|
|
4122
|
+
i = 0;
|
|
5264
4123
|
while (i < len) {
|
|
5265
4124
|
const onFulfilled = requestInterceptorChain[i++];
|
|
5266
4125
|
const onRejected = requestInterceptorChain[i++];
|
|
@@ -5285,34 +4144,30 @@ var Axios = class {
|
|
|
5285
4144
|
}
|
|
5286
4145
|
getUri(config) {
|
|
5287
4146
|
config = mergeConfig(this.defaults, config);
|
|
5288
|
-
const fullPath = buildFullPath(config.baseURL, config.url
|
|
4147
|
+
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
5289
4148
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
5290
4149
|
}
|
|
5291
4150
|
};
|
|
5292
|
-
utils_default.forEach(["delete", "get", "head", "options"], function
|
|
4151
|
+
utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData2(method) {
|
|
5293
4152
|
Axios.prototype[method] = function(url2, config) {
|
|
5294
|
-
return this.request(
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
})
|
|
5300
|
-
);
|
|
4153
|
+
return this.request(mergeConfig(config || {}, {
|
|
4154
|
+
method,
|
|
4155
|
+
url: url2,
|
|
4156
|
+
data: (config || {}).data
|
|
4157
|
+
}));
|
|
5301
4158
|
};
|
|
5302
4159
|
});
|
|
5303
|
-
utils_default.forEach(["post", "put", "patch"], function
|
|
4160
|
+
utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData2(method) {
|
|
5304
4161
|
function generateHTTPMethod(isForm) {
|
|
5305
4162
|
return function httpMethod(url2, data, config) {
|
|
5306
|
-
return this.request(
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
})
|
|
5315
|
-
);
|
|
4163
|
+
return this.request(mergeConfig(config || {}, {
|
|
4164
|
+
method,
|
|
4165
|
+
headers: isForm ? {
|
|
4166
|
+
"Content-Type": "multipart/form-data"
|
|
4167
|
+
} : {},
|
|
4168
|
+
url: url2,
|
|
4169
|
+
data
|
|
4170
|
+
}));
|
|
5316
4171
|
};
|
|
5317
4172
|
}
|
|
5318
4173
|
Axios.prototype[method] = generateHTTPMethod();
|
|
@@ -5320,7 +4175,7 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(m
|
|
|
5320
4175
|
});
|
|
5321
4176
|
var Axios_default = Axios;
|
|
5322
4177
|
|
|
5323
|
-
// node_modules/axios/lib/cancel/CancelToken.js
|
|
4178
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/cancel/CancelToken.js
|
|
5324
4179
|
var CancelToken = class _CancelToken {
|
|
5325
4180
|
constructor(executor) {
|
|
5326
4181
|
if (typeof executor !== "function") {
|
|
@@ -5392,15 +4247,6 @@ var CancelToken = class _CancelToken {
|
|
|
5392
4247
|
this._listeners.splice(index, 1);
|
|
5393
4248
|
}
|
|
5394
4249
|
}
|
|
5395
|
-
toAbortSignal() {
|
|
5396
|
-
const controller = new AbortController();
|
|
5397
|
-
const abort = (err) => {
|
|
5398
|
-
controller.abort(err);
|
|
5399
|
-
};
|
|
5400
|
-
this.subscribe(abort);
|
|
5401
|
-
controller.signal.unsubscribe = () => this.unsubscribe(abort);
|
|
5402
|
-
return controller.signal;
|
|
5403
|
-
}
|
|
5404
4250
|
/**
|
|
5405
4251
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
5406
4252
|
* cancels the `CancelToken`.
|
|
@@ -5418,19 +4264,19 @@ var CancelToken = class _CancelToken {
|
|
|
5418
4264
|
};
|
|
5419
4265
|
var CancelToken_default = CancelToken;
|
|
5420
4266
|
|
|
5421
|
-
// node_modules/axios/lib/helpers/spread.js
|
|
4267
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/spread.js
|
|
5422
4268
|
function spread(callback) {
|
|
5423
4269
|
return function wrap(arr) {
|
|
5424
4270
|
return callback.apply(null, arr);
|
|
5425
4271
|
};
|
|
5426
4272
|
}
|
|
5427
4273
|
|
|
5428
|
-
// node_modules/axios/lib/helpers/isAxiosError.js
|
|
4274
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/isAxiosError.js
|
|
5429
4275
|
function isAxiosError(payload) {
|
|
5430
4276
|
return utils_default.isObject(payload) && payload.isAxiosError === true;
|
|
5431
4277
|
}
|
|
5432
4278
|
|
|
5433
|
-
// node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
4279
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
5434
4280
|
var HttpStatusCode = {
|
|
5435
4281
|
Continue: 100,
|
|
5436
4282
|
SwitchingProtocols: 101,
|
|
@@ -5494,20 +4340,14 @@ var HttpStatusCode = {
|
|
|
5494
4340
|
InsufficientStorage: 507,
|
|
5495
4341
|
LoopDetected: 508,
|
|
5496
4342
|
NotExtended: 510,
|
|
5497
|
-
NetworkAuthenticationRequired: 511
|
|
5498
|
-
WebServerIsDown: 521,
|
|
5499
|
-
ConnectionTimedOut: 522,
|
|
5500
|
-
OriginIsUnreachable: 523,
|
|
5501
|
-
TimeoutOccurred: 524,
|
|
5502
|
-
SslHandshakeFailed: 525,
|
|
5503
|
-
InvalidSslCertificate: 526
|
|
4343
|
+
NetworkAuthenticationRequired: 511
|
|
5504
4344
|
};
|
|
5505
4345
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
5506
4346
|
HttpStatusCode[value] = key;
|
|
5507
4347
|
});
|
|
5508
4348
|
var HttpStatusCode_default = HttpStatusCode;
|
|
5509
4349
|
|
|
5510
|
-
// node_modules/axios/lib/axios.js
|
|
4350
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/axios.js
|
|
5511
4351
|
function createInstance(defaultConfig) {
|
|
5512
4352
|
const context = new Axios_default(defaultConfig);
|
|
5513
4353
|
const instance = bind(Axios_default.prototype.request, context);
|
|
@@ -5535,12 +4375,11 @@ axios.isAxiosError = isAxiosError;
|
|
|
5535
4375
|
axios.mergeConfig = mergeConfig;
|
|
5536
4376
|
axios.AxiosHeaders = AxiosHeaders_default;
|
|
5537
4377
|
axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
5538
|
-
axios.getAdapter = adapters_default.getAdapter;
|
|
5539
4378
|
axios.HttpStatusCode = HttpStatusCode_default;
|
|
5540
4379
|
axios.default = axios;
|
|
5541
4380
|
var axios_default = axios;
|
|
5542
4381
|
|
|
5543
|
-
// node_modules/axios/index.js
|
|
4382
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/index.js
|
|
5544
4383
|
var {
|
|
5545
4384
|
Axios: Axios2,
|
|
5546
4385
|
AxiosError: AxiosError2,
|
|
@@ -5556,7 +4395,6 @@ var {
|
|
|
5556
4395
|
AxiosHeaders: AxiosHeaders2,
|
|
5557
4396
|
HttpStatusCode: HttpStatusCode2,
|
|
5558
4397
|
formToJSON,
|
|
5559
|
-
getAdapter: getAdapter2,
|
|
5560
4398
|
mergeConfig: mergeConfig2
|
|
5561
4399
|
} = axios_default;
|
|
5562
4400
|
|
|
@@ -5565,7 +4403,7 @@ var import_fs_extra5 = __toESM(require("fs-extra"));
|
|
|
5565
4403
|
var import_path6 = __toESM(require("path"));
|
|
5566
4404
|
var import_form_data2 = __toESM(require("form-data"));
|
|
5567
4405
|
var import_ora = __toESM(require("ora"));
|
|
5568
|
-
var
|
|
4406
|
+
var crypto2 = __toESM(require("crypto"));
|
|
5569
4407
|
|
|
5570
4408
|
// bin/utils/uploadLimits.ts
|
|
5571
4409
|
var import_fs = __toESM(require("fs"));
|
|
@@ -5747,8 +4585,8 @@ function getUid() {
|
|
|
5747
4585
|
}
|
|
5748
4586
|
|
|
5749
4587
|
// bin/utils/webLogin.ts
|
|
5750
|
-
var
|
|
5751
|
-
var
|
|
4588
|
+
var import_crypto = __toESM(require("crypto"));
|
|
4589
|
+
var import_http3 = __toESM(require("http"));
|
|
5752
4590
|
var import_url2 = require("url");
|
|
5753
4591
|
var import_chalk3 = __toESM(require("chalk"));
|
|
5754
4592
|
var import_child_process = require("child_process");
|
|
@@ -5820,11 +4658,11 @@ Login failed: ${error.message}`));
|
|
|
5820
4658
|
}
|
|
5821
4659
|
}
|
|
5822
4660
|
generateLoginToken() {
|
|
5823
|
-
return
|
|
4661
|
+
return import_crypto.default.randomBytes(32).toString("hex");
|
|
5824
4662
|
}
|
|
5825
4663
|
async startCallbackServer() {
|
|
5826
4664
|
return new Promise((resolve, reject) => {
|
|
5827
|
-
this.server =
|
|
4665
|
+
this.server = import_http3.default.createServer(async (req, res) => {
|
|
5828
4666
|
try {
|
|
5829
4667
|
const url2 = new import_url2.URL(req.url || "", `http://localhost:${this.config.callbackPort}`);
|
|
5830
4668
|
if (url2.pathname === this.config.callbackPath) {
|
|
@@ -6353,7 +5191,7 @@ var StepProgressBar = class {
|
|
|
6353
5191
|
};
|
|
6354
5192
|
async function calculateMD5(filePath) {
|
|
6355
5193
|
return new Promise((resolve, reject) => {
|
|
6356
|
-
const hash =
|
|
5194
|
+
const hash = crypto2.createHash("md5");
|
|
6357
5195
|
const stream4 = import_fs_extra5.default.createReadStream(filePath);
|
|
6358
5196
|
stream4.on("data", hash.update.bind(hash));
|
|
6359
5197
|
stream4.on("end", () => resolve(hash.digest("hex")));
|
|
@@ -8499,8 +7337,43 @@ Error: ${cliError.message}`));
|
|
|
8499
7337
|
// bin/create.ts
|
|
8500
7338
|
var PROJECT_DIR = process.cwd();
|
|
8501
7339
|
var API_BASE = "https://pinme.benny1996.win/api/v4";
|
|
7340
|
+
var TEMPLATE_BRANCH = "feat/auth";
|
|
8502
7341
|
var TEMPLATE_REPO = "glitternetwork/pinme-worker-template";
|
|
8503
|
-
var
|
|
7342
|
+
var TEMPLATE_REPO_NAME = TEMPLATE_REPO.split("/").pop() || "pinme-worker-template";
|
|
7343
|
+
function getTemplateZipUrl(branch) {
|
|
7344
|
+
return `https://github.com/${TEMPLATE_REPO}/archive/refs/heads/${encodeURIComponent(branch)}.zip`;
|
|
7345
|
+
}
|
|
7346
|
+
function buildPublicClientConfigExport(publicClientConfig) {
|
|
7347
|
+
return `export const public_client_config = ${JSON.stringify(publicClientConfig, null, 2)};
|
|
7348
|
+
`;
|
|
7349
|
+
}
|
|
7350
|
+
function injectPublicClientConfigIntoFile(fileContent, publicClientConfig) {
|
|
7351
|
+
const configExport = buildPublicClientConfigExport(publicClientConfig).trimEnd();
|
|
7352
|
+
const configPattern = /export\s+const\s+public_client_config\s*=\s*\{[\s\S]*?\};?/m;
|
|
7353
|
+
if (configPattern.test(fileContent)) {
|
|
7354
|
+
return fileContent.replace(configPattern, configExport);
|
|
7355
|
+
}
|
|
7356
|
+
const trimmed = fileContent.trimEnd();
|
|
7357
|
+
if (!trimmed) {
|
|
7358
|
+
return `${configExport}
|
|
7359
|
+
`;
|
|
7360
|
+
}
|
|
7361
|
+
return `${trimmed}
|
|
7362
|
+
|
|
7363
|
+
${configExport}
|
|
7364
|
+
`;
|
|
7365
|
+
}
|
|
7366
|
+
function resolveExtractedTemplateDir(extractDir) {
|
|
7367
|
+
const entries = import_fs_extra7.default.readdirSync(extractDir, { withFileTypes: true });
|
|
7368
|
+
const templateDir = entries.find((entry) => entry.isDirectory() && entry.name.startsWith(`${TEMPLATE_REPO_NAME}-`));
|
|
7369
|
+
if (!templateDir) {
|
|
7370
|
+
throw createConfigError("Downloaded template archive structure is invalid.", [
|
|
7371
|
+
`Expected a directory starting with \`${TEMPLATE_REPO_NAME}-\` inside the extracted archive.`,
|
|
7372
|
+
`Template branch: ${TEMPLATE_BRANCH}`
|
|
7373
|
+
]);
|
|
7374
|
+
}
|
|
7375
|
+
return import_path12.default.join(extractDir, templateDir.name);
|
|
7376
|
+
}
|
|
8504
7377
|
async function createCmd(options) {
|
|
8505
7378
|
var _a, _b;
|
|
8506
7379
|
try {
|
|
@@ -8581,11 +7454,14 @@ Directory "${projectName}" already exists.`));
|
|
|
8581
7454
|
}
|
|
8582
7455
|
console.log(import_chalk18.default.blue("\n2. Downloading template from repository..."));
|
|
8583
7456
|
const zipPath = import_path12.default.join(PROJECT_DIR, "template.zip");
|
|
7457
|
+
const extractDir = import_path12.default.join(PROJECT_DIR, `.pinme-template-${Date.now()}`);
|
|
7458
|
+
const templateZipUrl = getTemplateZipUrl(TEMPLATE_BRANCH);
|
|
8584
7459
|
let downloadSuccess = false;
|
|
7460
|
+
console.log(import_chalk18.default.gray(` Template branch: ${TEMPLATE_BRANCH}`));
|
|
8585
7461
|
for (let attempt = 1; attempt <= 3 && !downloadSuccess; attempt++) {
|
|
8586
7462
|
try {
|
|
8587
7463
|
console.log(import_chalk18.default.gray(` Download attempt ${attempt}/3...`));
|
|
8588
|
-
(0, import_child_process3.execSync)(`curl -L --retry 3 --retry-delay 2 -o "${zipPath}" "${
|
|
7464
|
+
(0, import_child_process3.execSync)(`curl -L --retry 3 --retry-delay 2 -o "${zipPath}" "${templateZipUrl}"`, {
|
|
8589
7465
|
stdio: "inherit"
|
|
8590
7466
|
});
|
|
8591
7467
|
if (!import_fs_extra7.default.existsSync(zipPath) || import_fs_extra7.default.statSync(zipPath).size < 100) {
|
|
@@ -8603,15 +7479,14 @@ Directory "${projectName}" already exists.`));
|
|
|
8603
7479
|
}
|
|
8604
7480
|
}
|
|
8605
7481
|
try {
|
|
8606
|
-
(
|
|
7482
|
+
import_fs_extra7.default.ensureDirSync(extractDir);
|
|
7483
|
+
(0, import_child_process3.execSync)(`unzip -o "${zipPath}" -d "${extractDir}"`, {
|
|
8607
7484
|
stdio: "inherit"
|
|
8608
7485
|
});
|
|
8609
|
-
const subDir =
|
|
8610
|
-
|
|
8611
|
-
import_fs_extra7.default.copySync(subDir, targetDir);
|
|
8612
|
-
import_fs_extra7.default.removeSync(subDir);
|
|
8613
|
-
}
|
|
7486
|
+
const subDir = resolveExtractedTemplateDir(extractDir);
|
|
7487
|
+
import_fs_extra7.default.copySync(subDir, targetDir);
|
|
8614
7488
|
import_fs_extra7.default.removeSync(zipPath);
|
|
7489
|
+
import_fs_extra7.default.removeSync(extractDir);
|
|
8615
7490
|
const nodeModulesPath = import_path12.default.join(targetDir, "node_modules");
|
|
8616
7491
|
const packageLockPath = import_path12.default.join(targetDir, "package-lock.json");
|
|
8617
7492
|
if (import_fs_extra7.default.existsSync(nodeModulesPath)) {
|
|
@@ -8665,6 +7540,16 @@ Directory "${projectName}" already exists.`));
|
|
|
8665
7540
|
import_fs_extra7.default.writeFileSync(wranglerPath, wranglerContent);
|
|
8666
7541
|
console.log(import_chalk18.default.green(` Updated backend/wrangler.toml API_KEY`));
|
|
8667
7542
|
}
|
|
7543
|
+
const frontendConfigPath = import_path12.default.join(targetDir, "frontend", "src", "utils", "config.ts");
|
|
7544
|
+
if (workerData.public_client_config) {
|
|
7545
|
+
const frontendConfigContent = import_fs_extra7.default.existsSync(frontendConfigPath) ? import_fs_extra7.default.readFileSync(frontendConfigPath, "utf-8") : "";
|
|
7546
|
+
import_fs_extra7.default.ensureDirSync(import_path12.default.dirname(frontendConfigPath));
|
|
7547
|
+
import_fs_extra7.default.writeFileSync(
|
|
7548
|
+
frontendConfigPath,
|
|
7549
|
+
injectPublicClientConfigIntoFile(frontendConfigContent, workerData.public_client_config)
|
|
7550
|
+
);
|
|
7551
|
+
console.log(import_chalk18.default.green(` Updated frontend/src/utils/config.ts public_client_config`));
|
|
7552
|
+
}
|
|
8668
7553
|
const envExamplePath = import_path12.default.join(targetDir, "frontend", ".env.example");
|
|
8669
7554
|
const envPath = import_path12.default.join(targetDir, "frontend", ".env");
|
|
8670
7555
|
if (import_fs_extra7.default.existsSync(envExamplePath)) {
|