@unicom-cloud/axios 0.1.1 → 0.1.3

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.
@@ -0,0 +1,274 @@
1
+ /* 2026-02-26 14:42:51 */
2
+ function M(e, t) {
3
+ return function() {
4
+ return e.apply(t, arguments);
5
+ };
6
+ }
7
+ const { toString: _ } = Object.prototype, { getPrototypeOf: F } = Object, { iterator: g, toStringTag: B } = Symbol, b = /* @__PURE__ */ ((e) => (t) => {
8
+ const n = _.call(t);
9
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
10
+ })(/* @__PURE__ */ Object.create(null)), c = (e) => (e = e.toLowerCase(), (t) => b(t) === e), O = (e) => (t) => typeof t === e, { isArray: p } = Array, a = O("undefined");
11
+ function d(e) {
12
+ return e !== null && !a(e) && e.constructor !== null && !a(e.constructor) && f(e.constructor.isBuffer) && e.constructor.isBuffer(e);
13
+ }
14
+ const C = c("ArrayBuffer");
15
+ function U(e) {
16
+ let t;
17
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && C(e.buffer), t;
18
+ }
19
+ const N = O("string"), f = O("function"), D = O("number"), y = (e) => e !== null && typeof e == "object", I = (e) => e === !0 || e === !1, w = (e) => {
20
+ if (b(e) !== "object")
21
+ return !1;
22
+ const t = F(e);
23
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(B in e) && !(g in e);
24
+ }, k = (e) => {
25
+ if (!y(e) || d(e))
26
+ return !1;
27
+ try {
28
+ return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
29
+ } catch {
30
+ return !1;
31
+ }
32
+ }, V = c("Date"), q = c("File"), H = c("Blob"), z = c("FileList"), G = (e) => y(e) && f(e.pipe);
33
+ function J() {
34
+ return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
35
+ }
36
+ const x = J(), P = typeof x.FormData < "u" ? x.FormData : void 0, K = (e) => {
37
+ let t;
38
+ return e && (P && e instanceof P || f(e.append) && ((t = b(e)) === "formdata" || // detect form-data instance
39
+ t === "object" && f(e.toString) && e.toString() === "[object FormData]"));
40
+ }, $ = c("URLSearchParams"), [W, Q, X, Y] = [
41
+ "ReadableStream",
42
+ "Request",
43
+ "Response",
44
+ "Headers"
45
+ ].map(c), Z = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
46
+ function m(e, t, { allOwnKeys: n = !1 } = {}) {
47
+ if (e === null || typeof e > "u")
48
+ return;
49
+ let r, s;
50
+ if (typeof e != "object" && (e = [e]), p(e))
51
+ for (r = 0, s = e.length; r < s; r++)
52
+ t.call(null, e[r], r, e);
53
+ else {
54
+ if (d(e))
55
+ return;
56
+ const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
57
+ let u;
58
+ for (r = 0; r < i; r++)
59
+ u = o[r], t.call(null, e[u], u, e);
60
+ }
61
+ }
62
+ function E(e, t) {
63
+ if (d(e))
64
+ return null;
65
+ t = t.toLowerCase();
66
+ const n = Object.keys(e);
67
+ let r = n.length, s;
68
+ for (; r-- > 0; )
69
+ if (s = n[r], t === s.toLowerCase())
70
+ return s;
71
+ return null;
72
+ }
73
+ const l = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, L = (e) => !a(e) && e !== l;
74
+ function h() {
75
+ const { caseless: e, skipUndefined: t } = L(this) && this || {}, n = {}, r = (s, o) => {
76
+ if (o === "__proto__" || o === "constructor" || o === "prototype")
77
+ return;
78
+ const i = e && E(n, o) || o;
79
+ w(n[i]) && w(s) ? n[i] = h(n[i], s) : w(s) ? n[i] = h({}, s) : p(s) ? n[i] = s.slice() : (!t || !a(s)) && (n[i] = s);
80
+ };
81
+ for (let s = 0, o = arguments.length; s < o; s++)
82
+ arguments[s] && m(arguments[s], r);
83
+ return n;
84
+ }
85
+ const j = (e, t, n, { allOwnKeys: r } = {}) => (m(
86
+ t,
87
+ (s, o) => {
88
+ n && f(s) ? Object.defineProperty(e, o, {
89
+ value: M(s, n),
90
+ writable: !0,
91
+ enumerable: !0,
92
+ configurable: !0
93
+ }) : Object.defineProperty(e, o, {
94
+ value: s,
95
+ writable: !0,
96
+ enumerable: !0,
97
+ configurable: !0
98
+ });
99
+ },
100
+ { allOwnKeys: r }
101
+ ), e), v = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), ee = (e, t, n, r) => {
102
+ e.prototype = Object.create(
103
+ t.prototype,
104
+ r
105
+ ), Object.defineProperty(e.prototype, "constructor", {
106
+ value: e,
107
+ writable: !0,
108
+ enumerable: !1,
109
+ configurable: !0
110
+ }), Object.defineProperty(e, "super", {
111
+ value: t.prototype
112
+ }), n && Object.assign(e.prototype, n);
113
+ }, te = (e, t, n, r) => {
114
+ let s, o, i;
115
+ const u = {};
116
+ if (t = t || {}, e == null) return t;
117
+ do {
118
+ for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
119
+ i = s[o], (!r || r(i, e, t)) && !u[i] && (t[i] = e[i], u[i] = !0);
120
+ e = n !== !1 && F(e);
121
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
122
+ return t;
123
+ }, ne = (e, t, n) => {
124
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
125
+ const r = e.indexOf(t, n);
126
+ return r !== -1 && r === n;
127
+ }, re = (e) => {
128
+ if (!e) return null;
129
+ if (p(e)) return e;
130
+ let t = e.length;
131
+ if (!D(t)) return null;
132
+ const n = new Array(t);
133
+ for (; t-- > 0; )
134
+ n[t] = e[t];
135
+ return n;
136
+ }, se = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && F(Uint8Array)), oe = (e, t) => {
137
+ const r = (e && e[g]).call(e);
138
+ let s;
139
+ for (; (s = r.next()) && !s.done; ) {
140
+ const o = s.value;
141
+ t.call(e, o[0], o[1]);
142
+ }
143
+ }, ie = (e, t) => {
144
+ let n;
145
+ const r = [];
146
+ for (; (n = e.exec(t)) !== null; )
147
+ r.push(n);
148
+ return r;
149
+ }, fe = c("HTMLFormElement"), ce = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, r, s) {
150
+ return r.toUpperCase() + s;
151
+ }), S = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ue = c("RegExp"), T = (e, t) => {
152
+ const n = Object.getOwnPropertyDescriptors(e), r = {};
153
+ m(n, (s, o) => {
154
+ let i;
155
+ (i = t(s, o, e)) !== !1 && (r[o] = i || s);
156
+ }), Object.defineProperties(e, r);
157
+ }, le = (e) => {
158
+ T(e, (t, n) => {
159
+ if (f(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
160
+ return !1;
161
+ const r = e[n];
162
+ if (f(r)) {
163
+ if (t.enumerable = !1, "writable" in t) {
164
+ t.writable = !1;
165
+ return;
166
+ }
167
+ t.set || (t.set = () => {
168
+ throw Error("Can not rewrite read-only method '" + n + "'");
169
+ });
170
+ }
171
+ });
172
+ }, ae = (e, t) => {
173
+ const n = {}, r = (s) => {
174
+ s.forEach((o) => {
175
+ n[o] = !0;
176
+ });
177
+ };
178
+ return p(e) ? r(e) : r(String(e).split(t)), n;
179
+ }, pe = () => {
180
+ }, de = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
181
+ function ye(e) {
182
+ return !!(e && f(e.append) && e[B] === "FormData" && e[g]);
183
+ }
184
+ const me = (e) => {
185
+ const t = new Array(10), n = (r, s) => {
186
+ if (y(r)) {
187
+ if (t.indexOf(r) >= 0)
188
+ return;
189
+ if (d(r))
190
+ return r;
191
+ if (!("toJSON" in r)) {
192
+ t[s] = r;
193
+ const o = p(r) ? [] : {};
194
+ return m(r, (i, u) => {
195
+ const A = n(i, s + 1);
196
+ !a(A) && (o[u] = A);
197
+ }), t[s] = void 0, o;
198
+ }
199
+ }
200
+ return r;
201
+ };
202
+ return n(e, 0);
203
+ }, we = c("AsyncFunction"), ge = (e) => e && (y(e) || f(e)) && f(e.then) && f(e.catch), R = ((e, t) => e ? setImmediate : t ? ((n, r) => (l.addEventListener(
204
+ "message",
205
+ ({ source: s, data: o }) => {
206
+ s === l && o === n && r.length && r.shift()();
207
+ },
208
+ !1
209
+ ), (s) => {
210
+ r.push(s), l.postMessage(n, "*");
211
+ }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", f(l.postMessage)), be = typeof queueMicrotask < "u" ? queueMicrotask.bind(l) : typeof process < "u" && process.nextTick || R, Oe = (e) => e != null && f(e[g]), he = {
212
+ isArray: p,
213
+ isArrayBuffer: C,
214
+ isBuffer: d,
215
+ isFormData: K,
216
+ isArrayBufferView: U,
217
+ isString: N,
218
+ isNumber: D,
219
+ isBoolean: I,
220
+ isObject: y,
221
+ isPlainObject: w,
222
+ isEmptyObject: k,
223
+ isReadableStream: W,
224
+ isRequest: Q,
225
+ isResponse: X,
226
+ isHeaders: Y,
227
+ isUndefined: a,
228
+ isDate: V,
229
+ isFile: q,
230
+ isBlob: H,
231
+ isRegExp: ue,
232
+ isFunction: f,
233
+ isStream: G,
234
+ isURLSearchParams: $,
235
+ isTypedArray: se,
236
+ isFileList: z,
237
+ forEach: m,
238
+ merge: h,
239
+ extend: j,
240
+ trim: Z,
241
+ stripBOM: v,
242
+ inherits: ee,
243
+ toFlatObject: te,
244
+ kindOf: b,
245
+ kindOfTest: c,
246
+ endsWith: ne,
247
+ toArray: re,
248
+ forEachEntry: oe,
249
+ matchAll: ie,
250
+ isHTMLForm: fe,
251
+ hasOwnProperty: S,
252
+ hasOwnProp: S,
253
+ // an alias to avoid ESLint no-prototype-builtins detection
254
+ reduceDescriptors: T,
255
+ freezeMethods: le,
256
+ toObjectSet: ae,
257
+ toCamelCase: ce,
258
+ noop: pe,
259
+ toFiniteNumber: de,
260
+ findKey: E,
261
+ global: l,
262
+ isContextDefined: L,
263
+ isSpecCompliantForm: ye,
264
+ toJSONObject: me,
265
+ isAsyncFn: we,
266
+ isThenable: ge,
267
+ setImmediate: R,
268
+ asap: be,
269
+ isIterable: Oe
270
+ };
271
+ export {
272
+ he as A,
273
+ M as b
274
+ };
@@ -0,0 +1,67 @@
1
+ /* 2026-02-26 14:42:51 */
2
+ import { A as O } from "./CYdDqQOh.js";
3
+ class t extends Error {
4
+ static from(R, e, i, _, E, a) {
5
+ const s = new t(
6
+ R.message,
7
+ e || R.code,
8
+ i,
9
+ _,
10
+ E
11
+ );
12
+ return s.cause = R, s.name = R.name, R.status != null && s.status == null && (s.status = R.status), a && Object.assign(s, a), s;
13
+ }
14
+ /**
15
+ * Create an Error with the specified message, config, error code, request and response.
16
+ *
17
+ * @param {string} message The error message.
18
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
19
+ * @param {Object} [config] The config.
20
+ * @param {Object} [request] The request.
21
+ * @param {Object} [response] The response.
22
+ *
23
+ * @returns {Error} The created error.
24
+ */
25
+ constructor(R, e, i, _, E) {
26
+ super(R), Object.defineProperty(this, "message", {
27
+ value: R,
28
+ enumerable: !0,
29
+ writable: !0,
30
+ configurable: !0
31
+ }), this.name = "AxiosError", this.isAxiosError = !0, e && (this.code = e), i && (this.config = i), _ && (this.request = _), E && (this.response = E, this.status = E.status);
32
+ }
33
+ toJSON() {
34
+ return {
35
+ // Standard
36
+ message: this.message,
37
+ name: this.name,
38
+ // Microsoft
39
+ description: this.description,
40
+ number: this.number,
41
+ // Mozilla
42
+ fileName: this.fileName,
43
+ lineNumber: this.lineNumber,
44
+ columnNumber: this.columnNumber,
45
+ stack: this.stack,
46
+ // Axios
47
+ config: O.toJSONObject(this.config),
48
+ code: this.code,
49
+ status: this.status
50
+ };
51
+ }
52
+ }
53
+ t.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
54
+ t.ERR_BAD_OPTION = "ERR_BAD_OPTION";
55
+ t.ECONNABORTED = "ECONNABORTED";
56
+ t.ETIMEDOUT = "ETIMEDOUT";
57
+ t.ERR_NETWORK = "ERR_NETWORK";
58
+ t.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
59
+ t.ERR_DEPRECATED = "ERR_DEPRECATED";
60
+ t.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
61
+ t.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
62
+ t.ERR_CANCELED = "ERR_CANCELED";
63
+ t.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
64
+ t.ERR_INVALID_URL = "ERR_INVALID_URL";
65
+ export {
66
+ t as A
67
+ };