@jerome-benoit/sap-ai-provider 4.7.0 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -31
- package/dist/{chunk-TVXWNZQT.js → chunk-3ZSXTKOK.js} +607 -210
- package/dist/chunk-3ZSXTKOK.js.map +1 -0
- package/dist/{chunk-GMMX46AH.js → chunk-BVDSJ4IZ.js} +10 -4
- package/dist/chunk-BVDSJ4IZ.js.map +1 -0
- package/dist/{chunk-36DFHUVQ.js → chunk-H5KD4EPO.js} +8 -2
- package/dist/chunk-H5KD4EPO.js.map +1 -0
- package/dist/{chunk-WDUOKIKD.js → chunk-KVOLFUQJ.js} +4 -2
- package/dist/chunk-KVOLFUQJ.js.map +1 -0
- package/dist/{chunk-BZZJKLDG.js → chunk-TQXCNZBC.js} +11 -5
- package/dist/chunk-TQXCNZBC.js.map +1 -0
- package/dist/{foundation-models-embedding-model-strategy-YWPDIJEN.js → foundation-models-embedding-model-strategy-SWRJNFD4.js} +7 -6
- package/dist/foundation-models-embedding-model-strategy-SWRJNFD4.js.map +1 -0
- package/dist/{foundation-models-language-model-strategy-WDSQWU64.js → foundation-models-language-model-strategy-LRAC25ZY.js} +14 -9
- package/dist/foundation-models-language-model-strategy-LRAC25ZY.js.map +1 -0
- package/dist/index.cjs +658 -228
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -1
- package/dist/index.d.ts +24 -1
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/{orchestration-embedding-model-strategy-66QYAO64.js → orchestration-embedding-model-strategy-C5G735Q2.js} +8 -7
- package/dist/orchestration-embedding-model-strategy-C5G735Q2.js.map +1 -0
- package/dist/{orchestration-language-model-strategy-4TKRZK7U.js → orchestration-language-model-strategy-NUHYRIXH.js} +17 -10
- package/dist/orchestration-language-model-strategy-NUHYRIXH.js.map +1 -0
- package/package.json +19 -21
- package/dist/chunk-36DFHUVQ.js.map +0 -1
- package/dist/chunk-BZZJKLDG.js.map +0 -1
- package/dist/chunk-GMMX46AH.js.map +0 -1
- package/dist/chunk-TVXWNZQT.js.map +0 -1
- package/dist/chunk-WDUOKIKD.js.map +0 -1
- package/dist/foundation-models-embedding-model-strategy-YWPDIJEN.js.map +0 -1
- package/dist/foundation-models-language-model-strategy-WDSQWU64.js.map +0 -1
- package/dist/orchestration-embedding-model-strategy-66QYAO64.js.map +0 -1
- package/dist/orchestration-language-model-strategy-4TKRZK7U.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -23653,6 +23653,9 @@ var require_form_data = __commonJS({
|
|
|
23653
23653
|
var setToStringTag = require_es_set_tostringtag();
|
|
23654
23654
|
var hasOwn = require_hasown();
|
|
23655
23655
|
var populate = require_populate();
|
|
23656
|
+
function escapeHeaderParam(str) {
|
|
23657
|
+
return String(str).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22");
|
|
23658
|
+
}
|
|
23656
23659
|
function FormData2(options) {
|
|
23657
23660
|
if (!(this instanceof FormData2)) {
|
|
23658
23661
|
return new FormData2(options);
|
|
@@ -23742,7 +23745,7 @@ var require_form_data = __commonJS({
|
|
|
23742
23745
|
var contents = "";
|
|
23743
23746
|
var headers = {
|
|
23744
23747
|
// add custom disposition as third element or keep it two elements if not
|
|
23745
|
-
"Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []),
|
|
23748
|
+
"Content-Disposition": ["form-data", 'name="' + escapeHeaderParam(field) + '"'].concat(contentDisposition || []),
|
|
23746
23749
|
// if no content type. allow it to be empty array
|
|
23747
23750
|
"Content-Type": [].concat(contentType || [])
|
|
23748
23751
|
};
|
|
@@ -23776,7 +23779,7 @@ var require_form_data = __commonJS({
|
|
|
23776
23779
|
filename = path.basename(value.client._httpMessage.path || "");
|
|
23777
23780
|
}
|
|
23778
23781
|
if (filename) {
|
|
23779
|
-
return 'filename="' + filename + '"';
|
|
23782
|
+
return 'filename="' + escapeHeaderParam(filename) + '"';
|
|
23780
23783
|
}
|
|
23781
23784
|
};
|
|
23782
23785
|
FormData2.prototype._getContentType = function(value, options) {
|
|
@@ -25620,6 +25623,25 @@ var require_axios = __commonJS({
|
|
|
25620
25623
|
iterator,
|
|
25621
25624
|
toStringTag
|
|
25622
25625
|
} = Symbol;
|
|
25626
|
+
var hasOwnProperty = (({
|
|
25627
|
+
hasOwnProperty: hasOwnProperty2
|
|
25628
|
+
}) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
25629
|
+
var hasOwnInPrototypeChain = (thing, prop) => {
|
|
25630
|
+
let obj = thing;
|
|
25631
|
+
const seen = [];
|
|
25632
|
+
while (obj != null && obj !== Object.prototype) {
|
|
25633
|
+
if (seen.indexOf(obj) !== -1) {
|
|
25634
|
+
return false;
|
|
25635
|
+
}
|
|
25636
|
+
seen.push(obj);
|
|
25637
|
+
if (hasOwnProperty(obj, prop)) {
|
|
25638
|
+
return true;
|
|
25639
|
+
}
|
|
25640
|
+
obj = getPrototypeOf(obj);
|
|
25641
|
+
}
|
|
25642
|
+
return false;
|
|
25643
|
+
};
|
|
25644
|
+
var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
|
|
25623
25645
|
var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
|
|
25624
25646
|
const str = toString2.call(thing);
|
|
25625
25647
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -25652,11 +25674,14 @@ var require_axios = __commonJS({
|
|
|
25652
25674
|
var isObject = (thing) => thing !== null && typeof thing === "object";
|
|
25653
25675
|
var isBoolean = (thing) => thing === true || thing === false;
|
|
25654
25676
|
var isPlainObject2 = (val) => {
|
|
25655
|
-
if (
|
|
25677
|
+
if (!isObject(val)) {
|
|
25656
25678
|
return false;
|
|
25657
25679
|
}
|
|
25658
25680
|
const prototype2 = getPrototypeOf(val);
|
|
25659
|
-
return (prototype2 === null || prototype2 === Object.prototype ||
|
|
25681
|
+
return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
|
|
25682
|
+
// Symbol.iterator as evidence the value is a tagged/iterable type rather
|
|
25683
|
+
// than a plain object, while ignoring keys injected onto Object.prototype.
|
|
25684
|
+
!hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
|
|
25660
25685
|
};
|
|
25661
25686
|
var isEmptyObject = (val) => {
|
|
25662
25687
|
if (!isObject(val) || isBuffer(val)) {
|
|
@@ -25760,7 +25785,7 @@ var require_axios = __commonJS({
|
|
|
25760
25785
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
25761
25786
|
return;
|
|
25762
25787
|
}
|
|
25763
|
-
const targetKey = caseless && findKey(result, key) || key;
|
|
25788
|
+
const targetKey = caseless && typeof key === "string" && findKey(result, key) || key;
|
|
25764
25789
|
const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
|
|
25765
25790
|
if (isPlainObject2(existing) && isPlainObject2(val)) {
|
|
25766
25791
|
result[targetKey] = merge(existing, val);
|
|
@@ -25773,7 +25798,21 @@ var require_axios = __commonJS({
|
|
|
25773
25798
|
}
|
|
25774
25799
|
};
|
|
25775
25800
|
for (let i = 0, l = objs.length; i < l; i++) {
|
|
25776
|
-
|
|
25801
|
+
const source = objs[i];
|
|
25802
|
+
if (!source || isBuffer(source)) {
|
|
25803
|
+
continue;
|
|
25804
|
+
}
|
|
25805
|
+
forEach(source, assignValue);
|
|
25806
|
+
if (typeof source !== "object" || isArray(source)) {
|
|
25807
|
+
continue;
|
|
25808
|
+
}
|
|
25809
|
+
const symbols = Object.getOwnPropertySymbols(source);
|
|
25810
|
+
for (let j = 0; j < symbols.length; j++) {
|
|
25811
|
+
const symbol = symbols[j];
|
|
25812
|
+
if (propertyIsEnumerable.call(source, symbol)) {
|
|
25813
|
+
assignValue(source[symbol], symbol);
|
|
25814
|
+
}
|
|
25815
|
+
}
|
|
25777
25816
|
}
|
|
25778
25817
|
return result;
|
|
25779
25818
|
}
|
|
@@ -25895,9 +25934,9 @@ var require_axios = __commonJS({
|
|
|
25895
25934
|
return p1.toUpperCase() + p2;
|
|
25896
25935
|
});
|
|
25897
25936
|
};
|
|
25898
|
-
var
|
|
25899
|
-
|
|
25900
|
-
}
|
|
25937
|
+
var {
|
|
25938
|
+
propertyIsEnumerable
|
|
25939
|
+
} = Object.prototype;
|
|
25901
25940
|
var isRegExp = kindOfTest("RegExp");
|
|
25902
25941
|
var reduceDescriptors = (obj, reducer) => {
|
|
25903
25942
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -25995,6 +26034,7 @@ var require_axios = __commonJS({
|
|
|
25995
26034
|
})(typeof setImmediate === "function", isFunction$1(_global.postMessage));
|
|
25996
26035
|
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
25997
26036
|
var isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
|
26037
|
+
var isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
|
|
25998
26038
|
var utils$1 = {
|
|
25999
26039
|
isArray,
|
|
26000
26040
|
isArrayBuffer,
|
|
@@ -26040,6 +26080,8 @@ var require_axios = __commonJS({
|
|
|
26040
26080
|
hasOwnProperty,
|
|
26041
26081
|
hasOwnProp: hasOwnProperty,
|
|
26042
26082
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
26083
|
+
hasOwnInPrototypeChain,
|
|
26084
|
+
getSafeProp,
|
|
26043
26085
|
reduceDescriptors,
|
|
26044
26086
|
freezeMethods,
|
|
26045
26087
|
toObjectSet,
|
|
@@ -26055,7 +26097,8 @@ var require_axios = __commonJS({
|
|
|
26055
26097
|
isThenable,
|
|
26056
26098
|
setImmediate: _setImmediate,
|
|
26057
26099
|
asap,
|
|
26058
|
-
isIterable
|
|
26100
|
+
isIterable,
|
|
26101
|
+
isSafeIterable
|
|
26059
26102
|
};
|
|
26060
26103
|
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"]);
|
|
26061
26104
|
var parseHeaders = (rawHeaders) => {
|
|
@@ -26181,7 +26224,7 @@ var require_axios = __commonJS({
|
|
|
26181
26224
|
function setHeader(_value, _header, _rewrite) {
|
|
26182
26225
|
const lHeader = normalizeHeader(_header);
|
|
26183
26226
|
if (!lHeader) {
|
|
26184
|
-
|
|
26227
|
+
return;
|
|
26185
26228
|
}
|
|
26186
26229
|
const key = utils$1.findKey(self2, lHeader);
|
|
26187
26230
|
if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
|
|
@@ -26193,13 +26236,19 @@ var require_axios = __commonJS({
|
|
|
26193
26236
|
setHeaders(header, valueOrRewrite);
|
|
26194
26237
|
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
26195
26238
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
26196
|
-
} else if (utils$1.isObject(header) && utils$1.
|
|
26197
|
-
let obj =
|
|
26239
|
+
} else if (utils$1.isObject(header) && utils$1.isSafeIterable(header)) {
|
|
26240
|
+
let obj = /* @__PURE__ */ Object.create(null), dest, key;
|
|
26198
26241
|
for (const entry of header) {
|
|
26199
26242
|
if (!utils$1.isArray(entry)) {
|
|
26200
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
26243
|
+
throw new TypeError("Object iterator must return a key-value pair");
|
|
26244
|
+
}
|
|
26245
|
+
key = entry[0];
|
|
26246
|
+
if (utils$1.hasOwnProp(obj, key)) {
|
|
26247
|
+
dest = obj[key];
|
|
26248
|
+
obj[key] = utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
|
|
26249
|
+
} else {
|
|
26250
|
+
obj[key] = entry[1];
|
|
26201
26251
|
}
|
|
26202
|
-
obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
26203
26252
|
}
|
|
26204
26253
|
setHeaders(obj, valueOrRewrite);
|
|
26205
26254
|
} else {
|
|
@@ -26404,7 +26453,13 @@ var require_axios = __commonJS({
|
|
|
26404
26453
|
var AxiosError = class _AxiosError extends Error {
|
|
26405
26454
|
static from(error, code, config, request, response, customProps) {
|
|
26406
26455
|
const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
|
|
26407
|
-
axiosError
|
|
26456
|
+
Object.defineProperty(axiosError, "cause", {
|
|
26457
|
+
__proto__: null,
|
|
26458
|
+
value: error,
|
|
26459
|
+
writable: true,
|
|
26460
|
+
enumerable: false,
|
|
26461
|
+
configurable: true
|
|
26462
|
+
});
|
|
26408
26463
|
axiosError.name = error.name;
|
|
26409
26464
|
if (error.status != null && axiosError.status == null) {
|
|
26410
26465
|
axiosError.status = error.status;
|
|
@@ -26481,6 +26536,7 @@ var require_axios = __commonJS({
|
|
|
26481
26536
|
AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
26482
26537
|
AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
26483
26538
|
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
26539
|
+
var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
|
|
26484
26540
|
function isVisitable(thing) {
|
|
26485
26541
|
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
26486
26542
|
}
|
|
@@ -26517,8 +26573,9 @@ var require_axios = __commonJS({
|
|
|
26517
26573
|
const dots = options.dots;
|
|
26518
26574
|
const indexes = options.indexes;
|
|
26519
26575
|
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
26520
|
-
const maxDepth = options.maxDepth === void 0 ?
|
|
26576
|
+
const maxDepth = options.maxDepth === void 0 ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
|
|
26521
26577
|
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
26578
|
+
const stack = [];
|
|
26522
26579
|
if (!utils$1.isFunction(visitor)) {
|
|
26523
26580
|
throw new TypeError("visitor must be a function");
|
|
26524
26581
|
}
|
|
@@ -26534,10 +26591,38 @@ var require_axios = __commonJS({
|
|
|
26534
26591
|
throw new AxiosError("Blob is not supported. Use a Buffer instead.");
|
|
26535
26592
|
}
|
|
26536
26593
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
26537
|
-
|
|
26594
|
+
if (useBlob && typeof _Blob === "function") {
|
|
26595
|
+
return new _Blob([value]);
|
|
26596
|
+
}
|
|
26597
|
+
if (typeof Buffer !== "undefined") {
|
|
26598
|
+
return Buffer.from(value);
|
|
26599
|
+
}
|
|
26600
|
+
throw new AxiosError("Blob is not supported. Use a Buffer instead.", AxiosError.ERR_NOT_SUPPORT);
|
|
26538
26601
|
}
|
|
26539
26602
|
return value;
|
|
26540
26603
|
}
|
|
26604
|
+
function throwIfMaxDepthExceeded(depth) {
|
|
26605
|
+
if (depth > maxDepth) {
|
|
26606
|
+
throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
26607
|
+
}
|
|
26608
|
+
}
|
|
26609
|
+
function stringifyWithDepthLimit(value, depth) {
|
|
26610
|
+
if (maxDepth === Infinity) {
|
|
26611
|
+
return JSON.stringify(value);
|
|
26612
|
+
}
|
|
26613
|
+
const ancestors = [];
|
|
26614
|
+
return JSON.stringify(value, function limitDepth(_key, currentValue) {
|
|
26615
|
+
if (!utils$1.isObject(currentValue)) {
|
|
26616
|
+
return currentValue;
|
|
26617
|
+
}
|
|
26618
|
+
while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
|
|
26619
|
+
ancestors.pop();
|
|
26620
|
+
}
|
|
26621
|
+
ancestors.push(currentValue);
|
|
26622
|
+
throwIfMaxDepthExceeded(depth + ancestors.length - 1);
|
|
26623
|
+
return currentValue;
|
|
26624
|
+
});
|
|
26625
|
+
}
|
|
26541
26626
|
function defaultVisitor(value, key, path2) {
|
|
26542
26627
|
let arr = value;
|
|
26543
26628
|
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
|
|
@@ -26547,7 +26632,7 @@ var require_axios = __commonJS({
|
|
|
26547
26632
|
if (value && !path2 && typeof value === "object") {
|
|
26548
26633
|
if (utils$1.endsWith(key, "{}")) {
|
|
26549
26634
|
key = metaTokens ? key : key.slice(0, -2);
|
|
26550
|
-
value =
|
|
26635
|
+
value = stringifyWithDepthLimit(value, 1);
|
|
26551
26636
|
} else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
|
|
26552
26637
|
key = removeBrackets(key);
|
|
26553
26638
|
arr.forEach(function each(el, index) {
|
|
@@ -26566,7 +26651,6 @@ var require_axios = __commonJS({
|
|
|
26566
26651
|
formData.append(renderKey(path2, key, dots), convertValue(value));
|
|
26567
26652
|
return false;
|
|
26568
26653
|
}
|
|
26569
|
-
const stack = [];
|
|
26570
26654
|
const exposedHelpers = Object.assign(predicates, {
|
|
26571
26655
|
defaultVisitor,
|
|
26572
26656
|
convertValue,
|
|
@@ -26574,11 +26658,9 @@ var require_axios = __commonJS({
|
|
|
26574
26658
|
});
|
|
26575
26659
|
function build(value, path2, depth = 0) {
|
|
26576
26660
|
if (utils$1.isUndefined(value)) return;
|
|
26577
|
-
|
|
26578
|
-
throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
26579
|
-
}
|
|
26661
|
+
throwIfMaxDepthExceeded(depth);
|
|
26580
26662
|
if (stack.indexOf(value) !== -1) {
|
|
26581
|
-
throw Error("Circular reference detected in " + path2.join("."));
|
|
26663
|
+
throw new Error("Circular reference detected in " + path2.join("."));
|
|
26582
26664
|
}
|
|
26583
26665
|
stack.push(value);
|
|
26584
26666
|
utils$1.forEach(value, function each(el, key) {
|
|
@@ -26617,9 +26699,7 @@ var require_axios = __commonJS({
|
|
|
26617
26699
|
this._pairs.push([name, value]);
|
|
26618
26700
|
};
|
|
26619
26701
|
prototype.toString = function toString3(encoder) {
|
|
26620
|
-
const _encode = encoder ?
|
|
26621
|
-
return encoder.call(this, value, encode$1);
|
|
26622
|
-
} : encode$1;
|
|
26702
|
+
const _encode = encoder ? (value) => encoder.call(this, value, encode$1) : encode$1;
|
|
26623
26703
|
return this._pairs.map(function each(pair) {
|
|
26624
26704
|
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
26625
26705
|
}, "").join("&");
|
|
@@ -26631,11 +26711,12 @@ var require_axios = __commonJS({
|
|
|
26631
26711
|
if (!params) {
|
|
26632
26712
|
return url2;
|
|
26633
26713
|
}
|
|
26634
|
-
|
|
26714
|
+
url2 = url2 || "";
|
|
26635
26715
|
const _options = utils$1.isFunction(options) ? {
|
|
26636
26716
|
serialize: options
|
|
26637
26717
|
} : options;
|
|
26638
|
-
const
|
|
26718
|
+
const _encode = utils$1.getSafeProp(_options, "encode") || encode;
|
|
26719
|
+
const serializeFn = utils$1.getSafeProp(_options, "serialize");
|
|
26639
26720
|
let serializedParams;
|
|
26640
26721
|
if (serializeFn) {
|
|
26641
26722
|
serializedParams = serializeFn(params, _options);
|
|
@@ -26717,7 +26798,9 @@ var require_axios = __commonJS({
|
|
|
26717
26798
|
silentJSONParsing: true,
|
|
26718
26799
|
forcedJSONParsing: true,
|
|
26719
26800
|
clarifyTimeoutError: false,
|
|
26720
|
-
legacyInterceptorReqResOrdering: true
|
|
26801
|
+
legacyInterceptorReqResOrdering: true,
|
|
26802
|
+
advertiseZstdAcceptEncoding: false,
|
|
26803
|
+
validateStatusUndefinedResolves: true
|
|
26721
26804
|
};
|
|
26722
26805
|
var URLSearchParams = url.URLSearchParams;
|
|
26723
26806
|
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
@@ -26782,10 +26865,21 @@ var require_axios = __commonJS({
|
|
|
26782
26865
|
...options
|
|
26783
26866
|
});
|
|
26784
26867
|
}
|
|
26868
|
+
var MAX_DEPTH2 = DEFAULT_FORM_DATA_MAX_DEPTH;
|
|
26869
|
+
function throwIfDepthExceeded(index) {
|
|
26870
|
+
if (index > MAX_DEPTH2) {
|
|
26871
|
+
throw new AxiosError("FormData field is too deeply nested (" + index + " levels). Max depth: " + MAX_DEPTH2, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
26872
|
+
}
|
|
26873
|
+
}
|
|
26785
26874
|
function parsePropPath(name) {
|
|
26786
|
-
|
|
26787
|
-
|
|
26788
|
-
|
|
26875
|
+
const path2 = [];
|
|
26876
|
+
const pattern = /\w+|\[(\w*)]/g;
|
|
26877
|
+
let match2;
|
|
26878
|
+
while ((match2 = pattern.exec(name)) !== null) {
|
|
26879
|
+
throwIfDepthExceeded(path2.length);
|
|
26880
|
+
path2.push(match2[0] === "[]" ? "" : match2[1] || match2[0]);
|
|
26881
|
+
}
|
|
26882
|
+
return path2;
|
|
26789
26883
|
}
|
|
26790
26884
|
function arrayToObject(arr) {
|
|
26791
26885
|
const obj = {};
|
|
@@ -26801,6 +26895,7 @@ var require_axios = __commonJS({
|
|
|
26801
26895
|
}
|
|
26802
26896
|
function formDataToJSON(formData) {
|
|
26803
26897
|
function buildPath(path2, value, target, index) {
|
|
26898
|
+
throwIfDepthExceeded(index);
|
|
26804
26899
|
let name = path2[index++];
|
|
26805
26900
|
if (name === "__proto__") return true;
|
|
26806
26901
|
const isNumericKey = Number.isFinite(+name);
|
|
@@ -26987,9 +27082,28 @@ var require_axios = __commonJS({
|
|
|
26987
27082
|
function combineURLs(baseURL, relativeURL) {
|
|
26988
27083
|
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
26989
27084
|
}
|
|
26990
|
-
|
|
27085
|
+
var malformedHttpProtocol = /^https?:(?!\/\/)/i;
|
|
27086
|
+
var httpProtocolControlCharacters = /[\t\n\r]/g;
|
|
27087
|
+
function stripLeadingC0ControlOrSpace(url2) {
|
|
27088
|
+
let i = 0;
|
|
27089
|
+
while (i < url2.length && url2.charCodeAt(i) <= 32) {
|
|
27090
|
+
i++;
|
|
27091
|
+
}
|
|
27092
|
+
return url2.slice(i);
|
|
27093
|
+
}
|
|
27094
|
+
function normalizeURLForProtocolCheck(url2) {
|
|
27095
|
+
return stripLeadingC0ControlOrSpace(url2).replace(httpProtocolControlCharacters, "");
|
|
27096
|
+
}
|
|
27097
|
+
function assertValidHttpProtocolURL(url2, config) {
|
|
27098
|
+
if (typeof url2 === "string" && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url2))) {
|
|
27099
|
+
throw new AxiosError('Invalid URL: missing "//" after protocol', AxiosError.ERR_INVALID_URL, config);
|
|
27100
|
+
}
|
|
27101
|
+
}
|
|
27102
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
|
|
27103
|
+
assertValidHttpProtocolURL(requestedURL, config);
|
|
26991
27104
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
26992
27105
|
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
27106
|
+
assertValidHttpProtocolURL(baseURL, config);
|
|
26993
27107
|
return combineURLs(baseURL, requestedURL);
|
|
26994
27108
|
}
|
|
26995
27109
|
return requestedURL;
|
|
@@ -27059,7 +27173,7 @@ var require_axios = __commonJS({
|
|
|
27059
27173
|
function getEnv(key) {
|
|
27060
27174
|
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
27061
27175
|
}
|
|
27062
|
-
var VERSION2 = "1.
|
|
27176
|
+
var VERSION2 = "1.18.1";
|
|
27063
27177
|
function parseProtocol(url2) {
|
|
27064
27178
|
const match2 = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
|
|
27065
27179
|
return match2 && match2[1] || "";
|
|
@@ -27081,13 +27195,13 @@ var require_axios = __commonJS({
|
|
|
27081
27195
|
const params = match2[2];
|
|
27082
27196
|
const encoding = match2[3] ? "base64" : "utf8";
|
|
27083
27197
|
const body = match2[4];
|
|
27084
|
-
let mime;
|
|
27198
|
+
let mime = "";
|
|
27085
27199
|
if (type) {
|
|
27086
27200
|
mime = params ? type + params : type;
|
|
27087
27201
|
} else if (params) {
|
|
27088
27202
|
mime = "text/plain" + params;
|
|
27089
27203
|
}
|
|
27090
|
-
const buffer = Buffer.from(decodeURIComponent(body), encoding);
|
|
27204
|
+
const buffer = encoding === "base64" ? Buffer.from(body, "base64") : Buffer.from(decodeURIComponent(body), encoding);
|
|
27091
27205
|
if (asBlob) {
|
|
27092
27206
|
if (!_Blob) {
|
|
27093
27207
|
throw new AxiosError("Blob is not supported", AxiosError.ERR_NOT_SUPPORT);
|
|
@@ -27276,10 +27390,10 @@ var require_axios = __commonJS({
|
|
|
27276
27390
|
boundary = tag + "-" + platform.generateString(size, BOUNDARY_ALPHABET)
|
|
27277
27391
|
} = options || {};
|
|
27278
27392
|
if (!utils$1.isFormData(form)) {
|
|
27279
|
-
throw TypeError("FormData instance required");
|
|
27393
|
+
throw new TypeError("FormData instance required");
|
|
27280
27394
|
}
|
|
27281
27395
|
if (boundary.length < 1 || boundary.length > 70) {
|
|
27282
|
-
throw Error("boundary must be 1-70 characters long");
|
|
27396
|
+
throw new Error("boundary must be 1-70 characters long");
|
|
27283
27397
|
}
|
|
27284
27398
|
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
|
|
27285
27399
|
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
|
|
@@ -27324,6 +27438,81 @@ var require_axios = __commonJS({
|
|
|
27324
27438
|
this.__transform(chunk, encoding, callback);
|
|
27325
27439
|
}
|
|
27326
27440
|
};
|
|
27441
|
+
var Http2Sessions = class {
|
|
27442
|
+
constructor() {
|
|
27443
|
+
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
27444
|
+
}
|
|
27445
|
+
getSession(authority, options) {
|
|
27446
|
+
options = Object.assign({
|
|
27447
|
+
sessionTimeout: 1e3
|
|
27448
|
+
}, options);
|
|
27449
|
+
let authoritySessions = this.sessions[authority];
|
|
27450
|
+
if (authoritySessions) {
|
|
27451
|
+
let len = authoritySessions.length;
|
|
27452
|
+
for (let i = 0; i < len; i++) {
|
|
27453
|
+
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
27454
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) {
|
|
27455
|
+
return sessionHandle;
|
|
27456
|
+
}
|
|
27457
|
+
}
|
|
27458
|
+
}
|
|
27459
|
+
const session = http2.connect(authority, options);
|
|
27460
|
+
let removed;
|
|
27461
|
+
let timer;
|
|
27462
|
+
const removeSession = () => {
|
|
27463
|
+
if (removed) {
|
|
27464
|
+
return;
|
|
27465
|
+
}
|
|
27466
|
+
removed = true;
|
|
27467
|
+
if (timer) {
|
|
27468
|
+
clearTimeout(timer);
|
|
27469
|
+
timer = null;
|
|
27470
|
+
}
|
|
27471
|
+
let entries = authoritySessions, len = entries.length, i = len;
|
|
27472
|
+
while (i--) {
|
|
27473
|
+
if (entries[i][0] === session) {
|
|
27474
|
+
if (len === 1) {
|
|
27475
|
+
delete this.sessions[authority];
|
|
27476
|
+
} else {
|
|
27477
|
+
entries.splice(i, 1);
|
|
27478
|
+
}
|
|
27479
|
+
if (!session.closed) {
|
|
27480
|
+
session.close();
|
|
27481
|
+
}
|
|
27482
|
+
return;
|
|
27483
|
+
}
|
|
27484
|
+
}
|
|
27485
|
+
};
|
|
27486
|
+
const originalRequestFn = session.request;
|
|
27487
|
+
const {
|
|
27488
|
+
sessionTimeout
|
|
27489
|
+
} = options;
|
|
27490
|
+
if (sessionTimeout != null) {
|
|
27491
|
+
let streamsCount = 0;
|
|
27492
|
+
session.request = function() {
|
|
27493
|
+
const stream2 = originalRequestFn.apply(this, arguments);
|
|
27494
|
+
streamsCount++;
|
|
27495
|
+
if (timer) {
|
|
27496
|
+
clearTimeout(timer);
|
|
27497
|
+
timer = null;
|
|
27498
|
+
}
|
|
27499
|
+
stream2.once("close", () => {
|
|
27500
|
+
if (!--streamsCount) {
|
|
27501
|
+
timer = setTimeout(() => {
|
|
27502
|
+
timer = null;
|
|
27503
|
+
removeSession();
|
|
27504
|
+
}, sessionTimeout);
|
|
27505
|
+
}
|
|
27506
|
+
});
|
|
27507
|
+
return stream2;
|
|
27508
|
+
};
|
|
27509
|
+
}
|
|
27510
|
+
session.once("close", removeSession);
|
|
27511
|
+
let entry = [session, options];
|
|
27512
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
27513
|
+
return session;
|
|
27514
|
+
}
|
|
27515
|
+
};
|
|
27327
27516
|
var callbackify = (fn, reducer) => {
|
|
27328
27517
|
return utils$1.isAsyncFn(fn) ? function(...args) {
|
|
27329
27518
|
const cb = args.pop();
|
|
@@ -27336,13 +27525,29 @@ var require_axios = __commonJS({
|
|
|
27336
27525
|
}, cb);
|
|
27337
27526
|
} : fn;
|
|
27338
27527
|
};
|
|
27339
|
-
var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
|
|
27528
|
+
var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]);
|
|
27340
27529
|
var isIPv4Loopback = (host) => {
|
|
27341
27530
|
const parts = host.split(".");
|
|
27342
27531
|
if (parts.length !== 4) return false;
|
|
27343
27532
|
if (parts[0] !== "127") return false;
|
|
27344
27533
|
return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
|
|
27345
27534
|
};
|
|
27535
|
+
var isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
|
|
27536
|
+
var isIPv6Unspecified = (host) => {
|
|
27537
|
+
if (host === "::") return true;
|
|
27538
|
+
const compressionIndex = host.indexOf("::");
|
|
27539
|
+
if (compressionIndex !== -1) {
|
|
27540
|
+
if (compressionIndex !== host.lastIndexOf("::")) return false;
|
|
27541
|
+
const left = host.slice(0, compressionIndex);
|
|
27542
|
+
const right = host.slice(compressionIndex + 2);
|
|
27543
|
+
const leftGroups = left ? left.split(":") : [];
|
|
27544
|
+
const rightGroups = right ? right.split(":") : [];
|
|
27545
|
+
const explicitGroups = leftGroups.length + rightGroups.length;
|
|
27546
|
+
return explicitGroups < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup);
|
|
27547
|
+
}
|
|
27548
|
+
const groups = host.split(":");
|
|
27549
|
+
return groups.length === 8 && groups.every(isIPv6ZeroGroup);
|
|
27550
|
+
};
|
|
27346
27551
|
var isIPv6Loopback = (host) => {
|
|
27347
27552
|
if (host === "::1") return true;
|
|
27348
27553
|
const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
|
|
@@ -27365,6 +27570,7 @@ var require_axios = __commonJS({
|
|
|
27365
27570
|
if (!host) return false;
|
|
27366
27571
|
if (LOOPBACK_HOSTNAMES.has(host)) return true;
|
|
27367
27572
|
if (isIPv4Loopback(host)) return true;
|
|
27573
|
+
if (isIPv6Unspecified(host)) return true;
|
|
27368
27574
|
return isIPv6Loopback(host);
|
|
27369
27575
|
};
|
|
27370
27576
|
var DEFAULT_PORTS = {
|
|
@@ -27557,6 +27763,8 @@ var require_axios = __commonJS({
|
|
|
27557
27763
|
}), throttled[1]];
|
|
27558
27764
|
};
|
|
27559
27765
|
var asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
|
|
27766
|
+
var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
|
|
27767
|
+
var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
|
|
27560
27768
|
function estimateDataURLDecodedBytes(url2) {
|
|
27561
27769
|
if (!url2 || typeof url2 !== "string") return 0;
|
|
27562
27770
|
if (!url2.startsWith("data:")) return 0;
|
|
@@ -27572,7 +27780,7 @@ var require_axios = __commonJS({
|
|
|
27572
27780
|
if (body.charCodeAt(i) === 37 && i + 2 < len) {
|
|
27573
27781
|
const a = body.charCodeAt(i + 1);
|
|
27574
27782
|
const b = body.charCodeAt(i + 2);
|
|
27575
|
-
const isHex = (a
|
|
27783
|
+
const isHex = isHexDigit(a) && isHexDigit(b);
|
|
27576
27784
|
if (isHex) {
|
|
27577
27785
|
effectiveLen -= 2;
|
|
27578
27786
|
i += 2;
|
|
@@ -27604,13 +27812,13 @@ var require_axios = __commonJS({
|
|
|
27604
27812
|
const bytes2 = groups * 3 - (pad3 || 0);
|
|
27605
27813
|
return bytes2 > 0 ? bytes2 : 0;
|
|
27606
27814
|
}
|
|
27607
|
-
if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
|
|
27608
|
-
return Buffer.byteLength(body, "utf8");
|
|
27609
|
-
}
|
|
27610
27815
|
let bytes = 0;
|
|
27611
27816
|
for (let i = 0, len = body.length; i < len; i++) {
|
|
27612
27817
|
const c = body.charCodeAt(i);
|
|
27613
|
-
if (c
|
|
27818
|
+
if (c === 37 && isPercentEncodedByte(body, i, len)) {
|
|
27819
|
+
bytes += 1;
|
|
27820
|
+
i += 2;
|
|
27821
|
+
} else if (c < 128) {
|
|
27614
27822
|
bytes += 1;
|
|
27615
27823
|
} else if (c < 2048) {
|
|
27616
27824
|
bytes += 2;
|
|
@@ -27636,7 +27844,14 @@ var require_axios = __commonJS({
|
|
|
27636
27844
|
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
|
27637
27845
|
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
|
27638
27846
|
};
|
|
27847
|
+
var zstdOptions = {
|
|
27848
|
+
flush: zlib.constants.ZSTD_e_flush,
|
|
27849
|
+
finishFlush: zlib.constants.ZSTD_e_flush
|
|
27850
|
+
};
|
|
27639
27851
|
var isBrotliSupported = utils$1.isFunction(zlib.createBrotliDecompress);
|
|
27852
|
+
var isZstdSupported = utils$1.isFunction(zlib.createZstdDecompress);
|
|
27853
|
+
var ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : "");
|
|
27854
|
+
var ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : "");
|
|
27640
27855
|
var {
|
|
27641
27856
|
http: httpFollow,
|
|
27642
27857
|
https: httpsFollow
|
|
@@ -27659,6 +27874,33 @@ var require_axios = __commonJS({
|
|
|
27659
27874
|
var kAxiosInstalledTunnel = /* @__PURE__ */ Symbol("axios.http.installedTunnel");
|
|
27660
27875
|
var tunnelingAgentCache = /* @__PURE__ */ new Map();
|
|
27661
27876
|
var tunnelingAgentCacheUser = /* @__PURE__ */ new WeakMap();
|
|
27877
|
+
var NODE_NATIVE_ENV_PROXY_SUPPORT = {
|
|
27878
|
+
22: 21,
|
|
27879
|
+
24: 5
|
|
27880
|
+
};
|
|
27881
|
+
function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) {
|
|
27882
|
+
if (!nodeVersion) {
|
|
27883
|
+
return false;
|
|
27884
|
+
}
|
|
27885
|
+
const [major, minor] = nodeVersion.split(".").map((part) => Number(part));
|
|
27886
|
+
if (!Number.isInteger(major) || !Number.isInteger(minor)) {
|
|
27887
|
+
return false;
|
|
27888
|
+
}
|
|
27889
|
+
if (major > 24) {
|
|
27890
|
+
return true;
|
|
27891
|
+
}
|
|
27892
|
+
return NODE_NATIVE_ENV_PROXY_SUPPORT[major] != null && minor >= NODE_NATIVE_ENV_PROXY_SUPPORT[major];
|
|
27893
|
+
}
|
|
27894
|
+
function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) {
|
|
27895
|
+
if (!isNodeNativeEnvProxySupported(nodeVersion)) {
|
|
27896
|
+
return false;
|
|
27897
|
+
}
|
|
27898
|
+
const agentOptions = agent && agent.options;
|
|
27899
|
+
return Boolean(agentOptions && utils$1.hasOwnProp(agentOptions, "proxyEnv") && agentOptions.proxyEnv != null);
|
|
27900
|
+
}
|
|
27901
|
+
function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
|
|
27902
|
+
return isHttps.test(options.protocol) ? configHttpsAgent || https.globalAgent : configHttpAgent || http.globalAgent;
|
|
27903
|
+
}
|
|
27662
27904
|
function getTunnelingAgent(agentOptions, userHttpsAgent) {
|
|
27663
27905
|
const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
|
|
27664
27906
|
const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
|
|
@@ -27669,6 +27911,18 @@ var require_axios = __commonJS({
|
|
|
27669
27911
|
...agentOptions
|
|
27670
27912
|
} : agentOptions;
|
|
27671
27913
|
agent = new HttpsProxyAgent(merged);
|
|
27914
|
+
if (userHttpsAgent && userHttpsAgent.options) {
|
|
27915
|
+
const originTLSOptions = {
|
|
27916
|
+
...userHttpsAgent.options
|
|
27917
|
+
};
|
|
27918
|
+
const callback = agent.callback;
|
|
27919
|
+
agent.callback = function axiosTunnelingAgentCallback(req, opts) {
|
|
27920
|
+
return callback.call(this, req, {
|
|
27921
|
+
...originTLSOptions,
|
|
27922
|
+
...opts
|
|
27923
|
+
});
|
|
27924
|
+
};
|
|
27925
|
+
}
|
|
27672
27926
|
agent[kAxiosInstalledTunnel] = true;
|
|
27673
27927
|
cache.set(key, agent);
|
|
27674
27928
|
return agent;
|
|
@@ -27676,7 +27930,7 @@ var require_axios = __commonJS({
|
|
|
27676
27930
|
var supportedProtocols = platform.protocols.map((protocol) => {
|
|
27677
27931
|
return protocol + ":";
|
|
27678
27932
|
});
|
|
27679
|
-
var decodeURIComponentSafe = (value) => {
|
|
27933
|
+
var decodeURIComponentSafe$1 = (value) => {
|
|
27680
27934
|
if (!utils$1.isString(value)) {
|
|
27681
27935
|
return value;
|
|
27682
27936
|
}
|
|
@@ -27690,89 +27944,45 @@ var require_axios = __commonJS({
|
|
|
27690
27944
|
stream2.on("end", flush).on("error", flush);
|
|
27691
27945
|
return throttled;
|
|
27692
27946
|
};
|
|
27693
|
-
var Http2Sessions = class {
|
|
27694
|
-
constructor() {
|
|
27695
|
-
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
27696
|
-
}
|
|
27697
|
-
getSession(authority, options) {
|
|
27698
|
-
options = Object.assign({
|
|
27699
|
-
sessionTimeout: 1e3
|
|
27700
|
-
}, options);
|
|
27701
|
-
let authoritySessions = this.sessions[authority];
|
|
27702
|
-
if (authoritySessions) {
|
|
27703
|
-
let len = authoritySessions.length;
|
|
27704
|
-
for (let i = 0; i < len; i++) {
|
|
27705
|
-
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
27706
|
-
if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) {
|
|
27707
|
-
return sessionHandle;
|
|
27708
|
-
}
|
|
27709
|
-
}
|
|
27710
|
-
}
|
|
27711
|
-
const session = http2.connect(authority, options);
|
|
27712
|
-
let removed;
|
|
27713
|
-
const removeSession = () => {
|
|
27714
|
-
if (removed) {
|
|
27715
|
-
return;
|
|
27716
|
-
}
|
|
27717
|
-
removed = true;
|
|
27718
|
-
let entries = authoritySessions, len = entries.length, i = len;
|
|
27719
|
-
while (i--) {
|
|
27720
|
-
if (entries[i][0] === session) {
|
|
27721
|
-
if (len === 1) {
|
|
27722
|
-
delete this.sessions[authority];
|
|
27723
|
-
} else {
|
|
27724
|
-
entries.splice(i, 1);
|
|
27725
|
-
}
|
|
27726
|
-
if (!session.closed) {
|
|
27727
|
-
session.close();
|
|
27728
|
-
}
|
|
27729
|
-
return;
|
|
27730
|
-
}
|
|
27731
|
-
}
|
|
27732
|
-
};
|
|
27733
|
-
const originalRequestFn = session.request;
|
|
27734
|
-
const {
|
|
27735
|
-
sessionTimeout
|
|
27736
|
-
} = options;
|
|
27737
|
-
if (sessionTimeout != null) {
|
|
27738
|
-
let timer;
|
|
27739
|
-
let streamsCount = 0;
|
|
27740
|
-
session.request = function() {
|
|
27741
|
-
const stream2 = originalRequestFn.apply(this, arguments);
|
|
27742
|
-
streamsCount++;
|
|
27743
|
-
if (timer) {
|
|
27744
|
-
clearTimeout(timer);
|
|
27745
|
-
timer = null;
|
|
27746
|
-
}
|
|
27747
|
-
stream2.once("close", () => {
|
|
27748
|
-
if (!--streamsCount) {
|
|
27749
|
-
timer = setTimeout(() => {
|
|
27750
|
-
timer = null;
|
|
27751
|
-
removeSession();
|
|
27752
|
-
}, sessionTimeout);
|
|
27753
|
-
}
|
|
27754
|
-
});
|
|
27755
|
-
return stream2;
|
|
27756
|
-
};
|
|
27757
|
-
}
|
|
27758
|
-
session.once("close", removeSession);
|
|
27759
|
-
let entry = [session, options];
|
|
27760
|
-
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
27761
|
-
return session;
|
|
27762
|
-
}
|
|
27763
|
-
};
|
|
27764
27947
|
var http2Sessions = new Http2Sessions();
|
|
27765
27948
|
function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
|
|
27766
27949
|
if (options.beforeRedirects.proxy) {
|
|
27767
27950
|
options.beforeRedirects.proxy(options);
|
|
27768
27951
|
}
|
|
27952
|
+
if (options.beforeRedirects.auth) {
|
|
27953
|
+
options.beforeRedirects.auth(options);
|
|
27954
|
+
}
|
|
27955
|
+
if (options.beforeRedirects.sensitiveHeaders) {
|
|
27956
|
+
options.beforeRedirects.sensitiveHeaders(options, requestDetails);
|
|
27957
|
+
}
|
|
27769
27958
|
if (options.beforeRedirects.config) {
|
|
27770
27959
|
options.beforeRedirects.config(options, responseDetails, requestDetails);
|
|
27771
27960
|
}
|
|
27772
27961
|
}
|
|
27773
|
-
function
|
|
27962
|
+
function stripMatchingHeaders(headers, sensitiveSet) {
|
|
27963
|
+
if (!headers) {
|
|
27964
|
+
return;
|
|
27965
|
+
}
|
|
27966
|
+
Object.keys(headers).forEach((header) => {
|
|
27967
|
+
if (sensitiveSet.has(header.toLowerCase())) {
|
|
27968
|
+
delete headers[header];
|
|
27969
|
+
}
|
|
27970
|
+
});
|
|
27971
|
+
}
|
|
27972
|
+
function isSameOriginRedirect(redirectOptions, requestDetails) {
|
|
27973
|
+
if (!requestDetails) {
|
|
27974
|
+
return false;
|
|
27975
|
+
}
|
|
27976
|
+
try {
|
|
27977
|
+
return new URL(requestDetails.url).origin === new URL(redirectOptions.href).origin;
|
|
27978
|
+
} catch (e) {
|
|
27979
|
+
return false;
|
|
27980
|
+
}
|
|
27981
|
+
}
|
|
27982
|
+
function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent) {
|
|
27774
27983
|
let proxy = configProxy;
|
|
27775
|
-
|
|
27984
|
+
const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
|
|
27985
|
+
if (!proxy && proxy !== false && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
|
|
27776
27986
|
const proxyUrl = getProxyForUrl(location);
|
|
27777
27987
|
if (proxyUrl) {
|
|
27778
27988
|
if (!shouldBypassProxy(location)) {
|
|
@@ -27863,7 +28073,7 @@ var require_axios = __commonJS({
|
|
|
27863
28073
|
}
|
|
27864
28074
|
}
|
|
27865
28075
|
options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
|
|
27866
|
-
setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent);
|
|
28076
|
+
setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent, configHttpAgent);
|
|
27867
28077
|
};
|
|
27868
28078
|
}
|
|
27869
28079
|
var isHttpAdapterSupported = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
|
|
@@ -27940,16 +28150,25 @@ var require_axios = __commonJS({
|
|
|
27940
28150
|
};
|
|
27941
28151
|
var httpAdapter = isHttpAdapterSupported && function httpAdapter2(config) {
|
|
27942
28152
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
27943
|
-
const own2 = (key) => utils$1.
|
|
28153
|
+
const own2 = (key) => utils$1.getSafeProp(config, key);
|
|
28154
|
+
const transitional = own2("transitional") || transitionalDefaults;
|
|
27944
28155
|
let data = own2("data");
|
|
27945
28156
|
let lookup = own2("lookup");
|
|
27946
28157
|
let family = own2("family");
|
|
27947
28158
|
let httpVersion = own2("httpVersion");
|
|
27948
28159
|
if (httpVersion === void 0) httpVersion = 1;
|
|
27949
28160
|
let http2Options = own2("http2Options");
|
|
28161
|
+
const httpAgent = own2("httpAgent");
|
|
28162
|
+
const httpsAgent = own2("httpsAgent");
|
|
28163
|
+
const configProxy = own2("proxy");
|
|
27950
28164
|
const responseType = own2("responseType");
|
|
27951
28165
|
const responseEncoding = own2("responseEncoding");
|
|
27952
|
-
const
|
|
28166
|
+
const socketPath = own2("socketPath");
|
|
28167
|
+
const method = own2("method").toUpperCase();
|
|
28168
|
+
const maxRedirects = own2("maxRedirects");
|
|
28169
|
+
const maxBodyLength = own2("maxBodyLength");
|
|
28170
|
+
const maxContentLength = own2("maxContentLength");
|
|
28171
|
+
const decompress = own2("decompress");
|
|
27953
28172
|
let isDone;
|
|
27954
28173
|
let rejected = false;
|
|
27955
28174
|
let req;
|
|
@@ -27979,7 +28198,6 @@ var require_axios = __commonJS({
|
|
|
27979
28198
|
try {
|
|
27980
28199
|
abortEmitter.emit("abort", !reason || reason.type ? new CanceledError(null, config, req) : reason);
|
|
27981
28200
|
} catch (err) {
|
|
27982
|
-
console.warn("emit error", err);
|
|
27983
28201
|
}
|
|
27984
28202
|
}
|
|
27985
28203
|
function clearConnectPhaseTimer() {
|
|
@@ -27989,10 +28207,11 @@ var require_axios = __commonJS({
|
|
|
27989
28207
|
}
|
|
27990
28208
|
}
|
|
27991
28209
|
function createTimeoutError() {
|
|
27992
|
-
|
|
27993
|
-
|
|
27994
|
-
|
|
27995
|
-
|
|
28210
|
+
const configTimeout = own2("timeout");
|
|
28211
|
+
let timeoutErrorMessage = configTimeout ? "timeout of " + configTimeout + "ms exceeded" : "timeout exceeded";
|
|
28212
|
+
const configTimeoutErrorMessage = own2("timeoutErrorMessage");
|
|
28213
|
+
if (configTimeoutErrorMessage) {
|
|
28214
|
+
timeoutErrorMessage = configTimeoutErrorMessage;
|
|
27996
28215
|
}
|
|
27997
28216
|
return new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req);
|
|
27998
28217
|
}
|
|
@@ -28033,15 +28252,16 @@ var require_axios = __commonJS({
|
|
|
28033
28252
|
onFinished();
|
|
28034
28253
|
}
|
|
28035
28254
|
});
|
|
28036
|
-
const fullPath = buildFullPath(
|
|
28037
|
-
const
|
|
28255
|
+
const fullPath = buildFullPath(own2("baseURL"), own2("url"), own2("allowAbsoluteUrls"), config);
|
|
28256
|
+
const urlBase = socketPath ? "http://localhost" : platform.hasBrowserEnv ? platform.origin : void 0;
|
|
28257
|
+
const parsed = new URL(fullPath, urlBase);
|
|
28038
28258
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
28039
28259
|
if (protocol === "data:") {
|
|
28040
|
-
if (
|
|
28041
|
-
const dataUrl = String(
|
|
28260
|
+
if (maxContentLength > -1) {
|
|
28261
|
+
const dataUrl = String(own2("url") || fullPath || "");
|
|
28042
28262
|
const estimated = estimateDataURLDecodedBytes(dataUrl);
|
|
28043
|
-
if (estimated >
|
|
28044
|
-
return reject(new AxiosError("maxContentLength size of " +
|
|
28263
|
+
if (estimated > maxContentLength) {
|
|
28264
|
+
return reject(new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config));
|
|
28045
28265
|
}
|
|
28046
28266
|
}
|
|
28047
28267
|
let convertedData;
|
|
@@ -28054,7 +28274,7 @@ var require_axios = __commonJS({
|
|
|
28054
28274
|
});
|
|
28055
28275
|
}
|
|
28056
28276
|
try {
|
|
28057
|
-
convertedData = fromDataURI(
|
|
28277
|
+
convertedData = fromDataURI(own2("url"), responseType === "blob", {
|
|
28058
28278
|
Blob: config.env && config.env.Blob
|
|
28059
28279
|
});
|
|
28060
28280
|
} catch (err) {
|
|
@@ -28119,7 +28339,7 @@ var require_axios = __commonJS({
|
|
|
28119
28339
|
return reject(new AxiosError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError.ERR_BAD_REQUEST, config));
|
|
28120
28340
|
}
|
|
28121
28341
|
headers.setContentLength(data.length, false);
|
|
28122
|
-
if (
|
|
28342
|
+
if (maxBodyLength > -1 && data.length > maxBodyLength) {
|
|
28123
28343
|
return reject(new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config));
|
|
28124
28344
|
}
|
|
28125
28345
|
}
|
|
@@ -28144,34 +28364,33 @@ var require_axios = __commonJS({
|
|
|
28144
28364
|
let auth = void 0;
|
|
28145
28365
|
const configAuth = own2("auth");
|
|
28146
28366
|
if (configAuth) {
|
|
28147
|
-
const username = configAuth
|
|
28148
|
-
const password = configAuth
|
|
28367
|
+
const username = utils$1.getSafeProp(configAuth, "username") || "";
|
|
28368
|
+
const password = utils$1.getSafeProp(configAuth, "password") || "";
|
|
28149
28369
|
auth = username + ":" + password;
|
|
28150
28370
|
}
|
|
28151
|
-
if (!auth && parsed.username) {
|
|
28152
|
-
const urlUsername = decodeURIComponentSafe(parsed.username);
|
|
28153
|
-
const urlPassword = decodeURIComponentSafe(parsed.password);
|
|
28371
|
+
if (!auth && (parsed.username || parsed.password)) {
|
|
28372
|
+
const urlUsername = decodeURIComponentSafe$1(parsed.username);
|
|
28373
|
+
const urlPassword = decodeURIComponentSafe$1(parsed.password);
|
|
28154
28374
|
auth = urlUsername + ":" + urlPassword;
|
|
28155
28375
|
}
|
|
28156
28376
|
auth && headers.delete("authorization");
|
|
28157
28377
|
let path$1;
|
|
28158
28378
|
try {
|
|
28159
|
-
path$1 = buildURL(parsed.pathname + parsed.search,
|
|
28379
|
+
path$1 = buildURL(parsed.pathname + parsed.search, own2("params"), own2("paramsSerializer")).replace(/^\?/, "");
|
|
28160
28380
|
} catch (err) {
|
|
28161
|
-
|
|
28162
|
-
|
|
28163
|
-
|
|
28164
|
-
|
|
28165
|
-
return reject(customErr);
|
|
28381
|
+
return reject(AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config, null, null, {
|
|
28382
|
+
url: own2("url"),
|
|
28383
|
+
exists: true
|
|
28384
|
+
}));
|
|
28166
28385
|
}
|
|
28167
|
-
headers.set("Accept-Encoding",
|
|
28386
|
+
headers.set("Accept-Encoding", utils$1.hasOwnProp(transitional, "advertiseZstdAcceptEncoding") && transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false);
|
|
28168
28387
|
const options = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
28169
28388
|
path: path$1,
|
|
28170
28389
|
method,
|
|
28171
28390
|
headers: toByteStringHeaderObject(headers),
|
|
28172
28391
|
agents: {
|
|
28173
|
-
http:
|
|
28174
|
-
https:
|
|
28392
|
+
http: httpAgent,
|
|
28393
|
+
https: httpsAgent
|
|
28175
28394
|
},
|
|
28176
28395
|
auth,
|
|
28177
28396
|
protocol,
|
|
@@ -28181,29 +28400,31 @@ var require_axios = __commonJS({
|
|
|
28181
28400
|
http2Options
|
|
28182
28401
|
});
|
|
28183
28402
|
!utils$1.isUndefined(lookup) && (options.lookup = lookup);
|
|
28184
|
-
if (
|
|
28185
|
-
if (typeof
|
|
28403
|
+
if (socketPath) {
|
|
28404
|
+
if (typeof socketPath !== "string") {
|
|
28186
28405
|
return reject(new AxiosError("socketPath must be a string", AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
28187
28406
|
}
|
|
28188
|
-
|
|
28189
|
-
|
|
28190
|
-
const
|
|
28407
|
+
const allowedSocketPaths = own2("allowedSocketPaths");
|
|
28408
|
+
if (allowedSocketPaths != null) {
|
|
28409
|
+
const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
|
|
28410
|
+
const resolvedSocket = path.resolve(socketPath);
|
|
28191
28411
|
const isAllowed = allowed.some((entry) => typeof entry === "string" && path.resolve(entry) === resolvedSocket);
|
|
28192
28412
|
if (!isAllowed) {
|
|
28193
|
-
return reject(new AxiosError(`socketPath "${
|
|
28413
|
+
return reject(new AxiosError(`socketPath "${socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
28194
28414
|
}
|
|
28195
28415
|
}
|
|
28196
|
-
options.socketPath =
|
|
28416
|
+
options.socketPath = socketPath;
|
|
28197
28417
|
} else {
|
|
28198
28418
|
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
28199
28419
|
options.port = parsed.port;
|
|
28200
|
-
setProxy(options,
|
|
28420
|
+
setProxy(options, configProxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path, false, httpsAgent, httpAgent);
|
|
28201
28421
|
}
|
|
28202
28422
|
let transport;
|
|
28203
28423
|
let isNativeTransport = false;
|
|
28424
|
+
let transportEnforcesMaxBodyLength = false;
|
|
28204
28425
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
28205
28426
|
if (options.agent == null) {
|
|
28206
|
-
options.agent = isHttpsRequest ?
|
|
28427
|
+
options.agent = isHttpsRequest ? httpsAgent : httpAgent;
|
|
28207
28428
|
}
|
|
28208
28429
|
if (isHttp2) {
|
|
28209
28430
|
transport = http2Transport;
|
|
@@ -28211,22 +28432,57 @@ var require_axios = __commonJS({
|
|
|
28211
28432
|
const configTransport = own2("transport");
|
|
28212
28433
|
if (configTransport) {
|
|
28213
28434
|
transport = configTransport;
|
|
28214
|
-
} else if (
|
|
28435
|
+
} else if (maxRedirects === 0) {
|
|
28215
28436
|
transport = isHttpsRequest ? https : http;
|
|
28216
28437
|
isNativeTransport = true;
|
|
28217
28438
|
} else {
|
|
28218
|
-
|
|
28219
|
-
|
|
28439
|
+
transportEnforcesMaxBodyLength = true;
|
|
28440
|
+
options.sensitiveHeaders = [];
|
|
28441
|
+
if (maxRedirects) {
|
|
28442
|
+
options.maxRedirects = maxRedirects;
|
|
28220
28443
|
}
|
|
28221
28444
|
const configBeforeRedirect = own2("beforeRedirect");
|
|
28222
28445
|
if (configBeforeRedirect) {
|
|
28223
28446
|
options.beforeRedirects.config = configBeforeRedirect;
|
|
28224
28447
|
}
|
|
28448
|
+
if (auth) {
|
|
28449
|
+
const requestOrigin = parsed.origin;
|
|
28450
|
+
const authToRestore = auth;
|
|
28451
|
+
options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) {
|
|
28452
|
+
try {
|
|
28453
|
+
if (new URL(redirectOptions.href).origin === requestOrigin) {
|
|
28454
|
+
redirectOptions.auth = authToRestore;
|
|
28455
|
+
}
|
|
28456
|
+
} catch (e) {
|
|
28457
|
+
}
|
|
28458
|
+
};
|
|
28459
|
+
}
|
|
28460
|
+
const sensitiveHeaders = own2("sensitiveHeaders");
|
|
28461
|
+
if (sensitiveHeaders != null) {
|
|
28462
|
+
if (!utils$1.isArray(sensitiveHeaders)) {
|
|
28463
|
+
return reject(new AxiosError("sensitiveHeaders must be an array of strings", AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
28464
|
+
}
|
|
28465
|
+
const sensitiveSet = /* @__PURE__ */ new Set();
|
|
28466
|
+
for (const header of sensitiveHeaders) {
|
|
28467
|
+
if (!utils$1.isString(header)) {
|
|
28468
|
+
return reject(new AxiosError("sensitiveHeaders must be an array of strings", AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
28469
|
+
}
|
|
28470
|
+
sensitiveSet.add(header.toLowerCase());
|
|
28471
|
+
}
|
|
28472
|
+
if (sensitiveSet.size) {
|
|
28473
|
+
options.sensitiveHeaders = Array.from(sensitiveSet);
|
|
28474
|
+
options.beforeRedirects.sensitiveHeaders = function beforeRedirectSensitiveHeaders(redirectOptions, requestDetails) {
|
|
28475
|
+
if (!isSameOriginRedirect(redirectOptions, requestDetails)) {
|
|
28476
|
+
stripMatchingHeaders(redirectOptions.headers, sensitiveSet);
|
|
28477
|
+
}
|
|
28478
|
+
};
|
|
28479
|
+
}
|
|
28480
|
+
}
|
|
28225
28481
|
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
28226
28482
|
}
|
|
28227
28483
|
}
|
|
28228
|
-
if (
|
|
28229
|
-
options.maxBodyLength =
|
|
28484
|
+
if (maxBodyLength > -1) {
|
|
28485
|
+
options.maxBodyLength = maxBodyLength;
|
|
28230
28486
|
} else {
|
|
28231
28487
|
options.maxBodyLength = Infinity;
|
|
28232
28488
|
}
|
|
@@ -28245,7 +28501,7 @@ var require_axios = __commonJS({
|
|
|
28245
28501
|
}
|
|
28246
28502
|
let responseStream = res;
|
|
28247
28503
|
const lastRequest = res.req || req;
|
|
28248
|
-
if (
|
|
28504
|
+
if (decompress !== false && res.headers["content-encoding"]) {
|
|
28249
28505
|
if (method === "HEAD" || res.statusCode === 204) {
|
|
28250
28506
|
delete res.headers["content-encoding"];
|
|
28251
28507
|
}
|
|
@@ -28268,6 +28524,13 @@ var require_axios = __commonJS({
|
|
|
28268
28524
|
streams.push(zlib.createBrotliDecompress(brotliOptions));
|
|
28269
28525
|
delete res.headers["content-encoding"];
|
|
28270
28526
|
}
|
|
28527
|
+
break;
|
|
28528
|
+
case "zstd":
|
|
28529
|
+
if (isZstdSupported) {
|
|
28530
|
+
streams.push(zlib.createZstdDecompress(zstdOptions));
|
|
28531
|
+
delete res.headers["content-encoding"];
|
|
28532
|
+
}
|
|
28533
|
+
break;
|
|
28271
28534
|
}
|
|
28272
28535
|
}
|
|
28273
28536
|
responseStream = streams.length > 1 ? stream.pipeline(streams, utils$1.noop) : streams[0];
|
|
@@ -28279,8 +28542,8 @@ var require_axios = __commonJS({
|
|
|
28279
28542
|
request: lastRequest
|
|
28280
28543
|
};
|
|
28281
28544
|
if (responseType === "stream") {
|
|
28282
|
-
if (
|
|
28283
|
-
const limit =
|
|
28545
|
+
if (maxContentLength > -1) {
|
|
28546
|
+
const limit = maxContentLength;
|
|
28284
28547
|
const source = responseStream;
|
|
28285
28548
|
async function* enforceMaxContentLength() {
|
|
28286
28549
|
let totalResponseBytes = 0;
|
|
@@ -28304,10 +28567,10 @@ var require_axios = __commonJS({
|
|
|
28304
28567
|
responseStream.on("data", function handleStreamData(chunk) {
|
|
28305
28568
|
responseBuffer.push(chunk);
|
|
28306
28569
|
totalResponseBytes += chunk.length;
|
|
28307
|
-
if (
|
|
28570
|
+
if (maxContentLength > -1 && totalResponseBytes > maxContentLength) {
|
|
28308
28571
|
rejected = true;
|
|
28309
28572
|
responseStream.destroy();
|
|
28310
|
-
abort(new AxiosError("maxContentLength size of " +
|
|
28573
|
+
abort(new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
|
|
28311
28574
|
}
|
|
28312
28575
|
});
|
|
28313
28576
|
responseStream.on("aborted", function handlerStreamAborted() {
|
|
@@ -28357,7 +28620,9 @@ var require_axios = __commonJS({
|
|
|
28357
28620
|
});
|
|
28358
28621
|
const boundSockets = /* @__PURE__ */ new Set();
|
|
28359
28622
|
req.on("socket", function handleRequestSocket(socket) {
|
|
28360
|
-
socket.setKeepAlive
|
|
28623
|
+
if (typeof socket.setKeepAlive === "function") {
|
|
28624
|
+
socket.setKeepAlive(true, 1e3 * 60);
|
|
28625
|
+
}
|
|
28361
28626
|
if (!socket[kAxiosSocketListener]) {
|
|
28362
28627
|
socket.on("error", function handleSocketError(err) {
|
|
28363
28628
|
const current = socket[kAxiosCurrentReq];
|
|
@@ -28379,8 +28644,8 @@ var require_axios = __commonJS({
|
|
|
28379
28644
|
}
|
|
28380
28645
|
boundSockets.clear();
|
|
28381
28646
|
});
|
|
28382
|
-
if (
|
|
28383
|
-
const timeout = parseInt(
|
|
28647
|
+
if (own2("timeout")) {
|
|
28648
|
+
const timeout = parseInt(own2("timeout"), 10);
|
|
28384
28649
|
if (Number.isNaN(timeout)) {
|
|
28385
28650
|
abort(new AxiosError("error trying to parse `config.timeout` to int", AxiosError.ERR_BAD_OPTION_VALUE, config, req));
|
|
28386
28651
|
return;
|
|
@@ -28412,8 +28677,8 @@ var require_axios = __commonJS({
|
|
|
28412
28677
|
}
|
|
28413
28678
|
});
|
|
28414
28679
|
let uploadStream = data;
|
|
28415
|
-
if (
|
|
28416
|
-
const limit =
|
|
28680
|
+
if (maxBodyLength > -1 && !transportEnforcesMaxBodyLength) {
|
|
28681
|
+
const limit = maxBodyLength;
|
|
28417
28682
|
let bytesSent = 0;
|
|
28418
28683
|
uploadStream = stream.pipeline([data, new stream.Transform({
|
|
28419
28684
|
transform(chunk, _enc, cb) {
|
|
@@ -28469,7 +28734,11 @@ var require_axios = __commonJS({
|
|
|
28469
28734
|
const cookie = cookies2[i].replace(/^\s+/, "");
|
|
28470
28735
|
const eq = cookie.indexOf("=");
|
|
28471
28736
|
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
28472
|
-
|
|
28737
|
+
try {
|
|
28738
|
+
return decodeURIComponent(cookie.slice(eq + 1));
|
|
28739
|
+
} catch (e) {
|
|
28740
|
+
return cookie.slice(eq + 1);
|
|
28741
|
+
}
|
|
28473
28742
|
}
|
|
28474
28743
|
}
|
|
28475
28744
|
return null;
|
|
@@ -28494,6 +28763,7 @@ var require_axios = __commonJS({
|
|
|
28494
28763
|
...thing
|
|
28495
28764
|
} : thing;
|
|
28496
28765
|
function mergeConfig(config1, config2) {
|
|
28766
|
+
config1 = config1 || {};
|
|
28497
28767
|
config2 = config2 || {};
|
|
28498
28768
|
const config = /* @__PURE__ */ Object.create(null);
|
|
28499
28769
|
Object.defineProperty(config, "hasOwnProperty", {
|
|
@@ -28536,6 +28806,23 @@ var require_axios = __commonJS({
|
|
|
28536
28806
|
return getMergedValue(void 0, a);
|
|
28537
28807
|
}
|
|
28538
28808
|
}
|
|
28809
|
+
function getMergedTransitionalOption(prop) {
|
|
28810
|
+
const transitional2 = utils$1.hasOwnProp(config2, "transitional") ? config2.transitional : void 0;
|
|
28811
|
+
if (!utils$1.isUndefined(transitional2)) {
|
|
28812
|
+
if (utils$1.isPlainObject(transitional2)) {
|
|
28813
|
+
if (utils$1.hasOwnProp(transitional2, prop)) {
|
|
28814
|
+
return transitional2[prop];
|
|
28815
|
+
}
|
|
28816
|
+
} else {
|
|
28817
|
+
return void 0;
|
|
28818
|
+
}
|
|
28819
|
+
}
|
|
28820
|
+
const transitional1 = utils$1.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
|
|
28821
|
+
if (utils$1.isPlainObject(transitional1) && utils$1.hasOwnProp(transitional1, prop)) {
|
|
28822
|
+
return transitional1[prop];
|
|
28823
|
+
}
|
|
28824
|
+
return void 0;
|
|
28825
|
+
}
|
|
28539
28826
|
function mergeDirectKeys(a, b, prop) {
|
|
28540
28827
|
if (utils$1.hasOwnProp(config2, prop)) {
|
|
28541
28828
|
return getMergedValue(a, b);
|
|
@@ -28586,6 +28873,13 @@ var require_axios = __commonJS({
|
|
|
28586
28873
|
const configValue = merge2(a, b, prop);
|
|
28587
28874
|
utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
28588
28875
|
});
|
|
28876
|
+
if (utils$1.hasOwnProp(config2, "validateStatus") && utils$1.isUndefined(config2.validateStatus) && getMergedTransitionalOption("validateStatusUndefinedResolves") === false) {
|
|
28877
|
+
if (utils$1.hasOwnProp(config1, "validateStatus")) {
|
|
28878
|
+
config.validateStatus = getMergedValue(void 0, config1.validateStatus);
|
|
28879
|
+
} else {
|
|
28880
|
+
delete config.validateStatus;
|
|
28881
|
+
}
|
|
28882
|
+
}
|
|
28589
28883
|
return config;
|
|
28590
28884
|
}
|
|
28591
28885
|
var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
|
|
@@ -28594,14 +28888,14 @@ var require_axios = __commonJS({
|
|
|
28594
28888
|
headers.set(formHeaders);
|
|
28595
28889
|
return;
|
|
28596
28890
|
}
|
|
28597
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
28891
|
+
Object.entries(formHeaders || {}).forEach(([key, val]) => {
|
|
28598
28892
|
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
28599
28893
|
headers.set(key, val);
|
|
28600
28894
|
}
|
|
28601
28895
|
});
|
|
28602
28896
|
}
|
|
28603
|
-
var encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
|
|
28604
|
-
|
|
28897
|
+
var encodeUTF8$1 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
|
|
28898
|
+
function resolveConfig(config) {
|
|
28605
28899
|
const newConfig = mergeConfig({}, config);
|
|
28606
28900
|
const own2 = (key) => utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
|
|
28607
28901
|
const data = own2("data");
|
|
@@ -28614,12 +28908,18 @@ var require_axios = __commonJS({
|
|
|
28614
28908
|
const allowAbsoluteUrls = own2("allowAbsoluteUrls");
|
|
28615
28909
|
const url2 = own2("url");
|
|
28616
28910
|
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
28617
|
-
newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls),
|
|
28911
|
+
newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls, newConfig), own2("params"), own2("paramsSerializer"));
|
|
28618
28912
|
if (auth) {
|
|
28619
|
-
|
|
28913
|
+
const username = utils$1.getSafeProp(auth, "username") || "";
|
|
28914
|
+
const password = utils$1.getSafeProp(auth, "password") || "";
|
|
28915
|
+
try {
|
|
28916
|
+
headers.set("Authorization", "Basic " + btoa(username + ":" + (password ? encodeUTF8$1(password) : "")));
|
|
28917
|
+
} catch (e) {
|
|
28918
|
+
throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);
|
|
28919
|
+
}
|
|
28620
28920
|
}
|
|
28621
28921
|
if (utils$1.isFormData(data)) {
|
|
28622
|
-
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
28922
|
+
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
|
|
28623
28923
|
headers.setContentType(void 0);
|
|
28624
28924
|
} else if (utils$1.isFunction(data.getHeaders)) {
|
|
28625
28925
|
setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
|
|
@@ -28638,7 +28938,7 @@ var require_axios = __commonJS({
|
|
|
28638
28938
|
}
|
|
28639
28939
|
}
|
|
28640
28940
|
return newConfig;
|
|
28641
|
-
}
|
|
28941
|
+
}
|
|
28642
28942
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
28643
28943
|
var xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
28644
28944
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
@@ -28763,6 +29063,7 @@ var require_axios = __commonJS({
|
|
|
28763
29063
|
const protocol = parseProtocol(_config.url);
|
|
28764
29064
|
if (protocol && !platform.protocols.includes(protocol)) {
|
|
28765
29065
|
reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
|
|
29066
|
+
done();
|
|
28766
29067
|
return;
|
|
28767
29068
|
}
|
|
28768
29069
|
request.send(requestData || null);
|
|
@@ -28798,7 +29099,9 @@ var require_axios = __commonJS({
|
|
|
28798
29099
|
});
|
|
28799
29100
|
signals = null;
|
|
28800
29101
|
};
|
|
28801
|
-
signals.forEach((signal2) => signal2.addEventListener("abort", onabort
|
|
29102
|
+
signals.forEach((signal2) => signal2.addEventListener("abort", onabort, {
|
|
29103
|
+
once: true
|
|
29104
|
+
}));
|
|
28802
29105
|
const {
|
|
28803
29106
|
signal
|
|
28804
29107
|
} = controller;
|
|
@@ -28890,6 +29193,17 @@ var require_axios = __commonJS({
|
|
|
28890
29193
|
var {
|
|
28891
29194
|
isFunction
|
|
28892
29195
|
} = utils$1;
|
|
29196
|
+
var encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
|
|
29197
|
+
var decodeURIComponentSafe = (value) => {
|
|
29198
|
+
if (!utils$1.isString(value)) {
|
|
29199
|
+
return value;
|
|
29200
|
+
}
|
|
29201
|
+
try {
|
|
29202
|
+
return decodeURIComponent(value);
|
|
29203
|
+
} catch (error) {
|
|
29204
|
+
return value;
|
|
29205
|
+
}
|
|
29206
|
+
};
|
|
28893
29207
|
var test = (fn, ...args) => {
|
|
28894
29208
|
try {
|
|
28895
29209
|
return !!fn(...args);
|
|
@@ -28897,6 +29211,14 @@ var require_axios = __commonJS({
|
|
|
28897
29211
|
return false;
|
|
28898
29212
|
}
|
|
28899
29213
|
};
|
|
29214
|
+
var maybeWithAuthCredentials = (url2) => {
|
|
29215
|
+
const protocolIndex = url2.indexOf("://");
|
|
29216
|
+
let urlToCheck = url2;
|
|
29217
|
+
if (protocolIndex !== -1) {
|
|
29218
|
+
urlToCheck = urlToCheck.slice(protocolIndex + 3);
|
|
29219
|
+
}
|
|
29220
|
+
return urlToCheck.includes("@") || urlToCheck.includes(":");
|
|
29221
|
+
};
|
|
28900
29222
|
var factory = (env) => {
|
|
28901
29223
|
const globalObject2 = utils$1.global !== void 0 && utils$1.global !== null ? utils$1.global : globalThis;
|
|
28902
29224
|
const {
|
|
@@ -29000,6 +29322,7 @@ var require_axios = __commonJS({
|
|
|
29000
29322
|
} = resolveConfig(config);
|
|
29001
29323
|
const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
|
|
29002
29324
|
const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
29325
|
+
const own2 = (key) => utils$1.hasOwnProp(config, key) ? config[key] : void 0;
|
|
29003
29326
|
let _fetch = envFetch || fetch;
|
|
29004
29327
|
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
29005
29328
|
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
@@ -29008,7 +29331,39 @@ var require_axios = __commonJS({
|
|
|
29008
29331
|
composedSignal.unsubscribe();
|
|
29009
29332
|
});
|
|
29010
29333
|
let requestContentLength;
|
|
29334
|
+
let pendingBodyError = null;
|
|
29335
|
+
const maxBodyLengthError = () => new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
|
|
29011
29336
|
try {
|
|
29337
|
+
let auth = void 0;
|
|
29338
|
+
const configAuth = own2("auth");
|
|
29339
|
+
if (configAuth) {
|
|
29340
|
+
const username = utils$1.getSafeProp(configAuth, "username") || "";
|
|
29341
|
+
const password = utils$1.getSafeProp(configAuth, "password") || "";
|
|
29342
|
+
auth = {
|
|
29343
|
+
username,
|
|
29344
|
+
password
|
|
29345
|
+
};
|
|
29346
|
+
}
|
|
29347
|
+
if (maybeWithAuthCredentials(url2)) {
|
|
29348
|
+
const parsedURL = new URL(url2, platform.origin);
|
|
29349
|
+
if (!auth && (parsedURL.username || parsedURL.password)) {
|
|
29350
|
+
const urlUsername = decodeURIComponentSafe(parsedURL.username);
|
|
29351
|
+
const urlPassword = decodeURIComponentSafe(parsedURL.password);
|
|
29352
|
+
auth = {
|
|
29353
|
+
username: urlUsername,
|
|
29354
|
+
password: urlPassword
|
|
29355
|
+
};
|
|
29356
|
+
}
|
|
29357
|
+
if (parsedURL.username || parsedURL.password) {
|
|
29358
|
+
parsedURL.username = "";
|
|
29359
|
+
parsedURL.password = "";
|
|
29360
|
+
url2 = parsedURL.href;
|
|
29361
|
+
}
|
|
29362
|
+
}
|
|
29363
|
+
if (auth) {
|
|
29364
|
+
headers.delete("authorization");
|
|
29365
|
+
headers.set("Authorization", "Basic " + btoa(encodeUTF8((auth.username || "") + ":" + (auth.password || ""))));
|
|
29366
|
+
}
|
|
29012
29367
|
if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
|
|
29013
29368
|
const estimated = estimateDataURLDecodedBytes(url2);
|
|
29014
29369
|
if (estimated > maxContentLength) {
|
|
@@ -29016,25 +29371,42 @@ var require_axios = __commonJS({
|
|
|
29016
29371
|
}
|
|
29017
29372
|
}
|
|
29018
29373
|
if (hasMaxBodyLength && method !== "get" && method !== "head") {
|
|
29019
|
-
const outboundLength = await
|
|
29020
|
-
if (typeof outboundLength === "number" && isFinite(outboundLength)
|
|
29021
|
-
|
|
29374
|
+
const outboundLength = await getBodyLength(data);
|
|
29375
|
+
if (typeof outboundLength === "number" && isFinite(outboundLength)) {
|
|
29376
|
+
requestContentLength = outboundLength;
|
|
29377
|
+
if (outboundLength > maxBodyLength) {
|
|
29378
|
+
throw maxBodyLengthError();
|
|
29379
|
+
}
|
|
29022
29380
|
}
|
|
29023
29381
|
}
|
|
29024
|
-
|
|
29025
|
-
|
|
29026
|
-
|
|
29027
|
-
|
|
29028
|
-
duplex: "half"
|
|
29029
|
-
});
|
|
29030
|
-
let contentTypeHeader;
|
|
29031
|
-
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
29032
|
-
headers.setContentType(contentTypeHeader);
|
|
29382
|
+
const mustEnforceStreamBody = hasMaxBodyLength && (utils$1.isReadableStream(data) || utils$1.isStream(data));
|
|
29383
|
+
const trackRequestStream = (stream2, onProgress, flush) => trackStream(stream2, DEFAULT_CHUNK_SIZE, (loadedBytes) => {
|
|
29384
|
+
if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
|
|
29385
|
+
throw pendingBodyError = maxBodyLengthError();
|
|
29033
29386
|
}
|
|
29034
|
-
|
|
29035
|
-
|
|
29036
|
-
|
|
29387
|
+
onProgress && onProgress(loadedBytes);
|
|
29388
|
+
}, flush);
|
|
29389
|
+
if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) {
|
|
29390
|
+
requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
|
|
29391
|
+
if (requestContentLength !== 0 || mustEnforceStreamBody) {
|
|
29392
|
+
let _request = new Request(url2, {
|
|
29393
|
+
method: "POST",
|
|
29394
|
+
body: data,
|
|
29395
|
+
duplex: "half"
|
|
29396
|
+
});
|
|
29397
|
+
let contentTypeHeader;
|
|
29398
|
+
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
29399
|
+
headers.setContentType(contentTypeHeader);
|
|
29400
|
+
}
|
|
29401
|
+
if (_request.body) {
|
|
29402
|
+
const [onProgress, flush] = onUploadProgress && progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))) || [];
|
|
29403
|
+
data = trackRequestStream(_request.body, onProgress, flush);
|
|
29404
|
+
}
|
|
29037
29405
|
}
|
|
29406
|
+
} else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") {
|
|
29407
|
+
data = trackRequestStream(data);
|
|
29408
|
+
} else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") {
|
|
29409
|
+
throw new AxiosError("Stream request bodies are not supported by the current fetch implementation", AxiosError.ERR_NOT_SUPPORT, config, request);
|
|
29038
29410
|
}
|
|
29039
29411
|
if (!utils$1.isString(withCredentials)) {
|
|
29040
29412
|
withCredentials = withCredentials ? "include" : "omit";
|
|
@@ -29058,8 +29430,9 @@ var require_axios = __commonJS({
|
|
|
29058
29430
|
};
|
|
29059
29431
|
request = isRequestSupported && new Request(url2, resolvedOptions);
|
|
29060
29432
|
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
|
|
29433
|
+
const responseHeaders = AxiosHeaders.from(response.headers);
|
|
29061
29434
|
if (hasMaxContentLength) {
|
|
29062
|
-
const declaredLength = utils$1.toFiniteNumber(
|
|
29435
|
+
const declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
|
|
29063
29436
|
if (declaredLength != null && declaredLength > maxContentLength) {
|
|
29064
29437
|
throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
29065
29438
|
}
|
|
@@ -29070,7 +29443,7 @@ var require_axios = __commonJS({
|
|
|
29070
29443
|
["status", "statusText", "headers"].forEach((prop) => {
|
|
29071
29444
|
options[prop] = response[prop];
|
|
29072
29445
|
});
|
|
29073
|
-
const responseContentLength = utils$1.toFiniteNumber(
|
|
29446
|
+
const responseContentLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
|
|
29074
29447
|
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
|
|
29075
29448
|
let bytesRead = 0;
|
|
29076
29449
|
const onChunkProgress = (loadedBytes) => {
|
|
@@ -29121,13 +29494,35 @@ var require_axios = __commonJS({
|
|
|
29121
29494
|
const canceledError = composedSignal.reason;
|
|
29122
29495
|
canceledError.config = config;
|
|
29123
29496
|
request && (canceledError.request = request);
|
|
29124
|
-
err !== canceledError
|
|
29497
|
+
if (err !== canceledError) {
|
|
29498
|
+
Object.defineProperty(canceledError, "cause", {
|
|
29499
|
+
__proto__: null,
|
|
29500
|
+
value: err,
|
|
29501
|
+
writable: true,
|
|
29502
|
+
enumerable: false,
|
|
29503
|
+
configurable: true
|
|
29504
|
+
});
|
|
29505
|
+
}
|
|
29125
29506
|
throw canceledError;
|
|
29126
29507
|
}
|
|
29508
|
+
if (pendingBodyError) {
|
|
29509
|
+
request && !pendingBodyError.request && (pendingBodyError.request = request);
|
|
29510
|
+
throw pendingBodyError;
|
|
29511
|
+
}
|
|
29512
|
+
if (err instanceof AxiosError) {
|
|
29513
|
+
request && !err.request && (err.request = request);
|
|
29514
|
+
throw err;
|
|
29515
|
+
}
|
|
29127
29516
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
29128
|
-
|
|
29129
|
-
|
|
29517
|
+
const networkError = new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response);
|
|
29518
|
+
Object.defineProperty(networkError, "cause", {
|
|
29519
|
+
__proto__: null,
|
|
29520
|
+
value: err.cause || err,
|
|
29521
|
+
writable: true,
|
|
29522
|
+
enumerable: false,
|
|
29523
|
+
configurable: true
|
|
29130
29524
|
});
|
|
29525
|
+
throw networkError;
|
|
29131
29526
|
}
|
|
29132
29527
|
throw AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
29133
29528
|
}
|
|
@@ -29202,7 +29597,7 @@ var require_axios = __commonJS({
|
|
|
29202
29597
|
if (!adapter) {
|
|
29203
29598
|
const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
|
|
29204
29599
|
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
29205
|
-
throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s,
|
|
29600
|
+
throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, AxiosError.ERR_NOT_SUPPORT);
|
|
29206
29601
|
}
|
|
29207
29602
|
return adapter;
|
|
29208
29603
|
}
|
|
@@ -29289,7 +29684,7 @@ var require_axios = __commonJS({
|
|
|
29289
29684
|
};
|
|
29290
29685
|
};
|
|
29291
29686
|
function assertOptions(options, schema, allowUnknown) {
|
|
29292
|
-
if (typeof options !== "object") {
|
|
29687
|
+
if (typeof options !== "object" || options === null) {
|
|
29293
29688
|
throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
|
|
29294
29689
|
}
|
|
29295
29690
|
const keys = Object.keys(options);
|
|
@@ -29380,7 +29775,9 @@ var require_axios = __commonJS({
|
|
|
29380
29775
|
silentJSONParsing: validators.transitional(validators.boolean),
|
|
29381
29776
|
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
29382
29777
|
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
29383
|
-
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
|
|
29778
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
29779
|
+
advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
|
|
29780
|
+
validateStatusUndefinedResolves: validators.transitional(validators.boolean)
|
|
29384
29781
|
}, false);
|
|
29385
29782
|
}
|
|
29386
29783
|
if (paramsSerializer != null) {
|
|
@@ -29470,7 +29867,7 @@ var require_axios = __commonJS({
|
|
|
29470
29867
|
}
|
|
29471
29868
|
getUri(config) {
|
|
29472
29869
|
config = mergeConfig(this.defaults, config);
|
|
29473
|
-
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
29870
|
+
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);
|
|
29474
29871
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
29475
29872
|
}
|
|
29476
29873
|
};
|
|
@@ -29479,7 +29876,7 @@ var require_axios = __commonJS({
|
|
|
29479
29876
|
return this.request(mergeConfig(config || {}, {
|
|
29480
29877
|
method,
|
|
29481
29878
|
url: url2,
|
|
29482
|
-
data: (config
|
|
29879
|
+
data: config && utils$1.hasOwnProp(config, "data") ? config.data : void 0
|
|
29483
29880
|
}));
|
|
29484
29881
|
};
|
|
29485
29882
|
});
|
|
@@ -31067,6 +31464,11 @@ function mapToolChoice(toolChoice) {
|
|
|
31067
31464
|
return void 0;
|
|
31068
31465
|
}
|
|
31069
31466
|
}
|
|
31467
|
+
function mergeRequestConfig(requestConfig, abortSignal) {
|
|
31468
|
+
const { signal: _dropped, ...rest } = requestConfig ?? {};
|
|
31469
|
+
if (abortSignal) return { ...rest, signal: abortSignal };
|
|
31470
|
+
return Object.keys(rest).length > 0 ? rest : void 0;
|
|
31471
|
+
}
|
|
31070
31472
|
function normalizeEmbedding(embedding) {
|
|
31071
31473
|
if (Array.isArray(embedding)) {
|
|
31072
31474
|
return embedding;
|
|
@@ -31133,7 +31535,7 @@ var VERSION;
|
|
|
31133
31535
|
var init_version = __esm({
|
|
31134
31536
|
"src/version.ts"() {
|
|
31135
31537
|
"use strict";
|
|
31136
|
-
VERSION = true ? "4.
|
|
31538
|
+
VERSION = true ? "4.8.0" : "0.0.0-test";
|
|
31137
31539
|
}
|
|
31138
31540
|
});
|
|
31139
31541
|
|
|
@@ -31168,7 +31570,13 @@ var init_base_embedding_model_strategy = __esm({
|
|
|
31168
31570
|
const warnings = [];
|
|
31169
31571
|
this.resolveWarnings(settings, warnings);
|
|
31170
31572
|
const client = this.createClient(config, settings, embeddingOptions);
|
|
31171
|
-
const response = await this.executeCall(
|
|
31573
|
+
const response = await this.executeCall(
|
|
31574
|
+
client,
|
|
31575
|
+
values,
|
|
31576
|
+
embeddingType,
|
|
31577
|
+
abortSignal,
|
|
31578
|
+
config.requestConfig
|
|
31579
|
+
);
|
|
31172
31580
|
const embeddings = this.extractEmbeddings(response);
|
|
31173
31581
|
const totalTokens = this.extractTokenCount(response);
|
|
31174
31582
|
const { headers: responseHeaders, requestId } = this.extractResponseMetadata(response);
|
|
@@ -31252,9 +31660,9 @@ var init_foundation_models_embedding_model_strategy = __esm({
|
|
|
31252
31660
|
mergedParams: hasKeys(mergedParams) ? mergedParams : void 0
|
|
31253
31661
|
};
|
|
31254
31662
|
}
|
|
31255
|
-
async executeCall(clientWithContext, values, _embeddingType, abortSignal) {
|
|
31663
|
+
async executeCall(clientWithContext, values, _embeddingType, abortSignal, requestConfig) {
|
|
31256
31664
|
const request = this.buildRequest(values, clientWithContext.mergedParams);
|
|
31257
|
-
return clientWithContext.client.run(request,
|
|
31665
|
+
return clientWithContext.client.run(request, mergeRequestConfig(requestConfig, abortSignal));
|
|
31258
31666
|
}
|
|
31259
31667
|
extractEmbeddings(response) {
|
|
31260
31668
|
const embeddingData = response._data.data;
|
|
@@ -31423,6 +31831,7 @@ var init_sap_ai_validation = __esm({
|
|
|
31423
31831
|
init_deep_merge();
|
|
31424
31832
|
init_sap_ai_error();
|
|
31425
31833
|
ORCHESTRATION_ONLY_FEATURE_KEYS = [
|
|
31834
|
+
"fallbackModuleConfigs",
|
|
31426
31835
|
"filtering",
|
|
31427
31836
|
"grounding",
|
|
31428
31837
|
"masking",
|
|
@@ -31434,6 +31843,7 @@ var init_sap_ai_validation = __esm({
|
|
|
31434
31843
|
"translation"
|
|
31435
31844
|
];
|
|
31436
31845
|
ORCHESTRATION_ONLY_FEATURES = {
|
|
31846
|
+
fallbackModuleConfigs: "Fallback module configurations (fallbackModuleConfigs)",
|
|
31437
31847
|
filtering: "Content filtering",
|
|
31438
31848
|
grounding: "Document grounding",
|
|
31439
31849
|
masking: "Data masking",
|
|
@@ -31495,10 +31905,10 @@ var init_orchestration_embedding_model_strategy = __esm({
|
|
|
31495
31905
|
};
|
|
31496
31906
|
return new this.ClientClass(moduleConfig, config.deploymentConfig, config.destination);
|
|
31497
31907
|
}
|
|
31498
|
-
async executeCall(client, values, embeddingType, abortSignal) {
|
|
31908
|
+
async executeCall(client, values, embeddingType, abortSignal, requestConfig) {
|
|
31499
31909
|
return client.embed(
|
|
31500
31910
|
{ input: values, type: embeddingType },
|
|
31501
|
-
|
|
31911
|
+
mergeRequestConfig(requestConfig, abortSignal)
|
|
31502
31912
|
);
|
|
31503
31913
|
}
|
|
31504
31914
|
extractEmbeddings(response) {
|
|
@@ -31561,7 +31971,12 @@ var init_base_language_model_strategy = __esm({
|
|
|
31561
31971
|
const commonParts = await this.buildCommonParts(config, settings, options);
|
|
31562
31972
|
const { request, warnings } = this.buildRequest(config, settings, options, commonParts);
|
|
31563
31973
|
const client = this.createClient(config, settings, commonParts);
|
|
31564
|
-
const response = await this.executeApiCall(
|
|
31974
|
+
const response = await this.executeApiCall(
|
|
31975
|
+
client,
|
|
31976
|
+
request,
|
|
31977
|
+
options.abortSignal ?? void 0,
|
|
31978
|
+
config.requestConfig
|
|
31979
|
+
);
|
|
31565
31980
|
return buildGenerateResult({
|
|
31566
31981
|
modelId: config.modelId,
|
|
31567
31982
|
providerName: commonParts.providerName,
|
|
@@ -31589,7 +32004,8 @@ var init_base_language_model_strategy = __esm({
|
|
|
31589
32004
|
client,
|
|
31590
32005
|
request,
|
|
31591
32006
|
options.abortSignal ?? void 0,
|
|
31592
|
-
settings
|
|
32007
|
+
settings,
|
|
32008
|
+
config.requestConfig
|
|
31593
32009
|
);
|
|
31594
32010
|
const idGenerator = new StreamIdGenerator();
|
|
31595
32011
|
const responseId = streamResponse.responseId ?? idGenerator.generateResponseId();
|
|
@@ -31805,8 +32221,8 @@ var init_foundation_models_language_model_strategy = __esm({
|
|
|
31805
32221
|
const modelDeployment = buildModelDeployment(config, settings.modelVersion);
|
|
31806
32222
|
return new this.ClientClass(modelDeployment, config.destination);
|
|
31807
32223
|
}
|
|
31808
|
-
async executeApiCall(client, request, abortSignal) {
|
|
31809
|
-
const response = await client.run(request,
|
|
32224
|
+
async executeApiCall(client, request, abortSignal, requestConfig) {
|
|
32225
|
+
const response = await client.run(request, mergeRequestConfig(requestConfig, abortSignal));
|
|
31810
32226
|
const { requestId, responseId } = this.extractMetadata(response);
|
|
31811
32227
|
return {
|
|
31812
32228
|
getContent: () => response.getContent(),
|
|
@@ -31819,8 +32235,12 @@ var init_foundation_models_language_model_strategy = __esm({
|
|
|
31819
32235
|
responseId
|
|
31820
32236
|
};
|
|
31821
32237
|
}
|
|
31822
|
-
async executeStreamCall(client, request, abortSignal, _settings) {
|
|
31823
|
-
const streamResponse = await client.stream(
|
|
32238
|
+
async executeStreamCall(client, request, abortSignal, _settings, requestConfig) {
|
|
32239
|
+
const streamResponse = await client.stream(
|
|
32240
|
+
request,
|
|
32241
|
+
abortSignal,
|
|
32242
|
+
mergeRequestConfig(requestConfig, void 0)
|
|
32243
|
+
);
|
|
31824
32244
|
const { requestId, responseHeaders, responseId } = this.extractMetadata(streamResponse);
|
|
31825
32245
|
return {
|
|
31826
32246
|
getFinishReason: () => streamResponse.getFinishReason(),
|
|
@@ -31893,6 +32313,7 @@ var init_orchestration_language_model_strategy = __esm({
|
|
|
31893
32313
|
ORCHESTRATION_MODULE_KEYS = ["masking", "filtering", "grounding", "translation"];
|
|
31894
32314
|
CONFIG_REF_IGNORED_MODULES = [
|
|
31895
32315
|
...ORCHESTRATION_MODULE_KEYS,
|
|
32316
|
+
"fallbackModuleConfigs",
|
|
31896
32317
|
"promptTemplateRef",
|
|
31897
32318
|
"responseFormat",
|
|
31898
32319
|
"tools",
|
|
@@ -31965,10 +32386,10 @@ var init_orchestration_language_model_strategy = __esm({
|
|
|
31965
32386
|
}
|
|
31966
32387
|
return new this.ClientClass(clientConfig, config.deploymentConfig, config.destination);
|
|
31967
32388
|
}
|
|
31968
|
-
async executeApiCall(client, request, abortSignal) {
|
|
32389
|
+
async executeApiCall(client, request, abortSignal, requestConfig) {
|
|
31969
32390
|
const response = await client.chatCompletion(
|
|
31970
32391
|
request,
|
|
31971
|
-
|
|
32392
|
+
mergeRequestConfig(requestConfig, abortSignal)
|
|
31972
32393
|
);
|
|
31973
32394
|
const { requestId, responseId } = this.extractMetadata(response);
|
|
31974
32395
|
return {
|
|
@@ -31984,9 +32405,14 @@ var init_orchestration_language_model_strategy = __esm({
|
|
|
31984
32405
|
responseId
|
|
31985
32406
|
};
|
|
31986
32407
|
}
|
|
31987
|
-
async executeStreamCall(client, request, abortSignal, settings) {
|
|
32408
|
+
async executeStreamCall(client, request, abortSignal, settings, requestConfig) {
|
|
31988
32409
|
const sdkStreamOptions = this.buildSdkStreamOptions(settings.streamOptions);
|
|
31989
|
-
const streamResponse = await client.stream(
|
|
32410
|
+
const streamResponse = await client.stream(
|
|
32411
|
+
request,
|
|
32412
|
+
abortSignal,
|
|
32413
|
+
sdkStreamOptions,
|
|
32414
|
+
mergeRequestConfig(requestConfig, void 0)
|
|
32415
|
+
);
|
|
31990
32416
|
const { requestId, responseHeaders, responseId } = this.extractMetadata(streamResponse);
|
|
31991
32417
|
return {
|
|
31992
32418
|
getCitations: () => streamResponse.getCitations?.(),
|
|
@@ -32452,7 +32878,8 @@ var SAPAIEmbeddingModel = class {
|
|
|
32452
32878
|
deploymentConfig: this.config.deploymentConfig,
|
|
32453
32879
|
destination: this.config.destination,
|
|
32454
32880
|
modelId: this.modelId,
|
|
32455
|
-
provider: this.config.provider
|
|
32881
|
+
provider: this.config.provider,
|
|
32882
|
+
requestConfig: this.config.requestConfig
|
|
32456
32883
|
};
|
|
32457
32884
|
return strategy.doEmbed(strategyConfig, this.settings, options, this.maxEmbeddingsPerCall);
|
|
32458
32885
|
}
|
|
@@ -32540,7 +32967,8 @@ var SAPAILanguageModel = class {
|
|
|
32540
32967
|
deploymentConfig: this.config.deploymentConfig,
|
|
32541
32968
|
destination: this.config.destination,
|
|
32542
32969
|
modelId: this.modelId,
|
|
32543
|
-
provider: this.config.provider
|
|
32970
|
+
provider: this.config.provider,
|
|
32971
|
+
requestConfig: this.config.requestConfig
|
|
32544
32972
|
};
|
|
32545
32973
|
return { strategy, strategyConfig };
|
|
32546
32974
|
}
|
|
@@ -32585,7 +33013,8 @@ function createSAPAIProvider(options = {}) {
|
|
|
32585
33013
|
deploymentConfig,
|
|
32586
33014
|
destination: options.destination,
|
|
32587
33015
|
provider: `${providerName}.chat`,
|
|
32588
|
-
providerApi
|
|
33016
|
+
providerApi,
|
|
33017
|
+
requestConfig: options.requestConfig
|
|
32589
33018
|
});
|
|
32590
33019
|
};
|
|
32591
33020
|
const createEmbeddingModel = (modelId, settings = {}) => {
|
|
@@ -32601,7 +33030,8 @@ function createSAPAIProvider(options = {}) {
|
|
|
32601
33030
|
deploymentConfig,
|
|
32602
33031
|
destination: options.destination,
|
|
32603
33032
|
provider: `${providerName}.embedding`,
|
|
32604
|
-
providerApi
|
|
33033
|
+
providerApi,
|
|
33034
|
+
requestConfig: options.requestConfig
|
|
32605
33035
|
});
|
|
32606
33036
|
};
|
|
32607
33037
|
const provider = function(modelId, settings) {
|
|
@@ -32696,6 +33126,6 @@ mime-types/index.js:
|
|
|
32696
33126
|
*)
|
|
32697
33127
|
|
|
32698
33128
|
axios/dist/node/axios.cjs:
|
|
32699
|
-
(*! Axios v1.
|
|
33129
|
+
(*! Axios v1.18.1 Copyright (c) 2026 Matt Zabriskie and contributors *)
|
|
32700
33130
|
*/
|
|
32701
33131
|
//# sourceMappingURL=index.cjs.map
|