@fuul/sdk 2.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- var ve = Object.defineProperty;
2
- var We = (e, t, n) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var P = (e, t, n) => (We(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- class Ye {
1
+ var Me = Object.defineProperty;
2
+ var ve = (e, t, n) => t in e ? Me(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var C = (e, t, n) => (ve(e, typeof t != "symbol" ? t + "" : t, n), n);
4
+ class We {
5
5
  constructor(t) {
6
- P(this, "httpClient");
6
+ C(this, "httpClient");
7
7
  this.httpClient = t.httpClient;
8
8
  }
9
9
  async getAll() {
@@ -11,11 +11,11 @@ class Ye {
11
11
  return t;
12
12
  }
13
13
  }
14
- const de = "fuul.sent", Ge = 60;
15
- class Qe {
14
+ const fe = "fuul.sent", Ge = 60;
15
+ class Ye {
16
16
  constructor(t) {
17
- P(this, "debug");
18
- P(this, "httpClient");
17
+ C(this, "debug");
18
+ C(this, "httpClient");
19
19
  this.httpClient = t.httpClient, this.debug = !!t.debug;
20
20
  }
21
21
  async sendEvent(t) {
@@ -26,7 +26,7 @@ class Qe {
26
26
  await this.httpClient.post("events", t), this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
27
27
  }
28
28
  isDuplicate(t) {
29
- const n = `${de}_${t.name}`, r = localStorage.getItem(n);
29
+ const n = `${fe}_${t.name}`, r = localStorage.getItem(n);
30
30
  if (!r)
31
31
  return !1;
32
32
  const s = JSON.parse(r);
@@ -41,36 +41,36 @@ class Qe {
41
41
  return Date.now() / 1e3;
42
42
  }
43
43
  saveSentEvent(t) {
44
- const n = `${de}_${t.name}`, r = this.getCurrentTimestamp(), s = { ...t, timestamp: r };
44
+ const n = `${fe}_${t.name}`, r = this.getCurrentTimestamp(), s = { ...t, timestamp: r };
45
45
  localStorage.setItem(n, JSON.stringify(s));
46
46
  }
47
47
  }
48
- function Oe(e, t) {
48
+ function Re(e, t) {
49
49
  return function() {
50
50
  return e.apply(t, arguments);
51
51
  };
52
52
  }
53
- const { toString: Ae } = Object.prototype, { getPrototypeOf: re } = Object, se = ((e) => (t) => {
54
- const n = Ae.call(t);
53
+ const { toString: Oe } = Object.prototype, { getPrototypeOf: ne } = Object, re = ((e) => (t) => {
54
+ const n = Oe.call(t);
55
55
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
56
- })(/* @__PURE__ */ Object.create(null)), O = (e) => (e = e.toLowerCase(), (t) => se(t) === e), $ = (e) => (t) => typeof t === e, { isArray: x } = Array, D = $("undefined");
57
- function Xe(e) {
58
- return e !== null && !D(e) && e.constructor !== null && !D(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
56
+ })(/* @__PURE__ */ Object.create(null)), O = (e) => (e = e.toLowerCase(), (t) => re(t) === e), $ = (e) => (t) => typeof t === e, { isArray: x } = Array, F = $("undefined");
57
+ function Qe(e) {
58
+ return e !== null && !F(e) && e.constructor !== null && !F(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
59
59
  }
60
- const Te = O("ArrayBuffer");
61
- function Ze(e) {
60
+ const Ae = O("ArrayBuffer");
61
+ function Xe(e) {
62
62
  let t;
63
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Te(e.buffer), t;
63
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ae(e.buffer), t;
64
64
  }
65
- const et = $("string"), _ = $("function"), _e = $("number"), oe = (e) => e !== null && typeof e == "object", tt = (e) => e === !0 || e === !1, k = (e) => {
66
- if (se(e) !== "object")
65
+ const Ze = $("string"), P = $("function"), Te = $("number"), se = (e) => e !== null && typeof e == "object", et = (e) => e === !0 || e === !1, k = (e) => {
66
+ if (re(e) !== "object")
67
67
  return !1;
68
- const t = re(e);
68
+ const t = ne(e);
69
69
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
70
- }, nt = O("Date"), rt = O("File"), st = O("Blob"), ot = O("FileList"), it = (e) => oe(e) && _(e.pipe), at = (e) => {
70
+ }, tt = O("Date"), nt = O("File"), rt = O("Blob"), st = O("FileList"), ot = (e) => se(e) && P(e.pipe), it = (e) => {
71
71
  const t = "[object FormData]";
72
- return e && (typeof FormData == "function" && e instanceof FormData || Ae.call(e) === t || _(e.toString) && e.toString() === t);
73
- }, ct = O("URLSearchParams"), ut = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
72
+ return e && (typeof FormData == "function" && e instanceof FormData || Oe.call(e) === t || P(e.toString) && e.toString() === t);
73
+ }, at = O("URLSearchParams"), ct = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
74
74
  function U(e, t, { allOwnKeys: n = !1 } = {}) {
75
75
  if (e === null || typeof e > "u")
76
76
  return;
@@ -85,7 +85,7 @@ function U(e, t, { allOwnKeys: n = !1 } = {}) {
85
85
  u = o[r], t.call(null, e[u], u, e);
86
86
  }
87
87
  }
88
- function Ce(e, t) {
88
+ function Pe(e, t) {
89
89
  t = t.toLowerCase();
90
90
  const n = Object.keys(e);
91
91
  let r = n.length, s;
@@ -94,23 +94,23 @@ function Ce(e, t) {
94
94
  return s;
95
95
  return null;
96
96
  }
97
- const Pe = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Ne = (e) => !D(e) && e !== Pe;
98
- function X() {
99
- const { caseless: e } = Ne(this) && this || {}, t = {}, n = (r, s) => {
100
- const o = e && Ce(t, s) || s;
101
- k(t[o]) && k(r) ? t[o] = X(t[o], r) : k(r) ? t[o] = X({}, r) : x(r) ? t[o] = r.slice() : t[o] = r;
97
+ const Ne = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Ce = (e) => !F(e) && e !== Ne;
98
+ function Q() {
99
+ const { caseless: e } = Ce(this) && this || {}, t = {}, n = (r, s) => {
100
+ const o = e && Pe(t, s) || s;
101
+ k(t[o]) && k(r) ? t[o] = Q(t[o], r) : k(r) ? t[o] = Q({}, r) : x(r) ? t[o] = r.slice() : t[o] = r;
102
102
  };
103
103
  for (let r = 0, s = arguments.length; r < s; r++)
104
104
  arguments[r] && U(arguments[r], n);
105
105
  return t;
106
106
  }
107
- const lt = (e, t, n, { allOwnKeys: r } = {}) => (U(t, (s, o) => {
108
- n && _(s) ? e[o] = Oe(s, n) : e[o] = s;
109
- }, { allOwnKeys: r }), e), ft = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), dt = (e, t, n, r) => {
107
+ const ut = (e, t, n, { allOwnKeys: r } = {}) => (U(t, (s, o) => {
108
+ n && P(s) ? e[o] = Re(s, n) : e[o] = s;
109
+ }, { allOwnKeys: r }), e), lt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), ft = (e, t, n, r) => {
110
110
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
111
111
  value: t.prototype
112
112
  }), n && Object.assign(e.prototype, n);
113
- }, pt = (e, t, n, r) => {
113
+ }, dt = (e, t, n, r) => {
114
114
  let s, o, i;
115
115
  const u = {};
116
116
  if (t = t || {}, e == null)
@@ -118,54 +118,54 @@ const lt = (e, t, n, { allOwnKeys: r } = {}) => (U(t, (s, o) => {
118
118
  do {
119
119
  for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
120
120
  i = s[o], (!r || r(i, e, t)) && !u[i] && (t[i] = e[i], u[i] = !0);
121
- e = n !== !1 && re(e);
121
+ e = n !== !1 && ne(e);
122
122
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
123
123
  return t;
124
- }, ht = (e, t, n) => {
124
+ }, pt = (e, t, n) => {
125
125
  e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
126
126
  const r = e.indexOf(t, n);
127
127
  return r !== -1 && r === n;
128
- }, mt = (e) => {
128
+ }, ht = (e) => {
129
129
  if (!e)
130
130
  return null;
131
131
  if (x(e))
132
132
  return e;
133
133
  let t = e.length;
134
- if (!_e(t))
134
+ if (!Te(t))
135
135
  return null;
136
136
  const n = new Array(t);
137
137
  for (; t-- > 0; )
138
138
  n[t] = e[t];
139
139
  return n;
140
- }, yt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && re(Uint8Array)), Et = (e, t) => {
140
+ }, mt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ne(Uint8Array)), yt = (e, t) => {
141
141
  const r = (e && e[Symbol.iterator]).call(e);
142
142
  let s;
143
143
  for (; (s = r.next()) && !s.done; ) {
144
144
  const o = s.value;
145
145
  t.call(e, o[0], o[1]);
146
146
  }
147
- }, wt = (e, t) => {
147
+ }, Et = (e, t) => {
148
148
  let n;
149
149
  const r = [];
150
150
  for (; (n = e.exec(t)) !== null; )
151
151
  r.push(n);
152
152
  return r;
153
- }, gt = O("HTMLFormElement"), St = (e) => e.toLowerCase().replace(
153
+ }, wt = O("HTMLFormElement"), gt = (e) => e.toLowerCase().replace(
154
154
  /[-_\s]([a-z\d])(\w*)/g,
155
155
  function(n, r, s) {
156
156
  return r.toUpperCase() + s;
157
157
  }
158
- ), pe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), bt = O("RegExp"), xe = (e, t) => {
158
+ ), de = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), St = O("RegExp"), _e = (e, t) => {
159
159
  const n = Object.getOwnPropertyDescriptors(e), r = {};
160
160
  U(n, (s, o) => {
161
161
  t(s, o, e) !== !1 && (r[o] = s);
162
162
  }), Object.defineProperties(e, r);
163
- }, Rt = (e) => {
164
- xe(e, (t, n) => {
165
- if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
163
+ }, bt = (e) => {
164
+ _e(e, (t, n) => {
165
+ if (P(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
166
166
  return !1;
167
167
  const r = e[n];
168
- if (_(r)) {
168
+ if (P(r)) {
169
169
  if (t.enumerable = !1, "writable" in t) {
170
170
  t.writable = !1;
171
171
  return;
@@ -175,31 +175,31 @@ const lt = (e, t, n, { allOwnKeys: r } = {}) => (U(t, (s, o) => {
175
175
  });
176
176
  }
177
177
  });
178
- }, Ot = (e, t) => {
178
+ }, Rt = (e, t) => {
179
179
  const n = {}, r = (s) => {
180
180
  s.forEach((o) => {
181
181
  n[o] = !0;
182
182
  });
183
183
  };
184
184
  return x(e) ? r(e) : r(String(e).split(t)), n;
185
- }, At = () => {
186
- }, Tt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), v = "abcdefghijklmnopqrstuvwxyz", he = "0123456789", Fe = {
187
- DIGIT: he,
188
- ALPHA: v,
189
- ALPHA_DIGIT: v + v.toUpperCase() + he
190
- }, _t = (e = 16, t = Fe.ALPHA_DIGIT) => {
185
+ }, Ot = () => {
186
+ }, At = (e, t) => (e = +e, Number.isFinite(e) ? e : t), M = "abcdefghijklmnopqrstuvwxyz", pe = "0123456789", xe = {
187
+ DIGIT: pe,
188
+ ALPHA: M,
189
+ ALPHA_DIGIT: M + M.toUpperCase() + pe
190
+ }, Tt = (e = 16, t = xe.ALPHA_DIGIT) => {
191
191
  let n = "";
192
192
  const { length: r } = t;
193
193
  for (; e--; )
194
194
  n += t[Math.random() * r | 0];
195
195
  return n;
196
196
  };
197
- function Ct(e) {
198
- return !!(e && _(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
197
+ function Pt(e) {
198
+ return !!(e && P(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
199
199
  }
200
- const Pt = (e) => {
200
+ const Nt = (e) => {
201
201
  const t = new Array(10), n = (r, s) => {
202
- if (oe(r)) {
202
+ if (se(r)) {
203
203
  if (t.indexOf(r) >= 0)
204
204
  return;
205
205
  if (!("toJSON" in r)) {
@@ -207,7 +207,7 @@ const Pt = (e) => {
207
207
  const o = x(r) ? [] : {};
208
208
  return U(r, (i, u) => {
209
209
  const d = n(i, s + 1);
210
- !D(d) && (o[u] = d);
210
+ !F(d) && (o[u] = d);
211
211
  }), t[s] = void 0, o;
212
212
  }
213
213
  }
@@ -216,55 +216,55 @@ const Pt = (e) => {
216
216
  return n(e, 0);
217
217
  }, a = {
218
218
  isArray: x,
219
- isArrayBuffer: Te,
220
- isBuffer: Xe,
221
- isFormData: at,
222
- isArrayBufferView: Ze,
223
- isString: et,
224
- isNumber: _e,
225
- isBoolean: tt,
226
- isObject: oe,
219
+ isArrayBuffer: Ae,
220
+ isBuffer: Qe,
221
+ isFormData: it,
222
+ isArrayBufferView: Xe,
223
+ isString: Ze,
224
+ isNumber: Te,
225
+ isBoolean: et,
226
+ isObject: se,
227
227
  isPlainObject: k,
228
- isUndefined: D,
229
- isDate: nt,
230
- isFile: rt,
231
- isBlob: st,
232
- isRegExp: bt,
233
- isFunction: _,
234
- isStream: it,
235
- isURLSearchParams: ct,
236
- isTypedArray: yt,
237
- isFileList: ot,
228
+ isUndefined: F,
229
+ isDate: tt,
230
+ isFile: nt,
231
+ isBlob: rt,
232
+ isRegExp: St,
233
+ isFunction: P,
234
+ isStream: ot,
235
+ isURLSearchParams: at,
236
+ isTypedArray: mt,
237
+ isFileList: st,
238
238
  forEach: U,
239
- merge: X,
240
- extend: lt,
241
- trim: ut,
242
- stripBOM: ft,
243
- inherits: dt,
244
- toFlatObject: pt,
245
- kindOf: se,
239
+ merge: Q,
240
+ extend: ut,
241
+ trim: ct,
242
+ stripBOM: lt,
243
+ inherits: ft,
244
+ toFlatObject: dt,
245
+ kindOf: re,
246
246
  kindOfTest: O,
247
- endsWith: ht,
248
- toArray: mt,
249
- forEachEntry: Et,
250
- matchAll: wt,
251
- isHTMLForm: gt,
252
- hasOwnProperty: pe,
253
- hasOwnProp: pe,
247
+ endsWith: pt,
248
+ toArray: ht,
249
+ forEachEntry: yt,
250
+ matchAll: Et,
251
+ isHTMLForm: wt,
252
+ hasOwnProperty: de,
253
+ hasOwnProp: de,
254
254
  // an alias to avoid ESLint no-prototype-builtins detection
255
- reduceDescriptors: xe,
256
- freezeMethods: Rt,
257
- toObjectSet: Ot,
258
- toCamelCase: St,
259
- noop: At,
260
- toFiniteNumber: Tt,
261
- findKey: Ce,
262
- global: Pe,
263
- isContextDefined: Ne,
264
- ALPHABET: Fe,
265
- generateString: _t,
266
- isSpecCompliantForm: Ct,
267
- toJSONObject: Pt
255
+ reduceDescriptors: _e,
256
+ freezeMethods: bt,
257
+ toObjectSet: Rt,
258
+ toCamelCase: gt,
259
+ noop: Ot,
260
+ toFiniteNumber: At,
261
+ findKey: Pe,
262
+ global: Ne,
263
+ isContextDefined: Ce,
264
+ ALPHABET: xe,
265
+ generateString: Tt,
266
+ isSpecCompliantForm: Pt,
267
+ toJSONObject: Nt
268
268
  };
269
269
  function m(e, t, n, r, s) {
270
270
  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);
@@ -290,7 +290,7 @@ a.inherits(m, Error, {
290
290
  };
291
291
  }
292
292
  });
293
- const De = m.prototype, Ue = {};
293
+ const De = m.prototype, Fe = {};
294
294
  [
295
295
  "ERR_BAD_OPTION_VALUE",
296
296
  "ERR_BAD_OPTION",
@@ -306,9 +306,9 @@ const De = m.prototype, Ue = {};
306
306
  "ERR_INVALID_URL"
307
307
  // eslint-disable-next-line func-names
308
308
  ].forEach((e) => {
309
- Ue[e] = { value: e };
309
+ Fe[e] = { value: e };
310
310
  });
311
- Object.defineProperties(m, Ue);
311
+ Object.defineProperties(m, Fe);
312
312
  Object.defineProperty(De, "isAxiosError", { value: !0 });
313
313
  m.from = (e, t, n, r, s, o) => {
314
314
  const i = Object.create(De);
@@ -316,25 +316,25 @@ m.from = (e, t, n, r, s, o) => {
316
316
  return d !== Error.prototype;
317
317
  }, (u) => u !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
318
318
  };
319
- const Nt = null;
320
- function Z(e) {
319
+ const Ct = null;
320
+ function X(e) {
321
321
  return a.isPlainObject(e) || a.isArray(e);
322
322
  }
323
- function Le(e) {
323
+ function Ue(e) {
324
324
  return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
325
325
  }
326
- function me(e, t, n) {
326
+ function he(e, t, n) {
327
327
  return e ? e.concat(t).map(function(s, o) {
328
- return s = Le(s), !n && o ? "[" + s + "]" : s;
328
+ return s = Ue(s), !n && o ? "[" + s + "]" : s;
329
329
  }).join(n ? "." : "") : t;
330
330
  }
331
- function xt(e) {
332
- return a.isArray(e) && !e.some(Z);
331
+ function _t(e) {
332
+ return a.isArray(e) && !e.some(X);
333
333
  }
334
- const Ft = a.toFlatObject(a, {}, null, function(t) {
334
+ const xt = a.toFlatObject(a, {}, null, function(t) {
335
335
  return /^is[A-Z]/.test(t);
336
336
  });
337
- function V(e, t, n) {
337
+ function K(e, t, n) {
338
338
  if (!a.isObject(e))
339
339
  throw new TypeError("target must be an object");
340
340
  t = t || new FormData(), n = a.toFlatObject(n, {
@@ -361,34 +361,34 @@ function V(e, t, n) {
361
361
  if (f && !b && typeof f == "object") {
362
362
  if (a.endsWith(h, "{}"))
363
363
  h = r ? h : h.slice(0, -2), f = JSON.stringify(f);
364
- else if (a.isArray(f) && xt(f) || (a.isFileList(f) || a.endsWith(h, "[]")) && (g = a.toArray(f)))
365
- return h = Le(h), g.forEach(function(I, Me) {
366
- !(a.isUndefined(I) || I === null) && t.append(
364
+ else if (a.isArray(f) && _t(f) || (a.isFileList(f) || a.endsWith(h, "[]")) && (g = a.toArray(f)))
365
+ return h = Ue(h), g.forEach(function(B, Ve) {
366
+ !(a.isUndefined(B) || B === null) && t.append(
367
367
  // eslint-disable-next-line no-nested-ternary
368
- i === !0 ? me([h], Me, o) : i === null ? h : h + "[]",
369
- c(I)
368
+ i === !0 ? he([h], Ve, o) : i === null ? h : h + "[]",
369
+ c(B)
370
370
  );
371
371
  }), !1;
372
372
  }
373
- return Z(f) ? !0 : (t.append(me(b, h, o), c(f)), !1);
373
+ return X(f) ? !0 : (t.append(he(b, h, o), c(f)), !1);
374
374
  }
375
- const p = [], w = Object.assign(Ft, {
375
+ const p = [], w = Object.assign(xt, {
376
376
  defaultVisitor: l,
377
377
  convertValue: c,
378
- isVisitable: Z
378
+ isVisitable: X
379
379
  });
380
380
  function y(f, h) {
381
381
  if (!a.isUndefined(f)) {
382
382
  if (p.indexOf(f) !== -1)
383
383
  throw Error("Circular reference detected in " + h.join("."));
384
- p.push(f), a.forEach(f, function(g, C) {
384
+ p.push(f), a.forEach(f, function(g, N) {
385
385
  (!(a.isUndefined(g) || g === null) && s.call(
386
386
  t,
387
387
  g,
388
- a.isString(C) ? C.trim() : C,
388
+ a.isString(N) ? N.trim() : N,
389
389
  h,
390
390
  w
391
- )) === !0 && y(g, h ? h.concat(C) : [C]);
391
+ )) === !0 && y(g, h ? h.concat(N) : [N]);
392
392
  }), p.pop();
393
393
  }
394
394
  }
@@ -396,7 +396,7 @@ function V(e, t, n) {
396
396
  throw new TypeError("data must be an object");
397
397
  return y(e), t;
398
398
  }
399
- function ye(e) {
399
+ function me(e) {
400
400
  const t = {
401
401
  "!": "%21",
402
402
  "'": "%27",
@@ -410,17 +410,17 @@ function ye(e) {
410
410
  return t[r];
411
411
  });
412
412
  }
413
- function ie(e, t) {
414
- this._pairs = [], e && V(e, this, t);
413
+ function oe(e, t) {
414
+ this._pairs = [], e && K(e, this, t);
415
415
  }
416
- const Be = ie.prototype;
417
- Be.append = function(t, n) {
416
+ const Le = oe.prototype;
417
+ Le.append = function(t, n) {
418
418
  this._pairs.push([t, n]);
419
419
  };
420
- Be.toString = function(t) {
420
+ Le.toString = function(t) {
421
421
  const n = t ? function(r) {
422
- return t.call(this, r, ye);
423
- } : ye;
422
+ return t.call(this, r, me);
423
+ } : me;
424
424
  return this._pairs.map(function(s) {
425
425
  return n(s[0]) + "=" + n(s[1]);
426
426
  }, "").join("&");
@@ -428,18 +428,18 @@ Be.toString = function(t) {
428
428
  function Dt(e) {
429
429
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
430
430
  }
431
- function Ie(e, t, n) {
431
+ function Be(e, t, n) {
432
432
  if (!t)
433
433
  return e;
434
434
  const r = n && n.encode || Dt, s = n && n.serialize;
435
435
  let o;
436
- if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new ie(t, n).toString(r), o) {
436
+ if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new oe(t, n).toString(r), o) {
437
437
  const i = e.indexOf("#");
438
438
  i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
439
439
  }
440
440
  return e;
441
441
  }
442
- class Ut {
442
+ class Ft {
443
443
  constructor() {
444
444
  this.handlers = [];
445
445
  }
@@ -493,36 +493,36 @@ class Ut {
493
493
  });
494
494
  }
495
495
  }
496
- const Ee = Ut, je = {
496
+ const ye = Ft, Ie = {
497
497
  silentJSONParsing: !0,
498
498
  forcedJSONParsing: !0,
499
499
  clarifyTimeoutError: !1
500
- }, Lt = typeof URLSearchParams < "u" ? URLSearchParams : ie, Bt = typeof FormData < "u" ? FormData : null, It = typeof Blob < "u" ? Blob : null, jt = (() => {
500
+ }, Ut = typeof URLSearchParams < "u" ? URLSearchParams : oe, Lt = typeof FormData < "u" ? FormData : null, Bt = typeof Blob < "u" ? Blob : null, It = (() => {
501
501
  let e;
502
502
  return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
503
503
  })(), kt = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
504
504
  self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), S = {
505
505
  isBrowser: !0,
506
506
  classes: {
507
- URLSearchParams: Lt,
508
- FormData: Bt,
509
- Blob: It
507
+ URLSearchParams: Ut,
508
+ FormData: Lt,
509
+ Blob: Bt
510
510
  },
511
- isStandardBrowserEnv: jt,
511
+ isStandardBrowserEnv: It,
512
512
  isStandardBrowserWebWorkerEnv: kt,
513
513
  protocols: ["http", "https", "file", "blob", "url", "data"]
514
514
  };
515
- function qt(e, t) {
516
- return V(e, new S.classes.URLSearchParams(), Object.assign({
515
+ function jt(e, t) {
516
+ return K(e, new S.classes.URLSearchParams(), Object.assign({
517
517
  visitor: function(n, r, s, o) {
518
518
  return S.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
519
519
  }
520
520
  }, t));
521
521
  }
522
- function Ht(e) {
522
+ function qt(e) {
523
523
  return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
524
524
  }
525
- function Kt(e) {
525
+ function Ht(e) {
526
526
  const t = {}, n = Object.keys(e);
527
527
  let r;
528
528
  const s = n.length;
@@ -535,12 +535,12 @@ function ke(e) {
535
535
  function t(n, r, s, o) {
536
536
  let i = n[o++];
537
537
  const u = Number.isFinite(+i), d = o >= n.length;
538
- return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !u) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Kt(s[i])), !u);
538
+ return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !u) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Ht(s[i])), !u);
539
539
  }
540
540
  if (a.isFormData(e) && a.isFunction(e.entries)) {
541
541
  const n = {};
542
542
  return a.forEachEntry(e, (r, s) => {
543
- t(Ht(r), s, n, 0);
543
+ t(qt(r), s, n, 0);
544
544
  }), n;
545
545
  }
546
546
  return null;
@@ -559,7 +559,7 @@ function $t(e, t, n) {
559
559
  return (n || JSON.stringify)(e);
560
560
  }
561
561
  const J = {
562
- transitional: je,
562
+ transitional: Ie,
563
563
  adapter: ["xhr", "http"],
564
564
  transformRequest: [function(t, n) {
565
565
  const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
@@ -574,10 +574,10 @@ const J = {
574
574
  let u;
575
575
  if (o) {
576
576
  if (r.indexOf("application/x-www-form-urlencoded") > -1)
577
- return qt(t, this.formSerializer).toString();
577
+ return jt(t, this.formSerializer).toString();
578
578
  if ((u = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
579
579
  const d = this.env && this.env.FormData;
580
- return V(
580
+ return K(
581
581
  u ? { "files[]": t } : t,
582
582
  d && new d(),
583
583
  this.formSerializer
@@ -627,7 +627,7 @@ a.forEach(["delete", "get", "head"], function(t) {
627
627
  a.forEach(["post", "put", "patch"], function(t) {
628
628
  J.headers[t] = a.merge(zt);
629
629
  });
630
- const ae = J, Vt = a.toObjectSet([
630
+ const ie = J, Kt = a.toObjectSet([
631
631
  "age",
632
632
  "authorization",
633
633
  "content-length",
@@ -650,26 +650,26 @@ const ae = J, Vt = a.toObjectSet([
650
650
  let n, r, s;
651
651
  return e && e.split(`
652
652
  `).forEach(function(i) {
653
- s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Vt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
653
+ s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Kt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
654
654
  }), t;
655
- }, we = Symbol("internals");
656
- function F(e) {
655
+ }, Ee = Symbol("internals");
656
+ function D(e) {
657
657
  return e && String(e).trim().toLowerCase();
658
658
  }
659
- function q(e) {
660
- return e === !1 || e == null ? e : a.isArray(e) ? e.map(q) : String(e);
659
+ function j(e) {
660
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(j) : String(e);
661
661
  }
662
- function Mt(e) {
662
+ function Vt(e) {
663
663
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
664
664
  let r;
665
665
  for (; r = n.exec(e); )
666
666
  t[r[1]] = r[2];
667
667
  return t;
668
668
  }
669
- function vt(e) {
669
+ function Mt(e) {
670
670
  return /^[-_a-zA-Z]+$/.test(e.trim());
671
671
  }
672
- function W(e, t, n, r, s) {
672
+ function v(e, t, n, r, s) {
673
673
  if (a.isFunction(r))
674
674
  return r.call(this, t, n);
675
675
  if (s && (t = n), !!a.isString(t)) {
@@ -679,10 +679,10 @@ function W(e, t, n, r, s) {
679
679
  return r.test(t);
680
680
  }
681
681
  }
682
- function Wt(e) {
682
+ function vt(e) {
683
683
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
684
684
  }
685
- function Yt(e, t) {
685
+ function Wt(e, t) {
686
686
  const n = a.toCamelCase(" " + t);
687
687
  ["get", "set", "has"].forEach((r) => {
688
688
  Object.defineProperty(e, r + n, {
@@ -693,31 +693,31 @@ function Yt(e, t) {
693
693
  });
694
694
  });
695
695
  }
696
- class M {
696
+ class V {
697
697
  constructor(t) {
698
698
  t && this.set(t);
699
699
  }
700
700
  set(t, n, r) {
701
701
  const s = this;
702
702
  function o(u, d, c) {
703
- const l = F(d);
703
+ const l = D(d);
704
704
  if (!l)
705
705
  throw new Error("header name must be a non-empty string");
706
706
  const p = a.findKey(s, l);
707
- (!p || s[p] === void 0 || c === !0 || c === void 0 && s[p] !== !1) && (s[p || d] = q(u));
707
+ (!p || s[p] === void 0 || c === !0 || c === void 0 && s[p] !== !1) && (s[p || d] = j(u));
708
708
  }
709
709
  const i = (u, d) => a.forEach(u, (c, l) => o(c, l, d));
710
- return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !vt(t) ? i(Jt(t), n) : t != null && o(n, t, r), this;
710
+ return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !Mt(t) ? i(Jt(t), n) : t != null && o(n, t, r), this;
711
711
  }
712
712
  get(t, n) {
713
- if (t = F(t), t) {
713
+ if (t = D(t), t) {
714
714
  const r = a.findKey(this, t);
715
715
  if (r) {
716
716
  const s = this[r];
717
717
  if (!n)
718
718
  return s;
719
719
  if (n === !0)
720
- return Mt(s);
720
+ return Vt(s);
721
721
  if (a.isFunction(n))
722
722
  return n.call(this, s, r);
723
723
  if (a.isRegExp(n))
@@ -727,9 +727,9 @@ class M {
727
727
  }
728
728
  }
729
729
  has(t, n) {
730
- if (t = F(t), t) {
730
+ if (t = D(t), t) {
731
731
  const r = a.findKey(this, t);
732
- return !!(r && this[r] !== void 0 && (!n || W(this, this[r], r, n)));
732
+ return !!(r && this[r] !== void 0 && (!n || v(this, this[r], r, n)));
733
733
  }
734
734
  return !1;
735
735
  }
@@ -737,9 +737,9 @@ class M {
737
737
  const r = this;
738
738
  let s = !1;
739
739
  function o(i) {
740
- if (i = F(i), i) {
740
+ if (i = D(i), i) {
741
741
  const u = a.findKey(r, i);
742
- u && (!n || W(r, r[u], u, n)) && (delete r[u], s = !0);
742
+ u && (!n || v(r, r[u], u, n)) && (delete r[u], s = !0);
743
743
  }
744
744
  }
745
745
  return a.isArray(t) ? t.forEach(o) : o(t), s;
@@ -749,7 +749,7 @@ class M {
749
749
  let r = n.length, s = !1;
750
750
  for (; r--; ) {
751
751
  const o = n[r];
752
- (!t || W(this, this[o], o, t, !0)) && (delete this[o], s = !0);
752
+ (!t || v(this, this[o], o, t, !0)) && (delete this[o], s = !0);
753
753
  }
754
754
  return s;
755
755
  }
@@ -758,11 +758,11 @@ class M {
758
758
  return a.forEach(this, (s, o) => {
759
759
  const i = a.findKey(r, o);
760
760
  if (i) {
761
- n[i] = q(s), delete n[o];
761
+ n[i] = j(s), delete n[o];
762
762
  return;
763
763
  }
764
- const u = t ? Wt(o) : String(o).trim();
765
- u !== o && delete n[o], n[u] = q(s), r[u] = !0;
764
+ const u = t ? vt(o) : String(o).trim();
765
+ u !== o && delete n[o], n[u] = j(s), r[u] = !0;
766
766
  }), this;
767
767
  }
768
768
  concat(...t) {
@@ -792,28 +792,28 @@ class M {
792
792
  return n.forEach((s) => r.set(s)), r;
793
793
  }
794
794
  static accessor(t) {
795
- const r = (this[we] = this[we] = {
795
+ const r = (this[Ee] = this[Ee] = {
796
796
  accessors: {}
797
797
  }).accessors, s = this.prototype;
798
798
  function o(i) {
799
- const u = F(i);
800
- r[u] || (Yt(s, i), r[u] = !0);
799
+ const u = D(i);
800
+ r[u] || (Wt(s, i), r[u] = !0);
801
801
  }
802
802
  return a.isArray(t) ? t.forEach(o) : o(t), this;
803
803
  }
804
804
  }
805
- M.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
806
- a.freezeMethods(M.prototype);
807
- a.freezeMethods(M);
808
- const R = M;
809
- function Y(e, t) {
810
- const n = this || ae, r = t || n, s = R.from(r.headers);
805
+ V.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
806
+ a.freezeMethods(V.prototype);
807
+ a.freezeMethods(V);
808
+ const R = V;
809
+ function W(e, t) {
810
+ const n = this || ie, r = t || n, s = R.from(r.headers);
811
811
  let o = r.data;
812
812
  return a.forEach(e, function(u) {
813
813
  o = u.call(n, o, s.normalize(), t ? t.status : void 0);
814
814
  }), s.normalize(), o;
815
815
  }
816
- function qe(e) {
816
+ function je(e) {
817
817
  return !!(e && e.__CANCEL__);
818
818
  }
819
819
  function L(e, t, n) {
@@ -832,7 +832,7 @@ function Gt(e, t, n) {
832
832
  n
833
833
  ));
834
834
  }
835
- const Qt = S.isStandardBrowserEnv ? (
835
+ const Yt = S.isStandardBrowserEnv ? (
836
836
  // Standard browser envs support document.cookie
837
837
  function() {
838
838
  return {
@@ -863,16 +863,16 @@ const Qt = S.isStandardBrowserEnv ? (
863
863
  };
864
864
  }()
865
865
  );
866
- function Xt(e) {
866
+ function Qt(e) {
867
867
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
868
868
  }
869
- function Zt(e, t) {
869
+ function Xt(e, t) {
870
870
  return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
871
871
  }
872
- function He(e, t) {
873
- return e && !Xt(t) ? Zt(e, t) : t;
872
+ function qe(e, t) {
873
+ return e && !Qt(t) ? Xt(e, t) : t;
874
874
  }
875
- const en = S.isStandardBrowserEnv ? (
875
+ const Zt = S.isStandardBrowserEnv ? (
876
876
  // Standard browser envs have full support of the APIs needed to test
877
877
  // whether the request URL is of the same origin as current location.
878
878
  function() {
@@ -904,11 +904,11 @@ const en = S.isStandardBrowserEnv ? (
904
904
  };
905
905
  }()
906
906
  );
907
- function tn(e) {
907
+ function en(e) {
908
908
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
909
909
  return t && t[1] || "";
910
910
  }
911
- function nn(e, t) {
911
+ function tn(e, t) {
912
912
  e = e || 10;
913
913
  const n = new Array(e), r = new Array(e);
914
914
  let s = 0, o = 0, i;
@@ -924,9 +924,9 @@ function nn(e, t) {
924
924
  return y ? Math.round(w * 1e3 / y) : void 0;
925
925
  };
926
926
  }
927
- function ge(e, t) {
927
+ function we(e, t) {
928
928
  let n = 0;
929
- const r = nn(50, 250);
929
+ const r = tn(50, 250);
930
930
  return (s) => {
931
931
  const o = s.loaded, i = s.lengthComputable ? s.total : void 0, u = o - n, d = r(u), c = o <= i;
932
932
  n = o;
@@ -942,7 +942,7 @@ function ge(e, t) {
942
942
  l[t ? "download" : "upload"] = !0, e(l);
943
943
  };
944
944
  }
945
- const rn = typeof XMLHttpRequest < "u", sn = rn && function(e) {
945
+ const nn = typeof XMLHttpRequest < "u", rn = nn && function(e) {
946
946
  return new Promise(function(n, r) {
947
947
  let s = e.data;
948
948
  const o = R.from(e.headers).normalize(), i = e.responseType;
@@ -956,8 +956,8 @@ const rn = typeof XMLHttpRequest < "u", sn = rn && function(e) {
956
956
  const y = e.auth.username || "", f = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
957
957
  o.set("Authorization", "Basic " + btoa(y + ":" + f));
958
958
  }
959
- const l = He(e.baseURL, e.url);
960
- c.open(e.method.toUpperCase(), Ie(l, e.params, e.paramsSerializer), !0), c.timeout = e.timeout;
959
+ const l = qe(e.baseURL, e.url);
960
+ c.open(e.method.toUpperCase(), Be(l, e.params, e.paramsSerializer), !0), c.timeout = e.timeout;
961
961
  function p() {
962
962
  if (!c)
963
963
  return;
@@ -985,7 +985,7 @@ const rn = typeof XMLHttpRequest < "u", sn = rn && function(e) {
985
985
  r(new m("Network Error", m.ERR_NETWORK, e, c)), c = null;
986
986
  }, c.ontimeout = function() {
987
987
  let f = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
988
- const h = e.transitional || je;
988
+ const h = e.transitional || Ie;
989
989
  e.timeoutErrorMessage && (f = e.timeoutErrorMessage), r(new m(
990
990
  f,
991
991
  h.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
@@ -993,26 +993,26 @@ const rn = typeof XMLHttpRequest < "u", sn = rn && function(e) {
993
993
  c
994
994
  )), c = null;
995
995
  }, S.isStandardBrowserEnv) {
996
- const y = (e.withCredentials || en(l)) && e.xsrfCookieName && Qt.read(e.xsrfCookieName);
996
+ const y = (e.withCredentials || Zt(l)) && e.xsrfCookieName && Yt.read(e.xsrfCookieName);
997
997
  y && o.set(e.xsrfHeaderName, y);
998
998
  }
999
999
  s === void 0 && o.setContentType(null), "setRequestHeader" in c && a.forEach(o.toJSON(), function(f, h) {
1000
1000
  c.setRequestHeader(h, f);
1001
- }), a.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), i && i !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress", ge(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", ge(e.onUploadProgress)), (e.cancelToken || e.signal) && (u = (y) => {
1001
+ }), a.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), i && i !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress", we(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", we(e.onUploadProgress)), (e.cancelToken || e.signal) && (u = (y) => {
1002
1002
  c && (r(!y || y.type ? new L(null, e, c) : y), c.abort(), c = null);
1003
1003
  }, e.cancelToken && e.cancelToken.subscribe(u), e.signal && (e.signal.aborted ? u() : e.signal.addEventListener("abort", u)));
1004
- const w = tn(l);
1004
+ const w = en(l);
1005
1005
  if (w && S.protocols.indexOf(w) === -1) {
1006
1006
  r(new m("Unsupported protocol " + w + ":", m.ERR_BAD_REQUEST, e));
1007
1007
  return;
1008
1008
  }
1009
1009
  c.send(s || null);
1010
1010
  });
1011
- }, H = {
1012
- http: Nt,
1013
- xhr: sn
1011
+ }, q = {
1012
+ http: Ct,
1013
+ xhr: rn
1014
1014
  };
1015
- a.forEach(H, (e, t) => {
1015
+ a.forEach(q, (e, t) => {
1016
1016
  if (e) {
1017
1017
  try {
1018
1018
  Object.defineProperty(e, "name", { value: t });
@@ -1021,50 +1021,50 @@ a.forEach(H, (e, t) => {
1021
1021
  Object.defineProperty(e, "adapterName", { value: t });
1022
1022
  }
1023
1023
  });
1024
- const on = {
1024
+ const sn = {
1025
1025
  getAdapter: (e) => {
1026
1026
  e = a.isArray(e) ? e : [e];
1027
1027
  const { length: t } = e;
1028
1028
  let n, r;
1029
- for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ? H[n.toLowerCase()] : n)); s++)
1029
+ for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ? q[n.toLowerCase()] : n)); s++)
1030
1030
  ;
1031
1031
  if (!r)
1032
1032
  throw r === !1 ? new m(
1033
1033
  `Adapter ${n} is not supported by the environment`,
1034
1034
  "ERR_NOT_SUPPORT"
1035
1035
  ) : new Error(
1036
- a.hasOwnProp(H, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
1036
+ a.hasOwnProp(q, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
1037
1037
  );
1038
1038
  if (!a.isFunction(r))
1039
1039
  throw new TypeError("adapter is not a function");
1040
1040
  return r;
1041
1041
  },
1042
- adapters: H
1042
+ adapters: q
1043
1043
  };
1044
1044
  function G(e) {
1045
1045
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1046
1046
  throw new L(null, e);
1047
1047
  }
1048
- function Se(e) {
1049
- return G(e), e.headers = R.from(e.headers), e.data = Y.call(
1048
+ function ge(e) {
1049
+ return G(e), e.headers = R.from(e.headers), e.data = W.call(
1050
1050
  e,
1051
1051
  e.transformRequest
1052
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), on.getAdapter(e.adapter || ae.adapter)(e).then(function(r) {
1053
- return G(e), r.data = Y.call(
1052
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), sn.getAdapter(e.adapter || ie.adapter)(e).then(function(r) {
1053
+ return G(e), r.data = W.call(
1054
1054
  e,
1055
1055
  e.transformResponse,
1056
1056
  r
1057
1057
  ), r.headers = R.from(r.headers), r;
1058
1058
  }, function(r) {
1059
- return qe(r) || (G(e), r && r.response && (r.response.data = Y.call(
1059
+ return je(r) || (G(e), r && r.response && (r.response.data = W.call(
1060
1060
  e,
1061
1061
  e.transformResponse,
1062
1062
  r.response
1063
1063
  ), r.response.headers = R.from(r.response.headers))), Promise.reject(r);
1064
1064
  });
1065
1065
  }
1066
- const be = (e) => e instanceof R ? e.toJSON() : e;
1067
- function N(e, t) {
1066
+ const Se = (e) => e instanceof R ? e.toJSON() : e;
1067
+ function _(e, t) {
1068
1068
  t = t || {};
1069
1069
  const n = {};
1070
1070
  function r(c, l, p) {
@@ -1122,23 +1122,23 @@ function N(e, t) {
1122
1122
  socketPath: i,
1123
1123
  responseEncoding: i,
1124
1124
  validateStatus: u,
1125
- headers: (c, l) => s(be(c), be(l), !0)
1125
+ headers: (c, l) => s(Se(c), Se(l), !0)
1126
1126
  };
1127
1127
  return a.forEach(Object.keys(e).concat(Object.keys(t)), function(l) {
1128
1128
  const p = d[l] || s, w = p(e[l], t[l], l);
1129
1129
  a.isUndefined(w) && p !== u || (n[l] = w);
1130
1130
  }), n;
1131
1131
  }
1132
- const Ke = "1.3.4", ce = {};
1132
+ const He = "1.3.4", ae = {};
1133
1133
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1134
- ce[e] = function(r) {
1134
+ ae[e] = function(r) {
1135
1135
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1136
1136
  };
1137
1137
  });
1138
- const Re = {};
1139
- ce.transitional = function(t, n, r) {
1138
+ const be = {};
1139
+ ae.transitional = function(t, n, r) {
1140
1140
  function s(o, i) {
1141
- return "[Axios v" + Ke + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1141
+ return "[Axios v" + He + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1142
1142
  }
1143
1143
  return (o, i, u) => {
1144
1144
  if (t === !1)
@@ -1146,7 +1146,7 @@ ce.transitional = function(t, n, r) {
1146
1146
  s(i, " has been removed" + (n ? " in " + n : "")),
1147
1147
  m.ERR_DEPRECATED
1148
1148
  );
1149
- return n && !Re[i] && (Re[i] = !0, console.warn(
1149
+ return n && !be[i] && (be[i] = !0, console.warn(
1150
1150
  s(
1151
1151
  i,
1152
1152
  " has been deprecated since v" + n + " and will be removed in the near future"
@@ -1154,7 +1154,7 @@ ce.transitional = function(t, n, r) {
1154
1154
  )), t ? t(o, i, u) : !0;
1155
1155
  };
1156
1156
  };
1157
- function an(e, t, n) {
1157
+ function on(e, t, n) {
1158
1158
  if (typeof e != "object")
1159
1159
  throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1160
1160
  const r = Object.keys(e);
@@ -1171,15 +1171,15 @@ function an(e, t, n) {
1171
1171
  throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
1172
1172
  }
1173
1173
  }
1174
- const ee = {
1175
- assertOptions: an,
1176
- validators: ce
1177
- }, A = ee.validators;
1174
+ const Z = {
1175
+ assertOptions: on,
1176
+ validators: ae
1177
+ }, A = Z.validators;
1178
1178
  class z {
1179
1179
  constructor(t) {
1180
1180
  this.defaults = t, this.interceptors = {
1181
- request: new Ee(),
1182
- response: new Ee()
1181
+ request: new ye(),
1182
+ response: new ye()
1183
1183
  };
1184
1184
  }
1185
1185
  /**
@@ -1191,13 +1191,13 @@ class z {
1191
1191
  * @returns {Promise} The Promise to be fulfilled
1192
1192
  */
1193
1193
  request(t, n) {
1194
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = N(this.defaults, n);
1194
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = _(this.defaults, n);
1195
1195
  const { transitional: r, paramsSerializer: s, headers: o } = n;
1196
- r !== void 0 && ee.assertOptions(r, {
1196
+ r !== void 0 && Z.assertOptions(r, {
1197
1197
  silentJSONParsing: A.transitional(A.boolean),
1198
1198
  forcedJSONParsing: A.transitional(A.boolean),
1199
1199
  clarifyTimeoutError: A.transitional(A.boolean)
1200
- }, !1), s !== void 0 && ee.assertOptions(s, {
1200
+ }, !1), s !== void 0 && Z.assertOptions(s, {
1201
1201
  encode: A.function,
1202
1202
  serialize: A.function
1203
1203
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
@@ -1222,7 +1222,7 @@ class z {
1222
1222
  });
1223
1223
  let l, p = 0, w;
1224
1224
  if (!d) {
1225
- const f = [Se.bind(this), void 0];
1225
+ const f = [ge.bind(this), void 0];
1226
1226
  for (f.unshift.apply(f, u), f.push.apply(f, c), w = f.length, l = Promise.resolve(n); p < w; )
1227
1227
  l = l.then(f[p++], f[p++]);
1228
1228
  return l;
@@ -1239,7 +1239,7 @@ class z {
1239
1239
  }
1240
1240
  }
1241
1241
  try {
1242
- l = Se.call(this, y);
1242
+ l = ge.call(this, y);
1243
1243
  } catch (f) {
1244
1244
  return Promise.reject(f);
1245
1245
  }
@@ -1248,14 +1248,14 @@ class z {
1248
1248
  return l;
1249
1249
  }
1250
1250
  getUri(t) {
1251
- t = N(this.defaults, t);
1252
- const n = He(t.baseURL, t.url);
1253
- return Ie(n, t.params, t.paramsSerializer);
1251
+ t = _(this.defaults, t);
1252
+ const n = qe(t.baseURL, t.url);
1253
+ return Be(n, t.params, t.paramsSerializer);
1254
1254
  }
1255
1255
  }
1256
1256
  a.forEach(["delete", "get", "head", "options"], function(t) {
1257
1257
  z.prototype[t] = function(n, r) {
1258
- return this.request(N(r || {}, {
1258
+ return this.request(_(r || {}, {
1259
1259
  method: t,
1260
1260
  url: n,
1261
1261
  data: (r || {}).data
@@ -1265,7 +1265,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
1265
1265
  a.forEach(["post", "put", "patch"], function(t) {
1266
1266
  function n(r) {
1267
1267
  return function(o, i, u) {
1268
- return this.request(N(u || {}, {
1268
+ return this.request(_(u || {}, {
1269
1269
  method: t,
1270
1270
  headers: r ? {
1271
1271
  "Content-Type": "multipart/form-data"
@@ -1277,8 +1277,8 @@ a.forEach(["post", "put", "patch"], function(t) {
1277
1277
  }
1278
1278
  z.prototype[t] = n(), z.prototype[t + "Form"] = n(!0);
1279
1279
  });
1280
- const K = z;
1281
- class ue {
1280
+ const H = z;
1281
+ class ce {
1282
1282
  constructor(t) {
1283
1283
  if (typeof t != "function")
1284
1284
  throw new TypeError("executor must be a function.");
@@ -1339,23 +1339,23 @@ class ue {
1339
1339
  static source() {
1340
1340
  let t;
1341
1341
  return {
1342
- token: new ue(function(s) {
1342
+ token: new ce(function(s) {
1343
1343
  t = s;
1344
1344
  }),
1345
1345
  cancel: t
1346
1346
  };
1347
1347
  }
1348
1348
  }
1349
- const cn = ue;
1350
- function un(e) {
1349
+ const an = ce;
1350
+ function cn(e) {
1351
1351
  return function(n) {
1352
1352
  return e.apply(null, n);
1353
1353
  };
1354
1354
  }
1355
- function ln(e) {
1355
+ function un(e) {
1356
1356
  return a.isObject(e) && e.isAxiosError === !0;
1357
1357
  }
1358
- const te = {
1358
+ const ee = {
1359
1359
  Continue: 100,
1360
1360
  SwitchingProtocols: 101,
1361
1361
  Processing: 102,
@@ -1420,41 +1420,41 @@ const te = {
1420
1420
  NotExtended: 510,
1421
1421
  NetworkAuthenticationRequired: 511
1422
1422
  };
1423
- Object.entries(te).forEach(([e, t]) => {
1424
- te[t] = e;
1423
+ Object.entries(ee).forEach(([e, t]) => {
1424
+ ee[t] = e;
1425
1425
  });
1426
- const fn = te;
1426
+ const ln = ee;
1427
1427
  function ze(e) {
1428
- const t = new K(e), n = Oe(K.prototype.request, t);
1429
- return a.extend(n, K.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1430
- return ze(N(e, s));
1428
+ const t = new H(e), n = Re(H.prototype.request, t);
1429
+ return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1430
+ return ze(_(e, s));
1431
1431
  }, n;
1432
1432
  }
1433
- const E = ze(ae);
1434
- E.Axios = K;
1433
+ const E = ze(ie);
1434
+ E.Axios = H;
1435
1435
  E.CanceledError = L;
1436
- E.CancelToken = cn;
1437
- E.isCancel = qe;
1438
- E.VERSION = Ke;
1439
- E.toFormData = V;
1436
+ E.CancelToken = an;
1437
+ E.isCancel = je;
1438
+ E.VERSION = He;
1439
+ E.toFormData = K;
1440
1440
  E.AxiosError = m;
1441
1441
  E.Cancel = E.CanceledError;
1442
1442
  E.all = function(t) {
1443
1443
  return Promise.all(t);
1444
1444
  };
1445
- E.spread = un;
1446
- E.isAxiosError = ln;
1447
- E.mergeConfig = N;
1445
+ E.spread = cn;
1446
+ E.isAxiosError = un;
1447
+ E.mergeConfig = _;
1448
1448
  E.AxiosHeaders = R;
1449
1449
  E.formToJSON = (e) => ke(a.isHTMLForm(e) ? new FormData(e) : e);
1450
- E.HttpStatusCode = fn;
1450
+ E.HttpStatusCode = ln;
1451
1451
  E.default = E;
1452
- const dn = E;
1453
- class pn {
1452
+ const fn = E;
1453
+ class dn {
1454
1454
  constructor(t) {
1455
- P(this, "client");
1456
- P(this, "queryParams");
1457
- this.client = dn.create({
1455
+ C(this, "client");
1456
+ C(this, "queryParams");
1457
+ this.client = fn.create({
1458
1458
  ...t,
1459
1459
  headers: {
1460
1460
  Authorization: `Bearer ${t.apiKey}`
@@ -1480,9 +1480,8 @@ class pn {
1480
1480
  return this.client.delete(t + this.queryParams);
1481
1481
  }
1482
1482
  }
1483
- let hn = (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), "");
1484
- const mn = "fuul.tracking_id", yn = "fuul.affiliate_id", En = "fuul.traffic_source", wn = "fuul.traffic_category", gn = "fuul.traffic_title", Sn = "fuul.traffic_tag", bn = ["google.com", "bing.com", "yahoo.com"], Rn = () => Nn(mn, () => hn()), On = () => B(() => T("af") || T("referrer"), yn), An = () => document.referrer, Tn = () => B(() => xn(), En), _n = () => B(() => T("category"), wn), Cn = () => B(() => T("title"), gn), Pn = () => B(() => T("tag"), Sn);
1485
- function Nn(e, t) {
1483
+ let pn = (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), "");
1484
+ const hn = "fuul.tracking_id", mn = ["google.com", "bing.com", "yahoo.com"], yn = () => On(hn, () => pn()), En = () => T("af") || T("referrer"), wn = () => document.referrer, gn = () => An(), Sn = () => T("category"), bn = () => T("title"), Rn = () => T("tag"), On = (e, t) => {
1486
1485
  const n = localStorage.getItem(e);
1487
1486
  if (n)
1488
1487
  return n;
@@ -1490,85 +1489,76 @@ function Nn(e, t) {
1490
1489
  const r = t();
1491
1490
  return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
1492
1491
  }
1493
- }
1494
- function B(e, t) {
1495
- const n = e();
1496
- return n ? (localStorage.setItem(t, n), n) : localStorage.getItem(t);
1497
- }
1498
- function T(e) {
1499
- return new URLSearchParams(window.location.search).get(e);
1500
- }
1501
- function xn() {
1492
+ }, T = (e) => new URLSearchParams(window.location.search).get(e), An = () => {
1502
1493
  const e = T("source"), t = T("af") || T("referrer");
1503
1494
  if (e)
1504
1495
  return e;
1505
1496
  if (t)
1506
1497
  return "affiliate";
1507
1498
  const n = document.referrer;
1508
- return bn.includes(n) ? "organic" : "direct";
1509
- }
1510
- const Fn = "https://api.fuul.xyz/api/v1/";
1511
- let j = !1, ne = !1, le, Q, $e, Ve;
1512
- function Dn(e) {
1513
- j = !!e.debug, !ne && (le = e.apiKey, kn(), Q = qn(
1514
- e.baseApiUrl ?? Fn,
1499
+ return mn.includes(n) ? "organic" : "direct";
1500
+ }, Tn = "https://api.fuul.xyz/api/v1/";
1501
+ let I = !1, te = !1, ue, Y, $e, Ke;
1502
+ function Pn(e) {
1503
+ I = !!e.debug, !te && (ue = e.apiKey, Fn(), Y = Un(
1504
+ e.baseApiUrl ?? Tn,
1515
1505
  e.defaultQueryParams ?? {}
1516
- ), $e = new Ye({ httpClient: Q, debug: j }), Ve = new Qe({ httpClient: Q, debug: j }), ne = !0, j && console.debug("Fuul SDK: init() complete"));
1506
+ ), $e = new We({ httpClient: Y, debug: I }), Ke = new Ye({ httpClient: Y, debug: I }), te = !0, I && console.debug("Fuul SDK: init() complete"));
1517
1507
  }
1518
1508
  function Je() {
1519
- if (!ne)
1509
+ if (!te)
1520
1510
  throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
1521
1511
  }
1522
- async function fe(e, t, n) {
1523
- Je(), jn();
1524
- const r = Rn(), s = On(), o = Tn(), i = _n(), u = Cn(), d = Pn(), c = An(), l = {
1512
+ async function le(e, t, n) {
1513
+ Je(), Dn();
1514
+ const r = yn(), s = En(), o = gn(), i = Sn(), u = bn(), d = Rn(), c = wn(), l = {
1525
1515
  name: e,
1526
1516
  args: t || {},
1527
1517
  metadata: {
1528
1518
  tracking_id: r ?? ""
1529
1519
  }
1530
1520
  };
1531
- n != null && n.address && (l.user_address = n.address), n != null && n.signature && (l.signature = n == null ? void 0 : n.signature, l.signature_message = n == null ? void 0 : n.message), s && (l.metadata.referrer = s, l.metadata.affiliate_id = s), c && (l.metadata.referrer_url = c), o && (l.metadata.source = o), i && (l.metadata.category = i), u && (l.metadata.title = u), d && (l.metadata.tag = d), Ve.sendEvent(l);
1521
+ n != null && n.address && (l.user_address = n.address), n != null && n.signature && (l.signature = n == null ? void 0 : n.signature, l.signature_message = n == null ? void 0 : n.message), s && (l.metadata.referrer = s, l.metadata.affiliate_id = s), c && (l.metadata.referrer_url = c), o && (l.metadata.source = o), i && (l.metadata.category = i), u && (l.metadata.title = u), d && (l.metadata.tag = d), Ke.sendEvent(l);
1532
1522
  }
1533
- async function Un(e) {
1534
- await fe("pageview", {
1523
+ async function Nn(e) {
1524
+ await le("pageview", {
1535
1525
  page: e ?? document.location.pathname,
1536
1526
  locationOrigin: document.location.origin
1537
1527
  });
1538
1528
  }
1539
- async function Ln(e) {
1540
- await fe("connect_wallet", {}, e);
1529
+ async function Cn(e) {
1530
+ await le("connect_wallet", {}, e);
1541
1531
  }
1542
- function Bn(e, t, n) {
1543
- return `${e}?p=${n}&source=fuul&referrer=${t}`;
1532
+ function _n(e, t) {
1533
+ return `${e}?af=${t}`;
1544
1534
  }
1545
- async function In() {
1535
+ async function xn() {
1546
1536
  return Je(), $e.getAll();
1547
1537
  }
1548
- function jn() {
1538
+ function Dn() {
1549
1539
  if (typeof window > "u" || typeof document > "u")
1550
1540
  throw new Error("Fuul SDK: Browser context required");
1551
1541
  }
1552
- function kn() {
1553
- if (!le)
1542
+ function Fn() {
1543
+ if (!ue)
1554
1544
  throw new Error("Fuul SDK: Invalid API key");
1555
1545
  }
1556
- function qn(e, t) {
1557
- return new pn({
1546
+ function Un(e, t) {
1547
+ return new dn({
1558
1548
  baseURL: e,
1559
1549
  timeout: 1e4,
1560
- apiKey: le,
1550
+ apiKey: ue,
1561
1551
  queryParams: t
1562
1552
  });
1563
1553
  }
1564
- const Kn = {
1565
- init: Dn,
1566
- sendEvent: fe,
1567
- sendPageview: Un,
1568
- sendConnectWallet: Ln,
1569
- generateTrackingLink: Bn,
1570
- getConversions: In
1554
+ const Bn = {
1555
+ init: Pn,
1556
+ sendEvent: le,
1557
+ sendPageview: Nn,
1558
+ sendConnectWallet: Cn,
1559
+ generateTrackingLink: _n,
1560
+ getConversions: xn
1571
1561
  };
1572
1562
  export {
1573
- Kn as Fuul
1563
+ Bn as Fuul
1574
1564
  };