dowwntime 1.5.0 → 1.5.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/cli.mjs +1566 -1042
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1576 -1052
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -4
package/dist/index.mjs
CHANGED
|
@@ -120,7 +120,7 @@ function basename(path2, ext) {
|
|
|
120
120
|
function extname$1(path2) {
|
|
121
121
|
return splitPath(path2)[3];
|
|
122
122
|
}
|
|
123
|
-
const path$
|
|
123
|
+
const path$2 = {
|
|
124
124
|
extname: extname$1,
|
|
125
125
|
basename,
|
|
126
126
|
dirname,
|
|
@@ -205,8 +205,8 @@ function unescapeJsonPointer$1(uri) {
|
|
|
205
205
|
|
|
206
206
|
//#endregion
|
|
207
207
|
//#region node_modules/@scalar/json-magic/dist/helpers/get-segments-from-path.js
|
|
208
|
-
function getSegmentsFromPath$1(path$
|
|
209
|
-
return path$
|
|
208
|
+
function getSegmentsFromPath$1(path$3) {
|
|
209
|
+
return path$3.split("/").slice(1).map(unescapeJsonPointer$1);
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
//#endregion
|
|
@@ -3469,10 +3469,10 @@ function resolveReferencePath(base, relativePath) {
|
|
|
3469
3469
|
url$2.pathname = relativePath;
|
|
3470
3470
|
return url$2.toString();
|
|
3471
3471
|
}
|
|
3472
|
-
const mergedPath = path$
|
|
3472
|
+
const mergedPath = path$2.join(path$2.dirname(url$2.pathname), relativePath);
|
|
3473
3473
|
return new URL(mergedPath, base).toString();
|
|
3474
3474
|
}
|
|
3475
|
-
return path$
|
|
3475
|
+
return path$2.join(path$2.dirname(base), relativePath);
|
|
3476
3476
|
}
|
|
3477
3477
|
function prefixInternalRef(input, prefix) {
|
|
3478
3478
|
if (!isLocalRef(input)) throw "Please provide an internal ref";
|
|
@@ -3738,17 +3738,17 @@ var require_visit = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/visit.j
|
|
|
3738
3738
|
visit$5.SKIP = SKIP$1;
|
|
3739
3739
|
/** Remove the current node */
|
|
3740
3740
|
visit$5.REMOVE = REMOVE$1;
|
|
3741
|
-
function visit_(key, node, visitor, path$
|
|
3742
|
-
const ctrl = callVisitor(key, node, visitor, path$
|
|
3741
|
+
function visit_(key, node, visitor, path$3) {
|
|
3742
|
+
const ctrl = callVisitor(key, node, visitor, path$3);
|
|
3743
3743
|
if (identity$32.isNode(ctrl) || identity$32.isPair(ctrl)) {
|
|
3744
|
-
replaceNode(key, path$
|
|
3745
|
-
return visit_(key, ctrl, visitor, path$
|
|
3744
|
+
replaceNode(key, path$3, ctrl);
|
|
3745
|
+
return visit_(key, ctrl, visitor, path$3);
|
|
3746
3746
|
}
|
|
3747
3747
|
if (typeof ctrl !== "symbol") {
|
|
3748
3748
|
if (identity$32.isCollection(node)) {
|
|
3749
|
-
path$
|
|
3749
|
+
path$3 = Object.freeze(path$3.concat(node));
|
|
3750
3750
|
for (let i = 0; i < node.items.length; ++i) {
|
|
3751
|
-
const ci = visit_(i, node.items[i], visitor, path$
|
|
3751
|
+
const ci = visit_(i, node.items[i], visitor, path$3);
|
|
3752
3752
|
if (typeof ci === "number") i = ci - 1;
|
|
3753
3753
|
else if (ci === BREAK$1) return BREAK$1;
|
|
3754
3754
|
else if (ci === REMOVE$1) {
|
|
@@ -3757,11 +3757,11 @@ var require_visit = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/visit.j
|
|
|
3757
3757
|
}
|
|
3758
3758
|
}
|
|
3759
3759
|
} else if (identity$32.isPair(node)) {
|
|
3760
|
-
path$
|
|
3761
|
-
const ck = visit_("key", node.key, visitor, path$
|
|
3760
|
+
path$3 = Object.freeze(path$3.concat(node));
|
|
3761
|
+
const ck = visit_("key", node.key, visitor, path$3);
|
|
3762
3762
|
if (ck === BREAK$1) return BREAK$1;
|
|
3763
3763
|
else if (ck === REMOVE$1) node.key = null;
|
|
3764
|
-
const cv = visit_("value", node.value, visitor, path$
|
|
3764
|
+
const cv = visit_("value", node.value, visitor, path$3);
|
|
3765
3765
|
if (cv === BREAK$1) return BREAK$1;
|
|
3766
3766
|
else if (cv === REMOVE$1) node.value = null;
|
|
3767
3767
|
}
|
|
@@ -3811,17 +3811,17 @@ var require_visit = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/visit.j
|
|
|
3811
3811
|
visitAsync.SKIP = SKIP$1;
|
|
3812
3812
|
/** Remove the current node */
|
|
3813
3813
|
visitAsync.REMOVE = REMOVE$1;
|
|
3814
|
-
async function visitAsync_(key, node, visitor, path$
|
|
3815
|
-
const ctrl = await callVisitor(key, node, visitor, path$
|
|
3814
|
+
async function visitAsync_(key, node, visitor, path$3) {
|
|
3815
|
+
const ctrl = await callVisitor(key, node, visitor, path$3);
|
|
3816
3816
|
if (identity$32.isNode(ctrl) || identity$32.isPair(ctrl)) {
|
|
3817
|
-
replaceNode(key, path$
|
|
3818
|
-
return visitAsync_(key, ctrl, visitor, path$
|
|
3817
|
+
replaceNode(key, path$3, ctrl);
|
|
3818
|
+
return visitAsync_(key, ctrl, visitor, path$3);
|
|
3819
3819
|
}
|
|
3820
3820
|
if (typeof ctrl !== "symbol") {
|
|
3821
3821
|
if (identity$32.isCollection(node)) {
|
|
3822
|
-
path$
|
|
3822
|
+
path$3 = Object.freeze(path$3.concat(node));
|
|
3823
3823
|
for (let i = 0; i < node.items.length; ++i) {
|
|
3824
|
-
const ci = await visitAsync_(i, node.items[i], visitor, path$
|
|
3824
|
+
const ci = await visitAsync_(i, node.items[i], visitor, path$3);
|
|
3825
3825
|
if (typeof ci === "number") i = ci - 1;
|
|
3826
3826
|
else if (ci === BREAK$1) return BREAK$1;
|
|
3827
3827
|
else if (ci === REMOVE$1) {
|
|
@@ -3830,11 +3830,11 @@ var require_visit = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/visit.j
|
|
|
3830
3830
|
}
|
|
3831
3831
|
}
|
|
3832
3832
|
} else if (identity$32.isPair(node)) {
|
|
3833
|
-
path$
|
|
3834
|
-
const ck = await visitAsync_("key", node.key, visitor, path$
|
|
3833
|
+
path$3 = Object.freeze(path$3.concat(node));
|
|
3834
|
+
const ck = await visitAsync_("key", node.key, visitor, path$3);
|
|
3835
3835
|
if (ck === BREAK$1) return BREAK$1;
|
|
3836
3836
|
else if (ck === REMOVE$1) node.key = null;
|
|
3837
|
-
const cv = await visitAsync_("value", node.value, visitor, path$
|
|
3837
|
+
const cv = await visitAsync_("value", node.value, visitor, path$3);
|
|
3838
3838
|
if (cv === BREAK$1) return BREAK$1;
|
|
3839
3839
|
else if (cv === REMOVE$1) node.value = null;
|
|
3840
3840
|
}
|
|
@@ -3857,16 +3857,16 @@ var require_visit = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/visit.j
|
|
|
3857
3857
|
}, visitor);
|
|
3858
3858
|
return visitor;
|
|
3859
3859
|
}
|
|
3860
|
-
function callVisitor(key, node, visitor, path$
|
|
3861
|
-
if (typeof visitor === "function") return visitor(key, node, path$
|
|
3862
|
-
if (identity$32.isMap(node)) return visitor.Map?.(key, node, path$
|
|
3863
|
-
if (identity$32.isSeq(node)) return visitor.Seq?.(key, node, path$
|
|
3864
|
-
if (identity$32.isPair(node)) return visitor.Pair?.(key, node, path$
|
|
3865
|
-
if (identity$32.isScalar(node)) return visitor.Scalar?.(key, node, path$
|
|
3866
|
-
if (identity$32.isAlias(node)) return visitor.Alias?.(key, node, path$
|
|
3860
|
+
function callVisitor(key, node, visitor, path$3) {
|
|
3861
|
+
if (typeof visitor === "function") return visitor(key, node, path$3);
|
|
3862
|
+
if (identity$32.isMap(node)) return visitor.Map?.(key, node, path$3);
|
|
3863
|
+
if (identity$32.isSeq(node)) return visitor.Seq?.(key, node, path$3);
|
|
3864
|
+
if (identity$32.isPair(node)) return visitor.Pair?.(key, node, path$3);
|
|
3865
|
+
if (identity$32.isScalar(node)) return visitor.Scalar?.(key, node, path$3);
|
|
3866
|
+
if (identity$32.isAlias(node)) return visitor.Alias?.(key, node, path$3);
|
|
3867
3867
|
}
|
|
3868
|
-
function replaceNode(key, path$
|
|
3869
|
-
const parent = path$
|
|
3868
|
+
function replaceNode(key, path$3, node) {
|
|
3869
|
+
const parent = path$3[path$3.length - 1];
|
|
3870
3870
|
if (identity$32.isCollection(parent)) parent.items[key] = node;
|
|
3871
3871
|
else if (identity$32.isPair(parent)) if (key === "key") parent.key = node;
|
|
3872
3872
|
else parent.value = node;
|
|
@@ -4415,10 +4415,10 @@ var require_Collection = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/no
|
|
|
4415
4415
|
var createNode$3 = require_createNode();
|
|
4416
4416
|
var identity$24 = require_identity();
|
|
4417
4417
|
var Node = require_Node();
|
|
4418
|
-
function collectionFromPath(schema$6, path$
|
|
4418
|
+
function collectionFromPath(schema$6, path$3, value) {
|
|
4419
4419
|
let v = value;
|
|
4420
|
-
for (let i = path$
|
|
4421
|
-
const k = path$
|
|
4420
|
+
for (let i = path$3.length - 1; i >= 0; --i) {
|
|
4421
|
+
const k = path$3[i];
|
|
4422
4422
|
if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
|
|
4423
4423
|
const a = [];
|
|
4424
4424
|
a[k] = v;
|
|
@@ -4435,7 +4435,7 @@ var require_Collection = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/no
|
|
|
4435
4435
|
sourceObjects: /* @__PURE__ */ new Map()
|
|
4436
4436
|
});
|
|
4437
4437
|
}
|
|
4438
|
-
const isEmptyPath = (path$
|
|
4438
|
+
const isEmptyPath = (path$3) => path$3 == null || typeof path$3 === "object" && !!path$3[Symbol.iterator]().next().done;
|
|
4439
4439
|
var Collection$3 = class extends Node.NodeBase {
|
|
4440
4440
|
constructor(type, schema$6) {
|
|
4441
4441
|
super(type);
|
|
@@ -4463,10 +4463,10 @@ var require_Collection = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/no
|
|
|
4463
4463
|
* be a Pair instance or a `{ key, value }` object, which may not have a key
|
|
4464
4464
|
* that already exists in the map.
|
|
4465
4465
|
*/
|
|
4466
|
-
addIn(path$
|
|
4467
|
-
if (isEmptyPath(path$
|
|
4466
|
+
addIn(path$3, value) {
|
|
4467
|
+
if (isEmptyPath(path$3)) this.add(value);
|
|
4468
4468
|
else {
|
|
4469
|
-
const [key, ...rest] = path$
|
|
4469
|
+
const [key, ...rest] = path$3;
|
|
4470
4470
|
const node = this.get(key, true);
|
|
4471
4471
|
if (identity$24.isCollection(node)) node.addIn(rest, value);
|
|
4472
4472
|
else if (node === void 0 && this.schema) this.set(key, collectionFromPath(this.schema, rest, value));
|
|
@@ -4477,8 +4477,8 @@ var require_Collection = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/no
|
|
|
4477
4477
|
* Removes a value from the collection.
|
|
4478
4478
|
* @returns `true` if the item was found and removed.
|
|
4479
4479
|
*/
|
|
4480
|
-
deleteIn(path$
|
|
4481
|
-
const [key, ...rest] = path$
|
|
4480
|
+
deleteIn(path$3) {
|
|
4481
|
+
const [key, ...rest] = path$3;
|
|
4482
4482
|
if (rest.length === 0) return this.delete(key);
|
|
4483
4483
|
const node = this.get(key, true);
|
|
4484
4484
|
if (identity$24.isCollection(node)) return node.deleteIn(rest);
|
|
@@ -4489,8 +4489,8 @@ var require_Collection = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/no
|
|
|
4489
4489
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
4490
4490
|
* `true` (collections are always returned intact).
|
|
4491
4491
|
*/
|
|
4492
|
-
getIn(path$
|
|
4493
|
-
const [key, ...rest] = path$
|
|
4492
|
+
getIn(path$3, keepScalar) {
|
|
4493
|
+
const [key, ...rest] = path$3;
|
|
4494
4494
|
const node = this.get(key, true);
|
|
4495
4495
|
if (rest.length === 0) return !keepScalar && identity$24.isScalar(node) ? node.value : node;
|
|
4496
4496
|
else return identity$24.isCollection(node) ? node.getIn(rest, keepScalar) : void 0;
|
|
@@ -4505,8 +4505,8 @@ var require_Collection = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/no
|
|
|
4505
4505
|
/**
|
|
4506
4506
|
* Checks if the collection includes a value with the key `key`.
|
|
4507
4507
|
*/
|
|
4508
|
-
hasIn(path$
|
|
4509
|
-
const [key, ...rest] = path$
|
|
4508
|
+
hasIn(path$3) {
|
|
4509
|
+
const [key, ...rest] = path$3;
|
|
4510
4510
|
if (rest.length === 0) return this.has(key);
|
|
4511
4511
|
const node = this.get(key, true);
|
|
4512
4512
|
return identity$24.isCollection(node) ? node.hasIn(rest) : false;
|
|
@@ -4515,8 +4515,8 @@ var require_Collection = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/no
|
|
|
4515
4515
|
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
4516
4516
|
* boolean to add/remove the item from the set.
|
|
4517
4517
|
*/
|
|
4518
|
-
setIn(path$
|
|
4519
|
-
const [key, ...rest] = path$
|
|
4518
|
+
setIn(path$3, value) {
|
|
4519
|
+
const [key, ...rest] = path$3;
|
|
4520
4520
|
if (rest.length === 0) this.set(key, value);
|
|
4521
4521
|
else {
|
|
4522
4522
|
const node = this.get(key, true);
|
|
@@ -6632,8 +6632,8 @@ var require_Document = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/doc/
|
|
|
6632
6632
|
if (assertCollection(this.contents)) this.contents.add(value);
|
|
6633
6633
|
}
|
|
6634
6634
|
/** Adds a value to the document. */
|
|
6635
|
-
addIn(path$
|
|
6636
|
-
if (assertCollection(this.contents)) this.contents.addIn(path$
|
|
6635
|
+
addIn(path$3, value) {
|
|
6636
|
+
if (assertCollection(this.contents)) this.contents.addIn(path$3, value);
|
|
6637
6637
|
}
|
|
6638
6638
|
/**
|
|
6639
6639
|
* Create a new `Alias` node, ensuring that the target `node` has the required anchor.
|
|
@@ -6701,13 +6701,13 @@ var require_Document = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/doc/
|
|
|
6701
6701
|
* Removes a value from the document.
|
|
6702
6702
|
* @returns `true` if the item was found and removed.
|
|
6703
6703
|
*/
|
|
6704
|
-
deleteIn(path$
|
|
6705
|
-
if (Collection.isEmptyPath(path$
|
|
6704
|
+
deleteIn(path$3) {
|
|
6705
|
+
if (Collection.isEmptyPath(path$3)) {
|
|
6706
6706
|
if (this.contents == null) return false;
|
|
6707
6707
|
this.contents = null;
|
|
6708
6708
|
return true;
|
|
6709
6709
|
}
|
|
6710
|
-
return assertCollection(this.contents) ? this.contents.deleteIn(path$
|
|
6710
|
+
return assertCollection(this.contents) ? this.contents.deleteIn(path$3) : false;
|
|
6711
6711
|
}
|
|
6712
6712
|
/**
|
|
6713
6713
|
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
@@ -6722,9 +6722,9 @@ var require_Document = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/doc/
|
|
|
6722
6722
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
6723
6723
|
* `true` (collections are always returned intact).
|
|
6724
6724
|
*/
|
|
6725
|
-
getIn(path$
|
|
6726
|
-
if (Collection.isEmptyPath(path$
|
|
6727
|
-
return identity$8.isCollection(this.contents) ? this.contents.getIn(path$
|
|
6725
|
+
getIn(path$3, keepScalar) {
|
|
6726
|
+
if (Collection.isEmptyPath(path$3)) return !keepScalar && identity$8.isScalar(this.contents) ? this.contents.value : this.contents;
|
|
6727
|
+
return identity$8.isCollection(this.contents) ? this.contents.getIn(path$3, keepScalar) : void 0;
|
|
6728
6728
|
}
|
|
6729
6729
|
/**
|
|
6730
6730
|
* Checks if the document includes a value with the key `key`.
|
|
@@ -6735,9 +6735,9 @@ var require_Document = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/doc/
|
|
|
6735
6735
|
/**
|
|
6736
6736
|
* Checks if the document includes a value at `path`.
|
|
6737
6737
|
*/
|
|
6738
|
-
hasIn(path$
|
|
6739
|
-
if (Collection.isEmptyPath(path$
|
|
6740
|
-
return identity$8.isCollection(this.contents) ? this.contents.hasIn(path$
|
|
6738
|
+
hasIn(path$3) {
|
|
6739
|
+
if (Collection.isEmptyPath(path$3)) return this.contents !== void 0;
|
|
6740
|
+
return identity$8.isCollection(this.contents) ? this.contents.hasIn(path$3) : false;
|
|
6741
6741
|
}
|
|
6742
6742
|
/**
|
|
6743
6743
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
@@ -6751,10 +6751,10 @@ var require_Document = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/doc/
|
|
|
6751
6751
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
6752
6752
|
* boolean to add/remove the item from the set.
|
|
6753
6753
|
*/
|
|
6754
|
-
setIn(path$
|
|
6755
|
-
if (Collection.isEmptyPath(path$
|
|
6756
|
-
else if (this.contents == null) this.contents = Collection.collectionFromPath(this.schema, Array.from(path$
|
|
6757
|
-
else if (assertCollection(this.contents)) this.contents.setIn(path$
|
|
6754
|
+
setIn(path$3, value) {
|
|
6755
|
+
if (Collection.isEmptyPath(path$3)) this.contents = value;
|
|
6756
|
+
else if (this.contents == null) this.contents = Collection.collectionFromPath(this.schema, Array.from(path$3), value);
|
|
6757
|
+
else if (assertCollection(this.contents)) this.contents.setIn(path$3, value);
|
|
6758
6758
|
}
|
|
6759
6759
|
/**
|
|
6760
6760
|
* Change the YAML version and schema used by the document.
|
|
@@ -8602,9 +8602,9 @@ var require_cst_visit = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/par
|
|
|
8602
8602
|
/** Remove the current item */
|
|
8603
8603
|
visit$1.REMOVE = REMOVE;
|
|
8604
8604
|
/** Find the item at `path` from `cst` as the root */
|
|
8605
|
-
visit$1.itemAtPath = (cst$3, path$
|
|
8605
|
+
visit$1.itemAtPath = (cst$3, path$3) => {
|
|
8606
8606
|
let item = cst$3;
|
|
8607
|
-
for (const [field, index] of path$
|
|
8607
|
+
for (const [field, index] of path$3) {
|
|
8608
8608
|
const tok = item?.[field];
|
|
8609
8609
|
if (tok && "items" in tok) item = tok.items[index];
|
|
8610
8610
|
else return void 0;
|
|
@@ -8616,21 +8616,21 @@ var require_cst_visit = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/par
|
|
|
8616
8616
|
*
|
|
8617
8617
|
* Throws an error if the collection is not found, which should never happen if the item itself exists.
|
|
8618
8618
|
*/
|
|
8619
|
-
visit$1.parentCollection = (cst$3, path$
|
|
8620
|
-
const parent = visit$1.itemAtPath(cst$3, path$
|
|
8621
|
-
const field = path$
|
|
8619
|
+
visit$1.parentCollection = (cst$3, path$3) => {
|
|
8620
|
+
const parent = visit$1.itemAtPath(cst$3, path$3.slice(0, -1));
|
|
8621
|
+
const field = path$3[path$3.length - 1][0];
|
|
8622
8622
|
const coll = parent?.[field];
|
|
8623
8623
|
if (coll && "items" in coll) return coll;
|
|
8624
8624
|
throw new Error("Parent collection not found");
|
|
8625
8625
|
};
|
|
8626
|
-
function _visit(path$
|
|
8627
|
-
let ctrl = visitor(item, path$
|
|
8626
|
+
function _visit(path$3, item, visitor) {
|
|
8627
|
+
let ctrl = visitor(item, path$3);
|
|
8628
8628
|
if (typeof ctrl === "symbol") return ctrl;
|
|
8629
8629
|
for (const field of ["key", "value"]) {
|
|
8630
8630
|
const token = item[field];
|
|
8631
8631
|
if (token && "items" in token) {
|
|
8632
8632
|
for (let i = 0; i < token.items.length; ++i) {
|
|
8633
|
-
const ci = _visit(Object.freeze(path$
|
|
8633
|
+
const ci = _visit(Object.freeze(path$3.concat([[field, i]])), token.items[i], visitor);
|
|
8634
8634
|
if (typeof ci === "number") i = ci - 1;
|
|
8635
8635
|
else if (ci === BREAK) return BREAK;
|
|
8636
8636
|
else if (ci === REMOVE) {
|
|
@@ -8638,10 +8638,10 @@ var require_cst_visit = /* @__PURE__ */ __commonJS({ "node_modules/yaml/dist/par
|
|
|
8638
8638
|
i -= 1;
|
|
8639
8639
|
}
|
|
8640
8640
|
}
|
|
8641
|
-
if (typeof ctrl === "function" && field === "key") ctrl = ctrl(item, path$
|
|
8641
|
+
if (typeof ctrl === "function" && field === "key") ctrl = ctrl(item, path$3);
|
|
8642
8642
|
}
|
|
8643
8643
|
}
|
|
8644
|
-
return typeof ctrl === "function" ? ctrl(item, path$
|
|
8644
|
+
return typeof ctrl === "function" ? ctrl(item, path$3) : ctrl;
|
|
8645
8645
|
}
|
|
8646
8646
|
exports.visit = visit$1;
|
|
8647
8647
|
}) });
|
|
@@ -10399,11 +10399,11 @@ function parseYaml() {
|
|
|
10399
10399
|
|
|
10400
10400
|
//#endregion
|
|
10401
10401
|
//#region node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js
|
|
10402
|
-
async function readFile(path$
|
|
10402
|
+
async function readFile(path$3) {
|
|
10403
10403
|
const fs$2 = typeof window === "undefined" ? await import("fs/promises") : void 0;
|
|
10404
10404
|
if (fs$2 === void 0) throw "Can not use readFiles plugin outside of a node environment";
|
|
10405
10405
|
try {
|
|
10406
|
-
const fileContents = await fs$2.readFile(path$
|
|
10406
|
+
const fileContents = await fs$2.readFile(path$3, { encoding: "utf-8" });
|
|
10407
10407
|
return {
|
|
10408
10408
|
ok: true,
|
|
10409
10409
|
data: normalize$1(fileContents),
|
|
@@ -14187,10 +14187,10 @@ function getEntrypoint(filesystem) {
|
|
|
14187
14187
|
|
|
14188
14188
|
//#endregion
|
|
14189
14189
|
//#region node_modules/@scalar/openapi-parser/dist/utils/traverse.js
|
|
14190
|
-
function traverse(content, transform, path$
|
|
14190
|
+
function traverse(content, transform, path$3 = []) {
|
|
14191
14191
|
const result = {};
|
|
14192
14192
|
for (const [key, value] of Object.entries(content)) {
|
|
14193
|
-
const currentPath = [...path$
|
|
14193
|
+
const currentPath = [...path$3, key];
|
|
14194
14194
|
if (Array.isArray(value)) {
|
|
14195
14195
|
result[key] = value.map((item, index) => {
|
|
14196
14196
|
if (typeof item === "object" && !Array.isArray(item) && item !== null) return traverse(item, transform, [...currentPath, index.toString()]);
|
|
@@ -14204,7 +14204,7 @@ function traverse(content, transform, path$2 = []) {
|
|
|
14204
14204
|
}
|
|
14205
14205
|
result[key] = value;
|
|
14206
14206
|
}
|
|
14207
|
-
return transform(result, path$
|
|
14207
|
+
return transform(result, path$3);
|
|
14208
14208
|
}
|
|
14209
14209
|
|
|
14210
14210
|
//#endregion
|
|
@@ -14271,8 +14271,8 @@ function unescapeJsonPointer(uri) {
|
|
|
14271
14271
|
|
|
14272
14272
|
//#endregion
|
|
14273
14273
|
//#region node_modules/@scalar/openapi-parser/dist/utils/get-segments-from-path.js
|
|
14274
|
-
function getSegmentsFromPath(path$
|
|
14275
|
-
return path$
|
|
14274
|
+
function getSegmentsFromPath(path$3) {
|
|
14275
|
+
return path$3.split("/").slice(1).map(unescapeJsonPointer);
|
|
14276
14276
|
}
|
|
14277
14277
|
|
|
14278
14278
|
//#endregion
|
|
@@ -14326,7 +14326,7 @@ function resolveUri(uri, options, file, filesystem, resolve$1, errors$4) {
|
|
|
14326
14326
|
});
|
|
14327
14327
|
return;
|
|
14328
14328
|
}
|
|
14329
|
-
const [prefix, path$
|
|
14329
|
+
const [prefix, path$3] = uri.split("#", 2);
|
|
14330
14330
|
const isDifferentFile = prefix !== file.filename;
|
|
14331
14331
|
if (prefix && isDifferentFile) {
|
|
14332
14332
|
const externalReference = filesystem.find((entry) => {
|
|
@@ -14340,10 +14340,10 @@ function resolveUri(uri, options, file, filesystem, resolve$1, errors$4) {
|
|
|
14340
14340
|
});
|
|
14341
14341
|
return;
|
|
14342
14342
|
}
|
|
14343
|
-
if (path$
|
|
14344
|
-
return resolveUri(`#${path$
|
|
14343
|
+
if (path$3 === void 0) return externalReference.specification;
|
|
14344
|
+
return resolveUri(`#${path$3}`, options, resolve$1(externalReference), filesystem, resolve$1, errors$4);
|
|
14345
14345
|
}
|
|
14346
|
-
const segments = getSegmentsFromPath(path$
|
|
14346
|
+
const segments = getSegmentsFromPath(path$3);
|
|
14347
14347
|
try {
|
|
14348
14348
|
return segments.reduce((acc, key) => {
|
|
14349
14349
|
return acc[key];
|
|
@@ -15269,13 +15269,13 @@ const deserialize = (input) => {
|
|
|
15269
15269
|
|
|
15270
15270
|
//#endregion
|
|
15271
15271
|
//#region src/storage.ts
|
|
15272
|
-
const read = async (path$
|
|
15273
|
-
return deserialize(await fs.promises.readFile(path$
|
|
15272
|
+
const read = async (path$3) => {
|
|
15273
|
+
return deserialize(await fs.promises.readFile(path$3, "utf-8"));
|
|
15274
15274
|
};
|
|
15275
|
-
const store = async (path$
|
|
15275
|
+
const store = async (path$3, data) => {
|
|
15276
15276
|
const raw = serialize(data);
|
|
15277
|
-
debug$1(`Storage: Storing ${Buffer.byteLength(raw, "utf-8")} bytes to ${path$
|
|
15278
|
-
await fs.promises.writeFile(path$
|
|
15277
|
+
debug$1(`Storage: Storing ${Buffer.byteLength(raw, "utf-8")} bytes to ${path$3}`);
|
|
15278
|
+
await fs.promises.writeFile(path$3, raw, "utf-8");
|
|
15279
15279
|
};
|
|
15280
15280
|
var Storage = class {
|
|
15281
15281
|
data = null;
|
|
@@ -15299,37 +15299,37 @@ var Storage = class {
|
|
|
15299
15299
|
}
|
|
15300
15300
|
return this.data;
|
|
15301
15301
|
}
|
|
15302
|
-
async add(path$
|
|
15302
|
+
async add(path$3, measurement) {
|
|
15303
15303
|
const data = await this.ensureLoaded();
|
|
15304
|
-
data.set(path$
|
|
15304
|
+
data.set(path$3, [...data.get(path$3) || [], [
|
|
15305
15305
|
measurement.timestamp,
|
|
15306
15306
|
measurement.status,
|
|
15307
15307
|
measurement.durationMs,
|
|
15308
15308
|
measurement.url
|
|
15309
15309
|
]]);
|
|
15310
|
-
this.updatedPaths.add(path$
|
|
15310
|
+
this.updatedPaths.add(path$3);
|
|
15311
15311
|
}
|
|
15312
15312
|
async flush() {
|
|
15313
15313
|
const data = await this.ensureLoaded();
|
|
15314
|
-
for (const path$
|
|
15314
|
+
for (const path$3 of data.keys()) if (!this.updatedPaths.has(path$3)) this.data.delete(path$3);
|
|
15315
15315
|
const paths = Array.from(data.keys());
|
|
15316
15316
|
const bytesPerPath = Math.floor(this.maxSpaceUsageBytes / paths.length);
|
|
15317
|
-
for (const path$
|
|
15318
|
-
const measurements = data.get(path$
|
|
15317
|
+
for (const path$3 of paths) {
|
|
15318
|
+
const measurements = data.get(path$3);
|
|
15319
15319
|
if (!measurements) continue;
|
|
15320
15320
|
const approxBytes = Buffer.byteLength(serialize(measurements), "utf-8");
|
|
15321
15321
|
if (approxBytes > bytesPerPath) {
|
|
15322
15322
|
const reductionFactor = approxBytes / bytesPerPath;
|
|
15323
15323
|
const itemsToKeep = Math.floor(measurements.length / reductionFactor);
|
|
15324
15324
|
const trimmed = measurements.slice(-itemsToKeep);
|
|
15325
|
-
data.set(path$
|
|
15326
|
-
debug$1(`Storage: trimmed data for path ${path$
|
|
15325
|
+
data.set(path$3, trimmed);
|
|
15326
|
+
debug$1(`Storage: trimmed data for path ${path$3} from ${measurements.length} to ${trimmed.length} items`);
|
|
15327
15327
|
}
|
|
15328
15328
|
}
|
|
15329
15329
|
await store(this.storagePath, data);
|
|
15330
15330
|
}
|
|
15331
|
-
async getState(path$
|
|
15332
|
-
const pathData = (await this.ensureLoaded()).get(path$
|
|
15331
|
+
async getState(path$3) {
|
|
15332
|
+
const pathData = (await this.ensureLoaded()).get(path$3);
|
|
15333
15333
|
const current = pathData ? pathData[pathData.length - 1] : null;
|
|
15334
15334
|
const previous = pathData && pathData.length > 1 ? pathData[pathData.length - 2] : null;
|
|
15335
15335
|
return {
|
|
@@ -15347,8 +15347,8 @@ var Storage = class {
|
|
|
15347
15347
|
} : null
|
|
15348
15348
|
};
|
|
15349
15349
|
}
|
|
15350
|
-
async getHistory(path$
|
|
15351
|
-
return ((await this.ensureLoaded()).get(path$
|
|
15350
|
+
async getHistory(path$3) {
|
|
15351
|
+
return ((await this.ensureLoaded()).get(path$3) ?? []).map(([timestamp$3, status, durationMs]) => ({
|
|
15352
15352
|
timestamp: timestamp$3,
|
|
15353
15353
|
status,
|
|
15354
15354
|
durationMs
|
|
@@ -22773,9 +22773,9 @@ var require_mime_types = /* @__PURE__ */ __commonJS({ "node_modules/mime-types/i
|
|
|
22773
22773
|
* @param {string} path
|
|
22774
22774
|
* @return {boolean|string}
|
|
22775
22775
|
*/
|
|
22776
|
-
function lookup(path$
|
|
22777
|
-
if (!path$
|
|
22778
|
-
var extension$1 = extname("x." + path$
|
|
22776
|
+
function lookup(path$3) {
|
|
22777
|
+
if (!path$3 || typeof path$3 !== "string") return false;
|
|
22778
|
+
var extension$1 = extname("x." + path$3).toLowerCase().substr(1);
|
|
22779
22779
|
if (!extension$1) return false;
|
|
22780
22780
|
return exports.types[extension$1] || false;
|
|
22781
22781
|
}
|
|
@@ -23815,7 +23815,7 @@ var require_populate = /* @__PURE__ */ __commonJS({ "node_modules/form-data/lib/
|
|
|
23815
23815
|
var require_form_data = /* @__PURE__ */ __commonJS({ "node_modules/form-data/lib/form_data.js": ((exports, module) => {
|
|
23816
23816
|
var CombinedStream = require_combined_stream();
|
|
23817
23817
|
var util$1 = __require("util");
|
|
23818
|
-
var path = __require("path");
|
|
23818
|
+
var path$1 = __require("path");
|
|
23819
23819
|
var http$3 = __require("http");
|
|
23820
23820
|
var https$3 = __require("https");
|
|
23821
23821
|
var parseUrl$2 = __require("url").parse;
|
|
@@ -23912,9 +23912,9 @@ var require_form_data = /* @__PURE__ */ __commonJS({ "node_modules/form-data/lib
|
|
|
23912
23912
|
};
|
|
23913
23913
|
FormData$2.prototype._getContentDisposition = function(value, options) {
|
|
23914
23914
|
var filename;
|
|
23915
|
-
if (typeof options.filepath === "string") filename = path.normalize(options.filepath).replace(/\\/g, "/");
|
|
23916
|
-
else if (options.filename || value && (value.name || value.path)) filename = path.basename(options.filename || value && (value.name || value.path));
|
|
23917
|
-
else if (value && value.readable && hasOwn(value, "httpVersion")) filename = path.basename(value.client._httpMessage.path || "");
|
|
23915
|
+
if (typeof options.filepath === "string") filename = path$1.normalize(options.filepath).replace(/\\/g, "/");
|
|
23916
|
+
else if (options.filename || value && (value.name || value.path)) filename = path$1.basename(options.filename || value && (value.name || value.path));
|
|
23917
|
+
else if (value && value.readable && hasOwn(value, "httpVersion")) filename = path$1.basename(value.client._httpMessage.path || "");
|
|
23918
23918
|
if (filename) return "filename=\"" + filename + "\"";
|
|
23919
23919
|
};
|
|
23920
23920
|
FormData$2.prototype._getContentType = function(value, options) {
|
|
@@ -23995,7 +23995,7 @@ var require_form_data = /* @__PURE__ */ __commonJS({ "node_modules/form-data/lib
|
|
|
23995
23995
|
FormData$2.prototype.submit = function(params, cb) {
|
|
23996
23996
|
var request;
|
|
23997
23997
|
var options;
|
|
23998
|
-
var defaults$
|
|
23998
|
+
var defaults$1 = { method: "post" };
|
|
23999
23999
|
if (typeof params === "string") {
|
|
24000
24000
|
params = parseUrl$2(params);
|
|
24001
24001
|
options = populate({
|
|
@@ -24003,9 +24003,9 @@ var require_form_data = /* @__PURE__ */ __commonJS({ "node_modules/form-data/lib
|
|
|
24003
24003
|
path: params.pathname,
|
|
24004
24004
|
host: params.hostname,
|
|
24005
24005
|
protocol: params.protocol
|
|
24006
|
-
}, defaults$
|
|
24006
|
+
}, defaults$1);
|
|
24007
24007
|
} else {
|
|
24008
|
-
options = populate(params, defaults$
|
|
24008
|
+
options = populate(params, defaults$1);
|
|
24009
24009
|
if (!options.port) options.port = options.protocol === "https:" ? 443 : 80;
|
|
24010
24010
|
}
|
|
24011
24011
|
options.headers = this.getHeaders(params.headers);
|
|
@@ -24046,76 +24046,6 @@ var require_form_data = /* @__PURE__ */ __commonJS({ "node_modules/form-data/lib
|
|
|
24046
24046
|
module.exports = FormData$2;
|
|
24047
24047
|
}) });
|
|
24048
24048
|
|
|
24049
|
-
//#endregion
|
|
24050
|
-
//#region node_modules/proxy-from-env/index.js
|
|
24051
|
-
var require_proxy_from_env = /* @__PURE__ */ __commonJS({ "node_modules/proxy-from-env/index.js": ((exports) => {
|
|
24052
|
-
var parseUrl$1 = __require("url").parse;
|
|
24053
|
-
var DEFAULT_PORTS = {
|
|
24054
|
-
ftp: 21,
|
|
24055
|
-
gopher: 70,
|
|
24056
|
-
http: 80,
|
|
24057
|
-
https: 443,
|
|
24058
|
-
ws: 80,
|
|
24059
|
-
wss: 443
|
|
24060
|
-
};
|
|
24061
|
-
var stringEndsWith = String.prototype.endsWith || function(s) {
|
|
24062
|
-
return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
|
|
24063
|
-
};
|
|
24064
|
-
/**
|
|
24065
|
-
* @param {string|object} url - The URL, or the result from url.parse.
|
|
24066
|
-
* @return {string} The URL of the proxy that should handle the request to the
|
|
24067
|
-
* given URL. If no proxy is set, this will be an empty string.
|
|
24068
|
-
*/
|
|
24069
|
-
function getProxyForUrl(url$2) {
|
|
24070
|
-
var parsedUrl = typeof url$2 === "string" ? parseUrl$1(url$2) : url$2 || {};
|
|
24071
|
-
var proto = parsedUrl.protocol;
|
|
24072
|
-
var hostname = parsedUrl.host;
|
|
24073
|
-
var port = parsedUrl.port;
|
|
24074
|
-
if (typeof hostname !== "string" || !hostname || typeof proto !== "string") return "";
|
|
24075
|
-
proto = proto.split(":", 1)[0];
|
|
24076
|
-
hostname = hostname.replace(/:\d*$/, "");
|
|
24077
|
-
port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
|
|
24078
|
-
if (!shouldProxy(hostname, port)) return "";
|
|
24079
|
-
var proxy = getEnv("npm_config_" + proto + "_proxy") || getEnv(proto + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
|
|
24080
|
-
if (proxy && proxy.indexOf("://") === -1) proxy = proto + "://" + proxy;
|
|
24081
|
-
return proxy;
|
|
24082
|
-
}
|
|
24083
|
-
/**
|
|
24084
|
-
* Determines whether a given URL should be proxied.
|
|
24085
|
-
*
|
|
24086
|
-
* @param {string} hostname - The host name of the URL.
|
|
24087
|
-
* @param {number} port - The effective port of the URL.
|
|
24088
|
-
* @returns {boolean} Whether the given URL should be proxied.
|
|
24089
|
-
* @private
|
|
24090
|
-
*/
|
|
24091
|
-
function shouldProxy(hostname, port) {
|
|
24092
|
-
var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
|
|
24093
|
-
if (!NO_PROXY) return true;
|
|
24094
|
-
if (NO_PROXY === "*") return false;
|
|
24095
|
-
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
|
|
24096
|
-
if (!proxy) return true;
|
|
24097
|
-
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
|
|
24098
|
-
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
|
|
24099
|
-
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
|
|
24100
|
-
if (parsedProxyPort && parsedProxyPort !== port) return true;
|
|
24101
|
-
if (!/^[.*]/.test(parsedProxyHostname)) return hostname !== parsedProxyHostname;
|
|
24102
|
-
if (parsedProxyHostname.charAt(0) === "*") parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
24103
|
-
return !stringEndsWith.call(hostname, parsedProxyHostname);
|
|
24104
|
-
});
|
|
24105
|
-
}
|
|
24106
|
-
/**
|
|
24107
|
-
* Get the value for an environment variable.
|
|
24108
|
-
*
|
|
24109
|
-
* @param {string} key - The name of the environment variable.
|
|
24110
|
-
* @return {string} The value of the environment variable.
|
|
24111
|
-
* @private
|
|
24112
|
-
*/
|
|
24113
|
-
function getEnv(key) {
|
|
24114
|
-
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
24115
|
-
}
|
|
24116
|
-
exports.getProxyForUrl = getProxyForUrl;
|
|
24117
|
-
}) });
|
|
24118
|
-
|
|
24119
24049
|
//#endregion
|
|
24120
24050
|
//#region node_modules/follow-redirects/debug.js
|
|
24121
24051
|
var require_debug = /* @__PURE__ */ __commonJS({ "node_modules/follow-redirects/debug.js": ((exports, module) => {
|
|
@@ -24154,6 +24084,11 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "node_modules/follow
|
|
|
24154
24084
|
} catch (error) {
|
|
24155
24085
|
useNativeURL = error.code === "ERR_INVALID_URL";
|
|
24156
24086
|
}
|
|
24087
|
+
var sensitiveHeaders = [
|
|
24088
|
+
"Authorization",
|
|
24089
|
+
"Proxy-Authorization",
|
|
24090
|
+
"Cookie"
|
|
24091
|
+
];
|
|
24157
24092
|
var preservedUrlFields = [
|
|
24158
24093
|
"auth",
|
|
24159
24094
|
"host",
|
|
@@ -24207,6 +24142,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "node_modules/follow
|
|
|
24207
24142
|
self$1.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
|
|
24208
24143
|
}
|
|
24209
24144
|
};
|
|
24145
|
+
this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex).join("|") + ")$", "i");
|
|
24210
24146
|
this._performRequest();
|
|
24211
24147
|
}
|
|
24212
24148
|
RedirectableRequest.prototype = Object.create(Writable.prototype);
|
|
@@ -24330,6 +24266,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "node_modules/follow
|
|
|
24330
24266
|
});
|
|
24331
24267
|
RedirectableRequest.prototype._sanitizeOptions = function(options) {
|
|
24332
24268
|
if (!options.headers) options.headers = {};
|
|
24269
|
+
if (!isArray$1(options.sensitiveHeaders)) options.sensitiveHeaders = [];
|
|
24333
24270
|
if (options.host) {
|
|
24334
24271
|
if (!options.hostname) options.hostname = options.host;
|
|
24335
24272
|
delete options.host;
|
|
@@ -24401,14 +24338,14 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "node_modules/follow
|
|
|
24401
24338
|
removeMatchingHeaders(/^content-/i, this._options.headers);
|
|
24402
24339
|
}
|
|
24403
24340
|
var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
|
|
24404
|
-
var currentUrlParts = parseUrl(this._currentUrl);
|
|
24341
|
+
var currentUrlParts = parseUrl$1(this._currentUrl);
|
|
24405
24342
|
var currentHost = currentHostHeader || currentUrlParts.host;
|
|
24406
24343
|
var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url$1.format(Object.assign(currentUrlParts, { host: currentHost }));
|
|
24407
24344
|
var redirectUrl = resolveUrl(location, currentUrl);
|
|
24408
24345
|
debug$2("redirecting to", redirectUrl.href);
|
|
24409
24346
|
this._isRedirect = true;
|
|
24410
24347
|
spreadUrlObject(redirectUrl, this._options);
|
|
24411
|
-
if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) removeMatchingHeaders(
|
|
24348
|
+
if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) removeMatchingHeaders(this._headerFilter, this._options.headers);
|
|
24412
24349
|
if (isFunction$2(beforeRedirect)) {
|
|
24413
24350
|
var responseDetails = {
|
|
24414
24351
|
headers: response.headers,
|
|
@@ -24436,7 +24373,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "node_modules/follow
|
|
|
24436
24373
|
var wrappedProtocol = exports$1[scheme] = Object.create(nativeProtocol);
|
|
24437
24374
|
function request(input, options, callback) {
|
|
24438
24375
|
if (isURL(input)) input = spreadUrlObject(input);
|
|
24439
|
-
else if (isString$1(input)) input = spreadUrlObject(parseUrl(input));
|
|
24376
|
+
else if (isString$1(input)) input = spreadUrlObject(parseUrl$1(input));
|
|
24440
24377
|
else {
|
|
24441
24378
|
callback = options;
|
|
24442
24379
|
options = validateUrl(input);
|
|
@@ -24479,7 +24416,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "node_modules/follow
|
|
|
24479
24416
|
return exports$1;
|
|
24480
24417
|
}
|
|
24481
24418
|
function noop$1() {}
|
|
24482
|
-
function parseUrl(input) {
|
|
24419
|
+
function parseUrl$1(input) {
|
|
24483
24420
|
var parsed;
|
|
24484
24421
|
// istanbul ignore else
|
|
24485
24422
|
if (useNativeURL) parsed = new URL$1(input);
|
|
@@ -24491,7 +24428,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "node_modules/follow
|
|
|
24491
24428
|
}
|
|
24492
24429
|
function resolveUrl(relative$1, base) {
|
|
24493
24430
|
// istanbul ignore next
|
|
24494
|
-
return useNativeURL ? new URL$1(relative$1, base) : parseUrl(url$1.resolve(base, relative$1));
|
|
24431
|
+
return useNativeURL ? new URL$1(relative$1, base) : parseUrl$1(url$1.resolve(base, relative$1));
|
|
24495
24432
|
}
|
|
24496
24433
|
function validateUrl(input) {
|
|
24497
24434
|
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) throw new InvalidUrlError({ input: input.href || input });
|
|
@@ -24545,6 +24482,9 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "node_modules/follow
|
|
|
24545
24482
|
var dot = subdomain.length - domain.length - 1;
|
|
24546
24483
|
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
|
|
24547
24484
|
}
|
|
24485
|
+
function isArray$1(value) {
|
|
24486
|
+
return value instanceof Array;
|
|
24487
|
+
}
|
|
24548
24488
|
function isString$1(value) {
|
|
24549
24489
|
return typeof value === "string" || value instanceof String;
|
|
24550
24490
|
}
|
|
@@ -24557,6 +24497,9 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "node_modules/follow
|
|
|
24557
24497
|
function isURL(value) {
|
|
24558
24498
|
return URL$1 && value instanceof URL$1;
|
|
24559
24499
|
}
|
|
24500
|
+
function escapeRegex(regex) {
|
|
24501
|
+
return regex.replace(/[\]\\/()*+?.$]/g, "\\$&");
|
|
24502
|
+
}
|
|
24560
24503
|
module.exports = wrap({
|
|
24561
24504
|
http: http$2,
|
|
24562
24505
|
https: https$2
|
|
@@ -24566,34 +24509,20 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "node_modules/follow
|
|
|
24566
24509
|
|
|
24567
24510
|
//#endregion
|
|
24568
24511
|
//#region node_modules/axios/dist/node/axios.cjs
|
|
24569
|
-
/*! Axios v1.
|
|
24512
|
+
/*! Axios v1.16.0 Copyright (c) 2026 Matt Zabriskie and contributors */
|
|
24570
24513
|
var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/axios.cjs": ((exports, module) => {
|
|
24571
|
-
|
|
24572
|
-
|
|
24573
|
-
|
|
24574
|
-
|
|
24575
|
-
|
|
24576
|
-
|
|
24577
|
-
|
|
24578
|
-
|
|
24579
|
-
|
|
24580
|
-
|
|
24581
|
-
|
|
24582
|
-
|
|
24583
|
-
function _interopDefaultLegacy(e$1) {
|
|
24584
|
-
return e$1 && typeof e$1 === "object" && "default" in e$1 ? e$1 : { "default": e$1 };
|
|
24585
|
-
}
|
|
24586
|
-
const FormData__default = /* @__PURE__ */ _interopDefaultLegacy(FormData$1);
|
|
24587
|
-
const crypto__default = /* @__PURE__ */ _interopDefaultLegacy(crypto);
|
|
24588
|
-
const url__default = /* @__PURE__ */ _interopDefaultLegacy(url);
|
|
24589
|
-
const proxyFromEnv__default = /* @__PURE__ */ _interopDefaultLegacy(proxyFromEnv);
|
|
24590
|
-
const http__default = /* @__PURE__ */ _interopDefaultLegacy(http$1);
|
|
24591
|
-
const https__default = /* @__PURE__ */ _interopDefaultLegacy(https$1);
|
|
24592
|
-
const http2__default = /* @__PURE__ */ _interopDefaultLegacy(http2);
|
|
24593
|
-
const util__default = /* @__PURE__ */ _interopDefaultLegacy(util);
|
|
24594
|
-
const followRedirects__default = /* @__PURE__ */ _interopDefaultLegacy(followRedirects);
|
|
24595
|
-
const zlib__default = /* @__PURE__ */ _interopDefaultLegacy(zlib);
|
|
24596
|
-
const stream__default = /* @__PURE__ */ _interopDefaultLegacy(stream);
|
|
24514
|
+
var FormData$1 = require_form_data();
|
|
24515
|
+
var crypto = __require("crypto");
|
|
24516
|
+
var url = __require("url");
|
|
24517
|
+
var http$1 = __require("http");
|
|
24518
|
+
var https$1 = __require("https");
|
|
24519
|
+
var http2 = __require("http2");
|
|
24520
|
+
var util = __require("util");
|
|
24521
|
+
var path = __require("path");
|
|
24522
|
+
var followRedirects = require_follow_redirects();
|
|
24523
|
+
var zlib = __require("zlib");
|
|
24524
|
+
var stream = __require("stream");
|
|
24525
|
+
var events = __require("events");
|
|
24597
24526
|
/**
|
|
24598
24527
|
* Create a bound version of a function with a specified `this` context
|
|
24599
24528
|
*
|
|
@@ -24619,7 +24548,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
24619
24548
|
};
|
|
24620
24549
|
const typeOfTest = (type) => (thing) => typeof thing === type;
|
|
24621
24550
|
/**
|
|
24622
|
-
* Determine if a value is
|
|
24551
|
+
* Determine if a value is a non-null object
|
|
24623
24552
|
*
|
|
24624
24553
|
* @param {Object} val The value to test
|
|
24625
24554
|
*
|
|
@@ -24712,8 +24641,8 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
24712
24641
|
*/
|
|
24713
24642
|
const isPlainObject = (val) => {
|
|
24714
24643
|
if (kindOf(val) !== "object") return false;
|
|
24715
|
-
const prototype$
|
|
24716
|
-
return (prototype$
|
|
24644
|
+
const prototype$1 = getPrototypeOf(val);
|
|
24645
|
+
return (prototype$1 === null || prototype$1 === Object.prototype || Object.getPrototypeOf(prototype$1) === null) && !(toStringTag in val) && !(iterator in val);
|
|
24717
24646
|
};
|
|
24718
24647
|
/**
|
|
24719
24648
|
* Determine if a value is an empty object (safely handles Buffers)
|
|
@@ -24747,6 +24676,29 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
24747
24676
|
*/
|
|
24748
24677
|
const isFile = kindOfTest("File");
|
|
24749
24678
|
/**
|
|
24679
|
+
* Determine if a value is a React Native Blob
|
|
24680
|
+
* React Native "blob": an object with a `uri` attribute. Optionally, it can
|
|
24681
|
+
* also have a `name` and `type` attribute to specify filename and content type
|
|
24682
|
+
*
|
|
24683
|
+
* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
|
|
24684
|
+
*
|
|
24685
|
+
* @param {*} value The value to test
|
|
24686
|
+
*
|
|
24687
|
+
* @returns {boolean} True if value is a React Native Blob, otherwise false
|
|
24688
|
+
*/
|
|
24689
|
+
const isReactNativeBlob = (value) => {
|
|
24690
|
+
return !!(value && typeof value.uri !== "undefined");
|
|
24691
|
+
};
|
|
24692
|
+
/**
|
|
24693
|
+
* Determine if environment is React Native
|
|
24694
|
+
* ReactNative `FormData` has a non-standard `getParts()` method
|
|
24695
|
+
*
|
|
24696
|
+
* @param {*} formData The formData to test
|
|
24697
|
+
*
|
|
24698
|
+
* @returns {boolean} True if environment is React Native, otherwise false
|
|
24699
|
+
*/
|
|
24700
|
+
const isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
|
|
24701
|
+
/**
|
|
24750
24702
|
* Determine if a value is a Blob
|
|
24751
24703
|
*
|
|
24752
24704
|
* @param {*} val The value to test
|
|
@@ -24759,7 +24711,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
24759
24711
|
*
|
|
24760
24712
|
* @param {*} val The value to test
|
|
24761
24713
|
*
|
|
24762
|
-
* @returns {boolean} True if value is a
|
|
24714
|
+
* @returns {boolean} True if value is a FileList, otherwise false
|
|
24763
24715
|
*/
|
|
24764
24716
|
const isFileList = kindOfTest("FileList");
|
|
24765
24717
|
/**
|
|
@@ -24777,9 +24729,23 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
24777
24729
|
*
|
|
24778
24730
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
24779
24731
|
*/
|
|
24732
|
+
function getGlobal() {
|
|
24733
|
+
if (typeof globalThis !== "undefined") return globalThis;
|
|
24734
|
+
if (typeof self !== "undefined") return self;
|
|
24735
|
+
if (typeof window !== "undefined") return window;
|
|
24736
|
+
if (typeof global !== "undefined") return global;
|
|
24737
|
+
return {};
|
|
24738
|
+
}
|
|
24739
|
+
const G = getGlobal();
|
|
24740
|
+
const FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0;
|
|
24780
24741
|
const isFormData = (thing) => {
|
|
24781
|
-
|
|
24782
|
-
|
|
24742
|
+
if (!thing) return false;
|
|
24743
|
+
if (FormDataCtor && thing instanceof FormDataCtor) return true;
|
|
24744
|
+
const proto = getPrototypeOf(thing);
|
|
24745
|
+
if (!proto || proto === Object.prototype) return false;
|
|
24746
|
+
if (!isFunction$1(thing.append)) return false;
|
|
24747
|
+
const kind = kindOf(thing);
|
|
24748
|
+
return kind === "formdata" || kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]";
|
|
24783
24749
|
};
|
|
24784
24750
|
/**
|
|
24785
24751
|
* Determine if a value is a URLSearchParams object
|
|
@@ -24802,7 +24768,9 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
24802
24768
|
*
|
|
24803
24769
|
* @returns {String} The String freed of excess whitespace
|
|
24804
24770
|
*/
|
|
24805
|
-
const trim = (str) =>
|
|
24771
|
+
const trim = (str) => {
|
|
24772
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
24773
|
+
};
|
|
24806
24774
|
/**
|
|
24807
24775
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
24808
24776
|
*
|
|
@@ -24812,10 +24780,11 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
24812
24780
|
* If 'obj' is an Object callback will be called passing
|
|
24813
24781
|
* the value, key, and complete object for each property.
|
|
24814
24782
|
*
|
|
24815
|
-
* @param {Object|Array} obj The object to iterate
|
|
24783
|
+
* @param {Object|Array<unknown>} obj The object to iterate
|
|
24816
24784
|
* @param {Function} fn The callback to invoke for each item
|
|
24817
24785
|
*
|
|
24818
|
-
* @param {
|
|
24786
|
+
* @param {Object} [options]
|
|
24787
|
+
* @param {Boolean} [options.allOwnKeys = false]
|
|
24819
24788
|
* @returns {any}
|
|
24820
24789
|
*/
|
|
24821
24790
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
@@ -24835,6 +24804,14 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
24835
24804
|
}
|
|
24836
24805
|
}
|
|
24837
24806
|
}
|
|
24807
|
+
/**
|
|
24808
|
+
* Finds a key in an object, case-insensitive, returning the actual key name.
|
|
24809
|
+
* Returns null if the object is a Buffer or if no match is found.
|
|
24810
|
+
*
|
|
24811
|
+
* @param {Object} obj - The object to search.
|
|
24812
|
+
* @param {string} key - The key to find (case-insensitive).
|
|
24813
|
+
* @returns {?string} The actual key name if found, otherwise null.
|
|
24814
|
+
*/
|
|
24838
24815
|
function findKey(obj, key) {
|
|
24839
24816
|
if (isBuffer(obj)) return null;
|
|
24840
24817
|
key = key.toLowerCase();
|
|
@@ -24862,7 +24839,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
24862
24839
|
* Example:
|
|
24863
24840
|
*
|
|
24864
24841
|
* ```js
|
|
24865
|
-
*
|
|
24842
|
+
* const result = merge({foo: 123}, {foo: 456});
|
|
24866
24843
|
* console.log(result.foo); // outputs 456
|
|
24867
24844
|
* ```
|
|
24868
24845
|
*
|
|
@@ -24870,17 +24847,19 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
24870
24847
|
*
|
|
24871
24848
|
* @returns {Object} Result of all merge properties
|
|
24872
24849
|
*/
|
|
24873
|
-
function merge() {
|
|
24850
|
+
function merge(...objs) {
|
|
24874
24851
|
const { caseless, skipUndefined } = isContextDefined(this) && this || {};
|
|
24875
24852
|
const result = {};
|
|
24876
24853
|
const assignValue = (val, key) => {
|
|
24854
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") return;
|
|
24877
24855
|
const targetKey = caseless && findKey(result, key) || key;
|
|
24878
|
-
|
|
24856
|
+
const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
|
|
24857
|
+
if (isPlainObject(existing) && isPlainObject(val)) result[targetKey] = merge(existing, val);
|
|
24879
24858
|
else if (isPlainObject(val)) result[targetKey] = merge({}, val);
|
|
24880
24859
|
else if (isArray(val)) result[targetKey] = val.slice();
|
|
24881
24860
|
else if (!skipUndefined || !isUndefined(val)) result[targetKey] = val;
|
|
24882
24861
|
};
|
|
24883
|
-
for (let i = 0, l =
|
|
24862
|
+
for (let i = 0, l = objs.length; i < l; i++) objs[i] && forEach(objs[i], assignValue);
|
|
24884
24863
|
return result;
|
|
24885
24864
|
}
|
|
24886
24865
|
/**
|
|
@@ -24890,13 +24869,26 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
24890
24869
|
* @param {Object} b The object to copy properties from
|
|
24891
24870
|
* @param {Object} thisArg The object to bind function to
|
|
24892
24871
|
*
|
|
24893
|
-
* @param {
|
|
24872
|
+
* @param {Object} [options]
|
|
24873
|
+
* @param {Boolean} [options.allOwnKeys]
|
|
24894
24874
|
* @returns {Object} The resulting value of object a
|
|
24895
24875
|
*/
|
|
24896
24876
|
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
24897
24877
|
forEach(b, (val, key) => {
|
|
24898
|
-
if (thisArg && isFunction$1(val)) a
|
|
24899
|
-
|
|
24878
|
+
if (thisArg && isFunction$1(val)) Object.defineProperty(a, key, {
|
|
24879
|
+
__proto__: null,
|
|
24880
|
+
value: bind(val, thisArg),
|
|
24881
|
+
writable: true,
|
|
24882
|
+
enumerable: true,
|
|
24883
|
+
configurable: true
|
|
24884
|
+
});
|
|
24885
|
+
else Object.defineProperty(a, key, {
|
|
24886
|
+
__proto__: null,
|
|
24887
|
+
value: val,
|
|
24888
|
+
writable: true,
|
|
24889
|
+
enumerable: true,
|
|
24890
|
+
configurable: true
|
|
24891
|
+
});
|
|
24900
24892
|
}, { allOwnKeys });
|
|
24901
24893
|
return a;
|
|
24902
24894
|
};
|
|
@@ -24920,10 +24912,19 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
24920
24912
|
*
|
|
24921
24913
|
* @returns {void}
|
|
24922
24914
|
*/
|
|
24923
|
-
const inherits = (constructor, superConstructor, props, descriptors
|
|
24924
|
-
constructor.prototype = Object.create(superConstructor.prototype, descriptors
|
|
24925
|
-
constructor.prototype
|
|
24926
|
-
|
|
24915
|
+
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
24916
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
24917
|
+
Object.defineProperty(constructor.prototype, "constructor", {
|
|
24918
|
+
__proto__: null,
|
|
24919
|
+
value: constructor,
|
|
24920
|
+
writable: true,
|
|
24921
|
+
enumerable: false,
|
|
24922
|
+
configurable: true
|
|
24923
|
+
});
|
|
24924
|
+
Object.defineProperty(constructor, "super", {
|
|
24925
|
+
__proto__: null,
|
|
24926
|
+
value: superConstructor.prototype
|
|
24927
|
+
});
|
|
24927
24928
|
props && Object.assign(constructor.prototype, props);
|
|
24928
24929
|
};
|
|
24929
24930
|
/**
|
|
@@ -25047,9 +25048,9 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25047
25048
|
*/
|
|
25048
25049
|
const isRegExp = kindOfTest("RegExp");
|
|
25049
25050
|
const reduceDescriptors = (obj, reducer) => {
|
|
25050
|
-
const descriptors
|
|
25051
|
+
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
25051
25052
|
const reducedDescriptors = {};
|
|
25052
|
-
forEach(descriptors
|
|
25053
|
+
forEach(descriptors, (descriptor, name) => {
|
|
25053
25054
|
let ret;
|
|
25054
25055
|
if ((ret = reducer(descriptor, name, obj)) !== false) reducedDescriptors[name] = ret || descriptor;
|
|
25055
25056
|
});
|
|
@@ -25065,7 +25066,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25065
25066
|
"arguments",
|
|
25066
25067
|
"caller",
|
|
25067
25068
|
"callee"
|
|
25068
|
-
].
|
|
25069
|
+
].includes(name)) return false;
|
|
25069
25070
|
const value = obj[name];
|
|
25070
25071
|
if (!isFunction$1(value)) return;
|
|
25071
25072
|
descriptor.enumerable = false;
|
|
@@ -25078,6 +25079,14 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25078
25079
|
};
|
|
25079
25080
|
});
|
|
25080
25081
|
};
|
|
25082
|
+
/**
|
|
25083
|
+
* Converts an array or a delimited string into an object set with values as keys and true as values.
|
|
25084
|
+
* Useful for fast membership checks.
|
|
25085
|
+
*
|
|
25086
|
+
* @param {Array|string} arrayOrString - The array or string to convert.
|
|
25087
|
+
* @param {string} delimiter - The delimiter to use if input is a string.
|
|
25088
|
+
* @returns {Object} An object with keys from the array or string, values set to true.
|
|
25089
|
+
*/
|
|
25081
25090
|
const toObjectSet = (arrayOrString, delimiter$1) => {
|
|
25082
25091
|
const obj = {};
|
|
25083
25092
|
const define$1 = (arr) => {
|
|
@@ -25102,6 +25111,12 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25102
25111
|
function isSpecCompliantForm(thing) {
|
|
25103
25112
|
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
|
|
25104
25113
|
}
|
|
25114
|
+
/**
|
|
25115
|
+
* Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
|
|
25116
|
+
*
|
|
25117
|
+
* @param {Object} obj - The object to convert.
|
|
25118
|
+
* @returns {Object} The JSON-compatible object.
|
|
25119
|
+
*/
|
|
25105
25120
|
const toJSONObject = (obj) => {
|
|
25106
25121
|
const stack = new Array(10);
|
|
25107
25122
|
const visit$6 = (source, i) => {
|
|
@@ -25123,8 +25138,28 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25123
25138
|
};
|
|
25124
25139
|
return visit$6(obj, 0);
|
|
25125
25140
|
};
|
|
25141
|
+
/**
|
|
25142
|
+
* Determines if a value is an async function.
|
|
25143
|
+
*
|
|
25144
|
+
* @param {*} thing - The value to test.
|
|
25145
|
+
* @returns {boolean} True if value is an async function, otherwise false.
|
|
25146
|
+
*/
|
|
25126
25147
|
const isAsyncFn = kindOfTest("AsyncFunction");
|
|
25148
|
+
/**
|
|
25149
|
+
* Determines if a value is thenable (has then and catch methods).
|
|
25150
|
+
*
|
|
25151
|
+
* @param {*} thing - The value to test.
|
|
25152
|
+
* @returns {boolean} True if value is thenable, otherwise false.
|
|
25153
|
+
*/
|
|
25127
25154
|
const isThenable = (thing) => thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
|
|
25155
|
+
/**
|
|
25156
|
+
* Provides a cross-platform setImmediate implementation.
|
|
25157
|
+
* Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
|
|
25158
|
+
*
|
|
25159
|
+
* @param {boolean} setImmediateSupported - Whether setImmediate is supported.
|
|
25160
|
+
* @param {boolean} postMessageSupported - Whether postMessage is supported.
|
|
25161
|
+
* @returns {Function} A function to schedule a callback asynchronously.
|
|
25162
|
+
*/
|
|
25128
25163
|
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
25129
25164
|
if (setImmediateSupported) return setImmediate;
|
|
25130
25165
|
return postMessageSupported ? ((token, callbacks) => {
|
|
@@ -25137,9 +25172,15 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25137
25172
|
};
|
|
25138
25173
|
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
25139
25174
|
})(typeof setImmediate === "function", isFunction$1(_global.postMessage));
|
|
25175
|
+
/**
|
|
25176
|
+
* Schedules a microtask or asynchronous callback as soon as possible.
|
|
25177
|
+
* Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
|
|
25178
|
+
*
|
|
25179
|
+
* @type {Function}
|
|
25180
|
+
*/
|
|
25140
25181
|
const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
25141
25182
|
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
|
25142
|
-
|
|
25183
|
+
var utils$1 = {
|
|
25143
25184
|
isArray,
|
|
25144
25185
|
isArrayBuffer,
|
|
25145
25186
|
isBuffer,
|
|
@@ -25158,6 +25199,8 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25158
25199
|
isUndefined,
|
|
25159
25200
|
isDate,
|
|
25160
25201
|
isFile,
|
|
25202
|
+
isReactNativeBlob,
|
|
25203
|
+
isReactNative,
|
|
25161
25204
|
isBlob,
|
|
25162
25205
|
isRegExp,
|
|
25163
25206
|
isFunction: isFunction$1,
|
|
@@ -25198,258 +25241,568 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25198
25241
|
asap,
|
|
25199
25242
|
isIterable
|
|
25200
25243
|
};
|
|
25244
|
+
const ignoreDuplicateOf = utils$1.toObjectSet([
|
|
25245
|
+
"age",
|
|
25246
|
+
"authorization",
|
|
25247
|
+
"content-length",
|
|
25248
|
+
"content-type",
|
|
25249
|
+
"etag",
|
|
25250
|
+
"expires",
|
|
25251
|
+
"from",
|
|
25252
|
+
"host",
|
|
25253
|
+
"if-modified-since",
|
|
25254
|
+
"if-unmodified-since",
|
|
25255
|
+
"last-modified",
|
|
25256
|
+
"location",
|
|
25257
|
+
"max-forwards",
|
|
25258
|
+
"proxy-authorization",
|
|
25259
|
+
"referer",
|
|
25260
|
+
"retry-after",
|
|
25261
|
+
"user-agent"
|
|
25262
|
+
]);
|
|
25201
25263
|
/**
|
|
25202
|
-
*
|
|
25264
|
+
* Parse headers into an object
|
|
25203
25265
|
*
|
|
25204
|
-
*
|
|
25205
|
-
*
|
|
25206
|
-
*
|
|
25207
|
-
*
|
|
25208
|
-
*
|
|
25266
|
+
* ```
|
|
25267
|
+
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
|
25268
|
+
* Content-Type: application/json
|
|
25269
|
+
* Connection: keep-alive
|
|
25270
|
+
* Transfer-Encoding: chunked
|
|
25271
|
+
* ```
|
|
25272
|
+
*
|
|
25273
|
+
* @param {String} rawHeaders Headers needing to be parsed
|
|
25209
25274
|
*
|
|
25210
|
-
* @returns {
|
|
25275
|
+
* @returns {Object} Headers parsed into an object
|
|
25211
25276
|
*/
|
|
25212
|
-
|
|
25213
|
-
|
|
25214
|
-
|
|
25215
|
-
|
|
25216
|
-
|
|
25217
|
-
|
|
25218
|
-
|
|
25219
|
-
|
|
25220
|
-
|
|
25221
|
-
|
|
25222
|
-
|
|
25223
|
-
|
|
25224
|
-
|
|
25225
|
-
}
|
|
25226
|
-
utils$1.inherits(AxiosError, Error, { toJSON: function toJSON() {
|
|
25227
|
-
return {
|
|
25228
|
-
message: this.message,
|
|
25229
|
-
name: this.name,
|
|
25230
|
-
description: this.description,
|
|
25231
|
-
number: this.number,
|
|
25232
|
-
fileName: this.fileName,
|
|
25233
|
-
lineNumber: this.lineNumber,
|
|
25234
|
-
columnNumber: this.columnNumber,
|
|
25235
|
-
stack: this.stack,
|
|
25236
|
-
config: utils$1.toJSONObject(this.config),
|
|
25237
|
-
code: this.code,
|
|
25238
|
-
status: this.status
|
|
25239
|
-
};
|
|
25240
|
-
} });
|
|
25241
|
-
const prototype$1 = AxiosError.prototype;
|
|
25242
|
-
const descriptors = {};
|
|
25243
|
-
[
|
|
25244
|
-
"ERR_BAD_OPTION_VALUE",
|
|
25245
|
-
"ERR_BAD_OPTION",
|
|
25246
|
-
"ECONNABORTED",
|
|
25247
|
-
"ETIMEDOUT",
|
|
25248
|
-
"ERR_NETWORK",
|
|
25249
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
25250
|
-
"ERR_DEPRECATED",
|
|
25251
|
-
"ERR_BAD_RESPONSE",
|
|
25252
|
-
"ERR_BAD_REQUEST",
|
|
25253
|
-
"ERR_CANCELED",
|
|
25254
|
-
"ERR_NOT_SUPPORT",
|
|
25255
|
-
"ERR_INVALID_URL"
|
|
25256
|
-
].forEach((code) => {
|
|
25257
|
-
descriptors[code] = { value: code };
|
|
25258
|
-
});
|
|
25259
|
-
Object.defineProperties(AxiosError, descriptors);
|
|
25260
|
-
Object.defineProperty(prototype$1, "isAxiosError", { value: true });
|
|
25261
|
-
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
25262
|
-
const axiosError = Object.create(prototype$1);
|
|
25263
|
-
utils$1.toFlatObject(error, axiosError, function filter(obj) {
|
|
25264
|
-
return obj !== Error.prototype;
|
|
25265
|
-
}, (prop) => {
|
|
25266
|
-
return prop !== "isAxiosError";
|
|
25267
|
-
});
|
|
25268
|
-
const msg = error && error.message ? error.message : "Error";
|
|
25269
|
-
const errCode = code == null && error ? error.code : code;
|
|
25270
|
-
AxiosError.call(axiosError, msg, errCode, config, request, response);
|
|
25271
|
-
if (error && axiosError.cause == null) Object.defineProperty(axiosError, "cause", {
|
|
25272
|
-
value: error,
|
|
25273
|
-
configurable: true
|
|
25277
|
+
var parseHeaders = (rawHeaders) => {
|
|
25278
|
+
const parsed = {};
|
|
25279
|
+
let key;
|
|
25280
|
+
let val;
|
|
25281
|
+
let i;
|
|
25282
|
+
rawHeaders && rawHeaders.split("\n").forEach(function parser$2(line) {
|
|
25283
|
+
i = line.indexOf(":");
|
|
25284
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
25285
|
+
val = line.substring(i + 1).trim();
|
|
25286
|
+
if (!key || parsed[key] && ignoreDuplicateOf[key]) return;
|
|
25287
|
+
if (key === "set-cookie") if (parsed[key]) parsed[key].push(val);
|
|
25288
|
+
else parsed[key] = [val];
|
|
25289
|
+
else parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
|
|
25274
25290
|
});
|
|
25275
|
-
|
|
25276
|
-
customProps && Object.assign(axiosError, customProps);
|
|
25277
|
-
return axiosError;
|
|
25291
|
+
return parsed;
|
|
25278
25292
|
};
|
|
25279
|
-
|
|
25280
|
-
|
|
25281
|
-
|
|
25282
|
-
|
|
25283
|
-
|
|
25284
|
-
|
|
25285
|
-
|
|
25286
|
-
|
|
25287
|
-
|
|
25293
|
+
const $internals = Symbol("internals");
|
|
25294
|
+
const INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
25295
|
+
function trimSPorHTAB(str) {
|
|
25296
|
+
let start = 0;
|
|
25297
|
+
let end = str.length;
|
|
25298
|
+
while (start < end) {
|
|
25299
|
+
const code = str.charCodeAt(start);
|
|
25300
|
+
if (code !== 9 && code !== 32) break;
|
|
25301
|
+
start += 1;
|
|
25302
|
+
}
|
|
25303
|
+
while (end > start) {
|
|
25304
|
+
const code = str.charCodeAt(end - 1);
|
|
25305
|
+
if (code !== 9 && code !== 32) break;
|
|
25306
|
+
end -= 1;
|
|
25307
|
+
}
|
|
25308
|
+
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
25288
25309
|
}
|
|
25289
|
-
|
|
25290
|
-
|
|
25291
|
-
*
|
|
25292
|
-
* @param {string} key - The key of the parameter.
|
|
25293
|
-
*
|
|
25294
|
-
* @returns {string} the key without the brackets.
|
|
25295
|
-
*/
|
|
25296
|
-
function removeBrackets(key) {
|
|
25297
|
-
return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
25310
|
+
function normalizeHeader(header) {
|
|
25311
|
+
return header && String(header).trim().toLowerCase();
|
|
25298
25312
|
}
|
|
25299
|
-
|
|
25300
|
-
|
|
25301
|
-
*
|
|
25302
|
-
* @param {string} path - The path to the current key.
|
|
25303
|
-
* @param {string} key - The key of the current object being iterated over.
|
|
25304
|
-
* @param {string} dots - If true, the key will be rendered with dots instead of brackets.
|
|
25305
|
-
*
|
|
25306
|
-
* @returns {string} The path to the current key.
|
|
25307
|
-
*/
|
|
25308
|
-
function renderKey(path$2, key, dots) {
|
|
25309
|
-
if (!path$2) return key;
|
|
25310
|
-
return path$2.concat(key).map(function each(token, i) {
|
|
25311
|
-
token = removeBrackets(token);
|
|
25312
|
-
return !dots && i ? "[" + token + "]" : token;
|
|
25313
|
-
}).join(dots ? "." : "");
|
|
25313
|
+
function sanitizeHeaderValue(str) {
|
|
25314
|
+
return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
|
|
25314
25315
|
}
|
|
25315
|
-
|
|
25316
|
-
|
|
25317
|
-
|
|
25318
|
-
* @param {Array<any>} arr - The array to check
|
|
25319
|
-
*
|
|
25320
|
-
* @returns {boolean}
|
|
25321
|
-
*/
|
|
25322
|
-
function isFlatArray(arr) {
|
|
25323
|
-
return utils$1.isArray(arr) && !arr.some(isVisitable);
|
|
25316
|
+
function normalizeValue(value) {
|
|
25317
|
+
if (value === false || value == null) return value;
|
|
25318
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
25324
25319
|
}
|
|
25325
|
-
|
|
25326
|
-
|
|
25327
|
-
|
|
25328
|
-
|
|
25329
|
-
|
|
25330
|
-
|
|
25331
|
-
|
|
25332
|
-
|
|
25333
|
-
|
|
25334
|
-
|
|
25335
|
-
|
|
25336
|
-
|
|
25337
|
-
|
|
25338
|
-
|
|
25339
|
-
|
|
25340
|
-
|
|
25341
|
-
|
|
25342
|
-
|
|
25343
|
-
*
|
|
25344
|
-
* @param {Object<any, any>} obj - The object to convert to form data.
|
|
25345
|
-
* @param {string} formData - The FormData object to append to.
|
|
25346
|
-
* @param {Object<string, any>} options
|
|
25347
|
-
*
|
|
25348
|
-
* @returns
|
|
25349
|
-
*/
|
|
25350
|
-
function toFormData(obj, formData, options) {
|
|
25351
|
-
if (!utils$1.isObject(obj)) throw new TypeError("target must be an object");
|
|
25352
|
-
formData = formData || new (FormData__default["default"] || FormData)();
|
|
25353
|
-
options = utils$1.toFlatObject(options, {
|
|
25354
|
-
metaTokens: true,
|
|
25355
|
-
dots: false,
|
|
25356
|
-
indexes: false
|
|
25357
|
-
}, false, function defined(option, source) {
|
|
25358
|
-
return !utils$1.isUndefined(source[option]);
|
|
25320
|
+
function parseTokens(str) {
|
|
25321
|
+
const tokens = Object.create(null);
|
|
25322
|
+
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
25323
|
+
let match;
|
|
25324
|
+
while (match = tokensRE.exec(str)) tokens[match[1]] = match[2];
|
|
25325
|
+
return tokens;
|
|
25326
|
+
}
|
|
25327
|
+
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
25328
|
+
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
25329
|
+
if (utils$1.isFunction(filter)) return filter.call(this, value, header);
|
|
25330
|
+
if (isHeaderNameFilter) value = header;
|
|
25331
|
+
if (!utils$1.isString(value)) return;
|
|
25332
|
+
if (utils$1.isString(filter)) return value.indexOf(filter) !== -1;
|
|
25333
|
+
if (utils$1.isRegExp(filter)) return filter.test(value);
|
|
25334
|
+
}
|
|
25335
|
+
function formatHeader(header) {
|
|
25336
|
+
return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
25337
|
+
return char.toUpperCase() + str;
|
|
25359
25338
|
});
|
|
25360
|
-
|
|
25361
|
-
|
|
25362
|
-
const
|
|
25363
|
-
|
|
25364
|
-
|
|
25365
|
-
|
|
25366
|
-
|
|
25367
|
-
|
|
25368
|
-
|
|
25369
|
-
|
|
25370
|
-
|
|
25371
|
-
|
|
25372
|
-
|
|
25339
|
+
}
|
|
25340
|
+
function buildAccessors(obj, header) {
|
|
25341
|
+
const accessorName = utils$1.toCamelCase(" " + header);
|
|
25342
|
+
[
|
|
25343
|
+
"get",
|
|
25344
|
+
"set",
|
|
25345
|
+
"has"
|
|
25346
|
+
].forEach((methodName) => {
|
|
25347
|
+
Object.defineProperty(obj, methodName + accessorName, {
|
|
25348
|
+
__proto__: null,
|
|
25349
|
+
value: function(arg1, arg2, arg3) {
|
|
25350
|
+
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
25351
|
+
},
|
|
25352
|
+
configurable: true
|
|
25353
|
+
});
|
|
25354
|
+
});
|
|
25355
|
+
}
|
|
25356
|
+
var AxiosHeaders = class {
|
|
25357
|
+
constructor(headers) {
|
|
25358
|
+
headers && this.set(headers);
|
|
25373
25359
|
}
|
|
25374
|
-
|
|
25375
|
-
|
|
25376
|
-
|
|
25377
|
-
|
|
25378
|
-
|
|
25379
|
-
|
|
25380
|
-
|
|
25381
|
-
|
|
25382
|
-
|
|
25383
|
-
|
|
25384
|
-
|
|
25385
|
-
|
|
25386
|
-
|
|
25387
|
-
|
|
25388
|
-
|
|
25389
|
-
|
|
25390
|
-
}
|
|
25391
|
-
|
|
25392
|
-
|
|
25393
|
-
|
|
25394
|
-
|
|
25395
|
-
|
|
25360
|
+
set(header, valueOrRewrite, rewrite) {
|
|
25361
|
+
const self$1 = this;
|
|
25362
|
+
function setHeader(_value, _header, _rewrite) {
|
|
25363
|
+
const lHeader = normalizeHeader(_header);
|
|
25364
|
+
if (!lHeader) throw new Error("header name must be a non-empty string");
|
|
25365
|
+
const key = utils$1.findKey(self$1, lHeader);
|
|
25366
|
+
if (!key || self$1[key] === void 0 || _rewrite === true || _rewrite === void 0 && self$1[key] !== false) self$1[key || _header] = normalizeValue(_value);
|
|
25367
|
+
}
|
|
25368
|
+
const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
25369
|
+
if (utils$1.isPlainObject(header) || header instanceof this.constructor) setHeaders(header, valueOrRewrite);
|
|
25370
|
+
else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) setHeaders(parseHeaders(header), valueOrRewrite);
|
|
25371
|
+
else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
|
25372
|
+
let obj = {}, dest, key;
|
|
25373
|
+
for (const entry of header) {
|
|
25374
|
+
if (!utils$1.isArray(entry)) throw TypeError("Object iterator must return a key-value pair");
|
|
25375
|
+
obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
25376
|
+
}
|
|
25377
|
+
setHeaders(obj, valueOrRewrite);
|
|
25378
|
+
} else header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
25379
|
+
return this;
|
|
25380
|
+
}
|
|
25381
|
+
get(header, parser$2) {
|
|
25382
|
+
header = normalizeHeader(header);
|
|
25383
|
+
if (header) {
|
|
25384
|
+
const key = utils$1.findKey(this, header);
|
|
25385
|
+
if (key) {
|
|
25386
|
+
const value = this[key];
|
|
25387
|
+
if (!parser$2) return value;
|
|
25388
|
+
if (parser$2 === true) return parseTokens(value);
|
|
25389
|
+
if (utils$1.isFunction(parser$2)) return parser$2.call(this, value, key);
|
|
25390
|
+
if (utils$1.isRegExp(parser$2)) return parser$2.exec(value);
|
|
25391
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
25396
25392
|
}
|
|
25397
25393
|
}
|
|
25398
|
-
|
|
25399
|
-
|
|
25394
|
+
}
|
|
25395
|
+
has(header, matcher) {
|
|
25396
|
+
header = normalizeHeader(header);
|
|
25397
|
+
if (header) {
|
|
25398
|
+
const key = utils$1.findKey(this, header);
|
|
25399
|
+
return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
25400
|
+
}
|
|
25400
25401
|
return false;
|
|
25401
25402
|
}
|
|
25402
|
-
|
|
25403
|
-
|
|
25404
|
-
|
|
25405
|
-
|
|
25406
|
-
|
|
25407
|
-
|
|
25408
|
-
|
|
25409
|
-
|
|
25410
|
-
|
|
25411
|
-
|
|
25412
|
-
|
|
25413
|
-
|
|
25403
|
+
delete(header, matcher) {
|
|
25404
|
+
const self$1 = this;
|
|
25405
|
+
let deleted = false;
|
|
25406
|
+
function deleteHeader(_header) {
|
|
25407
|
+
_header = normalizeHeader(_header);
|
|
25408
|
+
if (_header) {
|
|
25409
|
+
const key = utils$1.findKey(self$1, _header);
|
|
25410
|
+
if (key && (!matcher || matchHeaderValue(self$1, self$1[key], key, matcher))) {
|
|
25411
|
+
delete self$1[key];
|
|
25412
|
+
deleted = true;
|
|
25413
|
+
}
|
|
25414
|
+
}
|
|
25415
|
+
}
|
|
25416
|
+
if (utils$1.isArray(header)) header.forEach(deleteHeader);
|
|
25417
|
+
else deleteHeader(header);
|
|
25418
|
+
return deleted;
|
|
25419
|
+
}
|
|
25420
|
+
clear(matcher) {
|
|
25421
|
+
const keys = Object.keys(this);
|
|
25422
|
+
let i = keys.length;
|
|
25423
|
+
let deleted = false;
|
|
25424
|
+
while (i--) {
|
|
25425
|
+
const key = keys[i];
|
|
25426
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
25427
|
+
delete this[key];
|
|
25428
|
+
deleted = true;
|
|
25429
|
+
}
|
|
25430
|
+
}
|
|
25431
|
+
return deleted;
|
|
25432
|
+
}
|
|
25433
|
+
normalize(format) {
|
|
25434
|
+
const self$1 = this;
|
|
25435
|
+
const headers = {};
|
|
25436
|
+
utils$1.forEach(this, (value, header) => {
|
|
25437
|
+
const key = utils$1.findKey(headers, header);
|
|
25438
|
+
if (key) {
|
|
25439
|
+
self$1[key] = normalizeValue(value);
|
|
25440
|
+
delete self$1[header];
|
|
25441
|
+
return;
|
|
25442
|
+
}
|
|
25443
|
+
const normalized = format ? formatHeader(header) : String(header).trim();
|
|
25444
|
+
if (normalized !== header) delete self$1[header];
|
|
25445
|
+
self$1[normalized] = normalizeValue(value);
|
|
25446
|
+
headers[normalized] = true;
|
|
25414
25447
|
});
|
|
25415
|
-
|
|
25448
|
+
return this;
|
|
25416
25449
|
}
|
|
25417
|
-
|
|
25418
|
-
|
|
25419
|
-
|
|
25450
|
+
concat(...targets) {
|
|
25451
|
+
return this.constructor.concat(this, ...targets);
|
|
25452
|
+
}
|
|
25453
|
+
toJSON(asStrings) {
|
|
25454
|
+
const obj = Object.create(null);
|
|
25455
|
+
utils$1.forEach(this, (value, header) => {
|
|
25456
|
+
value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
|
|
25457
|
+
});
|
|
25458
|
+
return obj;
|
|
25459
|
+
}
|
|
25460
|
+
[Symbol.iterator]() {
|
|
25461
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
25462
|
+
}
|
|
25463
|
+
toString() {
|
|
25464
|
+
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
25465
|
+
}
|
|
25466
|
+
getSetCookie() {
|
|
25467
|
+
return this.get("set-cookie") || [];
|
|
25468
|
+
}
|
|
25469
|
+
get [Symbol.toStringTag]() {
|
|
25470
|
+
return "AxiosHeaders";
|
|
25471
|
+
}
|
|
25472
|
+
static from(thing) {
|
|
25473
|
+
return thing instanceof this ? thing : new this(thing);
|
|
25474
|
+
}
|
|
25475
|
+
static concat(first, ...targets) {
|
|
25476
|
+
const computed = new this(first);
|
|
25477
|
+
targets.forEach((target) => computed.set(target));
|
|
25478
|
+
return computed;
|
|
25479
|
+
}
|
|
25480
|
+
static accessor(header) {
|
|
25481
|
+
const accessors = (this[$internals] = this[$internals] = { accessors: {} }).accessors;
|
|
25482
|
+
const prototype$1 = this.prototype;
|
|
25483
|
+
function defineAccessor(_header) {
|
|
25484
|
+
const lHeader = normalizeHeader(_header);
|
|
25485
|
+
if (!accessors[lHeader]) {
|
|
25486
|
+
buildAccessors(prototype$1, _header);
|
|
25487
|
+
accessors[lHeader] = true;
|
|
25488
|
+
}
|
|
25489
|
+
}
|
|
25490
|
+
utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
25491
|
+
return this;
|
|
25492
|
+
}
|
|
25493
|
+
};
|
|
25494
|
+
AxiosHeaders.accessor([
|
|
25495
|
+
"Content-Type",
|
|
25496
|
+
"Content-Length",
|
|
25497
|
+
"Accept",
|
|
25498
|
+
"Accept-Encoding",
|
|
25499
|
+
"User-Agent",
|
|
25500
|
+
"Authorization"
|
|
25501
|
+
]);
|
|
25502
|
+
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
25503
|
+
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
25504
|
+
return {
|
|
25505
|
+
get: () => value,
|
|
25506
|
+
set(headerValue) {
|
|
25507
|
+
this[mapped] = headerValue;
|
|
25508
|
+
}
|
|
25509
|
+
};
|
|
25510
|
+
});
|
|
25511
|
+
utils$1.freezeMethods(AxiosHeaders);
|
|
25512
|
+
const REDACTED = "[REDACTED ****]";
|
|
25513
|
+
function hasOwnOrPrototypeToJSON(source) {
|
|
25514
|
+
if (utils$1.hasOwnProp(source, "toJSON")) return true;
|
|
25515
|
+
let prototype$1 = Object.getPrototypeOf(source);
|
|
25516
|
+
while (prototype$1 && prototype$1 !== Object.prototype) {
|
|
25517
|
+
if (utils$1.hasOwnProp(prototype$1, "toJSON")) return true;
|
|
25518
|
+
prototype$1 = Object.getPrototypeOf(prototype$1);
|
|
25519
|
+
}
|
|
25520
|
+
return false;
|
|
25521
|
+
}
|
|
25522
|
+
function redactConfig(config, redactKeys) {
|
|
25523
|
+
const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
|
|
25524
|
+
const seen = [];
|
|
25525
|
+
const visit$6 = (source) => {
|
|
25526
|
+
if (source === null || typeof source !== "object") return source;
|
|
25527
|
+
if (utils$1.isBuffer(source)) return source;
|
|
25528
|
+
if (seen.indexOf(source) !== -1) return void 0;
|
|
25529
|
+
if (source instanceof AxiosHeaders) source = source.toJSON();
|
|
25530
|
+
seen.push(source);
|
|
25531
|
+
let result;
|
|
25532
|
+
if (utils$1.isArray(source)) {
|
|
25533
|
+
result = [];
|
|
25534
|
+
source.forEach((v, i) => {
|
|
25535
|
+
const reducedValue = visit$6(v);
|
|
25536
|
+
if (!utils$1.isUndefined(reducedValue)) result[i] = reducedValue;
|
|
25537
|
+
});
|
|
25538
|
+
} else {
|
|
25539
|
+
if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
|
|
25540
|
+
seen.pop();
|
|
25541
|
+
return source;
|
|
25542
|
+
}
|
|
25543
|
+
result = Object.create(null);
|
|
25544
|
+
for (const [key, value] of Object.entries(source)) {
|
|
25545
|
+
const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit$6(value);
|
|
25546
|
+
if (!utils$1.isUndefined(reducedValue)) result[key] = reducedValue;
|
|
25547
|
+
}
|
|
25548
|
+
}
|
|
25549
|
+
seen.pop();
|
|
25550
|
+
return result;
|
|
25551
|
+
};
|
|
25552
|
+
return visit$6(config);
|
|
25420
25553
|
}
|
|
25554
|
+
var AxiosError = class AxiosError extends Error {
|
|
25555
|
+
static from(error, code, config, request, response, customProps) {
|
|
25556
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
25557
|
+
axiosError.cause = error;
|
|
25558
|
+
axiosError.name = error.name;
|
|
25559
|
+
if (error.status != null && axiosError.status == null) axiosError.status = error.status;
|
|
25560
|
+
customProps && Object.assign(axiosError, customProps);
|
|
25561
|
+
return axiosError;
|
|
25562
|
+
}
|
|
25563
|
+
/**
|
|
25564
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
25565
|
+
*
|
|
25566
|
+
* @param {string} message The error message.
|
|
25567
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
25568
|
+
* @param {Object} [config] The config.
|
|
25569
|
+
* @param {Object} [request] The request.
|
|
25570
|
+
* @param {Object} [response] The response.
|
|
25571
|
+
*
|
|
25572
|
+
* @returns {Error} The created error.
|
|
25573
|
+
*/
|
|
25574
|
+
constructor(message, code, config, request, response) {
|
|
25575
|
+
super(message);
|
|
25576
|
+
Object.defineProperty(this, "message", {
|
|
25577
|
+
__proto__: null,
|
|
25578
|
+
value: message,
|
|
25579
|
+
enumerable: true,
|
|
25580
|
+
writable: true,
|
|
25581
|
+
configurable: true
|
|
25582
|
+
});
|
|
25583
|
+
this.name = "AxiosError";
|
|
25584
|
+
this.isAxiosError = true;
|
|
25585
|
+
code && (this.code = code);
|
|
25586
|
+
config && (this.config = config);
|
|
25587
|
+
request && (this.request = request);
|
|
25588
|
+
if (response) {
|
|
25589
|
+
this.response = response;
|
|
25590
|
+
this.status = response.status;
|
|
25591
|
+
}
|
|
25592
|
+
}
|
|
25593
|
+
toJSON() {
|
|
25594
|
+
const config = this.config;
|
|
25595
|
+
const redactKeys = config && utils$1.hasOwnProp(config, "redact") ? config.redact : void 0;
|
|
25596
|
+
const serializedConfig = utils$1.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils$1.toJSONObject(config);
|
|
25597
|
+
return {
|
|
25598
|
+
message: this.message,
|
|
25599
|
+
name: this.name,
|
|
25600
|
+
description: this.description,
|
|
25601
|
+
number: this.number,
|
|
25602
|
+
fileName: this.fileName,
|
|
25603
|
+
lineNumber: this.lineNumber,
|
|
25604
|
+
columnNumber: this.columnNumber,
|
|
25605
|
+
stack: this.stack,
|
|
25606
|
+
config: serializedConfig,
|
|
25607
|
+
code: this.code,
|
|
25608
|
+
status: this.status
|
|
25609
|
+
};
|
|
25610
|
+
}
|
|
25611
|
+
};
|
|
25612
|
+
AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
25613
|
+
AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
25614
|
+
AxiosError.ECONNABORTED = "ECONNABORTED";
|
|
25615
|
+
AxiosError.ETIMEDOUT = "ETIMEDOUT";
|
|
25616
|
+
AxiosError.ECONNREFUSED = "ECONNREFUSED";
|
|
25617
|
+
AxiosError.ERR_NETWORK = "ERR_NETWORK";
|
|
25618
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
25619
|
+
AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
25620
|
+
AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
25621
|
+
AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
25622
|
+
AxiosError.ERR_CANCELED = "ERR_CANCELED";
|
|
25623
|
+
AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
25624
|
+
AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
25625
|
+
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
25421
25626
|
/**
|
|
25422
|
-
*
|
|
25423
|
-
* their percent-encoded equivalents
|
|
25627
|
+
* Determines if the given thing is a array or js object.
|
|
25424
25628
|
*
|
|
25425
|
-
* @param {string}
|
|
25629
|
+
* @param {string} thing - The object or array to be visited.
|
|
25426
25630
|
*
|
|
25427
|
-
* @returns {
|
|
25631
|
+
* @returns {boolean}
|
|
25428
25632
|
*/
|
|
25429
|
-
function
|
|
25430
|
-
|
|
25431
|
-
"!": "%21",
|
|
25432
|
-
"'": "%27",
|
|
25433
|
-
"(": "%28",
|
|
25434
|
-
")": "%29",
|
|
25435
|
-
"~": "%7E",
|
|
25436
|
-
"%20": "+",
|
|
25437
|
-
"%00": "\0"
|
|
25438
|
-
};
|
|
25439
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
25440
|
-
return charMap[match];
|
|
25441
|
-
});
|
|
25633
|
+
function isVisitable(thing) {
|
|
25634
|
+
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
25442
25635
|
}
|
|
25443
25636
|
/**
|
|
25444
|
-
* It
|
|
25637
|
+
* It removes the brackets from the end of a string
|
|
25445
25638
|
*
|
|
25446
|
-
* @param {
|
|
25447
|
-
* @param {Object<string, any>} options - The options object passed to the Axios constructor.
|
|
25639
|
+
* @param {string} key - The key of the parameter.
|
|
25448
25640
|
*
|
|
25449
|
-
* @returns {
|
|
25641
|
+
* @returns {string} the key without the brackets.
|
|
25450
25642
|
*/
|
|
25451
|
-
function
|
|
25452
|
-
|
|
25643
|
+
function removeBrackets(key) {
|
|
25644
|
+
return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
25645
|
+
}
|
|
25646
|
+
/**
|
|
25647
|
+
* It takes a path, a key, and a boolean, and returns a string
|
|
25648
|
+
*
|
|
25649
|
+
* @param {string} path - The path to the current key.
|
|
25650
|
+
* @param {string} key - The key of the current object being iterated over.
|
|
25651
|
+
* @param {string} dots - If true, the key will be rendered with dots instead of brackets.
|
|
25652
|
+
*
|
|
25653
|
+
* @returns {string} The path to the current key.
|
|
25654
|
+
*/
|
|
25655
|
+
function renderKey(path$3, key, dots) {
|
|
25656
|
+
if (!path$3) return key;
|
|
25657
|
+
return path$3.concat(key).map(function each(token, i) {
|
|
25658
|
+
token = removeBrackets(token);
|
|
25659
|
+
return !dots && i ? "[" + token + "]" : token;
|
|
25660
|
+
}).join(dots ? "." : "");
|
|
25661
|
+
}
|
|
25662
|
+
/**
|
|
25663
|
+
* If the array is an array and none of its elements are visitable, then it's a flat array.
|
|
25664
|
+
*
|
|
25665
|
+
* @param {Array<any>} arr - The array to check
|
|
25666
|
+
*
|
|
25667
|
+
* @returns {boolean}
|
|
25668
|
+
*/
|
|
25669
|
+
function isFlatArray(arr) {
|
|
25670
|
+
return utils$1.isArray(arr) && !arr.some(isVisitable);
|
|
25671
|
+
}
|
|
25672
|
+
const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
|
|
25673
|
+
return /^is[A-Z]/.test(prop);
|
|
25674
|
+
});
|
|
25675
|
+
/**
|
|
25676
|
+
* Convert a data object to FormData
|
|
25677
|
+
*
|
|
25678
|
+
* @param {Object} obj
|
|
25679
|
+
* @param {?Object} [formData]
|
|
25680
|
+
* @param {?Object} [options]
|
|
25681
|
+
* @param {Function} [options.visitor]
|
|
25682
|
+
* @param {Boolean} [options.metaTokens = true]
|
|
25683
|
+
* @param {Boolean} [options.dots = false]
|
|
25684
|
+
* @param {?Boolean} [options.indexes = false]
|
|
25685
|
+
*
|
|
25686
|
+
* @returns {Object}
|
|
25687
|
+
**/
|
|
25688
|
+
/**
|
|
25689
|
+
* It converts an object into a FormData object
|
|
25690
|
+
*
|
|
25691
|
+
* @param {Object<any, any>} obj - The object to convert to form data.
|
|
25692
|
+
* @param {string} formData - The FormData object to append to.
|
|
25693
|
+
* @param {Object<string, any>} options
|
|
25694
|
+
*
|
|
25695
|
+
* @returns
|
|
25696
|
+
*/
|
|
25697
|
+
function toFormData(obj, formData, options) {
|
|
25698
|
+
if (!utils$1.isObject(obj)) throw new TypeError("target must be an object");
|
|
25699
|
+
formData = formData || new (FormData$1 || FormData)();
|
|
25700
|
+
options = utils$1.toFlatObject(options, {
|
|
25701
|
+
metaTokens: true,
|
|
25702
|
+
dots: false,
|
|
25703
|
+
indexes: false
|
|
25704
|
+
}, false, function defined(option, source) {
|
|
25705
|
+
return !utils$1.isUndefined(source[option]);
|
|
25706
|
+
});
|
|
25707
|
+
const metaTokens = options.metaTokens;
|
|
25708
|
+
const visitor = options.visitor || defaultVisitor;
|
|
25709
|
+
const dots = options.dots;
|
|
25710
|
+
const indexes = options.indexes;
|
|
25711
|
+
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
25712
|
+
const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
|
|
25713
|
+
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
25714
|
+
if (!utils$1.isFunction(visitor)) throw new TypeError("visitor must be a function");
|
|
25715
|
+
function convertValue(value) {
|
|
25716
|
+
if (value === null) return "";
|
|
25717
|
+
if (utils$1.isDate(value)) return value.toISOString();
|
|
25718
|
+
if (utils$1.isBoolean(value)) return value.toString();
|
|
25719
|
+
if (!useBlob && utils$1.isBlob(value)) throw new AxiosError("Blob is not supported. Use a Buffer instead.");
|
|
25720
|
+
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
|
|
25721
|
+
return value;
|
|
25722
|
+
}
|
|
25723
|
+
/**
|
|
25724
|
+
* Default visitor.
|
|
25725
|
+
*
|
|
25726
|
+
* @param {*} value
|
|
25727
|
+
* @param {String|Number} key
|
|
25728
|
+
* @param {Array<String|Number>} path
|
|
25729
|
+
* @this {FormData}
|
|
25730
|
+
*
|
|
25731
|
+
* @returns {boolean} return true to visit the each prop of the value recursively
|
|
25732
|
+
*/
|
|
25733
|
+
function defaultVisitor(value, key, path$3) {
|
|
25734
|
+
let arr = value;
|
|
25735
|
+
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
|
|
25736
|
+
formData.append(renderKey(path$3, key, dots), convertValue(value));
|
|
25737
|
+
return false;
|
|
25738
|
+
}
|
|
25739
|
+
if (value && !path$3 && typeof value === "object") {
|
|
25740
|
+
if (utils$1.endsWith(key, "{}")) {
|
|
25741
|
+
key = metaTokens ? key : key.slice(0, -2);
|
|
25742
|
+
value = JSON.stringify(value);
|
|
25743
|
+
} else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
|
|
25744
|
+
key = removeBrackets(key);
|
|
25745
|
+
arr.forEach(function each(el, index) {
|
|
25746
|
+
!(utils$1.isUndefined(el) || el === null) && formData.append(indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", convertValue(el));
|
|
25747
|
+
});
|
|
25748
|
+
return false;
|
|
25749
|
+
}
|
|
25750
|
+
}
|
|
25751
|
+
if (isVisitable(value)) return true;
|
|
25752
|
+
formData.append(renderKey(path$3, key, dots), convertValue(value));
|
|
25753
|
+
return false;
|
|
25754
|
+
}
|
|
25755
|
+
const stack = [];
|
|
25756
|
+
const exposedHelpers = Object.assign(predicates, {
|
|
25757
|
+
defaultVisitor,
|
|
25758
|
+
convertValue,
|
|
25759
|
+
isVisitable
|
|
25760
|
+
});
|
|
25761
|
+
function build(value, path$3, depth = 0) {
|
|
25762
|
+
if (utils$1.isUndefined(value)) return;
|
|
25763
|
+
if (depth > maxDepth) throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
25764
|
+
if (stack.indexOf(value) !== -1) throw Error("Circular reference detected in " + path$3.join("."));
|
|
25765
|
+
stack.push(value);
|
|
25766
|
+
utils$1.forEach(value, function each(el, key) {
|
|
25767
|
+
if ((!(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path$3, exposedHelpers)) === true) build(el, path$3 ? path$3.concat(key) : [key], depth + 1);
|
|
25768
|
+
});
|
|
25769
|
+
stack.pop();
|
|
25770
|
+
}
|
|
25771
|
+
if (!utils$1.isObject(obj)) throw new TypeError("data must be an object");
|
|
25772
|
+
build(obj);
|
|
25773
|
+
return formData;
|
|
25774
|
+
}
|
|
25775
|
+
/**
|
|
25776
|
+
* It encodes a string by replacing all characters that are not in the unreserved set with
|
|
25777
|
+
* their percent-encoded equivalents
|
|
25778
|
+
*
|
|
25779
|
+
* @param {string} str - The string to encode.
|
|
25780
|
+
*
|
|
25781
|
+
* @returns {string} The encoded string.
|
|
25782
|
+
*/
|
|
25783
|
+
function encode$1(str) {
|
|
25784
|
+
const charMap = {
|
|
25785
|
+
"!": "%21",
|
|
25786
|
+
"'": "%27",
|
|
25787
|
+
"(": "%28",
|
|
25788
|
+
")": "%29",
|
|
25789
|
+
"~": "%7E",
|
|
25790
|
+
"%20": "+"
|
|
25791
|
+
};
|
|
25792
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
|
|
25793
|
+
return charMap[match];
|
|
25794
|
+
});
|
|
25795
|
+
}
|
|
25796
|
+
/**
|
|
25797
|
+
* It takes a params object and converts it to a FormData object
|
|
25798
|
+
*
|
|
25799
|
+
* @param {Object<string, any>} params - The parameters to be converted to a FormData object.
|
|
25800
|
+
* @param {Object<string, any>} options - The options object passed to the Axios constructor.
|
|
25801
|
+
*
|
|
25802
|
+
* @returns {void}
|
|
25803
|
+
*/
|
|
25804
|
+
function AxiosURLSearchParams(params, options) {
|
|
25805
|
+
this._pairs = [];
|
|
25453
25806
|
params && toFormData(params, this, options);
|
|
25454
25807
|
}
|
|
25455
25808
|
const prototype = AxiosURLSearchParams.prototype;
|
|
@@ -25465,8 +25818,8 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25465
25818
|
}, "").join("&");
|
|
25466
25819
|
};
|
|
25467
25820
|
/**
|
|
25468
|
-
* It replaces
|
|
25469
|
-
*
|
|
25821
|
+
* It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
|
|
25822
|
+
* their plain counterparts (`:`, `$`, `,`, `+`).
|
|
25470
25823
|
*
|
|
25471
25824
|
* @param {string} val The value to be encoded.
|
|
25472
25825
|
*
|
|
@@ -25487,11 +25840,11 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25487
25840
|
function buildURL(url$2, params, options) {
|
|
25488
25841
|
if (!params) return url$2;
|
|
25489
25842
|
const _encode = options && options.encode || encode;
|
|
25490
|
-
|
|
25491
|
-
const serializeFn =
|
|
25843
|
+
const _options = utils$1.isFunction(options) ? { serialize: options } : options;
|
|
25844
|
+
const serializeFn = _options && _options.serialize;
|
|
25492
25845
|
let serializedParams;
|
|
25493
|
-
if (serializeFn) serializedParams = serializeFn(params,
|
|
25494
|
-
else serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params,
|
|
25846
|
+
if (serializeFn) serializedParams = serializeFn(params, _options);
|
|
25847
|
+
else serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
25495
25848
|
if (serializedParams) {
|
|
25496
25849
|
const hashmarkIndex = url$2.indexOf("#");
|
|
25497
25850
|
if (hashmarkIndex !== -1) url$2 = url$2.slice(0, hashmarkIndex);
|
|
@@ -25508,6 +25861,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25508
25861
|
*
|
|
25509
25862
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
25510
25863
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
25864
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
25511
25865
|
*
|
|
25512
25866
|
* @return {Number} An ID used to remove interceptor later
|
|
25513
25867
|
*/
|
|
@@ -25554,13 +25908,13 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25554
25908
|
});
|
|
25555
25909
|
}
|
|
25556
25910
|
};
|
|
25557
|
-
|
|
25558
|
-
const transitionalDefaults = {
|
|
25911
|
+
var transitionalDefaults = {
|
|
25559
25912
|
silentJSONParsing: true,
|
|
25560
25913
|
forcedJSONParsing: true,
|
|
25561
|
-
clarifyTimeoutError: false
|
|
25914
|
+
clarifyTimeoutError: false,
|
|
25915
|
+
legacyInterceptorReqResOrdering: true
|
|
25562
25916
|
};
|
|
25563
|
-
|
|
25917
|
+
var URLSearchParams = url.URLSearchParams;
|
|
25564
25918
|
const ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
25565
25919
|
const DIGIT = "0123456789";
|
|
25566
25920
|
const ALPHABET = {
|
|
@@ -25572,15 +25926,15 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25572
25926
|
let str = "";
|
|
25573
25927
|
const { length } = alphabet;
|
|
25574
25928
|
const randomValues = new Uint32Array(size);
|
|
25575
|
-
|
|
25929
|
+
crypto.randomFillSync(randomValues);
|
|
25576
25930
|
for (let i = 0; i < size; i++) str += alphabet[randomValues[i] % length];
|
|
25577
25931
|
return str;
|
|
25578
25932
|
};
|
|
25579
|
-
|
|
25933
|
+
var platform$1 = {
|
|
25580
25934
|
isNode: true,
|
|
25581
25935
|
classes: {
|
|
25582
25936
|
URLSearchParams,
|
|
25583
|
-
FormData:
|
|
25937
|
+
FormData: FormData$1,
|
|
25584
25938
|
Blob: typeof Blob !== "undefined" && Blob || null
|
|
25585
25939
|
},
|
|
25586
25940
|
ALPHABET,
|
|
@@ -25629,12 +25983,12 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25629
25983
|
return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
25630
25984
|
})();
|
|
25631
25985
|
const origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
25632
|
-
|
|
25986
|
+
var platform = {
|
|
25633
25987
|
.../* @__PURE__ */ Object.freeze({
|
|
25634
25988
|
__proto__: null,
|
|
25635
25989
|
hasBrowserEnv,
|
|
25636
|
-
hasStandardBrowserWebWorkerEnv,
|
|
25637
25990
|
hasStandardBrowserEnv,
|
|
25991
|
+
hasStandardBrowserWebWorkerEnv,
|
|
25638
25992
|
navigator: _navigator,
|
|
25639
25993
|
origin
|
|
25640
25994
|
}),
|
|
@@ -25642,7 +25996,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25642
25996
|
};
|
|
25643
25997
|
function toURLEncodedForm(data, options) {
|
|
25644
25998
|
return toFormData(data, new platform.classes.URLSearchParams(), {
|
|
25645
|
-
visitor: function(value, key, path$
|
|
25999
|
+
visitor: function(value, key, path$3, helpers) {
|
|
25646
26000
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
25647
26001
|
this.append(key, value.toString("base64"));
|
|
25648
26002
|
return false;
|
|
@@ -25691,19 +26045,19 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25691
26045
|
* @returns {Object<string, any> | null} The converted object.
|
|
25692
26046
|
*/
|
|
25693
26047
|
function formDataToJSON(formData) {
|
|
25694
|
-
function buildPath(path$
|
|
25695
|
-
let name = path$
|
|
26048
|
+
function buildPath(path$3, value, target, index) {
|
|
26049
|
+
let name = path$3[index++];
|
|
25696
26050
|
if (name === "__proto__") return true;
|
|
25697
26051
|
const isNumericKey = Number.isFinite(+name);
|
|
25698
|
-
const isLast = index >= path$
|
|
26052
|
+
const isLast = index >= path$3.length;
|
|
25699
26053
|
name = !name && utils$1.isArray(target) ? target.length : name;
|
|
25700
26054
|
if (isLast) {
|
|
25701
|
-
if (utils$1.hasOwnProp(target, name)) target[name] = [target[name], value];
|
|
26055
|
+
if (utils$1.hasOwnProp(target, name)) target[name] = utils$1.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
|
|
25702
26056
|
else target[name] = value;
|
|
25703
26057
|
return !isNumericKey;
|
|
25704
26058
|
}
|
|
25705
26059
|
if (!target[name] || !utils$1.isObject(target[name])) target[name] = [];
|
|
25706
|
-
if (buildPath(path$
|
|
26060
|
+
if (buildPath(path$3, value, target[name], index) && utils$1.isArray(target[name])) target[name] = arrayToObject(target[name]);
|
|
25707
26061
|
return !isNumericKey;
|
|
25708
26062
|
}
|
|
25709
26063
|
if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
|
|
@@ -25715,6 +26069,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25715
26069
|
}
|
|
25716
26070
|
return null;
|
|
25717
26071
|
}
|
|
26072
|
+
const own = (obj, key) => obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : void 0;
|
|
25718
26073
|
/**
|
|
25719
26074
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
25720
26075
|
* of the input
|
|
@@ -25732,336 +26087,90 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
25732
26087
|
} catch (e$1) {
|
|
25733
26088
|
if (e$1.name !== "SyntaxError") throw e$1;
|
|
25734
26089
|
}
|
|
25735
|
-
return (encoder || JSON.stringify)(rawValue);
|
|
25736
|
-
}
|
|
25737
|
-
const defaults = {
|
|
25738
|
-
transitional: transitionalDefaults,
|
|
25739
|
-
adapter: [
|
|
25740
|
-
"xhr",
|
|
25741
|
-
"http",
|
|
25742
|
-
"fetch"
|
|
25743
|
-
],
|
|
25744
|
-
transformRequest: [function transformRequest(data, headers) {
|
|
25745
|
-
const contentType$1 = headers.getContentType() || "";
|
|
25746
|
-
const hasJSONContentType = contentType$1.indexOf("application/json") > -1;
|
|
25747
|
-
const isObjectPayload = utils$1.isObject(data);
|
|
25748
|
-
if (isObjectPayload && utils$1.isHTMLForm(data)) data = new FormData(data);
|
|
25749
|
-
if (utils$1.isFormData(data)) return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
25750
|
-
if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) return data;
|
|
25751
|
-
if (utils$1.isArrayBufferView(data)) return data.buffer;
|
|
25752
|
-
if (utils$1.isURLSearchParams(data)) {
|
|
25753
|
-
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
25754
|
-
return data.toString();
|
|
25755
|
-
}
|
|
25756
|
-
let isFileList$1;
|
|
25757
|
-
if (isObjectPayload) {
|
|
25758
|
-
|
|
25759
|
-
if (
|
|
25760
|
-
|
|
25761
|
-
|
|
25762
|
-
|
|
25763
|
-
|
|
25764
|
-
if (isObjectPayload || hasJSONContentType) {
|
|
25765
|
-
headers.setContentType("application/json", false);
|
|
25766
|
-
return stringifySafely(data);
|
|
25767
|
-
}
|
|
25768
|
-
return data;
|
|
25769
|
-
}],
|
|
25770
|
-
transformResponse: [function transformResponse(data) {
|
|
25771
|
-
const transitional = this.transitional || defaults.transitional;
|
|
25772
|
-
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
25773
|
-
const JSONRequested = this.responseType === "json";
|
|
25774
|
-
if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) return data;
|
|
25775
|
-
if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
25776
|
-
const strictJSONParsing = !(transitional && transitional.silentJSONParsing) && JSONRequested;
|
|
25777
|
-
try {
|
|
25778
|
-
return JSON.parse(data, this.parseReviver);
|
|
25779
|
-
} catch (e$1) {
|
|
25780
|
-
if (strictJSONParsing) {
|
|
25781
|
-
if (e$1.name === "SyntaxError") throw AxiosError.from(e$1, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
25782
|
-
throw e$1;
|
|
25783
|
-
}
|
|
25784
|
-
}
|
|
25785
|
-
}
|
|
25786
|
-
return data;
|
|
25787
|
-
}],
|
|
25788
|
-
timeout: 0,
|
|
25789
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
25790
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
25791
|
-
maxContentLength: -1,
|
|
25792
|
-
maxBodyLength: -1,
|
|
25793
|
-
env: {
|
|
25794
|
-
FormData: platform.classes.FormData,
|
|
25795
|
-
Blob: platform.classes.Blob
|
|
25796
|
-
},
|
|
25797
|
-
validateStatus: function validateStatus(status) {
|
|
25798
|
-
return status >= 200 && status < 300;
|
|
25799
|
-
},
|
|
25800
|
-
headers: { common: {
|
|
25801
|
-
"Accept": "application/json, text/plain, */*",
|
|
25802
|
-
"Content-Type": void 0
|
|
25803
|
-
} }
|
|
25804
|
-
};
|
|
25805
|
-
utils$1.forEach([
|
|
25806
|
-
"delete",
|
|
25807
|
-
"get",
|
|
25808
|
-
"head",
|
|
25809
|
-
"post",
|
|
25810
|
-
"put",
|
|
25811
|
-
"patch"
|
|
25812
|
-
], (method) => {
|
|
25813
|
-
defaults.headers[method] = {};
|
|
25814
|
-
});
|
|
25815
|
-
const defaults$1 = defaults;
|
|
25816
|
-
const ignoreDuplicateOf = utils$1.toObjectSet([
|
|
25817
|
-
"age",
|
|
25818
|
-
"authorization",
|
|
25819
|
-
"content-length",
|
|
25820
|
-
"content-type",
|
|
25821
|
-
"etag",
|
|
25822
|
-
"expires",
|
|
25823
|
-
"from",
|
|
25824
|
-
"host",
|
|
25825
|
-
"if-modified-since",
|
|
25826
|
-
"if-unmodified-since",
|
|
25827
|
-
"last-modified",
|
|
25828
|
-
"location",
|
|
25829
|
-
"max-forwards",
|
|
25830
|
-
"proxy-authorization",
|
|
25831
|
-
"referer",
|
|
25832
|
-
"retry-after",
|
|
25833
|
-
"user-agent"
|
|
25834
|
-
]);
|
|
25835
|
-
/**
|
|
25836
|
-
* Parse headers into an object
|
|
25837
|
-
*
|
|
25838
|
-
* ```
|
|
25839
|
-
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
|
25840
|
-
* Content-Type: application/json
|
|
25841
|
-
* Connection: keep-alive
|
|
25842
|
-
* Transfer-Encoding: chunked
|
|
25843
|
-
* ```
|
|
25844
|
-
*
|
|
25845
|
-
* @param {String} rawHeaders Headers needing to be parsed
|
|
25846
|
-
*
|
|
25847
|
-
* @returns {Object} Headers parsed into an object
|
|
25848
|
-
*/
|
|
25849
|
-
const parseHeaders = (rawHeaders) => {
|
|
25850
|
-
const parsed = {};
|
|
25851
|
-
let key;
|
|
25852
|
-
let val;
|
|
25853
|
-
let i;
|
|
25854
|
-
rawHeaders && rawHeaders.split("\n").forEach(function parser$2(line) {
|
|
25855
|
-
i = line.indexOf(":");
|
|
25856
|
-
key = line.substring(0, i).trim().toLowerCase();
|
|
25857
|
-
val = line.substring(i + 1).trim();
|
|
25858
|
-
if (!key || parsed[key] && ignoreDuplicateOf[key]) return;
|
|
25859
|
-
if (key === "set-cookie") if (parsed[key]) parsed[key].push(val);
|
|
25860
|
-
else parsed[key] = [val];
|
|
25861
|
-
else parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
|
|
25862
|
-
});
|
|
25863
|
-
return parsed;
|
|
25864
|
-
};
|
|
25865
|
-
const $internals = Symbol("internals");
|
|
25866
|
-
function normalizeHeader(header) {
|
|
25867
|
-
return header && String(header).trim().toLowerCase();
|
|
25868
|
-
}
|
|
25869
|
-
function normalizeValue(value) {
|
|
25870
|
-
if (value === false || value == null) return value;
|
|
25871
|
-
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
25872
|
-
}
|
|
25873
|
-
function parseTokens(str) {
|
|
25874
|
-
const tokens = Object.create(null);
|
|
25875
|
-
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
25876
|
-
let match;
|
|
25877
|
-
while (match = tokensRE.exec(str)) tokens[match[1]] = match[2];
|
|
25878
|
-
return tokens;
|
|
25879
|
-
}
|
|
25880
|
-
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
25881
|
-
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
25882
|
-
if (utils$1.isFunction(filter)) return filter.call(this, value, header);
|
|
25883
|
-
if (isHeaderNameFilter) value = header;
|
|
25884
|
-
if (!utils$1.isString(value)) return;
|
|
25885
|
-
if (utils$1.isString(filter)) return value.indexOf(filter) !== -1;
|
|
25886
|
-
if (utils$1.isRegExp(filter)) return filter.test(value);
|
|
25887
|
-
}
|
|
25888
|
-
function formatHeader(header) {
|
|
25889
|
-
return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
25890
|
-
return char.toUpperCase() + str;
|
|
25891
|
-
});
|
|
25892
|
-
}
|
|
25893
|
-
function buildAccessors(obj, header) {
|
|
25894
|
-
const accessorName = utils$1.toCamelCase(" " + header);
|
|
25895
|
-
[
|
|
25896
|
-
"get",
|
|
25897
|
-
"set",
|
|
25898
|
-
"has"
|
|
25899
|
-
].forEach((methodName) => {
|
|
25900
|
-
Object.defineProperty(obj, methodName + accessorName, {
|
|
25901
|
-
value: function(arg1, arg2, arg3) {
|
|
25902
|
-
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
25903
|
-
},
|
|
25904
|
-
configurable: true
|
|
25905
|
-
});
|
|
25906
|
-
});
|
|
25907
|
-
}
|
|
25908
|
-
var AxiosHeaders = class {
|
|
25909
|
-
constructor(headers) {
|
|
25910
|
-
headers && this.set(headers);
|
|
25911
|
-
}
|
|
25912
|
-
set(header, valueOrRewrite, rewrite) {
|
|
25913
|
-
const self$1 = this;
|
|
25914
|
-
function setHeader(_value, _header, _rewrite) {
|
|
25915
|
-
const lHeader = normalizeHeader(_header);
|
|
25916
|
-
if (!lHeader) throw new Error("header name must be a non-empty string");
|
|
25917
|
-
const key = utils$1.findKey(self$1, lHeader);
|
|
25918
|
-
if (!key || self$1[key] === void 0 || _rewrite === true || _rewrite === void 0 && self$1[key] !== false) self$1[key || _header] = normalizeValue(_value);
|
|
25919
|
-
}
|
|
25920
|
-
const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
25921
|
-
if (utils$1.isPlainObject(header) || header instanceof this.constructor) setHeaders(header, valueOrRewrite);
|
|
25922
|
-
else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) setHeaders(parseHeaders(header), valueOrRewrite);
|
|
25923
|
-
else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
|
25924
|
-
let obj = {}, dest, key;
|
|
25925
|
-
for (const entry of header) {
|
|
25926
|
-
if (!utils$1.isArray(entry)) throw TypeError("Object iterator must return a key-value pair");
|
|
25927
|
-
obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
25928
|
-
}
|
|
25929
|
-
setHeaders(obj, valueOrRewrite);
|
|
25930
|
-
} else header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
25931
|
-
return this;
|
|
25932
|
-
}
|
|
25933
|
-
get(header, parser$2) {
|
|
25934
|
-
header = normalizeHeader(header);
|
|
25935
|
-
if (header) {
|
|
25936
|
-
const key = utils$1.findKey(this, header);
|
|
25937
|
-
if (key) {
|
|
25938
|
-
const value = this[key];
|
|
25939
|
-
if (!parser$2) return value;
|
|
25940
|
-
if (parser$2 === true) return parseTokens(value);
|
|
25941
|
-
if (utils$1.isFunction(parser$2)) return parser$2.call(this, value, key);
|
|
25942
|
-
if (utils$1.isRegExp(parser$2)) return parser$2.exec(value);
|
|
25943
|
-
throw new TypeError("parser must be boolean|regexp|function");
|
|
25944
|
-
}
|
|
25945
|
-
}
|
|
25946
|
-
}
|
|
25947
|
-
has(header, matcher) {
|
|
25948
|
-
header = normalizeHeader(header);
|
|
25949
|
-
if (header) {
|
|
25950
|
-
const key = utils$1.findKey(this, header);
|
|
25951
|
-
return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
25952
|
-
}
|
|
25953
|
-
return false;
|
|
25954
|
-
}
|
|
25955
|
-
delete(header, matcher) {
|
|
25956
|
-
const self$1 = this;
|
|
25957
|
-
let deleted = false;
|
|
25958
|
-
function deleteHeader(_header) {
|
|
25959
|
-
_header = normalizeHeader(_header);
|
|
25960
|
-
if (_header) {
|
|
25961
|
-
const key = utils$1.findKey(self$1, _header);
|
|
25962
|
-
if (key && (!matcher || matchHeaderValue(self$1, self$1[key], key, matcher))) {
|
|
25963
|
-
delete self$1[key];
|
|
25964
|
-
deleted = true;
|
|
25965
|
-
}
|
|
25966
|
-
}
|
|
25967
|
-
}
|
|
25968
|
-
if (utils$1.isArray(header)) header.forEach(deleteHeader);
|
|
25969
|
-
else deleteHeader(header);
|
|
25970
|
-
return deleted;
|
|
25971
|
-
}
|
|
25972
|
-
clear(matcher) {
|
|
25973
|
-
const keys = Object.keys(this);
|
|
25974
|
-
let i = keys.length;
|
|
25975
|
-
let deleted = false;
|
|
25976
|
-
while (i--) {
|
|
25977
|
-
const key = keys[i];
|
|
25978
|
-
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
25979
|
-
delete this[key];
|
|
25980
|
-
deleted = true;
|
|
25981
|
-
}
|
|
25982
|
-
}
|
|
25983
|
-
return deleted;
|
|
25984
|
-
}
|
|
25985
|
-
normalize(format) {
|
|
25986
|
-
const self$1 = this;
|
|
25987
|
-
const headers = {};
|
|
25988
|
-
utils$1.forEach(this, (value, header) => {
|
|
25989
|
-
const key = utils$1.findKey(headers, header);
|
|
25990
|
-
if (key) {
|
|
25991
|
-
self$1[key] = normalizeValue(value);
|
|
25992
|
-
delete self$1[header];
|
|
25993
|
-
return;
|
|
25994
|
-
}
|
|
25995
|
-
const normalized = format ? formatHeader(header) : String(header).trim();
|
|
25996
|
-
if (normalized !== header) delete self$1[header];
|
|
25997
|
-
self$1[normalized] = normalizeValue(value);
|
|
25998
|
-
headers[normalized] = true;
|
|
25999
|
-
});
|
|
26000
|
-
return this;
|
|
26001
|
-
}
|
|
26002
|
-
concat(...targets) {
|
|
26003
|
-
return this.constructor.concat(this, ...targets);
|
|
26004
|
-
}
|
|
26005
|
-
toJSON(asStrings) {
|
|
26006
|
-
const obj = Object.create(null);
|
|
26007
|
-
utils$1.forEach(this, (value, header) => {
|
|
26008
|
-
value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
|
|
26009
|
-
});
|
|
26010
|
-
return obj;
|
|
26011
|
-
}
|
|
26012
|
-
[Symbol.iterator]() {
|
|
26013
|
-
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
26014
|
-
}
|
|
26015
|
-
toString() {
|
|
26016
|
-
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
26017
|
-
}
|
|
26018
|
-
getSetCookie() {
|
|
26019
|
-
return this.get("set-cookie") || [];
|
|
26020
|
-
}
|
|
26021
|
-
get [Symbol.toStringTag]() {
|
|
26022
|
-
return "AxiosHeaders";
|
|
26023
|
-
}
|
|
26024
|
-
static from(thing) {
|
|
26025
|
-
return thing instanceof this ? thing : new this(thing);
|
|
26026
|
-
}
|
|
26027
|
-
static concat(first, ...targets) {
|
|
26028
|
-
const computed = new this(first);
|
|
26029
|
-
targets.forEach((target) => computed.set(target));
|
|
26030
|
-
return computed;
|
|
26031
|
-
}
|
|
26032
|
-
static accessor(header) {
|
|
26033
|
-
const accessors = (this[$internals] = this[$internals] = { accessors: {} }).accessors;
|
|
26034
|
-
const prototype$2 = this.prototype;
|
|
26035
|
-
function defineAccessor(_header) {
|
|
26036
|
-
const lHeader = normalizeHeader(_header);
|
|
26037
|
-
if (!accessors[lHeader]) {
|
|
26038
|
-
buildAccessors(prototype$2, _header);
|
|
26039
|
-
accessors[lHeader] = true;
|
|
26090
|
+
return (encoder || JSON.stringify)(rawValue);
|
|
26091
|
+
}
|
|
26092
|
+
const defaults = {
|
|
26093
|
+
transitional: transitionalDefaults,
|
|
26094
|
+
adapter: [
|
|
26095
|
+
"xhr",
|
|
26096
|
+
"http",
|
|
26097
|
+
"fetch"
|
|
26098
|
+
],
|
|
26099
|
+
transformRequest: [function transformRequest(data, headers) {
|
|
26100
|
+
const contentType$1 = headers.getContentType() || "";
|
|
26101
|
+
const hasJSONContentType = contentType$1.indexOf("application/json") > -1;
|
|
26102
|
+
const isObjectPayload = utils$1.isObject(data);
|
|
26103
|
+
if (isObjectPayload && utils$1.isHTMLForm(data)) data = new FormData(data);
|
|
26104
|
+
if (utils$1.isFormData(data)) return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
26105
|
+
if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) return data;
|
|
26106
|
+
if (utils$1.isArrayBufferView(data)) return data.buffer;
|
|
26107
|
+
if (utils$1.isURLSearchParams(data)) {
|
|
26108
|
+
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
26109
|
+
return data.toString();
|
|
26110
|
+
}
|
|
26111
|
+
let isFileList$1;
|
|
26112
|
+
if (isObjectPayload) {
|
|
26113
|
+
const formSerializer = own(this, "formSerializer");
|
|
26114
|
+
if (contentType$1.indexOf("application/x-www-form-urlencoded") > -1) return toURLEncodedForm(data, formSerializer).toString();
|
|
26115
|
+
if ((isFileList$1 = utils$1.isFileList(data)) || contentType$1.indexOf("multipart/form-data") > -1) {
|
|
26116
|
+
const env = own(this, "env");
|
|
26117
|
+
const _FormData = env && env.FormData;
|
|
26118
|
+
return toFormData(isFileList$1 ? { "files[]": data } : data, _FormData && new _FormData(), formSerializer);
|
|
26040
26119
|
}
|
|
26041
26120
|
}
|
|
26042
|
-
|
|
26043
|
-
|
|
26044
|
-
|
|
26045
|
-
};
|
|
26046
|
-
AxiosHeaders.accessor([
|
|
26047
|
-
"Content-Type",
|
|
26048
|
-
"Content-Length",
|
|
26049
|
-
"Accept",
|
|
26050
|
-
"Accept-Encoding",
|
|
26051
|
-
"User-Agent",
|
|
26052
|
-
"Authorization"
|
|
26053
|
-
]);
|
|
26054
|
-
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
26055
|
-
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
26056
|
-
return {
|
|
26057
|
-
get: () => value,
|
|
26058
|
-
set(headerValue) {
|
|
26059
|
-
this[mapped] = headerValue;
|
|
26121
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
26122
|
+
headers.setContentType("application/json", false);
|
|
26123
|
+
return stringifySafely(data);
|
|
26060
26124
|
}
|
|
26061
|
-
|
|
26125
|
+
return data;
|
|
26126
|
+
}],
|
|
26127
|
+
transformResponse: [function transformResponse(data) {
|
|
26128
|
+
const transitional = own(this, "transitional") || defaults.transitional;
|
|
26129
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
26130
|
+
const responseType = own(this, "responseType");
|
|
26131
|
+
const JSONRequested = responseType === "json";
|
|
26132
|
+
if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) return data;
|
|
26133
|
+
if (data && utils$1.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
|
|
26134
|
+
const strictJSONParsing = !(transitional && transitional.silentJSONParsing) && JSONRequested;
|
|
26135
|
+
try {
|
|
26136
|
+
return JSON.parse(data, own(this, "parseReviver"));
|
|
26137
|
+
} catch (e$1) {
|
|
26138
|
+
if (strictJSONParsing) {
|
|
26139
|
+
if (e$1.name === "SyntaxError") throw AxiosError.from(e$1, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, "response"));
|
|
26140
|
+
throw e$1;
|
|
26141
|
+
}
|
|
26142
|
+
}
|
|
26143
|
+
}
|
|
26144
|
+
return data;
|
|
26145
|
+
}],
|
|
26146
|
+
timeout: 0,
|
|
26147
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
26148
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
26149
|
+
maxContentLength: -1,
|
|
26150
|
+
maxBodyLength: -1,
|
|
26151
|
+
env: {
|
|
26152
|
+
FormData: platform.classes.FormData,
|
|
26153
|
+
Blob: platform.classes.Blob
|
|
26154
|
+
},
|
|
26155
|
+
validateStatus: function validateStatus(status) {
|
|
26156
|
+
return status >= 200 && status < 300;
|
|
26157
|
+
},
|
|
26158
|
+
headers: { common: {
|
|
26159
|
+
Accept: "application/json, text/plain, */*",
|
|
26160
|
+
"Content-Type": void 0
|
|
26161
|
+
} }
|
|
26162
|
+
};
|
|
26163
|
+
utils$1.forEach([
|
|
26164
|
+
"delete",
|
|
26165
|
+
"get",
|
|
26166
|
+
"head",
|
|
26167
|
+
"post",
|
|
26168
|
+
"put",
|
|
26169
|
+
"patch",
|
|
26170
|
+
"query"
|
|
26171
|
+
], (method) => {
|
|
26172
|
+
defaults.headers[method] = {};
|
|
26062
26173
|
});
|
|
26063
|
-
utils$1.freezeMethods(AxiosHeaders);
|
|
26064
|
-
const AxiosHeaders$1 = AxiosHeaders;
|
|
26065
26174
|
/**
|
|
26066
26175
|
* Transform the data for a request or a response
|
|
26067
26176
|
*
|
|
@@ -26071,9 +26180,9 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26071
26180
|
* @returns {*} The resulting transformed data
|
|
26072
26181
|
*/
|
|
26073
26182
|
function transformData(fns, response) {
|
|
26074
|
-
const config = this || defaults
|
|
26183
|
+
const config = this || defaults;
|
|
26075
26184
|
const context = response || config;
|
|
26076
|
-
const headers = AxiosHeaders
|
|
26185
|
+
const headers = AxiosHeaders.from(context.headers);
|
|
26077
26186
|
let data = context.data;
|
|
26078
26187
|
utils$1.forEach(fns, function transform(fn) {
|
|
26079
26188
|
data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
|
|
@@ -26084,20 +26193,22 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26084
26193
|
function isCancel(value) {
|
|
26085
26194
|
return !!(value && value.__CANCEL__);
|
|
26086
26195
|
}
|
|
26087
|
-
|
|
26088
|
-
|
|
26089
|
-
|
|
26090
|
-
|
|
26091
|
-
|
|
26092
|
-
|
|
26093
|
-
|
|
26094
|
-
|
|
26095
|
-
|
|
26096
|
-
|
|
26097
|
-
|
|
26098
|
-
|
|
26099
|
-
|
|
26100
|
-
|
|
26196
|
+
var CanceledError = class extends AxiosError {
|
|
26197
|
+
/**
|
|
26198
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
26199
|
+
*
|
|
26200
|
+
* @param {string=} message The message.
|
|
26201
|
+
* @param {Object=} config The config.
|
|
26202
|
+
* @param {Object=} request The request.
|
|
26203
|
+
*
|
|
26204
|
+
* @returns {CanceledError} The created error.
|
|
26205
|
+
*/
|
|
26206
|
+
constructor(message, config, request) {
|
|
26207
|
+
super(message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request);
|
|
26208
|
+
this.name = "CanceledError";
|
|
26209
|
+
this.__CANCEL__ = true;
|
|
26210
|
+
}
|
|
26211
|
+
};
|
|
26101
26212
|
/**
|
|
26102
26213
|
* Resolve or reject a Promise based on response status.
|
|
26103
26214
|
*
|
|
@@ -26110,7 +26221,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26110
26221
|
function settle(resolve$1, reject, response) {
|
|
26111
26222
|
const validateStatus = response.config.validateStatus;
|
|
26112
26223
|
if (!response.status || !validateStatus || validateStatus(response.status)) resolve$1(response);
|
|
26113
|
-
else reject(new AxiosError("Request failed with status code " + response.status,
|
|
26224
|
+
else reject(new AxiosError("Request failed with status code " + response.status, response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE, response.config, response.request, response));
|
|
26114
26225
|
}
|
|
26115
26226
|
/**
|
|
26116
26227
|
* Determines whether the specified URL is absolute
|
|
@@ -26120,6 +26231,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26120
26231
|
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
26121
26232
|
*/
|
|
26122
26233
|
function isAbsoluteURL(url$2) {
|
|
26234
|
+
if (typeof url$2 !== "string") return false;
|
|
26123
26235
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url$2);
|
|
26124
26236
|
}
|
|
26125
26237
|
/**
|
|
@@ -26145,12 +26257,80 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26145
26257
|
*/
|
|
26146
26258
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
26147
26259
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
26148
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls
|
|
26260
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) return combineURLs(baseURL, requestedURL);
|
|
26149
26261
|
return requestedURL;
|
|
26150
26262
|
}
|
|
26151
|
-
|
|
26263
|
+
var DEFAULT_PORTS$1 = {
|
|
26264
|
+
ftp: 21,
|
|
26265
|
+
gopher: 70,
|
|
26266
|
+
http: 80,
|
|
26267
|
+
https: 443,
|
|
26268
|
+
ws: 80,
|
|
26269
|
+
wss: 443
|
|
26270
|
+
};
|
|
26271
|
+
function parseUrl(urlString) {
|
|
26272
|
+
try {
|
|
26273
|
+
return new URL(urlString);
|
|
26274
|
+
} catch {
|
|
26275
|
+
return null;
|
|
26276
|
+
}
|
|
26277
|
+
}
|
|
26278
|
+
/**
|
|
26279
|
+
* @param {string|object|URL} url - The URL as a string or URL instance, or a
|
|
26280
|
+
* compatible object (such as the result from legacy url.parse).
|
|
26281
|
+
* @return {string} The URL of the proxy that should handle the request to the
|
|
26282
|
+
* given URL. If no proxy is set, this will be an empty string.
|
|
26283
|
+
*/
|
|
26284
|
+
function getProxyForUrl(url$2) {
|
|
26285
|
+
var parsedUrl = (typeof url$2 === "string" ? parseUrl(url$2) : url$2) || {};
|
|
26286
|
+
var proto = parsedUrl.protocol;
|
|
26287
|
+
var hostname = parsedUrl.host;
|
|
26288
|
+
var port = parsedUrl.port;
|
|
26289
|
+
if (typeof hostname !== "string" || !hostname || typeof proto !== "string") return "";
|
|
26290
|
+
proto = proto.split(":", 1)[0];
|
|
26291
|
+
hostname = hostname.replace(/:\d*$/, "");
|
|
26292
|
+
port = parseInt(port) || DEFAULT_PORTS$1[proto] || 0;
|
|
26293
|
+
if (!shouldProxy(hostname, port)) return "";
|
|
26294
|
+
var proxy = getEnv(proto + "_proxy") || getEnv("all_proxy");
|
|
26295
|
+
if (proxy && proxy.indexOf("://") === -1) proxy = proto + "://" + proxy;
|
|
26296
|
+
return proxy;
|
|
26297
|
+
}
|
|
26298
|
+
/**
|
|
26299
|
+
* Determines whether a given URL should be proxied.
|
|
26300
|
+
*
|
|
26301
|
+
* @param {string} hostname - The host name of the URL.
|
|
26302
|
+
* @param {number} port - The effective port of the URL.
|
|
26303
|
+
* @returns {boolean} Whether the given URL should be proxied.
|
|
26304
|
+
* @private
|
|
26305
|
+
*/
|
|
26306
|
+
function shouldProxy(hostname, port) {
|
|
26307
|
+
var NO_PROXY = getEnv("no_proxy").toLowerCase();
|
|
26308
|
+
if (!NO_PROXY) return true;
|
|
26309
|
+
if (NO_PROXY === "*") return false;
|
|
26310
|
+
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
|
|
26311
|
+
if (!proxy) return true;
|
|
26312
|
+
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
|
|
26313
|
+
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
|
|
26314
|
+
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
|
|
26315
|
+
if (parsedProxyPort && parsedProxyPort !== port) return true;
|
|
26316
|
+
if (!/^[.*]/.test(parsedProxyHostname)) return hostname !== parsedProxyHostname;
|
|
26317
|
+
if (parsedProxyHostname.charAt(0) === "*") parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
26318
|
+
return !hostname.endsWith(parsedProxyHostname);
|
|
26319
|
+
});
|
|
26320
|
+
}
|
|
26321
|
+
/**
|
|
26322
|
+
* Get the value for an environment variable.
|
|
26323
|
+
*
|
|
26324
|
+
* @param {string} key - The name of the environment variable.
|
|
26325
|
+
* @return {string} The value of the environment variable.
|
|
26326
|
+
* @private
|
|
26327
|
+
*/
|
|
26328
|
+
function getEnv(key) {
|
|
26329
|
+
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
26330
|
+
}
|
|
26331
|
+
const VERSION = "1.16.0";
|
|
26152
26332
|
function parseProtocol(url$2) {
|
|
26153
|
-
const match = /^([-+\w]{1,25})(
|
|
26333
|
+
const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url$2);
|
|
26154
26334
|
return match && match[1] || "";
|
|
26155
26335
|
}
|
|
26156
26336
|
const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
|
|
@@ -26185,7 +26365,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26185
26365
|
throw new AxiosError("Unsupported protocol " + protocol, AxiosError.ERR_NOT_SUPPORT);
|
|
26186
26366
|
}
|
|
26187
26367
|
const kInternals = Symbol("internals");
|
|
26188
|
-
var AxiosTransformStream = class extends
|
|
26368
|
+
var AxiosTransformStream = class extends stream.Transform {
|
|
26189
26369
|
constructor(options) {
|
|
26190
26370
|
options = utils$1.toFlatObject(options, {
|
|
26191
26371
|
maxRate: 0,
|
|
@@ -26276,7 +26456,6 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26276
26456
|
});
|
|
26277
26457
|
}
|
|
26278
26458
|
};
|
|
26279
|
-
const AxiosTransformStream$1 = AxiosTransformStream;
|
|
26280
26459
|
const { asyncIterator } = Symbol;
|
|
26281
26460
|
const readBlob = async function* (blob) {
|
|
26282
26461
|
if (blob.stream) yield* blob.stream();
|
|
@@ -26284,9 +26463,8 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26284
26463
|
else if (blob[asyncIterator]) yield* blob[asyncIterator]();
|
|
26285
26464
|
else yield blob;
|
|
26286
26465
|
};
|
|
26287
|
-
const readBlob$1 = readBlob;
|
|
26288
26466
|
const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + "-_";
|
|
26289
|
-
const textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new
|
|
26467
|
+
const textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder();
|
|
26290
26468
|
const CRLF = "\r\n";
|
|
26291
26469
|
const CRLF_BYTES = textEncoder.encode(CRLF);
|
|
26292
26470
|
const CRLF_BYTES_COUNT = 2;
|
|
@@ -26296,7 +26474,10 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26296
26474
|
const isStringValue = utils$1.isString(value);
|
|
26297
26475
|
let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`;
|
|
26298
26476
|
if (isStringValue) value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
|
|
26299
|
-
else
|
|
26477
|
+
else {
|
|
26478
|
+
const safeType = String(value.type || "application/octet-stream").replace(/[\r\n]/g, "");
|
|
26479
|
+
headers += `Content-Type: ${safeType}${CRLF}`;
|
|
26480
|
+
}
|
|
26300
26481
|
this.headers = textEncoder.encode(headers + CRLF);
|
|
26301
26482
|
this.contentLength = isStringValue ? value.byteLength : value.size;
|
|
26302
26483
|
this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;
|
|
@@ -26307,7 +26488,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26307
26488
|
yield this.headers;
|
|
26308
26489
|
const { value } = this;
|
|
26309
26490
|
if (utils$1.isTypedArray(value)) yield value;
|
|
26310
|
-
else yield* readBlob
|
|
26491
|
+
else yield* readBlob(value);
|
|
26311
26492
|
yield CRLF_BYTES;
|
|
26312
26493
|
}
|
|
26313
26494
|
static escapeName(name) {
|
|
@@ -26321,7 +26502,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26321
26502
|
const formDataToStream = (form, headersHandler, options) => {
|
|
26322
26503
|
const { tag = "form-data-boundary", size = 25, boundary = tag + "-" + platform.generateString(size, BOUNDARY_ALPHABET) } = options || {};
|
|
26323
26504
|
if (!utils$1.isFormData(form)) throw TypeError("FormData instance required");
|
|
26324
|
-
if (boundary.length < 1 || boundary.length > 70) throw Error("boundary must be
|
|
26505
|
+
if (boundary.length < 1 || boundary.length > 70) throw Error("boundary must be 1-70 characters long");
|
|
26325
26506
|
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
|
|
26326
26507
|
const footerBytes = textEncoder.encode("--" + boundary + "--\r\n");
|
|
26327
26508
|
let contentLength = footerBytes.byteLength;
|
|
@@ -26335,16 +26516,15 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26335
26516
|
const computedHeaders = { "Content-Type": `multipart/form-data; boundary=${boundary}` };
|
|
26336
26517
|
if (Number.isFinite(contentLength)) computedHeaders["Content-Length"] = contentLength;
|
|
26337
26518
|
headersHandler && headersHandler(computedHeaders);
|
|
26338
|
-
return stream.Readable.from(
|
|
26519
|
+
return stream.Readable.from(async function* () {
|
|
26339
26520
|
for (const part of parts) {
|
|
26340
26521
|
yield boundaryBytes;
|
|
26341
26522
|
yield* part.encode();
|
|
26342
26523
|
}
|
|
26343
26524
|
yield footerBytes;
|
|
26344
|
-
}
|
|
26525
|
+
}());
|
|
26345
26526
|
};
|
|
26346
|
-
|
|
26347
|
-
var ZlibHeaderTransformStream = class extends stream__default["default"].Transform {
|
|
26527
|
+
var ZlibHeaderTransformStream = class extends stream.Transform {
|
|
26348
26528
|
__transform(chunk, encoding, callback) {
|
|
26349
26529
|
this.push(chunk);
|
|
26350
26530
|
callback();
|
|
@@ -26362,7 +26542,6 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26362
26542
|
this.__transform(chunk, encoding, callback);
|
|
26363
26543
|
}
|
|
26364
26544
|
};
|
|
26365
|
-
const ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream;
|
|
26366
26545
|
const callbackify = (fn, reducer) => {
|
|
26367
26546
|
return utils$1.isAsyncFn(fn) ? function(...args) {
|
|
26368
26547
|
const cb = args.pop();
|
|
@@ -26375,7 +26554,104 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26375
26554
|
}, cb);
|
|
26376
26555
|
} : fn;
|
|
26377
26556
|
};
|
|
26378
|
-
const
|
|
26557
|
+
const LOOPBACK_HOSTNAMES = new Set(["localhost"]);
|
|
26558
|
+
const isIPv4Loopback = (host) => {
|
|
26559
|
+
const parts = host.split(".");
|
|
26560
|
+
if (parts.length !== 4) return false;
|
|
26561
|
+
if (parts[0] !== "127") return false;
|
|
26562
|
+
return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
|
|
26563
|
+
};
|
|
26564
|
+
const isIPv6Loopback = (host) => {
|
|
26565
|
+
if (host === "::1") return true;
|
|
26566
|
+
const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
|
|
26567
|
+
if (v4MappedDotted) return isIPv4Loopback(v4MappedDotted[1]);
|
|
26568
|
+
const v4MappedHex = host.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);
|
|
26569
|
+
if (v4MappedHex) {
|
|
26570
|
+
const high = parseInt(v4MappedHex[1], 16);
|
|
26571
|
+
return high >= 32512 && high <= 32767;
|
|
26572
|
+
}
|
|
26573
|
+
const groups = host.split(":");
|
|
26574
|
+
if (groups.length === 8) {
|
|
26575
|
+
for (let i = 0; i < 7; i++) if (!/^0+$/.test(groups[i])) return false;
|
|
26576
|
+
return /^0*1$/.test(groups[7]);
|
|
26577
|
+
}
|
|
26578
|
+
return false;
|
|
26579
|
+
};
|
|
26580
|
+
const isLoopback = (host) => {
|
|
26581
|
+
if (!host) return false;
|
|
26582
|
+
if (LOOPBACK_HOSTNAMES.has(host)) return true;
|
|
26583
|
+
if (isIPv4Loopback(host)) return true;
|
|
26584
|
+
return isIPv6Loopback(host);
|
|
26585
|
+
};
|
|
26586
|
+
const DEFAULT_PORTS = {
|
|
26587
|
+
http: 80,
|
|
26588
|
+
https: 443,
|
|
26589
|
+
ws: 80,
|
|
26590
|
+
wss: 443,
|
|
26591
|
+
ftp: 21
|
|
26592
|
+
};
|
|
26593
|
+
const parseNoProxyEntry = (entry) => {
|
|
26594
|
+
let entryHost = entry;
|
|
26595
|
+
let entryPort = 0;
|
|
26596
|
+
if (entryHost.charAt(0) === "[") {
|
|
26597
|
+
const bracketIndex = entryHost.indexOf("]");
|
|
26598
|
+
if (bracketIndex !== -1) {
|
|
26599
|
+
const host = entryHost.slice(1, bracketIndex);
|
|
26600
|
+
const rest = entryHost.slice(bracketIndex + 1);
|
|
26601
|
+
if (rest.charAt(0) === ":" && /^\d+$/.test(rest.slice(1))) entryPort = Number.parseInt(rest.slice(1), 10);
|
|
26602
|
+
return [host, entryPort];
|
|
26603
|
+
}
|
|
26604
|
+
}
|
|
26605
|
+
const firstColon = entryHost.indexOf(":");
|
|
26606
|
+
const lastColon = entryHost.lastIndexOf(":");
|
|
26607
|
+
if (firstColon !== -1 && firstColon === lastColon && /^\d+$/.test(entryHost.slice(lastColon + 1))) {
|
|
26608
|
+
entryPort = Number.parseInt(entryHost.slice(lastColon + 1), 10);
|
|
26609
|
+
entryHost = entryHost.slice(0, lastColon);
|
|
26610
|
+
}
|
|
26611
|
+
return [entryHost, entryPort];
|
|
26612
|
+
};
|
|
26613
|
+
const IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i;
|
|
26614
|
+
const IPV4_MAPPED_HEX_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i;
|
|
26615
|
+
const unmapIPv4MappedIPv6 = (host) => {
|
|
26616
|
+
if (typeof host !== "string" || host.indexOf(":") === -1) return host;
|
|
26617
|
+
const dotted = host.match(IPV4_MAPPED_DOTTED_RE);
|
|
26618
|
+
if (dotted) return dotted[1];
|
|
26619
|
+
const hex = host.match(IPV4_MAPPED_HEX_RE);
|
|
26620
|
+
if (hex) {
|
|
26621
|
+
const high = parseInt(hex[1], 16);
|
|
26622
|
+
const low = parseInt(hex[2], 16);
|
|
26623
|
+
return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`;
|
|
26624
|
+
}
|
|
26625
|
+
return host;
|
|
26626
|
+
};
|
|
26627
|
+
const normalizeNoProxyHost = (hostname) => {
|
|
26628
|
+
if (!hostname) return hostname;
|
|
26629
|
+
if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") hostname = hostname.slice(1, -1);
|
|
26630
|
+
return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
|
|
26631
|
+
};
|
|
26632
|
+
function shouldBypassProxy(location) {
|
|
26633
|
+
let parsed;
|
|
26634
|
+
try {
|
|
26635
|
+
parsed = new URL(location);
|
|
26636
|
+
} catch (_err) {
|
|
26637
|
+
return false;
|
|
26638
|
+
}
|
|
26639
|
+
const noProxy = (process.env.no_proxy || process.env.NO_PROXY || "").toLowerCase();
|
|
26640
|
+
if (!noProxy) return false;
|
|
26641
|
+
if (noProxy === "*") return true;
|
|
26642
|
+
const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS[parsed.protocol.split(":", 1)[0]] || 0;
|
|
26643
|
+
const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
|
|
26644
|
+
return noProxy.split(/[\s,]+/).some((entry) => {
|
|
26645
|
+
if (!entry) return false;
|
|
26646
|
+
let [entryHost, entryPort] = parseNoProxyEntry(entry);
|
|
26647
|
+
entryHost = normalizeNoProxyHost(entryHost);
|
|
26648
|
+
if (!entryHost) return false;
|
|
26649
|
+
if (entryPort && entryPort !== port) return false;
|
|
26650
|
+
if (entryHost.charAt(0) === "*") entryHost = entryHost.slice(1);
|
|
26651
|
+
if (entryHost.charAt(0) === ".") return hostname.endsWith(entryHost);
|
|
26652
|
+
return hostname === entryHost || isLoopback(hostname) && isLoopback(entryHost);
|
|
26653
|
+
});
|
|
26654
|
+
}
|
|
26379
26655
|
/**
|
|
26380
26656
|
* Calculate data maxRate
|
|
26381
26657
|
* @param {Number} [samplesCount= 10]
|
|
@@ -26448,19 +26724,19 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26448
26724
|
let bytesNotified = 0;
|
|
26449
26725
|
const _speedometer = speedometer(50, 250);
|
|
26450
26726
|
return throttle((e$1) => {
|
|
26451
|
-
const
|
|
26727
|
+
const rawLoaded = e$1.loaded;
|
|
26452
26728
|
const total = e$1.lengthComputable ? e$1.total : void 0;
|
|
26453
|
-
const
|
|
26729
|
+
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
26730
|
+
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
26454
26731
|
const rate = _speedometer(progressBytes);
|
|
26455
|
-
|
|
26456
|
-
bytesNotified = loaded;
|
|
26732
|
+
bytesNotified = Math.max(bytesNotified, loaded);
|
|
26457
26733
|
listener({
|
|
26458
26734
|
loaded,
|
|
26459
26735
|
total,
|
|
26460
26736
|
progress: total ? loaded / total : void 0,
|
|
26461
26737
|
bytes: progressBytes,
|
|
26462
26738
|
rate: rate ? rate : void 0,
|
|
26463
|
-
estimated: rate && total
|
|
26739
|
+
estimated: rate && total ? (total - loaded) / rate : void 0,
|
|
26464
26740
|
event: e$1,
|
|
26465
26741
|
lengthComputable: total != null,
|
|
26466
26742
|
[isDownloadStream ? "download" : "upload"]: true
|
|
@@ -26519,25 +26795,59 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26519
26795
|
if (body.charCodeAt(idx) === 61) pad++;
|
|
26520
26796
|
else if (tailIsPct3D(idx)) pad++;
|
|
26521
26797
|
}
|
|
26522
|
-
const bytes = Math.floor(effectiveLen / 4) * 3 - (pad || 0);
|
|
26523
|
-
return bytes > 0 ? bytes : 0;
|
|
26798
|
+
const bytes$1 = Math.floor(effectiveLen / 4) * 3 - (pad || 0);
|
|
26799
|
+
return bytes$1 > 0 ? bytes$1 : 0;
|
|
26524
26800
|
}
|
|
26525
|
-
return Buffer.byteLength(body, "utf8");
|
|
26801
|
+
if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") return Buffer.byteLength(body, "utf8");
|
|
26802
|
+
let bytes = 0;
|
|
26803
|
+
for (let i = 0, len = body.length; i < len; i++) {
|
|
26804
|
+
const c = body.charCodeAt(i);
|
|
26805
|
+
if (c < 128) bytes += 1;
|
|
26806
|
+
else if (c < 2048) bytes += 2;
|
|
26807
|
+
else if (c >= 55296 && c <= 56319 && i + 1 < len) {
|
|
26808
|
+
const next = body.charCodeAt(i + 1);
|
|
26809
|
+
if (next >= 56320 && next <= 57343) {
|
|
26810
|
+
bytes += 4;
|
|
26811
|
+
i++;
|
|
26812
|
+
} else bytes += 3;
|
|
26813
|
+
} else bytes += 3;
|
|
26814
|
+
}
|
|
26815
|
+
return bytes;
|
|
26526
26816
|
}
|
|
26527
26817
|
const zlibOptions = {
|
|
26528
|
-
flush:
|
|
26529
|
-
finishFlush:
|
|
26818
|
+
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
26819
|
+
finishFlush: zlib.constants.Z_SYNC_FLUSH
|
|
26530
26820
|
};
|
|
26531
26821
|
const brotliOptions = {
|
|
26532
|
-
flush:
|
|
26533
|
-
finishFlush:
|
|
26822
|
+
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
|
26823
|
+
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
|
26534
26824
|
};
|
|
26535
|
-
const isBrotliSupported = utils$1.isFunction(
|
|
26536
|
-
const { http: httpFollow, https: httpsFollow } =
|
|
26825
|
+
const isBrotliSupported = utils$1.isFunction(zlib.createBrotliDecompress);
|
|
26826
|
+
const { http: httpFollow, https: httpsFollow } = followRedirects;
|
|
26537
26827
|
const isHttps = /https:?/;
|
|
26828
|
+
const FORM_DATA_CONTENT_HEADERS$1 = ["content-type", "content-length"];
|
|
26829
|
+
function setFormDataHeaders$1(headers, formHeaders, policy) {
|
|
26830
|
+
if (policy !== "content-only") {
|
|
26831
|
+
headers.set(formHeaders);
|
|
26832
|
+
return;
|
|
26833
|
+
}
|
|
26834
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
26835
|
+
if (FORM_DATA_CONTENT_HEADERS$1.includes(key.toLowerCase())) headers.set(key, val);
|
|
26836
|
+
});
|
|
26837
|
+
}
|
|
26838
|
+
const kAxiosSocketListener = Symbol("axios.http.socketListener");
|
|
26839
|
+
const kAxiosCurrentReq = Symbol("axios.http.currentReq");
|
|
26538
26840
|
const supportedProtocols = platform.protocols.map((protocol) => {
|
|
26539
26841
|
return protocol + ":";
|
|
26540
26842
|
});
|
|
26843
|
+
const decodeURIComponentSafe = (value) => {
|
|
26844
|
+
if (!utils$1.isString(value)) return value;
|
|
26845
|
+
try {
|
|
26846
|
+
return decodeURIComponent(value);
|
|
26847
|
+
} catch (error) {
|
|
26848
|
+
return value;
|
|
26849
|
+
}
|
|
26850
|
+
};
|
|
26541
26851
|
const flushOnFinish = (stream$1, [throttled, flush]) => {
|
|
26542
26852
|
stream$1.on("end", flush).on("error", flush);
|
|
26543
26853
|
return throttled;
|
|
@@ -26553,10 +26863,10 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26553
26863
|
let len = authoritySessions.length;
|
|
26554
26864
|
for (let i = 0; i < len; i++) {
|
|
26555
26865
|
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
26556
|
-
if (!sessionHandle.destroyed && !sessionHandle.closed &&
|
|
26866
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) return sessionHandle;
|
|
26557
26867
|
}
|
|
26558
26868
|
}
|
|
26559
|
-
const session =
|
|
26869
|
+
const session = http2.connect(authority, options);
|
|
26560
26870
|
let removed;
|
|
26561
26871
|
const removeSession = () => {
|
|
26562
26872
|
if (removed) return;
|
|
@@ -26565,6 +26875,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26565
26875
|
while (i--) if (entries[i][0] === session) {
|
|
26566
26876
|
if (len === 1) delete this.sessions[authority];
|
|
26567
26877
|
else entries.splice(i, 1);
|
|
26878
|
+
if (!session.closed) session.close();
|
|
26568
26879
|
return;
|
|
26569
26880
|
}
|
|
26570
26881
|
};
|
|
@@ -26604,9 +26915,9 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26604
26915
|
*
|
|
26605
26916
|
* @returns {Object<string, any>}
|
|
26606
26917
|
*/
|
|
26607
|
-
function dispatchBeforeRedirect(options, responseDetails) {
|
|
26918
|
+
function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
|
|
26608
26919
|
if (options.beforeRedirects.proxy) options.beforeRedirects.proxy(options);
|
|
26609
|
-
if (options.beforeRedirects.config) options.beforeRedirects.config(options, responseDetails);
|
|
26920
|
+
if (options.beforeRedirects.config) options.beforeRedirects.config(options, responseDetails, requestDetails);
|
|
26610
26921
|
}
|
|
26611
26922
|
/**
|
|
26612
26923
|
* If the proxy or config afterRedirects functions are defined, call them with the options
|
|
@@ -26617,29 +26928,49 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26617
26928
|
*
|
|
26618
26929
|
* @returns {http.ClientRequestArgs}
|
|
26619
26930
|
*/
|
|
26620
|
-
function setProxy(options, configProxy, location) {
|
|
26931
|
+
function setProxy(options, configProxy, location, isRedirect) {
|
|
26621
26932
|
let proxy = configProxy;
|
|
26622
26933
|
if (!proxy && proxy !== false) {
|
|
26623
|
-
const proxyUrl =
|
|
26624
|
-
if (proxyUrl)
|
|
26934
|
+
const proxyUrl = getProxyForUrl(location);
|
|
26935
|
+
if (proxyUrl) {
|
|
26936
|
+
if (!shouldBypassProxy(location)) proxy = new URL(proxyUrl);
|
|
26937
|
+
}
|
|
26938
|
+
}
|
|
26939
|
+
if (isRedirect && options.headers) {
|
|
26940
|
+
for (const name of Object.keys(options.headers)) if (name.toLowerCase() === "proxy-authorization") delete options.headers[name];
|
|
26625
26941
|
}
|
|
26626
26942
|
if (proxy) {
|
|
26627
|
-
|
|
26628
|
-
|
|
26629
|
-
|
|
26630
|
-
|
|
26943
|
+
const isProxyURL = proxy instanceof URL;
|
|
26944
|
+
const readProxyField = (key) => isProxyURL || utils$1.hasOwnProp(proxy, key) ? proxy[key] : void 0;
|
|
26945
|
+
const proxyUsername = readProxyField("username");
|
|
26946
|
+
const proxyPassword = readProxyField("password");
|
|
26947
|
+
let proxyAuth = utils$1.hasOwnProp(proxy, "auth") ? proxy.auth : void 0;
|
|
26948
|
+
if (proxyUsername) proxyAuth = (proxyUsername || "") + ":" + (proxyPassword || "");
|
|
26949
|
+
if (proxyAuth) {
|
|
26950
|
+
const authIsObject = typeof proxyAuth === "object";
|
|
26951
|
+
const authUsername = authIsObject && utils$1.hasOwnProp(proxyAuth, "username") ? proxyAuth.username : void 0;
|
|
26952
|
+
const authPassword = authIsObject && utils$1.hasOwnProp(proxyAuth, "password") ? proxyAuth.password : void 0;
|
|
26953
|
+
if (Boolean(authUsername || authPassword)) proxyAuth = (authUsername || "") + ":" + (authPassword || "");
|
|
26954
|
+
else if (authIsObject) throw new AxiosError("Invalid proxy authorization", AxiosError.ERR_BAD_OPTION, { proxy });
|
|
26955
|
+
const base64 = Buffer.from(proxyAuth, "utf8").toString("base64");
|
|
26631
26956
|
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
26632
26957
|
}
|
|
26633
|
-
|
|
26634
|
-
const
|
|
26958
|
+
let hasUserHostHeader = false;
|
|
26959
|
+
for (const name of Object.keys(options.headers)) if (name.toLowerCase() === "host") {
|
|
26960
|
+
hasUserHostHeader = true;
|
|
26961
|
+
break;
|
|
26962
|
+
}
|
|
26963
|
+
if (!hasUserHostHeader) options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
|
|
26964
|
+
const proxyHost = readProxyField("hostname") || readProxyField("host");
|
|
26635
26965
|
options.hostname = proxyHost;
|
|
26636
26966
|
options.host = proxyHost;
|
|
26637
|
-
options.port =
|
|
26967
|
+
options.port = readProxyField("port");
|
|
26638
26968
|
options.path = location;
|
|
26639
|
-
|
|
26969
|
+
const proxyProtocol = readProxyField("protocol");
|
|
26970
|
+
if (proxyProtocol) options.protocol = proxyProtocol.includes(":") ? proxyProtocol : `${proxyProtocol}:`;
|
|
26640
26971
|
}
|
|
26641
26972
|
options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
|
|
26642
|
-
setProxy(redirectOptions, configProxy, redirectOptions.href);
|
|
26973
|
+
setProxy(redirectOptions, configProxy, redirectOptions.href, true);
|
|
26643
26974
|
};
|
|
26644
26975
|
}
|
|
26645
26976
|
const isHttpAdapterSupported = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
|
|
@@ -26675,10 +27006,10 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26675
27006
|
family
|
|
26676
27007
|
});
|
|
26677
27008
|
const http2Transport = { request(options, cb) {
|
|
26678
|
-
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
|
|
27009
|
+
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
|
|
26679
27010
|
const { http2Options, headers } = options;
|
|
26680
27011
|
const session = http2Sessions.getSession(authority, http2Options);
|
|
26681
|
-
const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } =
|
|
27012
|
+
const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http2.constants;
|
|
26682
27013
|
const http2Headers = {
|
|
26683
27014
|
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
26684
27015
|
[HTTP2_HEADER_METHOD]: options.method,
|
|
@@ -26699,20 +27030,28 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26699
27030
|
});
|
|
26700
27031
|
return req;
|
|
26701
27032
|
} };
|
|
26702
|
-
|
|
27033
|
+
var httpAdapter = isHttpAdapterSupported && function httpAdapter$1(config) {
|
|
26703
27034
|
return wrapAsync(async function dispatchHttpRequest(resolve$1, reject, onDone) {
|
|
26704
|
-
|
|
26705
|
-
|
|
27035
|
+
const own$1 = (key) => utils$1.hasOwnProp(config, key) ? config[key] : void 0;
|
|
27036
|
+
let data = own$1("data");
|
|
27037
|
+
let lookup$1 = own$1("lookup");
|
|
27038
|
+
let family = own$1("family");
|
|
27039
|
+
let httpVersion = own$1("httpVersion");
|
|
27040
|
+
if (httpVersion === void 0) httpVersion = 1;
|
|
27041
|
+
let http2Options = own$1("http2Options");
|
|
27042
|
+
const responseType = own$1("responseType");
|
|
27043
|
+
const responseEncoding = own$1("responseEncoding");
|
|
26706
27044
|
const method = config.method.toUpperCase();
|
|
26707
27045
|
let isDone;
|
|
26708
27046
|
let rejected = false;
|
|
26709
27047
|
let req;
|
|
27048
|
+
let connectPhaseTimer;
|
|
26710
27049
|
httpVersion = +httpVersion;
|
|
26711
27050
|
if (Number.isNaN(httpVersion)) throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
|
|
26712
27051
|
if (httpVersion !== 1 && httpVersion !== 2) throw TypeError(`Unsupported protocol version '${httpVersion}'`);
|
|
26713
27052
|
const isHttp2 = httpVersion === 2;
|
|
26714
27053
|
if (lookup$1) {
|
|
26715
|
-
const _lookup = callbackify
|
|
27054
|
+
const _lookup = callbackify(lookup$1, (value) => utils$1.isArray(value) ? value : [value]);
|
|
26716
27055
|
lookup$1 = (hostname, opt, cb) => {
|
|
26717
27056
|
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
26718
27057
|
if (err) return cb(err);
|
|
@@ -26729,8 +27068,21 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26729
27068
|
console.warn("emit error", err);
|
|
26730
27069
|
}
|
|
26731
27070
|
}
|
|
27071
|
+
function clearConnectPhaseTimer() {
|
|
27072
|
+
if (connectPhaseTimer) {
|
|
27073
|
+
clearTimeout(connectPhaseTimer);
|
|
27074
|
+
connectPhaseTimer = null;
|
|
27075
|
+
}
|
|
27076
|
+
}
|
|
27077
|
+
function createTimeoutError() {
|
|
27078
|
+
let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
|
|
27079
|
+
const transitional = config.transitional || transitionalDefaults;
|
|
27080
|
+
if (config.timeoutErrorMessage) timeoutErrorMessage = config.timeoutErrorMessage;
|
|
27081
|
+
return new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req);
|
|
27082
|
+
}
|
|
26732
27083
|
abortEmitter.once("abort", reject);
|
|
26733
27084
|
const onFinished = () => {
|
|
27085
|
+
clearConnectPhaseTimer();
|
|
26734
27086
|
if (config.cancelToken) config.cancelToken.unsubscribe(abort$3);
|
|
26735
27087
|
if (config.signal) config.signal.removeEventListener("abort", abort$3);
|
|
26736
27088
|
abortEmitter.removeAllListeners();
|
|
@@ -26741,14 +27093,15 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26741
27093
|
}
|
|
26742
27094
|
onDone((response, isRejected) => {
|
|
26743
27095
|
isDone = true;
|
|
27096
|
+
clearConnectPhaseTimer();
|
|
26744
27097
|
if (isRejected) {
|
|
26745
27098
|
rejected = true;
|
|
26746
27099
|
onFinished();
|
|
26747
27100
|
return;
|
|
26748
27101
|
}
|
|
26749
27102
|
const { data: data$1 } = response;
|
|
26750
|
-
if (data$1 instanceof
|
|
26751
|
-
const offListeners =
|
|
27103
|
+
if (data$1 instanceof stream.Readable || data$1 instanceof stream.Duplex) {
|
|
27104
|
+
const offListeners = stream.finished(data$1, () => {
|
|
26752
27105
|
offListeners();
|
|
26753
27106
|
onFinished();
|
|
26754
27107
|
});
|
|
@@ -26776,17 +27129,17 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26776
27129
|
if (responseType === "text") {
|
|
26777
27130
|
convertedData = convertedData.toString(responseEncoding);
|
|
26778
27131
|
if (!responseEncoding || responseEncoding === "utf8") convertedData = utils$1.stripBOM(convertedData);
|
|
26779
|
-
} else if (responseType === "stream") convertedData =
|
|
27132
|
+
} else if (responseType === "stream") convertedData = stream.Readable.from(convertedData);
|
|
26780
27133
|
return settle(resolve$1, reject, {
|
|
26781
27134
|
data: convertedData,
|
|
26782
27135
|
status: 200,
|
|
26783
27136
|
statusText: "OK",
|
|
26784
|
-
headers: new AxiosHeaders
|
|
27137
|
+
headers: new AxiosHeaders(),
|
|
26785
27138
|
config
|
|
26786
27139
|
});
|
|
26787
27140
|
}
|
|
26788
27141
|
if (supportedProtocols.indexOf(protocol) === -1) return reject(new AxiosError("Unsupported protocol " + protocol, AxiosError.ERR_BAD_REQUEST, config));
|
|
26789
|
-
const headers = AxiosHeaders
|
|
27142
|
+
const headers = AxiosHeaders.from(config.headers).normalize();
|
|
26790
27143
|
headers.set("User-Agent", "axios/" + VERSION, false);
|
|
26791
27144
|
const { onUploadProgress, onDownloadProgress } = config;
|
|
26792
27145
|
const maxRate = config.maxRate;
|
|
@@ -26794,22 +27147,22 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26794
27147
|
let maxDownloadRate = void 0;
|
|
26795
27148
|
if (utils$1.isSpecCompliantForm(data)) {
|
|
26796
27149
|
const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
|
|
26797
|
-
data = formDataToStream
|
|
27150
|
+
data = formDataToStream(data, (formHeaders) => {
|
|
26798
27151
|
headers.set(formHeaders);
|
|
26799
27152
|
}, {
|
|
26800
27153
|
tag: `axios-${VERSION}-boundary`,
|
|
26801
27154
|
boundary: userBoundary && userBoundary[1] || void 0
|
|
26802
27155
|
});
|
|
26803
|
-
} else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) {
|
|
26804
|
-
headers
|
|
27156
|
+
} else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
|
|
27157
|
+
setFormDataHeaders$1(headers, data.getHeaders(), own$1("formDataHeaderPolicy"));
|
|
26805
27158
|
if (!headers.hasContentLength()) try {
|
|
26806
|
-
const knownLength = await
|
|
27159
|
+
const knownLength = await util.promisify(data.getLength).call(data);
|
|
26807
27160
|
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
|
|
26808
27161
|
} catch (e$1) {}
|
|
26809
27162
|
} else if (utils$1.isBlob(data) || utils$1.isFile(data)) {
|
|
26810
27163
|
data.size && headers.setContentType(data.type || "application/octet-stream");
|
|
26811
27164
|
headers.setContentLength(data.size || 0);
|
|
26812
|
-
data =
|
|
27165
|
+
data = stream.Readable.from(readBlob(data));
|
|
26813
27166
|
} else if (data && !utils$1.isStream(data)) {
|
|
26814
27167
|
if (Buffer.isBuffer(data));
|
|
26815
27168
|
else if (utils$1.isArrayBuffer(data)) data = Buffer.from(new Uint8Array(data));
|
|
@@ -26824,25 +27177,26 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26824
27177
|
maxDownloadRate = maxRate[1];
|
|
26825
27178
|
} else maxUploadRate = maxDownloadRate = maxRate;
|
|
26826
27179
|
if (data && (onUploadProgress || maxUploadRate)) {
|
|
26827
|
-
if (!utils$1.isStream(data)) data =
|
|
26828
|
-
data =
|
|
27180
|
+
if (!utils$1.isStream(data)) data = stream.Readable.from(data, { objectMode: false });
|
|
27181
|
+
data = stream.pipeline([data, new AxiosTransformStream({ maxRate: utils$1.toFiniteNumber(maxUploadRate) })], utils$1.noop);
|
|
26829
27182
|
onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
|
|
26830
27183
|
}
|
|
26831
27184
|
let auth = void 0;
|
|
26832
|
-
|
|
26833
|
-
|
|
26834
|
-
const
|
|
27185
|
+
const configAuth = own$1("auth");
|
|
27186
|
+
if (configAuth) {
|
|
27187
|
+
const username = configAuth.username || "";
|
|
27188
|
+
const password = configAuth.password || "";
|
|
26835
27189
|
auth = username + ":" + password;
|
|
26836
27190
|
}
|
|
26837
27191
|
if (!auth && parsed.username) {
|
|
26838
|
-
const urlUsername = parsed.username;
|
|
26839
|
-
const urlPassword = parsed.password;
|
|
27192
|
+
const urlUsername = decodeURIComponentSafe(parsed.username);
|
|
27193
|
+
const urlPassword = decodeURIComponentSafe(parsed.password);
|
|
26840
27194
|
auth = urlUsername + ":" + urlPassword;
|
|
26841
27195
|
}
|
|
26842
27196
|
auth && headers.delete("authorization");
|
|
26843
|
-
let path$
|
|
27197
|
+
let path$1$1;
|
|
26844
27198
|
try {
|
|
26845
|
-
path$
|
|
27199
|
+
path$1$1 = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
|
|
26846
27200
|
} catch (err) {
|
|
26847
27201
|
const customErr = new Error(err.message);
|
|
26848
27202
|
customErr.config = config;
|
|
@@ -26851,8 +27205,8 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26851
27205
|
return reject(customErr);
|
|
26852
27206
|
}
|
|
26853
27207
|
headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
|
|
26854
|
-
const options = {
|
|
26855
|
-
path: path$
|
|
27208
|
+
const options = Object.assign(Object.create(null), {
|
|
27209
|
+
path: path$1$1,
|
|
26856
27210
|
method,
|
|
26857
27211
|
headers: headers.toJSON(),
|
|
26858
27212
|
agents: {
|
|
@@ -26863,36 +27217,51 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26863
27217
|
protocol,
|
|
26864
27218
|
family,
|
|
26865
27219
|
beforeRedirect: dispatchBeforeRedirect,
|
|
26866
|
-
beforeRedirects:
|
|
27220
|
+
beforeRedirects: Object.create(null),
|
|
26867
27221
|
http2Options
|
|
26868
|
-
};
|
|
27222
|
+
});
|
|
26869
27223
|
!utils$1.isUndefined(lookup$1) && (options.lookup = lookup$1);
|
|
26870
|
-
if (config.socketPath)
|
|
26871
|
-
|
|
27224
|
+
if (config.socketPath) {
|
|
27225
|
+
if (typeof config.socketPath !== "string") return reject(new AxiosError("socketPath must be a string", AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
27226
|
+
if (config.allowedSocketPaths != null) {
|
|
27227
|
+
const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
|
|
27228
|
+
const resolvedSocket = path.resolve(config.socketPath);
|
|
27229
|
+
if (!allowed.some((entry) => typeof entry === "string" && path.resolve(entry) === resolvedSocket)) return reject(new AxiosError(`socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
27230
|
+
}
|
|
27231
|
+
options.socketPath = config.socketPath;
|
|
27232
|
+
} else {
|
|
26872
27233
|
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
26873
27234
|
options.port = parsed.port;
|
|
26874
27235
|
setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
|
|
26875
27236
|
}
|
|
26876
27237
|
let transport;
|
|
27238
|
+
let isNativeTransport = false;
|
|
26877
27239
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
26878
27240
|
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
26879
27241
|
if (isHttp2) transport = http2Transport;
|
|
26880
|
-
else if (config.transport) transport = config.transport;
|
|
26881
|
-
else if (config.maxRedirects === 0) transport = isHttpsRequest ? https__default["default"] : http__default["default"];
|
|
26882
27242
|
else {
|
|
26883
|
-
|
|
26884
|
-
if (
|
|
26885
|
-
|
|
27243
|
+
const configTransport = own$1("transport");
|
|
27244
|
+
if (configTransport) transport = configTransport;
|
|
27245
|
+
else if (config.maxRedirects === 0) {
|
|
27246
|
+
transport = isHttpsRequest ? https$1 : http$1;
|
|
27247
|
+
isNativeTransport = true;
|
|
27248
|
+
} else {
|
|
27249
|
+
if (config.maxRedirects) options.maxRedirects = config.maxRedirects;
|
|
27250
|
+
const configBeforeRedirect = own$1("beforeRedirect");
|
|
27251
|
+
if (configBeforeRedirect) options.beforeRedirects.config = configBeforeRedirect;
|
|
27252
|
+
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
27253
|
+
}
|
|
26886
27254
|
}
|
|
26887
27255
|
if (config.maxBodyLength > -1) options.maxBodyLength = config.maxBodyLength;
|
|
26888
27256
|
else options.maxBodyLength = Infinity;
|
|
26889
|
-
|
|
27257
|
+
options.insecureHTTPParser = Boolean(own$1("insecureHTTPParser"));
|
|
26890
27258
|
req = transport.request(options, function handleResponse(res) {
|
|
27259
|
+
clearConnectPhaseTimer();
|
|
26891
27260
|
if (req.destroyed) return;
|
|
26892
27261
|
const streams = [res];
|
|
26893
27262
|
const responseLength = utils$1.toFiniteNumber(res.headers["content-length"]);
|
|
26894
27263
|
if (onDownloadProgress || maxDownloadRate) {
|
|
26895
|
-
const transformStream = new AxiosTransformStream
|
|
27264
|
+
const transformStream = new AxiosTransformStream({ maxRate: utils$1.toFiniteNumber(maxDownloadRate) });
|
|
26896
27265
|
onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3))));
|
|
26897
27266
|
streams.push(transformStream);
|
|
26898
27267
|
}
|
|
@@ -26905,29 +27274,42 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26905
27274
|
case "x-gzip":
|
|
26906
27275
|
case "compress":
|
|
26907
27276
|
case "x-compress":
|
|
26908
|
-
streams.push(
|
|
27277
|
+
streams.push(zlib.createUnzip(zlibOptions));
|
|
26909
27278
|
delete res.headers["content-encoding"];
|
|
26910
27279
|
break;
|
|
26911
27280
|
case "deflate":
|
|
26912
|
-
streams.push(new ZlibHeaderTransformStream
|
|
26913
|
-
streams.push(
|
|
27281
|
+
streams.push(new ZlibHeaderTransformStream());
|
|
27282
|
+
streams.push(zlib.createUnzip(zlibOptions));
|
|
26914
27283
|
delete res.headers["content-encoding"];
|
|
26915
27284
|
break;
|
|
26916
27285
|
case "br": if (isBrotliSupported) {
|
|
26917
|
-
streams.push(
|
|
27286
|
+
streams.push(zlib.createBrotliDecompress(brotliOptions));
|
|
26918
27287
|
delete res.headers["content-encoding"];
|
|
26919
27288
|
}
|
|
26920
27289
|
}
|
|
26921
27290
|
}
|
|
26922
|
-
responseStream = streams.length > 1 ?
|
|
27291
|
+
responseStream = streams.length > 1 ? stream.pipeline(streams, utils$1.noop) : streams[0];
|
|
26923
27292
|
const response = {
|
|
26924
27293
|
status: res.statusCode,
|
|
26925
27294
|
statusText: res.statusMessage,
|
|
26926
|
-
headers: new AxiosHeaders
|
|
27295
|
+
headers: new AxiosHeaders(res.headers),
|
|
26927
27296
|
config,
|
|
26928
27297
|
request: lastRequest
|
|
26929
27298
|
};
|
|
26930
27299
|
if (responseType === "stream") {
|
|
27300
|
+
if (config.maxContentLength > -1) {
|
|
27301
|
+
const limit = config.maxContentLength;
|
|
27302
|
+
const source = responseStream;
|
|
27303
|
+
async function* enforceMaxContentLength() {
|
|
27304
|
+
let totalResponseBytes = 0;
|
|
27305
|
+
for await (const chunk of source) {
|
|
27306
|
+
totalResponseBytes += chunk.length;
|
|
27307
|
+
if (totalResponseBytes > limit) throw new AxiosError("maxContentLength size of " + limit + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, lastRequest);
|
|
27308
|
+
yield chunk;
|
|
27309
|
+
}
|
|
27310
|
+
}
|
|
27311
|
+
responseStream = stream.Readable.from(enforceMaxContentLength(), { objectMode: false });
|
|
27312
|
+
}
|
|
26931
27313
|
response.data = responseStream;
|
|
26932
27314
|
settle(resolve$1, reject, response);
|
|
26933
27315
|
} else {
|
|
@@ -26944,13 +27326,13 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26944
27326
|
});
|
|
26945
27327
|
responseStream.on("aborted", function handlerStreamAborted() {
|
|
26946
27328
|
if (rejected) return;
|
|
26947
|
-
const err = new AxiosError("stream has been aborted", AxiosError.ERR_BAD_RESPONSE, config, lastRequest);
|
|
27329
|
+
const err = new AxiosError("stream has been aborted", AxiosError.ERR_BAD_RESPONSE, config, lastRequest, response);
|
|
26948
27330
|
responseStream.destroy(err);
|
|
26949
27331
|
reject(err);
|
|
26950
27332
|
});
|
|
26951
27333
|
responseStream.on("error", function handleStreamError(err) {
|
|
26952
|
-
if (
|
|
26953
|
-
reject(AxiosError.from(err, null, config, lastRequest));
|
|
27334
|
+
if (rejected) return;
|
|
27335
|
+
reject(AxiosError.from(err, null, config, lastRequest, response));
|
|
26954
27336
|
});
|
|
26955
27337
|
responseStream.on("end", function handleStreamEnd() {
|
|
26956
27338
|
try {
|
|
@@ -26980,8 +27362,23 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26980
27362
|
req.on("error", function handleRequestError(err) {
|
|
26981
27363
|
reject(AxiosError.from(err, null, config, req));
|
|
26982
27364
|
});
|
|
27365
|
+
const boundSockets = /* @__PURE__ */ new Set();
|
|
26983
27366
|
req.on("socket", function handleRequestSocket(socket) {
|
|
26984
27367
|
socket.setKeepAlive(true, 1e3 * 60);
|
|
27368
|
+
if (!socket[kAxiosSocketListener]) {
|
|
27369
|
+
socket.on("error", function handleSocketError(err) {
|
|
27370
|
+
const current = socket[kAxiosCurrentReq];
|
|
27371
|
+
if (current && !current.destroyed) current.destroy(err);
|
|
27372
|
+
});
|
|
27373
|
+
socket[kAxiosSocketListener] = true;
|
|
27374
|
+
}
|
|
27375
|
+
socket[kAxiosCurrentReq] = req;
|
|
27376
|
+
boundSockets.add(socket);
|
|
27377
|
+
});
|
|
27378
|
+
req.once("close", function clearCurrentReq() {
|
|
27379
|
+
clearConnectPhaseTimer();
|
|
27380
|
+
for (const socket of boundSockets) if (socket[kAxiosCurrentReq] === req) socket[kAxiosCurrentReq] = null;
|
|
27381
|
+
boundSockets.clear();
|
|
26985
27382
|
});
|
|
26986
27383
|
if (config.timeout) {
|
|
26987
27384
|
const timeout = parseInt(config.timeout, 10);
|
|
@@ -26989,13 +27386,12 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
26989
27386
|
abort$3(new AxiosError("error trying to parse `config.timeout` to int", AxiosError.ERR_BAD_OPTION_VALUE, config, req));
|
|
26990
27387
|
return;
|
|
26991
27388
|
}
|
|
26992
|
-
|
|
27389
|
+
const handleTimeout = function handleTimeout$1() {
|
|
26993
27390
|
if (isDone) return;
|
|
26994
|
-
|
|
26995
|
-
|
|
26996
|
-
|
|
26997
|
-
|
|
26998
|
-
});
|
|
27391
|
+
abort$3(createTimeoutError());
|
|
27392
|
+
};
|
|
27393
|
+
if (isNativeTransport && timeout > 0) connectPhaseTimer = setTimeout(handleTimeout, timeout);
|
|
27394
|
+
req.setTimeout(timeout, handleTimeout);
|
|
26999
27395
|
} else req.setTimeout(0);
|
|
27000
27396
|
if (utils$1.isStream(data)) {
|
|
27001
27397
|
let ended = false;
|
|
@@ -27010,23 +27406,36 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27010
27406
|
data.on("close", () => {
|
|
27011
27407
|
if (!ended && !errored) abort$3(new CanceledError("Request stream has been aborted", config, req));
|
|
27012
27408
|
});
|
|
27013
|
-
data
|
|
27409
|
+
let uploadStream = data;
|
|
27410
|
+
if (config.maxBodyLength > -1 && config.maxRedirects === 0) {
|
|
27411
|
+
const limit = config.maxBodyLength;
|
|
27412
|
+
let bytesSent = 0;
|
|
27413
|
+
uploadStream = stream.pipeline([data, new stream.Transform({ transform(chunk, _enc, cb) {
|
|
27414
|
+
bytesSent += chunk.length;
|
|
27415
|
+
if (bytesSent > limit) return cb(new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, req));
|
|
27416
|
+
cb(null, chunk);
|
|
27417
|
+
} })], utils$1.noop);
|
|
27418
|
+
uploadStream.on("error", (err) => {
|
|
27419
|
+
if (!req.destroyed) req.destroy(err);
|
|
27420
|
+
});
|
|
27421
|
+
}
|
|
27422
|
+
uploadStream.pipe(req);
|
|
27014
27423
|
} else {
|
|
27015
27424
|
data && req.write(data);
|
|
27016
27425
|
req.end();
|
|
27017
27426
|
}
|
|
27018
27427
|
});
|
|
27019
27428
|
};
|
|
27020
|
-
|
|
27429
|
+
var isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin$1, isMSIE) => (url$2) => {
|
|
27021
27430
|
url$2 = new URL(url$2, platform.origin);
|
|
27022
27431
|
return origin$1.protocol === url$2.protocol && origin$1.host === url$2.host && (isMSIE || origin$1.port === url$2.port);
|
|
27023
27432
|
})(new URL(platform.origin), platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)) : () => true;
|
|
27024
|
-
|
|
27025
|
-
write(name, value, expires, path$
|
|
27433
|
+
var cookies = platform.hasStandardBrowserEnv ? {
|
|
27434
|
+
write(name, value, expires, path$3, domain, secure, sameSite) {
|
|
27026
27435
|
if (typeof document === "undefined") return;
|
|
27027
27436
|
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
27028
27437
|
if (utils$1.isNumber(expires)) cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
27029
|
-
if (utils$1.isString(path$
|
|
27438
|
+
if (utils$1.isString(path$3)) cookie.push(`path=${path$3}`);
|
|
27030
27439
|
if (utils$1.isString(domain)) cookie.push(`domain=${domain}`);
|
|
27031
27440
|
if (secure === true) cookie.push("secure");
|
|
27032
27441
|
if (utils$1.isString(sameSite)) cookie.push(`SameSite=${sameSite}`);
|
|
@@ -27034,8 +27443,13 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27034
27443
|
},
|
|
27035
27444
|
read(name) {
|
|
27036
27445
|
if (typeof document === "undefined") return null;
|
|
27037
|
-
const
|
|
27038
|
-
|
|
27446
|
+
const cookies$1 = document.cookie.split(";");
|
|
27447
|
+
for (let i = 0; i < cookies$1.length; i++) {
|
|
27448
|
+
const cookie = cookies$1[i].replace(/^\s+/, "");
|
|
27449
|
+
const eq = cookie.indexOf("=");
|
|
27450
|
+
if (eq !== -1 && cookie.slice(0, eq) === name) return decodeURIComponent(cookie.slice(eq + 1));
|
|
27451
|
+
}
|
|
27452
|
+
return null;
|
|
27039
27453
|
},
|
|
27040
27454
|
remove(name) {
|
|
27041
27455
|
this.write(name, "", Date.now() - 864e5, "/");
|
|
@@ -27047,7 +27461,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27047
27461
|
},
|
|
27048
27462
|
remove() {}
|
|
27049
27463
|
};
|
|
27050
|
-
const headersToObject = (thing) => thing instanceof AxiosHeaders
|
|
27464
|
+
const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
|
|
27051
27465
|
/**
|
|
27052
27466
|
* Config-specific merge-function which creates a new config-object
|
|
27053
27467
|
* by merging two configuration objects together.
|
|
@@ -27059,7 +27473,14 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27059
27473
|
*/
|
|
27060
27474
|
function mergeConfig(config1, config2) {
|
|
27061
27475
|
config2 = config2 || {};
|
|
27062
|
-
const config =
|
|
27476
|
+
const config = Object.create(null);
|
|
27477
|
+
Object.defineProperty(config, "hasOwnProperty", {
|
|
27478
|
+
__proto__: null,
|
|
27479
|
+
value: Object.prototype.hasOwnProperty,
|
|
27480
|
+
enumerable: false,
|
|
27481
|
+
writable: true,
|
|
27482
|
+
configurable: true
|
|
27483
|
+
});
|
|
27063
27484
|
function getMergedValue(target, source, prop, caseless) {
|
|
27064
27485
|
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) return utils$1.merge.call({ caseless }, target, source);
|
|
27065
27486
|
else if (utils$1.isPlainObject(source)) return utils$1.merge({}, source);
|
|
@@ -27078,8 +27499,8 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27078
27499
|
else if (!utils$1.isUndefined(a)) return getMergedValue(void 0, a);
|
|
27079
27500
|
}
|
|
27080
27501
|
function mergeDirectKeys(a, b, prop) {
|
|
27081
|
-
if (prop
|
|
27082
|
-
else if (prop
|
|
27502
|
+
if (utils$1.hasOwnProp(config2, prop)) return getMergedValue(a, b);
|
|
27503
|
+
else if (utils$1.hasOwnProp(config1, prop)) return getMergedValue(void 0, a);
|
|
27083
27504
|
}
|
|
27084
27505
|
const mergeMap = {
|
|
27085
27506
|
url: valueFromConfig2,
|
|
@@ -27108,6 +27529,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27108
27529
|
httpsAgent: defaultToConfig2,
|
|
27109
27530
|
cancelToken: defaultToConfig2,
|
|
27110
27531
|
socketPath: defaultToConfig2,
|
|
27532
|
+
allowedSocketPaths: defaultToConfig2,
|
|
27111
27533
|
responseEncoding: defaultToConfig2,
|
|
27112
27534
|
validateStatus: mergeDirectKeys,
|
|
27113
27535
|
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
@@ -27116,42 +27538,65 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27116
27538
|
...config1,
|
|
27117
27539
|
...config2
|
|
27118
27540
|
}), function computeConfigValue(prop) {
|
|
27119
|
-
|
|
27120
|
-
const
|
|
27541
|
+
if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
|
|
27542
|
+
const merge$5 = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
27543
|
+
const configValue = merge$5(utils$1.hasOwnProp(config1, prop) ? config1[prop] : void 0, utils$1.hasOwnProp(config2, prop) ? config2[prop] : void 0, prop);
|
|
27121
27544
|
utils$1.isUndefined(configValue) && merge$5 !== mergeDirectKeys || (config[prop] = configValue);
|
|
27122
27545
|
});
|
|
27123
27546
|
return config;
|
|
27124
27547
|
}
|
|
27125
|
-
const
|
|
27548
|
+
const FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
|
|
27549
|
+
function setFormDataHeaders(headers, formHeaders, policy) {
|
|
27550
|
+
if (policy !== "content-only") {
|
|
27551
|
+
headers.set(formHeaders);
|
|
27552
|
+
return;
|
|
27553
|
+
}
|
|
27554
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
27555
|
+
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) headers.set(key, val);
|
|
27556
|
+
});
|
|
27557
|
+
}
|
|
27558
|
+
/**
|
|
27559
|
+
* Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
|
|
27560
|
+
* This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
|
|
27561
|
+
*
|
|
27562
|
+
* @param {string} str The string to encode
|
|
27563
|
+
*
|
|
27564
|
+
* @returns {string} UTF-8 bytes as a Latin-1 string
|
|
27565
|
+
*/
|
|
27566
|
+
const encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
|
|
27567
|
+
var resolveConfig = (config) => {
|
|
27126
27568
|
const newConfig = mergeConfig({}, config);
|
|
27127
|
-
|
|
27128
|
-
|
|
27129
|
-
|
|
27130
|
-
|
|
27569
|
+
const own$1 = (key) => utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
|
|
27570
|
+
const data = own$1("data");
|
|
27571
|
+
let withXSRFToken = own$1("withXSRFToken");
|
|
27572
|
+
const xsrfHeaderName = own$1("xsrfHeaderName");
|
|
27573
|
+
const xsrfCookieName = own$1("xsrfCookieName");
|
|
27574
|
+
let headers = own$1("headers");
|
|
27575
|
+
const auth = own$1("auth");
|
|
27576
|
+
const baseURL = own$1("baseURL");
|
|
27577
|
+
const allowAbsoluteUrls = own$1("allowAbsoluteUrls");
|
|
27578
|
+
const url$2 = own$1("url");
|
|
27579
|
+
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
27580
|
+
newConfig.url = buildURL(buildFullPath(baseURL, url$2, allowAbsoluteUrls), config.params, config.paramsSerializer);
|
|
27581
|
+
if (auth) headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : "")));
|
|
27131
27582
|
if (utils$1.isFormData(data)) {
|
|
27132
27583
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) headers.setContentType(void 0);
|
|
27133
|
-
else if (utils$1.isFunction(data.getHeaders))
|
|
27134
|
-
const formHeaders = data.getHeaders();
|
|
27135
|
-
const allowedHeaders = ["content-type", "content-length"];
|
|
27136
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
27137
|
-
if (allowedHeaders.includes(key.toLowerCase())) headers.set(key, val);
|
|
27138
|
-
});
|
|
27139
|
-
}
|
|
27584
|
+
else if (utils$1.isFunction(data.getHeaders)) setFormDataHeaders(headers, data.getHeaders(), own$1("formDataHeaderPolicy"));
|
|
27140
27585
|
}
|
|
27141
27586
|
if (platform.hasStandardBrowserEnv) {
|
|
27142
|
-
|
|
27143
|
-
if (withXSRFToken || withXSRFToken
|
|
27587
|
+
if (utils$1.isFunction(withXSRFToken)) withXSRFToken = withXSRFToken(newConfig);
|
|
27588
|
+
if (withXSRFToken === true || withXSRFToken == null && isURLSameOrigin(newConfig.url)) {
|
|
27144
27589
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
27145
27590
|
if (xsrfValue) headers.set(xsrfHeaderName, xsrfValue);
|
|
27146
27591
|
}
|
|
27147
27592
|
}
|
|
27148
27593
|
return newConfig;
|
|
27149
27594
|
};
|
|
27150
|
-
|
|
27595
|
+
var xhrAdapter = typeof XMLHttpRequest !== "undefined" && function(config) {
|
|
27151
27596
|
return new Promise(function dispatchXhrRequest(resolve$1, reject) {
|
|
27152
27597
|
const _config = resolveConfig(config);
|
|
27153
27598
|
let requestData = _config.data;
|
|
27154
|
-
const requestHeaders = AxiosHeaders
|
|
27599
|
+
const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
|
|
27155
27600
|
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
27156
27601
|
let onCanceled;
|
|
27157
27602
|
let uploadThrottled, downloadThrottled;
|
|
@@ -27167,7 +27612,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27167
27612
|
request.timeout = _config.timeout;
|
|
27168
27613
|
function onloadend() {
|
|
27169
27614
|
if (!request) return;
|
|
27170
|
-
const responseHeaders = AxiosHeaders
|
|
27615
|
+
const responseHeaders = AxiosHeaders.from("getAllResponseHeaders" in request && request.getAllResponseHeaders());
|
|
27171
27616
|
settle(function _resolve(value) {
|
|
27172
27617
|
resolve$1(value);
|
|
27173
27618
|
done();
|
|
@@ -27187,18 +27632,20 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27187
27632
|
if ("onloadend" in request) request.onloadend = onloadend;
|
|
27188
27633
|
else request.onreadystatechange = function handleLoad() {
|
|
27189
27634
|
if (!request || request.readyState !== 4) return;
|
|
27190
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.
|
|
27635
|
+
if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith("file:"))) return;
|
|
27191
27636
|
setTimeout(onloadend);
|
|
27192
27637
|
};
|
|
27193
27638
|
request.onabort = function handleAbort() {
|
|
27194
27639
|
if (!request) return;
|
|
27195
27640
|
reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
|
|
27641
|
+
done();
|
|
27196
27642
|
request = null;
|
|
27197
27643
|
};
|
|
27198
27644
|
request.onerror = function handleError(event) {
|
|
27199
27645
|
const err = new AxiosError(event && event.message ? event.message : "Network Error", AxiosError.ERR_NETWORK, config, request);
|
|
27200
27646
|
err.event = event || null;
|
|
27201
27647
|
reject(err);
|
|
27648
|
+
done();
|
|
27202
27649
|
request = null;
|
|
27203
27650
|
};
|
|
27204
27651
|
request.ontimeout = function handleTimeout() {
|
|
@@ -27206,6 +27653,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27206
27653
|
const transitional = _config.transitional || transitionalDefaults;
|
|
27207
27654
|
if (_config.timeoutErrorMessage) timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
27208
27655
|
reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
|
|
27656
|
+
done();
|
|
27209
27657
|
request = null;
|
|
27210
27658
|
};
|
|
27211
27659
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
@@ -27228,13 +27676,14 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27228
27676
|
if (!request) return;
|
|
27229
27677
|
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
27230
27678
|
request.abort();
|
|
27679
|
+
done();
|
|
27231
27680
|
request = null;
|
|
27232
27681
|
};
|
|
27233
27682
|
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
27234
27683
|
if (_config.signal) _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
|
|
27235
27684
|
}
|
|
27236
27685
|
const protocol = parseProtocol(_config.url);
|
|
27237
|
-
if (protocol && platform.protocols.
|
|
27686
|
+
if (protocol && !platform.protocols.includes(protocol)) {
|
|
27238
27687
|
reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
|
|
27239
27688
|
return;
|
|
27240
27689
|
}
|
|
@@ -27256,7 +27705,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27256
27705
|
};
|
|
27257
27706
|
let timer = timeout && setTimeout(() => {
|
|
27258
27707
|
timer = null;
|
|
27259
|
-
onabort(new AxiosError(`timeout ${timeout}
|
|
27708
|
+
onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
|
|
27260
27709
|
}, timeout);
|
|
27261
27710
|
const unsubscribe = () => {
|
|
27262
27711
|
if (signals) {
|
|
@@ -27274,10 +27723,9 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27274
27723
|
return signal;
|
|
27275
27724
|
}
|
|
27276
27725
|
};
|
|
27277
|
-
const composeSignals$1 = composeSignals;
|
|
27278
27726
|
const streamChunk = function* (chunk, chunkSize) {
|
|
27279
27727
|
let len = chunk.byteLength;
|
|
27280
|
-
if (
|
|
27728
|
+
if (len < chunkSize) {
|
|
27281
27729
|
yield chunk;
|
|
27282
27730
|
return;
|
|
27283
27731
|
}
|
|
@@ -27343,11 +27791,6 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27343
27791
|
};
|
|
27344
27792
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
27345
27793
|
const { isFunction } = utils$1;
|
|
27346
|
-
const globalFetchAPI = (({ Request, Response }) => ({
|
|
27347
|
-
Request,
|
|
27348
|
-
Response
|
|
27349
|
-
}))(utils$1.global);
|
|
27350
|
-
const { ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$1 } = utils$1.global;
|
|
27351
27794
|
const test = (fn, ...args) => {
|
|
27352
27795
|
try {
|
|
27353
27796
|
return !!fn(...args);
|
|
@@ -27356,7 +27799,13 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27356
27799
|
}
|
|
27357
27800
|
};
|
|
27358
27801
|
const factory = (env) => {
|
|
27359
|
-
|
|
27802
|
+
var _utils$global;
|
|
27803
|
+
const globalObject = (_utils$global = utils$1.global) !== null && _utils$global !== void 0 ? _utils$global : globalThis;
|
|
27804
|
+
const { ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$1 } = globalObject;
|
|
27805
|
+
env = utils$1.merge.call({ skipUndefined: true }, {
|
|
27806
|
+
Request: globalObject.Request,
|
|
27807
|
+
Response: globalObject.Response
|
|
27808
|
+
}, env);
|
|
27360
27809
|
const { fetch: envFetch, Request, Response } = env;
|
|
27361
27810
|
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === "function";
|
|
27362
27811
|
const isRequestSupported = isFunction(Request);
|
|
@@ -27366,14 +27815,16 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27366
27815
|
const encodeText = isFetchSupported && (typeof TextEncoder$1 === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder$1()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
27367
27816
|
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
27368
27817
|
let duplexAccessed = false;
|
|
27369
|
-
const
|
|
27818
|
+
const request = new Request(platform.origin, {
|
|
27370
27819
|
body: new ReadableStream$1(),
|
|
27371
27820
|
method: "POST",
|
|
27372
27821
|
get duplex() {
|
|
27373
27822
|
duplexAccessed = true;
|
|
27374
27823
|
return "half";
|
|
27375
27824
|
}
|
|
27376
|
-
})
|
|
27825
|
+
});
|
|
27826
|
+
const hasContentType = request.headers.has("Content-Type");
|
|
27827
|
+
if (request.body != null) request.body.cancel();
|
|
27377
27828
|
return duplexAccessed && !hasContentType;
|
|
27378
27829
|
});
|
|
27379
27830
|
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
|
|
@@ -27407,16 +27858,25 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27407
27858
|
return length == null ? getBodyLength(body) : length;
|
|
27408
27859
|
};
|
|
27409
27860
|
return async (config) => {
|
|
27410
|
-
let { url: url$2, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = "same-origin", fetchOptions } = resolveConfig(config);
|
|
27861
|
+
let { url: url$2, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = "same-origin", fetchOptions, maxContentLength, maxBodyLength } = resolveConfig(config);
|
|
27862
|
+
const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
|
|
27863
|
+
const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
27411
27864
|
let _fetch = envFetch || fetch;
|
|
27412
27865
|
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
27413
|
-
let composedSignal = composeSignals
|
|
27866
|
+
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
27414
27867
|
let request = null;
|
|
27415
27868
|
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
27416
27869
|
composedSignal.unsubscribe();
|
|
27417
27870
|
});
|
|
27418
27871
|
let requestContentLength;
|
|
27419
27872
|
try {
|
|
27873
|
+
if (hasMaxContentLength && typeof url$2 === "string" && url$2.startsWith("data:")) {
|
|
27874
|
+
if (estimateDataURLDecodedBytes(url$2) > maxContentLength) throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
27875
|
+
}
|
|
27876
|
+
if (hasMaxBodyLength && method !== "get" && method !== "head") {
|
|
27877
|
+
const outboundLength = await resolveBodyLength(headers, data);
|
|
27878
|
+
if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) throw new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
|
|
27879
|
+
}
|
|
27420
27880
|
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
|
27421
27881
|
let _request = new Request(url$2, {
|
|
27422
27882
|
method: "POST",
|
|
@@ -27432,6 +27892,11 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27432
27892
|
}
|
|
27433
27893
|
if (!utils$1.isString(withCredentials)) withCredentials = withCredentials ? "include" : "omit";
|
|
27434
27894
|
const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
|
|
27895
|
+
if (utils$1.isFormData(data)) {
|
|
27896
|
+
const contentType$1 = headers.getContentType();
|
|
27897
|
+
if (contentType$1 && /^multipart\/form-data/i.test(contentType$1) && !/boundary=/i.test(contentType$1)) headers.delete("content-type");
|
|
27898
|
+
}
|
|
27899
|
+
headers.set("User-Agent", "axios/" + VERSION, false);
|
|
27435
27900
|
const resolvedOptions = {
|
|
27436
27901
|
...fetchOptions,
|
|
27437
27902
|
signal: composedSignal,
|
|
@@ -27443,8 +27908,12 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27443
27908
|
};
|
|
27444
27909
|
request = isRequestSupported && new Request(url$2, resolvedOptions);
|
|
27445
27910
|
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url$2, resolvedOptions));
|
|
27911
|
+
if (hasMaxContentLength) {
|
|
27912
|
+
const declaredLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
|
|
27913
|
+
if (declaredLength != null && declaredLength > maxContentLength) throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
27914
|
+
}
|
|
27446
27915
|
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
27447
|
-
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
27916
|
+
if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) {
|
|
27448
27917
|
const options = {};
|
|
27449
27918
|
[
|
|
27450
27919
|
"status",
|
|
@@ -27455,18 +27924,35 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27455
27924
|
});
|
|
27456
27925
|
const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
|
|
27457
27926
|
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
|
|
27458
|
-
|
|
27927
|
+
let bytesRead = 0;
|
|
27928
|
+
const onChunkProgress = (loadedBytes) => {
|
|
27929
|
+
if (hasMaxContentLength) {
|
|
27930
|
+
bytesRead = loadedBytes;
|
|
27931
|
+
if (bytesRead > maxContentLength) throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
27932
|
+
}
|
|
27933
|
+
onProgress && onProgress(loadedBytes);
|
|
27934
|
+
};
|
|
27935
|
+
response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
|
|
27459
27936
|
flush && flush();
|
|
27460
27937
|
unsubscribe && unsubscribe();
|
|
27461
27938
|
}), options);
|
|
27462
27939
|
}
|
|
27463
27940
|
responseType = responseType || "text";
|
|
27464
27941
|
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
|
|
27942
|
+
if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
|
|
27943
|
+
let materializedSize;
|
|
27944
|
+
if (responseData != null) {
|
|
27945
|
+
if (typeof responseData.byteLength === "number") materializedSize = responseData.byteLength;
|
|
27946
|
+
else if (typeof responseData.size === "number") materializedSize = responseData.size;
|
|
27947
|
+
else if (typeof responseData === "string") materializedSize = typeof TextEncoder$1 === "function" ? new TextEncoder$1().encode(responseData).byteLength : responseData.length;
|
|
27948
|
+
}
|
|
27949
|
+
if (typeof materializedSize === "number" && materializedSize > maxContentLength) throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
27950
|
+
}
|
|
27465
27951
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
27466
27952
|
return await new Promise((resolve$1, reject) => {
|
|
27467
27953
|
settle(resolve$1, reject, {
|
|
27468
27954
|
data: responseData,
|
|
27469
|
-
headers: AxiosHeaders
|
|
27955
|
+
headers: AxiosHeaders.from(response.headers),
|
|
27470
27956
|
status: response.status,
|
|
27471
27957
|
statusText: response.statusText,
|
|
27472
27958
|
config,
|
|
@@ -27475,8 +27961,15 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27475
27961
|
});
|
|
27476
27962
|
} catch (err) {
|
|
27477
27963
|
unsubscribe && unsubscribe();
|
|
27478
|
-
if (
|
|
27479
|
-
|
|
27964
|
+
if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) {
|
|
27965
|
+
const canceledError = composedSignal.reason;
|
|
27966
|
+
canceledError.config = config;
|
|
27967
|
+
request && (canceledError.request = request);
|
|
27968
|
+
err !== canceledError && (canceledError.cause = err);
|
|
27969
|
+
throw canceledError;
|
|
27970
|
+
}
|
|
27971
|
+
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) throw Object.assign(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response), { cause: err.cause || err });
|
|
27972
|
+
throw AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
27480
27973
|
}
|
|
27481
27974
|
};
|
|
27482
27975
|
};
|
|
@@ -27505,7 +27998,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27505
27998
|
* - `http` for Node.js
|
|
27506
27999
|
* - `xhr` for browsers
|
|
27507
28000
|
* - `fetch` for fetch API-based requests
|
|
27508
|
-
*
|
|
28001
|
+
*
|
|
27509
28002
|
* @type {Object<string, Function|Object>}
|
|
27510
28003
|
*/
|
|
27511
28004
|
const knownAdapters = {
|
|
@@ -27516,21 +28009,27 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27516
28009
|
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
27517
28010
|
if (fn) {
|
|
27518
28011
|
try {
|
|
27519
|
-
Object.defineProperty(fn, "name", {
|
|
28012
|
+
Object.defineProperty(fn, "name", {
|
|
28013
|
+
__proto__: null,
|
|
28014
|
+
value
|
|
28015
|
+
});
|
|
27520
28016
|
} catch (e$1) {}
|
|
27521
|
-
Object.defineProperty(fn, "adapterName", {
|
|
28017
|
+
Object.defineProperty(fn, "adapterName", {
|
|
28018
|
+
__proto__: null,
|
|
28019
|
+
value
|
|
28020
|
+
});
|
|
27522
28021
|
}
|
|
27523
28022
|
});
|
|
27524
28023
|
/**
|
|
27525
28024
|
* Render a rejection reason string for unknown or unsupported adapters
|
|
27526
|
-
*
|
|
28025
|
+
*
|
|
27527
28026
|
* @param {string} reason
|
|
27528
28027
|
* @returns {string}
|
|
27529
28028
|
*/
|
|
27530
28029
|
const renderReason = (reason) => `- ${reason}`;
|
|
27531
28030
|
/**
|
|
27532
28031
|
* Check if the adapter is resolved (function, null, or false)
|
|
27533
|
-
*
|
|
28032
|
+
*
|
|
27534
28033
|
* @param {Function|null|false} adapter
|
|
27535
28034
|
* @returns {boolean}
|
|
27536
28035
|
*/
|
|
@@ -27539,7 +28038,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27539
28038
|
* Get the first suitable adapter from the provided list.
|
|
27540
28039
|
* Tries each adapter in order until a supported one is found.
|
|
27541
28040
|
* Throws an AxiosError if no adapter is suitable.
|
|
27542
|
-
*
|
|
28041
|
+
*
|
|
27543
28042
|
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
27544
28043
|
* @param {Object} config - Axios request configuration
|
|
27545
28044
|
* @throws {AxiosError} If no suitable adapter is available
|
|
@@ -27571,7 +28070,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27571
28070
|
/**
|
|
27572
28071
|
* Exports Axios adapters and utility to resolve an adapter
|
|
27573
28072
|
*/
|
|
27574
|
-
|
|
28073
|
+
var adapters = {
|
|
27575
28074
|
getAdapter,
|
|
27576
28075
|
adapters: knownAdapters
|
|
27577
28076
|
};
|
|
@@ -27595,24 +28094,34 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27595
28094
|
*/
|
|
27596
28095
|
function dispatchRequest(config) {
|
|
27597
28096
|
throwIfCancellationRequested(config);
|
|
27598
|
-
config.headers = AxiosHeaders
|
|
28097
|
+
config.headers = AxiosHeaders.from(config.headers);
|
|
27599
28098
|
config.data = transformData.call(config, config.transformRequest);
|
|
27600
28099
|
if ([
|
|
27601
28100
|
"post",
|
|
27602
28101
|
"put",
|
|
27603
28102
|
"patch"
|
|
27604
28103
|
].indexOf(config.method) !== -1) config.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
27605
|
-
return adapters.getAdapter(config.adapter || defaults
|
|
28104
|
+
return adapters.getAdapter(config.adapter || defaults.adapter, config)(config).then(function onAdapterResolution(response) {
|
|
27606
28105
|
throwIfCancellationRequested(config);
|
|
27607
|
-
response
|
|
27608
|
-
|
|
28106
|
+
config.response = response;
|
|
28107
|
+
try {
|
|
28108
|
+
response.data = transformData.call(config, config.transformResponse, response);
|
|
28109
|
+
} finally {
|
|
28110
|
+
delete config.response;
|
|
28111
|
+
}
|
|
28112
|
+
response.headers = AxiosHeaders.from(response.headers);
|
|
27609
28113
|
return response;
|
|
27610
28114
|
}, function onAdapterRejection(reason) {
|
|
27611
28115
|
if (!isCancel(reason)) {
|
|
27612
28116
|
throwIfCancellationRequested(config);
|
|
27613
28117
|
if (reason && reason.response) {
|
|
27614
|
-
|
|
27615
|
-
|
|
28118
|
+
config.response = reason.response;
|
|
28119
|
+
try {
|
|
28120
|
+
reason.response.data = transformData.call(config, config.transformResponse, reason.response);
|
|
28121
|
+
} finally {
|
|
28122
|
+
delete config.response;
|
|
28123
|
+
}
|
|
28124
|
+
reason.response.headers = AxiosHeaders.from(reason.response.headers);
|
|
27616
28125
|
}
|
|
27617
28126
|
}
|
|
27618
28127
|
return Promise.reject(reason);
|
|
@@ -27675,7 +28184,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27675
28184
|
let i = keys.length;
|
|
27676
28185
|
while (i-- > 0) {
|
|
27677
28186
|
const opt = keys[i];
|
|
27678
|
-
const validator$1 = schema$6[opt];
|
|
28187
|
+
const validator$1 = Object.prototype.hasOwnProperty.call(schema$6, opt) ? schema$6[opt] : void 0;
|
|
27679
28188
|
if (validator$1) {
|
|
27680
28189
|
const value = options[opt];
|
|
27681
28190
|
const result = value === void 0 || validator$1(value, opt, options);
|
|
@@ -27685,7 +28194,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27685
28194
|
if (allowUnknown !== true) throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION);
|
|
27686
28195
|
}
|
|
27687
28196
|
}
|
|
27688
|
-
|
|
28197
|
+
var validator = {
|
|
27689
28198
|
assertOptions,
|
|
27690
28199
|
validators: validators$1
|
|
27691
28200
|
};
|
|
@@ -27701,8 +28210,8 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27701
28210
|
constructor(instanceConfig) {
|
|
27702
28211
|
this.defaults = instanceConfig || {};
|
|
27703
28212
|
this.interceptors = {
|
|
27704
|
-
request: new InterceptorManager
|
|
27705
|
-
response: new InterceptorManager
|
|
28213
|
+
request: new InterceptorManager(),
|
|
28214
|
+
response: new InterceptorManager()
|
|
27706
28215
|
};
|
|
27707
28216
|
}
|
|
27708
28217
|
/**
|
|
@@ -27720,10 +28229,19 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27720
28229
|
if (err instanceof Error) {
|
|
27721
28230
|
let dummy = {};
|
|
27722
28231
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = /* @__PURE__ */ new Error();
|
|
27723
|
-
const stack =
|
|
28232
|
+
const stack = (() => {
|
|
28233
|
+
if (!dummy.stack) return "";
|
|
28234
|
+
const firstNewlineIndex = dummy.stack.indexOf("\n");
|
|
28235
|
+
return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
|
|
28236
|
+
})();
|
|
27724
28237
|
try {
|
|
27725
28238
|
if (!err.stack) err.stack = stack;
|
|
27726
|
-
else if (stack
|
|
28239
|
+
else if (stack) {
|
|
28240
|
+
const firstNewlineIndex = stack.indexOf("\n");
|
|
28241
|
+
const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
|
|
28242
|
+
const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
|
|
28243
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) err.stack += "\n" + stack;
|
|
28244
|
+
}
|
|
27727
28245
|
} catch (e$1) {}
|
|
27728
28246
|
}
|
|
27729
28247
|
throw err;
|
|
@@ -27739,7 +28257,8 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27739
28257
|
if (transitional !== void 0) validator.assertOptions(transitional, {
|
|
27740
28258
|
silentJSONParsing: validators.transitional(validators.boolean),
|
|
27741
28259
|
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
27742
|
-
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
28260
|
+
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
28261
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
|
|
27743
28262
|
}, false);
|
|
27744
28263
|
if (paramsSerializer != null) if (utils$1.isFunction(paramsSerializer)) config.paramsSerializer = { serialize: paramsSerializer };
|
|
27745
28264
|
else validator.assertOptions(paramsSerializer, {
|
|
@@ -27762,17 +28281,20 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27762
28281
|
"post",
|
|
27763
28282
|
"put",
|
|
27764
28283
|
"patch",
|
|
28284
|
+
"query",
|
|
27765
28285
|
"common"
|
|
27766
28286
|
], (method) => {
|
|
27767
28287
|
delete headers[method];
|
|
27768
28288
|
});
|
|
27769
|
-
config.headers = AxiosHeaders
|
|
28289
|
+
config.headers = AxiosHeaders.concat(contextHeaders, headers);
|
|
27770
28290
|
const requestInterceptorChain = [];
|
|
27771
28291
|
let synchronousRequestInterceptors = true;
|
|
27772
28292
|
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
27773
28293
|
if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) return;
|
|
27774
28294
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
27775
|
-
|
|
28295
|
+
const transitional$1 = config.transitional || transitionalDefaults;
|
|
28296
|
+
if (transitional$1 && transitional$1.legacyInterceptorReqResOrdering) requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
28297
|
+
else requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
27776
28298
|
});
|
|
27777
28299
|
const responseInterceptorChain = [];
|
|
27778
28300
|
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
@@ -27834,7 +28356,8 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27834
28356
|
utils$1.forEach([
|
|
27835
28357
|
"post",
|
|
27836
28358
|
"put",
|
|
27837
|
-
"patch"
|
|
28359
|
+
"patch",
|
|
28360
|
+
"query"
|
|
27838
28361
|
], function forEachMethodWithData(method) {
|
|
27839
28362
|
function generateHTTPMethod(isForm) {
|
|
27840
28363
|
return function httpMethod(url$2, data, config) {
|
|
@@ -27847,9 +28370,8 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27847
28370
|
};
|
|
27848
28371
|
}
|
|
27849
28372
|
Axios.prototype[method] = generateHTTPMethod();
|
|
27850
|
-
Axios.prototype[method + "Form"] = generateHTTPMethod(true);
|
|
28373
|
+
if (method !== "query") Axios.prototype[method + "Form"] = generateHTTPMethod(true);
|
|
27851
28374
|
});
|
|
27852
|
-
const Axios$1 = Axios;
|
|
27853
28375
|
/**
|
|
27854
28376
|
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
|
27855
28377
|
*
|
|
@@ -27936,7 +28458,6 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27936
28458
|
};
|
|
27937
28459
|
}
|
|
27938
28460
|
};
|
|
27939
|
-
const CancelToken$1 = CancelToken;
|
|
27940
28461
|
/**
|
|
27941
28462
|
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
|
27942
28463
|
*
|
|
@@ -27944,7 +28465,7 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
27944
28465
|
*
|
|
27945
28466
|
* ```js
|
|
27946
28467
|
* function f(x, y, z) {}
|
|
27947
|
-
*
|
|
28468
|
+
* const args = [1, 2, 3];
|
|
27948
28469
|
* f.apply(null, args);
|
|
27949
28470
|
* ```
|
|
27950
28471
|
*
|
|
@@ -28047,7 +28568,6 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
28047
28568
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
28048
28569
|
HttpStatusCode[value] = key;
|
|
28049
28570
|
});
|
|
28050
|
-
const HttpStatusCode$1 = HttpStatusCode;
|
|
28051
28571
|
/**
|
|
28052
28572
|
* Create an instance of Axios
|
|
28053
28573
|
*
|
|
@@ -28056,19 +28576,19 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
28056
28576
|
* @returns {Axios} A new instance of Axios
|
|
28057
28577
|
*/
|
|
28058
28578
|
function createInstance(defaultConfig) {
|
|
28059
|
-
const context = new Axios
|
|
28060
|
-
const instance = bind(Axios
|
|
28061
|
-
utils$1.extend(instance, Axios
|
|
28579
|
+
const context = new Axios(defaultConfig);
|
|
28580
|
+
const instance = bind(Axios.prototype.request, context);
|
|
28581
|
+
utils$1.extend(instance, Axios.prototype, context, { allOwnKeys: true });
|
|
28062
28582
|
utils$1.extend(instance, context, null, { allOwnKeys: true });
|
|
28063
28583
|
instance.create = function create(instanceConfig) {
|
|
28064
28584
|
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
|
28065
28585
|
};
|
|
28066
28586
|
return instance;
|
|
28067
28587
|
}
|
|
28068
|
-
const axios = createInstance(defaults
|
|
28069
|
-
axios.Axios = Axios
|
|
28588
|
+
const axios = createInstance(defaults);
|
|
28589
|
+
axios.Axios = Axios;
|
|
28070
28590
|
axios.CanceledError = CanceledError;
|
|
28071
|
-
axios.CancelToken = CancelToken
|
|
28591
|
+
axios.CancelToken = CancelToken;
|
|
28072
28592
|
axios.isCancel = isCancel;
|
|
28073
28593
|
axios.VERSION = VERSION;
|
|
28074
28594
|
axios.toFormData = toFormData;
|
|
@@ -28080,10 +28600,10 @@ var require_axios = /* @__PURE__ */ __commonJS({ "node_modules/axios/dist/node/a
|
|
|
28080
28600
|
axios.spread = spread;
|
|
28081
28601
|
axios.isAxiosError = isAxiosError;
|
|
28082
28602
|
axios.mergeConfig = mergeConfig;
|
|
28083
|
-
axios.AxiosHeaders = AxiosHeaders
|
|
28603
|
+
axios.AxiosHeaders = AxiosHeaders;
|
|
28084
28604
|
axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
28085
28605
|
axios.getAdapter = adapters.getAdapter;
|
|
28086
|
-
axios.HttpStatusCode = HttpStatusCode
|
|
28606
|
+
axios.HttpStatusCode = HttpStatusCode;
|
|
28087
28607
|
axios.default = axios;
|
|
28088
28608
|
module.exports = axios;
|
|
28089
28609
|
}) });
|
|
@@ -28241,17 +28761,17 @@ var require_IncomingWebhook = /* @__PURE__ */ __commonJS({ "node_modules/@slack/
|
|
|
28241
28761
|
* A client for Slack's Incoming Webhooks
|
|
28242
28762
|
*/
|
|
28243
28763
|
var IncomingWebhook$1 = class {
|
|
28244
|
-
constructor(url$2, defaults$
|
|
28764
|
+
constructor(url$2, defaults$1 = { timeout: 0 }) {
|
|
28245
28765
|
if (url$2 === void 0) throw new Error("Incoming webhook URL is required");
|
|
28246
28766
|
this.url = url$2;
|
|
28247
|
-
this.defaults = defaults$
|
|
28767
|
+
this.defaults = defaults$1;
|
|
28248
28768
|
this.axios = axios_1.default.create({
|
|
28249
28769
|
baseURL: url$2,
|
|
28250
|
-
httpAgent: defaults$
|
|
28251
|
-
httpsAgent: defaults$
|
|
28770
|
+
httpAgent: defaults$1.agent,
|
|
28771
|
+
httpsAgent: defaults$1.agent,
|
|
28252
28772
|
maxRedirects: 0,
|
|
28253
28773
|
proxy: false,
|
|
28254
|
-
timeout: defaults$
|
|
28774
|
+
timeout: defaults$1.timeout,
|
|
28255
28775
|
headers: { "User-Agent": (0, instrument_1.getUserAgent)() }
|
|
28256
28776
|
});
|
|
28257
28777
|
this.defaults.agent = void 0;
|
|
@@ -28309,14 +28829,14 @@ var require_dist = /* @__PURE__ */ __commonJS({ "node_modules/@slack/webhook/dis
|
|
|
28309
28829
|
var import_dist = require_dist();
|
|
28310
28830
|
var ConsoleAlert = class {
|
|
28311
28831
|
name = "ConsoleAlert";
|
|
28312
|
-
async onUp(path$
|
|
28313
|
-
console.log(`[ALERT - UP] Path: ${path$
|
|
28832
|
+
async onUp(path$3, state$1) {
|
|
28833
|
+
console.log(`[ALERT - UP] Path: ${path$3} is UP (${state$1.durationMs}ms).`);
|
|
28314
28834
|
}
|
|
28315
|
-
async onDown(path$
|
|
28316
|
-
console.error(`[ALERT - DOWN] Path: ${path$
|
|
28835
|
+
async onDown(path$3, state$1) {
|
|
28836
|
+
console.error(`[ALERT - DOWN] Path: ${path$3} is DOWN (${state$1.durationMs}ms).`);
|
|
28317
28837
|
}
|
|
28318
|
-
async onDegraded(path$
|
|
28319
|
-
console.warn(`[ALERT - DEGRADED] Path: ${path$
|
|
28838
|
+
async onDegraded(path$3, state$1) {
|
|
28839
|
+
console.warn(`[ALERT - DEGRADED] Path: ${path$3} is DEGRADED (${state$1.durationMs}ms).`);
|
|
28320
28840
|
}
|
|
28321
28841
|
};
|
|
28322
28842
|
var SlackAlert = class {
|
|
@@ -28332,14 +28852,14 @@ var SlackAlert = class {
|
|
|
28332
28852
|
mrkdwn_in: ["text"]
|
|
28333
28853
|
}] });
|
|
28334
28854
|
}
|
|
28335
|
-
async onUp(path$
|
|
28336
|
-
await this.sendSlackMessage(`🟢 <${state$1.url}|\`${path$
|
|
28855
|
+
async onUp(path$3, state$1) {
|
|
28856
|
+
await this.sendSlackMessage(`🟢 <${state$1.url}|\`${path$3}\`> is UP (${state$1.durationMs}ms).`, "good");
|
|
28337
28857
|
}
|
|
28338
|
-
async onDown(path$
|
|
28339
|
-
await this.sendSlackMessage(`🔴 <${state$1.url}|\`${path$
|
|
28858
|
+
async onDown(path$3, state$1) {
|
|
28859
|
+
await this.sendSlackMessage(`🔴 <${state$1.url}|\`${path$3}\`> is DOWN (${state$1.durationMs}ms).`, "danger");
|
|
28340
28860
|
}
|
|
28341
|
-
async onDegraded(path$
|
|
28342
|
-
await this.sendSlackMessage(`🟡 <${state$1.url}|\`${path$
|
|
28861
|
+
async onDegraded(path$3, state$1) {
|
|
28862
|
+
await this.sendSlackMessage(`🟡 <${state$1.url}|\`${path$3}\`> is DEGRADED (${state$1.durationMs}ms).`, "warning");
|
|
28343
28863
|
}
|
|
28344
28864
|
};
|
|
28345
28865
|
|
|
@@ -28365,28 +28885,32 @@ const run = async (options) => {
|
|
|
28365
28885
|
const multipleServers = servers.length > 1;
|
|
28366
28886
|
const fetchConfigurations = /* @__PURE__ */ new Map();
|
|
28367
28887
|
for (const server of servers) {
|
|
28368
|
-
|
|
28888
|
+
let baseUrl = server.url;
|
|
28889
|
+
if (server.variables) for (const [name, variable] of Object.entries(server.variables)) {
|
|
28890
|
+
const v = variable;
|
|
28891
|
+
if (v.default != null) baseUrl = baseUrl.replaceAll(`{${name}}`, v.default);
|
|
28892
|
+
}
|
|
28369
28893
|
const serverLabel = server.description ?? new URL(baseUrl).host;
|
|
28370
|
-
if (schema$6.paths) for (const path$
|
|
28371
|
-
const pathItem = schema$6.paths[path$
|
|
28894
|
+
if (schema$6.paths) for (const path$3 of Object.keys(schema$6.paths)) {
|
|
28895
|
+
const pathItem = schema$6.paths[path$3];
|
|
28372
28896
|
if (!pathItem) continue;
|
|
28373
28897
|
if (!pathItem.get) continue;
|
|
28374
|
-
const url$2 = new URL(path$
|
|
28375
|
-
let _path = path$
|
|
28898
|
+
const url$2 = new URL(path$3, baseUrl);
|
|
28899
|
+
let _path = path$3;
|
|
28376
28900
|
if ("200" in (pathItem.get?.responses ?? {}) && "text/event-stream" in (pathItem.get.responses?.["200"]?.content ?? {})) continue;
|
|
28377
28901
|
for (const param of pathItem.get.parameters || []) {
|
|
28378
|
-
let exampleValue = options.getExampleValue?.(param.name, path$
|
|
28902
|
+
let exampleValue = options.getExampleValue?.(param.name, path$3) ?? param.example ?? param.examples?.[0] ?? param.schema?.example ?? param.schema?.examples?.[0];
|
|
28379
28903
|
if (!exampleValue && (param.required || param.in === "path") && "enum" in param.schema) {
|
|
28380
28904
|
const enumValues = param.schema.enum;
|
|
28381
28905
|
if (Array.isArray(enumValues) && enumValues.length > 0) exampleValue = enumValues[0];
|
|
28382
28906
|
}
|
|
28383
28907
|
if (!exampleValue && param.required) {
|
|
28384
|
-
debug$1(`No example value for parameter ${param.name} in ${path$
|
|
28908
|
+
debug$1(`No example value for parameter ${param.name} in ${path$3}`);
|
|
28385
28909
|
continue;
|
|
28386
28910
|
}
|
|
28387
28911
|
if (param.in === "path") {
|
|
28388
28912
|
if (!exampleValue) {
|
|
28389
|
-
debug$1(`No example value for path parameter ${param.name} in ${path$
|
|
28913
|
+
debug$1(`No example value for path parameter ${param.name} in ${path$3}`);
|
|
28390
28914
|
continue;
|
|
28391
28915
|
}
|
|
28392
28916
|
const placeholder = `{${param.name}}`;
|
|
@@ -28396,13 +28920,13 @@ const run = async (options) => {
|
|
|
28396
28920
|
if (!exampleValue) continue;
|
|
28397
28921
|
if (param.in === "query") url$2.searchParams.set(param.name, exampleValue);
|
|
28398
28922
|
}
|
|
28399
|
-
const key = multipleServers ? `[${serverLabel}] ${path$
|
|
28923
|
+
const key = multipleServers ? `[${serverLabel}] ${path$3}` : path$3;
|
|
28400
28924
|
fetchConfigurations.set(key, url$2);
|
|
28401
28925
|
}
|
|
28402
28926
|
}
|
|
28403
28927
|
const measurements = new Storage(options.storagePath, options.maxSpaceUsageBytes ?? 262144 * .95);
|
|
28404
|
-
const measure = async (path$
|
|
28405
|
-
const url$2 = fetchConfigurations.get(path$
|
|
28928
|
+
const measure = async (path$3) => {
|
|
28929
|
+
const url$2 = fetchConfigurations.get(path$3);
|
|
28406
28930
|
if (!url$2) return;
|
|
28407
28931
|
const start = Date.now();
|
|
28408
28932
|
try {
|
|
@@ -28411,7 +28935,7 @@ const run = async (options) => {
|
|
|
28411
28935
|
timeout: options.timeoutMs ?? 5e3,
|
|
28412
28936
|
headers: { "cache-control": "no-cache" }
|
|
28413
28937
|
});
|
|
28414
|
-
debug$1(`Measured ${path$
|
|
28938
|
+
debug$1(`Measured ${path$3}:`, metrics);
|
|
28415
28939
|
return {
|
|
28416
28940
|
...metrics,
|
|
28417
28941
|
url: url$2.toString(),
|
|
@@ -28431,34 +28955,34 @@ const run = async (options) => {
|
|
|
28431
28955
|
limit: options.concurrency ?? 5,
|
|
28432
28956
|
interval: 1e3
|
|
28433
28957
|
})(measure);
|
|
28434
|
-
await Promise.all(Array.from(fetchConfigurations.keys()).map(async (path$
|
|
28435
|
-
const results = await Promise.all(Array.from({ length: options.samples ?? 5 }).map(() => throttledMeasure(path$
|
|
28958
|
+
await Promise.all(Array.from(fetchConfigurations.keys()).map(async (path$3) => {
|
|
28959
|
+
const results = await Promise.all(Array.from({ length: options.samples ?? 5 }).map(() => throttledMeasure(path$3)));
|
|
28436
28960
|
const durationMs = Math.round(results.reduce((acc, curr) => acc + (curr?.durationMs ?? 0), 0) / results.length);
|
|
28437
28961
|
let status = "down";
|
|
28438
28962
|
const statusCode = Math.max(...results.map((r) => r?.statusCode ?? 0));
|
|
28439
28963
|
const lastBody = results.findLast((r) => r?.body !== void 0)?.body;
|
|
28440
|
-
if (options.getStatus) status = options.getStatus(statusCode, path$
|
|
28964
|
+
if (options.getStatus) status = options.getStatus(statusCode, path$3, durationMs, lastBody);
|
|
28441
28965
|
else status = statusCode >= 200 && statusCode < 300 ? "up" : "down";
|
|
28442
28966
|
const measurement = {
|
|
28443
28967
|
status,
|
|
28444
28968
|
durationMs,
|
|
28445
28969
|
timestamp: Date.now(),
|
|
28446
|
-
url: fetchConfigurations.get(path$
|
|
28970
|
+
url: fetchConfigurations.get(path$3)?.toString() ?? ""
|
|
28447
28971
|
};
|
|
28448
|
-
debug$1(`Measured ${path$
|
|
28972
|
+
debug$1(`Measured ${path$3} (avg):`, measurement);
|
|
28449
28973
|
if (!measurement) return;
|
|
28450
|
-
await measurements.add(path$
|
|
28974
|
+
await measurements.add(path$3, measurement);
|
|
28451
28975
|
}));
|
|
28452
28976
|
await measurements.flush();
|
|
28453
|
-
for (const path$
|
|
28454
|
-
const { current, previous } = await measurements.getState(path$
|
|
28977
|
+
for (const path$3 of fetchConfigurations.keys()) {
|
|
28978
|
+
const { current, previous } = await measurements.getState(path$3);
|
|
28455
28979
|
if (!current || !previous && current.status === "up" || previous && previous.status === current.status) continue;
|
|
28456
|
-
for (const alert of options.alerts) if (current.status === "up") await alert.onUp(path$
|
|
28457
|
-
else if (current.status === "down") await alert.onDown(path$
|
|
28458
|
-
else if (current.status === "degraded") await alert.onDegraded(path$
|
|
28980
|
+
for (const alert of options.alerts) if (current.status === "up") await alert.onUp(path$3, current);
|
|
28981
|
+
else if (current.status === "down") await alert.onDown(path$3, current);
|
|
28982
|
+
else if (current.status === "degraded") await alert.onDegraded(path$3, current);
|
|
28459
28983
|
}
|
|
28460
|
-
const reports = await Promise.all([...fetchConfigurations.keys()].map(async (path$
|
|
28461
|
-
const history = await measurements.getHistory(path$
|
|
28984
|
+
const reports = await Promise.all([...fetchConfigurations.keys()].map(async (path$3) => {
|
|
28985
|
+
const history = await measurements.getHistory(path$3);
|
|
28462
28986
|
const startOfPast60m = (0, import_dayjs_min.default)().subtract(60, "minute").startOf("minute").valueOf();
|
|
28463
28987
|
const startOfPast24h = (0, import_dayjs_min.default)().subtract(24, "hours").startOf("hour").valueOf();
|
|
28464
28988
|
const startOfPast7d = (0, import_dayjs_min.default)().subtract(7, "day").startOf("day").valueOf();
|
|
@@ -28492,7 +29016,7 @@ const run = async (options) => {
|
|
|
28492
29016
|
const relDegraded7d = getRelativeDegraded(startOfPast7d);
|
|
28493
29017
|
const relDegraded30d = getRelativeDegraded(startOfPast30d);
|
|
28494
29018
|
return {
|
|
28495
|
-
path: `${path$
|
|
29019
|
+
path: `${path$3} - ${history[history.length - 1]?.status ?? "unknown"} - ${history[history.length - 1]?.durationMs ?? 0}ms`,
|
|
28496
29020
|
down60m: relDowntime60m,
|
|
28497
29021
|
degr60m: relDegraded60m,
|
|
28498
29022
|
dur60m: avgDuration60m,
|