@prosopo/procaptcha-bundle 2.2.2 → 2.3.1

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,59 +1,13 @@
1
- import { H as ue, I as ce, J as le, K as fe, e as j, _ as Y, M as _, r as d, N as V, O as de, Q as ge, S as pe, q as X, T as he, U as me, V as ve, X as fn, Y as dn, Z as gn, $ as pn, a0 as hn, a1 as mn, a2 as vn, a3 as bn, l as be, d as we, a as ye, j as L } from "./index-B27PXNfK.js";
2
- const wn = (t) => new Promise((e) => setTimeout(e, t));
3
- function yn(t) {
4
- return ue(ce(t));
1
+ import { u as oe, _ as J, v as K, r as d, w as G, x as ae, y as ie, z as se, i as V, B as ue, D as ce, E as le, F as nn, T as tn, G as rn, H as on, I as an, J as sn, K as un, M as cn, s as fe, t as de, d as ge, j as T } from "./index-43V4q4_w.js";
2
+ import { q as pe } from "./hash-B8OCn-ev.js";
3
+ const fn = (t) => new Promise((e) => setTimeout(e, t));
4
+ function dn(t) {
5
+ return oe(pe(t));
5
6
  }
6
- function ke(t) {
7
- return new Promise((e) => {
8
- document.readyState === "complete" ? e(t()) : window.addEventListener("load", () => e(t()));
9
- });
10
- }
11
- const P = window;
12
- P.injectedWeb3 = P.injectedWeb3 || {};
13
- Z();
14
- let M = null;
15
- function Z() {
16
- return Object.values(P.injectedWeb3).filter(({ connect: t, enable: e }) => !!(t || e)).length !== 0;
17
- }
18
- function Se(t) {
19
- return Promise.all(Object.entries(P.injectedWeb3).map(([e, { connect: n, enable: r, version: a }]) => Promise.resolve().then(() => n ? n(t) : r ? r(t).then((o) => le({ name: e, version: a || "unknown" }, o)) : Promise.reject(new Error("No connect(..) or enable(...) hook found"))).catch(({ message: o }) => {
20
- console.error(`Error initializing ${e}: ${o}`);
21
- }))).then((e) => e.filter((n) => !!n));
22
- }
23
- function xe(t, e = []) {
24
- if (!t)
25
- throw new Error("You must pass a name for your app to the web3Enable function");
26
- const n = e.length ? Promise.all(e.map((r) => r().catch(() => !1))) : Promise.resolve([!0]);
27
- return M = ke(() => n.then(() => Se(t).then((r) => r.map((a) => (a.accounts.subscribe || (a.accounts.subscribe = (o) => (a.accounts.get().then(o).catch(console.error), () => {
28
- })), a))).catch(() => []).then((r) => {
29
- const a = r.map(({ name: o, version: i }) => `${o}/${i}`);
30
- return Z(), `${r.length}`, r.length, `${a.join(", ")}`, r;
31
- }))), M;
32
- }
33
- class kn extends fe {
34
- async getAccount(e) {
35
- const { dappName: n, userAccountAddress: r } = e;
36
- if (!r)
37
- throw new j("WIDGET.NO_ACCOUNTS_FOUND", {
38
- context: { error: "No account address provided" }
39
- });
40
- const a = await xe(n);
41
- if (a.length === 0)
42
- throw new j("WIDGET.NO_EXTENSION_FOUND");
43
- for (const o of a) {
44
- const u = (await o.accounts.get()).find((c) => c.address === r);
45
- if (u)
46
- return { account: u, extension: o };
47
- }
48
- throw new j("WIDGET.ACCOUNT_NOT_FOUND", {
49
- context: { error: `No account found matching ${r}` }
50
- });
51
- }
52
- }
53
- const Oe = (t) => {
7
+ const he = (t) => {
54
8
  alert(t.message);
55
- }, Sn = (t, e, n) => Object.assign({
56
- onError: Oe,
9
+ }, gn = (t, e, n) => Object.assign({
10
+ onError: he,
57
11
  onHuman: (r) => {
58
12
  t({ sendData: !e.sendData });
59
13
  },
@@ -75,15 +29,15 @@ const Oe = (t) => {
75
29
  },
76
30
  onReset: () => {
77
31
  }
78
- }, n), xn = (t, e) => (n) => {
32
+ }, n), pn = (t, e) => (n) => {
79
33
  Object.assign(t, n), e(n);
80
- }, N = (t, e) => {
34
+ }, A = (t, e) => {
81
35
  const n = t(e), r = (o) => {
82
36
  n.current = o;
83
37
  };
84
38
  return [n.current, r];
85
- }, On = (t, e) => {
86
- const [n, r] = t(!1), [a, o] = t(0), [i, u] = t([]), [c, g] = N(e, void 0), [l, f] = t(!1), [m, b] = t(void 0), [A, C] = t(!1), [I, y] = t(void 0), [S, D] = t(void 0), [v, T] = N(e, void 0), [w, p] = N(e, void 0), [h, k] = N(e, void 0), [x, re] = t(!1), [oe, ae] = t(0), [ie, se] = t(void 0);
39
+ }, hn = (t, e) => {
40
+ const [n, r] = t(!1), [a, o] = t(0), [i, u] = t([]), [c, g] = A(e, void 0), [l, f] = t(!1), [m, y] = t(void 0), [N, I] = t(!1), [E, w] = t(void 0), [S, L] = t(void 0), [v, D] = A(e, void 0), [b, p] = A(e, void 0), [h, k] = A(e, void 0), [x, _] = t(!1), [ee, ne] = t(0), [te, re] = t(void 0);
87
41
  return [
88
42
  {
89
43
  isHuman: n,
@@ -92,30 +46,30 @@ const Oe = (t) => {
92
46
  captchaApi: c,
93
47
  showModal: l,
94
48
  challenge: m,
95
- loading: A,
96
- account: I,
49
+ loading: N,
50
+ account: E,
97
51
  dappAccount: S,
98
52
  submission: v,
99
- timeout: w,
53
+ timeout: b,
100
54
  successfullChallengeTimeout: h,
101
55
  sendData: x,
102
- attemptCount: oe,
103
- error: ie
56
+ attemptCount: ee,
57
+ error: te
104
58
  },
105
59
  (s) => {
106
- s.account !== void 0 && y(s.account), s.isHuman !== void 0 && r(s.isHuman), s.index !== void 0 && o(s.index), s.solutions !== void 0 && u(s.solutions.slice()), s.captchaApi !== void 0 && g(s.captchaApi), s.showModal !== void 0 && f(s.showModal), s.challenge !== void 0 && b(s.challenge), s.loading !== void 0 && C(s.loading), s.showModal !== void 0 && f(s.showModal), s.dappAccount !== void 0 && D(s.dappAccount), s.submission !== void 0 && T(s.submission), s.timeout !== void 0 && p(s.timeout), s.successfullChallengeTimeout !== void 0 && k(s.timeout), s.sendData !== void 0 && re(s.sendData), s.attemptCount !== void 0 && ae(s.attemptCount), s.error !== void 0 && se(s.error);
60
+ s.account !== void 0 && w(s.account), s.isHuman !== void 0 && r(s.isHuman), s.index !== void 0 && o(s.index), s.solutions !== void 0 && u(s.solutions.slice()), s.captchaApi !== void 0 && g(s.captchaApi), s.showModal !== void 0 && f(s.showModal), s.challenge !== void 0 && y(s.challenge), s.loading !== void 0 && I(s.loading), s.showModal !== void 0 && f(s.showModal), s.dappAccount !== void 0 && L(s.dappAccount), s.submission !== void 0 && D(s.submission), s.timeout !== void 0 && p(s.timeout), s.successfullChallengeTimeout !== void 0 && k(s.timeout), s.sendData !== void 0 && _(s.sendData), s.attemptCount !== void 0 && ne(s.attemptCount), s.error !== void 0 && re(s.error);
107
61
  }
108
62
  ];
109
63
  };
110
- var ee = [], Ee = ee.forEach, Ce = ee.slice;
111
- function Ie(t) {
112
- return Ee.call(Ce.call(arguments, 1), function(e) {
64
+ var Y = [], me = Y.forEach, ve = Y.slice;
65
+ function ye(t) {
66
+ return me.call(ve.call(arguments, 1), function(e) {
113
67
  if (e)
114
68
  for (var n in e)
115
69
  t[n] === void 0 && (t[n] = e[n]);
116
70
  }), t;
117
71
  }
118
- var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
72
+ var U = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, be = function(e, n, r) {
119
73
  var a = r || {};
120
74
  a.path = a.path || "/";
121
75
  var o = encodeURIComponent(n), i = "".concat(e, "=").concat(o);
@@ -125,12 +79,12 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
125
79
  i += "; Max-Age=".concat(Math.floor(u));
126
80
  }
127
81
  if (a.domain) {
128
- if (!R.test(a.domain))
82
+ if (!U.test(a.domain))
129
83
  throw new TypeError("option domain is invalid");
130
84
  i += "; Domain=".concat(a.domain);
131
85
  }
132
86
  if (a.path) {
133
- if (!R.test(a.path))
87
+ if (!U.test(a.path))
134
88
  throw new TypeError("option path is invalid");
135
89
  i += "; Path=".concat(a.path);
136
90
  }
@@ -159,13 +113,13 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
159
113
  }
160
114
  }
161
115
  return i;
162
- }, H = {
116
+ }, z = {
163
117
  create: function(e, n, r, a) {
164
118
  var o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
165
119
  path: "/",
166
120
  sameSite: "strict"
167
121
  };
168
- r && (o.expires = /* @__PURE__ */ new Date(), o.expires.setTime(o.expires.getTime() + r * 60 * 1e3)), a && (o.domain = a), document.cookie = De(e, encodeURIComponent(n), o);
122
+ r && (o.expires = /* @__PURE__ */ new Date(), o.expires.setTime(o.expires.getTime() + r * 60 * 1e3)), a && (o.domain = a), document.cookie = be(e, encodeURIComponent(n), o);
169
123
  },
170
124
  read: function(e) {
171
125
  for (var n = "".concat(e, "="), r = document.cookie.split(";"), a = 0; a < r.length; a++) {
@@ -177,20 +131,20 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
177
131
  remove: function(e) {
178
132
  this.create(e, "", -1);
179
133
  }
180
- }, Te = {
134
+ }, we = {
181
135
  name: "cookie",
182
136
  lookup: function(e) {
183
137
  var n;
184
138
  if (e.lookupCookie && typeof document < "u") {
185
- var r = H.read(e.lookupCookie);
139
+ var r = z.read(e.lookupCookie);
186
140
  r && (n = r);
187
141
  }
188
142
  return n;
189
143
  },
190
144
  cacheUserLanguage: function(e, n) {
191
- n.lookupCookie && typeof document < "u" && H.create(n.lookupCookie, e, n.cookieMinutes, n.cookieDomain, n.cookieOptions);
145
+ n.lookupCookie && typeof document < "u" && z.create(n.lookupCookie, e, n.cookieMinutes, n.cookieDomain, n.cookieOptions);
192
146
  }
193
- }, Le = {
147
+ }, ke = {
194
148
  name: "querystring",
195
149
  lookup: function(e) {
196
150
  var n;
@@ -207,7 +161,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
207
161
  }
208
162
  return n;
209
163
  }
210
- }, O = null, $ = function() {
164
+ }, O = null, M = function() {
211
165
  if (O !== null) return O;
212
166
  try {
213
167
  O = window !== "undefined" && window.localStorage !== null;
@@ -217,43 +171,43 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
217
171
  O = !1;
218
172
  }
219
173
  return O;
220
- }, Ne = {
174
+ }, Se = {
221
175
  name: "localStorage",
222
176
  lookup: function(e) {
223
177
  var n;
224
- if (e.lookupLocalStorage && $()) {
178
+ if (e.lookupLocalStorage && M()) {
225
179
  var r = window.localStorage.getItem(e.lookupLocalStorage);
226
180
  r && (n = r);
227
181
  }
228
182
  return n;
229
183
  },
230
184
  cacheUserLanguage: function(e, n) {
231
- n.lookupLocalStorage && $() && window.localStorage.setItem(n.lookupLocalStorage, e);
185
+ n.lookupLocalStorage && M() && window.localStorage.setItem(n.lookupLocalStorage, e);
232
186
  }
233
- }, E = null, W = function() {
234
- if (E !== null) return E;
187
+ }, C = null, R = function() {
188
+ if (C !== null) return C;
235
189
  try {
236
- E = window !== "undefined" && window.sessionStorage !== null;
190
+ C = window !== "undefined" && window.sessionStorage !== null;
237
191
  var e = "i18next.translate.boo";
238
192
  window.sessionStorage.setItem(e, "foo"), window.sessionStorage.removeItem(e);
239
193
  } catch {
240
- E = !1;
194
+ C = !1;
241
195
  }
242
- return E;
243
- }, Pe = {
196
+ return C;
197
+ }, xe = {
244
198
  name: "sessionStorage",
245
199
  lookup: function(e) {
246
200
  var n;
247
- if (e.lookupSessionStorage && W()) {
201
+ if (e.lookupSessionStorage && R()) {
248
202
  var r = window.sessionStorage.getItem(e.lookupSessionStorage);
249
203
  r && (n = r);
250
204
  }
251
205
  return n;
252
206
  },
253
207
  cacheUserLanguage: function(e, n) {
254
- n.lookupSessionStorage && W() && window.sessionStorage.setItem(n.lookupSessionStorage, e);
208
+ n.lookupSessionStorage && R() && window.sessionStorage.setItem(n.lookupSessionStorage, e);
255
209
  }
256
- }, Ae = {
210
+ }, Oe = {
257
211
  name: "navigator",
258
212
  lookup: function(e) {
259
213
  var n = [];
@@ -265,13 +219,13 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
265
219
  }
266
220
  return n.length > 0 ? n : void 0;
267
221
  }
268
- }, je = {
222
+ }, Ce = {
269
223
  name: "htmlTag",
270
224
  lookup: function(e) {
271
225
  var n, r = e.htmlTag || (typeof document < "u" ? document.documentElement : null);
272
226
  return r && typeof r.getAttribute == "function" && (n = r.getAttribute("lang")), n;
273
227
  }
274
- }, Ue = {
228
+ }, Ie = {
275
229
  name: "path",
276
230
  lookup: function(e) {
277
231
  var n;
@@ -287,7 +241,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
287
241
  }
288
242
  return n;
289
243
  }
290
- }, Fe = {
244
+ }, Ee = {
291
245
  name: "subdomain",
292
246
  lookup: function(e) {
293
247
  var n = typeof e.lookupFromSubdomainIndex == "number" ? e.lookupFromSubdomainIndex + 1 : 1, r = typeof window < "u" && window.location && window.location.hostname && window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);
@@ -295,7 +249,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
295
249
  return r[n];
296
250
  }
297
251
  };
298
- function ze() {
252
+ function Le() {
299
253
  return {
300
254
  order: ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"],
301
255
  lookupQuerystring: "lng",
@@ -312,20 +266,20 @@ function ze() {
312
266
  }
313
267
  };
314
268
  }
315
- var ne = /* @__PURE__ */ function() {
269
+ var Z = /* @__PURE__ */ function() {
316
270
  function t(e) {
317
271
  var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
318
- _(this, t), this.type = "languageDetector", this.detectors = {}, this.init(e, n);
272
+ K(this, t), this.type = "languageDetector", this.detectors = {}, this.init(e, n);
319
273
  }
320
- return Y(t, [{
274
+ return J(t, [{
321
275
  key: "init",
322
276
  value: function(n) {
323
277
  var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
324
278
  this.services = n || {
325
279
  languageUtils: {}
326
- }, this.options = Ie(r, this.options || {}, ze()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = function(o) {
280
+ }, this.options = ye(r, this.options || {}, Le()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = function(o) {
327
281
  return o.replace("-", "_");
328
- }), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = a, this.addDetector(Te), this.addDetector(Le), this.addDetector(Ne), this.addDetector(Pe), this.addDetector(Ae), this.addDetector(je), this.addDetector(Ue), this.addDetector(Fe);
282
+ }), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = a, this.addDetector(we), this.addDetector(ke), this.addDetector(Se), this.addDetector(xe), this.addDetector(Oe), this.addDetector(Ce), this.addDetector(Ie), this.addDetector(Ee);
329
283
  }
330
284
  }, {
331
285
  key: "addDetector",
@@ -357,8 +311,8 @@ var ne = /* @__PURE__ */ function() {
357
311
  }
358
312
  }]), t;
359
313
  }();
360
- ne.type = "languageDetector";
361
- var Me = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Re = {
314
+ Z.type = "languageDetector";
315
+ var De = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Te = {
362
316
  "&amp;": "&",
363
317
  "&#38;": "&",
364
318
  "&lt;": "<",
@@ -379,12 +333,12 @@ var Me = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
379
333
  "&#8230;": "…",
380
334
  "&#x2F;": "/",
381
335
  "&#47;": "/"
382
- }, He = function(e) {
383
- return Re[e];
384
- }, $e = function(e) {
385
- return e.replace(Me, He);
336
+ }, Ae = function(e) {
337
+ return Te[e];
338
+ }, Ne = function(e) {
339
+ return e.replace(De, Ae);
386
340
  };
387
- function B(t, e) {
341
+ function H(t, e) {
388
342
  var n = Object.keys(t);
389
343
  if (Object.getOwnPropertySymbols) {
390
344
  var r = Object.getOwnPropertySymbols(t);
@@ -394,18 +348,18 @@ function B(t, e) {
394
348
  }
395
349
  return n;
396
350
  }
397
- function q(t) {
351
+ function B(t) {
398
352
  for (var e = 1; e < arguments.length; e++) {
399
353
  var n = arguments[e] != null ? arguments[e] : {};
400
- e % 2 ? B(Object(n), !0).forEach(function(r) {
401
- V(t, r, n[r]);
402
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : B(Object(n)).forEach(function(r) {
354
+ e % 2 ? H(Object(n), !0).forEach(function(r) {
355
+ G(t, r, n[r]);
356
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : H(Object(n)).forEach(function(r) {
403
357
  Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
404
358
  });
405
359
  }
406
360
  return t;
407
361
  }
408
- var F = {
362
+ var j = {
409
363
  bindI18n: "languageChanged",
410
364
  bindI18nStore: "",
411
365
  transEmptyNodeValue: "",
@@ -413,20 +367,20 @@ var F = {
413
367
  transWrapTextNodes: "",
414
368
  transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
415
369
  useSuspense: !0,
416
- unescape: $e
417
- }, te, We = d.createContext();
418
- function Be() {
370
+ unescape: Ne
371
+ }, X, Pe = d.createContext();
372
+ function je() {
419
373
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
420
- F = q(q({}, F), t);
374
+ j = B(B({}, j), t);
421
375
  }
422
- function qe() {
423
- return F;
376
+ function Fe() {
377
+ return j;
424
378
  }
425
- var Qe = function() {
379
+ var Ue = function() {
426
380
  function t() {
427
- _(this, t), this.usedNamespaces = {};
381
+ K(this, t), this.usedNamespaces = {};
428
382
  }
429
- return Y(t, [{
383
+ return J(t, [{
430
384
  key: "addUsedNamespaces",
431
385
  value: function(n) {
432
386
  var r = this;
@@ -441,32 +395,32 @@ var Qe = function() {
441
395
  }
442
396
  }]), t;
443
397
  }();
444
- function Ge(t) {
445
- te = t;
398
+ function ze(t) {
399
+ X = t;
446
400
  }
447
- function Je() {
448
- return te;
401
+ function Me() {
402
+ return X;
449
403
  }
450
- var Ke = {
404
+ var Re = {
451
405
  type: "3rdParty",
452
406
  init: function(e) {
453
- Be(e.options.react), Ge(e);
407
+ je(e.options.react), ze(e);
454
408
  }
455
409
  };
456
- function Ye() {
410
+ function He() {
457
411
  if (console && console.warn) {
458
412
  for (var t, e = arguments.length, n = new Array(e), r = 0; r < e; r++)
459
413
  n[r] = arguments[r];
460
414
  typeof n[0] == "string" && (n[0] = "react-i18next:: ".concat(n[0])), (t = console).warn.apply(t, n);
461
415
  }
462
416
  }
463
- var Q = {};
464
- function z() {
417
+ var q = {};
418
+ function F() {
465
419
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
466
420
  e[n] = arguments[n];
467
- typeof e[0] == "string" && Q[e[0]] || (typeof e[0] == "string" && (Q[e[0]] = /* @__PURE__ */ new Date()), Ye.apply(void 0, e));
421
+ typeof e[0] == "string" && q[e[0]] || (typeof e[0] == "string" && (q[e[0]] = /* @__PURE__ */ new Date()), He.apply(void 0, e));
468
422
  }
469
- function G(t, e, n) {
423
+ function $(t, e, n) {
470
424
  t.loadNamespaces(e, function() {
471
425
  if (t.isInitialized)
472
426
  n();
@@ -480,7 +434,7 @@ function G(t, e, n) {
480
434
  }
481
435
  });
482
436
  }
483
- function _e(t, e) {
437
+ function Be(t, e) {
484
438
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = e.languages[0], a = e.options ? e.options.fallbackLng : !1, o = e.languages[e.languages.length - 1];
485
439
  if (r.toLowerCase() === "cimode") return !0;
486
440
  var i = function(c, g) {
@@ -489,18 +443,18 @@ function _e(t, e) {
489
443
  };
490
444
  return n.bindI18n && n.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !i(e.isLanguageChangingTo, t) ? !1 : !!(e.hasResourceBundle(r, t) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || i(r, t) && (!a || i(o, t)));
491
445
  }
492
- function Ve(t, e) {
446
+ function qe(t, e) {
493
447
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
494
448
  if (!e.languages || !e.languages.length)
495
- return z("i18n.languages were undefined or empty", e.languages), !0;
449
+ return F("i18n.languages were undefined or empty", e.languages), !0;
496
450
  var r = e.options.ignoreJSONStructure !== void 0;
497
451
  return r ? e.hasLoadedNamespace(t, {
498
452
  precheck: function(o, i) {
499
453
  if (n.bindI18n && n.bindI18n.indexOf("languageChanging") > -1 && o.services.backendConnector.backend && o.isLanguageChangingTo && !i(o.isLanguageChangingTo, t)) return !1;
500
454
  }
501
- }) : _e(t, e, n);
455
+ }) : Be(t, e, n);
502
456
  }
503
- function Xe(t, e) {
457
+ function $e(t, e) {
504
458
  var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
505
459
  if (n != null) {
506
460
  var r, a, o, i, u = [], c = !0, g = !1;
@@ -518,10 +472,10 @@ function Xe(t, e) {
518
472
  return u;
519
473
  }
520
474
  }
521
- function Ze(t, e) {
522
- return de(t) || Xe(t, e) || ge(t, e) || pe();
475
+ function We(t, e) {
476
+ return ae(t) || $e(t, e) || ie(t, e) || se();
523
477
  }
524
- function J(t, e) {
478
+ function W(t, e) {
525
479
  var n = Object.keys(t);
526
480
  if (Object.getOwnPropertySymbols) {
527
481
  var r = Object.getOwnPropertySymbols(t);
@@ -531,49 +485,49 @@ function J(t, e) {
531
485
  }
532
486
  return n;
533
487
  }
534
- function U(t) {
488
+ function P(t) {
535
489
  for (var e = 1; e < arguments.length; e++) {
536
490
  var n = arguments[e] != null ? arguments[e] : {};
537
- e % 2 ? J(Object(n), !0).forEach(function(r) {
538
- V(t, r, n[r]);
539
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : J(Object(n)).forEach(function(r) {
491
+ e % 2 ? W(Object(n), !0).forEach(function(r) {
492
+ G(t, r, n[r]);
493
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : W(Object(n)).forEach(function(r) {
540
494
  Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
541
495
  });
542
496
  }
543
497
  return t;
544
498
  }
545
- var en = function(e, n) {
499
+ var Qe = function(e, n) {
546
500
  var r = d.useRef();
547
501
  return d.useEffect(function() {
548
502
  r.current = e;
549
503
  }, [e, n]), r.current;
550
504
  };
551
- function nn(t) {
552
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = e.i18n, r = d.useContext(We) || {}, a = r.i18n, o = n || a || Je();
553
- if (o && !o.reportNamespaces && (o.reportNamespaces = new Qe()), !o) {
554
- z("You will need to pass in an i18next instance by using initReactI18next");
505
+ function Je(t) {
506
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = e.i18n, r = d.useContext(Pe) || {}, a = r.i18n, o = n || a || Me();
507
+ if (o && !o.reportNamespaces && (o.reportNamespaces = new Ue()), !o) {
508
+ F("You will need to pass in an i18next instance by using initReactI18next");
555
509
  var i = function(h) {
556
510
  return Array.isArray(h) ? h[h.length - 1] : h;
557
511
  }, u = [i, {}, !1];
558
512
  return u.t = i, u.i18n = {}, u.ready = !1, u;
559
513
  }
560
- o.options.react && o.options.react.wait !== void 0 && z("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
561
- var c = U(U(U({}, qe()), o.options.react), e), g = c.useSuspense, l = c.keyPrefix, f = t;
514
+ o.options.react && o.options.react.wait !== void 0 && F("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
515
+ var c = P(P(P({}, Fe()), o.options.react), e), g = c.useSuspense, l = c.keyPrefix, f = t;
562
516
  f = typeof f == "string" ? [f] : f || ["translation"], o.reportNamespaces.addUsedNamespaces && o.reportNamespaces.addUsedNamespaces(f);
563
517
  var m = (o.isInitialized || o.initializedStoreOnce) && f.every(function(p) {
564
- return Ve(p, o, c);
518
+ return qe(p, o, c);
565
519
  });
566
- function b() {
520
+ function y() {
567
521
  return o.getFixedT(null, c.nsMode === "fallback" ? f : f[0], l);
568
522
  }
569
- var A = d.useState(b), C = Ze(A, 2), I = C[0], y = C[1], S = f.join(), D = en(S), v = d.useRef(!0);
523
+ var N = d.useState(y), I = We(N, 2), E = I[0], w = I[1], S = f.join(), L = Qe(S), v = d.useRef(!0);
570
524
  d.useEffect(function() {
571
525
  var p = c.bindI18n, h = c.bindI18nStore;
572
- v.current = !0, !m && !g && G(o, f, function() {
573
- v.current && y(b);
574
- }), m && D && D !== S && v.current && y(b);
526
+ v.current = !0, !m && !g && $(o, f, function() {
527
+ v.current && w(y);
528
+ }), m && L && L !== S && v.current && w(y);
575
529
  function k() {
576
- v.current && y(b);
530
+ v.current && w(y);
577
531
  }
578
532
  return p && o && o.on(p, k), h && o && o.store.on(h, k), function() {
579
533
  v.current = !1, p && o && p.split(" ").forEach(function(x) {
@@ -583,23 +537,23 @@ function nn(t) {
583
537
  });
584
538
  };
585
539
  }, [o, S]);
586
- var T = d.useRef(!0);
540
+ var D = d.useRef(!0);
587
541
  d.useEffect(function() {
588
- v.current && !T.current && y(b), T.current = !1;
542
+ v.current && !D.current && w(y), D.current = !1;
589
543
  }, [o, l]);
590
- var w = [I, o, m];
591
- if (w.t = I, w.i18n = o, w.ready = m, m || !m && !g) return w;
544
+ var b = [E, o, m];
545
+ if (b.t = E, b.i18n = o, b.ready = m, m || !m && !g) return b;
592
546
  throw new Promise(function(p) {
593
- G(o, f, function() {
547
+ $(o, f, function() {
594
548
  p();
595
549
  });
596
550
  });
597
551
  }
598
- const tn = {
552
+ const Ke = {
599
553
  debug: !1,
600
- fallbackLng: he.enum.en,
601
- resources: me
602
- }, rn = {
554
+ fallbackLng: ue.enum.en,
555
+ resources: ce
556
+ }, Ge = {
603
557
  react: {
604
558
  useSuspense: !0
605
559
  },
@@ -608,23 +562,23 @@ const tn = {
608
562
  caches: ["localStorage", "cookie"]
609
563
  }
610
564
  };
611
- X.use(ne).use(Ke).init({ ...tn, ...rn });
612
- function En(t) {
613
- return nn("translation", { i18n: X, ...t });
565
+ V.use(Z).use(Re).init({ ...Ke, ...Ge });
566
+ function mn(t) {
567
+ return Je("translation", { i18n: V, ...t });
614
568
  }
615
- function on() {
569
+ function Ve() {
616
570
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
617
571
  e[n] = arguments[n];
618
- return ve(e);
572
+ return le(e);
619
573
  }
620
- const an = on`{
574
+ const Ye = Ve`{
621
575
  &:before {
622
576
  content: '""';
623
577
  position: absolute;
624
578
  height: 100%;
625
579
  width: 100%;
626
580
  }
627
- }`, sn = {
581
+ }`, Ze = {
628
582
  width: "28px",
629
583
  height: "28px",
630
584
  top: "auto",
@@ -636,9 +590,9 @@ const an = on`{
636
590
  margin: "0",
637
591
  borderStyle: "solid",
638
592
  borderWidth: "1px"
639
- }, K = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", un = "https://docs.prosopo.io/en/basics/faq/", cn = () => Array.from({ length: 8 }, () => K[Math.floor(Math.random() * K.length)]).join(""), Cn = ({ themeColor: t, onChange: e, checked: n, labelText: r, error: a }) => {
640
- const o = d.useMemo(() => t === "light" ? be : we, [t]), i = {
641
- ...sn,
593
+ }, Q = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", Xe = "https://docs.prosopo.io/en/basics/faq/", _e = () => Array.from({ length: 8 }, () => Q[Math.floor(Math.random() * Q.length)]).join(""), vn = ({ themeColor: t, onChange: e, checked: n, labelText: r, error: a }) => {
594
+ const o = d.useMemo(() => t === "light" ? fe : de, [t]), i = {
595
+ ...Ze,
642
596
  border: `1px solid ${o.palette.background.contrastText}`
643
597
  }, [u, c] = d.useState(!1), g = d.useMemo(() => ({
644
598
  ...i,
@@ -646,8 +600,8 @@ const an = on`{
646
600
  appearance: n ? "auto" : "none",
647
601
  flex: 1,
648
602
  margin: "15px"
649
- }), [u, o, n]), l = cn();
650
- return ye("span", { style: { display: "inline-flex" }, children: [L("input", { name: l, id: l, onMouseEnter: () => c(!0), onMouseLeave: () => c(!1), css: an, type: "checkbox", "aria-live": "assertive", "aria-label": r, onChange: e, checked: n, style: g }), a ? L("label", { css: {
603
+ }), [u, o, n]), l = _e();
604
+ return ge("span", { style: { display: "inline-flex" }, children: [T("input", { name: l, id: l, onMouseEnter: () => c(!0), onMouseLeave: () => c(!1), css: Ye, type: "checkbox", "aria-live": "assertive", "aria-label": r, onChange: e, checked: n, style: g }), a ? T("label", { css: {
651
605
  color: o.palette.error.main,
652
606
  position: "relative",
653
607
  display: "flex",
@@ -655,9 +609,9 @@ const an = on`{
655
609
  userSelect: "none",
656
610
  top: "20px",
657
611
  fontSize: "12px"
658
- }, htmlFor: l, children: L("a", { css: {
612
+ }, htmlFor: l, children: T("a", { css: {
659
613
  color: o.palette.error.main
660
- }, href: un, children: a }) }) : L("label", { css: {
614
+ }, href: Xe, children: a }) }) : T("label", { css: {
661
615
  color: o.palette.background.contrastText,
662
616
  position: "relative",
663
617
  display: "flex",
@@ -667,12 +621,11 @@ const an = on`{
667
621
  }, htmlFor: l, children: r })] });
668
622
  };
669
623
  export {
670
- Cn as C,
671
- kn as E,
672
- wn as a,
673
- xn as b,
674
- On as c,
675
- Sn as g,
676
- yn as s,
677
- En as u
624
+ vn as C,
625
+ dn as a,
626
+ pn as b,
627
+ hn as c,
628
+ gn as g,
629
+ fn as s,
630
+ mn as u
678
631
  };