@akad/sdk 1.0.18 → 1.0.20

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/ts-lib.js CHANGED
@@ -6,30 +6,30 @@ 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), v = (e) => (t) => typeof t === e, { isArray: U } = Array, $ = v("undefined");
9
+ })(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => K(t) === e), v = (e) => (t) => typeof t === e, { isArray: q } = Array, $ = v("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
  }
13
- const qe = A("ArrayBuffer");
13
+ const Fe = P("ArrayBuffer");
14
14
  function st(e) {
15
15
  let t;
16
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && qe(e.buffer), t;
16
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Fe(e.buffer), t;
17
17
  }
18
- const ot = v("string"), R = v("function"), Fe = v("number"), W = (e) => e !== null && typeof e == "object", it = (e) => e === !0 || e === !1, M = (e) => {
18
+ const ot = v("string"), R = v("function"), Ue = v("number"), W = (e) => e !== null && typeof e == "object", it = (e) => e === !0 || e === !1, M = (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 = P("Date"), ct = P("File"), ut = P("Blob"), lt = P("FileList"), ft = (e) => W(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]"));
27
- }, ht = A("URLSearchParams"), [pt, mt, yt, gt] = ["ReadableStream", "Request", "Response", "Headers"].map(A), wt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
27
+ }, ht = P("URLSearchParams"), [pt, mt, yt, gt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), wt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
28
28
  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 = o[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;
@@ -51,8 +51,8 @@ function Ue(e, t) {
51
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 o = e && Ue(t, s) || s;
55
- M(t[o]) && M(r) ? t[o] = re(t[o], r) : M(r) ? t[o] = re({}, r) : U(r) ? t[o] = r.slice() : t[o] = r;
54
+ const o = e && qe(t, s) || s;
55
+ M(t[o]) && M(r) ? t[o] = re(t[o], r) : M(r) ? t[o] = re({}, r) : q(r) ? t[o] = r.slice() : t[o] = 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 bt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
62
62
  n && R(s) ? e[o] = Be(s, n) : e[o] = s;
63
- }, { allOwnKeys: r }), e), Tt = (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
- }, Et = (e, t, n, r) => {
67
+ }, St = (e, t, n, r) => {
68
68
  let s, o, i;
69
69
  const u = {};
70
70
  if (t = t || {}, e == null)
@@ -82,10 +82,10 @@ const bt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
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 (!Fe(t))
88
+ if (!Ue(t))
89
89
  return null;
90
90
  const n = new Array(t);
91
91
  for (; t-- > 0; )
@@ -104,12 +104,12 @@ const bt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
104
104
  for (; (n = e.exec(t)) !== null; )
105
105
  r.push(n);
106
106
  return r;
107
- }, Ct = A("HTMLFormElement"), kt = (e) => e.toLowerCase().replace(
107
+ }, kt = P("HTMLFormElement"), Ct = (e) => e.toLowerCase().replace(
108
108
  /[-_\s]([a-z\d])(\w*)/g,
109
109
  function(n, r, s) {
110
110
  return r.toUpperCase() + s;
111
111
  }
112
- ), me = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), xt = A("RegExp"), De = (e, t) => {
112
+ ), me = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), xt = P("RegExp"), De = (e, t) => {
113
113
  const n = Object.getOwnPropertyDescriptors(e), r = {};
114
114
  I(n, (s, o) => {
115
115
  let i;
@@ -130,15 +130,15 @@ const bt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
130
130
  });
131
131
  }
132
132
  });
