node-red-contrib-tak-registration 0.11.0 → 0.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@types/node/LICENSE +0 -0
- package/node_modules/@types/node/README.md +4 -5
- package/node_modules/@types/node/assert/strict.d.ts +4 -4
- package/node_modules/@types/node/assert.d.ts +50 -26
- package/node_modules/@types/node/async_hooks.d.ts +13 -6
- package/node_modules/@types/node/buffer.d.ts +46 -38
- package/node_modules/@types/node/child_process.d.ts +278 -138
- package/node_modules/@types/node/cluster.d.ts +107 -89
- package/node_modules/@types/node/console.d.ts +18 -15
- package/node_modules/@types/node/constants.d.ts +12 -11
- package/node_modules/@types/node/crypto.d.ts +746 -268
- package/node_modules/@types/node/dgram.d.ts +82 -46
- package/node_modules/@types/node/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/node/dns/promises.d.ts +37 -26
- package/node_modules/@types/node/dns.d.ts +204 -63
- package/node_modules/@types/node/dom-events.d.ts +67 -71
- package/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@types/node/events.d.ts +99 -8
- package/node_modules/@types/node/fs/promises.d.ts +122 -85
- package/node_modules/@types/node/fs.d.ts +520 -316
- package/node_modules/@types/node/globals.d.ts +346 -286
- package/node_modules/@types/node/globals.global.d.ts +0 -0
- package/node_modules/@types/node/http.d.ts +321 -189
- package/node_modules/@types/node/http2.d.ts +630 -377
- package/node_modules/@types/node/https.d.ts +221 -112
- package/node_modules/@types/node/index.d.ts +0 -45
- package/node_modules/@types/node/inspector.d.ts +0 -1
- package/node_modules/@types/node/module.d.ts +75 -31
- package/node_modules/@types/node/net.d.ts +149 -93
- package/node_modules/@types/node/os.d.ts +10 -9
- package/node_modules/@types/node/package.json +88 -90
- package/node_modules/@types/node/path.d.ts +13 -13
- package/node_modules/@types/node/perf_hooks.d.ts +19 -18
- package/node_modules/@types/node/process.d.ts +170 -126
- package/node_modules/@types/node/punycode.d.ts +4 -4
- package/node_modules/@types/node/querystring.d.ts +14 -4
- package/node_modules/@types/node/readline/promises.d.ts +12 -7
- package/node_modules/@types/node/readline.d.ts +69 -56
- package/node_modules/@types/node/repl.d.ts +67 -61
- package/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/node/stream/promises.d.ts +56 -15
- package/node_modules/@types/node/stream/web.d.ts +40 -20
- package/node_modules/@types/node/stream.d.ts +365 -232
- package/node_modules/@types/node/string_decoder.d.ts +8 -8
- package/node_modules/@types/node/test.d.ts +133 -212
- package/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/node/timers.d.ts +26 -11
- package/node_modules/@types/node/tls.d.ts +152 -72
- package/node_modules/@types/node/trace_events.d.ts +3 -3
- package/node_modules/@types/node/ts4.8/assert/strict.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/assert.d.ts +50 -26
- package/node_modules/@types/node/ts4.8/async_hooks.d.ts +13 -6
- package/node_modules/@types/node/ts4.8/buffer.d.ts +47 -39
- package/node_modules/@types/node/ts4.8/child_process.d.ts +278 -138
- package/node_modules/@types/node/ts4.8/cluster.d.ts +107 -89
- package/node_modules/@types/node/ts4.8/console.d.ts +18 -15
- package/node_modules/@types/node/ts4.8/constants.d.ts +12 -11
- package/node_modules/@types/node/ts4.8/crypto.d.ts +746 -268
- package/node_modules/@types/node/ts4.8/dgram.d.ts +82 -46
- package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/node/ts4.8/dns/promises.d.ts +37 -26
- package/node_modules/@types/node/ts4.8/dns.d.ts +204 -63
- package/node_modules/@types/node/ts4.8/dom-events.d.ts +67 -71
- package/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/events.d.ts +99 -8
- package/node_modules/@types/node/ts4.8/fs/promises.d.ts +122 -85
- package/node_modules/@types/node/ts4.8/fs.d.ts +520 -316
- package/node_modules/@types/node/ts4.8/globals.d.ts +346 -286
- package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -0
- package/node_modules/@types/node/ts4.8/http.d.ts +321 -189
- package/node_modules/@types/node/ts4.8/http2.d.ts +630 -377
- package/node_modules/@types/node/ts4.8/https.d.ts +221 -112
- package/node_modules/@types/node/ts4.8/index.d.ts +0 -0
- package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -1
- package/node_modules/@types/node/ts4.8/module.d.ts +75 -31
- package/node_modules/@types/node/ts4.8/net.d.ts +149 -93
- package/node_modules/@types/node/ts4.8/os.d.ts +10 -9
- package/node_modules/@types/node/ts4.8/path.d.ts +13 -13
- package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +19 -18
- package/node_modules/@types/node/ts4.8/process.d.ts +170 -126
- package/node_modules/@types/node/ts4.8/punycode.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/querystring.d.ts +14 -4
- package/node_modules/@types/node/ts4.8/readline/promises.d.ts +12 -7
- package/node_modules/@types/node/ts4.8/readline.d.ts +69 -56
- package/node_modules/@types/node/ts4.8/repl.d.ts +67 -61
- package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +10 -10
- package/node_modules/@types/node/ts4.8/stream/promises.d.ts +56 -15
- package/node_modules/@types/node/ts4.8/stream/web.d.ts +40 -20
- package/node_modules/@types/node/ts4.8/stream.d.ts +494 -223
- package/node_modules/@types/node/ts4.8/string_decoder.d.ts +8 -8
- package/node_modules/@types/node/ts4.8/test.d.ts +135 -214
- package/node_modules/@types/node/ts4.8/timers/promises.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/timers.d.ts +26 -11
- package/node_modules/@types/node/ts4.8/tls.d.ts +152 -72
- package/node_modules/@types/node/ts4.8/trace_events.d.ts +3 -3
- package/node_modules/@types/node/ts4.8/tty.d.ts +10 -10
- package/node_modules/@types/node/ts4.8/url.d.ts +26 -14
- package/node_modules/@types/node/ts4.8/util.d.ts +187 -120
- package/node_modules/@types/node/ts4.8/v8.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/vm.d.ts +58 -50
- package/node_modules/@types/node/ts4.8/wasi.d.ts +10 -4
- package/node_modules/@types/node/ts4.8/worker_threads.d.ts +83 -86
- package/node_modules/@types/node/ts4.8/zlib.d.ts +9 -9
- package/node_modules/@types/node/tty.d.ts +10 -10
- package/node_modules/@types/node/url.d.ts +26 -14
- package/node_modules/@types/node/util.d.ts +187 -120
- package/node_modules/@types/node/v8.d.ts +4 -4
- package/node_modules/@types/node/vm.d.ts +58 -50
- package/node_modules/@types/node/wasi.d.ts +10 -4
- package/node_modules/@types/node/worker_threads.d.ts +83 -86
- package/node_modules/@types/node/zlib.d.ts +9 -9
- package/node_modules/axios/CHANGELOG.md +225 -0
- package/node_modules/axios/README.md +273 -9
- package/node_modules/axios/dist/axios.js +249 -178
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +1 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +213 -193
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +213 -193
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +1 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +297 -213
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +20 -11
- package/node_modules/axios/index.d.ts +21 -12
- package/node_modules/axios/lib/adapters/adapters.js +33 -15
- package/node_modules/axios/lib/adapters/http.js +25 -12
- package/node_modules/axios/lib/adapters/xhr.js +17 -10
- package/node_modules/axios/lib/core/mergeConfig.js +1 -0
- package/node_modules/axios/lib/defaults/index.js +1 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/cookies.js +39 -49
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +2 -2
- package/node_modules/axios/lib/platform/browser/index.js +0 -51
- package/node_modules/axios/lib/platform/common/utils.js +47 -0
- package/node_modules/axios/lib/platform/index.js +5 -1
- package/node_modules/axios/package.json +2 -1
- package/node_modules/call-bind/.eslintrc +0 -1
- package/node_modules/call-bind/.nycrc +0 -4
- package/node_modules/call-bind/CHANGELOG.md +35 -0
- package/node_modules/call-bind/README.md +63 -1
- package/node_modules/call-bind/index.js +10 -13
- package/node_modules/call-bind/package.json +33 -23
- package/node_modules/call-bind/test/callBound.js +0 -1
- package/node_modules/call-bind/test/index.js +18 -4
- package/node_modules/{function-bind → deep-equal}/.editorconfig +1 -1
- package/node_modules/deep-equal/.eslintrc +6 -0
- package/node_modules/deep-equal/.nycrc +17 -0
- package/node_modules/deep-equal/CHANGELOG.md +204 -4
- package/node_modules/deep-equal/assert.js +3 -0
- package/node_modules/deep-equal/package.json +39 -17
- package/node_modules/deep-equal/readme.markdown +28 -12
- package/node_modules/deep-equal/test/_tape.js +24 -3
- package/node_modules/deep-equal/test/cmp.js +1047 -48
- package/node_modules/define-data-property/CHANGELOG.md +10 -0
- package/node_modules/define-data-property/index.d.ts.map +1 -1
- package/node_modules/define-data-property/index.js +8 -0
- package/node_modules/define-data-property/package.json +11 -9
- package/node_modules/define-data-property/test/index.js +6 -11
- package/node_modules/define-data-property/tsconfig.json +1 -0
- package/node_modules/fast-xml-parser/CHANGELOG.md +11 -0
- package/node_modules/fast-xml-parser/package.json +5 -5
- package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +1 -0
- package/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +4 -0
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +6 -3
- package/node_modules/follow-redirects/index.js +16 -4
- package/node_modules/follow-redirects/package.json +2 -3
- package/node_modules/function-bind/.eslintrc +11 -5
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/README.md +25 -27
- package/node_modules/function-bind/implementation.js +44 -12
- package/node_modules/function-bind/package.json +38 -14
- package/node_modules/get-intrinsic/CHANGELOG.md +8 -0
- package/node_modules/get-intrinsic/index.js +1 -1
- package/node_modules/get-intrinsic/package.json +11 -11
- package/node_modules/has-property-descriptors/CHANGELOG.md +11 -0
- package/node_modules/has-property-descriptors/package.json +13 -6
- package/node_modules/hasown/.eslintrc +5 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +20 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.d.ts.map +1 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +91 -0
- package/node_modules/hasown/tsconfig.json +49 -0
- package/node_modules/set-function-length/.eslintrc +27 -0
- package/node_modules/set-function-length/.github/FUNDING.yml +12 -0
- package/node_modules/set-function-length/.nycrc +13 -0
- package/node_modules/set-function-length/CHANGELOG.md +41 -0
- package/node_modules/set-function-length/LICENSE +21 -0
- package/node_modules/set-function-length/README.md +56 -0
- package/node_modules/set-function-length/env.js +19 -0
- package/node_modules/set-function-length/index.js +41 -0
- package/node_modules/set-function-length/package.json +84 -0
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +31 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client.d.ts +97 -0
- package/node_modules/undici-types/connector.d.ts +34 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +28 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/node_modules/undici-types/errors.d.ts +128 -0
- package/node_modules/undici-types/fetch.d.ts +209 -0
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/handlers.d.ts +9 -0
- package/node_modules/undici-types/header.d.ts +4 -0
- package/node_modules/undici-types/index.d.ts +63 -0
- package/node_modules/undici-types/interceptors.d.ts +5 -0
- package/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/node_modules/undici-types/mock-client.d.ts +25 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +71 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +28 -0
- package/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/node_modules/undici-types/readable.d.ts +61 -0
- package/node_modules/undici-types/webidl.d.ts +220 -0
- package/node_modules/undici-types/websocket.d.ts +131 -0
- package/package.json +3 -3
- package/tak-ingest.js +39 -24
- package/tak-registration.html +4 -4
- package/tak-registration.js +2 -3
- package/node_modules/define-data-property/tsinit +0 -109
- package/node_modules/function-bind/.jscs.json +0 -176
- package/node_modules/function-bind/.npmignore +0 -22
- package/node_modules/function-bind/.travis.yml +0 -168
- package/node_modules/has/LICENSE-MIT +0 -22
- package/node_modules/has/README.md +0 -18
- package/node_modules/has/package.json +0 -48
- package/node_modules/has/src/index.js +0 -5
- package/node_modules/has/test/index.js +0 -10
|
@@ -1,10 +1,31 @@
|
|
|
1
|
-
// Axios v1.
|
|
1
|
+
// Axios v1.6.2 Copyright (c) 2023 Matt Zabriskie and contributors
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
5
5
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory());
|
|
6
6
|
})(this, (function () { 'use strict';
|
|
7
7
|
|
|
8
|
+
function ownKeys(object, enumerableOnly) {
|
|
9
|
+
var keys = Object.keys(object);
|
|
10
|
+
if (Object.getOwnPropertySymbols) {
|
|
11
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
12
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
13
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
14
|
+
})), keys.push.apply(keys, symbols);
|
|
15
|
+
}
|
|
16
|
+
return keys;
|
|
17
|
+
}
|
|
18
|
+
function _objectSpread2(target) {
|
|
19
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
20
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
21
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
22
|
+
_defineProperty(target, key, source[key]);
|
|
23
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
24
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
}
|
|
8
29
|
function _typeof(obj) {
|
|
9
30
|
"@babel/helpers - typeof";
|
|
10
31
|
|
|
@@ -36,12 +57,37 @@
|
|
|
36
57
|
});
|
|
37
58
|
return Constructor;
|
|
38
59
|
}
|
|
60
|
+
function _defineProperty(obj, key, value) {
|
|
61
|
+
if (key in obj) {
|
|
62
|
+
Object.defineProperty(obj, key, {
|
|
63
|
+
value: value,
|
|
64
|
+
enumerable: true,
|
|
65
|
+
configurable: true,
|
|
66
|
+
writable: true
|
|
67
|
+
});
|
|
68
|
+
} else {
|
|
69
|
+
obj[key] = value;
|
|
70
|
+
}
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
39
73
|
function _slicedToArray(arr, i) {
|
|
40
74
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
41
75
|
}
|
|
76
|
+
function _toArray(arr) {
|
|
77
|
+
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
78
|
+
}
|
|
79
|
+
function _toConsumableArray(arr) {
|
|
80
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
81
|
+
}
|
|
82
|
+
function _arrayWithoutHoles(arr) {
|
|
83
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
84
|
+
}
|
|
42
85
|
function _arrayWithHoles(arr) {
|
|
43
86
|
if (Array.isArray(arr)) return arr;
|
|
44
87
|
}
|
|
88
|
+
function _iterableToArray(iter) {
|
|
89
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
90
|
+
}
|
|
45
91
|
function _iterableToArrayLimit(arr, i) {
|
|
46
92
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
47
93
|
if (_i == null) return;
|
|
@@ -79,6 +125,9 @@
|
|
|
79
125
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
80
126
|
return arr2;
|
|
81
127
|
}
|
|
128
|
+
function _nonIterableSpread() {
|
|
129
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
130
|
+
}
|
|
82
131
|
function _nonIterableRest() {
|
|
83
132
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
84
133
|
}
|
|
@@ -727,7 +776,7 @@
|
|
|
727
776
|
var isThenable = function isThenable(thing) {
|
|
728
777
|
return thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing["catch"]);
|
|
729
778
|
};
|
|
730
|
-
var utils = {
|
|
779
|
+
var utils$1 = {
|
|
731
780
|
isArray: isArray,
|
|
732
781
|
isArrayBuffer: isArrayBuffer,
|
|
733
782
|
isBuffer: isBuffer,
|
|
@@ -807,7 +856,7 @@
|
|
|
807
856
|
request && (this.request = request);
|
|
808
857
|
response && (this.response = response);
|
|
809
858
|
}
|
|
810
|
-
utils.inherits(AxiosError, Error, {
|
|
859
|
+
utils$1.inherits(AxiosError, Error, {
|
|
811
860
|
toJSON: function toJSON() {
|
|
812
861
|
return {
|
|
813
862
|
// Standard
|
|
@@ -822,7 +871,7 @@
|
|
|
822
871
|
columnNumber: this.columnNumber,
|
|
823
872
|
stack: this.stack,
|
|
824
873
|
// Axios
|
|
825
|
-
config: utils.toJSONObject(this.config),
|
|
874
|
+
config: utils$1.toJSONObject(this.config),
|
|
826
875
|
code: this.code,
|
|
827
876
|
status: this.response && this.response.status ? this.response.status : null
|
|
828
877
|
};
|
|
@@ -845,7 +894,7 @@
|
|
|
845
894
|
// eslint-disable-next-line func-names
|
|
846
895
|
AxiosError.from = function (error, code, config, request, response, customProps) {
|
|
847
896
|
var axiosError = Object.create(prototype$1);
|
|
848
|
-
utils.toFlatObject(error, axiosError, function filter(obj) {
|
|
897
|
+
utils$1.toFlatObject(error, axiosError, function filter(obj) {
|
|
849
898
|
return obj !== Error.prototype;
|
|
850
899
|
}, function (prop) {
|
|
851
900
|
return prop !== 'isAxiosError';
|
|
@@ -868,7 +917,7 @@
|
|
|
868
917
|
* @returns {boolean}
|
|
869
918
|
*/
|
|
870
919
|
function isVisitable(thing) {
|
|
871
|
-
return utils.isPlainObject(thing) || utils.isArray(thing);
|
|
920
|
+
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
872
921
|
}
|
|
873
922
|
|
|
874
923
|
/**
|
|
@@ -879,7 +928,7 @@
|
|
|
879
928
|
* @returns {string} the key without the brackets.
|
|
880
929
|
*/
|
|
881
930
|
function removeBrackets(key) {
|
|
882
|
-
return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
931
|
+
return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
883
932
|
}
|
|
884
933
|
|
|
885
934
|
/**
|
|
@@ -908,9 +957,9 @@
|
|
|
908
957
|
* @returns {boolean}
|
|
909
958
|
*/
|
|
910
959
|
function isFlatArray(arr) {
|
|
911
|
-
return utils.isArray(arr) && !arr.some(isVisitable);
|
|
960
|
+
return utils$1.isArray(arr) && !arr.some(isVisitable);
|
|
912
961
|
}
|
|
913
|
-
var predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
962
|
+
var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
|
|
914
963
|
return /^is[A-Z]/.test(prop);
|
|
915
964
|
});
|
|
916
965
|
|
|
@@ -938,7 +987,7 @@
|
|
|
938
987
|
* @returns
|
|
939
988
|
*/
|
|
940
989
|
function toFormData(obj, formData, options) {
|
|
941
|
-
if (!utils.isObject(obj)) {
|
|
990
|
+
if (!utils$1.isObject(obj)) {
|
|
942
991
|
throw new TypeError('target must be an object');
|
|
943
992
|
}
|
|
944
993
|
|
|
@@ -946,13 +995,13 @@
|
|
|
946
995
|
formData = formData || new (FormData)();
|
|
947
996
|
|
|
948
997
|
// eslint-disable-next-line no-param-reassign
|
|
949
|
-
options = utils.toFlatObject(options, {
|
|
998
|
+
options = utils$1.toFlatObject(options, {
|
|
950
999
|
metaTokens: true,
|
|
951
1000
|
dots: false,
|
|
952
1001
|
indexes: false
|
|
953
1002
|
}, false, function defined(option, source) {
|
|
954
1003
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
955
|
-
return !utils.isUndefined(source[option]);
|
|
1004
|
+
return !utils$1.isUndefined(source[option]);
|
|
956
1005
|
});
|
|
957
1006
|
var metaTokens = options.metaTokens;
|
|
958
1007
|
// eslint-disable-next-line no-use-before-define
|
|
@@ -960,19 +1009,19 @@
|
|
|
960
1009
|
var dots = options.dots;
|
|
961
1010
|
var indexes = options.indexes;
|
|
962
1011
|
var _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
963
|
-
var useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
|
964
|
-
if (!utils.isFunction(visitor)) {
|
|
1012
|
+
var useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
1013
|
+
if (!utils$1.isFunction(visitor)) {
|
|
965
1014
|
throw new TypeError('visitor must be a function');
|
|
966
1015
|
}
|
|
967
1016
|
function convertValue(value) {
|
|
968
1017
|
if (value === null) return '';
|
|
969
|
-
if (utils.isDate(value)) {
|
|
1018
|
+
if (utils$1.isDate(value)) {
|
|
970
1019
|
return value.toISOString();
|
|
971
1020
|
}
|
|
972
|
-
if (!useBlob && utils.isBlob(value)) {
|
|
1021
|
+
if (!useBlob && utils$1.isBlob(value)) {
|
|
973
1022
|
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
974
1023
|
}
|
|
975
|
-
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
|
1024
|
+
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
976
1025
|
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
977
1026
|
}
|
|
978
1027
|
return value;
|
|
@@ -991,16 +1040,16 @@
|
|
|
991
1040
|
function defaultVisitor(value, key, path) {
|
|
992
1041
|
var arr = value;
|
|
993
1042
|
if (value && !path && _typeof(value) === 'object') {
|
|
994
|
-
if (utils.endsWith(key, '{}')) {
|
|
1043
|
+
if (utils$1.endsWith(key, '{}')) {
|
|
995
1044
|
// eslint-disable-next-line no-param-reassign
|
|
996
1045
|
key = metaTokens ? key : key.slice(0, -2);
|
|
997
1046
|
// eslint-disable-next-line no-param-reassign
|
|
998
1047
|
value = JSON.stringify(value);
|
|
999
|
-
} else if (utils.isArray(value) && isFlatArray(value) || (utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))) {
|
|
1048
|
+
} else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) {
|
|
1000
1049
|
// eslint-disable-next-line no-param-reassign
|
|
1001
1050
|
key = removeBrackets(key);
|
|
1002
1051
|
arr.forEach(function each(el, index) {
|
|
1003
|
-
!(utils.isUndefined(el) || el === null) && formData.append(
|
|
1052
|
+
!(utils$1.isUndefined(el) || el === null) && formData.append(
|
|
1004
1053
|
// eslint-disable-next-line no-nested-ternary
|
|
1005
1054
|
indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + '[]', convertValue(el));
|
|
1006
1055
|
});
|
|
@@ -1020,20 +1069,20 @@
|
|
|
1020
1069
|
isVisitable: isVisitable
|
|
1021
1070
|
});
|
|
1022
1071
|
function build(value, path) {
|
|
1023
|
-
if (utils.isUndefined(value)) return;
|
|
1072
|
+
if (utils$1.isUndefined(value)) return;
|
|
1024
1073
|
if (stack.indexOf(value) !== -1) {
|
|
1025
1074
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
1026
1075
|
}
|
|
1027
1076
|
stack.push(value);
|
|
1028
|
-
utils.forEach(value, function each(el, key) {
|
|
1029
|
-
var result = !(utils.isUndefined(el) || el === null) && visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
1077
|
+
utils$1.forEach(value, function each(el, key) {
|
|
1078
|
+
var result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
1030
1079
|
if (result === true) {
|
|
1031
1080
|
build(el, path ? path.concat(key) : [key]);
|
|
1032
1081
|
}
|
|
1033
1082
|
});
|
|
1034
1083
|
stack.pop();
|
|
1035
1084
|
}
|
|
1036
|
-
if (!utils.isObject(obj)) {
|
|
1085
|
+
if (!utils$1.isObject(obj)) {
|
|
1037
1086
|
throw new TypeError('data must be an object');
|
|
1038
1087
|
}
|
|
1039
1088
|
build(obj);
|
|
@@ -1120,7 +1169,7 @@
|
|
|
1120
1169
|
if (serializeFn) {
|
|
1121
1170
|
serializedParams = serializeFn(params, options);
|
|
1122
1171
|
} else {
|
|
1123
|
-
serializedParams = utils.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
|
|
1172
|
+
serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
|
|
1124
1173
|
}
|
|
1125
1174
|
if (serializedParams) {
|
|
1126
1175
|
var hashmarkIndex = url.indexOf("#");
|
|
@@ -1199,7 +1248,7 @@
|
|
|
1199
1248
|
}, {
|
|
1200
1249
|
key: "forEach",
|
|
1201
1250
|
value: function forEach(fn) {
|
|
1202
|
-
utils.forEach(this.handlers, function forEachHandler(h) {
|
|
1251
|
+
utils$1.forEach(this.handlers, function forEachHandler(h) {
|
|
1203
1252
|
if (h !== null) {
|
|
1204
1253
|
fn(h);
|
|
1205
1254
|
}
|
|
@@ -1222,6 +1271,18 @@
|
|
|
1222
1271
|
|
|
1223
1272
|
var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
|
1224
1273
|
|
|
1274
|
+
var platform$1 = {
|
|
1275
|
+
isBrowser: true,
|
|
1276
|
+
classes: {
|
|
1277
|
+
URLSearchParams: URLSearchParams$1,
|
|
1278
|
+
FormData: FormData$1,
|
|
1279
|
+
Blob: Blob$1
|
|
1280
|
+
},
|
|
1281
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
1282
|
+
};
|
|
1283
|
+
|
|
1284
|
+
var hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
1285
|
+
|
|
1225
1286
|
/**
|
|
1226
1287
|
* Determine if we're running in a standard browser environment
|
|
1227
1288
|
*
|
|
@@ -1239,13 +1300,9 @@
|
|
|
1239
1300
|
*
|
|
1240
1301
|
* @returns {boolean}
|
|
1241
1302
|
*/
|
|
1242
|
-
var
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
return false;
|
|
1246
|
-
}
|
|
1247
|
-
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
1248
|
-
}();
|
|
1303
|
+
var hasStandardBrowserEnv = function (product) {
|
|
1304
|
+
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0;
|
|
1305
|
+
}(typeof navigator !== 'undefined' && navigator.product);
|
|
1249
1306
|
|
|
1250
1307
|
/**
|
|
1251
1308
|
* Determine if we're running in a standard browser webWorker environment
|
|
@@ -1256,27 +1313,25 @@
|
|
|
1256
1313
|
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
1257
1314
|
* This leads to a problem when axios post `FormData` in webWorker
|
|
1258
1315
|
*/
|
|
1259
|
-
var
|
|
1316
|
+
var hasStandardBrowserWebWorkerEnv = function () {
|
|
1260
1317
|
return typeof WorkerGlobalScope !== 'undefined' &&
|
|
1261
1318
|
// eslint-disable-next-line no-undef
|
|
1262
1319
|
self instanceof WorkerGlobalScope && typeof self.importScripts === 'function';
|
|
1263
1320
|
}();
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
1274
|
-
};
|
|
1321
|
+
|
|
1322
|
+
var utils = /*#__PURE__*/Object.freeze({
|
|
1323
|
+
__proto__: null,
|
|
1324
|
+
hasBrowserEnv: hasBrowserEnv,
|
|
1325
|
+
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
|
1326
|
+
hasStandardBrowserEnv: hasStandardBrowserEnv
|
|
1327
|
+
});
|
|
1328
|
+
|
|
1329
|
+
var platform = _objectSpread2(_objectSpread2({}, utils), platform$1);
|
|
1275
1330
|
|
|
1276
1331
|
function toURLEncodedForm(data, options) {
|
|
1277
1332
|
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
|
1278
1333
|
visitor: function visitor(value, key, path, helpers) {
|
|
1279
|
-
if (platform.isNode && utils.isBuffer(value)) {
|
|
1334
|
+
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
1280
1335
|
this.append(key, value.toString('base64'));
|
|
1281
1336
|
return false;
|
|
1282
1337
|
}
|
|
@@ -1297,7 +1352,7 @@
|
|
|
1297
1352
|
// foo.x.y.z
|
|
1298
1353
|
// foo-x-y-z
|
|
1299
1354
|
// foo x y z
|
|
1300
|
-
return utils.matchAll(/\w+|\[(\w*)]/g, name).map(function (match) {
|
|
1355
|
+
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(function (match) {
|
|
1301
1356
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
1302
1357
|
});
|
|
1303
1358
|
}
|
|
@@ -1334,27 +1389,27 @@
|
|
|
1334
1389
|
var name = path[index++];
|
|
1335
1390
|
var isNumericKey = Number.isFinite(+name);
|
|
1336
1391
|
var isLast = index >= path.length;
|
|
1337
|
-
name = !name && utils.isArray(target) ? target.length : name;
|
|
1392
|
+
name = !name && utils$1.isArray(target) ? target.length : name;
|
|
1338
1393
|
if (isLast) {
|
|
1339
|
-
if (utils.hasOwnProp(target, name)) {
|
|
1394
|
+
if (utils$1.hasOwnProp(target, name)) {
|
|
1340
1395
|
target[name] = [target[name], value];
|
|
1341
1396
|
} else {
|
|
1342
1397
|
target[name] = value;
|
|
1343
1398
|
}
|
|
1344
1399
|
return !isNumericKey;
|
|
1345
1400
|
}
|
|
1346
|
-
if (!target[name] || !utils.isObject(target[name])) {
|
|
1401
|
+
if (!target[name] || !utils$1.isObject(target[name])) {
|
|
1347
1402
|
target[name] = [];
|
|
1348
1403
|
}
|
|
1349
1404
|
var result = buildPath(path, value, target[name], index);
|
|
1350
|
-
if (result && utils.isArray(target[name])) {
|
|
1405
|
+
if (result && utils$1.isArray(target[name])) {
|
|
1351
1406
|
target[name] = arrayToObject(target[name]);
|
|
1352
1407
|
}
|
|
1353
1408
|
return !isNumericKey;
|
|
1354
1409
|
}
|
|
1355
|
-
if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
|
|
1410
|
+
if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
|
|
1356
1411
|
var obj = {};
|
|
1357
|
-
utils.forEachEntry(formData, function (name, value) {
|
|
1412
|
+
utils$1.forEachEntry(formData, function (name, value) {
|
|
1358
1413
|
buildPath(parsePropPath(name), value, obj, 0);
|
|
1359
1414
|
});
|
|
1360
1415
|
return obj;
|
|
@@ -1373,10 +1428,10 @@
|
|
|
1373
1428
|
* @returns {string} A stringified version of the rawValue.
|
|
1374
1429
|
*/
|
|
1375
1430
|
function stringifySafely(rawValue, parser, encoder) {
|
|
1376
|
-
if (utils.isString(rawValue)) {
|
|
1431
|
+
if (utils$1.isString(rawValue)) {
|
|
1377
1432
|
try {
|
|
1378
1433
|
(parser || JSON.parse)(rawValue);
|
|
1379
|
-
return utils.trim(rawValue);
|
|
1434
|
+
return utils$1.trim(rawValue);
|
|
1380
1435
|
} catch (e) {
|
|
1381
1436
|
if (e.name !== 'SyntaxError') {
|
|
1382
1437
|
throw e;
|
|
@@ -1387,28 +1442,28 @@
|
|
|
1387
1442
|
}
|
|
1388
1443
|
var defaults = {
|
|
1389
1444
|
transitional: transitionalDefaults,
|
|
1390
|
-
adapter:
|
|
1445
|
+
adapter: ['xhr', 'http'],
|
|
1391
1446
|
transformRequest: [function transformRequest(data, headers) {
|
|
1392
1447
|
var contentType = headers.getContentType() || '';
|
|
1393
1448
|
var hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
1394
|
-
var isObjectPayload = utils.isObject(data);
|
|
1395
|
-
if (isObjectPayload && utils.isHTMLForm(data)) {
|
|
1449
|
+
var isObjectPayload = utils$1.isObject(data);
|
|
1450
|
+
if (isObjectPayload && utils$1.isHTMLForm(data)) {
|
|
1396
1451
|
data = new FormData(data);
|
|
1397
1452
|
}
|
|
1398
|
-
var isFormData = utils.isFormData(data);
|
|
1453
|
+
var isFormData = utils$1.isFormData(data);
|
|
1399
1454
|
if (isFormData) {
|
|
1400
1455
|
if (!hasJSONContentType) {
|
|
1401
1456
|
return data;
|
|
1402
1457
|
}
|
|
1403
1458
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
1404
1459
|
}
|
|
1405
|
-
if (utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {
|
|
1460
|
+
if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data)) {
|
|
1406
1461
|
return data;
|
|
1407
1462
|
}
|
|
1408
|
-
if (utils.isArrayBufferView(data)) {
|
|
1463
|
+
if (utils$1.isArrayBufferView(data)) {
|
|
1409
1464
|
return data.buffer;
|
|
1410
1465
|
}
|
|
1411
|
-
if (utils.isURLSearchParams(data)) {
|
|
1466
|
+
if (utils$1.isURLSearchParams(data)) {
|
|
1412
1467
|
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
1413
1468
|
return data.toString();
|
|
1414
1469
|
}
|
|
@@ -1417,7 +1472,7 @@
|
|
|
1417
1472
|
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
1418
1473
|
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
1419
1474
|
}
|
|
1420
|
-
if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
1475
|
+
if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
1421
1476
|
var _FormData = this.env && this.env.FormData;
|
|
1422
1477
|
return toFormData(isFileList ? {
|
|
1423
1478
|
'files[]': data
|
|
@@ -1434,7 +1489,7 @@
|
|
|
1434
1489
|
var transitional = this.transitional || defaults.transitional;
|
|
1435
1490
|
var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
1436
1491
|
var JSONRequested = this.responseType === 'json';
|
|
1437
|
-
if (data && utils.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
1492
|
+
if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
1438
1493
|
var silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
1439
1494
|
var strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
1440
1495
|
try {
|
|
@@ -1473,14 +1528,14 @@
|
|
|
1473
1528
|
}
|
|
1474
1529
|
}
|
|
1475
1530
|
};
|
|
1476
|
-
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], function (method) {
|
|
1531
|
+
utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], function (method) {
|
|
1477
1532
|
defaults.headers[method] = {};
|
|
1478
1533
|
});
|
|
1479
1534
|
var defaults$1 = defaults;
|
|
1480
1535
|
|
|
1481
1536
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
1482
1537
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
1483
|
-
var ignoreDuplicateOf = utils.toObjectSet(['age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent']);
|
|
1538
|
+
var ignoreDuplicateOf = utils$1.toObjectSet(['age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent']);
|
|
1484
1539
|
|
|
1485
1540
|
/**
|
|
1486
1541
|
* Parse headers into an object
|
|
@@ -1529,7 +1584,7 @@
|
|
|
1529
1584
|
if (value === false || value == null) {
|
|
1530
1585
|
return value;
|
|
1531
1586
|
}
|
|
1532
|
-
return utils.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
1587
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
1533
1588
|
}
|
|
1534
1589
|
function parseTokens(str) {
|
|
1535
1590
|
var tokens = Object.create(null);
|
|
@@ -1544,17 +1599,17 @@
|
|
|
1544
1599
|
return /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
1545
1600
|
};
|
|
1546
1601
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
1547
|
-
if (utils.isFunction(filter)) {
|
|
1602
|
+
if (utils$1.isFunction(filter)) {
|
|
1548
1603
|
return filter.call(this, value, header);
|
|
1549
1604
|
}
|
|
1550
1605
|
if (isHeaderNameFilter) {
|
|
1551
1606
|
value = header;
|
|
1552
1607
|
}
|
|
1553
|
-
if (!utils.isString(value)) return;
|
|
1554
|
-
if (utils.isString(filter)) {
|
|
1608
|
+
if (!utils$1.isString(value)) return;
|
|
1609
|
+
if (utils$1.isString(filter)) {
|
|
1555
1610
|
return value.indexOf(filter) !== -1;
|
|
1556
1611
|
}
|
|
1557
|
-
if (utils.isRegExp(filter)) {
|
|
1612
|
+
if (utils$1.isRegExp(filter)) {
|
|
1558
1613
|
return filter.test(value);
|
|
1559
1614
|
}
|
|
1560
1615
|
}
|
|
@@ -1564,7 +1619,7 @@
|
|
|
1564
1619
|
});
|
|
1565
1620
|
}
|
|
1566
1621
|
function buildAccessors(obj, header) {
|
|
1567
|
-
var accessorName = utils.toCamelCase(' ' + header);
|
|
1622
|
+
var accessorName = utils$1.toCamelCase(' ' + header);
|
|
1568
1623
|
['get', 'set', 'has'].forEach(function (methodName) {
|
|
1569
1624
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
1570
1625
|
value: function value(arg1, arg2, arg3) {
|
|
@@ -1588,19 +1643,19 @@
|
|
|
1588
1643
|
if (!lHeader) {
|
|
1589
1644
|
throw new Error('header name must be a non-empty string');
|
|
1590
1645
|
}
|
|
1591
|
-
var key = utils.findKey(self, lHeader);
|
|
1646
|
+
var key = utils$1.findKey(self, lHeader);
|
|
1592
1647
|
if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) {
|
|
1593
1648
|
self[key || _header] = normalizeValue(_value);
|
|
1594
1649
|
}
|
|
1595
1650
|
}
|
|
1596
1651
|
var setHeaders = function setHeaders(headers, _rewrite) {
|
|
1597
|
-
return utils.forEach(headers, function (_value, _header) {
|
|
1652
|
+
return utils$1.forEach(headers, function (_value, _header) {
|
|
1598
1653
|
return setHeader(_value, _header, _rewrite);
|
|
1599
1654
|
});
|
|
1600
1655
|
};
|
|
1601
|
-
if (utils.isPlainObject(header) || header instanceof this.constructor) {
|
|
1656
|
+
if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
|
|
1602
1657
|
setHeaders(header, valueOrRewrite);
|
|
1603
|
-
} else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
1658
|
+
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
1604
1659
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
1605
1660
|
} else {
|
|
1606
1661
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
@@ -1612,7 +1667,7 @@
|
|
|
1612
1667
|
value: function get(header, parser) {
|
|
1613
1668
|
header = normalizeHeader(header);
|
|
1614
1669
|
if (header) {
|
|
1615
|
-
var key = utils.findKey(this, header);
|
|
1670
|
+
var key = utils$1.findKey(this, header);
|
|
1616
1671
|
if (key) {
|
|
1617
1672
|
var value = this[key];
|
|
1618
1673
|
if (!parser) {
|
|
@@ -1621,10 +1676,10 @@
|
|
|
1621
1676
|
if (parser === true) {
|
|
1622
1677
|
return parseTokens(value);
|
|
1623
1678
|
}
|
|
1624
|
-
if (utils.isFunction(parser)) {
|
|
1679
|
+
if (utils$1.isFunction(parser)) {
|
|
1625
1680
|
return parser.call(this, value, key);
|
|
1626
1681
|
}
|
|
1627
|
-
if (utils.isRegExp(parser)) {
|
|
1682
|
+
if (utils$1.isRegExp(parser)) {
|
|
1628
1683
|
return parser.exec(value);
|
|
1629
1684
|
}
|
|
1630
1685
|
throw new TypeError('parser must be boolean|regexp|function');
|
|
@@ -1636,7 +1691,7 @@
|
|
|
1636
1691
|
value: function has(header, matcher) {
|
|
1637
1692
|
header = normalizeHeader(header);
|
|
1638
1693
|
if (header) {
|
|
1639
|
-
var key = utils.findKey(this, header);
|
|
1694
|
+
var key = utils$1.findKey(this, header);
|
|
1640
1695
|
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
1641
1696
|
}
|
|
1642
1697
|
return false;
|
|
@@ -1649,14 +1704,14 @@
|
|
|
1649
1704
|
function deleteHeader(_header) {
|
|
1650
1705
|
_header = normalizeHeader(_header);
|
|
1651
1706
|
if (_header) {
|
|
1652
|
-
var key = utils.findKey(self, _header);
|
|
1707
|
+
var key = utils$1.findKey(self, _header);
|
|
1653
1708
|
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
|
|
1654
1709
|
delete self[key];
|
|
1655
1710
|
deleted = true;
|
|
1656
1711
|
}
|
|
1657
1712
|
}
|
|
1658
1713
|
}
|
|
1659
|
-
if (utils.isArray(header)) {
|
|
1714
|
+
if (utils$1.isArray(header)) {
|
|
1660
1715
|
header.forEach(deleteHeader);
|
|
1661
1716
|
} else {
|
|
1662
1717
|
deleteHeader(header);
|
|
@@ -1683,8 +1738,8 @@
|
|
|
1683
1738
|
value: function normalize(format) {
|
|
1684
1739
|
var self = this;
|
|
1685
1740
|
var headers = {};
|
|
1686
|
-
utils.forEach(this, function (value, header) {
|
|
1687
|
-
var key = utils.findKey(headers, header);
|
|
1741
|
+
utils$1.forEach(this, function (value, header) {
|
|
1742
|
+
var key = utils$1.findKey(headers, header);
|
|
1688
1743
|
if (key) {
|
|
1689
1744
|
self[key] = normalizeValue(value);
|
|
1690
1745
|
delete self[header];
|
|
@@ -1712,8 +1767,8 @@
|
|
|
1712
1767
|
key: "toJSON",
|
|
1713
1768
|
value: function toJSON(asStrings) {
|
|
1714
1769
|
var obj = Object.create(null);
|
|
1715
|
-
utils.forEach(this, function (value, header) {
|
|
1716
|
-
value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
|
|
1770
|
+
utils$1.forEach(this, function (value, header) {
|
|
1771
|
+
value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
|
|
1717
1772
|
});
|
|
1718
1773
|
return obj;
|
|
1719
1774
|
}
|
|
@@ -1769,7 +1824,7 @@
|
|
|
1769
1824
|
accessors[lHeader] = true;
|
|
1770
1825
|
}
|
|
1771
1826
|
}
|
|
1772
|
-
utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
1827
|
+
utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
1773
1828
|
return this;
|
|
1774
1829
|
}
|
|
1775
1830
|
}]);
|
|
@@ -1778,7 +1833,7 @@
|
|
|
1778
1833
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
1779
1834
|
|
|
1780
1835
|
// reserved names hotfix
|
|
1781
|
-
utils.reduceDescriptors(AxiosHeaders.prototype, function (_ref3, key) {
|
|
1836
|
+
utils$1.reduceDescriptors(AxiosHeaders.prototype, function (_ref3, key) {
|
|
1782
1837
|
var value = _ref3.value;
|
|
1783
1838
|
var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
1784
1839
|
return {
|
|
@@ -1790,7 +1845,7 @@
|
|
|
1790
1845
|
}
|
|
1791
1846
|
};
|
|
1792
1847
|
});
|
|
1793
|
-
utils.freezeMethods(AxiosHeaders);
|
|
1848
|
+
utils$1.freezeMethods(AxiosHeaders);
|
|
1794
1849
|
var AxiosHeaders$1 = AxiosHeaders;
|
|
1795
1850
|
|
|
1796
1851
|
/**
|
|
@@ -1806,7 +1861,7 @@
|
|
|
1806
1861
|
var context = response || config;
|
|
1807
1862
|
var headers = AxiosHeaders$1.from(context.headers);
|
|
1808
1863
|
var data = context.data;
|
|
1809
|
-
utils.forEach(fns, function transform(fn) {
|
|
1864
|
+
utils$1.forEach(fns, function transform(fn) {
|
|
1810
1865
|
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
|
|
1811
1866
|
});
|
|
1812
1867
|
headers.normalize();
|
|
@@ -1831,7 +1886,7 @@
|
|
|
1831
1886
|
AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
|
|
1832
1887
|
this.name = 'CanceledError';
|
|
1833
1888
|
}
|
|
1834
|
-
utils.inherits(CanceledError, AxiosError, {
|
|
1889
|
+
utils$1.inherits(CanceledError, AxiosError, {
|
|
1835
1890
|
__CANCEL__: true
|
|
1836
1891
|
});
|
|
1837
1892
|
|
|
@@ -1853,46 +1908,33 @@
|
|
|
1853
1908
|
}
|
|
1854
1909
|
}
|
|
1855
1910
|
|
|
1856
|
-
var cookies = platform.
|
|
1911
|
+
var cookies = platform.hasStandardBrowserEnv ?
|
|
1857
1912
|
// Standard browser envs support document.cookie
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
}
|
|
1884
|
-
};
|
|
1885
|
-
}() :
|
|
1886
|
-
// Non standard browser env (web workers, react-native) lack needed support.
|
|
1887
|
-
function nonStandardBrowserEnv() {
|
|
1888
|
-
return {
|
|
1889
|
-
write: function write() {},
|
|
1890
|
-
read: function read() {
|
|
1891
|
-
return null;
|
|
1892
|
-
},
|
|
1893
|
-
remove: function remove() {}
|
|
1894
|
-
};
|
|
1895
|
-
}();
|
|
1913
|
+
{
|
|
1914
|
+
write: function write(name, value, expires, path, domain, secure) {
|
|
1915
|
+
var cookie = [name + '=' + encodeURIComponent(value)];
|
|
1916
|
+
utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
|
1917
|
+
utils$1.isString(path) && cookie.push('path=' + path);
|
|
1918
|
+
utils$1.isString(domain) && cookie.push('domain=' + domain);
|
|
1919
|
+
secure === true && cookie.push('secure');
|
|
1920
|
+
document.cookie = cookie.join('; ');
|
|
1921
|
+
},
|
|
1922
|
+
read: function read(name) {
|
|
1923
|
+
var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
1924
|
+
return match ? decodeURIComponent(match[3]) : null;
|
|
1925
|
+
},
|
|
1926
|
+
remove: function remove(name) {
|
|
1927
|
+
this.write(name, '', Date.now() - 86400000);
|
|
1928
|
+
}
|
|
1929
|
+
} :
|
|
1930
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
1931
|
+
{
|
|
1932
|
+
write: function write() {},
|
|
1933
|
+
read: function read() {
|
|
1934
|
+
return null;
|
|
1935
|
+
},
|
|
1936
|
+
remove: function remove() {}
|
|
1937
|
+
};
|
|
1896
1938
|
|
|
1897
1939
|
/**
|
|
1898
1940
|
* Determines whether the specified URL is absolute
|
|
@@ -1937,7 +1979,7 @@
|
|
|
1937
1979
|
return requestedURL;
|
|
1938
1980
|
}
|
|
1939
1981
|
|
|
1940
|
-
var isURLSameOrigin = platform.
|
|
1982
|
+
var isURLSameOrigin = platform.hasStandardBrowserEnv ?
|
|
1941
1983
|
// Standard browser envs have full support of the APIs needed to test
|
|
1942
1984
|
// whether the request URL is of the same origin as current location.
|
|
1943
1985
|
function standardBrowserEnv() {
|
|
@@ -1946,7 +1988,7 @@
|
|
|
1946
1988
|
var originURL;
|
|
1947
1989
|
|
|
1948
1990
|
/**
|
|
1949
|
-
* Parse a URL to discover
|
|
1991
|
+
* Parse a URL to discover its components
|
|
1950
1992
|
*
|
|
1951
1993
|
* @param {String} url The URL to be parsed
|
|
1952
1994
|
* @returns {Object}
|
|
@@ -1981,7 +2023,7 @@
|
|
|
1981
2023
|
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
1982
2024
|
*/
|
|
1983
2025
|
return function isURLSameOrigin(requestURL) {
|
|
1984
|
-
var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
2026
|
+
var parsed = utils$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
1985
2027
|
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
1986
2028
|
};
|
|
1987
2029
|
}() :
|
|
@@ -2065,7 +2107,8 @@
|
|
|
2065
2107
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
2066
2108
|
var requestData = config.data;
|
|
2067
2109
|
var requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
|
|
2068
|
-
var responseType = config.responseType
|
|
2110
|
+
var responseType = config.responseType,
|
|
2111
|
+
withXSRFToken = config.withXSRFToken;
|
|
2069
2112
|
var onCanceled;
|
|
2070
2113
|
function done() {
|
|
2071
2114
|
if (config.cancelToken) {
|
|
@@ -2075,14 +2118,21 @@
|
|
|
2075
2118
|
config.signal.removeEventListener('abort', onCanceled);
|
|
2076
2119
|
}
|
|
2077
2120
|
}
|
|
2078
|
-
|
|
2079
|
-
|
|
2121
|
+
var contentType;
|
|
2122
|
+
if (utils$1.isFormData(requestData)) {
|
|
2123
|
+
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
2080
2124
|
requestHeaders.setContentType(false); // Let the browser set it
|
|
2081
|
-
} else {
|
|
2082
|
-
|
|
2125
|
+
} else if ((contentType = requestHeaders.getContentType()) !== false) {
|
|
2126
|
+
// fix semicolon duplication issue for ReactNative FormData implementation
|
|
2127
|
+
var _ref = contentType ? contentType.split(';').map(function (token) {
|
|
2128
|
+
return token.trim();
|
|
2129
|
+
}).filter(Boolean) : [],
|
|
2130
|
+
_ref2 = _toArray(_ref),
|
|
2131
|
+
type = _ref2[0],
|
|
2132
|
+
tokens = _ref2.slice(1);
|
|
2133
|
+
requestHeaders.setContentType([type || 'multipart/form-data'].concat(_toConsumableArray(tokens)).join('; '));
|
|
2083
2134
|
}
|
|
2084
2135
|
}
|
|
2085
|
-
|
|
2086
2136
|
var request = new XMLHttpRequest();
|
|
2087
2137
|
|
|
2088
2138
|
// HTTP basic authentication
|
|
@@ -2182,11 +2232,14 @@
|
|
|
2182
2232
|
// Add xsrf header
|
|
2183
2233
|
// This is only done if running in a standard browser environment.
|
|
2184
2234
|
// Specifically not if we're in a web worker, or react-native.
|
|
2185
|
-
if (platform.
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2235
|
+
if (platform.hasStandardBrowserEnv) {
|
|
2236
|
+
withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
|
|
2237
|
+
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(fullPath)) {
|
|
2238
|
+
// Add xsrf header
|
|
2239
|
+
var xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
|
2240
|
+
if (xsrfValue) {
|
|
2241
|
+
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
2242
|
+
}
|
|
2190
2243
|
}
|
|
2191
2244
|
}
|
|
2192
2245
|
|
|
@@ -2195,13 +2248,13 @@
|
|
|
2195
2248
|
|
|
2196
2249
|
// Add headers to the request
|
|
2197
2250
|
if ('setRequestHeader' in request) {
|
|
2198
|
-
utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
2251
|
+
utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
2199
2252
|
request.setRequestHeader(key, val);
|
|
2200
2253
|
});
|
|
2201
2254
|
}
|
|
2202
2255
|
|
|
2203
2256
|
// Add withCredentials to request if needed
|
|
2204
|
-
if (!utils.isUndefined(config.withCredentials)) {
|
|
2257
|
+
if (!utils$1.isUndefined(config.withCredentials)) {
|
|
2205
2258
|
request.withCredentials = !!config.withCredentials;
|
|
2206
2259
|
}
|
|
2207
2260
|
|
|
@@ -2250,7 +2303,7 @@
|
|
|
2250
2303
|
http: httpAdapter,
|
|
2251
2304
|
xhr: xhrAdapter
|
|
2252
2305
|
};
|
|
2253
|
-
utils.forEach(knownAdapters, function (fn, value) {
|
|
2306
|
+
utils$1.forEach(knownAdapters, function (fn, value) {
|
|
2254
2307
|
if (fn) {
|
|
2255
2308
|
try {
|
|
2256
2309
|
Object.defineProperty(fn, 'name', {
|
|
@@ -2264,27 +2317,44 @@
|
|
|
2264
2317
|
});
|
|
2265
2318
|
}
|
|
2266
2319
|
});
|
|
2320
|
+
var renderReason = function renderReason(reason) {
|
|
2321
|
+
return "- ".concat(reason);
|
|
2322
|
+
};
|
|
2323
|
+
var isResolvedHandle = function isResolvedHandle(adapter) {
|
|
2324
|
+
return utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
2325
|
+
};
|
|
2267
2326
|
var adapters = {
|
|
2268
2327
|
getAdapter: function getAdapter(adapters) {
|
|
2269
|
-
adapters = utils.isArray(adapters) ? adapters : [adapters];
|
|
2328
|
+
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
|
|
2270
2329
|
var _adapters = adapters,
|
|
2271
2330
|
length = _adapters.length;
|
|
2272
2331
|
var nameOrAdapter;
|
|
2273
2332
|
var adapter;
|
|
2333
|
+
var rejectedReasons = {};
|
|
2274
2334
|
for (var i = 0; i < length; i++) {
|
|
2275
2335
|
nameOrAdapter = adapters[i];
|
|
2276
|
-
|
|
2336
|
+
var id = void 0;
|
|
2337
|
+
adapter = nameOrAdapter;
|
|
2338
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
2339
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
2340
|
+
if (adapter === undefined) {
|
|
2341
|
+
throw new AxiosError("Unknown adapter '".concat(id, "'"));
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
if (adapter) {
|
|
2277
2345
|
break;
|
|
2278
2346
|
}
|
|
2347
|
+
rejectedReasons[id || '#' + i] = adapter;
|
|
2279
2348
|
}
|
|
2280
2349
|
if (!adapter) {
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2350
|
+
var reasons = Object.entries(rejectedReasons).map(function (_ref) {
|
|
2351
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
2352
|
+
id = _ref2[0],
|
|
2353
|
+
state = _ref2[1];
|
|
2354
|
+
return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build');
|
|
2355
|
+
});
|
|
2356
|
+
var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
|
|
2357
|
+
throw new AxiosError("There is no suitable adapter to dispatch the request " + s, 'ERR_NOT_SUPPORT');
|
|
2288
2358
|
}
|
|
2289
2359
|
return adapter;
|
|
2290
2360
|
},
|
|
@@ -2363,13 +2433,13 @@
|
|
|
2363
2433
|
config2 = config2 || {};
|
|
2364
2434
|
var config = {};
|
|
2365
2435
|
function getMergedValue(target, source, caseless) {
|
|
2366
|
-
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
2367
|
-
return utils.merge.call({
|
|
2436
|
+
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
2437
|
+
return utils$1.merge.call({
|
|
2368
2438
|
caseless: caseless
|
|
2369
2439
|
}, target, source);
|
|
2370
|
-
} else if (utils.isPlainObject(source)) {
|
|
2371
|
-
return utils.merge({}, source);
|
|
2372
|
-
} else if (utils.isArray(source)) {
|
|
2440
|
+
} else if (utils$1.isPlainObject(source)) {
|
|
2441
|
+
return utils$1.merge({}, source);
|
|
2442
|
+
} else if (utils$1.isArray(source)) {
|
|
2373
2443
|
return source.slice();
|
|
2374
2444
|
}
|
|
2375
2445
|
return source;
|
|
@@ -2377,25 +2447,25 @@
|
|
|
2377
2447
|
|
|
2378
2448
|
// eslint-disable-next-line consistent-return
|
|
2379
2449
|
function mergeDeepProperties(a, b, caseless) {
|
|
2380
|
-
if (!utils.isUndefined(b)) {
|
|
2450
|
+
if (!utils$1.isUndefined(b)) {
|
|
2381
2451
|
return getMergedValue(a, b, caseless);
|
|
2382
|
-
} else if (!utils.isUndefined(a)) {
|
|
2452
|
+
} else if (!utils$1.isUndefined(a)) {
|
|
2383
2453
|
return getMergedValue(undefined, a, caseless);
|
|
2384
2454
|
}
|
|
2385
2455
|
}
|
|
2386
2456
|
|
|
2387
2457
|
// eslint-disable-next-line consistent-return
|
|
2388
2458
|
function valueFromConfig2(a, b) {
|
|
2389
|
-
if (!utils.isUndefined(b)) {
|
|
2459
|
+
if (!utils$1.isUndefined(b)) {
|
|
2390
2460
|
return getMergedValue(undefined, b);
|
|
2391
2461
|
}
|
|
2392
2462
|
}
|
|
2393
2463
|
|
|
2394
2464
|
// eslint-disable-next-line consistent-return
|
|
2395
2465
|
function defaultToConfig2(a, b) {
|
|
2396
|
-
if (!utils.isUndefined(b)) {
|
|
2466
|
+
if (!utils$1.isUndefined(b)) {
|
|
2397
2467
|
return getMergedValue(undefined, b);
|
|
2398
|
-
} else if (!utils.isUndefined(a)) {
|
|
2468
|
+
} else if (!utils$1.isUndefined(a)) {
|
|
2399
2469
|
return getMergedValue(undefined, a);
|
|
2400
2470
|
}
|
|
2401
2471
|
}
|
|
@@ -2419,6 +2489,7 @@
|
|
|
2419
2489
|
timeout: defaultToConfig2,
|
|
2420
2490
|
timeoutMessage: defaultToConfig2,
|
|
2421
2491
|
withCredentials: defaultToConfig2,
|
|
2492
|
+
withXSRFToken: defaultToConfig2,
|
|
2422
2493
|
adapter: defaultToConfig2,
|
|
2423
2494
|
responseType: defaultToConfig2,
|
|
2424
2495
|
xsrfCookieName: defaultToConfig2,
|
|
@@ -2440,15 +2511,15 @@
|
|
|
2440
2511
|
return mergeDeepProperties(headersToObject(a), headersToObject(b), true);
|
|
2441
2512
|
}
|
|
2442
2513
|
};
|
|
2443
|
-
utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
2514
|
+
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
2444
2515
|
var merge = mergeMap[prop] || mergeDeepProperties;
|
|
2445
2516
|
var configValue = merge(config1[prop], config2[prop], prop);
|
|
2446
|
-
utils.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
|
2517
|
+
utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
|
2447
2518
|
});
|
|
2448
2519
|
return config;
|
|
2449
2520
|
}
|
|
2450
2521
|
|
|
2451
|
-
var VERSION = "1.
|
|
2522
|
+
var VERSION = "1.6.2";
|
|
2452
2523
|
|
|
2453
2524
|
var validators$1 = {};
|
|
2454
2525
|
|
|
@@ -2576,7 +2647,7 @@
|
|
|
2576
2647
|
}, false);
|
|
2577
2648
|
}
|
|
2578
2649
|
if (paramsSerializer != null) {
|
|
2579
|
-
if (utils.isFunction(paramsSerializer)) {
|
|
2650
|
+
if (utils$1.isFunction(paramsSerializer)) {
|
|
2580
2651
|
config.paramsSerializer = {
|
|
2581
2652
|
serialize: paramsSerializer
|
|
2582
2653
|
};
|
|
@@ -2592,8 +2663,8 @@
|
|
|
2592
2663
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
2593
2664
|
|
|
2594
2665
|
// Flatten headers
|
|
2595
|
-
var contextHeaders = headers && utils.merge(headers.common, headers[config.method]);
|
|
2596
|
-
headers && utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) {
|
|
2666
|
+
var contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
|
|
2667
|
+
headers && utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) {
|
|
2597
2668
|
delete headers[method];
|
|
2598
2669
|
});
|
|
2599
2670
|
config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
|
|
@@ -2661,7 +2732,7 @@
|
|
|
2661
2732
|
}]);
|
|
2662
2733
|
return Axios;
|
|
2663
2734
|
}(); // Provide aliases for supported request methods
|
|
2664
|
-
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
2735
|
+
utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
2665
2736
|
/*eslint func-names:0*/
|
|
2666
2737
|
Axios.prototype[method] = function (url, config) {
|
|
2667
2738
|
return this.request(mergeConfig(config || {}, {
|
|
@@ -2671,7 +2742,7 @@
|
|
|
2671
2742
|
}));
|
|
2672
2743
|
};
|
|
2673
2744
|
});
|
|
2674
|
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
2745
|
+
utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
2675
2746
|
/*eslint func-names:0*/
|
|
2676
2747
|
|
|
2677
2748
|
function generateHTTPMethod(isForm) {
|
|
@@ -2842,7 +2913,7 @@
|
|
|
2842
2913
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
2843
2914
|
*/
|
|
2844
2915
|
function isAxiosError(payload) {
|
|
2845
|
-
return utils.isObject(payload) && payload.isAxiosError === true;
|
|
2916
|
+
return utils$1.isObject(payload) && payload.isAxiosError === true;
|
|
2846
2917
|
}
|
|
2847
2918
|
|
|
2848
2919
|
var HttpStatusCode = {
|
|
@@ -2930,12 +3001,12 @@
|
|
|
2930
3001
|
var instance = bind(Axios$1.prototype.request, context);
|
|
2931
3002
|
|
|
2932
3003
|
// Copy axios.prototype to instance
|
|
2933
|
-
utils.extend(instance, Axios$1.prototype, context, {
|
|
3004
|
+
utils$1.extend(instance, Axios$1.prototype, context, {
|
|
2934
3005
|
allOwnKeys: true
|
|
2935
3006
|
});
|
|
2936
3007
|
|
|
2937
3008
|
// Copy context to instance
|
|
2938
|
-
utils.extend(instance, context, null, {
|
|
3009
|
+
utils$1.extend(instance, context, null, {
|
|
2939
3010
|
allOwnKeys: true
|
|
2940
3011
|
});
|
|
2941
3012
|
|
|
@@ -2978,7 +3049,7 @@
|
|
|
2978
3049
|
axios.mergeConfig = mergeConfig;
|
|
2979
3050
|
axios.AxiosHeaders = AxiosHeaders$1;
|
|
2980
3051
|
axios.formToJSON = function (thing) {
|
|
2981
|
-
return formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
3052
|
+
return formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
2982
3053
|
};
|
|
2983
3054
|
axios.getAdapter = adapters.getAdapter;
|
|
2984
3055
|
axios.HttpStatusCode = HttpStatusCode$1;
|