@wzyjs/utils 0.3.27 → 0.3.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/web.cjs.js CHANGED
@@ -61,7 +61,7 @@ var __export = (target, all) => {
61
61
  });
62
62
  };
63
63
 
64
- // ../../node_modules/crypt/crypt.js
64
+ // ../../node_modules/.bun/crypt@0.0.2/node_modules/crypt/crypt.js
65
65
  var require_crypt = __commonJS((exports2, module2) => {
66
66
  (function() {
67
67
  var base64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", crypt = {
@@ -131,7 +131,7 @@ var require_crypt = __commonJS((exports2, module2) => {
131
131
  })();
132
132
  });
133
133
 
134
- // ../../node_modules/charenc/charenc.js
134
+ // ../../node_modules/.bun/charenc@0.0.2/node_modules/charenc/charenc.js
135
135
  var require_charenc = __commonJS((exports2, module2) => {
136
136
  var charenc = {
137
137
  utf8: {
@@ -158,7 +158,7 @@ var require_charenc = __commonJS((exports2, module2) => {
158
158
  module2.exports = charenc;
159
159
  });
160
160
 
161
- // ../../node_modules/is-buffer/index.js
161
+ // ../../node_modules/.bun/is-buffer@1.1.6/node_modules/is-buffer/index.js
162
162
  var require_is_buffer = __commonJS((exports2, module2) => {
163
163
  /*!
164
164
  * Determine if an object is a Buffer
@@ -177,7 +177,7 @@ var require_is_buffer = __commonJS((exports2, module2) => {
177
177
  }
178
178
  });
179
179
 
180
- // ../../node_modules/md5/md5.js
180
+ // ../../node_modules/.bun/md5@2.3.0/node_modules/md5/md5.js
181
181
  var require_md5 = __commonJS((exports2, module2) => {
182
182
  (function() {
183
183
  var crypt = require_crypt(), utf8 = require_charenc().utf8, isBuffer = require_is_buffer(), bin = require_charenc().bin, md5 = function(message, options) {
@@ -297,7 +297,7 @@ var require_md5 = __commonJS((exports2, module2) => {
297
297
  })();
298
298
  });
299
299
 
300
- // ../../node_modules/json5/dist/index.js
300
+ // ../../node_modules/.bun/json5@2.2.3/node_modules/json5/dist/index.js
301
301
  var require_dist = __commonJS((exports2, module2) => {
302
302
  (function(global2, factory2) {
303
303
  typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory2() : typeof define === "function" && define.amd ? define(factory2) : global2.JSON5 = factory2();
@@ -493,14 +493,14 @@ var require_dist = __commonJS((exports2, module2) => {
493
493
  var target = IS_GLOBAL ? _global2 : IS_STATIC ? _global2[name] || (_global2[name] = {}) : (_global2[name] || {})[PROTOTYPE];
494
494
  var exports3 = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});
495
495
  var expProto = exports3[PROTOTYPE] || (exports3[PROTOTYPE] = {});
496
- var key2, own, out, exp;
496
+ var key2, own2, out, exp;
497
497
  if (IS_GLOBAL) {
498
498
  source2 = name;
499
499
  }
500
500
  for (key2 in source2) {
501
- own = !IS_FORCED && target && target[key2] !== undefined;
502
- out = (own ? target : source2)[key2];
503
- exp = IS_BIND && own ? _ctx(out, _global2) : IS_PROTO && typeof out == "function" ? _ctx(Function.call, out) : out;
501
+ own2 = !IS_FORCED && target && target[key2] !== undefined;
502
+ out = (own2 ? target : source2)[key2];
503
+ exp = IS_BIND && own2 ? _ctx(out, _global2) : IS_PROTO && typeof out == "function" ? _ctx(Function.call, out) : out;
504
504
  if (target) {
505
505
  _redefine(target, key2, out, type & $export.U);
506
506
  }
@@ -1683,7 +1683,7 @@ var require_dist = __commonJS((exports2, module2) => {
1683
1683
  });
1684
1684
  });
1685
1685
 
1686
- // ../../node_modules/consola/dist/consola.browser.js
1686
+ // ../../node_modules/.bun/consola@2.15.3/node_modules/consola/dist/consola.browser.js
1687
1687
  var require_consola_browser = __commonJS((exports2, module2) => {
1688
1688
  (function(t, e) {
1689
1689
  typeof exports2 == "object" && typeof module2 != "undefined" ? module2.exports = e() : typeof define == "function" && define.amd ? define(e) : (t = t || self).consola = e();
@@ -1936,7 +1936,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1936
1936
  });
1937
1937
  });
1938
1938
 
1939
- // ../../node_modules/classnames/index.js
1939
+ // ../../node_modules/.bun/classnames@2.5.1/node_modules/classnames/index.js
1940
1940
  var require_classnames = __commonJS((exports2, module2) => {
1941
1941
  /*!
1942
1942
  Copyright (c) 2018 Jed Watson.
@@ -1998,7 +1998,7 @@ var require_classnames = __commonJS((exports2, module2) => {
1998
1998
  })();
1999
1999
  });
2000
2000
 
2001
- // ../../node_modules/localforage/dist/localforage.js
2001
+ // ../../node_modules/.bun/localforage@1.10.0/node_modules/localforage/dist/localforage.js
2002
2002
  var require_localforage = __commonJS((exports2, module2) => {
2003
2003
  /*!
2004
2004
  localForage -- Offline Storage, Improved
@@ -4131,7 +4131,7 @@ var require_localforage = __commonJS((exports2, module2) => {
4131
4131
  });
4132
4132
  });
4133
4133
 
4134
- // ../../node_modules/toggle-selection/index.js
4134
+ // ../../node_modules/.bun/toggle-selection@1.0.6/node_modules/toggle-selection/index.js
4135
4135
  var require_toggle_selection = __commonJS((exports2, module2) => {
4136
4136
  module2.exports = function() {
4137
4137
  var selection = document.getSelection();
@@ -4165,7 +4165,7 @@ var require_toggle_selection = __commonJS((exports2, module2) => {
4165
4165
  };
4166
4166
  });
4167
4167
 
4168
- // ../../node_modules/copy-to-clipboard/index.js
4168
+ // ../../node_modules/.bun/copy-to-clipboard@3.3.3/node_modules/copy-to-clipboard/index.js
4169
4169
  var require_copy_to_clipboard = __commonJS((exports2, module2) => {
4170
4170
  var deselectCurrent = require_toggle_selection();
4171
4171
  var clipboardToIE11Formatting = {
@@ -4259,13 +4259,13 @@ var require_copy_to_clipboard = __commonJS((exports2, module2) => {
4259
4259
  module2.exports = copy;
4260
4260
  });
4261
4261
 
4262
- // ../../node_modules/lodash/lodash.js
4262
+ // ../../node_modules/.bun/lodash@4.18.1/node_modules/lodash/lodash.js
4263
4263
  var require_lodash = __commonJS((exports2, module2) => {
4264
4264
  (function() {
4265
4265
  var undefined2;
4266
- var VERSION2 = "4.17.21";
4266
+ var VERSION2 = "4.18.1";
4267
4267
  var LARGE_ARRAY_SIZE = 200;
4268
- var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
4268
+ var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`", INVALID_TEMPL_IMPORTS_ERROR_TEXT = "Invalid `imports` option passed into `_.template`";
4269
4269
  var HASH_UNDEFINED = "__lodash_hash_undefined__";
4270
4270
  var MAX_MEMOIZE_SIZE = 500;
4271
4271
  var PLACEHOLDER = "__lodash_placeholder__";
@@ -6140,8 +6140,21 @@ var require_lodash = __commonJS((exports2, module2) => {
6140
6140
  }
6141
6141
  function baseUnset(object, path) {
6142
6142
  path = castPath(path, object);
6143
- object = parent(object, path);
6144
- return object == null || delete object[toKey(last(path))];
6143
+ var index = -1, length = path.length;
6144
+ if (!length) {
6145
+ return true;
6146
+ }
6147
+ while (++index < length) {
6148
+ var key = toKey(path[index]);
6149
+ if (key === "__proto__" && !hasOwnProperty2.call(object, "__proto__")) {
6150
+ return false;
6151
+ }
6152
+ if ((key === "constructor" || key === "prototype") && index < length - 1) {
6153
+ return false;
6154
+ }
6155
+ }
6156
+ var obj = parent(object, path);
6157
+ return obj == null || delete obj[toKey(last(path))];
6145
6158
  }
6146
6159
  function baseUpdate(object, path, updater, customizer) {
6147
6160
  return baseSet(object, path, updater(baseGet(object, path)), customizer);
@@ -7444,7 +7457,7 @@ var require_lodash = __commonJS((exports2, module2) => {
7444
7457
  var index = -1, length = pairs == null ? 0 : pairs.length, result2 = {};
7445
7458
  while (++index < length) {
7446
7459
  var pair = pairs[index];
7447
- result2[pair[0]] = pair[1];
7460
+ baseAssignValue(result2, pair[0], pair[1]);
7448
7461
  }
7449
7462
  return result2;
7450
7463
  }
@@ -8445,8 +8458,8 @@ var require_lodash = __commonJS((exports2, module2) => {
8445
8458
  copyObject(source, keys(source), object, customizer);
8446
8459
  });
8447
8460
  var at = flatRest(baseAt);
8448
- function create(prototype3, properties) {
8449
- var result2 = baseCreate(prototype3);
8461
+ function create(prototype2, properties) {
8462
+ var result2 = baseCreate(prototype2);
8450
8463
  return properties == null ? result2 : baseAssign(result2, properties);
8451
8464
  }
8452
8465
  var defaults2 = baseRest(function(object, sources) {
@@ -8828,8 +8841,13 @@ var require_lodash = __commonJS((exports2, module2) => {
8828
8841
  options = undefined2;
8829
8842
  }
8830
8843
  string = toString3(string);
8831
- options = assignInWith({}, options, settings, customDefaultsAssignIn);
8832
- var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys);
8844
+ options = assignWith({}, options, settings, customDefaultsAssignIn);
8845
+ var imports = assignWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys);
8846
+ arrayEach(importsKeys, function(key) {
8847
+ if (reForbiddenIdentifierChars.test(key)) {
8848
+ throw new Error2(INVALID_TEMPL_IMPORTS_ERROR_TEXT);
8849
+ }
8850
+ });
8833
8851
  var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '";
8834
8852
  var reDelimiters = RegExp2((options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$", "g");
8835
8853
  var sourceURL = "//# sourceURL=" + (hasOwnProperty2.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + `
@@ -9675,7 +9693,7 @@ __p += '`;
9675
9693
  }).call(exports2);
9676
9694
  });
9677
9695
 
9678
- // ../../node_modules/dayjs/dayjs.min.js
9696
+ // ../../node_modules/.bun/dayjs@1.11.20/node_modules/dayjs/dayjs.min.js
9679
9697
  var require_dayjs_min = __commonJS((exports2, module2) => {
9680
9698
  (function(t, e) {
9681
9699
  typeof exports2 == "object" && typeof module2 != "undefined" ? module2.exports = e() : typeof define == "function" && define.amd ? define(e) : (t = typeof globalThis != "undefined" ? globalThis : t || self).dayjs = e();
@@ -9966,7 +9984,7 @@ var require_dayjs_min = __commonJS((exports2, module2) => {
9966
9984
  });
9967
9985
  });
9968
9986
 
9969
- // ../../node_modules/dayjs/plugin/isBetween.js
9987
+ // ../../node_modules/.bun/dayjs@1.11.20/node_modules/dayjs/plugin/isBetween.js
9970
9988
  var require_isBetween = __commonJS((exports2, module2) => {
9971
9989
  (function(e, i) {
9972
9990
  typeof exports2 == "object" && typeof module2 != "undefined" ? module2.exports = i() : typeof define == "function" && define.amd ? define(i) : (e = typeof globalThis != "undefined" ? globalThis : e || self).dayjs_plugin_isBetween = i();
@@ -9980,7 +9998,7 @@ var require_isBetween = __commonJS((exports2, module2) => {
9980
9998
  });
9981
9999
  });
9982
10000
 
9983
- // ../../node_modules/dayjs/plugin/weekday.js
10001
+ // ../../node_modules/.bun/dayjs@1.11.20/node_modules/dayjs/plugin/weekday.js
9984
10002
  var require_weekday = __commonJS((exports2, module2) => {
9985
10003
  (function(e, t) {
9986
10004
  typeof exports2 == "object" && typeof module2 != "undefined" ? module2.exports = t() : typeof define == "function" && define.amd ? define(t) : (e = typeof globalThis != "undefined" ? globalThis : e || self).dayjs_plugin_weekday = t();
@@ -9994,7 +10012,7 @@ var require_weekday = __commonJS((exports2, module2) => {
9994
10012
  });
9995
10013
  });
9996
10014
 
9997
- // ../../node_modules/dayjs/plugin/localeData.js
10015
+ // ../../node_modules/.bun/dayjs@1.11.20/node_modules/dayjs/plugin/localeData.js
9998
10016
  var require_localeData = __commonJS((exports2, module2) => {
9999
10017
  (function(n, e) {
10000
10018
  typeof exports2 == "object" && typeof module2 != "undefined" ? module2.exports = e() : typeof define == "function" && define.amd ? define(e) : (n = typeof globalThis != "undefined" ? globalThis : n || self).dayjs_plugin_localeData = e();
@@ -10072,7 +10090,7 @@ var require_localeData = __commonJS((exports2, module2) => {
10072
10090
  });
10073
10091
  });
10074
10092
 
10075
- // ../../node_modules/dayjs/plugin/isoWeek.js
10093
+ // ../../node_modules/.bun/dayjs@1.11.20/node_modules/dayjs/plugin/isoWeek.js
10076
10094
  var require_isoWeek = __commonJS((exports2, module2) => {
10077
10095
  (function(e, t) {
10078
10096
  typeof exports2 == "object" && typeof module2 != "undefined" ? module2.exports = t() : typeof define == "function" && define.amd ? define(t) : (e = typeof globalThis != "undefined" ? globalThis : e || self).dayjs_plugin_isoWeek = t();
@@ -10101,7 +10119,7 @@ var require_isoWeek = __commonJS((exports2, module2) => {
10101
10119
  });
10102
10120
  });
10103
10121
 
10104
- // ../../node_modules/dayjs/plugin/updateLocale.js
10122
+ // ../../node_modules/.bun/dayjs@1.11.20/node_modules/dayjs/plugin/updateLocale.js
10105
10123
  var require_updateLocale = __commonJS((exports2, module2) => {
10106
10124
  (function(e, t) {
10107
10125
  typeof exports2 == "object" && typeof module2 != "undefined" ? module2.exports = t() : typeof define == "function" && define.amd ? define(t) : (e = typeof globalThis != "undefined" ? globalThis : e || self).dayjs_plugin_updateLocale = t();
@@ -10128,7 +10146,7 @@ var require_updateLocale = __commonJS((exports2, module2) => {
10128
10146
  });
10129
10147
  });
10130
10148
 
10131
- // ../../node_modules/dayjs/plugin/timezone.js
10149
+ // ../../node_modules/.bun/dayjs@1.11.20/node_modules/dayjs/plugin/timezone.js
10132
10150
  var require_timezone = __commonJS((exports2, module2) => {
10133
10151
  (function(t, e) {
10134
10152
  typeof exports2 == "object" && typeof module2 != "undefined" ? module2.exports = e() : typeof define == "function" && define.amd ? define(e) : (t = typeof globalThis != "undefined" ? globalThis : t || self).dayjs_plugin_timezone = e();
@@ -10194,7 +10212,7 @@ var require_timezone = __commonJS((exports2, module2) => {
10194
10212
  });
10195
10213
  });
10196
10214
 
10197
- // ../../node_modules/dayjs/plugin/isSameOrAfter.js
10215
+ // ../../node_modules/.bun/dayjs@1.11.20/node_modules/dayjs/plugin/isSameOrAfter.js
10198
10216
  var require_isSameOrAfter = __commonJS((exports2, module2) => {
10199
10217
  (function(e, t) {
10200
10218
  typeof exports2 == "object" && typeof module2 != "undefined" ? module2.exports = t() : typeof define == "function" && define.amd ? define(t) : (e = typeof globalThis != "undefined" ? globalThis : e || self).dayjs_plugin_isSameOrAfter = t();
@@ -10207,7 +10225,7 @@ var require_isSameOrAfter = __commonJS((exports2, module2) => {
10207
10225
  });
10208
10226
  });
10209
10227
 
10210
- // ../../node_modules/dayjs/plugin/isSameOrBefore.js
10228
+ // ../../node_modules/.bun/dayjs@1.11.20/node_modules/dayjs/plugin/isSameOrBefore.js
10211
10229
  var require_isSameOrBefore = __commonJS((exports2, module2) => {
10212
10230
  (function(e, i) {
10213
10231
  typeof exports2 == "object" && typeof module2 != "undefined" ? module2.exports = i() : typeof define == "function" && define.amd ? define(i) : (e = typeof globalThis != "undefined" ? globalThis : e || self).dayjs_plugin_isSameOrBefore = i();
@@ -10220,7 +10238,7 @@ var require_isSameOrBefore = __commonJS((exports2, module2) => {
10220
10238
  });
10221
10239
  });
10222
10240
 
10223
- // ../../node_modules/dayjs/plugin/utc.js
10241
+ // ../../node_modules/.bun/dayjs@1.11.20/node_modules/dayjs/plugin/utc.js
10224
10242
  var require_utc = __commonJS((exports2, module2) => {
10225
10243
  (function(t, i) {
10226
10244
  typeof exports2 == "object" && typeof module2 != "undefined" ? module2.exports = i() : typeof define == "function" && define.amd ? define(i) : (t = typeof globalThis != "undefined" ? globalThis : t || self).dayjs_plugin_utc = i();
@@ -10301,7 +10319,7 @@ var require_utc = __commonJS((exports2, module2) => {
10301
10319
  });
10302
10320
  });
10303
10321
 
10304
- // ../../node_modules/dayjs/locale/zh-cn.js
10322
+ // ../../node_modules/.bun/dayjs@1.11.20/node_modules/dayjs/locale/zh-cn.js
10305
10323
  var require_zh_cn = __commonJS((exports2, module2) => {
10306
10324
  (function(e, _) {
10307
10325
  typeof exports2 == "object" && typeof module2 != "undefined" ? module2.exports = _(require_dayjs_min()) : typeof define == "function" && define.amd ? define(["dayjs"], _) : (e = typeof globalThis != "undefined" ? globalThis : e || self).dayjs_locale_zh_cn = _(e.dayjs);
@@ -10499,7 +10517,7 @@ __export(exports_web, {
10499
10517
  });
10500
10518
  module.exports = __toCommonJS(exports_web);
10501
10519
 
10502
- // ../../node_modules/zod/v3/external.js
10520
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
10503
10521
  var exports_external = {};
10504
10522
  __export(exports_external, {
10505
10523
  void: () => voidType,
@@ -10611,7 +10629,7 @@ __export(exports_external, {
10611
10629
  BRAND: () => BRAND
10612
10630
  });
10613
10631
 
10614
- // ../../node_modules/zod/v3/helpers/util.js
10632
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
10615
10633
  var util;
10616
10634
  (function(util2) {
10617
10635
  util2.assertEqual = (_) => {};
@@ -10742,7 +10760,7 @@ var getParsedType = (data) => {
10742
10760
  }
10743
10761
  };
10744
10762
 
10745
- // ../../node_modules/zod/v3/ZodError.js
10763
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
10746
10764
  var ZodIssueCode = util.arrayToEnum([
10747
10765
  "invalid_type",
10748
10766
  "invalid_literal",
@@ -10861,7 +10879,7 @@ ZodError.create = (issues) => {
10861
10879
  return error;
10862
10880
  };
10863
10881
 
10864
- // ../../node_modules/zod/v3/locales/en.js
10882
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
10865
10883
  var errorMap = (issue, _ctx) => {
10866
10884
  let message;
10867
10885
  switch (issue.code) {
@@ -10964,7 +10982,7 @@ var errorMap = (issue, _ctx) => {
10964
10982
  };
10965
10983
  var en_default = errorMap;
10966
10984
 
10967
- // ../../node_modules/zod/v3/errors.js
10985
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
10968
10986
  var overrideErrorMap = en_default;
10969
10987
  function setErrorMap(map) {
10970
10988
  overrideErrorMap = map;
@@ -10972,7 +10990,7 @@ function setErrorMap(map) {
10972
10990
  function getErrorMap() {
10973
10991
  return overrideErrorMap;
10974
10992
  }
10975
- // ../../node_modules/zod/v3/helpers/parseUtil.js
10993
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
10976
10994
  var makeIssue = (params) => {
10977
10995
  const { data, path, errorMaps, issueData } = params;
10978
10996
  const fullPath = [...path, ...issueData.path || []];
@@ -11078,14 +11096,14 @@ var isAborted = (x) => x.status === "aborted";
11078
11096
  var isDirty = (x) => x.status === "dirty";
11079
11097
  var isValid = (x) => x.status === "valid";
11080
11098
  var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
11081
- // ../../node_modules/zod/v3/helpers/errorUtil.js
11099
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
11082
11100
  var errorUtil;
11083
11101
  (function(errorUtil2) {
11084
11102
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
11085
11103
  errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
11086
11104
  })(errorUtil || (errorUtil = {}));
11087
11105
 
11088
- // ../../node_modules/zod/v3/types.js
11106
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
11089
11107
  class ParseInputLazyPath {
11090
11108
  constructor(parent, value, path, key) {
11091
11109
  this._cachedPath = [];
@@ -14475,14 +14493,14 @@ var NEVER = INVALID;
14475
14493
  // src/web.ts
14476
14494
  var import_md5 = __toESM(require_md5(), 1);
14477
14495
 
14478
- // ../../node_modules/axios/lib/helpers/bind.js
14496
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/bind.js
14479
14497
  function bind(fn, thisArg) {
14480
14498
  return function wrap() {
14481
14499
  return fn.apply(thisArg, arguments);
14482
14500
  };
14483
14501
  }
14484
14502
 
14485
- // ../../node_modules/axios/lib/utils.js
14503
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/utils.js
14486
14504
  var { toString } = Object.prototype;
14487
14505
  var { getPrototypeOf } = Object;
14488
14506
  var { iterator, toStringTag } = Symbol;
@@ -14534,16 +14552,49 @@ var isEmptyObject = (val) => {
14534
14552
  };
14535
14553
  var isDate = kindOfTest("Date");
14536
14554
  var isFile = kindOfTest("File");
14555
+ var isReactNativeBlob = (value) => {
14556
+ return !!(value && typeof value.uri !== "undefined");
14557
+ };
14558
+ var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
14537
14559
  var isBlob = kindOfTest("Blob");
14538
14560
  var isFileList = kindOfTest("FileList");
14539
14561
  var isStream = (val) => isObject(val) && isFunction(val.pipe);
14562
+ function getGlobal() {
14563
+ if (typeof globalThis !== "undefined")
14564
+ return globalThis;
14565
+ if (typeof self !== "undefined")
14566
+ return self;
14567
+ if (typeof window !== "undefined")
14568
+ return window;
14569
+ if (typeof global !== "undefined")
14570
+ return global;
14571
+ return {};
14572
+ }
14573
+ var G = getGlobal();
14574
+ var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : undefined;
14540
14575
  var isFormData = (thing) => {
14541
- let kind;
14542
- return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
14576
+ if (!thing)
14577
+ return false;
14578
+ if (FormDataCtor && thing instanceof FormDataCtor)
14579
+ return true;
14580
+ const proto = getPrototypeOf(thing);
14581
+ if (!proto || proto === Object.prototype)
14582
+ return false;
14583
+ if (!isFunction(thing.append))
14584
+ return false;
14585
+ const kind = kindOf(thing);
14586
+ return kind === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]";
14543
14587
  };
14544
14588
  var isURLSearchParams = kindOfTest("URLSearchParams");
14545
- var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
14546
- var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
14589
+ var [isReadableStream, isRequest, isResponse, isHeaders] = [
14590
+ "ReadableStream",
14591
+ "Request",
14592
+ "Response",
14593
+ "Headers"
14594
+ ].map(kindOfTest);
14595
+ var trim = (str) => {
14596
+ return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
14597
+ };
14547
14598
  function forEach(obj, fn, { allOwnKeys = false } = {}) {
14548
14599
  if (obj === null || typeof obj === "undefined") {
14549
14600
  return;
@@ -14592,13 +14643,17 @@ var _global = (() => {
14592
14643
  return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
14593
14644
  })();
14594
14645
  var isContextDefined = (context) => !isUndefined(context) && context !== _global;
14595
- function merge() {
14646
+ function merge(...objs) {
14596
14647
  const { caseless, skipUndefined } = isContextDefined(this) && this || {};
14597
14648
  const result = {};
14598
14649
  const assignValue = (val, key) => {
14650
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
14651
+ return;
14652
+ }
14599
14653
  const targetKey = caseless && findKey(result, key) || key;
14600
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
14601
- result[targetKey] = merge(result[targetKey], val);
14654
+ const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined;
14655
+ if (isPlainObject(existing) && isPlainObject(val)) {
14656
+ result[targetKey] = merge(existing, val);
14602
14657
  } else if (isPlainObject(val)) {
14603
14658
  result[targetKey] = merge({}, val);
14604
14659
  } else if (isArray(val)) {
@@ -14607,17 +14662,29 @@ function merge() {
14607
14662
  result[targetKey] = val;
14608
14663
  }
14609
14664
  };
14610
- for (let i = 0, l = arguments.length;i < l; i++) {
14611
- arguments[i] && forEach(arguments[i], assignValue);
14665
+ for (let i = 0, l = objs.length;i < l; i++) {
14666
+ objs[i] && forEach(objs[i], assignValue);
14612
14667
  }
14613
14668
  return result;
14614
14669
  }
14615
14670
  var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
14616
14671
  forEach(b, (val, key) => {
14617
14672
  if (thisArg && isFunction(val)) {
14618
- a[key] = bind(val, thisArg);
14673
+ Object.defineProperty(a, key, {
14674
+ __proto__: null,
14675
+ value: bind(val, thisArg),
14676
+ writable: true,
14677
+ enumerable: true,
14678
+ configurable: true
14679
+ });
14619
14680
  } else {
14620
- a[key] = val;
14681
+ Object.defineProperty(a, key, {
14682
+ __proto__: null,
14683
+ value: val,
14684
+ writable: true,
14685
+ enumerable: true,
14686
+ configurable: true
14687
+ });
14621
14688
  }
14622
14689
  }, { allOwnKeys });
14623
14690
  return a;
@@ -14630,8 +14697,15 @@ var stripBOM = (content) => {
14630
14697
  };
14631
14698
  var inherits = (constructor, superConstructor, props, descriptors) => {
14632
14699
  constructor.prototype = Object.create(superConstructor.prototype, descriptors);
14633
- constructor.prototype.constructor = constructor;
14700
+ Object.defineProperty(constructor.prototype, "constructor", {
14701
+ __proto__: null,
14702
+ value: constructor,
14703
+ writable: true,
14704
+ enumerable: false,
14705
+ configurable: true
14706
+ });
14634
14707
  Object.defineProperty(constructor, "super", {
14708
+ __proto__: null,
14635
14709
  value: superConstructor.prototype
14636
14710
  });
14637
14711
  props && Object.assign(constructor.prototype, props);
@@ -14724,7 +14798,7 @@ var reduceDescriptors = (obj, reducer) => {
14724
14798
  };
14725
14799
  var freezeMethods = (obj) => {
14726
14800
  reduceDescriptors(obj, (descriptor, name) => {
14727
- if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
14801
+ if (isFunction(obj) && ["arguments", "caller", "callee"].includes(name)) {
14728
14802
  return false;
14729
14803
  }
14730
14804
  const value = obj[name];
@@ -14823,6 +14897,8 @@ var utils_default = {
14823
14897
  isUndefined,
14824
14898
  isDate,
14825
14899
  isFile,
14900
+ isReactNativeBlob,
14901
+ isReactNative,
14826
14902
  isBlob,
14827
14903
  isRegExp,
14828
14904
  isFunction,
@@ -14864,244 +14940,606 @@ var utils_default = {
14864
14940
  isIterable
14865
14941
  };
14866
14942
 
14867
- // ../../node_modules/axios/lib/core/AxiosError.js
14868
- function AxiosError(message, code, config, request, response) {
14869
- Error.call(this);
14870
- if (Error.captureStackTrace) {
14871
- Error.captureStackTrace(this, this.constructor);
14872
- } else {
14873
- this.stack = new Error().stack;
14874
- }
14875
- this.message = message;
14876
- this.name = "AxiosError";
14877
- code && (this.code = code);
14878
- config && (this.config = config);
14879
- request && (this.request = request);
14880
- if (response) {
14881
- this.response = response;
14882
- this.status = response.status ? response.status : null;
14883
- }
14884
- }
14885
- utils_default.inherits(AxiosError, Error, {
14886
- toJSON: function toJSON() {
14887
- return {
14888
- message: this.message,
14889
- name: this.name,
14890
- description: this.description,
14891
- number: this.number,
14892
- fileName: this.fileName,
14893
- lineNumber: this.lineNumber,
14894
- columnNumber: this.columnNumber,
14895
- stack: this.stack,
14896
- config: utils_default.toJSONObject(this.config),
14897
- code: this.code,
14898
- status: this.status
14899
- };
14900
- }
14901
- });
14902
- var prototype = AxiosError.prototype;
14903
- var descriptors = {};
14904
- [
14905
- "ERR_BAD_OPTION_VALUE",
14906
- "ERR_BAD_OPTION",
14907
- "ECONNABORTED",
14908
- "ETIMEDOUT",
14909
- "ERR_NETWORK",
14910
- "ERR_FR_TOO_MANY_REDIRECTS",
14911
- "ERR_DEPRECATED",
14912
- "ERR_BAD_RESPONSE",
14913
- "ERR_BAD_REQUEST",
14914
- "ERR_CANCELED",
14915
- "ERR_NOT_SUPPORT",
14916
- "ERR_INVALID_URL"
14917
- ].forEach((code) => {
14918
- descriptors[code] = { value: code };
14919
- });
14920
- Object.defineProperties(AxiosError, descriptors);
14921
- Object.defineProperty(prototype, "isAxiosError", { value: true });
14922
- AxiosError.from = (error, code, config, request, response, customProps) => {
14923
- const axiosError = Object.create(prototype);
14924
- utils_default.toFlatObject(error, axiosError, function filter(obj) {
14925
- return obj !== Error.prototype;
14926
- }, (prop) => {
14927
- return prop !== "isAxiosError";
14943
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/parseHeaders.js
14944
+ var ignoreDuplicateOf = utils_default.toObjectSet([
14945
+ "age",
14946
+ "authorization",
14947
+ "content-length",
14948
+ "content-type",
14949
+ "etag",
14950
+ "expires",
14951
+ "from",
14952
+ "host",
14953
+ "if-modified-since",
14954
+ "if-unmodified-since",
14955
+ "last-modified",
14956
+ "location",
14957
+ "max-forwards",
14958
+ "proxy-authorization",
14959
+ "referer",
14960
+ "retry-after",
14961
+ "user-agent"
14962
+ ]);
14963
+ var parseHeaders_default = (rawHeaders) => {
14964
+ const parsed = {};
14965
+ let key;
14966
+ let val;
14967
+ let i;
14968
+ rawHeaders && rawHeaders.split(`
14969
+ `).forEach(function parser(line) {
14970
+ i = line.indexOf(":");
14971
+ key = line.substring(0, i).trim().toLowerCase();
14972
+ val = line.substring(i + 1).trim();
14973
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
14974
+ return;
14975
+ }
14976
+ if (key === "set-cookie") {
14977
+ if (parsed[key]) {
14978
+ parsed[key].push(val);
14979
+ } else {
14980
+ parsed[key] = [val];
14981
+ }
14982
+ } else {
14983
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
14984
+ }
14928
14985
  });
14929
- const msg = error && error.message ? error.message : "Error";
14930
- const errCode = code == null && error ? error.code : code;
14931
- AxiosError.call(axiosError, msg, errCode, config, request, response);
14932
- if (error && axiosError.cause == null) {
14933
- Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
14934
- }
14935
- axiosError.name = error && error.name || "Error";
14936
- customProps && Object.assign(axiosError, customProps);
14937
- return axiosError;
14986
+ return parsed;
14938
14987
  };
14939
- var AxiosError_default = AxiosError;
14940
-
14941
- // ../../node_modules/axios/lib/helpers/null.js
14942
- var null_default = null;
14943
14988
 
14944
- // ../../node_modules/axios/lib/helpers/toFormData.js
14945
- function isVisitable(thing) {
14946
- return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
14947
- }
14948
- function removeBrackets(key) {
14949
- return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
14989
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/core/AxiosHeaders.js
14990
+ var $internals = Symbol("internals");
14991
+ var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
14992
+ function trimSPorHTAB(str) {
14993
+ let start = 0;
14994
+ let end = str.length;
14995
+ while (start < end) {
14996
+ const code = str.charCodeAt(start);
14997
+ if (code !== 9 && code !== 32) {
14998
+ break;
14999
+ }
15000
+ start += 1;
15001
+ }
15002
+ while (end > start) {
15003
+ const code = str.charCodeAt(end - 1);
15004
+ if (code !== 9 && code !== 32) {
15005
+ break;
15006
+ }
15007
+ end -= 1;
15008
+ }
15009
+ return start === 0 && end === str.length ? str : str.slice(start, end);
14950
15010
  }
14951
- function renderKey(path, key, dots) {
14952
- if (!path)
14953
- return key;
14954
- return path.concat(key).map(function each(token, i) {
14955
- token = removeBrackets(token);
14956
- return !dots && i ? "[" + token + "]" : token;
14957
- }).join(dots ? "." : "");
15011
+ function normalizeHeader(header) {
15012
+ return header && String(header).trim().toLowerCase();
14958
15013
  }
14959
- function isFlatArray(arr) {
14960
- return utils_default.isArray(arr) && !arr.some(isVisitable);
15014
+ function sanitizeHeaderValue(str) {
15015
+ return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
14961
15016
  }
14962
- var predicates = utils_default.toFlatObject(utils_default, {}, null, function filter(prop) {
14963
- return /^is[A-Z]/.test(prop);
14964
- });
14965
- function toFormData(obj, formData, options) {
14966
- if (!utils_default.isObject(obj)) {
14967
- throw new TypeError("target must be an object");
15017
+ function normalizeValue(value) {
15018
+ if (value === false || value == null) {
15019
+ return value;
14968
15020
  }
14969
- formData = formData || new (null_default || FormData);
14970
- options = utils_default.toFlatObject(options, {
14971
- metaTokens: true,
14972
- dots: false,
14973
- indexes: false
14974
- }, false, function defined(option, source) {
14975
- return !utils_default.isUndefined(source[option]);
14976
- });
14977
- const metaTokens = options.metaTokens;
14978
- const visitor = options.visitor || defaultVisitor;
14979
- const dots = options.dots;
14980
- const indexes = options.indexes;
14981
- const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
14982
- const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
14983
- if (!utils_default.isFunction(visitor)) {
14984
- throw new TypeError("visitor must be a function");
15021
+ return utils_default.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
15022
+ }
15023
+ function parseTokens(str) {
15024
+ const tokens = Object.create(null);
15025
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
15026
+ let match;
15027
+ while (match = tokensRE.exec(str)) {
15028
+ tokens[match[1]] = match[2];
14985
15029
  }
14986
- function convertValue(value) {
14987
- if (value === null)
14988
- return "";
14989
- if (utils_default.isDate(value)) {
14990
- return value.toISOString();
14991
- }
14992
- if (utils_default.isBoolean(value)) {
14993
- return value.toString();
14994
- }
14995
- if (!useBlob && utils_default.isBlob(value)) {
14996
- throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
14997
- }
14998
- if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
14999
- return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
15000
- }
15001
- return value;
15030
+ return tokens;
15031
+ }
15032
+ var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
15033
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
15034
+ if (utils_default.isFunction(filter)) {
15035
+ return filter.call(this, value, header);
15002
15036
  }
15003
- function defaultVisitor(value, key, path) {
15004
- let arr = value;
15005
- if (value && !path && typeof value === "object") {
15006
- if (utils_default.endsWith(key, "{}")) {
15007
- key = metaTokens ? key : key.slice(0, -2);
15008
- value = JSON.stringify(value);
15009
- } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
15010
- key = removeBrackets(key);
15011
- arr.forEach(function each(el, index) {
15012
- !(utils_default.isUndefined(el) || el === null) && formData.append(indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", convertValue(el));
15013
- });
15014
- return false;
15015
- }
15016
- }
15017
- if (isVisitable(value)) {
15018
- return true;
15019
- }
15020
- formData.append(renderKey(path, key, dots), convertValue(value));
15021
- return false;
15037
+ if (isHeaderNameFilter) {
15038
+ value = header;
15022
15039
  }
15023
- const stack = [];
15024
- const exposedHelpers = Object.assign(predicates, {
15025
- defaultVisitor,
15026
- convertValue,
15027
- isVisitable
15028
- });
15029
- function build(value, path) {
15030
- if (utils_default.isUndefined(value))
15031
- return;
15032
- if (stack.indexOf(value) !== -1) {
15033
- throw Error("Circular reference detected in " + path.join("."));
15034
- }
15035
- stack.push(value);
15036
- utils_default.forEach(value, function each(el, key) {
15037
- const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers);
15038
- if (result === true) {
15039
- build(el, path ? path.concat(key) : [key]);
15040
- }
15041
- });
15042
- stack.pop();
15040
+ if (!utils_default.isString(value))
15041
+ return;
15042
+ if (utils_default.isString(filter)) {
15043
+ return value.indexOf(filter) !== -1;
15043
15044
  }
15044
- if (!utils_default.isObject(obj)) {
15045
- throw new TypeError("data must be an object");
15045
+ if (utils_default.isRegExp(filter)) {
15046
+ return filter.test(value);
15046
15047
  }
15047
- build(obj);
15048
- return formData;
15049
15048
  }
15050
- var toFormData_default = toFormData;
15051
-
15052
- // ../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js
15053
- function encode(str) {
15054
- const charMap = {
15055
- "!": "%21",
15056
- "'": "%27",
15057
- "(": "%28",
15058
- ")": "%29",
15059
- "~": "%7E",
15060
- "%20": "+",
15061
- "%00": "\x00"
15062
- };
15063
- return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
15064
- return charMap[match];
15049
+ function formatHeader(header) {
15050
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
15051
+ return char.toUpperCase() + str;
15065
15052
  });
15066
15053
  }
15067
- function AxiosURLSearchParams(params, options) {
15068
- this._pairs = [];
15069
- params && toFormData_default(params, this, options);
15054
+ function buildAccessors(obj, header) {
15055
+ const accessorName = utils_default.toCamelCase(" " + header);
15056
+ ["get", "set", "has"].forEach((methodName) => {
15057
+ Object.defineProperty(obj, methodName + accessorName, {
15058
+ __proto__: null,
15059
+ value: function(arg1, arg2, arg3) {
15060
+ return this[methodName].call(this, header, arg1, arg2, arg3);
15061
+ },
15062
+ configurable: true
15063
+ });
15064
+ });
15070
15065
  }
15071
- var prototype2 = AxiosURLSearchParams.prototype;
15072
- prototype2.append = function append(name, value) {
15073
- this._pairs.push([name, value]);
15074
- };
15075
- prototype2.toString = function toString2(encoder) {
15076
- const _encode = encoder ? function(value) {
15077
- return encoder.call(this, value, encode);
15078
- } : encode;
15079
- return this._pairs.map(function each(pair) {
15080
- return _encode(pair[0]) + "=" + _encode(pair[1]);
15081
- }, "").join("&");
15082
- };
15083
- var AxiosURLSearchParams_default = AxiosURLSearchParams;
15084
15066
 
15085
- // ../../node_modules/axios/lib/helpers/buildURL.js
15086
- function encode2(val) {
15087
- return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
15088
- }
15089
- function buildURL(url, params, options) {
15090
- if (!params) {
15091
- return url;
15092
- }
15093
- const _encode = options && options.encode || encode2;
15094
- if (utils_default.isFunction(options)) {
15095
- options = {
15096
- serialize: options
15067
+ class AxiosHeaders {
15068
+ constructor(headers) {
15069
+ headers && this.set(headers);
15070
+ }
15071
+ set(header, valueOrRewrite, rewrite) {
15072
+ const self2 = this;
15073
+ function setHeader(_value, _header, _rewrite) {
15074
+ const lHeader = normalizeHeader(_header);
15075
+ if (!lHeader) {
15076
+ throw new Error("header name must be a non-empty string");
15077
+ }
15078
+ const key = utils_default.findKey(self2, lHeader);
15079
+ if (!key || self2[key] === undefined || _rewrite === true || _rewrite === undefined && self2[key] !== false) {
15080
+ self2[key || _header] = normalizeValue(_value);
15081
+ }
15082
+ }
15083
+ const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
15084
+ if (utils_default.isPlainObject(header) || header instanceof this.constructor) {
15085
+ setHeaders(header, valueOrRewrite);
15086
+ } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
15087
+ setHeaders(parseHeaders_default(header), valueOrRewrite);
15088
+ } else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
15089
+ let obj = {}, dest, key;
15090
+ for (const entry of header) {
15091
+ if (!utils_default.isArray(entry)) {
15092
+ throw TypeError("Object iterator must return a key-value pair");
15093
+ }
15094
+ obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
15095
+ }
15096
+ setHeaders(obj, valueOrRewrite);
15097
+ } else {
15098
+ header != null && setHeader(valueOrRewrite, header, rewrite);
15099
+ }
15100
+ return this;
15101
+ }
15102
+ get(header, parser) {
15103
+ header = normalizeHeader(header);
15104
+ if (header) {
15105
+ const key = utils_default.findKey(this, header);
15106
+ if (key) {
15107
+ const value = this[key];
15108
+ if (!parser) {
15109
+ return value;
15110
+ }
15111
+ if (parser === true) {
15112
+ return parseTokens(value);
15113
+ }
15114
+ if (utils_default.isFunction(parser)) {
15115
+ return parser.call(this, value, key);
15116
+ }
15117
+ if (utils_default.isRegExp(parser)) {
15118
+ return parser.exec(value);
15119
+ }
15120
+ throw new TypeError("parser must be boolean|regexp|function");
15121
+ }
15122
+ }
15123
+ }
15124
+ has(header, matcher) {
15125
+ header = normalizeHeader(header);
15126
+ if (header) {
15127
+ const key = utils_default.findKey(this, header);
15128
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
15129
+ }
15130
+ return false;
15131
+ }
15132
+ delete(header, matcher) {
15133
+ const self2 = this;
15134
+ let deleted = false;
15135
+ function deleteHeader(_header) {
15136
+ _header = normalizeHeader(_header);
15137
+ if (_header) {
15138
+ const key = utils_default.findKey(self2, _header);
15139
+ if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
15140
+ delete self2[key];
15141
+ deleted = true;
15142
+ }
15143
+ }
15144
+ }
15145
+ if (utils_default.isArray(header)) {
15146
+ header.forEach(deleteHeader);
15147
+ } else {
15148
+ deleteHeader(header);
15149
+ }
15150
+ return deleted;
15151
+ }
15152
+ clear(matcher) {
15153
+ const keys = Object.keys(this);
15154
+ let i = keys.length;
15155
+ let deleted = false;
15156
+ while (i--) {
15157
+ const key = keys[i];
15158
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
15159
+ delete this[key];
15160
+ deleted = true;
15161
+ }
15162
+ }
15163
+ return deleted;
15164
+ }
15165
+ normalize(format) {
15166
+ const self2 = this;
15167
+ const headers = {};
15168
+ utils_default.forEach(this, (value, header) => {
15169
+ const key = utils_default.findKey(headers, header);
15170
+ if (key) {
15171
+ self2[key] = normalizeValue(value);
15172
+ delete self2[header];
15173
+ return;
15174
+ }
15175
+ const normalized = format ? formatHeader(header) : String(header).trim();
15176
+ if (normalized !== header) {
15177
+ delete self2[header];
15178
+ }
15179
+ self2[normalized] = normalizeValue(value);
15180
+ headers[normalized] = true;
15181
+ });
15182
+ return this;
15183
+ }
15184
+ concat(...targets) {
15185
+ return this.constructor.concat(this, ...targets);
15186
+ }
15187
+ toJSON(asStrings) {
15188
+ const obj = Object.create(null);
15189
+ utils_default.forEach(this, (value, header) => {
15190
+ value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value);
15191
+ });
15192
+ return obj;
15193
+ }
15194
+ [Symbol.iterator]() {
15195
+ return Object.entries(this.toJSON())[Symbol.iterator]();
15196
+ }
15197
+ toString() {
15198
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join(`
15199
+ `);
15200
+ }
15201
+ getSetCookie() {
15202
+ return this.get("set-cookie") || [];
15203
+ }
15204
+ get [Symbol.toStringTag]() {
15205
+ return "AxiosHeaders";
15206
+ }
15207
+ static from(thing) {
15208
+ return thing instanceof this ? thing : new this(thing);
15209
+ }
15210
+ static concat(first, ...targets) {
15211
+ const computed = new this(first);
15212
+ targets.forEach((target) => computed.set(target));
15213
+ return computed;
15214
+ }
15215
+ static accessor(header) {
15216
+ const internals = this[$internals] = this[$internals] = {
15217
+ accessors: {}
15097
15218
  };
15219
+ const accessors = internals.accessors;
15220
+ const prototype = this.prototype;
15221
+ function defineAccessor(_header) {
15222
+ const lHeader = normalizeHeader(_header);
15223
+ if (!accessors[lHeader]) {
15224
+ buildAccessors(prototype, _header);
15225
+ accessors[lHeader] = true;
15226
+ }
15227
+ }
15228
+ utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
15229
+ return this;
15230
+ }
15231
+ }
15232
+ AxiosHeaders.accessor([
15233
+ "Content-Type",
15234
+ "Content-Length",
15235
+ "Accept",
15236
+ "Accept-Encoding",
15237
+ "User-Agent",
15238
+ "Authorization"
15239
+ ]);
15240
+ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
15241
+ let mapped = key[0].toUpperCase() + key.slice(1);
15242
+ return {
15243
+ get: () => value,
15244
+ set(headerValue) {
15245
+ this[mapped] = headerValue;
15246
+ }
15247
+ };
15248
+ });
15249
+ utils_default.freezeMethods(AxiosHeaders);
15250
+ var AxiosHeaders_default = AxiosHeaders;
15251
+
15252
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/core/AxiosError.js
15253
+ var REDACTED = "[REDACTED ****]";
15254
+ function hasOwnOrPrototypeToJSON(source) {
15255
+ if (utils_default.hasOwnProp(source, "toJSON")) {
15256
+ return true;
15257
+ }
15258
+ let prototype = Object.getPrototypeOf(source);
15259
+ while (prototype && prototype !== Object.prototype) {
15260
+ if (utils_default.hasOwnProp(prototype, "toJSON")) {
15261
+ return true;
15262
+ }
15263
+ prototype = Object.getPrototypeOf(prototype);
15264
+ }
15265
+ return false;
15266
+ }
15267
+ function redactConfig(config, redactKeys) {
15268
+ const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
15269
+ const seen = [];
15270
+ const visit = (source) => {
15271
+ if (source === null || typeof source !== "object")
15272
+ return source;
15273
+ if (utils_default.isBuffer(source))
15274
+ return source;
15275
+ if (seen.indexOf(source) !== -1)
15276
+ return;
15277
+ if (source instanceof AxiosHeaders_default) {
15278
+ source = source.toJSON();
15279
+ }
15280
+ seen.push(source);
15281
+ let result;
15282
+ if (utils_default.isArray(source)) {
15283
+ result = [];
15284
+ source.forEach((v, i) => {
15285
+ const reducedValue = visit(v);
15286
+ if (!utils_default.isUndefined(reducedValue)) {
15287
+ result[i] = reducedValue;
15288
+ }
15289
+ });
15290
+ } else {
15291
+ if (!utils_default.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
15292
+ seen.pop();
15293
+ return source;
15294
+ }
15295
+ result = Object.create(null);
15296
+ for (const [key, value] of Object.entries(source)) {
15297
+ const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
15298
+ if (!utils_default.isUndefined(reducedValue)) {
15299
+ result[key] = reducedValue;
15300
+ }
15301
+ }
15302
+ }
15303
+ seen.pop();
15304
+ return result;
15305
+ };
15306
+ return visit(config);
15307
+ }
15308
+
15309
+ class AxiosError extends Error {
15310
+ static from(error, code, config, request, response, customProps) {
15311
+ const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
15312
+ axiosError.cause = error;
15313
+ axiosError.name = error.name;
15314
+ if (error.status != null && axiosError.status == null) {
15315
+ axiosError.status = error.status;
15316
+ }
15317
+ customProps && Object.assign(axiosError, customProps);
15318
+ return axiosError;
15319
+ }
15320
+ constructor(message, code, config, request, response) {
15321
+ super(message);
15322
+ Object.defineProperty(this, "message", {
15323
+ __proto__: null,
15324
+ value: message,
15325
+ enumerable: true,
15326
+ writable: true,
15327
+ configurable: true
15328
+ });
15329
+ this.name = "AxiosError";
15330
+ this.isAxiosError = true;
15331
+ code && (this.code = code);
15332
+ config && (this.config = config);
15333
+ request && (this.request = request);
15334
+ if (response) {
15335
+ this.response = response;
15336
+ this.status = response.status;
15337
+ }
15338
+ }
15339
+ toJSON() {
15340
+ const config = this.config;
15341
+ const redactKeys = config && utils_default.hasOwnProp(config, "redact") ? config.redact : undefined;
15342
+ const serializedConfig = utils_default.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils_default.toJSONObject(config);
15343
+ return {
15344
+ message: this.message,
15345
+ name: this.name,
15346
+ description: this.description,
15347
+ number: this.number,
15348
+ fileName: this.fileName,
15349
+ lineNumber: this.lineNumber,
15350
+ columnNumber: this.columnNumber,
15351
+ stack: this.stack,
15352
+ config: serializedConfig,
15353
+ code: this.code,
15354
+ status: this.status
15355
+ };
15356
+ }
15357
+ }
15358
+ AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
15359
+ AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
15360
+ AxiosError.ECONNABORTED = "ECONNABORTED";
15361
+ AxiosError.ETIMEDOUT = "ETIMEDOUT";
15362
+ AxiosError.ECONNREFUSED = "ECONNREFUSED";
15363
+ AxiosError.ERR_NETWORK = "ERR_NETWORK";
15364
+ AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
15365
+ AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
15366
+ AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
15367
+ AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
15368
+ AxiosError.ERR_CANCELED = "ERR_CANCELED";
15369
+ AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
15370
+ AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
15371
+ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
15372
+ var AxiosError_default = AxiosError;
15373
+
15374
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/null.js
15375
+ var null_default = null;
15376
+
15377
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/toFormData.js
15378
+ function isVisitable(thing) {
15379
+ return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
15380
+ }
15381
+ function removeBrackets(key) {
15382
+ return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
15383
+ }
15384
+ function renderKey(path, key, dots) {
15385
+ if (!path)
15386
+ return key;
15387
+ return path.concat(key).map(function each(token, i) {
15388
+ token = removeBrackets(token);
15389
+ return !dots && i ? "[" + token + "]" : token;
15390
+ }).join(dots ? "." : "");
15391
+ }
15392
+ function isFlatArray(arr) {
15393
+ return utils_default.isArray(arr) && !arr.some(isVisitable);
15394
+ }
15395
+ var predicates = utils_default.toFlatObject(utils_default, {}, null, function filter(prop) {
15396
+ return /^is[A-Z]/.test(prop);
15397
+ });
15398
+ function toFormData(obj, formData, options) {
15399
+ if (!utils_default.isObject(obj)) {
15400
+ throw new TypeError("target must be an object");
15401
+ }
15402
+ formData = formData || new (null_default || FormData);
15403
+ options = utils_default.toFlatObject(options, {
15404
+ metaTokens: true,
15405
+ dots: false,
15406
+ indexes: false
15407
+ }, false, function defined(option, source) {
15408
+ return !utils_default.isUndefined(source[option]);
15409
+ });
15410
+ const metaTokens = options.metaTokens;
15411
+ const visitor = options.visitor || defaultVisitor;
15412
+ const dots = options.dots;
15413
+ const indexes = options.indexes;
15414
+ const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
15415
+ const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
15416
+ const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
15417
+ if (!utils_default.isFunction(visitor)) {
15418
+ throw new TypeError("visitor must be a function");
15419
+ }
15420
+ function convertValue(value) {
15421
+ if (value === null)
15422
+ return "";
15423
+ if (utils_default.isDate(value)) {
15424
+ return value.toISOString();
15425
+ }
15426
+ if (utils_default.isBoolean(value)) {
15427
+ return value.toString();
15428
+ }
15429
+ if (!useBlob && utils_default.isBlob(value)) {
15430
+ throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
15431
+ }
15432
+ if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
15433
+ return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
15434
+ }
15435
+ return value;
15436
+ }
15437
+ function defaultVisitor(value, key, path) {
15438
+ let arr = value;
15439
+ if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
15440
+ formData.append(renderKey(path, key, dots), convertValue(value));
15441
+ return false;
15442
+ }
15443
+ if (value && !path && typeof value === "object") {
15444
+ if (utils_default.endsWith(key, "{}")) {
15445
+ key = metaTokens ? key : key.slice(0, -2);
15446
+ value = JSON.stringify(value);
15447
+ } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
15448
+ key = removeBrackets(key);
15449
+ arr.forEach(function each(el, index) {
15450
+ !(utils_default.isUndefined(el) || el === null) && formData.append(indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", convertValue(el));
15451
+ });
15452
+ return false;
15453
+ }
15454
+ }
15455
+ if (isVisitable(value)) {
15456
+ return true;
15457
+ }
15458
+ formData.append(renderKey(path, key, dots), convertValue(value));
15459
+ return false;
15460
+ }
15461
+ const stack = [];
15462
+ const exposedHelpers = Object.assign(predicates, {
15463
+ defaultVisitor,
15464
+ convertValue,
15465
+ isVisitable
15466
+ });
15467
+ function build(value, path, depth = 0) {
15468
+ if (utils_default.isUndefined(value))
15469
+ return;
15470
+ if (depth > maxDepth) {
15471
+ throw new AxiosError_default("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED);
15472
+ }
15473
+ if (stack.indexOf(value) !== -1) {
15474
+ throw Error("Circular reference detected in " + path.join("."));
15475
+ }
15476
+ stack.push(value);
15477
+ utils_default.forEach(value, function each(el, key) {
15478
+ const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers);
15479
+ if (result === true) {
15480
+ build(el, path ? path.concat(key) : [key], depth + 1);
15481
+ }
15482
+ });
15483
+ stack.pop();
15484
+ }
15485
+ if (!utils_default.isObject(obj)) {
15486
+ throw new TypeError("data must be an object");
15487
+ }
15488
+ build(obj);
15489
+ return formData;
15490
+ }
15491
+ var toFormData_default = toFormData;
15492
+
15493
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
15494
+ function encode(str) {
15495
+ const charMap = {
15496
+ "!": "%21",
15497
+ "'": "%27",
15498
+ "(": "%28",
15499
+ ")": "%29",
15500
+ "~": "%7E",
15501
+ "%20": "+"
15502
+ };
15503
+ return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
15504
+ return charMap[match];
15505
+ });
15506
+ }
15507
+ function AxiosURLSearchParams(params, options) {
15508
+ this._pairs = [];
15509
+ params && toFormData_default(params, this, options);
15510
+ }
15511
+ var prototype = AxiosURLSearchParams.prototype;
15512
+ prototype.append = function append(name, value) {
15513
+ this._pairs.push([name, value]);
15514
+ };
15515
+ prototype.toString = function toString2(encoder) {
15516
+ const _encode = encoder ? function(value) {
15517
+ return encoder.call(this, value, encode);
15518
+ } : encode;
15519
+ return this._pairs.map(function each(pair) {
15520
+ return _encode(pair[0]) + "=" + _encode(pair[1]);
15521
+ }, "").join("&");
15522
+ };
15523
+ var AxiosURLSearchParams_default = AxiosURLSearchParams;
15524
+
15525
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/buildURL.js
15526
+ function encode2(val) {
15527
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
15528
+ }
15529
+ function buildURL(url, params, options) {
15530
+ if (!params) {
15531
+ return url;
15098
15532
  }
15099
- const serializeFn = options && options.serialize;
15533
+ const _encode = options && options.encode || encode2;
15534
+ const _options = utils_default.isFunction(options) ? {
15535
+ serialize: options
15536
+ } : options;
15537
+ const serializeFn = _options && _options.serialize;
15100
15538
  let serializedParams;
15101
15539
  if (serializeFn) {
15102
- serializedParams = serializeFn(params, options);
15540
+ serializedParams = serializeFn(params, _options);
15103
15541
  } else {
15104
- serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, options).toString(_encode);
15542
+ serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, _options).toString(_encode);
15105
15543
  }
15106
15544
  if (serializedParams) {
15107
15545
  const hashmarkIndex = url.indexOf("#");
@@ -15113,7 +15551,7 @@ function buildURL(url, params, options) {
15113
15551
  return url;
15114
15552
  }
15115
15553
 
15116
- // ../../node_modules/axios/lib/core/InterceptorManager.js
15554
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/core/InterceptorManager.js
15117
15555
  class InterceptorManager {
15118
15556
  constructor() {
15119
15557
  this.handlers = [];
@@ -15147,23 +15585,24 @@ class InterceptorManager {
15147
15585
  }
15148
15586
  var InterceptorManager_default = InterceptorManager;
15149
15587
 
15150
- // ../../node_modules/axios/lib/defaults/transitional.js
15588
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/defaults/transitional.js
15151
15589
  var transitional_default = {
15152
15590
  silentJSONParsing: true,
15153
15591
  forcedJSONParsing: true,
15154
- clarifyTimeoutError: false
15592
+ clarifyTimeoutError: false,
15593
+ legacyInterceptorReqResOrdering: true
15155
15594
  };
15156
15595
 
15157
- // ../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
15596
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
15158
15597
  var URLSearchParams_default = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams_default;
15159
15598
 
15160
- // ../../node_modules/axios/lib/platform/browser/classes/FormData.js
15599
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/platform/browser/classes/FormData.js
15161
15600
  var FormData_default = typeof FormData !== "undefined" ? FormData : null;
15162
15601
 
15163
- // ../../node_modules/axios/lib/platform/browser/classes/Blob.js
15602
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/platform/browser/classes/Blob.js
15164
15603
  var Blob_default = typeof Blob !== "undefined" ? Blob : null;
15165
15604
 
15166
- // ../../node_modules/axios/lib/platform/browser/index.js
15605
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/platform/browser/index.js
15167
15606
  var browser_default = {
15168
15607
  isBrowser: true,
15169
15608
  classes: {
@@ -15174,7 +15613,7 @@ var browser_default = {
15174
15613
  protocols: ["http", "https", "file", "blob", "url", "data"]
15175
15614
  };
15176
15615
 
15177
- // ../../node_modules/axios/lib/platform/common/utils.js
15616
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/platform/common/utils.js
15178
15617
  var exports_utils = {};
15179
15618
  __export(exports_utils, {
15180
15619
  origin: () => origin,
@@ -15191,13 +15630,13 @@ var hasStandardBrowserWebWorkerEnv = (() => {
15191
15630
  })();
15192
15631
  var origin = hasBrowserEnv && window.location.href || "http://localhost";
15193
15632
 
15194
- // ../../node_modules/axios/lib/platform/index.js
15633
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/platform/index.js
15195
15634
  var platform_default = {
15196
15635
  ...exports_utils,
15197
15636
  ...browser_default
15198
15637
  };
15199
15638
 
15200
- // ../../node_modules/axios/lib/helpers/toURLEncodedForm.js
15639
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/toURLEncodedForm.js
15201
15640
  function toURLEncodedForm(data, options) {
15202
15641
  return toFormData_default(data, new platform_default.classes.URLSearchParams, {
15203
15642
  visitor: function(value, key, path, helpers) {
@@ -15211,7 +15650,7 @@ function toURLEncodedForm(data, options) {
15211
15650
  });
15212
15651
  }
15213
15652
 
15214
- // ../../node_modules/axios/lib/helpers/formDataToJSON.js
15653
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/formDataToJSON.js
15215
15654
  function parsePropPath(name) {
15216
15655
  return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
15217
15656
  return match[0] === "[]" ? "" : match[1] || match[0];
@@ -15235,416 +15674,146 @@ function formDataToJSON(formData) {
15235
15674
  if (name === "__proto__")
15236
15675
  return true;
15237
15676
  const isNumericKey = Number.isFinite(+name);
15238
- const isLast = index >= path.length;
15239
- name = !name && utils_default.isArray(target) ? target.length : name;
15240
- if (isLast) {
15241
- if (utils_default.hasOwnProp(target, name)) {
15242
- target[name] = [target[name], value];
15243
- } else {
15244
- target[name] = value;
15245
- }
15246
- return !isNumericKey;
15247
- }
15248
- if (!target[name] || !utils_default.isObject(target[name])) {
15249
- target[name] = [];
15250
- }
15251
- const result = buildPath(path, value, target[name], index);
15252
- if (result && utils_default.isArray(target[name])) {
15253
- target[name] = arrayToObject(target[name]);
15254
- }
15255
- return !isNumericKey;
15256
- }
15257
- if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) {
15258
- const obj = {};
15259
- utils_default.forEachEntry(formData, (name, value) => {
15260
- buildPath(parsePropPath(name), value, obj, 0);
15261
- });
15262
- return obj;
15263
- }
15264
- return null;
15265
- }
15266
- var formDataToJSON_default = formDataToJSON;
15267
-
15268
- // ../../node_modules/axios/lib/defaults/index.js
15269
- function stringifySafely(rawValue, parser, encoder) {
15270
- if (utils_default.isString(rawValue)) {
15271
- try {
15272
- (parser || JSON.parse)(rawValue);
15273
- return utils_default.trim(rawValue);
15274
- } catch (e) {
15275
- if (e.name !== "SyntaxError") {
15276
- throw e;
15277
- }
15278
- }
15279
- }
15280
- return (encoder || JSON.stringify)(rawValue);
15281
- }
15282
- var defaults = {
15283
- transitional: transitional_default,
15284
- adapter: ["xhr", "http", "fetch"],
15285
- transformRequest: [function transformRequest(data, headers) {
15286
- const contentType = headers.getContentType() || "";
15287
- const hasJSONContentType = contentType.indexOf("application/json") > -1;
15288
- const isObjectPayload = utils_default.isObject(data);
15289
- if (isObjectPayload && utils_default.isHTMLForm(data)) {
15290
- data = new FormData(data);
15291
- }
15292
- const isFormData2 = utils_default.isFormData(data);
15293
- if (isFormData2) {
15294
- return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
15295
- }
15296
- if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
15297
- return data;
15298
- }
15299
- if (utils_default.isArrayBufferView(data)) {
15300
- return data.buffer;
15301
- }
15302
- if (utils_default.isURLSearchParams(data)) {
15303
- headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
15304
- return data.toString();
15305
- }
15306
- let isFileList2;
15307
- if (isObjectPayload) {
15308
- if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
15309
- return toURLEncodedForm(data, this.formSerializer).toString();
15310
- }
15311
- if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
15312
- const _FormData = this.env && this.env.FormData;
15313
- return toFormData_default(isFileList2 ? { "files[]": data } : data, _FormData && new _FormData, this.formSerializer);
15314
- }
15315
- }
15316
- if (isObjectPayload || hasJSONContentType) {
15317
- headers.setContentType("application/json", false);
15318
- return stringifySafely(data);
15319
- }
15320
- return data;
15321
- }],
15322
- transformResponse: [function transformResponse(data) {
15323
- const transitional = this.transitional || defaults.transitional;
15324
- const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
15325
- const JSONRequested = this.responseType === "json";
15326
- if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
15327
- return data;
15328
- }
15329
- if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
15330
- const silentJSONParsing = transitional && transitional.silentJSONParsing;
15331
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
15332
- try {
15333
- return JSON.parse(data, this.parseReviver);
15334
- } catch (e) {
15335
- if (strictJSONParsing) {
15336
- if (e.name === "SyntaxError") {
15337
- throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
15338
- }
15339
- throw e;
15340
- }
15341
- }
15342
- }
15343
- return data;
15344
- }],
15345
- timeout: 0,
15346
- xsrfCookieName: "XSRF-TOKEN",
15347
- xsrfHeaderName: "X-XSRF-TOKEN",
15348
- maxContentLength: -1,
15349
- maxBodyLength: -1,
15350
- env: {
15351
- FormData: platform_default.classes.FormData,
15352
- Blob: platform_default.classes.Blob
15353
- },
15354
- validateStatus: function validateStatus(status) {
15355
- return status >= 200 && status < 300;
15356
- },
15357
- headers: {
15358
- common: {
15359
- Accept: "application/json, text/plain, */*",
15360
- "Content-Type": undefined
15361
- }
15362
- }
15363
- };
15364
- utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
15365
- defaults.headers[method] = {};
15366
- });
15367
- var defaults_default = defaults;
15368
-
15369
- // ../../node_modules/axios/lib/helpers/parseHeaders.js
15370
- var ignoreDuplicateOf = utils_default.toObjectSet([
15371
- "age",
15372
- "authorization",
15373
- "content-length",
15374
- "content-type",
15375
- "etag",
15376
- "expires",
15377
- "from",
15378
- "host",
15379
- "if-modified-since",
15380
- "if-unmodified-since",
15381
- "last-modified",
15382
- "location",
15383
- "max-forwards",
15384
- "proxy-authorization",
15385
- "referer",
15386
- "retry-after",
15387
- "user-agent"
15388
- ]);
15389
- var parseHeaders_default = (rawHeaders) => {
15390
- const parsed = {};
15391
- let key;
15392
- let val;
15393
- let i;
15394
- rawHeaders && rawHeaders.split(`
15395
- `).forEach(function parser(line) {
15396
- i = line.indexOf(":");
15397
- key = line.substring(0, i).trim().toLowerCase();
15398
- val = line.substring(i + 1).trim();
15399
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
15400
- return;
15401
- }
15402
- if (key === "set-cookie") {
15403
- if (parsed[key]) {
15404
- parsed[key].push(val);
15405
- } else {
15406
- parsed[key] = [val];
15407
- }
15408
- } else {
15409
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
15410
- }
15411
- });
15412
- return parsed;
15413
- };
15414
-
15415
- // ../../node_modules/axios/lib/core/AxiosHeaders.js
15416
- var $internals = Symbol("internals");
15417
- function normalizeHeader(header) {
15418
- return header && String(header).trim().toLowerCase();
15419
- }
15420
- function normalizeValue(value) {
15421
- if (value === false || value == null) {
15422
- return value;
15423
- }
15424
- return utils_default.isArray(value) ? value.map(normalizeValue) : String(value);
15425
- }
15426
- function parseTokens(str) {
15427
- const tokens = Object.create(null);
15428
- const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
15429
- let match;
15430
- while (match = tokensRE.exec(str)) {
15431
- tokens[match[1]] = match[2];
15432
- }
15433
- return tokens;
15434
- }
15435
- var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
15436
- function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
15437
- if (utils_default.isFunction(filter2)) {
15438
- return filter2.call(this, value, header);
15439
- }
15440
- if (isHeaderNameFilter) {
15441
- value = header;
15442
- }
15443
- if (!utils_default.isString(value))
15444
- return;
15445
- if (utils_default.isString(filter2)) {
15446
- return value.indexOf(filter2) !== -1;
15447
- }
15448
- if (utils_default.isRegExp(filter2)) {
15449
- return filter2.test(value);
15450
- }
15451
- }
15452
- function formatHeader(header) {
15453
- return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
15454
- return char.toUpperCase() + str;
15455
- });
15456
- }
15457
- function buildAccessors(obj, header) {
15458
- const accessorName = utils_default.toCamelCase(" " + header);
15459
- ["get", "set", "has"].forEach((methodName) => {
15460
- Object.defineProperty(obj, methodName + accessorName, {
15461
- value: function(arg1, arg2, arg3) {
15462
- return this[methodName].call(this, header, arg1, arg2, arg3);
15463
- },
15464
- configurable: true
15465
- });
15466
- });
15467
- }
15468
-
15469
- class AxiosHeaders {
15470
- constructor(headers) {
15471
- headers && this.set(headers);
15472
- }
15473
- set(header, valueOrRewrite, rewrite) {
15474
- const self2 = this;
15475
- function setHeader(_value, _header, _rewrite) {
15476
- const lHeader = normalizeHeader(_header);
15477
- if (!lHeader) {
15478
- throw new Error("header name must be a non-empty string");
15479
- }
15480
- const key = utils_default.findKey(self2, lHeader);
15481
- if (!key || self2[key] === undefined || _rewrite === true || _rewrite === undefined && self2[key] !== false) {
15482
- self2[key || _header] = normalizeValue(_value);
15483
- }
15484
- }
15485
- const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
15486
- if (utils_default.isPlainObject(header) || header instanceof this.constructor) {
15487
- setHeaders(header, valueOrRewrite);
15488
- } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
15489
- setHeaders(parseHeaders_default(header), valueOrRewrite);
15490
- } else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
15491
- let obj = {}, dest, key;
15492
- for (const entry of header) {
15493
- if (!utils_default.isArray(entry)) {
15494
- throw TypeError("Object iterator must return a key-value pair");
15495
- }
15496
- obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
15497
- }
15498
- setHeaders(obj, valueOrRewrite);
15499
- } else {
15500
- header != null && setHeader(valueOrRewrite, header, rewrite);
15501
- }
15502
- return this;
15503
- }
15504
- get(header, parser) {
15505
- header = normalizeHeader(header);
15506
- if (header) {
15507
- const key = utils_default.findKey(this, header);
15508
- if (key) {
15509
- const value = this[key];
15510
- if (!parser) {
15511
- return value;
15512
- }
15513
- if (parser === true) {
15514
- return parseTokens(value);
15515
- }
15516
- if (utils_default.isFunction(parser)) {
15517
- return parser.call(this, value, key);
15518
- }
15519
- if (utils_default.isRegExp(parser)) {
15520
- return parser.exec(value);
15521
- }
15522
- throw new TypeError("parser must be boolean|regexp|function");
15523
- }
15524
- }
15525
- }
15526
- has(header, matcher) {
15527
- header = normalizeHeader(header);
15528
- if (header) {
15529
- const key = utils_default.findKey(this, header);
15530
- return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
15531
- }
15532
- return false;
15533
- }
15534
- delete(header, matcher) {
15535
- const self2 = this;
15536
- let deleted = false;
15537
- function deleteHeader(_header) {
15538
- _header = normalizeHeader(_header);
15539
- if (_header) {
15540
- const key = utils_default.findKey(self2, _header);
15541
- if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
15542
- delete self2[key];
15543
- deleted = true;
15544
- }
15677
+ const isLast = index >= path.length;
15678
+ name = !name && utils_default.isArray(target) ? target.length : name;
15679
+ if (isLast) {
15680
+ if (utils_default.hasOwnProp(target, name)) {
15681
+ target[name] = utils_default.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
15682
+ } else {
15683
+ target[name] = value;
15545
15684
  }
15685
+ return !isNumericKey;
15546
15686
  }
15547
- if (utils_default.isArray(header)) {
15548
- header.forEach(deleteHeader);
15549
- } else {
15550
- deleteHeader(header);
15687
+ if (!target[name] || !utils_default.isObject(target[name])) {
15688
+ target[name] = [];
15551
15689
  }
15552
- return deleted;
15553
- }
15554
- clear(matcher) {
15555
- const keys = Object.keys(this);
15556
- let i = keys.length;
15557
- let deleted = false;
15558
- while (i--) {
15559
- const key = keys[i];
15560
- if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
15561
- delete this[key];
15562
- deleted = true;
15563
- }
15690
+ const result = buildPath(path, value, target[name], index);
15691
+ if (result && utils_default.isArray(target[name])) {
15692
+ target[name] = arrayToObject(target[name]);
15564
15693
  }
15565
- return deleted;
15566
- }
15567
- normalize(format) {
15568
- const self2 = this;
15569
- const headers = {};
15570
- utils_default.forEach(this, (value, header) => {
15571
- const key = utils_default.findKey(headers, header);
15572
- if (key) {
15573
- self2[key] = normalizeValue(value);
15574
- delete self2[header];
15575
- return;
15576
- }
15577
- const normalized = format ? formatHeader(header) : String(header).trim();
15578
- if (normalized !== header) {
15579
- delete self2[header];
15580
- }
15581
- self2[normalized] = normalizeValue(value);
15582
- headers[normalized] = true;
15583
- });
15584
- return this;
15585
- }
15586
- concat(...targets) {
15587
- return this.constructor.concat(this, ...targets);
15694
+ return !isNumericKey;
15588
15695
  }
15589
- toJSON(asStrings) {
15590
- const obj = Object.create(null);
15591
- utils_default.forEach(this, (value, header) => {
15592
- value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value);
15696
+ if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) {
15697
+ const obj = {};
15698
+ utils_default.forEachEntry(formData, (name, value) => {
15699
+ buildPath(parsePropPath(name), value, obj, 0);
15593
15700
  });
15594
15701
  return obj;
15595
15702
  }
15596
- [Symbol.iterator]() {
15597
- return Object.entries(this.toJSON())[Symbol.iterator]();
15598
- }
15599
- toString() {
15600
- return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join(`
15601
- `);
15602
- }
15603
- getSetCookie() {
15604
- return this.get("set-cookie") || [];
15605
- }
15606
- get [Symbol.toStringTag]() {
15607
- return "AxiosHeaders";
15608
- }
15609
- static from(thing) {
15610
- return thing instanceof this ? thing : new this(thing);
15611
- }
15612
- static concat(first, ...targets) {
15613
- const computed = new this(first);
15614
- targets.forEach((target) => computed.set(target));
15615
- return computed;
15616
- }
15617
- static accessor(header) {
15618
- const internals = this[$internals] = this[$internals] = {
15619
- accessors: {}
15620
- };
15621
- const accessors = internals.accessors;
15622
- const prototype3 = this.prototype;
15623
- function defineAccessor(_header) {
15624
- const lHeader = normalizeHeader(_header);
15625
- if (!accessors[lHeader]) {
15626
- buildAccessors(prototype3, _header);
15627
- accessors[lHeader] = true;
15703
+ return null;
15704
+ }
15705
+ var formDataToJSON_default = formDataToJSON;
15706
+
15707
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/defaults/index.js
15708
+ var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : undefined;
15709
+ function stringifySafely(rawValue, parser, encoder) {
15710
+ if (utils_default.isString(rawValue)) {
15711
+ try {
15712
+ (parser || JSON.parse)(rawValue);
15713
+ return utils_default.trim(rawValue);
15714
+ } catch (e) {
15715
+ if (e.name !== "SyntaxError") {
15716
+ throw e;
15628
15717
  }
15629
15718
  }
15630
- utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
15631
- return this;
15632
15719
  }
15720
+ return (encoder || JSON.stringify)(rawValue);
15633
15721
  }
15634
- AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
15635
- utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
15636
- let mapped = key[0].toUpperCase() + key.slice(1);
15637
- return {
15638
- get: () => value,
15639
- set(headerValue) {
15640
- this[mapped] = headerValue;
15722
+ var defaults = {
15723
+ transitional: transitional_default,
15724
+ adapter: ["xhr", "http", "fetch"],
15725
+ transformRequest: [
15726
+ function transformRequest(data, headers) {
15727
+ const contentType = headers.getContentType() || "";
15728
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
15729
+ const isObjectPayload = utils_default.isObject(data);
15730
+ if (isObjectPayload && utils_default.isHTMLForm(data)) {
15731
+ data = new FormData(data);
15732
+ }
15733
+ const isFormData2 = utils_default.isFormData(data);
15734
+ if (isFormData2) {
15735
+ return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
15736
+ }
15737
+ if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
15738
+ return data;
15739
+ }
15740
+ if (utils_default.isArrayBufferView(data)) {
15741
+ return data.buffer;
15742
+ }
15743
+ if (utils_default.isURLSearchParams(data)) {
15744
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
15745
+ return data.toString();
15746
+ }
15747
+ let isFileList2;
15748
+ if (isObjectPayload) {
15749
+ const formSerializer = own(this, "formSerializer");
15750
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
15751
+ return toURLEncodedForm(data, formSerializer).toString();
15752
+ }
15753
+ if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
15754
+ const env = own(this, "env");
15755
+ const _FormData = env && env.FormData;
15756
+ return toFormData_default(isFileList2 ? { "files[]": data } : data, _FormData && new _FormData, formSerializer);
15757
+ }
15758
+ }
15759
+ if (isObjectPayload || hasJSONContentType) {
15760
+ headers.setContentType("application/json", false);
15761
+ return stringifySafely(data);
15762
+ }
15763
+ return data;
15641
15764
  }
15642
- };
15765
+ ],
15766
+ transformResponse: [
15767
+ function transformResponse(data) {
15768
+ const transitional = own(this, "transitional") || defaults.transitional;
15769
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
15770
+ const responseType = own(this, "responseType");
15771
+ const JSONRequested = responseType === "json";
15772
+ if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
15773
+ return data;
15774
+ }
15775
+ if (data && utils_default.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
15776
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
15777
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
15778
+ try {
15779
+ return JSON.parse(data, own(this, "parseReviver"));
15780
+ } catch (e) {
15781
+ if (strictJSONParsing) {
15782
+ if (e.name === "SyntaxError") {
15783
+ throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, own(this, "response"));
15784
+ }
15785
+ throw e;
15786
+ }
15787
+ }
15788
+ }
15789
+ return data;
15790
+ }
15791
+ ],
15792
+ timeout: 0,
15793
+ xsrfCookieName: "XSRF-TOKEN",
15794
+ xsrfHeaderName: "X-XSRF-TOKEN",
15795
+ maxContentLength: -1,
15796
+ maxBodyLength: -1,
15797
+ env: {
15798
+ FormData: platform_default.classes.FormData,
15799
+ Blob: platform_default.classes.Blob
15800
+ },
15801
+ validateStatus: function validateStatus(status) {
15802
+ return status >= 200 && status < 300;
15803
+ },
15804
+ headers: {
15805
+ common: {
15806
+ Accept: "application/json, text/plain, */*",
15807
+ "Content-Type": undefined
15808
+ }
15809
+ }
15810
+ };
15811
+ utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
15812
+ defaults.headers[method] = {};
15643
15813
  });
