oauth0-js-lib 2.2.5 → 2.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,21 +1,21 @@
1
- var vn = Object.defineProperty;
2
- var xn = (e, t, r) => t in e ? vn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var F = (e, t, r) => xn(e, typeof t != "symbol" ? t + "" : t, r);
4
- const Fn = {
1
+ var xn = Object.defineProperty;
2
+ var Fn = (e, t, r) => t in e ? xn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var x = (e, t, r) => Fn(e, typeof t != "symbol" ? t + "" : t, r);
4
+ const Mn = {
5
5
  baseUrl: "",
6
6
  createEndpoint: "/api/oauth0/create",
7
7
  authEventEndpoint: "/api/oauth0/auth-events",
8
8
  authConfirmEndpoint: "/api/oauth0/auth-confirm"
9
- }, Mn = typeof __OAUTH_LIB_CONFIG__ < "u" ? __OAUTH_LIB_CONFIG__ : void 0, kn = typeof globalThis < "u" && globalThis.OAUTH_LIB_CONFIG ? globalThis.OAUTH_LIB_CONFIG : void 0;
9
+ }, Dn = typeof __OAUTH_LIB_CONFIG__ < "u" ? __OAUTH_LIB_CONFIG__ : void 0, kn = typeof globalThis < "u" && globalThis.OAUTH_LIB_CONFIG ? globalThis.OAUTH_LIB_CONFIG : void 0;
10
10
  let nt = {
11
- ...Fn,
12
11
  ...Mn,
12
+ ...Dn,
13
13
  ...kn
14
14
  };
15
15
  function Vo(e) {
16
16
  nt = { ...nt, ...e };
17
17
  }
