@prosopo/procaptcha-bundle 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/{Captcha-CDaou025.js → Captcha-VFcjC-TM.js} +10 -10
- package/dist/bundle/{ProcaptchaWidget-ca6OEV5g.js → ProcaptchaWidget-YCG6trDR.js} +223 -223
- package/dist/bundle/{index-BnKiDSMF.js → index-Bvarorfv.js} +1851 -1885
- package/dist/bundle/procaptcha.bundle.js +1 -1
- package/dist/bundle/{utils-6l_jjPQ7.js → utils-o59wPRMZ.js} +3755 -3721
- package/package.json +11 -11
- package/stats.html +1 -1
- package/typedoc.config.js +0 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as d, P, j as n, C as k, W as R, a as T, c as O, e as G, f as H, g as
|
|
2
|
-
import {
|
|
1
|
+
import { A as d, P as _, j as n, C as k, W as R, a as T, c as O, e as G, f as H, g as L, h as U, L as j, i as F, k as M, m as B, l as K, d as q, r as b } from "./index-Bvarorfv.js";
|
|
2
|
+
import { D as V, l as D, v as X, n as $, f as w, w as z, t as J, q as Q, p as Y, A as Z, W as ee, K as te, y as ne, C as oe, m as N, z as ae, B as re } from "./utils-o59wPRMZ.js";
|
|
3
3
|
const se = (a, t) => {
|
|
4
4
|
let o = 0;
|
|
5
5
|
const c = "0".repeat(t);
|
|
@@ -26,7 +26,7 @@ const se = (a, t) => {
|
|
|
26
26
|
userAccountAddress: "",
|
|
27
27
|
...a
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return _.parse(e);
|
|
30
30
|
}, f = (e) => {
|
|
31
31
|
const r = e.networks[e.defaultNetwork];
|
|
32
32
|
if (!r)
|
|
@@ -51,7 +51,7 @@ const se = (a, t) => {
|
|
|
51
51
|
return t.dappAccount;
|
|
52
52
|
}, s = N(t, o), I = () => {
|
|
53
53
|
v(), s(i());
|
|
54
|
-
},
|
|
54
|
+
}, P = () => {
|
|
55
55
|
const e = l().captchas.pow.solutionTimeout, r = setTimeout(() => {
|
|
56
56
|
s({ isHuman: !1 }), u.onExpired();
|
|
57
57
|
}, e);
|
|
@@ -71,18 +71,18 @@ const se = (a, t) => {
|
|
|
71
71
|
throw new w("GENERAL.ACCOUNT_NOT_FOUND", {
|
|
72
72
|
context: { error: "Account address has not been set for web3 mode" }
|
|
73
73
|
});
|
|
74
|
-
const m = await S(),
|
|
74
|
+
const m = await S(), W = D(o, t, c), x = await z(m.query.getRandomActiveProvider, m.query)(h, p()), y = J(x.provider.url.toString()), E = new Q(f(l()), y, p()), g = await E.getPowCaptchaChallenge(h, p()), C = se(g.challenge, g.difficulty);
|
|
75
75
|
(await E.submitPowCaptchaSolution(g, A().account.address, p(), x, C, e.captchas.pow.verifiedTimeout))[d.verified] && (s({
|
|
76
76
|
isHuman: !0,
|
|
77
77
|
loading: !1
|
|
78
|
-
}),
|
|
78
|
+
}), W.onHuman(Y({
|
|
79
79
|
[d.providerUrl]: y,
|
|
80
80
|
[d.user]: A().account.address,
|
|
81
81
|
[d.dapp]: p(),
|
|
82
82
|
[d.challenge]: g.challenge,
|
|
83
83
|
[d.blockNumber]: x.blockNumber,
|
|
84
84
|
[d.nonce]: C
|
|
85
|
-
})),
|
|
85
|
+
})), P());
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
}, he = (a) => {
|
|
@@ -92,12 +92,12 @@ const se = (a, t) => {
|
|
|
92
92
|
border: H,
|
|
93
93
|
backgroundColor: c.palette.background.default,
|
|
94
94
|
borderColor: c.palette.grey[300],
|
|
95
|
-
borderRadius:
|
|
95
|
+
borderRadius: L,
|
|
96
96
|
display: "flex",
|
|
97
97
|
alignItems: "center",
|
|
98
98
|
flexWrap: "wrap",
|
|
99
99
|
justifyContent: "space-between",
|
|
100
|
-
minHeight: `${
|
|
100
|
+
minHeight: `${U}px`,
|
|
101
101
|
overflow: "hidden"
|
|
102
102
|
}, children: [n("div", { style: { display: "inline-flex", flexDirection: "column" }, children: n("div", { style: {
|
|
103
103
|
display: "flex",
|
|
@@ -112,7 +112,7 @@ const se = (a, t) => {
|
|
|
112
112
|
verticalAlign: "middle"
|
|
113
113
|
}, children: n("div", { style: {
|
|
114
114
|
display: "flex"
|
|
115
|
-
}, children: n("div", { style: { flex: 1 }, children: i.loading ? n(j, { themeColor: o }) : n(re, { checked: i.isHuman, onChange: f.start, themeColor: o, labelText: "I am human" }) }) }) }) }) }), n("div", { style: { display: "inline-flex", flexDirection: "column" }, children: n("a", { href: F, target: "_blank", "aria-label": M, children: n("div", { style: { flex: 1 }, children: n(B, { themeColor: o }) }) }) })] })] }) }) }) }) });
|
|
115
|
+
}, children: n("div", { style: { flex: 1 }, children: i.loading ? n(j, { themeColor: o, "aria-label": "Loading spinner" }) : n(re, { checked: i.isHuman, onChange: f.start, themeColor: o, labelText: "I am human", "aria-label": "human checkbox" }) }) }) }) }) }), n("div", { style: { display: "inline-flex", flexDirection: "column" }, children: n("a", { href: F, target: "_blank", "aria-label": M, children: n("div", { style: { flex: 1 }, children: n(B, { themeColor: o, "aria-label": "Prosopo logo" }) }) }) })] })] }) }) }) }) });
|
|
116
116
|
};
|
|
117
117
|
export {
|
|
118
118
|
he as default
|