@fuul/sdk 7.25.0 → 7.26.0
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/affiliate-portal/AffiliatePortalService.d.ts.map +1 -1
- package/dist/core.d.ts +42 -8
- package/dist/core.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +429 -410
- package/dist/index.umd.js +6 -6
- package/dist/payouts/PayoutService.d.ts +2 -1
- package/dist/payouts/PayoutService.d.ts.map +1 -1
- package/dist/types/api.d.ts +137 -5
- package/dist/types/api.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var zt = Object.defineProperty;
|
|
2
2
|
var Jt = (t, e, r) => e in t ? zt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
-
var
|
|
4
|
-
const
|
|
3
|
+
var _ = (t, e, r) => Jt(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
const ee = "/affiliate-portal";
|
|
5
5
|
class Wt {
|
|
6
6
|
constructor(e) {
|
|
7
|
-
|
|
7
|
+
_(this, "httpClient");
|
|
8
8
|
this.httpClient = e.httpClient;
|
|
9
9
|
}
|
|
10
10
|
async getAffiliateStats(e) {
|
|
11
11
|
return (await this.httpClient.get({
|
|
12
|
-
path: `${
|
|
12
|
+
path: `${ee}/stats`,
|
|
13
13
|
queryParams: {
|
|
14
14
|
user_identifier: e.user_identifier,
|
|
15
15
|
from: e.from,
|
|
@@ -23,7 +23,7 @@ class Wt {
|
|
|
23
23
|
}
|
|
24
24
|
async getAffiliateTotalStats(e) {
|
|
25
25
|
return (await this.httpClient.get({
|
|
26
|
-
path: `${
|
|
26
|
+
path: `${ee}/total-stats`,
|
|
27
27
|
queryParams: {
|
|
28
28
|
statuses: e.statuses,
|
|
29
29
|
regions: e.regions,
|
|
@@ -33,7 +33,7 @@ class Wt {
|
|
|
33
33
|
}
|
|
34
34
|
async getReferralTree(e) {
|
|
35
35
|
return (await this.httpClient.get({
|
|
36
|
-
path: `${
|
|
36
|
+
path: `${ee}/referral-tree`,
|
|
37
37
|
queryParams: {
|
|
38
38
|
user_identifier: e.user_identifier
|
|
39
39
|
}
|
|
@@ -41,7 +41,7 @@ class Wt {
|
|
|
41
41
|
}
|
|
42
42
|
async getStatsBreakdown(e) {
|
|
43
43
|
return (await this.httpClient.get({
|
|
44
|
-
path: `${
|
|
44
|
+
path: `${ee}/stats-breakdown`,
|
|
45
45
|
queryParams: {
|
|
46
46
|
user_identifier: e.user_identifier,
|
|
47
47
|
group_by: e.group_by,
|
|
@@ -56,7 +56,7 @@ class Wt {
|
|
|
56
56
|
}
|
|
57
57
|
async getAffiliateNewTraders(e) {
|
|
58
58
|
return (await this.httpClient.get({
|
|
59
|
-
path: `${
|
|
59
|
+
path: `${ee}/new-traders`,
|
|
60
60
|
queryParams: {
|
|
61
61
|
user_identifier: e.user_identifier,
|
|
62
62
|
from: e.from,
|
|
@@ -66,28 +66,28 @@ class Wt {
|
|
|
66
66
|
})).data;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Ct(t, e) {
|
|
70
70
|
return function() {
|
|
71
71
|
return t.apply(e, arguments);
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
const { toString: Qt } = Object.prototype, { getPrototypeOf: Be } = Object, { iterator: we, toStringTag:
|
|
74
|
+
const { toString: Qt } = Object.prototype, { getPrototypeOf: Be } = Object, { iterator: we, toStringTag: Et } = Symbol, _e = /* @__PURE__ */ ((t) => (e) => {
|
|
75
75
|
const r = Qt.call(e);
|
|
76
76
|
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
|
|
77
|
-
})(/* @__PURE__ */ Object.create(null)), F = (t) => (t = t.toLowerCase(), (e) =>
|
|
77
|
+
})(/* @__PURE__ */ Object.create(null)), F = (t) => (t = t.toLowerCase(), (e) => _e(e) === t), be = (t) => (e) => typeof e === t, { isArray: Y } = Array, Q = be("undefined");
|
|
78
78
|
function re(t) {
|
|
79
|
-
return t !== null && !
|
|
79
|
+
return t !== null && !Q(t) && t.constructor !== null && !Q(t.constructor) && P(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
80
80
|
}
|
|
81
|
-
const
|
|
81
|
+
const Rt = F("ArrayBuffer");
|
|
82
82
|
function Xt(t) {
|
|
83
83
|
let e;
|
|
84
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
84
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Rt(t.buffer), e;
|
|
85
85
|
}
|
|
86
|
-
const Yt =
|
|
87
|
-
if (
|
|
86
|
+
const Yt = be("string"), P = be("function"), St = be("number"), ne = (t) => t !== null && typeof t == "object", Gt = (t) => t === !0 || t === !1, pe = (t) => {
|
|
87
|
+
if (_e(t) !== "object")
|
|
88
88
|
return !1;
|
|
89
89
|
const e = Be(t);
|
|
90
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
90
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Et in t) && !(we in t);
|
|
91
91
|
}, Zt = (t) => {
|
|
92
92
|
if (!ne(t) || re(t))
|
|
93
93
|
return !1;
|
|
@@ -100,9 +100,9 @@ const Yt = _e("string"), P = _e("function"), Rt = _e("number"), ne = (t) => t !=
|
|
|
100
100
|
function ar() {
|
|
101
101
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
102
102
|
}
|
|
103
|
-
const
|
|
103
|
+
const Ze = ar(), et = typeof Ze.FormData < "u" ? Ze.FormData : void 0, cr = (t) => {
|
|
104
104
|
let e;
|
|
105
|
-
return t && (
|
|
105
|
+
return t && (et && t instanceof et || P(t.append) && ((e = _e(t)) === "formdata" || // detect form-data instance
|
|
106
106
|
e === "object" && P(t.toString) && t.toString() === "[object FormData]"));
|
|
107
107
|
}, ur = F("URLSearchParams"), [lr, dr, fr, hr] = [
|
|
108
108
|
"ReadableStream",
|
|
@@ -114,7 +114,7 @@ function se(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
|
114
114
|
if (t === null || typeof t > "u")
|
|
115
115
|
return;
|
|
116
116
|
let n, s;
|
|
117
|
-
if (typeof t != "object" && (t = [t]),
|
|
117
|
+
if (typeof t != "object" && (t = [t]), Y(t))
|
|
118
118
|
for (n = 0, s = t.length; n < s; n++)
|
|
119
119
|
e.call(null, t[n], n, t);
|
|
120
120
|
else {
|
|
@@ -126,7 +126,7 @@ function se(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
|
126
126
|
c = i[n], e.call(null, t[c], c, t);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Tt(t, e) {
|
|
130
130
|
if (re(t))
|
|
131
131
|
return null;
|
|
132
132
|
e = e.toLowerCase();
|
|
@@ -137,13 +137,13 @@ function St(t, e) {
|
|
|
137
137
|
return s;
|
|
138
138
|
return null;
|
|
139
139
|
}
|
|
140
|
-
const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
140
|
+
const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, At = (t) => !Q(t) && t !== M;
|
|
141
141
|
function De() {
|
|
142
|
-
const { caseless: t, skipUndefined: e } =
|
|
142
|
+
const { caseless: t, skipUndefined: e } = At(this) && this || {}, r = {}, n = (s, i) => {
|
|
143
143
|
if (i === "__proto__" || i === "constructor" || i === "prototype")
|
|
144
144
|
return;
|
|
145
|
-
const o = t &&
|
|
146
|
-
pe(r[o]) && pe(s) ? r[o] = De(r[o], s) : pe(s) ? r[o] = De({}, s) :
|
|
145
|
+
const o = t && Tt(r, i) || i;
|
|
146
|
+
pe(r[o]) && pe(s) ? r[o] = De(r[o], s) : pe(s) ? r[o] = De({}, s) : Y(s) ? r[o] = s.slice() : (!e || !Q(s)) && (r[o] = s);
|
|
147
147
|
};
|
|
148
148
|
for (let s = 0, i = arguments.length; s < i; s++)
|
|
149
149
|
arguments[s] && se(arguments[s], n);
|
|
@@ -153,7 +153,7 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (se(
|
|
|
153
153
|
e,
|
|
154
154
|
(s, i) => {
|
|
155
155
|
r && P(s) ? Object.defineProperty(t, i, {
|
|
156
|
-
value:
|
|
156
|
+
value: Ct(s, r),
|
|
157
157
|
writable: !0,
|
|
158
158
|
enumerable: !0,
|
|
159
159
|
configurable: !0
|
|
@@ -165,7 +165,7 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (se(
|
|
|
165
165
|
});
|
|
166
166
|
},
|
|
167
167
|
{ allOwnKeys: n }
|
|
168
|
-
), t),
|
|
168
|
+
), t), gr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), mr = (t, e, r, n) => {
|
|
169
169
|
t.prototype = Object.create(e.prototype, n), Object.defineProperty(t.prototype, "constructor", {
|
|
170
170
|
value: t,
|
|
171
171
|
writable: !0,
|
|
@@ -184,15 +184,15 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (se(
|
|
|
184
184
|
t = r !== !1 && Be(t);
|
|
185
185
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
186
186
|
return e;
|
|
187
|
-
},
|
|
187
|
+
}, _r = (t, e, r) => {
|
|
188
188
|
t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
|
|
189
189
|
const n = t.indexOf(e, r);
|
|
190
190
|
return n !== -1 && n === r;
|
|
191
|
-
},
|
|
191
|
+
}, br = (t) => {
|
|
192
192
|
if (!t) return null;
|
|
193
|
-
if (
|
|
193
|
+
if (Y(t)) return t;
|
|
194
194
|
let e = t.length;
|
|
195
|
-
if (!
|
|
195
|
+
if (!St(e)) return null;
|
|
196
196
|
const r = new Array(e);
|
|
197
197
|
for (; e-- > 0; )
|
|
198
198
|
r[e] = t[e];
|
|
@@ -212,14 +212,14 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (se(
|
|
|
212
212
|
return n;
|
|
213
213
|
}, Sr = F("HTMLFormElement"), Tr = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, s) {
|
|
214
214
|
return n.toUpperCase() + s;
|
|
215
|
-
}),
|
|
215
|
+
}), tt = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Ar = F("RegExp"), Pt = (t, e) => {
|
|
216
216
|
const r = Object.getOwnPropertyDescriptors(t), n = {};
|
|
217
217
|
se(r, (s, i) => {
|
|
218
218
|
let o;
|
|
219
219
|
(o = e(s, i, t)) !== !1 && (n[i] = o || s);
|
|
220
220
|
}), Object.defineProperties(t, n);
|
|
221
221
|
}, Pr = (t) => {
|
|
222
|
-
|
|
222
|
+
Pt(t, (e, r) => {
|
|
223
223
|
if (P(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
224
224
|
return !1;
|
|
225
225
|
const n = t[r];
|
|
@@ -239,11 +239,11 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (se(
|
|
|
239
239
|
r[i] = !0;
|
|
240
240
|
});
|
|
241
241
|
};
|
|
242
|
-
return
|
|
242
|
+
return Y(t) ? n(t) : n(String(t).split(e)), r;
|
|
243
243
|
}, Nr = () => {
|
|
244
244
|
}, xr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
245
245
|
function Ur(t) {
|
|
246
|
-
return !!(t && P(t.append) && t[
|
|
246
|
+
return !!(t && P(t.append) && t[Et] === "FormData" && t[we]);
|
|
247
247
|
}
|
|
248
248
|
const Dr = (t) => {
|
|
249
249
|
const e = new Array(10), r = (n, s) => {
|
|
@@ -254,17 +254,17 @@ const Dr = (t) => {
|
|
|
254
254
|
return n;
|
|
255
255
|
if (!("toJSON" in n)) {
|
|
256
256
|
e[s] = n;
|
|
257
|
-
const i =
|
|
257
|
+
const i = Y(n) ? [] : {};
|
|
258
258
|
return se(n, (o, c) => {
|
|
259
259
|
const f = r(o, s + 1);
|
|
260
|
-
!
|
|
260
|
+
!Q(f) && (i[c] = f);
|
|
261
261
|
}), e[s] = void 0, i;
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
return n;
|
|
265
265
|
};
|
|
266
266
|
return r(t, 0);
|
|
267
|
-
}, Lr = F("AsyncFunction"), Fr = (t) => t && (ne(t) || P(t)) && P(t.then) && P(t.catch),
|
|
267
|
+
}, Lr = F("AsyncFunction"), Fr = (t) => t && (ne(t) || P(t)) && P(t.then) && P(t.catch), Ot = ((t, e) => t ? setImmediate : e ? ((r, n) => (M.addEventListener(
|
|
268
268
|
"message",
|
|
269
269
|
({ source: s, data: i }) => {
|
|
270
270
|
s === M && i === r && n.length && n.shift()();
|
|
@@ -272,14 +272,14 @@ const Dr = (t) => {
|
|
|
272
272
|
!1
|
|
273
273
|
), (s) => {
|
|
274
274
|
n.push(s), M.postMessage(r, "*");
|
|
275
|
-
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", P(M.postMessage)), kr = typeof queueMicrotask < "u" ? queueMicrotask.bind(M) : typeof process < "u" && process.nextTick ||
|
|
276
|
-
isArray:
|
|
277
|
-
isArrayBuffer:
|
|
275
|
+
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", P(M.postMessage)), kr = typeof queueMicrotask < "u" ? queueMicrotask.bind(M) : typeof process < "u" && process.nextTick || Ot, vr = (t) => t != null && P(t[we]), a = {
|
|
276
|
+
isArray: Y,
|
|
277
|
+
isArrayBuffer: Rt,
|
|
278
278
|
isBuffer: re,
|
|
279
279
|
isFormData: cr,
|
|
280
280
|
isArrayBufferView: Xt,
|
|
281
281
|
isString: Yt,
|
|
282
|
-
isNumber:
|
|
282
|
+
isNumber: St,
|
|
283
283
|
isBoolean: Gt,
|
|
284
284
|
isObject: ne,
|
|
285
285
|
isPlainObject: pe,
|
|
@@ -288,7 +288,7 @@ const Dr = (t) => {
|
|
|
288
288
|
isRequest: dr,
|
|
289
289
|
isResponse: fr,
|
|
290
290
|
isHeaders: hr,
|
|
291
|
-
isUndefined:
|
|
291
|
+
isUndefined: Q,
|
|
292
292
|
isDate: er,
|
|
293
293
|
isFile: tr,
|
|
294
294
|
isReactNativeBlob: rr,
|
|
@@ -304,39 +304,39 @@ const Dr = (t) => {
|
|
|
304
304
|
merge: De,
|
|
305
305
|
extend: yr,
|
|
306
306
|
trim: pr,
|
|
307
|
-
stripBOM:
|
|
308
|
-
inherits:
|
|
307
|
+
stripBOM: gr,
|
|
308
|
+
inherits: mr,
|
|
309
309
|
toFlatObject: wr,
|
|
310
|
-
kindOf:
|
|
310
|
+
kindOf: _e,
|
|
311
311
|
kindOfTest: F,
|
|
312
|
-
endsWith:
|
|
313
|
-
toArray:
|
|
312
|
+
endsWith: _r,
|
|
313
|
+
toArray: br,
|
|
314
314
|
forEachEntry: Er,
|
|
315
315
|
matchAll: Rr,
|
|
316
316
|
isHTMLForm: Sr,
|
|
317
|
-
hasOwnProperty:
|
|
318
|
-
hasOwnProp:
|
|
317
|
+
hasOwnProperty: tt,
|
|
318
|
+
hasOwnProp: tt,
|
|
319
319
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
320
|
-
reduceDescriptors:
|
|
320
|
+
reduceDescriptors: Pt,
|
|
321
321
|
freezeMethods: Pr,
|
|
322
322
|
toObjectSet: Or,
|
|
323
323
|
toCamelCase: Tr,
|
|
324
324
|
noop: Nr,
|
|
325
325
|
toFiniteNumber: xr,
|
|
326
|
-
findKey:
|
|
326
|
+
findKey: Tt,
|
|
327
327
|
global: M,
|
|
328
|
-
isContextDefined:
|
|
328
|
+
isContextDefined: At,
|
|
329
329
|
isSpecCompliantForm: Ur,
|
|
330
330
|
toJSONObject: Dr,
|
|
331
331
|
isAsyncFn: Lr,
|
|
332
332
|
isThenable: Fr,
|
|
333
|
-
setImmediate:
|
|
333
|
+
setImmediate: Ot,
|
|
334
334
|
asap: kr,
|
|
335
335
|
isIterable: vr
|
|
336
336
|
};
|
|
337
|
-
let
|
|
337
|
+
let g = class Nt extends Error {
|
|
338
338
|
static from(e, r, n, s, i, o) {
|
|
339
|
-
const c = new
|
|
339
|
+
const c = new Nt(e.message, r || e.code, n, s, i);
|
|
340
340
|
return c.cause = e, c.name = e.name, e.status != null && c.status == null && (c.status = e.status), o && Object.assign(c, o), c;
|
|
341
341
|
}
|
|
342
342
|
/**
|
|
@@ -378,34 +378,34 @@ let m = class Ot extends Error {
|
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
380
|
};
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
381
|
+
g.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
382
|
+
g.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
383
|
+
g.ECONNABORTED = "ECONNABORTED";
|
|
384
|
+
g.ETIMEDOUT = "ETIMEDOUT";
|
|
385
|
+
g.ERR_NETWORK = "ERR_NETWORK";
|
|
386
|
+
g.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
387
|
+
g.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
388
|
+
g.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
389
|
+
g.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
390
|
+
g.ERR_CANCELED = "ERR_CANCELED";
|
|
391
|
+
g.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
392
|
+
g.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
393
393
|
const Br = null;
|
|
394
394
|
function Le(t) {
|
|
395
395
|
return a.isPlainObject(t) || a.isArray(t);
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function xt(t) {
|
|
398
398
|
return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
399
399
|
}
|
|
400
400
|
function Ae(t, e, r) {
|
|
401
401
|
return t ? t.concat(e).map(function(s, i) {
|
|
402
|
-
return s =
|
|
402
|
+
return s = xt(s), !r && i ? "[" + s + "]" : s;
|
|
403
403
|
}).join(r ? "." : "") : e;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function Ir(t) {
|
|
406
406
|
return a.isArray(t) && !t.some(Le);
|
|
407
407
|
}
|
|
408
|
-
const
|
|
408
|
+
const qr = a.toFlatObject(a, {}, null, function(e) {
|
|
409
409
|
return /^is[A-Z]/.test(e);
|
|
410
410
|
});
|
|
411
411
|
function Ce(t, e, r) {
|
|
@@ -433,7 +433,7 @@ function Ce(t, e, r) {
|
|
|
433
433
|
if (a.isBoolean(d))
|
|
434
434
|
return d.toString();
|
|
435
435
|
if (!f && a.isBlob(d))
|
|
436
|
-
throw new
|
|
436
|
+
throw new g("Blob is not supported. Use a Buffer instead.");
|
|
437
437
|
return a.isArrayBuffer(d) || a.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
438
438
|
}
|
|
439
439
|
function u(d, y, p) {
|
|
@@ -443,8 +443,8 @@ function Ce(t, e, r) {
|
|
|
443
443
|
if (d && !p && typeof d == "object") {
|
|
444
444
|
if (a.endsWith(y, "{}"))
|
|
445
445
|
y = n ? y : y.slice(0, -2), d = JSON.stringify(d);
|
|
446
|
-
else if (a.isArray(d) &&
|
|
447
|
-
return y =
|
|
446
|
+
else if (a.isArray(d) && Ir(d) || (a.isFileList(d) || a.endsWith(y, "[]")) && (C = a.toArray(d)))
|
|
447
|
+
return y = xt(y), C.forEach(function(R, T) {
|
|
448
448
|
!(a.isUndefined(R) || R === null) && e.append(
|
|
449
449
|
// eslint-disable-next-line no-nested-ternary
|
|
450
450
|
o === !0 ? Ae([y], T, i) : o === null ? y : y + "[]",
|
|
@@ -454,7 +454,7 @@ function Ce(t, e, r) {
|
|
|
454
454
|
}
|
|
455
455
|
return Le(d) ? !0 : (e.append(Ae(p, y, i), l(d)), !1);
|
|
456
456
|
}
|
|
457
|
-
const h = [],
|
|
457
|
+
const h = [], m = Object.assign(qr, {
|
|
458
458
|
defaultVisitor: u,
|
|
459
459
|
convertValue: l,
|
|
460
460
|
isVisitable: Le
|
|
@@ -464,7 +464,7 @@ function Ce(t, e, r) {
|
|
|
464
464
|
if (h.indexOf(d) !== -1)
|
|
465
465
|
throw Error("Circular reference detected in " + y.join("."));
|
|
466
466
|
h.push(d), a.forEach(d, function(C, N) {
|
|
467
|
-
(!(a.isUndefined(C) || C === null) && s.call(e, C, a.isString(N) ? N.trim() : N, y,
|
|
467
|
+
(!(a.isUndefined(C) || C === null) && s.call(e, C, a.isString(N) ? N.trim() : N, y, m)) === !0 && E(C, y ? y.concat(N) : [N]);
|
|
468
468
|
}), h.pop();
|
|
469
469
|
}
|
|
470
470
|
}
|
|
@@ -472,7 +472,7 @@ function Ce(t, e, r) {
|
|
|
472
472
|
throw new TypeError("data must be an object");
|
|
473
473
|
return E(t), e;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function rt(t) {
|
|
476
476
|
const e = {
|
|
477
477
|
"!": "%21",
|
|
478
478
|
"'": "%27",
|
|
@@ -486,17 +486,17 @@ function tt(t) {
|
|
|
486
486
|
return e[n];
|
|
487
487
|
});
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function Ie(t, e) {
|
|
490
490
|
this._pairs = [], t && Ce(t, this, e);
|
|
491
491
|
}
|
|
492
|
-
const
|
|
493
|
-
|
|
492
|
+
const Ut = Ie.prototype;
|
|
493
|
+
Ut.append = function(e, r) {
|
|
494
494
|
this._pairs.push([e, r]);
|
|
495
495
|
};
|
|
496
|
-
|
|
496
|
+
Ut.toString = function(e) {
|
|
497
497
|
const r = e ? function(n) {
|
|
498
|
-
return e.call(this, n,
|
|
499
|
-
} :
|
|
498
|
+
return e.call(this, n, rt);
|
|
499
|
+
} : rt;
|
|
500
500
|
return this._pairs.map(function(s) {
|
|
501
501
|
return r(s[0]) + "=" + r(s[1]);
|
|
502
502
|
}, "").join("&");
|
|
@@ -504,20 +504,20 @@ xt.toString = function(e) {
|
|
|
504
504
|
function $r(t) {
|
|
505
505
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function Dt(t, e, r) {
|
|
508
508
|
if (!e)
|
|
509
509
|
return t;
|
|
510
510
|
const n = r && r.encode || $r, s = a.isFunction(r) ? {
|
|
511
511
|
serialize: r
|
|
512
512
|
} : r, i = s && s.serialize;
|
|
513
513
|
let o;
|
|
514
|
-
if (i ? o = i(e, s) : o = a.isURLSearchParams(e) ? e.toString() : new
|
|
514
|
+
if (i ? o = i(e, s) : o = a.isURLSearchParams(e) ? e.toString() : new Ie(e, s).toString(n), o) {
|
|
515
515
|
const c = t.indexOf("#");
|
|
516
516
|
c !== -1 && (t = t.slice(0, c)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
|
|
517
517
|
}
|
|
518
518
|
return t;
|
|
519
519
|
}
|
|
520
|
-
class
|
|
520
|
+
class nt {
|
|
521
521
|
constructor() {
|
|
522
522
|
this.handlers = [];
|
|
523
523
|
}
|
|
@@ -572,12 +572,12 @@ class rt {
|
|
|
572
572
|
});
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
const
|
|
575
|
+
const qe = {
|
|
576
576
|
silentJSONParsing: !0,
|
|
577
577
|
forcedJSONParsing: !0,
|
|
578
578
|
clarifyTimeoutError: !1,
|
|
579
579
|
legacyInterceptorReqResOrdering: !0
|
|
580
|
-
}, jr = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
580
|
+
}, jr = typeof URLSearchParams < "u" ? URLSearchParams : Ie, Mr = typeof FormData < "u" ? FormData : null, Hr = typeof Blob < "u" ? Blob : null, Vr = {
|
|
581
581
|
isBrowser: !0,
|
|
582
582
|
classes: {
|
|
583
583
|
URLSearchParams: jr,
|
|
@@ -617,7 +617,7 @@ function Yr(t) {
|
|
|
617
617
|
i = r[n], e[i] = t[i];
|
|
618
618
|
return e;
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function Lt(t) {
|
|
621
621
|
function e(r, n, s, i) {
|
|
622
622
|
let o = r[i++];
|
|
623
623
|
if (o === "__proto__") return !0;
|
|
@@ -643,13 +643,13 @@ function Gr(t, e, r) {
|
|
|
643
643
|
return (r || JSON.stringify)(t);
|
|
644
644
|
}
|
|
645
645
|
const ie = {
|
|
646
|
-
transitional:
|
|
646
|
+
transitional: qe,
|
|
647
647
|
adapter: ["xhr", "http", "fetch"],
|
|
648
648
|
transformRequest: [
|
|
649
649
|
function(e, r) {
|
|
650
650
|
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, i = a.isObject(e);
|
|
651
651
|
if (i && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e))
|
|
652
|
-
return s ? JSON.stringify(
|
|
652
|
+
return s ? JSON.stringify(Lt(e)) : e;
|
|
653
653
|
if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e) || a.isReadableStream(e))
|
|
654
654
|
return e;
|
|
655
655
|
if (a.isArrayBufferView(e))
|
|
@@ -683,7 +683,7 @@ const ie = {
|
|
|
683
683
|
return JSON.parse(e, this.parseReviver);
|
|
684
684
|
} catch (c) {
|
|
685
685
|
if (o)
|
|
686
|
-
throw c.name === "SyntaxError" ?
|
|
686
|
+
throw c.name === "SyntaxError" ? g.from(c, g.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
689
|
return e;
|
|
@@ -740,8 +740,8 @@ const Zr = a.toObjectSet([
|
|
|
740
740
|
`).forEach(function(o) {
|
|
741
741
|
s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || e[r] && Zr[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
|
|
742
742
|
}), e;
|
|
743
|
-
},
|
|
744
|
-
function
|
|
743
|
+
}, st = Symbol("internals");
|
|
744
|
+
function te(t) {
|
|
745
745
|
return t && String(t).trim().toLowerCase();
|
|
746
746
|
}
|
|
747
747
|
function ye(t) {
|
|
@@ -786,7 +786,7 @@ let O = class {
|
|
|
786
786
|
set(e, r, n) {
|
|
787
787
|
const s = this;
|
|
788
788
|
function i(c, f, l) {
|
|
789
|
-
const u =
|
|
789
|
+
const u = te(f);
|
|
790
790
|
if (!u)
|
|
791
791
|
throw new Error("header name must be a non-empty string");
|
|
792
792
|
const h = a.findKey(s, u);
|
|
@@ -810,7 +810,7 @@ let O = class {
|
|
|
810
810
|
return this;
|
|
811
811
|
}
|
|
812
812
|
get(e, r) {
|
|
813
|
-
if (e =
|
|
813
|
+
if (e = te(e), e) {
|
|
814
814
|
const n = a.findKey(this, e);
|
|
815
815
|
if (n) {
|
|
816
816
|
const s = this[n];
|
|
@@ -827,7 +827,7 @@ let O = class {
|
|
|
827
827
|
}
|
|
828
828
|
}
|
|
829
829
|
has(e, r) {
|
|
830
|
-
if (e =
|
|
830
|
+
if (e = te(e), e) {
|
|
831
831
|
const n = a.findKey(this, e);
|
|
832
832
|
return !!(n && this[n] !== void 0 && (!r || Pe(this, this[n], n, r)));
|
|
833
833
|
}
|
|
@@ -837,7 +837,7 @@ let O = class {
|
|
|
837
837
|
const n = this;
|
|
838
838
|
let s = !1;
|
|
839
839
|
function i(o) {
|
|
840
|
-
if (o =
|
|
840
|
+
if (o = te(o), o) {
|
|
841
841
|
const c = a.findKey(n, o);
|
|
842
842
|
c && (!r || Pe(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
843
843
|
}
|
|
@@ -895,11 +895,11 @@ let O = class {
|
|
|
895
895
|
return r.forEach((s) => n.set(s)), n;
|
|
896
896
|
}
|
|
897
897
|
static accessor(e) {
|
|
898
|
-
const n = (this[
|
|
898
|
+
const n = (this[st] = this[st] = {
|
|
899
899
|
accessors: {}
|
|
900
900
|
}).accessors, s = this.prototype;
|
|
901
901
|
function i(o) {
|
|
902
|
-
const c =
|
|
902
|
+
const c = te(o);
|
|
903
903
|
n[c] || (sn(s, o), n[c] = !0);
|
|
904
904
|
}
|
|
905
905
|
return a.isArray(e) ? e.forEach(i) : i(e), this;
|
|
@@ -930,10 +930,10 @@ function Oe(t, e) {
|
|
|
930
930
|
i = c.call(r, i, s.normalize(), e ? e.status : void 0);
|
|
931
931
|
}), s.normalize(), i;
|
|
932
932
|
}
|
|
933
|
-
function
|
|
933
|
+
function Ft(t) {
|
|
934
934
|
return !!(t && t.__CANCEL__);
|
|
935
935
|
}
|
|
936
|
-
let oe = class extends
|
|
936
|
+
let oe = class extends g {
|
|
937
937
|
/**
|
|
938
938
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
939
939
|
*
|
|
@@ -944,15 +944,15 @@ let oe = class extends m {
|
|
|
944
944
|
* @returns {CanceledError} The created error.
|
|
945
945
|
*/
|
|
946
946
|
constructor(e, r, n) {
|
|
947
|
-
super(e ?? "canceled",
|
|
947
|
+
super(e ?? "canceled", g.ERR_CANCELED, r, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
948
948
|
}
|
|
949
949
|
};
|
|
950
|
-
function
|
|
950
|
+
function kt(t, e, r) {
|
|
951
951
|
const n = r.config.validateStatus;
|
|
952
952
|
!r.status || !n || n(r.status) ? t(r) : e(
|
|
953
|
-
new
|
|
953
|
+
new g(
|
|
954
954
|
"Request failed with status code " + r.status,
|
|
955
|
-
[
|
|
955
|
+
[g.ERR_BAD_REQUEST, g.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
956
956
|
r.config,
|
|
957
957
|
r.request,
|
|
958
958
|
r
|
|
@@ -970,13 +970,13 @@ function an(t, e) {
|
|
|
970
970
|
return e = e !== void 0 ? e : 1e3, function(f) {
|
|
971
971
|
const l = Date.now(), u = n[i];
|
|
972
972
|
o || (o = l), r[s] = f, n[s] = l;
|
|
973
|
-
let h = i,
|
|
973
|
+
let h = i, m = 0;
|
|
974
974
|
for (; h !== s; )
|
|
975
|
-
|
|
975
|
+
m += r[h++], h = h % t;
|
|
976
976
|
if (s = (s + 1) % t, s === i && (i = (i + 1) % t), l - o < e)
|
|
977
977
|
return;
|
|
978
978
|
const E = u && l - u;
|
|
979
|
-
return E ? Math.round(
|
|
979
|
+
return E ? Math.round(m * 1e3 / E) : void 0;
|
|
980
980
|
};
|
|
981
981
|
}
|
|
982
982
|
function cn(t, e) {
|
|
@@ -991,7 +991,7 @@ function cn(t, e) {
|
|
|
991
991
|
}, n - h)));
|
|
992
992
|
}, () => s && o(s)];
|
|
993
993
|
}
|
|
994
|
-
const
|
|
994
|
+
const me = (t, e, r = 3) => {
|
|
995
995
|
let n = 0;
|
|
996
996
|
const s = an(50, 250);
|
|
997
997
|
return cn((i) => {
|
|
@@ -1010,7 +1010,7 @@ const ge = (t, e, r = 3) => {
|
|
|
1010
1010
|
};
|
|
1011
1011
|
t(h);
|
|
1012
1012
|
}, r);
|
|
1013
|
-
},
|
|
1013
|
+
}, it = (t, e) => {
|
|
1014
1014
|
const r = t != null;
|
|
1015
1015
|
return [
|
|
1016
1016
|
(n) => e[0]({
|
|
@@ -1020,7 +1020,7 @@ const ge = (t, e, r = 3) => {
|
|
|
1020
1020
|
}),
|
|
1021
1021
|
e[1]
|
|
1022
1022
|
];
|
|
1023
|
-
},
|
|
1023
|
+
}, ot = (t) => (...e) => a.asap(() => t(...e)), un = S.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, S.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
|
|
1024
1024
|
new URL(S.origin),
|
|
1025
1025
|
S.navigator && /(msie|trident)/i.test(S.navigator.userAgent)
|
|
1026
1026
|
) : () => !0, ln = S.hasStandardBrowserEnv ? (
|
|
@@ -1058,22 +1058,22 @@ function dn(t) {
|
|
|
1058
1058
|
function fn(t, e) {
|
|
1059
1059
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1061
|
+
function vt(t, e, r) {
|
|
1062
1062
|
let n = !dn(e);
|
|
1063
1063
|
return t && (n || r == !1) ? fn(t, e) : e;
|
|
1064
1064
|
}
|
|
1065
|
-
const
|
|
1065
|
+
const at = (t) => t instanceof O ? { ...t } : t;
|
|
1066
1066
|
function V(t, e) {
|
|
1067
1067
|
e = e || {};
|
|
1068
1068
|
const r = {};
|
|
1069
|
-
function n(l, u, h,
|
|
1070
|
-
return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless:
|
|
1069
|
+
function n(l, u, h, m) {
|
|
1070
|
+
return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: m }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
|
|
1071
1071
|
}
|
|
1072
|
-
function s(l, u, h,
|
|
1072
|
+
function s(l, u, h, m) {
|
|
1073
1073
|
if (a.isUndefined(u)) {
|
|
1074
1074
|
if (!a.isUndefined(l))
|
|
1075
|
-
return n(void 0, l, h,
|
|
1076
|
-
} else return n(l, u, h,
|
|
1075
|
+
return n(void 0, l, h, m);
|
|
1076
|
+
} else return n(l, u, h, m);
|
|
1077
1077
|
}
|
|
1078
1078
|
function i(l, u) {
|
|
1079
1079
|
if (!a.isUndefined(u))
|
|
@@ -1120,19 +1120,19 @@ function V(t, e) {
|
|
|
1120
1120
|
socketPath: o,
|
|
1121
1121
|
responseEncoding: o,
|
|
1122
1122
|
validateStatus: c,
|
|
1123
|
-
headers: (l, u, h) => s(
|
|
1123
|
+
headers: (l, u, h) => s(at(l), at(u), h, !0)
|
|
1124
1124
|
};
|
|
1125
1125
|
return a.forEach(Object.keys({ ...t, ...e }), function(u) {
|
|
1126
1126
|
if (u === "__proto__" || u === "constructor" || u === "prototype") return;
|
|
1127
|
-
const h = a.hasOwnProp(f, u) ? f[u] : s,
|
|
1128
|
-
a.isUndefined(
|
|
1127
|
+
const h = a.hasOwnProp(f, u) ? f[u] : s, m = h(t[u], e[u], u);
|
|
1128
|
+
a.isUndefined(m) && h !== c || (r[u] = m);
|
|
1129
1129
|
}), r;
|
|
1130
1130
|
}
|
|
1131
|
-
const
|
|
1131
|
+
const Bt = (t) => {
|
|
1132
1132
|
const e = V({}, t);
|
|
1133
1133
|
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = e;
|
|
1134
|
-
if (e.headers = o = O.from(o), e.url =
|
|
1135
|
-
|
|
1134
|
+
if (e.headers = o = O.from(o), e.url = Dt(
|
|
1135
|
+
vt(e.baseURL, e.url, e.allowAbsoluteUrls),
|
|
1136
1136
|
t.params,
|
|
1137
1137
|
t.paramsSerializer
|
|
1138
1138
|
), c && o.set(
|
|
@@ -1157,10 +1157,10 @@ const vt = (t) => {
|
|
|
1157
1157
|
return e;
|
|
1158
1158
|
}, hn = typeof XMLHttpRequest < "u", pn = hn && function(t) {
|
|
1159
1159
|
return new Promise(function(r, n) {
|
|
1160
|
-
const s =
|
|
1160
|
+
const s = Bt(t);
|
|
1161
1161
|
let i = s.data;
|
|
1162
1162
|
const o = O.from(s.headers).normalize();
|
|
1163
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, h,
|
|
1163
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, h, m, E, d;
|
|
1164
1164
|
function y() {
|
|
1165
1165
|
E && E(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1166
1166
|
}
|
|
@@ -1179,7 +1179,7 @@ const vt = (t) => {
|
|
|
1179
1179
|
config: t,
|
|
1180
1180
|
request: p
|
|
1181
1181
|
};
|
|
1182
|
-
|
|
1182
|
+
kt(
|
|
1183
1183
|
function(x) {
|
|
1184
1184
|
r(x), y();
|
|
1185
1185
|
},
|
|
@@ -1192,32 +1192,32 @@ const vt = (t) => {
|
|
|
1192
1192
|
"onloadend" in p ? p.onloadend = C : p.onreadystatechange = function() {
|
|
1193
1193
|
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(C);
|
|
1194
1194
|
}, p.onabort = function() {
|
|
1195
|
-
p && (n(new
|
|
1195
|
+
p && (n(new g("Request aborted", g.ECONNABORTED, t, p)), p = null);
|
|
1196
1196
|
}, p.onerror = function(T) {
|
|
1197
|
-
const D = T && T.message ? T.message : "Network Error", $ = new
|
|
1197
|
+
const D = T && T.message ? T.message : "Network Error", $ = new g(D, g.ERR_NETWORK, t, p);
|
|
1198
1198
|
$.event = T || null, n($), p = null;
|
|
1199
1199
|
}, p.ontimeout = function() {
|
|
1200
1200
|
let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1201
|
-
const D = s.transitional ||
|
|
1201
|
+
const D = s.transitional || qe;
|
|
1202
1202
|
s.timeoutErrorMessage && (T = s.timeoutErrorMessage), n(
|
|
1203
|
-
new
|
|
1203
|
+
new g(
|
|
1204
1204
|
T,
|
|
1205
|
-
D.clarifyTimeoutError ?
|
|
1205
|
+
D.clarifyTimeoutError ? g.ETIMEDOUT : g.ECONNABORTED,
|
|
1206
1206
|
t,
|
|
1207
1207
|
p
|
|
1208
1208
|
)
|
|
1209
1209
|
), p = null;
|
|
1210
1210
|
}, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(T, D) {
|
|
1211
1211
|
p.setRequestHeader(D, T);
|
|
1212
|
-
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([
|
|
1212
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([m, d] = me(l, !0), p.addEventListener("progress", m)), f && p.upload && ([h, E] = me(f), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (u = (R) => {
|
|
1213
1213
|
p && (n(!R || R.type ? new oe(null, t, p) : R), p.abort(), p = null);
|
|
1214
1214
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1215
1215
|
const N = on(s.url);
|
|
1216
1216
|
if (N && S.protocols.indexOf(N) === -1) {
|
|
1217
1217
|
n(
|
|
1218
|
-
new
|
|
1218
|
+
new g(
|
|
1219
1219
|
"Unsupported protocol " + N + ":",
|
|
1220
|
-
|
|
1220
|
+
g.ERR_BAD_REQUEST,
|
|
1221
1221
|
t
|
|
1222
1222
|
)
|
|
1223
1223
|
);
|
|
@@ -1234,12 +1234,12 @@ const vt = (t) => {
|
|
|
1234
1234
|
s = !0, c();
|
|
1235
1235
|
const u = l instanceof Error ? l : this.reason;
|
|
1236
1236
|
n.abort(
|
|
1237
|
-
u instanceof
|
|
1237
|
+
u instanceof g ? u : new oe(u instanceof Error ? u.message : u)
|
|
1238
1238
|
);
|
|
1239
1239
|
}
|
|
1240
1240
|
};
|
|
1241
1241
|
let o = e && setTimeout(() => {
|
|
1242
|
-
o = null, i(new
|
|
1242
|
+
o = null, i(new g(`timeout of ${e}ms exceeded`, g.ETIMEDOUT));
|
|
1243
1243
|
}, e);
|
|
1244
1244
|
const c = () => {
|
|
1245
1245
|
t && (o && clearTimeout(o), o = null, t.forEach((l) => {
|
|
@@ -1250,7 +1250,7 @@ const vt = (t) => {
|
|
|
1250
1250
|
const { signal: f } = n;
|
|
1251
1251
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1252
1252
|
}
|
|
1253
|
-
},
|
|
1253
|
+
}, gn = function* (t, e) {
|
|
1254
1254
|
let r = t.byteLength;
|
|
1255
1255
|
if (r < e) {
|
|
1256
1256
|
yield t;
|
|
@@ -1259,9 +1259,9 @@ const vt = (t) => {
|
|
|
1259
1259
|
let n = 0, s;
|
|
1260
1260
|
for (; n < r; )
|
|
1261
1261
|
s = n + e, yield t.slice(n, s), n = s;
|
|
1262
|
-
},
|
|
1262
|
+
}, mn = async function* (t, e) {
|
|
1263
1263
|
for await (const r of wn(t))
|
|
1264
|
-
yield*
|
|
1264
|
+
yield* gn(r, e);
|
|
1265
1265
|
}, wn = async function* (t) {
|
|
1266
1266
|
if (t[Symbol.asyncIterator]) {
|
|
1267
1267
|
yield* t;
|
|
@@ -1278,8 +1278,8 @@ const vt = (t) => {
|
|
|
1278
1278
|
} finally {
|
|
1279
1279
|
await e.cancel();
|
|
1280
1280
|
}
|
|
1281
|
-
},
|
|
1282
|
-
const s =
|
|
1281
|
+
}, ct = (t, e, r, n) => {
|
|
1282
|
+
const s = mn(t, e);
|
|
1283
1283
|
let i = 0, o, c = (f) => {
|
|
1284
1284
|
o || (o = !0, n && n(f));
|
|
1285
1285
|
};
|
|
@@ -1294,8 +1294,8 @@ const vt = (t) => {
|
|
|
1294
1294
|
}
|
|
1295
1295
|
let h = u.byteLength;
|
|
1296
1296
|
if (r) {
|
|
1297
|
-
let
|
|
1298
|
-
r(
|
|
1297
|
+
let m = i += h;
|
|
1298
|
+
r(m);
|
|
1299
1299
|
}
|
|
1300
1300
|
f.enqueue(new Uint8Array(u));
|
|
1301
1301
|
} catch (l) {
|
|
@@ -1310,37 +1310,37 @@ const vt = (t) => {
|
|
|
1310
1310
|
highWaterMark: 2
|
|
1311
1311
|
}
|
|
1312
1312
|
);
|
|
1313
|
-
},
|
|
1313
|
+
}, ut = 64 * 1024, { isFunction: de } = a, _n = (({ Request: t, Response: e }) => ({
|
|
1314
1314
|
Request: t,
|
|
1315
1315
|
Response: e
|
|
1316
|
-
}))(a.global), { ReadableStream:
|
|
1316
|
+
}))(a.global), { ReadableStream: lt, TextEncoder: dt } = a.global, ft = (t, ...e) => {
|
|
1317
1317
|
try {
|
|
1318
1318
|
return !!t(...e);
|
|
1319
1319
|
} catch {
|
|
1320
1320
|
return !1;
|
|
1321
1321
|
}
|
|
1322
|
-
},
|
|
1322
|
+
}, bn = (t) => {
|
|
1323
1323
|
t = a.merge.call(
|
|
1324
1324
|
{
|
|
1325
1325
|
skipUndefined: !0
|
|
1326
1326
|
},
|
|
1327
|
-
|
|
1327
|
+
_n,
|
|
1328
1328
|
t
|
|
1329
1329
|
);
|
|
1330
1330
|
const { fetch: e, Request: r, Response: n } = t, s = e ? de(e) : typeof fetch == "function", i = de(r), o = de(n);
|
|
1331
1331
|
if (!s)
|
|
1332
1332
|
return !1;
|
|
1333
|
-
const c = s && de(
|
|
1333
|
+
const c = s && de(lt), f = s && (typeof dt == "function" ? /* @__PURE__ */ ((d) => (y) => d.encode(y))(new dt()) : async (d) => new Uint8Array(await new r(d).arrayBuffer())), l = i && c && ft(() => {
|
|
1334
1334
|
let d = !1;
|
|
1335
1335
|
const y = new r(S.origin, {
|
|
1336
|
-
body: new
|
|
1336
|
+
body: new lt(),
|
|
1337
1337
|
method: "POST",
|
|
1338
1338
|
get duplex() {
|
|
1339
1339
|
return d = !0, "half";
|
|
1340
1340
|
}
|
|
1341
1341
|
}).headers.has("Content-Type");
|
|
1342
1342
|
return d && !y;
|
|
1343
|
-
}), u = o && c &&
|
|
1343
|
+
}), u = o && c && ft(() => a.isReadableStream(new n("").body)), h = {
|
|
1344
1344
|
stream: u && ((d) => d.body)
|
|
1345
1345
|
};
|
|
1346
1346
|
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
|
|
@@ -1348,14 +1348,14 @@ const vt = (t) => {
|
|
|
1348
1348
|
let C = y && y[d];
|
|
1349
1349
|
if (C)
|
|
1350
1350
|
return C.call(y);
|
|
1351
|
-
throw new
|
|
1351
|
+
throw new g(
|
|
1352
1352
|
`Response type '${d}' is not supported`,
|
|
1353
|
-
|
|
1353
|
+
g.ERR_NOT_SUPPORT,
|
|
1354
1354
|
p
|
|
1355
1355
|
);
|
|
1356
1356
|
});
|
|
1357
1357
|
});
|
|
1358
|
-
const
|
|
1358
|
+
const m = async (d) => {
|
|
1359
1359
|
if (d == null)
|
|
1360
1360
|
return 0;
|
|
1361
1361
|
if (a.isBlob(d))
|
|
@@ -1371,7 +1371,7 @@ const vt = (t) => {
|
|
|
1371
1371
|
return (await f(d)).byteLength;
|
|
1372
1372
|
}, E = async (d, y) => {
|
|
1373
1373
|
const p = a.toFiniteNumber(d.getContentLength());
|
|
1374
|
-
return p ??
|
|
1374
|
+
return p ?? m(y);
|
|
1375
1375
|
};
|
|
1376
1376
|
return async (d) => {
|
|
1377
1377
|
let {
|
|
@@ -1386,35 +1386,35 @@ const vt = (t) => {
|
|
|
1386
1386
|
responseType: x,
|
|
1387
1387
|
headers: Se,
|
|
1388
1388
|
withCredentials: ce = "same-origin",
|
|
1389
|
-
fetchOptions:
|
|
1390
|
-
} =
|
|
1389
|
+
fetchOptions: Je
|
|
1390
|
+
} = Bt(d), We = e || fetch;
|
|
1391
1391
|
x = x ? (x + "").toLowerCase() : "text";
|
|
1392
1392
|
let ue = yn(
|
|
1393
1393
|
[N, R && R.toAbortSignal()],
|
|
1394
1394
|
T
|
|
1395
|
-
),
|
|
1395
|
+
), Z = null;
|
|
1396
1396
|
const j = ue && ue.unsubscribe && (() => {
|
|
1397
1397
|
ue.unsubscribe();
|
|
1398
1398
|
});
|
|
1399
|
-
let
|
|
1399
|
+
let Qe;
|
|
1400
1400
|
try {
|
|
1401
|
-
if ($ && l && p !== "get" && p !== "head" && (
|
|
1402
|
-
let
|
|
1401
|
+
if ($ && l && p !== "get" && p !== "head" && (Qe = await E(Se, C)) !== 0) {
|
|
1402
|
+
let I = new r(y, {
|
|
1403
1403
|
method: "POST",
|
|
1404
1404
|
body: C,
|
|
1405
1405
|
duplex: "half"
|
|
1406
|
-
}),
|
|
1407
|
-
if (a.isFormData(C) && (
|
|
1408
|
-
const [Te, le] =
|
|
1409
|
-
|
|
1410
|
-
|
|
1406
|
+
}), J;
|
|
1407
|
+
if (a.isFormData(C) && (J = I.headers.get("content-type")) && Se.setContentType(J), I.body) {
|
|
1408
|
+
const [Te, le] = it(
|
|
1409
|
+
Qe,
|
|
1410
|
+
me(ot($))
|
|
1411
1411
|
);
|
|
1412
|
-
C =
|
|
1412
|
+
C = ct(I.body, ut, Te, le);
|
|
1413
1413
|
}
|
|
1414
1414
|
}
|
|
1415
1415
|
a.isString(ce) || (ce = ce ? "include" : "omit");
|
|
1416
|
-
const A = i && "credentials" in r.prototype,
|
|
1417
|
-
...
|
|
1416
|
+
const A = i && "credentials" in r.prototype, Xe = {
|
|
1417
|
+
...Je,
|
|
1418
1418
|
signal: ue,
|
|
1419
1419
|
method: p.toUpperCase(),
|
|
1420
1420
|
headers: Se.normalize().toJSON(),
|
|
@@ -1422,69 +1422,69 @@ const vt = (t) => {
|
|
|
1422
1422
|
duplex: "half",
|
|
1423
1423
|
credentials: A ? ce : void 0
|
|
1424
1424
|
};
|
|
1425
|
-
|
|
1426
|
-
let
|
|
1427
|
-
const
|
|
1428
|
-
if (u && (D ||
|
|
1429
|
-
const
|
|
1430
|
-
["status", "statusText", "headers"].forEach((
|
|
1431
|
-
|
|
1425
|
+
Z = i && new r(y, Xe);
|
|
1426
|
+
let B = await (i ? We(Z, Je) : We(y, Xe));
|
|
1427
|
+
const Ye = u && (x === "stream" || x === "response");
|
|
1428
|
+
if (u && (D || Ye && j)) {
|
|
1429
|
+
const I = {};
|
|
1430
|
+
["status", "statusText", "headers"].forEach((Ge) => {
|
|
1431
|
+
I[Ge] = B[Ge];
|
|
1432
1432
|
});
|
|
1433
|
-
const
|
|
1434
|
-
|
|
1435
|
-
|
|
1433
|
+
const J = a.toFiniteNumber(B.headers.get("content-length")), [Te, le] = D && it(
|
|
1434
|
+
J,
|
|
1435
|
+
me(ot(D), !0)
|
|
1436
1436
|
) || [];
|
|
1437
|
-
|
|
1438
|
-
|
|
1437
|
+
B = new n(
|
|
1438
|
+
ct(B.body, ut, Te, () => {
|
|
1439
1439
|
le && le(), j && j();
|
|
1440
1440
|
}),
|
|
1441
|
-
|
|
1441
|
+
I
|
|
1442
1442
|
);
|
|
1443
1443
|
}
|
|
1444
1444
|
x = x || "text";
|
|
1445
1445
|
let Kt = await h[a.findKey(h, x) || "text"](
|
|
1446
|
-
|
|
1446
|
+
B,
|
|
1447
1447
|
d
|
|
1448
1448
|
);
|
|
1449
|
-
return !
|
|
1450
|
-
|
|
1449
|
+
return !Ye && j && j(), await new Promise((I, J) => {
|
|
1450
|
+
kt(I, J, {
|
|
1451
1451
|
data: Kt,
|
|
1452
|
-
headers: O.from(
|
|
1453
|
-
status:
|
|
1454
|
-
statusText:
|
|
1452
|
+
headers: O.from(B.headers),
|
|
1453
|
+
status: B.status,
|
|
1454
|
+
statusText: B.statusText,
|
|
1455
1455
|
config: d,
|
|
1456
|
-
request:
|
|
1456
|
+
request: Z
|
|
1457
1457
|
});
|
|
1458
1458
|
});
|
|
1459
1459
|
} catch (A) {
|
|
1460
1460
|
throw j && j(), A && A.name === "TypeError" && /Load failed|fetch/i.test(A.message) ? Object.assign(
|
|
1461
|
-
new
|
|
1461
|
+
new g(
|
|
1462
1462
|
"Network Error",
|
|
1463
|
-
|
|
1463
|
+
g.ERR_NETWORK,
|
|
1464
1464
|
d,
|
|
1465
|
-
|
|
1465
|
+
Z,
|
|
1466
1466
|
A && A.response
|
|
1467
1467
|
),
|
|
1468
1468
|
{
|
|
1469
1469
|
cause: A.cause || A
|
|
1470
1470
|
}
|
|
1471
|
-
) :
|
|
1471
|
+
) : g.from(A, A && A.code, d, Z, A && A.response);
|
|
1472
1472
|
}
|
|
1473
1473
|
};
|
|
1474
|
-
}, Cn = /* @__PURE__ */ new Map(),
|
|
1474
|
+
}, Cn = /* @__PURE__ */ new Map(), It = (t) => {
|
|
1475
1475
|
let e = t && t.env || {};
|
|
1476
1476
|
const { fetch: r, Request: n, Response: s } = e, i = [n, s, r];
|
|
1477
1477
|
let o = i.length, c = o, f, l, u = Cn;
|
|
1478
1478
|
for (; c--; )
|
|
1479
|
-
f = i[c], l = u.get(f), l === void 0 && u.set(f, l = c ? /* @__PURE__ */ new Map() :
|
|
1479
|
+
f = i[c], l = u.get(f), l === void 0 && u.set(f, l = c ? /* @__PURE__ */ new Map() : bn(e)), u = l;
|
|
1480
1480
|
return l;
|
|
1481
1481
|
};
|
|
1482
|
-
|
|
1482
|
+
It();
|
|
1483
1483
|
const je = {
|
|
1484
1484
|
http: Br,
|
|
1485
1485
|
xhr: pn,
|
|
1486
1486
|
fetch: {
|
|
1487
|
-
get:
|
|
1487
|
+
get: It
|
|
1488
1488
|
}
|
|
1489
1489
|
};
|
|
1490
1490
|
a.forEach(je, (t, e) => {
|
|
@@ -1496,7 +1496,7 @@ a.forEach(je, (t, e) => {
|
|
|
1496
1496
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1497
1497
|
}
|
|
1498
1498
|
});
|
|
1499
|
-
const
|
|
1499
|
+
const ht = (t) => `- ${t}`, En = (t) => a.isFunction(t) || t === null || t === !1;
|
|
1500
1500
|
function Rn(t, e) {
|
|
1501
1501
|
t = a.isArray(t) ? t : [t];
|
|
1502
1502
|
const { length: r } = t;
|
|
@@ -1506,7 +1506,7 @@ function Rn(t, e) {
|
|
|
1506
1506
|
n = t[o];
|
|
1507
1507
|
let c;
|
|
1508
1508
|
if (s = n, !En(n) && (s = je[(c = String(n)).toLowerCase()], s === void 0))
|
|
1509
|
-
throw new
|
|
1509
|
+
throw new g(`Unknown adapter '${c}'`);
|
|
1510
1510
|
if (s && (a.isFunction(s) || (s = s.get(e))))
|
|
1511
1511
|
break;
|
|
1512
1512
|
i[c || "#" + o] = s;
|
|
@@ -1516,9 +1516,9 @@ function Rn(t, e) {
|
|
|
1516
1516
|
([f, l]) => `adapter ${f} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1517
1517
|
);
|
|
1518
1518
|
let c = r ? o.length > 1 ? `since :
|
|
1519
|
-
` + o.map(
|
|
1520
|
-
`) : " " +
|
|
1521
|
-
throw new
|
|
1519
|
+
` + o.map(ht).join(`
|
|
1520
|
+
`) : " " + ht(o[0]) : "as no adapter specified";
|
|
1521
|
+
throw new g(
|
|
1522
1522
|
"There is no suitable adapter to dispatch the request " + c,
|
|
1523
1523
|
"ERR_NOT_SUPPORT"
|
|
1524
1524
|
);
|
|
@@ -1541,13 +1541,13 @@ function Ne(t) {
|
|
|
1541
1541
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1542
1542
|
throw new oe(null, t);
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1544
|
+
function pt(t) {
|
|
1545
1545
|
return Ne(t), t.headers = O.from(t.headers), t.data = Oe.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), qt.getAdapter(t.adapter || ie.adapter, t)(t).then(
|
|
1546
1546
|
function(n) {
|
|
1547
1547
|
return Ne(t), n.data = Oe.call(t, t.transformResponse, n), n.headers = O.from(n.headers), n;
|
|
1548
1548
|
},
|
|
1549
1549
|
function(n) {
|
|
1550
|
-
return
|
|
1550
|
+
return Ft(n) || (Ne(t), n && n.response && (n.response.data = Oe.call(
|
|
1551
1551
|
t,
|
|
1552
1552
|
t.transformResponse,
|
|
1553
1553
|
n.response
|
|
@@ -1555,24 +1555,24 @@ function ht(t) {
|
|
|
1555
1555
|
}
|
|
1556
1556
|
);
|
|
1557
1557
|
}
|
|
1558
|
-
const
|
|
1558
|
+
const $t = "1.13.6", Ee = {};
|
|
1559
1559
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
1560
1560
|
Ee[t] = function(n) {
|
|
1561
1561
|
return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
1562
1562
|
};
|
|
1563
1563
|
});
|
|
1564
|
-
const
|
|
1564
|
+
const yt = {};
|
|
1565
1565
|
Ee.transitional = function(e, r, n) {
|
|
1566
1566
|
function s(i, o) {
|
|
1567
|
-
return "[Axios v" +
|
|
1567
|
+
return "[Axios v" + $t + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
|
|
1568
1568
|
}
|
|
1569
1569
|
return (i, o, c) => {
|
|
1570
1570
|
if (e === !1)
|
|
1571
|
-
throw new
|
|
1571
|
+
throw new g(
|
|
1572
1572
|
s(o, " has been removed" + (r ? " in " + r : "")),
|
|
1573
|
-
|
|
1573
|
+
g.ERR_DEPRECATED
|
|
1574
1574
|
);
|
|
1575
|
-
return r && !
|
|
1575
|
+
return r && !yt[o] && (yt[o] = !0, console.warn(
|
|
1576
1576
|
s(
|
|
1577
1577
|
o,
|
|
1578
1578
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
@@ -1585,7 +1585,7 @@ Ee.spelling = function(e) {
|
|
|
1585
1585
|
};
|
|
1586
1586
|
function Sn(t, e, r) {
|
|
1587
1587
|
if (typeof t != "object")
|
|
1588
|
-
throw new
|
|
1588
|
+
throw new g("options must be an object", g.ERR_BAD_OPTION_VALUE);
|
|
1589
1589
|
const n = Object.keys(t);
|
|
1590
1590
|
let s = n.length;
|
|
1591
1591
|
for (; s-- > 0; ) {
|
|
@@ -1593,25 +1593,25 @@ function Sn(t, e, r) {
|
|
|
1593
1593
|
if (o) {
|
|
1594
1594
|
const c = t[i], f = c === void 0 || o(c, i, t);
|
|
1595
1595
|
if (f !== !0)
|
|
1596
|
-
throw new
|
|
1596
|
+
throw new g(
|
|
1597
1597
|
"option " + i + " must be " + f,
|
|
1598
|
-
|
|
1598
|
+
g.ERR_BAD_OPTION_VALUE
|
|
1599
1599
|
);
|
|
1600
1600
|
continue;
|
|
1601
1601
|
}
|
|
1602
1602
|
if (r !== !0)
|
|
1603
|
-
throw new
|
|
1603
|
+
throw new g("Unknown option " + i, g.ERR_BAD_OPTION);
|
|
1604
1604
|
}
|
|
1605
1605
|
}
|
|
1606
|
-
const
|
|
1606
|
+
const ge = {
|
|
1607
1607
|
assertOptions: Sn,
|
|
1608
1608
|
validators: Ee
|
|
1609
|
-
}, U =
|
|
1609
|
+
}, U = ge.validators;
|
|
1610
1610
|
let H = class {
|
|
1611
1611
|
constructor(e) {
|
|
1612
1612
|
this.defaults = e || {}, this.interceptors = {
|
|
1613
|
-
request: new
|
|
1614
|
-
response: new
|
|
1613
|
+
request: new nt(),
|
|
1614
|
+
response: new nt()
|
|
1615
1615
|
};
|
|
1616
1616
|
}
|
|
1617
1617
|
/**
|
|
@@ -1642,7 +1642,7 @@ let H = class {
|
|
|
1642
1642
|
_request(e, r) {
|
|
1643
1643
|
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = V(this.defaults, r);
|
|
1644
1644
|
const { transitional: n, paramsSerializer: s, headers: i } = r;
|
|
1645
|
-
n !== void 0 &&
|
|
1645
|
+
n !== void 0 && ge.assertOptions(
|
|
1646
1646
|
n,
|
|
1647
1647
|
{
|
|
1648
1648
|
silentJSONParsing: U.transitional(U.boolean),
|
|
@@ -1653,14 +1653,14 @@ let H = class {
|
|
|
1653
1653
|
!1
|
|
1654
1654
|
), s != null && (a.isFunction(s) ? r.paramsSerializer = {
|
|
1655
1655
|
serialize: s
|
|
1656
|
-
} :
|
|
1656
|
+
} : ge.assertOptions(
|
|
1657
1657
|
s,
|
|
1658
1658
|
{
|
|
1659
1659
|
encode: U.function,
|
|
1660
1660
|
serialize: U.function
|
|
1661
1661
|
},
|
|
1662
1662
|
!0
|
|
1663
|
-
)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0),
|
|
1663
|
+
)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), ge.assertOptions(
|
|
1664
1664
|
r,
|
|
1665
1665
|
{
|
|
1666
1666
|
baseUrl: U.spelling("baseURL"),
|
|
@@ -1678,23 +1678,23 @@ let H = class {
|
|
|
1678
1678
|
if (typeof y.runWhen == "function" && y.runWhen(r) === !1)
|
|
1679
1679
|
return;
|
|
1680
1680
|
f = f && y.synchronous;
|
|
1681
|
-
const p = r.transitional ||
|
|
1681
|
+
const p = r.transitional || qe;
|
|
1682
1682
|
p && p.legacyInterceptorReqResOrdering ? c.unshift(y.fulfilled, y.rejected) : c.push(y.fulfilled, y.rejected);
|
|
1683
1683
|
});
|
|
1684
1684
|
const l = [];
|
|
1685
1685
|
this.interceptors.response.forEach(function(y) {
|
|
1686
1686
|
l.push(y.fulfilled, y.rejected);
|
|
1687
1687
|
});
|
|
1688
|
-
let u, h = 0,
|
|
1688
|
+
let u, h = 0, m;
|
|
1689
1689
|
if (!f) {
|
|
1690
|
-
const d = [
|
|
1691
|
-
for (d.unshift(...c), d.push(...l),
|
|
1690
|
+
const d = [pt.bind(this), void 0];
|
|
1691
|
+
for (d.unshift(...c), d.push(...l), m = d.length, u = Promise.resolve(r); h < m; )
|
|
1692
1692
|
u = u.then(d[h++], d[h++]);
|
|
1693
1693
|
return u;
|
|
1694
1694
|
}
|
|
1695
|
-
|
|
1695
|
+
m = c.length;
|
|
1696
1696
|
let E = r;
|
|
1697
|
-
for (; h <
|
|
1697
|
+
for (; h < m; ) {
|
|
1698
1698
|
const d = c[h++], y = c[h++];
|
|
1699
1699
|
try {
|
|
1700
1700
|
E = d(E);
|
|
@@ -1704,18 +1704,18 @@ let H = class {
|
|
|
1704
1704
|
}
|
|
1705
1705
|
}
|
|
1706
1706
|
try {
|
|
1707
|
-
u =
|
|
1707
|
+
u = pt.call(this, E);
|
|
1708
1708
|
} catch (d) {
|
|
1709
1709
|
return Promise.reject(d);
|
|
1710
1710
|
}
|
|
1711
|
-
for (h = 0,
|
|
1711
|
+
for (h = 0, m = l.length; h < m; )
|
|
1712
1712
|
u = u.then(l[h++], l[h++]);
|
|
1713
1713
|
return u;
|
|
1714
1714
|
}
|
|
1715
1715
|
getUri(e) {
|
|
1716
1716
|
e = V(this.defaults, e);
|
|
1717
|
-
const r =
|
|
1718
|
-
return
|
|
1717
|
+
const r = vt(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1718
|
+
return Dt(r, e.params, e.paramsSerializer);
|
|
1719
1719
|
}
|
|
1720
1720
|
};
|
|
1721
1721
|
a.forEach(["delete", "get", "head", "options"], function(e) {
|
|
@@ -1746,7 +1746,7 @@ a.forEach(["post", "put", "patch"], function(e) {
|
|
|
1746
1746
|
}
|
|
1747
1747
|
H.prototype[e] = r(), H.prototype[e + "Form"] = r(!0);
|
|
1748
1748
|
});
|
|
1749
|
-
let Tn = class
|
|
1749
|
+
let Tn = class jt {
|
|
1750
1750
|
constructor(e) {
|
|
1751
1751
|
if (typeof e != "function")
|
|
1752
1752
|
throw new TypeError("executor must be a function.");
|
|
@@ -1812,7 +1812,7 @@ let Tn = class $t {
|
|
|
1812
1812
|
static source() {
|
|
1813
1813
|
let e;
|
|
1814
1814
|
return {
|
|
1815
|
-
token: new
|
|
1815
|
+
token: new jt(function(s) {
|
|
1816
1816
|
e = s;
|
|
1817
1817
|
}),
|
|
1818
1818
|
cancel: e
|
|
@@ -1901,68 +1901,68 @@ const ke = {
|
|
|
1901
1901
|
Object.entries(ke).forEach(([t, e]) => {
|
|
1902
1902
|
ke[e] = t;
|
|
1903
1903
|
});
|
|
1904
|
-
function
|
|
1905
|
-
const e = new H(t), r =
|
|
1904
|
+
function Mt(t) {
|
|
1905
|
+
const e = new H(t), r = Ct(H.prototype.request, e);
|
|
1906
1906
|
return a.extend(r, H.prototype, e, { allOwnKeys: !0 }), a.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
1907
|
-
return
|
|
1907
|
+
return Mt(V(t, s));
|
|
1908
1908
|
}, r;
|
|
1909
1909
|
}
|
|
1910
|
-
const
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1910
|
+
const b = Mt(ie);
|
|
1911
|
+
b.Axios = H;
|
|
1912
|
+
b.CanceledError = oe;
|
|
1913
|
+
b.CancelToken = Tn;
|
|
1914
|
+
b.isCancel = Ft;
|
|
1915
|
+
b.VERSION = $t;
|
|
1916
|
+
b.toFormData = Ce;
|
|
1917
|
+
b.AxiosError = g;
|
|
1918
|
+
b.Cancel = b.CanceledError;
|
|
1919
|
+
b.all = function(e) {
|
|
1920
1920
|
return Promise.all(e);
|
|
1921
1921
|
};
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1922
|
+
b.spread = An;
|
|
1923
|
+
b.isAxiosError = Pn;
|
|
1924
|
+
b.mergeConfig = V;
|
|
1925
|
+
b.AxiosHeaders = O;
|
|
1926
|
+
b.formToJSON = (t) => Lt(a.isHTMLForm(t) ? new FormData(t) : t);
|
|
1927
|
+
b.getAdapter = qt.getAdapter;
|
|
1928
|
+
b.HttpStatusCode = ke;
|
|
1929
|
+
b.default = b;
|
|
1930
1930
|
const {
|
|
1931
|
-
Axios:
|
|
1931
|
+
Axios: Zs,
|
|
1932
1932
|
AxiosError: fe,
|
|
1933
|
-
CanceledError:
|
|
1934
|
-
isCancel:
|
|
1935
|
-
CancelToken:
|
|
1936
|
-
VERSION:
|
|
1937
|
-
all:
|
|
1938
|
-
Cancel:
|
|
1939
|
-
isAxiosError:
|
|
1940
|
-
spread:
|
|
1941
|
-
toFormData:
|
|
1942
|
-
AxiosHeaders:
|
|
1943
|
-
HttpStatusCode:
|
|
1944
|
-
formToJSON:
|
|
1945
|
-
getAdapter:
|
|
1946
|
-
mergeConfig:
|
|
1947
|
-
} =
|
|
1933
|
+
CanceledError: ei,
|
|
1934
|
+
isCancel: ti,
|
|
1935
|
+
CancelToken: ri,
|
|
1936
|
+
VERSION: ni,
|
|
1937
|
+
all: si,
|
|
1938
|
+
Cancel: ii,
|
|
1939
|
+
isAxiosError: oi,
|
|
1940
|
+
spread: ai,
|
|
1941
|
+
toFormData: ci,
|
|
1942
|
+
AxiosHeaders: ui,
|
|
1943
|
+
HttpStatusCode: li,
|
|
1944
|
+
formToJSON: di,
|
|
1945
|
+
getAdapter: fi,
|
|
1946
|
+
mergeConfig: hi
|
|
1947
|
+
} = b;
|
|
1948
1948
|
class xe extends Error {
|
|
1949
1949
|
constructor(r) {
|
|
1950
1950
|
super(r.join(", "));
|
|
1951
|
-
|
|
1951
|
+
_(this, "errors");
|
|
1952
1952
|
this.name = "ValidationError", this.errors = r;
|
|
1953
1953
|
}
|
|
1954
1954
|
}
|
|
1955
|
-
class
|
|
1955
|
+
class gt extends Error {
|
|
1956
1956
|
constructor(r) {
|
|
1957
1957
|
super("Address already registered.");
|
|
1958
|
-
|
|
1958
|
+
_(this, "address");
|
|
1959
1959
|
this.name = "AddressInUseError", this.address = r;
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
1962
1962
|
class mt extends Error {
|
|
1963
1963
|
constructor(r) {
|
|
1964
1964
|
super("Code already registered.");
|
|
1965
|
-
|
|
1965
|
+
_(this, "code");
|
|
1966
1966
|
this.name = "CodeInUseError", this.code = r;
|
|
1967
1967
|
}
|
|
1968
1968
|
}
|
|
@@ -1973,8 +1973,8 @@ class Ue extends Error {
|
|
|
1973
1973
|
}
|
|
1974
1974
|
class On {
|
|
1975
1975
|
constructor(e) {
|
|
1976
|
-
|
|
1977
|
-
|
|
1976
|
+
_(this, "httpClient");
|
|
1977
|
+
_(this, "_debug");
|
|
1978
1978
|
this.httpClient = e.httpClient, this._debug = e.debug;
|
|
1979
1979
|
}
|
|
1980
1980
|
async create(e, r, n, s, i, o, c) {
|
|
@@ -1998,7 +1998,7 @@ class On {
|
|
|
1998
1998
|
const u = (f = l.response) == null ? void 0 : f.data;
|
|
1999
1999
|
if (typeof (u == null ? void 0 : u.message) == "string") {
|
|
2000
2000
|
const h = u.message.toLowerCase();
|
|
2001
|
-
throw h == "invalid signature" ? new Ue() : h == "address in use" ? new
|
|
2001
|
+
throw h == "invalid signature" ? new Ue() : h == "address in use" ? new gt(e) : h == "code in use" ? new mt(n) : new Error(h);
|
|
2002
2002
|
} else if ((u == null ? void 0 : u.message) instanceof Array)
|
|
2003
2003
|
throw new xe(u.message);
|
|
2004
2004
|
}
|
|
@@ -2024,7 +2024,7 @@ class On {
|
|
|
2024
2024
|
const l = (c = f.response) == null ? void 0 : c.data;
|
|
2025
2025
|
if (typeof (l == null ? void 0 : l.message) == "string") {
|
|
2026
2026
|
const u = l.message.toLowerCase();
|
|
2027
|
-
throw u == "invalid signature" ? new Ue() : u == "address in use" ? new
|
|
2027
|
+
throw u == "invalid signature" ? new Ue() : u == "address in use" ? new gt(e) : u == "code in use" ? new mt(n) : new Error(u);
|
|
2028
2028
|
} else if ((l == null ? void 0 : l.message) instanceof Array)
|
|
2029
2029
|
throw new xe(l.message);
|
|
2030
2030
|
}
|
|
@@ -2050,8 +2050,8 @@ class On {
|
|
|
2050
2050
|
if (u instanceof fe) {
|
|
2051
2051
|
const h = (l = u.response) == null ? void 0 : l.data;
|
|
2052
2052
|
if (typeof (h == null ? void 0 : h.message) == "string") {
|
|
2053
|
-
const
|
|
2054
|
-
throw
|
|
2053
|
+
const m = h.message.toLowerCase();
|
|
2054
|
+
throw m == "invalid signature" ? new Ue() : new Error(m);
|
|
2055
2055
|
} else if ((h == null ? void 0 : h.message) instanceof Array)
|
|
2056
2056
|
throw new xe(h.message);
|
|
2057
2057
|
}
|
|
@@ -2086,8 +2086,8 @@ class On {
|
|
|
2086
2086
|
const Nn = "/audiences";
|
|
2087
2087
|
class xn {
|
|
2088
2088
|
constructor(e) {
|
|
2089
|
-
|
|
2090
|
-
|
|
2089
|
+
_(this, "httpClient");
|
|
2090
|
+
_(this, "_debug");
|
|
2091
2091
|
this.httpClient = e.httpClient, this._debug = e.debug;
|
|
2092
2092
|
}
|
|
2093
2093
|
async getUserAudiences(e) {
|
|
@@ -2100,8 +2100,8 @@ class xn {
|
|
|
2100
2100
|
const he = "/claim-checks";
|
|
2101
2101
|
class Un {
|
|
2102
2102
|
constructor(e) {
|
|
2103
|
-
|
|
2104
|
-
|
|
2103
|
+
_(this, "httpClient");
|
|
2104
|
+
_(this, "_debug");
|
|
2105
2105
|
this.httpClient = e.httpClient, this._debug = e.debug;
|
|
2106
2106
|
}
|
|
2107
2107
|
/**
|
|
@@ -2171,7 +2171,7 @@ class Un {
|
|
|
2171
2171
|
}
|
|
2172
2172
|
class Dn {
|
|
2173
2173
|
constructor(e) {
|
|
2174
|
-
|
|
2174
|
+
_(this, "httpClient");
|
|
2175
2175
|
this.httpClient = e.httpClient;
|
|
2176
2176
|
}
|
|
2177
2177
|
async getAll(e) {
|
|
@@ -2179,11 +2179,11 @@ class Dn {
|
|
|
2179
2179
|
return r;
|
|
2180
2180
|
}
|
|
2181
2181
|
}
|
|
2182
|
-
const
|
|
2182
|
+
const wt = "fuul.sent", Ln = 60, Fn = "connect_wallet", _t = 10;
|
|
2183
2183
|
class kn {
|
|
2184
2184
|
constructor(e) {
|
|
2185
|
-
|
|
2186
|
-
|
|
2185
|
+
_(this, "debug");
|
|
2186
|
+
_(this, "httpClient");
|
|
2187
2187
|
this.httpClient = e.httpClient, this.debug = !!e.debug;
|
|
2188
2188
|
}
|
|
2189
2189
|
async sendEvent(e, r) {
|
|
@@ -2201,15 +2201,15 @@ class kn {
|
|
|
2201
2201
|
this.debug && console.debug(`Fuul SDK: Sent '${e.name}' event`), this.saveSentEvent(e);
|
|
2202
2202
|
}
|
|
2203
2203
|
isDuplicate(e) {
|
|
2204
|
-
var u, h,
|
|
2205
|
-
const r = `${
|
|
2204
|
+
var u, h, m, E;
|
|
2205
|
+
const r = `${wt}_${e.name}`, n = localStorage.getItem(r);
|
|
2206
2206
|
if (!n)
|
|
2207
2207
|
return !1;
|
|
2208
2208
|
const s = JSON.parse(n);
|
|
2209
2209
|
if (this.getCurrentTimestamp() - s.timestamp > Ln)
|
|
2210
2210
|
return !1;
|
|
2211
2211
|
let f = !1;
|
|
2212
|
-
e.metadata && (f = s.metadata.tracking_id === e.metadata.tracking_id && s.metadata.project_id === e.metadata.project_id && s.metadata.referrer === e.metadata.referrer && s.metadata.source === e.metadata.source && s.metadata.category === e.metadata.category && s.metadata.title === e.metadata.title && s.metadata.tag === e.metadata.tag && s.user_address === e.user_address && ((u = s.user) == null ? void 0 : u.identifier) === ((h = e.user) == null ? void 0 : h.identifier) && ((
|
|
2212
|
+
e.metadata && (f = s.metadata.tracking_id === e.metadata.tracking_id && s.metadata.project_id === e.metadata.project_id && s.metadata.referrer === e.metadata.referrer && s.metadata.source === e.metadata.source && s.metadata.category === e.metadata.category && s.metadata.title === e.metadata.title && s.metadata.tag === e.metadata.tag && s.user_address === e.user_address && ((u = s.user) == null ? void 0 : u.identifier) === ((h = e.user) == null ? void 0 : h.identifier) && ((m = s.user) == null ? void 0 : m.identifier_type) === ((E = e.user) == null ? void 0 : E.identifier_type) && s.signature === e.signature && s.signature_message === e.signature_message);
|
|
2213
2213
|
let l = !1;
|
|
2214
2214
|
return e.args && s.args && (l = s.args.page === e.args.page), l && f;
|
|
2215
2215
|
}
|
|
@@ -2218,7 +2218,7 @@ class kn {
|
|
|
2218
2218
|
}
|
|
2219
2219
|
saveSentEvent(e) {
|
|
2220
2220
|
var o, c, f, l;
|
|
2221
|
-
const r = `${
|
|
2221
|
+
const r = `${wt}_${e.name}`, n = `${r}_all`, s = this.getCurrentTimestamp(), i = { ...e, timestamp: s };
|
|
2222
2222
|
if (localStorage.setItem(r, JSON.stringify(i)), e.name === Fn) {
|
|
2223
2223
|
const u = JSON.parse(localStorage.getItem(n) || "[]"), h = {
|
|
2224
2224
|
name: e.name,
|
|
@@ -2230,19 +2230,19 @@ class kn {
|
|
|
2230
2230
|
page: (l = e.args) == null ? void 0 : l.page
|
|
2231
2231
|
};
|
|
2232
2232
|
"user_address" in e && (h.user_address = e.user_address);
|
|
2233
|
-
const
|
|
2234
|
-
|
|
2233
|
+
const m = [...u, h];
|
|
2234
|
+
m.length > _t && m.splice(0, m.length - _t), localStorage.setItem(n, JSON.stringify(m));
|
|
2235
2235
|
}
|
|
2236
2236
|
}
|
|
2237
2237
|
}
|
|
2238
2238
|
const vn = "0.0.0", Bn = {
|
|
2239
2239
|
version: vn
|
|
2240
2240
|
};
|
|
2241
|
-
class
|
|
2241
|
+
class In {
|
|
2242
2242
|
constructor(e) {
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
this.client =
|
|
2243
|
+
_(this, "client");
|
|
2244
|
+
_(this, "defaultQueryParams");
|
|
2245
|
+
this.client = b.create({
|
|
2246
2246
|
...e,
|
|
2247
2247
|
headers: {
|
|
2248
2248
|
Authorization: `Bearer ${e.apiKey}`,
|
|
@@ -2293,9 +2293,9 @@ class qn {
|
|
|
2293
2293
|
});
|
|
2294
2294
|
}
|
|
2295
2295
|
}
|
|
2296
|
-
class
|
|
2296
|
+
class qn {
|
|
2297
2297
|
constructor(e) {
|
|
2298
|
-
|
|
2298
|
+
_(this, "httpClient");
|
|
2299
2299
|
this.httpClient = e.httpClient;
|
|
2300
2300
|
}
|
|
2301
2301
|
async getPayoutsLeaderboard(e) {
|
|
@@ -2355,51 +2355,58 @@ class In {
|
|
|
2355
2355
|
})).data;
|
|
2356
2356
|
}
|
|
2357
2357
|
}
|
|
2358
|
-
const
|
|
2358
|
+
const W = "/payouts";
|
|
2359
2359
|
class $n {
|
|
2360
2360
|
constructor(e) {
|
|
2361
|
-
|
|
2362
|
-
|
|
2361
|
+
_(this, "httpClient");
|
|
2362
|
+
_(this, "_debug");
|
|
2363
2363
|
this.httpClient = e.httpClient, this._debug = e.debug;
|
|
2364
2364
|
}
|
|
2365
2365
|
async getUserPayoutsByConversion(e) {
|
|
2366
2366
|
return (await this.httpClient.get({
|
|
2367
|
-
path:
|
|
2367
|
+
path: W,
|
|
2368
2368
|
queryParams: { ...e, type: "onchain-currency" }
|
|
2369
2369
|
})).data;
|
|
2370
2370
|
}
|
|
2371
2371
|
async getUserPointsByConversion(e) {
|
|
2372
2372
|
return (await this.httpClient.get({
|
|
2373
|
-
path:
|
|
2373
|
+
path: W,
|
|
2374
2374
|
queryParams: { ...e, type: "point" }
|
|
2375
2375
|
})).data;
|
|
2376
2376
|
}
|
|
2377
2377
|
async getUserPayoutMovements(e) {
|
|
2378
2378
|
return (await this.httpClient.get({
|
|
2379
|
-
path: `${
|
|
2379
|
+
path: `${W}/movements`,
|
|
2380
2380
|
queryParams: { ...e, type: "onchain-currency" }
|
|
2381
2381
|
})).data;
|
|
2382
2382
|
}
|
|
2383
2383
|
async getUserPointsMovements(e) {
|
|
2384
2384
|
return (await this.httpClient.get({
|
|
2385
|
-
path: `${
|
|
2385
|
+
path: `${W}/movements`,
|
|
2386
2386
|
queryParams: { ...e, type: "point" }
|
|
2387
2387
|
})).data;
|
|
2388
2388
|
}
|
|
2389
2389
|
async getPayoutsByReferrer(e) {
|
|
2390
2390
|
return (await this.httpClient.get({
|
|
2391
|
-
path: `${
|
|
2391
|
+
path: `${W}/by-referrer`,
|
|
2392
2392
|
queryParams: {
|
|
2393
2393
|
user_identifier: e.user_identifier,
|
|
2394
2394
|
user_identifier_type: e.user_identifier_type
|
|
2395
2395
|
}
|
|
2396
2396
|
})).data;
|
|
2397
2397
|
}
|
|
2398
|
+
async getIncentivesByTier(e) {
|
|
2399
|
+
const r = e != null && e.tier_ids && e.tier_ids.length > 0 ? { tier_ids: e.tier_ids.join(",") } : void 0;
|
|
2400
|
+
return (await this.httpClient.get({
|
|
2401
|
+
path: `${W}/terms-by-tier`,
|
|
2402
|
+
queryParams: r
|
|
2403
|
+
})).data;
|
|
2404
|
+
}
|
|
2398
2405
|
}
|
|
2399
2406
|
class jn {
|
|
2400
2407
|
constructor(e) {
|
|
2401
|
-
|
|
2402
|
-
|
|
2408
|
+
_(this, "httpClient");
|
|
2409
|
+
_(this, "_debug");
|
|
2403
2410
|
this.httpClient = e.httpClient, this._debug = e.debug;
|
|
2404
2411
|
}
|
|
2405
2412
|
async listUserReferralCodes(e) {
|
|
@@ -2486,7 +2493,7 @@ let Hn = (t = 21) => {
|
|
|
2486
2493
|
e += Mn[r[t] & 63];
|
|
2487
2494
|
return e;
|
|
2488
2495
|
};
|
|
2489
|
-
const Vn = "fuul.tracking_id", Me = () => Xn(Vn, () => Hn()), bt = () =>
|
|
2496
|
+
const Vn = "fuul.tracking_id", Me = () => Xn(Vn, () => Hn()), bt = () => X("af") || X("referrer"), Kn = () => document.referrer, zn = () => Yn(), Jn = () => X("category"), Wn = () => X("title"), Qn = () => X("tag"), Xn = (t, e) => {
|
|
2490
2497
|
const r = localStorage.getItem(t);
|
|
2491
2498
|
if (r)
|
|
2492
2499
|
return r;
|
|
@@ -2494,14 +2501,14 @@ const Vn = "fuul.tracking_id", Me = () => Xn(Vn, () => Hn()), bt = () => W("af")
|
|
|
2494
2501
|
const n = e();
|
|
2495
2502
|
return n ? localStorage.setItem(t, n) : localStorage.removeItem(t), n;
|
|
2496
2503
|
}
|
|
2497
|
-
},
|
|
2498
|
-
const t =
|
|
2504
|
+
}, X = (t) => new URLSearchParams(window.location.search).get(t), Yn = () => {
|
|
2505
|
+
const t = X("source");
|
|
2499
2506
|
if (t)
|
|
2500
2507
|
return t;
|
|
2501
2508
|
}, Gn = "/user";
|
|
2502
2509
|
class Zn {
|
|
2503
2510
|
constructor(e) {
|
|
2504
|
-
|
|
2511
|
+
_(this, "httpClient");
|
|
2505
2512
|
this.httpClient = e.httpClient;
|
|
2506
2513
|
}
|
|
2507
2514
|
async getUserReferrer(e) {
|
|
@@ -2509,16 +2516,16 @@ class Zn {
|
|
|
2509
2516
|
}
|
|
2510
2517
|
}
|
|
2511
2518
|
const es = "https://api.fuul.xyz/api/v1/";
|
|
2512
|
-
let k = !1, ve = !1, He, L,
|
|
2519
|
+
let k = !1, ve = !1, He, L, Ve, Ht, v, G, Re, K, Vt, z, q, ae;
|
|
2513
2520
|
function ts(t) {
|
|
2514
|
-
k = !!t.debug, !ve && (He = t.apiKey,
|
|
2521
|
+
k = !!t.debug, !ve && (He = t.apiKey, Ks(), L = zs(t.baseApiUrl ?? es, t.defaultQueryParams ?? {}), Ve = new Dn({ httpClient: L, debug: k }), Re = new kn({ httpClient: L, debug: k }), v = new On({ httpClient: L, debug: k }), G = new Wt({ httpClient: L }), K = new $n({ httpClient: L, debug: k }), Ht = new Zn({ httpClient: L }), Vt = new xn({ httpClient: L, debug: k }), z = new qn({ httpClient: L }), q = new jn({ httpClient: L, debug: k }), ae = new Un({ httpClient: L, debug: k }), ve = !0, k && console.debug("Fuul SDK: init() complete"));
|
|
2515
2522
|
}
|
|
2516
2523
|
function w() {
|
|
2517
2524
|
if (!ve)
|
|
2518
2525
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
2519
2526
|
}
|
|
2520
2527
|
async function rs(t, e) {
|
|
2521
|
-
w(),
|
|
2528
|
+
w(), Ke(), ze();
|
|
2522
2529
|
const r = {
|
|
2523
2530
|
name: t,
|
|
2524
2531
|
args: e ?? {},
|
|
@@ -2529,7 +2536,7 @@ async function rs(t, e) {
|
|
|
2529
2536
|
await Re.sendEvent(r);
|
|
2530
2537
|
}
|
|
2531
2538
|
async function ns(t, e) {
|
|
2532
|
-
w(),
|
|
2539
|
+
w(), Ke(), ze();
|
|
2533
2540
|
const r = {
|
|
2534
2541
|
name: "pageview",
|
|
2535
2542
|
args: {
|
|
@@ -2550,7 +2557,7 @@ async function ns(t, e) {
|
|
|
2550
2557
|
await Re.sendEvent(r, e);
|
|
2551
2558
|
}
|
|
2552
2559
|
async function ss(t, e) {
|
|
2553
|
-
w(),
|
|
2560
|
+
w(), Ke(), ze();
|
|
2554
2561
|
const r = {
|
|
2555
2562
|
name: "connect_wallet",
|
|
2556
2563
|
user: {
|
|
@@ -2568,7 +2575,7 @@ async function ss(t, e) {
|
|
|
2568
2575
|
t != null && t.signature && (r.signature = t == null ? void 0 : t.signature, r.signature_message = t == null ? void 0 : t.message), t != null && t.signaturePublicKey && (r.signature_public_key = t.signaturePublicKey), t != null && t.accountChainId && (r.account_chain_id = t.accountChainId), await Re.sendEvent(r, e);
|
|
2569
2576
|
}
|
|
2570
2577
|
async function is(t) {
|
|
2571
|
-
return w(),
|
|
2578
|
+
return w(), v.create(
|
|
2572
2579
|
t.userIdentifier,
|
|
2573
2580
|
t.identifierType,
|
|
2574
2581
|
t.code,
|
|
@@ -2579,7 +2586,7 @@ async function is(t) {
|
|
|
2579
2586
|
);
|
|
2580
2587
|
}
|
|
2581
2588
|
async function os(t) {
|
|
2582
|
-
w(), await
|
|
2589
|
+
w(), await v.update(
|
|
2583
2590
|
t.userIdentifier,
|
|
2584
2591
|
t.identifierType,
|
|
2585
2592
|
t.code,
|
|
@@ -2589,7 +2596,7 @@ async function os(t) {
|
|
|
2589
2596
|
);
|
|
2590
2597
|
}
|
|
2591
2598
|
async function as(t) {
|
|
2592
|
-
w(), await
|
|
2599
|
+
w(), await v.updateRebateRate(
|
|
2593
2600
|
t.userIdentifier,
|
|
2594
2601
|
t.identifierType,
|
|
2595
2602
|
t.code,
|
|
@@ -2601,181 +2608,193 @@ async function as(t) {
|
|
|
2601
2608
|
);
|
|
2602
2609
|
}
|
|
2603
2610
|
async function cs(t, e) {
|
|
2604
|
-
return w(), await
|
|
2611
|
+
return w(), await v.getCode(t, e);
|
|
2605
2612
|
}
|
|
2606
|
-
async function us(t) {
|
|
2607
|
-
return w(), await
|
|
2613
|
+
async function us(t, e) {
|
|
2614
|
+
return w(), await v.getCode(t, e);
|
|
2608
2615
|
}
|
|
2609
2616
|
async function ls(t) {
|
|
2610
|
-
return w(), await
|
|
2617
|
+
return w(), await v.isCodeFree(t);
|
|
2618
|
+
}
|
|
2619
|
+
async function ds(t) {
|
|
2620
|
+
return w(), await v.isCodeAvailable(t);
|
|
2611
2621
|
}
|
|
2612
|
-
async function
|
|
2622
|
+
async function fs(t, e, r, n) {
|
|
2613
2623
|
w();
|
|
2614
|
-
const s = await
|
|
2624
|
+
const s = await v.getCode(e, r), i = new URLSearchParams({
|
|
2615
2625
|
af: (s == null ? void 0 : s.code) ?? e
|
|
2616
2626
|
});
|
|
2617
2627
|
return n != null && n.title && i.append("af_title", n.title), n != null && n.format && i.append("af_format", n.format), n != null && n.place && i.append("af_place", n.place), `${t}?${i.toString()}`;
|
|
2618
2628
|
}
|
|
2619
|
-
function fs(t) {
|
|
2620
|
-
return K.getPayoutsLeaderboard(t);
|
|
2621
|
-
}
|
|
2622
2629
|
function hs(t) {
|
|
2623
|
-
return
|
|
2630
|
+
return z.getPayoutsLeaderboard(t);
|
|
2624
2631
|
}
|
|
2625
2632
|
function ps(t) {
|
|
2626
|
-
return
|
|
2633
|
+
return z.getPointsLeaderboard(t);
|
|
2627
2634
|
}
|
|
2628
2635
|
function ys(t) {
|
|
2629
|
-
return
|
|
2630
|
-
}
|
|
2631
|
-
function ms(t) {
|
|
2632
|
-
return w(), K.getVolumeLeaderboard(t);
|
|
2636
|
+
return z.getReferredUsersLeaderboard(t);
|
|
2633
2637
|
}
|
|
2634
2638
|
function gs(t) {
|
|
2635
|
-
return w(),
|
|
2639
|
+
return w(), z.getReferredVolume(t);
|
|
2636
2640
|
}
|
|
2637
|
-
function
|
|
2638
|
-
return
|
|
2641
|
+
function ms(t) {
|
|
2642
|
+
return w(), z.getVolumeLeaderboard(t);
|
|
2639
2643
|
}
|
|
2640
|
-
function
|
|
2641
|
-
return
|
|
2644
|
+
function ws(t) {
|
|
2645
|
+
return w(), z.getRevenueLeaderboard(t);
|
|
2642
2646
|
}
|
|
2643
2647
|
function _s(t) {
|
|
2644
|
-
return
|
|
2648
|
+
return K.getUserPayoutsByConversion(t);
|
|
2649
|
+
}
|
|
2650
|
+
function bs(t) {
|
|
2651
|
+
return K.getUserPointsByConversion(t);
|
|
2645
2652
|
}
|
|
2646
2653
|
function Cs(t) {
|
|
2647
|
-
return
|
|
2654
|
+
return K.getUserPayoutMovements(t);
|
|
2648
2655
|
}
|
|
2649
2656
|
function Es(t) {
|
|
2650
|
-
return
|
|
2657
|
+
return K.getUserPointsMovements(t);
|
|
2651
2658
|
}
|
|
2652
|
-
|
|
2653
|
-
return w(),
|
|
2659
|
+
function Rs(t) {
|
|
2660
|
+
return w(), K.getPayoutsByReferrer(t);
|
|
2654
2661
|
}
|
|
2655
2662
|
async function Ss(t) {
|
|
2656
|
-
return w(),
|
|
2663
|
+
return w(), K.getIncentivesByTier(t);
|
|
2657
2664
|
}
|
|
2658
|
-
async function Ts(
|
|
2659
|
-
return w(),
|
|
2665
|
+
async function Ts() {
|
|
2666
|
+
return w(), Ve.getAll();
|
|
2660
2667
|
}
|
|
2661
2668
|
async function As(t) {
|
|
2662
|
-
return w(),
|
|
2669
|
+
return w(), Ve.getAll(t);
|
|
2663
2670
|
}
|
|
2664
2671
|
async function Ps(t) {
|
|
2665
|
-
return w(),
|
|
2672
|
+
return w(), Ht.getUserReferrer(t);
|
|
2666
2673
|
}
|
|
2667
2674
|
async function Os(t) {
|
|
2668
|
-
return w(),
|
|
2675
|
+
return w(), Vt.getUserAudiences(t);
|
|
2669
2676
|
}
|
|
2670
2677
|
async function Ns(t) {
|
|
2671
|
-
return w(),
|
|
2678
|
+
return w(), q.listUserReferralCodes(t);
|
|
2672
2679
|
}
|
|
2673
2680
|
async function xs(t) {
|
|
2674
|
-
return w(),
|
|
2681
|
+
return w(), q.generateReferralCodes(t);
|
|
2675
2682
|
}
|
|
2676
2683
|
async function Us(t) {
|
|
2677
|
-
return w(),
|
|
2684
|
+
return w(), q.getReferralStatus(t);
|
|
2678
2685
|
}
|
|
2679
2686
|
async function Ds(t) {
|
|
2680
|
-
return w(),
|
|
2687
|
+
return w(), q.getReferralCode(t);
|
|
2681
2688
|
}
|
|
2682
2689
|
async function Ls(t) {
|
|
2683
|
-
return w(),
|
|
2690
|
+
return w(), q.useReferralCode(t);
|
|
2684
2691
|
}
|
|
2685
2692
|
async function Fs(t) {
|
|
2686
|
-
return w(),
|
|
2693
|
+
return w(), q.updateReferralCode(t);
|
|
2687
2694
|
}
|
|
2688
2695
|
async function ks(t) {
|
|
2689
|
-
return w(),
|
|
2696
|
+
return w(), q.deleteReferral(t);
|
|
2690
2697
|
}
|
|
2691
2698
|
async function vs(t) {
|
|
2692
|
-
return w(),
|
|
2699
|
+
return w(), G.getAffiliateStats(t);
|
|
2693
2700
|
}
|
|
2694
2701
|
async function Bs(t) {
|
|
2695
|
-
return w(),
|
|
2702
|
+
return w(), G.getAffiliateNewTraders(t);
|
|
2703
|
+
}
|
|
2704
|
+
async function Is(t) {
|
|
2705
|
+
return w(), G.getAffiliateTotalStats(t);
|
|
2696
2706
|
}
|
|
2697
2707
|
async function qs(t) {
|
|
2708
|
+
return w(), G.getReferralTree(t);
|
|
2709
|
+
}
|
|
2710
|
+
async function $s(t) {
|
|
2711
|
+
return w(), G.getStatsBreakdown(t);
|
|
2712
|
+
}
|
|
2713
|
+
async function js(t) {
|
|
2698
2714
|
return w(), ae.getClaimChecks(t);
|
|
2699
2715
|
}
|
|
2700
|
-
async function
|
|
2716
|
+
async function Ms(t) {
|
|
2701
2717
|
return w(), ae.closeClaimChecks(t);
|
|
2702
2718
|
}
|
|
2703
|
-
async function
|
|
2719
|
+
async function Hs(t) {
|
|
2704
2720
|
return w(), ae.getClaimableChecks(t);
|
|
2705
2721
|
}
|
|
2706
|
-
async function
|
|
2722
|
+
async function Vs(t) {
|
|
2707
2723
|
return w(), ae.getClaimCheckTotals(t);
|
|
2708
2724
|
}
|
|
2709
|
-
function
|
|
2725
|
+
function Ke() {
|
|
2710
2726
|
if (typeof window > "u" || typeof document > "u")
|
|
2711
2727
|
throw new Error("Fuul SDK: Browser context required");
|
|
2712
2728
|
}
|
|
2713
|
-
function
|
|
2729
|
+
function ze() {
|
|
2714
2730
|
if (navigator.webdriver)
|
|
2715
2731
|
throw new Error("Fuul SDK: Error");
|
|
2716
2732
|
}
|
|
2717
|
-
function
|
|
2733
|
+
function Ks() {
|
|
2718
2734
|
if (!He)
|
|
2719
2735
|
throw new Error("Fuul SDK: Invalid API key");
|
|
2720
2736
|
}
|
|
2721
|
-
function
|
|
2722
|
-
return new
|
|
2737
|
+
function zs(t, e) {
|
|
2738
|
+
return new In({
|
|
2723
2739
|
baseURL: t,
|
|
2724
2740
|
timeout: 3e4,
|
|
2725
2741
|
apiKey: He,
|
|
2726
2742
|
queryParams: e
|
|
2727
2743
|
});
|
|
2728
2744
|
}
|
|
2729
|
-
const
|
|
2745
|
+
const pi = {
|
|
2730
2746
|
init: ts,
|
|
2731
2747
|
sendEvent: rs,
|
|
2732
2748
|
sendPageview: ns,
|
|
2733
2749
|
identifyUser: ss,
|
|
2734
|
-
generateTrackingLink:
|
|
2735
|
-
getConversions:
|
|
2750
|
+
generateTrackingLink: fs,
|
|
2751
|
+
getConversions: As,
|
|
2752
|
+
getIncentives: Ts,
|
|
2753
|
+
getIncentivesByTier: Ss,
|
|
2736
2754
|
createAffiliateCode: is,
|
|
2737
2755
|
updateAffiliateCode: os,
|
|
2738
2756
|
updateRebateRate: as,
|
|
2739
|
-
getAffiliateCode:
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2757
|
+
getAffiliateCode: us,
|
|
2758
|
+
getAffiliateInfo: cs,
|
|
2759
|
+
isAffiliateCodeFree: ls,
|
|
2760
|
+
isAffiliateCodeAvailable: ds,
|
|
2761
|
+
getPayoutsLeaderboard: hs,
|
|
2762
|
+
getPointsLeaderboard: ps,
|
|
2763
|
+
getReferredUsersLeaderboard: ys,
|
|
2764
|
+
getReferredVolume: gs,
|
|
2765
|
+
getUserAudiences: Os,
|
|
2766
|
+
getUserPayoutsByConversion: _s,
|
|
2748
2767
|
getUserPointsByConversion: bs,
|
|
2749
|
-
getUserPointsMovements:
|
|
2750
|
-
getUserPayoutMovements:
|
|
2751
|
-
getPayoutsByReferrer:
|
|
2752
|
-
getUserReferrer:
|
|
2768
|
+
getUserPointsMovements: Es,
|
|
2769
|
+
getUserPayoutMovements: Cs,
|
|
2770
|
+
getPayoutsByReferrer: Rs,
|
|
2771
|
+
getUserReferrer: Ps,
|
|
2753
2772
|
getVolumeLeaderboard: ms,
|
|
2754
|
-
getRevenueLeaderboard:
|
|
2755
|
-
listUserReferralCodes:
|
|
2756
|
-
generateReferralCodes:
|
|
2757
|
-
getReferralStatus:
|
|
2758
|
-
getReferralCode:
|
|
2759
|
-
useReferralCode:
|
|
2760
|
-
updateReferralCode:
|
|
2761
|
-
deleteReferral:
|
|
2762
|
-
getAffiliateStats:
|
|
2763
|
-
getAffiliateNewTraders:
|
|
2764
|
-
getAffiliateTotalStats:
|
|
2765
|
-
getReferralTree:
|
|
2766
|
-
getStatsBreakdown:
|
|
2767
|
-
getClaimChecks:
|
|
2768
|
-
closeClaimChecks:
|
|
2769
|
-
getClaimableChecks:
|
|
2770
|
-
getClaimCheckTotals:
|
|
2773
|
+
getRevenueLeaderboard: ws,
|
|
2774
|
+
listUserReferralCodes: Ns,
|
|
2775
|
+
generateReferralCodes: xs,
|
|
2776
|
+
getReferralStatus: Us,
|
|
2777
|
+
getReferralCode: Ds,
|
|
2778
|
+
useReferralCode: Ls,
|
|
2779
|
+
updateReferralCode: Fs,
|
|
2780
|
+
deleteReferral: ks,
|
|
2781
|
+
getAffiliateStats: vs,
|
|
2782
|
+
getAffiliateNewTraders: Bs,
|
|
2783
|
+
getAffiliateTotalStats: Is,
|
|
2784
|
+
getReferralTree: qs,
|
|
2785
|
+
getStatsBreakdown: $s,
|
|
2786
|
+
getClaimChecks: js,
|
|
2787
|
+
closeClaimChecks: Ms,
|
|
2788
|
+
getClaimableChecks: Hs,
|
|
2789
|
+
getClaimCheckTotals: Vs
|
|
2771
2790
|
};
|
|
2772
|
-
var
|
|
2791
|
+
var Js = /* @__PURE__ */ ((t) => (t.Open = "open", t.Unclaimed = "unclaimed", t.Claimed = "claimed", t))(Js || {}), Ws = /* @__PURE__ */ ((t) => (t.EvmAddress = "evm_address", t.SolanaAddress = "solana_address", t.XRPLAddress = "xrpl_address", t.SuiAddress = "sui_address", t.Email = "email", t))(Ws || {});
|
|
2773
2792
|
export {
|
|
2774
|
-
|
|
2775
|
-
|
|
2793
|
+
gt as AddressInUseError,
|
|
2794
|
+
Js as ClaimCheckStatus,
|
|
2776
2795
|
mt as CodeInUseError,
|
|
2777
|
-
|
|
2796
|
+
pi as Fuul,
|
|
2778
2797
|
Ue as InvalidSignatureError,
|
|
2779
|
-
|
|
2798
|
+
Ws as UserIdentifierType,
|
|
2780
2799
|
xe as ValidationError
|
|
2781
2800
|
};
|