@fuul/sdk 3.3.3 → 3.4.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/index.mjs +576 -548
- package/dist/index.umd.js +5 -3
- package/dist/types/api.d.ts +96 -46
- package/dist/types/api.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
1
|
+
var ot = Object.defineProperty;
|
|
2
|
+
var it = (e, t, n) => t in e ? ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var S = (e, t, n) => (it(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
function Le(e, t) {
|
|
5
5
|
return function() {
|
|
6
6
|
return e.apply(t, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString:
|
|
10
|
-
const n =
|
|
9
|
+
const { toString: at } = Object.prototype, { getPrototypeOf: ae } = Object, V = ((e) => (t) => {
|
|
10
|
+
const n = at.call(t);
|
|
11
11
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)), C = (e) => (e = e.toLowerCase(), (t) =>
|
|
13
|
-
function
|
|
14
|
-
return e !== null && !
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), C = (e) => (e = e.toLowerCase(), (t) => V(t) === e), K = (e) => (t) => typeof t === e, { isArray: U } = Array, j = K("undefined");
|
|
13
|
+
function ct(e) {
|
|
14
|
+
return e !== null && !j(e) && e.constructor !== null && !j(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
16
16
|
const Be = C("ArrayBuffer");
|
|
17
|
-
function
|
|
17
|
+
function ut(e) {
|
|
18
18
|
let t;
|
|
19
19
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Be(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
21
|
+
const lt = K("string"), A = K("function"), Ie = K("number"), J = (e) => e !== null && typeof e == "object", ft = (e) => e === !0 || e === !1, $ = (e) => {
|
|
22
|
+
if (V(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
|
-
const t =
|
|
24
|
+
const t = ae(e);
|
|
25
25
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
29
|
-
|
|
26
|
+
}, dt = C("Date"), pt = C("File"), ht = C("Blob"), mt = C("FileList"), yt = (e) => J(e) && A(e.pipe), wt = (e) => {
|
|
27
|
+
let t;
|
|
28
|
+
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = V(e)) === "formdata" || // detect form-data instance
|
|
29
|
+
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
30
|
+
}, gt = C("URLSearchParams"), Et = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
30
31
|
function k(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
31
32
|
if (e === null || typeof e > "u")
|
|
32
33
|
return;
|
|
33
34
|
let r, s;
|
|
34
|
-
if (typeof e != "object" && (e = [e]),
|
|
35
|
+
if (typeof e != "object" && (e = [e]), U(e))
|
|
35
36
|
for (r = 0, s = e.length; r < s; r++)
|
|
36
37
|
t.call(null, e[r], r, e);
|
|
37
38
|
else {
|
|
@@ -41,7 +42,7 @@ function k(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
41
42
|
c = i[r], t.call(null, e[c], c, e);
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function je(e, t) {
|
|
45
46
|
t = t.toLowerCase();
|
|
46
47
|
const n = Object.keys(e);
|
|
47
48
|
let r = n.length, s;
|
|
@@ -50,23 +51,23 @@ function ke(e, t) {
|
|
|
50
51
|
return s;
|
|
51
52
|
return null;
|
|
52
53
|
}
|
|
53
|
-
const
|
|
54
|
+
const ke = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), qe = (e) => !j(e) && e !== ke;
|
|
54
55
|
function te() {
|
|
55
56
|
const { caseless: e } = qe(this) && this || {}, t = {}, n = (r, s) => {
|
|
56
|
-
const i = e &&
|
|
57
|
-
$(t[i]) && $(r) ? t[i] = te(t[i], r) : $(r) ? t[i] = te({}, r) :
|
|
57
|
+
const i = e && je(t, s) || s;
|
|
58
|
+
$(t[i]) && $(r) ? t[i] = te(t[i], r) : $(r) ? t[i] = te({}, r) : U(r) ? t[i] = r.slice() : t[i] = r;
|
|
58
59
|
};
|
|
59
60
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
60
61
|
arguments[r] && k(arguments[r], n);
|
|
61
62
|
return t;
|
|
62
63
|
}
|
|
63
|
-
const
|
|
64
|
-
n &&
|
|
65
|
-
}, { allOwnKeys: r }), e),
|
|
64
|
+
const St = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
|
|
65
|
+
n && A(s) ? e[i] = Le(s, n) : e[i] = s;
|
|
66
|
+
}, { allOwnKeys: r }), e), bt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), At = (e, t, n, r) => {
|
|
66
67
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
67
68
|
value: t.prototype
|
|
68
69
|
}), n && Object.assign(e.prototype, n);
|
|
69
|
-
},
|
|
70
|
+
}, Rt = (e, t, n, r) => {
|
|
70
71
|
let s, i, o;
|
|
71
72
|
const c = {};
|
|
72
73
|
if (t = t || {}, e == null)
|
|
@@ -74,17 +75,17 @@ const wt = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
|
|
|
74
75
|
do {
|
|
75
76
|
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
76
77
|
o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
77
|
-
e = n !== !1 &&
|
|
78
|
+
e = n !== !1 && ae(e);
|
|
78
79
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
79
80
|
return t;
|
|
80
|
-
},
|
|
81
|
+
}, Ct = (e, t, n) => {
|
|
81
82
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
82
83
|
const r = e.indexOf(t, n);
|
|
83
84
|
return r !== -1 && r === n;
|
|
84
|
-
},
|
|
85
|
+
}, Ot = (e) => {
|
|
85
86
|
if (!e)
|
|
86
87
|
return null;
|
|
87
|
-
if (
|
|
88
|
+
if (U(e))
|
|
88
89
|
return e;
|
|
89
90
|
let t = e.length;
|
|
90
91
|
if (!Ie(t))
|
|
@@ -93,35 +94,36 @@ const wt = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
|
|
|
93
94
|
for (; t-- > 0; )
|
|
94
95
|
n[t] = e[t];
|
|
95
96
|
return n;
|
|
96
|
-
},
|
|
97
|
+
}, Tt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ae(Uint8Array)), Pt = (e, t) => {
|
|
97
98
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
98
99
|
let s;
|
|
99
100
|
for (; (s = r.next()) && !s.done; ) {
|
|
100
101
|
const i = s.value;
|
|
101
102
|
t.call(e, i[0], i[1]);
|
|
102
103
|
}
|
|
103
|
-
},
|
|
104
|
+
}, _t = (e, t) => {
|
|
104
105
|
let n;
|
|
105
106
|
const r = [];
|
|
106
107
|
for (; (n = e.exec(t)) !== null; )
|
|
107
108
|
r.push(n);
|
|
108
109
|
return r;
|
|
109
|
-
},
|
|
110
|
+
}, Nt = C("HTMLFormElement"), xt = (e) => e.toLowerCase().replace(
|
|
110
111
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
111
112
|
function(n, r, s) {
|
|
112
113
|
return r.toUpperCase() + s;
|
|
113
114
|
}
|
|
114
|
-
), ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
115
|
+
), ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ft = C("RegExp"), $e = (e, t) => {
|
|
115
116
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
116
117
|
k(n, (s, i) => {
|
|
117
|
-
|
|
118
|
+
let o;
|
|
119
|
+
(o = t(s, i, e)) !== !1 && (r[i] = o || s);
|
|
118
120
|
}), Object.defineProperties(e, r);
|
|
119
|
-
},
|
|
121
|
+
}, Dt = (e) => {
|
|
120
122
|
$e(e, (t, n) => {
|
|
121
|
-
if (
|
|
123
|
+
if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
122
124
|
return !1;
|
|
123
125
|
const r = e[n];
|
|
124
|
-
if (
|
|
126
|
+
if (A(r)) {
|
|
125
127
|
if (t.enumerable = !1, "writable" in t) {
|
|
126
128
|
t.writable = !1;
|
|
127
129
|
return;
|
|
@@ -131,96 +133,98 @@ const wt = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
|
|
|
131
133
|
});
|
|
132
134
|
}
|
|
133
135
|
});
|
|
134
|
-
},
|
|
136
|
+
}, Ut = (e, t) => {
|
|
135
137
|
const n = {}, r = (s) => {
|
|
136
138
|
s.forEach((i) => {
|
|
137
139
|
n[i] = !0;
|
|
138
140
|
});
|
|
139
141
|
};
|
|
140
|
-
return
|
|
141
|
-
},
|
|
142
|
-
},
|
|
142
|
+
return U(e) ? r(e) : r(String(e).split(t)), n;
|
|
143
|
+
}, Lt = () => {
|
|
144
|
+
}, Bt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), X = "abcdefghijklmnopqrstuvwxyz", we = "0123456789", He = {
|
|
143
145
|
DIGIT: we,
|
|
144
146
|
ALPHA: X,
|
|
145
147
|
ALPHA_DIGIT: X + X.toUpperCase() + we
|
|
146
|
-
},
|
|
148
|
+
}, It = (e = 16, t = He.ALPHA_DIGIT) => {
|
|
147
149
|
let n = "";
|
|
148
150
|
const { length: r } = t;
|
|
149
151
|
for (; e--; )
|
|
150
152
|
n += t[Math.random() * r | 0];
|
|
151
153
|
return n;
|
|
152
154
|
};
|
|
153
|
-
function
|
|
154
|
-
return !!(e &&
|
|
155
|
+
function jt(e) {
|
|
156
|
+
return !!(e && A(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
155
157
|
}
|
|
156
|
-
const
|
|
158
|
+
const kt = (e) => {
|
|
157
159
|
const t = new Array(10), n = (r, s) => {
|
|
158
|
-
if (
|
|
160
|
+
if (J(r)) {
|
|
159
161
|
if (t.indexOf(r) >= 0)
|
|
160
162
|
return;
|
|
161
163
|
if (!("toJSON" in r)) {
|
|
162
164
|
t[s] = r;
|
|
163
|
-
const i =
|
|
165
|
+
const i = U(r) ? [] : {};
|
|
164
166
|
return k(r, (o, c) => {
|
|
165
|
-
const
|
|
166
|
-
!
|
|
167
|
+
const p = n(o, s + 1);
|
|
168
|
+
!j(p) && (i[c] = p);
|
|
167
169
|
}), t[s] = void 0, i;
|
|
168
170
|
}
|
|
169
171
|
}
|
|
170
172
|
return r;
|
|
171
173
|
};
|
|
172
174
|
return n(e, 0);
|
|
173
|
-
}, a = {
|
|
174
|
-
isArray:
|
|
175
|
+
}, qt = C("AsyncFunction"), $t = (e) => e && (J(e) || A(e)) && A(e.then) && A(e.catch), a = {
|
|
176
|
+
isArray: U,
|
|
175
177
|
isArrayBuffer: Be,
|
|
176
|
-
isBuffer:
|
|
177
|
-
isFormData:
|
|
178
|
-
isArrayBufferView:
|
|
179
|
-
isString:
|
|
178
|
+
isBuffer: ct,
|
|
179
|
+
isFormData: wt,
|
|
180
|
+
isArrayBufferView: ut,
|
|
181
|
+
isString: lt,
|
|
180
182
|
isNumber: Ie,
|
|
181
|
-
isBoolean:
|
|
182
|
-
isObject:
|
|
183
|
+
isBoolean: ft,
|
|
184
|
+
isObject: J,
|
|
183
185
|
isPlainObject: $,
|
|
184
|
-
isUndefined:
|
|
185
|
-
isDate:
|
|
186
|
-
isFile:
|
|
187
|
-
isBlob:
|
|
188
|
-
isRegExp:
|
|
189
|
-
isFunction:
|
|
190
|
-
isStream:
|
|
191
|
-
isURLSearchParams:
|
|
192
|
-
isTypedArray:
|
|
193
|
-
isFileList:
|
|
186
|
+
isUndefined: j,
|
|
187
|
+
isDate: dt,
|
|
188
|
+
isFile: pt,
|
|
189
|
+
isBlob: ht,
|
|
190
|
+
isRegExp: Ft,
|
|
191
|
+
isFunction: A,
|
|
192
|
+
isStream: yt,
|
|
193
|
+
isURLSearchParams: gt,
|
|
194
|
+
isTypedArray: Tt,
|
|
195
|
+
isFileList: mt,
|
|
194
196
|
forEach: k,
|
|
195
197
|
merge: te,
|
|
196
|
-
extend:
|
|
197
|
-
trim:
|
|
198
|
-
stripBOM:
|
|
199
|
-
inherits:
|
|
200
|
-
toFlatObject:
|
|
201
|
-
kindOf:
|
|
198
|
+
extend: St,
|
|
199
|
+
trim: Et,
|
|
200
|
+
stripBOM: bt,
|
|
201
|
+
inherits: At,
|
|
202
|
+
toFlatObject: Rt,
|
|
203
|
+
kindOf: V,
|
|
202
204
|
kindOfTest: C,
|
|
203
|
-
endsWith:
|
|
204
|
-
toArray:
|
|
205
|
-
forEachEntry:
|
|
206
|
-
matchAll:
|
|
207
|
-
isHTMLForm:
|
|
205
|
+
endsWith: Ct,
|
|
206
|
+
toArray: Ot,
|
|
207
|
+
forEachEntry: Pt,
|
|
208
|
+
matchAll: _t,
|
|
209
|
+
isHTMLForm: Nt,
|
|
208
210
|
hasOwnProperty: ye,
|
|
209
211
|
hasOwnProp: ye,
|
|
210
212
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
211
213
|
reduceDescriptors: $e,
|
|
212
|
-
freezeMethods:
|
|
213
|
-
toObjectSet:
|
|
214
|
-
toCamelCase:
|
|
215
|
-
noop:
|
|
216
|
-
toFiniteNumber:
|
|
217
|
-
findKey:
|
|
218
|
-
global:
|
|
214
|
+
freezeMethods: Dt,
|
|
215
|
+
toObjectSet: Ut,
|
|
216
|
+
toCamelCase: xt,
|
|
217
|
+
noop: Lt,
|
|
218
|
+
toFiniteNumber: Bt,
|
|
219
|
+
findKey: je,
|
|
220
|
+
global: ke,
|
|
219
221
|
isContextDefined: qe,
|
|
220
222
|
ALPHABET: He,
|
|
221
|
-
generateString:
|
|
222
|
-
isSpecCompliantForm:
|
|
223
|
-
toJSONObject:
|
|
223
|
+
generateString: It,
|
|
224
|
+
isSpecCompliantForm: jt,
|
|
225
|
+
toJSONObject: kt,
|
|
226
|
+
isAsyncFn: qt,
|
|
227
|
+
isThenable: $t
|
|
224
228
|
};
|
|
225
229
|
function m(e, t, n, r, s) {
|
|
226
230
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s);
|
|
@@ -268,11 +272,11 @@ Object.defineProperties(m, ze);
|
|
|
268
272
|
Object.defineProperty(ve, "isAxiosError", { value: !0 });
|
|
269
273
|
m.from = (e, t, n, r, s, i) => {
|
|
270
274
|
const o = Object.create(ve);
|
|
271
|
-
return a.toFlatObject(e, o, function(
|
|
272
|
-
return
|
|
275
|
+
return a.toFlatObject(e, o, function(p) {
|
|
276
|
+
return p !== Error.prototype;
|
|
273
277
|
}, (c) => c !== "isAxiosError"), m.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
274
278
|
};
|
|
275
|
-
const
|
|
279
|
+
const Ht = null;
|
|
276
280
|
function ne(e) {
|
|
277
281
|
return a.isPlainObject(e) || a.isArray(e);
|
|
278
282
|
}
|
|
@@ -284,73 +288,73 @@ function ge(e, t, n) {
|
|
|
284
288
|
return s = Ve(s), !n && i ? "[" + s + "]" : s;
|
|
285
289
|
}).join(n ? "." : "") : t;
|
|
286
290
|
}
|
|
287
|
-
function
|
|
291
|
+
function vt(e) {
|
|
288
292
|
return a.isArray(e) && !e.some(ne);
|
|
289
293
|
}
|
|
290
|
-
const
|
|
294
|
+
const zt = a.toFlatObject(a, {}, null, function(t) {
|
|
291
295
|
return /^is[A-Z]/.test(t);
|
|
292
296
|
});
|
|
293
|
-
function
|
|
297
|
+
function M(e, t, n) {
|
|
294
298
|
if (!a.isObject(e))
|
|
295
299
|
throw new TypeError("target must be an object");
|
|
296
300
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
297
301
|
metaTokens: !0,
|
|
298
302
|
dots: !1,
|
|
299
303
|
indexes: !1
|
|
300
|
-
}, !1, function(
|
|
301
|
-
return !a.isUndefined(
|
|
304
|
+
}, !1, function(d, g) {
|
|
305
|
+
return !a.isUndefined(g[d]);
|
|
302
306
|
});
|
|
303
|
-
const r = n.metaTokens, s = n.visitor || l, i = n.dots, o = n.indexes,
|
|
307
|
+
const r = n.metaTokens, s = n.visitor || l, i = n.dots, o = n.indexes, p = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
304
308
|
if (!a.isFunction(s))
|
|
305
309
|
throw new TypeError("visitor must be a function");
|
|
306
|
-
function
|
|
310
|
+
function h(f) {
|
|
307
311
|
if (f === null)
|
|
308
312
|
return "";
|
|
309
313
|
if (a.isDate(f))
|
|
310
314
|
return f.toISOString();
|
|
311
|
-
if (!
|
|
315
|
+
if (!p && a.isBlob(f))
|
|
312
316
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
313
|
-
return a.isArrayBuffer(f) || a.isTypedArray(f) ?
|
|
314
|
-
}
|
|
315
|
-
function l(f,
|
|
316
|
-
let
|
|
317
|
-
if (f && !
|
|
318
|
-
if (a.endsWith(
|
|
319
|
-
|
|
320
|
-
else if (a.isArray(f) &&
|
|
321
|
-
return
|
|
322
|
-
!(a.isUndefined(
|
|
317
|
+
return a.isArrayBuffer(f) || a.isTypedArray(f) ? p && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
318
|
+
}
|
|
319
|
+
function l(f, d, g) {
|
|
320
|
+
let E = f;
|
|
321
|
+
if (f && !g && typeof f == "object") {
|
|
322
|
+
if (a.endsWith(d, "{}"))
|
|
323
|
+
d = r ? d : d.slice(0, -2), f = JSON.stringify(f);
|
|
324
|
+
else if (a.isArray(f) && vt(f) || (a.isFileList(f) || a.endsWith(d, "[]")) && (E = a.toArray(f)))
|
|
325
|
+
return d = Ve(d), E.forEach(function(_, st) {
|
|
326
|
+
!(a.isUndefined(_) || _ === null) && t.append(
|
|
323
327
|
// eslint-disable-next-line no-nested-ternary
|
|
324
|
-
o === !0 ? ge([
|
|
325
|
-
|
|
328
|
+
o === !0 ? ge([d], st, i) : o === null ? d : d + "[]",
|
|
329
|
+
h(_)
|
|
326
330
|
);
|
|
327
331
|
}), !1;
|
|
328
332
|
}
|
|
329
|
-
return ne(f) ? !0 : (t.append(ge(
|
|
333
|
+
return ne(f) ? !0 : (t.append(ge(g, d, i), h(f)), !1);
|
|
330
334
|
}
|
|
331
|
-
const
|
|
335
|
+
const u = [], w = Object.assign(zt, {
|
|
332
336
|
defaultVisitor: l,
|
|
333
|
-
convertValue:
|
|
337
|
+
convertValue: h,
|
|
334
338
|
isVisitable: ne
|
|
335
339
|
});
|
|
336
|
-
function
|
|
340
|
+
function b(f, d) {
|
|
337
341
|
if (!a.isUndefined(f)) {
|
|
338
|
-
if (
|
|
339
|
-
throw Error("Circular reference detected in " +
|
|
340
|
-
|
|
341
|
-
(!(a.isUndefined(
|
|
342
|
+
if (u.indexOf(f) !== -1)
|
|
343
|
+
throw Error("Circular reference detected in " + d.join("."));
|
|
344
|
+
u.push(f), a.forEach(f, function(E, P) {
|
|
345
|
+
(!(a.isUndefined(E) || E === null) && s.call(
|
|
342
346
|
t,
|
|
343
|
-
|
|
344
|
-
a.isString(
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
)) === !0 &&
|
|
348
|
-
}),
|
|
347
|
+
E,
|
|
348
|
+
a.isString(P) ? P.trim() : P,
|
|
349
|
+
d,
|
|
350
|
+
w
|
|
351
|
+
)) === !0 && b(E, d ? d.concat(P) : [P]);
|
|
352
|
+
}), u.pop();
|
|
349
353
|
}
|
|
350
354
|
}
|
|
351
355
|
if (!a.isObject(e))
|
|
352
356
|
throw new TypeError("data must be an object");
|
|
353
|
-
return
|
|
357
|
+
return b(e), t;
|
|
354
358
|
}
|
|
355
359
|
function Ee(e) {
|
|
356
360
|
const t = {
|
|
@@ -366,10 +370,10 @@ function Ee(e) {
|
|
|
366
370
|
return t[r];
|
|
367
371
|
});
|
|
368
372
|
}
|
|
369
|
-
function
|
|
370
|
-
this._pairs = [], e &&
|
|
373
|
+
function ce(e, t) {
|
|
374
|
+
this._pairs = [], e && M(e, this, t);
|
|
371
375
|
}
|
|
372
|
-
const Ke =
|
|
376
|
+
const Ke = ce.prototype;
|
|
373
377
|
Ke.append = function(t, n) {
|
|
374
378
|
this._pairs.push([t, n]);
|
|
375
379
|
};
|
|
@@ -381,21 +385,21 @@ Ke.toString = function(t) {
|
|
|
381
385
|
return n(s[0]) + "=" + n(s[1]);
|
|
382
386
|
}, "").join("&");
|
|
383
387
|
};
|
|
384
|
-
function
|
|
388
|
+
function Vt(e) {
|
|
385
389
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
386
390
|
}
|
|
387
391
|
function Je(e, t, n) {
|
|
388
392
|
if (!t)
|
|
389
393
|
return e;
|
|
390
|
-
const r = n && n.encode ||
|
|
394
|
+
const r = n && n.encode || Vt, s = n && n.serialize;
|
|
391
395
|
let i;
|
|
392
|
-
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new
|
|
396
|
+
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new ce(t, n).toString(r), i) {
|
|
393
397
|
const o = e.indexOf("#");
|
|
394
398
|
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
395
399
|
}
|
|
396
400
|
return e;
|
|
397
401
|
}
|
|
398
|
-
class
|
|
402
|
+
class Kt {
|
|
399
403
|
constructor() {
|
|
400
404
|
this.handlers = [];
|
|
401
405
|
}
|
|
@@ -449,36 +453,39 @@ class $t {
|
|
|
449
453
|
});
|
|
450
454
|
}
|
|
451
455
|
}
|
|
452
|
-
const Se =
|
|
456
|
+
const Se = Kt, Me = {
|
|
453
457
|
silentJSONParsing: !0,
|
|
454
458
|
forcedJSONParsing: !0,
|
|
455
459
|
clarifyTimeoutError: !1
|
|
456
|
-
},
|
|
457
|
-
let e;
|
|
458
|
-
return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
|
|
459
|
-
})(), Kt = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
460
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), b = {
|
|
460
|
+
}, Jt = typeof URLSearchParams < "u" ? URLSearchParams : ce, Mt = typeof FormData < "u" ? FormData : null, Wt = typeof Blob < "u" ? Blob : null, Gt = {
|
|
461
461
|
isBrowser: !0,
|
|
462
462
|
classes: {
|
|
463
|
-
URLSearchParams:
|
|
464
|
-
FormData:
|
|
465
|
-
Blob:
|
|
463
|
+
URLSearchParams: Jt,
|
|
464
|
+
FormData: Mt,
|
|
465
|
+
Blob: Wt
|
|
466
466
|
},
|
|
467
|
-
isStandardBrowserEnv: Vt,
|
|
468
|
-
isStandardBrowserWebWorkerEnv: Kt,
|
|
469
467
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
468
|
+
}, We = typeof window < "u" && typeof document < "u", Xt = ((e) => We && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Qt = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
469
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
470
|
+
__proto__: null,
|
|
471
|
+
hasBrowserEnv: We,
|
|
472
|
+
hasStandardBrowserEnv: Xt,
|
|
473
|
+
hasStandardBrowserWebWorkerEnv: Qt
|
|
474
|
+
}, Symbol.toStringTag, { value: "Module" })), R = {
|
|
475
|
+
...Yt,
|
|
476
|
+
...Gt
|
|
470
477
|
};
|
|
471
|
-
function
|
|
472
|
-
return
|
|
478
|
+
function Zt(e, t) {
|
|
479
|
+
return M(e, new R.classes.URLSearchParams(), Object.assign({
|
|
473
480
|
visitor: function(n, r, s, i) {
|
|
474
|
-
return
|
|
481
|
+
return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
475
482
|
}
|
|
476
483
|
}, t));
|
|
477
484
|
}
|
|
478
|
-
function
|
|
485
|
+
function en(e) {
|
|
479
486
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
480
487
|
}
|
|
481
|
-
function
|
|
488
|
+
function tn(e) {
|
|
482
489
|
const t = {}, n = Object.keys(e);
|
|
483
490
|
let r;
|
|
484
491
|
const s = n.length;
|
|
@@ -487,24 +494,21 @@ function Wt(e) {
|
|
|
487
494
|
i = n[r], t[i] = e[i];
|
|
488
495
|
return t;
|
|
489
496
|
}
|
|
490
|
-
function
|
|
497
|
+
function Ge(e) {
|
|
491
498
|
function t(n, r, s, i) {
|
|
492
499
|
let o = n[i++];
|
|
493
|
-
const c = Number.isFinite(+o),
|
|
494
|
-
return o = !o && a.isArray(s) ? s.length : o,
|
|
500
|
+
const c = Number.isFinite(+o), p = i >= n.length;
|
|
501
|
+
return o = !o && a.isArray(s) ? s.length : o, p ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = tn(s[o])), !c);
|
|
495
502
|
}
|
|
496
503
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
497
504
|
const n = {};
|
|
498
505
|
return a.forEachEntry(e, (r, s) => {
|
|
499
|
-
t(
|
|
506
|
+
t(en(r), s, n, 0);
|
|
500
507
|
}), n;
|
|
501
508
|
}
|
|
502
509
|
return null;
|
|
503
510
|
}
|
|
504
|
-
|
|
505
|
-
"Content-Type": void 0
|
|
506
|
-
};
|
|
507
|
-
function Xt(e, t, n) {
|
|
511
|
+
function nn(e, t, n) {
|
|
508
512
|
if (a.isString(e))
|
|
509
513
|
try {
|
|
510
514
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -514,13 +518,13 @@ function Xt(e, t, n) {
|
|
|
514
518
|
}
|
|
515
519
|
return (n || JSON.stringify)(e);
|
|
516
520
|
}
|
|
517
|
-
const
|
|
521
|
+
const ue = {
|
|
518
522
|
transitional: Me,
|
|
519
523
|
adapter: ["xhr", "http"],
|
|
520
524
|
transformRequest: [function(t, n) {
|
|
521
525
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
|
|
522
526
|
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
523
|
-
return s && s ? JSON.stringify(
|
|
527
|
+
return s && s ? JSON.stringify(Ge(t)) : t;
|
|
524
528
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
525
529
|
return t;
|
|
526
530
|
if (a.isArrayBufferView(t))
|
|
@@ -530,20 +534,20 @@ const M = {
|
|
|
530
534
|
let c;
|
|
531
535
|
if (i) {
|
|
532
536
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
533
|
-
return
|
|
537
|
+
return Zt(t, this.formSerializer).toString();
|
|
534
538
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
535
|
-
const
|
|
536
|
-
return
|
|
539
|
+
const p = this.env && this.env.FormData;
|
|
540
|
+
return M(
|
|
537
541
|
c ? { "files[]": t } : t,
|
|
538
|
-
|
|
542
|
+
p && new p(),
|
|
539
543
|
this.formSerializer
|
|
540
544
|
);
|
|
541
545
|
}
|
|
542
546
|
}
|
|
543
|
-
return i || s ? (n.setContentType("application/json", !1),
|
|
547
|
+
return i || s ? (n.setContentType("application/json", !1), nn(t)) : t;
|
|
544
548
|
}],
|
|
545
549
|
transformResponse: [function(t) {
|
|
546
|
-
const n = this.transitional ||
|
|
550
|
+
const n = this.transitional || ue.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
547
551
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
548
552
|
const o = !(n && n.silentJSONParsing) && s;
|
|
549
553
|
try {
|
|
@@ -565,25 +569,23 @@ const M = {
|
|
|
565
569
|
maxContentLength: -1,
|
|
566
570
|
maxBodyLength: -1,
|
|
567
571
|
env: {
|
|
568
|
-
FormData:
|
|
569
|
-
Blob:
|
|
572
|
+
FormData: R.classes.FormData,
|
|
573
|
+
Blob: R.classes.Blob
|
|
570
574
|
},
|
|
571
575
|
validateStatus: function(t) {
|
|
572
576
|
return t >= 200 && t < 300;
|
|
573
577
|
},
|
|
574
578
|
headers: {
|
|
575
579
|
common: {
|
|
576
|
-
Accept: "application/json, text/plain, */*"
|
|
580
|
+
Accept: "application/json, text/plain, */*",
|
|
581
|
+
"Content-Type": void 0
|
|
577
582
|
}
|
|
578
583
|
}
|
|
579
584
|
};
|
|
580
|
-
a.forEach(["delete", "get", "head"],
|
|
581
|
-
|
|
582
|
-
});
|
|
583
|
-
a.forEach(["post", "put", "patch"], function(t) {
|
|
584
|
-
M.headers[t] = a.merge(Gt);
|
|
585
|
+
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
586
|
+
ue.headers[e] = {};
|
|
585
587
|
});
|
|
586
|
-
const le =
|
|
588
|
+
const le = ue, rn = a.toObjectSet([
|
|
587
589
|
"age",
|
|
588
590
|
"authorization",
|
|
589
591
|
"content-length",
|
|
@@ -601,31 +603,29 @@ const le = M, Yt = a.toObjectSet([
|
|
|
601
603
|
"referer",
|
|
602
604
|
"retry-after",
|
|
603
605
|
"user-agent"
|
|
604
|
-
]),
|
|
606
|
+
]), sn = (e) => {
|
|
605
607
|
const t = {};
|
|
606
608
|
let n, r, s;
|
|
607
609
|
return e && e.split(`
|
|
608
610
|
`).forEach(function(o) {
|
|
609
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] &&
|
|
611
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && rn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
610
612
|
}), t;
|
|
611
613
|
}, be = Symbol("internals");
|
|
612
|
-
function
|
|
614
|
+
function B(e) {
|
|
613
615
|
return e && String(e).trim().toLowerCase();
|
|
614
616
|
}
|
|
615
617
|
function H(e) {
|
|
616
618
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(H) : String(e);
|
|
617
619
|
}
|
|
618
|
-
function
|
|
620
|
+
function on(e) {
|
|
619
621
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
620
622
|
let r;
|
|
621
623
|
for (; r = n.exec(e); )
|
|
622
624
|
t[r[1]] = r[2];
|
|
623
625
|
return t;
|
|
624
626
|
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
}
|
|
628
|
-
function Y(e, t, n, r, s) {
|
|
627
|
+
const an = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
628
|
+
function Q(e, t, n, r, s) {
|
|
629
629
|
if (a.isFunction(r))
|
|
630
630
|
return r.call(this, t, n);
|
|
631
631
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -635,10 +635,10 @@ function Y(e, t, n, r, s) {
|
|
|
635
635
|
return r.test(t);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function cn(e) {
|
|
639
639
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function un(e, t) {
|
|
642
642
|
const n = a.toCamelCase(" " + t);
|
|
643
643
|
["get", "set", "has"].forEach((r) => {
|
|
644
644
|
Object.defineProperty(e, r + n, {
|
|
@@ -655,25 +655,25 @@ let W = class {
|
|
|
655
655
|
}
|
|
656
656
|
set(t, n, r) {
|
|
657
657
|
const s = this;
|
|
658
|
-
function i(c,
|
|
659
|
-
const l =
|
|
658
|
+
function i(c, p, h) {
|
|
659
|
+
const l = B(p);
|
|
660
660
|
if (!l)
|
|
661
661
|
throw new Error("header name must be a non-empty string");
|
|
662
|
-
const
|
|
663
|
-
(!
|
|
662
|
+
const u = a.findKey(s, l);
|
|
663
|
+
(!u || s[u] === void 0 || h === !0 || h === void 0 && s[u] !== !1) && (s[u || p] = H(c));
|
|
664
664
|
}
|
|
665
|
-
const o = (c,
|
|
666
|
-
return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !
|
|
665
|
+
const o = (c, p) => a.forEach(c, (h, l) => i(h, l, p));
|
|
666
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !an(t) ? o(sn(t), n) : t != null && i(n, t, r), this;
|
|
667
667
|
}
|
|
668
668
|
get(t, n) {
|
|
669
|
-
if (t =
|
|
669
|
+
if (t = B(t), t) {
|
|
670
670
|
const r = a.findKey(this, t);
|
|
671
671
|
if (r) {
|
|
672
672
|
const s = this[r];
|
|
673
673
|
if (!n)
|
|
674
674
|
return s;
|
|
675
675
|
if (n === !0)
|
|
676
|
-
return
|
|
676
|
+
return on(s);
|
|
677
677
|
if (a.isFunction(n))
|
|
678
678
|
return n.call(this, s, r);
|
|
679
679
|
if (a.isRegExp(n))
|
|
@@ -683,9 +683,9 @@ let W = class {
|
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
685
|
has(t, n) {
|
|
686
|
-
if (t =
|
|
686
|
+
if (t = B(t), t) {
|
|
687
687
|
const r = a.findKey(this, t);
|
|
688
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
688
|
+
return !!(r && this[r] !== void 0 && (!n || Q(this, this[r], r, n)));
|
|
689
689
|
}
|
|
690
690
|
return !1;
|
|
691
691
|
}
|
|
@@ -693,9 +693,9 @@ let W = class {
|
|
|
693
693
|
const r = this;
|
|
694
694
|
let s = !1;
|
|
695
695
|
function i(o) {
|
|
696
|
-
if (o =
|
|
696
|
+
if (o = B(o), o) {
|
|
697
697
|
const c = a.findKey(r, o);
|
|
698
|
-
c && (!n ||
|
|
698
|
+
c && (!n || Q(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
701
|
return a.isArray(t) ? t.forEach(i) : i(t), s;
|
|
@@ -705,7 +705,7 @@ let W = class {
|
|
|
705
705
|
let r = n.length, s = !1;
|
|
706
706
|
for (; r--; ) {
|
|
707
707
|
const i = n[r];
|
|
708
|
-
(!t ||
|
|
708
|
+
(!t || Q(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
709
709
|
}
|
|
710
710
|
return s;
|
|
711
711
|
}
|
|
@@ -717,7 +717,7 @@ let W = class {
|
|
|
717
717
|
n[o] = H(s), delete n[i];
|
|
718
718
|
return;
|
|
719
719
|
}
|
|
720
|
-
const c = t ?
|
|
720
|
+
const c = t ? cn(i) : String(i).trim();
|
|
721
721
|
c !== i && delete n[i], n[c] = H(s), r[c] = !0;
|
|
722
722
|
}), this;
|
|
723
723
|
}
|
|
@@ -752,33 +752,41 @@ let W = class {
|
|
|
752
752
|
accessors: {}
|
|
753
753
|
}).accessors, s = this.prototype;
|
|
754
754
|
function i(o) {
|
|
755
|
-
const c =
|
|
756
|
-
r[c] || (
|
|
755
|
+
const c = B(o);
|
|
756
|
+
r[c] || (un(s, o), r[c] = !0);
|
|
757
757
|
}
|
|
758
758
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
759
759
|
}
|
|
760
760
|
};
|
|
761
761
|
W.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
762
|
-
a.
|
|
762
|
+
a.reduceDescriptors(W.prototype, ({ value: e }, t) => {
|
|
763
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
764
|
+
return {
|
|
765
|
+
get: () => e,
|
|
766
|
+
set(r) {
|
|
767
|
+
this[n] = r;
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
});
|
|
763
771
|
a.freezeMethods(W);
|
|
764
|
-
const
|
|
765
|
-
function
|
|
766
|
-
const n = this || le, r = t || n, s =
|
|
772
|
+
const O = W;
|
|
773
|
+
function Y(e, t) {
|
|
774
|
+
const n = this || le, r = t || n, s = O.from(r.headers);
|
|
767
775
|
let i = r.data;
|
|
768
776
|
return a.forEach(e, function(c) {
|
|
769
777
|
i = c.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
770
778
|
}), s.normalize(), i;
|
|
771
779
|
}
|
|
772
|
-
function
|
|
780
|
+
function Xe(e) {
|
|
773
781
|
return !!(e && e.__CANCEL__);
|
|
774
782
|
}
|
|
775
|
-
function
|
|
783
|
+
function q(e, t, n) {
|
|
776
784
|
m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
777
785
|
}
|
|
778
|
-
a.inherits(
|
|
786
|
+
a.inherits(q, m, {
|
|
779
787
|
__CANCEL__: !0
|
|
780
788
|
});
|
|
781
|
-
function
|
|
789
|
+
function ln(e, t, n) {
|
|
782
790
|
const r = n.config.validateStatus;
|
|
783
791
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
784
792
|
"Request failed with status code " + n.status,
|
|
@@ -788,47 +796,43 @@ function rn(e, t, n) {
|
|
|
788
796
|
n
|
|
789
797
|
));
|
|
790
798
|
}
|
|
791
|
-
const
|
|
799
|
+
const fn = R.hasStandardBrowserEnv ? (
|
|
792
800
|
// Standard browser envs support document.cookie
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
};
|
|
807
|
-
}()
|
|
801
|
+
{
|
|
802
|
+
write(e, t, n, r, s, i) {
|
|
803
|
+
const o = [e + "=" + encodeURIComponent(t)];
|
|
804
|
+
a.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), a.isString(r) && o.push("path=" + r), a.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
805
|
+
},
|
|
806
|
+
read(e) {
|
|
807
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
808
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
809
|
+
},
|
|
810
|
+
remove(e) {
|
|
811
|
+
this.write(e, "", Date.now() - 864e5);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
808
814
|
) : (
|
|
809
|
-
// Non
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
};
|
|
820
|
-
}()
|
|
815
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
816
|
+
{
|
|
817
|
+
write() {
|
|
818
|
+
},
|
|
819
|
+
read() {
|
|
820
|
+
return null;
|
|
821
|
+
},
|
|
822
|
+
remove() {
|
|
823
|
+
}
|
|
824
|
+
}
|
|
821
825
|
);
|
|
822
|
-
function
|
|
826
|
+
function dn(e) {
|
|
823
827
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
824
828
|
}
|
|
825
|
-
function
|
|
826
|
-
return t ? e.replace(
|
|
829
|
+
function pn(e, t) {
|
|
830
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
827
831
|
}
|
|
828
|
-
function
|
|
829
|
-
return e && !
|
|
832
|
+
function Qe(e, t) {
|
|
833
|
+
return e && !dn(t) ? pn(e, t) : t;
|
|
830
834
|
}
|
|
831
|
-
const
|
|
835
|
+
const hn = R.hasStandardBrowserEnv ? (
|
|
832
836
|
// Standard browser envs have full support of the APIs needed to test
|
|
833
837
|
// whether the request URL is of the same origin as current location.
|
|
834
838
|
function() {
|
|
@@ -860,115 +864,123 @@ const cn = b.isStandardBrowserEnv ? (
|
|
|
860
864
|
};
|
|
861
865
|
}()
|
|
862
866
|
);
|
|
863
|
-
function
|
|
867
|
+
function mn(e) {
|
|
864
868
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
865
869
|
return t && t[1] || "";
|
|
866
870
|
}
|
|
867
|
-
function
|
|
871
|
+
function yn(e, t) {
|
|
868
872
|
e = e || 10;
|
|
869
873
|
const n = new Array(e), r = new Array(e);
|
|
870
874
|
let s = 0, i = 0, o;
|
|
871
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
872
|
-
const
|
|
873
|
-
o || (o =
|
|
874
|
-
let
|
|
875
|
-
for (;
|
|
876
|
-
|
|
877
|
-
if (s = (s + 1) % e, s === i && (i = (i + 1) % e),
|
|
875
|
+
return t = t !== void 0 ? t : 1e3, function(p) {
|
|
876
|
+
const h = Date.now(), l = r[i];
|
|
877
|
+
o || (o = h), n[s] = p, r[s] = h;
|
|
878
|
+
let u = i, w = 0;
|
|
879
|
+
for (; u !== s; )
|
|
880
|
+
w += n[u++], u = u % e;
|
|
881
|
+
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), h - o < t)
|
|
878
882
|
return;
|
|
879
|
-
const
|
|
880
|
-
return
|
|
883
|
+
const b = l && h - l;
|
|
884
|
+
return b ? Math.round(w * 1e3 / b) : void 0;
|
|
881
885
|
};
|
|
882
886
|
}
|
|
883
887
|
function Ae(e, t) {
|
|
884
888
|
let n = 0;
|
|
885
|
-
const r =
|
|
889
|
+
const r = yn(50, 250);
|
|
886
890
|
return (s) => {
|
|
887
|
-
const i = s.loaded, o = s.lengthComputable ? s.total : void 0, c = i - n,
|
|
891
|
+
const i = s.loaded, o = s.lengthComputable ? s.total : void 0, c = i - n, p = r(c), h = i <= o;
|
|
888
892
|
n = i;
|
|
889
893
|
const l = {
|
|
890
894
|
loaded: i,
|
|
891
895
|
total: o,
|
|
892
896
|
progress: o ? i / o : void 0,
|
|
893
897
|
bytes: c,
|
|
894
|
-
rate:
|
|
895
|
-
estimated:
|
|
898
|
+
rate: p || void 0,
|
|
899
|
+
estimated: p && o && h ? (o - i) / p : void 0,
|
|
896
900
|
event: s
|
|
897
901
|
};
|
|
898
902
|
l[t ? "download" : "upload"] = !0, e(l);
|
|
899
903
|
};
|
|
900
904
|
}
|
|
901
|
-
const
|
|
905
|
+
const wn = typeof XMLHttpRequest < "u", gn = wn && function(e) {
|
|
902
906
|
return new Promise(function(n, r) {
|
|
903
907
|
let s = e.data;
|
|
904
|
-
const i =
|
|
905
|
-
let c;
|
|
906
|
-
function
|
|
907
|
-
e.cancelToken && e.cancelToken.unsubscribe(
|
|
908
|
+
const i = O.from(e.headers).normalize();
|
|
909
|
+
let { responseType: o, withXSRFToken: c } = e, p;
|
|
910
|
+
function h() {
|
|
911
|
+
e.cancelToken && e.cancelToken.unsubscribe(p), e.signal && e.signal.removeEventListener("abort", p);
|
|
912
|
+
}
|
|
913
|
+
let l;
|
|
914
|
+
if (a.isFormData(s)) {
|
|
915
|
+
if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
|
|
916
|
+
i.setContentType(!1);
|
|
917
|
+
else if ((l = i.getContentType()) !== !1) {
|
|
918
|
+
const [d, ...g] = l ? l.split(";").map((E) => E.trim()).filter(Boolean) : [];
|
|
919
|
+
i.setContentType([d || "multipart/form-data", ...g].join("; "));
|
|
920
|
+
}
|
|
908
921
|
}
|
|
909
|
-
a.isFormData(s) && (b.isStandardBrowserEnv || b.isStandardBrowserWebWorkerEnv) && i.setContentType(!1);
|
|
910
922
|
let u = new XMLHttpRequest();
|
|
911
923
|
if (e.auth) {
|
|
912
|
-
const
|
|
913
|
-
i.set("Authorization", "Basic " + btoa(
|
|
924
|
+
const d = e.auth.username || "", g = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
925
|
+
i.set("Authorization", "Basic " + btoa(d + ":" + g));
|
|
914
926
|
}
|
|
915
|
-
const
|
|
916
|
-
u.open(e.method.toUpperCase(), Je(
|
|
917
|
-
function
|
|
927
|
+
const w = Qe(e.baseURL, e.url);
|
|
928
|
+
u.open(e.method.toUpperCase(), Je(w, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
|
|
929
|
+
function b() {
|
|
918
930
|
if (!u)
|
|
919
931
|
return;
|
|
920
|
-
const
|
|
932
|
+
const d = O.from(
|
|
921
933
|
"getAllResponseHeaders" in u && u.getAllResponseHeaders()
|
|
922
|
-
),
|
|
934
|
+
), E = {
|
|
923
935
|
data: !o || o === "text" || o === "json" ? u.responseText : u.response,
|
|
924
936
|
status: u.status,
|
|
925
937
|
statusText: u.statusText,
|
|
926
|
-
headers:
|
|
938
|
+
headers: d,
|
|
927
939
|
config: e,
|
|
928
940
|
request: u
|
|
929
941
|
};
|
|
930
|
-
|
|
931
|
-
n(
|
|
932
|
-
}, function(
|
|
933
|
-
r(
|
|
934
|
-
},
|
|
942
|
+
ln(function(_) {
|
|
943
|
+
n(_), h();
|
|
944
|
+
}, function(_) {
|
|
945
|
+
r(_), h();
|
|
946
|
+
}, E), u = null;
|
|
935
947
|
}
|
|
936
|
-
if ("onloadend" in u ? u.onloadend =
|
|
937
|
-
!u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
948
|
+
if ("onloadend" in u ? u.onloadend = b : u.onreadystatechange = function() {
|
|
949
|
+
!u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(b);
|
|
938
950
|
}, u.onabort = function() {
|
|
939
951
|
u && (r(new m("Request aborted", m.ECONNABORTED, e, u)), u = null);
|
|
940
952
|
}, u.onerror = function() {
|
|
941
953
|
r(new m("Network Error", m.ERR_NETWORK, e, u)), u = null;
|
|
942
954
|
}, u.ontimeout = function() {
|
|
943
|
-
let
|
|
944
|
-
const
|
|
945
|
-
e.timeoutErrorMessage && (
|
|
946
|
-
|
|
947
|
-
|
|
955
|
+
let g = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
956
|
+
const E = e.transitional || Me;
|
|
957
|
+
e.timeoutErrorMessage && (g = e.timeoutErrorMessage), r(new m(
|
|
958
|
+
g,
|
|
959
|
+
E.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
948
960
|
e,
|
|
949
961
|
u
|
|
950
962
|
)), u = null;
|
|
951
|
-
},
|
|
952
|
-
const
|
|
953
|
-
|
|
963
|
+
}, R.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && hn(w))) {
|
|
964
|
+
const d = e.xsrfHeaderName && e.xsrfCookieName && fn.read(e.xsrfCookieName);
|
|
965
|
+
d && i.set(e.xsrfHeaderName, d);
|
|
954
966
|
}
|
|
955
|
-
s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(
|
|
956
|
-
u.setRequestHeader(
|
|
957
|
-
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Ae(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Ae(e.onUploadProgress)), (e.cancelToken || e.signal) && (
|
|
958
|
-
u && (r(!
|
|
959
|
-
}, e.cancelToken && e.cancelToken.subscribe(
|
|
960
|
-
const
|
|
961
|
-
if (
|
|
962
|
-
r(new m("Unsupported protocol " +
|
|
967
|
+
s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(g, E) {
|
|
968
|
+
u.setRequestHeader(E, g);
|
|
969
|
+
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Ae(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Ae(e.onUploadProgress)), (e.cancelToken || e.signal) && (p = (d) => {
|
|
970
|
+
u && (r(!d || d.type ? new q(null, e, u) : d), u.abort(), u = null);
|
|
971
|
+
}, e.cancelToken && e.cancelToken.subscribe(p), e.signal && (e.signal.aborted ? p() : e.signal.addEventListener("abort", p)));
|
|
972
|
+
const f = mn(w);
|
|
973
|
+
if (f && R.protocols.indexOf(f) === -1) {
|
|
974
|
+
r(new m("Unsupported protocol " + f + ":", m.ERR_BAD_REQUEST, e));
|
|
963
975
|
return;
|
|
964
976
|
}
|
|
965
977
|
u.send(s || null);
|
|
966
978
|
});
|
|
967
|
-
},
|
|
968
|
-
http:
|
|
969
|
-
xhr:
|
|
979
|
+
}, re = {
|
|
980
|
+
http: Ht,
|
|
981
|
+
xhr: gn
|
|
970
982
|
};
|
|
971
|
-
a.forEach(
|
|
983
|
+
a.forEach(re, (e, t) => {
|
|
972
984
|
if (e) {
|
|
973
985
|
try {
|
|
974
986
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -977,80 +989,91 @@ a.forEach(v, (e, t) => {
|
|
|
977
989
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
978
990
|
}
|
|
979
991
|
});
|
|
980
|
-
const
|
|
992
|
+
const Re = (e) => `- ${e}`, En = (e) => a.isFunction(e) || e === null || e === !1, Ye = {
|
|
981
993
|
getAdapter: (e) => {
|
|
982
994
|
e = a.isArray(e) ? e : [e];
|
|
983
995
|
const { length: t } = e;
|
|
984
996
|
let n, r;
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
997
|
+
const s = {};
|
|
998
|
+
for (let i = 0; i < t; i++) {
|
|
999
|
+
n = e[i];
|
|
1000
|
+
let o;
|
|
1001
|
+
if (r = n, !En(n) && (r = re[(o = String(n)).toLowerCase()], r === void 0))
|
|
1002
|
+
throw new m(`Unknown adapter '${o}'`);
|
|
1003
|
+
if (r)
|
|
1004
|
+
break;
|
|
1005
|
+
s[o || "#" + i] = r;
|
|
1006
|
+
}
|
|
1007
|
+
if (!r) {
|
|
1008
|
+
const i = Object.entries(s).map(
|
|
1009
|
+
([c, p]) => `adapter ${c} ` + (p === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1010
|
+
);
|
|
1011
|
+
let o = t ? i.length > 1 ? `since :
|
|
1012
|
+
` + i.map(Re).join(`
|
|
1013
|
+
`) : " " + Re(i[0]) : "as no adapter specified";
|
|
1014
|
+
throw new m(
|
|
1015
|
+
"There is no suitable adapter to dispatch the request " + o,
|
|
990
1016
|
"ERR_NOT_SUPPORT"
|
|
991
|
-
) : new Error(
|
|
992
|
-
a.hasOwnProp(v, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
|
|
993
1017
|
);
|
|
994
|
-
|
|
995
|
-
throw new TypeError("adapter is not a function");
|
|
1018
|
+
}
|
|
996
1019
|
return r;
|
|
997
1020
|
},
|
|
998
|
-
adapters:
|
|
1021
|
+
adapters: re
|
|
999
1022
|
};
|
|
1000
1023
|
function Z(e) {
|
|
1001
1024
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1002
|
-
throw new
|
|
1025
|
+
throw new q(null, e);
|
|
1003
1026
|
}
|
|
1004
|
-
function
|
|
1005
|
-
return Z(e), e.headers =
|
|
1027
|
+
function Ce(e) {
|
|
1028
|
+
return Z(e), e.headers = O.from(e.headers), e.data = Y.call(
|
|
1006
1029
|
e,
|
|
1007
1030
|
e.transformRequest
|
|
1008
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1009
|
-
return Z(e), r.data =
|
|
1031
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ye.getAdapter(e.adapter || le.adapter)(e).then(function(r) {
|
|
1032
|
+
return Z(e), r.data = Y.call(
|
|
1010
1033
|
e,
|
|
1011
1034
|
e.transformResponse,
|
|
1012
1035
|
r
|
|
1013
|
-
), r.headers =
|
|
1036
|
+
), r.headers = O.from(r.headers), r;
|
|
1014
1037
|
}, function(r) {
|
|
1015
|
-
return
|
|
1038
|
+
return Xe(r) || (Z(e), r && r.response && (r.response.data = Y.call(
|
|
1016
1039
|
e,
|
|
1017
1040
|
e.transformResponse,
|
|
1018
1041
|
r.response
|
|
1019
|
-
), r.response.headers =
|
|
1042
|
+
), r.response.headers = O.from(r.response.headers))), Promise.reject(r);
|
|
1020
1043
|
});
|
|
1021
1044
|
}
|
|
1022
|
-
const
|
|
1023
|
-
function
|
|
1045
|
+
const Oe = (e) => e instanceof O ? e.toJSON() : e;
|
|
1046
|
+
function D(e, t) {
|
|
1024
1047
|
t = t || {};
|
|
1025
1048
|
const n = {};
|
|
1026
|
-
function r(
|
|
1027
|
-
return a.isPlainObject(
|
|
1049
|
+
function r(h, l, u) {
|
|
1050
|
+
return a.isPlainObject(h) && a.isPlainObject(l) ? a.merge.call({ caseless: u }, h, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
1028
1051
|
}
|
|
1029
|
-
function s(
|
|
1052
|
+
function s(h, l, u) {
|
|
1030
1053
|
if (a.isUndefined(l)) {
|
|
1031
|
-
if (!a.isUndefined(
|
|
1032
|
-
return r(void 0,
|
|
1054
|
+
if (!a.isUndefined(h))
|
|
1055
|
+
return r(void 0, h, u);
|
|
1033
1056
|
} else
|
|
1034
|
-
return r(
|
|
1057
|
+
return r(h, l, u);
|
|
1035
1058
|
}
|
|
1036
|
-
function i(
|
|
1059
|
+
function i(h, l) {
|
|
1037
1060
|
if (!a.isUndefined(l))
|
|
1038
1061
|
return r(void 0, l);
|
|
1039
1062
|
}
|
|
1040
|
-
function o(
|
|
1063
|
+
function o(h, l) {
|
|
1041
1064
|
if (a.isUndefined(l)) {
|
|
1042
|
-
if (!a.isUndefined(
|
|
1043
|
-
return r(void 0,
|
|
1065
|
+
if (!a.isUndefined(h))
|
|
1066
|
+
return r(void 0, h);
|
|
1044
1067
|
} else
|
|
1045
1068
|
return r(void 0, l);
|
|
1046
1069
|
}
|
|
1047
|
-
function c(
|
|
1048
|
-
if (
|
|
1049
|
-
return r(
|
|
1050
|
-
if (
|
|
1051
|
-
return r(void 0,
|
|
1070
|
+
function c(h, l, u) {
|
|
1071
|
+
if (u in t)
|
|
1072
|
+
return r(h, l);
|
|
1073
|
+
if (u in e)
|
|
1074
|
+
return r(void 0, h);
|
|
1052
1075
|
}
|
|
1053
|
-
const
|
|
1076
|
+
const p = {
|
|
1054
1077
|
url: i,
|
|
1055
1078
|
method: i,
|
|
1056
1079
|
data: i,
|
|
@@ -1061,6 +1084,7 @@ function F(e, t) {
|
|
|
1061
1084
|
timeout: o,
|
|
1062
1085
|
timeoutMessage: o,
|
|
1063
1086
|
withCredentials: o,
|
|
1087
|
+
withXSRFToken: o,
|
|
1064
1088
|
adapter: o,
|
|
1065
1089
|
responseType: o,
|
|
1066
1090
|
xsrfCookieName: o,
|
|
@@ -1078,23 +1102,23 @@ function F(e, t) {
|
|
|
1078
1102
|
socketPath: o,
|
|
1079
1103
|
responseEncoding: o,
|
|
1080
1104
|
validateStatus: c,
|
|
1081
|
-
headers: (
|
|
1105
|
+
headers: (h, l) => s(Oe(h), Oe(l), !0)
|
|
1082
1106
|
};
|
|
1083
|
-
return a.forEach(Object.keys(
|
|
1084
|
-
const
|
|
1085
|
-
a.isUndefined(
|
|
1107
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1108
|
+
const u = p[l] || s, w = u(e[l], t[l], l);
|
|
1109
|
+
a.isUndefined(w) && u !== c || (n[l] = w);
|
|
1086
1110
|
}), n;
|
|
1087
1111
|
}
|
|
1088
|
-
const
|
|
1112
|
+
const Ze = "1.6.3", fe = {};
|
|
1089
1113
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1090
1114
|
fe[e] = function(r) {
|
|
1091
1115
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1092
1116
|
};
|
|
1093
1117
|
});
|
|
1094
|
-
const
|
|
1118
|
+
const Te = {};
|
|
1095
1119
|
fe.transitional = function(t, n, r) {
|
|
1096
1120
|
function s(i, o) {
|
|
1097
|
-
return "[Axios v" +
|
|
1121
|
+
return "[Axios v" + Ze + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1098
1122
|
}
|
|
1099
1123
|
return (i, o, c) => {
|
|
1100
1124
|
if (t === !1)
|
|
@@ -1102,7 +1126,7 @@ fe.transitional = function(t, n, r) {
|
|
|
1102
1126
|
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
1103
1127
|
m.ERR_DEPRECATED
|
|
1104
1128
|
);
|
|
1105
|
-
return n && !
|
|
1129
|
+
return n && !Te[o] && (Te[o] = !0, console.warn(
|
|
1106
1130
|
s(
|
|
1107
1131
|
o,
|
|
1108
1132
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1110,7 +1134,7 @@ fe.transitional = function(t, n, r) {
|
|
|
1110
1134
|
)), t ? t(i, o, c) : !0;
|
|
1111
1135
|
};
|
|
1112
1136
|
};
|
|
1113
|
-
function
|
|
1137
|
+
function Sn(e, t, n) {
|
|
1114
1138
|
if (typeof e != "object")
|
|
1115
1139
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1116
1140
|
const r = Object.keys(e);
|
|
@@ -1118,20 +1142,20 @@ function pn(e, t, n) {
|
|
|
1118
1142
|
for (; s-- > 0; ) {
|
|
1119
1143
|
const i = r[s], o = t[i];
|
|
1120
1144
|
if (o) {
|
|
1121
|
-
const c = e[i],
|
|
1122
|
-
if (
|
|
1123
|
-
throw new m("option " + i + " must be " +
|
|
1145
|
+
const c = e[i], p = c === void 0 || o(c, i, e);
|
|
1146
|
+
if (p !== !0)
|
|
1147
|
+
throw new m("option " + i + " must be " + p, m.ERR_BAD_OPTION_VALUE);
|
|
1124
1148
|
continue;
|
|
1125
1149
|
}
|
|
1126
1150
|
if (n !== !0)
|
|
1127
1151
|
throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
|
|
1128
1152
|
}
|
|
1129
1153
|
}
|
|
1130
|
-
const
|
|
1131
|
-
assertOptions:
|
|
1154
|
+
const se = {
|
|
1155
|
+
assertOptions: Sn,
|
|
1132
1156
|
validators: fe
|
|
1133
|
-
},
|
|
1134
|
-
let
|
|
1157
|
+
}, N = se.validators;
|
|
1158
|
+
let z = class {
|
|
1135
1159
|
constructor(t) {
|
|
1136
1160
|
this.defaults = t, this.interceptors = {
|
|
1137
1161
|
request: new Se(),
|
|
@@ -1147,71 +1171,73 @@ let V = class {
|
|
|
1147
1171
|
* @returns {Promise} The Promise to be fulfilled
|
|
1148
1172
|
*/
|
|
1149
1173
|
request(t, n) {
|
|
1150
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1174
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = D(this.defaults, n);
|
|
1151
1175
|
const { transitional: r, paramsSerializer: s, headers: i } = n;
|
|
1152
|
-
r !== void 0 &&
|
|
1153
|
-
silentJSONParsing:
|
|
1154
|
-
forcedJSONParsing:
|
|
1155
|
-
clarifyTimeoutError:
|
|
1156
|
-
}, !1), s
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1176
|
+
r !== void 0 && se.assertOptions(r, {
|
|
1177
|
+
silentJSONParsing: N.transitional(N.boolean),
|
|
1178
|
+
forcedJSONParsing: N.transitional(N.boolean),
|
|
1179
|
+
clarifyTimeoutError: N.transitional(N.boolean)
|
|
1180
|
+
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1181
|
+
serialize: s
|
|
1182
|
+
} : se.assertOptions(s, {
|
|
1183
|
+
encode: N.function,
|
|
1184
|
+
serialize: N.function
|
|
1185
|
+
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1186
|
+
let o = i && a.merge(
|
|
1162
1187
|
i.common,
|
|
1163
1188
|
i[n.method]
|
|
1164
|
-
)
|
|
1189
|
+
);
|
|
1190
|
+
i && a.forEach(
|
|
1165
1191
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1166
1192
|
(f) => {
|
|
1167
1193
|
delete i[f];
|
|
1168
1194
|
}
|
|
1169
|
-
), n.headers =
|
|
1195
|
+
), n.headers = O.concat(o, i);
|
|
1170
1196
|
const c = [];
|
|
1171
|
-
let
|
|
1172
|
-
this.interceptors.request.forEach(function(
|
|
1173
|
-
typeof
|
|
1197
|
+
let p = !0;
|
|
1198
|
+
this.interceptors.request.forEach(function(d) {
|
|
1199
|
+
typeof d.runWhen == "function" && d.runWhen(n) === !1 || (p = p && d.synchronous, c.unshift(d.fulfilled, d.rejected));
|
|
1174
1200
|
});
|
|
1175
|
-
const
|
|
1176
|
-
this.interceptors.response.forEach(function(
|
|
1177
|
-
|
|
1201
|
+
const h = [];
|
|
1202
|
+
this.interceptors.response.forEach(function(d) {
|
|
1203
|
+
h.push(d.fulfilled, d.rejected);
|
|
1178
1204
|
});
|
|
1179
|
-
let l,
|
|
1180
|
-
if (!
|
|
1181
|
-
const f = [
|
|
1182
|
-
for (f.unshift.apply(f, c), f.push.apply(f,
|
|
1183
|
-
l = l.then(f[
|
|
1205
|
+
let l, u = 0, w;
|
|
1206
|
+
if (!p) {
|
|
1207
|
+
const f = [Ce.bind(this), void 0];
|
|
1208
|
+
for (f.unshift.apply(f, c), f.push.apply(f, h), w = f.length, l = Promise.resolve(n); u < w; )
|
|
1209
|
+
l = l.then(f[u++], f[u++]);
|
|
1184
1210
|
return l;
|
|
1185
1211
|
}
|
|
1186
|
-
|
|
1187
|
-
let
|
|
1188
|
-
for (
|
|
1189
|
-
const f = c[
|
|
1212
|
+
w = c.length;
|
|
1213
|
+
let b = n;
|
|
1214
|
+
for (u = 0; u < w; ) {
|
|
1215
|
+
const f = c[u++], d = c[u++];
|
|
1190
1216
|
try {
|
|
1191
|
-
|
|
1192
|
-
} catch (
|
|
1193
|
-
|
|
1217
|
+
b = f(b);
|
|
1218
|
+
} catch (g) {
|
|
1219
|
+
d.call(this, g);
|
|
1194
1220
|
break;
|
|
1195
1221
|
}
|
|
1196
1222
|
}
|
|
1197
1223
|
try {
|
|
1198
|
-
l =
|
|
1224
|
+
l = Ce.call(this, b);
|
|
1199
1225
|
} catch (f) {
|
|
1200
1226
|
return Promise.reject(f);
|
|
1201
1227
|
}
|
|
1202
|
-
for (
|
|
1203
|
-
l = l.then(u
|
|
1228
|
+
for (u = 0, w = h.length; u < w; )
|
|
1229
|
+
l = l.then(h[u++], h[u++]);
|
|
1204
1230
|
return l;
|
|
1205
1231
|
}
|
|
1206
1232
|
getUri(t) {
|
|
1207
|
-
t =
|
|
1208
|
-
const n =
|
|
1233
|
+
t = D(this.defaults, t);
|
|
1234
|
+
const n = Qe(t.baseURL, t.url);
|
|
1209
1235
|
return Je(n, t.params, t.paramsSerializer);
|
|
1210
1236
|
}
|
|
1211
1237
|
};
|
|
1212
1238
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1213
|
-
|
|
1214
|
-
return this.request(
|
|
1239
|
+
z.prototype[t] = function(n, r) {
|
|
1240
|
+
return this.request(D(r || {}, {
|
|
1215
1241
|
method: t,
|
|
1216
1242
|
url: n,
|
|
1217
1243
|
data: (r || {}).data
|
|
@@ -1221,7 +1247,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1221
1247
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1222
1248
|
function n(r) {
|
|
1223
1249
|
return function(i, o, c) {
|
|
1224
|
-
return this.request(
|
|
1250
|
+
return this.request(D(c || {}, {
|
|
1225
1251
|
method: t,
|
|
1226
1252
|
headers: r ? {
|
|
1227
1253
|
"Content-Type": "multipart/form-data"
|
|
@@ -1231,10 +1257,10 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1231
1257
|
}));
|
|
1232
1258
|
};
|
|
1233
1259
|
}
|
|
1234
|
-
|
|
1260
|
+
z.prototype[t] = n(), z.prototype[t + "Form"] = n(!0);
|
|
1235
1261
|
});
|
|
1236
|
-
const
|
|
1237
|
-
let
|
|
1262
|
+
const v = z;
|
|
1263
|
+
let bn = class et {
|
|
1238
1264
|
constructor(t) {
|
|
1239
1265
|
if (typeof t != "function")
|
|
1240
1266
|
throw new TypeError("executor must be a function.");
|
|
@@ -1259,7 +1285,7 @@ let mn = class Qe {
|
|
|
1259
1285
|
r.unsubscribe(i);
|
|
1260
1286
|
}, o;
|
|
1261
1287
|
}, t(function(i, o, c) {
|
|
1262
|
-
r.reason || (r.reason = new
|
|
1288
|
+
r.reason || (r.reason = new q(i, o, c), n(r.reason));
|
|
1263
1289
|
});
|
|
1264
1290
|
}
|
|
1265
1291
|
/**
|
|
@@ -1295,23 +1321,23 @@ let mn = class Qe {
|
|
|
1295
1321
|
static source() {
|
|
1296
1322
|
let t;
|
|
1297
1323
|
return {
|
|
1298
|
-
token: new
|
|
1324
|
+
token: new et(function(s) {
|
|
1299
1325
|
t = s;
|
|
1300
1326
|
}),
|
|
1301
1327
|
cancel: t
|
|
1302
1328
|
};
|
|
1303
1329
|
}
|
|
1304
1330
|
};
|
|
1305
|
-
const
|
|
1306
|
-
function
|
|
1331
|
+
const An = bn;
|
|
1332
|
+
function Rn(e) {
|
|
1307
1333
|
return function(n) {
|
|
1308
1334
|
return e.apply(null, n);
|
|
1309
1335
|
};
|
|
1310
1336
|
}
|
|
1311
|
-
function
|
|
1337
|
+
function Cn(e) {
|
|
1312
1338
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1313
1339
|
}
|
|
1314
|
-
const
|
|
1340
|
+
const oe = {
|
|
1315
1341
|
Continue: 100,
|
|
1316
1342
|
SwitchingProtocols: 101,
|
|
1317
1343
|
Processing: 102,
|
|
@@ -1376,82 +1402,84 @@ const se = {
|
|
|
1376
1402
|
NotExtended: 510,
|
|
1377
1403
|
NetworkAuthenticationRequired: 511
|
|
1378
1404
|
};
|
|
1379
|
-
Object.entries(
|
|
1380
|
-
|
|
1405
|
+
Object.entries(oe).forEach(([e, t]) => {
|
|
1406
|
+
oe[t] = e;
|
|
1381
1407
|
});
|
|
1382
|
-
const
|
|
1383
|
-
function
|
|
1384
|
-
const t = new
|
|
1385
|
-
return a.extend(n,
|
|
1386
|
-
return
|
|
1408
|
+
const On = oe;
|
|
1409
|
+
function tt(e) {
|
|
1410
|
+
const t = new v(e), n = Le(v.prototype.request, t);
|
|
1411
|
+
return a.extend(n, v.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1412
|
+
return tt(D(e, s));
|
|
1387
1413
|
}, n;
|
|
1388
1414
|
}
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1415
|
+
const y = tt(le);
|
|
1416
|
+
y.Axios = v;
|
|
1417
|
+
y.CanceledError = q;
|
|
1418
|
+
y.CancelToken = An;
|
|
1419
|
+
y.isCancel = Xe;
|
|
1420
|
+
y.VERSION = Ze;
|
|
1421
|
+
y.toFormData = M;
|
|
1422
|
+
y.AxiosError = m;
|
|
1423
|
+
y.Cancel = y.CanceledError;
|
|
1424
|
+
y.all = function(t) {
|
|
1399
1425
|
return Promise.all(t);
|
|
1400
1426
|
};
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1427
|
+
y.spread = Rn;
|
|
1428
|
+
y.isAxiosError = Cn;
|
|
1429
|
+
y.mergeConfig = D;
|
|
1430
|
+
y.AxiosHeaders = O;
|
|
1431
|
+
y.formToJSON = (e) => Ge(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1432
|
+
y.getAdapter = Ye.getAdapter;
|
|
1433
|
+
y.HttpStatusCode = On;
|
|
1434
|
+
y.default = y;
|
|
1435
|
+
const nt = y, {
|
|
1436
|
+
Axios: ur,
|
|
1410
1437
|
AxiosError: ee,
|
|
1411
|
-
CanceledError:
|
|
1412
|
-
isCancel:
|
|
1413
|
-
CancelToken:
|
|
1414
|
-
VERSION:
|
|
1415
|
-
all:
|
|
1416
|
-
Cancel:
|
|
1417
|
-
isAxiosError:
|
|
1418
|
-
spread:
|
|
1419
|
-
toFormData:
|
|
1420
|
-
AxiosHeaders:
|
|
1421
|
-
HttpStatusCode:
|
|
1422
|
-
formToJSON:
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1438
|
+
CanceledError: lr,
|
|
1439
|
+
isCancel: fr,
|
|
1440
|
+
CancelToken: dr,
|
|
1441
|
+
VERSION: pr,
|
|
1442
|
+
all: hr,
|
|
1443
|
+
Cancel: mr,
|
|
1444
|
+
isAxiosError: yr,
|
|
1445
|
+
spread: wr,
|
|
1446
|
+
toFormData: gr,
|
|
1447
|
+
AxiosHeaders: Er,
|
|
1448
|
+
HttpStatusCode: Sr,
|
|
1449
|
+
formToJSON: br,
|
|
1450
|
+
getAdapter: Ar,
|
|
1451
|
+
mergeConfig: Rr
|
|
1452
|
+
} = nt;
|
|
1453
|
+
class Pe extends Error {
|
|
1426
1454
|
constructor(n) {
|
|
1427
1455
|
super(n.join(", "));
|
|
1428
|
-
|
|
1456
|
+
S(this, "errors");
|
|
1429
1457
|
this.name = "ValidationError", this.errors = n;
|
|
1430
1458
|
}
|
|
1431
1459
|
}
|
|
1432
|
-
class
|
|
1460
|
+
class _e extends Error {
|
|
1433
1461
|
constructor(n) {
|
|
1434
1462
|
super("Address already registered.");
|
|
1435
|
-
|
|
1463
|
+
S(this, "address");
|
|
1436
1464
|
this.name = "AddressInUseError", this.address = n;
|
|
1437
1465
|
}
|
|
1438
1466
|
}
|
|
1439
|
-
class
|
|
1467
|
+
class Ne extends Error {
|
|
1440
1468
|
constructor(n) {
|
|
1441
1469
|
super("Code already registered.");
|
|
1442
|
-
|
|
1470
|
+
S(this, "code");
|
|
1443
1471
|
this.name = "CodeInUseError", this.code = n;
|
|
1444
1472
|
}
|
|
1445
1473
|
}
|
|
1446
|
-
class
|
|
1474
|
+
class xe extends Error {
|
|
1447
1475
|
constructor() {
|
|
1448
1476
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1449
1477
|
}
|
|
1450
1478
|
}
|
|
1451
|
-
class
|
|
1479
|
+
class Tn {
|
|
1452
1480
|
constructor(t) {
|
|
1453
|
-
|
|
1454
|
-
|
|
1481
|
+
S(this, "httpClient");
|
|
1482
|
+
S(this, "_debug");
|
|
1455
1483
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1456
1484
|
}
|
|
1457
1485
|
async create(t, n, r) {
|
|
@@ -1468,9 +1496,9 @@ class Sn {
|
|
|
1468
1496
|
const o = (s = i.response) == null ? void 0 : s.data;
|
|
1469
1497
|
if (typeof (o == null ? void 0 : o.message) == "string") {
|
|
1470
1498
|
const c = o.message.toLowerCase();
|
|
1471
|
-
throw c == "invalid signature" ? new
|
|
1499
|
+
throw c == "invalid signature" ? new xe() : c == "address in use" ? new _e(t) : c == "code in use" ? new Ne(n) : new Error(c);
|
|
1472
1500
|
} else if ((o == null ? void 0 : o.message) instanceof Array)
|
|
1473
|
-
throw new
|
|
1501
|
+
throw new Pe(o.message);
|
|
1474
1502
|
}
|
|
1475
1503
|
throw i;
|
|
1476
1504
|
}
|
|
@@ -1488,9 +1516,9 @@ class Sn {
|
|
|
1488
1516
|
const o = (s = i.response) == null ? void 0 : s.data;
|
|
1489
1517
|
if (typeof (o == null ? void 0 : o.message) == "string") {
|
|
1490
1518
|
const c = o.message.toLowerCase();
|
|
1491
|
-
throw c == "invalid signature" ? new
|
|
1519
|
+
throw c == "invalid signature" ? new xe() : c == "address in use" ? new _e(t) : c == "code in use" ? new Ne(n) : new Error(c);
|
|
1492
1520
|
} else if ((o == null ? void 0 : o.message) instanceof Array)
|
|
1493
|
-
throw new
|
|
1521
|
+
throw new Pe(o.message);
|
|
1494
1522
|
}
|
|
1495
1523
|
throw i;
|
|
1496
1524
|
}
|
|
@@ -1511,9 +1539,9 @@ class Sn {
|
|
|
1511
1539
|
}
|
|
1512
1540
|
}
|
|
1513
1541
|
}
|
|
1514
|
-
class
|
|
1542
|
+
class Pn {
|
|
1515
1543
|
constructor(t) {
|
|
1516
|
-
|
|
1544
|
+
S(this, "httpClient");
|
|
1517
1545
|
this.httpClient = t.httpClient;
|
|
1518
1546
|
}
|
|
1519
1547
|
async getAll() {
|
|
@@ -1521,11 +1549,11 @@ class bn {
|
|
|
1521
1549
|
return t;
|
|
1522
1550
|
}
|
|
1523
1551
|
}
|
|
1524
|
-
const
|
|
1525
|
-
class
|
|
1552
|
+
const Fe = "fuul.sent", _n = 60;
|
|
1553
|
+
class Nn {
|
|
1526
1554
|
constructor(t) {
|
|
1527
|
-
|
|
1528
|
-
|
|
1555
|
+
S(this, "debug");
|
|
1556
|
+
S(this, "httpClient");
|
|
1529
1557
|
this.httpClient = t.httpClient, this.debug = !!t.debug;
|
|
1530
1558
|
}
|
|
1531
1559
|
async sendEvent(t) {
|
|
@@ -1536,37 +1564,37 @@ class Rn {
|
|
|
1536
1564
|
await this.httpClient.post("events", t), this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
|
|
1537
1565
|
}
|
|
1538
1566
|
isDuplicate(t) {
|
|
1539
|
-
const n = `${
|
|
1567
|
+
const n = `${Fe}_${t.name}`, r = localStorage.getItem(n);
|
|
1540
1568
|
if (!r)
|
|
1541
1569
|
return !1;
|
|
1542
1570
|
const s = JSON.parse(r);
|
|
1543
|
-
if (this.getCurrentTimestamp() - s.timestamp >
|
|
1571
|
+
if (this.getCurrentTimestamp() - s.timestamp > _n)
|
|
1544
1572
|
return !1;
|
|
1545
|
-
let
|
|
1546
|
-
t.metadata && (
|
|
1547
|
-
let
|
|
1548
|
-
return t.args && s.args && (
|
|
1573
|
+
let p = !1;
|
|
1574
|
+
t.metadata && (p = 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 && s.signature === t.signature && s.signature_message === t.signature_message);
|
|
1575
|
+
let h = !1;
|
|
1576
|
+
return t.args && s.args && (h = s.args.page === t.args.page), h && p;
|
|
1549
1577
|
}
|
|
1550
1578
|
getCurrentTimestamp() {
|
|
1551
1579
|
return Date.now() / 1e3;
|
|
1552
1580
|
}
|
|
1553
1581
|
saveSentEvent(t) {
|
|
1554
|
-
const n = `${
|
|
1582
|
+
const n = `${Fe}_${t.name}`, r = this.getCurrentTimestamp(), s = { ...t, timestamp: r };
|
|
1555
1583
|
localStorage.setItem(n, JSON.stringify(s));
|
|
1556
1584
|
}
|
|
1557
1585
|
}
|
|
1558
|
-
const
|
|
1559
|
-
version:
|
|
1586
|
+
const xn = "3.4.0", Fn = {
|
|
1587
|
+
version: xn
|
|
1560
1588
|
};
|
|
1561
|
-
class
|
|
1589
|
+
class Dn {
|
|
1562
1590
|
constructor(t) {
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
this.client =
|
|
1591
|
+
S(this, "client");
|
|
1592
|
+
S(this, "queryParams");
|
|
1593
|
+
this.client = nt.create({
|
|
1566
1594
|
...t,
|
|
1567
1595
|
headers: {
|
|
1568
1596
|
Authorization: `Bearer ${t.apiKey}`,
|
|
1569
|
-
"X-Fuul-Sdk-Version":
|
|
1597
|
+
"X-Fuul-Sdk-Version": Fn.version
|
|
1570
1598
|
}
|
|
1571
1599
|
}), this.queryParams = t.queryParams ? this.buildQueryParams(t.queryParams) : "";
|
|
1572
1600
|
}
|
|
@@ -1589,22 +1617,22 @@ class Tn {
|
|
|
1589
1617
|
return this.client.delete(t + this.queryParams);
|
|
1590
1618
|
}
|
|
1591
1619
|
}
|
|
1592
|
-
const
|
|
1593
|
-
class
|
|
1620
|
+
const De = "/payouts";
|
|
1621
|
+
class Un {
|
|
1594
1622
|
constructor(t) {
|
|
1595
|
-
|
|
1596
|
-
|
|
1623
|
+
S(this, "httpClient");
|
|
1624
|
+
S(this, "_debug");
|
|
1597
1625
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1598
1626
|
}
|
|
1599
1627
|
async getProjectPayoutsLeaderboard(t) {
|
|
1600
|
-
return (await this.httpClient.get(`${
|
|
1628
|
+
return (await this.httpClient.get(`${De}/leaderboard`, t)).data;
|
|
1601
1629
|
}
|
|
1602
1630
|
async getUserPayouts(t) {
|
|
1603
|
-
return (await this.httpClient.get(
|
|
1631
|
+
return (await this.httpClient.get(De, t)).data;
|
|
1604
1632
|
}
|
|
1605
1633
|
}
|
|
1606
|
-
let
|
|
1607
|
-
const
|
|
1634
|
+
let Ln = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, n) => (n &= 63, n < 36 ? t += n.toString(36) : n < 62 ? t += (n - 26).toString(36).toUpperCase() : n > 62 ? t += "-" : t += "_", t), "");
|
|
1635
|
+
const Bn = "fuul.tracking_id", In = ["google.com", "bing.com", "yahoo.com"], de = () => vn(Bn, () => Ln()), Ue = () => x("af") || x("referrer"), jn = () => document.referrer, kn = () => zn(), qn = () => x("category"), $n = () => x("title"), Hn = () => x("tag"), vn = (e, t) => {
|
|
1608
1636
|
const n = localStorage.getItem(e);
|
|
1609
1637
|
if (n)
|
|
1610
1638
|
return n;
|
|
@@ -1612,35 +1640,35 @@ const Nn = "fuul.tracking_id", xn = ["google.com", "bing.com", "yahoo.com"], de
|
|
|
1612
1640
|
const r = t();
|
|
1613
1641
|
return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
|
|
1614
1642
|
}
|
|
1615
|
-
},
|
|
1616
|
-
const e =
|
|
1643
|
+
}, x = (e) => new URLSearchParams(window.location.search).get(e), zn = () => {
|
|
1644
|
+
const e = x("source"), t = x("af") || x("referrer");
|
|
1617
1645
|
if (e)
|
|
1618
1646
|
return e;
|
|
1619
1647
|
if (t)
|
|
1620
1648
|
return "affiliate";
|
|
1621
|
-
const n =
|
|
1622
|
-
return n &&
|
|
1623
|
-
},
|
|
1649
|
+
const n = Vn(document.referrer);
|
|
1650
|
+
return n && In.includes(n) ? "organic" : "direct";
|
|
1651
|
+
}, Vn = (e) => {
|
|
1624
1652
|
var t;
|
|
1625
1653
|
try {
|
|
1626
1654
|
return (t = new URL(e).hostname) == null ? void 0 : t.split(".").slice(-2).join(".");
|
|
1627
1655
|
} catch {
|
|
1628
1656
|
return null;
|
|
1629
1657
|
}
|
|
1630
|
-
},
|
|
1631
|
-
let
|
|
1632
|
-
function
|
|
1633
|
-
|
|
1634
|
-
e.baseApiUrl ??
|
|
1658
|
+
}, Kn = "https://api.fuul.xyz/api/v1/";
|
|
1659
|
+
let F = !1, ie = !1, pe, I, rt, L, G, he;
|
|
1660
|
+
function Jn(e) {
|
|
1661
|
+
F = !!e.debug, !ie && (pe = e.apiKey, sr(), I = or(
|
|
1662
|
+
e.baseApiUrl ?? Kn,
|
|
1635
1663
|
e.defaultQueryParams ?? {}
|
|
1636
|
-
),
|
|
1664
|
+
), rt = new Pn({ httpClient: I, debug: F }), G = new Nn({ httpClient: I, debug: F }), L = new Tn({ httpClient: I, debug: F }), he = new Un({ httpClient: I, debug: F }), ie = !0, F && console.debug("Fuul SDK: init() complete"));
|
|
1637
1665
|
}
|
|
1638
|
-
function
|
|
1639
|
-
if (!
|
|
1666
|
+
function T() {
|
|
1667
|
+
if (!ie)
|
|
1640
1668
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
1641
1669
|
}
|
|
1642
|
-
async function
|
|
1643
|
-
|
|
1670
|
+
async function Mn(e, t) {
|
|
1671
|
+
T(), me();
|
|
1644
1672
|
const n = {
|
|
1645
1673
|
name: e,
|
|
1646
1674
|
args: t ?? {},
|
|
@@ -1650,8 +1678,8 @@ async function Hn(e, t) {
|
|
|
1650
1678
|
};
|
|
1651
1679
|
await G.sendEvent(n);
|
|
1652
1680
|
}
|
|
1653
|
-
async function
|
|
1654
|
-
|
|
1681
|
+
async function Wn(e) {
|
|
1682
|
+
T(), me();
|
|
1655
1683
|
const t = {
|
|
1656
1684
|
name: "pageview",
|
|
1657
1685
|
args: {
|
|
@@ -1660,19 +1688,19 @@ async function vn(e) {
|
|
|
1660
1688
|
},
|
|
1661
1689
|
metadata: {
|
|
1662
1690
|
tracking_id: de(),
|
|
1663
|
-
referrer_url:
|
|
1664
|
-
source:
|
|
1665
|
-
affiliate_id:
|
|
1666
|
-
referrer:
|
|
1667
|
-
category:
|
|
1668
|
-
title:
|
|
1669
|
-
tag:
|
|
1691
|
+
referrer_url: jn(),
|
|
1692
|
+
source: kn(),
|
|
1693
|
+
affiliate_id: Ue() ?? void 0,
|
|
1694
|
+
referrer: Ue() ?? void 0,
|
|
1695
|
+
category: qn() ?? void 0,
|
|
1696
|
+
title: $n() ?? void 0,
|
|
1697
|
+
tag: Hn() ?? void 0
|
|
1670
1698
|
}
|
|
1671
1699
|
};
|
|
1672
1700
|
await G.sendEvent(t);
|
|
1673
1701
|
}
|
|
1674
|
-
async function
|
|
1675
|
-
|
|
1702
|
+
async function Gn(e) {
|
|
1703
|
+
T(), me();
|
|
1676
1704
|
const t = {
|
|
1677
1705
|
name: "connect_wallet",
|
|
1678
1706
|
args: {},
|
|
@@ -1682,68 +1710,68 @@ async function zn(e) {
|
|
|
1682
1710
|
};
|
|
1683
1711
|
e != null && e.address && (t.user_address = e.address), e != null && e.signature && (t.signature = e == null ? void 0 : e.signature, t.signature_message = e == null ? void 0 : e.message), await G.sendEvent(t);
|
|
1684
1712
|
}
|
|
1685
|
-
async function
|
|
1686
|
-
|
|
1713
|
+
async function Xn(e, t, n) {
|
|
1714
|
+
T(), await L.create(e, t, n);
|
|
1687
1715
|
}
|
|
1688
|
-
async function
|
|
1689
|
-
|
|
1716
|
+
async function Qn(e, t, n) {
|
|
1717
|
+
T(), await L.update(e, t, n);
|
|
1690
1718
|
}
|
|
1691
|
-
async function
|
|
1692
|
-
return
|
|
1719
|
+
async function Yn(e) {
|
|
1720
|
+
return T(), await L.getCode(e);
|
|
1693
1721
|
}
|
|
1694
|
-
async function
|
|
1695
|
-
return
|
|
1722
|
+
async function Zn(e) {
|
|
1723
|
+
return T(), await L.isCodeFree(e);
|
|
1696
1724
|
}
|
|
1697
|
-
async function
|
|
1698
|
-
|
|
1699
|
-
const r = await
|
|
1725
|
+
async function er(e, t, n) {
|
|
1726
|
+
T();
|
|
1727
|
+
const r = await L.getCode(t), s = new URLSearchParams({
|
|
1700
1728
|
af: r ?? t
|
|
1701
1729
|
});
|
|
1702
1730
|
return n != null && n.title && s.append("af_title", n.title), n != null && n.format && s.append("af_format", n.format), n != null && n.place && s.append("af_place", n.place), `${e}?${s.toString()}`;
|
|
1703
1731
|
}
|
|
1704
|
-
function
|
|
1705
|
-
return
|
|
1732
|
+
function tr(e) {
|
|
1733
|
+
return he.getProjectPayoutsLeaderboard(e);
|
|
1706
1734
|
}
|
|
1707
|
-
function
|
|
1708
|
-
return
|
|
1735
|
+
function nr(e) {
|
|
1736
|
+
return he.getUserPayouts(e);
|
|
1709
1737
|
}
|
|
1710
|
-
async function
|
|
1711
|
-
return
|
|
1738
|
+
async function rr() {
|
|
1739
|
+
return T(), rt.getAll();
|
|
1712
1740
|
}
|
|
1713
1741
|
function me() {
|
|
1714
1742
|
if (typeof window > "u" || typeof document > "u")
|
|
1715
1743
|
throw new Error("Fuul SDK: Browser context required");
|
|
1716
1744
|
}
|
|
1717
|
-
function
|
|
1718
|
-
if (!
|
|
1745
|
+
function sr() {
|
|
1746
|
+
if (!pe)
|
|
1719
1747
|
throw new Error("Fuul SDK: Invalid API key");
|
|
1720
1748
|
}
|
|
1721
|
-
function
|
|
1722
|
-
return new
|
|
1749
|
+
function or(e, t) {
|
|
1750
|
+
return new Dn({
|
|
1723
1751
|
baseURL: e,
|
|
1724
1752
|
timeout: 1e4,
|
|
1725
|
-
apiKey:
|
|
1753
|
+
apiKey: pe,
|
|
1726
1754
|
queryParams: t
|
|
1727
1755
|
});
|
|
1728
1756
|
}
|
|
1729
|
-
const
|
|
1730
|
-
init:
|
|
1731
|
-
sendEvent:
|
|
1732
|
-
sendPageview:
|
|
1733
|
-
sendConnectWallet:
|
|
1734
|
-
generateTrackingLink:
|
|
1735
|
-
getConversions:
|
|
1736
|
-
createAffiliateCode:
|
|
1737
|
-
updateAffiliateCode:
|
|
1738
|
-
getAffiliateCode:
|
|
1739
|
-
isAffiliateCodeFree:
|
|
1740
|
-
getUserPayouts:
|
|
1741
|
-
getProjectPayoutsLeaderboard:
|
|
1757
|
+
const Cr = {
|
|
1758
|
+
init: Jn,
|
|
1759
|
+
sendEvent: Mn,
|
|
1760
|
+
sendPageview: Wn,
|
|
1761
|
+
sendConnectWallet: Gn,
|
|
1762
|
+
generateTrackingLink: er,
|
|
1763
|
+
getConversions: rr,
|
|
1764
|
+
createAffiliateCode: Xn,
|
|
1765
|
+
updateAffiliateCode: Qn,
|
|
1766
|
+
getAffiliateCode: Yn,
|
|
1767
|
+
isAffiliateCodeFree: Zn,
|
|
1768
|
+
getUserPayouts: nr,
|
|
1769
|
+
getProjectPayoutsLeaderboard: tr
|
|
1742
1770
|
};
|
|
1743
1771
|
export {
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1772
|
+
_e as AddressInUseError,
|
|
1773
|
+
Ne as CodeInUseError,
|
|
1774
|
+
Cr as Fuul,
|
|
1775
|
+
xe as InvalidSignatureError,
|
|
1776
|
+
Pe as ValidationError
|
|
1749
1777
|
};
|