@fuul/sdk 7.3.0 → 7.3.2
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/affiliates/AffiliateService.d.ts.map +1 -1
- package/dist/index.mjs +170 -176
- package/dist/index.umd.js +5 -5
- package/dist/referral-codes/ReferralCodeService.d.ts.map +1 -1
- package/dist/release.json.d.ts +1 -1
- package/dist/types/api.d.ts +4 -0
- package/dist/types/api.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6,10 +6,10 @@ function Ye(e, t) {
|
|
|
6
6
|
return e.apply(t, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString: Pt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator:
|
|
9
|
+
const { toString: Pt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: se, toStringTag: Ge } = Symbol, oe = /* @__PURE__ */ ((e) => (t) => {
|
|
10
10
|
const r = Pt.call(t);
|
|
11
11
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) =>
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => oe(t) === e), ie = (e) => (t) => typeof t === e, { isArray: $ } = Array, J = ie("undefined");
|
|
13
13
|
function W(e) {
|
|
14
14
|
return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
@@ -18,11 +18,11 @@ function Ot(e) {
|
|
|
18
18
|
let t;
|
|
19
19
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ze(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const xt =
|
|
22
|
-
if (
|
|
21
|
+
const xt = ie("string"), P = ie("function"), et = ie("number"), Q = (e) => e !== null && typeof e == "object", Nt = (e) => e === !0 || e === !1, Z = (e) => {
|
|
22
|
+
if (oe(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
24
|
const t = _e(e);
|
|
25
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ge in e) && !(
|
|
25
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ge in e) && !(se in e);
|
|
26
26
|
}, Ut = (e) => {
|
|
27
27
|
if (!Q(e) || W(e))
|
|
28
28
|
return !1;
|
|
@@ -33,7 +33,7 @@ const xt = ae("string"), P = ae("function"), et = ae("number"), Q = (e) => e !==
|
|
|
33
33
|
}
|
|
34
34
|
}, Lt = x("Date"), Dt = x("File"), Ft = x("Blob"), kt = x("FileList"), Bt = (e) => Q(e) && P(e.pipe), qt = (e) => {
|
|
35
35
|
let t;
|
|
36
|
-
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t =
|
|
36
|
+
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = oe(e)) === "formdata" || // detect form-data instance
|
|
37
37
|
t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
|
|
38
38
|
}, It = x("URLSearchParams"), [vt, jt, $t, Mt] = ["ReadableStream", "Request", "Response", "Headers"].map(x), Ht = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
39
39
|
function X(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
@@ -67,7 +67,7 @@ const B = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : type
|
|
|
67
67
|
function ye() {
|
|
68
68
|
const { caseless: e } = rt(this) && this || {}, t = {}, r = (n, s) => {
|
|
69
69
|
const o = e && tt(t, s) || s;
|
|
70
|
-
|
|
70
|
+
Z(t[o]) && Z(n) ? t[o] = ye(t[o], n) : Z(n) ? t[o] = ye({}, n) : $(n) ? t[o] = n.slice() : t[o] = n;
|
|
71
71
|
};
|
|
72
72
|
for (let n = 0, s = arguments.length; n < s; n++)
|
|
73
73
|
arguments[n] && X(arguments[n], r);
|
|
@@ -103,7 +103,7 @@ const Kt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, o) => {
|
|
|
103
103
|
r[t] = e[t];
|
|
104
104
|
return r;
|
|
105
105
|
}, Xt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _e(Uint8Array)), Yt = (e, t) => {
|
|
106
|
-
const n = (e && e[
|
|
106
|
+
const n = (e && e[se]).call(e);
|
|
107
107
|
let s;
|
|
108
108
|
for (; (s = n.next()) && !s.done; ) {
|
|
109
109
|
const o = s.value;
|
|
@@ -151,7 +151,7 @@ const Kt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, o) => {
|
|
|
151
151
|
}, sr = () => {
|
|
152
152
|
}, or = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
153
153
|
function ir(e) {
|
|
154
|
-
return !!(e && P(e.append) && e[Ge] === "FormData" && e[
|
|
154
|
+
return !!(e && P(e.append) && e[Ge] === "FormData" && e[se]);
|
|
155
155
|
}
|
|
156
156
|
const ar = (e) => {
|
|
157
157
|
const t = new Array(10), r = (n, s) => {
|
|
@@ -164,8 +164,8 @@ const ar = (e) => {
|
|
|
164
164
|
t[s] = n;
|
|
165
165
|
const o = $(n) ? [] : {};
|
|
166
166
|
return X(n, (i, c) => {
|
|
167
|
-
const
|
|
168
|
-
!J(
|
|
167
|
+
const d = r(i, s + 1);
|
|
168
|
+
!J(d) && (o[c] = d);
|
|
169
169
|
}), t[s] = void 0, o;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
@@ -179,7 +179,7 @@ const ar = (e) => {
|
|
|
179
179
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
180
180
|
typeof setImmediate == "function",
|
|
181
181
|
P(B.postMessage)
|
|
182
|
-
), lr = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || st,
|
|
182
|
+
), lr = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || st, dr = (e) => e != null && P(e[se]), a = {
|
|
183
183
|
isArray: $,
|
|
184
184
|
isArrayBuffer: Ze,
|
|
185
185
|
isBuffer: W,
|
|
@@ -189,7 +189,7 @@ const ar = (e) => {
|
|
|
189
189
|
isNumber: et,
|
|
190
190
|
isBoolean: Nt,
|
|
191
191
|
isObject: Q,
|
|
192
|
-
isPlainObject:
|
|
192
|
+
isPlainObject: Z,
|
|
193
193
|
isEmptyObject: Ut,
|
|
194
194
|
isReadableStream: vt,
|
|
195
195
|
isRequest: jt,
|
|
@@ -212,7 +212,7 @@ const ar = (e) => {
|
|
|
212
212
|
stripBOM: Vt,
|
|
213
213
|
inherits: zt,
|
|
214
214
|
toFlatObject: Jt,
|
|
215
|
-
kindOf:
|
|
215
|
+
kindOf: oe,
|
|
216
216
|
kindOfTest: x,
|
|
217
217
|
endsWith: Wt,
|
|
218
218
|
toArray: Qt,
|
|
@@ -237,7 +237,7 @@ const ar = (e) => {
|
|
|
237
237
|
isThenable: ur,
|
|
238
238
|
setImmediate: st,
|
|
239
239
|
asap: lr,
|
|
240
|
-
isIterable:
|
|
240
|
+
isIterable: dr
|
|
241
241
|
};
|
|
242
242
|
function m(e, t, r, n, s) {
|
|
243
243
|
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), r && (this.config = r), n && (this.request = n), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -285,11 +285,11 @@ Object.defineProperties(m, it);
|
|
|
285
285
|
Object.defineProperty(ot, "isAxiosError", { value: !0 });
|
|
286
286
|
m.from = (e, t, r, n, s, o) => {
|
|
287
287
|
const i = Object.create(ot);
|
|
288
|
-
return a.toFlatObject(e, i, function(
|
|
289
|
-
return
|
|
288
|
+
return a.toFlatObject(e, i, function(d) {
|
|
289
|
+
return d !== Error.prototype;
|
|
290
290
|
}, (c) => c !== "isAxiosError"), m.call(i, e.message, t, r, n, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
291
291
|
};
|
|
292
|
-
const
|
|
292
|
+
const fr = null;
|
|
293
293
|
function ge(e) {
|
|
294
294
|
return a.isPlainObject(e) || a.isArray(e);
|
|
295
295
|
}
|
|
@@ -307,7 +307,7 @@ function hr(e) {
|
|
|
307
307
|
const pr = a.toFlatObject(a, {}, null, function(t) {
|
|
308
308
|
return /^is[A-Z]/.test(t);
|
|
309
309
|
});
|
|
310
|
-
function
|
|
310
|
+
function ae(e, t, r) {
|
|
311
311
|
if (!a.isObject(e))
|
|
312
312
|
throw new TypeError("target must be an object");
|
|
313
313
|
t = t || new FormData(), r = a.toFlatObject(r, {
|
|
@@ -317,7 +317,7 @@ function ce(e, t, r) {
|
|
|
317
317
|
}, !1, function(y, p) {
|
|
318
318
|
return !a.isUndefined(p[y]);
|
|
319
319
|
});
|
|
320
|
-
const n = r.metaTokens, s = r.visitor || l, o = r.dots, i = r.indexes,
|
|
320
|
+
const n = r.metaTokens, s = r.visitor || l, o = r.dots, i = r.indexes, d = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
321
321
|
if (!a.isFunction(s))
|
|
322
322
|
throw new TypeError("visitor must be a function");
|
|
323
323
|
function u(h) {
|
|
@@ -326,9 +326,9 @@ function ce(e, t, r) {
|
|
|
326
326
|
return h.toISOString();
|
|
327
327
|
if (a.isBoolean(h))
|
|
328
328
|
return h.toString();
|
|
329
|
-
if (!
|
|
329
|
+
if (!d && a.isBlob(h))
|
|
330
330
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
331
|
-
return a.isArrayBuffer(h) || a.isTypedArray(h) ?
|
|
331
|
+
return a.isArrayBuffer(h) || a.isTypedArray(h) ? d && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
332
332
|
}
|
|
333
333
|
function l(h, y, p) {
|
|
334
334
|
let b = h;
|
|
@@ -346,16 +346,16 @@ function ce(e, t, r) {
|
|
|
346
346
|
}
|
|
347
347
|
return ge(h) ? !0 : (t.append(Le(p, y, o), u(h)), !1);
|
|
348
348
|
}
|
|
349
|
-
const
|
|
349
|
+
const f = [], g = Object.assign(pr, {
|
|
350
350
|
defaultVisitor: l,
|
|
351
351
|
convertValue: u,
|
|
352
352
|
isVisitable: ge
|
|
353
353
|
});
|
|
354
354
|
function w(h, y) {
|
|
355
355
|
if (!a.isUndefined(h)) {
|
|
356
|
-
if (
|
|
356
|
+
if (f.indexOf(h) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + y.join("."));
|
|
358
|
-
|
|
358
|
+
f.push(h), a.forEach(h, function(b, S) {
|
|
359
359
|
(!(a.isUndefined(b) || b === null) && s.call(
|
|
360
360
|
t,
|
|
361
361
|
b,
|
|
@@ -363,7 +363,7 @@ function ce(e, t, r) {
|
|
|
363
363
|
y,
|
|
364
364
|
g
|
|
365
365
|
)) === !0 && w(b, y ? y.concat(S) : [S]);
|
|
366
|
-
}),
|
|
366
|
+
}), f.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
if (!a.isObject(e))
|
|
@@ -385,7 +385,7 @@ function De(e) {
|
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
387
|
function Re(e, t) {
|
|
388
|
-
this._pairs = [], e &&
|
|
388
|
+
this._pairs = [], e && ae(e, this, t);
|
|
389
389
|
}
|
|
390
390
|
const ct = Re.prototype;
|
|
391
391
|
ct.append = function(t, r) {
|
|
@@ -496,7 +496,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Cr
|
|
|
496
496
|
...br
|
|
497
497
|
};
|
|
498
498
|
function Rr(e, t) {
|
|
499
|
-
return
|
|
499
|
+
return ae(e, new T.classes.URLSearchParams(), {
|
|
500
500
|
visitor: function(r, n, s, o) {
|
|
501
501
|
return T.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
@@ -515,12 +515,12 @@ function Ar(e) {
|
|
|
515
515
|
o = r[n], t[o] = e[o];
|
|
516
516
|
return t;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function dt(e) {
|
|
519
519
|
function t(r, n, s, o) {
|
|
520
520
|
let i = r[o++];
|
|
521
521
|
if (i === "__proto__") return !0;
|
|
522
|
-
const c = Number.isFinite(+i),
|
|
523
|
-
return i = !i && a.isArray(s) ? s.length : i,
|
|
522
|
+
const c = Number.isFinite(+i), d = o >= r.length;
|
|
523
|
+
return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(r, n, s[i], o) && a.isArray(s[i]) && (s[i] = Ar(s[i])), !c);
|
|
524
524
|
}
|
|
525
525
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
526
526
|
const r = {};
|
|
@@ -546,7 +546,7 @@ const Y = {
|
|
|
546
546
|
transformRequest: [function(t, r) {
|
|
547
547
|
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, o = a.isObject(t);
|
|
548
548
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
549
|
-
return s ? JSON.stringify(
|
|
549
|
+
return s ? JSON.stringify(dt(t)) : t;
|
|
550
550
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
551
551
|
return t;
|
|
552
552
|
if (a.isArrayBufferView(t))
|
|
@@ -558,10 +558,10 @@ const Y = {
|
|
|
558
558
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
559
|
return Rr(t, this.formSerializer).toString();
|
|
560
560
|
if ((c = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
561
|
-
const
|
|
562
|
-
return
|
|
561
|
+
const d = this.env && this.env.FormData;
|
|
562
|
+
return ae(
|
|
563
563
|
c ? { "files[]": t } : t,
|
|
564
|
-
|
|
564
|
+
d && new d(),
|
|
565
565
|
this.formSerializer
|
|
566
566
|
);
|
|
567
567
|
}
|
|
@@ -638,8 +638,8 @@ const Or = a.toObjectSet([
|
|
|
638
638
|
function V(e) {
|
|
639
639
|
return e && String(e).trim().toLowerCase();
|
|
640
640
|
}
|
|
641
|
-
function
|
|
642
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
641
|
+
function ee(e) {
|
|
642
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ee) : String(e);
|
|
643
643
|
}
|
|
644
644
|
function Nr(e) {
|
|
645
645
|
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -649,7 +649,7 @@ function Nr(e) {
|
|
|
649
649
|
return t;
|
|
650
650
|
}
|
|
651
651
|
const Ur = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
652
|
-
function
|
|
652
|
+
function fe(e, t, r, n, s) {
|
|
653
653
|
if (a.isFunction(n))
|
|
654
654
|
return n.call(this, t, r);
|
|
655
655
|
if (s && (t = r), !!a.isString(t)) {
|
|
@@ -679,24 +679,24 @@ let O = class {
|
|
|
679
679
|
}
|
|
680
680
|
set(t, r, n) {
|
|
681
681
|
const s = this;
|
|
682
|
-
function o(c,
|
|
683
|
-
const l = V(
|
|
682
|
+
function o(c, d, u) {
|
|
683
|
+
const l = V(d);
|
|
684
684
|
if (!l)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const
|
|
687
|
-
(!
|
|
686
|
+
const f = a.findKey(s, l);
|
|
687
|
+
(!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f || d] = ee(c));
|
|
688
688
|
}
|
|
689
|
-
const i = (c,
|
|
689
|
+
const i = (c, d) => a.forEach(c, (u, l) => o(u, l, d));
|
|
690
690
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
691
691
|
i(t, r);
|
|
692
692
|
else if (a.isString(t) && (t = t.trim()) && !Ur(t))
|
|
693
693
|
i(xr(t), r);
|
|
694
694
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
695
|
-
let c = {},
|
|
695
|
+
let c = {}, d, u;
|
|
696
696
|
for (const l of t) {
|
|
697
697
|
if (!a.isArray(l))
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
|
-
c[u = l[0]] = (
|
|
699
|
+
c[u = l[0]] = (d = c[u]) ? a.isArray(d) ? [...d, l[1]] : [d, l[1]] : l[1];
|
|
700
700
|
}
|
|
701
701
|
i(c, r);
|
|
702
702
|
} else
|
|
@@ -723,7 +723,7 @@ let O = class {
|
|
|
723
723
|
has(t, r) {
|
|
724
724
|
if (t = V(t), t) {
|
|
725
725
|
const n = a.findKey(this, t);
|
|
726
|
-
return !!(n && this[n] !== void 0 && (!r ||
|
|
726
|
+
return !!(n && this[n] !== void 0 && (!r || fe(this, this[n], n, r)));
|
|
727
727
|
}
|
|
728
728
|
return !1;
|
|
729
729
|
}
|
|
@@ -733,7 +733,7 @@ let O = class {
|
|
|
733
733
|
function o(i) {
|
|
734
734
|
if (i = V(i), i) {
|
|
735
735
|
const c = a.findKey(n, i);
|
|
736
|
-
c && (!r ||
|
|
736
|
+
c && (!r || fe(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
@@ -743,7 +743,7 @@ let O = class {
|
|
|
743
743
|
let n = r.length, s = !1;
|
|
744
744
|
for (; n--; ) {
|
|
745
745
|
const o = r[n];
|
|
746
|
-
(!t ||
|
|
746
|
+
(!t || fe(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
747
747
|
}
|
|
748
748
|
return s;
|
|
749
749
|
}
|
|
@@ -752,11 +752,11 @@ let O = class {
|
|
|
752
752
|
return a.forEach(this, (s, o) => {
|
|
753
753
|
const i = a.findKey(n, o);
|
|
754
754
|
if (i) {
|
|
755
|
-
r[i] =
|
|
755
|
+
r[i] = ee(s), delete r[o];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
758
|
const c = t ? Lr(o) : String(o).trim();
|
|
759
|
-
c !== o && delete r[o], r[c] =
|
|
759
|
+
c !== o && delete r[o], r[c] = ee(s), n[c] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
762
|
concat(...t) {
|
|
@@ -810,14 +810,14 @@ a.reduceDescriptors(O.prototype, ({ value: e }, t) => {
|
|
|
810
810
|
};
|
|
811
811
|
});
|
|
812
812
|
a.freezeMethods(O);
|
|
813
|
-
function
|
|
813
|
+
function he(e, t) {
|
|
814
814
|
const r = this || Y, n = t || r, s = O.from(n.headers);
|
|
815
815
|
let o = n.data;
|
|
816
816
|
return a.forEach(e, function(c) {
|
|
817
817
|
o = c.call(r, o, s.normalize(), t ? t.status : void 0);
|
|
818
818
|
}), s.normalize(), o;
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function ft(e) {
|
|
821
821
|
return !!(e && e.__CANCEL__);
|
|
822
822
|
}
|
|
823
823
|
function M(e, t, r) {
|
|
@@ -844,12 +844,12 @@ function kr(e, t) {
|
|
|
844
844
|
e = e || 10;
|
|
845
845
|
const r = new Array(e), n = new Array(e);
|
|
846
846
|
let s = 0, o = 0, i;
|
|
847
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
847
|
+
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
848
848
|
const u = Date.now(), l = n[o];
|
|
849
|
-
i || (i = u), r[s] =
|
|
850
|
-
let
|
|
851
|
-
for (;
|
|
852
|
-
g += r[
|
|
849
|
+
i || (i = u), r[s] = d, n[s] = u;
|
|
850
|
+
let f = o, g = 0;
|
|
851
|
+
for (; f !== s; )
|
|
852
|
+
g += r[f++], f = f % e;
|
|
853
853
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
854
854
|
return;
|
|
855
855
|
const w = l && u - l;
|
|
@@ -862,30 +862,30 @@ function Br(e, t) {
|
|
|
862
862
|
r = l, s = null, o && (clearTimeout(o), o = null), e(...u);
|
|
863
863
|
};
|
|
864
864
|
return [(...u) => {
|
|
865
|
-
const l = Date.now(),
|
|
866
|
-
|
|
865
|
+
const l = Date.now(), f = l - r;
|
|
866
|
+
f >= n ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
867
867
|
o = null, i(s);
|
|
868
|
-
}, n -
|
|
868
|
+
}, n - f)));
|
|
869
869
|
}, () => s && i(s)];
|
|
870
870
|
}
|
|
871
|
-
const
|
|
871
|
+
const re = (e, t, r = 3) => {
|
|
872
872
|
let n = 0;
|
|
873
873
|
const s = kr(50, 250);
|
|
874
874
|
return Br((o) => {
|
|
875
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0,
|
|
875
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i - n, u = s(d), l = i <= c;
|
|
876
876
|
n = i;
|
|
877
|
-
const
|
|
877
|
+
const f = {
|
|
878
878
|
loaded: i,
|
|
879
879
|
total: c,
|
|
880
880
|
progress: c ? i / c : void 0,
|
|
881
|
-
bytes:
|
|
881
|
+
bytes: d,
|
|
882
882
|
rate: u || void 0,
|
|
883
883
|
estimated: u && c && l ? (c - i) / u : void 0,
|
|
884
884
|
event: o,
|
|
885
885
|
lengthComputable: c != null,
|
|
886
886
|
[t ? "download" : "upload"]: !0
|
|
887
887
|
};
|
|
888
|
-
e(
|
|
888
|
+
e(f);
|
|
889
889
|
}, r);
|
|
890
890
|
}, Be = (e, t) => {
|
|
891
891
|
const r = e != null;
|
|
@@ -938,14 +938,14 @@ const Ie = (e) => e instanceof O ? { ...e } : e;
|
|
|
938
938
|
function I(e, t) {
|
|
939
939
|
t = t || {};
|
|
940
940
|
const r = {};
|
|
941
|
-
function n(u, l,
|
|
941
|
+
function n(u, l, f, g) {
|
|
942
942
|
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: g }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
943
943
|
}
|
|
944
|
-
function s(u, l,
|
|
944
|
+
function s(u, l, f, g) {
|
|
945
945
|
if (a.isUndefined(l)) {
|
|
946
946
|
if (!a.isUndefined(u))
|
|
947
|
-
return n(void 0, u,
|
|
948
|
-
} else return n(u, l,
|
|
947
|
+
return n(void 0, u, f, g);
|
|
948
|
+
} else return n(u, l, f, g);
|
|
949
949
|
}
|
|
950
950
|
function o(u, l) {
|
|
951
951
|
if (!a.isUndefined(l))
|
|
@@ -957,13 +957,13 @@ function I(e, t) {
|
|
|
957
957
|
return n(void 0, u);
|
|
958
958
|
} else return n(void 0, l);
|
|
959
959
|
}
|
|
960
|
-
function c(u, l,
|
|
961
|
-
if (
|
|
960
|
+
function c(u, l, f) {
|
|
961
|
+
if (f in t)
|
|
962
962
|
return n(u, l);
|
|
963
|
-
if (
|
|
963
|
+
if (f in e)
|
|
964
964
|
return n(void 0, u);
|
|
965
965
|
}
|
|
966
|
-
const
|
|
966
|
+
const d = {
|
|
967
967
|
url: o,
|
|
968
968
|
method: o,
|
|
969
969
|
data: o,
|
|
@@ -992,11 +992,11 @@ function I(e, t) {
|
|
|
992
992
|
socketPath: i,
|
|
993
993
|
responseEncoding: i,
|
|
994
994
|
validateStatus: c,
|
|
995
|
-
headers: (u, l,
|
|
995
|
+
headers: (u, l, f) => s(Ie(u), Ie(l), f, !0)
|
|
996
996
|
};
|
|
997
997
|
return a.forEach(Object.keys({ ...e, ...t }), function(l) {
|
|
998
|
-
const
|
|
999
|
-
a.isUndefined(g) &&
|
|
998
|
+
const f = d[l] || s, g = f(e[l], t[l], l);
|
|
999
|
+
a.isUndefined(g) && f !== c || (r[l] = g);
|
|
1000
1000
|
}), r;
|
|
1001
1001
|
}
|
|
1002
1002
|
const mt = (e) => {
|
|
@@ -1006,12 +1006,12 @@ const mt = (e) => {
|
|
|
1006
1006
|
"Authorization",
|
|
1007
1007
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1008
1008
|
);
|
|
1009
|
-
let
|
|
1009
|
+
let d;
|
|
1010
1010
|
if (a.isFormData(r)) {
|
|
1011
1011
|
if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
|
|
1012
1012
|
i.setContentType(void 0);
|
|
1013
|
-
else if ((
|
|
1014
|
-
const [u, ...l] =
|
|
1013
|
+
else if ((d = i.getContentType()) !== !1) {
|
|
1014
|
+
const [u, ...l] = d ? d.split(";").map((f) => f.trim()).filter(Boolean) : [];
|
|
1015
1015
|
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
@@ -1025,7 +1025,7 @@ const mt = (e) => {
|
|
|
1025
1025
|
const s = mt(e);
|
|
1026
1026
|
let o = s.data;
|
|
1027
1027
|
const i = O.from(s.headers).normalize();
|
|
1028
|
-
let { responseType: c, onUploadProgress:
|
|
1028
|
+
let { responseType: c, onUploadProgress: d, onDownloadProgress: u } = s, l, f, g, w, h;
|
|
1029
1029
|
function y() {
|
|
1030
1030
|
w && w(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1031
1031
|
}
|
|
@@ -1067,7 +1067,7 @@ const mt = (e) => {
|
|
|
1067
1067
|
)), p = null;
|
|
1068
1068
|
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(U, A) {
|
|
1069
1069
|
p.setRequestHeader(A, U);
|
|
1070
|
-
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([g, h] =
|
|
1070
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([g, h] = re(u, !0), p.addEventListener("progress", g)), d && p.upload && ([f, w] = re(d), p.upload.addEventListener("progress", f), p.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (l = (_) => {
|
|
1071
1071
|
p && (n(!_ || _.type ? new M(null, e, p) : _), p.abort(), p = null);
|
|
1072
1072
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1073
1073
|
const S = Fr(s.url);
|
|
@@ -1097,8 +1097,8 @@ const mt = (e) => {
|
|
|
1097
1097
|
}), e = null);
|
|
1098
1098
|
};
|
|
1099
1099
|
e.forEach((u) => u.addEventListener("abort", o));
|
|
1100
|
-
const { signal:
|
|
1101
|
-
return
|
|
1100
|
+
const { signal: d } = n;
|
|
1101
|
+
return d.unsubscribe = () => a.asap(c), d;
|
|
1102
1102
|
}
|
|
1103
1103
|
}, Kr = function* (e, t) {
|
|
1104
1104
|
let r = e.byteLength;
|
|
@@ -1130,34 +1130,34 @@ const mt = (e) => {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
}, ve = (e, t, r, n) => {
|
|
1132
1132
|
const s = Vr(e, t);
|
|
1133
|
-
let o = 0, i, c = (
|
|
1134
|
-
i || (i = !0, n && n(
|
|
1133
|
+
let o = 0, i, c = (d) => {
|
|
1134
|
+
i || (i = !0, n && n(d));
|
|
1135
1135
|
};
|
|
1136
1136
|
return new ReadableStream({
|
|
1137
|
-
async pull(
|
|
1137
|
+
async pull(d) {
|
|
1138
1138
|
try {
|
|
1139
1139
|
const { done: u, value: l } = await s.next();
|
|
1140
1140
|
if (u) {
|
|
1141
|
-
c(),
|
|
1141
|
+
c(), d.close();
|
|
1142
1142
|
return;
|
|
1143
1143
|
}
|
|
1144
|
-
let
|
|
1144
|
+
let f = l.byteLength;
|
|
1145
1145
|
if (r) {
|
|
1146
|
-
let g = o +=
|
|
1146
|
+
let g = o += f;
|
|
1147
1147
|
r(g);
|
|
1148
1148
|
}
|
|
1149
|
-
|
|
1149
|
+
d.enqueue(new Uint8Array(l));
|
|
1150
1150
|
} catch (u) {
|
|
1151
1151
|
throw c(u), u;
|
|
1152
1152
|
}
|
|
1153
1153
|
},
|
|
1154
|
-
cancel(
|
|
1155
|
-
return c(
|
|
1154
|
+
cancel(d) {
|
|
1155
|
+
return c(d), s.return();
|
|
1156
1156
|
}
|
|
1157
1157
|
}, {
|
|
1158
1158
|
highWaterMark: 2
|
|
1159
1159
|
});
|
|
1160
|
-
},
|
|
1160
|
+
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", yt = ce && typeof ReadableStream == "function", Jr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), gt = (e, ...t) => {
|
|
1161
1161
|
try {
|
|
1162
1162
|
return !!e(...t);
|
|
1163
1163
|
} catch {
|
|
@@ -1173,12 +1173,12 @@ const mt = (e) => {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
}).headers.has("Content-Type");
|
|
1175
1175
|
return e && !t;
|
|
1176
|
-
}), je = 64 * 1024, be = yt && gt(() => a.isReadableStream(new Response("").body)),
|
|
1176
|
+
}), je = 64 * 1024, be = yt && gt(() => a.isReadableStream(new Response("").body)), ne = {
|
|
1177
1177
|
stream: be && ((e) => e.body)
|
|
1178
1178
|
};
|
|
1179
|
-
|
|
1179
|
+
ce && ((e) => {
|
|
1180
1180
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1181
|
-
!
|
|
1181
|
+
!ne[t] && (ne[t] = a.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
|
|
1182
1182
|
throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT, n);
|
|
1183
1183
|
});
|
|
1184
1184
|
});
|
|
@@ -1200,7 +1200,7 @@ const Qr = async (e) => {
|
|
|
1200
1200
|
}, Xr = async (e, t) => {
|
|
1201
1201
|
const r = a.toFiniteNumber(e.getContentLength());
|
|
1202
1202
|
return r ?? Qr(t);
|
|
1203
|
-
}, Yr =
|
|
1203
|
+
}, Yr = ce && (async (e) => {
|
|
1204
1204
|
let {
|
|
1205
1205
|
url: t,
|
|
1206
1206
|
method: r,
|
|
@@ -1209,10 +1209,10 @@ const Qr = async (e) => {
|
|
|
1209
1209
|
cancelToken: o,
|
|
1210
1210
|
timeout: i,
|
|
1211
1211
|
onDownloadProgress: c,
|
|
1212
|
-
onUploadProgress:
|
|
1212
|
+
onUploadProgress: d,
|
|
1213
1213
|
responseType: u,
|
|
1214
1214
|
headers: l,
|
|
1215
|
-
withCredentials:
|
|
1215
|
+
withCredentials: f = "same-origin",
|
|
1216
1216
|
fetchOptions: g
|
|
1217
1217
|
} = mt(e);
|
|
1218
1218
|
u = u ? (u + "").toLowerCase() : "text";
|
|
@@ -1222,7 +1222,7 @@ const Qr = async (e) => {
|
|
|
1222
1222
|
});
|
|
1223
1223
|
let p;
|
|
1224
1224
|
try {
|
|
1225
|
-
if (
|
|
1225
|
+
if (d && Wr && r !== "get" && r !== "head" && (p = await Xr(l, n)) !== 0) {
|
|
1226
1226
|
let A = new Request(t, {
|
|
1227
1227
|
method: "POST",
|
|
1228
1228
|
body: n,
|
|
@@ -1231,12 +1231,12 @@ const Qr = async (e) => {
|
|
|
1231
1231
|
if (a.isFormData(n) && (D = A.headers.get("content-type")) && l.setContentType(D), A.body) {
|
|
1232
1232
|
const [k, G] = Be(
|
|
1233
1233
|
p,
|
|
1234
|
-
|
|
1234
|
+
re(qe(d))
|
|
1235
1235
|
);
|
|
1236
1236
|
n = ve(A.body, je, k, G);
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
1239
|
-
a.isString(
|
|
1239
|
+
a.isString(f) || (f = f ? "include" : "omit");
|
|
1240
1240
|
const b = "credentials" in Request.prototype;
|
|
1241
1241
|
h = new Request(t, {
|
|
1242
1242
|
...g,
|
|
@@ -1245,7 +1245,7 @@ const Qr = async (e) => {
|
|
|
1245
1245
|
headers: l.normalize().toJSON(),
|
|
1246
1246
|
body: n,
|
|
1247
1247
|
duplex: "half",
|
|
1248
|
-
credentials: b ?
|
|
1248
|
+
credentials: b ? f : void 0
|
|
1249
1249
|
});
|
|
1250
1250
|
let S = await fetch(h, g);
|
|
1251
1251
|
const _ = be && (u === "stream" || u === "response");
|
|
@@ -1256,7 +1256,7 @@ const Qr = async (e) => {
|
|
|
1256
1256
|
});
|
|
1257
1257
|
const D = a.toFiniteNumber(S.headers.get("content-length")), [k, G] = c && Be(
|
|
1258
1258
|
D,
|
|
1259
|
-
|
|
1259
|
+
re(qe(c), !0)
|
|
1260
1260
|
) || [];
|
|
1261
1261
|
S = new Response(
|
|
1262
1262
|
ve(S.body, je, k, () => {
|
|
@@ -1266,7 +1266,7 @@ const Qr = async (e) => {
|
|
|
1266
1266
|
);
|
|
1267
1267
|
}
|
|
1268
1268
|
u = u || "text";
|
|
1269
|
-
let U = await
|
|
1269
|
+
let U = await ne[a.findKey(ne, u) || "text"](S, e);
|
|
1270
1270
|
return !_ && y && y(), await new Promise((A, D) => {
|
|
1271
1271
|
ht(A, D, {
|
|
1272
1272
|
data: U,
|
|
@@ -1286,7 +1286,7 @@ const Qr = async (e) => {
|
|
|
1286
1286
|
) : m.from(b, b && b.code, e, h);
|
|
1287
1287
|
}
|
|
1288
1288
|
}), Ee = {
|
|
1289
|
-
http:
|
|
1289
|
+
http: fr,
|
|
1290
1290
|
xhr: Mr,
|
|
1291
1291
|
fetch: Yr
|
|
1292
1292
|
};
|
|
@@ -1316,7 +1316,7 @@ const $e = (e) => `- ${e}`, Gr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1316
1316
|
}
|
|
1317
1317
|
if (!n) {
|
|
1318
1318
|
const o = Object.entries(s).map(
|
|
1319
|
-
([c,
|
|
1319
|
+
([c, d]) => `adapter ${c} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1320
1320
|
);
|
|
1321
1321
|
let i = t ? o.length > 1 ? `since :
|
|
1322
1322
|
` + o.map($e).join(`
|
|
@@ -1330,36 +1330,36 @@ const $e = (e) => `- ${e}`, Gr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1330
1330
|
},
|
|
1331
1331
|
adapters: Ee
|
|
1332
1332
|
};
|
|
1333
|
-
function
|
|
1333
|
+
function pe(e) {
|
|
1334
1334
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1335
1335
|
throw new M(null, e);
|
|
1336
1336
|
}
|
|
1337
1337
|
function Me(e) {
|
|
1338
|
-
return
|
|
1338
|
+
return pe(e), e.headers = O.from(e.headers), e.data = he.call(
|
|
1339
1339
|
e,
|
|
1340
1340
|
e.transformRequest
|
|
1341
1341
|
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), wt.getAdapter(e.adapter || Y.adapter)(e).then(function(n) {
|
|
1342
|
-
return
|
|
1342
|
+
return pe(e), n.data = he.call(
|
|
1343
1343
|
e,
|
|
1344
1344
|
e.transformResponse,
|
|
1345
1345
|
n
|
|
1346
1346
|
), n.headers = O.from(n.headers), n;
|
|
1347
1347
|
}, function(n) {
|
|
1348
|
-
return
|
|
1348
|
+
return ft(n) || (pe(e), n && n.response && (n.response.data = he.call(
|
|
1349
1349
|
e,
|
|
1350
1350
|
e.transformResponse,
|
|
1351
1351
|
n.response
|
|
1352
1352
|
), n.response.headers = O.from(n.response.headers))), Promise.reject(n);
|
|
1353
1353
|
});
|
|
1354
1354
|
}
|
|
1355
|
-
const bt = "1.11.0",
|
|
1355
|
+
const bt = "1.11.0", ue = {};
|
|
1356
1356
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1357
|
-
|
|
1357
|
+
ue[e] = function(n) {
|
|
1358
1358
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1359
1359
|
};
|
|
1360
1360
|
});
|
|
1361
1361
|
const He = {};
|
|
1362
|
-
|
|
1362
|
+
ue.transitional = function(t, r, n) {
|
|
1363
1363
|
function s(o, i) {
|
|
1364
1364
|
return "[Axios v" + bt + "] Transitional option '" + o + "'" + i + (n ? ". " + n : "");
|
|
1365
1365
|
}
|
|
@@ -1377,7 +1377,7 @@ le.transitional = function(t, r, n) {
|
|
|
1377
1377
|
)), t ? t(o, i, c) : !0;
|
|
1378
1378
|
};
|
|
1379
1379
|
};
|
|
1380
|
-
|
|
1380
|
+
ue.spelling = function(t) {
|
|
1381
1381
|
return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
1382
1382
|
};
|
|
1383
1383
|
function Zr(e, t, r) {
|
|
@@ -1388,19 +1388,19 @@ function Zr(e, t, r) {
|
|
|
1388
1388
|
for (; s-- > 0; ) {
|
|
1389
1389
|
const o = n[s], i = t[o];
|
|
1390
1390
|
if (i) {
|
|
1391
|
-
const c = e[o],
|
|
1392
|
-
if (
|
|
1393
|
-
throw new m("option " + o + " must be " +
|
|
1391
|
+
const c = e[o], d = c === void 0 || i(c, o, e);
|
|
1392
|
+
if (d !== !0)
|
|
1393
|
+
throw new m("option " + o + " must be " + d, m.ERR_BAD_OPTION_VALUE);
|
|
1394
1394
|
continue;
|
|
1395
1395
|
}
|
|
1396
1396
|
if (r !== !0)
|
|
1397
1397
|
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
const
|
|
1400
|
+
const te = {
|
|
1401
1401
|
assertOptions: Zr,
|
|
1402
|
-
validators:
|
|
1403
|
-
}, N =
|
|
1402
|
+
validators: ue
|
|
1403
|
+
}, N = te.validators;
|
|
1404
1404
|
let q = class {
|
|
1405
1405
|
constructor(t) {
|
|
1406
1406
|
this.defaults = t || {}, this.interceptors = {
|
|
@@ -1436,16 +1436,16 @@ let q = class {
|
|
|
1436
1436
|
_request(t, r) {
|
|
1437
1437
|
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = I(this.defaults, r);
|
|
1438
1438
|
const { transitional: n, paramsSerializer: s, headers: o } = r;
|
|
1439
|
-
n !== void 0 &&
|
|
1439
|
+
n !== void 0 && te.assertOptions(n, {
|
|
1440
1440
|
silentJSONParsing: N.transitional(N.boolean),
|
|
1441
1441
|
forcedJSONParsing: N.transitional(N.boolean),
|
|
1442
1442
|
clarifyTimeoutError: N.transitional(N.boolean)
|
|
1443
1443
|
}, !1), s != null && (a.isFunction(s) ? r.paramsSerializer = {
|
|
1444
1444
|
serialize: s
|
|
1445
|
-
} :
|
|
1445
|
+
} : te.assertOptions(s, {
|
|
1446
1446
|
encode: N.function,
|
|
1447
1447
|
serialize: N.function
|
|
1448
|
-
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0),
|
|
1448
|
+
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), te.assertOptions(r, {
|
|
1449
1449
|
baseUrl: N.spelling("baseURL"),
|
|
1450
1450
|
withXsrfToken: N.spelling("withXSRFToken")
|
|
1451
1451
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1460,25 +1460,25 @@ let q = class {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
), r.headers = O.concat(i, o);
|
|
1462
1462
|
const c = [];
|
|
1463
|
-
let
|
|
1463
|
+
let d = !0;
|
|
1464
1464
|
this.interceptors.request.forEach(function(y) {
|
|
1465
|
-
typeof y.runWhen == "function" && y.runWhen(r) === !1 || (
|
|
1465
|
+
typeof y.runWhen == "function" && y.runWhen(r) === !1 || (d = d && y.synchronous, c.unshift(y.fulfilled, y.rejected));
|
|
1466
1466
|
});
|
|
1467
1467
|
const u = [];
|
|
1468
1468
|
this.interceptors.response.forEach(function(y) {
|
|
1469
1469
|
u.push(y.fulfilled, y.rejected);
|
|
1470
1470
|
});
|
|
1471
|
-
let l,
|
|
1472
|
-
if (!
|
|
1471
|
+
let l, f = 0, g;
|
|
1472
|
+
if (!d) {
|
|
1473
1473
|
const h = [Me.bind(this), void 0];
|
|
1474
|
-
for (h.unshift(...c), h.push(...u), g = h.length, l = Promise.resolve(r);
|
|
1475
|
-
l = l.then(h[
|
|
1474
|
+
for (h.unshift(...c), h.push(...u), g = h.length, l = Promise.resolve(r); f < g; )
|
|
1475
|
+
l = l.then(h[f++], h[f++]);
|
|
1476
1476
|
return l;
|
|
1477
1477
|
}
|
|
1478
1478
|
g = c.length;
|
|
1479
1479
|
let w = r;
|
|
1480
|
-
for (
|
|
1481
|
-
const h = c[
|
|
1480
|
+
for (f = 0; f < g; ) {
|
|
1481
|
+
const h = c[f++], y = c[f++];
|
|
1482
1482
|
try {
|
|
1483
1483
|
w = h(w);
|
|
1484
1484
|
} catch (p) {
|
|
@@ -1491,8 +1491,8 @@ let q = class {
|
|
|
1491
1491
|
} catch (h) {
|
|
1492
1492
|
return Promise.reject(h);
|
|
1493
1493
|
}
|
|
1494
|
-
for (
|
|
1495
|
-
l = l.then(u[
|
|
1494
|
+
for (f = 0, g = u.length; f < g; )
|
|
1495
|
+
l = l.then(u[f++], u[f++]);
|
|
1496
1496
|
return l;
|
|
1497
1497
|
}
|
|
1498
1498
|
getUri(t) {
|
|
@@ -1684,9 +1684,9 @@ const E = St(Y);
|
|
|
1684
1684
|
E.Axios = q;
|
|
1685
1685
|
E.CanceledError = M;
|
|
1686
1686
|
E.CancelToken = en;
|
|
1687
|
-
E.isCancel =
|
|
1687
|
+
E.isCancel = ft;
|
|
1688
1688
|
E.VERSION = bt;
|
|
1689
|
-
E.toFormData =
|
|
1689
|
+
E.toFormData = ae;
|
|
1690
1690
|
E.AxiosError = m;
|
|
1691
1691
|
E.Cancel = E.CanceledError;
|
|
1692
1692
|
E.all = function(t) {
|
|
@@ -1696,17 +1696,17 @@ E.spread = tn;
|
|
|
1696
1696
|
E.isAxiosError = rn;
|
|
1697
1697
|
E.mergeConfig = I;
|
|
1698
1698
|
E.AxiosHeaders = O;
|
|
1699
|
-
E.formToJSON = (e) =>
|
|
1699
|
+
E.formToJSON = (e) => dt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1700
1700
|
E.getAdapter = wt.getAdapter;
|
|
1701
1701
|
E.HttpStatusCode = Se;
|
|
1702
1702
|
E.default = E;
|
|
1703
1703
|
const {
|
|
1704
1704
|
Axios: cs,
|
|
1705
|
-
AxiosError:
|
|
1705
|
+
AxiosError: me,
|
|
1706
1706
|
CanceledError: us,
|
|
1707
1707
|
isCancel: ls,
|
|
1708
|
-
CancelToken:
|
|
1709
|
-
VERSION:
|
|
1708
|
+
CancelToken: ds,
|
|
1709
|
+
VERSION: fs,
|
|
1710
1710
|
all: hs,
|
|
1711
1711
|
Cancel: ps,
|
|
1712
1712
|
isAxiosError: ms,
|
|
@@ -1765,16 +1765,16 @@ class nn {
|
|
|
1765
1765
|
account_chain_id: i
|
|
1766
1766
|
}
|
|
1767
1767
|
});
|
|
1768
|
-
} catch (
|
|
1769
|
-
if (
|
|
1770
|
-
const u = (c =
|
|
1768
|
+
} catch (d) {
|
|
1769
|
+
if (d instanceof me) {
|
|
1770
|
+
const u = (c = d.response) == null ? void 0 : c.data;
|
|
1771
1771
|
if (typeof (u == null ? void 0 : u.message) == "string") {
|
|
1772
1772
|
const l = u.message.toLowerCase();
|
|
1773
1773
|
throw l == "invalid signature" ? new Je() : l == "address in use" ? new Ve(t) : l == "code in use" ? new ze(n) : new Error(l);
|
|
1774
1774
|
} else if ((u == null ? void 0 : u.message) instanceof Array)
|
|
1775
1775
|
throw new Ke(u.message);
|
|
1776
1776
|
}
|
|
1777
|
-
throw
|
|
1777
|
+
throw d;
|
|
1778
1778
|
}
|
|
1779
1779
|
}
|
|
1780
1780
|
async update(t, r, n, s, o, i) {
|
|
@@ -1791,26 +1791,23 @@ class nn {
|
|
|
1791
1791
|
account_chain_id: i
|
|
1792
1792
|
}
|
|
1793
1793
|
});
|
|
1794
|
-
} catch (
|
|
1795
|
-
if (
|
|
1796
|
-
const u = (c =
|
|
1794
|
+
} catch (d) {
|
|
1795
|
+
if (d instanceof me) {
|
|
1796
|
+
const u = (c = d.response) == null ? void 0 : c.data;
|
|
1797
1797
|
if (typeof (u == null ? void 0 : u.message) == "string") {
|
|
1798
1798
|
const l = u.message.toLowerCase();
|
|
1799
1799
|
throw l == "invalid signature" ? new Je() : l == "address in use" ? new Ve(t) : l == "code in use" ? new ze(n) : new Error(l);
|
|
1800
1800
|
} else if ((u == null ? void 0 : u.message) instanceof Array)
|
|
1801
1801
|
throw new Ke(u.message);
|
|
1802
1802
|
}
|
|
1803
|
-
throw
|
|
1803
|
+
throw d;
|
|
1804
1804
|
}
|
|
1805
1805
|
}
|
|
1806
1806
|
async isCodeFree(t) {
|
|
1807
|
-
var r;
|
|
1808
1807
|
try {
|
|
1809
|
-
return await this.httpClient.get({ path: `/affiliates/codes/${t}` })
|
|
1810
|
-
} catch (
|
|
1811
|
-
|
|
1812
|
-
return !0;
|
|
1813
|
-
throw console.error("Fuul SDK: Could not check affiliate code", n), n;
|
|
1808
|
+
return (await this.httpClient.get({ path: `/affiliates/codes/${t}` })).data.available;
|
|
1809
|
+
} catch (r) {
|
|
1810
|
+
throw console.error("Fuul SDK: Could not check affiliate code", r), r;
|
|
1814
1811
|
}
|
|
1815
1812
|
}
|
|
1816
1813
|
async getCode(t, r) {
|
|
@@ -1818,7 +1815,7 @@ class nn {
|
|
|
1818
1815
|
try {
|
|
1819
1816
|
return (await this.httpClient.get({ path: `/affiliates/${t}`, queryParams: { identifier_type: r } })).data.code;
|
|
1820
1817
|
} catch (s) {
|
|
1821
|
-
if (s instanceof
|
|
1818
|
+
if (s instanceof me && ((n = s.response) == null ? void 0 : n.status) === 404)
|
|
1822
1819
|
return null;
|
|
1823
1820
|
throw console.error("Fuul SDK: Could not get affiliate code", s), s;
|
|
1824
1821
|
}
|
|
@@ -1870,42 +1867,42 @@ class ln {
|
|
|
1870
1867
|
this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
|
|
1871
1868
|
}
|
|
1872
1869
|
isDuplicate(t) {
|
|
1873
|
-
var l,
|
|
1870
|
+
var l, f, g, w;
|
|
1874
1871
|
const r = `${We}_${t.name}`, n = localStorage.getItem(r);
|
|
1875
1872
|
if (!n)
|
|
1876
1873
|
return !1;
|
|
1877
1874
|
const s = JSON.parse(n);
|
|
1878
1875
|
if (this.getCurrentTimestamp() - s.timestamp > cn)
|
|
1879
1876
|
return !1;
|
|
1880
|
-
let
|
|
1881
|
-
t.metadata && (
|
|
1877
|
+
let d = !1;
|
|
1878
|
+
t.metadata && (d = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && ((l = s.user) == null ? void 0 : l.identifier) === ((f = t.user) == null ? void 0 : f.identifier) && ((g = s.user) == null ? void 0 : g.identifier_type) === ((w = t.user) == null ? void 0 : w.identifier_type) && s.signature === t.signature && s.signature_message === t.signature_message);
|
|
1882
1879
|
let u = !1;
|
|
1883
|
-
return t.args && s.args && (u = s.args.page === t.args.page), u &&
|
|
1880
|
+
return t.args && s.args && (u = s.args.page === t.args.page), u && d;
|
|
1884
1881
|
}
|
|
1885
1882
|
getCurrentTimestamp() {
|
|
1886
1883
|
return Date.now() / 1e3;
|
|
1887
1884
|
}
|
|
1888
1885
|
saveSentEvent(t) {
|
|
1889
|
-
var i, c,
|
|
1886
|
+
var i, c, d, u;
|
|
1890
1887
|
const r = `${We}_${t.name}`, n = `${r}_all`, s = this.getCurrentTimestamp(), o = { ...t, timestamp: s };
|
|
1891
1888
|
if (localStorage.setItem(r, JSON.stringify(o)), t.name === un) {
|
|
1892
|
-
const l = JSON.parse(localStorage.getItem(n) || "[]"),
|
|
1889
|
+
const l = JSON.parse(localStorage.getItem(n) || "[]"), f = {
|
|
1893
1890
|
name: t.name,
|
|
1894
1891
|
user: {
|
|
1895
1892
|
identifier: (i = t.user) == null ? void 0 : i.identifier,
|
|
1896
1893
|
identifier_type: (c = t.user) == null ? void 0 : c.identifier_type
|
|
1897
1894
|
},
|
|
1898
|
-
tracking_id: (
|
|
1895
|
+
tracking_id: (d = t.metadata) == null ? void 0 : d.tracking_id,
|
|
1899
1896
|
page: (u = t.args) == null ? void 0 : u.page
|
|
1900
1897
|
};
|
|
1901
|
-
"user_address" in t && (
|
|
1902
|
-
const g = [...l,
|
|
1898
|
+
"user_address" in t && (f.user_address = t.user_address);
|
|
1899
|
+
const g = [...l, f];
|
|
1903
1900
|
g.length > Qe && g.splice(0, g.length - Qe), localStorage.setItem(n, JSON.stringify(g));
|
|
1904
1901
|
}
|
|
1905
1902
|
}
|
|
1906
1903
|
}
|
|
1907
|
-
const
|
|
1908
|
-
version:
|
|
1904
|
+
const dn = "7.3.2", fn = {
|
|
1905
|
+
version: dn
|
|
1909
1906
|
};
|
|
1910
1907
|
class hn {
|
|
1911
1908
|
constructor(t) {
|
|
@@ -1915,7 +1912,7 @@ class hn {
|
|
|
1915
1912
|
...t,
|
|
1916
1913
|
headers: {
|
|
1917
1914
|
Authorization: `Bearer ${t.apiKey}`,
|
|
1918
|
-
"X-Fuul-Sdk-Version":
|
|
1915
|
+
"X-Fuul-Sdk-Version": fn.version
|
|
1919
1916
|
}
|
|
1920
1917
|
}), this.defaultQueryParams = t.queryParams || {};
|
|
1921
1918
|
}
|
|
@@ -2082,10 +2079,7 @@ class yn {
|
|
|
2082
2079
|
}
|
|
2083
2080
|
async updateReferralCode(t) {
|
|
2084
2081
|
await this.httpClient.patch({
|
|
2085
|
-
path:
|
|
2086
|
-
queryParams: {
|
|
2087
|
-
code: t.code
|
|
2088
|
-
},
|
|
2082
|
+
path: `/referral_codes/${t.code}`,
|
|
2089
2083
|
postData: {
|
|
2090
2084
|
max_uses: t.max_uses
|
|
2091
2085
|
}
|
|
@@ -2122,9 +2116,9 @@ class On {
|
|
|
2122
2116
|
}
|
|
2123
2117
|
}
|
|
2124
2118
|
const xn = "https://api.fuul.xyz/api/v1/";
|
|
2125
|
-
let F = !1, Ce = !1, Pe, L, Ct, _t, H,
|
|
2119
|
+
let F = !1, Ce = !1, Pe, L, Ct, _t, H, le, K, Rt, de, v;
|
|
2126
2120
|
function Nn(e) {
|
|
2127
|
-
F = !!e.debug, !Ce && (Pe = e.apiKey, rs(), L = ns(e.baseApiUrl ?? xn, e.defaultQueryParams ?? {}), Ct = new an({ httpClient: L, debug: F }),
|
|
2121
|
+
F = !!e.debug, !Ce && (Pe = e.apiKey, rs(), L = ns(e.baseApiUrl ?? xn, e.defaultQueryParams ?? {}), Ct = new an({ httpClient: L, debug: F }), le = new ln({ httpClient: L, debug: F }), H = new nn({ httpClient: L, debug: F }), K = new mn({ httpClient: L, debug: F }), _t = new On({ httpClient: L }), Rt = new on({ httpClient: L, debug: F }), de = new pn({ httpClient: L }), v = new yn({ httpClient: L, debug: F }), Ce = !0, F && console.debug("Fuul SDK: init() complete"));
|
|
2128
2122
|
}
|
|
2129
2123
|
function R() {
|
|
2130
2124
|
if (!Ce)
|
|
@@ -2139,7 +2133,7 @@ async function Un(e, t) {
|
|
|
2139
2133
|
tracking_id: Ae()
|
|
2140
2134
|
}
|
|
2141
2135
|
};
|
|
2142
|
-
await
|
|
2136
|
+
await le.sendEvent(r);
|
|
2143
2137
|
}
|
|
2144
2138
|
async function Ln(e, t) {
|
|
2145
2139
|
R(), Oe(), xe();
|
|
@@ -2160,7 +2154,7 @@ async function Ln(e, t) {
|
|
|
2160
2154
|
tag: Rn() ?? void 0
|
|
2161
2155
|
}
|
|
2162
2156
|
};
|
|
2163
|
-
await
|
|
2157
|
+
await le.sendEvent(r, t);
|
|
2164
2158
|
}
|
|
2165
2159
|
async function Dn(e, t) {
|
|
2166
2160
|
R(), Oe(), xe();
|
|
@@ -2178,7 +2172,7 @@ async function Dn(e, t) {
|
|
|
2178
2172
|
tracking_id: Ae()
|
|
2179
2173
|
}
|
|
2180
2174
|
};
|
|
2181
|
-
e != null && e.signature && (r.signature = e == null ? void 0 : e.signature, r.signature_message = e == null ? void 0 : e.message), e != null && e.signaturePublicKey && (r.signature_public_key = e.signaturePublicKey), e != null && e.accountChainId && (r.account_chain_id = e.accountChainId), await
|
|
2175
|
+
e != null && e.signature && (r.signature = e == null ? void 0 : e.signature, r.signature_message = e == null ? void 0 : e.message), e != null && e.signaturePublicKey && (r.signature_public_key = e.signaturePublicKey), e != null && e.accountChainId && (r.account_chain_id = e.accountChainId), await le.sendEvent(r, t);
|
|
2182
2176
|
}
|
|
2183
2177
|
async function Fn(e) {
|
|
2184
2178
|
R(), await H.create(
|