@verdocs/web-sdk 6.8.10 → 6.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-kkGeJs-8.js → utils-DsDnct9q.js} +2 -4
- package/dist/cjs/utils-DsDnct9q.js.map +1 -0
- package/dist/cjs/verdocs-auth.cjs.entry.js +11 -6
- package/dist/cjs/verdocs-auth.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1102 -808
- package/dist/cjs/verdocs-contact-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_6.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-signing-progress.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/controls/verdocs-organization-card/verdocs-organization-card.js +1 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +14 -7
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js.map +1 -1
- package/dist/collection/utils/utils.js +0 -2
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/{p-Cj8PYi4t.js → p-B1XBGdC7.js} +4 -4
- package/dist/components/{p-Cj8PYi4t.js.map → p-B1XBGdC7.js.map} +1 -1
- package/dist/components/{p-RdlD8c2P.js → p-B6tZPSE-.js} +3 -3
- package/dist/components/{p-RdlD8c2P.js.map → p-B6tZPSE-.js.map} +1 -1
- package/dist/components/{p-zAW1BOj6.js → p-BCwx8bsK.js} +3 -3
- package/dist/components/{p-zAW1BOj6.js.map → p-BCwx8bsK.js.map} +1 -1
- package/dist/components/{p-aH_YLUuP.js → p-CaoZmlp7.js} +3 -3
- package/dist/components/{p-aH_YLUuP.js.map → p-CaoZmlp7.js.map} +1 -1
- package/dist/components/{p-Cx0Mif05.js → p-CndV_5Je.js} +2 -4
- package/dist/components/{p-Cx0Mif05.js.map → p-CndV_5Je.js.map} +1 -1
- package/dist/components/{p-BrtyCjOf.js → p-DPfgYCMd.js} +3 -3
- package/dist/components/{p-BrtyCjOf.js.map → p-DPfgYCMd.js.map} +1 -1
- package/dist/components/{p-DNYvorxL.js → p-DqlhK3CE.js} +4 -4
- package/dist/components/{p-DNYvorxL.js.map → p-DqlhK3CE.js.map} +1 -1
- package/dist/components/{p-Bzs-6uU0.js → p-EQhWyfg9.js} +1104 -810
- package/dist/components/p-EQhWyfg9.js.map +1 -0
- package/dist/components/{p---tnXjlx.js → p-uNqpODUQ.js} +3 -3
- package/dist/components/{p---tnXjlx.js.map → p-uNqpODUQ.js.map} +1 -1
- package/dist/components/verdocs-auth.js +13 -7
- package/dist/components/verdocs-auth.js.map +1 -1
- package/dist/components/verdocs-build.js +5 -5
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-envelope-document-page.js +1 -1
- package/dist/components/verdocs-envelopes-list.js +2 -2
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-quick-filter.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-sign.js +3 -3
- package/dist/components/verdocs-signing-progress.js +1 -1
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-fields.js +1 -1
- package/dist/components/verdocs-templates-list.js +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-CPSY5rft.js → utils-Bty_rQI7.js} +2 -4
- package/dist/esm/utils-Bty_rQI7.js.map +1 -0
- package/dist/esm/verdocs-auth.entry.js +12 -7
- package/dist/esm/verdocs-auth.entry.js.map +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +1102 -808
- package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm/verdocs-download-dialog_4.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_6.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-signing-progress.entry.js +1 -1
- package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-CPSY5rft.js → utils-Bty_rQI7.js} +1 -1
- package/dist/esm-es5/utils-Bty_rQI7.js.map +1 -0
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +2 -2
- package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-signing-progress.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +3 -1
- package/dist/verdocs-web-sdk/{p-b7d907b4.system.entry.js → p-0f6aa428.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-92b4f218.entry.js → p-30ce93f4.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-4a24c445.system.entry.js +4 -0
- package/dist/verdocs-web-sdk/p-4a24c445.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-5b00dbf2.entry.js +3 -0
- package/dist/verdocs-web-sdk/p-5b00dbf2.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-3be22031.entry.js → p-64a68e39.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-0b59a4a5.entry.js → p-76770d9c.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-2ba8c771.system.entry.js → p-7fa0abc5.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-60cfa50a.system.entry.js → p-83f10fb7.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-641dbbfa.system.entry.js → p-8b80fe24.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-fc308ef0.entry.js → p-90005b19.entry.js} +3 -3
- package/dist/verdocs-web-sdk/p-945b6e74.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-945b6e74.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-95037fa9.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-95037fa9.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/p-Bg14ZSNR.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-a51WVEiq.system.js.map → p-BkSli2zt.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-DmQa-gqf.system.js.map → p-CLSDwNJu.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-CMBZT5Qy.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-BFC8G6sY.system.js.map → p-CkFoHSeo.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-DGti20Vc.system.js → p-CnF3etgg.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-CnF3etgg.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-N4-IQ3Cb.system.js.map → p-CotMN3Ey.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CVmJ8lYI.system.js.map → p-CyHGFYot.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-BJ0cUjeu.system.js.map → p-Fo42OGz9.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-H1Y4Zb4E.system.js.map → p-HR08HTpW.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-C9JdpYtM.js → p-NAwq_U8G.js} +1 -1
- package/dist/verdocs-web-sdk/p-NAwq_U8G.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-6c8883ff.entry.js → p-b99e606b.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6c8883ff.entry.js.map → p-b99e606b.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-066eaea8.system.entry.js → p-e33fd901.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-d4e3efdb.system.entry.js → p-e97ce39e.system.entry.js} +3 -3
- package/dist/verdocs-web-sdk/{p-4f820bee.entry.js → p-f02af327.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-04981f9f.entry.js → p-f79ebbc1.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-4424623c.system.entry.js → p-ffbf5761.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/verdocs-auth.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-contact-picker.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +3 -3
- package/dist/cjs/utils-kkGeJs-8.js.map +0 -1
- package/dist/components/p-Bzs-6uU0.js.map +0 -1
- package/dist/custom-elements.json +0 -2501
- package/dist/esm/utils-CPSY5rft.js.map +0 -1
- package/dist/esm-es5/utils-CPSY5rft.js.map +0 -1
- package/dist/verdocs-web-sdk/p-BC0LsUzY.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-BuHYXI2L.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-C9JdpYtM.js.map +0 -1
- package/dist/verdocs-web-sdk/p-DGti20Vc.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-ae1318c0.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-ae1318c0.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-bcf3f5ed.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-bcf3f5ed.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-bcffad7a.system.entry.js +0 -4
- package/dist/verdocs-web-sdk/p-bcffad7a.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-f7f33a99.entry.js +0 -3
- package/dist/verdocs-web-sdk/p-f7f33a99.entry.js.map +0 -1
- /package/dist/verdocs-web-sdk/{p-b7d907b4.system.entry.js.map → p-0f6aa428.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-92b4f218.entry.js.map → p-30ce93f4.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-3be22031.entry.js.map → p-64a68e39.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-0b59a4a5.entry.js.map → p-76770d9c.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-2ba8c771.system.entry.js.map → p-7fa0abc5.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-60cfa50a.system.entry.js.map → p-83f10fb7.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-641dbbfa.system.entry.js.map → p-8b80fe24.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-fc308ef0.entry.js.map → p-90005b19.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-066eaea8.system.entry.js.map → p-e33fd901.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-d4e3efdb.system.entry.js.map → p-e97ce39e.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-4f820bee.entry.js.map → p-f02af327.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-04981f9f.entry.js.map → p-f79ebbc1.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-4424623c.system.entry.js.map → p-ffbf5761.system.entry.js.map} +0 -0
|
@@ -2,13 +2,13 @@ import { p as proxyCustomElement, H, c as createEvent, h, F as Fragment } from '
|
|
|
2
2
|
import { VerdocsEndpoint, formatFullName, getActiveEntitlements, isValidEmail } from '@verdocs/js-sdk';
|
|
3
3
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './p-BFTU3MAI.js';
|
|
4
4
|
import { B as BETA_ORIGINS } from './p-C_Xku1v2.js';
|
|
5
|
-
import { c as convertToE164 } from './p-
|
|
5
|
+
import { c as convertToE164 } from './p-CndV_5Je.js';
|
|
6
6
|
import { d as defineCustomElement$4 } from './p-C_yyK5xE.js';
|
|
7
7
|
import { d as defineCustomElement$3 } from './p-BvV9rOTP.js';
|
|
8
8
|
import { d as defineCustomElement$2 } from './p-BC5N3FIA.js';
|
|
9
9
|
import { d as defineCustomElement$1 } from './p-DUYRis3A.js';
|
|
10
10
|
|
|
11
|
-
/*! Axios v1.
|
|
11
|
+
/*! Axios v1.15.0 Copyright (c) 2026 Matt Zabriskie and contributors */
|
|
12
12
|
|
|
13
13
|
var axios_1;
|
|
14
14
|
var hasRequiredAxios;
|
|
@@ -64,7 +64,7 @@ function requireAxios () {
|
|
|
64
64
|
*
|
|
65
65
|
* @returns {boolean} True if the value is undefined, otherwise false
|
|
66
66
|
*/
|
|
67
|
-
const isUndefined = typeOfTest(
|
|
67
|
+
const isUndefined = typeOfTest('undefined');
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* Determine if a value is a Buffer
|
|
@@ -91,7 +91,7 @@ function requireAxios () {
|
|
|
91
91
|
*
|
|
92
92
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
93
93
|
*/
|
|
94
|
-
const isArrayBuffer = kindOfTest(
|
|
94
|
+
const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
97
|
* Determine if a value is a view on an ArrayBuffer
|
|
@@ -102,7 +102,7 @@ function requireAxios () {
|
|
|
102
102
|
*/
|
|
103
103
|
function isArrayBufferView(val) {
|
|
104
104
|
let result;
|
|
105
|
-
if (typeof ArrayBuffer !==
|
|
105
|
+
if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
|
|
106
106
|
result = ArrayBuffer.isView(val);
|
|
107
107
|
} else {
|
|
108
108
|
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
@@ -117,7 +117,7 @@ function requireAxios () {
|
|
|
117
117
|
*
|
|
118
118
|
* @returns {boolean} True if value is a String, otherwise false
|
|
119
119
|
*/
|
|
120
|
-
const isString = typeOfTest(
|
|
120
|
+
const isString = typeOfTest('string');
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
123
|
* Determine if a value is a Function
|
|
@@ -125,7 +125,7 @@ function requireAxios () {
|
|
|
125
125
|
* @param {*} val The value to test
|
|
126
126
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
127
127
|
*/
|
|
128
|
-
const isFunction$1 = typeOfTest(
|
|
128
|
+
const isFunction$1 = typeOfTest('function');
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
131
|
* Determine if a value is a Number
|
|
@@ -134,7 +134,7 @@ function requireAxios () {
|
|
|
134
134
|
*
|
|
135
135
|
* @returns {boolean} True if value is a Number, otherwise false
|
|
136
136
|
*/
|
|
137
|
-
const isNumber = typeOfTest(
|
|
137
|
+
const isNumber = typeOfTest('number');
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
140
|
* Determine if a value is an Object
|
|
@@ -143,7 +143,7 @@ function requireAxios () {
|
|
|
143
143
|
*
|
|
144
144
|
* @returns {boolean} True if value is an Object, otherwise false
|
|
145
145
|
*/
|
|
146
|
-
const isObject = (thing) => thing !== null && typeof thing ===
|
|
146
|
+
const isObject = (thing) => thing !== null && typeof thing === 'object';
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
* Determine if a value is a Boolean
|
|
@@ -161,7 +161,7 @@ function requireAxios () {
|
|
|
161
161
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
162
162
|
*/
|
|
163
163
|
const isPlainObject = (val) => {
|
|
164
|
-
if (kindOf(val) !==
|
|
164
|
+
if (kindOf(val) !== 'object') {
|
|
165
165
|
return false;
|
|
166
166
|
}
|
|
167
167
|
|
|
@@ -189,10 +189,7 @@ function requireAxios () {
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
try {
|
|
192
|
-
return (
|
|
193
|
-
Object.keys(val).length === 0 &&
|
|
194
|
-
Object.getPrototypeOf(val) === Object.prototype
|
|
195
|
-
);
|
|
192
|
+
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
196
193
|
} catch (e) {
|
|
197
194
|
// Fallback for any other objects that might cause RangeError with Object.keys()
|
|
198
195
|
return false;
|
|
@@ -206,7 +203,7 @@ function requireAxios () {
|
|
|
206
203
|
*
|
|
207
204
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
208
205
|
*/
|
|
209
|
-
const isDate = kindOfTest(
|
|
206
|
+
const isDate = kindOfTest('Date');
|
|
210
207
|
|
|
211
208
|
/**
|
|
212
209
|
* Determine if a value is a File
|
|
@@ -215,7 +212,32 @@ function requireAxios () {
|
|
|
215
212
|
*
|
|
216
213
|
* @returns {boolean} True if value is a File, otherwise false
|
|
217
214
|
*/
|
|
218
|
-
const isFile = kindOfTest(
|
|
215
|
+
const isFile = kindOfTest('File');
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Determine if a value is a React Native Blob
|
|
219
|
+
* React Native "blob": an object with a `uri` attribute. Optionally, it can
|
|
220
|
+
* also have a `name` and `type` attribute to specify filename and content type
|
|
221
|
+
*
|
|
222
|
+
* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
|
|
223
|
+
*
|
|
224
|
+
* @param {*} value The value to test
|
|
225
|
+
*
|
|
226
|
+
* @returns {boolean} True if value is a React Native Blob, otherwise false
|
|
227
|
+
*/
|
|
228
|
+
const isReactNativeBlob = (value) => {
|
|
229
|
+
return !!(value && typeof value.uri !== 'undefined');
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Determine if environment is React Native
|
|
234
|
+
* ReactNative `FormData` has a non-standard `getParts()` method
|
|
235
|
+
*
|
|
236
|
+
* @param {*} formData The formData to test
|
|
237
|
+
*
|
|
238
|
+
* @returns {boolean} True if environment is React Native, otherwise false
|
|
239
|
+
*/
|
|
240
|
+
const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
|
|
219
241
|
|
|
220
242
|
/**
|
|
221
243
|
* Determine if a value is a Blob
|
|
@@ -224,7 +246,7 @@ function requireAxios () {
|
|
|
224
246
|
*
|
|
225
247
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
226
248
|
*/
|
|
227
|
-
const isBlob = kindOfTest(
|
|
249
|
+
const isBlob = kindOfTest('Blob');
|
|
228
250
|
|
|
229
251
|
/**
|
|
230
252
|
* Determine if a value is a FileList
|
|
@@ -233,7 +255,7 @@ function requireAxios () {
|
|
|
233
255
|
*
|
|
234
256
|
* @returns {boolean} True if value is a File, otherwise false
|
|
235
257
|
*/
|
|
236
|
-
const isFileList = kindOfTest(
|
|
258
|
+
const isFileList = kindOfTest('FileList');
|
|
237
259
|
|
|
238
260
|
/**
|
|
239
261
|
* Determine if a value is a Stream
|
|
@@ -251,17 +273,27 @@ function requireAxios () {
|
|
|
251
273
|
*
|
|
252
274
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
253
275
|
*/
|
|
276
|
+
function getGlobal() {
|
|
277
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
278
|
+
if (typeof self !== 'undefined') return self;
|
|
279
|
+
if (typeof window !== 'undefined') return window;
|
|
280
|
+
if (typeof commonjsGlobal !== 'undefined') return commonjsGlobal;
|
|
281
|
+
return {};
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
const G = getGlobal();
|
|
285
|
+
const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
286
|
+
|
|
254
287
|
const isFormData = (thing) => {
|
|
255
288
|
let kind;
|
|
256
|
-
return (
|
|
257
|
-
thing
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
thing.toString() === "[object FormData]"))))
|
|
289
|
+
return thing && (
|
|
290
|
+
(FormDataCtor && thing instanceof FormDataCtor) || (
|
|
291
|
+
isFunction$1(thing.append) && (
|
|
292
|
+
(kind = kindOf(thing)) === 'formdata' ||
|
|
293
|
+
// detect form-data instance
|
|
294
|
+
(kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
|
|
295
|
+
)
|
|
296
|
+
)
|
|
265
297
|
);
|
|
266
298
|
};
|
|
267
299
|
|
|
@@ -272,13 +304,13 @@ function requireAxios () {
|
|
|
272
304
|
*
|
|
273
305
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
274
306
|
*/
|
|
275
|
-
const isURLSearchParams = kindOfTest(
|
|
307
|
+
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
276
308
|
|
|
277
309
|
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
310
|
+
'ReadableStream',
|
|
311
|
+
'Request',
|
|
312
|
+
'Response',
|
|
313
|
+
'Headers',
|
|
282
314
|
].map(kindOfTest);
|
|
283
315
|
|
|
284
316
|
/**
|
|
@@ -288,9 +320,9 @@ function requireAxios () {
|
|
|
288
320
|
*
|
|
289
321
|
* @returns {String} The String freed of excess whitespace
|
|
290
322
|
*/
|
|
291
|
-
const trim = (str) =>
|
|
292
|
-
str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
|
293
|
-
|
|
323
|
+
const trim = (str) => {
|
|
324
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
325
|
+
};
|
|
294
326
|
/**
|
|
295
327
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
296
328
|
*
|
|
@@ -309,7 +341,7 @@ function requireAxios () {
|
|
|
309
341
|
*/
|
|
310
342
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
311
343
|
// Don't bother if no value provided
|
|
312
|
-
if (obj === null || typeof obj ===
|
|
344
|
+
if (obj === null || typeof obj === 'undefined') {
|
|
313
345
|
return;
|
|
314
346
|
}
|
|
315
347
|
|
|
@@ -317,7 +349,7 @@ function requireAxios () {
|
|
|
317
349
|
let l;
|
|
318
350
|
|
|
319
351
|
// Force an array if not already something iterable
|
|
320
|
-
if (typeof obj !==
|
|
352
|
+
if (typeof obj !== 'object') {
|
|
321
353
|
/*eslint no-param-reassign:0*/
|
|
322
354
|
obj = [obj];
|
|
323
355
|
}
|
|
@@ -334,9 +366,7 @@ function requireAxios () {
|
|
|
334
366
|
}
|
|
335
367
|
|
|
336
368
|
// Iterate over object keys
|
|
337
|
-
const keys = allOwnKeys
|
|
338
|
-
? Object.getOwnPropertyNames(obj)
|
|
339
|
-
: Object.keys(obj);
|
|
369
|
+
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
340
370
|
const len = keys.length;
|
|
341
371
|
let key;
|
|
342
372
|
|
|
@@ -347,6 +377,14 @@ function requireAxios () {
|
|
|
347
377
|
}
|
|
348
378
|
}
|
|
349
379
|
|
|
380
|
+
/**
|
|
381
|
+
* Finds a key in an object, case-insensitive, returning the actual key name.
|
|
382
|
+
* Returns null if the object is a Buffer or if no match is found.
|
|
383
|
+
*
|
|
384
|
+
* @param {Object} obj - The object to search.
|
|
385
|
+
* @param {string} key - The key to find (case-insensitive).
|
|
386
|
+
* @returns {?string} The actual key name if found, otherwise null.
|
|
387
|
+
*/
|
|
350
388
|
function findKey(obj, key) {
|
|
351
389
|
if (isBuffer(obj)) {
|
|
352
390
|
return null;
|
|
@@ -367,16 +405,11 @@ function requireAxios () {
|
|
|
367
405
|
|
|
368
406
|
const _global = (() => {
|
|
369
407
|
/*eslint no-undef:0*/
|
|
370
|
-
if (typeof globalThis !==
|
|
371
|
-
return typeof self !==
|
|
372
|
-
? self
|
|
373
|
-
: typeof window !== "undefined"
|
|
374
|
-
? window
|
|
375
|
-
: commonjsGlobal;
|
|
408
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
409
|
+
return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : commonjsGlobal;
|
|
376
410
|
})();
|
|
377
411
|
|
|
378
|
-
const isContextDefined = (context) =>
|
|
379
|
-
!isUndefined(context) && context !== _global;
|
|
412
|
+
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
380
413
|
|
|
381
414
|
/**
|
|
382
415
|
* Accepts varargs expecting each argument to be an object, then
|
|
@@ -401,7 +434,7 @@ function requireAxios () {
|
|
|
401
434
|
const result = {};
|
|
402
435
|
const assignValue = (val, key) => {
|
|
403
436
|
// Skip dangerous property names to prevent prototype pollution
|
|
404
|
-
if (key ===
|
|
437
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
405
438
|
return;
|
|
406
439
|
}
|
|
407
440
|
|
|
@@ -454,7 +487,7 @@ function requireAxios () {
|
|
|
454
487
|
});
|
|
455
488
|
}
|
|
456
489
|
},
|
|
457
|
-
{ allOwnKeys }
|
|
490
|
+
{ allOwnKeys }
|
|
458
491
|
);
|
|
459
492
|
return a;
|
|
460
493
|
};
|
|
@@ -483,17 +516,14 @@ function requireAxios () {
|
|
|
483
516
|
* @returns {void}
|
|
484
517
|
*/
|
|
485
518
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
486
|
-
constructor.prototype = Object.create(
|
|
487
|
-
|
|
488
|
-
descriptors,
|
|
489
|
-
);
|
|
490
|
-
Object.defineProperty(constructor.prototype, "constructor", {
|
|
519
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
520
|
+
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
491
521
|
value: constructor,
|
|
492
522
|
writable: true,
|
|
493
523
|
enumerable: false,
|
|
494
524
|
configurable: true,
|
|
495
525
|
});
|
|
496
|
-
Object.defineProperty(constructor,
|
|
526
|
+
Object.defineProperty(constructor, 'super', {
|
|
497
527
|
value: superConstructor.prototype,
|
|
498
528
|
});
|
|
499
529
|
props && Object.assign(constructor.prototype, props);
|
|
@@ -523,20 +553,13 @@ function requireAxios () {
|
|
|
523
553
|
i = props.length;
|
|
524
554
|
while (i-- > 0) {
|
|
525
555
|
prop = props[i];
|
|
526
|
-
if (
|
|
527
|
-
(!propFilter || propFilter(prop, sourceObj, destObj)) &&
|
|
528
|
-
!merged[prop]
|
|
529
|
-
) {
|
|
556
|
+
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
|
|
530
557
|
destObj[prop] = sourceObj[prop];
|
|
531
558
|
merged[prop] = true;
|
|
532
559
|
}
|
|
533
560
|
}
|
|
534
561
|
sourceObj = filter !== false && getPrototypeOf(sourceObj);
|
|
535
|
-
} while (
|
|
536
|
-
sourceObj &&
|
|
537
|
-
(!filter || filter(sourceObj, destObj)) &&
|
|
538
|
-
sourceObj !== Object.prototype
|
|
539
|
-
);
|
|
562
|
+
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
540
563
|
|
|
541
564
|
return destObj;
|
|
542
565
|
};
|
|
@@ -593,7 +616,7 @@ function requireAxios () {
|
|
|
593
616
|
return (thing) => {
|
|
594
617
|
return TypedArray && thing instanceof TypedArray;
|
|
595
618
|
};
|
|
596
|
-
})(typeof Uint8Array !==
|
|
619
|
+
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
|
|
597
620
|
|
|
598
621
|
/**
|
|
599
622
|
* For each entry in the object, call the function with the key and value.
|
|
@@ -636,14 +659,12 @@ function requireAxios () {
|
|
|
636
659
|
};
|
|
637
660
|
|
|
638
661
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
639
|
-
const isHTMLForm = kindOfTest(
|
|
662
|
+
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
640
663
|
|
|
641
664
|
const toCamelCase = (str) => {
|
|
642
|
-
return str
|
|
643
|
-
.
|
|
644
|
-
|
|
645
|
-
return p1.toUpperCase() + p2;
|
|
646
|
-
});
|
|
665
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
666
|
+
return p1.toUpperCase() + p2;
|
|
667
|
+
});
|
|
647
668
|
};
|
|
648
669
|
|
|
649
670
|
/* Creating a function that will check if an object has a property. */
|
|
@@ -660,7 +681,7 @@ function requireAxios () {
|
|
|
660
681
|
*
|
|
661
682
|
* @returns {boolean} True if value is a RegExp object, otherwise false
|
|
662
683
|
*/
|
|
663
|
-
const isRegExp = kindOfTest(
|
|
684
|
+
const isRegExp = kindOfTest('RegExp');
|
|
664
685
|
|
|
665
686
|
const reduceDescriptors = (obj, reducer) => {
|
|
666
687
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -684,10 +705,7 @@ function requireAxios () {
|
|
|
684
705
|
const freezeMethods = (obj) => {
|
|
685
706
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
686
707
|
// skip restricted props in strict mode
|
|
687
|
-
if (
|
|
688
|
-
isFunction$1(obj) &&
|
|
689
|
-
["arguments", "caller", "callee"].indexOf(name) !== -1
|
|
690
|
-
) {
|
|
708
|
+
if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
691
709
|
return false;
|
|
692
710
|
}
|
|
693
711
|
|
|
@@ -697,7 +715,7 @@ function requireAxios () {
|
|
|
697
715
|
|
|
698
716
|
descriptor.enumerable = false;
|
|
699
717
|
|
|
700
|
-
if (
|
|
718
|
+
if ('writable' in descriptor) {
|
|
701
719
|
descriptor.writable = false;
|
|
702
720
|
return;
|
|
703
721
|
}
|
|
@@ -710,6 +728,14 @@ function requireAxios () {
|
|
|
710
728
|
});
|
|
711
729
|
};
|
|
712
730
|
|
|
731
|
+
/**
|
|
732
|
+
* Converts an array or a delimited string into an object set with values as keys and true as values.
|
|
733
|
+
* Useful for fast membership checks.
|
|
734
|
+
*
|
|
735
|
+
* @param {Array|string} arrayOrString - The array or string to convert.
|
|
736
|
+
* @param {string} delimiter - The delimiter to use if input is a string.
|
|
737
|
+
* @returns {Object} An object with keys from the array or string, values set to true.
|
|
738
|
+
*/
|
|
713
739
|
const toObjectSet = (arrayOrString, delimiter) => {
|
|
714
740
|
const obj = {};
|
|
715
741
|
|
|
@@ -719,9 +745,7 @@ function requireAxios () {
|
|
|
719
745
|
});
|
|
720
746
|
};
|
|
721
747
|
|
|
722
|
-
isArray(arrayOrString)
|
|
723
|
-
? define(arrayOrString)
|
|
724
|
-
: define(String(arrayOrString).split(delimiter));
|
|
748
|
+
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
725
749
|
|
|
726
750
|
return obj;
|
|
727
751
|
};
|
|
@@ -729,9 +753,7 @@ function requireAxios () {
|
|
|
729
753
|
const noop = () => {};
|
|
730
754
|
|
|
731
755
|
const toFiniteNumber = (value, defaultValue) => {
|
|
732
|
-
return value != null && Number.isFinite((value = +value))
|
|
733
|
-
? value
|
|
734
|
-
: defaultValue;
|
|
756
|
+
return value != null && Number.isFinite((value = +value)) ? value : defaultValue;
|
|
735
757
|
};
|
|
736
758
|
|
|
737
759
|
/**
|
|
@@ -745,11 +767,17 @@ function requireAxios () {
|
|
|
745
767
|
return !!(
|
|
746
768
|
thing &&
|
|
747
769
|
isFunction$1(thing.append) &&
|
|
748
|
-
thing[toStringTag] ===
|
|
770
|
+
thing[toStringTag] === 'FormData' &&
|
|
749
771
|
thing[iterator]
|
|
750
772
|
);
|
|
751
773
|
}
|
|
752
774
|
|
|
775
|
+
/**
|
|
776
|
+
* Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
|
|
777
|
+
*
|
|
778
|
+
* @param {Object} obj - The object to convert.
|
|
779
|
+
* @returns {Object} The JSON-compatible object.
|
|
780
|
+
*/
|
|
753
781
|
const toJSONObject = (obj) => {
|
|
754
782
|
const stack = new Array(10);
|
|
755
783
|
|
|
@@ -764,7 +792,7 @@ function requireAxios () {
|
|
|
764
792
|
return source;
|
|
765
793
|
}
|
|
766
794
|
|
|
767
|
-
if (!(
|
|
795
|
+
if (!('toJSON' in source)) {
|
|
768
796
|
stack[i] = source;
|
|
769
797
|
const target = isArray(source) ? [] : {};
|
|
770
798
|
|
|
@@ -785,8 +813,20 @@ function requireAxios () {
|
|
|
785
813
|
return visit(obj, 0);
|
|
786
814
|
};
|
|
787
815
|
|
|
788
|
-
|
|
816
|
+
/**
|
|
817
|
+
* Determines if a value is an async function.
|
|
818
|
+
*
|
|
819
|
+
* @param {*} thing - The value to test.
|
|
820
|
+
* @returns {boolean} True if value is an async function, otherwise false.
|
|
821
|
+
*/
|
|
822
|
+
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
789
823
|
|
|
824
|
+
/**
|
|
825
|
+
* Determines if a value is thenable (has then and catch methods).
|
|
826
|
+
*
|
|
827
|
+
* @param {*} thing - The value to test.
|
|
828
|
+
* @returns {boolean} True if value is thenable, otherwise false.
|
|
829
|
+
*/
|
|
790
830
|
const isThenable = (thing) =>
|
|
791
831
|
thing &&
|
|
792
832
|
(isObject(thing) || isFunction$1(thing)) &&
|
|
@@ -796,6 +836,14 @@ function requireAxios () {
|
|
|
796
836
|
// original code
|
|
797
837
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
798
838
|
|
|
839
|
+
/**
|
|
840
|
+
* Provides a cross-platform setImmediate implementation.
|
|
841
|
+
* Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
|
|
842
|
+
*
|
|
843
|
+
* @param {boolean} setImmediateSupported - Whether setImmediate is supported.
|
|
844
|
+
* @param {boolean} postMessageSupported - Whether postMessage is supported.
|
|
845
|
+
* @returns {Function} A function to schedule a callback asynchronously.
|
|
846
|
+
*/
|
|
799
847
|
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
800
848
|
if (setImmediateSupported) {
|
|
801
849
|
return setImmediate;
|
|
@@ -804,27 +852,33 @@ function requireAxios () {
|
|
|
804
852
|
return postMessageSupported
|
|
805
853
|
? ((token, callbacks) => {
|
|
806
854
|
_global.addEventListener(
|
|
807
|
-
|
|
855
|
+
'message',
|
|
808
856
|
({ source, data }) => {
|
|
809
857
|
if (source === _global && data === token) {
|
|
810
858
|
callbacks.length && callbacks.shift()();
|
|
811
859
|
}
|
|
812
860
|
},
|
|
813
|
-
false
|
|
861
|
+
false
|
|
814
862
|
);
|
|
815
863
|
|
|
816
864
|
return (cb) => {
|
|
817
865
|
callbacks.push(cb);
|
|
818
|
-
_global.postMessage(token,
|
|
866
|
+
_global.postMessage(token, '*');
|
|
819
867
|
};
|
|
820
868
|
})(`axios@${Math.random()}`, [])
|
|
821
869
|
: (cb) => setTimeout(cb);
|
|
822
|
-
})(typeof setImmediate ===
|
|
870
|
+
})(typeof setImmediate === 'function', isFunction$1(_global.postMessage));
|
|
823
871
|
|
|
872
|
+
/**
|
|
873
|
+
* Schedules a microtask or asynchronous callback as soon as possible.
|
|
874
|
+
* Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
|
|
875
|
+
*
|
|
876
|
+
* @type {Function}
|
|
877
|
+
*/
|
|
824
878
|
const asap =
|
|
825
|
-
typeof queueMicrotask !==
|
|
879
|
+
typeof queueMicrotask !== 'undefined'
|
|
826
880
|
? queueMicrotask.bind(_global)
|
|
827
|
-
: (typeof process !==
|
|
881
|
+
: (typeof process !== 'undefined' && process.nextTick) || _setImmediate;
|
|
828
882
|
|
|
829
883
|
// *********************
|
|
830
884
|
|
|
@@ -849,6 +903,8 @@ function requireAxios () {
|
|
|
849
903
|
isUndefined,
|
|
850
904
|
isDate,
|
|
851
905
|
isFile,
|
|
906
|
+
isReactNativeBlob,
|
|
907
|
+
isReactNative,
|
|
852
908
|
isBlob,
|
|
853
909
|
isRegExp,
|
|
854
910
|
isFunction: isFunction$1,
|
|
@@ -891,14 +947,20 @@ function requireAxios () {
|
|
|
891
947
|
};
|
|
892
948
|
|
|
893
949
|
class AxiosError extends Error {
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
950
|
+
static from(error, code, config, request, response, customProps) {
|
|
951
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
952
|
+
axiosError.cause = error;
|
|
953
|
+
axiosError.name = error.name;
|
|
954
|
+
|
|
955
|
+
// Preserve status from the original error if not already set from response
|
|
956
|
+
if (error.status != null && axiosError.status == null) {
|
|
957
|
+
axiosError.status = error.status;
|
|
900
958
|
}
|
|
901
959
|
|
|
960
|
+
customProps && Object.assign(axiosError, customProps);
|
|
961
|
+
return axiosError;
|
|
962
|
+
}
|
|
963
|
+
|
|
902
964
|
/**
|
|
903
965
|
* Create an Error with the specified message, config, error code, request and response.
|
|
904
966
|
*
|
|
@@ -911,37 +973,48 @@ function requireAxios () {
|
|
|
911
973
|
* @returns {Error} The created error.
|
|
912
974
|
*/
|
|
913
975
|
constructor(message, code, config, request, response) {
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
976
|
+
super(message);
|
|
977
|
+
|
|
978
|
+
// Make message enumerable to maintain backward compatibility
|
|
979
|
+
// The native Error constructor sets message as non-enumerable,
|
|
980
|
+
// but axios < v1.13.3 had it as enumerable
|
|
981
|
+
Object.defineProperty(this, 'message', {
|
|
982
|
+
value: message,
|
|
983
|
+
enumerable: true,
|
|
984
|
+
writable: true,
|
|
985
|
+
configurable: true
|
|
986
|
+
});
|
|
987
|
+
|
|
988
|
+
this.name = 'AxiosError';
|
|
989
|
+
this.isAxiosError = true;
|
|
990
|
+
code && (this.code = code);
|
|
991
|
+
config && (this.config = config);
|
|
992
|
+
request && (this.request = request);
|
|
993
|
+
if (response) {
|
|
994
|
+
this.response = response;
|
|
995
|
+
this.status = response.status;
|
|
996
|
+
}
|
|
924
997
|
}
|
|
925
998
|
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
999
|
+
toJSON() {
|
|
1000
|
+
return {
|
|
1001
|
+
// Standard
|
|
1002
|
+
message: this.message,
|
|
1003
|
+
name: this.name,
|
|
1004
|
+
// Microsoft
|
|
1005
|
+
description: this.description,
|
|
1006
|
+
number: this.number,
|
|
1007
|
+
// Mozilla
|
|
1008
|
+
fileName: this.fileName,
|
|
1009
|
+
lineNumber: this.lineNumber,
|
|
1010
|
+
columnNumber: this.columnNumber,
|
|
1011
|
+
stack: this.stack,
|
|
1012
|
+
// Axios
|
|
1013
|
+
config: utils$1.toJSONObject(this.config),
|
|
1014
|
+
code: this.code,
|
|
1015
|
+
status: this.status,
|
|
1016
|
+
};
|
|
1017
|
+
}
|
|
945
1018
|
}
|
|
946
1019
|
|
|
947
1020
|
// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
|
|
@@ -958,8 +1031,6 @@ function requireAxios () {
|
|
|
958
1031
|
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
959
1032
|
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
960
1033
|
|
|
961
|
-
var AxiosError$1 = AxiosError;
|
|
962
|
-
|
|
963
1034
|
// eslint-disable-next-line strict
|
|
964
1035
|
var httpAdapter = null;
|
|
965
1036
|
|
|
@@ -996,11 +1067,14 @@ function requireAxios () {
|
|
|
996
1067
|
*/
|
|
997
1068
|
function renderKey(path, key, dots) {
|
|
998
1069
|
if (!path) return key;
|
|
999
|
-
return path
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1070
|
+
return path
|
|
1071
|
+
.concat(key)
|
|
1072
|
+
.map(function each(token, i) {
|
|
1073
|
+
// eslint-disable-next-line no-param-reassign
|
|
1074
|
+
token = removeBrackets(token);
|
|
1075
|
+
return !dots && i ? '[' + token + ']' : token;
|
|
1076
|
+
})
|
|
1077
|
+
.join(dots ? '.' : '');
|
|
1004
1078
|
}
|
|
1005
1079
|
|
|
1006
1080
|
/**
|
|
@@ -1050,21 +1124,26 @@ function requireAxios () {
|
|
|
1050
1124
|
formData = formData || new (FormData)();
|
|
1051
1125
|
|
|
1052
1126
|
// eslint-disable-next-line no-param-reassign
|
|
1053
|
-
options = utils$1.toFlatObject(
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1127
|
+
options = utils$1.toFlatObject(
|
|
1128
|
+
options,
|
|
1129
|
+
{
|
|
1130
|
+
metaTokens: true,
|
|
1131
|
+
dots: false,
|
|
1132
|
+
indexes: false,
|
|
1133
|
+
},
|
|
1134
|
+
false,
|
|
1135
|
+
function defined(option, source) {
|
|
1136
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
1137
|
+
return !utils$1.isUndefined(source[option]);
|
|
1138
|
+
}
|
|
1139
|
+
);
|
|
1061
1140
|
|
|
1062
1141
|
const metaTokens = options.metaTokens;
|
|
1063
1142
|
// eslint-disable-next-line no-use-before-define
|
|
1064
1143
|
const visitor = options.visitor || defaultVisitor;
|
|
1065
1144
|
const dots = options.dots;
|
|
1066
1145
|
const indexes = options.indexes;
|
|
1067
|
-
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
1146
|
+
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
1068
1147
|
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
1069
1148
|
|
|
1070
1149
|
if (!utils$1.isFunction(visitor)) {
|
|
@@ -1083,7 +1162,7 @@ function requireAxios () {
|
|
|
1083
1162
|
}
|
|
1084
1163
|
|
|
1085
1164
|
if (!useBlob && utils$1.isBlob(value)) {
|
|
1086
|
-
throw new AxiosError
|
|
1165
|
+
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
1087
1166
|
}
|
|
1088
1167
|
|
|
1089
1168
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
@@ -1106,6 +1185,11 @@ function requireAxios () {
|
|
|
1106
1185
|
function defaultVisitor(value, key, path) {
|
|
1107
1186
|
let arr = value;
|
|
1108
1187
|
|
|
1188
|
+
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
|
|
1189
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
1190
|
+
return false;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1109
1193
|
if (value && !path && typeof value === 'object') {
|
|
1110
1194
|
if (utils$1.endsWith(key, '{}')) {
|
|
1111
1195
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -1114,17 +1198,22 @@ function requireAxios () {
|
|
|
1114
1198
|
value = JSON.stringify(value);
|
|
1115
1199
|
} else if (
|
|
1116
1200
|
(utils$1.isArray(value) && isFlatArray(value)) ||
|
|
1117
|
-
((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
|
|
1118
|
-
|
|
1201
|
+
((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value)))
|
|
1202
|
+
) {
|
|
1119
1203
|
// eslint-disable-next-line no-param-reassign
|
|
1120
1204
|
key = removeBrackets(key);
|
|
1121
1205
|
|
|
1122
1206
|
arr.forEach(function each(el, index) {
|
|
1123
|
-
!(utils$1.isUndefined(el) || el === null) &&
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1207
|
+
!(utils$1.isUndefined(el) || el === null) &&
|
|
1208
|
+
formData.append(
|
|
1209
|
+
// eslint-disable-next-line no-nested-ternary
|
|
1210
|
+
indexes === true
|
|
1211
|
+
? renderKey([key], index, dots)
|
|
1212
|
+
: indexes === null
|
|
1213
|
+
? key
|
|
1214
|
+
: key + '[]',
|
|
1215
|
+
convertValue(el)
|
|
1216
|
+
);
|
|
1128
1217
|
});
|
|
1129
1218
|
return false;
|
|
1130
1219
|
}
|
|
@@ -1144,7 +1233,7 @@ function requireAxios () {
|
|
|
1144
1233
|
const exposedHelpers = Object.assign(predicates, {
|
|
1145
1234
|
defaultVisitor,
|
|
1146
1235
|
convertValue,
|
|
1147
|
-
isVisitable
|
|
1236
|
+
isVisitable,
|
|
1148
1237
|
});
|
|
1149
1238
|
|
|
1150
1239
|
function build(value, path) {
|
|
@@ -1157,9 +1246,9 @@ function requireAxios () {
|
|
|
1157
1246
|
stack.push(value);
|
|
1158
1247
|
|
|
1159
1248
|
utils$1.forEach(value, function each(el, key) {
|
|
1160
|
-
const result =
|
|
1161
|
-
|
|
1162
|
-
|
|
1249
|
+
const result =
|
|
1250
|
+
!(utils$1.isUndefined(el) || el === null) &&
|
|
1251
|
+
visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
1163
1252
|
|
|
1164
1253
|
if (result === true) {
|
|
1165
1254
|
build(el, path ? path.concat(key) : [key]);
|
|
@@ -1194,7 +1283,7 @@ function requireAxios () {
|
|
|
1194
1283
|
')': '%29',
|
|
1195
1284
|
'~': '%7E',
|
|
1196
1285
|
'%20': '+',
|
|
1197
|
-
'%00': '\x00'
|
|
1286
|
+
'%00': '\x00',
|
|
1198
1287
|
};
|
|
1199
1288
|
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
1200
1289
|
return charMap[match];
|
|
@@ -1222,29 +1311,33 @@ function requireAxios () {
|
|
|
1222
1311
|
};
|
|
1223
1312
|
|
|
1224
1313
|
prototype.toString = function toString(encoder) {
|
|
1225
|
-
const _encode = encoder
|
|
1226
|
-
|
|
1227
|
-
|
|
1314
|
+
const _encode = encoder
|
|
1315
|
+
? function (value) {
|
|
1316
|
+
return encoder.call(this, value, encode$1);
|
|
1317
|
+
}
|
|
1318
|
+
: encode$1;
|
|
1228
1319
|
|
|
1229
|
-
return this._pairs
|
|
1230
|
-
|
|
1231
|
-
|
|
1320
|
+
return this._pairs
|
|
1321
|
+
.map(function each(pair) {
|
|
1322
|
+
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
1323
|
+
}, '')
|
|
1324
|
+
.join('&');
|
|
1232
1325
|
};
|
|
1233
1326
|
|
|
1234
1327
|
/**
|
|
1235
|
-
* It replaces
|
|
1236
|
-
*
|
|
1328
|
+
* It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
|
|
1329
|
+
* their plain counterparts (`:`, `$`, `,`, `+`).
|
|
1237
1330
|
*
|
|
1238
1331
|
* @param {string} val The value to be encoded.
|
|
1239
1332
|
*
|
|
1240
1333
|
* @returns {string} The encoded value.
|
|
1241
1334
|
*/
|
|
1242
1335
|
function encode(val) {
|
|
1243
|
-
return encodeURIComponent(val)
|
|
1244
|
-
replace(/%3A/gi, ':')
|
|
1245
|
-
replace(/%24/g, '$')
|
|
1246
|
-
replace(/%2C/gi, ',')
|
|
1247
|
-
replace(/%20/g, '+');
|
|
1336
|
+
return encodeURIComponent(val)
|
|
1337
|
+
.replace(/%3A/gi, ':')
|
|
1338
|
+
.replace(/%24/g, '$')
|
|
1339
|
+
.replace(/%2C/gi, ',')
|
|
1340
|
+
.replace(/%20/g, '+');
|
|
1248
1341
|
}
|
|
1249
1342
|
|
|
1250
1343
|
/**
|
|
@@ -1261,11 +1354,13 @@ function requireAxios () {
|
|
|
1261
1354
|
return url;
|
|
1262
1355
|
}
|
|
1263
1356
|
|
|
1264
|
-
const _encode = options && options.encode || encode;
|
|
1357
|
+
const _encode = (options && options.encode) || encode;
|
|
1265
1358
|
|
|
1266
|
-
const _options = utils$1.isFunction(options)
|
|
1267
|
-
|
|
1268
|
-
|
|
1359
|
+
const _options = utils$1.isFunction(options)
|
|
1360
|
+
? {
|
|
1361
|
+
serialize: options,
|
|
1362
|
+
}
|
|
1363
|
+
: options;
|
|
1269
1364
|
|
|
1270
1365
|
const serializeFn = _options && _options.serialize;
|
|
1271
1366
|
|
|
@@ -1274,13 +1369,13 @@ function requireAxios () {
|
|
|
1274
1369
|
if (serializeFn) {
|
|
1275
1370
|
serializedParams = serializeFn(params, _options);
|
|
1276
1371
|
} else {
|
|
1277
|
-
serializedParams = utils$1.isURLSearchParams(params)
|
|
1278
|
-
params.toString()
|
|
1279
|
-
new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
1372
|
+
serializedParams = utils$1.isURLSearchParams(params)
|
|
1373
|
+
? params.toString()
|
|
1374
|
+
: new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
1280
1375
|
}
|
|
1281
1376
|
|
|
1282
1377
|
if (serializedParams) {
|
|
1283
|
-
const hashmarkIndex = url.indexOf(
|
|
1378
|
+
const hashmarkIndex = url.indexOf('#');
|
|
1284
1379
|
|
|
1285
1380
|
if (hashmarkIndex !== -1) {
|
|
1286
1381
|
url = url.slice(0, hashmarkIndex);
|
|
@@ -1310,7 +1405,7 @@ function requireAxios () {
|
|
|
1310
1405
|
fulfilled,
|
|
1311
1406
|
rejected,
|
|
1312
1407
|
synchronous: options ? options.synchronous : false,
|
|
1313
|
-
runWhen: options ? options.runWhen : null
|
|
1408
|
+
runWhen: options ? options.runWhen : null,
|
|
1314
1409
|
});
|
|
1315
1410
|
return this.handlers.length - 1;
|
|
1316
1411
|
}
|
|
@@ -1358,13 +1453,11 @@ function requireAxios () {
|
|
|
1358
1453
|
}
|
|
1359
1454
|
}
|
|
1360
1455
|
|
|
1361
|
-
var InterceptorManager$1 = InterceptorManager;
|
|
1362
|
-
|
|
1363
1456
|
var transitionalDefaults = {
|
|
1364
1457
|
silentJSONParsing: true,
|
|
1365
1458
|
forcedJSONParsing: true,
|
|
1366
1459
|
clarifyTimeoutError: false,
|
|
1367
|
-
legacyInterceptorReqResOrdering: true
|
|
1460
|
+
legacyInterceptorReqResOrdering: true,
|
|
1368
1461
|
};
|
|
1369
1462
|
|
|
1370
1463
|
var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
|
|
@@ -1378,14 +1471,14 @@ function requireAxios () {
|
|
|
1378
1471
|
classes: {
|
|
1379
1472
|
URLSearchParams: URLSearchParams$1,
|
|
1380
1473
|
FormData: FormData$1,
|
|
1381
|
-
Blob: Blob$1
|
|
1474
|
+
Blob: Blob$1,
|
|
1382
1475
|
},
|
|
1383
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
1476
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
|
|
1384
1477
|
};
|
|
1385
1478
|
|
|
1386
1479
|
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
1387
1480
|
|
|
1388
|
-
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
1481
|
+
const _navigator = (typeof navigator === 'object' && navigator) || undefined;
|
|
1389
1482
|
|
|
1390
1483
|
/**
|
|
1391
1484
|
* Determine if we're running in a standard browser environment
|
|
@@ -1404,7 +1497,8 @@ function requireAxios () {
|
|
|
1404
1497
|
*
|
|
1405
1498
|
* @returns {boolean}
|
|
1406
1499
|
*/
|
|
1407
|
-
const hasStandardBrowserEnv =
|
|
1500
|
+
const hasStandardBrowserEnv =
|
|
1501
|
+
hasBrowserEnv &&
|
|
1408
1502
|
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
1409
1503
|
|
|
1410
1504
|
/**
|
|
@@ -1425,25 +1519,25 @@ function requireAxios () {
|
|
|
1425
1519
|
);
|
|
1426
1520
|
})();
|
|
1427
1521
|
|
|
1428
|
-
const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
1522
|
+
const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
|
|
1429
1523
|
|
|
1430
1524
|
var utils = /*#__PURE__*/Object.freeze({
|
|
1431
1525
|
__proto__: null,
|
|
1432
1526
|
hasBrowserEnv: hasBrowserEnv,
|
|
1433
|
-
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
|
1434
1527
|
hasStandardBrowserEnv: hasStandardBrowserEnv,
|
|
1528
|
+
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
|
1435
1529
|
navigator: _navigator,
|
|
1436
1530
|
origin: origin
|
|
1437
1531
|
});
|
|
1438
1532
|
|
|
1439
1533
|
var platform = {
|
|
1440
1534
|
...utils,
|
|
1441
|
-
...platform$1
|
|
1535
|
+
...platform$1,
|
|
1442
1536
|
};
|
|
1443
1537
|
|
|
1444
1538
|
function toURLEncodedForm(data, options) {
|
|
1445
1539
|
return toFormData(data, new platform.classes.URLSearchParams(), {
|
|
1446
|
-
visitor: function(value, key, path, helpers) {
|
|
1540
|
+
visitor: function (value, key, path, helpers) {
|
|
1447
1541
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
1448
1542
|
this.append(key, value.toString('base64'));
|
|
1449
1543
|
return false;
|
|
@@ -1451,7 +1545,7 @@ function requireAxios () {
|
|
|
1451
1545
|
|
|
1452
1546
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
1453
1547
|
},
|
|
1454
|
-
...options
|
|
1548
|
+
...options,
|
|
1455
1549
|
});
|
|
1456
1550
|
}
|
|
1457
1551
|
|
|
@@ -1467,7 +1561,7 @@ function requireAxios () {
|
|
|
1467
1561
|
// foo.x.y.z
|
|
1468
1562
|
// foo-x-y-z
|
|
1469
1563
|
// foo x y z
|
|
1470
|
-
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
1564
|
+
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
1471
1565
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
1472
1566
|
});
|
|
1473
1567
|
}
|
|
@@ -1571,96 +1665,107 @@ function requireAxios () {
|
|
|
1571
1665
|
}
|
|
1572
1666
|
|
|
1573
1667
|
const defaults = {
|
|
1574
|
-
|
|
1575
1668
|
transitional: transitionalDefaults,
|
|
1576
1669
|
|
|
1577
1670
|
adapter: ['xhr', 'http', 'fetch'],
|
|
1578
1671
|
|
|
1579
|
-
transformRequest: [
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1672
|
+
transformRequest: [
|
|
1673
|
+
function transformRequest(data, headers) {
|
|
1674
|
+
const contentType = headers.getContentType() || '';
|
|
1675
|
+
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
1676
|
+
const isObjectPayload = utils$1.isObject(data);
|
|
1583
1677
|
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1678
|
+
if (isObjectPayload && utils$1.isHTMLForm(data)) {
|
|
1679
|
+
data = new FormData(data);
|
|
1680
|
+
}
|
|
1587
1681
|
|
|
1588
|
-
|
|
1682
|
+
const isFormData = utils$1.isFormData(data);
|
|
1589
1683
|
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1684
|
+
if (isFormData) {
|
|
1685
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
1686
|
+
}
|
|
1593
1687
|
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1688
|
+
if (
|
|
1689
|
+
utils$1.isArrayBuffer(data) ||
|
|
1690
|
+
utils$1.isBuffer(data) ||
|
|
1691
|
+
utils$1.isStream(data) ||
|
|
1692
|
+
utils$1.isFile(data) ||
|
|
1693
|
+
utils$1.isBlob(data) ||
|
|
1694
|
+
utils$1.isReadableStream(data)
|
|
1695
|
+
) {
|
|
1696
|
+
return data;
|
|
1697
|
+
}
|
|
1698
|
+
if (utils$1.isArrayBufferView(data)) {
|
|
1699
|
+
return data.buffer;
|
|
1700
|
+
}
|
|
1701
|
+
if (utils$1.isURLSearchParams(data)) {
|
|
1702
|
+
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
1703
|
+
return data.toString();
|
|
1704
|
+
}
|
|
1610
1705
|
|
|
1611
|
-
|
|
1706
|
+
let isFileList;
|
|
1612
1707
|
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1708
|
+
if (isObjectPayload) {
|
|
1709
|
+
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
1710
|
+
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
1711
|
+
}
|
|
1617
1712
|
|
|
1618
|
-
|
|
1619
|
-
|
|
1713
|
+
if (
|
|
1714
|
+
(isFileList = utils$1.isFileList(data)) ||
|
|
1715
|
+
contentType.indexOf('multipart/form-data') > -1
|
|
1716
|
+
) {
|
|
1717
|
+
const _FormData = this.env && this.env.FormData;
|
|
1620
1718
|
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1719
|
+
return toFormData(
|
|
1720
|
+
isFileList ? { 'files[]': data } : data,
|
|
1721
|
+
_FormData && new _FormData(),
|
|
1722
|
+
this.formSerializer
|
|
1723
|
+
);
|
|
1724
|
+
}
|
|
1626
1725
|
}
|
|
1627
|
-
}
|
|
1628
1726
|
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1727
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
1728
|
+
headers.setContentType('application/json', false);
|
|
1729
|
+
return stringifySafely(data);
|
|
1730
|
+
}
|
|
1633
1731
|
|
|
1634
|
-
|
|
1635
|
-
|
|
1732
|
+
return data;
|
|
1733
|
+
},
|
|
1734
|
+
],
|
|
1636
1735
|
|
|
1637
|
-
transformResponse: [
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1736
|
+
transformResponse: [
|
|
1737
|
+
function transformResponse(data) {
|
|
1738
|
+
const transitional = this.transitional || defaults.transitional;
|
|
1739
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
1740
|
+
const JSONRequested = this.responseType === 'json';
|
|
1641
1741
|
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1742
|
+
if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
|
|
1743
|
+
return data;
|
|
1744
|
+
}
|
|
1645
1745
|
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1746
|
+
if (
|
|
1747
|
+
data &&
|
|
1748
|
+
utils$1.isString(data) &&
|
|
1749
|
+
((forcedJSONParsing && !this.responseType) || JSONRequested)
|
|
1750
|
+
) {
|
|
1751
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
1752
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
1649
1753
|
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1754
|
+
try {
|
|
1755
|
+
return JSON.parse(data, this.parseReviver);
|
|
1756
|
+
} catch (e) {
|
|
1757
|
+
if (strictJSONParsing) {
|
|
1758
|
+
if (e.name === 'SyntaxError') {
|
|
1759
|
+
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
1760
|
+
}
|
|
1761
|
+
throw e;
|
|
1656
1762
|
}
|
|
1657
|
-
throw e;
|
|
1658
1763
|
}
|
|
1659
1764
|
}
|
|
1660
|
-
}
|
|
1661
1765
|
|
|
1662
|
-
|
|
1663
|
-
|
|
1766
|
+
return data;
|
|
1767
|
+
},
|
|
1768
|
+
],
|
|
1664
1769
|
|
|
1665
1770
|
/**
|
|
1666
1771
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
@@ -1676,7 +1781,7 @@ function requireAxios () {
|
|
|
1676
1781
|
|
|
1677
1782
|
env: {
|
|
1678
1783
|
FormData: platform.classes.FormData,
|
|
1679
|
-
Blob: platform.classes.Blob
|
|
1784
|
+
Blob: platform.classes.Blob,
|
|
1680
1785
|
},
|
|
1681
1786
|
|
|
1682
1787
|
validateStatus: function validateStatus(status) {
|
|
@@ -1685,25 +1790,36 @@ function requireAxios () {
|
|
|
1685
1790
|
|
|
1686
1791
|
headers: {
|
|
1687
1792
|
common: {
|
|
1688
|
-
|
|
1689
|
-
'Content-Type': undefined
|
|
1690
|
-
}
|
|
1691
|
-
}
|
|
1793
|
+
Accept: 'application/json, text/plain, */*',
|
|
1794
|
+
'Content-Type': undefined,
|
|
1795
|
+
},
|
|
1796
|
+
},
|
|
1692
1797
|
};
|
|
1693
1798
|
|
|
1694
1799
|
utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
1695
1800
|
defaults.headers[method] = {};
|
|
1696
1801
|
});
|
|
1697
1802
|
|
|
1698
|
-
var defaults$1 = defaults;
|
|
1699
|
-
|
|
1700
1803
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
1701
1804
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
1702
1805
|
const ignoreDuplicateOf = utils$1.toObjectSet([
|
|
1703
|
-
'age',
|
|
1704
|
-
'
|
|
1705
|
-
'
|
|
1706
|
-
'
|
|
1806
|
+
'age',
|
|
1807
|
+
'authorization',
|
|
1808
|
+
'content-length',
|
|
1809
|
+
'content-type',
|
|
1810
|
+
'etag',
|
|
1811
|
+
'expires',
|
|
1812
|
+
'from',
|
|
1813
|
+
'host',
|
|
1814
|
+
'if-modified-since',
|
|
1815
|
+
'if-unmodified-since',
|
|
1816
|
+
'last-modified',
|
|
1817
|
+
'location',
|
|
1818
|
+
'max-forwards',
|
|
1819
|
+
'proxy-authorization',
|
|
1820
|
+
'referer',
|
|
1821
|
+
'retry-after',
|
|
1822
|
+
'user-agent',
|
|
1707
1823
|
]);
|
|
1708
1824
|
|
|
1709
1825
|
/**
|
|
@@ -1720,47 +1836,81 @@ function requireAxios () {
|
|
|
1720
1836
|
*
|
|
1721
1837
|
* @returns {Object} Headers parsed into an object
|
|
1722
1838
|
*/
|
|
1723
|
-
var parseHeaders = rawHeaders => {
|
|
1839
|
+
var parseHeaders = (rawHeaders) => {
|
|
1724
1840
|
const parsed = {};
|
|
1725
1841
|
let key;
|
|
1726
1842
|
let val;
|
|
1727
1843
|
let i;
|
|
1728
1844
|
|
|
1729
|
-
rawHeaders &&
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1845
|
+
rawHeaders &&
|
|
1846
|
+
rawHeaders.split('\n').forEach(function parser(line) {
|
|
1847
|
+
i = line.indexOf(':');
|
|
1848
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
1849
|
+
val = line.substring(i + 1).trim();
|
|
1733
1850
|
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1851
|
+
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
|
|
1852
|
+
return;
|
|
1853
|
+
}
|
|
1737
1854
|
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1855
|
+
if (key === 'set-cookie') {
|
|
1856
|
+
if (parsed[key]) {
|
|
1857
|
+
parsed[key].push(val);
|
|
1858
|
+
} else {
|
|
1859
|
+
parsed[key] = [val];
|
|
1860
|
+
}
|
|
1741
1861
|
} else {
|
|
1742
|
-
parsed[key] = [val
|
|
1862
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
1743
1863
|
}
|
|
1744
|
-
}
|
|
1745
|
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
1746
|
-
}
|
|
1747
|
-
});
|
|
1864
|
+
});
|
|
1748
1865
|
|
|
1749
1866
|
return parsed;
|
|
1750
1867
|
};
|
|
1751
1868
|
|
|
1752
1869
|
const $internals = Symbol('internals');
|
|
1753
1870
|
|
|
1871
|
+
const isValidHeaderValue = (value) => !/[\r\n]/.test(value);
|
|
1872
|
+
|
|
1873
|
+
function assertValidHeaderValue(value, header) {
|
|
1874
|
+
if (value === false || value == null) {
|
|
1875
|
+
return;
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
if (utils$1.isArray(value)) {
|
|
1879
|
+
value.forEach((v) => assertValidHeaderValue(v, header));
|
|
1880
|
+
return;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
if (!isValidHeaderValue(String(value))) {
|
|
1884
|
+
throw new Error(`Invalid character in header content ["${header}"]`);
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1754
1888
|
function normalizeHeader(header) {
|
|
1755
1889
|
return header && String(header).trim().toLowerCase();
|
|
1756
1890
|
}
|
|
1757
1891
|
|
|
1892
|
+
function stripTrailingCRLF(str) {
|
|
1893
|
+
let end = str.length;
|
|
1894
|
+
|
|
1895
|
+
while (end > 0) {
|
|
1896
|
+
const charCode = str.charCodeAt(end - 1);
|
|
1897
|
+
|
|
1898
|
+
if (charCode !== 10 && charCode !== 13) {
|
|
1899
|
+
break;
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
end -= 1;
|
|
1903
|
+
}
|
|
1904
|
+
|
|
1905
|
+
return end === str.length ? str : str.slice(0, end);
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1758
1908
|
function normalizeValue(value) {
|
|
1759
1909
|
if (value === false || value == null) {
|
|
1760
1910
|
return value;
|
|
1761
1911
|
}
|
|
1762
1912
|
|
|
1763
|
-
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
1913
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
|
|
1764
1914
|
}
|
|
1765
1915
|
|
|
1766
1916
|
function parseTokens(str) {
|
|
@@ -1798,8 +1948,10 @@ function requireAxios () {
|
|
|
1798
1948
|
}
|
|
1799
1949
|
|
|
1800
1950
|
function formatHeader(header) {
|
|
1801
|
-
return header
|
|
1802
|
-
.
|
|
1951
|
+
return header
|
|
1952
|
+
.trim()
|
|
1953
|
+
.toLowerCase()
|
|
1954
|
+
.replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
1803
1955
|
return char.toUpperCase() + str;
|
|
1804
1956
|
});
|
|
1805
1957
|
}
|
|
@@ -1807,12 +1959,12 @@ function requireAxios () {
|
|
|
1807
1959
|
function buildAccessors(obj, header) {
|
|
1808
1960
|
const accessorName = utils$1.toCamelCase(' ' + header);
|
|
1809
1961
|
|
|
1810
|
-
['get', 'set', 'has'].forEach(methodName => {
|
|
1962
|
+
['get', 'set', 'has'].forEach((methodName) => {
|
|
1811
1963
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
1812
|
-
value: function(arg1, arg2, arg3) {
|
|
1964
|
+
value: function (arg1, arg2, arg3) {
|
|
1813
1965
|
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
1814
1966
|
},
|
|
1815
|
-
configurable: true
|
|
1967
|
+
configurable: true,
|
|
1816
1968
|
});
|
|
1817
1969
|
});
|
|
1818
1970
|
}
|
|
@@ -1834,7 +1986,13 @@ function requireAxios () {
|
|
|
1834
1986
|
|
|
1835
1987
|
const key = utils$1.findKey(self, lHeader);
|
|
1836
1988
|
|
|
1837
|
-
if
|
|
1989
|
+
if (
|
|
1990
|
+
!key ||
|
|
1991
|
+
self[key] === undefined ||
|
|
1992
|
+
_rewrite === true ||
|
|
1993
|
+
(_rewrite === undefined && self[key] !== false)
|
|
1994
|
+
) {
|
|
1995
|
+
assertValidHeaderValue(_value, _header);
|
|
1838
1996
|
self[key || _header] = normalizeValue(_value);
|
|
1839
1997
|
}
|
|
1840
1998
|
}
|
|
@@ -1844,17 +2002,22 @@ function requireAxios () {
|
|
|
1844
2002
|
|
|
1845
2003
|
if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
|
|
1846
2004
|
setHeaders(header, valueOrRewrite);
|
|
1847
|
-
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
2005
|
+
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
1848
2006
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
1849
2007
|
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
|
1850
|
-
let obj = {},
|
|
2008
|
+
let obj = {},
|
|
2009
|
+
dest,
|
|
2010
|
+
key;
|
|
1851
2011
|
for (const entry of header) {
|
|
1852
2012
|
if (!utils$1.isArray(entry)) {
|
|
1853
2013
|
throw TypeError('Object iterator must return a key-value pair');
|
|
1854
2014
|
}
|
|
1855
2015
|
|
|
1856
|
-
obj[key = entry[0]] = (dest = obj[key])
|
|
1857
|
-
|
|
2016
|
+
obj[(key = entry[0])] = (dest = obj[key])
|
|
2017
|
+
? utils$1.isArray(dest)
|
|
2018
|
+
? [...dest, entry[1]]
|
|
2019
|
+
: [dest, entry[1]]
|
|
2020
|
+
: entry[1];
|
|
1858
2021
|
}
|
|
1859
2022
|
|
|
1860
2023
|
setHeaders(obj, valueOrRewrite);
|
|
@@ -1901,7 +2064,11 @@ function requireAxios () {
|
|
|
1901
2064
|
if (header) {
|
|
1902
2065
|
const key = utils$1.findKey(this, header);
|
|
1903
2066
|
|
|
1904
|
-
return !!(
|
|
2067
|
+
return !!(
|
|
2068
|
+
key &&
|
|
2069
|
+
this[key] !== undefined &&
|
|
2070
|
+
(!matcher || matchHeaderValue(this, this[key], key, matcher))
|
|
2071
|
+
);
|
|
1905
2072
|
}
|
|
1906
2073
|
|
|
1907
2074
|
return false;
|
|
@@ -1941,7 +2108,7 @@ function requireAxios () {
|
|
|
1941
2108
|
|
|
1942
2109
|
while (i--) {
|
|
1943
2110
|
const key = keys[i];
|
|
1944
|
-
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
2111
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
1945
2112
|
delete this[key];
|
|
1946
2113
|
deleted = true;
|
|
1947
2114
|
}
|
|
@@ -1985,7 +2152,9 @@ function requireAxios () {
|
|
|
1985
2152
|
const obj = Object.create(null);
|
|
1986
2153
|
|
|
1987
2154
|
utils$1.forEach(this, (value, header) => {
|
|
1988
|
-
value != null &&
|
|
2155
|
+
value != null &&
|
|
2156
|
+
value !== false &&
|
|
2157
|
+
(obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
|
|
1989
2158
|
});
|
|
1990
2159
|
|
|
1991
2160
|
return obj;
|
|
@@ -1996,11 +2165,13 @@ function requireAxios () {
|
|
|
1996
2165
|
}
|
|
1997
2166
|
|
|
1998
2167
|
toString() {
|
|
1999
|
-
return Object.entries(this.toJSON())
|
|
2168
|
+
return Object.entries(this.toJSON())
|
|
2169
|
+
.map(([header, value]) => header + ': ' + value)
|
|
2170
|
+
.join('\n');
|
|
2000
2171
|
}
|
|
2001
2172
|
|
|
2002
2173
|
getSetCookie() {
|
|
2003
|
-
return this.get(
|
|
2174
|
+
return this.get('set-cookie') || [];
|
|
2004
2175
|
}
|
|
2005
2176
|
|
|
2006
2177
|
get [Symbol.toStringTag]() {
|
|
@@ -2020,9 +2191,12 @@ function requireAxios () {
|
|
|
2020
2191
|
}
|
|
2021
2192
|
|
|
2022
2193
|
static accessor(header) {
|
|
2023
|
-
const internals =
|
|
2024
|
-
|
|
2025
|
-
|
|
2194
|
+
const internals =
|
|
2195
|
+
(this[$internals] =
|
|
2196
|
+
this[$internals] =
|
|
2197
|
+
{
|
|
2198
|
+
accessors: {},
|
|
2199
|
+
});
|
|
2026
2200
|
|
|
2027
2201
|
const accessors = internals.accessors;
|
|
2028
2202
|
const prototype = this.prototype;
|
|
@@ -2042,23 +2216,28 @@ function requireAxios () {
|
|
|
2042
2216
|
}
|
|
2043
2217
|
}
|
|
2044
2218
|
|
|
2045
|
-
AxiosHeaders.accessor([
|
|
2219
|
+
AxiosHeaders.accessor([
|
|
2220
|
+
'Content-Type',
|
|
2221
|
+
'Content-Length',
|
|
2222
|
+
'Accept',
|
|
2223
|
+
'Accept-Encoding',
|
|
2224
|
+
'User-Agent',
|
|
2225
|
+
'Authorization',
|
|
2226
|
+
]);
|
|
2046
2227
|
|
|
2047
2228
|
// reserved names hotfix
|
|
2048
|
-
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
2229
|
+
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
2049
2230
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
2050
2231
|
return {
|
|
2051
2232
|
get: () => value,
|
|
2052
2233
|
set(headerValue) {
|
|
2053
2234
|
this[mapped] = headerValue;
|
|
2054
|
-
}
|
|
2055
|
-
}
|
|
2235
|
+
},
|
|
2236
|
+
};
|
|
2056
2237
|
});
|
|
2057
2238
|
|
|
2058
2239
|
utils$1.freezeMethods(AxiosHeaders);
|
|
2059
2240
|
|
|
2060
|
-
var AxiosHeaders$1 = AxiosHeaders;
|
|
2061
|
-
|
|
2062
2241
|
/**
|
|
2063
2242
|
* Transform the data for a request or a response
|
|
2064
2243
|
*
|
|
@@ -2068,9 +2247,9 @@ function requireAxios () {
|
|
|
2068
2247
|
* @returns {*} The resulting transformed data
|
|
2069
2248
|
*/
|
|
2070
2249
|
function transformData(fns, response) {
|
|
2071
|
-
const config = this || defaults
|
|
2250
|
+
const config = this || defaults;
|
|
2072
2251
|
const context = response || config;
|
|
2073
|
-
const headers = AxiosHeaders
|
|
2252
|
+
const headers = AxiosHeaders.from(context.headers);
|
|
2074
2253
|
let data = context.data;
|
|
2075
2254
|
|
|
2076
2255
|
utils$1.forEach(fns, function transform(fn) {
|
|
@@ -2086,7 +2265,7 @@ function requireAxios () {
|
|
|
2086
2265
|
return !!(value && value.__CANCEL__);
|
|
2087
2266
|
}
|
|
2088
2267
|
|
|
2089
|
-
class CanceledError extends AxiosError
|
|
2268
|
+
class CanceledError extends AxiosError {
|
|
2090
2269
|
/**
|
|
2091
2270
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
2092
2271
|
*
|
|
@@ -2097,14 +2276,12 @@ function requireAxios () {
|
|
|
2097
2276
|
* @returns {CanceledError} The created error.
|
|
2098
2277
|
*/
|
|
2099
2278
|
constructor(message, config, request) {
|
|
2100
|
-
super(message == null ? 'canceled' : message, AxiosError
|
|
2279
|
+
super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
|
|
2101
2280
|
this.name = 'CanceledError';
|
|
2102
2281
|
this.__CANCEL__ = true;
|
|
2103
2282
|
}
|
|
2104
2283
|
}
|
|
2105
2284
|
|
|
2106
|
-
var CanceledError$1 = CanceledError;
|
|
2107
|
-
|
|
2108
2285
|
/**
|
|
2109
2286
|
* Resolve or reject a Promise based on response status.
|
|
2110
2287
|
*
|
|
@@ -2119,19 +2296,23 @@ function requireAxios () {
|
|
|
2119
2296
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
2120
2297
|
resolve(response);
|
|
2121
2298
|
} else {
|
|
2122
|
-
reject(
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2299
|
+
reject(
|
|
2300
|
+
new AxiosError(
|
|
2301
|
+
'Request failed with status code ' + response.status,
|
|
2302
|
+
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][
|
|
2303
|
+
Math.floor(response.status / 100) - 4
|
|
2304
|
+
],
|
|
2305
|
+
response.config,
|
|
2306
|
+
response.request,
|
|
2307
|
+
response
|
|
2308
|
+
)
|
|
2309
|
+
);
|
|
2129
2310
|
}
|
|
2130
2311
|
}
|
|
2131
2312
|
|
|
2132
2313
|
function parseProtocol(url) {
|
|
2133
2314
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
2134
|
-
return match && match[1] || '';
|
|
2315
|
+
return (match && match[1]) || '';
|
|
2135
2316
|
}
|
|
2136
2317
|
|
|
2137
2318
|
/**
|
|
@@ -2182,7 +2363,7 @@ function requireAxios () {
|
|
|
2182
2363
|
|
|
2183
2364
|
const passed = startedAt && now - startedAt;
|
|
2184
2365
|
|
|
2185
|
-
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
2366
|
+
return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
|
|
2186
2367
|
};
|
|
2187
2368
|
}
|
|
2188
2369
|
|
|
@@ -2211,7 +2392,7 @@ function requireAxios () {
|
|
|
2211
2392
|
const throttled = (...args) => {
|
|
2212
2393
|
const now = Date.now();
|
|
2213
2394
|
const passed = now - timestamp;
|
|
2214
|
-
if (
|
|
2395
|
+
if (passed >= threshold) {
|
|
2215
2396
|
invoke(args, now);
|
|
2216
2397
|
} else {
|
|
2217
2398
|
lastArgs = args;
|
|
@@ -2233,7 +2414,7 @@ function requireAxios () {
|
|
|
2233
2414
|
let bytesNotified = 0;
|
|
2234
2415
|
const _speedometer = speedometer(50, 250);
|
|
2235
2416
|
|
|
2236
|
-
return throttle(e => {
|
|
2417
|
+
return throttle((e) => {
|
|
2237
2418
|
const loaded = e.loaded;
|
|
2238
2419
|
const total = e.lengthComputable ? e.total : undefined;
|
|
2239
2420
|
const progressBytes = loaded - bytesNotified;
|
|
@@ -2245,13 +2426,13 @@ function requireAxios () {
|
|
|
2245
2426
|
const data = {
|
|
2246
2427
|
loaded,
|
|
2247
2428
|
total,
|
|
2248
|
-
progress: total ?
|
|
2429
|
+
progress: total ? loaded / total : undefined,
|
|
2249
2430
|
bytes: progressBytes,
|
|
2250
2431
|
rate: rate ? rate : undefined,
|
|
2251
2432
|
estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
|
|
2252
2433
|
event: e,
|
|
2253
2434
|
lengthComputable: total != null,
|
|
2254
|
-
[isDownloadStream ? 'download' : 'upload']: true
|
|
2435
|
+
[isDownloadStream ? 'download' : 'upload']: true,
|
|
2255
2436
|
};
|
|
2256
2437
|
|
|
2257
2438
|
listener(data);
|
|
@@ -2261,77 +2442,82 @@ function requireAxios () {
|
|
|
2261
2442
|
const progressEventDecorator = (total, throttled) => {
|
|
2262
2443
|
const lengthComputable = total != null;
|
|
2263
2444
|
|
|
2264
|
-
return [
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2445
|
+
return [
|
|
2446
|
+
(loaded) =>
|
|
2447
|
+
throttled[0]({
|
|
2448
|
+
lengthComputable,
|
|
2449
|
+
total,
|
|
2450
|
+
loaded,
|
|
2451
|
+
}),
|
|
2452
|
+
throttled[1],
|
|
2453
|
+
];
|
|
2269
2454
|
};
|
|
2270
2455
|
|
|
2271
|
-
const asyncDecorator =
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
return (
|
|
2277
|
-
origin.protocol === url.protocol &&
|
|
2278
|
-
origin.host === url.host &&
|
|
2279
|
-
(isMSIE || origin.port === url.port)
|
|
2280
|
-
);
|
|
2281
|
-
})(
|
|
2282
|
-
new URL(platform.origin),
|
|
2283
|
-
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
2284
|
-
) : () => true;
|
|
2456
|
+
const asyncDecorator =
|
|
2457
|
+
(fn) =>
|
|
2458
|
+
(...args) =>
|
|
2459
|
+
utils$1.asap(() => fn(...args));
|
|
2285
2460
|
|
|
2286
|
-
var
|
|
2461
|
+
var isURLSameOrigin = platform.hasStandardBrowserEnv
|
|
2462
|
+
? ((origin, isMSIE) => (url) => {
|
|
2463
|
+
url = new URL(url, platform.origin);
|
|
2287
2464
|
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
cookie
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2465
|
+
return (
|
|
2466
|
+
origin.protocol === url.protocol &&
|
|
2467
|
+
origin.host === url.host &&
|
|
2468
|
+
(isMSIE || origin.port === url.port)
|
|
2469
|
+
);
|
|
2470
|
+
})(
|
|
2471
|
+
new URL(platform.origin),
|
|
2472
|
+
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
2473
|
+
)
|
|
2474
|
+
: () => true;
|
|
2475
|
+
|
|
2476
|
+
var cookies = platform.hasStandardBrowserEnv
|
|
2477
|
+
? // Standard browser envs support document.cookie
|
|
2478
|
+
{
|
|
2479
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
2480
|
+
if (typeof document === 'undefined') return;
|
|
2481
|
+
|
|
2482
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
2483
|
+
|
|
2484
|
+
if (utils$1.isNumber(expires)) {
|
|
2485
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
2486
|
+
}
|
|
2487
|
+
if (utils$1.isString(path)) {
|
|
2488
|
+
cookie.push(`path=${path}`);
|
|
2489
|
+
}
|
|
2490
|
+
if (utils$1.isString(domain)) {
|
|
2491
|
+
cookie.push(`domain=${domain}`);
|
|
2492
|
+
}
|
|
2493
|
+
if (secure === true) {
|
|
2494
|
+
cookie.push('secure');
|
|
2495
|
+
}
|
|
2496
|
+
if (utils$1.isString(sameSite)) {
|
|
2497
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
2498
|
+
}
|
|
2310
2499
|
|
|
2311
|
-
|
|
2312
|
-
|
|
2500
|
+
document.cookie = cookie.join('; ');
|
|
2501
|
+
},
|
|
2313
2502
|
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2503
|
+
read(name) {
|
|
2504
|
+
if (typeof document === 'undefined') return null;
|
|
2505
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
2506
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
2507
|
+
},
|
|
2319
2508
|
|
|
2320
|
-
|
|
2321
|
-
|
|
2509
|
+
remove(name) {
|
|
2510
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
2511
|
+
},
|
|
2322
2512
|
}
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
return null;
|
|
2332
|
-
},
|
|
2333
|
-
remove() {}
|
|
2334
|
-
};
|
|
2513
|
+
: // Non-standard browser env (web workers, react-native) lack needed support.
|
|
2514
|
+
{
|
|
2515
|
+
write() {},
|
|
2516
|
+
read() {
|
|
2517
|
+
return null;
|
|
2518
|
+
},
|
|
2519
|
+
remove() {},
|
|
2520
|
+
};
|
|
2335
2521
|
|
|
2336
2522
|
/**
|
|
2337
2523
|
* Determines whether the specified URL is absolute
|
|
@@ -2383,8 +2569,7 @@ function requireAxios () {
|
|
|
2383
2569
|
return requestedURL;
|
|
2384
2570
|
}
|
|
2385
2571
|
|
|
2386
|
-
const headersToObject = (thing) =>
|
|
2387
|
-
thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
|
2572
|
+
const headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing);
|
|
2388
2573
|
|
|
2389
2574
|
/**
|
|
2390
2575
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -2477,23 +2662,12 @@ function requireAxios () {
|
|
|
2477
2662
|
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
2478
2663
|
};
|
|
2479
2664
|
|
|
2480
|
-
utils$1.forEach(
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
prop === "prototype"
|
|
2487
|
-
)
|
|
2488
|
-
return;
|
|
2489
|
-
const merge = utils$1.hasOwnProp(mergeMap, prop)
|
|
2490
|
-
? mergeMap[prop]
|
|
2491
|
-
: mergeDeepProperties;
|
|
2492
|
-
const configValue = merge(config1[prop], config2[prop], prop);
|
|
2493
|
-
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) ||
|
|
2494
|
-
(config[prop] = configValue);
|
|
2495
|
-
},
|
|
2496
|
-
);
|
|
2665
|
+
utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
2666
|
+
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
2667
|
+
const merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
2668
|
+
const configValue = merge(config1[prop], config2[prop], prop);
|
|
2669
|
+
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
2670
|
+
});
|
|
2497
2671
|
|
|
2498
2672
|
return config;
|
|
2499
2673
|
}
|
|
@@ -2503,14 +2677,24 @@ function requireAxios () {
|
|
|
2503
2677
|
|
|
2504
2678
|
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
2505
2679
|
|
|
2506
|
-
newConfig.headers = headers = AxiosHeaders
|
|
2680
|
+
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
2507
2681
|
|
|
2508
|
-
newConfig.url = buildURL(
|
|
2682
|
+
newConfig.url = buildURL(
|
|
2683
|
+
buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
|
|
2684
|
+
config.params,
|
|
2685
|
+
config.paramsSerializer
|
|
2686
|
+
);
|
|
2509
2687
|
|
|
2510
2688
|
// HTTP basic authentication
|
|
2511
2689
|
if (auth) {
|
|
2512
|
-
headers.set(
|
|
2513
|
-
|
|
2690
|
+
headers.set(
|
|
2691
|
+
'Authorization',
|
|
2692
|
+
'Basic ' +
|
|
2693
|
+
btoa(
|
|
2694
|
+
(auth.username || '') +
|
|
2695
|
+
':' +
|
|
2696
|
+
(auth.password ? unescape(encodeURIComponent(auth.password)) : '')
|
|
2697
|
+
)
|
|
2514
2698
|
);
|
|
2515
2699
|
}
|
|
2516
2700
|
|
|
@@ -2528,7 +2712,7 @@ function requireAxios () {
|
|
|
2528
2712
|
}
|
|
2529
2713
|
});
|
|
2530
2714
|
}
|
|
2531
|
-
}
|
|
2715
|
+
}
|
|
2532
2716
|
|
|
2533
2717
|
// Add xsrf header
|
|
2534
2718
|
// This is only done if running in a standard browser environment.
|
|
@@ -2552,196 +2736,218 @@ function requireAxios () {
|
|
|
2552
2736
|
|
|
2553
2737
|
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
2554
2738
|
|
|
2555
|
-
var xhrAdapter = isXHRAdapterSupported &&
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2739
|
+
var xhrAdapter = isXHRAdapterSupported &&
|
|
2740
|
+
function (config) {
|
|
2741
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
2742
|
+
const _config = resolveConfig(config);
|
|
2743
|
+
let requestData = _config.data;
|
|
2744
|
+
const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
|
|
2745
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
2746
|
+
let onCanceled;
|
|
2747
|
+
let uploadThrottled, downloadThrottled;
|
|
2748
|
+
let flushUpload, flushDownload;
|
|
2564
2749
|
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2750
|
+
function done() {
|
|
2751
|
+
flushUpload && flushUpload(); // flush events
|
|
2752
|
+
flushDownload && flushDownload(); // flush events
|
|
2568
2753
|
|
|
2569
|
-
|
|
2754
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
2570
2755
|
|
|
2571
|
-
|
|
2572
|
-
|
|
2756
|
+
_config.signal && _config.signal.removeEventListener('abort', onCanceled);
|
|
2757
|
+
}
|
|
2573
2758
|
|
|
2574
|
-
|
|
2759
|
+
let request = new XMLHttpRequest();
|
|
2575
2760
|
|
|
2576
|
-
|
|
2761
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
2577
2762
|
|
|
2578
|
-
|
|
2579
|
-
|
|
2763
|
+
// Set the request timeout in MS
|
|
2764
|
+
request.timeout = _config.timeout;
|
|
2580
2765
|
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2766
|
+
function onloadend() {
|
|
2767
|
+
if (!request) {
|
|
2768
|
+
return;
|
|
2769
|
+
}
|
|
2770
|
+
// Prepare the response
|
|
2771
|
+
const responseHeaders = AxiosHeaders.from(
|
|
2772
|
+
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
2773
|
+
);
|
|
2774
|
+
const responseData =
|
|
2775
|
+
!responseType || responseType === 'text' || responseType === 'json'
|
|
2776
|
+
? request.responseText
|
|
2777
|
+
: request.response;
|
|
2778
|
+
const response = {
|
|
2779
|
+
data: responseData,
|
|
2780
|
+
status: request.status,
|
|
2781
|
+
statusText: request.statusText,
|
|
2782
|
+
headers: responseHeaders,
|
|
2783
|
+
config,
|
|
2784
|
+
request,
|
|
2785
|
+
};
|
|
2786
|
+
|
|
2787
|
+
settle(
|
|
2788
|
+
function _resolve(value) {
|
|
2789
|
+
resolve(value);
|
|
2790
|
+
done();
|
|
2791
|
+
},
|
|
2792
|
+
function _reject(err) {
|
|
2793
|
+
reject(err);
|
|
2794
|
+
done();
|
|
2795
|
+
},
|
|
2796
|
+
response
|
|
2797
|
+
);
|
|
2798
|
+
|
|
2799
|
+
// Clean up request
|
|
2800
|
+
request = null;
|
|
2584
2801
|
}
|
|
2585
|
-
// Prepare the response
|
|
2586
|
-
const responseHeaders = AxiosHeaders$1.from(
|
|
2587
|
-
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
2588
|
-
);
|
|
2589
|
-
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
|
2590
|
-
request.responseText : request.response;
|
|
2591
|
-
const response = {
|
|
2592
|
-
data: responseData,
|
|
2593
|
-
status: request.status,
|
|
2594
|
-
statusText: request.statusText,
|
|
2595
|
-
headers: responseHeaders,
|
|
2596
|
-
config,
|
|
2597
|
-
request
|
|
2598
|
-
};
|
|
2599
2802
|
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
}
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2803
|
+
if ('onloadend' in request) {
|
|
2804
|
+
// Use onloadend if available
|
|
2805
|
+
request.onloadend = onloadend;
|
|
2806
|
+
} else {
|
|
2807
|
+
// Listen for ready state to emulate onloadend
|
|
2808
|
+
request.onreadystatechange = function handleLoad() {
|
|
2809
|
+
if (!request || request.readyState !== 4) {
|
|
2810
|
+
return;
|
|
2811
|
+
}
|
|
2607
2812
|
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2813
|
+
// The request errored out and we didn't get a response, this will be
|
|
2814
|
+
// handled by onerror instead
|
|
2815
|
+
// With one exception: request that using file: protocol, most browsers
|
|
2816
|
+
// will return status as 0 even though it's a successful request
|
|
2817
|
+
if (
|
|
2818
|
+
request.status === 0 &&
|
|
2819
|
+
!(request.responseURL && request.responseURL.indexOf('file:') === 0)
|
|
2820
|
+
) {
|
|
2821
|
+
return;
|
|
2822
|
+
}
|
|
2823
|
+
// readystate handler is calling before onerror or ontimeout handlers,
|
|
2824
|
+
// so we should call onloadend on the next 'tick'
|
|
2825
|
+
setTimeout(onloadend);
|
|
2826
|
+
};
|
|
2827
|
+
}
|
|
2611
2828
|
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
} else {
|
|
2616
|
-
// Listen for ready state to emulate onloadend
|
|
2617
|
-
request.onreadystatechange = function handleLoad() {
|
|
2618
|
-
if (!request || request.readyState !== 4) {
|
|
2829
|
+
// Handle browser request cancellation (as opposed to a manual cancellation)
|
|
2830
|
+
request.onabort = function handleAbort() {
|
|
2831
|
+
if (!request) {
|
|
2619
2832
|
return;
|
|
2620
2833
|
}
|
|
2621
2834
|
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
//
|
|
2625
|
-
|
|
2626
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
|
2627
|
-
return;
|
|
2628
|
-
}
|
|
2629
|
-
// readystate handler is calling before onerror or ontimeout handlers,
|
|
2630
|
-
// so we should call onloadend on the next 'tick'
|
|
2631
|
-
setTimeout(onloadend);
|
|
2835
|
+
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
|
2836
|
+
|
|
2837
|
+
// Clean up request
|
|
2838
|
+
request = null;
|
|
2632
2839
|
};
|
|
2633
|
-
}
|
|
2634
2840
|
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2841
|
+
// Handle low level network errors
|
|
2842
|
+
request.onerror = function handleError(event) {
|
|
2843
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
2844
|
+
// (message may be empty; when present, surface it)
|
|
2845
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
2846
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
2847
|
+
const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
|
|
2848
|
+
// attach the underlying event for consumers who want details
|
|
2849
|
+
err.event = event || null;
|
|
2850
|
+
reject(err);
|
|
2851
|
+
request = null;
|
|
2852
|
+
};
|
|
2640
2853
|
|
|
2641
|
-
|
|
2854
|
+
// Handle timeout
|
|
2855
|
+
request.ontimeout = function handleTimeout() {
|
|
2856
|
+
let timeoutErrorMessage = _config.timeout
|
|
2857
|
+
? 'timeout of ' + _config.timeout + 'ms exceeded'
|
|
2858
|
+
: 'timeout exceeded';
|
|
2859
|
+
const transitional = _config.transitional || transitionalDefaults;
|
|
2860
|
+
if (_config.timeoutErrorMessage) {
|
|
2861
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
2862
|
+
}
|
|
2863
|
+
reject(
|
|
2864
|
+
new AxiosError(
|
|
2865
|
+
timeoutErrorMessage,
|
|
2866
|
+
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
2867
|
+
config,
|
|
2868
|
+
request
|
|
2869
|
+
)
|
|
2870
|
+
);
|
|
2642
2871
|
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2872
|
+
// Clean up request
|
|
2873
|
+
request = null;
|
|
2874
|
+
};
|
|
2646
2875
|
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
// Browsers deliver a ProgressEvent in XHR onerror
|
|
2650
|
-
// (message may be empty; when present, surface it)
|
|
2651
|
-
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
2652
|
-
const msg = event && event.message ? event.message : 'Network Error';
|
|
2653
|
-
const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
|
|
2654
|
-
// attach the underlying event for consumers who want details
|
|
2655
|
-
err.event = event || null;
|
|
2656
|
-
reject(err);
|
|
2657
|
-
request = null;
|
|
2658
|
-
};
|
|
2659
|
-
|
|
2660
|
-
// Handle timeout
|
|
2661
|
-
request.ontimeout = function handleTimeout() {
|
|
2662
|
-
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
2663
|
-
const transitional = _config.transitional || transitionalDefaults;
|
|
2664
|
-
if (_config.timeoutErrorMessage) {
|
|
2665
|
-
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
2666
|
-
}
|
|
2667
|
-
reject(new AxiosError$1(
|
|
2668
|
-
timeoutErrorMessage,
|
|
2669
|
-
transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
|
|
2670
|
-
config,
|
|
2671
|
-
request));
|
|
2672
|
-
|
|
2673
|
-
// Clean up request
|
|
2674
|
-
request = null;
|
|
2675
|
-
};
|
|
2876
|
+
// Remove Content-Type if data is undefined
|
|
2877
|
+
requestData === undefined && requestHeaders.setContentType(null);
|
|
2676
2878
|
|
|
2677
|
-
|
|
2678
|
-
|
|
2879
|
+
// Add headers to the request
|
|
2880
|
+
if ('setRequestHeader' in request) {
|
|
2881
|
+
utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
2882
|
+
request.setRequestHeader(key, val);
|
|
2883
|
+
});
|
|
2884
|
+
}
|
|
2679
2885
|
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
});
|
|
2685
|
-
}
|
|
2886
|
+
// Add withCredentials to request if needed
|
|
2887
|
+
if (!utils$1.isUndefined(_config.withCredentials)) {
|
|
2888
|
+
request.withCredentials = !!_config.withCredentials;
|
|
2889
|
+
}
|
|
2686
2890
|
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2891
|
+
// Add responseType to request if needed
|
|
2892
|
+
if (responseType && responseType !== 'json') {
|
|
2893
|
+
request.responseType = _config.responseType;
|
|
2894
|
+
}
|
|
2691
2895
|
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2896
|
+
// Handle progress if needed
|
|
2897
|
+
if (onDownloadProgress) {
|
|
2898
|
+
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
2899
|
+
request.addEventListener('progress', downloadThrottled);
|
|
2900
|
+
}
|
|
2696
2901
|
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
request.addEventListener('progress', downloadThrottled);
|
|
2701
|
-
}
|
|
2902
|
+
// Not all browsers support upload events
|
|
2903
|
+
if (onUploadProgress && request.upload) {
|
|
2904
|
+
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
|
2702
2905
|
|
|
2703
|
-
|
|
2704
|
-
if (onUploadProgress && request.upload) {
|
|
2705
|
-
([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
|
|
2906
|
+
request.upload.addEventListener('progress', uploadThrottled);
|
|
2706
2907
|
|
|
2707
|
-
|
|
2908
|
+
request.upload.addEventListener('loadend', flushUpload);
|
|
2909
|
+
}
|
|
2708
2910
|
|
|
2709
|
-
|
|
2710
|
-
|
|
2911
|
+
if (_config.cancelToken || _config.signal) {
|
|
2912
|
+
// Handle cancellation
|
|
2913
|
+
// eslint-disable-next-line func-names
|
|
2914
|
+
onCanceled = (cancel) => {
|
|
2915
|
+
if (!request) {
|
|
2916
|
+
return;
|
|
2917
|
+
}
|
|
2918
|
+
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
2919
|
+
request.abort();
|
|
2920
|
+
request = null;
|
|
2921
|
+
};
|
|
2711
2922
|
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
return;
|
|
2923
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
2924
|
+
if (_config.signal) {
|
|
2925
|
+
_config.signal.aborted
|
|
2926
|
+
? onCanceled()
|
|
2927
|
+
: _config.signal.addEventListener('abort', onCanceled);
|
|
2718
2928
|
}
|
|
2719
|
-
reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
|
|
2720
|
-
request.abort();
|
|
2721
|
-
request = null;
|
|
2722
|
-
};
|
|
2723
|
-
|
|
2724
|
-
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
2725
|
-
if (_config.signal) {
|
|
2726
|
-
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
|
|
2727
2929
|
}
|
|
2728
|
-
}
|
|
2729
|
-
|
|
2730
|
-
const protocol = parseProtocol(_config.url);
|
|
2731
2930
|
|
|
2732
|
-
|
|
2733
|
-
reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
|
|
2734
|
-
return;
|
|
2735
|
-
}
|
|
2931
|
+
const protocol = parseProtocol(_config.url);
|
|
2736
2932
|
|
|
2933
|
+
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
2934
|
+
reject(
|
|
2935
|
+
new AxiosError(
|
|
2936
|
+
'Unsupported protocol ' + protocol + ':',
|
|
2937
|
+
AxiosError.ERR_BAD_REQUEST,
|
|
2938
|
+
config
|
|
2939
|
+
)
|
|
2940
|
+
);
|
|
2941
|
+
return;
|
|
2942
|
+
}
|
|
2737
2943
|
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2944
|
+
// Send the request
|
|
2945
|
+
request.send(requestData || null);
|
|
2946
|
+
});
|
|
2947
|
+
};
|
|
2742
2948
|
|
|
2743
2949
|
const composeSignals = (signals, timeout) => {
|
|
2744
|
-
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
|
2950
|
+
const { length } = (signals = signals ? signals.filter(Boolean) : []);
|
|
2745
2951
|
|
|
2746
2952
|
if (timeout || length) {
|
|
2747
2953
|
let controller = new AbortController();
|
|
@@ -2753,21 +2959,29 @@ function requireAxios () {
|
|
|
2753
2959
|
aborted = true;
|
|
2754
2960
|
unsubscribe();
|
|
2755
2961
|
const err = reason instanceof Error ? reason : this.reason;
|
|
2756
|
-
controller.abort(
|
|
2962
|
+
controller.abort(
|
|
2963
|
+
err instanceof AxiosError
|
|
2964
|
+
? err
|
|
2965
|
+
: new CanceledError(err instanceof Error ? err.message : err)
|
|
2966
|
+
);
|
|
2757
2967
|
}
|
|
2758
2968
|
};
|
|
2759
2969
|
|
|
2760
|
-
let timer =
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2970
|
+
let timer =
|
|
2971
|
+
timeout &&
|
|
2972
|
+
setTimeout(() => {
|
|
2973
|
+
timer = null;
|
|
2974
|
+
onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
|
|
2975
|
+
}, timeout);
|
|
2764
2976
|
|
|
2765
2977
|
const unsubscribe = () => {
|
|
2766
2978
|
if (signals) {
|
|
2767
2979
|
timer && clearTimeout(timer);
|
|
2768
2980
|
timer = null;
|
|
2769
|
-
signals.forEach(signal => {
|
|
2770
|
-
signal.unsubscribe
|
|
2981
|
+
signals.forEach((signal) => {
|
|
2982
|
+
signal.unsubscribe
|
|
2983
|
+
? signal.unsubscribe(onabort)
|
|
2984
|
+
: signal.removeEventListener('abort', onabort);
|
|
2771
2985
|
});
|
|
2772
2986
|
signals = null;
|
|
2773
2987
|
}
|
|
@@ -2775,7 +2989,7 @@ function requireAxios () {
|
|
|
2775
2989
|
|
|
2776
2990
|
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
2777
2991
|
|
|
2778
|
-
const {signal} = controller;
|
|
2992
|
+
const { signal } = controller;
|
|
2779
2993
|
|
|
2780
2994
|
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
2781
2995
|
|
|
@@ -2783,8 +2997,6 @@ function requireAxios () {
|
|
|
2783
2997
|
}
|
|
2784
2998
|
};
|
|
2785
2999
|
|
|
2786
|
-
var composeSignals$1 = composeSignals;
|
|
2787
|
-
|
|
2788
3000
|
const streamChunk = function* (chunk, chunkSize) {
|
|
2789
3001
|
let len = chunk.byteLength;
|
|
2790
3002
|
|
|
@@ -2818,7 +3030,7 @@ function requireAxios () {
|
|
|
2818
3030
|
const reader = stream.getReader();
|
|
2819
3031
|
try {
|
|
2820
3032
|
for (;;) {
|
|
2821
|
-
const {done, value} = await reader.read();
|
|
3033
|
+
const { done, value } = await reader.read();
|
|
2822
3034
|
if (done) {
|
|
2823
3035
|
break;
|
|
2824
3036
|
}
|
|
@@ -2841,64 +3053,69 @@ function requireAxios () {
|
|
|
2841
3053
|
}
|
|
2842
3054
|
};
|
|
2843
3055
|
|
|
2844
|
-
return new ReadableStream(
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
3056
|
+
return new ReadableStream(
|
|
3057
|
+
{
|
|
3058
|
+
async pull(controller) {
|
|
3059
|
+
try {
|
|
3060
|
+
const { done, value } = await iterator.next();
|
|
2848
3061
|
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
3062
|
+
if (done) {
|
|
3063
|
+
_onFinish();
|
|
3064
|
+
controller.close();
|
|
3065
|
+
return;
|
|
3066
|
+
}
|
|
2854
3067
|
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
3068
|
+
let len = value.byteLength;
|
|
3069
|
+
if (onProgress) {
|
|
3070
|
+
let loadedBytes = (bytes += len);
|
|
3071
|
+
onProgress(loadedBytes);
|
|
3072
|
+
}
|
|
3073
|
+
controller.enqueue(new Uint8Array(value));
|
|
3074
|
+
} catch (err) {
|
|
3075
|
+
_onFinish(err);
|
|
3076
|
+
throw err;
|
|
2859
3077
|
}
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
_onFinish(
|
|
2863
|
-
|
|
2864
|
-
}
|
|
3078
|
+
},
|
|
3079
|
+
cancel(reason) {
|
|
3080
|
+
_onFinish(reason);
|
|
3081
|
+
return iterator.return();
|
|
3082
|
+
},
|
|
2865
3083
|
},
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
return iterator.return();
|
|
3084
|
+
{
|
|
3085
|
+
highWaterMark: 2,
|
|
2869
3086
|
}
|
|
2870
|
-
|
|
2871
|
-
highWaterMark: 2
|
|
2872
|
-
})
|
|
3087
|
+
);
|
|
2873
3088
|
};
|
|
2874
3089
|
|
|
2875
3090
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
2876
3091
|
|
|
2877
|
-
const {isFunction} = utils$1;
|
|
3092
|
+
const { isFunction } = utils$1;
|
|
2878
3093
|
|
|
2879
|
-
const globalFetchAPI = (({Request, Response}) => ({
|
|
2880
|
-
Request,
|
|
3094
|
+
const globalFetchAPI = (({ Request, Response }) => ({
|
|
3095
|
+
Request,
|
|
3096
|
+
Response,
|
|
2881
3097
|
}))(utils$1.global);
|
|
2882
3098
|
|
|
2883
|
-
const {
|
|
2884
|
-
ReadableStream: ReadableStream$1, TextEncoder
|
|
2885
|
-
} = utils$1.global;
|
|
2886
|
-
|
|
3099
|
+
const { ReadableStream: ReadableStream$1, TextEncoder } = utils$1.global;
|
|
2887
3100
|
|
|
2888
3101
|
const test = (fn, ...args) => {
|
|
2889
3102
|
try {
|
|
2890
3103
|
return !!fn(...args);
|
|
2891
3104
|
} catch (e) {
|
|
2892
|
-
return false
|
|
3105
|
+
return false;
|
|
2893
3106
|
}
|
|
2894
3107
|
};
|
|
2895
3108
|
|
|
2896
3109
|
const factory = (env) => {
|
|
2897
|
-
env = utils$1.merge.call(
|
|
2898
|
-
|
|
2899
|
-
|
|
3110
|
+
env = utils$1.merge.call(
|
|
3111
|
+
{
|
|
3112
|
+
skipUndefined: true,
|
|
3113
|
+
},
|
|
3114
|
+
globalFetchAPI,
|
|
3115
|
+
env
|
|
3116
|
+
);
|
|
2900
3117
|
|
|
2901
|
-
const {fetch: envFetch, Request, Response} = env;
|
|
3118
|
+
const { fetch: envFetch, Request, Response } = env;
|
|
2902
3119
|
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
|
2903
3120
|
const isRequestSupported = isFunction(Request);
|
|
2904
3121
|
const isResponseSupported = isFunction(Response);
|
|
@@ -2909,46 +3126,65 @@ function requireAxios () {
|
|
|
2909
3126
|
|
|
2910
3127
|
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
|
|
2911
3128
|
|
|
2912
|
-
const encodeText =
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
3129
|
+
const encodeText =
|
|
3130
|
+
isFetchSupported &&
|
|
3131
|
+
(typeof TextEncoder === 'function'
|
|
3132
|
+
? (
|
|
3133
|
+
(encoder) => (str) =>
|
|
3134
|
+
encoder.encode(str)
|
|
3135
|
+
)(new TextEncoder())
|
|
3136
|
+
: async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
2916
3137
|
|
|
2917
|
-
const supportsRequestStream =
|
|
2918
|
-
|
|
3138
|
+
const supportsRequestStream =
|
|
3139
|
+
isRequestSupported &&
|
|
3140
|
+
isReadableStreamSupported &&
|
|
3141
|
+
test(() => {
|
|
3142
|
+
let duplexAccessed = false;
|
|
2919
3143
|
|
|
2920
|
-
|
|
2921
|
-
body: new ReadableStream$1(),
|
|
2922
|
-
method: 'POST',
|
|
2923
|
-
get duplex() {
|
|
2924
|
-
duplexAccessed = true;
|
|
2925
|
-
return 'half';
|
|
2926
|
-
},
|
|
2927
|
-
}).headers.has('Content-Type');
|
|
3144
|
+
const body = new ReadableStream$1();
|
|
2928
3145
|
|
|
2929
|
-
|
|
2930
|
-
|
|
3146
|
+
const hasContentType = new Request(platform.origin, {
|
|
3147
|
+
body,
|
|
3148
|
+
method: 'POST',
|
|
3149
|
+
get duplex() {
|
|
3150
|
+
duplexAccessed = true;
|
|
3151
|
+
return 'half';
|
|
3152
|
+
},
|
|
3153
|
+
}).headers.has('Content-Type');
|
|
3154
|
+
|
|
3155
|
+
body.cancel();
|
|
3156
|
+
|
|
3157
|
+
return duplexAccessed && !hasContentType;
|
|
3158
|
+
});
|
|
2931
3159
|
|
|
2932
|
-
const supportsResponseStream =
|
|
3160
|
+
const supportsResponseStream =
|
|
3161
|
+
isResponseSupported &&
|
|
3162
|
+
isReadableStreamSupported &&
|
|
2933
3163
|
test(() => utils$1.isReadableStream(new Response('').body));
|
|
2934
3164
|
|
|
2935
3165
|
const resolvers = {
|
|
2936
|
-
stream: supportsResponseStream && ((res) => res.body)
|
|
3166
|
+
stream: supportsResponseStream && ((res) => res.body),
|
|
2937
3167
|
};
|
|
2938
3168
|
|
|
2939
|
-
isFetchSupported &&
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
3169
|
+
isFetchSupported &&
|
|
3170
|
+
(() => {
|
|
3171
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {
|
|
3172
|
+
!resolvers[type] &&
|
|
3173
|
+
(resolvers[type] = (res, config) => {
|
|
3174
|
+
let method = res && res[type];
|
|
2943
3175
|
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
3176
|
+
if (method) {
|
|
3177
|
+
return method.call(res);
|
|
3178
|
+
}
|
|
2947
3179
|
|
|
2948
|
-
|
|
3180
|
+
throw new AxiosError(
|
|
3181
|
+
`Response type '${type}' is not supported`,
|
|
3182
|
+
AxiosError.ERR_NOT_SUPPORT,
|
|
3183
|
+
config
|
|
3184
|
+
);
|
|
3185
|
+
});
|
|
2949
3186
|
});
|
|
2950
|
-
});
|
|
2951
|
-
})());
|
|
3187
|
+
})();
|
|
2952
3188
|
|
|
2953
3189
|
const getBodyLength = async (body) => {
|
|
2954
3190
|
if (body == null) {
|
|
@@ -2999,32 +3235,41 @@ function requireAxios () {
|
|
|
2999
3235
|
responseType,
|
|
3000
3236
|
headers,
|
|
3001
3237
|
withCredentials = 'same-origin',
|
|
3002
|
-
fetchOptions
|
|
3238
|
+
fetchOptions,
|
|
3003
3239
|
} = resolveConfig(config);
|
|
3004
3240
|
|
|
3005
3241
|
let _fetch = envFetch || fetch;
|
|
3006
3242
|
|
|
3007
3243
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
3008
3244
|
|
|
3009
|
-
let composedSignal = composeSignals
|
|
3245
|
+
let composedSignal = composeSignals(
|
|
3246
|
+
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
3247
|
+
timeout
|
|
3248
|
+
);
|
|
3010
3249
|
|
|
3011
3250
|
let request = null;
|
|
3012
3251
|
|
|
3013
|
-
const unsubscribe =
|
|
3014
|
-
composedSignal
|
|
3015
|
-
|
|
3252
|
+
const unsubscribe =
|
|
3253
|
+
composedSignal &&
|
|
3254
|
+
composedSignal.unsubscribe &&
|
|
3255
|
+
(() => {
|
|
3256
|
+
composedSignal.unsubscribe();
|
|
3257
|
+
});
|
|
3016
3258
|
|
|
3017
3259
|
let requestContentLength;
|
|
3018
3260
|
|
|
3019
3261
|
try {
|
|
3020
3262
|
if (
|
|
3021
|
-
onUploadProgress &&
|
|
3263
|
+
onUploadProgress &&
|
|
3264
|
+
supportsRequestStream &&
|
|
3265
|
+
method !== 'get' &&
|
|
3266
|
+
method !== 'head' &&
|
|
3022
3267
|
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
3023
3268
|
) {
|
|
3024
3269
|
let _request = new Request(url, {
|
|
3025
3270
|
method: 'POST',
|
|
3026
3271
|
body: data,
|
|
3027
|
-
duplex:
|
|
3272
|
+
duplex: 'half',
|
|
3028
3273
|
});
|
|
3029
3274
|
|
|
3030
3275
|
let contentTypeHeader;
|
|
@@ -3049,7 +3294,7 @@ function requireAxios () {
|
|
|
3049
3294
|
|
|
3050
3295
|
// Cloudflare Workers throws when credentials are defined
|
|
3051
3296
|
// see https://github.com/cloudflare/workerd/issues/902
|
|
3052
|
-
const isCredentialsSupported = isRequestSupported &&
|
|
3297
|
+
const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
3053
3298
|
|
|
3054
3299
|
const resolvedOptions = {
|
|
3055
3300
|
...fetchOptions,
|
|
@@ -3057,29 +3302,35 @@ function requireAxios () {
|
|
|
3057
3302
|
method: method.toUpperCase(),
|
|
3058
3303
|
headers: headers.normalize().toJSON(),
|
|
3059
3304
|
body: data,
|
|
3060
|
-
duplex:
|
|
3061
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
3305
|
+
duplex: 'half',
|
|
3306
|
+
credentials: isCredentialsSupported ? withCredentials : undefined,
|
|
3062
3307
|
};
|
|
3063
3308
|
|
|
3064
3309
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
3065
3310
|
|
|
3066
|
-
let response = await (isRequestSupported
|
|
3311
|
+
let response = await (isRequestSupported
|
|
3312
|
+
? _fetch(request, fetchOptions)
|
|
3313
|
+
: _fetch(url, resolvedOptions));
|
|
3067
3314
|
|
|
3068
|
-
const isStreamResponse =
|
|
3315
|
+
const isStreamResponse =
|
|
3316
|
+
supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
3069
3317
|
|
|
3070
3318
|
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
3071
3319
|
const options = {};
|
|
3072
3320
|
|
|
3073
|
-
['status', 'statusText', 'headers'].forEach(prop => {
|
|
3321
|
+
['status', 'statusText', 'headers'].forEach((prop) => {
|
|
3074
3322
|
options[prop] = response[prop];
|
|
3075
3323
|
});
|
|
3076
3324
|
|
|
3077
3325
|
const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
|
|
3078
3326
|
|
|
3079
|
-
const [onProgress, flush] =
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3327
|
+
const [onProgress, flush] =
|
|
3328
|
+
(onDownloadProgress &&
|
|
3329
|
+
progressEventDecorator(
|
|
3330
|
+
responseContentLength,
|
|
3331
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
3332
|
+
)) ||
|
|
3333
|
+
[];
|
|
3083
3334
|
|
|
3084
3335
|
response = new Response(
|
|
3085
3336
|
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
@@ -3092,54 +3343,64 @@ function requireAxios () {
|
|
|
3092
3343
|
|
|
3093
3344
|
responseType = responseType || 'text';
|
|
3094
3345
|
|
|
3095
|
-
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](
|
|
3346
|
+
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](
|
|
3347
|
+
response,
|
|
3348
|
+
config
|
|
3349
|
+
);
|
|
3096
3350
|
|
|
3097
3351
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
3098
3352
|
|
|
3099
3353
|
return await new Promise((resolve, reject) => {
|
|
3100
3354
|
settle(resolve, reject, {
|
|
3101
3355
|
data: responseData,
|
|
3102
|
-
headers: AxiosHeaders
|
|
3356
|
+
headers: AxiosHeaders.from(response.headers),
|
|
3103
3357
|
status: response.status,
|
|
3104
3358
|
statusText: response.statusText,
|
|
3105
3359
|
config,
|
|
3106
|
-
request
|
|
3360
|
+
request,
|
|
3107
3361
|
});
|
|
3108
|
-
})
|
|
3362
|
+
});
|
|
3109
3363
|
} catch (err) {
|
|
3110
3364
|
unsubscribe && unsubscribe();
|
|
3111
3365
|
|
|
3112
3366
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
3113
3367
|
throw Object.assign(
|
|
3114
|
-
new AxiosError
|
|
3368
|
+
new AxiosError(
|
|
3369
|
+
'Network Error',
|
|
3370
|
+
AxiosError.ERR_NETWORK,
|
|
3371
|
+
config,
|
|
3372
|
+
request,
|
|
3373
|
+
err && err.response
|
|
3374
|
+
),
|
|
3115
3375
|
{
|
|
3116
|
-
cause: err.cause || err
|
|
3376
|
+
cause: err.cause || err,
|
|
3117
3377
|
}
|
|
3118
|
-
)
|
|
3378
|
+
);
|
|
3119
3379
|
}
|
|
3120
3380
|
|
|
3121
|
-
throw AxiosError
|
|
3381
|
+
throw AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
3122
3382
|
}
|
|
3123
|
-
}
|
|
3383
|
+
};
|
|
3124
3384
|
};
|
|
3125
3385
|
|
|
3126
3386
|
const seedCache = new Map();
|
|
3127
3387
|
|
|
3128
3388
|
const getFetch = (config) => {
|
|
3129
3389
|
let env = (config && config.env) || {};
|
|
3130
|
-
const {fetch, Request, Response} = env;
|
|
3131
|
-
const seeds = [
|
|
3132
|
-
Request, Response, fetch
|
|
3133
|
-
];
|
|
3390
|
+
const { fetch, Request, Response } = env;
|
|
3391
|
+
const seeds = [Request, Response, fetch];
|
|
3134
3392
|
|
|
3135
|
-
let len = seeds.length,
|
|
3136
|
-
|
|
3393
|
+
let len = seeds.length,
|
|
3394
|
+
i = len,
|
|
3395
|
+
seed,
|
|
3396
|
+
target,
|
|
3397
|
+
map = seedCache;
|
|
3137
3398
|
|
|
3138
3399
|
while (i--) {
|
|
3139
3400
|
seed = seeds[i];
|
|
3140
3401
|
target = map.get(seed);
|
|
3141
3402
|
|
|
3142
|
-
target === undefined && map.set(seed, target =
|
|
3403
|
+
target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));
|
|
3143
3404
|
|
|
3144
3405
|
map = target;
|
|
3145
3406
|
}
|
|
@@ -3155,7 +3416,7 @@ function requireAxios () {
|
|
|
3155
3416
|
* - `http` for Node.js
|
|
3156
3417
|
* - `xhr` for browsers
|
|
3157
3418
|
* - `fetch` for fetch API-based requests
|
|
3158
|
-
*
|
|
3419
|
+
*
|
|
3159
3420
|
* @type {Object<string, Function|Object>}
|
|
3160
3421
|
*/
|
|
3161
3422
|
const knownAdapters = {
|
|
@@ -3163,7 +3424,7 @@ function requireAxios () {
|
|
|
3163
3424
|
xhr: xhrAdapter,
|
|
3164
3425
|
fetch: {
|
|
3165
3426
|
get: getFetch,
|
|
3166
|
-
}
|
|
3427
|
+
},
|
|
3167
3428
|
};
|
|
3168
3429
|
|
|
3169
3430
|
// Assign adapter names for easier debugging and identification
|
|
@@ -3180,7 +3441,7 @@ function requireAxios () {
|
|
|
3180
3441
|
|
|
3181
3442
|
/**
|
|
3182
3443
|
* Render a rejection reason string for unknown or unsupported adapters
|
|
3183
|
-
*
|
|
3444
|
+
*
|
|
3184
3445
|
* @param {string} reason
|
|
3185
3446
|
* @returns {string}
|
|
3186
3447
|
*/
|
|
@@ -3188,17 +3449,18 @@ function requireAxios () {
|
|
|
3188
3449
|
|
|
3189
3450
|
/**
|
|
3190
3451
|
* Check if the adapter is resolved (function, null, or false)
|
|
3191
|
-
*
|
|
3452
|
+
*
|
|
3192
3453
|
* @param {Function|null|false} adapter
|
|
3193
3454
|
* @returns {boolean}
|
|
3194
3455
|
*/
|
|
3195
|
-
const isResolvedHandle = (adapter) =>
|
|
3456
|
+
const isResolvedHandle = (adapter) =>
|
|
3457
|
+
utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
3196
3458
|
|
|
3197
3459
|
/**
|
|
3198
3460
|
* Get the first suitable adapter from the provided list.
|
|
3199
3461
|
* Tries each adapter in order until a supported one is found.
|
|
3200
3462
|
* Throws an AxiosError if no adapter is suitable.
|
|
3201
|
-
*
|
|
3463
|
+
*
|
|
3202
3464
|
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
3203
3465
|
* @param {Object} config - Axios request configuration
|
|
3204
3466
|
* @throws {AxiosError} If no suitable adapter is available
|
|
@@ -3223,7 +3485,7 @@ function requireAxios () {
|
|
|
3223
3485
|
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
3224
3486
|
|
|
3225
3487
|
if (adapter === undefined) {
|
|
3226
|
-
throw new AxiosError
|
|
3488
|
+
throw new AxiosError(`Unknown adapter '${id}'`);
|
|
3227
3489
|
}
|
|
3228
3490
|
}
|
|
3229
3491
|
|
|
@@ -3235,16 +3497,19 @@ function requireAxios () {
|
|
|
3235
3497
|
}
|
|
3236
3498
|
|
|
3237
3499
|
if (!adapter) {
|
|
3238
|
-
const reasons = Object.entries(rejectedReasons)
|
|
3239
|
-
|
|
3500
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
3501
|
+
([id, state]) =>
|
|
3502
|
+
`adapter ${id} ` +
|
|
3240
3503
|
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
3241
|
-
|
|
3504
|
+
);
|
|
3242
3505
|
|
|
3243
|
-
let s = length
|
|
3244
|
-
|
|
3245
|
-
|
|
3506
|
+
let s = length
|
|
3507
|
+
? reasons.length > 1
|
|
3508
|
+
? 'since :\n' + reasons.map(renderReason).join('\n')
|
|
3509
|
+
: ' ' + renderReason(reasons[0])
|
|
3510
|
+
: 'as no adapter specified';
|
|
3246
3511
|
|
|
3247
|
-
throw new AxiosError
|
|
3512
|
+
throw new AxiosError(
|
|
3248
3513
|
`There is no suitable adapter to dispatch the request ` + s,
|
|
3249
3514
|
'ERR_NOT_SUPPORT'
|
|
3250
3515
|
);
|
|
@@ -3267,7 +3532,7 @@ function requireAxios () {
|
|
|
3267
3532
|
* Exposes all known adapters
|
|
3268
3533
|
* @type {Object<string, Function|Object>}
|
|
3269
3534
|
*/
|
|
3270
|
-
adapters: knownAdapters
|
|
3535
|
+
adapters: knownAdapters,
|
|
3271
3536
|
};
|
|
3272
3537
|
|
|
3273
3538
|
/**
|
|
@@ -3283,7 +3548,7 @@ function requireAxios () {
|
|
|
3283
3548
|
}
|
|
3284
3549
|
|
|
3285
3550
|
if (config.signal && config.signal.aborted) {
|
|
3286
|
-
throw new CanceledError
|
|
3551
|
+
throw new CanceledError(null, config);
|
|
3287
3552
|
}
|
|
3288
3553
|
}
|
|
3289
3554
|
|
|
@@ -3297,53 +3562,49 @@ function requireAxios () {
|
|
|
3297
3562
|
function dispatchRequest(config) {
|
|
3298
3563
|
throwIfCancellationRequested(config);
|
|
3299
3564
|
|
|
3300
|
-
config.headers = AxiosHeaders
|
|
3565
|
+
config.headers = AxiosHeaders.from(config.headers);
|
|
3301
3566
|
|
|
3302
3567
|
// Transform request data
|
|
3303
|
-
config.data = transformData.call(
|
|
3304
|
-
config,
|
|
3305
|
-
config.transformRequest
|
|
3306
|
-
);
|
|
3568
|
+
config.data = transformData.call(config, config.transformRequest);
|
|
3307
3569
|
|
|
3308
3570
|
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
|
|
3309
3571
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
3310
3572
|
}
|
|
3311
3573
|
|
|
3312
|
-
const adapter = adapters.getAdapter(config.adapter || defaults
|
|
3574
|
+
const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
|
|
3313
3575
|
|
|
3314
|
-
return adapter(config).then(
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
// Transform response data
|
|
3318
|
-
response.data = transformData.call(
|
|
3319
|
-
config,
|
|
3320
|
-
config.transformResponse,
|
|
3321
|
-
response
|
|
3322
|
-
);
|
|
3323
|
-
|
|
3324
|
-
response.headers = AxiosHeaders$1.from(response.headers);
|
|
3325
|
-
|
|
3326
|
-
return response;
|
|
3327
|
-
}, function onAdapterRejection(reason) {
|
|
3328
|
-
if (!isCancel(reason)) {
|
|
3576
|
+
return adapter(config).then(
|
|
3577
|
+
function onAdapterResolution(response) {
|
|
3329
3578
|
throwIfCancellationRequested(config);
|
|
3330
3579
|
|
|
3331
3580
|
// Transform response data
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3581
|
+
response.data = transformData.call(config, config.transformResponse, response);
|
|
3582
|
+
|
|
3583
|
+
response.headers = AxiosHeaders.from(response.headers);
|
|
3584
|
+
|
|
3585
|
+
return response;
|
|
3586
|
+
},
|
|
3587
|
+
function onAdapterRejection(reason) {
|
|
3588
|
+
if (!isCancel(reason)) {
|
|
3589
|
+
throwIfCancellationRequested(config);
|
|
3590
|
+
|
|
3591
|
+
// Transform response data
|
|
3592
|
+
if (reason && reason.response) {
|
|
3593
|
+
reason.response.data = transformData.call(
|
|
3594
|
+
config,
|
|
3595
|
+
config.transformResponse,
|
|
3596
|
+
reason.response
|
|
3597
|
+
);
|
|
3598
|
+
reason.response.headers = AxiosHeaders.from(reason.response.headers);
|
|
3599
|
+
}
|
|
3339
3600
|
}
|
|
3340
|
-
}
|
|
3341
3601
|
|
|
3342
|
-
|
|
3343
|
-
|
|
3602
|
+
return Promise.reject(reason);
|
|
3603
|
+
}
|
|
3604
|
+
);
|
|
3344
3605
|
}
|
|
3345
3606
|
|
|
3346
|
-
const VERSION = "1.
|
|
3607
|
+
const VERSION = "1.15.0";
|
|
3347
3608
|
|
|
3348
3609
|
const validators$1 = {};
|
|
3349
3610
|
|
|
@@ -3367,15 +3628,23 @@ function requireAxios () {
|
|
|
3367
3628
|
*/
|
|
3368
3629
|
validators$1.transitional = function transitional(validator, version, message) {
|
|
3369
3630
|
function formatMessage(opt, desc) {
|
|
3370
|
-
return
|
|
3631
|
+
return (
|
|
3632
|
+
'[Axios v' +
|
|
3633
|
+
VERSION +
|
|
3634
|
+
"] Transitional option '" +
|
|
3635
|
+
opt +
|
|
3636
|
+
"'" +
|
|
3637
|
+
desc +
|
|
3638
|
+
(message ? '. ' + message : '')
|
|
3639
|
+
);
|
|
3371
3640
|
}
|
|
3372
3641
|
|
|
3373
3642
|
// eslint-disable-next-line func-names
|
|
3374
3643
|
return (value, opt, opts) => {
|
|
3375
3644
|
if (validator === false) {
|
|
3376
|
-
throw new AxiosError
|
|
3645
|
+
throw new AxiosError(
|
|
3377
3646
|
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
|
3378
|
-
AxiosError
|
|
3647
|
+
AxiosError.ERR_DEPRECATED
|
|
3379
3648
|
);
|
|
3380
3649
|
}
|
|
3381
3650
|
|
|
@@ -3399,7 +3668,7 @@ function requireAxios () {
|
|
|
3399
3668
|
// eslint-disable-next-line no-console
|
|
3400
3669
|
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
3401
3670
|
return true;
|
|
3402
|
-
}
|
|
3671
|
+
};
|
|
3403
3672
|
};
|
|
3404
3673
|
|
|
3405
3674
|
/**
|
|
@@ -3414,7 +3683,7 @@ function requireAxios () {
|
|
|
3414
3683
|
|
|
3415
3684
|
function assertOptions(options, schema, allowUnknown) {
|
|
3416
3685
|
if (typeof options !== 'object') {
|
|
3417
|
-
throw new AxiosError
|
|
3686
|
+
throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
|
|
3418
3687
|
}
|
|
3419
3688
|
const keys = Object.keys(options);
|
|
3420
3689
|
let i = keys.length;
|
|
@@ -3425,19 +3694,22 @@ function requireAxios () {
|
|
|
3425
3694
|
const value = options[opt];
|
|
3426
3695
|
const result = value === undefined || validator(value, opt, options);
|
|
3427
3696
|
if (result !== true) {
|
|
3428
|
-
throw new AxiosError
|
|
3697
|
+
throw new AxiosError(
|
|
3698
|
+
'option ' + opt + ' must be ' + result,
|
|
3699
|
+
AxiosError.ERR_BAD_OPTION_VALUE
|
|
3700
|
+
);
|
|
3429
3701
|
}
|
|
3430
3702
|
continue;
|
|
3431
3703
|
}
|
|
3432
3704
|
if (allowUnknown !== true) {
|
|
3433
|
-
throw new AxiosError
|
|
3705
|
+
throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
|
|
3434
3706
|
}
|
|
3435
3707
|
}
|
|
3436
3708
|
}
|
|
3437
3709
|
|
|
3438
3710
|
var validator = {
|
|
3439
3711
|
assertOptions,
|
|
3440
|
-
validators: validators$1
|
|
3712
|
+
validators: validators$1,
|
|
3441
3713
|
};
|
|
3442
3714
|
|
|
3443
3715
|
const validators = validator.validators;
|
|
@@ -3453,8 +3725,8 @@ function requireAxios () {
|
|
|
3453
3725
|
constructor(instanceConfig) {
|
|
3454
3726
|
this.defaults = instanceConfig || {};
|
|
3455
3727
|
this.interceptors = {
|
|
3456
|
-
request: new InterceptorManager
|
|
3457
|
-
response: new InterceptorManager
|
|
3728
|
+
request: new InterceptorManager(),
|
|
3729
|
+
response: new InterceptorManager(),
|
|
3458
3730
|
};
|
|
3459
3731
|
}
|
|
3460
3732
|
|
|
@@ -3476,13 +3748,29 @@ function requireAxios () {
|
|
|
3476
3748
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
3477
3749
|
|
|
3478
3750
|
// slice off the Error: ... line
|
|
3479
|
-
const stack =
|
|
3751
|
+
const stack = (() => {
|
|
3752
|
+
if (!dummy.stack) {
|
|
3753
|
+
return '';
|
|
3754
|
+
}
|
|
3755
|
+
|
|
3756
|
+
const firstNewlineIndex = dummy.stack.indexOf('\n');
|
|
3757
|
+
|
|
3758
|
+
return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
|
|
3759
|
+
})();
|
|
3480
3760
|
try {
|
|
3481
3761
|
if (!err.stack) {
|
|
3482
3762
|
err.stack = stack;
|
|
3483
3763
|
// match without the 2 top stack lines
|
|
3484
|
-
} else if (stack
|
|
3485
|
-
|
|
3764
|
+
} else if (stack) {
|
|
3765
|
+
const firstNewlineIndex = stack.indexOf('\n');
|
|
3766
|
+
const secondNewlineIndex =
|
|
3767
|
+
firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
|
|
3768
|
+
const stackWithoutTwoTopLines =
|
|
3769
|
+
secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
|
|
3770
|
+
|
|
3771
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
3772
|
+
err.stack += '\n' + stack;
|
|
3773
|
+
}
|
|
3486
3774
|
}
|
|
3487
3775
|
} catch (e) {
|
|
3488
3776
|
// ignore the case where "stack" is an un-writable property
|
|
@@ -3505,27 +3793,35 @@ function requireAxios () {
|
|
|
3505
3793
|
|
|
3506
3794
|
config = mergeConfig(this.defaults, config);
|
|
3507
3795
|
|
|
3508
|
-
const {transitional, paramsSerializer, headers} = config;
|
|
3796
|
+
const { transitional, paramsSerializer, headers } = config;
|
|
3509
3797
|
|
|
3510
3798
|
if (transitional !== undefined) {
|
|
3511
|
-
validator.assertOptions(
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3799
|
+
validator.assertOptions(
|
|
3800
|
+
transitional,
|
|
3801
|
+
{
|
|
3802
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
3803
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
3804
|
+
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
3805
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
3806
|
+
},
|
|
3807
|
+
false
|
|
3808
|
+
);
|
|
3517
3809
|
}
|
|
3518
3810
|
|
|
3519
3811
|
if (paramsSerializer != null) {
|
|
3520
3812
|
if (utils$1.isFunction(paramsSerializer)) {
|
|
3521
3813
|
config.paramsSerializer = {
|
|
3522
|
-
serialize: paramsSerializer
|
|
3814
|
+
serialize: paramsSerializer,
|
|
3523
3815
|
};
|
|
3524
3816
|
} else {
|
|
3525
|
-
validator.assertOptions(
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3817
|
+
validator.assertOptions(
|
|
3818
|
+
paramsSerializer,
|
|
3819
|
+
{
|
|
3820
|
+
encode: validators.function,
|
|
3821
|
+
serialize: validators.function,
|
|
3822
|
+
},
|
|
3823
|
+
true
|
|
3824
|
+
);
|
|
3529
3825
|
}
|
|
3530
3826
|
}
|
|
3531
3827
|
|
|
@@ -3536,28 +3832,27 @@ function requireAxios () {
|
|
|
3536
3832
|
config.allowAbsoluteUrls = true;
|
|
3537
3833
|
}
|
|
3538
3834
|
|
|
3539
|
-
validator.assertOptions(
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3835
|
+
validator.assertOptions(
|
|
3836
|
+
config,
|
|
3837
|
+
{
|
|
3838
|
+
baseUrl: validators.spelling('baseURL'),
|
|
3839
|
+
withXsrfToken: validators.spelling('withXSRFToken'),
|
|
3840
|
+
},
|
|
3841
|
+
true
|
|
3842
|
+
);
|
|
3543
3843
|
|
|
3544
3844
|
// Set config.method
|
|
3545
3845
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
3546
3846
|
|
|
3547
3847
|
// Flatten headers
|
|
3548
|
-
let contextHeaders = headers && utils$1.merge(
|
|
3549
|
-
headers.common,
|
|
3550
|
-
headers[config.method]
|
|
3551
|
-
);
|
|
3848
|
+
let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
|
|
3552
3849
|
|
|
3553
|
-
headers &&
|
|
3554
|
-
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
3555
|
-
(method) => {
|
|
3850
|
+
headers &&
|
|
3851
|
+
utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
|
|
3556
3852
|
delete headers[method];
|
|
3557
|
-
}
|
|
3558
|
-
);
|
|
3853
|
+
});
|
|
3559
3854
|
|
|
3560
|
-
config.headers = AxiosHeaders
|
|
3855
|
+
config.headers = AxiosHeaders.concat(contextHeaders, headers);
|
|
3561
3856
|
|
|
3562
3857
|
// filter out skipped interceptors
|
|
3563
3858
|
const requestInterceptorChain = [];
|
|
@@ -3570,7 +3865,8 @@ function requireAxios () {
|
|
|
3570
3865
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
3571
3866
|
|
|
3572
3867
|
const transitional = config.transitional || transitionalDefaults;
|
|
3573
|
-
const legacyInterceptorReqResOrdering =
|
|
3868
|
+
const legacyInterceptorReqResOrdering =
|
|
3869
|
+
transitional && transitional.legacyInterceptorReqResOrdering;
|
|
3574
3870
|
|
|
3575
3871
|
if (legacyInterceptorReqResOrdering) {
|
|
3576
3872
|
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
@@ -3644,28 +3940,32 @@ function requireAxios () {
|
|
|
3644
3940
|
// Provide aliases for supported request methods
|
|
3645
3941
|
utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
3646
3942
|
/*eslint func-names:0*/
|
|
3647
|
-
Axios.prototype[method] = function(url, config) {
|
|
3648
|
-
return this.request(
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3943
|
+
Axios.prototype[method] = function (url, config) {
|
|
3944
|
+
return this.request(
|
|
3945
|
+
mergeConfig(config || {}, {
|
|
3946
|
+
method,
|
|
3947
|
+
url,
|
|
3948
|
+
data: (config || {}).data,
|
|
3949
|
+
})
|
|
3950
|
+
);
|
|
3653
3951
|
};
|
|
3654
3952
|
});
|
|
3655
3953
|
|
|
3656
3954
|
utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
3657
|
-
/*eslint func-names:0*/
|
|
3658
|
-
|
|
3659
3955
|
function generateHTTPMethod(isForm) {
|
|
3660
3956
|
return function httpMethod(url, data, config) {
|
|
3661
|
-
return this.request(
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3957
|
+
return this.request(
|
|
3958
|
+
mergeConfig(config || {}, {
|
|
3959
|
+
method,
|
|
3960
|
+
headers: isForm
|
|
3961
|
+
? {
|
|
3962
|
+
'Content-Type': 'multipart/form-data',
|
|
3963
|
+
}
|
|
3964
|
+
: {},
|
|
3965
|
+
url,
|
|
3966
|
+
data,
|
|
3967
|
+
})
|
|
3968
|
+
);
|
|
3669
3969
|
};
|
|
3670
3970
|
}
|
|
3671
3971
|
|
|
@@ -3674,8 +3974,6 @@ function requireAxios () {
|
|
|
3674
3974
|
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
|
3675
3975
|
});
|
|
3676
3976
|
|
|
3677
|
-
var Axios$1 = Axios;
|
|
3678
|
-
|
|
3679
3977
|
/**
|
|
3680
3978
|
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
|
3681
3979
|
*
|
|
@@ -3698,7 +3996,7 @@ function requireAxios () {
|
|
|
3698
3996
|
const token = this;
|
|
3699
3997
|
|
|
3700
3998
|
// eslint-disable-next-line func-names
|
|
3701
|
-
this.promise.then(cancel => {
|
|
3999
|
+
this.promise.then((cancel) => {
|
|
3702
4000
|
if (!token._listeners) return;
|
|
3703
4001
|
|
|
3704
4002
|
let i = token._listeners.length;
|
|
@@ -3710,10 +4008,10 @@ function requireAxios () {
|
|
|
3710
4008
|
});
|
|
3711
4009
|
|
|
3712
4010
|
// eslint-disable-next-line func-names
|
|
3713
|
-
this.promise.then = onfulfilled => {
|
|
4011
|
+
this.promise.then = (onfulfilled) => {
|
|
3714
4012
|
let _resolve;
|
|
3715
4013
|
// eslint-disable-next-line func-names
|
|
3716
|
-
const promise = new Promise(resolve => {
|
|
4014
|
+
const promise = new Promise((resolve) => {
|
|
3717
4015
|
token.subscribe(resolve);
|
|
3718
4016
|
_resolve = resolve;
|
|
3719
4017
|
}).then(onfulfilled);
|
|
@@ -3731,7 +4029,7 @@ function requireAxios () {
|
|
|
3731
4029
|
return;
|
|
3732
4030
|
}
|
|
3733
4031
|
|
|
3734
|
-
token.reason = new CanceledError
|
|
4032
|
+
token.reason = new CanceledError(message, config, request);
|
|
3735
4033
|
resolvePromise(token.reason);
|
|
3736
4034
|
});
|
|
3737
4035
|
}
|
|
@@ -3801,13 +4099,11 @@ function requireAxios () {
|
|
|
3801
4099
|
});
|
|
3802
4100
|
return {
|
|
3803
4101
|
token,
|
|
3804
|
-
cancel
|
|
4102
|
+
cancel,
|
|
3805
4103
|
};
|
|
3806
4104
|
}
|
|
3807
4105
|
}
|
|
3808
4106
|
|
|
3809
|
-
var CancelToken$1 = CancelToken;
|
|
3810
|
-
|
|
3811
4107
|
/**
|
|
3812
4108
|
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
|
3813
4109
|
*
|
|
@@ -3843,7 +4139,7 @@ function requireAxios () {
|
|
|
3843
4139
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
3844
4140
|
*/
|
|
3845
4141
|
function isAxiosError(payload) {
|
|
3846
|
-
return utils$1.isObject(payload) &&
|
|
4142
|
+
return utils$1.isObject(payload) && payload.isAxiosError === true;
|
|
3847
4143
|
}
|
|
3848
4144
|
|
|
3849
4145
|
const HttpStatusCode = {
|
|
@@ -3922,8 +4218,6 @@ function requireAxios () {
|
|
|
3922
4218
|
HttpStatusCode[value] = key;
|
|
3923
4219
|
});
|
|
3924
4220
|
|
|
3925
|
-
var HttpStatusCode$1 = HttpStatusCode;
|
|
3926
|
-
|
|
3927
4221
|
/**
|
|
3928
4222
|
* Create an instance of Axios
|
|
3929
4223
|
*
|
|
@@ -3932,14 +4226,14 @@ function requireAxios () {
|
|
|
3932
4226
|
* @returns {Axios} A new instance of Axios
|
|
3933
4227
|
*/
|
|
3934
4228
|
function createInstance(defaultConfig) {
|
|
3935
|
-
const context = new Axios
|
|
3936
|
-
const instance = bind(Axios
|
|
4229
|
+
const context = new Axios(defaultConfig);
|
|
4230
|
+
const instance = bind(Axios.prototype.request, context);
|
|
3937
4231
|
|
|
3938
4232
|
// Copy axios.prototype to instance
|
|
3939
|
-
utils$1.extend(instance, Axios
|
|
4233
|
+
utils$1.extend(instance, Axios.prototype, context, { allOwnKeys: true });
|
|
3940
4234
|
|
|
3941
4235
|
// Copy context to instance
|
|
3942
|
-
utils$1.extend(instance, context, null, {allOwnKeys: true});
|
|
4236
|
+
utils$1.extend(instance, context, null, { allOwnKeys: true });
|
|
3943
4237
|
|
|
3944
4238
|
// Factory for creating new instances
|
|
3945
4239
|
instance.create = function create(instanceConfig) {
|
|
@@ -3950,20 +4244,20 @@ function requireAxios () {
|
|
|
3950
4244
|
}
|
|
3951
4245
|
|
|
3952
4246
|
// Create the default instance to be exported
|
|
3953
|
-
const axios = createInstance(defaults
|
|
4247
|
+
const axios = createInstance(defaults);
|
|
3954
4248
|
|
|
3955
4249
|
// Expose Axios class to allow class inheritance
|
|
3956
|
-
axios.Axios = Axios
|
|
4250
|
+
axios.Axios = Axios;
|
|
3957
4251
|
|
|
3958
4252
|
// Expose Cancel & CancelToken
|
|
3959
|
-
axios.CanceledError = CanceledError
|
|
3960
|
-
axios.CancelToken = CancelToken
|
|
4253
|
+
axios.CanceledError = CanceledError;
|
|
4254
|
+
axios.CancelToken = CancelToken;
|
|
3961
4255
|
axios.isCancel = isCancel;
|
|
3962
4256
|
axios.VERSION = VERSION;
|
|
3963
4257
|
axios.toFormData = toFormData;
|
|
3964
4258
|
|
|
3965
4259
|
// Expose AxiosError class
|
|
3966
|
-
axios.AxiosError = AxiosError
|
|
4260
|
+
axios.AxiosError = AxiosError;
|
|
3967
4261
|
|
|
3968
4262
|
// alias for CanceledError for backward compatibility
|
|
3969
4263
|
axios.Cancel = axios.CanceledError;
|
|
@@ -3981,13 +4275,13 @@ function requireAxios () {
|
|
|
3981
4275
|
// Expose mergeConfig
|
|
3982
4276
|
axios.mergeConfig = mergeConfig;
|
|
3983
4277
|
|
|
3984
|
-
axios.AxiosHeaders = AxiosHeaders
|
|
4278
|
+
axios.AxiosHeaders = AxiosHeaders;
|
|
3985
4279
|
|
|
3986
|
-
axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
4280
|
+
axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
3987
4281
|
|
|
3988
4282
|
axios.getAdapter = adapters.getAdapter;
|
|
3989
4283
|
|
|
3990
|
-
axios.HttpStatusCode = HttpStatusCode
|
|
4284
|
+
axios.HttpStatusCode = HttpStatusCode;
|
|
3991
4285
|
|
|
3992
4286
|
axios.default = axios;
|
|
3993
4287
|
|
|
@@ -4259,6 +4553,6 @@ function defineCustomElement() {
|
|
|
4259
4553
|
}
|
|
4260
4554
|
|
|
4261
4555
|
export { VerdocsContactPicker as V, defineCustomElement as d };
|
|
4262
|
-
//# sourceMappingURL=p-
|
|
4556
|
+
//# sourceMappingURL=p-EQhWyfg9.js.map
|
|
4263
4557
|
|
|
4264
|
-
//# sourceMappingURL=p-
|
|
4558
|
+
//# sourceMappingURL=p-EQhWyfg9.js.map
|