@jentic/arazzo-parser 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.
@@ -564,6 +564,175 @@ class MemoryResolver extends _speclynx_apidom_reference_configuration_empty__WEB
564
564
  /* harmony export */ ]);
565
565
 
566
566
 
567
+ /***/ },
568
+
569
+ /***/ 94953
570
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
571
+
572
+ "use strict";
573
+ __webpack_require__.r(__webpack_exports__);
574
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
575
+ /* harmony export */ attachStepOperations: () => (/* binding */ attachStepOperations),
576
+ /* harmony export */ findStepOperation: () => (/* binding */ findStepOperation)
577
+ /* harmony export */ });
578
+ /* harmony import */ var _speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7456);
579
+ /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94851);
580
+ /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(61198);
581
+ /* harmony import */ var _speclynx_apidom_ns_arazzo_1__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75728);
582
+ /* harmony import */ var _speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29716);
583
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(57350);
584
+ /* harmony import */ var _speclynx_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25421);
585
+
586
+
587
+
588
+
589
+
590
+
591
+
592
+ /**
593
+ * HTTP method and path of the OpenAPI operation targeted by an Arazzo step.
594
+ * @public
595
+ */
596
+
597
+ /**
598
+ * Minimal shape of a plain Arazzo Document needed to attach step operations.
599
+ * @public
600
+ */
601
+
602
+ /**
603
+ * A plain Arazzo Document whose steps may carry the `_operation` they target. Every other field
604
+ * of the document type, and of its workflows and steps, is preserved as is.
605
+ * @public
606
+ */
607
+
608
+ // OpenAPI 3.1 path items extend the OpenAPI 3.0 ones, so isPathItem3Element covers both
609
+ const pathItemOperations = pathItem => ({
610
+ get: pathItem.getField,
611
+ put: pathItem.put,
612
+ post: pathItem.post,
613
+ delete: pathItem.deleteField,
614
+ options: pathItem.options,
615
+ head: pathItem.head,
616
+ patch: pathItem.patch,
617
+ trace: (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_5__.isPathItemElement)(pathItem) ? pathItem.trace : undefined
618
+ });
619
+
620
+ // resolves a (possibly relative) URI against the document it appears in, as far as possible
621
+ const resolveURI = (uri, baseURI) => {
622
+ try {
623
+ return new URL(uri, baseURI).href;
624
+ } catch {
625
+ return uri;
626
+ }
627
+ };
628
+
629
+ // whether a literal URL targets the document of the source description, as declared or as retrieved
630
+ const targetsSource = (sourceDescription, documentURI, baseURI) => {
631
+ const target = resolveURI(documentURI, baseURI);
632
+ const url = sourceDescription.url?.toValue();
633
+ const retrievalURI = sourceDescription.meta.get('parseResult')?.meta.get('retrievalURI');
634
+ return [url, retrievalURI].some(uri => uri !== undefined && (uri === documentURI || resolveURI(uri, baseURI) === target));
635
+ };
636
+ const pointerTokens = pointer => pointer.split('/').slice(1).map(token => token.replace(/~1/g, '/').replace(/~0/g, '~'));
637
+
638
+ // resolves a JSON Pointer against a source document, so it can target operations of both
639
+ // `paths` entries and reusable Path Items (`#/components/pathItems/...`)
640
+ const operationAtPointer = (api, pointer) => {
641
+ const tokens = pointerTokens(pointer);
642
+ const withPath = method => ({
643
+ method: method.toUpperCase(),
644
+ ...(tokens[0] === 'paths' && {
645
+ path: tokens[1]
646
+ })
647
+ });
648
+ const evaluateAt = parts => {
649
+ try {
650
+ return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__.evaluate)(api, (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_2__.compile)(parts));
651
+ } catch {
652
+ return undefined;
653
+ }
654
+ };
655
+ const target = evaluateAt(tokens);
656
+ // a pointer to a path item (no method) is unambiguous only when it has a single operation
657
+ if ((0,_speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_4__.isPathItemElement)(target) || (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_5__.isPathItemElement)(target)) {
658
+ const defined = Object.entries(pathItemOperations(target)).filter(([, operation]) => operation);
659
+ return defined.length === 1 ? withPath(defined[0][0]) : undefined;
660
+ }
661
+ const method = tokens[tokens.length - 1];
662
+ const parent = evaluateAt(tokens.slice(0, -1));
663
+ if (!target || !((0,_speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_4__.isPathItemElement)(parent) || (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_5__.isPathItemElement)(parent))) return undefined;
664
+ return Object.keys(pathItemOperations(parent)).includes(method) ? withPath(method) : undefined;
665
+ };
666
+
667
+ /**
668
+ * Finds the OpenAPI operation targeted by an Arazzo step in the `openapi` source descriptions
669
+ * parsed along with the Arazzo Document (see the `sourceDescriptions` parser option).
670
+ * @param parseResult - The result of parsing an Arazzo Document with source descriptions
671
+ * @param step - The step's `operationId` or `operationPath`
672
+ * @returns The operation's HTTP method and path, or undefined when it can't be located
673
+ * @public
674
+ */
675
+ function findStepOperation(parseResult, {
676
+ operationId,
677
+ operationPath
678
+ }) {
679
+ const reference = operationPath ?? operationId;
680
+ if (!reference || !(0,_speclynx_apidom_ns_arazzo_1__WEBPACK_IMPORTED_MODULE_3__.isArazzoSpecification1Element)(parseResult.api)) return undefined;
681
+ // `$sourceDescriptions.{name}.{operationId}` and `{$sourceDescriptions.{name}.url}#{pointer}` name their source
682
+ const [, sourceName, qualifiedId] = /^\{?\$sourceDescriptions\.([^.]+)\.(.+)$/.exec(reference) ?? [];
683
+ const pointer = operationPath && _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_2__.URIFragmentIdentifier.fromURIReference(operationPath);
684
+ // a literal URL (no `$sourceDescriptions` expression) names its source by the document it targets
685
+ const documentURI = operationPath && !sourceName ? operationPath.split('#')[0].replace(/^\{|\}$/g, '') : '';
686
+ const baseURI = parseResult.meta.get('retrievalURI');
687
+ let found;
688
+ parseResult.api.sourceDescriptions?.forEach(sourceDescription => {
689
+ if (found || !(0,_speclynx_apidom_ns_arazzo_1__WEBPACK_IMPORTED_MODULE_3__.isSourceDescriptionElement)(sourceDescription)) return;
690
+ if (sourceDescription.type && sourceDescription.type.toValue() !== 'openapi') return;
691
+ if (sourceName && sourceDescription.name?.toValue() !== sourceName) return;
692
+ // the source must be the one the URL targets, and it is not searched when it failed to load
693
+ if (documentURI && !targetsSource(sourceDescription, documentURI, baseURI)) return;
694
+ const api = sourceDescription.meta.get('parseResult')?.api;
695
+ if (!(0,_speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_4__.isSwaggerElement)(api) && !(0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_5__.isOpenApi3_0Element)(api) && !(0,_speclynx_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_6__.isOpenApi3_1Element)(api)) return;
696
+ if (pointer) {
697
+ found = operationAtPointer(api, pointer);
698
+ return;
699
+ }
700
+ api.paths?.forEach((pathItem, key) => {
701
+ if (found || !(0,_speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_4__.isPathItemElement)(pathItem) && !(0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_5__.isPathItemElement)(pathItem)) return;
702
+ const path = String(key.toValue());
703
+ for (const [method, operation] of Object.entries(pathItemOperations(pathItem))) {
704
+ if (operation?.operationId?.toValue() === (qualifiedId ?? operationId)) {
705
+ found = {
706
+ method: method.toUpperCase(),
707
+ path
708
+ };
709
+ return;
710
+ }
711
+ }
712
+ });
713
+ });
714
+ return found;
715
+ }
716
+
717
+ /**
718
+ * Converts an Arazzo Document element to a plain object and sets `_operation` on every step that
719
+ * targets an operation of the `openapi` source descriptions parsed along with it.
720
+ * @param element - The Arazzo Document element, e.g. the (dereferenced) result of the parse result
721
+ * @param parseResult - The result of parsing the Arazzo Document with source descriptions
722
+ * @returns The plain Arazzo Document, typed with `_operation` on its steps and set on the resolved ones
723
+ * @public
724
+ */
725
+ function attachStepOperations(element, parseResult) {
726
+ const doc = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(element);
727
+ doc?.workflows?.forEach(workflow => workflow.steps?.forEach(step => {
728
+ const operation = findStepOperation(parseResult, step);
729
+ if (operation) Object.assign(step, {
730
+ _operation: operation
731
+ });
732
+ }));
733
+ return doc;
734
+ }
735
+
567
736
  /***/ },
568
737
 
569
738
  /***/ 6841
@@ -5253,6 +5422,137 @@ class UnsupportedOperationError extends _ApiDOMError_mjs__WEBPACK_IMPORTED_MODUL
5253
5422
  /* harmony export */ ]);
5254
5423
 
5255
5424
 
