@jerome-benoit/sap-ai-provider-v2 4.6.2 → 4.6.3

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.
Files changed (25) hide show
  1. package/dist/{chunk-M6USM33F.js → chunk-5FHTB5RT.js} +3 -3
  2. package/dist/{chunk-TE3CYVU3.js → chunk-7ZKPZONG.js} +629 -770
  3. package/dist/chunk-7ZKPZONG.js.map +1 -0
  4. package/dist/{chunk-7HX5A5XW.js → chunk-RHZV73MM.js} +48 -3
  5. package/dist/chunk-RHZV73MM.js.map +1 -0
  6. package/dist/{chunk-WO5UACI5.js → chunk-WLW2XIIX.js} +2 -2
  7. package/dist/{foundation-models-embedding-model-strategy-A6CA7NXP.js → foundation-models-embedding-model-strategy-FHJ3PW42.js} +4 -4
  8. package/dist/{foundation-models-language-model-strategy-DZMPSOJK.js → foundation-models-language-model-strategy-XQ24PJK4.js} +4 -4
  9. package/dist/index.cjs +672 -770
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +6 -0
  12. package/dist/index.d.ts +6 -0
  13. package/dist/index.js +5 -5
  14. package/dist/index.js.map +1 -1
  15. package/dist/{orchestration-embedding-model-strategy-M3POCUFM.js → orchestration-embedding-model-strategy-FKAUQZH2.js} +4 -4
  16. package/dist/{orchestration-language-model-strategy-Q3LPRWX5.js → orchestration-language-model-strategy-TSZQCLG3.js} +4 -4
  17. package/package.json +6 -6
  18. package/dist/chunk-7HX5A5XW.js.map +0 -1
  19. package/dist/chunk-TE3CYVU3.js.map +0 -1
  20. /package/dist/{chunk-M6USM33F.js.map → chunk-5FHTB5RT.js.map} +0 -0
  21. /package/dist/{chunk-WO5UACI5.js.map → chunk-WLW2XIIX.js.map} +0 -0
  22. /package/dist/{foundation-models-embedding-model-strategy-A6CA7NXP.js.map → foundation-models-embedding-model-strategy-FHJ3PW42.js.map} +0 -0
  23. /package/dist/{foundation-models-language-model-strategy-DZMPSOJK.js.map → foundation-models-language-model-strategy-XQ24PJK4.js.map} +0 -0
  24. /package/dist/{orchestration-embedding-model-strategy-M3POCUFM.js.map → orchestration-embedding-model-strategy-FKAUQZH2.js.map} +0 -0
  25. /package/dist/{orchestration-language-model-strategy-Q3LPRWX5.js.map → orchestration-language-model-strategy-TSZQCLG3.js.map} +0 -0
package/dist/index.cjs CHANGED
@@ -25438,76 +25438,6 @@ var require_form_data = __commonJS({
25438
25438
  }
25439
25439
  });
25440
25440
 