15644
- utils_default.freezeMethods(AxiosHeaders);
15645
- var AxiosHeaders_default = AxiosHeaders;
15814
+ var defaults_default = defaults;
15646
15815
 
15647
- // ../../node_modules/axios/lib/core/transformData.js
15816
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/core/transformData.js
15648
15817
  function transformData(fns, response) {
15649
15818
  const config = this || defaults_default;
15650
15819
  const context = response || config;
@@ -15657,38 +15826,38 @@ function transformData(fns, response) {
15657
15826
  return data;
15658
15827
  }
15659
15828
 
15660
- // ../../node_modules/axios/lib/cancel/isCancel.js
15829
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/cancel/isCancel.js
15661
15830
  function isCancel(value) {
15662
15831
  return !!(value && value.__CANCEL__);
15663
15832
  }
15664
15833
 
15665
- // ../../node_modules/axios/lib/cancel/CanceledError.js
15666
- function CanceledError(message, config, request) {
15667
- AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
15668
- this.name = "CanceledError";
15834
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/cancel/CanceledError.js
15835
+ class CanceledError extends AxiosError_default {
15836
+ constructor(message, config, request) {
15837
+ super(message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
15838
+ this.name = "CanceledError";
15839
+ this.__CANCEL__ = true;
15840
+ }
15669
15841
  }
15670
- utils_default.inherits(CanceledError, AxiosError_default, {
15671
- __CANCEL__: true
15672
- });
15673
15842
  var CanceledError_default = CanceledError;
15674
15843
 
15675
- // ../../node_modules/axios/lib/core/settle.js
15844
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/core/settle.js
15676
15845
  function settle(resolve, reject, response) {
15677
15846
  const validateStatus2 = response.config.validateStatus;
15678
15847
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
15679
15848
  resolve(response);
15680
15849
  } else {
15681
- reject(new AxiosError_default("Request failed with status code " + response.status, [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
15850
+ reject(new AxiosError_default("Request failed with status code " + response.status, response.status >= 400 && response.status < 500 ? AxiosError_default.ERR_BAD_REQUEST : AxiosError_default.ERR_BAD_RESPONSE, response.config, response.request, response));
15682
15851
  }
15683
15852
  }
15684
15853
 
15685
- // ../../node_modules/axios/lib/helpers/parseProtocol.js
15854
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/parseProtocol.js
15686
15855
  function parseProtocol(url) {
15687
- const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
15856
+ const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
15688
15857
  return match && match[1] || "";
15689
15858
  }
15690
15859
 
15691
- // ../../node_modules/axios/lib/helpers/speedometer.js
15860
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/speedometer.js
15692
15861
  function speedometer(samplesCount, min) {
15693
15862
  samplesCount = samplesCount || 10;
15694
15863
  const bytes = new Array(samplesCount);
@@ -15724,7 +15893,7 @@ function speedometer(samplesCount, min) {
15724
15893
  }
15725
15894
  var speedometer_default = speedometer;
15726
15895
 
15727
- // ../../node_modules/axios/lib/helpers/throttle.js
15896
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/throttle.js
15728
15897
  function throttle(fn, freq) {
15729
15898
  let timestamp = 0;
15730
15899
  let threshold = 1000 / freq;
@@ -15759,24 +15928,24 @@ function throttle(fn, freq) {
15759
15928
  }
15760
15929
  var throttle_default = throttle;
15761
15930
 
15762
- // ../../node_modules/axios/lib/helpers/progressEventReducer.js
15931
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/progressEventReducer.js
15763
15932
  var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
15764
15933
  let bytesNotified = 0;
15765
15934
  const _speedometer = speedometer_default(50, 250);
15766
15935
  return throttle_default((e) => {
15767
- const loaded = e.loaded;
15936
+ const rawLoaded = e.loaded;
15768
15937
  const total = e.lengthComputable ? e.total : undefined;
15769
- const progressBytes = loaded - bytesNotified;
15938
+ const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
15939
+ const progressBytes = Math.max(0, loaded - bytesNotified);
15770
15940
  const rate = _speedometer(progressBytes);
15771
- const inRange = loaded <= total;
15772
- bytesNotified = loaded;
15941
+ bytesNotified = Math.max(bytesNotified, loaded);
15773
15942
  const data = {
15774
15943
  loaded,
15775
15944
  total,
15776
15945
  progress: total ? loaded / total : undefined,
15777
15946
  bytes: progressBytes,
15778
15947
  rate: rate ? rate : undefined,
15779
- estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
15948
+ estimated: rate && total ? (total - loaded) / rate : undefined,
15780
15949
  event: e,
15781
15950
  lengthComputable: total != null,
15782
15951
  [isDownloadStream ? "download" : "upload"]: true
@@ -15786,36 +15955,61 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
15786
15955
  };
15787
15956
  var progressEventDecorator = (total, throttled) => {
15788
15957
  const lengthComputable = total != null;
15789
- return [(loaded) => throttled[0]({
15790
- lengthComputable,
15791
- total,
15792
- loaded
15793
- }), throttled[1]];
15958
+ return [
15959
+ (loaded) => throttled[0]({
15960
+ lengthComputable,
15961
+ total,
15962
+ loaded
15963
+ }),
15964
+ throttled[1]
15965
+ ];
15794
15966
  };
15795
15967
  var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
15796
15968
 
15797
- // ../../node_modules/axios/lib/helpers/isURLSameOrigin.js
15969
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/isURLSameOrigin.js
15798
15970
  var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin2, isMSIE) => (url) => {
15799
15971
  url = new URL(url, platform_default.origin);
15800
15972
  return origin2.protocol === url.protocol && origin2.host === url.host && (isMSIE || origin2.port === url.port);
15801
15973
  })(new URL(platform_default.origin), platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)) : () => true;
15802
15974
 
15803
- // ../../node_modules/axios/lib/helpers/cookies.js
15975
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/cookies.js
15804
15976
  var cookies_default = platform_default.hasStandardBrowserEnv ? {
15805
- write(name, value, expires, path, domain, secure) {
15806
- const cookie = [name + "=" + encodeURIComponent(value)];
15807
- utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
15808
- utils_default.isString(path) && cookie.push("path=" + path);
15809
- utils_default.isString(domain) && cookie.push("domain=" + domain);
15810
- secure === true && cookie.push("secure");
15977
+ write(name, value, expires, path, domain, secure, sameSite) {
15978
+ if (typeof document === "undefined")
15979
+ return;
15980
+ const cookie = [`${name}=${encodeURIComponent(value)}`];
15981
+ if (utils_default.isNumber(expires)) {
15982
+ cookie.push(`expires=${new Date(expires).toUTCString()}`);
15983
+ }
15984
+ if (utils_default.isString(path)) {
15985
+ cookie.push(`path=${path}`);
15986
+ }
15987
+ if (utils_default.isString(domain)) {
15988
+ cookie.push(`domain=${domain}`);
15989
+ }
15990
+ if (secure === true) {
15991
+ cookie.push("secure");
15992
+ }
15993
+ if (utils_default.isString(sameSite)) {
15994
+ cookie.push(`SameSite=${sameSite}`);
15995
+ }
15811
15996
  document.cookie = cookie.join("; ");
15812
15997
  },
15813
15998
  read(name) {
15814
- const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
15815
- return match ? decodeURIComponent(match[3]) : null;
15999
+ if (typeof document === "undefined")
16000
+ return null;
16001
+ const cookies = document.cookie.split(";");
16002
+ for (let i = 0;i < cookies.length; i++) {
16003
+ const cookie = cookies[i].replace(/^\s+/, "");
16004
+ const eq = cookie.indexOf("=");
16005
+ if (eq !== -1 && cookie.slice(0, eq) === name) {
16006
+ return decodeURIComponent(cookie.slice(eq + 1));
16007
+ }
16008
+ }
16009
+ return null;
15816
16010
  },
15817
16011
  remove(name) {
15818
- this.write(name, "", Date.now() - 86400000);
16012
+ this.write(name, "", Date.now() - 86400000, "/");
15819
16013
  }
15820
16014
  } : {
15821
16015
  write() {},
@@ -15825,30 +16019,40 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? {
15825
16019
  remove() {}
15826
16020
  };
15827
16021
 
15828
- // ../../node_modules/axios/lib/helpers/isAbsoluteURL.js
16022
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/isAbsoluteURL.js
15829
16023
  function isAbsoluteURL(url) {
16024
+ if (typeof url !== "string") {
16025
+ return false;
16026
+ }
15830
16027
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
15831
16028
  }
15832
16029
 
15833
- // ../../node_modules/axios/lib/helpers/combineURLs.js
16030
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/combineURLs.js
15834
16031
  function combineURLs(baseURL, relativeURL) {
15835
16032
  return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
15836
16033
  }
15837
16034
 
15838
- // ../../node_modules/axios/lib/core/buildFullPath.js
16035
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/core/buildFullPath.js
15839
16036
  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
15840
16037
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
15841
- if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
16038
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
15842
16039
  return combineURLs(baseURL, requestedURL);
15843
16040
  }
15844
16041
  return requestedURL;
15845
16042
  }
15846
16043
 
15847
- // ../../node_modules/axios/lib/core/mergeConfig.js
16044
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/core/mergeConfig.js
15848
16045
  var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
15849
16046
  function mergeConfig(config1, config2) {
15850
16047
  config2 = config2 || {};
15851
- const config = {};
16048
+ const config = Object.create(null);
16049
+ Object.defineProperty(config, "hasOwnProperty", {
16050
+ __proto__: null,
16051
+ value: Object.prototype.hasOwnProperty,
16052
+ enumerable: false,
16053
+ writable: true,
16054
+ configurable: true
16055
+ });
15852
16056
  function getMergedValue(target, source, prop, caseless) {
15853
16057
  if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
15854
16058
  return utils_default.merge.call({ caseless }, target, source);
@@ -15879,9 +16083,9 @@ function mergeConfig(config1, config2) {
15879
16083
  }
15880
16084
  }
15881
16085
  function mergeDirectKeys(a, b, prop) {
15882
- if (prop in config2) {
16086
+ if (utils_default.hasOwnProp(config2, prop)) {
15883
16087
  return getMergedValue(a, b);
15884
- } else if (prop in config1) {
16088
+ } else if (utils_default.hasOwnProp(config1, prop)) {
15885
16089
  return getMergedValue(undefined, a);
15886
16090
  }
15887
16091
  }
@@ -15912,43 +16116,67 @@ function mergeConfig(config1, config2) {
15912
16116
  httpsAgent: defaultToConfig2,
15913
16117
  cancelToken: defaultToConfig2,
15914
16118
  socketPath: defaultToConfig2,
16119
+ allowedSocketPaths: defaultToConfig2,
15915
16120
  responseEncoding: defaultToConfig2,
15916
16121
  validateStatus: mergeDirectKeys,
15917
16122
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
15918
16123
  };
15919
16124
  utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
15920
- const merge2 = mergeMap[prop] || mergeDeepProperties;
15921
- const configValue = merge2(config1[prop], config2[prop], prop);
16125
+ if (prop === "__proto__" || prop === "constructor" || prop === "prototype")
16126
+ return;
16127
+ const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
16128
+ const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : undefined;
16129
+ const b = utils_default.hasOwnProp(config2, prop) ? config2[prop] : undefined;
16130
+ const configValue = merge2(a, b, prop);
15922
16131
  utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
15923
16132
  });
15924
16133
  return config;
15925
16134
  }
15926
16135
 
15927
- // ../../node_modules/axios/lib/helpers/resolveConfig.js
16136
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/resolveConfig.js
16137
+ var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
16138
+ function setFormDataHeaders(headers, formHeaders, policy) {
16139
+ if (policy !== "content-only") {
16140
+ headers.set(formHeaders);
16141
+ return;
16142
+ }
16143
+ Object.entries(formHeaders).forEach(([key, val]) => {
16144
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
16145
+ headers.set(key, val);
16146
+ }
16147
+ });
16148
+ }
16149
+ var encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
15928
16150
  var resolveConfig_default = (config) => {
15929
16151
  const newConfig = mergeConfig({}, config);
15930
- let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
16152
+ const own2 = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : undefined;
16153
+ const data = own2("data");
16154
+ let withXSRFToken = own2("withXSRFToken");
16155
+ const xsrfHeaderName = own2("xsrfHeaderName");
16156
+ const xsrfCookieName = own2("xsrfCookieName");
16157
+ let headers = own2("headers");
16158
+ const auth = own2("auth");
16159
+ const baseURL = own2("baseURL");
16160
+ const allowAbsoluteUrls = own2("allowAbsoluteUrls");
16161
+ const url = own2("url");
15931
16162
  newConfig.headers = headers = AxiosHeaders_default.from(headers);
15932
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
16163
+ newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls), config.params, config.paramsSerializer);
15933
16164
  if (auth) {
15934
- headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
16165
+ headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : "")));
15935
16166
  }
