@depup/typesense 3.0.5-depup.1 → 3.0.6-depup.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/changes.json +3 -3
- package/dist/typesense.js +1097 -787
- package/dist/typesense.js.map +1 -1
- package/dist/typesense.min.js +1 -1
- package/dist/typesense.min.js.map +1 -1
- package/package.json +10 -12
package/dist/typesense.js
CHANGED
|
@@ -7928,7 +7928,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7928
7928
|
* - `http` for Node.js
|
|
7929
7929
|
* - `xhr` for browsers
|
|
7930
7930
|
* - `fetch` for fetch API-based requests
|
|
7931
|
-
*
|
|
7931
|
+
*
|
|
7932
7932
|
* @type {Object<string, Function|Object>}
|
|
7933
7933
|
*/
|
|
7934
7934
|
const knownAdapters = {
|
|
@@ -7936,7 +7936,7 @@ const knownAdapters = {
|
|
|
7936
7936
|
xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
7937
7937
|
fetch: {
|
|
7938
7938
|
get: _fetch_js__WEBPACK_IMPORTED_MODULE_3__.getFetch,
|
|
7939
|
-
}
|
|
7939
|
+
},
|
|
7940
7940
|
};
|
|
7941
7941
|
|
|
7942
7942
|
// Assign adapter names for easier debugging and identification
|
|
@@ -7953,7 +7953,7 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(knownAdapters, (fn, va
|
|
|
7953
7953
|
|
|
7954
7954
|
/**
|
|
7955
7955
|
* Render a rejection reason string for unknown or unsupported adapters
|
|
7956
|
-
*
|
|
7956
|
+
*
|
|
7957
7957
|
* @param {string} reason
|
|
7958
7958
|
* @returns {string}
|
|
7959
7959
|
*/
|
|
@@ -7961,17 +7961,18 @@ const renderReason = (reason) => `- ${reason}`;
|
|
|
7961
7961
|
|
|
7962
7962
|
/**
|
|
7963
7963
|
* Check if the adapter is resolved (function, null, or false)
|
|
7964
|
-
*
|
|
7964
|
+
*
|
|
7965
7965
|
* @param {Function|null|false} adapter
|
|
7966
7966
|
* @returns {boolean}
|
|
7967
7967
|
*/
|
|
7968
|
-
const isResolvedHandle = (adapter) =>
|
|
7968
|
+
const isResolvedHandle = (adapter) =>
|
|
7969
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(adapter) || adapter === null || adapter === false;
|
|
7969
7970
|
|
|
7970
7971
|
/**
|
|
7971
7972
|
* Get the first suitable adapter from the provided list.
|
|
7972
7973
|
* Tries each adapter in order until a supported one is found.
|
|
7973
7974
|
* Throws an AxiosError if no adapter is suitable.
|
|
7974
|
-
*
|
|
7975
|
+
*
|
|
7975
7976
|
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
7976
7977
|
* @param {Object} config - Axios request configuration
|
|
7977
7978
|
* @throws {AxiosError} If no suitable adapter is available
|
|
@@ -8008,14 +8009,17 @@ function getAdapter(adapters, config) {
|
|
|
8008
8009
|
}
|
|
8009
8010
|
|
|
8010
8011
|
if (!adapter) {
|
|
8011
|
-
const reasons = Object.entries(rejectedReasons)
|
|
8012
|
-
|
|
8012
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
8013
|
+
([id, state]) =>
|
|
8014
|
+
`adapter ${id} ` +
|
|
8013
8015
|
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
8014
|
-
|
|
8016
|
+
);
|
|
8015
8017
|
|
|
8016
|
-
let s = length
|
|
8017
|
-
|
|
8018
|
-
|
|
8018
|
+
let s = length
|
|
8019
|
+
? reasons.length > 1
|
|
8020
|
+
? 'since :\n' + reasons.map(renderReason).join('\n')
|
|
8021
|
+
: ' ' + renderReason(reasons[0])
|
|
8022
|
+
: 'as no adapter specified';
|
|
8019
8023
|
|
|
8020
8024
|
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"](
|
|
8021
8025
|
`There is no suitable adapter to dispatch the request ` + s,
|
|
@@ -8040,7 +8044,7 @@ function getAdapter(adapters, config) {
|
|
|
8040
8044
|
* Exposes all known adapters
|
|
8041
8045
|
* @type {Object<string, Function|Object>}
|
|
8042
8046
|
*/
|
|
8043
|
-
adapters: knownAdapters
|
|
8047
|
+
adapters: knownAdapters,
|
|
8044
8048
|
});
|
|
8045
8049
|
|
|
8046
8050
|
|
|
@@ -8079,31 +8083,33 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8079
8083
|
|
|
8080
8084
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
8081
8085
|
|
|
8082
|
-
const {isFunction} = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
8086
|
+
const { isFunction } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
8083
8087
|
|
|
8084
|
-
const globalFetchAPI = (({Request, Response}) => ({
|
|
8085
|
-
Request,
|
|
8088
|
+
const globalFetchAPI = (({ Request, Response }) => ({
|
|
8089
|
+
Request,
|
|
8090
|
+
Response,
|
|
8086
8091
|
}))(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global);
|
|
8087
8092
|
|
|
8088
|
-
const {
|
|
8089
|
-
ReadableStream, TextEncoder
|
|
8090
|
-
} = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global;
|
|
8091
|
-
|
|
8093
|
+
const { ReadableStream, TextEncoder } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global;
|
|
8092
8094
|
|
|
8093
8095
|
const test = (fn, ...args) => {
|
|
8094
8096
|
try {
|
|
8095
8097
|
return !!fn(...args);
|
|
8096
8098
|
} catch (e) {
|
|
8097
|
-
return false
|
|
8099
|
+
return false;
|
|
8098
8100
|
}
|
|
8099
|
-
}
|
|
8101
|
+
};
|
|
8100
8102
|
|
|
8101
8103
|
const factory = (env) => {
|
|
8102
|
-
env = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call(
|
|
8103
|
-
|
|
8104
|
-
|
|
8104
|
+
env = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call(
|
|
8105
|
+
{
|
|
8106
|
+
skipUndefined: true,
|
|
8107
|
+
},
|
|
8108
|
+
globalFetchAPI,
|
|
8109
|
+
env
|
|
8110
|
+
);
|
|
8105
8111
|
|
|
8106
|
-
const {fetch: envFetch, Request, Response} = env;
|
|
8112
|
+
const { fetch: envFetch, Request, Response } = env;
|
|
8107
8113
|
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
|
8108
8114
|
const isRequestSupported = isFunction(Request);
|
|
8109
8115
|
const isResponseSupported = isFunction(Response);
|
|
@@ -8114,46 +8120,65 @@ const factory = (env) => {
|
|
|
8114
8120
|
|
|
8115
8121
|
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);
|
|
8116
8122
|
|
|
8117
|
-
const encodeText =
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8123
|
+
const encodeText =
|
|
8124
|
+
isFetchSupported &&
|
|
8125
|
+
(typeof TextEncoder === 'function'
|
|
8126
|
+
? (
|
|
8127
|
+
(encoder) => (str) =>
|
|
8128
|
+
encoder.encode(str)
|
|
8129
|
+
)(new TextEncoder())
|
|
8130
|
+
: async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
8121
8131
|
|
|
8122
|
-
const supportsRequestStream =
|
|
8123
|
-
|
|
8132
|
+
const supportsRequestStream =
|
|
8133
|
+
isRequestSupported &&
|
|
8134
|
+
isReadableStreamSupported &&
|
|
8135
|
+
test(() => {
|
|
8136
|
+
let duplexAccessed = false;
|
|
8124
8137
|
|
|
8125
|
-
|
|
8126
|
-
body: new ReadableStream(),
|
|
8127
|
-
method: 'POST',
|
|
8128
|
-
get duplex() {
|
|
8129
|
-
duplexAccessed = true;
|
|
8130
|
-
return 'half';
|
|
8131
|
-
},
|
|
8132
|
-
}).headers.has('Content-Type');
|
|
8138
|
+
const body = new ReadableStream();
|
|
8133
8139
|
|
|
8134
|
-
|
|
8135
|
-
|
|
8140
|
+
const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
|
|
8141
|
+
body,
|
|
8142
|
+
method: 'POST',
|
|
8143
|
+
get duplex() {
|
|
8144
|
+
duplexAccessed = true;
|
|
8145
|
+
return 'half';
|
|
8146
|
+
},
|
|
8147
|
+
}).headers.has('Content-Type');
|
|
8148
|
+
|
|
8149
|
+
body.cancel();
|
|
8150
|
+
|
|
8151
|
+
return duplexAccessed && !hasContentType;
|
|
8152
|
+
});
|
|
8136
8153
|
|
|
8137
|
-
const supportsResponseStream =
|
|
8154
|
+
const supportsResponseStream =
|
|
8155
|
+
isResponseSupported &&
|
|
8156
|
+
isReadableStreamSupported &&
|
|
8138
8157
|
test(() => _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(new Response('').body));
|
|
8139
8158
|
|
|
8140
8159
|
const resolvers = {
|
|
8141
|
-
stream: supportsResponseStream && ((res) => res.body)
|
|
8160
|
+
stream: supportsResponseStream && ((res) => res.body),
|
|
8142
8161
|
};
|
|
8143
8162
|
|
|
8144
|
-
isFetchSupported &&
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8163
|
+
isFetchSupported &&
|
|
8164
|
+
(() => {
|
|
8165
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {
|
|
8166
|
+
!resolvers[type] &&
|
|
8167
|
+
(resolvers[type] = (res, config) => {
|
|
8168
|
+
let method = res && res[type];
|
|
8148
8169
|
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8170
|
+
if (method) {
|
|
8171
|
+
return method.call(res);
|
|
8172
|
+
}
|
|
8152
8173
|
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
|
|
8156
|
-
|
|
8174
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
8175
|
+
`Response type '${type}' is not supported`,
|
|
8176
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT,
|
|
8177
|
+
config
|
|
8178
|
+
);
|
|
8179
|
+
});
|
|
8180
|
+
});
|
|
8181
|
+
})();
|
|
8157
8182
|
|
|
8158
8183
|
const getBodyLength = async (body) => {
|
|
8159
8184
|
if (body == null) {
|
|
@@ -8183,13 +8208,13 @@ const factory = (env) => {
|
|
|
8183
8208
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(body)) {
|
|
8184
8209
|
return (await encodeText(body)).byteLength;
|
|
8185
8210
|
}
|
|
8186
|
-
}
|
|
8211
|
+
};
|
|
8187
8212
|
|
|
8188
8213
|
const resolveBodyLength = async (headers, body) => {
|
|
8189
8214
|
const length = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(headers.getContentLength());
|
|
8190
8215
|
|
|
8191
8216
|
return length == null ? getBodyLength(body) : length;
|
|
8192
|
-
}
|
|
8217
|
+
};
|
|
8193
8218
|
|
|
8194
8219
|
return async (config) => {
|
|
8195
8220
|
let {
|
|
@@ -8204,38 +8229,47 @@ const factory = (env) => {
|
|
|
8204
8229
|
responseType,
|
|
8205
8230
|
headers,
|
|
8206
8231
|
withCredentials = 'same-origin',
|
|
8207
|
-
fetchOptions
|
|
8232
|
+
fetchOptions,
|
|
8208
8233
|
} = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__["default"])(config);
|
|
8209
8234
|
|
|
8210
8235
|
let _fetch = envFetch || fetch;
|
|
8211
8236
|
|
|
8212
8237
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
8213
8238
|
|
|
8214
|
-
let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
8239
|
+
let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
8240
|
+
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
8241
|
+
timeout
|
|
8242
|
+
);
|
|
8215
8243
|
|
|
8216
8244
|
let request = null;
|
|
8217
8245
|
|
|
8218
|
-
const unsubscribe =
|
|
8219
|
-
composedSignal
|
|
8220
|
-
|
|
8246
|
+
const unsubscribe =
|
|
8247
|
+
composedSignal &&
|
|
8248
|
+
composedSignal.unsubscribe &&
|
|
8249
|
+
(() => {
|
|
8250
|
+
composedSignal.unsubscribe();
|
|
8251
|
+
});
|
|
8221
8252
|
|
|
8222
8253
|
let requestContentLength;
|
|
8223
8254
|
|
|
8224
8255
|
try {
|
|
8225
8256
|
if (
|
|
8226
|
-
onUploadProgress &&
|
|
8257
|
+
onUploadProgress &&
|
|
8258
|
+
supportsRequestStream &&
|
|
8259
|
+
method !== 'get' &&
|
|
8260
|
+
method !== 'head' &&
|
|
8227
8261
|
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
8228
8262
|
) {
|
|
8229
8263
|
let _request = new Request(url, {
|
|
8230
8264
|
method: 'POST',
|
|
8231
8265
|
body: data,
|
|
8232
|
-
duplex:
|
|
8266
|
+
duplex: 'half',
|
|
8233
8267
|
});
|
|
8234
8268
|
|
|
8235
8269
|
let contentTypeHeader;
|
|
8236
8270
|
|
|
8237
8271
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
8238
|
-
headers.setContentType(contentTypeHeader)
|
|
8272
|
+
headers.setContentType(contentTypeHeader);
|
|
8239
8273
|
}
|
|
8240
8274
|
|
|
8241
8275
|
if (_request.body) {
|
|
@@ -8254,7 +8288,7 @@ const factory = (env) => {
|
|
|
8254
8288
|
|
|
8255
8289
|
// Cloudflare Workers throws when credentials are defined
|
|
8256
8290
|
// see https://github.com/cloudflare/workerd/issues/902
|
|
8257
|
-
const isCredentialsSupported = isRequestSupported &&
|
|
8291
|
+
const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
8258
8292
|
|
|
8259
8293
|
const resolvedOptions = {
|
|
8260
8294
|
...fetchOptions,
|
|
@@ -8262,29 +8296,35 @@ const factory = (env) => {
|
|
|
8262
8296
|
method: method.toUpperCase(),
|
|
8263
8297
|
headers: headers.normalize().toJSON(),
|
|
8264
8298
|
body: data,
|
|
8265
|
-
duplex:
|
|
8266
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
8299
|
+
duplex: 'half',
|
|
8300
|
+
credentials: isCredentialsSupported ? withCredentials : undefined,
|
|
8267
8301
|
};
|
|
8268
8302
|
|
|
8269
8303
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
8270
8304
|
|
|
8271
|
-
let response = await (isRequestSupported
|
|
8305
|
+
let response = await (isRequestSupported
|
|
8306
|
+
? _fetch(request, fetchOptions)
|
|
8307
|
+
: _fetch(url, resolvedOptions));
|
|
8272
8308
|
|
|
8273
|
-
const isStreamResponse =
|
|
8309
|
+
const isStreamResponse =
|
|
8310
|
+
supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
8274
8311
|
|
|
8275
8312
|
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
8276
8313
|
const options = {};
|
|
8277
8314
|
|
|
8278
|
-
['status', 'statusText', 'headers'].forEach(prop => {
|
|
8315
|
+
['status', 'statusText', 'headers'].forEach((prop) => {
|
|
8279
8316
|
options[prop] = response[prop];
|
|
8280
8317
|
});
|
|
8281
8318
|
|
|
8282
8319
|
const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length'));
|
|
8283
8320
|
|
|
8284
|
-
const [onProgress, flush] =
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
|
|
8321
|
+
const [onProgress, flush] =
|
|
8322
|
+
(onDownloadProgress &&
|
|
8323
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventDecorator)(
|
|
8324
|
+
responseContentLength,
|
|
8325
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.asyncDecorator)(onDownloadProgress), true)
|
|
8326
|
+
)) ||
|
|
8327
|
+
[];
|
|
8288
8328
|
|
|
8289
8329
|
response = new Response(
|
|
8290
8330
|
(0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
@@ -8297,7 +8337,10 @@ const factory = (env) => {
|
|
|
8297
8337
|
|
|
8298
8338
|
responseType = responseType || 'text';
|
|
8299
8339
|
|
|
8300
|
-
let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](
|
|
8340
|
+
let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](
|
|
8341
|
+
response,
|
|
8342
|
+
config
|
|
8343
|
+
);
|
|
8301
8344
|
|
|
8302
8345
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
8303
8346
|
|
|
@@ -8308,43 +8351,50 @@ const factory = (env) => {
|
|
|
8308
8351
|
status: response.status,
|
|
8309
8352
|
statusText: response.statusText,
|
|
8310
8353
|
config,
|
|
8311
|
-
request
|
|
8312
|
-
})
|
|
8313
|
-
})
|
|
8354
|
+
request,
|
|
8355
|
+
});
|
|
8356
|
+
});
|
|
8314
8357
|
} catch (err) {
|
|
8315
8358
|
unsubscribe && unsubscribe();
|
|
8316
8359
|
|
|
8317
8360
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
8318
8361
|
throw Object.assign(
|
|
8319
|
-
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
8362
|
+
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
8363
|
+
'Network Error',
|
|
8364
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NETWORK,
|
|
8365
|
+
config,
|
|
8366
|
+
request,
|
|
8367
|
+
err && err.response
|
|
8368
|
+
),
|
|
8320
8369
|
{
|
|
8321
|
-
cause: err.cause || err
|
|
8370
|
+
cause: err.cause || err,
|
|
8322
8371
|
}
|
|
8323
|
-
)
|
|
8372
|
+
);
|
|
8324
8373
|
}
|
|
8325
8374
|
|
|
8326
8375
|
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(err, err && err.code, config, request, err && err.response);
|
|
8327
8376
|
}
|
|
8328
|
-
}
|
|
8329
|
-
}
|
|
8377
|
+
};
|
|
8378
|
+
};
|
|
8330
8379
|
|
|
8331
8380
|
const seedCache = new Map();
|
|
8332
8381
|
|
|
8333
8382
|
const getFetch = (config) => {
|
|
8334
8383
|
let env = (config && config.env) || {};
|
|
8335
|
-
const {fetch, Request, Response} = env;
|
|
8336
|
-
const seeds = [
|
|
8337
|
-
Request, Response, fetch
|
|
8338
|
-
];
|
|
8384
|
+
const { fetch, Request, Response } = env;
|
|
8385
|
+
const seeds = [Request, Response, fetch];
|
|
8339
8386
|
|
|
8340
|
-
let len = seeds.length,
|
|
8341
|
-
|
|
8387
|
+
let len = seeds.length,
|
|
8388
|
+
i = len,
|
|
8389
|
+
seed,
|
|
8390
|
+
target,
|
|
8391
|
+
map = seedCache;
|
|
8342
8392
|
|
|
8343
8393
|
while (i--) {
|
|
8344
8394
|
seed = seeds[i];
|
|
8345
8395
|
target = map.get(seed);
|
|
8346
8396
|
|
|
8347
|
-
target === undefined && map.set(seed, target =
|
|
8397
|
+
target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));
|
|
8348
8398
|
|
|
8349
8399
|
map = target;
|
|
8350
8400
|
}
|
|
@@ -8393,193 +8443,215 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8393
8443
|
|
|
8394
8444
|
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
8395
8445
|
|
|
8396
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported &&
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8446
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported &&
|
|
8447
|
+
function (config) {
|
|
8448
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
8449
|
+
const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_9__["default"])(config);
|
|
8450
|
+
let requestData = _config.data;
|
|
8451
|
+
const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(_config.headers).normalize();
|
|
8452
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
8453
|
+
let onCanceled;
|
|
8454
|
+
let uploadThrottled, downloadThrottled;
|
|
8455
|
+
let flushUpload, flushDownload;
|
|
8405
8456
|
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8457
|
+
function done() {
|
|
8458
|
+
flushUpload && flushUpload(); // flush events
|
|
8459
|
+
flushDownload && flushDownload(); // flush events
|
|
8409
8460
|
|
|
8410
|
-
|
|
8461
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
8411
8462
|
|
|
8412
|
-
|
|
8413
|
-
|
|
8463
|
+
_config.signal && _config.signal.removeEventListener('abort', onCanceled);
|
|
8464
|
+
}
|
|
8414
8465
|
|
|
8415
|
-
|
|
8466
|
+
let request = new XMLHttpRequest();
|
|
8416
8467
|
|
|
8417
|
-
|
|
8468
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
8418
8469
|
|
|
8419
|
-
|
|
8420
|
-
|
|
8470
|
+
// Set the request timeout in MS
|
|
8471
|
+
request.timeout = _config.timeout;
|
|
8421
8472
|
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8473
|
+
function onloadend() {
|
|
8474
|
+
if (!request) {
|
|
8475
|
+
return;
|
|
8476
|
+
}
|
|
8477
|
+
// Prepare the response
|
|
8478
|
+
const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(
|
|
8479
|
+
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
8480
|
+
);
|
|
8481
|
+
const responseData =
|
|
8482
|
+
!responseType || responseType === 'text' || responseType === 'json'
|
|
8483
|
+
? request.responseText
|
|
8484
|
+
: request.response;
|
|
8485
|
+
const response = {
|
|
8486
|
+
data: responseData,
|
|
8487
|
+
status: request.status,
|
|
8488
|
+
statusText: request.statusText,
|
|
8489
|
+
headers: responseHeaders,
|
|
8490
|
+
config,
|
|
8491
|
+
request,
|
|
8492
|
+
};
|
|
8493
|
+
|
|
8494
|
+
(0,_core_settle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(
|
|
8495
|
+
function _resolve(value) {
|
|
8496
|
+
resolve(value);
|
|
8497
|
+
done();
|
|
8498
|
+
},
|
|
8499
|
+
function _reject(err) {
|
|
8500
|
+
reject(err);
|
|
8501
|
+
done();
|
|
8502
|
+
},
|
|
8503
|
+
response
|
|
8504
|
+
);
|
|
8505
|
+
|
|
8506
|
+
// Clean up request
|
|
8507
|
+
request = null;
|
|
8425
8508
|
}
|
|
8426
|
-
// Prepare the response
|
|
8427
|
-
const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(
|
|
8428
|
-
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
8429
|
-
);
|
|
8430
|
-
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
|
8431
|
-
request.responseText : request.response;
|
|
8432
|
-
const response = {
|
|
8433
|
-
data: responseData,
|
|
8434
|
-
status: request.status,
|
|
8435
|
-
statusText: request.statusText,
|
|
8436
|
-
headers: responseHeaders,
|
|
8437
|
-
config,
|
|
8438
|
-
request
|
|
8439
|
-
};
|
|
8440
8509
|
|
|
8441
|
-
(
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
}
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8510
|
+
if ('onloadend' in request) {
|
|
8511
|
+
// Use onloadend if available
|
|
8512
|
+
request.onloadend = onloadend;
|
|
8513
|
+
} else {
|
|
8514
|
+
// Listen for ready state to emulate onloadend
|
|
8515
|
+
request.onreadystatechange = function handleLoad() {
|
|
8516
|
+
if (!request || request.readyState !== 4) {
|
|
8517
|
+
return;
|
|
8518
|
+
}
|
|
8448
8519
|
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8520
|
+
// The request errored out and we didn't get a response, this will be
|
|
8521
|
+
// handled by onerror instead
|
|
8522
|
+
// With one exception: request that using file: protocol, most browsers
|
|
8523
|
+
// will return status as 0 even though it's a successful request
|
|
8524
|
+
if (
|
|
8525
|
+
request.status === 0 &&
|
|
8526
|
+
!(request.responseURL && request.responseURL.indexOf('file:') === 0)
|
|
8527
|
+
) {
|
|
8528
|
+
return;
|
|
8529
|
+
}
|
|
8530
|
+
// readystate handler is calling before onerror or ontimeout handlers,
|
|
8531
|
+
// so we should call onloadend on the next 'tick'
|
|
8532
|
+
setTimeout(onloadend);
|
|
8533
|
+
};
|
|
8534
|
+
}
|
|
8452
8535
|
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
} else {
|
|
8457
|
-
// Listen for ready state to emulate onloadend
|
|
8458
|
-
request.onreadystatechange = function handleLoad() {
|
|
8459
|
-
if (!request || request.readyState !== 4) {
|
|
8536
|
+
// Handle browser request cancellation (as opposed to a manual cancellation)
|
|
8537
|
+
request.onabort = function handleAbort() {
|
|
8538
|
+
if (!request) {
|
|
8460
8539
|
return;
|
|
8461
8540
|
}
|
|
8462
8541
|
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
//
|
|
8466
|
-
|
|
8467
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
|
8468
|
-
return;
|
|
8469
|
-
}
|
|
8470
|
-
// readystate handler is calling before onerror or ontimeout handlers,
|
|
8471
|
-
// so we should call onloadend on the next 'tick'
|
|
8472
|
-
setTimeout(onloadend);
|
|
8542
|
+
reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request));
|
|
8543
|
+
|
|
8544
|
+
// Clean up request
|
|
8545
|
+
request = null;
|
|
8473
8546
|
};
|
|
8474
|
-
}
|
|
8475
8547
|
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8480
|
-
|
|
8548
|
+
// Handle low level network errors
|
|
8549
|
+
request.onerror = function handleError(event) {
|
|
8550
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
8551
|
+
// (message may be empty; when present, surface it)
|
|
8552
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
8553
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
8554
|
+
const err = new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](msg, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request);
|
|
8555
|
+
// attach the underlying event for consumers who want details
|
|
8556
|
+
err.event = event || null;
|
|
8557
|
+
reject(err);
|
|
8558
|
+
request = null;
|
|
8559
|
+
};
|
|
8481
8560
|
|
|
8482
|
-
|
|
8561
|
+
// Handle timeout
|
|
8562
|
+
request.ontimeout = function handleTimeout() {
|
|
8563
|
+
let timeoutErrorMessage = _config.timeout
|
|
8564
|
+
? 'timeout of ' + _config.timeout + 'ms exceeded'
|
|
8565
|
+
: 'timeout exceeded';
|
|
8566
|
+
const transitional = _config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_2__["default"];
|
|
8567
|
+
if (_config.timeoutErrorMessage) {
|
|
8568
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
8569
|
+
}
|
|
8570
|
+
reject(
|
|
8571
|
+
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
|
|
8572
|
+
timeoutErrorMessage,
|
|
8573
|
+
transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED,
|
|
8574
|
+
config,
|
|
8575
|
+
request
|
|
8576
|
+
)
|
|
8577
|
+
);
|
|
8483
8578
|
|
|
8484
|
-
|
|
8485
|
-
|
|
8486
|
-
|
|
8579
|
+
// Clean up request
|
|
8580
|
+
request = null;
|
|
8581
|
+
};
|
|
8487
8582
|
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
// Browsers deliver a ProgressEvent in XHR onerror
|
|
8491
|
-
// (message may be empty; when present, surface it)
|
|
8492
|
-
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
8493
|
-
const msg = event && event.message ? event.message : 'Network Error';
|
|
8494
|
-
const err = new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](msg, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request);
|
|
8495
|
-
// attach the underlying event for consumers who want details
|
|
8496
|
-
err.event = event || null;
|
|
8497
|
-
reject(err);
|
|
8498
|
-
request = null;
|
|
8499
|
-
};
|
|
8500
|
-
|
|
8501
|
-
// Handle timeout
|
|
8502
|
-
request.ontimeout = function handleTimeout() {
|
|
8503
|
-
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
8504
|
-
const transitional = _config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_2__["default"];
|
|
8505
|
-
if (_config.timeoutErrorMessage) {
|
|
8506
|
-
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
8507
|
-
}
|
|
8508
|
-
reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
|
|
8509
|
-
timeoutErrorMessage,
|
|
8510
|
-
transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED,
|
|
8511
|
-
config,
|
|
8512
|
-
request));
|
|
8513
|
-
|
|
8514
|
-
// Clean up request
|
|
8515
|
-
request = null;
|
|
8516
|
-
};
|
|
8583
|
+
// Remove Content-Type if data is undefined
|
|
8584
|
+
requestData === undefined && requestHeaders.setContentType(null);
|
|
8517
8585
|
|
|
8518
|
-
|
|
8519
|
-
|
|
8586
|
+
// Add headers to the request
|
|
8587
|
+
if ('setRequestHeader' in request) {
|
|
8588
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
8589
|
+
request.setRequestHeader(key, val);
|
|
8590
|
+
});
|
|
8591
|
+
}
|
|
8520
8592
|
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
});
|
|
8526
|
-
}
|
|
8593
|
+
// Add withCredentials to request if needed
|
|
8594
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(_config.withCredentials)) {
|
|
8595
|
+
request.withCredentials = !!_config.withCredentials;
|
|
8596
|
+
}
|
|
8527
8597
|
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8598
|
+
// Add responseType to request if needed
|
|
8599
|
+
if (responseType && responseType !== 'json') {
|
|
8600
|
+
request.responseType = _config.responseType;
|
|
8601
|
+
}
|
|
8532
8602
|
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8603
|
+
// Handle progress if needed
|
|
8604
|
+
if (onDownloadProgress) {
|
|
8605
|
+
[downloadThrottled, flushDownload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onDownloadProgress, true);
|
|
8606
|
+
request.addEventListener('progress', downloadThrottled);
|
|
8607
|
+
}
|
|
8537
8608
|
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
request.addEventListener('progress', downloadThrottled);
|
|
8542
|
-
}
|
|
8609
|
+
// Not all browsers support upload events
|
|
8610
|
+
if (onUploadProgress && request.upload) {
|
|
8611
|
+
[uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onUploadProgress);
|
|
8543
8612
|
|
|
8544
|
-
|
|
8545
|
-
if (onUploadProgress && request.upload) {
|
|
8546
|
-
([uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onUploadProgress));
|
|
8613
|
+
request.upload.addEventListener('progress', uploadThrottled);
|
|
8547
8614
|
|
|
8548
|
-
|
|
8615
|
+
request.upload.addEventListener('loadend', flushUpload);
|
|
8616
|
+
}
|
|
8549
8617
|
|
|
8550
|
-
|
|
8551
|
-
|
|
8618
|
+
if (_config.cancelToken || _config.signal) {
|
|
8619
|
+
// Handle cancellation
|
|
8620
|
+
// eslint-disable-next-line func-names
|
|
8621
|
+
onCanceled = (cancel) => {
|
|
8622
|
+
if (!request) {
|
|
8623
|
+
return;
|
|
8624
|
+
}
|
|
8625
|
+
reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__["default"](null, config, request) : cancel);
|
|
8626
|
+
request.abort();
|
|
8627
|
+
request = null;
|
|
8628
|
+
};
|
|
8552
8629
|
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
return;
|
|
8630
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
8631
|
+
if (_config.signal) {
|
|
8632
|
+
_config.signal.aborted
|
|
8633
|
+
? onCanceled()
|
|
8634
|
+
: _config.signal.addEventListener('abort', onCanceled);
|
|
8559
8635
|
}
|
|
8560
|
-
reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__["default"](null, config, request) : cancel);
|
|
8561
|
-
request.abort();
|
|
8562
|
-
request = null;
|
|
8563
|
-
};
|
|
8564
|
-
|
|
8565
|
-
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
8566
|
-
if (_config.signal) {
|
|
8567
|
-
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
|
|
8568
8636
|
}
|
|
8569
|
-
}
|
|
8570
8637
|
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].protocols.indexOf(protocol) === -1) {
|
|
8574
|
-
reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_BAD_REQUEST, config));
|
|
8575
|
-
return;
|
|
8576
|
-
}
|
|
8638
|
+
const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_config.url);
|
|
8577
8639
|
|
|
8640
|
+
if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].protocols.indexOf(protocol) === -1) {
|
|
8641
|
+
reject(
|
|
8642
|
+
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
|
|
8643
|
+
'Unsupported protocol ' + protocol + ':',
|
|
8644
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_BAD_REQUEST,
|
|
8645
|
+
config
|
|
8646
|
+
)
|
|
8647
|
+
);
|
|
8648
|
+
return;
|
|
8649
|
+
}
|
|
8578
8650
|
|
|
8579
|
-
|
|
8580
|
-
|
|
8651
|
+
// Send the request
|
|
8652
|
+
request.send(requestData || null);
|
|
8653
|
+
});
|
|
8581
8654
|
});
|
|
8582
|
-
});
|
|
8583
8655
|
|
|
8584
8656
|
|
|
8585
8657
|
/***/ },
|
|
@@ -8644,10 +8716,10 @@ function createInstance(defaultConfig) {
|
|
|
8644
8716
|
const instance = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_core_Axios_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype.request, context);
|
|
8645
8717
|
|
|
8646
8718
|
// Copy axios.prototype to instance
|
|
8647
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype, context, {allOwnKeys: true});
|
|
8719
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype, context, { allOwnKeys: true });
|
|
8648
8720
|
|
|
8649
8721
|
// Copy context to instance
|
|
8650
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].extend(instance, context, null, {allOwnKeys: true});
|
|
8722
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].extend(instance, context, null, { allOwnKeys: true });
|
|
8651
8723
|
|
|
8652
8724
|
// Factory for creating new instances
|
|
8653
8725
|
instance.create = function create(instanceConfig) {
|
|
@@ -8691,7 +8763,7 @@ axios.mergeConfig = _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"]
|
|
|
8691
8763
|
|
|
8692
8764
|
axios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_14__["default"];
|
|
8693
8765
|
|
|
8694
|
-
axios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
8766
|
+
axios.formToJSON = (thing) => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
8695
8767
|
|
|
8696
8768
|
axios.getAdapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__["default"].getAdapter;
|
|
8697
8769
|
|
|
@@ -8743,7 +8815,7 @@ class CancelToken {
|
|
|
8743
8815
|
const token = this;
|
|
8744
8816
|
|
|
8745
8817
|
// eslint-disable-next-line func-names
|
|
8746
|
-
this.promise.then(cancel => {
|
|
8818
|
+
this.promise.then((cancel) => {
|
|
8747
8819
|
if (!token._listeners) return;
|
|
8748
8820
|
|
|
8749
8821
|
let i = token._listeners.length;
|
|
@@ -8755,10 +8827,10 @@ class CancelToken {
|
|
|
8755
8827
|
});
|
|
8756
8828
|
|
|
8757
8829
|
// eslint-disable-next-line func-names
|
|
8758
|
-
this.promise.then = onfulfilled => {
|
|
8830
|
+
this.promise.then = (onfulfilled) => {
|
|
8759
8831
|
let _resolve;
|
|
8760
8832
|
// eslint-disable-next-line func-names
|
|
8761
|
-
const promise = new Promise(resolve => {
|
|
8833
|
+
const promise = new Promise((resolve) => {
|
|
8762
8834
|
token.subscribe(resolve);
|
|
8763
8835
|
_resolve = resolve;
|
|
8764
8836
|
}).then(onfulfilled);
|
|
@@ -8846,7 +8918,7 @@ class CancelToken {
|
|
|
8846
8918
|
});
|
|
8847
8919
|
return {
|
|
8848
8920
|
token,
|
|
8849
|
-
cancel
|
|
8921
|
+
cancel,
|
|
8850
8922
|
};
|
|
8851
8923
|
}
|
|
8852
8924
|
}
|
|
@@ -8960,7 +9032,7 @@ class Axios {
|
|
|
8960
9032
|
this.defaults = instanceConfig || {};
|
|
8961
9033
|
this.interceptors = {
|
|
8962
9034
|
request: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_2__["default"](),
|
|
8963
|
-
response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_2__["default"]()
|
|
9035
|
+
response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_2__["default"](),
|
|
8964
9036
|
};
|
|
8965
9037
|
}
|
|
8966
9038
|
|
|
@@ -8982,13 +9054,29 @@ class Axios {
|
|
|
8982
9054
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
8983
9055
|
|
|
8984
9056
|
// slice off the Error: ... line
|
|
8985
|
-
const stack =
|
|
9057
|
+
const stack = (() => {
|
|
9058
|
+
if (!dummy.stack) {
|
|
9059
|
+
return '';
|
|
9060
|
+
}
|
|
9061
|
+
|
|
9062
|
+
const firstNewlineIndex = dummy.stack.indexOf('\n');
|
|
9063
|
+
|
|
9064
|
+
return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
|
|
9065
|
+
})();
|
|
8986
9066
|
try {
|
|
8987
9067
|
if (!err.stack) {
|
|
8988
9068
|
err.stack = stack;
|
|
8989
9069
|
// match without the 2 top stack lines
|
|
8990
|
-
} else if (stack
|
|
8991
|
-
|
|
9070
|
+
} else if (stack) {
|
|
9071
|
+
const firstNewlineIndex = stack.indexOf('\n');
|
|
9072
|
+
const secondNewlineIndex =
|
|
9073
|
+
firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
|
|
9074
|
+
const stackWithoutTwoTopLines =
|
|
9075
|
+
secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
|
|
9076
|
+
|
|
9077
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
9078
|
+
err.stack += '\n' + stack;
|
|
9079
|
+
}
|
|
8992
9080
|
}
|
|
8993
9081
|
} catch (e) {
|
|
8994
9082
|
// ignore the case where "stack" is an un-writable property
|
|
@@ -9011,27 +9099,35 @@ class Axios {
|
|
|
9011
9099
|
|
|
9012
9100
|
config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(this.defaults, config);
|
|
9013
9101
|
|
|
9014
|
-
const {transitional, paramsSerializer, headers} = config;
|
|
9102
|
+
const { transitional, paramsSerializer, headers } = config;
|
|
9015
9103
|
|
|
9016
9104
|
if (transitional !== undefined) {
|
|
9017
|
-
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
9018
|
-
|
|
9019
|
-
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9105
|
+
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
9106
|
+
transitional,
|
|
9107
|
+
{
|
|
9108
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
9109
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
9110
|
+
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
9111
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
9112
|
+
},
|
|
9113
|
+
false
|
|
9114
|
+
);
|
|
9023
9115
|
}
|
|
9024
9116
|
|
|
9025
9117
|
if (paramsSerializer != null) {
|
|
9026
9118
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(paramsSerializer)) {
|
|
9027
9119
|
config.paramsSerializer = {
|
|
9028
|
-
serialize: paramsSerializer
|
|
9029
|
-
}
|
|
9120
|
+
serialize: paramsSerializer,
|
|
9121
|
+
};
|
|
9030
9122
|
} else {
|
|
9031
|
-
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
|
|
9123
|
+
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
9124
|
+
paramsSerializer,
|
|
9125
|
+
{
|
|
9126
|
+
encode: validators.function,
|
|
9127
|
+
serialize: validators.function,
|
|
9128
|
+
},
|
|
9129
|
+
true
|
|
9130
|
+
);
|
|
9035
9131
|
}
|
|
9036
9132
|
}
|
|
9037
9133
|
|
|
@@ -9044,26 +9140,25 @@ class Axios {
|
|
|
9044
9140
|
config.allowAbsoluteUrls = true;
|
|
9045
9141
|
}
|
|
9046
9142
|
|
|
9047
|
-
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9143
|
+
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
9144
|
+
config,
|
|
9145
|
+
{
|
|
9146
|
+
baseUrl: validators.spelling('baseURL'),
|
|
9147
|
+
withXsrfToken: validators.spelling('withXSRFToken'),
|
|
9148
|
+
},
|
|
9149
|
+
true
|
|
9150
|
+
);
|
|
9051
9151
|
|
|
9052
9152
|
// Set config.method
|
|
9053
9153
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
9054
9154
|
|
|
9055
9155
|
// Flatten headers
|
|
9056
|
-
let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(
|
|
9057
|
-
headers.common,
|
|
9058
|
-
headers[config.method]
|
|
9059
|
-
);
|
|
9156
|
+
let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(headers.common, headers[config.method]);
|
|
9060
9157
|
|
|
9061
|
-
headers &&
|
|
9062
|
-
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
9063
|
-
(method) => {
|
|
9158
|
+
headers &&
|
|
9159
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
|
|
9064
9160
|
delete headers[method];
|
|
9065
|
-
}
|
|
9066
|
-
);
|
|
9161
|
+
});
|
|
9067
9162
|
|
|
9068
9163
|
config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].concat(contextHeaders, headers);
|
|
9069
9164
|
|
|
@@ -9078,7 +9173,8 @@ class Axios {
|
|
|
9078
9173
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
9079
9174
|
|
|
9080
9175
|
const transitional = config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__["default"];
|
|
9081
|
-
const legacyInterceptorReqResOrdering =
|
|
9176
|
+
const legacyInterceptorReqResOrdering =
|
|
9177
|
+
transitional && transitional.legacyInterceptorReqResOrdering;
|
|
9082
9178
|
|
|
9083
9179
|
if (legacyInterceptorReqResOrdering) {
|
|
9084
9180
|
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
@@ -9152,28 +9248,32 @@ class Axios {
|
|
|
9152
9248
|
// Provide aliases for supported request methods
|
|
9153
9249
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
9154
9250
|
/*eslint func-names:0*/
|
|
9155
|
-
Axios.prototype[method] = function(url, config) {
|
|
9156
|
-
return this.request(
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9251
|
+
Axios.prototype[method] = function (url, config) {
|
|
9252
|
+
return this.request(
|
|
9253
|
+
(0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config || {}, {
|
|
9254
|
+
method,
|
|
9255
|
+
url,
|
|
9256
|
+
data: (config || {}).data,
|
|
9257
|
+
})
|
|
9258
|
+
);
|
|
9161
9259
|
};
|
|
9162
9260
|
});
|
|
9163
9261
|
|
|
9164
9262
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
9165
|
-
/*eslint func-names:0*/
|
|
9166
|
-
|
|
9167
9263
|
function generateHTTPMethod(isForm) {
|
|
9168
9264
|
return function httpMethod(url, data, config) {
|
|
9169
|
-
return this.request(
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9265
|
+
return this.request(
|
|
9266
|
+
(0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config || {}, {
|
|
9267
|
+
method,
|
|
9268
|
+
headers: isForm
|
|
9269
|
+
? {
|
|
9270
|
+
'Content-Type': 'multipart/form-data',
|
|
9271
|
+
}
|
|
9272
|
+
: {},
|
|
9273
|
+
url,
|
|
9274
|
+
data,
|
|
9275
|
+
})
|
|
9276
|
+
);
|
|
9177
9277
|
};
|
|
9178
9278
|
}
|
|
9179
9279
|
|
|
@@ -9204,14 +9304,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9204
9304
|
|
|
9205
9305
|
|
|
9206
9306
|
class AxiosError extends Error {
|
|
9207
|
-
|
|
9208
|
-
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
|
|
9212
|
-
|
|
9307
|
+
static from(error, code, config, request, response, customProps) {
|
|
9308
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
9309
|
+
axiosError.cause = error;
|
|
9310
|
+
axiosError.name = error.name;
|
|
9311
|
+
|
|
9312
|
+
// Preserve status from the original error if not already set from response
|
|
9313
|
+
if (error.status != null && axiosError.status == null) {
|
|
9314
|
+
axiosError.status = error.status;
|
|
9213
9315
|
}
|
|
9214
9316
|
|
|
9317
|
+
customProps && Object.assign(axiosError, customProps);
|
|
9318
|
+
return axiosError;
|
|
9319
|
+
}
|
|
9320
|
+
|
|
9215
9321
|
/**
|
|
9216
9322
|
* Create an Error with the specified message, config, error code, request and response.
|
|
9217
9323
|
*
|
|
@@ -9224,37 +9330,48 @@ class AxiosError extends Error {
|
|
|
9224
9330
|
* @returns {Error} The created error.
|
|
9225
9331
|
*/
|
|
9226
9332
|
constructor(message, code, config, request, response) {
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9236
|
-
|
|
9333
|
+
super(message);
|
|
9334
|
+
|
|
9335
|
+
// Make message enumerable to maintain backward compatibility
|
|
9336
|
+
// The native Error constructor sets message as non-enumerable,
|
|
9337
|
+
// but axios < v1.13.3 had it as enumerable
|
|
9338
|
+
Object.defineProperty(this, 'message', {
|
|
9339
|
+
value: message,
|
|
9340
|
+
enumerable: true,
|
|
9341
|
+
writable: true,
|
|
9342
|
+
configurable: true
|
|
9343
|
+
});
|
|
9344
|
+
|
|
9345
|
+
this.name = 'AxiosError';
|
|
9346
|
+
this.isAxiosError = true;
|
|
9347
|
+
code && (this.code = code);
|
|
9348
|
+
config && (this.config = config);
|
|
9349
|
+
request && (this.request = request);
|
|
9350
|
+
if (response) {
|
|
9351
|
+
this.response = response;
|
|
9352
|
+
this.status = response.status;
|
|
9353
|
+
}
|
|
9237
9354
|
}
|
|
9238
9355
|
|
|
9239
|
-
|
|
9240
|
-
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
|
|
9244
|
-
|
|
9245
|
-
|
|
9246
|
-
|
|
9247
|
-
|
|
9248
|
-
|
|
9249
|
-
|
|
9250
|
-
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9356
|
+
toJSON() {
|
|
9357
|
+
return {
|
|
9358
|
+
// Standard
|
|
9359
|
+
message: this.message,
|
|
9360
|
+
name: this.name,
|
|
9361
|
+
// Microsoft
|
|
9362
|
+
description: this.description,
|
|
9363
|
+
number: this.number,
|
|
9364
|
+
// Mozilla
|
|
9365
|
+
fileName: this.fileName,
|
|
9366
|
+
lineNumber: this.lineNumber,
|
|
9367
|
+
columnNumber: this.columnNumber,
|
|
9368
|
+
stack: this.stack,
|
|
9369
|
+
// Axios
|
|
9370
|
+
config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config),
|
|
9371
|
+
code: this.code,
|
|
9372
|
+
status: this.status,
|
|
9373
|
+
};
|
|
9374
|
+
}
|
|
9258
9375
|
}
|
|
9259
9376
|
|
|
9260
9377
|
// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
|
|
@@ -9296,16 +9413,49 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9296
9413
|
|
|
9297
9414
|
const $internals = Symbol('internals');
|
|
9298
9415
|
|
|
9416
|
+
const isValidHeaderValue = (value) => !/[\r\n]/.test(value);
|
|
9417
|
+
|
|
9418
|
+
function assertValidHeaderValue(value, header) {
|
|
9419
|
+
if (value === false || value == null) {
|
|
9420
|
+
return;
|
|
9421
|
+
}
|
|
9422
|
+
|
|
9423
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value)) {
|
|
9424
|
+
value.forEach((v) => assertValidHeaderValue(v, header));
|
|
9425
|
+
return;
|
|
9426
|
+
}
|
|
9427
|
+
|
|
9428
|
+
if (!isValidHeaderValue(String(value))) {
|
|
9429
|
+
throw new Error(`Invalid character in header content ["${header}"]`);
|
|
9430
|
+
}
|
|
9431
|
+
}
|
|
9432
|
+
|
|
9299
9433
|
function normalizeHeader(header) {
|
|
9300
9434
|
return header && String(header).trim().toLowerCase();
|
|
9301
9435
|
}
|
|
9302
9436
|
|
|
9437
|
+
function stripTrailingCRLF(str) {
|
|
9438
|
+
let end = str.length;
|
|
9439
|
+
|
|
9440
|
+
while (end > 0) {
|
|
9441
|
+
const charCode = str.charCodeAt(end - 1);
|
|
9442
|
+
|
|
9443
|
+
if (charCode !== 10 && charCode !== 13) {
|
|
9444
|
+
break;
|
|
9445
|
+
}
|
|
9446
|
+
|
|
9447
|
+
end -= 1;
|
|
9448
|
+
}
|
|
9449
|
+
|
|
9450
|
+
return end === str.length ? str : str.slice(0, end);
|
|
9451
|
+
}
|
|
9452
|
+
|
|
9303
9453
|
function normalizeValue(value) {
|
|
9304
9454
|
if (value === false || value == null) {
|
|
9305
9455
|
return value;
|
|
9306
9456
|
}
|
|
9307
9457
|
|
|
9308
|
-
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : String(value);
|
|
9458
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
|
|
9309
9459
|
}
|
|
9310
9460
|
|
|
9311
9461
|
function parseTokens(str) {
|
|
@@ -9343,8 +9493,10 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
|
9343
9493
|
}
|
|
9344
9494
|
|
|
9345
9495
|
function formatHeader(header) {
|
|
9346
|
-
return header
|
|
9347
|
-
.
|
|
9496
|
+
return header
|
|
9497
|
+
.trim()
|
|
9498
|
+
.toLowerCase()
|
|
9499
|
+
.replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
9348
9500
|
return char.toUpperCase() + str;
|
|
9349
9501
|
});
|
|
9350
9502
|
}
|
|
@@ -9352,12 +9504,12 @@ function formatHeader(header) {
|
|
|
9352
9504
|
function buildAccessors(obj, header) {
|
|
9353
9505
|
const accessorName = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toCamelCase(' ' + header);
|
|
9354
9506
|
|
|
9355
|
-
['get', 'set', 'has'].forEach(methodName => {
|
|
9507
|
+
['get', 'set', 'has'].forEach((methodName) => {
|
|
9356
9508
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
9357
|
-
value: function(arg1, arg2, arg3) {
|
|
9509
|
+
value: function (arg1, arg2, arg3) {
|
|
9358
9510
|
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
9359
9511
|
},
|
|
9360
|
-
configurable: true
|
|
9512
|
+
configurable: true,
|
|
9361
9513
|
});
|
|
9362
9514
|
});
|
|
9363
9515
|
}
|
|
@@ -9379,7 +9531,13 @@ class AxiosHeaders {
|
|
|
9379
9531
|
|
|
9380
9532
|
const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, lHeader);
|
|
9381
9533
|
|
|
9382
|
-
if
|
|
9534
|
+
if (
|
|
9535
|
+
!key ||
|
|
9536
|
+
self[key] === undefined ||
|
|
9537
|
+
_rewrite === true ||
|
|
9538
|
+
(_rewrite === undefined && self[key] !== false)
|
|
9539
|
+
) {
|
|
9540
|
+
assertValidHeaderValue(_value, _header);
|
|
9383
9541
|
self[key || _header] = normalizeValue(_value);
|
|
9384
9542
|
}
|
|
9385
9543
|
}
|
|
@@ -9388,21 +9546,26 @@ class AxiosHeaders {
|
|
|
9388
9546
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
9389
9547
|
|
|
9390
9548
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(header) || header instanceof this.constructor) {
|
|
9391
|
-
setHeaders(header, valueOrRewrite)
|
|
9392
|
-
} else if(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
9549
|
+
setHeaders(header, valueOrRewrite);
|
|
9550
|
+
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
9393
9551
|
setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite);
|
|
9394
9552
|
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(header) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isIterable(header)) {
|
|
9395
|
-
let obj = {},
|
|
9553
|
+
let obj = {},
|
|
9554
|
+
dest,
|
|
9555
|
+
key;
|
|
9396
9556
|
for (const entry of header) {
|
|
9397
9557
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(entry)) {
|
|
9398
9558
|
throw TypeError('Object iterator must return a key-value pair');
|
|
9399
9559
|
}
|
|
9400
9560
|
|
|
9401
|
-
obj[key = entry[0]] = (dest = obj[key])
|
|
9402
|
-
|
|
9561
|
+
obj[(key = entry[0])] = (dest = obj[key])
|
|
9562
|
+
? _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(dest)
|
|
9563
|
+
? [...dest, entry[1]]
|
|
9564
|
+
: [dest, entry[1]]
|
|
9565
|
+
: entry[1];
|
|
9403
9566
|
}
|
|
9404
9567
|
|
|
9405
|
-
setHeaders(obj, valueOrRewrite)
|
|
9568
|
+
setHeaders(obj, valueOrRewrite);
|
|
9406
9569
|
} else {
|
|
9407
9570
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
9408
9571
|
}
|
|
@@ -9446,7 +9609,11 @@ class AxiosHeaders {
|
|
|
9446
9609
|
if (header) {
|
|
9447
9610
|
const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header);
|
|
9448
9611
|
|
|
9449
|
-
return !!(
|
|
9612
|
+
return !!(
|
|
9613
|
+
key &&
|
|
9614
|
+
this[key] !== undefined &&
|
|
9615
|
+
(!matcher || matchHeaderValue(this, this[key], key, matcher))
|
|
9616
|
+
);
|
|
9450
9617
|
}
|
|
9451
9618
|
|
|
9452
9619
|
return false;
|
|
@@ -9486,7 +9653,7 @@ class AxiosHeaders {
|
|
|
9486
9653
|
|
|
9487
9654
|
while (i--) {
|
|
9488
9655
|
const key = keys[i];
|
|
9489
|
-
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
9656
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
9490
9657
|
delete this[key];
|
|
9491
9658
|
deleted = true;
|
|
9492
9659
|
}
|
|
@@ -9530,7 +9697,9 @@ class AxiosHeaders {
|
|
|
9530
9697
|
const obj = Object.create(null);
|
|
9531
9698
|
|
|
9532
9699
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => {
|
|
9533
|
-
value != null &&
|
|
9700
|
+
value != null &&
|
|
9701
|
+
value !== false &&
|
|
9702
|
+
(obj[header] = asStrings && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.join(', ') : value);
|
|
9534
9703
|
});
|
|
9535
9704
|
|
|
9536
9705
|
return obj;
|
|
@@ -9541,11 +9710,13 @@ class AxiosHeaders {
|
|
|
9541
9710
|
}
|
|
9542
9711
|
|
|
9543
9712
|
toString() {
|
|
9544
|
-
return Object.entries(this.toJSON())
|
|
9713
|
+
return Object.entries(this.toJSON())
|
|
9714
|
+
.map(([header, value]) => header + ': ' + value)
|
|
9715
|
+
.join('\n');
|
|
9545
9716
|
}
|
|
9546
9717
|
|
|
9547
9718
|
getSetCookie() {
|
|
9548
|
-
return this.get(
|
|
9719
|
+
return this.get('set-cookie') || [];
|
|
9549
9720
|
}
|
|
9550
9721
|
|
|
9551
9722
|
get [Symbol.toStringTag]() {
|
|
@@ -9565,9 +9736,12 @@ class AxiosHeaders {
|
|
|
9565
9736
|
}
|
|
9566
9737
|
|
|
9567
9738
|
static accessor(header) {
|
|
9568
|
-
const internals =
|
|
9569
|
-
|
|
9570
|
-
|
|
9739
|
+
const internals =
|
|
9740
|
+
(this[$internals] =
|
|
9741
|
+
this[$internals] =
|
|
9742
|
+
{
|
|
9743
|
+
accessors: {},
|
|
9744
|
+
});
|
|
9571
9745
|
|
|
9572
9746
|
const accessors = internals.accessors;
|
|
9573
9747
|
const prototype = this.prototype;
|
|
@@ -9587,17 +9761,24 @@ class AxiosHeaders {
|
|
|
9587
9761
|
}
|
|
9588
9762
|
}
|
|
9589
9763
|
|
|
9590
|
-
AxiosHeaders.accessor([
|
|
9764
|
+
AxiosHeaders.accessor([
|
|
9765
|
+
'Content-Type',
|
|
9766
|
+
'Content-Length',
|
|
9767
|
+
'Accept',
|
|
9768
|
+
'Accept-Encoding',
|
|
9769
|
+
'User-Agent',
|
|
9770
|
+
'Authorization',
|
|
9771
|
+
]);
|
|
9591
9772
|
|
|
9592
9773
|
// reserved names hotfix
|
|
9593
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
9774
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
9594
9775
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
9595
9776
|
return {
|
|
9596
9777
|
get: () => value,
|
|
9597
9778
|
set(headerValue) {
|
|
9598
9779
|
this[mapped] = headerValue;
|
|
9599
|
-
}
|
|
9600
|
-
}
|
|
9780
|
+
},
|
|
9781
|
+
};
|
|
9601
9782
|
});
|
|
9602
9783
|
|
|
9603
9784
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders);
|
|
@@ -9642,7 +9823,7 @@ class InterceptorManager {
|
|
|
9642
9823
|
fulfilled,
|
|
9643
9824
|
rejected,
|
|
9644
9825
|
synchronous: options ? options.synchronous : false,
|
|
9645
|
-
runWhen: options ? options.runWhen : null
|
|
9826
|
+
runWhen: options ? options.runWhen : null,
|
|
9646
9827
|
});
|
|
9647
9828
|
return this.handlers.length - 1;
|
|
9648
9829
|
}
|
|
@@ -9790,10 +9971,7 @@ function dispatchRequest(config) {
|
|
|
9790
9971
|
config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(config.headers);
|
|
9791
9972
|
|
|
9792
9973
|
// Transform request data
|
|
9793
|
-
config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
|
|
9794
|
-
config,
|
|
9795
|
-
config.transformRequest
|
|
9796
|
-
);
|
|
9974
|
+
config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(config, config.transformRequest);
|
|
9797
9975
|
|
|
9798
9976
|
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
|
|
9799
9977
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
@@ -9801,36 +9979,35 @@ function dispatchRequest(config) {
|
|
|
9801
9979
|
|
|
9802
9980
|
const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_5__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].adapter, config);
|
|
9803
9981
|
|
|
9804
|
-
return adapter(config).then(
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
// Transform response data
|
|
9808
|
-
response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
|
|
9809
|
-
config,
|
|
9810
|
-
config.transformResponse,
|
|
9811
|
-
response
|
|
9812
|
-
);
|
|
9813
|
-
|
|
9814
|
-
response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(response.headers);
|
|
9815
|
-
|
|
9816
|
-
return response;
|
|
9817
|
-
}, function onAdapterRejection(reason) {
|
|
9818
|
-
if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_1__["default"])(reason)) {
|
|
9982
|
+
return adapter(config).then(
|
|
9983
|
+
function onAdapterResolution(response) {
|
|
9819
9984
|
throwIfCancellationRequested(config);
|
|
9820
9985
|
|
|
9821
9986
|
// Transform response data
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
|
|
9987
|
+
response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(config, config.transformResponse, response);
|
|
9988
|
+
|
|
9989
|
+
response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(response.headers);
|
|
9990
|
+
|
|
9991
|
+
return response;
|
|
9992
|
+
},
|
|
9993
|
+
function onAdapterRejection(reason) {
|
|
9994
|
+
if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_1__["default"])(reason)) {
|
|
9995
|
+
throwIfCancellationRequested(config);
|
|
9996
|
+
|
|
9997
|
+
// Transform response data
|
|
9998
|
+
if (reason && reason.response) {
|
|
9999
|
+
reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
|
|
10000
|
+
config,
|
|
10001
|
+
config.transformResponse,
|
|
10002
|
+
reason.response
|
|
10003
|
+
);
|
|
10004
|
+
reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(reason.response.headers);
|
|
10005
|
+
}
|
|
9829
10006
|
}
|
|
9830
|
-
}
|
|
9831
10007
|
|
|
9832
|
-
|
|
9833
|
-
|
|
10008
|
+
return Promise.reject(reason);
|
|
10009
|
+
}
|
|
10010
|
+
);
|
|
9834
10011
|
}
|
|
9835
10012
|
|
|
9836
10013
|
|
|
@@ -9854,8 +10031,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9854
10031
|
|
|
9855
10032
|
|
|
9856
10033
|
|
|
9857
|
-
const headersToObject = (thing) =>
|
|
9858
|
-
thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"] ? { ...thing } : thing;
|
|
10034
|
+
const headersToObject = (thing) => (thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"] ? { ...thing } : thing);
|
|
9859
10035
|
|
|
9860
10036
|
/**
|
|
9861
10037
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -9948,23 +10124,12 @@ function mergeConfig(config1, config2) {
|
|
|
9948
10124
|
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
9949
10125
|
};
|
|
9950
10126
|
|
|
9951
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
prop === "prototype"
|
|
9958
|
-
)
|
|
9959
|
-
return;
|
|
9960
|
-
const merge = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(mergeMap, prop)
|
|
9961
|
-
? mergeMap[prop]
|
|
9962
|
-
: mergeDeepProperties;
|
|
9963
|
-
const configValue = merge(config1[prop], config2[prop], prop);
|
|
9964
|
-
(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) ||
|
|
9965
|
-
(config[prop] = configValue);
|
|
9966
|
-
},
|
|
9967
|
-
);
|
|
10127
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
10128
|
+
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
10129
|
+
const merge = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
10130
|
+
const configValue = merge(config1[prop], config2[prop], prop);
|
|
10131
|
+
(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
10132
|
+
});
|
|
9968
10133
|
|
|
9969
10134
|
return config;
|
|
9970
10135
|
}
|
|
@@ -10002,13 +10167,17 @@ function settle(resolve, reject, response) {
|
|
|
10002
10167
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
10003
10168
|
resolve(response);
|
|
10004
10169
|
} else {
|
|
10005
|
-
reject(
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
|
|
10011
|
-
|
|
10170
|
+
reject(
|
|
10171
|
+
new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
|
|
10172
|
+
'Request failed with status code ' + response.status,
|
|
10173
|
+
[_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE][
|
|
10174
|
+
Math.floor(response.status / 100) - 4
|
|
10175
|
+
],
|
|
10176
|
+
response.config,
|
|
10177
|
+
response.request,
|
|
10178
|
+
response
|
|
10179
|
+
)
|
|
10180
|
+
);
|
|
10012
10181
|
}
|
|
10013
10182
|
}
|
|
10014
10183
|
|
|
@@ -10115,96 +10284,107 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
10115
10284
|
}
|
|
10116
10285
|
|
|
10117
10286
|
const defaults = {
|
|
10118
|
-
|
|
10119
10287
|
transitional: _transitional_js__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
10120
10288
|
|
|
10121
10289
|
adapter: ['xhr', 'http', 'fetch'],
|
|
10122
10290
|
|
|
10123
|
-
transformRequest: [
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10291
|
+
transformRequest: [
|
|
10292
|
+
function transformRequest(data, headers) {
|
|
10293
|
+
const contentType = headers.getContentType() || '';
|
|
10294
|
+
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
10295
|
+
const isObjectPayload = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(data);
|
|
10127
10296
|
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10297
|
+
if (isObjectPayload && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(data)) {
|
|
10298
|
+
data = new FormData(data);
|
|
10299
|
+
}
|
|
10131
10300
|
|
|
10132
|
-
|
|
10301
|
+
const isFormData = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data);
|
|
10133
10302
|
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10303
|
+
if (isFormData) {
|
|
10304
|
+
return hasJSONContentType ? JSON.stringify((0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_6__["default"])(data)) : data;
|
|
10305
|
+
}
|
|
10137
10306
|
|
|
10138
|
-
|
|
10139
|
-
|
|
10140
|
-
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
|
|
10153
|
-
|
|
10307
|
+
if (
|
|
10308
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(data) ||
|
|
10309
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(data) ||
|
|
10310
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStream(data) ||
|
|
10311
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFile(data) ||
|
|
10312
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(data) ||
|
|
10313
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)
|
|
10314
|
+
) {
|
|
10315
|
+
return data;
|
|
10316
|
+
}
|
|
10317
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBufferView(data)) {
|
|
10318
|
+
return data.buffer;
|
|
10319
|
+
}
|
|
10320
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(data)) {
|
|
10321
|
+
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
10322
|
+
return data.toString();
|
|
10323
|
+
}
|
|
10154
10324
|
|
|
10155
|
-
|
|
10325
|
+
let isFileList;
|
|
10156
10326
|
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
|
|
10327
|
+
if (isObjectPayload) {
|
|
10328
|
+
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
10329
|
+
return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__["default"])(data, this.formSerializer).toString();
|
|
10330
|
+
}
|
|
10161
10331
|
|
|
10162
|
-
|
|
10163
|
-
|
|
10332
|
+
if (
|
|
10333
|
+
(isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) ||
|
|
10334
|
+
contentType.indexOf('multipart/form-data') > -1
|
|
10335
|
+
) {
|
|
10336
|
+
const _FormData = this.env && this.env.FormData;
|
|
10164
10337
|
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10338
|
+
return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
10339
|
+
isFileList ? { 'files[]': data } : data,
|
|
10340
|
+
_FormData && new _FormData(),
|
|
10341
|
+
this.formSerializer
|
|
10342
|
+
);
|
|
10343
|
+
}
|
|
10170
10344
|
}
|
|
10171
|
-
}
|
|
10172
10345
|
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10346
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
10347
|
+
headers.setContentType('application/json', false);
|
|
10348
|
+
return stringifySafely(data);
|
|
10349
|
+
}
|
|
10177
10350
|
|
|
10178
|
-
|
|
10179
|
-
|
|
10351
|
+
return data;
|
|
10352
|
+
},
|
|
10353
|
+
],
|
|
10180
10354
|
|
|
10181
|
-
transformResponse: [
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10355
|
+
transformResponse: [
|
|
10356
|
+
function transformResponse(data) {
|
|
10357
|
+
const transitional = this.transitional || defaults.transitional;
|
|
10358
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
10359
|
+
const JSONRequested = this.responseType === 'json';
|
|
10185
10360
|
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10361
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isResponse(data) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)) {
|
|
10362
|
+
return data;
|
|
10363
|
+
}
|
|
10189
10364
|
|
|
10190
|
-
|
|
10191
|
-
|
|
10192
|
-
|
|
10365
|
+
if (
|
|
10366
|
+
data &&
|
|
10367
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) &&
|
|
10368
|
+
((forcedJSONParsing && !this.responseType) || JSONRequested)
|
|
10369
|
+
) {
|
|
10370
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
10371
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
10193
10372
|
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10373
|
+
try {
|
|
10374
|
+
return JSON.parse(data, this.parseReviver);
|
|
10375
|
+
} catch (e) {
|
|
10376
|
+
if (strictJSONParsing) {
|
|
10377
|
+
if (e.name === 'SyntaxError') {
|
|
10378
|
+
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_RESPONSE, this, null, this.response);
|
|
10379
|
+
}
|
|
10380
|
+
throw e;
|
|
10200
10381
|
}
|
|
10201
|
-
throw e;
|
|
10202
10382
|
}
|
|
10203
10383
|
}
|
|
10204
|
-
}
|
|
10205
10384
|
|
|
10206
|
-
|
|
10207
|
-
|
|
10385
|
+
return data;
|
|
10386
|
+
},
|
|
10387
|
+
],
|
|
10208
10388
|
|
|
10209
10389
|
/**
|
|
10210
10390
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
@@ -10220,7 +10400,7 @@ const defaults = {
|
|
|
10220
10400
|
|
|
10221
10401
|
env: {
|
|
10222
10402
|
FormData: _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].classes.FormData,
|
|
10223
|
-
Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].classes.Blob
|
|
10403
|
+
Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].classes.Blob,
|
|
10224
10404
|
},
|
|
10225
10405
|
|
|
10226
10406
|
validateStatus: function validateStatus(status) {
|
|
@@ -10229,10 +10409,10 @@ const defaults = {
|
|
|
10229
10409
|
|
|
10230
10410
|
headers: {
|
|
10231
10411
|
common: {
|
|
10232
|
-
|
|
10233
|
-
'Content-Type': undefined
|
|
10234
|
-
}
|
|
10235
|
-
}
|
|
10412
|
+
Accept: 'application/json, text/plain, */*',
|
|
10413
|
+
'Content-Type': undefined,
|
|
10414
|
+
},
|
|
10415
|
+
},
|
|
10236
10416
|
};
|
|
10237
10417
|
|
|
10238
10418
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
@@ -10261,7 +10441,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10261
10441
|
silentJSONParsing: true,
|
|
10262
10442
|
forcedJSONParsing: true,
|
|
10263
10443
|
clarifyTimeoutError: false,
|
|
10264
|
-
legacyInterceptorReqResOrdering: true
|
|
10444
|
+
legacyInterceptorReqResOrdering: true,
|
|
10265
10445
|
});
|
|
10266
10446
|
|
|
10267
10447
|
|
|
@@ -10278,7 +10458,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10278
10458
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10279
10459
|
/* harmony export */ VERSION: () => (/* binding */ VERSION)
|
|
10280
10460
|
/* harmony export */ });
|
|
10281
|
-
const VERSION = "1.
|
|
10461
|
+
const VERSION = "1.15.0";
|
|
10282
10462
|
|
|
10283
10463
|
/***/ },
|
|
10284
10464
|
|
|
@@ -10314,7 +10494,7 @@ function encode(str) {
|
|
|
10314
10494
|
')': '%29',
|
|
10315
10495
|
'~': '%7E',
|
|
10316
10496
|
'%20': '+',
|
|
10317
|
-
'%00': '\x00'
|
|
10497
|
+
'%00': '\x00',
|
|
10318
10498
|
};
|
|
10319
10499
|
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
10320
10500
|
return charMap[match];
|
|
@@ -10342,13 +10522,17 @@ prototype.append = function append(name, value) {
|
|
|
10342
10522
|
};
|
|
10343
10523
|
|
|
10344
10524
|
prototype.toString = function toString(encoder) {
|
|
10345
|
-
const _encode = encoder
|
|
10346
|
-
|
|
10347
|
-
|
|
10525
|
+
const _encode = encoder
|
|
10526
|
+
? function (value) {
|
|
10527
|
+
return encoder.call(this, value, encode);
|
|
10528
|
+
}
|
|
10529
|
+
: encode;
|
|
10348
10530
|
|
|
10349
|
-
return this._pairs
|
|
10350
|
-
|
|
10351
|
-
|
|
10531
|
+
return this._pairs
|
|
10532
|
+
.map(function each(pair) {
|
|
10533
|
+
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
10534
|
+
}, '')
|
|
10535
|
+
.join('&');
|
|
10352
10536
|
};
|
|
10353
10537
|
|
|
10354
10538
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosURLSearchParams);
|
|
@@ -10496,19 +10680,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10496
10680
|
|
|
10497
10681
|
|
|
10498
10682
|
/**
|
|
10499
|
-
* It replaces
|
|
10500
|
-
*
|
|
10683
|
+
* It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
|
|
10684
|
+
* their plain counterparts (`:`, `$`, `,`, `+`).
|
|
10501
10685
|
*
|
|
10502
10686
|
* @param {string} val The value to be encoded.
|
|
10503
10687
|
*
|
|
10504
10688
|
* @returns {string} The encoded value.
|
|
10505
10689
|
*/
|
|
10506
10690
|
function encode(val) {
|
|
10507
|
-
return encodeURIComponent(val)
|
|
10508
|
-
replace(/%3A/gi, ':')
|
|
10509
|
-
replace(/%24/g, '$')
|
|
10510
|
-
replace(/%2C/gi, ',')
|
|
10511
|
-
replace(/%20/g, '+');
|
|
10691
|
+
return encodeURIComponent(val)
|
|
10692
|
+
.replace(/%3A/gi, ':')
|
|
10693
|
+
.replace(/%24/g, '$')
|
|
10694
|
+
.replace(/%2C/gi, ',')
|
|
10695
|
+
.replace(/%20/g, '+');
|
|
10512
10696
|
}
|
|
10513
10697
|
|
|
10514
10698
|
/**
|
|
@@ -10525,11 +10709,13 @@ function buildURL(url, params, options) {
|
|
|
10525
10709
|
return url;
|
|
10526
10710
|
}
|
|
10527
10711
|
|
|
10528
|
-
const _encode = options && options.encode || encode;
|
|
10712
|
+
const _encode = (options && options.encode) || encode;
|
|
10529
10713
|
|
|
10530
|
-
const _options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(options)
|
|
10531
|
-
|
|
10532
|
-
|
|
10714
|
+
const _options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(options)
|
|
10715
|
+
? {
|
|
10716
|
+
serialize: options,
|
|
10717
|
+
}
|
|
10718
|
+
: options;
|
|
10533
10719
|
|
|
10534
10720
|
const serializeFn = _options && _options.serialize;
|
|
10535
10721
|
|
|
@@ -10538,13 +10724,13 @@ function buildURL(url, params, options) {
|
|
|
10538
10724
|
if (serializeFn) {
|
|
10539
10725
|
serializedParams = serializeFn(params, _options);
|
|
10540
10726
|
} else {
|
|
10541
|
-
serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params)
|
|
10542
|
-
params.toString()
|
|
10543
|
-
new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params, _options).toString(_encode);
|
|
10727
|
+
serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params)
|
|
10728
|
+
? params.toString()
|
|
10729
|
+
: new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params, _options).toString(_encode);
|
|
10544
10730
|
}
|
|
10545
10731
|
|
|
10546
10732
|
if (serializedParams) {
|
|
10547
|
-
const hashmarkIndex = url.indexOf(
|
|
10733
|
+
const hashmarkIndex = url.indexOf('#');
|
|
10548
10734
|
|
|
10549
10735
|
if (hashmarkIndex !== -1) {
|
|
10550
10736
|
url = url.slice(0, hashmarkIndex);
|
|
@@ -10607,7 +10793,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10607
10793
|
|
|
10608
10794
|
|
|
10609
10795
|
const composeSignals = (signals, timeout) => {
|
|
10610
|
-
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
|
10796
|
+
const { length } = (signals = signals ? signals.filter(Boolean) : []);
|
|
10611
10797
|
|
|
10612
10798
|
if (timeout || length) {
|
|
10613
10799
|
let controller = new AbortController();
|
|
@@ -10619,35 +10805,43 @@ const composeSignals = (signals, timeout) => {
|
|
|
10619
10805
|
aborted = true;
|
|
10620
10806
|
unsubscribe();
|
|
10621
10807
|
const err = reason instanceof Error ? reason : this.reason;
|
|
10622
|
-
controller.abort(
|
|
10808
|
+
controller.abort(
|
|
10809
|
+
err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
10810
|
+
? err
|
|
10811
|
+
: new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](err instanceof Error ? err.message : err)
|
|
10812
|
+
);
|
|
10623
10813
|
}
|
|
10624
|
-
}
|
|
10814
|
+
};
|
|
10625
10815
|
|
|
10626
|
-
let timer =
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10816
|
+
let timer =
|
|
10817
|
+
timeout &&
|
|
10818
|
+
setTimeout(() => {
|
|
10819
|
+
timer = null;
|
|
10820
|
+
onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](`timeout of ${timeout}ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ETIMEDOUT));
|
|
10821
|
+
}, timeout);
|
|
10630
10822
|
|
|
10631
10823
|
const unsubscribe = () => {
|
|
10632
10824
|
if (signals) {
|
|
10633
10825
|
timer && clearTimeout(timer);
|
|
10634
10826
|
timer = null;
|
|
10635
|
-
signals.forEach(signal => {
|
|
10636
|
-
signal.unsubscribe
|
|
10827
|
+
signals.forEach((signal) => {
|
|
10828
|
+
signal.unsubscribe
|
|
10829
|
+
? signal.unsubscribe(onabort)
|
|
10830
|
+
: signal.removeEventListener('abort', onabort);
|
|
10637
10831
|
});
|
|
10638
10832
|
signals = null;
|
|
10639
10833
|
}
|
|
10640
|
-
}
|
|
10834
|
+
};
|
|
10641
10835
|
|
|
10642
10836
|
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
10643
10837
|
|
|
10644
|
-
const {signal} = controller;
|
|
10838
|
+
const { signal } = controller;
|
|
10645
10839
|
|
|
10646
10840
|
signal.unsubscribe = () => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(unsubscribe);
|
|
10647
10841
|
|
|
10648
10842
|
return signal;
|
|
10649
10843
|
}
|
|
10650
|
-
}
|
|
10844
|
+
};
|
|
10651
10845
|
|
|
10652
10846
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (composeSignals);
|
|
10653
10847
|
|
|
@@ -10670,56 +10864,51 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10670
10864
|
|
|
10671
10865
|
|
|
10672
10866
|
|
|
10673
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasStandardBrowserEnv
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
if (typeof document === 'undefined') return;
|
|
10867
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasStandardBrowserEnv
|
|
10868
|
+
? // Standard browser envs support document.cookie
|
|
10869
|
+
{
|
|
10870
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
10871
|
+
if (typeof document === 'undefined') return;
|
|
10679
10872
|
|
|
10680
|
-
|
|
10873
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
10681
10874
|
|
|
10682
|
-
|
|
10683
|
-
|
|
10684
|
-
|
|
10685
|
-
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10689
|
-
|
|
10690
|
-
|
|
10691
|
-
|
|
10692
|
-
|
|
10693
|
-
|
|
10694
|
-
|
|
10695
|
-
|
|
10696
|
-
|
|
10875
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isNumber(expires)) {
|
|
10876
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
10877
|
+
}
|
|
10878
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(path)) {
|
|
10879
|
+
cookie.push(`path=${path}`);
|
|
10880
|
+
}
|
|
10881
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(domain)) {
|
|
10882
|
+
cookie.push(`domain=${domain}`);
|
|
10883
|
+
}
|
|
10884
|
+
if (secure === true) {
|
|
10885
|
+
cookie.push('secure');
|
|
10886
|
+
}
|
|
10887
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(sameSite)) {
|
|
10888
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
10889
|
+
}
|
|
10697
10890
|
|
|
10698
|
-
|
|
10699
|
-
|
|
10891
|
+
document.cookie = cookie.join('; ');
|
|
10892
|
+
},
|
|
10700
10893
|
|
|
10701
|
-
|
|
10702
|
-
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
|
|
10894
|
+
read(name) {
|
|
10895
|
+
if (typeof document === 'undefined') return null;
|
|
10896
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
10897
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
10898
|
+
},
|
|
10706
10899
|
|
|
10707
|
-
|
|
10708
|
-
|
|
10900
|
+
remove(name) {
|
|
10901
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
10902
|
+
},
|
|
10709
10903
|
}
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
return null;
|
|
10719
|
-
},
|
|
10720
|
-
remove() {}
|
|
10721
|
-
});
|
|
10722
|
-
|
|
10904
|
+
: // Non-standard browser env (web workers, react-native) lack needed support.
|
|
10905
|
+
{
|
|
10906
|
+
write() {},
|
|
10907
|
+
read() {
|
|
10908
|
+
return null;
|
|
10909
|
+
},
|
|
10910
|
+
remove() {},
|
|
10911
|
+
});
|
|
10723
10912
|
|
|
10724
10913
|
|
|
10725
10914
|
/***/ },
|
|
@@ -10752,7 +10941,7 @@ function parsePropPath(name) {
|
|
|
10752
10941
|
// foo.x.y.z
|
|
10753
10942
|
// foo-x-y-z
|
|
10754
10943
|
// foo x y z
|
|
10755
|
-
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
10944
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
10756
10945
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
10757
10946
|
});
|
|
10758
10947
|
}
|
|
@@ -10867,7 +11056,6 @@ function isAbsoluteURL(url) {
|
|
|
10867
11056
|
}
|
|
10868
11057
|
|
|
10869
11058
|
|
|
10870
|
-
|
|
10871
11059
|
/***/ },
|
|
10872
11060
|
|
|
10873
11061
|
/***/ "./node_modules/axios/lib/helpers/isAxiosError.js"
|
|
@@ -10894,7 +11082,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10894
11082
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
10895
11083
|
*/
|
|
10896
11084
|
function isAxiosError(payload) {
|
|
10897
|
-
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) &&
|
|
11085
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) && payload.isAxiosError === true;
|
|
10898
11086
|
}
|
|
10899
11087
|
|
|
10900
11088
|
|
|
@@ -10914,18 +11102,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10914
11102
|
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
|
|
10915
11103
|
|
|
10916
11104
|
|
|
10917
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv
|
|
10918
|
-
|
|
11105
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv
|
|
11106
|
+
? ((origin, isMSIE) => (url) => {
|
|
11107
|
+
url = new URL(url, _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin);
|
|
10919
11108
|
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
})(
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
)
|
|
11109
|
+
return (
|
|
11110
|
+
origin.protocol === url.protocol &&
|
|
11111
|
+
origin.host === url.host &&
|
|
11112
|
+
(isMSIE || origin.port === url.port)
|
|
11113
|
+
);
|
|
11114
|
+
})(
|
|
11115
|
+
new URL(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin),
|
|
11116
|
+
_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent)
|
|
11117
|
+
)
|
|
11118
|
+
: () => true);
|
|
10929
11119
|
|
|
10930
11120
|
|
|
10931
11121
|
/***/ },
|
|
@@ -10966,10 +11156,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10966
11156
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
10967
11157
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
10968
11158
|
const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toObjectSet([
|
|
10969
|
-
'age',
|
|
10970
|
-
'
|
|
10971
|
-
'
|
|
10972
|
-
'
|
|
11159
|
+
'age',
|
|
11160
|
+
'authorization',
|
|
11161
|
+
'content-length',
|
|
11162
|
+
'content-type',
|
|
11163
|
+
'etag',
|
|
11164
|
+
'expires',
|
|
11165
|
+
'from',
|
|
11166
|
+
'host',
|
|
11167
|
+
'if-modified-since',
|
|
11168
|
+
'if-unmodified-since',
|
|
11169
|
+
'last-modified',
|
|
11170
|
+
'location',
|
|
11171
|
+
'max-forwards',
|
|
11172
|
+
'proxy-authorization',
|
|
11173
|
+
'referer',
|
|
11174
|
+
'retry-after',
|
|
11175
|
+
'user-agent',
|
|
10973
11176
|
]);
|
|
10974
11177
|
|
|
10975
11178
|
/**
|
|
@@ -10986,34 +11189,36 @@ const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toOb
|
|
|
10986
11189
|
*
|
|
10987
11190
|
* @returns {Object} Headers parsed into an object
|
|
10988
11191
|
*/
|
|
10989
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rawHeaders => {
|
|
11192
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((rawHeaders) => {
|
|
10990
11193
|
const parsed = {};
|
|
10991
11194
|
let key;
|
|
10992
11195
|
let val;
|
|
10993
11196
|
let i;
|
|
10994
11197
|
|
|
10995
|
-
rawHeaders &&
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
|
|
11198
|
+
rawHeaders &&
|
|
11199
|
+
rawHeaders.split('\n').forEach(function parser(line) {
|
|
11200
|
+
i = line.indexOf(':');
|
|
11201
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
11202
|
+
val = line.substring(i + 1).trim();
|
|
10999
11203
|
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
|
|
11204
|
+
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
|
|
11205
|
+
return;
|
|
11206
|
+
}
|
|
11003
11207
|
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11208
|
+
if (key === 'set-cookie') {
|
|
11209
|
+
if (parsed[key]) {
|
|
11210
|
+
parsed[key].push(val);
|
|
11211
|
+
} else {
|
|
11212
|
+
parsed[key] = [val];
|
|
11213
|
+
}
|
|
11007
11214
|
} else {
|
|
11008
|
-
parsed[key] = [val
|
|
11215
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
11009
11216
|
}
|
|
11010
|
-
}
|
|
11011
|
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
11012
|
-
}
|
|
11013
|
-
});
|
|
11217
|
+
});
|
|
11014
11218
|
|
|
11015
11219
|
return parsed;
|
|
11016
11220
|
});
|
|
11221
|
+
(Object.getOwnPropertyDescriptor(__WEBPACK_DEFAULT_EXPORT__, "name") || {}).writable || Object.defineProperty(__WEBPACK_DEFAULT_EXPORT__, "name", { value: "default", configurable: true });
|
|
11017
11222
|
|
|
11018
11223
|
|
|
11019
11224
|
/***/ },
|
|
@@ -11033,7 +11238,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11033
11238
|
|
|
11034
11239
|
function parseProtocol(url) {
|
|
11035
11240
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
11036
|
-
return match && match[1] || '';
|
|
11241
|
+
return (match && match[1]) || '';
|
|
11037
11242
|
}
|
|
11038
11243
|
|
|
11039
11244
|
|
|
@@ -11063,7 +11268,7 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
11063
11268
|
let bytesNotified = 0;
|
|
11064
11269
|
const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250);
|
|
11065
11270
|
|
|
11066
|
-
return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e => {
|
|
11271
|
+
return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])((e) => {
|
|
11067
11272
|
const loaded = e.loaded;
|
|
11068
11273
|
const total = e.lengthComputable ? e.total : undefined;
|
|
11069
11274
|
const progressBytes = loaded - bytesNotified;
|
|
@@ -11075,30 +11280,37 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
11075
11280
|
const data = {
|
|
11076
11281
|
loaded,
|
|
11077
11282
|
total,
|
|
11078
|
-
progress: total ?
|
|
11283
|
+
progress: total ? loaded / total : undefined,
|
|
11079
11284
|
bytes: progressBytes,
|
|
11080
11285
|
rate: rate ? rate : undefined,
|
|
11081
11286
|
estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
|
|
11082
11287
|
event: e,
|
|
11083
11288
|
lengthComputable: total != null,
|
|
11084
|
-
[isDownloadStream ? 'download' : 'upload']: true
|
|
11289
|
+
[isDownloadStream ? 'download' : 'upload']: true,
|
|
11085
11290
|
};
|
|
11086
11291
|
|
|
11087
11292
|
listener(data);
|
|
11088
11293
|
}, freq);
|
|
11089
|
-
}
|
|
11294
|
+
};
|
|
11090
11295
|
|
|
11091
11296
|
const progressEventDecorator = (total, throttled) => {
|
|
11092
11297
|
const lengthComputable = total != null;
|
|
11093
11298
|
|
|
11094
|
-
return [
|
|
11095
|
-
|
|
11096
|
-
|
|
11097
|
-
|
|
11098
|
-
|
|
11099
|
-
|
|
11299
|
+
return [
|
|
11300
|
+
(loaded) =>
|
|
11301
|
+
throttled[0]({
|
|
11302
|
+
lengthComputable,
|
|
11303
|
+
total,
|
|
11304
|
+
loaded,
|
|
11305
|
+
}),
|
|
11306
|
+
throttled[1],
|
|
11307
|
+
];
|
|
11308
|
+
};
|
|
11100
11309
|
|
|
11101
|
-
const asyncDecorator =
|
|
11310
|
+
const asyncDecorator =
|
|
11311
|
+
(fn) =>
|
|
11312
|
+
(...args) =>
|
|
11313
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(() => fn(...args));
|
|
11102
11314
|
|
|
11103
11315
|
|
|
11104
11316
|
/***/ },
|
|
@@ -11138,12 +11350,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11138
11350
|
|
|
11139
11351
|
newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(headers);
|
|
11140
11352
|
|
|
11141
|
-
newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(
|
|
11353
|
+
newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(
|
|
11354
|
+
(0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
|
|
11355
|
+
config.params,
|
|
11356
|
+
config.paramsSerializer
|
|
11357
|
+
);
|
|
11142
11358
|
|
|
11143
11359
|
// HTTP basic authentication
|
|
11144
11360
|
if (auth) {
|
|
11145
|
-
headers.set(
|
|
11146
|
-
|
|
11361
|
+
headers.set(
|
|
11362
|
+
'Authorization',
|
|
11363
|
+
'Basic ' +
|
|
11364
|
+
btoa(
|
|
11365
|
+
(auth.username || '') +
|
|
11366
|
+
':' +
|
|
11367
|
+
(auth.password ? unescape(encodeURIComponent(auth.password)) : '')
|
|
11368
|
+
)
|
|
11147
11369
|
);
|
|
11148
11370
|
}
|
|
11149
11371
|
|
|
@@ -11161,7 +11383,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11161
11383
|
}
|
|
11162
11384
|
});
|
|
11163
11385
|
}
|
|
11164
|
-
}
|
|
11386
|
+
}
|
|
11165
11387
|
|
|
11166
11388
|
// Add xsrf header
|
|
11167
11389
|
// This is only done if running in a standard browser environment.
|
|
@@ -11182,7 +11404,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11182
11404
|
|
|
11183
11405
|
return newConfig;
|
|
11184
11406
|
});
|
|
11185
|
-
|
|
11407
|
+
(Object.getOwnPropertyDescriptor(__WEBPACK_DEFAULT_EXPORT__, "name") || {}).writable || Object.defineProperty(__WEBPACK_DEFAULT_EXPORT__, "name", { value: "default", configurable: true });
|
|
11186
11408
|
|
|
11187
11409
|
|
|
11188
11410
|
/***/ },
|
|
@@ -11248,7 +11470,7 @@ function speedometer(samplesCount, min) {
|
|
|
11248
11470
|
|
|
11249
11471
|
const passed = startedAt && now - startedAt;
|
|
11250
11472
|
|
|
11251
|
-
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
11473
|
+
return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
|
|
11252
11474
|
};
|
|
11253
11475
|
}
|
|
11254
11476
|
|
|
@@ -11331,23 +11553,23 @@ function throttle(fn, freq) {
|
|
|
11331
11553
|
timer = null;
|
|
11332
11554
|
}
|
|
11333
11555
|
fn(...args);
|
|
11334
|
-
}
|
|
11556
|
+
};
|
|
11335
11557
|
|
|
11336
11558
|
const throttled = (...args) => {
|
|
11337
11559
|
const now = Date.now();
|
|
11338
11560
|
const passed = now - timestamp;
|
|
11339
|
-
if (
|
|
11561
|
+
if (passed >= threshold) {
|
|
11340
11562
|
invoke(args, now);
|
|
11341
11563
|
} else {
|
|
11342
11564
|
lastArgs = args;
|
|
11343
11565
|
if (!timer) {
|
|
11344
11566
|
timer = setTimeout(() => {
|
|
11345
11567
|
timer = null;
|
|
11346
|
-
invoke(lastArgs)
|
|
11568
|
+
invoke(lastArgs);
|
|
11347
11569
|
}, threshold - passed);
|
|
11348
11570
|
}
|
|
11349
11571
|
}
|
|
11350
|
-
}
|
|
11572
|
+
};
|
|
11351
11573
|
|
|
11352
11574
|
const flush = () => lastArgs && invoke(lastArgs);
|
|
11353
11575
|
|
|
@@ -11413,11 +11635,14 @@ function removeBrackets(key) {
|
|
|
11413
11635
|
*/
|
|
11414
11636
|
function renderKey(path, key, dots) {
|
|
11415
11637
|
if (!path) return key;
|
|
11416
|
-
return path
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11638
|
+
return path
|
|
11639
|
+
.concat(key)
|
|
11640
|
+
.map(function each(token, i) {
|
|
11641
|
+
// eslint-disable-next-line no-param-reassign
|
|
11642
|
+
token = removeBrackets(token);
|
|
11643
|
+
return !dots && i ? '[' + token + ']' : token;
|
|
11644
|
+
})
|
|
11645
|
+
.join(dots ? '.' : '');
|
|
11421
11646
|
}
|
|
11422
11647
|
|
|
11423
11648
|
/**
|
|
@@ -11467,21 +11692,26 @@ function toFormData(obj, formData, options) {
|
|
|
11467
11692
|
formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__["default"] || FormData)();
|
|
11468
11693
|
|
|
11469
11694
|
// eslint-disable-next-line no-param-reassign
|
|
11470
|
-
options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11695
|
+
options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(
|
|
11696
|
+
options,
|
|
11697
|
+
{
|
|
11698
|
+
metaTokens: true,
|
|
11699
|
+
dots: false,
|
|
11700
|
+
indexes: false,
|
|
11701
|
+
},
|
|
11702
|
+
false,
|
|
11703
|
+
function defined(option, source) {
|
|
11704
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
11705
|
+
return !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(source[option]);
|
|
11706
|
+
}
|
|
11707
|
+
);
|
|
11478
11708
|
|
|
11479
11709
|
const metaTokens = options.metaTokens;
|
|
11480
11710
|
// eslint-disable-next-line no-use-before-define
|
|
11481
11711
|
const visitor = options.visitor || defaultVisitor;
|
|
11482
11712
|
const dots = options.dots;
|
|
11483
11713
|
const indexes = options.indexes;
|
|
11484
|
-
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
11714
|
+
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
11485
11715
|
const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData);
|
|
11486
11716
|
|
|
11487
11717
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) {
|
|
@@ -11523,6 +11753,11 @@ function toFormData(obj, formData, options) {
|
|
|
11523
11753
|
function defaultVisitor(value, key, path) {
|
|
11524
11754
|
let arr = value;
|
|
11525
11755
|
|
|
11756
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReactNative(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReactNativeBlob(value)) {
|
|
11757
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
11758
|
+
return false;
|
|
11759
|
+
}
|
|
11760
|
+
|
|
11526
11761
|
if (value && !path && typeof value === 'object') {
|
|
11527
11762
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '{}')) {
|
|
11528
11763
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -11531,17 +11766,22 @@ function toFormData(obj, formData, options) {
|
|
|
11531
11766
|
value = JSON.stringify(value);
|
|
11532
11767
|
} else if (
|
|
11533
11768
|
(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) && isFlatArray(value)) ||
|
|
11534
|
-
((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value))
|
|
11535
|
-
|
|
11769
|
+
((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value)))
|
|
11770
|
+
) {
|
|
11536
11771
|
// eslint-disable-next-line no-param-reassign
|
|
11537
11772
|
key = removeBrackets(key);
|
|
11538
11773
|
|
|
11539
11774
|
arr.forEach(function each(el, index) {
|
|
11540
|
-
!(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) &&
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11775
|
+
!(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) &&
|
|
11776
|
+
formData.append(
|
|
11777
|
+
// eslint-disable-next-line no-nested-ternary
|
|
11778
|
+
indexes === true
|
|
11779
|
+
? renderKey([key], index, dots)
|
|
11780
|
+
: indexes === null
|
|
11781
|
+
? key
|
|
11782
|
+
: key + '[]',
|
|
11783
|
+
convertValue(el)
|
|
11784
|
+
);
|
|
11545
11785
|
});
|
|
11546
11786
|
return false;
|
|
11547
11787
|
}
|
|
@@ -11561,7 +11801,7 @@ function toFormData(obj, formData, options) {
|
|
|
11561
11801
|
const exposedHelpers = Object.assign(predicates, {
|
|
11562
11802
|
defaultVisitor,
|
|
11563
11803
|
convertValue,
|
|
11564
|
-
isVisitable
|
|
11804
|
+
isVisitable,
|
|
11565
11805
|
});
|
|
11566
11806
|
|
|
11567
11807
|
function build(value, path) {
|
|
@@ -11574,9 +11814,9 @@ function toFormData(obj, formData, options) {
|
|
|
11574
11814
|
stack.push(value);
|
|
11575
11815
|
|
|
11576
11816
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(value, function each(el, key) {
|
|
11577
|
-
const result =
|
|
11578
|
-
|
|
11579
|
-
|
|
11817
|
+
const result =
|
|
11818
|
+
!(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) &&
|
|
11819
|
+
visitor.call(formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
11580
11820
|
|
|
11581
11821
|
if (result === true) {
|
|
11582
11822
|
build(el, path ? path.concat(key) : [key]);
|
|
@@ -11622,7 +11862,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11622
11862
|
|
|
11623
11863
|
function toURLEncodedForm(data, options) {
|
|
11624
11864
|
return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_1__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].classes.URLSearchParams(), {
|
|
11625
|
-
visitor: function(value, key, path, helpers) {
|
|
11865
|
+
visitor: function (value, key, path, helpers) {
|
|
11626
11866
|
if (_platform_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(value)) {
|
|
11627
11867
|
this.append(key, value.toString('base64'));
|
|
11628
11868
|
return false;
|
|
@@ -11630,7 +11870,7 @@ function toURLEncodedForm(data, options) {
|
|
|
11630
11870
|
|
|
11631
11871
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
11632
11872
|
},
|
|
11633
|
-
...options
|
|
11873
|
+
...options,
|
|
11634
11874
|
});
|
|
11635
11875
|
}
|
|
11636
11876
|
|
|
@@ -11650,7 +11890,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11650
11890
|
/* harmony export */ streamChunk: () => (/* binding */ streamChunk),
|
|
11651
11891
|
/* harmony export */ trackStream: () => (/* binding */ trackStream)
|
|
11652
11892
|
/* harmony export */ });
|
|
11653
|
-
|
|
11654
11893
|
const streamChunk = function* (chunk, chunkSize) {
|
|
11655
11894
|
let len = chunk.byteLength;
|
|
11656
11895
|
|
|
@@ -11667,13 +11906,13 @@ const streamChunk = function* (chunk, chunkSize) {
|
|
|
11667
11906
|
yield chunk.slice(pos, end);
|
|
11668
11907
|
pos = end;
|
|
11669
11908
|
}
|
|
11670
|
-
}
|
|
11909
|
+
};
|
|
11671
11910
|
|
|
11672
11911
|
const readBytes = async function* (iterable, chunkSize) {
|
|
11673
11912
|
for await (const chunk of readStream(iterable)) {
|
|
11674
11913
|
yield* streamChunk(chunk, chunkSize);
|
|
11675
11914
|
}
|
|
11676
|
-
}
|
|
11915
|
+
};
|
|
11677
11916
|
|
|
11678
11917
|
const readStream = async function* (stream) {
|
|
11679
11918
|
if (stream[Symbol.asyncIterator]) {
|
|
@@ -11684,7 +11923,7 @@ const readStream = async function* (stream) {
|
|
|
11684
11923
|
const reader = stream.getReader();
|
|
11685
11924
|
try {
|
|
11686
11925
|
for (;;) {
|
|
11687
|
-
const {done, value} = await reader.read();
|
|
11926
|
+
const { done, value } = await reader.read();
|
|
11688
11927
|
if (done) {
|
|
11689
11928
|
break;
|
|
11690
11929
|
}
|
|
@@ -11693,7 +11932,7 @@ const readStream = async function* (stream) {
|
|
|
11693
11932
|
} finally {
|
|
11694
11933
|
await reader.cancel();
|
|
11695
11934
|
}
|
|
11696
|
-
}
|
|
11935
|
+
};
|
|
11697
11936
|
|
|
11698
11937
|
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
11699
11938
|
const iterator = readBytes(stream, chunkSize);
|
|
@@ -11705,38 +11944,41 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
11705
11944
|
done = true;
|
|
11706
11945
|
onFinish && onFinish(e);
|
|
11707
11946
|
}
|
|
11708
|
-
}
|
|
11947
|
+
};
|
|
11709
11948
|
|
|
11710
|
-
return new ReadableStream(
|
|
11711
|
-
|
|
11712
|
-
|
|
11713
|
-
|
|
11949
|
+
return new ReadableStream(
|
|
11950
|
+
{
|
|
11951
|
+
async pull(controller) {
|
|
11952
|
+
try {
|
|
11953
|
+
const { done, value } = await iterator.next();
|
|
11714
11954
|
|
|
11715
|
-
|
|
11716
|
-
|
|
11717
|
-
|
|
11718
|
-
|
|
11719
|
-
|
|
11955
|
+
if (done) {
|
|
11956
|
+
_onFinish();
|
|
11957
|
+
controller.close();
|
|
11958
|
+
return;
|
|
11959
|
+
}
|
|
11720
11960
|
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11961
|
+
let len = value.byteLength;
|
|
11962
|
+
if (onProgress) {
|
|
11963
|
+
let loadedBytes = (bytes += len);
|
|
11964
|
+
onProgress(loadedBytes);
|
|
11965
|
+
}
|
|
11966
|
+
controller.enqueue(new Uint8Array(value));
|
|
11967
|
+
} catch (err) {
|
|
11968
|
+
_onFinish(err);
|
|
11969
|
+
throw err;
|
|
11725
11970
|
}
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
_onFinish(
|
|
11729
|
-
|
|
11730
|
-
}
|
|
11971
|
+
},
|
|
11972
|
+
cancel(reason) {
|
|
11973
|
+
_onFinish(reason);
|
|
11974
|
+
return iterator.return();
|
|
11975
|
+
},
|
|
11731
11976
|
},
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
return iterator.return();
|
|
11977
|
+
{
|
|
11978
|
+
highWaterMark: 2,
|
|
11735
11979
|
}
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
})
|
|
11739
|
-
}
|
|
11980
|
+
);
|
|
11981
|
+
};
|
|
11740
11982
|
|
|
11741
11983
|
|
|
11742
11984
|
/***/ },
|
|
@@ -11781,7 +12023,15 @@ const deprecatedWarnings = {};
|
|
|
11781
12023
|
*/
|
|
11782
12024
|
validators.transitional = function transitional(validator, version, message) {
|
|
11783
12025
|
function formatMessage(opt, desc) {
|
|
11784
|
-
return
|
|
12026
|
+
return (
|
|
12027
|
+
'[Axios v' +
|
|
12028
|
+
_env_data_js__WEBPACK_IMPORTED_MODULE_0__.VERSION +
|
|
12029
|
+
"] Transitional option '" +
|
|
12030
|
+
opt +
|
|
12031
|
+
"'" +
|
|
12032
|
+
desc +
|
|
12033
|
+
(message ? '. ' + message : '')
|
|
12034
|
+
);
|
|
11785
12035
|
}
|
|
11786
12036
|
|
|
11787
12037
|
// eslint-disable-next-line func-names
|
|
@@ -11813,7 +12063,7 @@ validators.spelling = function spelling(correctSpelling) {
|
|
|
11813
12063
|
// eslint-disable-next-line no-console
|
|
11814
12064
|
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
11815
12065
|
return true;
|
|
11816
|
-
}
|
|
12066
|
+
};
|
|
11817
12067
|
};
|
|
11818
12068
|
|
|
11819
12069
|
/**
|
|
@@ -11839,7 +12089,10 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
11839
12089
|
const value = options[opt];
|
|
11840
12090
|
const result = value === undefined || validator(value, opt, options);
|
|
11841
12091
|
if (result !== true) {
|
|
11842
|
-
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
|
|
12092
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
|
|
12093
|
+
'option ' + opt + ' must be ' + result,
|
|
12094
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE
|
|
12095
|
+
);
|
|
11843
12096
|
}
|
|
11844
12097
|
continue;
|
|
11845
12098
|
}
|
|
@@ -11851,7 +12104,7 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
11851
12104
|
|
|
11852
12105
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
11853
12106
|
assertOptions,
|
|
11854
|
-
validators
|
|
12107
|
+
validators,
|
|
11855
12108
|
});
|
|
11856
12109
|
|
|
11857
12110
|
|
|
@@ -11936,9 +12189,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11936
12189
|
classes: {
|
|
11937
12190
|
URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
11938
12191
|
FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
11939
|
-
Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"]
|
|
12192
|
+
Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
11940
12193
|
},
|
|
11941
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
12194
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
|
|
11942
12195
|
});
|
|
11943
12196
|
|
|
11944
12197
|
|
|
@@ -11961,7 +12214,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11961
12214
|
/* harmony export */ });
|
|
11962
12215
|
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
11963
12216
|
|
|
11964
|
-
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
12217
|
+
const _navigator = (typeof navigator === 'object' && navigator) || undefined;
|
|
11965
12218
|
|
|
11966
12219
|
/**
|
|
11967
12220
|
* Determine if we're running in a standard browser environment
|
|
@@ -11980,7 +12233,8 @@ const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
|
11980
12233
|
*
|
|
11981
12234
|
* @returns {boolean}
|
|
11982
12235
|
*/
|
|
11983
|
-
const hasStandardBrowserEnv =
|
|
12236
|
+
const hasStandardBrowserEnv =
|
|
12237
|
+
hasBrowserEnv &&
|
|
11984
12238
|
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
11985
12239
|
|
|
11986
12240
|
/**
|
|
@@ -12001,7 +12255,7 @@ const hasStandardBrowserWebWorkerEnv = (() => {
|
|
|
12001
12255
|
);
|
|
12002
12256
|
})();
|
|
12003
12257
|
|
|
12004
|
-
const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
12258
|
+
const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
|
|
12005
12259
|
|
|
12006
12260
|
|
|
12007
12261
|
|
|
@@ -12026,7 +12280,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12026
12280
|
|
|
12027
12281
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
12028
12282
|
..._common_utils_js__WEBPACK_IMPORTED_MODULE_1__,
|
|
12029
|
-
..._node_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]
|
|
12283
|
+
..._node_index_js__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
12030
12284
|
});
|
|
12031
12285
|
|
|
12032
12286
|
|
|
@@ -12082,7 +12336,7 @@ const { isArray } = Array;
|
|
|
12082
12336
|
*
|
|
12083
12337
|
* @returns {boolean} True if the value is undefined, otherwise false
|
|
12084
12338
|
*/
|
|
12085
|
-
const isUndefined = typeOfTest(
|
|
12339
|
+
const isUndefined = typeOfTest('undefined');
|
|
12086
12340
|
|
|
12087
12341
|
/**
|
|
12088
12342
|
* Determine if a value is a Buffer
|
|
@@ -12109,7 +12363,7 @@ function isBuffer(val) {
|
|
|
12109
12363
|
*
|
|
12110
12364
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
12111
12365
|
*/
|
|
12112
|
-
const isArrayBuffer = kindOfTest(
|
|
12366
|
+
const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
12113
12367
|
|
|
12114
12368
|
/**
|
|
12115
12369
|
* Determine if a value is a view on an ArrayBuffer
|
|
@@ -12120,7 +12374,7 @@ const isArrayBuffer = kindOfTest("ArrayBuffer");
|
|
|
12120
12374
|
*/
|
|
12121
12375
|
function isArrayBufferView(val) {
|
|
12122
12376
|
let result;
|
|
12123
|
-
if (typeof ArrayBuffer !==
|
|
12377
|
+
if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
|
|
12124
12378
|
result = ArrayBuffer.isView(val);
|
|
12125
12379
|
} else {
|
|
12126
12380
|
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
@@ -12135,7 +12389,7 @@ function isArrayBufferView(val) {
|
|
|
12135
12389
|
*
|
|
12136
12390
|
* @returns {boolean} True if value is a String, otherwise false
|
|
12137
12391
|
*/
|
|
12138
|
-
const isString = typeOfTest(
|
|
12392
|
+
const isString = typeOfTest('string');
|
|
12139
12393
|
|
|
12140
12394
|
/**
|
|
12141
12395
|
* Determine if a value is a Function
|
|
@@ -12143,7 +12397,7 @@ const isString = typeOfTest("string");
|
|
|
12143
12397
|
* @param {*} val The value to test
|
|
12144
12398
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
12145
12399
|
*/
|
|
12146
|
-
const isFunction = typeOfTest(
|
|
12400
|
+
const isFunction = typeOfTest('function');
|
|
12147
12401
|
|
|
12148
12402
|
/**
|
|
12149
12403
|
* Determine if a value is a Number
|
|
@@ -12152,7 +12406,7 @@ const isFunction = typeOfTest("function");
|
|
|
12152
12406
|
*
|
|
12153
12407
|
* @returns {boolean} True if value is a Number, otherwise false
|
|
12154
12408
|
*/
|
|
12155
|
-
const isNumber = typeOfTest(
|
|
12409
|
+
const isNumber = typeOfTest('number');
|
|
12156
12410
|
|
|
12157
12411
|
/**
|
|
12158
12412
|
* Determine if a value is an Object
|
|
@@ -12161,7 +12415,7 @@ const isNumber = typeOfTest("number");
|
|
|
12161
12415
|
*
|
|
12162
12416
|
* @returns {boolean} True if value is an Object, otherwise false
|
|
12163
12417
|
*/
|
|
12164
|
-
const isObject = (thing) => thing !== null && typeof thing ===
|
|
12418
|
+
const isObject = (thing) => thing !== null && typeof thing === 'object';
|
|
12165
12419
|
|
|
12166
12420
|
/**
|
|
12167
12421
|
* Determine if a value is a Boolean
|
|
@@ -12179,7 +12433,7 @@ const isBoolean = (thing) => thing === true || thing === false;
|
|
|
12179
12433
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
12180
12434
|
*/
|
|
12181
12435
|
const isPlainObject = (val) => {
|
|
12182
|
-
if (kindOf(val) !==
|
|
12436
|
+
if (kindOf(val) !== 'object') {
|
|
12183
12437
|
return false;
|
|
12184
12438
|
}
|
|
12185
12439
|
|
|
@@ -12207,10 +12461,7 @@ const isEmptyObject = (val) => {
|
|
|
12207
12461
|
}
|
|
12208
12462
|
|
|
12209
12463
|
try {
|
|
12210
|
-
return (
|
|
12211
|
-
Object.keys(val).length === 0 &&
|
|
12212
|
-
Object.getPrototypeOf(val) === Object.prototype
|
|
12213
|
-
);
|
|
12464
|
+
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
12214
12465
|
} catch (e) {
|
|
12215
12466
|
// Fallback for any other objects that might cause RangeError with Object.keys()
|
|
12216
12467
|
return false;
|
|
@@ -12224,7 +12475,7 @@ const isEmptyObject = (val) => {
|
|
|
12224
12475
|
*
|
|
12225
12476
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
12226
12477
|
*/
|
|
12227
|
-
const isDate = kindOfTest(
|
|
12478
|
+
const isDate = kindOfTest('Date');
|
|
12228
12479
|
|
|
12229
12480
|
/**
|
|
12230
12481
|
* Determine if a value is a File
|
|
@@ -12233,7 +12484,32 @@ const isDate = kindOfTest("Date");
|
|
|
12233
12484
|
*
|
|
12234
12485
|
* @returns {boolean} True if value is a File, otherwise false
|
|
12235
12486
|
*/
|
|
12236
|
-
const isFile = kindOfTest(
|
|
12487
|
+
const isFile = kindOfTest('File');
|
|
12488
|
+
|
|
12489
|
+
/**
|
|
12490
|
+
* Determine if a value is a React Native Blob
|
|
12491
|
+
* React Native "blob": an object with a `uri` attribute. Optionally, it can
|
|
12492
|
+
* also have a `name` and `type` attribute to specify filename and content type
|
|
12493
|
+
*
|
|
12494
|
+
* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
|
|
12495
|
+
*
|
|
12496
|
+
* @param {*} value The value to test
|
|
12497
|
+
*
|
|
12498
|
+
* @returns {boolean} True if value is a React Native Blob, otherwise false
|
|
12499
|
+
*/
|
|
12500
|
+
const isReactNativeBlob = (value) => {
|
|
12501
|
+
return !!(value && typeof value.uri !== 'undefined');
|
|
12502
|
+
}
|
|
12503
|
+
|
|
12504
|
+
/**
|
|
12505
|
+
* Determine if environment is React Native
|
|
12506
|
+
* ReactNative `FormData` has a non-standard `getParts()` method
|
|
12507
|
+
*
|
|
12508
|
+
* @param {*} formData The formData to test
|
|
12509
|
+
*
|
|
12510
|
+
* @returns {boolean} True if environment is React Native, otherwise false
|
|
12511
|
+
*/
|
|
12512
|
+
const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
|
|
12237
12513
|
|
|
12238
12514
|
/**
|
|
12239
12515
|
* Determine if a value is a Blob
|
|
@@ -12242,7 +12518,7 @@ const isFile = kindOfTest("File");
|
|
|
12242
12518
|
*
|
|
12243
12519
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
12244
12520
|
*/
|
|
12245
|
-
const isBlob = kindOfTest(
|
|
12521
|
+
const isBlob = kindOfTest('Blob');
|
|
12246
12522
|
|
|
12247
12523
|
/**
|
|
12248
12524
|
* Determine if a value is a FileList
|
|
@@ -12251,7 +12527,7 @@ const isBlob = kindOfTest("Blob");
|
|
|
12251
12527
|
*
|
|
12252
12528
|
* @returns {boolean} True if value is a File, otherwise false
|
|
12253
12529
|
*/
|
|
12254
|
-
const isFileList = kindOfTest(
|
|
12530
|
+
const isFileList = kindOfTest('FileList');
|
|
12255
12531
|
|
|
12256
12532
|
/**
|
|
12257
12533
|
* Determine if a value is a Stream
|
|
@@ -12269,17 +12545,27 @@ const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
|
12269
12545
|
*
|
|
12270
12546
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
12271
12547
|
*/
|
|
12548
|
+
function getGlobal() {
|
|
12549
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
12550
|
+
if (typeof self !== 'undefined') return self;
|
|
12551
|
+
if (typeof window !== 'undefined') return window;
|
|
12552
|
+
if (typeof __webpack_require__.g !== 'undefined') return __webpack_require__.g;
|
|
12553
|
+
return {};
|
|
12554
|
+
}
|
|
12555
|
+
|
|
12556
|
+
const G = getGlobal();
|
|
12557
|
+
const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
12558
|
+
|
|
12272
12559
|
const isFormData = (thing) => {
|
|
12273
12560
|
let kind;
|
|
12274
|
-
return (
|
|
12275
|
-
thing
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
thing.toString() === "[object FormData]"))))
|
|
12561
|
+
return thing && (
|
|
12562
|
+
(FormDataCtor && thing instanceof FormDataCtor) || (
|
|
12563
|
+
isFunction(thing.append) && (
|
|
12564
|
+
(kind = kindOf(thing)) === 'formdata' ||
|
|
12565
|
+
// detect form-data instance
|
|
12566
|
+
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
|
12567
|
+
)
|
|
12568
|
+
)
|
|
12283
12569
|
);
|
|
12284
12570
|
};
|
|
12285
12571
|
|
|
@@ -12290,13 +12576,13 @@ const isFormData = (thing) => {
|
|
|
12290
12576
|
*
|
|
12291
12577
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
12292
12578
|
*/
|
|
12293
|
-
const isURLSearchParams = kindOfTest(
|
|
12579
|
+
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
12294
12580
|
|
|
12295
12581
|
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
12296
|
-
|
|
12297
|
-
|
|
12298
|
-
|
|
12299
|
-
|
|
12582
|
+
'ReadableStream',
|
|
12583
|
+
'Request',
|
|
12584
|
+
'Response',
|
|
12585
|
+
'Headers',
|
|
12300
12586
|
].map(kindOfTest);
|
|
12301
12587
|
|
|
12302
12588
|
/**
|
|
@@ -12306,9 +12592,9 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
|
12306
12592
|
*
|
|
12307
12593
|
* @returns {String} The String freed of excess whitespace
|
|
12308
12594
|
*/
|
|
12309
|
-
const trim = (str) =>
|
|
12310
|
-
str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
|
12311
|
-
|
|
12595
|
+
const trim = (str) => {
|
|
12596
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
12597
|
+
};
|
|
12312
12598
|
/**
|
|
12313
12599
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
12314
12600
|
*
|
|
@@ -12327,7 +12613,7 @@ const trim = (str) =>
|
|
|
12327
12613
|
*/
|
|
12328
12614
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
12329
12615
|
// Don't bother if no value provided
|
|
12330
|
-
if (obj === null || typeof obj ===
|
|
12616
|
+
if (obj === null || typeof obj === 'undefined') {
|
|
12331
12617
|
return;
|
|
12332
12618
|
}
|
|
12333
12619
|
|
|
@@ -12335,7 +12621,7 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
|
12335
12621
|
let l;
|
|
12336
12622
|
|
|
12337
12623
|
// Force an array if not already something iterable
|
|
12338
|
-
if (typeof obj !==
|
|
12624
|
+
if (typeof obj !== 'object') {
|
|
12339
12625
|
/*eslint no-param-reassign:0*/
|
|
12340
12626
|
obj = [obj];
|
|
12341
12627
|
}
|
|
@@ -12352,9 +12638,7 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
|
12352
12638
|
}
|
|
12353
12639
|
|
|
12354
12640
|
// Iterate over object keys
|
|
12355
|
-
const keys = allOwnKeys
|
|
12356
|
-
? Object.getOwnPropertyNames(obj)
|
|
12357
|
-
: Object.keys(obj);
|
|
12641
|
+
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
12358
12642
|
const len = keys.length;
|
|
12359
12643
|
let key;
|
|
12360
12644
|
|
|
@@ -12365,6 +12649,14 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
|
12365
12649
|
}
|
|
12366
12650
|
}
|
|
12367
12651
|
|
|
12652
|
+
/**
|
|
12653
|
+
* Finds a key in an object, case-insensitive, returning the actual key name.
|
|
12654
|
+
* Returns null if the object is a Buffer or if no match is found.
|
|
12655
|
+
*
|
|
12656
|
+
* @param {Object} obj - The object to search.
|
|
12657
|
+
* @param {string} key - The key to find (case-insensitive).
|
|
12658
|
+
* @returns {?string} The actual key name if found, otherwise null.
|
|
12659
|
+
*/
|
|
12368
12660
|
function findKey(obj, key) {
|
|
12369
12661
|
if (isBuffer(obj)) {
|
|
12370
12662
|
return null;
|
|
@@ -12385,16 +12677,11 @@ function findKey(obj, key) {
|
|
|
12385
12677
|
|
|
12386
12678
|
const _global = (() => {
|
|
12387
12679
|
/*eslint no-undef:0*/
|
|
12388
|
-
if (typeof globalThis !==
|
|
12389
|
-
return typeof self !==
|
|
12390
|
-
? self
|
|
12391
|
-
: typeof window !== "undefined"
|
|
12392
|
-
? window
|
|
12393
|
-
: __webpack_require__.g;
|
|
12680
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
12681
|
+
return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : __webpack_require__.g;
|
|
12394
12682
|
})();
|
|
12395
12683
|
|
|
12396
|
-
const isContextDefined = (context) =>
|
|
12397
|
-
!isUndefined(context) && context !== _global;
|
|
12684
|
+
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
12398
12685
|
|
|
12399
12686
|
/**
|
|
12400
12687
|
* Accepts varargs expecting each argument to be an object, then
|
|
@@ -12419,7 +12706,7 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
12419
12706
|
const result = {};
|
|
12420
12707
|
const assignValue = (val, key) => {
|
|
12421
12708
|
// Skip dangerous property names to prevent prototype pollution
|
|
12422
|
-
if (key ===
|
|
12709
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
12423
12710
|
return;
|
|
12424
12711
|
}
|
|
12425
12712
|
|
|
@@ -12472,7 +12759,7 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
|
12472
12759
|
});
|
|
12473
12760
|
}
|
|
12474
12761
|
},
|
|
12475
|
-
{ allOwnKeys }
|
|
12762
|
+
{ allOwnKeys }
|
|
12476
12763
|
);
|
|
12477
12764
|
return a;
|
|
12478
12765
|
};
|
|
@@ -12501,17 +12788,14 @@ const stripBOM = (content) => {
|
|
|
12501
12788
|
* @returns {void}
|
|
12502
12789
|
*/
|
|
12503
12790
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
12504
|
-
constructor.prototype = Object.create(
|
|
12505
|
-
|
|
12506
|
-
descriptors,
|
|
12507
|
-
);
|
|
12508
|
-
Object.defineProperty(constructor.prototype, "constructor", {
|
|
12791
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
12792
|
+
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
12509
12793
|
value: constructor,
|
|
12510
12794
|
writable: true,
|
|
12511
12795
|
enumerable: false,
|
|
12512
12796
|
configurable: true,
|
|
12513
12797
|
});
|
|
12514
|
-
Object.defineProperty(constructor,
|
|
12798
|
+
Object.defineProperty(constructor, 'super', {
|
|
12515
12799
|
value: superConstructor.prototype,
|
|
12516
12800
|
});
|
|
12517
12801
|
props && Object.assign(constructor.prototype, props);
|
|
@@ -12541,20 +12825,13 @@ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
|
|
|
12541
12825
|
i = props.length;
|
|
12542
12826
|
while (i-- > 0) {
|
|
12543
12827
|
prop = props[i];
|
|
12544
|
-
if (
|
|
12545
|
-
(!propFilter || propFilter(prop, sourceObj, destObj)) &&
|
|
12546
|
-
!merged[prop]
|
|
12547
|
-
) {
|
|
12828
|
+
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
|
|
12548
12829
|
destObj[prop] = sourceObj[prop];
|
|
12549
12830
|
merged[prop] = true;
|
|
12550
12831
|
}
|
|
12551
12832
|
}
|
|
12552
12833
|
sourceObj = filter !== false && getPrototypeOf(sourceObj);
|
|
12553
|
-
} while (
|
|
12554
|
-
sourceObj &&
|
|
12555
|
-
(!filter || filter(sourceObj, destObj)) &&
|
|
12556
|
-
sourceObj !== Object.prototype
|
|
12557
|
-
);
|
|
12834
|
+
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
12558
12835
|
|
|
12559
12836
|
return destObj;
|
|
12560
12837
|
};
|
|
@@ -12611,7 +12888,7 @@ const isTypedArray = ((TypedArray) => {
|
|
|
12611
12888
|
return (thing) => {
|
|
12612
12889
|
return TypedArray && thing instanceof TypedArray;
|
|
12613
12890
|
};
|
|
12614
|
-
})(typeof Uint8Array !==
|
|
12891
|
+
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
|
|
12615
12892
|
|
|
12616
12893
|
/**
|
|
12617
12894
|
* For each entry in the object, call the function with the key and value.
|
|
@@ -12654,14 +12931,12 @@ const matchAll = (regExp, str) => {
|
|
|
12654
12931
|
};
|
|
12655
12932
|
|
|
12656
12933
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
12657
|
-
const isHTMLForm = kindOfTest(
|
|
12934
|
+
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
12658
12935
|
|
|
12659
12936
|
const toCamelCase = (str) => {
|
|
12660
|
-
return str
|
|
12661
|
-
.
|
|
12662
|
-
|
|
12663
|
-
return p1.toUpperCase() + p2;
|
|
12664
|
-
});
|
|
12937
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
12938
|
+
return p1.toUpperCase() + p2;
|
|
12939
|
+
});
|
|
12665
12940
|
};
|
|
12666
12941
|
|
|
12667
12942
|
/* Creating a function that will check if an object has a property. */
|
|
@@ -12678,7 +12953,7 @@ const hasOwnProperty = (
|
|
|
12678
12953
|
*
|
|
12679
12954
|
* @returns {boolean} True if value is a RegExp object, otherwise false
|
|
12680
12955
|
*/
|
|
12681
|
-
const isRegExp = kindOfTest(
|
|
12956
|
+
const isRegExp = kindOfTest('RegExp');
|
|
12682
12957
|
|
|
12683
12958
|
const reduceDescriptors = (obj, reducer) => {
|
|
12684
12959
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -12702,10 +12977,7 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
12702
12977
|
const freezeMethods = (obj) => {
|
|
12703
12978
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
12704
12979
|
// skip restricted props in strict mode
|
|
12705
|
-
if (
|
|
12706
|
-
isFunction(obj) &&
|
|
12707
|
-
["arguments", "caller", "callee"].indexOf(name) !== -1
|
|
12708
|
-
) {
|
|
12980
|
+
if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
12709
12981
|
return false;
|
|
12710
12982
|
}
|
|
12711
12983
|
|
|
@@ -12715,7 +12987,7 @@ const freezeMethods = (obj) => {
|
|
|
12715
12987
|
|
|
12716
12988
|
descriptor.enumerable = false;
|
|
12717
12989
|
|
|
12718
|
-
if (
|
|
12990
|
+
if ('writable' in descriptor) {
|
|
12719
12991
|
descriptor.writable = false;
|
|
12720
12992
|
return;
|
|
12721
12993
|
}
|
|
@@ -12728,6 +13000,14 @@ const freezeMethods = (obj) => {
|
|
|
12728
13000
|
});
|
|
12729
13001
|
};
|
|
12730
13002
|
|
|
13003
|
+
/**
|
|
13004
|
+
* Converts an array or a delimited string into an object set with values as keys and true as values.
|
|
13005
|
+
* Useful for fast membership checks.
|
|
13006
|
+
*
|
|
13007
|
+
* @param {Array|string} arrayOrString - The array or string to convert.
|
|
13008
|
+
* @param {string} delimiter - The delimiter to use if input is a string.
|
|
13009
|
+
* @returns {Object} An object with keys from the array or string, values set to true.
|
|
13010
|
+
*/
|
|
12731
13011
|
const toObjectSet = (arrayOrString, delimiter) => {
|
|
12732
13012
|
const obj = {};
|
|
12733
13013
|
|
|
@@ -12737,9 +13017,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
|
|
|
12737
13017
|
});
|
|
12738
13018
|
};
|
|
12739
13019
|
|
|
12740
|
-
isArray(arrayOrString)
|
|
12741
|
-
? define(arrayOrString)
|
|
12742
|
-
: define(String(arrayOrString).split(delimiter));
|
|
13020
|
+
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
12743
13021
|
|
|
12744
13022
|
return obj;
|
|
12745
13023
|
};
|
|
@@ -12747,9 +13025,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
|
|
|
12747
13025
|
const noop = () => {};
|
|
12748
13026
|
|
|
12749
13027
|
const toFiniteNumber = (value, defaultValue) => {
|
|
12750
|
-
return value != null && Number.isFinite((value = +value))
|
|
12751
|
-
? value
|
|
12752
|
-
: defaultValue;
|
|
13028
|
+
return value != null && Number.isFinite((value = +value)) ? value : defaultValue;
|
|
12753
13029
|
};
|
|
12754
13030
|
|
|
12755
13031
|
/**
|
|
@@ -12763,11 +13039,17 @@ function isSpecCompliantForm(thing) {
|
|
|
12763
13039
|
return !!(
|
|
12764
13040
|
thing &&
|
|
12765
13041
|
isFunction(thing.append) &&
|
|
12766
|
-
thing[toStringTag] ===
|
|
13042
|
+
thing[toStringTag] === 'FormData' &&
|
|
12767
13043
|
thing[iterator]
|
|
12768
13044
|
);
|
|
12769
13045
|
}
|
|
12770
13046
|
|
|
13047
|
+
/**
|
|
13048
|
+
* Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
|
|
13049
|
+
*
|
|
13050
|
+
* @param {Object} obj - The object to convert.
|
|
13051
|
+
* @returns {Object} The JSON-compatible object.
|
|
13052
|
+
*/
|
|
12771
13053
|
const toJSONObject = (obj) => {
|
|
12772
13054
|
const stack = new Array(10);
|
|
12773
13055
|
|
|
@@ -12782,7 +13064,7 @@ const toJSONObject = (obj) => {
|
|
|
12782
13064
|
return source;
|
|
12783
13065
|
}
|
|
12784
13066
|
|
|
12785
|
-
if (!(
|
|
13067
|
+
if (!('toJSON' in source)) {
|
|
12786
13068
|
stack[i] = source;
|
|
12787
13069
|
const target = isArray(source) ? [] : {};
|
|
12788
13070
|
|
|
@@ -12803,8 +13085,20 @@ const toJSONObject = (obj) => {
|
|
|
12803
13085
|
return visit(obj, 0);
|
|
12804
13086
|
};
|
|
12805
13087
|
|
|
12806
|
-
|
|
13088
|
+
/**
|
|
13089
|
+
* Determines if a value is an async function.
|
|
13090
|
+
*
|
|
13091
|
+
* @param {*} thing - The value to test.
|
|
13092
|
+
* @returns {boolean} True if value is an async function, otherwise false.
|
|
13093
|
+
*/
|
|
13094
|
+
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
12807
13095
|
|
|
13096
|
+
/**
|
|
13097
|
+
* Determines if a value is thenable (has then and catch methods).
|
|
13098
|
+
*
|
|
13099
|
+
* @param {*} thing - The value to test.
|
|
13100
|
+
* @returns {boolean} True if value is thenable, otherwise false.
|
|
13101
|
+
*/
|
|
12808
13102
|
const isThenable = (thing) =>
|
|
12809
13103
|
thing &&
|
|
12810
13104
|
(isObject(thing) || isFunction(thing)) &&
|
|
@@ -12814,6 +13108,14 @@ const isThenable = (thing) =>
|
|
|
12814
13108
|
// original code
|
|
12815
13109
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
12816
13110
|
|
|
13111
|
+
/**
|
|
13112
|
+
* Provides a cross-platform setImmediate implementation.
|
|
13113
|
+
* Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
|
|
13114
|
+
*
|
|
13115
|
+
* @param {boolean} setImmediateSupported - Whether setImmediate is supported.
|
|
13116
|
+
* @param {boolean} postMessageSupported - Whether postMessage is supported.
|
|
13117
|
+
* @returns {Function} A function to schedule a callback asynchronously.
|
|
13118
|
+
*/
|
|
12817
13119
|
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
12818
13120
|
if (setImmediateSupported) {
|
|
12819
13121
|
return setImmediate;
|
|
@@ -12822,27 +13124,33 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
12822
13124
|
return postMessageSupported
|
|
12823
13125
|
? ((token, callbacks) => {
|
|
12824
13126
|
_global.addEventListener(
|
|
12825
|
-
|
|
13127
|
+
'message',
|
|
12826
13128
|
({ source, data }) => {
|
|
12827
13129
|
if (source === _global && data === token) {
|
|
12828
13130
|
callbacks.length && callbacks.shift()();
|
|
12829
13131
|
}
|
|
12830
13132
|
},
|
|
12831
|
-
false
|
|
13133
|
+
false
|
|
12832
13134
|
);
|
|
12833
13135
|
|
|
12834
13136
|
return (cb) => {
|
|
12835
13137
|
callbacks.push(cb);
|
|
12836
|
-
_global.postMessage(token,
|
|
13138
|
+
_global.postMessage(token, '*');
|
|
12837
13139
|
};
|
|
12838
13140
|
})(`axios@${Math.random()}`, [])
|
|
12839
13141
|
: (cb) => setTimeout(cb);
|
|
12840
|
-
})(typeof setImmediate ===
|
|
13142
|
+
})(typeof setImmediate === 'function', isFunction(_global.postMessage));
|
|
12841
13143
|
|
|
13144
|
+
/**
|
|
13145
|
+
* Schedules a microtask or asynchronous callback as soon as possible.
|
|
13146
|
+
* Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
|
|
13147
|
+
*
|
|
13148
|
+
* @type {Function}
|
|
13149
|
+
*/
|
|
12842
13150
|
const asap =
|
|
12843
|
-
typeof queueMicrotask !==
|
|
13151
|
+
typeof queueMicrotask !== 'undefined'
|
|
12844
13152
|
? queueMicrotask.bind(_global)
|
|
12845
|
-
: (typeof process !==
|
|
13153
|
+
: (typeof process !== 'undefined' && process.nextTick) || _setImmediate;
|
|
12846
13154
|
|
|
12847
13155
|
// *********************
|
|
12848
13156
|
|
|
@@ -12867,6 +13175,8 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
12867
13175
|
isUndefined,
|
|
12868
13176
|
isDate,
|
|
12869
13177
|
isFile,
|
|
13178
|
+
isReactNativeBlob,
|
|
13179
|
+
isReactNative,
|
|
12870
13180
|
isBlob,
|
|
12871
13181
|
isRegExp,
|
|
12872
13182
|
isFunction,
|
|
@@ -12923,12 +13233,6 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
12923
13233
|
/******/ if (cachedModule !== undefined) {
|
|
12924
13234
|
/******/ return cachedModule.exports;
|
|
12925
13235
|
/******/ }
|
|
12926
|
-
/******/ // Check if module exists (development only)
|
|
12927
|
-
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
12928
|
-
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
12929
|
-
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
12930
|
-
/******/ throw e;
|
|
12931
|
-
/******/ }
|
|
12932
13236
|
/******/ // Create a new module (and put it into the cache)
|
|
12933
13237
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
12934
13238
|
/******/ // no module.id needed
|
|
@@ -12937,6 +13241,12 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
12937
13241
|
/******/ };
|
|
12938
13242
|
/******/
|
|
12939
13243
|
/******/ // Execute the module function
|
|
13244
|
+
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
13245
|
+
/******/ delete __webpack_module_cache__[moduleId];
|
|
13246
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
13247
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
13248
|
+
/******/ throw e;
|
|
13249
|
+
/******/ }
|
|
12940
13250
|
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
12941
13251
|
/******/
|
|
12942
13252
|
/******/ // Return the exports of the module
|