25441
- // node_modules/proxy-from-env/index.js
25442
- var require_proxy_from_env = __commonJS({
25443
- "node_modules/proxy-from-env/index.js"(exports2) {
25444
- "use strict";
25445
- var parseUrl = require("url").parse;
25446
- var DEFAULT_PORTS = {
25447
- ftp: 21,
25448
- gopher: 70,
25449
- http: 80,
25450
- https: 443,
25451
- ws: 80,
25452
- wss: 443
25453
- };
25454
- var stringEndsWith = String.prototype.endsWith || function(s) {
25455
- return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
25456
- };
25457
- function getProxyForUrl(url) {
25458
- var parsedUrl = typeof url === "string" ? parseUrl(url) : url || {};
25459
- var proto = parsedUrl.protocol;
25460
- var hostname = parsedUrl.host;
25461
- var port = parsedUrl.port;
25462
- if (typeof hostname !== "string" || !hostname || typeof proto !== "string") {
25463
- return "";
25464
- }
25465
- proto = proto.split(":", 1)[0];
25466
- hostname = hostname.replace(/:\d*$/, "");
25467
- port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
25468
- if (!shouldProxy(hostname, port)) {
25469
- return "";
25470
- }
25471
- var proxy = getEnv("npm_config_" + proto + "_proxy") || getEnv(proto + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
25472
- if (proxy && proxy.indexOf("://") === -1) {
25473
- proxy = proto + "://" + proxy;
25474
- }
25475
- return proxy;
25476
- }
25477
- function shouldProxy(hostname, port) {
25478
- var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
25479
- if (!NO_PROXY) {
25480
- return true;
25481
- }
25482
- if (NO_PROXY === "*") {
25483
- return false;
25484
- }
25485
- return NO_PROXY.split(/[,\s]/).every(function(proxy) {
25486
- if (!proxy) {
25487
- return true;
25488
- }
25489
- var parsedProxy = proxy.match(/^(.+):(\d+)$/);
25490
- var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
25491
- var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
25492
- if (parsedProxyPort && parsedProxyPort !== port) {
25493
- return true;
25494
- }
25495
- if (!/^[.*]/.test(parsedProxyHostname)) {
25496
- return hostname !== parsedProxyHostname;
25497
- }
25498
- if (parsedProxyHostname.charAt(0) === "*") {
25499
- parsedProxyHostname = parsedProxyHostname.slice(1);
25500
- }
25501
- return !stringEndsWith.call(hostname, parsedProxyHostname);
25502
- });
25503
- }
25504
- function getEnv(key) {
25505
- return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
25506
- }
25507
- exports2.getProxyForUrl = getProxyForUrl;
25508
- }
25509
- });
25510
-
25511
25441
  // node_modules/debug/src/common.js
25512
25442
  var require_common2 = __commonJS({
25513
25443
  "node_modules/debug/src/common.js"(exports2, module2) {
@@ -26569,7 +26499,6 @@ var require_axios = __commonJS({
26569
26499
  var FormData$1 = require_form_data();
26570
26500
  var crypto2 = require("crypto");
26571
26501
  var url = require("url");
26572
- var proxyFromEnv = require_proxy_from_env();
26573
26502
  var http = require("http");
26574
26503
  var https = require("https");
26575
26504
  var http2 = require("http2");
@@ -26578,28 +26507,21 @@ var require_axios = __commonJS({
26578
26507
  var zlib = require("zlib");
26579
26508
  var stream = require("stream");
26580
26509
  var events = require("events");
26581
- function _interopDefaultLegacy(e) {
26582
- return e && typeof e === "object" && "default" in e ? e : { "default": e };
26583
- }
26584
- var FormData__default = /* @__PURE__ */ _interopDefaultLegacy(FormData$1);
26585
- var crypto__default = /* @__PURE__ */ _interopDefaultLegacy(crypto2);
26586
- var url__default = /* @__PURE__ */ _interopDefaultLegacy(url);
26587
- var proxyFromEnv__default = /* @__PURE__ */ _interopDefaultLegacy(proxyFromEnv);
26588
- var http__default = /* @__PURE__ */ _interopDefaultLegacy(http);
26589
- var https__default = /* @__PURE__ */ _interopDefaultLegacy(https);
26590
- var http2__default = /* @__PURE__ */ _interopDefaultLegacy(http2);
26591
- var util__default = /* @__PURE__ */ _interopDefaultLegacy(util);
26592
- var followRedirects__default = /* @__PURE__ */ _interopDefaultLegacy(followRedirects);
26593
- var zlib__default = /* @__PURE__ */ _interopDefaultLegacy(zlib);
26594
- var stream__default = /* @__PURE__ */ _interopDefaultLegacy(stream);
26595
26510
  function bind(fn, thisArg) {
26596
26511
  return function wrap() {
26597
26512
  return fn.apply(thisArg, arguments);
26598
26513
  };
26599
26514
  }
26600
- var { toString: toString2 } = Object.prototype;
26601
- var { getPrototypeOf } = Object;
26602
- var { iterator, toStringTag } = Symbol;
26515
+ var {
26516
+ toString: toString2
26517
+ } = Object.prototype;
26518
+ var {
26519
+ getPrototypeOf
26520
+ } = Object;
26521
+ var {
26522
+ iterator,
26523
+ toStringTag
26524
+ } = Symbol;
26603
26525
  var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
26604
26526
  const str = toString2.call(thing);
26605
26527
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -26609,7 +26531,9 @@ var require_axios = __commonJS({
26609
26531
  return (thing) => kindOf(thing) === type;
26610
26532
  };
26611
26533
  var typeOfTest = (type) => (thing) => typeof thing === type;
26612
- var { isArray } = Array;
26534
+ var {
26535
+ isArray
26536
+ } = Array;
26613
26537
  var isUndefined = typeOfTest("undefined");
26614
26538
  function isBuffer(val) {
26615
26539
  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
@@ -26670,16 +26594,13 @@ var require_axios = __commonJS({
26670
26594
  kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
26671
26595
  };
26672
26596
  var isURLSearchParams = kindOfTest("URLSearchParams");
26673
- var [isReadableStream, isRequest, isResponse, isHeaders] = [
26674
- "ReadableStream",
26675
- "Request",
26676
- "Response",
26677
- "Headers"
26678
- ].map(kindOfTest);
26597
+ var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
26679
26598
  var trim2 = (str) => {
26680
26599
  return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
26681
26600
  };
26682
- function forEach(obj, fn, { allOwnKeys = false } = {}) {
26601
+ function forEach(obj, fn, {
26602
+ allOwnKeys = false
26603
+ } = {}) {
26683
26604
  if (obj === null || typeof obj === "undefined") {
26684
26605
  return;
26685
26606
  }
@@ -26727,7 +26648,10 @@ var require_axios = __commonJS({
26727
26648
  })();
26728
26649
  var isContextDefined = (context) => !isUndefined(context) && context !== _global;
26729
26650
  function merge() {
26730
- const { caseless, skipUndefined } = isContextDefined(this) && this || {};
26651
+ const {
26652
+ caseless,
26653
+ skipUndefined
26654
+ } = isContextDefined(this) && this || {};
26731
26655
  const result = {};
26732
26656
  const assignValue = (val, key) => {
26733
26657
  if (key === "__proto__" || key === "constructor" || key === "prototype") {
@@ -26749,28 +26673,28 @@ var require_axios = __commonJS({
26749
26673
  }
26750
26674
  return result;
26751
26675
  }
26752
- var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
26753
- forEach(
26754
- b,
26755
- (val, key) => {
26756
- if (thisArg && isFunction$1(val)) {
26757
- Object.defineProperty(a, key, {
26758
- value: bind(val, thisArg),
26759
- writable: true,
26760
- enumerable: true,
26761
- configurable: true
26762
- });
26763
- } else {
26764
- Object.defineProperty(a, key, {
26765
- value: val,
26766
- writable: true,
26767
- enumerable: true,
26768
- configurable: true
26769
- });
26770
- }
26771
- },
26772
- { allOwnKeys }
26773
- );
26676
+ var extend = (a, b, thisArg, {
26677
+ allOwnKeys
26678
+ } = {}) => {
26679
+ forEach(b, (val, key) => {
26680
+ if (thisArg && isFunction$1(val)) {
26681
+ Object.defineProperty(a, key, {
26682
+ value: bind(val, thisArg),
26683
+ writable: true,
26684
+ enumerable: true,
26685
+ configurable: true
26686
+ });
26687
+ } else {
26688
+ Object.defineProperty(a, key, {
26689
+ value: val,
26690
+ writable: true,
26691
+ enumerable: true,
26692
+ configurable: true
26693
+ });
26694
+ }
26695
+ }, {
26696
+ allOwnKeys
26697
+ });
26774
26698
  return a;
26775
26699
  };
26776
26700
  var stripBOM = (content) => {
@@ -26861,7 +26785,9 @@ var require_axios = __commonJS({
26861
26785
  return p1.toUpperCase() + p2;
26862
26786
  });
26863
26787
  };
26864
- var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
26788
+ var hasOwnProperty = (({
26789
+ hasOwnProperty: hasOwnProperty2
26790
+ }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
26865
26791
  var isRegExp = kindOfTest("RegExp");
26866
26792
  var reduceDescriptors = (obj, reducer) => {
26867
26793
  const descriptors = Object.getOwnPropertyDescriptors(obj);
@@ -26943,15 +26869,14 @@ var require_axios = __commonJS({
26943
26869
  return setImmediate;
26944
26870
  }
26945
26871
  return postMessageSupported ? ((token2, callbacks) => {
26946
- _global.addEventListener(
26947
- "message",
26948
- ({ source, data }) => {
26949
- if (source === _global && data === token2) {
26950
- callbacks.length && callbacks.shift()();
26951
- }
26952
- },
26953
- false
26954
- );
26872
+ _global.addEventListener("message", ({
26873
+ source,
26874
+ data
26875
+ }) => {
26876
+ if (source === _global && data === token2) {
26877
+ callbacks.length && callbacks.shift()();
26878
+ }
26879
+ }, false);
26955
26880
  return (cb) => {
26956
26881
  callbacks.push(cb);
26957
26882
  _global.postMessage(token2, "*");
@@ -27094,7 +27019,6 @@ var require_axios = __commonJS({
27094
27019
  AxiosError.ERR_CANCELED = "ERR_CANCELED";
27095
27020
  AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
27096
27021
  AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
27097
- var AxiosError$1 = AxiosError;
27098
27022
  function isVisitable(thing) {
27099
27023
  return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
27100
27024
  }
@@ -27118,19 +27042,14 @@ var require_axios = __commonJS({
27118
27042
  if (!utils$1.isObject(obj)) {
27119
27043
  throw new TypeError("target must be an object");
27120
27044
  }
27121
- formData = formData || new (FormData__default["default"] || FormData)();
27122
- options = utils$1.toFlatObject(
27123
- options,
27124
- {
27125
- metaTokens: true,
27126
- dots: false,
27127
- indexes: false
27128
- },
27129
- false,
27130
- function defined(option, source) {
27131
- return !utils$1.isUndefined(source[option]);
27132
- }
27133
- );
27045
+ formData = formData || new (FormData$1 || FormData)();
27046
+ options = utils$1.toFlatObject(options, {
27047
+ metaTokens: true,
27048
+ dots: false,
27049
+ indexes: false
27050
+ }, false, function defined(option, source) {
27051
+ return !utils$1.isUndefined(source[option]);
27052
+ });
27134
27053
  const metaTokens = options.metaTokens;
27135
27054
  const visitor = options.visitor || defaultVisitor;
27136
27055
  const dots = options.dots;
@@ -27149,7 +27068,7 @@ var require_axios = __commonJS({
27149
27068
  return value.toString();
27150
27069
  }
27151
27070
  if (!useBlob && utils$1.isBlob(value)) {
27152
- throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
27071
+ throw new AxiosError("Blob is not supported. Use a Buffer instead.");
27153
27072
  }
27154
27073
  if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
27155
27074
  return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
@@ -27329,14 +27248,13 @@ var require_axios = __commonJS({
27329
27248
  });
27330
27249
  }
27331
27250
  };
27332
- var InterceptorManager$1 = InterceptorManager;
27333
27251
  var transitionalDefaults = {
27334
27252
  silentJSONParsing: true,
27335
27253
  forcedJSONParsing: true,
27336
27254
  clarifyTimeoutError: false,
27337
27255
  legacyInterceptorReqResOrdering: true
27338
27256
  };
27339
- var URLSearchParams = url__default["default"].URLSearchParams;
27257
+ var URLSearchParams = url.URLSearchParams;
27340
27258
  var ALPHA = "abcdefghijklmnopqrstuvwxyz";
27341
27259
  var DIGIT = "0123456789";
27342
27260
  var ALPHABET = {
@@ -27346,9 +27264,11 @@ var require_axios = __commonJS({
27346
27264
  };
27347
27265
  var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
27348
27266
  let str = "";
27349
- const { length } = alphabet;
27267
+ const {
27268
+ length
27269
+ } = alphabet;
27350
27270
  const randomValues = new Uint32Array(size);
27351
- crypto__default["default"].randomFillSync(randomValues);
27271
+ crypto2.randomFillSync(randomValues);
27352
27272
  for (let i = 0; i < size; i++) {
27353
27273
  str += alphabet[randomValues[i] % length];
27354
27274
  }
@@ -27358,7 +27278,7 @@ var require_axios = __commonJS({
27358
27278
  isNode: true,
27359
27279
  classes: {
27360
27280
  URLSearchParams,
27361
- FormData: FormData__default["default"],
27281
+ FormData: FormData$1,
27362
27282
  Blob: typeof Blob !== "undefined" && Blob || null
27363
27283
  },
27364
27284
  ALPHABET,
@@ -27376,8 +27296,8 @@ var require_axios = __commonJS({
27376
27296
  var utils = /* @__PURE__ */ Object.freeze({
27377
27297
  __proto__: null,
27378
27298
  hasBrowserEnv,
27379
- hasStandardBrowserWebWorkerEnv,
27380
27299
  hasStandardBrowserEnv,
27300
+ hasStandardBrowserWebWorkerEnv,
27381
27301
  navigator: _navigator,
27382
27302
  origin
27383
27303
  });
@@ -27463,74 +27383,68 @@ var require_axios = __commonJS({
27463
27383
  var defaults = {
27464
27384
  transitional: transitionalDefaults,
27465
27385
  adapter: ["xhr", "http", "fetch"],
27466
- transformRequest: [
27467
- function transformRequest(data, headers) {
27468
- const contentType = headers.getContentType() || "";
27469
- const hasJSONContentType = contentType.indexOf("application/json") > -1;
27470
- const isObjectPayload = utils$1.isObject(data);
27471
- if (isObjectPayload && utils$1.isHTMLForm(data)) {
27472
- data = new FormData(data);
27473
- }
27474
- const isFormData2 = utils$1.isFormData(data);
27475
- if (isFormData2) {
27476
- return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
27477
- }
27478
- if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
27479
- return data;
27480
- }
27481
- if (utils$1.isArrayBufferView(data)) {
27482
- return data.buffer;
27483
- }
27484
- if (utils$1.isURLSearchParams(data)) {
27485
- headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
27486
- return data.toString();
27487
- }
27488
- let isFileList2;
27489
- if (isObjectPayload) {
27490
- if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
27491
- return toURLEncodedForm(data, this.formSerializer).toString();
27492
- }
27493
- if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
27494
- const _FormData = this.env && this.env.FormData;
27495
- return toFormData(
27496
- isFileList2 ? { "files[]": data } : data,
27497
- _FormData && new _FormData(),
27498
- this.formSerializer
27499
- );
27500
- }
27386
+ transformRequest: [function transformRequest(data, headers) {
27387
+ const contentType = headers.getContentType() || "";
27388
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
27389
+ const isObjectPayload = utils$1.isObject(data);
27390
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
27391
+ data = new FormData(data);
27392
+ }
27393
+ const isFormData2 = utils$1.isFormData(data);
27394
+ if (isFormData2) {
27395
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
27396
+ }
27397
+ if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
27398
+ return data;
27399
+ }
27400
+ if (utils$1.isArrayBufferView(data)) {
27401
+ return data.buffer;
27402
+ }
27403
+ if (utils$1.isURLSearchParams(data)) {
27404
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
27405
+ return data.toString();
27406
+ }
27407
+ let isFileList2;
27408
+ if (isObjectPayload) {
27409
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
27410
+ return toURLEncodedForm(data, this.formSerializer).toString();
27501
27411
  }
27502
- if (isObjectPayload || hasJSONContentType) {
27503
- headers.setContentType("application/json", false);
27504
- return stringifySafely(data);
27412
+ if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
27413
+ const _FormData = this.env && this.env.FormData;
27414
+ return toFormData(isFileList2 ? {
27415
+ "files[]": data
27416
+ } : data, _FormData && new _FormData(), this.formSerializer);
27505
27417
  }
27418
+ }
27419
+ if (isObjectPayload || hasJSONContentType) {
27420
+ headers.setContentType("application/json", false);
27421
+ return stringifySafely(data);
27422
+ }
27423
+ return data;
27424
+ }],
27425
+ transformResponse: [function transformResponse(data) {
27426
+ const transitional = this.transitional || defaults.transitional;
27427
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
27428
+ const JSONRequested = this.responseType === "json";
27429
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
27506
27430
  return data;
27507
27431
  }
27508
- ],
27509
- transformResponse: [
27510
- function transformResponse(data) {
27511
- const transitional = this.transitional || defaults.transitional;
27512
- const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
27513
- const JSONRequested = this.responseType === "json";
27514
- if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
27515
- return data;
27516
- }
27517
- if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
27518
- const silentJSONParsing = transitional && transitional.silentJSONParsing;
27519
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
27520
- try {
27521
- return JSON.parse(data, this.parseReviver);
27522
- } catch (e) {
27523
- if (strictJSONParsing) {
27524
- if (e.name === "SyntaxError") {
27525
- throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
27526
- }
27527
- throw e;
27432
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
27433
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
27434
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
27435
+ try {
27436
+ return JSON.parse(data, this.parseReviver);
27437
+ } catch (e) {
27438
+ if (strictJSONParsing) {
27439
+ if (e.name === "SyntaxError") {
27440
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
27528
27441
  }
27442
+ throw e;
27529
27443
  }
27530
27444
  }
27531
- return data;
27532
27445
  }
27533
- ],
27446
+ return data;
27447
+ }],
27534
27448
  /**
27535
27449
  * A timeout in milliseconds to abort a request. If set to 0 (default) a
27536
27450
  * timeout is not created.
@@ -27557,26 +27471,7 @@ var require_axios = __commonJS({
27557
27471
  utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
27558
27472
  defaults.headers[method] = {};
27559
27473
  });
27560
- var defaults$1 = defaults;
27561
- var ignoreDuplicateOf = utils$1.toObjectSet([
27562
- "age",
27563
- "authorization",
27564
- "content-length",
27565
- "content-type",
27566
- "etag",
27567
- "expires",
27568
- "from",
27569
- "host",
27570
- "if-modified-since",
27571
- "if-unmodified-since",
27572
- "last-modified",
27573
- "location",
27574
- "max-forwards",
27575
- "proxy-authorization",
27576
- "referer",
27577
- "retry-after",
27578
- "user-agent"
27579
- ]);
27474
+ 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"]);
27580
27475
  var parseHeaders = (rawHeaders) => {
27581
27476
  const parsed = {};
27582
27477
  let key;
@@ -27609,7 +27504,7 @@ var require_axios = __commonJS({
27609
27504
  if (value === false || value == null) {
27610
27505
  return value;
27611
27506
  }
27612
- return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
27507
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value).replace(/[\r\n]+$/, "");
27613
27508
  }
27614
27509
  function parseTokens(str) {
27615
27510
  const tokens = /* @__PURE__ */ Object.create(null);
@@ -27816,15 +27711,10 @@ var require_axios = __commonJS({
27816
27711
  return this;
27817
27712
  }
27818
27713
  };
27819
- AxiosHeaders.accessor([
27820
- "Content-Type",
27821
- "Content-Length",
27822
- "Accept",
27823
- "Accept-Encoding",
27824
- "User-Agent",
27825
- "Authorization"
27826
- ]);
27827
- utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
27714
+ AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
27715
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({
27716
+ value
27717
+ }, key) => {
27828
27718
  let mapped = key[0].toUpperCase() + key.slice(1);
27829
27719
  return {
27830
27720
  get: () => value,
@@ -27834,11 +27724,10 @@ var require_axios = __commonJS({
27834
27724
  };
27835
27725
  });
27836
27726
  utils$1.freezeMethods(AxiosHeaders);
27837
- var AxiosHeaders$1 = AxiosHeaders;
27838
27727
  function transformData(fns, response) {
27839
- const config = this || defaults$1;
27728
+ const config = this || defaults;
27840
27729
  const context = response || config;
27841
- const headers = AxiosHeaders$1.from(context.headers);
27730
+ const headers = AxiosHeaders.from(context.headers);
27842
27731
  let data = context.data;
27843
27732
  utils$1.forEach(fns, function transform(fn) {
27844
27733
  data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
@@ -27849,7 +27738,7 @@ var require_axios = __commonJS({
27849
27738
  function isCancel(value) {
27850
27739
  return !!(value && value.__CANCEL__);
27851
27740
  }
27852
- var CanceledError = class extends AxiosError$1 {
27741
+ var CanceledError = class extends AxiosError {
27853
27742
  /**
27854
27743
  * A `CanceledError` is an object that is thrown when an operation is canceled.
27855
27744
  *
@@ -27860,26 +27749,17 @@ var require_axios = __commonJS({
27860
27749
  * @returns {CanceledError} The created error.
27861
27750
  */
27862
27751
  constructor(message, config, request) {
27863
- super(message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config, request);
27752
+ super(message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request);
27864
27753
  this.name = "CanceledError";
27865
27754
  this.__CANCEL__ = true;
27866
27755
  }
27867
27756
  };
27868
- var CanceledError$1 = CanceledError;
27869
27757
  function settle(resolve, reject, response) {
27870
27758
  const validateStatus = response.config.validateStatus;
27871
27759
  if (!response.status || !validateStatus || validateStatus(response.status)) {
27872
27760
  resolve(response);
27873
27761
  } else {
27874
- reject(
27875
- new AxiosError$1(
27876
- "Request failed with status code " + response.status,
27877
- [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
27878
- response.config,
27879
- response.request,
27880
- response
27881
- )
27882
- );
27762
+ reject(new AxiosError("Request failed with status code " + response.status, [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
27883
27763
  }
27884
27764
  }
27885
27765
  function isAbsoluteURL(url2) {
@@ -27898,7 +27778,72 @@ var require_axios = __commonJS({
27898
27778
  }
27899
27779
  return requestedURL;
27900
27780
  }
27901
- var VERSION2 = "1.13.6";
27781
+ var DEFAULT_PORTS = {
27782
+ ftp: 21,
27783
+ gopher: 70,
27784
+ http: 80,
27785
+ https: 443,
27786
+ ws: 80,
27787
+ wss: 443
27788
+ };
27789
+ function parseUrl(urlString) {
27790
+ try {
27791
+ return new URL(urlString);
27792
+ } catch {
27793
+ return null;
27794
+ }
27795
+ }
27796
+ function getProxyForUrl(url2) {
27797
+ var parsedUrl = (typeof url2 === "string" ? parseUrl(url2) : url2) || {};
27798
+ var proto = parsedUrl.protocol;
27799
+ var hostname = parsedUrl.host;
27800
+ var port = parsedUrl.port;
27801
+ if (typeof hostname !== "string" || !hostname || typeof proto !== "string") {
27802
+ return "";
27803
+ }
27804
+ proto = proto.split(":", 1)[0];
27805
+ hostname = hostname.replace(/:\d*$/, "");
27806
+ port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
27807
+ if (!shouldProxy(hostname, port)) {
27808
+ return "";
27809
+ }
27810
+ var proxy = getEnv(proto + "_proxy") || getEnv("all_proxy");
27811
+ if (proxy && proxy.indexOf("://") === -1) {
27812
+ proxy = proto + "://" + proxy;
27813
+ }
27814
+ return proxy;
27815
+ }
27816
+ function shouldProxy(hostname, port) {
27817
+ var NO_PROXY = getEnv("no_proxy").toLowerCase();
27818
+ if (!NO_PROXY) {
27819
+ return true;
27820
+ }
27821
+ if (NO_PROXY === "*") {
27822
+ return false;
27823
+ }
27824
+ return NO_PROXY.split(/[,\s]/).every(function(proxy) {
27825
+ if (!proxy) {
27826
+ return true;
27827
+ }
27828
+ var parsedProxy = proxy.match(/^(.+):(\d+)$/);
27829
+ var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
27830
+ var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
27831
+ if (parsedProxyPort && parsedProxyPort !== port) {
27832
+ return true;
27833
+ }
27834
+ if (!/^[.*]/.test(parsedProxyHostname)) {
27835
+ return hostname !== parsedProxyHostname;
27836
+ }
27837
+ if (parsedProxyHostname.charAt(0) === "*") {
27838
+ parsedProxyHostname = parsedProxyHostname.slice(1);
27839
+ }
27840
+ return !hostname.endsWith(parsedProxyHostname);
27841
+ });
27842
+ }
27843
+ function getEnv(key) {
27844
+ return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
27845
+ }
27846
+ var VERSION2 = "1.14.0";
27902
27847
  function parseProtocol(url2) {
27903
27848
  const match2 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
27904
27849
  return match2 && match2[1] || "";
@@ -27914,7 +27859,7 @@ var require_axios = __commonJS({
27914
27859
  uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
27915
27860
  const match2 = DATA_URL_PATTERN.exec(uri);
27916
27861
  if (!match2) {
27917
- throw new AxiosError$1("Invalid URL", AxiosError$1.ERR_INVALID_URL);
27862
+ throw new AxiosError("Invalid URL", AxiosError.ERR_INVALID_URL);
27918
27863
  }
27919
27864
  const mime = match2[1];
27920
27865
  const isBase64 = match2[2];
@@ -27922,32 +27867,29 @@ var require_axios = __commonJS({
27922
27867
  const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? "base64" : "utf8");
27923
27868
  if (asBlob) {
27924
27869
  if (!_Blob) {
27925
- throw new AxiosError$1("Blob is not supported", AxiosError$1.ERR_NOT_SUPPORT);
27870
+ throw new AxiosError("Blob is not supported", AxiosError.ERR_NOT_SUPPORT);
27926
27871
  }
27927
- return new _Blob([buffer], { type: mime });
27872
+ return new _Blob([buffer], {
27873
+ type: mime
27874
+ });
27928
27875
  }
27929
27876
  return buffer;
27930
27877
  }
27931
- throw new AxiosError$1("Unsupported protocol " + protocol, AxiosError$1.ERR_NOT_SUPPORT);
27878
+ throw new AxiosError("Unsupported protocol " + protocol, AxiosError.ERR_NOT_SUPPORT);
27932
27879
  }
27933
27880
  var kInternals = /* @__PURE__ */ Symbol("internals");
27934
- var AxiosTransformStream = class extends stream__default["default"].Transform {
27881
+ var AxiosTransformStream = class extends stream.Transform {
27935
27882
  constructor(options) {
27936
- options = utils$1.toFlatObject(
27937
- options,
27938
- {
27939
- maxRate: 0,
27940
- chunkSize: 64 * 1024,
27941
- minChunkSize: 100,
27942
- timeWindow: 500,
27943
- ticksRate: 2,
27944
- samplesCount: 15
27945
- },
27946
- null,
27947
- (prop, source) => {
27948
- return !utils$1.isUndefined(source[prop]);
27949
- }
27950
- );
27883
+ options = utils$1.toFlatObject(options, {
27884
+ maxRate: 0,
27885
+ chunkSize: 64 * 1024,
27886
+ minChunkSize: 100,
27887
+ timeWindow: 500,
27888
+ ticksRate: 2,
27889
+ samplesCount: 15
27890
+ }, null, (prop, source) => {
27891
+ return !utils$1.isUndefined(source[prop]);
27892
+ });
27951
27893
  super({
27952
27894
  readableHighWaterMark: options.chunkSize
27953
27895
  });
@@ -28030,12 +27972,9 @@ var require_axios = __commonJS({
28030
27972
  chunkRemainder = _chunk.subarray(maxChunkSize);
28031
27973
  _chunk = _chunk.subarray(0, maxChunkSize);
28032
27974
  }
28033
- pushChunk(
28034
- _chunk,
28035
- chunkRemainder ? () => {
28036
- process.nextTick(_callback, null, chunkRemainder);
28037
- } : _callback
28038
- );
27975
+ pushChunk(_chunk, chunkRemainder ? () => {
27976
+ process.nextTick(_callback, null, chunkRemainder);
27977
+ } : _callback);
28039
27978
  };
28040
27979
  transformChunk(chunk, function transformNextChunk(err, _chunk) {
28041
27980
  if (err) {
@@ -28049,8 +27988,9 @@ var require_axios = __commonJS({
28049
27988
  });
28050
27989
  }
28051
27990
  };
28052
- var AxiosTransformStream$1 = AxiosTransformStream;
28053
- var { asyncIterator } = Symbol;
27991
+ var {
27992
+ asyncIterator
27993
+ } = Symbol;
28054
27994
  var readBlob = async function* (blob) {
28055
27995
  if (blob.stream) {
28056
27996
  yield* blob.stream();
@@ -28062,15 +28002,16 @@ var require_axios = __commonJS({
28062
28002
  yield blob;
28063
28003
  }
28064
28004
  };
28065
- var readBlob$1 = readBlob;
28066
28005
  var BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + "-_";
28067
- var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util__default["default"].TextEncoder();
28006
+ var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder();
28068
28007
  var CRLF = "\r\n";
28069
28008
  var CRLF_BYTES = textEncoder.encode(CRLF);
28070
28009
  var CRLF_BYTES_COUNT = 2;
28071
28010
  var FormDataPart = class {
28072
28011
  constructor(name, value) {
28073
- const { escapeName } = this.constructor;
28012
+ const {
28013
+ escapeName
28014
+ } = this.constructor;
28074
28015
  const isStringValue = utils$1.isString(value);
28075
28016
  let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`;
28076
28017
  if (isStringValue) {
@@ -28086,23 +28027,22 @@ var require_axios = __commonJS({
28086
28027
  }
28087
28028
  async *encode() {
28088
28029
  yield this.headers;
28089
- const { value } = this;
28030
+ const {
28031
+ value
28032
+ } = this;
28090
28033
  if (utils$1.isTypedArray(value)) {
28091
28034
  yield value;
28092
28035
  } else {
28093
- yield* readBlob$1(value);
28036
+ yield* readBlob(value);
28094
28037
  }
28095
28038
  yield CRLF_BYTES;
28096
28039
  }
28097
28040
  static escapeName(name) {
28098
- return String(name).replace(
28099
- /[\r\n"]/g,
28100
- (match2) => ({
28101
- "\r": "%0D",
28102
- "\n": "%0A",
28103
- '"': "%22"
28104
- })[match2]
28105
- );
28041
+ return String(name).replace(/[\r\n"]/g, (match2) => ({
28042
+ "\r": "%0D",
28043
+ "\n": "%0A",
28044
+ '"': "%22"
28045
+ })[match2]);
28106
28046
  }
28107
28047
  };
28108
28048
  var formDataToStream = (form, headersHandler, options) => {
@@ -28134,18 +28074,15 @@ var require_axios = __commonJS({
28134
28074
  computedHeaders["Content-Length"] = contentLength;
28135
28075
  }
28136
28076
  headersHandler && headersHandler(computedHeaders);
28137
- return stream.Readable.from(
28138
- (async function* () {
28139
- for (const part of parts) {
28140
- yield boundaryBytes;
28141
- yield* part.encode();
28142
- }
28143
- yield footerBytes;
28144
- })()
28145
- );
28077
+ return stream.Readable.from((async function* () {
28078
+ for (const part of parts) {
28079
+ yield boundaryBytes;
28080
+ yield* part.encode();
28081
+ }
28082
+ yield footerBytes;
28083
+ })());
28146
28084
  };
28147
- var formDataToStream$1 = formDataToStream;
28148
- var ZlibHeaderTransformStream = class extends stream__default["default"].Transform {
28085
+ var ZlibHeaderTransformStream = class extends stream.Transform {
28149
28086
  __transform(chunk, encoding, callback) {
28150
28087
  this.push(chunk);
28151
28088
  callback();
@@ -28163,7 +28100,6 @@ var require_axios = __commonJS({
28163
28100
  this.__transform(chunk, encoding, callback);
28164
28101
  }
28165
28102
  };
28166
- var ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream;
28167
28103
  var callbackify = (fn, reducer) => {
28168
28104
  return utils$1.isAsyncFn(fn) ? function(...args) {
28169
28105
  const cb = args.pop();
@@ -28176,7 +28112,6 @@ var require_axios = __commonJS({
28176
28112
  }, cb);
28177
28113
  } : fn;
28178
28114
  };
28179
- var callbackify$1 = callbackify;
28180
28115
  function speedometer(samplesCount, min) {
28181
28116
  samplesCount = samplesCount || 10;
28182
28117
  const bytes = new Array(samplesCount);
@@ -28268,14 +28203,11 @@ var require_axios = __commonJS({
28268
28203
  };
28269
28204
  var progressEventDecorator = (total, throttled) => {
28270
28205
  const lengthComputable = total != null;
28271
- return [
28272
- (loaded) => throttled[0]({
28273
- lengthComputable,
28274
- total,
28275
- loaded
28276
- }),
28277
- throttled[1]
28278
- ];
28206
+ return [(loaded) => throttled[0]({
28207
+ lengthComputable,
28208
+ total,
28209
+ loaded
28210
+ }), throttled[1]];
28279
28211
  };
28280
28212
  var asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
28281
28213
  function estimateDataURLDecodedBytes(url2) {
@@ -28328,15 +28260,18 @@ var require_axios = __commonJS({
28328
28260
  return Buffer.byteLength(body, "utf8");
28329
28261
  }
28330
28262
  var zlibOptions = {
28331
- flush: zlib__default["default"].constants.Z_SYNC_FLUSH,
28332
- finishFlush: zlib__default["default"].constants.Z_SYNC_FLUSH
28263
+ flush: zlib.constants.Z_SYNC_FLUSH,
28264
+ finishFlush: zlib.constants.Z_SYNC_FLUSH
28333
28265
  };
28334
28266
  var brotliOptions = {
28335
- flush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH,
28336
- finishFlush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH
28267
+ flush: zlib.constants.BROTLI_OPERATION_FLUSH,
28268
+ finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
28337
28269
  };
28338
- var isBrotliSupported = utils$1.isFunction(zlib__default["default"].createBrotliDecompress);
28339
- var { http: httpFollow, https: httpsFollow } = followRedirects__default["default"];
28270
+ var isBrotliSupported = utils$1.isFunction(zlib.createBrotliDecompress);
28271
+ var {
28272
+ http: httpFollow,
28273
+ https: httpsFollow
28274
+ } = followRedirects;
28340
28275
  var isHttps = /https:?/;
28341
28276
  var supportedProtocols = platform.protocols.map((protocol) => {
28342
28277
  return protocol + ":";
@@ -28350,23 +28285,20 @@ var require_axios = __commonJS({
28350
28285
  this.sessions = /* @__PURE__ */ Object.create(null);
28351
28286
  }
28352
28287
  getSession(authority, options) {
28353
- options = Object.assign(
28354
- {
28355
- sessionTimeout: 1e3
28356
- },
28357
- options
28358
- );
28288
+ options = Object.assign({
28289
+ sessionTimeout: 1e3
28290
+ }, options);
28359
28291
  let authoritySessions = this.sessions[authority];
28360
28292
  if (authoritySessions) {
28361
28293
  let len = authoritySessions.length;
28362
28294
  for (let i = 0; i < len; i++) {
28363
28295
  const [sessionHandle, sessionOptions] = authoritySessions[i];
28364
- if (!sessionHandle.destroyed && !sessionHandle.closed && util__default["default"].isDeepStrictEqual(sessionOptions, options)) {
28296
+ if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) {
28365
28297
  return sessionHandle;
28366
28298
  }
28367
28299
  }
28368
28300
  }
28369
- const session = http2__default["default"].connect(authority, options);
28301
+ const session = http2.connect(authority, options);
28370
28302
  let removed;
28371
28303
  const removeSession = () => {
28372
28304
  if (removed) {
@@ -28381,12 +28313,17 @@ var require_axios = __commonJS({
28381
28313
  } else {
28382
28314
  entries.splice(i, 1);
28383
28315
  }
28316
+ if (!session.closed) {
28317
+ session.close();
28318
+ }
28384
28319
  return;
28385
28320
  }
28386
28321
  }
28387
28322
  };
28388
28323
  const originalRequestFn = session.request;
28389
- const { sessionTimeout } = options;
28324
+ const {
28325
+ sessionTimeout
28326
+ } = options;
28390
28327
  if (sessionTimeout != null) {
28391
28328
  let timer;
28392
28329
  let streamsCount = 0;
@@ -28426,7 +28363,7 @@ var require_axios = __commonJS({
28426
28363
  function setProxy(options, configProxy, location) {
28427
28364
  let proxy = configProxy;
28428
28365
  if (!proxy && proxy !== false) {
28429
- const proxyUrl = proxyFromEnv__default["default"].getProxyForUrl(location);
28366
+ const proxyUrl = getProxyForUrl(location);
28430
28367
  if (proxyUrl) {
28431
28368
  proxy = new URL(proxyUrl);
28432
28369
  }
@@ -28440,7 +28377,9 @@ var require_axios = __commonJS({
28440
28377
  if (validProxyAuth) {
28441
28378
  proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
28442
28379
  } else if (typeof proxy.auth === "object") {
28443
- throw new AxiosError$1("Invalid proxy authorization", AxiosError$1.ERR_BAD_OPTION, { proxy });
28380
+ throw new AxiosError("Invalid proxy authorization", AxiosError.ERR_BAD_OPTION, {
28381
+ proxy
28382
+ });
28444
28383
  }
28445
28384
  const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
28446
28385
  options.headers["Proxy-Authorization"] = "Basic " + base64;
@@ -28480,7 +28419,10 @@ var require_axios = __commonJS({
28480
28419
  asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject);
28481
28420
  });
28482
28421
  };
28483
- var resolveFamily = ({ address, family }) => {
28422
+ var resolveFamily = ({
28423
+ address,
28424
+ family
28425
+ }) => {
28484
28426
  if (!utils$1.isString(address)) {
28485
28427
  throw TypeError("address must be a string");
28486
28428
  }
@@ -28489,13 +28431,24 @@ var require_axios = __commonJS({
28489
28431
  family: family || (address.indexOf(".") < 0 ? 6 : 4)
28490
28432
  };
28491
28433
  };
28492
- var buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : { address, family });
28434
+ var buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : {
28435
+ address,
28436
+ family
28437
+ });
28493
28438
  var http2Transport = {
28494
28439
  request(options, cb) {
28495
28440
  const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
28496
- const { http2Options, headers } = options;
28441
+ const {
28442
+ http2Options,
28443
+ headers
28444
+ } = options;
28497
28445
  const session = http2Sessions.getSession(authority, http2Options);
28498
- const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http2__default["default"].constants;
28446
+ const {
28447
+ HTTP2_HEADER_SCHEME,
28448
+ HTTP2_HEADER_METHOD,
28449
+ HTTP2_HEADER_PATH,
28450
+ HTTP2_HEADER_STATUS
28451
+ } = http2.constants;
28499
28452
  const http2Headers = {
28500
28453
  [HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
28501
28454
  [HTTP2_HEADER_METHOD]: options.method,
@@ -28519,8 +28472,17 @@ var require_axios = __commonJS({
28519
28472
  };
28520
28473
  var httpAdapter = isHttpAdapterSupported && function httpAdapter2(config) {
28521
28474
  return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
28522
- let { data, lookup, family, httpVersion = 1, http2Options } = config;
28523
- const { responseType, responseEncoding } = config;
28475
+ let {
28476
+ data,
28477
+ lookup,
28478
+ family,
28479
+ httpVersion = 1,
28480
+ http2Options
28481
+ } = config;
28482
+ const {
28483
+ responseType,
28484
+ responseEncoding
28485
+ } = config;
28524
28486
  const method = config.method.toUpperCase();
28525
28487
  let isDone;
28526
28488
  let rejected = false;
@@ -28534,7 +28496,7 @@ var require_axios = __commonJS({
28534
28496
  }
28535
28497
  const isHttp2 = httpVersion === 2;
28536
28498
  if (lookup) {
28537
- const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]);
28499
+ const _lookup = callbackify(lookup, (value) => utils$1.isArray(value) ? value : [value]);
28538
28500
  lookup = (hostname, opt, cb) => {
28539
28501
  _lookup(hostname, opt, (err, arg0, arg1) => {
28540
28502
  if (err) {
@@ -28548,10 +28510,7 @@ var require_axios = __commonJS({
28548
28510
  const abortEmitter = new events.EventEmitter();
28549
28511
  function abort(reason) {
28550
28512
  try {
28551
- abortEmitter.emit(
28552
- "abort",
28553
- !reason || reason.type ? new CanceledError$1(null, config, req) : reason
28554
- );
28513
+ abortEmitter.emit("abort", !reason || reason.type ? new CanceledError(null, config, req) : reason);
28555
28514
  } catch (err) {
28556
28515
  console.warn("emit error", err);
28557
28516
  }
@@ -28579,9 +28538,11 @@ var require_axios = __commonJS({
28579
28538
  onFinished();
28580
28539
  return;
28581
28540
  }
28582
- const { data: data2 } = response;
28583
- if (data2 instanceof stream__default["default"].Readable || data2 instanceof stream__default["default"].Duplex) {
28584
- const offListeners = stream__default["default"].finished(data2, () => {
28541
+ const {
28542
+ data: data2
28543
+ } = response;
28544
+ if (data2 instanceof stream.Readable || data2 instanceof stream.Duplex) {
28545
+ const offListeners = stream.finished(data2, () => {
28585
28546
  offListeners();
28586
28547
  onFinished();
28587
28548
  });
@@ -28597,13 +28558,7 @@ var require_axios = __commonJS({
28597
28558
  const dataUrl = String(config.url || fullPath || "");
28598
28559
  const estimated = estimateDataURLDecodedBytes(dataUrl);
28599
28560
  if (estimated > config.maxContentLength) {
28600
- return reject(
28601
- new AxiosError$1(
28602
- "maxContentLength size of " + config.maxContentLength + " exceeded",
28603
- AxiosError$1.ERR_BAD_RESPONSE,
28604
- config
28605
- )
28606
- );
28561
+ return reject(new AxiosError("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config));
28607
28562
  }
28608
28563
  }
28609
28564
  let convertedData;
@@ -28620,7 +28575,7 @@ var require_axios = __commonJS({
28620
28575
  Blob: config.env && config.env.Blob
28621
28576
  });
28622
28577
  } catch (err) {
28623
- throw AxiosError$1.from(err, AxiosError$1.ERR_BAD_REQUEST, config);
28578
+ throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);
28624
28579
  }
28625
28580
  if (responseType === "text") {
28626
28581
  convertedData = convertedData.toString(responseEncoding);
@@ -28628,44 +28583,41 @@ var require_axios = __commonJS({
28628
28583
  convertedData = utils$1.stripBOM(convertedData);
28629
28584
  }
28630
28585
  } else if (responseType === "stream") {
28631
- convertedData = stream__default["default"].Readable.from(convertedData);
28586
+ convertedData = stream.Readable.from(convertedData);
28632
28587
  }
28633
28588
  return settle(resolve, reject, {
28634
28589
  data: convertedData,
28635
28590
  status: 200,
28636
28591
  statusText: "OK",
28637
- headers: new AxiosHeaders$1(),
28592
+ headers: new AxiosHeaders(),
28638
28593
  config
28639
28594
  });
28640
28595
  }
28641
28596
  if (supportedProtocols.indexOf(protocol) === -1) {
28642
- return reject(
28643
- new AxiosError$1("Unsupported protocol " + protocol, AxiosError$1.ERR_BAD_REQUEST, config)
28644
- );
28597
+ return reject(new AxiosError("Unsupported protocol " + protocol, AxiosError.ERR_BAD_REQUEST, config));
28645
28598
  }
28646
- const headers = AxiosHeaders$1.from(config.headers).normalize();
28599
+ const headers = AxiosHeaders.from(config.headers).normalize();
28647
28600
  headers.set("User-Agent", "axios/" + VERSION2, false);
28648
- const { onUploadProgress, onDownloadProgress } = config;
28601
+ const {
28602
+ onUploadProgress,
28603
+ onDownloadProgress
28604
+ } = config;
28649
28605
  const maxRate = config.maxRate;
28650
28606
  let maxUploadRate = void 0;
28651
28607
  let maxDownloadRate = void 0;
28652
28608
  if (utils$1.isSpecCompliantForm(data)) {
28653
28609
  const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
28654
- data = formDataToStream$1(
28655
- data,
28656
- (formHeaders) => {
28657
- headers.set(formHeaders);
28658
- },
28659
- {
28660
- tag: `axios-${VERSION2}-boundary`,
28661
- boundary: userBoundary && userBoundary[1] || void 0
28662
- }
28663
- );
28610
+ data = formDataToStream(data, (formHeaders) => {
28611
+ headers.set(formHeaders);
28612
+ }, {
28613
+ tag: `axios-${VERSION2}-boundary`,
28614
+ boundary: userBoundary && userBoundary[1] || void 0
28615
+ });
28664
28616
  } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) {
28665
28617
  headers.set(data.getHeaders());
28666
28618
  if (!headers.hasContentLength()) {
28667
28619
  try {
28668
- const knownLength = await util__default["default"].promisify(data.getLength).call(data);
28620
+ const knownLength = await util.promisify(data.getLength).call(data);
28669
28621
  Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
28670
28622
  } catch (e) {
28671
28623
  }
@@ -28673,7 +28625,7 @@ var require_axios = __commonJS({
28673
28625
  } else if (utils$1.isBlob(data) || utils$1.isFile(data)) {
28674
28626
  data.size && headers.setContentType(data.type || "application/octet-stream");
28675
28627
  headers.setContentLength(data.size || 0);
28676
- data = stream__default["default"].Readable.from(readBlob$1(data));
28628
+ data = stream.Readable.from(readBlob(data));
28677
28629
  } else if (data && !utils$1.isStream(data)) {
28678
28630
  if (Buffer.isBuffer(data)) ;
28679
28631
  else if (utils$1.isArrayBuffer(data)) {
@@ -28681,23 +28633,11 @@ var require_axios = __commonJS({
28681
28633
  } else if (utils$1.isString(data)) {
28682
28634
  data = Buffer.from(data, "utf-8");
28683
28635
  } else {
28684
- return reject(
28685
- new AxiosError$1(
28686
- "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
28687
- AxiosError$1.ERR_BAD_REQUEST,
28688
- config
28689
- )
28690
- );
28636
+ return reject(new AxiosError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError.ERR_BAD_REQUEST, config));
28691
28637
  }
28692
28638
  headers.setContentLength(data.length, false);
28693
28639
  if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
28694
- return reject(
28695
- new AxiosError$1(
28696
- "Request body larger than maxBodyLength limit",
28697
- AxiosError$1.ERR_BAD_REQUEST,
28698
- config
28699
- )
28700
- );
28640
+ return reject(new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config));
28701
28641
  }
28702
28642
  }
28703
28643
  const contentLength = utils$1.toFiniteNumber(headers.getContentLength());
@@ -28709,27 +28649,14 @@ var require_axios = __commonJS({
28709
28649
  }
28710
28650
  if (data && (onUploadProgress || maxUploadRate)) {
28711
28651
  if (!utils$1.isStream(data)) {
28712
- data = stream__default["default"].Readable.from(data, { objectMode: false });
28652
+ data = stream.Readable.from(data, {
28653
+ objectMode: false
28654
+ });
28713
28655
  }
28714
- data = stream__default["default"].pipeline(
28715
- [
28716
- data,
28717
- new AxiosTransformStream$1({
28718
- maxRate: utils$1.toFiniteNumber(maxUploadRate)
28719
- })
28720
- ],
28721
- utils$1.noop
28722
- );
28723
- onUploadProgress && data.on(
28724
- "progress",
28725
- flushOnFinish(
28726
- data,
28727
- progressEventDecorator(
28728
- contentLength,
28729
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
28730
- )
28731
- )
28732
- );
28656
+ data = stream.pipeline([data, new AxiosTransformStream({
28657
+ maxRate: utils$1.toFiniteNumber(maxUploadRate)
28658
+ })], utils$1.noop);
28659
+ onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
28733
28660
  }
28734
28661
  let auth = void 0;
28735
28662
  if (config.auth) {
@@ -28745,11 +28672,7 @@ var require_axios = __commonJS({
28745
28672
  auth && headers.delete("authorization");
28746
28673
  let path;
28747
28674
  try {
28748
- path = buildURL(
28749
- parsed.pathname + parsed.search,
28750
- config.params,
28751
- config.paramsSerializer
28752
- ).replace(/^\?/, "");
28675
+ path = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
28753
28676
  } catch (err) {
28754
28677
  const customErr = new Error(err.message);
28755
28678
  customErr.config = config;
@@ -28757,16 +28680,15 @@ var require_axios = __commonJS({
28757
28680
  customErr.exists = true;
28758
28681
  return reject(customErr);
28759
28682
  }
28760
- headers.set(
28761
- "Accept-Encoding",
28762
- "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""),
28763
- false
28764
- );
28683
+ headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
28765
28684
  const options = {
28766
28685
  path,
28767
28686
  method,
28768
28687
  headers: headers.toJSON(),
28769
- agents: { http: config.httpAgent, https: config.httpsAgent },
28688
+ agents: {
28689
+ http: config.httpAgent,
28690
+ https: config.httpsAgent
28691
+ },
28770
28692
  auth,
28771
28693
  protocol,
28772
28694
  family,
@@ -28780,11 +28702,7 @@ var require_axios = __commonJS({
28780
28702
  } else {
28781
28703
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
28782
28704
  options.port = parsed.port;
28783
- setProxy(
28784
- options,
28785
- config.proxy,
28786
- protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path
28787
- );
28705
+ setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
28788
28706
  }
28789
28707
  let transport;
28790
28708
  const isHttpsRequest = isHttps.test(options.protocol);
@@ -28795,7 +28713,7 @@ var require_axios = __commonJS({
28795
28713
  if (config.transport) {
28796
28714
  transport = config.transport;
28797
28715
  } else if (config.maxRedirects === 0) {
28798
- transport = isHttpsRequest ? https__default["default"] : http__default["default"];
28716
+ transport = isHttpsRequest ? https : http;
28799
28717
  } else {
28800
28718
  if (config.maxRedirects) {
28801
28719
  options.maxRedirects = config.maxRedirects;
@@ -28819,19 +28737,10 @@ var require_axios = __commonJS({
28819
28737
  const streams = [res];
28820
28738
  const responseLength = utils$1.toFiniteNumber(res.headers["content-length"]);
28821
28739
  if (onDownloadProgress || maxDownloadRate) {
28822
- const transformStream = new AxiosTransformStream$1({
28740
+ const transformStream = new AxiosTransformStream({
28823
28741
  maxRate: utils$1.toFiniteNumber(maxDownloadRate)
28824
28742
  });
28825
- onDownloadProgress && transformStream.on(
28826
- "progress",
28827
- flushOnFinish(
28828
- transformStream,
28829
- progressEventDecorator(
28830
- responseLength,
28831
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
28832
- )
28833
- )
28834
- );
28743
+ onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3))));
28835
28744
  streams.push(transformStream);
28836
28745
  }
28837
28746
  let responseStream = res;
@@ -28846,26 +28755,26 @@ var require_axios = __commonJS({
28846
28755
  case "x-gzip":
28847
28756
  case "compress":
28848
28757
  case "x-compress":
28849
- streams.push(zlib__default["default"].createUnzip(zlibOptions));
28758
+ streams.push(zlib.createUnzip(zlibOptions));
28850
28759
  delete res.headers["content-encoding"];
28851
28760
  break;
28852
28761
  case "deflate":
28853
- streams.push(new ZlibHeaderTransformStream$1());
28854
- streams.push(zlib__default["default"].createUnzip(zlibOptions));
28762
+ streams.push(new ZlibHeaderTransformStream());
28763
+ streams.push(zlib.createUnzip(zlibOptions));
28855
28764
  delete res.headers["content-encoding"];
28856
28765
  break;
28857
28766
  case "br":
28858
28767
  if (isBrotliSupported) {
28859
- streams.push(zlib__default["default"].createBrotliDecompress(brotliOptions));
28768
+ streams.push(zlib.createBrotliDecompress(brotliOptions));
28860
28769
  delete res.headers["content-encoding"];
28861
28770
  }
28862
28771
  }
28863
28772
  }
28864
- responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils$1.noop) : streams[0];
28773
+ responseStream = streams.length > 1 ? stream.pipeline(streams, utils$1.noop) : streams[0];
28865
28774
  const response = {
28866
28775
  status: res.statusCode,
28867
28776
  statusText: res.statusMessage,
28868
- headers: new AxiosHeaders$1(res.headers),
28777
+ headers: new AxiosHeaders(res.headers),
28869
28778
  config,
28870
28779
  request: lastRequest
28871
28780
  };
@@ -28881,32 +28790,20 @@ var require_axios = __commonJS({
28881
28790
  if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
28882
28791
  rejected = true;
28883
28792
  responseStream.destroy();
28884
- abort(
28885
- new AxiosError$1(
28886
- "maxContentLength size of " + config.maxContentLength + " exceeded",
28887
- AxiosError$1.ERR_BAD_RESPONSE,
28888
- config,
28889
- lastRequest
28890
- )
28891
- );
28793
+ abort(new AxiosError("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
28892
28794
  }
28893
28795
  });
28894
28796
  responseStream.on("aborted", function handlerStreamAborted() {
28895
28797
  if (rejected) {
28896
28798
  return;
28897
28799
  }
28898
- const err = new AxiosError$1(
28899
- "stream has been aborted",
28900
- AxiosError$1.ERR_BAD_RESPONSE,
28901
- config,
28902
- lastRequest
28903
- );
28800
+ const err = new AxiosError("stream has been aborted", AxiosError.ERR_BAD_RESPONSE, config, lastRequest);
28904
28801
  responseStream.destroy(err);
28905
28802
  reject(err);
28906
28803
  });
28907
28804
  responseStream.on("error", function handleStreamError(err) {
28908
28805
  if (req.destroyed) return;
28909
- reject(AxiosError$1.from(err, null, config, lastRequest));
28806
+ reject(AxiosError.from(err, null, config, lastRequest));
28910
28807
  });
28911
28808
  responseStream.on("end", function handleStreamEnd() {
28912
28809
  try {
@@ -28919,7 +28816,7 @@ var require_axios = __commonJS({
28919
28816
  }
28920
28817
  response.data = responseData;
28921
28818
  } catch (err) {
28922
- return reject(AxiosError$1.from(err, null, config, response.request, response));
28819
+ return reject(AxiosError.from(err, null, config, response.request, response));
28923
28820
  }
28924
28821
  settle(resolve, reject, response);
28925
28822
  });
@@ -28939,7 +28836,7 @@ var require_axios = __commonJS({
28939
28836
  }
28940
28837
  });
28941
28838
  req.on("error", function handleRequestError(err) {
28942
- reject(AxiosError$1.from(err, null, config, req));
28839
+ reject(AxiosError.from(err, null, config, req));
28943
28840
  });
28944
28841
  req.on("socket", function handleRequestSocket(socket) {
28945
28842
  socket.setKeepAlive(true, 1e3 * 60);
@@ -28947,14 +28844,7 @@ var require_axios = __commonJS({
28947
28844
  if (config.timeout) {
28948
28845
  const timeout = parseInt(config.timeout, 10);
28949
28846
  if (Number.isNaN(timeout)) {
28950
- abort(
28951
- new AxiosError$1(
28952
- "error trying to parse `config.timeout` to int",
28953
- AxiosError$1.ERR_BAD_OPTION_VALUE,
28954
- config,
28955
- req
28956
- )
28957
- );
28847
+ abort(new AxiosError("error trying to parse `config.timeout` to int", AxiosError.ERR_BAD_OPTION_VALUE, config, req));
28958
28848
  return;
28959
28849
  }
28960
28850
  req.setTimeout(timeout, function handleRequestTimeout() {
@@ -28964,14 +28854,7 @@ var require_axios = __commonJS({
28964
28854
  if (config.timeoutErrorMessage) {
28965
28855
  timeoutErrorMessage = config.timeoutErrorMessage;
28966
28856
  }
28967
- abort(
28968
- new AxiosError$1(
28969
- timeoutErrorMessage,
28970
- transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
28971
- config,
28972
- req
28973
- )
28974
- );
28857
+ abort(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req));
28975
28858
  });
28976
28859
  } else {
28977
28860
  req.setTimeout(0);
@@ -28988,7 +28871,7 @@ var require_axios = __commonJS({
28988
28871
  });
28989
28872
  data.on("close", () => {
28990
28873
  if (!ended && !errored) {
28991
- abort(new CanceledError$1("Request stream has been aborted", config, req));
28874
+ abort(new CanceledError("Request stream has been aborted", config, req));
28992
28875
  }
28993
28876
  });
28994
28877
  data.pipe(req);
@@ -29001,10 +28884,7 @@ var require_axios = __commonJS({
29001
28884
  var isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url2) => {
29002
28885
  url2 = new URL(url2, platform.origin);
29003
28886
  return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
29004
- })(
29005
- new URL(platform.origin),
29006
- platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
29007
- ) : () => true;
28887
+ })(new URL(platform.origin), platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)) : () => true;
29008
28888
  var cookies = platform.hasStandardBrowserEnv ? (
29009
28889
  // Standard browser envs support document.cookie
29010
28890
  {
@@ -29049,13 +28929,17 @@ var require_axios = __commonJS({
29049
28929
  }
29050
28930
  }
29051
28931
  );
29052
- var headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
28932
+ var headersToObject = (thing) => thing instanceof AxiosHeaders ? {
28933
+ ...thing
28934
+ } : thing;
29053
28935
  function mergeConfig(config1, config2) {
29054
28936
  config2 = config2 || {};
29055
28937
  const config = {};
29056
28938
  function getMergedValue(target, source, prop, caseless) {
29057
28939
  if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
29058
- return utils$1.merge.call({ caseless }, target, source);
28940
+ return utils$1.merge.call({
28941
+ caseless
28942
+ }, target, source);
29059
28943
  } else if (utils$1.isPlainObject(source)) {
29060
28944
  return utils$1.merge({}, source);
29061
28945
  } else if (utils$1.isArray(source)) {
@@ -29120,7 +29004,10 @@ var require_axios = __commonJS({
29120
29004
  validateStatus: mergeDirectKeys,
29121
29005
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
29122
29006
  };
29123
- utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
29007
+ utils$1.forEach(Object.keys({
29008
+ ...config1,
29009
+ ...config2
29010
+ }), function computeConfigValue(prop) {
29124
29011
  if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
29125
29012
  const merge2 = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
29126
29013
  const configValue = merge2(config1[prop], config2[prop], prop);
@@ -29130,20 +29017,18 @@ var require_axios = __commonJS({
29130
29017
  }
29131
29018
  var resolveConfig = (config) => {
29132
29019
  const newConfig = mergeConfig({}, config);
29133
- let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
29134
- newConfig.headers = headers = AxiosHeaders$1.from(headers);
29135
- newConfig.url = buildURL(
29136
- buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
29137
- config.params,
29138
- config.paramsSerializer
29139
- );
29020
+ let {
29021
+ data,
29022
+ withXSRFToken,
29023
+ xsrfHeaderName,
29024
+ xsrfCookieName,
29025
+ headers,
29026
+ auth
29027
+ } = newConfig;
29028
+ newConfig.headers = headers = AxiosHeaders.from(headers);
29029
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
29140
29030
  if (auth) {
29141
- headers.set(
29142
- "Authorization",
29143
- "Basic " + btoa(
29144
- (auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")
29145
- )
29146
- );
29031
+ headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
29147
29032
  }
29148
29033
  if (utils$1.isFormData(data)) {
29149
29034
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
@@ -29174,8 +29059,12 @@ var require_axios = __commonJS({
29174
29059
  return new Promise(function dispatchXhrRequest(resolve, reject) {
29175
29060
  const _config = resolveConfig(config);
29176
29061
  let requestData = _config.data;
29177
- const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
29178
- let { responseType, onUploadProgress, onDownloadProgress } = _config;
29062
+ const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
29063
+ let {
29064
+ responseType,
29065
+ onUploadProgress,
29066
+ onDownloadProgress
29067
+ } = _config;
29179
29068
  let onCanceled;
29180
29069
  let uploadThrottled, downloadThrottled;
29181
29070
  let flushUpload, flushDownload;
@@ -29192,9 +29081,7 @@ var require_axios = __commonJS({
29192
29081
  if (!request) {
29193
29082
  return;
29194
29083
  }
29195
- const responseHeaders = AxiosHeaders$1.from(
29196
- "getAllResponseHeaders" in request && request.getAllResponseHeaders()
29197
- );
29084
+ const responseHeaders = AxiosHeaders.from("getAllResponseHeaders" in request && request.getAllResponseHeaders());
29198
29085
  const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
29199
29086
  const response = {
29200
29087
  data: responseData,
@@ -29204,17 +29091,13 @@ var require_axios = __commonJS({
29204
29091
  config,
29205
29092
  request
29206
29093
  };
29207
- settle(
29208
- function _resolve(value) {
29209
- resolve(value);
29210
- done();
29211
- },
29212
- function _reject(err) {
29213
- reject(err);
29214
- done();
29215
- },
29216
- response
29217
- );
29094
+ settle(function _resolve(value) {
29095
+ resolve(value);
29096
+ done();
29097
+ }, function _reject(err) {
29098
+ reject(err);
29099
+ done();
29100
+ }, response);
29218
29101
  request = null;
29219
29102
  }
29220
29103
  if ("onloadend" in request) {
@@ -29234,12 +29117,12 @@ var require_axios = __commonJS({
29234
29117
  if (!request) {
29235
29118
  return;
29236
29119
  }
29237
- reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
29120
+ reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
29238
29121
  request = null;
29239
29122
  };
29240
29123
  request.onerror = function handleError(event) {
29241
29124
  const msg = event && event.message ? event.message : "Network Error";
29242
- const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
29125
+ const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
29243
29126
  err.event = event || null;
29244
29127
  reject(err);
29245
29128
  request = null;
@@ -29250,14 +29133,7 @@ var require_axios = __commonJS({
29250
29133
  if (_config.timeoutErrorMessage) {
29251
29134
  timeoutErrorMessage = _config.timeoutErrorMessage;
29252
29135
  }
29253
- reject(
29254
- new AxiosError$1(
29255
- timeoutErrorMessage,
29256
- transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
29257
- config,
29258
- request
29259
- )
29260
- );
29136
+ reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
29261
29137
  request = null;
29262
29138
  };
29263
29139
  requestData === void 0 && requestHeaders.setContentType(null);
@@ -29286,7 +29162,7 @@ var require_axios = __commonJS({
29286
29162
  if (!request) {
29287
29163
  return;
29288
29164
  }
29289
- reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
29165
+ reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
29290
29166
  request.abort();
29291
29167
  request = null;
29292
29168
  };
@@ -29297,20 +29173,16 @@ var require_axios = __commonJS({
29297
29173
  }
29298
29174
  const protocol = parseProtocol(_config.url);
29299
29175
  if (protocol && platform.protocols.indexOf(protocol) === -1) {
29300
- reject(
29301
- new AxiosError$1(
29302
- "Unsupported protocol " + protocol + ":",
29303
- AxiosError$1.ERR_BAD_REQUEST,
29304
- config
29305
- )
29306
- );
29176
+ reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
29307
29177
  return;
29308
29178
  }
29309
29179
  request.send(requestData || null);
29310
29180
  });
29311
29181
  };
29312
29182
  var composeSignals = (signals, timeout) => {
29313
- const { length } = signals = signals ? signals.filter(Boolean) : [];
29183
+ const {
29184
+ length
29185
+ } = signals = signals ? signals.filter(Boolean) : [];
29314
29186
  if (timeout || length) {
29315
29187
  let controller = new AbortController();
29316
29188
  let aborted;
@@ -29319,14 +29191,12 @@ var require_axios = __commonJS({
29319
29191
  aborted = true;
29320
29192
  unsubscribe();
29321
29193
  const err = reason instanceof Error ? reason : this.reason;
29322
- controller.abort(
29323
- err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err)
29324
- );
29194
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
29325
29195
  }
29326
29196
  };
29327
29197
  let timer = timeout && setTimeout(() => {
29328
29198
  timer = null;
29329
- onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
29199
+ onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
29330
29200
  }, timeout);
29331
29201
  const unsubscribe = () => {
29332
29202
  if (signals) {
@@ -29339,15 +29209,16 @@ var require_axios = __commonJS({
29339
29209
  }
29340
29210
  };
29341
29211
  signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
29342
- const { signal } = controller;
29212
+ const {
29213
+ signal
29214
+ } = controller;
29343
29215
  signal.unsubscribe = () => utils$1.asap(unsubscribe);
29344
29216
  return signal;
29345
29217
  }
29346
29218
  };
29347
- var composeSignals$1 = composeSignals;
29348
29219
  var streamChunk = function* (chunk, chunkSize) {
29349
29220
  let len = chunk.byteLength;
29350
- if (!chunkSize || len < chunkSize) {
29221
+ if (len < chunkSize) {
29351
29222
  yield chunk;
29352
29223
  return;
29353
29224
  }
@@ -29372,7 +29243,10 @@ var require_axios = __commonJS({
29372
29243
  const reader = stream2.getReader();
29373
29244
  try {
29374
29245
  for (; ; ) {
29375
- const { done, value } = await reader.read();
29246
+ const {
29247
+ done,
29248
+ value
29249
+ } = await reader.read();
29376
29250
  if (done) {
29377
29251
  break;
29378
29252
  }
@@ -29392,44 +29266,52 @@ var require_axios = __commonJS({
29392
29266
  onFinish && onFinish(e);
29393
29267
  }
29394
29268
  };
29395
- return new ReadableStream(
29396
- {
29397
- async pull(controller) {
29398
- try {
29399
- const { done: done2, value } = await iterator2.next();
29400
- if (done2) {
29401
- _onFinish();
29402
- controller.close();
29403
- return;
29404
- }
29405
- let len = value.byteLength;
29406
- if (onProgress) {
29407
- let loadedBytes = bytes += len;
29408
- onProgress(loadedBytes);
29409
- }
29410
- controller.enqueue(new Uint8Array(value));
29411
- } catch (err) {
29412
- _onFinish(err);
29413
- throw err;
29269
+ return new ReadableStream({
29270
+ async pull(controller) {
29271
+ try {
29272
+ const {
29273
+ done: done2,
29274
+ value
29275
+ } = await iterator2.next();
29276
+ if (done2) {
29277
+ _onFinish();
29278
+ controller.close();
29279
+ return;
29414
29280
  }
29415
- },
29416
- cancel(reason) {
29417
- _onFinish(reason);
29418
- return iterator2.return();
29281
+ let len = value.byteLength;
29282
+ if (onProgress) {
29283
+ let loadedBytes = bytes += len;
29284
+ onProgress(loadedBytes);
29285
+ }
29286
+ controller.enqueue(new Uint8Array(value));
29287
+ } catch (err) {
29288
+ _onFinish(err);
29289
+ throw err;
29419
29290
  }
29420
29291
  },
29421
- {
29422
- highWaterMark: 2
29292
+ cancel(reason) {
29293
+ _onFinish(reason);
29294
+ return iterator2.return();
29423
29295
  }
29424
- );
29296
+ }, {
29297
+ highWaterMark: 2
29298
+ });
29425
29299
  };
29426
29300
  var DEFAULT_CHUNK_SIZE = 64 * 1024;
29427
- var { isFunction } = utils$1;
29428
- var globalFetchAPI = (({ Request, Response }) => ({
29301
+ var {
29302
+ isFunction
29303
+ } = utils$1;
29304
+ var globalFetchAPI = (({
29305
+ Request,
29306
+ Response
29307
+ }) => ({
29429
29308
  Request,
29430
29309
  Response
29431
29310
  }))(utils$1.global);
29432
- var { ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$1 } = utils$1.global;
29311
+ var {
29312
+ ReadableStream: ReadableStream$1,
29313
+ TextEncoder: TextEncoder$1
29314
+ } = utils$1.global;
29433
29315
  var test = (fn, ...args) => {
29434
29316
  try {
29435
29317
  return !!fn(...args);
@@ -29438,14 +29320,14 @@ var require_axios = __commonJS({
29438
29320
  }
29439
29321
  };
29440
29322
  var factory = (env) => {
29441
- env = utils$1.merge.call(
29442
- {
29443
- skipUndefined: true
29444
- },
29445
- globalFetchAPI,
29446
- env
29447
- );
29448
- const { fetch: envFetch, Request, Response } = env;
29323
+ env = utils$1.merge.call({
29324
+ skipUndefined: true
29325
+ }, globalFetchAPI, env);
29326
+ const {
29327
+ fetch: envFetch,
29328
+ Request,
29329
+ Response
29330
+ } = env;
29449
29331
  const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === "function";
29450
29332
  const isRequestSupported = isFunction(Request);
29451
29333
  const isResponseSupported = isFunction(Response);
@@ -29456,14 +29338,16 @@ var require_axios = __commonJS({
29456
29338
  const encodeText = isFetchSupported && (typeof TextEncoder$1 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder$1()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
29457
29339
  const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
29458
29340
  let duplexAccessed = false;
29341
+ const body = new ReadableStream$1();
29459
29342
  const hasContentType = new Request(platform.origin, {
29460
- body: new ReadableStream$1(),
29343
+ body,
29461
29344
  method: "POST",
29462
29345
  get duplex() {
29463
29346
  duplexAccessed = true;
29464
29347
  return "half";
29465
29348
  }
29466
29349
  }).headers.has("Content-Type");
29350
+ body.cancel();
29467
29351
  return duplexAccessed && !hasContentType;
29468
29352
  });
29469
29353
  const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
@@ -29477,11 +29361,7 @@ var require_axios = __commonJS({
29477
29361
  if (method) {
29478
29362
  return method.call(res);
29479
29363
  }
29480
- throw new AxiosError$1(
29481
- `Response type '${type}' is not supported`,
29482
- AxiosError$1.ERR_NOT_SUPPORT,
29483
- config
29484
- );
29364
+ throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
29485
29365
  });
29486
29366
  });
29487
29367
  })();
@@ -29530,10 +29410,7 @@ var require_axios = __commonJS({
29530
29410
  } = resolveConfig(config);
29531
29411
  let _fetch = envFetch || fetch;
29532
29412
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
29533
- let composedSignal = composeSignals$1(
29534
- [signal, cancelToken && cancelToken.toAbortSignal()],
29535
- timeout
29536
- );
29413
+ let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
29537
29414
  let request = null;
29538
29415
  const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
29539
29416
  composedSignal.unsubscribe();
@@ -29551,10 +29428,7 @@ var require_axios = __commonJS({
29551
29428
  headers.setContentType(contentTypeHeader);
29552
29429
  }
29553
29430
  if (_request.body) {
29554
- const [onProgress, flush] = progressEventDecorator(
29555
- requestContentLength,
29556
- progressEventReducer(asyncDecorator(onUploadProgress))
29557
- );
29431
+ const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
29558
29432
  data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
29559
29433
  }
29560
29434
  }
@@ -29580,28 +29454,19 @@ var require_axios = __commonJS({
29580
29454
  options[prop] = response[prop];
29581
29455
  });
29582
29456
  const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
29583
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
29584
- responseContentLength,
29585
- progressEventReducer(asyncDecorator(onDownloadProgress), true)
29586
- ) || [];
29587
- response = new Response(
29588
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
29589
- flush && flush();
29590
- unsubscribe && unsubscribe();
29591
- }),
29592
- options
29593
- );
29457
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
29458
+ response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
29459
+ flush && flush();
29460
+ unsubscribe && unsubscribe();
29461
+ }), options);
29594
29462
  }
29595
29463
  responseType = responseType || "text";
29596
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](
29597
- response,
29598
- config
29599
- );
29464
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
29600
29465
  !isStreamResponse && unsubscribe && unsubscribe();
29601
29466
  return await new Promise((resolve, reject) => {
29602
29467
  settle(resolve, reject, {
29603
29468
  data: responseData,
29604
- headers: AxiosHeaders$1.from(response.headers),
29469
+ headers: AxiosHeaders.from(response.headers),
29605
29470
  status: response.status,
29606
29471
  statusText: response.statusText,
29607
29472
  config,
@@ -29611,27 +29476,22 @@ var require_axios = __commonJS({
29611
29476
  } catch (err) {
29612
29477
  unsubscribe && unsubscribe();
29613
29478
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
29614
- throw Object.assign(
29615
- new AxiosError$1(
29616
- "Network Error",
29617
- AxiosError$1.ERR_NETWORK,
29618
- config,
29619
- request,
29620
- err && err.response
29621
- ),
29622
- {
29623
- cause: err.cause || err
29624
- }
29625
- );
29479
+ throw Object.assign(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response), {
29480
+ cause: err.cause || err
29481
+ });
29626
29482
  }
29627
- throw AxiosError$1.from(err, err && err.code, config, request, err && err.response);
29483
+ throw AxiosError.from(err, err && err.code, config, request, err && err.response);
29628
29484
  }
29629
29485
  };
29630
29486
  };
29631
29487
  var seedCache = /* @__PURE__ */ new Map();
29632
29488
  var getFetch = (config) => {
29633
29489
  let env = config && config.env || {};
29634
- const { fetch: fetch2, Request, Response } = env;
29490
+ const {
29491
+ fetch: fetch2,
29492
+ Request,
29493
+ Response
29494
+ } = env;
29635
29495
  const seeds = [Request, Response, fetch2];
29636
29496
  let len = seeds.length, i = len, seed, target, map = seedCache;
29637
29497
  while (i--) {
@@ -29653,17 +29513,23 @@ var require_axios = __commonJS({
29653
29513
  utils$1.forEach(knownAdapters, (fn, value) => {
29654
29514
  if (fn) {
29655
29515
  try {
29656
- Object.defineProperty(fn, "name", { value });
29516
+ Object.defineProperty(fn, "name", {
29517
+ value
29518
+ });
29657
29519
  } catch (e) {
29658
29520
  }
29659
- Object.defineProperty(fn, "adapterName", { value });
29521
+ Object.defineProperty(fn, "adapterName", {
29522
+ value
29523
+ });
29660
29524
  }
29661
29525
  });
29662
29526
  var renderReason = (reason) => `- ${reason}`;
29663
29527
  var isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
29664
29528
  function getAdapter(adapters2, config) {
29665
29529
  adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
29666
- const { length } = adapters2;
29530
+ const {
29531
+ length
29532
+ } = adapters2;
29667
29533
  let nameOrAdapter;
29668
29534
  let adapter;
29669
29535
  const rejectedReasons = {};
@@ -29674,7 +29540,7 @@ var require_axios = __commonJS({
29674
29540
  if (!isResolvedHandle(nameOrAdapter)) {
29675
29541
  adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
29676
29542
  if (adapter === void 0) {
29677
- throw new AxiosError$1(`Unknown adapter '${id}'`);
29543
+ throw new AxiosError(`Unknown adapter '${id}'`);
29678
29544
  }
29679
29545
  }
29680
29546
  if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
@@ -29683,14 +29549,9 @@ var require_axios = __commonJS({
29683
29549
  rejectedReasons[id || "#" + i] = adapter;
29684
29550
  }
29685
29551
  if (!adapter) {
29686
- const reasons = Object.entries(rejectedReasons).map(
29687
- ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
29688
- );
29552
+ const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
29689
29553
  let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
29690
- throw new AxiosError$1(
29691
- `There is no suitable adapter to dispatch the request ` + s,
29692
- "ERR_NOT_SUPPORT"
29693
- );
29554
+ throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, "ERR_NOT_SUPPORT");
29694
29555
  }
29695
29556
  return adapter;
29696
29557
  }
@@ -29711,39 +29572,32 @@ var require_axios = __commonJS({
29711
29572
  config.cancelToken.throwIfRequested();
29712
29573
  }
29713
29574
  if (config.signal && config.signal.aborted) {
29714
- throw new CanceledError$1(null, config);
29575
+ throw new CanceledError(null, config);
29715
29576
  }
29716
29577
  }
29717
29578
  function dispatchRequest(config) {
29718
29579
  throwIfCancellationRequested(config);
29719
- config.headers = AxiosHeaders$1.from(config.headers);
29580
+ config.headers = AxiosHeaders.from(config.headers);
29720
29581
  config.data = transformData.call(config, config.transformRequest);
29721
29582
  if (["post", "put", "patch"].indexOf(config.method) !== -1) {
29722
29583
  config.headers.setContentType("application/x-www-form-urlencoded", false);
29723
29584
  }
29724
- const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
29725
- return adapter(config).then(
29726
- function onAdapterResolution(response) {
29585
+ const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
29586
+ return adapter(config).then(function onAdapterResolution(response) {
29587
+ throwIfCancellationRequested(config);
29588
+ response.data = transformData.call(config, config.transformResponse, response);
29589
+ response.headers = AxiosHeaders.from(response.headers);
29590
+ return response;
29591
+ }, function onAdapterRejection(reason) {
29592
+ if (!isCancel(reason)) {
29727
29593
  throwIfCancellationRequested(config);
29728
- response.data = transformData.call(config, config.transformResponse, response);
29729
- response.headers = AxiosHeaders$1.from(response.headers);
29730
- return response;
29731
- },
29732
- function onAdapterRejection(reason) {
29733
- if (!isCancel(reason)) {
29734
- throwIfCancellationRequested(config);
29735
- if (reason && reason.response) {
29736
- reason.response.data = transformData.call(
29737
- config,
29738
- config.transformResponse,
29739
- reason.response
29740
- );
29741
- reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
29742
- }
29594
+ if (reason && reason.response) {
29595
+ reason.response.data = transformData.call(config, config.transformResponse, reason.response);
29596
+ reason.response.headers = AxiosHeaders.from(reason.response.headers);
29743
29597
  }
29744
- return Promise.reject(reason);
29745
29598
  }
29746
- );
29599
+ return Promise.reject(reason);
29600
+ });
29747
29601
  }
29748
29602
  var validators$1 = {};
29749
29603
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
@@ -29758,19 +29612,11 @@ var require_axios = __commonJS({
29758
29612
  }
29759
29613
  return (value, opt, opts) => {
29760
29614
  if (validator2 === false) {
29761
- throw new AxiosError$1(
29762
- formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")),
29763
- AxiosError$1.ERR_DEPRECATED
29764
- );
29615
+ throw new AxiosError(formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")), AxiosError.ERR_DEPRECATED);
29765
29616
  }
29766
29617
  if (version2 && !deprecatedWarnings[opt]) {
29767
29618
  deprecatedWarnings[opt] = true;
29768
- console.warn(
29769
- formatMessage(
29770
- opt,
29771
- " has been deprecated since v" + version2 + " and will be removed in the near future"
29772
- )
29773
- );
29619
+ console.warn(formatMessage(opt, " has been deprecated since v" + version2 + " and will be removed in the near future"));
29774
29620
  }
29775
29621
  return validator2 ? validator2(value, opt, opts) : true;
29776
29622
  };
@@ -29783,7 +29629,7 @@ var require_axios = __commonJS({
29783
29629
  };
29784
29630
  function assertOptions(options, schema, allowUnknown) {
29785
29631
  if (typeof options !== "object") {
29786
- throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
29632
+ throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
29787
29633
  }
29788
29634
  const keys = Object.keys(options);
29789
29635
  let i = keys.length;
@@ -29794,15 +29640,12 @@ var require_axios = __commonJS({
29794
29640
  const value = options[opt];
29795
29641
  const result = value === void 0 || validator2(value, opt, options);
29796
29642
  if (result !== true) {
29797
- throw new AxiosError$1(
29798
- "option " + opt + " must be " + result,
29799
- AxiosError$1.ERR_BAD_OPTION_VALUE
29800
- );
29643
+ throw new AxiosError("option " + opt + " must be " + result, AxiosError.ERR_BAD_OPTION_VALUE);
29801
29644
  }
29802
29645
  continue;
29803
29646
  }
29804
29647
  if (allowUnknown !== true) {
29805
- throw new AxiosError$1("Unknown option " + opt, AxiosError$1.ERR_BAD_OPTION);
29648
+ throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION);
29806
29649
  }
29807
29650
  }
29808
29651
  }
@@ -29815,8 +29658,8 @@ var require_axios = __commonJS({
29815
29658
  constructor(instanceConfig) {
29816
29659
  this.defaults = instanceConfig || {};
29817
29660
  this.interceptors = {
29818
- request: new InterceptorManager$1(),
29819
- response: new InterceptorManager$1()
29661
+ request: new InterceptorManager(),
29662
+ response: new InterceptorManager()
29820
29663
  };
29821
29664
  }
29822
29665
  /**
@@ -29855,18 +29698,18 @@ var require_axios = __commonJS({
29855
29698
  config = configOrUrl || {};
29856
29699
  }
29857
29700
  config = mergeConfig(this.defaults, config);
29858
- const { transitional, paramsSerializer, headers } = config;
29701
+ const {
29702
+ transitional,
29703
+ paramsSerializer,
29704
+ headers
29705
+ } = config;
29859
29706
  if (transitional !== void 0) {
29860
- validator.assertOptions(
29861
- transitional,
29862
- {
29863
- silentJSONParsing: validators.transitional(validators.boolean),
29864
- forcedJSONParsing: validators.transitional(validators.boolean),
29865
- clarifyTimeoutError: validators.transitional(validators.boolean),
29866
- legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
29867
- },
29868
- false
29869
- );
29707
+ validator.assertOptions(transitional, {
29708
+ silentJSONParsing: validators.transitional(validators.boolean),
29709
+ forcedJSONParsing: validators.transitional(validators.boolean),
29710
+ clarifyTimeoutError: validators.transitional(validators.boolean),
29711
+ legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
29712
+ }, false);
29870
29713
  }
29871
29714
  if (paramsSerializer != null) {
29872
29715
  if (utils$1.isFunction(paramsSerializer)) {
@@ -29874,14 +29717,10 @@ var require_axios = __commonJS({
29874
29717
  serialize: paramsSerializer
29875
29718
  };
29876
29719
  } else {
29877
- validator.assertOptions(
29878
- paramsSerializer,
29879
- {
29880
- encode: validators.function,
29881
- serialize: validators.function
29882
- },
29883
- true
29884
- );
29720
+ validator.assertOptions(paramsSerializer, {
29721
+ encode: validators.function,
29722
+ serialize: validators.function
29723
+ }, true);
29885
29724
  }
29886
29725
  }
29887
29726
  if (config.allowAbsoluteUrls !== void 0) ;
@@ -29890,20 +29729,16 @@ var require_axios = __commonJS({
29890
29729
  } else {
29891
29730
  config.allowAbsoluteUrls = true;
29892
29731
  }
29893
- validator.assertOptions(
29894
- config,
29895
- {
29896
- baseUrl: validators.spelling("baseURL"),
29897
- withXsrfToken: validators.spelling("withXSRFToken")
29898
- },
29899
- true
29900
- );
29732
+ validator.assertOptions(config, {
29733
+ baseUrl: validators.spelling("baseURL"),
29734
+ withXsrfToken: validators.spelling("withXSRFToken")
29735
+ }, true);
29901
29736
  config.method = (config.method || this.defaults.method || "get").toLowerCase();
29902
29737
  let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
29903
29738
  headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
29904
29739
  delete headers[method];
29905
29740
  });
29906
- config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
29741
+ config.headers = AxiosHeaders.concat(contextHeaders, headers);
29907
29742
  const requestInterceptorChain = [];
29908
29743
  let synchronousRequestInterceptors = true;
29909
29744
  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
@@ -29969,34 +29804,29 @@ var require_axios = __commonJS({
29969
29804
  };
29970
29805
  utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
29971
29806
  Axios.prototype[method] = function(url2, config) {
29972
- return this.request(
29973
- mergeConfig(config || {}, {
29974
- method,
29975
- url: url2,
29976
- data: (config || {}).data
29977
- })
29978
- );
29807
+ return this.request(mergeConfig(config || {}, {
29808
+ method,
29809
+ url: url2,
29810
+ data: (config || {}).data
29811
+ }));
29979
29812
  };
29980
29813
  });
29981
29814
  utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
29982
29815
  function generateHTTPMethod(isForm) {
29983
29816
  return function httpMethod(url2, data, config) {
29984
- return this.request(
29985
- mergeConfig(config || {}, {
29986
- method,
29987
- headers: isForm ? {
29988
- "Content-Type": "multipart/form-data"
29989
- } : {},
29990
- url: url2,
29991
- data
29992
- })
29993
- );
29817
+ return this.request(mergeConfig(config || {}, {
29818
+ method,
29819
+ headers: isForm ? {
29820
+ "Content-Type": "multipart/form-data"
29821
+ } : {},
29822
+ url: url2,
29823
+ data
29824
+ }));
29994
29825
  };
29995
29826
  }
29996
29827
  Axios.prototype[method] = generateHTTPMethod();
29997
29828
  Axios.prototype[method + "Form"] = generateHTTPMethod(true);
29998
29829
  });
29999
- var Axios$1 = Axios;
30000
29830
  var CancelToken = class _CancelToken {
30001
29831
  constructor(executor) {
30002
29832
  if (typeof executor !== "function") {
@@ -30030,7 +29860,7 @@ var require_axios = __commonJS({
30030
29860
  if (token2.reason) {
30031
29861
  return;
30032
29862
  }
30033
- token2.reason = new CanceledError$1(message, config, request);
29863
+ token2.reason = new CanceledError(message, config, request);
30034
29864
  resolvePromise(token2.reason);
30035
29865
  });
30036
29866
  }
@@ -30092,7 +29922,6 @@ var require_axios = __commonJS({
30092
29922
  };
30093
29923
  }
30094
29924
  };
30095
- var CancelToken$1 = CancelToken;
30096
29925
  function spread(callback) {
30097
29926
  return function wrap(arr) {
30098
29927
  return callback.apply(null, arr);
@@ -30175,25 +30004,28 @@ var require_axios = __commonJS({
30175
30004
  Object.entries(HttpStatusCode).forEach(([key, value]) => {
30176
30005
  HttpStatusCode[value] = key;
30177
30006
  });
30178
- var HttpStatusCode$1 = HttpStatusCode;
30179
30007
  function createInstance(defaultConfig) {
30180
- const context = new Axios$1(defaultConfig);
30181
- const instance = bind(Axios$1.prototype.request, context);
30182
- utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
30183
- utils$1.extend(instance, context, null, { allOwnKeys: true });
30008
+ const context = new Axios(defaultConfig);
30009
+ const instance = bind(Axios.prototype.request, context);
30010
+ utils$1.extend(instance, Axios.prototype, context, {
30011
+ allOwnKeys: true
30012
+ });
30013
+ utils$1.extend(instance, context, null, {
30014
+ allOwnKeys: true
30015
+ });
30184
30016
  instance.create = function create(instanceConfig) {
30185
30017
  return createInstance(mergeConfig(defaultConfig, instanceConfig));
30186
30018
  };
30187
30019
  return instance;
30188
30020
  }
30189
- var axios = createInstance(defaults$1);
30190
- axios.Axios = Axios$1;
30191
- axios.CanceledError = CanceledError$1;
30192
- axios.CancelToken = CancelToken$1;
30021
+ var axios = createInstance(defaults);
30022
+ axios.Axios = Axios;
30023
+ axios.CanceledError = CanceledError;
30024
+ axios.CancelToken = CancelToken;
30193
30025
  axios.isCancel = isCancel;
30194
30026
  axios.VERSION = VERSION2;
30195
30027
  axios.toFormData = toFormData;
30196
- axios.AxiosError = AxiosError$1;
30028
+ axios.AxiosError = AxiosError;
30197
30029
  axios.Cancel = axios.CanceledError;
30198
30030
  axios.all = function all(promises) {
30199
30031
  return Promise.all(promises);
@@ -30201,10 +30033,10 @@ var require_axios = __commonJS({
30201
30033
  axios.spread = spread;
30202
30034
  axios.isAxiosError = isAxiosError;
30203
30035
  axios.mergeConfig = mergeConfig;
30204
- axios.AxiosHeaders = AxiosHeaders$1;
30036
+ axios.AxiosHeaders = AxiosHeaders;
30205
30037
  axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
30206
30038
  axios.getAdapter = adapters.getAdapter;
30207
- axios.HttpStatusCode = HttpStatusCode$1;
30039
+ axios.HttpStatusCode = HttpStatusCode;
30208
30040
  axios.default = axios;
30209
30041
  module2.exports = axios;
30210
30042
  }
@@ -30269,27 +30101,7 @@ var require_dist = __commonJS({
30269
30101
 
30270
30102
  // src/sap-ai-error.ts
30271
30103
  function convertSAPErrorToAPICallError(errorResponse, context) {
30272
- const error = errorResponse.error;
30273
- let message;
30274
- let code;
30275
- let location;
30276
- let requestId;
30277
- if (Array.isArray(error)) {
30278
- const firstError = error[0];
30279
- if (firstError) {
30280
- message = firstError.message;
30281
- code = firstError.code;
30282
- location = firstError.location;
30283
- requestId = firstError.request_id;
30284
- } else {
30285
- message = "Unknown SAP AI error";
30286
- }
30287
- } else {
30288
- message = error.message;
30289
- code = error.code;
30290
- location = error.location;
30291
- requestId = error.request_id;
30292
- }
30104
+ const { code, location, message, requestId } = extractErrorFields(errorResponse);
30293
30105
  const statusCode = getStatusCodeFromSAPError(code);
30294
30106
  const responseBody = JSON.stringify({
30295
30107
  error: {
@@ -30350,22 +30162,14 @@ function convertToAISDKError(error, context) {
30350
30162
  if (error instanceof import_provider2.APICallError || error instanceof import_provider2.LoadAPIKeyError || error instanceof import_provider2.NoSuchModelError) {
30351
30163
  return error;
30352
30164
  }
30353
- const rootError = error instanceof Error && (0, import_util.isErrorWithCause)(error) ? error.rootCause : error;
30354
- if (isOrchestrationErrorResponse(rootError)) {
30355
- return convertSAPErrorToAPICallError(rootError, {
30165
+ const rootError = getRootError(error);
30166
+ const errorResponse = findOrchestrationErrorResponse(error);
30167
+ if (errorResponse) {
30168
+ return convertSAPErrorToAPICallError(errorResponse, {
30356
30169
  ...context,
30357
30170
  responseHeaders: context?.responseHeaders ?? getAxiosResponseHeaders(error)
30358
30171
  });
30359
30172
  }
30360
- if (rootError instanceof Error) {
30361
- const parsedError = tryExtractSAPErrorFromMessage(rootError.message);
30362
- if (parsedError && isOrchestrationErrorResponse(parsedError)) {
30363
- return convertSAPErrorToAPICallError(parsedError, {
30364
- ...context,
30365
- responseHeaders: context?.responseHeaders ?? getAxiosResponseHeaders(error)
30366
- });
30367
- }
30368
- }
30369
30173
  if (isAbortError(rootError)) {
30370
30174
  return createAPICallError(
30371
30175
  error,
@@ -30439,6 +30243,10 @@ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-depl
30439
30243
  context
30440
30244
  );
30441
30245
  }
30246
+ function isPrefillError(error) {
30247
+ const message = extractSAPErrorMessage(error)?.toLowerCase();
30248
+ return message !== void 0 && PREFILL_ERROR_KEYWORDS.some((kw) => message.includes(kw));
30249
+ }
30442
30250
  function normalizeHeaders(headers) {
30443
30251
  if (!headers || typeof headers !== "object") return void 0;
30444
30252
  const record = headers;
@@ -30475,6 +30283,25 @@ ${responseBody}` : options.message;
30475
30283
  url: context?.url ?? ""
30476
30284
  });
30477
30285
  }
30286
+ function extractErrorFields(response) {
30287
+ const innerError = response.error;
30288
+ if (Array.isArray(innerError)) {
30289
+ const first2 = innerError[0];
30290
+ return {
30291
+ code: first2?.code,
30292
+ location: first2?.location,
30293
+ message: first2?.message ?? "Unknown SAP AI error",
30294
+ requestId: first2?.request_id
30295
+ };
30296
+ }
30297
+ const entry = innerError;
30298
+ return {
30299
+ code: entry.code,
30300
+ location: entry.location,
30301
+ message: entry.message,
30302
+ requestId: entry.request_id
30303
+ };
30304
+ }
30478
30305
  function extractModelIdentifier(message, location) {
30479
30306
  const patterns = [
30480
30307
  /deployment[:\s]+([a-zA-Z0-9_-]+)/i,
@@ -30495,9 +30322,33 @@ function extractModelIdentifier(message, location) {
30495
30322
  }
30496
30323
  return void 0;
30497
30324
  }
30325
+ function extractSAPErrorMessage(error) {
30326
+ const errorResponse = findOrchestrationErrorResponse(error);
30327
+ if (errorResponse) {
30328
+ return extractErrorFields(errorResponse).message;
30329
+ }
30330
+ const rootError = getRootError(error);
30331
+ if (rootError instanceof Error) {
30332
+ return rootError.message;
30333
+ }
30334
+ return typeof rootError === "string" ? rootError : void 0;
30335
+ }
30336
+ function findOrchestrationErrorResponse(error) {
30337
+ const rootError = getRootError(error);
30338
+ if (isOrchestrationErrorResponse(rootError)) {
30339
+ return rootError;
30340
+ }
30341
+ if (rootError instanceof Error) {
30342
+ const parsed = tryExtractSAPErrorFromMessage(rootError.message);
30343
+ if (parsed && isOrchestrationErrorResponse(parsed)) {
30344
+ return parsed;
30345
+ }
30346
+ }
30347
+ return void 0;
30348
+ }
30498
30349
  function getAxiosError(error) {
30499
30350
  if (!(error instanceof Error)) return void 0;
30500
- const rootCause = (0, import_util.isErrorWithCause)(error) ? error.rootCause : error;
30351
+ const rootCause = getRootError(error);
30501
30352
  if (typeof rootCause !== "object" || rootCause === null) return void 0;
30502
30353
  const maybeAxios = rootCause;
30503
30354
  if (maybeAxios.isAxiosError !== true) return void 0;
@@ -30513,6 +30364,9 @@ function getAxiosResponseHeaders(error) {
30513
30364
  if (!axiosError) return void 0;
30514
30365
  return normalizeHeaders(axiosError.response?.headers);
30515
30366
  }
30367
+ function getRootError(error) {
30368
+ return error instanceof Error && (0, import_util.isErrorWithCause)(error) ? error.rootCause : error;
30369
+ }
30516
30370
  function getStatusCodeFromSAPError(code) {
30517
30371
  if (!code) return HTTP_STATUS.INTERNAL_ERROR;
30518
30372
  if (code >= 100 && code < 600) {
@@ -30599,7 +30453,7 @@ function tryExtractSAPErrorFromMessage(message) {
30599
30453
  return null;
30600
30454
  }
30601
30455
  }
30602
- var import_provider2, import_util, HTTP_STATUS, ERROR_MATCHERS, AUTHENTICATION_ERROR_KEYWORDS, DEPLOYMENT_ERROR_KEYWORDS, ApiSwitchError, UnsupportedFeatureError;
30456
+ var import_provider2, import_util, HTTP_STATUS, ERROR_MATCHERS, AUTHENTICATION_ERROR_KEYWORDS, DEPLOYMENT_ERROR_KEYWORDS, ApiSwitchError, UnsupportedFeatureError, PREFILL_ERROR_KEYWORDS;
30603
30457
  var init_sap_ai_error = __esm({
30604
30458
  "src/sap-ai-error.ts"() {
30605
30459
  "use strict";
@@ -30758,6 +30612,10 @@ The model's response was blocked by content safety filters. Try a different prom
30758
30612
  this.name = "UnsupportedFeatureError";
30759
30613
  }
30760
30614
  };
30615
+ PREFILL_ERROR_KEYWORDS = [
30616
+ "does not support assistant message prefill",
30617
+ "conversation must end with a user message"
30618
+ ];
30761
30619
  }
30762
30620
  });
30763
30621
 
@@ -31436,7 +31294,7 @@ var VERSION;
31436
31294
  var init_version = __esm({
31437
31295
  "src/version.ts"() {
31438
31296
  "use strict";
31439
- VERSION = true ? "4.6.2" : "0.0.0-test";
31297
+ VERSION = true ? "4.6.3" : "0.0.0-test";
31440
31298
  }
31441
31299
  });
31442
31300
 
@@ -31651,6 +31509,15 @@ var init_base_language_model_strategy = __esm({
31651
31509
  warnings: [...commonParts.warnings, ...warnings]
31652
31510
  });
31653
31511
  } catch (error) {
31512
+ if (this.shouldRetryWithoutPrefill(error, settings, options)) {
31513
+ const retryPrompt = this.stripTrailingAssistantMessages(options.prompt);
31514
+ if (retryPrompt.length > 0 && retryPrompt.at(-1)?.role === "user") {
31515
+ return this.doGenerate(config, settings, {
31516
+ ...options,
31517
+ prompt: retryPrompt
31518
+ });
31519
+ }
31520
+ }
31654
31521
  throw convertToAISDKError(error, {
31655
31522
  operation: "doGenerate",
31656
31523
  requestBody: createAISDKRequestBodySummary(options),
@@ -31700,6 +31567,15 @@ var init_base_language_model_strategy = __esm({
31700
31567
  stream: transformedStream
31701
31568
  };
31702
31569
  } catch (error) {
31570
+ if (this.shouldRetryWithoutPrefill(error, settings, options)) {
31571
+ const retryPrompt = this.stripTrailingAssistantMessages(options.prompt);
31572
+ if (retryPrompt.length > 0 && retryPrompt.at(-1)?.role === "user") {
31573
+ return this.doStream(config, settings, {
31574
+ ...options,
31575
+ prompt: retryPrompt
31576
+ });
31577
+ }
31578
+ }
31703
31579
  throw convertToAISDKError(error, {
31704
31580
  operation: "doStream",
31705
31581
  requestBody: createAISDKRequestBodySummary(options),
@@ -31775,6 +31651,32 @@ var init_base_language_model_strategy = __esm({
31775
31651
  getIncludeReasoning(sapOptions, settings) {
31776
31652
  return sapOptions?.includeReasoning ?? settings.includeReasoning ?? false;
31777
31653
  }
31654
+ /**
31655
+ * Checks whether a prefill error should trigger a retry without trailing assistant messages.
31656
+ * @param error - Caught error from API call.
31657
+ * @param settings - Model settings.
31658
+ * @param options - Call options containing the prompt.
31659
+ * @returns Whether the request should be retried without trailing assistant messages.
31660
+ * @internal
31661
+ */
31662
+ shouldRetryWithoutPrefill(error, settings, options) {
31663
+ const suppress = settings.suppressPrefillErrors ?? true;
31664
+ return suppress && isPrefillError(error) && options.prompt.length > 0 && options.prompt.at(-1)?.role === "assistant";
31665
+ }
31666
+ /**
31667
+ * Strips all trailing assistant messages from a prompt for prefill retry.
31668
+ * Removes all (not just the last) to guarantee the retry cannot re-trigger.
31669
+ * @param prompt - Original prompt array.
31670
+ * @returns Prompt with trailing assistant messages removed.
31671
+ * @internal
31672
+ */
31673
+ stripTrailingAssistantMessages(prompt) {
31674
+ let end = prompt.length;
31675
+ while (end > 0 && prompt[end - 1]?.role === "assistant") {
31676
+ end--;
31677
+ }
31678
+ return prompt.slice(0, end);
31679
+ }
31778
31680
  };
31779
31681
  }
31780
31682
  });
@@ -33209,6 +33111,6 @@ mime-types/index.js:
33209
33111
  *)
33210
33112
 
33211
33113
  axios/dist/node/axios.cjs:
33212
- (*! Axios v1.13.6 Copyright (c) 2026 Matt Zabriskie and contributors *)
33114
+ (*! Axios v1.14.0 Copyright (c) 2026 Matt Zabriskie and contributors *)
33213
33115
  */
33214
33116
  //# sourceMappingURL=index-v2.cjs.map