@cccsaurora/clue-ui 1.2.0-dev.188 → 1.2.0-dev.197

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/{ActionForm-C8XrvDTk.js → ActionForm-TRst3ifX.js} +8 -38
  2. package/{AnnotationDetails-CPlwnO9z.js → AnnotationDetails-CvaOf3Jl.js} +2 -2
  3. package/{AnnotationPreview-CLC5iIYm.js → AnnotationPreview-B-DhbGyc.js} +1 -1
  4. package/{ClueEnrichContext-DzZhWGxh.js → ClueEnrichContext-BfhIZ_LV.js} +1 -1
  5. package/components/AnnotationDetailPopover.js +1 -1
  6. package/components/AnnotationDetails.js +3 -3
  7. package/components/AnnotationPreview.js +1 -1
  8. package/components/EnrichedCard.js +2 -2
  9. package/components/EnrichedChip.js +2 -2
  10. package/components/EnrichedTypography.js +2 -2
  11. package/components/RetryFailedEnrichments.js +1 -1
  12. package/components/SourcePicker.js +1 -1
  13. package/components/actions/ActionForm.js +1 -1
  14. package/components/actions/ExecutePopover.js +1 -1
  15. package/components/actions/ResultModal.js +1 -1
  16. package/components/enrichment/EnrichPopover.js +2 -1
  17. package/components/fetchers/Fetcher.js +1 -1
  18. package/components/group/GroupControl.js +2 -1
  19. package/components/stats/QueryStatus.js +1 -1
  20. package/hooks/ClueActionContext.d.ts +0 -5
  21. package/hooks/ClueActionContext.js +3 -3
  22. package/hooks/ClueEnrichContext.js +2 -2
  23. package/hooks/ClueFetcherContext.js +1 -1
  24. package/hooks/ClueGroupContext.js +1 -1
  25. package/hooks/CluePopupContext.js +2 -2
  26. package/hooks/ClueProvider.js +3 -3
  27. package/hooks/selectors.js +21 -9
  28. package/hooks/useActionResult.js +2 -2
  29. package/hooks/useAnnotations.js +2 -2
  30. package/hooks/useClue.js +1 -1
  31. package/hooks/useClueActions.js +1 -1
  32. package/hooks/useClueTypeConfig.js +1 -1
  33. package/hooks/useErrors.js +1 -1
  34. package/icons/Action.js +2 -2
  35. package/icons/Assessment.js +1 -1
  36. package/icons/Context.js +1 -1
  37. package/icons/Opinion.js +1 -1
  38. package/main.js +10 -9
  39. package/package.json +19 -19
  40. package/types/RunningActionData.d.ts +0 -2
  41. package/{useClueTypeConfig-CHWm5uda.js → useClueTypeConfig-Cx-Is721.js} +238 -173
@@ -278,7 +278,12 @@ const isFormData = (thing) => {
278
278
  kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
279
279
  };
280
280
  const isURLSearchParams = kindOfTest("URLSearchParams");
