@akad/sdk 1.0.16 → 1.0.17

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/base.d.ts CHANGED
@@ -6,6 +6,7 @@ export interface Config {
6
6
  baseUrl?: string;
7
7
  productCode: string;
8
8
  headers?: Record<string, string>;
9
+ refreshTokenApiVersion?: string;
9
10
  refreshTokenEndpointPath?: string;
10
11
  responseInterceptor?: {
11
12
  onFulfilled: (value: AxiosResponse) => AxiosResponse | Promise<typeof value>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akad/sdk",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "main": "./ts-lib.umd.cjs",
5
5
  "module": "./ts-lib.js",
6
6
  "exports": {
package/ts-lib.js CHANGED
@@ -6,7 +6,7 @@ function Be(e, t) {
6
6
  const { toString: nt } = Object.prototype, { getPrototypeOf: le } = Object, K = /* @__PURE__ */ ((e) => (t) => {
7
7
  const n = nt.call(t);
8
8
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
9
- })(/* @__PURE__ */ Object.create(null)), A = (e) => (e = e.toLowerCase(), (t) => K(t) === e), Q = (e) => (t) => typeof t === e, { isArray: U } = Array, $ = Q("undefined");
9
+ })(/* @__PURE__ */ Object.create(null)), A = (e) => (e = e.toLowerCase(), (t) => K(t) === e), W = (e) => (t) => typeof t === e, { isArray: q } = Array, $ = W("undefined");
10
10
  function rt(e) {
11
11
  return e !== null && !$(e) && e.constructor !== null && !$(e.constructor) && R(e.constructor.isBuffer) && e.constructor.isBuffer(e);
12
12
  }
@@ -15,12 +15,12 @@ function st(e) {
15
15
  let t;
16
16
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Fe(e.buffer), t;
17
17
  }
18
- const ot = Q("string"), R = Q("function"), Le = Q("number"), W = (e) => e !== null && typeof e == "object", it = (e) => e === !0 || e === !1, z = (e) => {
18
+ const ot = W("string"), R = W("function"), Ue = W("number"), Q = (e) => e !== null && typeof e == "object", it = (e) => e === !0 || e === !1, z = (e) => {
19
19
  if (K(e) !== "object")
20
20
  return !1;
21
21
  const t = le(e);
22
22
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
23
- }, at = A("Date"), ct = A("File"), ut = A("Blob"), lt = A("FileList"), ft = (e) => W(e) && R(e.pipe), dt = (e) => {
23
+ }, at = A("Date"), ct = A("File"), ut = A("Blob"), lt = A("FileList"), ft = (e) => Q(e) && R(e.pipe), dt = (e) => {
24
24
  let t;
25
25
  return e && (typeof FormData == "function" && e instanceof FormData || R(e.append) && ((t = K(e)) === "formdata" || // detect form-data instance
26
26
  t === "object" && R(e.toString) && e.toString() === "[object FormData]"));
@@ -29,7 +29,7 @@ function I(e, t, { allOwnKeys: n = !1 } = {}) {
29
29
  if (e === null || typeof e > "u")
30
30
  return;
31
31
  let r, s;
32
- if (typeof e != "object" && (e = [e]), U(e))
32
+ if (typeof e != "object" && (e = [e]), q(e))
33
33
  for (r = 0, s = e.length; r < s; r++)
34
34
  t.call(null, e[r], r, e);
35
35
  else {
@@ -39,7 +39,7 @@ function I(e, t, { allOwnKeys: n = !1 } = {}) {
39
39
  u = i[r], t.call(null, e[u], u, e);
40
40
  }
41
41
  }
42
- function Ue(e, t) {
42
+ function qe(e, t) {
43
43
  t = t.toLowerCase();
44
44
  const n = Object.keys(e);
45
45
  let r = n.length, s;
@@ -48,11 +48,11 @@ function Ue(e, t) {
48
48
  return s;
49
49
  return null;
50
50
  }
51
- const qe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, _e = (e) => !$(e) && e !== qe;
51
+ const Le = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, _e = (e) => !$(e) && e !== Le;
52
52
  function re() {
53
53
  const { caseless: e } = _e(this) && this || {}, t = {}, n = (r, s) => {
54
- const i = e && Ue(t, s) || s;
55
- z(t[i]) && z(r) ? t[i] = re(t[i], r) : z(r) ? t[i] = re({}, r) : U(r) ? t[i] = r.slice() : t[i] = r;
54
+ const i = e && qe(t, s) || s;
55
+ z(t[i]) && z(r) ? t[i] = re(t[i], r) : z(r) ? t[i] = re({}, r) : q(r) ? t[i] = r.slice() : t[i] = r;
56
56
  };
57
57
  for (let r = 0, s = arguments.length; r < s; r++)
58
58
  arguments[r] && I(arguments[r], n);
@@ -60,11 +60,11 @@ function re() {
60
60
  }
61
61
  const wt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, i) => {
62
62
  n && R(s) ? e[i] = Be(s, n) : e[i] = s;
63
- }, { allOwnKeys: r }), e), Et = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), St = (e, t, n, r) => {
63
+ }, { allOwnKeys: r }), e), Tt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Et = (e, t, n, r) => {
64
64
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
65
65
  value: t.prototype
66
66
  }), n && Object.assign(e.prototype, n);
67
- }, Tt = (e, t, n, r) => {
67
+ }, St = (e, t, n, r) => {
68
68
  let s, i, o;
69
69
  const u = {};
70
70
  if (t = t || {}, e == null)
@@ -82,10 +82,10 @@ const wt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, i) => {
82
82
  }, Ot = (e) => {
83
83
  if (!e)
84
84
  return null;
85
- if (U(e))
85
+ if (q(e))
86
86
  return e;
87
87
  let t = e.length;
88
- if (!Le(t))
88
+ if (!Ue(t))
89
89
  return null;
90
90
  const n = new Array(t);
91
91
  for (; t-- > 0; )
@@ -136,13 +136,13 @@ const wt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, i) => {
136
136
  n[i] = !0;
137
137
  });
138
138
  };
