@jentic/arazzo-resolver 1.0.0-alpha.32 → 1.0.0-alpha.33

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.
@@ -523,6 +523,141 @@ function inferOpenApiMediaType(element) {
523
523
  /* harmony export */ ]);
524
524
 
525
525
 
526
+ /***/ },
527
+
528
+ /***/ 28779
529
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
530
+
531
+ "use strict";
532
+ __webpack_require__.r(__webpack_exports__);
533
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
534
+ /* harmony export */ dereferenceSourceDescriptionPathItems: () => (/* binding */ dereferenceSourceDescriptionPathItems)
535
+ /* harmony export */ });
536
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62823);
537
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76642);
538
+ /* harmony import */ var _speclynx_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(212);
539
+ /* harmony import */ var _speclynx_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(30698);
540
+ /* harmony import */ var _speclynx_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8841);
541
+ /* harmony import */ var _speclynx_apidom_ns_arazzo_1__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75728);
542
+ /* harmony import */ var _speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(19777);
543
+ /* harmony import */ var _speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(29716);
544
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(13995);
545
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(57350);
546
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(89430);
547
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(25421);
548
+ /* harmony import */ var _openapi_ts__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(46897);
549
+
550
+
551
+
552
+
553
+
554
+
555
+
556
+ const isPathItem = element => (0,_speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_7__.isPathItemElement)(element) || (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_9__.isPathItemElement)(element);
557
+ const MAX_REF_CHAIN = 20;
558
+
559
+ // evaluates the JSON Pointer of a URI fragment against an element tree
560
+ const evaluateFragment = (root, fragment) => {
561
+ const tokens = decodeURIComponent(fragment.replace(/^#/, '')).split('/').slice(1).map(token => token.replace(/~1/g, '/').replace(/~0/g, '~'));
562
+ let current = root;
563
+ for (const token of tokens) {
564
+ if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isObjectElement)(current)) current = current.get(token);else if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(current)) current = current.get(Number(token));else return undefined;
565
+ }
566
+ return current;
567
+ };
568
+ const refractorFor = api => {
569
+ if ((0,_speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_7__.isSwaggerElement)(api)) return _speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_6__.refractPathItem;
570
+ if ((0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_9__.isOpenApi3_0Element)(api)) return _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_8__.refractPathItem;
571
+ if ((0,_speclynx_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_11__.isOpenApi3_1Element)(api)) return _speclynx_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_10__.refractPathItem;
572
+ return undefined;
573
+ };
574
+
575
+ /**
576
+ * Replaces the Path Items that consist of a `$ref` in the `openapi` source descriptions parsed
577
+ * along with an Arazzo Document (see the `sourceDescriptions` parser option) with the Path Items
578
+ * they point to, whether local (`#/components/pathItems/...`) or external.
579
+ *
580
+ * Only the chain of Path Item `$ref`s is followed. Nothing inside the referenced Path Items
581
+ * (responses, schemas, ...) is dereferenced, so an unrelated nested reference that can't be
582
+ * resolved never hides the operations. The source descriptions are modified in place, which makes
583
+ * the operations behind such Path Items discoverable, e.g. by `findStepOperation` of
584
+ * \@jentic/arazzo-parser.
585
+ *
586
+ * This is best effort and never rejects: a Path Item that can't be resolved is left as is.
587
+ *
588
+ * @param parseResult - The result of parsing an Arazzo Document with source descriptions
589
+ * @param options - Reference options (uses defaultOptions when not provided)
590
+ * @returns A promise that resolves once all resolvable Path Items have been replaced
591
+ * @public
592
+ */
593
+ async function dereferenceSourceDescriptionPathItems(parseResult, options = {}) {
594
+ if (!(0,_speclynx_apidom_ns_arazzo_1__WEBPACK_IMPORTED_MODULE_5__.isArazzoSpecification1Element)(parseResult.api)) return;
595
+ const mergedOptions = (0,_speclynx_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_4__.merge)(_openapi_ts__WEBPACK_IMPORTED_MODULE_12__.defaultOptions, options);
596
+ // external documents are fetched once, however many Path Items point into them
597
+ const documents = new Map();
598
+ const fetchDocument = uri => {
599
+ if (!documents.has(uri)) documents.set(uri, (0,_speclynx_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_2__.parse)(uri, mergedOptions));
600
+ return documents.get(uri);
601
+ };
602
+ const pending = [];
603
+ parseResult.api.sourceDescriptions?.forEach(sourceDescription => {
604
+ if (!(0,_speclynx_apidom_ns_arazzo_1__WEBPACK_IMPORTED_MODULE_5__.isSourceDescriptionElement)(sourceDescription)) return;
605
+ const sourceParseResult = sourceDescription.meta.get('parseResult');
606
+ const api = sourceParseResult?.api;
607
+ const sourceURI = sourceParseResult?.meta.get('retrievalURI');
608
+ if (!(0,_speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_7__.isSwaggerElement)(api) && !(0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_9__.isOpenApi3_0Element)(api) && !(0,_speclynx_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_11__.isOpenApi3_1Element)(api)) return;
609
+ const refract = refractorFor(api);
610
+ if (!refract || !sourceURI) return;
611
+
612
+ // follows the `$ref` of a Path Item to the Path Item it points to
613
+ const follow = async (pathItem, baseURI, root, visited) => {
614
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isStringElement)(pathItem.$ref)) return pathItem;
615
+ const ref = pathItem.$ref.toValue();
616
+ const documentURI = _speclynx_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_3__.resolve(baseURI, _speclynx_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_3__.stripHash(ref));
617
+ const fragment = _speclynx_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_3__.getHash(ref);
618
+ const key = `${documentURI}${fragment}`;
619
+ if (visited.has(key) || visited.size >= MAX_REF_CHAIN) return undefined;
620
+ visited.add(key);
621
+ let targetRoot = root;
622
+ if (documentURI !== _speclynx_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_3__.stripHash(baseURI)) {
623
+ const document = await fetchDocument(documentURI);
624
+ targetRoot = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isObjectElement)(document.api) ? document.api : document.result;
625
+ }
626
+ const evaluated = evaluateFragment(targetRoot, fragment);
627
+ const target = isPathItem(evaluated) ? evaluated : refract(evaluated);
628
+ if (!isPathItem(target)) return undefined;
629
+
630
+ // fields next to the `$ref` override the ones of the referenced Path Item
631
+ const merged = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.cloneShallow)(target);
632
+ if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isObjectElement)(pathItem)) {
633
+ pathItem.forEach((value, member) => {
634
+ const name = String(member.toValue());
635
+ if (name !== '$ref') merged.set(name, value);
636
+ });
637
+ }
638
+ return follow(merged, documentURI, targetRoot, visited);
639
+ };
640
+
641
+ // Path Items in `paths` and in the reusable `components.pathItems` are both resolved, since
642
+ // steps can target either
643
+ const collections = [api.paths, api.components?.pathItems];
644
+ collections.forEach(collection => {
645
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isObjectElement)(collection)) return;
646
+ collection.forEach((pathItem, member) => {
647
+ // in `components.pathItems` a `$ref`-only entry is refracted to a Reference, not a Path Item
648
+ const candidate = pathItem;
649
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isObjectElement)(pathItem) || !(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isStringElement)(candidate.$ref)) return;
650
+ pending.push(follow(candidate, sourceURI, api, new Set()).then(resolved => {
651
+ if (resolved) collection.set(String(member.toValue()), resolved);
652
+ }, () => {
653
+ // keep the unresolved Path Item
654
+ }));
655
+ });
656
+ });
657
+ });
658
+ await Promise.all(pending);
659
+ }
660
+
526
661
  /***/ },
527
662
 
528
663
  /***/ 456
@@ -56532,6 +56667,18 @@ __webpack_require__.r(__webpack_exports__);
56532
56667
 
56533
56668
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
56534
56669
 
56670
+ const DEFAULT_REQUEST_OPTIONS = {
56671
+ cache: 'default',
56672
+ redirect: 'follow',
56673
+ referrer: 'about:client',
56674
+ referrerPolicy: '',
56675
+ mode: 'cors',
56676
+ integrity: '',
56677
+ keepalive: false,
56678
+ priority: 'auto',
56679
+ window: null,
56680
+ };
56681
+
56535
56682
  const { isFunction } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];
56536
56683
 