281
- const [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
281
+ const [isReadableStream, isRequest, isResponse, isHeaders] = [
282
+ "ReadableStream",
283
+ "Request",
284
+ "Response",
285
+ "Headers"
286
+ ].map(kindOfTest);
282
287
  const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
283
288
  function forEach(obj, fn, { allOwnKeys = false } = {}) {
284
289
  if (obj === null || typeof obj === "undefined") {
@@ -331,6 +336,9 @@ function merge() {
331
336
  const { caseless, skipUndefined } = isContextDefined(this) && this || {};
332
337
  const result = {};
333
338
  const assignValue = (val, key) => {
339
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
340
+ return;
341
+ }
334
342
  const targetKey = caseless && findKey(result, key) || key;
335
343
  if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
336
344
  result[targetKey] = merge(result[targetKey], val);
@@ -338,10 +346,8 @@ function merge() {
338
346
  result[targetKey] = merge({}, val);
339
347
  } else if (isArray(val)) {
340
348
  result[targetKey] = val.slice();
341
- } else {
342
- if (!skipUndefined || !isUndefined(val)) {
343
- result[targetKey] = val;
344
- }
349
+ } else if (!skipUndefined || !isUndefined(val)) {
350
+ result[targetKey] = val;
345
351
  }
346
352
  };
347
353
  for (let i = 0, l = arguments.length; i < l; i++) {
@@ -350,13 +356,27 @@ function merge() {
350
356
  return result;
351
357
  }
352
358
  const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
353
- forEach(b, (val, key) => {
354
- if (thisArg && isFunction$1(val)) {
355
- a[key] = bind(val, thisArg);
356
- } else {
357
- a[key] = val;
358
- }
359
- }, { allOwnKeys });
359
+ forEach(
360
+ b,
361
+ (val, key) => {
362
+ if (thisArg && isFunction$1(val)) {
363
+ Object.defineProperty(a, key, {
364
+ value: bind(val, thisArg),
365
+ writable: true,
366
+ enumerable: true,
367
+ configurable: true
368
+ });
369
+ } else {
370
+ Object.defineProperty(a, key, {
371
+ value: val,
372
+ writable: true,
373
+ enumerable: true,
374
+ configurable: true
375
+ });
376
+ }
377
+ },
378
+ { allOwnKeys }
379
+ );
360
380
  return a;
361
381
  };
362
382
  const stripBOM = (content) => {
@@ -365,9 +385,17 @@ const stripBOM = (content) => {
365
385
  }
366
386
  return content;
367
387
  };
368
- const inherits = (constructor, superConstructor, props, descriptors2) => {
369
- constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
370
- constructor.prototype.constructor = constructor;
388
+ const inherits = (constructor, superConstructor, props, descriptors) => {
389
+ constructor.prototype = Object.create(
390
+ superConstructor.prototype,
391
+ descriptors
392
+ );
393
+ Object.defineProperty(constructor.prototype, "constructor", {
394
+ value: constructor,
395
+ writable: true,
396
+ enumerable: false,
397
+ configurable: true
398
+ });
371
399
  Object.defineProperty(constructor, "super", {
372
400
  value: superConstructor.prototype
373
401
  });
@@ -438,19 +466,16 @@ const matchAll = (regExp, str) => {
438
466
  };
439
467
  const isHTMLForm = kindOfTest("HTMLFormElement");
440
468
  const toCamelCase = (str) => {
441
- return str.toLowerCase().replace(
442
- /[-_\s]([a-z\d])(\w*)/g,
443
- function replacer(m, p1, p2) {
444
- return p1.toUpperCase() + p2;
445
- }
446
- );
469
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
470
+ return p1.toUpperCase() + p2;
471
+ });
447
472
  };
448
473
  const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
449
474
  const isRegExp = kindOfTest("RegExp");
450
475
  const reduceDescriptors = (obj, reducer) => {
451
- const descriptors2 = Object.getOwnPropertyDescriptors(obj);
476
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
452
477
  const reducedDescriptors = {};
453
- forEach(descriptors2, (descriptor, name) => {
478
+ forEach(descriptors, (descriptor, name) => {
454
479
  let ret;
455
480
  if ((ret = reducer(descriptor, name, obj)) !== false) {
456
481
  reducedDescriptors[name] = ret || descriptor;
@@ -527,20 +552,21 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
527
552
  return setImmediate;
528
553
  }
529
554
  return postMessageSupported ? ((token, callbacks) => {
530
- _global.addEventListener("message", ({ source, data }) => {
531
- if (source === _global && data === token) {
532
- callbacks.length && callbacks.shift()();
533
- }
534
- }, false);
555
+ _global.addEventListener(
556
+ "message",
557
+ ({ source, data }) => {
558
+ if (source === _global && data === token) {
559
+ callbacks.length && callbacks.shift()();
560
+ }
561
+ },
562
+ false
563
+ );
535
564
  return (cb) => {
536
565
  callbacks.push(cb);
537
566
  _global.postMessage(token, "*");
538
567
  };
539
568
  })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
540
- })(
541
- typeof setImmediate === "function",
542
- isFunction$1(_global.postMessage)
543
- );
569
+ })(typeof setImmediate === "function", isFunction$1(_global.postMessage));
544
570
  const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
545
571
  const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
546
572
  const utils$1 = {
@@ -603,25 +629,38 @@ const utils$1 = {
603
629
  asap,
604
630
  isIterable
605
631
  };
606
- function AxiosError$1(message, code, config, request, response) {
607
- Error.call(this);
608
- if (Error.captureStackTrace) {
609
- Error.captureStackTrace(this, this.constructor);
610
- } else {
611
- this.stack = new Error().stack;
612
- }
613
- this.message = message;
614
- this.name = "AxiosError";
615
- code && (this.code = code);
616
- config && (this.config = config);
617
- request && (this.request = request);
618
- if (response) {
619
- this.response = response;
620
- this.status = response.status ? response.status : null;
632
+ let AxiosError$1 = class AxiosError extends Error {
633
+ static from(error, code, config, request, response, customProps) {
634
+ const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
635
+ axiosError.cause = error;
636
+ axiosError.name = error.name;
637
+ customProps && Object.assign(axiosError, customProps);
638
+ return axiosError;
621
639
  }
622
- }
623
- utils$1.inherits(AxiosError$1, Error, {
624
- toJSON: function toJSON() {
640
+ /**
641
+ * Create an Error with the specified message, config, error code, request and response.
642
+ *
643
+ * @param {string} message The error message.
644
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
645
+ * @param {Object} [config] The config.
646
+ * @param {Object} [request] The request.
647
+ * @param {Object} [response] The response.
648
+ *
649
+ * @returns {Error} The created error.
650
+ */
651
+ constructor(message, code, config, request, response) {
652
+ super(message);
653
+ this.name = "AxiosError";
654
+ this.isAxiosError = true;
655
+ code && (this.code = code);
656
+ config && (this.config = config);
657
+ request && (this.request = request);
658
+ if (response) {
659
+ this.response = response;
660
+ this.status = response.status;
661
+ }
662
+ }
663
+ toJSON() {
625
664
  return {
626
665
  // Standard
627
666
  message: this.message,
@@ -640,45 +679,19 @@ utils$1.inherits(AxiosError$1, Error, {
640
679
  status: this.status
641
680
  };
642
681
  }
643
- });
644
- const prototype$1 = AxiosError$1.prototype;
645
- const descriptors = {};
646
- [
647
- "ERR_BAD_OPTION_VALUE",
648
- "ERR_BAD_OPTION",
649
- "ECONNABORTED",
650
- "ETIMEDOUT",
651
- "ERR_NETWORK",
652
- "ERR_FR_TOO_MANY_REDIRECTS",
653
- "ERR_DEPRECATED",
654
- "ERR_BAD_RESPONSE",
655
- "ERR_BAD_REQUEST",
656
- "ERR_CANCELED",
657
- "ERR_NOT_SUPPORT",
658
- "ERR_INVALID_URL"
659
- // eslint-disable-next-line func-names
660
- ].forEach((code) => {
661
- descriptors[code] = { value: code };
662
- });
663
- Object.defineProperties(AxiosError$1, descriptors);
664
- Object.defineProperty(prototype$1, "isAxiosError", { value: true });
665
- AxiosError$1.from = (error, code, config, request, response, customProps) => {
666
- const axiosError = Object.create(prototype$1);
667
- utils$1.toFlatObject(error, axiosError, function filter2(obj) {
668
- return obj !== Error.prototype;
669
- }, (prop) => {
670
- return prop !== "isAxiosError";
671
- });
672
- const msg = error && error.message ? error.message : "Error";
673
- const errCode = code == null && error ? error.code : code;
674
- AxiosError$1.call(axiosError, msg, errCode, config, request, response);
675
- if (error && axiosError.cause == null) {
676
- Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
677
- }
678
- axiosError.name = error && error.name || "Error";
679
- customProps && Object.assign(axiosError, customProps);
680
- return axiosError;
681
682
  };
683
+ AxiosError$1.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
684
+ AxiosError$1.ERR_BAD_OPTION = "ERR_BAD_OPTION";
685
+ AxiosError$1.ECONNABORTED = "ECONNABORTED";
686
+ AxiosError$1.ETIMEDOUT = "ETIMEDOUT";
687
+ AxiosError$1.ERR_NETWORK = "ERR_NETWORK";
688
+ AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
689
+ AxiosError$1.ERR_DEPRECATED = "ERR_DEPRECATED";
690
+ AxiosError$1.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
691
+ AxiosError$1.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
692
+ AxiosError$1.ERR_CANCELED = "ERR_CANCELED";
693
+ AxiosError$1.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
694
+ AxiosError$1.ERR_INVALID_URL = "ERR_INVALID_URL";
682
695
  const httpAdapter = null;
683
696
  function isVisitable(thing) {
684
697
  return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
@@ -830,17 +843,15 @@ function buildURL(url, params, options) {
830
843
  return url;
831
844
  }
832
845
  const _encode = options && options.encode || encode;
833
- if (utils$1.isFunction(options)) {
834
- options = {
835
- serialize: options
836
- };
837
- }
838
- const serializeFn = options && options.serialize;
846
+ const _options = utils$1.isFunction(options) ? {
847
+ serialize: options
848
+ } : options;
849
+ const serializeFn = _options && _options.serialize;
839
850
  let serializedParams;
840
851
  if (serializeFn) {
841
- serializedParams = serializeFn(params, options);
852
+ serializedParams = serializeFn(params, _options);
842
853
  } else {
843
- serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
854
+ serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
844
855
  }
845
856
  if (serializedParams) {
846
857
  const hashmarkIndex = url.indexOf("#");
@@ -860,6 +871,7 @@ class InterceptorManager {
860
871
  *
861
872
  * @param {Function} fulfilled The function to handle `then` for a `Promise`
862
873
  * @param {Function} rejected The function to handle `reject` for a `Promise`
874
+ * @param {Object} options The options for the interceptor, synchronous and runWhen
863
875
  *
864
876
  * @return {Number} An ID used to remove interceptor later
865
877
  */
@@ -877,7 +889,7 @@ class InterceptorManager {
877
889
  *
878
890
  * @param {Number} id The ID that was returned by `use`
879
891
  *
880
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
892
+ * @returns {void}
881
893
  */
882
894
  eject(id) {
883
895
  if (this.handlers[id]) {
@@ -915,7 +927,8 @@ class InterceptorManager {
915
927
  const transitionalDefaults = {
916
928
  silentJSONParsing: true,
917
929
  forcedJSONParsing: true,
918
- clarifyTimeoutError: false
930
+ clarifyTimeoutError: false,
931
+ legacyInterceptorReqResOrdering: true
919
932
  };
920
933
  const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
921
934
  const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
@@ -1400,13 +1413,22 @@ function transformData(fns, response) {
1400
1413
  function isCancel$1(value) {
1401
1414
  return !!(value && value.__CANCEL__);
1402
1415
  }
1403
- function CanceledError$1(message, config, request) {
1404
- AxiosError$1.call(this, message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config, request);
1405
- this.name = "CanceledError";
1406
- }
1407
- utils$1.inherits(CanceledError$1, AxiosError$1, {
1408
- __CANCEL__: true
1409
- });
1416
+ let CanceledError$1 = class CanceledError extends AxiosError$1 {
1417
+ /**
1418
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
1419
+ *
1420
+ * @param {string=} message The message.
1421
+ * @param {Object=} config The config.
1422
+ * @param {Object=} request The request.
1423
+ *
1424
+ * @returns {CanceledError} The created error.
1425
+ */
1426
+ constructor(message, config, request) {
1427
+ super(message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config, request);
1428
+ this.name = "CanceledError";
1429
+ this.__CANCEL__ = true;
1430
+ }
1431
+ };
1410
1432
  function settle(resolve, reject, response) {
1411
1433
  const validateStatus2 = response.config.validateStatus;
1412
1434
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
@@ -1533,20 +1555,33 @@ const isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origi
1533
1555
  const cookies = platform.hasStandardBrowserEnv ? (
1534
1556
  // Standard browser envs support document.cookie
1535
1557
  {
1536
- write(name, value, expires, path, domain, secure) {
1537
- const cookie = [name + "=" + encodeURIComponent(value)];
1538
- utils$1.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
1539
- utils$1.isString(path) && cookie.push("path=" + path);
1540
- utils$1.isString(domain) && cookie.push("domain=" + domain);
1541
- secure === true && cookie.push("secure");
1558
+ write(name, value, expires, path, domain, secure, sameSite) {
1559
+ if (typeof document === "undefined") return;
1560
+ const cookie = [`${name}=${encodeURIComponent(value)}`];
1561
+ if (utils$1.isNumber(expires)) {
1562
+ cookie.push(`expires=${new Date(expires).toUTCString()}`);
1563
+ }
1564
+ if (utils$1.isString(path)) {
1565
+ cookie.push(`path=${path}`);
1566
+ }
1567
+ if (utils$1.isString(domain)) {
1568
+ cookie.push(`domain=${domain}`);
1569
+ }
1570
+ if (secure === true) {
1571
+ cookie.push("secure");
1572
+ }
1573
+ if (utils$1.isString(sameSite)) {
1574
+ cookie.push(`SameSite=${sameSite}`);
1575
+ }
1542
1576
  document.cookie = cookie.join("; ");
1543
1577
  },
1544
1578
  read(name) {
1545
- const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
1546
- return match ? decodeURIComponent(match[3]) : null;
1579
+ if (typeof document === "undefined") return null;
1580
+ const match = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
1581
+ return match ? decodeURIComponent(match[1]) : null;
1547
1582
  },
1548
1583
  remove(name) {
1549
- this.write(name, "", Date.now() - 864e5);
1584
+ this.write(name, "", Date.now() - 864e5, "/");
1550
1585
  }
1551
1586
  }
1552
1587
  ) : (
@@ -1562,6 +1597,9 @@ const cookies = platform.hasStandardBrowserEnv ? (
1562
1597
  }
1563
1598
  );
1564
1599
  function isAbsoluteURL(url) {
1600
+ if (typeof url !== "string") {
1601
+ return false;
1602
+ }
1565
1603
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
1566
1604
  }
1567
1605
  function combineURLs(baseURL, relativeURL) {
@@ -1645,11 +1683,16 @@ function mergeConfig$1(config1, config2) {
1645
1683
  validateStatus: mergeDirectKeys,
1646
1684
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
1647
1685
  };
1648
- utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
1649
- const merge2 = mergeMap[prop] || mergeDeepProperties;
1650
- const configValue = merge2(config1[prop], config2[prop], prop);
1651
- utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
1652
- });
1686
+ utils$1.forEach(
1687
+ Object.keys({ ...config1, ...config2 }),
1688
+ function computeConfigValue(prop) {
1689
+ if (prop === "__proto__" || prop === "constructor" || prop === "prototype")
1690
+ return;
1691
+ const merge2 = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
1692
+ const configValue = merge2(config1[prop], config2[prop], prop);
1693
+ utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
1694
+ }
1695
+ );
1653
1696
  return config;
1654
1697
  }
1655
1698
  const resolveConfig = (config) => {
@@ -1830,7 +1873,7 @@ const composeSignals = (signals, timeout) => {
1830
1873
  };
1831
1874
  let timer = timeout && setTimeout(() => {
1832
1875
  timer = null;
1833
- onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
1876
+ onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
1834
1877
  }, timeout);
1835
1878
  const unsubscribe = () => {
1836
1879
  if (signals) {
@@ -1925,8 +1968,7 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
1925
1968
  };
1926
1969
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
1927
1970
  const { isFunction } = utils$1;
1928
- const globalFetchAPI = (({ fetch, Request, Response }) => ({
1929
- fetch,
1971
+ const globalFetchAPI = (({ Request, Response }) => ({
1930
1972
  Request,
1931
1973
  Response
1932
1974
  }))(utils$1.global);
@@ -1942,8 +1984,11 @@ const test = (fn, ...args) => {
1942
1984
  }
1943
1985
  };
1944
1986
  const factory = (env) => {
1945
- const { fetch, Request, Response } = Object.assign({}, globalFetchAPI, env);
1946
- const isFetchSupported = isFunction(fetch);
1987
+ env = utils$1.merge.call({
1988
+ skipUndefined: true
1989
+ }, globalFetchAPI, env);
1990
+ const { fetch: envFetch, Request, Response } = env;
1991
+ const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === "function";
1947
1992
  const isRequestSupported = isFunction(Request);
1948
1993
  const isResponseSupported = isFunction(Response);
1949
1994
  if (!isFetchSupported) {
@@ -2021,6 +2066,7 @@ const factory = (env) => {
2021
2066
  withCredentials = "same-origin",
2022
2067
  fetchOptions
2023
2068
  } = resolveConfig(config);
2069
+ let _fetch = envFetch || fetch;
2024
2070
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
2025
2071
  let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
2026
2072
  let request = null;
@@ -2061,7 +2107,7 @@ const factory = (env) => {
2061
2107
  credentials: isCredentialsSupported ? withCredentials : void 0
2062
2108
  };
2063
2109
  request = isRequestSupported && new Request(url, resolvedOptions);
2064
- let response = await (isRequestSupported ? fetch(request, fetchOptions) : fetch(url, resolvedOptions));
2110
+ let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
2065
2111
  const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
2066
2112
  if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
2067
2113
  const options = {};
@@ -2098,26 +2144,24 @@ const factory = (env) => {
2098
2144
  unsubscribe && unsubscribe();
2099
2145
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
2100
2146
  throw Object.assign(
2101
- new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request),
2147
+ new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request, err && err.response),
2102
2148
  {
2103
2149
  cause: err.cause || err
2104
2150
  }
2105
2151
  );
2106
2152
  }
2107
- throw AxiosError$1.from(err, err && err.code, config, request);
2153
+ throw AxiosError$1.from(err, err && err.code, config, request, err && err.response);
2108
2154
  }
2109
2155
  };
2110
2156
  };
2111
2157
  const seedCache = /* @__PURE__ */ new Map();
2112
2158
  const getFetch = (config) => {
2113
- let env = utils$1.merge.call({
2114
- skipUndefined: true
2115
- }, globalFetchAPI, config ? config.env : null);
2116
- const { fetch, Request, Response } = env;
2159
+ let env = config && config.env || {};
2160
+ const { fetch: fetch2, Request, Response } = env;
2117
2161
  const seeds = [
2118
2162
  Request,
2119
2163
  Response,
2120
- fetch
2164
+ fetch2
2121
2165
  ];
2122
2166
  let len = seeds.length, i = len, seed, target, map = seedCache;
2123
2167
  while (i--) {
@@ -2147,40 +2191,49 @@ utils$1.forEach(knownAdapters, (fn, value) => {
2147
2191
  });
2148
2192
  const renderReason = (reason) => `- ${reason}`;
2149
2193
  const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
2194
+ function getAdapter$1(adapters2, config) {
2195
+ adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
2196
+ const { length } = adapters2;
2197
+ let nameOrAdapter;
2198
+ let adapter;
2199
+ const rejectedReasons = {};
2200
+ for (let i = 0; i < length; i++) {
2201
+ nameOrAdapter = adapters2[i];
2202
+ let id;
2203
+ adapter = nameOrAdapter;
2204
+ if (!isResolvedHandle(nameOrAdapter)) {
2205
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
2206
+ if (adapter === void 0) {
2207
+ throw new AxiosError$1(`Unknown adapter '${id}'`);
2208
+ }
2209
+ }
2210
+ if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
2211
+ break;
2212
+ }
2213
+ rejectedReasons[id || "#" + i] = adapter;
2214
+ }
2215
+ if (!adapter) {
2216
+ const reasons = Object.entries(rejectedReasons).map(
2217
+ ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
2218
+ );
2219
+ let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
2220
+ throw new AxiosError$1(
2221
+ `There is no suitable adapter to dispatch the request ` + s,
2222
+ "ERR_NOT_SUPPORT"
2223
+ );
2224
+ }
2225
+ return adapter;
2226
+ }
2150
2227
  const adapters = {
2151
- getAdapter: (adapters2, config) => {
2152
- adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
2153
- const { length } = adapters2;
2154
- let nameOrAdapter;
2155
- let adapter;
2156
- const rejectedReasons = {};
2157
- for (let i = 0; i < length; i++) {
2158
- nameOrAdapter = adapters2[i];
2159
- let id;
2160
- adapter = nameOrAdapter;
2161
- if (!isResolvedHandle(nameOrAdapter)) {
2162
- adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
2163
- if (adapter === void 0) {
2164
- throw new AxiosError$1(`Unknown adapter '${id}'`);
2165
- }
2166
- }
2167
- if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
2168
- break;
2169
- }
2170
- rejectedReasons[id || "#" + i] = adapter;
2171
- }
2172
- if (!adapter) {
2173
- const reasons = Object.entries(rejectedReasons).map(
2174
- ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
2175
- );
2176
- let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
2177
- throw new AxiosError$1(
2178
- `There is no suitable adapter to dispatch the request ` + s,
2179
- "ERR_NOT_SUPPORT"
2180
- );
2181
- }
2182
- return adapter;
2183
- },
2228
+ /**
2229
+ * Resolve an adapter from a list of adapter names or functions.
2230
+ * @type {Function}
2231
+ */
2232
+ getAdapter: getAdapter$1,
2233
+ /**
2234
+ * Exposes all known adapters
2235
+ * @type {Object<string, Function|Object>}
2236
+ */
2184
2237
  adapters: knownAdapters
2185
2238
  };
2186
2239
  function throwIfCancellationRequested(config) {
@@ -2226,7 +2279,7 @@ function dispatchRequest(config) {
2226
2279
  return Promise.reject(reason);
2227
2280
  });
2228
2281
  }
2229
- const VERSION$1 = "1.12.0";
2282
+ const VERSION$1 = "1.13.5";
2230
2283
  const validators$1 = {};
2231
2284
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
2232
2285
  validators$1[type] = function validator2(thing) {
@@ -2339,7 +2392,8 @@ let Axios$1 = class Axios {
2339
2392
  validator.assertOptions(transitional2, {
2340
2393
  silentJSONParsing: validators.transitional(validators.boolean),
2341
2394
  forcedJSONParsing: validators.transitional(validators.boolean),
2342
- clarifyTimeoutError: validators.transitional(validators.boolean)
2395
+ clarifyTimeoutError: validators.transitional(validators.boolean),
2396
+ legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
2343
2397
  }, false);
2344
2398
  }
2345
2399
  if (paramsSerializer != null) {
@@ -2383,7 +2437,13 @@ let Axios$1 = class Axios {
2383
2437
  return;
2384
2438
  }
2385
2439
  synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
2386
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
2440
+ const transitional3 = config.transitional || transitionalDefaults;
2441
+ const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering;
2442
+ if (legacyInterceptorReqResOrdering) {
2443
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
2444
+ } else {
2445
+ requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
2446
+ }
2387
2447
  });
2388
2448
  const responseInterceptorChain = [];
2389
2449
  this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
@@ -2405,7 +2465,6 @@ let Axios$1 = class Axios {
2405
2465
  }
2406
2466
  len = requestInterceptorChain.length;
2407
2467
  let newConfig = config;
2408
- i = 0;
2409
2468
  while (i < len) {
2410
2469
  const onFulfilled = requestInterceptorChain[i++];
2411
2470
  const onRejected = requestInterceptorChain[i++];
@@ -2625,7 +2684,13 @@ const HttpStatusCode$1 = {
2625
2684
  InsufficientStorage: 507,
2626
2685
  LoopDetected: 508,
2627
2686
  NotExtended: 510,
2628
- NetworkAuthenticationRequired: 511
2687
+ NetworkAuthenticationRequired: 511,
2688
+ WebServerIsDown: 521,
2689
+ ConnectionTimedOut: 522,
2690
+ OriginIsUnreachable: 523,
2691
+ TimeoutOccurred: 524,
2692
+ SslHandshakeFailed: 525,
2693
+ InvalidSslCertificate: 526
2629
2694
  };
2630
2695
  Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
2631
2696
  HttpStatusCode$1[value] = key;
@@ -2662,8 +2727,8 @@ axios.HttpStatusCode = HttpStatusCode$1;
2662
2727
  axios.default = axios;
2663
2728
  const {
2664
2729
  Axios: Axios2,
2665
- AxiosError,
2666
- CanceledError,
2730
+ AxiosError: AxiosError2,
2731
+ CanceledError: CanceledError2,
2667
2732
  isCancel,
2668
2733
  CancelToken: CancelToken2,
2669
2734
  VERSION,
@@ -2970,7 +3035,7 @@ class AxiosClient {
2970
3035
  const response = await this.client(config);
2971
3036
  return [response.data, response.status, response.headers];
2972
3037
  } catch (e) {
2973
- if (e instanceof AxiosError && ((_a = e.response) == null ? void 0 : _a.data)) {
3038
+ if (e instanceof AxiosError2 && ((_a = e.response) == null ? void 0 : _a.data)) {
2974
3039
  return [e.response.data, e.response.status, e.response.headers];
2975
3040
  }
2976
3041
  throw e;