5425
+ /***/ },
5426
+
5427
+ /***/ 94851
5428
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
5429
+
5430
+ "use strict";
5431
+ __webpack_require__.r(__webpack_exports__);
5432
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5433
+ /* harmony export */ ASTTranslator: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.ASTTranslator),
5434
+ /* harmony export */ CSTTranslator: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.CSTTranslator),
5435
+ /* harmony export */ Grammar: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.Grammar),
5436
+ /* harmony export */ JSONPointerCompileError: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.JSONPointerCompileError),
5437
+ /* harmony export */ JSONPointerError: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.JSONPointerError),
5438
+ /* harmony export */ JSONPointerEvaluateError: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.JSONPointerEvaluateError),
5439
+ /* harmony export */ JSONPointerIndexError: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.JSONPointerIndexError),
5440
+ /* harmony export */ JSONPointerKeyError: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.JSONPointerKeyError),
5441
+ /* harmony export */ JSONPointerParseError: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.JSONPointerParseError),
5442
+ /* harmony export */ JSONPointerTypeError: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.JSONPointerTypeError),
5443
+ /* harmony export */ JSONString: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.JSONString),
5444
+ /* harmony export */ URIFragmentIdentifier: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.URIFragmentIdentifier),
5445
+ /* harmony export */ XMLTranslator: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.XMLTranslator),
5446
+ /* harmony export */ compile: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.compile),
5447
+ /* harmony export */ escape: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.escape),
5448
+ /* harmony export */ parse: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.parse),
5449
+ /* harmony export */ testArrayDash: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.testArrayDash),
5450
+ /* harmony export */ testArrayIndex: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.testArrayIndex),
5451
+ /* harmony export */ testArrayLocation: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.testArrayLocation),
5452
+ /* harmony export */ testJSONPointer: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.testJSONPointer),
5453
+ /* harmony export */ testReferenceToken: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.testReferenceToken),
5454
+ /* harmony export */ unescape: () => (/* reexport safe */ _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.unescape)
5455
+ /* harmony export */ });
5456
+ /* empty/unused harmony star reexport */
5457
+ /* harmony import */ var _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61198);
5458
+ /* harmony import */ var _realm_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27554);
5459
+
5460
+
5461
+
5462
+
5463
+ const realm = new _realm_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]();
5464
+
5465
+ /**
5466
+ * @public
5467
+ */
5468
+
5469
+ /**
5470
+ * @public
5471
+ */
5472
+ const evaluate = (value, jsonPointer, options = {}) => {
5473
+ return (0,_swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_0__.evaluate)(value, jsonPointer, {
5474
+ ...options,
5475
+ realm
5476
+ });
5477
+ };
5478
+
5479
+ /**
5480
+ * Re-export all types
5481
+ */
5482
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
5483
+ /* harmony export */ "evaluate", 0, /* binding */ evaluate
5484
+ /* harmony export */ ]);
5485
+
5486
+
5487
+ /***/ },
5488
+
5489
+ /***/ 27554
5490
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
5491
+
5492
+ "use strict";
5493
+ __webpack_require__.r(__webpack_exports__);
5494
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62823);
5495
+ /* harmony import */ var _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61198);
5496
+
5497
+
5498
+
5499
+ /**
5500
+ * @public
5501
+ */
5502
+ class ApiDOMEvaluationRealm extends _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_1__.EvaluationRealm {
5503
+ name = 'apidom';
5504
+ isArray(node) {
5505
+ return (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(node);
5506
+ }
5507
+ isObject(node) {
5508
+ return (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isObjectElement)(node);
5509
+ }
5510
+ sizeOf(node) {
5511
+ if (this.isArray(node) || this.isObject(node)) {
5512
+ return node.length;
5513
+ }
5514
+ return 0;
5515
+ }
5516
+ has(node, referenceToken) {
5517
+ if (this.isArray(node)) {
5518
+ const index = Number(referenceToken);
5519
+ const indexUint32 = index >>> 0;
5520
+ if (index !== indexUint32) {
5521
+ throw new _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_1__.JSONPointerIndexError(`Invalid array index "${referenceToken}": index must be an unsinged 32-bit integer`, {
5522
+ referenceToken,
5523
+ currentValue: node,
5524
+ realm: this.name
5525
+ });
5526
+ }
5527
+ return indexUint32 < this.sizeOf(node);
5528
+ }
5529
+ if (this.isObject(node)) {
5530
+ const keys = node.keys();
5531
+ const uniqueKeys = new Set(keys);
5532
+ if (keys.length !== uniqueKeys.size) {
5533
+ throw new _swaggerexpert_json_pointer__WEBPACK_IMPORTED_MODULE_1__.JSONPointerKeyError(`Object key "${referenceToken}" is not unique — JSON Pointer requires unique member names`, {
5534
+ referenceToken,
5535
+ currentValue: node,
5536
+ realm: this.name
5537
+ });
5538
+ }
5539
+ return node.hasKey(referenceToken);
5540
+ }
5541
+ return false;
5542
+ }
5543
+ evaluate(node, referenceToken) {
5544
+ if (this.isArray(node)) {
5545
+ return node.get(Number(referenceToken));
5546
+ }
5547
+ return node.get(referenceToken);
5548
+ }
5549
+ }
5550
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ApiDOMEvaluationRealm);
5551
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
5552
+ /* harmony export */ "default", 0, /* export default binding */ __WEBPACK_DEFAULT_EXPORT__
5553
+ /* harmony export */ ]);
5554
+
5555
+
5256
5556
  /***/ },
5257
5557
 
5258
5558
  /***/ 36649
@@ -49727,6 +50027,18 @@ __webpack_require__.r(__webpack_exports__);
49727
50027
 
49728
50028
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
49729
50029
 
50030
+ const DEFAULT_REQUEST_OPTIONS = {
50031
+ cache: 'default',
50032
+ redirect: 'follow',
50033
+ referrer: 'about:client',
50034
+ referrerPolicy: '',
50035
+ mode: 'cors',
50036
+ integrity: '',
50037
+ keepalive: false,
50038
+ priority: 'auto',
50039
+ window: null,
50040
+ };
50041
+
49730
50042
  const { isFunction } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];
49731
50043
 
49732
50044
  /**
@@ -49777,9 +50089,7 @@ const maybeWithAuthCredentials = (url) => {
49777
50089
 
49778
50090
  const factory = (env) => {
49779
50091
  const globalObject =
49780
- _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global !== undefined && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global !== null
49781
- ? _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global
49782
- : globalThis;
50092
+ _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;
49783
50093
  const { ReadableStream, TextEncoder } = globalObject;
49784
50094
 
49785
50095
  env = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call(
@@ -49918,6 +50228,7 @@ const factory = (env) => {
49918
50228
  fetchOptions,
49919
50229
  maxContentLength,
49920
50230
  maxBodyLength,
50231
+ maxRedirects,
49921
50232
  } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__["default"])(config);
49922
50233
 
49923
50234
  const hasMaxContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(maxContentLength) && maxContentLength > -1;
@@ -49968,7 +50279,7 @@ const factory = (env) => {
49968
50279
  const password = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(configAuth, 'password') || '';
49969
50280
  auth = {
49970
50281
  username,
49971
- password
50282
+ password,
49972
50283
  };
49973
50284
  }
49974
50285
 
@@ -49980,7 +50291,7 @@ const factory = (env) => {
49980
50291
  const urlPassword = decodeURIComponentSafe(parsedURL.password);
49981
50292
  auth = {
49982
50293
  username: urlUsername,
49983
- password: urlPassword
50294
+ password: urlPassword,
49984
50295
  };
49985
50296
  }
49986
50297
 
@@ -50054,7 +50365,9 @@ const factory = (env) => {
50054
50365
  (onUploadProgress || mustEnforceStreamBody)
50055
50366
  ) {
50056
50367
  requestContentLength =
50057
- requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
50368
+ requestContentLength == null
50369
+ ? await resolveBodyLength(headers, data)
50370
+ : requestContentLength;
50058
50371
 
50059
50372
  // A declared length of 0 is only trusted to skip the wrap when we are
50060
50373
  // not enforcing a stream limit (which must not rely on that header).
@@ -50067,7 +50380,10 @@ const factory = (env) => {
50067
50380
 
50068
50381
  let contentTypeHeader;
50069
50382
 
50070
- if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
50383
+ if (
50384
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) &&
50385
+ (contentTypeHeader = _request.headers.get('content-type'))
50386
+ ) {
50071
50387
  headers.setContentType(contentTypeHeader);
50072
50388
  }
50073
50389
 
@@ -50130,20 +50446,57 @@ const factory = (env) => {
50130
50446
  // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
50131
50447
  headers.set('User-Agent', 'axios/' + _env_data_js__WEBPACK_IMPORTED_MODULE_10__.VERSION, false);
50132
50448
 
50133
- const resolvedOptions = {
50134
- ...fetchOptions,
50449
+ const safeFetchOptions =
50450
+ fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);
50451
+
50452
+ if (safeFetchOptions) {
50453
+ // These options are owned by Axios and are already reflected in the
50454
+ // resolved Request passed to fetch.
50455
+ delete safeFetchOptions.body;
50456
+ delete safeFetchOptions.headers;
50457
+ delete safeFetchOptions.method;
50458
+ delete safeFetchOptions.signal;
50459
+ delete safeFetchOptions.duplex;
50460
+ delete safeFetchOptions.credentials;
50461
+ }
50462
+
50463
+ const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {
50135
50464
  signal: composedSignal,
50136
50465
  method: method.toUpperCase(),
50137
50466
  headers: (0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__.toByteStringHeaderObject)(headers.normalize()),
50138
50467
  body: data,
50139
50468
  duplex: 'half',
50140
50469
  credentials: isCredentialsSupported ? withCredentials : undefined,
50141
- };
50470
+ });
50471
+
50472
+ if (isRequestSupported) {
50473
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {
50474
+ if (resolvedOptions[key] === undefined) {
50475
+ resolvedOptions[key] = value;
50476
+ }
50477
+ });
50478
+
50479
+ if (resolvedOptions.signal === undefined) {
50480
+ resolvedOptions.signal = null;
50481
+ }
50482
+
50483
+ if (resolvedOptions.body === undefined) {
50484
+ resolvedOptions.body = null;
50485
+ }
50486
+ }
50487
+
50488
+ if (maxRedirects === 0) {
50489
+ resolvedOptions.redirect = 'manual';
50490
+
50491
+ if (safeFetchOptions) {
50492
+ safeFetchOptions.redirect = 'manual';
50493
+ }
50494
+ }
50142
50495
 
50143
50496
  request = isRequestSupported && new Request(url, resolvedOptions);
50144
50497
 
50145
50498
  let response = await (isRequestSupported
50146
- ? _fetch(request, fetchOptions)
50499
+ ? _fetch(request, safeFetchOptions)
50147
50500
  : _fetch(url, resolvedOptions));
50148
50501
 
50149
50502
  const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(response.headers);
@@ -50370,12 +50723,14 @@ __webpack_require__.r(__webpack_exports__);
50370
50723
  /* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69006);
50371
50724
  /* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19011);
50372
50725
  /* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95273);
50373
- /* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43406);
50374
- /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(79455);
50375
- /* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76487);
50376
- /* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(79194);
50377
- /* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(28451);
50378
- /* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(51306);
50726
+ /* harmony import */ var _helpers_normalizeURLForProtocolCheck_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53744);
50727
+ /* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(43406);
50728
+ /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(79455);
50729
+ /* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(76487);
50730
+ /* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(79194);
50731
+ /* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28451);
50732
+ /* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(51306);
50733
+
50379
50734
 
50380
50735
 
50381
50736
 
@@ -50393,13 +50748,13 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
50393
50748
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported &&
50394
50749
  function (config) {
50395
50750
  return new Promise(function dispatchXhrRequest(resolve, reject) {
50396
- const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_9__["default"])(config);
50751
+ const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_10__["default"])(config);
50397
50752
  let requestData = _config.data;
50398
- const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(_config.headers).normalize();
50753
+ const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(_config.headers).normalize();
50399
50754
  let { responseType, onUploadProgress, onDownloadProgress } = _config;
50400
50755
  let onCanceled;
50401
50756
  let uploadThrottled, downloadThrottled;
50402
- let flushUpload, flushDownload;
50757
+ let flushUpload, flushDownload, flushDownloadWithEvent;
50403
50758
 
50404
50759
  function done() {
50405
50760
  flushUpload && flushUpload(); // flush events
@@ -50417,12 +50772,57 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
50417
50772
  // Set the request timeout in MS
50418
50773
  request.timeout = _config.timeout;
50419
50774
 
50420
- function onloadend() {
50775
+ function onloadend(event) {
50421
50776
  if (!request) {
50422
50777
  return;
50423
50778
  }
50779
+
50780
+ // Status 0 means no response was received, which onerror and onabort normally
50781
+ // reject before this runs. Firefox 152 fires only readystatechange and loadend for
50782
+ // navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389),
50783
+ // leaving settle() to resolve them as an empty success. ECONNABORTED is the error
50784
+ // onabort raised on Firefox 151. Reads over file:, which some environments report as
50785
+ // status 0 on success, are excluded by the request URL's scheme after browser-style
50786
+ // preprocessing, by the page origin's scheme for relative URLs (which inherit it), or
50787
+ // by responseURL where implemented.
50788
+ if (
50789
+ request.status === 0 &&
50790
+ ((0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_6__["default"])((0,_helpers_normalizeURLForProtocolCheck_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_config.url)) ||
50791
+ (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_6__["default"])(_platform_index_js__WEBPACK_IMPORTED_MODULE_7__["default"].origin)) !== 'file' &&
50792
+ !(request.responseURL && request.responseURL.startsWith('file:'))
50793
+ ) {
50794
+ reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request));
50795
+ done();
50796
+
50797
+ // Clean up request
50798
+ request = null;
50799
+ return;
50800
+ }
50801
+
50802
+ // When loadend is still dispatching, flushing with it gives progress
50803
+ // listeners a final delivery whose event has a live target. The legacy
50804
+ // ready-state fallback has no event, so replay its pending progress.
50805
+ // A throwing listener must not block settlement; rethrow asynchronously,
50806
+ // matching how listener errors surface on the throttle timer path.
50807
+ try {
50808
+ if (event) {
50809
+ flushDownloadWithEvent && flushDownloadWithEvent(event);
50810
+ } else {
50811
+ flushDownload && flushDownload();
50812
+ }
50813
+ } catch (err) {
50814
+ setTimeout(() => {
50815
+ throw err;
50816
+ });
50817
+ }
50818
+
50819
+ // A final progress callback can cancel the request synchronously.
50820
+ if (!request) {
50821
+ return;
50822
+ }
50823
+
50424
50824
  // Prepare the response
50425
- const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(
50825
+ const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].from(
50426
50826
  'getAllResponseHeaders' in request && request.getAllResponseHeaders()
50427
50827
  );
50428
50828
  const responseData =
@@ -50535,7 +50935,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
50535
50935
 
50536
50936
  // Add headers to the request
50537
50937
  if ('setRequestHeader' in request) {
50538
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach((0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_10__.toByteStringHeaderObject)(requestHeaders), function setRequestHeader(val, key) {
50938
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach((0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__.toByteStringHeaderObject)(requestHeaders), function setRequestHeader(val, key) {
50539
50939
  request.setRequestHeader(key, val);
50540
50940
  });
50541
50941
  }
@@ -50552,13 +50952,16 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
50552
50952
 
50553
50953
  // Handle progress if needed
50554
50954
  if (onDownloadProgress) {
50555
- [downloadThrottled, flushDownload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onDownloadProgress, true);
50955
+ [downloadThrottled, flushDownload, flushDownloadWithEvent] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_9__.progressEventReducer)(
50956
+ onDownloadProgress,
50957
+ true
50958
+ );
50556
50959
  request.addEventListener('progress', downloadThrottled);
50557
50960
  }
50558
50961
 
50559
50962
  // Not all browsers support upload events
50560
50963
  if (onUploadProgress && request.upload) {
50561
- [uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onUploadProgress);
50964
+ [uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_9__.progressEventReducer)(onUploadProgress);
50562
50965
 
50563
50966
  request.upload.addEventListener('progress', uploadThrottled);
50564
50967
 
@@ -50586,9 +50989,9 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
50586
50989
  }
50587
50990
  }
50588
50991
 
50589
- const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_config.url);
50992
+ const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_6__["default"])(_config.url);
50590
50993
 
50591
- if (protocol && !_platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].protocols.includes(protocol)) {
50994
+ if (protocol && !_platform_index_js__WEBPACK_IMPORTED_MODULE_7__["default"].protocols.includes(protocol)) {
50592
50995
  reject(
50593
50996
  new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
50594
50997
  'Unsupported protocol ' + protocol + ':',
@@ -50944,9 +51347,11 @@ __webpack_require__.r(__webpack_exports__);
50944
51347
  /* harmony import */ var _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97844);
