@rebilly/instruments 16.128.3 → 16.128.4
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/CHANGELOG.md +1 -6
- package/dist/index.js +1413 -905
- package/dist/index.min.js +9 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2306,13 +2306,31 @@ const isEmptyObject = (val) => {
|
|
|
2306
2306
|
};
|
|
2307
2307
|
const isDate = kindOfTest("Date");
|
|
2308
2308
|
const isFile = kindOfTest("File");
|
|
2309
|
+
const isReactNativeBlob = (value) => {
|
|
2310
|
+
return !!(value && typeof value.uri !== "undefined");
|
|
2311
|
+
};
|
|
2312
|
+
const isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
|
|
2309
2313
|
const isBlob = kindOfTest("Blob");
|
|
2310
2314
|
const isFileList = kindOfTest("FileList");
|
|
2311
2315
|
const isStream = (val) => isObject$1(val) && isFunction$1(val.pipe);
|
|
2316
|
+
function getGlobal() {
|
|
2317
|
+
if (typeof globalThis !== "undefined") return globalThis;
|
|
2318
|
+
if (typeof self !== "undefined") return self;
|
|
2319
|
+
if (typeof window !== "undefined") return window;
|
|
2320
|
+
if (typeof global !== "undefined") return global;
|
|
2321
|
+
return {};
|
|
2322
|
+
}
|
|
2323
|
+
const G$2 = getGlobal();
|
|
2324
|
+
const FormDataCtor = typeof G$2.FormData !== "undefined" ? G$2.FormData : void 0;
|
|
2312
2325
|
const isFormData = (thing) => {
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2326
|
+
if (!thing) return false;
|
|
2327
|
+
if (FormDataCtor && thing instanceof FormDataCtor) return true;
|
|
2328
|
+
const proto = getPrototypeOf(thing);
|
|
2329
|
+
if (!proto || proto === Object.prototype) return false;
|
|
2330
|
+
if (!isFunction$1(thing.append)) return false;
|
|
2331
|
+
const kind = kindOf(thing);
|
|
2332
|
+
return kind === "formdata" || // detect form-data instance
|
|
2333
|
+
kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]";
|
|
2316
2334
|
};
|
|
2317
2335
|
const isURLSearchParams = kindOfTest("URLSearchParams");
|
|
2318
2336
|
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
@@ -2321,7 +2339,9 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
|
2321
2339
|
"Response",
|
|
2322
2340
|
"Headers"
|
|
2323
2341
|
].map(kindOfTest);
|
|
2324
|
-
const trim = (str) =>
|
|
2342
|
+
const trim = (str) => {
|
|
2343
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
2344
|
+
};
|
|
2325
2345
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
2326
2346
|
if (obj === null || typeof obj === "undefined") {
|
|
2327
2347
|
return;
|
|
@@ -2369,16 +2389,17 @@ const _global = (() => {
|
|
|
2369
2389
|
return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
|
|
2370
2390
|
})();
|
|
2371
2391
|
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
2372
|
-
function merge() {
|
|
2392
|
+
function merge(...objs) {
|
|
2373
2393
|
const { caseless, skipUndefined } = isContextDefined(this) && this || {};
|
|
2374
2394
|
const result = {};
|
|
2375
2395
|
const assignValue = (val, key) => {
|
|
2376
2396
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
2377
2397
|
return;
|
|
2378
2398
|
}
|
|
2379
|
-
const targetKey = caseless && findKey(result, key) || key;
|
|
2380
|
-
|
|
2381
|
-
|
|
2399
|
+
const targetKey = caseless && typeof key === "string" && findKey(result, key) || key;
|
|
2400
|
+
const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
|
|
2401
|
+
if (isPlainObject(existing) && isPlainObject(val)) {
|
|
2402
|
+
result[targetKey] = merge(existing, val);
|
|
2382
2403
|
} else if (isPlainObject(val)) {
|
|
2383
2404
|
result[targetKey] = merge({}, val);
|
|
2384
2405
|
} else if (isArray(val)) {
|
|
@@ -2387,8 +2408,22 @@ function merge() {
|
|
|
2387
2408
|
result[targetKey] = val;
|
|
2388
2409
|
}
|
|
2389
2410
|
};
|
|
2390
|
-
for (let i = 0, l =
|
|
2391
|
-
|
|
2411
|
+
for (let i = 0, l = objs.length; i < l; i++) {
|
|
2412
|
+
const source = objs[i];
|
|
2413
|
+
if (!source || isBuffer(source)) {
|
|
2414
|
+
continue;
|
|
2415
|
+
}
|
|
2416
|
+
forEach(source, assignValue);
|
|
2417
|
+
if (typeof source !== "object" || isArray(source)) {
|
|
2418
|
+
continue;
|
|
2419
|
+
}
|
|
2420
|
+
const symbols = Object.getOwnPropertySymbols(source);
|
|
2421
|
+
for (let j2 = 0; j2 < symbols.length; j2++) {
|
|
2422
|
+
const symbol = symbols[j2];
|
|
2423
|
+
if (propertyIsEnumerable.call(source, symbol)) {
|
|
2424
|
+
assignValue(source[symbol], symbol);
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2392
2427
|
}
|
|
2393
2428
|
return result;
|
|
2394
2429
|
}
|
|
@@ -2398,6 +2433,9 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
|
2398
2433
|
(val, key) => {
|
|
2399
2434
|
if (thisArg && isFunction$1(val)) {
|
|
2400
2435
|
Object.defineProperty(a, key, {
|
|
2436
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
2437
|
+
// hijack defineProperty's accessor-vs-data resolution.
|
|
2438
|
+
__proto__: null,
|
|
2401
2439
|
value: bind(val, thisArg),
|
|
2402
2440
|
writable: true,
|
|
2403
2441
|
enumerable: true,
|
|
@@ -2405,6 +2443,7 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
|
2405
2443
|
});
|
|
2406
2444
|
} else {
|
|
2407
2445
|
Object.defineProperty(a, key, {
|
|
2446
|
+
__proto__: null,
|
|
2408
2447
|
value: val,
|
|
2409
2448
|
writable: true,
|
|
2410
2449
|
enumerable: true,
|
|
@@ -2423,17 +2462,16 @@ const stripBOM = (content) => {
|
|
|
2423
2462
|
return content;
|
|
2424
2463
|
};
|
|
2425
2464
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
2426
|
-
constructor.prototype = Object.create(
|
|
2427
|
-
superConstructor.prototype,
|
|
2428
|
-
descriptors
|
|
2429
|
-
);
|
|
2465
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
2430
2466
|
Object.defineProperty(constructor.prototype, "constructor", {
|
|
2467
|
+
__proto__: null,
|
|
2431
2468
|
value: constructor,
|
|
2432
2469
|
writable: true,
|
|
2433
2470
|
enumerable: false,
|
|
2434
2471
|
configurable: true
|
|
2435
2472
|
});
|
|
2436
2473
|
Object.defineProperty(constructor, "super", {
|
|
2474
|
+
__proto__: null,
|
|
2437
2475
|
value: superConstructor.prototype
|
|
2438
2476
|
});
|
|
2439
2477
|
props && Object.assign(constructor.prototype, props);
|
|
@@ -2508,6 +2546,7 @@ const toCamelCase = (str) => {
|
|
|
2508
2546
|
});
|
|
2509
2547
|
};
|
|
2510
2548
|
const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
2549
|
+
const { propertyIsEnumerable } = Object.prototype;
|
|
2511
2550
|
const isRegExp = kindOfTest("RegExp");
|
|
2512
2551
|
const reduceDescriptors = (obj, reducer) => {
|
|
2513
2552
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -2522,7 +2561,7 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
2522
2561
|
};
|
|
2523
2562
|
const freezeMethods = (obj) => {
|
|
2524
2563
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
2525
|
-
if (isFunction$1(obj) && ["arguments", "caller", "callee"].
|
|
2564
|
+
if (isFunction$1(obj) && ["arguments", "caller", "callee"].includes(name)) {
|
|
2526
2565
|
return false;
|
|
2527
2566
|
}
|
|
2528
2567
|
const value = obj[name];
|
|
@@ -2558,29 +2597,29 @@ function isSpecCompliantForm(thing) {
|
|
|
2558
2597
|
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
|
|
2559
2598
|
}
|
|
2560
2599
|
const toJSONObject = (obj) => {
|
|
2561
|
-
const
|
|
2562
|
-
const visit = (source
|
|
2600
|
+
const visited = /* @__PURE__ */ new WeakSet();
|
|
2601
|
+
const visit = (source) => {
|
|
2563
2602
|
if (isObject$1(source)) {
|
|
2564
|
-
if (
|
|
2603
|
+
if (visited.has(source)) {
|
|
2565
2604
|
return;
|
|
2566
2605
|
}
|
|
2567
2606
|
if (isBuffer(source)) {
|
|
2568
2607
|
return source;
|
|
2569
2608
|
}
|
|
2570
2609
|
if (!("toJSON" in source)) {
|
|
2571
|
-
|
|
2610
|
+
visited.add(source);
|
|
2572
2611
|
const target = isArray(source) ? [] : {};
|
|
2573
2612
|
forEach(source, (value, key) => {
|
|
2574
|
-
const reducedValue = visit(value
|
|
2613
|
+
const reducedValue = visit(value);
|
|
2575
2614
|
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
2576
2615
|
});
|
|
2577
|
-
|
|
2616
|
+
visited.delete(source);
|
|
2578
2617
|
return target;
|
|
2579
2618
|
}
|
|
2580
2619
|
}
|
|
2581
2620
|
return source;
|
|
2582
2621
|
};
|
|
2583
|
-
return visit(obj
|
|
2622
|
+
return visit(obj);
|
|
2584
2623
|
};
|
|
2585
2624
|
const isAsyncFn = kindOfTest("AsyncFunction");
|
|
2586
2625
|
const isThenable = (thing) => thing && (isObject$1(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
|
|
@@ -2625,6 +2664,8 @@ const utils$1 = {
|
|
|
2625
2664
|
isUndefined,
|
|
2626
2665
|
isDate,
|
|
2627
2666
|
isFile,
|
|
2667
|
+
isReactNativeBlob,
|
|
2668
|
+
isReactNative,
|
|
2628
2669
|
isBlob,
|
|
2629
2670
|
isRegExp,
|
|
2630
2671
|
isFunction: isFunction$1,
|
|
@@ -2666,199 +2707,592 @@ const utils$1 = {
|
|
|
2666
2707
|
asap,
|
|
2667
2708
|
isIterable
|
|
2668
2709
|
};
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2710
|
+
const ignoreDuplicateOf = utils$1.toObjectSet([
|
|
2711
|
+
"age",
|
|
2712
|
+
"authorization",
|
|
2713
|
+
"content-length",
|
|
2714
|
+
"content-type",
|
|
2715
|
+
"etag",
|
|
2716
|
+
"expires",
|
|
2717
|
+
"from",
|
|
2718
|
+
"host",
|
|
2719
|
+
"if-modified-since",
|
|
2720
|
+
"if-unmodified-since",
|
|
2721
|
+
"last-modified",
|
|
2722
|
+
"location",
|
|
2723
|
+
"max-forwards",
|
|
2724
|
+
"proxy-authorization",
|
|
2725
|
+
"referer",
|
|
2726
|
+
"retry-after",
|
|
2727
|
+
"user-agent"
|
|
2728
|
+
]);
|
|
2729
|
+
const parseHeaders = (rawHeaders) => {
|
|
2730
|
+
const parsed = {};
|
|
2731
|
+
let key;
|
|
2732
|
+
let val;
|
|
2733
|
+
let i;
|
|
2734
|
+
rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
|
|
2735
|
+
i = line.indexOf(":");
|
|
2736
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
2737
|
+
val = line.substring(i + 1).trim();
|
|
2738
|
+
if (!key || parsed[key] && ignoreDuplicateOf[key]) {
|
|
2739
|
+
return;
|
|
2740
|
+
}
|
|
2741
|
+
if (key === "set-cookie") {
|
|
2742
|
+
if (parsed[key]) {
|
|
2743
|
+
parsed[key].push(val);
|
|
2744
|
+
} else {
|
|
2745
|
+
parsed[key] = [val];
|
|
2746
|
+
}
|
|
2747
|
+
} else {
|
|
2748
|
+
parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
|
|
2749
|
+
}
|
|
2750
|
+
});
|
|
2751
|
+
return parsed;
|
|
2752
|
+
};
|
|
2753
|
+
function trimSPorHTAB(str) {
|
|
2754
|
+
let start = 0;
|
|
2755
|
+
let end = str.length;
|
|
2756
|
+
while (start < end) {
|
|
2757
|
+
const code = str.charCodeAt(start);
|
|
2758
|
+
if (code !== 9 && code !== 32) {
|
|
2759
|
+
break;
|
|
2698
2760
|
}
|
|
2761
|
+
start += 1;
|
|
2699
2762
|
}
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
description: this.description,
|
|
2707
|
-
number: this.number,
|
|
2708
|
-
// Mozilla
|
|
2709
|
-
fileName: this.fileName,
|
|
2710
|
-
lineNumber: this.lineNumber,
|
|
2711
|
-
columnNumber: this.columnNumber,
|
|
2712
|
-
stack: this.stack,
|
|
2713
|
-
// Axios
|
|
2714
|
-
config: utils$1.toJSONObject(this.config),
|
|
2715
|
-
code: this.code,
|
|
2716
|
-
status: this.status
|
|
2717
|
-
};
|
|
2763
|
+
while (end > start) {
|
|
2764
|
+
const code = str.charCodeAt(end - 1);
|
|
2765
|
+
if (code !== 9 && code !== 32) {
|
|
2766
|
+
break;
|
|
2767
|
+
}
|
|
2768
|
+
end -= 1;
|
|
2718
2769
|
}
|
|
2719
|
-
|
|
2720
|
-
AxiosError$1.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
2721
|
-
AxiosError$1.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
2722
|
-
AxiosError$1.ECONNABORTED = "ECONNABORTED";
|
|
2723
|
-
AxiosError$1.ETIMEDOUT = "ETIMEDOUT";
|
|
2724
|
-
AxiosError$1.ERR_NETWORK = "ERR_NETWORK";
|
|
2725
|
-
AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
2726
|
-
AxiosError$1.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
2727
|
-
AxiosError$1.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
2728
|
-
AxiosError$1.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
2729
|
-
AxiosError$1.ERR_CANCELED = "ERR_CANCELED";
|
|
2730
|
-
AxiosError$1.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
2731
|
-
AxiosError$1.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
2732
|
-
const httpAdapter = null;
|
|
2733
|
-
function isVisitable(thing) {
|
|
2734
|
-
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
2770
|
+
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
2735
2771
|
}
|
|
2736
|
-
|
|
2737
|
-
|
|
2772
|
+
const INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g");
|
|
2773
|
+
const INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
2774
|
+
function sanitizeValue(value, invalidChars) {
|
|
2775
|
+
if (utils$1.isArray(value)) {
|
|
2776
|
+
return value.map((item) => sanitizeValue(item, invalidChars));
|
|
2777
|
+
}
|
|
2778
|
+
return trimSPorHTAB(String(value).replace(invalidChars, ""));
|
|
2738
2779
|
}
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2780
|
+
const sanitizeHeaderValue = (value) => sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);
|
|
2781
|
+
const sanitizeByteStringHeaderValue = (value) => sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);
|
|
2782
|
+
function toByteStringHeaderObject(headers) {
|
|
2783
|
+
const byteStringHeaders = /* @__PURE__ */ Object.create(null);
|
|
2784
|
+
utils$1.forEach(headers.toJSON(), (value, header) => {
|
|
2785
|
+
byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);
|
|
2786
|
+
});
|
|
2787
|
+
return byteStringHeaders;
|
|
2745
2788
|
}
|
|
2746
|
-
|
|
2747
|
-
|
|
2789
|
+
const $internals = Symbol("internals");
|
|
2790
|
+
function normalizeHeader(header) {
|
|
2791
|
+
return header && String(header).trim().toLowerCase();
|
|
2748
2792
|
}
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
function toFormData$1(obj, formData, options) {
|
|
2753
|
-
if (!utils$1.isObject(obj)) {
|
|
2754
|
-
throw new TypeError("target must be an object");
|
|
2793
|
+
function normalizeValue(value) {
|
|
2794
|
+
if (value === false || value == null) {
|
|
2795
|
+
return value;
|
|
2755
2796
|
}
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
const metaTokens = options.metaTokens;
|
|
2765
|
-
const visitor = options.visitor || defaultVisitor;
|
|
2766
|
-
const dots = options.dots;
|
|
2767
|
-
const indexes = options.indexes;
|
|
2768
|
-
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
2769
|
-
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
2770
|
-
if (!utils$1.isFunction(visitor)) {
|
|
2771
|
-
throw new TypeError("visitor must be a function");
|
|
2797
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
2798
|
+
}
|
|
2799
|
+
function parseTokens(str) {
|
|
2800
|
+
const tokens = /* @__PURE__ */ Object.create(null);
|
|
2801
|
+
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
2802
|
+
let match;
|
|
2803
|
+
while (match = tokensRE.exec(str)) {
|
|
2804
|
+
tokens[match[1]] = match[2];
|
|
2772
2805
|
}
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
return value.toString();
|
|
2780
|
-
}
|
|
2781
|
-
if (!useBlob && utils$1.isBlob(value)) {
|
|
2782
|
-
throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
|
|
2783
|
-
}
|
|
2784
|
-
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
2785
|
-
return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
|
|
2786
|
-
}
|
|
2787
|
-
return value;
|
|
2806
|
+
return tokens;
|
|
2807
|
+
}
|
|
2808
|
+
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
2809
|
+
function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
|
|
2810
|
+
if (utils$1.isFunction(filter2)) {
|
|
2811
|
+
return filter2.call(this, value, header);
|
|
2788
2812
|
}
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
if (value && !path && typeof value === "object") {
|
|
2792
|
-
if (utils$1.endsWith(key, "{}")) {
|
|
2793
|
-
key = metaTokens ? key : key.slice(0, -2);
|
|
2794
|
-
value = JSON.stringify(value);
|
|
2795
|
-
} else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
|
|
2796
|
-
key = removeBrackets(key);
|
|
2797
|
-
arr.forEach(function each(el, index2) {
|
|
2798
|
-
!(utils$1.isUndefined(el) || el === null) && formData.append(
|
|
2799
|
-
// eslint-disable-next-line no-nested-ternary
|
|
2800
|
-
indexes === true ? renderKey([key], index2, dots) : indexes === null ? key : key + "[]",
|
|
2801
|
-
convertValue(el)
|
|
2802
|
-
);
|
|
2803
|
-
});
|
|
2804
|
-
return false;
|
|
2805
|
-
}
|
|
2806
|
-
}
|
|
2807
|
-
if (isVisitable(value)) {
|
|
2808
|
-
return true;
|
|
2809
|
-
}
|
|
2810
|
-
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
2811
|
-
return false;
|
|
2813
|
+
if (isHeaderNameFilter) {
|
|
2814
|
+
value = header;
|
|
2812
2815
|
}
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
convertValue,
|
|
2817
|
-
isVisitable
|
|
2818
|
-
});
|
|
2819
|
-
function build(value, path) {
|
|
2820
|
-
if (utils$1.isUndefined(value)) return;
|
|
2821
|
-
if (stack.indexOf(value) !== -1) {
|
|
2822
|
-
throw Error("Circular reference detected in " + path.join("."));
|
|
2823
|
-
}
|
|
2824
|
-
stack.push(value);
|
|
2825
|
-
utils$1.forEach(value, function each(el, key) {
|
|
2826
|
-
const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
|
|
2827
|
-
formData,
|
|
2828
|
-
el,
|
|
2829
|
-
utils$1.isString(key) ? key.trim() : key,
|
|
2830
|
-
path,
|
|
2831
|
-
exposedHelpers
|
|
2832
|
-
);
|
|
2833
|
-
if (result === true) {
|
|
2834
|
-
build(el, path ? path.concat(key) : [key]);
|
|
2835
|
-
}
|
|
2836
|
-
});
|
|
2837
|
-
stack.pop();
|
|
2816
|
+
if (!utils$1.isString(value)) return;
|
|
2817
|
+
if (utils$1.isString(filter2)) {
|
|
2818
|
+
return value.indexOf(filter2) !== -1;
|
|
2838
2819
|
}
|
|
2839
|
-
if (
|
|
2840
|
-
|
|
2820
|
+
if (utils$1.isRegExp(filter2)) {
|
|
2821
|
+
return filter2.test(value);
|
|
2841
2822
|
}
|
|
2842
|
-
build(obj);
|
|
2843
|
-
return formData;
|
|
2844
2823
|
}
|
|
2845
|
-
function
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
"'": "%27",
|
|
2849
|
-
"(": "%28",
|
|
2850
|
-
")": "%29",
|
|
2851
|
-
"~": "%7E",
|
|
2852
|
-
"%20": "+",
|
|
2853
|
-
"%00": "\0"
|
|
2854
|
-
};
|
|
2855
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
2856
|
-
return charMap[match];
|
|
2824
|
+
function formatHeader(header) {
|
|
2825
|
+
return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w2, char, str) => {
|
|
2826
|
+
return char.toUpperCase() + str;
|
|
2857
2827
|
});
|
|
2858
2828
|
}
|
|
2859
|
-
function
|
|
2860
|
-
|
|
2861
|
-
|
|
2829
|
+
function buildAccessors(obj, header) {
|
|
2830
|
+
const accessorName = utils$1.toCamelCase(" " + header);
|
|
2831
|
+
["get", "set", "has"].forEach((methodName) => {
|
|
2832
|
+
Object.defineProperty(obj, methodName + accessorName, {
|
|
2833
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
2834
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
2835
|
+
__proto__: null,
|
|
2836
|
+
value: function(arg1, arg2, arg3) {
|
|
2837
|
+
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
2838
|
+
},
|
|
2839
|
+
configurable: true
|
|
2840
|
+
});
|
|
2841
|
+
});
|
|
2842
|
+
}
|
|
2843
|
+
let AxiosHeaders$1 = class AxiosHeaders {
|
|
2844
|
+
constructor(headers) {
|
|
2845
|
+
headers && this.set(headers);
|
|
2846
|
+
}
|
|
2847
|
+
set(header, valueOrRewrite, rewrite) {
|
|
2848
|
+
const self2 = this;
|
|
2849
|
+
function setHeader(_value, _header, _rewrite) {
|
|
2850
|
+
const lHeader = normalizeHeader(_header);
|
|
2851
|
+
if (!lHeader) {
|
|
2852
|
+
return;
|
|
2853
|
+
}
|
|
2854
|
+
const key = utils$1.findKey(self2, lHeader);
|
|
2855
|
+
if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
|
|
2856
|
+
self2[key || _header] = normalizeValue(_value);
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2859
|
+
const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
2860
|
+
if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
|
|
2861
|
+
setHeaders(header, valueOrRewrite);
|
|
2862
|
+
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
2863
|
+
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
2864
|
+
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
|
2865
|
+
let obj = {}, dest, key;
|
|
2866
|
+
for (const entry of header) {
|
|
2867
|
+
if (!utils$1.isArray(entry)) {
|
|
2868
|
+
throw new TypeError("Object iterator must return a key-value pair");
|
|
2869
|
+
}
|
|
2870
|
+
obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
2871
|
+
}
|
|
2872
|
+
setHeaders(obj, valueOrRewrite);
|
|
2873
|
+
} else {
|
|
2874
|
+
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
2875
|
+
}
|
|
2876
|
+
return this;
|
|
2877
|
+
}
|
|
2878
|
+
get(header, parser) {
|
|
2879
|
+
header = normalizeHeader(header);
|
|
2880
|
+
if (header) {
|
|
2881
|
+
const key = utils$1.findKey(this, header);
|
|
2882
|
+
if (key) {
|
|
2883
|
+
const value = this[key];
|
|
2884
|
+
if (!parser) {
|
|
2885
|
+
return value;
|
|
2886
|
+
}
|
|
2887
|
+
if (parser === true) {
|
|
2888
|
+
return parseTokens(value);
|
|
2889
|
+
}
|
|
2890
|
+
if (utils$1.isFunction(parser)) {
|
|
2891
|
+
return parser.call(this, value, key);
|
|
2892
|
+
}
|
|
2893
|
+
if (utils$1.isRegExp(parser)) {
|
|
2894
|
+
return parser.exec(value);
|
|
2895
|
+
}
|
|
2896
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
has(header, matcher) {
|
|
2901
|
+
header = normalizeHeader(header);
|
|
2902
|
+
if (header) {
|
|
2903
|
+
const key = utils$1.findKey(this, header);
|
|
2904
|
+
return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
2905
|
+
}
|
|
2906
|
+
return false;
|
|
2907
|
+
}
|
|
2908
|
+
delete(header, matcher) {
|
|
2909
|
+
const self2 = this;
|
|
2910
|
+
let deleted = false;
|
|
2911
|
+
function deleteHeader(_header) {
|
|
2912
|
+
_header = normalizeHeader(_header);
|
|
2913
|
+
if (_header) {
|
|
2914
|
+
const key = utils$1.findKey(self2, _header);
|
|
2915
|
+
if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
|
|
2916
|
+
delete self2[key];
|
|
2917
|
+
deleted = true;
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
}
|
|
2921
|
+
if (utils$1.isArray(header)) {
|
|
2922
|
+
header.forEach(deleteHeader);
|
|
2923
|
+
} else {
|
|
2924
|
+
deleteHeader(header);
|
|
2925
|
+
}
|
|
2926
|
+
return deleted;
|
|
2927
|
+
}
|
|
2928
|
+
clear(matcher) {
|
|
2929
|
+
const keys = Object.keys(this);
|
|
2930
|
+
let i = keys.length;
|
|
2931
|
+
let deleted = false;
|
|
2932
|
+
while (i--) {
|
|
2933
|
+
const key = keys[i];
|
|
2934
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
2935
|
+
delete this[key];
|
|
2936
|
+
deleted = true;
|
|
2937
|
+
}
|
|
2938
|
+
}
|
|
2939
|
+
return deleted;
|
|
2940
|
+
}
|
|
2941
|
+
normalize(format) {
|
|
2942
|
+
const self2 = this;
|
|
2943
|
+
const headers = {};
|
|
2944
|
+
utils$1.forEach(this, (value, header) => {
|
|
2945
|
+
const key = utils$1.findKey(headers, header);
|
|
2946
|
+
if (key) {
|
|
2947
|
+
self2[key] = normalizeValue(value);
|
|
2948
|
+
delete self2[header];
|
|
2949
|
+
return;
|
|
2950
|
+
}
|
|
2951
|
+
const normalized = format ? formatHeader(header) : String(header).trim();
|
|
2952
|
+
if (normalized !== header) {
|
|
2953
|
+
delete self2[header];
|
|
2954
|
+
}
|
|
2955
|
+
self2[normalized] = normalizeValue(value);
|
|
2956
|
+
headers[normalized] = true;
|
|
2957
|
+
});
|
|
2958
|
+
return this;
|
|
2959
|
+
}
|
|
2960
|
+
concat(...targets) {
|
|
2961
|
+
return this.constructor.concat(this, ...targets);
|
|
2962
|
+
}
|
|
2963
|
+
toJSON(asStrings) {
|
|
2964
|
+
const obj = /* @__PURE__ */ Object.create(null);
|
|
2965
|
+
utils$1.forEach(this, (value, header) => {
|
|
2966
|
+
value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
|
|
2967
|
+
});
|
|
2968
|
+
return obj;
|
|
2969
|
+
}
|
|
2970
|
+
[Symbol.iterator]() {
|
|
2971
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
2972
|
+
}
|
|
2973
|
+
toString() {
|
|
2974
|
+
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
2975
|
+
}
|
|
2976
|
+
getSetCookie() {
|
|
2977
|
+
return this.get("set-cookie") || [];
|
|
2978
|
+
}
|
|
2979
|
+
get [Symbol.toStringTag]() {
|
|
2980
|
+
return "AxiosHeaders";
|
|
2981
|
+
}
|
|
2982
|
+
static from(thing) {
|
|
2983
|
+
return thing instanceof this ? thing : new this(thing);
|
|
2984
|
+
}
|
|
2985
|
+
static concat(first, ...targets) {
|
|
2986
|
+
const computed = new this(first);
|
|
2987
|
+
targets.forEach((target) => computed.set(target));
|
|
2988
|
+
return computed;
|
|
2989
|
+
}
|
|
2990
|
+
static accessor(header) {
|
|
2991
|
+
const internals = this[$internals] = this[$internals] = {
|
|
2992
|
+
accessors: {}
|
|
2993
|
+
};
|
|
2994
|
+
const accessors = internals.accessors;
|
|
2995
|
+
const prototype2 = this.prototype;
|
|
2996
|
+
function defineAccessor(_header) {
|
|
2997
|
+
const lHeader = normalizeHeader(_header);
|
|
2998
|
+
if (!accessors[lHeader]) {
|
|
2999
|
+
buildAccessors(prototype2, _header);
|
|
3000
|
+
accessors[lHeader] = true;
|
|
3001
|
+
}
|
|
3002
|
+
}
|
|
3003
|
+
utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
3004
|
+
return this;
|
|
3005
|
+
}
|
|
3006
|
+
};
|
|
3007
|
+
AxiosHeaders$1.accessor([
|
|
3008
|
+
"Content-Type",
|
|
3009
|
+
"Content-Length",
|
|
3010
|
+
"Accept",
|
|
3011
|
+
"Accept-Encoding",
|
|
3012
|
+
"User-Agent",
|
|
3013
|
+
"Authorization"
|
|
3014
|
+
]);
|
|
3015
|
+
utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
|
|
3016
|
+
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
3017
|
+
return {
|
|
3018
|
+
get: () => value,
|
|
3019
|
+
set(headerValue) {
|
|
3020
|
+
this[mapped] = headerValue;
|
|
3021
|
+
}
|
|
3022
|
+
};
|
|
3023
|
+
});
|
|
3024
|
+
utils$1.freezeMethods(AxiosHeaders$1);
|
|
3025
|
+
const REDACTED = "[REDACTED ****]";
|
|
3026
|
+
function hasOwnOrPrototypeToJSON(source) {
|
|
3027
|
+
if (utils$1.hasOwnProp(source, "toJSON")) {
|
|
3028
|
+
return true;
|
|
3029
|
+
}
|
|
3030
|
+
let prototype2 = Object.getPrototypeOf(source);
|
|
3031
|
+
while (prototype2 && prototype2 !== Object.prototype) {
|
|
3032
|
+
if (utils$1.hasOwnProp(prototype2, "toJSON")) {
|
|
3033
|
+
return true;
|
|
3034
|
+
}
|
|
3035
|
+
prototype2 = Object.getPrototypeOf(prototype2);
|
|
3036
|
+
}
|
|
3037
|
+
return false;
|
|
3038
|
+
}
|
|
3039
|
+
function redactConfig(config, redactKeys) {
|
|
3040
|
+
const lowerKeys = new Set(redactKeys.map((k2) => String(k2).toLowerCase()));
|
|
3041
|
+
const seen = [];
|
|
3042
|
+
const visit = (source) => {
|
|
3043
|
+
if (source === null || typeof source !== "object") return source;
|
|
3044
|
+
if (utils$1.isBuffer(source)) return source;
|
|
3045
|
+
if (seen.indexOf(source) !== -1) return void 0;
|
|
3046
|
+
if (source instanceof AxiosHeaders$1) {
|
|
3047
|
+
source = source.toJSON();
|
|
3048
|
+
}
|
|
3049
|
+
seen.push(source);
|
|
3050
|
+
let result;
|
|
3051
|
+
if (utils$1.isArray(source)) {
|
|
3052
|
+
result = [];
|
|
3053
|
+
source.forEach((v2, i) => {
|
|
3054
|
+
const reducedValue = visit(v2);
|
|
3055
|
+
if (!utils$1.isUndefined(reducedValue)) {
|
|
3056
|
+
result[i] = reducedValue;
|
|
3057
|
+
}
|
|
3058
|
+
});
|
|
3059
|
+
} else {
|
|
3060
|
+
if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
|
|
3061
|
+
seen.pop();
|
|
3062
|
+
return source;
|
|
3063
|
+
}
|
|
3064
|
+
result = /* @__PURE__ */ Object.create(null);
|
|
3065
|
+
for (const [key, value] of Object.entries(source)) {
|
|
3066
|
+
const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
|
|
3067
|
+
if (!utils$1.isUndefined(reducedValue)) {
|
|
3068
|
+
result[key] = reducedValue;
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
seen.pop();
|
|
3073
|
+
return result;
|
|
3074
|
+
};
|
|
3075
|
+
return visit(config);
|
|
3076
|
+
}
|
|
3077
|
+
let AxiosError$1 = class AxiosError extends Error {
|
|
3078
|
+
static from(error, code, config, request, response, customProps) {
|
|
3079
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
3080
|
+
axiosError.cause = error;
|
|
3081
|
+
axiosError.name = error.name;
|
|
3082
|
+
if (error.status != null && axiosError.status == null) {
|
|
3083
|
+
axiosError.status = error.status;
|
|
3084
|
+
}
|
|
3085
|
+
customProps && Object.assign(axiosError, customProps);
|
|
3086
|
+
return axiosError;
|
|
3087
|
+
}
|
|
3088
|
+
/**
|
|
3089
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
3090
|
+
*
|
|
3091
|
+
* @param {string} message The error message.
|
|
3092
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
3093
|
+
* @param {Object} [config] The config.
|
|
3094
|
+
* @param {Object} [request] The request.
|
|
3095
|
+
* @param {Object} [response] The response.
|
|
3096
|
+
*
|
|
3097
|
+
* @returns {Error} The created error.
|
|
3098
|
+
*/
|
|
3099
|
+
constructor(message, code, config, request, response) {
|
|
3100
|
+
super(message);
|
|
3101
|
+
Object.defineProperty(this, "message", {
|
|
3102
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
3103
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
3104
|
+
__proto__: null,
|
|
3105
|
+
value: message,
|
|
3106
|
+
enumerable: true,
|
|
3107
|
+
writable: true,
|
|
3108
|
+
configurable: true
|
|
3109
|
+
});
|
|
3110
|
+
this.name = "AxiosError";
|
|
3111
|
+
this.isAxiosError = true;
|
|
3112
|
+
code && (this.code = code);
|
|
3113
|
+
config && (this.config = config);
|
|
3114
|
+
request && (this.request = request);
|
|
3115
|
+
if (response) {
|
|
3116
|
+
this.response = response;
|
|
3117
|
+
this.status = response.status;
|
|
3118
|
+
}
|
|
3119
|
+
}
|
|
3120
|
+
toJSON() {
|
|
3121
|
+
const config = this.config;
|
|
3122
|
+
const redactKeys = config && utils$1.hasOwnProp(config, "redact") ? config.redact : void 0;
|
|
3123
|
+
const serializedConfig = utils$1.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils$1.toJSONObject(config);
|
|
3124
|
+
return {
|
|
3125
|
+
// Standard
|
|
3126
|
+
message: this.message,
|
|
3127
|
+
name: this.name,
|
|
3128
|
+
// Microsoft
|
|
3129
|
+
description: this.description,
|
|
3130
|
+
number: this.number,
|
|
3131
|
+
// Mozilla
|
|
3132
|
+
fileName: this.fileName,
|
|
3133
|
+
lineNumber: this.lineNumber,
|
|
3134
|
+
columnNumber: this.columnNumber,
|
|
3135
|
+
stack: this.stack,
|
|
3136
|
+
// Axios
|
|
3137
|
+
config: serializedConfig,
|
|
3138
|
+
code: this.code,
|
|
3139
|
+
status: this.status
|
|
3140
|
+
};
|
|
3141
|
+
}
|
|
3142
|
+
};
|
|
3143
|
+
AxiosError$1.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
3144
|
+
AxiosError$1.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
3145
|
+
AxiosError$1.ECONNABORTED = "ECONNABORTED";
|
|
3146
|
+
AxiosError$1.ETIMEDOUT = "ETIMEDOUT";
|
|
3147
|
+
AxiosError$1.ECONNREFUSED = "ECONNREFUSED";
|
|
3148
|
+
AxiosError$1.ERR_NETWORK = "ERR_NETWORK";
|
|
3149
|
+
AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
3150
|
+
AxiosError$1.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
3151
|
+
AxiosError$1.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
3152
|
+
AxiosError$1.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
3153
|
+
AxiosError$1.ERR_CANCELED = "ERR_CANCELED";
|
|
3154
|
+
AxiosError$1.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
3155
|
+
AxiosError$1.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
3156
|
+
AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
3157
|
+
const httpAdapter = null;
|
|
3158
|
+
function isVisitable(thing) {
|
|
3159
|
+
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
3160
|
+
}
|
|
3161
|
+
function removeBrackets(key) {
|
|
3162
|
+
return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
3163
|
+
}
|
|
3164
|
+
function renderKey(path, key, dots) {
|
|
3165
|
+
if (!path) return key;
|
|
3166
|
+
return path.concat(key).map(function each(token, i) {
|
|
3167
|
+
token = removeBrackets(token);
|
|
3168
|
+
return !dots && i ? "[" + token + "]" : token;
|
|
3169
|
+
}).join(dots ? "." : "");
|
|
3170
|
+
}
|
|
3171
|
+
function isFlatArray(arr) {
|
|
3172
|
+
return utils$1.isArray(arr) && !arr.some(isVisitable);
|
|
3173
|
+
}
|
|
3174
|
+
const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
|
|
3175
|
+
return /^is[A-Z]/.test(prop);
|
|
3176
|
+
});
|
|
3177
|
+
function toFormData$1(obj, formData, options) {
|
|
3178
|
+
if (!utils$1.isObject(obj)) {
|
|
3179
|
+
throw new TypeError("target must be an object");
|
|
3180
|
+
}
|
|
3181
|
+
formData = formData || new FormData();
|
|
3182
|
+
options = utils$1.toFlatObject(
|
|
3183
|
+
options,
|
|
3184
|
+
{
|
|
3185
|
+
metaTokens: true,
|
|
3186
|
+
dots: false,
|
|
3187
|
+
indexes: false
|
|
3188
|
+
},
|
|
3189
|
+
false,
|
|
3190
|
+
function defined(option, source) {
|
|
3191
|
+
return !utils$1.isUndefined(source[option]);
|
|
3192
|
+
}
|
|
3193
|
+
);
|
|
3194
|
+
const metaTokens = options.metaTokens;
|
|
3195
|
+
const visitor = options.visitor || defaultVisitor;
|
|
3196
|
+
const dots = options.dots;
|
|
3197
|
+
const indexes = options.indexes;
|
|
3198
|
+
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
3199
|
+
const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
|
|
3200
|
+
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
3201
|
+
if (!utils$1.isFunction(visitor)) {
|
|
3202
|
+
throw new TypeError("visitor must be a function");
|
|
3203
|
+
}
|
|
3204
|
+
function convertValue(value) {
|
|
3205
|
+
if (value === null) return "";
|
|
3206
|
+
if (utils$1.isDate(value)) {
|
|
3207
|
+
return value.toISOString();
|
|
3208
|
+
}
|
|
3209
|
+
if (utils$1.isBoolean(value)) {
|
|
3210
|
+
return value.toString();
|
|
3211
|
+
}
|
|
3212
|
+
if (!useBlob && utils$1.isBlob(value)) {
|
|
3213
|
+
throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
|
|
3214
|
+
}
|
|
3215
|
+
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
3216
|
+
return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
|
|
3217
|
+
}
|
|
3218
|
+
return value;
|
|
3219
|
+
}
|
|
3220
|
+
function defaultVisitor(value, key, path) {
|
|
3221
|
+
let arr = value;
|
|
3222
|
+
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
|
|
3223
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
3224
|
+
return false;
|
|
3225
|
+
}
|
|
3226
|
+
if (value && !path && typeof value === "object") {
|
|
3227
|
+
if (utils$1.endsWith(key, "{}")) {
|
|
3228
|
+
key = metaTokens ? key : key.slice(0, -2);
|
|
3229
|
+
value = JSON.stringify(value);
|
|
3230
|
+
} else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
|
|
3231
|
+
key = removeBrackets(key);
|
|
3232
|
+
arr.forEach(function each(el, index2) {
|
|
3233
|
+
!(utils$1.isUndefined(el) || el === null) && formData.append(
|
|
3234
|
+
// eslint-disable-next-line no-nested-ternary
|
|
3235
|
+
indexes === true ? renderKey([key], index2, dots) : indexes === null ? key : key + "[]",
|
|
3236
|
+
convertValue(el)
|
|
3237
|
+
);
|
|
3238
|
+
});
|
|
3239
|
+
return false;
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3242
|
+
if (isVisitable(value)) {
|
|
3243
|
+
return true;
|
|
3244
|
+
}
|
|
3245
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
3246
|
+
return false;
|
|
3247
|
+
}
|
|
3248
|
+
const stack = [];
|
|
3249
|
+
const exposedHelpers = Object.assign(predicates, {
|
|
3250
|
+
defaultVisitor,
|
|
3251
|
+
convertValue,
|
|
3252
|
+
isVisitable
|
|
3253
|
+
});
|
|
3254
|
+
function build(value, path, depth = 0) {
|
|
3255
|
+
if (utils$1.isUndefined(value)) return;
|
|
3256
|
+
if (depth > maxDepth) {
|
|
3257
|
+
throw new AxiosError$1(
|
|
3258
|
+
"Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
|
|
3259
|
+
AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
3260
|
+
);
|
|
3261
|
+
}
|
|
3262
|
+
if (stack.indexOf(value) !== -1) {
|
|
3263
|
+
throw new Error("Circular reference detected in " + path.join("."));
|
|
3264
|
+
}
|
|
3265
|
+
stack.push(value);
|
|
3266
|
+
utils$1.forEach(value, function each(el, key) {
|
|
3267
|
+
const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
3268
|
+
if (result === true) {
|
|
3269
|
+
build(el, path ? path.concat(key) : [key], depth + 1);
|
|
3270
|
+
}
|
|
3271
|
+
});
|
|
3272
|
+
stack.pop();
|
|
3273
|
+
}
|
|
3274
|
+
if (!utils$1.isObject(obj)) {
|
|
3275
|
+
throw new TypeError("data must be an object");
|
|
3276
|
+
}
|
|
3277
|
+
build(obj);
|
|
3278
|
+
return formData;
|
|
3279
|
+
}
|
|
3280
|
+
function encode$1(str) {
|
|
3281
|
+
const charMap = {
|
|
3282
|
+
"!": "%21",
|
|
3283
|
+
"'": "%27",
|
|
3284
|
+
"(": "%28",
|
|
3285
|
+
")": "%29",
|
|
3286
|
+
"~": "%7E",
|
|
3287
|
+
"%20": "+"
|
|
3288
|
+
};
|
|
3289
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
|
|
3290
|
+
return charMap[match];
|
|
3291
|
+
});
|
|
3292
|
+
}
|
|
3293
|
+
function AxiosURLSearchParams(params, options) {
|
|
3294
|
+
this._pairs = [];
|
|
3295
|
+
params && toFormData$1(params, this, options);
|
|
2862
3296
|
}
|
|
2863
3297
|
const prototype = AxiosURLSearchParams.prototype;
|
|
2864
3298
|
prototype.append = function append(name, value) {
|
|
@@ -2951,491 +3385,231 @@ class InterceptorManager {
|
|
|
2951
3385
|
*
|
|
2952
3386
|
* @param {Function} fn The function to call for each interceptor
|
|
2953
3387
|
*
|
|
2954
|
-
* @returns {void}
|
|
2955
|
-
*/
|
|
2956
|
-
forEach(fn) {
|
|
2957
|
-
utils$1.forEach(this.handlers, function forEachHandler(h2) {
|
|
2958
|
-
if (h2 !== null) {
|
|
2959
|
-
fn(h2);
|
|
2960
|
-
}
|
|
2961
|
-
});
|
|
2962
|
-
}
|
|
2963
|
-
}
|
|
2964
|
-
const transitionalDefaults = {
|
|
2965
|
-
silentJSONParsing: true,
|
|
2966
|
-
forcedJSONParsing: true,
|
|
2967
|
-
clarifyTimeoutError: false,
|
|
2968
|
-
legacyInterceptorReqResOrdering: true
|
|
2969
|
-
};
|
|
2970
|
-
const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
|
|
2971
|
-
const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
|
|
2972
|
-
const Blob$1 = typeof Blob !== "undefined" ? Blob : null;
|
|
2973
|
-
const platform$1 = {
|
|
2974
|
-
isBrowser: true,
|
|
2975
|
-
classes: {
|
|
2976
|
-
URLSearchParams: URLSearchParams$1,
|
|
2977
|
-
FormData: FormData$1,
|
|
2978
|
-
Blob: Blob$1
|
|
2979
|
-
},
|
|
2980
|
-
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
2981
|
-
};
|
|
2982
|
-
const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
|
2983
|
-
const _navigator = typeof navigator === "object" && navigator || void 0;
|
|
2984
|
-
const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
|
|
2985
|
-
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
2986
|
-
return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
|
|
2987
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
2988
|
-
})();
|
|
2989
|
-
const origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
2990
|
-
const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2991
|
-
__proto__: null,
|
|
2992
|
-
hasBrowserEnv,
|
|
2993
|
-
hasStandardBrowserEnv,
|
|
2994
|
-
hasStandardBrowserWebWorkerEnv,
|
|
2995
|
-
navigator: _navigator,
|
|
2996
|
-
origin
|
|
2997
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
2998
|
-
const platform = {
|
|
2999
|
-
...utils,
|
|
3000
|
-
...platform$1
|
|
3001
|
-
};
|
|
3002
|
-
function toURLEncodedForm(data, options) {
|
|
3003
|
-
return toFormData$1(data, new platform.classes.URLSearchParams(), {
|
|
3004
|
-
visitor: function(value, key, path, helpers) {
|
|
3005
|
-
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
3006
|
-
this.append(key, value.toString("base64"));
|
|
3007
|
-
return false;
|
|
3008
|
-
}
|
|
3009
|
-
return helpers.defaultVisitor.apply(this, arguments);
|
|
3010
|
-
},
|
|
3011
|
-
...options
|
|
3012
|
-
});
|
|
3013
|
-
}
|
|
3014
|
-
function parsePropPath(name) {
|
|
3015
|
-
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
3016
|
-
return match[0] === "[]" ? "" : match[1] || match[0];
|
|
3017
|
-
});
|
|
3018
|
-
}
|
|
3019
|
-
function arrayToObject(arr) {
|
|
3020
|
-
const obj = {};
|
|
3021
|
-
const keys = Object.keys(arr);
|
|
3022
|
-
let i;
|
|
3023
|
-
const len = keys.length;
|
|
3024
|
-
let key;
|
|
3025
|
-
for (i = 0; i < len; i++) {
|
|
3026
|
-
key = keys[i];
|
|
3027
|
-
obj[key] = arr[key];
|
|
3028
|
-
}
|
|
3029
|
-
return obj;
|
|
3030
|
-
}
|
|
3031
|
-
function formDataToJSON(formData) {
|
|
3032
|
-
function buildPath(path, value, target, index2) {
|
|
3033
|
-
let name = path[index2++];
|
|
3034
|
-
if (name === "__proto__") return true;
|
|
3035
|
-
const isNumericKey = Number.isFinite(+name);
|
|
3036
|
-
const isLast = index2 >= path.length;
|
|
3037
|
-
name = !name && utils$1.isArray(target) ? target.length : name;
|
|
3038
|
-
if (isLast) {
|
|
3039
|
-
if (utils$1.hasOwnProp(target, name)) {
|
|
3040
|
-
target[name] = [target[name], value];
|
|
3041
|
-
} else {
|
|
3042
|
-
target[name] = value;
|
|
3043
|
-
}
|
|
3044
|
-
return !isNumericKey;
|
|
3045
|
-
}
|
|
3046
|
-
if (!target[name] || !utils$1.isObject(target[name])) {
|
|
3047
|
-
target[name] = [];
|
|
3048
|
-
}
|
|
3049
|
-
const result = buildPath(path, value, target[name], index2);
|
|
3050
|
-
if (result && utils$1.isArray(target[name])) {
|
|
3051
|
-
target[name] = arrayToObject(target[name]);
|
|
3052
|
-
}
|
|
3053
|
-
return !isNumericKey;
|
|
3054
|
-
}
|
|
3055
|
-
if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
|
|
3056
|
-
const obj = {};
|
|
3057
|
-
utils$1.forEachEntry(formData, (name, value) => {
|
|
3058
|
-
buildPath(parsePropPath(name), value, obj, 0);
|
|
3059
|
-
});
|
|
3060
|
-
return obj;
|
|
3061
|
-
}
|
|
3062
|
-
return null;
|
|
3063
|
-
}
|
|
3064
|
-
function stringifySafely(rawValue, parser, encoder) {
|
|
3065
|
-
if (utils$1.isString(rawValue)) {
|
|
3066
|
-
try {
|
|
3067
|
-
(parser || JSON.parse)(rawValue);
|
|
3068
|
-
return utils$1.trim(rawValue);
|
|
3069
|
-
} catch (e2) {
|
|
3070
|
-
if (e2.name !== "SyntaxError") {
|
|
3071
|
-
throw e2;
|
|
3072
|
-
}
|
|
3073
|
-
}
|
|
3074
|
-
}
|
|
3075
|
-
return (encoder || JSON.stringify)(rawValue);
|
|
3076
|
-
}
|
|
3077
|
-
const defaults = {
|
|
3078
|
-
transitional: transitionalDefaults,
|
|
3079
|
-
adapter: ["xhr", "http", "fetch"],
|
|
3080
|
-
transformRequest: [function transformRequest(data, headers) {
|
|
3081
|
-
const contentType = headers.getContentType() || "";
|
|
3082
|
-
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
3083
|
-
const isObjectPayload = utils$1.isObject(data);
|
|
3084
|
-
if (isObjectPayload && utils$1.isHTMLForm(data)) {
|
|
3085
|
-
data = new FormData(data);
|
|
3086
|
-
}
|
|
3087
|
-
const isFormData2 = utils$1.isFormData(data);
|
|
3088
|
-
if (isFormData2) {
|
|
3089
|
-
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
3090
|
-
}
|
|
3091
|
-
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)) {
|
|
3092
|
-
return data;
|
|
3093
|
-
}
|
|
3094
|
-
if (utils$1.isArrayBufferView(data)) {
|
|
3095
|
-
return data.buffer;
|
|
3096
|
-
}
|
|
3097
|
-
if (utils$1.isURLSearchParams(data)) {
|
|
3098
|
-
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
3099
|
-
return data.toString();
|
|
3100
|
-
}
|
|
3101
|
-
let isFileList2;
|
|
3102
|
-
if (isObjectPayload) {
|
|
3103
|
-
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
3104
|
-
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
3105
|
-
}
|
|
3106
|
-
if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
3107
|
-
const _FormData = this.env && this.env.FormData;
|
|
3108
|
-
return toFormData$1(
|
|
3109
|
-
isFileList2 ? { "files[]": data } : data,
|
|
3110
|
-
_FormData && new _FormData(),
|
|
3111
|
-
this.formSerializer
|
|
3112
|
-
);
|
|
3113
|
-
}
|
|
3114
|
-
}
|
|
3115
|
-
if (isObjectPayload || hasJSONContentType) {
|
|
3116
|
-
headers.setContentType("application/json", false);
|
|
3117
|
-
return stringifySafely(data);
|
|
3118
|
-
}
|
|
3119
|
-
return data;
|
|
3120
|
-
}],
|
|
3121
|
-
transformResponse: [function transformResponse(data) {
|
|
3122
|
-
const transitional2 = this.transitional || defaults.transitional;
|
|
3123
|
-
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
3124
|
-
const JSONRequested = this.responseType === "json";
|
|
3125
|
-
if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
|
|
3126
|
-
return data;
|
|
3127
|
-
}
|
|
3128
|
-
if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
3129
|
-
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
3130
|
-
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
3131
|
-
try {
|
|
3132
|
-
return JSON.parse(data, this.parseReviver);
|
|
3133
|
-
} catch (e2) {
|
|
3134
|
-
if (strictJSONParsing) {
|
|
3135
|
-
if (e2.name === "SyntaxError") {
|
|
3136
|
-
throw AxiosError$1.from(e2, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
|
|
3137
|
-
}
|
|
3138
|
-
throw e2;
|
|
3139
|
-
}
|
|
3140
|
-
}
|
|
3141
|
-
}
|
|
3142
|
-
return data;
|
|
3143
|
-
}],
|
|
3144
|
-
/**
|
|
3145
|
-
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
3146
|
-
* timeout is not created.
|
|
3147
|
-
*/
|
|
3148
|
-
timeout: 0,
|
|
3149
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
3150
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
3151
|
-
maxContentLength: -1,
|
|
3152
|
-
maxBodyLength: -1,
|
|
3153
|
-
env: {
|
|
3154
|
-
FormData: platform.classes.FormData,
|
|
3155
|
-
Blob: platform.classes.Blob
|
|
3156
|
-
},
|
|
3157
|
-
validateStatus: function validateStatus(status) {
|
|
3158
|
-
return status >= 200 && status < 300;
|
|
3159
|
-
},
|
|
3160
|
-
headers: {
|
|
3161
|
-
common: {
|
|
3162
|
-
"Accept": "application/json, text/plain, */*",
|
|
3163
|
-
"Content-Type": void 0
|
|
3164
|
-
}
|
|
3165
|
-
}
|
|
3166
|
-
};
|
|
3167
|
-
utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
|
|
3168
|
-
defaults.headers[method] = {};
|
|
3169
|
-
});
|
|
3170
|
-
const ignoreDuplicateOf = utils$1.toObjectSet([
|
|
3171
|
-
"age",
|
|
3172
|
-
"authorization",
|
|
3173
|
-
"content-length",
|
|
3174
|
-
"content-type",
|
|
3175
|
-
"etag",
|
|
3176
|
-
"expires",
|
|
3177
|
-
"from",
|
|
3178
|
-
"host",
|
|
3179
|
-
"if-modified-since",
|
|
3180
|
-
"if-unmodified-since",
|
|
3181
|
-
"last-modified",
|
|
3182
|
-
"location",
|
|
3183
|
-
"max-forwards",
|
|
3184
|
-
"proxy-authorization",
|
|
3185
|
-
"referer",
|
|
3186
|
-
"retry-after",
|
|
3187
|
-
"user-agent"
|
|
3188
|
-
]);
|
|
3189
|
-
const parseHeaders = (rawHeaders) => {
|
|
3190
|
-
const parsed = {};
|
|
3191
|
-
let key;
|
|
3192
|
-
let val;
|
|
3193
|
-
let i;
|
|
3194
|
-
rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
|
|
3195
|
-
i = line.indexOf(":");
|
|
3196
|
-
key = line.substring(0, i).trim().toLowerCase();
|
|
3197
|
-
val = line.substring(i + 1).trim();
|
|
3198
|
-
if (!key || parsed[key] && ignoreDuplicateOf[key]) {
|
|
3199
|
-
return;
|
|
3200
|
-
}
|
|
3201
|
-
if (key === "set-cookie") {
|
|
3202
|
-
if (parsed[key]) {
|
|
3203
|
-
parsed[key].push(val);
|
|
3204
|
-
} else {
|
|
3205
|
-
parsed[key] = [val];
|
|
3206
|
-
}
|
|
3207
|
-
} else {
|
|
3208
|
-
parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
|
|
3209
|
-
}
|
|
3210
|
-
});
|
|
3211
|
-
return parsed;
|
|
3212
|
-
};
|
|
3213
|
-
const $internals = Symbol("internals");
|
|
3214
|
-
function normalizeHeader(header) {
|
|
3215
|
-
return header && String(header).trim().toLowerCase();
|
|
3216
|
-
}
|
|
3217
|
-
function normalizeValue(value) {
|
|
3218
|
-
if (value === false || value == null) {
|
|
3219
|
-
return value;
|
|
3220
|
-
}
|
|
3221
|
-
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
3222
|
-
}
|
|
3223
|
-
function parseTokens(str) {
|
|
3224
|
-
const tokens = /* @__PURE__ */ Object.create(null);
|
|
3225
|
-
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
3226
|
-
let match;
|
|
3227
|
-
while (match = tokensRE.exec(str)) {
|
|
3228
|
-
tokens[match[1]] = match[2];
|
|
3229
|
-
}
|
|
3230
|
-
return tokens;
|
|
3231
|
-
}
|
|
3232
|
-
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
3233
|
-
function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
|
|
3234
|
-
if (utils$1.isFunction(filter2)) {
|
|
3235
|
-
return filter2.call(this, value, header);
|
|
3236
|
-
}
|
|
3237
|
-
if (isHeaderNameFilter) {
|
|
3238
|
-
value = header;
|
|
3239
|
-
}
|
|
3240
|
-
if (!utils$1.isString(value)) return;
|
|
3241
|
-
if (utils$1.isString(filter2)) {
|
|
3242
|
-
return value.indexOf(filter2) !== -1;
|
|
3243
|
-
}
|
|
3244
|
-
if (utils$1.isRegExp(filter2)) {
|
|
3245
|
-
return filter2.test(value);
|
|
3388
|
+
* @returns {void}
|
|
3389
|
+
*/
|
|
3390
|
+
forEach(fn) {
|
|
3391
|
+
utils$1.forEach(this.handlers, function forEachHandler(h2) {
|
|
3392
|
+
if (h2 !== null) {
|
|
3393
|
+
fn(h2);
|
|
3394
|
+
}
|
|
3395
|
+
});
|
|
3246
3396
|
}
|
|
3247
3397
|
}
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3398
|
+
const transitionalDefaults = {
|
|
3399
|
+
silentJSONParsing: true,
|
|
3400
|
+
forcedJSONParsing: true,
|
|
3401
|
+
clarifyTimeoutError: false,
|
|
3402
|
+
legacyInterceptorReqResOrdering: true,
|
|
3403
|
+
advertiseZstdAcceptEncoding: false
|
|
3404
|
+
};
|
|
3405
|
+
const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
|
|
3406
|
+
const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
|
|
3407
|
+
const Blob$1 = typeof Blob !== "undefined" ? Blob : null;
|
|
3408
|
+
const platform$1 = {
|
|
3409
|
+
isBrowser: true,
|
|
3410
|
+
classes: {
|
|
3411
|
+
URLSearchParams: URLSearchParams$1,
|
|
3412
|
+
FormData: FormData$1,
|
|
3413
|
+
Blob: Blob$1
|
|
3414
|
+
},
|
|
3415
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
3416
|
+
};
|
|
3417
|
+
const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
|
3418
|
+
const _navigator = typeof navigator === "object" && navigator || void 0;
|
|
3419
|
+
const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
|
|
3420
|
+
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
3421
|
+
return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
|
|
3422
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
3423
|
+
})();
|
|
3424
|
+
const origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
3425
|
+
const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3426
|
+
__proto__: null,
|
|
3427
|
+
hasBrowserEnv,
|
|
3428
|
+
hasStandardBrowserEnv,
|
|
3429
|
+
hasStandardBrowserWebWorkerEnv,
|
|
3430
|
+
navigator: _navigator,
|
|
3431
|
+
origin
|
|
3432
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
3433
|
+
const platform = {
|
|
3434
|
+
...utils,
|
|
3435
|
+
...platform$1
|
|
3436
|
+
};
|
|
3437
|
+
function toURLEncodedForm(data, options) {
|
|
3438
|
+
return toFormData$1(data, new platform.classes.URLSearchParams(), {
|
|
3439
|
+
visitor: function(value, key, path, helpers) {
|
|
3440
|
+
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
3441
|
+
this.append(key, value.toString("base64"));
|
|
3442
|
+
return false;
|
|
3443
|
+
}
|
|
3444
|
+
return helpers.defaultVisitor.apply(this, arguments);
|
|
3445
|
+
},
|
|
3446
|
+
...options
|
|
3251
3447
|
});
|
|
3252
3448
|
}
|
|
3253
|
-
function
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
Object.defineProperty(obj, methodName + accessorName, {
|
|
3257
|
-
value: function(arg1, arg2, arg3) {
|
|
3258
|
-
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
3259
|
-
},
|
|
3260
|
-
configurable: true
|
|
3261
|
-
});
|
|
3449
|
+
function parsePropPath(name) {
|
|
3450
|
+
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
3451
|
+
return match[0] === "[]" ? "" : match[1] || match[0];
|
|
3262
3452
|
});
|
|
3263
3453
|
}
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
throw new Error("header name must be a non-empty string");
|
|
3274
|
-
}
|
|
3275
|
-
const key = utils$1.findKey(self2, lHeader);
|
|
3276
|
-
if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
|
|
3277
|
-
self2[key || _header] = normalizeValue(_value);
|
|
3278
|
-
}
|
|
3279
|
-
}
|
|
3280
|
-
const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
3281
|
-
if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
|
|
3282
|
-
setHeaders(header, valueOrRewrite);
|
|
3283
|
-
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
3284
|
-
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
3285
|
-
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
|
3286
|
-
let obj = {}, dest, key;
|
|
3287
|
-
for (const entry of header) {
|
|
3288
|
-
if (!utils$1.isArray(entry)) {
|
|
3289
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
3290
|
-
}
|
|
3291
|
-
obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
3292
|
-
}
|
|
3293
|
-
setHeaders(obj, valueOrRewrite);
|
|
3294
|
-
} else {
|
|
3295
|
-
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
3296
|
-
}
|
|
3297
|
-
return this;
|
|
3298
|
-
}
|
|
3299
|
-
get(header, parser) {
|
|
3300
|
-
header = normalizeHeader(header);
|
|
3301
|
-
if (header) {
|
|
3302
|
-
const key = utils$1.findKey(this, header);
|
|
3303
|
-
if (key) {
|
|
3304
|
-
const value = this[key];
|
|
3305
|
-
if (!parser) {
|
|
3306
|
-
return value;
|
|
3307
|
-
}
|
|
3308
|
-
if (parser === true) {
|
|
3309
|
-
return parseTokens(value);
|
|
3310
|
-
}
|
|
3311
|
-
if (utils$1.isFunction(parser)) {
|
|
3312
|
-
return parser.call(this, value, key);
|
|
3313
|
-
}
|
|
3314
|
-
if (utils$1.isRegExp(parser)) {
|
|
3315
|
-
return parser.exec(value);
|
|
3316
|
-
}
|
|
3317
|
-
throw new TypeError("parser must be boolean|regexp|function");
|
|
3318
|
-
}
|
|
3319
|
-
}
|
|
3320
|
-
}
|
|
3321
|
-
has(header, matcher) {
|
|
3322
|
-
header = normalizeHeader(header);
|
|
3323
|
-
if (header) {
|
|
3324
|
-
const key = utils$1.findKey(this, header);
|
|
3325
|
-
return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
3326
|
-
}
|
|
3327
|
-
return false;
|
|
3454
|
+
function arrayToObject(arr) {
|
|
3455
|
+
const obj = {};
|
|
3456
|
+
const keys = Object.keys(arr);
|
|
3457
|
+
let i;
|
|
3458
|
+
const len = keys.length;
|
|
3459
|
+
let key;
|
|
3460
|
+
for (i = 0; i < len; i++) {
|
|
3461
|
+
key = keys[i];
|
|
3462
|
+
obj[key] = arr[key];
|
|
3328
3463
|
}
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3464
|
+
return obj;
|
|
3465
|
+
}
|
|
3466
|
+
function formDataToJSON(formData) {
|
|
3467
|
+
function buildPath(path, value, target, index2) {
|
|
3468
|
+
let name = path[index2++];
|
|
3469
|
+
if (name === "__proto__") return true;
|
|
3470
|
+
const isNumericKey = Number.isFinite(+name);
|
|
3471
|
+
const isLast = index2 >= path.length;
|
|
3472
|
+
name = !name && utils$1.isArray(target) ? target.length : name;
|
|
3473
|
+
if (isLast) {
|
|
3474
|
+
if (utils$1.hasOwnProp(target, name)) {
|
|
3475
|
+
target[name] = utils$1.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
|
|
3476
|
+
} else {
|
|
3477
|
+
target[name] = value;
|
|
3340
3478
|
}
|
|
3479
|
+
return !isNumericKey;
|
|
3341
3480
|
}
|
|
3342
|
-
if (utils$1.
|
|
3343
|
-
|
|
3344
|
-
} else {
|
|
3345
|
-
deleteHeader(header);
|
|
3481
|
+
if (!utils$1.hasOwnProp(target, name) || !utils$1.isObject(target[name])) {
|
|
3482
|
+
target[name] = [];
|
|
3346
3483
|
}
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
const keys = Object.keys(this);
|
|
3351
|
-
let i = keys.length;
|
|
3352
|
-
let deleted = false;
|
|
3353
|
-
while (i--) {
|
|
3354
|
-
const key = keys[i];
|
|
3355
|
-
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
3356
|
-
delete this[key];
|
|
3357
|
-
deleted = true;
|
|
3358
|
-
}
|
|
3484
|
+
const result = buildPath(path, value, target[name], index2);
|
|
3485
|
+
if (result && utils$1.isArray(target[name])) {
|
|
3486
|
+
target[name] = arrayToObject(target[name]);
|
|
3359
3487
|
}
|
|
3360
|
-
return
|
|
3361
|
-
}
|
|
3362
|
-
normalize(format) {
|
|
3363
|
-
const self2 = this;
|
|
3364
|
-
const headers = {};
|
|
3365
|
-
utils$1.forEach(this, (value, header) => {
|
|
3366
|
-
const key = utils$1.findKey(headers, header);
|
|
3367
|
-
if (key) {
|
|
3368
|
-
self2[key] = normalizeValue(value);
|
|
3369
|
-
delete self2[header];
|
|
3370
|
-
return;
|
|
3371
|
-
}
|
|
3372
|
-
const normalized = format ? formatHeader(header) : String(header).trim();
|
|
3373
|
-
if (normalized !== header) {
|
|
3374
|
-
delete self2[header];
|
|
3375
|
-
}
|
|
3376
|
-
self2[normalized] = normalizeValue(value);
|
|
3377
|
-
headers[normalized] = true;
|
|
3378
|
-
});
|
|
3379
|
-
return this;
|
|
3380
|
-
}
|
|
3381
|
-
concat(...targets) {
|
|
3382
|
-
return this.constructor.concat(this, ...targets);
|
|
3488
|
+
return !isNumericKey;
|
|
3383
3489
|
}
|
|
3384
|
-
|
|
3385
|
-
const obj =
|
|
3386
|
-
utils$1.
|
|
3387
|
-
|
|
3490
|
+
if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
|
|
3491
|
+
const obj = {};
|
|
3492
|
+
utils$1.forEachEntry(formData, (name, value) => {
|
|
3493
|
+
buildPath(parsePropPath(name), value, obj, 0);
|
|
3388
3494
|
});
|
|
3389
3495
|
return obj;
|
|
3390
3496
|
}
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
}
|
|
3403
|
-
static from(thing) {
|
|
3404
|
-
return thing instanceof this ? thing : new this(thing);
|
|
3405
|
-
}
|
|
3406
|
-
static concat(first, ...targets) {
|
|
3407
|
-
const computed = new this(first);
|
|
3408
|
-
targets.forEach((target) => computed.set(target));
|
|
3409
|
-
return computed;
|
|
3410
|
-
}
|
|
3411
|
-
static accessor(header) {
|
|
3412
|
-
const internals = this[$internals] = this[$internals] = {
|
|
3413
|
-
accessors: {}
|
|
3414
|
-
};
|
|
3415
|
-
const accessors = internals.accessors;
|
|
3416
|
-
const prototype2 = this.prototype;
|
|
3417
|
-
function defineAccessor(_header) {
|
|
3418
|
-
const lHeader = normalizeHeader(_header);
|
|
3419
|
-
if (!accessors[lHeader]) {
|
|
3420
|
-
buildAccessors(prototype2, _header);
|
|
3421
|
-
accessors[lHeader] = true;
|
|
3497
|
+
return null;
|
|
3498
|
+
}
|
|
3499
|
+
const own = (obj, key) => obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : void 0;
|
|
3500
|
+
function stringifySafely(rawValue, parser, encoder) {
|
|
3501
|
+
if (utils$1.isString(rawValue)) {
|
|
3502
|
+
try {
|
|
3503
|
+
(parser || JSON.parse)(rawValue);
|
|
3504
|
+
return utils$1.trim(rawValue);
|
|
3505
|
+
} catch (e2) {
|
|
3506
|
+
if (e2.name !== "SyntaxError") {
|
|
3507
|
+
throw e2;
|
|
3422
3508
|
}
|
|
3423
3509
|
}
|
|
3424
|
-
utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
3425
|
-
return this;
|
|
3426
3510
|
}
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3511
|
+
return (encoder || JSON.stringify)(rawValue);
|
|
3512
|
+
}
|
|
3513
|
+
const defaults = {
|
|
3514
|
+
transitional: transitionalDefaults,
|
|
3515
|
+
adapter: ["xhr", "http", "fetch"],
|
|
3516
|
+
transformRequest: [
|
|
3517
|
+
function transformRequest(data, headers) {
|
|
3518
|
+
const contentType = headers.getContentType() || "";
|
|
3519
|
+
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
3520
|
+
const isObjectPayload = utils$1.isObject(data);
|
|
3521
|
+
if (isObjectPayload && utils$1.isHTMLForm(data)) {
|
|
3522
|
+
data = new FormData(data);
|
|
3523
|
+
}
|
|
3524
|
+
const isFormData2 = utils$1.isFormData(data);
|
|
3525
|
+
if (isFormData2) {
|
|
3526
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
3527
|
+
}
|
|
3528
|
+
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)) {
|
|
3529
|
+
return data;
|
|
3530
|
+
}
|
|
3531
|
+
if (utils$1.isArrayBufferView(data)) {
|
|
3532
|
+
return data.buffer;
|
|
3533
|
+
}
|
|
3534
|
+
if (utils$1.isURLSearchParams(data)) {
|
|
3535
|
+
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
3536
|
+
return data.toString();
|
|
3537
|
+
}
|
|
3538
|
+
let isFileList2;
|
|
3539
|
+
if (isObjectPayload) {
|
|
3540
|
+
const formSerializer = own(this, "formSerializer");
|
|
3541
|
+
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
3542
|
+
return toURLEncodedForm(data, formSerializer).toString();
|
|
3543
|
+
}
|
|
3544
|
+
if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
3545
|
+
const env = own(this, "env");
|
|
3546
|
+
const _FormData = env && env.FormData;
|
|
3547
|
+
return toFormData$1(
|
|
3548
|
+
isFileList2 ? { "files[]": data } : data,
|
|
3549
|
+
_FormData && new _FormData(),
|
|
3550
|
+
formSerializer
|
|
3551
|
+
);
|
|
3552
|
+
}
|
|
3553
|
+
}
|
|
3554
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
3555
|
+
headers.setContentType("application/json", false);
|
|
3556
|
+
return stringifySafely(data);
|
|
3557
|
+
}
|
|
3558
|
+
return data;
|
|
3435
3559
|
}
|
|
3436
|
-
|
|
3560
|
+
],
|
|
3561
|
+
transformResponse: [
|
|
3562
|
+
function transformResponse(data) {
|
|
3563
|
+
const transitional2 = own(this, "transitional") || defaults.transitional;
|
|
3564
|
+
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
3565
|
+
const responseType = own(this, "responseType");
|
|
3566
|
+
const JSONRequested = responseType === "json";
|
|
3567
|
+
if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
|
|
3568
|
+
return data;
|
|
3569
|
+
}
|
|
3570
|
+
if (data && utils$1.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
|
|
3571
|
+
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
3572
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
3573
|
+
try {
|
|
3574
|
+
return JSON.parse(data, own(this, "parseReviver"));
|
|
3575
|
+
} catch (e2) {
|
|
3576
|
+
if (strictJSONParsing) {
|
|
3577
|
+
if (e2.name === "SyntaxError") {
|
|
3578
|
+
throw AxiosError$1.from(e2, AxiosError$1.ERR_BAD_RESPONSE, this, null, own(this, "response"));
|
|
3579
|
+
}
|
|
3580
|
+
throw e2;
|
|
3581
|
+
}
|
|
3582
|
+
}
|
|
3583
|
+
}
|
|
3584
|
+
return data;
|
|
3585
|
+
}
|
|
3586
|
+
],
|
|
3587
|
+
/**
|
|
3588
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
3589
|
+
* timeout is not created.
|
|
3590
|
+
*/
|
|
3591
|
+
timeout: 0,
|
|
3592
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
3593
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
3594
|
+
maxContentLength: -1,
|
|
3595
|
+
maxBodyLength: -1,
|
|
3596
|
+
env: {
|
|
3597
|
+
FormData: platform.classes.FormData,
|
|
3598
|
+
Blob: platform.classes.Blob
|
|
3599
|
+
},
|
|
3600
|
+
validateStatus: function validateStatus(status) {
|
|
3601
|
+
return status >= 200 && status < 300;
|
|
3602
|
+
},
|
|
3603
|
+
headers: {
|
|
3604
|
+
common: {
|
|
3605
|
+
Accept: "application/json, text/plain, */*",
|
|
3606
|
+
"Content-Type": void 0
|
|
3607
|
+
}
|
|
3608
|
+
}
|
|
3609
|
+
};
|
|
3610
|
+
utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
|
|
3611
|
+
defaults.headers[method] = {};
|
|
3437
3612
|
});
|
|
3438
|
-
utils$1.freezeMethods(AxiosHeaders$1);
|
|
3439
3613
|
function transformData(fns, response) {
|
|
3440
3614
|
const config = this || defaults;
|
|
3441
3615
|
const context = response || config;
|
|
@@ -3473,7 +3647,7 @@ function settle(resolve, reject, response) {
|
|
|
3473
3647
|
} else {
|
|
3474
3648
|
reject(new AxiosError$1(
|
|
3475
3649
|
"Request failed with status code " + response.status,
|
|
3476
|
-
|
|
3650
|
+
response.status >= 400 && response.status < 500 ? AxiosError$1.ERR_BAD_REQUEST : AxiosError$1.ERR_BAD_RESPONSE,
|
|
3477
3651
|
response.config,
|
|
3478
3652
|
response.request,
|
|
3479
3653
|
response
|
|
@@ -3481,7 +3655,7 @@ function settle(resolve, reject, response) {
|
|
|
3481
3655
|
}
|
|
3482
3656
|
}
|
|
3483
3657
|
function parseProtocol(url) {
|
|
3484
|
-
const match = /^([-+\w]{1,25})(
|
|
3658
|
+
const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
|
|
3485
3659
|
return match && match[1] || "";
|
|
3486
3660
|
}
|
|
3487
3661
|
function speedometer(samplesCount, min) {
|
|
@@ -3553,19 +3727,22 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
3553
3727
|
let bytesNotified = 0;
|
|
3554
3728
|
const _speedometer = speedometer(50, 250);
|
|
3555
3729
|
return throttle((e2) => {
|
|
3556
|
-
|
|
3730
|
+
if (!e2 || typeof e2.loaded !== "number") {
|
|
3731
|
+
return;
|
|
3732
|
+
}
|
|
3733
|
+
const rawLoaded = e2.loaded;
|
|
3557
3734
|
const total = e2.lengthComputable ? e2.total : void 0;
|
|
3558
|
-
const
|
|
3735
|
+
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
3736
|
+
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
3559
3737
|
const rate = _speedometer(progressBytes);
|
|
3560
|
-
|
|
3561
|
-
bytesNotified = loaded;
|
|
3738
|
+
bytesNotified = Math.max(bytesNotified, loaded);
|
|
3562
3739
|
const data = {
|
|
3563
3740
|
loaded,
|
|
3564
3741
|
total,
|
|
3565
3742
|
progress: total ? loaded / total : void 0,
|
|
3566
3743
|
bytes: progressBytes,
|
|
3567
3744
|
rate: rate ? rate : void 0,
|
|
3568
|
-
estimated: rate && total
|
|
3745
|
+
estimated: rate && total ? (total - loaded) / rate : void 0,
|
|
3569
3746
|
event: e2,
|
|
3570
3747
|
lengthComputable: total != null,
|
|
3571
3748
|
[isDownloadStream ? "download" : "upload"]: true
|
|
@@ -3575,11 +3752,14 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
3575
3752
|
};
|
|
3576
3753
|
const progressEventDecorator = (total, throttled) => {
|
|
3577
3754
|
const lengthComputable = total != null;
|
|
3578
|
-
return [
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3755
|
+
return [
|
|
3756
|
+
(loaded) => throttled[0]({
|
|
3757
|
+
lengthComputable,
|
|
3758
|
+
total,
|
|
3759
|
+
loaded
|
|
3760
|
+
}),
|
|
3761
|
+
throttled[1]
|
|
3762
|
+
];
|
|
3583
3763
|
};
|
|
3584
3764
|
const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
|
|
3585
3765
|
const isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url) => {
|
|
@@ -3614,8 +3794,15 @@ const cookies = platform.hasStandardBrowserEnv ? (
|
|
|
3614
3794
|
},
|
|
3615
3795
|
read(name) {
|
|
3616
3796
|
if (typeof document === "undefined") return null;
|
|
3617
|
-
const
|
|
3618
|
-
|
|
3797
|
+
const cookies2 = document.cookie.split(";");
|
|
3798
|
+
for (let i = 0; i < cookies2.length; i++) {
|
|
3799
|
+
const cookie = cookies2[i].replace(/^\s+/, "");
|
|
3800
|
+
const eq = cookie.indexOf("=");
|
|
3801
|
+
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
3802
|
+
return decodeURIComponent(cookie.slice(eq + 1));
|
|
3803
|
+
}
|
|
3804
|
+
}
|
|
3805
|
+
return null;
|
|
3619
3806
|
},
|
|
3620
3807
|
remove(name) {
|
|
3621
3808
|
this.write(name, "", Date.now() - 864e5, "/");
|
|
@@ -3644,7 +3831,7 @@ function combineURLs(baseURL, relativeURL) {
|
|
|
3644
3831
|
}
|
|
3645
3832
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
3646
3833
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
3647
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls
|
|
3834
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
3648
3835
|
return combineURLs(baseURL, requestedURL);
|
|
3649
3836
|
}
|
|
3650
3837
|
return requestedURL;
|
|
@@ -3652,7 +3839,16 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
|
3652
3839
|
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
|
3653
3840
|
function mergeConfig$1(config1, config2) {
|
|
3654
3841
|
config2 = config2 || {};
|
|
3655
|
-
const config =
|
|
3842
|
+
const config = /* @__PURE__ */ Object.create(null);
|
|
3843
|
+
Object.defineProperty(config, "hasOwnProperty", {
|
|
3844
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
3845
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
3846
|
+
__proto__: null,
|
|
3847
|
+
value: Object.prototype.hasOwnProperty,
|
|
3848
|
+
enumerable: false,
|
|
3849
|
+
writable: true,
|
|
3850
|
+
configurable: true
|
|
3851
|
+
});
|
|
3656
3852
|
function getMergedValue(target, source, prop, caseless) {
|
|
3657
3853
|
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
3658
3854
|
return utils$1.merge.call({ caseless }, target, source);
|
|
@@ -3683,9 +3879,9 @@ function mergeConfig$1(config1, config2) {
|
|
|
3683
3879
|
}
|
|
3684
3880
|
}
|
|
3685
3881
|
function mergeDirectKeys(a, b, prop) {
|
|
3686
|
-
if (prop
|
|
3882
|
+
if (utils$1.hasOwnProp(config2, prop)) {
|
|
3687
3883
|
return getMergedValue(a, b);
|
|
3688
|
-
} else if (prop
|
|
3884
|
+
} else if (utils$1.hasOwnProp(config1, prop)) {
|
|
3689
3885
|
return getMergedValue(void 0, a);
|
|
3690
3886
|
}
|
|
3691
3887
|
}
|
|
@@ -3716,49 +3912,74 @@ function mergeConfig$1(config1, config2) {
|
|
|
3716
3912
|
httpsAgent: defaultToConfig2,
|
|
3717
3913
|
cancelToken: defaultToConfig2,
|
|
3718
3914
|
socketPath: defaultToConfig2,
|
|
3915
|
+
allowedSocketPaths: defaultToConfig2,
|
|
3719
3916
|
responseEncoding: defaultToConfig2,
|
|
3720
3917
|
validateStatus: mergeDirectKeys,
|
|
3721
3918
|
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
3722
3919
|
};
|
|
3723
|
-
utils$1.forEach(
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
}
|
|
3732
|
-
);
|
|
3920
|
+
utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
3921
|
+
if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
|
|
3922
|
+
const merge2 = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
3923
|
+
const a = utils$1.hasOwnProp(config1, prop) ? config1[prop] : void 0;
|
|
3924
|
+
const b = utils$1.hasOwnProp(config2, prop) ? config2[prop] : void 0;
|
|
3925
|
+
const configValue = merge2(a, b, prop);
|
|
3926
|
+
utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
3927
|
+
});
|
|
3733
3928
|
return config;
|
|
3734
3929
|
}
|
|
3735
|
-
const
|
|
3930
|
+
const FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
|
|
3931
|
+
function setFormDataHeaders(headers, formHeaders, policy) {
|
|
3932
|
+
if (policy !== "content-only") {
|
|
3933
|
+
headers.set(formHeaders);
|
|
3934
|
+
return;
|
|
3935
|
+
}
|
|
3936
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
3937
|
+
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
3938
|
+
headers.set(key, val);
|
|
3939
|
+
}
|
|
3940
|
+
});
|
|
3941
|
+
}
|
|
3942
|
+
const encodeUTF8$1 = (str) => encodeURIComponent(str).replace(
|
|
3943
|
+
/%([0-9A-F]{2})/gi,
|
|
3944
|
+
(_2, hex) => String.fromCharCode(parseInt(hex, 16))
|
|
3945
|
+
);
|
|
3946
|
+
function resolveConfig(config) {
|
|
3736
3947
|
const newConfig = mergeConfig$1({}, config);
|
|
3737
|
-
|
|
3948
|
+
const own2 = (key) => utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
|
|
3949
|
+
const data = own2("data");
|
|
3950
|
+
let withXSRFToken = own2("withXSRFToken");
|
|
3951
|
+
const xsrfHeaderName = own2("xsrfHeaderName");
|
|
3952
|
+
const xsrfCookieName = own2("xsrfCookieName");
|
|
3953
|
+
let headers = own2("headers");
|
|
3954
|
+
const auth = own2("auth");
|
|
3955
|
+
const baseURL = own2("baseURL");
|
|
3956
|
+
const allowAbsoluteUrls = own2("allowAbsoluteUrls");
|
|
3957
|
+
const url = own2("url");
|
|
3738
3958
|
newConfig.headers = headers = AxiosHeaders$1.from(headers);
|
|
3739
|
-
newConfig.url = buildURL(
|
|
3959
|
+
newConfig.url = buildURL(
|
|
3960
|
+
buildFullPath(baseURL, url, allowAbsoluteUrls),
|
|
3961
|
+
own2("params"),
|
|
3962
|
+
own2("paramsSerializer")
|
|
3963
|
+
);
|
|
3740
3964
|
if (auth) {
|
|
3741
3965
|
headers.set(
|
|
3742
3966
|
"Authorization",
|
|
3743
|
-
"Basic " + btoa((auth.username || "") + ":" + (auth.password ?
|
|
3967
|
+
"Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8$1(auth.password) : ""))
|
|
3744
3968
|
);
|
|
3745
3969
|
}
|
|
3746
3970
|
if (utils$1.isFormData(data)) {
|
|
3747
|
-
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
3971
|
+
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
|
|
3748
3972
|
headers.setContentType(void 0);
|
|
3749
3973
|
} else if (utils$1.isFunction(data.getHeaders)) {
|
|
3750
|
-
|
|
3751
|
-
const allowedHeaders = ["content-type", "content-length"];
|
|
3752
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
3753
|
-
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
3754
|
-
headers.set(key, val);
|
|
3755
|
-
}
|
|
3756
|
-
});
|
|
3974
|
+
setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
|
|
3757
3975
|
}
|
|
3758
3976
|
}
|
|
3759
3977
|
if (platform.hasStandardBrowserEnv) {
|
|
3760
|
-
|
|
3761
|
-
|
|
3978
|
+
if (utils$1.isFunction(withXSRFToken)) {
|
|
3979
|
+
withXSRFToken = withXSRFToken(newConfig);
|
|
3980
|
+
}
|
|
3981
|
+
const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin(newConfig.url);
|
|
3982
|
+
if (shouldSendXSRF) {
|
|
3762
3983
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
3763
3984
|
if (xsrfValue) {
|
|
3764
3985
|
headers.set(xsrfHeaderName, xsrfValue);
|
|
@@ -3766,7 +3987,7 @@ const resolveConfig = (config) => {
|
|
|
3766
3987
|
}
|
|
3767
3988
|
}
|
|
3768
3989
|
return newConfig;
|
|
3769
|
-
}
|
|
3990
|
+
}
|
|
3770
3991
|
const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
3771
3992
|
const xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
3772
3993
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
@@ -3802,13 +4023,17 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
|
3802
4023
|
config,
|
|
3803
4024
|
request
|
|
3804
4025
|
};
|
|
3805
|
-
settle(
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
4026
|
+
settle(
|
|
4027
|
+
function _resolve(value) {
|
|
4028
|
+
resolve(value);
|
|
4029
|
+
done();
|
|
4030
|
+
},
|
|
4031
|
+
function _reject(err) {
|
|
4032
|
+
reject(err);
|
|
4033
|
+
done();
|
|
4034
|
+
},
|
|
4035
|
+
response
|
|
4036
|
+
);
|
|
3812
4037
|
request = null;
|
|
3813
4038
|
}
|
|
3814
4039
|
if ("onloadend" in request) {
|
|
@@ -3818,7 +4043,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
|
3818
4043
|
if (!request || request.readyState !== 4) {
|
|
3819
4044
|
return;
|
|
3820
4045
|
}
|
|
3821
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.
|
|
4046
|
+
if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith("file:"))) {
|
|
3822
4047
|
return;
|
|
3823
4048
|
}
|
|
3824
4049
|
setTimeout(onloadend);
|
|
@@ -3829,6 +4054,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
|
3829
4054
|
return;
|
|
3830
4055
|
}
|
|
3831
4056
|
reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
|
|
4057
|
+
done();
|
|
3832
4058
|
request = null;
|
|
3833
4059
|
};
|
|
3834
4060
|
request.onerror = function handleError(event) {
|
|
@@ -3836,6 +4062,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
|
3836
4062
|
const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
|
|
3837
4063
|
err.event = event || null;
|
|
3838
4064
|
reject(err);
|
|
4065
|
+
done();
|
|
3839
4066
|
request = null;
|
|
3840
4067
|
};
|
|
3841
4068
|
request.ontimeout = function handleTimeout() {
|
|
@@ -3844,17 +4071,20 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
|
3844
4071
|
if (_config.timeoutErrorMessage) {
|
|
3845
4072
|
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
3846
4073
|
}
|
|
3847
|
-
reject(
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
4074
|
+
reject(
|
|
4075
|
+
new AxiosError$1(
|
|
4076
|
+
timeoutErrorMessage,
|
|
4077
|
+
transitional2.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
|
|
4078
|
+
config,
|
|
4079
|
+
request
|
|
4080
|
+
)
|
|
4081
|
+
);
|
|
4082
|
+
done();
|
|
3853
4083
|
request = null;
|
|
3854
4084
|
};
|
|
3855
4085
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
3856
4086
|
if ("setRequestHeader" in request) {
|
|
3857
|
-
utils$1.forEach(requestHeaders
|
|
4087
|
+
utils$1.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) {
|
|
3858
4088
|
request.setRequestHeader(key, val);
|
|
3859
4089
|
});
|
|
3860
4090
|
}
|
|
@@ -3880,6 +4110,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
|
3880
4110
|
}
|
|
3881
4111
|
reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
|
|
3882
4112
|
request.abort();
|
|
4113
|
+
done();
|
|
3883
4114
|
request = null;
|
|
3884
4115
|
};
|
|
3885
4116
|
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
@@ -3888,45 +4119,55 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
|
3888
4119
|
}
|
|
3889
4120
|
}
|
|
3890
4121
|
const protocol = parseProtocol(_config.url);
|
|
3891
|
-
if (protocol && platform.protocols.
|
|
3892
|
-
reject(
|
|
4122
|
+
if (protocol && !platform.protocols.includes(protocol)) {
|
|
4123
|
+
reject(
|
|
4124
|
+
new AxiosError$1(
|
|
4125
|
+
"Unsupported protocol " + protocol + ":",
|
|
4126
|
+
AxiosError$1.ERR_BAD_REQUEST,
|
|
4127
|
+
config
|
|
4128
|
+
)
|
|
4129
|
+
);
|
|
3893
4130
|
return;
|
|
3894
4131
|
}
|
|
3895
4132
|
request.send(requestData || null);
|
|
3896
4133
|
});
|
|
3897
4134
|
};
|
|
3898
4135
|
const composeSignals = (signals, timeout) => {
|
|
3899
|
-
|
|
3900
|
-
if (timeout
|
|
3901
|
-
|
|
3902
|
-
let aborted;
|
|
3903
|
-
const onabort = function(reason) {
|
|
3904
|
-
if (!aborted) {
|
|
3905
|
-
aborted = true;
|
|
3906
|
-
unsubscribe();
|
|
3907
|
-
const err = reason instanceof Error ? reason : this.reason;
|
|
3908
|
-
controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
|
|
3909
|
-
}
|
|
3910
|
-
};
|
|
3911
|
-
let timer = timeout && setTimeout(() => {
|
|
3912
|
-
timer = null;
|
|
3913
|
-
onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
|
|
3914
|
-
}, timeout);
|
|
3915
|
-
const unsubscribe = () => {
|
|
3916
|
-
if (signals) {
|
|
3917
|
-
timer && clearTimeout(timer);
|
|
3918
|
-
timer = null;
|
|
3919
|
-
signals.forEach((signal2) => {
|
|
3920
|
-
signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
|
|
3921
|
-
});
|
|
3922
|
-
signals = null;
|
|
3923
|
-
}
|
|
3924
|
-
};
|
|
3925
|
-
signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
|
|
3926
|
-
const { signal } = controller;
|
|
3927
|
-
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
3928
|
-
return signal;
|
|
4136
|
+
signals = signals ? signals.filter(Boolean) : [];
|
|
4137
|
+
if (!timeout && !signals.length) {
|
|
4138
|
+
return;
|
|
3929
4139
|
}
|
|
4140
|
+
const controller = new AbortController();
|
|
4141
|
+
let aborted = false;
|
|
4142
|
+
const onabort = function(reason) {
|
|
4143
|
+
if (!aborted) {
|
|
4144
|
+
aborted = true;
|
|
4145
|
+
unsubscribe();
|
|
4146
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
4147
|
+
controller.abort(
|
|
4148
|
+
err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err)
|
|
4149
|
+
);
|
|
4150
|
+
}
|
|
4151
|
+
};
|
|
4152
|
+
let timer = timeout && setTimeout(() => {
|
|
4153
|
+
timer = null;
|
|
4154
|
+
onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
|
|
4155
|
+
}, timeout);
|
|
4156
|
+
const unsubscribe = () => {
|
|
4157
|
+
if (!signals) {
|
|
4158
|
+
return;
|
|
4159
|
+
}
|
|
4160
|
+
timer && clearTimeout(timer);
|
|
4161
|
+
timer = null;
|
|
4162
|
+
signals.forEach((signal2) => {
|
|
4163
|
+
signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
|
|
4164
|
+
});
|
|
4165
|
+
signals = null;
|
|
4166
|
+
};
|
|
4167
|
+
signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
|
|
4168
|
+
const { signal } = controller;
|
|
4169
|
+
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
4170
|
+
return signal;
|
|
3930
4171
|
};
|
|
3931
4172
|
const streamChunk = function* (chunk, chunkSize) {
|
|
3932
4173
|
let len = chunk.byteLength;
|
|
@@ -3975,44 +4216,125 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
3975
4216
|
onFinish && onFinish(e2);
|
|
3976
4217
|
}
|
|
3977
4218
|
};
|
|
3978
|
-
return new ReadableStream(
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
4219
|
+
return new ReadableStream(
|
|
4220
|
+
{
|
|
4221
|
+
async pull(controller) {
|
|
4222
|
+
try {
|
|
4223
|
+
const { done: done2, value } = await iterator2.next();
|
|
4224
|
+
if (done2) {
|
|
4225
|
+
_onFinish();
|
|
4226
|
+
controller.close();
|
|
4227
|
+
return;
|
|
4228
|
+
}
|
|
4229
|
+
let len = value.byteLength;
|
|
4230
|
+
if (onProgress) {
|
|
4231
|
+
let loadedBytes = bytes += len;
|
|
4232
|
+
onProgress(loadedBytes);
|
|
4233
|
+
}
|
|
4234
|
+
controller.enqueue(new Uint8Array(value));
|
|
4235
|
+
} catch (err) {
|
|
4236
|
+
_onFinish(err);
|
|
4237
|
+
throw err;
|
|
3991
4238
|
}
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
_onFinish(
|
|
3995
|
-
|
|
4239
|
+
},
|
|
4240
|
+
cancel(reason) {
|
|
4241
|
+
_onFinish(reason);
|
|
4242
|
+
return iterator2.return();
|
|
3996
4243
|
}
|
|
3997
4244
|
},
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
return iterator2.return();
|
|
4245
|
+
{
|
|
4246
|
+
highWaterMark: 2
|
|
4001
4247
|
}
|
|
4002
|
-
|
|
4003
|
-
highWaterMark: 2
|
|
4004
|
-
});
|
|
4248
|
+
);
|
|
4005
4249
|
};
|
|
4250
|
+
function estimateDataURLDecodedBytes(url) {
|
|
4251
|
+
if (!url || typeof url !== "string") return 0;
|
|
4252
|
+
if (!url.startsWith("data:")) return 0;
|
|
4253
|
+
const comma = url.indexOf(",");
|
|
4254
|
+
if (comma < 0) return 0;
|
|
4255
|
+
const meta = url.slice(5, comma);
|
|
4256
|
+
const body = url.slice(comma + 1);
|
|
4257
|
+
const isBase64 = /;base64/i.test(meta);
|
|
4258
|
+
if (isBase64) {
|
|
4259
|
+
let effectiveLen = body.length;
|
|
4260
|
+
const len = body.length;
|
|
4261
|
+
for (let i = 0; i < len; i++) {
|
|
4262
|
+
if (body.charCodeAt(i) === 37 && i + 2 < len) {
|
|
4263
|
+
const a = body.charCodeAt(i + 1);
|
|
4264
|
+
const b = body.charCodeAt(i + 2);
|
|
4265
|
+
const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102);
|
|
4266
|
+
if (isHex) {
|
|
4267
|
+
effectiveLen -= 2;
|
|
4268
|
+
i += 2;
|
|
4269
|
+
}
|
|
4270
|
+
}
|
|
4271
|
+
}
|
|
4272
|
+
let pad = 0;
|
|
4273
|
+
let idx = len - 1;
|
|
4274
|
+
const tailIsPct3D = (j2) => j2 >= 2 && body.charCodeAt(j2 - 2) === 37 && // '%'
|
|
4275
|
+
body.charCodeAt(j2 - 1) === 51 && // '3'
|
|
4276
|
+
(body.charCodeAt(j2) === 68 || body.charCodeAt(j2) === 100);
|
|
4277
|
+
if (idx >= 0) {
|
|
4278
|
+
if (body.charCodeAt(idx) === 61) {
|
|
4279
|
+
pad++;
|
|
4280
|
+
idx--;
|
|
4281
|
+
} else if (tailIsPct3D(idx)) {
|
|
4282
|
+
pad++;
|
|
4283
|
+
idx -= 3;
|
|
4284
|
+
}
|
|
4285
|
+
}
|
|
4286
|
+
if (pad === 1 && idx >= 0) {
|
|
4287
|
+
if (body.charCodeAt(idx) === 61) {
|
|
4288
|
+
pad++;
|
|
4289
|
+
} else if (tailIsPct3D(idx)) {
|
|
4290
|
+
pad++;
|
|
4291
|
+
}
|
|
4292
|
+
}
|
|
4293
|
+
const groups = Math.floor(effectiveLen / 4);
|
|
4294
|
+
const bytes2 = groups * 3 - (pad || 0);
|
|
4295
|
+
return bytes2 > 0 ? bytes2 : 0;
|
|
4296
|
+
}
|
|
4297
|
+
if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
|
|
4298
|
+
return Buffer.byteLength(body, "utf8");
|
|
4299
|
+
}
|
|
4300
|
+
let bytes = 0;
|
|
4301
|
+
for (let i = 0, len = body.length; i < len; i++) {
|
|
4302
|
+
const c = body.charCodeAt(i);
|
|
4303
|
+
if (c < 128) {
|
|
4304
|
+
bytes += 1;
|
|
4305
|
+
} else if (c < 2048) {
|
|
4306
|
+
bytes += 2;
|
|
4307
|
+
} else if (c >= 55296 && c <= 56319 && i + 1 < len) {
|
|
4308
|
+
const next = body.charCodeAt(i + 1);
|
|
4309
|
+
if (next >= 56320 && next <= 57343) {
|
|
4310
|
+
bytes += 4;
|
|
4311
|
+
i++;
|
|
4312
|
+
} else {
|
|
4313
|
+
bytes += 3;
|
|
4314
|
+
}
|
|
4315
|
+
} else {
|
|
4316
|
+
bytes += 3;
|
|
4317
|
+
}
|
|
4318
|
+
}
|
|
4319
|
+
return bytes;
|
|
4320
|
+
}
|
|
4321
|
+
const VERSION$1 = "1.17.0";
|
|
4006
4322
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
4007
4323
|
const { isFunction } = utils$1;
|
|
4008
|
-
const
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
const {
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
}
|
|
4324
|
+
const encodeUTF8 = (str) => encodeURIComponent(str).replace(
|
|
4325
|
+
/%([0-9A-F]{2})/gi,
|
|
4326
|
+
(_2, hex) => String.fromCharCode(parseInt(hex, 16))
|
|
4327
|
+
);
|
|
4328
|
+
const decodeURIComponentSafe = (value) => {
|
|
4329
|
+
if (!utils$1.isString(value)) {
|
|
4330
|
+
return value;
|
|
4331
|
+
}
|
|
4332
|
+
try {
|
|
4333
|
+
return decodeURIComponent(value);
|
|
4334
|
+
} catch (error) {
|
|
4335
|
+
return value;
|
|
4336
|
+
}
|
|
4337
|
+
};
|
|
4016
4338
|
const test = (fn, ...args) => {
|
|
4017
4339
|
try {
|
|
4018
4340
|
return !!fn(...args);
|
|
@@ -4020,10 +4342,27 @@ const test = (fn, ...args) => {
|
|
|
4020
4342
|
return false;
|
|
4021
4343
|
}
|
|
4022
4344
|
};
|
|
4345
|
+
const maybeWithAuthCredentials = (url) => {
|
|
4346
|
+
const protocolIndex = url.indexOf("://");
|
|
4347
|
+
let urlToCheck = url;
|
|
4348
|
+
if (protocolIndex !== -1) {
|
|
4349
|
+
urlToCheck = urlToCheck.slice(protocolIndex + 3);
|
|
4350
|
+
}
|
|
4351
|
+
return urlToCheck.includes("@") || urlToCheck.includes(":");
|
|
4352
|
+
};
|
|
4023
4353
|
const factory = (env) => {
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4354
|
+
const globalObject = utils$1.global !== void 0 && utils$1.global !== null ? utils$1.global : globalThis;
|
|
4355
|
+
const { ReadableStream: ReadableStream2, TextEncoder } = globalObject;
|
|
4356
|
+
env = utils$1.merge.call(
|
|
4357
|
+
{
|
|
4358
|
+
skipUndefined: true
|
|
4359
|
+
},
|
|
4360
|
+
{
|
|
4361
|
+
Request: globalObject.Request,
|
|
4362
|
+
Response: globalObject.Response
|
|
4363
|
+
},
|
|
4364
|
+
env
|
|
4365
|
+
);
|
|
4027
4366
|
const { fetch: envFetch, Request, Response } = env;
|
|
4028
4367
|
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === "function";
|
|
4029
4368
|
const isRequestSupported = isFunction(Request);
|
|
@@ -4031,18 +4370,22 @@ const factory = (env) => {
|
|
|
4031
4370
|
if (!isFetchSupported) {
|
|
4032
4371
|
return false;
|
|
4033
4372
|
}
|
|
4034
|
-
const isReadableStreamSupported = isFetchSupported && isFunction(
|
|
4373
|
+
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream2);
|
|
4035
4374
|
const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
4036
4375
|
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
4037
4376
|
let duplexAccessed = false;
|
|
4038
|
-
const
|
|
4039
|
-
body: new
|
|
4377
|
+
const request = new Request(platform.origin, {
|
|
4378
|
+
body: new ReadableStream2(),
|
|
4040
4379
|
method: "POST",
|
|
4041
4380
|
get duplex() {
|
|
4042
4381
|
duplexAccessed = true;
|
|
4043
4382
|
return "half";
|
|
4044
4383
|
}
|
|
4045
|
-
})
|
|
4384
|
+
});
|
|
4385
|
+
const hasContentType = request.headers.has("Content-Type");
|
|
4386
|
+
if (request.body != null) {
|
|
4387
|
+
request.body.cancel();
|
|
4388
|
+
}
|
|
4046
4389
|
return duplexAccessed && !hasContentType;
|
|
4047
4390
|
});
|
|
4048
4391
|
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
|
|
@@ -4056,7 +4399,11 @@ const factory = (env) => {
|
|
|
4056
4399
|
if (method) {
|
|
4057
4400
|
return method.call(res);
|
|
4058
4401
|
}
|
|
4059
|
-
throw new AxiosError$1(
|
|
4402
|
+
throw new AxiosError$1(
|
|
4403
|
+
`Response type '${type}' is not supported`,
|
|
4404
|
+
AxiosError$1.ERR_NOT_SUPPORT,
|
|
4405
|
+
config
|
|
4406
|
+
);
|
|
4060
4407
|
});
|
|
4061
4408
|
});
|
|
4062
4409
|
})();
|
|
@@ -4101,17 +4448,80 @@ const factory = (env) => {
|
|
|
4101
4448
|
responseType,
|
|
4102
4449
|
headers,
|
|
4103
4450
|
withCredentials = "same-origin",
|
|
4104
|
-
fetchOptions
|
|
4451
|
+
fetchOptions,
|
|
4452
|
+
maxContentLength,
|
|
4453
|
+
maxBodyLength
|
|
4105
4454
|
} = resolveConfig(config);
|
|
4455
|
+
const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
|
|
4456
|
+
const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
4457
|
+
const own2 = (key) => utils$1.hasOwnProp(config, key) ? config[key] : void 0;
|
|
4106
4458
|
let _fetch = envFetch || fetch;
|
|
4107
4459
|
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
4108
|
-
let composedSignal = composeSignals(
|
|
4460
|
+
let composedSignal = composeSignals(
|
|
4461
|
+
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
4462
|
+
timeout
|
|
4463
|
+
);
|
|
4109
4464
|
let request = null;
|
|
4110
4465
|
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
4111
4466
|
composedSignal.unsubscribe();
|
|
4112
4467
|
});
|
|
4113
4468
|
let requestContentLength;
|
|
4114
4469
|
try {
|
|
4470
|
+
let auth = void 0;
|
|
4471
|
+
const configAuth = own2("auth");
|
|
4472
|
+
if (configAuth) {
|
|
4473
|
+
const username = configAuth.username || "";
|
|
4474
|
+
const password = configAuth.password || "";
|
|
4475
|
+
auth = {
|
|
4476
|
+
username,
|
|
4477
|
+
password
|
|
4478
|
+
};
|
|
4479
|
+
}
|
|
4480
|
+
if (maybeWithAuthCredentials(url)) {
|
|
4481
|
+
const parsedURL = new URL(url, platform.origin);
|
|
4482
|
+
if (!auth && (parsedURL.username || parsedURL.password)) {
|
|
4483
|
+
const urlUsername = decodeURIComponentSafe(parsedURL.username);
|
|
4484
|
+
const urlPassword = decodeURIComponentSafe(parsedURL.password);
|
|
4485
|
+
auth = {
|
|
4486
|
+
username: urlUsername,
|
|
4487
|
+
password: urlPassword
|
|
4488
|
+
};
|
|
4489
|
+
}
|
|
4490
|
+
if (parsedURL.username || parsedURL.password) {
|
|
4491
|
+
parsedURL.username = "";
|
|
4492
|
+
parsedURL.password = "";
|
|
4493
|
+
url = parsedURL.href;
|
|
4494
|
+
}
|
|
4495
|
+
}
|
|
4496
|
+
if (auth) {
|
|
4497
|
+
headers.delete("authorization");
|
|
4498
|
+
headers.set(
|
|
4499
|
+
"Authorization",
|
|
4500
|
+
"Basic " + btoa(encodeUTF8((auth.username || "") + ":" + (auth.password || "")))
|
|
4501
|
+
);
|
|
4502
|
+
}
|
|
4503
|
+
if (hasMaxContentLength && typeof url === "string" && url.startsWith("data:")) {
|
|
4504
|
+
const estimated = estimateDataURLDecodedBytes(url);
|
|
4505
|
+
if (estimated > maxContentLength) {
|
|
4506
|
+
throw new AxiosError$1(
|
|
4507
|
+
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
4508
|
+
AxiosError$1.ERR_BAD_RESPONSE,
|
|
4509
|
+
config,
|
|
4510
|
+
request
|
|
4511
|
+
);
|
|
4512
|
+
}
|
|
4513
|
+
}
|
|
4514
|
+
if (hasMaxBodyLength && method !== "get" && method !== "head") {
|
|
4515
|
+
const outboundLength = await resolveBodyLength(headers, data);
|
|
4516
|
+
if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
|
|
4517
|
+
throw new AxiosError$1(
|
|
4518
|
+
"Request body larger than maxBodyLength limit",
|
|
4519
|
+
AxiosError$1.ERR_BAD_REQUEST,
|
|
4520
|
+
config,
|
|
4521
|
+
request
|
|
4522
|
+
);
|
|
4523
|
+
}
|
|
4524
|
+
}
|
|
4115
4525
|
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
|
4116
4526
|
let _request = new Request(url, {
|
|
4117
4527
|
method: "POST",
|
|
@@ -4134,19 +4544,37 @@ const factory = (env) => {
|
|
|
4134
4544
|
withCredentials = withCredentials ? "include" : "omit";
|
|
4135
4545
|
}
|
|
4136
4546
|
const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
|
|
4547
|
+
if (utils$1.isFormData(data)) {
|
|
4548
|
+
const contentType = headers.getContentType();
|
|
4549
|
+
if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) {
|
|
4550
|
+
headers.delete("content-type");
|
|
4551
|
+
}
|
|
4552
|
+
}
|
|
4553
|
+
headers.set("User-Agent", "axios/" + VERSION$1, false);
|
|
4137
4554
|
const resolvedOptions = {
|
|
4138
4555
|
...fetchOptions,
|
|
4139
4556
|
signal: composedSignal,
|
|
4140
4557
|
method: method.toUpperCase(),
|
|
4141
|
-
headers: headers.normalize()
|
|
4558
|
+
headers: toByteStringHeaderObject(headers.normalize()),
|
|
4142
4559
|
body: data,
|
|
4143
4560
|
duplex: "half",
|
|
4144
4561
|
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
4145
4562
|
};
|
|
4146
4563
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
4147
4564
|
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
|
|
4565
|
+
if (hasMaxContentLength) {
|
|
4566
|
+
const declaredLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
|
|
4567
|
+
if (declaredLength != null && declaredLength > maxContentLength) {
|
|
4568
|
+
throw new AxiosError$1(
|
|
4569
|
+
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
4570
|
+
AxiosError$1.ERR_BAD_RESPONSE,
|
|
4571
|
+
config,
|
|
4572
|
+
request
|
|
4573
|
+
);
|
|
4574
|
+
}
|
|
4575
|
+
}
|
|
4148
4576
|
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
4149
|
-
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
4577
|
+
if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) {
|
|
4150
4578
|
const options = {};
|
|
4151
4579
|
["status", "statusText", "headers"].forEach((prop) => {
|
|
4152
4580
|
options[prop] = response[prop];
|
|
@@ -4156,8 +4584,23 @@ const factory = (env) => {
|
|
|
4156
4584
|
responseContentLength,
|
|
4157
4585
|
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
4158
4586
|
) || [];
|
|
4587
|
+
let bytesRead = 0;
|
|
4588
|
+
const onChunkProgress = (loadedBytes) => {
|
|
4589
|
+
if (hasMaxContentLength) {
|
|
4590
|
+
bytesRead = loadedBytes;
|
|
4591
|
+
if (bytesRead > maxContentLength) {
|
|
4592
|
+
throw new AxiosError$1(
|
|
4593
|
+
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
4594
|
+
AxiosError$1.ERR_BAD_RESPONSE,
|
|
4595
|
+
config,
|
|
4596
|
+
request
|
|
4597
|
+
);
|
|
4598
|
+
}
|
|
4599
|
+
}
|
|
4600
|
+
onProgress && onProgress(loadedBytes);
|
|
4601
|
+
};
|
|
4159
4602
|
response = new Response(
|
|
4160
|
-
trackStream(response.body, DEFAULT_CHUNK_SIZE,
|
|
4603
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
|
|
4161
4604
|
flush && flush();
|
|
4162
4605
|
unsubscribe && unsubscribe();
|
|
4163
4606
|
}),
|
|
@@ -4165,7 +4608,30 @@ const factory = (env) => {
|
|
|
4165
4608
|
);
|
|
4166
4609
|
}
|
|
4167
4610
|
responseType = responseType || "text";
|
|
4168
|
-
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](
|
|
4611
|
+
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](
|
|
4612
|
+
response,
|
|
4613
|
+
config
|
|
4614
|
+
);
|
|
4615
|
+
if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
|
|
4616
|
+
let materializedSize;
|
|
4617
|
+
if (responseData != null) {
|
|
4618
|
+
if (typeof responseData.byteLength === "number") {
|
|
4619
|
+
materializedSize = responseData.byteLength;
|
|
4620
|
+
} else if (typeof responseData.size === "number") {
|
|
4621
|
+
materializedSize = responseData.size;
|
|
4622
|
+
} else if (typeof responseData === "string") {
|
|
4623
|
+
materializedSize = typeof TextEncoder === "function" ? new TextEncoder().encode(responseData).byteLength : responseData.length;
|
|
4624
|
+
}
|
|
4625
|
+
}
|
|
4626
|
+
if (typeof materializedSize === "number" && materializedSize > maxContentLength) {
|
|
4627
|
+
throw new AxiosError$1(
|
|
4628
|
+
"maxContentLength size of " + maxContentLength + " exceeded",
|
|
4629
|
+
AxiosError$1.ERR_BAD_RESPONSE,
|
|
4630
|
+
config,
|
|
4631
|
+
request
|
|
4632
|
+
);
|
|
4633
|
+
}
|
|
4634
|
+
}
|
|
4169
4635
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
4170
4636
|
return await new Promise((resolve, reject) => {
|
|
4171
4637
|
settle(resolve, reject, {
|
|
@@ -4179,9 +4645,22 @@ const factory = (env) => {
|
|
|
4179
4645
|
});
|
|
4180
4646
|
} catch (err) {
|
|
4181
4647
|
unsubscribe && unsubscribe();
|
|
4648
|
+
if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError$1) {
|
|
4649
|
+
const canceledError = composedSignal.reason;
|
|
4650
|
+
canceledError.config = config;
|
|
4651
|
+
request && (canceledError.request = request);
|
|
4652
|
+
err !== canceledError && (canceledError.cause = err);
|
|
4653
|
+
throw canceledError;
|
|
4654
|
+
}
|
|
4182
4655
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
4183
4656
|
throw Object.assign(
|
|
4184
|
-
new AxiosError$1(
|
|
4657
|
+
new AxiosError$1(
|
|
4658
|
+
"Network Error",
|
|
4659
|
+
AxiosError$1.ERR_NETWORK,
|
|
4660
|
+
config,
|
|
4661
|
+
request,
|
|
4662
|
+
err && err.response
|
|
4663
|
+
),
|
|
4185
4664
|
{
|
|
4186
4665
|
cause: err.cause || err
|
|
4187
4666
|
}
|
|
@@ -4195,11 +4674,7 @@ const seedCache = /* @__PURE__ */ new Map();
|
|
|
4195
4674
|
const getFetch = (config) => {
|
|
4196
4675
|
let env = config && config.env || {};
|
|
4197
4676
|
const { fetch: fetch2, Request, Response } = env;
|
|
4198
|
-
const seeds = [
|
|
4199
|
-
Request,
|
|
4200
|
-
Response,
|
|
4201
|
-
fetch2
|
|
4202
|
-
];
|
|
4677
|
+
const seeds = [Request, Response, fetch2];
|
|
4203
4678
|
let len = seeds.length, i = len, seed, target, map = seedCache;
|
|
4204
4679
|
while (i--) {
|
|
4205
4680
|
seed = seeds[i];
|
|
@@ -4220,10 +4695,10 @@ const knownAdapters = {
|
|
|
4220
4695
|
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
4221
4696
|
if (fn) {
|
|
4222
4697
|
try {
|
|
4223
|
-
Object.defineProperty(fn, "name", { value });
|
|
4698
|
+
Object.defineProperty(fn, "name", { __proto__: null, value });
|
|
4224
4699
|
} catch (e2) {
|
|
4225
4700
|
}
|
|
4226
|
-
Object.defineProperty(fn, "adapterName", { value });
|
|
4701
|
+
Object.defineProperty(fn, "adapterName", { __proto__: null, value });
|
|
4227
4702
|
}
|
|
4228
4703
|
});
|
|
4229
4704
|
const renderReason = (reason) => `- ${reason}`;
|
|
@@ -4284,39 +4759,44 @@ function throwIfCancellationRequested(config) {
|
|
|
4284
4759
|
function dispatchRequest(config) {
|
|
4285
4760
|
throwIfCancellationRequested(config);
|
|
4286
4761
|
config.headers = AxiosHeaders$1.from(config.headers);
|
|
4287
|
-
config.data = transformData.call(
|
|
4288
|
-
config,
|
|
4289
|
-
config.transformRequest
|
|
4290
|
-
);
|
|
4762
|
+
config.data = transformData.call(config, config.transformRequest);
|
|
4291
4763
|
if (["post", "put", "patch"].indexOf(config.method) !== -1) {
|
|
4292
4764
|
config.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
4293
4765
|
}
|
|
4294
4766
|
const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
|
|
4295
|
-
return adapter(config).then(
|
|
4296
|
-
|
|
4297
|
-
response.data = transformData.call(
|
|
4298
|
-
config,
|
|
4299
|
-
config.transformResponse,
|
|
4300
|
-
response
|
|
4301
|
-
);
|
|
4302
|
-
response.headers = AxiosHeaders$1.from(response.headers);
|
|
4303
|
-
return response;
|
|
4304
|
-
}, function onAdapterRejection(reason) {
|
|
4305
|
-
if (!isCancel$1(reason)) {
|
|
4767
|
+
return adapter(config).then(
|
|
4768
|
+
function onAdapterResolution(response) {
|
|
4306
4769
|
throwIfCancellationRequested(config);
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4770
|
+
config.response = response;
|
|
4771
|
+
try {
|
|
4772
|
+
response.data = transformData.call(config, config.transformResponse, response);
|
|
4773
|
+
} finally {
|
|
4774
|
+
delete config.response;
|
|
4775
|
+
}
|
|
4776
|
+
response.headers = AxiosHeaders$1.from(response.headers);
|
|
4777
|
+
return response;
|
|
4778
|
+
},
|
|
4779
|
+
function onAdapterRejection(reason) {
|
|
4780
|
+
if (!isCancel$1(reason)) {
|
|
4781
|
+
throwIfCancellationRequested(config);
|
|
4782
|
+
if (reason && reason.response) {
|
|
4783
|
+
config.response = reason.response;
|
|
4784
|
+
try {
|
|
4785
|
+
reason.response.data = transformData.call(
|
|
4786
|
+
config,
|
|
4787
|
+
config.transformResponse,
|
|
4788
|
+
reason.response
|
|
4789
|
+
);
|
|
4790
|
+
} finally {
|
|
4791
|
+
delete config.response;
|
|
4792
|
+
}
|
|
4793
|
+
reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
|
|
4794
|
+
}
|
|
4314
4795
|
}
|
|
4796
|
+
return Promise.reject(reason);
|
|
4315
4797
|
}
|
|
4316
|
-
|
|
4317
|
-
});
|
|
4798
|
+
);
|
|
4318
4799
|
}
|
|
4319
|
-
const VERSION$1 = "1.13.5";
|
|
4320
4800
|
const validators$1 = {};
|
|
4321
4801
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
4322
4802
|
validators$1[type] = function validator2(thing) {
|
|
@@ -4361,12 +4841,15 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
4361
4841
|
let i = keys.length;
|
|
4362
4842
|
while (i-- > 0) {
|
|
4363
4843
|
const opt = keys[i];
|
|
4364
|
-
const validator2 = schema[opt];
|
|
4844
|
+
const validator2 = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : void 0;
|
|
4365
4845
|
if (validator2) {
|
|
4366
4846
|
const value = options[opt];
|
|
4367
4847
|
const result = value === void 0 || validator2(value, opt, options);
|
|
4368
4848
|
if (result !== true) {
|
|
4369
|
-
throw new AxiosError$1(
|
|
4849
|
+
throw new AxiosError$1(
|
|
4850
|
+
"option " + opt + " must be " + result,
|
|
4851
|
+
AxiosError$1.ERR_BAD_OPTION_VALUE
|
|
4852
|
+
);
|
|
4370
4853
|
}
|
|
4371
4854
|
continue;
|
|
4372
4855
|
}
|
|
@@ -4403,12 +4886,23 @@ let Axios$1 = class Axios {
|
|
|
4403
4886
|
if (err instanceof Error) {
|
|
4404
4887
|
let dummy = {};
|
|
4405
4888
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
4406
|
-
const stack =
|
|
4889
|
+
const stack = (() => {
|
|
4890
|
+
if (!dummy.stack) {
|
|
4891
|
+
return "";
|
|
4892
|
+
}
|
|
4893
|
+
const firstNewlineIndex = dummy.stack.indexOf("\n");
|
|
4894
|
+
return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
|
|
4895
|
+
})();
|
|
4407
4896
|
try {
|
|
4408
4897
|
if (!err.stack) {
|
|
4409
4898
|
err.stack = stack;
|
|
4410
|
-
} else if (stack
|
|
4411
|
-
|
|
4899
|
+
} else if (stack) {
|
|
4900
|
+
const firstNewlineIndex = stack.indexOf("\n");
|
|
4901
|
+
const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
|
|
4902
|
+
const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
|
|
4903
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
4904
|
+
err.stack += "\n" + stack;
|
|
4905
|
+
}
|
|
4412
4906
|
}
|
|
4413
4907
|
} catch (e2) {
|
|
4414
4908
|
}
|
|
@@ -4426,12 +4920,17 @@ let Axios$1 = class Axios {
|
|
|
4426
4920
|
config = mergeConfig$1(this.defaults, config);
|
|
4427
4921
|
const { transitional: transitional2, paramsSerializer, headers } = config;
|
|
4428
4922
|
if (transitional2 !== void 0) {
|
|
4429
|
-
validator.assertOptions(
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4923
|
+
validator.assertOptions(
|
|
4924
|
+
transitional2,
|
|
4925
|
+
{
|
|
4926
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
4927
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
4928
|
+
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
4929
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
4930
|
+
advertiseZstdAcceptEncoding: validators.transitional(validators.boolean)
|
|
4931
|
+
},
|
|
4932
|
+
false
|
|
4933
|
+
);
|
|
4435
4934
|
}
|
|
4436
4935
|
if (paramsSerializer != null) {
|
|
4437
4936
|
if (utils$1.isFunction(paramsSerializer)) {
|
|
@@ -4439,10 +4938,14 @@ let Axios$1 = class Axios {
|
|
|
4439
4938
|
serialize: paramsSerializer
|
|
4440
4939
|
};
|
|
4441
4940
|
} else {
|
|
4442
|
-
validator.assertOptions(
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4941
|
+
validator.assertOptions(
|
|
4942
|
+
paramsSerializer,
|
|
4943
|
+
{
|
|
4944
|
+
encode: validators.function,
|
|
4945
|
+
serialize: validators.function
|
|
4946
|
+
},
|
|
4947
|
+
true
|
|
4948
|
+
);
|
|
4446
4949
|
}
|
|
4447
4950
|
}
|
|
4448
4951
|
if (config.allowAbsoluteUrls !== void 0) ;
|
|
@@ -4451,21 +4954,19 @@ let Axios$1 = class Axios {
|
|
|
4451
4954
|
} else {
|
|
4452
4955
|
config.allowAbsoluteUrls = true;
|
|
4453
4956
|
}
|
|
4454
|
-
validator.assertOptions(
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
headers[config.method]
|
|
4462
|
-
);
|
|
4463
|
-
headers && utils$1.forEach(
|
|
4464
|
-
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
4465
|
-
(method) => {
|
|
4466
|
-
delete headers[method];
|
|
4467
|
-
}
|
|
4957
|
+
validator.assertOptions(
|
|
4958
|
+
config,
|
|
4959
|
+
{
|
|
4960
|
+
baseUrl: validators.spelling("baseURL"),
|
|
4961
|
+
withXsrfToken: validators.spelling("withXSRFToken")
|
|
4962
|
+
},
|
|
4963
|
+
true
|
|
4468
4964
|
);
|
|
4965
|
+
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
4966
|
+
let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
|
|
4967
|
+
headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
|
|
4968
|
+
delete headers[method];
|
|
4969
|
+
});
|
|
4469
4970
|
config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
|
|
4470
4971
|
const requestInterceptorChain = [];
|
|
4471
4972
|
let synchronousRequestInterceptors = true;
|
|
@@ -4532,28 +5033,34 @@ let Axios$1 = class Axios {
|
|
|
4532
5033
|
};
|
|
4533
5034
|
utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
4534
5035
|
Axios$1.prototype[method] = function(url, config) {
|
|
4535
|
-
return this.request(
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
5036
|
+
return this.request(
|
|
5037
|
+
mergeConfig$1(config || {}, {
|
|
5038
|
+
method,
|
|
5039
|
+
url,
|
|
5040
|
+
data: (config || {}).data
|
|
5041
|
+
})
|
|
5042
|
+
);
|
|
4540
5043
|
};
|
|
4541
5044
|
});
|
|
4542
|
-
utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
5045
|
+
utils$1.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method) {
|
|
4543
5046
|
function generateHTTPMethod(isForm) {
|
|
4544
5047
|
return function httpMethod(url, data, config) {
|
|
4545
|
-
return this.request(
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
5048
|
+
return this.request(
|
|
5049
|
+
mergeConfig$1(config || {}, {
|
|
5050
|
+
method,
|
|
5051
|
+
headers: isForm ? {
|
|
5052
|
+
"Content-Type": "multipart/form-data"
|
|
5053
|
+
} : {},
|
|
5054
|
+
url,
|
|
5055
|
+
data
|
|
5056
|
+
})
|
|
5057
|
+
);
|
|
4553
5058
|
};
|
|
4554
5059
|
}
|
|
4555
5060
|
Axios$1.prototype[method] = generateHTTPMethod();
|
|
4556
|
-
|
|
5061
|
+
if (method !== "query") {
|
|
5062
|
+
Axios$1.prototype[method + "Form"] = generateHTTPMethod(true);
|
|
5063
|
+
}
|
|
4557
5064
|
});
|
|
4558
5065
|
let CancelToken$1 = class CancelToken {
|
|
4559
5066
|
constructor(executor) {
|
|
@@ -4737,7 +5244,7 @@ function createInstance(defaultConfig) {
|
|
|
4737
5244
|
const instance = bind(Axios$1.prototype.request, context);
|
|
4738
5245
|
utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
|
|
4739
5246
|
utils$1.extend(instance, context, null, { allOwnKeys: true });
|
|
4740
|
-
instance.create = function
|
|
5247
|
+
instance.create = function create2(instanceConfig) {
|
|
4741
5248
|
return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
|
|
4742
5249
|
};
|
|
4743
5250
|
return instance;
|
|
@@ -4778,7 +5285,8 @@ const {
|
|
|
4778
5285
|
HttpStatusCode,
|
|
4779
5286
|
formToJSON,
|
|
4780
5287
|
getAdapter,
|
|
4781
|
-
mergeConfig
|
|
5288
|
+
mergeConfig,
|
|
5289
|
+
create
|
|
4782
5290
|
} = axios;
|
|
4783
5291
|
var pt$1 = Object.defineProperty;
|
|
4784
5292
|
var ht$1 = (e2, t2, s) => t2 in e2 ? pt$1(e2, t2, { enumerable: true, configurable: true, writable: true, value: s }) : e2[t2] = s;
|
|
@@ -4849,12 +5357,12 @@ let A$1 = class A extends Error {
|
|
|
4849
5357
|
n2 && n2.data && (n2.data.error ? l = n2.data.error : n2.data.detail ? l = n2.data.detail : n2.data.title && (l = n2.data.title)), super(l), this.name = s || "RebillyError", this.response = n2, this.request = u, this.config = r2, this.status = n2 && n2.status ? n2.status : null, this.statusText = n2 && n2.statusText ? n2.statusText : null, this.details = n2 && n2.data && n2.data.details ? n2.data.details : null, this.invalidFields = n2 && n2.data && n2.data.invalidFields ? n2.data.invalidFields : null;
|
|
4850
5358
|
}
|
|
4851
5359
|
};
|
|
4852
|
-
let
|
|
5360
|
+
let Rt$1 = class Rt extends A$1 {
|
|
4853
5361
|
constructor(t2) {
|
|
4854
5362
|
super({ error: t2, name: "RebillyRequestError" });
|
|
4855
5363
|
}
|
|
4856
5364
|
};
|
|
4857
|
-
let
|
|
5365
|
+
let bt$1 = class bt extends A$1 {
|
|
4858
5366
|
constructor(t2) {
|
|
4859
5367
|
super({ error: t2, name: "RebillyValidationError" });
|
|
4860
5368
|
}
|
|
@@ -4891,8 +5399,8 @@ let Tt$1 = class Tt extends A$1 {
|
|
|
4891
5399
|
};
|
|
4892
5400
|
const y = {
|
|
4893
5401
|
RebillyError: A$1,
|
|
4894
|
-
RebillyRequestError:
|
|
4895
|
-
RebillyValidationError:
|
|
5402
|
+
RebillyRequestError: Rt$1,
|
|
5403
|
+
RebillyValidationError: bt$1,
|
|
4896
5404
|
RebillyNotFoundError: wt$1,
|
|
4897
5405
|
RebillyConflictError: kt$1,
|
|
4898
5406
|
RebillyForbiddenError: vt$1,
|
|
@@ -5263,7 +5771,7 @@ function O$1({ options: e2 }) {
|
|
|
5263
5771
|
}
|
|
5264
5772
|
function o2() {
|
|
5265
5773
|
const g = {
|
|
5266
|
-
"REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((m2) => m2).join("/")}@
|
|
5774
|
+
"REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((m2) => m2).join("/")}@98f5079`
|
|
5267
5775
|
};
|
|
5268
5776
|
return e2.apiKey && (g["REB-APIKEY"] = e2.apiKey), g;
|
|
5269
5777
|
}
|
|
@@ -5324,8 +5832,8 @@ function O$1({ options: e2 }) {
|
|
|
5324
5832
|
function ut2(c) {
|
|
5325
5833
|
N2(k$1.response, c);
|
|
5326
5834
|
}
|
|
5327
|
-
function
|
|
5328
|
-
const p = z2(m2), { id:
|
|
5835
|
+
function b({ request: c, isCollection: g, config: m2 }) {
|
|
5836
|
+
const p = z2(m2), { id: R, cancelToken: $t2 } = q$1.save();
|
|
5329
5837
|
p.cancelToken = $t2;
|
|
5330
5838
|
const W2 = (async function() {
|
|
5331
5839
|
try {
|
|
@@ -5338,10 +5846,10 @@ function O$1({ options: e2 }) {
|
|
|
5338
5846
|
} catch (d) {
|
|
5339
5847
|
return L2({ error: d });
|
|
5340
5848
|
} finally {
|
|
5341
|
-
q$1.deleteById(
|
|
5849
|
+
q$1.deleteById(R);
|
|
5342
5850
|
}
|
|
5343
5851
|
})();
|
|
5344
|
-
return W2.cancel = (d) => I$1.cancelById(
|
|
5852
|
+
return W2.cancel = (d) => I$1.cancelById(R, d), W2;
|
|
5345
5853
|
}
|
|
5346
5854
|
function ot2({ response: c, isCollection: g, config: m2 }) {
|
|
5347
5855
|
return g ? new yt$1(c, m2) : new tt$1(c, m2);
|
|
@@ -5375,13 +5883,13 @@ function O$1({ options: e2 }) {
|
|
|
5375
5883
|
return { ...lt2(c) };
|
|
5376
5884
|
}
|
|
5377
5885
|
function U2(c, g = {}) {
|
|
5378
|
-
return
|
|
5886
|
+
return b({
|
|
5379
5887
|
request: (m2) => t2.get(c, m2),
|
|
5380
5888
|
config: { params: g }
|
|
5381
5889
|
});
|
|
5382
5890
|
}
|
|
5383
5891
|
function ct2(c, g) {
|
|
5384
|
-
return
|
|
5892
|
+
return b({
|
|
5385
5893
|
request: (m2) => t2.get(c, m2),
|
|
5386
5894
|
config: { params: g },
|
|
5387
5895
|
isCollection: true
|
|
@@ -5389,31 +5897,31 @@ function O$1({ options: e2 }) {
|
|
|
5389
5897
|
}
|
|
5390
5898
|
function V2(c, g, m2 = {}) {
|
|
5391
5899
|
let p = {};
|
|
5392
|
-
return m2.authenticate === false && (p = { headers: l() }, delete p.headers.common["REB-APIKEY"], delete p.headers.common.Authorization), m2.params && (p.params = { ...m2.params }),
|
|
5393
|
-
request: (
|
|
5900
|
+
return m2.authenticate === false && (p = { headers: l() }, delete p.headers.common["REB-APIKEY"], delete p.headers.common.Authorization), m2.params && (p.params = { ...m2.params }), b({
|
|
5901
|
+
request: (R) => t2.post(c, g, R),
|
|
5394
5902
|
config: p
|
|
5395
5903
|
});
|
|
5396
5904
|
}
|
|
5397
5905
|
function J2(c, g, m2 = {}) {
|
|
5398
|
-
return
|
|
5906
|
+
return b({
|
|
5399
5907
|
request: (p) => t2.put(c, g, p),
|
|
5400
5908
|
config: { params: m2 }
|
|
5401
5909
|
});
|
|
5402
5910
|
}
|
|
5403
5911
|
function it2(c, g) {
|
|
5404
|
-
return
|
|
5912
|
+
return b({
|
|
5405
5913
|
request: (m2) => t2.patch(c, g, m2),
|
|
5406
5914
|
config: {}
|
|
5407
5915
|
});
|
|
5408
5916
|
}
|
|
5409
5917
|
function gt2(c) {
|
|
5410
|
-
return
|
|
5918
|
+
return b({
|
|
5411
5919
|
request: (g) => t2.delete(c, g),
|
|
5412
5920
|
config: {}
|
|
5413
5921
|
});
|
|
5414
5922
|
}
|
|
5415
5923
|
function at2(c, g) {
|
|
5416
|
-
return
|
|
5924
|
+
return b({
|
|
5417
5925
|
request: (m2) => t2.delete(c, m2),
|
|
5418
5926
|
config: { data: { ...g } }
|
|
5419
5927
|
});
|
|
@@ -5426,10 +5934,10 @@ function O$1({ options: e2 }) {
|
|
|
5426
5934
|
throw new y.RebillyConflictError({
|
|
5427
5935
|
message: "A resource already exists with this ID. Please use a different ID."
|
|
5428
5936
|
});
|
|
5429
|
-
} catch (
|
|
5430
|
-
if (
|
|
5937
|
+
} catch (R) {
|
|
5938
|
+
if (R.name === "RebillyNotFoundError")
|
|
5431
5939
|
return J2(c, m2, p);
|
|
5432
|
-
throw
|
|
5940
|
+
throw R;
|
|
5433
5941
|
}
|
|
5434
5942
|
}
|
|
5435
5943
|
async function ft2(c, g) {
|
|
@@ -7138,7 +7646,7 @@ function Ae$1({ apiHandler: e2 }) {
|
|
|
7138
7646
|
}
|
|
7139
7647
|
};
|
|
7140
7648
|
}
|
|
7141
|
-
function
|
|
7649
|
+
function Re$1({ apiHandler: e2 }) {
|
|
7142
7650
|
return {
|
|
7143
7651
|
/**
|
|
7144
7652
|
* @param { rebilly.GetJournalAccountCollectionRequest } request
|
|
@@ -7174,7 +7682,7 @@ function be({ apiHandler: e2 }) {
|
|
|
7174
7682
|
}
|
|
7175
7683
|
};
|
|
7176
7684
|
}
|
|
7177
|
-
function
|
|
7685
|
+
function be({ apiHandler: e2 }) {
|
|
7178
7686
|
return {
|
|
7179
7687
|
/**
|
|
7180
7688
|
* @param { rebilly.GetJournalEntryCollectionRequest } request
|
|
@@ -9005,7 +9513,7 @@ class $s {
|
|
|
9005
9513
|
apiHandler: t2
|
|
9006
9514
|
}), this.depositRequests = ne$1({ apiHandler: t2 }), this.depositStrategies = ue$1({ apiHandler: t2 }), this.digitalWallets = oe$1({ apiHandler: t2 }), this.disputes = le$1({ apiHandler: t2 }), this.emailDeliverySettings = ce$1({ apiHandler: t2 }), this.emailMessages = ie$1({ apiHandler: t2 }), this.emailNotifications = ge({ apiHandler: t2 }), this.events = ae$1({ apiHandler: t2 }), this.externalIdentifiers = me$1({ apiHandler: t2 }), this.externalServicesSettings = fe$1({
|
|
9007
9515
|
apiHandler: t2
|
|
9008
|
-
}), this.fees = $e$1({ apiHandler: t2 }), this.files = pe$1({ apiHandler: t2 }), this.gatewayAccounts = he$1({ apiHandler: t2 }), this.integrations = ye$1({ apiHandler: t2 }), this.invoices = Ae$1({ apiHandler: t2 }), this.journalAccounts =
|
|
9516
|
+
}), this.fees = $e$1({ apiHandler: t2 }), this.files = pe$1({ apiHandler: t2 }), this.gatewayAccounts = he$1({ apiHandler: t2 }), this.integrations = ye$1({ apiHandler: t2 }), this.invoices = Ae$1({ apiHandler: t2 }), this.journalAccounts = Re$1({ apiHandler: t2 }), this.journalEntries = be({ apiHandler: t2 }), this.journalRecords = we$1({ apiHandler: t2 }), this.kycDocuments = ke$1({ apiHandler: t2 }), this.kycRequests = ve$1({ apiHandler: t2 }), this.kycSettings = qe$1({ apiHandler: t2 }), this.lists = de$1({ apiHandler: t2 }), this.memberships = Te$1({ apiHandler: t2 }), this.orderCancellations = Ie$1({ apiHandler: t2 }), this.orderPauses = Se$1({ apiHandler: t2 }), this.orderReactivations = Ee$1({ apiHandler: t2 }), this.orders = xe$1({ apiHandler: t2 }), this.organizationExports = Pe$1({ apiHandler: t2 }), this.organizations = Ce$1({ apiHandler: t2 }), this.paymentCardsBankNames = De$1({ apiHandler: t2 }), this.paymentInstruments = je$1({ apiHandler: t2 }), this.paymentMethods = Me$1({ apiHandler: t2 }), this.paymentTokens = Oe$1({ apiHandler: t2 }), this.payoutRequestAllocations = Fe$1({
|
|
9009
9517
|
apiHandler: t2
|
|
9010
9518
|
}), this.payoutRequestBatches = Be$1({ apiHandler: t2 }), this.payoutRequests = Ke$1({ apiHandler: t2 }), this.payouts = Ne$1({ apiHandler: t2 }), this.plans = Le$1({ apiHandler: t2 }), this.previews = ze$1({ apiHandler: t2 }), this.products = Ue$1({ apiHandler: t2 }), this.profile = Ve$1({ apiHandler: t2 }), this.purchase = Je$1({ apiHandler: t2 }), this.quotes = We$1({ apiHandler: t2 }), this.resource = Ge$1({ apiHandler: t2 }), this.riskScoreRules = Ye$1({ apiHandler: t2 }), this.roles = Qe$1({ apiHandler: t2 }), this.search = Xe$1({ apiHandler: t2 }), this.segments = Ze$1({ apiHandler: t2 }), this.sendThroughAttribution = _e$1({ apiHandler: t2 }), this.serviceCredentials = He$1({ apiHandler: t2 }), this.shippingRates = ts({ apiHandler: t2 }), this.status = es({ apiHandler: t2 }), this.subscriptionCancellations = ss({
|
|
9011
9519
|
apiHandler: t2
|
|
@@ -9585,7 +10093,7 @@ function As({ apiHandler: e2 }) {
|
|
|
9585
10093
|
}
|
|
9586
10094
|
};
|
|
9587
10095
|
}
|
|
9588
|
-
function
|
|
10096
|
+
function Rs({ apiHandler: e2 }) {
|
|
9589
10097
|
return {
|
|
9590
10098
|
/**
|
|
9591
10099
|
* @returns { rebilly.GetSubscriptionSummaryMetricReportResponsePromise } response
|
|
@@ -9595,7 +10103,7 @@ function bs({ apiHandler: e2 }) {
|
|
|
9595
10103
|
}
|
|
9596
10104
|
};
|
|
9597
10105
|
}
|
|
9598
|
-
function
|
|
10106
|
+
function bs({ apiHandler: e2 }) {
|
|
9599
10107
|
return {
|
|
9600
10108
|
getActivityFeed({ eventTypes: t2 = null, limit: s = 1e3, offset: r2 = 0 }) {
|
|
9601
10109
|
const n2 = {
|
|
@@ -9635,8 +10143,8 @@ const w = {
|
|
|
9635
10143
|
DataExportsResource: hs,
|
|
9636
10144
|
HistogramsResource: ys,
|
|
9637
10145
|
ReportsResource: As,
|
|
9638
|
-
SubscriptionsResource:
|
|
9639
|
-
TimelinesResource:
|
|
10146
|
+
SubscriptionsResource: Rs,
|
|
10147
|
+
TimelinesResource: bs,
|
|
9640
10148
|
LocationResource: ws
|
|
9641
10149
|
};
|
|
9642
10150
|
class ks {
|