@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.
- 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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { o as u } from "./spread-DEmVz7RJ.js";
|
|
2
|
+
function b(t) {
|
|
3
|
+
return new Promise((e) => {
|
|
4
|
+
document.readyState === "complete" ? e(t()) : window.addEventListener("load", () => e(t()));
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
const c = window;
|
|
8
|
+
c.injectedWeb3 = c.injectedWeb3 || {};
|
|
9
|
+
a();
|
|
10
|
+
let s = null;
|
|
11
|
+
function a() {
|
|
12
|
+
return Object.values(c.injectedWeb3).filter(({ connect: t, enable: e }) => !!(t || e)).length !== 0;
|
|
13
|
+
}
|
|
14
|
+
function d(t) {
|
|
15
|
+
return Promise.all(Object.entries(c.injectedWeb3).map(([e, { connect: i, enable: n, version: o }]) => Promise.resolve().then(() => i ? i(t) : n ? n(t).then((r) => u({ name: e, version: o || "unknown" }, r)) : Promise.reject(new Error("No connect(..) or enable(...) hook found"))).catch(({ message: r }) => {
|
|
16
|
+
console.error(`Error initializing ${e}: ${r}`);
|
|
17
|
+
}))).then((e) => e.filter((i) => !!i));
|
|
18
|
+
}
|
|
19
|
+
function h(t, e = []) {
|
|
20
|
+
if (!t)
|
|
21
|
+
throw new Error("You must pass a name for your app to the web3Enable function");
|
|
22
|
+
const i = e.length ? Promise.all(e.map((n) => n().catch(() => !1))) : Promise.resolve([!0]);
|
|
23
|
+
return s = b(() => i.then(() => d(t).then((n) => n.map((o) => (o.accounts.subscribe || (o.accounts.subscribe = (r) => (o.accounts.get().then(r).catch(console.error), () => {
|
|
24
|
+
})), o))).catch(() => []).then((n) => {
|
|
25
|
+
const o = n.map(({ name: r, version: l }) => `${r}/${l}`);
|
|
26
|
+
return a(), `${n.length}`, n.length, `${o.join(", ")}`, n;
|
|
27
|
+
}))), s;
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
h as web3Enable,
|
|
31
|
+
s as web3EnablePromise
|
|
32
|
+
};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { H as B, a as w, e as H, t as y, o as U, w as C, r as a } from "./hash-B8OCn-ev.js";
|
|
2
|
+
function m(x, t, n, s) {
|
|
3
|
+
if (typeof x.setBigUint64 == "function")
|
|
4
|
+
return x.setBigUint64(t, n, s);
|
|
5
|
+
const i = BigInt(32), f = BigInt(4294967295), e = Number(n >> i & f), h = Number(n & f), o = s ? 4 : 0, r = s ? 0 : 4;
|
|
6
|
+
x.setUint32(t + o, e, s), x.setUint32(t + r, h, s);
|
|
7
|
+
}
|
|
8
|
+
const _ = (x, t, n) => x & t ^ ~x & n, L = (x, t, n) => x & t ^ x & n ^ t & n;
|
|
9
|
+
class D extends B {
|
|
10
|
+
constructor(t, n, s, i) {
|
|
11
|
+
super(), this.blockLen = t, this.outputLen = n, this.padOffset = s, this.isLE = i, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = w(this.buffer);
|
|
12
|
+
}
|
|
13
|
+
update(t) {
|
|
14
|
+
H(this);
|
|
15
|
+
const { view: n, buffer: s, blockLen: i } = this;
|
|
16
|
+
t = y(t);
|
|
17
|
+
const f = t.length;
|
|
18
|
+
for (let e = 0; e < f; ) {
|
|
19
|
+
const h = Math.min(i - this.pos, f - e);
|
|
20
|
+
if (h === i) {
|
|
21
|
+
const o = w(t);
|
|
22
|
+
for (; i <= f - e; e += i)
|
|
23
|
+
this.process(o, e);
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
s.set(t.subarray(e, e + h), this.pos), this.pos += h, e += h, this.pos === i && (this.process(n, 0), this.pos = 0);
|
|
27
|
+
}
|
|
28
|
+
return this.length += t.length, this.roundClean(), this;
|
|
29
|
+
}
|
|
30
|
+
digestInto(t) {
|
|
31
|
+
H(this), U(t, this), this.finished = !0;
|
|
32
|
+
const { buffer: n, view: s, blockLen: i, isLE: f } = this;
|
|
33
|
+
let { pos: e } = this;
|
|
34
|
+
n[e++] = 128, this.buffer.subarray(e).fill(0), this.padOffset > i - e && (this.process(s, 0), e = 0);
|
|
35
|
+
for (let c = e; c < i; c++)
|
|
36
|
+
n[c] = 0;
|
|
37
|
+
m(s, i - 8, BigInt(this.length * 8), f), this.process(s, 0);
|
|
38
|
+
const h = w(t), o = this.outputLen;
|
|
39
|
+
if (o % 4)
|
|
40
|
+
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
41
|
+
const r = o / 4, b = this.get();
|
|
42
|
+
if (r > b.length)
|
|
43
|
+
throw new Error("_sha2: outputLen bigger than state");
|
|
44
|
+
for (let c = 0; c < r; c++)
|
|
45
|
+
h.setUint32(4 * c, b[c], f);
|
|
46
|
+
}
|
|
47
|
+
digest() {
|
|
48
|
+
const { buffer: t, outputLen: n } = this;
|
|
49
|
+
this.digestInto(t);
|
|
50
|
+
const s = t.slice(0, n);
|
|
51
|
+
return this.destroy(), s;
|
|
52
|
+
}
|
|
53
|
+
_cloneInto(t) {
|
|
54
|
+
t || (t = new this.constructor()), t.set(...this.get());
|
|
55
|
+
const { blockLen: n, buffer: s, length: i, finished: f, destroyed: e, pos: h } = this;
|
|
56
|
+
return t.length = i, t.pos = h, t.finished = f, t.destroyed = e, i % n && t.buffer.set(s), t;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const I = /* @__PURE__ */ new Uint32Array([
|
|
60
|
+
1116352408,
|
|
61
|
+
1899447441,
|
|
62
|
+
3049323471,
|
|
63
|
+
3921009573,
|
|
64
|
+
961987163,
|
|
65
|
+
1508970993,
|
|
66
|
+
2453635748,
|
|
67
|
+
2870763221,
|
|
68
|
+
3624381080,
|
|
69
|
+
310598401,
|
|
70
|
+
607225278,
|
|
71
|
+
1426881987,
|
|
72
|
+
1925078388,
|
|
73
|
+
2162078206,
|
|
74
|
+
2614888103,
|
|
75
|
+
3248222580,
|
|
76
|
+
3835390401,
|
|
77
|
+
4022224774,
|
|
78
|
+
264347078,
|
|
79
|
+
604807628,
|
|
80
|
+
770255983,
|
|
81
|
+
1249150122,
|
|
82
|
+
1555081692,
|
|
83
|
+
1996064986,
|
|
84
|
+
2554220882,
|
|
85
|
+
2821834349,
|
|
86
|
+
2952996808,
|
|
87
|
+
3210313671,
|
|
88
|
+
3336571891,
|
|
89
|
+
3584528711,
|
|
90
|
+
113926993,
|
|
91
|
+
338241895,
|
|
92
|
+
666307205,
|
|
93
|
+
773529912,
|
|
94
|
+
1294757372,
|
|
95
|
+
1396182291,
|
|
96
|
+
1695183700,
|
|
97
|
+
1986661051,
|
|
98
|
+
2177026350,
|
|
99
|
+
2456956037,
|
|
100
|
+
2730485921,
|
|
101
|
+
2820302411,
|
|
102
|
+
3259730800,
|
|
103
|
+
3345764771,
|
|
104
|
+
3516065817,
|
|
105
|
+
3600352804,
|
|
106
|
+
4094571909,
|
|
107
|
+
275423344,
|
|
108
|
+
430227734,
|
|
109
|
+
506948616,
|
|
110
|
+
659060556,
|
|
111
|
+
883997877,
|
|
112
|
+
958139571,
|
|
113
|
+
1322822218,
|
|
114
|
+
1537002063,
|
|
115
|
+
1747873779,
|
|
116
|
+
1955562222,
|
|
117
|
+
2024104815,
|
|
118
|
+
2227730452,
|
|
119
|
+
2361852424,
|
|
120
|
+
2428436474,
|
|
121
|
+
2756734187,
|
|
122
|
+
3204031479,
|
|
123
|
+
3329325298
|
|
124
|
+
]), u = /* @__PURE__ */ new Uint32Array([
|
|
125
|
+
1779033703,
|
|
126
|
+
3144134277,
|
|
127
|
+
1013904242,
|
|
128
|
+
2773480762,
|
|
129
|
+
1359893119,
|
|
130
|
+
2600822924,
|
|
131
|
+
528734635,
|
|
132
|
+
1541459225
|
|
133
|
+
]), d = /* @__PURE__ */ new Uint32Array(64);
|
|
134
|
+
class E extends D {
|
|
135
|
+
constructor() {
|
|
136
|
+
super(64, 32, 8, !1), this.A = u[0] | 0, this.B = u[1] | 0, this.C = u[2] | 0, this.D = u[3] | 0, this.E = u[4] | 0, this.F = u[5] | 0, this.G = u[6] | 0, this.H = u[7] | 0;
|
|
137
|
+
}
|
|
138
|
+
get() {
|
|
139
|
+
const { A: t, B: n, C: s, D: i, E: f, F: e, G: h, H: o } = this;
|
|
140
|
+
return [t, n, s, i, f, e, h, o];
|
|
141
|
+
}
|
|
142
|
+
// prettier-ignore
|
|
143
|
+
set(t, n, s, i, f, e, h, o) {
|
|
144
|
+
this.A = t | 0, this.B = n | 0, this.C = s | 0, this.D = i | 0, this.E = f | 0, this.F = e | 0, this.G = h | 0, this.H = o | 0;
|
|
145
|
+
}
|
|
146
|
+
process(t, n) {
|
|
147
|
+
for (let c = 0; c < 16; c++, n += 4)
|
|
148
|
+
d[c] = t.getUint32(n, !1);
|
|
149
|
+
for (let c = 16; c < 64; c++) {
|
|
150
|
+
const p = d[c - 15], l = d[c - 2], A = a(p, 7) ^ a(p, 18) ^ p >>> 3, g = a(l, 17) ^ a(l, 19) ^ l >>> 10;
|
|
151
|
+
d[c] = g + d[c - 7] + A + d[c - 16] | 0;
|
|
152
|
+
}
|
|
153
|
+
let { A: s, B: i, C: f, D: e, E: h, F: o, G: r, H: b } = this;
|
|
154
|
+
for (let c = 0; c < 64; c++) {
|
|
155
|
+
const p = a(h, 6) ^ a(h, 11) ^ a(h, 25), l = b + p + _(h, o, r) + I[c] + d[c] | 0, g = (a(s, 2) ^ a(s, 13) ^ a(s, 22)) + L(s, i, f) | 0;
|
|
156
|
+
b = r, r = o, o = h, h = e + l | 0, e = f, f = i, i = s, s = l + g | 0;
|
|
157
|
+
}
|
|
158
|
+
s = s + this.A | 0, i = i + this.B | 0, f = f + this.C | 0, e = e + this.D | 0, h = h + this.E | 0, o = o + this.F | 0, r = r + this.G | 0, b = b + this.H | 0, this.set(s, i, f, e, h, o, r, b);
|
|
159
|
+
}
|
|
160
|
+
roundClean() {
|
|
161
|
+
d.fill(0);
|
|
162
|
+
}
|
|
163
|
+
destroy() {
|
|
164
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
const G = /* @__PURE__ */ C(() => new E());
|
|
168
|
+
export {
|
|
169
|
+
D as H,
|
|
170
|
+
G as s
|
|
171
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function c(n, ...o) {
|
|
2
|
+
for (let t = 0, f = o.length; t < f; t++) {
|
|
3
|
+
const e = o[t];
|
|
4
|
+
if (e)
|
|
5
|
+
if (typeof e.entries == "function")
|
|
6
|
+
for (const [i, r] of e.entries())
|
|
7
|
+
n[i] = r;
|
|
8
|
+
else
|
|
9
|
+
Object.assign(n, e);
|
|
10
|
+
}
|
|
11
|
+
return n;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
c as o
|
|
15
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-bundle",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
},
|
|
30
30
|
"browserslist": ["> 0.5%, last 2 versions, not dead"],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@prosopo/dotenv": "2.
|
|
33
|
-
"@prosopo/locale": "2.
|
|
34
|
-
"@prosopo/procaptcha-frictionless": "2.
|
|
35
|
-
"@prosopo/procaptcha-pow": "2.
|
|
36
|
-
"@prosopo/procaptcha-react": "2.
|
|
37
|
-
"@prosopo/types": "2.
|
|
38
|
-
"@prosopo/util": "2.
|
|
32
|
+
"@prosopo/dotenv": "2.3.1",
|
|
33
|
+
"@prosopo/locale": "2.3.1",
|
|
34
|
+
"@prosopo/procaptcha-frictionless": "2.3.1",
|
|
35
|
+
"@prosopo/procaptcha-pow": "2.3.1",
|
|
36
|
+
"@prosopo/procaptcha-react": "2.3.1",
|
|
37
|
+
"@prosopo/types": "2.3.1",
|
|
38
|
+
"@prosopo/util": "2.3.1",
|
|
39
39
|
"express": "4.21.1",
|
|
40
40
|
"react": "18.3.1",
|
|
41
41
|
"react-dom": "18.3.1"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"registry": "https://registry.npmjs.org"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@prosopo/config": "2.
|
|
56
|
+
"@prosopo/config": "2.3.1",
|
|
57
57
|
"@types/jsdom": "21.1.7",
|
|
58
58
|
"@vitest/coverage-v8": "2.1.1",
|
|
59
59
|
"concurrently": "9.0.1",
|