50945
51348
  /* harmony import */ var _mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(58757);
50946
51349
  /* harmony import */ var _buildFullPath_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(22921);
50947
- /* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(62215);
50948
- /* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76487);
50949
- /* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(69006);
51350
+ /* harmony import */ var _methodList_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8726);
51351
+ /* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(62215);
51352
+ /* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(76487);
51353
+ /* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(69006);
51354
+
50950
51355
 
50951
51356
 
50952
51357
 
@@ -50959,7 +51364,7 @@ __webpack_require__.r(__webpack_exports__);
50959
51364
 
50960
51365
 
50961
51366
 
50962
- const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].validators;
51367
+ const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_7__["default"].validators;
50963
51368
 
50964
51369
  /**
50965
51370
  * Create a new instance of Axios
@@ -50990,21 +51395,21 @@ class Axios {
50990
51395
  return await this._request(configOrUrl, config);
50991
51396
  } catch (err) {
50992
51397
  if (err instanceof Error) {
50993
- let dummy = {};
51398
+ try {
51399
+ let dummy = {};
50994
51400
 
50995
- Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
51401
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
50996
51402
 
50997
- // slice off the Error: ... line
50998
- const stack = (() => {
50999
- if (!dummy.stack) {
51000
- return '';
51001
- }
51403
+ const dummyStack = dummy.stack;
51404
+ let stack = '';
51002
51405
 
51003
- const firstNewlineIndex = dummy.stack.indexOf('\n');
51406
+ // slice off the Error: ... line
51407
+ if (typeof dummyStack === 'string') {
51408
+ const firstNewlineIndex = dummyStack.indexOf('\n');
51409
+
51410
+ stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1);
51411
+ }
51004
51412
 
51005
- return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
51006
- })();
51007
- try {
51008
51413
  if (!err.stack) {
51009
51414
  err.stack = stack;
51010
51415
  // match without the 2 top stack lines
@@ -51020,7 +51425,7 @@ class Axios {
51020
51425
  }
51021
51426
  }
51022
51427
  } catch (e) {
51023
- // ignore the case where "stack" is an un-writable property
51428
+ // Ignore failures from custom stack hooks or un-writable stack properties.
51024
51429
  }
51025
51430
  }
51026
51431
 
@@ -51043,7 +51448,7 @@ class Axios {
51043
51448
  const { transitional, paramsSerializer, headers } = config;
51044
51449
 
51045
51450
  if (transitional !== undefined) {
51046
- _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
51451
+ _helpers_validator_js__WEBPACK_IMPORTED_MODULE_7__["default"].assertOptions(
51047
51452
  transitional,
51048
51453
  {
51049
51454
  silentJSONParsing: validators.transitional(validators.boolean),
@@ -51063,7 +51468,7 @@ class Axios {
51063
51468
  serialize: paramsSerializer,
51064
51469
  };
51065
51470
  } else {
51066
- _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
51471
+ _helpers_validator_js__WEBPACK_IMPORTED_MODULE_7__["default"].assertOptions(
51067
51472
  paramsSerializer,
51068
51473
  {
51069
51474
  encode: validators.function,
@@ -51083,7 +51488,7 @@ class Axios {
51083
51488
  config.allowAbsoluteUrls = true;
51084
51489
  }
51085
51490
 
51086
- _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
51491
+ _helpers_validator_js__WEBPACK_IMPORTED_MODULE_7__["default"].assertOptions(
51087
51492
  config,
51088
51493
  {
51089
51494
  baseUrl: validators.spelling('baseURL'),
@@ -51093,17 +51498,21 @@ class Axios {
51093
51498
  );
51094
51499
 
51095
51500
  // Set config.method
51096
- config.method = (config.method || this.defaults.method || 'get').toLowerCase();
51501
+ config.method = (
51502
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(config, 'method') ||
51503
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(this.defaults, 'method') ||
51504
+ 'get'
51505
+ ).toLowerCase();
51097
51506
 
51098
51507
  // Flatten headers
51099
51508
  let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(headers.common, headers[config.method]);
51100
51509
 
51101
51510
  headers &&
51102
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], (method) => {
51511
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(_methodList_js__WEBPACK_IMPORTED_MODULE_6__["default"].concat('common'), (method) => {
51103
51512
  delete headers[method];
51104
51513
  });
51105
51514
 
51106
- config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].concat(contextHeaders, headers);
51515
+ config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"].concat(contextHeaders, headers);
51107
51516
 
51108
51517
  // filter out skipped interceptors
51109
51518
  const requestInterceptorChain = [];
@@ -51115,7 +51524,7 @@ class Axios {
51115
51524
 
51116
51525
  synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
51117
51526
 
51118
- const transitional = config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__["default"];
51527
+ const transitional = config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_9__["default"];
51119
51528
  const legacyInterceptorReqResOrdering =
51120
51529
  transitional && transitional.legacyInterceptorReqResOrdering;
51121
51530
 
@@ -51158,17 +51567,35 @@ class Axios {
51158
51567
  const onFulfilled = requestInterceptorChain[i++];
51159
51568
  const onRejected = requestInterceptorChain[i++];
51160
51569
  try {
51161
- newConfig = onFulfilled(newConfig);
51570
+ newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
51162
51571
  } catch (error) {
51163
- onRejected.call(this, error);
51572
+ if (!onRejected) {
51573
+ promise = Promise.reject(error);
51574
+ break;
51575
+ }
51576
+
51577
+ try {
51578
+ const rejectedResult = onRejected.call(this, error);
51579
+
51580
+ if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isThenable(rejectedResult)) {
51581
+ promise = Promise.resolve(rejectedResult).then(() =>
51582
+ _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_3__["default"].call(this, newConfig)
51583
+ );
51584
+ }
51585
+ } catch (rejectedError) {
51586
+ promise = Promise.reject(rejectedError);
51587
+ }
51588
+
51164
51589
  break;
51165
51590
  }
51166
51591
  }
51167
51592
 
51168
- try {
51169
- promise = _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_3__["default"].call(this, newConfig);
51170
- } catch (error) {
51171
- return Promise.reject(error);
51593
+ if (!promise) {
51594
+ try {
51595
+ promise = _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_3__["default"].call(this, newConfig);
51596
+ } catch (error) {
51597
+ promise = Promise.reject(error);
51598
+ }
51172
51599
  }
51173
51600
 
51174
51601
  i = 0;
@@ -51319,9 +51746,40 @@ function redactConfig(config, redactKeys) {
51319
51746
  return visit(config);
51320
51747
  }
51321
51748
 
51749
+ function stringifySafely(value) {
51750
+ try {
51751
+ return String(value);
51752
+ } catch (err) {
51753
+ return '';
51754
+ }
51755
+ }
51756
+
51757
+ function aggregateErrorMessage(error) {
51758
+ const message = error.errors
51759
+ .map((entry) => {
51760
+ try {
51761
+ return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);
51762
+ } catch (err) {
51763
+ return '';
51764
+ }
51765
+ })
51766
+ .filter(Boolean)
51767
+ .join('; ');
51768
+
51769
+ return message || error.name || 'AggregateError';
51770
+ }
51771
+
51322
51772
  class AxiosError extends Error {
51323
51773
  static from(error, code, config, request, response, customProps) {
51324
- const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
51774
+ // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection
51775
+ // failures) has an empty `message`; its detail lives in `errors[]`. Without
51776
+ // this, the wrapped error surfaces with a blank message (see #6721).
51777
+ let message = error.message;
51778
+ if (!message && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(error.errors) && error.errors.length) {
51779
+ message = aggregateErrorMessage(error);
51780
+ }
51781
+
51782
+ const axiosError = new AxiosError(message, code || error.code, config, request, response);
51325
51783
  // Match native `Error` `cause` semantics: non-enumerable. The wrapped
51326
51784
  // error often carries circular internals (sockets, requests, agents), so
51327
51785
  // an enumerable `cause` makes structured loggers (pino/winston) and any
@@ -51435,6 +51893,7 @@ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
51435
51893
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError);
51436
51894
 
51437
51895
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
51896
+ /* harmony export */ "REDACTED", 0, /* binding */ REDACTED,
51438
51897
  /* harmony export */ "default", 0, /* export default binding */ __WEBPACK_DEFAULT_EXPORT__
