@prosopo/procaptcha-bundle 2.5.3 → 2.6.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/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/index.js +15 -17
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +1 -1
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js +23 -27
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +1 -0
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts +2 -2
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js +4 -7
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts +5 -0
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js.map +1 -0
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts +2 -2
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js +9 -4
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js.map +1 -0
- package/CHANGELOG.md +29 -0
- package/dist/bundle/ProcaptchaWidget-3gKvjeiH.js +636 -0
- package/dist/bundle/ProcaptchaWidget-D6-M7iAv.js +360 -0
- package/dist/bundle/{asU8a-JliaME7-.js → asU8a-DCECA0Qe.js} +1 -1
- package/dist/bundle/bip39-BQoZog_M.js +365 -0
- package/dist/bundle/captchaComponentProvider-BW2eXmc3.js +1242 -0
- package/dist/bundle/captchaRenderer-B_MgGzr9.js +70 -0
- package/dist/bundle/{emotion-element-5486c51c.browser.esm-Bywq83R5.js → emotion-element-5486c51c.browser.esm-CCAJ8JId.js} +713 -746
- package/dist/bundle/{fp.esm-C0kLYOiJ.js → fp.esm-DYWeNGcH.js} +17 -0
- package/dist/bundle/{hash-CtL1HOjf.js → hash-BR0YLxPF.js} +796 -483
- package/dist/bundle/{i18nFrontend-C_RgmvGh.js → i18nFrontend-CsPT71ro.js} +1 -1
- package/dist/bundle/index-2or4-1WF.js +596 -0
- package/dist/bundle/{captchaRenderer-D-du50M4.js → index-BCjHZ8o6.js} +1293 -1355
- package/dist/bundle/{index-DcG_c-Na.js → index-BYUYvvuq.js} +11 -11
- package/dist/bundle/index-BjRdPnnE.js +1198 -0
- package/dist/bundle/index-WqEmiYQ_.js +4386 -0
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/locales/ar/translation.json +56 -0
- package/dist/bundle/locales/az/translation.json +56 -0
- package/dist/bundle/locales/cs/translation.json +56 -0
- package/dist/bundle/locales/de/translation.json +55 -405
- package/dist/bundle/locales/el/translation.json +56 -0
- package/dist/bundle/locales/en/translation.json +55 -405
- package/dist/bundle/locales/es/translation.json +55 -405
- package/dist/bundle/locales/fi/translation.json +56 -0
- package/dist/bundle/locales/fr/translation.json +55 -405
- package/dist/bundle/locales/hi/translation.json +56 -0
- package/dist/bundle/locales/hu/translation.json +56 -0
- package/dist/bundle/locales/id/translation.json +56 -0
- package/dist/bundle/locales/it/translation.json +55 -405
- package/dist/bundle/locales/ja/translation.json +56 -0
- package/dist/bundle/locales/jv/translation.json +56 -0
- package/dist/bundle/locales/ko/translation.json +56 -0
- package/dist/bundle/locales/ml/translation.json +56 -0
- package/dist/bundle/locales/ms/translation.json +56 -0
- package/dist/bundle/locales/nl/translation.json +56 -0
- package/dist/bundle/locales/no/translation.json +56 -0
- package/dist/bundle/locales/pl/translation.json +56 -0
- package/dist/bundle/locales/pt/translation.json +55 -405
- package/dist/bundle/locales/pt-br/translation.json +56 -0
- package/dist/bundle/locales/ro/translation.json +56 -0
- package/dist/bundle/locales/ru/translation.json +56 -0
- package/dist/bundle/locales/sr/translation.json +56 -0
- package/dist/bundle/locales/sv/translation.json +56 -0
- package/dist/bundle/locales/th/translation.json +56 -0
- package/dist/bundle/locales/tr/translation.json +56 -0
- package/dist/bundle/locales/uk/translation.json +56 -0
- package/dist/bundle/locales/vi/translation.json +56 -0
- package/dist/bundle/locales/zh-cn/translation.json +56 -0
- package/dist/bundle/procaptcha.bundle.js +1 -1
- package/dist/bundle/toU8a-C68WUzs_.js +24 -0
- package/dist/bundle/{translations-B0P9axY3.js → translations-DEL070wJ.js} +59 -26
- package/dist/bundle/{useTranslation-7b6JJ18N.js → useTranslation-BPbGzrhj.js} +3 -3
- package/dist/bundle/util/captcha/captchaRenderer.d.ts +2 -2
- package/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
- package/dist/bundle/util/configCreator.d.ts +2 -2
- package/dist/bundle/util/configCreator.d.ts.map +1 -1
- package/dist/bundle/util/widgetFactory.d.ts +2 -2
- package/dist/bundle/util/widgetFactory.d.ts.map +1 -1
- package/dist/cjs/index.cjs +163 -0
- package/dist/cjs/util/captcha/captchaComponentProvider.cjs +19 -0
- package/dist/cjs/util/captcha/captchaComponentsList.cjs +12 -0
- package/dist/cjs/util/captcha/captchaRenderer.cjs +65 -0
- package/dist/cjs/util/captcha/captchaType.cjs +12 -0
- package/dist/cjs/util/captcha/components/frictionlessCaptcha.cjs +24 -0
- package/dist/cjs/util/captcha/components/imageCaptcha.cjs +17 -0
- package/dist/cjs/util/captcha/components/powCaptcha.cjs +17 -0
- package/dist/cjs/util/config.cjs +16 -0
- package/dist/cjs/util/configCreator.cjs +23 -0
- package/dist/cjs/util/language.cjs +18 -0
- package/dist/cjs/util/timeout.cjs +14 -0
- package/dist/cjs/util/widgetFactory.cjs +84 -0
- package/dist/cjs/util/widgetThemeResolver.cjs +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -17
- package/dist/index.js.map +1 -1
- package/dist/tests/util/renderLogic.test.js +23 -27
- package/dist/tests/util/renderLogic.test.js.map +1 -1
- package/dist/util/captcha/captchaRenderer.d.ts +2 -2
- package/dist/util/captcha/captchaRenderer.d.ts.map +1 -1
- package/dist/util/captcha/captchaRenderer.js +4 -7
- package/dist/util/captcha/captchaRenderer.js.map +1 -1
- package/dist/util/configCreator.d.ts +2 -2
- package/dist/util/configCreator.d.ts.map +1 -1
- package/dist/util/configCreator.js.map +1 -1
- package/dist/util/language.js.map +1 -1
- package/dist/util/widgetFactory.d.ts +2 -2
- package/dist/util/widgetFactory.d.ts.map +1 -1
- package/dist/util/widgetFactory.js +9 -4
- package/dist/util/widgetFactory.js.map +1 -1
- package/package.json +25 -16
- package/stats.html +1 -1
- package/vite.config.ts +18 -3
- package/vite.serve.config.ts +24 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts +0 -5
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js.map +0 -1
- package/dist/bundle/ProcaptchaWidget-BlWWnPeB.js +0 -615
- package/dist/bundle/ProcaptchaWidget-Dnwno-4N.js +0 -156
- package/dist/bundle/bip39-CFjno8fK.js +0 -260
- package/dist/bundle/captchaComponentProvider-dcMua0p9.js +0 -1013
- package/dist/bundle/index-B8oMghZ3.js +0 -1120
- package/dist/bundle/index-BMjJnq60.js +0 -4373
- package/dist/bundle/index-BTlHNFX8.js +0 -504
- package/dist/bundle/locales/pt-BR/translation.json +0 -406
- package/dist/bundle/sha256-Cxc9Hrlx.js +0 -171
- package/dist/bundle/toU8a-BWKf-2UU.js +0 -133
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/components.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/components.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js.map +0 -0
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { g as k, p as M, c as E, d as D, e as G, E as F, j as S, C as W } from "./captchaComponentProvider-dcMua0p9.js";
|
|
2
|
-
import { A as c, o as j, P as K, r as p, M as I } from "./emotion-element-5486c51c.browser.esm-Bywq83R5.js";
|
|
3
|
-
import { b as L, a as V, s as Y, u as X, c as q } from "./useTranslation-7b6JJ18N.js";
|
|
4
|
-
import { s as z } from "./sha256-Cxc9Hrlx.js";
|
|
5
|
-
import { l as B, b as J, d as Q } from "./index-BTlHNFX8.js";
|
|
6
|
-
const Z = (s, e) => {
|
|
7
|
-
let t = 0;
|
|
8
|
-
const l = "0".repeat(e);
|
|
9
|
-
for (; ; ) {
|
|
10
|
-
const n = new TextEncoder().encode(t + s);
|
|
11
|
-
if ($(z(n)).startsWith(l))
|
|
12
|
-
return t;
|
|
13
|
-
t += 1;
|
|
14
|
-
}
|
|
15
|
-
}, $ = (s) => Array.from(s).map((e) => e.toString(16).padStart(2, "0")).join(""), ee = (s, e, t, l, n) => {
|
|
16
|
-
const u = k(l), T = () => ({
|
|
17
|
-
showModal: !1,
|
|
18
|
-
loading: !1,
|
|
19
|
-
index: 0,
|
|
20
|
-
challenge: void 0,
|
|
21
|
-
solutions: void 0,
|
|
22
|
-
isHuman: !1,
|
|
23
|
-
captchaApi: void 0,
|
|
24
|
-
account: void 0
|
|
25
|
-
}), d = () => {
|
|
26
|
-
window.clearTimeout(Number(e.timeout)), o({ timeout: void 0 });
|
|
27
|
-
}, v = () => {
|
|
28
|
-
o({
|
|
29
|
-
isHuman: !1,
|
|
30
|
-
loading: !1
|
|
31
|
-
}), u.onFailed(), r(n == null ? void 0 : n.restart);
|
|
32
|
-
}, f = () => {
|
|
33
|
-
window.clearTimeout(Number(e.successfullChallengeTimeout)), o({ successfullChallengeTimeout: void 0 });
|
|
34
|
-
}, g = () => {
|
|
35
|
-
const a = {
|
|
36
|
-
userAccountAddress: "",
|
|
37
|
-
...s
|
|
38
|
-
};
|
|
39
|
-
return e.account && (a.userAccountAddress = e.account.account.address), K.parse(a);
|
|
40
|
-
}, h = () => {
|
|
41
|
-
if (!e.account)
|
|
42
|
-
throw new E("GENERAL.ACCOUNT_NOT_FOUND", {
|
|
43
|
-
context: { error: "Account not loaded" }
|
|
44
|
-
});
|
|
45
|
-
return { account: e.account };
|
|
46
|
-
}, m = () => {
|
|
47
|
-
if (!e.dappAccount)
|
|
48
|
-
throw new E("GENERAL.SITE_KEY_MISSING");
|
|
49
|
-
return e.dappAccount;
|
|
50
|
-
}, o = L(e, t), r = (a) => {
|
|
51
|
-
d(), f(), o(T()), u.onReset(), a && a();
|
|
52
|
-
}, A = () => {
|
|
53
|
-
const a = g().captchas.pow.solutionTimeout, P = setTimeout(() => {
|
|
54
|
-
o({ isHuman: !1 }), u.onExpired(), r(n == null ? void 0 : n.restart);
|
|
55
|
-
}, a);
|
|
56
|
-
o({ successfullChallengeTimeout: P });
|
|
57
|
-
}, w = async () => {
|
|
58
|
-
await M(async () => {
|
|
59
|
-
var y;
|
|
60
|
-
if (e.loading || e.isHuman)
|
|
61
|
-
return;
|
|
62
|
-
r(), o({
|
|
63
|
-
loading: !0
|
|
64
|
-
}), o({ attemptCount: e.attemptCount + 1 });
|
|
65
|
-
const a = g(), R = await (async () => n ? n.userAccount : new (await F(a.web2))().getAccount(a))(), C = R.account.address;
|
|
66
|
-
if (o({
|
|
67
|
-
account: { account: { address: C } }
|
|
68
|
-
}), o({ dappAccount: a.account.address }), await V(100), !a.web2 && !a.userAccountAddress)
|
|
69
|
-
throw new E("GENERAL.ACCOUNT_NOT_FOUND", {
|
|
70
|
-
context: {
|
|
71
|
-
error: "Account address has not been set for web3 mode"
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
let x;
|
|
75
|
-
n != null && n.provider ? x = n.provider : x = await D(g());
|
|
76
|
-
const _ = x.provider.url, H = new G(_, m()), i = await H.getPowCaptchaChallenge(C, m(), n == null ? void 0 : n.sessionId);
|
|
77
|
-
if (i.error)
|
|
78
|
-
o({
|
|
79
|
-
loading: !1,
|
|
80
|
-
error: {
|
|
81
|
-
message: i.error.message,
|
|
82
|
-
key: i.error.key || "API.UNKNOWN_ERROR"
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
else {
|
|
86
|
-
const N = Z(i.challenge, i.difficulty), b = (y = R.extension) == null ? void 0 : y.signer;
|
|
87
|
-
if (!b || !b.signRaw)
|
|
88
|
-
throw new E("GENERAL.CANT_FIND_KEYRINGPAIR", {
|
|
89
|
-
context: {
|
|
90
|
-
error: "Signer is not defined, cannot sign message to prove account ownership"
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
const O = await b.signRaw({
|
|
94
|
-
address: C,
|
|
95
|
-
data: Y(i[c.timestamp].toString()),
|
|
96
|
-
type: "bytes"
|
|
97
|
-
});
|
|
98
|
-
(await H.submitPowCaptchaSolution(i, h().account.account.address, m(), N, O.signature.toString(), a.captchas.pow.verifiedTimeout))[c.verified] ? (o({
|
|
99
|
-
isHuman: !0,
|
|
100
|
-
loading: !1
|
|
101
|
-
}), u.onHuman(j({
|
|
102
|
-
[c.providerUrl]: _,
|
|
103
|
-
[c.user]: h().account.account.address,
|
|
104
|
-
[c.dapp]: m(),
|
|
105
|
-
[c.challenge]: i.challenge,
|
|
106
|
-
[c.nonce]: N,
|
|
107
|
-
[c.timestamp]: i.timestamp,
|
|
108
|
-
[c.signature]: {
|
|
109
|
-
[c.provider]: i.signature.provider,
|
|
110
|
-
[c.user]: {
|
|
111
|
-
[c.timestamp]: O.signature.toString()
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
})), A()) : v();
|
|
115
|
-
}
|
|
116
|
-
}, w, () => {
|
|
117
|
-
r();
|
|
118
|
-
}, e.attemptCount, 3);
|
|
119
|
-
};
|
|
120
|
-
return {
|
|
121
|
-
start: w,
|
|
122
|
-
resetState: r
|
|
123
|
-
};
|
|
124
|
-
}, U = "procaptcha:execute", se = (s) => {
|
|
125
|
-
var o;
|
|
126
|
-
const { t: e } = X(), t = s.config, l = s.i18n, n = t.theme === "light" ? J : Q, u = s.frictionlessState, T = s.callbacks || {}, [d, v] = q(p.useState, p.useRef), [f, g] = p.useState(!1), h = L(d, v), m = p.useRef(ee(t, d, h, T, u));
|
|
127
|
-
return p.useEffect(() => {
|
|
128
|
-
t.language && (l ? l.language !== t.language && l.changeLanguage(t.language).then((r) => r) : B().then((r) => {
|
|
129
|
-
r.language !== t.language && r.changeLanguage(t.language).then((A) => A);
|
|
130
|
-
}));
|
|
131
|
-
}, [l, t.language]), p.useEffect(() => {
|
|
132
|
-
d.error && (g(!1), d.error.key === "CAPTCHA.NO_SESSION_FOUND" && u && setTimeout(() => {
|
|
133
|
-
u.restart();
|
|
134
|
-
}, 3e3));
|
|
135
|
-
}, [d.error, u]), p.useEffect(() => {
|
|
136
|
-
if (t.mode === I.invisible) {
|
|
137
|
-
const r = (A) => {
|
|
138
|
-
try {
|
|
139
|
-
m.current.start();
|
|
140
|
-
} catch (w) {
|
|
141
|
-
console.error("Error starting PoW verification:", w);
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
return document.addEventListener(U, r), () => {
|
|
145
|
-
document.removeEventListener(U, r);
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
return () => {
|
|
149
|
-
};
|
|
150
|
-
}, [t.mode]), t.mode === I.invisible ? null : S(W, { checked: d.isHuman, onChange: async () => {
|
|
151
|
-
f || (g(!0), await m.current.start(), g(!1));
|
|
152
|
-
}, theme: n, labelText: e("WIDGET.I_AM_HUMAN"), error: (o = d.error) == null ? void 0 : o.message, "aria-label": "human checkbox", loading: f });
|
|
153
|
-
};
|
|
154
|
-
export {
|
|
155
|
-
se as default
|
|
156
|
-
};
|
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
import { H as X, s as Z } from "./sha256-Cxc9Hrlx.js";
|
|
2
|
-
import { S as t, u as F, T as ee, j as te, i as ae, U as re, D as se, V as ie, W as oe } from "./hash-CtL1HOjf.js";
|
|
3
|
-
import { H as ne, m as O, t as _, e as T, j as ce, g as le, p as de, k as he, n as C, s as G } from "./toU8a-BWKf-2UU.js";
|
|
4
|
-
import { a as ue } from "./asU8a-JliaME7-.js";
|
|
5
|
-
class P extends ne {
|
|
6
|
-
constructor(e, o) {
|
|
7
|
-
super(), this.finished = !1, this.destroyed = !1, O(e);
|
|
8
|
-
const a = _(o);
|
|
9
|
-
if (this.iHash = e.create(), typeof this.iHash.update != "function")
|
|
10
|
-
throw new Error("Expected instance of class which extends utils.Hash");
|
|
11
|
-
this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
|
|
12
|
-
const s = this.blockLen, i = new Uint8Array(s);
|
|
13
|
-
i.set(a.length > s ? e.create().update(a).digest() : a);
|
|
14
|
-
for (let n = 0; n < i.length; n++)
|
|
15
|
-
i[n] ^= 54;
|
|
16
|
-
this.iHash.update(i), this.oHash = e.create();
|
|
17
|
-
for (let n = 0; n < i.length; n++)
|
|
18
|
-
i[n] ^= 106;
|
|
19
|
-
this.oHash.update(i), i.fill(0);
|
|
20
|
-
}
|
|
21
|
-
update(e) {
|
|
22
|
-
return T(this), this.iHash.update(e), this;
|
|
23
|
-
}
|
|
24
|
-
digestInto(e) {
|
|
25
|
-
T(this), ce(e, this.outputLen), this.finished = !0, this.iHash.digestInto(e), this.oHash.update(e), this.oHash.digestInto(e), this.destroy();
|
|
26
|
-
}
|
|
27
|
-
digest() {
|
|
28
|
-
const e = new Uint8Array(this.oHash.outputLen);
|
|
29
|
-
return this.digestInto(e), e;
|
|
30
|
-
}
|
|
31
|
-
_cloneInto(e) {
|
|
32
|
-
e || (e = Object.create(Object.getPrototypeOf(this), {}));
|
|
33
|
-
const { oHash: o, iHash: a, finished: s, destroyed: i, blockLen: n, outputLen: c } = this;
|
|
34
|
-
return e = e, e.finished = s, e.destroyed = i, e.blockLen = n, e.outputLen = c, e.oHash = o._cloneInto(e.oHash), e.iHash = a._cloneInto(e.iHash), e;
|
|
35
|
-
}
|
|
36
|
-
destroy() {
|
|
37
|
-
this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
const W = (r, e, o) => new P(r, e).update(o).digest();
|
|
41
|
-
W.create = (r, e) => new P(r, e);
|
|
42
|
-
const [pe, be] = t.split([
|
|
43
|
-
"0x428a2f98d728ae22",
|
|
44
|
-
"0x7137449123ef65cd",
|
|
45
|
-
"0xb5c0fbcfec4d3b2f",
|
|
46
|
-
"0xe9b5dba58189dbbc",
|
|
47
|
-
"0x3956c25bf348b538",
|
|
48
|
-
"0x59f111f1b605d019",
|
|
49
|
-
"0x923f82a4af194f9b",
|
|
50
|
-
"0xab1c5ed5da6d8118",
|
|
51
|
-
"0xd807aa98a3030242",
|
|
52
|
-
"0x12835b0145706fbe",
|
|
53
|
-
"0x243185be4ee4b28c",
|
|
54
|
-
"0x550c7dc3d5ffb4e2",
|
|
55
|
-
"0x72be5d74f27b896f",
|
|
56
|
-
"0x80deb1fe3b1696b1",
|
|
57
|
-
"0x9bdc06a725c71235",
|
|
58
|
-
"0xc19bf174cf692694",
|
|
59
|
-
"0xe49b69c19ef14ad2",
|
|
60
|
-
"0xefbe4786384f25e3",
|
|
61
|
-
"0x0fc19dc68b8cd5b5",
|
|
62
|
-
"0x240ca1cc77ac9c65",
|
|
63
|
-
"0x2de92c6f592b0275",
|
|
64
|
-
"0x4a7484aa6ea6e483",
|
|
65
|
-
"0x5cb0a9dcbd41fbd4",
|
|
66
|
-
"0x76f988da831153b5",
|
|
67
|
-
"0x983e5152ee66dfab",
|
|
68
|
-
"0xa831c66d2db43210",
|
|
69
|
-
"0xb00327c898fb213f",
|
|
70
|
-
"0xbf597fc7beef0ee4",
|
|
71
|
-
"0xc6e00bf33da88fc2",
|
|
72
|
-
"0xd5a79147930aa725",
|
|
73
|
-
"0x06ca6351e003826f",
|
|
74
|
-
"0x142929670a0e6e70",
|
|
75
|
-
"0x27b70a8546d22ffc",
|
|
76
|
-
"0x2e1b21385c26c926",
|
|
77
|
-
"0x4d2c6dfc5ac42aed",
|
|
78
|
-
"0x53380d139d95b3df",
|
|
79
|
-
"0x650a73548baf63de",
|
|
80
|
-
"0x766a0abb3c77b2a8",
|
|
81
|
-
"0x81c2c92e47edaee6",
|
|
82
|
-
"0x92722c851482353b",
|
|
83
|
-
"0xa2bfe8a14cf10364",
|
|
84
|
-
"0xa81a664bbc423001",
|
|
85
|
-
"0xc24b8b70d0f89791",
|
|
86
|
-
"0xc76c51a30654be30",
|
|
87
|
-
"0xd192e819d6ef5218",
|
|
88
|
-
"0xd69906245565a910",
|
|
89
|
-
"0xf40e35855771202a",
|
|
90
|
-
"0x106aa07032bbd1b8",
|
|
91
|
-
"0x19a4c116b8d2d0c8",
|
|
92
|
-
"0x1e376c085141ab53",
|
|
93
|
-
"0x2748774cdf8eeb99",
|
|
94
|
-
"0x34b0bcb5e19b48a8",
|
|
95
|
-
"0x391c0cb3c5c95a63",
|
|
96
|
-
"0x4ed8aa4ae3418acb",
|
|
97
|
-
"0x5b9cca4f7763e373",
|
|
98
|
-
"0x682e6ff3d6b2b8a3",
|
|
99
|
-
"0x748f82ee5defb2fc",
|
|
100
|
-
"0x78a5636f43172f60",
|
|
101
|
-
"0x84c87814a1f0ab72",
|
|
102
|
-
"0x8cc702081a6439ec",
|
|
103
|
-
"0x90befffa23631e28",
|
|
104
|
-
"0xa4506cebde82bde9",
|
|
105
|
-
"0xbef9a3f7b2c67915",
|
|
106
|
-
"0xc67178f2e372532b",
|
|
107
|
-
"0xca273eceea26619c",
|
|
108
|
-
"0xd186b8c721c0c207",
|
|
109
|
-
"0xeada7dd6cde0eb1e",
|
|
110
|
-
"0xf57d4f7fee6ed178",
|
|
111
|
-
"0x06f067aa72176fba",
|
|
112
|
-
"0x0a637dc5a2c898a6",
|
|
113
|
-
"0x113f9804bef90dae",
|
|
114
|
-
"0x1b710b35131c471b",
|
|
115
|
-
"0x28db77f523047d84",
|
|
116
|
-
"0x32caab7b40c72493",
|
|
117
|
-
"0x3c9ebe0a15c9bebc",
|
|
118
|
-
"0x431d67c49c100d4c",
|
|
119
|
-
"0x4cc5d4becb3e42b6",
|
|
120
|
-
"0x597f299cfc657e2a",
|
|
121
|
-
"0x5fcb6fab3ad6faec",
|
|
122
|
-
"0x6c44198c4a475817"
|
|
123
|
-
].map((r) => BigInt(r))), A = /* @__PURE__ */ new Uint32Array(80), L = /* @__PURE__ */ new Uint32Array(80);
|
|
124
|
-
class fe extends X {
|
|
125
|
-
constructor() {
|
|
126
|
-
super(128, 64, 16, !1), this.Ah = 1779033703, this.Al = -205731576, this.Bh = -1150833019, this.Bl = -2067093701, this.Ch = 1013904242, this.Cl = -23791573, this.Dh = -1521486534, this.Dl = 1595750129, this.Eh = 1359893119, this.El = -1377402159, this.Fh = -1694144372, this.Fl = 725511199, this.Gh = 528734635, this.Gl = -79577749, this.Hh = 1541459225, this.Hl = 327033209;
|
|
127
|
-
}
|
|
128
|
-
// prettier-ignore
|
|
129
|
-
get() {
|
|
130
|
-
const { Ah: e, Al: o, Bh: a, Bl: s, Ch: i, Cl: n, Dh: c, Dl: u, Eh: p, El: b, Fh: d, Fl: l, Gh: g, Gl: f, Hh: m, Hl: y } = this;
|
|
131
|
-
return [e, o, a, s, i, n, c, u, p, b, d, l, g, f, m, y];
|
|
132
|
-
}
|
|
133
|
-
// prettier-ignore
|
|
134
|
-
set(e, o, a, s, i, n, c, u, p, b, d, l, g, f, m, y) {
|
|
135
|
-
this.Ah = e | 0, this.Al = o | 0, this.Bh = a | 0, this.Bl = s | 0, this.Ch = i | 0, this.Cl = n | 0, this.Dh = c | 0, this.Dl = u | 0, this.Eh = p | 0, this.El = b | 0, this.Fh = d | 0, this.Fl = l | 0, this.Gh = g | 0, this.Gl = f | 0, this.Hh = m | 0, this.Hl = y | 0;
|
|
136
|
-
}
|
|
137
|
-
process(e, o) {
|
|
138
|
-
for (let h = 0; h < 16; h++, o += 4)
|
|
139
|
-
A[h] = e.getUint32(o), L[h] = e.getUint32(o += 4);
|
|
140
|
-
for (let h = 16; h < 80; h++) {
|
|
141
|
-
const k = A[h - 15] | 0, H = L[h - 15] | 0, B = t.rotrSH(k, H, 1) ^ t.rotrSH(k, H, 8) ^ t.shrSH(k, H, 7), E = t.rotrSL(k, H, 1) ^ t.rotrSL(k, H, 8) ^ t.shrSL(k, H, 7), w = A[h - 2] | 0, v = L[h - 2] | 0, j = t.rotrSH(w, v, 19) ^ t.rotrBH(w, v, 61) ^ t.shrSH(w, v, 6), I = t.rotrSL(w, v, 19) ^ t.rotrBL(w, v, 61) ^ t.shrSL(w, v, 6), z = t.add4L(E, I, L[h - 7], L[h - 16]), D = t.add4H(z, B, j, A[h - 7], A[h - 16]);
|
|
142
|
-
A[h] = D | 0, L[h] = z | 0;
|
|
143
|
-
}
|
|
144
|
-
let { Ah: a, Al: s, Bh: i, Bl: n, Ch: c, Cl: u, Dh: p, Dl: b, Eh: d, El: l, Fh: g, Fl: f, Gh: m, Gl: y, Hh: x, Hl: S } = this;
|
|
145
|
-
for (let h = 0; h < 80; h++) {
|
|
146
|
-
const k = t.rotrSH(d, l, 14) ^ t.rotrSH(d, l, 18) ^ t.rotrBH(d, l, 41), H = t.rotrSL(d, l, 14) ^ t.rotrSL(d, l, 18) ^ t.rotrBL(d, l, 41), B = d & g ^ ~d & m, E = l & f ^ ~l & y, w = t.add5L(S, H, E, be[h], L[h]), v = t.add5H(w, x, k, B, pe[h], A[h]), j = w | 0, I = t.rotrSH(a, s, 28) ^ t.rotrBH(a, s, 34) ^ t.rotrBH(a, s, 39), z = t.rotrSL(a, s, 28) ^ t.rotrBL(a, s, 34) ^ t.rotrBL(a, s, 39), D = a & i ^ a & c ^ i & c, Q = s & n ^ s & u ^ n & u;
|
|
147
|
-
x = m | 0, S = y | 0, m = g | 0, y = f | 0, g = d | 0, f = l | 0, { h: d, l } = t.add(p | 0, b | 0, v | 0, j | 0), p = c | 0, b = u | 0, c = i | 0, u = n | 0, i = a | 0, n = s | 0;
|
|
148
|
-
const U = t.add3L(j, z, Q);
|
|
149
|
-
a = t.add3H(U, v, I, D), s = U | 0;
|
|
150
|
-
}
|
|
151
|
-
({ h: a, l: s } = t.add(this.Ah | 0, this.Al | 0, a | 0, s | 0)), { h: i, l: n } = t.add(this.Bh | 0, this.Bl | 0, i | 0, n | 0), { h: c, l: u } = t.add(this.Ch | 0, this.Cl | 0, c | 0, u | 0), { h: p, l: b } = t.add(this.Dh | 0, this.Dl | 0, p | 0, b | 0), { h: d, l } = t.add(this.Eh | 0, this.El | 0, d | 0, l | 0), { h: g, l: f } = t.add(this.Fh | 0, this.Fl | 0, g | 0, f | 0), { h: m, l: y } = t.add(this.Gh | 0, this.Gl | 0, m | 0, y | 0), { h: x, l: S } = t.add(this.Hh | 0, this.Hl | 0, x | 0, S | 0), this.set(a, s, i, n, c, u, p, b, d, l, g, f, m, y, x, S);
|
|
152
|
-
}
|
|
153
|
-
roundClean() {
|
|
154
|
-
A.fill(0), L.fill(0);
|
|
155
|
-
}
|
|
156
|
-
destroy() {
|
|
157
|
-
this.buffer.fill(0), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
const K = /* @__PURE__ */ le(() => new fe());
|
|
161
|
-
function me(r, e, o, a) {
|
|
162
|
-
O(r);
|
|
163
|
-
const s = he({ dkLen: 32, asyncTick: 10 }, a), { c: i, dkLen: n, asyncTick: c } = s;
|
|
164
|
-
if (C(i), C(n), C(c), i < 1)
|
|
165
|
-
throw new Error("PBKDF2: iterations (c) should be >= 1");
|
|
166
|
-
const u = _(e), p = _(o), b = new Uint8Array(n), d = W.create(r, u), l = d._cloneInto().update(p);
|
|
167
|
-
return { c: i, dkLen: n, asyncTick: c, DK: b, PRF: d, PRFSalt: l };
|
|
168
|
-
}
|
|
169
|
-
function ge(r, e, o, a, s) {
|
|
170
|
-
return r.destroy(), e.destroy(), a && a.destroy(), s.fill(0), o;
|
|
171
|
-
}
|
|
172
|
-
function ye(r, e, o, a) {
|
|
173
|
-
const { c: s, dkLen: i, DK: n, PRF: c, PRFSalt: u } = me(r, e, o, a);
|
|
174
|
-
let p;
|
|
175
|
-
const b = new Uint8Array(4), d = de(b), l = new Uint8Array(c.outputLen);
|
|
176
|
-
for (let g = 1, f = 0; f < i; g++, f += c.outputLen) {
|
|
177
|
-
const m = n.subarray(f, f + c.outputLen);
|
|
178
|
-
d.setInt32(0, g, !1), (p = u._cloneInto(p)).update(b).digestInto(l), m.set(l.subarray(0, m.length));
|
|
179
|
-
for (let y = 1; y < s; y++) {
|
|
180
|
-
c._cloneInto(p).update(l).digestInto(l);
|
|
181
|
-
for (let x = 0; x < m.length; x++)
|
|
182
|
-
m[x] ^= l[x];
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
return ge(c, u, n, p, l);
|
|
186
|
-
}
|
|
187
|
-
function xe(r, e = ue(), o = 2048, a) {
|
|
188
|
-
const s = F(r), i = F(e);
|
|
189
|
-
return {
|
|
190
|
-
password: !te || ae() ? ee(s, i, o) : ye(K, s, i, { c: o, dkLen: 64 }),
|
|
191
|
-
rounds: o,
|
|
192
|
-
salt: e
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
const we = /* @__PURE__ */ se({ 256: oe, 512: ie }, { 256: Z, 512: K }), ve = /* @__PURE__ */ re(256, we), N = "abandon|ability|able|about|above|absent|absorb|abstract|absurd|abuse|access|accident|account|accuse|achieve|acid|acoustic|acquire|across|act|action|actor|actress|actual|adapt|add|addict|address|adjust|admit|adult|advance|advice|aerobic|affair|afford|afraid|again|age|agent|agree|ahead|aim|air|airport|aisle|alarm|album|alcohol|alert|alien|all|alley|allow|almost|alone|alpha|already|also|alter|always|amateur|amazing|among|amount|amused|analyst|anchor|ancient|anger|angle|angry|animal|ankle|announce|annual|another|answer|antenna|antique|anxiety|any|apart|apology|appear|apple|approve|april|arch|arctic|area|arena|argue|arm|armed|armor|army|around|arrange|arrest|arrive|arrow|art|artefact|artist|artwork|ask|aspect|assault|asset|assist|assume|asthma|athlete|atom|attack|attend|attitude|attract|auction|audit|august|aunt|author|auto|autumn|average|avocado|avoid|awake|aware|away|awesome|awful|awkward|axis|baby|bachelor|bacon|badge|bag|balance|balcony|ball|bamboo|banana|banner|bar|barely|bargain|barrel|base|basic|basket|battle|beach|bean|beauty|because|become|beef|before|begin|behave|behind|believe|below|belt|bench|benefit|best|betray|better|between|beyond|bicycle|bid|bike|bind|biology|bird|birth|bitter|black|blade|blame|blanket|blast|bleak|bless|blind|blood|blossom|blouse|blue|blur|blush|board|boat|body|boil|bomb|bone|bonus|book|boost|border|boring|borrow|boss|bottom|bounce|box|boy|bracket|brain|brand|brass|brave|bread|breeze|brick|bridge|brief|bright|bring|brisk|broccoli|broken|bronze|broom|brother|brown|brush|bubble|buddy|budget|buffalo|build|bulb|bulk|bullet|bundle|bunker|burden|burger|burst|bus|business|busy|butter|buyer|buzz|cabbage|cabin|cable|cactus|cage|cake|call|calm|camera|camp|can|canal|cancel|candy|cannon|canoe|canvas|canyon|capable|capital|captain|car|carbon|card|cargo|carpet|carry|cart|case|cash|casino|castle|casual|cat|catalog|catch|category|cattle|caught|cause|caution|cave|ceiling|celery|cement|census|century|cereal|certain|chair|chalk|champion|change|chaos|chapter|charge|chase|chat|cheap|check|cheese|chef|cherry|chest|chicken|chief|child|chimney|choice|choose|chronic|chuckle|chunk|churn|cigar|cinnamon|circle|citizen|city|civil|claim|clap|clarify|claw|clay|clean|clerk|clever|click|client|cliff|climb|clinic|clip|clock|clog|close|cloth|cloud|clown|club|clump|cluster|clutch|coach|coast|coconut|code|coffee|coil|coin|collect|color|column|combine|come|comfort|comic|common|company|concert|conduct|confirm|congress|connect|consider|control|convince|cook|cool|copper|copy|coral|core|corn|correct|cost|cotton|couch|country|couple|course|cousin|cover|coyote|crack|cradle|craft|cram|crane|crash|crater|crawl|crazy|cream|credit|creek|crew|cricket|crime|crisp|critic|crop|cross|crouch|crowd|crucial|cruel|cruise|crumble|crunch|crush|cry|crystal|cube|culture|cup|cupboard|curious|current|curtain|curve|cushion|custom|cute|cycle|dad|damage|damp|dance|danger|daring|dash|daughter|dawn|day|deal|debate|debris|decade|december|decide|decline|decorate|decrease|deer|defense|define|defy|degree|delay|deliver|demand|demise|denial|dentist|deny|depart|depend|deposit|depth|deputy|derive|describe|desert|design|desk|despair|destroy|detail|detect|develop|device|devote|diagram|dial|diamond|diary|dice|diesel|diet|differ|digital|dignity|dilemma|dinner|dinosaur|direct|dirt|disagree|discover|disease|dish|dismiss|disorder|display|distance|divert|divide|divorce|dizzy|doctor|document|dog|doll|dolphin|domain|donate|donkey|donor|door|dose|double|dove|draft|dragon|drama|drastic|draw|dream|dress|drift|drill|drink|drip|drive|drop|drum|dry|duck|dumb|dune|during|dust|dutch|duty|dwarf|dynamic|eager|eagle|early|earn|earth|easily|east|easy|echo|ecology|economy|edge|edit|educate|effort|egg|eight|either|elbow|elder|electric|elegant|element|elephant|elevator|elite|else|embark|embody|embrace|emerge|emotion|employ|empower|empty|enable|enact|end|endless|endorse|enemy|energy|enforce|engage|engine|enhance|enjoy|enlist|enough|enrich|enroll|ensure|enter|entire|entry|envelope|episode|equal|equip|era|erase|erode|erosion|error|erupt|escape|essay|essence|estate|eternal|ethics|evidence|evil|evoke|evolve|exact|example|excess|exchange|excite|exclude|excuse|execute|exercise|exhaust|exhibit|exile|exist|exit|exotic|expand|expect|expire|explain|expose|express|extend|extra|eye|eyebrow|fabric|face|faculty|fade|faint|faith|fall|false|fame|family|famous|fan|fancy|fantasy|farm|fashion|fat|fatal|father|fatigue|fault|favorite|feature|february|federal|fee|feed|feel|female|fence|festival|fetch|fever|few|fiber|fiction|field|figure|file|film|filter|final|find|fine|finger|finish|fire|firm|first|fiscal|fish|fit|fitness|fix|flag|flame|flash|flat|flavor|flee|flight|flip|float|flock|floor|flower|fluid|flush|fly|foam|focus|fog|foil|fold|follow|food|foot|force|forest|forget|fork|fortune|forum|forward|fossil|foster|found|fox|fragile|frame|frequent|fresh|friend|fringe|frog|front|frost|frown|frozen|fruit|fuel|fun|funny|furnace|fury|future|gadget|gain|galaxy|gallery|game|gap|garage|garbage|garden|garlic|garment|gas|gasp|gate|gather|gauge|gaze|general|genius|genre|gentle|genuine|gesture|ghost|giant|gift|giggle|ginger|giraffe|girl|give|glad|glance|glare|glass|glide|glimpse|globe|gloom|glory|glove|glow|glue|goat|goddess|gold|good|goose|gorilla|gospel|gossip|govern|gown|grab|grace|grain|grant|grape|grass|gravity|great|green|grid|grief|grit|grocery|group|grow|grunt|guard|guess|guide|guilt|guitar|gun|gym|habit|hair|half|hammer|hamster|hand|happy|harbor|hard|harsh|harvest|hat|have|hawk|hazard|head|health|heart|heavy|hedgehog|height|hello|helmet|help|hen|hero|hidden|high|hill|hint|hip|hire|history|hobby|hockey|hold|hole|holiday|hollow|home|honey|hood|hope|horn|horror|horse|hospital|host|hotel|hour|hover|hub|huge|human|humble|humor|hundred|hungry|hunt|hurdle|hurry|hurt|husband|hybrid|ice|icon|idea|identify|idle|ignore|ill|illegal|illness|image|imitate|immense|immune|impact|impose|improve|impulse|inch|include|income|increase|index|indicate|indoor|industry|infant|inflict|inform|inhale|inherit|initial|inject|injury|inmate|inner|innocent|input|inquiry|insane|insect|inside|inspire|install|intact|interest|into|invest|invite|involve|iron|island|isolate|issue|item|ivory|jacket|jaguar|jar|jazz|jealous|jeans|jelly|jewel|job|join|joke|journey|joy|judge|juice|jump|jungle|junior|junk|just|kangaroo|keen|keep|ketchup|key|kick|kid|kidney|kind|kingdom|kiss|kit|kitchen|kite|kitten|kiwi|knee|knife|knock|know|lab|label|labor|ladder|lady|lake|lamp|language|laptop|large|later|latin|laugh|laundry|lava|law|lawn|lawsuit|layer|lazy|leader|leaf|learn|leave|lecture|left|leg|legal|legend|leisure|lemon|lend|length|lens|leopard|lesson|letter|level|liar|liberty|library|license|life|lift|light|like|limb|limit|link|lion|liquid|list|little|live|lizard|load|loan|lobster|local|lock|logic|lonely|long|loop|lottery|loud|lounge|love|loyal|lucky|luggage|lumber|lunar|lunch|luxury|lyrics|machine|mad|magic|magnet|maid|mail|main|major|make|mammal|man|manage|mandate|mango|mansion|manual|maple|marble|march|margin|marine|market|marriage|mask|mass|master|match|material|math|matrix|matter|maximum|maze|meadow|mean|measure|meat|mechanic|medal|media|melody|melt|member|memory|mention|menu|mercy|merge|merit|merry|mesh|message|metal|method|middle|midnight|milk|million|mimic|mind|minimum|minor|minute|miracle|mirror|misery|miss|mistake|mix|mixed|mixture|mobile|model|modify|mom|moment|monitor|monkey|monster|month|moon|moral|more|morning|mosquito|mother|motion|motor|mountain|mouse|move|movie|much|muffin|mule|multiply|muscle|museum|mushroom|music|must|mutual|myself|mystery|myth|naive|name|napkin|narrow|nasty|nation|nature|near|neck|need|negative|neglect|neither|nephew|nerve|nest|net|network|neutral|never|news|next|nice|night|noble|noise|nominee|noodle|normal|north|nose|notable|note|nothing|notice|novel|now|nuclear|number|nurse|nut|oak|obey|object|oblige|obscure|observe|obtain|obvious|occur|ocean|october|odor|off|offer|office|often|oil|okay|old|olive|olympic|omit|once|one|onion|online|only|open|opera|opinion|oppose|option|orange|orbit|orchard|order|ordinary|organ|orient|original|orphan|ostrich|other|outdoor|outer|output|outside|oval|oven|over|own|owner|oxygen|oyster|ozone|pact|paddle|page|pair|palace|palm|panda|panel|panic|panther|paper|parade|parent|park|parrot|party|pass|patch|path|patient|patrol|pattern|pause|pave|payment|peace|peanut|pear|peasant|pelican|pen|penalty|pencil|people|pepper|perfect|permit|person|pet|phone|photo|phrase|physical|piano|picnic|picture|piece|pig|pigeon|pill|pilot|pink|pioneer|pipe|pistol|pitch|pizza|place|planet|plastic|plate|play|please|pledge|pluck|plug|plunge|poem|poet|point|polar|pole|police|pond|pony|pool|popular|portion|position|possible|post|potato|pottery|poverty|powder|power|practice|praise|predict|prefer|prepare|present|pretty|prevent|price|pride|primary|print|priority|prison|private|prize|problem|process|produce|profit|program|project|promote|proof|property|prosper|protect|proud|provide|public|pudding|pull|pulp|pulse|pumpkin|punch|pupil|puppy|purchase|purity|purpose|purse|push|put|puzzle|pyramid|quality|quantum|quarter|question|quick|quit|quiz|quote|rabbit|raccoon|race|rack|radar|radio|rail|rain|raise|rally|ramp|ranch|random|range|rapid|rare|rate|rather|raven|raw|razor|ready|real|reason|rebel|rebuild|recall|receive|recipe|record|recycle|reduce|reflect|reform|refuse|region|regret|regular|reject|relax|release|relief|rely|remain|remember|remind|remove|render|renew|rent|reopen|repair|repeat|replace|report|require|rescue|resemble|resist|resource|response|result|retire|retreat|return|reunion|reveal|review|reward|rhythm|rib|ribbon|rice|rich|ride|ridge|rifle|right|rigid|ring|riot|ripple|risk|ritual|rival|river|road|roast|robot|robust|rocket|romance|roof|rookie|room|rose|rotate|rough|round|route|royal|rubber|rude|rug|rule|run|runway|rural|sad|saddle|sadness|safe|sail|salad|salmon|salon|salt|salute|same|sample|sand|satisfy|satoshi|sauce|sausage|save|say|scale|scan|scare|scatter|scene|scheme|school|science|scissors|scorpion|scout|scrap|screen|script|scrub|sea|search|season|seat|second|secret|section|security|seed|seek|segment|select|sell|seminar|senior|sense|sentence|series|service|session|settle|setup|seven|shadow|shaft|shallow|share|shed|shell|sheriff|shield|shift|shine|ship|shiver|shock|shoe|shoot|shop|short|shoulder|shove|shrimp|shrug|shuffle|shy|sibling|sick|side|siege|sight|sign|silent|silk|silly|silver|similar|simple|since|sing|siren|sister|situate|six|size|skate|sketch|ski|skill|skin|skirt|skull|slab|slam|sleep|slender|slice|slide|slight|slim|slogan|slot|slow|slush|small|smart|smile|smoke|smooth|snack|snake|snap|sniff|snow|soap|soccer|social|sock|soda|soft|solar|soldier|solid|solution|solve|someone|song|soon|sorry|sort|soul|sound|soup|source|south|space|spare|spatial|spawn|speak|special|speed|spell|spend|sphere|spice|spider|spike|spin|spirit|split|spoil|sponsor|spoon|sport|spot|spray|spread|spring|spy|square|squeeze|squirrel|stable|stadium|staff|stage|stairs|stamp|stand|start|state|stay|steak|steel|stem|step|stereo|stick|still|sting|stock|stomach|stone|stool|story|stove|strategy|street|strike|strong|struggle|student|stuff|stumble|style|subject|submit|subway|success|such|sudden|suffer|sugar|suggest|suit|summer|sun|sunny|sunset|super|supply|supreme|sure|surface|surge|surprise|surround|survey|suspect|sustain|swallow|swamp|swap|swarm|swear|sweet|swift|swim|swing|switch|sword|symbol|symptom|syrup|system|table|tackle|tag|tail|talent|talk|tank|tape|target|task|taste|tattoo|taxi|teach|team|tell|ten|tenant|tennis|tent|term|test|text|thank|that|theme|then|theory|there|they|thing|this|thought|three|thrive|throw|thumb|thunder|ticket|tide|tiger|tilt|timber|time|tiny|tip|tired|tissue|title|toast|tobacco|today|toddler|toe|together|toilet|token|tomato|tomorrow|tone|tongue|tonight|tool|tooth|top|topic|topple|torch|tornado|tortoise|toss|total|tourist|toward|tower|town|toy|track|trade|traffic|tragic|train|transfer|trap|trash|travel|tray|treat|tree|trend|trial|tribe|trick|trigger|trim|trip|trophy|trouble|truck|true|truly|trumpet|trust|truth|try|tube|tuition|tumble|tuna|tunnel|turkey|turn|turtle|twelve|twenty|twice|twin|twist|two|type|typical|ugly|umbrella|unable|unaware|uncle|uncover|under|undo|unfair|unfold|unhappy|uniform|unique|unit|universe|unknown|unlock|until|unusual|unveil|update|upgrade|uphold|upon|upper|upset|urban|urge|usage|use|used|useful|useless|usual|utility|vacant|vacuum|vague|valid|valley|valve|van|vanish|vapor|various|vast|vault|vehicle|velvet|vendor|venture|venue|verb|verify|version|very|vessel|veteran|viable|vibrant|vicious|victory|video|view|village|vintage|violin|virtual|virus|visa|visit|visual|vital|vivid|vocal|voice|void|volcano|volume|vote|voyage|wage|wagon|wait|walk|wall|walnut|want|warfare|warm|warrior|wash|wasp|waste|water|wave|way|wealth|weapon|wear|weasel|weather|web|wedding|weekend|weird|welcome|west|wet|whale|what|wheat|wheel|when|where|whip|whisper|wide|width|wife|wild|will|win|window|wine|wing|wink|winner|winter|wire|wisdom|wise|wish|witness|wolf|woman|wonder|wood|wool|word|work|world|worry|worth|wrap|wreck|wrestle|wrist|write|wrong|yard|year|yellow|you|young|youth|zebra|zero|zone|zoo".split("|"), M = "Invalid mnemonic", R = "Invalid entropy", ke = "Invalid mnemonic checksum";
|
|
196
|
-
function q(r) {
|
|
197
|
-
return (r || "").normalize("NFKD");
|
|
198
|
-
}
|
|
199
|
-
function V(r) {
|
|
200
|
-
return parseInt(r, 2);
|
|
201
|
-
}
|
|
202
|
-
function J(r) {
|
|
203
|
-
return r.map((e) => e.toString(2).padStart(8, "0")).join("");
|
|
204
|
-
}
|
|
205
|
-
function $(r) {
|
|
206
|
-
return J(Array.from(ve(r))).slice(0, r.length * 8 / 32);
|
|
207
|
-
}
|
|
208
|
-
function He(r, e) {
|
|
209
|
-
return xe(G(q(r)), G(`mnemonic${q(e)}`)).password;
|
|
210
|
-
}
|
|
211
|
-
function Y(r, e = N) {
|
|
212
|
-
const o = q(r).split(" ");
|
|
213
|
-
if (o.length % 3 !== 0)
|
|
214
|
-
throw new Error(M);
|
|
215
|
-
const a = o.map((b) => {
|
|
216
|
-
const d = e.indexOf(b);
|
|
217
|
-
if (d === -1)
|
|
218
|
-
throw new Error(M);
|
|
219
|
-
return d.toString(2).padStart(11, "0");
|
|
220
|
-
}).join(""), s = Math.floor(a.length / 33) * 32, i = a.slice(0, s), n = a.slice(s), c = i.match(/(.{1,8})/g), u = c == null ? void 0 : c.map(V);
|
|
221
|
-
if (!u || u.length % 4 !== 0 || u.length < 16 || u.length > 32)
|
|
222
|
-
throw new Error(R);
|
|
223
|
-
const p = F(u);
|
|
224
|
-
if ($(p) !== n)
|
|
225
|
-
throw new Error(ke);
|
|
226
|
-
return p;
|
|
227
|
-
}
|
|
228
|
-
function Ae(r, e = N) {
|
|
229
|
-
if (r.length % 4 !== 0 || r.length < 16 || r.length > 32)
|
|
230
|
-
throw new Error(R);
|
|
231
|
-
const o = `${J(Array.from(r))}${$(r)}`.match(/(.{1,11})/g), a = o == null ? void 0 : o.map((s) => e[V(s)]);
|
|
232
|
-
if (!a || a.length < 12)
|
|
233
|
-
throw new Error("Unable to map entropy to mnemonic");
|
|
234
|
-
return a.join(" ");
|
|
235
|
-
}
|
|
236
|
-
function Le(r, e) {
|
|
237
|
-
try {
|
|
238
|
-
Y(r, e);
|
|
239
|
-
} catch {
|
|
240
|
-
return !1;
|
|
241
|
-
}
|
|
242
|
-
return !0;
|
|
243
|
-
}
|
|
244
|
-
const Ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
245
|
-
__proto__: null,
|
|
246
|
-
entropyToMnemonic: Ae,
|
|
247
|
-
mnemonicToEntropy: Y,
|
|
248
|
-
mnemonicToSeedSync: He,
|
|
249
|
-
validateMnemonic: Le
|
|
250
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
251
|
-
export {
|
|
252
|
-
He as a,
|
|
253
|
-
ye as b,
|
|
254
|
-
Ee as c,
|
|
255
|
-
W as h,
|
|
256
|
-
Y as m,
|
|
257
|
-
xe as p,
|
|
258
|
-
K as s,
|
|
259
|
-
Le as v
|
|
260
|
-
};
|