15936
16167
  if (utils_default.isFormData(data)) {
15937
16168
  if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
15938
16169
  headers.setContentType(undefined);
15939
16170
  } else if (utils_default.isFunction(data.getHeaders)) {
15940
- const formHeaders = data.getHeaders();
15941
- const allowedHeaders = ["content-type", "content-length"];
15942
- Object.entries(formHeaders).forEach(([key, val]) => {
15943
- if (allowedHeaders.includes(key.toLowerCase())) {
15944
- headers.set(key, val);
15945
- }
15946
- });
16171
+ setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
15947
16172
  }
15948
16173
  }
15949
16174
  if (platform_default.hasStandardBrowserEnv) {
15950
- withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
15951
- if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
16175
+ if (utils_default.isFunction(withXSRFToken)) {
16176
+ withXSRFToken = withXSRFToken(newConfig);
16177
+ }
16178
+ const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin_default(newConfig.url);
16179
+ if (shouldSendXSRF) {
15952
16180
  const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
15953
16181
  if (xsrfValue) {
15954
16182
  headers.set(xsrfHeaderName, xsrfValue);
@@ -15958,7 +16186,7 @@ var resolveConfig_default = (config) => {
15958
16186
  return newConfig;
15959
16187
  };
15960
16188
 
15961
- // ../../node_modules/axios/lib/adapters/xhr.js
16189
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/adapters/xhr.js
15962
16190
  var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
15963
16191
  var xhr_default = isXHRAdapterSupported && function(config) {
15964
16192
  return new Promise(function dispatchXhrRequest(resolve, reject) {
@@ -16008,7 +16236,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
16008
16236
  if (!request || request.readyState !== 4) {
16009
16237
  return;
16010
16238
  }
16011
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
16239
+ if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith("file:"))) {
16012
16240
  return;
16013
16241
  }
16014
16242
  setTimeout(onloadend);
@@ -16019,6 +16247,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
16019
16247
  return;
16020
16248
  }
16021
16249
  reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request));
16250
+ done();
16022
16251
  request = null;
16023
16252
  };
