@alpic-ai/sdk 0.0.0-dev.gbc485fa → 0.0.0-dev.gbc7d4f6

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 (56) hide show
  1. package/dist/api/auth-scope.js +1 -0
  2. package/dist/api/auth-scope.js.map +1 -1
  3. package/dist/auth/api-key.d.ts +1 -0
  4. package/dist/auth/api-key.js +23 -0
  5. package/dist/auth/api-key.js.map +1 -0
  6. package/dist/auth/index.d.ts +4 -0
  7. package/dist/auth/index.js +13 -1
  8. package/dist/auth/index.js.map +1 -1
  9. package/dist/auth/oauth-client.js +3 -2
  10. package/dist/auth/oauth-client.js.map +1 -1
  11. package/dist/auth/server/assets/authorize.html +1 -1
  12. package/dist/auth/store.js +1 -0
  13. package/dist/auth/store.js.map +1 -1
  14. package/dist/client.d.ts +6 -0
  15. package/dist/client.js +10 -0
  16. package/dist/client.js.map +1 -1
  17. package/dist/deploy/archive.d.ts +8 -0
  18. package/dist/deploy/archive.js +61 -0
  19. package/dist/deploy/archive.js.map +1 -0
  20. package/dist/deploy/deployments.d.ts +45 -0
  21. package/dist/deploy/deployments.js +90 -0
  22. package/dist/deploy/deployments.js.map +1 -0
  23. package/dist/deploy/poll.d.ts +2 -0
  24. package/dist/deploy/poll.js +10 -0
  25. package/dist/deploy/poll.js.map +1 -0
  26. package/dist/deploy/upload.d.ts +1 -0
  27. package/dist/deploy/upload.js +13 -0
  28. package/dist/deploy/upload.js.map +1 -0
  29. package/dist/index.d.ts +7 -1
  30. package/dist/index.js +2 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/lib/emitter.js +5 -6
  33. package/dist/lib/emitter.js.map +1 -1
  34. package/dist/lib/errors.d.ts +3 -0
  35. package/dist/lib/errors.js +7 -0
  36. package/dist/lib/errors.js.map +1 -0
  37. package/dist/project/config.d.ts +10 -0
  38. package/dist/project/config.js +31 -0
  39. package/dist/project/config.js.map +1 -0
  40. package/dist/project/detect-runtime.d.ts +2 -0
  41. package/dist/project/detect-runtime.js +43 -0
  42. package/dist/project/detect-runtime.js.map +1 -0
  43. package/dist/project/projects.d.ts +21 -0
  44. package/dist/project/projects.js +52 -0
  45. package/dist/project/projects.js.map +1 -0
  46. package/dist/project/python-runtime.d.ts +1 -0
  47. package/dist/project/python-runtime.js +71 -0
  48. package/dist/project/python-runtime.js.map +1 -0
  49. package/dist/tunnel/tunnel.js +9 -19
  50. package/dist/tunnel/tunnel.js.map +1 -1
  51. package/dist/vendor/pipenet.js +2372 -686
  52. package/dist/vendor/pipenet.js.map +4 -4
  53. package/dist/whoami.d.ts +15 -0
  54. package/dist/whoami.js +13 -0
  55. package/dist/whoami.js.map +1 -0
  56. package/package.json +15 -14