139
- return U(e) ? r(e) : r(String(e).split(t)), n;
140
- }, Lt = () => {
141
- }, Ut = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Z = "abcdefghijklmnopqrstuvwxyz", ye = "0123456789", $e = {
139
+ return q(e) ? r(e) : r(String(e).split(t)), n;
140
+ }, Ut = () => {
141
+ }, qt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Z = "abcdefghijklmnopqrstuvwxyz", ye = "0123456789", $e = {
142
142
  DIGIT: ye,
143
143
  ALPHA: Z,
144
144
  ALPHA_DIGIT: Z + Z.toUpperCase() + ye
145
- }, qt = (e = 16, t = $e.ALPHA_DIGIT) => {
145
+ }, Lt = (e = 16, t = $e.ALPHA_DIGIT) => {
146
146
  let n = "";
147
147
  const { length: r } = t;
148
148
  for (; e--; )
@@ -154,12 +154,12 @@ function _t(e) {
154
154
  }
155
155
  const Dt = (e) => {
156
156
  const t = new Array(10), n = (r, s) => {
157
- if (W(r)) {
157
+ if (Q(r)) {
158
158
  if (t.indexOf(r) >= 0)
159
159
  return;
160
160
  if (!("toJSON" in r)) {
161
161
  t[s] = r;
162
- const i = U(r) ? [] : {};
162
+ const i = q(r) ? [] : {};
163
163
  return I(r, (o, u) => {
164
164
  const f = n(o, s + 1);
165
165
  !$(f) && (i[u] = f);
@@ -169,16 +169,16 @@ const Dt = (e) => {
169
169
  return r;
170
170
  };
171
171
  return n(e, 0);
172
- }, $t = A("AsyncFunction"), It = (e) => e && (W(e) || R(e)) && R(e.then) && R(e.catch), c = {
173
- isArray: U,
172
+ }, $t = A("AsyncFunction"), It = (e) => e && (Q(e) || R(e)) && R(e.then) && R(e.catch), c = {
173
+ isArray: q,
174
174
  isArrayBuffer: Fe,
175
175
  isBuffer: rt,
176
176
  isFormData: dt,
177
177
  isArrayBufferView: st,
178
178
  isString: ot,
179
- isNumber: Le,
179
+ isNumber: Ue,
180
180
  isBoolean: it,
181
- isObject: W,
181
+ isObject: Q,
182
182
  isPlainObject: z,
183
183
  isReadableStream: pt,
184
184
  isRequest: mt,
@@ -198,9 +198,9 @@ const Dt = (e) => {
198
198
  merge: re,
199
199
  extend: wt,
200
200
  trim: bt,
201
- stripBOM: Et,
202
- inherits: St,
203
- toFlatObject: Tt,
201
+ stripBOM: Tt,
202
+ inherits: Et,
203
+ toFlatObject: St,
204
204
  kindOf: K,
205
205
  kindOfTest: A,
206
206
  endsWith: Rt,
@@ -215,22 +215,22 @@ const Dt = (e) => {
215
215
  freezeMethods: Bt,
216
216
  toObjectSet: Ft,
217
217
  toCamelCase: kt,
218
- noop: Lt,
219
- toFiniteNumber: Ut,
220
- findKey: Ue,
221
- global: qe,
218
+ noop: Ut,
219
+ toFiniteNumber: qt,
220
+ findKey: qe,
221
+ global: Le,
222
222
  isContextDefined: _e,
223
223
  ALPHABET: $e,
224
- generateString: qt,
224
+ generateString: Lt,
225
225
  isSpecCompliantForm: _t,
226
226
  toJSONObject: Dt,
227
227
  isAsyncFn: $t,
228
228
  isThenable: It
229
229
  };
230
- function m(e, t, n, r, s) {
230
+ function y(e, t, n, r, s) {
231
231
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s);
232
232
  }
233
- c.inherits(m, Error, {
233
+ c.inherits(y, Error, {
234
234
  toJSON: function() {
235
235
  return {
236
236
  // Standard
@@ -251,7 +251,7 @@ c.inherits(m, Error, {
251
251
  };
252
252
  }
253
253
  });
254
- const Ie = m.prototype, je = {};
254
+ const Ie = y.prototype, je = {};
255
255
  [
256
256
  "ERR_BAD_OPTION_VALUE",
257
257
  "ERR_BAD_OPTION",
@@ -269,13 +269,13 @@ const Ie = m.prototype, je = {};
269
269
  ].forEach((e) => {
270
270
  je[e] = { value: e };
271
271
  });
272
- Object.defineProperties(m, je);
272
+ Object.defineProperties(y, je);
273
273
  Object.defineProperty(Ie, "isAxiosError", { value: !0 });
274
- m.from = (e, t, n, r, s, i) => {
274
+ y.from = (e, t, n, r, s, i) => {
275
275
  const o = Object.create(Ie);
276
276
  return c.toFlatObject(e, o, function(f) {
277
277
  return f !== Error.prototype;
278
- }, (u) => u !== "isAxiosError"), m.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
278
+ }, (u) => u !== "isAxiosError"), y.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
279
279
  };
280
280
  const jt = null;
281
281
  function se(e) {
@@ -302,8 +302,8 @@ function v(e, t, n) {
302
302
  metaTokens: !0,
303
303
  dots: !1,
304
304
  indexes: !1
305
- }, !1, function(p, E) {
306
- return !c.isUndefined(E[p]);
305
+ }, !1, function(p, b) {
306
+ return !c.isUndefined(b[p]);
307
307
  });
308
308
  const r = n.metaTokens, s = n.visitor || a, i = n.dots, o = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
309
309
  if (!c.isFunction(s))
@@ -314,26 +314,26 @@ function v(e, t, n) {
314
314
  if (c.isDate(h))
315
315
  return h.toISOString();
316
316
  if (!f && c.isBlob(h))
317
- throw new m("Blob is not supported. Use a Buffer instead.");
317
+ throw new y("Blob is not supported. Use a Buffer instead.");
318
318
  return c.isArrayBuffer(h) || c.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
319
319
  }
320
- function a(h, p, E) {
321
- let S = h;
322
- if (h && !E && typeof h == "object") {
320
+ function a(h, p, b) {
321
+ let E = h;
322
+ if (h && !b && typeof h == "object") {
323
323
  if (c.endsWith(p, "{}"))
324
324
  p = r ? p : p.slice(0, -2), h = JSON.stringify(h);
325
- else if (c.isArray(h) && Ht(h) || (c.isFileList(h) || c.endsWith(p, "[]")) && (S = c.toArray(h)))
326
- return p = He(p), S.forEach(function(b, _) {
327
- !(c.isUndefined(b) || b === null) && t.append(
325
+ else if (c.isArray(h) && Ht(h) || (c.isFileList(h) || c.endsWith(p, "[]")) && (E = c.toArray(h)))
326
+ return p = He(p), E.forEach(function(w, _) {
327
+ !(c.isUndefined(w) || w === null) && t.append(
328
328
  // eslint-disable-next-line no-nested-ternary
329
329
  o === !0 ? ge([p], _, i) : o === null ? p : p + "[]",
330
- l(b)
330
+ l(w)
331
331
  );
332
332
  }), !1;
333
333
  }
334
- return se(h) ? !0 : (t.append(ge(E, p, i), l(h)), !1);
334
+ return se(h) ? !0 : (t.append(ge(b, p, i), l(h)), !1);
335
335
  }
336
- const d = [], y = Object.assign(Mt, {
336
+ const d = [], m = Object.assign(Mt, {
337
337
  defaultVisitor: a,
338
338
  convertValue: l,
339
339
  isVisitable: se
@@ -342,14 +342,14 @@ function v(e, t, n) {
342
342
  if (!c.isUndefined(h)) {
343
343
  if (d.indexOf(h) !== -1)
344
344
  throw Error("Circular reference detected in " + p.join("."));
345
- d.push(h), c.forEach(h, function(S, N) {
346
- (!(c.isUndefined(S) || S === null) && s.call(
345
+ d.push(h), c.forEach(h, function(E, N) {
346
+ (!(c.isUndefined(E) || E === null) && s.call(
347
347
  t,
348
- S,
348
+ E,
349
349
  c.isString(N) ? N.trim() : N,
350
350
  p,
351
- y
352
- )) === !0 && g(S, p ? p.concat(N) : [N]);
351
+ m
352
+ )) === !0 && g(E, p ? p.concat(N) : [N]);
353
353
  }), d.pop();
354
354
  }
355
355
  }
@@ -466,12 +466,12 @@ const Je = {
466
466
  Blob: Gt
467
467
  },
468
468
  protocols: ["http", "https", "file", "blob", "url", "data"]
469
- }, de = typeof window < "u" && typeof document < "u", Qt = ((e) => de && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Wt = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
469
+ }, de = typeof window < "u" && typeof document < "u", Wt = ((e) => de && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Qt = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
470
470
  self instanceof WorkerGlobalScope && typeof self.importScripts == "function", vt = de && window.location.href || "http://localhost", Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
471
471
  __proto__: null,
472
472
  hasBrowserEnv: de,
473
- hasStandardBrowserEnv: Qt,
474
- hasStandardBrowserWebWorkerEnv: Wt,
473
+ hasStandardBrowserEnv: Wt,
474
+ hasStandardBrowserWebWorkerEnv: Qt,
475
475
  origin: vt
476
476
  }, Symbol.toStringTag, { value: "Module" })), O = {
477
477
  ...Xt,
@@ -560,7 +560,7 @@ const j = {
560
560
  return JSON.parse(t);
561
561
  } catch (u) {
562
562
  if (o)
563
- throw u.name === "SyntaxError" ? m.from(u, m.ERR_BAD_RESPONSE, this, null, this.response) : u;
563
+ throw u.name === "SyntaxError" ? y.from(u, y.ERR_BAD_RESPONSE, this, null, this.response) : u;
564
564
  }
565
565
  }
566
566
  return t;
@@ -616,7 +616,7 @@ const nn = c.toObjectSet([
616
616
  `).forEach(function(o) {
617
617
  s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && nn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
618
618
  }), t;
619
- }, Ee = Symbol("internals");
619
+ }, Te = Symbol("internals");
620
620
  function D(e) {
621
621
  return e && String(e).trim().toLowerCase();
622
622
  }
@@ -655,7 +655,7 @@ function cn(e, t) {
655
655
  });
656
656
  });
657
657
  }
658
- let T = class {
658
+ let S = class {
659
659
  constructor(t) {
660
660
  t && this.set(t);
661
661
  }
@@ -763,7 +763,7 @@ let T = class {
763
763
  return n.forEach((s) => r.set(s)), r;
764
764
  }
765
765
  static accessor(t) {
766
- const r = (this[Ee] = this[Ee] = {
766
+ const r = (this[Te] = this[Te] = {
767
767
  accessors: {}
768
768
  }).accessors, s = this.prototype;
769
769
  function i(o) {
@@ -773,8 +773,8 @@ let T = class {
773
773
  return c.isArray(t) ? t.forEach(i) : i(t), this;
774
774
  }
775
775
  };
776
- T.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
777
- c.reduceDescriptors(T.prototype, ({ value: e }, t) => {
776
+ S.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
777
+ c.reduceDescriptors(S.prototype, ({ value: e }, t) => {
778
778
  let n = t[0].toUpperCase() + t.slice(1);
779
779
  return {
780
780
  get: () => e,
@@ -783,9 +783,9 @@ c.reduceDescriptors(T.prototype, ({ value: e }, t) => {
783
783
  }
784
784
  };
785
785
  });
786
- c.freezeMethods(T);
786
+ c.freezeMethods(S);
787
787
  function ee(e, t) {
788
- const n = this || j, r = t || n, s = T.from(r.headers);
788
+ const n = this || j, r = t || n, s = S.from(r.headers);
789
789
  let i = r.data;
790
790
  return c.forEach(e, function(u) {
791
791
  i = u.call(n, i, s.normalize(), t ? t.status : void 0);
@@ -794,17 +794,17 @@ function ee(e, t) {
794
794
  function Ge(e) {
795
795
  return !!(e && e.__CANCEL__);
796
796
  }
797
- function q(e, t, n) {
798
- m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
797
+ function L(e, t, n) {
798
+ y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
799
799
  }
800
- c.inherits(q, m, {
800
+ c.inherits(L, y, {
801
801
  __CANCEL__: !0
802
802
  });
803
803
  function Ke(e, t, n) {
804
804
  const r = n.config.validateStatus;
805
- !n.status || !r || r(n.status) ? e(n) : t(new m(
805
+ !n.status || !r || r(n.status) ? e(n) : t(new y(
806
806
  "Request failed with status code " + n.status,
807
- [m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
807
+ [y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
808
808
  n.config,
809
809
  n.request,
810
810
  n
@@ -821,13 +821,13 @@ function ln(e, t) {
821
821
  return t = t !== void 0 ? t : 1e3, function(f) {
822
822
  const l = Date.now(), a = r[i];
823
823
  o || (o = l), n[s] = f, r[s] = l;
824
- let d = i, y = 0;
824
+ let d = i, m = 0;
825
825
  for (; d !== s; )
826
- y += n[d++], d = d % e;
826
+ m += n[d++], d = d % e;
827
827
  if (s = (s + 1) % e, s === i && (i = (i + 1) % e), l - o < t)
828
828
  return;
829
829
  const g = a && l - a;
830
- return g ? Math.round(y * 1e3 / g) : void 0;
830
+ return g ? Math.round(m * 1e3 / g) : void 0;
831
831
  };
832
832
  }
833
833
  function fn(e, t) {
@@ -923,10 +923,10 @@ function pn(e) {
923
923
  function mn(e, t) {
924
924
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
925
925
  }
926
- function Qe(e, t) {
926
+ function We(e, t) {
927
927
  return e && !pn(t) ? mn(e, t) : t;
928
928
  }
929
- const Se = (e) => e instanceof T ? { ...e } : e;
929
+ const Ee = (e) => e instanceof S ? { ...e } : e;
930
930
  function F(e, t) {
931
931
  t = t || {};
932
932
  const n = {};
@@ -986,17 +986,17 @@ function F(e, t) {
986
986
  socketPath: o,
987
987
  responseEncoding: o,
988
988
  validateStatus: u,
989
- headers: (l, a) => s(Se(l), Se(a), !0)
989
+ headers: (l, a) => s(Ee(l), Ee(a), !0)
990
990
  };
991
991
  return c.forEach(Object.keys(Object.assign({}, e, t)), function(a) {
992
- const d = f[a] || s, y = d(e[a], t[a], a);
993
- c.isUndefined(y) && d !== u || (n[a] = y);
992
+ const d = f[a] || s, m = d(e[a], t[a], a);
993
+ c.isUndefined(m) && d !== u || (n[a] = m);
994
994
  }), n;
995
995
  }
996
- const We = (e) => {
996
+ const Qe = (e) => {
997
997
  const t = F({}, e);
998
998
  let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: u } = t;
999
- t.headers = o = T.from(o), t.url = ze(Qe(t.baseURL, t.url), e.params, e.paramsSerializer), u && o.set(
999
+ t.headers = o = S.from(o), t.url = ze(We(t.baseURL, t.url), e.params, e.paramsSerializer), u && o.set(
1000
1000
  "Authorization",
1001
1001
  "Basic " + btoa((u.username || "") + ":" + (u.password ? unescape(encodeURIComponent(u.password)) : ""))
1002
1002
  );
@@ -1016,9 +1016,9 @@ const We = (e) => {
1016
1016
  return t;
1017
1017
  }, yn = typeof XMLHttpRequest < "u", gn = yn && function(e) {
1018
1018
  return new Promise(function(n, r) {
1019
- const s = We(e);
1019
+ const s = Qe(e);
1020
1020
  let i = s.data;
1021
- const o = T.from(s.headers).normalize();
1021
+ const o = S.from(s.headers).normalize();
1022
1022
  let { responseType: u } = s, f;
1023
1023
  function l() {
1024
1024
  s.cancelToken && s.cancelToken.unsubscribe(f), s.signal && s.signal.removeEventListener("abort", f);
@@ -1028,7 +1028,7 @@ const We = (e) => {
1028
1028
  function d() {
1029
1029
  if (!a)
1030
1030
  return;
1031
- const g = T.from(
1031
+ const g = S.from(
1032
1032
  "getAllResponseHeaders" in a && a.getAllResponseHeaders()
1033
1033
  ), p = {
1034
1034
  data: !u || u === "text" || u === "json" ? a.responseText : a.response,
@@ -1038,35 +1038,35 @@ const We = (e) => {
1038
1038
  config: e,
1039
1039
  request: a
1040
1040
  };
1041
- Ke(function(S) {
1042
- n(S), l();
1043
- }, function(S) {
1044
- r(S), l();
1041
+ Ke(function(E) {
1042
+ n(E), l();
1043
+ }, function(E) {
1044
+ r(E), l();
1045
1045
  }, p), a = null;
1046
1046
  }
1047
1047
  "onloadend" in a ? a.onloadend = d : a.onreadystatechange = function() {
1048
1048
  !a || a.readyState !== 4 || a.status === 0 && !(a.responseURL && a.responseURL.indexOf("file:") === 0) || setTimeout(d);
1049
1049
  }, a.onabort = function() {
1050
- a && (r(new m("Request aborted", m.ECONNABORTED, s, a)), a = null);
1050
+ a && (r(new y("Request aborted", y.ECONNABORTED, s, a)), a = null);
1051
1051
  }, a.onerror = function() {
1052
- r(new m("Network Error", m.ERR_NETWORK, s, a)), a = null;
1052
+ r(new y("Network Error", y.ERR_NETWORK, s, a)), a = null;
1053
1053
  }, a.ontimeout = function() {
1054
1054
  let h = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1055
1055
  const p = s.transitional || Je;
1056
- s.timeoutErrorMessage && (h = s.timeoutErrorMessage), r(new m(
1056
+ s.timeoutErrorMessage && (h = s.timeoutErrorMessage), r(new y(
1057
1057
  h,
1058
- p.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
1058
+ p.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1059
1059
  s,
1060
1060
  a
1061
1061
  )), a = null;
1062
1062
  }, i === void 0 && o.setContentType(null), "setRequestHeader" in a && c.forEach(o.toJSON(), function(h, p) {
1063
1063
  a.setRequestHeader(p, h);
1064
1064
  }), c.isUndefined(s.withCredentials) || (a.withCredentials = !!s.withCredentials), u && u !== "json" && (a.responseType = s.responseType), typeof s.onDownloadProgress == "function" && a.addEventListener("progress", V(s.onDownloadProgress, !0)), typeof s.onUploadProgress == "function" && a.upload && a.upload.addEventListener("progress", V(s.onUploadProgress)), (s.cancelToken || s.signal) && (f = (g) => {
1065
- a && (r(!g || g.type ? new q(null, e, a) : g), a.abort(), a = null);
1065
+ a && (r(!g || g.type ? new L(null, e, a) : g), a.abort(), a = null);
1066
1066
  }, s.cancelToken && s.cancelToken.subscribe(f), s.signal && (s.signal.aborted ? f() : s.signal.addEventListener("abort", f)));
1067
- const y = un(s.url);
1068
- if (y && O.protocols.indexOf(y) === -1) {
1069
- r(new m("Unsupported protocol " + y + ":", m.ERR_BAD_REQUEST, e));
1067
+ const m = un(s.url);
1068
+ if (m && O.protocols.indexOf(m) === -1) {
1069
+ r(new y("Unsupported protocol " + m + ":", y.ERR_BAD_REQUEST, e));
1070
1070
  return;
1071
1071
  }
1072
1072
  a.send(i || null);
@@ -1077,11 +1077,11 @@ const We = (e) => {
1077
1077
  if (!r) {
1078
1078
  r = !0, o();
1079
1079
  const l = f instanceof Error ? f : this.reason;
1080
- n.abort(l instanceof m ? l : new q(l instanceof Error ? l.message : l));
1080
+ n.abort(l instanceof y ? l : new L(l instanceof Error ? l.message : l));
1081
1081
  }
1082
1082
  };
1083
1083
  let i = t && setTimeout(() => {
1084
- s(new m(`timeout ${t} of ms exceeded`, m.ETIMEDOUT));
1084
+ s(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
1085
1085
  }, t);
1086
1086
  const o = () => {
1087
1087
  e && (i && clearTimeout(i), i = null, e.forEach((f) => {
@@ -1102,11 +1102,11 @@ const We = (e) => {
1102
1102
  let r = 0, s;
1103
1103
  for (; r < n; )
1104
1104
  s = r + t, yield e.slice(r, s), r = s;
1105
- }, En = async function* (e, t, n) {
1105
+ }, Tn = async function* (e, t, n) {
1106
1106
  for await (const r of e)
1107
1107
  yield* wn(ArrayBuffer.isView(r) ? r : await n(String(r)), t);
1108
- }, Te = (e, t, n, r, s) => {
1109
- const i = En(e, t, s);
1108
+ }, Se = (e, t, n, r, s) => {
1109
+ const i = Tn(e, t, s);
1110
1110
  let o = 0;
1111
1111
  return new ReadableStream({
1112
1112
  type: "bytes",
@@ -1132,7 +1132,7 @@ const We = (e) => {
1132
1132
  total: e,
1133
1133
  loaded: r
1134
1134
  }));
1135
- }, X = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", ve = X && typeof ReadableStream == "function", oe = X && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Sn = ve && (() => {
1135
+ }, X = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", ve = X && typeof ReadableStream == "function", oe = X && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), En = ve && (() => {
1136
1136
  let e = !1;
1137
1137
  const t = new Request(O.origin, {
1138
1138
  body: new ReadableStream(),
@@ -1153,11 +1153,11 @@ const We = (e) => {
1153
1153
  X && ((e) => {
1154
1154
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
1155
1155
  !G[t] && (G[t] = c.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
1156
- throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT, r);
1156
+ throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
1157
1157
  });
1158
1158
  });
1159
1159
  })(new Response());
1160
- const Tn = async (e) => {
1160
+ const Sn = async (e) => {
1161
1161
  if (e == null)
1162
1162
  return 0;
1163
1163
  if (c.isBlob(e))
@@ -1170,7 +1170,7 @@ const Tn = async (e) => {
1170
1170
  return (await oe(e)).byteLength;
1171
1171
  }, Rn = async (e, t) => {
1172
1172
  const n = c.toFiniteNumber(e.getContentLength());
1173
- return n ?? Tn(t);
1173
+ return n ?? Sn(t);
1174
1174
  }, On = X && (async (e) => {
1175
1175
  let {
1176
1176
  url: t,
@@ -1184,30 +1184,30 @@ const Tn = async (e) => {
1184
1184
  responseType: l,
1185
1185
  headers: a,
1186
1186
  withCredentials: d = "same-origin",
1187
- fetchOptions: y
1188
- } = We(e);
1187
+ fetchOptions: m
1188
+ } = Qe(e);
1189
1189
  l = l ? (l + "").toLowerCase() : "text";
1190
- let [g, h] = s || i || o ? bn([s, i], o) : [], p, E;
1191
- const S = () => {
1190
+ let [g, h] = s || i || o ? bn([s, i], o) : [], p, b;
1191
+ const E = () => {
1192
1192
  !p && setTimeout(() => {
1193
1193
  g && g.unsubscribe();
1194
1194
  }), p = !0;
1195
1195
  };
1196
1196
  let N;
1197
1197
  try {
1198
- if (f && Sn && n !== "get" && n !== "head" && (N = await Rn(a, r)) !== 0) {
1198
+ if (f && En && n !== "get" && n !== "head" && (N = await Rn(a, r)) !== 0) {
1199
1199
  let C = new Request(t, {
1200
1200
  method: "POST",
1201
1201
  body: r,
1202
1202
  duplex: "half"
1203
- }), L;
1204
- c.isFormData(r) && (L = C.headers.get("content-type")) && a.setContentType(L), C.body && (r = Te(C.body, Oe, Re(
1203
+ }), U;
1204
+ c.isFormData(r) && (U = C.headers.get("content-type")) && a.setContentType(U), C.body && (r = Se(C.body, Oe, Re(
1205
1205
  N,
1206
1206
  V(f)
1207
1207
  ), null, oe));
1208
1208
  }
1209
- c.isString(d) || (d = d ? "cors" : "omit"), E = new Request(t, {
1210
- ...y,
1209
+ c.isString(d) || (d = d ? "cors" : "omit"), b = new Request(t, {
1210
+ ...m,
1211
1211
  signal: g,
1212
1212
  method: n.toUpperCase(),
1213
1213
  headers: a.normalize().toJSON(),
@@ -1215,41 +1215,41 @@ const Tn = async (e) => {
1215
1215
  duplex: "half",
1216
1216
  withCredentials: d
1217
1217
  });
1218
- let b = await fetch(E);
1218
+ let w = await fetch(b);
1219
1219
  const _ = ie && (l === "stream" || l === "response");
1220
1220
  if (ie && (u || _)) {
1221
1221
  const C = {};
1222
1222
  ["status", "statusText", "headers"].forEach((pe) => {
1223
- C[pe] = b[pe];
1223
+ C[pe] = w[pe];
1224
1224
  });
1225
- const L = c.toFiniteNumber(b.headers.get("content-length"));
1226
- b = new Response(
1227
- Te(b.body, Oe, u && Re(
1228
- L,
1225
+ const U = c.toFiniteNumber(w.headers.get("content-length"));
1226
+ w = new Response(
1227
+ Se(w.body, Oe, u && Re(
1228
+ U,
1229
1229
  V(u, !0)
1230
- ), _ && S, oe),
1230
+ ), _ && E, oe),
1231
1231
  C
1232
1232
  );
1233
1233
  }
1234
1234
  l = l || "text";
1235
- let tt = await G[c.findKey(G, l) || "text"](b, e);
1236
- return !_ && S(), h && h(), await new Promise((C, L) => {
1237
- Ke(C, L, {
1235
+ let tt = await G[c.findKey(G, l) || "text"](w, e);
1236
+ return !_ && E(), h && h(), await new Promise((C, U) => {
1237
+ Ke(C, U, {
1238
1238
  data: tt,
1239
- headers: T.from(b.headers),
1240
- status: b.status,
1241
- statusText: b.statusText,
1239
+ headers: S.from(w.headers),
1240
+ status: w.status,
1241
+ statusText: w.statusText,
1242
1242
  config: e,
1243
- request: E
1243
+ request: b
1244
1244
  });
1245
1245
  });
1246
- } catch (b) {
1247
- throw S(), b && b.name === "TypeError" && /fetch/i.test(b.message) ? Object.assign(
1248
- new m("Network Error", m.ERR_NETWORK, e, E),
1246
+ } catch (w) {
1247
+ throw E(), w && w.name === "TypeError" && /fetch/i.test(w.message) ? Object.assign(
1248
+ new y("Network Error", y.ERR_NETWORK, e, b),
1249
1249
  {
1250
- cause: b.cause || b
1250
+ cause: w.cause || w
1251
1251
  }
1252
- ) : m.from(b, b && b.code, e, E);
1252
+ ) : y.from(w, w && w.code, e, b);
1253
1253
  }
1254
1254
  }), ae = {
1255
1255
  http: jt,
@@ -1275,7 +1275,7 @@ const Ae = (e) => `- ${e}`, An = (e) => c.isFunction(e) || e === null || e === !
1275
1275
  n = e[i];
1276
1276
  let o;
1277
1277
  if (r = n, !An(n) && (r = ae[(o = String(n)).toLowerCase()], r === void 0))
1278
- throw new m(`Unknown adapter '${o}'`);
1278
+ throw new y(`Unknown adapter '${o}'`);
1279
1279
  if (r)
1280
1280
  break;
1281
1281
  s[o || "#" + i] = r;
@@ -1287,7 +1287,7 @@ const Ae = (e) => `- ${e}`, An = (e) => c.isFunction(e) || e === null || e === !
1287
1287
  let o = t ? i.length > 1 ? `since :
1288
1288
  ` + i.map(Ae).join(`
1289
1289
  `) : " " + Ae(i[0]) : "as no adapter specified";
1290
- throw new m(
1290
+ throw new y(
1291
1291
  "There is no suitable adapter to dispatch the request " + o,
1292
1292
  "ERR_NOT_SUPPORT"
1293
1293
  );
@@ -1298,10 +1298,10 @@ const Ae = (e) => `- ${e}`, An = (e) => c.isFunction(e) || e === null || e === !
1298
1298
  };
1299
1299
  function te(e) {
1300
1300
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1301
- throw new q(null, e);
1301
+ throw new L(null, e);
1302
1302
  }
1303
1303
  function Pe(e) {
1304
- return te(e), e.headers = T.from(e.headers), e.data = ee.call(
1304
+ return te(e), e.headers = S.from(e.headers), e.data = ee.call(
1305
1305
  e,
1306
1306
  e.transformRequest
1307
1307
  ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Xe.getAdapter(e.adapter || j.adapter)(e).then(function(r) {
@@ -1309,13 +1309,13 @@ function Pe(e) {
1309
1309
  e,
1310
1310
  e.transformResponse,
1311
1311
  r
1312
- ), r.headers = T.from(r.headers), r;
1312
+ ), r.headers = S.from(r.headers), r;
1313
1313
  }, function(r) {
1314
1314
  return Ge(r) || (te(e), r && r.response && (r.response.data = ee.call(
1315
1315
  e,
1316
1316
  e.transformResponse,
1317
1317
  r.response
1318
- ), r.response.headers = T.from(r.response.headers))), Promise.reject(r);
1318
+ ), r.response.headers = S.from(r.response.headers))), Promise.reject(r);
1319
1319
  });
1320
1320
  }
1321
1321
  const Ze = "1.7.2", he = {};
@@ -1331,9 +1331,9 @@ he.transitional = function(t, n, r) {
1331
1331
  }
1332
1332
  return (i, o, u) => {
1333
1333
  if (t === !1)
1334
- throw new m(
1334
+ throw new y(
1335
1335
  s(o, " has been removed" + (n ? " in " + n : "")),
1336
- m.ERR_DEPRECATED
1336
+ y.ERR_DEPRECATED
1337
1337
  );
1338
1338
  return n && !Ne[o] && (Ne[o] = !0, console.warn(
1339
1339
  s(
@@ -1345,7 +1345,7 @@ he.transitional = function(t, n, r) {
1345
1345
  };
1346
1346
  function Pn(e, t, n) {
1347
1347
  if (typeof e != "object")
1348
- throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1348
+ throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
1349
1349
  const r = Object.keys(e);
1350
1350
  let s = r.length;
1351
1351
  for (; s-- > 0; ) {
@@ -1353,11 +1353,11 @@ function Pn(e, t, n) {
1353
1353
  if (o) {
1354
1354
  const u = e[i], f = u === void 0 || o(u, i, e);
1355
1355
  if (f !== !0)
1356
- throw new m("option " + i + " must be " + f, m.ERR_BAD_OPTION_VALUE);
1356
+ throw new y("option " + i + " must be " + f, y.ERR_BAD_OPTION_VALUE);
1357
1357
  continue;
1358
1358
  }
1359
1359
  if (n !== !0)
1360
- throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
1360
+ throw new y("Unknown option " + i, y.ERR_BAD_OPTION);
1361
1361
  }
1362
1362
  }
1363
1363
  const ce = {
@@ -1418,7 +1418,7 @@ let B = class {
1418
1418
  (h) => {
1419
1419
  delete i[h];
1420
1420
  }
1421
- ), n.headers = T.concat(o, i);
1421
+ ), n.headers = S.concat(o, i);
1422
1422
  const u = [];
1423
1423
  let f = !0;
1424
1424
  this.interceptors.request.forEach(function(p) {
@@ -1428,21 +1428,21 @@ let B = class {
1428
1428
  this.interceptors.response.forEach(function(p) {
1429
1429
  l.push(p.fulfilled, p.rejected);
1430
1430
  });
1431
- let a, d = 0, y;
1431
+ let a, d = 0, m;
1432
1432
  if (!f) {
1433
1433
  const h = [Pe.bind(this), void 0];
1434
- for (h.unshift.apply(h, u), h.push.apply(h, l), y = h.length, a = Promise.resolve(n); d < y; )
1434
+ for (h.unshift.apply(h, u), h.push.apply(h, l), m = h.length, a = Promise.resolve(n); d < m; )
1435
1435
  a = a.then(h[d++], h[d++]);
1436
1436
  return a;
1437
1437
  }
1438
- y = u.length;
1438
+ m = u.length;
1439
1439
  let g = n;
1440
- for (d = 0; d < y; ) {
1440
+ for (d = 0; d < m; ) {
1441
1441
  const h = u[d++], p = u[d++];
1442
1442
  try {
1443
1443
  g = h(g);
1444
- } catch (E) {
1445
- p.call(this, E);
1444
+ } catch (b) {
1445
+ p.call(this, b);
1446
1446
  break;
1447
1447
  }
1448
1448
  }
@@ -1451,13 +1451,13 @@ let B = class {
1451
1451
  } catch (h) {
1452
1452
  return Promise.reject(h);
1453
1453
  }
1454
- for (d = 0, y = l.length; d < y; )
1454
+ for (d = 0, m = l.length; d < m; )
1455
1455
  a = a.then(l[d++], l[d++]);
1456
1456
  return a;
1457
1457
  }
1458
1458
  getUri(t) {
1459
1459
  t = F(this.defaults, t);
1460
- const n = Qe(t.baseURL, t.url);
1460
+ const n = We(t.baseURL, t.url);
1461
1461
  return ze(n, t.params, t.paramsSerializer);
1462
1462
  }
1463
1463
  };
@@ -1510,7 +1510,7 @@ let Nn = class Ye {
1510
1510
  r.unsubscribe(i);
1511
1511
  }, o;
1512
1512
  }, t(function(i, o, u) {
1513
- r.reason || (r.reason = new q(i, o, u), n(r.reason));
1513
+ r.reason || (r.reason = new L(i, o, u), n(r.reason));
1514
1514
  });
1515
1515
  }
1516
1516
  /**
@@ -1635,30 +1635,30 @@ function et(e) {
1635
1635
  return et(F(e, s));
1636
1636
  }, n;
1637
1637
  }
1638
- const w = et(j);
1639
- w.Axios = B;
1640
- w.CanceledError = q;
1641
- w.CancelToken = Nn;
1642
- w.isCancel = Ge;
1643
- w.VERSION = Ze;
1644
- w.toFormData = v;
1645
- w.AxiosError = m;
1646
- w.Cancel = w.CanceledError;
1647
- w.all = function(t) {
1638
+ const T = et(j);
1639
+ T.Axios = B;
1640
+ T.CanceledError = L;
1641
+ T.CancelToken = Nn;
1642
+ T.isCancel = Ge;
1643
+ T.VERSION = Ze;
1644
+ T.toFormData = v;
1645
+ T.AxiosError = y;
1646
+ T.Cancel = T.CanceledError;
1647
+ T.all = function(t) {
1648
1648
  return Promise.all(t);
1649
1649
  };
1650
- w.spread = Cn;
1651
- w.isAxiosError = kn;
1652
- w.mergeConfig = F;
1653
- w.AxiosHeaders = T;
1654
- w.formToJSON = (e) => Ve(c.isHTMLForm(e) ? new FormData(e) : e);
1655
- w.getAdapter = Xe.getAdapter;
1656
- w.HttpStatusCode = ue;
1657
- w.default = w;
1650
+ T.spread = Cn;
1651
+ T.isAxiosError = kn;
1652
+ T.mergeConfig = F;
1653
+ T.AxiosHeaders = S;
1654
+ T.formToJSON = (e) => Ve(c.isHTMLForm(e) ? new FormData(e) : e);
1655
+ T.getAdapter = Xe.getAdapter;
1656
+ T.HttpStatusCode = ue;
1657
+ T.default = T;
1658
1658
  const {
1659
- Axios: Qn,
1659
+ Axios: Wn,
1660
1660
  AxiosError: xn,
1661
- CanceledError: Wn,
1661
+ CanceledError: Qn,
1662
1662
  isCancel: vn,
1663
1663
  CancelToken: Xn,
1664
1664
  VERSION: Zn,
@@ -1672,7 +1672,7 @@ const {
1672
1672
  formToJSON: or,
1673
1673
  getAdapter: ir,
1674
1674
  mergeConfig: ar
1675
- } = w, H = () => new xn(
1675
+ } = T, H = () => new xn(
1676
1676
  "Unauthorized",
1677
1677
  "ERR_UNAUTHORIZED",
1678
1678
  { headers: new Ce() },
@@ -1691,8 +1691,8 @@ const {
1691
1691
  }, o = () => {
1692
1692
  localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken");
1693
1693
  }, u = (a, d = null) => {
1694
- n.forEach((y) => {
1695
- a ? y.reject(a) : (y.requestConfig.headers || (y.requestConfig.headers = {}), y.requestConfig.headers.Authorization = `Bearer ${d}`, y.resolve(y.requestConfig));
1694
+ n.forEach((m) => {
1695
+ a ? m.reject(a) : (m.requestConfig.headers || (m.requestConfig.headers = {}), m.requestConfig.headers.Authorization = `Bearer ${d}`, m.resolve(m.requestConfig));
1696
1696
  }), n.length = 0;
1697
1697
  };
1698
1698
  return {
@@ -1714,10 +1714,10 @@ const {
1714
1714
  throw u(p), p;
1715
1715
  }
1716
1716
  if (t)
1717
- return new Promise((p, E) => {
1717
+ return new Promise((p, b) => {
1718
1718
  n.push({
1719
1719
  resolve: p,
1720
- reject: E,
1720
+ reject: b,
1721
1721
  requestConfig: a
1722
1722
  });
1723
1723
  });
@@ -1733,8 +1733,8 @@ const {
1733
1733
  return i(p), a.headers || (a.headers = {}), a.headers.Authorization = `Bearer ${p.accessToken}`, u(null, p.accessToken), t = !1, a;
1734
1734
  } catch {
1735
1735
  o();
1736
- const E = H();
1737
- throw u(E), t = !1, E;
1736
+ const b = H();
1737
+ throw u(b), t = !1, b;
1738
1738
  }
1739
1739
  },
1740
1740
  isAuthError: (a) => {
@@ -1743,56 +1743,55 @@ const {
1743
1743
  }
1744
1744
  };
1745
1745
  }, P = (e) => {
1746
- const t = w.create(), n = e.apiVersion, r = e.productCode, s = e.baseUrl, i = e.refreshTokenEndpointPath || "/refresh-token", o = Bn({
1746
+ const t = T.create(), n = e.apiVersion, r = e.productCode, s = e.baseUrl, i = s ? s.replace(/\/$/, "") : "", o = e.refreshTokenApiVersion || n, u = e.refreshTokenEndpointPath || "/refresh-token", f = `${i}/auth/${o}${u}`, l = Bn({
1747
1747
  baseUrl: s || "",
1748
1748
  apiVersion: n,
1749
- refreshTokenEndpointPath: i,
1750
- onRefreshToken: async (f) => (await t.post(
1751
- `${s}/auth/${n}${i}`,
1752
- { refreshToken: f }
1753
- )).data
1749
+ refreshTokenEndpointPath: u,
1750
+ onRefreshToken: async (d) => (await t.post(f, {
1751
+ refreshToken: d
1752
+ })).data
1754
1753
  });
1755
1754
  return t.interceptors.response.use(
1756
- (f) => f,
1757
- async (f) => {
1758
- const l = f.config;
1759
- if (!o.isAuthError(f) || l._retry)
1760
- return Promise.reject(f);
1761
- l._retry = !0;
1755
+ (d) => d,
1756
+ async (d) => {
1757
+ const m = d.config;
1758
+ if (!l.isAuthError(d) || m._retry)
1759
+ return Promise.reject(d);
1760
+ m._retry = !0;
1762
1761
  try {
1763
- const a = await o.handleTokenRefresh(l);
1764
- return t(a);
1765
- } catch (a) {
1766
- return Promise.reject(a);
1762
+ const g = await l.handleTokenRefresh(m);
1763
+ return t.request(g);
1764
+ } catch (g) {
1765
+ return Promise.reject(g);
1767
1766
  }
1768
1767
  }
1769
1768
  ), e.responseInterceptor && t.interceptors.response.use(
1770
1769
  e.responseInterceptor.onFulfilled,
1771
1770
  e.responseInterceptor.onReject
1772
1771
  ), {
1773
- request: async (f, l) => {
1774
- const a = `${s}/${r}/${n}${f}`, d = {
1775
- "Content-Type": (l == null ? void 0 : l.contentType) || "application/json",
1772
+ request: async (d, m) => {
1773
+ const g = d.startsWith("/") ? d.substring(1) : d, h = `${i}/${r}/${n}/${g}`, p = {
1774
+ "Content-Type": (m == null ? void 0 : m.contentType) || "application/json",
1776
1775
  apiVersion: n,
1777
1776
  Authorization: "",
1778
1777
  ...e.headers ?? {}
1779
- }, y = o.getAccessToken();
1780
- y && (d.Authorization = `Bearer ${y}`);
1781
- const g = {
1782
- method: (l == null ? void 0 : l.method) || "GET",
1783
- headers: d,
1784
- url: a,
1785
- data: l == null ? void 0 : l.data,
1786
- responseType: l == null ? void 0 : l.responseType
1778
+ }, b = l.getAccessToken();
1779
+ b && (p.Authorization = `Bearer ${b}`);
1780
+ const E = {
1781
+ method: (m == null ? void 0 : m.method) || "GET",
1782
+ headers: p,
1783
+ url: h,
1784
+ data: m == null ? void 0 : m.data,
1785
+ responseType: m == null ? void 0 : m.responseType
1787
1786
  };
1788
- return await t.request(g);
1787
+ return await t.request(E);
1789
1788
  },
1790
- getAccessToken: o.getAccessToken,
1791
- setTokens: o.setTokens,
1792
- clearTokens: o.clearTokens
1789
+ getAccessToken: l.getAccessToken,
1790
+ setTokens: l.setTokens,
1791
+ clearTokens: l.clearTokens
1793
1792
  };
1794
1793
  }, Fn = "cep";
1795
- function Ln(e) {
1794
+ function Un(e) {
1796
1795
  const t = P(e);
1797
1796
  function n(r) {
1798
1797
  return t.request(`/${Fn}`, {
@@ -1804,7 +1803,7 @@ function Ln(e) {
1804
1803
  getAddress: n
1805
1804
  };
1806
1805
  }
1807
- const ke = "auth", Un = (e) => {
1806
+ const ke = "auth", qn = (e) => {
1808
1807
  const t = P(e);
1809
1808
  return {
1810
1809
  postLogin: async (s) => {
@@ -1820,7 +1819,7 @@ const ke = "auth", Un = (e) => {
1820
1819
  data: ""
1821
1820
  })
1822
1821
  };
1823
- }, qn = (e) => {
1822
+ }, Ln = (e) => {
1824
1823
  const t = P(e);
1825
1824
  return {
1826
1825
  signUp: async (i) => await t.request("/sign-up", {
@@ -1997,7 +1996,7 @@ const ke = "auth", Un = (e) => {
1997
1996
  };
1998
1997
  };
1999
1998
  function cr(e) {
2000
- const t = Un(e), n = qn(e), r = $n(e), s = Hn(e), i = In(e), o = Ln(e), u = _n(e), f = jn(e), l = zn(e), a = Vn(e);
1999
+ const t = qn(e), n = Ln(e), r = $n(e), s = Hn(e), i = In(e), o = Un(e), u = _n(e), f = jn(e), l = zn(e), a = Vn(e);
2001
2000
  return {
2002
2001
  auth: t,
2003
2002
  authAkad: n,
package/ts-lib.umd.cjs CHANGED
@@ -1,6 +1,6 @@
1
- (function(L,$){typeof exports=="object"&&typeof module<"u"?module.exports=$():typeof define=="function"&&define.amd?define($):(L=typeof globalThis<"u"?globalThis:L||self,L["ts-lib"]=$())})(this,function(){"use strict";function L(e,t){return function(){return e.apply(t,arguments)}}const{toString:$}=Object.prototype,{getPrototypeOf:ee}=Object,z=(e=>t=>{const n=$.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),O=e=>(e=e.toLowerCase(),t=>z(t)===e),J=e=>t=>typeof t===e,{isArray:U}=Array,D=J("undefined");function nt(e){return e!==null&&!D(e)&&e.constructor!==null&&!D(e.constructor)&&R(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ye=O("ArrayBuffer");function rt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ye(e.buffer),t}const st=J("string"),R=J("function"),ge=J("number"),V=e=>e!==null&&typeof e=="object",ot=e=>e===!0||e===!1,G=e=>{if(z(e)!=="object")return!1;const t=ee(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},it=O("Date"),at=O("File"),ct=O("Blob"),ut=O("FileList"),lt=e=>V(e)&&R(e.pipe),ft=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||R(e.append)&&((t=z(e))==="formdata"||t==="object"&&R(e.toString)&&e.toString()==="[object FormData]"))},dt=O("URLSearchParams"),[ht,pt,mt,yt]=["ReadableStream","Request","Response","Headers"].map(O),gt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function I(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),U(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let u;for(r=0;r<o;r++)u=i[r],t.call(null,e[u],u,e)}}function be(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const we=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Te=e=>!D(e)&&e!==we;function te(){const{caseless:e}=Te(this)&&this||{},t={},n=(r,s)=>{const i=e&&be(t,s)||s;G(t[i])&&G(r)?t[i]=te(t[i],r):G(r)?t[i]=te({},r):U(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&I(arguments[r],n);return t}const bt=(e,t,n,{allOwnKeys:r}={})=>(I(t,(s,i)=>{n&&R(s)?e[i]=L(s,n):e[i]=s},{allOwnKeys:r}),e),wt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Tt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},St=(e,t,n,r)=>{let s,i,o;const u={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!u[o]&&(t[o]=e[o],u[o]=!0);e=n!==!1&&ee(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Et=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Rt=e=>{if(!e)return null;if(U(e))return e;let t=e.length;if(!ge(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Ot=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ee(Uint8Array)),At=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Pt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Nt=O("HTMLFormElement"),Ct=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Se=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),kt=O("RegExp"),Ee=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};I(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},xt=e=>{Ee(e,(t,n)=>{if(R(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(R(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Bt=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return U(e)?r(e):r(String(e).split(t)),n},Ft=()=>{},Lt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,ne="abcdefghijklmnopqrstuvwxyz",Re="0123456789",Oe={DIGIT:Re,ALPHA:ne,ALPHA_DIGIT:ne+ne.toUpperCase()+Re},Ut=(e=16,t=Oe.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function qt(e){return!!(e&&R(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const _t=e=>{const t=new Array(10),n=(r,s)=>{if(V(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=U(r)?[]:{};return I(r,(o,u)=>{const f=n(o,s+1);!D(f)&&(i[u]=f)}),t[s]=void 0,i}}return r};return n(e,0)},$t=O("AsyncFunction"),c={isArray:U,isArrayBuffer:ye,isBuffer:nt,isFormData:ft,isArrayBufferView:rt,isString:st,isNumber:ge,isBoolean:ot,isObject:V,isPlainObject:G,isReadableStream:ht,isRequest:pt,isResponse:mt,isHeaders:yt,isUndefined:D,isDate:it,isFile:at,isBlob:ct,isRegExp:kt,isFunction:R,isStream:lt,isURLSearchParams:dt,isTypedArray:Ot,isFileList:ut,forEach:I,merge:te,extend:bt,trim:gt,stripBOM:wt,inherits:Tt,toFlatObject:St,kindOf:z,kindOfTest:O,endsWith:Et,toArray:Rt,forEachEntry:At,matchAll:Pt,isHTMLForm:Nt,hasOwnProperty:Se,hasOwnProp:Se,reduceDescriptors:Ee,freezeMethods:xt,toObjectSet:Bt,toCamelCase:Ct,noop:Ft,toFiniteNumber:Lt,findKey:be,global:we,isContextDefined:Te,ALPHABET:Oe,generateString:Ut,isSpecCompliantForm:qt,toJSONObject:_t,isAsyncFn:$t,isThenable:e=>e&&(V(e)||R(e))&&R(e.then)&&R(e.catch)};function m(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}c.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ae=m.prototype,Pe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Pe[e]={value:e}}),Object.defineProperties(m,Pe),Object.defineProperty(Ae,"isAxiosError",{value:!0}),m.from=(e,t,n,r,s,i)=>{const o=Object.create(Ae);return c.toFlatObject(e,o,function(f){return f!==Error.prototype},u=>u!=="isAxiosError"),m.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const Dt=null;function re(e){return c.isPlainObject(e)||c.isArray(e)}function Ne(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function Ce(e,t,n){return e?e.concat(t).map(function(s,i){return s=Ne(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function It(e){return c.isArray(e)&&!e.some(re)}const jt=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function K(e,t,n){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,T){return!c.isUndefined(T[p])});const r=n.metaTokens,s=n.visitor||a,i=n.dots,o=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(c.isDate(h))return h.toISOString();if(!f&&c.isBlob(h))throw new m("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(h)||c.isTypedArray(h)?f&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function a(h,p,T){let S=h;if(h&&!T&&typeof h=="object"){if(c.endsWith(p,"{}"))p=r?p:p.slice(0,-2),h=JSON.stringify(h);else if(c.isArray(h)&&It(h)||(c.isFileList(h)||c.endsWith(p,"[]"))&&(S=c.toArray(h)))return p=Ne(p),S.forEach(function(b,M){!(c.isUndefined(b)||b===null)&&t.append(o===!0?Ce([p],M,i):o===null?p:p+"[]",l(b))}),!1}return re(h)?!0:(t.append(Ce(T,p,i),l(h)),!1)}const d=[],y=Object.assign(jt,{defaultVisitor:a,convertValue:l,isVisitable:re});function g(h,p){if(!c.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(h),c.forEach(h,function(S,N){(!(c.isUndefined(S)||S===null)&&s.call(t,S,c.isString(N)?N.trim():N,p,y))===!0&&g(S,p?p.concat(N):[N])}),d.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return g(e),t}function ke(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function se(e,t){this._pairs=[],e&&K(e,this,t)}const xe=se.prototype;xe.append=function(t,n){this._pairs.push([t,n])},xe.toString=function(t){const n=t?function(r){return t.call(this,r,ke)}:ke;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Ht(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Be(e,t,n){if(!t)return e;const r=n&&n.encode||Ht,s=n&&n.serialize;let i;if(s?i=s(t,n):i=c.isURLSearchParams(t)?t.toString():new se(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Fe{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){c.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Mt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:se,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},oe=typeof window<"u"&&typeof document<"u",zt=(e=>oe&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Jt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Vt=oe&&window.location.href||"http://localhost",A={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:oe,hasStandardBrowserEnv:zt,hasStandardBrowserWebWorkerEnv:Jt,origin:Vt},Symbol.toStringTag,{value:"Module"})),...Mt};function Gt(e,t){return K(e,new A.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return A.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Kt(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Qt(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function Ue(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const u=Number.isFinite(+o),f=i>=n.length;return o=!o&&c.isArray(s)?s.length:o,f?(c.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!u):((!s[o]||!c.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&c.isArray(s[o])&&(s[o]=Qt(s[o])),!u)}if(c.isFormData(e)&&c.isFunction(e.entries)){const n={};return c.forEachEntry(e,(r,s)=>{t(Kt(r),s,n,0)}),n}return null}function Wt(e,t,n){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const j={transitional:Le,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=c.isObject(t);if(i&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return s?JSON.stringify(Ue(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Gt(t,this.formSerializer).toString();if((u=c.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return K(u?{"files[]":t}:t,f&&new f,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Wt(t)):t}],transformResponse:[function(t){const n=this.transitional||j.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(u){if(o)throw u.name==="SyntaxError"?m.from(u,m.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],e=>{j.headers[e]={}});const vt=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Xt=e=>{const t={};let n,r,s;return e&&e.split(`
2
- `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&vt[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},qe=Symbol("internals");function H(e){return e&&String(e).trim().toLowerCase()}function Q(e){return e===!1||e==null?e:c.isArray(e)?e.map(Q):String(e)}function Zt(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Yt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ie(e,t,n,r,s){if(c.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!c.isString(t)){if(c.isString(r))return t.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(t)}}function en(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function tn(e,t){const n=c.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let E=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(u,f,l){const a=H(f);if(!a)throw new Error("header name must be a non-empty string");const d=c.findKey(s,a);(!d||s[d]===void 0||l===!0||l===void 0&&s[d]!==!1)&&(s[d||f]=Q(u))}const o=(u,f)=>c.forEach(u,(l,a)=>i(l,a,f));if(c.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(c.isString(t)&&(t=t.trim())&&!Yt(t))o(Xt(t),n);else if(c.isHeaders(t))for(const[u,f]of t.entries())i(f,u,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=H(t),t){const r=c.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Zt(s);if(c.isFunction(n))return n.call(this,s,r);if(c.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=H(t),t){const r=c.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ie(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=H(o),o){const u=c.findKey(r,o);u&&(!n||ie(r,r[u],u,n))&&(delete r[u],s=!0)}}return c.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||ie(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return c.forEach(this,(s,i)=>{const o=c.findKey(r,i);if(o){n[o]=Q(s),delete n[i];return}const u=t?en(i):String(i).trim();u!==i&&delete n[i],n[u]=Q(s),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return c.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&c.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[qe]=this[qe]={accessors:{}}).accessors,s=this.prototype;function i(o){const u=H(o);r[u]||(tn(s,o),r[u]=!0)}return c.isArray(t)?t.forEach(i):i(t),this}};E.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(E.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),c.freezeMethods(E);function ae(e,t){const n=this||j,r=t||n,s=E.from(r.headers);let i=r.data;return c.forEach(e,function(u){i=u.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function _e(e){return!!(e&&e.__CANCEL__)}function q(e,t,n){m.call(this,e??"canceled",m.ERR_CANCELED,t,n),this.name="CanceledError"}c.inherits(q,m,{__CANCEL__:!0});function $e(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new m("Request failed with status code "+n.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function nn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function rn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(f){const l=Date.now(),a=r[i];o||(o=l),n[s]=f,r[s]=l;let d=i,y=0;for(;d!==s;)y+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o<t)return;const g=a&&l-a;return g?Math.round(y*1e3/g):void 0}}function sn(e,t){let n=0;const r=1e3/t;let s=null;return function(){const o=this===!0,u=Date.now();if(o||u-n>r)return s&&(clearTimeout(s),s=null),n=u,e.apply(null,arguments);s||(s=setTimeout(()=>(s=null,n=Date.now(),e.apply(null,arguments)),r-(u-n)))}}const W=(e,t,n=3)=>{let r=0;const s=rn(50,250);return sn(i=>{const o=i.loaded,u=i.lengthComputable?i.total:void 0,f=o-r,l=s(f),a=o<=u;r=o;const d={loaded:o,total:u,progress:u?o/u:void 0,bytes:f,rate:l||void 0,estimated:l&&u&&a?(u-o)/l:void 0,event:i,lengthComputable:u!=null};d[t?"download":"upload"]=!0,e(d)},n)},on=A.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(i){let o=i;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(o){const u=c.isString(o)?s(o):o;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}(),an=A.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];c.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),c.isString(r)&&o.push("path="+r),c.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function cn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function un(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function De(e,t){return e&&!cn(t)?un(e,t):t}const Ie=e=>e instanceof E?{...e}:e;function B(e,t){t=t||{};const n={};function r(l,a,d){return c.isPlainObject(l)&&c.isPlainObject(a)?c.merge.call({caseless:d},l,a):c.isPlainObject(a)?c.merge({},a):c.isArray(a)?a.slice():a}function s(l,a,d){if(c.isUndefined(a)){if(!c.isUndefined(l))return r(void 0,l,d)}else return r(l,a,d)}function i(l,a){if(!c.isUndefined(a))return r(void 0,a)}function o(l,a){if(c.isUndefined(a)){if(!c.isUndefined(l))return r(void 0,l)}else return r(void 0,a)}function u(l,a,d){if(d in t)return r(l,a);if(d in e)return r(void 0,l)}const f={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u,headers:(l,a)=>s(Ie(l),Ie(a),!0)};return c.forEach(Object.keys(Object.assign({},e,t)),function(a){const d=f[a]||s,y=d(e[a],t[a],a);c.isUndefined(y)&&d!==u||(n[a]=y)}),n}const je=e=>{const t=B({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:u}=t;t.headers=o=E.from(o),t.url=Be(De(t.baseURL,t.url),e.params,e.paramsSerializer),u&&o.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let f;if(c.isFormData(n)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((f=o.getContentType())!==!1){const[l,...a]=f?f.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...a].join("; "))}}if(A.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(t)),r||r!==!1&&on(t.url))){const l=s&&i&&an.read(i);l&&o.set(s,l)}return t},ln=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=je(e);let i=s.data;const o=E.from(s.headers).normalize();let{responseType:u}=s,f;function l(){s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let a=new XMLHttpRequest;a.open(s.method.toUpperCase(),s.url,!0),a.timeout=s.timeout;function d(){if(!a)return;const g=E.from("getAllResponseHeaders"in a&&a.getAllResponseHeaders()),p={data:!u||u==="text"||u==="json"?a.responseText:a.response,status:a.status,statusText:a.statusText,headers:g,config:e,request:a};$e(function(S){n(S),l()},function(S){r(S),l()},p),a=null}"onloadend"in a?a.onloadend=d:a.onreadystatechange=function(){!a||a.readyState!==4||a.status===0&&!(a.responseURL&&a.responseURL.indexOf("file:")===0)||setTimeout(d)},a.onabort=function(){a&&(r(new m("Request aborted",m.ECONNABORTED,s,a)),a=null)},a.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,s,a)),a=null},a.ontimeout=function(){let h=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const p=s.transitional||Le;s.timeoutErrorMessage&&(h=s.timeoutErrorMessage),r(new m(h,p.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,s,a)),a=null},i===void 0&&o.setContentType(null),"setRequestHeader"in a&&c.forEach(o.toJSON(),function(h,p){a.setRequestHeader(p,h)}),c.isUndefined(s.withCredentials)||(a.withCredentials=!!s.withCredentials),u&&u!=="json"&&(a.responseType=s.responseType),typeof s.onDownloadProgress=="function"&&a.addEventListener("progress",W(s.onDownloadProgress,!0)),typeof s.onUploadProgress=="function"&&a.upload&&a.upload.addEventListener("progress",W(s.onUploadProgress)),(s.cancelToken||s.signal)&&(f=g=>{a&&(r(!g||g.type?new q(null,e,a):g),a.abort(),a=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const y=nn(s.url);if(y&&A.protocols.indexOf(y)===-1){r(new m("Unsupported protocol "+y+":",m.ERR_BAD_REQUEST,e));return}a.send(i||null)})},fn=(e,t)=>{let n=new AbortController,r;const s=function(f){if(!r){r=!0,o();const l=f instanceof Error?f:this.reason;n.abort(l instanceof m?l:new q(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{s(new m(`timeout ${t} of ms exceeded`,m.ETIMEDOUT))},t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(f=>{f&&(f.removeEventListener?f.removeEventListener("abort",s):f.unsubscribe(s))}),e=null)};e.forEach(f=>f&&f.addEventListener&&f.addEventListener("abort",s));const{signal:u}=n;return u.unsubscribe=o,[u,()=>{i&&clearTimeout(i),i=null}]},dn=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},hn=async function*(e,t,n){for await(const r of e)yield*dn(ArrayBuffer.isView(r)?r:await n(String(r)),t)},He=(e,t,n,r,s)=>{const i=hn(e,t,s);let o=0;return new ReadableStream({type:"bytes",async pull(u){const{done:f,value:l}=await i.next();if(f){u.close(),r();return}let a=l.byteLength;n&&n(o+=a),u.enqueue(new Uint8Array(l))},cancel(u){return r(u),i.return()}},{highWaterMark:2})},Me=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},v=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ze=v&&typeof ReadableStream=="function",ce=v&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),pn=ze&&(()=>{let e=!1;const t=new Request(A.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Je=64*1024,ue=ze&&!!(()=>{try{return c.isReadableStream(new Response("").body)}catch{}})(),X={stream:ue&&(e=>e.body)};v&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!X[t]&&(X[t]=c.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new m(`Response type '${t}' is not supported`,m.ERR_NOT_SUPPORT,r)})})})(new Response);const mn=async e=>{if(e==null)return 0;if(c.isBlob(e))return e.size;if(c.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(c.isArrayBufferView(e))return e.byteLength;if(c.isURLSearchParams(e)&&(e=e+""),c.isString(e))return(await ce(e)).byteLength},yn=async(e,t)=>{const n=c.toFiniteNumber(e.getContentLength());return n??mn(t)},le={http:Dt,xhr:ln,fetch:v&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:u,onUploadProgress:f,responseType:l,headers:a,withCredentials:d="same-origin",fetchOptions:y}=je(e);l=l?(l+"").toLowerCase():"text";let[g,h]=s||i||o?fn([s,i],o):[],p,T;const S=()=>{!p&&setTimeout(()=>{g&&g.unsubscribe()}),p=!0};let N;try{if(f&&pn&&n!=="get"&&n!=="head"&&(N=await yn(a,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),_;c.isFormData(r)&&(_=x.headers.get("content-type"))&&a.setContentType(_),x.body&&(r=He(x.body,Je,Me(N,W(f)),null,ce))}c.isString(d)||(d=d?"cors":"omit"),T=new Request(t,{...y,signal:g,method:n.toUpperCase(),headers:a.normalize().toJSON(),body:r,duplex:"half",withCredentials:d});let b=await fetch(T);const M=ue&&(l==="stream"||l==="response");if(ue&&(u||M)){const x={};["status","statusText","headers"].forEach(et=>{x[et]=b[et]});const _=c.toFiniteNumber(b.headers.get("content-length"));b=new Response(He(b.body,Je,u&&Me(_,W(u,!0)),M&&S,ce),x)}l=l||"text";let In=await X[c.findKey(X,l)||"text"](b,e);return!M&&S(),h&&h(),await new Promise((x,_)=>{$e(x,_,{data:In,headers:E.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:T})})}catch(b){throw S(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new m("Network Error",m.ERR_NETWORK,e,T),{cause:b.cause||b}):m.from(b,b&&b.code,e,T)}})};c.forEach(le,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ve=e=>`- ${e}`,gn=e=>c.isFunction(e)||e===null||e===!1,Ge={getAdapter:e=>{e=c.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i<t;i++){n=e[i];let o;if(r=n,!gn(n)&&(r=le[(o=String(n)).toLowerCase()],r===void 0))throw new m(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([u,f])=>`adapter ${u} `+(f===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
1
+ (function(U,$){typeof exports=="object"&&typeof module<"u"?module.exports=$():typeof define=="function"&&define.amd?define($):(U=typeof globalThis<"u"?globalThis:U||self,U["ts-lib"]=$())})(this,function(){"use strict";function U(e,t){return function(){return e.apply(t,arguments)}}const{toString:$}=Object.prototype,{getPrototypeOf:ee}=Object,z=(e=>t=>{const n=$.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),O=e=>(e=e.toLowerCase(),t=>z(t)===e),J=e=>t=>typeof t===e,{isArray:L}=Array,D=J("undefined");function nt(e){return e!==null&&!D(e)&&e.constructor!==null&&!D(e.constructor)&&R(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ye=O("ArrayBuffer");function rt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ye(e.buffer),t}const st=J("string"),R=J("function"),ge=J("number"),V=e=>e!==null&&typeof e=="object",ot=e=>e===!0||e===!1,G=e=>{if(z(e)!=="object")return!1;const t=ee(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},it=O("Date"),at=O("File"),ct=O("Blob"),ut=O("FileList"),lt=e=>V(e)&&R(e.pipe),ft=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||R(e.append)&&((t=z(e))==="formdata"||t==="object"&&R(e.toString)&&e.toString()==="[object FormData]"))},dt=O("URLSearchParams"),[ht,pt,mt,yt]=["ReadableStream","Request","Response","Headers"].map(O),gt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function I(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),L(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let u;for(r=0;r<o;r++)u=i[r],t.call(null,e[u],u,e)}}function be(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const we=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Te=e=>!D(e)&&e!==we;function te(){const{caseless:e}=Te(this)&&this||{},t={},n=(r,s)=>{const i=e&&be(t,s)||s;G(t[i])&&G(r)?t[i]=te(t[i],r):G(r)?t[i]=te({},r):L(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&I(arguments[r],n);return t}const bt=(e,t,n,{allOwnKeys:r}={})=>(I(t,(s,i)=>{n&&R(s)?e[i]=U(s,n):e[i]=s},{allOwnKeys:r}),e),wt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Tt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Et=(e,t,n,r)=>{let s,i,o;const u={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!u[o]&&(t[o]=e[o],u[o]=!0);e=n!==!1&&ee(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},St=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Rt=e=>{if(!e)return null;if(L(e))return e;let t=e.length;if(!ge(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Ot=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ee(Uint8Array)),At=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Pt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Nt=O("HTMLFormElement"),Ct=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ee=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),kt=O("RegExp"),Se=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};I(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},xt=e=>{Se(e,(t,n)=>{if(R(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(R(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Bt=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return L(e)?r(e):r(String(e).split(t)),n},Ft=()=>{},Ut=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,ne="abcdefghijklmnopqrstuvwxyz",Re="0123456789",Oe={DIGIT:Re,ALPHA:ne,ALPHA_DIGIT:ne+ne.toUpperCase()+Re},Lt=(e=16,t=Oe.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function qt(e){return!!(e&&R(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const _t=e=>{const t=new Array(10),n=(r,s)=>{if(V(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=L(r)?[]:{};return I(r,(o,u)=>{const f=n(o,s+1);!D(f)&&(i[u]=f)}),t[s]=void 0,i}}return r};return n(e,0)},$t=O("AsyncFunction"),c={isArray:L,isArrayBuffer:ye,isBuffer:nt,isFormData:ft,isArrayBufferView:rt,isString:st,isNumber:ge,isBoolean:ot,isObject:V,isPlainObject:G,isReadableStream:ht,isRequest:pt,isResponse:mt,isHeaders:yt,isUndefined:D,isDate:it,isFile:at,isBlob:ct,isRegExp:kt,isFunction:R,isStream:lt,isURLSearchParams:dt,isTypedArray:Ot,isFileList:ut,forEach:I,merge:te,extend:bt,trim:gt,stripBOM:wt,inherits:Tt,toFlatObject:Et,kindOf:z,kindOfTest:O,endsWith:St,toArray:Rt,forEachEntry:At,matchAll:Pt,isHTMLForm:Nt,hasOwnProperty:Ee,hasOwnProp:Ee,reduceDescriptors:Se,freezeMethods:xt,toObjectSet:Bt,toCamelCase:Ct,noop:Ft,toFiniteNumber:Ut,findKey:be,global:we,isContextDefined:Te,ALPHABET:Oe,generateString:Lt,isSpecCompliantForm:qt,toJSONObject:_t,isAsyncFn:$t,isThenable:e=>e&&(V(e)||R(e))&&R(e.then)&&R(e.catch)};function y(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}c.inherits(y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ae=y.prototype,Pe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Pe[e]={value:e}}),Object.defineProperties(y,Pe),Object.defineProperty(Ae,"isAxiosError",{value:!0}),y.from=(e,t,n,r,s,i)=>{const o=Object.create(Ae);return c.toFlatObject(e,o,function(f){return f!==Error.prototype},u=>u!=="isAxiosError"),y.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const Dt=null;function re(e){return c.isPlainObject(e)||c.isArray(e)}function Ne(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function Ce(e,t,n){return e?e.concat(t).map(function(s,i){return s=Ne(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function It(e){return c.isArray(e)&&!e.some(re)}const jt=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function K(e,t,n){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,b){return!c.isUndefined(b[p])});const r=n.metaTokens,s=n.visitor||a,i=n.dots,o=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(c.isDate(h))return h.toISOString();if(!f&&c.isBlob(h))throw new y("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(h)||c.isTypedArray(h)?f&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function a(h,p,b){let E=h;if(h&&!b&&typeof h=="object"){if(c.endsWith(p,"{}"))p=r?p:p.slice(0,-2),h=JSON.stringify(h);else if(c.isArray(h)&&It(h)||(c.isFileList(h)||c.endsWith(p,"[]"))&&(E=c.toArray(h)))return p=Ne(p),E.forEach(function(w,M){!(c.isUndefined(w)||w===null)&&t.append(o===!0?Ce([p],M,i):o===null?p:p+"[]",l(w))}),!1}return re(h)?!0:(t.append(Ce(b,p,i),l(h)),!1)}const d=[],m=Object.assign(jt,{defaultVisitor:a,convertValue:l,isVisitable:re});function g(h,p){if(!c.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(h),c.forEach(h,function(E,N){(!(c.isUndefined(E)||E===null)&&s.call(t,E,c.isString(N)?N.trim():N,p,m))===!0&&g(E,p?p.concat(N):[N])}),d.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return g(e),t}function ke(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function se(e,t){this._pairs=[],e&&K(e,this,t)}const xe=se.prototype;xe.append=function(t,n){this._pairs.push([t,n])},xe.toString=function(t){const n=t?function(r){return t.call(this,r,ke)}:ke;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Ht(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Be(e,t,n){if(!t)return e;const r=n&&n.encode||Ht,s=n&&n.serialize;let i;if(s?i=s(t,n):i=c.isURLSearchParams(t)?t.toString():new se(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Fe{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){c.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ue={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Mt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:se,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},oe=typeof window<"u"&&typeof document<"u",zt=(e=>oe&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Jt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Vt=oe&&window.location.href||"http://localhost",A={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:oe,hasStandardBrowserEnv:zt,hasStandardBrowserWebWorkerEnv:Jt,origin:Vt},Symbol.toStringTag,{value:"Module"})),...Mt};function Gt(e,t){return K(e,new A.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return A.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Kt(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Wt(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function Le(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const u=Number.isFinite(+o),f=i>=n.length;return o=!o&&c.isArray(s)?s.length:o,f?(c.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!u):((!s[o]||!c.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&c.isArray(s[o])&&(s[o]=Wt(s[o])),!u)}if(c.isFormData(e)&&c.isFunction(e.entries)){const n={};return c.forEachEntry(e,(r,s)=>{t(Kt(r),s,n,0)}),n}return null}function Qt(e,t,n){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const j={transitional:Ue,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=c.isObject(t);if(i&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return s?JSON.stringify(Le(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Gt(t,this.formSerializer).toString();if((u=c.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return K(u?{"files[]":t}:t,f&&new f,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Qt(t)):t}],transformResponse:[function(t){const n=this.transitional||j.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(u){if(o)throw u.name==="SyntaxError"?y.from(u,y.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],e=>{j.headers[e]={}});const vt=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Xt=e=>{const t={};let n,r,s;return e&&e.split(`
2
+ `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&vt[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},qe=Symbol("internals");function H(e){return e&&String(e).trim().toLowerCase()}function W(e){return e===!1||e==null?e:c.isArray(e)?e.map(W):String(e)}function Zt(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Yt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ie(e,t,n,r,s){if(c.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!c.isString(t)){if(c.isString(r))return t.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(t)}}function en(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function tn(e,t){const n=c.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let S=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(u,f,l){const a=H(f);if(!a)throw new Error("header name must be a non-empty string");const d=c.findKey(s,a);(!d||s[d]===void 0||l===!0||l===void 0&&s[d]!==!1)&&(s[d||f]=W(u))}const o=(u,f)=>c.forEach(u,(l,a)=>i(l,a,f));if(c.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(c.isString(t)&&(t=t.trim())&&!Yt(t))o(Xt(t),n);else if(c.isHeaders(t))for(const[u,f]of t.entries())i(f,u,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=H(t),t){const r=c.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Zt(s);if(c.isFunction(n))return n.call(this,s,r);if(c.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=H(t),t){const r=c.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ie(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=H(o),o){const u=c.findKey(r,o);u&&(!n||ie(r,r[u],u,n))&&(delete r[u],s=!0)}}return c.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||ie(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return c.forEach(this,(s,i)=>{const o=c.findKey(r,i);if(o){n[o]=W(s),delete n[i];return}const u=t?en(i):String(i).trim();u!==i&&delete n[i],n[u]=W(s),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return c.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&c.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[qe]=this[qe]={accessors:{}}).accessors,s=this.prototype;function i(o){const u=H(o);r[u]||(tn(s,o),r[u]=!0)}return c.isArray(t)?t.forEach(i):i(t),this}};S.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(S.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),c.freezeMethods(S);function ae(e,t){const n=this||j,r=t||n,s=S.from(r.headers);let i=r.data;return c.forEach(e,function(u){i=u.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function _e(e){return!!(e&&e.__CANCEL__)}function q(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}c.inherits(q,y,{__CANCEL__:!0});function $e(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function nn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function rn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(f){const l=Date.now(),a=r[i];o||(o=l),n[s]=f,r[s]=l;let d=i,m=0;for(;d!==s;)m+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o<t)return;const g=a&&l-a;return g?Math.round(m*1e3/g):void 0}}function sn(e,t){let n=0;const r=1e3/t;let s=null;return function(){const o=this===!0,u=Date.now();if(o||u-n>r)return s&&(clearTimeout(s),s=null),n=u,e.apply(null,arguments);s||(s=setTimeout(()=>(s=null,n=Date.now(),e.apply(null,arguments)),r-(u-n)))}}const Q=(e,t,n=3)=>{let r=0;const s=rn(50,250);return sn(i=>{const o=i.loaded,u=i.lengthComputable?i.total:void 0,f=o-r,l=s(f),a=o<=u;r=o;const d={loaded:o,total:u,progress:u?o/u:void 0,bytes:f,rate:l||void 0,estimated:l&&u&&a?(u-o)/l:void 0,event:i,lengthComputable:u!=null};d[t?"download":"upload"]=!0,e(d)},n)},on=A.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(i){let o=i;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(o){const u=c.isString(o)?s(o):o;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}(),an=A.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];c.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),c.isString(r)&&o.push("path="+r),c.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function cn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function un(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function De(e,t){return e&&!cn(t)?un(e,t):t}const Ie=e=>e instanceof S?{...e}:e;function B(e,t){t=t||{};const n={};function r(l,a,d){return c.isPlainObject(l)&&c.isPlainObject(a)?c.merge.call({caseless:d},l,a):c.isPlainObject(a)?c.merge({},a):c.isArray(a)?a.slice():a}function s(l,a,d){if(c.isUndefined(a)){if(!c.isUndefined(l))return r(void 0,l,d)}else return r(l,a,d)}function i(l,a){if(!c.isUndefined(a))return r(void 0,a)}function o(l,a){if(c.isUndefined(a)){if(!c.isUndefined(l))return r(void 0,l)}else return r(void 0,a)}function u(l,a,d){if(d in t)return r(l,a);if(d in e)return r(void 0,l)}const f={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u,headers:(l,a)=>s(Ie(l),Ie(a),!0)};return c.forEach(Object.keys(Object.assign({},e,t)),function(a){const d=f[a]||s,m=d(e[a],t[a],a);c.isUndefined(m)&&d!==u||(n[a]=m)}),n}const je=e=>{const t=B({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:u}=t;t.headers=o=S.from(o),t.url=Be(De(t.baseURL,t.url),e.params,e.paramsSerializer),u&&o.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let f;if(c.isFormData(n)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((f=o.getContentType())!==!1){const[l,...a]=f?f.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...a].join("; "))}}if(A.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(t)),r||r!==!1&&on(t.url))){const l=s&&i&&an.read(i);l&&o.set(s,l)}return t},ln=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=je(e);let i=s.data;const o=S.from(s.headers).normalize();let{responseType:u}=s,f;function l(){s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let a=new XMLHttpRequest;a.open(s.method.toUpperCase(),s.url,!0),a.timeout=s.timeout;function d(){if(!a)return;const g=S.from("getAllResponseHeaders"in a&&a.getAllResponseHeaders()),p={data:!u||u==="text"||u==="json"?a.responseText:a.response,status:a.status,statusText:a.statusText,headers:g,config:e,request:a};$e(function(E){n(E),l()},function(E){r(E),l()},p),a=null}"onloadend"in a?a.onloadend=d:a.onreadystatechange=function(){!a||a.readyState!==4||a.status===0&&!(a.responseURL&&a.responseURL.indexOf("file:")===0)||setTimeout(d)},a.onabort=function(){a&&(r(new y("Request aborted",y.ECONNABORTED,s,a)),a=null)},a.onerror=function(){r(new y("Network Error",y.ERR_NETWORK,s,a)),a=null},a.ontimeout=function(){let h=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const p=s.transitional||Ue;s.timeoutErrorMessage&&(h=s.timeoutErrorMessage),r(new y(h,p.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,s,a)),a=null},i===void 0&&o.setContentType(null),"setRequestHeader"in a&&c.forEach(o.toJSON(),function(h,p){a.setRequestHeader(p,h)}),c.isUndefined(s.withCredentials)||(a.withCredentials=!!s.withCredentials),u&&u!=="json"&&(a.responseType=s.responseType),typeof s.onDownloadProgress=="function"&&a.addEventListener("progress",Q(s.onDownloadProgress,!0)),typeof s.onUploadProgress=="function"&&a.upload&&a.upload.addEventListener("progress",Q(s.onUploadProgress)),(s.cancelToken||s.signal)&&(f=g=>{a&&(r(!g||g.type?new q(null,e,a):g),a.abort(),a=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const m=nn(s.url);if(m&&A.protocols.indexOf(m)===-1){r(new y("Unsupported protocol "+m+":",y.ERR_BAD_REQUEST,e));return}a.send(i||null)})},fn=(e,t)=>{let n=new AbortController,r;const s=function(f){if(!r){r=!0,o();const l=f instanceof Error?f:this.reason;n.abort(l instanceof y?l:new q(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{s(new y(`timeout ${t} of ms exceeded`,y.ETIMEDOUT))},t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(f=>{f&&(f.removeEventListener?f.removeEventListener("abort",s):f.unsubscribe(s))}),e=null)};e.forEach(f=>f&&f.addEventListener&&f.addEventListener("abort",s));const{signal:u}=n;return u.unsubscribe=o,[u,()=>{i&&clearTimeout(i),i=null}]},dn=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},hn=async function*(e,t,n){for await(const r of e)yield*dn(ArrayBuffer.isView(r)?r:await n(String(r)),t)},He=(e,t,n,r,s)=>{const i=hn(e,t,s);let o=0;return new ReadableStream({type:"bytes",async pull(u){const{done:f,value:l}=await i.next();if(f){u.close(),r();return}let a=l.byteLength;n&&n(o+=a),u.enqueue(new Uint8Array(l))},cancel(u){return r(u),i.return()}},{highWaterMark:2})},Me=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},v=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ze=v&&typeof ReadableStream=="function",ce=v&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),pn=ze&&(()=>{let e=!1;const t=new Request(A.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Je=64*1024,ue=ze&&!!(()=>{try{return c.isReadableStream(new Response("").body)}catch{}})(),X={stream:ue&&(e=>e.body)};v&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!X[t]&&(X[t]=c.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new y(`Response type '${t}' is not supported`,y.ERR_NOT_SUPPORT,r)})})})(new Response);const mn=async e=>{if(e==null)return 0;if(c.isBlob(e))return e.size;if(c.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(c.isArrayBufferView(e))return e.byteLength;if(c.isURLSearchParams(e)&&(e=e+""),c.isString(e))return(await ce(e)).byteLength},yn=async(e,t)=>{const n=c.toFiniteNumber(e.getContentLength());return n??mn(t)},le={http:Dt,xhr:ln,fetch:v&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:u,onUploadProgress:f,responseType:l,headers:a,withCredentials:d="same-origin",fetchOptions:m}=je(e);l=l?(l+"").toLowerCase():"text";let[g,h]=s||i||o?fn([s,i],o):[],p,b;const E=()=>{!p&&setTimeout(()=>{g&&g.unsubscribe()}),p=!0};let N;try{if(f&&pn&&n!=="get"&&n!=="head"&&(N=await yn(a,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),_;c.isFormData(r)&&(_=x.headers.get("content-type"))&&a.setContentType(_),x.body&&(r=He(x.body,Je,Me(N,Q(f)),null,ce))}c.isString(d)||(d=d?"cors":"omit"),b=new Request(t,{...m,signal:g,method:n.toUpperCase(),headers:a.normalize().toJSON(),body:r,duplex:"half",withCredentials:d});let w=await fetch(b);const M=ue&&(l==="stream"||l==="response");if(ue&&(u||M)){const x={};["status","statusText","headers"].forEach(et=>{x[et]=w[et]});const _=c.toFiniteNumber(w.headers.get("content-length"));w=new Response(He(w.body,Je,u&&Me(_,Q(u,!0)),M&&E,ce),x)}l=l||"text";let In=await X[c.findKey(X,l)||"text"](w,e);return!M&&E(),h&&h(),await new Promise((x,_)=>{$e(x,_,{data:In,headers:S.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:b})})}catch(w){throw E(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,e,b),{cause:w.cause||w}):y.from(w,w&&w.code,e,b)}})};c.forEach(le,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ve=e=>`- ${e}`,gn=e=>c.isFunction(e)||e===null||e===!1,Ge={getAdapter:e=>{e=c.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i<t;i++){n=e[i];let o;if(r=n,!gn(n)&&(r=le[(o=String(n)).toLowerCase()],r===void 0))throw new y(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([u,f])=>`adapter ${u} `+(f===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
4
4
  `+i.map(Ve).join(`
5
- `):" "+Ve(i[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:le};function fe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new q(null,e)}function Ke(e){return fe(e),e.headers=E.from(e.headers),e.data=ae.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ge.getAdapter(e.adapter||j.adapter)(e).then(function(r){return fe(e),r.data=ae.call(e,e.transformResponse,r),r.headers=E.from(r.headers),r},function(r){return _e(r)||(fe(e),r&&r.response&&(r.response.data=ae.call(e,e.transformResponse,r.response),r.response.headers=E.from(r.response.headers))),Promise.reject(r)})}const Qe="1.7.2",de={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{de[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const We={};de.transitional=function(t,n,r){function s(i,o){return"[Axios v"+Qe+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,u)=>{if(t===!1)throw new m(s(o," has been removed"+(n?" in "+n:"")),m.ERR_DEPRECATED);return n&&!We[o]&&(We[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,u):!0}};function bn(e,t,n){if(typeof e!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const u=e[i],f=u===void 0||o(u,i,e);if(f!==!0)throw new m("option "+i+" must be "+f,m.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new m("Unknown option "+i,m.ERR_BAD_OPTION)}}const he={assertOptions:bn,validators:de},C=he.validators;let F=class{constructor(t){this.defaults=t,this.interceptors={request:new Fe,response:new Fe}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
- `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=B(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&he.assertOptions(r,{silentJSONParsing:C.transitional(C.boolean),forcedJSONParsing:C.transitional(C.boolean),clarifyTimeoutError:C.transitional(C.boolean)},!1),s!=null&&(c.isFunction(s)?n.paramsSerializer={serialize:s}:he.assertOptions(s,{encode:C.function,serialize:C.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&c.merge(i.common,i[n.method]);i&&c.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=E.concat(o,i);const u=[];let f=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(f=f&&p.synchronous,u.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let a,d=0,y;if(!f){const h=[Ke.bind(this),void 0];for(h.unshift.apply(h,u),h.push.apply(h,l),y=h.length,a=Promise.resolve(n);d<y;)a=a.then(h[d++],h[d++]);return a}y=u.length;let g=n;for(d=0;d<y;){const h=u[d++],p=u[d++];try{g=h(g)}catch(T){p.call(this,T);break}}try{a=Ke.call(this,g)}catch(h){return Promise.reject(h)}for(d=0,y=l.length;d<y;)a=a.then(l[d++],l[d++]);return a}getUri(t){t=B(this.defaults,t);const n=De(t.baseURL,t.url);return Be(n,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){F.prototype[t]=function(n,r){return this.request(B(r||{},{method:t,url:n,data:(r||{}).data}))}}),c.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,u){return this.request(B(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}F.prototype[t]=n(),F.prototype[t+"Form"]=n(!0)});let wn=class tt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(u=>{r.subscribe(u),i=u}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,u){r.reason||(r.reason=new q(i,o,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new tt(function(s){t=s}),cancel:t}}};function Tn(e){return function(n){return e.apply(null,n)}}function Sn(e){return c.isObject(e)&&e.isAxiosError===!0}const pe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(pe).forEach(([e,t])=>{pe[t]=e});function ve(e){const t=new F(e),n=L(F.prototype.request,t);return c.extend(n,F.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ve(B(e,s))},n}const w=ve(j);w.Axios=F,w.CanceledError=q,w.CancelToken=wn,w.isCancel=_e,w.VERSION=Qe,w.toFormData=K,w.AxiosError=m,w.Cancel=w.CanceledError,w.all=function(t){return Promise.all(t)},w.spread=Tn,w.isAxiosError=Sn,w.mergeConfig=B,w.AxiosHeaders=E,w.formToJSON=e=>Ue(c.isHTMLForm(e)?new FormData(e):e),w.getAdapter=Ge.getAdapter,w.HttpStatusCode=pe,w.default=w;const{Axios:Kn,AxiosError:En,CanceledError:Qn,isCancel:Wn,CancelToken:vn,VERSION:Xn,all:Zn,Cancel:Yn,isAxiosError:er,spread:tr,toFormData:nr,AxiosHeaders:Xe,HttpStatusCode:rr,formToJSON:sr,getAdapter:or,mergeConfig:ir}=w,Z=()=>new En("Unauthorized","ERR_UNAUTHORIZED",{headers:new Xe},null,{status:401,data:null,statusText:"UNAUTHORIZED",headers:{},config:{headers:new Xe}}),Rn=e=>{let t=!1;const n=[],r=()=>localStorage.getItem("accessToken"),s=()=>localStorage.getItem("refreshToken"),i=a=>{localStorage.setItem("accessToken",a.accessToken),localStorage.setItem("refreshToken",a.refreshToken)},o=()=>{localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken")},u=(a,d=null)=>{n.forEach(y=>{a?y.reject(a):(y.requestConfig.headers||(y.requestConfig.headers={}),y.requestConfig.headers.Authorization=`Bearer ${d}`,y.resolve(y.requestConfig))}),n.length=0};return{getAccessToken:r,setTokens:i,clearTokens:o,handleTokenRefresh:async a=>{var h;if((h=a.url)==null?void 0:h.includes(e.refreshTokenEndpointPath)){o();const p=Z();throw u(p),p}if(!r()){o();const p=Z();throw u(p),p}if(t)return new Promise((p,T)=>{n.push({resolve:p,reject:T,requestConfig:a})});const g=s();if(!g){o();const p=Z();throw u(p),p}t=!0;try{const p=await e.onRefreshToken(g);return i(p),a.headers||(a.headers={}),a.headers.Authorization=`Bearer ${p.accessToken}`,u(null,p.accessToken),t=!1,a}catch{o();const T=Z();throw u(T),t=!1,T}},isAuthError:a=>{var d;return((d=a==null?void 0:a.response)==null?void 0:d.status)===401}}},P=e=>{const t=w.create(),n=e.apiVersion,r=e.productCode,s=e.baseUrl,i=e.refreshTokenEndpointPath||"/refresh-token",o=Rn({baseUrl:s||"",apiVersion:n,refreshTokenEndpointPath:i,onRefreshToken:async f=>(await t.post(`${s}/auth/${n}${i}`,{refreshToken:f})).data});return t.interceptors.response.use(f=>f,async f=>{const l=f.config;if(!o.isAuthError(f)||l._retry)return Promise.reject(f);l._retry=!0;try{const a=await o.handleTokenRefresh(l);return t(a)}catch(a){return Promise.reject(a)}}),e.responseInterceptor&&t.interceptors.response.use(e.responseInterceptor.onFulfilled,e.responseInterceptor.onReject),{request:async(f,l)=>{const a=`${s}/${r}/${n}${f}`,d={"Content-Type":(l==null?void 0:l.contentType)||"application/json",apiVersion:n,Authorization:"",...e.headers??{}},y=o.getAccessToken();y&&(d.Authorization=`Bearer ${y}`);const g={method:(l==null?void 0:l.method)||"GET",headers:d,url:a,data:l==null?void 0:l.data,responseType:l==null?void 0:l.responseType};return await t.request(g)},getAccessToken:o.getAccessToken,setTokens:o.setTokens,clearTokens:o.clearTokens}},On="cep";function An(e){const t=P(e);function n(r){return t.request(`/${On}`,{method:"POST",data:JSON.stringify(r)})}return{getAddress:n}}const Ze="auth",Pn=e=>{const t=P(e);return{postLogin:async s=>{var o;const i=await t.request(`/${Ze}/login`,{method:"POST",data:JSON.stringify(s)});return i.status===200&&((o=i.data)!=null&&o.accessToken)&&localStorage.setItem("accessToken",i.data.accessToken),i},getToken:async s=>await t.request(`/${Ze}?code=${s}`,{method:"GET",data:""})}},Nn=e=>{const t=P(e);return{signUp:async i=>await t.request("/sign-up",{method:"POST",data:JSON.stringify(i)}),signIn:async i=>{var u,f;const o=await t.request("/sign-in",{method:"POST",data:JSON.stringify(i)});return o.status===200&&((u=o.data)!=null&&u.accessToken)&&((f=o.data)!=null&&f.refreshToken)&&t.setTokens(o.data),o},getProfile:async()=>await t.request("/me",{method:"GET",data:""})}},Ye="digital",Cn=e=>{const t=P(e);return{getBroker:()=>t.request(`/${Ye}/getBroker`,{method:"GET",data:""}),getAllBrokerages:s=>t.request(`/${Ye}/getAllBrokerages?name=${s}`,{method:"GET",data:""})}},kn="data",xn=e=>{const t=P(e);return{postData:async r=>await t.request(`/${kn}`,{method:"POST",data:JSON.stringify(r)})}},me="payment",Bn=e=>{const t=P(e);return{postPayment:i=>t.request(`/${me}`,{method:"POST",data:JSON.stringify(i)}),getPaymentStatus:i=>t.request(`/${me}/status?policyId=${i.policyId}`,{method:"GET",data:""}),getPaymentSummary:i=>t.request(`/${me}/summary?policyId=${i.policyId}`,{method:"GET",data:""})}},Y="product/action",Fn=e=>{const t=P(e);return{getCnpjStatus:o=>t.request(`/${Y}/Custom/CnpjCheck?cnpj=${o}`,{method:"GET",data:""}),getKeyNumber:()=>t.request(`/${Y}/Custom/GetKeyNumber`,{method:"GET",data:""}),getProposalNumberByKeyNumber:o=>t.request(`/${Y}/Custom/GetProposalNoByKeyNumber?keyNumber=${o.keyNumber}`,{method:"GET",data:""}),postCoveragesAndClausesRules:o=>t.request(`/${Y}/Custom/LoadRules`,{method:"POST",data:JSON.stringify(o)})}},k="quotation",Ln=e=>{const t=P(e);return{getQuotations:a=>{const d=new URLSearchParams({...a});return t.request(`/${k}/query?${d.toString()}`,{method:"GET",data:""})},getQuotationDetail:a=>{const d=new URLSearchParams({id:a.policyId});return t.request(`/${k}?${d.toString()}`,{method:"GET",data:""})},postQuickQuote:a=>t.request(`/${k}/QuickQuote`,{method:"POST",data:JSON.stringify(a)}),postFullQuote:a=>t.request(`/${k}/FullQuote`,{method:"POST",data:JSON.stringify(a)}),postBind:a=>t.request(`/${k}/Bind`,{method:"POST",data:JSON.stringify(a)}),getQuotation:a=>t.request(`/${k}?id=${a.policyId}`,{method:"GET",data:""}),getVersions:a=>t.request(`/${k}/versions?policyId=${a.policyId}`,{method:"GET",data:""}),switchSelectedVersion:a=>t.request(`/${k}/switchSelectedVersion?policyId=${a.policyId}&quotationVersionId=${a.quotationVersionId}`,{method:"POST",data:JSON.stringify(a)})}},Un="report",qn=e=>{const t=P(e);return{getReportStream:r=>{const s=new URLSearchParams({policyId:r.policyId,documentType:r.documentType||"certificate",...r.additionalParams});return t.request(`/${Un}/generate-stream?${s.toString()}`,{method:"GET",data:"",responseType:"blob"})}}},_n="SubscriberData",$n=e=>{const t=P(e);return{getSubscriber:r=>t.request(`/${_n}/get-subscriber-data?cnpj=${r}`,{method:"GET",data:""})}};function Dn(e){const t=Pn(e),n=Nn(e),r=xn(e),s=Ln(e),i=Bn(e),o=An(e),u=Cn(e),f=Fn(e),l=qn(e),a=$n(e);return{auth:t,authAkad:n,data:r,quotation:s,payment:i,address:o,broker:u,plugin:f,report:l,subscriber:a}}return Dn});
5
+ `):" "+Ve(i[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:le};function fe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new q(null,e)}function Ke(e){return fe(e),e.headers=S.from(e.headers),e.data=ae.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ge.getAdapter(e.adapter||j.adapter)(e).then(function(r){return fe(e),r.data=ae.call(e,e.transformResponse,r),r.headers=S.from(r.headers),r},function(r){return _e(r)||(fe(e),r&&r.response&&(r.response.data=ae.call(e,e.transformResponse,r.response),r.response.headers=S.from(r.response.headers))),Promise.reject(r)})}const We="1.7.2",de={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{de[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Qe={};de.transitional=function(t,n,r){function s(i,o){return"[Axios v"+We+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,u)=>{if(t===!1)throw new y(s(o," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!Qe[o]&&(Qe[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,u):!0}};function bn(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const u=e[i],f=u===void 0||o(u,i,e);if(f!==!0)throw new y("option "+i+" must be "+f,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+i,y.ERR_BAD_OPTION)}}const he={assertOptions:bn,validators:de},C=he.validators;let F=class{constructor(t){this.defaults=t,this.interceptors={request:new Fe,response:new Fe}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
+ `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=B(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&he.assertOptions(r,{silentJSONParsing:C.transitional(C.boolean),forcedJSONParsing:C.transitional(C.boolean),clarifyTimeoutError:C.transitional(C.boolean)},!1),s!=null&&(c.isFunction(s)?n.paramsSerializer={serialize:s}:he.assertOptions(s,{encode:C.function,serialize:C.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&c.merge(i.common,i[n.method]);i&&c.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=S.concat(o,i);const u=[];let f=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(f=f&&p.synchronous,u.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let a,d=0,m;if(!f){const h=[Ke.bind(this),void 0];for(h.unshift.apply(h,u),h.push.apply(h,l),m=h.length,a=Promise.resolve(n);d<m;)a=a.then(h[d++],h[d++]);return a}m=u.length;let g=n;for(d=0;d<m;){const h=u[d++],p=u[d++];try{g=h(g)}catch(b){p.call(this,b);break}}try{a=Ke.call(this,g)}catch(h){return Promise.reject(h)}for(d=0,m=l.length;d<m;)a=a.then(l[d++],l[d++]);return a}getUri(t){t=B(this.defaults,t);const n=De(t.baseURL,t.url);return Be(n,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){F.prototype[t]=function(n,r){return this.request(B(r||{},{method:t,url:n,data:(r||{}).data}))}}),c.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,u){return this.request(B(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}F.prototype[t]=n(),F.prototype[t+"Form"]=n(!0)});let wn=class tt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(u=>{r.subscribe(u),i=u}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,u){r.reason||(r.reason=new q(i,o,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new tt(function(s){t=s}),cancel:t}}};function Tn(e){return function(n){return e.apply(null,n)}}function En(e){return c.isObject(e)&&e.isAxiosError===!0}const pe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(pe).forEach(([e,t])=>{pe[t]=e});function ve(e){const t=new F(e),n=U(F.prototype.request,t);return c.extend(n,F.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ve(B(e,s))},n}const T=ve(j);T.Axios=F,T.CanceledError=q,T.CancelToken=wn,T.isCancel=_e,T.VERSION=We,T.toFormData=K,T.AxiosError=y,T.Cancel=T.CanceledError,T.all=function(t){return Promise.all(t)},T.spread=Tn,T.isAxiosError=En,T.mergeConfig=B,T.AxiosHeaders=S,T.formToJSON=e=>Le(c.isHTMLForm(e)?new FormData(e):e),T.getAdapter=Ge.getAdapter,T.HttpStatusCode=pe,T.default=T;const{Axios:Kn,AxiosError:Sn,CanceledError:Wn,isCancel:Qn,CancelToken:vn,VERSION:Xn,all:Zn,Cancel:Yn,isAxiosError:er,spread:tr,toFormData:nr,AxiosHeaders:Xe,HttpStatusCode:rr,formToJSON:sr,getAdapter:or,mergeConfig:ir}=T,Z=()=>new Sn("Unauthorized","ERR_UNAUTHORIZED",{headers:new Xe},null,{status:401,data:null,statusText:"UNAUTHORIZED",headers:{},config:{headers:new Xe}}),Rn=e=>{let t=!1;const n=[],r=()=>localStorage.getItem("accessToken"),s=()=>localStorage.getItem("refreshToken"),i=a=>{localStorage.setItem("accessToken",a.accessToken),localStorage.setItem("refreshToken",a.refreshToken)},o=()=>{localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken")},u=(a,d=null)=>{n.forEach(m=>{a?m.reject(a):(m.requestConfig.headers||(m.requestConfig.headers={}),m.requestConfig.headers.Authorization=`Bearer ${d}`,m.resolve(m.requestConfig))}),n.length=0};return{getAccessToken:r,setTokens:i,clearTokens:o,handleTokenRefresh:async a=>{var h;if((h=a.url)==null?void 0:h.includes(e.refreshTokenEndpointPath)){o();const p=Z();throw u(p),p}if(!r()){o();const p=Z();throw u(p),p}if(t)return new Promise((p,b)=>{n.push({resolve:p,reject:b,requestConfig:a})});const g=s();if(!g){o();const p=Z();throw u(p),p}t=!0;try{const p=await e.onRefreshToken(g);return i(p),a.headers||(a.headers={}),a.headers.Authorization=`Bearer ${p.accessToken}`,u(null,p.accessToken),t=!1,a}catch{o();const b=Z();throw u(b),t=!1,b}},isAuthError:a=>{var d;return((d=a==null?void 0:a.response)==null?void 0:d.status)===401}}},P=e=>{const t=T.create(),n=e.apiVersion,r=e.productCode,s=e.baseUrl,i=s?s.replace(/\/$/,""):"",o=e.refreshTokenApiVersion||n,u=e.refreshTokenEndpointPath||"/refresh-token",f=`${i}/auth/${o}${u}`,l=Rn({baseUrl:s||"",apiVersion:n,refreshTokenEndpointPath:u,onRefreshToken:async d=>(await t.post(f,{refreshToken:d})).data});return t.interceptors.response.use(d=>d,async d=>{const m=d.config;if(!l.isAuthError(d)||m._retry)return Promise.reject(d);m._retry=!0;try{const g=await l.handleTokenRefresh(m);return t.request(g)}catch(g){return Promise.reject(g)}}),e.responseInterceptor&&t.interceptors.response.use(e.responseInterceptor.onFulfilled,e.responseInterceptor.onReject),{request:async(d,m)=>{const g=d.startsWith("/")?d.substring(1):d,h=`${i}/${r}/${n}/${g}`,p={"Content-Type":(m==null?void 0:m.contentType)||"application/json",apiVersion:n,Authorization:"",...e.headers??{}},b=l.getAccessToken();b&&(p.Authorization=`Bearer ${b}`);const E={method:(m==null?void 0:m.method)||"GET",headers:p,url:h,data:m==null?void 0:m.data,responseType:m==null?void 0:m.responseType};return await t.request(E)},getAccessToken:l.getAccessToken,setTokens:l.setTokens,clearTokens:l.clearTokens}},On="cep";function An(e){const t=P(e);function n(r){return t.request(`/${On}`,{method:"POST",data:JSON.stringify(r)})}return{getAddress:n}}const Ze="auth",Pn=e=>{const t=P(e);return{postLogin:async s=>{var o;const i=await t.request(`/${Ze}/login`,{method:"POST",data:JSON.stringify(s)});return i.status===200&&((o=i.data)!=null&&o.accessToken)&&localStorage.setItem("accessToken",i.data.accessToken),i},getToken:async s=>await t.request(`/${Ze}?code=${s}`,{method:"GET",data:""})}},Nn=e=>{const t=P(e);return{signUp:async i=>await t.request("/sign-up",{method:"POST",data:JSON.stringify(i)}),signIn:async i=>{var u,f;const o=await t.request("/sign-in",{method:"POST",data:JSON.stringify(i)});return o.status===200&&((u=o.data)!=null&&u.accessToken)&&((f=o.data)!=null&&f.refreshToken)&&t.setTokens(o.data),o},getProfile:async()=>await t.request("/me",{method:"GET",data:""})}},Ye="digital",Cn=e=>{const t=P(e);return{getBroker:()=>t.request(`/${Ye}/getBroker`,{method:"GET",data:""}),getAllBrokerages:s=>t.request(`/${Ye}/getAllBrokerages?name=${s}`,{method:"GET",data:""})}},kn="data",xn=e=>{const t=P(e);return{postData:async r=>await t.request(`/${kn}`,{method:"POST",data:JSON.stringify(r)})}},me="payment",Bn=e=>{const t=P(e);return{postPayment:i=>t.request(`/${me}`,{method:"POST",data:JSON.stringify(i)}),getPaymentStatus:i=>t.request(`/${me}/status?policyId=${i.policyId}`,{method:"GET",data:""}),getPaymentSummary:i=>t.request(`/${me}/summary?policyId=${i.policyId}`,{method:"GET",data:""})}},Y="product/action",Fn=e=>{const t=P(e);return{getCnpjStatus:o=>t.request(`/${Y}/Custom/CnpjCheck?cnpj=${o}`,{method:"GET",data:""}),getKeyNumber:()=>t.request(`/${Y}/Custom/GetKeyNumber`,{method:"GET",data:""}),getProposalNumberByKeyNumber:o=>t.request(`/${Y}/Custom/GetProposalNoByKeyNumber?keyNumber=${o.keyNumber}`,{method:"GET",data:""}),postCoveragesAndClausesRules:o=>t.request(`/${Y}/Custom/LoadRules`,{method:"POST",data:JSON.stringify(o)})}},k="quotation",Un=e=>{const t=P(e);return{getQuotations:a=>{const d=new URLSearchParams({...a});return t.request(`/${k}/query?${d.toString()}`,{method:"GET",data:""})},getQuotationDetail:a=>{const d=new URLSearchParams({id:a.policyId});return t.request(`/${k}?${d.toString()}`,{method:"GET",data:""})},postQuickQuote:a=>t.request(`/${k}/QuickQuote`,{method:"POST",data:JSON.stringify(a)}),postFullQuote:a=>t.request(`/${k}/FullQuote`,{method:"POST",data:JSON.stringify(a)}),postBind:a=>t.request(`/${k}/Bind`,{method:"POST",data:JSON.stringify(a)}),getQuotation:a=>t.request(`/${k}?id=${a.policyId}`,{method:"GET",data:""}),getVersions:a=>t.request(`/${k}/versions?policyId=${a.policyId}`,{method:"GET",data:""}),switchSelectedVersion:a=>t.request(`/${k}/switchSelectedVersion?policyId=${a.policyId}&quotationVersionId=${a.quotationVersionId}`,{method:"POST",data:JSON.stringify(a)})}},Ln="report",qn=e=>{const t=P(e);return{getReportStream:r=>{const s=new URLSearchParams({policyId:r.policyId,documentType:r.documentType||"certificate",...r.additionalParams});return t.request(`/${Ln}/generate-stream?${s.toString()}`,{method:"GET",data:"",responseType:"blob"})}}},_n="SubscriberData",$n=e=>{const t=P(e);return{getSubscriber:r=>t.request(`/${_n}/get-subscriber-data?cnpj=${r}`,{method:"GET",data:""})}};function Dn(e){const t=Pn(e),n=Nn(e),r=xn(e),s=Un(e),i=Bn(e),o=An(e),u=Cn(e),f=Fn(e),l=qn(e),a=$n(e);return{auth:t,authAkad:n,data:r,quotation:s,payment:i,address:o,broker:u,plugin:f,report:l,subscriber:a}}return Dn});