@fuul/sdk 4.10.1 → 4.11.1
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/ConversionService.d.ts.map +1 -1
- package/dist/EventService.d.ts.map +1 -1
- package/dist/HttpClient.d.ts.map +1 -1
- package/dist/affiliates/AffiliateService.d.ts +2 -2
- package/dist/affiliates/AffiliateService.d.ts.map +1 -1
- package/dist/affiliates/errors.d.ts.map +1 -1
- package/dist/audiences/AudienceService.d.ts +2 -2
- package/dist/audiences/AudienceService.d.ts.map +1 -1
- package/dist/core.d.ts +24 -12
- package/dist/core.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1126 -854
- package/dist/index.umd.js +6 -5
- package/dist/leaderboard/LeaderboardService.d.ts +2 -2
- package/dist/leaderboard/LeaderboardService.d.ts.map +1 -1
- package/dist/payouts/PayoutService.d.ts.map +1 -1
- package/dist/release.json.d.ts +4 -0
- package/dist/tracking.d.ts.map +1 -1
- 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/dist/user/UserService.d.ts.map +1 -1
- package/dist/user/types/index.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
1
|
+
var Rt = Object.defineProperty;
|
|
2
|
+
var At = (e, t, n) => t in e ? Rt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var R = (e, t, n) => At(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
function Ge(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: Tt } = Object.prototype, { getPrototypeOf: Ee } = Object, te = /* @__PURE__ */ ((e) => (t) => {
|
|
10
|
+
const n = Tt.call(t);
|
|
11
11
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
13
|
-
function
|
|
14
|
-
return e !== null && !
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => te(t) === e), ne = (e) => (t) => typeof t === e, { isArray: j } = Array, J = ne("undefined");
|
|
13
|
+
function Ot(e) {
|
|
14
|
+
return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
function
|
|
16
|
+
const Xe = P("ArrayBuffer");
|
|
17
|
+
function _t(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 && Xe(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
21
|
+
const Pt = ne("string"), _ = ne("function"), Ye = ne("number"), re = (e) => e !== null && typeof e == "object", xt = (e) => e === !0 || e === !1, Y = (e) => {
|
|
22
|
+
if (te(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
|
-
const t =
|
|
24
|
+
const t = Ee(e);
|
|
25
25
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
26
|
-
},
|
|
26
|
+
}, Nt = P("Date"), Ut = P("File"), Lt = P("Blob"), Ft = P("FileList"), Dt = (e) => re(e) && _(e.pipe), Bt = (e) => {
|
|
27
27
|
let t;
|
|
28
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
29
|
-
t === "object" &&
|
|
30
|
-
},
|
|
31
|
-
function
|
|
28
|
+
return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = te(e)) === "formdata" || // detect form-data instance
|
|
29
|
+
t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
|
|
30
|
+
}, vt = P("URLSearchParams"), [It, kt, qt, jt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), $t = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
31
|
+
function M(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]), j(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 Qe(e, t) {
|
|
46
46
|
t = t.toLowerCase();
|
|
47
47
|
const n = Object.keys(e);
|
|
48
48
|
let r = n.length, s;
|
|
@@ -51,79 +51,75 @@ function ve(e, t) {
|
|
|
51
51
|
return s;
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
function
|
|
56
|
-
const { caseless: e } =
|
|
57
|
-
const
|
|
58
|
-
|
|
54
|
+
const v = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ze = (e) => !J(e) && e !== v;
|
|
55
|
+
function de() {
|
|
56
|
+
const { caseless: e } = Ze(this) && this || {}, t = {}, n = (r, s) => {
|
|
57
|
+
const o = e && Qe(t, s) || s;
|
|
58
|
+
Y(t[o]) && Y(r) ? t[o] = de(t[o], r) : Y(r) ? t[o] = de({}, r) : j(r) ? t[o] = r.slice() : t[o] = r;
|
|
59
59
|
};
|
|
60
60
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
61
|
-
arguments[r] &&
|
|
61
|
+
arguments[r] && M(arguments[r], n);
|
|
62
62
|
return t;
|
|
63
63
|
}
|
|
64
|
-
const
|
|
65
|
-
n &&
|
|
66
|
-
}, { allOwnKeys: r }), e),
|
|
64
|
+
const Ht = (e, t, n, { allOwnKeys: r } = {}) => (M(t, (s, o) => {
|
|
65
|
+
n && _(s) ? e[o] = Ge(s, n) : e[o] = s;
|
|
66
|
+
}, { allOwnKeys: r }), e), zt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Vt = (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
|
+
}, Kt = (e, t, n, r) => {
|
|
71
|
+
let s, o, i;
|
|
72
72
|
const c = {};
|
|
73
|
-
if (t = t || {}, e == null)
|
|
74
|
-
return t;
|
|
73
|
+
if (t = t || {}, e == null) return t;
|
|
75
74
|
do {
|
|
76
|
-
for (s = Object.getOwnPropertyNames(e),
|
|
77
|
-
|
|
78
|
-
e = n !== !1 &&
|
|
75
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
76
|
+
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
77
|
+
e = n !== !1 && Ee(e);
|
|
79
78
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
80
79
|
return t;
|
|
81
|
-
},
|
|
80
|
+
}, Jt = (e, t, n) => {
|
|
82
81
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
83
82
|
const r = e.indexOf(t, n);
|
|
84
83
|
return r !== -1 && r === n;
|
|
85
|
-
},
|
|
86
|
-
if (!e)
|
|
87
|
-
|
|
88
|
-
if (D(e))
|
|
89
|
-
return e;
|
|
84
|
+
}, Mt = (e) => {
|
|
85
|
+
if (!e) return null;
|
|
86
|
+
if (j(e)) return e;
|
|
90
87
|
let t = e.length;
|
|
91
|
-
if (!
|
|
92
|
-
return null;
|
|
88
|
+
if (!Ye(t)) return null;
|
|
93
89
|
const n = new Array(t);
|
|
94
90
|
for (; t-- > 0; )
|
|
95
91
|
n[t] = e[t];
|
|
96
92
|
return n;
|
|
97
|
-
},
|
|
93
|
+
}, Wt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ee(Uint8Array)), Gt = (e, t) => {
|
|
98
94
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
99
95
|
let s;
|
|
100
96
|
for (; (s = r.next()) && !s.done; ) {
|
|
101
|
-
const
|
|
102
|
-
t.call(e,
|
|
97
|
+
const o = s.value;
|
|
98
|
+
t.call(e, o[0], o[1]);
|
|
103
99
|
}
|
|
104
|
-
},
|
|
100
|
+
}, Xt = (e, t) => {
|
|
105
101
|
let n;
|
|
106
102
|
const r = [];
|
|
107
103
|
for (; (n = e.exec(t)) !== null; )
|
|
108
104
|
r.push(n);
|
|
109
105
|
return r;
|
|
110
|
-
},
|
|
106
|
+
}, Yt = P("HTMLFormElement"), Qt = (e) => e.toLowerCase().replace(
|
|
111
107
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
112
108
|
function(n, r, s) {
|
|
113
109
|
return r.toUpperCase() + s;
|
|
114
110
|
}
|
|
115
|
-
),
|
|
111
|
+
), xe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Zt = P("RegExp"), et = (e, t) => {
|
|
116
112
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
117
|
-
|
|
118
|
-
let
|
|
119
|
-
(
|
|
113
|
+
M(n, (s, o) => {
|
|
114
|
+
let i;
|
|
115
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
120
116
|
}), Object.defineProperties(e, r);
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
if (
|
|
117
|
+
}, en = (e) => {
|
|
118
|
+
et(e, (t, n) => {
|
|
119
|
+
if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
124
120
|
return !1;
|
|
125
121
|
const r = e[n];
|
|
126
|
-
if (
|
|
122
|
+
if (_(r)) {
|
|
127
123
|
if (t.enumerable = !1, "writable" in t) {
|
|
128
124
|
t.writable = !1;
|
|
129
125
|
return;
|
|
@@ -133,101 +129,114 @@ const Rt = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
|
133
129
|
});
|
|
134
130
|
}
|
|
135
131
|
});
|
|
136
|
-
},
|
|
132
|
+
}, tn = (e, t) => {
|
|
137
133
|
const n = {}, r = (s) => {
|
|
138
|
-
s.forEach((
|
|
139
|
-
n[
|
|
134
|
+
s.forEach((o) => {
|
|
135
|
+
n[o] = !0;
|
|
140
136
|
});
|
|
141
137
|
};
|
|
142
|
-
return
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
DIGIT:
|
|
146
|
-
ALPHA:
|
|
147
|
-
ALPHA_DIGIT:
|
|
148
|
-
},
|
|
138
|
+
return j(e) ? r(e) : r(String(e).split(t)), n;
|
|
139
|
+
}, nn = () => {
|
|
140
|
+
}, rn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, ce = "abcdefghijklmnopqrstuvwxyz", Ne = "0123456789", tt = {
|
|
141
|
+
DIGIT: Ne,
|
|
142
|
+
ALPHA: ce,
|
|
143
|
+
ALPHA_DIGIT: ce + ce.toUpperCase() + Ne
|
|
144
|
+
}, sn = (e = 16, t = tt.ALPHA_DIGIT) => {
|
|
149
145
|
let n = "";
|
|
150
146
|
const { length: r } = t;
|
|
151
147
|
for (; e--; )
|
|
152
148
|
n += t[Math.random() * r | 0];
|
|
153
149
|
return n;
|
|
154
150
|
};
|
|
155
|
-
function
|
|
156
|
-
return !!(e &&
|
|
151
|
+
function on(e) {
|
|
152
|
+
return !!(e && _(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
157
153
|
}
|
|
158
|
-
const
|
|
154
|
+
const an = (e) => {
|
|
159
155
|
const t = new Array(10), n = (r, s) => {
|
|
160
|
-
if (
|
|
156
|
+
if (re(r)) {
|
|
161
157
|
if (t.indexOf(r) >= 0)
|
|
162
158
|
return;
|
|
163
159
|
if (!("toJSON" in r)) {
|
|
164
160
|
t[s] = r;
|
|
165
|
-
const
|
|
166
|
-
return
|
|
167
|
-
const
|
|
168
|
-
!
|
|
169
|
-
}), t[s] = void 0,
|
|
161
|
+
const o = j(r) ? [] : {};
|
|
162
|
+
return M(r, (i, c) => {
|
|
163
|
+
const f = n(i, s + 1);
|
|
164
|
+
!J(f) && (o[c] = f);
|
|
165
|
+
}), t[s] = void 0, o;
|
|
170
166
|
}
|
|
171
167
|
}
|
|
172
168
|
return r;
|
|
173
169
|
};
|
|
174
170
|
return n(e, 0);
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
171
|
+
}, cn = P("AsyncFunction"), un = (e) => e && (re(e) || _(e)) && _(e.then) && _(e.catch), nt = ((e, t) => e ? setImmediate : t ? ((n, r) => (v.addEventListener("message", ({ source: s, data: o }) => {
|
|
172
|
+
s === v && o === n && r.length && r.shift()();
|
|
173
|
+
}, !1), (s) => {
|
|
174
|
+
r.push(s), v.postMessage(n, "*");
|
|
175
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
176
|
+
typeof setImmediate == "function",
|
|
177
|
+
_(v.postMessage)
|
|
178
|
+
), ln = typeof queueMicrotask < "u" ? queueMicrotask.bind(v) : typeof process < "u" && process.nextTick || nt, a = {
|
|
179
|
+
isArray: j,
|
|
180
|
+
isArrayBuffer: Xe,
|
|
181
|
+
isBuffer: Ot,
|
|
182
|
+
isFormData: Bt,
|
|
183
|
+
isArrayBufferView: _t,
|
|
184
|
+
isString: Pt,
|
|
185
|
+
isNumber: Ye,
|
|
186
|
+
isBoolean: xt,
|
|
187
|
+
isObject: re,
|
|
188
|
+
isPlainObject: Y,
|
|
189
|
+
isReadableStream: It,
|
|
190
|
+
isRequest: kt,
|
|
191
|
+
isResponse: qt,
|
|
192
|
+
isHeaders: jt,
|
|
193
|
+
isUndefined: J,
|
|
194
|
+
isDate: Nt,
|
|
195
|
+
isFile: Ut,
|
|
196
|
+
isBlob: Lt,
|
|
197
|
+
isRegExp: Zt,
|
|
198
|
+
isFunction: _,
|
|
199
|
+
isStream: Dt,
|
|
200
|
+
isURLSearchParams: vt,
|
|
201
|
+
isTypedArray: Wt,
|
|
202
|
+
isFileList: Ft,
|
|
203
|
+
forEach: M,
|
|
204
|
+
merge: de,
|
|
205
|
+
extend: Ht,
|
|
206
|
+
trim: $t,
|
|
207
|
+
stripBOM: zt,
|
|
208
|
+
inherits: Vt,
|
|
209
|
+
toFlatObject: Kt,
|
|
210
|
+
kindOf: te,
|
|
211
|
+
kindOfTest: P,
|
|
212
|
+
endsWith: Jt,
|
|
213
|
+
toArray: Mt,
|
|
214
|
+
forEachEntry: Gt,
|
|
215
|
+
matchAll: Xt,
|
|
216
|
+
isHTMLForm: Yt,
|
|
217
|
+
hasOwnProperty: xe,
|
|
218
|
+
hasOwnProp: xe,
|
|
212
219
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
213
|
-
reduceDescriptors:
|
|
214
|
-
freezeMethods:
|
|
215
|
-
toObjectSet:
|
|
216
|
-
toCamelCase:
|
|
217
|
-
noop:
|
|
218
|
-
toFiniteNumber:
|
|
219
|
-
findKey:
|
|
220
|
-
global:
|
|
221
|
-
isContextDefined:
|
|
222
|
-
ALPHABET:
|
|
223
|
-
generateString:
|
|
224
|
-
isSpecCompliantForm:
|
|
225
|
-
toJSONObject:
|
|
226
|
-
isAsyncFn:
|
|
227
|
-
isThenable:
|
|
220
|
+
reduceDescriptors: et,
|
|
221
|
+
freezeMethods: en,
|
|
222
|
+
toObjectSet: tn,
|
|
223
|
+
toCamelCase: Qt,
|
|
224
|
+
noop: nn,
|
|
225
|
+
toFiniteNumber: rn,
|
|
226
|
+
findKey: Qe,
|
|
227
|
+
global: v,
|
|
228
|
+
isContextDefined: Ze,
|
|
229
|
+
ALPHABET: tt,
|
|
230
|
+
generateString: sn,
|
|
231
|
+
isSpecCompliantForm: on,
|
|
232
|
+
toJSONObject: an,
|
|
233
|
+
isAsyncFn: cn,
|
|
234
|
+
isThenable: un,
|
|
235
|
+
setImmediate: nt,
|
|
236
|
+
asap: ln
|
|
228
237
|
};
|
|
229
238
|
function m(e, t, n, r, s) {
|
|
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);
|
|
239
|
+
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, this.status = s.status ? s.status : null);
|
|
231
240
|
}
|
|
232
241
|
a.inherits(m, Error, {
|
|
233
242
|
toJSON: function() {
|
|
@@ -246,11 +255,11 @@ a.inherits(m, Error, {
|
|
|
246
255
|
// Axios
|
|
247
256
|
config: a.toJSONObject(this.config),
|
|
248
257
|
code: this.code,
|
|
249
|
-
status: this.
|
|
258
|
+
status: this.status
|
|
250
259
|
};
|
|
251
260
|
}
|
|
252
261
|
});
|
|
253
|
-
const
|
|
262
|
+
const rt = m.prototype, st = {};
|
|
254
263
|
[
|
|
255
264
|
"ERR_BAD_OPTION_VALUE",
|
|
256
265
|
"ERR_BAD_OPTION",
|
|
@@ -266,97 +275,96 @@ const Ve = m.prototype, Ke = {};
|
|
|
266
275
|
"ERR_INVALID_URL"
|
|
267
276
|
// eslint-disable-next-line func-names
|
|
268
277
|
].forEach((e) => {
|
|
269
|
-
|
|
278
|
+
st[e] = { value: e };
|
|
270
279
|
});
|
|
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(
|
|
280
|
+
Object.defineProperties(m, st);
|
|
281
|
+
Object.defineProperty(rt, "isAxiosError", { value: !0 });
|
|
282
|
+
m.from = (e, t, n, r, s, o) => {
|
|
283
|
+
const i = Object.create(rt);
|
|
284
|
+
return a.toFlatObject(e, i, function(f) {
|
|
285
|
+
return f !== Error.prototype;
|
|
286
|
+
}, (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
287
|
};
|
|
279
|
-
const
|
|
280
|
-
function
|
|
288
|
+
const fn = null;
|
|
289
|
+
function he(e) {
|
|
281
290
|
return a.isPlainObject(e) || a.isArray(e);
|
|
282
291
|
}
|
|
283
|
-
function
|
|
292
|
+
function ot(e) {
|
|
284
293
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
285
294
|
}
|
|
286
|
-
function
|
|
287
|
-
return e ? e.concat(t).map(function(s,
|
|
288
|
-
return s =
|
|
295
|
+
function Ue(e, t, n) {
|
|
296
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
297
|
+
return s = ot(s), !n && o ? "[" + s + "]" : s;
|
|
289
298
|
}).join(n ? "." : "") : t;
|
|
290
299
|
}
|
|
291
|
-
function
|
|
292
|
-
return a.isArray(e) && !e.some(
|
|
300
|
+
function dn(e) {
|
|
301
|
+
return a.isArray(e) && !e.some(he);
|
|
293
302
|
}
|
|
294
|
-
const
|
|
303
|
+
const hn = a.toFlatObject(a, {}, null, function(t) {
|
|
295
304
|
return /^is[A-Z]/.test(t);
|
|
296
305
|
});
|
|
297
|
-
function
|
|
306
|
+
function se(e, t, n) {
|
|
298
307
|
if (!a.isObject(e))
|
|
299
308
|
throw new TypeError("target must be an object");
|
|
300
309
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
301
310
|
metaTokens: !0,
|
|
302
311
|
dots: !1,
|
|
303
312
|
indexes: !1
|
|
304
|
-
}, !1, function(
|
|
305
|
-
return !a.isUndefined(
|
|
313
|
+
}, !1, function(g, p) {
|
|
314
|
+
return !a.isUndefined(p[g]);
|
|
306
315
|
});
|
|
307
|
-
const r = n.metaTokens, s = n.visitor || l,
|
|
316
|
+
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
308
317
|
if (!a.isFunction(s))
|
|
309
318
|
throw new TypeError("visitor must be a function");
|
|
310
|
-
function h
|
|
311
|
-
if (
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
if (!p && a.isBlob(f))
|
|
319
|
+
function u(h) {
|
|
320
|
+
if (h === null) return "";
|
|
321
|
+
if (a.isDate(h))
|
|
322
|
+
return h.toISOString();
|
|
323
|
+
if (!f && a.isBlob(h))
|
|
316
324
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
317
|
-
return a.isArrayBuffer(
|
|
318
|
-
}
|
|
319
|
-
function l(
|
|
320
|
-
let
|
|
321
|
-
if (
|
|
322
|
-
if (a.endsWith(
|
|
323
|
-
|
|
324
|
-
else if (a.isArray(
|
|
325
|
-
return
|
|
326
|
-
!(a.isUndefined(
|
|
325
|
+
return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
326
|
+
}
|
|
327
|
+
function l(h, g, p) {
|
|
328
|
+
let w = h;
|
|
329
|
+
if (h && !p && typeof h == "object") {
|
|
330
|
+
if (a.endsWith(g, "{}"))
|
|
331
|
+
g = r ? g : g.slice(0, -2), h = JSON.stringify(h);
|
|
332
|
+
else if (a.isArray(h) && dn(h) || (a.isFileList(h) || a.endsWith(g, "[]")) && (w = a.toArray(h)))
|
|
333
|
+
return g = ot(g), w.forEach(function(C, N) {
|
|
334
|
+
!(a.isUndefined(C) || C === null) && t.append(
|
|
327
335
|
// eslint-disable-next-line no-nested-ternary
|
|
328
|
-
|
|
329
|
-
|
|
336
|
+
i === !0 ? Ue([g], N, o) : i === null ? g : g + "[]",
|
|
337
|
+
u(C)
|
|
330
338
|
);
|
|
331
339
|
}), !1;
|
|
332
340
|
}
|
|
333
|
-
return
|
|
341
|
+
return he(h) ? !0 : (t.append(Ue(p, g, o), u(h)), !1);
|
|
334
342
|
}
|
|
335
|
-
const
|
|
343
|
+
const d = [], y = Object.assign(hn, {
|
|
336
344
|
defaultVisitor: l,
|
|
337
|
-
convertValue:
|
|
338
|
-
isVisitable:
|
|
345
|
+
convertValue: u,
|
|
346
|
+
isVisitable: he
|
|
339
347
|
});
|
|
340
|
-
function
|
|
341
|
-
if (!a.isUndefined(
|
|
342
|
-
if (
|
|
343
|
-
throw Error("Circular reference detected in " +
|
|
344
|
-
|
|
345
|
-
(!(a.isUndefined(
|
|
348
|
+
function E(h, g) {
|
|
349
|
+
if (!a.isUndefined(h)) {
|
|
350
|
+
if (d.indexOf(h) !== -1)
|
|
351
|
+
throw Error("Circular reference detected in " + g.join("."));
|
|
352
|
+
d.push(h), a.forEach(h, function(w, S) {
|
|
353
|
+
(!(a.isUndefined(w) || w === null) && s.call(
|
|
346
354
|
t,
|
|
347
|
-
|
|
348
|
-
a.isString(
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
)) === !0 &&
|
|
352
|
-
}),
|
|
355
|
+
w,
|
|
356
|
+
a.isString(S) ? S.trim() : S,
|
|
357
|
+
g,
|
|
358
|
+
y
|
|
359
|
+
)) === !0 && E(w, g ? g.concat(S) : [S]);
|
|
360
|
+
}), d.pop();
|
|
353
361
|
}
|
|
354
362
|
}
|
|
355
363
|
if (!a.isObject(e))
|
|
356
364
|
throw new TypeError("data must be an object");
|
|
357
|
-
return
|
|
365
|
+
return E(e), t;
|
|
358
366
|
}
|
|
359
|
-
function
|
|
367
|
+
function Le(e) {
|
|
360
368
|
const t = {
|
|
361
369
|
"!": "%21",
|
|
362
370
|
"'": "%27",
|
|
@@ -370,36 +378,36 @@ function Ce(e) {
|
|
|
370
378
|
return t[r];
|
|
371
379
|
});
|
|
372
380
|
}
|
|
373
|
-
function
|
|
374
|
-
this._pairs = [], e &&
|
|
381
|
+
function Se(e, t) {
|
|
382
|
+
this._pairs = [], e && se(e, this, t);
|
|
375
383
|
}
|
|
376
|
-
const
|
|
377
|
-
|
|
384
|
+
const it = Se.prototype;
|
|
385
|
+
it.append = function(t, n) {
|
|
378
386
|
this._pairs.push([t, n]);
|
|
379
387
|
};
|
|
380
|
-
|
|
388
|
+
it.toString = function(t) {
|
|
381
389
|
const n = t ? function(r) {
|
|
382
|
-
return t.call(this, r,
|
|
383
|
-
} :
|
|
390
|
+
return t.call(this, r, Le);
|
|
391
|
+
} : Le;
|
|
384
392
|
return this._pairs.map(function(s) {
|
|
385
393
|
return n(s[0]) + "=" + n(s[1]);
|
|
386
394
|
}, "").join("&");
|
|
387
395
|
};
|
|
388
|
-
function
|
|
396
|
+
function pn(e) {
|
|
389
397
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
390
398
|
}
|
|
391
|
-
function
|
|
399
|
+
function at(e, t, n) {
|
|
392
400
|
if (!t)
|
|
393
401
|
return e;
|
|
394
|
-
const r = n && n.encode ||
|
|
395
|
-
let
|
|
396
|
-
if (s ?
|
|
397
|
-
const
|
|
398
|
-
|
|
402
|
+
const r = n && n.encode || pn, s = n && n.serialize;
|
|
403
|
+
let o;
|
|
404
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Se(t, n).toString(r), o) {
|
|
405
|
+
const i = e.indexOf("#");
|
|
406
|
+
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
399
407
|
}
|
|
400
408
|
return e;
|
|
401
409
|
}
|
|
402
|
-
class
|
|
410
|
+
class Fe {
|
|
403
411
|
constructor() {
|
|
404
412
|
this.handlers = [];
|
|
405
413
|
}
|
|
@@ -453,62 +461,65 @@ class Gt {
|
|
|
453
461
|
});
|
|
454
462
|
}
|
|
455
463
|
}
|
|
456
|
-
const
|
|
464
|
+
const ct = {
|
|
457
465
|
silentJSONParsing: !0,
|
|
458
466
|
forcedJSONParsing: !0,
|
|
459
467
|
clarifyTimeoutError: !1
|
|
460
|
-
},
|
|
468
|
+
}, mn = typeof URLSearchParams < "u" ? URLSearchParams : Se, gn = typeof FormData < "u" ? FormData : null, yn = typeof Blob < "u" ? Blob : null, wn = {
|
|
461
469
|
isBrowser: !0,
|
|
462
470
|
classes: {
|
|
463
|
-
URLSearchParams:
|
|
464
|
-
FormData:
|
|
465
|
-
Blob:
|
|
471
|
+
URLSearchParams: mn,
|
|
472
|
+
FormData: gn,
|
|
473
|
+
Blob: yn
|
|
466
474
|
},
|
|
467
475
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
468
|
-
},
|
|
469
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function"
|
|
476
|
+
}, Ce = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0, bn = Ce && (!pe || ["ReactNative", "NativeScript", "NS"].indexOf(pe.product) < 0), En = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
477
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Sn = Ce && window.location.href || "http://localhost", Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
470
478
|
__proto__: null,
|
|
471
|
-
hasBrowserEnv:
|
|
472
|
-
hasStandardBrowserEnv:
|
|
473
|
-
hasStandardBrowserWebWorkerEnv:
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
479
|
+
hasBrowserEnv: Ce,
|
|
480
|
+
hasStandardBrowserEnv: bn,
|
|
481
|
+
hasStandardBrowserWebWorkerEnv: En,
|
|
482
|
+
navigator: pe,
|
|
483
|
+
origin: Sn
|
|
484
|
+
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
485
|
+
...Cn,
|
|
486
|
+
...wn
|
|
477
487
|
};
|
|
478
|
-
function
|
|
479
|
-
return
|
|
480
|
-
visitor: function(n, r, s,
|
|
481
|
-
return
|
|
488
|
+
function Rn(e, t) {
|
|
489
|
+
return se(e, new T.classes.URLSearchParams(), Object.assign({
|
|
490
|
+
visitor: function(n, r, s, o) {
|
|
491
|
+
return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
482
492
|
}
|
|
483
493
|
}, t));
|
|
484
494
|
}
|
|
485
|
-
function
|
|
495
|
+
function An(e) {
|
|
486
496
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
487
497
|
}
|
|
488
|
-
function
|
|
498
|
+
function Tn(e) {
|
|
489
499
|
const t = {}, n = Object.keys(e);
|
|
490
500
|
let r;
|
|
491
501
|
const s = n.length;
|
|
492
|
-
let
|
|
502
|
+
let o;
|
|
493
503
|
for (r = 0; r < s; r++)
|
|
494
|
-
|
|
504
|
+
o = n[r], t[o] = e[o];
|
|
495
505
|
return t;
|
|
496
506
|
}
|
|
497
|
-
function
|
|
498
|
-
function t(n, r, s,
|
|
499
|
-
let
|
|
500
|
-
|
|
501
|
-
|
|
507
|
+
function ut(e) {
|
|
508
|
+
function t(n, r, s, o) {
|
|
509
|
+
let i = n[o++];
|
|
510
|
+
if (i === "__proto__") return !0;
|
|
511
|
+
const c = Number.isFinite(+i), f = o >= n.length;
|
|
512
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (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] = Tn(s[i])), !c);
|
|
502
513
|
}
|
|
503
514
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
504
515
|
const n = {};
|
|
505
516
|
return a.forEachEntry(e, (r, s) => {
|
|
506
|
-
t(
|
|
517
|
+
t(An(r), s, n, 0);
|
|
507
518
|
}), n;
|
|
508
519
|
}
|
|
509
520
|
return null;
|
|
510
521
|
}
|
|
511
|
-
function
|
|
522
|
+
function On(e, t, n) {
|
|
512
523
|
if (a.isString(e))
|
|
513
524
|
try {
|
|
514
525
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -516,44 +527,46 @@ function an(e, t, n) {
|
|
|
516
527
|
if (r.name !== "SyntaxError")
|
|
517
528
|
throw r;
|
|
518
529
|
}
|
|
519
|
-
return (
|
|
530
|
+
return (0, JSON.stringify)(e);
|
|
520
531
|
}
|
|
521
|
-
const
|
|
522
|
-
transitional:
|
|
523
|
-
adapter: ["xhr", "http"],
|
|
532
|
+
const W = {
|
|
533
|
+
transitional: ct,
|
|
534
|
+
adapter: ["xhr", "http", "fetch"],
|
|
524
535
|
transformRequest: [function(t, n) {
|
|
525
|
-
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1,
|
|
526
|
-
if (
|
|
527
|
-
return s
|
|
528
|
-
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
536
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
537
|
+
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
538
|
+
return s ? JSON.stringify(ut(t)) : t;
|
|
539
|
+
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
529
540
|
return t;
|
|
530
541
|
if (a.isArrayBufferView(t))
|
|
531
542
|
return t.buffer;
|
|
532
543
|
if (a.isURLSearchParams(t))
|
|
533
544
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
534
545
|
let c;
|
|
535
|
-
if (
|
|
546
|
+
if (o) {
|
|
536
547
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
537
|
-
return
|
|
548
|
+
return Rn(t, this.formSerializer).toString();
|
|
538
549
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
539
|
-
const
|
|
540
|
-
return
|
|
550
|
+
const f = this.env && this.env.FormData;
|
|
551
|
+
return se(
|
|
541
552
|
c ? { "files[]": t } : t,
|
|
542
|
-
|
|
553
|
+
f && new f(),
|
|
543
554
|
this.formSerializer
|
|
544
555
|
);
|
|
545
556
|
}
|
|
546
557
|
}
|
|
547
|
-
return
|
|
558
|
+
return o || s ? (n.setContentType("application/json", !1), On(t)) : t;
|
|
548
559
|
}],
|
|
549
560
|
transformResponse: [function(t) {
|
|
550
|
-
const n = this.transitional ||
|
|
561
|
+
const n = this.transitional || W.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
562
|
+
if (a.isResponse(t) || a.isReadableStream(t))
|
|
563
|
+
return t;
|
|
551
564
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
552
|
-
const
|
|
565
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
553
566
|
try {
|
|
554
567
|
return JSON.parse(t);
|
|
555
568
|
} catch (c) {
|
|
556
|
-
if (
|
|
569
|
+
if (i)
|
|
557
570
|
throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
558
571
|
}
|
|
559
572
|
}
|
|
@@ -569,8 +582,8 @@ const de = {
|
|
|
569
582
|
maxContentLength: -1,
|
|
570
583
|
maxBodyLength: -1,
|
|
571
584
|
env: {
|
|
572
|
-
FormData:
|
|
573
|
-
Blob:
|
|
585
|
+
FormData: T.classes.FormData,
|
|
586
|
+
Blob: T.classes.Blob
|
|
574
587
|
},
|
|
575
588
|
validateStatus: function(t) {
|
|
576
589
|
return t >= 200 && t < 300;
|
|
@@ -583,9 +596,9 @@ const de = {
|
|
|
583
596
|
}
|
|
584
597
|
};
|
|
585
598
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
586
|
-
|
|
599
|
+
W.headers[e] = {};
|
|
587
600
|
});
|
|
588
|
-
const
|
|
601
|
+
const _n = a.toObjectSet([
|
|
589
602
|
"age",
|
|
590
603
|
"authorization",
|
|
591
604
|
"content-length",
|
|
@@ -603,29 +616,29 @@ const pe = de, cn = a.toObjectSet([
|
|
|
603
616
|
"referer",
|
|
604
617
|
"retry-after",
|
|
605
618
|
"user-agent"
|
|
606
|
-
]),
|
|
619
|
+
]), Pn = (e) => {
|
|
607
620
|
const t = {};
|
|
608
621
|
let n, r, s;
|
|
609
622
|
return e && e.split(`
|
|
610
|
-
`).forEach(function(
|
|
611
|
-
s =
|
|
623
|
+
`).forEach(function(i) {
|
|
624
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && _n[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
612
625
|
}), t;
|
|
613
|
-
},
|
|
614
|
-
function
|
|
626
|
+
}, De = Symbol("internals");
|
|
627
|
+
function V(e) {
|
|
615
628
|
return e && String(e).trim().toLowerCase();
|
|
616
629
|
}
|
|
617
|
-
function
|
|
618
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
630
|
+
function Q(e) {
|
|
631
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(Q) : String(e);
|
|
619
632
|
}
|
|
620
|
-
function
|
|
633
|
+
function xn(e) {
|
|
621
634
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
622
635
|
let r;
|
|
623
636
|
for (; r = n.exec(e); )
|
|
624
637
|
t[r[1]] = r[2];
|
|
625
638
|
return t;
|
|
626
639
|
}
|
|
627
|
-
const
|
|
628
|
-
function
|
|
640
|
+
const Nn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
641
|
+
function ue(e, t, n, r, s) {
|
|
629
642
|
if (a.isFunction(r))
|
|
630
643
|
return r.call(this, t, n);
|
|
631
644
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -635,45 +648,54 @@ function te(e, t, n, r, s) {
|
|
|
635
648
|
return r.test(t);
|
|
636
649
|
}
|
|
637
650
|
}
|
|
638
|
-
function
|
|
651
|
+
function Un(e) {
|
|
639
652
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
640
653
|
}
|
|
641
|
-
function
|
|
654
|
+
function Ln(e, t) {
|
|
642
655
|
const n = a.toCamelCase(" " + t);
|
|
643
656
|
["get", "set", "has"].forEach((r) => {
|
|
644
657
|
Object.defineProperty(e, r + n, {
|
|
645
|
-
value: function(s,
|
|
646
|
-
return this[r].call(this, t, s,
|
|
658
|
+
value: function(s, o, i) {
|
|
659
|
+
return this[r].call(this, t, s, o, i);
|
|
647
660
|
},
|
|
648
661
|
configurable: !0
|
|
649
662
|
});
|
|
650
663
|
});
|
|
651
664
|
}
|
|
652
|
-
let
|
|
665
|
+
let O = class {
|
|
653
666
|
constructor(t) {
|
|
654
667
|
t && this.set(t);
|
|
655
668
|
}
|
|
656
669
|
set(t, n, r) {
|
|
657
670
|
const s = this;
|
|
658
|
-
function
|
|
659
|
-
const l =
|
|
671
|
+
function o(c, f, u) {
|
|
672
|
+
const l = V(f);
|
|
660
673
|
if (!l)
|
|
661
674
|
throw new Error("header name must be a non-empty string");
|
|
662
|
-
const
|
|
663
|
-
(!
|
|
675
|
+
const d = a.findKey(s, l);
|
|
676
|
+
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = Q(c));
|
|
664
677
|
}
|
|
665
|
-
const
|
|
666
|
-
|
|
678
|
+
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
679
|
+
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
680
|
+
i(t, n);
|
|
681
|
+
else if (a.isString(t) && (t = t.trim()) && !Nn(t))
|
|
682
|
+
i(Pn(t), n);
|
|
683
|
+
else if (a.isHeaders(t))
|
|
684
|
+
for (const [c, f] of t.entries())
|
|
685
|
+
o(f, c, r);
|
|
686
|
+
else
|
|
687
|
+
t != null && o(n, t, r);
|
|
688
|
+
return this;
|
|
667
689
|
}
|
|
668
690
|
get(t, n) {
|
|
669
|
-
if (t =
|
|
691
|
+
if (t = V(t), t) {
|
|
670
692
|
const r = a.findKey(this, t);
|
|
671
693
|
if (r) {
|
|
672
694
|
const s = this[r];
|
|
673
695
|
if (!n)
|
|
674
696
|
return s;
|
|
675
697
|
if (n === !0)
|
|
676
|
-
return
|
|
698
|
+
return xn(s);
|
|
677
699
|
if (a.isFunction(n))
|
|
678
700
|
return n.call(this, s, r);
|
|
679
701
|
if (a.isRegExp(n))
|
|
@@ -683,42 +705,42 @@ let Y = class {
|
|
|
683
705
|
}
|
|
684
706
|
}
|
|
685
707
|
has(t, n) {
|
|
686
|
-
if (t =
|
|
708
|
+
if (t = V(t), t) {
|
|
687
709
|
const r = a.findKey(this, t);
|
|
688
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
710
|
+
return !!(r && this[r] !== void 0 && (!n || ue(this, this[r], r, n)));
|
|
689
711
|
}
|
|
690
712
|
return !1;
|
|
691
713
|
}
|
|
692
714
|
delete(t, n) {
|
|
693
715
|
const r = this;
|
|
694
716
|
let s = !1;
|
|
695
|
-
function i
|
|
696
|
-
if (
|
|
697
|
-
const c = a.findKey(r,
|
|
698
|
-
c && (!n ||
|
|
717
|
+
function o(i) {
|
|
718
|
+
if (i = V(i), i) {
|
|
719
|
+
const c = a.findKey(r, i);
|
|
720
|
+
c && (!n || ue(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
699
721
|
}
|
|
700
722
|
}
|
|
701
|
-
return a.isArray(t) ? t.forEach(
|
|
723
|
+
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
702
724
|
}
|
|
703
725
|
clear(t) {
|
|
704
726
|
const n = Object.keys(this);
|
|
705
727
|
let r = n.length, s = !1;
|
|
706
728
|
for (; r--; ) {
|
|
707
|
-
const
|
|
708
|
-
(!t ||
|
|
729
|
+
const o = n[r];
|
|
730
|
+
(!t || ue(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
709
731
|
}
|
|
710
732
|
return s;
|
|
711
733
|
}
|
|
712
734
|
normalize(t) {
|
|
713
735
|
const n = this, r = {};
|
|
714
|
-
return a.forEach(this, (s,
|
|
715
|
-
const
|
|
716
|
-
if (
|
|
717
|
-
n[
|
|
736
|
+
return a.forEach(this, (s, o) => {
|
|
737
|
+
const i = a.findKey(r, o);
|
|
738
|
+
if (i) {
|
|
739
|
+
n[i] = Q(s), delete n[o];
|
|
718
740
|
return;
|
|
719
741
|
}
|
|
720
|
-
const c = t ?
|
|
721
|
-
c !==
|
|
742
|
+
const c = t ? Un(o) : String(o).trim();
|
|
743
|
+
c !== o && delete n[o], n[c] = Q(s), r[c] = !0;
|
|
722
744
|
}), this;
|
|
723
745
|
}
|
|
724
746
|
concat(...t) {
|
|
@@ -748,18 +770,18 @@ let Y = class {
|
|
|
748
770
|
return n.forEach((s) => r.set(s)), r;
|
|
749
771
|
}
|
|
750
772
|
static accessor(t) {
|
|
751
|
-
const r = (this[
|
|
773
|
+
const r = (this[De] = this[De] = {
|
|
752
774
|
accessors: {}
|
|
753
775
|
}).accessors, s = this.prototype;
|
|
754
|
-
function i
|
|
755
|
-
const c =
|
|
756
|
-
r[c] || (
|
|
776
|
+
function o(i) {
|
|
777
|
+
const c = V(i);
|
|
778
|
+
r[c] || (Ln(s, i), r[c] = !0);
|
|
757
779
|
}
|
|
758
|
-
return a.isArray(t) ? t.forEach(
|
|
780
|
+
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
759
781
|
}
|
|
760
782
|
};
|
|
761
|
-
|
|
762
|
-
a.reduceDescriptors(
|
|
783
|
+
O.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
784
|
+
a.reduceDescriptors(O.prototype, ({ value: e }, t) => {
|
|
763
785
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
764
786
|
return {
|
|
765
787
|
get: () => e,
|
|
@@ -768,25 +790,24 @@ a.reduceDescriptors(Y.prototype, ({ value: e }, t) => {
|
|
|
768
790
|
}
|
|
769
791
|
};
|
|
770
792
|
});
|
|
771
|
-
a.freezeMethods(
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
let i = r.data;
|
|
793
|
+
a.freezeMethods(O);
|
|
794
|
+
function le(e, t) {
|
|
795
|
+
const n = this || W, r = t || n, s = O.from(r.headers);
|
|
796
|
+
let o = r.data;
|
|
776
797
|
return a.forEach(e, function(c) {
|
|
777
|
-
|
|
778
|
-
}), s.normalize(),
|
|
798
|
+
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
799
|
+
}), s.normalize(), o;
|
|
779
800
|
}
|
|
780
|
-
function
|
|
801
|
+
function lt(e) {
|
|
781
802
|
return !!(e && e.__CANCEL__);
|
|
782
803
|
}
|
|
783
|
-
function
|
|
804
|
+
function $(e, t, n) {
|
|
784
805
|
m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
785
806
|
}
|
|
786
|
-
a.inherits(
|
|
807
|
+
a.inherits($, m, {
|
|
787
808
|
__CANCEL__: !0
|
|
788
809
|
});
|
|
789
|
-
function
|
|
810
|
+
function ft(e, t, n) {
|
|
790
811
|
const r = n.config.validateStatus;
|
|
791
812
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
792
813
|
"Request failed with status code " + n.status,
|
|
@@ -796,51 +817,73 @@ function hn(e, t, n) {
|
|
|
796
817
|
n
|
|
797
818
|
));
|
|
798
819
|
}
|
|
799
|
-
|
|
800
|
-
|
|
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
|
-
}
|
|
814
|
-
) : (
|
|
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
|
-
}
|
|
825
|
-
);
|
|
826
|
-
function yn(e) {
|
|
827
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
828
|
-
}
|
|
829
|
-
function gn(e, t) {
|
|
830
|
-
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
820
|
+
function Fn(e) {
|
|
821
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
822
|
+
return t && t[1] || "";
|
|
831
823
|
}
|
|
832
|
-
function
|
|
833
|
-
|
|
824
|
+
function Dn(e, t) {
|
|
825
|
+
e = e || 10;
|
|
826
|
+
const n = new Array(e), r = new Array(e);
|
|
827
|
+
let s = 0, o = 0, i;
|
|
828
|
+
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
829
|
+
const u = Date.now(), l = r[o];
|
|
830
|
+
i || (i = u), n[s] = f, r[s] = u;
|
|
831
|
+
let d = o, y = 0;
|
|
832
|
+
for (; d !== s; )
|
|
833
|
+
y += n[d++], d = d % e;
|
|
834
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
835
|
+
return;
|
|
836
|
+
const E = l && u - l;
|
|
837
|
+
return E ? Math.round(y * 1e3 / E) : void 0;
|
|
838
|
+
};
|
|
834
839
|
}
|
|
835
|
-
|
|
840
|
+
function Bn(e, t) {
|
|
841
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
842
|
+
const i = (u, l = Date.now()) => {
|
|
843
|
+
n = l, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
844
|
+
};
|
|
845
|
+
return [(...u) => {
|
|
846
|
+
const l = Date.now(), d = l - n;
|
|
847
|
+
d >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
848
|
+
o = null, i(s);
|
|
849
|
+
}, r - d)));
|
|
850
|
+
}, () => s && i(s)];
|
|
851
|
+
}
|
|
852
|
+
const Z = (e, t, n = 3) => {
|
|
853
|
+
let r = 0;
|
|
854
|
+
const s = Dn(50, 250);
|
|
855
|
+
return Bn((o) => {
|
|
856
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
|
|
857
|
+
r = i;
|
|
858
|
+
const d = {
|
|
859
|
+
loaded: i,
|
|
860
|
+
total: c,
|
|
861
|
+
progress: c ? i / c : void 0,
|
|
862
|
+
bytes: f,
|
|
863
|
+
rate: u || void 0,
|
|
864
|
+
estimated: u && c && l ? (c - i) / u : void 0,
|
|
865
|
+
event: o,
|
|
866
|
+
lengthComputable: c != null,
|
|
867
|
+
[t ? "download" : "upload"]: !0
|
|
868
|
+
};
|
|
869
|
+
e(d);
|
|
870
|
+
}, n);
|
|
871
|
+
}, Be = (e, t) => {
|
|
872
|
+
const n = e != null;
|
|
873
|
+
return [(r) => t[0]({
|
|
874
|
+
lengthComputable: n,
|
|
875
|
+
total: e,
|
|
876
|
+
loaded: r
|
|
877
|
+
}), t[1]];
|
|
878
|
+
}, ve = (e) => (...t) => a.asap(() => e(...t)), vn = T.hasStandardBrowserEnv ? (
|
|
836
879
|
// Standard browser envs have full support of the APIs needed to test
|
|
837
880
|
// whether the request URL is of the same origin as current location.
|
|
838
881
|
function() {
|
|
839
|
-
const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
|
|
882
|
+
const t = T.navigator && /(msie|trident)/i.test(T.navigator.userAgent), n = document.createElement("a");
|
|
840
883
|
let r;
|
|
841
|
-
function s(
|
|
842
|
-
let
|
|
843
|
-
return t && (n.setAttribute("href",
|
|
884
|
+
function s(o) {
|
|
885
|
+
let i = o;
|
|
886
|
+
return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
|
|
844
887
|
href: n.href,
|
|
845
888
|
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
|
|
846
889
|
host: n.host,
|
|
@@ -851,136 +894,411 @@ const wn = R.hasStandardBrowserEnv ? (
|
|
|
851
894
|
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
|
|
852
895
|
};
|
|
853
896
|
}
|
|
854
|
-
return r = s(window.location.href), function(
|
|
855
|
-
const c = a.isString(
|
|
897
|
+
return r = s(window.location.href), function(i) {
|
|
898
|
+
const c = a.isString(i) ? s(i) : i;
|
|
856
899
|
return c.protocol === r.protocol && c.host === r.host;
|
|
857
900
|
};
|
|
858
901
|
}()
|
|
859
902
|
) : (
|
|
860
903
|
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
861
|
-
function() {
|
|
904
|
+
/* @__PURE__ */ function() {
|
|
862
905
|
return function() {
|
|
863
906
|
return !0;
|
|
864
907
|
};
|
|
865
908
|
}()
|
|
909
|
+
), In = T.hasStandardBrowserEnv ? (
|
|
910
|
+
// Standard browser envs support document.cookie
|
|
911
|
+
{
|
|
912
|
+
write(e, t, n, r, s, o) {
|
|
913
|
+
const i = [e + "=" + encodeURIComponent(t)];
|
|
914
|
+
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("; ");
|
|
915
|
+
},
|
|
916
|
+
read(e) {
|
|
917
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
918
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
919
|
+
},
|
|
920
|
+
remove(e) {
|
|
921
|
+
this.write(e, "", Date.now() - 864e5);
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
) : (
|
|
925
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
926
|
+
{
|
|
927
|
+
write() {
|
|
928
|
+
},
|
|
929
|
+
read() {
|
|
930
|
+
return null;
|
|
931
|
+
},
|
|
932
|
+
remove() {
|
|
933
|
+
}
|
|
934
|
+
}
|
|
866
935
|
);
|
|
867
|
-
function
|
|
868
|
-
|
|
869
|
-
return t && t[1] || "";
|
|
936
|
+
function kn(e) {
|
|
937
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
870
938
|
}
|
|
871
|
-
function
|
|
872
|
-
|
|
873
|
-
const n = new Array(e), r = new Array(e);
|
|
874
|
-
let s = 0, i = 0, o;
|
|
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, g = 0;
|
|
879
|
-
for (; u !== s; )
|
|
880
|
-
g += n[u++], u = u % e;
|
|
881
|
-
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), h - o < t)
|
|
882
|
-
return;
|
|
883
|
-
const S = l && h - l;
|
|
884
|
-
return S ? Math.round(g * 1e3 / S) : void 0;
|
|
885
|
-
};
|
|
939
|
+
function qn(e, t) {
|
|
940
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
886
941
|
}
|
|
887
|
-
function
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
};
|
|
902
|
-
|
|
942
|
+
function dt(e, t) {
|
|
943
|
+
return e && !kn(t) ? qn(e, t) : t;
|
|
944
|
+
}
|
|
945
|
+
const Ie = (e) => e instanceof O ? { ...e } : e;
|
|
946
|
+
function k(e, t) {
|
|
947
|
+
t = t || {};
|
|
948
|
+
const n = {};
|
|
949
|
+
function r(u, l, d) {
|
|
950
|
+
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: d }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
951
|
+
}
|
|
952
|
+
function s(u, l, d) {
|
|
953
|
+
if (a.isUndefined(l)) {
|
|
954
|
+
if (!a.isUndefined(u))
|
|
955
|
+
return r(void 0, u, d);
|
|
956
|
+
} else return r(u, l, d);
|
|
957
|
+
}
|
|
958
|
+
function o(u, l) {
|
|
959
|
+
if (!a.isUndefined(l))
|
|
960
|
+
return r(void 0, l);
|
|
961
|
+
}
|
|
962
|
+
function i(u, l) {
|
|
963
|
+
if (a.isUndefined(l)) {
|
|
964
|
+
if (!a.isUndefined(u))
|
|
965
|
+
return r(void 0, u);
|
|
966
|
+
} else return r(void 0, l);
|
|
967
|
+
}
|
|
968
|
+
function c(u, l, d) {
|
|
969
|
+
if (d in t)
|
|
970
|
+
return r(u, l);
|
|
971
|
+
if (d in e)
|
|
972
|
+
return r(void 0, u);
|
|
973
|
+
}
|
|
974
|
+
const f = {
|
|
975
|
+
url: o,
|
|
976
|
+
method: o,
|
|
977
|
+
data: o,
|
|
978
|
+
baseURL: i,
|
|
979
|
+
transformRequest: i,
|
|
980
|
+
transformResponse: i,
|
|
981
|
+
paramsSerializer: i,
|
|
982
|
+
timeout: i,
|
|
983
|
+
timeoutMessage: i,
|
|
984
|
+
withCredentials: i,
|
|
985
|
+
withXSRFToken: i,
|
|
986
|
+
adapter: i,
|
|
987
|
+
responseType: i,
|
|
988
|
+
xsrfCookieName: i,
|
|
989
|
+
xsrfHeaderName: i,
|
|
990
|
+
onUploadProgress: i,
|
|
991
|
+
onDownloadProgress: i,
|
|
992
|
+
decompress: i,
|
|
993
|
+
maxContentLength: i,
|
|
994
|
+
maxBodyLength: i,
|
|
995
|
+
beforeRedirect: i,
|
|
996
|
+
transport: i,
|
|
997
|
+
httpAgent: i,
|
|
998
|
+
httpsAgent: i,
|
|
999
|
+
cancelToken: i,
|
|
1000
|
+
socketPath: i,
|
|
1001
|
+
responseEncoding: i,
|
|
1002
|
+
validateStatus: c,
|
|
1003
|
+
headers: (u, l) => s(Ie(u), Ie(l), !0)
|
|
903
1004
|
};
|
|
1005
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1006
|
+
const d = f[l] || s, y = d(e[l], t[l], l);
|
|
1007
|
+
a.isUndefined(y) && d !== c || (n[l] = y);
|
|
1008
|
+
}), n;
|
|
904
1009
|
}
|
|
905
|
-
const
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
if (
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
i.setContentType([d || "multipart/form-data", ...w].join("; "));
|
|
920
|
-
}
|
|
1010
|
+
const ht = (e) => {
|
|
1011
|
+
const t = k({}, e);
|
|
1012
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1013
|
+
t.headers = i = O.from(i), t.url = at(dt(t.baseURL, t.url), e.params, e.paramsSerializer), c && i.set(
|
|
1014
|
+
"Authorization",
|
|
1015
|
+
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1016
|
+
);
|
|
1017
|
+
let f;
|
|
1018
|
+
if (a.isFormData(n)) {
|
|
1019
|
+
if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
|
|
1020
|
+
i.setContentType(void 0);
|
|
1021
|
+
else if ((f = i.getContentType()) !== !1) {
|
|
1022
|
+
const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1023
|
+
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
921
1024
|
}
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
1025
|
+
}
|
|
1026
|
+
if (T.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && vn(t.url))) {
|
|
1027
|
+
const u = s && o && In.read(o);
|
|
1028
|
+
u && i.set(s, u);
|
|
1029
|
+
}
|
|
1030
|
+
return t;
|
|
1031
|
+
}, jn = typeof XMLHttpRequest < "u", $n = jn && function(e) {
|
|
1032
|
+
return new Promise(function(n, r) {
|
|
1033
|
+
const s = ht(e);
|
|
1034
|
+
let o = s.data;
|
|
1035
|
+
const i = O.from(s.headers).normalize();
|
|
1036
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, d, y, E, h;
|
|
1037
|
+
function g() {
|
|
1038
|
+
E && E(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
926
1039
|
}
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
function
|
|
930
|
-
if (!
|
|
1040
|
+
let p = new XMLHttpRequest();
|
|
1041
|
+
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
1042
|
+
function w() {
|
|
1043
|
+
if (!p)
|
|
931
1044
|
return;
|
|
932
|
-
const
|
|
933
|
-
"getAllResponseHeaders" in
|
|
934
|
-
),
|
|
935
|
-
data: !
|
|
936
|
-
status:
|
|
937
|
-
statusText:
|
|
938
|
-
headers:
|
|
1045
|
+
const C = O.from(
|
|
1046
|
+
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1047
|
+
), A = {
|
|
1048
|
+
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
1049
|
+
status: p.status,
|
|
1050
|
+
statusText: p.statusText,
|
|
1051
|
+
headers: C,
|
|
939
1052
|
config: e,
|
|
940
|
-
request:
|
|
1053
|
+
request: p
|
|
941
1054
|
};
|
|
942
|
-
|
|
943
|
-
n(
|
|
944
|
-
}, function(
|
|
945
|
-
r(
|
|
946
|
-
},
|
|
1055
|
+
ft(function(D) {
|
|
1056
|
+
n(D), g();
|
|
1057
|
+
}, function(D) {
|
|
1058
|
+
r(D), g();
|
|
1059
|
+
}, A), p = null;
|
|
947
1060
|
}
|
|
948
|
-
|
|
949
|
-
!
|
|
950
|
-
},
|
|
951
|
-
|
|
952
|
-
},
|
|
953
|
-
r(new m("Network Error", m.ERR_NETWORK, e,
|
|
954
|
-
},
|
|
955
|
-
let
|
|
956
|
-
const
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1061
|
+
"onloadend" in p ? p.onloadend = w : p.onreadystatechange = function() {
|
|
1062
|
+
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(w);
|
|
1063
|
+
}, p.onabort = function() {
|
|
1064
|
+
p && (r(new m("Request aborted", m.ECONNABORTED, e, p)), p = null);
|
|
1065
|
+
}, p.onerror = function() {
|
|
1066
|
+
r(new m("Network Error", m.ERR_NETWORK, e, p)), p = null;
|
|
1067
|
+
}, p.ontimeout = function() {
|
|
1068
|
+
let N = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1069
|
+
const A = s.transitional || ct;
|
|
1070
|
+
s.timeoutErrorMessage && (N = s.timeoutErrorMessage), r(new m(
|
|
1071
|
+
N,
|
|
1072
|
+
A.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
960
1073
|
e,
|
|
961
|
-
|
|
962
|
-
)),
|
|
963
|
-
},
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
s
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
}, e.cancelToken && e.cancelToken.subscribe(p), e.signal && (e.signal.aborted ? p() : e.signal.addEventListener("abort", p)));
|
|
972
|
-
const f = bn(g);
|
|
973
|
-
if (f && R.protocols.indexOf(f) === -1) {
|
|
974
|
-
r(new m("Unsupported protocol " + f + ":", m.ERR_BAD_REQUEST, e));
|
|
1074
|
+
p
|
|
1075
|
+
)), p = null;
|
|
1076
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(N, A) {
|
|
1077
|
+
p.setRequestHeader(A, N);
|
|
1078
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([y, h] = Z(u, !0), p.addEventListener("progress", y)), f && p.upload && ([d, E] = Z(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (l = (C) => {
|
|
1079
|
+
p && (r(!C || C.type ? new $(null, e, p) : C), p.abort(), p = null);
|
|
1080
|
+
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1081
|
+
const S = Fn(s.url);
|
|
1082
|
+
if (S && T.protocols.indexOf(S) === -1) {
|
|
1083
|
+
r(new m("Unsupported protocol " + S + ":", m.ERR_BAD_REQUEST, e));
|
|
975
1084
|
return;
|
|
976
1085
|
}
|
|
977
|
-
|
|
1086
|
+
p.send(o || null);
|
|
1087
|
+
});
|
|
1088
|
+
}, Hn = (e, t) => {
|
|
1089
|
+
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1090
|
+
if (t || n) {
|
|
1091
|
+
let r = new AbortController(), s;
|
|
1092
|
+
const o = function(u) {
|
|
1093
|
+
if (!s) {
|
|
1094
|
+
s = !0, c();
|
|
1095
|
+
const l = u instanceof Error ? u : this.reason;
|
|
1096
|
+
r.abort(l instanceof m ? l : new $(l instanceof Error ? l.message : l));
|
|
1097
|
+
}
|
|
1098
|
+
};
|
|
1099
|
+
let i = t && setTimeout(() => {
|
|
1100
|
+
i = null, o(new m(`timeout ${t} of ms exceeded`, m.ETIMEDOUT));
|
|
1101
|
+
}, t);
|
|
1102
|
+
const c = () => {
|
|
1103
|
+
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
|
|
1104
|
+
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
1105
|
+
}), e = null);
|
|
1106
|
+
};
|
|
1107
|
+
e.forEach((u) => u.addEventListener("abort", o));
|
|
1108
|
+
const { signal: f } = r;
|
|
1109
|
+
return f.unsubscribe = () => a.asap(c), f;
|
|
1110
|
+
}
|
|
1111
|
+
}, zn = function* (e, t) {
|
|
1112
|
+
let n = e.byteLength;
|
|
1113
|
+
if (n < t) {
|
|
1114
|
+
yield e;
|
|
1115
|
+
return;
|
|
1116
|
+
}
|
|
1117
|
+
let r = 0, s;
|
|
1118
|
+
for (; r < n; )
|
|
1119
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
1120
|
+
}, Vn = async function* (e, t) {
|
|
1121
|
+
for await (const n of Kn(e))
|
|
1122
|
+
yield* zn(n, t);
|
|
1123
|
+
}, Kn = async function* (e) {
|
|
1124
|
+
if (e[Symbol.asyncIterator]) {
|
|
1125
|
+
yield* e;
|
|
1126
|
+
return;
|
|
1127
|
+
}
|
|
1128
|
+
const t = e.getReader();
|
|
1129
|
+
try {
|
|
1130
|
+
for (; ; ) {
|
|
1131
|
+
const { done: n, value: r } = await t.read();
|
|
1132
|
+
if (n)
|
|
1133
|
+
break;
|
|
1134
|
+
yield r;
|
|
1135
|
+
}
|
|
1136
|
+
} finally {
|
|
1137
|
+
await t.cancel();
|
|
1138
|
+
}
|
|
1139
|
+
}, ke = (e, t, n, r) => {
|
|
1140
|
+
const s = Vn(e, t);
|
|
1141
|
+
let o = 0, i, c = (f) => {
|
|
1142
|
+
i || (i = !0, r && r(f));
|
|
1143
|
+
};
|
|
1144
|
+
return new ReadableStream({
|
|
1145
|
+
async pull(f) {
|
|
1146
|
+
try {
|
|
1147
|
+
const { done: u, value: l } = await s.next();
|
|
1148
|
+
if (u) {
|
|
1149
|
+
c(), f.close();
|
|
1150
|
+
return;
|
|
1151
|
+
}
|
|
1152
|
+
let d = l.byteLength;
|
|
1153
|
+
if (n) {
|
|
1154
|
+
let y = o += d;
|
|
1155
|
+
n(y);
|
|
1156
|
+
}
|
|
1157
|
+
f.enqueue(new Uint8Array(l));
|
|
1158
|
+
} catch (u) {
|
|
1159
|
+
throw c(u), u;
|
|
1160
|
+
}
|
|
1161
|
+
},
|
|
1162
|
+
cancel(f) {
|
|
1163
|
+
return c(f), s.return();
|
|
1164
|
+
}
|
|
1165
|
+
}, {
|
|
1166
|
+
highWaterMark: 2
|
|
978
1167
|
});
|
|
979
|
-
},
|
|
980
|
-
|
|
981
|
-
|
|
1168
|
+
}, oe = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", pt = oe && typeof ReadableStream == "function", Jn = oe && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), mt = (e, ...t) => {
|
|
1169
|
+
try {
|
|
1170
|
+
return !!e(...t);
|
|
1171
|
+
} catch {
|
|
1172
|
+
return !1;
|
|
1173
|
+
}
|
|
1174
|
+
}, Mn = pt && mt(() => {
|
|
1175
|
+
let e = !1;
|
|
1176
|
+
const t = new Request(T.origin, {
|
|
1177
|
+
body: new ReadableStream(),
|
|
1178
|
+
method: "POST",
|
|
1179
|
+
get duplex() {
|
|
1180
|
+
return e = !0, "half";
|
|
1181
|
+
}
|
|
1182
|
+
}).headers.has("Content-Type");
|
|
1183
|
+
return e && !t;
|
|
1184
|
+
}), qe = 64 * 1024, me = pt && mt(() => a.isReadableStream(new Response("").body)), ee = {
|
|
1185
|
+
stream: me && ((e) => e.body)
|
|
982
1186
|
};
|
|
983
|
-
|
|
1187
|
+
oe && ((e) => {
|
|
1188
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1189
|
+
!ee[t] && (ee[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1190
|
+
throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT, r);
|
|
1191
|
+
});
|
|
1192
|
+
});
|
|
1193
|
+
})(new Response());
|
|
1194
|
+
const Wn = async (e) => {
|
|
1195
|
+
if (e == null)
|
|
1196
|
+
return 0;
|
|
1197
|
+
if (a.isBlob(e))
|
|
1198
|
+
return e.size;
|
|
1199
|
+
if (a.isSpecCompliantForm(e))
|
|
1200
|
+
return (await new Request(T.origin, {
|
|
1201
|
+
method: "POST",
|
|
1202
|
+
body: e
|
|
1203
|
+
}).arrayBuffer()).byteLength;
|
|
1204
|
+
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1205
|
+
return e.byteLength;
|
|
1206
|
+
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1207
|
+
return (await Jn(e)).byteLength;
|
|
1208
|
+
}, Gn = async (e, t) => {
|
|
1209
|
+
const n = a.toFiniteNumber(e.getContentLength());
|
|
1210
|
+
return n ?? Wn(t);
|
|
1211
|
+
}, Xn = oe && (async (e) => {
|
|
1212
|
+
let {
|
|
1213
|
+
url: t,
|
|
1214
|
+
method: n,
|
|
1215
|
+
data: r,
|
|
1216
|
+
signal: s,
|
|
1217
|
+
cancelToken: o,
|
|
1218
|
+
timeout: i,
|
|
1219
|
+
onDownloadProgress: c,
|
|
1220
|
+
onUploadProgress: f,
|
|
1221
|
+
responseType: u,
|
|
1222
|
+
headers: l,
|
|
1223
|
+
withCredentials: d = "same-origin",
|
|
1224
|
+
fetchOptions: y
|
|
1225
|
+
} = ht(e);
|
|
1226
|
+
u = u ? (u + "").toLowerCase() : "text";
|
|
1227
|
+
let E = Hn([s, o && o.toAbortSignal()], i), h;
|
|
1228
|
+
const g = E && E.unsubscribe && (() => {
|
|
1229
|
+
E.unsubscribe();
|
|
1230
|
+
});
|
|
1231
|
+
let p;
|
|
1232
|
+
try {
|
|
1233
|
+
if (f && Mn && n !== "get" && n !== "head" && (p = await Gn(l, r)) !== 0) {
|
|
1234
|
+
let A = new Request(t, {
|
|
1235
|
+
method: "POST",
|
|
1236
|
+
body: r,
|
|
1237
|
+
duplex: "half"
|
|
1238
|
+
}), U;
|
|
1239
|
+
if (a.isFormData(r) && (U = A.headers.get("content-type")) && l.setContentType(U), A.body) {
|
|
1240
|
+
const [D, G] = Be(
|
|
1241
|
+
p,
|
|
1242
|
+
Z(ve(f))
|
|
1243
|
+
);
|
|
1244
|
+
r = ke(A.body, qe, D, G);
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
a.isString(d) || (d = d ? "include" : "omit");
|
|
1248
|
+
const w = "credentials" in Request.prototype;
|
|
1249
|
+
h = new Request(t, {
|
|
1250
|
+
...y,
|
|
1251
|
+
signal: E,
|
|
1252
|
+
method: n.toUpperCase(),
|
|
1253
|
+
headers: l.normalize().toJSON(),
|
|
1254
|
+
body: r,
|
|
1255
|
+
duplex: "half",
|
|
1256
|
+
credentials: w ? d : void 0
|
|
1257
|
+
});
|
|
1258
|
+
let S = await fetch(h);
|
|
1259
|
+
const C = me && (u === "stream" || u === "response");
|
|
1260
|
+
if (me && (c || C && g)) {
|
|
1261
|
+
const A = {};
|
|
1262
|
+
["status", "statusText", "headers"].forEach((Pe) => {
|
|
1263
|
+
A[Pe] = S[Pe];
|
|
1264
|
+
});
|
|
1265
|
+
const U = a.toFiniteNumber(S.headers.get("content-length")), [D, G] = c && Be(
|
|
1266
|
+
U,
|
|
1267
|
+
Z(ve(c), !0)
|
|
1268
|
+
) || [];
|
|
1269
|
+
S = new Response(
|
|
1270
|
+
ke(S.body, qe, D, () => {
|
|
1271
|
+
G && G(), g && g();
|
|
1272
|
+
}),
|
|
1273
|
+
A
|
|
1274
|
+
);
|
|
1275
|
+
}
|
|
1276
|
+
u = u || "text";
|
|
1277
|
+
let N = await ee[a.findKey(ee, u) || "text"](S, e);
|
|
1278
|
+
return !C && g && g(), await new Promise((A, U) => {
|
|
1279
|
+
ft(A, U, {
|
|
1280
|
+
data: N,
|
|
1281
|
+
headers: O.from(S.headers),
|
|
1282
|
+
status: S.status,
|
|
1283
|
+
statusText: S.statusText,
|
|
1284
|
+
config: e,
|
|
1285
|
+
request: h
|
|
1286
|
+
});
|
|
1287
|
+
});
|
|
1288
|
+
} catch (w) {
|
|
1289
|
+
throw g && g(), w && w.name === "TypeError" && /fetch/i.test(w.message) ? Object.assign(
|
|
1290
|
+
new m("Network Error", m.ERR_NETWORK, e, h),
|
|
1291
|
+
{
|
|
1292
|
+
cause: w.cause || w
|
|
1293
|
+
}
|
|
1294
|
+
) : m.from(w, w && w.code, e, h);
|
|
1295
|
+
}
|
|
1296
|
+
}), ge = {
|
|
1297
|
+
http: fn,
|
|
1298
|
+
xhr: $n,
|
|
1299
|
+
fetch: Xn
|
|
1300
|
+
};
|
|
1301
|
+
a.forEach(ge, (e, t) => {
|
|
984
1302
|
if (e) {
|
|
985
1303
|
try {
|
|
986
1304
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -989,177 +1307,110 @@ a.forEach(ie, (e, t) => {
|
|
|
989
1307
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
990
1308
|
}
|
|
991
1309
|
});
|
|
992
|
-
const
|
|
1310
|
+
const je = (e) => `- ${e}`, Yn = (e) => a.isFunction(e) || e === null || e === !1, gt = {
|
|
993
1311
|
getAdapter: (e) => {
|
|
994
1312
|
e = a.isArray(e) ? e : [e];
|
|
995
1313
|
const { length: t } = e;
|
|
996
1314
|
let n, r;
|
|
997
1315
|
const s = {};
|
|
998
|
-
for (let
|
|
999
|
-
n = e[
|
|
1000
|
-
let
|
|
1001
|
-
if (r = n, !
|
|
1002
|
-
throw new m(`Unknown adapter '${
|
|
1316
|
+
for (let o = 0; o < t; o++) {
|
|
1317
|
+
n = e[o];
|
|
1318
|
+
let i;
|
|
1319
|
+
if (r = n, !Yn(n) && (r = ge[(i = String(n)).toLowerCase()], r === void 0))
|
|
1320
|
+
throw new m(`Unknown adapter '${i}'`);
|
|
1003
1321
|
if (r)
|
|
1004
1322
|
break;
|
|
1005
|
-
s[
|
|
1323
|
+
s[i || "#" + o] = r;
|
|
1006
1324
|
}
|
|
1007
1325
|
if (!r) {
|
|
1008
|
-
const
|
|
1009
|
-
([c,
|
|
1326
|
+
const o = Object.entries(s).map(
|
|
1327
|
+
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1010
1328
|
);
|
|
1011
|
-
let
|
|
1012
|
-
` +
|
|
1013
|
-
`) : " " +
|
|
1329
|
+
let i = t ? o.length > 1 ? `since :
|
|
1330
|
+
` + o.map(je).join(`
|
|
1331
|
+
`) : " " + je(o[0]) : "as no adapter specified";
|
|
1014
1332
|
throw new m(
|
|
1015
|
-
"There is no suitable adapter to dispatch the request " +
|
|
1333
|
+
"There is no suitable adapter to dispatch the request " + i,
|
|
1016
1334
|
"ERR_NOT_SUPPORT"
|
|
1017
1335
|
);
|
|
1018
1336
|
}
|
|
1019
1337
|
return r;
|
|
1020
1338
|
},
|
|
1021
|
-
adapters:
|
|
1339
|
+
adapters: ge
|
|
1022
1340
|
};
|
|
1023
|
-
function
|
|
1341
|
+
function fe(e) {
|
|
1024
1342
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1025
|
-
throw new
|
|
1343
|
+
throw new $(null, e);
|
|
1026
1344
|
}
|
|
1027
|
-
function
|
|
1028
|
-
return
|
|
1345
|
+
function $e(e) {
|
|
1346
|
+
return fe(e), e.headers = O.from(e.headers), e.data = le.call(
|
|
1029
1347
|
e,
|
|
1030
1348
|
e.transformRequest
|
|
1031
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1032
|
-
return
|
|
1349
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), gt.getAdapter(e.adapter || W.adapter)(e).then(function(r) {
|
|
1350
|
+
return fe(e), r.data = le.call(
|
|
1033
1351
|
e,
|
|
1034
1352
|
e.transformResponse,
|
|
1035
1353
|
r
|
|
1036
|
-
), r.headers =
|
|
1354
|
+
), r.headers = O.from(r.headers), r;
|
|
1037
1355
|
}, function(r) {
|
|
1038
|
-
return
|
|
1356
|
+
return lt(r) || (fe(e), r && r.response && (r.response.data = le.call(
|
|
1039
1357
|
e,
|
|
1040
1358
|
e.transformResponse,
|
|
1041
1359
|
r.response
|
|
1042
|
-
), r.response.headers =
|
|
1360
|
+
), r.response.headers = O.from(r.response.headers))), Promise.reject(r);
|
|
1043
1361
|
});
|
|
1044
1362
|
}
|
|
1045
|
-
const
|
|
1046
|
-
function F(e, t) {
|
|
1047
|
-
t = t || {};
|
|
1048
|
-
const n = {};
|
|
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;
|
|
1051
|
-
}
|
|
1052
|
-
function s(h, l, u) {
|
|
1053
|
-
if (a.isUndefined(l)) {
|
|
1054
|
-
if (!a.isUndefined(h))
|
|
1055
|
-
return r(void 0, h, u);
|
|
1056
|
-
} else
|
|
1057
|
-
return r(h, l, u);
|
|
1058
|
-
}
|
|
1059
|
-
function i(h, l) {
|
|
1060
|
-
if (!a.isUndefined(l))
|
|
1061
|
-
return r(void 0, l);
|
|
1062
|
-
}
|
|
1063
|
-
function o(h, l) {
|
|
1064
|
-
if (a.isUndefined(l)) {
|
|
1065
|
-
if (!a.isUndefined(h))
|
|
1066
|
-
return r(void 0, h);
|
|
1067
|
-
} else
|
|
1068
|
-
return r(void 0, l);
|
|
1069
|
-
}
|
|
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);
|
|
1075
|
-
}
|
|
1076
|
-
const p = {
|
|
1077
|
-
url: i,
|
|
1078
|
-
method: i,
|
|
1079
|
-
data: i,
|
|
1080
|
-
baseURL: o,
|
|
1081
|
-
transformRequest: o,
|
|
1082
|
-
transformResponse: o,
|
|
1083
|
-
paramsSerializer: o,
|
|
1084
|
-
timeout: o,
|
|
1085
|
-
timeoutMessage: o,
|
|
1086
|
-
withCredentials: o,
|
|
1087
|
-
withXSRFToken: o,
|
|
1088
|
-
adapter: o,
|
|
1089
|
-
responseType: o,
|
|
1090
|
-
xsrfCookieName: o,
|
|
1091
|
-
xsrfHeaderName: o,
|
|
1092
|
-
onUploadProgress: o,
|
|
1093
|
-
onDownloadProgress: o,
|
|
1094
|
-
decompress: o,
|
|
1095
|
-
maxContentLength: o,
|
|
1096
|
-
maxBodyLength: o,
|
|
1097
|
-
beforeRedirect: o,
|
|
1098
|
-
transport: o,
|
|
1099
|
-
httpAgent: o,
|
|
1100
|
-
httpsAgent: o,
|
|
1101
|
-
cancelToken: o,
|
|
1102
|
-
socketPath: o,
|
|
1103
|
-
responseEncoding: o,
|
|
1104
|
-
validateStatus: c,
|
|
1105
|
-
headers: (h, l) => s(_e(h), _e(l), !0)
|
|
1106
|
-
};
|
|
1107
|
-
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1108
|
-
const u = p[l] || s, g = u(e[l], t[l], l);
|
|
1109
|
-
a.isUndefined(g) && u !== c || (n[l] = g);
|
|
1110
|
-
}), n;
|
|
1111
|
-
}
|
|
1112
|
-
const tt = "1.6.3", he = {};
|
|
1363
|
+
const yt = "1.7.7", Re = {};
|
|
1113
1364
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1114
|
-
|
|
1365
|
+
Re[e] = function(r) {
|
|
1115
1366
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1116
1367
|
};
|
|
1117
1368
|
});
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1120
|
-
function s(
|
|
1121
|
-
return "[Axios v" +
|
|
1369
|
+
const He = {};
|
|
1370
|
+
Re.transitional = function(t, n, r) {
|
|
1371
|
+
function s(o, i) {
|
|
1372
|
+
return "[Axios v" + yt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1122
1373
|
}
|
|
1123
|
-
return (
|
|
1374
|
+
return (o, i, c) => {
|
|
1124
1375
|
if (t === !1)
|
|
1125
1376
|
throw new m(
|
|
1126
|
-
s(
|
|
1377
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1127
1378
|
m.ERR_DEPRECATED
|
|
1128
1379
|
);
|
|
1129
|
-
return n && !
|
|
1380
|
+
return n && !He[i] && (He[i] = !0, console.warn(
|
|
1130
1381
|
s(
|
|
1131
|
-
|
|
1382
|
+
i,
|
|
1132
1383
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1133
1384
|
)
|
|
1134
|
-
)), t ? t(
|
|
1385
|
+
)), t ? t(o, i, c) : !0;
|
|
1135
1386
|
};
|
|
1136
1387
|
};
|
|
1137
|
-
function
|
|
1388
|
+
function Qn(e, t, n) {
|
|
1138
1389
|
if (typeof e != "object")
|
|
1139
1390
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1140
1391
|
const r = Object.keys(e);
|
|
1141
1392
|
let s = r.length;
|
|
1142
1393
|
for (; s-- > 0; ) {
|
|
1143
|
-
const
|
|
1144
|
-
if (
|
|
1145
|
-
const c = e[
|
|
1146
|
-
if (
|
|
1147
|
-
throw new m("option " +
|
|
1394
|
+
const o = r[s], i = t[o];
|
|
1395
|
+
if (i) {
|
|
1396
|
+
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1397
|
+
if (f !== !0)
|
|
1398
|
+
throw new m("option " + o + " must be " + f, m.ERR_BAD_OPTION_VALUE);
|
|
1148
1399
|
continue;
|
|
1149
1400
|
}
|
|
1150
1401
|
if (n !== !0)
|
|
1151
|
-
throw new m("Unknown option " +
|
|
1402
|
+
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1152
1403
|
}
|
|
1153
1404
|
}
|
|
1154
|
-
const
|
|
1155
|
-
assertOptions:
|
|
1156
|
-
validators:
|
|
1157
|
-
},
|
|
1158
|
-
let
|
|
1405
|
+
const ye = {
|
|
1406
|
+
assertOptions: Qn,
|
|
1407
|
+
validators: Re
|
|
1408
|
+
}, L = ye.validators;
|
|
1409
|
+
let I = class {
|
|
1159
1410
|
constructor(t) {
|
|
1160
1411
|
this.defaults = t, this.interceptors = {
|
|
1161
|
-
request: new
|
|
1162
|
-
response: new
|
|
1412
|
+
request: new Fe(),
|
|
1413
|
+
response: new Fe()
|
|
1163
1414
|
};
|
|
1164
1415
|
}
|
|
1165
1416
|
/**
|
|
@@ -1170,74 +1421,91 @@ let J = class {
|
|
|
1170
1421
|
*
|
|
1171
1422
|
* @returns {Promise} The Promise to be fulfilled
|
|
1172
1423
|
*/
|
|
1173
|
-
request(t, n) {
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1424
|
+
async request(t, n) {
|
|
1425
|
+
try {
|
|
1426
|
+
return await this._request(t, n);
|
|
1427
|
+
} catch (r) {
|
|
1428
|
+
if (r instanceof Error) {
|
|
1429
|
+
let s;
|
|
1430
|
+
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
1431
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1432
|
+
try {
|
|
1433
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1434
|
+
` + o) : r.stack = o;
|
|
1435
|
+
} catch {
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
throw r;
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
_request(t, n) {
|
|
1442
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = k(this.defaults, n);
|
|
1443
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1444
|
+
r !== void 0 && ye.assertOptions(r, {
|
|
1445
|
+
silentJSONParsing: L.transitional(L.boolean),
|
|
1446
|
+
forcedJSONParsing: L.transitional(L.boolean),
|
|
1447
|
+
clarifyTimeoutError: L.transitional(L.boolean)
|
|
1180
1448
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1181
1449
|
serialize: s
|
|
1182
|
-
} :
|
|
1183
|
-
encode:
|
|
1184
|
-
serialize:
|
|
1450
|
+
} : ye.assertOptions(s, {
|
|
1451
|
+
encode: L.function,
|
|
1452
|
+
serialize: L.function
|
|
1185
1453
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1186
|
-
let
|
|
1187
|
-
|
|
1188
|
-
|
|
1454
|
+
let i = o && a.merge(
|
|
1455
|
+
o.common,
|
|
1456
|
+
o[n.method]
|
|
1189
1457
|
);
|
|
1190
|
-
|
|
1458
|
+
o && a.forEach(
|
|
1191
1459
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1192
|
-
(
|
|
1193
|
-
delete
|
|
1460
|
+
(h) => {
|
|
1461
|
+
delete o[h];
|
|
1194
1462
|
}
|
|
1195
|
-
), n.headers =
|
|
1463
|
+
), n.headers = O.concat(i, o);
|
|
1196
1464
|
const c = [];
|
|
1197
|
-
let
|
|
1198
|
-
this.interceptors.request.forEach(function(
|
|
1199
|
-
typeof
|
|
1465
|
+
let f = !0;
|
|
1466
|
+
this.interceptors.request.forEach(function(g) {
|
|
1467
|
+
typeof g.runWhen == "function" && g.runWhen(n) === !1 || (f = f && g.synchronous, c.unshift(g.fulfilled, g.rejected));
|
|
1200
1468
|
});
|
|
1201
|
-
const
|
|
1202
|
-
this.interceptors.response.forEach(function(
|
|
1203
|
-
|
|
1469
|
+
const u = [];
|
|
1470
|
+
this.interceptors.response.forEach(function(g) {
|
|
1471
|
+
u.push(g.fulfilled, g.rejected);
|
|
1204
1472
|
});
|
|
1205
|
-
let l,
|
|
1206
|
-
if (!
|
|
1207
|
-
const
|
|
1208
|
-
for (
|
|
1209
|
-
l = l.then(
|
|
1473
|
+
let l, d = 0, y;
|
|
1474
|
+
if (!f) {
|
|
1475
|
+
const h = [$e.bind(this), void 0];
|
|
1476
|
+
for (h.unshift.apply(h, c), h.push.apply(h, u), y = h.length, l = Promise.resolve(n); d < y; )
|
|
1477
|
+
l = l.then(h[d++], h[d++]);
|
|
1210
1478
|
return l;
|
|
1211
1479
|
}
|
|
1212
|
-
|
|
1213
|
-
let
|
|
1214
|
-
for (
|
|
1215
|
-
const
|
|
1480
|
+
y = c.length;
|
|
1481
|
+
let E = n;
|
|
1482
|
+
for (d = 0; d < y; ) {
|
|
1483
|
+
const h = c[d++], g = c[d++];
|
|
1216
1484
|
try {
|
|
1217
|
-
|
|
1218
|
-
} catch (
|
|
1219
|
-
|
|
1485
|
+
E = h(E);
|
|
1486
|
+
} catch (p) {
|
|
1487
|
+
g.call(this, p);
|
|
1220
1488
|
break;
|
|
1221
1489
|
}
|
|
1222
1490
|
}
|
|
1223
1491
|
try {
|
|
1224
|
-
l =
|
|
1225
|
-
} catch (
|
|
1226
|
-
return Promise.reject(
|
|
1492
|
+
l = $e.call(this, E);
|
|
1493
|
+
} catch (h) {
|
|
1494
|
+
return Promise.reject(h);
|
|
1227
1495
|
}
|
|
1228
|
-
for (
|
|
1229
|
-
l = l.then(
|
|
1496
|
+
for (d = 0, y = u.length; d < y; )
|
|
1497
|
+
l = l.then(u[d++], u[d++]);
|
|
1230
1498
|
return l;
|
|
1231
1499
|
}
|
|
1232
1500
|
getUri(t) {
|
|
1233
|
-
t =
|
|
1234
|
-
const n =
|
|
1235
|
-
return
|
|
1501
|
+
t = k(this.defaults, t);
|
|
1502
|
+
const n = dt(t.baseURL, t.url);
|
|
1503
|
+
return at(n, t.params, t.paramsSerializer);
|
|
1236
1504
|
}
|
|
1237
1505
|
};
|
|
1238
1506
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1239
|
-
|
|
1240
|
-
return this.request(
|
|
1507
|
+
I.prototype[t] = function(n, r) {
|
|
1508
|
+
return this.request(k(r || {}, {
|
|
1241
1509
|
method: t,
|
|
1242
1510
|
url: n,
|
|
1243
1511
|
data: (r || {}).data
|
|
@@ -1246,46 +1514,44 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1246
1514
|
});
|
|
1247
1515
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1248
1516
|
function n(r) {
|
|
1249
|
-
return function(
|
|
1250
|
-
return this.request(
|
|
1517
|
+
return function(o, i, c) {
|
|
1518
|
+
return this.request(k(c || {}, {
|
|
1251
1519
|
method: t,
|
|
1252
1520
|
headers: r ? {
|
|
1253
1521
|
"Content-Type": "multipart/form-data"
|
|
1254
1522
|
} : {},
|
|
1255
|
-
url:
|
|
1256
|
-
data:
|
|
1523
|
+
url: o,
|
|
1524
|
+
data: i
|
|
1257
1525
|
}));
|
|
1258
1526
|
};
|
|
1259
1527
|
}
|
|
1260
|
-
|
|
1528
|
+
I.prototype[t] = n(), I.prototype[t + "Form"] = n(!0);
|
|
1261
1529
|
});
|
|
1262
|
-
|
|
1263
|
-
let On = class nt {
|
|
1530
|
+
let Zn = class wt {
|
|
1264
1531
|
constructor(t) {
|
|
1265
1532
|
if (typeof t != "function")
|
|
1266
1533
|
throw new TypeError("executor must be a function.");
|
|
1267
1534
|
let n;
|
|
1268
|
-
this.promise = new Promise(function(
|
|
1269
|
-
n =
|
|
1535
|
+
this.promise = new Promise(function(o) {
|
|
1536
|
+
n = o;
|
|
1270
1537
|
});
|
|
1271
1538
|
const r = this;
|
|
1272
1539
|
this.promise.then((s) => {
|
|
1273
|
-
if (!r._listeners)
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
r._listeners[i](s);
|
|
1540
|
+
if (!r._listeners) return;
|
|
1541
|
+
let o = r._listeners.length;
|
|
1542
|
+
for (; o-- > 0; )
|
|
1543
|
+
r._listeners[o](s);
|
|
1278
1544
|
r._listeners = null;
|
|
1279
1545
|
}), this.promise.then = (s) => {
|
|
1280
|
-
let
|
|
1281
|
-
const
|
|
1282
|
-
r.subscribe(c),
|
|
1546
|
+
let o;
|
|
1547
|
+
const i = new Promise((c) => {
|
|
1548
|
+
r.subscribe(c), o = c;
|
|
1283
1549
|
}).then(s);
|
|
1284
|
-
return
|
|
1285
|
-
r.unsubscribe(
|
|
1286
|
-
},
|
|
1287
|
-
}, t(function(
|
|
1288
|
-
r.reason || (r.reason = new
|
|
1550
|
+
return i.cancel = function() {
|
|
1551
|
+
r.unsubscribe(o);
|
|
1552
|
+
}, i;
|
|
1553
|
+
}, t(function(o, i, c) {
|
|
1554
|
+
r.reason || (r.reason = new $(o, i, c), n(r.reason));
|
|
1289
1555
|
});
|
|
1290
1556
|
}
|
|
1291
1557
|
/**
|
|
@@ -1314,6 +1580,12 @@ let On = class nt {
|
|
|
1314
1580
|
const n = this._listeners.indexOf(t);
|
|
1315
1581
|
n !== -1 && this._listeners.splice(n, 1);
|
|
1316
1582
|
}
|
|
1583
|
+
toAbortSignal() {
|
|
1584
|
+
const t = new AbortController(), n = (r) => {
|
|
1585
|
+
t.abort(r);
|
|
1586
|
+
};
|
|
1587
|
+
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
1588
|
+
}
|
|
1317
1589
|
/**
|
|
1318
1590
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1319
1591
|
* cancels the `CancelToken`.
|
|
@@ -1321,23 +1593,22 @@ let On = class nt {
|
|
|
1321
1593
|
static source() {
|
|
1322
1594
|
let t;
|
|
1323
1595
|
return {
|
|
1324
|
-
token: new
|
|
1596
|
+
token: new wt(function(s) {
|
|
1325
1597
|
t = s;
|
|
1326
1598
|
}),
|
|
1327
1599
|
cancel: t
|
|
1328
1600
|
};
|
|
1329
1601
|
}
|
|
1330
1602
|
};
|
|
1331
|
-
|
|
1332
|
-
function Pn(e) {
|
|
1603
|
+
function er(e) {
|
|
1333
1604
|
return function(n) {
|
|
1334
1605
|
return e.apply(null, n);
|
|
1335
1606
|
};
|
|
1336
1607
|
}
|
|
1337
|
-
function
|
|
1608
|
+
function tr(e) {
|
|
1338
1609
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1339
1610
|
}
|
|
1340
|
-
const
|
|
1611
|
+
const we = {
|
|
1341
1612
|
Continue: 100,
|
|
1342
1613
|
SwitchingProtocols: 101,
|
|
1343
1614
|
Processing: 102,
|
|
@@ -1402,123 +1673,124 @@ const ce = {
|
|
|
1402
1673
|
NotExtended: 510,
|
|
1403
1674
|
NetworkAuthenticationRequired: 511
|
|
1404
1675
|
};
|
|
1405
|
-
Object.entries(
|
|
1406
|
-
|
|
1676
|
+
Object.entries(we).forEach(([e, t]) => {
|
|
1677
|
+
we[t] = e;
|
|
1407
1678
|
});
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
return rt(F(e, s));
|
|
1679
|
+
function bt(e) {
|
|
1680
|
+
const t = new I(e), n = Ge(I.prototype.request, t);
|
|
1681
|
+
return a.extend(n, I.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1682
|
+
return bt(k(e, s));
|
|
1413
1683
|
}, n;
|
|
1414
1684
|
}
|
|
1415
|
-
const
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1685
|
+
const b = bt(W);
|
|
1686
|
+
b.Axios = I;
|
|
1687
|
+
b.CanceledError = $;
|
|
1688
|
+
b.CancelToken = Zn;
|
|
1689
|
+
b.isCancel = lt;
|
|
1690
|
+
b.VERSION = yt;
|
|
1691
|
+
b.toFormData = se;
|
|
1692
|
+
b.AxiosError = m;
|
|
1693
|
+
b.Cancel = b.CanceledError;
|
|
1694
|
+
b.all = function(t) {
|
|
1425
1695
|
return Promise.all(t);
|
|
1426
1696
|
};
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
const
|
|
1436
|
-
Axios:
|
|
1437
|
-
AxiosError:
|
|
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
|
|
1697
|
+
b.spread = er;
|
|
1698
|
+
b.isAxiosError = tr;
|
|
1699
|
+
b.mergeConfig = k;
|
|
1700
|
+
b.AxiosHeaders = O;
|
|
1701
|
+
b.formToJSON = (e) => ut(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1702
|
+
b.getAdapter = gt.getAdapter;
|
|
1703
|
+
b.HttpStatusCode = we;
|
|
1704
|
+
b.default = b;
|
|
1705
|
+
const {
|
|
1706
|
+
Axios: Xr,
|
|
1707
|
+
AxiosError: X,
|
|
1708
|
+
CanceledError: Yr,
|
|
1709
|
+
isCancel: Qr,
|
|
1710
|
+
CancelToken: Zr,
|
|
1711
|
+
VERSION: es,
|
|
1712
|
+
all: ts,
|
|
1713
|
+
Cancel: ns,
|
|
1714
|
+
isAxiosError: rs,
|
|
1715
|
+
spread: ss,
|
|
1716
|
+
toFormData: os,
|
|
1717
|
+
AxiosHeaders: is,
|
|
1718
|
+
HttpStatusCode: as,
|
|
1719
|
+
formToJSON: cs,
|
|
1720
|
+
getAdapter: us,
|
|
1721
|
+
mergeConfig: ls
|
|
1722
|
+
} = b;
|
|
1723
|
+
class ze extends Error {
|
|
1454
1724
|
constructor(n) {
|
|
1455
1725
|
super(n.join(", "));
|
|
1456
|
-
|
|
1726
|
+
R(this, "errors");
|
|
1457
1727
|
this.name = "ValidationError", this.errors = n;
|
|
1458
1728
|
}
|
|
1459
1729
|
}
|
|
1460
|
-
class
|
|
1730
|
+
class Ve extends Error {
|
|
1461
1731
|
constructor(n) {
|
|
1462
1732
|
super("Address already registered.");
|
|
1463
|
-
|
|
1733
|
+
R(this, "address");
|
|
1464
1734
|
this.name = "AddressInUseError", this.address = n;
|
|
1465
1735
|
}
|
|
1466
1736
|
}
|
|
1467
|
-
class
|
|
1737
|
+
class Ke extends Error {
|
|
1468
1738
|
constructor(n) {
|
|
1469
1739
|
super("Code already registered.");
|
|
1470
|
-
|
|
1740
|
+
R(this, "code");
|
|
1471
1741
|
this.name = "CodeInUseError", this.code = n;
|
|
1472
1742
|
}
|
|
1473
1743
|
}
|
|
1474
|
-
class
|
|
1744
|
+
class Je extends Error {
|
|
1475
1745
|
constructor() {
|
|
1476
1746
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1477
1747
|
}
|
|
1478
1748
|
}
|
|
1479
|
-
class
|
|
1749
|
+
class nr {
|
|
1480
1750
|
constructor(t) {
|
|
1481
|
-
|
|
1482
|
-
|
|
1751
|
+
R(this, "httpClient");
|
|
1752
|
+
R(this, "_debug");
|
|
1483
1753
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1484
1754
|
}
|
|
1485
|
-
async create(t, n, r) {
|
|
1486
|
-
var
|
|
1755
|
+
async create(t, n, r, s) {
|
|
1756
|
+
var o;
|
|
1487
1757
|
try {
|
|
1488
1758
|
await this.httpClient.post("/affiliates", {
|
|
1489
1759
|
address: t,
|
|
1490
1760
|
name: n,
|
|
1491
1761
|
code: n,
|
|
1492
|
-
signature: r
|
|
1762
|
+
signature: r,
|
|
1763
|
+
account_chain_id: s
|
|
1493
1764
|
});
|
|
1494
1765
|
} catch (i) {
|
|
1495
|
-
if (i instanceof
|
|
1496
|
-
const
|
|
1497
|
-
if (typeof (
|
|
1498
|
-
const
|
|
1499
|
-
throw
|
|
1500
|
-
} else if ((
|
|
1501
|
-
throw new
|
|
1766
|
+
if (i instanceof X) {
|
|
1767
|
+
const c = (o = i.response) == null ? void 0 : o.data;
|
|
1768
|
+
if (typeof (c == null ? void 0 : c.message) == "string") {
|
|
1769
|
+
const f = c.message.toLowerCase();
|
|
1770
|
+
throw f == "invalid signature" ? new Je() : f == "address in use" ? new Ve(t) : f == "code in use" ? new Ke(n) : new Error(f);
|
|
1771
|
+
} else if ((c == null ? void 0 : c.message) instanceof Array)
|
|
1772
|
+
throw new ze(c.message);
|
|
1502
1773
|
}
|
|
1503
1774
|
throw i;
|
|
1504
1775
|
}
|
|
1505
1776
|
}
|
|
1506
|
-
async update(t, n, r) {
|
|
1507
|
-
var
|
|
1777
|
+
async update(t, n, r, s) {
|
|
1778
|
+
var o;
|
|
1508
1779
|
try {
|
|
1509
1780
|
await this.httpClient.post(`/affiliates/${t}`, {
|
|
1510
1781
|
code: n,
|
|
1511
1782
|
address: t,
|
|
1512
|
-
signature: r
|
|
1783
|
+
signature: r,
|
|
1784
|
+
account_chain_id: s
|
|
1513
1785
|
});
|
|
1514
1786
|
} catch (i) {
|
|
1515
|
-
if (i instanceof
|
|
1516
|
-
const
|
|
1517
|
-
if (typeof (
|
|
1518
|
-
const
|
|
1519
|
-
throw
|
|
1520
|
-
} else if ((
|
|
1521
|
-
throw new
|
|
1787
|
+
if (i instanceof X) {
|
|
1788
|
+
const c = (o = i.response) == null ? void 0 : o.data;
|
|
1789
|
+
if (typeof (c == null ? void 0 : c.message) == "string") {
|
|
1790
|
+
const f = c.message.toLowerCase();
|
|
1791
|
+
throw f == "invalid signature" ? new Je() : f == "address in use" ? new Ve(t) : f == "code in use" ? new Ke(n) : new Error(f);
|
|
1792
|
+
} else if ((c == null ? void 0 : c.message) instanceof Array)
|
|
1793
|
+
throw new ze(c.message);
|
|
1522
1794
|
}
|
|
1523
1795
|
throw i;
|
|
1524
1796
|
}
|
|
@@ -1528,7 +1800,7 @@ class Nn {
|
|
|
1528
1800
|
try {
|
|
1529
1801
|
return await this.httpClient.get(`/affiliates/codes/${t}`), !1;
|
|
1530
1802
|
} catch (r) {
|
|
1531
|
-
if (r instanceof
|
|
1803
|
+
if (r instanceof X && ((n = r.response) == null ? void 0 : n.status) === 404)
|
|
1532
1804
|
return !0;
|
|
1533
1805
|
throw console.error("Fuul SDK: Could not check affiliate code", r), r;
|
|
1534
1806
|
}
|
|
@@ -1538,26 +1810,26 @@ class Nn {
|
|
|
1538
1810
|
try {
|
|
1539
1811
|
return (await this.httpClient.get(`/affiliates/${t}`)).data.code;
|
|
1540
1812
|
} catch (r) {
|
|
1541
|
-
if (r instanceof
|
|
1813
|
+
if (r instanceof X && ((n = r.response) == null ? void 0 : n.status) === 404)
|
|
1542
1814
|
return null;
|
|
1543
1815
|
throw console.error("Fuul SDK: Could not get affiliate code", r), r;
|
|
1544
1816
|
}
|
|
1545
1817
|
}
|
|
1546
1818
|
}
|
|
1547
|
-
const
|
|
1548
|
-
class
|
|
1819
|
+
const rr = "/audiences";
|
|
1820
|
+
class sr {
|
|
1549
1821
|
constructor(t) {
|
|
1550
|
-
|
|
1551
|
-
|
|
1822
|
+
R(this, "httpClient");
|
|
1823
|
+
R(this, "_debug");
|
|
1552
1824
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1553
1825
|
}
|
|
1554
1826
|
async getUserAudiences(t) {
|
|
1555
|
-
return (await this.httpClient.get(`${
|
|
1827
|
+
return (await this.httpClient.get(`${rr}/user`, t)).data;
|
|
1556
1828
|
}
|
|
1557
1829
|
}
|
|
1558
|
-
class
|
|
1830
|
+
class or {
|
|
1559
1831
|
constructor(t) {
|
|
1560
|
-
|
|
1832
|
+
R(this, "httpClient");
|
|
1561
1833
|
this.httpClient = t.httpClient;
|
|
1562
1834
|
}
|
|
1563
1835
|
async getAll(t) {
|
|
@@ -1565,11 +1837,11 @@ class Ln {
|
|
|
1565
1837
|
return n;
|
|
1566
1838
|
}
|
|
1567
1839
|
}
|
|
1568
|
-
const
|
|
1569
|
-
class
|
|
1840
|
+
const Me = "fuul.sent", ir = 60;
|
|
1841
|
+
class ar {
|
|
1570
1842
|
constructor(t) {
|
|
1571
|
-
|
|
1572
|
-
|
|
1843
|
+
R(this, "debug");
|
|
1844
|
+
R(this, "httpClient");
|
|
1573
1845
|
this.httpClient = t.httpClient, this.debug = !!t.debug;
|
|
1574
1846
|
}
|
|
1575
1847
|
async sendEvent(t) {
|
|
@@ -1580,37 +1852,37 @@ class Bn {
|
|
|
1580
1852
|
await this.httpClient.post("events", t), this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
|
|
1581
1853
|
}
|
|
1582
1854
|
isDuplicate(t) {
|
|
1583
|
-
const n = `${
|
|
1855
|
+
const n = `${Me}_${t.name}`, r = localStorage.getItem(n);
|
|
1584
1856
|
if (!r)
|
|
1585
1857
|
return !1;
|
|
1586
1858
|
const s = JSON.parse(r);
|
|
1587
|
-
if (this.getCurrentTimestamp() - s.timestamp >
|
|
1859
|
+
if (this.getCurrentTimestamp() - s.timestamp > ir)
|
|
1588
1860
|
return !1;
|
|
1589
|
-
let
|
|
1590
|
-
t.metadata && (
|
|
1591
|
-
let
|
|
1592
|
-
return t.args && s.args && (
|
|
1861
|
+
let f = !1;
|
|
1862
|
+
t.metadata && (f = 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);
|
|
1863
|
+
let u = !1;
|
|
1864
|
+
return t.args && s.args && (u = s.args.page === t.args.page), u && f;
|
|
1593
1865
|
}
|
|
1594
1866
|
getCurrentTimestamp() {
|
|
1595
1867
|
return Date.now() / 1e3;
|
|
1596
1868
|
}
|
|
1597
1869
|
saveSentEvent(t) {
|
|
1598
|
-
const n = `${
|
|
1870
|
+
const n = `${Me}_${t.name}`, r = this.getCurrentTimestamp(), s = { ...t, timestamp: r };
|
|
1599
1871
|
localStorage.setItem(n, JSON.stringify(s));
|
|
1600
1872
|
}
|
|
1601
1873
|
}
|
|
1602
|
-
const
|
|
1603
|
-
version:
|
|
1874
|
+
const cr = "4.11.1", ur = {
|
|
1875
|
+
version: cr
|
|
1604
1876
|
};
|
|
1605
|
-
class
|
|
1877
|
+
class lr {
|
|
1606
1878
|
constructor(t) {
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
this.client =
|
|
1879
|
+
R(this, "client");
|
|
1880
|
+
R(this, "queryParams");
|
|
1881
|
+
this.client = b.create({
|
|
1610
1882
|
...t,
|
|
1611
1883
|
headers: {
|
|
1612
1884
|
Authorization: `Bearer ${t.apiKey}`,
|
|
1613
|
-
"X-Fuul-Sdk-Version":
|
|
1885
|
+
"X-Fuul-Sdk-Version": ur.version
|
|
1614
1886
|
}
|
|
1615
1887
|
}), this.queryParams = t.queryParams ? this.buildQueryParams(t.queryParams) : "";
|
|
1616
1888
|
}
|
|
@@ -1633,9 +1905,9 @@ class jn {
|
|
|
1633
1905
|
return this.client.delete(t + this.queryParams);
|
|
1634
1906
|
}
|
|
1635
1907
|
}
|
|
1636
|
-
class
|
|
1908
|
+
class fr {
|
|
1637
1909
|
constructor(t) {
|
|
1638
|
-
|
|
1910
|
+
R(this, "httpClient");
|
|
1639
1911
|
this.httpClient = t.httpClient;
|
|
1640
1912
|
}
|
|
1641
1913
|
async getPayoutsLeaderboard(t) {
|
|
@@ -1648,31 +1920,31 @@ class vn {
|
|
|
1648
1920
|
return (await this.httpClient.get("/leaderboard/referred", t)).data;
|
|
1649
1921
|
}
|
|
1650
1922
|
}
|
|
1651
|
-
const
|
|
1652
|
-
class
|
|
1923
|
+
const K = "/payouts";
|
|
1924
|
+
class dr {
|
|
1653
1925
|
constructor(t) {
|
|
1654
|
-
|
|
1655
|
-
|
|
1926
|
+
R(this, "httpClient");
|
|
1927
|
+
R(this, "_debug");
|
|
1656
1928
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1657
1929
|
}
|
|
1658
1930
|
async getUserPayoutsByConversion(t) {
|
|
1659
|
-
return (await this.httpClient.get(
|
|
1931
|
+
return (await this.httpClient.get(K, { ...t, type: "onchain-currency" })).data;
|
|
1660
1932
|
}
|
|
1661
1933
|
async getUserPointsByConversion(t) {
|
|
1662
|
-
return (await this.httpClient.get(
|
|
1934
|
+
return (await this.httpClient.get(K, { ...t, type: "point" })).data;
|
|
1663
1935
|
}
|
|
1664
1936
|
async getUserPayoutMovements(t) {
|
|
1665
|
-
return (await this.httpClient.get(`${
|
|
1937
|
+
return (await this.httpClient.get(`${K}/movements`, { ...t, type: "onchain-currency" })).data;
|
|
1666
1938
|
}
|
|
1667
1939
|
async getUserPointsMovements(t) {
|
|
1668
|
-
return (await this.httpClient.get(`${
|
|
1940
|
+
return (await this.httpClient.get(`${K}/movements`, { ...t, type: "point" })).data;
|
|
1669
1941
|
}
|
|
1670
1942
|
async getVolumeLeaderboard(t) {
|
|
1671
|
-
return (await this.httpClient.get(`${
|
|
1943
|
+
return (await this.httpClient.get(`${K}/leaderboard/volume`, t)).data;
|
|
1672
1944
|
}
|
|
1673
1945
|
}
|
|
1674
|
-
let
|
|
1675
|
-
const
|
|
1946
|
+
let hr = (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), "");
|
|
1947
|
+
const pr = "fuul.tracking_id", Ae = () => Er(pr, () => hr()), We = () => q("af") || q("referrer"), mr = () => document.referrer, gr = () => Sr(), yr = () => q("category"), wr = () => q("title"), br = () => q("tag"), Er = (e, t) => {
|
|
1676
1948
|
const n = localStorage.getItem(e);
|
|
1677
1949
|
if (n)
|
|
1678
1950
|
return n;
|
|
@@ -1680,42 +1952,42 @@ const Hn = "fuul.tracking_id", me = () => Wn(Hn, () => qn()), Be = () => L("af")
|
|
|
1680
1952
|
const r = t();
|
|
1681
1953
|
return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
|
|
1682
1954
|
}
|
|
1683
|
-
},
|
|
1684
|
-
const e =
|
|
1955
|
+
}, q = (e) => new URLSearchParams(window.location.search).get(e), Sr = () => {
|
|
1956
|
+
const e = q("source");
|
|
1685
1957
|
if (e)
|
|
1686
1958
|
return e;
|
|
1687
|
-
},
|
|
1688
|
-
class
|
|
1959
|
+
}, Cr = "/user";
|
|
1960
|
+
class Rr {
|
|
1689
1961
|
constructor(t) {
|
|
1690
|
-
|
|
1962
|
+
R(this, "httpClient");
|
|
1691
1963
|
this.httpClient = t.httpClient;
|
|
1692
1964
|
}
|
|
1693
1965
|
async getUserAffiliates(t) {
|
|
1694
|
-
return (await this.httpClient.get(
|
|
1966
|
+
return (await this.httpClient.get(Cr, t)).data.affiliates;
|
|
1695
1967
|
}
|
|
1696
1968
|
}
|
|
1697
|
-
const
|
|
1698
|
-
let
|
|
1699
|
-
function
|
|
1700
|
-
|
|
1969
|
+
const Ar = "https://api.fuul.xyz/api/v1/";
|
|
1970
|
+
let B = !1, be = !1, Te, F, Et, St, H, ie, z, Ct, ae;
|
|
1971
|
+
function Tr(e) {
|
|
1972
|
+
B = !!e.debug, !be && (Te = e.apiKey, Kr(), F = Jr(e.baseApiUrl ?? Ar, e.defaultQueryParams ?? {}), Et = new or({ httpClient: F, debug: B }), ie = new ar({ httpClient: F, debug: B }), H = new nr({ httpClient: F, debug: B }), z = new dr({ httpClient: F, debug: B }), St = new Rr({ httpClient: F }), Ct = new sr({ httpClient: F, debug: B }), ae = new fr({ httpClient: F }), be = !0, B && console.debug("Fuul SDK: init() complete"));
|
|
1701
1973
|
}
|
|
1702
|
-
function
|
|
1703
|
-
if (!
|
|
1974
|
+
function x() {
|
|
1975
|
+
if (!be)
|
|
1704
1976
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
1705
1977
|
}
|
|
1706
|
-
async function
|
|
1707
|
-
|
|
1978
|
+
async function Or(e, t) {
|
|
1979
|
+
x(), Oe(), _e();
|
|
1708
1980
|
const n = {
|
|
1709
1981
|
name: e,
|
|
1710
1982
|
args: t ?? {},
|
|
1711
1983
|
metadata: {
|
|
1712
|
-
tracking_id:
|
|
1984
|
+
tracking_id: Ae()
|
|
1713
1985
|
}
|
|
1714
1986
|
};
|
|
1715
|
-
await
|
|
1987
|
+
await ie.sendEvent(n);
|
|
1716
1988
|
}
|
|
1717
|
-
async function
|
|
1718
|
-
|
|
1989
|
+
async function _r(e) {
|
|
1990
|
+
x(), Oe(), _e();
|
|
1719
1991
|
const t = {
|
|
1720
1992
|
name: "pageview",
|
|
1721
1993
|
args: {
|
|
@@ -1723,20 +1995,20 @@ async function tr(e) {
|
|
|
1723
1995
|
locationOrigin: document.location.origin
|
|
1724
1996
|
},
|
|
1725
1997
|
metadata: {
|
|
1726
|
-
tracking_id:
|
|
1727
|
-
referrer_url:
|
|
1728
|
-
source:
|
|
1729
|
-
affiliate_id:
|
|
1730
|
-
referrer:
|
|
1731
|
-
category:
|
|
1732
|
-
title:
|
|
1733
|
-
tag:
|
|
1998
|
+
tracking_id: Ae(),
|
|
1999
|
+
referrer_url: mr(),
|
|
2000
|
+
source: gr(),
|
|
2001
|
+
affiliate_id: We() ?? void 0,
|
|
2002
|
+
referrer: We() ?? void 0,
|
|
2003
|
+
category: yr() ?? void 0,
|
|
2004
|
+
title: wr() ?? void 0,
|
|
2005
|
+
tag: br() ?? void 0
|
|
1734
2006
|
}
|
|
1735
2007
|
};
|
|
1736
|
-
await
|
|
2008
|
+
await ie.sendEvent(t);
|
|
1737
2009
|
}
|
|
1738
|
-
async function
|
|
1739
|
-
|
|
2010
|
+
async function Pr(e) {
|
|
2011
|
+
x(), Oe(), _e();
|
|
1740
2012
|
const t = {
|
|
1741
2013
|
name: "connect_wallet",
|
|
1742
2014
|
args: {
|
|
@@ -1744,109 +2016,109 @@ async function nr(e) {
|
|
|
1744
2016
|
locationOrigin: document.location.origin
|
|
1745
2017
|
},
|
|
1746
2018
|
metadata: {
|
|
1747
|
-
tracking_id:
|
|
2019
|
+
tracking_id: Ae()
|
|
1748
2020
|
}
|
|
1749
2021
|
};
|
|
1750
|
-
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
|
|
2022
|
+
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 ie.sendEvent(t);
|
|
1751
2023
|
}
|
|
1752
|
-
async function
|
|
1753
|
-
|
|
2024
|
+
async function xr(e) {
|
|
2025
|
+
x(), await H.create(e.address, e.code, e.signature, e.accountChainId);
|
|
1754
2026
|
}
|
|
1755
|
-
async function
|
|
1756
|
-
|
|
2027
|
+
async function Nr(e) {
|
|
2028
|
+
x(), await H.update(e.address, e.code, e.signature, e.accountChainId);
|
|
1757
2029
|
}
|
|
1758
|
-
async function
|
|
1759
|
-
return
|
|
2030
|
+
async function Ur(e) {
|
|
2031
|
+
return x(), await H.getCode(e);
|
|
1760
2032
|
}
|
|
1761
|
-
async function
|
|
1762
|
-
return
|
|
2033
|
+
async function Lr(e) {
|
|
2034
|
+
return x(), await H.isCodeFree(e);
|
|
1763
2035
|
}
|
|
1764
|
-
async function
|
|
1765
|
-
|
|
1766
|
-
const r = await
|
|
2036
|
+
async function Fr(e, t, n) {
|
|
2037
|
+
x();
|
|
2038
|
+
const r = await H.getCode(t), s = new URLSearchParams({
|
|
1767
2039
|
af: r ?? t
|
|
1768
2040
|
});
|
|
1769
2041
|
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()}`;
|
|
1770
2042
|
}
|
|
1771
|
-
function
|
|
1772
|
-
return
|
|
2043
|
+
function Dr(e) {
|
|
2044
|
+
return ae.getPayoutsLeaderboard(e);
|
|
1773
2045
|
}
|
|
1774
|
-
function
|
|
1775
|
-
return
|
|
2046
|
+
function Br(e) {
|
|
2047
|
+
return ae.getPointsLeaderboard(e);
|
|
1776
2048
|
}
|
|
1777
|
-
function
|
|
1778
|
-
return
|
|
2049
|
+
function vr(e) {
|
|
2050
|
+
return ae.getReferredUsersLeaderboard(e);
|
|
1779
2051
|
}
|
|
1780
|
-
function
|
|
1781
|
-
return
|
|
2052
|
+
function Ir(e) {
|
|
2053
|
+
return z.getVolumeLeaderboard(e);
|
|
1782
2054
|
}
|
|
1783
|
-
function
|
|
1784
|
-
return
|
|
2055
|
+
function kr(e) {
|
|
2056
|
+
return z.getUserPayoutsByConversion(e);
|
|
1785
2057
|
}
|
|
1786
|
-
function
|
|
1787
|
-
return
|
|
2058
|
+
function qr(e) {
|
|
2059
|
+
return z.getUserPointsByConversion(e);
|
|
1788
2060
|
}
|
|
1789
|
-
function
|
|
1790
|
-
return
|
|
2061
|
+
function jr(e) {
|
|
2062
|
+
return z.getUserPayoutMovements(e);
|
|
1791
2063
|
}
|
|
1792
|
-
function
|
|
1793
|
-
return
|
|
2064
|
+
function $r(e) {
|
|
2065
|
+
return z.getUserPointsMovements(e);
|
|
1794
2066
|
}
|
|
1795
|
-
async function
|
|
1796
|
-
return
|
|
2067
|
+
async function Hr(e) {
|
|
2068
|
+
return x(), Et.getAll(e);
|
|
1797
2069
|
}
|
|
1798
|
-
async function
|
|
1799
|
-
return
|
|
2070
|
+
async function zr(e) {
|
|
2071
|
+
return x(), St.getUserAffiliates(e);
|
|
1800
2072
|
}
|
|
1801
|
-
async function
|
|
1802
|
-
return
|
|
2073
|
+
async function Vr(e) {
|
|
2074
|
+
return x(), Ct.getUserAudiences(e);
|
|
1803
2075
|
}
|
|
1804
|
-
function
|
|
2076
|
+
function Oe() {
|
|
1805
2077
|
if (typeof window > "u" || typeof document > "u")
|
|
1806
2078
|
throw new Error("Fuul SDK: Browser context required");
|
|
1807
2079
|
}
|
|
1808
|
-
function
|
|
2080
|
+
function _e() {
|
|
1809
2081
|
if (navigator.webdriver)
|
|
1810
2082
|
throw new Error("Fuul SDK: You are using a browser automation tool");
|
|
1811
2083
|
}
|
|
1812
|
-
function
|
|
1813
|
-
if (!
|
|
2084
|
+
function Kr() {
|
|
2085
|
+
if (!Te)
|
|
1814
2086
|
throw new Error("Fuul SDK: Invalid API key");
|
|
1815
2087
|
}
|
|
1816
|
-
function
|
|
1817
|
-
return new
|
|
2088
|
+
function Jr(e, t) {
|
|
2089
|
+
return new lr({
|
|
1818
2090
|
baseURL: e,
|
|
1819
2091
|
timeout: 1e4,
|
|
1820
|
-
apiKey:
|
|
2092
|
+
apiKey: Te,
|
|
1821
2093
|
queryParams: t
|
|
1822
2094
|
});
|
|
1823
2095
|
}
|
|
1824
|
-
const
|
|
1825
|
-
init:
|
|
1826
|
-
sendEvent:
|
|
1827
|
-
sendPageview:
|
|
1828
|
-
sendConnectWallet:
|
|
1829
|
-
generateTrackingLink:
|
|
1830
|
-
getConversions:
|
|
1831
|
-
createAffiliateCode:
|
|
1832
|
-
updateAffiliateCode:
|
|
1833
|
-
getAffiliateCode:
|
|
1834
|
-
isAffiliateCodeFree:
|
|
1835
|
-
getPayoutsLeaderboard:
|
|
1836
|
-
getPointsLeaderboard:
|
|
1837
|
-
getReferredUsersLeaderboard:
|
|
1838
|
-
getUserAudiences:
|
|
1839
|
-
getUserPayoutsByConversion:
|
|
1840
|
-
getUserPointsByConversion:
|
|
1841
|
-
getUserPointsMovements:
|
|
1842
|
-
getUserPayoutMovements:
|
|
1843
|
-
getUserAffiliates:
|
|
1844
|
-
getVolumeLeaderboard:
|
|
2096
|
+
const fs = {
|
|
2097
|
+
init: Tr,
|
|
2098
|
+
sendEvent: Or,
|
|
2099
|
+
sendPageview: _r,
|
|
2100
|
+
sendConnectWallet: Pr,
|
|
2101
|
+
generateTrackingLink: Fr,
|
|
2102
|
+
getConversions: Hr,
|
|
2103
|
+
createAffiliateCode: xr,
|
|
2104
|
+
updateAffiliateCode: Nr,
|
|
2105
|
+
getAffiliateCode: Ur,
|
|
2106
|
+
isAffiliateCodeFree: Lr,
|
|
2107
|
+
getPayoutsLeaderboard: Dr,
|
|
2108
|
+
getPointsLeaderboard: Br,
|
|
2109
|
+
getReferredUsersLeaderboard: vr,
|
|
2110
|
+
getUserAudiences: Vr,
|
|
2111
|
+
getUserPayoutsByConversion: kr,
|
|
2112
|
+
getUserPointsByConversion: qr,
|
|
2113
|
+
getUserPointsMovements: $r,
|
|
2114
|
+
getUserPayoutMovements: jr,
|
|
2115
|
+
getUserAffiliates: zr,
|
|
2116
|
+
getVolumeLeaderboard: Ir
|
|
1845
2117
|
};
|
|
1846
2118
|
export {
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
2119
|
+
Ve as AddressInUseError,
|
|
2120
|
+
Ke as CodeInUseError,
|
|
2121
|
+
fs as Fuul,
|
|
2122
|
+
Je as InvalidSignatureError,
|
|
2123
|
+
ze as ValidationError
|
|
1852
2124
|
};
|