@@ -45,7 +45,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
45
45
  var require_delayed_stream = __commonJS({
46
46
  "../../node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js"(exports, module) {
47
47
  var Stream = __require("stream").Stream;
48
- var util3 = __require("util");
48
+ var util4 = __require("util");
49
49
  module.exports = DelayedStream;
50
50
  function DelayedStream() {
51
51
  this.source = null;
@@ -56,7 +56,7 @@ var require_delayed_stream = __commonJS({
56
56
  this._released = false;
57
57
  this._bufferedEvents = [];
58
58
  }
59
- util3.inherits(DelayedStream, Stream);
59
+ util4.inherits(DelayedStream, Stream);
60
60
  DelayedStream.create = function(source, options) {
61
61
  var delayedStream = new this();
62
62
  options = options || {};
@@ -135,7 +135,7 @@ var require_delayed_stream = __commonJS({
135
135
  // ../../node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js
136
136
  var require_combined_stream = __commonJS({
137
137
  "../../node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js"(exports, module) {
138
- var util3 = __require("util");
138
+ var util4 = __require("util");
139
139
  var Stream = __require("stream").Stream;
140
140
  var DelayedStream = require_delayed_stream();
141
141
  module.exports = CombinedStream;
@@ -151,7 +151,7 @@ var require_combined_stream = __commonJS({
151
151
  this._insideLoop = false;
152
152
  this._pendingNext = false;
153
153
  }
154
- util3.inherits(CombinedStream, Stream);
154
+ util4.inherits(CombinedStream, Stream);
155
155
  CombinedStream.create = function(options) {
156
156
  var combinedStream = new this();
157
157
  options = options || {};
@@ -9132,9 +9132,9 @@ var require_asynckit = __commonJS({
9132
9132
  }
9133
9133
  });
9134
9134
 
9135
- // ../../node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js
9135
+ // ../../node_modules/.pnpm/es-object-atoms@1.1.2/node_modules/es-object-atoms/index.js
9136
9136
  var require_es_object_atoms = __commonJS({
9137
- "../../node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js"(exports, module) {
9137
+ "../../node_modules/.pnpm/es-object-atoms@1.1.2/node_modules/es-object-atoms/index.js"(exports, module) {
9138
9138
  "use strict";
9139
9139
  module.exports = Object;
9140
9140
  }
@@ -9593,9 +9593,9 @@ var require_get_proto = __commonJS({
9593
9593
  }
9594
9594
  });
9595
9595
 
9596
- // ../../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js
9596
+ // ../../node_modules/.pnpm/hasown@2.0.4/node_modules/hasown/index.js
9597
9597
  var require_hasown = __commonJS({
9598
- "../../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports, module) {
9598
+ "../../node_modules/.pnpm/hasown@2.0.4/node_modules/hasown/index.js"(exports, module) {
9599
9599
  "use strict";
9600
9600
  var call = Function.prototype.call;
9601
9601
  var $hasOwn = Object.prototype.hasOwnProperty;
@@ -9978,9 +9978,9 @@ var require_es_set_tostringtag = __commonJS({
9978
9978
  }
9979
9979
  });
9980
9980
 
9981
- // ../../node_modules/.pnpm/form-data@4.0.5/node_modules/form-data/lib/populate.js
9981
+ // ../../node_modules/.pnpm/form-data@4.0.6/node_modules/form-data/lib/populate.js
9982
9982
  var require_populate = __commonJS({
9983
- "../../node_modules/.pnpm/form-data@4.0.5/node_modules/form-data/lib/populate.js"(exports, module) {
9983
+ "../../node_modules/.pnpm/form-data@4.0.6/node_modules/form-data/lib/populate.js"(exports, module) {
9984
9984
  "use strict";
9985
9985
  module.exports = function(dst, src) {
9986
9986
  Object.keys(src).forEach(function(prop) {
@@ -9991,12 +9991,12 @@ var require_populate = __commonJS({
9991
9991
  }
9992
9992
  });
9993
9993
 
9994
- // ../../node_modules/.pnpm/form-data@4.0.5/node_modules/form-data/lib/form_data.js
9994
+ // ../../node_modules/.pnpm/form-data@4.0.6/node_modules/form-data/lib/form_data.js
9995
9995
  var require_form_data = __commonJS({
9996
- "../../node_modules/.pnpm/form-data@4.0.5/node_modules/form-data/lib/form_data.js"(exports, module) {
9996
+ "../../node_modules/.pnpm/form-data@4.0.6/node_modules/form-data/lib/form_data.js"(exports, module) {
9997
9997
  "use strict";
9998
9998
  var CombinedStream = require_combined_stream();
9999
- var util3 = __require("util");
9999
+ var util4 = __require("util");
10000
10000
  var path = __require("path");
10001
10001
  var http3 = __require("http");
10002
10002
  var https2 = __require("https");
@@ -10009,6 +10009,9 @@ var require_form_data = __commonJS({
10009
10009
  var setToStringTag = require_es_set_tostringtag();
10010
10010
  var hasOwn = require_hasown();
10011
10011
  var populate = require_populate();
10012
+ function escapeHeaderParam(str) {
10013
+ return String(str).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22");
10014
+ }
10012
10015
  function FormData3(options) {
10013
10016
  if (!(this instanceof FormData3)) {
10014
10017
  return new FormData3(options);
@@ -10022,7 +10025,7 @@ var require_form_data = __commonJS({
10022
10025
  this[option] = options[option];
10023
10026
  }
10024
10027
  }
10025
- util3.inherits(FormData3, CombinedStream);
10028
+ util4.inherits(FormData3, CombinedStream);
10026
10029
  FormData3.LINE_BREAK = "\r\n";
10027
10030
  FormData3.DEFAULT_CONTENT_TYPE = "application/octet-stream";
10028
10031
  FormData3.prototype.append = function(field, value, options) {
@@ -10098,7 +10101,7 @@ var require_form_data = __commonJS({
10098
10101
  var contents = "";
10099
10102
  var headers = {
10100
10103
  // add custom disposition as third element or keep it two elements if not
10101
- "Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []),
10104
+ "Content-Disposition": ["form-data", 'name="' + escapeHeaderParam(field) + '"'].concat(contentDisposition || []),
10102
10105
  // if no content type. allow it to be empty array
10103
10106
  "Content-Type": [].concat(contentType || [])
10104
10107
  };
@@ -10132,7 +10135,7 @@ var require_form_data = __commonJS({
10132
10135
  filename = path.basename(value.client._httpMessage.path || "");
10133
10136
  }
10134
10137
  if (filename) {
10135
- return 'filename="' + filename + '"';
10138
+ return 'filename="' + escapeHeaderParam(filename) + '"';
10136
10139
  }
10137
10140
  };
10138
10141
  FormData3.prototype._getContentType = function(value, options) {
@@ -10426,9 +10429,9 @@ var require_ms = __commonJS({
10426
10429
  }
10427
10430
  });
10428
10431
 
10429
- // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
10432
+ // ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/common.js
10430
10433
  var require_common = __commonJS({
10431
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(exports, module) {
10434
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/common.js"(exports, module) {
10432
10435
  function setup(env) {
10433
10436
  createDebug.debug = createDebug;
10434
10437
  createDebug.default = createDebug;
@@ -10603,9 +10606,9 @@ var require_common = __commonJS({
10603
10606
  }
10604
10607
  });
10605
10608
 
10606
- // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js
10609
+ // ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/browser.js
10607
10610
  var require_browser = __commonJS({
10608
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(exports, module) {
10611
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/browser.js"(exports, module) {
10609
10612
  exports.formatArgs = formatArgs;
10610
10613
  exports.save = save;
10611
10614
  exports.load = load;
@@ -10900,18 +10903,18 @@ var require_supports_color = __commonJS({
10900
10903
  }
10901
10904
  });
10902
10905
 
10903
- // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
10906
+ // ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/node.js
10904
10907
  var require_node = __commonJS({
10905
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js"(exports, module) {
10908
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/node.js"(exports, module) {
10906
10909
  var tty = __require("tty");
10907
- var util3 = __require("util");
10910
+ var util4 = __require("util");
10908
10911
  exports.init = init;
10909
10912
  exports.log = log3;
10910
10913
  exports.formatArgs = formatArgs;
10911
10914
  exports.save = save;
10912
10915
  exports.load = load;
10913
10916
  exports.useColors = useColors;
10914
- exports.destroy = util3.deprecate(
10917
+ exports.destroy = util4.deprecate(
10915
10918
  () => {
10916
10919
  },
10917
10920
  "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
@@ -11042,7 +11045,7 @@ var require_node = __commonJS({
11042
11045
  return (/* @__PURE__ */ new Date()).toISOString() + " ";
11043
11046
  }
11044
11047
  function log3(...args) {
11045
- return process.stderr.write(util3.formatWithOptions(exports.inspectOpts, ...args) + "\n");
11048
+ return process.stderr.write(util4.formatWithOptions(exports.inspectOpts, ...args) + "\n");
11046
11049
  }
11047
11050
  function save(namespaces) {
11048
11051
  if (namespaces) {
@@ -11065,18 +11068,18 @@ var require_node = __commonJS({
11065
11068
  var { formatters } = module.exports;
11066
11069
  formatters.o = function(v) {
11067
11070
  this.inspectOpts.colors = this.useColors;
11068
- return util3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
11071
+ return util4.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
11069
11072
  };
11070
11073
  formatters.O = function(v) {
11071
11074
  this.inspectOpts.colors = this.useColors;
11072
- return util3.inspect(v, this.inspectOpts);
11075
+ return util4.inspect(v, this.inspectOpts);
11073
11076
  };
11074
11077
  }
11075
11078
  });
11076
11079
 
11077
- // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js
11080
+ // ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/index.js
11078
11081
  var require_src = __commonJS({
11079
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(exports, module) {
11082
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/index.js"(exports, module) {
11080
11083
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
11081
11084
  module.exports = require_browser();
11082
11085
  } else {
@@ -11085,9 +11088,9 @@ var require_src = __commonJS({
11085
11088
  }
11086
11089
  });
11087
11090
 
11088
- // ../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js
11091
+ // ../../node_modules/.pnpm/agent-base@6.0.2_supports-color@8.1.1/node_modules/agent-base/dist/src/promisify.js
11089
11092
  var require_promisify = __commonJS({
11090
- "../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js"(exports) {
11093
+ "../../node_modules/.pnpm/agent-base@6.0.2_supports-color@8.1.1/node_modules/agent-base/dist/src/promisify.js"(exports) {
11091
11094
  "use strict";
11092
11095
  Object.defineProperty(exports, "__esModule", { value: true });
11093
11096
  function promisify(fn) {
@@ -11107,9 +11110,9 @@ var require_promisify = __commonJS({
11107
11110
  }
11108
11111
  });
11109
11112
 
11110
- // ../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js
11113
+ // ../../node_modules/.pnpm/agent-base@6.0.2_supports-color@8.1.1/node_modules/agent-base/dist/src/index.js
11111
11114
  var require_src2 = __commonJS({
11112
- "../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js"(exports, module) {
11115
+ "../../node_modules/.pnpm/agent-base@6.0.2_supports-color@8.1.1/node_modules/agent-base/dist/src/index.js"(exports, module) {
11113
11116
  "use strict";
11114
11117
  var __importDefault = exports && exports.__importDefault || function(mod) {
11115
11118
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -11290,9 +11293,9 @@ var require_src2 = __commonJS({
11290
11293
  }
11291
11294
  });
11292
11295
 
11293
- // ../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js
11296
+ // ../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js
11294
11297
  var require_parse_proxy_response = __commonJS({
11295
- "../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) {
11298
+ "../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) {
11296
11299
  "use strict";
11297
11300
  var __importDefault = exports && exports.__importDefault || function(mod) {
11298
11301
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -11356,9 +11359,9 @@ var require_parse_proxy_response = __commonJS({
11356
11359
  }
11357
11360
  });
11358
11361
 
11359
- // ../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js
11362
+ // ../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/agent.js
11360
11363
  var require_agent = __commonJS({
11361
- "../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js"(exports) {
11364
+ "../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/agent.js"(exports) {
11362
11365
  "use strict";
11363
11366
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
11364
11367
  function adopt(value) {
@@ -11516,9 +11519,9 @@ var require_agent = __commonJS({
11516
11519
  }
11517
11520
  });
11518
11521
 
11519
- // ../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js
11522
+ // ../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/index.js
11520
11523
  var require_dist = __commonJS({
11521
- "../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js"(exports, module) {
11524
+ "../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/index.js"(exports, module) {
11522
11525
  "use strict";
11523
11526
  var __importDefault = exports && exports.__importDefault || function(mod) {
11524
11527
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -11535,9 +11538,9 @@ var require_dist = __commonJS({
11535
11538
  }
11536
11539
  });
11537
11540
 
11538
- // ../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3/node_modules/follow-redirects/debug.js
11541
+ // ../../node_modules/.pnpm/follow-redirects@1.16.2_debug@4.4.3_supports-color@8.1.1_/node_modules/follow-redirects/debug.js
11539
11542
  var require_debug = __commonJS({
11540
- "../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3/node_modules/follow-redirects/debug.js"(exports, module) {
11543
+ "../../node_modules/.pnpm/follow-redirects@1.16.2_debug@4.4.3_supports-color@8.1.1_/node_modules/follow-redirects/debug.js"(exports, module) {
11541
11544
  var debug3;
11542
11545
  module.exports = function() {
11543
11546
  if (!debug3) {
@@ -11555,9 +11558,9 @@ var require_debug = __commonJS({
11555
11558
  }
11556
11559
  });
11557
11560
 
11558
- // ../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3/node_modules/follow-redirects/index.js
11561
+ // ../../node_modules/.pnpm/follow-redirects@1.16.2_debug@4.4.3_supports-color@8.1.1_/node_modules/follow-redirects/index.js
11559
11562
  var require_follow_redirects = __commonJS({
11560
- "../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3/node_modules/follow-redirects/index.js"(exports, module) {
11563
+ "../../node_modules/.pnpm/follow-redirects@1.16.2_debug@4.4.3_supports-color@8.1.1_/node_modules/follow-redirects/index.js"(exports, module) {
11561
11564
  var url2 = __require("url");
11562
11565
  var URL2 = url2.URL;
11563
11566
  var http3 = __require("http");
@@ -11785,8 +11788,14 @@ var require_follow_redirects = __commonJS({
11785
11788
  RedirectableRequest.prototype._sanitizeOptions = function(options) {
11786
11789
  if (!options.headers) {
11787
11790
  options.headers = {};
11791
+ } else if (Array.isArray(options.headers)) {
11792
+ var headerList = options.headers;
11793
+ options.headers = {};
11794
+ for (var i = 0; i < headerList.length; i += 2) {
11795
+ options.headers[headerList[i]] = headerList[i + 1];
11796
+ }
11788
11797
  }
11789
- if (!isArray2(options.sensitiveHeaders)) {
11798
+ if (!Array.isArray(options.sensitiveHeaders)) {
11790
11799
  options.sensitiveHeaders = [];
11791
11800
  }
11792
11801
  if (options.host) {
@@ -12043,9 +12052,6 @@ var require_follow_redirects = __commonJS({
12043
12052
  var dot = subdomain.length - domain.length - 1;
12044
12053
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
12045
12054
  }
12046
- function isArray2(value) {
12047
- return value instanceof Array;
12048
- }
12049
12055
  function isString2(value) {
12050
12056
  return typeof value === "string" || value instanceof String;
12051
12057
  }
@@ -12059,24 +12065,101 @@ var require_follow_redirects = __commonJS({
12059
12065
  return URL2 && value instanceof URL2;
12060
12066
  }
12061
12067
  function escapeRegex(regex) {
12062
- return regex.replace(/[\]\\/()*+?.$]/g, "\\$&");
12068
+ return regex.replace(/[[\]\\/()*+?.^$|]/g, "\\$&");
12063
12069
  }
12064
12070
  module.exports = wrap({ http: http3, https: https2 });
12065
12071
  module.exports.wrap = wrap;
12066
12072
  }
12067
12073
  });
12068
12074
 
12069
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/bind.js
12075
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/bind.js
12070
12076
  function bind(fn, thisArg) {
12071
12077
  return function wrap() {
12072
12078
  return fn.apply(thisArg, arguments);
12073
12079
  };
12074
12080
  }
12075
12081
 
12076
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/utils.js
12082
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/utils.js
12077
12083
  var { toString } = Object.prototype;
12078
12084
  var { getPrototypeOf } = Object;
12079
12085
  var { iterator, toStringTag } = Symbol;
12086
+ var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
12087
+ var isUnsafeObjectKey = (prop) => typeof prop === "string" && (prop === "__proto__" || prop === "constructor" || prop === "prototype");
12088
+ var isPrototypeBoundary = (obj, prototype2, source) => obj === Object.prototype || !source && prototype2 === null;
12089
+ var isSafeAndFullyMutable = (obj) => {
12090
+ if (!Object.isExtensible(obj)) {
12091
+ return false;
12092
+ }
12093
+ const props = Object.getOwnPropertyNames(obj);
12094
+ if (Object.getOwnPropertySymbols) {
12095
+ props.push(...Object.getOwnPropertySymbols(obj));
12096
+ }
12097
+ return props.every((prop) => {
12098
+ if (isUnsafeObjectKey(prop)) {
12099
+ return false;
12100
+ }
12101
+ const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
12102
+ return !!descriptor && descriptor.configurable && descriptor.writable === true;
12103
+ });
12104
+ };
12105
+ var hasOwnInPrototypeChain = (thing, prop) => {
12106
+ let obj = thing;
12107
+ const seen = [];
12108
+ while (obj != null) {
12109
+ if (seen.indexOf(obj) !== -1) {
12110
+ return false;
12111
+ }
12112
+ seen.push(obj);
12113
+ const prototype2 = getPrototypeOf(obj);
12114
+ if (isPrototypeBoundary(obj, prototype2, obj === thing)) {
12115
+ return false;
12116
+ }
12117
+ if (hasOwnProperty(obj, prop)) {
12118
+ return true;
12119
+ }
12120
+ obj = prototype2;
12121
+ }
12122
+ return false;
12123
+ };
12124
+ var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
12125
+ var toSafeFlatObject = (thing) => {
12126
+ if (thing == null || typeof thing !== "object" && typeof thing !== "function") {
12127
+ return thing;
12128
+ }
12129
+ const sourcePrototype = getPrototypeOf(thing);
12130
+ if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {
12131
+ return thing;
12132
+ }
12133
+ const result = /* @__PURE__ */ Object.create(null);
12134
+ const merged = /* @__PURE__ */ Object.create(null);
12135
+ const seen = [];
12136
+ let current = thing;
12137
+ while (current != null) {
12138
+ if (seen.indexOf(current) !== -1) {
12139
+ break;
12140
+ }
12141
+ seen.push(current);
12142
+ const prototype2 = current === thing ? sourcePrototype : getPrototypeOf(current);
12143
+ if (isPrototypeBoundary(current, prototype2, current === thing)) {
12144
+ break;
12145
+ }
12146
+ const props = Object.getOwnPropertyNames(current);
12147
+ if (Object.getOwnPropertySymbols) {
12148
+ props.push(...Object.getOwnPropertySymbols(current));
12149
+ }
12150
+ for (const prop of props) {
12151
+ if (isUnsafeObjectKey(prop)) {
12152
+ continue;
12153
+ }
12154
+ if (!hasOwnProperty(merged, prop)) {
12155
+ result[prop] = thing[prop];
12156
+ merged[prop] = true;
12157
+ }
12158
+ }
12159
+ current = prototype2;
12160
+ }
12161
+ return result;
12162
+ };
12080
12163
  var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
12081
12164
  const str = toString.call(thing);
12082
12165
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -12107,11 +12190,20 @@ var isNumber = typeOfTest("number");
12107
12190
  var isObject = (thing) => thing !== null && typeof thing === "object";
12108
12191
  var isBoolean = (thing) => thing === true || thing === false;
12109
12192
  var isPlainObject = (val) => {
12110
- if (kindOf(val) !== "object") {
12193
+ if (!isObject(val)) {
12111
12194
  return false;
12112
12195
  }
12113
12196
  const prototype2 = getPrototypeOf(val);
12114
- return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
12197
+ return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat own Symbol.toStringTag or Symbol.iterator members as evidence the
12198
+ // value is tagged/iterable, ignoring members reachable only through shared
12199
+ // or terminal prototype boundaries. This is exactly what
12200
+ // hasOwnInPrototypeChain(val, prop) computes here: every prototype admitted
12201
+ // above (null, Object.prototype, or a terminal null-prototype template) is
12202
+ // a boundary, so the walk never inspects anything but `val`'s own members,
12203
+ // and stops before even those when `val` is itself the boundary
12204
+ // Object.prototype. Checking that inline avoids allocating the walker's
12205
+ // `seen` list twice per call on the mergeConfig / merge hot path.
12206
+ (isPrototypeBoundary(val, prototype2, true) || !hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator));
12115
12207
  };
12116
12208
  var isEmptyObject = (val) => {
12117
12209
  if (!isObject(val) || isBuffer(val)) {
@@ -12131,6 +12223,7 @@ var isReactNativeBlob = (value) => {
12131
12223
  var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
12132
12224
  var isBlob = kindOfTest("Blob");
12133
12225
  var isFileList = kindOfTest("FileList");
12226
+ var isSet = kindOfTest("Set");
12134
12227
  var isStream = (val) => isObject(val) && isFunction(val.pipe);
12135
12228
  function getGlobal() {
12136
12229
  if (typeof globalThis !== "undefined") return globalThis;
@@ -12211,11 +12304,21 @@ var isContextDefined = (context) => !isUndefined(context) && context !== _global
12211
12304
  function merge(...objs) {
12212
12305
  const { caseless, skipUndefined } = isContextDefined(this) && this || {};
12213
12306
  const result = {};
12307
+ const lowerCaseKeys = caseless ? /* @__PURE__ */ Object.create(null) : null;
12214
12308
  const assignValue = (val, key) => {
12215
12309
  if (key === "__proto__" || key === "constructor" || key === "prototype") {
12216
12310
  return;
12217
12311
  }
12218
- const targetKey = caseless && findKey(result, key) || key;
12312
+ let targetKey = key;
12313
+ if (lowerCaseKeys && typeof key === "string") {
12314
+ const lowerKey = key.toLowerCase();
12315
+ const knownKey = lowerCaseKeys[lowerKey];
12316
+ if (knownKey !== void 0 && hasOwnProperty(result, knownKey)) {
12317
+ targetKey = knownKey;
12318
+ } else {
12319
+ lowerCaseKeys[lowerKey] = key;
12320
+ }
12321
+ }
12219
12322
  const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
12220
12323
  if (isPlainObject(existing) && isPlainObject(val)) {
12221
12324
  result[targetKey] = merge(existing, val);
@@ -12228,7 +12331,21 @@ function merge(...objs) {
12228
12331
  }
12229
12332
  };
12230
12333
  for (let i = 0, l = objs.length; i < l; i++) {
12231
- objs[i] && forEach(objs[i], assignValue);
12334
+ const source = objs[i];
12335
+ if (!source || isBuffer(source)) {
12336
+ continue;
12337
+ }
12338
+ forEach(source, assignValue);
12339
+ if (typeof source !== "object" || isArray(source) || !Object.getOwnPropertySymbols) {
12340
+ continue;
12341
+ }
12342
+ const symbols = Object.getOwnPropertySymbols(source);
12343
+ for (let j = 0; j < symbols.length; j++) {
12344
+ const symbol = symbols[j];
12345
+ if (propertyIsEnumerable.call(source, symbol)) {
12346
+ assignValue(source[symbol], symbol);
12347
+ }
12348
+ }
12232
12349
  }
12233
12350
  return result;
12234
12351
  }
@@ -12315,7 +12432,24 @@ var toArray = (thing) => {
12315
12432
  if (!thing) return null;
12316
12433
  if (isArray(thing)) return thing;
12317
12434
  let i = thing.length;
12318
- if (!isNumber(i)) return null;
12435
+ if (!Number.isSafeInteger(i) || i < 0 || i > 4294967295) return null;
12436
+ const indexes = /* @__PURE__ */ new Set();
12437
+ const seen = /* @__PURE__ */ new Set();
12438
+ let source = thing;
12439
+ while (source != null && indexes.size < i) {
12440
+ if (seen.has(source)) return null;
12441
+ seen.add(source);
12442
+ const prototype2 = getPrototypeOf(source);
12443
+ if (isPrototypeBoundary(source, prototype2, source === thing)) break;
12444
+ Object.getOwnPropertyNames(source).forEach((key) => {
12445
+ const index = +key;
12446
+ if (Number.isInteger(index) && index >= 0 && index < i && String(index) === key && hasOwnProperty(source, key)) {
12447
+ indexes.add(index);
12448
+ }
12449
+ });
12450
+ source = prototype2;
12451
+ }
12452
+ if (indexes.size !== i) return null;
12319
12453
  const arr = new Array(i);
12320
12454
  while (i-- > 0) {
12321
12455
  arr[i] = thing[i];
@@ -12350,7 +12484,7 @@ var toCamelCase = (str) => {
12350
12484
  return p1.toUpperCase() + p2;
12351
12485
  });
12352
12486
  };
12353
- var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
12487
+ var { propertyIsEnumerable } = Object.prototype;
12354
12488
  var isRegExp = kindOfTest("RegExp");
12355
12489
  var reduceDescriptors = (obj, reducer) => {
12356
12490
  const descriptors = Object.getOwnPropertyDescriptors(obj);
@@ -12412,11 +12546,20 @@ var toJSONObject = (obj) => {
12412
12546
  }
12413
12547
  if (!("toJSON" in source)) {
12414
12548
  visited.add(source);
12415
- const target = isArray(source) ? [] : {};
12416
- forEach(source, (value, key) => {
12417
- const reducedValue = visit(value);
12418
- !isUndefined(reducedValue) && (target[key] = reducedValue);
12419
- });
12549
+ let target;
12550
+ if (isSet(source)) {
12551
+ target = [];
12552
+ for (const value of source) {
12553
+ const reducedValue = visit(value);
12554
+ !isUndefined(reducedValue) && target.push(reducedValue);
12555
+ }
12556
+ } else {
12557
+ target = isArray(source) ? [] : {};
12558
+ forEach(source, (value, key) => {
12559
+ const reducedValue = visit(value);
12560
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
12561
+ });
12562
+ }
12420
12563
  visited.delete(source);
12421
12564
  return target;
12422
12565
  }
@@ -12449,6 +12592,7 @@ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
12449
12592
  })(typeof setImmediate === "function", isFunction(_global.postMessage));
12450
12593
  var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
12451
12594
  var isIterable = (thing) => thing != null && isFunction(thing[iterator]);
12595
+ var isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
12452
12596
  var utils_default = {
12453
12597
  isArray,
12454
12598
  isArrayBuffer,
@@ -12494,6 +12638,9 @@ var utils_default = {
12494
12638
  hasOwnProperty,
12495
12639
  hasOwnProp: hasOwnProperty,
12496
12640
  // an alias to avoid ESLint no-prototype-builtins detection
12641
+ hasOwnInPrototypeChain,
12642
+ getSafeProp,
12643
+ toSafeFlatObject,
12497
12644
  reduceDescriptors,
12498
12645
  freezeMethods,
12499
12646
  toObjectSet,
@@ -12509,10 +12656,11 @@ var utils_default = {
12509
12656
  isThenable,
12510
12657
  setImmediate: _setImmediate,
12511
12658
  asap,
12512
- isIterable
12659
+ isIterable,
12660
+ isSafeIterable
12513
12661
  };
12514
12662
 
12515
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/parseHeaders.js
12663
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/parseHeaders.js
12516
12664
  var ignoreDuplicateOf = utils_default.toObjectSet([
12517
12665
  "age",
12518
12666
  "authorization",
@@ -12533,7 +12681,7 @@ var ignoreDuplicateOf = utils_default.toObjectSet([
12533
12681
  "user-agent"
12534
12682
  ]);
12535
12683
  var parseHeaders_default = (rawHeaders) => {
12536
- const parsed = {};
12684
+ const parsed = /* @__PURE__ */ Object.create(null);
12537
12685
  let key;
12538
12686
  let val;
12539
12687
  let i;
@@ -12541,23 +12689,24 @@ var parseHeaders_default = (rawHeaders) => {
12541
12689
  i = line.indexOf(":");
12542
12690
  key = line.substring(0, i).trim().toLowerCase();
12543
12691
  val = line.substring(i + 1).trim();
12544
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
12692
+ const hasKey = utils_default.hasOwnProp(parsed, key);
12693
+ if (!key || hasKey && utils_default.hasOwnProp(ignoreDuplicateOf, key)) {
12545
12694
  return;
12546
12695
  }
12547
12696
  if (key === "set-cookie") {
12548
- if (parsed[key]) {
12697
+ if (hasKey) {
12549
12698
  parsed[key].push(val);
12550
12699
  } else {
12551
12700
  parsed[key] = [val];
12552
12701
  }
12553
12702
  } else {
12554
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
12703
+ parsed[key] = hasKey ? parsed[key] + ", " + val : val;
12555
12704
  }
12556
12705
  });
12557
12706
  return parsed;
12558
12707
  };
12559
12708
 
12560
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/sanitizeHeaderValue.js
12709
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/sanitizeHeaderValue.js
12561
12710
  function trimSPorHTAB(str) {
12562
12711
  let start = 0;
12563
12712
  let end = str.length;
@@ -12595,7 +12744,7 @@ function toByteStringHeaderObject(headers) {
12595
12744
  return byteStringHeaders;
12596
12745
  }
12597
12746
 
12598
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/AxiosHeaders.js
12747
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/AxiosHeaders.js
12599
12748
  var $internals = /* @__PURE__ */ Symbol("internals");
12600
12749
  function normalizeHeader(header) {
12601
12750
  return header && String(header).trim().toLowerCase();
@@ -12615,10 +12764,96 @@ function parseTokens(str) {
12615
12764
  }
12616
12765
  return tokens;
12617
12766
  }
12767
+ var parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
12768
+ function trimOWS(value) {
12769
+ let start = 0;
12770
+ let end = value.length;
12771
+ while (start < end) {
12772
+ const code = value.charCodeAt(start);
12773
+ if (code !== 9 && code !== 32) {
12774
+ break;
12775
+ }
12776
+ start += 1;
12777
+ }
12778
+ while (end > start) {
12779
+ const code = value.charCodeAt(end - 1);
12780
+ if (code !== 9 && code !== 32) {
12781
+ break;
12782
+ }
12783
+ end -= 1;
12784
+ }
12785
+ return start === 0 && end === value.length ? value : value.slice(start, end);
12786
+ }
12787
+ function decodeQuotedString(value) {
12788
+ const last = value.length - 1;
12789
+ if (last < 1 || value.charCodeAt(0) !== 34 || value.charCodeAt(last) !== 34) {
12790
+ return value;
12791
+ }
12792
+ let decoded = "";
12793
+ for (let i = 1; i < last; i++) {
12794
+ const code = value.charCodeAt(i);
12795
+ if (code === 34) {
12796
+ return value;
12797
+ }
12798
+ if (code === 92) {
12799
+ i += 1;
12800
+ if (i >= last) {
12801
+ return value;
12802
+ }
12803
+ }
12804
+ decoded += value[i];
12805
+ }
12806
+ return decoded;
12807
+ }
12808
+ function parseParameters(value) {
12809
+ const parameters = /* @__PURE__ */ Object.create(null);
12810
+ const str = String(value);
12811
+ let start = 0;
12812
+ let quoted = false;
12813
+ let escaped = false;
12814
+ function parseParameter(end) {
12815
+ const part = trimOWS(str.slice(start, end));
12816
+ const equals = part.indexOf("=");
12817
+ if (equals < 1) {
12818
+ return;
12819
+ }
12820
+ const name = trimOWS(part.slice(0, equals));
12821
+ if (!parameterNameRE.test(name)) {
12822
+ return;
12823
+ }
12824
+ const normalizedName = name.toLowerCase();
12825
+ if (normalizedName === "__proto__" || normalizedName === "constructor" || normalizedName === "prototype") {
12826
+ return;
12827
+ }
12828
+ const parameterValue = trimOWS(part.slice(equals + 1));
12829
+ parameters[normalizedName] = decodeQuotedString(parameterValue);
12830
+ }
12831
+ for (let i = 0; i < str.length; i++) {
12832
+ const code = str.charCodeAt(i);
12833
+ if (quoted) {
12834
+ if (escaped) {
12835
+ escaped = false;
12836
+ } else if (code === 92) {
12837
+ escaped = true;
12838
+ } else if (code === 34) {
12839
+ quoted = false;
12840
+ }
12841
+ } else if (code === 34) {
12842
+ quoted = true;
12843
+ } else if (code === 44 || code === 59) {
12844
+ parseParameter(i);
12845
+ start = i + 1;
12846
+ }
12847
+ }
12848
+ parseParameter(str.length);
12849
+ return parameters;
12850
+ }
12618
12851
  var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
12852
+ var PROTO_HEADER_SLOT = "__Proto__";
12853
+ var headerSlot = (name) => name === "__proto__" ? PROTO_HEADER_SLOT : name;
12619
12854
  function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
12620
12855
  if (utils_default.isFunction(filter2)) {
12621
- return filter2.call(this, value, header);
12856
+ return filter2.call(context, value, header);
12622
12857
  }
12623
12858
  if (isHeaderNameFilter) {
12624
12859
  value = header;
@@ -12659,11 +12894,11 @@ var AxiosHeaders = class {
12659
12894
  function setHeader(_value, _header, _rewrite) {
12660
12895
  const lHeader = normalizeHeader(_header);
12661
12896
  if (!lHeader) {
12662
- throw new Error("header name must be a non-empty string");
12897
+ return;
12663
12898
  }
12664
12899
  const key = utils_default.findKey(self2, lHeader);
12665
12900
  if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
12666
- self2[key || _header] = normalizeValue(_value);
12901
+ self2[headerSlot(key || _header)] = normalizeValue(_value);
12667
12902
  }
12668
12903
  }
12669
12904
  const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
@@ -12671,13 +12906,19 @@ var AxiosHeaders = class {
12671
12906
  setHeaders(header, valueOrRewrite);
12672
12907
  } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
12673
12908
  setHeaders(parseHeaders_default(header), valueOrRewrite);
12674
- } else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
12675
- let obj = {}, dest, key;
12909
+ } else if (utils_default.isObject(header) && utils_default.isSafeIterable(header)) {
12910
+ let obj = /* @__PURE__ */ Object.create(null), dest, key;
12676
12911
  for (const entry of header) {
12677
12912
  if (!utils_default.isArray(entry)) {
12678
- throw TypeError("Object iterator must return a key-value pair");
12913
+ throw new TypeError("Object iterator must return a key-value pair");
12914
+ }
12915
+ key = entry[0];
12916
+ if (utils_default.hasOwnProp(obj, key)) {
12917
+ dest = obj[key];
12918
+ obj[key] = utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
12919
+ } else {
12920
+ obj[key] = entry[1];
12679
12921
  }
12680
- obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
12681
12922
  }
12682
12923
  setHeaders(obj, valueOrRewrite);
12683
12924
  } else {
@@ -12750,7 +12991,7 @@ var AxiosHeaders = class {
12750
12991
  }
12751
12992
  normalize(format) {
12752
12993
  const self2 = this;
12753
- const headers = {};
12994
+ const headers = /* @__PURE__ */ Object.create(null);
12754
12995
  utils_default.forEach(this, (value, header) => {
12755
12996
  const key = utils_default.findKey(headers, header);
12756
12997
  if (key) {
@@ -12758,7 +12999,7 @@ var AxiosHeaders = class {
12758
12999
  delete self2[header];
12759
13000
  return;
12760
13001
  }
12761
- const normalized = format ? formatHeader(header) : String(header).trim();
13002
+ const normalized = headerSlot(format ? formatHeader(header) : String(header).trim());
12762
13003
  if (normalized !== header) {
12763
13004
  delete self2[header];
12764
13005
  }
@@ -12784,7 +13025,8 @@ var AxiosHeaders = class {
12784
13025
  return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
12785
13026
  }
12786
13027
  getSetCookie() {
12787
- return this.get("set-cookie") || [];
13028
+ const value = this.get("set-cookie");
13029
+ return utils_default.isArray(value) ? value : value == null || value === false ? [] : [value];
12788
13030
  }
12789
13031
  get [Symbol.toStringTag]() {
12790
13032
  return "AxiosHeaders";
@@ -12792,6 +13034,9 @@ var AxiosHeaders = class {
12792
13034
  static from(thing) {
12793
13035
  return thing instanceof this ? thing : new this(thing);
12794
13036
  }
13037
+ static parseParameters(value) {
13038
+ return parseParameters(value);
13039
+ }
12795
13040
  static concat(first, ...targets) {
12796
13041
  const computed = new this(first);
12797
13042
  targets.forEach((target) => computed.set(target));
@@ -12834,7 +13079,7 @@ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
12834
13079
  utils_default.freezeMethods(AxiosHeaders);
12835
13080
  var AxiosHeaders_default = AxiosHeaders;
12836
13081
 
12837
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/AxiosError.js
13082
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/AxiosError.js
12838
13083
  var REDACTED = "[REDACTED ****]";
12839
13084
  function hasOwnOrPrototypeToJSON(source) {
12840
13085
  if (utils_default.hasOwnProp(source, "toJSON")) {
@@ -12887,11 +13132,61 @@ function redactConfig(config, redactKeys) {
12887
13132
  };
12888
13133
  return visit(config);
12889
13134
  }
13135
+ function stringifySafely(value) {
13136
+ try {
13137
+ return String(value);
13138
+ } catch (err) {
13139
+ return "";
13140
+ }
13141
+ }
13142
+ function aggregateErrorMessage(error) {
13143
+ const message = error.errors.map((entry) => {
13144
+ try {
13145
+ return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);
13146
+ } catch (err) {
13147
+ return "";
13148
+ }
13149
+ }).filter(Boolean).join("; ");
13150
+ return message || error.name || "AggregateError";
13151
+ }
13152
+ var CAUSED_BY_SEPARATOR = "\nCaused by: ";
13153
+ var $causeStack = /* @__PURE__ */ Symbol("causeStack");
13154
+ function getCauseStackIndex(error, stack) {
13155
+ const causeStack = utils_default.hasOwnProp(error, $causeStack) && error[$causeStack];
13156
+ return causeStack && stack.endsWith(causeStack) ? stack.length - causeStack.length : -1;
13157
+ }
13158
+ function appendCauseStack(target, source) {
13159
+ try {
13160
+ const sourceStack = source && source.stack;
13161
+ if (typeof sourceStack !== "string" || !sourceStack) {
13162
+ return;
13163
+ }
13164
+ const targetStack = target.stack;
13165
+ if (typeof targetStack !== "string" || !targetStack) {
13166
+ return;
13167
+ }
13168
+ const causeStack = CAUSED_BY_SEPARATOR + sourceStack;
13169
+ target.stack = targetStack + causeStack;
13170
+ Object.defineProperty(target, $causeStack, { __proto__: null, value: causeStack });
13171
+ } catch (e) {
13172
+ }
13173
+ }
12890
13174
  var AxiosError = class _AxiosError extends Error {
12891
13175
  static from(error, code, config, request, response, customProps) {
12892
- const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
12893
- axiosError.cause = error;
13176
+ let message = error.message;
13177
+ if (!message && utils_default.isArray(error.errors) && error.errors.length) {
13178
+ message = aggregateErrorMessage(error);
13179
+ }
13180
+ const axiosError = new _AxiosError(message, code || error.code, config, request, response);
13181
+ Object.defineProperty(axiosError, "cause", {
13182
+ __proto__: null,
13183
+ value: error,
13184
+ writable: true,
13185
+ enumerable: false,
13186
+ configurable: true
13187
+ });
12894
13188
  axiosError.name = error.name;
13189
+ appendCauseStack(axiosError, error);
12895
13190
  if (error.status != null && axiosError.status == null) {
12896
13191
  axiosError.status = error.status;
12897
13192
  }
@@ -12969,11 +13264,22 @@ AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
12969
13264
  AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
12970
13265
  var AxiosError_default = AxiosError;
12971
13266
 
12972
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/platform/node/classes/FormData.js
13267
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/classes/FormData.js
12973
13268
  var import_form_data = __toESM(require_form_data(), 1);
12974
13269
  var FormData_default = import_form_data.default;
12975
13270
 
12976
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/toFormData.js
13271
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/classes/Buffer.js
13272
+ var Buffer_default = {
13273
+ isBufferAvailable() {
13274
+ return typeof Buffer !== "undefined";
13275
+ },
13276
+ from(value) {
13277
+ return Buffer.from(value);
13278
+ }
13279
+ };
13280
+
13281
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/toFormData.js
13282
+ var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
12977
13283
  function isVisitable(thing) {
12978
13284
  return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
12979
13285
  }
@@ -12998,25 +13304,18 @@ function toFormData(obj, formData, options) {
12998
13304
  throw new TypeError("target must be an object");
12999
13305
  }
13000
13306
  formData = formData || new (FormData_default || FormData)();
13001
- options = utils_default.toFlatObject(
13002
- options,
13003
- {
13004
- metaTokens: true,
13005
- dots: false,
13006
- indexes: false
13007
- },
13008
- false,
13009
- function defined(option, source) {
13010
- return !utils_default.isUndefined(source[option]);
13011
- }
13012
- );
13013
- const metaTokens = options.metaTokens;
13014
- const visitor = options.visitor || defaultVisitor;
13015
- const dots = options.dots;
13016
- const indexes = options.indexes;
13017
- const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
13018
- const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
13307
+ const option = (name, fallback) => {
13308
+ const value = utils_default.getSafeProp(options, name);
13309
+ return utils_default.isUndefined(value) ? fallback : value;
13310
+ };
13311
+ const metaTokens = option("metaTokens", true);
13312
+ const visitor = option("visitor") || defaultVisitor;
13313
+ const dots = option("dots", false);
13314
+ const indexes = option("indexes", false);
13315
+ const _Blob = option("Blob") || typeof Blob !== "undefined" && Blob;
13316
+ const maxDepth = option("maxDepth", DEFAULT_FORM_DATA_MAX_DEPTH);
13019
13317
  const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
13318
+ const stack = [];
13020
13319
  if (!utils_default.isFunction(visitor)) {
13021
13320
  throw new TypeError("visitor must be a function");
13022
13321
  }
@@ -13032,10 +13331,44 @@ function toFormData(obj, formData, options) {
13032
13331
  throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
13033
13332
  }
13034
13333
  if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
13035
- return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
13334
+ if (useBlob && typeof _Blob === "function") {
13335
+ return new _Blob([value]);
13336
+ }
13337
+ if (Buffer_default && Buffer_default.isBufferAvailable()) {
13338
+ return Buffer_default.from(value);
13339
+ }
13340
+ throw new AxiosError_default(
13341
+ "Blob is not supported. Use a Buffer instead.",
13342
+ AxiosError_default.ERR_NOT_SUPPORT
13343
+ );
13036
13344
  }
13037
13345
  return value;
13038
13346
  }
13347
+ function throwIfMaxDepthExceeded(depth) {
13348
+ if (depth > maxDepth) {
13349
+ throw new AxiosError_default(
13350
+ "Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
13351
+ AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
13352
+ );
13353
+ }
13354
+ }
13355
+ function stringifyWithDepthLimit(value, depth) {
13356
+ if (maxDepth === Infinity) {
13357
+ return JSON.stringify(value);
13358
+ }
13359
+ const ancestors = [];
13360
+ return JSON.stringify(value, function limitDepth(_key, currentValue) {
13361
+ if (!utils_default.isObject(currentValue)) {
13362
+ return currentValue;
13363
+ }
13364
+ while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
13365
+ ancestors.pop();
13366
+ }
13367
+ ancestors.push(currentValue);
13368
+ throwIfMaxDepthExceeded(depth + ancestors.length - 1);
13369
+ return currentValue;
13370
+ });
13371
+ }
13039
13372
  function defaultVisitor(value, key, path) {
13040
13373
  let arr = value;
13041
13374
  if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
@@ -13045,7 +13378,7 @@ function toFormData(obj, formData, options) {
13045
13378
  if (value && !path && typeof value === "object") {
13046
13379
  if (utils_default.endsWith(key, "{}")) {
13047
13380
  key = metaTokens ? key : key.slice(0, -2);
13048
- value = JSON.stringify(value);
13381
+ value = stringifyWithDepthLimit(value, 1);
13049
13382
  } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
13050
13383
  key = removeBrackets(key);
13051
13384
  arr.forEach(function each(el, index) {
@@ -13064,7 +13397,6 @@ function toFormData(obj, formData, options) {
13064
13397
  formData.append(renderKey(path, key, dots), convertValue(value));
13065
13398
  return false;
13066
13399
  }
13067
- const stack = [];
13068
13400
  const exposedHelpers = Object.assign(predicates, {
13069
13401
  defaultVisitor,
13070
13402
  convertValue,
@@ -13072,14 +13404,9 @@ function toFormData(obj, formData, options) {
13072
13404
  });
13073
13405
  function build(value, path, depth = 0) {
13074
13406
  if (utils_default.isUndefined(value)) return;
13075
- if (depth > maxDepth) {
13076
- throw new AxiosError_default(
13077
- "Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
13078
- AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
13079
- );
13080
- }
13407
+ throwIfMaxDepthExceeded(depth);
13081
13408
  if (stack.indexOf(value) !== -1) {
13082
- throw Error("Circular reference detected in " + path.join("."));
13409
+ throw new Error("Circular reference detected in " + path.join("."));
13083
13410
  }
13084
13411
  stack.push(value);
13085
13412
  utils_default.forEach(value, function each(el, key) {
@@ -13098,7 +13425,7 @@ function toFormData(obj, formData, options) {
13098
13425
  }
13099
13426
  var toFormData_default = toFormData;
13100
13427
 
13101
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
13428
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
13102
13429
  function encode(str) {
13103
13430
  const charMap = {
13104
13431
  "!": "%21",
@@ -13121,16 +13448,14 @@ prototype.append = function append(name, value) {
13121
13448
  this._pairs.push([name, value]);
13122
13449
  };
13123
13450
  prototype.toString = function toString2(encoder) {
13124
- const _encode = encoder ? function(value) {
13125
- return encoder.call(this, value, encode);
13126
- } : encode;
13451
+ const _encode = encoder ? (value) => encoder.call(this, value, encode) : encode;
13127
13452
  return this._pairs.map(function each(pair) {
13128
13453
  return _encode(pair[0]) + "=" + _encode(pair[1]);
13129
13454
  }, "").join("&");
13130
13455
  };
13131
13456
  var AxiosURLSearchParams_default = AxiosURLSearchParams;
13132
13457
 
13133
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/buildURL.js
13458
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/buildURL.js
13134
13459
  function encode2(val) {
13135
13460
  return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
13136
13461
  }
@@ -13138,11 +13463,12 @@ function buildURL(url2, params, options) {
13138
13463
  if (!params) {
13139
13464
  return url2;
13140
13465
  }
13141
- const _encode = options && options.encode || encode2;
13466
+ url2 = url2 || "";
13142
13467
  const _options = utils_default.isFunction(options) ? {
13143
13468
  serialize: options
13144
13469
  } : options;
13145
- const serializeFn = _options && _options.serialize;
13470
+ const _encode = utils_default.getSafeProp(_options, "encode") || encode2;
13471
+ const serializeFn = utils_default.getSafeProp(_options, "serialize");
13146
13472
  let serializedParams;
13147
13473
  if (serializeFn) {
13148
13474
  serializedParams = serializeFn(params, _options);
@@ -13159,10 +13485,54 @@ function buildURL(url2, params, options) {
13159
13485
  return url2;
13160
13486
  }
13161
13487
 
13162
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/InterceptorManager.js
13488
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/InterceptorManager.js
13489
+ var $internals2 = /* @__PURE__ */ Symbol("internals");
13490
+ function countHandlers(handlers) {
13491
+ return handlers ? handlers.length : 0;
13492
+ }
13493
+ function trimHandlers(handlers) {
13494
+ if (!handlers) {
13495
+ return;
13496
+ }
13497
+ while (handlers.length && handlers[handlers.length - 1] === null) {
13498
+ handlers.pop();
13499
+ }
13500
+ }
13501
+ function normalizeHandlerId(id) {
13502
+ if (typeof id === "string" && id !== "" && String(Number(id)) === id) {
13503
+ return Number(id);
13504
+ }
13505
+ return id;
13506
+ }
13507
+ function syncHandlerEntries(manager, internals) {
13508
+ const handlers = manager.handlers;
13509
+ const length = countHandlers(handlers);
13510
+ if (handlers !== internals.handlersRef) {
13511
+ internals.handlersRef = handlers;
13512
+ internals.handlerEntries.clear();
13513
+ } else if (length !== internals.handlersLength) {
13514
+ if (!length) {
13515
+ internals.handlerEntries.clear();
13516
+ } else {
13517
+ internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
13518
+ if (handlers[entry.index] !== entry.handler) {
13519
+ internals.handlerEntries.delete(id);
13520
+ }
13521
+ });
13522
+ }
13523
+ }
13524
+ internals.handlersLength = length;
13525
+ }
13163
13526
  var InterceptorManager = class {
13164
13527
  constructor() {
13165
13528
  this.handlers = [];
13529
+ this[$internals2] = {
13530
+ handlersRef: this.handlers,
13531
+ handlersLength: this.handlers.length,
13532
+ handlerEntries: /* @__PURE__ */ new Map(),
13533
+ iterationDepth: 0,
13534
+ nextId: 0
13535
+ };
13166
13536
  }
13167
13537
  /**
13168
13538
  * Add a new interceptor to the stack
@@ -13174,13 +13544,25 @@ var InterceptorManager = class {
13174
13544
  * @return {Number} An ID used to remove interceptor later
13175
13545
  */
13176
13546
  use(fulfilled, rejected, options) {
13177
- this.handlers.push({
13547
+ const handler = {
13178
13548
  fulfilled,
13179
13549
  rejected,
13180
13550
  synchronous: options ? options.synchronous : false,
13181
13551
  runWhen: options ? options.runWhen : null
13552
+ };
13553
+ const internals = this[$internals2];
13554
+ if (this.handlers == null) {
13555
+ this.handlers = [];
13556
+ }
13557
+ syncHandlerEntries(this, internals);
13558
+ const id = internals.nextId++;
13559
+ this.handlers.push(handler);
13560
+ internals.handlerEntries.set(id, {
13561
+ handler,
13562
+ index: this.handlers.length - 1
13182
13563
  });
13183
- return this.handlers.length - 1;
13564
+ internals.handlersLength = this.handlers.length;
13565
+ return id;
13184
13566
  }
13185
13567
  /**
13186
13568
  * Remove an interceptor from the stack
@@ -13190,8 +13572,20 @@ var InterceptorManager = class {
13190
13572
  * @returns {void}
13191
13573
  */
13192
13574
  eject(id) {
13193
- if (this.handlers[id]) {
13194
- this.handlers[id] = null;
13575
+ const internals = this[$internals2];
13576
+ syncHandlerEntries(this, internals);
13577
+ const handlerId = normalizeHandlerId(id);
13578
+ const entry = internals.handlerEntries.get(handlerId);
13579
+ if (entry) {
13580
+ internals.handlerEntries.delete(handlerId);
13581
+ if (this.handlers[entry.index] !== entry.handler) {
13582
+ return;
13583
+ }
13584
+ this.handlers[entry.index] = null;
13585
+ if (!internals.iterationDepth) {
13586
+ trimHandlers(this.handlers);
13587
+ internals.handlersLength = this.handlers.length;
13588
+ }
13195
13589
  }
13196
13590
  }
13197
13591
  /**
@@ -13202,6 +13596,7 @@ var InterceptorManager = class {
13202
13596
  clear() {
13203
13597
  if (this.handlers) {
13204
13598
  this.handlers = [];
13599
+ syncHandlerEntries(this, this[$internals2]);
13205
13600
  }
13206
13601
  }
13207
13602
  /**
@@ -13215,31 +13610,45 @@ var InterceptorManager = class {
13215
13610
  * @returns {void}
13216
13611
  */
13217
13612
  forEach(fn) {
13218
- utils_default.forEach(this.handlers, function forEachHandler(h) {
13219
- if (h !== null) {
13220
- fn(h);
13613
+ const internals = this[$internals2];
13614
+ syncHandlerEntries(this, internals);
13615
+ internals.iterationDepth++;
13616
+ try {
13617
+ utils_default.forEach(this.handlers, function forEachHandler(h) {
13618
+ if (h !== null) {
13619
+ fn(h);
13620
+ }
13621
+ });
13622
+ } finally {
13623
+ if (!--internals.iterationDepth) {
13624
+ syncHandlerEntries(this, internals);
13625
+ trimHandlers(this.handlers);
13626
+ internals.handlersLength = countHandlers(this.handlers);
13221
13627
  }
13222
- });
13628
+ }
13223
13629
  }
13224
13630
  };
13225
13631
  var InterceptorManager_default = InterceptorManager;
13226
13632
 
13227
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/defaults/transitional.js
13633
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/defaults/transitional.js
13228
13634
  var transitional_default = {
13229
13635
  silentJSONParsing: true,
13230
13636
  forcedJSONParsing: true,
13231
13637
  clarifyTimeoutError: false,
13232
- legacyInterceptorReqResOrdering: true
13638
+ legacyInterceptorReqResOrdering: true,
13639
+ advertiseZstdAcceptEncoding: false,
13640
+ validateStatusUndefinedResolves: true,
13641
+ encodeBasicAuthUsername: false
13233
13642
  };
13234
13643
 
13235
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/platform/node/index.js
13644
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/index.js
13236
13645
  import crypto from "crypto";
13237
13646
 
13238
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
13647
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
13239
13648
  import url from "url";
13240
13649
  var URLSearchParams_default = url.URLSearchParams;
13241
13650
 
13242
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/platform/node/index.js
13651
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/index.js
13243
13652
  var ALPHA = "abcdefghijklmnopqrstuvwxyz";
13244
13653
  var DIGIT = "0123456789";
13245
13654
  var ALPHABET = {
@@ -13269,7 +13678,7 @@ var node_default = {
13269
13678
  protocols: ["http", "https", "file", "data"]
13270
13679
  };
13271
13680
 
13272
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/platform/common/utils.js
13681
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/common/utils.js
13273
13682
  var utils_exports = {};
13274
13683
  __export(utils_exports, {
13275
13684
  hasBrowserEnv: () => hasBrowserEnv,
@@ -13287,13 +13696,13 @@ var hasStandardBrowserWebWorkerEnv = (() => {
13287
13696
  })();
13288
13697
  var origin = hasBrowserEnv && window.location.href || "http://localhost";
13289
13698
 
13290
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/platform/index.js
13699
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/index.js
13291
13700
  var platform_default = {
13292
13701
  ...utils_exports,
13293
13702
  ...node_default
13294
13703
  };
13295
13704
 
13296
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/toURLEncodedForm.js
13705
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/toURLEncodedForm.js
13297
13706
  function toURLEncodedForm(data, options) {
13298
13707
  return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
13299
13708
  visitor: function(value, key, path, helpers) {
@@ -13307,11 +13716,25 @@ function toURLEncodedForm(data, options) {
13307
13716
  });
13308
13717
  }
13309
13718
 
13310
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/formDataToJSON.js
13719
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToJSON.js
13720
+ var MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;
13721
+ function throwIfDepthExceeded(index) {
13722
+ if (index > MAX_DEPTH) {
13723
+ throw new AxiosError_default(
13724
+ "FormData field is too deeply nested (" + index + " levels). Max depth: " + MAX_DEPTH,
13725
+ AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
13726
+ );
13727
+ }
13728
+ }
13311
13729
  function parsePropPath(name) {
13312
- return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
13313
- return match[0] === "[]" ? "" : match[1] || match[0];
13314
- });
13730
+ const path = [];
13731
+ const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
13732
+ let match;
13733
+ while ((match = pattern.exec(name)) !== null) {
13734
+ throwIfDepthExceeded(path.length);
13735
+ path.push(match[0] === "[]" ? "" : match[1] || match[0]);
13736
+ }
13737
+ return path;
13315
13738
  }
13316
13739
  function arrayToObject(arr) {
13317
13740
  const obj = {};
@@ -13325,8 +13748,27 @@ function arrayToObject(arr) {
13325
13748
  }
13326
13749
  return obj;
13327
13750
  }
13751
+ function normalizeArray(value) {
13752
+ if (!utils_default.isArray(value)) return value;
13753
+ const keys = Object.keys(value);
13754
+ return keys.length !== value.length || keys.some((key, index) => key !== String(index)) ? arrayToObject(value) : value;
13755
+ }
13756
+ function normalizeArrays(obj) {
13757
+ const pending = [obj];
13758
+ while (pending.length) {
13759
+ const target = pending.pop();
13760
+ Object.keys(target).forEach((key) => {
13761
+ const value = target[key] = normalizeArray(target[key]);
13762
+ if (utils_default.isArray(value) || utils_default.isPlainObject(value)) {
13763
+ pending.push(value);
13764
+ }
13765
+ });
13766
+ }
13767
+ return obj;
13768
+ }
13328
13769
  function formDataToJSON(formData) {
13329
13770
  function buildPath(path, value, target, index) {
13771
+ throwIfDepthExceeded(index);
13330
13772
  let name = path[index++];
13331
13773
  if (name === "__proto__") return true;
13332
13774
  const isNumericKey = Number.isFinite(+name);
@@ -13334,6 +13776,7 @@ function formDataToJSON(formData) {
13334
13776
  name = !name && utils_default.isArray(target) ? target.length : name;
13335
13777
  if (isLast) {
13336
13778
  if (utils_default.hasOwnProp(target, name)) {
13779
+ target[name] = normalizeArray(target[name]);
13337
13780
  target[name] = utils_default.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
13338
13781
  } else {
13339
13782
  target[name] = value;
@@ -13354,15 +13797,31 @@ function formDataToJSON(formData) {
13354
13797
  utils_default.forEachEntry(formData, (name, value) => {
13355
13798
  buildPath(parsePropPath(name), value, obj, 0);
13356
13799
  });
13357
- return obj;
13800
+ return normalizeArrays(obj);
13358
13801
  }
13359
13802
  return null;
13360
13803
  }
13361
13804
  var formDataToJSON_default = formDataToJSON;
13362
13805
 
13363
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/defaults/index.js
13806
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/methodList.js
13807
+ var methodList = Object.freeze([
13808
+ "get",
13809
+ "delete",
13810
+ "head",
13811
+ "options",
13812
+ "post",
13813
+ "put",
13814
+ "patch",
13815
+ "purge",
13816
+ "link",
13817
+ "unlink",
13818
+ "query"
13819
+ ]);
13820
+ var methodList_default = methodList;
13821
+
13822
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/defaults/index.js
13364
13823
  var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0;
13365
- function stringifySafely(rawValue, parser, encoder) {
13824
+ function stringifySafely2(rawValue, parser, encoder) {
13366
13825
  if (utils_default.isString(rawValue)) {
13367
13826
  try {
13368
13827
  (parser || JSON.parse)(rawValue);
@@ -13418,7 +13877,7 @@ var defaults = {
13418
13877
  }
13419
13878
  if (isObjectPayload || hasJSONContentType) {
13420
13879
  headers.setContentType("application/json", false);
13421
- return stringifySafely(data);
13880
+ return stringifySafely2(data);
13422
13881
  }
13423
13882
  return data;
13424
13883
  }
@@ -13472,12 +13931,12 @@ var defaults = {
13472
13931
  }
13473
13932
  }
13474
13933
  };
13475
- utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
13934
+ utils_default.forEach(methodList_default, (method) => {
13476
13935
  defaults.headers[method] = {};
13477
13936
  });
13478
13937
  var defaults_default = defaults;
13479
13938
 
13480
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/transformData.js
13939
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/transformData.js
13481
13940
  function transformData(fns, response) {
13482
13941
  const config = this || defaults_default;
13483
13942
  const context = response || config;
@@ -13490,12 +13949,12 @@ function transformData(fns, response) {
13490
13949
  return data;
13491
13950
  }
13492
13951
 
13493
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/cancel/isCancel.js
13952
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/isCancel.js
13494
13953
  function isCancel(value) {
13495
13954
  return !!(value && value.__CANCEL__);
13496
13955
  }
13497
13956
 
13498
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/cancel/CanceledError.js
13957
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/CanceledError.js
13499
13958
  var CanceledError = class extends AxiosError_default {
13500
13959
  /**
13501
13960
  * A `CanceledError` is an object that is thrown when an operation is canceled.
@@ -13514,7 +13973,7 @@ var CanceledError = class extends AxiosError_default {
13514
13973
  };
13515
13974
  var CanceledError_default = CanceledError;
13516
13975
 
13517
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/settle.js
13976
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/settle.js
13518
13977
  function settle(resolve, reject, response) {
13519
13978
  const validateStatus2 = response.config.validateStatus;
13520
13979
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
@@ -13530,7 +13989,7 @@ function settle(resolve, reject, response) {
13530
13989
  }
13531
13990
  }
13532
13991
 
13533
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/isAbsoluteURL.js
13992
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isAbsoluteURL.js
13534
13993
  function isAbsoluteURL(url2) {
13535
13994
  if (typeof url2 !== "string") {
13536
13995
  return false;
@@ -13538,15 +13997,71 @@ function isAbsoluteURL(url2) {
13538
13997
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
13539
13998
  }
13540
13999
 
13541
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/combineURLs.js
14000
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/combineURLs.js
13542
14001
  function combineURLs(baseURL, relativeURL) {
13543
- return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
14002
+ if (!relativeURL) {
14003
+ return baseURL;
14004
+ }
14005
+ let end = baseURL.length;
14006
+ while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
14007
+ end--;
14008
+ }
14009
+ return baseURL.slice(0, end) + "/" + relativeURL.replace(/^\/+/, "");
14010
+ }
14011
+
14012
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js
14013
+ var urlParserControlCharacters = /[\t\n\r]/g;
14014
+ function normalizeURLForProtocolCheck(url2) {
14015
+ if (typeof url2 !== "string") {
14016
+ return url2;
14017
+ }
14018
+ let start = 0;
14019
+ while (start < url2.length && url2.charCodeAt(start) <= 32) {
14020
+ start++;
14021
+ }
14022
+ return url2.slice(start).replace(urlParserControlCharacters, "");
13544
14023
  }
13545
14024
 
13546
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/buildFullPath.js
13547
- function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
14025
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/buildFullPath.js
14026
+ var malformedHttpProtocol = /^https?:(?!\/\/)/i;
14027
+ function redactFragment(fragment) {
14028
+ if (!fragment) {
14029
+ return fragment;
14030
+ }
14031
+ return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = "") => {
14032
+ return `${separator}${parameterName}${REDACTED}`;
14033
+ });
14034
+ }
14035
+ function redactSensitiveURLParts(url2) {
14036
+ const redactedURL = url2.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);
14037
+ const fragmentIndex = redactedURL.indexOf("#");
14038
+ const urlWithoutFragment = fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
14039
+ const redactedURLWithoutFragment = urlWithoutFragment.replace(
14040
+ /([?&][^=&#]*=)[^&#]*/g,
14041
+ `$1${REDACTED}`
14042
+ );
14043
+ if (fragmentIndex === -1) {
14044
+ return redactedURLWithoutFragment;
14045
+ }
14046
+ return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
14047
+ }
14048
+ function assertValidHttpProtocolURL(url2, config) {
14049
+ if (typeof url2 === "string") {
14050
+ const normalizedURL = normalizeURLForProtocolCheck(url2);
14051
+ if (malformedHttpProtocol.test(normalizedURL)) {
14052
+ throw new AxiosError_default(
14053
+ `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`,
14054
+ AxiosError_default.ERR_INVALID_URL,
14055
+ config
14056
+ );
14057
+ }
14058
+ }
14059
+ }
14060
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
14061
+ assertValidHttpProtocolURL(requestedURL, config);
13548
14062
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
13549
14063
  if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
14064
+ assertValidHttpProtocolURL(baseURL, config);
13550
14065
  return combineURLs(baseURL, requestedURL);
13551
14066
  }
13552
14067
  return requestedURL;
@@ -13619,27 +14134,27 @@ function getEnv(key) {
13619
14134
  return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
13620
14135
  }
13621
14136
 
13622
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/adapters/http.js
14137
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
13623
14138
  var import_https_proxy_agent = __toESM(require_dist(), 1);
13624
14139
  var import_follow_redirects = __toESM(require_follow_redirects(), 1);
13625
14140
  import http from "http";
13626
14141
  import https from "https";
13627
- import http2 from "http2";
13628
- import util2 from "util";
14142
+ import http22 from "http2";
14143
+ import util3 from "util";
13629
14144
  import { resolve as resolvePath } from "path";
13630
14145
  import zlib from "zlib";
13631
14146
 
13632
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/env/data.js
13633
- var VERSION = "1.16.1";
14147
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/env/data.js
14148
+ var VERSION = "1.21.0";
13634
14149
 
13635
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/parseProtocol.js
14150
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/parseProtocol.js
13636
14151
  function parseProtocol(url2) {
13637
14152
  const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
13638
- return match && match[1] || "";
14153
+ return match && match[1].toLowerCase() || "";
13639
14154
  }
13640
14155
 
13641
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/fromDataURI.js
13642
- var DATA_URL_PATTERN = /^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
14156
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/fromDataURI.js
14157
+ var DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/i;
13643
14158
  function fromDataURI(uri, asBlob, options) {
13644
14159
  const _Blob = options && options.Blob || platform_default.classes.Blob;
13645
14160
  const protocol = parseProtocol(uri);
@@ -13656,13 +14171,16 @@ function fromDataURI(uri, asBlob, options) {
13656
14171
  const params = match[2];
13657
14172
  const encoding = match[3] ? "base64" : "utf8";
13658
14173
  const body = match[4];
13659
- let mime;
14174
+ let mime = "";
13660
14175
  if (type) {
13661
14176
  mime = params ? type + params : type;
13662
14177
  } else if (params) {
13663
14178
  mime = "text/plain" + params;
13664
14179
  }
13665
- const buffer = Buffer.from(decodeURIComponent(body), encoding);
14180
+ const buffer = encoding === "base64" ? Buffer.from(
14181
+ body.replace(/%([\da-f]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16))),
14182
+ "base64"
14183
+ ) : Buffer.from(decodeURIComponent(body), encoding);
13666
14184
  if (asBlob) {
13667
14185
  if (!_Blob) {
13668
14186
  throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT);
@@ -13674,10 +14192,24 @@ function fromDataURI(uri, asBlob, options) {
13674
14192
  throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
13675
14193
  }
13676
14194
 
13677
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/adapters/http.js
14195
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
13678
14196
  import stream3 from "stream";
13679
14197
 
13680
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/AxiosTransformStream.js
14198
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/setFormDataHeaders.js
14199
+ var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
14200
+ function setFormDataHeaders(headers, formHeaders, policy) {
14201
+ if (policy !== "content-only") {
14202
+ headers.set(formHeaders);
14203
+ return;
14204
+ }
14205
+ Object.entries(formHeaders || {}).forEach(([key, val]) => {
14206
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
14207
+ headers.set(key, val);
14208
+ }
14209
+ });
14210
+ }
14211
+
14212
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/AxiosTransformStream.js
13681
14213
  import stream from "stream";
13682
14214
  var kInternals = /* @__PURE__ */ Symbol("internals");
13683
14215
  var AxiosTransformStream = class extends stream.Transform {
@@ -13734,7 +14266,10 @@ var AxiosTransformStream = class extends stream.Transform {
13734
14266
  const timeWindow = internals.timeWindow;
13735
14267
  const divider = 1e3 / timeWindow;
13736
14268
  const bytesThreshold = maxRate / divider;
13737
- const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
14269
+ let minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
14270
+ if (maxRate) {
14271
+ minChunkSize = Math.min(bytesThreshold, minChunkSize);
14272
+ }
13738
14273
  const pushChunk = (_chunk, _callback) => {
13739
14274
  const bytes = Buffer.byteLength(_chunk);
13740
14275
  internals.bytesSeen += bytes;
@@ -13750,6 +14285,9 @@ var AxiosTransformStream = class extends stream.Transform {
13750
14285
  }
13751
14286
  };
13752
14287
  const transformChunk = (_chunk, _callback) => {
14288
+ if (this.destroyed) {
14289
+ return _callback();
14290
+ }
13753
14291
  const chunkSize = Buffer.byteLength(_chunk);
13754
14292
  let chunkRemainder = null;
13755
14293
  let maxChunkSize = readableHighWaterMark;
@@ -13772,7 +14310,7 @@ var AxiosTransformStream = class extends stream.Transform {
13772
14310
  }, timeWindow - passed);
13773
14311
  }
13774
14312
  if (bytesLeft < maxChunkSize) {
13775
- maxChunkSize = bytesLeft;
14313
+ maxChunkSize = Math.max(1, Math.floor(bytesLeft));
13776
14314
  }
13777
14315
  }
13778
14316
  if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) {
@@ -13800,14 +14338,14 @@ var AxiosTransformStream = class extends stream.Transform {
13800
14338
  };
13801
14339
  var AxiosTransformStream_default = AxiosTransformStream;
13802
14340
 
13803
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/adapters/http.js
14341
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
13804
14342
  import { EventEmitter } from "events";
13805
14343
 
13806
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/formDataToStream.js
14344
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToStream.js
13807
14345
  import util from "util";
13808
14346
  import { Readable } from "stream";
13809
14347
 
13810
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/readBlob.js
14348
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/readBlob.js
13811
14349
  var { asyncIterator } = Symbol;
13812
14350
  var readBlob = async function* (blob) {
13813
14351
  if (blob.stream) {
@@ -13822,7 +14360,7 @@ var readBlob = async function* (blob) {
13822
14360
  };
13823
14361
  var readBlob_default = readBlob;
13824
14362
 
13825
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/formDataToStream.js
14363
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToStream.js
13826
14364
  var BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_";
13827
14365
  var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder();
13828
14366
  var CRLF = "\r\n";
@@ -13830,9 +14368,9 @@ var CRLF_BYTES = textEncoder.encode(CRLF);
13830
14368
  var CRLF_BYTES_COUNT = 2;
13831
14369
  var FormDataPart = class {
13832
14370
  constructor(name, value) {
13833
- const { escapeName } = this.constructor;
14371
+ const { escapeName: escapeName2 } = this.constructor;
13834
14372
  const isStringValue = utils_default.isString(value);
13835
- let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`;
14373
+ let headers = `Content-Disposition: form-data; name="${escapeName2(name)}"${!isStringValue && value.name ? `; filename="${escapeName2(value.name)}"` : ""}${CRLF}`;
13836
14374
  if (isStringValue) {
13837
14375
  value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
13838
14376
  } else {
@@ -13873,10 +14411,10 @@ var formDataToStream = (form, headersHandler, options) => {
13873
14411
  boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET)
13874
14412
  } = options || {};
13875
14413
  if (!utils_default.isFormData(form)) {
13876
- throw TypeError("FormData instance required");
14414
+ throw new TypeError("FormData instance required");
13877
14415
  }
13878
14416
  if (boundary.length < 1 || boundary.length > 70) {
13879
- throw Error("boundary must be 1-70 characters long");
14417
+ throw new Error("boundary must be 1-70 characters long");
13880
14418
  }
13881
14419
  const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
13882
14420
  const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
@@ -13907,7 +14445,7 @@ var formDataToStream = (form, headersHandler, options) => {
13907
14445
  };
13908
14446
  var formDataToStream_default = formDataToStream;
13909
14447
 
13910
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
14448
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
13911
14449
  import stream2 from "stream";
13912
14450
  var ZlibHeaderTransformStream = class extends stream2.Transform {
13913
14451
  __transform(chunk, encoding, callback) {
@@ -13929,29 +14467,191 @@ var ZlibHeaderTransformStream = class extends stream2.Transform {
13929
14467
  };
13930
14468
  var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
13931
14469
 
13932
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/callbackify.js
13933
- var callbackify = (fn, reducer) => {
13934
- return utils_default.isAsyncFn(fn) ? function(...args) {
13935
- const cb = args.pop();
13936
- fn.apply(this, args).then((value) => {
13937
- try {
13938
- reducer ? cb(null, ...reducer(value)) : cb(null, value);
13939
- } catch (err) {
13940
- cb(err);
14470
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/Http2Sessions.js
14471
+ import http2 from "http2";
14472
+ import util2 from "util";
14473
+ var Http2Sessions = class {
14474
+ constructor() {
14475
+ this.sessions = /* @__PURE__ */ Object.create(null);
14476
+ }
14477
+ getSession(authority, options) {
14478
+ options = Object.assign(
14479
+ /* @__PURE__ */ Object.create(null),
14480
+ {
14481
+ sessionTimeout: 1e3
14482
+ },
14483
+ options
14484
+ );
14485
+ let authoritySessions = this.sessions[authority];
14486
+ if (authoritySessions) {
14487
+ let len = authoritySessions.length;
14488
+ for (let i = 0; i < len; i++) {
14489
+ const [sessionHandle, sessionOptions] = authoritySessions[i];
14490
+ if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
14491
+ return sessionHandle;
14492
+ }
13941
14493
  }
13942
- }, cb);
13943
- } : fn;
14494
+ }
14495
+ const session = http2.connect(authority, options);
14496
+ let removed;
14497
+ let timer;
14498
+ const removeSession = () => {
14499
+ if (removed) {
14500
+ return;
14501
+ }
14502
+ removed = true;
14503
+ if (timer) {
14504
+ clearTimeout(timer);
14505
+ timer = null;
14506
+ }
14507
+ let entries = authoritySessions, len = entries.length, i = len;
14508
+ while (i--) {
14509
+ if (entries[i][0] === session) {
14510
+ if (len === 1) {
14511
+ delete this.sessions[authority];
14512
+ } else {
14513
+ entries.splice(i, 1);
14514
+ }
14515
+ if (!session.closed) {
14516
+ session.close();
14517
+ }
14518
+ return;
14519
+ }
14520
+ }
14521
+ };
14522
+ const originalRequestFn = session.request;
14523
+ const { sessionTimeout } = options;
14524
+ if (sessionTimeout != null) {
14525
+ let streamsCount = 0;
14526
+ session.request = function() {
14527
+ const stream4 = originalRequestFn.apply(this, arguments);
14528
+ streamsCount++;
14529
+ if (timer) {
14530
+ clearTimeout(timer);
14531
+ timer = null;
14532
+ }
14533
+ stream4.once("close", () => {
14534
+ if (!--streamsCount && !removed) {
14535
+ timer = setTimeout(() => {
14536
+ timer = null;
14537
+ removeSession();
14538
+ }, sessionTimeout);
14539
+ }
14540
+ });
14541
+ return stream4;
14542
+ };
14543
+ }
14544
+ session.once("close", removeSession);
14545
+ session.once("error", removeSession);
14546
+ session.once("goaway", removeSession);
14547
+ let entry = [session, options];
14548
+ authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
14549
+ return session;
14550
+ }
14551
+ };
14552
+ var Http2Sessions_default = Http2Sessions;
14553
+
14554
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/callbackify.js
14555
+ var callbackify = (fn, reducer) => {
14556
+ return utils_default.isAsyncFn(fn) ? function(...args) {
14557
+ const cb = args.pop();
14558
+ fn.apply(this, args).then((value) => {
14559
+ try {
14560
+ reducer ? cb(null, ...reducer(value)) : cb(null, value);
14561
+ } catch (err) {
14562
+ cb(err);
14563
+ }
14564
+ }, cb);
14565
+ } : fn;
13944
14566
  };
13945
14567
  var callbackify_default = callbackify;
13946
14568
 
13947
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/shouldBypassProxy.js
13948
- var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
14569
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/shouldBypassProxy.js
14570
+ import { domainToASCII } from "url";
14571
+ var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]);
14572
+ var trimTrailingDots = (value) => {
14573
+ let end = value.length;
14574
+ while (end && value.charCodeAt(end - 1) === 46) {
14575
+ end--;
14576
+ }
14577
+ return end === value.length ? value : value.slice(0, end);
14578
+ };
13949
14579
  var isIPv4Loopback = (host) => {
13950
14580
  const parts = host.split(".");
13951
14581
  if (parts.length !== 4) return false;
13952
14582
  if (parts[0] !== "127") return false;
13953
14583
  return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
13954
14584
  };
14585
+ var parseIPv4Octet = (text) => {
14586
+ if (/^0[xX][0-9a-fA-F]+$/.test(text)) {
14587
+ const n = parseInt(text.slice(2), 16);
14588
+ return Number.isFinite(n) ? n : null;
14589
+ }
14590
+ if (text.length > 1 && /^0[0-7]+$/.test(text)) {
14591
+ const n = parseInt(text, 8);
14592
+ return Number.isFinite(n) ? n : null;
14593
+ }
14594
+ if (text.length > 1 && /^0[0-9]+$/.test(text)) {
14595
+ return null;
14596
+ }
14597
+ if (/^[0-9]+$/.test(text)) {
14598
+ const n = parseInt(text, 10);
14599
+ return Number.isFinite(n) ? n : null;
14600
+ }
14601
+ return null;
14602
+ };
14603
+ var normalizeIPAddress = (host) => {
14604
+ if (typeof host !== "string" || !host || host.indexOf(":") !== -1) {
14605
+ return host;
14606
+ }
14607
+ let h = host;
14608
+ if (h.charAt(0) === "[" && h.charAt(h.length - 1) === "]") {
14609
+ h = h.slice(1, -1);
14610
+ }
14611
+ h = trimTrailingDots(h);
14612
+ if (!/^[0-9.xXa-fA-F]+$/.test(h)) return host;
14613
+ const parts = h.split(".");
14614
+ if (parts.some((p) => p === "")) return host;
14615
+ if (parts.length === 4) {
14616
+ const octets = parts.map(parseIPv4Octet);
14617
+ if (octets.some((n) => n === null || n < 0 || n > 255)) return host;
14618
+ return octets.join(".");
14619
+ }
14620
+ if (parts.length > 4) {
14621
+ return host;
14622
+ }
14623
+ if (parts.length === 1) return host;
14624
+ const literalOctets = parts.slice(0, -1);
14625
+ const tail = parts[parts.length - 1];
14626
+ const tailSlots = 4 - literalOctets.length;
14627
+ const tailValue = parseIPv4Octet(tail);
14628
+ if (tailValue === null) return host;
14629
+ const maxTail = (1 << 8 * tailSlots) - 1;
14630
+ if (tailValue < 0 || tailValue > maxTail) return host;
14631
+ const tailOctets = new Array(tailSlots).fill(0);
14632
+ for (let i = tailSlots - 1, v = tailValue; i >= 0; i--, v >>= 8) {
14633
+ tailOctets[i] = v & 255;
14634
+ }
14635
+ const literal = literalOctets.map(parseIPv4Octet);
14636
+ if (literal.some((n) => n === null || n < 0 || n > 255)) return host;
14637
+ return [...literal, ...tailOctets].join(".");
14638
+ };
14639
+ var isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
14640
+ var isIPv6Unspecified = (host) => {
14641
+ if (host === "::") return true;
14642
+ const compressionIndex = host.indexOf("::");
14643
+ if (compressionIndex !== -1) {
14644
+ if (compressionIndex !== host.lastIndexOf("::")) return false;
14645
+ const left = host.slice(0, compressionIndex);
14646
+ const right = host.slice(compressionIndex + 2);
14647
+ const leftGroups = left ? left.split(":") : [];
14648
+ const rightGroups = right ? right.split(":") : [];
14649
+ const explicitGroups = leftGroups.length + rightGroups.length;
14650
+ return explicitGroups < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup);
14651
+ }
14652
+ const groups = host.split(":");
14653
+ return groups.length === 8 && groups.every(isIPv6ZeroGroup);
14654
+ };
13955
14655
  var isIPv6Loopback = (host) => {
13956
14656
  if (host === "::1") return true;
13957
14657
  const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
@@ -13974,6 +14674,7 @@ var isLoopback = (host) => {
13974
14674
  if (!host) return false;
13975
14675
  if (LOOPBACK_HOSTNAMES.has(host)) return true;
13976
14676
  if (isIPv4Loopback(host)) return true;
14677
+ if (isIPv6Unspecified(host)) return true;
13977
14678
  return isIPv6Loopback(host);
13978
14679
  };
13979
14680
  var DEFAULT_PORTS2 = {
@@ -14019,6 +14720,40 @@ var unmapIPv4MappedIPv6 = (host) => {
14019
14720
  }
14020
14721
  return host;
14021
14722
  };
14723
+ var IPV4_OCTET_RE = /^(?:0|[1-9]\d{0,2})$/;
14724
+ var ipv4ToBytes = (host) => {
14725
+ const parts = host.split(".");
14726
+ return parts.length === 4 && parts.every((part) => IPV4_OCTET_RE.test(part) && Number(part) <= 255) ? parts.map(Number) : null;
14727
+ };
14728
+ var IPV6_GROUP_RE = /^[0-9a-f]{1,4}$/i;
14729
+ var ipv6ToBytes = (host) => {
14730
+ const halves = host.split("::");
14731
+ if (halves.length > 2) {
14732
+ return null;
14733
+ }
14734
+ const groups = halves[0] ? halves[0].split(":") : [];
14735
+ if (halves.length === 2) {
14736
+ const rear = halves[1] ? halves[1].split(":") : [];
14737
+ const missing = 8 - groups.length - rear.length;
14738
+ if (missing < 1) {
14739
+ return null;
14740
+ }
14741
+ groups.push(...new Array(missing).fill("0"), ...rear);
14742
+ }
14743
+ if (groups.length !== 8 || groups.some((group) => !IPV6_GROUP_RE.test(group))) {
14744
+ return null;
14745
+ }
14746
+ return groups.flatMap((group) => {
14747
+ const value = Number.parseInt(group, 16);
14748
+ return [value >> 8 & 255, value & 255];
14749
+ });
14750
+ };
14751
+ var ipToBytes = (host) => {
14752
+ if (typeof host !== "string" || !host) {
14753
+ return null;
14754
+ }
14755
+ return host.indexOf(":") !== -1 ? ipv6ToBytes(host) : ipv4ToBytes(host);
14756
+ };
14022
14757
  var normalizeNoProxyHost = (hostname) => {
14023
14758
  if (!hostname) {
14024
14759
  return hostname;
@@ -14026,7 +14761,102 @@ var normalizeNoProxyHost = (hostname) => {
14026
14761
  if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
14027
14762
  hostname = hostname.slice(1, -1);
14028
14763
  }
14029
- return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
14764
+ let trimmed = trimTrailingDots(hostname);
14765
+ if (trimmed.indexOf(":") !== -1) {
14766
+ try {
14767
+ trimmed = new URL("http://[" + trimmed + "]/").hostname.slice(1, -1);
14768
+ } catch (_err) {
14769
+ return trimmed;
14770
+ }
14771
+ } else if (/[\u0080-\uffff]/.test(trimmed)) {
14772
+ const prefix = /^[*.]+/.exec(trimmed);
14773
+ const start = prefix ? prefix[0] : "";
14774
+ const ascii = domainToASCII(trimmed.slice(start.length));
14775
+ if (!ascii) return "";
14776
+ trimmed = start + trimTrailingDots(ascii);
14777
+ }
14778
+ const ipv4 = normalizeIPAddress(trimmed);
14779
+ if (ipv4 !== trimmed) {
14780
+ return ipv4;
14781
+ }
14782
+ return unmapIPv4MappedIPv6(trimmed);
14783
+ };
14784
+ var normalizeCidrBase = (input) => {
14785
+ let base = input;
14786
+ const startsBracket = base.charAt(0) === "[";
14787
+ const endsBracket = base.charAt(base.length - 1) === "]";
14788
+ const hasBracket = base.includes("[") || base.includes("]");
14789
+ if (startsBracket || endsBracket) {
14790
+ if (!startsBracket || !endsBracket) {
14791
+ return null;
14792
+ }
14793
+ base = base.slice(1, -1);
14794
+ if (base.indexOf(":") === -1 || base.includes("[") || base.includes("]")) {
14795
+ return null;
14796
+ }
14797
+ } else if (hasBracket) {
14798
+ return null;
14799
+ }
14800
+ if (!base || base.charAt(base.length - 1) === ".") {
14801
+ return null;
14802
+ }
14803
+ const wasIPv6 = base.indexOf(":") !== -1;
14804
+ if (wasIPv6) {
14805
+ try {
14806
+ base = new URL(`http://[${base}]/`).hostname.slice(1, -1);
14807
+ } catch (_err) {
14808
+ return null;
14809
+ }
14810
+ } else {
14811
+ base = normalizeIPAddress(base);
14812
+ if (!ipv4ToBytes(base)) {
14813
+ return null;
14814
+ }
14815
+ }
14816
+ return { normalized: unmapIPv4MappedIPv6(base), wasIPv6 };
14817
+ };
14818
+ var CIDR_ENTRY_RE = /^(.+)\/(0|[1-9]\d{0,2})$/;
14819
+ var parseCidrEntry = (entry) => {
14820
+ if (entry.indexOf("/") === -1) {
14821
+ return void 0;
14822
+ }
14823
+ const match = CIDR_ENTRY_RE.exec(entry);
14824
+ if (!match) {
14825
+ return null;
14826
+ }
14827
+ let prefix = Number(match[2]);
14828
+ const parsedBase = normalizeCidrBase(match[1]);
14829
+ if (!parsedBase) {
14830
+ return null;
14831
+ }
14832
+ const { normalized, wasIPv6 } = parsedBase;
14833
+ if (wasIPv6 && normalized.indexOf(":") === -1) {
14834
+ if (prefix < 96) {
14835
+ return null;
14836
+ }
14837
+ prefix -= 96;
14838
+ }
14839
+ const bytes = ipToBytes(normalized);
14840
+ if (!bytes || prefix > bytes.length * 8) {
14841
+ return null;
14842
+ }
14843
+ return { bytes, prefix };
14844
+ };
14845
+ var isInSubnet = (addressBytes, networkBytes, prefix) => {
14846
+ const fullBytes = prefix >> 3;
14847
+ for (let i = 0; i < fullBytes; i++) {
14848
+ if (addressBytes[i] !== networkBytes[i]) {
14849
+ return false;
14850
+ }
14851
+ }
14852
+ const remainingBits = prefix & 7;
14853
+ if (remainingBits) {
14854
+ const mask = 255 << 8 - remainingBits & 255;
14855
+ if ((addressBytes[fullBytes] & mask) !== (networkBytes[fullBytes] & mask)) {
14856
+ return false;
14857
+ }
14858
+ }
14859
+ return true;
14030
14860
  };
14031
14861
  function shouldBypassProxy(location) {
14032
14862
  let parsed;
@@ -14044,10 +14874,18 @@ function shouldBypassProxy(location) {
14044
14874
  }
14045
14875
  const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS2[parsed.protocol.split(":", 1)[0]] || 0;
14046
14876
  const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
14877
+ const hostnameBytes = ipToBytes(hostname);
14047
14878
  return noProxy.split(/[\s,]+/).some((entry) => {
14048
14879
  if (!entry) {
14049
14880
  return false;
14050
14881
  }
14882
+ if (entry === "*") {
14883
+ return true;
14884
+ }
14885
+ const cidr = parseCidrEntry(entry);
14886
+ if (cidr !== void 0) {
14887
+ return cidr !== null && !!hostnameBytes && hostnameBytes.length === cidr.bytes.length && isInSubnet(hostnameBytes, cidr.bytes, cidr.prefix);
14888
+ }
14051
14889
  let [entryHost, entryPort] = parseNoProxyEntry(entry);
14052
14890
  entryHost = normalizeNoProxyHost(entryHost);
14053
14891
  if (!entryHost) {
@@ -14066,7 +14904,7 @@ function shouldBypassProxy(location) {
14066
14904
  });
14067
14905
  }
14068
14906
 
14069
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/speedometer.js
14907
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/speedometer.js
14070
14908
  function speedometer(samplesCount, min) {
14071
14909
  samplesCount = samplesCount || 10;
14072
14910
  const bytes = new Array(samplesCount);
@@ -14102,7 +14940,7 @@ function speedometer(samplesCount, min) {
14102
14940
  }
14103
14941
  var speedometer_default = speedometer;
14104
14942
 
14105
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/throttle.js
14943
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/throttle.js
14106
14944
  function throttle(fn, freq) {
14107
14945
  let timestamp = 0;
14108
14946
  let threshold = 1e3 / freq;
@@ -14133,21 +14971,22 @@ function throttle(fn, freq) {
14133
14971
  }
14134
14972
  };
14135
14973
  const flush = () => lastArgs && invoke(lastArgs);
14136
- return [throttled, flush];
14974
+ const flushWith = (...args) => invoke(args);
14975
+ return [throttled, flush, flushWith];
14137
14976
  }
14138
14977
  var throttle_default = throttle;
14139
14978
 
14140
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/progressEventReducer.js
14979
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/progressEventReducer.js
14141
14980
  var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
14142
14981
  let bytesNotified = 0;
14143
14982
  const _speedometer = speedometer_default(50, 250);
14144
14983
  return throttle_default((e) => {
14145
- if (!e || typeof e.loaded !== "number") {
14984
+ if (!e || !utils_default.isNumber(e.loaded)) {
14146
14985
  return;
14147
14986
  }
14148
14987
  const rawLoaded = e.loaded;
14149
14988
  const total = e.lengthComputable ? e.total : void 0;
14150
- const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
14989
+ const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
14151
14990
  const progressBytes = Math.max(0, loaded - bytesNotified);
14152
14991
  const rate = _speedometer(progressBytes);
14153
14992
  bytesNotified = Math.max(bytesNotified, loaded);
@@ -14176,63 +15015,103 @@ var progressEventDecorator = (total, throttled) => {
14176
15015
  throttled[1]
14177
15016
  ];
14178
15017
  };
14179
- var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
15018
+ var asyncDecorator = (fn, scheduler = utils_default.asap) => (...args) => scheduler(() => fn(...args));
14180
15019
 
14181
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
14182
- function estimateDataURLDecodedBytes(url2) {
15020
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
15021
+ var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
15022
+ var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
15023
+ var hexValue = (charCode) => charCode <= 57 ? charCode - 48 : (charCode & 223) - 55;
15024
+ var isBase64Char = (charCode) => charCode >= 65 && charCode <= 90 || // A-Z
15025
+ charCode >= 97 && charCode <= 122 || // a-z
15026
+ charCode >= 48 && charCode <= 57 || // 0-9
15027
+ charCode === 43 || // +
15028
+ charCode === 47 || // /
15029
+ charCode === 45 || // - (base64url)
15030
+ charCode === 95;
15031
+ var isBase64Whitespace = (charCode) => charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
15032
+ var base64Bytes = (significant) => {
15033
+ const groups = Math.floor(significant / 4);
15034
+ const remainder = significant % 4;
15035
+ return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
15036
+ };
15037
+ var estimateBase64BufferAllocation = (body) => {
15038
+ const len = body.length;
15039
+ let padding = 0;
15040
+ if (len > 0 && body.charCodeAt(len - 1) === 61) {
15041
+ padding++;
15042
+ if (len > 1 && body.charCodeAt(len - 2) === 61) {
15043
+ padding++;
15044
+ }
15045
+ }
15046
+ return Math.floor((len - padding) * 3 / 4);
15047
+ };
15048
+ var estimatePercentDecodedBase64BufferAllocation = (body) => {
15049
+ if (body.indexOf("%") === -1) {
15050
+ return estimateBase64BufferAllocation(body);
15051
+ }
15052
+ let length = 0;
15053
+ let previous = 0;
15054
+ let last = 0;
15055
+ for (let i = 0, len = body.length; i < len; i++) {
15056
+ let code = body.charCodeAt(i);
15057
+ if (code === 37 && isPercentEncodedByte(body, i, len)) {
15058
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
15059
+ i += 2;
15060
+ }
15061
+ length++;
15062
+ previous = last;
15063
+ last = code;
15064
+ }
15065
+ const padding = last === 61 ? previous === 61 ? 2 : 1 : 0;
15066
+ return Math.floor((length - padding) * 3 / 4);
15067
+ };
15068
+ var estimatePercentDecodedBase64Bytes = (body) => {
15069
+ const len = body.length;
15070
+ let significant = 0;
15071
+ let padding = 0;
15072
+ let invalid = false;
15073
+ for (let i = 0; i < len; i++) {
15074
+ let code = body.charCodeAt(i);
15075
+ if (code === 37 && isPercentEncodedByte(body, i, len)) {
15076
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
15077
+ i += 2;
15078
+ }
15079
+ if (isBase64Whitespace(code)) {
15080
+ continue;
15081
+ }
15082
+ if (code === 61) {
15083
+ padding++;
15084
+ continue;
15085
+ }
15086
+ if (!isBase64Char(code) || padding > 0) {
15087
+ invalid = true;
15088
+ continue;
15089
+ }
15090
+ significant++;
15091
+ }
15092
+ if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) {
15093
+ return estimateBase64BufferAllocation(body);
15094
+ }
15095
+ return base64Bytes(significant);
15096
+ };
15097
+ var estimateDataURLBytes = (url2, estimateBase64, base64Pattern) => {
14183
15098
  if (!url2 || typeof url2 !== "string") return 0;
14184
- if (!url2.startsWith("data:")) return 0;
15099
+ if (!/^data:/i.test(url2)) return 0;
14185
15100
  const comma = url2.indexOf(",");
14186
15101
  if (comma < 0) return 0;
14187
15102
  const meta = url2.slice(5, comma);
14188
15103
  const body = url2.slice(comma + 1);
14189
- const isBase64 = /;base64/i.test(meta);
15104
+ const isBase64 = base64Pattern.test(meta);
14190
15105
  if (isBase64) {
14191
- let effectiveLen = body.length;
14192
- const len = body.length;
14193
- for (let i = 0; i < len; i++) {
14194
- if (body.charCodeAt(i) === 37 && i + 2 < len) {
14195
- const a = body.charCodeAt(i + 1);
14196
- const b = body.charCodeAt(i + 2);
14197
- const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102);
14198
- if (isHex) {
14199
- effectiveLen -= 2;
14200
- i += 2;
14201
- }
14202
- }
14203
- }
14204
- let pad = 0;
14205
- let idx = len - 1;
14206
- const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && // '%'
14207
- body.charCodeAt(j - 1) === 51 && // '3'
14208
- (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
14209
- if (idx >= 0) {
14210
- if (body.charCodeAt(idx) === 61) {
14211
- pad++;
14212
- idx--;
14213
- } else if (tailIsPct3D(idx)) {
14214
- pad++;
14215
- idx -= 3;
14216
- }
14217
- }
14218
- if (pad === 1 && idx >= 0) {
14219
- if (body.charCodeAt(idx) === 61) {
14220
- pad++;
14221
- } else if (tailIsPct3D(idx)) {
14222
- pad++;
14223
- }
14224
- }
14225
- const groups = Math.floor(effectiveLen / 4);
14226
- const bytes2 = groups * 3 - (pad || 0);
14227
- return bytes2 > 0 ? bytes2 : 0;
14228
- }
14229
- if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
14230
- return Buffer.byteLength(body, "utf8");
15106
+ return estimateBase64(body);
14231
15107
  }
14232
15108
  let bytes = 0;
14233
15109
  for (let i = 0, len = body.length; i < len; i++) {
14234
15110
  const c = body.charCodeAt(i);
14235
- if (c < 128) {
15111
+ if (c === 37 && isPercentEncodedByte(body, i, len)) {
15112
+ bytes += 1;
15113
+ i += 2;
15114
+ } else if (c < 128) {
14236
15115
  bytes += 1;
14237
15116
  } else if (c < 2048) {
14238
15117
  bytes += 2;
@@ -14249,9 +15128,20 @@ function estimateDataURLDecodedBytes(url2) {
14249
15128
  }
14250
15129
  }
14251
15130
  return bytes;
15131
+ };
15132
+ function estimateDataURLDecodedBytes(url2) {
15133
+ const fragmentIndex = typeof url2 === "string" ? url2.indexOf("#") : -1;
15134
+ return estimateDataURLBytes(
15135
+ fragmentIndex === -1 ? url2 : url2.slice(0, fragmentIndex),
15136
+ estimatePercentDecodedBase64Bytes,
15137
+ /; *base64[\t\n\f\r ]*$/i
15138
+ );
15139
+ }
15140
+ function estimateDataURLBufferAllocation(url2) {
15141
+ return estimateDataURLBytes(url2, estimatePercentDecodedBase64BufferAllocation, /;base64$/i);
14252
15142
  }
14253
15143
 
14254
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/adapters/http.js
15144
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
14255
15145
  var zlibOptions = {
14256
15146
  flush: zlib.constants.Z_SYNC_FLUSH,
14257
15147
  finishFlush: zlib.constants.Z_SYNC_FLUSH
@@ -14260,26 +15150,112 @@ var brotliOptions = {
14260
15150
  flush: zlib.constants.BROTLI_OPERATION_FLUSH,
14261
15151
  finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
14262
15152
  };
15153
+ var zstdOptions = {
15154
+ flush: zlib.constants.ZSTD_e_flush,
15155
+ finishFlush: zlib.constants.ZSTD_e_flush
15156
+ };
14263
15157
  var isBrotliSupported = utils_default.isFunction(zlib.createBrotliDecompress);
15158
+ var isZstdSupported = utils_default.isFunction(zlib.createZstdDecompress);
15159
+ var ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : "");
15160
+ var ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : "");
15161
+ var scheduleProgress = typeof process !== "undefined" && process.nextTick ? process.nextTick.bind(process) : utils_default.asap;
14264
15162
  var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
14265
15163
  var isHttps = /https:?/;
14266
- var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
14267
- function setFormDataHeaders(headers, formHeaders, policy) {
14268
- if (policy !== "content-only") {
14269
- headers.set(formHeaders);
14270
- return;
14271
- }
14272
- Object.entries(formHeaders).forEach(([key, val]) => {
14273
- if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
14274
- headers.set(key, val);
14275
- }
14276
- });
14277
- }
14278
15164
  var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
14279
15165
  var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
15166
+ function handleSocketError(err) {
15167
+ const current = this[kAxiosCurrentReq];
15168
+ if (current && !current.destroyed) {
15169
+ current.destroy(err);
15170
+ }
15171
+ }
14280
15172
  var kAxiosInstalledTunnel = /* @__PURE__ */ Symbol("axios.http.installedTunnel");
14281
15173
  var tunnelingAgentCache = /* @__PURE__ */ new Map();
14282
15174
  var tunnelingAgentCacheUser = /* @__PURE__ */ new WeakMap();
15175
+ var directAgents = /* @__PURE__ */ new WeakMap();
15176
+ var directAgentHooks = ["createConnection", "getName"];
15177
+ var nativeAgentPoolHooks = [
15178
+ "addRequest",
15179
+ "createSocket",
15180
+ "removeSocket",
15181
+ "keepSocketAlive",
15182
+ "reuseSocket",
15183
+ "_getSession",
15184
+ "_cacheSession",
15185
+ "_evictSession"
15186
+ ];
15187
+ var NODE_NATIVE_ENV_PROXY_SUPPORT = {
15188
+ 22: 21,
15189
+ 24: 5
15190
+ };
15191
+ function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) {
15192
+ if (!nodeVersion) {
15193
+ return false;
15194
+ }
15195
+ const [major, minor] = nodeVersion.split(".").map((part) => Number(part));
15196
+ if (!Number.isInteger(major) || !Number.isInteger(minor)) {
15197
+ return false;
15198
+ }
15199
+ if (major > 24) {
15200
+ return true;
15201
+ }
15202
+ return NODE_NATIVE_ENV_PROXY_SUPPORT[major] != null && minor >= NODE_NATIVE_ENV_PROXY_SUPPORT[major];
15203
+ }
15204
+ function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) {
15205
+ if (!isNodeNativeEnvProxySupported(nodeVersion)) {
15206
+ return false;
15207
+ }
15208
+ const agentOptions = agent && agent.options;
15209
+ return Boolean(
15210
+ agentOptions && utils_default.hasOwnProp(agentOptions, "proxyEnv") && agentOptions.proxyEnv != null
15211
+ );
15212
+ }
15213
+ function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
15214
+ return isHttps.test(options.protocol) ? configHttpsAgent || https.globalAgent : configHttpAgent || http.globalAgent;
15215
+ }
15216
+ function getDirectAgent(configuredAgent, transport) {
15217
+ if (!process.allowedNodeEnvironmentFlags || !process.allowedNodeEnvironmentFlags.has("--use-env-proxy")) {
15218
+ return configuredAgent;
15219
+ }
15220
+ const agent = configuredAgent || transport.globalAgent;
15221
+ const options = agent && agent.options;
15222
+ if (!(agent instanceof transport.Agent) || agent.protocol !== transport.globalAgent.protocol || !options || !utils_default.hasOwnProp(options, "proxyEnv") || typeof options.proxyEnv !== "object" || options.proxyEnv === null) {
15223
+ return configuredAgent;
15224
+ }
15225
+ for (const hook of nativeAgentPoolHooks) {
15226
+ if (utils_default.isFunction(transport.Agent.prototype[hook]) && agent[hook] !== transport.Agent.prototype[hook]) {
15227
+ throw new AxiosError_default(
15228
+ "proxy: false cannot adapt an agent overriding " + hook + "; use an agent constructed without proxyEnv",
15229
+ AxiosError_default.ERR_BAD_OPTION_VALUE
15230
+ );
15231
+ }
15232
+ }
15233
+ let direct = directAgents.get(agent);
15234
+ if (!direct) {
15235
+ direct = new transport.Agent({ ...options, proxyEnv: void 0 });
15236
+ const destroy = agent.destroy;
15237
+ agent.destroy = function destroyWithDirectAgent() {
15238
+ try {
15239
+ return destroy.apply(this, arguments);
15240
+ } finally {
15241
+ direct.destroy();
15242
+ }
15243
+ };
15244
+ directAgents.set(agent, direct);
15245
+ }
15246
+ for (const hook of directAgentHooks) {
15247
+ direct[hook] = agent[hook] === transport.Agent.prototype[hook] ? transport.Agent.prototype[hook] : bind(agent[hook], agent);
15248
+ }
15249
+ return direct;
15250
+ }
15251
+ function setDirectAgent(options, configHttpAgent, configHttpsAgent) {
15252
+ const secure = isHttps.test(options.protocol);
15253
+ const agent = getDirectAgent(secure ? configHttpsAgent : configHttpAgent, secure ? https : http);
15254
+ options.agent = agent;
15255
+ if (options.agents) {
15256
+ options.agents[secure ? "https" : "http"] = agent;
15257
+ }
15258
+ }
14283
15259
  function getTunnelingAgent(agentOptions, userHttpsAgent) {
14284
15260
  const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
14285
15261
  const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
@@ -14287,6 +15263,12 @@ function getTunnelingAgent(agentOptions, userHttpsAgent) {
14287
15263
  if (agent) return agent;
14288
15264
  const merged = userHttpsAgent && userHttpsAgent.options ? { ...userHttpsAgent.options, ...agentOptions } : agentOptions;
14289
15265
  agent = new import_https_proxy_agent.default(merged);
15266
+ const callback = agent.callback;
15267
+ agent.callback = function axiosTunnelingAgentCallback(req, opts) {
15268
+ const originTLSAgent = userHttpsAgent || https.globalAgent;
15269
+ const originTLSOptions = originTLSAgent && originTLSAgent.options;
15270
+ return callback.call(this, req, { ...originTLSOptions, ...opts });
15271
+ };
14290
15272
  agent[kAxiosInstalledTunnel] = true;
14291
15273
  cache.set(key, agent);
14292
15274
  return agent;
@@ -14308,90 +15290,52 @@ var flushOnFinish = (stream4, [throttled, flush]) => {
14308
15290
  stream4.on("end", flush).on("error", flush);
14309
15291
  return throttled;
14310
15292
  };
14311
- var Http2Sessions = class {
14312
- constructor() {
14313
- this.sessions = /* @__PURE__ */ Object.create(null);
14314
- }
14315
- getSession(authority, options) {
14316
- options = Object.assign(
14317
- {
14318
- sessionTimeout: 1e3
14319
- },
14320
- options
14321
- );
14322
- let authoritySessions = this.sessions[authority];
14323
- if (authoritySessions) {
14324
- let len = authoritySessions.length;
14325
- for (let i = 0; i < len; i++) {
14326
- const [sessionHandle, sessionOptions] = authoritySessions[i];
14327
- if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
14328
- return sessionHandle;
14329
- }
14330
- }
14331
- }
14332
- const session = http2.connect(authority, options);
14333
- let removed;
14334
- const removeSession = () => {
14335
- if (removed) {
14336
- return;
14337
- }
14338
- removed = true;
14339
- let entries = authoritySessions, len = entries.length, i = len;
14340
- while (i--) {
14341
- if (entries[i][0] === session) {
14342
- if (len === 1) {
14343
- delete this.sessions[authority];
14344
- } else {
14345
- entries.splice(i, 1);
14346
- }
14347
- if (!session.closed) {
14348
- session.close();
14349
- }
14350
- return;
14351
- }
14352
- }
14353
- };
14354
- const originalRequestFn = session.request;
14355
- const { sessionTimeout } = options;
14356
- if (sessionTimeout != null) {
14357
- let timer;
14358
- let streamsCount = 0;
14359
- session.request = function() {
14360
- const stream4 = originalRequestFn.apply(this, arguments);
14361
- streamsCount++;
14362
- if (timer) {
14363
- clearTimeout(timer);
14364
- timer = null;
14365
- }
14366
- stream4.once("close", () => {
14367
- if (!--streamsCount) {
14368
- timer = setTimeout(() => {
14369
- timer = null;
14370
- removeSession();
14371
- }, sessionTimeout);
14372
- }
14373
- });
14374
- return stream4;
14375
- };
14376
- }
14377
- session.once("close", removeSession);
14378
- let entry = [session, options];
14379
- authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
14380
- return session;
14381
- }
14382
- };
14383
- var http2Sessions = new Http2Sessions();
15293
+ var http2Sessions = new Http2Sessions_default();
14384
15294
  function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
15295
+ if (!isSameOriginRedirect(options, requestDetails)) {
15296
+ stripMatchingHeaders(options.headers, /* @__PURE__ */ new Set(["authorization", "cookie"]));
15297
+ delete options.auth;
15298
+ }
14385
15299
  if (options.beforeRedirects.proxy) {
14386
15300
  options.beforeRedirects.proxy(options);
14387
15301
  }
15302
+ if (options.beforeRedirects.auth) {
15303
+ options.beforeRedirects.auth(options);
15304
+ }
15305
+ if (options.beforeRedirects.sensitiveHeaders) {
15306
+ options.beforeRedirects.sensitiveHeaders(options, requestDetails);
15307
+ }
15308
+ if (options.beforeRedirects.direct) {
15309
+ options.beforeRedirects.direct(options);
15310
+ }
14388
15311
  if (options.beforeRedirects.config) {
14389
15312
  options.beforeRedirects.config(options, responseDetails, requestDetails);
14390
15313
  }
14391
15314
  }
14392
- function setProxy(options, configProxy, location, isRedirect, configHttpsAgent) {
15315
+ function stripMatchingHeaders(headers, sensitiveSet) {
15316
+ if (!headers) {
15317
+ return;
15318
+ }
15319
+ Object.keys(headers).forEach((header) => {
15320
+ if (sensitiveSet.has(header.toLowerCase())) {
15321
+ delete headers[header];
15322
+ }
15323
+ });
15324
+ }
15325
+ function isSameOriginRedirect(redirectOptions, requestDetails) {
15326
+ if (!requestDetails) {
15327
+ return false;
15328
+ }
15329
+ try {
15330
+ return new URL(requestDetails.url).origin === new URL(redirectOptions.href).origin;
15331
+ } catch (e) {
15332
+ return false;
15333
+ }
15334
+ }
15335
+ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent, allowEnvProxy = true) {
14393
15336
  let proxy = configProxy;
14394
- if (!proxy && proxy !== false) {
15337
+ const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
15338
+ if (!proxy && proxy !== false && allowEnvProxy && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
14395
15339
  const proxyUrl = getProxyForUrl(location);
14396
15340
  if (proxyUrl) {
14397
15341
  if (!shouldBypassProxy(location)) {
@@ -14409,6 +15353,9 @@ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent)
14409
15353
  if (isRedirect && options.agent && options.agent[kAxiosInstalledTunnel]) {
14410
15354
  options.agent = void 0;
14411
15355
  }
15356
+ if (isRedirect && options.agents && options.agents.https && options.agents.https[kAxiosInstalledTunnel]) {
15357
+ options.agents.https = configHttpsAgent;
15358
+ }
14412
15359
  if (proxy) {
14413
15360
  const isProxyURL = proxy instanceof URL;
14414
15361
  const readProxyField = (key) => isProxyURL || utils_default.hasOwnProp(proxy, key) ? proxy[key] : void 0;
@@ -14482,8 +15429,19 @@ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent)
14482
15429
  }
14483
15430
  }
14484
15431
  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
14485
- setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent);
15432
+ setProxy(
15433
+ redirectOptions,
15434
+ configProxy,
15435
+ redirectOptions.href,
15436
+ true,
15437
+ configHttpsAgent,
15438
+ configHttpAgent,
15439
+ allowEnvProxy
15440
+ );
14486
15441
  };
15442
+ return Boolean(
15443
+ proxy || configProxy !== false && allowEnvProxy && isNodeEnvProxyEnabled(proxyEnvAgent)
15444
+ );
14487
15445
  }
14488
15446
  var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
14489
15447
  var wrapAsync = (asyncExecutor) => {
@@ -14508,7 +15466,7 @@ var wrapAsync = (asyncExecutor) => {
14508
15466
  };
14509
15467
  var resolveFamily = ({ address, family }) => {
14510
15468
  if (!utils_default.isString(address)) {
14511
- throw TypeError("address must be a string");
15469
+ throw new AxiosError_default("address must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE);
14512
15470
  }
14513
15471
  return {
14514
15472
  address,
@@ -14516,12 +15474,36 @@ var resolveFamily = ({ address, family }) => {
14516
15474
  };
14517
15475
  };
14518
15476
  var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
15477
+ var normalizedLookupCache = /* @__PURE__ */ new WeakMap();
15478
+ var normalizeLookup = (lookup) => {
15479
+ let normalized = normalizedLookupCache.get(lookup);
15480
+ if (normalized) {
15481
+ return normalized;
15482
+ }
15483
+ const callbackLookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
15484
+ normalized = (hostname, opt, cb) => {
15485
+ callbackLookup(hostname, opt, (err, arg0, arg1) => {
15486
+ if (err) {
15487
+ return cb(err);
15488
+ }
15489
+ let addresses;
15490
+ try {
15491
+ addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
15492
+ } catch (error) {
15493
+ return cb(error);
15494
+ }
15495
+ opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
15496
+ });
15497
+ };
15498
+ normalizedLookupCache.set(lookup, normalized);
15499
+ return normalized;
15500
+ };
14519
15501
  var http2Transport = {
14520
15502
  request(options, cb) {
14521
15503
  const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
14522
15504
  const { http2Options, headers } = options;
14523
15505
  const session = http2Sessions.getSession(authority, http2Options);
14524
- const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http2.constants;
15506
+ const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http22.constants;
14525
15507
  const http2Headers = {
14526
15508
  [HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
14527
15509
  [HTTP2_HEADER_METHOD]: options.method,
@@ -14545,39 +15527,56 @@ var http2Transport = {
14545
15527
  };
14546
15528
  var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14547
15529
  return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
14548
- const own2 = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0;
15530
+ const own2 = (key) => utils_default.getSafeProp(config, key);
15531
+ const transitional2 = own2("transitional") || transitional_default;
14549
15532
  let data = own2("data");
14550
15533
  let lookup = own2("lookup");
14551
15534
  let family = own2("family");
14552
15535
  let httpVersion = own2("httpVersion");
14553
15536
  if (httpVersion === void 0) httpVersion = 1;
15537
+ const rawHttpVersion = httpVersion;
14554
15538
  let http2Options = own2("http2Options");
15539
+ const configProxy = own2("proxy");
15540
+ const httpAgent = own2("httpAgent");
15541
+ const httpsAgent = own2("httpsAgent");
14555
15542
  const responseType = own2("responseType");
14556
15543
  const responseEncoding = own2("responseEncoding");
14557
- const method = config.method.toUpperCase();
15544
+ const socketPath = own2("socketPath");
15545
+ const method = own2("method").toUpperCase();
15546
+ const maxRedirects = own2("maxRedirects");
15547
+ const maxBodyLength = own2("maxBodyLength");
15548
+ const maxContentLength = own2("maxContentLength");
15549
+ const decompress = own2("decompress");
14558
15550
  let isDone;
14559
15551
  let rejected = false;
14560
15552
  let req;
14561
15553
  let connectPhaseTimer;
14562
- httpVersion = +httpVersion;
15554
+ try {
15555
+ httpVersion = +httpVersion;
15556
+ } catch (err) {
15557
+ throw new AxiosError_default(
15558
+ "Invalid protocol version: value is not a number",
15559
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
15560
+ config
15561
+ );
15562
+ }
14563
15563
  if (Number.isNaN(httpVersion)) {
14564
- throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
15564
+ throw new AxiosError_default(
15565
+ `Invalid protocol version: '${rawHttpVersion}' is not a number`,
15566
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
15567
+ config
15568
+ );
14565
15569
  }
14566
15570
  if (httpVersion !== 1 && httpVersion !== 2) {
14567
- throw TypeError(`Unsupported protocol version '${httpVersion}'`);
15571
+ throw new AxiosError_default(
15572
+ `Unsupported protocol version '${httpVersion}'`,
15573
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
15574
+ config
15575
+ );
14568
15576
  }
14569
15577
  const isHttp2 = httpVersion === 2;
14570
15578
  if (lookup) {
14571
- const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
14572
- lookup = (hostname, opt, cb) => {
14573
- _lookup(hostname, opt, (err, arg0, arg1) => {
14574
- if (err) {
14575
- return cb(err);
14576
- }
14577
- const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
14578
- opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
14579
- });
14580
- };
15579
+ lookup = normalizeLookup(lookup);
14581
15580
  }
14582
15581
  const abortEmitter = new EventEmitter();
14583
15582
  function abort(reason) {
@@ -14587,7 +15586,6 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14587
15586
  !reason || reason.type ? new CanceledError_default(null, config, req) : reason
14588
15587
  );
14589
15588
  } catch (err) {
14590
- console.warn("emit error", err);
14591
15589
  }
14592
15590
  }
14593
15591
  function clearConnectPhaseTimer() {
@@ -14597,10 +15595,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14597
15595
  }
14598
15596
  }
14599
15597
  function createTimeoutError() {
14600
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
14601
- const transitional2 = config.transitional || transitional_default;
14602
- if (config.timeoutErrorMessage) {
14603
- timeoutErrorMessage = config.timeoutErrorMessage;
15598
+ const configTimeout = own2("timeout");
15599
+ let timeoutErrorMessage = configTimeout ? "timeout of " + configTimeout + "ms exceeded" : "timeout exceeded";
15600
+ const configTimeoutErrorMessage = own2("timeoutErrorMessage");
15601
+ if (configTimeoutErrorMessage) {
15602
+ timeoutErrorMessage = configTimeoutErrorMessage;
14604
15603
  }
14605
15604
  return new AxiosError_default(
14606
15605
  timeoutErrorMessage,
@@ -14644,17 +15643,18 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14644
15643
  onFinished();
14645
15644
  }
14646
15645
  });
14647
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
14648
- const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
15646
+ const fullPath = buildFullPath(own2("baseURL"), own2("url"), own2("allowAbsoluteUrls"), config);
15647
+ const urlBase = socketPath ? "http://localhost" : platform_default.hasBrowserEnv ? platform_default.origin : void 0;
15648
+ const parsed = new URL(fullPath, urlBase);
14649
15649
  const protocol = parsed.protocol || supportedProtocols[0];
14650
15650
  if (protocol === "data:") {
14651
- if (config.maxContentLength > -1) {
14652
- const dataUrl = String(config.url || fullPath || "");
14653
- const estimated = estimateDataURLDecodedBytes(dataUrl);
14654
- if (estimated > config.maxContentLength) {
15651
+ if (maxContentLength > -1) {
15652
+ const dataUrl = String(own2("url") || fullPath || "");
15653
+ const estimated = estimateDataURLBufferAllocation(dataUrl);
15654
+ if (estimated > maxContentLength) {
14655
15655
  return reject(
14656
15656
  new AxiosError_default(
14657
- "maxContentLength size of " + config.maxContentLength + " exceeded",
15657
+ "maxContentLength size of " + maxContentLength + " exceeded",
14658
15658
  AxiosError_default.ERR_BAD_RESPONSE,
14659
15659
  config
14660
15660
  )
@@ -14671,12 +15671,21 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14671
15671
  });
14672
15672
  }
14673
15673
  try {
14674
- convertedData = fromDataURI(config.url, responseType === "blob", {
15674
+ convertedData = fromDataURI(own2("url"), responseType === "blob", {
14675
15675
  Blob: config.env && config.env.Blob
14676
15676
  });
14677
15677
  } catch (err) {
14678
15678
  throw AxiosError_default.from(err, AxiosError_default.ERR_BAD_REQUEST, config);
14679
15679
  }
15680
+ if (maxContentLength > -1 && (responseType === "blob" ? convertedData.size : convertedData.length) > maxContentLength) {
15681
+ return reject(
15682
+ new AxiosError_default(
15683
+ "maxContentLength size of " + maxContentLength + " exceeded",
15684
+ AxiosError_default.ERR_BAD_RESPONSE,
15685
+ config
15686
+ )
15687
+ );
15688
+ }
14680
15689
  if (responseType === "text") {
14681
15690
  convertedData = convertedData.toString(responseEncoding);
14682
15691
  if (!responseEncoding || responseEncoding === "utf8") {
@@ -14720,7 +15729,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14720
15729
  setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
14721
15730
  if (!headers.hasContentLength()) {
14722
15731
  try {
14723
- const knownLength = await util2.promisify(data.getLength).call(data);
15732
+ const knownLength = await util3.promisify(data.getLength).call(data);
14724
15733
  Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
14725
15734
  } catch (e) {
14726
15735
  }
@@ -14745,7 +15754,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14745
15754
  );
14746
15755
  }
14747
15756
  headers.setContentLength(data.length, false);
14748
- if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
15757
+ if (maxBodyLength > -1 && data.length > maxBodyLength) {
14749
15758
  return reject(
14750
15759
  new AxiosError_default(
14751
15760
  "Request body larger than maxBodyLength limit",
@@ -14781,7 +15790,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14781
15790
  data,
14782
15791
  progressEventDecorator(
14783
15792
  contentLength,
14784
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
15793
+ progressEventReducer(asyncDecorator(onUploadProgress, scheduleProgress), false, 3)
14785
15794
  )
14786
15795
  )
14787
15796
  );
@@ -14789,11 +15798,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14789
15798
  let auth = void 0;
14790
15799
  const configAuth = own2("auth");
14791
15800
  if (configAuth) {
14792
- const username = configAuth.username || "";
14793
- const password = configAuth.password || "";
15801
+ const username = utils_default.getSafeProp(configAuth, "username") || "";
15802
+ const password = utils_default.getSafeProp(configAuth, "password") || "";
14794
15803
  auth = username + ":" + password;
14795
15804
  }
14796
- if (!auth && parsed.username) {
15805
+ if (!auth && (parsed.username || parsed.password)) {
14797
15806
  const urlUsername = decodeURIComponentSafe(parsed.username);
14798
15807
  const urlPassword = decodeURIComponentSafe(parsed.password);
14799
15808
  auth = urlUsername + ":" + urlPassword;
@@ -14803,96 +15812,168 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14803
15812
  try {
14804
15813
  path = buildURL(
14805
15814
  parsed.pathname + parsed.search,
14806
- config.params,
14807
- config.paramsSerializer
15815
+ own2("params"),
15816
+ own2("paramsSerializer")
14808
15817
  ).replace(/^\?/, "");
14809
15818
  } catch (err) {
14810
- const customErr = new Error(err.message);
14811
- customErr.config = config;
14812
- customErr.url = config.url;
14813
- customErr.exists = true;
14814
- return reject(customErr);
15819
+ return reject(
15820
+ AxiosError_default.from(err, AxiosError_default.ERR_BAD_REQUEST, config, null, null, {
15821
+ url: own2("url"),
15822
+ exists: true
15823
+ })
15824
+ );
14815
15825
  }
14816
15826
  headers.set(
14817
15827
  "Accept-Encoding",
14818
- "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""),
15828
+ utils_default.hasOwnProp(transitional2, "advertiseZstdAcceptEncoding") && transitional2.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING,
14819
15829
  false
14820
15830
  );
15831
+ if (isHttp2 && lookup) {
15832
+ http2Options = Object.assign(/* @__PURE__ */ Object.create(null), http2Options, { lookup });
15833
+ }
14821
15834
  const options = Object.assign(/* @__PURE__ */ Object.create(null), {
14822
15835
  path,
14823
15836
  method,
14824
15837
  headers: toByteStringHeaderObject(headers),
14825
- agents: { http: config.httpAgent, https: config.httpsAgent },
15838
+ agents: { http: httpAgent, https: httpsAgent },
14826
15839
  auth,
14827
15840
  protocol,
14828
15841
  family,
14829
15842
  beforeRedirect: dispatchBeforeRedirect,
14830
15843
  beforeRedirects: /* @__PURE__ */ Object.create(null),
14831
- http2Options
15844
+ http2Options,
15845
+ createConnection: void 0
14832
15846
  });
14833
15847
  !utils_default.isUndefined(lookup) && (options.lookup = lookup);
14834
- if (config.socketPath) {
14835
- if (typeof config.socketPath !== "string") {
15848
+ let proxyApplied = false;
15849
+ if (socketPath) {
15850
+ if (typeof socketPath !== "string") {
14836
15851
  return reject(
14837
15852
  new AxiosError_default("socketPath must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE, config)
14838
15853
  );
14839
15854
  }
14840
- if (config.allowedSocketPaths != null) {
14841
- const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
14842
- const resolvedSocket = resolvePath(config.socketPath);
15855
+ const allowedSocketPaths = own2("allowedSocketPaths");
15856
+ if (allowedSocketPaths != null) {
15857
+ const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
15858
+ const resolvedSocket = resolvePath(socketPath);
14843
15859
  const isAllowed = allowed.some(
14844
15860
  (entry) => typeof entry === "string" && resolvePath(entry) === resolvedSocket
14845
15861
  );
14846
15862
  if (!isAllowed) {
14847
15863
  return reject(
14848
15864
  new AxiosError_default(
14849
- `socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`,
15865
+ `socketPath "${socketPath}" is not permitted by allowedSocketPaths`,
14850
15866
  AxiosError_default.ERR_BAD_OPTION_VALUE,
14851
15867
  config
14852
15868
  )
14853
15869
  );
14854
15870
  }
14855
15871
  }
14856
- options.socketPath = config.socketPath;
15872
+ options.socketPath = socketPath;
14857
15873
  } else {
14858
15874
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
14859
15875
  options.port = parsed.port;
14860
- setProxy(
15876
+ proxyApplied = setProxy(
14861
15877
  options,
14862
- config.proxy,
15878
+ configProxy,
14863
15879
  protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path,
14864
15880
  false,
14865
- config.httpsAgent
15881
+ httpsAgent,
15882
+ httpAgent,
15883
+ // The HTTP/2 transport connects independently of HTTP/1 agents, so it
15884
+ // cannot apply either axios-resolved or agent-local environment proxies.
15885
+ // Explicit proxy config is still processed and rejected below.
15886
+ !isHttp2
14866
15887
  );
14867
15888
  }
14868
15889
  let transport;
14869
15890
  let isNativeTransport = false;
14870
15891
  const isHttpsRequest = isHttps.test(options.protocol);
14871
- if (options.agent == null) {
14872
- options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
15892
+ if (!isHttp2 && configProxy === false) {
15893
+ setDirectAgent(options, httpAgent, httpsAgent);
15894
+ options.beforeRedirects.direct = (redirectOptions) => {
15895
+ setDirectAgent(redirectOptions, httpAgent, httpsAgent);
15896
+ };
15897
+ } else if (options.agent == null) {
15898
+ options.agent = isHttpsRequest ? httpsAgent : httpAgent;
14873
15899
  }
14874
15900
  if (isHttp2) {
15901
+ if (proxyApplied) {
15902
+ return reject(
15903
+ new AxiosError_default(
15904
+ "HTTP/2 requests with a proxy are not supported",
15905
+ AxiosError_default.ERR_NOT_SUPPORT,
15906
+ config
15907
+ )
15908
+ );
15909
+ }
14875
15910
  transport = http2Transport;
14876
15911
  } else {
14877
15912
  const configTransport = own2("transport");
14878
15913
  if (configTransport) {
14879
15914
  transport = configTransport;
14880
- } else if (config.maxRedirects === 0) {
15915
+ } else if (maxRedirects === 0) {
14881
15916
  transport = isHttpsRequest ? https : http;
14882
15917
  isNativeTransport = true;
14883
15918
  } else {
14884
- if (config.maxRedirects) {
14885
- options.maxRedirects = config.maxRedirects;
15919
+ options.sensitiveHeaders = [];
15920
+ if (maxRedirects) {
15921
+ options.maxRedirects = maxRedirects;
14886
15922
  }
14887
15923
  const configBeforeRedirect = own2("beforeRedirect");
14888
15924
  if (configBeforeRedirect) {
14889
15925
  options.beforeRedirects.config = configBeforeRedirect;
14890
15926
  }
15927
+ if (auth) {
15928
+ const requestOrigin = parsed.origin;
15929
+ const authToRestore = auth;
15930
+ options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) {
15931
+ try {
15932
+ if (new URL(redirectOptions.href).origin === requestOrigin) {
15933
+ redirectOptions.auth = authToRestore;
15934
+ }
15935
+ } catch (e) {
15936
+ }
15937
+ };
15938
+ }
15939
+ const sensitiveHeaders = own2("sensitiveHeaders");
15940
+ if (sensitiveHeaders != null) {
15941
+ if (!utils_default.isArray(sensitiveHeaders)) {
15942
+ return reject(
15943
+ new AxiosError_default(
15944
+ "sensitiveHeaders must be an array of strings",
15945
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
15946
+ config
15947
+ )
15948
+ );
15949
+ }
15950
+ const sensitiveSet = /* @__PURE__ */ new Set();
15951
+ for (const header of sensitiveHeaders) {
15952
+ if (!utils_default.isString(header)) {
15953
+ return reject(
15954
+ new AxiosError_default(
15955
+ "sensitiveHeaders must be an array of strings",
15956
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
15957
+ config
15958
+ )
15959
+ );
15960
+ }
15961
+ sensitiveSet.add(header.toLowerCase());
15962
+ }
15963
+ if (sensitiveSet.size) {
15964
+ options.sensitiveHeaders = Array.from(sensitiveSet);
15965
+ options.beforeRedirects.sensitiveHeaders = function beforeRedirectSensitiveHeaders(redirectOptions, requestDetails) {
15966
+ if (!isSameOriginRedirect(redirectOptions, requestDetails)) {
15967
+ stripMatchingHeaders(redirectOptions.headers, sensitiveSet);
15968
+ }
15969
+ };
15970
+ }
15971
+ }
14891
15972
  transport = isHttpsRequest ? httpsFollow : httpFollow;
14892
15973
  }
14893
15974
  }
14894
- if (config.maxBodyLength > -1) {
14895
- options.maxBodyLength = config.maxBodyLength;
15975
+ if (maxBodyLength > -1) {
15976
+ options.maxBodyLength = maxBodyLength;
14896
15977
  } else {
14897
15978
  options.maxBodyLength = Infinity;
14898
15979
  }
@@ -14912,7 +15993,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14912
15993
  transformStream,
14913
15994
  progressEventDecorator(
14914
15995
  responseLength,
14915
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
15996
+ progressEventReducer(
15997
+ asyncDecorator(onDownloadProgress, scheduleProgress),
15998
+ true,
15999
+ 3
16000
+ )
14916
16001
  )
14917
16002
  )
14918
16003
  );
@@ -14920,7 +16005,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14920
16005
  }
14921
16006
  let responseStream = res;
14922
16007
  const lastRequest = res.req || req;
14923
- if (config.decompress !== false && res.headers["content-encoding"]) {
16008
+ if (decompress !== false && res.headers["content-encoding"]) {
14924
16009
  if (method === "HEAD" || res.statusCode === 204) {
14925
16010
  delete res.headers["content-encoding"];
14926
16011
  }
@@ -14943,6 +16028,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14943
16028
  streams.push(zlib.createBrotliDecompress(brotliOptions));
14944
16029
  delete res.headers["content-encoding"];
14945
16030
  }
16031
+ break;
16032
+ case "zstd":
16033
+ if (isZstdSupported) {
16034
+ streams.push(zlib.createZstdDecompress(zstdOptions));
16035
+ delete res.headers["content-encoding"];
16036
+ }
16037
+ break;
14946
16038
  }
14947
16039
  }
14948
16040
  responseStream = streams.length > 1 ? stream3.pipeline(streams, utils_default.noop) : streams[0];
@@ -14954,8 +16046,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14954
16046
  request: lastRequest
14955
16047
  };
14956
16048
  if (responseType === "stream") {
14957
- if (config.maxContentLength > -1) {
14958
- const limit = config.maxContentLength;
16049
+ if (maxContentLength > -1) {
16050
+ const limit = maxContentLength;
14959
16051
  const source = responseStream;
14960
16052
  async function* enforceMaxContentLength() {
14961
16053
  let totalResponseBytes = 0;
@@ -14984,12 +16076,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14984
16076
  responseStream.on("data", function handleStreamData(chunk) {
14985
16077
  responseBuffer.push(chunk);
14986
16078
  totalResponseBytes += chunk.length;
14987
- if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
16079
+ if (maxContentLength > -1 && totalResponseBytes > maxContentLength) {
14988
16080
  rejected = true;
14989
16081
  responseStream.destroy();
14990
16082
  abort(
14991
16083
  new AxiosError_default(
14992
- "maxContentLength size of " + config.maxContentLength + " exceeded",
16084
+ "maxContentLength size of " + maxContentLength + " exceeded",
14993
16085
  AxiosError_default.ERR_BAD_RESPONSE,
14994
16086
  config,
14995
16087
  lastRequest
@@ -15050,14 +16142,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
15050
16142
  });
15051
16143
  const boundSockets = /* @__PURE__ */ new Set();
15052
16144
  req.on("socket", function handleRequestSocket(socket) {
15053
- socket.setKeepAlive(true, 1e3 * 60);
16145
+ if (typeof socket.setKeepAlive === "function") {
16146
+ socket.setKeepAlive(true, 1e3 * 60);
16147
+ }
15054
16148
  if (!socket[kAxiosSocketListener]) {
15055
- socket.on("error", function handleSocketError(err) {
15056
- const current = socket[kAxiosCurrentReq];
15057
- if (current && !current.destroyed) {
15058
- current.destroy(err);
15059
- }
15060
- });
16149
+ socket.on("error", handleSocketError);
15061
16150
  socket[kAxiosSocketListener] = true;
15062
16151
  }
15063
16152
  socket[kAxiosCurrentReq] = req;
@@ -15072,8 +16161,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
15072
16161
  }
15073
16162
  boundSockets.clear();
15074
16163
  });
15075
- if (config.timeout) {
15076
- const timeout = parseInt(config.timeout, 10);
16164
+ if (own2("timeout")) {
16165
+ const timeout = parseInt(own2("timeout"), 10);
15077
16166
  if (Number.isNaN(timeout)) {
15078
16167
  abort(
15079
16168
  new AxiosError_default(
@@ -15112,8 +16201,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
15112
16201
  }
15113
16202
  });
15114
16203
  let uploadStream = data;
15115
- if (config.maxBodyLength > -1 && config.maxRedirects === 0) {
15116
- const limit = config.maxBodyLength;
16204
+ if (maxBodyLength > -1) {
16205
+ const limit = maxBodyLength;
15117
16206
  let bytesSent = 0;
15118
16207
  uploadStream = stream3.pipeline(
15119
16208
  [
@@ -15149,16 +16238,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
15149
16238
  });
15150
16239
  };
15151
16240
 
15152
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/isURLSameOrigin.js
15153
- var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url2) => {
15154
- url2 = new URL(url2, platform_default.origin);
15155
- return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
15156
- })(
15157
- new URL(platform_default.origin),
15158
- platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)
15159
- ) : () => true;
15160
-
15161
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/cookies.js
16241
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/cookies.js
16242
+ var decodeCookieValue = (value) => {
16243
+ try {
16244
+ return decodeURIComponent(value);
16245
+ } catch (e) {
16246
+ return value;
16247
+ }
16248
+ };
15162
16249
  var cookies_default = platform_default.hasStandardBrowserEnv ? (
15163
16250
  // Standard browser envs support document.cookie
15164
16251
  {
@@ -15184,144 +16271,275 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
15184
16271
  },
15185
16272
  read(name) {
15186
16273
  if (typeof document === "undefined") return null;
15187
- const cookies = document.cookie.split(";");
16274
+ const cookieString = document.cookie;
16275
+ if (!cookieString) return null;
16276
+ const cookies = cookieString.split(";");
15188
16277
  for (let i = 0; i < cookies.length; i++) {
15189
16278
  const cookie = cookies[i].replace(/^\s+/, "");
15190
16279
  const eq = cookie.indexOf("=");
15191
16280
  if (eq !== -1 && cookie.slice(0, eq) === name) {
15192
- return decodeURIComponent(cookie.slice(eq + 1));
16281
+ return decodeCookieValue(cookie.slice(eq + 1));
16282
+ }
16283
+ }
16284
+ return null;
16285
+ },
16286
+ async readAsync(name) {
16287
+ try {
16288
+ const store = typeof window !== "undefined" && window.cookieStore;
16289
+ if (store && utils_default.isFunction(store.get)) {
16290
+ const cookie = await store.get(name);
16291
+ return cookie ? decodeCookieValue(cookie.value) : null;
16292
+ }
16293
+ } catch (e) {
16294
+ }
16295
+ return this.read(name);
16296
+ },
16297
+ remove(name) {
16298
+ this.write(name, "", Date.now() - 864e5, "/");
16299
+ }
16300
+ }
16301
+ ) : (
16302
+ // Non-standard browser env (web workers, react-native) lack needed support.
16303
+ {
16304
+ write() {
16305
+ },
16306
+ read() {
16307
+ return null;
16308
+ },
16309
+ async readAsync() {
16310
+ return null;
16311
+ },
16312
+ remove() {
16313
+ }
16314
+ }
16315
+ );
16316
+
16317
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isURLSameOrigin.js
16318
+ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2) => (url2) => {
16319
+ url2 = new URL(url2, document.baseURI || platform_default.origin);
16320
+ return origin2.protocol === url2.protocol && origin2.host === url2.host && origin2.port === url2.port;
16321
+ })(new URL(platform_default.origin)) : () => true;
16322
+
16323
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/assertParamsAcyclic.js
16324
+ function assertParamsAcyclic(params) {
16325
+ const pending = [{ value: params }];
16326
+ const active = /* @__PURE__ */ new WeakSet();
16327
+ const visited = /* @__PURE__ */ new WeakSet();
16328
+ while (pending.length) {
16329
+ const { value, done } = pending.pop();
16330
+ if (!utils_default.isPlainObject(value) && !utils_default.isArray(value)) continue;
16331
+ if (done) {
16332
+ active.delete(value);
16333
+ continue;
16334
+ }
16335
+ if (active.has(value)) {
16336
+ throw new AxiosError_default(
16337
+ "Circular reference detected in params",
16338
+ AxiosError_default.ERR_BAD_OPTION_VALUE
16339
+ );
16340
+ }
16341
+ if (visited.has(value)) continue;
16342
+ visited.add(value);
16343
+ active.add(value);
16344
+ pending.push({ value, done: true });
16345
+ const keys = Object.keys(value);
16346
+ if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
16347
+ Object.getOwnPropertySymbols(value).forEach((key) => {
16348
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
16349
+ if (descriptor && descriptor.enumerable) keys.push(key);
16350
+ });
16351
+ }
16352
+ keys.forEach((key) => {
16353
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
16354
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
16355
+ if (descriptor && utils_default.hasOwnProp(descriptor, "value")) {
16356
+ pending.push({ value: descriptor.value });
15193
16357
  }
16358
+ } else {
16359
+ pending.push({ value: value[key] });
16360
+ }
16361
+ });
16362
+ }
16363
+ }
16364
+
16365
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/mergeConfig.js
16366
+ var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
16367
+ var ownEnumerableKeys = (thing) => {
16368
+ if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
16369
+ return Object.keys(thing).concat(
16370
+ Object.getOwnPropertySymbols(thing).filter((symbol) => {
16371
+ const descriptor = Object.getOwnPropertyDescriptor(thing, symbol);
16372
+ return descriptor && descriptor.enumerable;
16373
+ })
16374
+ );
16375
+ }
16376
+ return Object.keys(thing);
16377
+ };
16378
+ function mergeParams(a, b) {
16379
+ const pending = [];
16380
+ const copies = /* @__PURE__ */ new WeakMap();
16381
+ const empty = {};
16382
+ function copy(target, source) {
16383
+ if (!utils_default.isPlainObject(source)) {
16384
+ return utils_default.isArray(source) ? source.slice() : source;
16385
+ }
16386
+ const base = utils_default.isPlainObject(target) ? target : empty;
16387
+ let bases = copies.get(source);
16388
+ if (!bases) {
16389
+ bases = /* @__PURE__ */ new WeakMap();
16390
+ copies.set(source, bases);
16391
+ }
16392
+ if (bases.has(base)) return bases.get(base);
16393
+ const result2 = {};
16394
+ bases.set(base, result2);
16395
+ pending.push({ base, source, result: result2 });
16396
+ return result2;
16397
+ }
16398
+ const result = utils_default.isUndefined(b) ? copy(void 0, a) : copy(a, b);
16399
+ while (pending.length) {
16400
+ const { base, source, result: target } = pending.pop();
16401
+ const baseKeys = new Set(ownEnumerableKeys(base));
16402
+ const sourceKeys = new Set(ownEnumerableKeys(source));
16403
+ const keys = /* @__PURE__ */ new Set([...baseKeys, ...sourceKeys]);
16404
+ keys.forEach((key) => {
16405
+ if (key === "__proto__" || key === "constructor" || key === "prototype") return;
16406
+ const hasSource = sourceKeys.has(key);
16407
+ const value = hasSource ? source[key] : void 0;
16408
+ const previous = (!hasSource || utils_default.isPlainObject(value)) && baseKeys.has(key) ? base[key] : void 0;
16409
+ target[key] = hasSource ? copy(previous, value) : copy(void 0, previous);
16410
+ });
16411
+ }
16412
+ assertParamsAcyclic(result);
16413
+ return result;
16414
+ }
16415
+ function getMergedValue(target, source, prop, caseless) {
16416
+ if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
16417
+ return utils_default.merge.call({ caseless }, target, source);
16418
+ } else if (utils_default.isPlainObject(source)) {
16419
+ return utils_default.merge({}, source);
16420
+ } else if (utils_default.isArray(source)) {
16421
+ return source.slice();
16422
+ }
16423
+ return source;
16424
+ }
16425
+ function mergeDeepProperties(a, b, prop, caseless) {
16426
+ if (!utils_default.isUndefined(b)) {
16427
+ return getMergedValue(a, b, prop, caseless);
16428
+ } else if (!utils_default.isUndefined(a)) {
16429
+ return getMergedValue(void 0, a, prop, caseless);
16430
+ }
16431
+ }
16432
+ function valueFromConfig2(a, b) {
16433
+ if (!utils_default.isUndefined(b)) {
16434
+ return getMergedValue(void 0, b);
16435
+ }
16436
+ }
16437
+ function defaultToConfig2(a, b) {
16438
+ if (!utils_default.isUndefined(b)) {
16439
+ return getMergedValue(void 0, b);
16440
+ } else if (!utils_default.isUndefined(a)) {
16441
+ return getMergedValue(void 0, a);
16442
+ }
16443
+ }
16444
+ function getMergedTransitionalOption(config1, config2, prop) {
16445
+ const transitional2 = utils_default.hasOwnProp(config2, "transitional") ? config2.transitional : void 0;
16446
+ if (!utils_default.isUndefined(transitional2)) {
16447
+ if (utils_default.isPlainObject(transitional2)) {
16448
+ if (utils_default.hasOwnProp(transitional2, prop)) {
16449
+ return transitional2[prop];
15194
16450
  }
15195
- return null;
15196
- },
15197
- remove(name) {
15198
- this.write(name, "", Date.now() - 864e5, "/");
16451
+ } else {
16452
+ return void 0;
15199
16453
  }
15200
16454
  }
15201
- ) : (
15202
- // Non-standard browser env (web workers, react-native) lack needed support.
15203
- {
15204
- write() {
15205
- },
15206
- read() {
15207
- return null;
15208
- },
15209
- remove() {
15210
- }
16455
+ const transitional1 = utils_default.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
16456
+ if (utils_default.isPlainObject(transitional1) && utils_default.hasOwnProp(transitional1, prop)) {
16457
+ return transitional1[prop];
15211
16458
  }
15212
- );
15213
-
15214
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/mergeConfig.js
15215
- var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
16459
+ return void 0;
16460
+ }
16461
+ function mergeDirectKeys(a, b, prop, config1, config2) {
16462
+ if (utils_default.hasOwnProp(config2, prop)) {
16463
+ return getMergedValue(a, b);
16464
+ } else if (utils_default.hasOwnProp(config1, prop)) {
16465
+ return getMergedValue(void 0, a);
16466
+ }
16467
+ }
16468
+ function mergeHeaders(a, b, prop) {
16469
+ return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true);
16470
+ }
16471
+ var hasOwnPropertyDescriptor = Object.freeze({
16472
+ __proto__: null,
16473
+ value: Object.prototype.hasOwnProperty,
16474
+ enumerable: false,
16475
+ writable: true,
16476
+ configurable: true
16477
+ });
16478
+ var mergeMap = {
16479
+ url: valueFromConfig2,
16480
+ method: valueFromConfig2,
16481
+ data: valueFromConfig2,
16482
+ baseURL: defaultToConfig2,
16483
+ transformRequest: defaultToConfig2,
16484
+ transformResponse: defaultToConfig2,
16485
+ params: mergeParams,
16486
+ paramsSerializer: defaultToConfig2,
16487
+ timeout: defaultToConfig2,
16488
+ timeoutErrorMessage: defaultToConfig2,
16489
+ withCredentials: defaultToConfig2,
16490
+ withXSRFToken: defaultToConfig2,
16491
+ adapter: defaultToConfig2,
16492
+ responseType: defaultToConfig2,
16493
+ xsrfCookieName: defaultToConfig2,
16494
+ xsrfHeaderName: defaultToConfig2,
16495
+ onUploadProgress: defaultToConfig2,
16496
+ onDownloadProgress: defaultToConfig2,
16497
+ decompress: defaultToConfig2,
16498
+ maxContentLength: defaultToConfig2,
16499
+ maxBodyLength: defaultToConfig2,
16500
+ beforeRedirect: defaultToConfig2,
16501
+ transport: defaultToConfig2,
16502
+ httpAgent: defaultToConfig2,
16503
+ httpsAgent: defaultToConfig2,
16504
+ cancelToken: defaultToConfig2,
16505
+ socketPath: defaultToConfig2,
16506
+ allowedSocketPaths: defaultToConfig2,
16507
+ responseEncoding: defaultToConfig2,
16508
+ validateStatus: mergeDirectKeys,
16509
+ headers: mergeHeaders
16510
+ };
15216
16511
  function mergeConfig(config1, config2) {
16512
+ config1 = config1 || {};
15217
16513
  config2 = config2 || {};
15218
16514
  const config = /* @__PURE__ */ Object.create(null);
15219
- Object.defineProperty(config, "hasOwnProperty", {
15220
- // Null-proto descriptor so a polluted Object.prototype.get cannot turn
15221
- // this data descriptor into an accessor descriptor on the way in.
15222
- __proto__: null,
15223
- value: Object.prototype.hasOwnProperty,
15224
- enumerable: false,
15225
- writable: true,
15226
- configurable: true
15227
- });
15228
- function getMergedValue(target, source, prop, caseless) {
15229
- if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
15230
- return utils_default.merge.call({ caseless }, target, source);
15231
- } else if (utils_default.isPlainObject(source)) {
15232
- return utils_default.merge({}, source);
15233
- } else if (utils_default.isArray(source)) {
15234
- return source.slice();
15235
- }
15236
- return source;
15237
- }
15238
- function mergeDeepProperties(a, b, prop, caseless) {
15239
- if (!utils_default.isUndefined(b)) {
15240
- return getMergedValue(a, b, prop, caseless);
15241
- } else if (!utils_default.isUndefined(a)) {
15242
- return getMergedValue(void 0, a, prop, caseless);
15243
- }
15244
- }
15245
- function valueFromConfig2(a, b) {
15246
- if (!utils_default.isUndefined(b)) {
15247
- return getMergedValue(void 0, b);
15248
- }
15249
- }
15250
- function defaultToConfig2(a, b) {
15251
- if (!utils_default.isUndefined(b)) {
15252
- return getMergedValue(void 0, b);
15253
- } else if (!utils_default.isUndefined(a)) {
15254
- return getMergedValue(void 0, a);
15255
- }
15256
- }
15257
- function mergeDirectKeys(a, b, prop) {
15258
- if (utils_default.hasOwnProp(config2, prop)) {
15259
- return getMergedValue(a, b);
15260
- } else if (utils_default.hasOwnProp(config1, prop)) {
15261
- return getMergedValue(void 0, a);
15262
- }
15263
- }
15264
- const mergeMap = {
15265
- url: valueFromConfig2,
15266
- method: valueFromConfig2,
15267
- data: valueFromConfig2,
15268
- baseURL: defaultToConfig2,
15269
- transformRequest: defaultToConfig2,
15270
- transformResponse: defaultToConfig2,
15271
- paramsSerializer: defaultToConfig2,
15272
- timeout: defaultToConfig2,
15273
- timeoutMessage: defaultToConfig2,
15274
- withCredentials: defaultToConfig2,
15275
- withXSRFToken: defaultToConfig2,
15276
- adapter: defaultToConfig2,
15277
- responseType: defaultToConfig2,
15278
- xsrfCookieName: defaultToConfig2,
15279
- xsrfHeaderName: defaultToConfig2,
15280
- onUploadProgress: defaultToConfig2,
15281
- onDownloadProgress: defaultToConfig2,
15282
- decompress: defaultToConfig2,
15283
- maxContentLength: defaultToConfig2,
15284
- maxBodyLength: defaultToConfig2,
15285
- beforeRedirect: defaultToConfig2,
15286
- transport: defaultToConfig2,
15287
- httpAgent: defaultToConfig2,
15288
- httpsAgent: defaultToConfig2,
15289
- cancelToken: defaultToConfig2,
15290
- socketPath: defaultToConfig2,
15291
- allowedSocketPaths: defaultToConfig2,
15292
- responseEncoding: defaultToConfig2,
15293
- validateStatus: mergeDirectKeys,
15294
- headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
15295
- };
15296
- utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
15297
- if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
16515
+ Object.defineProperty(config, "hasOwnProperty", hasOwnPropertyDescriptor);
16516
+ const keys = ownEnumerableKeys({ ...config1, ...config2 });
16517
+ for (let i = 0, len = keys.length; i < len; i++) {
16518
+ const prop = keys[i];
16519
+ if (prop === "__proto__" || prop === "constructor" || prop === "prototype") continue;
15298
16520
  const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
15299
16521
  const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0;
15300
16522
  const b = utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0;
15301
- const configValue = merge2(a, b, prop);
16523
+ const configValue = merge2 === mergeDirectKeys ? merge2(a, b, prop, config1, config2) : merge2(a, b, prop);
15302
16524
  utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
15303
- });
15304
- return config;
15305
- }
15306
-
15307
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/resolveConfig.js
15308
- var FORM_DATA_CONTENT_HEADERS2 = ["content-type", "content-length"];
15309
- function setFormDataHeaders2(headers, formHeaders, policy) {
15310
- if (policy !== "content-only") {
15311
- headers.set(formHeaders);
15312
- return;
15313
16525
  }
15314
- Object.entries(formHeaders).forEach(([key, val]) => {
15315
- if (FORM_DATA_CONTENT_HEADERS2.includes(key.toLowerCase())) {
15316
- headers.set(key, val);
16526
+ if (utils_default.hasOwnProp(config2, "validateStatus") && utils_default.isUndefined(config2.validateStatus) && getMergedTransitionalOption(config1, config2, "validateStatusUndefinedResolves") === false) {
16527
+ if (utils_default.hasOwnProp(config1, "validateStatus")) {
16528
+ config.validateStatus = getMergedValue(void 0, config1.validateStatus);
16529
+ } else {
16530
+ delete config.validateStatus;
15317
16531
  }
15318
- });
16532
+ }
16533
+ return config;
15319
16534
  }
16535
+
16536
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/resolveConfig.js
15320
16537
  var encodeUTF8 = (str) => encodeURIComponent(str).replace(
15321
16538
  /%([0-9A-F]{2})/gi,
15322
16539
  (_, hex) => String.fromCharCode(parseInt(hex, 16))
15323
16540
  );
15324
- var resolveConfig_default = (config) => {
16541
+ var readCookie = (name) => cookies_default.read(name);
16542
+ function resolveConfig(config, readXsrfCookie = readCookie) {
15325
16543
  const newConfig = mergeConfig({}, config);
15326
16544
  const own2 = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
15327
16545
  const data = own2("data");
@@ -15335,21 +16553,33 @@ var resolveConfig_default = (config) => {
15335
16553
  const url2 = own2("url");
15336
16554
  newConfig.headers = headers = AxiosHeaders_default.from(headers);
15337
16555
  newConfig.url = buildURL(
15338
- buildFullPath(baseURL, url2, allowAbsoluteUrls),
15339
- config.params,
15340
- config.paramsSerializer
16556
+ buildFullPath(baseURL, url2, allowAbsoluteUrls, newConfig),
16557
+ own2("params"),
16558
+ own2("paramsSerializer")
15341
16559
  );
15342
16560
  if (auth) {
15343
- headers.set(
15344
- "Authorization",
15345
- "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : ""))
15346
- );
16561
+ const username = utils_default.getSafeProp(auth, "username") || "";
16562
+ const password = utils_default.getSafeProp(auth, "password") || "";
16563
+ const transitional2 = own2("transitional");
16564
+ const encodeUsername = transitional2 && utils_default.hasOwnProp(transitional2, "encodeBasicAuthUsername") && transitional2.encodeBasicAuthUsername === true;
16565
+ try {
16566
+ headers.set(
16567
+ "Authorization",
16568
+ // Preserve legacy username bytes unless the caller opts in to UTF-8.
16569
+ "Basic " + btoa(
16570
+ (encodeUsername ? encodeUTF8(username) : username) + ":" + (password ? encodeUTF8(password) : "")
16571
+ )
16572
+ );
16573
+ } catch (e) {
16574
+ throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_OPTION_VALUE, config);
16575
+ }
15347
16576
  }
15348
16577
  if (utils_default.isFormData(data)) {
15349
- if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
16578
+ const getHeaders = utils_default.getSafeProp(data, "getHeaders");
16579
+ if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv || utils_default.isReactNative(data)) {
15350
16580
  headers.setContentType(void 0);
15351
- } else if (utils_default.isFunction(data.getHeaders)) {
15352
- setFormDataHeaders2(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
16581
+ } else if (utils_default.isFunction(getHeaders)) {
16582
+ setFormDataHeaders(headers, getHeaders.call(data), own2("formDataHeaderPolicy"));
15353
16583
  }
15354
16584
  }
15355
16585
  if (platform_default.hasStandardBrowserEnv) {
@@ -15358,36 +16588,91 @@ var resolveConfig_default = (config) => {
15358
16588
  }
15359
16589
  const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin_default(newConfig.url);
15360
16590
  if (shouldSendXSRF) {
15361
- const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
16591
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName);
15362
16592
  if (xsrfValue) {
15363
16593
  headers.set(xsrfHeaderName, xsrfValue);
15364
16594
  }
15365
16595
  }
15366
16596
  }
15367
16597
  return newConfig;
15368
- };
16598
+ }
16599
+ var resolveConfig_default = resolveConfig;
15369
16600
 
15370
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/adapters/xhr.js
16601
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/xhr.js
15371
16602
  var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
15372
16603
  var xhr_default = isXHRAdapterSupported && function(config) {
15373
16604
  return new Promise(function dispatchXhrRequest(resolve, reject) {
15374
- const _config = resolveConfig_default(config);
16605
+ let useAsyncXsrf;
16606
+ try {
16607
+ const store = platform_default.hasStandardBrowserEnv && typeof window !== "undefined" && window.cookieStore;
16608
+ useAsyncXsrf = store && utils_default.isFunction(store.get);
16609
+ } catch (e) {
16610
+ }
16611
+ let xsrfCookieName;
16612
+ const _config = resolveConfig_default(
16613
+ config,
16614
+ useAsyncXsrf ? (name) => {
16615
+ xsrfCookieName = name;
16616
+ return null;
16617
+ } : void 0
16618
+ );
15375
16619
  let requestData = _config.data;
15376
16620
  const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
15377
16621
  let { responseType, onUploadProgress, onDownloadProgress } = _config;
15378
16622
  let onCanceled;
16623
+ let timeoutId;
15379
16624
  let uploadThrottled, downloadThrottled;
15380
- let flushUpload, flushDownload;
16625
+ let flushUpload, flushDownload, flushDownloadWithEvent;
15381
16626
  function done() {
15382
- flushUpload && flushUpload();
15383
- flushDownload && flushDownload();
16627
+ clearTimeout(timeoutId);
16628
+ try {
16629
+ flushUpload && flushUpload();
16630
+ } catch (err) {
16631
+ setTimeout(() => {
16632
+ throw err;
16633
+ });
16634
+ }
16635
+ try {
16636
+ flushDownload && flushDownload();
16637
+ } catch (err) {
16638
+ setTimeout(() => {
16639
+ throw err;
16640
+ });
16641
+ }
16642
+ if (request) {
16643
+ downloadThrottled && request.removeEventListener("progress", downloadThrottled);
16644
+ if (request.upload) {
16645
+ uploadThrottled && request.upload.removeEventListener("progress", uploadThrottled);
16646
+ flushUpload && request.upload.removeEventListener("loadend", flushUpload);
16647
+ }
16648
+ }
15384
16649
  _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
15385
16650
  _config.signal && _config.signal.removeEventListener("abort", onCanceled);
15386
16651
  }
15387
16652
  let request = new XMLHttpRequest();
15388
16653
  request.open(_config.method.toUpperCase(), _config.url, true);
15389
16654
  request.timeout = _config.timeout;
15390
- function onloadend() {
16655
+ function onloadend(event) {
16656
+ if (!request) {
16657
+ return;
16658
+ }
16659
+ if (request.status === 0 && (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || parseProtocol(platform_default.origin)) !== "file" && !(request.responseURL && request.responseURL.startsWith("file:"))) {
16660
+ reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request));
16661
+ done();
16662
+ request = null;
16663
+ return;
16664
+ }
16665
+ try {
16666
+ if (event) {
16667
+ flushDownloadWithEvent && flushDownloadWithEvent(event);
16668
+ } else {
16669
+ flushDownload && flushDownload();
16670
+ }
16671
+ } catch (err) {
16672
+ setTimeout(() => {
16673
+ throw err;
16674
+ });
16675
+ }
15391
16676
  if (!request) {
15392
16677
  return;
15393
16678
  }
@@ -15446,6 +16731,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
15446
16731
  request = null;
15447
16732
  };
15448
16733
  request.ontimeout = function handleTimeout() {
16734
+ if (!request) return;
15449
16735
  let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
15450
16736
  const transitional2 = _config.transitional || transitional_default;
15451
16737
  if (_config.timeoutErrorMessage) {
@@ -15463,11 +16749,6 @@ var xhr_default = isXHRAdapterSupported && function(config) {
15463
16749
  request = null;
15464
16750
  };
15465
16751
  requestData === void 0 && requestHeaders.setContentType(null);
15466
- if ("setRequestHeader" in request) {
15467
- utils_default.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) {
15468
- request.setRequestHeader(key, val);
15469
- });
15470
- }
15471
16752
  if (!utils_default.isUndefined(_config.withCredentials)) {
15472
16753
  request.withCredentials = !!_config.withCredentials;
15473
16754
  }
@@ -15475,7 +16756,10 @@ var xhr_default = isXHRAdapterSupported && function(config) {
15475
16756
  request.responseType = _config.responseType;
15476
16757
  }
15477
16758
  if (onDownloadProgress) {
15478
- [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
16759
+ [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(
16760
+ onDownloadProgress,
16761
+ true
16762
+ );
15479
16763
  request.addEventListener("progress", downloadThrottled);
15480
16764
  }
15481
16765
  if (onUploadProgress && request.upload) {
@@ -15489,15 +16773,18 @@ var xhr_default = isXHRAdapterSupported && function(config) {
15489
16773
  return;
15490
16774
  }
15491
16775
  reject(!cancel || cancel.type ? new CanceledError_default(null, config, request) : cancel);
15492
- request.abort();
16776
+ const xhr = request;
15493
16777
  done();
15494
16778
  request = null;
16779
+ xhr.abort();
15495
16780
  };
15496
16781
  _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
16782
+ if (!request) return;
15497
16783
  if (_config.signal) {
15498
16784
  _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
15499
16785
  }
15500
16786
  }
16787
+ if (!request) return;
15501
16788
  const protocol = parseProtocol(_config.url);
15502
16789
  if (protocol && !platform_default.protocols.includes(protocol)) {
15503
16790
  reject(
@@ -15507,13 +16794,65 @@ var xhr_default = isXHRAdapterSupported && function(config) {
15507
16794
  config
15508
16795
  )
15509
16796
  );
16797
+ done();
15510
16798
  return;
15511
16799
  }
15512
- request.send(requestData || null);
16800
+ const sendRequest = () => {
16801
+ if (!request) return;
16802
+ if ("setRequestHeader" in request) {
16803
+ utils_default.forEach(
16804
+ toByteStringHeaderObject(requestHeaders),
16805
+ function setRequestHeader(val, key) {
16806
+ request.setRequestHeader(key, val);
16807
+ }
16808
+ );
16809
+ }
16810
+ request.send(requestData || null);
16811
+ };
16812
+ if (xsrfCookieName) {
16813
+ const now = typeof performance !== "undefined" && utils_default.isFunction(performance.now) ? () => performance.now() : Date.now;
16814
+ const deadline = request.timeout > 0 ? now() + Number(request.timeout) : void 0;
16815
+ const abortOnTimeout = () => {
16816
+ if (!request) return;
16817
+ const xhr = request;
16818
+ xhr.ontimeout();
16819
+ xhr.abort();
16820
+ };
16821
+ if (deadline !== void 0) {
16822
+ const scheduleTimeout = () => {
16823
+ const remaining = deadline - now();
16824
+ if (remaining > 0) {
16825
+ timeoutId = setTimeout(scheduleTimeout, Math.min(remaining, 2147483647));
16826
+ } else {
16827
+ abortOnTimeout();
16828
+ }
16829
+ };
16830
+ scheduleTimeout();
16831
+ }
16832
+ cookies_default.readAsync(xsrfCookieName).then((value) => {
16833
+ if (!request) return;
16834
+ if (deadline !== void 0 && now() >= deadline) {
16835
+ abortOnTimeout();
16836
+ return;
16837
+ }
16838
+ if (value) {
16839
+ const headerName = utils_default.hasOwnProp(_config, "xsrfHeaderName") && _config.xsrfHeaderName;
16840
+ requestHeaders.set(headerName, value);
16841
+ }
16842
+ sendRequest();
16843
+ }).catch((error) => {
16844
+ if (!request) return;
16845
+ reject(AxiosError_default.from(error, null, config, request));
16846
+ done();
16847
+ request = null;
16848
+ });
16849
+ } else {
16850
+ sendRequest();
16851
+ }
15513
16852
  });
15514
16853
  };
15515
16854
 
15516
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/composeSignals.js
16855
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/composeSignals.js
15517
16856
  var composeSignals = (signals, timeout) => {
15518
16857
  signals = signals ? signals.filter(Boolean) : [];
15519
16858
  if (!timeout && !signals.length) {
@@ -15542,18 +16881,28 @@ var composeSignals = (signals, timeout) => {
15542
16881
  timer && clearTimeout(timer);
15543
16882
  timer = null;
15544
16883
  signals.forEach((signal2) => {
15545
- signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
16884
+ const unsubscribeSignal = utils_default.getSafeProp(signal2, "unsubscribe");
16885
+ utils_default.isFunction(unsubscribeSignal) ? unsubscribeSignal.call(signal2, onabort) : signal2.removeEventListener("abort", onabort);
15546
16886
  });
15547
16887
  signals = null;
15548
16888
  };
15549
- signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
16889
+ signals.forEach((signal2) => {
16890
+ if (aborted) {
16891
+ return;
16892
+ }
16893
+ if (signal2.aborted) {
16894
+ onabort.call(signal2);
16895
+ return;
16896
+ }
16897
+ signal2.addEventListener("abort", onabort, { once: true });
16898
+ });
15550
16899
  const { signal } = controller;
15551
16900
  signal.unsubscribe = () => utils_default.asap(unsubscribe);
15552
16901
  return signal;
15553
16902
  };
15554
16903
  var composeSignals_default = composeSignals;
15555
16904
 
15556
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/trackStream.js
16905
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/trackStream.js
15557
16906
  var streamChunk = function* (chunk, chunkSize) {
15558
16907
  let len = chunk.byteLength;
15559
16908
  if (!chunkSize || len < chunkSize) {
@@ -15633,9 +16982,138 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
15633
16982
  );
15634
16983
  };
15635
16984
 
15636
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/adapters/fetch.js
16985
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToBlob.js
16986
+ var CRLF2 = "\r\n";
16987
+ var normalizeLines = (value) => String(value).replace(/\r\n|\r|\n/g, CRLF2);
16988
+ var escapeName = (value) => String(value).replace(
16989
+ /[\r\n"]/g,
16990
+ (char) => char === "\r" ? "%0D" : char === "\n" ? "%0A" : "%22"
16991
+ );
16992
+ var stringBytes = (value, normalize) => {
16993
+ let length = 0;
16994
+ for (let i = 0; i < value.length; i++) {
16995
+ const code = value.charCodeAt(i);
16996
+ if (normalize && (code === 13 || code === 10)) {
16997
+ if (code === 13 && value.charCodeAt(i + 1) === 10) i++;
16998
+ length += 2;
16999
+ } else if (code < 128) {
17000
+ length++;
17001
+ } else if (code < 2048) {
17002
+ length += 2;
17003
+ } else if (code >= 55296 && code <= 56319 && value.charCodeAt(i + 1) >= 56320 && value.charCodeAt(i + 1) <= 57343) {
17004
+ length += 4;
17005
+ i++;
17006
+ } else {
17007
+ length += 3;
17008
+ }
17009
+ }
17010
+ return length;
17011
+ };
17012
+ var FormDataError = class extends TypeError {
17013
+ constructor(message, reason) {
17014
+ super(message);
17015
+ this.name = "FormDataError";
17016
+ this.reason = reason;
17017
+ }
17018
+ };
17019
+ function formDataToBlob(form, Blob2, limit, limitError, boundary) {
17020
+ if (!utils_default.isFunction(Blob2)) {
17021
+ throw new FormDataError("Blob is not supported", "blob");
17022
+ }
17023
+ if (!utils_default.isString(boundary) || !/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) || / $/.test(boundary)) {
17024
+ throw new FormDataError("Invalid multipart boundary", "boundary");
17025
+ }
17026
+ const footer = "--" + boundary + "--" + CRLF2;
17027
+ let length = footer.length;
17028
+ const parts = [];
17029
+ const checkLength = (extra) => {
17030
+ if (length + extra > limit) throw limitError();
17031
+ };
17032
+ checkLength(0);
17033
+ for (const [name, value] of form) {
17034
+ const isString2 = utils_default.isString(value);
17035
+ const valueLength = isString2 ? stringBytes(value, true) : value.size;
17036
+ if (!Number.isFinite(valueLength) || valueLength < 0) {
17037
+ throw new FormDataError("Unsupported FormData part size", "part");
17038
+ }
17039
+ checkLength(
17040
+ valueLength + stringBytes(name, true) + (!isString2 && value.name ? stringBytes(value.name, false) : 0) + (!isString2 && value.type ? stringBytes(value.type, false) : 0)
17041
+ );
17042
+ let header = "--" + boundary + CRLF2 + 'Content-Disposition: form-data; name="' + escapeName(normalizeLines(name)) + '"';
17043
+ if (!isString2) {
17044
+ header += '; filename="' + escapeName(utils_default.isString(value.name) ? value.name : "blob") + '"' + CRLF2 + "Content-Type: " + String(value.type || "application/octet-stream").replace(/[\r\n]/g, "");
17045
+ }
17046
+ header += CRLF2 + CRLF2;
17047
+ const partLength = stringBytes(header, false) + valueLength + CRLF2.length;
17048
+ checkLength(partLength);
17049
+ length += partLength;
17050
+ parts.push({ header, value, isString: isString2 });
17051
+ }
17052
+ const blobParts = [];
17053
+ for (const part of parts) {
17054
+ blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF2);
17055
+ }
17056
+ blobParts.push(footer);
17057
+ return new Blob2(blobParts, { type: "multipart/form-data; boundary=" + boundary });
17058
+ }
17059
+
17060
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/createMultipartBody.js
17061
+ function createMultipartBody(form, Blob2, limit, limitError, boundary) {
17062
+ if (!utils_default.isFunction(Blob2)) {
17063
+ throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT);
17064
+ }
17065
+ if (boundary === void 0) {
17066
+ if (utils_default.isFunction(platform_default.generateString)) {
17067
+ boundary = "axios-" + platform_default.generateString(36, "0123456789abcdef");
17068
+ } else {
17069
+ const crypto2 = utils_default.global.crypto;
17070
+ if (!crypto2 || !utils_default.isFunction(crypto2.getRandomValues)) {
17071
+ throw new AxiosError_default("Random byte generation is not supported", AxiosError_default.ERR_NOT_SUPPORT);
17072
+ }
17073
+ const random = new Uint8Array(18);
17074
+ crypto2.getRandomValues(random);
17075
+ boundary = "axios-" + Array.from(random, (value) => ("0" + value.toString(16)).slice(-2)).join("");
17076
+ }
17077
+ }
17078
+ try {
17079
+ return formDataToBlob(form, Blob2, limit, limitError, boundary);
17080
+ } catch (error) {
17081
+ if (error instanceof FormDataError) {
17082
+ const code = error.reason === "boundary" ? AxiosError_default.ERR_BAD_OPTION_VALUE : AxiosError_default.ERR_BAD_REQUEST;
17083
+ throw new AxiosError_default(error.message, code);
17084
+ }
17085
+ throw error;
17086
+ }
17087
+ }
17088
+
17089
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/fetch.js
15637
17090
  var DEFAULT_CHUNK_SIZE = 64 * 1024;
17091
+ var DEFAULT_REQUEST_OPTIONS = {
17092
+ cache: "default",
17093
+ redirect: "follow",
17094
+ referrer: "about:client",
17095
+ referrerPolicy: "",
17096
+ mode: "cors",
17097
+ integrity: "",
17098
+ keepalive: false,
17099
+ priority: "auto",
17100
+ window: null
17101
+ };
15638
17102
  var { isFunction: isFunction2 } = utils_default;
17103
+ var encodeUTF82 = (str) => encodeURIComponent(str).replace(
17104
+ /%([0-9A-F]{2})/gi,
17105
+ (_, hex) => String.fromCharCode(parseInt(hex, 16))
17106
+ );
17107
+ var decodeURIComponentSafe2 = (value) => {
17108
+ if (!utils_default.isString(value)) {
17109
+ return value;
17110
+ }
17111
+ try {
17112
+ return decodeURIComponent(value);
17113
+ } catch (error) {
17114
+ return value;
17115
+ }
17116
+ };
15639
17117
  var test = (fn, ...args) => {
15640
17118
  try {
15641
17119
  return !!fn(...args);
@@ -15643,6 +17121,14 @@ var test = (fn, ...args) => {
15643
17121
  return false;
15644
17122
  }
15645
17123
  };
17124
+ var maybeWithAuthCredentials = (url2) => {
17125
+ const protocolIndex = url2.indexOf("://");
17126
+ let urlToCheck = url2;
17127
+ if (protocolIndex !== -1) {
17128
+ urlToCheck = urlToCheck.slice(protocolIndex + 3);
17129
+ }
17130
+ return urlToCheck.includes("@") || urlToCheck.includes(":");
17131
+ };
15646
17132
  var factory = (env) => {
15647
17133
  const globalObject = utils_default.global !== void 0 && utils_default.global !== null ? utils_default.global : globalThis;
15648
17134
  const { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = globalObject;
@@ -15652,11 +17138,13 @@ var factory = (env) => {
15652
17138
  },
15653
17139
  {
15654
17140
  Request: globalObject.Request,
15655
- Response: globalObject.Response
17141
+ Response: globalObject.Response,
17142
+ Blob: globalObject.Blob
15656
17143
  },
15657
17144
  env
15658
17145
  );
15659
- const { fetch: envFetch, Request, Response } = env;
17146
+ const envFetch = utils_default.hasOwnProp(env, "fetch") ? env.fetch : void 0;
17147
+ const { Request, Response, Blob: Blob2 } = env;
15660
17148
  const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function";
15661
17149
  const isRequestSupported = isFunction2(Request);
15662
17150
  const isResponseSupported = isFunction2(Response);
@@ -15682,6 +17170,13 @@ var factory = (env) => {
15682
17170
  return duplexAccessed && !hasContentType;
15683
17171
  });
15684
17172
  const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
17173
+ const requestDefaults = Object.assign(/* @__PURE__ */ Object.create(null), DEFAULT_REQUEST_OPTIONS);
17174
+ if (isRequestSupported && !test(() => new Request(platform_default.origin, requestDefaults))) {
17175
+ delete requestDefaults.cache;
17176
+ if (!test(() => new Request(platform_default.origin, requestDefaults))) {
17177
+ requestDefaults.cache = DEFAULT_REQUEST_OPTIONS.cache;
17178
+ }
17179
+ }
15685
17180
  const resolvers = {
15686
17181
  stream: supportsResponseStream && ((res) => res.body)
15687
17182
  };
@@ -15707,13 +17202,6 @@ var factory = (env) => {
15707
17202
  if (utils_default.isBlob(body)) {
15708
17203
  return body.size;
15709
17204
  }
15710
- if (utils_default.isSpecCompliantForm(body)) {
15711
- const _request = new Request(platform_default.origin, {
15712
- method: "POST",
15713
- body
15714
- });
15715
- return (await _request.arrayBuffer()).byteLength;
15716
- }
15717
17205
  if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
15718
17206
  return body.byteLength;
15719
17207
  }
@@ -15743,10 +17231,12 @@ var factory = (env) => {
15743
17231
  withCredentials = "same-origin",
15744
17232
  fetchOptions,
15745
17233
  maxContentLength,
15746
- maxBodyLength
17234
+ maxBodyLength,
17235
+ maxRedirects
15747
17236
  } = resolveConfig_default(config);
15748
17237
  const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1;
15749
17238
  const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1;
17239
+ const own2 = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0;
15750
17240
  let _fetch = envFetch || fetch;
15751
17241
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
15752
17242
  let composedSignal = composeSignals_default(
@@ -15758,9 +17248,51 @@ var factory = (env) => {
15758
17248
  composedSignal.unsubscribe();
15759
17249
  });
15760
17250
  let requestContentLength;
17251
+ let pendingBodyError = null;
17252
+ let pendingResponseError = null;
17253
+ const maxBodyLengthError = () => new AxiosError_default(
17254
+ "Request body larger than maxBodyLength limit",
17255
+ AxiosError_default.ERR_BAD_REQUEST,
17256
+ config,
17257
+ request
17258
+ );
15761
17259
  try {
15762
- if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
15763
- const estimated = estimateDataURLDecodedBytes(url2);
17260
+ let auth = void 0;
17261
+ const configAuth = own2("auth");
17262
+ if (configAuth) {
17263
+ const username = utils_default.getSafeProp(configAuth, "username") || "";
17264
+ const password = utils_default.getSafeProp(configAuth, "password") || "";
17265
+ auth = {
17266
+ username,
17267
+ password
17268
+ };
17269
+ }
17270
+ let parsedURL;
17271
+ if (maybeWithAuthCredentials(url2)) {
17272
+ parsedURL = new URL(url2, platform_default.origin);
17273
+ if (!auth && (parsedURL.username || parsedURL.password)) {
17274
+ const urlUsername = decodeURIComponentSafe2(parsedURL.username);
17275
+ const urlPassword = decodeURIComponentSafe2(parsedURL.password);
17276
+ auth = {
17277
+ username: urlUsername,
17278
+ password: urlPassword
17279
+ };
17280
+ }
17281
+ if (parsedURL.username || parsedURL.password) {
17282
+ parsedURL.username = "";
17283
+ parsedURL.password = "";
17284
+ url2 = parsedURL.href;
17285
+ }
17286
+ }
17287
+ if (auth) {
17288
+ headers.delete("authorization");
17289
+ headers.set(
17290
+ "Authorization",
17291
+ "Basic " + btoa(encodeUTF82((auth.username || "") + ":" + (auth.password || "")))
17292
+ );
17293
+ }
17294
+ if (hasMaxContentLength && parsedURL && parsedURL.protocol === "data:") {
17295
+ const estimated = estimateDataURLDecodedBytes(parsedURL.href);
15764
17296
  if (estimated > maxContentLength) {
15765
17297
  throw new AxiosError_default(
15766
17298
  "maxContentLength size of " + maxContentLength + " exceeded",
@@ -15770,34 +17302,73 @@ var factory = (env) => {
15770
17302
  );
15771
17303
  }
15772
17304
  }
17305
+ const formContentType = utils_default.isSpecCompliantForm(data) && AxiosHeaders_default.from(own2("headers")).getContentType();
17306
+ let formBoundary;
17307
+ if (utils_default.isString(formContentType) && /^multipart\/form-data(?:\s*;|$)/i.test(formContentType.trim())) {
17308
+ const parameters = AxiosHeaders_default.parseParameters(formContentType);
17309
+ if (utils_default.hasOwnProp(parameters, "boundary")) formBoundary = parameters.boundary;
17310
+ }
17311
+ if (utils_default.isSpecCompliantForm(data) && method !== "get" && method !== "head" && (hasMaxBodyLength || onUploadProgress && supportsRequestStream || formBoundary !== void 0)) {
17312
+ data = createMultipartBody(
17313
+ data,
17314
+ Blob2,
17315
+ hasMaxBodyLength ? maxBodyLength : Infinity,
17316
+ maxBodyLengthError,
17317
+ formBoundary
17318
+ );
17319
+ headers.setContentType(formBoundary === void 0 ? data.type : formContentType);
17320
+ requestContentLength = data.size;
17321
+ }
15773
17322
  if (hasMaxBodyLength && method !== "get" && method !== "head") {
15774
- const outboundLength = await resolveBodyLength(headers, data);
15775
- if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
15776
- throw new AxiosError_default(
15777
- "Request body larger than maxBodyLength limit",
15778
- AxiosError_default.ERR_BAD_REQUEST,
15779
- config,
15780
- request
15781
- );
17323
+ const outboundLength = await getBodyLength(data);
17324
+ if (typeof outboundLength === "number" && isFinite(outboundLength)) {
17325
+ requestContentLength = outboundLength;
17326
+ if (outboundLength > maxBodyLength) {
17327
+ throw maxBodyLengthError();
17328
+ }
15782
17329
  }
15783
17330
  }
15784
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
15785
- let _request = new Request(url2, {
15786
- method: "POST",
15787
- body: data,
15788
- duplex: "half"
15789
- });
15790
- let contentTypeHeader;
15791
- if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
15792
- headers.setContentType(contentTypeHeader);
15793
- }
15794
- if (_request.body) {
15795
- const [onProgress, flush] = progressEventDecorator(
15796
- requestContentLength,
15797
- progressEventReducer(asyncDecorator(onUploadProgress))
15798
- );
15799
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
17331
+ const mustEnforceStreamBody = hasMaxBodyLength && (utils_default.isReadableStream(data) || utils_default.isStream(data));
17332
+ const trackRequestStream = (stream4, onProgress, flush) => trackStream(
17333
+ stream4,
17334
+ DEFAULT_CHUNK_SIZE,
17335
+ (loadedBytes) => {
17336
+ if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
17337
+ throw pendingBodyError = maxBodyLengthError();
17338
+ }
17339
+ onProgress && onProgress(loadedBytes);
17340
+ },
17341
+ flush
17342
+ );
17343
+ if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) {
17344
+ requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
17345
+ if (requestContentLength !== 0 || mustEnforceStreamBody) {
17346
+ let _request = new Request(url2, {
17347
+ method: "POST",
17348
+ body: data,
17349
+ duplex: "half"
17350
+ });
17351
+ let contentTypeHeader;
17352
+ if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
17353
+ headers.setContentType(contentTypeHeader);
17354
+ }
17355
+ if (_request.body) {
17356
+ const [onProgress, flush] = onUploadProgress && progressEventDecorator(
17357
+ requestContentLength,
17358
+ progressEventReducer(asyncDecorator(onUploadProgress))
17359
+ ) || [];
17360
+ data = trackRequestStream(_request.body, onProgress, flush);
17361
+ }
15800
17362
  }
17363
+ } else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") {
17364
+ data = trackRequestStream(data);
17365
+ } else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") {
17366
+ throw new AxiosError_default(
17367
+ "Stream request bodies are not supported by the current fetch implementation",
17368
+ AxiosError_default.ERR_NOT_SUPPORT,
17369
+ config,
17370
+ request
17371
+ );
15801
17372
  }
15802
17373
  if (!utils_default.isString(withCredentials)) {
15803
17374
  withCredentials = withCredentials ? "include" : "omit";
@@ -15810,19 +17381,47 @@ var factory = (env) => {
15810
17381
  }
15811
17382
  }
15812
17383
  headers.set("User-Agent", "axios/" + VERSION, false);
15813
- const resolvedOptions = {
15814
- ...fetchOptions,
17384
+ const safeFetchOptions = fetchOptions == null ? fetchOptions : Object.assign(/* @__PURE__ */ Object.create(null), fetchOptions);
17385
+ if (safeFetchOptions) {
17386
+ delete safeFetchOptions.body;
17387
+ delete safeFetchOptions.headers;
17388
+ delete safeFetchOptions.method;
17389
+ delete safeFetchOptions.signal;
17390
+ delete safeFetchOptions.duplex;
17391
+ delete safeFetchOptions.credentials;
17392
+ }
17393
+ const resolvedOptions = Object.assign(/* @__PURE__ */ Object.create(null), safeFetchOptions, {
15815
17394
  signal: composedSignal,
15816
17395
  method: method.toUpperCase(),
15817
17396
  headers: toByteStringHeaderObject(headers.normalize()),
15818
17397
  body: data,
15819
17398
  duplex: "half",
15820
17399
  credentials: isCredentialsSupported ? withCredentials : void 0
15821
- };
17400
+ });
17401
+ if (isRequestSupported) {
17402
+ utils_default.forEach(requestDefaults, (value, key) => {
17403
+ if (resolvedOptions[key] === void 0) {
17404
+ resolvedOptions[key] = value;
17405
+ }
17406
+ });
17407
+ if (resolvedOptions.signal === void 0) {
17408
+ resolvedOptions.signal = null;
17409
+ }
17410
+ if (resolvedOptions.body === void 0) {
17411
+ resolvedOptions.body = null;
17412
+ }
17413
+ }
17414
+ if (maxRedirects === 0) {
17415
+ resolvedOptions.redirect = "manual";
17416
+ if (safeFetchOptions) {
17417
+ safeFetchOptions.redirect = "manual";
17418
+ }
17419
+ }
15822
17420
  request = isRequestSupported && new Request(url2, resolvedOptions);
15823
- let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
17421
+ let response = await (isRequestSupported ? _fetch(request, safeFetchOptions) : _fetch(url2, resolvedOptions));
17422
+ const responseHeaders = AxiosHeaders_default.from(response.headers);
15824
17423
  if (hasMaxContentLength) {
15825
- const declaredLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
17424
+ const declaredLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
15826
17425
  if (declaredLength != null && declaredLength > maxContentLength) {
15827
17426
  throw new AxiosError_default(
15828
17427
  "maxContentLength size of " + maxContentLength + " exceeded",
@@ -15838,7 +17437,7 @@ var factory = (env) => {
15838
17437
  ["status", "statusText", "headers"].forEach((prop) => {
15839
17438
  options[prop] = response[prop];
15840
17439
  });
15841
- const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
17440
+ const responseContentLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
15842
17441
  const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
15843
17442
  responseContentLength,
15844
17443
  progressEventReducer(asyncDecorator(onDownloadProgress), true)
@@ -15848,7 +17447,7 @@ var factory = (env) => {
15848
17447
  if (hasMaxContentLength) {
15849
17448
  bytesRead = loadedBytes;
15850
17449
  if (bytesRead > maxContentLength) {
15851
- throw new AxiosError_default(
17450
+ throw pendingResponseError = new AxiosError_default(
15852
17451
  "maxContentLength size of " + maxContentLength + " exceeded",
15853
17452
  AxiosError_default.ERR_BAD_RESPONSE,
15854
17453
  config,
@@ -15908,22 +17507,44 @@ var factory = (env) => {
15908
17507
  const canceledError = composedSignal.reason;
15909
17508
  canceledError.config = config;
15910
17509
  request && (canceledError.request = request);
15911
- err !== canceledError && (canceledError.cause = err);
17510
+ if (err !== canceledError) {
17511
+ Object.defineProperty(canceledError, "cause", {
17512
+ __proto__: null,
17513
+ value: err,
17514
+ writable: true,
17515
+ enumerable: false,
17516
+ configurable: true
17517
+ });
17518
+ }
15912
17519
  throw canceledError;
15913
17520
  }
17521
+ if (pendingBodyError) {
17522
+ request && !pendingBodyError.request && (pendingBodyError.request = request);
17523
+ throw pendingBodyError;
17524
+ }
17525
+ if (pendingResponseError) {
17526
+ throw pendingResponseError;
17527
+ }
17528
+ if (err instanceof AxiosError_default) {
17529
+ request && !err.request && (err.request = request);
17530
+ throw err;
17531
+ }
15914
17532
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
15915
- throw Object.assign(
15916
- new AxiosError_default(
15917
- "Network Error",
15918
- AxiosError_default.ERR_NETWORK,
15919
- config,
15920
- request,
15921
- err && err.response
15922
- ),
15923
- {
15924
- cause: err.cause || err
15925
- }
17533
+ const networkError = new AxiosError_default(
17534
+ "Network Error",
17535
+ AxiosError_default.ERR_NETWORK,
17536
+ config,
17537
+ request,
17538
+ err && err.response
15926
17539
  );
17540
+ Object.defineProperty(networkError, "cause", {
17541
+ __proto__: null,
17542
+ value: err.cause || err,
17543
+ writable: true,
17544
+ enumerable: false,
17545
+ configurable: true
17546
+ });
17547
+ throw networkError;
15927
17548
  }
15928
17549
  throw AxiosError_default.from(err, err && err.code, config, request, err && err.response);
15929
17550
  }
@@ -15931,9 +17552,15 @@ var factory = (env) => {
15931
17552
  };
15932
17553
  var seedCache = /* @__PURE__ */ new Map();
15933
17554
  var getFetch = (config) => {
15934
- let env = config && config.env || {};
15935
- const { fetch: fetch2, Request, Response } = env;
15936
- const seeds = [Request, Response, fetch2];
17555
+ const env = /* @__PURE__ */ Object.create(null);
17556
+ const configuredEnv = config && utils_default.hasOwnProp(config, "env") && config.env;
17557
+ ["fetch", "Request", "Response", "Blob"].forEach((key) => {
17558
+ if (configuredEnv && utils_default.hasOwnProp(configuredEnv, key)) {
17559
+ env[key] = configuredEnv[key];
17560
+ }
17561
+ });
17562
+ const { fetch: fetch2, Request, Response, Blob: Blob2 } = env;
17563
+ const seeds = [Request, Response, fetch2, Blob2];
15937
17564
  let len = seeds.length, i = len, seed, target, map = seedCache;
15938
17565
  while (i--) {
15939
17566
  seed = seeds[i];
@@ -15945,7 +17572,7 @@ var getFetch = (config) => {
15945
17572
  };
15946
17573
  var adapter = getFetch();
15947
17574
 
15948
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/adapters/adapters.js
17575
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/adapters.js
15949
17576
  var knownAdapters = {
15950
17577
  http: http_default,
15951
17578
  xhr: xhr_default,
@@ -15992,7 +17619,7 @@ function getAdapter(adapters, config) {
15992
17619
  let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
15993
17620
  throw new AxiosError_default(
15994
17621
  `There is no suitable adapter to dispatch the request ` + s,
15995
- "ERR_NOT_SUPPORT"
17622
+ AxiosError_default.ERR_NOT_SUPPORT
15996
17623
  );
15997
17624
  }
15998
17625
  return adapter2;
@@ -16010,7 +17637,7 @@ var adapters_default = {
16010
17637
  adapters: knownAdapters
16011
17638
  };
16012
17639
 
16013
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/dispatchRequest.js
17640
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/dispatchRequest.js
16014
17641
  function throwIfCancellationRequested(config) {
16015
17642
  if (config.cancelToken) {
16016
17643
  config.cancelToken.throwIfRequested();
@@ -16019,17 +17646,23 @@ function throwIfCancellationRequested(config) {
16019
17646
  throw new CanceledError_default(null, config);
16020
17647
  }
16021
17648
  }
16022
- function dispatchRequest(config) {
17649
+ function elapsedSince(start) {
17650
+ return Math.max(0, Date.now() - start);
17651
+ }
17652
+ function dispatchRequest(_config) {
17653
+ const config = utils_default.toSafeFlatObject(_config);
16023
17654
  throwIfCancellationRequested(config);
16024
- config.headers = AxiosHeaders_default.from(config.headers);
17655
+ config.headers = AxiosHeaders_default.from(utils_default.getSafeProp(config, "headers"));
16025
17656
  config.data = transformData.call(config, config.transformRequest);
16026
17657
  if (["post", "put", "patch"].indexOf(config.method) !== -1) {
16027
17658
  config.headers.setContentType("application/x-www-form-urlencoded", false);
16028
17659
  }
16029
17660
  const adapter2 = adapters_default.getAdapter(config.adapter || defaults_default.adapter, config);
17661
+ const start = Date.now();
16030
17662
  return adapter2(config).then(
16031
17663
  function onAdapterResolution(response) {
16032
17664
  throwIfCancellationRequested(config);
17665
+ response.duration = elapsedSince(start);
16033
17666
  config.response = response;
16034
17667
  try {
16035
17668
  response.data = transformData.call(config, config.transformResponse, response);
@@ -16043,6 +17676,7 @@ function dispatchRequest(config) {
16043
17676
  if (!isCancel(reason)) {
16044
17677
  throwIfCancellationRequested(config);
16045
17678
  if (reason && reason.response) {
17679
+ reason.response.duration = elapsedSince(start);
16046
17680
  config.response = reason.response;
16047
17681
  try {
16048
17682
  reason.response.data = transformData.call(
@@ -16061,7 +17695,7 @@ function dispatchRequest(config) {
16061
17695
  );
16062
17696
  }
16063
17697
 
16064
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/validator.js
17698
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/validator.js
16065
17699
  var validators = {};
16066
17700
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
16067
17701
  validators[type] = function validator(thing) {
@@ -16099,7 +17733,7 @@ validators.spelling = function spelling(correctSpelling) {
16099
17733
  };
16100
17734
  };
16101
17735
  function assertOptions(options, schema, allowUnknown) {
16102
- if (typeof options !== "object") {
17736
+ if (typeof options !== "object" || options === null) {
16103
17737
  throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
16104
17738
  }
16105
17739
  const keys = Object.keys(options);
@@ -16128,8 +17762,29 @@ var validator_default = {
16128
17762
  validators
16129
17763
  };
16130
17764
 
16131
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/Axios.js
17765
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/Axios.js
16132
17766
  var validators2 = validator_default.validators;
17767
+ var isHeadersBucket = (value) => {
17768
+ if (value == null || utils_default.isPlainObject(value) || value instanceof AxiosHeaders_default) {
17769
+ return true;
17770
+ }
17771
+ try {
17772
+ return utils_default.isObject(value) && utils_default.getSafeProp(value, Symbol.toStringTag) === "AxiosHeaders" && [
17773
+ "toJSON",
17774
+ "set",
17775
+ "get",
17776
+ "has",
17777
+ "delete",
17778
+ "clear",
17779
+ "normalize",
17780
+ "concat",
17781
+ "toString",
17782
+ Symbol.iterator
17783
+ ].every((method) => utils_default.isFunction(utils_default.getSafeProp(value, method)));
17784
+ } catch (e) {
17785
+ return false;
17786
+ }
17787
+ };
16133
17788
  var Axios = class {
16134
17789
  constructor(instanceConfig) {
16135
17790
  this.defaults = instanceConfig || {};
@@ -16151,24 +17806,27 @@ var Axios = class {
16151
17806
  return await this._request(configOrUrl, config);
16152
17807
  } catch (err) {
16153
17808
  if (err instanceof Error) {
16154
- let dummy = {};
16155
- Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
16156
- const stack = (() => {
16157
- if (!dummy.stack) {
16158
- return "";
16159
- }
16160
- const firstNewlineIndex = dummy.stack.indexOf("\n");
16161
- return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
16162
- })();
16163
17809
  try {
17810
+ let dummy = {};
17811
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
17812
+ const dummyStack = dummy.stack;
17813
+ let stack = "";
17814
+ if (typeof dummyStack === "string") {
17815
+ const firstNewlineIndex = dummyStack.indexOf("\n");
17816
+ stack = firstNewlineIndex === -1 ? "" : dummyStack.slice(firstNewlineIndex + 1);
17817
+ }
16164
17818
  if (!err.stack) {
16165
17819
  err.stack = stack;
16166
17820
  } else if (stack) {
16167
17821
  const firstNewlineIndex = stack.indexOf("\n");
16168
17822
  const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
16169
- const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
16170
- if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
16171
- err.stack += "\n" + stack;
17823
+ const duplicateCheckSuffix = secondNewlineIndex === -1 ? stack : stack.slice(secondNewlineIndex + 1);
17824
+ const currentStack = String(err.stack);
17825
+ const causeIndex = getCauseStackIndex(err, currentStack);
17826
+ const stackHead = causeIndex === -1 ? currentStack : currentStack.slice(0, causeIndex);
17827
+ const causeSection = causeIndex === -1 ? "" : currentStack.slice(causeIndex);
17828
+ if (!stackHead.endsWith(duplicateCheckSuffix)) {
17829
+ err.stack = stackHead + "\n" + stack + causeSection;
16172
17830
  }
16173
17831
  }
16174
17832
  } catch (e) {
@@ -16193,7 +17851,10 @@ var Axios = class {
16193
17851
  silentJSONParsing: validators2.transitional(validators2.boolean),
16194
17852
  forcedJSONParsing: validators2.transitional(validators2.boolean),
16195
17853
  clarifyTimeoutError: validators2.transitional(validators2.boolean),
16196
- legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
17854
+ legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean),
17855
+ advertiseZstdAcceptEncoding: validators2.transitional(validators2.boolean),
17856
+ validateStatusUndefinedResolves: validators2.transitional(validators2.boolean),
17857
+ encodeBasicAuthUsername: validators2.transitional(validators2.boolean)
16197
17858
  },
16198
17859
  false
16199
17860
  );
@@ -16215,7 +17876,7 @@ var Axios = class {
16215
17876
  }
16216
17877
  }
16217
17878
  if (config.allowAbsoluteUrls !== void 0) {
16218
- } else if (this.defaults.allowAbsoluteUrls !== void 0) {
17879
+ } else if (utils_default.hasOwnProp(this.defaults, "allowAbsoluteUrls") && this.defaults.allowAbsoluteUrls !== void 0) {
16219
17880
  config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
16220
17881
  } else {
16221
17882
  config.allowAbsoluteUrls = true;
@@ -16228,10 +17889,17 @@ var Axios = class {
16228
17889
  },
16229
17890
  true
16230
17891
  );
16231
- config.method = (config.method || this.defaults.method || "get").toLowerCase();
16232
- let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
16233
- headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
16234
- delete headers[method];
17892
+ config.method = (utils_default.getSafeProp(config, "method") || utils_default.getSafeProp(this.defaults, "method") || "get").toLowerCase();
17893
+ const commonHeaders = utils_default.getSafeProp(headers, "common");
17894
+ const methodHeaders = utils_default.getSafeProp(headers, config.method);
17895
+ const contextHeaders = headers && utils_default.merge(
17896
+ isHeadersBucket(commonHeaders) ? commonHeaders : void 0,
17897
+ isHeadersBucket(methodHeaders) ? methodHeaders : void 0
17898
+ );
17899
+ headers && utils_default.forEach(methodList_default.concat("common"), (method) => {
17900
+ if (isHeadersBucket(utils_default.getSafeProp(headers, method))) {
17901
+ delete headers[method];
17902
+ }
16235
17903
  });
16236
17904
  config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
16237
17905
  const requestInterceptorChain = [];
@@ -16273,16 +17941,31 @@ var Axios = class {
16273
17941
  const onFulfilled = requestInterceptorChain[i++];
16274
17942
  const onRejected = requestInterceptorChain[i++];
16275
17943
  try {
16276
- newConfig = onFulfilled(newConfig);
17944
+ newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
16277
17945
  } catch (error) {
16278
- onRejected.call(this, error);
17946
+ if (!onRejected) {
17947
+ promise = Promise.reject(error);
17948
+ break;
17949
+ }
17950
+ try {
17951
+ const rejectedResult = onRejected.call(this, error);
17952
+ if (utils_default.isThenable(rejectedResult)) {
17953
+ promise = Promise.resolve(rejectedResult).then(
17954
+ () => dispatchRequest.call(this, newConfig)
17955
+ );
17956
+ }
17957
+ } catch (rejectedError) {
17958
+ promise = Promise.reject(rejectedError);
17959
+ }
16279
17960
  break;
16280
17961
  }
16281
17962
  }
16282
- try {
16283
- promise = dispatchRequest.call(this, newConfig);
16284
- } catch (error) {
16285
- return Promise.reject(error);
17963
+ if (!promise) {
17964
+ try {
17965
+ promise = dispatchRequest.call(this, newConfig);
17966
+ } catch (error) {
17967
+ promise = Promise.reject(error);
17968
+ }
16286
17969
  }
16287
17970
  i = 0;
16288
17971
  len = responseInterceptorChain.length;
@@ -16293,24 +17976,24 @@ var Axios = class {
16293
17976
  }
16294
17977
  getUri(config) {
16295
17978
  config = mergeConfig(this.defaults, config);
16296
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
17979
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);
16297
17980
  return buildURL(fullPath, config.params, config.paramsSerializer);
16298
17981
  }
16299
17982
  };
16300
17983
  utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
16301
- Axios.prototype[method] = function(url2, config) {
17984
+ Axios.prototype[method] = async function(url2, config) {
16302
17985
  return this.request(
16303
17986
  mergeConfig(config || {}, {
16304
17987
  method,
16305
17988
  url: url2,
16306
- data: (config || {}).data
17989
+ data: config && utils_default.hasOwnProp(config, "data") ? config.data : void 0
16307
17990
  })
16308
17991
  );
16309
17992
  };
16310
17993
  });
16311
17994
  utils_default.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method) {
16312
17995
  function generateHTTPMethod(isForm) {
16313
- return function httpMethod(url2, data, config) {
17996
+ return async function httpMethod(url2, data, config) {
16314
17997
  return this.request(
16315
17998
  mergeConfig(config || {}, {
16316
17999
  method,
@@ -16330,7 +18013,7 @@ utils_default.forEach(["post", "put", "patch", "query"], function forEachMethodW
16330
18013
  });
16331
18014
  var Axios_default = Axios;
16332
18015
 
16333
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/cancel/CancelToken.js
18016
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/CancelToken.js
16334
18017
  var CancelToken = class _CancelToken {
16335
18018
  constructor(executor) {
16336
18019
  if (typeof executor !== "function") {
@@ -16428,19 +18111,19 @@ var CancelToken = class _CancelToken {
16428
18111
  };
16429
18112
  var CancelToken_default = CancelToken;
16430
18113
 
16431
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/spread.js
18114
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/spread.js
16432
18115
  function spread(callback) {
16433
18116
  return function wrap(arr) {
16434
18117
  return callback.apply(null, arr);
16435
18118
  };
16436
18119
  }
16437
18120
 
16438
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/isAxiosError.js
18121
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isAxiosError.js
16439
18122
  function isAxiosError(payload) {
16440
18123
  return utils_default.isObject(payload) && payload.isAxiosError === true;
16441
18124
  }
16442
18125
 
16443
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/HttpStatusCode.js
18126
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/HttpStatusCode.js
16444
18127
  var HttpStatusCode = {
16445
18128
  Continue: 100,
16446
18129
  SwitchingProtocols: 101,
@@ -16478,14 +18161,22 @@ var HttpStatusCode = {
16478
18161
  Gone: 410,
16479
18162
  LengthRequired: 411,
16480
18163
  PreconditionFailed: 412,
18164
+ /**
18165
+ * @deprecated Use `ContentTooLarge` instead.
18166
+ */
16481
18167
  PayloadTooLarge: 413,
18168
+ ContentTooLarge: 413,
16482
18169
  UriTooLong: 414,
16483
18170
  UnsupportedMediaType: 415,
16484
18171
  RangeNotSatisfiable: 416,
16485
18172
  ExpectationFailed: 417,
16486
18173
  ImATeapot: 418,
16487
18174
  MisdirectedRequest: 421,
18175
+ /**
18176
+ * @deprecated Use `UnprocessableContent` instead.
18177
+ */
16488
18178
  UnprocessableEntity: 422,
18179
+ UnprocessableContent: 422,
16489
18180
  Locked: 423,
16490
18181
  FailedDependency: 424,
16491
18182
  TooEarly: 425,
@@ -16505,6 +18196,7 @@ var HttpStatusCode = {
16505
18196
  LoopDetected: 508,
16506
18197
  NotExtended: 510,
16507
18198
  NetworkAuthenticationRequired: 511,
18199
+ WebServerReturnsAnUnknownError: 520,
16508
18200
  WebServerIsDown: 521,
16509
18201
  ConnectionTimedOut: 522,
16510
18202
  OriginIsUnreachable: 523,
@@ -16513,11 +18205,13 @@ var HttpStatusCode = {
16513
18205
  InvalidSslCertificate: 526
16514
18206
  };
16515
18207
  Object.entries(HttpStatusCode).forEach(([key, value]) => {
16516
- HttpStatusCode[value] = key;
18208
+ if (HttpStatusCode[value] === void 0) {
18209
+ HttpStatusCode[value] = key;
18210
+ }
16517
18211
  });
16518
18212
  var HttpStatusCode_default = HttpStatusCode;
16519
18213
 
16520
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/axios.js
18214
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/axios.js
16521
18215
  function createInstance(defaultConfig) {
16522
18216
  const context = new Axios_default(defaultConfig);
16523
18217
  const instance = bind(Axios_default.prototype.request, context);
@@ -16550,7 +18244,7 @@ axios.HttpStatusCode = HttpStatusCode_default;
16550
18244
  axios.default = axios;
16551
18245
  var axios_default = axios;
16552
18246
 
16553
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/index.js
18247
+ // ../../node_modules/.pnpm/axios@1.21.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/index.js
16554
18248
  var {
16555
18249
  Axios: Axios2,
16556
18250
  AxiosError: AxiosError2,
@@ -16571,18 +18265,18 @@ var {
16571
18265
  create
16572
18266
  } = axios_default;
16573
18267
 
16574
- // ../../node_modules/.pnpm/pipenet@1.4.0_patch_hash=24bd89f8b5bea6a63243b7a7d4ad888dcf7049e36eac19b10006403b29758c35/node_modules/pipenet/dist/Tunnel.js
18268
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/Tunnel.js
16575
18269
  var import_debug2 = __toESM(require_src(), 1);
16576
18270
  import { EventEmitter as EventEmitter3 } from "events";
16577
18271
 
16578
- // ../../node_modules/.pnpm/pipenet@1.4.0_patch_hash=24bd89f8b5bea6a63243b7a7d4ad888dcf7049e36eac19b10006403b29758c35/node_modules/pipenet/dist/TunnelCluster.js
18272
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/TunnelCluster.js
16579
18273
  var import_debug = __toESM(require_src(), 1);
16580
18274
  import { EventEmitter as EventEmitter2 } from "events";
16581
18275
  import fs from "fs";
16582
18276
  import net from "net";
16583
18277
  import tls from "tls";
16584
18278
 
16585
- // ../../node_modules/.pnpm/pipenet@1.4.0_patch_hash=24bd89f8b5bea6a63243b7a7d4ad888dcf7049e36eac19b10006403b29758c35/node_modules/pipenet/dist/HeaderHostTransformer.js
18279
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/HeaderHostTransformer.js
16586
18280
  import { Transform } from "stream";
16587
18281
  var HeaderHostTransformer = class extends Transform {
16588
18282
  host;
@@ -16600,7 +18294,7 @@ var HeaderHostTransformer = class extends Transform {
16600
18294
  }
16601
18295
  };
16602
18296
 
16603
- // ../../node_modules/.pnpm/pipenet@1.4.0_patch_hash=24bd89f8b5bea6a63243b7a7d4ad888dcf7049e36eac19b10006403b29758c35/node_modules/pipenet/dist/TunnelCluster.js
18297
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/TunnelCluster.js
16604
18298
  var log = (0, import_debug.default)("pipenet:client");
16605
18299
  var TunnelCluster = class extends EventEmitter2 {
16606
18300
  opts;
@@ -16633,18 +18327,10 @@ var TunnelCluster = class extends EventEmitter2 {
16633
18327
  }
16634
18328
  remote.end();
16635
18329
  });
16636
- let deadEmitted = false;
16637
- const emitDead = () => {
16638
- if (deadEmitted) {
16639
- return;
16640
- }
16641
- deadEmitted = true;
16642
- this.emit("dead", remote);
16643
- };
16644
18330
  const connLocal = () => {
16645
18331
  if (remote.destroyed) {
16646
18332
  log("remote destroyed");
16647
- emitDead();
18333
+ this.emit("dead", remote);
16648
18334
  return;
16649
18335
  }
16650
18336
  log("connecting locally to %s://%s:%d", localProtocol, localHost, localPort);
@@ -16660,7 +18346,7 @@ var TunnelCluster = class extends EventEmitter2 {
16660
18346
  const local = opt.localHttps ? tls.connect({ host: localHost, port: localPort, ...getLocalCertOpts() }) : net.connect({ host: localHost, port: localPort });
16661
18347
  const remoteClose = () => {
16662
18348
  log("remote close");
16663
- emitDead();
18349
+ this.emit("dead", remote);
16664
18350
  local.end();
16665
18351
  };
16666
18352
  remote.once("close", remoteClose);
@@ -16708,7 +18394,7 @@ var TunnelCluster = class extends EventEmitter2 {
16708
18394
  }
16709
18395
  };
16710
18396
 
16711
- // ../../node_modules/.pnpm/pipenet@1.4.0_patch_hash=24bd89f8b5bea6a63243b7a7d4ad888dcf7049e36eac19b10006403b29758c35/node_modules/pipenet/dist/Tunnel.js
18397
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/Tunnel.js
16712
18398
  var log2 = (0, import_debug2.default)("pipenet:client");
16713
18399
  var Tunnel = class extends EventEmitter3 {
16714
18400
  cachedUrl;
@@ -16856,7 +18542,7 @@ var Tunnel = class extends EventEmitter3 {
16856
18542
  }
16857
18543
  };
16858
18544
 
16859
- // ../../node_modules/.pnpm/pipenet@1.4.0_patch_hash=24bd89f8b5bea6a63243b7a7d4ad888dcf7049e36eac19b10006403b29758c35/node_modules/pipenet/dist/pipenet.js
18545
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=1f981b2d51def052d8bcaf5198a95e014a999e3adb5c5fc5dcf3d287cd19bf78_supports-color@8.1.1/node_modules/pipenet/dist/pipenet.js
16860
18546
  function pipenet(arg1, arg2, arg3) {
16861
18547
  const options = typeof arg1 === "object" ? arg1 : { ...arg2, port: arg1 };
16862
18548
  const callback = typeof arg1 === "object" ? arg2 : arg3;