16024
16253
  request.onerror = function handleError(event) {
@@ -16026,6 +16255,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
16026
16255
  const err = new AxiosError_default(msg, AxiosError_default.ERR_NETWORK, config, request);
16027
16256
  err.event = event || null;
16028
16257
  reject(err);
16258
+ done();
16029
16259
  request = null;
16030
16260
  };
16031
16261
  request.ontimeout = function handleTimeout() {
@@ -16035,6 +16265,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
16035
16265
  timeoutErrorMessage = _config.timeoutErrorMessage;
16036
16266
  }
16037
16267
  reject(new AxiosError_default(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, config, request));
16268
+ done();
16038
16269
  request = null;
16039
16270
  };
16040
16271
  requestData === undefined && requestHeaders.setContentType(null);
@@ -16065,6 +16296,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
16065
16296
  }
16066
16297
  reject(!cancel || cancel.type ? new CanceledError_default(null, config, request) : cancel);
16067
16298
  request.abort();
16299
+ done();
16068
16300
  request = null;
16069
16301
  };
16070
16302
  _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
@@ -16073,7 +16305,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
16073
16305
  }
16074
16306
  }
16075
16307
  const protocol = parseProtocol(_config.url);
16076
- if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
16308
+ if (protocol && !platform_default.protocols.includes(protocol)) {
16077
16309
  reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
16078
16310
  return;
16079
16311
  }
