Upakovka v Electron.JS no po staroy sborke cherez .cjs

This commit is contained in:
Neyra
2026-02-10 19:19:41 +08:00
parent 8e9b7201ed
commit a1bba1d3d1
442 changed files with 19825 additions and 47462 deletions

9
node_modules/axios/README.md generated vendored
View File

@@ -615,6 +615,9 @@ These are the available config options for making requests. Only the `url` is re
// throw ETIMEDOUT error instead of generic ECONNABORTED on request timeouts
clarifyTimeoutError: false,
// use the legacy interceptor request/response ordering
legacyInterceptorReqResOrdering: true, // default
},
env: {
@@ -1065,7 +1068,7 @@ cancel();
### URLSearchParams
By default, axios serializes JavaScript objects to `JSON`. To send data in the [`application/x-www-form-urlencoded` format](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) instead, you can use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API, which is [supported](http://www.caniuse.com/#feat=urlsearchparams) in the vast majority of browsers,and [ Node](https://nodejs.org/api/url.html#url_class_urlsearchparams) starting with v10 (released in 2018).
By default, axios serializes JavaScript objects to `JSON`. To send data in the [`application/x-www-form-urlencoded`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) format instead, you can use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API, which is [supported](http://www.caniuse.com/#feat=urlsearchparams) in the vast majority of browsers, and [Node](https://nodejs.org/api/url.html#url_class_urlsearchparams) starting with v10 (released in 2018).
```js
const params = new URLSearchParams({ foo: "bar" });
@@ -1184,7 +1187,7 @@ const FormData = require("form-data");
const form = new FormData();
form.append("my_field", "my value");
form.append("my_buffer", new Buffer(10));
form.append("my_buffer", Buffer.alloc(10));
form.append("my_file", fs.createReadStream("/foo/bar.jpg"));
axios.post("https://example.com", form);
@@ -1225,7 +1228,7 @@ var FormData = require("form-data");
axios
.post(
"https://httpbin.org/post",
{ x: 1, buf: new Buffer(10) },
{ x: 1, buf: Buffer.alloc(10) },
{
headers: {
"Content-Type": "multipart/form-data",

1452
node_modules/axios/dist/axios.js generated vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
/*! Axios v1.13.4 Copyright (c) 2026 Matt Zabriskie and contributors */
/*! Axios v1.13.5 Copyright (c) 2026 Matt Zabriskie and contributors */
'use strict';
/**
@@ -16,30 +16,30 @@ function bind(fn, thisArg) {
// utils is a library of generic helper functions non-specific to axios
const {toString} = Object.prototype;
const {getPrototypeOf} = Object;
const {iterator, toStringTag} = Symbol;
const { toString } = Object.prototype;
const { getPrototypeOf } = Object;
const { iterator, toStringTag } = Symbol;
const kindOf = (cache => thing => {
const str = toString.call(thing);
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
const kindOf = ((cache) => (thing) => {
const str = toString.call(thing);
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
})(Object.create(null));
const kindOfTest = (type) => {
type = type.toLowerCase();
return (thing) => kindOf(thing) === type
return (thing) => kindOf(thing) === type;
};
const typeOfTest = type => thing => typeof thing === type;
const typeOfTest = (type) => (thing) => typeof thing === type;
/**
* Determine if a value is an Array
* Determine if a value is a non-null object
*
* @param {Object} val The value to test
*
* @returns {boolean} True if value is an Array, otherwise false
*/
const {isArray} = Array;
const { isArray } = Array;
/**
* Determine if a value is undefined
@@ -48,7 +48,7 @@ const {isArray} = Array;
*
* @returns {boolean} True if the value is undefined, otherwise false
*/
const isUndefined = typeOfTest('undefined');
const isUndefined = typeOfTest("undefined");
/**
* Determine if a value is a Buffer
@@ -58,8 +58,14 @@ const isUndefined = typeOfTest('undefined');
* @returns {boolean} True if value is a Buffer, otherwise false
*/
function isBuffer(val) {
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
&& isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
return (
val !== null &&
!isUndefined(val) &&
val.constructor !== null &&
!isUndefined(val.constructor) &&
isFunction$1(val.constructor.isBuffer) &&
val.constructor.isBuffer(val)
);
}
/**
@@ -69,8 +75,7 @@ function isBuffer(val) {
*
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
*/
const isArrayBuffer = kindOfTest('ArrayBuffer');
const isArrayBuffer = kindOfTest("ArrayBuffer");
/**
* Determine if a value is a view on an ArrayBuffer
@@ -81,10 +86,10 @@ const isArrayBuffer = kindOfTest('ArrayBuffer');
*/
function isArrayBufferView(val) {
let result;
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
result = ArrayBuffer.isView(val);
} else {
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
result = val && val.buffer && isArrayBuffer(val.buffer);
}
return result;
}
@@ -96,7 +101,7 @@ function isArrayBufferView(val) {
*
* @returns {boolean} True if value is a String, otherwise false
*/
const isString = typeOfTest('string');
const isString = typeOfTest("string");
/**
* Determine if a value is a Function
@@ -104,7 +109,7 @@ const isString = typeOfTest('string');
* @param {*} val The value to test
* @returns {boolean} True if value is a Function, otherwise false
*/
const isFunction$1 = typeOfTest('function');
const isFunction$1 = typeOfTest("function");
/**
* Determine if a value is a Number
@@ -113,7 +118,7 @@ const isFunction$1 = typeOfTest('function');
*
* @returns {boolean} True if value is a Number, otherwise false
*/
const isNumber = typeOfTest('number');
const isNumber = typeOfTest("number");
/**
* Determine if a value is an Object
@@ -122,7 +127,7 @@ const isNumber = typeOfTest('number');
*
* @returns {boolean} True if value is an Object, otherwise false
*/
const isObject = (thing) => thing !== null && typeof thing === 'object';
const isObject = (thing) => thing !== null && typeof thing === "object";
/**
* Determine if a value is a Boolean
@@ -130,7 +135,7 @@ const isObject = (thing) => thing !== null && typeof thing === 'object';
* @param {*} thing The value to test
* @returns {boolean} True if value is a Boolean, otherwise false
*/
const isBoolean = thing => thing === true || thing === false;
const isBoolean = (thing) => thing === true || thing === false;
/**
* Determine if a value is a plain Object
@@ -140,12 +145,18 @@ const isBoolean = thing => thing === true || thing === false;
* @returns {boolean} True if value is a plain Object, otherwise false
*/
const isPlainObject = (val) => {
if (kindOf(val) !== 'object') {
if (kindOf(val) !== "object") {
return false;
}
const prototype = getPrototypeOf(val);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
return (
(prototype === null ||
prototype === Object.prototype ||
Object.getPrototypeOf(prototype) === null) &&
!(toStringTag in val) &&
!(iterator in val)
);
};
/**
@@ -162,7 +173,10 @@ const isEmptyObject = (val) => {
}
try {
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
return (
Object.keys(val).length === 0 &&
Object.getPrototypeOf(val) === Object.prototype
);
} catch (e) {
// Fallback for any other objects that might cause RangeError with Object.keys()
return false;
@@ -176,7 +190,7 @@ const isEmptyObject = (val) => {
*
* @returns {boolean} True if value is a Date, otherwise false
*/
const isDate = kindOfTest('Date');
const isDate = kindOfTest("Date");
/**
* Determine if a value is a File
@@ -185,7 +199,7 @@ const isDate = kindOfTest('Date');
*
* @returns {boolean} True if value is a File, otherwise false
*/
const isFile = kindOfTest('File');
const isFile = kindOfTest("File");
/**
* Determine if a value is a Blob
@@ -194,7 +208,7 @@ const isFile = kindOfTest('File');
*
* @returns {boolean} True if value is a Blob, otherwise false
*/
const isBlob = kindOfTest('Blob');
const isBlob = kindOfTest("Blob");
/**
* Determine if a value is a FileList
@@ -203,7 +217,7 @@ const isBlob = kindOfTest('Blob');
*
* @returns {boolean} True if value is a File, otherwise false
*/
const isFileList = kindOfTest('FileList');
const isFileList = kindOfTest("FileList");
/**
* Determine if a value is a Stream
@@ -223,15 +237,16 @@ const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
*/
const isFormData = (thing) => {
let kind;
return thing && (
(typeof FormData === 'function' && thing instanceof FormData) || (
isFunction$1(thing.append) && (
(kind = kindOf(thing)) === 'formdata' ||
// detect form-data instance
(kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
)
)
)
return (
thing &&
((typeof FormData === "function" && thing instanceof FormData) ||
(isFunction$1(thing.append) &&
((kind = kindOf(thing)) === "formdata" ||
// detect form-data instance
(kind === "object" &&
isFunction$1(thing.toString) &&
thing.toString() === "[object FormData]"))))
);
};
/**
@@ -241,9 +256,14 @@ const isFormData = (thing) => {
*
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
*/
const isURLSearchParams = kindOfTest('URLSearchParams');
const isURLSearchParams = kindOfTest("URLSearchParams");
const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
const [isReadableStream, isRequest, isResponse, isHeaders] = [
"ReadableStream",
"Request",
"Response",
"Headers",
].map(kindOfTest);
/**
* Trim excess whitespace off the beginning and end of a string
@@ -252,8 +272,8 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream',
*
* @returns {String} The String freed of excess whitespace
*/
const trim = (str) => str.trim ?
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
const trim = (str) =>
str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
/**
* Iterate over an Array or an Object invoking a function for each item.
@@ -271,9 +291,9 @@ const trim = (str) => str.trim ?
* @param {Boolean} [options.allOwnKeys = false]
* @returns {any}
*/
function forEach(obj, fn, {allOwnKeys = false} = {}) {
function forEach(obj, fn, { allOwnKeys = false } = {}) {
// Don't bother if no value provided
if (obj === null || typeof obj === 'undefined') {
if (obj === null || typeof obj === "undefined") {
return;
}
@@ -281,7 +301,7 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
let l;
// Force an array if not already something iterable
if (typeof obj !== 'object') {
if (typeof obj !== "object") {
/*eslint no-param-reassign:0*/
obj = [obj];
}
@@ -298,7 +318,9 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
}
// Iterate over object keys
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
const keys = allOwnKeys
? Object.getOwnPropertyNames(obj)
: Object.keys(obj);
const len = keys.length;
let key;
@@ -310,7 +332,7 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
}
function findKey(obj, key) {
if (isBuffer(obj)){
if (isBuffer(obj)) {
return null;
}
@@ -330,10 +352,15 @@ function findKey(obj, key) {
const _global = (() => {
/*eslint no-undef:0*/
if (typeof globalThis !== "undefined") return globalThis;
return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
return typeof self !== "undefined"
? self
: typeof window !== "undefined"
? window
: global;
})();
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
const isContextDefined = (context) =>
!isUndefined(context) && context !== _global;
/**
* Accepts varargs expecting each argument to be an object, then
@@ -354,10 +381,15 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
* @returns {Object} Result of all merge properties
*/
function merge(/* obj1, obj2, obj3, ... */) {
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
const result = {};
const assignValue = (val, key) => {
const targetKey = caseless && findKey(result, key) || key;
// Skip dangerous property names to prevent prototype pollution
if (key === "__proto__" || key === "constructor" || key === "prototype") {
return;
}
const targetKey = (caseless && findKey(result, key)) || key;
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
result[targetKey] = merge(result[targetKey], val);
} else if (isPlainObject(val)) {
@@ -386,24 +418,28 @@ function merge(/* obj1, obj2, obj3, ... */) {
* @param {Boolean} [options.allOwnKeys]
* @returns {Object} The resulting value of object a
*/
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
forEach(b, (val, key) => {
if (thisArg && isFunction$1(val)) {
Object.defineProperty(a, key, {
value: bind(val, thisArg),
writable: true,
enumerable: true,
configurable: true
});
} else {
Object.defineProperty(a, key, {
value: val,
writable: true,
enumerable: true,
configurable: true
});
}
}, {allOwnKeys});
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
forEach(
b,
(val, key) => {
if (thisArg && isFunction$1(val)) {
Object.defineProperty(a, key, {
value: bind(val, thisArg),
writable: true,
enumerable: true,
configurable: true,
});
} else {
Object.defineProperty(a, key, {
value: val,
writable: true,
enumerable: true,
configurable: true,
});
}
},
{ allOwnKeys },
);
return a;
};
@@ -415,7 +451,7 @@ const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
* @returns {string} content value without BOM
*/
const stripBOM = (content) => {
if (content.charCodeAt(0) === 0xFEFF) {
if (content.charCodeAt(0) === 0xfeff) {
content = content.slice(1);
}
return content;
@@ -431,15 +467,18 @@ const stripBOM = (content) => {
* @returns {void}
*/
const inherits = (constructor, superConstructor, props, descriptors) => {
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
Object.defineProperty(constructor.prototype, 'constructor', {
constructor.prototype = Object.create(
superConstructor.prototype,
descriptors,
);
Object.defineProperty(constructor.prototype, "constructor", {
value: constructor,
writable: true,
enumerable: false,
configurable: true
configurable: true,
});
Object.defineProperty(constructor, 'super', {
value: superConstructor.prototype
Object.defineProperty(constructor, "super", {
value: superConstructor.prototype,
});
props && Object.assign(constructor.prototype, props);
};
@@ -468,13 +507,20 @@ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
i = props.length;
while (i-- > 0) {
prop = props[i];
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
if (
(!propFilter || propFilter(prop, sourceObj, destObj)) &&
!merged[prop]
) {
destObj[prop] = sourceObj[prop];
merged[prop] = true;
}
}
sourceObj = filter !== false && getPrototypeOf(sourceObj);
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
} while (
sourceObj &&
(!filter || filter(sourceObj, destObj)) &&
sourceObj !== Object.prototype
);
return destObj;
};
@@ -498,7 +544,6 @@ const endsWith = (str, searchString, position) => {
return lastIndex !== -1 && lastIndex === position;
};
/**
* Returns new array from array like object or null if failed
*
@@ -527,12 +572,12 @@ const toArray = (thing) => {
* @returns {Array}
*/
// eslint-disable-next-line func-names
const isTypedArray = (TypedArray => {
const isTypedArray = ((TypedArray) => {
// eslint-disable-next-line func-names
return thing => {
return (thing) => {
return TypedArray && thing instanceof TypedArray;
};
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
/**
* For each entry in the object, call the function with the key and value.
@@ -575,18 +620,22 @@ const matchAll = (regExp, str) => {
};
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
const isHTMLForm = kindOfTest('HTMLFormElement');
const isHTMLForm = kindOfTest("HTMLFormElement");
const toCamelCase = str => {
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
function replacer(m, p1, p2) {
const toCamelCase = (str) => {
return str
.toLowerCase()
.replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
return p1.toUpperCase() + p2;
}
);
});
};
/* Creating a function that will check if an object has a property. */
const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
const hasOwnProperty = (
({ hasOwnProperty }) =>
(obj, prop) =>
hasOwnProperty.call(obj, prop)
)(Object.prototype);
/**
* Determine if a value is a RegExp object
@@ -595,7 +644,7 @@ const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call
*
* @returns {boolean} True if value is a RegExp object, otherwise false
*/
const isRegExp = kindOfTest('RegExp');
const isRegExp = kindOfTest("RegExp");
const reduceDescriptors = (obj, reducer) => {
const descriptors = Object.getOwnPropertyDescriptors(obj);
@@ -619,7 +668,10 @@ const reduceDescriptors = (obj, reducer) => {
const freezeMethods = (obj) => {
reduceDescriptors(obj, (descriptor, name) => {
// skip restricted props in strict mode
if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
if (
isFunction$1(obj) &&
["arguments", "caller", "callee"].indexOf(name) !== -1
) {
return false;
}
@@ -629,14 +681,14 @@ const freezeMethods = (obj) => {
descriptor.enumerable = false;
if ('writable' in descriptor) {
if ("writable" in descriptor) {
descriptor.writable = false;
return;
}
if (!descriptor.set) {
descriptor.set = () => {
throw Error('Can not rewrite read-only method \'' + name + '\'');
throw Error("Can not rewrite read-only method '" + name + "'");
};
}
});
@@ -646,12 +698,14 @@ const toObjectSet = (arrayOrString, delimiter) => {
const obj = {};
const define = (arr) => {
arr.forEach(value => {
arr.forEach((value) => {
obj[value] = true;
});
};
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
isArray(arrayOrString)
? define(arrayOrString)
: define(String(arrayOrString).split(delimiter));
return obj;
};
@@ -659,11 +713,11 @@ const toObjectSet = (arrayOrString, delimiter) => {
const noop = () => {};
const toFiniteNumber = (value, defaultValue) => {
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
return value != null && Number.isFinite((value = +value))
? value
: defaultValue;
};
/**
* If the thing is a FormData object, return true, otherwise return false.
*
@@ -672,14 +726,18 @@ const toFiniteNumber = (value, defaultValue) => {
* @returns {boolean}
*/
function isSpecCompliantForm(thing) {
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
return !!(
thing &&
isFunction$1(thing.append) &&
thing[toStringTag] === "FormData" &&
thing[iterator]
);
}
const toJSONObject = (obj) => {
const stack = new Array(10);
const visit = (source, i) => {
if (isObject(source)) {
if (stack.indexOf(source) >= 0) {
return;
@@ -690,7 +748,7 @@ const toJSONObject = (obj) => {
return source;
}
if(!('toJSON' in source)) {
if (!("toJSON" in source)) {
stack[i] = source;
const target = isArray(source) ? [] : {};
@@ -711,10 +769,13 @@ const toJSONObject = (obj) => {
return visit(obj, 0);
};
const isAsyncFn = kindOfTest('AsyncFunction');
const isAsyncFn = kindOfTest("AsyncFunction");
const isThenable = (thing) =>
thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
thing &&
(isObject(thing) || isFunction$1(thing)) &&
isFunction$1(thing.then) &&
isFunction$1(thing.catch);
// original code
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
@@ -724,32 +785,35 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
return setImmediate;
}
return postMessageSupported ? ((token, callbacks) => {
_global.addEventListener("message", ({source, data}) => {
if (source === _global && data === token) {
callbacks.length && callbacks.shift()();
}
}, false);
return postMessageSupported
? ((token, callbacks) => {
_global.addEventListener(
"message",
({ source, data }) => {
if (source === _global && data === token) {
callbacks.length && callbacks.shift()();
}
},
false,
);
return (cb) => {
callbacks.push(cb);
_global.postMessage(token, "*");
}
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
})(
typeof setImmediate === 'function',
isFunction$1(_global.postMessage)
);
return (cb) => {
callbacks.push(cb);
_global.postMessage(token, "*");
};
})(`axios@${Math.random()}`, [])
: (cb) => setTimeout(cb);
})(typeof setImmediate === "function", isFunction$1(_global.postMessage));
const asap = typeof queueMicrotask !== 'undefined' ?
queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
const asap =
typeof queueMicrotask !== "undefined"
? queueMicrotask.bind(_global)
: (typeof process !== "undefined" && process.nextTick) || _setImmediate;
// *********************
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
var utils$1 = {
isArray,
isArrayBuffer,
@@ -807,7 +871,7 @@ var utils$1 = {
isThenable,
setImmediate: _setImmediate,
asap,
isIterable
isIterable,
};
class AxiosError extends Error {
@@ -1283,7 +1347,8 @@ var InterceptorManager$1 = InterceptorManager;
var transitionalDefaults = {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
clarifyTimeoutError: false,
legacyInterceptorReqResOrdering: true
};
var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
@@ -2263,6 +2328,10 @@ function isAbsoluteURL(url) {
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
// by any combination of letters, digits, plus, period, or hyphen.
if (typeof url !== 'string') {
return false;
}
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
}
@@ -2298,7 +2367,8 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
return requestedURL;
}
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
const headersToObject = (thing) =>
thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
/**
* Config-specific merge-function which creates a new config-object
@@ -2387,14 +2457,27 @@ function mergeConfig(config1, config2) {
socketPath: defaultToConfig2,
responseEncoding: defaultToConfig2,
validateStatus: mergeDirectKeys,
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
headers: (a, b, prop) =>
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
};
utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
const merge = mergeMap[prop] || mergeDeepProperties;
const configValue = merge(config1[prop], config2[prop], prop);
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
});
utils$1.forEach(
Object.keys({ ...config1, ...config2 }),
function computeConfigValue(prop) {
if (
prop === "__proto__" ||
prop === "constructor" ||
prop === "prototype"
)
return;
const merge = utils$1.hasOwnProp(mergeMap, prop)
? mergeMap[prop]
: mergeDeepProperties;
const configValue = merge(config1[prop], config2[prop], prop);
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) ||
(config[prop] = configValue);
},
);
return config;
}
@@ -3012,14 +3095,14 @@ const factory = (env) => {
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
throw Object.assign(
new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request, err && err.response),
{
cause: err.cause || err
}
)
}
throw AxiosError$1.from(err, err && err.code, config, request);
throw AxiosError$1.from(err, err && err.code, config, request, err && err.response);
}
}
};
@@ -3244,7 +3327,7 @@ function dispatchRequest(config) {
});
}
const VERSION = "1.13.4";
const VERSION = "1.13.5";
const validators$1 = {};
@@ -3412,7 +3495,8 @@ class Axios {
validator.assertOptions(transitional, {
silentJSONParsing: validators.transitional(validators.boolean),
forcedJSONParsing: validators.transitional(validators.boolean),
clarifyTimeoutError: validators.transitional(validators.boolean)
clarifyTimeoutError: validators.transitional(validators.boolean),
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
}, false);
}
@@ -3469,7 +3553,14 @@ class Axios {
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
const transitional = config.transitional || transitionalDefaults;
const legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering;
if (legacyInterceptorReqResOrdering) {
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
} else {
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
}
});
const responseInterceptorChain = [];

File diff suppressed because one or more lines are too long

363
node_modules/axios/dist/esm/axios.js generated vendored
View File

@@ -1,4 +1,4 @@
/*! Axios v1.13.4 Copyright (c) 2026 Matt Zabriskie and contributors */
/*! Axios v1.13.5 Copyright (c) 2026 Matt Zabriskie and contributors */
/**
* Create a bound version of a function with a specified `this` context
*
@@ -14,30 +14,30 @@ function bind(fn, thisArg) {
// utils is a library of generic helper functions non-specific to axios
const {toString} = Object.prototype;
const {getPrototypeOf} = Object;
const {iterator, toStringTag} = Symbol;
const { toString } = Object.prototype;
const { getPrototypeOf } = Object;
const { iterator, toStringTag } = Symbol;
const kindOf = (cache => thing => {
const str = toString.call(thing);
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
const kindOf = ((cache) => (thing) => {
const str = toString.call(thing);
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
})(Object.create(null));
const kindOfTest = (type) => {
type = type.toLowerCase();
return (thing) => kindOf(thing) === type
return (thing) => kindOf(thing) === type;
};
const typeOfTest = type => thing => typeof thing === type;
const typeOfTest = (type) => (thing) => typeof thing === type;
/**
* Determine if a value is an Array
* Determine if a value is a non-null object
*
* @param {Object} val The value to test
*
* @returns {boolean} True if value is an Array, otherwise false
*/
const {isArray} = Array;
const { isArray } = Array;
/**
* Determine if a value is undefined
@@ -46,7 +46,7 @@ const {isArray} = Array;
*
* @returns {boolean} True if the value is undefined, otherwise false
*/
const isUndefined = typeOfTest('undefined');
const isUndefined = typeOfTest("undefined");
/**
* Determine if a value is a Buffer
@@ -56,8 +56,14 @@ const isUndefined = typeOfTest('undefined');
* @returns {boolean} True if value is a Buffer, otherwise false
*/
function isBuffer(val) {
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
&& isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
return (
val !== null &&
!isUndefined(val) &&
val.constructor !== null &&
!isUndefined(val.constructor) &&
isFunction$1(val.constructor.isBuffer) &&
val.constructor.isBuffer(val)
);
}
/**
@@ -67,8 +73,7 @@ function isBuffer(val) {
*
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
*/
const isArrayBuffer = kindOfTest('ArrayBuffer');
const isArrayBuffer = kindOfTest("ArrayBuffer");
/**
* Determine if a value is a view on an ArrayBuffer
@@ -79,10 +84,10 @@ const isArrayBuffer = kindOfTest('ArrayBuffer');
*/
function isArrayBufferView(val) {
let result;
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
result = ArrayBuffer.isView(val);
} else {
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
result = val && val.buffer && isArrayBuffer(val.buffer);
}
return result;
}
@@ -94,7 +99,7 @@ function isArrayBufferView(val) {
*
* @returns {boolean} True if value is a String, otherwise false
*/
const isString = typeOfTest('string');
const isString = typeOfTest("string");
/**
* Determine if a value is a Function
@@ -102,7 +107,7 @@ const isString = typeOfTest('string');
* @param {*} val The value to test
* @returns {boolean} True if value is a Function, otherwise false
*/
const isFunction$1 = typeOfTest('function');
const isFunction$1 = typeOfTest("function");
/**
* Determine if a value is a Number
@@ -111,7 +116,7 @@ const isFunction$1 = typeOfTest('function');
*
* @returns {boolean} True if value is a Number, otherwise false
*/
const isNumber = typeOfTest('number');
const isNumber = typeOfTest("number");
/**
* Determine if a value is an Object
@@ -120,7 +125,7 @@ const isNumber = typeOfTest('number');
*
* @returns {boolean} True if value is an Object, otherwise false
*/
const isObject = (thing) => thing !== null && typeof thing === 'object';
const isObject = (thing) => thing !== null && typeof thing === "object";
/**
* Determine if a value is a Boolean
@@ -128,7 +133,7 @@ const isObject = (thing) => thing !== null && typeof thing === 'object';
* @param {*} thing The value to test
* @returns {boolean} True if value is a Boolean, otherwise false
*/
const isBoolean = thing => thing === true || thing === false;
const isBoolean = (thing) => thing === true || thing === false;
/**
* Determine if a value is a plain Object
@@ -138,12 +143,18 @@ const isBoolean = thing => thing === true || thing === false;
* @returns {boolean} True if value is a plain Object, otherwise false
*/
const isPlainObject = (val) => {
if (kindOf(val) !== 'object') {
if (kindOf(val) !== "object") {
return false;
}
const prototype = getPrototypeOf(val);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
return (
(prototype === null ||
prototype === Object.prototype ||
Object.getPrototypeOf(prototype) === null) &&
!(toStringTag in val) &&
!(iterator in val)
);
};
/**
@@ -160,7 +171,10 @@ const isEmptyObject = (val) => {
}
try {
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
return (
Object.keys(val).length === 0 &&
Object.getPrototypeOf(val) === Object.prototype
);
} catch (e) {
// Fallback for any other objects that might cause RangeError with Object.keys()
return false;
@@ -174,7 +188,7 @@ const isEmptyObject = (val) => {
*
* @returns {boolean} True if value is a Date, otherwise false
*/
const isDate = kindOfTest('Date');
const isDate = kindOfTest("Date");
/**
* Determine if a value is a File
@@ -183,7 +197,7 @@ const isDate = kindOfTest('Date');
*
* @returns {boolean} True if value is a File, otherwise false
*/
const isFile = kindOfTest('File');
const isFile = kindOfTest("File");
/**
* Determine if a value is a Blob
@@ -192,7 +206,7 @@ const isFile = kindOfTest('File');
*
* @returns {boolean} True if value is a Blob, otherwise false
*/
const isBlob = kindOfTest('Blob');
const isBlob = kindOfTest("Blob");
/**
* Determine if a value is a FileList
@@ -201,7 +215,7 @@ const isBlob = kindOfTest('Blob');
*
* @returns {boolean} True if value is a File, otherwise false
*/
const isFileList = kindOfTest('FileList');
const isFileList = kindOfTest("FileList");
/**
* Determine if a value is a Stream
@@ -221,15 +235,16 @@ const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
*/
const isFormData = (thing) => {
let kind;
return thing && (
(typeof FormData === 'function' && thing instanceof FormData) || (
isFunction$1(thing.append) && (
(kind = kindOf(thing)) === 'formdata' ||
// detect form-data instance
(kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
)
)
)
return (
thing &&
((typeof FormData === "function" && thing instanceof FormData) ||
(isFunction$1(thing.append) &&
((kind = kindOf(thing)) === "formdata" ||
// detect form-data instance
(kind === "object" &&
isFunction$1(thing.toString) &&
thing.toString() === "[object FormData]"))))
);
};
/**
@@ -239,9 +254,14 @@ const isFormData = (thing) => {
*
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
*/
const isURLSearchParams = kindOfTest('URLSearchParams');
const isURLSearchParams = kindOfTest("URLSearchParams");
const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
const [isReadableStream, isRequest, isResponse, isHeaders] = [
"ReadableStream",
"Request",
"Response",
"Headers",
].map(kindOfTest);
/**
* Trim excess whitespace off the beginning and end of a string
@@ -250,8 +270,8 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream',
*
* @returns {String} The String freed of excess whitespace
*/
const trim = (str) => str.trim ?
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
const trim = (str) =>
str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
/**
* Iterate over an Array or an Object invoking a function for each item.
@@ -269,9 +289,9 @@ const trim = (str) => str.trim ?
* @param {Boolean} [options.allOwnKeys = false]
* @returns {any}
*/
function forEach(obj, fn, {allOwnKeys = false} = {}) {
function forEach(obj, fn, { allOwnKeys = false } = {}) {
// Don't bother if no value provided
if (obj === null || typeof obj === 'undefined') {
if (obj === null || typeof obj === "undefined") {
return;
}
@@ -279,7 +299,7 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
let l;
// Force an array if not already something iterable
if (typeof obj !== 'object') {
if (typeof obj !== "object") {
/*eslint no-param-reassign:0*/
obj = [obj];
}
@@ -296,7 +316,9 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
}
// Iterate over object keys
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
const keys = allOwnKeys
? Object.getOwnPropertyNames(obj)
: Object.keys(obj);
const len = keys.length;
let key;
@@ -308,7 +330,7 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
}
function findKey(obj, key) {
if (isBuffer(obj)){
if (isBuffer(obj)) {
return null;
}
@@ -328,10 +350,15 @@ function findKey(obj, key) {
const _global = (() => {
/*eslint no-undef:0*/
if (typeof globalThis !== "undefined") return globalThis;
return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
return typeof self !== "undefined"
? self
: typeof window !== "undefined"
? window
: global;
})();
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
const isContextDefined = (context) =>
!isUndefined(context) && context !== _global;
/**
* Accepts varargs expecting each argument to be an object, then
@@ -352,10 +379,15 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
* @returns {Object} Result of all merge properties
*/
function merge(/* obj1, obj2, obj3, ... */) {
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
const result = {};
const assignValue = (val, key) => {
const targetKey = caseless && findKey(result, key) || key;
// Skip dangerous property names to prevent prototype pollution
if (key === "__proto__" || key === "constructor" || key === "prototype") {
return;
}
const targetKey = (caseless && findKey(result, key)) || key;
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
result[targetKey] = merge(result[targetKey], val);
} else if (isPlainObject(val)) {
@@ -384,24 +416,28 @@ function merge(/* obj1, obj2, obj3, ... */) {
* @param {Boolean} [options.allOwnKeys]
* @returns {Object} The resulting value of object a
*/
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
forEach(b, (val, key) => {
if (thisArg && isFunction$1(val)) {
Object.defineProperty(a, key, {
value: bind(val, thisArg),
writable: true,
enumerable: true,
configurable: true
});
} else {
Object.defineProperty(a, key, {
value: val,
writable: true,
enumerable: true,
configurable: true
});
}
}, {allOwnKeys});
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
forEach(
b,
(val, key) => {
if (thisArg && isFunction$1(val)) {
Object.defineProperty(a, key, {
value: bind(val, thisArg),
writable: true,
enumerable: true,
configurable: true,
});
} else {
Object.defineProperty(a, key, {
value: val,
writable: true,
enumerable: true,
configurable: true,
});
}
},
{ allOwnKeys },
);
return a;
};
@@ -413,7 +449,7 @@ const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
* @returns {string} content value without BOM
*/
const stripBOM = (content) => {
if (content.charCodeAt(0) === 0xFEFF) {
if (content.charCodeAt(0) === 0xfeff) {
content = content.slice(1);
}
return content;
@@ -429,15 +465,18 @@ const stripBOM = (content) => {
* @returns {void}
*/
const inherits = (constructor, superConstructor, props, descriptors) => {
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
Object.defineProperty(constructor.prototype, 'constructor', {
constructor.prototype = Object.create(
superConstructor.prototype,
descriptors,
);
Object.defineProperty(constructor.prototype, "constructor", {
value: constructor,
writable: true,
enumerable: false,
configurable: true
configurable: true,
});
Object.defineProperty(constructor, 'super', {
value: superConstructor.prototype
Object.defineProperty(constructor, "super", {
value: superConstructor.prototype,
});
props && Object.assign(constructor.prototype, props);
};
@@ -466,13 +505,20 @@ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
i = props.length;
while (i-- > 0) {
prop = props[i];
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
if (
(!propFilter || propFilter(prop, sourceObj, destObj)) &&
!merged[prop]
) {
destObj[prop] = sourceObj[prop];
merged[prop] = true;
}
}
sourceObj = filter !== false && getPrototypeOf(sourceObj);
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
} while (
sourceObj &&
(!filter || filter(sourceObj, destObj)) &&
sourceObj !== Object.prototype
);
return destObj;
};
@@ -496,7 +542,6 @@ const endsWith = (str, searchString, position) => {
return lastIndex !== -1 && lastIndex === position;
};
/**
* Returns new array from array like object or null if failed
*
@@ -525,12 +570,12 @@ const toArray = (thing) => {
* @returns {Array}
*/
// eslint-disable-next-line func-names
const isTypedArray = (TypedArray => {
const isTypedArray = ((TypedArray) => {
// eslint-disable-next-line func-names
return thing => {
return (thing) => {
return TypedArray && thing instanceof TypedArray;
};
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
/**
* For each entry in the object, call the function with the key and value.
@@ -573,18 +618,22 @@ const matchAll = (regExp, str) => {
};
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
const isHTMLForm = kindOfTest('HTMLFormElement');
const isHTMLForm = kindOfTest("HTMLFormElement");
const toCamelCase = str => {
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
function replacer(m, p1, p2) {
const toCamelCase = (str) => {
return str
.toLowerCase()
.replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
return p1.toUpperCase() + p2;
}
);
});
};
/* Creating a function that will check if an object has a property. */
const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
const hasOwnProperty = (
({ hasOwnProperty }) =>
(obj, prop) =>
hasOwnProperty.call(obj, prop)
)(Object.prototype);
/**
* Determine if a value is a RegExp object
@@ -593,7 +642,7 @@ const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call
*
* @returns {boolean} True if value is a RegExp object, otherwise false
*/
const isRegExp = kindOfTest('RegExp');
const isRegExp = kindOfTest("RegExp");
const reduceDescriptors = (obj, reducer) => {
const descriptors = Object.getOwnPropertyDescriptors(obj);
@@ -617,7 +666,10 @@ const reduceDescriptors = (obj, reducer) => {
const freezeMethods = (obj) => {
reduceDescriptors(obj, (descriptor, name) => {
// skip restricted props in strict mode
if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
if (
isFunction$1(obj) &&
["arguments", "caller", "callee"].indexOf(name) !== -1
) {
return false;
}
@@ -627,14 +679,14 @@ const freezeMethods = (obj) => {
descriptor.enumerable = false;
if ('writable' in descriptor) {
if ("writable" in descriptor) {
descriptor.writable = false;
return;
}
if (!descriptor.set) {
descriptor.set = () => {
throw Error('Can not rewrite read-only method \'' + name + '\'');
throw Error("Can not rewrite read-only method '" + name + "'");
};
}
});
@@ -644,12 +696,14 @@ const toObjectSet = (arrayOrString, delimiter) => {
const obj = {};
const define = (arr) => {
arr.forEach(value => {
arr.forEach((value) => {
obj[value] = true;
});
};
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
isArray(arrayOrString)
? define(arrayOrString)
: define(String(arrayOrString).split(delimiter));
return obj;
};
@@ -657,11 +711,11 @@ const toObjectSet = (arrayOrString, delimiter) => {
const noop = () => {};
const toFiniteNumber = (value, defaultValue) => {
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
return value != null && Number.isFinite((value = +value))
? value
: defaultValue;
};
/**
* If the thing is a FormData object, return true, otherwise return false.
*
@@ -670,14 +724,18 @@ const toFiniteNumber = (value, defaultValue) => {
* @returns {boolean}
*/
function isSpecCompliantForm(thing) {
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
return !!(
thing &&
isFunction$1(thing.append) &&
thing[toStringTag] === "FormData" &&
thing[iterator]
);
}
const toJSONObject = (obj) => {
const stack = new Array(10);
const visit = (source, i) => {
if (isObject(source)) {
if (stack.indexOf(source) >= 0) {
return;
@@ -688,7 +746,7 @@ const toJSONObject = (obj) => {
return source;
}
if(!('toJSON' in source)) {
if (!("toJSON" in source)) {
stack[i] = source;
const target = isArray(source) ? [] : {};
@@ -709,10 +767,13 @@ const toJSONObject = (obj) => {
return visit(obj, 0);
};
const isAsyncFn = kindOfTest('AsyncFunction');
const isAsyncFn = kindOfTest("AsyncFunction");
const isThenable = (thing) =>
thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
thing &&
(isObject(thing) || isFunction$1(thing)) &&
isFunction$1(thing.then) &&
isFunction$1(thing.catch);
// original code
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
@@ -722,32 +783,35 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
return setImmediate;
}
return postMessageSupported ? ((token, callbacks) => {
_global.addEventListener("message", ({source, data}) => {
if (source === _global && data === token) {
callbacks.length && callbacks.shift()();
}
}, false);
return postMessageSupported
? ((token, callbacks) => {
_global.addEventListener(
"message",
({ source, data }) => {
if (source === _global && data === token) {
callbacks.length && callbacks.shift()();
}
},
false,
);
return (cb) => {
callbacks.push(cb);
_global.postMessage(token, "*");
}
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
})(
typeof setImmediate === 'function',
isFunction$1(_global.postMessage)
);
return (cb) => {
callbacks.push(cb);
_global.postMessage(token, "*");
};
})(`axios@${Math.random()}`, [])
: (cb) => setTimeout(cb);
})(typeof setImmediate === "function", isFunction$1(_global.postMessage));
const asap = typeof queueMicrotask !== 'undefined' ?
queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
const asap =
typeof queueMicrotask !== "undefined"
? queueMicrotask.bind(_global)
: (typeof process !== "undefined" && process.nextTick) || _setImmediate;
// *********************
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
const utils$1 = {
isArray,
isArrayBuffer,
@@ -805,7 +869,7 @@ const utils$1 = {
isThenable,
setImmediate: _setImmediate,
asap,
isIterable
isIterable,
};
class AxiosError$1 extends Error {
@@ -1281,7 +1345,8 @@ const InterceptorManager$1 = InterceptorManager;
const transitionalDefaults = {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
clarifyTimeoutError: false,
legacyInterceptorReqResOrdering: true
};
const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
@@ -2261,6 +2326,10 @@ function isAbsoluteURL(url) {
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
// by any combination of letters, digits, plus, period, or hyphen.
if (typeof url !== 'string') {
return false;
}
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
}
@@ -2296,7 +2365,8 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
return requestedURL;
}
const headersToObject = (thing) => thing instanceof AxiosHeaders$2 ? { ...thing } : thing;
const headersToObject = (thing) =>
thing instanceof AxiosHeaders$2 ? { ...thing } : thing;
/**
* Config-specific merge-function which creates a new config-object
@@ -2385,14 +2455,27 @@ function mergeConfig$1(config1, config2) {
socketPath: defaultToConfig2,
responseEncoding: defaultToConfig2,
validateStatus: mergeDirectKeys,
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
headers: (a, b, prop) =>
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
};
utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
const merge = mergeMap[prop] || mergeDeepProperties;
const configValue = merge(config1[prop], config2[prop], prop);
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
});
utils$1.forEach(
Object.keys({ ...config1, ...config2 }),
function computeConfigValue(prop) {
if (
prop === "__proto__" ||
prop === "constructor" ||
prop === "prototype"
)
return;
const merge = utils$1.hasOwnProp(mergeMap, prop)
? mergeMap[prop]
: mergeDeepProperties;
const configValue = merge(config1[prop], config2[prop], prop);
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) ||
(config[prop] = configValue);
},
);
return config;
}
@@ -3010,14 +3093,14 @@ const factory = (env) => {
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
throw Object.assign(
new AxiosError$2('Network Error', AxiosError$2.ERR_NETWORK, config, request),
new AxiosError$2('Network Error', AxiosError$2.ERR_NETWORK, config, request, err && err.response),
{
cause: err.cause || err
}
)
}
throw AxiosError$2.from(err, err && err.code, config, request);
throw AxiosError$2.from(err, err && err.code, config, request, err && err.response);
}
}
};
@@ -3242,7 +3325,7 @@ function dispatchRequest(config) {
});
}
const VERSION$1 = "1.13.4";
const VERSION$1 = "1.13.5";
const validators$1 = {};
@@ -3410,7 +3493,8 @@ class Axios$1 {
validator.assertOptions(transitional, {
silentJSONParsing: validators.transitional(validators.boolean),
forcedJSONParsing: validators.transitional(validators.boolean),
clarifyTimeoutError: validators.transitional(validators.boolean)
clarifyTimeoutError: validators.transitional(validators.boolean),
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
}, false);
}
@@ -3467,7 +3551,14 @@ class Axios$1 {
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
const transitional = config.transitional || transitionalDefaults;
const legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering;
if (legacyInterceptorReqResOrdering) {
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
} else {
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
}
});
const responseInterceptorChain = [];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
/*! Axios v1.13.4 Copyright (c) 2026 Matt Zabriskie and contributors */
/*! Axios v1.13.5 Copyright (c) 2026 Matt Zabriskie and contributors */
'use strict';
const FormData$1 = require('form-data');
@@ -43,30 +43,30 @@ function bind(fn, thisArg) {
// utils is a library of generic helper functions non-specific to axios
const {toString} = Object.prototype;
const {getPrototypeOf} = Object;
const {iterator, toStringTag} = Symbol;
const { toString } = Object.prototype;
const { getPrototypeOf } = Object;
const { iterator, toStringTag } = Symbol;
const kindOf = (cache => thing => {
const str = toString.call(thing);
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
const kindOf = ((cache) => (thing) => {
const str = toString.call(thing);
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
})(Object.create(null));
const kindOfTest = (type) => {
type = type.toLowerCase();
return (thing) => kindOf(thing) === type
return (thing) => kindOf(thing) === type;
};
const typeOfTest = type => thing => typeof thing === type;
const typeOfTest = (type) => (thing) => typeof thing === type;
/**
* Determine if a value is an Array
* Determine if a value is a non-null object
*
* @param {Object} val The value to test
*
* @returns {boolean} True if value is an Array, otherwise false
*/
const {isArray} = Array;
const { isArray } = Array;
/**
* Determine if a value is undefined
@@ -75,7 +75,7 @@ const {isArray} = Array;
*
* @returns {boolean} True if the value is undefined, otherwise false
*/
const isUndefined = typeOfTest('undefined');
const isUndefined = typeOfTest("undefined");
/**
* Determine if a value is a Buffer
@@ -85,8 +85,14 @@ const isUndefined = typeOfTest('undefined');
* @returns {boolean} True if value is a Buffer, otherwise false
*/
function isBuffer(val) {
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
&& isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
return (
val !== null &&
!isUndefined(val) &&
val.constructor !== null &&
!isUndefined(val.constructor) &&
isFunction$1(val.constructor.isBuffer) &&
val.constructor.isBuffer(val)
);
}
/**
@@ -96,8 +102,7 @@ function isBuffer(val) {
*
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
*/
const isArrayBuffer = kindOfTest('ArrayBuffer');
const isArrayBuffer = kindOfTest("ArrayBuffer");
/**
* Determine if a value is a view on an ArrayBuffer
@@ -108,10 +113,10 @@ const isArrayBuffer = kindOfTest('ArrayBuffer');
*/
function isArrayBufferView(val) {
let result;
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
result = ArrayBuffer.isView(val);
} else {
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
result = val && val.buffer && isArrayBuffer(val.buffer);
}
return result;
}
@@ -123,7 +128,7 @@ function isArrayBufferView(val) {
*
* @returns {boolean} True if value is a String, otherwise false
*/
const isString = typeOfTest('string');
const isString = typeOfTest("string");
/**
* Determine if a value is a Function
@@ -131,7 +136,7 @@ const isString = typeOfTest('string');
* @param {*} val The value to test
* @returns {boolean} True if value is a Function, otherwise false
*/
const isFunction$1 = typeOfTest('function');
const isFunction$1 = typeOfTest("function");
/**
* Determine if a value is a Number
@@ -140,7 +145,7 @@ const isFunction$1 = typeOfTest('function');
*
* @returns {boolean} True if value is a Number, otherwise false
*/
const isNumber = typeOfTest('number');
const isNumber = typeOfTest("number");
/**
* Determine if a value is an Object
@@ -149,7 +154,7 @@ const isNumber = typeOfTest('number');
*
* @returns {boolean} True if value is an Object, otherwise false
*/
const isObject = (thing) => thing !== null && typeof thing === 'object';
const isObject = (thing) => thing !== null && typeof thing === "object";
/**
* Determine if a value is a Boolean
@@ -157,7 +162,7 @@ const isObject = (thing) => thing !== null && typeof thing === 'object';
* @param {*} thing The value to test
* @returns {boolean} True if value is a Boolean, otherwise false
*/
const isBoolean = thing => thing === true || thing === false;
const isBoolean = (thing) => thing === true || thing === false;
/**
* Determine if a value is a plain Object
@@ -167,12 +172,18 @@ const isBoolean = thing => thing === true || thing === false;
* @returns {boolean} True if value is a plain Object, otherwise false
*/
const isPlainObject = (val) => {
if (kindOf(val) !== 'object') {
if (kindOf(val) !== "object") {
return false;
}
const prototype = getPrototypeOf(val);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
return (
(prototype === null ||
prototype === Object.prototype ||
Object.getPrototypeOf(prototype) === null) &&
!(toStringTag in val) &&
!(iterator in val)
);
};
/**
@@ -189,7 +200,10 @@ const isEmptyObject = (val) => {
}
try {
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
return (
Object.keys(val).length === 0 &&
Object.getPrototypeOf(val) === Object.prototype
);
} catch (e) {
// Fallback for any other objects that might cause RangeError with Object.keys()
return false;
@@ -203,7 +217,7 @@ const isEmptyObject = (val) => {
*
* @returns {boolean} True if value is a Date, otherwise false
*/
const isDate = kindOfTest('Date');
const isDate = kindOfTest("Date");
/**
* Determine if a value is a File
@@ -212,7 +226,7 @@ const isDate = kindOfTest('Date');
*
* @returns {boolean} True if value is a File, otherwise false
*/
const isFile = kindOfTest('File');
const isFile = kindOfTest("File");
/**
* Determine if a value is a Blob
@@ -221,7 +235,7 @@ const isFile = kindOfTest('File');
*
* @returns {boolean} True if value is a Blob, otherwise false
*/
const isBlob = kindOfTest('Blob');
const isBlob = kindOfTest("Blob");
/**
* Determine if a value is a FileList
@@ -230,7 +244,7 @@ const isBlob = kindOfTest('Blob');
*
* @returns {boolean} True if value is a File, otherwise false
*/
const isFileList = kindOfTest('FileList');
const isFileList = kindOfTest("FileList");
/**
* Determine if a value is a Stream
@@ -250,15 +264,16 @@ const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
*/
const isFormData = (thing) => {
let kind;
return thing && (
(typeof FormData === 'function' && thing instanceof FormData) || (
isFunction$1(thing.append) && (
(kind = kindOf(thing)) === 'formdata' ||
// detect form-data instance
(kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
)
)
)
return (
thing &&
((typeof FormData === "function" && thing instanceof FormData) ||
(isFunction$1(thing.append) &&
((kind = kindOf(thing)) === "formdata" ||
// detect form-data instance
(kind === "object" &&
isFunction$1(thing.toString) &&
thing.toString() === "[object FormData]"))))
);
};
/**
@@ -268,9 +283,14 @@ const isFormData = (thing) => {
*
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
*/
const isURLSearchParams = kindOfTest('URLSearchParams');
const isURLSearchParams = kindOfTest("URLSearchParams");
const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
const [isReadableStream, isRequest, isResponse, isHeaders] = [
"ReadableStream",
"Request",
"Response",
"Headers",
].map(kindOfTest);
/**
* Trim excess whitespace off the beginning and end of a string
@@ -279,8 +299,8 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream',
*
* @returns {String} The String freed of excess whitespace
*/
const trim = (str) => str.trim ?
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
const trim = (str) =>
str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
/**
* Iterate over an Array or an Object invoking a function for each item.
@@ -298,9 +318,9 @@ const trim = (str) => str.trim ?
* @param {Boolean} [options.allOwnKeys = false]
* @returns {any}
*/
function forEach(obj, fn, {allOwnKeys = false} = {}) {
function forEach(obj, fn, { allOwnKeys = false } = {}) {
// Don't bother if no value provided
if (obj === null || typeof obj === 'undefined') {
if (obj === null || typeof obj === "undefined") {
return;
}
@@ -308,7 +328,7 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
let l;
// Force an array if not already something iterable
if (typeof obj !== 'object') {
if (typeof obj !== "object") {
/*eslint no-param-reassign:0*/
obj = [obj];
}
@@ -325,7 +345,9 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
}
// Iterate over object keys
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
const keys = allOwnKeys
? Object.getOwnPropertyNames(obj)
: Object.keys(obj);
const len = keys.length;
let key;
@@ -337,7 +359,7 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
}
function findKey(obj, key) {
if (isBuffer(obj)){
if (isBuffer(obj)) {
return null;
}
@@ -357,10 +379,15 @@ function findKey(obj, key) {
const _global = (() => {
/*eslint no-undef:0*/
if (typeof globalThis !== "undefined") return globalThis;
return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
return typeof self !== "undefined"
? self
: typeof window !== "undefined"
? window
: global;
})();
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
const isContextDefined = (context) =>
!isUndefined(context) && context !== _global;
/**
* Accepts varargs expecting each argument to be an object, then
@@ -381,10 +408,15 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
* @returns {Object} Result of all merge properties
*/
function merge(/* obj1, obj2, obj3, ... */) {
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
const result = {};
const assignValue = (val, key) => {
const targetKey = caseless && findKey(result, key) || key;
// Skip dangerous property names to prevent prototype pollution
if (key === "__proto__" || key === "constructor" || key === "prototype") {
return;
}
const targetKey = (caseless && findKey(result, key)) || key;
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
result[targetKey] = merge(result[targetKey], val);
} else if (isPlainObject(val)) {
@@ -413,24 +445,28 @@ function merge(/* obj1, obj2, obj3, ... */) {
* @param {Boolean} [options.allOwnKeys]
* @returns {Object} The resulting value of object a
*/
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
forEach(b, (val, key) => {
if (thisArg && isFunction$1(val)) {
Object.defineProperty(a, key, {
value: bind(val, thisArg),
writable: true,
enumerable: true,
configurable: true
});
} else {
Object.defineProperty(a, key, {
value: val,
writable: true,
enumerable: true,
configurable: true
});
}
}, {allOwnKeys});
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
forEach(
b,
(val, key) => {
if (thisArg && isFunction$1(val)) {
Object.defineProperty(a, key, {
value: bind(val, thisArg),
writable: true,
enumerable: true,
configurable: true,
});
} else {
Object.defineProperty(a, key, {
value: val,
writable: true,
enumerable: true,
configurable: true,
});
}
},
{ allOwnKeys },
);
return a;
};
@@ -442,7 +478,7 @@ const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
* @returns {string} content value without BOM
*/
const stripBOM = (content) => {
if (content.charCodeAt(0) === 0xFEFF) {
if (content.charCodeAt(0) === 0xfeff) {
content = content.slice(1);
}
return content;
@@ -458,15 +494,18 @@ const stripBOM = (content) => {
* @returns {void}
*/
const inherits = (constructor, superConstructor, props, descriptors) => {
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
Object.defineProperty(constructor.prototype, 'constructor', {
constructor.prototype = Object.create(
superConstructor.prototype,
descriptors,
);
Object.defineProperty(constructor.prototype, "constructor", {
value: constructor,
writable: true,
enumerable: false,
configurable: true
configurable: true,
});
Object.defineProperty(constructor, 'super', {
value: superConstructor.prototype
Object.defineProperty(constructor, "super", {
value: superConstructor.prototype,
});
props && Object.assign(constructor.prototype, props);
};
@@ -495,13 +534,20 @@ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
i = props.length;
while (i-- > 0) {
prop = props[i];
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
if (
(!propFilter || propFilter(prop, sourceObj, destObj)) &&
!merged[prop]
) {
destObj[prop] = sourceObj[prop];
merged[prop] = true;
}
}
sourceObj = filter !== false && getPrototypeOf(sourceObj);
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
} while (
sourceObj &&
(!filter || filter(sourceObj, destObj)) &&
sourceObj !== Object.prototype
);
return destObj;
};
@@ -525,7 +571,6 @@ const endsWith = (str, searchString, position) => {
return lastIndex !== -1 && lastIndex === position;
};
/**
* Returns new array from array like object or null if failed
*
@@ -554,12 +599,12 @@ const toArray = (thing) => {
* @returns {Array}
*/
// eslint-disable-next-line func-names
const isTypedArray = (TypedArray => {
const isTypedArray = ((TypedArray) => {
// eslint-disable-next-line func-names
return thing => {
return (thing) => {
return TypedArray && thing instanceof TypedArray;
};
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
/**
* For each entry in the object, call the function with the key and value.
@@ -602,18 +647,22 @@ const matchAll = (regExp, str) => {
};
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
const isHTMLForm = kindOfTest('HTMLFormElement');
const isHTMLForm = kindOfTest("HTMLFormElement");
const toCamelCase = str => {
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
function replacer(m, p1, p2) {
const toCamelCase = (str) => {
return str
.toLowerCase()
.replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
return p1.toUpperCase() + p2;
}
);
});
};
/* Creating a function that will check if an object has a property. */
const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
const hasOwnProperty = (
({ hasOwnProperty }) =>
(obj, prop) =>
hasOwnProperty.call(obj, prop)
)(Object.prototype);
/**
* Determine if a value is a RegExp object
@@ -622,7 +671,7 @@ const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call
*
* @returns {boolean} True if value is a RegExp object, otherwise false
*/
const isRegExp = kindOfTest('RegExp');
const isRegExp = kindOfTest("RegExp");
const reduceDescriptors = (obj, reducer) => {
const descriptors = Object.getOwnPropertyDescriptors(obj);
@@ -646,7 +695,10 @@ const reduceDescriptors = (obj, reducer) => {
const freezeMethods = (obj) => {
reduceDescriptors(obj, (descriptor, name) => {
// skip restricted props in strict mode
if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
if (
isFunction$1(obj) &&
["arguments", "caller", "callee"].indexOf(name) !== -1
) {
return false;
}
@@ -656,14 +708,14 @@ const freezeMethods = (obj) => {
descriptor.enumerable = false;
if ('writable' in descriptor) {
if ("writable" in descriptor) {
descriptor.writable = false;
return;
}
if (!descriptor.set) {
descriptor.set = () => {
throw Error('Can not rewrite read-only method \'' + name + '\'');
throw Error("Can not rewrite read-only method '" + name + "'");
};
}
});
@@ -673,12 +725,14 @@ const toObjectSet = (arrayOrString, delimiter) => {
const obj = {};
const define = (arr) => {
arr.forEach(value => {
arr.forEach((value) => {
obj[value] = true;
});
};
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
isArray(arrayOrString)
? define(arrayOrString)
: define(String(arrayOrString).split(delimiter));
return obj;
};
@@ -686,11 +740,11 @@ const toObjectSet = (arrayOrString, delimiter) => {
const noop = () => {};
const toFiniteNumber = (value, defaultValue) => {
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
return value != null && Number.isFinite((value = +value))
? value
: defaultValue;
};
/**
* If the thing is a FormData object, return true, otherwise return false.
*
@@ -699,14 +753,18 @@ const toFiniteNumber = (value, defaultValue) => {
* @returns {boolean}
*/
function isSpecCompliantForm(thing) {
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
return !!(
thing &&
isFunction$1(thing.append) &&
thing[toStringTag] === "FormData" &&
thing[iterator]
);
}
const toJSONObject = (obj) => {
const stack = new Array(10);
const visit = (source, i) => {
if (isObject(source)) {
if (stack.indexOf(source) >= 0) {
return;
@@ -717,7 +775,7 @@ const toJSONObject = (obj) => {
return source;
}
if(!('toJSON' in source)) {
if (!("toJSON" in source)) {
stack[i] = source;
const target = isArray(source) ? [] : {};
@@ -738,10 +796,13 @@ const toJSONObject = (obj) => {
return visit(obj, 0);
};
const isAsyncFn = kindOfTest('AsyncFunction');
const isAsyncFn = kindOfTest("AsyncFunction");
const isThenable = (thing) =>
thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
thing &&
(isObject(thing) || isFunction$1(thing)) &&
isFunction$1(thing.then) &&
isFunction$1(thing.catch);
// original code
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
@@ -751,32 +812,35 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
return setImmediate;
}
return postMessageSupported ? ((token, callbacks) => {
_global.addEventListener("message", ({source, data}) => {
if (source === _global && data === token) {
callbacks.length && callbacks.shift()();
}
}, false);
return postMessageSupported
? ((token, callbacks) => {
_global.addEventListener(
"message",
({ source, data }) => {
if (source === _global && data === token) {
callbacks.length && callbacks.shift()();
}
},
false,
);
return (cb) => {
callbacks.push(cb);
_global.postMessage(token, "*");
}
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
})(
typeof setImmediate === 'function',
isFunction$1(_global.postMessage)
);
return (cb) => {
callbacks.push(cb);
_global.postMessage(token, "*");
};
})(`axios@${Math.random()}`, [])
: (cb) => setTimeout(cb);
})(typeof setImmediate === "function", isFunction$1(_global.postMessage));
const asap = typeof queueMicrotask !== 'undefined' ?
queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
const asap =
typeof queueMicrotask !== "undefined"
? queueMicrotask.bind(_global)
: (typeof process !== "undefined" && process.nextTick) || _setImmediate;
// *********************
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
const utils$1 = {
isArray,
isArrayBuffer,
@@ -834,7 +898,7 @@ const utils$1 = {
isThenable,
setImmediate: _setImmediate,
asap,
isIterable
isIterable,
};
class AxiosError extends Error {
@@ -1307,7 +1371,8 @@ const InterceptorManager$1 = InterceptorManager;
const transitionalDefaults = {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
clarifyTimeoutError: false,
legacyInterceptorReqResOrdering: true
};
const URLSearchParams = url__default["default"].URLSearchParams;
@@ -2104,6 +2169,10 @@ function isAbsoluteURL(url) {
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
// by any combination of letters, digits, plus, period, or hyphen.
if (typeof url !== 'string') {
return false;
}
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
}
@@ -2139,7 +2208,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
return requestedURL;
}
const VERSION = "1.13.4";
const VERSION = "1.13.5";
function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -3636,7 +3705,8 @@ const cookies = platform.hasStandardBrowserEnv ?
remove() {}
};
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
const headersToObject = (thing) =>
thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
/**
* Config-specific merge-function which creates a new config-object
@@ -3725,14 +3795,27 @@ function mergeConfig(config1, config2) {
socketPath: defaultToConfig2,
responseEncoding: defaultToConfig2,
validateStatus: mergeDirectKeys,
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
headers: (a, b, prop) =>
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
};
utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
const merge = mergeMap[prop] || mergeDeepProperties;
const configValue = merge(config1[prop], config2[prop], prop);
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
});
utils$1.forEach(
Object.keys({ ...config1, ...config2 }),
function computeConfigValue(prop) {
if (
prop === "__proto__" ||
prop === "constructor" ||
prop === "prototype"
)
return;
const merge = utils$1.hasOwnProp(mergeMap, prop)
? mergeMap[prop]
: mergeDeepProperties;
const configValue = merge(config1[prop], config2[prop], prop);
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) ||
(config[prop] = configValue);
},
);
return config;
}
@@ -4350,14 +4433,14 @@ const factory = (env) => {
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
throw Object.assign(
new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request, err && err.response),
{
cause: err.cause || err
}
)
}
throw AxiosError$1.from(err, err && err.code, config, request);
throw AxiosError$1.from(err, err && err.code, config, request, err && err.response);
}
}
};
@@ -4748,7 +4831,8 @@ class Axios {
validator.assertOptions(transitional, {
silentJSONParsing: validators.transitional(validators.boolean),
forcedJSONParsing: validators.transitional(validators.boolean),
clarifyTimeoutError: validators.transitional(validators.boolean)
clarifyTimeoutError: validators.transitional(validators.boolean),
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
}, false);
}
@@ -4805,7 +4889,14 @@ class Axios {
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
const transitional = config.transitional || transitionalDefaults;
const legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering;
if (legacyInterceptorReqResOrdering) {
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
} else {
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
}
});
const responseInterceptorChain = [];

File diff suppressed because one or more lines are too long

1
node_modules/axios/index.d.cts generated vendored
View File

@@ -302,6 +302,7 @@ declare namespace axios {
silentJSONParsing?: boolean;
forcedJSONParsing?: boolean;
clarifyTimeoutError?: boolean;
legacyInterceptorReqResOrdering?: boolean;
}
interface GenericAbortSignal {

1
node_modules/axios/index.d.ts generated vendored
View File

@@ -332,6 +332,7 @@ export interface TransitionalOptions {
silentJSONParsing?: boolean;
forcedJSONParsing?: boolean;
clarifyTimeoutError?: boolean;
legacyInterceptorReqResOrdering?: boolean;
}
export interface GenericAbortSignal {

View File

@@ -247,14 +247,14 @@ const factory = (env) => {
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
throw Object.assign(
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request, err && err.response),
{
cause: err.cause || err
}
)
}
throw AxiosError.from(err, err && err.code, config, request);
throw AxiosError.from(err, err && err.code, config, request, err && err.response);
}
}
}

13
node_modules/axios/lib/core/Axios.js generated vendored
View File

@@ -8,6 +8,7 @@ import mergeConfig from './mergeConfig.js';
import buildFullPath from './buildFullPath.js';
import validator from '../helpers/validator.js';
import AxiosHeaders from './AxiosHeaders.js';
import transitionalDefaults from '../defaults/transitional.js';
const validators = validator.validators;
@@ -80,7 +81,8 @@ class Axios {
validator.assertOptions(transitional, {
silentJSONParsing: validators.transitional(validators.boolean),
forcedJSONParsing: validators.transitional(validators.boolean),
clarifyTimeoutError: validators.transitional(validators.boolean)
clarifyTimeoutError: validators.transitional(validators.boolean),
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
}, false);
}
@@ -139,7 +141,14 @@ class Axios {
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
const transitional = config.transitional || transitionalDefaults;
const legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering;
if (legacyInterceptorReqResOrdering) {
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
} else {
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
}
});
const responseInterceptorChain = [];

View File

@@ -1,9 +1,10 @@
'use strict';
"use strict";
import utils from '../utils.js';
import utils from "../utils.js";
import AxiosHeaders from "./AxiosHeaders.js";
const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
const headersToObject = (thing) =>
thing instanceof AxiosHeaders ? { ...thing } : thing;
/**
* Config-specific merge-function which creates a new config-object
@@ -92,14 +93,27 @@ export default function mergeConfig(config1, config2) {
socketPath: defaultToConfig2,
responseEncoding: defaultToConfig2,
validateStatus: mergeDirectKeys,
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
headers: (a, b, prop) =>
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
};
utils.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
const merge = mergeMap[prop] || mergeDeepProperties;
const configValue = merge(config1[prop], config2[prop], prop);
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
});
utils.forEach(
Object.keys({ ...config1, ...config2 }),
function computeConfigValue(prop) {
if (
prop === "__proto__" ||
prop === "constructor" ||
prop === "prototype"
)
return;
const merge = utils.hasOwnProp(mergeMap, prop)
? mergeMap[prop]
: mergeDeepProperties;
const configValue = merge(config1[prop], config2[prop], prop);
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) ||
(config[prop] = configValue);
},
);
return config;
}

View File

@@ -3,5 +3,6 @@
export default {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
clarifyTimeoutError: false,
legacyInterceptorReqResOrdering: true
};

2
node_modules/axios/lib/env/data.js generated vendored
View File

@@ -1 +1 @@
export const VERSION = "1.13.4";
export const VERSION = "1.13.5";

View File

@@ -11,5 +11,10 @@ export default function isAbsoluteURL(url) {
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
// by any combination of letters, digits, plus, period, or hyphen.
if (typeof url !== 'string') {
return false;
}
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
}

354
node_modules/axios/lib/utils.js generated vendored
View File

@@ -1,33 +1,33 @@
'use strict';
"use strict";
import bind from './helpers/bind.js';
import bind from "./helpers/bind.js";
// utils is a library of generic helper functions non-specific to axios
const {toString} = Object.prototype;
const {getPrototypeOf} = Object;
const {iterator, toStringTag} = Symbol;
const { toString } = Object.prototype;
const { getPrototypeOf } = Object;
const { iterator, toStringTag } = Symbol;
const kindOf = (cache => thing => {
const str = toString.call(thing);
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
const kindOf = ((cache) => (thing) => {
const str = toString.call(thing);
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
})(Object.create(null));
const kindOfTest = (type) => {
type = type.toLowerCase();
return (thing) => kindOf(thing) === type
}
return (thing) => kindOf(thing) === type;
};
const typeOfTest = type => thing => typeof thing === type;
const typeOfTest = (type) => (thing) => typeof thing === type;
/**
* Determine if a value is an Array
* Determine if a value is a non-null object
*
* @param {Object} val The value to test
*
* @returns {boolean} True if value is an Array, otherwise false
*/
const {isArray} = Array;
const { isArray } = Array;
/**
* Determine if a value is undefined
@@ -36,7 +36,7 @@ const {isArray} = Array;
*
* @returns {boolean} True if the value is undefined, otherwise false
*/
const isUndefined = typeOfTest('undefined');
const isUndefined = typeOfTest("undefined");
/**
* Determine if a value is a Buffer
@@ -46,8 +46,14 @@ const isUndefined = typeOfTest('undefined');
* @returns {boolean} True if value is a Buffer, otherwise false
*/
function isBuffer(val) {
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
&& isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
return (
val !== null &&
!isUndefined(val) &&
val.constructor !== null &&
!isUndefined(val.constructor) &&
isFunction(val.constructor.isBuffer) &&
val.constructor.isBuffer(val)
);
}
/**
@@ -57,8 +63,7 @@ function isBuffer(val) {
*
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
*/
const isArrayBuffer = kindOfTest('ArrayBuffer');
const isArrayBuffer = kindOfTest("ArrayBuffer");
/**
* Determine if a value is a view on an ArrayBuffer
@@ -69,10 +74,10 @@ const isArrayBuffer = kindOfTest('ArrayBuffer');
*/
function isArrayBufferView(val) {
let result;
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
result = ArrayBuffer.isView(val);
} else {
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
result = val && val.buffer && isArrayBuffer(val.buffer);
}
return result;
}
@@ -84,7 +89,7 @@ function isArrayBufferView(val) {
*
* @returns {boolean} True if value is a String, otherwise false
*/
const isString = typeOfTest('string');
const isString = typeOfTest("string");
/**
* Determine if a value is a Function
@@ -92,7 +97,7 @@ const isString = typeOfTest('string');
* @param {*} val The value to test
* @returns {boolean} True if value is a Function, otherwise false
*/
const isFunction = typeOfTest('function');
const isFunction = typeOfTest("function");
/**
* Determine if a value is a Number
@@ -101,7 +106,7 @@ const isFunction = typeOfTest('function');
*
* @returns {boolean} True if value is a Number, otherwise false
*/
const isNumber = typeOfTest('number');
const isNumber = typeOfTest("number");
/**
* Determine if a value is an Object
@@ -110,7 +115,7 @@ const isNumber = typeOfTest('number');
*
* @returns {boolean} True if value is an Object, otherwise false
*/
const isObject = (thing) => thing !== null && typeof thing === 'object';
const isObject = (thing) => thing !== null && typeof thing === "object";
/**
* Determine if a value is a Boolean
@@ -118,7 +123,7 @@ const isObject = (thing) => thing !== null && typeof thing === 'object';
* @param {*} thing The value to test
* @returns {boolean} True if value is a Boolean, otherwise false
*/
const isBoolean = thing => thing === true || thing === false;
const isBoolean = (thing) => thing === true || thing === false;
/**
* Determine if a value is a plain Object
@@ -128,13 +133,19 @@ const isBoolean = thing => thing === true || thing === false;
* @returns {boolean} True if value is a plain Object, otherwise false
*/
const isPlainObject = (val) => {
if (kindOf(val) !== 'object') {
if (kindOf(val) !== "object") {
return false;
}
const prototype = getPrototypeOf(val);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
}
return (
(prototype === null ||
prototype === Object.prototype ||
Object.getPrototypeOf(prototype) === null) &&
!(toStringTag in val) &&
!(iterator in val)
);
};
/**
* Determine if a value is an empty object (safely handles Buffers)
@@ -150,12 +161,15 @@ const isEmptyObject = (val) => {
}
try {
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
return (
Object.keys(val).length === 0 &&
Object.getPrototypeOf(val) === Object.prototype
);
} catch (e) {
// Fallback for any other objects that might cause RangeError with Object.keys()
return false;
}
}
};
/**
* Determine if a value is a Date
@@ -164,7 +178,7 @@ const isEmptyObject = (val) => {
*
* @returns {boolean} True if value is a Date, otherwise false
*/
const isDate = kindOfTest('Date');
const isDate = kindOfTest("Date");
/**
* Determine if a value is a File
@@ -173,7 +187,7 @@ const isDate = kindOfTest('Date');
*
* @returns {boolean} True if value is a File, otherwise false
*/
const isFile = kindOfTest('File');
const isFile = kindOfTest("File");
/**
* Determine if a value is a Blob
@@ -182,7 +196,7 @@ const isFile = kindOfTest('File');
*
* @returns {boolean} True if value is a Blob, otherwise false
*/
const isBlob = kindOfTest('Blob');
const isBlob = kindOfTest("Blob");
/**
* Determine if a value is a FileList
@@ -191,7 +205,7 @@ const isBlob = kindOfTest('Blob');
*
* @returns {boolean} True if value is a File, otherwise false
*/
const isFileList = kindOfTest('FileList');
const isFileList = kindOfTest("FileList");
/**
* Determine if a value is a Stream
@@ -211,16 +225,17 @@ const isStream = (val) => isObject(val) && isFunction(val.pipe);
*/
const isFormData = (thing) => {
let kind;
return thing && (
(typeof FormData === 'function' && thing instanceof FormData) || (
isFunction(thing.append) && (
(kind = kindOf(thing)) === 'formdata' ||
// detect form-data instance
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
)
)
)
}
return (
thing &&
((typeof FormData === "function" && thing instanceof FormData) ||
(isFunction(thing.append) &&
((kind = kindOf(thing)) === "formdata" ||
// detect form-data instance
(kind === "object" &&
isFunction(thing.toString) &&
thing.toString() === "[object FormData]"))))
);
};
/**
* Determine if a value is a URLSearchParams object
@@ -229,9 +244,14 @@ const isFormData = (thing) => {
*
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
*/
const isURLSearchParams = kindOfTest('URLSearchParams');
const isURLSearchParams = kindOfTest("URLSearchParams");
const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
const [isReadableStream, isRequest, isResponse, isHeaders] = [
"ReadableStream",
"Request",
"Response",
"Headers",
].map(kindOfTest);
/**
* Trim excess whitespace off the beginning and end of a string
@@ -240,8 +260,8 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream',
*
* @returns {String} The String freed of excess whitespace
*/
const trim = (str) => str.trim ?
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
const trim = (str) =>
str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
/**
* Iterate over an Array or an Object invoking a function for each item.
@@ -259,9 +279,9 @@ const trim = (str) => str.trim ?
* @param {Boolean} [options.allOwnKeys = false]
* @returns {any}
*/
function forEach(obj, fn, {allOwnKeys = false} = {}) {
function forEach(obj, fn, { allOwnKeys = false } = {}) {
// Don't bother if no value provided
if (obj === null || typeof obj === 'undefined') {
if (obj === null || typeof obj === "undefined") {
return;
}
@@ -269,7 +289,7 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
let l;
// Force an array if not already something iterable
if (typeof obj !== 'object') {
if (typeof obj !== "object") {
/*eslint no-param-reassign:0*/
obj = [obj];
}
@@ -286,7 +306,9 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
}
// Iterate over object keys
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
const keys = allOwnKeys
? Object.getOwnPropertyNames(obj)
: Object.keys(obj);
const len = keys.length;
let key;
@@ -298,7 +320,7 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
}
function findKey(obj, key) {
if (isBuffer(obj)){
if (isBuffer(obj)) {
return null;
}
@@ -318,10 +340,15 @@ function findKey(obj, key) {
const _global = (() => {
/*eslint no-undef:0*/
if (typeof globalThis !== "undefined") return globalThis;
return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
return typeof self !== "undefined"
? self
: typeof window !== "undefined"
? window
: global;
})();
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
const isContextDefined = (context) =>
!isUndefined(context) && context !== _global;
/**
* Accepts varargs expecting each argument to be an object, then
@@ -342,10 +369,15 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
* @returns {Object} Result of all merge properties
*/
function merge(/* obj1, obj2, obj3, ... */) {
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
const result = {};
const assignValue = (val, key) => {
const targetKey = caseless && findKey(result, key) || key;
// Skip dangerous property names to prevent prototype pollution
if (key === "__proto__" || key === "constructor" || key === "prototype") {
return;
}
const targetKey = (caseless && findKey(result, key)) || key;
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
result[targetKey] = merge(result[targetKey], val);
} else if (isPlainObject(val)) {
@@ -355,7 +387,7 @@ function merge(/* obj1, obj2, obj3, ... */) {
} else if (!skipUndefined || !isUndefined(val)) {
result[targetKey] = val;
}
}
};
for (let i = 0, l = arguments.length; i < l; i++) {
arguments[i] && forEach(arguments[i], assignValue);
@@ -374,26 +406,30 @@ function merge(/* obj1, obj2, obj3, ... */) {
* @param {Boolean} [options.allOwnKeys]
* @returns {Object} The resulting value of object a
*/
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
forEach(b, (val, key) => {
if (thisArg && isFunction(val)) {
Object.defineProperty(a, key, {
value: bind(val, thisArg),
writable: true,
enumerable: true,
configurable: true
});
} else {
Object.defineProperty(a, key, {
value: val,
writable: true,
enumerable: true,
configurable: true
});
}
}, {allOwnKeys});
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
forEach(
b,
(val, key) => {
if (thisArg && isFunction(val)) {
Object.defineProperty(a, key, {
value: bind(val, thisArg),
writable: true,
enumerable: true,
configurable: true,
});
} else {
Object.defineProperty(a, key, {
value: val,
writable: true,
enumerable: true,
configurable: true,
});
}
},
{ allOwnKeys },
);
return a;
}
};
/**
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
@@ -403,11 +439,11 @@ const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
* @returns {string} content value without BOM
*/
const stripBOM = (content) => {
if (content.charCodeAt(0) === 0xFEFF) {
if (content.charCodeAt(0) === 0xfeff) {
content = content.slice(1);
}
return content;
}
};
/**
* Inherit the prototype methods from one constructor into another
@@ -419,18 +455,21 @@ const stripBOM = (content) => {
* @returns {void}
*/
const inherits = (constructor, superConstructor, props, descriptors) => {
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
Object.defineProperty(constructor.prototype, 'constructor', {
constructor.prototype = Object.create(
superConstructor.prototype,
descriptors,
);
Object.defineProperty(constructor.prototype, "constructor", {
value: constructor,
writable: true,
enumerable: false,
configurable: true
configurable: true,
});
Object.defineProperty(constructor, 'super', {
value: superConstructor.prototype
Object.defineProperty(constructor, "super", {
value: superConstructor.prototype,
});
props && Object.assign(constructor.prototype, props);
}
};
/**
* Resolve object with deep prototype chain to a flat object
@@ -456,16 +495,23 @@ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
i = props.length;
while (i-- > 0) {
prop = props[i];
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
if (
(!propFilter || propFilter(prop, sourceObj, destObj)) &&
!merged[prop]
) {
destObj[prop] = sourceObj[prop];
merged[prop] = true;
}
}
sourceObj = filter !== false && getPrototypeOf(sourceObj);
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
} while (
sourceObj &&
(!filter || filter(sourceObj, destObj)) &&
sourceObj !== Object.prototype
);
return destObj;
}
};
/**
* Determines whether a string ends with the characters of a specified string
@@ -484,8 +530,7 @@ const endsWith = (str, searchString, position) => {
position -= searchString.length;
const lastIndex = str.indexOf(searchString, position);
return lastIndex !== -1 && lastIndex === position;
}
};
/**
* Returns new array from array like object or null if failed
@@ -504,7 +549,7 @@ const toArray = (thing) => {
arr[i] = thing[i];
}
return arr;
}
};
/**
* Checking if the Uint8Array exists and if it does, it returns a function that checks if the
@@ -515,12 +560,12 @@ const toArray = (thing) => {
* @returns {Array}
*/
// eslint-disable-next-line func-names
const isTypedArray = (TypedArray => {
const isTypedArray = ((TypedArray) => {
// eslint-disable-next-line func-names
return thing => {
return (thing) => {
return TypedArray && thing instanceof TypedArray;
};
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
/**
* For each entry in the object, call the function with the key and value.
@@ -541,7 +586,7 @@ const forEachEntry = (obj, fn) => {
const pair = result.value;
fn.call(obj, pair[0], pair[1]);
}
}
};
/**
* It takes a regular expression and a string, and returns an array of all the matches
@@ -560,21 +605,25 @@ const matchAll = (regExp, str) => {
}
return arr;
}
};
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
const isHTMLForm = kindOfTest('HTMLFormElement');
const isHTMLForm = kindOfTest("HTMLFormElement");
const toCamelCase = str => {
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
function replacer(m, p1, p2) {
const toCamelCase = (str) => {
return str
.toLowerCase()
.replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
return p1.toUpperCase() + p2;
}
);
});
};
/* Creating a function that will check if an object has a property. */
const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
const hasOwnProperty = (
({ hasOwnProperty }) =>
(obj, prop) =>
hasOwnProperty.call(obj, prop)
)(Object.prototype);
/**
* Determine if a value is a RegExp object
@@ -583,7 +632,7 @@ const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call
*
* @returns {boolean} True if value is a RegExp object, otherwise false
*/
const isRegExp = kindOfTest('RegExp');
const isRegExp = kindOfTest("RegExp");
const reduceDescriptors = (obj, reducer) => {
const descriptors = Object.getOwnPropertyDescriptors(obj);
@@ -597,7 +646,7 @@ const reduceDescriptors = (obj, reducer) => {
});
Object.defineProperties(obj, reducedDescriptors);
}
};
/**
* Makes all methods read-only
@@ -607,7 +656,10 @@ const reduceDescriptors = (obj, reducer) => {
const freezeMethods = (obj) => {
reduceDescriptors(obj, (descriptor, name) => {
// skip restricted props in strict mode
if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
if (
isFunction(obj) &&
["arguments", "caller", "callee"].indexOf(name) !== -1
) {
return false;
}
@@ -617,40 +669,42 @@ const freezeMethods = (obj) => {
descriptor.enumerable = false;
if ('writable' in descriptor) {
if ("writable" in descriptor) {
descriptor.writable = false;
return;
}
if (!descriptor.set) {
descriptor.set = () => {
throw Error('Can not rewrite read-only method \'' + name + '\'');
throw Error("Can not rewrite read-only method '" + name + "'");
};
}
});
}
};
const toObjectSet = (arrayOrString, delimiter) => {
const obj = {};
const define = (arr) => {
arr.forEach(value => {
arr.forEach((value) => {
obj[value] = true;
});
}
};
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
isArray(arrayOrString)
? define(arrayOrString)
: define(String(arrayOrString).split(delimiter));
return obj;
}
};
const noop = () => {}
const noop = () => {};
const toFiniteNumber = (value, defaultValue) => {
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
}
return value != null && Number.isFinite((value = +value))
? value
: defaultValue;
};
/**
* If the thing is a FormData object, return true, otherwise return false.
@@ -660,14 +714,18 @@ const toFiniteNumber = (value, defaultValue) => {
* @returns {boolean}
*/
function isSpecCompliantForm(thing) {
return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
return !!(
thing &&
isFunction(thing.append) &&
thing[toStringTag] === "FormData" &&
thing[iterator]
);
}
const toJSONObject = (obj) => {
const stack = new Array(10);
const visit = (source, i) => {
if (isObject(source)) {
if (stack.indexOf(source) >= 0) {
return;
@@ -678,7 +736,7 @@ const toJSONObject = (obj) => {
return source;
}
if(!('toJSON' in source)) {
if (!("toJSON" in source)) {
stack[i] = source;
const target = isArray(source) ? [] : {};
@@ -694,15 +752,18 @@ const toJSONObject = (obj) => {
}
return source;
}
};
return visit(obj, 0);
}
};
const isAsyncFn = kindOfTest('AsyncFunction');
const isAsyncFn = kindOfTest("AsyncFunction");
const isThenable = (thing) =>
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
thing &&
(isObject(thing) || isFunction(thing)) &&
isFunction(thing.then) &&
isFunction(thing.catch);
// original code
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
@@ -712,32 +773,35 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
return setImmediate;
}
return postMessageSupported ? ((token, callbacks) => {
_global.addEventListener("message", ({source, data}) => {
if (source === _global && data === token) {
callbacks.length && callbacks.shift()();
}
}, false);
return postMessageSupported
? ((token, callbacks) => {
_global.addEventListener(
"message",
({ source, data }) => {
if (source === _global && data === token) {
callbacks.length && callbacks.shift()();
}
},
false,
);
return (cb) => {
callbacks.push(cb);
_global.postMessage(token, "*");
}
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
})(
typeof setImmediate === 'function',
isFunction(_global.postMessage)
);
return (cb) => {
callbacks.push(cb);
_global.postMessage(token, "*");
};
})(`axios@${Math.random()}`, [])
: (cb) => setTimeout(cb);
})(typeof setImmediate === "function", isFunction(_global.postMessage));
const asap = typeof queueMicrotask !== 'undefined' ?
queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
const asap =
typeof queueMicrotask !== "undefined"
? queueMicrotask.bind(_global)
: (typeof process !== "undefined" && process.nextTick) || _setImmediate;
// *********************
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
export default {
isArray,
isArrayBuffer,
@@ -795,5 +859,5 @@ export default {
isThenable,
setImmediate: _setImmediate,
asap,
isIterable
isIterable,
};

91
node_modules/axios/package.json generated vendored
View File

@@ -1,6 +1,6 @@
{
"name": "axios",
"version": "1.13.4",
"version": "1.13.5",
"description": "Promise based HTTP client for the browser and node.js",
"main": "./dist/node/axios.cjs",
"module": "./index.js",
@@ -49,9 +49,8 @@
"test:node": "npm run test:mocha",
"test:node:coverage": "c8 npm run test:mocha",
"test:browser": "npm run test:karma",
"test:package": "npm run test:eslint && npm run test:dtslint && npm run test:exports",
"test:package": "npm run test:eslint && npm run test:exports",
"test:eslint": "node bin/ssl_hotfix.js eslint lib/**/*.js",
"test:dtslint": "dtslint --localTs node_modules/typescript/lib",
"test:mocha": "node bin/ssl_hotfix.js mocha test/unit/**/*.js --timeout 30000 --exit",
"test:exports": "node bin/ssl_hotfix.js mocha test/module/test.js --timeout 30000 --exit",
"test:karma": "node ./bin/run-karma-tests.js",
@@ -62,20 +61,12 @@
"preversion": "gulp version",
"version": "npm run build && git add package.json",
"prepublishOnly": "npm run test:build:version",
"postpublish": "git push && git push --tags",
"build": "gulp clear && cross-env NODE_ENV=production rollup -c -m",
"examples": "node ./examples/server.js",
"coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"fix": "eslint --fix lib/**/*.js",
"prepare": "husky install && npm run prepare:hooks",
"prepare:hooks": "npx husky set .husky/commit-msg \"npx commitlint --edit $1\"",
"release:dry": "release-it --dry-run --no-npm",
"release:info": "release-it --release-version",
"release:beta:no-npm": "release-it --preRelease=beta --no-npm",
"release:beta": "release-it --preRelease=beta",
"release:no-npm": "release-it --no-npm",
"release:changelog:fix": "node ./bin/injectContributorsList.js && git add CHANGELOG.md",
"release": "release-it"
"prepare:hooks": "npx husky set .husky/commit-msg \"npx commitlint --edit $1\""
},
"repository": {
"type": "git",
@@ -100,31 +91,29 @@
},
"homepage": "https://axios-http.com",
"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@release-it/conventional-changelog": "^5.1.1",
"@rollup/plugin-alias": "^5.1.0",
"@babel/core": "^7.28.6",
"@babel/preset-env": "^7.28.6",
"@commitlint/cli": "^20.3.1",
"@commitlint/config-conventional": "^20.3.1",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-multi-entry": "^4.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"abortcontroller-polyfill": "^1.7.5",
"auto-changelog": "^2.4.0",
"body-parser": "^1.20.2",
"abortcontroller-polyfill": "^1.7.8",
"auto-changelog": "^2.5.0",
"body-parser": "^1.20.4",
"c8": "^10.1.3",
"chalk": "^5.3.0",
"chalk": "^5.6.2",
"coveralls": "^3.1.1",
"cross-env": "^7.0.3",
"dev-null": "^0.1.1",
"dtslint": "^4.2.1",
"es6-promise": "^4.2.8",
"eslint": "^8.56.0",
"express": "^4.18.2",
"eslint": "^8.57.1",
"express": "^4.22.1",
"formdata-node": "^5.0.1",
"formidable": "^2.1.2",
"formidable": "^2.1.5",
"fs-extra": "^10.1.0",
"get-stream": "^3.0.0",
"gulp": "^4.0.2",
@@ -132,24 +121,23 @@
"husky": "^8.0.3",
"istanbul-instrumenter-loader": "^3.0.1",
"jasmine-core": "^2.99.1",
"karma": "^6.3.17",
"karma": "^6.4.4",
"karma-chrome-launcher": "^3.2.0",
"karma-firefox-launcher": "^2.1.2",
"karma-firefox-launcher": "^2.1.3",
"karma-jasmine": "^1.1.2",
"karma-jasmine-ajax": "^0.1.13",
"karma-rollup-preprocessor": "^7.0.8",
"karma-safari-launcher": "^1.0.0",
"karma-sauce-launcher": "^4.3.6",
"karma-sinon": "^1.0.5",
"karma-sourcemap-loader": "^0.3.8",
"memoizee": "^0.4.15",
"karma-sourcemap-loader": "^0.4.0",
"memoizee": "^0.4.17",
"minimist": "^1.2.8",
"mocha": "^10.3.0",
"mocha": "^10.8.2",
"multer": "^1.4.4",
"pacote": "^20.0.0",
"pretty-bytes": "^6.1.1",
"release-it": "^15.11.0",
"rollup": "^2.79.1",
"rollup": "^2.79.2",
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-terser": "^7.0.2",
@@ -174,8 +162,8 @@
"unpkg": "dist/axios.min.js",
"typings": "./index.d.ts",
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.4",
"follow-redirects": "^1.15.11",
"form-data": "^4.0.5",
"proxy-from-env": "^1.1.0"
},
"bundlesize": [
@@ -195,42 +183,11 @@
"Martti Laine (https://github.com/codeclown)",
"Xianming Zhong (https://github.com/chinesedfan)",
"Remco Haszing (https://github.com/remcohaszing)",
"Rikki Gibson (https://github.com/RikkiGibson)",
"Willian Agostini (https://github.com/WillianAgostini)",
"Rikki Gibson (https://github.com/RikkiGibson)",
"Ben Carp (https://github.com/carpben)"
],
"sideEffects": false,
"release-it": {
"git": {
"commitMessage": "chore(release): v${version}",
"push": true,
"commit": true,
"tag": true,
"requireCommits": false,
"requireCleanWorkingDir": false
},
"github": {
"release": true,
"draft": true
},
"npm": {
"publish": false,
"ignoreVersion": false
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular",
"infile": "CHANGELOG.md",
"header": "# Changelog"
}
},
"hooks": {
"before:init": "npm test",
"after:bump": "gulp version --bump ${version} && npm run build && npm run test:build:version",
"before:release": "npm run release:changelog:fix && git add ./package-lock.json",
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
}
},
"commitlint": {
"rules": {
"header-max-length": [