56537
56684
  /**
@@ -56582,9 +56729,7 @@ const maybeWithAuthCredentials = (url) => {
56582
56729
 
56583
56730
  const factory = (env) => {
56584
56731
  const globalObject =
56585
- _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global !== undefined && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global !== null
56586
- ? _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global
56587
- : globalThis;
56732
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global !== undefined && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global !== null ? _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global : globalThis;
56588
56733
  const { ReadableStream, TextEncoder } = globalObject;
56589
56734
 
56590
56735
  env = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call(
@@ -56723,6 +56868,7 @@ const factory = (env) => {
56723
56868
  fetchOptions,
56724
56869
  maxContentLength,
56725
56870
  maxBodyLength,
56871
+ maxRedirects,
56726
56872
  } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__["default"])(config);
56727
56873
 
56728
56874
  const hasMaxContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(maxContentLength) && maxContentLength > -1;
@@ -56773,7 +56919,7 @@ const factory = (env) => {
56773
56919
  const password = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(configAuth, 'password') || '';
56774
56920
  auth = {
56775
56921
  username,
56776
- password
56922
+ password,
56777
56923
  };
56778
56924
  }
56779
56925
 
@@ -56785,7 +56931,7 @@ const factory = (env) => {
56785
56931
  const urlPassword = decodeURIComponentSafe(parsedURL.password);
56786
56932
  auth = {
56787
56933
  username: urlUsername,
56788
- password: urlPassword
56934
+ password: urlPassword,
56789
56935
  };
56790
56936
  }
56791
56937
 
@@ -56859,7 +57005,9 @@ const factory = (env) => {
56859
57005
  (onUploadProgress || mustEnforceStreamBody)
56860
57006
  ) {
56861
57007
  requestContentLength =
56862
- requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
57008
+ requestContentLength == null
57009
+ ? await resolveBodyLength(headers, data)
57010
+ : requestContentLength;
56863
57011
 
56864
57012
  // A declared length of 0 is only trusted to skip the wrap when we are
56865
57013
  // not enforcing a stream limit (which must not rely on that header).
@@ -56872,7 +57020,10 @@ const factory = (env) => {
56872
57020
 
56873
57021
  let contentTypeHeader;
56874
57022
 
56875
- if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
57023
+ if (
57024
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) &&
57025
+ (contentTypeHeader = _request.headers.get('content-type'))
57026
+ ) {
56876
57027
  headers.setContentType(contentTypeHeader);
56877
57028
  }
56878
57029
 
@@ -56935,20 +57086,57 @@ const factory = (env) => {
56935
57086
  // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
56936
57087
  headers.set('User-Agent', 'axios/' + _env_data_js__WEBPACK_IMPORTED_MODULE_10__.VERSION, false);
56937
57088
 
56938
- const resolvedOptions = {
56939
- ...fetchOptions,
57089
+ const safeFetchOptions =
57090
+ fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);
57091
+
57092
+ if (safeFetchOptions) {
57093
+ // These options are owned by Axios and are already reflected in the
57094
+ // resolved Request passed to fetch.
57095
+ delete safeFetchOptions.body;
57096
+ delete safeFetchOptions.headers;
57097
+ delete safeFetchOptions.method;
57098
+ delete safeFetchOptions.signal;
57099
+ delete safeFetchOptions.duplex;
57100
+ delete safeFetchOptions.credentials;
57101
+ }
57102
+
57103
+ const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {
56940
57104
  signal: composedSignal,
56941
57105
  method: method.toUpperCase(),
56942
57106
  headers: (0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__.toByteStringHeaderObject)(headers.normalize()),
56943
57107
  body: data,
56944
57108
  duplex: 'half',
56945
57109
  credentials: isCredentialsSupported ? withCredentials : undefined,
56946
- };
57110
+ });
57111
+
57112
+ if (isRequestSupported) {
57113
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {
57114
+ if (resolvedOptions[key] === undefined) {
57115
+ resolvedOptions[key] = value;
57116
+ }
57117
+ });
57118
+
57119
+ if (resolvedOptions.signal === undefined) {
57120
+ resolvedOptions.signal = null;
57121
+ }
57122
+
57123
+ if (resolvedOptions.body === undefined) {
57124
+ resolvedOptions.body = null;
57125
+ }
57126
+ }
57127
+
57128
+ if (maxRedirects === 0) {
57129
+ resolvedOptions.redirect = 'manual';
57130
+
57131
+ if (safeFetchOptions) {
57132
+ safeFetchOptions.redirect = 'manual';
57133
+ }
57134
+ }
56947
57135
 
56948
57136
  request = isRequestSupported && new Request(url, resolvedOptions);
56949
57137
 
56950
57138
  let response = await (isRequestSupported
56951
- ? _fetch(request, fetchOptions)
57139
+ ? _fetch(request, safeFetchOptions)
56952
57140
  : _fetch(url, resolvedOptions));
56953
57141
 
56954
57142
  const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(response.headers);
@@ -57175,12 +57363,14 @@ __webpack_require__.r(__webpack_exports__);
57175
57363
  /* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69006);
57176
57364
  /* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19011);
57177
57365
  /* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95273);
57178
- /* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43406);
57179
- /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(79455);
57180
- /* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76487);
57181
- /* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(79194);
57182
- /* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(28451);
57183
- /* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(51306);
57366
+ /* harmony import */ var _helpers_normalizeURLForProtocolCheck_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53744);
57367
+ /* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(43406);
57368
+ /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(79455);
57369
+ /* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(76487);
57370
+ /* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(79194);
57371
+ /* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28451);
57372
+ /* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(51306);
57373
+
57184
57374
 
57185
57375
 
57186
57376
 
@@ -57198,13 +57388,13 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
57198
57388
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported &&
57199
57389
  function (config) {
57200
57390
  return new Promise(function dispatchXhrRequest(resolve, reject) {
57201
- const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_9__["default"])(config);
57391
+ const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_10__["default"])(config);
57202
57392
  let requestData = _config.data;
57203
- const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(_config.headers).normalize();
57393
+ const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(_config.headers).normalize();
57204
57394
  let { responseType, onUploadProgress, onDownloadProgress } = _config;
57205
57395
  let onCanceled;
57206
57396
  let uploadThrottled, downloadThrottled;
57207
- let flushUpload, flushDownload;
57397
+ let flushUpload, flushDownload, flushDownloadWithEvent;
57208
57398
 
57209
57399
  function done() {
57210
57400
  flushUpload && flushUpload(); // flush events
@@ -57222,12 +57412,57 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
57222
57412
  // Set the request timeout in MS
57223
57413
  request.timeout = _config.timeout;
57224
57414
 
57225
- function onloadend() {
57415
+ function onloadend(event) {
57226
57416
  if (!request) {
57227
57417
  return;
57228
57418
  }
57419
+
57420
+ // Status 0 means no response was received, which onerror and onabort normally
57421
+ // reject before this runs. Firefox 152 fires only readystatechange and loadend for
57422
+ // navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389),
57423
+ // leaving settle() to resolve them as an empty success. ECONNABORTED is the error
57424
+ // onabort raised on Firefox 151. Reads over file:, which some environments report as
57425
+ // status 0 on success, are excluded by the request URL's scheme after browser-style
57426
+ // preprocessing, by the page origin's scheme for relative URLs (which inherit it), or
57427
+ // by responseURL where implemented.
57428
+ if (
57429
+ request.status === 0 &&
57430
+ ((0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_6__["default"])((0,_helpers_normalizeURLForProtocolCheck_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_config.url)) ||
57431
+ (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_6__["default"])(_platform_index_js__WEBPACK_IMPORTED_MODULE_7__["default"].origin)) !== 'file' &&
57432
+ !(request.responseURL && request.responseURL.startsWith('file:'))
57433
+ ) {
57434
+ reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request));
57435
+ done();
57436
+
57437
+ // Clean up request
57438
+ request = null;
57439
+ return;
57440
+ }
57441
+
57442
+ // When loadend is still dispatching, flushing with it gives progress
57443
+ // listeners a final delivery whose event has a live target. The legacy
57444
+ // ready-state fallback has no event, so replay its pending progress.
57445
+ // A throwing listener must not block settlement; rethrow asynchronously,
57446
+ // matching how listener errors surface on the throttle timer path.
57447
+ try {
57448
+ if (event) {
57449
+ flushDownloadWithEvent && flushDownloadWithEvent(event);
57450
+ } else {
57451
+ flushDownload && flushDownload();
57452
+ }
57453
+ } catch (err) {
57454
+ setTimeout(() => {
57455
+ throw err;
57456
+ });
57457
+ }
57458
+
57459
+ // A final progress callback can cancel the request synchronously.
57460
+ if (!request) {
57461
+ return;
57462
+ }
57463
+
57229
57464
  // Prepare the response
57230
- const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(
57465
+ const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(
57231
57466
  'getAllResponseHeaders' in request && request.getAllResponseHeaders()
57232
57467
  );
57233
57468
  const responseData =
@@ -57340,7 +57575,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
57340
57575
 
57341
57576
  // Add headers to the request
57342
57577
  if ('setRequestHeader' in request) {
57343
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach((0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_10__.toByteStringHeaderObject)(requestHeaders), function setRequestHeader(val, key) {
57578
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach((0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__.toByteStringHeaderObject)(requestHeaders), function setRequestHeader(val, key) {
57344
57579
  request.setRequestHeader(key, val);
57345
57580
  });
57346
57581
  }
@@ -57357,13 +57592,16 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
57357
57592
 
57358
57593
  // Handle progress if needed
57359
57594
  if (onDownloadProgress) {
57360
- [downloadThrottled, flushDownload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onDownloadProgress, true);
57595
+ [downloadThrottled, flushDownload, flushDownloadWithEvent] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_9__.progressEventReducer)(
57596
+ onDownloadProgress,
57597
+ true
57598
+ );
57361
57599
  request.addEventListener('progress', downloadThrottled);
57362
57600
  }
57363
57601
 
57364
57602
  // Not all browsers support upload events
57365
57603
  if (onUploadProgress && request.upload) {
57366
- [uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onUploadProgress);
57604
+ [uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_9__.progressEventReducer)(onUploadProgress);
57367
57605
 
57368
57606
  request.upload.addEventListener('progress', uploadThrottled);
57369
57607
 
@@ -57391,9 +57629,9 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
57391
57629
  }
57392
57630
  }
57393
57631
 
57394
- const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_config.url);
57632
+ const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_6__["default"])(_config.url);
57395
57633
 
57396
- if (protocol && !_platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].protocols.includes(protocol)) {
57634
+ if (protocol && !_platform_index_js__WEBPACK_IMPORTED_MODULE_7__["default"].protocols.includes(protocol)) {
57397
57635
  reject(
57398
57636
  new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
57399
57637
  'Unsupported protocol ' + protocol + ':',
@@ -57749,9 +57987,10 @@ __webpack_require__.r(__webpack_exports__);
57749
57987
  /* harmony import */ var _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97844);
57750
57988
  /* harmony import */ var _mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(58757);
57751
57989
  /* harmony import */ var _buildFullPath_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(22921);