133
- }, qt = (e, t) => {
133
+ }, Ft = (e, t) => {
134
134
  const n = {}, r = (s) => {
135
135
  s.forEach((o) => {
136
136
  n[o] = !0;
137
137
  });
138
138
  };
139
- return U(e) ? r(e) : r(String(e).split(t)), n;
140
- }, Ft = () => {
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
@@ -159,7 +159,7 @@ const Dt = (e) => {
159
159
  return;
160
160
  if (!("toJSON" in r)) {
161
161
  t[s] = r;
162
- const o = U(r) ? [] : {};
162
+ const o = q(r) ? [] : {};
163
163
  return I(r, (i, u) => {
164
164
  const f = n(i, s + 1);
165
165
  !$(f) && (o[u] = f);
@@ -169,14 +169,14 @@ 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,
174
- isArrayBuffer: qe,
172
+ }, $t = P("AsyncFunction"), It = (e) => e && (W(e) || R(e)) && R(e.then) && R(e.catch), c = {
173
+ isArray: q,
174
+ isArrayBuffer: Fe,
175
175
  isBuffer: rt,
176
176
  isFormData: dt,
177
177
  isArrayBufferView: st,
178
178
  isString: ot,
179
- isNumber: Fe,
179
+ isNumber: Ue,
180
180
  isBoolean: it,
181
181
  isObject: W,
182
182
  isPlainObject: M,
@@ -199,25 +199,25 @@ const Dt = (e) => {
199
199
  extend: bt,
200
200
  trim: wt,
201
201
  stripBOM: Tt,
202
- inherits: St,
203
- toFlatObject: Et,
202
+ inherits: Et,
203
+ toFlatObject: St,
204
204
  kindOf: K,
205
- kindOfTest: A,
205
+ kindOfTest: P,
206
206
  endsWith: Rt,
207
207
  toArray: Ot,
208
208
  forEachEntry: Pt,
209
209
  matchAll: Nt,
210
- isHTMLForm: Ct,
210
+ isHTMLForm: kt,
211
211
  hasOwnProperty: me,
212
212
  hasOwnProp: me,
213
213
  // an alias to avoid ESLint no-prototype-builtins detection
214
214
  reduceDescriptors: De,
215
215
  freezeMethods: Bt,
216
- toObjectSet: qt,
217
- toCamelCase: kt,
218
- noop: Ft,
219
- toFiniteNumber: Ut,
220
- findKey: Ue,
216
+ toObjectSet: Ft,
217
+ toCamelCase: Ct,
218
+ noop: Ut,
219
+ toFiniteNumber: qt,
220
+ findKey: qe,
221
221
  global: Le,
222
222
  isContextDefined: _e,
223
223
  ALPHABET: $e,
@@ -318,12 +318,12 @@ function Q(e, t, n) {
318
318
  return c.isArrayBuffer(h) || c.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
319
319
  }
320
320
  function a(h, p, w) {
321
- let S = h;
321
+ let E = h;
322
322
  if (h && !w && 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, _) {
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(b, _) {
327
327
  !(c.isUndefined(b) || b === null) && t.append(
328
328
  // eslint-disable-next-line no-nested-ternary
329
329
  i === !0 ? ge([p], _, o) : i === null ? p : p + "[]",
@@ -342,14 +342,14 @@ function Q(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
351
  m
352
- )) === !0 && g(S, p ? p.concat(N) : [N]);
352
+ )) === !0 && g(E, p ? p.concat(N) : [N]);
353
353
  }), d.pop();
354
354
  }
355
355
  }
@@ -473,14 +473,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Qt
473
473
  hasStandardBrowserEnv: vt,
474
474
  hasStandardBrowserWebWorkerEnv: Wt,
475
475
  origin: Qt
476
- }, Symbol.toStringTag, { value: "Module" })), O = {
476
+ }, Symbol.toStringTag, { value: "Module" })), A = {
477
477
  ...Xt,
478
478
  ...Kt
479
479
  };
