@jerome-benoit/sap-ai-provider 4.7.1 → 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 +5 -0
- package/dist/{chunk-XIWHF23D.js → chunk-3ZSXTKOK.js} +399 -117
- package/dist/{chunk-XIWHF23D.js.map → chunk-3ZSXTKOK.js.map} +1 -1
- package/dist/{chunk-OA6TJHD2.js → chunk-BVDSJ4IZ.js} +10 -4
- package/dist/chunk-BVDSJ4IZ.js.map +1 -0
- package/dist/{chunk-BZWUUBX2.js → chunk-H5KD4EPO.js} +8 -2
- package/dist/chunk-H5KD4EPO.js.map +1 -0
- package/dist/{chunk-HDOSHLV6.js → chunk-KVOLFUQJ.js} +2 -2
- package/dist/{chunk-RUCURXS7.js → chunk-TQXCNZBC.js} +11 -5
- package/dist/chunk-TQXCNZBC.js.map +1 -0
- package/dist/{foundation-models-embedding-model-strategy-TACUPFS2.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-LLWYUGA3.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 +447 -135
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/{orchestration-embedding-model-strategy-RYI3HWRZ.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-NIUPRYDW.js → orchestration-language-model-strategy-NUHYRIXH.js} +16 -10
- package/dist/orchestration-language-model-strategy-NUHYRIXH.js.map +1 -0
- package/package.json +18 -18
- package/dist/chunk-BZWUUBX2.js.map +0 -1
- package/dist/chunk-OA6TJHD2.js.map +0 -1
- package/dist/chunk-RUCURXS7.js.map +0 -1
- package/dist/foundation-models-embedding-model-strategy-TACUPFS2.js.map +0 -1
- package/dist/foundation-models-language-model-strategy-LLWYUGA3.js.map +0 -1
- package/dist/orchestration-embedding-model-strategy-RYI3HWRZ.js.map +0 -1
- package/dist/orchestration-language-model-strategy-NIUPRYDW.js.map +0 -1
- /package/dist/{chunk-HDOSHLV6.js.map → chunk-KVOLFUQJ.js.map} +0 -0
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)) {
|
|
@@ -25909,9 +25934,6 @@ var require_axios = __commonJS({
|
|
|
25909
25934
|
return p1.toUpperCase() + p2;
|
|
25910
25935
|
});
|
|
25911
25936
|
};
|
|
25912
|
-
var hasOwnProperty = (({
|
|
25913
|
-
hasOwnProperty: hasOwnProperty2
|
|
25914
|
-
}) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
25915
25937
|
var {
|
|
25916
25938
|
propertyIsEnumerable
|
|
25917
25939
|
} = Object.prototype;
|
|
@@ -26012,6 +26034,7 @@ var require_axios = __commonJS({
|
|
|
26012
26034
|
})(typeof setImmediate === "function", isFunction$1(_global.postMessage));
|
|
26013
26035
|
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
26014
26036
|
var isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
|
26037
|
+
var isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
|
|
26015
26038
|
var utils$1 = {
|
|
26016
26039
|
isArray,
|
|
26017
26040
|
isArrayBuffer,
|
|
@@ -26057,6 +26080,8 @@ var require_axios = __commonJS({
|
|
|
26057
26080
|
hasOwnProperty,
|
|
26058
26081
|
hasOwnProp: hasOwnProperty,
|
|
26059
26082
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
26083
|
+
hasOwnInPrototypeChain,
|
|
26084
|
+
getSafeProp,
|
|
26060
26085
|
reduceDescriptors,
|
|
26061
26086
|
freezeMethods,
|
|
26062
26087
|
toObjectSet,
|
|
@@ -26072,7 +26097,8 @@ var require_axios = __commonJS({
|
|
|
26072
26097
|
isThenable,
|
|
26073
26098
|
setImmediate: _setImmediate,
|
|
26074
26099
|
asap,
|
|
26075
|
-
isIterable
|
|
26100
|
+
isIterable,
|
|
26101
|
+
isSafeIterable
|
|
26076
26102
|
};
|
|
26077
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"]);
|
|
26078
26104
|
var parseHeaders = (rawHeaders) => {
|
|
@@ -26210,13 +26236,19 @@ var require_axios = __commonJS({
|
|
|
26210
26236
|
setHeaders(header, valueOrRewrite);
|
|
26211
26237
|
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
26212
26238
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
26213
|
-
} else if (utils$1.isObject(header) && utils$1.
|
|
26214
|
-
let obj =
|
|
26239
|
+
} else if (utils$1.isObject(header) && utils$1.isSafeIterable(header)) {
|
|
26240
|
+
let obj = /* @__PURE__ */ Object.create(null), dest, key;
|
|
26215
26241
|
for (const entry of header) {
|
|
26216
26242
|
if (!utils$1.isArray(entry)) {
|
|
26217
26243
|
throw new TypeError("Object iterator must return a key-value pair");
|
|
26218
26244
|
}
|
|
26219
|
-
|
|
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];
|
|
26251
|
+
}
|
|
26220
26252
|
}
|
|
26221
26253
|
setHeaders(obj, valueOrRewrite);
|
|
26222
26254
|
} else {
|
|
@@ -26421,7 +26453,13 @@ var require_axios = __commonJS({
|
|
|
26421
26453
|
var AxiosError = class _AxiosError extends Error {
|
|
26422
26454
|
static from(error, code, config, request, response, customProps) {
|
|
26423
26455
|
const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
|
|
26424
|
-
axiosError
|
|
26456
|
+
Object.defineProperty(axiosError, "cause", {
|
|
26457
|
+
__proto__: null,
|
|
26458
|
+
value: error,
|
|
26459
|
+
writable: true,
|
|
26460
|
+
enumerable: false,
|
|
26461
|
+
configurable: true
|
|
26462
|
+
});
|
|
26425
26463
|
axiosError.name = error.name;
|
|
26426
26464
|
if (error.status != null && axiosError.status == null) {
|
|
26427
26465
|
axiosError.status = error.status;
|
|
@@ -26498,6 +26536,7 @@ var require_axios = __commonJS({
|
|
|
26498
26536
|
AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
26499
26537
|
AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
26500
26538
|
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
26539
|
+
var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
|
|
26501
26540
|
function isVisitable(thing) {
|
|
26502
26541
|
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
26503
26542
|
}
|
|
@@ -26534,8 +26573,9 @@ var require_axios = __commonJS({
|
|
|
26534
26573
|
const dots = options.dots;
|
|
26535
26574
|
const indexes = options.indexes;
|
|
26536
26575
|
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
26537
|
-
const maxDepth = options.maxDepth === void 0 ?
|
|
26576
|
+
const maxDepth = options.maxDepth === void 0 ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
|
|
26538
26577
|
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
26578
|
+
const stack = [];
|
|
26539
26579
|
if (!utils$1.isFunction(visitor)) {
|
|
26540
26580
|
throw new TypeError("visitor must be a function");
|
|
26541
26581
|
}
|
|
@@ -26551,10 +26591,38 @@ var require_axios = __commonJS({
|
|
|
26551
26591
|
throw new AxiosError("Blob is not supported. Use a Buffer instead.");
|
|
26552
26592
|
}
|
|
26553
26593
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
26554
|
-
|
|
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);
|
|
26555
26601
|
}
|
|
26556
26602
|
return value;
|
|
26557
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
|
+
}
|
|
26558
26626
|
function defaultVisitor(value, key, path2) {
|
|
26559
26627
|
let arr = value;
|
|
26560
26628
|
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
|
|
@@ -26564,7 +26632,7 @@ var require_axios = __commonJS({
|
|
|
26564
26632
|
if (value && !path2 && typeof value === "object") {
|
|
26565
26633
|
if (utils$1.endsWith(key, "{}")) {
|
|
26566
26634
|
key = metaTokens ? key : key.slice(0, -2);
|
|
26567
|
-
value =
|
|
26635
|
+
value = stringifyWithDepthLimit(value, 1);
|
|
26568
26636
|
} else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
|
|
26569
26637
|
key = removeBrackets(key);
|
|
26570
26638
|
arr.forEach(function each(el, index) {
|
|
@@ -26583,7 +26651,6 @@ var require_axios = __commonJS({
|
|
|
26583
26651
|
formData.append(renderKey(path2, key, dots), convertValue(value));
|
|
26584
26652
|
return false;
|
|
26585
26653
|
}
|
|
26586
|
-
const stack = [];
|
|
26587
26654
|
const exposedHelpers = Object.assign(predicates, {
|
|
26588
26655
|
defaultVisitor,
|
|
26589
26656
|
convertValue,
|
|
@@ -26591,9 +26658,7 @@ var require_axios = __commonJS({
|
|
|
26591
26658
|
});
|
|
26592
26659
|
function build(value, path2, depth = 0) {
|
|
26593
26660
|
if (utils$1.isUndefined(value)) return;
|
|
26594
|
-
|
|
26595
|
-
throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
26596
|
-
}
|
|
26661
|
+
throwIfMaxDepthExceeded(depth);
|
|
26597
26662
|
if (stack.indexOf(value) !== -1) {
|
|
26598
26663
|
throw new Error("Circular reference detected in " + path2.join("."));
|
|
26599
26664
|
}
|
|
@@ -26634,9 +26699,7 @@ var require_axios = __commonJS({
|
|
|
26634
26699
|
this._pairs.push([name, value]);
|
|
26635
26700
|
};
|
|
26636
26701
|
prototype.toString = function toString3(encoder) {
|
|
26637
|
-
const _encode = encoder ?
|
|
26638
|
-
return encoder.call(this, value, encode$1);
|
|
26639
|
-
} : encode$1;
|
|
26702
|
+
const _encode = encoder ? (value) => encoder.call(this, value, encode$1) : encode$1;
|
|
26640
26703
|
return this._pairs.map(function each(pair) {
|
|
26641
26704
|
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
26642
26705
|
}, "").join("&");
|
|
@@ -26648,11 +26711,12 @@ var require_axios = __commonJS({
|
|
|
26648
26711
|
if (!params) {
|
|
26649
26712
|
return url2;
|
|
26650
26713
|
}
|
|
26651
|
-
|
|
26714
|
+
url2 = url2 || "";
|
|
26652
26715
|
const _options = utils$1.isFunction(options) ? {
|
|
26653
26716
|
serialize: options
|
|
26654
26717
|
} : options;
|
|
26655
|
-
const
|
|
26718
|
+
const _encode = utils$1.getSafeProp(_options, "encode") || encode;
|
|
26719
|
+
const serializeFn = utils$1.getSafeProp(_options, "serialize");
|
|
26656
26720
|
let serializedParams;
|
|
26657
26721
|
if (serializeFn) {
|
|
26658
26722
|
serializedParams = serializeFn(params, _options);
|
|
@@ -26735,7 +26799,8 @@ var require_axios = __commonJS({
|
|
|
26735
26799
|
forcedJSONParsing: true,
|
|
26736
26800
|
clarifyTimeoutError: false,
|
|
26737
26801
|
legacyInterceptorReqResOrdering: true,
|
|
26738
|
-
advertiseZstdAcceptEncoding: false
|
|
26802
|
+
advertiseZstdAcceptEncoding: false,
|
|
26803
|
+
validateStatusUndefinedResolves: true
|
|
26739
26804
|
};
|
|
26740
26805
|
var URLSearchParams = url.URLSearchParams;
|
|
26741
26806
|
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
@@ -26800,10 +26865,21 @@ var require_axios = __commonJS({
|
|
|
26800
26865
|
...options
|
|
26801
26866
|
});
|
|
26802
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
|
+
}
|
|
26803
26874
|
function parsePropPath(name) {
|
|
26804
|
-
|
|
26805
|
-
|
|
26806
|
-
|
|
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;
|
|
26807
26883
|
}
|
|
26808
26884
|
function arrayToObject(arr) {
|
|
26809
26885
|
const obj = {};
|
|
@@ -26819,6 +26895,7 @@ var require_axios = __commonJS({
|
|
|
26819
26895
|
}
|
|
26820
26896
|
function formDataToJSON(formData) {
|
|
26821
26897
|
function buildPath(path2, value, target, index) {
|
|
26898
|
+
throwIfDepthExceeded(index);
|
|
26822
26899
|
let name = path2[index++];
|
|
26823
26900
|
if (name === "__proto__") return true;
|
|
26824
26901
|
const isNumericKey = Number.isFinite(+name);
|
|
@@ -27005,9 +27082,28 @@ var require_axios = __commonJS({
|
|
|
27005
27082
|
function combineURLs(baseURL, relativeURL) {
|
|
27006
27083
|
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
27007
27084
|
}
|
|
27008
|
-
|
|
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);
|
|
27009
27104
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
27010
27105
|
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
27106
|
+
assertValidHttpProtocolURL(baseURL, config);
|
|
27011
27107
|
return combineURLs(baseURL, requestedURL);
|
|
27012
27108
|
}
|
|
27013
27109
|
return requestedURL;
|
|
@@ -27077,7 +27173,7 @@ var require_axios = __commonJS({
|
|
|
27077
27173
|
function getEnv(key) {
|
|
27078
27174
|
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
27079
27175
|
}
|
|
27080
|
-
var VERSION2 = "1.
|
|
27176
|
+
var VERSION2 = "1.18.1";
|
|
27081
27177
|
function parseProtocol(url2) {
|
|
27082
27178
|
const match2 = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
|
|
27083
27179
|
return match2 && match2[1] || "";
|
|
@@ -27099,13 +27195,13 @@ var require_axios = __commonJS({
|
|
|
27099
27195
|
const params = match2[2];
|
|
27100
27196
|
const encoding = match2[3] ? "base64" : "utf8";
|
|
27101
27197
|
const body = match2[4];
|
|
27102
|
-
let mime;
|
|
27198
|
+
let mime = "";
|
|
27103
27199
|
if (type) {
|
|
27104
27200
|
mime = params ? type + params : type;
|
|
27105
27201
|
} else if (params) {
|
|
27106
27202
|
mime = "text/plain" + params;
|
|
27107
27203
|
}
|
|
27108
|
-
const buffer = Buffer.from(decodeURIComponent(body), encoding);
|
|
27204
|
+
const buffer = encoding === "base64" ? Buffer.from(body, "base64") : Buffer.from(decodeURIComponent(body), encoding);
|
|
27109
27205
|
if (asBlob) {
|
|
27110
27206
|
if (!_Blob) {
|
|
27111
27207
|
throw new AxiosError("Blob is not supported", AxiosError.ERR_NOT_SUPPORT);
|
|
@@ -27429,13 +27525,29 @@ var require_axios = __commonJS({
|
|
|
27429
27525
|
}, cb);
|
|
27430
27526
|
} : fn;
|
|
27431
27527
|
};
|
|
27432
|
-
var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
|
|
27528
|
+
var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]);
|
|
27433
27529
|
var isIPv4Loopback = (host) => {
|
|
27434
27530
|
const parts = host.split(".");
|
|
27435
27531
|
if (parts.length !== 4) return false;
|
|
27436
27532
|
if (parts[0] !== "127") return false;
|
|
27437
27533
|
return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
|
|
27438
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
|
+
};
|
|
27439
27551
|
var isIPv6Loopback = (host) => {
|
|
27440
27552
|
if (host === "::1") return true;
|
|
27441
27553
|
const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
|
|
@@ -27458,6 +27570,7 @@ var require_axios = __commonJS({
|
|
|
27458
27570
|
if (!host) return false;
|
|
27459
27571
|
if (LOOPBACK_HOSTNAMES.has(host)) return true;
|
|
27460
27572
|
if (isIPv4Loopback(host)) return true;
|
|
27573
|
+
if (isIPv6Unspecified(host)) return true;
|
|
27461
27574
|
return isIPv6Loopback(host);
|
|
27462
27575
|
};
|
|
27463
27576
|
var DEFAULT_PORTS = {
|
|
@@ -27650,6 +27763,8 @@ var require_axios = __commonJS({
|
|
|
27650
27763
|
}), throttled[1]];
|
|
27651
27764
|
};
|
|
27652
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));
|
|
27653
27768
|
function estimateDataURLDecodedBytes(url2) {
|
|
27654
27769
|
if (!url2 || typeof url2 !== "string") return 0;
|
|
27655
27770
|
if (!url2.startsWith("data:")) return 0;
|
|
@@ -27665,7 +27780,7 @@ var require_axios = __commonJS({
|
|
|
27665
27780
|
if (body.charCodeAt(i) === 37 && i + 2 < len) {
|
|
27666
27781
|
const a = body.charCodeAt(i + 1);
|
|
27667
27782
|
const b = body.charCodeAt(i + 2);
|
|
27668
|
-
const isHex = (a
|
|
27783
|
+
const isHex = isHexDigit(a) && isHexDigit(b);
|
|
27669
27784
|
if (isHex) {
|
|
27670
27785
|
effectiveLen -= 2;
|
|
27671
27786
|
i += 2;
|
|
@@ -27697,13 +27812,13 @@ var require_axios = __commonJS({
|
|
|
27697
27812
|
const bytes2 = groups * 3 - (pad3 || 0);
|
|
27698
27813
|
return bytes2 > 0 ? bytes2 : 0;
|
|
27699
27814
|
}
|
|
27700
|
-
if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
|
|
27701
|
-
return Buffer.byteLength(body, "utf8");
|
|
27702
|
-
}
|
|
27703
27815
|
let bytes = 0;
|
|
27704
27816
|
for (let i = 0, len = body.length; i < len; i++) {
|
|
27705
27817
|
const c = body.charCodeAt(i);
|
|
27706
|
-
if (c
|
|
27818
|
+
if (c === 37 && isPercentEncodedByte(body, i, len)) {
|
|
27819
|
+
bytes += 1;
|
|
27820
|
+
i += 2;
|
|
27821
|
+
} else if (c < 128) {
|
|
27707
27822
|
bytes += 1;
|
|
27708
27823
|
} else if (c < 2048) {
|
|
27709
27824
|
bytes += 2;
|
|
@@ -27759,6 +27874,33 @@ var require_axios = __commonJS({
|
|
|
27759
27874
|
var kAxiosInstalledTunnel = /* @__PURE__ */ Symbol("axios.http.installedTunnel");
|
|
27760
27875
|
var tunnelingAgentCache = /* @__PURE__ */ new Map();
|
|
27761
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
|
+
}
|
|
27762
27904
|
function getTunnelingAgent(agentOptions, userHttpsAgent) {
|
|
27763
27905
|
const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
|
|
27764
27906
|
const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
|
|
@@ -27810,13 +27952,37 @@ var require_axios = __commonJS({
|
|
|
27810
27952
|
if (options.beforeRedirects.auth) {
|
|
27811
27953
|
options.beforeRedirects.auth(options);
|
|
27812
27954
|
}
|
|
27955
|
+
if (options.beforeRedirects.sensitiveHeaders) {
|
|
27956
|
+
options.beforeRedirects.sensitiveHeaders(options, requestDetails);
|
|
27957
|
+
}
|
|
27813
27958
|
if (options.beforeRedirects.config) {
|
|
27814
27959
|
options.beforeRedirects.config(options, responseDetails, requestDetails);
|
|
27815
27960
|
}
|
|
27816
27961
|
}
|
|
27817
|
-
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) {
|
|
27818
27983
|
let proxy = configProxy;
|
|
27819
|
-
|
|
27984
|
+
const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
|
|
27985
|
+
if (!proxy && proxy !== false && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
|
|
27820
27986
|
const proxyUrl = getProxyForUrl(location);
|
|
27821
27987
|
if (proxyUrl) {
|
|
27822
27988
|
if (!shouldBypassProxy(location)) {
|
|
@@ -27907,7 +28073,7 @@ var require_axios = __commonJS({
|
|
|
27907
28073
|
}
|
|
27908
28074
|
}
|
|
27909
28075
|
options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
|
|
27910
|
-
setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent);
|
|
28076
|
+
setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent, configHttpAgent);
|
|
27911
28077
|
};
|
|
27912
28078
|
}
|
|
27913
28079
|
var isHttpAdapterSupported = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
|
|
@@ -27984,7 +28150,7 @@ var require_axios = __commonJS({
|
|
|
27984
28150
|
};
|
|
27985
28151
|
var httpAdapter = isHttpAdapterSupported && function httpAdapter2(config) {
|
|
27986
28152
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
27987
|
-
const own2 = (key) => utils$1.
|
|
28153
|
+
const own2 = (key) => utils$1.getSafeProp(config, key);
|
|
27988
28154
|
const transitional = own2("transitional") || transitionalDefaults;
|
|
27989
28155
|
let data = own2("data");
|
|
27990
28156
|
let lookup = own2("lookup");
|
|
@@ -27992,9 +28158,17 @@ var require_axios = __commonJS({
|
|
|
27992
28158
|
let httpVersion = own2("httpVersion");
|
|
27993
28159
|
if (httpVersion === void 0) httpVersion = 1;
|
|
27994
28160
|
let http2Options = own2("http2Options");
|
|
28161
|
+
const httpAgent = own2("httpAgent");
|
|
28162
|
+
const httpsAgent = own2("httpsAgent");
|
|
28163
|
+
const configProxy = own2("proxy");
|
|
27995
28164
|
const responseType = own2("responseType");
|
|
27996
28165
|
const responseEncoding = own2("responseEncoding");
|
|
27997
|
-
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");
|
|
27998
28172
|
let isDone;
|
|
27999
28173
|
let rejected = false;
|
|
28000
28174
|
let req;
|
|
@@ -28033,9 +28207,11 @@ var require_axios = __commonJS({
|
|
|
28033
28207
|
}
|
|
28034
28208
|
}
|
|
28035
28209
|
function createTimeoutError() {
|
|
28036
|
-
|
|
28037
|
-
|
|
28038
|
-
|
|
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;
|
|
28039
28215
|
}
|
|
28040
28216
|
return new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req);
|
|
28041
28217
|
}
|
|
@@ -28076,15 +28252,16 @@ var require_axios = __commonJS({
|
|
|
28076
28252
|
onFinished();
|
|
28077
28253
|
}
|
|
28078
28254
|
});
|
|
28079
|
-
const fullPath = buildFullPath(
|
|
28080
|
-
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);
|
|
28081
28258
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
28082
28259
|
if (protocol === "data:") {
|
|
28083
|
-
if (
|
|
28084
|
-
const dataUrl = String(
|
|
28260
|
+
if (maxContentLength > -1) {
|
|
28261
|
+
const dataUrl = String(own2("url") || fullPath || "");
|
|
28085
28262
|
const estimated = estimateDataURLDecodedBytes(dataUrl);
|
|
28086
|
-
if (estimated >
|
|
28087
|
-
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));
|
|
28088
28265
|
}
|
|
28089
28266
|
}
|
|
28090
28267
|
let convertedData;
|
|
@@ -28097,7 +28274,7 @@ var require_axios = __commonJS({
|
|
|
28097
28274
|
});
|
|
28098
28275
|
}
|
|
28099
28276
|
try {
|
|
28100
|
-
convertedData = fromDataURI(
|
|
28277
|
+
convertedData = fromDataURI(own2("url"), responseType === "blob", {
|
|
28101
28278
|
Blob: config.env && config.env.Blob
|
|
28102
28279
|
});
|
|
28103
28280
|
} catch (err) {
|
|
@@ -28162,7 +28339,7 @@ var require_axios = __commonJS({
|
|
|
28162
28339
|
return reject(new AxiosError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError.ERR_BAD_REQUEST, config));
|
|
28163
28340
|
}
|
|
28164
28341
|
headers.setContentLength(data.length, false);
|
|
28165
|
-
if (
|
|
28342
|
+
if (maxBodyLength > -1 && data.length > maxBodyLength) {
|
|
28166
28343
|
return reject(new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config));
|
|
28167
28344
|
}
|
|
28168
28345
|
}
|
|
@@ -28187,8 +28364,8 @@ var require_axios = __commonJS({
|
|
|
28187
28364
|
let auth = void 0;
|
|
28188
28365
|
const configAuth = own2("auth");
|
|
28189
28366
|
if (configAuth) {
|
|
28190
|
-
const username = configAuth
|
|
28191
|
-
const password = configAuth
|
|
28367
|
+
const username = utils$1.getSafeProp(configAuth, "username") || "";
|
|
28368
|
+
const password = utils$1.getSafeProp(configAuth, "password") || "";
|
|
28192
28369
|
auth = username + ":" + password;
|
|
28193
28370
|
}
|
|
28194
28371
|
if (!auth && (parsed.username || parsed.password)) {
|
|
@@ -28199,13 +28376,12 @@ var require_axios = __commonJS({
|
|
|
28199
28376
|
auth && headers.delete("authorization");
|
|
28200
28377
|
let path$1;
|
|
28201
28378
|
try {
|
|
28202
|
-
path$1 = buildURL(parsed.pathname + parsed.search,
|
|
28379
|
+
path$1 = buildURL(parsed.pathname + parsed.search, own2("params"), own2("paramsSerializer")).replace(/^\?/, "");
|
|
28203
28380
|
} catch (err) {
|
|
28204
|
-
|
|
28205
|
-
|
|
28206
|
-
|
|
28207
|
-
|
|
28208
|
-
return reject(customErr);
|
|
28381
|
+
return reject(AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config, null, null, {
|
|
28382
|
+
url: own2("url"),
|
|
28383
|
+
exists: true
|
|
28384
|
+
}));
|
|
28209
28385
|
}
|
|
28210
28386
|
headers.set("Accept-Encoding", utils$1.hasOwnProp(transitional, "advertiseZstdAcceptEncoding") && transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false);
|
|
28211
28387
|
const options = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
@@ -28213,8 +28389,8 @@ var require_axios = __commonJS({
|
|
|
28213
28389
|
method,
|
|
28214
28390
|
headers: toByteStringHeaderObject(headers),
|
|
28215
28391
|
agents: {
|
|
28216
|
-
http:
|
|
28217
|
-
https:
|
|
28392
|
+
http: httpAgent,
|
|
28393
|
+
https: httpsAgent
|
|
28218
28394
|
},
|
|
28219
28395
|
auth,
|
|
28220
28396
|
protocol,
|
|
@@ -28224,7 +28400,6 @@ var require_axios = __commonJS({
|
|
|
28224
28400
|
http2Options
|
|
28225
28401
|
});
|
|
28226
28402
|
!utils$1.isUndefined(lookup) && (options.lookup = lookup);
|
|
28227
|
-
const socketPath = own2("socketPath");
|
|
28228
28403
|
if (socketPath) {
|
|
28229
28404
|
if (typeof socketPath !== "string") {
|
|
28230
28405
|
return reject(new AxiosError("socketPath must be a string", AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
@@ -28242,13 +28417,14 @@ var require_axios = __commonJS({
|
|
|
28242
28417
|
} else {
|
|
28243
28418
|
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
28244
28419
|
options.port = parsed.port;
|
|
28245
|
-
setProxy(options,
|
|
28420
|
+
setProxy(options, configProxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path, false, httpsAgent, httpAgent);
|
|
28246
28421
|
}
|
|
28247
28422
|
let transport;
|
|
28248
28423
|
let isNativeTransport = false;
|
|
28424
|
+
let transportEnforcesMaxBodyLength = false;
|
|
28249
28425
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
28250
28426
|
if (options.agent == null) {
|
|
28251
|
-
options.agent = isHttpsRequest ?
|
|
28427
|
+
options.agent = isHttpsRequest ? httpsAgent : httpAgent;
|
|
28252
28428
|
}
|
|
28253
28429
|
if (isHttp2) {
|
|
28254
28430
|
transport = http2Transport;
|
|
@@ -28256,12 +28432,14 @@ var require_axios = __commonJS({
|
|
|
28256
28432
|
const configTransport = own2("transport");
|
|
28257
28433
|
if (configTransport) {
|
|
28258
28434
|
transport = configTransport;
|
|
28259
|
-
} else if (
|
|
28435
|
+
} else if (maxRedirects === 0) {
|
|
28260
28436
|
transport = isHttpsRequest ? https : http;
|
|
28261
28437
|
isNativeTransport = true;
|
|
28262
28438
|
} else {
|
|
28263
|
-
|
|
28264
|
-
|
|
28439
|
+
transportEnforcesMaxBodyLength = true;
|
|
28440
|
+
options.sensitiveHeaders = [];
|
|
28441
|
+
if (maxRedirects) {
|
|
28442
|
+
options.maxRedirects = maxRedirects;
|
|
28265
28443
|
}
|
|
28266
28444
|
const configBeforeRedirect = own2("beforeRedirect");
|
|
28267
28445
|
if (configBeforeRedirect) {
|
|
@@ -28279,11 +28457,32 @@ var require_axios = __commonJS({
|
|
|
28279
28457
|
}
|
|
28280
28458
|
};
|
|
28281
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
|
+
}
|
|
28282
28481
|
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
28283
28482
|
}
|
|
28284
28483
|
}
|
|
28285
|
-
if (
|
|
28286
|
-
options.maxBodyLength =
|
|
28484
|
+
if (maxBodyLength > -1) {
|
|
28485
|
+
options.maxBodyLength = maxBodyLength;
|
|
28287
28486
|
} else {
|
|
28288
28487
|
options.maxBodyLength = Infinity;
|
|
28289
28488
|
}
|
|
@@ -28302,7 +28501,7 @@ var require_axios = __commonJS({
|
|
|
28302
28501
|
}
|
|
28303
28502
|
let responseStream = res;
|
|
28304
28503
|
const lastRequest = res.req || req;
|
|
28305
|
-
if (
|
|
28504
|
+
if (decompress !== false && res.headers["content-encoding"]) {
|
|
28306
28505
|
if (method === "HEAD" || res.statusCode === 204) {
|
|
28307
28506
|
delete res.headers["content-encoding"];
|
|
28308
28507
|
}
|
|
@@ -28343,8 +28542,8 @@ var require_axios = __commonJS({
|
|
|
28343
28542
|
request: lastRequest
|
|
28344
28543
|
};
|
|
28345
28544
|
if (responseType === "stream") {
|
|
28346
|
-
if (
|
|
28347
|
-
const limit =
|
|
28545
|
+
if (maxContentLength > -1) {
|
|
28546
|
+
const limit = maxContentLength;
|
|
28348
28547
|
const source = responseStream;
|
|
28349
28548
|
async function* enforceMaxContentLength() {
|
|
28350
28549
|
let totalResponseBytes = 0;
|
|
@@ -28368,10 +28567,10 @@ var require_axios = __commonJS({
|
|
|
28368
28567
|
responseStream.on("data", function handleStreamData(chunk) {
|
|
28369
28568
|
responseBuffer.push(chunk);
|
|
28370
28569
|
totalResponseBytes += chunk.length;
|
|
28371
|
-
if (
|
|
28570
|
+
if (maxContentLength > -1 && totalResponseBytes > maxContentLength) {
|
|
28372
28571
|
rejected = true;
|
|
28373
28572
|
responseStream.destroy();
|
|
28374
|
-
abort(new AxiosError("maxContentLength size of " +
|
|
28573
|
+
abort(new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
|
|
28375
28574
|
}
|
|
28376
28575
|
});
|
|
28377
28576
|
responseStream.on("aborted", function handlerStreamAborted() {
|
|
@@ -28421,7 +28620,9 @@ var require_axios = __commonJS({
|
|
|
28421
28620
|
});
|
|
28422
28621
|
const boundSockets = /* @__PURE__ */ new Set();
|
|
28423
28622
|
req.on("socket", function handleRequestSocket(socket) {
|
|
28424
|
-
socket.setKeepAlive
|
|
28623
|
+
if (typeof socket.setKeepAlive === "function") {
|
|
28624
|
+
socket.setKeepAlive(true, 1e3 * 60);
|
|
28625
|
+
}
|
|
28425
28626
|
if (!socket[kAxiosSocketListener]) {
|
|
28426
28627
|
socket.on("error", function handleSocketError(err) {
|
|
28427
28628
|
const current = socket[kAxiosCurrentReq];
|
|
@@ -28443,8 +28644,8 @@ var require_axios = __commonJS({
|
|
|
28443
28644
|
}
|
|
28444
28645
|
boundSockets.clear();
|
|
28445
28646
|
});
|
|
28446
|
-
if (
|
|
28447
|
-
const timeout = parseInt(
|
|
28647
|
+
if (own2("timeout")) {
|
|
28648
|
+
const timeout = parseInt(own2("timeout"), 10);
|
|
28448
28649
|
if (Number.isNaN(timeout)) {
|
|
28449
28650
|
abort(new AxiosError("error trying to parse `config.timeout` to int", AxiosError.ERR_BAD_OPTION_VALUE, config, req));
|
|
28450
28651
|
return;
|
|
@@ -28476,8 +28677,8 @@ var require_axios = __commonJS({
|
|
|
28476
28677
|
}
|
|
28477
28678
|
});
|
|
28478
28679
|
let uploadStream = data;
|
|
28479
|
-
if (
|
|
28480
|
-
const limit =
|
|
28680
|
+
if (maxBodyLength > -1 && !transportEnforcesMaxBodyLength) {
|
|
28681
|
+
const limit = maxBodyLength;
|
|
28481
28682
|
let bytesSent = 0;
|
|
28482
28683
|
uploadStream = stream.pipeline([data, new stream.Transform({
|
|
28483
28684
|
transform(chunk, _enc, cb) {
|
|
@@ -28533,7 +28734,11 @@ var require_axios = __commonJS({
|
|
|
28533
28734
|
const cookie = cookies2[i].replace(/^\s+/, "");
|
|
28534
28735
|
const eq = cookie.indexOf("=");
|
|
28535
28736
|
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
28536
|
-
|
|
28737
|
+
try {
|
|
28738
|
+
return decodeURIComponent(cookie.slice(eq + 1));
|
|
28739
|
+
} catch (e) {
|
|
28740
|
+
return cookie.slice(eq + 1);
|
|
28741
|
+
}
|
|
28537
28742
|
}
|
|
28538
28743
|
}
|
|
28539
28744
|
return null;
|
|
@@ -28558,6 +28763,7 @@ var require_axios = __commonJS({
|
|
|
28558
28763
|
...thing
|
|
28559
28764
|
} : thing;
|
|
28560
28765
|
function mergeConfig(config1, config2) {
|
|
28766
|
+
config1 = config1 || {};
|
|
28561
28767
|
config2 = config2 || {};
|
|
28562
28768
|
const config = /* @__PURE__ */ Object.create(null);
|
|
28563
28769
|
Object.defineProperty(config, "hasOwnProperty", {
|
|
@@ -28600,6 +28806,23 @@ var require_axios = __commonJS({
|
|
|
28600
28806
|
return getMergedValue(void 0, a);
|
|
28601
28807
|
}
|
|
28602
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
|
+
}
|
|
28603
28826
|
function mergeDirectKeys(a, b, prop) {
|
|
28604
28827
|
if (utils$1.hasOwnProp(config2, prop)) {
|
|
28605
28828
|
return getMergedValue(a, b);
|
|
@@ -28650,6 +28873,13 @@ var require_axios = __commonJS({
|
|
|
28650
28873
|
const configValue = merge2(a, b, prop);
|
|
28651
28874
|
utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
28652
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
|
+
}
|
|
28653
28883
|
return config;
|
|
28654
28884
|
}
|
|
28655
28885
|
var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
|
|
@@ -28658,7 +28888,7 @@ var require_axios = __commonJS({
|
|
|
28658
28888
|
headers.set(formHeaders);
|
|
28659
28889
|
return;
|
|
28660
28890
|
}
|
|
28661
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
28891
|
+
Object.entries(formHeaders || {}).forEach(([key, val]) => {
|
|
28662
28892
|
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
28663
28893
|
headers.set(key, val);
|
|
28664
28894
|
}
|
|
@@ -28678,9 +28908,15 @@ var require_axios = __commonJS({
|
|
|
28678
28908
|
const allowAbsoluteUrls = own2("allowAbsoluteUrls");
|
|
28679
28909
|
const url2 = own2("url");
|
|
28680
28910
|
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
28681
|
-
newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls), own2("params"), own2("paramsSerializer"));
|
|
28911
|
+
newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls, newConfig), own2("params"), own2("paramsSerializer"));
|
|
28682
28912
|
if (auth) {
|
|
28683
|
-
|
|
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
|
+
}
|
|
28684
28920
|
}
|
|
28685
28921
|
if (utils$1.isFormData(data)) {
|
|
28686
28922
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
|
|
@@ -28827,6 +29063,7 @@ var require_axios = __commonJS({
|
|
|
28827
29063
|
const protocol = parseProtocol(_config.url);
|
|
28828
29064
|
if (protocol && !platform.protocols.includes(protocol)) {
|
|
28829
29065
|
reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
|
|
29066
|
+
done();
|
|
28830
29067
|
return;
|
|
28831
29068
|
}
|
|
28832
29069
|
request.send(requestData || null);
|
|
@@ -28862,7 +29099,9 @@ var require_axios = __commonJS({
|
|
|
28862
29099
|
});
|
|
28863
29100
|
signals = null;
|
|
28864
29101
|
};
|
|
28865
|
-
signals.forEach((signal2) => signal2.addEventListener("abort", onabort
|
|
29102
|
+
signals.forEach((signal2) => signal2.addEventListener("abort", onabort, {
|
|
29103
|
+
once: true
|
|
29104
|
+
}));
|
|
28866
29105
|
const {
|
|
28867
29106
|
signal
|
|
28868
29107
|
} = controller;
|
|
@@ -29092,12 +29331,14 @@ var require_axios = __commonJS({
|
|
|
29092
29331
|
composedSignal.unsubscribe();
|
|
29093
29332
|
});
|
|
29094
29333
|
let requestContentLength;
|
|
29334
|
+
let pendingBodyError = null;
|
|
29335
|
+
const maxBodyLengthError = () => new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
|
|
29095
29336
|
try {
|
|
29096
29337
|
let auth = void 0;
|
|
29097
29338
|
const configAuth = own2("auth");
|
|
29098
29339
|
if (configAuth) {
|
|
29099
|
-
const username = configAuth
|
|
29100
|
-
const password = configAuth
|
|
29340
|
+
const username = utils$1.getSafeProp(configAuth, "username") || "";
|
|
29341
|
+
const password = utils$1.getSafeProp(configAuth, "password") || "";
|
|
29101
29342
|
auth = {
|
|
29102
29343
|
username,
|
|
29103
29344
|
password
|
|
@@ -29130,25 +29371,42 @@ var require_axios = __commonJS({
|
|
|
29130
29371
|
}
|
|
29131
29372
|
}
|
|
29132
29373
|
if (hasMaxBodyLength && method !== "get" && method !== "head") {
|
|
29133
|
-
const outboundLength = await
|
|
29134
|
-
if (typeof outboundLength === "number" && isFinite(outboundLength)
|
|
29135
|
-
|
|
29374
|
+
const outboundLength = await getBodyLength(data);
|
|
29375
|
+
if (typeof outboundLength === "number" && isFinite(outboundLength)) {
|
|
29376
|
+
requestContentLength = outboundLength;
|
|
29377
|
+
if (outboundLength > maxBodyLength) {
|
|
29378
|
+
throw maxBodyLengthError();
|
|
29379
|
+
}
|
|
29136
29380
|
}
|
|
29137
29381
|
}
|
|
29138
|
-
|
|
29139
|
-
|
|
29140
|
-
|
|
29141
|
-
|
|
29142
|
-
duplex: "half"
|
|
29143
|
-
});
|
|
29144
|
-
let contentTypeHeader;
|
|
29145
|
-
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
29146
|
-
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();
|
|
29147
29386
|
}
|
|
29148
|
-
|
|
29149
|
-
|
|
29150
|
-
|
|
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
|
+
}
|
|
29151
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);
|
|
29152
29410
|
}
|
|
29153
29411
|
if (!utils$1.isString(withCredentials)) {
|
|
29154
29412
|
withCredentials = withCredentials ? "include" : "omit";
|
|
@@ -29172,8 +29430,9 @@ var require_axios = __commonJS({
|
|
|
29172
29430
|
};
|
|
29173
29431
|
request = isRequestSupported && new Request(url2, resolvedOptions);
|
|
29174
29432
|
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
|
|
29433
|
+
const responseHeaders = AxiosHeaders.from(response.headers);
|
|
29175
29434
|
if (hasMaxContentLength) {
|
|
29176
|
-
const declaredLength = utils$1.toFiniteNumber(
|
|
29435
|
+
const declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
|
|
29177
29436
|
if (declaredLength != null && declaredLength > maxContentLength) {
|
|
29178
29437
|
throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
29179
29438
|
}
|
|
@@ -29184,7 +29443,7 @@ var require_axios = __commonJS({
|
|
|
29184
29443
|
["status", "statusText", "headers"].forEach((prop) => {
|
|
29185
29444
|
options[prop] = response[prop];
|
|
29186
29445
|
});
|
|
29187
|
-
const responseContentLength = utils$1.toFiniteNumber(
|
|
29446
|
+
const responseContentLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
|
|
29188
29447
|
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
|
|
29189
29448
|
let bytesRead = 0;
|
|
29190
29449
|
const onChunkProgress = (loadedBytes) => {
|
|
@@ -29235,13 +29494,35 @@ var require_axios = __commonJS({
|
|
|
29235
29494
|
const canceledError = composedSignal.reason;
|
|
29236
29495
|
canceledError.config = config;
|
|
29237
29496
|
request && (canceledError.request = request);
|
|
29238
|
-
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
|
+
}
|
|
29239
29506
|
throw canceledError;
|
|
29240
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
|
+
}
|
|
29241
29516
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
29242
|
-
|
|
29243
|
-
|
|
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
|
|
29244
29524
|
});
|
|
29525
|
+
throw networkError;
|
|
29245
29526
|
}
|
|
29246
29527
|
throw AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
29247
29528
|
}
|
|
@@ -29316,7 +29597,7 @@ var require_axios = __commonJS({
|
|
|
29316
29597
|
if (!adapter) {
|
|
29317
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"));
|
|
29318
29599
|
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
29319
|
-
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);
|
|
29320
29601
|
}
|
|
29321
29602
|
return adapter;
|
|
29322
29603
|
}
|
|
@@ -29403,7 +29684,7 @@ var require_axios = __commonJS({
|
|
|
29403
29684
|
};
|
|
29404
29685
|
};
|
|
29405
29686
|
function assertOptions(options, schema, allowUnknown) {
|
|
29406
|
-
if (typeof options !== "object") {
|
|
29687
|
+
if (typeof options !== "object" || options === null) {
|
|
29407
29688
|
throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
|
|
29408
29689
|
}
|
|
29409
29690
|
const keys = Object.keys(options);
|
|
@@ -29495,7 +29776,8 @@ var require_axios = __commonJS({
|
|
|
29495
29776
|
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
29496
29777
|
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
29497
29778
|
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
29498
|
-
advertiseZstdAcceptEncoding: validators.transitional(validators.boolean)
|
|
29779
|
+
advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
|
|
29780
|
+
validateStatusUndefinedResolves: validators.transitional(validators.boolean)
|
|
29499
29781
|
}, false);
|
|
29500
29782
|
}
|
|
29501
29783
|
if (paramsSerializer != null) {
|
|
@@ -29585,7 +29867,7 @@ var require_axios = __commonJS({
|
|
|
29585
29867
|
}
|
|
29586
29868
|
getUri(config) {
|
|
29587
29869
|
config = mergeConfig(this.defaults, config);
|
|
29588
|
-
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
29870
|
+
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);
|
|
29589
29871
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
29590
29872
|
}
|
|
29591
29873
|
};
|
|
@@ -29594,7 +29876,7 @@ var require_axios = __commonJS({
|
|
|
29594
29876
|
return this.request(mergeConfig(config || {}, {
|
|
29595
29877
|
method,
|
|
29596
29878
|
url: url2,
|
|
29597
|
-
data: (config
|
|
29879
|
+
data: config && utils$1.hasOwnProp(config, "data") ? config.data : void 0
|
|
29598
29880
|
}));
|
|
29599
29881
|
};
|
|
29600
29882
|
});
|
|
@@ -31182,6 +31464,11 @@ function mapToolChoice(toolChoice) {
|
|
|
31182
31464
|
return void 0;
|
|
31183
31465
|
}
|
|
31184
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
|
+
}
|
|
31185
31472
|
function normalizeEmbedding(embedding) {
|
|
31186
31473
|
if (Array.isArray(embedding)) {
|
|
31187
31474
|
return embedding;
|
|
@@ -31248,7 +31535,7 @@ var VERSION;
|
|
|
31248
31535
|
var init_version = __esm({
|
|
31249
31536
|
"src/version.ts"() {
|
|
31250
31537
|
"use strict";
|
|
31251
|
-
VERSION = true ? "4.
|
|
31538
|
+
VERSION = true ? "4.8.0" : "0.0.0-test";
|
|
31252
31539
|
}
|
|
31253
31540
|
});
|
|
31254
31541
|
|
|
@@ -31283,7 +31570,13 @@ var init_base_embedding_model_strategy = __esm({
|
|
|
31283
31570
|
const warnings = [];
|
|
31284
31571
|
this.resolveWarnings(settings, warnings);
|
|
31285
31572
|
const client = this.createClient(config, settings, embeddingOptions);
|
|
31286
|
-
const response = await this.executeCall(
|
|
31573
|
+
const response = await this.executeCall(
|
|
31574
|
+
client,
|
|
31575
|
+
values,
|
|
31576
|
+
embeddingType,
|
|
31577
|
+
abortSignal,
|
|
31578
|
+
config.requestConfig
|
|
31579
|
+
);
|
|
31287
31580
|
const embeddings = this.extractEmbeddings(response);
|
|
31288
31581
|
const totalTokens = this.extractTokenCount(response);
|
|
31289
31582
|
const { headers: responseHeaders, requestId } = this.extractResponseMetadata(response);
|
|
@@ -31367,9 +31660,9 @@ var init_foundation_models_embedding_model_strategy = __esm({
|
|
|
31367
31660
|
mergedParams: hasKeys(mergedParams) ? mergedParams : void 0
|
|
31368
31661
|
};
|
|
31369
31662
|
}
|
|
31370
|
-
async executeCall(clientWithContext, values, _embeddingType, abortSignal) {
|
|
31663
|
+
async executeCall(clientWithContext, values, _embeddingType, abortSignal, requestConfig) {
|
|
31371
31664
|
const request = this.buildRequest(values, clientWithContext.mergedParams);
|
|
31372
|
-
return clientWithContext.client.run(request,
|
|
31665
|
+
return clientWithContext.client.run(request, mergeRequestConfig(requestConfig, abortSignal));
|
|
31373
31666
|
}
|
|
31374
31667
|
extractEmbeddings(response) {
|
|
31375
31668
|
const embeddingData = response._data.data;
|
|
@@ -31612,10 +31905,10 @@ var init_orchestration_embedding_model_strategy = __esm({
|
|
|
31612
31905
|
};
|
|
31613
31906
|
return new this.ClientClass(moduleConfig, config.deploymentConfig, config.destination);
|
|
31614
31907
|
}
|
|
31615
|
-
async executeCall(client, values, embeddingType, abortSignal) {
|
|
31908
|
+
async executeCall(client, values, embeddingType, abortSignal, requestConfig) {
|
|
31616
31909
|
return client.embed(
|
|
31617
31910
|
{ input: values, type: embeddingType },
|
|
31618
|
-
|
|
31911
|
+
mergeRequestConfig(requestConfig, abortSignal)
|
|
31619
31912
|
);
|
|
31620
31913
|
}
|
|
31621
31914
|
extractEmbeddings(response) {
|
|
@@ -31678,7 +31971,12 @@ var init_base_language_model_strategy = __esm({
|
|
|
31678
31971
|
const commonParts = await this.buildCommonParts(config, settings, options);
|
|
31679
31972
|
const { request, warnings } = this.buildRequest(config, settings, options, commonParts);
|
|
31680
31973
|
const client = this.createClient(config, settings, commonParts);
|
|
31681
|
-
const response = await this.executeApiCall(
|
|
31974
|
+
const response = await this.executeApiCall(
|
|
31975
|
+
client,
|
|
31976
|
+
request,
|
|
31977
|
+
options.abortSignal ?? void 0,
|
|
31978
|
+
config.requestConfig
|
|
31979
|
+
);
|
|
31682
31980
|
return buildGenerateResult({
|
|
31683
31981
|
modelId: config.modelId,
|
|
31684
31982
|
providerName: commonParts.providerName,
|
|
@@ -31706,7 +32004,8 @@ var init_base_language_model_strategy = __esm({
|
|
|
31706
32004
|
client,
|
|
31707
32005
|
request,
|
|
31708
32006
|
options.abortSignal ?? void 0,
|
|
31709
|
-
settings
|
|
32007
|
+
settings,
|
|
32008
|
+
config.requestConfig
|
|
31710
32009
|
);
|
|
31711
32010
|
const idGenerator = new StreamIdGenerator();
|
|
31712
32011
|
const responseId = streamResponse.responseId ?? idGenerator.generateResponseId();
|
|
@@ -31922,8 +32221,8 @@ var init_foundation_models_language_model_strategy = __esm({
|
|
|
31922
32221
|
const modelDeployment = buildModelDeployment(config, settings.modelVersion);
|
|
31923
32222
|
return new this.ClientClass(modelDeployment, config.destination);
|
|
31924
32223
|
}
|
|
31925
|
-
async executeApiCall(client, request, abortSignal) {
|
|
31926
|
-
const response = await client.run(request,
|
|
32224
|
+
async executeApiCall(client, request, abortSignal, requestConfig) {
|
|
32225
|
+
const response = await client.run(request, mergeRequestConfig(requestConfig, abortSignal));
|
|
31927
32226
|
const { requestId, responseId } = this.extractMetadata(response);
|
|
31928
32227
|
return {
|
|
31929
32228
|
getContent: () => response.getContent(),
|
|
@@ -31936,8 +32235,12 @@ var init_foundation_models_language_model_strategy = __esm({
|
|
|
31936
32235
|
responseId
|
|
31937
32236
|
};
|
|
31938
32237
|
}
|
|
31939
|
-
async executeStreamCall(client, request, abortSignal, _settings) {
|
|
31940
|
-
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
|
+
);
|
|
31941
32244
|
const { requestId, responseHeaders, responseId } = this.extractMetadata(streamResponse);
|
|
31942
32245
|
return {
|
|
31943
32246
|
getFinishReason: () => streamResponse.getFinishReason(),
|
|
@@ -32083,10 +32386,10 @@ var init_orchestration_language_model_strategy = __esm({
|
|
|
32083
32386
|
}
|
|
32084
32387
|
return new this.ClientClass(clientConfig, config.deploymentConfig, config.destination);
|
|
32085
32388
|
}
|
|
32086
|
-
async executeApiCall(client, request, abortSignal) {
|
|
32389
|
+
async executeApiCall(client, request, abortSignal, requestConfig) {
|
|
32087
32390
|
const response = await client.chatCompletion(
|
|
32088
32391
|
request,
|
|
32089
|
-
|
|
32392
|
+
mergeRequestConfig(requestConfig, abortSignal)
|
|
32090
32393
|
);
|
|
32091
32394
|
const { requestId, responseId } = this.extractMetadata(response);
|
|
32092
32395
|
return {
|
|
@@ -32102,9 +32405,14 @@ var init_orchestration_language_model_strategy = __esm({
|
|
|
32102
32405
|
responseId
|
|
32103
32406
|
};
|
|
32104
32407
|
}
|
|
32105
|
-
async executeStreamCall(client, request, abortSignal, settings) {
|
|
32408
|
+
async executeStreamCall(client, request, abortSignal, settings, requestConfig) {
|
|
32106
32409
|
const sdkStreamOptions = this.buildSdkStreamOptions(settings.streamOptions);
|
|
32107
|
-
const streamResponse = await client.stream(
|
|
32410
|
+
const streamResponse = await client.stream(
|
|
32411
|
+
request,
|
|
32412
|
+
abortSignal,
|
|
32413
|
+
sdkStreamOptions,
|
|
32414
|
+
mergeRequestConfig(requestConfig, void 0)
|
|
32415
|
+
);
|
|
32108
32416
|
const { requestId, responseHeaders, responseId } = this.extractMetadata(streamResponse);
|
|
32109
32417
|
return {
|
|
32110
32418
|
getCitations: () => streamResponse.getCitations?.(),
|
|
@@ -32570,7 +32878,8 @@ var SAPAIEmbeddingModel = class {
|
|
|
32570
32878
|
deploymentConfig: this.config.deploymentConfig,
|
|
32571
32879
|
destination: this.config.destination,
|
|
32572
32880
|
modelId: this.modelId,
|
|
32573
|
-
provider: this.config.provider
|
|
32881
|
+
provider: this.config.provider,
|
|
32882
|
+
requestConfig: this.config.requestConfig
|
|
32574
32883
|
};
|
|
32575
32884
|
return strategy.doEmbed(strategyConfig, this.settings, options, this.maxEmbeddingsPerCall);
|
|
32576
32885
|
}
|
|
@@ -32658,7 +32967,8 @@ var SAPAILanguageModel = class {
|
|
|
32658
32967
|
deploymentConfig: this.config.deploymentConfig,
|
|
32659
32968
|
destination: this.config.destination,
|
|
32660
32969
|
modelId: this.modelId,
|
|
32661
|
-
provider: this.config.provider
|
|
32970
|
+
provider: this.config.provider,
|
|
32971
|
+
requestConfig: this.config.requestConfig
|
|
32662
32972
|
};
|
|
32663
32973
|
return { strategy, strategyConfig };
|
|
32664
32974
|
}
|
|
@@ -32703,7 +33013,8 @@ function createSAPAIProvider(options = {}) {
|
|
|
32703
33013
|
deploymentConfig,
|
|
32704
33014
|
destination: options.destination,
|
|
32705
33015
|
provider: `${providerName}.chat`,
|
|
32706
|
-
providerApi
|
|
33016
|
+
providerApi,
|
|
33017
|
+
requestConfig: options.requestConfig
|
|
32707
33018
|
});
|
|
32708
33019
|
};
|
|
32709
33020
|
const createEmbeddingModel = (modelId, settings = {}) => {
|
|
@@ -32719,7 +33030,8 @@ function createSAPAIProvider(options = {}) {
|
|
|
32719
33030
|
deploymentConfig,
|
|
32720
33031
|
destination: options.destination,
|
|
32721
33032
|
provider: `${providerName}.embedding`,
|
|
32722
|
-
providerApi
|
|
33033
|
+
providerApi,
|
|
33034
|
+
requestConfig: options.requestConfig
|
|
32723
33035
|
});
|
|
32724
33036
|
};
|
|
32725
33037
|
const provider = function(modelId, settings) {
|
|
@@ -32814,6 +33126,6 @@ mime-types/index.js:
|
|
|
32814
33126
|
*)
|
|
32815
33127
|
|
|
32816
33128
|
axios/dist/node/axios.cjs:
|
|
32817
|
-
(*! Axios v1.
|
|
33129
|
+
(*! Axios v1.18.1 Copyright (c) 2026 Matt Zabriskie and contributors *)
|
|
32818
33130
|
*/
|
|
32819
33131
|
//# sourceMappingURL=index.cjs.map
|