@rebilly/instruments 16.182.0 → 16.182.1

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/CHANGELOG.md CHANGED
@@ -1,6 +1 @@
1
- ## [16.182.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v16.181.0...instruments/core-v16.182.0) (2026-09-11)
2
-
3
-
4
- ### Features
5
-
6
- * **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#25818](https://github.com/Rebilly/rebilly/issues/25818)) ([512df35](https://github.com/Rebilly/rebilly/commit/512df359481f856a9ed17708c4720ad3893d6dc1))
1
+ ## [16.182.1](https://github.com/Rebilly/rebilly/compare/instruments/core-v16.182.0...instruments/core-v16.182.1) (2026-09-14)
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.5.41
2
+ * @vue/shared v3.5.42
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2316,22 +2316,82 @@ const { toString } = Object.prototype;
2316
2316
  const { getPrototypeOf } = Object;
2317
2317
  const { iterator, toStringTag } = Symbol;
2318
2318
  const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
2319
+ const isUnsafeObjectKey = (prop) => typeof prop === "string" && (prop === "__proto__" || prop === "constructor" || prop === "prototype");
2320
+ const isPrototypeBoundary = (obj, prototype2, source) => obj === Object.prototype || !source && prototype2 === null;
2321
+ const isSafeAndFullyMutable = (obj) => {
2322
+ if (!Object.isExtensible(obj)) {
2323
+ return false;
2324
+ }
2325
+ const props = Object.getOwnPropertyNames(obj);
2326
+ if (Object.getOwnPropertySymbols) {
2327
+ props.push(...Object.getOwnPropertySymbols(obj));
2328
+ }
2329
+ return props.every((prop) => {
2330
+ if (isUnsafeObjectKey(prop)) {
2331
+ return false;
2332
+ }
2333
+ const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
2334
+ return !!descriptor && descriptor.configurable && descriptor.writable === true;
2335
+ });
2336
+ };
2319
2337
  const hasOwnInPrototypeChain = (thing, prop) => {
2320
2338
  let obj = thing;
2321
2339
  const seen = [];
2322
- while (obj != null && obj !== Object.prototype) {
2340
+ while (obj != null) {
2323
2341
  if (seen.indexOf(obj) !== -1) {
2324
2342
  return false;
2325
2343
  }
2326
2344
  seen.push(obj);
2345
+ const prototype2 = getPrototypeOf(obj);
2346
+ if (isPrototypeBoundary(obj, prototype2, obj === thing)) {
2347
+ return false;
2348
+ }
2327
2349
  if (hasOwnProperty(obj, prop)) {
2328
2350
  return true;
2329
2351
  }
2330
- obj = getPrototypeOf(obj);
2352
+ obj = prototype2;
2331
2353
  }
2332
2354
  return false;
2333
2355
  };
2334
2356
  const getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
2357
+ const toSafeFlatObject = (thing) => {
2358
+ if (thing == null || typeof thing !== "object" && typeof thing !== "function") {
2359
+ return thing;
2360
+ }
2361
+ const sourcePrototype = getPrototypeOf(thing);
2362
+ if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {
2363
+ return thing;
2364
+ }
2365
+ const result = /* @__PURE__ */ Object.create(null);
2366
+ const merged = /* @__PURE__ */ Object.create(null);
2367
+ const seen = [];
2368
+ let current = thing;
2369
+ while (current != null) {
2370
+ if (seen.indexOf(current) !== -1) {
2371
+ break;
2372
+ }
2373
+ seen.push(current);
2374
+ const prototype2 = current === thing ? sourcePrototype : getPrototypeOf(current);
2375
+ if (isPrototypeBoundary(current, prototype2, current === thing)) {
2376
+ break;
2377
+ }
2378
+ const props = Object.getOwnPropertyNames(current);
2379
+ if (Object.getOwnPropertySymbols) {
2380
+ props.push(...Object.getOwnPropertySymbols(current));
2381
+ }
2382
+ for (const prop of props) {
2383
+ if (isUnsafeObjectKey(prop)) {
2384
+ continue;
2385
+ }
2386
+ if (!hasOwnProperty(merged, prop)) {
2387
+ result[prop] = thing[prop];
2388
+ merged[prop] = true;
2389
+ }
2390
+ }
2391
+ current = prototype2;
2392
+ }
2393
+ return result;
2394
+ };
2335
2395
  const kindOf = /* @__PURE__ */ ((cache) => (thing) => {
2336
2396
  const str = toString.call(thing);
2337
2397
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -2366,9 +2426,9 @@ const isPlainObject = (val) => {
2366
2426
  return false;
2367
2427
  }
2368
2428
  const prototype2 = getPrototypeOf(val);
2369
- return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
2370
- // Symbol.iterator as evidence the value is a tagged/iterable type rather
2371
- // than a plain object, while ignoring keys injected onto Object.prototype.
2429
+ return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
2430
+ // evidence the value is tagged/iterable, while ignoring members reachable
2431
+ // only through shared or terminal prototype boundaries.
2372
2432
  !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
2373
2433
  };
2374
2434
  const isEmptyObject = (val) => {
@@ -2779,6 +2839,7 @@ const utils$1 = {
2779
2839
  // an alias to avoid ESLint no-prototype-builtins detection
2780
2840
  hasOwnInPrototypeChain,
2781
2841
  getSafeProp,
2842
+ toSafeFlatObject,
2782
2843
  reduceDescriptors,
2783
2844
  freezeMethods,
2784
2845
  toObjectSet,
@@ -2877,7 +2938,7 @@ function toByteStringHeaderObject(headers) {
2877
2938
  });
2878
2939
  return byteStringHeaders;
2879
2940
  }
2880
- const $internals = Symbol("internals");
2941
+ const $internals$1 = Symbol("internals");
2881
2942
  function normalizeHeader(header) {
2882
2943
  return header && String(header).trim().toLowerCase();
2883
2944
  }
@@ -3173,7 +3234,7 @@ let AxiosHeaders$1 = class AxiosHeaders {
3173
3234
  return computed;
3174
3235
  }
3175
3236
  static accessor(header) {
3176
- const internals = this[$internals] = this[$internals] = {
3237
+ const internals = this[$internals$1] = this[$internals$1] = {
3177
3238
  accessors: {}
3178
3239
  };
3179
3240
  const accessors = internals.accessors;
@@ -3392,24 +3453,16 @@ function toFormData$1(obj, formData, options) {
3392
3453
  throw new TypeError("target must be an object");
3393
3454
  }
3394
3455
  formData = formData || new FormData();
3395
- options = utils$1.toFlatObject(
3396
- options,
3397
- {
3398
- metaTokens: true,
3399
- dots: false,
3400
- indexes: false
3401
- },
3402
- false,
3403
- function defined(option, source) {
3404
- return !utils$1.isUndefined(source[option]);
3405
- }
3406
- );
3407
- const metaTokens = options.metaTokens;
3408
- const visitor = options.visitor || defaultVisitor;
3409
- const dots = options.dots;
3410
- const indexes = options.indexes;
3411
- const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
3412
- const maxDepth = options.maxDepth === void 0 ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
3456
+ const option = (name, fallback) => {
3457
+ const value = utils$1.getSafeProp(options, name);
3458
+ return utils$1.isUndefined(value) ? fallback : value;
3459
+ };
3460
+ const metaTokens = option("metaTokens", true);
3461
+ const visitor = option("visitor") || defaultVisitor;
3462
+ const dots = option("dots", false);
3463
+ const indexes = option("indexes", false);
3464
+ const _Blob = option("Blob") || typeof Blob !== "undefined" && Blob;
3465
+ const maxDepth = option("maxDepth", DEFAULT_FORM_DATA_MAX_DEPTH);
3413
3466
  const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
3414
3467
  const stack = [];
3415
3468
  if (!utils$1.isFunction(visitor)) {
@@ -3430,7 +3483,10 @@ function toFormData$1(obj, formData, options) {
3430
3483
  if (useBlob && typeof _Blob === "function") {
3431
3484
  return new _Blob([value]);
3432
3485
  }
3433
- throw new AxiosError$1("Blob is not supported. Use a Buffer instead.", AxiosError$1.ERR_NOT_SUPPORT);
3486
+ throw new AxiosError$1(
3487
+ "Blob is not supported. Use a Buffer instead.",
3488
+ AxiosError$1.ERR_NOT_SUPPORT
3489
+ );
3434
3490
  }
3435
3491
  return value;
3436
3492
  }
@@ -3568,9 +3624,47 @@ function buildURL(url, params, options) {
3568
3624
  }
3569
3625
  return url;
3570
3626
  }
3627
+ const $internals = Symbol("internals");
3628
+ function countHandlers(handlers) {
3629
+ return handlers ? handlers.length : 0;
3630
+ }
3631
+ function trimHandlers(handlers) {
3632
+ if (!handlers) {
3633
+ return;
3634
+ }
3635
+ while (handlers.length && handlers[handlers.length - 1] === null) {
3636
+ handlers.pop();
3637
+ }
3638
+ }
3639
+ function syncHandlerEntries(manager, internals) {
3640
+ const handlers = manager.handlers;
3641
+ const length = countHandlers(handlers);
3642
+ if (handlers !== internals.handlersRef) {
3643
+ internals.handlersRef = handlers;
3644
+ internals.handlerEntries.clear();
3645
+ } else if (length !== internals.handlersLength) {
3646
+ if (!length) {
3647
+ internals.handlerEntries.clear();
3648
+ } else {
3649
+ internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
3650
+ if (handlers[entry.index] !== entry.handler) {
3651
+ internals.handlerEntries.delete(id);
3652
+ }
3653
+ });
3654
+ }
3655
+ }
3656
+ internals.handlersLength = length;
3657
+ }
3571
3658
  class InterceptorManager {
3572
3659
  constructor() {
3573
3660
  this.handlers = [];
3661
+ this[$internals] = {
3662
+ handlersRef: this.handlers,
3663
+ handlersLength: this.handlers.length,
3664
+ handlerEntries: /* @__PURE__ */ new Map(),
3665
+ iterationDepth: 0,
3666
+ nextId: 0
3667
+ };
3574
3668
  }
3575
3669
  /**
3576
3670
  * Add a new interceptor to the stack
@@ -3582,13 +3676,25 @@ class InterceptorManager {
3582
3676
  * @return {Number} An ID used to remove interceptor later
3583
3677
  */
3584
3678
  use(fulfilled, rejected, options) {
3585
- this.handlers.push({
3679
+ const handler = {
3586
3680
  fulfilled,
3587
3681
  rejected,
3588
3682
  synchronous: options ? options.synchronous : false,
3589
3683
  runWhen: options ? options.runWhen : null
3684
+ };
3685
+ const internals = this[$internals];
3686
+ if (this.handlers == null) {
3687
+ this.handlers = [];
3688
+ }
3689
+ syncHandlerEntries(this, internals);
3690
+ const id = internals.nextId++;
3691
+ this.handlers.push(handler);
3692
+ internals.handlerEntries.set(id, {
3693
+ handler,
3694
+ index: this.handlers.length - 1
3590
3695
  });
3591
- return this.handlers.length - 1;
3696
+ internals.handlersLength = this.handlers.length;
3697
+ return id;
3592
3698
  }
3593
3699
  /**
3594
3700
  * Remove an interceptor from the stack
@@ -3598,8 +3704,19 @@ class InterceptorManager {
3598
3704
  * @returns {void}
3599
3705
  */
3600
3706
  eject(id) {
3601
- if (this.handlers[id]) {
3602
- this.handlers[id] = null;
3707
+ const internals = this[$internals];
3708
+ syncHandlerEntries(this, internals);
3709
+ const entry = internals.handlerEntries.get(id);
3710
+ if (entry) {
3711
+ internals.handlerEntries.delete(id);
3712
+ if (this.handlers[entry.index] !== entry.handler) {
3713
+ return;
3714
+ }
3715
+ this.handlers[entry.index] = null;
3716
+ if (!internals.iterationDepth) {
3717
+ trimHandlers(this.handlers);
3718
+ internals.handlersLength = this.handlers.length;
3719
+ }
3603
3720
  }
3604
3721
  }
3605
3722
  /**
@@ -3610,6 +3727,7 @@ class InterceptorManager {
3610
3727
  clear() {
3611
3728
  if (this.handlers) {
3612
3729
  this.handlers = [];
3730
+ syncHandlerEntries(this, this[$internals]);
3613
3731
  }
3614
3732
  }
3615
3733
  /**
@@ -3623,11 +3741,22 @@ class InterceptorManager {
3623
3741
  * @returns {void}
3624
3742
  */
3625
3743
  forEach(fn) {
3626
- utils$1.forEach(this.handlers, function forEachHandler(h2) {
3627
- if (h2 !== null) {
3628
- fn(h2);
3744
+ const internals = this[$internals];
3745
+ syncHandlerEntries(this, internals);
3746
+ internals.iterationDepth++;
3747
+ try {
3748
+ utils$1.forEach(this.handlers, function forEachHandler(h2) {
3749
+ if (h2 !== null) {
3750
+ fn(h2);
3751
+ }
3752
+ });
3753
+ } finally {
3754
+ if (!--internals.iterationDepth) {
3755
+ syncHandlerEntries(this, internals);
3756
+ trimHandlers(this.handlers);
3757
+ internals.handlersLength = countHandlers(this.handlers);
3629
3758
  }
3630
- });
3759
+ }
3631
3760
  }
3632
3761
  }
3633
3762
  const transitionalDefaults = {
@@ -3747,6 +3876,19 @@ function formDataToJSON(formData) {
3747
3876
  }
3748
3877
  return null;
3749
3878
  }
3879
+ const methodList = Object.freeze([
3880
+ "get",
3881
+ "delete",
3882
+ "head",
3883
+ "options",
3884
+ "post",
3885
+ "put",
3886
+ "patch",
3887
+ "purge",
3888
+ "link",
3889
+ "unlink",
3890
+ "query"
3891
+ ]);
3750
3892
  const own = (obj, key) => obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : void 0;
3751
3893
  function stringifySafely(rawValue, parser, encoder) {
3752
3894
  if (utils$1.isString(rawValue)) {
@@ -3858,7 +4000,7 @@ const defaults = {
3858
4000
  }
3859
4001
  }
3860
4002
  };
3861
- utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
4003
+ utils$1.forEach(methodList, (method) => {
3862
4004
  defaults.headers[method] = {};
3863
4005
  });
3864
4006
  function transformData(fns, response) {
@@ -3905,6 +4047,17 @@ function settle(resolve, reject, response) {
3905
4047
  ));
3906
4048
  }
3907
4049
  }
4050
+ const urlParserControlCharacters = /[\t\n\r]/g;
4051
+ function normalizeURLForProtocolCheck(url) {
4052
+ if (typeof url !== "string") {
4053
+ return url;
4054
+ }
4055
+ let start = 0;
4056
+ while (start < url.length && url.charCodeAt(start) <= 32) {
4057
+ start++;
4058
+ }
4059
+ return url.slice(start).replace(urlParserControlCharacters, "");
4060
+ }
3908
4061
  function parseProtocol(url) {
3909
4062
  const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
3910
4063
  return match && match[1] || "";
@@ -3972,13 +4125,14 @@ function throttle(fn, freq) {
3972
4125
  }
3973
4126
  };
3974
4127
  const flush = () => lastArgs && invoke(lastArgs);
3975
- return [throttled, flush];
4128
+ const flushWith = (...args) => invoke(args);
4129
+ return [throttled, flush, flushWith];
3976
4130
  }
3977
4131
  const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
3978
4132
  let bytesNotified = 0;
3979
4133
  const _speedometer = speedometer(50, 250);
3980
4134
  return throttle((e) => {
3981
- if (!e || typeof e.loaded !== "number") {
4135
+ if (!e || !utils$1.isNumber(e.loaded)) {
3982
4136
  return;
3983
4137
  }
3984
4138
  const rawLoaded = e.loaded;
@@ -4092,17 +4246,6 @@ function combineURLs(baseURL, relativeURL) {
4092
4246
  return baseURL.slice(0, end) + "/" + relativeURL.replace(/^\/+/, "");
4093
4247
  }
4094
4248
  const malformedHttpProtocol = /^https?:(?!\/\/)/i;
4095
- const httpProtocolControlCharacters = /[\t\n\r]/g;
4096
- function stripLeadingC0ControlOrSpace(url) {
4097
- let i = 0;
4098
- while (i < url.length && url.charCodeAt(i) <= 32) {
4099
- i++;
4100
- }
4101
- return url.slice(i);
4102
- }
4103
- function normalizeURLForProtocolCheck(url) {
4104
- return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, "");
4105
- }
4106
4249
  function redactFragment(fragment) {
4107
4250
  if (!fragment) {
4108
4251
  return fragment;
@@ -4231,7 +4374,7 @@ function mergeConfig$1(config1, config2) {
4231
4374
  transformResponse: defaultToConfig2,
4232
4375
  paramsSerializer: defaultToConfig2,
4233
4376
  timeout: defaultToConfig2,
4234
- timeoutMessage: defaultToConfig2,
4377
+ timeoutErrorMessage: defaultToConfig2,
4235
4378
  withCredentials: defaultToConfig2,
4236
4379
  withXSRFToken: defaultToConfig2,
4237
4380
  adapter: defaultToConfig2,
@@ -4318,10 +4461,11 @@ function resolveConfig(config) {
4318
4461
  }
4319
4462
  }
4320
4463
  if (utils$1.isFormData(data)) {
4464
+ const getHeaders = utils$1.getSafeProp(data, "getHeaders");
4321
4465
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
4322
4466
  headers.setContentType(void 0);
4323
- } else if (utils$1.isFunction(data.getHeaders)) {
4324
- setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
4467
+ } else if (utils$1.isFunction(getHeaders)) {
4468
+ setFormDataHeaders(headers, getHeaders.call(data), own2("formDataHeaderPolicy"));
4325
4469
  }
4326
4470
  }
4327
4471
  if (platform.hasStandardBrowserEnv) {
@@ -4347,7 +4491,7 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
4347
4491
  let { responseType, onUploadProgress, onDownloadProgress } = _config;
4348
4492
  let onCanceled;
4349
4493
  let uploadThrottled, downloadThrottled;
4350
- let flushUpload, flushDownload;
4494
+ let flushUpload, flushDownload, flushDownloadWithEvent;
4351
4495
  function done() {
4352
4496
  flushUpload && flushUpload();
4353
4497
  flushDownload && flushDownload();
@@ -4357,7 +4501,27 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
4357
4501
  let request = new XMLHttpRequest();
4358
4502
  request.open(_config.method.toUpperCase(), _config.url, true);
4359
4503
  request.timeout = _config.timeout;
4360
- function onloadend() {
4504
+ function onloadend(event) {
4505
+ if (!request) {
4506
+ return;
4507
+ }
4508
+ if (request.status === 0 && (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || parseProtocol(platform.origin)) !== "file" && !(request.responseURL && request.responseURL.startsWith("file:"))) {
4509
+ reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
4510
+ done();
4511
+ request = null;
4512
+ return;
4513
+ }
4514
+ try {
4515
+ if (event) {
4516
+ flushDownloadWithEvent && flushDownloadWithEvent(event);
4517
+ } else {
4518
+ flushDownload && flushDownload();
4519
+ }
4520
+ } catch (err) {
4521
+ setTimeout(() => {
4522
+ throw err;
4523
+ });
4524
+ }
4361
4525
  if (!request) {
4362
4526
  return;
4363
4527
  }
@@ -4445,7 +4609,10 @@ const xhrAdapter = isXHRAdapterSupported && function(config) {
4445
4609
  request.responseType = _config.responseType;
4446
4610
  }
4447
4611
  if (onDownloadProgress) {
4448
- [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
4612
+ [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(
4613
+ onDownloadProgress,
4614
+ true
4615
+ );
4449
4616
  request.addEventListener("progress", downloadThrottled);
4450
4617
  }
4451
4618
  if (onUploadProgress && request.upload) {
@@ -4705,8 +4872,19 @@ function estimateDataURLDecodedBytes(url) {
4705
4872
  estimatePercentDecodedBase64Bytes
4706
4873
  );
4707
4874
  }
4708
- const VERSION$1 = "1.19.0";
4875
+ const VERSION$1 = "1.20.0";
4709
4876
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
4877
+ const DEFAULT_REQUEST_OPTIONS = {
4878
+ cache: "default",
4879
+ redirect: "follow",
4880
+ referrer: "about:client",
4881
+ referrerPolicy: "",
4882
+ mode: "cors",
4883
+ integrity: "",
4884
+ keepalive: false,
4885
+ priority: "auto",
4886
+ window: null
4887
+ };
4710
4888
  const { isFunction } = utils$1;
4711
4889
  const encodeUTF8 = (str) => encodeURIComponent(str).replace(
4712
4890
  /%([0-9A-F]{2})/gi,
@@ -4837,7 +5015,8 @@ const factory = (env) => {
4837
5015
  withCredentials = "same-origin",
4838
5016
  fetchOptions,
4839
5017
  maxContentLength,
4840
- maxBodyLength
5018
+ maxBodyLength,
5019
+ maxRedirects
4841
5020
  } = resolveConfig(config);
4842
5021
  const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
4843
5022
  const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
@@ -4967,17 +5146,44 @@ const factory = (env) => {
4967
5146
  }
4968
5147
  }
4969
5148
  headers.set("User-Agent", "axios/" + VERSION$1, false);
4970
- const resolvedOptions = {
4971
- ...fetchOptions,
5149
+ const safeFetchOptions = fetchOptions == null ? fetchOptions : Object.assign(/* @__PURE__ */ Object.create(null), fetchOptions);
5150
+ if (safeFetchOptions) {
5151
+ delete safeFetchOptions.body;
5152
+ delete safeFetchOptions.headers;
5153
+ delete safeFetchOptions.method;
5154
+ delete safeFetchOptions.signal;
5155
+ delete safeFetchOptions.duplex;
5156
+ delete safeFetchOptions.credentials;
5157
+ }
5158
+ const resolvedOptions = Object.assign(/* @__PURE__ */ Object.create(null), safeFetchOptions, {
4972
5159
  signal: composedSignal,
4973
5160
  method: method.toUpperCase(),
4974
5161
  headers: toByteStringHeaderObject(headers.normalize()),
4975
5162
  body: data,
4976
5163
  duplex: "half",
4977
5164
  credentials: isCredentialsSupported ? withCredentials : void 0
4978
- };
5165
+ });
5166
+ if (isRequestSupported) {
5167
+ utils$1.forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {
5168
+ if (resolvedOptions[key] === void 0) {
5169
+ resolvedOptions[key] = value;
5170
+ }
5171
+ });
5172
+ if (resolvedOptions.signal === void 0) {
5173
+ resolvedOptions.signal = null;
5174
+ }
5175
+ if (resolvedOptions.body === void 0) {
5176
+ resolvedOptions.body = null;
5177
+ }
5178
+ }
5179
+ if (maxRedirects === 0) {
5180
+ resolvedOptions.redirect = "manual";
5181
+ if (safeFetchOptions) {
5182
+ safeFetchOptions.redirect = "manual";
5183
+ }
5184
+ }
4979
5185
  request = isRequestSupported && new Request(url, resolvedOptions);
4980
- let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
5186
+ let response = await (isRequestSupported ? _fetch(request, safeFetchOptions) : _fetch(url, resolvedOptions));
4981
5187
  const responseHeaders = AxiosHeaders$1.from(response.headers);
4982
5188
  if (hasMaxContentLength) {
4983
5189
  const declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
@@ -5192,9 +5398,10 @@ function throwIfCancellationRequested(config) {
5192
5398
  throw new CanceledError$1(null, config);
5193
5399
  }
5194
5400
  }
5195
- function dispatchRequest(config) {
5401
+ function dispatchRequest(_config) {
5402
+ const config = utils$1.toSafeFlatObject(_config);
5196
5403
  throwIfCancellationRequested(config);
5197
- config.headers = AxiosHeaders$1.from(config.headers);
5404
+ config.headers = AxiosHeaders$1.from(utils$1.getSafeProp(config, "headers"));
5198
5405
  config.data = transformData.call(config, config.transformRequest);
5199
5406
  if (["post", "put", "patch"].indexOf(config.method) !== -1) {
5200
5407
  config.headers.setContentType("application/x-www-form-urlencoded", false);
@@ -5320,16 +5527,15 @@ let Axios$1 = class Axios {
5320
5527
  return await this._request(configOrUrl, config);
5321
5528
  } catch (err) {
5322
5529
  if (err instanceof Error) {
5323
- let dummy = {};
5324
- Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
5325
- const stack = (() => {
5326
- if (!dummy.stack) {
5327
- return "";
5328
- }
5329
- const firstNewlineIndex = dummy.stack.indexOf("\n");
5330
- return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
5331
- })();
5332
5530
  try {
5531
+ let dummy = {};
5532
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
5533
+ const dummyStack = dummy.stack;
5534
+ let stack = "";
5535
+ if (typeof dummyStack === "string") {
5536
+ const firstNewlineIndex = dummyStack.indexOf("\n");
5537
+ stack = firstNewlineIndex === -1 ? "" : dummyStack.slice(firstNewlineIndex + 1);
5538
+ }
5333
5539
  if (!err.stack) {
5334
5540
  err.stack = stack;
5335
5541
  } else if (stack) {
@@ -5399,9 +5605,9 @@ let Axios$1 = class Axios {
5399
5605
  },
5400
5606
  true
5401
5607
  );
5402
- config.method = (config.method || this.defaults.method || "get").toLowerCase();
5608
+ config.method = (utils$1.getSafeProp(config, "method") || utils$1.getSafeProp(this.defaults, "method") || "get").toLowerCase();
5403
5609
  let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
5404
- headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
5610
+ headers && utils$1.forEach(methodList.concat("common"), (method) => {
5405
5611
  delete headers[method];
5406
5612
  });
5407
5613
  config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
@@ -5654,14 +5860,22 @@ const HttpStatusCode$1 = {
5654
5860
  Gone: 410,
5655
5861
  LengthRequired: 411,
5656
5862
  PreconditionFailed: 412,
5863
+ /**
5864
+ * @deprecated Use `ContentTooLarge` instead.
5865
+ */
5657
5866
  PayloadTooLarge: 413,
5867
+ ContentTooLarge: 413,
5658
5868
  UriTooLong: 414,
5659
5869
  UnsupportedMediaType: 415,
5660
5870
  RangeNotSatisfiable: 416,
5661
5871
  ExpectationFailed: 417,
5662
5872
  ImATeapot: 418,
5663
5873
  MisdirectedRequest: 421,
5874
+ /**
5875
+ * @deprecated Use `UnprocessableContent` instead.
5876
+ */
5664
5877
  UnprocessableEntity: 422,
5878
+ UnprocessableContent: 422,
5665
5879
  Locked: 423,
5666
5880
  FailedDependency: 424,
5667
5881
  TooEarly: 425,
@@ -5690,7 +5904,9 @@ const HttpStatusCode$1 = {
5690
5904
  InvalidSslCertificate: 526
5691
5905
  };
5692
5906
  Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
5693
- HttpStatusCode$1[value] = key;
5907
+ if (HttpStatusCode$1[value] === void 0) {
5908
+ HttpStatusCode$1[value] = key;
5909
+ }
5694
5910
  });
5695
5911
  function createInstance(defaultConfig) {
5696
5912
  const context = new Axios$1(defaultConfig);
@@ -6224,7 +6440,7 @@ function O$1({ options: e }) {
6224
6440
  }
6225
6441
  function o() {
6226
6442
  const a = {
6227
- "REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((m2) => m2).join("/")}@512df35`
6443
+ "REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((m2) => m2).join("/")}@4a833bf`
6228
6444
  };
6229
6445
  return e.apiKey && (a["REB-APIKEY"] = e.apiKey), a;
6230
6446
  }