@dev-coindcx/network 1.0.0-test

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.
package/dist/index.js ADDED
@@ -0,0 +1,1472 @@
1
+ var Ue = Object.defineProperty;
2
+ var je = (e, t, n) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var se = (e, t, n) => (je(e, typeof t != "symbol" ? t + "" : t, n), n);
4
+ function me(e, t) {
5
+ return function() {
6
+ return e.apply(t, arguments);
7
+ };
8
+ }
9
+ const { toString: Ie } = Object.prototype, { getPrototypeOf: Z } = Object, H = ((e) => (t) => {
10
+ const n = Ie.call(t);
11
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
12
+ })(/* @__PURE__ */ Object.create(null)), O = (e) => (e = e.toLowerCase(), (t) => H(t) === e), M = (e) => (t) => typeof t === e, { isArray: C } = Array, F = M("undefined");
13
+ function ke(e) {
14
+ return e !== null && !F(e) && e.constructor !== null && !F(e.constructor) && b(e.constructor.isBuffer) && e.constructor.isBuffer(e);
15
+ }
16
+ const ye = O("ArrayBuffer");
17
+ function He(e) {
18
+ let t;
19
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ye(e.buffer), t;
20
+ }
21
+ const Me = M("string"), b = M("function"), Ee = M("number"), q = (e) => e !== null && typeof e == "object", qe = (e) => e === !0 || e === !1, L = (e) => {
22
+ if (H(e) !== "object")
23
+ return !1;
24
+ const t = Z(e);
25
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
26
+ }, ze = O("Date"), Je = O("File"), $e = O("Blob"), Ve = O("FileList"), We = (e) => q(e) && b(e.pipe), Ke = (e) => {
27
+ let t;
28
+ return e && (typeof FormData == "function" && e instanceof FormData || b(e.append) && ((t = H(e)) === "formdata" || // detect form-data instance
29
+ t === "object" && b(e.toString) && e.toString() === "[object FormData]"));
30
+ }, Ge = O("URLSearchParams"), Xe = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
31
+ function B(e, t, { allOwnKeys: n = !1 } = {}) {
32
+ if (e === null || typeof e > "u")
33
+ return;
34
+ let r, s;
35
+ if (typeof e != "object" && (e = [e]), C(e))
36
+ for (r = 0, s = e.length; r < s; r++)
37
+ t.call(null, e[r], r, e);
38
+ else {
39
+ const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
40
+ let u;
41
+ for (r = 0; r < i; r++)
42
+ u = o[r], t.call(null, e[u], u, e);
43
+ }
44
+ }
45
+ function we(e, t) {
46
+ t = t.toLowerCase();
47
+ const n = Object.keys(e);
48
+ let r = n.length, s;
49
+ for (; r-- > 0; )
50
+ if (s = n[r], t === s.toLowerCase())
51
+ return s;
52
+ return null;
53
+ }
54
+ const be = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Se = (e) => !F(e) && e !== be;
55
+ function X() {
56
+ const { caseless: e } = Se(this) && this || {}, t = {}, n = (r, s) => {
57
+ const o = e && we(t, s) || s;
58
+ L(t[o]) && L(r) ? t[o] = X(t[o], r) : L(r) ? t[o] = X({}, r) : C(r) ? t[o] = r.slice() : t[o] = r;
59
+ };
60
+ for (let r = 0, s = arguments.length; r < s; r++)
61
+ arguments[r] && B(arguments[r], n);
62
+ return t;
63
+ }
64
+ const ve = (e, t, n, { allOwnKeys: r } = {}) => (B(t, (s, o) => {
65
+ n && b(s) ? e[o] = me(s, n) : e[o] = s;
66
+ }, { allOwnKeys: r }), e), Qe = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ye = (e, t, n, r) => {
67
+ e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
68
+ value: t.prototype
69
+ }), n && Object.assign(e.prototype, n);
70
+ }, Ze = (e, t, n, r) => {
71
+ let s, o, i;
72
+ const u = {};
73
+ if (t = t || {}, e == null)
74
+ return t;
75
+ do {
76
+ for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
77
+ i = s[o], (!r || r(i, e, t)) && !u[i] && (t[i] = e[i], u[i] = !0);
78
+ e = n !== !1 && Z(e);
79
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
80
+ return t;
81
+ }, et = (e, t, n) => {
82
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
83
+ const r = e.indexOf(t, n);
84
+ return r !== -1 && r === n;
85
+ }, tt = (e) => {
86
+ if (!e)
87
+ return null;
88
+ if (C(e))
89
+ return e;
90
+ let t = e.length;
91
+ if (!Ee(t))
92
+ return null;
93
+ const n = new Array(t);
94
+ for (; t-- > 0; )
95
+ n[t] = e[t];
96
+ return n;
97
+ }, nt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Z(Uint8Array)), rt = (e, t) => {
98
+ const r = (e && e[Symbol.iterator]).call(e);
99
+ let s;
100
+ for (; (s = r.next()) && !s.done; ) {
101
+ const o = s.value;
102
+ t.call(e, o[0], o[1]);
103
+ }
104
+ }, st = (e, t) => {
105
+ let n;
106
+ const r = [];
107
+ for (; (n = e.exec(t)) !== null; )
108
+ r.push(n);
109
+ return r;
110
+ }, ot = O("HTMLFormElement"), it = (e) => e.toLowerCase().replace(
111
+ /[-_\s]([a-z\d])(\w*)/g,
112
+ function(n, r, s) {
113
+ return r.toUpperCase() + s;
114
+ }
115
+ ), oe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), at = O("RegExp"), Re = (e, t) => {
116
+ const n = Object.getOwnPropertyDescriptors(e), r = {};
117
+ B(n, (s, o) => {
118
+ t(s, o, e) !== !1 && (r[o] = s);
119
+ }), Object.defineProperties(e, r);
120
+ }, ct = (e) => {
121
+ Re(e, (t, n) => {
122
+ if (b(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
123
+ return !1;
124
+ const r = e[n];
125
+ if (b(r)) {
126
+ if (t.enumerable = !1, "writable" in t) {
127
+ t.writable = !1;
128
+ return;
129
+ }
130
+ t.set || (t.set = () => {
131
+ throw Error("Can not rewrite read-only method '" + n + "'");
132
+ });
133
+ }
134
+ });
135
+ }, ut = (e, t) => {
136
+ const n = {}, r = (s) => {
137
+ s.forEach((o) => {
138
+ n[o] = !0;
139
+ });
140
+ };
141
+ return C(e) ? r(e) : r(String(e).split(t)), n;
142
+ }, lt = () => {
143
+ }, ft = (e, t) => (e = +e, Number.isFinite(e) ? e : t), V = "abcdefghijklmnopqrstuvwxyz", ie = "0123456789", Oe = {
144
+ DIGIT: ie,
145
+ ALPHA: V,
146
+ ALPHA_DIGIT: V + V.toUpperCase() + ie
147
+ }, dt = (e = 16, t = Oe.ALPHA_DIGIT) => {
148
+ let n = "";
149
+ const { length: r } = t;
150
+ for (; e--; )
151
+ n += t[Math.random() * r | 0];
152
+ return n;
153
+ };
154
+ function pt(e) {
155
+ return !!(e && b(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
156
+ }
157
+ const ht = (e) => {
158
+ const t = new Array(10), n = (r, s) => {
159
+ if (q(r)) {
160
+ if (t.indexOf(r) >= 0)
161
+ return;
162
+ if (!("toJSON" in r)) {
163
+ t[s] = r;
164
+ const o = C(r) ? [] : {};
165
+ return B(r, (i, u) => {
166
+ const d = n(i, s + 1);
167
+ !F(d) && (o[u] = d);
168
+ }), t[s] = void 0, o;
169
+ }
170
+ }
171
+ return r;
172
+ };
173
+ return n(e, 0);
174
+ }, mt = O("AsyncFunction"), yt = (e) => e && (q(e) || b(e)) && b(e.then) && b(e.catch), a = {
175
+ isArray: C,
176
+ isArrayBuffer: ye,
177
+ isBuffer: ke,
178
+ isFormData: Ke,
179
+ isArrayBufferView: He,
180
+ isString: Me,
181
+ isNumber: Ee,
182
+ isBoolean: qe,
183
+ isObject: q,
184
+ isPlainObject: L,
185
+ isUndefined: F,
186
+ isDate: ze,
187
+ isFile: Je,
188
+ isBlob: $e,
189
+ isRegExp: at,
190
+ isFunction: b,
191
+ isStream: We,
192
+ isURLSearchParams: Ge,
193
+ isTypedArray: nt,
194
+ isFileList: Ve,
195
+ forEach: B,
196
+ merge: X,
197
+ extend: ve,
198
+ trim: Xe,
199
+ stripBOM: Qe,
200
+ inherits: Ye,
201
+ toFlatObject: Ze,
202
+ kindOf: H,
203
+ kindOfTest: O,
204
+ endsWith: et,
205
+ toArray: tt,
206
+ forEachEntry: rt,
207
+ matchAll: st,
208
+ isHTMLForm: ot,
209
+ hasOwnProperty: oe,
210
+ hasOwnProp: oe,
211
+ // an alias to avoid ESLint no-prototype-builtins detection
212
+ reduceDescriptors: Re,
213
+ freezeMethods: ct,
214
+ toObjectSet: ut,
215
+ toCamelCase: it,
216
+ noop: lt,
217
+ toFiniteNumber: ft,
218
+ findKey: we,
219
+ global: be,
220
+ isContextDefined: Se,
221
+ ALPHABET: Oe,
222
+ generateString: dt,
223
+ isSpecCompliantForm: pt,
224
+ toJSONObject: ht,
225
+ isAsyncFn: mt,
226
+ isThenable: yt
227
+ };
228
+ function m(e, t, n, r, s) {
229
+ Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s);
230
+ }
231
+ a.inherits(m, Error, {
232
+ toJSON: function() {
233
+ return {
234
+ // Standard
235
+ message: this.message,
236
+ name: this.name,
237
+ // Microsoft
238
+ description: this.description,
239
+ number: this.number,
240
+ // Mozilla
241
+ fileName: this.fileName,
242
+ lineNumber: this.lineNumber,
243
+ columnNumber: this.columnNumber,
244
+ stack: this.stack,
245
+ // Axios
246
+ config: a.toJSONObject(this.config),
247
+ code: this.code,
248
+ status: this.response && this.response.status ? this.response.status : null
249
+ };
250
+ }
251
+ });
252
+ const Ae = m.prototype, Te = {};
253
+ [
254
+ "ERR_BAD_OPTION_VALUE",
255
+ "ERR_BAD_OPTION",
256
+ "ECONNABORTED",
257
+ "ETIMEDOUT",
258
+ "ERR_NETWORK",
259
+ "ERR_FR_TOO_MANY_REDIRECTS",
260
+ "ERR_DEPRECATED",
261
+ "ERR_BAD_RESPONSE",
262
+ "ERR_BAD_REQUEST",
263
+ "ERR_CANCELED",
264
+ "ERR_NOT_SUPPORT",
265
+ "ERR_INVALID_URL"
266
+ // eslint-disable-next-line func-names
267
+ ].forEach((e) => {
268
+ Te[e] = { value: e };
269
+ });
270
+ Object.defineProperties(m, Te);
271
+ Object.defineProperty(Ae, "isAxiosError", { value: !0 });
272
+ m.from = (e, t, n, r, s, o) => {
273
+ const i = Object.create(Ae);
274
+ return a.toFlatObject(e, i, function(d) {
275
+ return d !== Error.prototype;
276
+ }, (u) => u !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
277
+ };
278
+ const Et = null;
279
+ function v(e) {
280
+ return a.isPlainObject(e) || a.isArray(e);
281
+ }
282
+ function xe(e) {
283
+ return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
284
+ }
285
+ function ae(e, t, n) {
286
+ return e ? e.concat(t).map(function(s, o) {
287
+ return s = xe(s), !n && o ? "[" + s + "]" : s;
288
+ }).join(n ? "." : "") : t;
289
+ }
290
+ function wt(e) {
291
+ return a.isArray(e) && !e.some(v);
292
+ }
293
+ const bt = a.toFlatObject(a, {}, null, function(t) {
294
+ return /^is[A-Z]/.test(t);
295
+ });
296
+ function z(e, t, n) {
297
+ if (!a.isObject(e))
298
+ throw new TypeError("target must be an object");
299
+ t = t || new FormData(), n = a.toFlatObject(n, {
300
+ metaTokens: !0,
301
+ dots: !1,
302
+ indexes: !1
303
+ }, !1, function(h, A) {
304
+ return !a.isUndefined(A[h]);
305
+ });
306
+ const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
307
+ if (!a.isFunction(s))
308
+ throw new TypeError("visitor must be a function");
309
+ function c(f) {
310
+ if (f === null)
311
+ return "";
312
+ if (a.isDate(f))
313
+ return f.toISOString();
314
+ if (!d && a.isBlob(f))
315
+ throw new m("Blob is not supported. Use a Buffer instead.");
316
+ return a.isArrayBuffer(f) || a.isTypedArray(f) ? d && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
317
+ }
318
+ function l(f, h, A) {
319
+ let S = f;
320
+ if (f && !A && typeof f == "object") {
321
+ if (a.endsWith(h, "{}"))
322
+ h = r ? h : h.slice(0, -2), f = JSON.stringify(f);
323
+ else if (a.isArray(f) && wt(f) || (a.isFileList(f) || a.endsWith(h, "[]")) && (S = a.toArray(f)))
324
+ return h = xe(h), S.forEach(function(_, Le) {
325
+ !(a.isUndefined(_) || _ === null) && t.append(
326
+ // eslint-disable-next-line no-nested-ternary
327
+ i === !0 ? ae([h], Le, o) : i === null ? h : h + "[]",
328
+ c(_)
329
+ );
330
+ }), !1;
331
+ }
332
+ return v(f) ? !0 : (t.append(ae(A, h, o), c(f)), !1);
333
+ }
334
+ const p = [], w = Object.assign(bt, {
335
+ defaultVisitor: l,
336
+ convertValue: c,
337
+ isVisitable: v
338
+ });
339
+ function y(f, h) {
340
+ if (!a.isUndefined(f)) {
341
+ if (p.indexOf(f) !== -1)
342
+ throw Error("Circular reference detected in " + h.join("."));
343
+ p.push(f), a.forEach(f, function(S, N) {
344
+ (!(a.isUndefined(S) || S === null) && s.call(
345
+ t,
346
+ S,
347
+ a.isString(N) ? N.trim() : N,
348
+ h,
349
+ w
350
+ )) === !0 && y(S, h ? h.concat(N) : [N]);
351
+ }), p.pop();
352
+ }
353
+ }
354
+ if (!a.isObject(e))
355
+ throw new TypeError("data must be an object");
356
+ return y(e), t;
357
+ }
358
+ function ce(e) {
359
+ const t = {
360
+ "!": "%21",
361
+ "'": "%27",
362
+ "(": "%28",
363
+ ")": "%29",
364
+ "~": "%7E",
365
+ "%20": "+",
366
+ "%00": "\0"
367
+ };
368
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
369
+ return t[r];
370
+ });
371
+ }
372
+ function ee(e, t) {
373
+ this._pairs = [], e && z(e, this, t);
374
+ }
375
+ const Ne = ee.prototype;
376
+ Ne.append = function(t, n) {
377
+ this._pairs.push([t, n]);
378
+ };
379
+ Ne.toString = function(t) {
380
+ const n = t ? function(r) {
381
+ return t.call(this, r, ce);
382
+ } : ce;
383
+ return this._pairs.map(function(s) {
384
+ return n(s[0]) + "=" + n(s[1]);
385
+ }, "").join("&");
386
+ };
387
+ function St(e) {
388
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
389
+ }
390
+ function Pe(e, t, n) {
391
+ if (!t)
392
+ return e;
393
+ const r = n && n.encode || St, s = n && n.serialize;
394
+ let o;
395
+ if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new ee(t, n).toString(r), o) {
396
+ const i = e.indexOf("#");
397
+ i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
398
+ }
399
+ return e;
400
+ }
401
+ class Rt {
402
+ constructor() {
403
+ this.handlers = [];
404
+ }
405
+ /**
406
+ * Add a new interceptor to the stack
407
+ *
408
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
409
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
410
+ *
411
+ * @return {Number} An ID used to remove interceptor later
412
+ */
413
+ use(t, n, r) {
414
+ return this.handlers.push({
415
+ fulfilled: t,
416
+ rejected: n,
417
+ synchronous: r ? r.synchronous : !1,
418
+ runWhen: r ? r.runWhen : null
419
+ }), this.handlers.length - 1;
420
+ }
421
+ /**
422
+ * Remove an interceptor from the stack
423
+ *
424
+ * @param {Number} id The ID that was returned by `use`
425
+ *
426
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
427
+ */
428
+ eject(t) {
429
+ this.handlers[t] && (this.handlers[t] = null);
430
+ }
431
+ /**
432
+ * Clear all interceptors from the stack
433
+ *
434
+ * @returns {void}
435
+ */
436
+ clear() {
437
+ this.handlers && (this.handlers = []);
438
+ }
439
+ /**
440
+ * Iterate over all the registered interceptors
441
+ *
442
+ * This method is particularly useful for skipping over any
443
+ * interceptors that may have become `null` calling `eject`.
444
+ *
445
+ * @param {Function} fn The function to call for each interceptor
446
+ *
447
+ * @returns {void}
448
+ */
449
+ forEach(t) {
450
+ a.forEach(this.handlers, function(r) {
451
+ r !== null && t(r);
452
+ });
453
+ }
454
+ }
455
+ const ue = Rt, Ce = {
456
+ silentJSONParsing: !0,
457
+ forcedJSONParsing: !0,
458
+ clarifyTimeoutError: !1
459
+ }, Ot = typeof URLSearchParams < "u" ? URLSearchParams : ee, At = typeof FormData < "u" ? FormData : null, Tt = typeof Blob < "u" ? Blob : null, xt = (() => {
460
+ let e;
461
+ return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
462
+ })(), Nt = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
463
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), R = {
464
+ isBrowser: !0,
465
+ classes: {
466
+ URLSearchParams: Ot,
467
+ FormData: At,
468
+ Blob: Tt
469
+ },
470
+ isStandardBrowserEnv: xt,
471
+ isStandardBrowserWebWorkerEnv: Nt,
472
+ protocols: ["http", "https", "file", "blob", "url", "data"]
473
+ };
474
+ function Pt(e, t) {
475
+ return z(e, new R.classes.URLSearchParams(), Object.assign({
476
+ visitor: function(n, r, s, o) {
477
+ return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
478
+ }
479
+ }, t));
480
+ }
481
+ function Ct(e) {
482
+ return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
483
+ }
484
+ function gt(e) {
485
+ const t = {}, n = Object.keys(e);
486
+ let r;
487
+ const s = n.length;
488
+ let o;
489
+ for (r = 0; r < s; r++)
490
+ o = n[r], t[o] = e[o];
491
+ return t;
492
+ }
493
+ function ge(e) {
494
+ function t(n, r, s, o) {
495
+ let i = n[o++];
496
+ const u = Number.isFinite(+i), d = o >= n.length;
497
+ return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !u) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = gt(s[i])), !u);
498
+ }
499
+ if (a.isFormData(e) && a.isFunction(e.entries)) {
500
+ const n = {};
501
+ return a.forEachEntry(e, (r, s) => {
502
+ t(Ct(r), s, n, 0);
503
+ }), n;
504
+ }
505
+ return null;
506
+ }
507
+ const Ft = {
508
+ "Content-Type": void 0
509
+ };
510
+ function Bt(e, t, n) {
511
+ if (a.isString(e))
512
+ try {
513
+ return (t || JSON.parse)(e), a.trim(e);
514
+ } catch (r) {
515
+ if (r.name !== "SyntaxError")
516
+ throw r;
517
+ }
518
+ return (n || JSON.stringify)(e);
519
+ }
520
+ const J = {
521
+ transitional: Ce,
522
+ adapter: ["xhr", "http"],
523
+ transformRequest: [function(t, n) {
524
+ const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
525
+ if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
526
+ return s && s ? JSON.stringify(ge(t)) : t;
527
+ if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
528
+ return t;
529
+ if (a.isArrayBufferView(t))
530
+ return t.buffer;
531
+ if (a.isURLSearchParams(t))
532
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
533
+ let u;
534
+ if (o) {
535
+ if (r.indexOf("application/x-www-form-urlencoded") > -1)
536
+ return Pt(t, this.formSerializer).toString();
537
+ if ((u = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
538
+ const d = this.env && this.env.FormData;
539
+ return z(
540
+ u ? { "files[]": t } : t,
541
+ d && new d(),
542
+ this.formSerializer
543
+ );
544
+ }
545
+ }
546
+ return o || s ? (n.setContentType("application/json", !1), Bt(t)) : t;
547
+ }],
548
+ transformResponse: [function(t) {
549
+ const n = this.transitional || J.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
550
+ if (t && a.isString(t) && (r && !this.responseType || s)) {
551
+ const i = !(n && n.silentJSONParsing) && s;
552
+ try {
553
+ return JSON.parse(t);
554
+ } catch (u) {
555
+ if (i)
556
+ throw u.name === "SyntaxError" ? m.from(u, m.ERR_BAD_RESPONSE, this, null, this.response) : u;
557
+ }
558
+ }
559
+ return t;
560
+ }],
561
+ /**
562
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
563
+ * timeout is not created.
564
+ */
565
+ timeout: 0,
566
+ xsrfCookieName: "XSRF-TOKEN",
567
+ xsrfHeaderName: "X-XSRF-TOKEN",
568
+ maxContentLength: -1,
569
+ maxBodyLength: -1,
570
+ env: {
571
+ FormData: R.classes.FormData,
572
+ Blob: R.classes.Blob
573
+ },
574
+ validateStatus: function(t) {
575
+ return t >= 200 && t < 300;
576
+ },
577
+ headers: {
578
+ common: {
579
+ Accept: "application/json, text/plain, */*"
580
+ }
581
+ }
582
+ };
583
+ a.forEach(["delete", "get", "head"], function(t) {
584
+ J.headers[t] = {};
585
+ });
586
+ a.forEach(["post", "put", "patch"], function(t) {
587
+ J.headers[t] = a.merge(Ft);
588
+ });
589
+ const te = J, Dt = a.toObjectSet([
590
+ "age",
591
+ "authorization",
592
+ "content-length",
593
+ "content-type",
594
+ "etag",
595
+ "expires",
596
+ "from",
597
+ "host",
598
+ "if-modified-since",
599
+ "if-unmodified-since",
600
+ "last-modified",
601
+ "location",
602
+ "max-forwards",
603
+ "proxy-authorization",
604
+ "referer",
605
+ "retry-after",
606
+ "user-agent"
607
+ ]), _t = (e) => {
608
+ const t = {};
609
+ let n, r, s;
610
+ return e && e.split(`
611
+ `).forEach(function(i) {
612
+ s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Dt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
613
+ }), t;
614
+ }, le = Symbol("internals");
615
+ function g(e) {
616
+ return e && String(e).trim().toLowerCase();
617
+ }
618
+ function U(e) {
619
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(U) : String(e);
620
+ }
621
+ function Lt(e) {
622
+ const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
623
+ let r;
624
+ for (; r = n.exec(e); )
625
+ t[r[1]] = r[2];
626
+ return t;
627
+ }
628
+ const Ut = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
629
+ function W(e, t, n, r, s) {
630
+ if (a.isFunction(r))
631
+ return r.call(this, t, n);
632
+ if (s && (t = n), !!a.isString(t)) {
633
+ if (a.isString(r))
634
+ return t.indexOf(r) !== -1;
635
+ if (a.isRegExp(r))
636
+ return r.test(t);
637
+ }
638
+ }
639
+ function jt(e) {
640
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
641
+ }
642
+ function It(e, t) {
643
+ const n = a.toCamelCase(" " + t);
644
+ ["get", "set", "has"].forEach((r) => {
645
+ Object.defineProperty(e, r + n, {
646
+ value: function(s, o, i) {
647
+ return this[r].call(this, t, s, o, i);
648
+ },
649
+ configurable: !0
650
+ });
651
+ });
652
+ }
653
+ class $ {
654
+ constructor(t) {
655
+ t && this.set(t);
656
+ }
657
+ set(t, n, r) {
658
+ const s = this;
659
+ function o(u, d, c) {
660
+ const l = g(d);
661
+ if (!l)
662
+ throw new Error("header name must be a non-empty string");
663
+ const p = a.findKey(s, l);
664
+ (!p || s[p] === void 0 || c === !0 || c === void 0 && s[p] !== !1) && (s[p || d] = U(u));
665
+ }
666
+ const i = (u, d) => a.forEach(u, (c, l) => o(c, l, d));
667
+ return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !Ut(t) ? i(_t(t), n) : t != null && o(n, t, r), this;
668
+ }
669
+ get(t, n) {
670
+ if (t = g(t), t) {
671
+ const r = a.findKey(this, t);
672
+ if (r) {
673
+ const s = this[r];
674
+ if (!n)
675
+ return s;
676
+ if (n === !0)
677
+ return Lt(s);
678
+ if (a.isFunction(n))
679
+ return n.call(this, s, r);
680
+ if (a.isRegExp(n))
681
+ return n.exec(s);
682
+ throw new TypeError("parser must be boolean|regexp|function");
683
+ }
684
+ }
685
+ }
686
+ has(t, n) {
687
+ if (t = g(t), t) {
688
+ const r = a.findKey(this, t);
689
+ return !!(r && this[r] !== void 0 && (!n || W(this, this[r], r, n)));
690
+ }
691
+ return !1;
692
+ }
693
+ delete(t, n) {
694
+ const r = this;
695
+ let s = !1;
696
+ function o(i) {
697
+ if (i = g(i), i) {
698
+ const u = a.findKey(r, i);
699
+ u && (!n || W(r, r[u], u, n)) && (delete r[u], s = !0);
700
+ }
701
+ }
702
+ return a.isArray(t) ? t.forEach(o) : o(t), s;
703
+ }
704
+ clear(t) {
705
+ const n = Object.keys(this);
706
+ let r = n.length, s = !1;
707
+ for (; r--; ) {
708
+ const o = n[r];
709
+ (!t || W(this, this[o], o, t, !0)) && (delete this[o], s = !0);
710
+ }
711
+ return s;
712
+ }
713
+ normalize(t) {
714
+ const n = this, r = {};
715
+ return a.forEach(this, (s, o) => {
716
+ const i = a.findKey(r, o);
717
+ if (i) {
718
+ n[i] = U(s), delete n[o];
719
+ return;
720
+ }
721
+ const u = t ? jt(o) : String(o).trim();
722
+ u !== o && delete n[o], n[u] = U(s), r[u] = !0;
723
+ }), this;
724
+ }
725
+ concat(...t) {
726
+ return this.constructor.concat(this, ...t);
727
+ }
728
+ toJSON(t) {
729
+ const n = /* @__PURE__ */ Object.create(null);
730
+ return a.forEach(this, (r, s) => {
731
+ r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
732
+ }), n;
733
+ }
734
+ [Symbol.iterator]() {
735
+ return Object.entries(this.toJSON())[Symbol.iterator]();
736
+ }
737
+ toString() {
738
+ return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
739
+ `);
740
+ }
741
+ get [Symbol.toStringTag]() {
742
+ return "AxiosHeaders";
743
+ }
744
+ static from(t) {
745
+ return t instanceof this ? t : new this(t);
746
+ }
747
+ static concat(t, ...n) {
748
+ const r = new this(t);
749
+ return n.forEach((s) => r.set(s)), r;
750
+ }
751
+ static accessor(t) {
752
+ const r = (this[le] = this[le] = {
753
+ accessors: {}
754
+ }).accessors, s = this.prototype;
755
+ function o(i) {
756
+ const u = g(i);
757
+ r[u] || (It(s, i), r[u] = !0);
758
+ }
759
+ return a.isArray(t) ? t.forEach(o) : o(t), this;
760
+ }
761
+ }
762
+ $.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
763
+ a.freezeMethods($.prototype);
764
+ a.freezeMethods($);
765
+ const T = $;
766
+ function K(e, t) {
767
+ const n = this || te, r = t || n, s = T.from(r.headers);
768
+ let o = r.data;
769
+ return a.forEach(e, function(u) {
770
+ o = u.call(n, o, s.normalize(), t ? t.status : void 0);
771
+ }), s.normalize(), o;
772
+ }
773
+ function Fe(e) {
774
+ return !!(e && e.__CANCEL__);
775
+ }
776
+ function D(e, t, n) {
777
+ m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
778
+ }
779
+ a.inherits(D, m, {
780
+ __CANCEL__: !0
781
+ });
782
+ function kt(e, t, n) {
783
+ const r = n.config.validateStatus;
784
+ !n.status || !r || r(n.status) ? e(n) : t(new m(
785
+ "Request failed with status code " + n.status,
786
+ [m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
787
+ n.config,
788
+ n.request,
789
+ n
790
+ ));
791
+ }
792
+ const Ht = R.isStandardBrowserEnv ? (
793
+ // Standard browser envs support document.cookie
794
+ function() {
795
+ return {
796
+ write: function(n, r, s, o, i, u) {
797
+ const d = [];
798
+ d.push(n + "=" + encodeURIComponent(r)), a.isNumber(s) && d.push("expires=" + new Date(s).toGMTString()), a.isString(o) && d.push("path=" + o), a.isString(i) && d.push("domain=" + i), u === !0 && d.push("secure"), document.cookie = d.join("; ");
799
+ },
800
+ read: function(n) {
801
+ const r = document.cookie.match(new RegExp("(^|;\\s*)(" + n + ")=([^;]*)"));
802
+ return r ? decodeURIComponent(r[3]) : null;
803
+ },
804
+ remove: function(n) {
805
+ this.write(n, "", Date.now() - 864e5);
806
+ }
807
+ };
808
+ }()
809
+ ) : (
810
+ // Non standard browser env (web workers, react-native) lack needed support.
811
+ function() {
812
+ return {
813
+ write: function() {
814
+ },
815
+ read: function() {
816
+ return null;
817
+ },
818
+ remove: function() {
819
+ }
820
+ };
821
+ }()
822
+ );
823
+ function Mt(e) {
824
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
825
+ }
826
+ function qt(e, t) {
827
+ return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
828
+ }
829
+ function Be(e, t) {
830
+ return e && !Mt(t) ? qt(e, t) : t;
831
+ }
832
+ const zt = R.isStandardBrowserEnv ? (
833
+ // Standard browser envs have full support of the APIs needed to test
834
+ // whether the request URL is of the same origin as current location.
835
+ function() {
836
+ const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
837
+ let r;
838
+ function s(o) {
839
+ let i = o;
840
+ return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
841
+ href: n.href,
842
+ protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
843
+ host: n.host,
844
+ search: n.search ? n.search.replace(/^\?/, "") : "",
845
+ hash: n.hash ? n.hash.replace(/^#/, "") : "",
846
+ hostname: n.hostname,
847
+ port: n.port,
848
+ pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
849
+ };
850
+ }
851
+ return r = s(window.location.href), function(i) {
852
+ const u = a.isString(i) ? s(i) : i;
853
+ return u.protocol === r.protocol && u.host === r.host;
854
+ };
855
+ }()
856
+ ) : (
857
+ // Non standard browser envs (web workers, react-native) lack needed support.
858
+ function() {
859
+ return function() {
860
+ return !0;
861
+ };
862
+ }()
863
+ );
864
+ function Jt(e) {
865
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
866
+ return t && t[1] || "";
867
+ }
868
+ function $t(e, t) {
869
+ e = e || 10;
870
+ const n = new Array(e), r = new Array(e);
871
+ let s = 0, o = 0, i;
872
+ return t = t !== void 0 ? t : 1e3, function(d) {
873
+ const c = Date.now(), l = r[o];
874
+ i || (i = c), n[s] = d, r[s] = c;
875
+ let p = o, w = 0;
876
+ for (; p !== s; )
877
+ w += n[p++], p = p % e;
878
+ if (s = (s + 1) % e, s === o && (o = (o + 1) % e), c - i < t)
879
+ return;
880
+ const y = l && c - l;
881
+ return y ? Math.round(w * 1e3 / y) : void 0;
882
+ };
883
+ }
884
+ function fe(e, t) {
885
+ let n = 0;
886
+ const r = $t(50, 250);
887
+ return (s) => {
888
+ const o = s.loaded, i = s.lengthComputable ? s.total : void 0, u = o - n, d = r(u), c = o <= i;
889
+ n = o;
890
+ const l = {
891
+ loaded: o,
892
+ total: i,
893
+ progress: i ? o / i : void 0,
894
+ bytes: u,
895
+ rate: d || void 0,
896
+ estimated: d && i && c ? (i - o) / d : void 0,
897
+ event: s
898
+ };
899
+ l[t ? "download" : "upload"] = !0, e(l);
900
+ };
901
+ }
902
+ const Vt = typeof XMLHttpRequest < "u", Wt = Vt && function(e) {
903
+ return new Promise(function(n, r) {
904
+ let s = e.data;
905
+ const o = T.from(e.headers).normalize(), i = e.responseType;
906
+ let u;
907
+ function d() {
908
+ e.cancelToken && e.cancelToken.unsubscribe(u), e.signal && e.signal.removeEventListener("abort", u);
909
+ }
910
+ a.isFormData(s) && (R.isStandardBrowserEnv || R.isStandardBrowserWebWorkerEnv ? o.setContentType(!1) : o.setContentType("multipart/form-data;", !1));
911
+ let c = new XMLHttpRequest();
912
+ if (e.auth) {
913
+ const y = e.auth.username || "", f = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
914
+ o.set("Authorization", "Basic " + btoa(y + ":" + f));
915
+ }
916
+ const l = Be(e.baseURL, e.url);
917
+ c.open(e.method.toUpperCase(), Pe(l, e.params, e.paramsSerializer), !0), c.timeout = e.timeout;
918
+ function p() {
919
+ if (!c)
920
+ return;
921
+ const y = T.from(
922
+ "getAllResponseHeaders" in c && c.getAllResponseHeaders()
923
+ ), h = {
924
+ data: !i || i === "text" || i === "json" ? c.responseText : c.response,
925
+ status: c.status,
926
+ statusText: c.statusText,
927
+ headers: y,
928
+ config: e,
929
+ request: c
930
+ };
931
+ kt(function(S) {
932
+ n(S), d();
933
+ }, function(S) {
934
+ r(S), d();
935
+ }, h), c = null;
936
+ }
937
+ if ("onloadend" in c ? c.onloadend = p : c.onreadystatechange = function() {
938
+ !c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(p);
939
+ }, c.onabort = function() {
940
+ c && (r(new m("Request aborted", m.ECONNABORTED, e, c)), c = null);
941
+ }, c.onerror = function() {
942
+ r(new m("Network Error", m.ERR_NETWORK, e, c)), c = null;
943
+ }, c.ontimeout = function() {
944
+ let f = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
945
+ const h = e.transitional || Ce;
946
+ e.timeoutErrorMessage && (f = e.timeoutErrorMessage), r(new m(
947
+ f,
948
+ h.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
949
+ e,
950
+ c
951
+ )), c = null;
952
+ }, R.isStandardBrowserEnv) {
953
+ const y = (e.withCredentials || zt(l)) && e.xsrfCookieName && Ht.read(e.xsrfCookieName);
954
+ y && o.set(e.xsrfHeaderName, y);
955
+ }
956
+ s === void 0 && o.setContentType(null), "setRequestHeader" in c && a.forEach(o.toJSON(), function(f, h) {
957
+ c.setRequestHeader(h, f);
958
+ }), a.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), i && i !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress", fe(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", fe(e.onUploadProgress)), (e.cancelToken || e.signal) && (u = (y) => {
959
+ c && (r(!y || y.type ? new D(null, e, c) : y), c.abort(), c = null);
960
+ }, e.cancelToken && e.cancelToken.subscribe(u), e.signal && (e.signal.aborted ? u() : e.signal.addEventListener("abort", u)));
961
+ const w = Jt(l);
962
+ if (w && R.protocols.indexOf(w) === -1) {
963
+ r(new m("Unsupported protocol " + w + ":", m.ERR_BAD_REQUEST, e));
964
+ return;
965
+ }
966
+ c.send(s || null);
967
+ });
968
+ }, j = {
969
+ http: Et,
970
+ xhr: Wt
971
+ };
972
+ a.forEach(j, (e, t) => {
973
+ if (e) {
974
+ try {
975
+ Object.defineProperty(e, "name", { value: t });
976
+ } catch {
977
+ }
978
+ Object.defineProperty(e, "adapterName", { value: t });
979
+ }
980
+ });
981
+ const Kt = {
982
+ getAdapter: (e) => {
983
+ e = a.isArray(e) ? e : [e];
984
+ const { length: t } = e;
985
+ let n, r;
986
+ for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ? j[n.toLowerCase()] : n)); s++)
987
+ ;
988
+ if (!r)
989
+ throw r === !1 ? new m(
990
+ `Adapter ${n} is not supported by the environment`,
991
+ "ERR_NOT_SUPPORT"
992
+ ) : new Error(
993
+ a.hasOwnProp(j, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
994
+ );
995
+ if (!a.isFunction(r))
996
+ throw new TypeError("adapter is not a function");
997
+ return r;
998
+ },
999
+ adapters: j
1000
+ };
1001
+ function G(e) {
1002
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1003
+ throw new D(null, e);
1004
+ }
1005
+ function de(e) {
1006
+ return G(e), e.headers = T.from(e.headers), e.data = K.call(
1007
+ e,
1008
+ e.transformRequest
1009
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Kt.getAdapter(e.adapter || te.adapter)(e).then(function(r) {
1010
+ return G(e), r.data = K.call(
1011
+ e,
1012
+ e.transformResponse,
1013
+ r
1014
+ ), r.headers = T.from(r.headers), r;
1015
+ }, function(r) {
1016
+ return Fe(r) || (G(e), r && r.response && (r.response.data = K.call(
1017
+ e,
1018
+ e.transformResponse,
1019
+ r.response
1020
+ ), r.response.headers = T.from(r.response.headers))), Promise.reject(r);
1021
+ });
1022
+ }
1023
+ const pe = (e) => e instanceof T ? e.toJSON() : e;
1024
+ function P(e, t) {
1025
+ t = t || {};
1026
+ const n = {};
1027
+ function r(c, l, p) {
1028
+ return a.isPlainObject(c) && a.isPlainObject(l) ? a.merge.call({ caseless: p }, c, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
1029
+ }
1030
+ function s(c, l, p) {
1031
+ if (a.isUndefined(l)) {
1032
+ if (!a.isUndefined(c))
1033
+ return r(void 0, c, p);
1034
+ } else
1035
+ return r(c, l, p);
1036
+ }
1037
+ function o(c, l) {
1038
+ if (!a.isUndefined(l))
1039
+ return r(void 0, l);
1040
+ }
1041
+ function i(c, l) {
1042
+ if (a.isUndefined(l)) {
1043
+ if (!a.isUndefined(c))
1044
+ return r(void 0, c);
1045
+ } else
1046
+ return r(void 0, l);
1047
+ }
1048
+ function u(c, l, p) {
1049
+ if (p in t)
1050
+ return r(c, l);
1051
+ if (p in e)
1052
+ return r(void 0, c);
1053
+ }
1054
+ const d = {
1055
+ url: o,
1056
+ method: o,
1057
+ data: o,
1058
+ baseURL: i,
1059
+ transformRequest: i,
1060
+ transformResponse: i,
1061
+ paramsSerializer: i,
1062
+ timeout: i,
1063
+ timeoutMessage: i,
1064
+ withCredentials: i,
1065
+ adapter: i,
1066
+ responseType: i,
1067
+ xsrfCookieName: i,
1068
+ xsrfHeaderName: i,
1069
+ onUploadProgress: i,
1070
+ onDownloadProgress: i,
1071
+ decompress: i,
1072
+ maxContentLength: i,
1073
+ maxBodyLength: i,
1074
+ beforeRedirect: i,
1075
+ transport: i,
1076
+ httpAgent: i,
1077
+ httpsAgent: i,
1078
+ cancelToken: i,
1079
+ socketPath: i,
1080
+ responseEncoding: i,
1081
+ validateStatus: u,
1082
+ headers: (c, l) => s(pe(c), pe(l), !0)
1083
+ };
1084
+ return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
1085
+ const p = d[l] || s, w = p(e[l], t[l], l);
1086
+ a.isUndefined(w) && p !== u || (n[l] = w);
1087
+ }), n;
1088
+ }
1089
+ const De = "1.4.0", ne = {};
1090
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1091
+ ne[e] = function(r) {
1092
+ return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1093
+ };
1094
+ });
1095
+ const he = {};
1096
+ ne.transitional = function(t, n, r) {
1097
+ function s(o, i) {
1098
+ return "[Axios v" + De + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1099
+ }
1100
+ return (o, i, u) => {
1101
+ if (t === !1)
1102
+ throw new m(
1103
+ s(i, " has been removed" + (n ? " in " + n : "")),
1104
+ m.ERR_DEPRECATED
1105
+ );
1106
+ return n && !he[i] && (he[i] = !0, console.warn(
1107
+ s(
1108
+ i,
1109
+ " has been deprecated since v" + n + " and will be removed in the near future"
1110
+ )
1111
+ )), t ? t(o, i, u) : !0;
1112
+ };
1113
+ };
1114
+ function Gt(e, t, n) {
1115
+ if (typeof e != "object")
1116
+ throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1117
+ const r = Object.keys(e);
1118
+ let s = r.length;
1119
+ for (; s-- > 0; ) {
1120
+ const o = r[s], i = t[o];
1121
+ if (i) {
1122
+ const u = e[o], d = u === void 0 || i(u, o, e);
1123
+ if (d !== !0)
1124
+ throw new m("option " + o + " must be " + d, m.ERR_BAD_OPTION_VALUE);
1125
+ continue;
1126
+ }
1127
+ if (n !== !0)
1128
+ throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
1129
+ }
1130
+ }
1131
+ const Q = {
1132
+ assertOptions: Gt,
1133
+ validators: ne
1134
+ }, x = Q.validators;
1135
+ class k {
1136
+ constructor(t) {
1137
+ this.defaults = t, this.interceptors = {
1138
+ request: new ue(),
1139
+ response: new ue()
1140
+ };
1141
+ }
1142
+ /**
1143
+ * Dispatch a request
1144
+ *
1145
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1146
+ * @param {?Object} config
1147
+ *
1148
+ * @returns {Promise} The Promise to be fulfilled
1149
+ */
1150
+ request(t, n) {
1151
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = P(this.defaults, n);
1152
+ const { transitional: r, paramsSerializer: s, headers: o } = n;
1153
+ r !== void 0 && Q.assertOptions(r, {
1154
+ silentJSONParsing: x.transitional(x.boolean),
1155
+ forcedJSONParsing: x.transitional(x.boolean),
1156
+ clarifyTimeoutError: x.transitional(x.boolean)
1157
+ }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1158
+ serialize: s
1159
+ } : Q.assertOptions(s, {
1160
+ encode: x.function,
1161
+ serialize: x.function
1162
+ }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1163
+ let i;
1164
+ i = o && a.merge(
1165
+ o.common,
1166
+ o[n.method]
1167
+ ), i && a.forEach(
1168
+ ["delete", "get", "head", "post", "put", "patch", "common"],
1169
+ (f) => {
1170
+ delete o[f];
1171
+ }
1172
+ ), n.headers = T.concat(i, o);
1173
+ const u = [];
1174
+ let d = !0;
1175
+ this.interceptors.request.forEach(function(h) {
1176
+ typeof h.runWhen == "function" && h.runWhen(n) === !1 || (d = d && h.synchronous, u.unshift(h.fulfilled, h.rejected));
1177
+ });
1178
+ const c = [];
1179
+ this.interceptors.response.forEach(function(h) {
1180
+ c.push(h.fulfilled, h.rejected);
1181
+ });
1182
+ let l, p = 0, w;
1183
+ if (!d) {
1184
+ const f = [de.bind(this), void 0];
1185
+ for (f.unshift.apply(f, u), f.push.apply(f, c), w = f.length, l = Promise.resolve(n); p < w; )
1186
+ l = l.then(f[p++], f[p++]);
1187
+ return l;
1188
+ }
1189
+ w = u.length;
1190
+ let y = n;
1191
+ for (p = 0; p < w; ) {
1192
+ const f = u[p++], h = u[p++];
1193
+ try {
1194
+ y = f(y);
1195
+ } catch (A) {
1196
+ h.call(this, A);
1197
+ break;
1198
+ }
1199
+ }
1200
+ try {
1201
+ l = de.call(this, y);
1202
+ } catch (f) {
1203
+ return Promise.reject(f);
1204
+ }
1205
+ for (p = 0, w = c.length; p < w; )
1206
+ l = l.then(c[p++], c[p++]);
1207
+ return l;
1208
+ }
1209
+ getUri(t) {
1210
+ t = P(this.defaults, t);
1211
+ const n = Be(t.baseURL, t.url);
1212
+ return Pe(n, t.params, t.paramsSerializer);
1213
+ }
1214
+ }
1215
+ a.forEach(["delete", "get", "head", "options"], function(t) {
1216
+ k.prototype[t] = function(n, r) {
1217
+ return this.request(P(r || {}, {
1218
+ method: t,
1219
+ url: n,
1220
+ data: (r || {}).data
1221
+ }));
1222
+ };
1223
+ });
1224
+ a.forEach(["post", "put", "patch"], function(t) {
1225
+ function n(r) {
1226
+ return function(o, i, u) {
1227
+ return this.request(P(u || {}, {
1228
+ method: t,
1229
+ headers: r ? {
1230
+ "Content-Type": "multipart/form-data"
1231
+ } : {},
1232
+ url: o,
1233
+ data: i
1234
+ }));
1235
+ };
1236
+ }
1237
+ k.prototype[t] = n(), k.prototype[t + "Form"] = n(!0);
1238
+ });
1239
+ const I = k;
1240
+ class re {
1241
+ constructor(t) {
1242
+ if (typeof t != "function")
1243
+ throw new TypeError("executor must be a function.");
1244
+ let n;
1245
+ this.promise = new Promise(function(o) {
1246
+ n = o;
1247
+ });
1248
+ const r = this;
1249
+ this.promise.then((s) => {
1250
+ if (!r._listeners)
1251
+ return;
1252
+ let o = r._listeners.length;
1253
+ for (; o-- > 0; )
1254
+ r._listeners[o](s);
1255
+ r._listeners = null;
1256
+ }), this.promise.then = (s) => {
1257
+ let o;
1258
+ const i = new Promise((u) => {
1259
+ r.subscribe(u), o = u;
1260
+ }).then(s);
1261
+ return i.cancel = function() {
1262
+ r.unsubscribe(o);
1263
+ }, i;
1264
+ }, t(function(o, i, u) {
1265
+ r.reason || (r.reason = new D(o, i, u), n(r.reason));
1266
+ });
1267
+ }
1268
+ /**
1269
+ * Throws a `CanceledError` if cancellation has been requested.
1270
+ */
1271
+ throwIfRequested() {
1272
+ if (this.reason)
1273
+ throw this.reason;
1274
+ }
1275
+ /**
1276
+ * Subscribe to the cancel signal
1277
+ */
1278
+ subscribe(t) {
1279
+ if (this.reason) {
1280
+ t(this.reason);
1281
+ return;
1282
+ }
1283
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
1284
+ }
1285
+ /**
1286
+ * Unsubscribe from the cancel signal
1287
+ */
1288
+ unsubscribe(t) {
1289
+ if (!this._listeners)
1290
+ return;
1291
+ const n = this._listeners.indexOf(t);
1292
+ n !== -1 && this._listeners.splice(n, 1);
1293
+ }
1294
+ /**
1295
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1296
+ * cancels the `CancelToken`.
1297
+ */
1298
+ static source() {
1299
+ let t;
1300
+ return {
1301
+ token: new re(function(s) {
1302
+ t = s;
1303
+ }),
1304
+ cancel: t
1305
+ };
1306
+ }
1307
+ }
1308
+ const Xt = re;
1309
+ function vt(e) {
1310
+ return function(n) {
1311
+ return e.apply(null, n);
1312
+ };
1313
+ }
1314
+ function Qt(e) {
1315
+ return a.isObject(e) && e.isAxiosError === !0;
1316
+ }
1317
+ const Y = {
1318
+ Continue: 100,
1319
+ SwitchingProtocols: 101,
1320
+ Processing: 102,
1321
+ EarlyHints: 103,
1322
+ Ok: 200,
1323
+ Created: 201,
1324
+ Accepted: 202,
1325
+ NonAuthoritativeInformation: 203,
1326
+ NoContent: 204,
1327
+ ResetContent: 205,
1328
+ PartialContent: 206,
1329
+ MultiStatus: 207,
1330
+ AlreadyReported: 208,
1331
+ ImUsed: 226,
1332
+ MultipleChoices: 300,
1333
+ MovedPermanently: 301,
1334
+ Found: 302,
1335
+ SeeOther: 303,
1336
+ NotModified: 304,
1337
+ UseProxy: 305,
1338
+ Unused: 306,
1339
+ TemporaryRedirect: 307,
1340
+ PermanentRedirect: 308,
1341
+ BadRequest: 400,
1342
+ Unauthorized: 401,
1343
+ PaymentRequired: 402,
1344
+ Forbidden: 403,
1345
+ NotFound: 404,
1346
+ MethodNotAllowed: 405,
1347
+ NotAcceptable: 406,
1348
+ ProxyAuthenticationRequired: 407,
1349
+ RequestTimeout: 408,
1350
+ Conflict: 409,
1351
+ Gone: 410,
1352
+ LengthRequired: 411,
1353
+ PreconditionFailed: 412,
1354
+ PayloadTooLarge: 413,
1355
+ UriTooLong: 414,
1356
+ UnsupportedMediaType: 415,
1357
+ RangeNotSatisfiable: 416,
1358
+ ExpectationFailed: 417,
1359
+ ImATeapot: 418,
1360
+ MisdirectedRequest: 421,
1361
+ UnprocessableEntity: 422,
1362
+ Locked: 423,
1363
+ FailedDependency: 424,
1364
+ TooEarly: 425,
1365
+ UpgradeRequired: 426,
1366
+ PreconditionRequired: 428,
1367
+ TooManyRequests: 429,
1368
+ RequestHeaderFieldsTooLarge: 431,
1369
+ UnavailableForLegalReasons: 451,
1370
+ InternalServerError: 500,
1371
+ NotImplemented: 501,
1372
+ BadGateway: 502,
1373
+ ServiceUnavailable: 503,
1374
+ GatewayTimeout: 504,
1375
+ HttpVersionNotSupported: 505,
1376
+ VariantAlsoNegotiates: 506,
1377
+ InsufficientStorage: 507,
1378
+ LoopDetected: 508,
1379
+ NotExtended: 510,
1380
+ NetworkAuthenticationRequired: 511
1381
+ };
1382
+ Object.entries(Y).forEach(([e, t]) => {
1383
+ Y[t] = e;
1384
+ });
1385
+ const Yt = Y;
1386
+ function _e(e) {
1387
+ const t = new I(e), n = me(I.prototype.request, t);
1388
+ return a.extend(n, I.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1389
+ return _e(P(e, s));
1390
+ }, n;
1391
+ }
1392
+ const E = _e(te);
1393
+ E.Axios = I;
1394
+ E.CanceledError = D;
1395
+ E.CancelToken = Xt;
1396
+ E.isCancel = Fe;
1397
+ E.VERSION = De;
1398
+ E.toFormData = z;
1399
+ E.AxiosError = m;
1400
+ E.Cancel = E.CanceledError;
1401
+ E.all = function(t) {
1402
+ return Promise.all(t);
1403
+ };
1404
+ E.spread = vt;
1405
+ E.isAxiosError = Qt;
1406
+ E.mergeConfig = P;
1407
+ E.AxiosHeaders = T;
1408
+ E.formToJSON = (e) => ge(a.isHTMLForm(e) ? new FormData(e) : e);
1409
+ E.HttpStatusCode = Yt;
1410
+ E.default = E;
1411
+ const Zt = E;
1412
+ class tn {
1413
+ constructor() {
1414
+ se(this, "axiosInstance");
1415
+ this.axiosInstance = Zt.create({
1416
+ timeout: 3e4
1417
+ }), this.axiosInstance.interceptors.request.use(
1418
+ (t) => t,
1419
+ (t) => Promise.reject(t)
1420
+ ), this.axiosInstance.interceptors.response.use(
1421
+ (t) => t,
1422
+ (t) => Promise.reject(t)
1423
+ );
1424
+ }
1425
+ get(t, n) {
1426
+ return this.axiosInstance.get(t, n);
1427
+ }
1428
+ post(t, n) {
1429
+ return this.axiosInstance.post(t, n == null ? void 0 : n.body, n);
1430
+ }
1431
+ patch(t, n) {
1432
+ return this.axiosInstance.patch(t, n == null ? void 0 : n.body, n);
1433
+ }
1434
+ put(t, n) {
1435
+ return this.axiosInstance.put(t, n == null ? void 0 : n.body, n);
1436
+ }
1437
+ delete(t, n) {
1438
+ return this.axiosInstance.delete(t, n);
1439
+ }
1440
+ getInstance() {
1441
+ return this.axiosInstance;
1442
+ }
1443
+ // Implement other API methods using Axios...
1444
+ }
1445
+ class nn {
1446
+ constructor(t) {
1447
+ this.implementation = t;
1448
+ }
1449
+ get(t, n) {
1450
+ return this.implementation.get(t, n);
1451
+ }
1452
+ post(t, n) {
1453
+ return this.implementation.post(t, n);
1454
+ }
1455
+ patch(t, n) {
1456
+ return this.implementation.patch(t, n);
1457
+ }
1458
+ put(t, n) {
1459
+ return this.implementation.put(t, n);
1460
+ }
1461
+ delete(t, n) {
1462
+ return this.implementation.delete(t, n);
1463
+ }
1464
+ getInstance() {
1465
+ return this.implementation.getInstance();
1466
+ }
1467
+ // Implement other API methods...
1468
+ }
1469
+ export {
1470
+ nn as ApiServiceProWrapper,
1471
+ tn as AxiosServiceClass
1472
+ };