@fuul/sdk 7.14.0 → 7.16.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,75 +1,81 @@
1
- var xt = Object.defineProperty;
2
- var Nt = (t, e, r) => e in t ? xt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var _ = (t, e, r) => Nt(t, typeof e != "symbol" ? e + "" : e, r);
4
- const De = "/affiliate-portal";
5
- class Ut {
1
+ var Vt = Object.defineProperty;
2
+ var Kt = (t, e, r) => e in t ? Vt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var b = (t, e, r) => Kt(t, typeof e != "symbol" ? e + "" : e, r);
4
+ const ze = "/affiliate-portal";
5
+ class zt {
6
6
  constructor(e) {
7
- _(this, "httpClient");
7
+ b(this, "httpClient");
8
8
  this.httpClient = e.httpClient;
9
9
  }
10
10
  async getAffiliateStats(e) {
11
11
  return (await this.httpClient.get({
12
- path: `${De}/stats`,
12
+ path: `${ze}/stats`,
13
13
  queryParams: {
14
- user_identifier: e.user_identifier
14
+ user_identifier: e.user_identifier,
15
+ from: e.from,
16
+ to: e.to,
17
+ this_month: e.this_month,
18
+ conversion_id: e.conversion_id,
19
+ conversion_name: e.conversion_name
15
20
  }
16
21
  })).data;
17
22
  }
18
23
  async getAffiliateNewTraders(e) {
19
24
  return (await this.httpClient.get({
20
- path: `${De}/new-traders`,
25
+ path: `${ze}/new-traders`,
21
26
  queryParams: {
22
27
  user_identifier: e.user_identifier,
23
28
  from: e.from,
24
- to: e.to
29
+ to: e.to,
30
+ this_month: e.this_month
25
31
  }
26
32
  })).data;
27
33
  }
28
34
  }
29
- function tt(t, e) {
35
+ function gt(t, e) {
30
36
  return function() {
31
37
  return t.apply(e, arguments);
32
38
  };
33
39
  }
34
- const { toString: Lt } = Object.prototype, { getPrototypeOf: Se } = Object, { iterator: ie, toStringTag: rt } = Symbol, oe = /* @__PURE__ */ ((t) => (e) => {
35
- const r = Lt.call(e);
40
+ const { toString: Jt } = Object.prototype, { getPrototypeOf: xe } = Object, { iterator: he, toStringTag: wt } = Symbol, pe = /* @__PURE__ */ ((t) => (e) => {
41
+ const r = Jt.call(e);
36
42
  return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
37
- })(/* @__PURE__ */ Object.create(null)), N = (t) => (t = t.toLowerCase(), (e) => oe(e) === t), ae = (t) => (e) => typeof e === t, { isArray: H } = Array, W = ae("undefined");
38
- function Q(t) {
39
- return t !== null && !W(t) && t.constructor !== null && !W(t.constructor) && P(t.constructor.isBuffer) && t.constructor.isBuffer(t);
43
+ })(/* @__PURE__ */ Object.create(null)), D = (t) => (t = t.toLowerCase(), (e) => pe(e) === t), me = (t) => (e) => typeof e === t, { isArray: Q } = Array, J = me("undefined");
44
+ function ee(t) {
45
+ return t !== null && !J(t) && t.constructor !== null && !J(t.constructor) && T(t.constructor.isBuffer) && t.constructor.isBuffer(t);
40
46
  }
41
- const nt = N("ArrayBuffer");
42
- function Dt(t) {
47
+ const bt = D("ArrayBuffer");
48
+ function Wt(t) {
43
49
  let e;
44
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && nt(t.buffer), e;
50
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && bt(t.buffer), e;
45
51
  }
46
- const Ft = ae("string"), P = ae("function"), st = ae("number"), X = (t) => t !== null && typeof t == "object", kt = (t) => t === !0 || t === !1, ee = (t) => {
47
- if (oe(t) !== "object")
52
+ const Qt = me("string"), T = me("function"), _t = me("number"), te = (t) => t !== null && typeof t == "object", Xt = (t) => t === !0 || t === !1, ue = (t) => {
53
+ if (pe(t) !== "object")
48
54
  return !1;
49
- const e = Se(t);
50
- return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(rt in t) && !(ie in t);
51
- }, Bt = (t) => {
52
- if (!X(t) || Q(t))
55
+ const e = xe(t);
56
+ return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(wt in t) && !(he in t);
57
+ }, Yt = (t) => {
58
+ if (!te(t) || ee(t))
53
59
  return !1;
54
60
  try {
55
61
  return Object.keys(t).length === 0 && Object.getPrototypeOf(t) === Object.prototype;
56
62
  } catch {
57
63
  return !1;
58
64
  }
59
- }, qt = N("Date"), vt = N("File"), It = N("Blob"), jt = N("FileList"), $t = (t) => X(t) && P(t.pipe), Mt = (t) => {
65
+ }, Gt = D("Date"), Zt = D("File"), er = D("Blob"), tr = D("FileList"), rr = (t) => te(t) && T(t.pipe), nr = (t) => {
60
66
  let e;
61
- return t && (typeof FormData == "function" && t instanceof FormData || P(t.append) && ((e = oe(t)) === "formdata" || // detect form-data instance
62
- e === "object" && P(t.toString) && t.toString() === "[object FormData]"));
63
- }, Ht = N("URLSearchParams"), [Vt, Kt, zt, Jt] = ["ReadableStream", "Request", "Response", "Headers"].map(N), Wt = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
64
- function Y(t, e, { allOwnKeys: r = !1 } = {}) {
67
+ return t && (typeof FormData == "function" && t instanceof FormData || T(t.append) && ((e = pe(t)) === "formdata" || // detect form-data instance
68
+ e === "object" && T(t.toString) && t.toString() === "[object FormData]"));
69
+ }, sr = D("URLSearchParams"), [ir, or, ar, cr] = ["ReadableStream", "Request", "Response", "Headers"].map(D), ur = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
70
+ function re(t, e, { allOwnKeys: r = !1 } = {}) {
65
71
  if (t === null || typeof t > "u")
66
72
  return;
67
73
  let n, s;
68
- if (typeof t != "object" && (t = [t]), H(t))
74
+ if (typeof t != "object" && (t = [t]), Q(t))
69
75
  for (n = 0, s = t.length; n < s; n++)
70
76
  e.call(null, t[n], n, t);
71
77
  else {
72
- if (Q(t))
78
+ if (ee(t))
73
79
  return;
74
80
  const i = r ? Object.getOwnPropertyNames(t) : Object.keys(t), o = i.length;
75
81
  let c;
@@ -77,8 +83,8 @@ function Y(t, e, { allOwnKeys: r = !1 } = {}) {
77
83
  c = i[n], e.call(null, t[c], c, t);
78
84
  }
79
85
  }
80
- function it(t, e) {
81
- if (Q(t))
86
+ function Et(t, e) {
87
+ if (ee(t))
82
88
  return null;
83
89
  e = e.toLowerCase();
84
90
  const r = Object.keys(t);
@@ -88,75 +94,90 @@ function it(t, e) {
88
94
  return s;
89
95
  return null;
90
96
  }
91
- const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ot = (t) => !W(t) && t !== q;
92
- function ye() {
93
- const { caseless: t } = ot(this) && this || {}, e = {}, r = (n, s) => {
94
- const i = t && it(e, s) || s;
95
- ee(e[i]) && ee(n) ? e[i] = ye(e[i], n) : ee(n) ? e[i] = ye({}, n) : H(n) ? e[i] = n.slice() : e[i] = n;
97
+ const $ = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ct = (t) => !J(t) && t !== $;
98
+ function Ae() {
99
+ const { caseless: t, skipUndefined: e } = Ct(this) && this || {}, r = {}, n = (s, i) => {
100
+ const o = t && Et(r, i) || i;
101
+ ue(r[o]) && ue(s) ? r[o] = Ae(r[o], s) : ue(s) ? r[o] = Ae({}, s) : Q(s) ? r[o] = s.slice() : (!e || !J(s)) && (r[o] = s);
96
102
  };
97
- for (let n = 0, s = arguments.length; n < s; n++)
98
- arguments[n] && Y(arguments[n], r);
99
- return e;
103
+ for (let s = 0, i = arguments.length; s < i; s++)
104
+ arguments[s] && re(arguments[s], n);
105
+ return r;
100
106
  }
101
- const Qt = (t, e, r, { allOwnKeys: n } = {}) => (Y(e, (s, i) => {
102
- r && P(s) ? t[i] = tt(s, r) : t[i] = s;
103
- }, { allOwnKeys: n }), t), Xt = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Yt = (t, e, r, n) => {
104
- t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t, Object.defineProperty(t, "super", {
107
+ const lr = (t, e, r, { allOwnKeys: n } = {}) => (re(e, (s, i) => {
108
+ r && T(s) ? Object.defineProperty(t, i, {
109
+ value: gt(s, r),
110
+ writable: !0,
111
+ enumerable: !0,
112
+ configurable: !0
113
+ }) : Object.defineProperty(t, i, {
114
+ value: s,
115
+ writable: !0,
116
+ enumerable: !0,
117
+ configurable: !0
118
+ });
119
+ }, { allOwnKeys: n }), t), dr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), fr = (t, e, r, n) => {
120
+ t.prototype = Object.create(e.prototype, n), Object.defineProperty(t.prototype, "constructor", {
121
+ value: t,
122
+ writable: !0,
123
+ enumerable: !1,
124
+ configurable: !0
125
+ }), Object.defineProperty(t, "super", {
105
126
  value: e.prototype
106
127
  }), r && Object.assign(t.prototype, r);
107
- }, Gt = (t, e, r, n) => {
128
+ }, hr = (t, e, r, n) => {
108
129
  let s, i, o;
109
130
  const c = {};
110
131
  if (e = e || {}, t == null) return e;
111
132
  do {
112
133
  for (s = Object.getOwnPropertyNames(t), i = s.length; i-- > 0; )
113
134
  o = s[i], (!n || n(o, t, e)) && !c[o] && (e[o] = t[o], c[o] = !0);
114
- t = r !== !1 && Se(t);
135
+ t = r !== !1 && xe(t);
115
136
  } while (t && (!r || r(t, e)) && t !== Object.prototype);
116
137
  return e;
117
- }, Zt = (t, e, r) => {
138
+ }, pr = (t, e, r) => {
118
139
  t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
119
140
  const n = t.indexOf(e, r);
120
141
  return n !== -1 && n === r;
121
- }, er = (t) => {
142
+ }, mr = (t) => {
122
143
  if (!t) return null;
123
- if (H(t)) return t;
144
+ if (Q(t)) return t;
124
145
  let e = t.length;
125
- if (!st(e)) return null;
146
+ if (!_t(e)) return null;
126
147
  const r = new Array(e);
127
148
  for (; e-- > 0; )
128
149
  r[e] = t[e];
129
150
  return r;
130
- }, tr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Se(Uint8Array)), rr = (t, e) => {
131
- const n = (t && t[ie]).call(t);
151
+ }, yr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && xe(Uint8Array)), gr = (t, e) => {
152
+ const n = (t && t[he]).call(t);
132
153
  let s;
133
154
  for (; (s = n.next()) && !s.done; ) {
134
155
  const i = s.value;
135
156
  e.call(t, i[0], i[1]);
136
157
  }
137
- }, nr = (t, e) => {
158
+ }, wr = (t, e) => {
138
159
  let r;
139
160
  const n = [];
140
161
  for (; (r = t.exec(e)) !== null; )
141
162
  n.push(r);
142
163
  return n;
143
- }, sr = N("HTMLFormElement"), ir = (t) => t.toLowerCase().replace(
164
+ }, br = D("HTMLFormElement"), _r = (t) => t.toLowerCase().replace(
144
165
  /[-_\s]([a-z\d])(\w*)/g,
145
166
  function(r, n, s) {
146
167
  return n.toUpperCase() + s;
147
168
  }
148
- ), Fe = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), or = N("RegExp"), at = (t, e) => {
169
+ ), Je = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Er = D("RegExp"), St = (t, e) => {
149
170
  const r = Object.getOwnPropertyDescriptors(t), n = {};
150
- Y(r, (s, i) => {
171
+ re(r, (s, i) => {
151
172
  let o;
152
173
  (o = e(s, i, t)) !== !1 && (n[i] = o || s);
153
174
  }), Object.defineProperties(t, n);
154
- }, ar = (t) => {
155
- at(t, (e, r) => {
156
- if (P(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
175
+ }, Cr = (t) => {
176
+ St(t, (e, r) => {
177
+ if (T(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
157
178
  return !1;
158
179
  const n = t[r];
159
- if (P(n)) {
180
+ if (T(n)) {
160
181
  if (e.enumerable = !1, "writable" in e) {
161
182
  e.writable = !1;
162
183
  return;
@@ -166,109 +187,124 @@ const Qt = (t, e, r, { allOwnKeys: n } = {}) => (Y(e, (s, i) => {
166
187
  });
167
188
  }
168
189
  });
169
- }, cr = (t, e) => {
190
+ }, Sr = (t, e) => {
170
191
  const r = {}, n = (s) => {
171
192
  s.forEach((i) => {
172
193
  r[i] = !0;
173
194
  });
174
195
  };
175
- return H(t) ? n(t) : n(String(t).split(e)), r;
176
- }, ur = () => {
177
- }, lr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
178
- function dr(t) {
179
- return !!(t && P(t.append) && t[rt] === "FormData" && t[ie]);
196
+ return Q(t) ? n(t) : n(String(t).split(e)), r;
197
+ }, Rr = () => {
198
+ }, Ar = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
199
+ function Tr(t) {
200
+ return !!(t && T(t.append) && t[wt] === "FormData" && t[he]);
180
201
  }
181
- const fr = (t) => {
202
+ const Pr = (t) => {
182
203
  const e = new Array(10), r = (n, s) => {
183
- if (X(n)) {
204
+ if (te(n)) {
184
205
  if (e.indexOf(n) >= 0)
185
206
  return;
186
- if (Q(n))
207
+ if (ee(n))
187
208
  return n;
188
209
  if (!("toJSON" in n)) {
189
210
  e[s] = n;
190
- const i = H(n) ? [] : {};
191
- return Y(n, (o, c) => {
192
- const d = r(o, s + 1);
193
- !W(d) && (i[c] = d);
211
+ const i = Q(n) ? [] : {};
212
+ return re(n, (o, c) => {
213
+ const f = r(o, s + 1);
214
+ !J(f) && (i[c] = f);
194
215
  }), e[s] = void 0, i;
195
216
  }
196
217
  }
197
218
  return n;
198
219
  };
199
220
  return r(t, 0);
200
- }, hr = N("AsyncFunction"), pr = (t) => t && (X(t) || P(t)) && P(t.then) && P(t.catch), ct = ((t, e) => t ? setImmediate : e ? ((r, n) => (q.addEventListener("message", ({ source: s, data: i }) => {
201
- s === q && i === r && n.length && n.shift()();
221
+ }, Or = D("AsyncFunction"), Nr = (t) => t && (te(t) || T(t)) && T(t.then) && T(t.catch), Rt = ((t, e) => t ? setImmediate : e ? ((r, n) => ($.addEventListener("message", ({ source: s, data: i }) => {
222
+ s === $ && i === r && n.length && n.shift()();
202
223
  }, !1), (s) => {
203
- n.push(s), q.postMessage(r, "*");
224
+ n.push(s), $.postMessage(r, "*");
204
225
  }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
205
226
  typeof setImmediate == "function",
206
- P(q.postMessage)
207
- ), mr = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || ct, yr = (t) => t != null && P(t[ie]), a = {
208
- isArray: H,
209
- isArrayBuffer: nt,
210
- isBuffer: Q,
211
- isFormData: Mt,
212
- isArrayBufferView: Dt,
213
- isString: Ft,
214
- isNumber: st,
215
- isBoolean: kt,
216
- isObject: X,
217
- isPlainObject: ee,
218
- isEmptyObject: Bt,
219
- isReadableStream: Vt,
220
- isRequest: Kt,
221
- isResponse: zt,
222
- isHeaders: Jt,
223
- isUndefined: W,
224
- isDate: qt,
225
- isFile: vt,
226
- isBlob: It,
227
- isRegExp: or,
228
- isFunction: P,
229
- isStream: $t,
230
- isURLSearchParams: Ht,
231
- isTypedArray: tr,
232
- isFileList: jt,
233
- forEach: Y,
234
- merge: ye,
235
- extend: Qt,
236
- trim: Wt,
237
- stripBOM: Xt,
238
- inherits: Yt,
239
- toFlatObject: Gt,
240
- kindOf: oe,
241
- kindOfTest: N,
242
- endsWith: Zt,
243
- toArray: er,
244
- forEachEntry: rr,
245
- matchAll: nr,
246
- isHTMLForm: sr,
247
- hasOwnProperty: Fe,
248
- hasOwnProp: Fe,
227
+ T($.postMessage)
228
+ ), xr = typeof queueMicrotask < "u" ? queueMicrotask.bind($) : typeof process < "u" && process.nextTick || Rt, Ur = (t) => t != null && T(t[he]), a = {
229
+ isArray: Q,
230
+ isArrayBuffer: bt,
231
+ isBuffer: ee,
232
+ isFormData: nr,
233
+ isArrayBufferView: Wt,
234
+ isString: Qt,
235
+ isNumber: _t,
236
+ isBoolean: Xt,
237
+ isObject: te,
238
+ isPlainObject: ue,
239
+ isEmptyObject: Yt,
240
+ isReadableStream: ir,
241
+ isRequest: or,
242
+ isResponse: ar,
243
+ isHeaders: cr,
244
+ isUndefined: J,
245
+ isDate: Gt,
246
+ isFile: Zt,
247
+ isBlob: er,
248
+ isRegExp: Er,
249
+ isFunction: T,
250
+ isStream: rr,
251
+ isURLSearchParams: sr,
252
+ isTypedArray: yr,
253
+ isFileList: tr,
254
+ forEach: re,
255
+ merge: Ae,
256
+ extend: lr,
257
+ trim: ur,
258
+ stripBOM: dr,
259
+ inherits: fr,
260
+ toFlatObject: hr,
261
+ kindOf: pe,
262
+ kindOfTest: D,
263
+ endsWith: pr,
264
+ toArray: mr,
265
+ forEachEntry: gr,
266
+ matchAll: wr,
267
+ isHTMLForm: br,
268
+ hasOwnProperty: Je,
269
+ hasOwnProp: Je,
249
270
  // an alias to avoid ESLint no-prototype-builtins detection
250
- reduceDescriptors: at,
251
- freezeMethods: ar,
252
- toObjectSet: cr,
253
- toCamelCase: ir,
254
- noop: ur,
255
- toFiniteNumber: lr,
256
- findKey: it,
257
- global: q,
258
- isContextDefined: ot,
259
- isSpecCompliantForm: dr,
260
- toJSONObject: fr,
261
- isAsyncFn: hr,
262
- isThenable: pr,
263
- setImmediate: ct,
264
- asap: mr,
265
- isIterable: yr
271
+ reduceDescriptors: St,
272
+ freezeMethods: Cr,
273
+ toObjectSet: Sr,
274
+ toCamelCase: _r,
275
+ noop: Rr,
276
+ toFiniteNumber: Ar,
277
+ findKey: Et,
278
+ global: $,
279
+ isContextDefined: Ct,
280
+ isSpecCompliantForm: Tr,
281
+ toJSONObject: Pr,
282
+ isAsyncFn: Or,
283
+ isThenable: Nr,
284
+ setImmediate: Rt,
285
+ asap: xr,
286
+ isIterable: Ur
266
287
  };
267
- function m(t, e, r, n, s) {
268
- Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), n && (this.request = n), s && (this.response = s, this.status = s.status ? s.status : null);
269
- }
270
- a.inherits(m, Error, {
271
- toJSON: function() {
288
+ let m = class At extends Error {
289
+ static from(e, r, n, s, i, o) {
290
+ const c = new At(e.message, r || e.code, n, s, i);
291
+ return c.cause = e, c.name = e.name, o && Object.assign(c, o), c;
292
+ }
293
+ /**
294
+ * Create an Error with the specified message, config, error code, request and response.
295
+ *
296
+ * @param {string} message The error message.
297
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
298
+ * @param {Object} [config] The config.
299
+ * @param {Object} [request] The request.
300
+ * @param {Object} [response] The response.
301
+ *
302
+ * @returns {Error} The created error.
303
+ */
304
+ constructor(e, r, n, s, i) {
305
+ super(e), this.name = "AxiosError", this.isAxiosError = !0, r && (this.code = r), n && (this.config = n), s && (this.request = s), i && (this.response = i, this.status = i.status);
306
+ }
307
+ toJSON() {
272
308
  return {
273
309
  // Standard
274
310
  message: this.message,
@@ -287,52 +323,38 @@ a.inherits(m, Error, {
287
323
  status: this.status
288
324
  };
289
325
  }
290
- });
291
- const ut = m.prototype, lt = {};
292
- [
293
- "ERR_BAD_OPTION_VALUE",
294
- "ERR_BAD_OPTION",
295
- "ECONNABORTED",
296
- "ETIMEDOUT",
297
- "ERR_NETWORK",
298
- "ERR_FR_TOO_MANY_REDIRECTS",
299
- "ERR_DEPRECATED",
300
- "ERR_BAD_RESPONSE",
301
- "ERR_BAD_REQUEST",
302
- "ERR_CANCELED",
303
- "ERR_NOT_SUPPORT",
304
- "ERR_INVALID_URL"
305
- // eslint-disable-next-line func-names
306
- ].forEach((t) => {
307
- lt[t] = { value: t };
308
- });
309
- Object.defineProperties(m, lt);
310
- Object.defineProperty(ut, "isAxiosError", { value: !0 });
311
- m.from = (t, e, r, n, s, i) => {
312
- const o = Object.create(ut);
313
- return a.toFlatObject(t, o, function(d) {
314
- return d !== Error.prototype;
315
- }, (c) => c !== "isAxiosError"), m.call(o, t.message, e, r, n, s), o.cause = t, o.name = t.name, i && Object.assign(o, i), o;
316
326
  };
317
- const gr = null;
318
- function ge(t) {
327
+ m.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
328
+ m.ERR_BAD_OPTION = "ERR_BAD_OPTION";
329
+ m.ECONNABORTED = "ECONNABORTED";
330
+ m.ETIMEDOUT = "ETIMEDOUT";
331
+ m.ERR_NETWORK = "ERR_NETWORK";
332
+ m.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
333
+ m.ERR_DEPRECATED = "ERR_DEPRECATED";
334
+ m.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
335
+ m.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
336
+ m.ERR_CANCELED = "ERR_CANCELED";
337
+ m.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
338
+ m.ERR_INVALID_URL = "ERR_INVALID_URL";
339
+ const Dr = null;
340
+ function Te(t) {
319
341
  return a.isPlainObject(t) || a.isArray(t);
320
342
  }
321
- function dt(t) {
343
+ function Tt(t) {
322
344
  return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
323
345
  }
324
- function ke(t, e, r) {
346
+ function We(t, e, r) {
325
347
  return t ? t.concat(e).map(function(s, i) {
326
- return s = dt(s), !r && i ? "[" + s + "]" : s;
348
+ return s = Tt(s), !r && i ? "[" + s + "]" : s;
327
349
  }).join(r ? "." : "") : e;
328
350
  }
329
- function wr(t) {
330
- return a.isArray(t) && !t.some(ge);
351
+ function Lr(t) {
352
+ return a.isArray(t) && !t.some(Te);
331
353
  }
332
- const br = a.toFlatObject(a, {}, null, function(e) {
354
+ const Fr = a.toFlatObject(a, {}, null, function(e) {
333
355
  return /^is[A-Z]/.test(e);
334
356
  });
335
- function ce(t, e, r) {
357
+ function ye(t, e, r) {
336
358
  if (!a.isObject(t))
337
359
  throw new TypeError("target must be an object");
338
360
  e = e || new FormData(), r = a.toFlatObject(r, {
@@ -342,60 +364,60 @@ function ce(t, e, r) {
342
364
  }, !1, function(y, p) {
343
365
  return !a.isUndefined(p[y]);
344
366
  });
345
- const n = r.metaTokens, s = r.visitor || u, i = r.dots, o = r.indexes, d = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(e);
367
+ const n = r.metaTokens, s = r.visitor || u, i = r.dots, o = r.indexes, f = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(e);
346
368
  if (!a.isFunction(s))
347
369
  throw new TypeError("visitor must be a function");
348
- function l(h) {
349
- if (h === null) return "";
350
- if (a.isDate(h))
351
- return h.toISOString();
352
- if (a.isBoolean(h))
353
- return h.toString();
354
- if (!d && a.isBlob(h))
370
+ function l(d) {
371
+ if (d === null) return "";
372
+ if (a.isDate(d))
373
+ return d.toISOString();
374
+ if (a.isBoolean(d))
375
+ return d.toString();
376
+ if (!f && a.isBlob(d))
355
377
  throw new m("Blob is not supported. Use a Buffer instead.");
356
- return a.isArrayBuffer(h) || a.isTypedArray(h) ? d && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
378
+ return a.isArrayBuffer(d) || a.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
357
379
  }
358
- function u(h, y, p) {
359
- let E = h;
360
- if (h && !p && typeof h == "object") {
380
+ function u(d, y, p) {
381
+ let C = d;
382
+ if (d && !p && typeof d == "object") {
361
383
  if (a.endsWith(y, "{}"))
362
- y = n ? y : y.slice(0, -2), h = JSON.stringify(h);
363
- else if (a.isArray(h) && wr(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (E = a.toArray(h)))
364
- return y = dt(y), E.forEach(function(R, L) {
365
- !(a.isUndefined(R) || R === null) && e.append(
384
+ y = n ? y : y.slice(0, -2), d = JSON.stringify(d);
385
+ else if (a.isArray(d) && Lr(d) || (a.isFileList(d) || a.endsWith(y, "[]")) && (C = a.toArray(d)))
386
+ return y = Tt(y), C.forEach(function(S, A) {
387
+ !(a.isUndefined(S) || S === null) && e.append(
366
388
  // eslint-disable-next-line no-nested-ternary
367
- o === !0 ? ke([y], L, i) : o === null ? y : y + "[]",
368
- l(R)
389
+ o === !0 ? We([y], A, i) : o === null ? y : y + "[]",
390
+ l(S)
369
391
  );
370
392
  }), !1;
371
393
  }
372
- return ge(h) ? !0 : (e.append(ke(p, y, i), l(h)), !1);
394
+ return Te(d) ? !0 : (e.append(We(p, y, i), l(d)), !1);
373
395
  }
374
- const f = [], g = Object.assign(br, {
396
+ const h = [], g = Object.assign(Fr, {
375
397
  defaultVisitor: u,
376
398
  convertValue: l,
377
- isVisitable: ge
399
+ isVisitable: Te
378
400
  });
379
- function b(h, y) {
380
- if (!a.isUndefined(h)) {
381
- if (f.indexOf(h) !== -1)
401
+ function E(d, y) {
402
+ if (!a.isUndefined(d)) {
403
+ if (h.indexOf(d) !== -1)
382
404
  throw Error("Circular reference detected in " + y.join("."));
383
- f.push(h), a.forEach(h, function(E, S) {
384
- (!(a.isUndefined(E) || E === null) && s.call(
405
+ h.push(d), a.forEach(d, function(C, O) {
406
+ (!(a.isUndefined(C) || C === null) && s.call(
385
407
  e,
386
- E,
387
- a.isString(S) ? S.trim() : S,
408
+ C,
409
+ a.isString(O) ? O.trim() : O,
388
410
  y,
389
411
  g
390
- )) === !0 && b(E, y ? y.concat(S) : [S]);
391
- }), f.pop();
412
+ )) === !0 && E(C, y ? y.concat(O) : [O]);
413
+ }), h.pop();
392
414
  }
393
415
  }
394
416
  if (!a.isObject(t))
395
417
  throw new TypeError("data must be an object");
396
- return b(t), e;
418
+ return E(t), e;
397
419
  }
398
- function Be(t) {
420
+ function Qe(t) {
399
421
  const e = {
400
422
  "!": "%21",
401
423
  "'": "%27",
@@ -409,40 +431,38 @@ function Be(t) {
409
431
  return e[n];
410
432
  });
411
433
  }
412
- function Re(t, e) {
413
- this._pairs = [], t && ce(t, this, e);
434
+ function Ue(t, e) {
435
+ this._pairs = [], t && ye(t, this, e);
414
436
  }
415
- const ft = Re.prototype;
416
- ft.append = function(e, r) {
437
+ const Pt = Ue.prototype;
438
+ Pt.append = function(e, r) {
417
439
  this._pairs.push([e, r]);
418
440
  };
419
- ft.toString = function(e) {
441
+ Pt.toString = function(e) {
420
442
  const r = e ? function(n) {
421
- return e.call(this, n, Be);
422
- } : Be;
443
+ return e.call(this, n, Qe);
444
+ } : Qe;
423
445
  return this._pairs.map(function(s) {
424
446
  return r(s[0]) + "=" + r(s[1]);
425
447
  }, "").join("&");
426
448
  };
427
- function _r(t) {
428
- return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
449
+ function kr(t) {
450
+ return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
429
451
  }
430
- function ht(t, e, r) {
452
+ function Ot(t, e, r) {
431
453
  if (!e)
432
454
  return t;
433
- const n = r && r.encode || _r;
434
- a.isFunction(r) && (r = {
455
+ const n = r && r.encode || kr, s = a.isFunction(r) ? {
435
456
  serialize: r
436
- });
437
- const s = r && r.serialize;
438
- let i;
439
- if (s ? i = s(e, r) : i = a.isURLSearchParams(e) ? e.toString() : new Re(e, r).toString(n), i) {
440
- const o = t.indexOf("#");
441
- o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
457
+ } : r, i = s && s.serialize;
458
+ let o;
459
+ if (i ? o = i(e, s) : o = a.isURLSearchParams(e) ? e.toString() : new Ue(e, s).toString(n), o) {
460
+ const c = t.indexOf("#");
461
+ c !== -1 && (t = t.slice(0, c)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
442
462
  }
443
463
  return t;
444
464
  }
445
- class qe {
465
+ class Xe {
446
466
  constructor() {
447
467
  this.handlers = [];
448
468
  }
@@ -451,6 +471,7 @@ class qe {
451
471
  *
452
472
  * @param {Function} fulfilled The function to handle `then` for a `Promise`
453
473
  * @param {Function} rejected The function to handle `reject` for a `Promise`
474
+ * @param {Object} options The options for the interceptor, synchronous and runWhen
454
475
  *
455
476
  * @return {Number} An ID used to remove interceptor later
456
477
  */
@@ -467,7 +488,7 @@ class qe {
467
488
  *
468
489
  * @param {Number} id The ID that was returned by `use`
469
490
  *
470
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
491
+ * @returns {void}
471
492
  */
472
493
  eject(e) {
473
494
  this.handlers[e] && (this.handlers[e] = null);
@@ -496,42 +517,42 @@ class qe {
496
517
  });
497
518
  }
498
519
  }
499
- const pt = {
520
+ const Nt = {
500
521
  silentJSONParsing: !0,
501
522
  forcedJSONParsing: !0,
502
523
  clarifyTimeoutError: !1
503
- }, Er = typeof URLSearchParams < "u" ? URLSearchParams : Re, Cr = typeof FormData < "u" ? FormData : null, Sr = typeof Blob < "u" ? Blob : null, Rr = {
524
+ }, vr = typeof URLSearchParams < "u" ? URLSearchParams : Ue, Br = typeof FormData < "u" ? FormData : null, qr = typeof Blob < "u" ? Blob : null, Ir = {
504
525
  isBrowser: !0,
505
526
  classes: {
506
- URLSearchParams: Er,
507
- FormData: Cr,
508
- Blob: Sr
527
+ URLSearchParams: vr,
528
+ FormData: Br,
529
+ Blob: qr
509
530
  },
510
531
  protocols: ["http", "https", "file", "blob", "url", "data"]
511
- }, Ae = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Ar = Ae && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), Tr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
512
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Pr = Ae && window.location.href || "http://localhost", Or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
532
+ }, De = typeof window < "u" && typeof document < "u", Pe = typeof navigator == "object" && navigator || void 0, jr = De && (!Pe || ["ReactNative", "NativeScript", "NS"].indexOf(Pe.product) < 0), $r = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
533
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Mr = De && window.location.href || "http://localhost", Hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
513
534
  __proto__: null,
514
- hasBrowserEnv: Ae,
515
- hasStandardBrowserEnv: Ar,
516
- hasStandardBrowserWebWorkerEnv: Tr,
517
- navigator: we,
518
- origin: Pr
519
- }, Symbol.toStringTag, { value: "Module" })), A = {
520
- ...Or,
521
- ...Rr
535
+ hasBrowserEnv: De,
536
+ hasStandardBrowserEnv: jr,
537
+ hasStandardBrowserWebWorkerEnv: $r,
538
+ navigator: Pe,
539
+ origin: Mr
540
+ }, Symbol.toStringTag, { value: "Module" })), R = {
541
+ ...Hr,
542
+ ...Ir
522
543
  };
523
- function xr(t, e) {
524
- return ce(t, new A.classes.URLSearchParams(), {
544
+ function Vr(t, e) {
545
+ return ye(t, new R.classes.URLSearchParams(), {
525
546
  visitor: function(r, n, s, i) {
526
- return A.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
547
+ return R.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
527
548
  },
528
549
  ...e
529
550
  });
530
551
  }
531
- function Nr(t) {
552
+ function Kr(t) {
532
553
  return a.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
533
554
  }
534
- function Ur(t) {
555
+ function zr(t) {
535
556
  const e = {}, r = Object.keys(t);
536
557
  let n;
537
558
  const s = r.length;
@@ -540,22 +561,22 @@ function Ur(t) {
540
561
  i = r[n], e[i] = t[i];
541
562
  return e;
542
563
  }
543
- function mt(t) {
564
+ function xt(t) {
544
565
  function e(r, n, s, i) {
545
566
  let o = r[i++];
546
567
  if (o === "__proto__") return !0;
547
- const c = Number.isFinite(+o), d = i >= r.length;
548
- return o = !o && a.isArray(s) ? s.length : o, d ? (a.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), e(r, n, s[o], i) && a.isArray(s[o]) && (s[o] = Ur(s[o])), !c);
568
+ const c = Number.isFinite(+o), f = i >= r.length;
569
+ return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), e(r, n, s[o], i) && a.isArray(s[o]) && (s[o] = zr(s[o])), !c);
549
570
  }
550
571
  if (a.isFormData(t) && a.isFunction(t.entries)) {
551
572
  const r = {};
552
573
  return a.forEachEntry(t, (n, s) => {
553
- e(Nr(n), s, r, 0);
574
+ e(Kr(n), s, r, 0);
554
575
  }), r;
555
576
  }
556
577
  return null;
557
578
  }
558
- function Lr(t, e, r) {
579
+ function Jr(t, e, r) {
559
580
  if (a.isString(t))
560
581
  try {
561
582
  return (e || JSON.parse)(t), a.trim(t);
@@ -565,13 +586,13 @@ function Lr(t, e, r) {
565
586
  }
566
587
  return (0, JSON.stringify)(t);
567
588
  }
568
- const G = {
569
- transitional: pt,
589
+ const ne = {
590
+ transitional: Nt,
570
591
  adapter: ["xhr", "http", "fetch"],
571
592
  transformRequest: [function(e, r) {
572
593
  const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, i = a.isObject(e);
573
594
  if (i && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e))
574
- return s ? JSON.stringify(mt(e)) : e;
595
+ return s ? JSON.stringify(xt(e)) : e;
575
596
  if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e) || a.isReadableStream(e))
576
597
  return e;
577
598
  if (a.isArrayBufferView(e))
@@ -581,26 +602,26 @@ const G = {
581
602
  let c;
582
603
  if (i) {
583
604
  if (n.indexOf("application/x-www-form-urlencoded") > -1)
584
- return xr(e, this.formSerializer).toString();
605
+ return Vr(e, this.formSerializer).toString();
585
606
  if ((c = a.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
586
- const d = this.env && this.env.FormData;
587
- return ce(
607
+ const f = this.env && this.env.FormData;
608
+ return ye(
588
609
  c ? { "files[]": e } : e,
589
- d && new d(),
610
+ f && new f(),
590
611
  this.formSerializer
591
612
  );
592
613
  }
593
614
  }
594
- return i || s ? (r.setContentType("application/json", !1), Lr(e)) : e;
615
+ return i || s ? (r.setContentType("application/json", !1), Jr(e)) : e;
595
616
  }],
596
617
  transformResponse: [function(e) {
597
- const r = this.transitional || G.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
618
+ const r = this.transitional || ne.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
598
619
  if (a.isResponse(e) || a.isReadableStream(e))
599
620
  return e;
600
621
  if (e && a.isString(e) && (n && !this.responseType || s)) {
601
622
  const o = !(r && r.silentJSONParsing) && s;
602
623
  try {
603
- return JSON.parse(e);
624
+ return JSON.parse(e, this.parseReviver);
604
625
  } catch (c) {
605
626
  if (o)
606
627
  throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
@@ -618,8 +639,8 @@ const G = {
618
639
  maxContentLength: -1,
619
640
  maxBodyLength: -1,
620
641
  env: {
621
- FormData: A.classes.FormData,
622
- Blob: A.classes.Blob
642
+ FormData: R.classes.FormData,
643
+ Blob: R.classes.Blob
623
644
  },
624
645
  validateStatus: function(e) {
625
646
  return e >= 200 && e < 300;
@@ -632,9 +653,9 @@ const G = {
632
653
  }
633
654
  };
634
655
  a.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
635
- G.headers[t] = {};
656
+ ne.headers[t] = {};
636
657
  });
637
- const Dr = a.toObjectSet([
658
+ const Wr = a.toObjectSet([
638
659
  "age",
639
660
  "authorization",
640
661
  "content-length",
@@ -652,29 +673,29 @@ const Dr = a.toObjectSet([
652
673
  "referer",
653
674
  "retry-after",
654
675
  "user-agent"
655
- ]), Fr = (t) => {
676
+ ]), Qr = (t) => {
656
677
  const e = {};
657
678
  let r, n, s;
658
679
  return t && t.split(`
659
680
  `).forEach(function(o) {
660
- s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || e[r] && Dr[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
681
+ s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || e[r] && Wr[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
661
682
  }), e;
662
- }, ve = Symbol("internals");
663
- function z(t) {
683
+ }, Ye = Symbol("internals");
684
+ function G(t) {
664
685
  return t && String(t).trim().toLowerCase();
665
686
  }
666
- function te(t) {
667
- return t === !1 || t == null ? t : a.isArray(t) ? t.map(te) : String(t);
687
+ function le(t) {
688
+ return t === !1 || t == null ? t : a.isArray(t) ? t.map(le) : String(t);
668
689
  }
669
- function kr(t) {
690
+ function Xr(t) {
670
691
  const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
671
692
  let n;
672
693
  for (; n = r.exec(t); )
673
694
  e[n[1]] = n[2];
674
695
  return e;
675
696
  }
676
- const Br = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
677
- function fe(t, e, r, n, s) {
697
+ const Yr = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
698
+ function Ee(t, e, r, n, s) {
678
699
  if (a.isFunction(n))
679
700
  return n.call(this, e, r);
680
701
  if (s && (e = r), !!a.isString(e)) {
@@ -684,10 +705,10 @@ function fe(t, e, r, n, s) {
684
705
  return n.test(e);
685
706
  }
686
707
  }
687
- function qr(t) {
708
+ function Gr(t) {
688
709
  return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n);
689
710
  }
690
- function vr(t, e) {
711
+ function Zr(t, e) {
691
712
  const r = a.toCamelCase(" " + e);
692
713
  ["get", "set", "has"].forEach((n) => {
693
714
  Object.defineProperty(t, n + r, {
@@ -698,30 +719,30 @@ function vr(t, e) {
698
719
  });
699
720
  });
700
721
  }
701
- let O = class {
722
+ let P = class {
702
723
  constructor(e) {
703
724
  e && this.set(e);
704
725
  }
705
726
  set(e, r, n) {
706
727
  const s = this;
707
- function i(c, d, l) {
708
- const u = z(d);
728
+ function i(c, f, l) {
729
+ const u = G(f);
709
730
  if (!u)
710
731
  throw new Error("header name must be a non-empty string");
711
- const f = a.findKey(s, u);
712
- (!f || s[f] === void 0 || l === !0 || l === void 0 && s[f] !== !1) && (s[f || d] = te(c));
732
+ const h = a.findKey(s, u);
733
+ (!h || s[h] === void 0 || l === !0 || l === void 0 && s[h] !== !1) && (s[h || f] = le(c));
713
734
  }
714
- const o = (c, d) => a.forEach(c, (l, u) => i(l, u, d));
735
+ const o = (c, f) => a.forEach(c, (l, u) => i(l, u, f));
715
736
  if (a.isPlainObject(e) || e instanceof this.constructor)
716
737
  o(e, r);
717
- else if (a.isString(e) && (e = e.trim()) && !Br(e))
718
- o(Fr(e), r);
738
+ else if (a.isString(e) && (e = e.trim()) && !Yr(e))
739
+ o(Qr(e), r);
719
740
  else if (a.isObject(e) && a.isIterable(e)) {
720
- let c = {}, d, l;
741
+ let c = {}, f, l;
721
742
  for (const u of e) {
722
743
  if (!a.isArray(u))
723
744
  throw TypeError("Object iterator must return a key-value pair");
724
- c[l = u[0]] = (d = c[l]) ? a.isArray(d) ? [...d, u[1]] : [d, u[1]] : u[1];
745
+ c[l = u[0]] = (f = c[l]) ? a.isArray(f) ? [...f, u[1]] : [f, u[1]] : u[1];
725
746
  }
726
747
  o(c, r);
727
748
  } else
@@ -729,14 +750,14 @@ let O = class {
729
750
  return this;
730
751
  }
731
752
  get(e, r) {
732
- if (e = z(e), e) {
753
+ if (e = G(e), e) {
733
754
  const n = a.findKey(this, e);
734
755
  if (n) {
735
756
  const s = this[n];
736
757
  if (!r)
737
758
  return s;
738
759
  if (r === !0)
739
- return kr(s);
760
+ return Xr(s);
740
761
  if (a.isFunction(r))
741
762
  return r.call(this, s, n);
742
763
  if (a.isRegExp(r))
@@ -746,9 +767,9 @@ let O = class {
746
767
  }
747
768
  }
748
769
  has(e, r) {
749
- if (e = z(e), e) {
770
+ if (e = G(e), e) {
750
771
  const n = a.findKey(this, e);
751
- return !!(n && this[n] !== void 0 && (!r || fe(this, this[n], n, r)));
772
+ return !!(n && this[n] !== void 0 && (!r || Ee(this, this[n], n, r)));
752
773
  }
753
774
  return !1;
754
775
  }
@@ -756,9 +777,9 @@ let O = class {
756
777
  const n = this;
757
778
  let s = !1;
758
779
  function i(o) {
759
- if (o = z(o), o) {
780
+ if (o = G(o), o) {
760
781
  const c = a.findKey(n, o);
761
- c && (!r || fe(n, n[c], c, r)) && (delete n[c], s = !0);
782
+ c && (!r || Ee(n, n[c], c, r)) && (delete n[c], s = !0);
762
783
  }
763
784
  }
764
785
  return a.isArray(e) ? e.forEach(i) : i(e), s;
@@ -768,7 +789,7 @@ let O = class {
768
789
  let n = r.length, s = !1;
769
790
  for (; n--; ) {
770
791
  const i = r[n];
771
- (!e || fe(this, this[i], i, e, !0)) && (delete this[i], s = !0);
792
+ (!e || Ee(this, this[i], i, e, !0)) && (delete this[i], s = !0);
772
793
  }
773
794
  return s;
774
795
  }
@@ -777,11 +798,11 @@ let O = class {
777
798
  return a.forEach(this, (s, i) => {
778
799
  const o = a.findKey(n, i);
779
800
  if (o) {
780
- r[o] = te(s), delete r[i];
801
+ r[o] = le(s), delete r[i];
781
802
  return;
782
803
  }
783
- const c = e ? qr(i) : String(i).trim();
784
- c !== i && delete r[i], r[c] = te(s), n[c] = !0;
804
+ const c = e ? Gr(i) : String(i).trim();
805
+ c !== i && delete r[i], r[c] = le(s), n[c] = !0;
785
806
  }), this;
786
807
  }
787
808
  concat(...e) {
@@ -814,18 +835,18 @@ let O = class {
814
835
  return r.forEach((s) => n.set(s)), n;
815
836
  }
816
837
  static accessor(e) {
817
- const n = (this[ve] = this[ve] = {
838
+ const n = (this[Ye] = this[Ye] = {
818
839
  accessors: {}
819
840
  }).accessors, s = this.prototype;
820
841
  function i(o) {
821
- const c = z(o);
822
- n[c] || (vr(s, o), n[c] = !0);
842
+ const c = G(o);
843
+ n[c] || (Zr(s, o), n[c] = !0);
823
844
  }
824
845
  return a.isArray(e) ? e.forEach(i) : i(e), this;
825
846
  }
826
847
  };
827
- O.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
828
- a.reduceDescriptors(O.prototype, ({ value: t }, e) => {
848
+ P.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
849
+ a.reduceDescriptors(P.prototype, ({ value: t }, e) => {
829
850
  let r = e[0].toUpperCase() + e.slice(1);
830
851
  return {
831
852
  get: () => t,
@@ -834,24 +855,32 @@ a.reduceDescriptors(O.prototype, ({ value: t }, e) => {
834
855
  }
835
856
  };
836
857
  });
837
- a.freezeMethods(O);
838
- function he(t, e) {
839
- const r = this || G, n = e || r, s = O.from(n.headers);
858
+ a.freezeMethods(P);
859
+ function Ce(t, e) {
860
+ const r = this || ne, n = e || r, s = P.from(n.headers);
840
861
  let i = n.data;
841
862
  return a.forEach(t, function(c) {
842
863
  i = c.call(r, i, s.normalize(), e ? e.status : void 0);
843
864
  }), s.normalize(), i;
844
865
  }
845
- function yt(t) {
866
+ function Ut(t) {
846
867
  return !!(t && t.__CANCEL__);
847
868
  }
848
- function V(t, e, r) {
849
- m.call(this, t ?? "canceled", m.ERR_CANCELED, e, r), this.name = "CanceledError";
850
- }
851
- a.inherits(V, m, {
852
- __CANCEL__: !0
853
- });
854
- function gt(t, e, r) {
869
+ let se = class extends m {
870
+ /**
871
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
872
+ *
873
+ * @param {string=} message The message.
874
+ * @param {Object=} config The config.
875
+ * @param {Object=} request The request.
876
+ *
877
+ * @returns {CanceledError} The created error.
878
+ */
879
+ constructor(e, r, n) {
880
+ super(e ?? "canceled", m.ERR_CANCELED, r, n), this.name = "CanceledError", this.__CANCEL__ = !0;
881
+ }
882
+ };
883
+ function Dt(t, e, r) {
855
884
  const n = r.config.validateStatus;
856
885
  !r.status || !n || n(r.status) ? t(r) : e(new m(
857
886
  "Request failed with status code " + r.status,
@@ -861,80 +890,82 @@ function gt(t, e, r) {
861
890
  r
862
891
  ));
863
892
  }
864
- function Ir(t) {
893
+ function en(t) {
865
894
  const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
866
895
  return e && e[1] || "";
867
896
  }
868
- function jr(t, e) {
897
+ function tn(t, e) {
869
898
  t = t || 10;
870
899
  const r = new Array(t), n = new Array(t);
871
900
  let s = 0, i = 0, o;
872
- return e = e !== void 0 ? e : 1e3, function(d) {
901
+ return e = e !== void 0 ? e : 1e3, function(f) {
873
902
  const l = Date.now(), u = n[i];
874
- o || (o = l), r[s] = d, n[s] = l;
875
- let f = i, g = 0;
876
- for (; f !== s; )
877
- g += r[f++], f = f % t;
903
+ o || (o = l), r[s] = f, n[s] = l;
904
+ let h = i, g = 0;
905
+ for (; h !== s; )
906
+ g += r[h++], h = h % t;
878
907
  if (s = (s + 1) % t, s === i && (i = (i + 1) % t), l - o < e)
879
908
  return;
880
- const b = u && l - u;
881
- return b ? Math.round(g * 1e3 / b) : void 0;
909
+ const E = u && l - u;
910
+ return E ? Math.round(g * 1e3 / E) : void 0;
882
911
  };
883
912
  }
884
- function $r(t, e) {
913
+ function rn(t, e) {
885
914
  let r = 0, n = 1e3 / e, s, i;
886
915
  const o = (l, u = Date.now()) => {
887
916
  r = u, s = null, i && (clearTimeout(i), i = null), t(...l);
888
917
  };
889
918
  return [(...l) => {
890
- const u = Date.now(), f = u - r;
891
- f >= n ? o(l, u) : (s = l, i || (i = setTimeout(() => {
919
+ const u = Date.now(), h = u - r;
920
+ h >= n ? o(l, u) : (s = l, i || (i = setTimeout(() => {
892
921
  i = null, o(s);
893
- }, n - f)));
922
+ }, n - h)));
894
923
  }, () => s && o(s)];
895
924
  }
896
- const ne = (t, e, r = 3) => {
925
+ const fe = (t, e, r = 3) => {
897
926
  let n = 0;
898
- const s = jr(50, 250);
899
- return $r((i) => {
900
- const o = i.loaded, c = i.lengthComputable ? i.total : void 0, d = o - n, l = s(d), u = o <= c;
927
+ const s = tn(50, 250);
928
+ return rn((i) => {
929
+ const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - n, l = s(f), u = o <= c;
901
930
  n = o;
902
- const f = {
931
+ const h = {
903
932
  loaded: o,
904
933
  total: c,
905
934
  progress: c ? o / c : void 0,
906
- bytes: d,
935
+ bytes: f,
907
936
  rate: l || void 0,
908
937
  estimated: l && c && u ? (c - o) / l : void 0,
909
938
  event: i,
910
939
  lengthComputable: c != null,
911
940
  [e ? "download" : "upload"]: !0
912
941
  };
913
- t(f);
942
+ t(h);
914
943
  }, r);
915
- }, Ie = (t, e) => {
944
+ }, Ge = (t, e) => {
916
945
  const r = t != null;
917
946
  return [(n) => e[0]({
918
947
  lengthComputable: r,
919
948
  total: t,
920
949
  loaded: n
921
950
  }), e[1]];
922
- }, je = (t) => (...e) => a.asap(() => t(...e)), Mr = A.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, A.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
923
- new URL(A.origin),
924
- A.navigator && /(msie|trident)/i.test(A.navigator.userAgent)
925
- ) : () => !0, Hr = A.hasStandardBrowserEnv ? (
951
+ }, Ze = (t) => (...e) => a.asap(() => t(...e)), nn = R.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, R.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
952
+ new URL(R.origin),
953
+ R.navigator && /(msie|trident)/i.test(R.navigator.userAgent)
954
+ ) : () => !0, sn = R.hasStandardBrowserEnv ? (
926
955
  // Standard browser envs support document.cookie
927
956
  {
928
- write(t, e, r, n, s, i) {
929
- const o = [t + "=" + encodeURIComponent(e)];
930
- a.isNumber(r) && o.push("expires=" + new Date(r).toGMTString()), a.isString(n) && o.push("path=" + n), a.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
957
+ write(t, e, r, n, s, i, o) {
958
+ if (typeof document > "u") return;
959
+ const c = [`${t}=${encodeURIComponent(e)}`];
960
+ a.isNumber(r) && c.push(`expires=${new Date(r).toUTCString()}`), a.isString(n) && c.push(`path=${n}`), a.isString(s) && c.push(`domain=${s}`), i === !0 && c.push("secure"), a.isString(o) && c.push(`SameSite=${o}`), document.cookie = c.join("; ");
931
961
  },
932
962
  read(t) {
933
- const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
934
- return e ? decodeURIComponent(e[3]) : null;
963
+ if (typeof document > "u") return null;
964
+ const e = document.cookie.match(new RegExp("(?:^|; )" + t + "=([^;]*)"));
965
+ return e ? decodeURIComponent(e[1]) : null;
935
966
  },
936
967
  remove(t) {
937
- this.write(t, "", Date.now() - 864e5);
968
+ this.write(t, "", Date.now() - 864e5, "/");
938
969
  }
939
970
  }
940
971
  ) : (
@@ -949,28 +980,28 @@ const ne = (t, e, r = 3) => {
949
980
  }
950
981
  }
951
982
  );
952
- function Vr(t) {
983
+ function on(t) {
953
984
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
954
985
  }
955
- function Kr(t, e) {
986
+ function an(t, e) {
956
987
  return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
957
988
  }
958
- function wt(t, e, r) {
959
- let n = !Vr(e);
960
- return t && (n || r == !1) ? Kr(t, e) : e;
989
+ function Lt(t, e, r) {
990
+ let n = !on(e);
991
+ return t && (n || r == !1) ? an(t, e) : e;
961
992
  }
962
- const $e = (t) => t instanceof O ? { ...t } : t;
963
- function I(t, e) {
993
+ const et = (t) => t instanceof P ? { ...t } : t;
994
+ function H(t, e) {
964
995
  e = e || {};
965
996
  const r = {};
966
- function n(l, u, f, g) {
997
+ function n(l, u, h, g) {
967
998
  return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: g }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
968
999
  }
969
- function s(l, u, f, g) {
1000
+ function s(l, u, h, g) {
970
1001
  if (a.isUndefined(u)) {
971
1002
  if (!a.isUndefined(l))
972
- return n(void 0, l, f, g);
973
- } else return n(l, u, f, g);
1003
+ return n(void 0, l, h, g);
1004
+ } else return n(l, u, h, g);
974
1005
  }
975
1006
  function i(l, u) {
976
1007
  if (!a.isUndefined(u))
@@ -982,13 +1013,13 @@ function I(t, e) {
982
1013
  return n(void 0, l);
983
1014
  } else return n(void 0, u);
984
1015
  }
985
- function c(l, u, f) {
986
- if (f in e)
1016
+ function c(l, u, h) {
1017
+ if (h in e)
987
1018
  return n(l, u);
988
- if (f in t)
1019
+ if (h in t)
989
1020
  return n(void 0, l);
990
1021
  }
991
- const d = {
1022
+ const f = {
992
1023
  url: i,
993
1024
  method: i,
994
1025
  data: i,
@@ -1017,92 +1048,93 @@ function I(t, e) {
1017
1048
  socketPath: o,
1018
1049
  responseEncoding: o,
1019
1050
  validateStatus: c,
1020
- headers: (l, u, f) => s($e(l), $e(u), f, !0)
1051
+ headers: (l, u, h) => s(et(l), et(u), h, !0)
1021
1052
  };
1022
1053
  return a.forEach(Object.keys({ ...t, ...e }), function(u) {
1023
- const f = d[u] || s, g = f(t[u], e[u], u);
1024
- a.isUndefined(g) && f !== c || (r[u] = g);
1054
+ const h = f[u] || s, g = h(t[u], e[u], u);
1055
+ a.isUndefined(g) && h !== c || (r[u] = g);
1025
1056
  }), r;
1026
1057
  }
1027
- const bt = (t) => {
1028
- const e = I({}, t);
1058
+ const Ft = (t) => {
1059
+ const e = H({}, t);
1029
1060
  let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = e;
1030
- e.headers = o = O.from(o), e.url = ht(wt(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), c && o.set(
1061
+ if (e.headers = o = P.from(o), e.url = Ot(Lt(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), c && o.set(
1031
1062
  "Authorization",
1032
1063
  "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
1033
- );
1034
- let d;
1035
- if (a.isFormData(r)) {
1036
- if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
1064
+ ), a.isFormData(r)) {
1065
+ if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
1037
1066
  o.setContentType(void 0);
1038
- else if ((d = o.getContentType()) !== !1) {
1039
- const [l, ...u] = d ? d.split(";").map((f) => f.trim()).filter(Boolean) : [];
1040
- o.setContentType([l || "multipart/form-data", ...u].join("; "));
1067
+ else if (a.isFunction(r.getHeaders)) {
1068
+ const f = r.getHeaders(), l = ["content-type", "content-length"];
1069
+ Object.entries(f).forEach(([u, h]) => {
1070
+ l.includes(u.toLowerCase()) && o.set(u, h);
1071
+ });
1041
1072
  }
1042
1073
  }
1043
- if (A.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(e)), n || n !== !1 && Mr(e.url))) {
1044
- const l = s && i && Hr.read(i);
1045
- l && o.set(s, l);
1074
+ if (R.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(e)), n || n !== !1 && nn(e.url))) {
1075
+ const f = s && i && sn.read(i);
1076
+ f && o.set(s, f);
1046
1077
  }
1047
1078
  return e;
1048
- }, zr = typeof XMLHttpRequest < "u", Jr = zr && function(t) {
1079
+ }, cn = typeof XMLHttpRequest < "u", un = cn && function(t) {
1049
1080
  return new Promise(function(r, n) {
1050
- const s = bt(t);
1081
+ const s = Ft(t);
1051
1082
  let i = s.data;
1052
- const o = O.from(s.headers).normalize();
1053
- let { responseType: c, onUploadProgress: d, onDownloadProgress: l } = s, u, f, g, b, h;
1083
+ const o = P.from(s.headers).normalize();
1084
+ let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, h, g, E, d;
1054
1085
  function y() {
1055
- b && b(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
1086
+ E && E(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
1056
1087
  }
1057
1088
  let p = new XMLHttpRequest();
1058
1089
  p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
1059
- function E() {
1090
+ function C() {
1060
1091
  if (!p)
1061
1092
  return;
1062
- const R = O.from(
1093
+ const S = P.from(
1063
1094
  "getAllResponseHeaders" in p && p.getAllResponseHeaders()
1064
- ), T = {
1095
+ ), x = {
1065
1096
  data: !c || c === "text" || c === "json" ? p.responseText : p.response,
1066
1097
  status: p.status,
1067
1098
  statusText: p.statusText,
1068
- headers: R,
1099
+ headers: S,
1069
1100
  config: t,
1070
1101
  request: p
1071
1102
  };
1072
- gt(function(B) {
1073
- r(B), y();
1074
- }, function(B) {
1075
- n(B), y();
1076
- }, T), p = null;
1103
+ Dt(function(N) {
1104
+ r(N), y();
1105
+ }, function(N) {
1106
+ n(N), y();
1107
+ }, x), p = null;
1077
1108
  }
1078
- "onloadend" in p ? p.onloadend = E : p.onreadystatechange = function() {
1079
- !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(E);
1109
+ "onloadend" in p ? p.onloadend = C : p.onreadystatechange = function() {
1110
+ !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(C);
1080
1111
  }, p.onabort = function() {
1081
1112
  p && (n(new m("Request aborted", m.ECONNABORTED, t, p)), p = null);
1082
- }, p.onerror = function() {
1083
- n(new m("Network Error", m.ERR_NETWORK, t, p)), p = null;
1113
+ }, p.onerror = function(A) {
1114
+ const x = A && A.message ? A.message : "Network Error", I = new m(x, m.ERR_NETWORK, t, p);
1115
+ I.event = A || null, n(I), p = null;
1084
1116
  }, p.ontimeout = function() {
1085
- let L = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1086
- const T = s.transitional || pt;
1087
- s.timeoutErrorMessage && (L = s.timeoutErrorMessage), n(new m(
1088
- L,
1089
- T.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
1117
+ let A = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1118
+ const x = s.transitional || Nt;
1119
+ s.timeoutErrorMessage && (A = s.timeoutErrorMessage), n(new m(
1120
+ A,
1121
+ x.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
1090
1122
  t,
1091
1123
  p
1092
1124
  )), p = null;
1093
- }, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(L, T) {
1094
- p.setRequestHeader(T, L);
1095
- }), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([g, h] = ne(l, !0), p.addEventListener("progress", g)), d && p.upload && ([f, b] = ne(d), p.upload.addEventListener("progress", f), p.upload.addEventListener("loadend", b)), (s.cancelToken || s.signal) && (u = (R) => {
1096
- p && (n(!R || R.type ? new V(null, t, p) : R), p.abort(), p = null);
1125
+ }, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(A, x) {
1126
+ p.setRequestHeader(x, A);
1127
+ }), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([g, d] = fe(l, !0), p.addEventListener("progress", g)), f && p.upload && ([h, E] = fe(f), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (u = (S) => {
1128
+ p && (n(!S || S.type ? new se(null, t, p) : S), p.abort(), p = null);
1097
1129
  }, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
1098
- const S = Ir(s.url);
1099
- if (S && A.protocols.indexOf(S) === -1) {
1100
- n(new m("Unsupported protocol " + S + ":", m.ERR_BAD_REQUEST, t));
1130
+ const O = en(s.url);
1131
+ if (O && R.protocols.indexOf(O) === -1) {
1132
+ n(new m("Unsupported protocol " + O + ":", m.ERR_BAD_REQUEST, t));
1101
1133
  return;
1102
1134
  }
1103
1135
  p.send(i || null);
1104
1136
  });
1105
- }, Wr = (t, e) => {
1137
+ }, ln = (t, e) => {
1106
1138
  const { length: r } = t = t ? t.filter(Boolean) : [];
1107
1139
  if (e || r) {
1108
1140
  let n = new AbortController(), s;
@@ -1110,11 +1142,11 @@ const bt = (t) => {
1110
1142
  if (!s) {
1111
1143
  s = !0, c();
1112
1144
  const u = l instanceof Error ? l : this.reason;
1113
- n.abort(u instanceof m ? u : new V(u instanceof Error ? u.message : u));
1145
+ n.abort(u instanceof m ? u : new se(u instanceof Error ? u.message : u));
1114
1146
  }
1115
1147
  };
1116
1148
  let o = e && setTimeout(() => {
1117
- o = null, i(new m(`timeout ${e} of ms exceeded`, m.ETIMEDOUT));
1149
+ o = null, i(new m(`timeout of ${e}ms exceeded`, m.ETIMEDOUT));
1118
1150
  }, e);
1119
1151
  const c = () => {
1120
1152
  t && (o && clearTimeout(o), o = null, t.forEach((l) => {
@@ -1122,10 +1154,10 @@ const bt = (t) => {
1122
1154
  }), t = null);
1123
1155
  };
1124
1156
  t.forEach((l) => l.addEventListener("abort", i));
1125
- const { signal: d } = n;
1126
- return d.unsubscribe = () => a.asap(c), d;
1157
+ const { signal: f } = n;
1158
+ return f.unsubscribe = () => a.asap(c), f;
1127
1159
  }
1128
- }, Qr = function* (t, e) {
1160
+ }, dn = function* (t, e) {
1129
1161
  let r = t.byteLength;
1130
1162
  if (r < e) {
1131
1163
  yield t;
@@ -1134,10 +1166,10 @@ const bt = (t) => {
1134
1166
  let n = 0, s;
1135
1167
  for (; n < r; )
1136
1168
  s = n + e, yield t.slice(n, s), n = s;
1137
- }, Xr = async function* (t, e) {
1138
- for await (const r of Yr(t))
1139
- yield* Qr(r, e);
1140
- }, Yr = async function* (t) {
1169
+ }, fn = async function* (t, e) {
1170
+ for await (const r of hn(t))
1171
+ yield* dn(r, e);
1172
+ }, hn = async function* (t) {
1141
1173
  if (t[Symbol.asyncIterator]) {
1142
1174
  yield* t;
1143
1175
  return;
@@ -1153,169 +1185,200 @@ const bt = (t) => {
1153
1185
  } finally {
1154
1186
  await e.cancel();
1155
1187
  }
1156
- }, Me = (t, e, r, n) => {
1157
- const s = Xr(t, e);
1158
- let i = 0, o, c = (d) => {
1159
- o || (o = !0, n && n(d));
1188
+ }, tt = (t, e, r, n) => {
1189
+ const s = fn(t, e);
1190
+ let i = 0, o, c = (f) => {
1191
+ o || (o = !0, n && n(f));
1160
1192
  };
1161
1193
  return new ReadableStream({
1162
- async pull(d) {
1194
+ async pull(f) {
1163
1195
  try {
1164
1196
  const { done: l, value: u } = await s.next();
1165
1197
  if (l) {
1166
- c(), d.close();
1198
+ c(), f.close();
1167
1199
  return;
1168
1200
  }
1169
- let f = u.byteLength;
1201
+ let h = u.byteLength;
1170
1202
  if (r) {
1171
- let g = i += f;
1203
+ let g = i += h;
1172
1204
  r(g);
1173
1205
  }
1174
- d.enqueue(new Uint8Array(u));
1206
+ f.enqueue(new Uint8Array(u));
1175
1207
  } catch (l) {
1176
1208
  throw c(l), l;
1177
1209
  }
1178
1210
  },
1179
- cancel(d) {
1180
- return c(d), s.return();
1211
+ cancel(f) {
1212
+ return c(f), s.return();
1181
1213
  }
1182
1214
  }, {
1183
1215
  highWaterMark: 2
1184
1216
  });
1185
- }, ue = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", _t = ue && typeof ReadableStream == "function", Gr = ue && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), Et = (t, ...e) => {
1217
+ }, rt = 64 * 1024, { isFunction: ce } = a, pn = (({ Request: t, Response: e }) => ({
1218
+ Request: t,
1219
+ Response: e
1220
+ }))(a.global), {
1221
+ ReadableStream: nt,
1222
+ TextEncoder: st
1223
+ } = a.global, it = (t, ...e) => {
1186
1224
  try {
1187
1225
  return !!t(...e);
1188
1226
  } catch {
1189
1227
  return !1;
1190
1228
  }
1191
- }, Zr = _t && Et(() => {
1192
- let t = !1;
1193
- const e = new Request(A.origin, {
1194
- body: new ReadableStream(),
1195
- method: "POST",
1196
- get duplex() {
1197
- return t = !0, "half";
1198
- }
1199
- }).headers.has("Content-Type");
1200
- return t && !e;
1201
- }), He = 64 * 1024, be = _t && Et(() => a.isReadableStream(new Response("").body)), se = {
1202
- stream: be && ((t) => t.body)
1203
- };
1204
- ue && ((t) => {
1205
- ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
1206
- !se[e] && (se[e] = a.isFunction(t[e]) ? (r) => r[e]() : (r, n) => {
1207
- throw new m(`Response type '${e}' is not supported`, m.ERR_NOT_SUPPORT, n);
1208
- });
1209
- });
1210
- })(new Response());
1211
- const en = async (t) => {
1212
- if (t == null)
1213
- return 0;
1214
- if (a.isBlob(t))
1215
- return t.size;
1216
- if (a.isSpecCompliantForm(t))
1217
- return (await new Request(A.origin, {
1229
+ }, mn = (t) => {
1230
+ t = a.merge.call({
1231
+ skipUndefined: !0
1232
+ }, pn, t);
1233
+ const { fetch: e, Request: r, Response: n } = t, s = e ? ce(e) : typeof fetch == "function", i = ce(r), o = ce(n);
1234
+ if (!s)
1235
+ return !1;
1236
+ const c = s && ce(nt), f = s && (typeof st == "function" ? /* @__PURE__ */ ((d) => (y) => d.encode(y))(new st()) : async (d) => new Uint8Array(await new r(d).arrayBuffer())), l = i && c && it(() => {
1237
+ let d = !1;
1238
+ const y = new r(R.origin, {
1239
+ body: new nt(),
1218
1240
  method: "POST",
1219
- body: t
1220
- }).arrayBuffer()).byteLength;
1221
- if (a.isArrayBufferView(t) || a.isArrayBuffer(t))
1222
- return t.byteLength;
1223
- if (a.isURLSearchParams(t) && (t = t + ""), a.isString(t))
1224
- return (await Gr(t)).byteLength;
1225
- }, tn = async (t, e) => {
1226
- const r = a.toFiniteNumber(t.getContentLength());
1227
- return r ?? en(e);
1228
- }, rn = ue && (async (t) => {
1229
- let {
1230
- url: e,
1231
- method: r,
1232
- data: n,
1233
- signal: s,
1234
- cancelToken: i,
1235
- timeout: o,
1236
- onDownloadProgress: c,
1237
- onUploadProgress: d,
1238
- responseType: l,
1239
- headers: u,
1240
- withCredentials: f = "same-origin",
1241
- fetchOptions: g
1242
- } = bt(t);
1243
- l = l ? (l + "").toLowerCase() : "text";
1244
- let b = Wr([s, i && i.toAbortSignal()], o), h;
1245
- const y = b && b.unsubscribe && (() => {
1246
- b.unsubscribe();
1241
+ get duplex() {
1242
+ return d = !0, "half";
1243
+ }
1244
+ }).headers.has("Content-Type");
1245
+ return d && !y;
1246
+ }), u = o && c && it(() => a.isReadableStream(new n("").body)), h = {
1247
+ stream: u && ((d) => d.body)
1248
+ };
1249
+ s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
1250
+ !h[d] && (h[d] = (y, p) => {
1251
+ let C = y && y[d];
1252
+ if (C)
1253
+ return C.call(y);
1254
+ throw new m(`Response type '${d}' is not supported`, m.ERR_NOT_SUPPORT, p);
1255
+ });
1247
1256
  });
1248
- let p;
1249
- try {
1250
- if (d && Zr && r !== "get" && r !== "head" && (p = await tn(u, n)) !== 0) {
1251
- let T = new Request(e, {
1257
+ const g = async (d) => {
1258
+ if (d == null)
1259
+ return 0;
1260
+ if (a.isBlob(d))
1261
+ return d.size;
1262
+ if (a.isSpecCompliantForm(d))
1263
+ return (await new r(R.origin, {
1252
1264
  method: "POST",
1253
- body: n,
1254
- duplex: "half"
1255
- }), F;
1256
- if (a.isFormData(n) && (F = T.headers.get("content-type")) && u.setContentType(F), T.body) {
1257
- const [B, Z] = Ie(
1258
- p,
1259
- ne(je(d))
1265
+ body: d
1266
+ }).arrayBuffer()).byteLength;
1267
+ if (a.isArrayBufferView(d) || a.isArrayBuffer(d))
1268
+ return d.byteLength;
1269
+ if (a.isURLSearchParams(d) && (d = d + ""), a.isString(d))
1270
+ return (await f(d)).byteLength;
1271
+ }, E = async (d, y) => {
1272
+ const p = a.toFiniteNumber(d.getContentLength());
1273
+ return p ?? g(y);
1274
+ };
1275
+ return async (d) => {
1276
+ let {
1277
+ url: y,
1278
+ method: p,
1279
+ data: C,
1280
+ signal: O,
1281
+ cancelToken: S,
1282
+ timeout: A,
1283
+ onDownloadProgress: x,
1284
+ onUploadProgress: I,
1285
+ responseType: N,
1286
+ headers: be,
1287
+ withCredentials: ie = "same-origin",
1288
+ fetchOptions: je
1289
+ } = Ft(d), $e = e || fetch;
1290
+ N = N ? (N + "").toLowerCase() : "text";
1291
+ let oe = ln([O, S && S.toAbortSignal()], A), Y = null;
1292
+ const j = oe && oe.unsubscribe && (() => {
1293
+ oe.unsubscribe();
1294
+ });
1295
+ let Me;
1296
+ try {
1297
+ if (I && l && p !== "get" && p !== "head" && (Me = await E(be, C)) !== 0) {
1298
+ let B = new r(y, {
1299
+ method: "POST",
1300
+ body: C,
1301
+ duplex: "half"
1302
+ }), z;
1303
+ if (a.isFormData(C) && (z = B.headers.get("content-type")) && be.setContentType(z), B.body) {
1304
+ const [_e, ae] = Ge(
1305
+ Me,
1306
+ fe(Ze(I))
1307
+ );
1308
+ C = tt(B.body, rt, _e, ae);
1309
+ }
1310
+ }
1311
+ a.isString(ie) || (ie = ie ? "include" : "omit");
1312
+ const L = i && "credentials" in r.prototype, He = {
1313
+ ...je,
1314
+ signal: oe,
1315
+ method: p.toUpperCase(),
1316
+ headers: be.normalize().toJSON(),
1317
+ body: C,
1318
+ duplex: "half",
1319
+ credentials: L ? ie : void 0
1320
+ };
1321
+ Y = i && new r(y, He);
1322
+ let v = await (i ? $e(Y, je) : $e(y, He));
1323
+ const Ve = u && (N === "stream" || N === "response");
1324
+ if (u && (x || Ve && j)) {
1325
+ const B = {};
1326
+ ["status", "statusText", "headers"].forEach((Ke) => {
1327
+ B[Ke] = v[Ke];
1328
+ });
1329
+ const z = a.toFiniteNumber(v.headers.get("content-length")), [_e, ae] = x && Ge(
1330
+ z,
1331
+ fe(Ze(x), !0)
1332
+ ) || [];
1333
+ v = new n(
1334
+ tt(v.body, rt, _e, () => {
1335
+ ae && ae(), j && j();
1336
+ }),
1337
+ B
1260
1338
  );
1261
- n = Me(T.body, He, B, Z);
1262
1339
  }
1263
- }
1264
- a.isString(f) || (f = f ? "include" : "omit");
1265
- const E = "credentials" in Request.prototype;
1266
- h = new Request(e, {
1267
- ...g,
1268
- signal: b,
1269
- method: r.toUpperCase(),
1270
- headers: u.normalize().toJSON(),
1271
- body: n,
1272
- duplex: "half",
1273
- credentials: E ? f : void 0
1274
- });
1275
- let S = await fetch(h, g);
1276
- const R = be && (l === "stream" || l === "response");
1277
- if (be && (c || R && y)) {
1278
- const T = {};
1279
- ["status", "statusText", "headers"].forEach((Le) => {
1280
- T[Le] = S[Le];
1340
+ N = N || "text";
1341
+ let Ht = await h[a.findKey(h, N) || "text"](v, d);
1342
+ return !Ve && j && j(), await new Promise((B, z) => {
1343
+ Dt(B, z, {
1344
+ data: Ht,
1345
+ headers: P.from(v.headers),
1346
+ status: v.status,
1347
+ statusText: v.statusText,
1348
+ config: d,
1349
+ request: Y
1350
+ });
1281
1351
  });
1282
- const F = a.toFiniteNumber(S.headers.get("content-length")), [B, Z] = c && Ie(
1283
- F,
1284
- ne(je(c), !0)
1285
- ) || [];
1286
- S = new Response(
1287
- Me(S.body, He, B, () => {
1288
- Z && Z(), y && y();
1289
- }),
1290
- T
1291
- );
1352
+ } catch (L) {
1353
+ throw j && j(), L && L.name === "TypeError" && /Load failed|fetch/i.test(L.message) ? Object.assign(
1354
+ new m("Network Error", m.ERR_NETWORK, d, Y),
1355
+ {
1356
+ cause: L.cause || L
1357
+ }
1358
+ ) : m.from(L, L && L.code, d, Y);
1292
1359
  }
1293
- l = l || "text";
1294
- let L = await se[a.findKey(se, l) || "text"](S, t);
1295
- return !R && y && y(), await new Promise((T, F) => {
1296
- gt(T, F, {
1297
- data: L,
1298
- headers: O.from(S.headers),
1299
- status: S.status,
1300
- statusText: S.statusText,
1301
- config: t,
1302
- request: h
1303
- });
1304
- });
1305
- } catch (E) {
1306
- throw y && y(), E && E.name === "TypeError" && /Load failed|fetch/i.test(E.message) ? Object.assign(
1307
- new m("Network Error", m.ERR_NETWORK, t, h),
1308
- {
1309
- cause: E.cause || E
1310
- }
1311
- ) : m.from(E, E && E.code, t, h);
1360
+ };
1361
+ }, yn = /* @__PURE__ */ new Map(), kt = (t) => {
1362
+ let e = t && t.env || {};
1363
+ const { fetch: r, Request: n, Response: s } = e, i = [
1364
+ n,
1365
+ s,
1366
+ r
1367
+ ];
1368
+ let o = i.length, c = o, f, l, u = yn;
1369
+ for (; c--; )
1370
+ f = i[c], l = u.get(f), l === void 0 && u.set(f, l = c ? /* @__PURE__ */ new Map() : mn(e)), u = l;
1371
+ return l;
1372
+ };
1373
+ kt();
1374
+ const Le = {
1375
+ http: Dr,
1376
+ xhr: un,
1377
+ fetch: {
1378
+ get: kt
1312
1379
  }
1313
- }), _e = {
1314
- http: gr,
1315
- xhr: Jr,
1316
- fetch: rn
1317
1380
  };
1318
- a.forEach(_e, (t, e) => {
1381
+ a.forEach(Le, (t, e) => {
1319
1382
  if (t) {
1320
1383
  try {
1321
1384
  Object.defineProperty(t, "name", { value: e });
@@ -1324,69 +1387,79 @@ a.forEach(_e, (t, e) => {
1324
1387
  Object.defineProperty(t, "adapterName", { value: e });
1325
1388
  }
1326
1389
  });
1327
- const Ve = (t) => `- ${t}`, nn = (t) => a.isFunction(t) || t === null || t === !1, Ct = {
1328
- getAdapter: (t) => {
1329
- t = a.isArray(t) ? t : [t];
1330
- const { length: e } = t;
1331
- let r, n;
1332
- const s = {};
1333
- for (let i = 0; i < e; i++) {
1334
- r = t[i];
1335
- let o;
1336
- if (n = r, !nn(r) && (n = _e[(o = String(r)).toLowerCase()], n === void 0))
1337
- throw new m(`Unknown adapter '${o}'`);
1338
- if (n)
1339
- break;
1340
- s[o || "#" + i] = n;
1341
- }
1342
- if (!n) {
1343
- const i = Object.entries(s).map(
1344
- ([c, d]) => `adapter ${c} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
1345
- );
1346
- let o = e ? i.length > 1 ? `since :
1347
- ` + i.map(Ve).join(`
1348
- `) : " " + Ve(i[0]) : "as no adapter specified";
1349
- throw new m(
1350
- "There is no suitable adapter to dispatch the request " + o,
1351
- "ERR_NOT_SUPPORT"
1352
- );
1353
- }
1354
- return n;
1355
- },
1356
- adapters: _e
1390
+ const ot = (t) => `- ${t}`, gn = (t) => a.isFunction(t) || t === null || t === !1;
1391
+ function wn(t, e) {
1392
+ t = a.isArray(t) ? t : [t];
1393
+ const { length: r } = t;
1394
+ let n, s;
1395
+ const i = {};
1396
+ for (let o = 0; o < r; o++) {
1397
+ n = t[o];
1398
+ let c;
1399
+ if (s = n, !gn(n) && (s = Le[(c = String(n)).toLowerCase()], s === void 0))
1400
+ throw new m(`Unknown adapter '${c}'`);
1401
+ if (s && (a.isFunction(s) || (s = s.get(e))))
1402
+ break;
1403
+ i[c || "#" + o] = s;
1404
+ }
1405
+ if (!s) {
1406
+ const o = Object.entries(i).map(
1407
+ ([f, l]) => `adapter ${f} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
1408
+ );
1409
+ let c = r ? o.length > 1 ? `since :
1410
+ ` + o.map(ot).join(`
1411
+ `) : " " + ot(o[0]) : "as no adapter specified";
1412
+ throw new m(
1413
+ "There is no suitable adapter to dispatch the request " + c,
1414
+ "ERR_NOT_SUPPORT"
1415
+ );
1416
+ }
1417
+ return s;
1418
+ }
1419
+ const vt = {
1420
+ /**
1421
+ * Resolve an adapter from a list of adapter names or functions.
1422
+ * @type {Function}
1423
+ */
1424
+ getAdapter: wn,
1425
+ /**
1426
+ * Exposes all known adapters
1427
+ * @type {Object<string, Function|Object>}
1428
+ */
1429
+ adapters: Le
1357
1430
  };
1358
- function pe(t) {
1431
+ function Se(t) {
1359
1432
  if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
1360
- throw new V(null, t);
1433
+ throw new se(null, t);
1361
1434
  }
1362
- function Ke(t) {
1363
- return pe(t), t.headers = O.from(t.headers), t.data = he.call(
1435
+ function at(t) {
1436
+ return Se(t), t.headers = P.from(t.headers), t.data = Ce.call(
1364
1437
  t,
1365
1438
  t.transformRequest
1366
- ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Ct.getAdapter(t.adapter || G.adapter)(t).then(function(n) {
1367
- return pe(t), n.data = he.call(
1439
+ ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), vt.getAdapter(t.adapter || ne.adapter, t)(t).then(function(n) {
1440
+ return Se(t), n.data = Ce.call(
1368
1441
  t,
1369
1442
  t.transformResponse,
1370
1443
  n
1371
- ), n.headers = O.from(n.headers), n;
1444
+ ), n.headers = P.from(n.headers), n;
1372
1445
  }, function(n) {
1373
- return yt(n) || (pe(t), n && n.response && (n.response.data = he.call(
1446
+ return Ut(n) || (Se(t), n && n.response && (n.response.data = Ce.call(
1374
1447
  t,
1375
1448
  t.transformResponse,
1376
1449
  n.response
1377
- ), n.response.headers = O.from(n.response.headers))), Promise.reject(n);
1450
+ ), n.response.headers = P.from(n.response.headers))), Promise.reject(n);
1378
1451
  });
1379
1452
  }
1380
- const St = "1.11.0", le = {};
1453
+ const Bt = "1.13.4", ge = {};
1381
1454
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
1382
- le[t] = function(n) {
1455
+ ge[t] = function(n) {
1383
1456
  return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
1384
1457
  };
1385
1458
  });
1386
- const ze = {};
1387
- le.transitional = function(e, r, n) {
1459
+ const ct = {};
1460
+ ge.transitional = function(e, r, n) {
1388
1461
  function s(i, o) {
1389
- return "[Axios v" + St + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
1462
+ return "[Axios v" + Bt + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
1390
1463
  }
1391
1464
  return (i, o, c) => {
1392
1465
  if (e === !1)
@@ -1394,7 +1467,7 @@ le.transitional = function(e, r, n) {
1394
1467
  s(o, " has been removed" + (r ? " in " + r : "")),
1395
1468
  m.ERR_DEPRECATED
1396
1469
  );
1397
- return r && !ze[o] && (ze[o] = !0, console.warn(
1470
+ return r && !ct[o] && (ct[o] = !0, console.warn(
1398
1471
  s(
1399
1472
  o,
1400
1473
  " has been deprecated since v" + r + " and will be removed in the near future"
@@ -1402,10 +1475,10 @@ le.transitional = function(e, r, n) {
1402
1475
  )), e ? e(i, o, c) : !0;
1403
1476
  };
1404
1477
  };
1405
- le.spelling = function(e) {
1478
+ ge.spelling = function(e) {
1406
1479
  return (r, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
1407
1480
  };
1408
- function sn(t, e, r) {
1481
+ function bn(t, e, r) {
1409
1482
  if (typeof t != "object")
1410
1483
  throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1411
1484
  const n = Object.keys(t);
@@ -1413,24 +1486,24 @@ function sn(t, e, r) {
1413
1486
  for (; s-- > 0; ) {
1414
1487
  const i = n[s], o = e[i];
1415
1488
  if (o) {
1416
- const c = t[i], d = c === void 0 || o(c, i, t);
1417
- if (d !== !0)
1418
- throw new m("option " + i + " must be " + d, m.ERR_BAD_OPTION_VALUE);
1489
+ const c = t[i], f = c === void 0 || o(c, i, t);
1490
+ if (f !== !0)
1491
+ throw new m("option " + i + " must be " + f, m.ERR_BAD_OPTION_VALUE);
1419
1492
  continue;
1420
1493
  }
1421
1494
  if (r !== !0)
1422
1495
  throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
1423
1496
  }
1424
1497
  }
1425
- const re = {
1426
- assertOptions: sn,
1427
- validators: le
1428
- }, U = re.validators;
1429
- let v = class {
1498
+ const de = {
1499
+ assertOptions: bn,
1500
+ validators: ge
1501
+ }, F = de.validators;
1502
+ let M = class {
1430
1503
  constructor(e) {
1431
1504
  this.defaults = e || {}, this.interceptors = {
1432
- request: new qe(),
1433
- response: new qe()
1505
+ request: new Xe(),
1506
+ response: new Xe()
1434
1507
  };
1435
1508
  }
1436
1509
  /**
@@ -1459,20 +1532,20 @@ let v = class {
1459
1532
  }
1460
1533
  }
1461
1534
  _request(e, r) {
1462
- typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = I(this.defaults, r);
1535
+ typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = H(this.defaults, r);
1463
1536
  const { transitional: n, paramsSerializer: s, headers: i } = r;
1464
- n !== void 0 && re.assertOptions(n, {
1465
- silentJSONParsing: U.transitional(U.boolean),
1466
- forcedJSONParsing: U.transitional(U.boolean),
1467
- clarifyTimeoutError: U.transitional(U.boolean)
1537
+ n !== void 0 && de.assertOptions(n, {
1538
+ silentJSONParsing: F.transitional(F.boolean),
1539
+ forcedJSONParsing: F.transitional(F.boolean),
1540
+ clarifyTimeoutError: F.transitional(F.boolean)
1468
1541
  }, !1), s != null && (a.isFunction(s) ? r.paramsSerializer = {
1469
1542
  serialize: s
1470
- } : re.assertOptions(s, {
1471
- encode: U.function,
1472
- serialize: U.function
1473
- }, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), re.assertOptions(r, {
1474
- baseUrl: U.spelling("baseURL"),
1475
- withXsrfToken: U.spelling("withXSRFToken")
1543
+ } : de.assertOptions(s, {
1544
+ encode: F.function,
1545
+ serialize: F.function
1546
+ }, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), de.assertOptions(r, {
1547
+ baseUrl: F.spelling("baseURL"),
1548
+ withXsrfToken: F.spelling("withXSRFToken")
1476
1549
  }, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
1477
1550
  let o = i && a.merge(
1478
1551
  i.common,
@@ -1480,55 +1553,55 @@ let v = class {
1480
1553
  );
1481
1554
  i && a.forEach(
1482
1555
  ["delete", "get", "head", "post", "put", "patch", "common"],
1483
- (h) => {
1484
- delete i[h];
1556
+ (d) => {
1557
+ delete i[d];
1485
1558
  }
1486
- ), r.headers = O.concat(o, i);
1559
+ ), r.headers = P.concat(o, i);
1487
1560
  const c = [];
1488
- let d = !0;
1561
+ let f = !0;
1489
1562
  this.interceptors.request.forEach(function(y) {
1490
- typeof y.runWhen == "function" && y.runWhen(r) === !1 || (d = d && y.synchronous, c.unshift(y.fulfilled, y.rejected));
1563
+ typeof y.runWhen == "function" && y.runWhen(r) === !1 || (f = f && y.synchronous, c.unshift(y.fulfilled, y.rejected));
1491
1564
  });
1492
1565
  const l = [];
1493
1566
  this.interceptors.response.forEach(function(y) {
1494
1567
  l.push(y.fulfilled, y.rejected);
1495
1568
  });
1496
- let u, f = 0, g;
1497
- if (!d) {
1498
- const h = [Ke.bind(this), void 0];
1499
- for (h.unshift(...c), h.push(...l), g = h.length, u = Promise.resolve(r); f < g; )
1500
- u = u.then(h[f++], h[f++]);
1569
+ let u, h = 0, g;
1570
+ if (!f) {
1571
+ const d = [at.bind(this), void 0];
1572
+ for (d.unshift(...c), d.push(...l), g = d.length, u = Promise.resolve(r); h < g; )
1573
+ u = u.then(d[h++], d[h++]);
1501
1574
  return u;
1502
1575
  }
1503
1576
  g = c.length;
1504
- let b = r;
1505
- for (f = 0; f < g; ) {
1506
- const h = c[f++], y = c[f++];
1577
+ let E = r;
1578
+ for (; h < g; ) {
1579
+ const d = c[h++], y = c[h++];
1507
1580
  try {
1508
- b = h(b);
1581
+ E = d(E);
1509
1582
  } catch (p) {
1510
1583
  y.call(this, p);
1511
1584
  break;
1512
1585
  }
1513
1586
  }
1514
1587
  try {
1515
- u = Ke.call(this, b);
1516
- } catch (h) {
1517
- return Promise.reject(h);
1588
+ u = at.call(this, E);
1589
+ } catch (d) {
1590
+ return Promise.reject(d);
1518
1591
  }
1519
- for (f = 0, g = l.length; f < g; )
1520
- u = u.then(l[f++], l[f++]);
1592
+ for (h = 0, g = l.length; h < g; )
1593
+ u = u.then(l[h++], l[h++]);
1521
1594
  return u;
1522
1595
  }
1523
1596
  getUri(e) {
1524
- e = I(this.defaults, e);
1525
- const r = wt(e.baseURL, e.url, e.allowAbsoluteUrls);
1526
- return ht(r, e.params, e.paramsSerializer);
1597
+ e = H(this.defaults, e);
1598
+ const r = Lt(e.baseURL, e.url, e.allowAbsoluteUrls);
1599
+ return Ot(r, e.params, e.paramsSerializer);
1527
1600
  }
1528
1601
  };
1529
1602
  a.forEach(["delete", "get", "head", "options"], function(e) {
1530
- v.prototype[e] = function(r, n) {
1531
- return this.request(I(n || {}, {
1603
+ M.prototype[e] = function(r, n) {
1604
+ return this.request(H(n || {}, {
1532
1605
  method: e,
1533
1606
  url: r,
1534
1607
  data: (n || {}).data
@@ -1538,7 +1611,7 @@ a.forEach(["delete", "get", "head", "options"], function(e) {
1538
1611
  a.forEach(["post", "put", "patch"], function(e) {
1539
1612
  function r(n) {
1540
1613
  return function(i, o, c) {
1541
- return this.request(I(c || {}, {
1614
+ return this.request(H(c || {}, {
1542
1615
  method: e,
1543
1616
  headers: n ? {
1544
1617
  "Content-Type": "multipart/form-data"
@@ -1548,9 +1621,9 @@ a.forEach(["post", "put", "patch"], function(e) {
1548
1621
  }));
1549
1622
  };
1550
1623
  }
1551
- v.prototype[e] = r(), v.prototype[e + "Form"] = r(!0);
1624
+ M.prototype[e] = r(), M.prototype[e + "Form"] = r(!0);
1552
1625
  });
1553
- let on = class Rt {
1626
+ let _n = class qt {
1554
1627
  constructor(e) {
1555
1628
  if (typeof e != "function")
1556
1629
  throw new TypeError("executor must be a function.");
@@ -1574,7 +1647,7 @@ let on = class Rt {
1574
1647
  n.unsubscribe(i);
1575
1648
  }, o;
1576
1649
  }, e(function(i, o, c) {
1577
- n.reason || (n.reason = new V(i, o, c), r(n.reason));
1650
+ n.reason || (n.reason = new se(i, o, c), r(n.reason));
1578
1651
  });
1579
1652
  }
1580
1653
  /**
@@ -1616,22 +1689,22 @@ let on = class Rt {
1616
1689
  static source() {
1617
1690
  let e;
1618
1691
  return {
1619
- token: new Rt(function(s) {
1692
+ token: new qt(function(s) {
1620
1693
  e = s;
1621
1694
  }),
1622
1695
  cancel: e
1623
1696
  };
1624
1697
  }
1625
1698
  };
1626
- function an(t) {
1699
+ function En(t) {
1627
1700
  return function(r) {
1628
1701
  return t.apply(null, r);
1629
1702
  };
1630
1703
  }
1631
- function cn(t) {
1704
+ function Cn(t) {
1632
1705
  return a.isObject(t) && t.isAxiosError === !0;
1633
1706
  }
1634
- const Ee = {
1707
+ const Oe = {
1635
1708
  Continue: 100,
1636
1709
  SwitchingProtocols: 101,
1637
1710
  Processing: 102,
@@ -1694,89 +1767,95 @@ const Ee = {
1694
1767
  InsufficientStorage: 507,
1695
1768
  LoopDetected: 508,
1696
1769
  NotExtended: 510,
1697
- NetworkAuthenticationRequired: 511
1770
+ NetworkAuthenticationRequired: 511,
1771
+ WebServerIsDown: 521,
1772
+ ConnectionTimedOut: 522,
1773
+ OriginIsUnreachable: 523,
1774
+ TimeoutOccurred: 524,
1775
+ SslHandshakeFailed: 525,
1776
+ InvalidSslCertificate: 526
1698
1777
  };
1699
- Object.entries(Ee).forEach(([t, e]) => {
1700
- Ee[e] = t;
1778
+ Object.entries(Oe).forEach(([t, e]) => {
1779
+ Oe[e] = t;
1701
1780
  });
1702
- function At(t) {
1703
- const e = new v(t), r = tt(v.prototype.request, e);
1704
- return a.extend(r, v.prototype, e, { allOwnKeys: !0 }), a.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(s) {
1705
- return At(I(t, s));
1781
+ function It(t) {
1782
+ const e = new M(t), r = gt(M.prototype.request, e);
1783
+ return a.extend(r, M.prototype, e, { allOwnKeys: !0 }), a.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(s) {
1784
+ return It(H(t, s));
1706
1785
  }, r;
1707
1786
  }
1708
- const C = At(G);
1709
- C.Axios = v;
1710
- C.CanceledError = V;
1711
- C.CancelToken = on;
1712
- C.isCancel = yt;
1713
- C.VERSION = St;
1714
- C.toFormData = ce;
1715
- C.AxiosError = m;
1716
- C.Cancel = C.CanceledError;
1717
- C.all = function(e) {
1787
+ const _ = It(ne);
1788
+ _.Axios = M;
1789
+ _.CanceledError = se;
1790
+ _.CancelToken = _n;
1791
+ _.isCancel = Ut;
1792
+ _.VERSION = Bt;
1793
+ _.toFormData = ye;
1794
+ _.AxiosError = m;
1795
+ _.Cancel = _.CanceledError;
1796
+ _.all = function(e) {
1718
1797
  return Promise.all(e);
1719
1798
  };
1720
- C.spread = an;
1721
- C.isAxiosError = cn;
1722
- C.mergeConfig = I;
1723
- C.AxiosHeaders = O;
1724
- C.formToJSON = (t) => mt(a.isHTMLForm(t) ? new FormData(t) : t);
1725
- C.getAdapter = Ct.getAdapter;
1726
- C.HttpStatusCode = Ee;
1727
- C.default = C;
1799
+ _.spread = En;
1800
+ _.isAxiosError = Cn;
1801
+ _.mergeConfig = H;
1802
+ _.AxiosHeaders = P;
1803
+ _.formToJSON = (t) => xt(a.isHTMLForm(t) ? new FormData(t) : t);
1804
+ _.getAdapter = vt.getAdapter;
1805
+ _.HttpStatusCode = Oe;
1806
+ _.default = _;
1728
1807
  const {
1729
- Axios: Ss,
1730
- AxiosError: me,
1731
- CanceledError: Rs,
1732
- isCancel: As,
1733
- CancelToken: Ts,
1734
- VERSION: Ps,
1735
- all: Os,
1736
- Cancel: xs,
1737
- isAxiosError: Ns,
1738
- spread: Us,
1739
- toFormData: Ls,
1740
- AxiosHeaders: Ds,
1741
- HttpStatusCode: Fs,
1742
- formToJSON: ks,
1743
- getAdapter: Bs,
1744
- mergeConfig: qs
1745
- } = C;
1746
- class Je extends Error {
1808
+ Axios: qs,
1809
+ AxiosError: Re,
1810
+ CanceledError: Is,
1811
+ isCancel: js,
1812
+ CancelToken: $s,
1813
+ VERSION: Ms,
1814
+ all: Hs,
1815
+ Cancel: Vs,
1816
+ isAxiosError: Ks,
1817
+ spread: zs,
1818
+ toFormData: Js,
1819
+ AxiosHeaders: Ws,
1820
+ HttpStatusCode: Qs,
1821
+ formToJSON: Xs,
1822
+ getAdapter: Ys,
1823
+ mergeConfig: Gs
1824
+ } = _;
1825
+ class ut extends Error {
1747
1826
  constructor(r) {
1748
1827
  super(r.join(", "));
1749
- _(this, "errors");
1828
+ b(this, "errors");
1750
1829
  this.name = "ValidationError", this.errors = r;
1751
1830
  }
1752
1831
  }
1753
- class We extends Error {
1832
+ class lt extends Error {
1754
1833
  constructor(r) {
1755
1834
  super("Address already registered.");
1756
- _(this, "address");
1835
+ b(this, "address");
1757
1836
  this.name = "AddressInUseError", this.address = r;
1758
1837
  }
1759
1838
  }
1760
- class Qe extends Error {
1839
+ class dt extends Error {
1761
1840
  constructor(r) {
1762
1841
  super("Code already registered.");
1763
- _(this, "code");
1842
+ b(this, "code");
1764
1843
  this.name = "CodeInUseError", this.code = r;
1765
1844
  }
1766
1845
  }
1767
- class Xe extends Error {
1846
+ class ft extends Error {
1768
1847
  constructor() {
1769
1848
  super("Invalid signature provided"), this.name = "InvalidSignatureError";
1770
1849
  }
1771
1850
  }
1772
- class un {
1851
+ class Sn {
1773
1852
  constructor(e) {
1774
- _(this, "httpClient");
1775
- _(this, "_debug");
1853
+ b(this, "httpClient");
1854
+ b(this, "_debug");
1776
1855
  this.httpClient = e.httpClient, this._debug = e.debug;
1777
1856
  }
1778
1857
  async create(e, r, n, s, i, o, c) {
1779
- var d;
1858
+ var f;
1780
1859
  try {
1781
1860
  await this.httpClient.post({
1782
1861
  path: "/affiliates",
@@ -1792,19 +1871,19 @@ class un {
1792
1871
  }
1793
1872
  });
1794
1873
  } catch (l) {
1795
- if (l instanceof me) {
1796
- const u = (d = l.response) == null ? void 0 : d.data;
1874
+ if (l instanceof Re) {
1875
+ const u = (f = l.response) == null ? void 0 : f.data;
1797
1876
  if (typeof (u == null ? void 0 : u.message) == "string") {
1798
- const f = u.message.toLowerCase();
1799
- throw f == "invalid signature" ? new Xe() : f == "address in use" ? new We(e) : f == "code in use" ? new Qe(n) : new Error(f);
1877
+ const h = u.message.toLowerCase();
1878
+ throw h == "invalid signature" ? new ft() : h == "address in use" ? new lt(e) : h == "code in use" ? new dt(n) : new Error(h);
1800
1879
  } else if ((u == null ? void 0 : u.message) instanceof Array)
1801
- throw new Je(u.message);
1880
+ throw new ut(u.message);
1802
1881
  }
1803
1882
  throw l;
1804
1883
  }
1805
1884
  }
1806
1885
  async update(e, r, n, s, i, o, c) {
1807
- var d;
1886
+ var f;
1808
1887
  try {
1809
1888
  await this.httpClient.post({
1810
1889
  path: `/affiliates/${e}`,
@@ -1819,13 +1898,13 @@ class un {
1819
1898
  }
1820
1899
  });
1821
1900
  } catch (l) {
1822
- if (l instanceof me) {
1823
- const u = (d = l.response) == null ? void 0 : d.data;
1901
+ if (l instanceof Re) {
1902
+ const u = (f = l.response) == null ? void 0 : f.data;
1824
1903
  if (typeof (u == null ? void 0 : u.message) == "string") {
1825
- const f = u.message.toLowerCase();
1826
- throw f == "invalid signature" ? new Xe() : f == "address in use" ? new We(e) : f == "code in use" ? new Qe(n) : new Error(f);
1904
+ const h = u.message.toLowerCase();
1905
+ throw h == "invalid signature" ? new ft() : h == "address in use" ? new lt(e) : h == "code in use" ? new dt(n) : new Error(h);
1827
1906
  } else if ((u == null ? void 0 : u.message) instanceof Array)
1828
- throw new Je(u.message);
1907
+ throw new ut(u.message);
1829
1908
  }
1830
1909
  throw l;
1831
1910
  }
@@ -1849,31 +1928,31 @@ class un {
1849
1928
  try {
1850
1929
  return (await this.httpClient.get({ path: `/affiliates/${e}`, queryParams: { identifier_type: r } })).data;
1851
1930
  } catch (s) {
1852
- if (s instanceof me && ((n = s.response) == null ? void 0 : n.status) === 404)
1931
+ if (s instanceof Re && ((n = s.response) == null ? void 0 : n.status) === 404)
1853
1932
  return null;
1854
1933
  throw console.error("Fuul SDK: Could not get affiliate code", s), s;
1855
1934
  }
1856
1935
  }
1857
1936
  }
1858
- const ln = "/audiences";
1859
- class dn {
1937
+ const Rn = "/audiences";
1938
+ class An {
1860
1939
  constructor(e) {
1861
- _(this, "httpClient");
1862
- _(this, "_debug");
1940
+ b(this, "httpClient");
1941
+ b(this, "_debug");
1863
1942
  this.httpClient = e.httpClient, this._debug = e.debug;
1864
1943
  }
1865
1944
  async getUserAudiences(e) {
1866
1945
  return (await this.httpClient.get({
1867
- path: `${ln}/audience-segments/user`,
1946
+ path: `${Rn}/audience-segments/user`,
1868
1947
  queryParams: { ...e }
1869
1948
  })).data;
1870
1949
  }
1871
1950
  }
1872
- const Ye = "/claim-checks";
1873
- class fn {
1951
+ const ht = "/claim-checks";
1952
+ class Tn {
1874
1953
  constructor(e) {
1875
- _(this, "httpClient");
1876
- _(this, "_debug");
1954
+ b(this, "httpClient");
1955
+ b(this, "_debug");
1877
1956
  this.httpClient = e.httpClient, this._debug = e.debug;
1878
1957
  }
1879
1958
  /**
@@ -1885,7 +1964,7 @@ class fn {
1885
1964
  */
1886
1965
  async getClaimableChecks(e) {
1887
1966
  return (await this.httpClient.post({
1888
- path: `${Ye}/claim`,
1967
+ path: `${ht}/claim`,
1889
1968
  postData: {
1890
1969
  userIdentifier: e.user_identifier,
1891
1970
  userIdentifierType: e.user_identifier_type
@@ -1901,7 +1980,7 @@ class fn {
1901
1980
  */
1902
1981
  async getClaimCheckTotals(e) {
1903
1982
  return (await this.httpClient.get({
1904
- path: `${Ye}/totals`,
1983
+ path: `${ht}/totals`,
1905
1984
  queryParams: {
1906
1985
  user_identifier: e.user_identifier,
1907
1986
  user_identifier_type: e.user_identifier_type
@@ -1909,9 +1988,9 @@ class fn {
1909
1988
  })).data;
1910
1989
  }
1911
1990
  }
1912
- class hn {
1991
+ class Pn {
1913
1992
  constructor(e) {
1914
- _(this, "httpClient");
1993
+ b(this, "httpClient");
1915
1994
  this.httpClient = e.httpClient;
1916
1995
  }
1917
1996
  async getAll(e) {
@@ -1919,11 +1998,11 @@ class hn {
1919
1998
  return r;
1920
1999
  }
1921
2000
  }
1922
- const Ge = "fuul.sent", pn = 60, mn = "connect_wallet", Ze = 10;
1923
- class yn {
2001
+ const pt = "fuul.sent", On = 60, Nn = "connect_wallet", mt = 10;
2002
+ class xn {
1924
2003
  constructor(e) {
1925
- _(this, "debug");
1926
- _(this, "httpClient");
2004
+ b(this, "debug");
2005
+ b(this, "httpClient");
1927
2006
  this.httpClient = e.httpClient, this.debug = !!e.debug;
1928
2007
  }
1929
2008
  async sendEvent(e, r) {
@@ -1941,52 +2020,52 @@ class yn {
1941
2020
  this.debug && console.debug(`Fuul SDK: Sent '${e.name}' event`), this.saveSentEvent(e);
1942
2021
  }
1943
2022
  isDuplicate(e) {
1944
- var u, f, g, b;
1945
- const r = `${Ge}_${e.name}`, n = localStorage.getItem(r);
2023
+ var u, h, g, E;
2024
+ const r = `${pt}_${e.name}`, n = localStorage.getItem(r);
1946
2025
  if (!n)
1947
2026
  return !1;
1948
2027
  const s = JSON.parse(n);
1949
- if (this.getCurrentTimestamp() - s.timestamp > pn)
2028
+ if (this.getCurrentTimestamp() - s.timestamp > On)
1950
2029
  return !1;
1951
- let d = !1;
1952
- e.metadata && (d = s.metadata.tracking_id === e.metadata.tracking_id && s.metadata.project_id === e.metadata.project_id && s.metadata.referrer === e.metadata.referrer && s.metadata.source === e.metadata.source && s.metadata.category === e.metadata.category && s.metadata.title === e.metadata.title && s.metadata.tag === e.metadata.tag && s.user_address === e.user_address && ((u = s.user) == null ? void 0 : u.identifier) === ((f = e.user) == null ? void 0 : f.identifier) && ((g = s.user) == null ? void 0 : g.identifier_type) === ((b = e.user) == null ? void 0 : b.identifier_type) && s.signature === e.signature && s.signature_message === e.signature_message);
2030
+ let f = !1;
2031
+ e.metadata && (f = s.metadata.tracking_id === e.metadata.tracking_id && s.metadata.project_id === e.metadata.project_id && s.metadata.referrer === e.metadata.referrer && s.metadata.source === e.metadata.source && s.metadata.category === e.metadata.category && s.metadata.title === e.metadata.title && s.metadata.tag === e.metadata.tag && s.user_address === e.user_address && ((u = s.user) == null ? void 0 : u.identifier) === ((h = e.user) == null ? void 0 : h.identifier) && ((g = s.user) == null ? void 0 : g.identifier_type) === ((E = e.user) == null ? void 0 : E.identifier_type) && s.signature === e.signature && s.signature_message === e.signature_message);
1953
2032
  let l = !1;
1954
- return e.args && s.args && (l = s.args.page === e.args.page), l && d;
2033
+ return e.args && s.args && (l = s.args.page === e.args.page), l && f;
1955
2034
  }
1956
2035
  getCurrentTimestamp() {
1957
2036
  return Date.now() / 1e3;
1958
2037
  }
1959
2038
  saveSentEvent(e) {
1960
- var o, c, d, l;
1961
- const r = `${Ge}_${e.name}`, n = `${r}_all`, s = this.getCurrentTimestamp(), i = { ...e, timestamp: s };
1962
- if (localStorage.setItem(r, JSON.stringify(i)), e.name === mn) {
1963
- const u = JSON.parse(localStorage.getItem(n) || "[]"), f = {
2039
+ var o, c, f, l;
2040
+ const r = `${pt}_${e.name}`, n = `${r}_all`, s = this.getCurrentTimestamp(), i = { ...e, timestamp: s };
2041
+ if (localStorage.setItem(r, JSON.stringify(i)), e.name === Nn) {
2042
+ const u = JSON.parse(localStorage.getItem(n) || "[]"), h = {
1964
2043
  name: e.name,
1965
2044
  user: {
1966
2045
  identifier: (o = e.user) == null ? void 0 : o.identifier,
1967
2046
  identifier_type: (c = e.user) == null ? void 0 : c.identifier_type
1968
2047
  },
1969
- tracking_id: (d = e.metadata) == null ? void 0 : d.tracking_id,
2048
+ tracking_id: (f = e.metadata) == null ? void 0 : f.tracking_id,
1970
2049
  page: (l = e.args) == null ? void 0 : l.page
1971
2050
  };
1972
- "user_address" in e && (f.user_address = e.user_address);
1973
- const g = [...u, f];
1974
- g.length > Ze && g.splice(0, g.length - Ze), localStorage.setItem(n, JSON.stringify(g));
2051
+ "user_address" in e && (h.user_address = e.user_address);
2052
+ const g = [...u, h];
2053
+ g.length > mt && g.splice(0, g.length - mt), localStorage.setItem(n, JSON.stringify(g));
1975
2054
  }
1976
2055
  }
1977
2056
  }
1978
- const gn = "7.14.0", wn = {
1979
- version: gn
2057
+ const Un = "0.0.0", Dn = {
2058
+ version: Un
1980
2059
  };
1981
- class bn {
2060
+ class Ln {
1982
2061
  constructor(e) {
1983
- _(this, "client");
1984
- _(this, "defaultQueryParams");
1985
- this.client = C.create({
2062
+ b(this, "client");
2063
+ b(this, "defaultQueryParams");
2064
+ this.client = _.create({
1986
2065
  ...e,
1987
2066
  headers: {
1988
2067
  Authorization: `Bearer ${e.apiKey}`,
1989
- "X-Fuul-Sdk-Version": wn.version
2068
+ "X-Fuul-Sdk-Version": Dn.version
1990
2069
  }
1991
2070
  }), this.defaultQueryParams = e.queryParams || {};
1992
2071
  }
@@ -2033,9 +2112,9 @@ class bn {
2033
2112
  });
2034
2113
  }
2035
2114
  }
2036
- class _n {
2115
+ class Fn {
2037
2116
  constructor(e) {
2038
- _(this, "httpClient");
2117
+ b(this, "httpClient");
2039
2118
  this.httpClient = e.httpClient;
2040
2119
  }
2041
2120
  async getPayoutsLeaderboard(e) {
@@ -2095,40 +2174,40 @@ class _n {
2095
2174
  })).data;
2096
2175
  }
2097
2176
  }
2098
- const J = "/payouts";
2099
- class En {
2177
+ const Z = "/payouts";
2178
+ class kn {
2100
2179
  constructor(e) {
2101
- _(this, "httpClient");
2102
- _(this, "_debug");
2180
+ b(this, "httpClient");
2181
+ b(this, "_debug");
2103
2182
  this.httpClient = e.httpClient, this._debug = e.debug;
2104
2183
  }
2105
2184
  async getUserPayoutsByConversion(e) {
2106
2185
  return (await this.httpClient.get({
2107
- path: J,
2186
+ path: Z,
2108
2187
  queryParams: { ...e, type: "onchain-currency" }
2109
2188
  })).data;
2110
2189
  }
2111
2190
  async getUserPointsByConversion(e) {
2112
2191
  return (await this.httpClient.get({
2113
- path: J,
2192
+ path: Z,
2114
2193
  queryParams: { ...e, type: "point" }
2115
2194
  })).data;
2116
2195
  }
2117
2196
  async getUserPayoutMovements(e) {
2118
2197
  return (await this.httpClient.get({
2119
- path: `${J}/movements`,
2198
+ path: `${Z}/movements`,
2120
2199
  queryParams: { ...e, type: "onchain-currency" }
2121
2200
  })).data;
2122
2201
  }
2123
2202
  async getUserPointsMovements(e) {
2124
2203
  return (await this.httpClient.get({
2125
- path: `${J}/movements`,
2204
+ path: `${Z}/movements`,
2126
2205
  queryParams: { ...e, type: "point" }
2127
2206
  })).data;
2128
2207
  }
2129
2208
  async getPayoutsByReferrer(e) {
2130
2209
  return (await this.httpClient.get({
2131
- path: `${J}/by-referrer`,
2210
+ path: `${Z}/by-referrer`,
2132
2211
  queryParams: {
2133
2212
  user_identifier: e.user_identifier,
2134
2213
  user_identifier_type: e.user_identifier_type
@@ -2136,10 +2215,10 @@ class En {
2136
2215
  })).data;
2137
2216
  }
2138
2217
  }
2139
- class Cn {
2218
+ class vn {
2140
2219
  constructor(e) {
2141
- _(this, "httpClient");
2142
- _(this, "_debug");
2220
+ b(this, "httpClient");
2221
+ b(this, "_debug");
2143
2222
  this.httpClient = e.httpClient, this._debug = e.debug;
2144
2223
  }
2145
2224
  async listUserReferralCodes(e) {
@@ -2179,14 +2258,14 @@ class Cn {
2179
2258
  })).data;
2180
2259
  }
2181
2260
  async useReferralCode(e) {
2182
- const { code: r, user_identifier: n, user_identifier_type: s, signature: i, signature_message: o, chain_id: c, account_chain_id: d } = e;
2261
+ const { code: r, user_identifier: n, user_identifier_type: s, signature: i, signature_message: o, chain_id: c, account_chain_id: f } = e;
2183
2262
  await this.httpClient.patch({
2184
2263
  path: `/referral_codes/${r}/use`,
2185
2264
  queryParams: {
2186
2265
  user_identifier: n,
2187
2266
  user_identifier_type: s,
2188
2267
  chain_id: c,
2189
- account_chain_id: d
2268
+ account_chain_id: f
2190
2269
  },
2191
2270
  postData: {
2192
2271
  signature: i,
@@ -2210,7 +2289,7 @@ class Cn {
2210
2289
  referrer_identifier: i,
2211
2290
  referrer_identifier_type: o,
2212
2291
  signature: c,
2213
- signature_message: d,
2292
+ signature_message: f,
2214
2293
  chain_id: l
2215
2294
  } = e;
2216
2295
  await this.httpClient.delete({
@@ -2223,20 +2302,20 @@ class Cn {
2223
2302
  },
2224
2303
  postData: {
2225
2304
  signature: c,
2226
- signature_message: d,
2305
+ signature_message: f,
2227
2306
  chain_id: l
2228
2307
  }
2229
2308
  });
2230
2309
  }
2231
2310
  }
2232
- const Sn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2233
- let Rn = (t = 21) => {
2311
+ const Bn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2312
+ let qn = (t = 21) => {
2234
2313
  let e = "", r = crypto.getRandomValues(new Uint8Array(t |= 0));
2235
2314
  for (; t--; )
2236
- e += Sn[r[t] & 63];
2315
+ e += Bn[r[t] & 63];
2237
2316
  return e;
2238
2317
  };
2239
- const An = "fuul.tracking_id", Te = () => Un(An, () => Rn()), et = () => M("af") || M("referrer"), Tn = () => document.referrer, Pn = () => Ln(), On = () => M("category"), xn = () => M("title"), Nn = () => M("tag"), Un = (t, e) => {
2318
+ const In = "fuul.tracking_id", Fe = () => Kn(In, () => qn()), yt = () => W("af") || W("referrer"), jn = () => document.referrer, $n = () => zn(), Mn = () => W("category"), Hn = () => W("title"), Vn = () => W("tag"), Kn = (t, e) => {
2240
2319
  const r = localStorage.getItem(t);
2241
2320
  if (r)
2242
2321
  return r;
@@ -2244,42 +2323,42 @@ const An = "fuul.tracking_id", Te = () => Un(An, () => Rn()), et = () => M("af")
2244
2323
  const n = e();
2245
2324
  return n ? localStorage.setItem(t, n) : localStorage.removeItem(t), n;
2246
2325
  }
2247
- }, M = (t) => new URLSearchParams(window.location.search).get(t), Ln = () => {
2248
- const t = M("source");
2326
+ }, W = (t) => new URLSearchParams(window.location.search).get(t), zn = () => {
2327
+ const t = W("source");
2249
2328
  if (t)
2250
2329
  return t;
2251
- }, Dn = "/user";
2252
- class Fn {
2330
+ }, Jn = "/user";
2331
+ class Wn {
2253
2332
  constructor(e) {
2254
- _(this, "httpClient");
2333
+ b(this, "httpClient");
2255
2334
  this.httpClient = e.httpClient;
2256
2335
  }
2257
2336
  async getUserReferrer(e) {
2258
- return (await this.httpClient.get({ path: `${Dn}/referrer`, queryParams: { ...e } })).data;
2337
+ return (await this.httpClient.get({ path: `${Jn}/referrer`, queryParams: { ...e } })).data;
2259
2338
  }
2260
2339
  }
2261
- const kn = "https://api.fuul.xyz/api/v1/";
2262
- let D = !1, Ce = !1, Pe, x, Tt, Pt, j, Oe, de, K, Ot, $, k, xe;
2263
- function Bn(t) {
2264
- D = !!t.debug, !Ce && (Pe = t.apiKey, gs(), x = ws(t.baseApiUrl ?? kn, t.defaultQueryParams ?? {}), Tt = new hn({ httpClient: x, debug: D }), de = new yn({ httpClient: x, debug: D }), j = new un({ httpClient: x, debug: D }), Oe = new Ut({ httpClient: x }), K = new En({ httpClient: x, debug: D }), Pt = new Fn({ httpClient: x }), Ot = new dn({ httpClient: x, debug: D }), $ = new _n({ httpClient: x }), k = new Cn({ httpClient: x, debug: D }), xe = new fn({ httpClient: x, debug: D }), Ce = !0, D && console.debug("Fuul SDK: init() complete"));
2340
+ const Qn = "https://api.fuul.xyz/api/v1/";
2341
+ let k = !1, Ne = !1, ke, U, jt, $t, V, ve, we, X, Mt, K, q, Be;
2342
+ function Xn(t) {
2343
+ k = !!t.debug, !Ne && (ke = t.apiKey, Us(), U = Ds(t.baseApiUrl ?? Qn, t.defaultQueryParams ?? {}), jt = new Pn({ httpClient: U, debug: k }), we = new xn({ httpClient: U, debug: k }), V = new Sn({ httpClient: U, debug: k }), ve = new zt({ httpClient: U }), X = new kn({ httpClient: U, debug: k }), $t = new Wn({ httpClient: U }), Mt = new An({ httpClient: U, debug: k }), K = new Fn({ httpClient: U }), q = new vn({ httpClient: U, debug: k }), Be = new Tn({ httpClient: U, debug: k }), Ne = !0, k && console.debug("Fuul SDK: init() complete"));
2265
2344
  }
2266
2345
  function w() {
2267
- if (!Ce)
2346
+ if (!Ne)
2268
2347
  throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
2269
2348
  }
2270
- async function qn(t, e) {
2271
- w(), Ne(), Ue();
2349
+ async function Yn(t, e) {
2350
+ w(), qe(), Ie();
2272
2351
  const r = {
2273
2352
  name: t,
2274
2353
  args: e ?? {},
2275
2354
  metadata: {
2276
- tracking_id: Te()
2355
+ tracking_id: Fe()
2277
2356
  }
2278
2357
  };
2279
- await de.sendEvent(r);
2358
+ await we.sendEvent(r);
2280
2359
  }
2281
- async function vn(t, e) {
2282
- w(), Ne(), Ue();
2360
+ async function Gn(t, e) {
2361
+ w(), qe(), Ie();
2283
2362
  const r = {
2284
2363
  name: "pageview",
2285
2364
  args: {
@@ -2287,20 +2366,20 @@ async function vn(t, e) {
2287
2366
  locationOrigin: document.location.origin
2288
2367
  },
2289
2368
  metadata: {
2290
- tracking_id: Te(),
2291
- referrer_url: Tn(),
2292
- source: Pn(),
2293
- affiliate_id: et() ?? void 0,
2294
- referrer: et() ?? void 0,
2295
- category: On() ?? void 0,
2296
- title: xn() ?? void 0,
2297
- tag: Nn() ?? void 0
2369
+ tracking_id: Fe(),
2370
+ referrer_url: jn(),
2371
+ source: $n(),
2372
+ affiliate_id: yt() ?? void 0,
2373
+ referrer: yt() ?? void 0,
2374
+ category: Mn() ?? void 0,
2375
+ title: Hn() ?? void 0,
2376
+ tag: Vn() ?? void 0
2298
2377
  }
2299
2378
  };
2300
- await de.sendEvent(r, e);
2379
+ await we.sendEvent(r, e);
2301
2380
  }
2302
- async function In(t, e) {
2303
- w(), Ne(), Ue();
2381
+ async function Zn(t, e) {
2382
+ w(), qe(), Ie();
2304
2383
  const r = {
2305
2384
  name: "connect_wallet",
2306
2385
  user: {
@@ -2312,13 +2391,13 @@ async function In(t, e) {
2312
2391
  locationOrigin: document.location.origin
2313
2392
  },
2314
2393
  metadata: {
2315
- tracking_id: Te()
2394
+ tracking_id: Fe()
2316
2395
  }
2317
2396
  };
2318
- t != null && t.signature && (r.signature = t == null ? void 0 : t.signature, r.signature_message = t == null ? void 0 : t.message), t != null && t.signaturePublicKey && (r.signature_public_key = t.signaturePublicKey), t != null && t.accountChainId && (r.account_chain_id = t.accountChainId), await de.sendEvent(r, e);
2397
+ t != null && t.signature && (r.signature = t == null ? void 0 : t.signature, r.signature_message = t == null ? void 0 : t.message), t != null && t.signaturePublicKey && (r.signature_public_key = t.signaturePublicKey), t != null && t.accountChainId && (r.account_chain_id = t.accountChainId), await we.sendEvent(r, e);
2319
2398
  }
2320
- async function jn(t) {
2321
- w(), await j.create(
2399
+ async function es(t) {
2400
+ w(), await V.create(
2322
2401
  t.userIdentifier,
2323
2402
  t.identifierType,
2324
2403
  t.code,
@@ -2328,8 +2407,8 @@ async function jn(t) {
2328
2407
  t.userRebateRate
2329
2408
  );
2330
2409
  }
2331
- async function $n(t) {
2332
- w(), await j.update(
2410
+ async function ts(t) {
2411
+ w(), await V.update(
2333
2412
  t.userIdentifier,
2334
2413
  t.identifierType,
2335
2414
  t.code,
@@ -2339,160 +2418,160 @@ async function $n(t) {
2339
2418
  t.userRebateRate
2340
2419
  );
2341
2420
  }
2342
- async function Mn(t, e) {
2343
- return w(), await j.getCode(t, e);
2421
+ async function rs(t, e) {
2422
+ return w(), await V.getCode(t, e);
2344
2423
  }
2345
- async function Hn(t) {
2346
- return w(), await j.isCodeFree(t);
2424
+ async function ns(t) {
2425
+ return w(), await V.isCodeFree(t);
2347
2426
  }
2348
- async function Vn(t) {
2349
- return w(), await j.isCodeAvailable(t);
2427
+ async function ss(t) {
2428
+ return w(), await V.isCodeAvailable(t);
2350
2429
  }
2351
- async function Kn(t, e, r, n) {
2430
+ async function is(t, e, r, n) {
2352
2431
  w();
2353
- const s = await j.getCode(e, r), i = new URLSearchParams({
2432
+ const s = await V.getCode(e, r), i = new URLSearchParams({
2354
2433
  af: (s == null ? void 0 : s.code) ?? e
2355
2434
  });
2356
2435
  return n != null && n.title && i.append("af_title", n.title), n != null && n.format && i.append("af_format", n.format), n != null && n.place && i.append("af_place", n.place), `${t}?${i.toString()}`;
2357
2436
  }
2358
- function zn(t) {
2359
- return $.getPayoutsLeaderboard(t);
2437
+ function os(t) {
2438
+ return K.getPayoutsLeaderboard(t);
2360
2439
  }
2361
- function Jn(t) {
2362
- return $.getPointsLeaderboard(t);
2440
+ function as(t) {
2441
+ return K.getPointsLeaderboard(t);
2363
2442
  }
2364
- function Wn(t) {
2365
- return $.getReferredUsersLeaderboard(t);
2443
+ function cs(t) {
2444
+ return K.getReferredUsersLeaderboard(t);
2366
2445
  }
2367
- function Qn(t) {
2368
- return w(), $.getReferredVolume(t);
2446
+ function us(t) {
2447
+ return w(), K.getReferredVolume(t);
2369
2448
  }
2370
- function Xn(t) {
2371
- return w(), $.getVolumeLeaderboard(t);
2449
+ function ls(t) {
2450
+ return w(), K.getVolumeLeaderboard(t);
2372
2451
  }
2373
- function Yn(t) {
2374
- return w(), $.getRevenueLeaderboard(t);
2452
+ function ds(t) {
2453
+ return w(), K.getRevenueLeaderboard(t);
2375
2454
  }
2376
- function Gn(t) {
2377
- return K.getUserPayoutsByConversion(t);
2455
+ function fs(t) {
2456
+ return X.getUserPayoutsByConversion(t);
2378
2457
  }
2379
- function Zn(t) {
2380
- return K.getUserPointsByConversion(t);
2458
+ function hs(t) {
2459
+ return X.getUserPointsByConversion(t);
2381
2460
  }
2382
- function es(t) {
2383
- return K.getUserPayoutMovements(t);
2461
+ function ps(t) {
2462
+ return X.getUserPayoutMovements(t);
2384
2463
  }
2385
- function ts(t) {
2386
- return K.getUserPointsMovements(t);
2464
+ function ms(t) {
2465
+ return X.getUserPointsMovements(t);
2387
2466
  }
2388
- function rs(t) {
2389
- return w(), K.getPayoutsByReferrer(t);
2467
+ function ys(t) {
2468
+ return w(), X.getPayoutsByReferrer(t);
2390
2469
  }
2391
- async function ns(t) {
2392
- return w(), Tt.getAll(t);
2470
+ async function gs(t) {
2471
+ return w(), jt.getAll(t);
2393
2472
  }
2394
- async function ss(t) {
2395
- return w(), Pt.getUserReferrer(t);
2473
+ async function ws(t) {
2474
+ return w(), $t.getUserReferrer(t);
2396
2475
  }
2397
- async function is(t) {
2398
- return w(), Ot.getUserAudiences(t);
2476
+ async function bs(t) {
2477
+ return w(), Mt.getUserAudiences(t);
2399
2478
  }
2400
- async function os(t) {
2401
- return w(), k.listUserReferralCodes(t);
2479
+ async function _s(t) {
2480
+ return w(), q.listUserReferralCodes(t);
2402
2481
  }
2403
- async function as(t) {
2404
- return w(), k.generateReferralCodes(t);
2482
+ async function Es(t) {
2483
+ return w(), q.generateReferralCodes(t);
2405
2484
  }
2406
- async function cs(t) {
2407
- return w(), k.getReferralStatus(t);
2485
+ async function Cs(t) {
2486
+ return w(), q.getReferralStatus(t);
2408
2487
  }
2409
- async function us(t) {
2410
- return w(), k.getReferralCode(t);
2488
+ async function Ss(t) {
2489
+ return w(), q.getReferralCode(t);
2411
2490
  }
2412
- async function ls(t) {
2413
- return w(), k.useReferralCode(t);
2491
+ async function Rs(t) {
2492
+ return w(), q.useReferralCode(t);
2414
2493
  }
2415
- async function ds(t) {
2416
- return w(), k.updateReferralCode(t);
2494
+ async function As(t) {
2495
+ return w(), q.updateReferralCode(t);
2417
2496
  }
2418
- async function fs(t) {
2419
- return w(), k.deleteReferral(t);
2497
+ async function Ts(t) {
2498
+ return w(), q.deleteReferral(t);
2420
2499
  }
2421
- async function hs(t) {
2422
- return w(), Oe.getAffiliateStats(t);
2500
+ async function Ps(t) {
2501
+ return w(), ve.getAffiliateStats(t);
2423
2502
  }
2424
- async function ps(t) {
2425
- return w(), Oe.getAffiliateNewTraders(t);
2503
+ async function Os(t) {
2504
+ return w(), ve.getAffiliateNewTraders(t);
2426
2505
  }
2427
- async function ms(t) {
2428
- return w(), xe.getClaimableChecks(t);
2506
+ async function Ns(t) {
2507
+ return w(), Be.getClaimableChecks(t);
2429
2508
  }
2430
- async function ys(t) {
2431
- return w(), xe.getClaimCheckTotals(t);
2509
+ async function xs(t) {
2510
+ return w(), Be.getClaimCheckTotals(t);
2432
2511
  }
2433
- function Ne() {
2512
+ function qe() {
2434
2513
  if (typeof window > "u" || typeof document > "u")
2435
2514
  throw new Error("Fuul SDK: Browser context required");
2436
2515
  }
2437
- function Ue() {
2516
+ function Ie() {
2438
2517
  if (navigator.webdriver)
2439
2518
  throw new Error("Fuul SDK: Error");
2440
2519
  }
2441
- function gs() {
2442
- if (!Pe)
2520
+ function Us() {
2521
+ if (!ke)
2443
2522
  throw new Error("Fuul SDK: Invalid API key");
2444
2523
  }
2445
- function ws(t, e) {
2446
- return new bn({
2524
+ function Ds(t, e) {
2525
+ return new Ln({
2447
2526
  baseURL: t,
2448
2527
  timeout: 3e4,
2449
- apiKey: Pe,
2528
+ apiKey: ke,
2450
2529
  queryParams: e
2451
2530
  });
2452
2531
  }
2453
- const vs = {
2454
- init: Bn,
2455
- sendEvent: qn,
2456
- sendPageview: vn,
2457
- identifyUser: In,
2458
- generateTrackingLink: Kn,
2459
- getConversions: ns,
2460
- createAffiliateCode: jn,
2461
- updateAffiliateCode: $n,
2462
- getAffiliateCode: Mn,
2463
- isAffiliateCodeFree: Hn,
2464
- isAffiliateCodeAvailable: Vn,
2465
- getPayoutsLeaderboard: zn,
2466
- getPointsLeaderboard: Jn,
2467
- getReferredUsersLeaderboard: Wn,
2468
- getReferredVolume: Qn,
2469
- getUserAudiences: is,
2470
- getUserPayoutsByConversion: Gn,
2471
- getUserPointsByConversion: Zn,
2472
- getUserPointsMovements: ts,
2473
- getUserPayoutMovements: es,
2474
- getPayoutsByReferrer: rs,
2475
- getUserReferrer: ss,
2476
- getVolumeLeaderboard: Xn,
2477
- getRevenueLeaderboard: Yn,
2478
- listUserReferralCodes: os,
2479
- generateReferralCodes: as,
2480
- getReferralStatus: cs,
2481
- getReferralCode: us,
2482
- useReferralCode: ls,
2483
- updateReferralCode: ds,
2484
- deleteReferral: fs,
2485
- getAffiliateStats: hs,
2486
- getAffiliateNewTraders: ps,
2487
- getClaimableChecks: ms,
2488
- getClaimCheckTotals: ys
2532
+ const Zs = {
2533
+ init: Xn,
2534
+ sendEvent: Yn,
2535
+ sendPageview: Gn,
2536
+ identifyUser: Zn,
2537
+ generateTrackingLink: is,
2538
+ getConversions: gs,
2539
+ createAffiliateCode: es,
2540
+ updateAffiliateCode: ts,
2541
+ getAffiliateCode: rs,
2542
+ isAffiliateCodeFree: ns,
2543
+ isAffiliateCodeAvailable: ss,
2544
+ getPayoutsLeaderboard: os,
2545
+ getPointsLeaderboard: as,
2546
+ getReferredUsersLeaderboard: cs,
2547
+ getReferredVolume: us,
2548
+ getUserAudiences: bs,
2549
+ getUserPayoutsByConversion: fs,
2550
+ getUserPointsByConversion: hs,
2551
+ getUserPointsMovements: ms,
2552
+ getUserPayoutMovements: ps,
2553
+ getPayoutsByReferrer: ys,
2554
+ getUserReferrer: ws,
2555
+ getVolumeLeaderboard: ls,
2556
+ getRevenueLeaderboard: ds,
2557
+ listUserReferralCodes: _s,
2558
+ generateReferralCodes: Es,
2559
+ getReferralStatus: Cs,
2560
+ getReferralCode: Ss,
2561
+ useReferralCode: Rs,
2562
+ updateReferralCode: As,
2563
+ deleteReferral: Ts,
2564
+ getAffiliateStats: Ps,
2565
+ getAffiliateNewTraders: Os,
2566
+ getClaimableChecks: Ns,
2567
+ getClaimCheckTotals: xs
2489
2568
  };
2490
- var bs = /* @__PURE__ */ ((t) => (t.EvmAddress = "evm_address", t.SolanaAddress = "solana_address", t.XRPLAddress = "xrpl_address", t.SuiAddress = "sui_address", t.Email = "email", t))(bs || {});
2569
+ var Ls = /* @__PURE__ */ ((t) => (t.EvmAddress = "evm_address", t.SolanaAddress = "solana_address", t.XRPLAddress = "xrpl_address", t.SuiAddress = "sui_address", t.Email = "email", t))(Ls || {});
2491
2570
  export {
2492
- We as AddressInUseError,
2493
- Qe as CodeInUseError,
2494
- vs as Fuul,
2495
- Xe as InvalidSignatureError,
2496
- bs as UserIdentifierType,
2497
- Je as ValidationError
2571
+ lt as AddressInUseError,
2572
+ dt as CodeInUseError,
2573
+ Zs as Fuul,
2574
+ ft as InvalidSignatureError,
2575
+ Ls as UserIdentifierType,
2576
+ ut as ValidationError
2498
2577
  };