@@ -16081,7 +16313,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
16081
16313
  });
16082
16314
  };
16083
16315
 
16084
- // ../../node_modules/axios/lib/helpers/composeSignals.js
16316
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/composeSignals.js
16085
16317
  var composeSignals = (signals, timeout) => {
16086
16318
  const { length } = signals = signals ? signals.filter(Boolean) : [];
16087
16319
  if (timeout || length) {
@@ -16097,7 +16329,7 @@ var composeSignals = (signals, timeout) => {
16097
16329
  };
16098
16330
  let timer = timeout && setTimeout(() => {
16099
16331
  timer = null;
16100
- onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
16332
+ onabort(new AxiosError_default(`timeout of ${timeout}ms exceeded`, AxiosError_default.ETIMEDOUT));
16101
16333
  }, timeout);
16102
16334
  const unsubscribe = () => {
16103
16335
  if (signals) {
@@ -16117,7 +16349,7 @@ var composeSignals = (signals, timeout) => {
16117
16349
  };
16118
16350
  var composeSignals_default = composeSignals;
16119
16351
 
16120
- // ../../node_modules/axios/lib/helpers/trackStream.js
16352
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/trackStream.js
16121
16353
  var streamChunk = function* (chunk, chunkSize) {
16122
16354
  let len = chunk.byteLength;
16123
16355
  if (!chunkSize || len < chunkSize) {
@@ -16194,17 +16426,86 @@ var trackStream = (stream, chunkSize, onProgress, onFinish) => {
16194
16426
  });
16195
16427
  };
16196
16428
 
16197
- // ../../node_modules/axios/lib/adapters/fetch.js
16429
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
16430
+ function estimateDataURLDecodedBytes(url) {
16431
+ if (!url || typeof url !== "string")
16432
+ return 0;
16433
+ if (!url.startsWith("data:"))
16434
+ return 0;
16435
+ const comma = url.indexOf(",");
16436
+ if (comma < 0)
16437
+ return 0;
16438
+ const meta = url.slice(5, comma);
16439
+ const body = url.slice(comma + 1);
16440
+ const isBase64 = /;base64/i.test(meta);
16441
+ if (isBase64) {
16442
+ let effectiveLen = body.length;
16443
+ const len = body.length;
16444
+ for (let i = 0;i < len; i++) {
16445
+ if (body.charCodeAt(i) === 37 && i + 2 < len) {
16446
+ const a = body.charCodeAt(i + 1);
16447
+ const b = body.charCodeAt(i + 2);
16448
+ 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);
16449
+ if (isHex) {
16450
+ effectiveLen -= 2;
16451
+ i += 2;
16452
+ }
16453
+ }
16454
+ }
16455
+ let pad = 0;
16456
+ let idx = len - 1;
16457
+ const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && body.charCodeAt(j - 1) === 51 && (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
16458
+ if (idx >= 0) {
16459
+ if (body.charCodeAt(idx) === 61) {
16460
+ pad++;
16461
+ idx--;
16462
+ } else if (tailIsPct3D(idx)) {
16463
+ pad++;
16464
+ idx -= 3;
16465
+ }
16466
+ }
16467
+ if (pad === 1 && idx >= 0) {
16468
+ if (body.charCodeAt(idx) === 61) {
16469
+ pad++;
16470
+ } else if (tailIsPct3D(idx)) {
16471
+ pad++;
16472
+ }
16473
+ }
16474
+ const groups = Math.floor(effectiveLen / 4);
16475
+ const bytes2 = groups * 3 - (pad || 0);
16476
+ return bytes2 > 0 ? bytes2 : 0;
16477
+ }
16478
+ if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
16479
+ return Buffer.byteLength(body, "utf8");
16480
+ }
16481
+ let bytes = 0;
16482
+ for (let i = 0, len = body.length;i < len; i++) {
16483
+ const c = body.charCodeAt(i);
16484
+ if (c < 128) {
16485
+ bytes += 1;
16486
+ } else if (c < 2048) {
16487
+ bytes += 2;
16488
+ } else if (c >= 55296 && c <= 56319 && i + 1 < len) {
16489
+ const next = body.charCodeAt(i + 1);
16490
+ if (next >= 56320 && next <= 57343) {
16491
+ bytes += 4;
16492
+ i++;
16493
+ } else {
16494
+ bytes += 3;
16495
+ }
16496
+ } else {
16497
+ bytes += 3;
16498
+ }
16499
+ }
16500
+ return bytes;
16501
+ }
16502
+
16503
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/env/data.js
16504
+ var VERSION = "1.16.0";
16505
+
16506
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/adapters/fetch.js
16198
16507
  var DEFAULT_CHUNK_SIZE = 64 * 1024;
16199
16508
  var { isFunction: isFunction2 } = utils_default;
16200
- var globalFetchAPI = (({ Request, Response }) => ({
16201
- Request,
16202
- Response
16203
- }))(utils_default.global);
16204
- var {
16205
- ReadableStream: ReadableStream2,
16206
- TextEncoder
16207
- } = utils_default.global;
16208
16509
  var test = (fn, ...args) => {
16209
16510
  try {
16210
16511
  return !!fn(...args);
@@ -16213,9 +16514,14 @@ var test = (fn, ...args) => {
16213
16514
  }
16214
16515
  };
16215
16516
  var factory = (env) => {
16517
+ const globalObject = utils_default.global ?? globalThis;
16518
+ const { ReadableStream: ReadableStream2, TextEncoder } = globalObject;
16216
16519
  env = utils_default.merge.call({
16217
16520
  skipUndefined: true
16218
- }, globalFetchAPI, env);
16521
+ }, {
16522
+ Request: globalObject.Request,
16523
+ Response: globalObject.Response
16524
+ }, env);
16219
16525
  const { fetch: envFetch, Request, Response } = env;
16220
16526
  const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function";
16221
16527
  const isRequestSupported = isFunction2(Request);
@@ -16227,14 +16533,18 @@ var factory = (env) => {
16227
16533
  const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
16228
16534
  const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
16229
16535
  let duplexAccessed = false;
16230
- const hasContentType = new Request(platform_default.origin, {
16536
+ const request = new Request(platform_default.origin, {
16231
16537
  body: new ReadableStream2,
16232
16538
  method: "POST",
16233
16539
  get duplex() {
16234
16540
  duplexAccessed = true;
16235
16541
  return "half";
16236
16542
  }
16237
- }).headers.has("Content-Type");
16543
+ });
16544
+ const hasContentType = request.headers.has("Content-Type");
16545
+ if (request.body != null) {
16546
+ request.body.cancel();
16547
+ }
16238
16548
  return duplexAccessed && !hasContentType;
16239
16549
  });
16240
16550
  const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
@@ -16293,8 +16603,12 @@ var factory = (env) => {
16293
16603
  responseType,
16294
16604
  headers,
16295
16605
  withCredentials = "same-origin",
16296
- fetchOptions
16606
+ fetchOptions,
16607
+ maxContentLength,
16608
+ maxBodyLength
16297
16609
  } = resolveConfig_default(config);
16610
+ const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1;
16611
+ const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1;
16298
16612
  let _fetch = envFetch || fetch;
16299
16613
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
16300
16614
  let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
@@ -16304,6 +16618,18 @@ var factory = (env) => {
16304
16618
  });
16305
16619
  let requestContentLength;
16306
16620
  try {
16621
+ if (hasMaxContentLength && typeof url === "string" && url.startsWith("data:")) {
16622
+ const estimated = estimateDataURLDecodedBytes(url);
16623
+ if (estimated > maxContentLength) {
16624
+ throw new AxiosError_default("maxContentLength size of " + maxContentLength + " exceeded", AxiosError_default.ERR_BAD_RESPONSE, config, request);
16625
+ }
16626
+ }
16627
+ if (hasMaxBodyLength && method !== "get" && method !== "head") {
16628
+ const outboundLength = await resolveBodyLength(headers, data);
16629
+ if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
16630
+ throw new AxiosError_default("Request body larger than maxBodyLength limit", AxiosError_default.ERR_BAD_REQUEST, config, request);
16631
+ }
16632
+ }
16307
16633
  if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
16308
16634
  let _request = new Request(url, {
16309
16635
  method: "POST",
@@ -16323,6 +16649,13 @@ var factory = (env) => {
16323
16649
  withCredentials = withCredentials ? "include" : "omit";
16324
16650
  }
16325
16651
  const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
16652
+ if (utils_default.isFormData(data)) {
16653
+ const contentType = headers.getContentType();
16654
+ if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) {
16655
+ headers.delete("content-type");
16656
+ }
16657
+ }
16658
+ headers.set("User-Agent", "axios/" + VERSION, false);
16326
16659
  const resolvedOptions = {
16327
16660
  ...fetchOptions,
16328
16661
  signal: composedSignal,
@@ -16334,21 +16667,52 @@ var factory = (env) => {
16334
16667
  };
16335
16668
  request = isRequestSupported && new Request(url, resolvedOptions);
16336
16669
  let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
16670
+ if (hasMaxContentLength) {
16671
+ const declaredLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
16672
+ if (declaredLength != null && declaredLength > maxContentLength) {
16673
+ throw new AxiosError_default("maxContentLength size of " + maxContentLength + " exceeded", AxiosError_default.ERR_BAD_RESPONSE, config, request);
16674
+ }
16675
+ }
16337
16676
  const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
16338
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
16677
+ if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) {
16339
16678
  const options = {};
16340
16679
  ["status", "statusText", "headers"].forEach((prop) => {
16341
16680
  options[prop] = response[prop];
16342
16681
  });
16343
16682
  const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
16344
16683
  const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
16345
- response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
16684
+ let bytesRead = 0;
16685
+ const onChunkProgress = (loadedBytes) => {
16686
+ if (hasMaxContentLength) {
16687
+ bytesRead = loadedBytes;
16688
+ if (bytesRead > maxContentLength) {
16689
+ throw new AxiosError_default("maxContentLength size of " + maxContentLength + " exceeded", AxiosError_default.ERR_BAD_RESPONSE, config, request);
16690
+ }
16691
+ }
16692
+ onProgress && onProgress(loadedBytes);
16693
+ };
16694
+ response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
16346
16695
  flush && flush();
16347
16696
  unsubscribe && unsubscribe();
16348
16697
  }), options);
