@prosopo/procaptcha-bundle 2.6.12 → 3.0.6

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.
Files changed (117) hide show
  1. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts.map +1 -1
  2. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/index.js +3 -2
  3. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +1 -1
  4. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -1
  5. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js +4 -0
  6. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js.map +1 -1
  7. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts +1 -1
  8. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +1 -1
  9. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
  10. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js +1 -1
  11. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +1 -1
  12. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts +1 -1
  13. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts.map +1 -1
  14. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js +2 -2
  15. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js.map +1 -1
  16. package/CHANGELOG.md +141 -0
  17. package/dist/bundle/ProcaptchaWidget-BpzncYOb.js +612 -0
  18. package/dist/bundle/ProcaptchaWidget-D961oZ27.js +148 -0
  19. package/dist/bundle/bnChunk-DRlDxTFg.js +1137 -0
  20. package/dist/bundle/{browser-ponyfill-Bctlk3uB.js → browser-ponyfill-CvzSbL_o.js} +31 -30
  21. package/dist/bundle/builder-CQlqPNRd.js +37 -0
  22. package/dist/bundle/captchaComponentProvider-Dw6ydLe3.js +802 -0
  23. package/dist/bundle/{captchaRenderer-BAMErqQN.js → captchaRenderer-CY8KuZK-.js} +22 -22
  24. package/dist/bundle/commonChunk-24zMb_mF.js +189 -0
  25. package/dist/bundle/emotion-element-5486c51c.browser.esm-PRDDgd_k.js +918 -0
  26. package/dist/bundle/{fp.esm-DYWeNGcH.js → fp.esm-BADUiinQ.js} +548 -648
  27. package/dist/bundle/index-BRg_gWPo.js +1328 -0
  28. package/dist/bundle/{index-ByKGlSkE.js → index-BzOMq-ud.js} +2 -2
  29. package/dist/bundle/{index-1qH2dz7u.js → index-DqwVRCwA.js} +166 -199
  30. package/dist/bundle/index.d.ts.map +1 -1
  31. package/dist/bundle/locales/ar/translation.json +4 -3
  32. package/dist/bundle/locales/az/translation.json +4 -3
  33. package/dist/bundle/locales/cs/translation.json +4 -3
  34. package/dist/bundle/locales/de/translation.json +4 -3
  35. package/dist/bundle/locales/el/translation.json +4 -3
  36. package/dist/bundle/locales/en/translation.json +4 -3
  37. package/dist/bundle/locales/es/translation.json +4 -3
  38. package/dist/bundle/locales/fi/translation.json +4 -3
  39. package/dist/bundle/locales/fr/translation.json +4 -3
  40. package/dist/bundle/locales/hi/translation.json +4 -3
  41. package/dist/bundle/locales/hu/translation.json +4 -3
  42. package/dist/bundle/locales/id/translation.json +4 -3
  43. package/dist/bundle/locales/it/translation.json +4 -3
  44. package/dist/bundle/locales/ja/translation.json +4 -3
  45. package/dist/bundle/locales/jv/translation.json +4 -3
  46. package/dist/bundle/locales/ko/translation.json +4 -3
  47. package/dist/bundle/locales/ml/translation.json +4 -3
  48. package/dist/bundle/locales/ms/translation.json +4 -3
  49. package/dist/bundle/locales/nl/translation.json +4 -3
  50. package/dist/bundle/locales/no/translation.json +4 -3
  51. package/dist/bundle/locales/pl/translation.json +4 -3
  52. package/dist/bundle/locales/pt/translation.json +4 -3
  53. package/dist/bundle/locales/{pt-br → pt-BR}/translation.json +4 -3
  54. package/dist/bundle/locales/ro/translation.json +4 -3
  55. package/dist/bundle/locales/ru/translation.json +4 -3
  56. package/dist/bundle/locales/sr/translation.json +4 -3
  57. package/dist/bundle/locales/sv/translation.json +4 -3
  58. package/dist/bundle/locales/th/translation.json +4 -3
  59. package/dist/bundle/locales/tr/translation.json +4 -3
  60. package/dist/bundle/locales/uk/translation.json +4 -3
  61. package/dist/bundle/locales/vi/translation.json +4 -3
  62. package/dist/bundle/locales/{zh-cn → zh-CN}/translation.json +4 -3
  63. package/dist/bundle/nobleChunk-Xl5XLrx3.js +3635 -0
  64. package/dist/bundle/procaptcha.bundle.js +6 -5
  65. package/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -1
  66. package/dist/bundle/util/captcha/captchaComponentsList.d.ts +1 -1
  67. package/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +1 -1
  68. package/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
  69. package/dist/bundle/util/configCreator.d.ts +1 -1
  70. package/dist/bundle/util/configCreator.d.ts.map +1 -1
  71. package/dist/bundle/utilChunk-sqstc6C5.js +317 -0
  72. package/dist/bundle/utilCryptoChunk-CIPUtfoO.js +1256 -0
  73. package/dist/bundle/web2Chunk-7Vd8yt2r.js +3711 -0
  74. package/dist/bundle/{hash-CrwduMDb.js → web3Chunk-DrUvbVNW.js} +257 -695
  75. package/dist/bundle/{translations-DEL070wJ.js → zodChunk-wTu9ZHzV.js} +46 -82
  76. package/dist/cjs/index.cjs +8 -2
  77. package/dist/cjs/util/captcha/captchaComponentProvider.cjs +4 -0
  78. package/dist/cjs/util/captcha/captchaRenderer.cjs +2 -1
  79. package/dist/cjs/util/configCreator.cjs +2 -2
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +3 -2
  82. package/dist/index.js.map +1 -1
  83. package/dist/util/captcha/captchaComponentProvider.d.ts +1 -1
  84. package/dist/util/captcha/captchaComponentProvider.d.ts.map +1 -1
  85. package/dist/util/captcha/captchaComponentProvider.js +4 -0
  86. package/dist/util/captcha/captchaComponentProvider.js.map +1 -1
  87. package/dist/util/captcha/captchaComponentsList.d.ts +1 -1
  88. package/dist/util/captcha/captchaComponentsList.d.ts.map +1 -1
  89. package/dist/util/captcha/captchaRenderer.d.ts.map +1 -1
  90. package/dist/util/captcha/captchaRenderer.js +1 -1
  91. package/dist/util/captcha/captchaRenderer.js.map +1 -1
  92. package/dist/util/configCreator.d.ts +1 -1
  93. package/dist/util/configCreator.d.ts.map +1 -1
  94. package/dist/util/configCreator.js +2 -2
  95. package/dist/util/configCreator.js.map +1 -1
  96. package/package.json +21 -14
  97. package/stats.html +1 -1
  98. package/vite.config.ts +47 -4
  99. package/vite.serve.config.ts +2 -0
  100. package/vite.test.config.ts +1 -1
  101. package/webpack.config.cjs +5 -0
  102. package/dist/bundle/ProcaptchaWidget-DPyDGPiI.js +0 -156
  103. package/dist/bundle/ProcaptchaWidget-DoqUlwHS.js +0 -636
  104. package/dist/bundle/_commonjsHelpers-DaMA6jEr.js +0 -8
  105. package/dist/bundle/asU8a-BixKX-w0.js +0 -9
  106. package/dist/bundle/bip39-D7YSihxf.js +0 -260
  107. package/dist/bundle/captchaComponentProvider-BL18T1UE.js +0 -1242
  108. package/dist/bundle/emotion-element-5486c51c.browser.esm-Bjt1gs1F.js +0 -1807
  109. package/dist/bundle/i18nFrontend-DCv3P9jv.js +0 -2273
  110. package/dist/bundle/index-BeN3et18.js +0 -4844
  111. package/dist/bundle/index-BjRdPnnE.js +0 -1198
  112. package/dist/bundle/index-CBquknc2.js +0 -81
  113. package/dist/bundle/index-QVME9Prx.js +0 -32
  114. package/dist/bundle/sha256-CGE_4eEY.js +0 -171
  115. package/dist/bundle/spread-DEmVz7RJ.js +0 -15
  116. package/dist/bundle/toU8a-CPMbkkSw.js +0 -109
  117. package/dist/bundle/useTranslation-BJsfZyOx.js +0 -158
