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