16349
16698
  }
16350
16699
  responseType = responseType || "text";
16351
16700
  let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
16701
+ if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
16702
+ let materializedSize;
16703
+ if (responseData != null) {
16704
+ if (typeof responseData.byteLength === "number") {
16705
+ materializedSize = responseData.byteLength;
16706
+ } else if (typeof responseData.size === "number") {
16707
+ materializedSize = responseData.size;
16708
+ } else if (typeof responseData === "string") {
16709
+ materializedSize = typeof TextEncoder === "function" ? new TextEncoder().encode(responseData).byteLength : responseData.length;
16710
+ }
16711
+ }
16712
+ if (typeof materializedSize === "number" && materializedSize > maxContentLength) {
16713
+ throw new AxiosError_default("maxContentLength size of " + maxContentLength + " exceeded", AxiosError_default.ERR_BAD_RESPONSE, config, request);
16714
+ }
16715
+ }
16352
16716
  !isStreamResponse && unsubscribe && unsubscribe();
16353
16717
  return await new Promise((resolve, reject) => {
16354
16718
  settle(resolve, reject, {
@@ -16362,24 +16726,27 @@ var factory = (env) => {
16362
16726
  });
16363
16727
  } catch (err) {
16364
16728
  unsubscribe && unsubscribe();
16729
+ if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError_default) {
16730
+ const canceledError = composedSignal.reason;
16731
+ canceledError.config = config;
16732
+ request && (canceledError.request = request);
16733
+ err !== canceledError && (canceledError.cause = err);
16734
+ throw canceledError;
16735
+ }
16365
16736
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
16366
- throw Object.assign(new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request), {
16737
+ throw Object.assign(new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request, err && err.response), {
16367
16738
  cause: err.cause || err
16368
16739
  });
16369
16740
  }
16370
- throw AxiosError_default.from(err, err && err.code, config, request);
16741
+ throw AxiosError_default.from(err, err && err.code, config, request, err && err.response);
16371
16742
  }
