@fuul/sdk 4.8.0 → 4.9.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/audiences/AudienceService.d.ts +13 -0
- package/dist/audiences/AudienceService.d.ts.map +1 -0
- package/dist/core.d.ts +12 -1
- package/dist/core.d.ts.map +1 -1
- package/dist/index.mjs +372 -353
- package/dist/index.umd.js +5 -5
- package/dist/types/api.d.ts +7 -0
- package/dist/types/api.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
1
|
+
var ct = Object.defineProperty;
|
|
2
|
+
var ut = (e, t, n) => t in e ? ct(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var E = (e, t, n) => (ut(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
function Be(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: lt } = Object.prototype, { getPrototypeOf: ue } = Object, M = ((e) => (t) => {
|
|
10
|
+
const n = lt.call(t);
|
|
11
11
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
13
|
-
function
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), O = (e) => (e = e.toLowerCase(), (t) => M(t) === e), W = (e) => (t) => typeof t === e, { isArray: I } = Array, v = W("undefined");
|
|
13
|
+
function ft(e) {
|
|
14
14
|
return e !== null && !v(e) && e.constructor !== null && !v(e.constructor) && C(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
function
|
|
16
|
+
const Ie = O("ArrayBuffer");
|
|
17
|
+
function dt(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 && Ie(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const pt = W("string"), C = W("function"), ke = W("number"), G = (e) => e !== null && typeof e == "object", ht = (e) => e === !0 || e === !1, z = (e) => {
|
|
22
22
|
if (M(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
24
|
const t = ue(e);
|
|
25
25
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
26
|
-
},
|
|
26
|
+
}, mt = O("Date"), yt = O("File"), gt = O("Blob"), wt = O("FileList"), Et = (e) => G(e) && C(e.pipe), bt = (e) => {
|
|
27
27
|
let t;
|
|
28
28
|
return e && (typeof FormData == "function" && e instanceof FormData || C(e.append) && ((t = M(e)) === "formdata" || // detect form-data instance
|
|
29
29
|
t === "object" && C(e.toString) && e.toString() === "[object FormData]"));
|
|
30
|
-
},
|
|
30
|
+
}, St = O("URLSearchParams"), Ct = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
31
31
|
function $(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
32
32
|
if (e === null || typeof e > "u")
|
|
33
33
|
return;
|
|
@@ -42,7 +42,7 @@ function $(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
42
42
|
c = i[r], t.call(null, e[c], c, e);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function je(e, t) {
|
|
46
46
|
t = t.toLowerCase();
|
|
47
47
|
const n = Object.keys(e);
|
|
48
48
|
let r = n.length, s;
|
|
@@ -51,23 +51,23 @@ function ke(e, t) {
|
|
|
51
51
|
return s;
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
54
|
+
const ve = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), $e = (e) => !v(e) && e !== ve;
|
|
55
55
|
function re() {
|
|
56
|
-
const { caseless: e } =
|
|
57
|
-
const i = e &&
|
|
56
|
+
const { caseless: e } = $e(this) && this || {}, t = {}, n = (r, s) => {
|
|
57
|
+
const i = e && je(t, s) || s;
|
|
58
58
|
z(t[i]) && z(r) ? t[i] = re(t[i], r) : z(r) ? t[i] = re({}, r) : I(r) ? t[i] = r.slice() : t[i] = r;
|
|
59
59
|
};
|
|
60
60
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
61
61
|
arguments[r] && $(arguments[r], n);
|
|
62
62
|
return t;
|
|
63
63
|
}
|
|
64
|
-
const
|
|
65
|
-
n && C(s) ? e[i] =
|
|
66
|
-
}, { allOwnKeys: r }), e),
|
|
64
|
+
const At = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
65
|
+
n && C(s) ? e[i] = Be(s, n) : e[i] = s;
|
|
66
|
+
}, { allOwnKeys: r }), e), Rt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ot = (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
|
-
},
|
|
70
|
+
}, Tt = (e, t, n, r) => {
|
|
71
71
|
let s, i, o;
|
|
72
72
|
const c = {};
|
|
73
73
|
if (t = t || {}, e == null)
|
|
@@ -78,48 +78,48 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
|
78
78
|
e = n !== !1 && ue(e);
|
|
79
79
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
80
80
|
return t;
|
|
81
|
-
},
|
|
81
|
+
}, Pt = (e, t, n) => {
|
|
82
82
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
83
83
|
const r = e.indexOf(t, n);
|
|
84
84
|
return r !== -1 && r === n;
|
|
85
|
-
},
|
|
85
|
+
}, _t = (e) => {
|
|
86
86
|
if (!e)
|
|
87
87
|
return null;
|
|
88
88
|
if (I(e))
|
|
89
89
|
return e;
|
|
90
90
|
let t = e.length;
|
|
91
|
-
if (!
|
|
91
|
+
if (!ke(t))
|
|
92
92
|
return null;
|
|
93
93
|
const n = new Array(t);
|
|
94
94
|
for (; t-- > 0; )
|
|
95
95
|
n[t] = e[t];
|
|
96
96
|
return n;
|
|
97
|
-
},
|
|
97
|
+
}, xt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ue(Uint8Array)), Nt = (e, t) => {
|
|
98
98
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
99
99
|
let s;
|
|
100
100
|
for (; (s = r.next()) && !s.done; ) {
|
|
101
101
|
const i = s.value;
|
|
102
102
|
t.call(e, i[0], i[1]);
|
|
103
103
|
}
|
|
104
|
-
},
|
|
104
|
+
}, Ut = (e, t) => {
|
|
105
105
|
let n;
|
|
106
106
|
const r = [];
|
|
107
107
|
for (; (n = e.exec(t)) !== null; )
|
|
108
108
|
r.push(n);
|
|
109
109
|
return r;
|
|
110
|
-
},
|
|
110
|
+
}, Ft = O("HTMLFormElement"), Dt = (e) => e.toLowerCase().replace(
|
|
111
111
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
112
112
|
function(n, r, s) {
|
|
113
113
|
return r.toUpperCase() + s;
|
|
114
114
|
}
|
|
115
|
-
),
|
|
115
|
+
), we = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Lt = O("RegExp"), qe = (e, t) => {
|
|
116
116
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
117
117
|
$(n, (s, i) => {
|
|
118
118
|
let o;
|
|
119
119
|
(o = t(s, i, e)) !== !1 && (r[i] = o || s);
|
|
120
120
|
}), Object.defineProperties(e, r);
|
|
121
|
-
},
|
|
122
|
-
|
|
121
|
+
}, Bt = (e) => {
|
|
122
|
+
qe(e, (t, n) => {
|
|
123
123
|
if (C(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
124
124
|
return !1;
|
|
125
125
|
const r = e[n];
|
|
@@ -133,29 +133,29 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
|
-
},
|
|
136
|
+
}, It = (e, t) => {
|
|
137
137
|
const n = {}, r = (s) => {
|
|
138
138
|
s.forEach((i) => {
|
|
139
139
|
n[i] = !0;
|
|
140
140
|
});
|
|
141
141
|
};
|
|
142
142
|
return I(e) ? r(e) : r(String(e).split(t)), n;
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
DIGIT:
|
|
143
|
+
}, kt = () => {
|
|
144
|
+
}, jt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), Z = "abcdefghijklmnopqrstuvwxyz", Ee = "0123456789", He = {
|
|
145
|
+
DIGIT: Ee,
|
|
146
146
|
ALPHA: Z,
|
|
147
|
-
ALPHA_DIGIT: Z + Z.toUpperCase() +
|
|
148
|
-
},
|
|
147
|
+
ALPHA_DIGIT: Z + Z.toUpperCase() + Ee
|
|
148
|
+
}, vt = (e = 16, t = He.ALPHA_DIGIT) => {
|
|
149
149
|
let n = "";
|
|
150
150
|
const { length: r } = t;
|
|
151
151
|
for (; e--; )
|
|
152
152
|
n += t[Math.random() * r | 0];
|
|
153
153
|
return n;
|
|
154
154
|
};
|
|
155
|
-
function
|
|
155
|
+
function $t(e) {
|
|
156
156
|
return !!(e && C(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
157
157
|
}
|
|
158
|
-
const
|
|
158
|
+
const qt = (e) => {
|
|
159
159
|
const t = new Array(10), n = (r, s) => {
|
|
160
160
|
if (G(r)) {
|
|
161
161
|
if (t.indexOf(r) >= 0)
|
|
@@ -172,59 +172,59 @@ const vt = (e) => {
|
|
|
172
172
|
return r;
|
|
173
173
|
};
|
|
174
174
|
return n(e, 0);
|
|
175
|
-
},
|
|
175
|
+
}, Ht = O("AsyncFunction"), zt = (e) => e && (G(e) || C(e)) && C(e.then) && C(e.catch), a = {
|
|
176
176
|
isArray: I,
|
|
177
|
-
isArrayBuffer:
|
|
178
|
-
isBuffer:
|
|
179
|
-
isFormData:
|
|
180
|
-
isArrayBufferView:
|
|
181
|
-
isString:
|
|
182
|
-
isNumber:
|
|
183
|
-
isBoolean:
|
|
177
|
+
isArrayBuffer: Ie,
|
|
178
|
+
isBuffer: ft,
|
|
179
|
+
isFormData: bt,
|
|
180
|
+
isArrayBufferView: dt,
|
|
181
|
+
isString: pt,
|
|
182
|
+
isNumber: ke,
|
|
183
|
+
isBoolean: ht,
|
|
184
184
|
isObject: G,
|
|
185
185
|
isPlainObject: z,
|
|
186
186
|
isUndefined: v,
|
|
187
|
-
isDate:
|
|
188
|
-
isFile:
|
|
189
|
-
isBlob:
|
|
190
|
-
isRegExp:
|
|
187
|
+
isDate: mt,
|
|
188
|
+
isFile: yt,
|
|
189
|
+
isBlob: gt,
|
|
190
|
+
isRegExp: Lt,
|
|
191
191
|
isFunction: C,
|
|
192
|
-
isStream:
|
|
193
|
-
isURLSearchParams:
|
|
194
|
-
isTypedArray:
|
|
195
|
-
isFileList:
|
|
192
|
+
isStream: Et,
|
|
193
|
+
isURLSearchParams: St,
|
|
194
|
+
isTypedArray: xt,
|
|
195
|
+
isFileList: wt,
|
|
196
196
|
forEach: $,
|
|
197
197
|
merge: re,
|
|
198
|
-
extend:
|
|
199
|
-
trim:
|
|
200
|
-
stripBOM:
|
|
201
|
-
inherits:
|
|
202
|
-
toFlatObject:
|
|
198
|
+
extend: At,
|
|
199
|
+
trim: Ct,
|
|
200
|
+
stripBOM: Rt,
|
|
201
|
+
inherits: Ot,
|
|
202
|
+
toFlatObject: Tt,
|
|
203
203
|
kindOf: M,
|
|
204
|
-
kindOfTest:
|
|
205
|
-
endsWith:
|
|
206
|
-
toArray:
|
|
207
|
-
forEachEntry:
|
|
208
|
-
matchAll:
|
|
209
|
-
isHTMLForm:
|
|
210
|
-
hasOwnProperty:
|
|
211
|
-
hasOwnProp:
|
|
204
|
+
kindOfTest: O,
|
|
205
|
+
endsWith: Pt,
|
|
206
|
+
toArray: _t,
|
|
207
|
+
forEachEntry: Nt,
|
|
208
|
+
matchAll: Ut,
|
|
209
|
+
isHTMLForm: Ft,
|
|
210
|
+
hasOwnProperty: we,
|
|
211
|
+
hasOwnProp: we,
|
|
212
212
|
// 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:
|
|
213
|
+
reduceDescriptors: qe,
|
|
214
|
+
freezeMethods: Bt,
|
|
215
|
+
toObjectSet: It,
|
|
216
|
+
toCamelCase: Dt,
|
|
217
|
+
noop: kt,
|
|
218
|
+
toFiniteNumber: jt,
|
|
219
|
+
findKey: je,
|
|
220
|
+
global: ve,
|
|
221
|
+
isContextDefined: $e,
|
|
222
|
+
ALPHABET: He,
|
|
223
|
+
generateString: vt,
|
|
224
|
+
isSpecCompliantForm: $t,
|
|
225
|
+
toJSONObject: qt,
|
|
226
|
+
isAsyncFn: Ht,
|
|
227
|
+
isThenable: zt
|
|
228
228
|
};
|
|
229
229
|
function m(e, t, n, r, s) {
|
|
230
230
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s);
|
|
@@ -250,7 +250,7 @@ a.inherits(m, Error, {
|
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
252
|
});
|
|
253
|
-
const
|
|
253
|
+
const ze = m.prototype, Ve = {};
|
|
254
254
|
[
|
|
255
255
|
"ERR_BAD_OPTION_VALUE",
|
|
256
256
|
"ERR_BAD_OPTION",
|
|
@@ -266,32 +266,32 @@ const He = m.prototype, ze = {};
|
|
|
266
266
|
"ERR_INVALID_URL"
|
|
267
267
|
// eslint-disable-next-line func-names
|
|
268
268
|
].forEach((e) => {
|
|
269
|
-
|
|
269
|
+
Ve[e] = { value: e };
|
|
270
270
|
});
|
|
271
|
-
Object.defineProperties(m,
|
|
272
|
-
Object.defineProperty(
|
|
271
|
+
Object.defineProperties(m, Ve);
|
|
272
|
+
Object.defineProperty(ze, "isAxiosError", { value: !0 });
|
|
273
273
|
m.from = (e, t, n, r, s, i) => {
|
|
274
|
-
const o = Object.create(
|
|
274
|
+
const o = Object.create(ze);
|
|
275
275
|
return a.toFlatObject(e, o, function(p) {
|
|
276
276
|
return p !== Error.prototype;
|
|
277
277
|
}, (c) => c !== "isAxiosError"), m.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
278
278
|
};
|
|
279
|
-
const
|
|
279
|
+
const Vt = null;
|
|
280
280
|
function se(e) {
|
|
281
281
|
return a.isPlainObject(e) || a.isArray(e);
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function Ke(e) {
|
|
284
284
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function be(e, t, n) {
|
|
287
287
|
return e ? e.concat(t).map(function(s, i) {
|
|
288
|
-
return s =
|
|
288
|
+
return s = Ke(s), !n && i ? "[" + s + "]" : s;
|
|
289
289
|
}).join(n ? "." : "") : t;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Kt(e) {
|
|
292
292
|
return a.isArray(e) && !e.some(se);
|
|
293
293
|
}
|
|
294
|
-
const
|
|
294
|
+
const Jt = a.toFlatObject(a, {}, null, function(t) {
|
|
295
295
|
return /^is[A-Z]/.test(t);
|
|
296
296
|
});
|
|
297
297
|
function X(e, t, n) {
|
|
@@ -317,22 +317,22 @@ function X(e, t, n) {
|
|
|
317
317
|
return a.isArrayBuffer(f) || a.isTypedArray(f) ? p && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
318
318
|
}
|
|
319
319
|
function l(f, d, w) {
|
|
320
|
-
let
|
|
320
|
+
let b = f;
|
|
321
321
|
if (f && !w && typeof f == "object") {
|
|
322
322
|
if (a.endsWith(d, "{}"))
|
|
323
323
|
d = r ? d : d.slice(0, -2), f = JSON.stringify(f);
|
|
324
|
-
else if (a.isArray(f) &&
|
|
325
|
-
return d =
|
|
324
|
+
else if (a.isArray(f) && Kt(f) || (a.isFileList(f) || a.endsWith(d, "[]")) && (b = a.toArray(f)))
|
|
325
|
+
return d = Ke(d), b.forEach(function(_, at) {
|
|
326
326
|
!(a.isUndefined(_) || _ === null) && t.append(
|
|
327
327
|
// eslint-disable-next-line no-nested-ternary
|
|
328
|
-
o === !0 ?
|
|
328
|
+
o === !0 ? be([d], at, i) : o === null ? d : d + "[]",
|
|
329
329
|
h(_)
|
|
330
330
|
);
|
|
331
331
|
}), !1;
|
|
332
332
|
}
|
|
333
|
-
return se(f) ? !0 : (t.append(
|
|
333
|
+
return se(f) ? !0 : (t.append(be(w, d, i), h(f)), !1);
|
|
334
334
|
}
|
|
335
|
-
const u = [], g = Object.assign(
|
|
335
|
+
const u = [], g = Object.assign(Jt, {
|
|
336
336
|
defaultVisitor: l,
|
|
337
337
|
convertValue: h,
|
|
338
338
|
isVisitable: se
|
|
@@ -341,14 +341,14 @@ function X(e, t, n) {
|
|
|
341
341
|
if (!a.isUndefined(f)) {
|
|
342
342
|
if (u.indexOf(f) !== -1)
|
|
343
343
|
throw Error("Circular reference detected in " + d.join("."));
|
|
344
|
-
u.push(f), a.forEach(f, function(
|
|
345
|
-
(!(a.isUndefined(
|
|
344
|
+
u.push(f), a.forEach(f, function(b, P) {
|
|
345
|
+
(!(a.isUndefined(b) || b === null) && s.call(
|
|
346
346
|
t,
|
|
347
|
-
|
|
347
|
+
b,
|
|
348
348
|
a.isString(P) ? P.trim() : P,
|
|
349
349
|
d,
|
|
350
350
|
g
|
|
351
|
-
)) === !0 && S(
|
|
351
|
+
)) === !0 && S(b, d ? d.concat(P) : [P]);
|
|
352
352
|
}), u.pop();
|
|
353
353
|
}
|
|
354
354
|
}
|
|
@@ -356,7 +356,7 @@ function X(e, t, n) {
|
|
|
356
356
|
throw new TypeError("data must be an object");
|
|
357
357
|
return S(e), t;
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function Se(e) {
|
|
360
360
|
const t = {
|
|
361
361
|
"!": "%21",
|
|
362
362
|
"'": "%27",
|
|
@@ -373,25 +373,25 @@ function be(e) {
|
|
|
373
373
|
function le(e, t) {
|
|
374
374
|
this._pairs = [], e && X(e, this, t);
|
|
375
375
|
}
|
|
376
|
-
const
|
|
377
|
-
|
|
376
|
+
const Je = le.prototype;
|
|
377
|
+
Je.append = function(t, n) {
|
|
378
378
|
this._pairs.push([t, n]);
|
|
379
379
|
};
|
|
380
|
-
|
|
380
|
+
Je.toString = function(t) {
|
|
381
381
|
const n = t ? function(r) {
|
|
382
|
-
return t.call(this, r,
|
|
383
|
-
} :
|
|
382
|
+
return t.call(this, r, Se);
|
|
383
|
+
} : Se;
|
|
384
384
|
return this._pairs.map(function(s) {
|
|
385
385
|
return n(s[0]) + "=" + n(s[1]);
|
|
386
386
|
}, "").join("&");
|
|
387
387
|
};
|
|
388
|
-
function
|
|
388
|
+
function Mt(e) {
|
|
389
389
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Me(e, t, n) {
|
|
392
392
|
if (!t)
|
|
393
393
|
return e;
|
|
394
|
-
const r = n && n.encode ||
|
|
394
|
+
const r = n && n.encode || Mt, s = n && n.serialize;
|
|
395
395
|
let i;
|
|
396
396
|
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new le(t, n).toString(r), i) {
|
|
397
397
|
const o = e.indexOf("#");
|
|
@@ -399,7 +399,7 @@ function Je(e, t, n) {
|
|
|
399
399
|
}
|
|
400
400
|
return e;
|
|
401
401
|
}
|
|
402
|
-
class
|
|
402
|
+
class Wt {
|
|
403
403
|
constructor() {
|
|
404
404
|
this.handlers = [];
|
|
405
405
|
}
|
|
@@ -453,39 +453,39 @@ class Jt {
|
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
const
|
|
456
|
+
const Ce = Wt, We = {
|
|
457
457
|
silentJSONParsing: !0,
|
|
458
458
|
forcedJSONParsing: !0,
|
|
459
459
|
clarifyTimeoutError: !1
|
|
460
|
-
},
|
|
460
|
+
}, Gt = typeof URLSearchParams < "u" ? URLSearchParams : le, Xt = typeof FormData < "u" ? FormData : null, Yt = typeof Blob < "u" ? Blob : null, Qt = {
|
|
461
461
|
isBrowser: !0,
|
|
462
462
|
classes: {
|
|
463
|
-
URLSearchParams:
|
|
464
|
-
FormData:
|
|
465
|
-
Blob:
|
|
463
|
+
URLSearchParams: Gt,
|
|
464
|
+
FormData: Xt,
|
|
465
|
+
Blob: Yt
|
|
466
466
|
},
|
|
467
467
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
468
|
-
},
|
|
469
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(),
|
|
468
|
+
}, Ge = typeof window < "u" && typeof document < "u", Zt = ((e) => Ge && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), en = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
469
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
470
470
|
__proto__: null,
|
|
471
|
-
hasBrowserEnv:
|
|
472
|
-
hasStandardBrowserEnv:
|
|
473
|
-
hasStandardBrowserWebWorkerEnv:
|
|
474
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
475
|
-
...
|
|
476
|
-
...
|
|
471
|
+
hasBrowserEnv: Ge,
|
|
472
|
+
hasStandardBrowserEnv: Zt,
|
|
473
|
+
hasStandardBrowserWebWorkerEnv: en
|
|
474
|
+
}, Symbol.toStringTag, { value: "Module" })), R = {
|
|
475
|
+
...tn,
|
|
476
|
+
...Qt
|
|
477
477
|
};
|
|
478
|
-
function
|
|
479
|
-
return X(e, new
|
|
478
|
+
function nn(e, t) {
|
|
479
|
+
return X(e, new R.classes.URLSearchParams(), Object.assign({
|
|
480
480
|
visitor: function(n, r, s, i) {
|
|
481
|
-
return
|
|
481
|
+
return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
482
482
|
}
|
|
483
483
|
}, t));
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function rn(e) {
|
|
486
486
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function sn(e) {
|
|
489
489
|
const t = {}, n = Object.keys(e);
|
|
490
490
|
let r;
|
|
491
491
|
const s = n.length;
|
|
@@ -494,21 +494,21 @@ function nn(e) {
|
|
|
494
494
|
i = n[r], t[i] = e[i];
|
|
495
495
|
return t;
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Xe(e) {
|
|
498
498
|
function t(n, r, s, i) {
|
|
499
499
|
let o = n[i++];
|
|
500
500
|
const c = Number.isFinite(+o), p = i >= n.length;
|
|
501
|
-
return o = !o && a.isArray(s) ? s.length : o, p ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] =
|
|
501
|
+
return o = !o && a.isArray(s) ? s.length : o, p ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = sn(s[o])), !c);
|
|
502
502
|
}
|
|
503
503
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
504
504
|
const n = {};
|
|
505
505
|
return a.forEachEntry(e, (r, s) => {
|
|
506
|
-
t(
|
|
506
|
+
t(rn(r), s, n, 0);
|
|
507
507
|
}), n;
|
|
508
508
|
}
|
|
509
509
|
return null;
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function on(e, t, n) {
|
|
512
512
|
if (a.isString(e))
|
|
513
513
|
try {
|
|
514
514
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -519,12 +519,12 @@ function rn(e, t, n) {
|
|
|
519
519
|
return (n || JSON.stringify)(e);
|
|
520
520
|
}
|
|
521
521
|
const fe = {
|
|
522
|
-
transitional:
|
|
522
|
+
transitional: We,
|
|
523
523
|
adapter: ["xhr", "http"],
|
|
524
524
|
transformRequest: [function(t, n) {
|
|
525
525
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
|
|
526
526
|
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
527
|
-
return s && s ? JSON.stringify(
|
|
527
|
+
return s && s ? JSON.stringify(Xe(t)) : t;
|
|
528
528
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
529
529
|
return t;
|
|
530
530
|
if (a.isArrayBufferView(t))
|
|
@@ -534,7 +534,7 @@ const fe = {
|
|
|
534
534
|
let c;
|
|
535
535
|
if (i) {
|
|
536
536
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
537
|
-
return
|
|
537
|
+
return nn(t, this.formSerializer).toString();
|
|
538
538
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
539
539
|
const p = this.env && this.env.FormData;
|
|
540
540
|
return X(
|
|
@@ -544,7 +544,7 @@ const fe = {
|
|
|
544
544
|
);
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
return i || s ? (n.setContentType("application/json", !1),
|
|
547
|
+
return i || s ? (n.setContentType("application/json", !1), on(t)) : t;
|
|
548
548
|
}],
|
|
549
549
|
transformResponse: [function(t) {
|
|
550
550
|
const n = this.transitional || fe.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -569,8 +569,8 @@ const fe = {
|
|
|
569
569
|
maxContentLength: -1,
|
|
570
570
|
maxBodyLength: -1,
|
|
571
571
|
env: {
|
|
572
|
-
FormData:
|
|
573
|
-
Blob:
|
|
572
|
+
FormData: R.classes.FormData,
|
|
573
|
+
Blob: R.classes.Blob
|
|
574
574
|
},
|
|
575
575
|
validateStatus: function(t) {
|
|
576
576
|
return t >= 200 && t < 300;
|
|
@@ -585,7 +585,7 @@ const fe = {
|
|
|
585
585
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
586
586
|
fe.headers[e] = {};
|
|
587
587
|
});
|
|
588
|
-
const de = fe,
|
|
588
|
+
const de = fe, an = a.toObjectSet([
|
|
589
589
|
"age",
|
|
590
590
|
"authorization",
|
|
591
591
|
"content-length",
|
|
@@ -603,28 +603,28 @@ const de = fe, sn = a.toObjectSet([
|
|
|
603
603
|
"referer",
|
|
604
604
|
"retry-after",
|
|
605
605
|
"user-agent"
|
|
606
|
-
]),
|
|
606
|
+
]), cn = (e) => {
|
|
607
607
|
const t = {};
|
|
608
608
|
let n, r, s;
|
|
609
609
|
return e && e.split(`
|
|
610
610
|
`).forEach(function(o) {
|
|
611
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] &&
|
|
611
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && an[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
612
612
|
}), t;
|
|
613
|
-
},
|
|
613
|
+
}, Ae = Symbol("internals");
|
|
614
614
|
function j(e) {
|
|
615
615
|
return e && String(e).trim().toLowerCase();
|
|
616
616
|
}
|
|
617
617
|
function V(e) {
|
|
618
618
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(V) : String(e);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function un(e) {
|
|
621
621
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
622
622
|
let r;
|
|
623
623
|
for (; r = n.exec(e); )
|
|
624
624
|
t[r[1]] = r[2];
|
|
625
625
|
return t;
|
|
626
626
|
}
|
|
627
|
-
const
|
|
627
|
+
const ln = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
628
628
|
function ee(e, t, n, r, s) {
|
|
629
629
|
if (a.isFunction(r))
|
|
630
630
|
return r.call(this, t, n);
|
|
@@ -635,10 +635,10 @@ function ee(e, t, n, r, s) {
|
|
|
635
635
|
return r.test(t);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function fn(e) {
|
|
639
639
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function dn(e, t) {
|
|
642
642
|
const n = a.toCamelCase(" " + t);
|
|
643
643
|
["get", "set", "has"].forEach((r) => {
|
|
644
644
|
Object.defineProperty(e, r + n, {
|
|
@@ -649,7 +649,7 @@ function ln(e, t) {
|
|
|
649
649
|
});
|
|
650
650
|
});
|
|
651
651
|
}
|
|
652
|
-
let
|
|
652
|
+
let Y = class {
|
|
653
653
|
constructor(t) {
|
|
654
654
|
t && this.set(t);
|
|
655
655
|
}
|
|
@@ -663,7 +663,7 @@ let Q = class {
|
|
|
663
663
|
(!u || s[u] === void 0 || h === !0 || h === void 0 && s[u] !== !1) && (s[u || p] = V(c));
|
|
664
664
|
}
|
|
665
665
|
const o = (c, p) => a.forEach(c, (h, l) => i(h, l, p));
|
|
666
|
-
return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !
|
|
666
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !ln(t) ? o(cn(t), n) : t != null && i(n, t, r), this;
|
|
667
667
|
}
|
|
668
668
|
get(t, n) {
|
|
669
669
|
if (t = j(t), t) {
|
|
@@ -673,7 +673,7 @@ let Q = class {
|
|
|
673
673
|
if (!n)
|
|
674
674
|
return s;
|
|
675
675
|
if (n === !0)
|
|
676
|
-
return
|
|
676
|
+
return un(s);
|
|
677
677
|
if (a.isFunction(n))
|
|
678
678
|
return n.call(this, s, r);
|
|
679
679
|
if (a.isRegExp(n))
|
|
@@ -717,7 +717,7 @@ let Q = class {
|
|
|
717
717
|
n[o] = V(s), delete n[i];
|
|
718
718
|
return;
|
|
719
719
|
}
|
|
720
|
-
const c = t ?
|
|
720
|
+
const c = t ? fn(i) : String(i).trim();
|
|
721
721
|
c !== i && delete n[i], n[c] = V(s), r[c] = !0;
|
|
722
722
|
}), this;
|
|
723
723
|
}
|
|
@@ -748,18 +748,18 @@ let Q = class {
|
|
|
748
748
|
return n.forEach((s) => r.set(s)), r;
|
|
749
749
|
}
|
|
750
750
|
static accessor(t) {
|
|
751
|
-
const r = (this[
|
|
751
|
+
const r = (this[Ae] = this[Ae] = {
|
|
752
752
|
accessors: {}
|
|
753
753
|
}).accessors, s = this.prototype;
|
|
754
754
|
function i(o) {
|
|
755
755
|
const c = j(o);
|
|
756
|
-
r[c] || (
|
|
756
|
+
r[c] || (dn(s, o), r[c] = !0);
|
|
757
757
|
}
|
|
758
758
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
759
759
|
}
|
|
760
760
|
};
|
|
761
|
-
|
|
762
|
-
a.reduceDescriptors(
|
|
761
|
+
Y.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
762
|
+
a.reduceDescriptors(Y.prototype, ({ value: e }, t) => {
|
|
763
763
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
764
764
|
return {
|
|
765
765
|
get: () => e,
|
|
@@ -768,8 +768,8 @@ a.reduceDescriptors(Q.prototype, ({ value: e }, t) => {
|
|
|
768
768
|
}
|
|
769
769
|
};
|
|
770
770
|
});
|
|
771
|
-
a.freezeMethods(
|
|
772
|
-
const T =
|
|
771
|
+
a.freezeMethods(Y);
|
|
772
|
+
const T = Y;
|
|
773
773
|
function te(e, t) {
|
|
774
774
|
const n = this || de, r = t || n, s = T.from(r.headers);
|
|
775
775
|
let i = r.data;
|
|
@@ -777,7 +777,7 @@ function te(e, t) {
|
|
|
777
777
|
i = c.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
778
778
|
}), s.normalize(), i;
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function Ye(e) {
|
|
781
781
|
return !!(e && e.__CANCEL__);
|
|
782
782
|
}
|
|
783
783
|
function q(e, t, n) {
|
|
@@ -786,7 +786,7 @@ function q(e, t, n) {
|
|
|
786
786
|
a.inherits(q, m, {
|
|
787
787
|
__CANCEL__: !0
|
|
788
788
|
});
|
|
789
|
-
function
|
|
789
|
+
function pn(e, t, n) {
|
|
790
790
|
const r = n.config.validateStatus;
|
|
791
791
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
792
792
|
"Request failed with status code " + n.status,
|
|
@@ -796,7 +796,7 @@ function fn(e, t, n) {
|
|
|
796
796
|
n
|
|
797
797
|
));
|
|
798
798
|
}
|
|
799
|
-
const
|
|
799
|
+
const hn = R.hasStandardBrowserEnv ? (
|
|
800
800
|
// Standard browser envs support document.cookie
|
|
801
801
|
{
|
|
802
802
|
write(e, t, n, r, s, i) {
|
|
@@ -823,16 +823,16 @@ const dn = A.hasStandardBrowserEnv ? (
|
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
825
|
);
|
|
826
|
-
function
|
|
826
|
+
function mn(e) {
|
|
827
827
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function yn(e, t) {
|
|
830
830
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
831
831
|
}
|
|
832
832
|
function Qe(e, t) {
|
|
833
|
-
return e && !
|
|
833
|
+
return e && !mn(t) ? yn(e, t) : t;
|
|
834
834
|
}
|
|
835
|
-
const
|
|
835
|
+
const gn = R.hasStandardBrowserEnv ? (
|
|
836
836
|
// Standard browser envs have full support of the APIs needed to test
|
|
837
837
|
// whether the request URL is of the same origin as current location.
|
|
838
838
|
function() {
|
|
@@ -864,11 +864,11 @@ const mn = A.hasStandardBrowserEnv ? (
|
|
|
864
864
|
};
|
|
865
865
|
}()
|
|
866
866
|
);
|
|
867
|
-
function
|
|
867
|
+
function wn(e) {
|
|
868
868
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
869
869
|
return t && t[1] || "";
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function En(e, t) {
|
|
872
872
|
e = e || 10;
|
|
873
873
|
const n = new Array(e), r = new Array(e);
|
|
874
874
|
let s = 0, i = 0, o;
|
|
@@ -884,9 +884,9 @@ function gn(e, t) {
|
|
|
884
884
|
return S ? Math.round(g * 1e3 / S) : void 0;
|
|
885
885
|
};
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function Re(e, t) {
|
|
888
888
|
let n = 0;
|
|
889
|
-
const r =
|
|
889
|
+
const r = En(50, 250);
|
|
890
890
|
return (s) => {
|
|
891
891
|
const i = s.loaded, o = s.lengthComputable ? s.total : void 0, c = i - n, p = r(c), h = i <= o;
|
|
892
892
|
n = i;
|
|
@@ -902,7 +902,7 @@ function Ae(e, t) {
|
|
|
902
902
|
l[t ? "download" : "upload"] = !0, e(l);
|
|
903
903
|
};
|
|
904
904
|
}
|
|
905
|
-
const
|
|
905
|
+
const bn = typeof XMLHttpRequest < "u", Sn = bn && function(e) {
|
|
906
906
|
return new Promise(function(n, r) {
|
|
907
907
|
let s = e.data;
|
|
908
908
|
const i = T.from(e.headers).normalize();
|
|
@@ -912,10 +912,10 @@ const wn = typeof XMLHttpRequest < "u", En = wn && function(e) {
|
|
|
912
912
|
}
|
|
913
913
|
let l;
|
|
914
914
|
if (a.isFormData(s)) {
|
|
915
|
-
if (
|
|
915
|
+
if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
|
|
916
916
|
i.setContentType(!1);
|
|
917
917
|
else if ((l = i.getContentType()) !== !1) {
|
|
918
|
-
const [d, ...w] = l ? l.split(";").map((
|
|
918
|
+
const [d, ...w] = l ? l.split(";").map((b) => b.trim()).filter(Boolean) : [];
|
|
919
919
|
i.setContentType([d || "multipart/form-data", ...w].join("; "));
|
|
920
920
|
}
|
|
921
921
|
}
|
|
@@ -925,13 +925,13 @@ const wn = typeof XMLHttpRequest < "u", En = wn && function(e) {
|
|
|
925
925
|
i.set("Authorization", "Basic " + btoa(d + ":" + w));
|
|
926
926
|
}
|
|
927
927
|
const g = Qe(e.baseURL, e.url);
|
|
928
|
-
u.open(e.method.toUpperCase(),
|
|
928
|
+
u.open(e.method.toUpperCase(), Me(g, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
|
|
929
929
|
function S() {
|
|
930
930
|
if (!u)
|
|
931
931
|
return;
|
|
932
932
|
const d = T.from(
|
|
933
933
|
"getAllResponseHeaders" in u && u.getAllResponseHeaders()
|
|
934
|
-
),
|
|
934
|
+
), b = {
|
|
935
935
|
data: !o || o === "text" || o === "json" ? u.responseText : u.response,
|
|
936
936
|
status: u.status,
|
|
937
937
|
statusText: u.statusText,
|
|
@@ -939,11 +939,11 @@ const wn = typeof XMLHttpRequest < "u", En = wn && function(e) {
|
|
|
939
939
|
config: e,
|
|
940
940
|
request: u
|
|
941
941
|
};
|
|
942
|
-
|
|
942
|
+
pn(function(_) {
|
|
943
943
|
n(_), h();
|
|
944
944
|
}, function(_) {
|
|
945
945
|
r(_), h();
|
|
946
|
-
},
|
|
946
|
+
}, b), u = null;
|
|
947
947
|
}
|
|
948
948
|
if ("onloadend" in u ? u.onloadend = S : u.onreadystatechange = function() {
|
|
949
949
|
!u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
@@ -953,32 +953,32 @@ const wn = typeof XMLHttpRequest < "u", En = wn && function(e) {
|
|
|
953
953
|
r(new m("Network Error", m.ERR_NETWORK, e, u)), u = null;
|
|
954
954
|
}, u.ontimeout = function() {
|
|
955
955
|
let w = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
956
|
-
const
|
|
956
|
+
const b = e.transitional || We;
|
|
957
957
|
e.timeoutErrorMessage && (w = e.timeoutErrorMessage), r(new m(
|
|
958
958
|
w,
|
|
959
|
-
|
|
959
|
+
b.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
960
960
|
e,
|
|
961
961
|
u
|
|
962
962
|
)), u = null;
|
|
963
|
-
},
|
|
964
|
-
const d = e.xsrfHeaderName && e.xsrfCookieName &&
|
|
963
|
+
}, R.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && gn(g))) {
|
|
964
|
+
const d = e.xsrfHeaderName && e.xsrfCookieName && hn.read(e.xsrfCookieName);
|
|
965
965
|
d && i.set(e.xsrfHeaderName, d);
|
|
966
966
|
}
|
|
967
|
-
s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(w,
|
|
968
|
-
u.setRequestHeader(
|
|
969
|
-
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress",
|
|
967
|
+
s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(w, b) {
|
|
968
|
+
u.setRequestHeader(b, w);
|
|
969
|
+
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Re(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Re(e.onUploadProgress)), (e.cancelToken || e.signal) && (p = (d) => {
|
|
970
970
|
u && (r(!d || d.type ? new q(null, e, u) : d), u.abort(), u = null);
|
|
971
971
|
}, e.cancelToken && e.cancelToken.subscribe(p), e.signal && (e.signal.aborted ? p() : e.signal.addEventListener("abort", p)));
|
|
972
|
-
const f =
|
|
973
|
-
if (f &&
|
|
972
|
+
const f = wn(g);
|
|
973
|
+
if (f && R.protocols.indexOf(f) === -1) {
|
|
974
974
|
r(new m("Unsupported protocol " + f + ":", m.ERR_BAD_REQUEST, e));
|
|
975
975
|
return;
|
|
976
976
|
}
|
|
977
977
|
u.send(s || null);
|
|
978
978
|
});
|
|
979
979
|
}, oe = {
|
|
980
|
-
http:
|
|
981
|
-
xhr:
|
|
980
|
+
http: Vt,
|
|
981
|
+
xhr: Sn
|
|
982
982
|
};
|
|
983
983
|
a.forEach(oe, (e, t) => {
|
|
984
984
|
if (e) {
|
|
@@ -989,7 +989,7 @@ a.forEach(oe, (e, t) => {
|
|
|
989
989
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
990
990
|
}
|
|
991
991
|
});
|
|
992
|
-
const
|
|
992
|
+
const Oe = (e) => `- ${e}`, Cn = (e) => a.isFunction(e) || e === null || e === !1, Ze = {
|
|
993
993
|
getAdapter: (e) => {
|
|
994
994
|
e = a.isArray(e) ? e : [e];
|
|
995
995
|
const { length: t } = e;
|
|
@@ -998,7 +998,7 @@ const Re = (e) => `- ${e}`, bn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
998
998
|
for (let i = 0; i < t; i++) {
|
|
999
999
|
n = e[i];
|
|
1000
1000
|
let o;
|
|
1001
|
-
if (r = n, !
|
|
1001
|
+
if (r = n, !Cn(n) && (r = oe[(o = String(n)).toLowerCase()], r === void 0))
|
|
1002
1002
|
throw new m(`Unknown adapter '${o}'`);
|
|
1003
1003
|
if (r)
|
|
1004
1004
|
break;
|
|
@@ -1009,8 +1009,8 @@ const Re = (e) => `- ${e}`, bn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1009
1009
|
([c, p]) => `adapter ${c} ` + (p === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1010
1010
|
);
|
|
1011
1011
|
let o = t ? i.length > 1 ? `since :
|
|
1012
|
-
` + i.map(
|
|
1013
|
-
`) : " " +
|
|
1012
|
+
` + i.map(Oe).join(`
|
|
1013
|
+
`) : " " + Oe(i[0]) : "as no adapter specified";
|
|
1014
1014
|
throw new m(
|
|
1015
1015
|
"There is no suitable adapter to dispatch the request " + o,
|
|
1016
1016
|
"ERR_NOT_SUPPORT"
|
|
@@ -1024,25 +1024,25 @@ function ne(e) {
|
|
|
1024
1024
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1025
1025
|
throw new q(null, e);
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1027
|
+
function Te(e) {
|
|
1028
1028
|
return ne(e), e.headers = T.from(e.headers), e.data = te.call(
|
|
1029
1029
|
e,
|
|
1030
1030
|
e.transformRequest
|
|
1031
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1031
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ze.getAdapter(e.adapter || de.adapter)(e).then(function(r) {
|
|
1032
1032
|
return ne(e), r.data = te.call(
|
|
1033
1033
|
e,
|
|
1034
1034
|
e.transformResponse,
|
|
1035
1035
|
r
|
|
1036
1036
|
), r.headers = T.from(r.headers), r;
|
|
1037
1037
|
}, function(r) {
|
|
1038
|
-
return
|
|
1038
|
+
return Ye(r) || (ne(e), r && r.response && (r.response.data = te.call(
|
|
1039
1039
|
e,
|
|
1040
1040
|
e.transformResponse,
|
|
1041
1041
|
r.response
|
|
1042
1042
|
), r.response.headers = T.from(r.response.headers))), Promise.reject(r);
|
|
1043
1043
|
});
|
|
1044
1044
|
}
|
|
1045
|
-
const
|
|
1045
|
+
const Pe = (e) => e instanceof T ? e.toJSON() : e;
|
|
1046
1046
|
function L(e, t) {
|
|
1047
1047
|
t = t || {};
|
|
1048
1048
|
const n = {};
|
|
@@ -1102,23 +1102,23 @@ function L(e, t) {
|
|
|
1102
1102
|
socketPath: o,
|
|
1103
1103
|
responseEncoding: o,
|
|
1104
1104
|
validateStatus: c,
|
|
1105
|
-
headers: (h, l) => s(
|
|
1105
|
+
headers: (h, l) => s(Pe(h), Pe(l), !0)
|
|
1106
1106
|
};
|
|
1107
1107
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1108
1108
|
const u = p[l] || s, g = u(e[l], t[l], l);
|
|
1109
1109
|
a.isUndefined(g) && u !== c || (n[l] = g);
|
|
1110
1110
|
}), n;
|
|
1111
1111
|
}
|
|
1112
|
-
const
|
|
1112
|
+
const et = "1.6.3", pe = {};
|
|
1113
1113
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1114
1114
|
pe[e] = function(r) {
|
|
1115
1115
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1116
1116
|
};
|
|
1117
1117
|
});
|
|
1118
|
-
const
|
|
1118
|
+
const _e = {};
|
|
1119
1119
|
pe.transitional = function(t, n, r) {
|
|
1120
1120
|
function s(i, o) {
|
|
1121
|
-
return "[Axios v" +
|
|
1121
|
+
return "[Axios v" + et + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1122
1122
|
}
|
|
1123
1123
|
return (i, o, c) => {
|
|
1124
1124
|
if (t === !1)
|
|
@@ -1126,7 +1126,7 @@ pe.transitional = function(t, n, r) {
|
|
|
1126
1126
|
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
1127
1127
|
m.ERR_DEPRECATED
|
|
1128
1128
|
);
|
|
1129
|
-
return n && !
|
|
1129
|
+
return n && !_e[o] && (_e[o] = !0, console.warn(
|
|
1130
1130
|
s(
|
|
1131
1131
|
o,
|
|
1132
1132
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1134,7 +1134,7 @@ pe.transitional = function(t, n, r) {
|
|
|
1134
1134
|
)), t ? t(i, o, c) : !0;
|
|
1135
1135
|
};
|
|
1136
1136
|
};
|
|
1137
|
-
function
|
|
1137
|
+
function An(e, t, n) {
|
|
1138
1138
|
if (typeof e != "object")
|
|
1139
1139
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1140
1140
|
const r = Object.keys(e);
|
|
@@ -1152,14 +1152,14 @@ function Sn(e, t, n) {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
1154
|
const ie = {
|
|
1155
|
-
assertOptions:
|
|
1155
|
+
assertOptions: An,
|
|
1156
1156
|
validators: pe
|
|
1157
1157
|
}, x = ie.validators;
|
|
1158
1158
|
let J = class {
|
|
1159
1159
|
constructor(t) {
|
|
1160
1160
|
this.defaults = t, this.interceptors = {
|
|
1161
|
-
request: new
|
|
1162
|
-
response: new
|
|
1161
|
+
request: new Ce(),
|
|
1162
|
+
response: new Ce()
|
|
1163
1163
|
};
|
|
1164
1164
|
}
|
|
1165
1165
|
/**
|
|
@@ -1204,7 +1204,7 @@ let J = class {
|
|
|
1204
1204
|
});
|
|
1205
1205
|
let l, u = 0, g;
|
|
1206
1206
|
if (!p) {
|
|
1207
|
-
const f = [
|
|
1207
|
+
const f = [Te.bind(this), void 0];
|
|
1208
1208
|
for (f.unshift.apply(f, c), f.push.apply(f, h), g = f.length, l = Promise.resolve(n); u < g; )
|
|
1209
1209
|
l = l.then(f[u++], f[u++]);
|
|
1210
1210
|
return l;
|
|
@@ -1221,7 +1221,7 @@ let J = class {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
1223
|
try {
|
|
1224
|
-
l =
|
|
1224
|
+
l = Te.call(this, S);
|
|
1225
1225
|
} catch (f) {
|
|
1226
1226
|
return Promise.reject(f);
|
|
1227
1227
|
}
|
|
@@ -1232,7 +1232,7 @@ let J = class {
|
|
|
1232
1232
|
getUri(t) {
|
|
1233
1233
|
t = L(this.defaults, t);
|
|
1234
1234
|
const n = Qe(t.baseURL, t.url);
|
|
1235
|
-
return
|
|
1235
|
+
return Me(n, t.params, t.paramsSerializer);
|
|
1236
1236
|
}
|
|
1237
1237
|
};
|
|
1238
1238
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1260,7 +1260,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1260
1260
|
J.prototype[t] = n(), J.prototype[t + "Form"] = n(!0);
|
|
1261
1261
|
});
|
|
1262
1262
|
const K = J;
|
|
1263
|
-
let
|
|
1263
|
+
let Rn = class tt {
|
|
1264
1264
|
constructor(t) {
|
|
1265
1265
|
if (typeof t != "function")
|
|
1266
1266
|
throw new TypeError("executor must be a function.");
|
|
@@ -1321,20 +1321,20 @@ let Cn = class et {
|
|
|
1321
1321
|
static source() {
|
|
1322
1322
|
let t;
|
|
1323
1323
|
return {
|
|
1324
|
-
token: new
|
|
1324
|
+
token: new tt(function(s) {
|
|
1325
1325
|
t = s;
|
|
1326
1326
|
}),
|
|
1327
1327
|
cancel: t
|
|
1328
1328
|
};
|
|
1329
1329
|
}
|
|
1330
1330
|
};
|
|
1331
|
-
const
|
|
1332
|
-
function
|
|
1331
|
+
const On = Rn;
|
|
1332
|
+
function Tn(e) {
|
|
1333
1333
|
return function(n) {
|
|
1334
1334
|
return e.apply(null, n);
|
|
1335
1335
|
};
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function Pn(e) {
|
|
1338
1338
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1339
1339
|
}
|
|
1340
1340
|
const ae = {
|
|
@@ -1405,81 +1405,81 @@ const ae = {
|
|
|
1405
1405
|
Object.entries(ae).forEach(([e, t]) => {
|
|
1406
1406
|
ae[t] = e;
|
|
1407
1407
|
});
|
|
1408
|
-
const
|
|
1409
|
-
function
|
|
1410
|
-
const t = new K(e), n =
|
|
1408
|
+
const _n = ae;
|
|
1409
|
+
function nt(e) {
|
|
1410
|
+
const t = new K(e), n = Be(K.prototype.request, t);
|
|
1411
1411
|
return a.extend(n, K.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1412
|
-
return
|
|
1412
|
+
return nt(L(e, s));
|
|
1413
1413
|
}, n;
|
|
1414
1414
|
}
|
|
1415
|
-
const y =
|
|
1415
|
+
const y = nt(de);
|
|
1416
1416
|
y.Axios = K;
|
|
1417
1417
|
y.CanceledError = q;
|
|
1418
|
-
y.CancelToken =
|
|
1419
|
-
y.isCancel =
|
|
1420
|
-
y.VERSION =
|
|
1418
|
+
y.CancelToken = On;
|
|
1419
|
+
y.isCancel = Ye;
|
|
1420
|
+
y.VERSION = et;
|
|
1421
1421
|
y.toFormData = X;
|
|
1422
1422
|
y.AxiosError = m;
|
|
1423
1423
|
y.Cancel = y.CanceledError;
|
|
1424
1424
|
y.all = function(t) {
|
|
1425
1425
|
return Promise.all(t);
|
|
1426
1426
|
};
|
|
1427
|
-
y.spread =
|
|
1428
|
-
y.isAxiosError =
|
|
1427
|
+
y.spread = Tn;
|
|
1428
|
+
y.isAxiosError = Pn;
|
|
1429
1429
|
y.mergeConfig = L;
|
|
1430
1430
|
y.AxiosHeaders = T;
|
|
1431
|
-
y.formToJSON = (e) =>
|
|
1432
|
-
y.getAdapter =
|
|
1433
|
-
y.HttpStatusCode =
|
|
1431
|
+
y.formToJSON = (e) => Xe(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1432
|
+
y.getAdapter = Ze.getAdapter;
|
|
1433
|
+
y.HttpStatusCode = _n;
|
|
1434
1434
|
y.default = y;
|
|
1435
|
-
const
|
|
1436
|
-
Axios:
|
|
1435
|
+
const rt = y, {
|
|
1436
|
+
Axios: Sr,
|
|
1437
1437
|
AxiosError: H,
|
|
1438
|
-
CanceledError:
|
|
1439
|
-
isCancel:
|
|
1440
|
-
CancelToken:
|
|
1441
|
-
VERSION:
|
|
1442
|
-
all:
|
|
1443
|
-
Cancel:
|
|
1444
|
-
isAxiosError:
|
|
1445
|
-
spread:
|
|
1446
|
-
toFormData:
|
|
1447
|
-
AxiosHeaders:
|
|
1448
|
-
HttpStatusCode:
|
|
1449
|
-
formToJSON:
|
|
1450
|
-
getAdapter:
|
|
1451
|
-
mergeConfig:
|
|
1452
|
-
} =
|
|
1453
|
-
class
|
|
1438
|
+
CanceledError: Cr,
|
|
1439
|
+
isCancel: Ar,
|
|
1440
|
+
CancelToken: Rr,
|
|
1441
|
+
VERSION: Or,
|
|
1442
|
+
all: Tr,
|
|
1443
|
+
Cancel: Pr,
|
|
1444
|
+
isAxiosError: _r,
|
|
1445
|
+
spread: xr,
|
|
1446
|
+
toFormData: Nr,
|
|
1447
|
+
AxiosHeaders: Ur,
|
|
1448
|
+
HttpStatusCode: Fr,
|
|
1449
|
+
formToJSON: Dr,
|
|
1450
|
+
getAdapter: Lr,
|
|
1451
|
+
mergeConfig: Br
|
|
1452
|
+
} = rt;
|
|
1453
|
+
class xe extends Error {
|
|
1454
1454
|
constructor(n) {
|
|
1455
1455
|
super(n.join(", "));
|
|
1456
|
-
|
|
1456
|
+
E(this, "errors");
|
|
1457
1457
|
this.name = "ValidationError", this.errors = n;
|
|
1458
1458
|
}
|
|
1459
1459
|
}
|
|
1460
|
-
class
|
|
1460
|
+
class Ne extends Error {
|
|
1461
1461
|
constructor(n) {
|
|
1462
1462
|
super("Address already registered.");
|
|
1463
|
-
|
|
1463
|
+
E(this, "address");
|
|
1464
1464
|
this.name = "AddressInUseError", this.address = n;
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
|
-
class
|
|
1467
|
+
class Ue extends Error {
|
|
1468
1468
|
constructor(n) {
|
|
1469
1469
|
super("Code already registered.");
|
|
1470
|
-
|
|
1470
|
+
E(this, "code");
|
|
1471
1471
|
this.name = "CodeInUseError", this.code = n;
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
|
-
class
|
|
1474
|
+
class Fe extends Error {
|
|
1475
1475
|
constructor() {
|
|
1476
1476
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1477
1477
|
}
|
|
1478
1478
|
}
|
|
1479
|
-
class
|
|
1479
|
+
class xn {
|
|
1480
1480
|
constructor(t) {
|
|
1481
|
-
|
|
1482
|
-
|
|
1481
|
+
E(this, "httpClient");
|
|
1482
|
+
E(this, "_debug");
|
|
1483
1483
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1484
1484
|
}
|
|
1485
1485
|
async create(t, n, r) {
|
|
@@ -1496,9 +1496,9 @@ class Pn {
|
|
|
1496
1496
|
const o = (s = i.response) == null ? void 0 : s.data;
|
|
1497
1497
|
if (typeof (o == null ? void 0 : o.message) == "string") {
|
|
1498
1498
|
const c = o.message.toLowerCase();
|
|
1499
|
-
throw c == "invalid signature" ? new
|
|
1499
|
+
throw c == "invalid signature" ? new Fe() : c == "address in use" ? new Ne(t) : c == "code in use" ? new Ue(n) : new Error(c);
|
|
1500
1500
|
} else if ((o == null ? void 0 : o.message) instanceof Array)
|
|
1501
|
-
throw new
|
|
1501
|
+
throw new xe(o.message);
|
|
1502
1502
|
}
|
|
1503
1503
|
throw i;
|
|
1504
1504
|
}
|
|
@@ -1516,9 +1516,9 @@ class Pn {
|
|
|
1516
1516
|
const o = (s = i.response) == null ? void 0 : s.data;
|
|
1517
1517
|
if (typeof (o == null ? void 0 : o.message) == "string") {
|
|
1518
1518
|
const c = o.message.toLowerCase();
|
|
1519
|
-
throw c == "invalid signature" ? new
|
|
1519
|
+
throw c == "invalid signature" ? new Fe() : c == "address in use" ? new Ne(t) : c == "code in use" ? new Ue(n) : new Error(c);
|
|
1520
1520
|
} else if ((o == null ? void 0 : o.message) instanceof Array)
|
|
1521
|
-
throw new
|
|
1521
|
+
throw new xe(o.message);
|
|
1522
1522
|
}
|
|
1523
1523
|
throw i;
|
|
1524
1524
|
}
|
|
@@ -1544,9 +1544,20 @@ class Pn {
|
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
1546
|
}
|
|
1547
|
-
|
|
1547
|
+
const Nn = "/audiences";
|
|
1548
|
+
class Un {
|
|
1549
|
+
constructor(t) {
|
|
1550
|
+
E(this, "httpClient");
|
|
1551
|
+
E(this, "_debug");
|
|
1552
|
+
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1553
|
+
}
|
|
1554
|
+
async getUserAudiences(t) {
|
|
1555
|
+
return (await this.httpClient.get(`${Nn}/user`, t)).data;
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
class Fn {
|
|
1548
1559
|
constructor(t) {
|
|
1549
|
-
|
|
1560
|
+
E(this, "httpClient");
|
|
1550
1561
|
this.httpClient = t.httpClient;
|
|
1551
1562
|
}
|
|
1552
1563
|
async getAll(t) {
|
|
@@ -1554,11 +1565,11 @@ class _n {
|
|
|
1554
1565
|
return n;
|
|
1555
1566
|
}
|
|
1556
1567
|
}
|
|
1557
|
-
const
|
|
1558
|
-
class
|
|
1568
|
+
const De = "fuul.sent", Dn = 60;
|
|
1569
|
+
class Ln {
|
|
1559
1570
|
constructor(t) {
|
|
1560
|
-
|
|
1561
|
-
|
|
1571
|
+
E(this, "debug");
|
|
1572
|
+
E(this, "httpClient");
|
|
1562
1573
|
this.httpClient = t.httpClient, this.debug = !!t.debug;
|
|
1563
1574
|
}
|
|
1564
1575
|
async sendEvent(t) {
|
|
@@ -1569,11 +1580,11 @@ class Nn {
|
|
|
1569
1580
|
await this.httpClient.post("events", t), this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
|
|
1570
1581
|
}
|
|
1571
1582
|
isDuplicate(t) {
|
|
1572
|
-
const n = `${
|
|
1583
|
+
const n = `${De}_${t.name}`, r = localStorage.getItem(n);
|
|
1573
1584
|
if (!r)
|
|
1574
1585
|
return !1;
|
|
1575
1586
|
const s = JSON.parse(r);
|
|
1576
|
-
if (this.getCurrentTimestamp() - s.timestamp >
|
|
1587
|
+
if (this.getCurrentTimestamp() - s.timestamp > Dn)
|
|
1577
1588
|
return !1;
|
|
1578
1589
|
let p = !1;
|
|
1579
1590
|
t.metadata && (p = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && s.signature === t.signature && s.signature_message === t.signature_message);
|
|
@@ -1584,22 +1595,22 @@ class Nn {
|
|
|
1584
1595
|
return Date.now() / 1e3;
|
|
1585
1596
|
}
|
|
1586
1597
|
saveSentEvent(t) {
|
|
1587
|
-
const n = `${
|
|
1598
|
+
const n = `${De}_${t.name}`, r = this.getCurrentTimestamp(), s = { ...t, timestamp: r };
|
|
1588
1599
|
localStorage.setItem(n, JSON.stringify(s));
|
|
1589
1600
|
}
|
|
1590
1601
|
}
|
|
1591
|
-
const
|
|
1592
|
-
version:
|
|
1602
|
+
const Bn = "4.9.1", In = {
|
|
1603
|
+
version: Bn
|
|
1593
1604
|
};
|
|
1594
|
-
class
|
|
1605
|
+
class kn {
|
|
1595
1606
|
constructor(t) {
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
this.client =
|
|
1607
|
+
E(this, "client");
|
|
1608
|
+
E(this, "queryParams");
|
|
1609
|
+
this.client = rt.create({
|
|
1599
1610
|
...t,
|
|
1600
1611
|
headers: {
|
|
1601
1612
|
Authorization: `Bearer ${t.apiKey}`,
|
|
1602
|
-
"X-Fuul-Sdk-Version":
|
|
1613
|
+
"X-Fuul-Sdk-Version": In.version
|
|
1603
1614
|
}
|
|
1604
1615
|
}), this.queryParams = t.queryParams ? this.buildQueryParams(t.queryParams) : "";
|
|
1605
1616
|
}
|
|
@@ -1623,10 +1634,10 @@ class Dn {
|
|
|
1623
1634
|
}
|
|
1624
1635
|
}
|
|
1625
1636
|
const U = "/payouts";
|
|
1626
|
-
class
|
|
1637
|
+
class jn {
|
|
1627
1638
|
constructor(t) {
|
|
1628
|
-
|
|
1629
|
-
|
|
1639
|
+
E(this, "httpClient");
|
|
1640
|
+
E(this, "_debug");
|
|
1630
1641
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1631
1642
|
}
|
|
1632
1643
|
async getPayoutsLeaderboard(t) {
|
|
@@ -1651,8 +1662,8 @@ class Ln {
|
|
|
1651
1662
|
return (await this.httpClient.get(`${U}/leaderboard/volume`, t)).data;
|
|
1652
1663
|
}
|
|
1653
1664
|
}
|
|
1654
|
-
let
|
|
1655
|
-
const
|
|
1665
|
+
let vn = (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), "");
|
|
1666
|
+
const $n = "fuul.tracking_id", he = () => Jn($n, () => vn()), Le = () => B("af") || B("referrer"), qn = () => document.referrer, Hn = () => Mn(), zn = () => B("category"), Vn = () => B("title"), Kn = () => B("tag"), Jn = (e, t) => {
|
|
1656
1667
|
const n = localStorage.getItem(e);
|
|
1657
1668
|
if (n)
|
|
1658
1669
|
return n;
|
|
@@ -1660,31 +1671,31 @@ const In = "fuul.tracking_id", he = () => Hn(In, () => Bn()), De = () => B("af")
|
|
|
1660
1671
|
const r = t();
|
|
1661
1672
|
return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
|
|
1662
1673
|
}
|
|
1663
|
-
}, B = (e) => new URLSearchParams(window.location.search).get(e),
|
|
1674
|
+
}, B = (e) => new URLSearchParams(window.location.search).get(e), Mn = () => {
|
|
1664
1675
|
const e = B("source");
|
|
1665
1676
|
if (e)
|
|
1666
1677
|
return e;
|
|
1667
|
-
},
|
|
1668
|
-
class
|
|
1678
|
+
}, Wn = "/user";
|
|
1679
|
+
class Gn {
|
|
1669
1680
|
constructor(t) {
|
|
1670
|
-
|
|
1681
|
+
E(this, "httpClient");
|
|
1671
1682
|
this.httpClient = t.httpClient;
|
|
1672
1683
|
}
|
|
1673
1684
|
async getUserAffiliates(t) {
|
|
1674
|
-
return (await this.httpClient.get(
|
|
1685
|
+
return (await this.httpClient.get(Wn, t)).data.affiliates;
|
|
1675
1686
|
}
|
|
1676
1687
|
}
|
|
1677
|
-
const
|
|
1678
|
-
let F = !1, ce = !1, me, D,
|
|
1679
|
-
function
|
|
1680
|
-
F = !!e.debug, !ce && (me = e.apiKey,
|
|
1688
|
+
const Xn = "https://api.fuul.xyz/api/v1/";
|
|
1689
|
+
let F = !1, ce = !1, me, D, st, ot, k, Q, N, it;
|
|
1690
|
+
function Yn(e) {
|
|
1691
|
+
F = !!e.debug, !ce && (me = e.apiKey, yr(), D = gr(e.baseApiUrl ?? Xn, e.defaultQueryParams ?? {}), st = new Fn({ httpClient: D, debug: F }), Q = new Ln({ httpClient: D, debug: F }), k = new xn({ httpClient: D, debug: F }), N = new jn({ httpClient: D, debug: F }), ot = new Gn({ httpClient: D }), it = new Un({ httpClient: D, debug: F }), ce = !0, F && console.debug("Fuul SDK: init() complete"));
|
|
1681
1692
|
}
|
|
1682
|
-
function
|
|
1693
|
+
function A() {
|
|
1683
1694
|
if (!ce)
|
|
1684
1695
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
1685
1696
|
}
|
|
1686
|
-
async function
|
|
1687
|
-
|
|
1697
|
+
async function Qn(e, t) {
|
|
1698
|
+
A(), ye(), ge();
|
|
1688
1699
|
const n = {
|
|
1689
1700
|
name: e,
|
|
1690
1701
|
args: t ?? {},
|
|
@@ -1692,10 +1703,10 @@ async function Wn(e, t) {
|
|
|
1692
1703
|
tracking_id: he()
|
|
1693
1704
|
}
|
|
1694
1705
|
};
|
|
1695
|
-
await
|
|
1706
|
+
await Q.sendEvent(n);
|
|
1696
1707
|
}
|
|
1697
|
-
async function
|
|
1698
|
-
|
|
1708
|
+
async function Zn(e) {
|
|
1709
|
+
A(), ye(), ge();
|
|
1699
1710
|
const t = {
|
|
1700
1711
|
name: "pageview",
|
|
1701
1712
|
args: {
|
|
@@ -1704,19 +1715,19 @@ async function Gn(e) {
|
|
|
1704
1715
|
},
|
|
1705
1716
|
metadata: {
|
|
1706
1717
|
tracking_id: he(),
|
|
1707
|
-
referrer_url:
|
|
1708
|
-
source:
|
|
1709
|
-
affiliate_id:
|
|
1710
|
-
referrer:
|
|
1711
|
-
category:
|
|
1712
|
-
title:
|
|
1713
|
-
tag:
|
|
1718
|
+
referrer_url: qn(),
|
|
1719
|
+
source: Hn(),
|
|
1720
|
+
affiliate_id: Le() ?? void 0,
|
|
1721
|
+
referrer: Le() ?? void 0,
|
|
1722
|
+
category: zn() ?? void 0,
|
|
1723
|
+
title: Vn() ?? void 0,
|
|
1724
|
+
tag: Kn() ?? void 0
|
|
1714
1725
|
}
|
|
1715
1726
|
};
|
|
1716
|
-
await
|
|
1727
|
+
await Q.sendEvent(t);
|
|
1717
1728
|
}
|
|
1718
|
-
async function
|
|
1719
|
-
|
|
1729
|
+
async function er(e) {
|
|
1730
|
+
A(), ye(), ge();
|
|
1720
1731
|
const t = {
|
|
1721
1732
|
name: "connect_wallet",
|
|
1722
1733
|
args: {
|
|
@@ -1727,94 +1738,102 @@ async function Xn(e) {
|
|
|
1727
1738
|
tracking_id: he()
|
|
1728
1739
|
}
|
|
1729
1740
|
};
|
|
1730
|
-
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
|
|
1741
|
+
e != null && e.address && (t.user_address = e.address), e != null && e.signature && (t.signature = e == null ? void 0 : e.signature, t.signature_message = e == null ? void 0 : e.message), e != null && e.accountChainId && (t.account_chain_id = e.accountChainId), await Q.sendEvent(t);
|
|
1731
1742
|
}
|
|
1732
|
-
async function
|
|
1733
|
-
|
|
1743
|
+
async function tr(e, t, n) {
|
|
1744
|
+
A(), await k.create(e, t, n);
|
|
1734
1745
|
}
|
|
1735
|
-
async function
|
|
1736
|
-
|
|
1746
|
+
async function nr(e, t, n) {
|
|
1747
|
+
A(), await k.update(e, t, n);
|
|
1737
1748
|
}
|
|
1738
|
-
async function
|
|
1739
|
-
return
|
|
1749
|
+
async function rr(e) {
|
|
1750
|
+
return A(), await k.getCode(e);
|
|
1740
1751
|
}
|
|
1741
|
-
async function
|
|
1742
|
-
return
|
|
1752
|
+
async function sr(e) {
|
|
1753
|
+
return A(), await k.isCodeFree(e);
|
|
1743
1754
|
}
|
|
1744
|
-
async function
|
|
1745
|
-
|
|
1755
|
+
async function or(e, t, n) {
|
|
1756
|
+
A();
|
|
1746
1757
|
const r = await k.getCode(t), s = new URLSearchParams({
|
|
1747
1758
|
af: r ?? t
|
|
1748
1759
|
});
|
|
1749
1760
|
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()}`;
|
|
1750
1761
|
}
|
|
1751
|
-
function
|
|
1762
|
+
function ir(e) {
|
|
1752
1763
|
return N.getPayoutsLeaderboard(e);
|
|
1753
1764
|
}
|
|
1754
|
-
function
|
|
1765
|
+
function ar(e) {
|
|
1755
1766
|
return N.getPointsLeaderboard(e);
|
|
1756
1767
|
}
|
|
1757
|
-
function
|
|
1768
|
+
function cr(e) {
|
|
1758
1769
|
return N.getVolumeLeaderboard(e);
|
|
1759
1770
|
}
|
|
1760
|
-
function
|
|
1771
|
+
function ur(e) {
|
|
1761
1772
|
return N.getUserPayoutsByConversion(e);
|
|
1762
1773
|
}
|
|
1763
|
-
function
|
|
1774
|
+
function lr(e) {
|
|
1764
1775
|
return N.getUserPointsByConversion(e);
|
|
1765
1776
|
}
|
|
1766
|
-
function
|
|
1777
|
+
function fr(e) {
|
|
1767
1778
|
return N.getUserPayoutMovements(e);
|
|
1768
1779
|
}
|
|
1769
|
-
function
|
|
1780
|
+
function dr(e) {
|
|
1770
1781
|
return N.getUserPointsMovements(e);
|
|
1771
1782
|
}
|
|
1772
|
-
async function
|
|
1773
|
-
return
|
|
1783
|
+
async function pr(e) {
|
|
1784
|
+
return A(), st.getAll(e);
|
|
1774
1785
|
}
|
|
1775
|
-
async function
|
|
1776
|
-
return
|
|
1786
|
+
async function hr(e) {
|
|
1787
|
+
return A(), ot.getUserAffiliates(e);
|
|
1788
|
+
}
|
|
1789
|
+
async function mr(e) {
|
|
1790
|
+
return A(), it.getUserAudiences(e);
|
|
1777
1791
|
}
|
|
1778
1792
|
function ye() {
|
|
1779
1793
|
if (typeof window > "u" || typeof document > "u")
|
|
1780
1794
|
throw new Error("Fuul SDK: Browser context required");
|
|
1781
1795
|
}
|
|
1782
|
-
function
|
|
1796
|
+
function ge() {
|
|
1797
|
+
if (navigator.webdriver)
|
|
1798
|
+
throw new Error("Fuul SDK: You are using a browser automation tool");
|
|
1799
|
+
}
|
|
1800
|
+
function yr() {
|
|
1783
1801
|
if (!me)
|
|
1784
1802
|
throw new Error("Fuul SDK: Invalid API key");
|
|
1785
1803
|
}
|
|
1786
|
-
function
|
|
1787
|
-
return new
|
|
1804
|
+
function gr(e, t) {
|
|
1805
|
+
return new kn({
|
|
1788
1806
|
baseURL: e,
|
|
1789
1807
|
timeout: 1e4,
|
|
1790
1808
|
apiKey: me,
|
|
1791
1809
|
queryParams: t
|
|
1792
1810
|
});
|
|
1793
1811
|
}
|
|
1794
|
-
const
|
|
1795
|
-
init:
|
|
1796
|
-
sendEvent:
|
|
1797
|
-
sendPageview:
|
|
1798
|
-
sendConnectWallet:
|
|
1799
|
-
generateTrackingLink:
|
|
1800
|
-
getConversions:
|
|
1801
|
-
createAffiliateCode:
|
|
1802
|
-
updateAffiliateCode:
|
|
1803
|
-
getAffiliateCode:
|
|
1804
|
-
isAffiliateCodeFree:
|
|
1805
|
-
getPayoutsLeaderboard:
|
|
1806
|
-
getPointsLeaderboard:
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1812
|
+
const Ir = {
|
|
1813
|
+
init: Yn,
|
|
1814
|
+
sendEvent: Qn,
|
|
1815
|
+
sendPageview: Zn,
|
|
1816
|
+
sendConnectWallet: er,
|
|
1817
|
+
generateTrackingLink: or,
|
|
1818
|
+
getConversions: pr,
|
|
1819
|
+
createAffiliateCode: tr,
|
|
1820
|
+
updateAffiliateCode: nr,
|
|
1821
|
+
getAffiliateCode: rr,
|
|
1822
|
+
isAffiliateCodeFree: sr,
|
|
1823
|
+
getPayoutsLeaderboard: ir,
|
|
1824
|
+
getPointsLeaderboard: ar,
|
|
1825
|
+
getUserAudiences: mr,
|
|
1826
|
+
getUserPayoutsByConversion: ur,
|
|
1827
|
+
getUserPointsByConversion: lr,
|
|
1828
|
+
getUserPointsMovements: dr,
|
|
1829
|
+
getUserPayoutMovements: fr,
|
|
1830
|
+
getUserAffiliates: hr,
|
|
1831
|
+
getVolumeLeaderboard: cr
|
|
1813
1832
|
};
|
|
1814
1833
|
export {
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1834
|
+
Ne as AddressInUseError,
|
|
1835
|
+
Ue as CodeInUseError,
|
|
1836
|
+
Ir as Fuul,
|
|
1837
|
+
Fe as InvalidSignatureError,
|
|
1838
|
+
xe as ValidationError
|
|
1820
1839
|
};
|