480
480
  function Zt(e, t) {
481
- return Q(e, new O.classes.URLSearchParams(), Object.assign({
481
+ return Q(e, new A.classes.URLSearchParams(), Object.assign({
482
482
  visitor: function(n, r, s, o) {
483
- return O.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
483
+ return A.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
484
484
  }
485
485
  }, t));
486
486
  }
@@ -575,8 +575,8 @@ const j = {
575
575
  maxContentLength: -1,
576
576
  maxBodyLength: -1,
577
577
  env: {
578
- FormData: O.classes.FormData,
579
- Blob: O.classes.Blob
578
+ FormData: A.classes.FormData,
579
+ Blob: A.classes.Blob
580
580
  },
581
581
  validateStatus: function(t) {
582
582
  return t >= 200 && t < 300;
@@ -655,7 +655,7 @@ function cn(e, t) {
655
655
  });
656
656
  });
657
657
  }
658
- let E = class {
658
+ let S = class {
659
659
  constructor(t) {
660
660
  t && this.set(t);
661
661
  }
@@ -773,8 +773,8 @@ let E = class {
773
773
  return c.isArray(t) ? t.forEach(o) : o(t), this;
774
774
  }
775
775
  };
776
- E.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
777
- c.reduceDescriptors(E.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(E.prototype, ({ value: e }, t) => {
783
783
  }
784
784
  };
785
785
  });
786
- c.freezeMethods(E);
786
+ c.freezeMethods(S);
787
787
  function ee(e, t) {
788
- const n = this || j, r = t || n, s = E.from(r.headers);
788
+ const n = this || j, r = t || n, s = S.from(r.headers);
789
789
  let o = r.data;
790
790
  return c.forEach(e, function(u) {
791
791
  o = u.call(n, o, s.normalize(), t ? t.status : void 0);
@@ -859,7 +859,7 @@ const V = (e, t, n = 3) => {
859
859
  };
860
860
  d[t ? "download" : "upload"] = !0, e(d);
861
861
  }, n);
862
- }, dn = O.hasStandardBrowserEnv ? (
862
+ }, dn = A.hasStandardBrowserEnv ? (
863
863
  // Standard browser envs have full support of the APIs needed to test
864
864
  // whether the request URL is of the same origin as current location.
865
865
  function() {
@@ -890,7 +890,7 @@ const V = (e, t, n = 3) => {
890
890
  return !0;
891
891
  };
892
892
  }()
893
- ), hn = O.hasStandardBrowserEnv ? (
893
+ ), hn = A.hasStandardBrowserEnv ? (
894
894
  // Standard browser envs support document.cookie
895
895
  {
896
896
  write(e, t, n, r, s, o) {
@@ -926,8 +926,8 @@ function mn(e, t) {
926
926
  function ve(e, t) {
927
927
  return e && !pn(t) ? mn(e, t) : t;
928
928
  }
929
- const Se = (e) => e instanceof E ? { ...e } : e;
930
- function q(e, t) {
929
+ const Ee = (e) => e instanceof S ? { ...e } : e;
930
+ function F(e, t) {
931
931
  t = t || {};
932
932
  const n = {};
933
933
  function r(l, a, d) {
@@ -986,7 +986,7 @@ function q(e, t) {
986
986
  socketPath: i,
987
987
  responseEncoding: i,
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
992
  const d = f[a] || s, m = d(e[a], t[a], a);
@@ -994,22 +994,22 @@ function q(e, t) {
994
994
  }), n;
995
995
  }
996
996
  const We = (e) => {
997
- const t = q({}, e);
997
+ const t = F({}, e);
998
998
  let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: u } = t;
999
- t.headers = i = E.from(i), t.url = Me(ve(t.baseURL, t.url), e.params, e.paramsSerializer), u && i.set(
999
+ t.headers = i = S.from(i), t.url = Me(ve(t.baseURL, t.url), e.params, e.paramsSerializer), u && i.set(
1000
1000
  "Authorization",
1001
1001
  "Basic " + btoa((u.username || "") + ":" + (u.password ? unescape(encodeURIComponent(u.password)) : ""))
1002
1002
  );
1003
1003
  let f;
1004
1004
  if (c.isFormData(n)) {
1005
- if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
1005
+ if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
1006
1006
  i.setContentType(void 0);
1007
1007
  else if ((f = i.getContentType()) !== !1) {
1008
1008
  const [l, ...a] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
1009
1009
  i.setContentType([l || "multipart/form-data", ...a].join("; "));
1010
1010
  }
1011
1011
  }
1012
- if (O.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && dn(t.url))) {
1012
+ if (A.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && dn(t.url))) {
1013
1013
  const l = s && o && hn.read(o);
1014
1014
  l && i.set(s, l);
1015
1015
  }
@@ -1018,7 +1018,7 @@ const We = (e) => {
1018
1018
  return new Promise(function(n, r) {
1019
1019
  const s = We(e);
1020
1020
  let o = s.data;
1021
- const i = E.from(s.headers).normalize();
1021
+ const i = 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 = E.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,10 +1038,10 @@ 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() {
@@ -1065,7 +1065,7 @@ const We = (e) => {
1065
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
1067
  const m = un(s.url);
1068
- if (m && O.protocols.indexOf(m) === -1) {
1068
+ if (m && A.protocols.indexOf(m) === -1) {
1069
1069
  r(new y("Unsupported protocol " + m + ":", y.ERR_BAD_REQUEST, e));
1070
1070
  return;
1071
1071
  }
@@ -1105,7 +1105,7 @@ const We = (e) => {
1105
1105
  }, Tn = async function* (e, t, n) {
1106
1106
  for await (const r of e)
1107
1107
  yield* bn(ArrayBuffer.isView(r) ? r : await n(String(r)), t);
1108
- }, Ee = (e, t, n, r, s) => {
1108
+ }, Se = (e, t, n, r, s) => {
1109
1109
  const o = Tn(e, t, s);
1110
1110
  let i = 0;
1111
1111
  return new ReadableStream({
@@ -1132,9 +1132,9 @@ const We = (e) => {
1132
1132
  total: e,
1133
1133
  loaded: r
1134
1134
  }));
1135
- }, X = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Qe = 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 = Qe && (() => {
1135
+ }, X = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Qe = 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 = Qe && (() => {
1136
1136
  let e = !1;
1137
- const t = new Request(O.origin, {
1137
+ const t = new Request(A.origin, {
1138
1138
  body: new ReadableStream(),
1139
1139
  method: "POST",
1140
1140
  get duplex() {
@@ -1157,7 +1157,7 @@ X && ((e) => {
1157
1157
  });
1158
1158
  });
1159
1159
  })(new Response());
1160
- const En = 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 En = 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 ?? En(t);
1173
+ return n ?? Sn(t);
1174
1174
  }, On = X && (async (e) => {
1175
1175
  let {
1176
1176
  url: t,
@@ -1188,20 +1188,20 @@ const En = async (e) => {
1188
1188
  } = We(e);
1189
1189
  l = l ? (l + "").toLowerCase() : "text";
1190
1190
  let [g, h] = s || o || i ? wn([s, o], i) : [], p, w;
1191
- const S = () => {
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) {
1199
- let C = new Request(t, {
1198
+ if (f && En && n !== "get" && n !== "head" && (N = await Rn(a, r)) !== 0) {
1199
+ let k = new Request(t, {
1200
1200
  method: "POST",
1201
1201
  body: r,
1202
1202
  duplex: "half"
1203
- }), F;
1204
- c.isFormData(r) && (F = C.headers.get("content-type")) && a.setContentType(F), C.body && (r = Ee(C.body, Oe, Re(
1203
+ }), U;
1204
+ c.isFormData(r) && (U = k.headers.get("content-type")) && a.setContentType(U), k.body && (r = Se(k.body, Oe, Re(
1205
1205
  N,
1206
1206
  V(f)
1207
1207
  ), null, oe));
@@ -1218,25 +1218,25 @@ const En = async (e) => {
1218
1218
  let b = await fetch(w);
1219
1219
  const _ = ie && (l === "stream" || l === "response");
1220
1220
  if (ie && (u || _)) {
1221
- const C = {};
1221
+ const k = {};
1222
1222
  ["status", "statusText", "headers"].forEach((pe) => {
1223
- C[pe] = b[pe];
1223
+ k[pe] = b[pe];
1224
1224
  });
1225
- const F = c.toFiniteNumber(b.headers.get("content-length"));
1225
+ const U = c.toFiniteNumber(b.headers.get("content-length"));
1226
1226
  b = new Response(
1227
- Ee(b.body, Oe, u && Re(
1228
- F,
1227
+ Se(b.body, Oe, u && Re(
1228
+ U,
1229
1229
  V(u, !0)
1230
- ), _ && S, oe),
1231
- C
1230
+ ), _ && E, oe),
1231
+ k
1232
1232
  );
1233
1233
  }
1234
1234
  l = l || "text";
1235
1235
  let tt = await G[c.findKey(G, l) || "text"](b, e);
1236
- return !_ && S(), h && h(), await new Promise((C, F) => {
1237
- Ke(C, F, {
1236
+ return !_ && E(), h && h(), await new Promise((k, U) => {
1237
+ Ke(k, U, {
1238
1238
  data: tt,
1239
- headers: E.from(b.headers),
1239
+ headers: S.from(b.headers),
1240
1240
  status: b.status,
1241
1241
  statusText: b.statusText,
1242
1242
  config: e,
@@ -1244,7 +1244,7 @@ const En = async (e) => {
1244
1244
  });
1245
1245
  });
1246
1246
  } catch (b) {
1247
- throw S(), b && b.name === "TypeError" && /fetch/i.test(b.message) ? Object.assign(
1247
+ throw E(), b && b.name === "TypeError" && /fetch/i.test(b.message) ? Object.assign(
1248
1248
  new y("Network Error", y.ERR_NETWORK, e, w),
1249
1249
  {
1250
1250
  cause: b.cause || b
@@ -1301,7 +1301,7 @@ function te(e) {
1301
1301
  throw new L(null, e);
1302
1302
  }
1303
1303
  function Pe(e) {
1304
- return te(e), e.headers = E.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 = E.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 = E.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 = {};
@@ -1363,7 +1363,7 @@ function Pn(e, t, n) {
1363
1363
  const ce = {
1364
1364
  assertOptions: Pn,
1365
1365
  validators: he
1366
- }, k = ce.validators;
1366
+ }, C = ce.validators;
1367
1367
  let B = class {
1368
1368
  constructor(t) {
1369
1369
  this.defaults = t, this.interceptors = {
@@ -1397,17 +1397,17 @@ let B = class {
1397
1397
  }
1398
1398
  }
1399
1399
  _request(t, n) {
1400
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = q(this.defaults, n);
1400
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
1401
1401
  const { transitional: r, paramsSerializer: s, headers: o } = n;
1402
1402
  r !== void 0 && ce.assertOptions(r, {
1403
- silentJSONParsing: k.transitional(k.boolean),
1404
- forcedJSONParsing: k.transitional(k.boolean),
1405
- clarifyTimeoutError: k.transitional(k.boolean)
1403
+ silentJSONParsing: C.transitional(C.boolean),
1404
+ forcedJSONParsing: C.transitional(C.boolean),
1405
+ clarifyTimeoutError: C.transitional(C.boolean)
1406
1406
  }, !1), s != null && (c.isFunction(s) ? n.paramsSerializer = {
1407
1407
  serialize: s
1408
1408
  } : ce.assertOptions(s, {
1409
- encode: k.function,
1410
- serialize: k.function
1409
+ encode: C.function,
1410
+ serialize: C.function
1411
1411
  }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1412
1412
  let i = o && c.merge(
1413
1413
  o.common,
@@ -1418,7 +1418,7 @@ let B = class {
1418
1418
  (h) => {
1419
1419
  delete o[h];
1420
1420
  }
1421
- ), n.headers = E.concat(i, o);
1421
+ ), n.headers = S.concat(i, o);
1422
1422
  const u = [];
1423
1423
  let f = !0;
1424
1424
  this.interceptors.request.forEach(function(p) {
@@ -1456,14 +1456,14 @@ let B = class {
1456
1456
  return a;
1457
1457
  }
1458
1458
  getUri(t) {
1459
- t = q(this.defaults, t);
1459
+ t = F(this.defaults, t);
1460
1460
  const n = ve(t.baseURL, t.url);
1461
1461
  return Me(n, t.params, t.paramsSerializer);
1462
1462
  }
1463
1463
  };
1464
1464
  c.forEach(["delete", "get", "head", "options"], function(t) {
1465
1465
  B.prototype[t] = function(n, r) {
1466
- return this.request(q(r || {}, {
1466
+ return this.request(F(r || {}, {
1467
1467
  method: t,
1468
1468
  url: n,
1469
1469
  data: (r || {}).data
@@ -1473,7 +1473,7 @@ c.forEach(["delete", "get", "head", "options"], function(t) {
1473
1473
  c.forEach(["post", "put", "patch"], function(t) {
1474
1474
  function n(r) {
1475
1475
  return function(o, i, u) {
1476
- return this.request(q(u || {}, {
1476
+ return this.request(F(u || {}, {
1477
1477
  method: t,
1478
1478
  headers: r ? {
1479
1479
  "Content-Type": "multipart/form-data"
@@ -1553,12 +1553,12 @@ let Nn = class Ye {
1553
1553
  };
1554
1554
  }
1555
1555
  };
1556
- function Cn(e) {
1556
+ function kn(e) {
1557
1557
  return function(n) {
1558
1558
  return e.apply(null, n);
1559
1559
  };
1560
1560
  }
1561
- function kn(e) {
1561
+ function Cn(e) {
1562
1562
  return c.isObject(e) && e.isAxiosError === !0;
1563
1563
  }
1564
1564
  const ue = {
@@ -1632,7 +1632,7 @@ Object.entries(ue).forEach(([e, t]) => {
1632
1632
  function et(e) {
1633
1633
  const t = new B(e), n = Be(B.prototype.request, t);
1634
1634
  return c.extend(n, B.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1635
- return et(q(e, s));
1635
+ return et(F(e, s));
1636
1636
  }, n;
1637
1637
  }
1638
1638
  const T = et(j);
@@ -1647,42 +1647,42 @@ T.Cancel = T.CanceledError;
1647
1647
  T.all = function(t) {
1648
1648
  return Promise.all(t);
1649
1649
  };
1650
- T.spread = Cn;
1651
- T.isAxiosError = kn;
1652
- T.mergeConfig = q;
1653
- T.AxiosHeaders = E;
1650
+ T.spread = kn;
1651
+ T.isAxiosError = Cn;
1652
+ T.mergeConfig = F;
1653
+ T.AxiosHeaders = S;
1654
1654
  T.formToJSON = (e) => Ve(c.isHTMLForm(e) ? new FormData(e) : e);
1655
1655
  T.getAdapter = Xe.getAdapter;
1656
1656
  T.HttpStatusCode = ue;
1657
1657
  T.default = T;
1658
1658
  const {
1659
- Axios: vn,
1659
+ Axios: Qn,
1660
1660
  AxiosError: xn,
1661
- CanceledError: Wn,
1662
- isCancel: Qn,
1663
- CancelToken: Xn,
1664
- VERSION: Zn,
1665
- all: Yn,
1666
- Cancel: er,
1667
- isAxiosError: tr,
1668
- spread: nr,
1669
- toFormData: rr,
1670
- AxiosHeaders: Ce,
1671
- HttpStatusCode: sr,
1672
- formToJSON: or,
1673
- getAdapter: ir,
1674
- mergeConfig: ar
1661
+ CanceledError: Xn,
1662
+ isCancel: Zn,
1663
+ CancelToken: Yn,
1664
+ VERSION: er,
1665
+ all: tr,
1666
+ Cancel: nr,
1667
+ isAxiosError: rr,
1668
+ spread: sr,
1669
+ toFormData: or,
1670
+ AxiosHeaders: ke,
1671
+ HttpStatusCode: ir,
1672
+ formToJSON: ar,
1673
+ getAdapter: cr,
1674
+ mergeConfig: ur
1675
1675
  } = T, H = () => new xn(
1676
1676
  "Unauthorized",
1677
1677
  "ERR_UNAUTHORIZED",
1678
- { headers: new Ce() },
1678
+ { headers: new ke() },
1679
1679
  null,
1680
1680
  {
1681
1681
  status: 401,
1682
1682
  data: null,
1683
1683
  statusText: "UNAUTHORIZED",
1684
1684
  headers: {},
1685
- config: { headers: new Ce() }
1685
+ config: { headers: new ke() }
1686
1686
  }
1687
1687
  ), Bn = (e) => {
1688
1688
  let t = !1;
@@ -1692,7 +1692,8 @@ const {
1692
1692
  localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken");
1693
1693
  }, u = (a, d = null) => {
1694
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));
1695
+ var g;
1696
+ a ? m.reject(a) : ((g = m.requestConfig).headers ?? (g.headers = {}), m.requestConfig.headers.Authorization = `Bearer ${d}`, m.resolve(m.requestConfig));
1696
1697
  }), n.length = 0;
1697
1698
  };
1698
1699
  return {
@@ -1730,7 +1731,7 @@ const {
1730
1731
  t = !0;
1731
1732
  try {
1732
1733
  const p = await e.onRefreshToken(g);
1733
- return o(p), a.headers || (a.headers = {}), a.headers.Authorization = `Bearer ${p.accessToken}`, u(null, p.accessToken), t = !1, a;
1734
+ return o(p), a.headers ?? (a.headers = {}), a.headers.Authorization = `Bearer ${p.accessToken}`, u(null, p.accessToken), t = !1, a;
1734
1735
  } catch {
1735
1736
  i();
1736
1737
  const w = H();
@@ -1742,9 +1743,9 @@ const {
1742
1743
  return ((d = a == null ? void 0 : a.response) == null ? void 0 : d.status) === 401;
1743
1744
  }
1744
1745
  };
1745
- }, P = (e) => {
1746
- const t = T.create(), n = e.apiVersion, r = e.productCode, s = e.baseUrl, o = s ? s.replace(/\/$/, "") : "", i = e.refreshTokenApiVersion || n, u = e.refreshTokenEndpointPath || "/refresh-token", f = `${o}/auth/${i}${u}`, l = Bn({
1747
- baseUrl: s || "",
1746
+ }, O = (e) => {
1747
+ const t = T.create(), n = e.apiVersion, r = e.productCode, s = e.baseUrl, o = s ? s.replace(/\/$/, "") : "", i = e.refreshTokenApiVersion ?? n, u = e.refreshTokenEndpointPath ?? "/refresh-token", f = `${o}/auth/${i}${u}`, l = Bn({
1748
+ baseUrl: s ?? "",
1748
1749
  apiVersion: n,
1749
1750
  refreshTokenEndpointPath: u,
1750
1751
  onRefreshToken: async (d) => (await t.post(f, {
@@ -1771,30 +1772,31 @@ const {
1771
1772
  ), {
1772
1773
  request: async (d, m) => {
1773
1774
  const g = d.startsWith("/") ? d.substring(1) : d, h = `${o}/${r}/${n}/${g}`, p = {
1774
- "Content-Type": (m == null ? void 0 : m.contentType) || "application/json",
1775
+ "Content-Type": (m == null ? void 0 : m.contentType) ?? "application/json",
1775
1776
  apiVersion: n,
1776
1777
  Authorization: "",
1777
- ...e.headers ?? {}
1778
+ ...e.headers ?? {},
1779
+ ...(m == null ? void 0 : m.headers) ?? {}
1778
1780
  }, w = l.getAccessToken();
1779
1781
  w && (p.Authorization = `Bearer ${w}`);
1780
- const S = {
1781
- method: (m == null ? void 0 : m.method) || "GET",
1782
+ const E = {
1783
+ method: (m == null ? void 0 : m.method) ?? "GET",
1782
1784
  headers: p,
1783
1785
  url: h,
1784
1786
  data: m == null ? void 0 : m.data,
1785
1787
  responseType: m == null ? void 0 : m.responseType
1786
1788
  };
1787
- return await t.request(S);
1789
+ return await t.request(E);
1788
1790
  },
1789
1791
  getAccessToken: l.getAccessToken,
1790
1792
  setTokens: l.setTokens,
1791
1793
  clearTokens: l.clearTokens
1792
1794
  };
1793
- }, qn = "cep";
1794
- function Fn(e) {
1795
- const t = P(e);
1795
+ }, Fn = "cep";
1796
+ function Un(e) {
1797
+ const t = O(e);
1796
1798
  function n(r) {
1797
- return t.request(`/${qn}`, {
1799
+ return t.request(`/${Fn}`, {
1798
1800
  method: "POST",
1799
1801
  data: JSON.stringify(r)
1800
1802
  });
@@ -1803,24 +1805,24 @@ function Fn(e) {
1803
1805
  getAddress: n
1804
1806
  };
1805
1807
  }
1806
- const ke = "auth", Un = (e) => {
1807
- const t = P(e);
1808
+ const Ce = "auth", qn = (e) => {
1809
+ const t = O(e);
1808
1810
  return {
1809
1811
  postLogin: async (s) => {
1810
1812
  var i;
1811
- const o = await t.request(`/${ke}/login`, {
1813
+ const o = await t.request(`/${Ce}/login`, {
1812
1814
  method: "POST",
1813
1815
  data: JSON.stringify(s)
1814
1816
  });
1815
1817
  return o.status === 200 && ((i = o.data) != null && i.accessToken) && localStorage.setItem("accessToken", o.data.accessToken), o;
1816
1818
  },
1817
- getToken: async (s) => await t.request(`/${ke}?code=${s}`, {
1819
+ getToken: async (s) => await t.request(`/${Ce}?code=${s}`, {
1818
1820
  method: "GET",
1819
1821
  data: ""
1820
1822
  })
1821
1823
  };
1822
1824
  }, Ln = (e) => {
1823
- const t = P(e);
1825
+ const t = O(e);
1824
1826
  return {
1825
1827
  signUp: async (u) => await t.request("/sign-up", {
1826
1828
  method: "POST",
@@ -1848,7 +1850,7 @@ const ke = "auth", Un = (e) => {
1848
1850
  })
1849
1851
  };
1850
1852
  }, xe = "digital", _n = (e) => {
1851
- const t = P(e);
1853
+ const t = O(e);
1852
1854
  return {
1853
1855
  getBroker: () => t.request(`/${xe}/getBroker`, {
1854
1856
  method: "GET",
@@ -1863,15 +1865,29 @@ const ke = "auth", Un = (e) => {
1863
1865
  )
1864
1866
  };
1865
1867
  }, Dn = "data", $n = (e) => {
1866
- const t = P(e);
1868
+ const t = O(e);
1867
1869
  return {
1868
1870
  postData: async (r) => await t.request(`/${Dn}`, {
1869
1871
  method: "POST",
1870
1872
  data: JSON.stringify(r)
1871
1873
  })
1872
1874
  };
1873
- }, ne = "payment", In = (e) => {
1874
- const t = P(e);
1875
+ }, In = "endorsement", jn = (e) => {
1876
+ const t = O(e);
1877
+ return {
1878
+ putEndorsement: (r, s) => {
1879
+ const o = new FormData();
1880
+ return o.append("data", JSON.stringify(r)), s && (Array.isArray(s) ? s.forEach((i) => {
1881
+ o.append("attachments", i);
1882
+ }) : o.append("attachments", s)), t.request(`/${In}`, {
1883
+ method: "PUT",
1884
+ data: o,
1885
+ contentType: "multipart/form-data"
1886
+ });
1887
+ }
1888
+ };
1889
+ }, ne = "payment", Hn = (e) => {
1890
+ const t = O(e);
1875
1891
  return {
1876
1892
  postPayment: (o) => t.request(`/${ne}`, {
1877
1893
  method: "POST",
@@ -1892,8 +1908,8 @@ const ke = "auth", Un = (e) => {
1892
1908
  }
1893
1909
  )
1894
1910
  };
1895
- }, J = "product/action", jn = (e) => {
1896
- const t = P(e);
1911
+ }, J = "product/action", Jn = (e) => {
1912
+ const t = O(e);
1897
1913
  return {
1898
1914
  getCnpjStatus: (i) => t.request(`/${J}/Custom/CnpjCheck?cnpj=${i}`, {
1899
1915
  method: "GET",
@@ -1918,8 +1934,8 @@ const ke = "auth", Un = (e) => {
1918
1934
  }
1919
1935
  )
1920
1936
  };
1921
- }, x = "quotation", Hn = (e) => {
1922
- const t = P(e);
1937
+ }, x = "quotation", Mn = (e) => {
1938
+ const t = O(e);
1923
1939
  return {
1924
1940
  getQuotations: (a) => {
1925
1941
  const d = new URLSearchParams({ ...a });
@@ -1972,17 +1988,17 @@ const ke = "auth", Un = (e) => {
1972
1988
  }
1973
1989
  )
1974
1990
  };
1975
- }, Jn = "report", Mn = (e) => {
1976
- const t = P(e);
1991
+ }, zn = "report", Vn = (e) => {
1992
+ const t = O(e);
1977
1993
  return {
1978
1994
  getReportStream: (r) => {
1979
1995
  const s = new URLSearchParams({
1980
1996
  policyId: r.policyId,
1981
- documentType: r.documentType || "certificate",
1997
+ documentType: r.documentType ?? "certificate",
1982
1998
  ...r.additionalParams
1983
1999
  });
1984
2000
  return t.request(
1985
- `/${Jn}/generate-stream?${s.toString()}`,
2001
+ `/${zn}/generate-stream?${s.toString()}`,
1986
2002
  {
1987
2003
  method: "GET",
1988
2004
  data: "",
@@ -1991,11 +2007,11 @@ const ke = "auth", Un = (e) => {
1991
2007
  );
1992
2008
  }
1993
2009
  };
1994
- }, zn = "SubscriberData", Vn = (e) => {
1995
- const t = P(e);
2010
+ }, Gn = "SubscriberData", Kn = (e) => {
2011
+ const t = O(e);
1996
2012
  return {
1997
2013
  getSubscriber: (r) => t.request(
1998
- `/${zn}/get-subscriber-data?cnpj=${r}`,
2014
+ `/${Gn}/get-subscriber-data?cnpj=${r}`,
1999
2015
  {
2000
2016
  method: "GET",
2001
2017
  data: ""
@@ -2003,8 +2019,8 @@ const ke = "auth", Un = (e) => {
2003
2019
  )
2004
2020
  };
2005
2021
  };
2006
- function cr(e) {
2007
- const t = Un(e), n = Ln(e), r = $n(e), s = Hn(e), o = In(e), i = Fn(e), u = _n(e), f = jn(e), l = Mn(e), a = Vn(e);
2022
+ function lr(e) {
2023
+ const t = qn(e), n = Ln(e), r = $n(e), s = Mn(e), o = Hn(e), i = Un(e), u = _n(e), f = jn(e), l = Jn(e), a = Vn(e), d = Kn(e), m = O(e);
2008
2024
  return {
2009
2025
  auth: t,
2010
2026
  authAkad: n,
@@ -2013,11 +2029,13 @@ function cr(e) {
2013
2029
  payment: o,
2014
2030
  address: i,
2015
2031
  broker: u,
2016
- plugin: f,
2017
- report: l,
2018
- subscriber: a
2032
+ endorsement: f,
2033
+ plugin: l,
2034
+ report: a,
2035
+ subscriber: d,
2036
+ base: m
2019
2037
  };
2020
2038
  }
2021
2039
  export {
2022
- cr as default
2040
+ lr as default
2023
2041
  };