@jerome-benoit/sap-ai-provider 4.6.2 → 4.6.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/dist/{chunk-TE3CYVU3.js → chunk-GLGLTUZM.js} +633 -770
- package/dist/chunk-GLGLTUZM.js.map +1 -0
- package/dist/{chunk-WO5UACI5.js → chunk-ORUTDXQO.js} +2 -2
- package/dist/{chunk-M6USM33F.js → chunk-UZU24CQH.js} +3 -3
- package/dist/{chunk-7HX5A5XW.js → chunk-VVJCWWDC.js} +48 -3
- package/dist/chunk-VVJCWWDC.js.map +1 -0
- package/dist/{foundation-models-embedding-model-strategy-A6CA7NXP.js → foundation-models-embedding-model-strategy-JTZUKIYM.js} +4 -4
- package/dist/{foundation-models-language-model-strategy-DZMPSOJK.js → foundation-models-language-model-strategy-NT5HVEM5.js} +4 -4
- package/dist/index.cjs +676 -770
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/{orchestration-embedding-model-strategy-M3POCUFM.js → orchestration-embedding-model-strategy-BBCIC45Q.js} +4 -4
- package/dist/{orchestration-language-model-strategy-Q3LPRWX5.js → orchestration-language-model-strategy-YPDJAXBL.js} +4 -4
- package/package.json +6 -6
- package/dist/chunk-7HX5A5XW.js.map +0 -1
- package/dist/chunk-TE3CYVU3.js.map +0 -1
- /package/dist/{chunk-WO5UACI5.js.map → chunk-ORUTDXQO.js.map} +0 -0
- /package/dist/{chunk-M6USM33F.js.map → chunk-UZU24CQH.js.map} +0 -0
- /package/dist/{foundation-models-embedding-model-strategy-A6CA7NXP.js.map → foundation-models-embedding-model-strategy-JTZUKIYM.js.map} +0 -0
- /package/dist/{foundation-models-language-model-strategy-DZMPSOJK.js.map → foundation-models-language-model-strategy-NT5HVEM5.js.map} +0 -0
- /package/dist/{orchestration-embedding-model-strategy-M3POCUFM.js.map → orchestration-embedding-model-strategy-BBCIC45Q.js.map} +0 -0
- /package/dist/{orchestration-language-model-strategy-Q3LPRWX5.js.map → orchestration-language-model-strategy-YPDJAXBL.js.map} +0 -0
|
@@ -25079,76 +25079,6 @@ var require_form_data = __commonJS({
|
|
|
25079
25079
|
}
|
|
25080
25080
|
});
|
|
25081
25081
|
|
|
25082
|
-
// node_modules/proxy-from-env/index.js
|
|
25083
|
-
var require_proxy_from_env = __commonJS({
|
|
25084
|
-
"node_modules/proxy-from-env/index.js"(exports) {
|
|
25085
|
-
"use strict";
|
|
25086
|
-
var parseUrl = __require("url").parse;
|
|
25087
|
-
var DEFAULT_PORTS = {
|
|
25088
|
-
ftp: 21,
|
|
25089
|
-
gopher: 70,
|
|
25090
|
-
http: 80,
|
|
25091
|
-
https: 443,
|
|
25092
|
-
ws: 80,
|
|
25093
|
-
wss: 443
|
|
25094
|
-
};
|
|
25095
|
-
var stringEndsWith = String.prototype.endsWith || function(s) {
|
|
25096
|
-
return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
|
|
25097
|
-
};
|
|
25098
|
-
function getProxyForUrl(url) {
|
|
25099
|
-
var parsedUrl = typeof url === "string" ? parseUrl(url) : url || {};
|
|
25100
|
-
var proto = parsedUrl.protocol;
|
|
25101
|
-
var hostname = parsedUrl.host;
|
|
25102
|
-
var port = parsedUrl.port;
|
|
25103
|
-
if (typeof hostname !== "string" || !hostname || typeof proto !== "string") {
|
|
25104
|
-
return "";
|
|
25105
|
-
}
|
|
25106
|
-
proto = proto.split(":", 1)[0];
|
|
25107
|
-
hostname = hostname.replace(/:\d*$/, "");
|
|
25108
|
-
port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
|
|
25109
|
-
if (!shouldProxy(hostname, port)) {
|
|
25110
|
-
return "";
|
|
25111
|
-
}
|
|
25112
|
-
var proxy = getEnv("npm_config_" + proto + "_proxy") || getEnv(proto + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
|
|
25113
|
-
if (proxy && proxy.indexOf("://") === -1) {
|
|
25114
|
-
proxy = proto + "://" + proxy;
|
|
25115
|
-
}
|
|
25116
|
-
return proxy;
|
|
25117
|
-
}
|
|
25118
|
-
function shouldProxy(hostname, port) {
|
|
25119
|
-
var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
|
|
25120
|
-
if (!NO_PROXY) {
|
|
25121
|
-
return true;
|
|
25122
|
-
}
|
|
25123
|
-
if (NO_PROXY === "*") {
|
|
25124
|
-
return false;
|
|
25125
|
-
}
|
|
25126
|
-
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
|
|
25127
|
-
if (!proxy) {
|
|
25128
|
-
return true;
|
|
25129
|
-
}
|
|
25130
|
-
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
|
|
25131
|
-
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
|
|
25132
|
-
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
|
|
25133
|
-
if (parsedProxyPort && parsedProxyPort !== port) {
|
|
25134
|
-
return true;
|
|
25135
|
-
}
|
|
25136
|
-
if (!/^[.*]/.test(parsedProxyHostname)) {
|
|
25137
|
-
return hostname !== parsedProxyHostname;
|
|
25138
|
-
}
|
|
25139
|
-
if (parsedProxyHostname.charAt(0) === "*") {
|
|
25140
|
-
parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
25141
|
-
}
|
|
25142
|
-
return !stringEndsWith.call(hostname, parsedProxyHostname);
|
|
25143
|
-
});
|
|
25144
|
-
}
|
|
25145
|
-
function getEnv(key) {
|
|
25146
|
-
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
25147
|
-
}
|
|
25148
|
-
exports.getProxyForUrl = getProxyForUrl;
|
|
25149
|
-
}
|
|
25150
|
-
});
|
|
25151
|
-
|
|
25152
25082
|
// node_modules/debug/src/common.js
|
|
25153
25083
|
var require_common2 = __commonJS({
|
|
25154
25084
|
"node_modules/debug/src/common.js"(exports, module) {
|
|
@@ -26210,7 +26140,6 @@ var require_axios = __commonJS({
|
|
|
26210
26140
|
var FormData$1 = require_form_data();
|
|
26211
26141
|
var crypto = __require("crypto");
|
|
26212
26142
|
var url = __require("url");
|
|
26213
|
-
var proxyFromEnv = require_proxy_from_env();
|
|
26214
26143
|
var http = __require("http");
|
|
26215
26144
|
var https = __require("https");
|
|
26216
26145
|
var http2 = __require("http2");
|
|
@@ -26219,28 +26148,21 @@ var require_axios = __commonJS({
|
|
|
26219
26148
|
var zlib = __require("zlib");
|
|
26220
26149
|
var stream = __require("stream");
|
|
26221
26150
|
var events = __require("events");
|
|
26222
|
-
function _interopDefaultLegacy(e) {
|
|
26223
|
-
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
26224
|
-
}
|
|
26225
|
-
var FormData__default = /* @__PURE__ */ _interopDefaultLegacy(FormData$1);
|
|
26226
|
-
var crypto__default = /* @__PURE__ */ _interopDefaultLegacy(crypto);
|
|
26227
|
-
var url__default = /* @__PURE__ */ _interopDefaultLegacy(url);
|
|
26228
|
-
var proxyFromEnv__default = /* @__PURE__ */ _interopDefaultLegacy(proxyFromEnv);
|
|
26229
|
-
var http__default = /* @__PURE__ */ _interopDefaultLegacy(http);
|
|
26230
|
-
var https__default = /* @__PURE__ */ _interopDefaultLegacy(https);
|
|
26231
|
-
var http2__default = /* @__PURE__ */ _interopDefaultLegacy(http2);
|
|
26232
|
-
var util__default = /* @__PURE__ */ _interopDefaultLegacy(util);
|
|
26233
|
-
var followRedirects__default = /* @__PURE__ */ _interopDefaultLegacy(followRedirects);
|
|
26234
|
-
var zlib__default = /* @__PURE__ */ _interopDefaultLegacy(zlib);
|
|
26235
|
-
var stream__default = /* @__PURE__ */ _interopDefaultLegacy(stream);
|
|
26236
26151
|
function bind(fn, thisArg) {
|
|
26237
26152
|
return function wrap() {
|
|
26238
26153
|
return fn.apply(thisArg, arguments);
|
|
26239
26154
|
};
|
|
26240
26155
|
}
|
|
26241
|
-
var {
|
|
26242
|
-
|
|
26243
|
-
|
|
26156
|
+
var {
|
|
26157
|
+
toString: toString2
|
|
26158
|
+
} = Object.prototype;
|
|
26159
|
+
var {
|
|
26160
|
+
getPrototypeOf
|
|
26161
|
+
} = Object;
|
|
26162
|
+
var {
|
|
26163
|
+
iterator,
|
|
26164
|
+
toStringTag
|
|
26165
|
+
} = Symbol;
|
|
26244
26166
|
var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
|
|
26245
26167
|
const str = toString2.call(thing);
|
|
26246
26168
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -26250,7 +26172,9 @@ var require_axios = __commonJS({
|
|
|
26250
26172
|
return (thing) => kindOf(thing) === type;
|
|
26251
26173
|
};
|
|
26252
26174
|
var typeOfTest = (type) => (thing) => typeof thing === type;
|
|
26253
|
-
var {
|
|
26175
|
+
var {
|
|
26176
|
+
isArray
|
|
26177
|
+
} = Array;
|
|
26254
26178
|
var isUndefined = typeOfTest("undefined");
|
|
26255
26179
|
function isBuffer(val) {
|
|
26256
26180
|
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
@@ -26311,16 +26235,13 @@ var require_axios = __commonJS({
|
|
|
26311
26235
|
kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
|
|
26312
26236
|
};
|
|
26313
26237
|
var isURLSearchParams = kindOfTest("URLSearchParams");
|
|
26314
|
-
var [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
26315
|
-
"ReadableStream",
|
|
26316
|
-
"Request",
|
|
26317
|
-
"Response",
|
|
26318
|
-
"Headers"
|
|
26319
|
-
].map(kindOfTest);
|
|
26238
|
+
var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
|
|
26320
26239
|
var trim2 = (str) => {
|
|
26321
26240
|
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
26322
26241
|
};
|
|
26323
|
-
function forEach(obj, fn, {
|
|
26242
|
+
function forEach(obj, fn, {
|
|
26243
|
+
allOwnKeys = false
|
|
26244
|
+
} = {}) {
|
|
26324
26245
|
if (obj === null || typeof obj === "undefined") {
|
|
26325
26246
|
return;
|
|
26326
26247
|
}
|
|
@@ -26368,7 +26289,10 @@ var require_axios = __commonJS({
|
|
|
26368
26289
|
})();
|
|
26369
26290
|
var isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
26370
26291
|
function merge() {
|
|
26371
|
-
const {
|
|
26292
|
+
const {
|
|
26293
|
+
caseless,
|
|
26294
|
+
skipUndefined
|
|
26295
|
+
} = isContextDefined(this) && this || {};
|
|
26372
26296
|
const result = {};
|
|
26373
26297
|
const assignValue = (val, key) => {
|
|
26374
26298
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
@@ -26390,28 +26314,28 @@ var require_axios = __commonJS({
|
|
|
26390
26314
|
}
|
|
26391
26315
|
return result;
|
|
26392
26316
|
}
|
|
26393
|
-
var extend = (a, b, thisArg, {
|
|
26394
|
-
|
|
26395
|
-
|
|
26396
|
-
|
|
26397
|
-
|
|
26398
|
-
|
|
26399
|
-
|
|
26400
|
-
|
|
26401
|
-
|
|
26402
|
-
|
|
26403
|
-
|
|
26404
|
-
|
|
26405
|
-
|
|
26406
|
-
|
|
26407
|
-
|
|
26408
|
-
|
|
26409
|
-
|
|
26410
|
-
|
|
26411
|
-
|
|
26412
|
-
|
|
26413
|
-
|
|
26414
|
-
);
|
|
26317
|
+
var extend = (a, b, thisArg, {
|
|
26318
|
+
allOwnKeys
|
|
26319
|
+
} = {}) => {
|
|
26320
|
+
forEach(b, (val, key) => {
|
|
26321
|
+
if (thisArg && isFunction$1(val)) {
|
|
26322
|
+
Object.defineProperty(a, key, {
|
|
26323
|
+
value: bind(val, thisArg),
|
|
26324
|
+
writable: true,
|
|
26325
|
+
enumerable: true,
|
|
26326
|
+
configurable: true
|
|
26327
|
+
});
|
|
26328
|
+
} else {
|
|
26329
|
+
Object.defineProperty(a, key, {
|
|
26330
|
+
value: val,
|
|
26331
|
+
writable: true,
|
|
26332
|
+
enumerable: true,
|
|
26333
|
+
configurable: true
|
|
26334
|
+
});
|
|
26335
|
+
}
|
|
26336
|
+
}, {
|
|
26337
|
+
allOwnKeys
|
|
26338
|
+
});
|
|
26415
26339
|
return a;
|
|
26416
26340
|
};
|
|
26417
26341
|
var stripBOM = (content) => {
|
|
@@ -26502,7 +26426,9 @@ var require_axios = __commonJS({
|
|
|
26502
26426
|
return p1.toUpperCase() + p2;
|
|
26503
26427
|
});
|
|
26504
26428
|
};
|
|
26505
|
-
var hasOwnProperty = (({
|
|
26429
|
+
var hasOwnProperty = (({
|
|
26430
|
+
hasOwnProperty: hasOwnProperty2
|
|
26431
|
+
}) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
26506
26432
|
var isRegExp = kindOfTest("RegExp");
|
|
26507
26433
|
var reduceDescriptors = (obj, reducer) => {
|
|
26508
26434
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -26584,15 +26510,14 @@ var require_axios = __commonJS({
|
|
|
26584
26510
|
return setImmediate;
|
|
26585
26511
|
}
|
|
26586
26512
|
return postMessageSupported ? ((token2, callbacks) => {
|
|
26587
|
-
_global.addEventListener(
|
|
26588
|
-
|
|
26589
|
-
|
|
26590
|
-
|
|
26591
|
-
|
|
26592
|
-
|
|
26593
|
-
}
|
|
26594
|
-
|
|
26595
|
-
);
|
|
26513
|
+
_global.addEventListener("message", ({
|
|
26514
|
+
source,
|
|
26515
|
+
data
|
|
26516
|
+
}) => {
|
|
26517
|
+
if (source === _global && data === token2) {
|
|
26518
|
+
callbacks.length && callbacks.shift()();
|
|
26519
|
+
}
|
|
26520
|
+
}, false);
|
|
26596
26521
|
return (cb) => {
|
|
26597
26522
|
callbacks.push(cb);
|
|
26598
26523
|
_global.postMessage(token2, "*");
|
|
@@ -26735,7 +26660,6 @@ var require_axios = __commonJS({
|
|
|
26735
26660
|
AxiosError.ERR_CANCELED = "ERR_CANCELED";
|
|
26736
26661
|
AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
26737
26662
|
AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
26738
|
-
var AxiosError$1 = AxiosError;
|
|
26739
26663
|
function isVisitable(thing) {
|
|
26740
26664
|
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
26741
26665
|
}
|
|
@@ -26759,19 +26683,14 @@ var require_axios = __commonJS({
|
|
|
26759
26683
|
if (!utils$1.isObject(obj)) {
|
|
26760
26684
|
throw new TypeError("target must be an object");
|
|
26761
26685
|
}
|
|
26762
|
-
formData = formData || new (
|
|
26763
|
-
options = utils$1.toFlatObject(
|
|
26764
|
-
|
|
26765
|
-
|
|
26766
|
-
|
|
26767
|
-
|
|
26768
|
-
|
|
26769
|
-
|
|
26770
|
-
false,
|
|
26771
|
-
function defined(option, source) {
|
|
26772
|
-
return !utils$1.isUndefined(source[option]);
|
|
26773
|
-
}
|
|
26774
|
-
);
|
|
26686
|
+
formData = formData || new (FormData$1 || FormData)();
|
|
26687
|
+
options = utils$1.toFlatObject(options, {
|
|
26688
|
+
metaTokens: true,
|
|
26689
|
+
dots: false,
|
|
26690
|
+
indexes: false
|
|
26691
|
+
}, false, function defined(option, source) {
|
|
26692
|
+
return !utils$1.isUndefined(source[option]);
|
|
26693
|
+
});
|
|
26775
26694
|
const metaTokens = options.metaTokens;
|
|
26776
26695
|
const visitor = options.visitor || defaultVisitor;
|
|
26777
26696
|
const dots = options.dots;
|
|
@@ -26790,7 +26709,7 @@ var require_axios = __commonJS({
|
|
|
26790
26709
|
return value.toString();
|
|
26791
26710
|
}
|
|
26792
26711
|
if (!useBlob && utils$1.isBlob(value)) {
|
|
26793
|
-
throw new AxiosError
|
|
26712
|
+
throw new AxiosError("Blob is not supported. Use a Buffer instead.");
|
|
26794
26713
|
}
|
|
26795
26714
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
26796
26715
|
return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
|
|
@@ -26970,14 +26889,13 @@ var require_axios = __commonJS({
|
|
|
26970
26889
|
});
|
|
26971
26890
|
}
|
|
26972
26891
|
};
|
|
26973
|
-
var InterceptorManager$1 = InterceptorManager;
|
|
26974
26892
|
var transitionalDefaults = {
|
|
26975
26893
|
silentJSONParsing: true,
|
|
26976
26894
|
forcedJSONParsing: true,
|
|
26977
26895
|
clarifyTimeoutError: false,
|
|
26978
26896
|
legacyInterceptorReqResOrdering: true
|
|
26979
26897
|
};
|
|
26980
|
-
var URLSearchParams =
|
|
26898
|
+
var URLSearchParams = url.URLSearchParams;
|
|
26981
26899
|
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
26982
26900
|
var DIGIT = "0123456789";
|
|
26983
26901
|
var ALPHABET = {
|
|
@@ -26987,9 +26905,11 @@ var require_axios = __commonJS({
|
|
|
26987
26905
|
};
|
|
26988
26906
|
var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
26989
26907
|
let str = "";
|
|
26990
|
-
const {
|
|
26908
|
+
const {
|
|
26909
|
+
length
|
|
26910
|
+
} = alphabet;
|
|
26991
26911
|
const randomValues = new Uint32Array(size);
|
|
26992
|
-
|
|
26912
|
+
crypto.randomFillSync(randomValues);
|
|
26993
26913
|
for (let i = 0; i < size; i++) {
|
|
26994
26914
|
str += alphabet[randomValues[i] % length];
|
|
26995
26915
|
}
|
|
@@ -26999,7 +26919,7 @@ var require_axios = __commonJS({
|
|
|
26999
26919
|
isNode: true,
|
|
27000
26920
|
classes: {
|
|
27001
26921
|
URLSearchParams,
|
|
27002
|
-
FormData:
|
|
26922
|
+
FormData: FormData$1,
|
|
27003
26923
|
Blob: typeof Blob !== "undefined" && Blob || null
|
|
27004
26924
|
},
|
|
27005
26925
|
ALPHABET,
|
|
@@ -27017,8 +26937,8 @@ var require_axios = __commonJS({
|
|
|
27017
26937
|
var utils = /* @__PURE__ */ Object.freeze({
|
|
27018
26938
|
__proto__: null,
|
|
27019
26939
|
hasBrowserEnv,
|
|
27020
|
-
hasStandardBrowserWebWorkerEnv,
|
|
27021
26940
|
hasStandardBrowserEnv,
|
|
26941
|
+
hasStandardBrowserWebWorkerEnv,
|
|
27022
26942
|
navigator: _navigator,
|
|
27023
26943
|
origin
|
|
27024
26944
|
});
|
|
@@ -27104,74 +27024,68 @@ var require_axios = __commonJS({
|
|
|
27104
27024
|
var defaults = {
|
|
27105
27025
|
transitional: transitionalDefaults,
|
|
27106
27026
|
adapter: ["xhr", "http", "fetch"],
|
|
27107
|
-
transformRequest: [
|
|
27108
|
-
|
|
27109
|
-
|
|
27110
|
-
|
|
27111
|
-
|
|
27112
|
-
|
|
27113
|
-
|
|
27114
|
-
|
|
27115
|
-
|
|
27116
|
-
|
|
27117
|
-
|
|
27118
|
-
|
|
27119
|
-
|
|
27120
|
-
|
|
27121
|
-
|
|
27122
|
-
|
|
27123
|
-
|
|
27124
|
-
|
|
27125
|
-
|
|
27126
|
-
|
|
27127
|
-
|
|
27128
|
-
|
|
27129
|
-
|
|
27130
|
-
if (
|
|
27131
|
-
|
|
27132
|
-
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
27133
|
-
}
|
|
27134
|
-
if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
27135
|
-
const _FormData = this.env && this.env.FormData;
|
|
27136
|
-
return toFormData(
|
|
27137
|
-
isFileList2 ? { "files[]": data } : data,
|
|
27138
|
-
_FormData && new _FormData(),
|
|
27139
|
-
this.formSerializer
|
|
27140
|
-
);
|
|
27141
|
-
}
|
|
27027
|
+
transformRequest: [function transformRequest(data, headers) {
|
|
27028
|
+
const contentType = headers.getContentType() || "";
|
|
27029
|
+
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
27030
|
+
const isObjectPayload = utils$1.isObject(data);
|
|
27031
|
+
if (isObjectPayload && utils$1.isHTMLForm(data)) {
|
|
27032
|
+
data = new FormData(data);
|
|
27033
|
+
}
|
|
27034
|
+
const isFormData2 = utils$1.isFormData(data);
|
|
27035
|
+
if (isFormData2) {
|
|
27036
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
27037
|
+
}
|
|
27038
|
+
if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
|
|
27039
|
+
return data;
|
|
27040
|
+
}
|
|
27041
|
+
if (utils$1.isArrayBufferView(data)) {
|
|
27042
|
+
return data.buffer;
|
|
27043
|
+
}
|
|
27044
|
+
if (utils$1.isURLSearchParams(data)) {
|
|
27045
|
+
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
27046
|
+
return data.toString();
|
|
27047
|
+
}
|
|
27048
|
+
let isFileList2;
|
|
27049
|
+
if (isObjectPayload) {
|
|
27050
|
+
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
27051
|
+
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
27142
27052
|
}
|
|
27143
|
-
if (
|
|
27144
|
-
|
|
27145
|
-
return
|
|
27053
|
+
if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
27054
|
+
const _FormData = this.env && this.env.FormData;
|
|
27055
|
+
return toFormData(isFileList2 ? {
|
|
27056
|
+
"files[]": data
|
|
27057
|
+
} : data, _FormData && new _FormData(), this.formSerializer);
|
|
27146
27058
|
}
|
|
27059
|
+
}
|
|
27060
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
27061
|
+
headers.setContentType("application/json", false);
|
|
27062
|
+
return stringifySafely(data);
|
|
27063
|
+
}
|
|
27064
|
+
return data;
|
|
27065
|
+
}],
|
|
27066
|
+
transformResponse: [function transformResponse(data) {
|
|
27067
|
+
const transitional = this.transitional || defaults.transitional;
|
|
27068
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
27069
|
+
const JSONRequested = this.responseType === "json";
|
|
27070
|
+
if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
|
|
27147
27071
|
return data;
|
|
27148
27072
|
}
|
|
27149
|
-
|
|
27150
|
-
|
|
27151
|
-
|
|
27152
|
-
|
|
27153
|
-
|
|
27154
|
-
|
|
27155
|
-
|
|
27156
|
-
|
|
27157
|
-
|
|
27158
|
-
if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
27159
|
-
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
27160
|
-
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
27161
|
-
try {
|
|
27162
|
-
return JSON.parse(data, this.parseReviver);
|
|
27163
|
-
} catch (e) {
|
|
27164
|
-
if (strictJSONParsing) {
|
|
27165
|
-
if (e.name === "SyntaxError") {
|
|
27166
|
-
throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
|
|
27167
|
-
}
|
|
27168
|
-
throw e;
|
|
27073
|
+
if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
27074
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
27075
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
27076
|
+
try {
|
|
27077
|
+
return JSON.parse(data, this.parseReviver);
|
|
27078
|
+
} catch (e) {
|
|
27079
|
+
if (strictJSONParsing) {
|
|
27080
|
+
if (e.name === "SyntaxError") {
|
|
27081
|
+
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
27169
27082
|
}
|
|
27083
|
+
throw e;
|
|
27170
27084
|
}
|
|
27171
27085
|
}
|
|
27172
|
-
return data;
|
|
27173
27086
|
}
|
|
27174
|
-
|
|
27087
|
+
return data;
|
|
27088
|
+
}],
|
|
27175
27089
|
/**
|
|
27176
27090
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
27177
27091
|
* timeout is not created.
|
|
@@ -27198,26 +27112,7 @@ var require_axios = __commonJS({
|
|
|
27198
27112
|
utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
|
|
27199
27113
|
defaults.headers[method] = {};
|
|
27200
27114
|
});
|
|
27201
|
-
var
|
|
27202
|
-
var ignoreDuplicateOf = utils$1.toObjectSet([
|
|
27203
|
-
"age",
|
|
27204
|
-
"authorization",
|
|
27205
|
-
"content-length",
|
|
27206
|
-
"content-type",
|
|
27207
|
-
"etag",
|
|
27208
|
-
"expires",
|
|
27209
|
-
"from",
|
|
27210
|
-
"host",
|
|
27211
|
-
"if-modified-since",
|
|
27212
|
-
"if-unmodified-since",
|
|
27213
|
-
"last-modified",
|
|
27214
|
-
"location",
|
|
27215
|
-
"max-forwards",
|
|
27216
|
-
"proxy-authorization",
|
|
27217
|
-
"referer",
|
|
27218
|
-
"retry-after",
|
|
27219
|
-
"user-agent"
|
|
27220
|
-
]);
|
|
27115
|
+
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"]);
|
|
27221
27116
|
var parseHeaders = (rawHeaders) => {
|
|
27222
27117
|
const parsed = {};
|
|
27223
27118
|
let key;
|
|
@@ -27250,7 +27145,7 @@ var require_axios = __commonJS({
|
|
|
27250
27145
|
if (value === false || value == null) {
|
|
27251
27146
|
return value;
|
|
27252
27147
|
}
|
|
27253
|
-
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
27148
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value).replace(/[\r\n]+$/, "");
|
|
27254
27149
|
}
|
|
27255
27150
|
function parseTokens(str) {
|
|
27256
27151
|
const tokens = /* @__PURE__ */ Object.create(null);
|
|
@@ -27457,15 +27352,10 @@ var require_axios = __commonJS({
|
|
|
27457
27352
|
return this;
|
|
27458
27353
|
}
|
|
27459
27354
|
};
|
|
27460
|
-
AxiosHeaders.accessor([
|
|
27461
|
-
|
|
27462
|
-
|
|
27463
|
-
|
|
27464
|
-
"Accept-Encoding",
|
|
27465
|
-
"User-Agent",
|
|
27466
|
-
"Authorization"
|
|
27467
|
-
]);
|
|
27468
|
-
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
27355
|
+
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
27356
|
+
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({
|
|
27357
|
+
value
|
|
27358
|
+
}, key) => {
|
|
27469
27359
|
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
27470
27360
|
return {
|
|
27471
27361
|
get: () => value,
|
|
@@ -27475,11 +27365,10 @@ var require_axios = __commonJS({
|
|
|
27475
27365
|
};
|
|
27476
27366
|
});
|
|
27477
27367
|
utils$1.freezeMethods(AxiosHeaders);
|
|
27478
|
-
var AxiosHeaders$1 = AxiosHeaders;
|
|
27479
27368
|
function transformData(fns, response) {
|
|
27480
|
-
const config = this || defaults
|
|
27369
|
+
const config = this || defaults;
|
|
27481
27370
|
const context = response || config;
|
|
27482
|
-
const headers = AxiosHeaders
|
|
27371
|
+
const headers = AxiosHeaders.from(context.headers);
|
|
27483
27372
|
let data = context.data;
|
|
27484
27373
|
utils$1.forEach(fns, function transform(fn) {
|
|
27485
27374
|
data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
|
|
@@ -27490,7 +27379,7 @@ var require_axios = __commonJS({
|
|
|
27490
27379
|
function isCancel(value) {
|
|
27491
27380
|
return !!(value && value.__CANCEL__);
|
|
27492
27381
|
}
|
|
27493
|
-
var CanceledError = class extends AxiosError
|
|
27382
|
+
var CanceledError = class extends AxiosError {
|
|
27494
27383
|
/**
|
|
27495
27384
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
27496
27385
|
*
|
|
@@ -27501,26 +27390,17 @@ var require_axios = __commonJS({
|
|
|
27501
27390
|
* @returns {CanceledError} The created error.
|
|
27502
27391
|
*/
|
|
27503
27392
|
constructor(message, config, request) {
|
|
27504
|
-
super(message == null ? "canceled" : message, AxiosError
|
|
27393
|
+
super(message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request);
|
|
27505
27394
|
this.name = "CanceledError";
|
|
27506
27395
|
this.__CANCEL__ = true;
|
|
27507
27396
|
}
|
|
27508
27397
|
};
|
|
27509
|
-
var CanceledError$1 = CanceledError;
|
|
27510
27398
|
function settle(resolve, reject, response) {
|
|
27511
27399
|
const validateStatus = response.config.validateStatus;
|
|
27512
27400
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
27513
27401
|
resolve(response);
|
|
27514
27402
|
} else {
|
|
27515
|
-
reject(
|
|
27516
|
-
new AxiosError$1(
|
|
27517
|
-
"Request failed with status code " + response.status,
|
|
27518
|
-
[AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
27519
|
-
response.config,
|
|
27520
|
-
response.request,
|
|
27521
|
-
response
|
|
27522
|
-
)
|
|
27523
|
-
);
|
|
27403
|
+
reject(new AxiosError("Request failed with status code " + response.status, [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
|
|
27524
27404
|
}
|
|
27525
27405
|
}
|
|
27526
27406
|
function isAbsoluteURL(url2) {
|
|
@@ -27539,7 +27419,72 @@ var require_axios = __commonJS({
|
|
|
27539
27419
|
}
|
|
27540
27420
|
return requestedURL;
|
|
27541
27421
|
}
|
|
27542
|
-
var
|
|
27422
|
+
var DEFAULT_PORTS = {
|
|
27423
|
+
ftp: 21,
|
|
27424
|
+
gopher: 70,
|
|
27425
|
+
http: 80,
|
|
27426
|
+
https: 443,
|
|
27427
|
+
ws: 80,
|
|
27428
|
+
wss: 443
|
|
27429
|
+
};
|
|
27430
|
+
function parseUrl(urlString) {
|
|
27431
|
+
try {
|
|
27432
|
+
return new URL(urlString);
|
|
27433
|
+
} catch {
|
|
27434
|
+
return null;
|
|
27435
|
+
}
|
|
27436
|
+
}
|
|
27437
|
+
function getProxyForUrl(url2) {
|
|
27438
|
+
var parsedUrl = (typeof url2 === "string" ? parseUrl(url2) : url2) || {};
|
|
27439
|
+
var proto = parsedUrl.protocol;
|
|
27440
|
+
var hostname = parsedUrl.host;
|
|
27441
|
+
var port = parsedUrl.port;
|
|
27442
|
+
if (typeof hostname !== "string" || !hostname || typeof proto !== "string") {
|
|
27443
|
+
return "";
|
|
27444
|
+
}
|
|
27445
|
+
proto = proto.split(":", 1)[0];
|
|
27446
|
+
hostname = hostname.replace(/:\d*$/, "");
|
|
27447
|
+
port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
|
|
27448
|
+
if (!shouldProxy(hostname, port)) {
|
|
27449
|
+
return "";
|
|
27450
|
+
}
|
|
27451
|
+
var proxy = getEnv(proto + "_proxy") || getEnv("all_proxy");
|
|
27452
|
+
if (proxy && proxy.indexOf("://") === -1) {
|
|
27453
|
+
proxy = proto + "://" + proxy;
|
|
27454
|
+
}
|
|
27455
|
+
return proxy;
|
|
27456
|
+
}
|
|
27457
|
+
function shouldProxy(hostname, port) {
|
|
27458
|
+
var NO_PROXY = getEnv("no_proxy").toLowerCase();
|
|
27459
|
+
if (!NO_PROXY) {
|
|
27460
|
+
return true;
|
|
27461
|
+
}
|
|
27462
|
+
if (NO_PROXY === "*") {
|
|
27463
|
+
return false;
|
|
27464
|
+
}
|
|
27465
|
+
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
|
|
27466
|
+
if (!proxy) {
|
|
27467
|
+
return true;
|
|
27468
|
+
}
|
|
27469
|
+
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
|
|
27470
|
+
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
|
|
27471
|
+
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
|
|
27472
|
+
if (parsedProxyPort && parsedProxyPort !== port) {
|
|
27473
|
+
return true;
|
|
27474
|
+
}
|
|
27475
|
+
if (!/^[.*]/.test(parsedProxyHostname)) {
|
|
27476
|
+
return hostname !== parsedProxyHostname;
|
|
27477
|
+
}
|
|
27478
|
+
if (parsedProxyHostname.charAt(0) === "*") {
|
|
27479
|
+
parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
27480
|
+
}
|
|
27481
|
+
return !hostname.endsWith(parsedProxyHostname);
|
|
27482
|
+
});
|
|
27483
|
+
}
|
|
27484
|
+
function getEnv(key) {
|
|
27485
|
+
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
27486
|
+
}
|
|
27487
|
+
var VERSION2 = "1.14.0";
|
|
27543
27488
|
function parseProtocol(url2) {
|
|
27544
27489
|
const match2 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
|
|
27545
27490
|
return match2 && match2[1] || "";
|
|
@@ -27555,7 +27500,7 @@ var require_axios = __commonJS({
|
|
|
27555
27500
|
uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
|
|
27556
27501
|
const match2 = DATA_URL_PATTERN.exec(uri);
|
|
27557
27502
|
if (!match2) {
|
|
27558
|
-
throw new AxiosError
|
|
27503
|
+
throw new AxiosError("Invalid URL", AxiosError.ERR_INVALID_URL);
|
|
27559
27504
|
}
|
|
27560
27505
|
const mime = match2[1];
|
|
27561
27506
|
const isBase64 = match2[2];
|
|
@@ -27563,32 +27508,29 @@ var require_axios = __commonJS({
|
|
|
27563
27508
|
const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? "base64" : "utf8");
|
|
27564
27509
|
if (asBlob) {
|
|
27565
27510
|
if (!_Blob) {
|
|
27566
|
-
throw new AxiosError
|
|
27511
|
+
throw new AxiosError("Blob is not supported", AxiosError.ERR_NOT_SUPPORT);
|
|
27567
27512
|
}
|
|
27568
|
-
return new _Blob([buffer], {
|
|
27513
|
+
return new _Blob([buffer], {
|
|
27514
|
+
type: mime
|
|
27515
|
+
});
|
|
27569
27516
|
}
|
|
27570
27517
|
return buffer;
|
|
27571
27518
|
}
|
|
27572
|
-
throw new AxiosError
|
|
27519
|
+
throw new AxiosError("Unsupported protocol " + protocol, AxiosError.ERR_NOT_SUPPORT);
|
|
27573
27520
|
}
|
|
27574
27521
|
var kInternals = /* @__PURE__ */ Symbol("internals");
|
|
27575
|
-
var AxiosTransformStream = class extends
|
|
27522
|
+
var AxiosTransformStream = class extends stream.Transform {
|
|
27576
27523
|
constructor(options) {
|
|
27577
|
-
options = utils$1.toFlatObject(
|
|
27578
|
-
|
|
27579
|
-
|
|
27580
|
-
|
|
27581
|
-
|
|
27582
|
-
|
|
27583
|
-
|
|
27584
|
-
|
|
27585
|
-
|
|
27586
|
-
|
|
27587
|
-
null,
|
|
27588
|
-
(prop, source) => {
|
|
27589
|
-
return !utils$1.isUndefined(source[prop]);
|
|
27590
|
-
}
|
|
27591
|
-
);
|
|
27524
|
+
options = utils$1.toFlatObject(options, {
|
|
27525
|
+
maxRate: 0,
|
|
27526
|
+
chunkSize: 64 * 1024,
|
|
27527
|
+
minChunkSize: 100,
|
|
27528
|
+
timeWindow: 500,
|
|
27529
|
+
ticksRate: 2,
|
|
27530
|
+
samplesCount: 15
|
|
27531
|
+
}, null, (prop, source) => {
|
|
27532
|
+
return !utils$1.isUndefined(source[prop]);
|
|
27533
|
+
});
|
|
27592
27534
|
super({
|
|
27593
27535
|
readableHighWaterMark: options.chunkSize
|
|
27594
27536
|
});
|
|
@@ -27671,12 +27613,9 @@ var require_axios = __commonJS({
|
|
|
27671
27613
|
chunkRemainder = _chunk.subarray(maxChunkSize);
|
|
27672
27614
|
_chunk = _chunk.subarray(0, maxChunkSize);
|
|
27673
27615
|
}
|
|
27674
|
-
pushChunk(
|
|
27675
|
-
|
|
27676
|
-
|
|
27677
|
-
process.nextTick(_callback, null, chunkRemainder);
|
|
27678
|
-
} : _callback
|
|
27679
|
-
);
|
|
27616
|
+
pushChunk(_chunk, chunkRemainder ? () => {
|
|
27617
|
+
process.nextTick(_callback, null, chunkRemainder);
|
|
27618
|
+
} : _callback);
|
|
27680
27619
|
};
|
|
27681
27620
|
transformChunk(chunk, function transformNextChunk(err, _chunk) {
|
|
27682
27621
|
if (err) {
|
|
@@ -27690,8 +27629,9 @@ var require_axios = __commonJS({
|
|
|
27690
27629
|
});
|
|
27691
27630
|
}
|
|
27692
27631
|
};
|
|
27693
|
-
var
|
|
27694
|
-
|
|
27632
|
+
var {
|
|
27633
|
+
asyncIterator
|
|
27634
|
+
} = Symbol;
|
|
27695
27635
|
var readBlob = async function* (blob) {
|
|
27696
27636
|
if (blob.stream) {
|
|
27697
27637
|
yield* blob.stream();
|
|
@@ -27703,15 +27643,16 @@ var require_axios = __commonJS({
|
|
|
27703
27643
|
yield blob;
|
|
27704
27644
|
}
|
|
27705
27645
|
};
|
|
27706
|
-
var readBlob$1 = readBlob;
|
|
27707
27646
|
var BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + "-_";
|
|
27708
|
-
var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new
|
|
27647
|
+
var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder();
|
|
27709
27648
|
var CRLF = "\r\n";
|
|
27710
27649
|
var CRLF_BYTES = textEncoder.encode(CRLF);
|
|
27711
27650
|
var CRLF_BYTES_COUNT = 2;
|
|
27712
27651
|
var FormDataPart = class {
|
|
27713
27652
|
constructor(name, value) {
|
|
27714
|
-
const {
|
|
27653
|
+
const {
|
|
27654
|
+
escapeName
|
|
27655
|
+
} = this.constructor;
|
|
27715
27656
|
const isStringValue = utils$1.isString(value);
|
|
27716
27657
|
let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`;
|
|
27717
27658
|
if (isStringValue) {
|
|
@@ -27727,23 +27668,22 @@ var require_axios = __commonJS({
|
|
|
27727
27668
|
}
|
|
27728
27669
|
async *encode() {
|
|
27729
27670
|
yield this.headers;
|
|
27730
|
-
const {
|
|
27671
|
+
const {
|
|
27672
|
+
value
|
|
27673
|
+
} = this;
|
|
27731
27674
|
if (utils$1.isTypedArray(value)) {
|
|
27732
27675
|
yield value;
|
|
27733
27676
|
} else {
|
|
27734
|
-
yield* readBlob
|
|
27677
|
+
yield* readBlob(value);
|
|
27735
27678
|
}
|
|
27736
27679
|
yield CRLF_BYTES;
|
|
27737
27680
|
}
|
|
27738
27681
|
static escapeName(name) {
|
|
27739
|
-
return String(name).replace(
|
|
27740
|
-
|
|
27741
|
-
|
|
27742
|
-
|
|
27743
|
-
|
|
27744
|
-
'"': "%22"
|
|
27745
|
-
})[match2]
|
|
27746
|
-
);
|
|
27682
|
+
return String(name).replace(/[\r\n"]/g, (match2) => ({
|
|
27683
|
+
"\r": "%0D",
|
|
27684
|
+
"\n": "%0A",
|
|
27685
|
+
'"': "%22"
|
|
27686
|
+
})[match2]);
|
|
27747
27687
|
}
|
|
27748
27688
|
};
|
|
27749
27689
|
var formDataToStream = (form, headersHandler, options) => {
|
|
@@ -27775,18 +27715,15 @@ var require_axios = __commonJS({
|
|
|
27775
27715
|
computedHeaders["Content-Length"] = contentLength;
|
|
27776
27716
|
}
|
|
27777
27717
|
headersHandler && headersHandler(computedHeaders);
|
|
27778
|
-
return stream.Readable.from(
|
|
27779
|
-
(
|
|
27780
|
-
|
|
27781
|
-
|
|
27782
|
-
|
|
27783
|
-
|
|
27784
|
-
|
|
27785
|
-
})()
|
|
27786
|
-
);
|
|
27718
|
+
return stream.Readable.from((async function* () {
|
|
27719
|
+
for (const part of parts) {
|
|
27720
|
+
yield boundaryBytes;
|
|
27721
|
+
yield* part.encode();
|
|
27722
|
+
}
|
|
27723
|
+
yield footerBytes;
|
|
27724
|
+
})());
|
|
27787
27725
|
};
|
|
27788
|
-
var
|
|
27789
|
-
var ZlibHeaderTransformStream = class extends stream__default["default"].Transform {
|
|
27726
|
+
var ZlibHeaderTransformStream = class extends stream.Transform {
|
|
27790
27727
|
__transform(chunk, encoding, callback) {
|
|
27791
27728
|
this.push(chunk);
|
|
27792
27729
|
callback();
|
|
@@ -27804,7 +27741,6 @@ var require_axios = __commonJS({
|
|
|
27804
27741
|
this.__transform(chunk, encoding, callback);
|
|
27805
27742
|
}
|
|
27806
27743
|
};
|
|
27807
|
-
var ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream;
|
|
27808
27744
|
var callbackify = (fn, reducer) => {
|
|
27809
27745
|
return utils$1.isAsyncFn(fn) ? function(...args) {
|
|
27810
27746
|
const cb = args.pop();
|
|
@@ -27817,7 +27753,6 @@ var require_axios = __commonJS({
|
|
|
27817
27753
|
}, cb);
|
|
27818
27754
|
} : fn;
|
|
27819
27755
|
};
|
|
27820
|
-
var callbackify$1 = callbackify;
|
|
27821
27756
|
function speedometer(samplesCount, min) {
|
|
27822
27757
|
samplesCount = samplesCount || 10;
|
|
27823
27758
|
const bytes = new Array(samplesCount);
|
|
@@ -27909,14 +27844,11 @@ var require_axios = __commonJS({
|
|
|
27909
27844
|
};
|
|
27910
27845
|
var progressEventDecorator = (total, throttled) => {
|
|
27911
27846
|
const lengthComputable = total != null;
|
|
27912
|
-
return [
|
|
27913
|
-
|
|
27914
|
-
|
|
27915
|
-
|
|
27916
|
-
|
|
27917
|
-
}),
|
|
27918
|
-
throttled[1]
|
|
27919
|
-
];
|
|
27847
|
+
return [(loaded) => throttled[0]({
|
|
27848
|
+
lengthComputable,
|
|
27849
|
+
total,
|
|
27850
|
+
loaded
|
|
27851
|
+
}), throttled[1]];
|
|
27920
27852
|
};
|
|
27921
27853
|
var asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
|
|
27922
27854
|
function estimateDataURLDecodedBytes(url2) {
|
|
@@ -27969,15 +27901,18 @@ var require_axios = __commonJS({
|
|
|
27969
27901
|
return Buffer.byteLength(body, "utf8");
|
|
27970
27902
|
}
|
|
27971
27903
|
var zlibOptions = {
|
|
27972
|
-
flush:
|
|
27973
|
-
finishFlush:
|
|
27904
|
+
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
27905
|
+
finishFlush: zlib.constants.Z_SYNC_FLUSH
|
|
27974
27906
|
};
|
|
27975
27907
|
var brotliOptions = {
|
|
27976
|
-
flush:
|
|
27977
|
-
finishFlush:
|
|
27908
|
+
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
|
27909
|
+
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
|
27978
27910
|
};
|
|
27979
|
-
var isBrotliSupported = utils$1.isFunction(
|
|
27980
|
-
var {
|
|
27911
|
+
var isBrotliSupported = utils$1.isFunction(zlib.createBrotliDecompress);
|
|
27912
|
+
var {
|
|
27913
|
+
http: httpFollow,
|
|
27914
|
+
https: httpsFollow
|
|
27915
|
+
} = followRedirects;
|
|
27981
27916
|
var isHttps = /https:?/;
|
|
27982
27917
|
var supportedProtocols = platform.protocols.map((protocol) => {
|
|
27983
27918
|
return protocol + ":";
|
|
@@ -27991,23 +27926,20 @@ var require_axios = __commonJS({
|
|
|
27991
27926
|
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
27992
27927
|
}
|
|
27993
27928
|
getSession(authority, options) {
|
|
27994
|
-
options = Object.assign(
|
|
27995
|
-
|
|
27996
|
-
|
|
27997
|
-
},
|
|
27998
|
-
options
|
|
27999
|
-
);
|
|
27929
|
+
options = Object.assign({
|
|
27930
|
+
sessionTimeout: 1e3
|
|
27931
|
+
}, options);
|
|
28000
27932
|
let authoritySessions = this.sessions[authority];
|
|
28001
27933
|
if (authoritySessions) {
|
|
28002
27934
|
let len = authoritySessions.length;
|
|
28003
27935
|
for (let i = 0; i < len; i++) {
|
|
28004
27936
|
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
28005
|
-
if (!sessionHandle.destroyed && !sessionHandle.closed &&
|
|
27937
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) {
|
|
28006
27938
|
return sessionHandle;
|
|
28007
27939
|
}
|
|
28008
27940
|
}
|
|
28009
27941
|
}
|
|
28010
|
-
const session =
|
|
27942
|
+
const session = http2.connect(authority, options);
|
|
28011
27943
|
let removed;
|
|
28012
27944
|
const removeSession = () => {
|
|
28013
27945
|
if (removed) {
|
|
@@ -28022,12 +27954,17 @@ var require_axios = __commonJS({
|
|
|
28022
27954
|
} else {
|
|
28023
27955
|
entries.splice(i, 1);
|
|
28024
27956
|
}
|
|
27957
|
+
if (!session.closed) {
|
|
27958
|
+
session.close();
|
|
27959
|
+
}
|
|
28025
27960
|
return;
|
|
28026
27961
|
}
|
|
28027
27962
|
}
|
|
28028
27963
|
};
|
|
28029
27964
|
const originalRequestFn = session.request;
|
|
28030
|
-
const {
|
|
27965
|
+
const {
|
|
27966
|
+
sessionTimeout
|
|
27967
|
+
} = options;
|
|
28031
27968
|
if (sessionTimeout != null) {
|
|
28032
27969
|
let timer;
|
|
28033
27970
|
let streamsCount = 0;
|
|
@@ -28067,7 +28004,7 @@ var require_axios = __commonJS({
|
|
|
28067
28004
|
function setProxy(options, configProxy, location) {
|
|
28068
28005
|
let proxy = configProxy;
|
|
28069
28006
|
if (!proxy && proxy !== false) {
|
|
28070
|
-
const proxyUrl =
|
|
28007
|
+
const proxyUrl = getProxyForUrl(location);
|
|
28071
28008
|
if (proxyUrl) {
|
|
28072
28009
|
proxy = new URL(proxyUrl);
|
|
28073
28010
|
}
|
|
@@ -28081,7 +28018,9 @@ var require_axios = __commonJS({
|
|
|
28081
28018
|
if (validProxyAuth) {
|
|
28082
28019
|
proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
|
|
28083
28020
|
} else if (typeof proxy.auth === "object") {
|
|
28084
|
-
throw new AxiosError
|
|
28021
|
+
throw new AxiosError("Invalid proxy authorization", AxiosError.ERR_BAD_OPTION, {
|
|
28022
|
+
proxy
|
|
28023
|
+
});
|
|
28085
28024
|
}
|
|
28086
28025
|
const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
|
|
28087
28026
|
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
@@ -28121,7 +28060,10 @@ var require_axios = __commonJS({
|
|
|
28121
28060
|
asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject);
|
|
28122
28061
|
});
|
|
28123
28062
|
};
|
|
28124
|
-
var resolveFamily = ({
|
|
28063
|
+
var resolveFamily = ({
|
|
28064
|
+
address,
|
|
28065
|
+
family
|
|
28066
|
+
}) => {
|
|
28125
28067
|
if (!utils$1.isString(address)) {
|
|
28126
28068
|
throw TypeError("address must be a string");
|
|
28127
28069
|
}
|
|
@@ -28130,13 +28072,24 @@ var require_axios = __commonJS({
|
|
|
28130
28072
|
family: family || (address.indexOf(".") < 0 ? 6 : 4)
|
|
28131
28073
|
};
|
|
28132
28074
|
};
|
|
28133
|
-
var buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : {
|
|
28075
|
+
var buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : {
|
|
28076
|
+
address,
|
|
28077
|
+
family
|
|
28078
|
+
});
|
|
28134
28079
|
var http2Transport = {
|
|
28135
28080
|
request(options, cb) {
|
|
28136
28081
|
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
|
|
28137
|
-
const {
|
|
28082
|
+
const {
|
|
28083
|
+
http2Options,
|
|
28084
|
+
headers
|
|
28085
|
+
} = options;
|
|
28138
28086
|
const session = http2Sessions.getSession(authority, http2Options);
|
|
28139
|
-
const {
|
|
28087
|
+
const {
|
|
28088
|
+
HTTP2_HEADER_SCHEME,
|
|
28089
|
+
HTTP2_HEADER_METHOD,
|
|
28090
|
+
HTTP2_HEADER_PATH,
|
|
28091
|
+
HTTP2_HEADER_STATUS
|
|
28092
|
+
} = http2.constants;
|
|
28140
28093
|
const http2Headers = {
|
|
28141
28094
|
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
28142
28095
|
[HTTP2_HEADER_METHOD]: options.method,
|
|
@@ -28160,8 +28113,17 @@ var require_axios = __commonJS({
|
|
|
28160
28113
|
};
|
|
28161
28114
|
var httpAdapter = isHttpAdapterSupported && function httpAdapter2(config) {
|
|
28162
28115
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
28163
|
-
let {
|
|
28164
|
-
|
|
28116
|
+
let {
|
|
28117
|
+
data,
|
|
28118
|
+
lookup,
|
|
28119
|
+
family,
|
|
28120
|
+
httpVersion = 1,
|
|
28121
|
+
http2Options
|
|
28122
|
+
} = config;
|
|
28123
|
+
const {
|
|
28124
|
+
responseType,
|
|
28125
|
+
responseEncoding
|
|
28126
|
+
} = config;
|
|
28165
28127
|
const method = config.method.toUpperCase();
|
|
28166
28128
|
let isDone;
|
|
28167
28129
|
let rejected = false;
|
|
@@ -28175,7 +28137,7 @@ var require_axios = __commonJS({
|
|
|
28175
28137
|
}
|
|
28176
28138
|
const isHttp2 = httpVersion === 2;
|
|
28177
28139
|
if (lookup) {
|
|
28178
|
-
const _lookup = callbackify
|
|
28140
|
+
const _lookup = callbackify(lookup, (value) => utils$1.isArray(value) ? value : [value]);
|
|
28179
28141
|
lookup = (hostname, opt, cb) => {
|
|
28180
28142
|
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
28181
28143
|
if (err) {
|
|
@@ -28189,10 +28151,7 @@ var require_axios = __commonJS({
|
|
|
28189
28151
|
const abortEmitter = new events.EventEmitter();
|
|
28190
28152
|
function abort(reason) {
|
|
28191
28153
|
try {
|
|
28192
|
-
abortEmitter.emit(
|
|
28193
|
-
"abort",
|
|
28194
|
-
!reason || reason.type ? new CanceledError$1(null, config, req) : reason
|
|
28195
|
-
);
|
|
28154
|
+
abortEmitter.emit("abort", !reason || reason.type ? new CanceledError(null, config, req) : reason);
|
|
28196
28155
|
} catch (err) {
|
|
28197
28156
|
console.warn("emit error", err);
|
|
28198
28157
|
}
|
|
@@ -28220,9 +28179,11 @@ var require_axios = __commonJS({
|
|
|
28220
28179
|
onFinished();
|
|
28221
28180
|
return;
|
|
28222
28181
|
}
|
|
28223
|
-
const {
|
|
28224
|
-
|
|
28225
|
-
|
|
28182
|
+
const {
|
|
28183
|
+
data: data2
|
|
28184
|
+
} = response;
|
|
28185
|
+
if (data2 instanceof stream.Readable || data2 instanceof stream.Duplex) {
|
|
28186
|
+
const offListeners = stream.finished(data2, () => {
|
|
28226
28187
|
offListeners();
|
|
28227
28188
|
onFinished();
|
|
28228
28189
|
});
|
|
@@ -28238,13 +28199,7 @@ var require_axios = __commonJS({
|
|
|
28238
28199
|
const dataUrl = String(config.url || fullPath || "");
|
|
28239
28200
|
const estimated = estimateDataURLDecodedBytes(dataUrl);
|
|
28240
28201
|
if (estimated > config.maxContentLength) {
|
|
28241
|
-
return reject(
|
|
28242
|
-
new AxiosError$1(
|
|
28243
|
-
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
28244
|
-
AxiosError$1.ERR_BAD_RESPONSE,
|
|
28245
|
-
config
|
|
28246
|
-
)
|
|
28247
|
-
);
|
|
28202
|
+
return reject(new AxiosError("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config));
|
|
28248
28203
|
}
|
|
28249
28204
|
}
|
|
28250
28205
|
let convertedData;
|
|
@@ -28261,7 +28216,7 @@ var require_axios = __commonJS({
|
|
|
28261
28216
|
Blob: config.env && config.env.Blob
|
|
28262
28217
|
});
|
|
28263
28218
|
} catch (err) {
|
|
28264
|
-
throw AxiosError
|
|
28219
|
+
throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);
|
|
28265
28220
|
}
|
|
28266
28221
|
if (responseType === "text") {
|
|
28267
28222
|
convertedData = convertedData.toString(responseEncoding);
|
|
@@ -28269,44 +28224,41 @@ var require_axios = __commonJS({
|
|
|
28269
28224
|
convertedData = utils$1.stripBOM(convertedData);
|
|
28270
28225
|
}
|
|
28271
28226
|
} else if (responseType === "stream") {
|
|
28272
|
-
convertedData =
|
|
28227
|
+
convertedData = stream.Readable.from(convertedData);
|
|
28273
28228
|
}
|
|
28274
28229
|
return settle(resolve, reject, {
|
|
28275
28230
|
data: convertedData,
|
|
28276
28231
|
status: 200,
|
|
28277
28232
|
statusText: "OK",
|
|
28278
|
-
headers: new AxiosHeaders
|
|
28233
|
+
headers: new AxiosHeaders(),
|
|
28279
28234
|
config
|
|
28280
28235
|
});
|
|
28281
28236
|
}
|
|
28282
28237
|
if (supportedProtocols.indexOf(protocol) === -1) {
|
|
28283
|
-
return reject(
|
|
28284
|
-
new AxiosError$1("Unsupported protocol " + protocol, AxiosError$1.ERR_BAD_REQUEST, config)
|
|
28285
|
-
);
|
|
28238
|
+
return reject(new AxiosError("Unsupported protocol " + protocol, AxiosError.ERR_BAD_REQUEST, config));
|
|
28286
28239
|
}
|
|
28287
|
-
const headers = AxiosHeaders
|
|
28240
|
+
const headers = AxiosHeaders.from(config.headers).normalize();
|
|
28288
28241
|
headers.set("User-Agent", "axios/" + VERSION2, false);
|
|
28289
|
-
const {
|
|
28242
|
+
const {
|
|
28243
|
+
onUploadProgress,
|
|
28244
|
+
onDownloadProgress
|
|
28245
|
+
} = config;
|
|
28290
28246
|
const maxRate = config.maxRate;
|
|
28291
28247
|
let maxUploadRate = void 0;
|
|
28292
28248
|
let maxDownloadRate = void 0;
|
|
28293
28249
|
if (utils$1.isSpecCompliantForm(data)) {
|
|
28294
28250
|
const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
|
|
28295
|
-
data = formDataToStream
|
|
28296
|
-
|
|
28297
|
-
|
|
28298
|
-
|
|
28299
|
-
|
|
28300
|
-
|
|
28301
|
-
tag: `axios-${VERSION2}-boundary`,
|
|
28302
|
-
boundary: userBoundary && userBoundary[1] || void 0
|
|
28303
|
-
}
|
|
28304
|
-
);
|
|
28251
|
+
data = formDataToStream(data, (formHeaders) => {
|
|
28252
|
+
headers.set(formHeaders);
|
|
28253
|
+
}, {
|
|
28254
|
+
tag: `axios-${VERSION2}-boundary`,
|
|
28255
|
+
boundary: userBoundary && userBoundary[1] || void 0
|
|
28256
|
+
});
|
|
28305
28257
|
} else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) {
|
|
28306
28258
|
headers.set(data.getHeaders());
|
|
28307
28259
|
if (!headers.hasContentLength()) {
|
|
28308
28260
|
try {
|
|
28309
|
-
const knownLength = await
|
|
28261
|
+
const knownLength = await util.promisify(data.getLength).call(data);
|
|
28310
28262
|
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
|
|
28311
28263
|
} catch (e) {
|
|
28312
28264
|
}
|
|
@@ -28314,7 +28266,7 @@ var require_axios = __commonJS({
|
|
|
28314
28266
|
} else if (utils$1.isBlob(data) || utils$1.isFile(data)) {
|
|
28315
28267
|
data.size && headers.setContentType(data.type || "application/octet-stream");
|
|
28316
28268
|
headers.setContentLength(data.size || 0);
|
|
28317
|
-
data =
|
|
28269
|
+
data = stream.Readable.from(readBlob(data));
|
|
28318
28270
|
} else if (data && !utils$1.isStream(data)) {
|
|
28319
28271
|
if (Buffer.isBuffer(data)) ;
|
|
28320
28272
|
else if (utils$1.isArrayBuffer(data)) {
|
|
@@ -28322,23 +28274,11 @@ var require_axios = __commonJS({
|
|
|
28322
28274
|
} else if (utils$1.isString(data)) {
|
|
28323
28275
|
data = Buffer.from(data, "utf-8");
|
|
28324
28276
|
} else {
|
|
28325
|
-
return reject(
|
|
28326
|
-
new AxiosError$1(
|
|
28327
|
-
"Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
|
|
28328
|
-
AxiosError$1.ERR_BAD_REQUEST,
|
|
28329
|
-
config
|
|
28330
|
-
)
|
|
28331
|
-
);
|
|
28277
|
+
return reject(new AxiosError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError.ERR_BAD_REQUEST, config));
|
|
28332
28278
|
}
|
|
28333
28279
|
headers.setContentLength(data.length, false);
|
|
28334
28280
|
if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
|
|
28335
|
-
return reject(
|
|
28336
|
-
new AxiosError$1(
|
|
28337
|
-
"Request body larger than maxBodyLength limit",
|
|
28338
|
-
AxiosError$1.ERR_BAD_REQUEST,
|
|
28339
|
-
config
|
|
28340
|
-
)
|
|
28341
|
-
);
|
|
28281
|
+
return reject(new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config));
|
|
28342
28282
|
}
|
|
28343
28283
|
}
|
|
28344
28284
|
const contentLength = utils$1.toFiniteNumber(headers.getContentLength());
|
|
@@ -28350,27 +28290,14 @@ var require_axios = __commonJS({
|
|
|
28350
28290
|
}
|
|
28351
28291
|
if (data && (onUploadProgress || maxUploadRate)) {
|
|
28352
28292
|
if (!utils$1.isStream(data)) {
|
|
28353
|
-
data =
|
|
28293
|
+
data = stream.Readable.from(data, {
|
|
28294
|
+
objectMode: false
|
|
28295
|
+
});
|
|
28354
28296
|
}
|
|
28355
|
-
data =
|
|
28356
|
-
|
|
28357
|
-
|
|
28358
|
-
|
|
28359
|
-
maxRate: utils$1.toFiniteNumber(maxUploadRate)
|
|
28360
|
-
})
|
|
28361
|
-
],
|
|
28362
|
-
utils$1.noop
|
|
28363
|
-
);
|
|
28364
|
-
onUploadProgress && data.on(
|
|
28365
|
-
"progress",
|
|
28366
|
-
flushOnFinish(
|
|
28367
|
-
data,
|
|
28368
|
-
progressEventDecorator(
|
|
28369
|
-
contentLength,
|
|
28370
|
-
progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
|
|
28371
|
-
)
|
|
28372
|
-
)
|
|
28373
|
-
);
|
|
28297
|
+
data = stream.pipeline([data, new AxiosTransformStream({
|
|
28298
|
+
maxRate: utils$1.toFiniteNumber(maxUploadRate)
|
|
28299
|
+
})], utils$1.noop);
|
|
28300
|
+
onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
|
|
28374
28301
|
}
|
|
28375
28302
|
let auth = void 0;
|
|
28376
28303
|
if (config.auth) {
|
|
@@ -28386,11 +28313,7 @@ var require_axios = __commonJS({
|
|
|
28386
28313
|
auth && headers.delete("authorization");
|
|
28387
28314
|
let path;
|
|
28388
28315
|
try {
|
|
28389
|
-
path = buildURL(
|
|
28390
|
-
parsed.pathname + parsed.search,
|
|
28391
|
-
config.params,
|
|
28392
|
-
config.paramsSerializer
|
|
28393
|
-
).replace(/^\?/, "");
|
|
28316
|
+
path = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
|
|
28394
28317
|
} catch (err) {
|
|
28395
28318
|
const customErr = new Error(err.message);
|
|
28396
28319
|
customErr.config = config;
|
|
@@ -28398,16 +28321,15 @@ var require_axios = __commonJS({
|
|
|
28398
28321
|
customErr.exists = true;
|
|
28399
28322
|
return reject(customErr);
|
|
28400
28323
|
}
|
|
28401
|
-
headers.set(
|
|
28402
|
-
"Accept-Encoding",
|
|
28403
|
-
"gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""),
|
|
28404
|
-
false
|
|
28405
|
-
);
|
|
28324
|
+
headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
|
|
28406
28325
|
const options = {
|
|
28407
28326
|
path,
|
|
28408
28327
|
method,
|
|
28409
28328
|
headers: headers.toJSON(),
|
|
28410
|
-
agents: {
|
|
28329
|
+
agents: {
|
|
28330
|
+
http: config.httpAgent,
|
|
28331
|
+
https: config.httpsAgent
|
|
28332
|
+
},
|
|
28411
28333
|
auth,
|
|
28412
28334
|
protocol,
|
|
28413
28335
|
family,
|
|
@@ -28421,11 +28343,7 @@ var require_axios = __commonJS({
|
|
|
28421
28343
|
} else {
|
|
28422
28344
|
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
28423
28345
|
options.port = parsed.port;
|
|
28424
|
-
setProxy(
|
|
28425
|
-
options,
|
|
28426
|
-
config.proxy,
|
|
28427
|
-
protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path
|
|
28428
|
-
);
|
|
28346
|
+
setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
|
|
28429
28347
|
}
|
|
28430
28348
|
let transport;
|
|
28431
28349
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
@@ -28436,7 +28354,7 @@ var require_axios = __commonJS({
|
|
|
28436
28354
|
if (config.transport) {
|
|
28437
28355
|
transport = config.transport;
|
|
28438
28356
|
} else if (config.maxRedirects === 0) {
|
|
28439
|
-
transport = isHttpsRequest ?
|
|
28357
|
+
transport = isHttpsRequest ? https : http;
|
|
28440
28358
|
} else {
|
|
28441
28359
|
if (config.maxRedirects) {
|
|
28442
28360
|
options.maxRedirects = config.maxRedirects;
|
|
@@ -28460,19 +28378,10 @@ var require_axios = __commonJS({
|
|
|
28460
28378
|
const streams = [res];
|
|
28461
28379
|
const responseLength = utils$1.toFiniteNumber(res.headers["content-length"]);
|
|
28462
28380
|
if (onDownloadProgress || maxDownloadRate) {
|
|
28463
|
-
const transformStream = new AxiosTransformStream
|
|
28381
|
+
const transformStream = new AxiosTransformStream({
|
|
28464
28382
|
maxRate: utils$1.toFiniteNumber(maxDownloadRate)
|
|
28465
28383
|
});
|
|
28466
|
-
onDownloadProgress && transformStream.on(
|
|
28467
|
-
"progress",
|
|
28468
|
-
flushOnFinish(
|
|
28469
|
-
transformStream,
|
|
28470
|
-
progressEventDecorator(
|
|
28471
|
-
responseLength,
|
|
28472
|
-
progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
|
|
28473
|
-
)
|
|
28474
|
-
)
|
|
28475
|
-
);
|
|
28384
|
+
onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3))));
|
|
28476
28385
|
streams.push(transformStream);
|
|
28477
28386
|
}
|
|
28478
28387
|
let responseStream = res;
|
|
@@ -28487,26 +28396,26 @@ var require_axios = __commonJS({
|
|
|
28487
28396
|
case "x-gzip":
|
|
28488
28397
|
case "compress":
|
|
28489
28398
|
case "x-compress":
|
|
28490
|
-
streams.push(
|
|
28399
|
+
streams.push(zlib.createUnzip(zlibOptions));
|
|
28491
28400
|
delete res.headers["content-encoding"];
|
|
28492
28401
|
break;
|
|
28493
28402
|
case "deflate":
|
|
28494
|
-
streams.push(new ZlibHeaderTransformStream
|
|
28495
|
-
streams.push(
|
|
28403
|
+
streams.push(new ZlibHeaderTransformStream());
|
|
28404
|
+
streams.push(zlib.createUnzip(zlibOptions));
|
|
28496
28405
|
delete res.headers["content-encoding"];
|
|
28497
28406
|
break;
|
|
28498
28407
|
case "br":
|
|
28499
28408
|
if (isBrotliSupported) {
|
|
28500
|
-
streams.push(
|
|
28409
|
+
streams.push(zlib.createBrotliDecompress(brotliOptions));
|
|
28501
28410
|
delete res.headers["content-encoding"];
|
|
28502
28411
|
}
|
|
28503
28412
|
}
|
|
28504
28413
|
}
|
|
28505
|
-
responseStream = streams.length > 1 ?
|
|
28414
|
+
responseStream = streams.length > 1 ? stream.pipeline(streams, utils$1.noop) : streams[0];
|
|
28506
28415
|
const response = {
|
|
28507
28416
|
status: res.statusCode,
|
|
28508
28417
|
statusText: res.statusMessage,
|
|
28509
|
-
headers: new AxiosHeaders
|
|
28418
|
+
headers: new AxiosHeaders(res.headers),
|
|
28510
28419
|
config,
|
|
28511
28420
|
request: lastRequest
|
|
28512
28421
|
};
|
|
@@ -28522,32 +28431,20 @@ var require_axios = __commonJS({
|
|
|
28522
28431
|
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
28523
28432
|
rejected = true;
|
|
28524
28433
|
responseStream.destroy();
|
|
28525
|
-
abort(
|
|
28526
|
-
new AxiosError$1(
|
|
28527
|
-
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
28528
|
-
AxiosError$1.ERR_BAD_RESPONSE,
|
|
28529
|
-
config,
|
|
28530
|
-
lastRequest
|
|
28531
|
-
)
|
|
28532
|
-
);
|
|
28434
|
+
abort(new AxiosError("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
|
|
28533
28435
|
}
|
|
28534
28436
|
});
|
|
28535
28437
|
responseStream.on("aborted", function handlerStreamAborted() {
|
|
28536
28438
|
if (rejected) {
|
|
28537
28439
|
return;
|
|
28538
28440
|
}
|
|
28539
|
-
const err = new AxiosError
|
|
28540
|
-
"stream has been aborted",
|
|
28541
|
-
AxiosError$1.ERR_BAD_RESPONSE,
|
|
28542
|
-
config,
|
|
28543
|
-
lastRequest
|
|
28544
|
-
);
|
|
28441
|
+
const err = new AxiosError("stream has been aborted", AxiosError.ERR_BAD_RESPONSE, config, lastRequest);
|
|
28545
28442
|
responseStream.destroy(err);
|
|
28546
28443
|
reject(err);
|
|
28547
28444
|
});
|
|
28548
28445
|
responseStream.on("error", function handleStreamError(err) {
|
|
28549
28446
|
if (req.destroyed) return;
|
|
28550
|
-
reject(AxiosError
|
|
28447
|
+
reject(AxiosError.from(err, null, config, lastRequest));
|
|
28551
28448
|
});
|
|
28552
28449
|
responseStream.on("end", function handleStreamEnd() {
|
|
28553
28450
|
try {
|
|
@@ -28560,7 +28457,7 @@ var require_axios = __commonJS({
|
|
|
28560
28457
|
}
|
|
28561
28458
|
response.data = responseData;
|
|
28562
28459
|
} catch (err) {
|
|
28563
|
-
return reject(AxiosError
|
|
28460
|
+
return reject(AxiosError.from(err, null, config, response.request, response));
|
|
28564
28461
|
}
|
|
28565
28462
|
settle(resolve, reject, response);
|
|
28566
28463
|
});
|
|
@@ -28580,7 +28477,7 @@ var require_axios = __commonJS({
|
|
|
28580
28477
|
}
|
|
28581
28478
|
});
|
|
28582
28479
|
req.on("error", function handleRequestError(err) {
|
|
28583
|
-
reject(AxiosError
|
|
28480
|
+
reject(AxiosError.from(err, null, config, req));
|
|
28584
28481
|
});
|
|
28585
28482
|
req.on("socket", function handleRequestSocket(socket) {
|
|
28586
28483
|
socket.setKeepAlive(true, 1e3 * 60);
|
|
@@ -28588,14 +28485,7 @@ var require_axios = __commonJS({
|
|
|
28588
28485
|
if (config.timeout) {
|
|
28589
28486
|
const timeout = parseInt(config.timeout, 10);
|
|
28590
28487
|
if (Number.isNaN(timeout)) {
|
|
28591
|
-
abort(
|
|
28592
|
-
new AxiosError$1(
|
|
28593
|
-
"error trying to parse `config.timeout` to int",
|
|
28594
|
-
AxiosError$1.ERR_BAD_OPTION_VALUE,
|
|
28595
|
-
config,
|
|
28596
|
-
req
|
|
28597
|
-
)
|
|
28598
|
-
);
|
|
28488
|
+
abort(new AxiosError("error trying to parse `config.timeout` to int", AxiosError.ERR_BAD_OPTION_VALUE, config, req));
|
|
28599
28489
|
return;
|
|
28600
28490
|
}
|
|
28601
28491
|
req.setTimeout(timeout, function handleRequestTimeout() {
|
|
@@ -28605,14 +28495,7 @@ var require_axios = __commonJS({
|
|
|
28605
28495
|
if (config.timeoutErrorMessage) {
|
|
28606
28496
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
28607
28497
|
}
|
|
28608
|
-
abort(
|
|
28609
|
-
new AxiosError$1(
|
|
28610
|
-
timeoutErrorMessage,
|
|
28611
|
-
transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
|
|
28612
|
-
config,
|
|
28613
|
-
req
|
|
28614
|
-
)
|
|
28615
|
-
);
|
|
28498
|
+
abort(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req));
|
|
28616
28499
|
});
|
|
28617
28500
|
} else {
|
|
28618
28501
|
req.setTimeout(0);
|
|
@@ -28629,7 +28512,7 @@ var require_axios = __commonJS({
|
|
|
28629
28512
|
});
|
|
28630
28513
|
data.on("close", () => {
|
|
28631
28514
|
if (!ended && !errored) {
|
|
28632
|
-
abort(new CanceledError
|
|
28515
|
+
abort(new CanceledError("Request stream has been aborted", config, req));
|
|
28633
28516
|
}
|
|
28634
28517
|
});
|
|
28635
28518
|
data.pipe(req);
|
|
@@ -28642,10 +28525,7 @@ var require_axios = __commonJS({
|
|
|
28642
28525
|
var isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url2) => {
|
|
28643
28526
|
url2 = new URL(url2, platform.origin);
|
|
28644
28527
|
return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
|
|
28645
|
-
})(
|
|
28646
|
-
new URL(platform.origin),
|
|
28647
|
-
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
28648
|
-
) : () => true;
|
|
28528
|
+
})(new URL(platform.origin), platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)) : () => true;
|
|
28649
28529
|
var cookies = platform.hasStandardBrowserEnv ? (
|
|
28650
28530
|
// Standard browser envs support document.cookie
|
|
28651
28531
|
{
|
|
@@ -28690,13 +28570,17 @@ var require_axios = __commonJS({
|
|
|
28690
28570
|
}
|
|
28691
28571
|
}
|
|
28692
28572
|
);
|
|
28693
|
-
var headersToObject = (thing) => thing instanceof AxiosHeaders
|
|
28573
|
+
var headersToObject = (thing) => thing instanceof AxiosHeaders ? {
|
|
28574
|
+
...thing
|
|
28575
|
+
} : thing;
|
|
28694
28576
|
function mergeConfig(config1, config2) {
|
|
28695
28577
|
config2 = config2 || {};
|
|
28696
28578
|
const config = {};
|
|
28697
28579
|
function getMergedValue(target, source, prop, caseless) {
|
|
28698
28580
|
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
28699
|
-
return utils$1.merge.call({
|
|
28581
|
+
return utils$1.merge.call({
|
|
28582
|
+
caseless
|
|
28583
|
+
}, target, source);
|
|
28700
28584
|
} else if (utils$1.isPlainObject(source)) {
|
|
28701
28585
|
return utils$1.merge({}, source);
|
|
28702
28586
|
} else if (utils$1.isArray(source)) {
|
|
@@ -28761,7 +28645,10 @@ var require_axios = __commonJS({
|
|
|
28761
28645
|
validateStatus: mergeDirectKeys,
|
|
28762
28646
|
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
28763
28647
|
};
|
|
28764
|
-
utils$1.forEach(Object.keys({
|
|
28648
|
+
utils$1.forEach(Object.keys({
|
|
28649
|
+
...config1,
|
|
28650
|
+
...config2
|
|
28651
|
+
}), function computeConfigValue(prop) {
|
|
28765
28652
|
if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
|
|
28766
28653
|
const merge2 = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
28767
28654
|
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
@@ -28771,20 +28658,18 @@ var require_axios = __commonJS({
|
|
|
28771
28658
|
}
|
|
28772
28659
|
var resolveConfig = (config) => {
|
|
28773
28660
|
const newConfig = mergeConfig({}, config);
|
|
28774
|
-
let {
|
|
28775
|
-
|
|
28776
|
-
|
|
28777
|
-
|
|
28778
|
-
|
|
28779
|
-
|
|
28780
|
-
|
|
28661
|
+
let {
|
|
28662
|
+
data,
|
|
28663
|
+
withXSRFToken,
|
|
28664
|
+
xsrfHeaderName,
|
|
28665
|
+
xsrfCookieName,
|
|
28666
|
+
headers,
|
|
28667
|
+
auth
|
|
28668
|
+
} = newConfig;
|
|
28669
|
+
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
28670
|
+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
|
|
28781
28671
|
if (auth) {
|
|
28782
|
-
headers.set(
|
|
28783
|
-
"Authorization",
|
|
28784
|
-
"Basic " + btoa(
|
|
28785
|
-
(auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")
|
|
28786
|
-
)
|
|
28787
|
-
);
|
|
28672
|
+
headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
|
|
28788
28673
|
}
|
|
28789
28674
|
if (utils$1.isFormData(data)) {
|
|
28790
28675
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
@@ -28815,8 +28700,12 @@ var require_axios = __commonJS({
|
|
|
28815
28700
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
28816
28701
|
const _config = resolveConfig(config);
|
|
28817
28702
|
let requestData = _config.data;
|
|
28818
|
-
const requestHeaders = AxiosHeaders
|
|
28819
|
-
let {
|
|
28703
|
+
const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
|
|
28704
|
+
let {
|
|
28705
|
+
responseType,
|
|
28706
|
+
onUploadProgress,
|
|
28707
|
+
onDownloadProgress
|
|
28708
|
+
} = _config;
|
|
28820
28709
|
let onCanceled;
|
|
28821
28710
|
let uploadThrottled, downloadThrottled;
|
|
28822
28711
|
let flushUpload, flushDownload;
|
|
@@ -28833,9 +28722,7 @@ var require_axios = __commonJS({
|
|
|
28833
28722
|
if (!request) {
|
|
28834
28723
|
return;
|
|
28835
28724
|
}
|
|
28836
|
-
const responseHeaders = AxiosHeaders
|
|
28837
|
-
"getAllResponseHeaders" in request && request.getAllResponseHeaders()
|
|
28838
|
-
);
|
|
28725
|
+
const responseHeaders = AxiosHeaders.from("getAllResponseHeaders" in request && request.getAllResponseHeaders());
|
|
28839
28726
|
const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
|
|
28840
28727
|
const response = {
|
|
28841
28728
|
data: responseData,
|
|
@@ -28845,17 +28732,13 @@ var require_axios = __commonJS({
|
|
|
28845
28732
|
config,
|
|
28846
28733
|
request
|
|
28847
28734
|
};
|
|
28848
|
-
settle(
|
|
28849
|
-
|
|
28850
|
-
|
|
28851
|
-
|
|
28852
|
-
|
|
28853
|
-
|
|
28854
|
-
|
|
28855
|
-
done();
|
|
28856
|
-
},
|
|
28857
|
-
response
|
|
28858
|
-
);
|
|
28735
|
+
settle(function _resolve(value) {
|
|
28736
|
+
resolve(value);
|
|
28737
|
+
done();
|
|
28738
|
+
}, function _reject(err) {
|
|
28739
|
+
reject(err);
|
|
28740
|
+
done();
|
|
28741
|
+
}, response);
|
|
28859
28742
|
request = null;
|
|
28860
28743
|
}
|
|
28861
28744
|
if ("onloadend" in request) {
|
|
@@ -28875,12 +28758,12 @@ var require_axios = __commonJS({
|
|
|
28875
28758
|
if (!request) {
|
|
28876
28759
|
return;
|
|
28877
28760
|
}
|
|
28878
|
-
reject(new AxiosError
|
|
28761
|
+
reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
|
|
28879
28762
|
request = null;
|
|
28880
28763
|
};
|
|
28881
28764
|
request.onerror = function handleError(event) {
|
|
28882
28765
|
const msg = event && event.message ? event.message : "Network Error";
|
|
28883
|
-
const err = new AxiosError
|
|
28766
|
+
const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
|
|
28884
28767
|
err.event = event || null;
|
|
28885
28768
|
reject(err);
|
|
28886
28769
|
request = null;
|
|
@@ -28891,14 +28774,7 @@ var require_axios = __commonJS({
|
|
|
28891
28774
|
if (_config.timeoutErrorMessage) {
|
|
28892
28775
|
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
28893
28776
|
}
|
|
28894
|
-
reject(
|
|
28895
|
-
new AxiosError$1(
|
|
28896
|
-
timeoutErrorMessage,
|
|
28897
|
-
transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
|
|
28898
|
-
config,
|
|
28899
|
-
request
|
|
28900
|
-
)
|
|
28901
|
-
);
|
|
28777
|
+
reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
|
|
28902
28778
|
request = null;
|
|
28903
28779
|
};
|
|
28904
28780
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
@@ -28927,7 +28803,7 @@ var require_axios = __commonJS({
|
|
|
28927
28803
|
if (!request) {
|
|
28928
28804
|
return;
|
|
28929
28805
|
}
|
|
28930
|
-
reject(!cancel || cancel.type ? new CanceledError
|
|
28806
|
+
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
28931
28807
|
request.abort();
|
|
28932
28808
|
request = null;
|
|
28933
28809
|
};
|
|
@@ -28938,20 +28814,16 @@ var require_axios = __commonJS({
|
|
|
28938
28814
|
}
|
|
28939
28815
|
const protocol = parseProtocol(_config.url);
|
|
28940
28816
|
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
28941
|
-
reject(
|
|
28942
|
-
new AxiosError$1(
|
|
28943
|
-
"Unsupported protocol " + protocol + ":",
|
|
28944
|
-
AxiosError$1.ERR_BAD_REQUEST,
|
|
28945
|
-
config
|
|
28946
|
-
)
|
|
28947
|
-
);
|
|
28817
|
+
reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
|
|
28948
28818
|
return;
|
|
28949
28819
|
}
|
|
28950
28820
|
request.send(requestData || null);
|
|
28951
28821
|
});
|
|
28952
28822
|
};
|
|
28953
28823
|
var composeSignals = (signals, timeout) => {
|
|
28954
|
-
const {
|
|
28824
|
+
const {
|
|
28825
|
+
length
|
|
28826
|
+
} = signals = signals ? signals.filter(Boolean) : [];
|
|
28955
28827
|
if (timeout || length) {
|
|
28956
28828
|
let controller = new AbortController();
|
|
28957
28829
|
let aborted;
|
|
@@ -28960,14 +28832,12 @@ var require_axios = __commonJS({
|
|
|
28960
28832
|
aborted = true;
|
|
28961
28833
|
unsubscribe();
|
|
28962
28834
|
const err = reason instanceof Error ? reason : this.reason;
|
|
28963
|
-
controller.abort(
|
|
28964
|
-
err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err)
|
|
28965
|
-
);
|
|
28835
|
+
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
28966
28836
|
}
|
|
28967
28837
|
};
|
|
28968
28838
|
let timer = timeout && setTimeout(() => {
|
|
28969
28839
|
timer = null;
|
|
28970
|
-
onabort(new AxiosError
|
|
28840
|
+
onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
|
|
28971
28841
|
}, timeout);
|
|
28972
28842
|
const unsubscribe = () => {
|
|
28973
28843
|
if (signals) {
|
|
@@ -28980,15 +28850,16 @@ var require_axios = __commonJS({
|
|
|
28980
28850
|
}
|
|
28981
28851
|
};
|
|
28982
28852
|
signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
|
|
28983
|
-
const {
|
|
28853
|
+
const {
|
|
28854
|
+
signal
|
|
28855
|
+
} = controller;
|
|
28984
28856
|
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
28985
28857
|
return signal;
|
|
28986
28858
|
}
|
|
28987
28859
|
};
|
|
28988
|
-
var composeSignals$1 = composeSignals;
|
|
28989
28860
|
var streamChunk = function* (chunk, chunkSize) {
|
|
28990
28861
|
let len = chunk.byteLength;
|
|
28991
|
-
if (
|
|
28862
|
+
if (len < chunkSize) {
|
|
28992
28863
|
yield chunk;
|
|
28993
28864
|
return;
|
|
28994
28865
|
}
|
|
@@ -29013,7 +28884,10 @@ var require_axios = __commonJS({
|
|
|
29013
28884
|
const reader = stream2.getReader();
|
|
29014
28885
|
try {
|
|
29015
28886
|
for (; ; ) {
|
|
29016
|
-
const {
|
|
28887
|
+
const {
|
|
28888
|
+
done,
|
|
28889
|
+
value
|
|
28890
|
+
} = await reader.read();
|
|
29017
28891
|
if (done) {
|
|
29018
28892
|
break;
|
|
29019
28893
|
}
|
|
@@ -29033,44 +28907,52 @@ var require_axios = __commonJS({
|
|
|
29033
28907
|
onFinish && onFinish(e);
|
|
29034
28908
|
}
|
|
29035
28909
|
};
|
|
29036
|
-
return new ReadableStream(
|
|
29037
|
-
{
|
|
29038
|
-
|
|
29039
|
-
|
|
29040
|
-
|
|
29041
|
-
|
|
29042
|
-
|
|
29043
|
-
|
|
29044
|
-
|
|
29045
|
-
|
|
29046
|
-
|
|
29047
|
-
if (onProgress) {
|
|
29048
|
-
let loadedBytes = bytes += len;
|
|
29049
|
-
onProgress(loadedBytes);
|
|
29050
|
-
}
|
|
29051
|
-
controller.enqueue(new Uint8Array(value));
|
|
29052
|
-
} catch (err) {
|
|
29053
|
-
_onFinish(err);
|
|
29054
|
-
throw err;
|
|
28910
|
+
return new ReadableStream({
|
|
28911
|
+
async pull(controller) {
|
|
28912
|
+
try {
|
|
28913
|
+
const {
|
|
28914
|
+
done: done2,
|
|
28915
|
+
value
|
|
28916
|
+
} = await iterator2.next();
|
|
28917
|
+
if (done2) {
|
|
28918
|
+
_onFinish();
|
|
28919
|
+
controller.close();
|
|
28920
|
+
return;
|
|
29055
28921
|
}
|
|
29056
|
-
|
|
29057
|
-
|
|
29058
|
-
|
|
29059
|
-
|
|
28922
|
+
let len = value.byteLength;
|
|
28923
|
+
if (onProgress) {
|
|
28924
|
+
let loadedBytes = bytes += len;
|
|
28925
|
+
onProgress(loadedBytes);
|
|
28926
|
+
}
|
|
28927
|
+
controller.enqueue(new Uint8Array(value));
|
|
28928
|
+
} catch (err) {
|
|
28929
|
+
_onFinish(err);
|
|
28930
|
+
throw err;
|
|
29060
28931
|
}
|
|
29061
28932
|
},
|
|
29062
|
-
{
|
|
29063
|
-
|
|
28933
|
+
cancel(reason) {
|
|
28934
|
+
_onFinish(reason);
|
|
28935
|
+
return iterator2.return();
|
|
29064
28936
|
}
|
|
29065
|
-
|
|
28937
|
+
}, {
|
|
28938
|
+
highWaterMark: 2
|
|
28939
|
+
});
|
|
29066
28940
|
};
|
|
29067
28941
|
var DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
29068
|
-
var {
|
|
29069
|
-
|
|
28942
|
+
var {
|
|
28943
|
+
isFunction
|
|
28944
|
+
} = utils$1;
|
|
28945
|
+
var globalFetchAPI = (({
|
|
28946
|
+
Request,
|
|
28947
|
+
Response
|
|
28948
|
+
}) => ({
|
|
29070
28949
|
Request,
|
|
29071
28950
|
Response
|
|
29072
28951
|
}))(utils$1.global);
|
|
29073
|
-
var {
|
|
28952
|
+
var {
|
|
28953
|
+
ReadableStream: ReadableStream$1,
|
|
28954
|
+
TextEncoder: TextEncoder$1
|
|
28955
|
+
} = utils$1.global;
|
|
29074
28956
|
var test = (fn, ...args) => {
|
|
29075
28957
|
try {
|
|
29076
28958
|
return !!fn(...args);
|
|
@@ -29079,14 +28961,14 @@ var require_axios = __commonJS({
|
|
|
29079
28961
|
}
|
|
29080
28962
|
};
|
|
29081
28963
|
var factory = (env) => {
|
|
29082
|
-
env = utils$1.merge.call(
|
|
29083
|
-
|
|
29084
|
-
|
|
29085
|
-
|
|
29086
|
-
|
|
29087
|
-
|
|
29088
|
-
|
|
29089
|
-
|
|
28964
|
+
env = utils$1.merge.call({
|
|
28965
|
+
skipUndefined: true
|
|
28966
|
+
}, globalFetchAPI, env);
|
|
28967
|
+
const {
|
|
28968
|
+
fetch: envFetch,
|
|
28969
|
+
Request,
|
|
28970
|
+
Response
|
|
28971
|
+
} = env;
|
|
29090
28972
|
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === "function";
|
|
29091
28973
|
const isRequestSupported = isFunction(Request);
|
|
29092
28974
|
const isResponseSupported = isFunction(Response);
|
|
@@ -29097,14 +28979,16 @@ var require_axios = __commonJS({
|
|
|
29097
28979
|
const encodeText = isFetchSupported && (typeof TextEncoder$1 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder$1()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
29098
28980
|
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
29099
28981
|
let duplexAccessed = false;
|
|
28982
|
+
const body = new ReadableStream$1();
|
|
29100
28983
|
const hasContentType = new Request(platform.origin, {
|
|
29101
|
-
body
|
|
28984
|
+
body,
|
|
29102
28985
|
method: "POST",
|
|
29103
28986
|
get duplex() {
|
|
29104
28987
|
duplexAccessed = true;
|
|
29105
28988
|
return "half";
|
|
29106
28989
|
}
|
|
29107
28990
|
}).headers.has("Content-Type");
|
|
28991
|
+
body.cancel();
|
|
29108
28992
|
return duplexAccessed && !hasContentType;
|
|
29109
28993
|
});
|
|
29110
28994
|
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
|
|
@@ -29118,11 +29002,7 @@ var require_axios = __commonJS({
|
|
|
29118
29002
|
if (method) {
|
|
29119
29003
|
return method.call(res);
|
|
29120
29004
|
}
|
|
29121
|
-
throw new AxiosError$
|
|
29122
|
-
`Response type '${type}' is not supported`,
|
|
29123
|
-
AxiosError$1.ERR_NOT_SUPPORT,
|
|
29124
|
-
config
|
|
29125
|
-
);
|
|
29005
|
+
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
|
29126
29006
|
});
|
|
29127
29007
|
});
|
|
29128
29008
|
})();
|
|
@@ -29171,10 +29051,7 @@ var require_axios = __commonJS({
|
|
|
29171
29051
|
} = resolveConfig(config);
|
|
29172
29052
|
let _fetch = envFetch || fetch;
|
|
29173
29053
|
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
29174
|
-
let composedSignal = composeSignals
|
|
29175
|
-
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
29176
|
-
timeout
|
|
29177
|
-
);
|
|
29054
|
+
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
29178
29055
|
let request = null;
|
|
29179
29056
|
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
29180
29057
|
composedSignal.unsubscribe();
|
|
@@ -29192,10 +29069,7 @@ var require_axios = __commonJS({
|
|
|
29192
29069
|
headers.setContentType(contentTypeHeader);
|
|
29193
29070
|
}
|
|
29194
29071
|
if (_request.body) {
|
|
29195
|
-
const [onProgress, flush] = progressEventDecorator(
|
|
29196
|
-
requestContentLength,
|
|
29197
|
-
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
29198
|
-
);
|
|
29072
|
+
const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
|
|
29199
29073
|
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
29200
29074
|
}
|
|
29201
29075
|
}
|
|
@@ -29221,28 +29095,19 @@ var require_axios = __commonJS({
|
|
|
29221
29095
|
options[prop] = response[prop];
|
|
29222
29096
|
});
|
|
29223
29097
|
const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
|
|
29224
|
-
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
29225
|
-
|
|
29226
|
-
|
|
29227
|
-
|
|
29228
|
-
|
|
29229
|
-
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
29230
|
-
flush && flush();
|
|
29231
|
-
unsubscribe && unsubscribe();
|
|
29232
|
-
}),
|
|
29233
|
-
options
|
|
29234
|
-
);
|
|
29098
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
|
|
29099
|
+
response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
29100
|
+
flush && flush();
|
|
29101
|
+
unsubscribe && unsubscribe();
|
|
29102
|
+
}), options);
|
|
29235
29103
|
}
|
|
29236
29104
|
responseType = responseType || "text";
|
|
29237
|
-
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](
|
|
29238
|
-
response,
|
|
29239
|
-
config
|
|
29240
|
-
);
|
|
29105
|
+
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
|
|
29241
29106
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
29242
29107
|
return await new Promise((resolve, reject) => {
|
|
29243
29108
|
settle(resolve, reject, {
|
|
29244
29109
|
data: responseData,
|
|
29245
|
-
headers: AxiosHeaders
|
|
29110
|
+
headers: AxiosHeaders.from(response.headers),
|
|
29246
29111
|
status: response.status,
|
|
29247
29112
|
statusText: response.statusText,
|
|
29248
29113
|
config,
|
|
@@ -29252,27 +29117,22 @@ var require_axios = __commonJS({
|
|
|
29252
29117
|
} catch (err) {
|
|
29253
29118
|
unsubscribe && unsubscribe();
|
|
29254
29119
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
29255
|
-
throw Object.assign(
|
|
29256
|
-
|
|
29257
|
-
|
|
29258
|
-
AxiosError$1.ERR_NETWORK,
|
|
29259
|
-
config,
|
|
29260
|
-
request,
|
|
29261
|
-
err && err.response
|
|
29262
|
-
),
|
|
29263
|
-
{
|
|
29264
|
-
cause: err.cause || err
|
|
29265
|
-
}
|
|
29266
|
-
);
|
|
29120
|
+
throw Object.assign(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response), {
|
|
29121
|
+
cause: err.cause || err
|
|
29122
|
+
});
|
|
29267
29123
|
}
|
|
29268
|
-
throw AxiosError
|
|
29124
|
+
throw AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
29269
29125
|
}
|
|
29270
29126
|
};
|
|
29271
29127
|
};
|
|
29272
29128
|
var seedCache = /* @__PURE__ */ new Map();
|
|
29273
29129
|
var getFetch = (config) => {
|
|
29274
29130
|
let env = config && config.env || {};
|
|
29275
|
-
const {
|
|
29131
|
+
const {
|
|
29132
|
+
fetch: fetch2,
|
|
29133
|
+
Request,
|
|
29134
|
+
Response
|
|
29135
|
+
} = env;
|
|
29276
29136
|
const seeds = [Request, Response, fetch2];
|
|
29277
29137
|
let len = seeds.length, i = len, seed, target, map = seedCache;
|
|
29278
29138
|
while (i--) {
|
|
@@ -29294,17 +29154,23 @@ var require_axios = __commonJS({
|
|
|
29294
29154
|
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
29295
29155
|
if (fn) {
|
|
29296
29156
|
try {
|
|
29297
|
-
Object.defineProperty(fn, "name", {
|
|
29157
|
+
Object.defineProperty(fn, "name", {
|
|
29158
|
+
value
|
|
29159
|
+
});
|
|
29298
29160
|
} catch (e) {
|
|
29299
29161
|
}
|
|
29300
|
-
Object.defineProperty(fn, "adapterName", {
|
|
29162
|
+
Object.defineProperty(fn, "adapterName", {
|
|
29163
|
+
value
|
|
29164
|
+
});
|
|
29301
29165
|
}
|
|
29302
29166
|
});
|
|
29303
29167
|
var renderReason = (reason) => `- ${reason}`;
|
|
29304
29168
|
var isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
29305
29169
|
function getAdapter(adapters2, config) {
|
|
29306
29170
|
adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
|
|
29307
|
-
const {
|
|
29171
|
+
const {
|
|
29172
|
+
length
|
|
29173
|
+
} = adapters2;
|
|
29308
29174
|
let nameOrAdapter;
|
|
29309
29175
|
let adapter;
|
|
29310
29176
|
const rejectedReasons = {};
|
|
@@ -29315,7 +29181,7 @@ var require_axios = __commonJS({
|
|
|
29315
29181
|
if (!isResolvedHandle(nameOrAdapter)) {
|
|
29316
29182
|
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
29317
29183
|
if (adapter === void 0) {
|
|
29318
|
-
throw new AxiosError
|
|
29184
|
+
throw new AxiosError(`Unknown adapter '${id}'`);
|
|
29319
29185
|
}
|
|
29320
29186
|
}
|
|
29321
29187
|
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
@@ -29324,14 +29190,9 @@ var require_axios = __commonJS({
|
|
|
29324
29190
|
rejectedReasons[id || "#" + i] = adapter;
|
|
29325
29191
|
}
|
|
29326
29192
|
if (!adapter) {
|
|
29327
|
-
const reasons = Object.entries(rejectedReasons).map(
|
|
29328
|
-
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
29329
|
-
);
|
|
29193
|
+
const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
|
|
29330
29194
|
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
29331
|
-
throw new AxiosError
|
|
29332
|
-
`There is no suitable adapter to dispatch the request ` + s,
|
|
29333
|
-
"ERR_NOT_SUPPORT"
|
|
29334
|
-
);
|
|
29195
|
+
throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, "ERR_NOT_SUPPORT");
|
|
29335
29196
|
}
|
|
29336
29197
|
return adapter;
|
|
29337
29198
|
}
|
|
@@ -29352,39 +29213,32 @@ var require_axios = __commonJS({
|
|
|
29352
29213
|
config.cancelToken.throwIfRequested();
|
|
29353
29214
|
}
|
|
29354
29215
|
if (config.signal && config.signal.aborted) {
|
|
29355
|
-
throw new CanceledError
|
|
29216
|
+
throw new CanceledError(null, config);
|
|
29356
29217
|
}
|
|
29357
29218
|
}
|
|
29358
29219
|
function dispatchRequest(config) {
|
|
29359
29220
|
throwIfCancellationRequested(config);
|
|
29360
|
-
config.headers = AxiosHeaders
|
|
29221
|
+
config.headers = AxiosHeaders.from(config.headers);
|
|
29361
29222
|
config.data = transformData.call(config, config.transformRequest);
|
|
29362
29223
|
if (["post", "put", "patch"].indexOf(config.method) !== -1) {
|
|
29363
29224
|
config.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
29364
29225
|
}
|
|
29365
|
-
const adapter = adapters.getAdapter(config.adapter || defaults
|
|
29366
|
-
return adapter(config).then(
|
|
29367
|
-
|
|
29226
|
+
const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
|
|
29227
|
+
return adapter(config).then(function onAdapterResolution(response) {
|
|
29228
|
+
throwIfCancellationRequested(config);
|
|
29229
|
+
response.data = transformData.call(config, config.transformResponse, response);
|
|
29230
|
+
response.headers = AxiosHeaders.from(response.headers);
|
|
29231
|
+
return response;
|
|
29232
|
+
}, function onAdapterRejection(reason) {
|
|
29233
|
+
if (!isCancel(reason)) {
|
|
29368
29234
|
throwIfCancellationRequested(config);
|
|
29369
|
-
|
|
29370
|
-
|
|
29371
|
-
|
|
29372
|
-
},
|
|
29373
|
-
function onAdapterRejection(reason) {
|
|
29374
|
-
if (!isCancel(reason)) {
|
|
29375
|
-
throwIfCancellationRequested(config);
|
|
29376
|
-
if (reason && reason.response) {
|
|
29377
|
-
reason.response.data = transformData.call(
|
|
29378
|
-
config,
|
|
29379
|
-
config.transformResponse,
|
|
29380
|
-
reason.response
|
|
29381
|
-
);
|
|
29382
|
-
reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
|
|
29383
|
-
}
|
|
29235
|
+
if (reason && reason.response) {
|
|
29236
|
+
reason.response.data = transformData.call(config, config.transformResponse, reason.response);
|
|
29237
|
+
reason.response.headers = AxiosHeaders.from(reason.response.headers);
|
|
29384
29238
|
}
|
|
29385
|
-
return Promise.reject(reason);
|
|
29386
29239
|
}
|
|
29387
|
-
|
|
29240
|
+
return Promise.reject(reason);
|
|
29241
|
+
});
|
|
29388
29242
|
}
|
|
29389
29243
|
var validators$1 = {};
|
|
29390
29244
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
@@ -29399,19 +29253,11 @@ var require_axios = __commonJS({
|
|
|
29399
29253
|
}
|
|
29400
29254
|
return (value, opt, opts) => {
|
|
29401
29255
|
if (validator2 === false) {
|
|
29402
|
-
throw new AxiosError
|
|
29403
|
-
formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")),
|
|
29404
|
-
AxiosError$1.ERR_DEPRECATED
|
|
29405
|
-
);
|
|
29256
|
+
throw new AxiosError(formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")), AxiosError.ERR_DEPRECATED);
|
|
29406
29257
|
}
|
|
29407
29258
|
if (version2 && !deprecatedWarnings[opt]) {
|
|
29408
29259
|
deprecatedWarnings[opt] = true;
|
|
29409
|
-
console.warn(
|
|
29410
|
-
formatMessage(
|
|
29411
|
-
opt,
|
|
29412
|
-
" has been deprecated since v" + version2 + " and will be removed in the near future"
|
|
29413
|
-
)
|
|
29414
|
-
);
|
|
29260
|
+
console.warn(formatMessage(opt, " has been deprecated since v" + version2 + " and will be removed in the near future"));
|
|
29415
29261
|
}
|
|
29416
29262
|
return validator2 ? validator2(value, opt, opts) : true;
|
|
29417
29263
|
};
|
|
@@ -29424,7 +29270,7 @@ var require_axios = __commonJS({
|
|
|
29424
29270
|
};
|
|
29425
29271
|
function assertOptions(options, schema, allowUnknown) {
|
|
29426
29272
|
if (typeof options !== "object") {
|
|
29427
|
-
throw new AxiosError
|
|
29273
|
+
throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
|
|
29428
29274
|
}
|
|
29429
29275
|
const keys = Object.keys(options);
|
|
29430
29276
|
let i = keys.length;
|
|
@@ -29435,15 +29281,12 @@ var require_axios = __commonJS({
|
|
|
29435
29281
|
const value = options[opt];
|
|
29436
29282
|
const result = value === void 0 || validator2(value, opt, options);
|
|
29437
29283
|
if (result !== true) {
|
|
29438
|
-
throw new AxiosError
|
|
29439
|
-
"option " + opt + " must be " + result,
|
|
29440
|
-
AxiosError$1.ERR_BAD_OPTION_VALUE
|
|
29441
|
-
);
|
|
29284
|
+
throw new AxiosError("option " + opt + " must be " + result, AxiosError.ERR_BAD_OPTION_VALUE);
|
|
29442
29285
|
}
|
|
29443
29286
|
continue;
|
|
29444
29287
|
}
|
|
29445
29288
|
if (allowUnknown !== true) {
|
|
29446
|
-
throw new AxiosError
|
|
29289
|
+
throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION);
|
|
29447
29290
|
}
|
|
29448
29291
|
}
|
|
29449
29292
|
}
|
|
@@ -29456,8 +29299,8 @@ var require_axios = __commonJS({
|
|
|
29456
29299
|
constructor(instanceConfig) {
|
|
29457
29300
|
this.defaults = instanceConfig || {};
|
|
29458
29301
|
this.interceptors = {
|
|
29459
|
-
request: new InterceptorManager
|
|
29460
|
-
response: new InterceptorManager
|
|
29302
|
+
request: new InterceptorManager(),
|
|
29303
|
+
response: new InterceptorManager()
|
|
29461
29304
|
};
|
|
29462
29305
|
}
|
|
29463
29306
|
/**
|
|
@@ -29496,18 +29339,18 @@ var require_axios = __commonJS({
|
|
|
29496
29339
|
config = configOrUrl || {};
|
|
29497
29340
|
}
|
|
29498
29341
|
config = mergeConfig(this.defaults, config);
|
|
29499
|
-
const {
|
|
29342
|
+
const {
|
|
29343
|
+
transitional,
|
|
29344
|
+
paramsSerializer,
|
|
29345
|
+
headers
|
|
29346
|
+
} = config;
|
|
29500
29347
|
if (transitional !== void 0) {
|
|
29501
|
-
validator.assertOptions(
|
|
29502
|
-
transitional,
|
|
29503
|
-
|
|
29504
|
-
|
|
29505
|
-
|
|
29506
|
-
|
|
29507
|
-
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
|
|
29508
|
-
},
|
|
29509
|
-
false
|
|
29510
|
-
);
|
|
29348
|
+
validator.assertOptions(transitional, {
|
|
29349
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
29350
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
29351
|
+
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
29352
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
|
|
29353
|
+
}, false);
|
|
29511
29354
|
}
|
|
29512
29355
|
if (paramsSerializer != null) {
|
|
29513
29356
|
if (utils$1.isFunction(paramsSerializer)) {
|
|
@@ -29515,14 +29358,10 @@ var require_axios = __commonJS({
|
|
|
29515
29358
|
serialize: paramsSerializer
|
|
29516
29359
|
};
|
|
29517
29360
|
} else {
|
|
29518
|
-
validator.assertOptions(
|
|
29519
|
-
|
|
29520
|
-
|
|
29521
|
-
|
|
29522
|
-
serialize: validators.function
|
|
29523
|
-
},
|
|
29524
|
-
true
|
|
29525
|
-
);
|
|
29361
|
+
validator.assertOptions(paramsSerializer, {
|
|
29362
|
+
encode: validators.function,
|
|
29363
|
+
serialize: validators.function
|
|
29364
|
+
}, true);
|
|
29526
29365
|
}
|
|
29527
29366
|
}
|
|
29528
29367
|
if (config.allowAbsoluteUrls !== void 0) ;
|
|
@@ -29531,20 +29370,16 @@ var require_axios = __commonJS({
|
|
|
29531
29370
|
} else {
|
|
29532
29371
|
config.allowAbsoluteUrls = true;
|
|
29533
29372
|
}
|
|
29534
|
-
validator.assertOptions(
|
|
29535
|
-
|
|
29536
|
-
|
|
29537
|
-
|
|
29538
|
-
withXsrfToken: validators.spelling("withXSRFToken")
|
|
29539
|
-
},
|
|
29540
|
-
true
|
|
29541
|
-
);
|
|
29373
|
+
validator.assertOptions(config, {
|
|
29374
|
+
baseUrl: validators.spelling("baseURL"),
|
|
29375
|
+
withXsrfToken: validators.spelling("withXSRFToken")
|
|
29376
|
+
}, true);
|
|
29542
29377
|
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
29543
29378
|
let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
|
|
29544
29379
|
headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
|
|
29545
29380
|
delete headers[method];
|
|
29546
29381
|
});
|
|
29547
|
-
config.headers = AxiosHeaders
|
|
29382
|
+
config.headers = AxiosHeaders.concat(contextHeaders, headers);
|
|
29548
29383
|
const requestInterceptorChain = [];
|
|
29549
29384
|
let synchronousRequestInterceptors = true;
|
|
29550
29385
|
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
@@ -29610,34 +29445,29 @@ var require_axios = __commonJS({
|
|
|
29610
29445
|
};
|
|
29611
29446
|
utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
29612
29447
|
Axios.prototype[method] = function(url2, config) {
|
|
29613
|
-
return this.request(
|
|
29614
|
-
|
|
29615
|
-
|
|
29616
|
-
|
|
29617
|
-
|
|
29618
|
-
})
|
|
29619
|
-
);
|
|
29448
|
+
return this.request(mergeConfig(config || {}, {
|
|
29449
|
+
method,
|
|
29450
|
+
url: url2,
|
|
29451
|
+
data: (config || {}).data
|
|
29452
|
+
}));
|
|
29620
29453
|
};
|
|
29621
29454
|
});
|
|
29622
29455
|
utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
29623
29456
|
function generateHTTPMethod(isForm) {
|
|
29624
29457
|
return function httpMethod(url2, data, config) {
|
|
29625
|
-
return this.request(
|
|
29626
|
-
|
|
29627
|
-
|
|
29628
|
-
|
|
29629
|
-
|
|
29630
|
-
|
|
29631
|
-
|
|
29632
|
-
|
|
29633
|
-
})
|
|
29634
|
-
);
|
|
29458
|
+
return this.request(mergeConfig(config || {}, {
|
|
29459
|
+
method,
|
|
29460
|
+
headers: isForm ? {
|
|
29461
|
+
"Content-Type": "multipart/form-data"
|
|
29462
|
+
} : {},
|
|
29463
|
+
url: url2,
|
|
29464
|
+
data
|
|
29465
|
+
}));
|
|
29635
29466
|
};
|
|
29636
29467
|
}
|
|
29637
29468
|
Axios.prototype[method] = generateHTTPMethod();
|
|
29638
29469
|
Axios.prototype[method + "Form"] = generateHTTPMethod(true);
|
|
29639
29470
|
});
|
|
29640
|
-
var Axios$1 = Axios;
|
|
29641
29471
|
var CancelToken = class _CancelToken {
|
|
29642
29472
|
constructor(executor) {
|
|
29643
29473
|
if (typeof executor !== "function") {
|
|
@@ -29671,7 +29501,7 @@ var require_axios = __commonJS({
|
|
|
29671
29501
|
if (token2.reason) {
|
|
29672
29502
|
return;
|
|
29673
29503
|
}
|
|
29674
|
-
token2.reason = new CanceledError
|
|
29504
|
+
token2.reason = new CanceledError(message, config, request);
|
|
29675
29505
|
resolvePromise(token2.reason);
|
|
29676
29506
|
});
|
|
29677
29507
|
}
|
|
@@ -29733,7 +29563,6 @@ var require_axios = __commonJS({
|
|
|
29733
29563
|
};
|
|
29734
29564
|
}
|
|
29735
29565
|
};
|
|
29736
|
-
var CancelToken$1 = CancelToken;
|
|
29737
29566
|
function spread(callback) {
|
|
29738
29567
|
return function wrap(arr) {
|
|
29739
29568
|
return callback.apply(null, arr);
|
|
@@ -29816,25 +29645,28 @@ var require_axios = __commonJS({
|
|
|
29816
29645
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
29817
29646
|
HttpStatusCode[value] = key;
|
|
29818
29647
|
});
|
|
29819
|
-
var HttpStatusCode$1 = HttpStatusCode;
|
|
29820
29648
|
function createInstance(defaultConfig) {
|
|
29821
|
-
const context = new Axios
|
|
29822
|
-
const instance = bind(Axios
|
|
29823
|
-
utils$1.extend(instance, Axios
|
|
29824
|
-
|
|
29649
|
+
const context = new Axios(defaultConfig);
|
|
29650
|
+
const instance = bind(Axios.prototype.request, context);
|
|
29651
|
+
utils$1.extend(instance, Axios.prototype, context, {
|
|
29652
|
+
allOwnKeys: true
|
|
29653
|
+
});
|
|
29654
|
+
utils$1.extend(instance, context, null, {
|
|
29655
|
+
allOwnKeys: true
|
|
29656
|
+
});
|
|
29825
29657
|
instance.create = function create(instanceConfig) {
|
|
29826
29658
|
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
|
29827
29659
|
};
|
|
29828
29660
|
return instance;
|
|
29829
29661
|
}
|
|
29830
|
-
var axios = createInstance(defaults
|
|
29831
|
-
axios.Axios = Axios
|
|
29832
|
-
axios.CanceledError = CanceledError
|
|
29833
|
-
axios.CancelToken = CancelToken
|
|
29662
|
+
var axios = createInstance(defaults);
|
|
29663
|
+
axios.Axios = Axios;
|
|
29664
|
+
axios.CanceledError = CanceledError;
|
|
29665
|
+
axios.CancelToken = CancelToken;
|
|
29834
29666
|
axios.isCancel = isCancel;
|
|
29835
29667
|
axios.VERSION = VERSION2;
|
|
29836
29668
|
axios.toFormData = toFormData;
|
|
29837
|
-
axios.AxiosError = AxiosError
|
|
29669
|
+
axios.AxiosError = AxiosError;
|
|
29838
29670
|
axios.Cancel = axios.CanceledError;
|
|
29839
29671
|
axios.all = function all(promises) {
|
|
29840
29672
|
return Promise.all(promises);
|
|
@@ -29842,10 +29674,10 @@ var require_axios = __commonJS({
|
|
|
29842
29674
|
axios.spread = spread;
|
|
29843
29675
|
axios.isAxiosError = isAxiosError;
|
|
29844
29676
|
axios.mergeConfig = mergeConfig;
|
|
29845
|
-
axios.AxiosHeaders = AxiosHeaders
|
|
29677
|
+
axios.AxiosHeaders = AxiosHeaders;
|
|
29846
29678
|
axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
29847
29679
|
axios.getAdapter = adapters.getAdapter;
|
|
29848
|
-
axios.HttpStatusCode = HttpStatusCode
|
|
29680
|
+
axios.HttpStatusCode = HttpStatusCode;
|
|
29849
29681
|
axios.default = axios;
|
|
29850
29682
|
module.exports = axios;
|
|
29851
29683
|
}
|
|
@@ -30218,27 +30050,7 @@ var UnsupportedFeatureError = class extends Error {
|
|
|
30218
30050
|
}
|
|
30219
30051
|
};
|
|
30220
30052
|
function convertSAPErrorToAPICallError(errorResponse, context) {
|
|
30221
|
-
const
|
|
30222
|
-
let message;
|
|
30223
|
-
let code;
|
|
30224
|
-
let location;
|
|
30225
|
-
let requestId;
|
|
30226
|
-
if (Array.isArray(error)) {
|
|
30227
|
-
const firstError = error[0];
|
|
30228
|
-
if (firstError) {
|
|
30229
|
-
message = firstError.message;
|
|
30230
|
-
code = firstError.code;
|
|
30231
|
-
location = firstError.location;
|
|
30232
|
-
requestId = firstError.request_id;
|
|
30233
|
-
} else {
|
|
30234
|
-
message = "Unknown SAP AI error";
|
|
30235
|
-
}
|
|
30236
|
-
} else {
|
|
30237
|
-
message = error.message;
|
|
30238
|
-
code = error.code;
|
|
30239
|
-
location = error.location;
|
|
30240
|
-
requestId = error.request_id;
|
|
30241
|
-
}
|
|
30053
|
+
const { code, location, message, requestId } = extractErrorFields(errorResponse);
|
|
30242
30054
|
const statusCode = getStatusCodeFromSAPError(code);
|
|
30243
30055
|
const responseBody = JSON.stringify({
|
|
30244
30056
|
error: {
|
|
@@ -30299,22 +30111,14 @@ function convertToAISDKError(error, context) {
|
|
|
30299
30111
|
if (error instanceof APICallError || error instanceof LoadAPIKeyError || error instanceof NoSuchModelError) {
|
|
30300
30112
|
return error;
|
|
30301
30113
|
}
|
|
30302
|
-
const rootError =
|
|
30303
|
-
|
|
30304
|
-
|
|
30114
|
+
const rootError = getRootError(error);
|
|
30115
|
+
const errorResponse = findOrchestrationErrorResponse(error);
|
|
30116
|
+
if (errorResponse) {
|
|
30117
|
+
return convertSAPErrorToAPICallError(errorResponse, {
|
|
30305
30118
|
...context,
|
|
30306
30119
|
responseHeaders: context?.responseHeaders ?? getAxiosResponseHeaders(error)
|
|
30307
30120
|
});
|
|
30308
30121
|
}
|
|
30309
|
-
if (rootError instanceof Error) {
|
|
30310
|
-
const parsedError = tryExtractSAPErrorFromMessage(rootError.message);
|
|
30311
|
-
if (parsedError && isOrchestrationErrorResponse(parsedError)) {
|
|
30312
|
-
return convertSAPErrorToAPICallError(parsedError, {
|
|
30313
|
-
...context,
|
|
30314
|
-
responseHeaders: context?.responseHeaders ?? getAxiosResponseHeaders(error)
|
|
30315
|
-
});
|
|
30316
|
-
}
|
|
30317
|
-
}
|
|
30318
30122
|
if (isAbortError(rootError)) {
|
|
30319
30123
|
return createAPICallError(
|
|
30320
30124
|
error,
|
|
@@ -30388,6 +30192,14 @@ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-depl
|
|
|
30388
30192
|
context
|
|
30389
30193
|
);
|
|
30390
30194
|
}
|
|
30195
|
+
var PREFILL_ERROR_KEYWORDS = [
|
|
30196
|
+
"does not support assistant message prefill",
|
|
30197
|
+
"conversation must end with a user message"
|
|
30198
|
+
];
|
|
30199
|
+
function isPrefillError(error) {
|
|
30200
|
+
const message = extractSAPErrorMessage(error)?.toLowerCase();
|
|
30201
|
+
return message !== void 0 && PREFILL_ERROR_KEYWORDS.some((kw) => message.includes(kw));
|
|
30202
|
+
}
|
|
30391
30203
|
function normalizeHeaders(headers) {
|
|
30392
30204
|
if (!headers || typeof headers !== "object") return void 0;
|
|
30393
30205
|
const record = headers;
|
|
@@ -30424,6 +30236,25 @@ ${responseBody}` : options.message;
|
|
|
30424
30236
|
url: context?.url ?? ""
|
|
30425
30237
|
});
|
|
30426
30238
|
}
|
|
30239
|
+
function extractErrorFields(response) {
|
|
30240
|
+
const innerError = response.error;
|
|
30241
|
+
if (Array.isArray(innerError)) {
|
|
30242
|
+
const first2 = innerError[0];
|
|
30243
|
+
return {
|
|
30244
|
+
code: first2?.code,
|
|
30245
|
+
location: first2?.location,
|
|
30246
|
+
message: first2?.message ?? "Unknown SAP AI error",
|
|
30247
|
+
requestId: first2?.request_id
|
|
30248
|
+
};
|
|
30249
|
+
}
|
|
30250
|
+
const entry = innerError;
|
|
30251
|
+
return {
|
|
30252
|
+
code: entry.code,
|
|
30253
|
+
location: entry.location,
|
|
30254
|
+
message: entry.message,
|
|
30255
|
+
requestId: entry.request_id
|
|
30256
|
+
};
|
|
30257
|
+
}
|
|
30427
30258
|
function extractModelIdentifier(message, location) {
|
|
30428
30259
|
const patterns = [
|
|
30429
30260
|
/deployment[:\s]+([a-zA-Z0-9_-]+)/i,
|
|
@@ -30444,9 +30275,37 @@ function extractModelIdentifier(message, location) {
|
|
|
30444
30275
|
}
|
|
30445
30276
|
return void 0;
|
|
30446
30277
|
}
|
|
30278
|
+
function extractSAPErrorMessage(error) {
|
|
30279
|
+
const errorResponse = findOrchestrationErrorResponse(error);
|
|
30280
|
+
if (errorResponse) {
|
|
30281
|
+
return extractErrorFields(errorResponse).message;
|
|
30282
|
+
}
|
|
30283
|
+
const rootError = getRootError(error);
|
|
30284
|
+
if (rootError instanceof Error) {
|
|
30285
|
+
return rootError.message;
|
|
30286
|
+
}
|
|
30287
|
+
return typeof rootError === "string" ? rootError : void 0;
|
|
30288
|
+
}
|
|
30289
|
+
function findOrchestrationErrorResponse(error) {
|
|
30290
|
+
const rootError = getRootError(error);
|
|
30291
|
+
if (isOrchestrationErrorResponse(rootError)) {
|
|
30292
|
+
return rootError;
|
|
30293
|
+
}
|
|
30294
|
+
const axiosData = getAxiosError(error)?.response?.data;
|
|
30295
|
+
if (axiosData && isOrchestrationErrorResponse(axiosData)) {
|
|
30296
|
+
return axiosData;
|
|
30297
|
+
}
|
|
30298
|
+
if (rootError instanceof Error) {
|
|
30299
|
+
const parsed = tryExtractSAPErrorFromMessage(rootError.message);
|
|
30300
|
+
if (parsed && isOrchestrationErrorResponse(parsed)) {
|
|
30301
|
+
return parsed;
|
|
30302
|
+
}
|
|
30303
|
+
}
|
|
30304
|
+
return void 0;
|
|
30305
|
+
}
|
|
30447
30306
|
function getAxiosError(error) {
|
|
30448
30307
|
if (!(error instanceof Error)) return void 0;
|
|
30449
|
-
const rootCause = (
|
|
30308
|
+
const rootCause = getRootError(error);
|
|
30450
30309
|
if (typeof rootCause !== "object" || rootCause === null) return void 0;
|
|
30451
30310
|
const maybeAxios = rootCause;
|
|
30452
30311
|
if (maybeAxios.isAxiosError !== true) return void 0;
|
|
@@ -30462,6 +30321,9 @@ function getAxiosResponseHeaders(error) {
|
|
|
30462
30321
|
if (!axiosError) return void 0;
|
|
30463
30322
|
return normalizeHeaders(axiosError.response?.headers);
|
|
30464
30323
|
}
|
|
30324
|
+
function getRootError(error) {
|
|
30325
|
+
return error instanceof Error && (0, import_util.isErrorWithCause)(error) ? error.rootCause : error;
|
|
30326
|
+
}
|
|
30465
30327
|
function getStatusCodeFromSAPError(code) {
|
|
30466
30328
|
if (!code) return HTTP_STATUS.INTERNAL_ERROR;
|
|
30467
30329
|
if (code >= 100 && code < 600) {
|
|
@@ -30550,7 +30412,7 @@ function tryExtractSAPErrorFromMessage(message) {
|
|
|
30550
30412
|
}
|
|
30551
30413
|
|
|
30552
30414
|
// src/version.ts
|
|
30553
|
-
var VERSION = true ? "4.6.
|
|
30415
|
+
var VERSION = true ? "4.6.4" : "0.0.0-test";
|
|
30554
30416
|
|
|
30555
30417
|
export {
|
|
30556
30418
|
__toESM,
|
|
@@ -30567,6 +30429,7 @@ export {
|
|
|
30567
30429
|
ApiSwitchError,
|
|
30568
30430
|
UnsupportedFeatureError,
|
|
30569
30431
|
convertToAISDKError,
|
|
30432
|
+
isPrefillError,
|
|
30570
30433
|
normalizeHeaders,
|
|
30571
30434
|
VERSION
|
|
30572
30435
|
};
|
|
@@ -30601,6 +30464,6 @@ mime-types/index.js:
|
|
|
30601
30464
|
*)
|
|
30602
30465
|
|
|
30603
30466
|
axios/dist/node/axios.cjs:
|
|
30604
|
-
(*! Axios v1.
|
|
30467
|
+
(*! Axios v1.14.0 Copyright (c) 2026 Matt Zabriskie and contributors *)
|
|
30605
30468
|
*/
|
|
30606
|
-
//# sourceMappingURL=chunk-
|
|
30469
|
+
//# sourceMappingURL=chunk-GLGLTUZM.js.map
|