51439
51898
  /* harmony export */ ]);
51440
51899
 
@@ -51481,6 +51940,124 @@ function parseTokens(str) {
51481
51940
  return tokens;
51482
51941
  }
51483
51942
 
51943
+ const parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
51944
+
51945
+ function trimOWS(value) {
51946
+ let start = 0;
51947
+ let end = value.length;
51948
+
51949
+ while (start < end) {
51950
+ const code = value.charCodeAt(start);
51951
+
51952
+ if (code !== 0x09 && code !== 0x20) {
51953
+ break;
51954
+ }
51955
+
51956
+ start += 1;
51957
+ }
51958
+
51959
+ while (end > start) {
51960
+ const code = value.charCodeAt(end - 1);
51961
+
51962
+ if (code !== 0x09 && code !== 0x20) {
51963
+ break;
51964
+ }
51965
+
51966
+ end -= 1;
51967
+ }
51968
+
51969
+ return start === 0 && end === value.length ? value : value.slice(start, end);
51970
+ }
51971
+
51972
+ function decodeQuotedString(value) {
51973
+ const last = value.length - 1;
51974
+
51975
+ if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) {
51976
+ return value;
51977
+ }
51978
+
51979
+ let decoded = '';
51980
+
51981
+ for (let i = 1; i < last; i++) {
51982
+ const code = value.charCodeAt(i);
51983
+
51984
+ if (code === 0x22) {
51985
+ return value;
51986
+ }
51987
+
51988
+ if (code === 0x5c) {
51989
+ i += 1;
51990
+
51991
+ if (i >= last) {
51992
+ return value;
51993
+ }
51994
+ }
51995
+
51996
+ decoded += value[i];
51997
+ }
51998
+
51999
+ return decoded;
52000
+ }
52001
+
52002
+ function parseParameters(value) {
52003
+ const parameters = Object.create(null);
52004
+ const str = String(value);
52005
+ let start = 0;
52006
+ let quoted = false;
52007
+ let escaped = false;
52008
+
52009
+ function parseParameter(end) {
52010
+ const part = trimOWS(str.slice(start, end));
52011
+ const equals = part.indexOf('=');
52012
+
52013
+ if (equals < 1) {
52014
+ return;
52015
+ }
52016
+
52017
+ const name = trimOWS(part.slice(0, equals));
52018
+
52019
+ if (!parameterNameRE.test(name)) {
52020
+ return;
52021
+ }
52022
+
52023
+ const normalizedName = name.toLowerCase();
52024
+
52025
+ if (
52026
+ normalizedName === '__proto__' ||
52027
+ normalizedName === 'constructor' ||
52028
+ normalizedName === 'prototype'
52029
+ ) {
52030
+ return;
52031
+ }
52032
+
52033
+ const parameterValue = trimOWS(part.slice(equals + 1));
52034
+ parameters[normalizedName] = decodeQuotedString(parameterValue);
52035
+ }
52036
+
52037
+ for (let i = 0; i < str.length; i++) {
52038
+ const code = str.charCodeAt(i);
52039
+
52040
+ if (quoted) {
52041
+ if (escaped) {
52042
+ escaped = false;
52043
+ } else if (code === 0x5c) {
52044
+ escaped = true;
52045
+ } else if (code === 0x22) {
52046
+ quoted = false;
52047
+ }
52048
+ } else if (code === 0x22) {
52049
+ quoted = true;
52050
+ } else if (code === 0x2c || code === 0x3b) {
52051
+ parseParameter(i);
52052
+ start = i + 1;
52053
+ }
52054
+ }
52055
+
52056
+ parseParameter(str.length);
52057
+
52058
+ return parameters;
52059
+ }
52060
+
51484
52061
  const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
51485
52062
 
51486
52063
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
@@ -51732,7 +52309,8 @@ class AxiosHeaders {
51732
52309
  }
51733
52310
 
51734
52311
  getSetCookie() {
51735
- return this.get('set-cookie') || [];
52312
+ const value = this.get('set-cookie');
52313
+ return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value : value == null || value === false ? [] : [value];
51736
52314
  }
51737
52315
 