@@ -1,81 +0,0 @@
1
- import { n as g } from "./emotion-element-5486c51c.browser.esm-Bjt1gs1F.js";
2
- import { w as m, i as f, a as l } from "./hash-CrwduMDb.js";
3
- import { s as E } from "./toU8a-CPMbkkSw.js";
4
- import { b as i } from "./captchaComponentProvider-BL18T1UE.js";
5
- const b = "dev";
6
- class y {
7
- }
8
- function x() {
9
- return m().then(() => {
10
- if (!f())
11
- throw new Error("Unable to initialize @polkadot/util-crypto");
12
- return !0;
13
- }).catch(() => !1);
14
- }
15
- const h = async () => (await import("./fp.esm-DYWeNGcH.js")).default, N = async () => (await (await (await h()).load()).get()).visitorId, T = async () => (await import("./Signer-DP9drQ55.js")).default, O = async () => (await import("./index-BeN3et18.js")).Keyring, A = async () => (await import("./bip39-D7YSihxf.js").then((r) => r.c)).entropyToMnemonic;
16
- class W extends y {
17
- async getAccount(e) {
18
- const t = await this.createAccount(e), n = await this.createExtension(t);
19
- return {
20
- account: t,
21
- extension: n
22
- };
23
- }
24
- async createExtension(e) {
25
- const t = await T(), n = new t(async () => {
26
- });
27
- return n.signRaw = async (a) => {
28
- const o = e.keypair.sign(a.data);
29
- return {
30
- id: 1,
31
- signature: g(o)
32
- };
33
- }, {
34
- accounts: {
35
- get: async () => [e],
36
- subscribe: () => () => {
37
- }
38
- },
39
- name: "procaptcha-web2",
40
- version: b,
41
- signer: n
42
- };
43
- }
44
- async createAccount(e) {
45
- await x();
46
- const t = await O(), n = await N(), a = l(n, 128).slice(2), o = E(a), u = (await A())(o), s = "sr25519", d = new t({
47
- type: s
48
- }).addFromMnemonic(u), p = d.address;
49
- return {
50
- address: p,
51
- name: p,
52
- keypair: d
53
- };
54
- }
55
- }
56
- const F = async () => (await import("./index-QVME9Prx.js")).web3Enable;
57
- class _ extends y {
58
- async getAccount(e) {
59
- const { dappName: t, userAccountAddress: n } = e;
60
- if (!n)
61
- throw new i("WIDGET.NO_ACCOUNTS_FOUND", {
62
- context: { error: "No account address provided" }
63
- });
64
- const o = await (await F())(t);
65
- if (o.length === 0)
66
- throw new i("WIDGET.NO_EXTENSION_FOUND");
67
- for (const c of o) {
68
- const s = (await c.accounts.get()).find((w) => w.address === n);
69
- if (s)
70
- return { account: s, extension: c };
71
- }
72
- throw new i("WIDGET.ACCOUNT_NOT_FOUND", {
73
- context: { error: `No account found matching ${n}` }
74
- });
75
- }
76
- }
77
- export {
78
- y as Extension,
79
- W as ExtensionWeb2,
80
- _ as ExtensionWeb3
81
- };
@@ -1,32 +0,0 @@
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
- };
@@ -1,171 +0,0 @@
1
- import { H as B, k as w, e as H, t as y, o as U, d as C, l as a } from "./toU8a-CPMbkkSw.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
- ]), d = /* @__PURE__ */ new Uint32Array([
125
- 1779033703,
126
- 3144134277,
127
- 1013904242,
128
- 2773480762,
129
- 1359893119,
130
- 2600822924,
131
- 528734635,
132
- 1541459225
133
- ]), u = /* @__PURE__ */ new Uint32Array(64);
134
- class E extends D {
135
- constructor() {
136
- super(64, 32, 8, !1), this.A = d[0] | 0, this.B = d[1] | 0, this.C = d[2] | 0, this.D = d[3] | 0, this.E = d[4] | 0, this.F = d[5] | 0, this.G = d[6] | 0, this.H = d[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
- u[c] = t.getUint32(n, !1);
149
- for (let c = 16; c < 64; c++) {
150
- const p = u[c - 15], l = u[c - 2], A = a(p, 7) ^ a(p, 18) ^ p >>> 3, g = a(l, 17) ^ a(l, 19) ^ l >>> 10;
151
- u[c] = g + u[c - 7] + A + u[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] + u[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
- u.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
- };
@@ -1,15 +0,0 @@
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
- };
@@ -1,109 +0,0 @@
1
- function s(t) {
2
- if (!Number.isSafeInteger(t) || t < 0)
3
- throw new Error(`positive integer expected, not ${t}`);
4
- }
5
- function a(t) {
6
- return t instanceof Uint8Array || t != null && typeof t == "object" && t.constructor.name === "Uint8Array";
7
- }
8
- function u(t, ...e) {
9
- if (!a(t))
10
- throw new Error("Uint8Array expected");
11
- if (e.length > 0 && !e.includes(t.length))
12
- throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`);
13
- }
14
- function x(t) {
15
- if (typeof t != "function" || typeof t.create != "function")
16
- throw new Error("Hash should be wrapped by utils.wrapConstructor");
17
- s(t.outputLen), s(t.blockLen);
18
- }
19
- function L(t, e = !0) {
20
- if (t.destroyed)
21
- throw new Error("Hash instance has been destroyed");
22
- if (e && t.finished)
23
- throw new Error("Hash#digest() has already been called");
24
- }
25
- function E(t, e) {
26
- u(t);
27
- const n = e.outputLen;
28
- if (t.length < n)
29
- throw new Error(`digestInto() expects output buffer of length at least ${n}`);
30
- }
31
- const A = (t) => new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4)), T = (t) => new DataView(t.buffer, t.byteOffset, t.byteLength), U = (t, e) => t << 32 - e | t >>> e, k = (t, e) => t << e | t >>> 32 - e >>> 0, l = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68, f = (t) => t << 24 & 4278190080 | t << 8 & 16711680 | t >>> 8 & 65280 | t >>> 24 & 255, m = l ? (t) => t : (t) => f(t);
32
- function O(t) {
33
- for (let e = 0; e < t.length; e++)
34
- t[e] = f(t[e]);
35
- }
36
- function p(t) {
37
- if (typeof t != "string")
38
- throw new Error(`utf8ToBytes expected string, got ${typeof t}`);
39
- return new Uint8Array(new TextEncoder().encode(t));
40
- }
41
- function c(t) {
42
- return typeof t == "string" && (t = p(t)), u(t), t;
43
- }
44
- class S {
45
- // Safe version that clones internal state
46
- clone() {
47
- return this._cloneInto();
48
- }
49
- }
50
- const d = {}.toString;
51
- function $(t, e) {
52
- if (e !== void 0 && d.call(e) !== "[object Object]")
53
- throw new Error("Options should be object or undefined");
54
- return Object.assign(t, e);
55
- }
56
- function j(t) {
57
- const e = (o) => t().update(c(o)).digest(), n = t();
58
- return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = () => t(), e;
59
- }
60
- function B(t) {
61
- const e = (o, r) => t(r).update(c(o)).digest(), n = t({});
62
- return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = (o) => t(o), e;
63
- }
64
- function H(t) {
65
- const e = (o, r) => t(r).update(c(o)).digest(), n = t({});
66
- return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = (o) => t(o), e;
67
- }
68
- function y(t) {
69
- return t("return this");
70
- }
71
- const i = typeof globalThis < "u" ? globalThis : typeof global < "u" ? global : typeof self < "u" ? self : typeof window < "u" ? window : y(Function);
72
- function w(t, e) {
73
- return typeof i[t] > "u" ? e : i[t];
74
- }
75
- let b = class {
76
- encode(e) {
77
- const n = e.length, o = new Uint8Array(n);
78
- for (let r = 0; r < n; r++)
79
- o[r] = e.charCodeAt(r);
80
- return o;
81
- }
82
- };
83
- const g = /* @__PURE__ */ w("TextEncoder", b), h = new g();
84
- function C(t) {
85
- return t ? h.encode(t.toString()) : new Uint8Array();
86
- }
87
- export {
88
- S as H,
89
- m as a,
90
- O as b,
91
- w as c,
92
- j as d,
93
- L as e,
94
- H as f,
95
- u as g,
96
- $ as h,
97
- l as i,
98
- x as j,
99
- T as k,
100
- U as l,
101
- s as n,
102
- E as o,
103
- k as r,
104
- C as s,
105
- c as t,
106
- A as u,
107
- B as w,
108
- i as x
109
- };
@@ -1,158 +0,0 @@
1
- import { n as X, r as p } from "./emotion-element-5486c51c.browser.esm-Bjt1gs1F.js";
2
- import { s as Y } from "./toU8a-CPMbkkSw.js";
3
- import { g as q, a as B, i as K } from "./i18nFrontend-DCv3P9jv.js";
4
- function re(e) {
5
- return X(Y(e));
6
- }
7
- const te = (e) => new Promise((s) => setTimeout(s, e)), ce = (e, s) => (o) => {
8
- Object.assign(e, o), s(o);
9
- }, P = (e, s) => {
10
- const o = e(s), a = (n) => {
11
- o.current = n;
12
- };
13
- return [o.current, a];
14
- }, ue = (e, s) => {
15
- const [o, a] = e(!1), [t, n] = e(0), [l, N] = e([]), [h, r] = P(s, void 0), [g, A] = e(!1), [E, b] = e(void 0), [I, w] = e(!1), [T, M] = e(void 0), [m, C] = e(void 0), [v, O] = P(s, void 0), [z, L] = P(s, void 0), [c, u] = P(s, void 0), [d, f] = e(!1), [F, _] = e(0), [$, G] = e(void 0), [J, W] = e(void 0);
16
- return [
17
- {
18
- isHuman: o,
19
- index: t,
20
- solutions: l,
21
- captchaApi: h,
22
- showModal: g,
23
- challenge: E,
24
- loading: I,
25
- account: T,
26
- dappAccount: m,
27
- submission: v,
28
- timeout: z,
29
- successfullChallengeTimeout: c,
30
- sendData: d,
31
- attemptCount: F,
32
- error: $,
33
- sessionId: J
34
- },
35
- (i) => {
36
- i.account !== void 0 && M(i.account), i.isHuman !== void 0 && a(i.isHuman), i.index !== void 0 && n(i.index), i.solutions !== void 0 && N(i.solutions.slice()), i.captchaApi !== void 0 && r(i.captchaApi), i.showModal !== void 0 && A(i.showModal), i.challenge !== void 0 && b(i.challenge), i.loading !== void 0 && w(i.loading), i.showModal !== void 0 && A(i.showModal), i.dappAccount !== void 0 && C(i.dappAccount), i.submission !== void 0 && O(i.submission), i.timeout !== void 0 && L(i.timeout), i.successfullChallengeTimeout !== void 0 && u(i.timeout), i.sendData !== void 0 && f(i.sendData), i.attemptCount !== void 0 && _(i.attemptCount), i.error !== void 0 && G(i.error), i.sessionId !== void 0 && W(i.sessionId);
37
- }
38
- ];
39
- }, Q = (e, s, o, a) => {
40
- var n, l, N, h;
41
- const t = [o, {
42
- code: s,
43
- ...a || {}
44
- }];
45
- if ((l = (n = e == null ? void 0 : e.services) == null ? void 0 : n.logger) != null && l.forward)
46
- return e.services.logger.forward(t, "warn", "react-i18next::", !0);
47
- y(t[0]) && (t[0] = `react-i18next:: ${t[0]}`), (h = (N = e == null ? void 0 : e.services) == null ? void 0 : N.logger) != null && h.warn ? e.services.logger.warn(...t) : console != null && console.warn && [...t];
48
- }, U = {}, H = (e, s, o, a) => {
49
- y(o) && U[o] || (y(o) && (U[o] = /* @__PURE__ */ new Date()), Q(e, s, o, a));
50
- }, D = (e, s) => () => {
51
- if (e.isInitialized)
52
- s();
53
- else {
54
- const o = () => {
55
- setTimeout(() => {
56
- e.off("initialized", o);
57
- }, 0), s();
58
- };
59
- e.on("initialized", o);
60
- }
61
- }, R = (e, s, o) => {
62
- e.loadNamespaces(s, D(e, o));
63
- }, j = (e, s, o, a) => {
64
- if (y(o) && (o = [o]), e.options.preload && e.options.preload.indexOf(s) > -1) return R(e, o, a);
65
- o.forEach((t) => {
66
- e.options.ns.indexOf(t) < 0 && e.options.ns.push(t);
67
- }), e.loadLanguages(s, D(e, a));
68
- }, Z = (e, s, o = {}) => !s.languages || !s.languages.length ? (H(s, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
69
- languages: s.languages
70
- }), !0) : s.hasLoadedNamespace(e, {
71
- lng: o.lng,
72
- precheck: (a, t) => {
73
- var n;
74
- if (((n = o.bindI18n) == null ? void 0 : n.indexOf("languageChanging")) > -1 && a.services.backendConnector.backend && a.isLanguageChangingTo && !t(a.isLanguageChangingTo, e)) return !1;
75
- }
76
- }), y = (e) => typeof e == "string", V = (e) => typeof e == "object" && e !== null, x = p.createContext();
77
- class S {
78
- constructor() {
79
- this.usedNamespaces = {};
80
- }
81
- addUsedNamespaces(s) {
82
- s.forEach((o) => {
83
- this.usedNamespaces[o] || (this.usedNamespaces[o] = !0);
84
- });
85
- }
86
- getUsedNamespaces() {
87
- return Object.keys(this.usedNamespaces);
88
- }
89
- }
90
- const ee = (e, s) => {
91
- const o = p.useRef();
92
- return p.useEffect(() => {
93
- o.current = e;
94
- }, [e, s]), o.current;
95
- }, k = (e, s, o, a) => e.getFixedT(s, o, a), se = (e, s, o, a) => p.useCallback(k(e, s, o, a), [e, s, o, a]), ne = (e, s = {}) => {
96
- var v, O, z, L;
97
- const {
98
- i18n: o
99
- } = s, {
100
- i18n: a,
101
- defaultNS: t
102
- } = p.useContext(x) || {}, n = o || a || q();
103
- if (n && !n.reportNamespaces && (n.reportNamespaces = new S()), !n) {
104
- H(n, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
105
- const c = (d, f) => y(f) ? f : V(f) && y(f.defaultValue) ? f.defaultValue : Array.isArray(d) ? d[d.length - 1] : d, u = [c, {}, !1];
106
- return u.t = c, u.i18n = {}, u.ready = !1, u;
107
- }
108
- (v = n.options.react) != null && v.wait && H(n, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
109
- const l = {
110
- ...B(),
111
- ...n.options.react,
112
- ...s
113
- }, {
114
- useSuspense: N,
115
- keyPrefix: h
116
- } = l;
117
- let r = e || t || ((O = n.options) == null ? void 0 : O.defaultNS);
118
- r = y(r) ? [r] : r || ["translation"], (L = (z = n.reportNamespaces).addUsedNamespaces) == null || L.call(z, r);
119
- const g = (n.isInitialized || n.initializedStoreOnce) && r.every((c) => Z(c, n, l)), A = se(n, s.lng || null, l.nsMode === "fallback" ? r : r[0], h), E = () => A, b = () => k(n, s.lng || null, l.nsMode === "fallback" ? r : r[0], h), [I, w] = p.useState(E);
120
- let T = r.join();
121
- s.lng && (T = `${s.lng}${T}`);
122
- const M = ee(T), m = p.useRef(!0);
123
- p.useEffect(() => {
124
- const {
125
- bindI18n: c,
126
- bindI18nStore: u
127
- } = l;
128
- m.current = !0, !g && !N && (s.lng ? j(n, s.lng, r, () => {
129
- m.current && w(b);
130
- }) : R(n, r, () => {
131
- m.current && w(b);
132
- })), g && M && M !== T && m.current && w(b);
133
- const d = () => {
134
- m.current && w(b);
135
- };
136
- return c && (n == null || n.on(c, d)), u && (n == null || n.store.on(u, d)), () => {
137
- m.current = !1, n && (c == null || c.split(" ").forEach((f) => n.off(f, d))), u && n && u.split(" ").forEach((f) => n.store.off(f, d));
138
- };
139
- }, [n, T]), p.useEffect(() => {
140
- m.current && g && w(E);
141
- }, [n, h, g]);
142
- const C = [I, n, g];
143
- if (C.t = I, C.i18n = n, C.ready = g, g || !g && !N) return C;
144
- throw new Promise((c) => {
145
- s.lng ? j(n, s.lng, r, () => c()) : R(n, r, () => c());
146
- });
147
- };
148
- function de(e) {
149
- const s = K();
150
- return ne("translation", { i18n: s, ...e });
151
- }
152
- export {
153
- te as a,
154
- ce as b,
155
- ue as c,
156
- re as s,
157
- de as u
158
- };