57752
- /* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(62215);
57753
- /* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76487);
57754
- /* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(69006);
57990
+ /* harmony import */ var _methodList_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8726);
57991
+ /* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(62215);
57992
+ /* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(76487);
57993
+ /* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(69006);
57755
57994
 
57756
57995
 
57757
57996
 
@@ -57764,7 +58003,8 @@ __webpack_require__.r(__webpack_exports__);
57764
58003
 
57765
58004
 
57766
58005
 
57767
- const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].validators;
58006
+
58007
+ const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_7__["default"].validators;
57768
58008
 
57769
58009
  /**
57770
58010
  * Create a new instance of Axios
@@ -57795,21 +58035,21 @@ class Axios {
57795
58035
  return await this._request(configOrUrl, config);
57796
58036
  } catch (err) {
57797
58037
  if (err instanceof Error) {
57798
- let dummy = {};
58038
+ try {
58039
+ let dummy = {};
57799
58040
 
57800
- Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
58041
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
57801
58042
 
57802
- // slice off the Error: ... line
57803
- const stack = (() => {
57804
- if (!dummy.stack) {
57805
- return '';
57806
- }
58043
+ const dummyStack = dummy.stack;
58044
+ let stack = '';
57807
58045
 
57808
- const firstNewlineIndex = dummy.stack.indexOf('\n');
58046
+ // slice off the Error: ... line
58047
+ if (typeof dummyStack === 'string') {
58048
+ const firstNewlineIndex = dummyStack.indexOf('\n');
58049
+
58050
+ stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1);
58051
+ }
57809
58052
 
57810
- return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
57811
- })();
57812
- try {
57813
58053
  if (!err.stack) {
57814
58054
  err.stack = stack;
57815
58055
  // match without the 2 top stack lines
@@ -57825,7 +58065,7 @@ class Axios {
57825
58065
  }
57826
58066
  }
57827
58067
  } catch (e) {
57828
- // ignore the case where "stack" is an un-writable property
58068
+ // Ignore failures from custom stack hooks or un-writable stack properties.
57829
58069
  }
57830
58070
  }
57831
58071
 
@@ -57848,7 +58088,7 @@ class Axios {
57848
58088
  const { transitional, paramsSerializer, headers } = config;
57849
58089
 
57850
58090
  if (transitional !== undefined) {
57851
- _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
58091
+ _helpers_validator_js__WEBPACK_IMPORTED_MODULE_7__["default"].assertOptions(
57852
58092
  transitional,
57853
58093
  {
57854
58094
  silentJSONParsing: validators.transitional(validators.boolean),
@@ -57868,7 +58108,7 @@ class Axios {
57868
58108
  serialize: paramsSerializer,
57869
58109
  };
57870
58110
  } else {
57871
- _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
58111
+ _helpers_validator_js__WEBPACK_IMPORTED_MODULE_7__["default"].assertOptions(
57872
58112
  paramsSerializer,
57873
58113
  {
57874
58114
  encode: validators.function,
@@ -57888,7 +58128,7 @@ class Axios {
57888
58128
  config.allowAbsoluteUrls = true;
57889
58129
  }
57890
58130
 
57891
- _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
58131
+ _helpers_validator_js__WEBPACK_IMPORTED_MODULE_7__["default"].assertOptions(
57892
58132
  config,
57893
58133
  {
57894
58134
  baseUrl: validators.spelling('baseURL'),
@@ -57898,17 +58138,21 @@ class Axios {
57898
58138
  );
57899
58139
 
57900
58140
  // Set config.method
57901
- config.method = (config.method || this.defaults.method || 'get').toLowerCase();
58141
+ config.method = (
58142
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(config, 'method') ||
58143
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(this.defaults, 'method') ||
58144
+ 'get'
58145
+ ).toLowerCase();
57902
58146
 
57903
58147
  // Flatten headers
57904
58148
  let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(headers.common, headers[config.method]);
57905
58149
 
57906
58150
  headers &&
57907
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], (method) => {
58151
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(_methodList_js__WEBPACK_IMPORTED_MODULE_6__["default"].concat('common'), (method) => {
57908
58152
  delete headers[method];
57909
58153
  });
57910
58154
 
57911
- config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].concat(contextHeaders, headers);
58155
+ config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].concat(contextHeaders, headers);
57912
58156
 
57913
58157
  // filter out skipped interceptors
57914
58158
  const requestInterceptorChain = [];
@@ -57920,7 +58164,7 @@ class Axios {
57920
58164
 
57921
58165
  synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
57922
58166
 
57923
- const transitional = config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__["default"];
58167
+ const transitional = config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_9__["default"];
57924
58168
  const legacyInterceptorReqResOrdering =
57925
58169
  transitional && transitional.legacyInterceptorReqResOrdering;
57926
58170
 
@@ -57963,17 +58207,35 @@ class Axios {
57963
58207
  const onFulfilled = requestInterceptorChain[i++];
57964
58208
  const onRejected = requestInterceptorChain[i++];
57965
58209
  try {
57966
- newConfig = onFulfilled(newConfig);
58210
+ newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
57967
58211
  } catch (error) {
57968
- onRejected.call(this, error);
58212
+ if (!onRejected) {
58213
+ promise = Promise.reject(error);
58214
+ break;
58215
+ }
58216
+
58217
+ try {
58218
+ const rejectedResult = onRejected.call(this, error);
58219
+
58220
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isThenable(rejectedResult)) {
58221
+ promise = Promise.resolve(rejectedResult).then(() =>
58222
+ _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_3__["default"].call(this, newConfig)
58223
+ );
58224
+ }
58225
+ } catch (rejectedError) {
58226
+ promise = Promise.reject(rejectedError);
58227
+ }
58228
+
57969
58229
  break;
57970
58230
  }
57971
58231
  }
57972
58232
 
57973
- try {
57974
- promise = _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_3__["default"].call(this, newConfig);
57975
- } catch (error) {
57976
- return Promise.reject(error);
58233
+ if (!promise) {
58234
+ try {
58235
+ promise = _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_3__["default"].call(this, newConfig);
58236
+ } catch (error) {
58237
+ promise = Promise.reject(error);
58238
+ }
57977
58239
  }
57978
58240
 
57979
58241
  i = 0;
@@ -58124,9 +58386,40 @@ function redactConfig(config, redactKeys) {
58124
58386
  return visit(config);
58125
58387
  }
58126
58388
 
58389
+ function stringifySafely(value) {
58390
+ try {
58391
+ return String(value);
58392
+ } catch (err) {
58393
+ return '';
58394
+ }
58395
+ }
58396
+
58397
+ function aggregateErrorMessage(error) {
58398
+ const message = error.errors
58399
+ .map((entry) => {
58400
+ try {
58401
+ return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);
58402
+ } catch (err) {
58403
+ return '';
58404
+ }
58405
+ })
58406
+ .filter(Boolean)
58407
+ .join('; ');
58408
+
58409
+ return message || error.name || 'AggregateError';
58410
+ }
58411
+
58127
58412
  class AxiosError extends Error {
58128
58413
  static from(error, code, config, request, response, customProps) {
58129
- const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
58414
+ // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection
58415
+ // failures) has an empty `message`; its detail lives in `errors[]`. Without
58416
+ // this, the wrapped error surfaces with a blank message (see #6721).
58417
+ let message = error.message;
58418
+ if (!message && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(error.errors) && error.errors.length) {
58419
+ message = aggregateErrorMessage(error);
58420
+ }
58421
+
58422
+ const axiosError = new AxiosError(message, code || error.code, config, request, response);
58130
58423
  // Match native `Error` `cause` semantics: non-enumerable. The wrapped
58131
58424
  // error often carries circular internals (sockets, requests, agents), so
58132
58425
  // an enumerable `cause` makes structured loggers (pino/winston) and any
@@ -58240,6 +58533,7 @@ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
58240
58533
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError);
58241
58534
 
58242
58535
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
58536
+ /* harmony export */ "REDACTED", 0, /* binding */ REDACTED,
58243
58537
  /* harmony export */ "default", 0, /* export default binding */ __WEBPACK_DEFAULT_EXPORT__
58244
58538
  /* harmony export */ ]);
58245
58539
 
@@ -58286,6 +58580,124 @@ function parseTokens(str) {
58286
58580
  return tokens;
58287
58581
  }
58288
58582
 
58583
+ const parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
58584
+
58585
+ function trimOWS(value) {
58586
+ let start = 0;
58587
+ let end = value.length;
58588
+
58589
+ while (start < end) {
58590
+ const code = value.charCodeAt(start);
58591
+
58592
+ if (code !== 0x09 && code !== 0x20) {
58593
+ break;
58594
+ }
58595
+
58596
+ start += 1;
58597
+ }
58598
+
58599
+ while (end > start) {
58600
+ const code = value.charCodeAt(end - 1);
58601
+
58602
+ if (code !== 0x09 && code !== 0x20) {
58603
+ break;
58604
+ }
58605
+
58606
+ end -= 1;
58607
+ }
58608
+
58609
+ return start === 0 && end === value.length ? value : value.slice(start, end);
58610
+ }
58611
+
58612
+ function decodeQuotedString(value) {
58613
+ const last = value.length - 1;
58614
+
58615
+ if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) {
58616
+ return value;
58617
+ }
58618
+
58619
+ let decoded = '';
58620
+
58621
+ for (let i = 1; i < last; i++) {
58622
+ const code = value.charCodeAt(i);
58623
+
58624
+ if (code === 0x22) {
58625
+ return value;
58626
+ }
58627
+
58628
+ if (code === 0x5c) {
58629
+ i += 1;
58630
+
58631
+ if (i >= last) {
58632
+ return value;
58633
+ }
58634
+ }
58635
+
58636
+ decoded += value[i];
58637
+ }
58638
+
58639
+ return decoded;
58640
+ }
58641
+
58642
+ function parseParameters(value) {
58643
+ const parameters = Object.create(null);
58644
+ const str = String(value);
58645
+ let start = 0;
58646
+ let quoted = false;
58647
+ let escaped = false;
58648
+
58649
+ function parseParameter(end) {
58650
+ const part = trimOWS(str.slice(start, end));
58651
+ const equals = part.indexOf('=');
58652
+
58653
+ if (equals < 1) {
58654
+ return;
58655
+ }
58656
+
58657
+ const name = trimOWS(part.slice(0, equals));
58658
+
58659
+ if (!parameterNameRE.test(name)) {
58660
+ return;
58661
+ }
58662
+
58663
+ const normalizedName = name.toLowerCase();
58664
+
58665
+ if (
58666
+ normalizedName === '__proto__' ||
58667
+ normalizedName === 'constructor' ||
58668
+ normalizedName === 'prototype'
58669
+ ) {
58670
+ return;
58671
+ }
58672
+
58673
+ const parameterValue = trimOWS(part.slice(equals + 1));
58674
+ parameters[normalizedName] = decodeQuotedString(parameterValue);
58675
+ }
58676
+
58677
+ for (let i = 0; i < str.length; i++) {
58678
+ const code = str.charCodeAt(i);
58679
+
58680
+ if (quoted) {
58681
+ if (escaped) {
58682
+ escaped = false;
58683
+ } else if (code === 0x5c) {
58684
+ escaped = true;
58685
+ } else if (code === 0x22) {
58686
+ quoted = false;
58687
+ }
58688
+ } else if (code === 0x22) {
58689
+ quoted = true;
58690
+ } else if (code === 0x2c || code === 0x3b) {
58691
+ parseParameter(i);
58692
+ start = i + 1;
58693
+ }
58694
+ }
58695
+
58696
+ parseParameter(str.length);
58697
+
58698
+ return parameters;
58699
+ }
58700
+
58289
58701
  const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