16372
16743
  };
16373
16744
  };
16374
16745
  var seedCache = new Map;
16375
16746
  var getFetch = (config) => {
16376
- let env = config ? config.env : {};
16747
+ let env = config && config.env || {};
16377
16748
  const { fetch: fetch2, Request, Response } = env;
16378
- const seeds = [
16379
- Request,
16380
- Response,
16381
- fetch2
16382
- ];
16749
+ const seeds = [Request, Response, fetch2];
16383
16750
  let len = seeds.length, i = len, seed, target, map = seedCache;
16384
16751
  while (i--) {
16385
16752
  seed = seeds[i];
@@ -16391,7 +16758,7 @@ var getFetch = (config) => {
16391
16758
  };
16392
16759
  var adapter = getFetch();
16393
16760
 
16394
- // ../../node_modules/axios/lib/adapters/adapters.js
16761
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/adapters/adapters.js
16395
16762
  var knownAdapters = {
16396
16763
  http: null_default,
16397
16764
  xhr: xhr_default,
@@ -16402,48 +16769,49 @@ var knownAdapters = {
16402
16769
  utils_default.forEach(knownAdapters, (fn, value) => {
16403
16770
  if (fn) {
16404
16771
  try {
16405
- Object.defineProperty(fn, "name", { value });
16772
+ Object.defineProperty(fn, "name", { __proto__: null, value });
16406
16773
  } catch (e) {}
16407
- Object.defineProperty(fn, "adapterName", { value });
16774
+ Object.defineProperty(fn, "adapterName", { __proto__: null, value });
16408
16775
  }
16409
16776
  });
16410
16777
  var renderReason = (reason) => `- ${reason}`;
16411
16778
  var isResolvedHandle = (adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false;
16412
- var adapters_default = {
16413
- getAdapter: (adapters, config) => {
16414
- adapters = utils_default.isArray(adapters) ? adapters : [adapters];
16415
- const { length } = adapters;
16416
- let nameOrAdapter;
16417
- let adapter2;
16418
- const rejectedReasons = {};
16419
- for (let i = 0;i < length; i++) {
16420
- nameOrAdapter = adapters[i];
16421
- let id;
16422
- adapter2 = nameOrAdapter;
16423
- if (!isResolvedHandle(nameOrAdapter)) {
16424
- adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
16425
- if (adapter2 === undefined) {
16426
- throw new AxiosError_default(`Unknown adapter '${id}'`);
16427
- }
16428
- }
16429
- if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
16430
- break;
16431
- }
16432
- rejectedReasons[id || "#" + i] = adapter2;
16779
+ function getAdapter(adapters, config) {
16780
+ adapters = utils_default.isArray(adapters) ? adapters : [adapters];
16781
+ const { length } = adapters;
16782
+ let nameOrAdapter;
16783
+ let adapter2;
16784
+ const rejectedReasons = {};
16785
+ for (let i = 0;i < length; i++) {
16786
+ nameOrAdapter = adapters[i];
16787
+ let id;
16788
+ adapter2 = nameOrAdapter;
16789
+ if (!isResolvedHandle(nameOrAdapter)) {
16790
+ adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
16791
+ if (adapter2 === undefined) {
16792
+ throw new AxiosError_default(`Unknown adapter '${id}'`);
16793
+ }
16794
+ }
16795
+ if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
16796
+ break;
16433
16797
  }
16434
- if (!adapter2) {
16435
- const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
16436
- let s = length ? reasons.length > 1 ? `since :
16798
+ rejectedReasons[id || "#" + i] = adapter2;
16799
+ }
16800
+ if (!adapter2) {
16801
+ const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
16802
+ let s = length ? reasons.length > 1 ? `since :
16437
16803
  ` + reasons.map(renderReason).join(`
16438
16804
  `) : " " + renderReason(reasons[0]) : "as no adapter specified";
16439
- throw new AxiosError_default(`There is no suitable adapter to dispatch the request ` + s, "ERR_NOT_SUPPORT");
16440
- }
16441
- return adapter2;
16442
- },
16805
+ throw new AxiosError_default(`There is no suitable adapter to dispatch the request ` + s, "ERR_NOT_SUPPORT");
16806
+ }
16807
+ return adapter2;
16808
+ }
16809
+ var adapters_default = {
16810
+ getAdapter,
16443
16811
  adapters: knownAdapters
16444
16812
  };
16445
16813
 
16446
- // ../../node_modules/axios/lib/core/dispatchRequest.js
16814
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/core/dispatchRequest.js
16447
16815
  function throwIfCancellationRequested(config) {
16448
16816
  if (config.cancelToken) {
16449
16817
  config.cancelToken.throwIfRequested();
@@ -16462,14 +16830,24 @@ function dispatchRequest(config) {
16462
16830
  const adapter2 = adapters_default.getAdapter(config.adapter || defaults_default.adapter, config);
16463
16831
  return adapter2(config).then(function onAdapterResolution(response) {
16464
16832
  throwIfCancellationRequested(config);
16465
- response.data = transformData.call(config, config.transformResponse, response);
16833
+ config.response = response;
16834
+ try {
16835
+ response.data = transformData.call(config, config.transformResponse, response);
16836
+ } finally {
16837
+ delete config.response;
16838
+ }
16466
16839
  response.headers = AxiosHeaders_default.from(response.headers);
16467
16840
  return response;
16468
16841
  }, function onAdapterRejection(reason) {
16469
16842
  if (!isCancel(reason)) {
16470
16843
  throwIfCancellationRequested(config);
16471
16844
  if (reason && reason.response) {
16472
- reason.response.data = transformData.call(config, config.transformResponse, reason.response);
16845
+ config.response = reason.response;
16846
+ try {
16847
+ reason.response.data = transformData.call(config, config.transformResponse, reason.response);
16848
+ } finally {
16849
+ delete config.response;
16850
+ }
16473
16851
  reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
16474
16852
  }
16475
16853
  }
@@ -16477,10 +16855,7 @@ function dispatchRequest(config) {
16477
16855
  });
16478
16856
  }
16479
16857
 
16480
- // ../../node_modules/axios/lib/env/data.js
16481
- var VERSION = "1.12.2";
16482
-
16483
- // ../../node_modules/axios/lib/helpers/validator.js
16858
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/validator.js
16484
16859
  var validators = {};
16485
16860
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
16486
16861
  validators[type] = function validator(thing) {
@@ -16517,7 +16892,7 @@ function assertOptions(options, schema, allowUnknown) {
16517
16892
  let i = keys.length;
16518
16893
  while (i-- > 0) {
16519
16894
  const opt = keys[i];
16520
- const validator = schema[opt];
16895
+ const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
16521
16896
  if (validator) {
16522
16897
  const value = options[opt];
16523
16898
  const result = value === undefined || validator(value, opt, options);
@@ -16536,7 +16911,7 @@ var validator_default = {
16536
16911
  validators
16537
16912
  };
16538
16913
 
16539
- // ../../node_modules/axios/lib/core/Axios.js
16914
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/core/Axios.js
16540
16915
  var validators2 = validator_default.validators;
16541
16916
 
16542
16917
  class Axios {
@@ -16554,13 +16929,27 @@ class Axios {
16554
16929
  if (err instanceof Error) {
16555
16930
  let dummy = {};
16556
16931
  Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error;
16557
- const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
16932
+ const stack = (() => {
16933
+ if (!dummy.stack) {
16934
+ return "";
16935
+ }
16936
+ const firstNewlineIndex = dummy.stack.indexOf(`
16937
+ `);
16938
+ return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
16939
+ })();
16558
16940
  try {
16559
16941
  if (!err.stack) {
16560
16942
  err.stack = stack;
16561
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
16562
- err.stack += `
16943
+ } else if (stack) {
16944
+ const firstNewlineIndex = stack.indexOf(`
16945
+ `);
16946
+ const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf(`
16947
+ `, firstNewlineIndex + 1);
16948
+ const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
16949
+ if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
16950
+ err.stack += `
16563
16951
  ` + stack;
16952
+ }
16564
16953
  }
16565
16954
  } catch (e) {}
16566
16955
  }
@@ -16580,7 +16969,8 @@ class Axios {
16580
16969
  validator_default.assertOptions(transitional2, {
16581
16970
  silentJSONParsing: validators2.transitional(validators2.boolean),
16582
16971
  forcedJSONParsing: validators2.transitional(validators2.boolean),
16583
- clarifyTimeoutError: validators2.transitional(validators2.boolean)
16972
+ clarifyTimeoutError: validators2.transitional(validators2.boolean),
16973
+ legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
16584
16974
  }, false);
16585
16975
  }
16586
16976
  if (paramsSerializer != null) {
@@ -16606,7 +16996,7 @@ class Axios {
16606
16996
  }, true);
16607
16997
  config.method = (config.method || this.defaults.method || "get").toLowerCase();
16608
16998
  let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
16609
- headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
16999
+ headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
16610
17000
  delete headers[method];
16611
17001
  });
16612
17002
  config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
@@ -16617,7 +17007,13 @@ class Axios {
16617
17007
  return;
16618
17008
  }
16619
17009
  synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
16620
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
17010
+ const transitional3 = config.transitional || transitional_default;
17011
+ const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering;
17012
+ if (legacyInterceptorReqResOrdering) {
17013
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
17014
+ } else {
17015
+ requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
17016
+ }
16621
17017
  });
16622
17018
  const responseInterceptorChain = [];
16623
17019
  this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
@@ -16676,7 +17072,7 @@ utils_default.forEach(["delete", "get", "head", "options"], function forEachMeth
16676
17072
  }));