18
- function Dn() {
18
+ function rn() {
19
19
  return nt;
20
20
  }
21
21
  function on(e, t) {
@@ -40,7 +40,7 @@ const Hn = Be("string"), M = Be("function"), un = Be("number"), he = (e) => e !=
40
40
  return !1;
41
41
  const t = at(e);
42
42
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(sn in e) && !(Te in e);
43
- }, Vn = (e) => {
43
+ }, $n = (e) => {
44
44
  if (!he(e) || de(e))
45
45
  return !1;
46
46
  try {
@@ -48,7 +48,7 @@ const Hn = Be("string"), M = Be("function"), un = Be("number"), he = (e) => e !=
48
48
  } catch {
49
49
  return !1;
50
50
  }
51
- }, $n = H("Date"), Jn = H("File"), Kn = H("Blob"), Wn = H("FileList"), Gn = (e) => he(e) && M(e.pipe), Qn = (e) => {
51
+ }, Vn = H("Date"), Jn = H("File"), Kn = H("Blob"), Wn = H("FileList"), Gn = (e) => he(e) && M(e.pipe), Qn = (e) => {
52
52
  let t;
53
53
  return e && (typeof FormData == "function" && e instanceof FormData || M(e.append) && ((t = Ae(e)) === "formdata" || // detect form-data instance
54
54
  t === "object" && M(e.toString) && e.toString() === "[object FormData]"));
@@ -69,7 +69,7 @@ function pe(e, t, { allOwnKeys: r = !1 } = {}) {
69
69
  a = i[n], t.call(null, e[a], a, e);
70
70
  }
71
71
  }
72
- function ln(e, t) {
72
+ function cn(e, t) {
73
73
  if (de(e))
74
74
  return null;
75
75
  t = t.toLowerCase();
@@ -80,10 +80,10 @@ function ln(e, t) {
80
80
  return o;
81
81
  return null;
82
82
  }
83
- const Q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, cn = (e) => !ie(e) && e !== Q;
83
+ const Q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ln = (e) => !ie(e) && e !== Q;
84
84
  function rt() {
85
- const { caseless: e, skipUndefined: t } = cn(this) && this || {}, r = {}, n = (o, i) => {
86
- const s = e && ln(r, i) || i;
85
+ const { caseless: e, skipUndefined: t } = ln(this) && this || {}, r = {}, n = (o, i) => {
86
+ const s = e && cn(r, i) || i;
87
87
  Ee(r[s]) && Ee(o) ? r[s] = rt(r[s], o) : Ee(o) ? r[s] = rt({}, o) : se(o) ? r[s] = o.slice() : (!t || !ie(o)) && (r[s] = o);
88
88
  };
89
89
  for (let o = 0, i = arguments.length; o < i; o++)
@@ -119,7 +119,7 @@ const rr = (e, t, r, { allOwnKeys: n } = {}) => (pe(t, (o, i) => {
119
119
  for (; t-- > 0; )
120
120
  r[t] = e[t];
121
121
  return r;
122
- }, lr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && at(Uint8Array)), cr = (e, t) => {
122
+ }, cr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && at(Uint8Array)), lr = (e, t) => {
123
123
  const n = (e && e[Te]).call(e);
124
124
  let o;
125
125
  for (; (o = n.next()) && !o.done; ) {
@@ -137,7 +137,7 @@ const rr = (e, t, r, { allOwnKeys: n } = {}) => (pe(t, (o, i) => {
137
137
  function(r, n, o) {
138
138
  return n.toUpperCase() + o;
139
139
  }
140
- ), pt = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), pr = H("RegExp"), fn = (e, t) => {
140
+ ), ht = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), pr = H("RegExp"), fn = (e, t) => {
141
141
  const r = Object.getOwnPropertyDescriptors(e), n = {};
142
142
  pe(r, (o, i) => {
143
143
  let s;
@@ -207,20 +207,20 @@ const Er = (e) => {
207
207
  isBoolean: zn,
208
208
  isObject: he,
209
209
  isPlainObject: Ee,
210
- isEmptyObject: Vn,
210
+ isEmptyObject: $n,
211
211
  isReadableStream: Xn,
212
212
  isRequest: Zn,
213
213
  isResponse: er,
214
214
  isHeaders: tr,
215
215
  isUndefined: ie,
216
- isDate: $n,
216
+ isDate: Vn,
217
217
  isFile: Jn,
218
218
  isBlob: Kn,
219
219
  isRegExp: pr,
220
220
  isFunction: M,
221
221
  isStream: Gn,
222
222
  isURLSearchParams: Yn,
223
- isTypedArray: lr,
223
+ isTypedArray: cr,
224
224
  isFileList: Wn,
225
225
  forEach: pe,
226
226
  merge: rt,
@@ -233,11 +233,11 @@ const Er = (e) => {
233
233
  kindOfTest: H,
234
234
  endsWith: ar,
235
235
  toArray: ur,
236
- forEachEntry: cr,
236
+ forEachEntry: lr,
237
237
  matchAll: fr,
238
238
  isHTMLForm: dr,
239
- hasOwnProperty: pt,
240
- hasOwnProp: pt,
239
+ hasOwnProperty: ht,
240
+ hasOwnProp: ht,
241
241
  // an alias to avoid ESLint no-prototype-builtins detection
242
242
  reduceDescriptors: fn,
243
243
  freezeMethods: gr,
@@ -245,9 +245,9 @@ const Er = (e) => {
245
245
  toCamelCase: hr,
246
246
  noop: yr,
247
247
  toFiniteNumber: wr,
248
- findKey: ln,
248
+ findKey: cn,
249
249
  global: Q,
250
- isContextDefined: cn,
250
+ isContextDefined: ln,
251
251
  isSpecCompliantForm: br,
252
252
  toJSONObject: Er,
253
253
  isAsyncFn: Cr,
@@ -302,9 +302,9 @@ Object.defineProperties(I, pn);
302
302
  Object.defineProperty(hn, "isAxiosError", { value: !0 });
303
303
  I.from = (e, t, r, n, o, i) => {
304
304
  const s = Object.create(hn);
305
- f.toFlatObject(e, s, function(c) {
306
- return c !== Error.prototype;
307
- }, (l) => l !== "isAxiosError");
305
+ f.toFlatObject(e, s, function(l) {
306
+ return l !== Error.prototype;
307
+ }, (c) => c !== "isAxiosError");
308
308
  const a = e && e.message ? e.message : "Error", u = t == null && e ? e.code : t;
309
309
  return I.call(s, a, u, r, n, o), e && s.cause == null && Object.defineProperty(s, "cause", { value: e, configurable: !0 }), s.name = e && e.name || "Error", i && Object.assign(s, i), s;
310
310
  };
@@ -315,7 +315,7 @@ function ot(e) {
315
315
  function gn(e) {
316
316
  return f.endsWith(e, "[]") ? e.slice(0, -2) : e;
317
317
  }
318
- function gt(e, t, r) {
318
+ function pt(e, t, r) {
319
319
  return e ? e.concat(t).map(function(o, i) {
320
320
  return o = gn(o), !r && i ? "[" + o + "]" : o;
321
321
  }).join(r ? "." : "") : t;
@@ -336,10 +336,10 @@ function Ne(e, t, r) {
336
336
  }, !1, function(p, g) {
337
337
  return !f.isUndefined(g[p]);
338
338
  });
339
- const n = r.metaTokens, o = r.visitor || c, i = r.dots, s = r.indexes, u = (r.Blob || typeof Blob < "u" && Blob) && f.isSpecCompliantForm(t);
339
+ const n = r.metaTokens, o = r.visitor || l, i = r.dots, s = r.indexes, u = (r.Blob || typeof Blob < "u" && Blob) && f.isSpecCompliantForm(t);
340
340
  if (!f.isFunction(o))
341
341
  throw new TypeError("visitor must be a function");
342
- function l(d) {
342
+ function c(d) {
343
343
  if (d === null) return "";
344
344
  if (f.isDate(d))
345
345
  return d.toISOString();
@@ -349,7 +349,7 @@ function Ne(e, t, r) {
349
349
  throw new I("Blob is not supported. Use a Buffer instead.");
350
350
  return f.isArrayBuffer(d) || f.isTypedArray(d) ? u && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
351
351
  }
352
- function c(d, p, g) {
352
+ function l(d, p, g) {
353
353
  let w = d;
354
354
  if (d && !g && typeof d == "object") {
355
355
  if (f.endsWith(p, "{}"))
@@ -358,16 +358,16 @@ function Ne(e, t, r) {
358
358
  return p = gn(p), w.forEach(function(E, R) {
359
359
  !(f.isUndefined(E) || E === null) && t.append(
360
360
  // eslint-disable-next-line no-nested-ternary
361
- s === !0 ? gt([p], R, i) : s === null ? p : p + "[]",
362
- l(E)
361
+ s === !0 ? pt([p], R, i) : s === null ? p : p + "[]",
362
+ c(E)
363
363
  );
364
364
  }), !1;
365
365
  }
366
- return ot(d) ? !0 : (t.append(gt(g, p, i), l(d)), !1);
366
+ return ot(d) ? !0 : (t.append(pt(g, p, i), c(d)), !1);
367
367
  }
368
368
  const h = [], m = Object.assign(Nr, {
369
- defaultVisitor: c,
370
- convertValue: l,
369
+ defaultVisitor: l,
370
+ convertValue: c,
371
371
  isVisitable: ot
372
372
  });
373
373
  function y(d, p) {
@@ -389,7 +389,7 @@ function Ne(e, t, r) {
389
389
  throw new TypeError("data must be an object");
390
390
  return y(e), t;
391
391
  }
392
- function mt(e) {
392
+ function gt(e) {
393
393
  const t = {
394
394
  "!": "%21",
395
395
  "'": "%27",
@@ -412,8 +412,8 @@ mn.append = function(t, r) {
412
412
  };
413
413
  mn.toString = function(t) {
414
414
  const r = t ? function(n) {
415
- return t.call(this, n, mt);
416
- } : mt;
415
+ return t.call(this, n, gt);
416
+ } : gt;
417
417
  return this._pairs.map(function(o) {
418
418
  return r(o[0]) + "=" + r(o[1]);
419
419
  }, "").join("&");
@@ -436,7 +436,7 @@ function yn(e, t, r) {
436
436
  }
437
437
  return e;
438
438
  }
439
- class yt {
439
+ class mt {
440
440
  constructor() {
441
441
  this.handlers = [];
442
442
  }
@@ -502,30 +502,30 @@ const wn = {
502
502
  Blob: Ir
503
503
  },
504
504
  protocols: ["http", "https", "file", "blob", "url", "data"]
505
- }, lt = typeof window < "u" && typeof document < "u", it = typeof navigator == "object" && navigator || void 0, Ur = lt && (!it || ["ReactNative", "NativeScript", "NS"].indexOf(it.product) < 0), vr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
506
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", xr = lt && window.location.href || "http://localhost", Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
505
+ }, ct = typeof window < "u" && typeof document < "u", it = typeof navigator == "object" && navigator || void 0, Ur = ct && (!it || ["ReactNative", "NativeScript", "NS"].indexOf(it.product) < 0), vr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
506
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", xr = ct && window.location.href || "http://localhost", Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
507
507
  __proto__: null,
508
- hasBrowserEnv: lt,
508
+ hasBrowserEnv: ct,
509
509
  hasStandardBrowserEnv: Ur,
510
510
  hasStandardBrowserWebWorkerEnv: vr,
511
511
  navigator: it,
512
512
  origin: xr
513
- }, Symbol.toStringTag, { value: "Module" })), x = {
513
+ }, Symbol.toStringTag, { value: "Module" })), F = {
514
514
  ...Fr,
515
515
  ..._r
516
516
  };
517
517
  function Mr(e, t) {
518
- return Ne(e, new x.classes.URLSearchParams(), {
518
+ return Ne(e, new F.classes.URLSearchParams(), {
519
519
  visitor: function(r, n, o, i) {
520
- return x.isNode && f.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
520
+ return F.isNode && f.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
521
521
  },
522
522
  ...t
523
523
  });
524
524
  }
525
- function kr(e) {
525
+ function Dr(e) {
526
526
  return f.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
527
527
  }
528
- function Dr(e) {
528
+ function kr(e) {
529
529
  const t = {}, r = Object.keys(e);
530
530
  let n;
531
531
  const o = r.length;
@@ -539,12 +539,12 @@ function bn(e) {
539
539
  let s = r[i++];
540
540
  if (s === "__proto__") return !0;
541
541
  const a = Number.isFinite(+s), u = i >= r.length;
542
- return s = !s && f.isArray(o) ? o.length : s, u ? (f.hasOwnProp(o, s) ? o[s] = [o[s], n] : o[s] = n, !a) : ((!o[s] || !f.isObject(o[s])) && (o[s] = []), t(r, n, o[s], i) && f.isArray(o[s]) && (o[s] = Dr(o[s])), !a);
542
+ return s = !s && f.isArray(o) ? o.length : s, u ? (f.hasOwnProp(o, s) ? o[s] = [o[s], n] : o[s] = n, !a) : ((!o[s] || !f.isObject(o[s])) && (o[s] = []), t(r, n, o[s], i) && f.isArray(o[s]) && (o[s] = kr(o[s])), !a);
543
543
  }
544
544
  if (f.isFormData(e) && f.isFunction(e.entries)) {
545
545
  const r = {};
546
546
  return f.forEachEntry(e, (n, o) => {
547
- t(kr(n), o, r, 0);
547
+ t(Dr(n), o, r, 0);
548
548
  }), r;
549
549
  }
550
550
  return null;
@@ -612,8 +612,8 @@ const ge = {
612
612
  maxContentLength: -1,
613
613
  maxBodyLength: -1,
614
614
  env: {
615
- FormData: x.classes.FormData,
616
- Blob: x.classes.Blob
615
+ FormData: F.classes.FormData,
616
+ Blob: F.classes.Blob
617
617
  },
618
618
  validateStatus: function(t) {
619
619
  return t >= 200 && t < 300;
@@ -653,8 +653,8 @@ const jr = f.toObjectSet([
653
653
  `).forEach(function(s) {
654
654
  o = s.indexOf(":"), r = s.substring(0, o).trim().toLowerCase(), n = s.substring(o + 1).trim(), !(!r || t[r] && jr[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
655
655
  }), t;
656
- }, wt = Symbol("internals");
657
- function le(e) {
656
+ }, yt = Symbol("internals");
657
+ function ce(e) {
658
658
  return e && String(e).trim().toLowerCase();
659
659
  }
660
660
  function Ce(e) {
@@ -667,7 +667,7 @@ function zr(e) {
667
667
  t[n[1]] = n[2];
668
668
  return t;
669
669
  }
670
- const Vr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
670
+ const $r = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
671
671
  function Le(e, t, r, n, o) {
672
672
  if (f.isFunction(n))
673
673
  return n.call(this, t, r);
@@ -678,7 +678,7 @@ function Le(e, t, r, n, o) {
678
678
  return n.test(t);
679
679
  }
680
680
  }
681
- function $r(e) {
681
+ function Vr(e) {
682
682
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
683
683
  }
684
684
  function Jr(e, t) {
@@ -692,30 +692,30 @@ function Jr(e, t) {
692
692
  });
693
693
  });
694
694
  }
695
- let k = class {
695
+ let D = class {
696
696
  constructor(t) {
697
697
  t && this.set(t);
698
698
  }
699
699
  set(t, r, n) {
700
700
  const o = this;
701
- function i(a, u, l) {
702
- const c = le(u);
703
- if (!c)
701
+ function i(a, u, c) {
702
+ const l = ce(u);
703
+ if (!l)
704
704
  throw new Error("header name must be a non-empty string");
705
- const h = f.findKey(o, c);
706
- (!h || o[h] === void 0 || l === !0 || l === void 0 && o[h] !== !1) && (o[h || u] = Ce(a));
705
+ const h = f.findKey(o, l);
706
+ (!h || o[h] === void 0 || c === !0 || c === void 0 && o[h] !== !1) && (o[h || u] = Ce(a));
707
707
  }
708
- const s = (a, u) => f.forEach(a, (l, c) => i(l, c, u));
708
+ const s = (a, u) => f.forEach(a, (c, l) => i(c, l, u));
709
709
  if (f.isPlainObject(t) || t instanceof this.constructor)
710
710
  s(t, r);
711
- else if (f.isString(t) && (t = t.trim()) && !Vr(t))
711
+ else if (f.isString(t) && (t = t.trim()) && !$r(t))
712
712
  s(Hr(t), r);
713
713
  else if (f.isObject(t) && f.isIterable(t)) {
714
- let a = {}, u, l;
715
- for (const c of t) {
716
- if (!f.isArray(c))
714
+ let a = {}, u, c;
715
+ for (const l of t) {
716
+ if (!f.isArray(l))
717
717
  throw TypeError("Object iterator must return a key-value pair");
718
- a[l = c[0]] = (u = a[l]) ? f.isArray(u) ? [...u, c[1]] : [u, c[1]] : c[1];
718
+ a[c = l[0]] = (u = a[c]) ? f.isArray(u) ? [...u, l[1]] : [u, l[1]] : l[1];
719
719
  }
720
720
  s(a, r);
721
721
  } else
@@ -723,7 +723,7 @@ let k = class {
723
723
  return this;
724
724
  }
725
725
  get(t, r) {
726
- if (t = le(t), t) {
726
+ if (t = ce(t), t) {
727
727
  const n = f.findKey(this, t);
728
728
  if (n) {
729
729
  const o = this[n];
@@ -740,7 +740,7 @@ let k = class {
740
740
  }
741
741
  }
742
742
  has(t, r) {
743
- if (t = le(t), t) {
743
+ if (t = ce(t), t) {
744
744
  const n = f.findKey(this, t);
745
745
  return !!(n && this[n] !== void 0 && (!r || Le(this, this[n], n, r)));
746
746
  }
@@ -750,7 +750,7 @@ let k = class {
750
750
  const n = this;
751
751
  let o = !1;
752
752
  function i(s) {
753
- if (s = le(s), s) {
753
+ if (s = ce(s), s) {
754
754
  const a = f.findKey(n, s);
755
755
  a && (!r || Le(n, n[a], a, r)) && (delete n[a], o = !0);
756
756
  }
@@ -774,7 +774,7 @@ let k = class {
774
774
  r[s] = Ce(o), delete r[i];
775
775
  return;
776
776
  }
777
- const a = t ? $r(i) : String(i).trim();
777
+ const a = t ? Vr(i) : String(i).trim();
778
778
  a !== i && delete r[i], r[a] = Ce(o), n[a] = !0;
779
779
  }), this;
780
780
  }
@@ -808,18 +808,18 @@ let k = class {
808
808
  return r.forEach((o) => n.set(o)), n;
809
809
  }
810
810
  static accessor(t) {
811
- const n = (this[wt] = this[wt] = {
811
+ const n = (this[yt] = this[yt] = {
812
812
  accessors: {}
813
813
  }).accessors, o = this.prototype;
814
814
  function i(s) {
815
- const a = le(s);
815
+ const a = ce(s);
816
816
  n[a] || (Jr(o, s), n[a] = !0);
817
817
  }
818
818
  return f.isArray(t) ? t.forEach(i) : i(t), this;
819
819
  }
820
820
  };
821
- k.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
822
- f.reduceDescriptors(k.prototype, ({ value: e }, t) => {
821
+ D.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
822
+ f.reduceDescriptors(D.prototype, ({ value: e }, t) => {
823
823
  let r = t[0].toUpperCase() + t.slice(1);
824
824
  return {
825
825
  get: () => e,
@@ -828,9 +828,9 @@ f.reduceDescriptors(k.prototype, ({ value: e }, t) => {
828
828
  }
829
829
  };
830
830
  });
831
- f.freezeMethods(k);
831
+ f.freezeMethods(D);
832
832
  function Ie(e, t) {
833
- const r = this || ge, n = t || r, o = k.from(n.headers);
833
+ const r = this || ge, n = t || r, o = D.from(n.headers);
834
834
  let i = n.data;
835
835
  return f.forEach(e, function(a) {
836
836
  i = a.call(r, i, o.normalize(), t ? t.status : void 0);
@@ -864,25 +864,25 @@ function Wr(e, t) {
864
864
  const r = new Array(e), n = new Array(e);
865
865
  let o = 0, i = 0, s;
866
866
  return t = t !== void 0 ? t : 1e3, function(u) {
867
- const l = Date.now(), c = n[i];
868
- s || (s = l), r[o] = u, n[o] = l;
867
+ const c = Date.now(), l = n[i];
868
+ s || (s = c), r[o] = u, n[o] = c;
869
869
  let h = i, m = 0;
870
870
  for (; h !== o; )
871
871
  m += r[h++], h = h % e;
872
- if (o = (o + 1) % e, o === i && (i = (i + 1) % e), l - s < t)
872
+ if (o = (o + 1) % e, o === i && (i = (i + 1) % e), c - s < t)
873
873
  return;
874
- const y = c && l - c;
874
+ const y = l && c - l;
875
875
  return y ? Math.round(m * 1e3 / y) : void 0;
876
876
  };
877
877
  }
878
878
  function Gr(e, t) {
879
879
  let r = 0, n = 1e3 / t, o, i;
880
- const s = (l, c = Date.now()) => {
881
- r = c, o = null, i && (clearTimeout(i), i = null), e(...l);
880
+ const s = (c, l = Date.now()) => {
881
+ r = l, o = null, i && (clearTimeout(i), i = null), e(...c);
882
882
  };
883
- return [(...l) => {
884
- const c = Date.now(), h = c - r;
885
- h >= n ? s(l, c) : (o = l, i || (i = setTimeout(() => {
883
+ return [(...c) => {
884
+ const l = Date.now(), h = l - r;
885
+ h >= n ? s(c, l) : (o = c, i || (i = setTimeout(() => {
886
886
  i = null, s(o);
887
887
  }, n - h)));
888
888
  }, () => o && s(o)];
@@ -891,32 +891,32 @@ const Re = (e, t, r = 3) => {
891
891
  let n = 0;
892
892
  const o = Wr(50, 250);
893
893
  return Gr((i) => {
894
- const s = i.loaded, a = i.lengthComputable ? i.total : void 0, u = s - n, l = o(u), c = s <= a;
894
+ const s = i.loaded, a = i.lengthComputable ? i.total : void 0, u = s - n, c = o(u), l = s <= a;
895
895
  n = s;
896
896
  const h = {
897
897
  loaded: s,
898
898
  total: a,
899
899
  progress: a ? s / a : void 0,
900
900
  bytes: u,
901
- rate: l || void 0,
902
- estimated: l && a && c ? (a - s) / l : void 0,
901
+ rate: c || void 0,
902
+ estimated: c && a && l ? (a - s) / c : void 0,
903
903
  event: i,
904
904
  lengthComputable: a != null,
905
905
  [t ? "download" : "upload"]: !0
906
906
  };
907
907
  e(h);
908
908
  }, r);
909
- }, bt = (e, t) => {
909
+ }, wt = (e, t) => {
910
910
  const r = e != null;
911
911
  return [(n) => t[0]({
912
912
  lengthComputable: r,
913
913
  total: e,
914
914
  loaded: n
915
915
  }), t[1]];
916
- }, Et = (e) => (...t) => f.asap(() => e(...t)), Qr = x.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, x.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
917
- new URL(x.origin),
918
- x.navigator && /(msie|trident)/i.test(x.navigator.userAgent)
919
- ) : () => !0, Yr = x.hasStandardBrowserEnv ? (
916
+ }, bt = (e) => (...t) => f.asap(() => e(...t)), Qr = F.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, F.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
917
+ new URL(F.origin),
918
+ F.navigator && /(msie|trident)/i.test(F.navigator.userAgent)
919
+ ) : () => !0, Yr = F.hasStandardBrowserEnv ? (
920
920
  // Standard browser envs support document.cookie
921
921
  {
922
922
  write(e, t, r, n, o, i, s) {
@@ -955,34 +955,34 @@ function Sn(e, t, r) {
955
955
  let n = !Xr(t);
956
956
  return e && (n || r == !1) ? Zr(e, t) : t;
957
957
  }
958
- const Ct = (e) => e instanceof k ? { ...e } : e;
958
+ const Et = (e) => e instanceof D ? { ...e } : e;
959
959
  function X(e, t) {
960
960
  t = t || {};
961
961
  const r = {};
962
- function n(l, c, h, m) {
963
- return f.isPlainObject(l) && f.isPlainObject(c) ? f.merge.call({ caseless: m }, l, c) : f.isPlainObject(c) ? f.merge({}, c) : f.isArray(c) ? c.slice() : c;
962
+ function n(c, l, h, m) {
963
+ return f.isPlainObject(c) && f.isPlainObject(l) ? f.merge.call({ caseless: m }, c, l) : f.isPlainObject(l) ? f.merge({}, l) : f.isArray(l) ? l.slice() : l;
964
964
  }
965
- function o(l, c, h, m) {
966
- if (f.isUndefined(c)) {
967
- if (!f.isUndefined(l))
968
- return n(void 0, l, h, m);
969
- } else return n(l, c, h, m);
965
+ function o(c, l, h, m) {
966
+ if (f.isUndefined(l)) {
967
+ if (!f.isUndefined(c))
968
+ return n(void 0, c, h, m);
969
+ } else return n(c, l, h, m);
970
970
  }
971
- function i(l, c) {
972
- if (!f.isUndefined(c))
973
- return n(void 0, c);
971
+ function i(c, l) {
972
+ if (!f.isUndefined(l))
973
+ return n(void 0, l);
974
974
  }
975
- function s(l, c) {
976
- if (f.isUndefined(c)) {
977
- if (!f.isUndefined(l))
978
- return n(void 0, l);
979
- } else return n(void 0, c);
975
+ function s(c, l) {
976
+ if (f.isUndefined(l)) {
977
+ if (!f.isUndefined(c))
978
+ return n(void 0, c);
979
+ } else return n(void 0, l);
980
980
  }
981
- function a(l, c, h) {
981
+ function a(c, l, h) {
982
982
  if (h in t)
983
- return n(l, c);
983
+ return n(c, l);
984
984
  if (h in e)
985
- return n(void 0, l);
985
+ return n(void 0, c);
986
986
  }
987
987
  const u = {
988
988
  url: i,
@@ -1013,30 +1013,30 @@ function X(e, t) {
1013
1013
  socketPath: s,
1014
1014
  responseEncoding: s,
1015
1015
  validateStatus: a,
1016
- headers: (l, c, h) => o(Ct(l), Ct(c), h, !0)
1016
+ headers: (c, l, h) => o(Et(c), Et(l), h, !0)
1017
1017
  };
1018
- return f.forEach(Object.keys({ ...e, ...t }), function(c) {
1019
- const h = u[c] || o, m = h(e[c], t[c], c);
1020
- f.isUndefined(m) && h !== a || (r[c] = m);
1018
+ return f.forEach(Object.keys({ ...e, ...t }), function(l) {
1019
+ const h = u[l] || o, m = h(e[l], t[l], l);
1020
+ f.isUndefined(m) && h !== a || (r[l] = m);
1021
1021
  }), r;
1022
1022
  }
1023
1023
  const Rn = (e) => {
1024
1024
  const t = X({}, e);
1025
1025
  let { data: r, withXSRFToken: n, xsrfHeaderName: o, xsrfCookieName: i, headers: s, auth: a } = t;
1026
- if (t.headers = s = k.from(s), t.url = yn(Sn(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && s.set(
1026
+ if (t.headers = s = D.from(s), t.url = yn(Sn(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && s.set(
1027
1027
  "Authorization",
1028
1028
  "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
1029
1029
  ), f.isFormData(r)) {
1030
- if (x.hasStandardBrowserEnv || x.hasStandardBrowserWebWorkerEnv)
1030
+ if (F.hasStandardBrowserEnv || F.hasStandardBrowserWebWorkerEnv)
1031
1031
  s.setContentType(void 0);
1032
1032
  else if (f.isFunction(r.getHeaders)) {
1033
- const u = r.getHeaders(), l = ["content-type", "content-length"];
1034
- Object.entries(u).forEach(([c, h]) => {
1035
- l.includes(c.toLowerCase()) && s.set(c, h);
1033
+ const u = r.getHeaders(), c = ["content-type", "content-length"];
1034
+ Object.entries(u).forEach(([l, h]) => {
1035
+ c.includes(l.toLowerCase()) && s.set(l, h);
1036
1036
  });
1037
1037
  }
1038
1038
  }
1039
- if (x.hasStandardBrowserEnv && (n && f.isFunction(n) && (n = n(t)), n || n !== !1 && Qr(t.url))) {
1039
+ if (F.hasStandardBrowserEnv && (n && f.isFunction(n) && (n = n(t)), n || n !== !1 && Qr(t.url))) {
1040
1040
  const u = o && i && Yr.read(i);
1041
1041
  u && s.set(o, u);
1042
1042
  }
@@ -1045,17 +1045,17 @@ const Rn = (e) => {
1045
1045
  return new Promise(function(r, n) {
1046
1046
  const o = Rn(e);
1047
1047
  let i = o.data;
1048
- const s = k.from(o.headers).normalize();
1049
- let { responseType: a, onUploadProgress: u, onDownloadProgress: l } = o, c, h, m, y, d;
1048
+ const s = D.from(o.headers).normalize();
1049
+ let { responseType: a, onUploadProgress: u, onDownloadProgress: c } = o, l, h, m, y, d;
1050
1050
  function p() {
1051
- y && y(), d && d(), o.cancelToken && o.cancelToken.unsubscribe(c), o.signal && o.signal.removeEventListener("abort", c);
1051
+ y && y(), d && d(), o.cancelToken && o.cancelToken.unsubscribe(l), o.signal && o.signal.removeEventListener("abort", l);
1052
1052
  }
1053
1053
  let g = new XMLHttpRequest();
1054
1054
  g.open(o.method.toUpperCase(), o.url, !0), g.timeout = o.timeout;
1055
1055
  function w() {
1056
1056
  if (!g)
1057
1057
  return;
1058
- const E = k.from(
1058
+ const E = D.from(
1059
1059
  "getAllResponseHeaders" in g && g.getAllResponseHeaders()
1060
1060
  ), _ = {
1061
1061
  data: !a || a === "text" || a === "json" ? g.responseText : g.response,
@@ -1089,11 +1089,11 @@ const Rn = (e) => {
1089
1089
  )), g = null;
1090
1090
  }, i === void 0 && s.setContentType(null), "setRequestHeader" in g && f.forEach(s.toJSON(), function(R, _) {
1091
1091
  g.setRequestHeader(_, R);
1092
- }), f.isUndefined(o.withCredentials) || (g.withCredentials = !!o.withCredentials), a && a !== "json" && (g.responseType = o.responseType), l && ([m, d] = Re(l, !0), g.addEventListener("progress", m)), u && g.upload && ([h, y] = Re(u), g.upload.addEventListener("progress", h), g.upload.addEventListener("loadend", y)), (o.cancelToken || o.signal) && (c = (E) => {
1092
+ }), f.isUndefined(o.withCredentials) || (g.withCredentials = !!o.withCredentials), a && a !== "json" && (g.responseType = o.responseType), c && ([m, d] = Re(c, !0), g.addEventListener("progress", m)), u && g.upload && ([h, y] = Re(u), g.upload.addEventListener("progress", h), g.upload.addEventListener("loadend", y)), (o.cancelToken || o.signal) && (l = (E) => {
1093
1093
  g && (n(!E || E.type ? new ae(null, e, g) : E), g.abort(), g = null);
1094
- }, o.cancelToken && o.cancelToken.subscribe(c), o.signal && (o.signal.aborted ? c() : o.signal.addEventListener("abort", c)));
1094
+ }, o.cancelToken && o.cancelToken.subscribe(l), o.signal && (o.signal.aborted ? l() : o.signal.addEventListener("abort", l)));
1095
1095
  const P = Kr(o.url);
1096
- if (P && x.protocols.indexOf(P) === -1) {
1096
+ if (P && F.protocols.indexOf(P) === -1) {
1097
1097
  n(new I("Unsupported protocol " + P + ":", I.ERR_BAD_REQUEST, e));
1098
1098
  return;
1099
1099
  }
@@ -1103,22 +1103,22 @@ const Rn = (e) => {
1103
1103
  const { length: r } = e = e ? e.filter(Boolean) : [];
1104
1104
  if (t || r) {
1105
1105
  let n = new AbortController(), o;
1106
- const i = function(l) {
1106
+ const i = function(c) {
1107
1107
  if (!o) {
1108
1108
  o = !0, a();
1109
- const c = l instanceof Error ? l : this.reason;
1110
- n.abort(c instanceof I ? c : new ae(c instanceof Error ? c.message : c));
1109
+ const l = c instanceof Error ? c : this.reason;
1110
+ n.abort(l instanceof I ? l : new ae(l instanceof Error ? l.message : l));
1111
1111
  }
1112
1112
  };
1113
1113
  let s = t && setTimeout(() => {
1114
1114
  s = null, i(new I(`timeout ${t} of ms exceeded`, I.ETIMEDOUT));
1115
1115
  }, t);
1116
1116
  const a = () => {
1117
- e && (s && clearTimeout(s), s = null, e.forEach((l) => {
1118
- l.unsubscribe ? l.unsubscribe(i) : l.removeEventListener("abort", i);
1117
+ e && (s && clearTimeout(s), s = null, e.forEach((c) => {
1118
+ c.unsubscribe ? c.unsubscribe(i) : c.removeEventListener("abort", i);
1119
1119
  }), e = null);
1120
1120
  };
1121
- e.forEach((l) => l.addEventListener("abort", i));
1121
+ e.forEach((c) => c.addEventListener("abort", i));
1122
1122
  const { signal: u } = n;
1123
1123
  return u.unsubscribe = () => f.asap(a), u;
1124
1124
  }
@@ -1150,7 +1150,7 @@ const Rn = (e) => {
1150
1150
  } finally {
1151
1151
  await t.cancel();
1152
1152
  }
1153
- }, St = (e, t, r, n) => {
1153
+ }, Ct = (e, t, r, n) => {
1154
1154
  const o = oo(e, t);
1155
1155
  let i = 0, s, a = (u) => {
1156
1156
  s || (s = !0, n && n(u));
@@ -1158,19 +1158,19 @@ const Rn = (e) => {
1158
1158
  return new ReadableStream({
1159
1159
  async pull(u) {
1160
1160
  try {
1161
- const { done: l, value: c } = await o.next();
1162
- if (l) {
1161
+ const { done: c, value: l } = await o.next();
1162
+ if (c) {
1163
1163
  a(), u.close();
1164
1164
  return;
1165
1165
  }
1166
- let h = c.byteLength;
1166
+ let h = l.byteLength;
1167
1167
  if (r) {
1168
1168
  let m = i += h;
1169
1169
  r(m);
1170
1170
  }
1171
- u.enqueue(new Uint8Array(c));
1172
- } catch (l) {
1173
- throw a(l), l;
1171
+ u.enqueue(new Uint8Array(l));
1172
+ } catch (c) {
1173
+ throw a(c), c;
1174
1174
  }
1175
1175
  },
1176
1176
  cancel(u) {
@@ -1179,13 +1179,13 @@ const Rn = (e) => {
1179
1179
  }, {
1180
1180
  highWaterMark: 2
1181
1181
  });
1182
- }, Rt = 64 * 1024, { isFunction: we } = f, so = (({ Request: e, Response: t }) => ({
1182
+ }, St = 64 * 1024, { isFunction: we } = f, so = (({ Request: e, Response: t }) => ({
1183
1183
  Request: e,
1184
1184
  Response: t
1185
1185
  }))(f.global), {
1186
- ReadableStream: Tt,
1187
- TextEncoder: At
1188
- } = f.global, Bt = (e, ...t) => {
1186
+ ReadableStream: Rt,
1187
+ TextEncoder: Tt
1188
+ } = f.global, At = (e, ...t) => {
1189
1189
  try {
1190
1190
  return !!e(...t);
1191
1191
  } catch {
@@ -1198,18 +1198,18 @@ const Rn = (e) => {
1198
1198
  const { fetch: t, Request: r, Response: n } = e, o = t ? we(t) : typeof fetch == "function", i = we(r), s = we(n);
1199
1199
  if (!o)
1200
1200
  return !1;
1201
- const a = o && we(Tt), u = o && (typeof At == "function" ? /* @__PURE__ */ ((d) => (p) => d.encode(p))(new At()) : async (d) => new Uint8Array(await new r(d).arrayBuffer())), l = i && a && Bt(() => {
1201
+ const a = o && we(Rt), u = o && (typeof Tt == "function" ? /* @__PURE__ */ ((d) => (p) => d.encode(p))(new Tt()) : async (d) => new Uint8Array(await new r(d).arrayBuffer())), c = i && a && At(() => {
1202
1202
  let d = !1;
1203
- const p = new r(x.origin, {
1204
- body: new Tt(),
1203
+ const p = new r(F.origin, {
1204
+ body: new Rt(),
1205
1205
  method: "POST",
1206
1206
  get duplex() {
1207
1207
  return d = !0, "half";
1208
1208
  }
1209
1209
  }).headers.has("Content-Type");
1210
1210
  return d && !p;
1211
- }), c = s && a && Bt(() => f.isReadableStream(new n("").body)), h = {
1212
- stream: c && ((d) => d.body)
1211
+ }), l = s && a && At(() => f.isReadableStream(new n("").body)), h = {
1212
+ stream: l && ((d) => d.body)
1213
1213
  };
1214
1214
  o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
1215
1215
  !h[d] && (h[d] = (p, g) => {
@@ -1225,7 +1225,7 @@ const Rn = (e) => {
1225
1225
  if (f.isBlob(d))
1226
1226
  return d.size;
1227
1227
  if (f.isSpecCompliantForm(d))
1228
- return (await new r(x.origin, {
1228
+ return (await new r(F.origin, {
1229
1229
  method: "POST",
1230
1230
  body: d
1231
1231
  }).arrayBuffer()).byteLength;
@@ -1259,18 +1259,18 @@ const Rn = (e) => {
1259
1259
  });
1260
1260
  let q;
1261
1261
  try {
1262
- if (b && l && g !== "get" && g !== "head" && (q = await y(A, w)) !== 0) {
1263
- let D = new r(p, {
1262
+ if (b && c && g !== "get" && g !== "head" && (q = await y(A, w)) !== 0) {
1263
+ let k = new r(p, {
1264
1264
  method: "POST",
1265
1265
  body: w,
1266
1266
  duplex: "half"
1267
- }), $;
1268
- if (f.isFormData(w) && ($ = D.headers.get("content-type")) && A.setContentType($), D.body) {
1269
- const [G, te] = bt(
1267
+ }), V;
1268
+ if (f.isFormData(w) && (V = k.headers.get("content-type")) && A.setContentType(V), k.body) {
1269
+ const [G, te] = wt(
1270
1270
  q,
1271
- Re(Et(b))
1271
+ Re(bt(b))
1272
1272
  );
1273
- w = St(D.body, Rt, G, te);
1273
+ w = Ct(k.body, St, G, te);
1274
1274
  }
1275
1275
  }
1276
1276
  f.isString(C) || (C = C ? "include" : "omit");
@@ -1285,29 +1285,29 @@ const Rn = (e) => {
1285
1285
  };
1286
1286
  T = i && new r(p, me);
1287
1287
  let j = await (i ? B(T, L) : B(p, me));
1288
- const ye = c && (S === "stream" || S === "response");
1289
- if (c && (_ || ye && O)) {
1290
- const D = {};
1288
+ const ye = l && (S === "stream" || S === "response");
1289
+ if (l && (_ || ye && O)) {
1290
+ const k = {};
1291
1291
  ["status", "statusText", "headers"].forEach((ne) => {
1292
- D[ne] = j[ne];
1292
+ k[ne] = j[ne];
1293
1293
  });
1294
- const $ = f.toFiniteNumber(j.headers.get("content-length")), [G, te] = _ && bt(
1295
- $,
1296
- Re(Et(_), !0)
1294
+ const V = f.toFiniteNumber(j.headers.get("content-length")), [G, te] = _ && wt(
1295
+ V,
1296
+ Re(bt(_), !0)
1297
1297
  ) || [];
1298
1298
  j = new n(
1299
- St(j.body, Rt, G, () => {
1299
+ Ct(j.body, St, G, () => {
1300
1300
  te && te(), O && O();
1301
1301
  }),
1302
- D
1302
+ k
1303
1303
  );
1304
1304
  }
1305
1305
  S = S || "text";
1306
1306
  let ue = await h[f.findKey(h, S) || "text"](j, d);
1307
- return !ye && O && O(), await new Promise((D, $) => {
1308
- Cn(D, $, {
1307
+ return !ye && O && O(), await new Promise((k, V) => {
1308
+ Cn(k, V, {
1309
1309
  data: ue,
1310
- headers: k.from(j.headers),
1310
+ headers: D.from(j.headers),
1311
1311
  status: j.status,
1312
1312
  statusText: j.statusText,
1313
1313
  config: d,
@@ -1330,20 +1330,20 @@ const Rn = (e) => {
1330
1330
  o,
1331
1331
  r
1332
1332
  ];
1333
- let s = i.length, a = s, u, l, c = uo;
1333
+ let s = i.length, a = s, u, c, l = uo;
1334
1334
  for (; a--; )
1335
- u = i[a], l = c.get(u), l === void 0 && c.set(u, l = a ? /* @__PURE__ */ new Map() : ao(t)), c = l;
1336
- return l;
1335
+ u = i[a], c = l.get(u), c === void 0 && l.set(u, c = a ? /* @__PURE__ */ new Map() : ao(t)), l = c;
1336
+ return c;
1337
1337
  };
1338
1338
  Tn();
1339
- const ct = {
1339
+ const lt = {
1340
1340
  http: Ar,
1341
1341
  xhr: to,
1342
1342
  fetch: {
1343
1343
  get: Tn
1344
1344
  }
1345
1345
  };
1346
- f.forEach(ct, (e, t) => {
1346
+ f.forEach(lt, (e, t) => {
1347
1347
  if (e) {
1348
1348
  try {
1349
1349
  Object.defineProperty(e, "name", { value: t });
@@ -1352,8 +1352,8 @@ f.forEach(ct, (e, t) => {
1352
1352
  Object.defineProperty(e, "adapterName", { value: t });
1353
1353
  }
1354
1354
  });
1355
- const Nt = (e) => `- ${e}`, lo = (e) => f.isFunction(e) || e === null || e === !1;
1356
- function co(e, t) {
1355
+ const Bt = (e) => `- ${e}`, co = (e) => f.isFunction(e) || e === null || e === !1;
1356
+ function lo(e, t) {
1357
1357
  e = f.isArray(e) ? e : [e];
1358
1358
  const { length: r } = e;
1359
1359
  let n, o;
@@ -1361,7 +1361,7 @@ function co(e, t) {
1361
1361
  for (let s = 0; s < r; s++) {
1362
1362
  n = e[s];
1363
1363
  let a;
1364
- if (o = n, !lo(n) && (o = ct[(a = String(n)).toLowerCase()], o === void 0))
1364
+ if (o = n, !co(n) && (o = lt[(a = String(n)).toLowerCase()], o === void 0))
1365
1365
  throw new I(`Unknown adapter '${a}'`);
1366
1366
  if (o && (f.isFunction(o) || (o = o.get(t))))
1367
1367
  break;
@@ -1369,11 +1369,11 @@ function co(e, t) {
1369
1369
  }
1370
1370
  if (!o) {
1371
1371
  const s = Object.entries(i).map(
1372
- ([u, l]) => `adapter ${u} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
1372
+ ([u, c]) => `adapter ${u} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build")
1373
1373
  );
1374
1374
  let a = r ? s.length > 1 ? `since :
1375
- ` + s.map(Nt).join(`
1376
- `) : " " + Nt(s[0]) : "as no adapter specified";
1375
+ ` + s.map(Bt).join(`
1376
+ `) : " " + Bt(s[0]) : "as no adapter specified";
1377
1377
  throw new I(
1378
1378
  "There is no suitable adapter to dispatch the request " + a,
1379
1379
  "ERR_NOT_SUPPORT"
@@ -1386,19 +1386,19 @@ const An = {
1386
1386
  * Resolve an adapter from a list of adapter names or functions.
1387
1387
  * @type {Function}
1388
1388
  */
1389
- getAdapter: co,
1389
+ getAdapter: lo,
1390
1390
  /**
1391
1391
  * Exposes all known adapters
1392
1392
  * @type {Object<string, Function|Object>}
1393
1393
  */
1394
- adapters: ct
1394
+ adapters: lt
1395
1395
  };
1396
1396
  function _e(e) {
1397
1397
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1398
1398
  throw new ae(null, e);
1399
1399
  }
1400
- function Pt(e) {
1401
- return _e(e), e.headers = k.from(e.headers), e.data = Ie.call(
1400
+ function Nt(e) {
1401
+ return _e(e), e.headers = D.from(e.headers), e.data = Ie.call(
1402
1402
  e,
1403
1403
  e.transformRequest
1404
1404
  ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), An.getAdapter(e.adapter || ge.adapter, e)(e).then(function(n) {
@@ -1406,13 +1406,13 @@ function Pt(e) {
1406
1406
  e,
1407
1407
  e.transformResponse,
1408
1408
  n
1409
- ), n.headers = k.from(n.headers), n;
1409
+ ), n.headers = D.from(n.headers), n;
1410
1410
  }, function(n) {
1411
1411
  return En(n) || (_e(e), n && n.response && (n.response.data = Ie.call(
1412
1412
  e,
1413
1413
  e.transformResponse,
1414
1414
  n.response
1415
- ), n.response.headers = k.from(n.response.headers))), Promise.reject(n);
1415
+ ), n.response.headers = D.from(n.response.headers))), Promise.reject(n);
1416
1416
  });
1417
1417
  }
1418
1418
  const Bn = "1.13.1", Pe = {};
@@ -1421,7 +1421,7 @@ const Bn = "1.13.1", Pe = {};
1421
1421
  return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
1422
1422
  };
1423
1423
  });
1424
- const Ot = {};
1424
+ const Pt = {};
1425
1425
  Pe.transitional = function(t, r, n) {
1426
1426
  function o(i, s) {
1427
1427
  return "[Axios v" + Bn + "] Transitional option '" + i + "'" + s + (n ? ". " + n : "");
@@ -1432,7 +1432,7 @@ Pe.transitional = function(t, r, n) {
1432
1432
  o(s, " has been removed" + (r ? " in " + r : "")),
1433
1433
  I.ERR_DEPRECATED
1434
1434
  );
1435
- return r && !Ot[s] && (Ot[s] = !0, console.warn(
1435
+ return r && !Pt[s] && (Pt[s] = !0, console.warn(
1436
1436
  o(
1437
1437
  s,
1438
1438
  " has been deprecated since v" + r + " and will be removed in the near future"
@@ -1467,8 +1467,8 @@ const Se = {
1467
1467
  let Y = class {
1468
1468
  constructor(t) {
1469
1469
  this.defaults = t || {}, this.interceptors = {
1470
- request: new yt(),
1471
- response: new yt()
1470
+ request: new mt(),
1471
+ response: new mt()
1472
1472
  };
1473
1473
  }
1474
1474
  /**
@@ -1521,22 +1521,22 @@ let Y = class {
1521
1521
  (d) => {
1522
1522
  delete i[d];
1523
1523
  }
1524
- ), r.headers = k.concat(s, i);
1524
+ ), r.headers = D.concat(s, i);
1525
1525
  const a = [];
1526
1526
  let u = !0;
1527
1527
  this.interceptors.request.forEach(function(p) {
1528
1528
  typeof p.runWhen == "function" && p.runWhen(r) === !1 || (u = u && p.synchronous, a.unshift(p.fulfilled, p.rejected));
1529
1529
  });
1530
- const l = [];
1530
+ const c = [];
1531
1531
  this.interceptors.response.forEach(function(p) {
1532
- l.push(p.fulfilled, p.rejected);
1532
+ c.push(p.fulfilled, p.rejected);
1533
1533
  });
1534
- let c, h = 0, m;
1534
+ let l, h = 0, m;
1535
1535
  if (!u) {
1536
- const d = [Pt.bind(this), void 0];
1537
- for (d.unshift(...a), d.push(...l), m = d.length, c = Promise.resolve(r); h < m; )
1538
- c = c.then(d[h++], d[h++]);
1539
- return c;
1536
+ const d = [Nt.bind(this), void 0];
1537
+ for (d.unshift(...a), d.push(...c), m = d.length, l = Promise.resolve(r); h < m; )
1538
+ l = l.then(d[h++], d[h++]);
1539
+ return l;
1540
1540
  }
1541
1541
  m = a.length;
1542
1542
  let y = r;
@@ -1550,13 +1550,13 @@ let Y = class {
1550
1550
  }
1551
1551
  }
1552
1552
  try {
1553
- c = Pt.call(this, y);
1553
+ l = Nt.call(this, y);
1554
1554
  } catch (d) {
1555
1555
  return Promise.reject(d);
1556
1556
  }
1557
- for (h = 0, m = l.length; h < m; )
1558
- c = c.then(l[h++], l[h++]);
1559
- return c;
1557
+ for (h = 0, m = c.length; h < m; )
1558
+ l = l.then(c[h++], c[h++]);
1559
+ return l;
1560
1560
  }
1561
1561
  getUri(t) {
1562
1562
  t = X(this.defaults, t);
@@ -1764,28 +1764,28 @@ U.all = function(t) {
1764
1764
  U.spread = po;
1765
1765
  U.isAxiosError = go;
1766
1766
  U.mergeConfig = X;
1767
- U.AxiosHeaders = k;
1767
+ U.AxiosHeaders = D;
1768
1768
  U.formToJSON = (e) => bn(f.isHTMLForm(e) ? new FormData(e) : e);
1769
1769
  U.getAdapter = An.getAdapter;
1770
1770
  U.HttpStatusCode = st;
1771
1771
  U.default = U;
1772
1772
  const {
1773
- Axios: Ko,
1774
- AxiosError: Wo,
1775
- CanceledError: Go,
1776
- isCancel: Qo,
1777
- CancelToken: Yo,
1778
- VERSION: Xo,
1779
- all: Zo,
1780
- Cancel: ei,
1781
- isAxiosError: ti,
1782
- spread: ni,
1783
- toFormData: ri,
1784
- AxiosHeaders: oi,
1785
- HttpStatusCode: ii,
1786
- formToJSON: si,
1787
- getAdapter: ai,
1788
- mergeConfig: ui
1773
+ Axios: Wo,
1774
+ AxiosError: Go,
1775
+ CanceledError: Qo,
1776
+ isCancel: Yo,
1777
+ CancelToken: Xo,
1778
+ VERSION: Zo,
1779
+ all: ei,
1780
+ Cancel: ti,
1781
+ isAxiosError: ni,
1782
+ spread: ri,
1783
+ toFormData: oi,
1784
+ AxiosHeaders: ii,
1785
+ HttpStatusCode: si,
1786
+ formToJSON: ai,
1787
+ getAdapter: ui,
1788
+ mergeConfig: ci
1789
1789
  } = U, mo = `.oauth-modal-overlay {\r
1790
1790
  position: fixed;\r
1791
1791
  top: 0;\r
@@ -1955,16 +1955,16 @@ const {
1955
1955
  margin-top: -10px;\r
1956
1956
  margin-bottom: 10px;\r
1957
1957
  }`;
1958
- var oe = {}, Ue, Lt;
1958
+ var oe = {}, Ue, Ot;
1959
1959
  function yo() {
1960
- return Lt || (Lt = 1, Ue = function() {
1960
+ return Ot || (Ot = 1, Ue = function() {
1961
1961
  return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
1962
1962
  }), Ue;
1963
1963
  }
1964
- var ve = {}, W = {}, It;
1964
+ var ve = {}, W = {}, Lt;
1965
1965
  function Z() {
1966
- if (It) return W;
1967
- It = 1;
1966
+ if (Lt) return W;
1967
+ Lt = 1;
1968
1968
  let e;
1969
1969
  const t = [
1970
1970
  0,
@@ -2031,9 +2031,9 @@ function Z() {
2031
2031
  return e(n);
2032
2032
  }, W;
2033
2033
  }
2034
- var xe = {}, _t;
2034
+ var xe = {}, It;
2035
2035
  function ft() {
2036
- return _t || (_t = 1, (function(e) {
2036
+ return It || (It = 1, (function(e) {
2037
2037
  e.L = { bit: 1 }, e.M = { bit: 0 }, e.Q = { bit: 3 }, e.H = { bit: 2 };
2038
2038
  function t(r) {
2039
2039
  if (typeof r != "string")
@@ -2068,10 +2068,10 @@ function ft() {
2068
2068
  };
2069
2069
  })(xe)), xe;
2070
2070
  }
2071
- var Fe, Ut;
2071
+ var Fe, _t;
2072
2072
  function wo() {
2073
- if (Ut) return Fe;
2074
- Ut = 1;
2073
+ if (_t) return Fe;
2074
+ _t = 1;
2075
2075
  function e() {
2076
2076
  this.buffer = [], this.length = 0;
2077
2077
  }
@@ -2093,10 +2093,10 @@ function wo() {
2093
2093
  }
2094
2094
  }, Fe = e, Fe;
2095
2095
  }
2096
- var Me, vt;
2096
+ var Me, Ut;
2097
2097
  function bo() {
2098
- if (vt) return Me;
2099
- vt = 1;
2098
+ if (Ut) return Me;
2099
+ Ut = 1;
2100
2100
  function e(t) {
2101
2101
  if (!t || t < 1)
2102
2102
  throw new Error("BitMatrix size must be defined and greater than 0");
@@ -2113,9 +2113,9 @@ function bo() {
2113
2113
  return this.reservedBit[t * this.size + r];
2114
2114
  }, Me = e, Me;
2115
2115
  }
2116
- var ke = {}, xt;
2116
+ var De = {}, vt;
2117
2117
  function Eo() {
2118
- return xt || (xt = 1, (function(e) {
2118
+ return vt || (vt = 1, (function(e) {
2119
2119
  const t = Z().getSymbolSize;
2120
2120
  e.getRowColCoords = function(n) {
2121
2121
  if (n === 1) return [];
@@ -2132,14 +2132,14 @@ function Eo() {
2132
2132
  a === s - 1 && u === 0 || o.push([i[a], i[u]]);
2133
2133
  return o;
2134
2134
  };
2135
- })(ke)), ke;
2135
+ })(De)), De;
2136
2136
  }
2137
- var De = {}, Ft;
2137
+ var ke = {}, xt;
2138
2138
  function Co() {
2139
- if (Ft) return De;
2140
- Ft = 1;
2139
+ if (xt) return ke;
2140
+ xt = 1;
2141
2141
  const e = Z().getSymbolSize, t = 7;
2142
- return De.getPositions = function(n) {
2142
+ return ke.getPositions = function(n) {
2143
2143
  const o = e(n);
2144
2144
  return [
2145
2145
  // top-left
@@ -2149,11 +2149,11 @@ function Co() {
2149
2149
  // bottom-left
2150
2150
  [0, o - t]
2151
2151
  ];
2152
- }, De;
2152
+ }, ke;
2153
2153
  }
2154
- var qe = {}, Mt;
2154
+ var qe = {}, Ft;
2155
2155
  function So() {
2156
- return Mt || (Mt = 1, (function(e) {
2156
+ return Ft || (Ft = 1, (function(e) {
2157
2157
  e.Patterns = {
2158
2158
  PATTERN000: 0,
2159
2159
  PATTERN001: 1,
@@ -2176,12 +2176,12 @@ function So() {
2176
2176
  return e.isValid(o) ? parseInt(o, 10) : void 0;
2177
2177
  }, e.getPenaltyN1 = function(o) {
2178
2178
  const i = o.size;
2179
- let s = 0, a = 0, u = 0, l = null, c = null;
2179
+ let s = 0, a = 0, u = 0, c = null, l = null;
2180
2180
  for (let h = 0; h < i; h++) {
2181
- a = u = 0, l = c = null;
2181
+ a = u = 0, c = l = null;
2182
2182
  for (let m = 0; m < i; m++) {
2183
2183
  let y = o.get(h, m);
2184
- y === l ? a++ : (a >= 5 && (s += t.N1 + (a - 5)), l = y, a = 1), y = o.get(m, h), y === c ? u++ : (u >= 5 && (s += t.N1 + (u - 5)), c = y, u = 1);
2184
+ y === c ? a++ : (a >= 5 && (s += t.N1 + (a - 5)), c = y, a = 1), y = o.get(m, h), y === l ? u++ : (u >= 5 && (s += t.N1 + (u - 5)), l = y, u = 1);
2185
2185
  }
2186
2186
  a >= 5 && (s += t.N1 + (a - 5)), u >= 5 && (s += t.N1 + (u - 5));
2187
2187
  }
@@ -2191,17 +2191,17 @@ function So() {
2191
2191
  let s = 0;
2192
2192
  for (let a = 0; a < i - 1; a++)
2193
2193
  for (let u = 0; u < i - 1; u++) {
2194
- const l = o.get(a, u) + o.get(a, u + 1) + o.get(a + 1, u) + o.get(a + 1, u + 1);
2195
- (l === 4 || l === 0) && s++;
2194
+ const c = o.get(a, u) + o.get(a, u + 1) + o.get(a + 1, u) + o.get(a + 1, u + 1);
2195
+ (c === 4 || c === 0) && s++;
2196
2196
  }
2197
2197
  return s * t.N2;
2198
2198
  }, e.getPenaltyN3 = function(o) {
2199
2199
  const i = o.size;
2200
2200
  let s = 0, a = 0, u = 0;
2201
- for (let l = 0; l < i; l++) {
2201
+ for (let c = 0; c < i; c++) {
2202
2202
  a = u = 0;
2203
- for (let c = 0; c < i; c++)
2204
- a = a << 1 & 2047 | o.get(l, c), c >= 10 && (a === 1488 || a === 93) && s++, u = u << 1 & 2047 | o.get(c, l), c >= 10 && (u === 1488 || u === 93) && s++;
2203
+ for (let l = 0; l < i; l++)
2204
+ a = a << 1 & 2047 | o.get(c, l), l >= 10 && (a === 1488 || a === 93) && s++, u = u << 1 & 2047 | o.get(l, c), l >= 10 && (u === 1488 || u === 93) && s++;
2205
2205
  }
2206
2206
  return s * t.N3;
2207
2207
  }, e.getPenaltyN4 = function(o) {
@@ -2240,19 +2240,19 @@ function So() {
2240
2240
  }, e.getBestMask = function(o, i) {
2241
2241
  const s = Object.keys(e.Patterns).length;
2242
2242
  let a = 0, u = 1 / 0;
2243
- for (let l = 0; l < s; l++) {
2244
- i(l), e.applyMask(l, o);
2245
- const c = e.getPenaltyN1(o) + e.getPenaltyN2(o) + e.getPenaltyN3(o) + e.getPenaltyN4(o);
2246
- e.applyMask(l, o), c < u && (u = c, a = l);
2243
+ for (let c = 0; c < s; c++) {
2244
+ i(c), e.applyMask(c, o);
2245
+ const l = e.getPenaltyN1(o) + e.getPenaltyN2(o) + e.getPenaltyN3(o) + e.getPenaltyN4(o);
2246
+ e.applyMask(c, o), l < u && (u = l, a = c);
2247
2247
  }
2248
2248
  return a;
2249
2249
  };
2250
2250
  })(qe)), qe;
2251
2251
  }
2252
- var be = {}, kt;
2252
+ var be = {}, Mt;
2253
2253
  function On() {
2254
- if (kt) return be;
2255
- kt = 1;
2254
+ if (Mt) return be;
2255
+ Mt = 1;
2256
2256
  const e = ft(), t = [
2257
2257
  // L M Q H
2258
2258
  1,
@@ -2606,9 +2606,9 @@ function On() {
2606
2606
  }
2607
2607
  }, be;
2608
2608
  }
2609
- var je = {}, ce = {}, Dt;
2609
+ var je = {}, le = {}, Dt;
2610
2610
  function Ro() {
2611
- if (Dt) return ce;
2611
+ if (Dt) return le;
2612
2612
  Dt = 1;
2613
2613
  const e = new Uint8Array(512), t = new Uint8Array(256);
2614
2614
  return (function() {
@@ -2617,18 +2617,18 @@ function Ro() {
2617
2617
  e[o] = n, t[n] = o, n <<= 1, n & 256 && (n ^= 285);
2618
2618
  for (let o = 255; o < 512; o++)
2619
2619
  e[o] = e[o - 255];
2620
- })(), ce.log = function(n) {
2620
+ })(), le.log = function(n) {
2621
2621
  if (n < 1) throw new Error("log(" + n + ")");
2622
2622
  return t[n];
2623
- }, ce.exp = function(n) {
2623
+ }, le.exp = function(n) {
2624
2624
  return e[n];
2625
- }, ce.mul = function(n, o) {
2625
+ }, le.mul = function(n, o) {
2626
2626
  return n === 0 || o === 0 ? 0 : e[t[n] + t[o]];
2627
- }, ce;
2627
+ }, le;
2628
2628
  }
2629
- var qt;
2629
+ var kt;
2630
2630
  function To() {
2631
- return qt || (qt = 1, (function(e) {
2631
+ return kt || (kt = 1, (function(e) {
2632
2632
  const t = Ro();
2633
2633
  e.mul = function(n, o) {
2634
2634
  const i = new Uint8Array(n.length + o.length - 1);
@@ -2655,10 +2655,10 @@ function To() {
2655
2655
  };
2656
2656
  })(je)), je;
2657
2657
  }
2658
- var He, jt;
2658
+ var He, qt;
2659
2659
  function Ao() {
2660
- if (jt) return He;
2661
- jt = 1;
2660
+ if (qt) return He;
2661
+ qt = 1;
2662
2662
  const e = To();
2663
2663
  function t(r) {
2664
2664
  this.genPoly = void 0, this.degree = r, this.degree && this.initialize(this.degree);
@@ -2678,34 +2678,34 @@ function Ao() {
2678
2678
  return i;
2679
2679
  }, He = t, He;
2680
2680
  }
2681
- var ze = {}, Ve = {}, $e = {}, Ht;
2681
+ var ze = {}, $e = {}, Ve = {}, jt;
2682
2682
  function Ln() {
2683
- return Ht || (Ht = 1, $e.isValid = function(t) {
2683
+ return jt || (jt = 1, Ve.isValid = function(t) {
2684
2684
  return !isNaN(t) && t >= 1 && t <= 40;
2685
- }), $e;
2685
+ }), Ve;
2686
2686
  }
2687
- var V = {}, zt;
2687
+ var $ = {}, Ht;
2688
2688
  function In() {
2689
- if (zt) return V;
2690
- zt = 1;
2689
+ if (Ht) return $;
2690
+ Ht = 1;
2691
2691
  const e = "[0-9]+", t = "[A-Z $%*+\\-./:]+";
2692
2692
  let r = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
2693
2693
  r = r.replace(/u/g, "\\u");
2694
2694
  const n = "(?:(?![A-Z0-9 $%*+\\-./:]|" + r + `)(?:.|[\r
2695
2695
  ]))+`;
2696
- V.KANJI = new RegExp(r, "g"), V.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), V.BYTE = new RegExp(n, "g"), V.NUMERIC = new RegExp(e, "g"), V.ALPHANUMERIC = new RegExp(t, "g");
2696
+ $.KANJI = new RegExp(r, "g"), $.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), $.BYTE = new RegExp(n, "g"), $.NUMERIC = new RegExp(e, "g"), $.ALPHANUMERIC = new RegExp(t, "g");
2697
2697
  const o = new RegExp("^" + r + "$"), i = new RegExp("^" + e + "$"), s = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
2698
- return V.testKanji = function(u) {
2698
+ return $.testKanji = function(u) {
2699
2699
  return o.test(u);
2700
- }, V.testNumeric = function(u) {
2700
+ }, $.testNumeric = function(u) {
2701
2701
  return i.test(u);
2702
- }, V.testAlphanumeric = function(u) {
2702
+ }, $.testAlphanumeric = function(u) {
2703
2703
  return s.test(u);
2704
- }, V;
2704
+ }, $;
2705
2705
  }
2706
- var Vt;
2706
+ var zt;
2707
2707
  function ee() {
2708
- return Vt || (Vt = 1, (function(e) {
2708
+ return zt || (zt = 1, (function(e) {
2709
2709
  const t = Ln(), r = In();
2710
2710
  e.NUMERIC = {
2711
2711
  id: "Numeric",
@@ -2763,7 +2763,7 @@ function ee() {
2763
2763
  return s;
2764
2764
  }
2765
2765
  };
2766
- })(Ve)), Ve;
2766
+ })($e)), $e;
2767
2767
  }
2768
2768
  var $t;
2769
2769
  function Bo() {
@@ -2774,19 +2774,19 @@ function Bo() {
2774
2774
  if (y <= e.getCapacity(p, d, m))
2775
2775
  return p;
2776
2776
  }
2777
- function l(m, y) {
2777
+ function c(m, y) {
2778
2778
  return o.getCharCountIndicator(m, y) + 4;
2779
2779
  }
2780
- function c(m, y) {
2780
+ function l(m, y) {
2781
2781
  let d = 0;
2782
2782
  return m.forEach(function(p) {
2783
- const g = l(p.mode, y);
2783
+ const g = c(p.mode, y);
2784
2784
  d += g + p.getBitsLength();
2785
2785
  }), d;
2786
2786
  }
2787
2787
  function h(m, y) {
2788
2788
  for (let d = 1; d <= 40; d++)
2789
- if (c(m, d) <= e.getCapacity(d, y, o.MIXED))
2789
+ if (l(m, d) <= e.getCapacity(d, y, o.MIXED))
2790
2790
  return d;
2791
2791
  }
2792
2792
  e.from = function(y, d) {
@@ -2797,7 +2797,7 @@ function Bo() {
2797
2797
  typeof p > "u" && (p = o.BYTE);
2798
2798
  const g = t.getSymbolTotalCodewords(y), w = r.getTotalCodewordsCount(y, d), P = (g - w) * 8;
2799
2799
  if (p === o.MIXED) return P;
2800
- const E = P - l(p, y);
2800
+ const E = P - c(p, y);
2801
2801
  switch (p) {
2802
2802
  case o.NUMERIC:
2803
2803
  return Math.floor(E / 10 * 3);
@@ -2831,10 +2831,10 @@ function Bo() {
2831
2831
  };
2832
2832
  })(ze)), ze;
2833
2833
  }
2834
- var Je = {}, Jt;
2834
+ var Je = {}, Vt;
2835
2835
  function No() {
2836
- if (Jt) return Je;
2837
- Jt = 1;
2836
+ if (Vt) return Je;
2837
+ Vt = 1;
2838
2838
  const e = Z(), t = 1335, r = 21522, n = e.getBCHDigit(t);
2839
2839
  return Je.getEncodedBits = function(i, s) {
2840
2840
  const a = i.bit << 3 | s;
@@ -2844,10 +2844,10 @@ function No() {
2844
2844
  return (a << 10 | u) ^ r;
2845
2845
  }, Je;
2846
2846
  }
2847
- var Ke = {}, We, Kt;
2847
+ var Ke = {}, We, Jt;
2848
2848
  function Po() {
2849
- if (Kt) return We;
2850
- Kt = 1;
2849
+ if (Jt) return We;
2850
+ Jt = 1;
2851
2851
  const e = ee();
2852
2852
  function t(r) {
2853
2853
  this.mode = e.NUMERIC, this.data = r.toString();
@@ -2866,10 +2866,10 @@ function Po() {
2866
2866
  a > 0 && (i = this.data.substr(o), s = parseInt(i, 10), n.put(s, a * 3 + 1));
2867
2867
  }, We = t, We;
2868
2868
  }
2869
- var Ge, Wt;
2869
+ var Ge, Kt;
2870
2870
  function Oo() {
2871
- if (Wt) return Ge;
2872
- Wt = 1;
2871
+ if (Kt) return Ge;
2872
+ Kt = 1;
2873
2873
  const e = ee(), t = [
2874
2874
  "0",
2875
2875
  "1",
@@ -2935,10 +2935,10 @@ function Oo() {
2935
2935
  this.data.length % 2 && o.put(t.indexOf(this.data[i]), 6);
2936
2936
  }, Ge = r, Ge;
2937
2937
  }
2938
- var Qe, Gt;
2938
+ var Qe, Wt;
2939
2939
  function Lo() {
2940
- if (Gt) return Qe;
2941
- Gt = 1;
2940
+ if (Wt) return Qe;
2941
+ Wt = 1;
2942
2942
  const e = ee();
2943
2943
  function t(r) {
2944
2944
  this.mode = e.BYTE, typeof r == "string" ? this.data = new TextEncoder().encode(r) : this.data = new Uint8Array(r);
@@ -2954,10 +2954,10 @@ function Lo() {
2954
2954
  r.put(this.data[n], 8);
2955
2955
  }, Qe = t, Qe;
2956
2956
  }
2957
- var Ye, Qt;
2957
+ var Ye, Gt;
2958
2958
  function Io() {
2959
- if (Qt) return Ye;
2960
- Qt = 1;
2959
+ if (Gt) return Ye;
2960
+ Gt = 1;
2961
2961
  const e = ee(), t = Z();
2962
2962
  function r(n) {
2963
2963
  this.mode = e.KANJI, this.data = n;
@@ -2985,19 +2985,19 @@ Make sure your charset is UTF-8`
2985
2985
  }
2986
2986
  }, Ye = r, Ye;
2987
2987
  }
2988
- var Xe = { exports: {} }, Yt;
2988
+ var Xe = { exports: {} }, Qt;
2989
2989
  function _o() {
2990
- return Yt || (Yt = 1, (function(e) {
2990
+ return Qt || (Qt = 1, (function(e) {
2991
2991
  var t = {
2992
2992
  single_source_shortest_paths: function(r, n, o) {
2993
2993
  var i = {}, s = {};
2994
2994
  s[n] = 0;
2995
2995
  var a = t.PriorityQueue.make();
2996
2996
  a.push(n, 0);
2997
- for (var u, l, c, h, m, y, d, p, g; !a.empty(); ) {
2998
- u = a.pop(), l = u.value, h = u.cost, m = r[l] || {};
2999
- for (c in m)
3000
- m.hasOwnProperty(c) && (y = m[c], d = h + y, p = s[c], g = typeof s[c] > "u", (g || p > d) && (s[c] = d, a.push(c, d), i[c] = l));
2997
+ for (var u, c, l, h, m, y, d, p, g; !a.empty(); ) {
2998
+ u = a.pop(), c = u.value, h = u.cost, m = r[c] || {};
2999
+ for (l in m)
3000
+ m.hasOwnProperty(l) && (y = m[l], d = h + y, p = s[l], g = typeof s[l] > "u", (g || p > d) && (s[l] = d, a.push(l, d), i[l] = c));
3001
3001
  }
3002
3002
  if (typeof o < "u" && typeof s[o] > "u") {
3003
3003
  var w = ["Could not find a path from ", n, " to ", o, "."].join("");
@@ -3053,14 +3053,14 @@ function _o() {
3053
3053
  e.exports = t;
3054
3054
  })(Xe)), Xe.exports;
3055
3055
  }
3056
- var Xt;
3056
+ var Yt;
3057
3057
  function Uo() {
3058
- return Xt || (Xt = 1, (function(e) {
3058
+ return Yt || (Yt = 1, (function(e) {
3059
3059
  const t = ee(), r = Po(), n = Oo(), o = Lo(), i = Io(), s = In(), a = Z(), u = _o();
3060
- function l(w) {
3060
+ function c(w) {
3061
3061
  return unescape(encodeURIComponent(w)).length;
3062
3062
  }
3063
- function c(w, P, E) {
3063
+ function l(w, P, E) {
3064
3064
  const R = [];
3065
3065
  let _;
3066
3066
  for (; (_ = w.exec(E)) !== null; )
@@ -3073,9 +3073,9 @@ function Uo() {
3073
3073
  return R;
3074
3074
  }
3075
3075
  function h(w) {
3076
- const P = c(s.NUMERIC, t.NUMERIC, w), E = c(s.ALPHANUMERIC, t.ALPHANUMERIC, w);
3076
+ const P = l(s.NUMERIC, t.NUMERIC, w), E = l(s.ALPHANUMERIC, t.ALPHANUMERIC, w);
3077
3077
  let R, _;
3078
- return a.isKanjiModeEnabled() ? (R = c(s.BYTE, t.BYTE, w), _ = c(s.KANJI, t.KANJI, w)) : (R = c(s.BYTE_KANJI, t.BYTE, w), _ = []), P.concat(E, R, _).sort(function(S, A) {
3078
+ return a.isKanjiModeEnabled() ? (R = l(s.BYTE, t.BYTE, w), _ = l(s.KANJI, t.KANJI, w)) : (R = l(s.BYTE_KANJI, t.BYTE, w), _ = []), P.concat(E, R, _).sort(function(S, A) {
3079
3079
  return S.index - A.index;
3080
3080
  }).map(function(S) {
3081
3081
  return {
@@ -3124,12 +3124,12 @@ function Uo() {
3124
3124
  case t.KANJI:
3125
3125
  P.push([
3126
3126
  R,
3127
- { data: R.data, mode: t.BYTE, length: l(R.data) }
3127
+ { data: R.data, mode: t.BYTE, length: c(R.data) }
3128
3128
  ]);
3129
3129
  break;
3130
3130
  case t.BYTE:
3131
3131
  P.push([
3132
- { data: R.data, mode: t.BYTE, length: l(R.data) }
3132
+ { data: R.data, mode: t.BYTE, length: c(R.data) }
3133
3133
  ]);
3134
3134
  }
3135
3135
  }
@@ -3187,11 +3187,11 @@ function Uo() {
3187
3187
  };
3188
3188
  })(Ke)), Ke;
3189
3189
  }
3190
- var Zt;
3190
+ var Xt;
3191
3191
  function vo() {
3192
- if (Zt) return ve;
3193
- Zt = 1;
3194
- const e = Z(), t = ft(), r = wo(), n = bo(), o = Eo(), i = Co(), s = So(), a = On(), u = Ao(), l = Bo(), c = No(), h = ee(), m = Uo();
3192
+ if (Xt) return ve;
3193
+ Xt = 1;
3194
+ const e = Z(), t = ft(), r = wo(), n = bo(), o = Eo(), i = Co(), s = So(), a = On(), u = Ao(), c = Bo(), l = No(), h = ee(), m = Uo();
3195
3195
  function y(b, S) {
3196
3196
  const A = b.size, C = i.getPositions(S);
3197
3197
  for (let L = 0; L < C.length; L++) {
@@ -3219,13 +3219,13 @@ function vo() {
3219
3219
  }
3220
3220
  }
3221
3221
  function g(b, S) {
3222
- const A = b.size, C = l.getEncodedBits(S);
3222
+ const A = b.size, C = c.getEncodedBits(S);
3223
3223
  let L, B, N;
3224
3224
  for (let T = 0; T < 18; T++)
3225
3225
  L = Math.floor(T / 3), B = T % 3 + A - 8 - 3, N = (C >> T & 1) === 1, b.set(L, B, N, !0), b.set(B, L, N, !0);
3226
3226
  }
3227
3227
  function w(b, S, A) {
3228
- const C = b.size, L = c.getEncodedBits(S, A);
3228
+ const C = b.size, L = l.getEncodedBits(S, A);
3229
3229
  let B, N;
3230
3230
  for (B = 0; B < 15; B++)
3231
3231
  N = (L >> B & 1) === 1, B < 6 ? b.set(B, 8, N, !0) : B < 8 ? b.set(B + 1, 8, N, !0) : b.set(C - 15 + B, 8, N, !0), B < 8 ? b.set(8, C - B - 1, N, !0) : B < 9 ? b.set(8, 15 - B - 1 + 1, N, !0) : b.set(8, 15 - B - 1, N, !0);
@@ -3263,21 +3263,21 @@ function vo() {
3263
3263
  function R(b, S, A) {
3264
3264
  const C = e.getSymbolTotalCodewords(S), L = a.getTotalCodewordsCount(S, A), B = C - L, N = a.getBlocksCount(S, A), T = C % N, O = N - T, q = Math.floor(C / N), v = Math.floor(B / N), me = v + 1, j = q - v, ye = new u(j);
3265
3265
  let ue = 0;
3266
- const D = new Array(N), $ = new Array(N);
3266
+ const k = new Array(N), V = new Array(N);
3267
3267
  let G = 0;
3268
3268
  const te = new Uint8Array(b.buffer);
3269
3269
  for (let re = 0; re < N; re++) {
3270
3270
  const Oe = re < O ? v : me;
3271
- D[re] = te.slice(ue, ue + Oe), $[re] = ye.encode(D[re]), ue += Oe, G = Math.max(G, Oe);
3271
+ k[re] = te.slice(ue, ue + Oe), V[re] = ye.encode(k[re]), ue += Oe, G = Math.max(G, Oe);
3272
3272
  }
3273
3273
  const ne = new Uint8Array(C);
3274
- let ht = 0, J, K;
3274
+ let dt = 0, J, K;
3275
3275
  for (J = 0; J < G; J++)
3276
3276
  for (K = 0; K < N; K++)
3277
- J < D[K].length && (ne[ht++] = D[K][J]);
3277
+ J < k[K].length && (ne[dt++] = k[K][J]);
3278
3278
  for (J = 0; J < j; J++)
3279
3279
  for (K = 0; K < N; K++)
3280
- ne[ht++] = $[K][J];
3280
+ ne[dt++] = V[K][J];
3281
3281
  return ne;
3282
3282
  }
3283
3283
  function _(b, S, A, C) {
@@ -3288,12 +3288,12 @@ function vo() {
3288
3288
  let q = S;
3289
3289
  if (!q) {
3290
3290
  const v = m.rawSplit(b);
3291
- q = l.getBestVersionForData(v, A);
3291
+ q = c.getBestVersionForData(v, A);
3292
3292
  }
3293
3293
  L = m.fromString(b, q || 40);
3294
3294
  } else
3295
3295
  throw new Error("Invalid data");
3296
- const B = l.getBestVersionForData(L, A);
3296
+ const B = c.getBestVersionForData(L, A);
3297
3297
  if (!B)
3298
3298
  throw new Error("The amount of data is too big to be stored in a QR Code");
3299
3299
  if (!S)
@@ -3321,12 +3321,12 @@ Minimum version required to store current data is: ` + B + `.
3321
3321
  if (typeof S > "u" || S === "")
3322
3322
  throw new Error("No input text");
3323
3323
  let C = t.M, L, B;
3324
- return typeof A < "u" && (C = t.from(A.errorCorrectionLevel, t.M), L = l.from(A.version), B = s.from(A.maskPattern), A.toSJISFunc && e.setToSJISFunction(A.toSJISFunc)), _(S, L, C, B);
3324
+ return typeof A < "u" && (C = t.from(A.errorCorrectionLevel, t.M), L = c.from(A.version), B = s.from(A.maskPattern), A.toSJISFunc && e.setToSJISFunction(A.toSJISFunc)), _(S, L, C, B);
3325
3325
  }, ve;
3326
3326
  }
3327
- var Ze = {}, et = {}, en;
3327
+ var Ze = {}, et = {}, Zt;
3328
3328
  function _n() {
3329
- return en || (en = 1, (function(e) {
3329
+ return Zt || (Zt = 1, (function(e) {
3330
3330
  function t(r) {
3331
3331
  if (typeof r == "number" && (r = r.toString()), typeof r != "string")
3332
3332
  throw new Error("Color should be defined as hex string");
@@ -3365,12 +3365,12 @@ function _n() {
3365
3365
  const i = e.getScale(n, o);
3366
3366
  return Math.floor((n + o.margin * 2) * i);
3367
3367
  }, e.qrToImageData = function(n, o, i) {
3368
- const s = o.modules.size, a = o.modules.data, u = e.getScale(s, i), l = Math.floor((s + i.margin * 2) * u), c = i.margin * u, h = [i.color.light, i.color.dark];
3369
- for (let m = 0; m < l; m++)
3370
- for (let y = 0; y < l; y++) {
3371
- let d = (m * l + y) * 4, p = i.color.light;
3372
- if (m >= c && y >= c && m < l - c && y < l - c) {
3373
- const g = Math.floor((m - c) / u), w = Math.floor((y - c) / u);
3368
+ const s = o.modules.size, a = o.modules.data, u = e.getScale(s, i), c = Math.floor((s + i.margin * 2) * u), l = i.margin * u, h = [i.color.light, i.color.dark];
3369
+ for (let m = 0; m < c; m++)
3370
+ for (let y = 0; y < c; y++) {
3371
+ let d = (m * c + y) * 4, p = i.color.light;
3372
+ if (m >= l && y >= l && m < c - l && y < c - l) {
3373
+ const g = Math.floor((m - l) / u), w = Math.floor((y - l) / u);
3374
3374
  p = h[a[g * s + w] ? 1 : 0];
3375
3375
  }
3376
3376
  n[d++] = p.r, n[d++] = p.g, n[d++] = p.b, n[d] = p.a;
@@ -3378,9 +3378,9 @@ function _n() {
3378
3378
  };
3379
3379
  })(et)), et;
3380
3380
  }
3381
- var tn;
3381
+ var en;
3382
3382
  function xo() {
3383
- return tn || (tn = 1, (function(e) {
3383
+ return en || (en = 1, (function(e) {
3384
3384
  const t = _n();
3385
3385
  function r(o, i, s) {
3386
3386
  o.clearRect(0, 0, i.width, i.height), i.style || (i.style = {}), i.height = s, i.width = s, i.style.height = s + "px", i.style.width = s + "px";
@@ -3393,22 +3393,22 @@ function xo() {
3393
3393
  }
3394
3394
  }
3395
3395
  e.render = function(i, s, a) {
3396
- let u = a, l = s;
3397
- typeof u > "u" && (!s || !s.getContext) && (u = s, s = void 0), s || (l = n()), u = t.getOptions(u);
3398
- const c = t.getImageWidth(i.modules.size, u), h = l.getContext("2d"), m = h.createImageData(c, c);
3399
- return t.qrToImageData(m.data, i, u), r(h, l, c), h.putImageData(m, 0, 0), l;
3396
+ let u = a, c = s;
3397
+ typeof u > "u" && (!s || !s.getContext) && (u = s, s = void 0), s || (c = n()), u = t.getOptions(u);
3398
+ const l = t.getImageWidth(i.modules.size, u), h = c.getContext("2d"), m = h.createImageData(l, l);
3399
+ return t.qrToImageData(m.data, i, u), r(h, c, l), h.putImageData(m, 0, 0), c;
3400
3400
  }, e.renderToDataURL = function(i, s, a) {
3401
3401
  let u = a;
3402
3402
  typeof u > "u" && (!s || !s.getContext) && (u = s, s = void 0), u || (u = {});
3403
- const l = e.render(i, s, u), c = u.type || "image/png", h = u.rendererOpts || {};
3404
- return l.toDataURL(c, h.quality);
3403
+ const c = e.render(i, s, u), l = u.type || "image/png", h = u.rendererOpts || {};
3404
+ return c.toDataURL(l, h.quality);
3405
3405
  };
3406
3406
  })(Ze)), Ze;
3407
3407
  }
3408
- var tt = {}, nn;
3408
+ var tt = {}, tn;
3409
3409
  function Fo() {
3410
- if (nn) return tt;
3411
- nn = 1;
3410
+ if (tn) return tt;
3411
+ tn = 1;
3412
3412
  const e = _n();
3413
3413
  function t(o, i) {
3414
3414
  const s = o.a / 255, a = i + '="' + o.hex + '"';
@@ -3419,32 +3419,32 @@ function Fo() {
3419
3419
  return typeof s < "u" && (a += " " + s), a;
3420
3420
  }
3421
3421
  function n(o, i, s) {
3422
- let a = "", u = 0, l = !1, c = 0;
3422
+ let a = "", u = 0, c = !1, l = 0;
3423
3423
  for (let h = 0; h < o.length; h++) {
3424
3424
  const m = Math.floor(h % i), y = Math.floor(h / i);
3425
- !m && !l && (l = !0), o[h] ? (c++, h > 0 && m > 0 && o[h - 1] || (a += l ? r("M", m + s, 0.5 + y + s) : r("m", u, 0), u = 0, l = !1), m + 1 < i && o[h + 1] || (a += r("h", c), c = 0)) : u++;
3425
+ !m && !c && (c = !0), o[h] ? (l++, h > 0 && m > 0 && o[h - 1] || (a += c ? r("M", m + s, 0.5 + y + s) : r("m", u, 0), u = 0, c = !1), m + 1 < i && o[h + 1] || (a += r("h", l), l = 0)) : u++;
3426
3426
  }
3427
3427
  return a;
3428
3428
  }
3429
3429
  return tt.render = function(i, s, a) {
3430
- const u = e.getOptions(s), l = i.modules.size, c = i.modules.data, h = l + u.margin * 2, m = u.color.light.a ? "<path " + t(u.color.light, "fill") + ' d="M0 0h' + h + "v" + h + 'H0z"/>' : "", y = "<path " + t(u.color.dark, "stroke") + ' d="' + n(c, l, u.margin) + '"/>', d = 'viewBox="0 0 ' + h + " " + h + '"', g = '<svg xmlns="http://www.w3.org/2000/svg" ' + (u.width ? 'width="' + u.width + '" height="' + u.width + '" ' : "") + d + ' shape-rendering="crispEdges">' + m + y + `</svg>
3430
+ const u = e.getOptions(s), c = i.modules.size, l = i.modules.data, h = c + u.margin * 2, m = u.color.light.a ? "<path " + t(u.color.light, "fill") + ' d="M0 0h' + h + "v" + h + 'H0z"/>' : "", y = "<path " + t(u.color.dark, "stroke") + ' d="' + n(l, c, u.margin) + '"/>', d = 'viewBox="0 0 ' + h + " " + h + '"', g = '<svg xmlns="http://www.w3.org/2000/svg" ' + (u.width ? 'width="' + u.width + '" height="' + u.width + '" ' : "") + d + ' shape-rendering="crispEdges">' + m + y + `</svg>
3431
3431
  `;
3432
3432
  return typeof a == "function" && a(null, g), g;
3433
3433
  }, tt;
3434
3434
  }
3435
- var rn;
3435
+ var nn;
3436
3436
  function Mo() {
3437
- if (rn) return oe;
3438
- rn = 1;
3437
+ if (nn) return oe;
3438
+ nn = 1;
3439
3439
  const e = yo(), t = vo(), r = xo(), n = Fo();
3440
- function o(i, s, a, u, l) {
3441
- const c = [].slice.call(arguments, 1), h = c.length, m = typeof c[h - 1] == "function";
3440
+ function o(i, s, a, u, c) {
3441
+ const l = [].slice.call(arguments, 1), h = l.length, m = typeof l[h - 1] == "function";
3442
3442
  if (!m && !e())
3443
3443
  throw new Error("Callback required as last argument");
3444
3444
  if (m) {
3445
3445
  if (h < 2)
3446
3446
  throw new Error("Too few arguments provided");
3447
- h === 2 ? (l = a, a = s, s = u = void 0) : h === 3 && (s.getContext && typeof l > "u" ? (l = u, u = void 0) : (l = u, u = a, a = s, s = void 0));
3447
+ h === 2 ? (c = a, a = s, s = u = void 0) : h === 3 && (s.getContext && typeof c > "u" ? (c = u, u = void 0) : (c = u, u = a, a = s, s = void 0));
3448
3448
  } else {
3449
3449
  if (h < 1)
3450
3450
  throw new Error("Too few arguments provided");
@@ -3459,34 +3459,65 @@ function Mo() {
3459
3459
  }
3460
3460
  try {
3461
3461
  const y = t.create(a, u);
3462
- l(null, i(y, s, u));
3462
+ c(null, i(y, s, u));
3463
3463
  } catch (y) {
3464
- l(y);
3464
+ c(y);
3465
3465
  }
3466
3466
  }
3467
3467
  return oe.create = t.create, oe.toCanvas = o.bind(null, r.render), oe.toDataURL = o.bind(null, r.renderToDataURL), oe.toString = o.bind(null, function(i, s, a) {
3468
3468
  return n.render(i, a);
3469
3469
  }), oe;
3470
3470
  }
3471
- var ko = Mo();
3472
- class Do {
3471
+ var Do = Mo();
3472
+ const fe = rn(), Un = U.create({
3473
+ baseURL: fe.baseUrl
3474
+ });
3475
+ async function ko(e = {}) {
3476
+ return (await Un.post(fe.createEndpoint, e, {
3477
+ withCredentials: !0
3478
+ })).data;
3479
+ }
3480
+ function qo(e = () => {
3481
+ }, t = () => {
3482
+ }) {
3483
+ const r = new URL(fe.authEventEndpoint, fe.baseUrl), n = new EventSource(r, {
3484
+ withCredentials: !0
3485
+ });
3486
+ return n.addEventListener("auth-success", async (o) => {
3487
+ try {
3488
+ await Un.post(fe.authConfirmEndpoint, null, {
3489
+ withCredentials: !0
3490
+ }), e();
3491
+ } catch (i) {
3492
+ console.error(i), t(i);
3493
+ } finally {
3494
+ n.close();
3495
+ }
3496
+ }), n.onerror = (o) => {
3497
+ console.error("EventSource failed:", o), n.close();
3498
+ }, n;
3499
+ }
3500
+ class jo {
3473
3501
  constructor() {
3474
- F(this, "overlay", null);
3475
- F(this, "isOpen", !1);
3476
- F(this, "errorCallback", null);
3477
- F(this, "authEvent", null);
3502
+ x(this, "overlay", null);
3503
+ x(this, "isOpen", !1);
3504
+ x(this, "authEvent", null);
3478
3505
  // Элементы для управления состояниями
3479
- F(this, "contentContainer", null);
3480
- F(this, "loader", null);
3481
- F(this, "qrContainer", null);
3482
- F(this, "separator", null);
3483
- F(this, "loginButton", null);
3484
- F(this, "errorContainer", null);
3485
- F(this, "timerContainer", null);
3506
+ x(this, "contentContainer", null);
3507
+ x(this, "loader", null);
3508
+ x(this, "qrContainer", null);
3509
+ x(this, "separator", null);
3510
+ x(this, "loginButton", null);
3511
+ x(this, "errorContainer", null);
3512
+ x(this, "timerContainer", null);
3486
3513
  // Таймер
3487
- F(this, "timerInterval", null);
3514
+ x(this, "timerInterval", null);
3515
+ // Промис
3516
+ x(this, "resolvePromise", null);
3517
+ x(this, "rejectPromise", null);
3518
+ x(this, "currentPromise", null);
3488
3519
  // Добавим свойство для хранения данных запроса
3489
- F(this, "requestData", null);
3520
+ x(this, "requestData", null);
3490
3521
  }
3491
3522
  createElement(t, r, n) {
3492
3523
  const o = document.createElement(t);
@@ -3496,14 +3527,15 @@ class Do {
3496
3527
  this.overlay = this.createElement("div", "oauth-modal-overlay"), this.contentContainer = this.createElement("div", "oauth-modal-content");
3497
3528
  const t = this.createElement("h3", "", "Отсканируйте QR-код");
3498
3529
  this.contentContainer.appendChild(t), this.loader = this.createElement("div", "oauth-loader"), this.loader.innerHTML = '<div class="oauth-spinner"></div>', this.contentContainer.appendChild(this.loader), this.qrContainer = this.createElement("div", "oauth-qrcode-container"), this.contentContainer.appendChild(this.qrContainer), this.timerContainer = this.createElement("div", "oauth-timer-container"), this.contentContainer.appendChild(this.timerContainer), this.separator = this.createElement("p", "oauth-modal-separator", "ИЛИ"), this.contentContainer.appendChild(this.separator), this.loginButton = this.createElement("button", "oauth-login-button", "Войдите с текущего устройства"), this.contentContainer.appendChild(this.loginButton), this.errorContainer = this.createElement("div", "oauth-error-container"), this.errorContainer.style.display = "none", this.contentContainer.appendChild(this.errorContainer), this.overlay.appendChild(this.contentContainer), this.overlay.addEventListener("click", (r) => {
3499
- r.target === this.overlay && this.close();
3530
+ var n;
3531
+ r.target === this.overlay && (this.close(), ((n = this.errorContainer) == null ? void 0 : n.style.display) == "block" && this.rejectPromise());
3500
3532
  }), document.body.appendChild(this.overlay);
3501
3533
  }
3502
3534
  async generateQR(t, r) {
3503
3535
  try {
3504
3536
  t.innerHTML = "";
3505
3537
  const n = document.createElement("canvas");
3506
- await ko.toCanvas(n, r, { width: 200, margin: 1 }), t.appendChild(n);
3538
+ await Do.toCanvas(n, r, { width: 200, margin: 1 }), t.appendChild(n);
3507
3539
  } catch (n) {
3508
3540
  console.error("Ошибка при генерации QR-кода:", n), t.innerHTML = "<p>Не удалось загрузить QR-код</p>";
3509
3541
  }
@@ -3511,7 +3543,7 @@ class Do {
3511
3543
  startTimer(t) {
3512
3544
  this.timerInterval && clearInterval(this.timerInterval);
3513
3545
  const r = () => {
3514
- const n = (/* @__PURE__ */ new Date()).getTime(), i = (/* @__PURE__ */ new Date(t + "Z")).getTime() - n;
3546
+ const n = (/* @__PURE__ */ new Date()).getTime(), i = new Date(t).getTime() - n;
3515
3547
  if (i > 0) {
3516
3548
  const s = Math.floor(i % 36e5 / 6e4), a = Math.floor(i % (1e3 * 60) / 1e3);
3517
3549
  this.timerContainer.textContent = `Ссылка действительна еще: ${String(s).padStart(2, "0")}:${String(a).padStart(2, "0")}`;
@@ -3526,7 +3558,9 @@ class Do {
3526
3558
  renderSuccessState(t) {
3527
3559
  this.loader.style.display = "none", this.errorContainer.style.display = "none", this.qrContainer.style.display = "flex", this.separator.style.display = "block", this.loginButton.style.display = "block";
3528
3560
  const r = t.links[0].link;
3529
- this.generateQR(this.qrContainer, r), this.loginButton.onclick = () => window.open(r), this.authEvent = jo(() => this.close(), (n) => this.renderErrorState(n)), t.validUntil ? (this.timerContainer.style.display = "block", this.startTimer(t.validUntil)) : this.timerContainer.style.display = "none";
3561
+ this.generateQR(this.qrContainer, r), this.loginButton.onclick = () => window.open(r), this.authEvent = qo(() => {
3562
+ this.close(), this.resolvePromise();
3563
+ }, (n) => this.renderErrorState(n)), t.validUntil ? (this.timerContainer.style.display = "block", this.startTimer(t.validUntil)) : this.timerContainer.style.display = "none";
3530
3564
  }
3531
3565
  renderErrorState(t) {
3532
3566
  this.loader.style.display = "none", this.qrContainer.style.display = "none", this.separator.style.display = "none", this.loginButton.style.display = "none", this.timerContainer.style.display = "none", this.errorContainer.style.display = "block", this.errorContainer.innerHTML = `
@@ -3544,20 +3578,22 @@ class Do {
3544
3578
  this.startAuthFlow();
3545
3579
  });
3546
3580
  }
3547
- async show(t, r) {
3548
- this.isOpen || (this.requestData = t, this.errorCallback = r || null, this.overlay || this.createModal(), this.isOpen = !0, setTimeout(() => {
3549
- var n;
3550
- return (n = this.overlay) == null ? void 0 : n.classList.add("active");
3551
- }, 10), this.startAuthFlow());
3581
+ async show(t) {
3582
+ return this.isOpen ? this.currentPromise : (this.requestData = t, this.currentPromise = new Promise((r, n) => {
3583
+ this.resolvePromise = r, this.rejectPromise = n;
3584
+ }), this.overlay || this.createModal(), this.isOpen = !0, setTimeout(() => {
3585
+ var r;
3586
+ return (r = this.overlay) == null ? void 0 : r.classList.add("active");
3587
+ }, 10), this.startAuthFlow(), this.currentPromise);
3552
3588
  }
3553
3589
  async startAuthFlow() {
3554
3590
  if (this.requestData) {
3555
3591
  this.setLoadingState();
3556
3592
  try {
3557
- const t = await qo(this.requestData);
3593
+ const t = await ko(this.requestData);
3558
3594
  this.renderSuccessState(t);
3559
3595
  } catch (t) {
3560
- this.renderErrorState(t), this.errorCallback && this.errorCallback(t);
3596
+ this.renderErrorState(t);
3561
3597
  }
3562
3598
  }
3563
3599
  }
@@ -3567,50 +3603,28 @@ class Do {
3567
3603
  }, 400));
3568
3604
  }
3569
3605
  }
3570
- Ho();
3571
- const fe = Dn(), Un = U.create({
3572
- baseURL: fe.baseUrl
3573
- }), dt = new Do();
3574
- function li(e = {}) {
3575
- dt.show(e);
3576
- }
3577
- function ci() {
3578
- dt.close();
3579
- }
3580
- async function qo(e = {}) {
3581
- return (await Un.post(fe.createEndpoint, e, {
3582
- withCredentials: !0
3583
- })).data;
3606
+ zo();
3607
+ const Ho = rn();
3608
+ U.create({
3609
+ baseURL: Ho.baseUrl
3610
+ });
3611
+ const vn = new jo();
3612
+ async function li(e = {}) {
3613
+ return vn.show(e);
3584
3614
  }
3585
- function jo(e = () => dt.close(), t = () => {
3586
- }) {
3587
- const r = new URL(fe.authEventEndpoint, fe.baseUrl), n = new EventSource(r, {
3588
- withCredentials: !0
3589
- });
3590
- return n.addEventListener("auth-success", async (o) => {
3591
- try {
3592
- await Un.post(fe.authConfirmEndpoint, null, {
3593
- withCredentials: !0
3594
- }), e();
3595
- } catch (i) {
3596
- console.error(i), t(i);
3597
- } finally {
3598
- n.close();
3599
- }
3600
- }), n.onerror = (o) => {
3601
- console.error("EventSource failed:", o), n.close();
3602
- }, n;
3615
+ function fi() {
3616
+ vn.close();
3603
3617
  }
3604
- function Ho() {
3618
+ function zo() {
3605
3619
  if (document.getElementById("oauth0-js-lib-styles")) return;
3606
3620
  const e = document.createElement("style");
3607
3621
  e.id = "oauth0-js-lib-styles", e.innerHTML = mo, document.head.appendChild(e);
3608
3622
  }
3609
3623
  export {
3610
- ci as closeQrLogin,
3611
- jo as createAuthEvent,
3612
- qo as createAuthSession,
3613
- Dn as getConfig,
3624
+ fi as closeQrLogin,
3625
+ qo as createAuthEvent,
3626
+ ko as createAuthSession,
3627
+ rn as getConfig,
3614
3628
  Vo as setConfig,
3615
3629
  li as showQrLogin
3616
3630
  };