@abaxx_tech/v-integration-react 1.1.2-dev.1 → 1.1.2-dev.2

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.
@@ -1,51 +1,54 @@
1
- import { jsx as P, jsxs as he, Fragment as He } from "react/jsx-runtime";
2
- import Nr, { createContext as Or, useState as ge, useContext as nt, useRef as Lt, useEffect as Qe, useCallback as Ge } from "react";
3
- const Ve = Or({}), qr = ({
4
- clientId: K,
1
+ import { jsx as P, jsxs as he, Fragment as Qe } from "react/jsx-runtime";
2
+ import Bt, { createContext as Or, useState as ge, useContext as Ke, useRef as Lt, useEffect as Ge, useCallback as Ve } from "react";
3
+ const Oe = Or({}), qr = ({
4
+ clientId: G,
5
5
  apiUrl: X,
6
6
  children: ie
7
7
  }) => {
8
- const [W, O] = ge(""), [Y, F] = ge(""), [M, x] = ge(!1), [d, A] = ge(""), [C, U] = ge(""), [D, H] = ge(/* @__PURE__ */ new Date()), [q, N] = ge(""), [Z, G] = ge(null), [z, R] = ge(null);
8
+ const [W, O] = ge(""), [Y, U] = ge(""), [M, x] = ge(!1), [d, A] = ge(""), [C, $] = ge(""), [D, H] = ge(/* @__PURE__ */ new Date()), [q, B] = ge(""), [Z, V] = ge(null), [z, E] = ge(null), o = Bt.useCallback(() => {
9
+ O(""), U(""), x(!1), A(""), $(""), B(""), H(/* @__PURE__ */ new Date()), V(null), E(null);
10
+ }, []);
9
11
  return /* @__PURE__ */ P(
10
- Ve.Provider,
12
+ Oe.Provider,
11
13
  {
12
14
  value: {
13
15
  apiUrl: X,
14
- clientId: K,
16
+ clientId: G,
15
17
  identity: W,
16
18
  setIdentity: O,
17
19
  authRequestId: Y,
18
- setAuthRequestId: F,
20
+ setAuthRequestId: U,
19
21
  isAuthenticating: M,
20
22
  setIsAuthenticating: x,
21
23
  codeVerifier: d,
22
24
  setCodeVerifier: A,
23
25
  codeChallenge: C,
24
- setCodeChallenge: U,
26
+ setCodeChallenge: $,
25
27
  authCode: q,
26
- setAuthCode: N,
28
+ setAuthCode: B,
27
29
  authRequestIdExpires: D,
28
30
  setAuthRequestIdExpires: H,
29
31
  token: Z,
30
- setToken: G,
32
+ setToken: V,
31
33
  authError: z,
32
- setAuthError: R
34
+ setAuthError: E,
35
+ resetState: o
33
36
  },
34
37
  children: ie
35
38
  }
36
39
  );
37
40
  };
38
- function jr(K) {
39
- const X = new Uint8Array(K);
41
+ function jr(G) {
42
+ const X = new Uint8Array(G);
40
43
  return window.crypto.getRandomValues(X), X;
41
44
  }
42
- function Pt(K) {
43
- const X = Array.from(K);
45
+ function Pt(G) {
46
+ const X = Array.from(G);
44
47
  return btoa(String.fromCharCode(...X)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
45
48
  }
46
- function $r() {
49
+ function Ur() {
47
50
  const {
48
- apiUrl: K,
51
+ apiUrl: G,
49
52
  clientId: X,
50
53
  authRequestId: ie,
51
54
  // results of the successful auth
@@ -53,31 +56,31 @@ function $r() {
53
56
  authCode: O,
54
57
  setAuthCode: Y,
55
58
  // results of the successful begin auth
56
- setAuthRequestId: F,
59
+ setAuthRequestId: U,
57
60
  setAuthRequestIdExpires: M,
58
61
  setCodeChallenge: x,
59
62
  setCodeVerifier: d,
60
63
  codeChallenge: A,
61
64
  codeVerifier: C,
62
- setIsAuthenticating: U,
65
+ setIsAuthenticating: $,
63
66
  token: D,
64
67
  setToken: H,
65
68
  setAuthError: q
66
- } = nt(Ve), N = Lt(null), Z = Lt(""), G = (R) => {
69
+ } = Ke(Oe), B = Lt(null), Z = Lt(""), V = (E) => {
67
70
  try {
68
71
  let o;
69
72
  try {
70
- o = JSON.parse(R.data);
73
+ o = JSON.parse(E.data);
71
74
  } catch {
72
- o = { type: R.type, message: R.data };
75
+ o = { type: E.type, message: E.data };
73
76
  }
74
- switch (R.type) {
77
+ switch (E.type) {
75
78
  case "start": {
76
- o.request_id && o.expires && (F(o.request_id), Z.current = o.request_id, M(new Date(o.expires)));
79
+ o.request_id && o.expires && (U(o.request_id), Z.current = o.request_id, M(new Date(o.expires)));
77
80
  break;
78
81
  }
79
82
  case "approved": {
80
- o.code && o.identity && o.approved && o.request_id && o.request_id == Z.current && (N.current && (console.info("Closing SSE connection after approval"), N.current.close(), N.current = null), Y(o.code), W(o.identity), U(!0));
83
+ o.code && o.identity && o.approved && o.request_id && o.request_id == Z.current && (B.current && (console.info("Closing SSE connection after approval"), B.current.close(), B.current = null), Y(o.code), W(o.identity), $(!0));
81
84
  break;
82
85
  }
83
86
  default:
@@ -87,92 +90,92 @@ function $r() {
87
90
  console.error("Error parsing SSE message:", o);
88
91
  }
89
92
  };
90
- Qe(() => {
93
+ Ge(() => {
91
94
  if (A)
92
95
  return;
93
- let R = !1;
96
+ let E = !1;
94
97
  return (async () => {
95
98
  const b = jr(64), c = await window.crypto.subtle.digest("SHA-256", b);
96
- if (!R) {
99
+ if (!E) {
97
100
  const y = Pt(new Uint8Array(c)), f = Pt(b);
98
101
  x(y), d(f);
99
102
  }
100
103
  })(), () => {
101
- R = !0;
104
+ E = !0;
102
105
  };
103
- }, [A]), Qe(() => {
106
+ }, [A]), Ge(() => {
104
107
  if (D) {
105
- N.current && (console.info("Closing existing SSE connection"), N.current.close(), N.current = null);
108
+ B.current && (console.info("Closing existing SSE connection"), B.current.close(), B.current = null);
106
109
  return;
107
110
  }
108
- if (!(!A || N.current))
111
+ if (!(!A || B.current))
109
112
  try {
110
- const R = `${K}/v-plus/auth/start?cid=${X}`, o = new EventSource(R);
111
- return N.current = o, o.onmessage = G, o.addEventListener("start", G), o.addEventListener("approved", G), o.onerror = () => {
112
- if (D || !N.current) {
113
- console.info("SSE connection closed"), N.current && (N.current.close(), N.current = null);
113
+ const E = `${G}/v-plus/auth/start?cid=${X}`, o = new EventSource(E);
114
+ return B.current = o, o.onmessage = V, o.addEventListener("start", V), o.addEventListener("approved", V), o.onerror = () => {
115
+ if (D || !B.current) {
116
+ console.info("SSE connection closed"), B.current && (B.current.close(), B.current = null);
114
117
  return;
115
118
  }
116
119
  D || console.info("Waiting for authentication...");
117
120
  }, () => {
118
- o && (o.close(), N.current = null);
121
+ o && (o.close(), B.current = null);
119
122
  };
120
- } catch (R) {
121
- console.error("SSE connection setup failed:", R), N.current = null;
123
+ } catch (E) {
124
+ console.error("SSE connection setup failed:", E), B.current = null;
122
125
  }
123
- }, [D, A, K, X]);
124
- const z = Ge(async (R, o, b) => {
126
+ }, [D, A, G, X]);
127
+ const z = Ve(async (E, o, b) => {
125
128
  try {
126
- const y = await (await fetch(`${K}/v-plus/auth/token?cid=${X}`, {
129
+ const y = await (await fetch(`${G}/v-plus/auth/token?cid=${X}`, {
127
130
  method: "POST",
128
131
  headers: {
129
132
  "Content-Type": "application/json"
130
133
  },
131
134
  body: JSON.stringify({
132
- auth_code: R,
135
+ auth_code: E,
133
136
  request_id: o,
134
137
  code_verifier: b
135
138
  })
136
139
  })).json();
137
140
  if (y.token)
138
- H(y.token), U(!1);
141
+ H(y.token), $(!1);
139
142
  else
140
143
  throw new Error("No token received");
141
144
  } catch (c) {
142
- console.error("Error fetching token:", c), U(!1), q(`Failed to obtain auth token: ${c}`), Y("");
145
+ console.error("Error fetching token:", c), $(!1), q(`Failed to obtain auth token: ${c}`), Y("");
143
146
  }
144
- }, [K, X]);
145
- return Qe(() => {
147
+ }, [G, X]);
148
+ return Ge(() => {
146
149
  O && z(O, ie, C);
147
150
  }, [O, C, ie]), null;
148
151
  }
149
152
  const Vr = ({
150
- clientId: K,
153
+ clientId: G,
151
154
  apiUrl: X,
152
155
  children: ie
153
- }) => /* @__PURE__ */ he(qr, { apiUrl: X, clientId: K, children: [
154
- /* @__PURE__ */ P($r, {}),
156
+ }) => /* @__PURE__ */ he(qr, { apiUrl: X, clientId: G, children: [
157
+ /* @__PURE__ */ P(Ur, {}),
155
158
  ie
156
159
  ] });
157
- var rt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Te = {}, Ue = { exports: {} };
158
- Ue.exports;
160
+ var nt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Te = {}, He = { exports: {} };
161
+ He.exports;
159
162
  var Dt;
160
- function Fr() {
161
- return Dt || (Dt = 1, function(K, X) {
162
- var ie = 200, W = "__lodash_hash_undefined__", O = 1, Y = 2, F = 9007199254740991, M = "[object Arguments]", x = "[object Array]", d = "[object AsyncFunction]", A = "[object Boolean]", C = "[object Date]", U = "[object Error]", D = "[object Function]", H = "[object GeneratorFunction]", q = "[object Map]", N = "[object Number]", Z = "[object Null]", G = "[object Object]", z = "[object Promise]", R = "[object Proxy]", o = "[object RegExp]", b = "[object Set]", c = "[object String]", y = "[object Symbol]", f = "[object Undefined]", w = "[object WeakMap]", n = "[object ArrayBuffer]", t = "[object DataView]", g = "[object Float32Array]", i = "[object Float64Array]", p = "[object Int8Array]", L = "[object Int16Array]", T = "[object Int32Array]", V = "[object Uint8Array]", j = "[object Uint8ClampedArray]", re = "[object Uint16Array]", oe = "[object Uint32Array]", k = /[\\^$.*+?()[\]{}|]/g, B = /^\[object .+?Constructor\]$/, ue = /^(?:0|[1-9]\d*)$/, Q = {};
163
- Q[g] = Q[i] = Q[p] = Q[L] = Q[T] = Q[V] = Q[j] = Q[re] = Q[oe] = !0, Q[M] = Q[x] = Q[n] = Q[A] = Q[t] = Q[C] = Q[U] = Q[D] = Q[q] = Q[N] = Q[G] = Q[o] = Q[b] = Q[c] = Q[w] = !1;
164
- var se = typeof rt == "object" && rt && rt.Object === Object && rt, _e = typeof self == "object" && self && self.Object === Object && self, s = se || _e || Function("return this")(), u = X && !X.nodeType && X, a = u && !0 && K && !K.nodeType && K, l = a && a.exports === u, h = l && se.process, _ = function() {
163
+ function $r() {
164
+ return Dt || (Dt = 1, function(G, X) {
165
+ var ie = 200, W = "__lodash_hash_undefined__", O = 1, Y = 2, U = 9007199254740991, M = "[object Arguments]", x = "[object Array]", d = "[object AsyncFunction]", A = "[object Boolean]", C = "[object Date]", $ = "[object Error]", D = "[object Function]", H = "[object GeneratorFunction]", q = "[object Map]", B = "[object Number]", Z = "[object Null]", V = "[object Object]", z = "[object Promise]", E = "[object Proxy]", o = "[object RegExp]", b = "[object Set]", c = "[object String]", y = "[object Symbol]", f = "[object Undefined]", w = "[object WeakMap]", n = "[object ArrayBuffer]", t = "[object DataView]", g = "[object Float32Array]", i = "[object Float64Array]", p = "[object Int8Array]", L = "[object Int16Array]", T = "[object Int32Array]", K = "[object Uint8Array]", j = "[object Uint8ClampedArray]", re = "[object Uint16Array]", oe = "[object Uint32Array]", S = /[\\^$.*+?()[\]{}|]/g, k = /^\[object .+?Constructor\]$/, ue = /^(?:0|[1-9]\d*)$/, Q = {};
166
+ Q[g] = Q[i] = Q[p] = Q[L] = Q[T] = Q[K] = Q[j] = Q[re] = Q[oe] = !0, Q[M] = Q[x] = Q[n] = Q[A] = Q[t] = Q[C] = Q[$] = Q[D] = Q[q] = Q[B] = Q[V] = Q[o] = Q[b] = Q[c] = Q[w] = !1;
167
+ var se = typeof nt == "object" && nt && nt.Object === Object && nt, _e = typeof self == "object" && self && self.Object === Object && self, s = se || _e || Function("return this")(), u = X && !X.nodeType && X, a = u && !0 && G && !G.nodeType && G, l = a && a.exports === u, h = l && se.process, _ = function() {
165
168
  try {
166
169
  return h && h.binding && h.binding("util");
167
170
  } catch {
168
171
  }
169
- }(), E = _ && _.isTypedArray;
172
+ }(), R = _ && _.isTypedArray;
170
173
  function I(e, r) {
171
- for (var v = -1, m = e == null ? 0 : e.length, te = 0, $ = []; ++v < m; ) {
174
+ for (var v = -1, m = e == null ? 0 : e.length, te = 0, F = []; ++v < m; ) {
172
175
  var ae = e[v];
173
- r(ae, v, e) && ($[te++] = ae);
176
+ r(ae, v, e) && (F[te++] = ae);
174
177
  }
175
- return $;
178
+ return F;
176
179
  }
177
180
  function J(e, r) {
178
181
  for (var v = -1, m = r.length, te = e.length; ++v < m; )
@@ -185,7 +188,7 @@ function Fr() {
185
188
  return !0;
186
189
  return !1;
187
190
  }
188
- function S(e, r) {
191
+ function N(e, r) {
189
192
  for (var v = -1, m = Array(e); ++v < e; )
190
193
  m[v] = r(v);
191
194
  return m;
@@ -198,32 +201,32 @@ function Fr() {
198
201
  function ve(e, r) {
199
202
  return e.has(r);
200
203
  }
201
- function ke(e, r) {
204
+ function Se(e, r) {
202
205
  return e == null ? void 0 : e[r];
203
206
  }
204
- function Be(e) {
207
+ function ke(e) {
205
208
  var r = -1, v = Array(e.size);
206
209
  return e.forEach(function(m, te) {
207
210
  v[++r] = [te, m];
208
211
  }), v;
209
212
  }
210
- function Ke(e, r) {
213
+ function We(e, r) {
211
214
  return function(v) {
212
215
  return e(r(v));
213
216
  };
214
217
  }
215
- function Oe(e) {
218
+ function qe(e) {
216
219
  var r = -1, v = Array(e.size);
217
220
  return e.forEach(function(m) {
218
221
  v[++r] = m;
219
222
  }), v;
220
223
  }
221
- var Se = Array.prototype, Ot = Function.prototype, We = Object.prototype, at = s["__core-js_shared__"], ct = Ot.toString, be = We.hasOwnProperty, ht = function() {
224
+ var Be = Array.prototype, qt = Function.prototype, Ze = Object.prototype, at = s["__core-js_shared__"], ct = qt.toString, be = Ze.hasOwnProperty, ht = function() {
222
225
  var e = /[^.]+$/.exec(at && at.keys && at.keys.IE_PROTO || "");
223
226
  return e ? "Symbol(src)_1." + e : "";
224
- }(), dt = We.toString, qt = RegExp(
225
- "^" + ct.call(be).replace(k, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
226
- ), gt = l ? s.Buffer : void 0, Ze = s.Symbol, pt = s.Uint8Array, yt = We.propertyIsEnumerable, jt = Se.splice, Ee = Ze ? Ze.toStringTag : void 0, wt = Object.getOwnPropertySymbols, $t = gt ? gt.isBuffer : void 0, Ft = Ke(Object.keys, Object), it = Ne(s, "DataView"), qe = Ne(s, "Map"), ot = Ne(s, "Promise"), st = Ne(s, "Set"), ft = Ne(s, "WeakMap"), je = Ne(Object, "create"), Ut = Pe(it), Ht = Pe(qe), Qt = Pe(ot), Gt = Pe(st), Vt = Pe(ft), xt = Ze ? Ze.prototype : void 0, ut = xt ? xt.valueOf : void 0;
227
+ }(), dt = Ze.toString, jt = RegExp(
228
+ "^" + ct.call(be).replace(S, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
229
+ ), gt = l ? s.Buffer : void 0, Je = s.Symbol, pt = s.Uint8Array, yt = Ze.propertyIsEnumerable, Ut = Be.splice, Ee = Je ? Je.toStringTag : void 0, wt = Object.getOwnPropertySymbols, $t = gt ? gt.isBuffer : void 0, Ft = We(Object.keys, Object), it = Ne(s, "DataView"), je = Ne(s, "Map"), ot = Ne(s, "Promise"), st = Ne(s, "Set"), ft = Ne(s, "WeakMap"), Ue = Ne(Object, "create"), Ht = Pe(it), Qt = Pe(je), Gt = Pe(ot), Vt = Pe(st), Kt = Pe(ft), xt = Je ? Je.prototype : void 0, ut = xt ? xt.valueOf : void 0;
227
230
  function Re(e) {
228
231
  var r = -1, v = e == null ? 0 : e.length;
229
232
  for (this.clear(); ++r < v; ) {
@@ -231,30 +234,30 @@ function Fr() {
231
234
  this.set(m[0], m[1]);
232
235
  }
233
236
  }
234
- function Kt() {
235
- this.__data__ = je ? je(null) : {}, this.size = 0;
237
+ function Wt() {
238
+ this.__data__ = Ue ? Ue(null) : {}, this.size = 0;
236
239
  }
237
- function Wt(e) {
240
+ function Zt(e) {
238
241
  var r = this.has(e) && delete this.__data__[e];
239
242
  return this.size -= r ? 1 : 0, r;
240
243
  }
241
- function Zt(e) {
244
+ function Jt(e) {
242
245
  var r = this.__data__;
243
- if (je) {
246
+ if (Ue) {
244
247
  var v = r[e];
245
248
  return v === W ? void 0 : v;
246
249
  }
247
250
  return be.call(r, e) ? r[e] : void 0;
248
251
  }
249
- function Jt(e) {
252
+ function Yt(e) {
250
253
  var r = this.__data__;
251
- return je ? r[e] !== void 0 : be.call(r, e);
254
+ return Ue ? r[e] !== void 0 : be.call(r, e);
252
255
  }
253
- function Yt(e, r) {
256
+ function Xt(e, r) {
254
257
  var v = this.__data__;
255
- return this.size += this.has(e) ? 0 : 1, v[e] = je && r === void 0 ? W : r, this;
258
+ return this.size += this.has(e) ? 0 : 1, v[e] = Ue && r === void 0 ? W : r, this;
256
259
  }
257
- Re.prototype.clear = Kt, Re.prototype.delete = Wt, Re.prototype.get = Zt, Re.prototype.has = Jt, Re.prototype.set = Yt;
260
+ Re.prototype.clear = Wt, Re.prototype.delete = Zt, Re.prototype.get = Jt, Re.prototype.has = Yt, Re.prototype.set = Xt;
258
261
  function Ae(e) {
259
262
  var r = -1, v = e == null ? 0 : e.length;
260
263
  for (this.clear(); ++r < v; ) {
@@ -262,28 +265,28 @@ function Fr() {
262
265
  this.set(m[0], m[1]);
263
266
  }
264
267
  }
265
- function Xt() {
268
+ function zt() {
266
269
  this.__data__ = [], this.size = 0;
267
270
  }
268
- function zt(e) {
269
- var r = this.__data__, v = Ye(r, e);
271
+ function er(e) {
272
+ var r = this.__data__, v = Xe(r, e);
270
273
  if (v < 0)
271
274
  return !1;
272
275
  var m = r.length - 1;
273
- return v == m ? r.pop() : jt.call(r, v, 1), --this.size, !0;
276
+ return v == m ? r.pop() : Ut.call(r, v, 1), --this.size, !0;
274
277
  }
275
- function er(e) {
276
- var r = this.__data__, v = Ye(r, e);
278
+ function tr(e) {
279
+ var r = this.__data__, v = Xe(r, e);
277
280
  return v < 0 ? void 0 : r[v][1];
278
281
  }
279
- function tr(e) {
280
- return Ye(this.__data__, e) > -1;
282
+ function rr(e) {
283
+ return Xe(this.__data__, e) > -1;
281
284
  }
282
- function rr(e, r) {
283
- var v = this.__data__, m = Ye(v, e);
285
+ function nr(e, r) {
286
+ var v = this.__data__, m = Xe(v, e);
284
287
  return m < 0 ? (++this.size, v.push([e, r])) : v[m][1] = r, this;
285
288
  }
286
- Ae.prototype.clear = Xt, Ae.prototype.delete = zt, Ae.prototype.get = er, Ae.prototype.has = tr, Ae.prototype.set = rr;
289
+ Ae.prototype.clear = zt, Ae.prototype.delete = er, Ae.prototype.get = tr, Ae.prototype.has = rr, Ae.prototype.set = nr;
287
290
  function Le(e) {
288
291
  var r = -1, v = e == null ? 0 : e.length;
289
292
  for (this.clear(); ++r < v; ) {
@@ -291,146 +294,146 @@ function Fr() {
291
294
  this.set(m[0], m[1]);
292
295
  }
293
296
  }
294
- function nr() {
297
+ function ar() {
295
298
  this.size = 0, this.__data__ = {
296
299
  hash: new Re(),
297
- map: new (qe || Ae)(),
300
+ map: new (je || Ae)(),
298
301
  string: new Re()
299
302
  };
300
303
  }
301
- function ar(e) {
302
- var r = Xe(this, e).delete(e);
303
- return this.size -= r ? 1 : 0, r;
304
- }
305
304
  function ir(e) {
306
- return Xe(this, e).get(e);
305
+ var r = ze(this, e).delete(e);
306
+ return this.size -= r ? 1 : 0, r;
307
307
  }
308
308
  function or(e) {
309
- return Xe(this, e).has(e);
309
+ return ze(this, e).get(e);
310
+ }
311
+ function sr(e) {
312
+ return ze(this, e).has(e);
310
313
  }
311
- function sr(e, r) {
312
- var v = Xe(this, e), m = v.size;
314
+ function fr(e, r) {
315
+ var v = ze(this, e), m = v.size;
313
316
  return v.set(e, r), this.size += v.size == m ? 0 : 1, this;
314
317
  }
315
- Le.prototype.clear = nr, Le.prototype.delete = ar, Le.prototype.get = ir, Le.prototype.has = or, Le.prototype.set = sr;
316
- function Je(e) {
318
+ Le.prototype.clear = ar, Le.prototype.delete = ir, Le.prototype.get = or, Le.prototype.has = sr, Le.prototype.set = fr;
319
+ function Ye(e) {
317
320
  var r = -1, v = e == null ? 0 : e.length;
318
321
  for (this.__data__ = new Le(); ++r < v; )
319
322
  this.add(e[r]);
320
323
  }
321
- function fr(e) {
324
+ function ur(e) {
322
325
  return this.__data__.set(e, W), this;
323
326
  }
324
- function ur(e) {
327
+ function lr(e) {
325
328
  return this.__data__.has(e);
326
329
  }
327
- Je.prototype.add = Je.prototype.push = fr, Je.prototype.has = ur;
330
+ Ye.prototype.add = Ye.prototype.push = ur, Ye.prototype.has = lr;
328
331
  function Ce(e) {
329
332
  var r = this.__data__ = new Ae(e);
330
333
  this.size = r.size;
331
334
  }
332
- function lr() {
335
+ function vr() {
333
336
  this.__data__ = new Ae(), this.size = 0;
334
337
  }
335
- function vr(e) {
338
+ function cr(e) {
336
339
  var r = this.__data__, v = r.delete(e);
337
340
  return this.size = r.size, v;
338
341
  }
339
- function cr(e) {
342
+ function hr(e) {
340
343
  return this.__data__.get(e);
341
344
  }
342
- function hr(e) {
345
+ function dr(e) {
343
346
  return this.__data__.has(e);
344
347
  }
345
- function dr(e, r) {
348
+ function gr(e, r) {
346
349
  var v = this.__data__;
347
350
  if (v instanceof Ae) {
348
351
  var m = v.__data__;
349
- if (!qe || m.length < ie - 1)
352
+ if (!je || m.length < ie - 1)
350
353
  return m.push([e, r]), this.size = ++v.size, this;
351
354
  v = this.__data__ = new Le(m);
352
355
  }
353
356
  return v.set(e, r), this.size = v.size, this;
354
357
  }
355
- Ce.prototype.clear = lr, Ce.prototype.delete = vr, Ce.prototype.get = cr, Ce.prototype.has = hr, Ce.prototype.set = dr;
356
- function gr(e, r) {
357
- var v = ze(e), m = !v && Lr(e), te = !v && !m && lt(e), $ = !v && !m && !te && Et(e), ae = v || m || te || $, fe = ae ? S(e.length, String) : [], ce = fe.length;
358
+ Ce.prototype.clear = vr, Ce.prototype.delete = cr, Ce.prototype.get = hr, Ce.prototype.has = dr, Ce.prototype.set = gr;
359
+ function pr(e, r) {
360
+ var v = et(e), m = !v && Pr(e), te = !v && !m && lt(e), F = !v && !m && !te && Et(e), ae = v || m || te || F, fe = ae ? N(e.length, String) : [], ce = fe.length;
358
361
  for (var ne in e)
359
362
  be.call(e, ne) && !(ae && // Safari 9 has enumerable `arguments.length` in strict mode.
360
363
  (ne == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
361
364
  te && (ne == "offset" || ne == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
362
- $ && (ne == "buffer" || ne == "byteLength" || ne == "byteOffset") || // Skip index properties.
363
- Cr(ne, ce))) && fe.push(ne);
365
+ F && (ne == "buffer" || ne == "byteLength" || ne == "byteOffset") || // Skip index properties.
366
+ Mr(ne, ce))) && fe.push(ne);
364
367
  return fe;
365
368
  }
366
- function Ye(e, r) {
369
+ function Xe(e, r) {
367
370
  for (var v = e.length; v--; )
368
371
  if (Tt(e[v][0], r))
369
372
  return v;
370
373
  return -1;
371
374
  }
372
- function pr(e, r, v) {
375
+ function yr(e, r, v) {
373
376
  var m = r(e);
374
- return ze(e) ? m : J(m, v(e));
377
+ return et(e) ? m : J(m, v(e));
375
378
  }
376
379
  function $e(e) {
377
- return e == null ? e === void 0 ? f : Z : Ee && Ee in Object(e) ? mr(e) : Rr(e);
380
+ return e == null ? e === void 0 ? f : Z : Ee && Ee in Object(e) ? Tr(e) : Lr(e);
378
381
  }
379
382
  function bt(e) {
380
383
  return Fe(e) && $e(e) == M;
381
384
  }
382
385
  function _t(e, r, v, m, te) {
383
- return e === r ? !0 : e == null || r == null || !Fe(e) && !Fe(r) ? e !== e && r !== r : yr(e, r, v, m, _t, te);
386
+ return e === r ? !0 : e == null || r == null || !Fe(e) && !Fe(r) ? e !== e && r !== r : wr(e, r, v, m, _t, te);
384
387
  }
385
- function yr(e, r, v, m, te, $) {
386
- var ae = ze(e), fe = ze(r), ce = ae ? x : Me(e), ne = fe ? x : Me(r);
387
- ce = ce == M ? G : ce, ne = ne == M ? G : ne;
388
- var pe = ce == G, xe = ne == G, de = ce == ne;
388
+ function wr(e, r, v, m, te, F) {
389
+ var ae = et(e), fe = et(r), ce = ae ? x : Me(e), ne = fe ? x : Me(r);
390
+ ce = ce == M ? V : ce, ne = ne == M ? V : ne;
391
+ var pe = ce == V, xe = ne == V, de = ce == ne;
389
392
  if (de && lt(e)) {
390
393
  if (!lt(r))
391
394
  return !1;
392
395
  ae = !0, pe = !1;
393
396
  }
394
397
  if (de && !pe)
395
- return $ || ($ = new Ce()), ae || Et(e) ? At(e, r, v, m, te, $) : _r(e, r, ce, v, m, te, $);
398
+ return F || (F = new Ce()), ae || Et(e) ? At(e, r, v, m, te, F) : Ar(e, r, ce, v, m, te, F);
396
399
  if (!(v & O)) {
397
400
  var ye = pe && be.call(e, "__wrapped__"), we = xe && be.call(r, "__wrapped__");
398
401
  if (ye || we) {
399
402
  var Ie = ye ? e.value() : e, me = we ? r.value() : r;
400
- return $ || ($ = new Ce()), te(Ie, me, v, m, $);
403
+ return F || (F = new Ce()), te(Ie, me, v, m, F);
401
404
  }
402
405
  }
403
- return de ? ($ || ($ = new Ce()), Ar(e, r, v, m, te, $)) : !1;
406
+ return de ? (F || (F = new Ce()), mr(e, r, v, m, te, F)) : !1;
404
407
  }
405
- function wr(e) {
406
- if (!It(e) || Ir(e))
408
+ function xr(e) {
409
+ if (!It(e) || Er(e))
407
410
  return !1;
408
- var r = Ct(e) ? qt : B;
411
+ var r = Ct(e) ? jt : k;
409
412
  return r.test(Pe(e));
410
413
  }
411
- function xr(e) {
414
+ function br(e) {
412
415
  return Fe(e) && Mt(e.length) && !!Q[$e(e)];
413
416
  }
414
- function br(e) {
415
- if (!Er(e))
417
+ function _r(e) {
418
+ if (!Rr(e))
416
419
  return Ft(e);
417
420
  var r = [];
418
421
  for (var v in Object(e))
419
422
  be.call(e, v) && v != "constructor" && r.push(v);
420
423
  return r;
421
424
  }
422
- function At(e, r, v, m, te, $) {
425
+ function At(e, r, v, m, te, F) {
423
426
  var ae = v & O, fe = e.length, ce = r.length;
424
427
  if (fe != ce && !(ae && ce > fe))
425
428
  return !1;
426
- var ne = $.get(e);
427
- if (ne && $.get(r))
429
+ var ne = F.get(e);
430
+ if (ne && F.get(r))
428
431
  return ne == r;
429
- var pe = -1, xe = !0, de = v & Y ? new Je() : void 0;
430
- for ($.set(e, r), $.set(r, e); ++pe < fe; ) {
432
+ var pe = -1, xe = !0, de = v & Y ? new Ye() : void 0;
433
+ for (F.set(e, r), F.set(r, e); ++pe < fe; ) {
431
434
  var ye = e[pe], we = r[pe];
432
435
  if (m)
433
- var Ie = ae ? m(we, ye, pe, r, e, $) : m(ye, we, pe, e, r, $);
436
+ var Ie = ae ? m(we, ye, pe, r, e, F) : m(ye, we, pe, e, r, F);
434
437
  if (Ie !== void 0) {
435
438
  if (Ie)
436
439
  continue;
@@ -439,47 +442,47 @@ function Fr() {
439
442
  }
440
443
  if (de) {
441
444
  if (!ee(r, function(me, De) {
442
- if (!ve(de, De) && (ye === me || te(ye, me, v, m, $)))
445
+ if (!ve(de, De) && (ye === me || te(ye, me, v, m, F)))
443
446
  return de.push(De);
444
447
  })) {
445
448
  xe = !1;
446
449
  break;
447
450
  }
448
- } else if (!(ye === we || te(ye, we, v, m, $))) {
451
+ } else if (!(ye === we || te(ye, we, v, m, F))) {
449
452
  xe = !1;
450
453
  break;
451
454
  }
452
455
  }
453
- return $.delete(e), $.delete(r), xe;
456
+ return F.delete(e), F.delete(r), xe;
454
457
  }
455
- function _r(e, r, v, m, te, $, ae) {
458
+ function Ar(e, r, v, m, te, F, ae) {
456
459
  switch (v) {
457
460
  case t:
458
461
  if (e.byteLength != r.byteLength || e.byteOffset != r.byteOffset)
459
462
  return !1;
460
463
  e = e.buffer, r = r.buffer;
461
464
  case n:
462
- return !(e.byteLength != r.byteLength || !$(new pt(e), new pt(r)));
465
+ return !(e.byteLength != r.byteLength || !F(new pt(e), new pt(r)));
463
466
  case A:
464
467
  case C:
465
- case N:
468
+ case B:
466
469
  return Tt(+e, +r);
467
- case U:
470
+ case $:
468
471
  return e.name == r.name && e.message == r.message;
469
472
  case o:
470
473
  case c:
471
474
  return e == r + "";
472
475
  case q:
473
- var fe = Be;
476
+ var fe = ke;
474
477
  case b:
475
478
  var ce = m & O;
476
- if (fe || (fe = Oe), e.size != r.size && !ce)
479
+ if (fe || (fe = qe), e.size != r.size && !ce)
477
480
  return !1;
478
481
  var ne = ae.get(e);
479
482
  if (ne)
480
483
  return ne == r;
481
484
  m |= Y, ae.set(e, r);
482
- var pe = At(fe(e), fe(r), m, te, $, ae);
485
+ var pe = At(fe(e), fe(r), m, te, F, ae);
483
486
  return ae.delete(e), pe;
484
487
  case y:
485
488
  if (ut)
@@ -487,7 +490,7 @@ function Fr() {
487
490
  }
488
491
  return !1;
489
492
  }
490
- function Ar(e, r, v, m, te, $) {
493
+ function mr(e, r, v, m, te, F) {
491
494
  var ae = v & O, fe = mt(e), ce = fe.length, ne = mt(r), pe = ne.length;
492
495
  if (ce != pe && !ae)
493
496
  return !1;
@@ -496,40 +499,40 @@ function Fr() {
496
499
  if (!(ae ? de in r : be.call(r, de)))
497
500
  return !1;
498
501
  }
499
- var ye = $.get(e);
500
- if (ye && $.get(r))
502
+ var ye = F.get(e);
503
+ if (ye && F.get(r))
501
504
  return ye == r;
502
505
  var we = !0;
503
- $.set(e, r), $.set(r, e);
506
+ F.set(e, r), F.set(r, e);
504
507
  for (var Ie = ae; ++xe < ce; ) {
505
508
  de = fe[xe];
506
509
  var me = e[de], De = r[de];
507
510
  if (m)
508
- var Rt = ae ? m(De, me, de, r, e, $) : m(me, De, de, e, r, $);
509
- if (!(Rt === void 0 ? me === De || te(me, De, v, m, $) : Rt)) {
511
+ var Rt = ae ? m(De, me, de, r, e, F) : m(me, De, de, e, r, F);
512
+ if (!(Rt === void 0 ? me === De || te(me, De, v, m, F) : Rt)) {
510
513
  we = !1;
511
514
  break;
512
515
  }
513
516
  Ie || (Ie = de == "constructor");
514
517
  }
515
518
  if (we && !Ie) {
516
- var et = e.constructor, tt = r.constructor;
517
- et != tt && "constructor" in e && "constructor" in r && !(typeof et == "function" && et instanceof et && typeof tt == "function" && tt instanceof tt) && (we = !1);
519
+ var tt = e.constructor, rt = r.constructor;
520
+ tt != rt && "constructor" in e && "constructor" in r && !(typeof tt == "function" && tt instanceof tt && typeof rt == "function" && rt instanceof rt) && (we = !1);
518
521
  }
519
- return $.delete(e), $.delete(r), we;
522
+ return F.delete(e), F.delete(r), we;
520
523
  }
521
524
  function mt(e) {
522
- return pr(e, kr, Tr);
525
+ return yr(e, kr, Cr);
523
526
  }
524
- function Xe(e, r) {
527
+ function ze(e, r) {
525
528
  var v = e.__data__;
526
- return Mr(r) ? v[typeof r == "string" ? "string" : "hash"] : v.map;
529
+ return Ir(r) ? v[typeof r == "string" ? "string" : "hash"] : v.map;
527
530
  }
528
531
  function Ne(e, r) {
529
- var v = ke(e, r);
530
- return wr(v) ? v : void 0;
532
+ var v = Se(e, r);
533
+ return xr(v) ? v : void 0;
531
534
  }
532
- function mr(e) {
535
+ function Tr(e) {
533
536
  var r = be.call(e, Ee), v = e[Ee];
534
537
  try {
535
538
  e[Ee] = void 0;
@@ -539,43 +542,43 @@ function Fr() {
539
542
  var te = dt.call(e);
540
543
  return m && (r ? e[Ee] = v : delete e[Ee]), te;
541
544
  }
542
- var Tr = wt ? function(e) {
545
+ var Cr = wt ? function(e) {
543
546
  return e == null ? [] : (e = Object(e), I(wt(e), function(r) {
544
547
  return yt.call(e, r);
545
548
  }));
546
549
  } : Br, Me = $e;
547
- (it && Me(new it(new ArrayBuffer(1))) != t || qe && Me(new qe()) != q || ot && Me(ot.resolve()) != z || st && Me(new st()) != b || ft && Me(new ft()) != w) && (Me = function(e) {
548
- var r = $e(e), v = r == G ? e.constructor : void 0, m = v ? Pe(v) : "";
550
+ (it && Me(new it(new ArrayBuffer(1))) != t || je && Me(new je()) != q || ot && Me(ot.resolve()) != z || st && Me(new st()) != b || ft && Me(new ft()) != w) && (Me = function(e) {
551
+ var r = $e(e), v = r == V ? e.constructor : void 0, m = v ? Pe(v) : "";
549
552
  if (m)
550
553
  switch (m) {
551
- case Ut:
552
- return t;
553
554
  case Ht:
554
- return q;
555
+ return t;
555
556
  case Qt:
556
- return z;
557
+ return q;
557
558
  case Gt:
558
- return b;
559
+ return z;
559
560
  case Vt:
561
+ return b;
562
+ case Kt:
560
563
  return w;
561
564
  }
562
565
  return r;
563
566
  });
564
- function Cr(e, r) {
565
- return r = r ?? F, !!r && (typeof e == "number" || ue.test(e)) && e > -1 && e % 1 == 0 && e < r;
567
+ function Mr(e, r) {
568
+ return r = r ?? U, !!r && (typeof e == "number" || ue.test(e)) && e > -1 && e % 1 == 0 && e < r;
566
569
  }
567
- function Mr(e) {
570
+ function Ir(e) {
568
571
  var r = typeof e;
569
572
  return r == "string" || r == "number" || r == "symbol" || r == "boolean" ? e !== "__proto__" : e === null;
570
573
  }
571
- function Ir(e) {
574
+ function Er(e) {
572
575
  return !!ht && ht in e;
573
576
  }
574
- function Er(e) {
575
- var r = e && e.constructor, v = typeof r == "function" && r.prototype || We;
577
+ function Rr(e) {
578
+ var r = e && e.constructor, v = typeof r == "function" && r.prototype || Ze;
576
579
  return e === v;
577
580
  }
578
- function Rr(e) {
581
+ function Lr(e) {
579
582
  return dt.call(e);
580
583
  }
581
584
  function Pe(e) {
@@ -594,26 +597,26 @@ function Fr() {
594
597
  function Tt(e, r) {
595
598
  return e === r || e !== e && r !== r;
596
599
  }
597
- var Lr = bt(/* @__PURE__ */ function() {
600
+ var Pr = bt(/* @__PURE__ */ function() {
598
601
  return arguments;
599
602
  }()) ? bt : function(e) {
600
603
  return Fe(e) && be.call(e, "callee") && !yt.call(e, "callee");
601
- }, ze = Array.isArray;
602
- function Pr(e) {
604
+ }, et = Array.isArray;
605
+ function Dr(e) {
603
606
  return e != null && Mt(e.length) && !Ct(e);
604
607
  }
605
- var lt = $t || Sr;
606
- function Dr(e, r) {
608
+ var lt = $t || Nr;
609
+ function Sr(e, r) {
607
610
  return _t(e, r);
608
611
  }
609
612
  function Ct(e) {
610
613
  if (!It(e))
611
614
  return !1;
612
615
  var r = $e(e);
613
- return r == D || r == H || r == d || r == R;
616
+ return r == D || r == H || r == d || r == E;
614
617
  }
615
618
  function Mt(e) {
616
- return typeof e == "number" && e > -1 && e % 1 == 0 && e <= F;
619
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= U;
617
620
  }
618
621
  function It(e) {
619
622
  var r = typeof e;
@@ -622,22 +625,22 @@ function Fr() {
622
625
  function Fe(e) {
623
626
  return e != null && typeof e == "object";
624
627
  }
625
- var Et = E ? le(E) : xr;
628
+ var Et = R ? le(R) : br;
626
629
  function kr(e) {
627
- return Pr(e) ? gr(e) : br(e);
630
+ return Dr(e) ? pr(e) : _r(e);
628
631
  }
629
632
  function Br() {
630
633
  return [];
631
634
  }
632
- function Sr() {
635
+ function Nr() {
633
636
  return !1;
634
637
  }
635
- K.exports = Dr;
636
- }(Ue, Ue.exports)), Ue.exports;
638
+ G.exports = Sr;
639
+ }(He, He.exports)), He.exports;
637
640
  }
638
- var vt = { exports: {} }, kt;
639
- function Ur() {
640
- return kt || (kt = 1, function(K, X) {
641
+ var vt = { exports: {} }, St;
642
+ function Fr() {
643
+ return St || (St = 1, function(G, X) {
641
644
  var ie = function() {
642
645
  var W = function(o, b) {
643
646
  var c = 236, y = 17, f = o, w = Y[b], n = null, t = 0, g = null, i = [], p = {}, L = function(s, u) {
@@ -648,13 +651,13 @@ function Ur() {
648
651
  l[h][_] = null;
649
652
  }
650
653
  return l;
651
- }(t), T(0, 0), T(t - 7, 0), T(0, t - 7), re(), j(), k(s, u), f >= 7 && oe(s), g == null && (g = Q(f, w, i)), B(g, u);
654
+ }(t), T(0, 0), T(t - 7, 0), T(0, t - 7), re(), j(), S(s, u), f >= 7 && oe(s), g == null && (g = Q(f, w, i)), k(g, u);
652
655
  }, T = function(s, u) {
653
656
  for (var a = -1; a <= 7; a += 1)
654
657
  if (!(s + a <= -1 || t <= s + a))
655
658
  for (var l = -1; l <= 7; l += 1)
656
659
  u + l <= -1 || t <= u + l || (0 <= a && a <= 6 && (l == 0 || l == 6) || 0 <= l && l <= 6 && (a == 0 || a == 6) || 2 <= a && a <= 4 && 2 <= l && l <= 4 ? n[s + a][u + l] = !0 : n[s + a][u + l] = !1);
657
- }, V = function() {
660
+ }, K = function() {
658
661
  for (var s = 0, u = 0, a = 0; a < 8; a += 1) {
659
662
  L(!0, a);
660
663
  var l = M.getLostPoint(p);
@@ -672,8 +675,8 @@ function Ur() {
672
675
  var l = s[u], h = s[a];
673
676
  if (n[l][h] == null)
674
677
  for (var _ = -2; _ <= 2; _ += 1)
675
- for (var E = -2; E <= 2; E += 1)
676
- _ == -2 || _ == 2 || E == -2 || E == 2 || _ == 0 && E == 0 ? n[l + _][h + E] = !0 : n[l + _][h + E] = !1;
678
+ for (var R = -2; R <= 2; R += 1)
679
+ _ == -2 || _ == 2 || R == -2 || R == 2 || _ == 0 && R == 0 ? n[l + _][h + R] = !0 : n[l + _][h + R] = !1;
677
680
  }
678
681
  }, oe = function(s) {
679
682
  for (var u = M.getBCHTypeNumber(f), a = 0; a < 18; a += 1) {
@@ -684,7 +687,7 @@ function Ur() {
684
687
  var l = !s && (u >> a & 1) == 1;
685
688
  n[a % 3 + t - 8 - 3][Math.floor(a / 3)] = l;
686
689
  }
687
- }, k = function(s, u) {
690
+ }, S = function(s, u) {
688
691
  for (var a = w << 3 | u, l = M.getBCHTypeInfo(a), h = 0; h < 15; h += 1) {
689
692
  var _ = !s && (l >> h & 1) == 1;
690
693
  h < 6 ? n[h][8] = _ : h < 8 ? n[h + 1][8] = _ : n[t - 15 + h][8] = _;
@@ -694,15 +697,15 @@ function Ur() {
694
697
  h < 8 ? n[8][t - h - 1] = _ : h < 9 ? n[8][15 - h - 1 + 1] = _ : n[8][15 - h - 1] = _;
695
698
  }
696
699
  n[t - 8][8] = !s;
697
- }, B = function(s, u) {
698
- for (var a = -1, l = t - 1, h = 7, _ = 0, E = M.getMaskFunction(u), I = t - 1; I > 0; I -= 2)
700
+ }, k = function(s, u) {
701
+ for (var a = -1, l = t - 1, h = 7, _ = 0, R = M.getMaskFunction(u), I = t - 1; I > 0; I -= 2)
699
702
  for (I == 6 && (I -= 1); ; ) {
700
703
  for (var J = 0; J < 2; J += 1)
701
704
  if (n[l][I - J] == null) {
702
705
  var ee = !1;
703
706
  _ < s.length && (ee = (s[_] >>> h & 1) == 1);
704
- var S = E(l, I - J);
705
- S && (ee = !ee), n[l][I - J] = ee, h -= 1, h == -1 && (_ += 1, h = 7);
707
+ var N = R(l, I - J);
708
+ N && (ee = !ee), n[l][I - J] = ee, h -= 1, h == -1 && (_ += 1, h = 7);
706
709
  }
707
710
  if (l += a, l < 0 || t <= l) {
708
711
  l -= a, a = -a;
@@ -710,32 +713,32 @@ function Ur() {
710
713
  }
711
714
  }
712
715
  }, ue = function(s, u) {
713
- for (var a = 0, l = 0, h = 0, _ = new Array(u.length), E = new Array(u.length), I = 0; I < u.length; I += 1) {
716
+ for (var a = 0, l = 0, h = 0, _ = new Array(u.length), R = new Array(u.length), I = 0; I < u.length; I += 1) {
714
717
  var J = u[I].dataCount, ee = u[I].totalCount - J;
715
718
  l = Math.max(l, J), h = Math.max(h, ee), _[I] = new Array(J);
716
- for (var S = 0; S < _[I].length; S += 1)
717
- _[I][S] = 255 & s.getBuffer()[S + a];
719
+ for (var N = 0; N < _[I].length; N += 1)
720
+ _[I][N] = 255 & s.getBuffer()[N + a];
718
721
  a += J;
719
- var le = M.getErrorCorrectPolynomial(ee), ve = d(_[I], le.getLength() - 1), ke = ve.mod(le);
720
- E[I] = new Array(le.getLength() - 1);
721
- for (var S = 0; S < E[I].length; S += 1) {
722
- var Be = S + ke.getLength() - E[I].length;
723
- E[I][S] = Be >= 0 ? ke.getAt(Be) : 0;
722
+ var le = M.getErrorCorrectPolynomial(ee), ve = d(_[I], le.getLength() - 1), Se = ve.mod(le);
723
+ R[I] = new Array(le.getLength() - 1);
724
+ for (var N = 0; N < R[I].length; N += 1) {
725
+ var ke = N + Se.getLength() - R[I].length;
726
+ R[I][N] = ke >= 0 ? Se.getAt(ke) : 0;
724
727
  }
725
728
  }
726
- for (var Ke = 0, S = 0; S < u.length; S += 1)
727
- Ke += u[S].totalCount;
728
- for (var Oe = new Array(Ke), Se = 0, S = 0; S < l; S += 1)
729
+ for (var We = 0, N = 0; N < u.length; N += 1)
730
+ We += u[N].totalCount;
731
+ for (var qe = new Array(We), Be = 0, N = 0; N < l; N += 1)
729
732
  for (var I = 0; I < u.length; I += 1)
730
- S < _[I].length && (Oe[Se] = _[I][S], Se += 1);
731
- for (var S = 0; S < h; S += 1)
733
+ N < _[I].length && (qe[Be] = _[I][N], Be += 1);
734
+ for (var N = 0; N < h; N += 1)
732
735
  for (var I = 0; I < u.length; I += 1)
733
- S < E[I].length && (Oe[Se] = E[I][S], Se += 1);
734
- return Oe;
736
+ N < R[I].length && (qe[Be] = R[I][N], Be += 1);
737
+ return qe;
735
738
  }, Q = function(s, u, a) {
736
739
  for (var l = A.getRSBlocks(s, u), h = C(), _ = 0; _ < a.length; _ += 1) {
737
- var E = a[_];
738
- h.put(E.getMode(), 4), h.put(E.getLength(), M.getLengthInBits(E.getMode(), s)), E.write(h);
740
+ var R = a[_];
741
+ h.put(R.getMode(), 4), h.put(R.getLength(), M.getLengthInBits(R.getMode(), s)), R.write(h);
739
742
  }
740
743
  for (var I = 0, _ = 0; _ < l.length; _ += 1)
741
744
  I += l[_].dataCount;
@@ -752,7 +755,7 @@ function Ur() {
752
755
  var a = null;
753
756
  switch (u) {
754
757
  case "Numeric":
755
- a = U(s);
758
+ a = $(s);
756
759
  break;
757
760
  case "Alphanumeric":
758
761
  a = D(s);
@@ -787,7 +790,7 @@ function Ur() {
787
790
  }
788
791
  f = s;
789
792
  }
790
- L(!1, V());
793
+ L(!1, K());
791
794
  }, p.createTableTag = function(s, u) {
792
795
  s = s || 2, u = typeof u > "u" ? s * 4 : u;
793
796
  var a = "";
@@ -802,17 +805,17 @@ function Ur() {
802
805
  }, p.createSvgTag = function(s, u, a, l) {
803
806
  var h = {};
804
807
  typeof arguments[0] == "object" && (h = arguments[0], s = h.cellSize, u = h.margin, a = h.alt, l = h.title), s = s || 2, u = typeof u > "u" ? s * 4 : u, a = typeof a == "string" ? { text: a } : a || {}, a.text = a.text || null, a.id = a.text ? a.id || "qrcode-description" : null, l = typeof l == "string" ? { text: l } : l || {}, l.text = l.text || null, l.id = l.text ? l.id || "qrcode-title" : null;
805
- var _ = p.getModuleCount() * s + u * 2, E, I, J, ee, S = "", le;
806
- for (le = "l" + s + ",0 0," + s + " -" + s + ",0 0,-" + s + "z ", S += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"', S += h.scalable ? "" : ' width="' + _ + 'px" height="' + _ + 'px"', S += ' viewBox="0 0 ' + _ + " " + _ + '" ', S += ' preserveAspectRatio="xMinYMin meet"', S += l.text || a.text ? ' role="img" aria-labelledby="' + se([l.id, a.id].join(" ").trim()) + '"' : "", S += ">", S += l.text ? '<title id="' + se(l.id) + '">' + se(l.text) + "</title>" : "", S += a.text ? '<description id="' + se(a.id) + '">' + se(a.text) + "</description>" : "", S += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>', S += '<path d="', J = 0; J < p.getModuleCount(); J += 1)
807
- for (ee = J * s + u, E = 0; E < p.getModuleCount(); E += 1)
808
- p.isDark(J, E) && (I = E * s + u, S += "M" + I + "," + ee + le);
809
- return S += '" stroke="transparent" fill="black"/>', S += "</svg>", S;
808
+ var _ = p.getModuleCount() * s + u * 2, R, I, J, ee, N = "", le;
809
+ for (le = "l" + s + ",0 0," + s + " -" + s + ",0 0,-" + s + "z ", N += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"', N += h.scalable ? "" : ' width="' + _ + 'px" height="' + _ + 'px"', N += ' viewBox="0 0 ' + _ + " " + _ + '" ', N += ' preserveAspectRatio="xMinYMin meet"', N += l.text || a.text ? ' role="img" aria-labelledby="' + se([l.id, a.id].join(" ").trim()) + '"' : "", N += ">", N += l.text ? '<title id="' + se(l.id) + '">' + se(l.text) + "</title>" : "", N += a.text ? '<description id="' + se(a.id) + '">' + se(a.text) + "</description>" : "", N += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>', N += '<path d="', J = 0; J < p.getModuleCount(); J += 1)
810
+ for (ee = J * s + u, R = 0; R < p.getModuleCount(); R += 1)
811
+ p.isDark(J, R) && (I = R * s + u, N += "M" + I + "," + ee + le);
812
+ return N += '" stroke="transparent" fill="black"/>', N += "</svg>", N;
810
813
  }, p.createDataURL = function(s, u) {
811
814
  s = s || 2, u = typeof u > "u" ? s * 4 : u;
812
815
  var a = p.getModuleCount() * s + u * 2, l = u, h = a - u;
813
- return R(a, a, function(_, E) {
814
- if (l <= _ && _ < h && l <= E && E < h) {
815
- var I = Math.floor((_ - l) / s), J = Math.floor((E - l) / s);
816
+ return E(a, a, function(_, R) {
817
+ if (l <= _ && _ < h && l <= R && R < h) {
818
+ var I = Math.floor((_ - l) / s), J = Math.floor((R - l) / s);
816
819
  return p.isDark(J, I) ? 0 : 1;
817
820
  } else
818
821
  return 1;
@@ -847,7 +850,7 @@ function Ur() {
847
850
  }, _e = function(s) {
848
851
  var u = 1;
849
852
  s = typeof s > "u" ? u * 2 : s;
850
- var a = p.getModuleCount() * u + s * 2, l = s, h = a - s, _, E, I, J, ee, S = {
853
+ var a = p.getModuleCount() * u + s * 2, l = s, h = a - s, _, R, I, J, ee, N = {
851
854
  "██": "█",
852
855
  "█ ": "▀",
853
856
  " █": "▄",
@@ -859,8 +862,8 @@ function Ur() {
859
862
  " ": " "
860
863
  }, ve = "";
861
864
  for (_ = 0; _ < a; _ += 2) {
862
- for (I = Math.floor((_ - l) / u), J = Math.floor((_ + 1 - l) / u), E = 0; E < a; E += 1)
863
- ee = "█", l <= E && E < h && l <= _ && _ < h && p.isDark(I, Math.floor((E - l) / u)) && (ee = " "), l <= E && E < h && l <= _ + 1 && _ + 1 < h && p.isDark(J, Math.floor((E - l) / u)) ? ee += " " : ee += "█", ve += s < 1 && _ + 1 >= h ? le[ee] : S[ee];
865
+ for (I = Math.floor((_ - l) / u), J = Math.floor((_ + 1 - l) / u), R = 0; R < a; R += 1)
866
+ ee = "█", l <= R && R < h && l <= _ && _ < h && p.isDark(I, Math.floor((R - l) / u)) && (ee = " "), l <= R && R < h && l <= _ + 1 && _ + 1 < h && p.isDark(J, Math.floor((R - l) / u)) ? ee += " " : ee += "█", ve += s < 1 && _ + 1 >= h ? le[ee] : N[ee];
864
867
  ve += `
865
868
  `;
866
869
  }
@@ -870,10 +873,10 @@ function Ur() {
870
873
  if (s = s || 1, s < 2)
871
874
  return _e(u);
872
875
  s -= 1, u = typeof u > "u" ? s * 2 : u;
873
- var a = p.getModuleCount() * s + u * 2, l = u, h = a - u, _, E, I, J, ee = Array(s + 1).join("██"), S = Array(s + 1).join(" "), le = "", ve = "";
876
+ var a = p.getModuleCount() * s + u * 2, l = u, h = a - u, _, R, I, J, ee = Array(s + 1).join("██"), N = Array(s + 1).join(" "), le = "", ve = "";
874
877
  for (_ = 0; _ < a; _ += 1) {
875
- for (I = Math.floor((_ - l) / s), ve = "", E = 0; E < a; E += 1)
876
- J = 1, l <= E && E < h && l <= _ && _ < h && p.isDark(I, Math.floor((E - l) / s)) && (J = 0), ve += J ? ee : S;
878
+ for (I = Math.floor((_ - l) / s), ve = "", R = 0; R < a; R += 1)
879
+ J = 1, l <= R && R < h && l <= _ && _ < h && p.isDark(I, Math.floor((R - l) / s)) && (J = 0), ve += J ? ee : N;
877
880
  for (I = 0; I < s; I += 1)
878
881
  le += ve + `
879
882
  `;
@@ -896,15 +899,15 @@ function Ur() {
896
899
  }
897
900
  }, W.stringToBytes = W.stringToBytesFuncs.default, W.createStringToBytes = function(o, b) {
898
901
  var c = function() {
899
- for (var f = G(o), w = function() {
902
+ for (var f = V(o), w = function() {
900
903
  var j = f.read();
901
904
  if (j == -1) throw "eof";
902
905
  return j;
903
906
  }, n = 0, t = {}; ; ) {
904
907
  var g = f.read();
905
908
  if (g == -1) break;
906
- var i = w(), p = w(), L = w(), T = String.fromCharCode(g << 8 | i), V = p << 8 | L;
907
- t[T] = V, n += 1;
909
+ var i = w(), p = w(), L = w(), T = String.fromCharCode(g << 8 | i), K = p << 8 | L;
910
+ t[T] = K, n += 1;
908
911
  }
909
912
  if (n != b)
910
913
  throw n + " != " + b;
@@ -933,7 +936,7 @@ function Ur() {
933
936
  M: 0,
934
937
  Q: 3,
935
938
  H: 2
936
- }, F = {
939
+ }, U = {
937
940
  PATTERN000: 0,
938
941
  PATTERN001: 1,
939
942
  PATTERN010: 2,
@@ -1001,35 +1004,35 @@ function Ur() {
1001
1004
  return o[n - 1];
1002
1005
  }, f.getMaskFunction = function(n) {
1003
1006
  switch (n) {
1004
- case F.PATTERN000:
1007
+ case U.PATTERN000:
1005
1008
  return function(t, g) {
1006
1009
  return (t + g) % 2 == 0;
1007
1010
  };
1008
- case F.PATTERN001:
1011
+ case U.PATTERN001:
1009
1012
  return function(t, g) {
1010
1013
  return t % 2 == 0;
1011
1014
  };
1012
- case F.PATTERN010:
1015
+ case U.PATTERN010:
1013
1016
  return function(t, g) {
1014
1017
  return g % 3 == 0;
1015
1018
  };
1016
- case F.PATTERN011:
1019
+ case U.PATTERN011:
1017
1020
  return function(t, g) {
1018
1021
  return (t + g) % 3 == 0;
1019
1022
  };
1020
- case F.PATTERN100:
1023
+ case U.PATTERN100:
1021
1024
  return function(t, g) {
1022
1025
  return (Math.floor(t / 2) + Math.floor(g / 3)) % 2 == 0;
1023
1026
  };
1024
- case F.PATTERN101:
1027
+ case U.PATTERN101:
1025
1028
  return function(t, g) {
1026
1029
  return t * g % 2 + t * g % 3 == 0;
1027
1030
  };
1028
- case F.PATTERN110:
1031
+ case U.PATTERN110:
1029
1032
  return function(t, g) {
1030
1033
  return (t * g % 2 + t * g % 3) % 2 == 0;
1031
1034
  };
1032
- case F.PATTERN111:
1035
+ case U.PATTERN111:
1033
1036
  return function(t, g) {
1034
1037
  return (t * g % 3 + (t + g) % 2) % 2 == 0;
1035
1038
  };
@@ -1085,10 +1088,10 @@ function Ur() {
1085
1088
  }, f.getLostPoint = function(n) {
1086
1089
  for (var t = n.getModuleCount(), g = 0, i = 0; i < t; i += 1)
1087
1090
  for (var p = 0; p < t; p += 1) {
1088
- for (var L = 0, T = n.isDark(i, p), V = -1; V <= 1; V += 1)
1089
- if (!(i + V < 0 || t <= i + V))
1091
+ for (var L = 0, T = n.isDark(i, p), K = -1; K <= 1; K += 1)
1092
+ if (!(i + K < 0 || t <= i + K))
1090
1093
  for (var j = -1; j <= 1; j += 1)
1091
- p + j < 0 || t <= p + j || V == 0 && j == 0 || T == n.isDark(i + V, p + j) && (L += 1);
1094
+ p + j < 0 || t <= p + j || K == 0 && j == 0 || T == n.isDark(i + K, p + j) && (L += 1);
1092
1095
  L > 5 && (g += 3 + L - 5);
1093
1096
  }
1094
1097
  for (var i = 0; i < t - 1; i += 1)
@@ -1105,8 +1108,8 @@ function Ur() {
1105
1108
  for (var oe = 0, p = 0; p < t; p += 1)
1106
1109
  for (var i = 0; i < t; i += 1)
1107
1110
  n.isDark(i, p) && (oe += 1);
1108
- var k = Math.abs(100 * oe / t / t - 50) / 5;
1109
- return g += k * 10, g;
1111
+ var S = Math.abs(100 * oe / t / t - 50) / 5;
1112
+ return g += S * 10, g;
1110
1113
  }, f;
1111
1114
  }(), x = function() {
1112
1115
  for (var o = new Array(256), b = new Array(256), c = 0; c < 8; c += 1)
@@ -1385,7 +1388,7 @@ function Ur() {
1385
1388
  if (typeof n > "u")
1386
1389
  throw "bad rs block @ typeNumber:" + f + "/errorCorrectionLevel:" + w;
1387
1390
  for (var t = n.length / 3, g = [], i = 0; i < t; i += 1)
1388
- for (var p = n[i * 3 + 0], L = n[i * 3 + 1], T = n[i * 3 + 2], V = 0; V < p; V += 1)
1391
+ for (var p = n[i * 3 + 0], L = n[i * 3 + 1], T = n[i * 3 + 2], K = 0; K < p; K += 1)
1389
1392
  g.push(b(L, T));
1390
1393
  return g;
1391
1394
  }, c;
@@ -1405,7 +1408,7 @@ function Ur() {
1405
1408
  var f = Math.floor(b / 8);
1406
1409
  o.length <= f && o.push(0), y && (o[f] |= 128 >>> b % 8), b += 1;
1407
1410
  }, c;
1408
- }, U = function(o) {
1411
+ }, $ = function(o) {
1409
1412
  var b = O.MODE_NUMBER, c = o, y = {};
1410
1413
  y.getMode = function() {
1411
1414
  return b;
@@ -1507,7 +1510,7 @@ function Ur() {
1507
1510
  if (t < n.length)
1508
1511
  throw "illegal char at " + (t + 1);
1509
1512
  }, f;
1510
- }, N = function() {
1513
+ }, B = function() {
1511
1514
  var o = [], b = {};
1512
1515
  return b.writeByte = function(c) {
1513
1516
  o.push(c & 255);
@@ -1557,7 +1560,7 @@ function Ur() {
1557
1560
  }, f.toString = function() {
1558
1561
  return y;
1559
1562
  }, f;
1560
- }, G = function(o) {
1563
+ }, V = function(o) {
1561
1564
  var b = o, c = 0, y = 0, f = 0, w = {};
1562
1565
  w.read = function() {
1563
1566
  for (; f < 8; ) {
@@ -1603,28 +1606,28 @@ function Ur() {
1603
1606
  i.writeByte(L.length - T), i.writeBytes(L, T, L.length - T), i.writeByte(0), i.writeString(";");
1604
1607
  };
1605
1608
  var n = function(i) {
1606
- var p = i, L = 0, T = 0, V = {};
1607
- return V.write = function(j, re) {
1609
+ var p = i, L = 0, T = 0, K = {};
1610
+ return K.write = function(j, re) {
1608
1611
  if (j >>> re)
1609
1612
  throw "length over";
1610
1613
  for (; L + re >= 8; )
1611
1614
  p.writeByte(255 & (j << L | T)), re -= 8 - L, j >>>= 8 - L, T = 0, L = 0;
1612
1615
  T = j << L | T, L = L + re;
1613
- }, V.flush = function() {
1616
+ }, K.flush = function() {
1614
1617
  L > 0 && p.writeByte(T);
1615
- }, V;
1618
+ }, K;
1616
1619
  }, t = function(i) {
1617
- for (var p = 1 << i, L = (1 << i) + 1, T = i + 1, V = g(), j = 0; j < p; j += 1)
1618
- V.add(String.fromCharCode(j));
1619
- V.add(String.fromCharCode(p)), V.add(String.fromCharCode(L));
1620
- var re = N(), oe = n(re);
1620
+ for (var p = 1 << i, L = (1 << i) + 1, T = i + 1, K = g(), j = 0; j < p; j += 1)
1621
+ K.add(String.fromCharCode(j));
1622
+ K.add(String.fromCharCode(p)), K.add(String.fromCharCode(L));
1623
+ var re = B(), oe = n(re);
1621
1624
  oe.write(p, T);
1622
- var k = 0, B = String.fromCharCode(f[k]);
1623
- for (k += 1; k < f.length; ) {
1624
- var ue = String.fromCharCode(f[k]);
1625
- k += 1, V.contains(B + ue) ? B = B + ue : (oe.write(V.indexOf(B), T), V.size() < 4095 && (V.size() == 1 << T && (T += 1), V.add(B + ue)), B = ue);
1625
+ var S = 0, k = String.fromCharCode(f[S]);
1626
+ for (S += 1; S < f.length; ) {
1627
+ var ue = String.fromCharCode(f[S]);
1628
+ S += 1, K.contains(k + ue) ? k = k + ue : (oe.write(K.indexOf(k), T), K.size() < 4095 && (K.size() == 1 << T && (T += 1), K.add(k + ue)), k = ue);
1626
1629
  }
1627
- return oe.write(V.indexOf(B), T), oe.write(L, T), oe.flush(), re.toByteArray();
1630
+ return oe.write(K.indexOf(k), T), oe.write(L, T), oe.flush(), re.toByteArray();
1628
1631
  }, g = function() {
1629
1632
  var i = {}, p = 0, L = {};
1630
1633
  return L.add = function(T) {
@@ -1640,11 +1643,11 @@ function Ur() {
1640
1643
  }, L;
1641
1644
  };
1642
1645
  return w;
1643
- }, R = function(o, b, c) {
1646
+ }, E = function(o, b, c) {
1644
1647
  for (var y = z(o, b), f = 0; f < b; f += 1)
1645
1648
  for (var w = 0; w < o; w += 1)
1646
1649
  y.setPixel(w, f, c(w, f));
1647
- var n = N();
1650
+ var n = B();
1648
1651
  y.write(n);
1649
1652
  for (var t = Z(), g = n.toByteArray(), i = 0; i < g.length; i += 1)
1650
1653
  t.writeByte(g[i]);
@@ -1655,70 +1658,70 @@ function Ur() {
1655
1658
  (function() {
1656
1659
  ie.stringToBytesFuncs["UTF-8"] = function(W) {
1657
1660
  function O(Y) {
1658
- for (var F = [], M = 0; M < Y.length; M++) {
1661
+ for (var U = [], M = 0; M < Y.length; M++) {
1659
1662
  var x = Y.charCodeAt(M);
1660
- x < 128 ? F.push(x) : x < 2048 ? F.push(
1663
+ x < 128 ? U.push(x) : x < 2048 ? U.push(
1661
1664
  192 | x >> 6,
1662
1665
  128 | x & 63
1663
- ) : x < 55296 || x >= 57344 ? F.push(
1666
+ ) : x < 55296 || x >= 57344 ? U.push(
1664
1667
  224 | x >> 12,
1665
1668
  128 | x >> 6 & 63,
1666
1669
  128 | x & 63
1667
- ) : (M++, x = 65536 + ((x & 1023) << 10 | Y.charCodeAt(M) & 1023), F.push(
1670
+ ) : (M++, x = 65536 + ((x & 1023) << 10 | Y.charCodeAt(M) & 1023), U.push(
1668
1671
  240 | x >> 18,
1669
1672
  128 | x >> 12 & 63,
1670
1673
  128 | x >> 6 & 63,
1671
1674
  128 | x & 63
1672
1675
  ));
1673
1676
  }
1674
- return F;
1677
+ return U;
1675
1678
  }
1676
1679
  return O(W);
1677
1680
  };
1678
1681
  })(), function(W) {
1679
- K.exports = W();
1682
+ G.exports = W();
1680
1683
  }(function() {
1681
1684
  return ie;
1682
1685
  });
1683
1686
  }(vt)), vt.exports;
1684
1687
  }
1685
- var Bt;
1688
+ var kt;
1686
1689
  function Hr() {
1687
- if (Bt) return Te;
1688
- Bt = 1;
1689
- var K = Te && Te.__extends || /* @__PURE__ */ function() {
1690
- var F = function(M, x) {
1691
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, A) {
1690
+ if (kt) return Te;
1691
+ kt = 1;
1692
+ var G = Te && Te.__extends || /* @__PURE__ */ function() {
1693
+ var U = function(M, x) {
1694
+ return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, A) {
1692
1695
  d.__proto__ = A;
1693
1696
  } || function(d, A) {
1694
1697
  for (var C in A) Object.prototype.hasOwnProperty.call(A, C) && (d[C] = A[C]);
1695
- }, F(M, x);
1698
+ }, U(M, x);
1696
1699
  };
1697
1700
  return function(M, x) {
1698
1701
  if (typeof x != "function" && x !== null)
1699
1702
  throw new TypeError("Class extends value " + String(x) + " is not a constructor or null");
1700
- F(M, x);
1703
+ U(M, x);
1701
1704
  function d() {
1702
1705
  this.constructor = M;
1703
1706
  }
1704
1707
  M.prototype = x === null ? Object.create(x) : (d.prototype = x.prototype, new d());
1705
1708
  };
1706
1709
  }(), X = Te && Te.__assign || function() {
1707
- return X = Object.assign || function(F) {
1710
+ return X = Object.assign || function(U) {
1708
1711
  for (var M, x = 1, d = arguments.length; x < d; x++) {
1709
1712
  M = arguments[x];
1710
- for (var A in M) Object.prototype.hasOwnProperty.call(M, A) && (F[A] = M[A]);
1713
+ for (var A in M) Object.prototype.hasOwnProperty.call(M, A) && (U[A] = M[A]);
1711
1714
  }
1712
- return F;
1715
+ return U;
1713
1716
  }, X.apply(this, arguments);
1714
1717
  };
1715
1718
  Object.defineProperty(Te, "__esModule", { value: !0 }), Te.QRCode = void 0;
1716
- var ie = Fr(), W = Ur(), O = Nr, Y = (
1719
+ var ie = $r(), W = Fr(), O = Bt, Y = (
1717
1720
  /** @class */
1718
- function(F) {
1719
- K(M, F);
1721
+ function(U) {
1722
+ G(M, U);
1720
1723
  function M(x) {
1721
- var d = F.call(this, x) || this;
1724
+ var d = U.call(this, x) || this;
1722
1725
  return d.canvasRef = O.createRef(), d;
1723
1726
  }
1724
1727
  return M.prototype.download = function(x, d) {
@@ -1736,38 +1739,38 @@ function Hr() {
1736
1739
  A = "image/png";
1737
1740
  break;
1738
1741
  }
1739
- var C = this.canvasRef.current.toDataURL(A, 1), U = document.createElement("a");
1740
- U.download = d ?? "react-qrcode-logo", U.href = C, U.click();
1742
+ var C = this.canvasRef.current.toDataURL(A, 1), $ = document.createElement("a");
1743
+ $.download = d ?? "react-qrcode-logo", $.href = C, $.click();
1741
1744
  }
1742
1745
  }, M.prototype.utf16to8 = function(x) {
1743
- var d = "", A, C, U = x.length;
1744
- for (A = 0; A < U; A++)
1746
+ var d = "", A, C, $ = x.length;
1747
+ for (A = 0; A < $; A++)
1745
1748
  C = x.charCodeAt(A), C >= 1 && C <= 127 ? d += x.charAt(A) : C > 2047 ? (d += String.fromCharCode(224 | C >> 12 & 15), d += String.fromCharCode(128 | C >> 6 & 63), d += String.fromCharCode(128 | C >> 0 & 63)) : (d += String.fromCharCode(192 | C >> 6 & 31), d += String.fromCharCode(128 | C >> 0 & 63));
1746
1749
  return d;
1747
- }, M.prototype.drawRoundedSquare = function(x, d, A, C, U, D, H, q) {
1748
- q.lineWidth = x, q.fillStyle = U, q.strokeStyle = U, A += x / 2, d += x / 2, C -= x, Array.isArray(D) || (D = [D, D, D, D]), D = D.map(function(R) {
1749
- return R = Math.min(R, C / 2), R < 0 ? 0 : R;
1750
+ }, M.prototype.drawRoundedSquare = function(x, d, A, C, $, D, H, q) {
1751
+ q.lineWidth = x, q.fillStyle = $, q.strokeStyle = $, A += x / 2, d += x / 2, C -= x, Array.isArray(D) || (D = [D, D, D, D]), D = D.map(function(E) {
1752
+ return E = Math.min(E, C / 2), E < 0 ? 0 : E;
1750
1753
  });
1751
- var N = D[0] || 0, Z = D[1] || 0, G = D[2] || 0, z = D[3] || 0;
1752
- q.beginPath(), q.moveTo(d + N, A), q.lineTo(d + C - Z, A), Z && q.quadraticCurveTo(d + C, A, d + C, A + Z), q.lineTo(d + C, A + C - G), G && q.quadraticCurveTo(d + C, A + C, d + C - G, A + C), q.lineTo(d + z, A + C), z && q.quadraticCurveTo(d, A + C, d, A + C - z), q.lineTo(d, A + N), N && q.quadraticCurveTo(d, A, d + N, A), q.closePath(), q.stroke(), H && q.fill();
1753
- }, M.prototype.drawPositioningPattern = function(x, d, A, C, U, D, H) {
1754
+ var B = D[0] || 0, Z = D[1] || 0, V = D[2] || 0, z = D[3] || 0;
1755
+ q.beginPath(), q.moveTo(d + B, A), q.lineTo(d + C - Z, A), Z && q.quadraticCurveTo(d + C, A, d + C, A + Z), q.lineTo(d + C, A + C - V), V && q.quadraticCurveTo(d + C, A + C, d + C - V, A + C), q.lineTo(d + z, A + C), z && q.quadraticCurveTo(d, A + C, d, A + C - z), q.lineTo(d, A + B), B && q.quadraticCurveTo(d, A, d + B, A), q.closePath(), q.stroke(), H && q.fill();
1756
+ }, M.prototype.drawPositioningPattern = function(x, d, A, C, $, D, H) {
1754
1757
  H === void 0 && (H = [0, 0, 0, 0]);
1755
- var q = Math.ceil(d), N, Z;
1756
- typeof H != "number" && !Array.isArray(H) ? (N = H.outer || 0, Z = H.inner || 0) : (N = H, Z = N);
1757
- var G, z;
1758
- typeof D != "string" ? (G = D.outer, z = D.inner) : (G = D, z = D);
1759
- var R = C * d + A, o = U * d + A, b = d * 7;
1760
- this.drawRoundedSquare(q, o, R, b, G, N, !1, x), b = d * 3, R += d * 2, o += d * 2, this.drawRoundedSquare(q, o, R, b, z, Z, !0, x);
1758
+ var q = Math.ceil(d), B, Z;
1759
+ typeof H != "number" && !Array.isArray(H) ? (B = H.outer || 0, Z = H.inner || 0) : (B = H, Z = B);
1760
+ var V, z;
1761
+ typeof D != "string" ? (V = D.outer, z = D.inner) : (V = D, z = D);
1762
+ var E = C * d + A, o = $ * d + A, b = d * 7;
1763
+ this.drawRoundedSquare(q, o, E, b, V, B, !1, x), b = d * 3, E += d * 2, o += d * 2, this.drawRoundedSquare(q, o, E, b, z, Z, !0, x);
1761
1764
  }, M.prototype.isInPositioninZone = function(x, d, A) {
1762
1765
  return A.some(function(C) {
1763
1766
  return d >= C.row && d <= C.row + 7 && x >= C.col && x <= C.col + 7;
1764
1767
  });
1765
1768
  }, M.prototype.transformPixelLengthIntoNumberOfCells = function(x, d) {
1766
1769
  return x / d;
1767
- }, M.prototype.isCoordinateInImage = function(x, d, A, C, U, D, H, q) {
1770
+ }, M.prototype.isCoordinateInImage = function(x, d, A, C, $, D, H, q) {
1768
1771
  if (q) {
1769
- var N = 2, Z = this.transformPixelLengthIntoNumberOfCells(U, H), G = this.transformPixelLengthIntoNumberOfCells(D, H), z = this.transformPixelLengthIntoNumberOfCells(A, H) - 1, R = this.transformPixelLengthIntoNumberOfCells(C, H) - 1;
1770
- return d >= Z - N && d <= Z + z + N && x >= G - N && x <= G + R + N;
1772
+ var B = 2, Z = this.transformPixelLengthIntoNumberOfCells($, H), V = this.transformPixelLengthIntoNumberOfCells(D, H), z = this.transformPixelLengthIntoNumberOfCells(A, H) - 1, E = this.transformPixelLengthIntoNumberOfCells(C, H) - 1;
1773
+ return d >= Z - B && d <= Z + z + B && x >= V - B && x <= V + E + B;
1771
1774
  } else
1772
1775
  return !1;
1773
1776
  }, M.prototype.shouldComponentUpdate = function(x) {
@@ -1777,10 +1780,10 @@ function Hr() {
1777
1780
  }, M.prototype.componentDidUpdate = function() {
1778
1781
  this.update();
1779
1782
  }, M.prototype.update = function() {
1780
- var x, d = this.props, A = d.value, C = d.ecLevel, U = d.enableCORS, D = d.bgColor, H = d.fgColor, q = d.logoImage, N = d.logoOpacity, Z = d.logoOnLoad, G = d.removeQrCodeBehindLogo, z = d.qrStyle, R = d.eyeRadius, o = d.eyeColor, b = d.logoPaddingStyle, c = +this.props.size, y = +this.props.quietZone, f = this.props.logoWidth ? +this.props.logoWidth : 0, w = this.props.logoHeight ? +this.props.logoHeight : 0, n = this.props.logoPadding ? +this.props.logoPadding : 0, t = W(0, C);
1783
+ var x, d = this.props, A = d.value, C = d.ecLevel, $ = d.enableCORS, D = d.bgColor, H = d.fgColor, q = d.logoImage, B = d.logoOpacity, Z = d.logoOnLoad, V = d.removeQrCodeBehindLogo, z = d.qrStyle, E = d.eyeRadius, o = d.eyeColor, b = d.logoPaddingStyle, c = +this.props.size, y = +this.props.quietZone, f = this.props.logoWidth ? +this.props.logoWidth : 0, w = this.props.logoHeight ? +this.props.logoHeight : 0, n = this.props.logoPadding ? +this.props.logoPadding : 0, t = W(0, C);
1781
1784
  t.addData(this.utf16to8(A)), t.make();
1782
- var g = (x = this.canvasRef) === null || x === void 0 ? void 0 : x.current, i = g.getContext("2d"), p = c + 2 * y, L = t.getModuleCount(), T = c / L, V = window.devicePixelRatio || 1;
1783
- g.height = g.width = p * V, i.scale(V, V), i.fillStyle = D, i.fillRect(0, 0, p, p);
1785
+ var g = (x = this.canvasRef) === null || x === void 0 ? void 0 : x.current, i = g.getContext("2d"), p = c + 2 * y, L = t.getModuleCount(), T = c / L, K = window.devicePixelRatio || 1;
1786
+ g.height = g.width = p * K, i.scale(K, K), i.fillStyle = D, i.fillRect(0, 0, p, p);
1784
1787
  var j = y, re = [
1785
1788
  { row: 0, col: 0 },
1786
1789
  { row: 0, col: L - 7 },
@@ -1788,45 +1791,45 @@ function Hr() {
1788
1791
  ];
1789
1792
  if (i.strokeStyle = H, z === "dots") {
1790
1793
  i.fillStyle = H;
1791
- for (var oe = T / 2, k = 0; k < L; k++)
1792
- for (var B = 0; B < L; B++)
1793
- t.isDark(k, B) && !this.isInPositioninZone(k, B, re) && (i.beginPath(), i.arc(Math.round(B * T) + oe + j, Math.round(k * T) + oe + j, oe / 100 * 75, 0, 2 * Math.PI, !1), i.closePath(), i.fill());
1794
+ for (var oe = T / 2, S = 0; S < L; S++)
1795
+ for (var k = 0; k < L; k++)
1796
+ t.isDark(S, k) && !this.isInPositioninZone(S, k, re) && (i.beginPath(), i.arc(Math.round(k * T) + oe + j, Math.round(S * T) + oe + j, oe / 100 * 75, 0, 2 * Math.PI, !1), i.closePath(), i.fill());
1794
1797
  } else if (z === "fluid") {
1795
- for (var oe = Math.ceil(T / 2), k = 0; k < L; k++)
1796
- for (var B = 0; B < L; B++)
1797
- if (t.isDark(k, B) && !this.isInPositioninZone(k, B, re)) {
1798
+ for (var oe = Math.ceil(T / 2), S = 0; S < L; S++)
1799
+ for (var k = 0; k < L; k++)
1800
+ if (t.isDark(S, k) && !this.isInPositioninZone(S, k, re)) {
1798
1801
  var ue = [!1, !1, !1, !1];
1799
- k > 0 && !t.isDark(k - 1, B) && B > 0 && !t.isDark(k, B - 1) && (ue[0] = !0), k > 0 && !t.isDark(k - 1, B) && B < L - 1 && !t.isDark(k, B + 1) && (ue[1] = !0), k < L - 1 && !t.isDark(k + 1, B) && B < L - 1 && !t.isDark(k, B + 1) && (ue[2] = !0), k < L - 1 && !t.isDark(k + 1, B) && B > 0 && !t.isDark(k, B - 1) && (ue[3] = !0);
1800
- var Q = Math.ceil((B + 1) * T) - Math.floor(B * T), se = Math.ceil((k + 1) * T) - Math.floor(k * T);
1801
- i.fillStyle = H, i.beginPath(), i.arc(Math.round(B * T) + oe + j, Math.round(k * T) + oe + j, oe, 0, 2 * Math.PI, !1), i.closePath(), i.fill(), ue[0] || i.fillRect(Math.round(B * T) + j, Math.round(k * T) + j, Q / 2, se / 2), ue[1] || i.fillRect(Math.round(B * T) + j + Math.floor(Q / 2), Math.round(k * T) + j, Q / 2, se / 2), ue[2] || i.fillRect(Math.round(B * T) + j + Math.floor(Q / 2), Math.round(k * T) + j + Math.floor(se / 2), Q / 2, se / 2), ue[3] || i.fillRect(Math.round(B * T) + j, Math.round(k * T) + j + Math.floor(se / 2), Q / 2, se / 2);
1802
+ S > 0 && !t.isDark(S - 1, k) && k > 0 && !t.isDark(S, k - 1) && (ue[0] = !0), S > 0 && !t.isDark(S - 1, k) && k < L - 1 && !t.isDark(S, k + 1) && (ue[1] = !0), S < L - 1 && !t.isDark(S + 1, k) && k < L - 1 && !t.isDark(S, k + 1) && (ue[2] = !0), S < L - 1 && !t.isDark(S + 1, k) && k > 0 && !t.isDark(S, k - 1) && (ue[3] = !0);
1803
+ var Q = Math.ceil((k + 1) * T) - Math.floor(k * T), se = Math.ceil((S + 1) * T) - Math.floor(S * T);
1804
+ i.fillStyle = H, i.beginPath(), i.arc(Math.round(k * T) + oe + j, Math.round(S * T) + oe + j, oe, 0, 2 * Math.PI, !1), i.closePath(), i.fill(), ue[0] || i.fillRect(Math.round(k * T) + j, Math.round(S * T) + j, Q / 2, se / 2), ue[1] || i.fillRect(Math.round(k * T) + j + Math.floor(Q / 2), Math.round(S * T) + j, Q / 2, se / 2), ue[2] || i.fillRect(Math.round(k * T) + j + Math.floor(Q / 2), Math.round(S * T) + j + Math.floor(se / 2), Q / 2, se / 2), ue[3] || i.fillRect(Math.round(k * T) + j, Math.round(S * T) + j + Math.floor(se / 2), Q / 2, se / 2);
1802
1805
  }
1803
1806
  } else
1804
- for (var k = 0; k < L; k++)
1805
- for (var B = 0; B < L; B++)
1806
- if (t.isDark(k, B) && !this.isInPositioninZone(k, B, re)) {
1807
+ for (var S = 0; S < L; S++)
1808
+ for (var k = 0; k < L; k++)
1809
+ if (t.isDark(S, k) && !this.isInPositioninZone(S, k, re)) {
1807
1810
  i.fillStyle = H;
1808
- var Q = Math.ceil((B + 1) * T) - Math.floor(B * T), se = Math.ceil((k + 1) * T) - Math.floor(k * T);
1809
- i.fillRect(Math.round(B * T) + j, Math.round(k * T) + j, Q, se);
1811
+ var Q = Math.ceil((k + 1) * T) - Math.floor(k * T), se = Math.ceil((S + 1) * T) - Math.floor(S * T);
1812
+ i.fillRect(Math.round(k * T) + j, Math.round(S * T) + j, Q, se);
1810
1813
  }
1811
1814
  for (var _e = 0; _e < 3; _e++) {
1812
- var s = re[_e], k = s.row, B = s.col, u = R, a = void 0;
1813
- Array.isArray(u) && (u = u[_e]), typeof u == "number" && (u = [u, u, u, u]), o ? Array.isArray(o) ? a = o[_e] : a = o : a = H, this.drawPositioningPattern(i, T, j, k, B, a, u);
1815
+ var s = re[_e], S = s.row, k = s.col, u = E, a = void 0;
1816
+ Array.isArray(u) && (u = u[_e]), typeof u == "number" && (u = [u, u, u, u]), o ? Array.isArray(o) ? a = o[_e] : a = o : a = H, this.drawPositioningPattern(i, T, j, S, k, a, u);
1814
1817
  }
1815
1818
  if (q) {
1816
1819
  var l = new Image();
1817
- U && (l.crossOrigin = "Anonymous"), l.onload = function(h) {
1820
+ $ && (l.crossOrigin = "Anonymous"), l.onload = function(h) {
1818
1821
  i.save();
1819
- var _ = f || c * 0.2, E = w || _, I = (c - _) / 2, J = (c - E) / 2;
1820
- if (G || n) {
1822
+ var _ = f || c * 0.2, R = w || _, I = (c - _) / 2, J = (c - R) / 2;
1823
+ if (V || n) {
1821
1824
  i.beginPath(), i.strokeStyle = D, i.fillStyle = D;
1822
- var ee = _ + 2 * n, S = E + 2 * n, le = I + j - n, ve = J + j - n;
1825
+ var ee = _ + 2 * n, N = R + 2 * n, le = I + j - n, ve = J + j - n;
1823
1826
  if (b === "circle") {
1824
- var ke = le + ee / 2, Be = ve + S / 2;
1825
- i.ellipse(ke, Be, ee / 2, S / 2, 0, 0, 2 * Math.PI), i.stroke(), i.fill();
1827
+ var Se = le + ee / 2, ke = ve + N / 2;
1828
+ i.ellipse(Se, ke, ee / 2, N / 2, 0, 0, 2 * Math.PI), i.stroke(), i.fill();
1826
1829
  } else
1827
- i.fillRect(le, ve, ee, S);
1830
+ i.fillRect(le, ve, ee, N);
1828
1831
  }
1829
- i.globalAlpha = N, i.drawImage(l, I + j, J + j, _, E), i.restore(), Z && Z(h);
1832
+ i.globalAlpha = B, i.drawImage(l, I + j, J + j, _, R), i.restore(), Z && Z(h);
1830
1833
  }, l.src = q;
1831
1834
  }
1832
1835
  }, M.prototype.render = function() {
@@ -1849,8 +1852,8 @@ function Hr() {
1849
1852
  );
1850
1853
  return Te.QRCode = Y, Te;
1851
1854
  }
1852
- var St = Hr();
1853
- const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v-justify-center", children: [
1855
+ var Nt = Hr();
1856
+ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v-justify-center", children: [
1854
1857
  /* @__PURE__ */ P(
1855
1858
  "svg",
1856
1859
  {
@@ -1903,27 +1906,27 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
1903
1906
  }
1904
1907
  ` })
1905
1908
  ] }), Kr = ({
1906
- title: K,
1909
+ title: G,
1907
1910
  containerClass: X
1908
1911
  }) => {
1909
- const ie = (/* @__PURE__ */ new Date()).getFullYear(), [W, O] = ge(""), [Y, F] = ge(""), [M, x] = ge(!1), {
1912
+ const ie = (/* @__PURE__ */ new Date()).getFullYear(), [W, O] = ge(""), [Y, U] = ge(""), [M, x] = ge(!1), {
1910
1913
  apiUrl: d,
1911
1914
  clientId: A,
1912
1915
  codeChallenge: C,
1913
- authRequestId: U,
1916
+ authRequestId: $,
1914
1917
  authRequestIdExpires: D,
1915
1918
  setIsAuthenticating: H,
1916
1919
  isAuthenticating: q,
1917
- token: N,
1920
+ token: B,
1918
1921
  setAuthError: Z
1919
- } = nt(Ve);
1920
- Qe(() => {
1921
- if (C && U && D) {
1922
- const R = D.getTime() / 1e3, o = `c=${C},r=${U},e=${R},a=${A}`;
1923
- F(o);
1924
- }
1925
- }, [A, U, D, C]);
1926
- const G = Ge(async () => {
1922
+ } = Ke(Oe);
1923
+ Ge(() => {
1924
+ if (C && $ && D) {
1925
+ const E = D.getTime() / 1e3, o = `c=${C},r=${$},e=${E},a=${A}`;
1926
+ U(o);
1927
+ }
1928
+ }, [A, $, D, C]);
1929
+ const V = Ve(async () => {
1927
1930
  x(!0);
1928
1931
  try {
1929
1932
  if (!W) {
@@ -1931,24 +1934,24 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
1931
1934
  window.alert(o), console.error(o);
1932
1935
  return;
1933
1936
  }
1934
- const R = await z({
1937
+ const E = await z({
1935
1938
  alias: W,
1936
1939
  code_challenge: C,
1937
- request_id: U
1940
+ request_id: $
1938
1941
  });
1939
- if (R != null && R.ok)
1942
+ if (E != null && E.ok)
1940
1943
  H(!0);
1941
- else if (!(R != null && R.ok) && (R == null ? void 0 : R.message) === "Unable to request auth.") {
1944
+ else if (!(E != null && E.ok) && (E == null ? void 0 : E.message) === "Unable to request auth.") {
1942
1945
  const o = "Invalid login. Please use your existing Email or Abaxx ID.";
1943
1946
  window.alert(o), console.error(o);
1944
1947
  }
1945
- } catch (R) {
1948
+ } catch (E) {
1946
1949
  const o = "Something went wrong. Please try again later.";
1947
- window.alert(o), console.error(o), console.log(R);
1950
+ window.alert(o), console.error(o), console.log(E);
1948
1951
  }
1949
1952
  x(!1);
1950
- }, [C, U, W, x, H]), z = Ge(
1951
- async (R) => {
1953
+ }, [C, $, W, x, H]), z = Ve(
1954
+ async (E) => {
1952
1955
  try {
1953
1956
  const o = await fetch(
1954
1957
  `${d}/v-plus/auth/req?cid=${A}`,
@@ -1958,7 +1961,7 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
1958
1961
  Accept: "application/json",
1959
1962
  "Content-Type": "application/json"
1960
1963
  },
1961
- body: JSON.stringify(R)
1964
+ body: JSON.stringify(E)
1962
1965
  }
1963
1966
  ), b = await o.json();
1964
1967
  if (!o.ok || b.ok === !1) {
@@ -1974,7 +1977,7 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
1974
1977
  },
1975
1978
  [d, A, Z]
1976
1979
  );
1977
- return /* @__PURE__ */ P(He, { children: /* @__PURE__ */ he(
1980
+ return /* @__PURE__ */ P(Qe, { children: /* @__PURE__ */ he(
1978
1981
  "div",
1979
1982
  {
1980
1983
  className: `v-auth-container v-grid v-grid-responsive v-h-screen v-bg-white ${X}`,
@@ -2006,9 +2009,9 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2006
2009
  height: 56
2007
2010
  }
2008
2011
  ),
2009
- !N && !q ? /* @__PURE__ */ he(He, { children: [
2010
- /* @__PURE__ */ P("div", { className: "v-mb-8", children: U && Y ? /* @__PURE__ */ P(
2011
- St.QRCode,
2012
+ !B && !q ? /* @__PURE__ */ he(Qe, { children: [
2013
+ /* @__PURE__ */ P("div", { className: "v-mb-8", children: $ && Y ? /* @__PURE__ */ P(
2014
+ Nt.QRCode,
2012
2015
  {
2013
2016
  value: Y,
2014
2017
  size: 130,
@@ -2019,8 +2022,8 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2019
2022
  logoHeight: 20,
2020
2023
  quietZone: 0
2021
2024
  }
2022
- ) : /* @__PURE__ */ P("div", { className: "v-w-130 v-h-130 v-flex v-items-center v-justify-center", children: /* @__PURE__ */ P(Nt, {}) }) }),
2023
- /* @__PURE__ */ P("h1", { className: "v-text-black v-text-xl v-tracking-wide v-mb-4 v-font-medium", children: K || "Verifier+ Login" }),
2025
+ ) : /* @__PURE__ */ P("div", { className: "v-w-130 v-h-130 v-flex v-items-center v-justify-center", children: /* @__PURE__ */ P(Ot, {}) }) }),
2026
+ /* @__PURE__ */ P("h1", { className: "v-text-black v-text-xl v-tracking-wide v-mb-4 v-font-medium", children: G || "Verifier+ Login" }),
2024
2027
  /* @__PURE__ */ P("p", { className: "v-text-gray-400 v-font-semibold v-mb-6 v-text-sm", children: "Sign in using the latest version of Verifier+ or enter Abaxx ID" }),
2025
2028
  /* @__PURE__ */ he("div", { className: "v-min-w-300", children: [
2026
2029
  /* @__PURE__ */ P(
@@ -2030,7 +2033,7 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2030
2033
  className: "v-input v-w-full v-h-10 v-mb-4 v-rounded v-bg-transparent v-text-gray-600 v-border-gray-400 v-border v-px-2 v-text-center",
2031
2034
  placeholder: "Enter Email or Abaxx ID",
2032
2035
  value: W,
2033
- onChange: (R) => O(R.target.value),
2036
+ onChange: (E) => O(E.target.value),
2034
2037
  disabled: M
2035
2038
  }
2036
2039
  ),
@@ -2038,8 +2041,8 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2038
2041
  "button",
2039
2042
  {
2040
2043
  className: "v-button v-h-10 v-w-full v-bg-red v-text-white v-text-base v-font-semibold v-flex v-items-center v-gap-2 v-justify-center",
2041
- disabled: M || !W || !U,
2042
- onClick: G,
2044
+ disabled: M || !W || !$,
2045
+ onClick: V,
2043
2046
  children: [
2044
2047
  M && /* @__PURE__ */ P(
2045
2048
  "svg",
@@ -2079,7 +2082,7 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2079
2082
  children: /* @__PURE__ */ P("path", { d: "M20 6 9 17l-5-5" })
2080
2083
  }
2081
2084
  ),
2082
- N ? /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(He, { children: [
2085
+ B ? /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Qe, { children: [
2083
2086
  /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Authorization requested!" }) }),
2084
2087
  /* @__PURE__ */ P("div", { className: "v-text-center v-rounded v-bg-slate-100 v-text-slate-800 v-p-3 v-my-4", children: /* @__PURE__ */ P("span", { children: "Please check the Abaxx Verifier App" }) })
2085
2088
  ] })
@@ -2097,34 +2100,34 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2097
2100
  }
2098
2101
  ) });
2099
2102
  }, Wr = ({
2100
- size: K = 130,
2103
+ size: G = 130,
2101
2104
  qrColor: X = "#e60100",
2102
2105
  logoImage: ie = "https://content.abaxx.com/assets/static/qr-logo.png",
2103
2106
  logoWidth: W = 40,
2104
2107
  logoHeight: O = 20,
2105
2108
  quietZone: Y = 0,
2106
- containerClass: F = "",
2109
+ containerClass: U = "",
2107
2110
  showStatus: M = !0,
2108
2111
  checkmarkColor: x = "#c40808"
2109
2112
  }) => {
2110
2113
  const [d, A] = ge(""), {
2111
2114
  clientId: C,
2112
- codeChallenge: U,
2115
+ codeChallenge: $,
2113
2116
  authRequestId: D,
2114
2117
  authRequestIdExpires: H,
2115
2118
  isAuthenticating: q,
2116
- token: N
2117
- } = nt(Ve);
2118
- return Qe(() => {
2119
- if (U && D && H) {
2120
- const Z = H.getTime() / 1e3, G = `c=${U},r=${D},e=${Z},a=${C}`;
2121
- A(G);
2122
- }
2123
- }, [C, D, H, U]), /* @__PURE__ */ P("div", { className: `v-auth-qr-container ${F}`, children: !N && !q ? /* @__PURE__ */ P("div", { className: "v-qr-wrapper", children: D && d ? /* @__PURE__ */ P(
2124
- St.QRCode,
2119
+ token: B
2120
+ } = Ke(Oe);
2121
+ return Ge(() => {
2122
+ if ($ && D && H) {
2123
+ const Z = H.getTime() / 1e3, V = `c=${$},r=${D},e=${Z},a=${C}`;
2124
+ A(V);
2125
+ }
2126
+ }, [C, D, H, $]), /* @__PURE__ */ P("div", { className: `v-auth-qr-container ${U}`, children: !B && !q ? /* @__PURE__ */ P("div", { className: "v-qr-wrapper", children: D && d ? /* @__PURE__ */ P(
2127
+ Nt.QRCode,
2125
2128
  {
2126
2129
  value: d,
2127
- size: K,
2130
+ size: G,
2128
2131
  fgColor: X,
2129
2132
  qrStyle: "dots",
2130
2133
  logoImage: ie,
@@ -2136,8 +2139,8 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2136
2139
  "div",
2137
2140
  {
2138
2141
  className: "v-flex v-items-center v-justify-center",
2139
- style: { width: K, height: K },
2140
- children: /* @__PURE__ */ P(Nt, {})
2142
+ style: { width: G, height: G },
2143
+ children: /* @__PURE__ */ P(Ot, {})
2141
2144
  }
2142
2145
  ) }) : M ? /* @__PURE__ */ he("div", { className: "v-fade-in v-flex v-items-center v-flex-col", children: [
2143
2146
  /* @__PURE__ */ P(
@@ -2153,41 +2156,41 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2153
2156
  strokeLinecap: "round",
2154
2157
  strokeLinejoin: "round",
2155
2158
  className: "v-mb-5",
2156
- style: { width: K * 0.6, height: K * 0.6 },
2159
+ style: { width: G * 0.6, height: G * 0.6 },
2157
2160
  children: /* @__PURE__ */ P("path", { d: "M20 6 9 17l-5-5" })
2158
2161
  }
2159
2162
  ),
2160
- N ? /* @__PURE__ */ P("div", { className: "v-text-lg v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(He, { children: [
2163
+ B ? /* @__PURE__ */ P("div", { className: "v-text-lg v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Qe, { children: [
2161
2164
  /* @__PURE__ */ P("div", { className: "v-text-lg v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Authorization requested!" }) }),
2162
2165
  /* @__PURE__ */ P("div", { className: "v-text-center v-rounded v-bg-slate-100 v-text-slate-800 v-p-3 v-my-4", children: /* @__PURE__ */ P("span", { children: "Please check the Abaxx Verifier App" }) })
2163
2166
  ] })
2164
2167
  ] }) : null });
2165
2168
  }, Zr = ({
2166
- inputPlaceholder: K = "Enter Email or Abaxx ID",
2169
+ inputPlaceholder: G = "Enter Email or Abaxx ID",
2167
2170
  buttonText: X = "Sign In",
2168
2171
  inputHeight: ie = "v-h-10",
2169
2172
  inputWidth: W = "v-w-full",
2170
2173
  inputTextColor: O = "v-text-gray-600",
2171
2174
  inputBorderColor: Y = "v-border-gray-400",
2172
- inputBackgroundColor: F = "v-bg-transparent",
2175
+ inputBackgroundColor: U = "v-bg-transparent",
2173
2176
  buttonHeight: M = "v-h-10",
2174
2177
  buttonWidth: x = "v-w-full",
2175
2178
  buttonBackgroundColor: d = "v-bg-red",
2176
2179
  buttonTextColor: A = "v-text-white",
2177
2180
  containerClass: C = "",
2178
- checkmarkColor: U = "#c40808"
2181
+ checkmarkColor: $ = "#c40808"
2179
2182
  }) => {
2180
- const [D, H] = ge(""), [q, N] = ge(!1), {
2183
+ const [D, H] = ge(""), [q, B] = ge(!1), {
2181
2184
  apiUrl: Z,
2182
- clientId: G,
2185
+ clientId: V,
2183
2186
  codeChallenge: z,
2184
- authRequestId: R,
2187
+ authRequestId: E,
2185
2188
  setIsAuthenticating: o,
2186
2189
  setAuthError: b,
2187
2190
  isAuthenticating: c,
2188
2191
  token: y
2189
- } = nt(Ve), f = Ge(async () => {
2190
- N(!0);
2192
+ } = Ke(Oe), f = Ve(async () => {
2193
+ B(!0);
2191
2194
  try {
2192
2195
  if (!D) {
2193
2196
  const t = "Invalid login. Email or Abaxx ID is required.";
@@ -2197,7 +2200,7 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2197
2200
  const n = await w({
2198
2201
  alias: D,
2199
2202
  code_challenge: z,
2200
- request_id: R
2203
+ request_id: E
2201
2204
  });
2202
2205
  if (n != null && n.ok)
2203
2206
  o(!0);
@@ -2209,12 +2212,12 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2209
2212
  const t = "Something went wrong. Please try again later.";
2210
2213
  window.alert(t), console.error(t), console.log(n);
2211
2214
  }
2212
- N(!1);
2213
- }, [z, R, D, N, o]), w = Ge(
2215
+ B(!1);
2216
+ }, [z, E, D, B, o]), w = Ve(
2214
2217
  async (n) => {
2215
2218
  try {
2216
2219
  const t = await fetch(
2217
- `${Z}/v-plus/auth/req?cid=${G}`,
2220
+ `${Z}/v-plus/auth/req?cid=${V}`,
2218
2221
  {
2219
2222
  method: "POST",
2220
2223
  headers: {
@@ -2235,7 +2238,7 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2235
2238
  b(`Auth request failed: ${t}`);
2236
2239
  }
2237
2240
  },
2238
- [Z, G, b]
2241
+ [Z, V, b]
2239
2242
  );
2240
2243
  return /* @__PURE__ */ P("div", { className: `v-auth-email-container ${C}`, children: !y && !c ? /* @__PURE__ */ he("div", { className: "v-min-w-300", children: [
2241
2244
  /* @__PURE__ */ P(
@@ -2244,11 +2247,11 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2244
2247
  type: "text",
2245
2248
  className: `v-input ${W} ${ie} v-mb-4 v-rounded v-border v-px-2 v-text-center`,
2246
2249
  style: {
2247
- backgroundColor: F.startsWith("#") ? F : F === "v-bg-transparent" ? "transparent" : F === "v-bg-white" ? "#ffffff" : "transparent",
2250
+ backgroundColor: U.startsWith("#") ? U : U === "v-bg-transparent" ? "transparent" : U === "v-bg-white" ? "#ffffff" : "transparent",
2248
2251
  color: O.startsWith("#") ? O : O === "v-text-gray-600" ? "#6b7280" : O === "v-text-black" ? "#000000" : O === "v-text-white" ? "#ffffff" : "#6b7280",
2249
2252
  borderColor: Y.startsWith("#") ? Y : Y === "v-border-gray-400" ? "#9ca3af" : Y === "v-border-blue-400" ? "#60a5fa" : "#9ca3af"
2250
2253
  },
2251
- placeholder: K,
2254
+ placeholder: G,
2252
2255
  value: D,
2253
2256
  onChange: (n) => H(n.target.value),
2254
2257
  disabled: q
@@ -2262,7 +2265,7 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2262
2265
  backgroundColor: d.startsWith("#") ? d : d === "v-bg-blue" ? "#3b82f6" : d === "v-bg-red" ? "#ef4444" : d === "v-bg-green" ? "#10b981" : d === "v-bg-purple" ? "#8b5cf6" : d === "v-bg-yellow" ? "#f59e0b" : d === "v-bg-gray" ? "#6b7280" : "#ef4444",
2263
2266
  color: A.startsWith("#") ? A : A === "v-text-white" ? "#ffffff" : A === "v-text-black" ? "#000000" : A === "v-text-gray-600" ? "#6b7280" : "#ffffff"
2264
2267
  },
2265
- disabled: q || !D || !R,
2268
+ disabled: q || !D || !E,
2266
2269
  onClick: f,
2267
2270
  children: [
2268
2271
  q && /* @__PURE__ */ P(
@@ -2273,7 +2276,7 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2273
2276
  height: "24",
2274
2277
  viewBox: "0 0 24 24",
2275
2278
  fill: "none",
2276
- stroke: U,
2279
+ stroke: $,
2277
2280
  strokeWidth: "2",
2278
2281
  strokeLinecap: "round",
2279
2282
  strokeLinejoin: "round",
@@ -2294,7 +2297,7 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2294
2297
  height: "24",
2295
2298
  viewBox: "0 0 24 24",
2296
2299
  fill: "none",
2297
- stroke: U,
2300
+ stroke: $,
2298
2301
  strokeWidth: "2",
2299
2302
  strokeLinecap: "round",
2300
2303
  strokeLinejoin: "round",
@@ -2302,17 +2305,26 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2302
2305
  children: /* @__PURE__ */ P("path", { d: "M20 6 9 17l-5-5" })
2303
2306
  }
2304
2307
  ),
2305
- y ? /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(He, { children: [
2308
+ y ? /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Qe, { children: [
2306
2309
  /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Authorization requested!" }) }),
2307
2310
  /* @__PURE__ */ P("div", { className: "v-text-center v-rounded v-bg-slate-100 v-text-slate-800 v-p-3 v-my-4", children: /* @__PURE__ */ P("span", { children: "Please check the Abaxx Verifier App" }) })
2308
2311
  ] })
2309
2312
  ] }) });
2310
2313
  };
2314
+ function Jr() {
2315
+ const { resetState: G } = Ke(Oe);
2316
+ return G;
2317
+ }
2318
+ function Yr(G) {
2319
+ G.resetState();
2320
+ }
2311
2321
  export {
2312
- Ve as VContext,
2322
+ Oe as VContext,
2313
2323
  qr as VContextProvider,
2314
2324
  Kr as VerifierAuth,
2315
2325
  Zr as VerifierAuthEmail,
2316
2326
  Wr as VerifierAuthQr,
2317
- Vr as VerifierProvider
2327
+ Vr as VerifierProvider,
2328
+ Yr as resetVerifierStateUnsafe,
2329
+ Jr as useVerifierReset
2318
2330
  };