@prosopo/procaptcha-bundle 2.2.3 → 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.
- package/dist/bundle/{Checkbox-DM6n1-r-.js → Checkbox-1g4X-3Qk.js} +140 -187
- package/dist/bundle/{ProcaptchaWidget-DZb9vegH.js → ProcaptchaWidget-Br0TzJXc.js} +211 -208
- package/dist/bundle/{ProcaptchaWidget-CrcxpJLK.js → ProcaptchaWidget-weuONHx4.js} +50 -47
- package/dist/bundle/Signer-DP9drQ55.js +23 -0
- package/dist/bundle/asU8a-DDBcjges.js +9 -0
- package/dist/bundle/bip39-CRbwrDSj.js +259 -0
- package/dist/bundle/fp.esm-C0kLYOiJ.js +1637 -0
- package/dist/bundle/hash-B8OCn-ev.js +1083 -0
- package/dist/bundle/index-43V4q4_w.js +17248 -0
- package/dist/bundle/index-B2mmLfsC.js +6520 -0
- package/dist/bundle/index-Cks8mtaG.js +79 -0
- package/dist/bundle/index-DlBTo0Xd.js +1190 -0
- package/dist/bundle/index-QVME9Prx.js +32 -0
- package/dist/bundle/procaptcha.bundle.js +2 -2
- package/dist/bundle/sha256-CxfeEiTA.js +171 -0
- package/dist/bundle/spread-DEmVz7RJ.js +15 -0
- package/package.json +9 -9
- package/stats.html +1 -1
- package/dist/bundle/index-B27PXNfK.js +0 -28199
|
@@ -1,59 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
56
|
-
onError:
|
|
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),
|
|
32
|
+
}, n), pn = (t, e) => (n) => {
|
|
79
33
|
Object.assign(t, n), e(n);
|
|
80
|
-
},
|
|
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
|
-
},
|
|
86
|
-
const [n, r] = t(!1), [a, o] = t(0), [i, u] = t([]), [c, g] =
|
|
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:
|
|
96
|
-
account:
|
|
49
|
+
loading: N,
|
|
50
|
+
account: E,
|
|
97
51
|
dappAccount: S,
|
|
98
52
|
submission: v,
|
|
99
|
-
timeout:
|
|
53
|
+
timeout: b,
|
|
100
54
|
successfullChallengeTimeout: h,
|
|
101
55
|
sendData: x,
|
|
102
|
-
attemptCount:
|
|
103
|
-
error:
|
|
56
|
+
attemptCount: ee,
|
|
57
|
+
error: te
|
|
104
58
|
},
|
|
105
59
|
(s) => {
|
|
106
|
-
s.account !== void 0 &&
|
|
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
|
|
111
|
-
function
|
|
112
|
-
return
|
|
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
|
|
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 (!
|
|
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 (!
|
|
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
|
-
},
|
|
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 =
|
|
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
|
-
},
|
|
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 =
|
|
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" &&
|
|
145
|
+
n.lookupCookie && typeof document < "u" && z.create(n.lookupCookie, e, n.cookieMinutes, n.cookieDomain, n.cookieOptions);
|
|
192
146
|
}
|
|
193
|
-
},
|
|
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,
|
|
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
|
-
},
|
|
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 &&
|
|
185
|
+
n.lookupLocalStorage && M() && window.localStorage.setItem(n.lookupLocalStorage, e);
|
|
232
186
|
}
|
|
233
|
-
},
|
|
234
|
-
if (
|
|
187
|
+
}, C = null, R = function() {
|
|
188
|
+
if (C !== null) return C;
|
|
235
189
|
try {
|
|
236
|
-
|
|
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
|
-
|
|
194
|
+
C = !1;
|
|
241
195
|
}
|
|
242
|
-
return
|
|
243
|
-
},
|
|
196
|
+
return C;
|
|
197
|
+
}, xe = {
|
|
244
198
|
name: "sessionStorage",
|
|
245
199
|
lookup: function(e) {
|
|
246
200
|
var n;
|
|
247
|
-
if (e.lookupSessionStorage &&
|
|
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 &&
|
|
208
|
+
n.lookupSessionStorage && R() && window.sessionStorage.setItem(n.lookupSessionStorage, e);
|
|
255
209
|
}
|
|
256
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
|
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
|
|
269
|
+
var Z = /* @__PURE__ */ function() {
|
|
316
270
|
function t(e) {
|
|
317
271
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
318
|
-
|
|
272
|
+
K(this, t), this.type = "languageDetector", this.detectors = {}, this.init(e, n);
|
|
319
273
|
}
|
|
320
|
-
return
|
|
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 =
|
|
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(
|
|
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
|
-
|
|
361
|
-
var
|
|
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
|
"&": "&",
|
|
363
317
|
"&": "&",
|
|
364
318
|
"<": "<",
|
|
@@ -379,12 +333,12 @@ var Me = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
379
333
|
"…": "…",
|
|
380
334
|
"/": "/",
|
|
381
335
|
"/": "/"
|
|
382
|
-
},
|
|
383
|
-
return
|
|
384
|
-
},
|
|
385
|
-
return e.replace(
|
|
336
|
+
}, Ae = function(e) {
|
|
337
|
+
return Te[e];
|
|
338
|
+
}, Ne = function(e) {
|
|
339
|
+
return e.replace(De, Ae);
|
|
386
340
|
};
|
|
387
|
-
function
|
|
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
|
|
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 ?
|
|
401
|
-
|
|
402
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) :
|
|
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
|
|
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:
|
|
417
|
-
},
|
|
418
|
-
function
|
|
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
|
-
|
|
374
|
+
j = B(B({}, j), t);
|
|
421
375
|
}
|
|
422
|
-
function
|
|
423
|
-
return
|
|
376
|
+
function Fe() {
|
|
377
|
+
return j;
|
|
424
378
|
}
|
|
425
|
-
var
|
|
379
|
+
var Ue = function() {
|
|
426
380
|
function t() {
|
|
427
|
-
|
|
381
|
+
K(this, t), this.usedNamespaces = {};
|
|
428
382
|
}
|
|
429
|
-
return
|
|
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
|
|
445
|
-
|
|
398
|
+
function ze(t) {
|
|
399
|
+
X = t;
|
|
446
400
|
}
|
|
447
|
-
function
|
|
448
|
-
return
|
|
401
|
+
function Me() {
|
|
402
|
+
return X;
|
|
449
403
|
}
|
|
450
|
-
var
|
|
404
|
+
var Re = {
|
|
451
405
|
type: "3rdParty",
|
|
452
406
|
init: function(e) {
|
|
453
|
-
|
|
407
|
+
je(e.options.react), ze(e);
|
|
454
408
|
}
|
|
455
409
|
};
|
|
456
|
-
function
|
|
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
|
|
464
|
-
function
|
|
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" &&
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
}) :
|
|
455
|
+
}) : Be(t, e, n);
|
|
502
456
|
}
|
|
503
|
-
function
|
|
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
|
|
522
|
-
return
|
|
475
|
+
function We(t, e) {
|
|
476
|
+
return ae(t) || $e(t, e) || ie(t, e) || se();
|
|
523
477
|
}
|
|
524
|
-
function
|
|
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
|
|
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 ?
|
|
538
|
-
|
|
539
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) :
|
|
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
|
|
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
|
|
552
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = e.i18n, r = d.useContext(
|
|
553
|
-
if (o && !o.reportNamespaces && (o.reportNamespaces = new
|
|
554
|
-
|
|
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 &&
|
|
561
|
-
var c =
|
|
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
|
|
518
|
+
return qe(p, o, c);
|
|
565
519
|
});
|
|
566
|
-
function
|
|
520
|
+
function y() {
|
|
567
521
|
return o.getFixedT(null, c.nsMode === "fallback" ? f : f[0], l);
|
|
568
522
|
}
|
|
569
|
-
var
|
|
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 &&
|
|
573
|
-
v.current && y
|
|
574
|
-
}), m &&
|
|
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
|
|
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
|
|
540
|
+
var D = d.useRef(!0);
|
|
587
541
|
d.useEffect(function() {
|
|
588
|
-
v.current && !
|
|
542
|
+
v.current && !D.current && w(y), D.current = !1;
|
|
589
543
|
}, [o, l]);
|
|
590
|
-
var
|
|
591
|
-
if (
|
|
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
|
-
|
|
547
|
+
$(o, f, function() {
|
|
594
548
|
p();
|
|
595
549
|
});
|
|
596
550
|
});
|
|
597
551
|
}
|
|
598
|
-
const
|
|
552
|
+
const Ke = {
|
|
599
553
|
debug: !1,
|
|
600
|
-
fallbackLng:
|
|
601
|
-
resources:
|
|
602
|
-
},
|
|
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
|
-
|
|
612
|
-
function
|
|
613
|
-
return
|
|
565
|
+
V.use(Z).use(Re).init({ ...Ke, ...Ge });
|
|
566
|
+
function mn(t) {
|
|
567
|
+
return Je("translation", { i18n: V, ...t });
|
|
614
568
|
}
|
|
615
|
-
function
|
|
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
|
|
572
|
+
return le(e);
|
|
619
573
|
}
|
|
620
|
-
const
|
|
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
|
-
}`,
|
|
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
|
-
},
|
|
640
|
-
const o = d.useMemo(() => t === "light" ?
|
|
641
|
-
...
|
|
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 =
|
|
650
|
-
return
|
|
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:
|
|
612
|
+
}, htmlFor: l, children: T("a", { css: {
|
|
659
613
|
color: o.palette.error.main
|
|
660
|
-
}, href:
|
|
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
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
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
|
};
|