51738
52316
  get [Symbol.toStringTag]() {
@@ -51743,6 +52321,10 @@ class AxiosHeaders {
51743
52321
  return thing instanceof this ? thing : new this(thing);
51744
52322
  }
51745
52323
 
52324
+ static parseParameters(value) {
52325
+ return parseParameters(value);
52326
+ }
52327
+
51746
52328
  static concat(first, ...targets) {
51747
52329
  const computed = new this(first);
51748
52330
 
@@ -51818,9 +52400,57 @@ __webpack_require__.r(__webpack_exports__);
51818
52400
 
51819
52401
 
51820
52402
 
52403
+ const $internals = Symbol('internals');
52404
+
52405
+ // `handlers` is public and may be replaced with a nullish value by user code;
52406
+ // `clear()` has always tolerated that. Treat it as an empty stack rather than
52407
+ // dereferencing it.
52408
+ function countHandlers(handlers) {
52409
+ return handlers ? handlers.length : 0;
52410
+ }
52411
+
52412
+ function trimHandlers(handlers) {
52413
+ if (!handlers) {
52414
+ return;
52415
+ }
52416
+
52417
+ while (handlers.length && handlers[handlers.length - 1] === null) {
52418
+ handlers.pop();
52419
+ }
52420
+ }
52421
+
52422
+ function syncHandlerEntries(manager, internals) {
52423
+ const handlers = manager.handlers;
52424
+ const length = countHandlers(handlers);
52425
+
52426
+ if (handlers !== internals.handlersRef) {
52427
+ internals.handlersRef = handlers;
52428
+ internals.handlerEntries.clear();
52429
+ } else if (length !== internals.handlersLength) {
52430
+ if (!length) {
52431
+ internals.handlerEntries.clear();
52432
+ } else {
52433
+ internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
52434
+ if (handlers[entry.index] !== entry.handler) {
52435
+ internals.handlerEntries.delete(id);
52436
+ }
52437
+ });
52438
+ }
52439
+ }
52440
+
52441
+ internals.handlersLength = length;
52442
+ }
52443
+
51821
52444
  class InterceptorManager {
51822
52445
  constructor() {
51823
52446
  this.handlers = [];
52447
+ this[$internals] = {
52448
+ handlersRef: this.handlers,
52449
+ handlersLength: this.handlers.length,
52450
+ handlerEntries: new Map(),
52451
+ iterationDepth: 0,
52452
+ nextId: 0,
52453
+ };
51824
52454
  }
51825
52455
 
51826
52456
  /**
@@ -51833,13 +52463,30 @@ class InterceptorManager {
51833
52463
  * @return {Number} An ID used to remove interceptor later
51834
52464
  */
51835
52465
  use(fulfilled, rejected, options) {
51836
- this.handlers.push({
52466
+ const handler = {
51837
52467
  fulfilled,
51838
52468
  rejected,
51839
52469
  synchronous: options ? options.synchronous : false,
51840
52470
  runWhen: options ? options.runWhen : null,
52471
+ };
52472
+ const internals = this[$internals];
52473
+
52474
+ if (this.handlers == null) {
52475
+ this.handlers = [];
52476
+ }
52477
+
52478
+ syncHandlerEntries(this, internals);
52479
+
52480
+ const id = internals.nextId++;
52481
+
52482
+ this.handlers.push(handler);
52483
+ internals.handlerEntries.set(id, {
52484
+ handler,
52485
+ index: this.handlers.length - 1,
51841
52486
  });
51842
- return this.handlers.length - 1;
52487
+ internals.handlersLength = this.handlers.length;
52488
+
52489
+ return id;
51843
52490
  }
51844
52491
 
51845
52492
  /**
@@ -51850,8 +52497,27 @@ class InterceptorManager {
51850
52497
  * @returns {void}
51851
52498
  */
51852
52499
  eject(id) {
51853
- if (this.handlers[id]) {
51854
- this.handlers[id] = null;
52500
+ const internals = this[$internals];
52501
+
52502
+ syncHandlerEntries(this, internals);
52503
+
52504
+ const entry = internals.handlerEntries.get(id);
52505
+
52506
+ if (entry) {
52507
+ internals.handlerEntries.delete(id);
52508
+
52509
+ // Ignore IDs invalidated by clear or direct replacement of handlers.
52510
+ if (this.handlers[entry.index] !== entry.handler) {
52511
+ return;
52512
+ }
52513
+
52514
+ this.handlers[entry.index] = null;
52515
+
52516
+ // Do not reuse an index while forEach is walking its length snapshot.
52517
+ if (!internals.iterationDepth) {
52518
+ trimHandlers(this.handlers);
52519
+ internals.handlersLength = this.handlers.length;
52520
+ }
51855
52521
  }
51856
52522
  }
51857
52523
 
@@ -51863,6 +52529,7 @@ class InterceptorManager {
51863
52529
  clear() {
51864
52530
  if (this.handlers) {
51865
52531
  this.handlers = [];
52532
+ syncHandlerEntries(this, this[$internals]);
51866
52533
  }
51867
52534
  }
51868
52535
 
@@ -51877,11 +52544,25 @@ class InterceptorManager {
51877
52544
  * @returns {void}
51878
52545
  */
51879
52546
  forEach(fn) {
51880
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this.handlers, function forEachHandler(h) {
51881
- if (h !== null) {
51882
- fn(h);
52547
+ const internals = this[$internals];
52548
+
52549
+ syncHandlerEntries(this, internals);
52550
+
52551
+ internals.iterationDepth++;
52552
+
52553
+ try {
52554
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this.handlers, function forEachHandler(h) {
52555
+ if (h !== null) {
52556
+ fn(h);
52557
+ }
52558
+ });
52559
+ } finally {
52560
+ if (!--internals.iterationDepth) {
52561
+ syncHandlerEntries(this, internals);
52562
+ trimHandlers(this.handlers);
52563
+ internals.handlersLength = countHandlers(this.handlers);
51883
52564
  }
51884
- });
52565
+ }
51885
52566
  }
51886
52567
  }
51887
52568
 
@@ -51905,6 +52586,8 @@ __webpack_require__.r(__webpack_exports__);
51905
52586
  /* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19011);
51906
52587
  /* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75983);
51907
52588
  /* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54042);
52589
+ /* harmony import */ var _helpers_normalizeURLForProtocolCheck_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53744);
52590
+
51908
52591
 
51909
52592
 
51910
52593
 
@@ -51912,27 +52595,52 @@ __webpack_require__.r(__webpack_exports__);
51912
52595
 
51913
52596
 
51914
52597
  const malformedHttpProtocol = /^https?:(?!\/\/)/i;
51915
- const httpProtocolControlCharacters = /[\t\n\r]/g;
51916
52598
 
51917
- function stripLeadingC0ControlOrSpace(url) {
51918
- let i = 0;
51919
- while (i < url.length && url.charCodeAt(i) <= 0x20) {
51920
- i++;
52599
+ // Redact the parts of a URL that can carry secrets before it is embedded in an
52600
+ // error message. AxiosError.toJSON() serializes `message` verbatim and errors
52601
+ // are commonly logged, while the opt-in `config.redact` model only cleans
52602
+ // config keys — it cannot reach the message. Redact only the genuinely
52603
+ // sensitive substrings — userinfo (credentials), query parameter values and
52604
+ // fragment contents — with the same REDACTED marker the config redaction uses,
52605
+ // while keeping the scheme, host, path and parameter names so the offending
52606
+ // request stays accurately identifiable.
52607
+ function redactFragment(fragment) {
52608
+ if (!fragment) {
52609
+ return fragment;
51921
52610
  }
51922
- return url.slice(i);
52611
+
52612
+ return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = '') => {
52613
+ return `${separator}${parameterName}${_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__.REDACTED}`;
52614
+ });
51923
52615
  }
51924
52616
 
51925
- function normalizeURLForProtocolCheck(url) {
51926
- return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, '');
52617
+ function redactSensitiveURLParts(url) {
52618
+ const redactedURL = url.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__.REDACTED}@`);
52619
+ const fragmentIndex = redactedURL.indexOf('#');
52620
+ const urlWithoutFragment =
52621
+ fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
52622
+ const redactedURLWithoutFragment = urlWithoutFragment.replace(
52623
+ /([?&][^=&#]*=)[^&#]*/g,
52624
+ `$1${_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__.REDACTED}`
52625
+ );
52626
+
52627
+ if (fragmentIndex === -1) {
52628
+ return redactedURLWithoutFragment;
52629
+ }
52630
+
52631
+ return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
51927
52632
  }
51928
52633
 
51929
52634
  function assertValidHttpProtocolURL(url, config) {
51930
- if (typeof url === 'string' && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) {
51931
- throw new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
51932
- 'Invalid URL: missing "//" after protocol',
51933
- _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_INVALID_URL,
51934
- config
51935
- );
52635
+ if (typeof url === 'string') {
52636
+ const normalizedURL = (0,_helpers_normalizeURLForProtocolCheck_js__WEBPACK_IMPORTED_MODULE_3__["default"])(url);
52637
+ if (malformedHttpProtocol.test(normalizedURL)) {
52638
+ throw new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
52639
+ `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`,
52640
+ _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_INVALID_URL,
52641
+ config
52642
+ );
52643
+ }
51936
52644
  }
51937
52645
  }
51938
52646
 
@@ -51973,6 +52681,8 @@ __webpack_require__.r(__webpack_exports__);
51973
52681
  /* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95273);
51974
52682
  /* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76487);
51975
52683
  /* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63002);
52684
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(68750);
52685
+
51976
52686
 
51977
52687
 
51978
52688
 
@@ -52006,10 +52716,15 @@ function throwIfCancellationRequested(config) {
52006
52716
  *
52007
52717
  * @returns {Promise} The Promise to be fulfilled
52008
52718
  */
52009
- function dispatchRequest(config) {
52719
+ function dispatchRequest(_config) {
52720
+ // Interceptors may replace the merged config with an ordinary object. Flatten
52721
+ // it at the dispatch boundary so shared prototype members cannot become
52722
+ // request behavior, while preserving intentional template/class members.
52723
+ const config = _utils_js__WEBPACK_IMPORTED_MODULE_6__["default"].toSafeFlatObject(_config);
52724
+
52010
52725
  throwIfCancellationRequested(config);
52011
52726
 
52012
- config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(config.headers);
52727
+ config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(_utils_js__WEBPACK_IMPORTED_MODULE_6__["default"].getSafeProp(config, 'headers'));
52013
52728
 
52014
52729
  // Transform request data
52015
52730
  config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(config, config.transformRequest);
@@ -52083,6 +52798,17 @@ __webpack_require__.r(__webpack_exports__);
52083
52798
 
52084
52799
  const headersToObject = (thing) => (thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"] ? { ...thing } : thing);
52085
52800
 
52801
+ const ownEnumerableKeys = (thing) => {
52802
+ if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
52803
+ return Object.keys(thing).concat(
52804
+ Object.getOwnPropertySymbols(thing).filter(
52805
+ (symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable
52806
+ )
52807
+ );
52808
+ }
52809
+ return Object.keys(thing);
52810
+ };
52811
+
52086
52812
  /**
52087
52813
  * Config-specific merge-function which creates a new config-object
52088
52814
  * by merging two configuration objects together.
@@ -52148,7 +52874,9 @@ function mergeConfig(config1, config2) {
52148
52874
  }
52149
52875
 
52150
52876
  function getMergedTransitionalOption(prop) {
52151
- const transitional2 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, 'transitional') ? config2.transitional : undefined;
52877
+ const transitional2 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, 'transitional')
52878
+ ? config2.transitional
52879
+ : undefined;
52152
52880
 
52153
52881
  if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(transitional2)) {
52154
52882
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional2)) {
@@ -52160,7 +52888,9 @@ function mergeConfig(config1, config2) {
52160
52888
  }
52161
52889
  }
52162
52890
 
52163
- const transitional1 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, 'transitional') ? config1.transitional : undefined;
52891
+ const transitional1 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, 'transitional')
52892
+ ? config1.transitional
52893
+ : undefined;
52164
52894
 
52165
52895
  if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional1) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(transitional1, prop)) {
52166
52896
  return transitional1[prop];
@@ -52187,7 +52917,7 @@ function mergeConfig(config1, config2) {
52187
52917
  transformResponse: defaultToConfig2,
52188
52918
  paramsSerializer: defaultToConfig2,
52189
52919
  timeout: defaultToConfig2,
52190
- timeoutMessage: defaultToConfig2,
52920
+ timeoutErrorMessage: defaultToConfig2,
52191
52921
  withCredentials: defaultToConfig2,
52192
52922
  withXSRFToken: defaultToConfig2,
52193
52923
  adapter: defaultToConfig2,
@@ -52212,7 +52942,7 @@ function mergeConfig(config1, config2) {
52212
52942
  mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
52213
52943
  };
52214
52944
 
52215
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
52945
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {
52216
52946
  if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
52217
52947
  const merge = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
52218
52948
  const a = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, prop) ? config1[prop] : undefined;
@@ -52237,6 +52967,75 @@ function mergeConfig(config1, config2) {
52237
52967
  }
52238
52968
 
52239
52969
 
52970
+ /***/ },
52971
+
52972
+ /***/ 8726
52973
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
52974
+
52975
+ "use strict";
52976
+ __webpack_require__.r(__webpack_exports__);
52977
+
52978
+
52979
+ const methodList = Object.freeze([
52980
+ 'get',
52981
+ 'delete',
52982
+ 'head',
52983
+ 'options',
52984
+ 'post',
52985
+ 'put',
52986
+ 'patch',
52987
+ 'purge',
52988
+ 'link',
52989
+ 'unlink',
52990
+ 'query',
52991
+ ]);
52992
+
52993
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (methodList);
52994
+
52995
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, [
52996
+ /* harmony export */ "default", 0, /* export default binding */ __WEBPACK_DEFAULT_EXPORT__
52997
+ /* harmony export */ ]);
52998
+
52999
+
53000
+ /***/ },
53001
+
53002
+ /***/ 371
53003
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
53004
+
53005
+ "use strict";
53006
+ __webpack_require__.r(__webpack_exports__);
53007
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
53008
+ /* harmony export */ "default": () => (/* binding */ setFormDataHeaders)
53009
+ /* harmony export */ });
53010
+
53011
+
53012
+ const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
53013
+
53014
+ /**
53015
+ * Apply the headers generated by a FormData implementation to the request headers,
53016
+ * honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the
53017
+ * content-* headers; otherwise merge all of them.
53018
+ *
53019
+ * @param {AxiosHeaders} headers - the request headers to mutate
53020
+ * @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation
53021
+ * @param {String} [policy] - the resolved `formDataHeaderPolicy` config value
53022
+ *
53023
+ * @returns {void}
53024
+ */
53025
+ function setFormDataHeaders(headers, formHeaders, policy) {
53026
+ if (policy !== 'content-only') {
53027
+ headers.set(formHeaders);
53028
+ return;
53029
+ }
53030
+
53031
+ Object.entries(formHeaders || {}).forEach(([key, val]) => {
53032
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
53033
+ headers.set(key, val);
53034
+ }
53035
+ });
53036
+ }
53037
+
53038
+
52240
53039
  /***/ },
52241
53040
 
52242
53041
  /***/ 40788
@@ -52334,6 +53133,8 @@ __webpack_require__.r(__webpack_exports__);
52334
53133
  /* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24699);
52335
53134
  /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(79455);
52336
53135
  /* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(66256);
53136
+ /* harmony import */ var _core_methodList_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8726);
53137
+
52337
53138
 
52338
53139
 
52339
53140
 
@@ -52506,7 +53307,7 @@ const defaults = {
52506
53307
  },
52507
53308
  };
52508
53309
 
52509
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query'], (method) => {
53310
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(_core_methodList_js__WEBPACK_IMPORTED_MODULE_7__["default"], (method) => {
52510
53311
  defaults.headers[method] = {};
52511
53312
  });
52512
53313
 
@@ -52547,7 +53348,7 @@ __webpack_require__.r(__webpack_exports__);
52547
53348
 
52548
53349
  "use strict";
52549
53350
  __webpack_require__.r(__webpack_exports__);
52550
- const VERSION = "1.18.1";
53351
+ const VERSION = "1.20.0";
52551
53352
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
52552
53353
  /* harmony export */ "VERSION", 0, /* binding */ VERSION
52553
53354
  /* harmony export */ ]);
@@ -52670,14 +53471,22 @@ const HttpStatusCode = {
52670
53471
  Gone: 410,
52671
53472
  LengthRequired: 411,
52672
53473
  PreconditionFailed: 412,
53474
+ /**
53475
+ * @deprecated Use `ContentTooLarge` instead.
53476
+ */
52673
53477
  PayloadTooLarge: 413,
53478
+ ContentTooLarge: 413,
52674
53479
  UriTooLong: 414,
52675
53480
  UnsupportedMediaType: 415,
52676
53481
  RangeNotSatisfiable: 416,
52677
53482
  ExpectationFailed: 417,
52678
53483
  ImATeapot: 418,
52679
53484
  MisdirectedRequest: 421,
53485
+ /**
53486
+ * @deprecated Use `UnprocessableContent` instead.
53487
+ */
52680
53488
  UnprocessableEntity: 422,
53489
+ UnprocessableContent: 422,
52681
53490
  Locked: 423,
52682
53491
  FailedDependency: 424,
52683
53492
  TooEarly: 425,
@@ -52697,6 +53506,7 @@ const HttpStatusCode = {
52697
53506
  LoopDetected: 508,
52698
53507
  NotExtended: 510,
52699
53508
  NetworkAuthenticationRequired: 511,
53509
+ WebServerReturnsAnUnknownError: 520,
52700
53510
  WebServerIsDown: 521,
52701
53511
  ConnectionTimedOut: 522,
52702
53512
  OriginIsUnreachable: 523,
@@ -52706,7 +53516,9 @@ const HttpStatusCode = {
52706
53516
  };
52707
53517
 
52708
53518
  Object.entries(HttpStatusCode).forEach(([key, value]) => {
52709
- HttpStatusCode[value] = key;
53519
+ if (HttpStatusCode[value] === undefined) {
53520
+ HttpStatusCode[value] = key;
53521
+ }
52710
53522
  });
52711
53523
 
52712
53524
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HttpStatusCode);
@@ -52847,9 +53659,17 @@ __webpack_require__.r(__webpack_exports__);
52847
53659
  * @returns {string} The combined URL
52848
53660
  */
52849
53661
  function combineURLs(baseURL, relativeURL) {
52850
- return relativeURL
52851
- ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
52852
- : baseURL;
53662
+ if (!relativeURL) {
53663
+ return baseURL;
53664
+ }
53665
+
53666
+ let end = baseURL.length;
53667
+
53668
+ while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
53669
+ end--;
53670
+ }
53671
+
53672
+ return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\/+/, '');
52853
53673
  }
52854
53674
 
52855
53675
 
@@ -52910,7 +53730,18 @@ const composeSignals = (signals, timeout) => {
52910
53730
  signals = null;
52911
53731
  };
52912
53732
 
52913
- signals.forEach((signal) => signal.addEventListener('abort', onabort, { once: true }));
53733
+ signals.forEach((signal) => {
53734
+ if (aborted) {
53735
+ return;
53736
+ }
53737
+
53738
+ if (signal.aborted) {
53739
+ onabort.call(signal);
53740
+ return;
53741
+ }
53742
+
53743
+ signal.addEventListener('abort', onabort, { once: true });
53744
+ });
52914
53745
 
52915
53746
  const { signal } = controller;
52916
53747
 
@@ -53013,16 +53844,15 @@ __webpack_require__.r(__webpack_exports__);
53013
53844
  "use strict";
53014
53845
  __webpack_require__.r(__webpack_exports__);
53015
53846
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
53016
- /* harmony export */ "default": () => (/* binding */ estimateDataURLDecodedBytes)
53847
+ /* harmony export */ "default": () => (/* binding */ estimateDataURLDecodedBytes),
53848
+ /* harmony export */ estimateDataURLBufferAllocation: () => (/* binding */ estimateDataURLBufferAllocation)
53017
53849
  /* harmony export */ });
53018
53850
  /**
53019
- * Estimate decoded byte length of a data:// URL *without* allocating large buffers.
53020
- * - For base64: compute exact decoded size using length and padding;
53021
- * handle %XX at the character-count level (no string allocation).
53022
- * - For non-base64: compute the exact percent-decoded UTF-8 byte length.
53023
- *
53024
- * @param {string} url
53025
- * @returns {number}
53851
+ * Estimate data: URL byte lengths *without* allocating large buffers.
53852
+ * - Fetch percent-decodes a base64 body before decoding it.
53853
+ * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the
53854
+ * raw body, including ignored characters and content after padding.
53855
+ * - Non-base64 data is percent-decoded and then encoded as UTF-8.
53026
53856
  */
53027
53857
  const isHexDigit = (charCode) =>
53028
53858
  (charCode >= 48 && charCode <= 57) ||
@@ -53032,64 +53862,101 @@ const isHexDigit = (charCode) =>
53032
53862
  const isPercentEncodedByte = (str, i, len) =>
53033
53863
  i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
53034
53864
 
53035
- function estimateDataURLDecodedBytes(url) {
53036
- if (!url || typeof url !== 'string') return 0;
53037
- if (!url.startsWith('data:')) return 0;
53865
+ const hexValue = (charCode) => (charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55);
53038
53866
 
53039
- const comma = url.indexOf(',');
53040
- if (comma < 0) return 0;
53867
+ const isBase64Char = (charCode) =>
53868
+ (charCode >= 65 && charCode <= 90) || // A-Z
53869
+ (charCode >= 97 && charCode <= 122) || // a-z
53870
+ (charCode >= 48 && charCode <= 57) || // 0-9
53871
+ charCode === 43 || // +
53872
+ charCode === 47 || // /
53873
+ charCode === 45 || // - (base64url)
53874
+ charCode === 95; // _ (base64url)
53041
53875
 
53042
- const meta = url.slice(5, comma);
53043
- const body = url.slice(comma + 1);
53044
- const isBase64 = /;base64/i.test(meta);
53876
+ const isBase64Whitespace = (charCode) =>
53877
+ charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
53045
53878
 
53046
- if (isBase64) {
53047
- let effectiveLen = body.length;
53048
- const len = body.length; // cache length
53049
-
53050
- for (let i = 0; i < len; i++) {
53051
- if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
53052
- const a = body.charCodeAt(i + 1);
53053
- const b = body.charCodeAt(i + 2);
53054
- const isHex = isHexDigit(a) && isHexDigit(b);
53055
-
53056
- if (isHex) {
53057
- effectiveLen -= 2;
53058
- i += 2;
53059
- }
53060
- }
53879
+ const base64Bytes = (significant) => {
53880
+ const groups = Math.floor(significant / 4);
53881
+ const remainder = significant % 4;
53882
+ return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
53883
+ };
53884
+
53885
+ // Buffer.byteLength(body, 'base64') uses the raw string length as an allocation
53886
+ // upper bound even when Buffer.from later ignores characters or stops at '='.
53887
+ const estimateBase64BufferAllocation = (body) => {
53888
+ const len = body.length;
53889
+ let padding = 0;
53890
+
53891
+ if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) {
53892
+ padding++;
53893
+
53894
+ if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) {
53895
+ padding++;
53061
53896
  }
53897
+ }
53898
+
53899
+ return Math.floor(((len - padding) * 3) / 4);
53900
+ };
53062
53901
 
53063
- let pad = 0;
53064
- let idx = len - 1;
53902
+ const estimatePercentDecodedBase64Bytes = (body) => {
53903
+ const len = body.length;
53904
+ let significant = 0;
53905
+ let padding = 0;
53906
+ let invalid = false;
53065
53907
 
53066
- const tailIsPct3D = (j) =>
53067
- j >= 2 &&
53068
- body.charCodeAt(j - 2) === 37 && // '%'
53069
- body.charCodeAt(j - 1) === 51 && // '3'
53070
- (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd'
53908
+ for (let i = 0; i < len; i++) {
53909
+ let code = body.charCodeAt(i);
53071
53910
 
53072
- if (idx >= 0) {
53073
- if (body.charCodeAt(idx) === 61 /* '=' */) {
53074
- pad++;
53075
- idx--;
53076
- } else if (tailIsPct3D(idx)) {
53077
- pad++;
53078
- idx -= 3;
53079
- }
53911
+ if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {
53912
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
53913
+ i += 2;
53080
53914
  }
53081
53915
 
53082
- if (pad === 1 && idx >= 0) {
53083
- if (body.charCodeAt(idx) === 61 /* '=' */) {
53084
- pad++;
53085
- } else if (tailIsPct3D(idx)) {
53086
- pad++;
53087
- }
53916
+ if (isBase64Whitespace(code)) {
53917
+ continue;
53918
+ }
53919
+
53920
+ if (code === 61 /* '=' */) {
53921
+ padding++;
53922
+ continue;
53088
53923
  }
53089
53924
 
53090
- const groups = Math.floor(effectiveLen / 4);
53091
- const bytes = groups * 3 - (pad || 0);
53092
- return bytes > 0 ? bytes : 0;
53925
+ if (!isBase64Char(code) || padding > 0) {
53926
+ invalid = true;
53927
+ continue;
53928
+ }
53929
+
53930
+ significant++;
53931
+ }
53932
+
53933
+ // Fetch rejects malformed forgiving-base64 input. Returning the raw-size
53934
+ // allocation bound keeps that invalid input from becoming a pre-check bypass.
53935
+ if (
53936
+ invalid ||
53937
+ padding > 2 ||
53938
+ (padding > 0 && (significant + padding) % 4 !== 0) ||
53939
+ significant % 4 === 1
53940
+ ) {
53941
+ return estimateBase64BufferAllocation(body);
53942
+ }
53943
+
53944
+ return base64Bytes(significant);
53945
+ };
53946
+
53947
+ const estimateDataURLBytes = (url, estimateBase64) => {
53948
+ if (!url || typeof url !== 'string') return 0;
53949
+ if (!url.startsWith('data:')) return 0;
53950
+
53951
+ const comma = url.indexOf(',');
53952
+ if (comma < 0) return 0;
53953
+
53954
+ const meta = url.slice(5, comma);
53955
+ const body = url.slice(comma + 1);
53956
+ const isBase64 = /;base64/i.test(meta);
53957
+
53958
+ if (isBase64) {
53959
+ return estimateBase64(body);
53093
53960
  }
53094
53961
 
53095
53962
  // Compute UTF-8 byte length directly from UTF-16 code units without allocating
@@ -53119,6 +53986,32 @@ function estimateDataURLDecodedBytes(url) {
53119
53986
  }
53120
53987
  }
53121
53988
  return bytes;
53989
+ };
53990
+
53991
+ /**
53992
+ * Estimate the percent-decoded payload size used by Fetch data: URLs.
53993
+ *
53994
+ * @param {string} url
53995
+ * @returns {number}
53996
+ */
53997
+ function estimateDataURLDecodedBytes(url) {
53998
+ // Fetch removes URL fragments before processing a data: URL.
53999
+ const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1;
54000
+
54001
+ return estimateDataURLBytes(
54002
+ fragmentIndex === -1 ? url : url.slice(0, fragmentIndex),
54003
+ estimatePercentDecodedBase64Bytes
54004
+ );
54005
+ }
54006
+
54007
+ /**
54008
+ * Estimate the Buffer backing allocation used by Node's raw base64 decoder.
54009
+ *
54010
+ * @param {string} url
54011
+ * @returns {number}
54012
+ */
54013
+ function estimateDataURLBufferAllocation(url) {
54014
+ return estimateDataURLBytes(url, estimateBase64BufferAllocation);
53122
54015
  }
53123
54016
 
53124
54017
 
@@ -53157,12 +54050,18 @@ function throwIfDepthExceeded(index) {
53157
54050
  * @returns An array of strings.
53158
54051
  */
53159
54052
  function parsePropPath(name) {
53160
- // foo[x][y][z]
53161
- // foo.x.y.z
53162
- // foo-x-y-z
53163
- // foo x y z
54053
+ // foo[x][y][z] -> ['foo', 'x', 'y', 'z']
54054
+ // foo.x.y.z -> ['foo', 'x', 'y', 'z']
54055
+ // A path is split on `.` and on `[...]` groups. A segment — whether written
54056
+ // in dot notation or captured inside brackets — may contain any character
54057
+ // except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept
54058
+ // literal instead of being split (#5402). `.`, `[` and `]` keep their existing
54059
+ // meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push.
54060
+ // Excluding `[` from the bracket group also makes the match fail fast at the
54061
+ // next `[`, so a malformed name cannot rescan to the end of the string from
54062
+ // every unmatched `[` — parsing stays linear in the length of the name.
53164
54063
  const path = [];
53165
- const pattern = /\w+|\[(\w*)]/g;
54064
+ const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
53166
54065
  let match;
53167
54066
 
53168
54067
  while ((match = pattern.exec(name)) !== null) {
@@ -53345,6 +54244,42 @@ __webpack_require__.r(__webpack_exports__);
53345
54244
  /* harmony export */ ]);
53346
54245
 
53347
54246
 
54247
+ /***/ },
54248
+
54249
+ /***/ 53744
54250
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
54251
+
54252
+ "use strict";
54253
+ __webpack_require__.r(__webpack_exports__);
54254
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
54255
+ /* harmony export */ "default": () => (/* binding */ normalizeURLForProtocolCheck)
54256
+ /* harmony export */ });
54257
+
54258
+
54259
+ const urlParserControlCharacters = /[\t\n\r]/g;
54260
+
54261
+ /**
54262
+ * Match WHATWG URL preprocessing before checking a URL's protocol.
54263
+ *
54264
+ * @param {string} url
54265
+ *
54266
+ * @returns {string}
54267
+ */
54268
+ function normalizeURLForProtocolCheck(url) {
54269
+ if (typeof url !== 'string') {
54270
+ return url;
54271
+ }
54272
+
54273
+ let start = 0;
54274
+
54275
+ while (start < url.length && url.charCodeAt(start) <= 0x20) {
54276
+ start++;
54277
+ }
54278
+
54279
+ return url.slice(start).replace(urlParserControlCharacters, '');
54280
+ }
54281
+
54282
+
53348
54283
  /***/ },
53349
54284
 
53350
54285
  /***/ 92008
@@ -53420,18 +54355,20 @@ const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toOb
53420
54355
  key = line.substring(0, i).trim().toLowerCase();
53421
54356
  val = line.substring(i + 1).trim();
53422
54357
 
53423
- if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
54358
+ const hasKey = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(parsed, key);
54359
+
54360
+ if (!key || (hasKey && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(ignoreDuplicateOf, key))) {
53424
54361
  return;
53425
54362
  }
53426
54363
 
53427
54364
  if (key === 'set-cookie') {
53428
- if (parsed[key]) {
54365
+ if (hasKey) {
53429
54366
  parsed[key].push(val);
53430
54367
  } else {
53431
54368
  parsed[key] = [val];
53432
54369
  }
53433
54370
  } else {
53434
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
54371
+ parsed[key] = hasKey ? parsed[key] + ', ' + val : val;
53435
54372
  }
53436
54373
  });
53437
54374
 
@@ -53480,12 +54417,12 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
53480
54417
  const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250);
53481
54418
 
53482
54419
  return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])((e) => {
53483
- if (!e || typeof e.loaded !== 'number') {
54420
+ if (!e || !_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isNumber(e.loaded)) {
53484
54421
  return;
53485
54422
  }
53486
54423
  const rawLoaded = e.loaded;
53487
54424
  const total = e.lengthComputable ? e.total : undefined;
53488
- const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
54425
+ const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
53489
54426
  const progressBytes = Math.max(0, loaded - bytesNotified);
53490
54427
  const rate = _speedometer(progressBytes);
53491
54428
 
@@ -53522,9 +54459,9 @@ const progressEventDecorator = (total, throttled) => {
53522
54459
  };
53523
54460
 
53524
54461
  const asyncDecorator =
53525
- (fn) =>
54462
+ (fn, scheduler = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap) =>
53526
54463
  (...args) =>
53527
- _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(() => fn(...args));
54464
+ scheduler(() => fn(...args));
53528
54465
 
53529
54466
  /* harmony export */ __webpack_require__.d(__webpack_exports__, [
53530
54467
  /* harmony export */ "asyncDecorator", 0, /* binding */ asyncDecorator,
@@ -53548,8 +54485,8 @@ __webpack_require__.r(__webpack_exports__);
53548
54485
  /* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(22921);
53549
54486
  /* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(58757);
53550
54487
  /* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76487);
53551
- /* harmony import */ var _buildURL_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(77760);
53552
-
54488
+ /* harmony import */ var _core_setFormDataHeaders_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(371);
54489
+ /* harmony import */ var _buildURL_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(77760);
53553
54490
 
53554
54491
 
53555
54492
 
@@ -53559,20 +54496,7 @@ __webpack_require__.r(__webpack_exports__);
53559
54496
 
53560
54497
 
53561
54498
 
53562
- const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
53563
-
53564
- function setFormDataHeaders(headers, formHeaders, policy) {
53565
- if (policy !== 'content-only') {
53566
- headers.set(formHeaders);
53567
- return;
53568
- }
53569
54499
 
53570
- Object.entries(formHeaders || {}).forEach(([key, val]) => {
53571
- if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
53572
- headers.set(key, val);
53573
- }
53574
- });
53575
- }
53576
54500
 
53577
54501
  /**
53578
54502
  * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
@@ -53606,7 +54530,7 @@ function resolveConfig(config) {
53606
54530
 
53607
54531
  newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(headers);
53608
54532
 
53609
- newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_8__["default"])(
54533
+ newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_9__["default"])(
53610
54534
  (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_5__["default"])(baseURL, url, allowAbsoluteUrls, newConfig),
53611
54535
  own('params'),
53612
54536
  own('paramsSerializer')
@@ -53628,15 +54552,17 @@ function resolveConfig(config) {
53628
54552
  }
53629
54553
 
53630
54554
  if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data)) {
54555
+ const getHeaders = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(data, 'getHeaders');
54556
+
53631
54557
  if (
53632
54558
  _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ||
53633
54559
  _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserWebWorkerEnv ||
53634
54560
  _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReactNative(data)
53635
54561
  ) {
53636
54562
  headers.setContentType(undefined); // browser/web worker/RN handles it
53637
- } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(data.getHeaders)) {
54563
+ } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(getHeaders)) {
53638
54564
  // Node.js FormData (like form-data package)
53639
- setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
54565
+ (0,_core_setFormDataHeaders_js__WEBPACK_IMPORTED_MODULE_8__["default"])(headers, getHeaders.call(data), own('formDataHeaderPolicy'));
53640
54566
  }
53641
54567
  }
53642
54568
 
@@ -53871,7 +54797,7 @@ __webpack_require__.r(__webpack_exports__);
53871
54797
  * Throttle decorator
53872
54798
  * @param {Function} fn
53873
54799
  * @param {Number} freq
53874
- * @return {Function}
54800
+ * @return {Array<Function>}
53875
54801
  */
53876
54802
  function throttle(fn, freq) {
53877
54803
  let timestamp = 0;
@@ -53906,8 +54832,9 @@ function throttle(fn, freq) {
53906
54832
  };
53907
54833
 
53908
54834
  const flush = () => lastArgs && invoke(lastArgs);
54835
+ const flushWith = (...args) => invoke(args);
53909
54836
 
53910
- return [throttled, flush];
54837
+ return [throttled, flush, flushWith];
53911
54838
  }
53912
54839
 
53913
54840
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (throttle);
@@ -53934,6 +54861,7 @@ __webpack_require__.r(__webpack_exports__);
53934
54861
  // temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
53935
54862
 
53936
54863
 
54864
+
53937
54865
  // Default nesting limit shared with the inverse transform (formDataToJSON) so
53938
54866
  // the FormData <-> JSON round-trip stays symmetric.
53939
54867
  const DEFAULT_FORM_DATA_MAX_DEPTH = 100;
@@ -54027,28 +54955,18 @@ function toFormData(obj, formData, options) {
54027
54955
  // eslint-disable-next-line no-param-reassign
54028
54956
  formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__["default"] || FormData)();
54029
54957
 
54030
- // eslint-disable-next-line no-param-reassign
54031
- options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(
54032
- options,
54033
- {
54034
- metaTokens: true,
54035
- dots: false,
54036
- indexes: false,
54037
- },
54038
- false,
54039
- function defined(option, source) {
54040
- // eslint-disable-next-line no-eq-null,eqeqeq
54041
- return !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(source[option]);
54042
- }
54043
- );
54958
+ const option = (name, fallback) => {
54959
+ const value = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(options, name);
54960
+ return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value) ? fallback : value;
54961
+ };
54044
54962
 
54045
- const metaTokens = options.metaTokens;
54963
+ const metaTokens = option('metaTokens', true);
54046
54964
  // eslint-disable-next-line no-use-before-define
54047
- const visitor = options.visitor || defaultVisitor;
54048
- const dots = options.dots;
54049
- const indexes = options.indexes;
54050
- const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
54051
- const maxDepth = options.maxDepth === undefined ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
54965
+ const visitor = option('visitor') || defaultVisitor;
54966
+ const dots = option('dots', false);
54967
+ const indexes = option('indexes', false);
54968
+ const _Blob = option('Blob') || (typeof Blob !== 'undefined' && Blob);
54969
+ const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH);
54052
54970
  const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData);
54053
54971
  const stack = [];
54054
54972
 
@@ -54075,10 +54993,13 @@ function toFormData(obj, formData, options) {
54075
54993
  if (useBlob && typeof _Blob === 'function') {
54076
54994
  return new _Blob([value]);
54077
54995
  }
54078
- if (typeof Buffer !== 'undefined') {
54079
- return Buffer.from(value);
54996
+ if (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__["default"] && _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__["default"].isBufferAvailable()) {
54997
+ return _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(value);
54080
54998
  }
54081
- 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);
54999
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
55000
+ 'Blob is not supported. Use a Buffer instead.',
55001
+ _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_NOT_SUPPORT
55002
+ );
54082
55003
  }
54083
55004
 
54084
55005
  return value;
@@ -54673,12 +55594,65 @@ const hasOwnProperty = (
54673
55594
  hasOwnProperty.call(obj, prop)
54674
55595
  )(Object.prototype);
54675
55596
 
55597
+ const isUnsafeObjectKey = (prop) =>
55598
+ typeof prop === 'string' &&
55599
+ (prop === '__proto__' || prop === 'constructor' || prop === 'prototype');
55600
+
55601
+ /**
55602
+ * Determine whether an inherited object must be treated as a shared-prototype
55603
+ * boundary. Cross-realm Object.prototype objects cannot be distinguished
55604
+ * reliably from application-created null-prototype objects because their
55605
+ * properties are mutable, so all inherited terminal prototypes are excluded
55606
+ * as a fail-closed boundary. A null-prototype source still keeps its own
55607
+ * properties, as produced by mergeConfig and other safe materialization paths.
55608
+ *
55609
+ * @param {*} obj The object to inspect
55610
+ * @param {*} prototype The object's prototype
55611
+ * @param {boolean} source Whether obj is the original traversal source
55612
+ *
55613
+ * @returns {boolean} True when obj is a safe prototype traversal boundary
55614
+ */
55615
+ const isPrototypeBoundary = (obj, prototype, source) =>
55616
+ obj === Object.prototype || (!source && prototype === null);
55617
+
55618
+ /**
55619
+ * Determine whether an object can retain its identity through code paths that
55620
+ * add, replace, and remove config properties without bypassing unsafe-key
55621
+ * filtering. Immutable objects, unsafe-key-bearing objects, and objects with
55622
+ * accessor or restricted data properties must be materialized instead.
55623
+ *
55624
+ * @param {*} obj The object to inspect
55625
+ *
55626
+ * @returns {boolean} True when every own property is safe and fully mutable
55627
+ */
55628
+ const isSafeAndFullyMutable = (obj) => {
55629
+ if (!Object.isExtensible(obj)) {
55630
+ return false;
55631
+ }
55632
+
55633
+ const props = Object.getOwnPropertyNames(obj);
55634
+
55635
+ if (Object.getOwnPropertySymbols) {
55636
+ props.push(...Object.getOwnPropertySymbols(obj));
55637
+ }
55638
+
55639
+ return props.every((prop) => {
55640
+ if (isUnsafeObjectKey(prop)) {
55641
+ return false;
55642
+ }
55643
+
55644
+ const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
55645
+
55646
+ return !!descriptor && descriptor.configurable && descriptor.writable === true;
55647
+ });
55648
+ };
55649
+
54676
55650
  /**
54677
- * Walk the prototype chain (excluding the shared Object.prototype) looking for
54678
- * an own `prop`. This distinguishes genuine own/inherited members — including
54679
- * class accessors and template prototypes — from members injected via
54680
- * Object.prototype pollution (e.g. `Object.prototype.username = '...'`), which
54681
- * live on Object.prototype itself and are therefore never matched.
55651
+ * Walk the prototype chain (excluding the source realm's Object.prototype)
55652
+ * looking for an own `prop`. This distinguishes genuine own/inherited members
55653
+ * — including class accessors and template prototypes — from members injected
55654
+ * via Object.prototype pollution (e.g. `Object.prototype.username = '...'`),
55655
+ * which live on Object.prototype itself and are therefore never matched.
54682
55656
  *
54683
55657
  * @param {*} thing The value whose chain to inspect
54684
55658
  * @param {string|symbol} prop The property key to look for
@@ -54689,16 +55663,22 @@ const hasOwnInPrototypeChain = (thing, prop) => {
54689
55663
  let obj = thing;
54690
55664
  const seen = [];
54691
55665
 
54692
- while (obj != null && obj !== Object.prototype) {
55666
+ while (obj != null) {
54693
55667
  if (seen.indexOf(obj) !== -1) {
54694
55668
  return false;
54695
55669
  }
54696
55670
  seen.push(obj);
54697
55671
 
55672
+ const prototype = getPrototypeOf(obj);
55673
+
55674
+ if (isPrototypeBoundary(obj, prototype, obj === thing)) {
55675
+ return false;
55676
+ }
55677
+
54698
55678
  if (hasOwnProperty(obj, prop)) {
54699
55679
  return true;
54700
55680
  }
54701
- obj = getPrototypeOf(obj);
55681
+ obj = prototype;
54702
55682
  }
54703
55683
  return false;
54704
55684
  };
@@ -54717,6 +55697,69 @@ const hasOwnInPrototypeChain = (thing, prop) => {
54717
55697
  const getSafeProp = (obj, prop) =>
54718
55698
  obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;
54719
55699
 
55700
+ /**
55701
+ * Flatten an object and its application-defined prototype chain into a
55702
+ * null-prototype object. Members inherited only from the source realm's
55703
+ * Object.prototype are deliberately excluded, while class/template members
55704
+ * below that boundary are preserved.
55705
+ *
55706
+ * @param {*} thing The value to flatten
55707
+ *
55708
+ * @returns {*} A null-prototype copy, or the original value when it is already
55709
+ * structurally safe or is not an object
55710
+ */
55711
+ const toSafeFlatObject = (thing) => {
55712
+ if (thing == null || (typeof thing !== 'object' && typeof thing !== 'function')) {
55713
+ return thing;
55714
+ }
55715
+
55716
+ const sourcePrototype = getPrototypeOf(thing);
55717
+
55718
+ if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {
55719
+ return thing;
55720
+ }
55721
+
55722
+ const result = Object.create(null);
55723
+ const merged = Object.create(null);
55724
+ const seen = [];
55725
+ let current = thing;
55726
+
55727
+ while (current != null) {
55728
+ if (seen.indexOf(current) !== -1) {
55729
+ break;
55730
+ }
55731
+
55732
+ seen.push(current);
55733
+
55734
+ const prototype = current === thing ? sourcePrototype : getPrototypeOf(current);
55735
+
55736
+ if (isPrototypeBoundary(current, prototype, current === thing)) {
55737
+ break;
55738
+ }
55739
+
55740
+ const props = Object.getOwnPropertyNames(current);
55741
+
55742
+ if (Object.getOwnPropertySymbols) {
55743
+ props.push(...Object.getOwnPropertySymbols(current));
55744
+ }
55745
+
55746
+ for (const prop of props) {
55747
+ if (isUnsafeObjectKey(prop)) {
55748
+ continue;
55749
+ }
55750
+
55751
+ if (!hasOwnProperty(merged, prop)) {
55752
+ result[prop] = thing[prop];
55753
+ merged[prop] = true;
55754
+ }
55755
+ }
55756
+
55757
+ current = prototype;
55758
+ }
55759
+
55760
+ return result;
55761
+ };
55762
+
54720
55763
  const kindOf = ((cache) => (thing) => {
54721
55764
  const str = toString.call(thing);
54722
55765
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -54848,12 +55891,10 @@ const isPlainObject = (val) => {
54848
55891
 
54849
55892
  const prototype = getPrototypeOf(val);
54850
55893
  return (
54851
- (prototype === null ||
54852
- prototype === Object.prototype ||
54853
- getPrototypeOf(prototype) === null) &&
54854
- // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
54855
- // Symbol.iterator as evidence the value is a tagged/iterable type rather
54856
- // than a plain object, while ignoring keys injected onto Object.prototype.
55894
+ (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&
55895
+ // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
55896
+ // evidence the value is tagged/iterable, while ignoring members reachable
55897
+ // only through shared or terminal prototype boundaries.
54857
55898
  !hasOwnInPrototypeChain(val, toStringTag) &&
54858
55899
  !hasOwnInPrototypeChain(val, iterator)
54859
55900
  );
@@ -54940,6 +55981,7 @@ const isBlob = kindOfTest('Blob');
54940
55981
  * @returns {boolean} True if value is a FileList, otherwise false
54941
55982
  */
54942
55983
  const isFileList = kindOfTest('FileList');
55984
+ const isSet = kindOfTest('Set');
54943
55985
 
54944
55986
  /**
54945
55987
  * Determine if a value is a Stream
@@ -55505,12 +56547,23 @@ const toJSONObject = (obj) => {
55505
56547
  if (!('toJSON' in source)) {
55506
56548
  // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).
55507
56549
  visited.add(source);
55508
- const target = isArray(source) ? [] : {};
55509
56550
 
55510
- forEach(source, (value, key) => {
55511
- const reducedValue = visit(value);
55512
- !isUndefined(reducedValue) && (target[key] = reducedValue);
55513
- });
56551
+ let target;
56552
+
56553
+ if (isSet(source)) {
56554
+ target = [];
56555
+ for (const value of source) {
56556
+ const reducedValue = visit(value);
56557
+ !isUndefined(reducedValue) && target.push(reducedValue);
56558
+ }
56559
+ } else {
56560
+ target = isArray(source) ? [] : {};
56561
+
56562
+ forEach(source, (value, key) => {
56563
+ const reducedValue = visit(value);
56564
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
56565
+ });
56566
+ }
55514
56567
 
55515
56568
  visited.delete(source);
55516
56569
 
@@ -55655,6 +56708,7 @@ const isSafeIterable = (thing) =>
55655
56708
  hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
55656
56709
  hasOwnInPrototypeChain,
55657
56710
  getSafeProp,
56711
+ toSafeFlatObject,
55658
56712
  reduceDescriptors,
55659
56713
  freezeMethods,
55660
56714
  toObjectSet,
@@ -77462,13 +78516,17 @@ let __webpack_exports__ = {};
77462
78516
  "use strict";
77463
78517
  __webpack_require__.r(__webpack_exports__);
77464
78518
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
78519
+ /* harmony export */ attachStepOperations: () => (/* reexport safe */ _step_operations_ts__WEBPACK_IMPORTED_MODULE_1__.attachStepOperations),
77465
78520
  /* harmony export */ defaultParseArazzoOptions: () => (/* reexport safe */ _parse_arazzo_ts__WEBPACK_IMPORTED_MODULE_0__.defaultOptions),
77466
- /* harmony export */ defaultParseOpenAPIOptions: () => (/* reexport safe */ _parse_openapi_ts__WEBPACK_IMPORTED_MODULE_1__.defaultOptions),
78521
+ /* harmony export */ defaultParseOpenAPIOptions: () => (/* reexport safe */ _parse_openapi_ts__WEBPACK_IMPORTED_MODULE_2__.defaultOptions),
78522
+ /* harmony export */ findStepOperation: () => (/* reexport safe */ _step_operations_ts__WEBPACK_IMPORTED_MODULE_1__.findStepOperation),
77467
78523
  /* harmony export */ parseArazzo: () => (/* reexport safe */ _parse_arazzo_ts__WEBPACK_IMPORTED_MODULE_0__.parse),
77468
- /* harmony export */ parseOpenAPI: () => (/* reexport safe */ _parse_openapi_ts__WEBPACK_IMPORTED_MODULE_1__.parse)
78524
+ /* harmony export */ parseOpenAPI: () => (/* reexport safe */ _parse_openapi_ts__WEBPACK_IMPORTED_MODULE_2__.parse)
77469
78525
  /* harmony export */ });
77470
78526
  /* harmony import */ var _parse_arazzo_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30089);
77471
- /* harmony import */ var _parse_openapi_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71228);
78527
+ /* harmony import */ var _step_operations_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94953);
78528
+ /* harmony import */ var _parse_openapi_ts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71228);
78529
+
77472
78530
 
77473
78531
 
77474
78532
  })();