@fecp/mobile 1.0.26 → 1.0.27

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 (123) hide show
  1. package/es/mobile.css +1 -0
  2. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/index.mjs +38 -0
  3. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/adapters/adapters.mjs +60 -0
  4. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/adapters/fetch.mjs +174 -0
  5. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/adapters/xhr.mjs +138 -0
  6. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/axios.mjs +50 -0
  7. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/cancel/CancelToken.mjs +99 -0
  8. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/cancel/CanceledError.mjs +12 -0
  9. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/cancel/isCancel.mjs +6 -0
  10. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/Axios.mjs +181 -0
  11. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/AxiosError.mjs +76 -0
  12. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/AxiosHeaders.mjs +223 -0
  13. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/InterceptorManager.mjs +65 -0
  14. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/buildFullPath.mjs +12 -0
  15. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/dispatchRequest.mjs +52 -0
  16. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/mergeConfig.mjs +83 -0
  17. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/settle.mjs +18 -0
  18. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/transformData.mjs +17 -0
  19. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/defaults/index.mjs +116 -0
  20. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/defaults/transitional.mjs +8 -0
  21. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/env/data.mjs +4 -0
  22. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/AxiosURLSearchParams.mjs +34 -0
  23. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/HttpStatusCode.mjs +71 -0
  24. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/bind.mjs +8 -0
  25. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/buildURL.mjs +34 -0
  26. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/combineURLs.mjs +6 -0
  27. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/composeSignals.mjs +39 -0
  28. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/cookies.mjs +36 -0
  29. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/formDataToJSON.mjs +54 -0
  30. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/isAbsoluteURL.mjs +6 -0
  31. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/isAxiosError.mjs +7 -0
  32. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/isURLSameOrigin.mjs +11 -0
  33. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/null.mjs +4 -0
  34. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/parseHeaders.mjs +47 -0
  35. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/parseProtocol.mjs +7 -0
  36. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/progressEventReducer.mjs +41 -0
  37. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/resolveConfig.mjs +42 -0
  38. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/speedometer.mjs +36 -0
  39. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/spread.mjs +8 -0
  40. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/throttle.mjs +35 -0
  41. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/toFormData.mjs +114 -0
  42. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/toURLEncodedForm.mjs +17 -0
  43. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/trackStream.mjs +80 -0
  44. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/validator.mjs +67 -0
  45. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/classes/Blob.mjs +4 -0
  46. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/classes/FormData.mjs +4 -0
  47. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/classes/URLSearchParams.mjs +5 -0
  48. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/index.mjs +15 -0
  49. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/common/utils.mjs +15 -0
  50. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/index.mjs +9 -0
  51. package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/utils.mjs +364 -0
  52. package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/composables/use-tab-status.mjs +4 -2
  53. package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/list/List.mjs +145 -0
  54. package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/list/index.mjs +8 -0
  55. package/es/packages/mobile/index.mjs +2 -0
  56. package/es/packages/mobile/src/axios/config.mjs +105 -0
  57. package/es/packages/mobile/src/axios/index.mjs +11 -0
  58. package/es/packages/mobile/src/components/all.mjs +2 -0
  59. package/es/packages/mobile/src/components/dataDisplay/list/List.vue.mjs +100 -0
  60. package/es/packages/mobile/src/components/dataDisplay/list/index.mjs +7 -0
  61. package/es/packages/mobile/src/utils/dataSourceUtil.mjs +71 -0
  62. package/lib/mobile.css +1 -0
  63. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/index.js +38 -0
  64. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/adapters/adapters.js +60 -0
  65. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/adapters/fetch.js +174 -0
  66. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/adapters/xhr.js +138 -0
  67. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/axios.js +50 -0
  68. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/cancel/CancelToken.js +99 -0
  69. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/cancel/CanceledError.js +12 -0
  70. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/cancel/isCancel.js +6 -0
  71. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/Axios.js +181 -0
  72. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/AxiosError.js +76 -0
  73. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/AxiosHeaders.js +223 -0
  74. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/InterceptorManager.js +65 -0
  75. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/buildFullPath.js +12 -0
  76. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/dispatchRequest.js +52 -0
  77. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/mergeConfig.js +83 -0
  78. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/settle.js +18 -0
  79. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/transformData.js +17 -0
  80. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/defaults/index.js +116 -0
  81. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/defaults/transitional.js +8 -0
  82. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/env/data.js +4 -0
  83. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +34 -0
  84. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
  85. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/bind.js +8 -0
  86. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/buildURL.js +34 -0
  87. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/combineURLs.js +6 -0
  88. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/composeSignals.js +39 -0
  89. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/cookies.js +36 -0
  90. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/formDataToJSON.js +54 -0
  91. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/isAbsoluteURL.js +6 -0
  92. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/isAxiosError.js +7 -0
  93. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/isURLSameOrigin.js +11 -0
  94. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/null.js +4 -0
  95. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/parseHeaders.js +47 -0
  96. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/parseProtocol.js +7 -0
  97. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/progressEventReducer.js +41 -0
  98. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/resolveConfig.js +42 -0
  99. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/speedometer.js +36 -0
  100. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/spread.js +8 -0
  101. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/throttle.js +35 -0
  102. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/toFormData.js +114 -0
  103. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/toURLEncodedForm.js +17 -0
  104. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/trackStream.js +80 -0
  105. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/validator.js +67 -0
  106. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/classes/Blob.js +4 -0
  107. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/classes/FormData.js +4 -0
  108. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +5 -0
  109. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/index.js +15 -0
  110. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/common/utils.js +15 -0
  111. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/index.js +9 -0
  112. package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/utils.js +364 -0
  113. package/lib/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/composables/use-tab-status.js +3 -1
  114. package/lib/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/list/List.js +145 -0
  115. package/lib/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/list/index.js +7 -0
  116. package/lib/packages/mobile/index.js +92 -90
  117. package/lib/packages/mobile/src/axios/config.js +105 -0
  118. package/lib/packages/mobile/src/axios/index.js +11 -0
  119. package/lib/packages/mobile/src/components/all.js +92 -90
  120. package/lib/packages/mobile/src/components/dataDisplay/list/List.vue.js +100 -0
  121. package/lib/packages/mobile/src/components/dataDisplay/list/index.js +7 -0
  122. package/lib/packages/mobile/src/utils/dataSourceUtil.js +71 -0
  123. package/package.json +1 -1
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const CanceledError = require("./CanceledError.js");
4
+ class CancelToken {
5
+ constructor(executor) {
6
+ if (typeof executor !== "function") {
7
+ throw new TypeError("executor must be a function.");
8
+ }
9
+ let resolvePromise;
10
+ this.promise = new Promise(function promiseExecutor(resolve) {
11
+ resolvePromise = resolve;
12
+ });
13
+ const token = this;
14
+ this.promise.then((cancel) => {
15
+ if (!token._listeners) return;
16
+ let i = token._listeners.length;
17
+ while (i-- > 0) {
18
+ token._listeners[i](cancel);
19
+ }
20
+ token._listeners = null;
21
+ });
22
+ this.promise.then = (onfulfilled) => {
23
+ let _resolve;
24
+ const promise = new Promise((resolve) => {
25
+ token.subscribe(resolve);
26
+ _resolve = resolve;
27
+ }).then(onfulfilled);
28
+ promise.cancel = function reject() {
29
+ token.unsubscribe(_resolve);
30
+ };
31
+ return promise;
32
+ };
33
+ executor(function cancel(message, config, request) {
34
+ if (token.reason) {
35
+ return;
36
+ }
37
+ token.reason = new CanceledError.default(message, config, request);
38
+ resolvePromise(token.reason);
39
+ });
40
+ }
41
+ /**
42
+ * Throws a `CanceledError` if cancellation has been requested.
43
+ */
44
+ throwIfRequested() {
45
+ if (this.reason) {
46
+ throw this.reason;
47
+ }
48
+ }
49
+ /**
50
+ * Subscribe to the cancel signal
51
+ */
52
+ subscribe(listener) {
53
+ if (this.reason) {
54
+ listener(this.reason);
55
+ return;
56
+ }
57
+ if (this._listeners) {
58
+ this._listeners.push(listener);
59
+ } else {
60
+ this._listeners = [listener];
61
+ }
62
+ }
63
+ /**
64
+ * Unsubscribe from the cancel signal
65
+ */
66
+ unsubscribe(listener) {
67
+ if (!this._listeners) {
68
+ return;
69
+ }
70
+ const index = this._listeners.indexOf(listener);
71
+ if (index !== -1) {
72
+ this._listeners.splice(index, 1);
73
+ }
74
+ }
75
+ toAbortSignal() {
76
+ const controller = new AbortController();
77
+ const abort = (err) => {
78
+ controller.abort(err);
79
+ };
80
+ this.subscribe(abort);
81
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
82
+ return controller.signal;
83
+ }
84
+ /**
85
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
86
+ * cancels the `CancelToken`.
87
+ */
88
+ static source() {
89
+ let cancel;
90
+ const token = new CancelToken(function executor(c) {
91
+ cancel = c;
92
+ });
93
+ return {
94
+ token,
95
+ cancel
96
+ };
97
+ }
98
+ }
99
+ exports.default = CancelToken;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const AxiosError = require("../core/AxiosError.js");
4
+ const utils = require("../utils.js");
5
+ function CanceledError(message, config, request) {
6
+ AxiosError.default.call(this, message == null ? "canceled" : message, AxiosError.default.ERR_CANCELED, config, request);
7
+ this.name = "CanceledError";
8
+ }
9
+ utils.default.inherits(CanceledError, AxiosError.default, {
10
+ __CANCEL__: true
11
+ });
12
+ exports.default = CanceledError;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ function isCancel(value) {
4
+ return !!(value && value.__CANCEL__);
5
+ }
6
+ exports.default = isCancel;
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const utils = require("../utils.js");
4
+ const buildURL = require("../helpers/buildURL.js");
5
+ const InterceptorManager = require("./InterceptorManager.js");
6
+ const dispatchRequest = require("./dispatchRequest.js");
7
+ const mergeConfig = require("./mergeConfig.js");
8
+ const buildFullPath = require("./buildFullPath.js");
9
+ const validator = require("../helpers/validator.js");
10
+ const AxiosHeaders = require("./AxiosHeaders.js");
11
+ const validators = validator.default.validators;
12
+ class Axios {
13
+ constructor(instanceConfig) {
14
+ this.defaults = instanceConfig;
15
+ this.interceptors = {
16
+ request: new InterceptorManager.default(),
17
+ response: new InterceptorManager.default()
18
+ };
19
+ }
20
+ /**
21
+ * Dispatch a request
22
+ *
23
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
24
+ * @param {?Object} config
25
+ *
26
+ * @returns {Promise} The Promise to be fulfilled
27
+ */
28
+ async request(configOrUrl, config) {
29
+ try {
30
+ return await this._request(configOrUrl, config);
31
+ } catch (err) {
32
+ if (err instanceof Error) {
33
+ let dummy = {};
34
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
35
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
36
+ try {
37
+ if (!err.stack) {
38
+ err.stack = stack;
39
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
40
+ err.stack += "\n" + stack;
41
+ }
42
+ } catch (e) {
43
+ }
44
+ }
45
+ throw err;
46
+ }
47
+ }
48
+ _request(configOrUrl, config) {
49
+ if (typeof configOrUrl === "string") {
50
+ config = config || {};
51
+ config.url = configOrUrl;
52
+ } else {
53
+ config = configOrUrl || {};
54
+ }
55
+ config = mergeConfig.default(this.defaults, config);
56
+ const { transitional, paramsSerializer, headers } = config;
57
+ if (transitional !== void 0) {
58
+ validator.default.assertOptions(transitional, {
59
+ silentJSONParsing: validators.transitional(validators.boolean),
60
+ forcedJSONParsing: validators.transitional(validators.boolean),
61
+ clarifyTimeoutError: validators.transitional(validators.boolean)
62
+ }, false);
63
+ }
64
+ if (paramsSerializer != null) {
65
+ if (utils.default.isFunction(paramsSerializer)) {
66
+ config.paramsSerializer = {
67
+ serialize: paramsSerializer
68
+ };
69
+ } else {
70
+ validator.default.assertOptions(paramsSerializer, {
71
+ encode: validators.function,
72
+ serialize: validators.function
73
+ }, true);
74
+ }
75
+ }
76
+ if (config.allowAbsoluteUrls !== void 0) ;
77
+ else if (this.defaults.allowAbsoluteUrls !== void 0) {
78
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
79
+ } else {
80
+ config.allowAbsoluteUrls = true;
81
+ }
82
+ validator.default.assertOptions(config, {
83
+ baseUrl: validators.spelling("baseURL"),
84
+ withXsrfToken: validators.spelling("withXSRFToken")
85
+ }, true);
86
+ config.method = (config.method || this.defaults.method || "get").toLowerCase();
87
+ let contextHeaders = headers && utils.default.merge(
88
+ headers.common,
89
+ headers[config.method]
90
+ );
91
+ headers && utils.default.forEach(
92
+ ["delete", "get", "head", "post", "put", "patch", "common"],
93
+ (method) => {
94
+ delete headers[method];
95
+ }
96
+ );
97
+ config.headers = AxiosHeaders.default.concat(contextHeaders, headers);
98
+ const requestInterceptorChain = [];
99
+ let synchronousRequestInterceptors = true;
100
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
101
+ if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
102
+ return;
103
+ }
104
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
105
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
106
+ });
107
+ const responseInterceptorChain = [];
108
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
109
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
110
+ });
111
+ let promise;
112
+ let i = 0;
113
+ let len;
114
+ if (!synchronousRequestInterceptors) {
115
+ const chain = [dispatchRequest.default.bind(this), void 0];
116
+ chain.unshift.apply(chain, requestInterceptorChain);
117
+ chain.push.apply(chain, responseInterceptorChain);
118
+ len = chain.length;
119
+ promise = Promise.resolve(config);
120
+ while (i < len) {
121
+ promise = promise.then(chain[i++], chain[i++]);
122
+ }
123
+ return promise;
124
+ }
125
+ len = requestInterceptorChain.length;
126
+ let newConfig = config;
127
+ i = 0;
128
+ while (i < len) {
129
+ const onFulfilled = requestInterceptorChain[i++];
130
+ const onRejected = requestInterceptorChain[i++];
131
+ try {
132
+ newConfig = onFulfilled(newConfig);
133
+ } catch (error) {
134
+ onRejected.call(this, error);
135
+ break;
136
+ }
137
+ }
138
+ try {
139
+ promise = dispatchRequest.default.call(this, newConfig);
140
+ } catch (error) {
141
+ return Promise.reject(error);
142
+ }
143
+ i = 0;
144
+ len = responseInterceptorChain.length;
145
+ while (i < len) {
146
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
147
+ }
148
+ return promise;
149
+ }
150
+ getUri(config) {
151
+ config = mergeConfig.default(this.defaults, config);
152
+ const fullPath = buildFullPath.default(config.baseURL, config.url, config.allowAbsoluteUrls);
153
+ return buildURL.default(fullPath, config.params, config.paramsSerializer);
154
+ }
155
+ }
156
+ utils.default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
157
+ Axios.prototype[method] = function(url, config) {
158
+ return this.request(mergeConfig.default(config || {}, {
159
+ method,
160
+ url,
161
+ data: (config || {}).data
162
+ }));
163
+ };
164
+ });
165
+ utils.default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
166
+ function generateHTTPMethod(isForm) {
167
+ return function httpMethod(url, data, config) {
168
+ return this.request(mergeConfig.default(config || {}, {
169
+ method,
170
+ headers: isForm ? {
171
+ "Content-Type": "multipart/form-data"
172
+ } : {},
173
+ url,
174
+ data
175
+ }));
176
+ };
177
+ }
178
+ Axios.prototype[method] = generateHTTPMethod();
179
+ Axios.prototype[method + "Form"] = generateHTTPMethod(true);
180
+ });
181
+ exports.default = Axios;
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const utils = require("../utils.js");
4
+ function AxiosError(message, code, config, request, response) {
5
+ Error.call(this);
6
+ if (Error.captureStackTrace) {
7
+ Error.captureStackTrace(this, this.constructor);
8
+ } else {
9
+ this.stack = new Error().stack;
10
+ }
11
+ this.message = message;
12
+ this.name = "AxiosError";
13
+ code && (this.code = code);
14
+ config && (this.config = config);
15
+ request && (this.request = request);
16
+ if (response) {
17
+ this.response = response;
18
+ this.status = response.status ? response.status : null;
19
+ }
20
+ }
21
+ utils.default.inherits(AxiosError, Error, {
22
+ toJSON: function toJSON() {
23
+ return {
24
+ // Standard
25
+ message: this.message,
26
+ name: this.name,
27
+ // Microsoft
28
+ description: this.description,
29
+ number: this.number,
30
+ // Mozilla
31
+ fileName: this.fileName,
32
+ lineNumber: this.lineNumber,
33
+ columnNumber: this.columnNumber,
34
+ stack: this.stack,
35
+ // Axios
36
+ config: utils.default.toJSONObject(this.config),
37
+ code: this.code,
38
+ status: this.status
39
+ };
40
+ }
41
+ });
42
+ const prototype = AxiosError.prototype;
43
+ const descriptors = {};
44
+ [
45
+ "ERR_BAD_OPTION_VALUE",
46
+ "ERR_BAD_OPTION",
47
+ "ECONNABORTED",
48
+ "ETIMEDOUT",
49
+ "ERR_NETWORK",
50
+ "ERR_FR_TOO_MANY_REDIRECTS",
51
+ "ERR_DEPRECATED",
52
+ "ERR_BAD_RESPONSE",
53
+ "ERR_BAD_REQUEST",
54
+ "ERR_CANCELED",
55
+ "ERR_NOT_SUPPORT",
56
+ "ERR_INVALID_URL"
57
+ // eslint-disable-next-line func-names
58
+ ].forEach((code) => {
59
+ descriptors[code] = { value: code };
60
+ });
61
+ Object.defineProperties(AxiosError, descriptors);
62
+ Object.defineProperty(prototype, "isAxiosError", { value: true });
63
+ AxiosError.from = (error, code, config, request, response, customProps) => {
64
+ const axiosError = Object.create(prototype);
65
+ utils.default.toFlatObject(error, axiosError, function filter(obj) {
66
+ return obj !== Error.prototype;
67
+ }, (prop) => {
68
+ return prop !== "isAxiosError";
69
+ });
70
+ AxiosError.call(axiosError, error.message, code, config, request, response);
71
+ axiosError.cause = error;
72
+ axiosError.name = error.name;
73
+ customProps && Object.assign(axiosError, customProps);
74
+ return axiosError;
75
+ };
76
+ exports.default = AxiosError;
@@ -0,0 +1,223 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const utils = require("../utils.js");
4
+ const parseHeaders = require("../helpers/parseHeaders.js");
5
+ const $internals = Symbol("internals");
6
+ function normalizeHeader(header) {
7
+ return header && String(header).trim().toLowerCase();
8
+ }
9
+ function normalizeValue(value) {
10
+ if (value === false || value == null) {
11
+ return value;
12
+ }
13
+ return utils.default.isArray(value) ? value.map(normalizeValue) : String(value);
14
+ }
15
+ function parseTokens(str) {
16
+ const tokens = /* @__PURE__ */ Object.create(null);
17
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
18
+ let match;
19
+ while (match = tokensRE.exec(str)) {
20
+ tokens[match[1]] = match[2];
21
+ }
22
+ return tokens;
23
+ }
24
+ const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
25
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
26
+ if (utils.default.isFunction(filter)) {
27
+ return filter.call(this, value, header);
28
+ }
29
+ if (isHeaderNameFilter) {
30
+ value = header;
31
+ }
32
+ if (!utils.default.isString(value)) return;
33
+ if (utils.default.isString(filter)) {
34
+ return value.indexOf(filter) !== -1;
35
+ }
36
+ if (utils.default.isRegExp(filter)) {
37
+ return filter.test(value);
38
+ }
39
+ }
40
+ function formatHeader(header) {
41
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
42
+ return char.toUpperCase() + str;
43
+ });
44
+ }
45
+ function buildAccessors(obj, header) {
46
+ const accessorName = utils.default.toCamelCase(" " + header);
47
+ ["get", "set", "has"].forEach((methodName) => {
48
+ Object.defineProperty(obj, methodName + accessorName, {
49
+ value: function(arg1, arg2, arg3) {
50
+ return this[methodName].call(this, header, arg1, arg2, arg3);
51
+ },
52
+ configurable: true
53
+ });
54
+ });
55
+ }
56
+ class AxiosHeaders {
57
+ constructor(headers) {
58
+ headers && this.set(headers);
59
+ }
60
+ set(header, valueOrRewrite, rewrite) {
61
+ const self = this;
62
+ function setHeader(_value, _header, _rewrite) {
63
+ const lHeader = normalizeHeader(_header);
64
+ if (!lHeader) {
65
+ throw new Error("header name must be a non-empty string");
66
+ }
67
+ const key = utils.default.findKey(self, lHeader);
68
+ if (!key || self[key] === void 0 || _rewrite === true || _rewrite === void 0 && self[key] !== false) {
69
+ self[key || _header] = normalizeValue(_value);
70
+ }
71
+ }
72
+ const setHeaders = (headers, _rewrite) => utils.default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
73
+ if (utils.default.isPlainObject(header) || header instanceof this.constructor) {
74
+ setHeaders(header, valueOrRewrite);
75
+ } else if (utils.default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
76
+ setHeaders(parseHeaders.default(header), valueOrRewrite);
77
+ } else if (utils.default.isHeaders(header)) {
78
+ for (const [key, value] of header.entries()) {
79
+ setHeader(value, key, rewrite);
80
+ }
81
+ } else {
82
+ header != null && setHeader(valueOrRewrite, header, rewrite);
83
+ }
84
+ return this;
85
+ }
86
+ get(header, parser) {
87
+ header = normalizeHeader(header);
88
+ if (header) {
89
+ const key = utils.default.findKey(this, header);
90
+ if (key) {
91
+ const value = this[key];
92
+ if (!parser) {
93
+ return value;
94
+ }
95
+ if (parser === true) {
96
+ return parseTokens(value);
97
+ }
98
+ if (utils.default.isFunction(parser)) {
99
+ return parser.call(this, value, key);
100
+ }
101
+ if (utils.default.isRegExp(parser)) {
102
+ return parser.exec(value);
103
+ }
104
+ throw new TypeError("parser must be boolean|regexp|function");
105
+ }
106
+ }
107
+ }
108
+ has(header, matcher) {
109
+ header = normalizeHeader(header);
110
+ if (header) {
111
+ const key = utils.default.findKey(this, header);
112
+ return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
113
+ }
114
+ return false;
115
+ }
116
+ delete(header, matcher) {
117
+ const self = this;
118
+ let deleted = false;
119
+ function deleteHeader(_header) {
120
+ _header = normalizeHeader(_header);
121
+ if (_header) {
122
+ const key = utils.default.findKey(self, _header);
123
+ if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
124
+ delete self[key];
125
+ deleted = true;
126
+ }
127
+ }
128
+ }
129
+ if (utils.default.isArray(header)) {
130
+ header.forEach(deleteHeader);
131
+ } else {
132
+ deleteHeader(header);
133
+ }
134
+ return deleted;
135
+ }
136
+ clear(matcher) {
137
+ const keys = Object.keys(this);
138
+ let i = keys.length;
139
+ let deleted = false;
140
+ while (i--) {
141
+ const key = keys[i];
142
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
143
+ delete this[key];
144
+ deleted = true;
145
+ }
146
+ }
147
+ return deleted;
148
+ }
149
+ normalize(format) {
150
+ const self = this;
151
+ const headers = {};
152
+ utils.default.forEach(this, (value, header) => {
153
+ const key = utils.default.findKey(headers, header);
154
+ if (key) {
155
+ self[key] = normalizeValue(value);
156
+ delete self[header];
157
+ return;
158
+ }
159
+ const normalized = format ? formatHeader(header) : String(header).trim();
160
+ if (normalized !== header) {
161
+ delete self[header];
162
+ }
163
+ self[normalized] = normalizeValue(value);
164
+ headers[normalized] = true;
165
+ });
166
+ return this;
167
+ }
168
+ concat(...targets) {
169
+ return this.constructor.concat(this, ...targets);
170
+ }
171
+ toJSON(asStrings) {
172
+ const obj = /* @__PURE__ */ Object.create(null);
173
+ utils.default.forEach(this, (value, header) => {
174
+ value != null && value !== false && (obj[header] = asStrings && utils.default.isArray(value) ? value.join(", ") : value);
175
+ });
176
+ return obj;
177
+ }
178
+ [Symbol.iterator]() {
179
+ return Object.entries(this.toJSON())[Symbol.iterator]();
180
+ }
181
+ toString() {
182
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
183
+ }
184
+ get [Symbol.toStringTag]() {
185
+ return "AxiosHeaders";
186
+ }
187
+ static from(thing) {
188
+ return thing instanceof this ? thing : new this(thing);
189
+ }
190
+ static concat(first, ...targets) {
191
+ const computed = new this(first);
192
+ targets.forEach((target) => computed.set(target));
193
+ return computed;
194
+ }
195
+ static accessor(header) {
196
+ const internals = this[$internals] = this[$internals] = {
197
+ accessors: {}
198
+ };
199
+ const accessors = internals.accessors;
200
+ const prototype = this.prototype;
201
+ function defineAccessor(_header) {
202
+ const lHeader = normalizeHeader(_header);
203
+ if (!accessors[lHeader]) {
204
+ buildAccessors(prototype, _header);
205
+ accessors[lHeader] = true;
206
+ }
207
+ }
208
+ utils.default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
209
+ return this;
210
+ }
211
+ }
212
+ AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
213
+ utils.default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
214
+ let mapped = key[0].toUpperCase() + key.slice(1);
215
+ return {
216
+ get: () => value,
217
+ set(headerValue) {
218
+ this[mapped] = headerValue;
219
+ }
220
+ };
221
+ });
222
+ utils.default.freezeMethods(AxiosHeaders);
223
+ exports.default = AxiosHeaders;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const utils = require("../utils.js");
4
+ class InterceptorManager {
5
+ constructor() {
6
+ this.handlers = [];
7
+ }
8
+ /**
9
+ * Add a new interceptor to the stack
10
+ *
11
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
12
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
13
+ *
14
+ * @return {Number} An ID used to remove interceptor later
15
+ */
16
+ use(fulfilled, rejected, options) {
17
+ this.handlers.push({
18
+ fulfilled,
19
+ rejected,
20
+ synchronous: options ? options.synchronous : false,
21
+ runWhen: options ? options.runWhen : null
22
+ });
23
+ return this.handlers.length - 1;
24
+ }
25
+ /**
26
+ * Remove an interceptor from the stack
27
+ *
28
+ * @param {Number} id The ID that was returned by `use`
29
+ *
30
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
31
+ */
32
+ eject(id) {
33
+ if (this.handlers[id]) {
34
+ this.handlers[id] = null;
35
+ }
36
+ }
37
+ /**
38
+ * Clear all interceptors from the stack
39
+ *
40
+ * @returns {void}
41
+ */
42
+ clear() {
43
+ if (this.handlers) {
44
+ this.handlers = [];
45
+ }
46
+ }
47
+ /**
48
+ * Iterate over all the registered interceptors
49
+ *
50
+ * This method is particularly useful for skipping over any
51
+ * interceptors that may have become `null` calling `eject`.
52
+ *
53
+ * @param {Function} fn The function to call for each interceptor
54
+ *
55
+ * @returns {void}
56
+ */
57
+ forEach(fn) {
58
+ utils.default.forEach(this.handlers, function forEachHandler(h) {
59
+ if (h !== null) {
60
+ fn(h);
61
+ }
62
+ });
63
+ }
64
+ }
65
+ exports.default = InterceptorManager;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const isAbsoluteURL = require("../helpers/isAbsoluteURL.js");
4
+ const combineURLs = require("../helpers/combineURLs.js");
5
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
6
+ let isRelativeUrl = !isAbsoluteURL.default(requestedURL);
7
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
8
+ return combineURLs.default(baseURL, requestedURL);
9
+ }
10
+ return requestedURL;
11
+ }
12
+ exports.default = buildFullPath;