58290
58702
 
58291
58703
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
@@ -58537,7 +58949,8 @@ class AxiosHeaders {
58537
58949
  }
58538
58950
 
58539
58951
  getSetCookie() {
58540
- return this.get('set-cookie') || [];
58952
+ const value = this.get('set-cookie');
58953
+ return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value : value == null || value === false ? [] : [value];
58541
58954
  }
58542
58955
 
58543
58956
  get [Symbol.toStringTag]() {
@@ -58548,6 +58961,10 @@ class AxiosHeaders {
58548
58961
  return thing instanceof this ? thing : new this(thing);
58549
58962
  }
58550
58963
 
58964
+ static parseParameters(value) {
58965
+ return parseParameters(value);
58966
+ }
58967
+
58551
58968
  static concat(first, ...targets) {
58552
58969
  const computed = new this(first);
58553
58970
 
@@ -58623,9 +59040,57 @@ __webpack_require__.r(__webpack_exports__);
58623
59040
 
58624
59041
 
58625
59042
 
59043
+ const $internals = Symbol('internals');
59044
+
59045
+ // `handlers` is public and may be replaced with a nullish value by user code;
59046
+ // `clear()` has always tolerated that. Treat it as an empty stack rather than
59047
+ // dereferencing it.
59048
+ function countHandlers(handlers) {
59049
+ return handlers ? handlers.length : 0;
59050
+ }
59051
+
59052
+ function trimHandlers(handlers) {
59053
+ if (!handlers) {
59054
+ return;
59055
+ }
59056
+
59057
+ while (handlers.length && handlers[handlers.length - 1] === null) {
59058
+ handlers.pop();
59059
+ }
59060
+ }
59061
+
59062
+ function syncHandlerEntries(manager, internals) {
59063
+ const handlers = manager.handlers;
59064
+ const length = countHandlers(handlers);
59065
+
59066
+ if (handlers !== internals.handlersRef) {
59067
+ internals.handlersRef = handlers;
59068
+ internals.handlerEntries.clear();
59069
+ } else if (length !== internals.handlersLength) {
59070
+ if (!length) {
59071
+ internals.handlerEntries.clear();
59072
+ } else {
59073
+ internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
59074
+ if (handlers[entry.index] !== entry.handler) {
59075
+ internals.handlerEntries.delete(id);
59076
+ }
59077
+ });
59078
+ }
59079
+ }
59080
+
59081
+ internals.handlersLength = length;
59082
+ }
59083
+
58626
59084
  class InterceptorManager {
58627
59085
  constructor() {
58628
59086
  this.handlers = [];
59087
+ this[$internals] = {
59088
+ handlersRef: this.handlers,
59089
+ handlersLength: this.handlers.length,
59090
+ handlerEntries: new Map(),
59091
+ iterationDepth: 0,
59092
+ nextId: 0,
59093
+ };
58629
59094
  }
58630
59095
 
58631
59096
  /**
@@ -58638,13 +59103,30 @@ class InterceptorManager {
58638
59103
  * @return {Number} An ID used to remove interceptor later
58639
59104
  */
58640
59105
  use(fulfilled, rejected, options) {
58641
- this.handlers.push({
59106
+ const handler = {
58642
59107
  fulfilled,
58643
59108
  rejected,
58644
59109
  synchronous: options ? options.synchronous : false,
58645
59110
  runWhen: options ? options.runWhen : null,
59111
+ };
59112
+ const internals = this[$internals];
59113
+
59114
+ if (this.handlers == null) {
59115
+ this.handlers = [];
59116
+ }
59117
+
59118
+ syncHandlerEntries(this, internals);
59119
+
59120
+ const id = internals.nextId++;
59121
+
59122
+ this.handlers.push(handler);
59123
+ internals.handlerEntries.set(id, {
59124
+ handler,
59125
+ index: this.handlers.length - 1,
58646
59126
  });
58647
- return this.handlers.length - 1;
59127
+ internals.handlersLength = this.handlers.length;
59128
+
59129
+ return id;
58648
59130
  }
58649
59131
 
58650
59132
  /**
@@ -58655,8 +59137,27 @@ class InterceptorManager {
58655
59137
  * @returns {void}
58656
59138
  */
58657
59139
  eject(id) {
58658
- if (this.handlers[id]) {
58659
- this.handlers[id] = null;
59140
+ const internals = this[$internals];
59141
+
59142
+ syncHandlerEntries(this, internals);
59143
+
59144
+ const entry = internals.handlerEntries.get(id);
59145
+
59146
+ if (entry) {
59147
+ internals.handlerEntries.delete(id);
59148
+
59149
+ // Ignore IDs invalidated by clear or direct replacement of handlers.
59150
+ if (this.handlers[entry.index] !== entry.handler) {
59151
+ return;
59152
+ }
59153
+
59154
+ this.handlers[entry.index] = null;
59155
+
59156
+ // Do not reuse an index while forEach is walking its length snapshot.
59157
+ if (!internals.iterationDepth) {
59158
+ trimHandlers(this.handlers);
59159
+ internals.handlersLength = this.handlers.length;
59160
+ }
58660
59161
  }
58661
59162
  }
58662
59163
 
@@ -58668,6 +59169,7 @@ class InterceptorManager {
58668
59169
  clear() {
58669
59170
  if (this.handlers) {
58670
59171
  this.handlers = [];
59172
+ syncHandlerEntries(this, this[$internals]);
58671
59173
  }
58672
59174
  }
58673
59175
 
@@ -58682,11 +59184,25 @@ class InterceptorManager {
58682
59184
  * @returns {void}
58683
59185
  */
58684
59186
  forEach(fn) {
58685
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this.handlers, function forEachHandler(h) {
58686
- if (h !== null) {
58687
- fn(h);
59187
+ const internals = this[$internals];
59188
+
59189
+ syncHandlerEntries(this, internals);
59190
+
59191
+ internals.iterationDepth++;
59192
+
59193
+ try {
59194
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this.handlers, function forEachHandler(h) {
59195
+ if (h !== null) {
59196
+ fn(h);
59197
+ }
59198
+ });
59199
+ } finally {
59200
+ if (!--internals.iterationDepth) {
59201
+ syncHandlerEntries(this, internals);
59202
+ trimHandlers(this.handlers);
59203
+ internals.handlersLength = countHandlers(this.handlers);
58688
59204
  }
58689
- });
59205
+ }
58690
59206
  }
58691
59207
  }
58692
59208
 
@@ -58710,6 +59226,8 @@ __webpack_require__.r(__webpack_exports__);
58710
59226
  /* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19011);
58711
59227
  /* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75983);
58712
59228
  /* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54042);
59229
+ /* harmony import */ var _helpers_normalizeURLForProtocolCheck_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53744);
59230
+
58713
59231
 
58714
59232
 
58715
59233
 
@@ -58717,27 +59235,52 @@ __webpack_require__.r(__webpack_exports__);
58717
59235
 
58718
59236
 
58719
59237
  const malformedHttpProtocol = /^https?:(?!\/\/)/i;
58720
- const httpProtocolControlCharacters = /[\t\n\r]/g;
58721
59238
 
58722
- function stripLeadingC0ControlOrSpace(url) {
58723
- let i = 0;
58724
- while (i < url.length && url.charCodeAt(i) <= 0x20) {
58725
- i++;
59239
+ // Redact the parts of a URL that can carry secrets before it is embedded in an
59240
+ // error message. AxiosError.toJSON() serializes `message` verbatim and errors
59241
+ // are commonly logged, while the opt-in `config.redact` model only cleans
59242
+ // config keys — it cannot reach the message. Redact only the genuinely
59243
+ // sensitive substrings — userinfo (credentials), query parameter values and
59244
+ // fragment contents — with the same REDACTED marker the config redaction uses,
59245
+ // while keeping the scheme, host, path and parameter names so the offending
59246
+ // request stays accurately identifiable.
59247
+ function redactFragment(fragment) {
59248
+ if (!fragment) {
59249
+ return fragment;
58726
59250
  }
58727
- return url.slice(i);
59251
+
59252
+ return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = '') => {
59253
+ return `${separator}${parameterName}${_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__.REDACTED}`;
59254
+ });
58728
59255
  }
58729
59256
 
58730
- function normalizeURLForProtocolCheck(url) {
58731
- return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, '');
59257
+ function redactSensitiveURLParts(url) {
59258
+ const redactedURL = url.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__.REDACTED}@`);
59259
+ const fragmentIndex = redactedURL.indexOf('#');
59260
+ const urlWithoutFragment =
59261
+ fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
59262
+ const redactedURLWithoutFragment = urlWithoutFragment.replace(
59263
+ /([?&][^=&#]*=)[^&#]*/g,
59264
+ `$1${_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__.REDACTED}`
59265
+ );
59266
+
59267
+ if (fragmentIndex === -1) {
59268
+ return redactedURLWithoutFragment;
59269
+ }
59270
+
59271
+ return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
58732
59272
  }
58733
59273
 
58734
59274
  function assertValidHttpProtocolURL(url, config) {
58735
- if (typeof url === 'string' && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) {
58736
- throw new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
58737
- 'Invalid URL: missing "//" after protocol',
58738
- _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_INVALID_URL,
58739
- config
58740
- );
59275
+ if (typeof url === 'string') {
59276
+ const normalizedURL = (0,_helpers_normalizeURLForProtocolCheck_js__WEBPACK_IMPORTED_MODULE_3__["default"])(url);
59277
+ if (malformedHttpProtocol.test(normalizedURL)) {
59278
+ throw new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
59279
+ `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`,
59280
+ _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_INVALID_URL,
59281
+ config
59282
+ );
59283
+ }
58741
59284
  }
58742
59285
  }
58743
59286
 
@@ -58778,6 +59321,8 @@ __webpack_require__.r(__webpack_exports__);
58778
59321
  /* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95273);
58779
59322
  /* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76487);
58780
59323
  /* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63002);
59324
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(68750);
59325
+
58781
59326
 
58782
59327
 
58783
59328
 
@@ -58811,10 +59356,15 @@ function throwIfCancellationRequested(config) {
58811
59356
  *
58812
59357
  * @returns {Promise} The Promise to be fulfilled
58813
59358
  */
58814
- function dispatchRequest(config) {
59359
+ function dispatchRequest(_config) {
59360
+ // Interceptors may replace the merged config with an ordinary object. Flatten
59361
+ // it at the dispatch boundary so shared prototype members cannot become
59362
+ // request behavior, while preserving intentional template/class members.
59363
+ const config = _utils_js__WEBPACK_IMPORTED_MODULE_6__["default"].toSafeFlatObject(_config);
59364
+
58815
59365
  throwIfCancellationRequested(config);
58816
59366
 
58817
- config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(config.headers);
59367
+ config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(_utils_js__WEBPACK_IMPORTED_MODULE_6__["default"].getSafeProp(config, 'headers'));
58818
59368
 
58819
59369
  // Transform request data
58820
59370
  config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(config, config.transformRequest);
@@ -58888,6 +59438,17 @@ __webpack_require__.r(__webpack_exports__);
58888
59438
 
58889
59439
  const headersToObject = (thing) => (thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"] ? { ...thing } : thing);
58890
59440
 
59441
+ const ownEnumerableKeys = (thing) => {
59442
+ if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
59443
+ return Object.keys(thing).concat(
59444
+ Object.getOwnPropertySymbols(thing).filter(
59445
+ (symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable
59446
+ )
59447
+ );
59448
+ }
59449
+ return Object.keys(thing);
59450
+ };
59451
+
58891
59452
  /**
58892
59453
  * Config-specific merge-function which creates a new config-object
58893
59454
  * by merging two configuration objects together.
@@ -58953,7 +59514,9 @@ function mergeConfig(config1, config2) {
58953
59514
  }
58954
59515
 
58955
59516
  function getMergedTransitionalOption(prop) {
58956
- const transitional2 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, 'transitional') ? config2.transitional : undefined;
59517
+ const transitional2 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, 'transitional')
59518
+ ? config2.transitional
59519
+ : undefined;
58957
59520
 
58958
59521
  if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(transitional2)) {
58959
59522
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional2)) {
@@ -58965,7 +59528,9 @@ function mergeConfig(config1, config2) {
58965
59528
  }
58966
59529
  }
58967
59530
 
58968
- const transitional1 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, 'transitional') ? config1.transitional : undefined;
59531
+ const transitional1 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, 'transitional')
59532
+ ? config1.transitional
59533
+ : undefined;
58969
59534
 
58970
59535
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional1) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(transitional1, prop)) {
58971
59536
  return transitional1[prop];
@@ -58992,7 +59557,7 @@ function mergeConfig(config1, config2) {
58992
59557
  transformResponse: defaultToConfig2,
58993
59558
  paramsSerializer: defaultToConfig2,
58994
59559
  timeout: defaultToConfig2,
58995
- timeoutMessage: defaultToConfig2,
59560
+ timeoutErrorMessage: defaultToConfig2,
58996
59561
  withCredentials: defaultToConfig2,
58997
59562
  withXSRFToken: defaultToConfig2,
58998
59563
  adapter: defaultToConfig2,
@@ -59017,7 +59582,7 @@ function mergeConfig(config1, config2) {
59017
59582
  mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
59018
59583
  };
59019
59584
 
59020
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
59585
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {
59021
59586
  if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
59022
59587
  const merge = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
59023
59588
  const a = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, prop) ? config1[prop] : undefined;
@@ -59042,6 +59607,75 @@ function mergeConfig(config1, config2) {
59042
59607
  }
59043
59608
 
59044
59609
 
59610
+ /***/ },
59611
+
59612
+ /***/ 8726
59613
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
59614
+
59615
+ "use strict";
59616
+ __webpack_require__.r(__webpack_exports__);
59617
+
59618
+
59619
+ const methodList = Object.freeze([
59620
+ 'get',
59621
+ 'delete',
59622
+ 'head',
59623
+ 'options',
59624
+ 'post',
59625
+ 'put',
59626
+ 'patch',
59627
+ 'purge',
59628
+ 'link',
59629
+ 'unlink',
59630
+ 'query',
59631
+ ]);
59632
+
59633
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (methodList);
59634
+
59635
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
59636
+ /* harmony export */ "default", 0, /* export default binding */ __WEBPACK_DEFAULT_EXPORT__
59637
+ /* harmony export */ ]);
59638
+
59639
+
59640
+ /***/ },
59641
+
59642
+ /***/ 371
59643
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
59644
+
59645
+ "use strict";
59646
+ __webpack_require__.r(__webpack_exports__);
59647
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
59648
+ /* harmony export */ "default": () => (/* binding */ setFormDataHeaders)
59649
+ /* harmony export */ });
59650
+
59651
+
59652
+ const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
59653
+
59654
+ /**
59655
+ * Apply the headers generated by a FormData implementation to the request headers,
59656
+ * honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the
59657
+ * content-* headers; otherwise merge all of them.
59658
+ *
59659
+ * @param {AxiosHeaders} headers - the request headers to mutate
59660
+ * @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation
59661
+ * @param {String} [policy] - the resolved `formDataHeaderPolicy` config value
59662
+ *
59663
+ * @returns {void}
59664
+ */
59665
+ function setFormDataHeaders(headers, formHeaders, policy) {
59666
+ if (policy !== 'content-only') {
59667
+ headers.set(formHeaders);
59668
+ return;
59669
+ }
59670
+
59671
+ Object.entries(formHeaders || {}).forEach(([key, val]) => {
59672
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
59673
+ headers.set(key, val);
59674
+ }
59675
+ });
59676
+ }
59677
+
59678
+
59045
59679
  /***/ },
59046
59680
 
59047
59681
  /***/ 40788
@@ -59139,6 +59773,8 @@ __webpack_require__.r(__webpack_exports__);
59139
59773
  /* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24699);
59140
59774
  /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(79455);
59141
59775
  /* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(66256);
59776
+ /* harmony import */ var _core_methodList_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8726);
59777
+
59142
59778
 
59143
59779
 
59144
59780
 
@@ -59311,7 +59947,7 @@ const defaults = {
59311
59947
  },
59312
59948
  };
59313
59949
 
59314
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query'], (method) => {
59950
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(_core_methodList_js__WEBPACK_IMPORTED_MODULE_7__["default"], (method) => {
59315
59951
  defaults.headers[method] = {};
59316
59952
  });
59317
59953
 
@@ -59352,7 +59988,7 @@ __webpack_require__.r(__webpack_exports__);
59352
59988
 
59353
59989
  "use strict";
59354
59990
  __webpack_require__.r(__webpack_exports__);
59355
- const VERSION = "1.18.1";
59991
+ const VERSION = "1.20.0";
59356
59992
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
59357
59993
  /* harmony export */ "VERSION", 0, /* binding */ VERSION
59358
59994
  /* harmony export */ ]);
@@ -59475,14 +60111,22 @@ const HttpStatusCode = {
59475
60111
  Gone: 410,
59476
60112
  LengthRequired: 411,
59477
60113
  PreconditionFailed: 412,
60114
+ /**
60115
+ * @deprecated Use `ContentTooLarge` instead.
60116
+ */
59478
60117
  PayloadTooLarge: 413,
60118
+ ContentTooLarge: 413,
59479
60119
  UriTooLong: 414,
59480
60120
  UnsupportedMediaType: 415,
59481
60121
  RangeNotSatisfiable: 416,
59482
60122
  ExpectationFailed: 417,
59483
60123
  ImATeapot: 418,
59484
60124
  MisdirectedRequest: 421,
60125
+ /**
60126
+ * @deprecated Use `UnprocessableContent` instead.
60127
+ */
59485
60128
  UnprocessableEntity: 422,
60129
+ UnprocessableContent: 422,
59486
60130
  Locked: 423,
59487
60131
  FailedDependency: 424,
59488
60132
  TooEarly: 425,
@@ -59502,6 +60146,7 @@ const HttpStatusCode = {
59502
60146
  LoopDetected: 508,
59503
60147
  NotExtended: 510,
59504
60148
  NetworkAuthenticationRequired: 511,
60149
+ WebServerReturnsAnUnknownError: 520,
59505
60150
  WebServerIsDown: 521,
59506
60151
  ConnectionTimedOut: 522,
59507
60152
  OriginIsUnreachable: 523,
@@ -59511,7 +60156,9 @@ const HttpStatusCode = {
59511
60156
  };
59512
60157
 
59513
60158
  Object.entries(HttpStatusCode).forEach(([key, value]) => {
59514
- HttpStatusCode[value] = key;
60159
+ if (HttpStatusCode[value] === undefined) {
60160
+ HttpStatusCode[value] = key;
60161
+ }
59515
60162
  });
59516
60163
 
59517
60164
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HttpStatusCode);
@@ -59652,9 +60299,17 @@ __webpack_require__.r(__webpack_exports__);
59652
60299
  * @returns {string} The combined URL
59653
60300
  */
59654
60301
  function combineURLs(baseURL, relativeURL) {
59655
- return relativeURL
59656
- ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
59657
- : baseURL;
60302
+ if (!relativeURL) {
60303
+ return baseURL;
60304
+ }
60305
+
60306
+ let end = baseURL.length;
60307
+
60308
+ while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
60309
+ end--;
60310
+ }
60311
+
60312
+ return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\/+/, '');
59658
60313
  }
59659
60314
 
59660
60315
 
@@ -59715,7 +60370,18 @@ const composeSignals = (signals, timeout) => {
59715
60370
  signals = null;
59716
60371
  };
59717
60372
 
59718
- signals.forEach((signal) => signal.addEventListener('abort', onabort, { once: true }));
60373
+ signals.forEach((signal) => {
60374
+ if (aborted) {
60375
+ return;
60376
+ }
60377
+
60378
+ if (signal.aborted) {
60379
+ onabort.call(signal);
60380
+ return;
60381
+ }
60382
+
60383
+ signal.addEventListener('abort', onabort, { once: true });
60384
+ });
59719
60385
 
59720
60386
  const { signal } = controller;
59721
60387
 
@@ -59818,16 +60484,15 @@ __webpack_require__.r(__webpack_exports__);
59818
60484
  "use strict";
59819
60485
  __webpack_require__.r(__webpack_exports__);
59820
60486
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
59821
- /* harmony export */ "default": () => (/* binding */ estimateDataURLDecodedBytes)
60487
+ /* harmony export */ "default": () => (/* binding */ estimateDataURLDecodedBytes),
60488
+ /* harmony export */ estimateDataURLBufferAllocation: () => (/* binding */ estimateDataURLBufferAllocation)
59822
60489
  /* harmony export */ });
59823
60490
  /**
59824
- * Estimate decoded byte length of a data:// URL *without* allocating large buffers.
59825
- * - For base64: compute exact decoded size using length and padding;
59826
- * handle %XX at the character-count level (no string allocation).
59827
- * - For non-base64: compute the exact percent-decoded UTF-8 byte length.
59828
- *
59829
- * @param {string} url
59830
- * @returns {number}
60491
+ * Estimate data: URL byte lengths *without* allocating large buffers.
60492
+ * - Fetch percent-decodes a base64 body before decoding it.
60493
+ * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the
60494
+ * raw body, including ignored characters and content after padding.
60495
+ * - Non-base64 data is percent-decoded and then encoded as UTF-8.
59831
60496
  */
59832
60497
  const isHexDigit = (charCode) =>
59833
60498
  (charCode >= 48 && charCode <= 57) ||
@@ -59837,64 +60502,101 @@ const isHexDigit = (charCode) =>
59837
60502
  const isPercentEncodedByte = (str, i, len) =>
59838
60503
  i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
59839
60504
 
59840
- function estimateDataURLDecodedBytes(url) {
59841
- if (!url || typeof url !== 'string') return 0;
59842
- if (!url.startsWith('data:')) return 0;
60505
+ const hexValue = (charCode) => (charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55);
59843
60506
 
59844
- const comma = url.indexOf(',');
59845
- if (comma < 0) return 0;
60507
+ const isBase64Char = (charCode) =>
60508
+ (charCode >= 65 && charCode <= 90) || // A-Z
60509
+ (charCode >= 97 && charCode <= 122) || // a-z
60510
+ (charCode >= 48 && charCode <= 57) || // 0-9
60511
+ charCode === 43 || // +
60512
+ charCode === 47 || // /
60513
+ charCode === 45 || // - (base64url)
60514
+ charCode === 95; // _ (base64url)
59846
60515
 
59847
- const meta = url.slice(5, comma);
59848
- const body = url.slice(comma + 1);
59849
- const isBase64 = /;base64/i.test(meta);
60516
+ const isBase64Whitespace = (charCode) =>
60517
+ charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
59850
60518
 
59851
- if (isBase64) {
59852
- let effectiveLen = body.length;
59853
- const len = body.length; // cache length
59854
-
59855
- for (let i = 0; i < len; i++) {
59856
- if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
59857
- const a = body.charCodeAt(i + 1);
59858
- const b = body.charCodeAt(i + 2);
59859
- const isHex = isHexDigit(a) && isHexDigit(b);
59860
-
59861
- if (isHex) {
59862
- effectiveLen -= 2;
59863
- i += 2;
59864
- }
59865
- }
60519
+ const base64Bytes = (significant) => {
60520
+ const groups = Math.floor(significant / 4);
60521
+ const remainder = significant % 4;
60522
+ return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
60523
+ };
60524
+
60525
+ // Buffer.byteLength(body, 'base64') uses the raw string length as an allocation
60526
+ // upper bound even when Buffer.from later ignores characters or stops at '='.
60527
+ const estimateBase64BufferAllocation = (body) => {
60528
+ const len = body.length;
60529
+ let padding = 0;
60530
+
60531
+ if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) {
60532
+ padding++;
60533
+
60534
+ if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) {
60535
+ padding++;
59866
60536
  }
60537
+ }
60538
+
60539
+ return Math.floor(((len - padding) * 3) / 4);
60540
+ };
59867
60541
 
59868
- let pad = 0;
59869
- let idx = len - 1;
60542
+ const estimatePercentDecodedBase64Bytes = (body) => {
60543
+ const len = body.length;
60544
+ let significant = 0;
60545
+ let padding = 0;
60546
+ let invalid = false;
59870
60547
 
59871
- const tailIsPct3D = (j) =>
59872
- j >= 2 &&
59873
- body.charCodeAt(j - 2) === 37 && // '%'
59874
- body.charCodeAt(j - 1) === 51 && // '3'
59875
- (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd'
60548
+ for (let i = 0; i < len; i++) {
60549
+ let code = body.charCodeAt(i);
59876
60550
 
59877
- if (idx >= 0) {
59878
- if (body.charCodeAt(idx) === 61 /* '=' */) {
59879
- pad++;
59880
- idx--;
59881
- } else if (tailIsPct3D(idx)) {
59882
- pad++;
59883
- idx -= 3;
59884
- }
60551
+ if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {
60552
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
60553
+ i += 2;
59885
60554
  }
59886
60555
 
59887
- if (pad === 1 && idx >= 0) {
59888
- if (body.charCodeAt(idx) === 61 /* '=' */) {
59889
- pad++;
59890
- } else if (tailIsPct3D(idx)) {
59891
- pad++;
59892
- }
60556
+ if (isBase64Whitespace(code)) {
60557
+ continue;
60558
+ }
60559
+
60560
+ if (code === 61 /* '=' */) {
60561
+ padding++;
60562
+ continue;
59893
60563
  }
59894
60564
 
59895
- const groups = Math.floor(effectiveLen / 4);
59896
- const bytes = groups * 3 - (pad || 0);
59897
- return bytes > 0 ? bytes : 0;
60565
+ if (!isBase64Char(code) || padding > 0) {
60566
+ invalid = true;
60567
+ continue;
60568
+ }
60569
+
60570
+ significant++;
60571
+ }
60572
+
60573
+ // Fetch rejects malformed forgiving-base64 input. Returning the raw-size
60574
+ // allocation bound keeps that invalid input from becoming a pre-check bypass.
60575
+ if (
60576
+ invalid ||
60577
+ padding > 2 ||
60578
+ (padding > 0 && (significant + padding) % 4 !== 0) ||
60579
+ significant % 4 === 1
60580
+ ) {
60581
+ return estimateBase64BufferAllocation(body);
60582
+ }
60583
+
60584
+ return base64Bytes(significant);
60585
+ };
60586
+
60587
+ const estimateDataURLBytes = (url, estimateBase64) => {
60588
+ if (!url || typeof url !== 'string') return 0;
60589
+ if (!url.startsWith('data:')) return 0;
60590
+
60591
+ const comma = url.indexOf(',');
60592
+ if (comma < 0) return 0;
60593
+
60594
+ const meta = url.slice(5, comma);
60595
+ const body = url.slice(comma + 1);
60596
+ const isBase64 = /;base64/i.test(meta);
60597
+
60598
+ if (isBase64) {
60599
+ return estimateBase64(body);
59898
60600
  }
59899
60601
 
59900
60602
  // Compute UTF-8 byte length directly from UTF-16 code units without allocating
@@ -59924,6 +60626,32 @@ function estimateDataURLDecodedBytes(url) {
59924
60626
  }
59925
60627
  }
59926
60628
  return bytes;
60629
+ };
60630
+
60631
+ /**
60632
+ * Estimate the percent-decoded payload size used by Fetch data: URLs.
60633
+ *
60634
+ * @param {string} url
60635
+ * @returns {number}
60636
+ */
60637
+ function estimateDataURLDecodedBytes(url) {
60638
+ // Fetch removes URL fragments before processing a data: URL.
60639
+ const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1;
60640
+
60641
+ return estimateDataURLBytes(
60642
+ fragmentIndex === -1 ? url : url.slice(0, fragmentIndex),
60643
+ estimatePercentDecodedBase64Bytes
60644
+ );
60645
+ }
60646
+
60647
+ /**
60648
+ * Estimate the Buffer backing allocation used by Node's raw base64 decoder.
60649
+ *
60650
+ * @param {string} url
60651
+ * @returns {number}
60652
+ */
60653
+ function estimateDataURLBufferAllocation(url) {
60654
+ return estimateDataURLBytes(url, estimateBase64BufferAllocation);
59927
60655
  }
59928
60656
 
59929
60657
 
@@ -59962,12 +60690,18 @@ function throwIfDepthExceeded(index) {
59962
60690
  * @returns An array of strings.
59963
60691
  */
59964
60692
  function parsePropPath(name) {
59965
- // foo[x][y][z]
59966
- // foo.x.y.z
59967
- // foo-x-y-z
59968
- // foo x y z
60693
+ // foo[x][y][z] -> ['foo', 'x', 'y', 'z']
60694
+ // foo.x.y.z -> ['foo', 'x', 'y', 'z']
60695
+ // A path is split on `.` and on `[...]` groups. A segment — whether written
60696
+ // in dot notation or captured inside brackets — may contain any character
60697
+ // except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept
60698
+ // literal instead of being split (#5402). `.`, `[` and `]` keep their existing
60699
+ // meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push.
60700
+ // Excluding `[` from the bracket group also makes the match fail fast at the
60701
+ // next `[`, so a malformed name cannot rescan to the end of the string from
60702
+ // every unmatched `[` — parsing stays linear in the length of the name.
59969
60703
  const path = [];
59970
- const pattern = /\w+|\[(\w*)]/g;
60704
+ const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
59971
60705
  let match;
59972
60706
 
59973
60707
  while ((match = pattern.exec(name)) !== null) {
@@ -60150,6 +60884,42 @@ __webpack_require__.r(__webpack_exports__);
60150
60884
  /* harmony export */ ]);
60151
60885
 
60152
60886
 
60887
+ /***/ },
60888
+
60889
+ /***/ 53744
60890
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
60891
+
60892
+ "use strict";
60893
+ __webpack_require__.r(__webpack_exports__);
60894
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
60895
+ /* harmony export */ "default": () => (/* binding */ normalizeURLForProtocolCheck)
60896
+ /* harmony export */ });
60897
+
60898
+
60899
+ const urlParserControlCharacters = /[\t\n\r]/g;
60900
+
60901
+ /**
60902
+ * Match WHATWG URL preprocessing before checking a URL's protocol.
60903
+ *
60904
+ * @param {string} url
60905
+ *
60906
+ * @returns {string}
60907
+ */
60908
+ function normalizeURLForProtocolCheck(url) {
60909
+ if (typeof url !== 'string') {
60910
+ return url;
60911
+ }
60912
+
60913
+ let start = 0;
60914
+
60915
+ while (start < url.length && url.charCodeAt(start) <= 0x20) {
60916
+ start++;
60917
+ }
60918
+
60919
+ return url.slice(start).replace(urlParserControlCharacters, '');
60920
+ }
60921
+
60922
+
60153
60923
  /***/ },
60154
60924
 
60155
60925
  /***/ 92008
@@ -60225,18 +60995,20 @@ const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toOb
60225
60995
  key = line.substring(0, i).trim().toLowerCase();
60226
60996
  val = line.substring(i + 1).trim();
60227
60997
 
60228
- if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
60998
+ const hasKey = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(parsed, key);
60999
+
61000
+ if (!key || (hasKey && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(ignoreDuplicateOf, key))) {
60229
61001
  return;
60230
61002
  }
60231
61003
 
60232
61004
  if (key === 'set-cookie') {
60233
- if (parsed[key]) {
61005
+ if (hasKey) {
60234
61006
  parsed[key].push(val);
60235
61007
  } else {
60236
61008
  parsed[key] = [val];
60237
61009
  }
60238
61010
  } else {
60239
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
61011
+ parsed[key] = hasKey ? parsed[key] + ', ' + val : val;
60240
61012
  }
60241
61013
  });
60242
61014
 
@@ -60285,12 +61057,12 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
60285
61057
  const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250);
60286
61058
 
60287
61059
  return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])((e) => {
60288
- if (!e || typeof e.loaded !== 'number') {
61060
+ if (!e || !_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isNumber(e.loaded)) {
60289
61061
  return;
60290
61062
  }
60291
61063
  const rawLoaded = e.loaded;
60292
61064
  const total = e.lengthComputable ? e.total : undefined;
60293
- const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
61065
+ const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
60294
61066
  const progressBytes = Math.max(0, loaded - bytesNotified);
60295
61067
  const rate = _speedometer(progressBytes);
60296
61068
 
@@ -60327,9 +61099,9 @@ const progressEventDecorator = (total, throttled) => {
60327
61099
  };
60328
61100
 
60329
61101
  const asyncDecorator =
60330
- (fn) =>
61102
+ (fn, scheduler = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap) =>
60331
61103
  (...args) =>
60332
- _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(() => fn(...args));
61104
+ scheduler(() => fn(...args));
60333
61105
 
60334
61106
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
60335
61107
  /* harmony export */ "asyncDecorator", 0, /* binding */ asyncDecorator,
@@ -60353,8 +61125,8 @@ __webpack_require__.r(__webpack_exports__);
60353
61125
  /* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(22921);
60354
61126
  /* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(58757);
60355
61127
  /* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76487);
60356
- /* harmony import */ var _buildURL_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(77760);
60357
-
61128
+ /* harmony import */ var _core_setFormDataHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(371);
61129
+ /* harmony import */ var _buildURL_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(77760);
60358
61130
 
60359
61131
 
60360
61132
 
@@ -60364,20 +61136,7 @@ __webpack_require__.r(__webpack_exports__);
60364
61136
 
60365
61137
 
60366
61138
 
60367
- const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
60368
-
60369
- function setFormDataHeaders(headers, formHeaders, policy) {
60370
- if (policy !== 'content-only') {
60371
- headers.set(formHeaders);
60372
- return;
60373
- }
60374
61139
 
60375
- Object.entries(formHeaders || {}).forEach(([key, val]) => {
60376
- if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
60377
- headers.set(key, val);
60378
- }
60379
- });
60380
- }
60381
61140
 
60382
61141
  /**
60383
61142
  * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
@@ -60411,7 +61170,7 @@ function resolveConfig(config) {
60411
61170
 
60412
61171
  newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(headers);
60413
61172
 
60414
- newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_8__["default"])(
61173
+ newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_9__["default"])(
60415
61174
  (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_5__["default"])(baseURL, url, allowAbsoluteUrls, newConfig),
60416
61175
  own('params'),
60417
61176
  own('paramsSerializer')
@@ -60433,15 +61192,17 @@ function resolveConfig(config) {
60433
61192
  }
60434
61193
 
60435
61194
  if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data)) {
61195
+ const getHeaders = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(data, 'getHeaders');
61196
+
60436
61197
  if (
60437
61198
  _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ||
60438
61199
  _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserWebWorkerEnv ||
60439
61200
  _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReactNative(data)
60440
61201
  ) {
60441
61202
  headers.setContentType(undefined); // browser/web worker/RN handles it
60442
- } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(data.getHeaders)) {
61203
+ } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(getHeaders)) {
60443
61204
  // Node.js FormData (like form-data package)
60444
- setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
61205
+ (0,_core_setFormDataHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"])(headers, getHeaders.call(data), own('formDataHeaderPolicy'));
60445
61206
  }
60446
61207
  }
60447
61208
 
@@ -60676,7 +61437,7 @@ __webpack_require__.r(__webpack_exports__);
60676
61437
  * Throttle decorator
60677
61438
  * @param {Function} fn
60678
61439
  * @param {Number} freq
60679
- * @return {Function}
61440
+ * @return {Array<Function>}
60680
61441
  */
60681
61442
  function throttle(fn, freq) {
60682
61443
  let timestamp = 0;
@@ -60711,8 +61472,9 @@ function throttle(fn, freq) {
60711
61472
  };
60712
61473
 
60713
61474
  const flush = () => lastArgs && invoke(lastArgs);
61475
+ const flushWith = (...args) => invoke(args);
60714
61476
 
60715
- return [throttled, flush];
61477
+ return [throttled, flush, flushWith];
60716
61478
  }
60717
61479
 
60718
61480
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (throttle);
@@ -60739,6 +61501,7 @@ __webpack_require__.r(__webpack_exports__);
60739
61501
  // temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
60740
61502
 
60741
61503
 
61504
+
60742
61505
  // Default nesting limit shared with the inverse transform (formDataToJSON) so
60743
61506
  // the FormData <-> JSON round-trip stays symmetric.
60744
61507
  const DEFAULT_FORM_DATA_MAX_DEPTH = 100;
@@ -60832,28 +61595,18 @@ function toFormData(obj, formData, options) {
60832
61595
  // eslint-disable-next-line no-param-reassign
60833
61596
  formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__["default"] || FormData)();
60834
61597
 
60835
- // eslint-disable-next-line no-param-reassign
60836
- options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(
60837
- options,
60838
- {
60839
- metaTokens: true,
60840
- dots: false,
60841
- indexes: false,
60842
- },
60843
- false,
60844
- function defined(option, source) {
60845
- // eslint-disable-next-line no-eq-null,eqeqeq
60846
- return !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(source[option]);
60847
- }
60848
- );
61598
+ const option = (name, fallback) => {
61599
+ const value = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(options, name);
61600
+ return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value) ? fallback : value;
61601
+ };
60849
61602
 
60850
- const metaTokens = options.metaTokens;
61603
+ const metaTokens = option('metaTokens', true);
60851
61604
  // eslint-disable-next-line no-use-before-define
60852
- const visitor = options.visitor || defaultVisitor;
60853
- const dots = options.dots;
60854
- const indexes = options.indexes;
60855
- const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
60856
- const maxDepth = options.maxDepth === undefined ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
61605
+ const visitor = option('visitor') || defaultVisitor;
61606
+ const dots = option('dots', false);
61607
+ const indexes = option('indexes', false);
61608
+ const _Blob = option('Blob') || (typeof Blob !== 'undefined' && Blob);
61609
+ const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH);
60857
61610
  const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData);
60858
61611
  const stack = [];
60859
61612
 
@@ -60880,10 +61633,13 @@ function toFormData(obj, formData, options) {
60880
61633
  if (useBlob && typeof _Blob === 'function') {
60881
61634
  return new _Blob([value]);
60882
61635
  }
60883
- if (typeof Buffer !== 'undefined') {
60884
- return Buffer.from(value);
61636
+ if (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__["default"] && _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__["default"].isBufferAvailable()) {
61637
+ return _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(value);
60885
61638
  }
60886
- throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('Blob is not supported. Use a Buffer instead.', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_NOT_SUPPORT);
61639
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
61640
+ 'Blob is not supported. Use a Buffer instead.',
61641
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_NOT_SUPPORT
61642
+ );
60887
61643
  }
60888
61644
 
60889
61645
  return value;
@@ -61478,12 +62234,65 @@ const hasOwnProperty = (
61478
62234
  hasOwnProperty.call(obj, prop)
61479
62235
  )(Object.prototype);
61480
62236
 
62237
+ const isUnsafeObjectKey = (prop) =>
62238
+ typeof prop === 'string' &&
62239
+ (prop === '__proto__' || prop === 'constructor' || prop === 'prototype');
62240
+
62241
+ /**
62242
+ * Determine whether an inherited object must be treated as a shared-prototype
62243
+ * boundary. Cross-realm Object.prototype objects cannot be distinguished
62244
+ * reliably from application-created null-prototype objects because their
62245
+ * properties are mutable, so all inherited terminal prototypes are excluded
62246
+ * as a fail-closed boundary. A null-prototype source still keeps its own
62247
+ * properties, as produced by mergeConfig and other safe materialization paths.
62248
+ *
62249
+ * @param {*} obj The object to inspect
62250
+ * @param {*} prototype The object's prototype
62251
+ * @param {boolean} source Whether obj is the original traversal source
62252
+ *
62253
+ * @returns {boolean} True when obj is a safe prototype traversal boundary
62254
+ */
62255
+ const isPrototypeBoundary = (obj, prototype, source) =>
62256
+ obj === Object.prototype || (!source && prototype === null);
62257
+
62258
+ /**
62259
+ * Determine whether an object can retain its identity through code paths that
62260
+ * add, replace, and remove config properties without bypassing unsafe-key
62261
+ * filtering. Immutable objects, unsafe-key-bearing objects, and objects with
62262
+ * accessor or restricted data properties must be materialized instead.
62263
+ *
62264
+ * @param {*} obj The object to inspect
62265
+ *
62266
+ * @returns {boolean} True when every own property is safe and fully mutable
62267
+ */
62268
+ const isSafeAndFullyMutable = (obj) => {
62269
+ if (!Object.isExtensible(obj)) {
62270
+ return false;
62271
+ }
62272
+
62273
+ const props = Object.getOwnPropertyNames(obj);
62274
+
62275
+ if (Object.getOwnPropertySymbols) {
62276
+ props.push(...Object.getOwnPropertySymbols(obj));
62277
+ }
62278
+
62279
+ return props.every((prop) => {
62280
+ if (isUnsafeObjectKey(prop)) {
62281
+ return false;
62282
+ }
62283
+
62284
+ const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
62285
+
62286
+ return !!descriptor && descriptor.configurable && descriptor.writable === true;
62287
+ });
62288
+ };
62289
+
61481
62290
  /**
61482
- * Walk the prototype chain (excluding the shared Object.prototype) looking for
61483
- * an own `prop`. This distinguishes genuine own/inherited members — including
61484
- * class accessors and template prototypes — from members injected via
61485
- * Object.prototype pollution (e.g. `Object.prototype.username = '...'`), which
61486
- * live on Object.prototype itself and are therefore never matched.
62291
+ * Walk the prototype chain (excluding the source realm's Object.prototype)
62292
+ * looking for an own `prop`. This distinguishes genuine own/inherited members
62293
+ * — including class accessors and template prototypes — from members injected
62294
+ * via Object.prototype pollution (e.g. `Object.prototype.username = '...'`),
62295
+ * which live on Object.prototype itself and are therefore never matched.
61487
62296
  *
61488
62297
  * @param {*} thing The value whose chain to inspect
61489
62298
  * @param {string|symbol} prop The property key to look for
@@ -61494,16 +62303,22 @@ const hasOwnInPrototypeChain = (thing, prop) => {
61494
62303
  let obj = thing;
61495
62304
  const seen = [];
61496
62305
 
61497
- while (obj != null && obj !== Object.prototype) {
62306
+ while (obj != null) {
61498
62307
  if (seen.indexOf(obj) !== -1) {
61499
62308
  return false;
61500
62309
  }
61501
62310
  seen.push(obj);
61502
62311
 
62312
+ const prototype = getPrototypeOf(obj);
62313
+
62314
+ if (isPrototypeBoundary(obj, prototype, obj === thing)) {
62315
+ return false;
62316
+ }
62317
+
61503
62318
  if (hasOwnProperty(obj, prop)) {
61504
62319
  return true;
61505
62320
  }
61506
- obj = getPrototypeOf(obj);
62321
+ obj = prototype;
61507
62322
  }
61508
62323
  return false;
61509
62324
  };
@@ -61522,6 +62337,69 @@ const hasOwnInPrototypeChain = (thing, prop) => {
61522
62337
  const getSafeProp = (obj, prop) =>
61523
62338
  obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;
61524
62339
 
62340
+ /**
62341
+ * Flatten an object and its application-defined prototype chain into a
62342
+ * null-prototype object. Members inherited only from the source realm's
62343
+ * Object.prototype are deliberately excluded, while class/template members
62344
+ * below that boundary are preserved.
62345
+ *
62346
+ * @param {*} thing The value to flatten
62347
+ *
62348
+ * @returns {*} A null-prototype copy, or the original value when it is already
62349
+ * structurally safe or is not an object
62350
+ */
62351
+ const toSafeFlatObject = (thing) => {
62352
+ if (thing == null || (typeof thing !== 'object' && typeof thing !== 'function')) {
62353
+ return thing;
62354
+ }
62355
+
62356
+ const sourcePrototype = getPrototypeOf(thing);
62357
+
62358
+ if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {
62359
+ return thing;
62360
+ }
62361
+
62362
+ const result = Object.create(null);
62363
+ const merged = Object.create(null);
62364
+ const seen = [];
62365
+ let current = thing;
62366
+
62367
+ while (current != null) {
62368
+ if (seen.indexOf(current) !== -1) {
62369
+ break;
62370
+ }
62371
+
62372
+ seen.push(current);
62373
+
62374
+ const prototype = current === thing ? sourcePrototype : getPrototypeOf(current);
62375
+
62376
+ if (isPrototypeBoundary(current, prototype, current === thing)) {
62377
+ break;
62378
+ }
62379
+
62380
+ const props = Object.getOwnPropertyNames(current);
62381
+
62382
+ if (Object.getOwnPropertySymbols) {
62383
+ props.push(...Object.getOwnPropertySymbols(current));
62384
+ }
62385
+
62386
+ for (const prop of props) {
62387
+ if (isUnsafeObjectKey(prop)) {
62388
+ continue;
62389
+ }
62390
+
62391
+ if (!hasOwnProperty(merged, prop)) {
62392
+ result[prop] = thing[prop];
62393
+ merged[prop] = true;
62394
+ }
62395
+ }
62396
+
62397
+ current = prototype;
62398
+ }
62399
+
62400
+ return result;
62401
+ };
62402
+
61525
62403
  const kindOf = ((cache) => (thing) => {
61526
62404
  const str = toString.call(thing);
61527
62405
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -61653,12 +62531,10 @@ const isPlainObject = (val) => {
61653
62531
 
61654
62532
  const prototype = getPrototypeOf(val);
61655
62533
  return (
61656
- (prototype === null ||
61657
- prototype === Object.prototype ||
61658
- getPrototypeOf(prototype) === null) &&
61659
- // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
61660
- // Symbol.iterator as evidence the value is a tagged/iterable type rather
61661
- // than a plain object, while ignoring keys injected onto Object.prototype.
62534
+ (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&
62535
+ // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
62536
+ // evidence the value is tagged/iterable, while ignoring members reachable
62537
+ // only through shared or terminal prototype boundaries.
61662
62538
  !hasOwnInPrototypeChain(val, toStringTag) &&
61663
62539
  !hasOwnInPrototypeChain(val, iterator)
61664
62540
  );
@@ -61745,6 +62621,7 @@ const isBlob = kindOfTest('Blob');
61745
62621
  * @returns {boolean} True if value is a FileList, otherwise false
61746
62622
  */
61747
62623
  const isFileList = kindOfTest('FileList');
62624
+ const isSet = kindOfTest('Set');
61748
62625
 
61749
62626
  /**
61750
62627
  * Determine if a value is a Stream
@@ -62310,12 +63187,23 @@ const toJSONObject = (obj) => {
62310
63187
  if (!('toJSON' in source)) {
62311
63188
  // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).
62312
63189
  visited.add(source);
62313
- const target = isArray(source) ? [] : {};
62314
63190
 
62315
- forEach(source, (value, key) => {
62316
- const reducedValue = visit(value);
62317
- !isUndefined(reducedValue) && (target[key] = reducedValue);
62318
- });
63191
+ let target;
63192
+
63193
+ if (isSet(source)) {
63194
+ target = [];
63195
+ for (const value of source) {
63196
+ const reducedValue = visit(value);
63197
+ !isUndefined(reducedValue) && target.push(reducedValue);
63198
+ }
63199
+ } else {
63200
+ target = isArray(source) ? [] : {};
63201
+
63202
+ forEach(source, (value, key) => {
63203
+ const reducedValue = visit(value);
63204
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
63205
+ });
63206
+ }
62319
63207
 
62320
63208
  visited.delete(source);
62321
63209
 
@@ -62460,6 +63348,7 @@ const isSafeIterable = (thing) =>
62460
63348
  hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
62461
63349
  hasOwnInPrototypeChain,
62462
63350
  getSafeProp,
63351
+ toSafeFlatObject,
62463
63352
  reduceDescriptors,
62464
63353
  freezeMethods,
62465
63354
  toObjectSet,
@@ -84962,17 +85851,20 @@ let __webpack_exports__ = {};
84962
85851
  "use strict";
84963
85852
  __webpack_require__.r(__webpack_exports__);
84964
85853
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
84965
- /* harmony export */ DereferenceError: () => (/* reexport safe */ _errors_DereferenceError_ts__WEBPACK_IMPORTED_MODULE_2__["default"]),
85854
+ /* harmony export */ DereferenceError: () => (/* reexport safe */ _errors_DereferenceError_ts__WEBPACK_IMPORTED_MODULE_3__["default"]),
84966
85855
  /* harmony export */ defaultDereferenceArazzoOptions: () => (/* reexport safe */ _dereference_arazzo_ts__WEBPACK_IMPORTED_MODULE_0__.defaultOptions),
84967
85856
  /* harmony export */ defaultDereferenceOpenAPIOptions: () => (/* reexport safe */ _dereference_openapi_ts__WEBPACK_IMPORTED_MODULE_1__.defaultOptions),
84968
85857
  /* harmony export */ dereferenceArazzo: () => (/* reexport safe */ _dereference_arazzo_ts__WEBPACK_IMPORTED_MODULE_0__.dereference),
84969
85858
  /* harmony export */ dereferenceArazzoElement: () => (/* reexport safe */ _dereference_arazzo_ts__WEBPACK_IMPORTED_MODULE_0__.dereferenceElement),
84970
85859
  /* harmony export */ dereferenceOpenAPI: () => (/* reexport safe */ _dereference_openapi_ts__WEBPACK_IMPORTED_MODULE_1__.dereference),
84971
- /* harmony export */ dereferenceOpenAPIElement: () => (/* reexport safe */ _dereference_openapi_ts__WEBPACK_IMPORTED_MODULE_1__.dereferenceElement)
85860
+ /* harmony export */ dereferenceOpenAPIElement: () => (/* reexport safe */ _dereference_openapi_ts__WEBPACK_IMPORTED_MODULE_1__.dereferenceElement),
85861
+ /* harmony export */ dereferenceSourceDescriptionPathItems: () => (/* reexport safe */ _dereference_path_items_ts__WEBPACK_IMPORTED_MODULE_2__.dereferenceSourceDescriptionPathItems)
84972
85862
  /* harmony export */ });
84973
85863
  /* harmony import */ var _dereference_arazzo_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30446);
84974
85864
  /* harmony import */ var _dereference_openapi_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(46897);
84975
- /* harmony import */ var _errors_DereferenceError_ts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(456);
85865
+ /* harmony import */ var _dereference_path_items_ts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28779);
85866
+ /* harmony import */ var _errors_DereferenceError_ts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(456);
85867
+
84976
85868
 
84977
85869
 
84978
85870