16677
17073
  };
16678
17074
  });
16679
- utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
17075
+ utils_default.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method) {
16680
17076
  function generateHTTPMethod(isForm) {
16681
17077
  return function httpMethod(url, data, config) {
16682
17078
  return this.request(mergeConfig(config || {}, {
@@ -16690,11 +17086,13 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(m
16690
17086
  };
16691
17087
  }
16692
17088
  Axios.prototype[method] = generateHTTPMethod();
16693
- Axios.prototype[method + "Form"] = generateHTTPMethod(true);
17089
+ if (method !== "query") {
17090
+ Axios.prototype[method + "Form"] = generateHTTPMethod(true);
17091
+ }
16694
17092
  });
16695
17093
  var Axios_default = Axios;
16696
17094
 
16697
- // ../../node_modules/axios/lib/cancel/CancelToken.js
17095
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/cancel/CancelToken.js
16698
17096
  class CancelToken {
16699
17097
  constructor(executor) {
16700
17098
  if (typeof executor !== "function") {
@@ -16780,19 +17178,19 @@ class CancelToken {
16780
17178
  }
16781
17179
  var CancelToken_default = CancelToken;
16782
17180
 
16783
- // ../../node_modules/axios/lib/helpers/spread.js
17181
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/spread.js
16784
17182
  function spread(callback) {
16785
17183
  return function wrap(arr) {
16786
17184
  return callback.apply(null, arr);
16787
17185
  };
16788
17186
  }
16789
17187
 
16790
- // ../../node_modules/axios/lib/helpers/isAxiosError.js
17188
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/isAxiosError.js
16791
17189
  function isAxiosError(payload) {
16792
17190
  return utils_default.isObject(payload) && payload.isAxiosError === true;
16793
17191
  }
16794
17192
 
16795
- // ../../node_modules/axios/lib/helpers/HttpStatusCode.js
17193
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/helpers/HttpStatusCode.js
16796
17194
  var HttpStatusCode = {
16797
17195
  Continue: 100,
16798
17196
  SwitchingProtocols: 101,
@@ -16856,14 +17254,20 @@ var HttpStatusCode = {
16856
17254
  InsufficientStorage: 507,
16857
17255
  LoopDetected: 508,
16858
17256
  NotExtended: 510,
16859
- NetworkAuthenticationRequired: 511
17257
+ NetworkAuthenticationRequired: 511,
17258
+ WebServerIsDown: 521,
17259
+ ConnectionTimedOut: 522,
17260
+ OriginIsUnreachable: 523,
17261
+ TimeoutOccurred: 524,
17262
+ SslHandshakeFailed: 525,
17263
+ InvalidSslCertificate: 526
16860
17264
  };
16861
17265
  Object.entries(HttpStatusCode).forEach(([key, value]) => {
16862
17266
  HttpStatusCode[value] = key;
16863
17267
  });
16864
17268
  var HttpStatusCode_default = HttpStatusCode;
16865
17269
 
16866
- // ../../node_modules/axios/lib/axios.js
17270
+ // ../../node_modules/.bun/axios@1.16.0/node_modules/axios/lib/axios.js
16867
17271
  function createInstance(defaultConfig) {
16868
17272
  const context = new Axios_default(defaultConfig);
16869
17273
  const instance = bind(Axios_default.prototype.request, context);
@@ -16899,7 +17303,7 @@ var axios_default = axios;
16899
17303
  // src/web.ts
16900
17304
  var import_json53 = __toESM(require_dist(), 1);
16901
17305
 
16902
- // ../../node_modules/animejs/lib/anime.es.js
17306
+ // ../../node_modules/.bun/animejs@3.2.2/node_modules/animejs/lib/anime.es.js
16903
17307
  var defaultInstanceSettings = {
16904
17308
  update: null,
16905
17309
  begin: null,
@@ -18306,6 +18710,7 @@ var exports_ai = {};
18306
18710
  __export(exports_ai, {
18307
18711
  xyq: () => exports_xyq,
18308
18712
  text: () => exports_text,
18713
+ openai: () => exports_openai,
18309
18714
  keling: () => exports_keling,
18310
18715
  doubao: () => exports_doubao,
18311
18716
  ai302: () => exports_302
@@ -18558,6 +18963,7 @@ __export(exports_keling, {
18558
18963
  var exports_video = {};
18559
18964
  __export(exports_video, {
18560
18965
  setCookie: () => setCookie,
18966
+ setApiAddress: () => setApiAddress,
18561
18967
  getVideoStatus: () => getVideoStatus,
18562
18968
  generateVideo: () => generateVideo
18563
18969
  });
@@ -19233,9 +19639,28 @@ var axios3 = axios_default.create({
19233
19639
  });
19234
19640
 
19235
19641
  // src/common/ai/keling/video/utils.ts
19642
+ var DEFAULT_API_ADDRESS = "https://klingai.kuaishou.com";
19643
+ var DEFAULT_UPLOAD_API_ADDRESS = "https://upload.kuaishouzt.com";
19644
+ var apiConfig = {
19645
+ apiAddress: DEFAULT_API_ADDRESS,
19646
+ uploadApiAddress: DEFAULT_UPLOAD_API_ADDRESS
19647
+ };
19648
+ var normalizeBaseUrl = (value) => {
19649
+ return value?.replace(/\/$/, "");
19650
+ };
19651
+ var setApiAddress = (apiAddress, uploadApiAddress) => {
19652
+ apiConfig.apiAddress = normalizeBaseUrl(apiAddress) || DEFAULT_API_ADDRESS;
19653
+ apiConfig.uploadApiAddress = normalizeBaseUrl(uploadApiAddress) || DEFAULT_UPLOAD_API_ADDRESS;
19654
+ };
19655
+ var buildApiUrl = (path) => {
19656
+ return `${apiConfig.apiAddress}${path}`;
19657
+ };
19658
+ var buildUploadApiUrl = (path) => {
19659
+ return `${apiConfig.uploadApiAddress}${path}`;
19660
+ };
19236
19661
  var getToken = async (filename) => {
19237
19662
  try {
19238
- const response = await axios3.get("https://klingai.kuaishou.com/api/upload/issue/token", {
19663
+ const response = await axios3.get(buildApiUrl("/api/upload/issue/token"), {
19239
19664
  params: { filename }
19240
19665
  });
19241
19666
  return response.data.data.token;
@@ -19246,7 +19671,7 @@ var getToken = async (filename) => {
19246
19671
  };
19247
19672
  var uploadFragment = async (uploadToken, imageBuffer) => {
19248
19673
  try {
19249
- const response = await axios3.post("https://upload.kuaishouzt.com/api/upload/fragment", imageBuffer, {
19674
+ const response = await axios3.post(buildUploadApiUrl("/api/upload/fragment"), imageBuffer, {
19250
19675
  params: {
19251
19676
  upload_token: uploadToken,
19252
19677
  fragment_id: 0
@@ -19263,7 +19688,7 @@ var uploadFragment = async (uploadToken, imageBuffer) => {
19263
19688
  };
19264
19689
  var completeUpload = async (uploadToken) => {
19265
19690
  try {
19266
- const response = await axios3.post("https://upload.kuaishouzt.com/api/upload/complete", null, {
19691
+ const response = await axios3.post(buildUploadApiUrl("/api/upload/complete"), null, {
19267
19692
  params: {
19268
19693
  upload_token: uploadToken,
19269
19694
  fragment_count: 1
@@ -19277,7 +19702,7 @@ var completeUpload = async (uploadToken) => {
19277
19702
  };
19278
19703
  var verifyUpload = async (token) => {
19279
19704
  try {
19280
- const response = await axios3.get("https://klingai.kuaishou.com/api/upload/verify/token", {
19705
+ const response = await axios3.get(buildApiUrl("/api/upload/verify/token"), {
19281
19706
  params: { token }
19282
19707
  });
19283
19708
  if (response.data?.result === 1 && response.data?.data?.status === 3) {
@@ -19374,7 +19799,7 @@ var sbumit = async (imageUrl, prompt) => {
19374
19799
  });
19375
19800
  const response = await axios3({
19376
19801
  method: "POST",
19377
- url: "https://klingai.kuaishou.com/api/task/submit",
19802
+ url: buildApiUrl("/api/task/submit"),
19378
19803
  data
19379
19804
  });
19380
19805
  return response.data?.data?.task?.id;
@@ -19411,7 +19836,7 @@ var getVideoStatus = async (taskId) => {
19411
19836
  return;
19412
19837
  }
19413
19838
  try {
19414
- const response = await axios3.get("https://klingai.kuaishou.com/api/task/status", {
19839
+ const response = await axios3.get(buildApiUrl("/api/task/status"), {
19415
19840
  params: { taskId }
19416
19841
  });
19417
19842
  return {
@@ -19432,13 +19857,44 @@ var generateVideo = async (imageUrl, prompt) => {
19432
19857
  console.log(666, "任务 id", taskId);
19433
19858
  return taskId;
19434
19859
  };
19860
+ // src/common/ai/openai/index.ts
19861
+ var exports_openai = {};
19862
+ __export(exports_openai, {
19863
+ generateImage: () => generateImage
19864
+ });
19865
+ var generateImage = async (params) => {
19866
+ const response = await fetch(`${params.apiAddress}/v1/images/generations`, {
19867
+ method: "POST",
19868
+ headers: {
19869
+ "Content-Type": "application/json",
19870
+ Authorization: `Bearer ${params.apiKey}`
19871
+ },
19872
+ body: JSON.stringify({
19873
+ model: params.model,
19874
+ prompt: params.prompt
19875
+ })
19876
+ });
19877
+ if (!response.ok) {
19878
+ const errorText = await response.text();
19879
+ throw new Error(`图片生成失败: ${response.status} ${errorText}`);
19880
+ }
19881
+ const data = await response.json();
19882
+ const fileBase64 = data?.data?.[0]?.b64_json;
19883
+ if (!fileBase64) {
19884
+ throw new Error("图片生成失败: 返回结果缺少图片数据");
19885
+ }
19886
+ return {
19887
+ fileBase64,
19888
+ format: "png"
19889
+ };
19890
+ };
19435
19891
  // src/common/ai/xyq/index.ts
19436
19892
  var exports_xyq = {};
19437
19893
  __export(exports_xyq, {
19438
19894
  submitRun: () => submitRun,
19439
19895
  pollUntilComplete: () => pollUntilComplete,
19440
19896
  getThreadStatus: () => getThreadStatus,
19441
- generateImage: () => generateImage,
19897
+ generateImage: () => generateImage2,
19442
19898
  extractMediaFromEntry: () => extractMediaFromEntry,
19443
19899
  RUN_STATE: () => RUN_STATE
19444
19900
  });
@@ -19592,7 +20048,7 @@ var pollUntilComplete = async (params, options = {}) => {
19592
20048
  }
19593
20049
  throw new Error("小云雀任务超时");
19594
20050
  };
19595
- var generateImage = async (prompt, options) => {
20051
+ var generateImage2 = async (prompt, options) => {
19596
20052
  const { threadId: existingThreadId, assetIds, onProgress, config } = options || {};
19597
20053
  onProgress?.("正在提交创作任务...");
19598
20054
  const submitResult = await submitRun({
@@ -19813,7 +20269,7 @@ var generateUniqueFileName = (name) => {
19813
20269
  throw new Error("Invalid filename format.");
19814
20270
  };
19815
20271
 
19816
- // ../../node_modules/decimal.js/decimal.mjs
20272
+ // ../../node_modules/.bun/decimal.js@10.6.0/node_modules/decimal.js/decimal.mjs
19817
20273
  /*!
19818
20274
  * decimal.js v10.6.0
19819
20275
  * An arbitrary-precision Decimal type for JavaScript.