@abaxx_tech/v-integration-react 1.2.0-dev.3 → 1.2.0-dev.5

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,590 +1,655 @@
1
- import { jsx as P, jsxs as he, Fragment as Ge } from "react/jsx-runtime";
2
- import Bt, { createContext as Or, useState as ge, useContext as Ke, useRef as Lt, useCallback as Oe, useEffect as Ve } from "react";
3
- const qe = Or({}), qr = ({
4
- clientId: V,
5
- apiUrl: X,
6
- children: ie
1
+ import { jsx as S, jsxs as he, Fragment as We } from "react/jsx-runtime";
2
+ import Ot, { createContext as jr, useState as ge, useContext as Ze, useRef as Ve, useCallback as Ie, useEffect as je } from "react";
3
+ const $e = jr({}), $r = ({
4
+ clientId: j,
5
+ apiUrl: Y,
6
+ children: ee
7
7
  }) => {
8
- const [Z, O] = ge(""), [J, U] = ge(""), [M, x] = ge(!1), [d, A] = ge(""), [C, j] = ge(""), [D, H] = ge(/* @__PURE__ */ new Date()), [q, B] = ge(""), [K, Q] = ge(null), [z, E] = ge(null), u = Bt.useCallback(() => {
9
- O(""), U(""), x(!1), A(""), j(""), B(""), H(/* @__PURE__ */ new Date()), Q(null), E(null);
8
+ const [W, q] = ge(""), [X, F] = ge(""), [M, x] = ge(!1), [g, m] = ge(""), [T, $] = ge(""), [D, G] = ge(/* @__PURE__ */ new Date()), [k, N] = ge(""), [K, Q] = ge(null), [J, O] = ge(null), p = Ot.useCallback(() => {
9
+ q(""), F(""), x(!1), m(""), $(""), N(""), G(/* @__PURE__ */ new Date()), Q(null), O(null);
10
10
  }, []);
11
- return /* @__PURE__ */ P(
12
- qe.Provider,
11
+ return /* @__PURE__ */ S(
12
+ $e.Provider,
13
13
  {
14
14
  value: {
15
- apiUrl: X,
16
- clientId: V,
17
- identity: Z,
18
- setIdentity: O,
19
- authRequestId: J,
20
- setAuthRequestId: U,
15
+ apiUrl: Y,
16
+ clientId: j,
17
+ identity: W,
18
+ setIdentity: q,
19
+ authRequestId: X,
20
+ setAuthRequestId: F,
21
21
  isAuthenticating: M,
22
22
  setIsAuthenticating: x,
23
- codeVerifier: d,
24
- setCodeVerifier: A,
25
- codeChallenge: C,
26
- setCodeChallenge: j,
27
- authCode: q,
28
- setAuthCode: B,
23
+ codeVerifier: g,
24
+ setCodeVerifier: m,
25
+ codeChallenge: T,
26
+ setCodeChallenge: $,
27
+ authCode: k,
28
+ setAuthCode: N,
29
29
  authRequestIdExpires: D,
30
- setAuthRequestIdExpires: H,
30
+ setAuthRequestIdExpires: G,
31
31
  token: K,
32
32
  setToken: Q,
33
- authError: z,
34
- setAuthError: E,
35
- resetState: u
33
+ authError: J,
34
+ setAuthError: O,
35
+ resetState: p
36
36
  },
37
- children: ie
37
+ children: ee
38
38
  }
39
39
  );
40
40
  };
41
- function jr(V) {
42
- const X = new Uint8Array(V);
43
- return window.crypto.getRandomValues(X), X;
41
+ function Fr(j) {
42
+ const Y = new Uint8Array(j);
43
+ return window.crypto.getRandomValues(Y), Y;
44
44
  }
45
- function Pt(V) {
46
- const X = Array.from(V);
47
- return btoa(String.fromCharCode(...X)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
45
+ function Pt(j) {
46
+ const Y = Array.from(j);
47
+ return btoa(String.fromCharCode(...Y)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
48
48
  }
49
+ function it(j, Y) {
50
+ if (j)
51
+ try {
52
+ Y && Y.forEach(({ event: ee, handler: W }) => {
53
+ try {
54
+ j.removeEventListener(ee, W);
55
+ } catch (q) {
56
+ console.warn(`Failed to remove event listener for "${ee}":`, q);
57
+ }
58
+ }), j.onopen = null, j.onmessage = null, j.onerror = null, j.readyState !== EventSource.CLOSED && j.close();
59
+ } catch (ee) {
60
+ console.error("Error cleaning up EventSource:", ee);
61
+ }
62
+ }
63
+ const qe = {
64
+ maxRetries: 3,
65
+ initialDelayMs: 1e3,
66
+ maxDelayMs: 3e4,
67
+ backoffMultiplier: 2
68
+ };
49
69
  function Ur() {
50
70
  const {
51
- apiUrl: V,
52
- clientId: X,
53
- authRequestId: ie,
71
+ apiUrl: j,
72
+ clientId: Y,
73
+ authRequestId: ee,
54
74
  // results of the successful auth
55
- setIdentity: Z,
56
- authCode: O,
57
- setAuthCode: J,
75
+ setIdentity: W,
76
+ authCode: q,
77
+ setAuthCode: X,
58
78
  // results of the successful begin auth
59
- setAuthRequestId: U,
79
+ setAuthRequestId: F,
60
80
  setAuthRequestIdExpires: M,
61
81
  setCodeChallenge: x,
62
- setCodeVerifier: d,
63
- codeChallenge: A,
64
- codeVerifier: C,
65
- setIsAuthenticating: j,
82
+ setCodeVerifier: g,
83
+ codeChallenge: m,
84
+ codeVerifier: T,
85
+ setIsAuthenticating: $,
66
86
  token: D,
67
- setToken: H,
68
- setAuthError: q
69
- } = Ke(qe), B = Lt(null), K = Lt(""), Q = Oe((E) => {
87
+ setToken: G,
88
+ setAuthError: k
89
+ } = Ze($e), N = Ve(null), K = Ve(""), Q = Ve(0), J = Ve(null), O = Ve(null), p = Ie((a) => {
70
90
  try {
71
- let u;
91
+ let s;
72
92
  try {
73
- u = JSON.parse(E.data);
93
+ s = JSON.parse(a.data);
74
94
  } catch {
75
- u = { type: E.type, message: E.data };
95
+ s = { type: a.type, message: a.data };
76
96
  }
77
- switch (E.type) {
97
+ switch (a.type) {
78
98
  case "start": {
79
- u.request_id && u.expires && (U(u.request_id), K.current = u.request_id, M(new Date(u.expires)));
99
+ s.request_id && s.expires && (F(s.request_id), K.current = s.request_id, M(new Date(s.expires)));
80
100
  break;
81
101
  }
82
102
  case "approved": {
83
- u.code && u.identity && u.approved && u.request_id && u.request_id == K.current && (B.current && (console.info("Closing SSE connection after approval"), B.current.close(), B.current = null), J(u.code), Z(u.identity), j(!0));
103
+ if (s.code && s.identity && s.approved && s.request_id && s.request_id == K.current) {
104
+ const n = N.current, t = O.current;
105
+ n && (console.info("Closing SSE connection after approval"), it(n, t ? [
106
+ { event: "start", handler: t },
107
+ { event: "approved", handler: t }
108
+ ] : void 0), N.current = null), X(s.code), W(s.identity), $(!0);
109
+ }
84
110
  break;
85
111
  }
86
112
  default:
87
113
  break;
88
114
  }
89
- } catch (u) {
90
- console.error("Error parsing SSE message:", u);
91
- }
92
- }, [U, M, J, Z, j]);
93
- Ve(() => {
94
- if (A)
115
+ } catch (s) {
116
+ console.error("Error parsing SSE message:", s);
117
+ }
118
+ }, [F, M, X, W, $]);
119
+ je(() => {
120
+ O.current = p;
121
+ }, [p]), je(() => {
122
+ if (m)
95
123
  return;
96
- let E = !1;
124
+ let a = !1;
97
125
  return (async () => {
98
- const b = jr(64), c = await window.crypto.subtle.digest("SHA-256", b);
99
- if (!E) {
100
- const y = Pt(new Uint8Array(c)), s = Pt(b);
101
- x(y), d(s);
126
+ const n = Fr(64), t = await window.crypto.subtle.digest("SHA-256", n);
127
+ if (!a) {
128
+ const v = Pt(new Uint8Array(t)), o = Pt(n);
129
+ x(v), g(o);
102
130
  }
103
131
  })(), () => {
104
- E = !0;
132
+ a = !0;
105
133
  };
106
- }, [A, x, d]), Ve(() => {
107
- if (D) {
108
- B.current && (console.info("Closing existing SSE connection"), B.current.close(), B.current = null);
109
- return;
110
- }
111
- if (!(!A || B.current))
134
+ }, [m, x, g]);
135
+ const b = Ie((a) => {
136
+ const s = qe.initialDelayMs * Math.pow(qe.backoffMultiplier, a);
137
+ return Math.min(s, qe.maxDelayMs);
138
+ }, []), d = Ie(() => {
139
+ if (!(D || N.current)) {
140
+ k(null);
112
141
  try {
113
- const E = `${V}/v-plus/auth/start?cid=${X}`, u = new EventSource(E);
114
- return B.current = u, u.onmessage = Q, u.addEventListener("start", Q), u.addEventListener("approved", Q), u.onerror = () => {
115
- if (D || !B.current) {
116
- console.info("SSE connection closed"), B.current && (B.current.close(), B.current = null);
142
+ const a = `${j}/v-plus/auth/start?cid=${Y}`, s = new EventSource(a);
143
+ N.current = s, s.onopen = () => {
144
+ Q.current = 0, k(null), console.info("SSE connection established");
145
+ }, s.onmessage = p, s.addEventListener("start", p), s.addEventListener("approved", p), s.onerror = () => {
146
+ const n = N.current, t = O.current;
147
+ if (n && (it(n, t ? [
148
+ { event: "start", handler: t },
149
+ { event: "approved", handler: t }
150
+ ] : void 0), N.current = null), D) {
151
+ console.info("SSE connection closed - already authenticated");
117
152
  return;
118
153
  }
119
- D || console.info("Waiting for authentication...");
120
- }, () => {
121
- u && (u.close(), B.current = null);
154
+ const v = Q.current;
155
+ if (v < qe.maxRetries) {
156
+ const o = b(v);
157
+ Q.current = v + 1, console.info(
158
+ `SSE connection error. Retrying in ${o}ms (attempt ${v + 1}/${qe.maxRetries})`
159
+ ), k(
160
+ `Connection lost. Reconnecting... (attempt ${v + 1}/${qe.maxRetries})`
161
+ ), J.current = setTimeout(() => {
162
+ d();
163
+ }, o);
164
+ } else
165
+ console.error("SSE connection failed after maximum retry attempts"), k(
166
+ "Unable to establish connection. Please check your network and try again."
167
+ );
122
168
  };
123
- } catch (E) {
124
- console.error("SSE connection setup failed:", E), B.current = null;
169
+ } catch (a) {
170
+ console.error("SSE connection setup failed:", a), k(`Connection setup failed: ${a}`), N.current = null;
125
171
  }
126
- }, [D, A, V, X, Q]);
127
- const z = Oe(async (E, u, b) => {
172
+ }
173
+ }, [D, j, Y, p, b, k]);
174
+ je(() => {
175
+ if (D) {
176
+ const a = N.current, s = O.current;
177
+ a && (console.info("Closing existing SSE connection"), it(a, s ? [
178
+ { event: "start", handler: s },
179
+ { event: "approved", handler: s }
180
+ ] : void 0), N.current = null), J.current && (clearTimeout(J.current), J.current = null);
181
+ return;
182
+ }
183
+ if (!(!m || N.current))
184
+ return d(), () => {
185
+ const a = N.current, s = O.current;
186
+ a && (console.info("Cleaning up SSE connection on unmount"), it(a, s ? [
187
+ { event: "start", handler: s },
188
+ { event: "approved", handler: s }
189
+ ] : void 0), N.current = null), J.current && (clearTimeout(J.current), J.current = null), Q.current = 0;
190
+ };
191
+ }, [D, m, d, p]);
192
+ const w = Ie(async (a, s, n) => {
128
193
  try {
129
- const y = await (await fetch(`${V}/v-plus/auth/token?cid=${X}`, {
194
+ const v = await (await fetch(`${j}/v-plus/auth/token?cid=${Y}`, {
130
195
  method: "POST",
131
196
  headers: {
132
197
  "Content-Type": "application/json"
133
198
  },
134
199
  body: JSON.stringify({
135
- auth_code: E,
136
- request_id: u,
137
- code_verifier: b
200
+ auth_code: a,
201
+ request_id: s,
202
+ code_verifier: n
138
203
  })
139
204
  })).json();
140
- if (y.token)
141
- H(y.token), j(!1);
205
+ if (v.token)
206
+ G(v.token), $(!1);
142
207
  else
143
208
  throw new Error("No token received");
144
- } catch (c) {
145
- console.error("Error fetching token:", c), j(!1), q(`Failed to obtain auth token: ${c}`), J("");
209
+ } catch (t) {
210
+ console.error("Error fetching token:", t), $(!1), k(`Failed to obtain auth token: ${t}`), X("");
146
211
  }
147
- }, [V, X, H, j, q, J]);
148
- return Ve(() => {
149
- O && z(O, ie, C);
150
- }, [O, C, ie, z]), null;
212
+ }, [j, Y, G, $, k, X]);
213
+ return je(() => {
214
+ q && w(q, ee, T);
215
+ }, [q, T, ee, w]), null;
151
216
  }
152
- const Vr = ({
153
- clientId: V,
154
- apiUrl: X,
155
- children: ie
156
- }) => /* @__PURE__ */ he(qr, { apiUrl: X, clientId: V, children: [
157
- /* @__PURE__ */ P(Ur, {}),
158
- ie
217
+ const Wr = ({
218
+ clientId: j,
219
+ apiUrl: Y,
220
+ children: ee
221
+ }) => /* @__PURE__ */ he($r, { apiUrl: Y, clientId: j, children: [
222
+ /* @__PURE__ */ S(Ur, {}),
223
+ ee
159
224
  ] });
160
- var nt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Te = {}, Qe = { exports: {} };
161
- Qe.exports;
162
- var Dt;
163
- function $r() {
164
- return Dt || (Dt = 1, function(V, X) {
165
- var ie = 200, Z = "__lodash_hash_undefined__", O = 1, J = 2, U = 9007199254740991, M = "[object Arguments]", x = "[object Array]", d = "[object AsyncFunction]", A = "[object Boolean]", C = "[object Date]", j = "[object Error]", D = "[object Function]", H = "[object GeneratorFunction]", q = "[object Map]", B = "[object Number]", K = "[object Null]", Q = "[object Object]", z = "[object Promise]", E = "[object Proxy]", u = "[object RegExp]", b = "[object Set]", c = "[object String]", y = "[object Symbol]", s = "[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]", W = "[object Uint8Array]", $ = "[object Uint8ClampedArray]", re = "[object Uint16Array]", oe = "[object Uint32Array]", S = /[\\^$.*+?()[\]{}|]/g, k = /^\[object .+?Constructor\]$/, ue = /^(?:0|[1-9]\d*)$/, G = {};
166
- G[g] = G[i] = G[p] = G[L] = G[T] = G[W] = G[$] = G[re] = G[oe] = !0, G[M] = G[x] = G[n] = G[A] = G[t] = G[C] = G[j] = G[D] = G[q] = G[B] = G[Q] = G[u] = G[b] = G[c] = G[w] = !1;
167
- var se = typeof nt == "object" && nt && nt.Object === Object && nt, _e = typeof self == "object" && self && self.Object === Object && self, o = se || _e || Function("return this")(), f = X && !X.nodeType && X, a = f && !0 && V && !V.nodeType && V, l = a && a.exports === f, h = l && se.process, _ = function() {
225
+ var ot = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ce = {}, Ke = { exports: {} };
226
+ Ke.exports;
227
+ var kt;
228
+ function Hr() {
229
+ return kt || (kt = 1, function(j, Y) {
230
+ var ee = 200, W = "__lodash_hash_undefined__", q = 1, X = 2, F = 9007199254740991, M = "[object Arguments]", x = "[object Array]", g = "[object AsyncFunction]", m = "[object Boolean]", T = "[object Date]", $ = "[object Error]", D = "[object Function]", G = "[object GeneratorFunction]", k = "[object Map]", N = "[object Number]", K = "[object Null]", Q = "[object Object]", J = "[object Promise]", O = "[object Proxy]", p = "[object RegExp]", b = "[object Set]", d = "[object String]", w = "[object Symbol]", a = "[object Undefined]", s = "[object WeakMap]", n = "[object ArrayBuffer]", t = "[object DataView]", v = "[object Float32Array]", o = "[object Float64Array]", y = "[object Int8Array]", R = "[object Int16Array]", C = "[object Int32Array]", Z = "[object Uint8Array]", U = "[object Uint8ClampedArray]", ne = "[object Uint16Array]", oe = "[object Uint32Array]", L = /[\\^$.*+?()[\]{}|]/g, P = /^\[object .+?Constructor\]$/, ue = /^(?:0|[1-9]\d*)$/, V = {};
231
+ V[v] = V[o] = V[y] = V[R] = V[C] = V[Z] = V[U] = V[ne] = V[oe] = !0, V[M] = V[x] = V[n] = V[m] = V[t] = V[T] = V[$] = V[D] = V[k] = V[N] = V[Q] = V[p] = V[b] = V[d] = V[s] = !1;
232
+ var se = typeof ot == "object" && ot && ot.Object === Object && ot, _e = typeof self == "object" && self && self.Object === Object && self, f = se || _e || Function("return this")(), u = Y && !Y.nodeType && Y, i = u && !0 && j && !j.nodeType && j, l = i && i.exports === u, h = l && se.process, _ = function() {
168
233
  try {
169
234
  return h && h.binding && h.binding("util");
170
235
  } catch {
171
236
  }
172
- }(), R = _ && _.isTypedArray;
173
- function I(e, r) {
174
- for (var v = -1, m = e == null ? 0 : e.length, te = 0, F = []; ++v < m; ) {
175
- var ae = e[v];
176
- r(ae, v, e) && (F[te++] = ae);
237
+ }(), I = _ && _.isTypedArray;
238
+ function E(e, r) {
239
+ for (var c = -1, A = e == null ? 0 : e.length, re = 0, H = []; ++c < A; ) {
240
+ var ie = e[c];
241
+ r(ie, c, e) && (H[re++] = ie);
177
242
  }
178
- return F;
243
+ return H;
179
244
  }
180
- function Y(e, r) {
181
- for (var v = -1, m = r.length, te = e.length; ++v < m; )
182
- e[te + v] = r[v];
245
+ function z(e, r) {
246
+ for (var c = -1, A = r.length, re = e.length; ++c < A; )
247
+ e[re + c] = r[c];
183
248
  return e;
184
249
  }
185
- function ee(e, r) {
186
- for (var v = -1, m = e == null ? 0 : e.length; ++v < m; )
187
- if (r(e[v], v, e))
250
+ function te(e, r) {
251
+ for (var c = -1, A = e == null ? 0 : e.length; ++c < A; )
252
+ if (r(e[c], c, e))
188
253
  return !0;
189
254
  return !1;
190
255
  }
191
- function N(e, r) {
192
- for (var v = -1, m = Array(e); ++v < e; )
193
- m[v] = r(v);
194
- return m;
256
+ function B(e, r) {
257
+ for (var c = -1, A = Array(e); ++c < e; )
258
+ A[c] = r(c);
259
+ return A;
195
260
  }
196
261
  function le(e) {
197
262
  return function(r) {
198
263
  return e(r);
199
264
  };
200
265
  }
201
- function ve(e, r) {
266
+ function ce(e, r) {
202
267
  return e.has(r);
203
268
  }
204
- function Se(e, r) {
269
+ function ke(e, r) {
205
270
  return e == null ? void 0 : e[r];
206
271
  }
207
- function ke(e) {
208
- var r = -1, v = Array(e.size);
209
- return e.forEach(function(m, te) {
210
- v[++r] = [te, m];
211
- }), v;
272
+ function Be(e) {
273
+ var r = -1, c = Array(e.size);
274
+ return e.forEach(function(A, re) {
275
+ c[++r] = [re, A];
276
+ }), c;
212
277
  }
213
- function We(e, r) {
214
- return function(v) {
215
- return e(r(v));
278
+ function Je(e, r) {
279
+ return function(c) {
280
+ return e(r(c));
216
281
  };
217
282
  }
218
- function je(e) {
219
- var r = -1, v = Array(e.size);
220
- return e.forEach(function(m) {
221
- v[++r] = m;
222
- }), v;
283
+ function Fe(e) {
284
+ var r = -1, c = Array(e.size);
285
+ return e.forEach(function(A) {
286
+ c[++r] = A;
287
+ }), c;
223
288
  }
224
- var Be = Array.prototype, qt = Function.prototype, Ze = Object.prototype, at = o["__core-js_shared__"], ct = qt.toString, be = Ze.hasOwnProperty, ht = function() {
225
- var e = /[^.]+$/.exec(at && at.keys && at.keys.IE_PROTO || "");
289
+ var Ne = Array.prototype, $t = Function.prototype, Ye = Object.prototype, st = f["__core-js_shared__"], gt = $t.toString, be = Ye.hasOwnProperty, pt = function() {
290
+ var e = /[^.]+$/.exec(st && st.keys && st.keys.IE_PROTO || "");
226
291
  return e ? "Symbol(src)_1." + e : "";
227
- }(), dt = Ze.toString, jt = RegExp(
228
- "^" + ct.call(be).replace(S, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
229
- ), gt = l ? o.Buffer : void 0, Je = o.Symbol, pt = o.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(o, "DataView"), Ue = Ne(o, "Map"), ot = Ne(o, "Promise"), st = Ne(o, "Set"), ft = Ne(o, "WeakMap"), $e = Ne(Object, "create"), Ht = Pe(it), Qt = Pe(Ue), Gt = Pe(ot), Vt = Pe(st), Kt = Pe(ft), xt = Je ? Je.prototype : void 0, ut = xt ? xt.valueOf : void 0;
230
- function Re(e) {
231
- var r = -1, v = e == null ? 0 : e.length;
232
- for (this.clear(); ++r < v; ) {
233
- var m = e[r];
234
- this.set(m[0], m[1]);
292
+ }(), yt = Ye.toString, Ft = RegExp(
293
+ "^" + gt.call(be).replace(L, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
294
+ ), xt = l ? f.Buffer : void 0, Xe = f.Symbol, wt = f.Uint8Array, bt = Ye.propertyIsEnumerable, Ut = Ne.splice, Re = Xe ? Xe.toStringTag : void 0, _t = Object.getOwnPropertySymbols, Ht = xt ? xt.isBuffer : void 0, Gt = Je(Object.keys, Object), ft = Oe(f, "DataView"), Ue = Oe(f, "Map"), ut = Oe(f, "Promise"), lt = Oe(f, "Set"), ct = Oe(f, "WeakMap"), He = Oe(Object, "create"), Qt = Le(ft), Vt = Le(Ue), Kt = Le(ut), Wt = Le(lt), Zt = Le(ct), mt = Xe ? Xe.prototype : void 0, vt = mt ? mt.valueOf : void 0;
295
+ function Se(e) {
296
+ var r = -1, c = e == null ? 0 : e.length;
297
+ for (this.clear(); ++r < c; ) {
298
+ var A = e[r];
299
+ this.set(A[0], A[1]);
235
300
  }
236
301
  }
237
- function Wt() {
238
- this.__data__ = $e ? $e(null) : {}, this.size = 0;
302
+ function Jt() {
303
+ this.__data__ = He ? He(null) : {}, this.size = 0;
239
304
  }
240
- function Zt(e) {
305
+ function Yt(e) {
241
306
  var r = this.has(e) && delete this.__data__[e];
242
307
  return this.size -= r ? 1 : 0, r;
243
308
  }
244
- function Jt(e) {
309
+ function Xt(e) {
245
310
  var r = this.__data__;
246
- if ($e) {
247
- var v = r[e];
248
- return v === Z ? void 0 : v;
311
+ if (He) {
312
+ var c = r[e];
313
+ return c === W ? void 0 : c;
249
314
  }
250
315
  return be.call(r, e) ? r[e] : void 0;
251
316
  }
252
- function Yt(e) {
317
+ function zt(e) {
253
318
  var r = this.__data__;
254
- return $e ? r[e] !== void 0 : be.call(r, e);
255
- }
256
- function Xt(e, r) {
257
- var v = this.__data__;
258
- return this.size += this.has(e) ? 0 : 1, v[e] = $e && r === void 0 ? Z : r, this;
259
- }
260
- Re.prototype.clear = Wt, Re.prototype.delete = Zt, Re.prototype.get = Jt, Re.prototype.has = Yt, Re.prototype.set = Xt;
261
- function Ae(e) {
262
- var r = -1, v = e == null ? 0 : e.length;
263
- for (this.clear(); ++r < v; ) {
264
- var m = e[r];
265
- this.set(m[0], m[1]);
319
+ return He ? r[e] !== void 0 : be.call(r, e);
320
+ }
321
+ function er(e, r) {
322
+ var c = this.__data__;
323
+ return this.size += this.has(e) ? 0 : 1, c[e] = He && r === void 0 ? W : r, this;
324
+ }
325
+ Se.prototype.clear = Jt, Se.prototype.delete = Yt, Se.prototype.get = Xt, Se.prototype.has = zt, Se.prototype.set = er;
326
+ function me(e) {
327
+ var r = -1, c = e == null ? 0 : e.length;
328
+ for (this.clear(); ++r < c; ) {
329
+ var A = e[r];
330
+ this.set(A[0], A[1]);
266
331
  }
267
332
  }
268
- function zt() {
333
+ function tr() {
269
334
  this.__data__ = [], this.size = 0;
270
335
  }
271
- function er(e) {
272
- var r = this.__data__, v = Xe(r, e);
273
- if (v < 0)
274
- return !1;
275
- var m = r.length - 1;
276
- return v == m ? r.pop() : Ut.call(r, v, 1), --this.size, !0;
277
- }
278
- function tr(e) {
279
- var r = this.__data__, v = Xe(r, e);
280
- return v < 0 ? void 0 : r[v][1];
281
- }
282
336
  function rr(e) {
283
- return Xe(this.__data__, e) > -1;
284
- }
285
- function nr(e, r) {
286
- var v = this.__data__, m = Xe(v, e);
287
- return m < 0 ? (++this.size, v.push([e, r])) : v[m][1] = r, this;
288
- }
289
- Ae.prototype.clear = zt, Ae.prototype.delete = er, Ae.prototype.get = tr, Ae.prototype.has = rr, Ae.prototype.set = nr;
290
- function Le(e) {
291
- var r = -1, v = e == null ? 0 : e.length;
292
- for (this.clear(); ++r < v; ) {
293
- var m = e[r];
294
- this.set(m[0], m[1]);
337
+ var r = this.__data__, c = et(r, e);
338
+ if (c < 0)
339
+ return !1;
340
+ var A = r.length - 1;
341
+ return c == A ? r.pop() : Ut.call(r, c, 1), --this.size, !0;
342
+ }
343
+ function nr(e) {
344
+ var r = this.__data__, c = et(r, e);
345
+ return c < 0 ? void 0 : r[c][1];
346
+ }
347
+ function ar(e) {
348
+ return et(this.__data__, e) > -1;
349
+ }
350
+ function ir(e, r) {
351
+ var c = this.__data__, A = et(c, e);
352
+ return A < 0 ? (++this.size, c.push([e, r])) : c[A][1] = r, this;
353
+ }
354
+ me.prototype.clear = tr, me.prototype.delete = rr, me.prototype.get = nr, me.prototype.has = ar, me.prototype.set = ir;
355
+ function De(e) {
356
+ var r = -1, c = e == null ? 0 : e.length;
357
+ for (this.clear(); ++r < c; ) {
358
+ var A = e[r];
359
+ this.set(A[0], A[1]);
295
360
  }
296
361
  }
297
- function ar() {
362
+ function or() {
298
363
  this.size = 0, this.__data__ = {
299
- hash: new Re(),
300
- map: new (Ue || Ae)(),
301
- string: new Re()
364
+ hash: new Se(),
365
+ map: new (Ue || me)(),
366
+ string: new Se()
302
367
  };
303
368
  }
304
- function ir(e) {
305
- var r = ze(this, e).delete(e);
369
+ function sr(e) {
370
+ var r = tt(this, e).delete(e);
306
371
  return this.size -= r ? 1 : 0, r;
307
372
  }
308
- function or(e) {
309
- return ze(this, e).get(e);
373
+ function fr(e) {
374
+ return tt(this, e).get(e);
310
375
  }
311
- function sr(e) {
312
- return ze(this, e).has(e);
376
+ function ur(e) {
377
+ return tt(this, e).has(e);
313
378
  }
314
- function fr(e, r) {
315
- var v = ze(this, e), m = v.size;
316
- return v.set(e, r), this.size += v.size == m ? 0 : 1, this;
379
+ function lr(e, r) {
380
+ var c = tt(this, e), A = c.size;
381
+ return c.set(e, r), this.size += c.size == A ? 0 : 1, this;
317
382
  }
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) {
320
- var r = -1, v = e == null ? 0 : e.length;
321
- for (this.__data__ = new Le(); ++r < v; )
383
+ De.prototype.clear = or, De.prototype.delete = sr, De.prototype.get = fr, De.prototype.has = ur, De.prototype.set = lr;
384
+ function ze(e) {
385
+ var r = -1, c = e == null ? 0 : e.length;
386
+ for (this.__data__ = new De(); ++r < c; )
322
387
  this.add(e[r]);
323
388
  }
324
- function ur(e) {
325
- return this.__data__.set(e, Z), this;
389
+ function cr(e) {
390
+ return this.__data__.set(e, W), this;
326
391
  }
327
- function lr(e) {
392
+ function vr(e) {
328
393
  return this.__data__.has(e);
329
394
  }
330
- Ye.prototype.add = Ye.prototype.push = ur, Ye.prototype.has = lr;
331
- function Ce(e) {
332
- var r = this.__data__ = new Ae(e);
395
+ ze.prototype.add = ze.prototype.push = cr, ze.prototype.has = vr;
396
+ function Te(e) {
397
+ var r = this.__data__ = new me(e);
333
398
  this.size = r.size;
334
399
  }
335
- function vr() {
336
- this.__data__ = new Ae(), this.size = 0;
400
+ function hr() {
401
+ this.__data__ = new me(), this.size = 0;
337
402
  }
338
- function cr(e) {
339
- var r = this.__data__, v = r.delete(e);
340
- return this.size = r.size, v;
403
+ function dr(e) {
404
+ var r = this.__data__, c = r.delete(e);
405
+ return this.size = r.size, c;
341
406
  }
342
- function hr(e) {
407
+ function gr(e) {
343
408
  return this.__data__.get(e);
344
409
  }
345
- function dr(e) {
410
+ function pr(e) {
346
411
  return this.__data__.has(e);
347
412
  }
348
- function gr(e, r) {
349
- var v = this.__data__;
350
- if (v instanceof Ae) {
351
- var m = v.__data__;
352
- if (!Ue || m.length < ie - 1)
353
- return m.push([e, r]), this.size = ++v.size, this;
354
- v = this.__data__ = new Le(m);
413
+ function yr(e, r) {
414
+ var c = this.__data__;
415
+ if (c instanceof me) {
416
+ var A = c.__data__;
417
+ if (!Ue || A.length < ee - 1)
418
+ return A.push([e, r]), this.size = ++c.size, this;
419
+ c = this.__data__ = new De(A);
355
420
  }
356
- return v.set(e, r), this.size = v.size, this;
357
- }
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;
361
- for (var ne in e)
362
- be.call(e, ne) && !(ae && // Safari 9 has enumerable `arguments.length` in strict mode.
363
- (ne == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
364
- te && (ne == "offset" || ne == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
365
- F && (ne == "buffer" || ne == "byteLength" || ne == "byteOffset") || // Skip index properties.
366
- Mr(ne, ce))) && fe.push(ne);
421
+ return c.set(e, r), this.size = c.size, this;
422
+ }
423
+ Te.prototype.clear = hr, Te.prototype.delete = dr, Te.prototype.get = gr, Te.prototype.has = pr, Te.prototype.set = yr;
424
+ function xr(e, r) {
425
+ var c = rt(e), A = !c && Pr(e), re = !c && !A && ht(e), H = !c && !A && !re && Dt(e), ie = c || A || re || H, fe = ie ? B(e.length, String) : [], ve = fe.length;
426
+ for (var ae in e)
427
+ be.call(e, ae) && !(ie && // Safari 9 has enumerable `arguments.length` in strict mode.
428
+ (ae == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
429
+ re && (ae == "offset" || ae == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
430
+ H && (ae == "buffer" || ae == "byteLength" || ae == "byteOffset") || // Skip index properties.
431
+ Ir(ae, ve))) && fe.push(ae);
367
432
  return fe;
368
433
  }
369
- function Xe(e, r) {
370
- for (var v = e.length; v--; )
371
- if (Tt(e[v][0], r))
372
- return v;
434
+ function et(e, r) {
435
+ for (var c = e.length; c--; )
436
+ if (Et(e[c][0], r))
437
+ return c;
373
438
  return -1;
374
439
  }
375
- function yr(e, r, v) {
376
- var m = r(e);
377
- return et(e) ? m : Y(m, v(e));
440
+ function wr(e, r, c) {
441
+ var A = r(e);
442
+ return rt(e) ? A : z(A, c(e));
378
443
  }
379
- function Fe(e) {
380
- return e == null ? e === void 0 ? s : K : Ee && Ee in Object(e) ? Tr(e) : Lr(e);
444
+ function Ge(e) {
445
+ return e == null ? e === void 0 ? a : K : Re && Re in Object(e) ? Mr(e) : Lr(e);
381
446
  }
382
- function bt(e) {
383
- return He(e) && Fe(e) == M;
447
+ function At(e) {
448
+ return Qe(e) && Ge(e) == M;
384
449
  }
385
- function _t(e, r, v, m, te) {
386
- return e === r ? !0 : e == null || r == null || !He(e) && !He(r) ? e !== e && r !== r : wr(e, r, v, m, _t, te);
450
+ function Ct(e, r, c, A, re) {
451
+ return e === r ? !0 : e == null || r == null || !Qe(e) && !Qe(r) ? e !== e && r !== r : br(e, r, c, A, Ct, re);
387
452
  }
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 ? Q : ce, ne = ne == M ? Q : ne;
391
- var pe = ce == Q, xe = ne == Q, de = ce == ne;
392
- if (de && lt(e)) {
393
- if (!lt(r))
453
+ function br(e, r, c, A, re, H) {
454
+ var ie = rt(e), fe = rt(r), ve = ie ? x : Me(e), ae = fe ? x : Me(r);
455
+ ve = ve == M ? Q : ve, ae = ae == M ? Q : ae;
456
+ var pe = ve == Q, we = ae == Q, de = ve == ae;
457
+ if (de && ht(e)) {
458
+ if (!ht(r))
394
459
  return !1;
395
- ae = !0, pe = !1;
460
+ ie = !0, pe = !1;
396
461
  }
397
462
  if (de && !pe)
398
- return F || (F = new Ce()), ae || Et(e) ? At(e, r, v, m, te, F) : Ar(e, r, ce, v, m, te, F);
399
- if (!(v & O)) {
400
- var ye = pe && be.call(e, "__wrapped__"), we = xe && be.call(r, "__wrapped__");
401
- if (ye || we) {
402
- var Ie = ye ? e.value() : e, me = we ? r.value() : r;
403
- return F || (F = new Ce()), te(Ie, me, v, m, F);
463
+ return H || (H = new Te()), ie || Dt(e) ? Tt(e, r, c, A, re, H) : Cr(e, r, ve, c, A, re, H);
464
+ if (!(c & q)) {
465
+ var ye = pe && be.call(e, "__wrapped__"), xe = we && be.call(r, "__wrapped__");
466
+ if (ye || xe) {
467
+ var Ee = ye ? e.value() : e, Ae = xe ? r.value() : r;
468
+ return H || (H = new Te()), re(Ee, Ae, c, A, H);
404
469
  }
405
470
  }
406
- return de ? (F || (F = new Ce()), mr(e, r, v, m, te, F)) : !1;
471
+ return de ? (H || (H = new Te()), Tr(e, r, c, A, re, H)) : !1;
407
472
  }
408
- function xr(e) {
409
- if (!It(e) || Er(e))
473
+ function _r(e) {
474
+ if (!St(e) || Sr(e))
410
475
  return !1;
411
- var r = Ct(e) ? jt : k;
412
- return r.test(Pe(e));
476
+ var r = It(e) ? Ft : P;
477
+ return r.test(Le(e));
413
478
  }
414
- function br(e) {
415
- return He(e) && Mt(e.length) && !!G[Fe(e)];
479
+ function mr(e) {
480
+ return Qe(e) && Rt(e.length) && !!V[Ge(e)];
416
481
  }
417
- function _r(e) {
418
- if (!Rr(e))
419
- return Ft(e);
482
+ function Ar(e) {
483
+ if (!Dr(e))
484
+ return Gt(e);
420
485
  var r = [];
421
- for (var v in Object(e))
422
- be.call(e, v) && v != "constructor" && r.push(v);
486
+ for (var c in Object(e))
487
+ be.call(e, c) && c != "constructor" && r.push(c);
423
488
  return r;
424
489
  }
425
- function At(e, r, v, m, te, F) {
426
- var ae = v & O, fe = e.length, ce = r.length;
427
- if (fe != ce && !(ae && ce > fe))
490
+ function Tt(e, r, c, A, re, H) {
491
+ var ie = c & q, fe = e.length, ve = r.length;
492
+ if (fe != ve && !(ie && ve > fe))
428
493
  return !1;
429
- var ne = F.get(e);
430
- if (ne && F.get(r))
431
- return ne == r;
432
- var pe = -1, xe = !0, de = v & J ? new Ye() : void 0;
433
- for (F.set(e, r), F.set(r, e); ++pe < fe; ) {
434
- var ye = e[pe], we = r[pe];
435
- if (m)
436
- var Ie = ae ? m(we, ye, pe, r, e, F) : m(ye, we, pe, e, r, F);
437
- if (Ie !== void 0) {
438
- if (Ie)
494
+ var ae = H.get(e);
495
+ if (ae && H.get(r))
496
+ return ae == r;
497
+ var pe = -1, we = !0, de = c & X ? new ze() : void 0;
498
+ for (H.set(e, r), H.set(r, e); ++pe < fe; ) {
499
+ var ye = e[pe], xe = r[pe];
500
+ if (A)
501
+ var Ee = ie ? A(xe, ye, pe, r, e, H) : A(ye, xe, pe, e, r, H);
502
+ if (Ee !== void 0) {
503
+ if (Ee)
439
504
  continue;
440
- xe = !1;
505
+ we = !1;
441
506
  break;
442
507
  }
443
508
  if (de) {
444
- if (!ee(r, function(me, De) {
445
- if (!ve(de, De) && (ye === me || te(ye, me, v, m, F)))
446
- return de.push(De);
509
+ if (!te(r, function(Ae, Pe) {
510
+ if (!ce(de, Pe) && (ye === Ae || re(ye, Ae, c, A, H)))
511
+ return de.push(Pe);
447
512
  })) {
448
- xe = !1;
513
+ we = !1;
449
514
  break;
450
515
  }
451
- } else if (!(ye === we || te(ye, we, v, m, F))) {
452
- xe = !1;
516
+ } else if (!(ye === xe || re(ye, xe, c, A, H))) {
517
+ we = !1;
453
518
  break;
454
519
  }
455
520
  }
456
- return F.delete(e), F.delete(r), xe;
521
+ return H.delete(e), H.delete(r), we;
457
522
  }
458
- function Ar(e, r, v, m, te, F, ae) {
459
- switch (v) {
523
+ function Cr(e, r, c, A, re, H, ie) {
524
+ switch (c) {
460
525
  case t:
461
526
  if (e.byteLength != r.byteLength || e.byteOffset != r.byteOffset)
462
527
  return !1;
463
528
  e = e.buffer, r = r.buffer;
464
529
  case n:
465
- return !(e.byteLength != r.byteLength || !F(new pt(e), new pt(r)));
466
- case A:
467
- case C:
468
- case B:
469
- return Tt(+e, +r);
470
- case j:
530
+ return !(e.byteLength != r.byteLength || !H(new wt(e), new wt(r)));
531
+ case m:
532
+ case T:
533
+ case N:
534
+ return Et(+e, +r);
535
+ case $:
471
536
  return e.name == r.name && e.message == r.message;
472
- case u:
473
- case c:
537
+ case p:
538
+ case d:
474
539
  return e == r + "";
475
- case q:
476
- var fe = ke;
540
+ case k:
541
+ var fe = Be;
477
542
  case b:
478
- var ce = m & O;
479
- if (fe || (fe = je), e.size != r.size && !ce)
543
+ var ve = A & q;
544
+ if (fe || (fe = Fe), e.size != r.size && !ve)
480
545
  return !1;
481
- var ne = ae.get(e);
482
- if (ne)
483
- return ne == r;
484
- m |= J, ae.set(e, r);
485
- var pe = At(fe(e), fe(r), m, te, F, ae);
486
- return ae.delete(e), pe;
487
- case y:
488
- if (ut)
489
- return ut.call(e) == ut.call(r);
546
+ var ae = ie.get(e);
547
+ if (ae)
548
+ return ae == r;
549
+ A |= X, ie.set(e, r);
550
+ var pe = Tt(fe(e), fe(r), A, re, H, ie);
551
+ return ie.delete(e), pe;
552
+ case w:
553
+ if (vt)
554
+ return vt.call(e) == vt.call(r);
490
555
  }
491
556
  return !1;
492
557
  }
493
- function mr(e, r, v, m, te, F) {
494
- var ae = v & O, fe = mt(e), ce = fe.length, ne = mt(r), pe = ne.length;
495
- if (ce != pe && !ae)
558
+ function Tr(e, r, c, A, re, H) {
559
+ var ie = c & q, fe = Mt(e), ve = fe.length, ae = Mt(r), pe = ae.length;
560
+ if (ve != pe && !ie)
496
561
  return !1;
497
- for (var xe = ce; xe--; ) {
498
- var de = fe[xe];
499
- if (!(ae ? de in r : be.call(r, de)))
562
+ for (var we = ve; we--; ) {
563
+ var de = fe[we];
564
+ if (!(ie ? de in r : be.call(r, de)))
500
565
  return !1;
501
566
  }
502
- var ye = F.get(e);
503
- if (ye && F.get(r))
567
+ var ye = H.get(e);
568
+ if (ye && H.get(r))
504
569
  return ye == r;
505
- var we = !0;
506
- F.set(e, r), F.set(r, e);
507
- for (var Ie = ae; ++xe < ce; ) {
508
- de = fe[xe];
509
- var me = e[de], De = r[de];
510
- if (m)
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)) {
513
- we = !1;
570
+ var xe = !0;
571
+ H.set(e, r), H.set(r, e);
572
+ for (var Ee = ie; ++we < ve; ) {
573
+ de = fe[we];
574
+ var Ae = e[de], Pe = r[de];
575
+ if (A)
576
+ var Lt = ie ? A(Pe, Ae, de, r, e, H) : A(Ae, Pe, de, e, r, H);
577
+ if (!(Lt === void 0 ? Ae === Pe || re(Ae, Pe, c, A, H) : Lt)) {
578
+ xe = !1;
514
579
  break;
515
580
  }
516
- Ie || (Ie = de == "constructor");
581
+ Ee || (Ee = de == "constructor");
517
582
  }
518
- if (we && !Ie) {
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);
583
+ if (xe && !Ee) {
584
+ var nt = e.constructor, at = r.constructor;
585
+ nt != at && "constructor" in e && "constructor" in r && !(typeof nt == "function" && nt instanceof nt && typeof at == "function" && at instanceof at) && (xe = !1);
521
586
  }
522
- return F.delete(e), F.delete(r), we;
587
+ return H.delete(e), H.delete(r), xe;
523
588
  }
524
- function mt(e) {
525
- return yr(e, kr, Cr);
589
+ function Mt(e) {
590
+ return wr(e, Nr, Er);
526
591
  }
527
- function ze(e, r) {
528
- var v = e.__data__;
529
- return Ir(r) ? v[typeof r == "string" ? "string" : "hash"] : v.map;
592
+ function tt(e, r) {
593
+ var c = e.__data__;
594
+ return Rr(r) ? c[typeof r == "string" ? "string" : "hash"] : c.map;
530
595
  }
531
- function Ne(e, r) {
532
- var v = Se(e, r);
533
- return xr(v) ? v : void 0;
596
+ function Oe(e, r) {
597
+ var c = ke(e, r);
598
+ return _r(c) ? c : void 0;
534
599
  }
535
- function Tr(e) {
536
- var r = be.call(e, Ee), v = e[Ee];
600
+ function Mr(e) {
601
+ var r = be.call(e, Re), c = e[Re];
537
602
  try {
538
- e[Ee] = void 0;
539
- var m = !0;
603
+ e[Re] = void 0;
604
+ var A = !0;
540
605
  } catch {
541
606
  }
542
- var te = dt.call(e);
543
- return m && (r ? e[Ee] = v : delete e[Ee]), te;
607
+ var re = yt.call(e);
608
+ return A && (r ? e[Re] = c : delete e[Re]), re;
544
609
  }
545
- var Cr = wt ? function(e) {
546
- return e == null ? [] : (e = Object(e), I(wt(e), function(r) {
547
- return yt.call(e, r);
610
+ var Er = _t ? function(e) {
611
+ return e == null ? [] : (e = Object(e), E(_t(e), function(r) {
612
+ return bt.call(e, r);
548
613
  }));
549
- } : Br, Me = Fe;
550
- (it && Me(new it(new ArrayBuffer(1))) != t || Ue && Me(new Ue()) != q || ot && Me(ot.resolve()) != z || st && Me(new st()) != b || ft && Me(new ft()) != w) && (Me = function(e) {
551
- var r = Fe(e), v = r == Q ? e.constructor : void 0, m = v ? Pe(v) : "";
552
- if (m)
553
- switch (m) {
554
- case Ht:
555
- return t;
614
+ } : Or, Me = Ge;
615
+ (ft && Me(new ft(new ArrayBuffer(1))) != t || Ue && Me(new Ue()) != k || ut && Me(ut.resolve()) != J || lt && Me(new lt()) != b || ct && Me(new ct()) != s) && (Me = function(e) {
616
+ var r = Ge(e), c = r == Q ? e.constructor : void 0, A = c ? Le(c) : "";
617
+ if (A)
618
+ switch (A) {
556
619
  case Qt:
557
- return q;
558
- case Gt:
559
- return z;
620
+ return t;
560
621
  case Vt:
561
- return b;
622
+ return k;
562
623
  case Kt:
563
- return w;
624
+ return J;
625
+ case Wt:
626
+ return b;
627
+ case Zt:
628
+ return s;
564
629
  }
565
630
  return r;
566
631
  });
567
- function Mr(e, r) {
568
- return r = r ?? U, !!r && (typeof e == "number" || ue.test(e)) && e > -1 && e % 1 == 0 && e < r;
632
+ function Ir(e, r) {
633
+ return r = r ?? F, !!r && (typeof e == "number" || ue.test(e)) && e > -1 && e % 1 == 0 && e < r;
569
634
  }
570
- function Ir(e) {
635
+ function Rr(e) {
571
636
  var r = typeof e;
572
637
  return r == "string" || r == "number" || r == "symbol" || r == "boolean" ? e !== "__proto__" : e === null;
573
638
  }
574
- function Er(e) {
575
- return !!ht && ht in e;
639
+ function Sr(e) {
640
+ return !!pt && pt in e;
576
641
  }
577
- function Rr(e) {
578
- var r = e && e.constructor, v = typeof r == "function" && r.prototype || Ze;
579
- return e === v;
642
+ function Dr(e) {
643
+ var r = e && e.constructor, c = typeof r == "function" && r.prototype || Ye;
644
+ return e === c;
580
645
  }
581
646
  function Lr(e) {
582
- return dt.call(e);
647
+ return yt.call(e);
583
648
  }
584
- function Pe(e) {
649
+ function Le(e) {
585
650
  if (e != null) {
586
651
  try {
587
- return ct.call(e);
652
+ return gt.call(e);
588
653
  } catch {
589
654
  }
590
655
  try {
@@ -594,263 +659,263 @@ function $r() {
594
659
  }
595
660
  return "";
596
661
  }
597
- function Tt(e, r) {
662
+ function Et(e, r) {
598
663
  return e === r || e !== e && r !== r;
599
664
  }
600
- var Pr = bt(/* @__PURE__ */ function() {
665
+ var Pr = At(/* @__PURE__ */ function() {
601
666
  return arguments;
602
- }()) ? bt : function(e) {
603
- return He(e) && be.call(e, "callee") && !yt.call(e, "callee");
604
- }, et = Array.isArray;
605
- function Dr(e) {
606
- return e != null && Mt(e.length) && !Ct(e);
667
+ }()) ? At : function(e) {
668
+ return Qe(e) && be.call(e, "callee") && !bt.call(e, "callee");
669
+ }, rt = Array.isArray;
670
+ function kr(e) {
671
+ return e != null && Rt(e.length) && !It(e);
607
672
  }
608
- var lt = $t || Nr;
609
- function Sr(e, r) {
610
- return _t(e, r);
673
+ var ht = Ht || qr;
674
+ function Br(e, r) {
675
+ return Ct(e, r);
611
676
  }
612
- function Ct(e) {
613
- if (!It(e))
677
+ function It(e) {
678
+ if (!St(e))
614
679
  return !1;
615
- var r = Fe(e);
616
- return r == D || r == H || r == d || r == E;
680
+ var r = Ge(e);
681
+ return r == D || r == G || r == g || r == O;
617
682
  }
618
- function Mt(e) {
619
- return typeof e == "number" && e > -1 && e % 1 == 0 && e <= U;
683
+ function Rt(e) {
684
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= F;
620
685
  }
621
- function It(e) {
686
+ function St(e) {
622
687
  var r = typeof e;
623
688
  return e != null && (r == "object" || r == "function");
624
689
  }
625
- function He(e) {
690
+ function Qe(e) {
626
691
  return e != null && typeof e == "object";
627
692
  }
628
- var Et = R ? le(R) : br;
629
- function kr(e) {
630
- return Dr(e) ? pr(e) : _r(e);
693
+ var Dt = I ? le(I) : mr;
694
+ function Nr(e) {
695
+ return kr(e) ? xr(e) : Ar(e);
631
696
  }
632
- function Br() {
697
+ function Or() {
633
698
  return [];
634
699
  }
635
- function Nr() {
700
+ function qr() {
636
701
  return !1;
637
702
  }
638
- V.exports = Sr;
639
- }(Qe, Qe.exports)), Qe.exports;
703
+ j.exports = Br;
704
+ }(Ke, Ke.exports)), Ke.exports;
640
705
  }
641
- var vt = { exports: {} }, St;
642
- function Fr() {
643
- return St || (St = 1, function(V, X) {
644
- var ie = function() {
645
- var Z = function(u, b) {
646
- var c = 236, y = 17, s = u, w = J[b], n = null, t = 0, g = null, i = [], p = {}, L = function(o, f) {
647
- t = s * 4 + 17, n = function(a) {
648
- for (var l = new Array(a), h = 0; h < a; h += 1) {
649
- l[h] = new Array(a);
650
- for (var _ = 0; _ < a; _ += 1)
706
+ var dt = { exports: {} }, Bt;
707
+ function Gr() {
708
+ return Bt || (Bt = 1, function(j, Y) {
709
+ var ee = function() {
710
+ var W = function(p, b) {
711
+ var d = 236, w = 17, a = p, s = X[b], n = null, t = 0, v = null, o = [], y = {}, R = function(f, u) {
712
+ t = a * 4 + 17, n = function(i) {
713
+ for (var l = new Array(i), h = 0; h < i; h += 1) {
714
+ l[h] = new Array(i);
715
+ for (var _ = 0; _ < i; _ += 1)
651
716
  l[h][_] = null;
652
717
  }
653
718
  return l;
654
- }(t), T(0, 0), T(t - 7, 0), T(0, t - 7), re(), $(), S(o, f), s >= 7 && oe(o), g == null && (g = G(s, w, i)), k(g, f);
655
- }, T = function(o, f) {
656
- for (var a = -1; a <= 7; a += 1)
657
- if (!(o + a <= -1 || t <= o + a))
719
+ }(t), C(0, 0), C(t - 7, 0), C(0, t - 7), ne(), U(), L(f, u), a >= 7 && oe(f), v == null && (v = V(a, s, o)), P(v, u);
720
+ }, C = function(f, u) {
721
+ for (var i = -1; i <= 7; i += 1)
722
+ if (!(f + i <= -1 || t <= f + i))
658
723
  for (var l = -1; l <= 7; l += 1)
659
- f + l <= -1 || t <= f + 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[o + a][f + l] = !0 : n[o + a][f + l] = !1);
660
- }, W = function() {
661
- for (var o = 0, f = 0, a = 0; a < 8; a += 1) {
662
- L(!0, a);
663
- var l = M.getLostPoint(p);
664
- (a == 0 || o > l) && (o = l, f = a);
724
+ u + l <= -1 || t <= u + l || (0 <= i && i <= 6 && (l == 0 || l == 6) || 0 <= l && l <= 6 && (i == 0 || i == 6) || 2 <= i && i <= 4 && 2 <= l && l <= 4 ? n[f + i][u + l] = !0 : n[f + i][u + l] = !1);
725
+ }, Z = function() {
726
+ for (var f = 0, u = 0, i = 0; i < 8; i += 1) {
727
+ R(!0, i);
728
+ var l = M.getLostPoint(y);
729
+ (i == 0 || f > l) && (f = l, u = i);
665
730
  }
666
- return f;
667
- }, $ = function() {
668
- for (var o = 8; o < t - 8; o += 1)
669
- n[o][6] == null && (n[o][6] = o % 2 == 0);
731
+ return u;
732
+ }, U = function() {
670
733
  for (var f = 8; f < t - 8; f += 1)
671
- n[6][f] == null && (n[6][f] = f % 2 == 0);
672
- }, re = function() {
673
- for (var o = M.getPatternPosition(s), f = 0; f < o.length; f += 1)
674
- for (var a = 0; a < o.length; a += 1) {
675
- var l = o[f], h = o[a];
734
+ n[f][6] == null && (n[f][6] = f % 2 == 0);
735
+ for (var u = 8; u < t - 8; u += 1)
736
+ n[6][u] == null && (n[6][u] = u % 2 == 0);
737
+ }, ne = function() {
738
+ for (var f = M.getPatternPosition(a), u = 0; u < f.length; u += 1)
739
+ for (var i = 0; i < f.length; i += 1) {
740
+ var l = f[u], h = f[i];
676
741
  if (n[l][h] == null)
677
742
  for (var _ = -2; _ <= 2; _ += 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;
743
+ for (var I = -2; I <= 2; I += 1)
744
+ _ == -2 || _ == 2 || I == -2 || I == 2 || _ == 0 && I == 0 ? n[l + _][h + I] = !0 : n[l + _][h + I] = !1;
680
745
  }
681
- }, oe = function(o) {
682
- for (var f = M.getBCHTypeNumber(s), a = 0; a < 18; a += 1) {
683
- var l = !o && (f >> a & 1) == 1;
684
- n[Math.floor(a / 3)][a % 3 + t - 8 - 3] = l;
746
+ }, oe = function(f) {
747
+ for (var u = M.getBCHTypeNumber(a), i = 0; i < 18; i += 1) {
748
+ var l = !f && (u >> i & 1) == 1;
749
+ n[Math.floor(i / 3)][i % 3 + t - 8 - 3] = l;
685
750
  }
686
- for (var a = 0; a < 18; a += 1) {
687
- var l = !o && (f >> a & 1) == 1;
688
- n[a % 3 + t - 8 - 3][Math.floor(a / 3)] = l;
751
+ for (var i = 0; i < 18; i += 1) {
752
+ var l = !f && (u >> i & 1) == 1;
753
+ n[i % 3 + t - 8 - 3][Math.floor(i / 3)] = l;
689
754
  }
690
- }, S = function(o, f) {
691
- for (var a = w << 3 | f, l = M.getBCHTypeInfo(a), h = 0; h < 15; h += 1) {
692
- var _ = !o && (l >> h & 1) == 1;
755
+ }, L = function(f, u) {
756
+ for (var i = s << 3 | u, l = M.getBCHTypeInfo(i), h = 0; h < 15; h += 1) {
757
+ var _ = !f && (l >> h & 1) == 1;
693
758
  h < 6 ? n[h][8] = _ : h < 8 ? n[h + 1][8] = _ : n[t - 15 + h][8] = _;
694
759
  }
695
760
  for (var h = 0; h < 15; h += 1) {
696
- var _ = !o && (l >> h & 1) == 1;
761
+ var _ = !f && (l >> h & 1) == 1;
697
762
  h < 8 ? n[8][t - h - 1] = _ : h < 9 ? n[8][15 - h - 1 + 1] = _ : n[8][15 - h - 1] = _;
698
763
  }
699
- n[t - 8][8] = !o;
700
- }, k = function(o, f) {
701
- for (var a = -1, l = t - 1, h = 7, _ = 0, R = M.getMaskFunction(f), I = t - 1; I > 0; I -= 2)
702
- for (I == 6 && (I -= 1); ; ) {
703
- for (var Y = 0; Y < 2; Y += 1)
704
- if (n[l][I - Y] == null) {
705
- var ee = !1;
706
- _ < o.length && (ee = (o[_] >>> h & 1) == 1);
707
- var N = R(l, I - Y);
708
- N && (ee = !ee), n[l][I - Y] = ee, h -= 1, h == -1 && (_ += 1, h = 7);
764
+ n[t - 8][8] = !f;
765
+ }, P = function(f, u) {
766
+ for (var i = -1, l = t - 1, h = 7, _ = 0, I = M.getMaskFunction(u), E = t - 1; E > 0; E -= 2)
767
+ for (E == 6 && (E -= 1); ; ) {
768
+ for (var z = 0; z < 2; z += 1)
769
+ if (n[l][E - z] == null) {
770
+ var te = !1;
771
+ _ < f.length && (te = (f[_] >>> h & 1) == 1);
772
+ var B = I(l, E - z);
773
+ B && (te = !te), n[l][E - z] = te, h -= 1, h == -1 && (_ += 1, h = 7);
709
774
  }
710
- if (l += a, l < 0 || t <= l) {
711
- l -= a, a = -a;
775
+ if (l += i, l < 0 || t <= l) {
776
+ l -= i, i = -i;
712
777
  break;
713
778
  }
714
779
  }
715
- }, ue = function(o, f) {
716
- for (var a = 0, l = 0, h = 0, _ = new Array(f.length), R = new Array(f.length), I = 0; I < f.length; I += 1) {
717
- var Y = f[I].dataCount, ee = f[I].totalCount - Y;
718
- l = Math.max(l, Y), h = Math.max(h, ee), _[I] = new Array(Y);
719
- for (var N = 0; N < _[I].length; N += 1)
720
- _[I][N] = 255 & o.getBuffer()[N + a];
721
- a += Y;
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;
780
+ }, ue = function(f, u) {
781
+ for (var i = 0, l = 0, h = 0, _ = new Array(u.length), I = new Array(u.length), E = 0; E < u.length; E += 1) {
782
+ var z = u[E].dataCount, te = u[E].totalCount - z;
783
+ l = Math.max(l, z), h = Math.max(h, te), _[E] = new Array(z);
784
+ for (var B = 0; B < _[E].length; B += 1)
785
+ _[E][B] = 255 & f.getBuffer()[B + i];
786
+ i += z;
787
+ var le = M.getErrorCorrectPolynomial(te), ce = g(_[E], le.getLength() - 1), ke = ce.mod(le);
788
+ I[E] = new Array(le.getLength() - 1);
789
+ for (var B = 0; B < I[E].length; B += 1) {
790
+ var Be = B + ke.getLength() - I[E].length;
791
+ I[E][B] = Be >= 0 ? ke.getAt(Be) : 0;
727
792
  }
728
793
  }
729
- for (var We = 0, N = 0; N < f.length; N += 1)
730
- We += f[N].totalCount;
731
- for (var je = new Array(We), Be = 0, N = 0; N < l; N += 1)
732
- for (var I = 0; I < f.length; I += 1)
733
- N < _[I].length && (je[Be] = _[I][N], Be += 1);
734
- for (var N = 0; N < h; N += 1)
735
- for (var I = 0; I < f.length; I += 1)
736
- N < R[I].length && (je[Be] = R[I][N], Be += 1);
737
- return je;
738
- }, G = function(o, f, a) {
739
- for (var l = A.getRSBlocks(o, f), h = C(), _ = 0; _ < a.length; _ += 1) {
740
- var R = a[_];
741
- h.put(R.getMode(), 4), h.put(R.getLength(), M.getLengthInBits(R.getMode(), o)), R.write(h);
794
+ for (var Je = 0, B = 0; B < u.length; B += 1)
795
+ Je += u[B].totalCount;
796
+ for (var Fe = new Array(Je), Ne = 0, B = 0; B < l; B += 1)
797
+ for (var E = 0; E < u.length; E += 1)
798
+ B < _[E].length && (Fe[Ne] = _[E][B], Ne += 1);
799
+ for (var B = 0; B < h; B += 1)
800
+ for (var E = 0; E < u.length; E += 1)
801
+ B < I[E].length && (Fe[Ne] = I[E][B], Ne += 1);
802
+ return Fe;
803
+ }, V = function(f, u, i) {
804
+ for (var l = m.getRSBlocks(f, u), h = T(), _ = 0; _ < i.length; _ += 1) {
805
+ var I = i[_];
806
+ h.put(I.getMode(), 4), h.put(I.getLength(), M.getLengthInBits(I.getMode(), f)), I.write(h);
742
807
  }
743
- for (var I = 0, _ = 0; _ < l.length; _ += 1)
744
- I += l[_].dataCount;
745
- if (h.getLengthInBits() > I * 8)
746
- throw "code length overflow. (" + h.getLengthInBits() + ">" + I * 8 + ")";
747
- for (h.getLengthInBits() + 4 <= I * 8 && h.put(0, 4); h.getLengthInBits() % 8 != 0; )
808
+ for (var E = 0, _ = 0; _ < l.length; _ += 1)
809
+ E += l[_].dataCount;
810
+ if (h.getLengthInBits() > E * 8)
811
+ throw "code length overflow. (" + h.getLengthInBits() + ">" + E * 8 + ")";
812
+ for (h.getLengthInBits() + 4 <= E * 8 && h.put(0, 4); h.getLengthInBits() % 8 != 0; )
748
813
  h.putBit(!1);
749
- for (; !(h.getLengthInBits() >= I * 8 || (h.put(c, 8), h.getLengthInBits() >= I * 8)); )
750
- h.put(y, 8);
814
+ for (; !(h.getLengthInBits() >= E * 8 || (h.put(d, 8), h.getLengthInBits() >= E * 8)); )
815
+ h.put(w, 8);
751
816
  return ue(h, l);
752
817
  };
753
- p.addData = function(o, f) {
754
- f = f || "Byte";
755
- var a = null;
756
- switch (f) {
818
+ y.addData = function(f, u) {
819
+ u = u || "Byte";
820
+ var i = null;
821
+ switch (u) {
757
822
  case "Numeric":
758
- a = j(o);
823
+ i = $(f);
759
824
  break;
760
825
  case "Alphanumeric":
761
- a = D(o);
826
+ i = D(f);
762
827
  break;
763
828
  case "Byte":
764
- a = H(o);
829
+ i = G(f);
765
830
  break;
766
831
  case "Kanji":
767
- a = q(o);
832
+ i = k(f);
768
833
  break;
769
834
  default:
770
- throw "mode:" + f;
835
+ throw "mode:" + u;
771
836
  }
772
- i.push(a), g = null;
773
- }, p.isDark = function(o, f) {
774
- if (o < 0 || t <= o || f < 0 || t <= f)
775
- throw o + "," + f;
776
- return n[o][f];
777
- }, p.getModuleCount = function() {
837
+ o.push(i), v = null;
838
+ }, y.isDark = function(f, u) {
839
+ if (f < 0 || t <= f || u < 0 || t <= u)
840
+ throw f + "," + u;
841
+ return n[f][u];
842
+ }, y.getModuleCount = function() {
778
843
  return t;
779
- }, p.make = function() {
780
- if (s < 1) {
781
- for (var o = 1; o < 40; o++) {
782
- for (var f = A.getRSBlocks(o, w), a = C(), l = 0; l < i.length; l++) {
783
- var h = i[l];
784
- a.put(h.getMode(), 4), a.put(h.getLength(), M.getLengthInBits(h.getMode(), o)), h.write(a);
844
+ }, y.make = function() {
845
+ if (a < 1) {
846
+ for (var f = 1; f < 40; f++) {
847
+ for (var u = m.getRSBlocks(f, s), i = T(), l = 0; l < o.length; l++) {
848
+ var h = o[l];
849
+ i.put(h.getMode(), 4), i.put(h.getLength(), M.getLengthInBits(h.getMode(), f)), h.write(i);
785
850
  }
786
- for (var _ = 0, l = 0; l < f.length; l++)
787
- _ += f[l].dataCount;
788
- if (a.getLengthInBits() <= _ * 8)
851
+ for (var _ = 0, l = 0; l < u.length; l++)
852
+ _ += u[l].dataCount;
853
+ if (i.getLengthInBits() <= _ * 8)
789
854
  break;
790
855
  }
791
- s = o;
856
+ a = f;
792
857
  }
793
- L(!1, W());
794
- }, p.createTableTag = function(o, f) {
795
- o = o || 2, f = typeof f > "u" ? o * 4 : f;
796
- var a = "";
797
- a += '<table style="', a += " border-width: 0px; border-style: none;", a += " border-collapse: collapse;", a += " padding: 0px; margin: " + f + "px;", a += '">', a += "<tbody>";
798
- for (var l = 0; l < p.getModuleCount(); l += 1) {
799
- a += "<tr>";
800
- for (var h = 0; h < p.getModuleCount(); h += 1)
801
- a += '<td style="', a += " border-width: 0px; border-style: none;", a += " border-collapse: collapse;", a += " padding: 0px; margin: 0px;", a += " width: " + o + "px;", a += " height: " + o + "px;", a += " background-color: ", a += p.isDark(l, h) ? "#000000" : "#ffffff", a += ";", a += '"/>';
802
- a += "</tr>";
858
+ R(!1, Z());
859
+ }, y.createTableTag = function(f, u) {
860
+ f = f || 2, u = typeof u > "u" ? f * 4 : u;
861
+ var i = "";
862
+ i += '<table style="', i += " border-width: 0px; border-style: none;", i += " border-collapse: collapse;", i += " padding: 0px; margin: " + u + "px;", i += '">', i += "<tbody>";
863
+ for (var l = 0; l < y.getModuleCount(); l += 1) {
864
+ i += "<tr>";
865
+ for (var h = 0; h < y.getModuleCount(); h += 1)
866
+ i += '<td style="', i += " border-width: 0px; border-style: none;", i += " border-collapse: collapse;", i += " padding: 0px; margin: 0px;", i += " width: " + f + "px;", i += " height: " + f + "px;", i += " background-color: ", i += y.isDark(l, h) ? "#000000" : "#ffffff", i += ";", i += '"/>';
867
+ i += "</tr>";
803
868
  }
804
- return a += "</tbody>", a += "</table>", a;
805
- }, p.createSvgTag = function(o, f, a, l) {
869
+ return i += "</tbody>", i += "</table>", i;
870
+ }, y.createSvgTag = function(f, u, i, l) {
806
871
  var h = {};
807
- typeof arguments[0] == "object" && (h = arguments[0], o = h.cellSize, f = h.margin, a = h.alt, l = h.title), o = o || 2, f = typeof f > "u" ? o * 4 : f, 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;
808
- var _ = p.getModuleCount() * o + f * 2, R, I, Y, ee, N = "", le;
809
- for (le = "l" + o + ",0 0," + o + " -" + o + ",0 0,-" + o + "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="', Y = 0; Y < p.getModuleCount(); Y += 1)
810
- for (ee = Y * o + f, R = 0; R < p.getModuleCount(); R += 1)
811
- p.isDark(Y, R) && (I = R * o + f, N += "M" + I + "," + ee + le);
812
- return N += '" stroke="transparent" fill="black"/>', N += "</svg>", N;
813
- }, p.createDataURL = function(o, f) {
814
- o = o || 2, f = typeof f > "u" ? o * 4 : f;
815
- var a = p.getModuleCount() * o + f * 2, l = f, h = a - f;
816
- return E(a, a, function(_, R) {
817
- if (l <= _ && _ < h && l <= R && R < h) {
818
- var I = Math.floor((_ - l) / o), Y = Math.floor((R - l) / o);
819
- return p.isDark(Y, I) ? 0 : 1;
872
+ typeof arguments[0] == "object" && (h = arguments[0], f = h.cellSize, u = h.margin, i = h.alt, l = h.title), f = f || 2, u = typeof u > "u" ? f * 4 : u, i = typeof i == "string" ? { text: i } : i || {}, i.text = i.text || null, i.id = i.text ? i.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;
873
+ var _ = y.getModuleCount() * f + u * 2, I, E, z, te, B = "", le;
874
+ for (le = "l" + f + ",0 0," + f + " -" + f + ",0 0,-" + f + "z ", B += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"', B += h.scalable ? "" : ' width="' + _ + 'px" height="' + _ + 'px"', B += ' viewBox="0 0 ' + _ + " " + _ + '" ', B += ' preserveAspectRatio="xMinYMin meet"', B += l.text || i.text ? ' role="img" aria-labelledby="' + se([l.id, i.id].join(" ").trim()) + '"' : "", B += ">", B += l.text ? '<title id="' + se(l.id) + '">' + se(l.text) + "</title>" : "", B += i.text ? '<description id="' + se(i.id) + '">' + se(i.text) + "</description>" : "", B += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>', B += '<path d="', z = 0; z < y.getModuleCount(); z += 1)
875
+ for (te = z * f + u, I = 0; I < y.getModuleCount(); I += 1)
876
+ y.isDark(z, I) && (E = I * f + u, B += "M" + E + "," + te + le);
877
+ return B += '" stroke="transparent" fill="black"/>', B += "</svg>", B;
878
+ }, y.createDataURL = function(f, u) {
879
+ f = f || 2, u = typeof u > "u" ? f * 4 : u;
880
+ var i = y.getModuleCount() * f + u * 2, l = u, h = i - u;
881
+ return O(i, i, function(_, I) {
882
+ if (l <= _ && _ < h && l <= I && I < h) {
883
+ var E = Math.floor((_ - l) / f), z = Math.floor((I - l) / f);
884
+ return y.isDark(z, E) ? 0 : 1;
820
885
  } else
821
886
  return 1;
822
887
  });
823
- }, p.createImgTag = function(o, f, a) {
824
- o = o || 2, f = typeof f > "u" ? o * 4 : f;
825
- var l = p.getModuleCount() * o + f * 2, h = "";
826
- return h += "<img", h += ' src="', h += p.createDataURL(o, f), h += '"', h += ' width="', h += l, h += '"', h += ' height="', h += l, h += '"', a && (h += ' alt="', h += se(a), h += '"'), h += "/>", h;
888
+ }, y.createImgTag = function(f, u, i) {
889
+ f = f || 2, u = typeof u > "u" ? f * 4 : u;
890
+ var l = y.getModuleCount() * f + u * 2, h = "";
891
+ return h += "<img", h += ' src="', h += y.createDataURL(f, u), h += '"', h += ' width="', h += l, h += '"', h += ' height="', h += l, h += '"', i && (h += ' alt="', h += se(i), h += '"'), h += "/>", h;
827
892
  };
828
- var se = function(o) {
829
- for (var f = "", a = 0; a < o.length; a += 1) {
830
- var l = o.charAt(a);
893
+ var se = function(f) {
894
+ for (var u = "", i = 0; i < f.length; i += 1) {
895
+ var l = f.charAt(i);
831
896
  switch (l) {
832
897
  case "<":
833
- f += "&lt;";
898
+ u += "&lt;";
834
899
  break;
835
900
  case ">":
836
- f += "&gt;";
901
+ u += "&gt;";
837
902
  break;
838
903
  case "&":
839
- f += "&amp;";
904
+ u += "&amp;";
840
905
  break;
841
906
  case '"':
842
- f += "&quot;";
907
+ u += "&quot;";
843
908
  break;
844
909
  default:
845
- f += l;
910
+ u += l;
846
911
  break;
847
912
  }
848
913
  }
849
- return f;
850
- }, _e = function(o) {
851
- var f = 1;
852
- o = typeof o > "u" ? f * 2 : o;
853
- var a = p.getModuleCount() * f + o * 2, l = o, h = a - o, _, R, I, Y, ee, N = {
914
+ return u;
915
+ }, _e = function(f) {
916
+ var u = 1;
917
+ f = typeof f > "u" ? u * 2 : f;
918
+ var i = y.getModuleCount() * u + f * 2, l = f, h = i - f, _, I, E, z, te, B = {
854
919
  "██": "█",
855
920
  "█ ": "▀",
856
921
  " █": "▄",
@@ -860,83 +925,83 @@ function Fr() {
860
925
  "█ ": "▀",
861
926
  " █": " ",
862
927
  " ": " "
863
- }, ve = "";
864
- for (_ = 0; _ < a; _ += 2) {
865
- for (I = Math.floor((_ - l) / f), Y = Math.floor((_ + 1 - l) / f), R = 0; R < a; R += 1)
866
- ee = "█", l <= R && R < h && l <= _ && _ < h && p.isDark(I, Math.floor((R - l) / f)) && (ee = " "), l <= R && R < h && l <= _ + 1 && _ + 1 < h && p.isDark(Y, Math.floor((R - l) / f)) ? ee += " " : ee += "█", ve += o < 1 && _ + 1 >= h ? le[ee] : N[ee];
867
- ve += `
928
+ }, ce = "";
929
+ for (_ = 0; _ < i; _ += 2) {
930
+ for (E = Math.floor((_ - l) / u), z = Math.floor((_ + 1 - l) / u), I = 0; I < i; I += 1)
931
+ te = "█", l <= I && I < h && l <= _ && _ < h && y.isDark(E, Math.floor((I - l) / u)) && (te = " "), l <= I && I < h && l <= _ + 1 && _ + 1 < h && y.isDark(z, Math.floor((I - l) / u)) ? te += " " : te += "█", ce += f < 1 && _ + 1 >= h ? le[te] : B[te];
932
+ ce += `
868
933
  `;
869
934
  }
870
- return a % 2 && o > 0 ? ve.substring(0, ve.length - a - 1) + Array(a + 1).join("▀") : ve.substring(0, ve.length - 1);
935
+ return i % 2 && f > 0 ? ce.substring(0, ce.length - i - 1) + Array(i + 1).join("▀") : ce.substring(0, ce.length - 1);
871
936
  };
872
- return p.createASCII = function(o, f) {
873
- if (o = o || 1, o < 2)
874
- return _e(f);
875
- o -= 1, f = typeof f > "u" ? o * 2 : f;
876
- var a = p.getModuleCount() * o + f * 2, l = f, h = a - f, _, R, I, Y, ee = Array(o + 1).join("██"), N = Array(o + 1).join(" "), le = "", ve = "";
877
- for (_ = 0; _ < a; _ += 1) {
878
- for (I = Math.floor((_ - l) / o), ve = "", R = 0; R < a; R += 1)
879
- Y = 1, l <= R && R < h && l <= _ && _ < h && p.isDark(I, Math.floor((R - l) / o)) && (Y = 0), ve += Y ? ee : N;
880
- for (I = 0; I < o; I += 1)
881
- le += ve + `
937
+ return y.createASCII = function(f, u) {
938
+ if (f = f || 1, f < 2)
939
+ return _e(u);
940
+ f -= 1, u = typeof u > "u" ? f * 2 : u;
941
+ var i = y.getModuleCount() * f + u * 2, l = u, h = i - u, _, I, E, z, te = Array(f + 1).join("██"), B = Array(f + 1).join(" "), le = "", ce = "";
942
+ for (_ = 0; _ < i; _ += 1) {
943
+ for (E = Math.floor((_ - l) / f), ce = "", I = 0; I < i; I += 1)
944
+ z = 1, l <= I && I < h && l <= _ && _ < h && y.isDark(E, Math.floor((I - l) / f)) && (z = 0), ce += z ? te : B;
945
+ for (E = 0; E < f; E += 1)
946
+ le += ce + `
882
947
  `;
883
948
  }
884
949
  return le.substring(0, le.length - 1);
885
- }, p.renderTo2dContext = function(o, f) {
886
- f = f || 2;
887
- for (var a = p.getModuleCount(), l = 0; l < a; l++)
888
- for (var h = 0; h < a; h++)
889
- o.fillStyle = p.isDark(l, h) ? "black" : "white", o.fillRect(l * f, h * f, f, f);
890
- }, p;
950
+ }, y.renderTo2dContext = function(f, u) {
951
+ u = u || 2;
952
+ for (var i = y.getModuleCount(), l = 0; l < i; l++)
953
+ for (var h = 0; h < i; h++)
954
+ f.fillStyle = y.isDark(l, h) ? "black" : "white", f.fillRect(l * u, h * u, u, u);
955
+ }, y;
891
956
  };
892
- Z.stringToBytesFuncs = {
893
- default: function(u) {
894
- for (var b = [], c = 0; c < u.length; c += 1) {
895
- var y = u.charCodeAt(c);
896
- b.push(y & 255);
957
+ W.stringToBytesFuncs = {
958
+ default: function(p) {
959
+ for (var b = [], d = 0; d < p.length; d += 1) {
960
+ var w = p.charCodeAt(d);
961
+ b.push(w & 255);
897
962
  }
898
963
  return b;
899
964
  }
900
- }, Z.stringToBytes = Z.stringToBytesFuncs.default, Z.createStringToBytes = function(u, b) {
901
- var c = function() {
902
- for (var s = Q(u), w = function() {
903
- var $ = s.read();
904
- if ($ == -1) throw "eof";
905
- return $;
965
+ }, W.stringToBytes = W.stringToBytesFuncs.default, W.createStringToBytes = function(p, b) {
966
+ var d = function() {
967
+ for (var a = Q(p), s = function() {
968
+ var U = a.read();
969
+ if (U == -1) throw "eof";
970
+ return U;
906
971
  }, n = 0, t = {}; ; ) {
907
- var g = s.read();
908
- if (g == -1) break;
909
- var i = w(), p = w(), L = w(), T = String.fromCharCode(g << 8 | i), W = p << 8 | L;
910
- t[T] = W, n += 1;
972
+ var v = a.read();
973
+ if (v == -1) break;
974
+ var o = s(), y = s(), R = s(), C = String.fromCharCode(v << 8 | o), Z = y << 8 | R;
975
+ t[C] = Z, n += 1;
911
976
  }
912
977
  if (n != b)
913
978
  throw n + " != " + b;
914
979
  return t;
915
- }(), y = 63;
916
- return function(s) {
917
- for (var w = [], n = 0; n < s.length; n += 1) {
918
- var t = s.charCodeAt(n);
980
+ }(), w = 63;
981
+ return function(a) {
982
+ for (var s = [], n = 0; n < a.length; n += 1) {
983
+ var t = a.charCodeAt(n);
919
984
  if (t < 128)
920
- w.push(t);
985
+ s.push(t);
921
986
  else {
922
- var g = c[s.charAt(n)];
923
- typeof g == "number" ? (g & 255) == g ? w.push(g) : (w.push(g >>> 8), w.push(g & 255)) : w.push(y);
987
+ var v = d[a.charAt(n)];
988
+ typeof v == "number" ? (v & 255) == v ? s.push(v) : (s.push(v >>> 8), s.push(v & 255)) : s.push(w);
924
989
  }
925
990
  }
926
- return w;
991
+ return s;
927
992
  };
928
993
  };
929
- var O = {
994
+ var q = {
930
995
  MODE_NUMBER: 1,
931
996
  MODE_ALPHA_NUM: 2,
932
997
  MODE_8BIT_BYTE: 4,
933
998
  MODE_KANJI: 8
934
- }, J = {
999
+ }, X = {
935
1000
  L: 1,
936
1001
  M: 0,
937
1002
  Q: 3,
938
1003
  H: 2
939
- }, U = {
1004
+ }, F = {
940
1005
  PATTERN000: 0,
941
1006
  PATTERN001: 1,
942
1007
  PATTERN010: 2,
@@ -946,7 +1011,7 @@ function Fr() {
946
1011
  PATTERN110: 6,
947
1012
  PATTERN111: 7
948
1013
  }, M = function() {
949
- var u = [
1014
+ var p = [
950
1015
  [],
951
1016
  [6, 18],
952
1017
  [6, 22],
@@ -987,181 +1052,181 @@ function Fr() {
987
1052
  [6, 32, 58, 84, 110, 136, 162],
988
1053
  [6, 26, 54, 82, 110, 138, 166],
989
1054
  [6, 30, 58, 86, 114, 142, 170]
990
- ], b = 1335, c = 7973, y = 21522, s = {}, w = function(n) {
1055
+ ], b = 1335, d = 7973, w = 21522, a = {}, s = function(n) {
991
1056
  for (var t = 0; n != 0; )
992
1057
  t += 1, n >>>= 1;
993
1058
  return t;
994
1059
  };
995
- return s.getBCHTypeInfo = function(n) {
996
- for (var t = n << 10; w(t) - w(b) >= 0; )
997
- t ^= b << w(t) - w(b);
998
- return (n << 10 | t) ^ y;
999
- }, s.getBCHTypeNumber = function(n) {
1000
- for (var t = n << 12; w(t) - w(c) >= 0; )
1001
- t ^= c << w(t) - w(c);
1060
+ return a.getBCHTypeInfo = function(n) {
1061
+ for (var t = n << 10; s(t) - s(b) >= 0; )
1062
+ t ^= b << s(t) - s(b);
1063
+ return (n << 10 | t) ^ w;
1064
+ }, a.getBCHTypeNumber = function(n) {
1065
+ for (var t = n << 12; s(t) - s(d) >= 0; )
1066
+ t ^= d << s(t) - s(d);
1002
1067
  return n << 12 | t;
1003
- }, s.getPatternPosition = function(n) {
1004
- return u[n - 1];
1005
- }, s.getMaskFunction = function(n) {
1068
+ }, a.getPatternPosition = function(n) {
1069
+ return p[n - 1];
1070
+ }, a.getMaskFunction = function(n) {
1006
1071
  switch (n) {
1007
- case U.PATTERN000:
1008
- return function(t, g) {
1009
- return (t + g) % 2 == 0;
1072
+ case F.PATTERN000:
1073
+ return function(t, v) {
1074
+ return (t + v) % 2 == 0;
1010
1075
  };
1011
- case U.PATTERN001:
1012
- return function(t, g) {
1076
+ case F.PATTERN001:
1077
+ return function(t, v) {
1013
1078
  return t % 2 == 0;
1014
1079
  };
1015
- case U.PATTERN010:
1016
- return function(t, g) {
1017
- return g % 3 == 0;
1080
+ case F.PATTERN010:
1081
+ return function(t, v) {
1082
+ return v % 3 == 0;
1018
1083
  };
1019
- case U.PATTERN011:
1020
- return function(t, g) {
1021
- return (t + g) % 3 == 0;
1084
+ case F.PATTERN011:
1085
+ return function(t, v) {
1086
+ return (t + v) % 3 == 0;
1022
1087
  };
1023
- case U.PATTERN100:
1024
- return function(t, g) {
1025
- return (Math.floor(t / 2) + Math.floor(g / 3)) % 2 == 0;
1088
+ case F.PATTERN100:
1089
+ return function(t, v) {
1090
+ return (Math.floor(t / 2) + Math.floor(v / 3)) % 2 == 0;
1026
1091
  };
1027
- case U.PATTERN101:
1028
- return function(t, g) {
1029
- return t * g % 2 + t * g % 3 == 0;
1092
+ case F.PATTERN101:
1093
+ return function(t, v) {
1094
+ return t * v % 2 + t * v % 3 == 0;
1030
1095
  };
1031
- case U.PATTERN110:
1032
- return function(t, g) {
1033
- return (t * g % 2 + t * g % 3) % 2 == 0;
1096
+ case F.PATTERN110:
1097
+ return function(t, v) {
1098
+ return (t * v % 2 + t * v % 3) % 2 == 0;
1034
1099
  };
1035
- case U.PATTERN111:
1036
- return function(t, g) {
1037
- return (t * g % 3 + (t + g) % 2) % 2 == 0;
1100
+ case F.PATTERN111:
1101
+ return function(t, v) {
1102
+ return (t * v % 3 + (t + v) % 2) % 2 == 0;
1038
1103
  };
1039
1104
  default:
1040
1105
  throw "bad maskPattern:" + n;
1041
1106
  }
1042
- }, s.getErrorCorrectPolynomial = function(n) {
1043
- for (var t = d([1], 0), g = 0; g < n; g += 1)
1044
- t = t.multiply(d([1, x.gexp(g)], 0));
1107
+ }, a.getErrorCorrectPolynomial = function(n) {
1108
+ for (var t = g([1], 0), v = 0; v < n; v += 1)
1109
+ t = t.multiply(g([1, x.gexp(v)], 0));
1045
1110
  return t;
1046
- }, s.getLengthInBits = function(n, t) {
1111
+ }, a.getLengthInBits = function(n, t) {
1047
1112
  if (1 <= t && t < 10)
1048
1113
  switch (n) {
1049
- case O.MODE_NUMBER:
1114
+ case q.MODE_NUMBER:
1050
1115
  return 10;
1051
- case O.MODE_ALPHA_NUM:
1116
+ case q.MODE_ALPHA_NUM:
1052
1117
  return 9;
1053
- case O.MODE_8BIT_BYTE:
1118
+ case q.MODE_8BIT_BYTE:
1054
1119
  return 8;
1055
- case O.MODE_KANJI:
1120
+ case q.MODE_KANJI:
1056
1121
  return 8;
1057
1122
  default:
1058
1123
  throw "mode:" + n;
1059
1124
  }
1060
1125
  else if (t < 27)
1061
1126
  switch (n) {
1062
- case O.MODE_NUMBER:
1127
+ case q.MODE_NUMBER:
1063
1128
  return 12;
1064
- case O.MODE_ALPHA_NUM:
1129
+ case q.MODE_ALPHA_NUM:
1065
1130
  return 11;
1066
- case O.MODE_8BIT_BYTE:
1131
+ case q.MODE_8BIT_BYTE:
1067
1132
  return 16;
1068
- case O.MODE_KANJI:
1133
+ case q.MODE_KANJI:
1069
1134
  return 10;
1070
1135
  default:
1071
1136
  throw "mode:" + n;
1072
1137
  }
1073
1138
  else if (t < 41)
1074
1139
  switch (n) {
1075
- case O.MODE_NUMBER:
1140
+ case q.MODE_NUMBER:
1076
1141
  return 14;
1077
- case O.MODE_ALPHA_NUM:
1142
+ case q.MODE_ALPHA_NUM:
1078
1143
  return 13;
1079
- case O.MODE_8BIT_BYTE:
1144
+ case q.MODE_8BIT_BYTE:
1080
1145
  return 16;
1081
- case O.MODE_KANJI:
1146
+ case q.MODE_KANJI:
1082
1147
  return 12;
1083
1148
  default:
1084
1149
  throw "mode:" + n;
1085
1150
  }
1086
1151
  else
1087
1152
  throw "type:" + t;
1088
- }, s.getLostPoint = function(n) {
1089
- for (var t = n.getModuleCount(), g = 0, i = 0; i < t; i += 1)
1090
- for (var p = 0; p < t; p += 1) {
1091
- for (var L = 0, T = n.isDark(i, p), W = -1; W <= 1; W += 1)
1092
- if (!(i + W < 0 || t <= i + W))
1093
- for (var $ = -1; $ <= 1; $ += 1)
1094
- p + $ < 0 || t <= p + $ || W == 0 && $ == 0 || T == n.isDark(i + W, p + $) && (L += 1);
1095
- L > 5 && (g += 3 + L - 5);
1153
+ }, a.getLostPoint = function(n) {
1154
+ for (var t = n.getModuleCount(), v = 0, o = 0; o < t; o += 1)
1155
+ for (var y = 0; y < t; y += 1) {
1156
+ for (var R = 0, C = n.isDark(o, y), Z = -1; Z <= 1; Z += 1)
1157
+ if (!(o + Z < 0 || t <= o + Z))
1158
+ for (var U = -1; U <= 1; U += 1)
1159
+ y + U < 0 || t <= y + U || Z == 0 && U == 0 || C == n.isDark(o + Z, y + U) && (R += 1);
1160
+ R > 5 && (v += 3 + R - 5);
1096
1161
  }
1097
- for (var i = 0; i < t - 1; i += 1)
1098
- for (var p = 0; p < t - 1; p += 1) {
1099
- var re = 0;
1100
- n.isDark(i, p) && (re += 1), n.isDark(i + 1, p) && (re += 1), n.isDark(i, p + 1) && (re += 1), n.isDark(i + 1, p + 1) && (re += 1), (re == 0 || re == 4) && (g += 3);
1162
+ for (var o = 0; o < t - 1; o += 1)
1163
+ for (var y = 0; y < t - 1; y += 1) {
1164
+ var ne = 0;
1165
+ n.isDark(o, y) && (ne += 1), n.isDark(o + 1, y) && (ne += 1), n.isDark(o, y + 1) && (ne += 1), n.isDark(o + 1, y + 1) && (ne += 1), (ne == 0 || ne == 4) && (v += 3);
1101
1166
  }
1102
- for (var i = 0; i < t; i += 1)
1103
- for (var p = 0; p < t - 6; p += 1)
1104
- n.isDark(i, p) && !n.isDark(i, p + 1) && n.isDark(i, p + 2) && n.isDark(i, p + 3) && n.isDark(i, p + 4) && !n.isDark(i, p + 5) && n.isDark(i, p + 6) && (g += 40);
1105
- for (var p = 0; p < t; p += 1)
1106
- for (var i = 0; i < t - 6; i += 1)
1107
- n.isDark(i, p) && !n.isDark(i + 1, p) && n.isDark(i + 2, p) && n.isDark(i + 3, p) && n.isDark(i + 4, p) && !n.isDark(i + 5, p) && n.isDark(i + 6, p) && (g += 40);
1108
- for (var oe = 0, p = 0; p < t; p += 1)
1109
- for (var i = 0; i < t; i += 1)
1110
- n.isDark(i, p) && (oe += 1);
1111
- var S = Math.abs(100 * oe / t / t - 50) / 5;
1112
- return g += S * 10, g;
1113
- }, s;
1167
+ for (var o = 0; o < t; o += 1)
1168
+ for (var y = 0; y < t - 6; y += 1)
1169
+ n.isDark(o, y) && !n.isDark(o, y + 1) && n.isDark(o, y + 2) && n.isDark(o, y + 3) && n.isDark(o, y + 4) && !n.isDark(o, y + 5) && n.isDark(o, y + 6) && (v += 40);
1170
+ for (var y = 0; y < t; y += 1)
1171
+ for (var o = 0; o < t - 6; o += 1)
1172
+ n.isDark(o, y) && !n.isDark(o + 1, y) && n.isDark(o + 2, y) && n.isDark(o + 3, y) && n.isDark(o + 4, y) && !n.isDark(o + 5, y) && n.isDark(o + 6, y) && (v += 40);
1173
+ for (var oe = 0, y = 0; y < t; y += 1)
1174
+ for (var o = 0; o < t; o += 1)
1175
+ n.isDark(o, y) && (oe += 1);
1176
+ var L = Math.abs(100 * oe / t / t - 50) / 5;
1177
+ return v += L * 10, v;
1178
+ }, a;
1114
1179
  }(), x = function() {
1115
- for (var u = new Array(256), b = new Array(256), c = 0; c < 8; c += 1)
1116
- u[c] = 1 << c;
1117
- for (var c = 8; c < 256; c += 1)
1118
- u[c] = u[c - 4] ^ u[c - 5] ^ u[c - 6] ^ u[c - 8];
1119
- for (var c = 0; c < 255; c += 1)
1120
- b[u[c]] = c;
1121
- var y = {};
1122
- return y.glog = function(s) {
1123
- if (s < 1)
1124
- throw "glog(" + s + ")";
1125
- return b[s];
1126
- }, y.gexp = function(s) {
1127
- for (; s < 0; )
1128
- s += 255;
1129
- for (; s >= 256; )
1130
- s -= 255;
1131
- return u[s];
1132
- }, y;
1180
+ for (var p = new Array(256), b = new Array(256), d = 0; d < 8; d += 1)
1181
+ p[d] = 1 << d;
1182
+ for (var d = 8; d < 256; d += 1)
1183
+ p[d] = p[d - 4] ^ p[d - 5] ^ p[d - 6] ^ p[d - 8];
1184
+ for (var d = 0; d < 255; d += 1)
1185
+ b[p[d]] = d;
1186
+ var w = {};
1187
+ return w.glog = function(a) {
1188
+ if (a < 1)
1189
+ throw "glog(" + a + ")";
1190
+ return b[a];
1191
+ }, w.gexp = function(a) {
1192
+ for (; a < 0; )
1193
+ a += 255;
1194
+ for (; a >= 256; )
1195
+ a -= 255;
1196
+ return p[a];
1197
+ }, w;
1133
1198
  }();
1134
- function d(u, b) {
1135
- if (typeof u.length > "u")
1136
- throw u.length + "/" + b;
1137
- var c = function() {
1138
- for (var s = 0; s < u.length && u[s] == 0; )
1139
- s += 1;
1140
- for (var w = new Array(u.length - s + b), n = 0; n < u.length - s; n += 1)
1141
- w[n] = u[n + s];
1142
- return w;
1143
- }(), y = {};
1144
- return y.getAt = function(s) {
1145
- return c[s];
1146
- }, y.getLength = function() {
1147
- return c.length;
1148
- }, y.multiply = function(s) {
1149
- for (var w = new Array(y.getLength() + s.getLength() - 1), n = 0; n < y.getLength(); n += 1)
1150
- for (var t = 0; t < s.getLength(); t += 1)
1151
- w[n + t] ^= x.gexp(x.glog(y.getAt(n)) + x.glog(s.getAt(t)));
1152
- return d(w, 0);
1153
- }, y.mod = function(s) {
1154
- if (y.getLength() - s.getLength() < 0)
1155
- return y;
1156
- for (var w = x.glog(y.getAt(0)) - x.glog(s.getAt(0)), n = new Array(y.getLength()), t = 0; t < y.getLength(); t += 1)
1157
- n[t] = y.getAt(t);
1158
- for (var t = 0; t < s.getLength(); t += 1)
1159
- n[t] ^= x.gexp(x.glog(s.getAt(t)) + w);
1160
- return d(n, 0).mod(s);
1161
- }, y;
1199
+ function g(p, b) {
1200
+ if (typeof p.length > "u")
1201
+ throw p.length + "/" + b;
1202
+ var d = function() {
1203
+ for (var a = 0; a < p.length && p[a] == 0; )
1204
+ a += 1;
1205
+ for (var s = new Array(p.length - a + b), n = 0; n < p.length - a; n += 1)
1206
+ s[n] = p[n + a];
1207
+ return s;
1208
+ }(), w = {};
1209
+ return w.getAt = function(a) {
1210
+ return d[a];
1211
+ }, w.getLength = function() {
1212
+ return d.length;
1213
+ }, w.multiply = function(a) {
1214
+ for (var s = new Array(w.getLength() + a.getLength() - 1), n = 0; n < w.getLength(); n += 1)
1215
+ for (var t = 0; t < a.getLength(); t += 1)
1216
+ s[n + t] ^= x.gexp(x.glog(w.getAt(n)) + x.glog(a.getAt(t)));
1217
+ return g(s, 0);
1218
+ }, w.mod = function(a) {
1219
+ if (w.getLength() - a.getLength() < 0)
1220
+ return w;
1221
+ for (var s = x.glog(w.getAt(0)) - x.glog(a.getAt(0)), n = new Array(w.getLength()), t = 0; t < w.getLength(); t += 1)
1222
+ n[t] = w.getAt(t);
1223
+ for (var t = 0; t < a.getLength(); t += 1)
1224
+ n[t] ^= x.gexp(x.glog(a.getAt(t)) + s);
1225
+ return g(n, 0).mod(a);
1226
+ }, w;
1162
1227
  }
1163
- var A = function() {
1164
- var u = [
1228
+ var m = function() {
1229
+ var p = [
1165
1230
  // L
1166
1231
  // M
1167
1232
  // Q
@@ -1366,89 +1431,89 @@ function Fr() {
1366
1431
  [18, 75, 47, 31, 76, 48],
1367
1432
  [34, 54, 24, 34, 55, 25],
1368
1433
  [20, 45, 15, 61, 46, 16]
1369
- ], b = function(s, w) {
1434
+ ], b = function(a, s) {
1370
1435
  var n = {};
1371
- return n.totalCount = s, n.dataCount = w, n;
1372
- }, c = {}, y = function(s, w) {
1373
- switch (w) {
1374
- case J.L:
1375
- return u[(s - 1) * 4 + 0];
1376
- case J.M:
1377
- return u[(s - 1) * 4 + 1];
1378
- case J.Q:
1379
- return u[(s - 1) * 4 + 2];
1380
- case J.H:
1381
- return u[(s - 1) * 4 + 3];
1436
+ return n.totalCount = a, n.dataCount = s, n;
1437
+ }, d = {}, w = function(a, s) {
1438
+ switch (s) {
1439
+ case X.L:
1440
+ return p[(a - 1) * 4 + 0];
1441
+ case X.M:
1442
+ return p[(a - 1) * 4 + 1];
1443
+ case X.Q:
1444
+ return p[(a - 1) * 4 + 2];
1445
+ case X.H:
1446
+ return p[(a - 1) * 4 + 3];
1382
1447
  default:
1383
1448
  return;
1384
1449
  }
1385
1450
  };
1386
- return c.getRSBlocks = function(s, w) {
1387
- var n = y(s, w);
1451
+ return d.getRSBlocks = function(a, s) {
1452
+ var n = w(a, s);
1388
1453
  if (typeof n > "u")
1389
- throw "bad rs block @ typeNumber:" + s + "/errorCorrectionLevel:" + w;
1390
- for (var t = n.length / 3, g = [], i = 0; i < t; i += 1)
1391
- for (var p = n[i * 3 + 0], L = n[i * 3 + 1], T = n[i * 3 + 2], W = 0; W < p; W += 1)
1392
- g.push(b(L, T));
1393
- return g;
1394
- }, c;
1395
- }(), C = function() {
1396
- var u = [], b = 0, c = {};
1397
- return c.getBuffer = function() {
1398
- return u;
1399
- }, c.getAt = function(y) {
1400
- var s = Math.floor(y / 8);
1401
- return (u[s] >>> 7 - y % 8 & 1) == 1;
1402
- }, c.put = function(y, s) {
1403
- for (var w = 0; w < s; w += 1)
1404
- c.putBit((y >>> s - w - 1 & 1) == 1);
1405
- }, c.getLengthInBits = function() {
1454
+ throw "bad rs block @ typeNumber:" + a + "/errorCorrectionLevel:" + s;
1455
+ for (var t = n.length / 3, v = [], o = 0; o < t; o += 1)
1456
+ for (var y = n[o * 3 + 0], R = n[o * 3 + 1], C = n[o * 3 + 2], Z = 0; Z < y; Z += 1)
1457
+ v.push(b(R, C));
1458
+ return v;
1459
+ }, d;
1460
+ }(), T = function() {
1461
+ var p = [], b = 0, d = {};
1462
+ return d.getBuffer = function() {
1463
+ return p;
1464
+ }, d.getAt = function(w) {
1465
+ var a = Math.floor(w / 8);
1466
+ return (p[a] >>> 7 - w % 8 & 1) == 1;
1467
+ }, d.put = function(w, a) {
1468
+ for (var s = 0; s < a; s += 1)
1469
+ d.putBit((w >>> a - s - 1 & 1) == 1);
1470
+ }, d.getLengthInBits = function() {
1406
1471
  return b;
1407
- }, c.putBit = function(y) {
1408
- var s = Math.floor(b / 8);
1409
- u.length <= s && u.push(0), y && (u[s] |= 128 >>> b % 8), b += 1;
1410
- }, c;
1411
- }, j = function(u) {
1412
- var b = O.MODE_NUMBER, c = u, y = {};
1413
- y.getMode = function() {
1472
+ }, d.putBit = function(w) {
1473
+ var a = Math.floor(b / 8);
1474
+ p.length <= a && p.push(0), w && (p[a] |= 128 >>> b % 8), b += 1;
1475
+ }, d;
1476
+ }, $ = function(p) {
1477
+ var b = q.MODE_NUMBER, d = p, w = {};
1478
+ w.getMode = function() {
1414
1479
  return b;
1415
- }, y.getLength = function(n) {
1416
- return c.length;
1417
- }, y.write = function(n) {
1418
- for (var t = c, g = 0; g + 2 < t.length; )
1419
- n.put(s(t.substring(g, g + 3)), 10), g += 3;
1420
- g < t.length && (t.length - g == 1 ? n.put(s(t.substring(g, g + 1)), 4) : t.length - g == 2 && n.put(s(t.substring(g, g + 2)), 7));
1480
+ }, w.getLength = function(n) {
1481
+ return d.length;
1482
+ }, w.write = function(n) {
1483
+ for (var t = d, v = 0; v + 2 < t.length; )
1484
+ n.put(a(t.substring(v, v + 3)), 10), v += 3;
1485
+ v < t.length && (t.length - v == 1 ? n.put(a(t.substring(v, v + 1)), 4) : t.length - v == 2 && n.put(a(t.substring(v, v + 2)), 7));
1421
1486
  };
1422
- var s = function(n) {
1423
- for (var t = 0, g = 0; g < n.length; g += 1)
1424
- t = t * 10 + w(n.charAt(g));
1487
+ var a = function(n) {
1488
+ for (var t = 0, v = 0; v < n.length; v += 1)
1489
+ t = t * 10 + s(n.charAt(v));
1425
1490
  return t;
1426
- }, w = function(n) {
1491
+ }, s = function(n) {
1427
1492
  if ("0" <= n && n <= "9")
1428
1493
  return n.charCodeAt(0) - 48;
1429
1494
  throw "illegal char :" + n;
1430
1495
  };
1431
- return y;
1432
- }, D = function(u) {
1433
- var b = O.MODE_ALPHA_NUM, c = u, y = {};
1434
- y.getMode = function() {
1496
+ return w;
1497
+ }, D = function(p) {
1498
+ var b = q.MODE_ALPHA_NUM, d = p, w = {};
1499
+ w.getMode = function() {
1435
1500
  return b;
1436
- }, y.getLength = function(w) {
1437
- return c.length;
1438
- }, y.write = function(w) {
1439
- for (var n = c, t = 0; t + 1 < n.length; )
1440
- w.put(
1441
- s(n.charAt(t)) * 45 + s(n.charAt(t + 1)),
1501
+ }, w.getLength = function(s) {
1502
+ return d.length;
1503
+ }, w.write = function(s) {
1504
+ for (var n = d, t = 0; t + 1 < n.length; )
1505
+ s.put(
1506
+ a(n.charAt(t)) * 45 + a(n.charAt(t + 1)),
1442
1507
  11
1443
1508
  ), t += 2;
1444
- t < n.length && w.put(s(n.charAt(t)), 6);
1509
+ t < n.length && s.put(a(n.charAt(t)), 6);
1445
1510
  };
1446
- var s = function(w) {
1447
- if ("0" <= w && w <= "9")
1448
- return w.charCodeAt(0) - 48;
1449
- if ("A" <= w && w <= "Z")
1450
- return w.charCodeAt(0) - 65 + 10;
1451
- switch (w) {
1511
+ var a = function(s) {
1512
+ if ("0" <= s && s <= "9")
1513
+ return s.charCodeAt(0) - 48;
1514
+ if ("A" <= s && s <= "Z")
1515
+ return s.charCodeAt(0) - 65 + 10;
1516
+ switch (s) {
1452
1517
  case " ":
1453
1518
  return 36;
1454
1519
  case "$":
@@ -1468,73 +1533,73 @@ function Fr() {
1468
1533
  case ":":
1469
1534
  return 44;
1470
1535
  default:
1471
- throw "illegal char :" + w;
1536
+ throw "illegal char :" + s;
1472
1537
  }
1473
1538
  };
1474
- return y;
1475
- }, H = function(u) {
1476
- var b = O.MODE_8BIT_BYTE, c = Z.stringToBytes(u), y = {};
1477
- return y.getMode = function() {
1539
+ return w;
1540
+ }, G = function(p) {
1541
+ var b = q.MODE_8BIT_BYTE, d = W.stringToBytes(p), w = {};
1542
+ return w.getMode = function() {
1478
1543
  return b;
1479
- }, y.getLength = function(s) {
1480
- return c.length;
1481
- }, y.write = function(s) {
1482
- for (var w = 0; w < c.length; w += 1)
1483
- s.put(c[w], 8);
1484
- }, y;
1485
- }, q = function(u) {
1486
- var b = O.MODE_KANJI, c = Z.stringToBytesFuncs.SJIS;
1487
- if (!c)
1544
+ }, w.getLength = function(a) {
1545
+ return d.length;
1546
+ }, w.write = function(a) {
1547
+ for (var s = 0; s < d.length; s += 1)
1548
+ a.put(d[s], 8);
1549
+ }, w;
1550
+ }, k = function(p) {
1551
+ var b = q.MODE_KANJI, d = W.stringToBytesFuncs.SJIS;
1552
+ if (!d)
1488
1553
  throw "sjis not supported.";
1489
- (function(w, n) {
1490
- var t = c(w);
1554
+ (function(s, n) {
1555
+ var t = d(s);
1491
1556
  if (t.length != 2 || (t[0] << 8 | t[1]) != n)
1492
1557
  throw "sjis not supported.";
1493
1558
  })("友", 38726);
1494
- var y = c(u), s = {};
1495
- return s.getMode = function() {
1559
+ var w = d(p), a = {};
1560
+ return a.getMode = function() {
1496
1561
  return b;
1497
- }, s.getLength = function(w) {
1498
- return ~~(y.length / 2);
1499
- }, s.write = function(w) {
1500
- for (var n = y, t = 0; t + 1 < n.length; ) {
1501
- var g = (255 & n[t]) << 8 | 255 & n[t + 1];
1502
- if (33088 <= g && g <= 40956)
1503
- g -= 33088;
1504
- else if (57408 <= g && g <= 60351)
1505
- g -= 49472;
1562
+ }, a.getLength = function(s) {
1563
+ return ~~(w.length / 2);
1564
+ }, a.write = function(s) {
1565
+ for (var n = w, t = 0; t + 1 < n.length; ) {
1566
+ var v = (255 & n[t]) << 8 | 255 & n[t + 1];
1567
+ if (33088 <= v && v <= 40956)
1568
+ v -= 33088;
1569
+ else if (57408 <= v && v <= 60351)
1570
+ v -= 49472;
1506
1571
  else
1507
- throw "illegal char at " + (t + 1) + "/" + g;
1508
- g = (g >>> 8 & 255) * 192 + (g & 255), w.put(g, 13), t += 2;
1572
+ throw "illegal char at " + (t + 1) + "/" + v;
1573
+ v = (v >>> 8 & 255) * 192 + (v & 255), s.put(v, 13), t += 2;
1509
1574
  }
1510
1575
  if (t < n.length)
1511
1576
  throw "illegal char at " + (t + 1);
1512
- }, s;
1513
- }, B = function() {
1514
- var u = [], b = {};
1515
- return b.writeByte = function(c) {
1516
- u.push(c & 255);
1517
- }, b.writeShort = function(c) {
1518
- b.writeByte(c), b.writeByte(c >>> 8);
1519
- }, b.writeBytes = function(c, y, s) {
1520
- y = y || 0, s = s || c.length;
1521
- for (var w = 0; w < s; w += 1)
1522
- b.writeByte(c[w + y]);
1523
- }, b.writeString = function(c) {
1524
- for (var y = 0; y < c.length; y += 1)
1525
- b.writeByte(c.charCodeAt(y));
1577
+ }, a;
1578
+ }, N = function() {
1579
+ var p = [], b = {};
1580
+ return b.writeByte = function(d) {
1581
+ p.push(d & 255);
1582
+ }, b.writeShort = function(d) {
1583
+ b.writeByte(d), b.writeByte(d >>> 8);
1584
+ }, b.writeBytes = function(d, w, a) {
1585
+ w = w || 0, a = a || d.length;
1586
+ for (var s = 0; s < a; s += 1)
1587
+ b.writeByte(d[s + w]);
1588
+ }, b.writeString = function(d) {
1589
+ for (var w = 0; w < d.length; w += 1)
1590
+ b.writeByte(d.charCodeAt(w));
1526
1591
  }, b.toByteArray = function() {
1527
- return u;
1592
+ return p;
1528
1593
  }, b.toString = function() {
1529
- var c = "";
1530
- c += "[";
1531
- for (var y = 0; y < u.length; y += 1)
1532
- y > 0 && (c += ","), c += u[y];
1533
- return c += "]", c;
1594
+ var d = "";
1595
+ d += "[";
1596
+ for (var w = 0; w < p.length; w += 1)
1597
+ w > 0 && (d += ","), d += p[w];
1598
+ return d += "]", d;
1534
1599
  }, b;
1535
1600
  }, K = function() {
1536
- var u = 0, b = 0, c = 0, y = "", s = {}, w = function(t) {
1537
- y += String.fromCharCode(n(t & 63));
1601
+ var p = 0, b = 0, d = 0, w = "", a = {}, s = function(t) {
1602
+ w += String.fromCharCode(n(t & 63));
1538
1603
  }, n = function(t) {
1539
1604
  if (!(t < 0)) {
1540
1605
  if (t < 26)
@@ -1550,34 +1615,34 @@ function Fr() {
1550
1615
  }
1551
1616
  throw "n:" + t;
1552
1617
  };
1553
- return s.writeByte = function(t) {
1554
- for (u = u << 8 | t & 255, b += 8, c += 1; b >= 6; )
1555
- w(u >>> b - 6), b -= 6;
1556
- }, s.flush = function() {
1557
- if (b > 0 && (w(u << 6 - b), u = 0, b = 0), c % 3 != 0)
1558
- for (var t = 3 - c % 3, g = 0; g < t; g += 1)
1559
- y += "=";
1560
- }, s.toString = function() {
1561
- return y;
1562
- }, s;
1563
- }, Q = function(u) {
1564
- var b = u, c = 0, y = 0, s = 0, w = {};
1565
- w.read = function() {
1566
- for (; s < 8; ) {
1567
- if (c >= b.length) {
1568
- if (s == 0)
1618
+ return a.writeByte = function(t) {
1619
+ for (p = p << 8 | t & 255, b += 8, d += 1; b >= 6; )
1620
+ s(p >>> b - 6), b -= 6;
1621
+ }, a.flush = function() {
1622
+ if (b > 0 && (s(p << 6 - b), p = 0, b = 0), d % 3 != 0)
1623
+ for (var t = 3 - d % 3, v = 0; v < t; v += 1)
1624
+ w += "=";
1625
+ }, a.toString = function() {
1626
+ return w;
1627
+ }, a;
1628
+ }, Q = function(p) {
1629
+ var b = p, d = 0, w = 0, a = 0, s = {};
1630
+ s.read = function() {
1631
+ for (; a < 8; ) {
1632
+ if (d >= b.length) {
1633
+ if (a == 0)
1569
1634
  return -1;
1570
- throw "unexpected end of file./" + s;
1635
+ throw "unexpected end of file./" + a;
1571
1636
  }
1572
- var t = b.charAt(c);
1573
- if (c += 1, t == "=")
1574
- return s = 0, -1;
1637
+ var t = b.charAt(d);
1638
+ if (d += 1, t == "=")
1639
+ return a = 0, -1;
1575
1640
  if (t.match(/^\s$/))
1576
1641
  continue;
1577
- y = y << 6 | n(t.charCodeAt(0)), s += 6;
1642
+ w = w << 6 | n(t.charCodeAt(0)), a += 6;
1578
1643
  }
1579
- var g = y >>> s - 8 & 255;
1580
- return s -= 8, g;
1644
+ var v = w >>> a - 8 & 255;
1645
+ return a -= 8, v;
1581
1646
  };
1582
1647
  var n = function(t) {
1583
1648
  if (65 <= t && t <= 90)
@@ -1592,249 +1657,249 @@ function Fr() {
1592
1657
  return 63;
1593
1658
  throw "c:" + t;
1594
1659
  };
1595
- return w;
1596
- }, z = function(u, b) {
1597
- var c = u, y = b, s = new Array(u * b), w = {};
1598
- w.setPixel = function(i, p, L) {
1599
- s[p * c + i] = L;
1600
- }, w.write = function(i) {
1601
- i.writeString("GIF87a"), i.writeShort(c), i.writeShort(y), i.writeByte(128), i.writeByte(0), i.writeByte(0), i.writeByte(0), i.writeByte(0), i.writeByte(0), i.writeByte(255), i.writeByte(255), i.writeByte(255), i.writeString(","), i.writeShort(0), i.writeShort(0), i.writeShort(c), i.writeShort(y), i.writeByte(0);
1602
- var p = 2, L = t(p);
1603
- i.writeByte(p);
1604
- for (var T = 0; L.length - T > 255; )
1605
- i.writeByte(255), i.writeBytes(L, T, 255), T += 255;
1606
- i.writeByte(L.length - T), i.writeBytes(L, T, L.length - T), i.writeByte(0), i.writeString(";");
1660
+ return s;
1661
+ }, J = function(p, b) {
1662
+ var d = p, w = b, a = new Array(p * b), s = {};
1663
+ s.setPixel = function(o, y, R) {
1664
+ a[y * d + o] = R;
1665
+ }, s.write = function(o) {
1666
+ o.writeString("GIF87a"), o.writeShort(d), o.writeShort(w), o.writeByte(128), o.writeByte(0), o.writeByte(0), o.writeByte(0), o.writeByte(0), o.writeByte(0), o.writeByte(255), o.writeByte(255), o.writeByte(255), o.writeString(","), o.writeShort(0), o.writeShort(0), o.writeShort(d), o.writeShort(w), o.writeByte(0);
1667
+ var y = 2, R = t(y);
1668
+ o.writeByte(y);
1669
+ for (var C = 0; R.length - C > 255; )
1670
+ o.writeByte(255), o.writeBytes(R, C, 255), C += 255;
1671
+ o.writeByte(R.length - C), o.writeBytes(R, C, R.length - C), o.writeByte(0), o.writeString(";");
1607
1672
  };
1608
- var n = function(i) {
1609
- var p = i, L = 0, T = 0, W = {};
1610
- return W.write = function($, re) {
1611
- if ($ >>> re)
1673
+ var n = function(o) {
1674
+ var y = o, R = 0, C = 0, Z = {};
1675
+ return Z.write = function(U, ne) {
1676
+ if (U >>> ne)
1612
1677
  throw "length over";
1613
- for (; L + re >= 8; )
1614
- p.writeByte(255 & ($ << L | T)), re -= 8 - L, $ >>>= 8 - L, T = 0, L = 0;
1615
- T = $ << L | T, L = L + re;
1616
- }, W.flush = function() {
1617
- L > 0 && p.writeByte(T);
1618
- }, W;
1619
- }, t = function(i) {
1620
- for (var p = 1 << i, L = (1 << i) + 1, T = i + 1, W = g(), $ = 0; $ < p; $ += 1)
1621
- W.add(String.fromCharCode($));
1622
- W.add(String.fromCharCode(p)), W.add(String.fromCharCode(L));
1623
- var re = B(), oe = n(re);
1624
- oe.write(p, T);
1625
- var S = 0, k = String.fromCharCode(s[S]);
1626
- for (S += 1; S < s.length; ) {
1627
- var ue = String.fromCharCode(s[S]);
1628
- S += 1, W.contains(k + ue) ? k = k + ue : (oe.write(W.indexOf(k), T), W.size() < 4095 && (W.size() == 1 << T && (T += 1), W.add(k + ue)), k = ue);
1678
+ for (; R + ne >= 8; )
1679
+ y.writeByte(255 & (U << R | C)), ne -= 8 - R, U >>>= 8 - R, C = 0, R = 0;
1680
+ C = U << R | C, R = R + ne;
1681
+ }, Z.flush = function() {
1682
+ R > 0 && y.writeByte(C);
1683
+ }, Z;
1684
+ }, t = function(o) {
1685
+ for (var y = 1 << o, R = (1 << o) + 1, C = o + 1, Z = v(), U = 0; U < y; U += 1)
1686
+ Z.add(String.fromCharCode(U));
1687
+ Z.add(String.fromCharCode(y)), Z.add(String.fromCharCode(R));
1688
+ var ne = N(), oe = n(ne);
1689
+ oe.write(y, C);
1690
+ var L = 0, P = String.fromCharCode(a[L]);
1691
+ for (L += 1; L < a.length; ) {
1692
+ var ue = String.fromCharCode(a[L]);
1693
+ L += 1, Z.contains(P + ue) ? P = P + ue : (oe.write(Z.indexOf(P), C), Z.size() < 4095 && (Z.size() == 1 << C && (C += 1), Z.add(P + ue)), P = ue);
1629
1694
  }
1630
- return oe.write(W.indexOf(k), T), oe.write(L, T), oe.flush(), re.toByteArray();
1631
- }, g = function() {
1632
- var i = {}, p = 0, L = {};
1633
- return L.add = function(T) {
1634
- if (L.contains(T))
1635
- throw "dup key:" + T;
1636
- i[T] = p, p += 1;
1637
- }, L.size = function() {
1638
- return p;
1639
- }, L.indexOf = function(T) {
1640
- return i[T];
1641
- }, L.contains = function(T) {
1642
- return typeof i[T] < "u";
1643
- }, L;
1695
+ return oe.write(Z.indexOf(P), C), oe.write(R, C), oe.flush(), ne.toByteArray();
1696
+ }, v = function() {
1697
+ var o = {}, y = 0, R = {};
1698
+ return R.add = function(C) {
1699
+ if (R.contains(C))
1700
+ throw "dup key:" + C;
1701
+ o[C] = y, y += 1;
1702
+ }, R.size = function() {
1703
+ return y;
1704
+ }, R.indexOf = function(C) {
1705
+ return o[C];
1706
+ }, R.contains = function(C) {
1707
+ return typeof o[C] < "u";
1708
+ }, R;
1644
1709
  };
1645
- return w;
1646
- }, E = function(u, b, c) {
1647
- for (var y = z(u, b), s = 0; s < b; s += 1)
1648
- for (var w = 0; w < u; w += 1)
1649
- y.setPixel(w, s, c(w, s));
1650
- var n = B();
1651
- y.write(n);
1652
- for (var t = K(), g = n.toByteArray(), i = 0; i < g.length; i += 1)
1653
- t.writeByte(g[i]);
1710
+ return s;
1711
+ }, O = function(p, b, d) {
1712
+ for (var w = J(p, b), a = 0; a < b; a += 1)
1713
+ for (var s = 0; s < p; s += 1)
1714
+ w.setPixel(s, a, d(s, a));
1715
+ var n = N();
1716
+ w.write(n);
1717
+ for (var t = K(), v = n.toByteArray(), o = 0; o < v.length; o += 1)
1718
+ t.writeByte(v[o]);
1654
1719
  return t.flush(), "data:image/gif;base64," + t;
1655
1720
  };
1656
- return Z;
1721
+ return W;
1657
1722
  }();
1658
1723
  (function() {
1659
- ie.stringToBytesFuncs["UTF-8"] = function(Z) {
1660
- function O(J) {
1661
- for (var U = [], M = 0; M < J.length; M++) {
1662
- var x = J.charCodeAt(M);
1663
- x < 128 ? U.push(x) : x < 2048 ? U.push(
1724
+ ee.stringToBytesFuncs["UTF-8"] = function(W) {
1725
+ function q(X) {
1726
+ for (var F = [], M = 0; M < X.length; M++) {
1727
+ var x = X.charCodeAt(M);
1728
+ x < 128 ? F.push(x) : x < 2048 ? F.push(
1664
1729
  192 | x >> 6,
1665
1730
  128 | x & 63
1666
- ) : x < 55296 || x >= 57344 ? U.push(
1731
+ ) : x < 55296 || x >= 57344 ? F.push(
1667
1732
  224 | x >> 12,
1668
1733
  128 | x >> 6 & 63,
1669
1734
  128 | x & 63
1670
- ) : (M++, x = 65536 + ((x & 1023) << 10 | J.charCodeAt(M) & 1023), U.push(
1735
+ ) : (M++, x = 65536 + ((x & 1023) << 10 | X.charCodeAt(M) & 1023), F.push(
1671
1736
  240 | x >> 18,
1672
1737
  128 | x >> 12 & 63,
1673
1738
  128 | x >> 6 & 63,
1674
1739
  128 | x & 63
1675
1740
  ));
1676
1741
  }
1677
- return U;
1742
+ return F;
1678
1743
  }
1679
- return O(Z);
1744
+ return q(W);
1680
1745
  };
1681
- })(), function(Z) {
1682
- V.exports = Z();
1746
+ })(), function(W) {
1747
+ j.exports = W();
1683
1748
  }(function() {
1684
- return ie;
1749
+ return ee;
1685
1750
  });
1686
- }(vt)), vt.exports;
1751
+ }(dt)), dt.exports;
1687
1752
  }
1688
- var kt;
1689
- function Hr() {
1690
- if (kt) return Te;
1691
- kt = 1;
1692
- var V = Te && Te.__extends || /* @__PURE__ */ function() {
1693
- var U = function(M, x) {
1694
- return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, A) {
1695
- d.__proto__ = A;
1696
- } || function(d, A) {
1697
- for (var C in A) Object.prototype.hasOwnProperty.call(A, C) && (d[C] = A[C]);
1698
- }, U(M, x);
1753
+ var Nt;
1754
+ function Qr() {
1755
+ if (Nt) return Ce;
1756
+ Nt = 1;
1757
+ var j = Ce && Ce.__extends || /* @__PURE__ */ function() {
1758
+ var F = function(M, x) {
1759
+ return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(g, m) {
1760
+ g.__proto__ = m;
1761
+ } || function(g, m) {
1762
+ for (var T in m) Object.prototype.hasOwnProperty.call(m, T) && (g[T] = m[T]);
1763
+ }, F(M, x);
1699
1764
  };
1700
1765
  return function(M, x) {
1701
1766
  if (typeof x != "function" && x !== null)
1702
1767
  throw new TypeError("Class extends value " + String(x) + " is not a constructor or null");
1703
- U(M, x);
1704
- function d() {
1768
+ F(M, x);
1769
+ function g() {
1705
1770
  this.constructor = M;
1706
1771
  }
1707
- M.prototype = x === null ? Object.create(x) : (d.prototype = x.prototype, new d());
1772
+ M.prototype = x === null ? Object.create(x) : (g.prototype = x.prototype, new g());
1708
1773
  };
1709
- }(), X = Te && Te.__assign || function() {
1710
- return X = Object.assign || function(U) {
1711
- for (var M, x = 1, d = arguments.length; x < d; x++) {
1774
+ }(), Y = Ce && Ce.__assign || function() {
1775
+ return Y = Object.assign || function(F) {
1776
+ for (var M, x = 1, g = arguments.length; x < g; x++) {
1712
1777
  M = arguments[x];
1713
- for (var A in M) Object.prototype.hasOwnProperty.call(M, A) && (U[A] = M[A]);
1778
+ for (var m in M) Object.prototype.hasOwnProperty.call(M, m) && (F[m] = M[m]);
1714
1779
  }
1715
- return U;
1716
- }, X.apply(this, arguments);
1780
+ return F;
1781
+ }, Y.apply(this, arguments);
1717
1782
  };
1718
- Object.defineProperty(Te, "__esModule", { value: !0 }), Te.QRCode = void 0;
1719
- var ie = $r(), Z = Fr(), O = Bt, J = (
1783
+ Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.QRCode = void 0;
1784
+ var ee = Hr(), W = Gr(), q = Ot, X = (
1720
1785
  /** @class */
1721
- function(U) {
1722
- V(M, U);
1786
+ function(F) {
1787
+ j(M, F);
1723
1788
  function M(x) {
1724
- var d = U.call(this, x) || this;
1725
- return d.canvasRef = O.createRef(), d;
1789
+ var g = F.call(this, x) || this;
1790
+ return g.canvasRef = q.createRef(), g;
1726
1791
  }
1727
- return M.prototype.download = function(x, d) {
1792
+ return M.prototype.download = function(x, g) {
1728
1793
  if (this.canvasRef.current) {
1729
- var A = void 0;
1794
+ var m = void 0;
1730
1795
  switch (x) {
1731
1796
  case "jpg":
1732
- A = "image/jpeg";
1797
+ m = "image/jpeg";
1733
1798
  break;
1734
1799
  case "webp":
1735
- A = "image/webp";
1800
+ m = "image/webp";
1736
1801
  break;
1737
1802
  case "png":
1738
1803
  default:
1739
- A = "image/png";
1804
+ m = "image/png";
1740
1805
  break;
1741
1806
  }
1742
- var C = this.canvasRef.current.toDataURL(A, 1), j = document.createElement("a");
1743
- j.download = d ?? "react-qrcode-logo", j.href = C, j.click();
1807
+ var T = this.canvasRef.current.toDataURL(m, 1), $ = document.createElement("a");
1808
+ $.download = g ?? "react-qrcode-logo", $.href = T, $.click();
1744
1809
  }
1745
1810
  }, M.prototype.utf16to8 = function(x) {
1746
- var d = "", A, C, j = x.length;
1747
- for (A = 0; A < j; A++)
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));
1749
- return d;
1750
- }, M.prototype.drawRoundedSquare = function(x, d, A, C, j, D, H, q) {
1751
- q.lineWidth = x, q.fillStyle = j, q.strokeStyle = j, 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;
1811
+ var g = "", m, T, $ = x.length;
1812
+ for (m = 0; m < $; m++)
1813
+ T = x.charCodeAt(m), T >= 1 && T <= 127 ? g += x.charAt(m) : T > 2047 ? (g += String.fromCharCode(224 | T >> 12 & 15), g += String.fromCharCode(128 | T >> 6 & 63), g += String.fromCharCode(128 | T >> 0 & 63)) : (g += String.fromCharCode(192 | T >> 6 & 31), g += String.fromCharCode(128 | T >> 0 & 63));
1814
+ return g;
1815
+ }, M.prototype.drawRoundedSquare = function(x, g, m, T, $, D, G, k) {
1816
+ k.lineWidth = x, k.fillStyle = $, k.strokeStyle = $, m += x / 2, g += x / 2, T -= x, Array.isArray(D) || (D = [D, D, D, D]), D = D.map(function(O) {
1817
+ return O = Math.min(O, T / 2), O < 0 ? 0 : O;
1753
1818
  });
1754
- var B = D[0] || 0, K = D[1] || 0, Q = D[2] || 0, z = D[3] || 0;
1755
- q.beginPath(), q.moveTo(d + B, A), q.lineTo(d + C - K, A), K && q.quadraticCurveTo(d + C, A, d + C, A + K), q.lineTo(d + C, A + C - Q), Q && q.quadraticCurveTo(d + C, A + C, d + C - Q, 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, j, D, H) {
1757
- H === void 0 && (H = [0, 0, 0, 0]);
1758
- var q = Math.ceil(d), B, K;
1759
- typeof H != "number" && !Array.isArray(H) ? (B = H.outer || 0, K = H.inner || 0) : (B = H, K = B);
1760
- var Q, z;
1761
- typeof D != "string" ? (Q = D.outer, z = D.inner) : (Q = D, z = D);
1762
- var E = C * d + A, u = j * d + A, b = d * 7;
1763
- this.drawRoundedSquare(q, u, E, b, Q, B, !1, x), b = d * 3, E += d * 2, u += d * 2, this.drawRoundedSquare(q, u, E, b, z, K, !0, x);
1764
- }, M.prototype.isInPositioninZone = function(x, d, A) {
1765
- return A.some(function(C) {
1766
- return d >= C.row && d <= C.row + 7 && x >= C.col && x <= C.col + 7;
1819
+ var N = D[0] || 0, K = D[1] || 0, Q = D[2] || 0, J = D[3] || 0;
1820
+ k.beginPath(), k.moveTo(g + N, m), k.lineTo(g + T - K, m), K && k.quadraticCurveTo(g + T, m, g + T, m + K), k.lineTo(g + T, m + T - Q), Q && k.quadraticCurveTo(g + T, m + T, g + T - Q, m + T), k.lineTo(g + J, m + T), J && k.quadraticCurveTo(g, m + T, g, m + T - J), k.lineTo(g, m + N), N && k.quadraticCurveTo(g, m, g + N, m), k.closePath(), k.stroke(), G && k.fill();
1821
+ }, M.prototype.drawPositioningPattern = function(x, g, m, T, $, D, G) {
1822
+ G === void 0 && (G = [0, 0, 0, 0]);
1823
+ var k = Math.ceil(g), N, K;
1824
+ typeof G != "number" && !Array.isArray(G) ? (N = G.outer || 0, K = G.inner || 0) : (N = G, K = N);
1825
+ var Q, J;
1826
+ typeof D != "string" ? (Q = D.outer, J = D.inner) : (Q = D, J = D);
1827
+ var O = T * g + m, p = $ * g + m, b = g * 7;
1828
+ this.drawRoundedSquare(k, p, O, b, Q, N, !1, x), b = g * 3, O += g * 2, p += g * 2, this.drawRoundedSquare(k, p, O, b, J, K, !0, x);
1829
+ }, M.prototype.isInPositioninZone = function(x, g, m) {
1830
+ return m.some(function(T) {
1831
+ return g >= T.row && g <= T.row + 7 && x >= T.col && x <= T.col + 7;
1767
1832
  });
1768
- }, M.prototype.transformPixelLengthIntoNumberOfCells = function(x, d) {
1769
- return x / d;
1770
- }, M.prototype.isCoordinateInImage = function(x, d, A, C, j, D, H, q) {
1771
- if (q) {
1772
- var B = 2, K = this.transformPixelLengthIntoNumberOfCells(j, H), Q = this.transformPixelLengthIntoNumberOfCells(D, H), z = this.transformPixelLengthIntoNumberOfCells(A, H) - 1, E = this.transformPixelLengthIntoNumberOfCells(C, H) - 1;
1773
- return d >= K - B && d <= K + z + B && x >= Q - B && x <= Q + E + B;
1833
+ }, M.prototype.transformPixelLengthIntoNumberOfCells = function(x, g) {
1834
+ return x / g;
1835
+ }, M.prototype.isCoordinateInImage = function(x, g, m, T, $, D, G, k) {
1836
+ if (k) {
1837
+ var N = 2, K = this.transformPixelLengthIntoNumberOfCells($, G), Q = this.transformPixelLengthIntoNumberOfCells(D, G), J = this.transformPixelLengthIntoNumberOfCells(m, G) - 1, O = this.transformPixelLengthIntoNumberOfCells(T, G) - 1;
1838
+ return g >= K - N && g <= K + J + N && x >= Q - N && x <= Q + O + N;
1774
1839
  } else
1775
1840
  return !1;
1776
1841
  }, M.prototype.shouldComponentUpdate = function(x) {
1777
- return !ie(this.props, x);
1842
+ return !ee(this.props, x);
1778
1843
  }, M.prototype.componentDidMount = function() {
1779
1844
  this.update();
1780
1845
  }, M.prototype.componentDidUpdate = function() {
1781
1846
  this.update();
1782
1847
  }, M.prototype.update = function() {
1783
- var x, d = this.props, A = d.value, C = d.ecLevel, j = d.enableCORS, D = d.bgColor, H = d.fgColor, q = d.logoImage, B = d.logoOpacity, K = d.logoOnLoad, Q = d.removeQrCodeBehindLogo, z = d.qrStyle, E = d.eyeRadius, u = d.eyeColor, b = d.logoPaddingStyle, c = +this.props.size, y = +this.props.quietZone, s = this.props.logoWidth ? +this.props.logoWidth : 0, w = this.props.logoHeight ? +this.props.logoHeight : 0, n = this.props.logoPadding ? +this.props.logoPadding : 0, t = Z(0, C);
1784
- t.addData(this.utf16to8(A)), t.make();
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, W = window.devicePixelRatio || 1;
1786
- g.height = g.width = p * W, i.scale(W, W), i.fillStyle = D, i.fillRect(0, 0, p, p);
1787
- var $ = y, re = [
1848
+ var x, g = this.props, m = g.value, T = g.ecLevel, $ = g.enableCORS, D = g.bgColor, G = g.fgColor, k = g.logoImage, N = g.logoOpacity, K = g.logoOnLoad, Q = g.removeQrCodeBehindLogo, J = g.qrStyle, O = g.eyeRadius, p = g.eyeColor, b = g.logoPaddingStyle, d = +this.props.size, w = +this.props.quietZone, a = this.props.logoWidth ? +this.props.logoWidth : 0, s = this.props.logoHeight ? +this.props.logoHeight : 0, n = this.props.logoPadding ? +this.props.logoPadding : 0, t = W(0, T);
1849
+ t.addData(this.utf16to8(m)), t.make();
1850
+ var v = (x = this.canvasRef) === null || x === void 0 ? void 0 : x.current, o = v.getContext("2d"), y = d + 2 * w, R = t.getModuleCount(), C = d / R, Z = window.devicePixelRatio || 1;
1851
+ v.height = v.width = y * Z, o.scale(Z, Z), o.fillStyle = D, o.fillRect(0, 0, y, y);
1852
+ var U = w, ne = [
1788
1853
  { row: 0, col: 0 },
1789
- { row: 0, col: L - 7 },
1790
- { row: L - 7, col: 0 }
1854
+ { row: 0, col: R - 7 },
1855
+ { row: R - 7, col: 0 }
1791
1856
  ];
1792
- if (i.strokeStyle = H, z === "dots") {
1793
- i.fillStyle = H;
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 + $, Math.round(S * T) + oe + $, oe / 100 * 75, 0, 2 * Math.PI, !1), i.closePath(), i.fill());
1797
- } else if (z === "fluid") {
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)) {
1857
+ if (o.strokeStyle = G, J === "dots") {
1858
+ o.fillStyle = G;
1859
+ for (var oe = C / 2, L = 0; L < R; L++)
1860
+ for (var P = 0; P < R; P++)
1861
+ t.isDark(L, P) && !this.isInPositioninZone(L, P, ne) && (o.beginPath(), o.arc(Math.round(P * C) + oe + U, Math.round(L * C) + oe + U, oe / 100 * 75, 0, 2 * Math.PI, !1), o.closePath(), o.fill());
1862
+ } else if (J === "fluid") {
1863
+ for (var oe = Math.ceil(C / 2), L = 0; L < R; L++)
1864
+ for (var P = 0; P < R; P++)
1865
+ if (t.isDark(L, P) && !this.isInPositioninZone(L, P, ne)) {
1801
1866
  var ue = [!1, !1, !1, !1];
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 G = 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 + $, Math.round(S * T) + oe + $, oe, 0, 2 * Math.PI, !1), i.closePath(), i.fill(), ue[0] || i.fillRect(Math.round(k * T) + $, Math.round(S * T) + $, G / 2, se / 2), ue[1] || i.fillRect(Math.round(k * T) + $ + Math.floor(G / 2), Math.round(S * T) + $, G / 2, se / 2), ue[2] || i.fillRect(Math.round(k * T) + $ + Math.floor(G / 2), Math.round(S * T) + $ + Math.floor(se / 2), G / 2, se / 2), ue[3] || i.fillRect(Math.round(k * T) + $, Math.round(S * T) + $ + Math.floor(se / 2), G / 2, se / 2);
1867
+ L > 0 && !t.isDark(L - 1, P) && P > 0 && !t.isDark(L, P - 1) && (ue[0] = !0), L > 0 && !t.isDark(L - 1, P) && P < R - 1 && !t.isDark(L, P + 1) && (ue[1] = !0), L < R - 1 && !t.isDark(L + 1, P) && P < R - 1 && !t.isDark(L, P + 1) && (ue[2] = !0), L < R - 1 && !t.isDark(L + 1, P) && P > 0 && !t.isDark(L, P - 1) && (ue[3] = !0);
1868
+ var V = Math.ceil((P + 1) * C) - Math.floor(P * C), se = Math.ceil((L + 1) * C) - Math.floor(L * C);
1869
+ o.fillStyle = G, o.beginPath(), o.arc(Math.round(P * C) + oe + U, Math.round(L * C) + oe + U, oe, 0, 2 * Math.PI, !1), o.closePath(), o.fill(), ue[0] || o.fillRect(Math.round(P * C) + U, Math.round(L * C) + U, V / 2, se / 2), ue[1] || o.fillRect(Math.round(P * C) + U + Math.floor(V / 2), Math.round(L * C) + U, V / 2, se / 2), ue[2] || o.fillRect(Math.round(P * C) + U + Math.floor(V / 2), Math.round(L * C) + U + Math.floor(se / 2), V / 2, se / 2), ue[3] || o.fillRect(Math.round(P * C) + U, Math.round(L * C) + U + Math.floor(se / 2), V / 2, se / 2);
1805
1870
  }
1806
1871
  } else
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)) {
1810
- i.fillStyle = H;
1811
- var G = 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) + $, Math.round(S * T) + $, G, se);
1872
+ for (var L = 0; L < R; L++)
1873
+ for (var P = 0; P < R; P++)
1874
+ if (t.isDark(L, P) && !this.isInPositioninZone(L, P, ne)) {
1875
+ o.fillStyle = G;
1876
+ var V = Math.ceil((P + 1) * C) - Math.floor(P * C), se = Math.ceil((L + 1) * C) - Math.floor(L * C);
1877
+ o.fillRect(Math.round(P * C) + U, Math.round(L * C) + U, V, se);
1813
1878
  }
1814
1879
  for (var _e = 0; _e < 3; _e++) {
1815
- var o = re[_e], S = o.row, k = o.col, f = E, a = void 0;
1816
- Array.isArray(f) && (f = f[_e]), typeof f == "number" && (f = [f, f, f, f]), u ? Array.isArray(u) ? a = u[_e] : a = u : a = H, this.drawPositioningPattern(i, T, $, S, k, a, f);
1880
+ var f = ne[_e], L = f.row, P = f.col, u = O, i = void 0;
1881
+ Array.isArray(u) && (u = u[_e]), typeof u == "number" && (u = [u, u, u, u]), p ? Array.isArray(p) ? i = p[_e] : i = p : i = G, this.drawPositioningPattern(o, C, U, L, P, i, u);
1817
1882
  }
1818
- if (q) {
1883
+ if (k) {
1819
1884
  var l = new Image();
1820
- j && (l.crossOrigin = "Anonymous"), l.onload = function(h) {
1821
- i.save();
1822
- var _ = s || c * 0.2, R = w || _, I = (c - _) / 2, Y = (c - R) / 2;
1885
+ $ && (l.crossOrigin = "Anonymous"), l.onload = function(h) {
1886
+ o.save();
1887
+ var _ = a || d * 0.2, I = s || _, E = (d - _) / 2, z = (d - I) / 2;
1823
1888
  if (Q || n) {
1824
- i.beginPath(), i.strokeStyle = D, i.fillStyle = D;
1825
- var ee = _ + 2 * n, N = R + 2 * n, le = I + $ - n, ve = Y + $ - n;
1889
+ o.beginPath(), o.strokeStyle = D, o.fillStyle = D;
1890
+ var te = _ + 2 * n, B = I + 2 * n, le = E + U - n, ce = z + U - n;
1826
1891
  if (b === "circle") {
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();
1892
+ var ke = le + te / 2, Be = ce + B / 2;
1893
+ o.ellipse(ke, Be, te / 2, B / 2, 0, 0, 2 * Math.PI), o.stroke(), o.fill();
1829
1894
  } else
1830
- i.fillRect(le, ve, ee, N);
1895
+ o.fillRect(le, ce, te, B);
1831
1896
  }
1832
- i.globalAlpha = B, i.drawImage(l, I + $, Y + $, _, R), i.restore(), K && K(h);
1833
- }, l.src = q;
1897
+ o.globalAlpha = N, o.drawImage(l, E + U, z + U, _, I), o.restore(), K && K(h);
1898
+ }, l.src = k;
1834
1899
  }
1835
1900
  }, M.prototype.render = function() {
1836
- var x, d = +this.props.size + 2 * +this.props.quietZone;
1837
- return O.createElement("canvas", { id: (x = this.props.id) !== null && x !== void 0 ? x : "react-qrcode-logo", height: d, width: d, style: X({ height: d + "px", width: d + "px" }, this.props.style), ref: this.canvasRef });
1901
+ var x, g = +this.props.size + 2 * +this.props.quietZone;
1902
+ return q.createElement("canvas", { id: (x = this.props.id) !== null && x !== void 0 ? x : "react-qrcode-logo", height: g, width: g, style: Y({ height: g + "px", width: g + "px" }, this.props.style), ref: this.canvasRef });
1838
1903
  }, M.defaultProps = {
1839
1904
  value: "https://reactjs.org/",
1840
1905
  ecLevel: "M",
@@ -1848,19 +1913,19 @@ function Hr() {
1848
1913
  eyeRadius: [0, 0, 0],
1849
1914
  logoPaddingStyle: "square"
1850
1915
  }, M;
1851
- }(O.Component)
1916
+ }(q.Component)
1852
1917
  );
1853
- return Te.QRCode = J, Te;
1918
+ return Ce.QRCode = X, Ce;
1854
1919
  }
1855
- var Nt = Hr();
1856
- const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v-justify-center", children: [
1857
- /* @__PURE__ */ P(
1920
+ var qt = Qr();
1921
+ const jt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v-justify-center", children: [
1922
+ /* @__PURE__ */ S(
1858
1923
  "svg",
1859
1924
  {
1860
1925
  className: "v-h-16 v-w-16 v-animate-circular-rotate",
1861
1926
  viewBox: "25 25 50 50",
1862
1927
  xmlns: "http://www.w3.org/2000/svg",
1863
- children: /* @__PURE__ */ P(
1928
+ children: /* @__PURE__ */ S(
1864
1929
  "circle",
1865
1930
  {
1866
1931
  className: "v-circular-path",
@@ -1873,7 +1938,7 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
1873
1938
  )
1874
1939
  }
1875
1940
  ),
1876
- /* @__PURE__ */ P("style", { children: `
1941
+ /* @__PURE__ */ S("style", { children: `
1877
1942
  @keyframes v-circular-rotate {
1878
1943
  100% {
1879
1944
  transform: rotate(360deg);
@@ -1905,84 +1970,84 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
1905
1970
  animation: v-circular-dash 1.4s ease-in-out infinite;
1906
1971
  }
1907
1972
  ` })
1908
- ] }), Kr = ({
1909
- title: V,
1910
- containerClass: X
1973
+ ] }), Zr = ({
1974
+ title: j,
1975
+ containerClass: Y
1911
1976
  }) => {
1912
- const ie = (/* @__PURE__ */ new Date()).getFullYear(), [Z, O] = ge(""), [J, U] = ge(""), [M, x] = ge(!1), {
1913
- apiUrl: d,
1914
- clientId: A,
1915
- codeChallenge: C,
1916
- authRequestId: j,
1977
+ const ee = (/* @__PURE__ */ new Date()).getFullYear(), [W, q] = ge(""), [X, F] = ge(""), [M, x] = ge(!1), {
1978
+ apiUrl: g,
1979
+ clientId: m,
1980
+ codeChallenge: T,
1981
+ authRequestId: $,
1917
1982
  authRequestIdExpires: D,
1918
- setIsAuthenticating: H,
1919
- isAuthenticating: q,
1920
- token: B,
1983
+ setIsAuthenticating: G,
1984
+ isAuthenticating: k,
1985
+ token: N,
1921
1986
  setAuthError: K
1922
- } = Ke(qe);
1923
- Ve(() => {
1924
- if (C && j && D) {
1925
- const E = D.getTime() / 1e3, u = `c=${C},r=${j},e=${E},a=${A}`;
1926
- U(u);
1927
- }
1928
- }, [A, j, D, C]);
1929
- const Q = Oe(
1930
- async (E) => {
1987
+ } = Ze($e);
1988
+ je(() => {
1989
+ if (T && $ && D) {
1990
+ const O = D.getTime() / 1e3, p = `c=${T},r=${$},e=${O},a=${m}`;
1991
+ F(p);
1992
+ }
1993
+ }, [m, $, D, T]);
1994
+ const Q = Ie(
1995
+ async (O) => {
1931
1996
  try {
1932
- const u = await fetch(
1933
- `${d}/v-plus/auth/req?cid=${A}`,
1997
+ const p = await fetch(
1998
+ `${g}/v-plus/auth/req?cid=${m}`,
1934
1999
  {
1935
2000
  method: "POST",
1936
2001
  headers: {
1937
2002
  Accept: "application/json",
1938
2003
  "Content-Type": "application/json"
1939
2004
  },
1940
- body: JSON.stringify(E)
2005
+ body: JSON.stringify(O)
1941
2006
  }
1942
- ), b = await u.json();
1943
- if (!u.ok || b.ok === !1) {
2007
+ ), b = await p.json();
2008
+ if (!p.ok || b.ok === !1) {
1944
2009
  K(
1945
- `Auth request failed: ${b.message || u.status}`
2010
+ `Auth request failed: ${b.message || p.status}`
1946
2011
  );
1947
2012
  return;
1948
2013
  }
1949
2014
  return b;
1950
- } catch (u) {
1951
- K(`Auth request failed: ${u}`);
2015
+ } catch (p) {
2016
+ K(`Auth request failed: ${p}`);
1952
2017
  }
1953
2018
  },
1954
- [d, A, K]
1955
- ), z = Oe(async () => {
2019
+ [g, m, K]
2020
+ ), J = Ie(async () => {
1956
2021
  x(!0);
1957
2022
  try {
1958
- if (!Z) {
2023
+ if (!W) {
1959
2024
  K("Invalid login. Email or Abaxx ID is required.");
1960
2025
  return;
1961
2026
  }
1962
- const E = await Q({
1963
- alias: Z,
1964
- code_challenge: C,
1965
- request_id: j
2027
+ const O = await Q({
2028
+ alias: W,
2029
+ code_challenge: T,
2030
+ request_id: $
1966
2031
  });
1967
- E != null && E.ok ? H(!0) : !(E != null && E.ok) && (E == null ? void 0 : E.message) === "Unable to request auth." && K("Invalid login. Please use your existing Email or Abaxx ID.");
1968
- } catch (E) {
1969
- K("Something went wrong. Please try again later."), console.error(E);
2032
+ O != null && O.ok ? G(!0) : !(O != null && O.ok) && (O == null ? void 0 : O.message) === "Unable to request auth." && K("Invalid login. Please use your existing Email or Abaxx ID.");
2033
+ } catch (O) {
2034
+ K("Something went wrong. Please try again later."), console.error(O);
1970
2035
  }
1971
2036
  x(!1);
1972
- }, [C, j, Z, x, H, Q, K]);
1973
- return /* @__PURE__ */ P(Ge, { children: /* @__PURE__ */ he(
2037
+ }, [T, $, W, x, G, Q, K]);
2038
+ return /* @__PURE__ */ S(We, { children: /* @__PURE__ */ he(
1974
2039
  "div",
1975
2040
  {
1976
- className: `v-auth-container v-grid v-grid-responsive v-h-screen v-bg-white ${X}`,
2041
+ className: `v-auth-container v-grid v-grid-responsive v-h-screen v-bg-white ${Y}`,
1977
2042
  children: [
1978
- /* @__PURE__ */ P(
2043
+ /* @__PURE__ */ S(
1979
2044
  "div",
1980
2045
  {
1981
2046
  className: "v-relative v-bg-left v-bg-cover v-bg-no-repeat v-h-full",
1982
2047
  style: {
1983
2048
  backgroundImage: "url('https://content.abaxx.com/assets/static/email-bg-1.png')"
1984
2049
  },
1985
- children: /* @__PURE__ */ P(
2050
+ children: /* @__PURE__ */ S(
1986
2051
  "div",
1987
2052
  {
1988
2053
  className: "divider v-h-full v-absolute v-bg-white",
@@ -1992,7 +2057,7 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
1992
2057
  }
1993
2058
  ),
1994
2059
  /* @__PURE__ */ he("div", { className: "v-flex v-flex-col v-items-center v-justify-center v-px-4", children: [
1995
- /* @__PURE__ */ P(
2060
+ /* @__PURE__ */ S(
1996
2061
  "img",
1997
2062
  {
1998
2063
  src: "https://content.abaxx.com/assets/static/abaxx-logo.png",
@@ -2002,11 +2067,11 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2002
2067
  height: 56
2003
2068
  }
2004
2069
  ),
2005
- !B && !q ? /* @__PURE__ */ he(Ge, { children: [
2006
- /* @__PURE__ */ P("div", { className: "v-mb-8", children: j && J ? /* @__PURE__ */ P(
2007
- Nt.QRCode,
2070
+ !N && !k ? /* @__PURE__ */ he(We, { children: [
2071
+ /* @__PURE__ */ S("div", { className: "v-mb-8", children: $ && X ? /* @__PURE__ */ S(
2072
+ qt.QRCode,
2008
2073
  {
2009
- value: J,
2074
+ value: X,
2010
2075
  size: 130,
2011
2076
  fgColor: "#e60100",
2012
2077
  qrStyle: "dots",
@@ -2015,18 +2080,18 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2015
2080
  logoHeight: 20,
2016
2081
  quietZone: 0
2017
2082
  }
2018
- ) : /* @__PURE__ */ P("div", { className: "v-w-130 v-h-130 v-flex v-items-center v-justify-center", children: /* @__PURE__ */ P(Ot, {}) }) }),
2019
- /* @__PURE__ */ P("h1", { className: "v-text-black v-text-xl v-tracking-wide v-mb-4 v-font-medium", children: V || "Verifier+ Login" }),
2020
- /* @__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" }),
2083
+ ) : /* @__PURE__ */ S("div", { className: "v-w-130 v-h-130 v-flex v-items-center v-justify-center", children: /* @__PURE__ */ S(jt, {}) }) }),
2084
+ /* @__PURE__ */ S("h1", { className: "v-text-black v-text-xl v-tracking-wide v-mb-4 v-font-medium", children: j || "Verifier+ Login" }),
2085
+ /* @__PURE__ */ S("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" }),
2021
2086
  /* @__PURE__ */ he("div", { className: "v-min-w-300", children: [
2022
- /* @__PURE__ */ P(
2087
+ /* @__PURE__ */ S(
2023
2088
  "input",
2024
2089
  {
2025
2090
  type: "text",
2026
2091
  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",
2027
2092
  placeholder: "Enter Email or Abaxx ID",
2028
- value: Z,
2029
- onChange: (E) => O(E.target.value),
2093
+ value: W,
2094
+ onChange: (O) => q(O.target.value),
2030
2095
  disabled: M
2031
2096
  }
2032
2097
  ),
@@ -2034,10 +2099,10 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2034
2099
  "button",
2035
2100
  {
2036
2101
  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",
2037
- disabled: M || !Z || !j,
2038
- onClick: z,
2102
+ disabled: M || !W || !$,
2103
+ onClick: J,
2039
2104
  children: [
2040
- M && /* @__PURE__ */ P(
2105
+ M && /* @__PURE__ */ S(
2041
2106
  "svg",
2042
2107
  {
2043
2108
  xmlns: "http://www.w3.org/2000/svg",
@@ -2050,7 +2115,7 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2050
2115
  strokeLinecap: "round",
2051
2116
  strokeLinejoin: "round",
2052
2117
  className: "v-h-4 v-w-4 v-animate-spin",
2053
- children: /* @__PURE__ */ P("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
2118
+ children: /* @__PURE__ */ S("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
2054
2119
  }
2055
2120
  ),
2056
2121
  "Sign In"
@@ -2059,7 +2124,7 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2059
2124
  )
2060
2125
  ] })
2061
2126
  ] }) : /* @__PURE__ */ he("div", { className: "v-fade-in v-flex v-items-center v-flex-col", children: [
2062
- /* @__PURE__ */ P(
2127
+ /* @__PURE__ */ S(
2063
2128
  "svg",
2064
2129
  {
2065
2130
  xmlns: "http://www.w3.org/2000/svg",
@@ -2072,17 +2137,17 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2072
2137
  strokeLinecap: "round",
2073
2138
  strokeLinejoin: "round",
2074
2139
  className: "v-mb-5 v-w-20 v-h-20",
2075
- children: /* @__PURE__ */ P("path", { d: "M20 6 9 17l-5-5" })
2140
+ children: /* @__PURE__ */ S("path", { d: "M20 6 9 17l-5-5" })
2076
2141
  }
2077
2142
  ),
2078
- B ? /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Ge, { children: [
2079
- /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Authorization requested!" }) }),
2080
- /* @__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" }) })
2143
+ N ? /* @__PURE__ */ S("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ S("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(We, { children: [
2144
+ /* @__PURE__ */ S("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ S("span", { children: "Authorization requested!" }) }),
2145
+ /* @__PURE__ */ S("div", { className: "v-text-center v-rounded v-bg-slate-100 v-text-slate-800 v-p-3 v-my-4", children: /* @__PURE__ */ S("span", { children: "Please check the Abaxx Verifier App" }) })
2081
2146
  ] })
2082
2147
  ] }),
2083
2148
  /* @__PURE__ */ he("div", { className: "v-text-center v-text-sm v-p-6 v-font-semibold", children: [
2084
- /* @__PURE__ */ P("span", { className: "v-text-gray-400", children: `© ${ie} ` }),
2085
- /* @__PURE__ */ P("span", { className: "v-text-gray-800", children: "Abaxx Technologies" }),
2149
+ /* @__PURE__ */ S("span", { className: "v-text-gray-400", children: `© ${ee} ` }),
2150
+ /* @__PURE__ */ S("span", { className: "v-text-gray-800", children: "Abaxx Technologies" }),
2086
2151
  /* @__PURE__ */ he("span", { className: "v-text-gray-400", children: [
2087
2152
  " ",
2088
2153
  "| All rights reserved"
@@ -2092,51 +2157,51 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2092
2157
  ]
2093
2158
  }
2094
2159
  ) });
2095
- }, Wr = ({
2096
- size: V = 130,
2097
- qrColor: X = "#e60100",
2098
- logoImage: ie = "https://content.abaxx.com/assets/static/qr-logo.png",
2099
- logoWidth: Z = 40,
2100
- logoHeight: O = 20,
2101
- quietZone: J = 0,
2102
- containerClass: U = "",
2160
+ }, Jr = ({
2161
+ size: j = 130,
2162
+ qrColor: Y = "#e60100",
2163
+ logoImage: ee = "https://content.abaxx.com/assets/static/qr-logo.png",
2164
+ logoWidth: W = 40,
2165
+ logoHeight: q = 20,
2166
+ quietZone: X = 0,
2167
+ containerClass: F = "",
2103
2168
  showStatus: M = !0,
2104
2169
  checkmarkColor: x = "#c40808"
2105
2170
  }) => {
2106
- const [d, A] = ge(""), {
2107
- clientId: C,
2108
- codeChallenge: j,
2171
+ const [g, m] = ge(""), {
2172
+ clientId: T,
2173
+ codeChallenge: $,
2109
2174
  authRequestId: D,
2110
- authRequestIdExpires: H,
2111
- isAuthenticating: q,
2112
- token: B
2113
- } = Ke(qe);
2114
- return Ve(() => {
2115
- if (j && D && H) {
2116
- const K = H.getTime() / 1e3, Q = `c=${j},r=${D},e=${K},a=${C}`;
2117
- A(Q);
2118
- }
2119
- }, [C, D, H, j]), /* @__PURE__ */ P("div", { className: `v-auth-qr-container ${U}`, children: !B && !q ? /* @__PURE__ */ P("div", { className: "v-qr-wrapper", children: D && d ? /* @__PURE__ */ P(
2120
- Nt.QRCode,
2175
+ authRequestIdExpires: G,
2176
+ isAuthenticating: k,
2177
+ token: N
2178
+ } = Ze($e);
2179
+ return je(() => {
2180
+ if ($ && D && G) {
2181
+ const K = G.getTime() / 1e3, Q = `c=${$},r=${D},e=${K},a=${T}`;
2182
+ m(Q);
2183
+ }
2184
+ }, [T, D, G, $]), /* @__PURE__ */ S("div", { className: `v-auth-qr-container ${F}`, children: !N && !k ? /* @__PURE__ */ S("div", { className: "v-qr-wrapper", children: D && g ? /* @__PURE__ */ S(
2185
+ qt.QRCode,
2121
2186
  {
2122
- value: d,
2123
- size: V,
2124
- fgColor: X,
2187
+ value: g,
2188
+ size: j,
2189
+ fgColor: Y,
2125
2190
  qrStyle: "dots",
2126
- logoImage: ie,
2127
- logoWidth: Z,
2128
- logoHeight: O,
2129
- quietZone: J
2191
+ logoImage: ee,
2192
+ logoWidth: W,
2193
+ logoHeight: q,
2194
+ quietZone: X
2130
2195
  }
2131
- ) : /* @__PURE__ */ P(
2196
+ ) : /* @__PURE__ */ S(
2132
2197
  "div",
2133
2198
  {
2134
2199
  className: "v-flex v-items-center v-justify-center",
2135
- style: { width: V, height: V },
2136
- children: /* @__PURE__ */ P(Ot, {})
2200
+ style: { width: j, height: j },
2201
+ children: /* @__PURE__ */ S(jt, {})
2137
2202
  }
2138
2203
  ) }) : M ? /* @__PURE__ */ he("div", { className: "v-fade-in v-flex v-items-center v-flex-col", children: [
2139
- /* @__PURE__ */ P(
2204
+ /* @__PURE__ */ S(
2140
2205
  "svg",
2141
2206
  {
2142
2207
  xmlns: "http://www.w3.org/2000/svg",
@@ -2149,40 +2214,40 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2149
2214
  strokeLinecap: "round",
2150
2215
  strokeLinejoin: "round",
2151
2216
  className: "v-mb-5",
2152
- style: { width: V * 0.6, height: V * 0.6 },
2153
- children: /* @__PURE__ */ P("path", { d: "M20 6 9 17l-5-5" })
2217
+ style: { width: j * 0.6, height: j * 0.6 },
2218
+ children: /* @__PURE__ */ S("path", { d: "M20 6 9 17l-5-5" })
2154
2219
  }
2155
2220
  ),
2156
- B ? /* @__PURE__ */ P("div", { className: "v-text-lg v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Ge, { children: [
2157
- /* @__PURE__ */ P("div", { className: "v-text-lg v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Authorization requested!" }) }),
2158
- /* @__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" }) })
2221
+ N ? /* @__PURE__ */ S("div", { className: "v-text-lg v-mb-3 v-text-black", children: /* @__PURE__ */ S("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(We, { children: [
2222
+ /* @__PURE__ */ S("div", { className: "v-text-lg v-mb-3 v-text-black", children: /* @__PURE__ */ S("span", { children: "Authorization requested!" }) }),
2223
+ /* @__PURE__ */ S("div", { className: "v-text-center v-rounded v-bg-slate-100 v-text-slate-800 v-p-3 v-my-4", children: /* @__PURE__ */ S("span", { children: "Please check the Abaxx Verifier App" }) })
2159
2224
  ] })
2160
2225
  ] }) : null });
2161
- }, Zr = ({
2162
- inputPlaceholder: V = "Enter Email or Abaxx ID",
2163
- buttonText: X = "Sign In",
2164
- inputHeight: ie = "v-h-10",
2165
- inputWidth: Z = "v-w-full",
2166
- inputTextColor: O = "v-text-gray-600",
2167
- inputBorderColor: J = "v-border-gray-400",
2168
- inputBackgroundColor: U = "v-bg-transparent",
2226
+ }, Yr = ({
2227
+ inputPlaceholder: j = "Enter Email or Abaxx ID",
2228
+ buttonText: Y = "Sign In",
2229
+ inputHeight: ee = "v-h-10",
2230
+ inputWidth: W = "v-w-full",
2231
+ inputTextColor: q = "v-text-gray-600",
2232
+ inputBorderColor: X = "v-border-gray-400",
2233
+ inputBackgroundColor: F = "v-bg-transparent",
2169
2234
  buttonHeight: M = "v-h-10",
2170
2235
  buttonWidth: x = "v-w-full",
2171
- buttonBackgroundColor: d = "v-bg-red",
2172
- buttonTextColor: A = "v-text-white",
2173
- containerClass: C = "",
2174
- checkmarkColor: j = "#c40808"
2236
+ buttonBackgroundColor: g = "v-bg-red",
2237
+ buttonTextColor: m = "v-text-white",
2238
+ containerClass: T = "",
2239
+ checkmarkColor: $ = "#c40808"
2175
2240
  }) => {
2176
- const [D, H] = ge(""), [q, B] = ge(!1), {
2241
+ const [D, G] = ge(""), [k, N] = ge(!1), {
2177
2242
  apiUrl: K,
2178
2243
  clientId: Q,
2179
- codeChallenge: z,
2180
- authRequestId: E,
2181
- setIsAuthenticating: u,
2244
+ codeChallenge: J,
2245
+ authRequestId: O,
2246
+ setIsAuthenticating: p,
2182
2247
  setAuthError: b,
2183
- isAuthenticating: c,
2184
- token: y
2185
- } = Ke(qe), s = Oe(
2248
+ isAuthenticating: d,
2249
+ token: w
2250
+ } = Ze($e), a = Ie(
2186
2251
  async (n) => {
2187
2252
  try {
2188
2253
  const t = await fetch(
@@ -2195,52 +2260,52 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2195
2260
  },
2196
2261
  body: JSON.stringify(n)
2197
2262
  }
2198
- ), g = await t.json();
2199
- if (!t.ok || g.ok === !1) {
2263
+ ), v = await t.json();
2264
+ if (!t.ok || v.ok === !1) {
2200
2265
  b(
2201
- `Auth request failed: ${g.message || t.status}`
2266
+ `Auth request failed: ${v.message || t.status}`
2202
2267
  );
2203
2268
  return;
2204
2269
  }
2205
- return g;
2270
+ return v;
2206
2271
  } catch (t) {
2207
2272
  b(`Auth request failed: ${t}`);
2208
2273
  }
2209
2274
  },
2210
2275
  [K, Q, b]
2211
- ), w = Oe(async () => {
2212
- B(!0);
2276
+ ), s = Ie(async () => {
2277
+ N(!0);
2213
2278
  try {
2214
2279
  if (!D) {
2215
2280
  b("Invalid login. Email or Abaxx ID is required.");
2216
2281
  return;
2217
2282
  }
2218
- const n = await s({
2283
+ const n = await a({
2219
2284
  alias: D,
2220
- code_challenge: z,
2221
- request_id: E
2285
+ code_challenge: J,
2286
+ request_id: O
2222
2287
  });
2223
- n != null && n.ok ? u(!0) : !(n != null && n.ok) && (n == null ? void 0 : n.message) === "Unable to request auth." && b("Invalid login. Please use your existing Email or Abaxx ID.");
2288
+ n != null && n.ok ? p(!0) : !(n != null && n.ok) && (n == null ? void 0 : n.message) === "Unable to request auth." && b("Invalid login. Please use your existing Email or Abaxx ID.");
2224
2289
  } catch (n) {
2225
2290
  b("Something went wrong. Please try again later."), console.error(n);
2226
2291
  }
2227
- B(!1);
2228
- }, [z, E, D, B, u, s, b]);
2229
- return /* @__PURE__ */ P("div", { className: `v-auth-email-container ${C}`, children: !y && !c ? /* @__PURE__ */ he("div", { className: "v-min-w-300", children: [
2230
- /* @__PURE__ */ P(
2292
+ N(!1);
2293
+ }, [J, O, D, N, p, a, b]);
2294
+ return /* @__PURE__ */ S("div", { className: `v-auth-email-container ${T}`, children: !w && !d ? /* @__PURE__ */ he("div", { className: "v-min-w-300", children: [
2295
+ /* @__PURE__ */ S(
2231
2296
  "input",
2232
2297
  {
2233
2298
  type: "text",
2234
- className: `v-input ${Z} ${ie} v-mb-4 v-rounded v-border v-px-2 v-text-center`,
2299
+ className: `v-input ${W} ${ee} v-mb-4 v-rounded v-border v-px-2 v-text-center`,
2235
2300
  style: {
2236
- backgroundColor: U.startsWith("#") ? U : U === "v-bg-transparent" ? "transparent" : U === "v-bg-white" ? "#ffffff" : "transparent",
2237
- color: O.startsWith("#") ? O : O === "v-text-gray-600" ? "#6b7280" : O === "v-text-black" ? "#000000" : O === "v-text-white" ? "#ffffff" : "#6b7280",
2238
- borderColor: J.startsWith("#") ? J : J === "v-border-gray-400" ? "#9ca3af" : J === "v-border-blue-400" ? "#60a5fa" : "#9ca3af"
2301
+ backgroundColor: F.startsWith("#") ? F : F === "v-bg-transparent" ? "transparent" : F === "v-bg-white" ? "#ffffff" : "transparent",
2302
+ color: q.startsWith("#") ? q : q === "v-text-gray-600" ? "#6b7280" : q === "v-text-black" ? "#000000" : q === "v-text-white" ? "#ffffff" : "#6b7280",
2303
+ borderColor: X.startsWith("#") ? X : X === "v-border-gray-400" ? "#9ca3af" : X === "v-border-blue-400" ? "#60a5fa" : "#9ca3af"
2239
2304
  },
2240
- placeholder: V,
2305
+ placeholder: j,
2241
2306
  value: D,
2242
- onChange: (n) => H(n.target.value),
2243
- disabled: q
2307
+ onChange: (n) => G(n.target.value),
2308
+ disabled: k
2244
2309
  }
2245
2310
  ),
2246
2311
  /* @__PURE__ */ he(
@@ -2248,13 +2313,13 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2248
2313
  {
2249
2314
  className: `v-button ${M} ${x} v-text-base v-font-semibold v-flex v-items-center v-gap-2 v-justify-center`,
2250
2315
  style: {
2251
- 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",
2252
- color: A.startsWith("#") ? A : A === "v-text-white" ? "#ffffff" : A === "v-text-black" ? "#000000" : A === "v-text-gray-600" ? "#6b7280" : "#ffffff"
2316
+ backgroundColor: g.startsWith("#") ? g : g === "v-bg-blue" ? "#3b82f6" : g === "v-bg-red" ? "#ef4444" : g === "v-bg-green" ? "#10b981" : g === "v-bg-purple" ? "#8b5cf6" : g === "v-bg-yellow" ? "#f59e0b" : g === "v-bg-gray" ? "#6b7280" : "#ef4444",
2317
+ color: m.startsWith("#") ? m : m === "v-text-white" ? "#ffffff" : m === "v-text-black" ? "#000000" : m === "v-text-gray-600" ? "#6b7280" : "#ffffff"
2253
2318
  },
2254
- disabled: q || !D || !E,
2255
- onClick: w,
2319
+ disabled: k || !D || !O,
2320
+ onClick: s,
2256
2321
  children: [
2257
- q && /* @__PURE__ */ P(
2322
+ k && /* @__PURE__ */ S(
2258
2323
  "svg",
2259
2324
  {
2260
2325
  xmlns: "http://www.w3.org/2000/svg",
@@ -2262,20 +2327,20 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2262
2327
  height: "24",
2263
2328
  viewBox: "0 0 24 24",
2264
2329
  fill: "none",
2265
- stroke: j,
2330
+ stroke: $,
2266
2331
  strokeWidth: "2",
2267
2332
  strokeLinecap: "round",
2268
2333
  strokeLinejoin: "round",
2269
2334
  className: "v-h-4 v-w-4 v-animate-spin",
2270
- children: /* @__PURE__ */ P("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
2335
+ children: /* @__PURE__ */ S("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
2271
2336
  }
2272
2337
  ),
2273
- X
2338
+ Y
2274
2339
  ]
2275
2340
  }
2276
2341
  )
2277
2342
  ] }) : /* @__PURE__ */ he("div", { className: "v-fade-in v-flex v-items-center v-flex-col", children: [
2278
- /* @__PURE__ */ P(
2343
+ /* @__PURE__ */ S(
2279
2344
  "svg",
2280
2345
  {
2281
2346
  xmlns: "http://www.w3.org/2000/svg",
@@ -2283,34 +2348,36 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2283
2348
  height: "24",
2284
2349
  viewBox: "0 0 24 24",
2285
2350
  fill: "none",
2286
- stroke: j,
2351
+ stroke: $,
2287
2352
  strokeWidth: "2",
2288
2353
  strokeLinecap: "round",
2289
2354
  strokeLinejoin: "round",
2290
2355
  className: "v-mb-5 v-w-20 v-h-20",
2291
- children: /* @__PURE__ */ P("path", { d: "M20 6 9 17l-5-5" })
2356
+ children: /* @__PURE__ */ S("path", { d: "M20 6 9 17l-5-5" })
2292
2357
  }
2293
2358
  ),
2294
- y ? /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Ge, { children: [
2295
- /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Authorization requested!" }) }),
2296
- /* @__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" }) })
2359
+ w ? /* @__PURE__ */ S("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ S("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(We, { children: [
2360
+ /* @__PURE__ */ S("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ S("span", { children: "Authorization requested!" }) }),
2361
+ /* @__PURE__ */ S("div", { className: "v-text-center v-rounded v-bg-slate-100 v-text-slate-800 v-p-3 v-my-4", children: /* @__PURE__ */ S("span", { children: "Please check the Abaxx Verifier App" }) })
2297
2362
  ] })
2298
2363
  ] }) });
2299
2364
  };
2300
- function Jr() {
2301
- const { resetState: V } = Ke(qe);
2302
- return V;
2365
+ function Xr() {
2366
+ const { resetState: j } = Ze($e);
2367
+ return j;
2303
2368
  }
2304
- function Yr(V) {
2305
- V.resetState();
2369
+ function zr(j) {
2370
+ j.resetState();
2306
2371
  }
2307
2372
  export {
2308
- qe as VContext,
2309
- qr as VContextProvider,
2310
- Kr as VerifierAuth,
2311
- Zr as VerifierAuthEmail,
2312
- Wr as VerifierAuthQr,
2313
- Vr as VerifierProvider,
2314
- Yr as resetVerifierStateUnsafe,
2315
- Jr as useVerifierReset
2373
+ $e as VContext,
2374
+ $r as VContextProvider,
2375
+ Zr as VerifierAuth,
2376
+ Yr as VerifierAuthEmail,
2377
+ Jr as VerifierAuthQr,
2378
+ Wr as VerifierProvider,
2379
+ Pt as base64urlEncode,
2380
+ Fr as generateCodeVerifier,
2381
+ zr as resetVerifierStateUnsafe,
2382
+ Xr as useVerifierReset
2316
2383
  };