@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,504 +0,0 @@
|
|
|
1
|
-
function g(t, e, o) {
|
|
2
|
-
if (t.length === 0)
|
|
3
|
-
throw new Error("Array is empty");
|
|
4
|
-
if (!Number.isFinite(e))
|
|
5
|
-
throw new Error(`Index ${e} is not a finite number`);
|
|
6
|
-
if (e > 0 ? e = e % t.length : e = Math.ceil(Math.abs(e) / t.length) * t.length + e, e >= t.length)
|
|
7
|
-
throw new Error(`Index ${e} larger than array length ${t.length}`);
|
|
8
|
-
if (e < 0)
|
|
9
|
-
throw new Error(`Index ${e} smaller than 0`);
|
|
10
|
-
return t[e];
|
|
11
|
-
}
|
|
12
|
-
var l;
|
|
13
|
-
(function(t) {
|
|
14
|
-
t.image = "image", t.pow = "pow", t.frictionless = "frictionless";
|
|
15
|
-
})(l || (l = {}));
|
|
16
|
-
let u;
|
|
17
|
-
async function T(t) {
|
|
18
|
-
return new Promise((e, o) => {
|
|
19
|
-
try {
|
|
20
|
-
import("./i18nFrontend-C_RgmvGh.js").then((a) => a.b).then(({ default: a }) => {
|
|
21
|
-
u || (u = a()), e(u);
|
|
22
|
-
});
|
|
23
|
-
} catch (a) {
|
|
24
|
-
o(a);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
const k = (t) => {
|
|
29
|
-
const e = window[t.replace("window.", "")];
|
|
30
|
-
if (typeof e != "function")
|
|
31
|
-
throw new Error(`Callback ${t} is not defined on the window object`);
|
|
32
|
-
return e;
|
|
33
|
-
}, S = "https://prosopo.io", R = "Visit prosopo.io to learn more about the service and its accessibility options.", I = 74, f = 80, A = "80px", m = "302px", W = "8px", D = "2px", $ = "1px solid", w = "checkbox__loading-spinner";
|
|
34
|
-
function L(t) {
|
|
35
|
-
const e = document.createElement("div");
|
|
36
|
-
return e.className = "checkbox", e.innerHTML = z(t) + q, e;
|
|
37
|
-
}
|
|
38
|
-
const M = (t) => (t.shadowRoot || t).querySelector(".checkbox__content"), q = `
|
|
39
|
-
<div class="checkbox__outer">
|
|
40
|
-
<div class="checkbox__wrapper">
|
|
41
|
-
<div class="checkbox__inner">
|
|
42
|
-
<div class="checkbox__content">
|
|
43
|
-
<div class="${w}" aria-label="Loading spinner"></div>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
`, z = (t) => `
|
|
49
|
-
<style>
|
|
50
|
-
.checkbox {
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: column;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.checkbox__outer {
|
|
56
|
-
align-items: center;
|
|
57
|
-
flex: 1;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.checkbox__wrapper {
|
|
61
|
-
display: flex;
|
|
62
|
-
align-items: center;
|
|
63
|
-
justify-content: center;
|
|
64
|
-
flex-direction: column;
|
|
65
|
-
vertical-align: middle;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.checkbox__inner {
|
|
69
|
-
display: flex;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.checkbox__content {
|
|
73
|
-
display: inline-flex;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.${w} {
|
|
77
|
-
margin-top: 0;
|
|
78
|
-
margin-left: 15px;
|
|
79
|
-
margin-right: 15px;
|
|
80
|
-
width: 2em;
|
|
81
|
-
height: 2em;
|
|
82
|
-
border: 4px solid ${t.palette.background.contrastText};
|
|
83
|
-
border-bottom-color: transparent;
|
|
84
|
-
border-radius: 50%;
|
|
85
|
-
display: inherit;
|
|
86
|
-
box-sizing: border-box;
|
|
87
|
-
animation: checkbox__loading-spinner-rotation 1s linear infinite;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
@keyframes ${w}-rotation {
|
|
91
|
-
0% {
|
|
92
|
-
transform: rotate(0deg);
|
|
93
|
-
}
|
|
94
|
-
100% {
|
|
95
|
-
transform: rotate(360deg);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
</style>
|
|
99
|
-
`;
|
|
100
|
-
function N(t) {
|
|
101
|
-
const e = document.createElement("div");
|
|
102
|
-
return e.className = "logo", e.innerHTML = P + H(t), e;
|
|
103
|
-
}
|
|
104
|
-
const P = `
|
|
105
|
-
<style>
|
|
106
|
-
.logo {
|
|
107
|
-
display: inline-flex;
|
|
108
|
-
flex-direction: column;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.logo__outer {
|
|
112
|
-
flex:1;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.logo__wrapper {
|
|
116
|
-
padding: 4px;
|
|
117
|
-
flex: 1 1 0;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.logo__inner {
|
|
121
|
-
padding: 4px;
|
|
122
|
-
}
|
|
123
|
-
</style>
|
|
124
|
-
`;
|
|
125
|
-
function H(t) {
|
|
126
|
-
return `
|
|
127
|
-
<a href="${S}"
|
|
128
|
-
target="_blank"
|
|
129
|
-
aria-label="${R}">
|
|
130
|
-
<div class="logo__outer">
|
|
131
|
-
<div class="logo__wrapper">
|
|
132
|
-
<div class="logo__inner">
|
|
133
|
-
<svg class="prosopo-logo"
|
|
134
|
-
id="logo-with-text"
|
|
135
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
136
|
-
viewBox="0 0 468.67004 487.99998"
|
|
137
|
-
height="35px"
|
|
138
|
-
style="fill: ${t.palette.logoFill};"
|
|
139
|
-
aria-label="Prosopo Logo With Text">
|
|
140
|
-
<title>Prosopo Logo With Text</title>
|
|
141
|
-
<g id="g1960" transform="translate(0,-35.903035)">
|
|
142
|
-
<g id="g943" transform="matrix(0.82220888,0,0,0.82220888,103.56268,35.903035)">
|
|
143
|
-
<path d="m 335.55,1825.19 a 147.75,147.75 0 0 1 147.75,147.75 h 50.5 c 0,-109.49 -88.76,-198.25 -198.25,-198.25 z"
|
|
144
|
-
transform="translate(-215.73,-1774.69)" id="path8"></path>
|
|
145
|
-
<path d="m 269.36,1891.39 a 147.74,147.74 0 0 1 147.74,147.74 h 50.5 c 0,-109.49 -88.75,-198.24 -198.24,-198.24 z"
|
|
146
|
-
transform="translate(-215.73,-1774.69)" id="path10"></path>
|
|
147
|
-
<path d="M 414,2157.17 A 147.75,147.75 0 0 1 266.26,2009.43 h -50.5 c 0,109.49 88.75,198.24 198.24,198.24 z"
|
|
148
|
-
transform="translate(-215.73,-1774.69)" id="path12"></path>
|
|
149
|
-
<path d="M 480.17,2091 A 147.74,147.74 0 0 1 332.43,1943.25 h -50.51 c 0,109.49 88.76,198.25 198.25,198.25 z"
|
|
150
|
-
transform="translate(-215.73,-1774.69)" id="path14"></path>
|
|
151
|
-
</g>
|
|
152
|
-
<g id="g937" transform="translate(-3.3873724,-118.52322)">
|
|
153
|
-
<path d="m 63.842242,576.50288 q -7.89541,6.5896 -22.55626,6.5896 h -18.73684 v 32.33977 H 3.8901421 v -89.9368 H 42.516842 q 13.35216,0 21.29081,6.95569 7.93866,6.95569 7.94154,21.53871 -0.009,15.92343 -7.90695,22.51303 z m -14.35529,-32.40032 q -3.56577,-2.98636 -10.00259,-2.99212 h -16.92369 v 26.48235 h 16.93522 q 6.43394,0 10.00259,-3.23426 3.56864,-3.23427 3.57153,-10.2505 0,-7.01334 -3.58306,-10.00547 z"
|
|
154
|
-
id="path16" style="stroke-width: 0.288259px;"></path>
|
|
155
|
-
<path d="m 116.56193,547.36566 c 0.22484,0.0231 0.72353,0.0548 1.49607,0.0922 v 17.81729 c -1.09827,-0.12107 -2.07547,-0.20466 -2.92872,-0.24502 -0.85324,-0.0404 -1.54506,-0.0605 -2.07546,-0.0605 q -10.49263,0 -14.092978,6.83462 -2.01782,3.84249 -2.01782,11.83591 v 31.79205 h -17.50885 v -66.51 h 16.59796 v 11.58225 q 4.035618,-6.65013 7.016218,-9.09169 4.88311,-4.08751 12.6834,-4.08751 c 0.34302,0.0115 0.60822,0.0202 0.83018,0.0404 z"
|
|
156
|
-
id="path18" style="stroke-width: 0.288259px;"></path>
|
|
157
|
-
<path d="m 179.9645,607.2947 q -8.42005,10.39462 -25.56569,10.39462 -17.14565,0 -25.56569,-10.39462 -8.43446,-10.39462 -8.43446,-25.02664 0,-14.38413 8.42293,-24.93441 8.42292,-10.55028 25.56569,-10.54739 17.14276,0 25.56569,10.54739 8.42292,10.5474 8.42004,24.93441 0.0115,14.63202 -8.40851,25.02664 z m -13.91138,-9.60479 q 4.08463,-5.42215 4.08751,-15.41609 0.003,-9.99394 -4.08751,-15.38438 -4.0904,-5.39044 -11.71485,-5.39332 -7.62445,-0.003 -11.74367,5.38756 -4.11922,5.3962 -4.11922,15.38438 0,9.98817 4.11922,15.42185 4.11634,5.42216 11.74655,5.42216 7.63022,0 11.71197,-5.42216 z"
|
|
158
|
-
id="path20" style="stroke-width: 0.288259px;"></path>
|
|
159
|
-
<path d="m 210.56895,594.19621 q 0.55346,4.64097 2.38967,6.59249 3.25156,3.4764 12.0204,3.4764 5.14542,0 8.18367,-1.52489 3.03825,-1.52489 3.03537,-4.57755 a 4.9349939,4.9349939 0 0 0 -2.44444,-4.4536 q -2.44732,-1.52201 -18.1949,-5.24632 -11.33723,-2.80476 -15.97243,-7.0191 -4.63521,-4.14805 -4.63809,-11.95987 0,-9.22429 7.24683,-15.83407 7.24683,-6.60978 20.39432,-6.62995 12.47009,0 20.33091,4.97246 7.86082,4.97247 9.01962,17.17736 h -17.39066 q -0.36609,-3.35534 -1.89675,-5.30973 -2.88259,-3.53694 -9.8008,-3.53982 -5.69023,0 -8.10873,1.76991 -2.41849,1.76991 -2.41561,4.15093 c 0,1.99187 0.86478,3.43893 2.57127,4.32388 q 2.56263,1.40959 18.16032,4.82258 10.37732,2.43867 15.5804,7.38231 5.12236,5.00129 5.12524,12.50756 0,9.88728 -7.3679,16.1425 -7.3679,6.25522 -22.77246,6.25522 -15.71299,0 -23.20196,-6.62996 -7.48897,-6.62995 -7.49474,-16.8718 z"
|
|
160
|
-
id="path22" style="stroke-width: 0.288259px;"></path>
|
|
161
|
-
<path d="m 318.29999,607.2947 q -8.42293,10.39462 -25.56858,10.39462 -17.14564,0 -25.56569,-10.39462 -8.41716,-10.39462 -8.42004,-25.02664 0,-14.38413 8.42004,-24.93441 8.42005,-10.55028 25.56569,-10.54739 17.14853,0 25.56858,10.54739 8.42004,10.5474 8.42004,24.93441 0,14.63202 -8.42004,25.02664 z m -13.91427,-9.60479 q 4.0904,-5.42215 4.0904,-15.41609 0,-9.99394 -4.0904,-15.38438 -4.08751,-5.39044 -11.71484,-5.39332 -7.62733,-0.003 -11.74656,5.39332 -4.11633,5.39621 -4.11633,15.38438 0,9.98818 4.11633,15.41609 4.12211,5.42216 11.74656,5.42216 7.62445,0 11.71484,-5.42216 z"
|
|
162
|
-
id="path24" style="stroke-width: 0.288259px;"></path>
|
|
163
|
-
<path d="m 389.56049,556.06243 q 8.14043,8.60165 8.13755,25.26014 0,17.5838 -7.95018,26.78791 -7.95018,9.20411 -20.48369,9.22428 -7.98189,0 -13.25991,-3.96644 -2.88259,-2.19653 -5.64988,-6.408 v 34.66026 h -17.22059 v -92.69833 h 16.65849 v 9.82387 q 2.82206,-4.32388 6.01885,-6.83462 5.83148,-4.44784 13.87967,-4.4536 11.73502,0 19.86969,8.60453 z m -13.34639,12.50756 q -3.54559,-5.91507 -11.49577,-5.91796 -9.55579,0 -13.12731,8.96774 -1.85351,4.75916 -1.85063,12.08382 0,11.59089 6.22063,16.28951 3.69548,2.74711 8.75443,2.74711 7.33619,0 11.19309,-5.61528 3.85691,-5.61529 3.85114,-14.94911 0,-7.68787 -3.54558,-13.60006 z"
|
|
164
|
-
id="path26" style="stroke-width: 0.288259px;"></path>
|
|
165
|
-
<path d="m 463.46721,607.2947 q -8.41716,10.39462 -25.56569,10.39462 -17.14852,0 -25.56569,-10.39462 -8.42292,-10.39462 -8.42004,-25.02664 0,-14.38413 8.42004,-24.93441 8.42005,-10.55028 25.56569,-10.54739 17.14853,0 25.56569,10.54739 8.41716,10.5474 8.42293,24.93441 0,14.63202 -8.42293,25.02664 z m -13.91138,-9.60479 q 4.0904,-5.42215 4.08752,-15.41609 -0.003,-9.99394 -4.08752,-15.38438 -4.08751,-5.39044 -11.71484,-5.39332 -7.62733,-0.003 -11.74656,5.39332 -4.11633,5.39621 -4.11922,15.38438 -0.003,9.98818 4.11922,15.41609 4.12211,5.42216 11.74656,5.42216 7.62445,0 11.71484,-5.42216 z"
|
|
166
|
-
id="path28" style="stroke-width: 0.288259px;"></path>
|
|
167
|
-
</g>
|
|
168
|
-
</g>
|
|
169
|
-
</svg>
|
|
170
|
-
</div>
|
|
171
|
-
</div>
|
|
172
|
-
</a>
|
|
173
|
-
`;
|
|
174
|
-
}
|
|
175
|
-
function U(t) {
|
|
176
|
-
var n, r;
|
|
177
|
-
const e = document.createElement("div");
|
|
178
|
-
e.className = "widget";
|
|
179
|
-
const o = L(t), a = N(t);
|
|
180
|
-
return e.innerHTML = j(t) + G(B()), (n = e.querySelector(".widget__checkbox")) == null || n.replaceWith(o), (r = e.querySelector(".widget__logo")) == null || r.replaceWith(a), e;
|
|
181
|
-
}
|
|
182
|
-
function G(t) {
|
|
183
|
-
return `
|
|
184
|
-
<div class="widget__outer">
|
|
185
|
-
<div class="widget__wrapper">
|
|
186
|
-
<div class="widget__inner">
|
|
187
|
-
<div class="widget__dimensions" ${t ? 'data-cy="captcha-checkbox"' : ""}>
|
|
188
|
-
<div class="widget__content">
|
|
189
|
-
<div class="widget__checkbox"></div>
|
|
190
|
-
<div class="widget__logo"></div>
|
|
191
|
-
</div>
|
|
192
|
-
</div>
|
|
193
|
-
</div>
|
|
194
|
-
</div>
|
|
195
|
-
</div>
|
|
196
|
-
`;
|
|
197
|
-
}
|
|
198
|
-
function j(t) {
|
|
199
|
-
return `
|
|
200
|
-
<style>
|
|
201
|
-
.widget {
|
|
202
|
-
width: 100%;
|
|
203
|
-
min-height: ${A}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.widget__outer {
|
|
207
|
-
max-width: ${m};
|
|
208
|
-
min-height: 100%;
|
|
209
|
-
overflow-x: auto;
|
|
210
|
-
width: 100%;
|
|
211
|
-
font-family: ${t.font.fontFamily};
|
|
212
|
-
color: ${t.font.color};
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.widget__wrapper {
|
|
216
|
-
container-type: size;
|
|
217
|
-
display: flex;
|
|
218
|
-
flex-direction: column;
|
|
219
|
-
height: ${f}px;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.widget__inner {
|
|
223
|
-
max-height: 100%;
|
|
224
|
-
min-width: 100%;
|
|
225
|
-
overflow: hidden;
|
|
226
|
-
height: ${f}px;
|
|
227
|
-
width: 100%;
|
|
228
|
-
display: grid;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.widget__dimensions {
|
|
232
|
-
max-width: ${m};
|
|
233
|
-
min-height: ${f}px;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.widget__content {
|
|
237
|
-
padding: ${D};
|
|
238
|
-
border: ${$};
|
|
239
|
-
background-color: ${t.palette.background.default};
|
|
240
|
-
border-color: ${t.palette.grey[300]};
|
|
241
|
-
border-radius: ${W};
|
|
242
|
-
display: flex;
|
|
243
|
-
align-items: center;
|
|
244
|
-
flex-wrap: wrap;
|
|
245
|
-
justify-content: space-between;
|
|
246
|
-
min-height: ${I}px;
|
|
247
|
-
overflow: hidden;
|
|
248
|
-
}
|
|
249
|
-
</style>
|
|
250
|
-
`;
|
|
251
|
-
}
|
|
252
|
-
function F() {
|
|
253
|
-
var e;
|
|
254
|
-
return typeof process < "u" ? "production" : (e = import.meta.env) == null ? void 0 : e.MODE;
|
|
255
|
-
}
|
|
256
|
-
const B = () => F() !== "production", O = 'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"';
|
|
257
|
-
function K(t, e = "") {
|
|
258
|
-
const o = document.createElement(t);
|
|
259
|
-
V(o);
|
|
260
|
-
const a = o.attachShadow({ mode: "open" });
|
|
261
|
-
return a.innerHTML = X(e), o;
|
|
262
|
-
}
|
|
263
|
-
const X = (t) => `
|
|
264
|
-
<style>
|
|
265
|
-
*{font-family: ${O};}
|
|
266
|
-
</style>
|
|
267
|
-
|
|
268
|
-
<style>
|
|
269
|
-
${t}
|
|
270
|
-
</style>
|
|
271
|
-
`, V = (t) => {
|
|
272
|
-
t.style.display = "flex", t.style.flexDirection = "column", t.style.width = "100%", t.style.maxWidth = m;
|
|
273
|
-
};
|
|
274
|
-
function Y(t, e, o) {
|
|
275
|
-
const a = U(e), n = K(o);
|
|
276
|
-
J(n).appendChild(a), t.innerHTML = "", t.appendChild(n);
|
|
277
|
-
const i = M(n);
|
|
278
|
-
if (!(i instanceof HTMLElement))
|
|
279
|
-
throw new Error("Fail to initialize widget: interactive area is not found");
|
|
280
|
-
return i;
|
|
281
|
-
}
|
|
282
|
-
const J = (t) => t.shadowRoot || t, d = {
|
|
283
|
-
0: "#fff",
|
|
284
|
-
100: "#f5f5f5",
|
|
285
|
-
200: "#eeeeee",
|
|
286
|
-
300: "#e0e0e0",
|
|
287
|
-
400: "#bdbdbd",
|
|
288
|
-
500: "#9e9e9e",
|
|
289
|
-
600: "#757575",
|
|
290
|
-
700: "#616161",
|
|
291
|
-
800: "#424242",
|
|
292
|
-
900: "#212121"
|
|
293
|
-
}, h = 10, Q = {
|
|
294
|
-
palette: {
|
|
295
|
-
mode: "light",
|
|
296
|
-
primary: {
|
|
297
|
-
main: "#487DFA",
|
|
298
|
-
contrastText: "#fff"
|
|
299
|
-
},
|
|
300
|
-
background: {
|
|
301
|
-
default: "#fff",
|
|
302
|
-
contrastText: "#000"
|
|
303
|
-
},
|
|
304
|
-
border: d[400],
|
|
305
|
-
error: {
|
|
306
|
-
main: "#f44336"
|
|
307
|
-
},
|
|
308
|
-
logoFill: "#1d1d1b",
|
|
309
|
-
grey: d
|
|
310
|
-
},
|
|
311
|
-
spacing: {
|
|
312
|
-
unit: h,
|
|
313
|
-
half: Math.floor(h / 2)
|
|
314
|
-
},
|
|
315
|
-
font: {
|
|
316
|
-
fontFamily: 'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
|
|
317
|
-
color: "#000"
|
|
318
|
-
}
|
|
319
|
-
}, Z = {
|
|
320
|
-
palette: {
|
|
321
|
-
mode: "dark",
|
|
322
|
-
primary: {
|
|
323
|
-
main: "#487DFA",
|
|
324
|
-
contrastText: "#fff"
|
|
325
|
-
},
|
|
326
|
-
background: {
|
|
327
|
-
default: "#303030",
|
|
328
|
-
contrastText: "#fff"
|
|
329
|
-
},
|
|
330
|
-
border: d[300],
|
|
331
|
-
error: {
|
|
332
|
-
main: "#f44336"
|
|
333
|
-
},
|
|
334
|
-
logoFill: "#fff",
|
|
335
|
-
grey: d
|
|
336
|
-
},
|
|
337
|
-
spacing: {
|
|
338
|
-
unit: h,
|
|
339
|
-
half: Math.floor(h / 2)
|
|
340
|
-
},
|
|
341
|
-
font: {
|
|
342
|
-
fontFamily: 'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
|
|
343
|
-
color: "#fff"
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
function _(t) {
|
|
347
|
-
return Object.values(l).find((a) => a === g(t, 0).getAttribute("data-captcha-type")) || "frictionless";
|
|
348
|
-
}
|
|
349
|
-
const x = (t) => document.querySelector('script[src*="'.concat(t, '"]')), tt = (t) => {
|
|
350
|
-
const e = x(t);
|
|
351
|
-
if (e && e.src.indexOf("".concat(t)) !== -1) {
|
|
352
|
-
const o = new URLSearchParams(e.src.split("?")[1]);
|
|
353
|
-
return {
|
|
354
|
-
onloadUrlCallback: o.get("onload") || void 0,
|
|
355
|
-
renderExplicit: o.get("render") || void 0
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
return { onloadUrlCallback: void 0, renderExplicit: void 0 };
|
|
359
|
-
};
|
|
360
|
-
class et {
|
|
361
|
-
constructor(e) {
|
|
362
|
-
this.widgetThemeResolver = e, this.captchaRenderer = null, this._i18n = null;
|
|
363
|
-
}
|
|
364
|
-
get i18n() {
|
|
365
|
-
if (this._i18n === null)
|
|
366
|
-
throw new Error("I18n is not initialized");
|
|
367
|
-
return this._i18n;
|
|
368
|
-
}
|
|
369
|
-
async createWidgets(e, o, a = !0, n = !1) {
|
|
370
|
-
return Promise.all(e.map((r) => this.createWidget(r, o, a, n)));
|
|
371
|
-
}
|
|
372
|
-
async createWidget(e, o, a = !0, n = !1) {
|
|
373
|
-
o.theme = this.widgetThemeResolver.resolveWidgetTheme(e, o);
|
|
374
|
-
const r = o.theme === "light" ? Q : Z;
|
|
375
|
-
let i;
|
|
376
|
-
if (n) {
|
|
377
|
-
const b = document.createElement("div");
|
|
378
|
-
e.appendChild(b), i = b;
|
|
379
|
-
} else
|
|
380
|
-
i = Y(e, r, "prosopo-procaptcha");
|
|
381
|
-
return (await this.getCaptchaRenderer()).renderCaptcha({
|
|
382
|
-
identifierPrefix: "procaptcha-",
|
|
383
|
-
emotionCacheKey: "procaptcha",
|
|
384
|
-
webComponentTag: "prosopo-procaptcha",
|
|
385
|
-
defaultCaptchaType: l.frictionless
|
|
386
|
-
}, i, o, a, this.i18n, n);
|
|
387
|
-
}
|
|
388
|
-
async getCaptchaRenderer() {
|
|
389
|
-
return this._i18n === null && (this._i18n = await T()), this.captchaRenderer === null && (this.captchaRenderer = await this.createCaptchaRenderer()), this.captchaRenderer;
|
|
390
|
-
}
|
|
391
|
-
async createCaptchaRenderer() {
|
|
392
|
-
const e = (await import("./captchaRenderer-D-du50M4.js")).CaptchaRenderer, o = (await import("./captchaComponentProvider-dcMua0p9.js").then((a) => a.f)).CaptchaComponentProvider;
|
|
393
|
-
return new e(new o());
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
class ot {
|
|
397
|
-
constructor() {
|
|
398
|
-
this.themesSet = /* @__PURE__ */ new Set(["light", "dark"]), this.defaultTheme = "light";
|
|
399
|
-
}
|
|
400
|
-
resolveWidgetTheme(e, o) {
|
|
401
|
-
const a = o.theme || e.getAttribute("data-theme") || this.defaultTheme;
|
|
402
|
-
return this.validateTheme(a);
|
|
403
|
-
}
|
|
404
|
-
validateTheme(e) {
|
|
405
|
-
return this.themesSet.has(e) ? e : this.defaultTheme;
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
const v = "procaptcha.bundle.js";
|
|
409
|
-
let c = [];
|
|
410
|
-
const p = new et(new ot()), at = "procaptcha:execute", nt = async () => {
|
|
411
|
-
const t = Array.from(document.getElementsByClassName("procaptcha")).filter((o) => o.tagName.toLowerCase() !== "button");
|
|
412
|
-
if (t.length) {
|
|
413
|
-
const o = g(t, 0).getAttribute("data-sitekey"), a = g(t, 0).getAttribute("data-web3");
|
|
414
|
-
if (!o) {
|
|
415
|
-
console.error("No siteKey found");
|
|
416
|
-
return;
|
|
417
|
-
}
|
|
418
|
-
const n = _(t), r = await p.createWidgets(t, {
|
|
419
|
-
captchaType: n,
|
|
420
|
-
siteKey: o
|
|
421
|
-
}, a !== "true");
|
|
422
|
-
c.push(...r);
|
|
423
|
-
}
|
|
424
|
-
const e = Array.from(document.getElementsByClassName("procaptcha")).filter((o) => o.tagName.toLowerCase() === "button");
|
|
425
|
-
if (e.length)
|
|
426
|
-
for (const o of e) {
|
|
427
|
-
const a = o.getAttribute("data-sitekey") || "", n = o.getAttribute("data-callback") || "", r = _([o]), i = await p.createWidgets([o], {
|
|
428
|
-
captchaType: r,
|
|
429
|
-
siteKey: a,
|
|
430
|
-
callback: n
|
|
431
|
-
}, !0, !0);
|
|
432
|
-
c.push(...i), o.addEventListener("click", async (y) => {
|
|
433
|
-
y.preventDefault(), E();
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
}, rt = async (t, e) => {
|
|
437
|
-
if (Object.prototype.hasOwnProperty.call(e, "size") && e.size === "invisible" || t.tagName.toLowerCase() === "button") {
|
|
438
|
-
const n = await p.createWidgets([t], e, !0, !0);
|
|
439
|
-
c.push(...n);
|
|
440
|
-
return;
|
|
441
|
-
}
|
|
442
|
-
const a = await p.createWidgets([t], e);
|
|
443
|
-
c.push(...a);
|
|
444
|
-
};
|
|
445
|
-
function s(t) {
|
|
446
|
-
document && document.readyState !== "loading" ? t() : document.addEventListener("DOMContentLoaded", t);
|
|
447
|
-
}
|
|
448
|
-
const E = () => {
|
|
449
|
-
var t;
|
|
450
|
-
const e = it();
|
|
451
|
-
if (e.length === 0) {
|
|
452
|
-
console.error("No Procaptcha containers found for execution");
|
|
453
|
-
return;
|
|
454
|
-
}
|
|
455
|
-
const o = new CustomEvent(at, {
|
|
456
|
-
detail: {
|
|
457
|
-
containerId: ((t = e[0]) == null ? void 0 : t.id) || "procaptcha-container",
|
|
458
|
-
containerCount: e.length,
|
|
459
|
-
timestamp: Date.now()
|
|
460
|
-
},
|
|
461
|
-
bubbles: !0,
|
|
462
|
-
cancelable: !0
|
|
463
|
-
});
|
|
464
|
-
document.dispatchEvent(o);
|
|
465
|
-
};
|
|
466
|
-
function it() {
|
|
467
|
-
const t = [], e = Array.from(document.querySelectorAll('[data-size="invisible"]'));
|
|
468
|
-
t.push(...e);
|
|
469
|
-
const o = Array.from(document.querySelectorAll('#procaptcha-container, [id$="-procaptcha-container"]')), a = Array.from(document.getElementsByClassName("p-procaptcha"));
|
|
470
|
-
t.push(...a);
|
|
471
|
-
for (const n of o)
|
|
472
|
-
t.includes(n) || t.push(n);
|
|
473
|
-
return t;
|
|
474
|
-
}
|
|
475
|
-
const C = () => {
|
|
476
|
-
var t;
|
|
477
|
-
const { onloadUrlCallback: e, renderExplicit: o } = tt(v);
|
|
478
|
-
if (o !== "explicit" && s(nt), e) {
|
|
479
|
-
const a = k(e);
|
|
480
|
-
let n = !1;
|
|
481
|
-
(t = x(v)) == null || t.addEventListener("load", () => {
|
|
482
|
-
s(a), n = !0;
|
|
483
|
-
}), document.readyState === "complete" && !n && s(a);
|
|
484
|
-
}
|
|
485
|
-
}, ct = () => {
|
|
486
|
-
for (const t of c)
|
|
487
|
-
t.unmount();
|
|
488
|
-
c = [], C();
|
|
489
|
-
};
|
|
490
|
-
window.procaptcha = { ready: s, render: rt, reset: ct, execute: E };
|
|
491
|
-
C();
|
|
492
|
-
export {
|
|
493
|
-
l as C,
|
|
494
|
-
w as W,
|
|
495
|
-
g as a,
|
|
496
|
-
Q as b,
|
|
497
|
-
s as c,
|
|
498
|
-
Z as d,
|
|
499
|
-
E as e,
|
|
500
|
-
ct as f,
|
|
501
|
-
k as g,
|
|
502
|
-
T as l,
|
|
503
|
-
rt as r
|
|
504
|
-
};
|