@prosopo/procaptcha-bundle 2.5.0 → 2.5.3
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/packages/procaptcha-bundle/dist/bundle/components.d.ts +4 -4
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/components.js +4 -4
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/components.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts +3 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.js +83 -13
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js +5 -6
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts +8 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js +11 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts +6 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{renderLogic/captcha/componentsList.js → captcha/captchaComponentsList.js} +3 -3
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{renderLogic/captcha/captcha.d.ts → captcha/captchaProps.d.ts} +3 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js +2 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts +24 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js +51 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{renderLogic/captcha → captcha}/components/frictionlessCaptcha.d.ts +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
- package/{dist/util/renderLogic → .rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util}/captcha/components/frictionlessCaptcha.js +2 -2
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{renderLogic/captcha → captcha}/components/imageCaptcha.d.ts +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{renderLogic/captcha → captcha}/components/imageCaptcha.js +2 -2
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{renderLogic/captcha → captcha}/components/powCaptcha.d.ts +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{renderLogic/captcha → captcha}/components/powCaptcha.js +2 -2
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts +0 -2
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js +0 -19
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts +5 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js +24 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts +18 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js +57 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts +9 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js +19 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js.map +1 -0
- package/dist/bundle/ProcaptchaWidget-BlWWnPeB.js +615 -0
- package/dist/bundle/ProcaptchaWidget-Dnwno-4N.js +156 -0
- package/dist/bundle/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/bundle/{asU8a-Br9wz334.js → asU8a-JliaME7-.js} +1 -1
- package/dist/bundle/{bip39-BtaWByKg.js → bip39-CFjno8fK.js} +2 -2
- package/dist/bundle/{browser-ponyfill-Ck_bwPOY.js → browser-ponyfill-Dy1JBTMg.js} +20 -20
- package/dist/bundle/captchaComponentProvider-dcMua0p9.js +1013 -0
- package/dist/bundle/captchaRenderer-D-du50M4.js +5478 -0
- package/dist/bundle/components.d.ts +4 -4
- package/dist/bundle/components.d.ts.map +1 -1
- package/dist/bundle/emotion-element-5486c51c.browser.esm-Bywq83R5.js +1838 -0
- package/dist/bundle/{hash-KElfghPn.js → hash-CtL1HOjf.js} +1 -1
- package/dist/bundle/i18nFrontend-C_RgmvGh.js +2273 -0
- package/dist/bundle/index-B8oMghZ3.js +1120 -0
- package/dist/bundle/{index-Cb-XcaMX.js → index-BMjJnq60.js} +11 -10
- package/dist/bundle/index-BTlHNFX8.js +504 -0
- package/dist/bundle/{index-B0trzdT2.js → index-DcG_c-Na.js} +20 -19
- package/dist/bundle/index.d.ts +3 -1
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/locales/de/translation.json +2 -1
- package/dist/bundle/locales/en/translation.json +2 -1
- package/dist/bundle/locales/es/translation.json +2 -1
- package/dist/bundle/locales/fr/translation.json +2 -1
- package/dist/bundle/locales/it/translation.json +2 -1
- package/dist/bundle/locales/pt/translation.json +2 -1
- package/dist/bundle/locales/pt-BR/translation.json +2 -1
- package/dist/bundle/procaptcha.bundle.js +4 -3
- package/dist/bundle/translations-B0P9axY3.js +2885 -0
- package/dist/bundle/useTranslation-7b6JJ18N.js +158 -0
- package/dist/bundle/util/captcha/captchaComponentProvider.d.ts +8 -0
- package/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -0
- package/dist/bundle/util/captcha/captchaComponentsList.d.ts +6 -0
- package/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +1 -0
- package/dist/{util/renderLogic/captcha/captcha.d.ts → bundle/util/captcha/captchaProps.d.ts} +3 -1
- package/dist/bundle/util/captcha/captchaProps.d.ts.map +1 -0
- package/dist/bundle/util/captcha/captchaRenderer.d.ts +24 -0
- package/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -0
- package/dist/bundle/util/captcha/captchaType.d.ts.map +1 -0
- package/dist/bundle/util/{renderLogic/captcha → captcha}/components/frictionlessCaptcha.d.ts +1 -1
- package/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
- package/dist/bundle/util/{renderLogic/captcha → captcha}/components/imageCaptcha.d.ts +1 -1
- package/dist/bundle/util/captcha/components/imageCaptcha.d.ts.map +1 -0
- package/dist/bundle/util/{renderLogic/captcha → captcha}/components/powCaptcha.d.ts +1 -1
- package/dist/bundle/util/captcha/components/powCaptcha.d.ts.map +1 -0
- package/dist/bundle/util/config.d.ts +0 -2
- package/dist/bundle/util/config.d.ts.map +1 -1
- package/dist/bundle/util/configCreator.d.ts +5 -0
- package/dist/bundle/util/configCreator.d.ts.map +1 -0
- package/dist/bundle/util/widgetFactory.d.ts +18 -0
- package/dist/bundle/util/widgetFactory.d.ts.map +1 -0
- package/dist/bundle/util/widgetThemeResolver.d.ts +9 -0
- package/dist/bundle/util/widgetThemeResolver.d.ts.map +1 -0
- package/dist/components.d.ts +4 -4
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +4 -4
- package/dist/components.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +83 -13
- package/dist/index.js.map +1 -1
- package/dist/tests/util/captchaType.test.js +1 -1
- package/dist/tests/util/captchaType.test.js.map +1 -1
- package/dist/tests/util/renderLogic.test.js +5 -6
- package/dist/tests/util/renderLogic.test.js.map +1 -1
- package/dist/util/captcha/captchaComponentProvider.d.ts +8 -0
- package/dist/util/captcha/captchaComponentProvider.d.ts.map +1 -0
- package/dist/util/captcha/captchaComponentProvider.js +11 -0
- package/dist/util/captcha/captchaComponentProvider.js.map +1 -0
- package/dist/util/captcha/captchaComponentsList.d.ts +6 -0
- package/dist/util/captcha/captchaComponentsList.d.ts.map +1 -0
- package/dist/util/{renderLogic/captcha/componentsList.js → captcha/captchaComponentsList.js} +3 -3
- package/dist/util/captcha/captchaComponentsList.js.map +1 -0
- package/dist/{bundle/util/renderLogic/captcha/captcha.d.ts → util/captcha/captchaProps.d.ts} +3 -1
- package/dist/util/captcha/captchaProps.d.ts.map +1 -0
- package/dist/util/captcha/captchaProps.js +2 -0
- package/dist/util/captcha/captchaProps.js.map +1 -0
- package/dist/util/captcha/captchaRenderer.d.ts +24 -0
- package/dist/util/captcha/captchaRenderer.d.ts.map +1 -0
- package/dist/util/captcha/captchaRenderer.js +51 -0
- package/dist/util/captcha/captchaRenderer.js.map +1 -0
- package/dist/util/captcha/captchaType.d.ts.map +1 -0
- package/dist/util/captcha/captchaType.js.map +1 -0
- package/dist/util/{renderLogic/captcha → captcha}/components/frictionlessCaptcha.d.ts +1 -1
- package/dist/util/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
- package/{.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic → dist/util}/captcha/components/frictionlessCaptcha.js +2 -2
- package/dist/util/captcha/components/frictionlessCaptcha.js.map +1 -0
- package/dist/util/{renderLogic/captcha → captcha}/components/imageCaptcha.d.ts +1 -1
- package/dist/util/captcha/components/imageCaptcha.d.ts.map +1 -0
- package/dist/util/{renderLogic/captcha → captcha}/components/imageCaptcha.js +2 -2
- package/dist/util/captcha/components/imageCaptcha.js.map +1 -0
- package/dist/util/{renderLogic/captcha → captcha}/components/powCaptcha.d.ts +1 -1
- package/dist/util/captcha/components/powCaptcha.d.ts.map +1 -0
- package/dist/util/{renderLogic/captcha → captcha}/components/powCaptcha.js +2 -2
- package/dist/util/captcha/components/powCaptcha.js.map +1 -0
- package/dist/util/config.d.ts +0 -2
- package/dist/util/config.d.ts.map +1 -1
- package/dist/util/config.js +0 -19
- package/dist/util/config.js.map +1 -1
- package/dist/util/configCreator.d.ts +5 -0
- package/dist/util/configCreator.d.ts.map +1 -0
- package/dist/util/configCreator.js +24 -0
- package/dist/util/configCreator.js.map +1 -0
- package/dist/util/widgetFactory.d.ts +18 -0
- package/dist/util/widgetFactory.d.ts.map +1 -0
- package/dist/util/widgetFactory.js +57 -0
- package/dist/util/widgetFactory.js.map +1 -0
- package/dist/util/widgetThemeResolver.d.ts +9 -0
- package/dist/util/widgetThemeResolver.d.ts.map +1 -0
- package/dist/util/widgetThemeResolver.js +19 -0
- package/dist/util/widgetThemeResolver.js.map +1 -0
- package/package.json +10 -9
- package/stats.html +1 -1
- package/vite.cjs.config.ts +1 -1
- package/vite.config.ts +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captchaType.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captchaType.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.js +0 -2
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts +0 -8
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.js +0 -11
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.d.ts +0 -6
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.d.ts +0 -8
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.js +0 -29
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.d.ts +0 -23
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.js +0 -52
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.d.ts +0 -3
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.js +0 -14
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/theme.d.ts +0 -3
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/theme.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/theme.js +0 -9
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/theme.js.map +0 -1
- package/dist/bundle/ProcaptchaWidget-CAyH6qD7.js +0 -161
- package/dist/bundle/ProcaptchaWidget-CY3qomFu.js +0 -619
- package/dist/bundle/index-VYSrdSle.js +0 -11587
- package/dist/bundle/index-n-2hvBzo.js +0 -1190
- package/dist/bundle/useTranslation-CcYxvTxi.js +0 -2435
- package/dist/bundle/util/captchaType.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/captcha/captcha.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts +0 -8
- package/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/captcha/componentsList.d.ts +0 -6
- package/dist/bundle/util/renderLogic/captcha/componentsList.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/webComponent.d.ts +0 -8
- package/dist/bundle/util/renderLogic/webComponent.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/widgetRenderer.d.ts +0 -23
- package/dist/bundle/util/renderLogic/widgetRenderer.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic.d.ts +0 -3
- package/dist/bundle/util/renderLogic.d.ts.map +0 -1
- package/dist/bundle/util/theme.d.ts +0 -3
- package/dist/bundle/util/theme.d.ts.map +0 -1
- package/dist/util/captchaType.d.ts.map +0 -1
- package/dist/util/captchaType.js.map +0 -1
- package/dist/util/renderLogic/captcha/captcha.d.ts.map +0 -1
- package/dist/util/renderLogic/captcha/captcha.js +0 -2
- package/dist/util/renderLogic/captcha/captcha.js.map +0 -1
- package/dist/util/renderLogic/captcha/captchaRenderer.d.ts +0 -8
- package/dist/util/renderLogic/captcha/captchaRenderer.d.ts.map +0 -1
- package/dist/util/renderLogic/captcha/captchaRenderer.js +0 -11
- package/dist/util/renderLogic/captcha/captchaRenderer.js.map +0 -1
- package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts.map +0 -1
- package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.js.map +0 -1
- package/dist/util/renderLogic/captcha/components/imageCaptcha.d.ts.map +0 -1
- package/dist/util/renderLogic/captcha/components/imageCaptcha.js.map +0 -1
- package/dist/util/renderLogic/captcha/components/powCaptcha.d.ts.map +0 -1
- package/dist/util/renderLogic/captcha/components/powCaptcha.js.map +0 -1
- package/dist/util/renderLogic/captcha/componentsList.d.ts +0 -6
- package/dist/util/renderLogic/captcha/componentsList.d.ts.map +0 -1
- package/dist/util/renderLogic/captcha/componentsList.js.map +0 -1
- package/dist/util/renderLogic/webComponent.d.ts +0 -8
- package/dist/util/renderLogic/webComponent.d.ts.map +0 -1
- package/dist/util/renderLogic/webComponent.js +0 -29
- package/dist/util/renderLogic/webComponent.js.map +0 -1
- package/dist/util/renderLogic/widgetRenderer.d.ts +0 -23
- package/dist/util/renderLogic/widgetRenderer.d.ts.map +0 -1
- package/dist/util/renderLogic/widgetRenderer.js +0 -52
- package/dist/util/renderLogic/widgetRenderer.js.map +0 -1
- package/dist/util/renderLogic.d.ts +0 -3
- package/dist/util/renderLogic.d.ts.map +0 -1
- package/dist/util/renderLogic.js +0 -14
- package/dist/util/renderLogic.js.map +0 -1
- package/dist/util/theme.d.ts +0 -3
- package/dist/util/theme.d.ts.map +0 -1
- package/dist/util/theme.js +0 -9
- package/dist/util/theme.js.map +0 -1
- /package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{captchaType.d.ts → captcha/captchaType.d.ts} +0 -0
- /package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{captchaType.js → captcha/captchaType.js} +0 -0
- /package/dist/bundle/util/{captchaType.d.ts → captcha/captchaType.d.ts} +0 -0
- /package/dist/util/{captchaType.d.ts → captcha/captchaType.d.ts} +0 -0
- /package/dist/util/{captchaType.js → captcha/captchaType.js} +0 -0
|
@@ -1,619 +0,0 @@
|
|
|
1
|
-
import { r as x, l as L, d as P, j as s, a as b, P as _, b as m, c as T, A as f, e as N, g as oe, p as B, f as re, h as ae, i as K, k as ie, E as se, R as ce, W as j, m as le, C as de, n as he, o as ue, q as pe, s as ge, t as fe, u as me, L as xe, v as Ce, w as be, x as we, y as ye } from "./index-VYSrdSle.js";
|
|
2
|
-
import { u as V, b as Ae, s as Te, a as Ee, c as Ie, l as ve } from "./useTranslation-CcYxvTxi.js";
|
|
3
|
-
import { h as U } from "./hash-KElfghPn.js";
|
|
4
|
-
import { r as Ne } from "./asU8a-Br9wz334.js";
|
|
5
|
-
const He = (t) => Array.isArray(t) && t !== null, G = new Array(256), X = new Array(256 * 256);
|
|
6
|
-
for (let t = 0; t < 256; t++)
|
|
7
|
-
G[t] = t.toString(16).padStart(2, "0");
|
|
8
|
-
for (let t = 0; t < 256; t++) {
|
|
9
|
-
const e = t << 8;
|
|
10
|
-
for (let o = 0; o < 256; o++)
|
|
11
|
-
X[e | o] = G[t] + G[o];
|
|
12
|
-
}
|
|
13
|
-
function W(t, e) {
|
|
14
|
-
const o = t.length % 2 | 0, i = t.length - o | 0;
|
|
15
|
-
for (let n = 0; n < i; n += 2)
|
|
16
|
-
e += X[t[n] << 8 | t[n + 1]];
|
|
17
|
-
return o && (e += G[t[i] | 0]), e;
|
|
18
|
-
}
|
|
19
|
-
function De(t, e = -1, o = !0) {
|
|
20
|
-
const i = o ? "0x" : "";
|
|
21
|
-
if (!(t != null && t.length))
|
|
22
|
-
return i;
|
|
23
|
-
if (e > 0) {
|
|
24
|
-
const n = Math.ceil(e / 8);
|
|
25
|
-
if (t.length > n)
|
|
26
|
-
return `${W(t.subarray(0, n / 2), i)}…${W(t.subarray(t.length - n / 2), "")}`;
|
|
27
|
-
}
|
|
28
|
-
return W(t, i);
|
|
29
|
-
}
|
|
30
|
-
const ke = (t) => He(t) ? De(new Uint8Array(t)) : t.toString(), Re = {
|
|
31
|
-
border: "none",
|
|
32
|
-
paddingTop: "6px",
|
|
33
|
-
paddingBottom: "6px",
|
|
34
|
-
cursor: "pointer",
|
|
35
|
-
height: "39px",
|
|
36
|
-
width: "39px",
|
|
37
|
-
borderRadius: "50%"
|
|
38
|
-
}, _e = ({ themeColor: t, onReload: e }) => {
|
|
39
|
-
const o = x.useMemo(() => t === "light" ? L : P, [t]), [i, n] = x.useState(!1), a = x.useMemo(() => ({
|
|
40
|
-
...{
|
|
41
|
-
...Re,
|
|
42
|
-
backgroundColor: o.palette.background.default,
|
|
43
|
-
color: i ? o.palette.primary.contrastText : o.palette.background.contrastText
|
|
44
|
-
},
|
|
45
|
-
backgroundColor: i ? o.palette.grey[700] : o.palette.background.default
|
|
46
|
-
}), [i, o]);
|
|
47
|
-
return s("button", { className: "reload-button", "aria-label": "Reload", type: "button", style: a, onMouseEnter: () => n(!0), onMouseLeave: () => n(!1), onClick: (r) => {
|
|
48
|
-
r.preventDefault(), e();
|
|
49
|
-
}, children: b("svg", { width: "27px", height: "27px", viewBox: "0 0 27 27", version: "1.1", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", children: [s("title", { children: "reload" }), s("path", { fill: a.color, transform: "scale(0.0703125)", d: "M234.666667,149.333333 L234.666667,106.666667 L314.564847,106.664112 C287.579138,67.9778918 242.745446,42.6666667 192,42.6666667 C109.525477,42.6666667 42.6666667,109.525477 42.6666667,192 C42.6666667,274.474523 109.525477,341.333333 192,341.333333 C268.201293,341.333333 331.072074,284.258623 340.195444,210.526102 L382.537159,215.817985 C370.807686,310.617565 289.973536,384 192,384 C85.961328,384 1.42108547e-14,298.038672 1.42108547e-14,192 C1.42108547e-14,85.961328 85.961328,1.42108547e-14 192,1.42108547e-14 C252.316171,1.42108547e-14 306.136355,27.8126321 341.335366,71.3127128 L341.333333,1.42108547e-14 L384,1.42108547e-14 L384,149.333333 L234.666667,149.333333 Z" })] }) });
|
|
50
|
-
}, Le = (t) => {
|
|
51
|
-
if (!t.hash)
|
|
52
|
-
throw new _("CAPTCHA.MISSING_ITEM_HASH", {
|
|
53
|
-
context: { item: t }
|
|
54
|
-
});
|
|
55
|
-
return t.hash;
|
|
56
|
-
}, Pe = ({ challenge: t, solution: e, onClick: o, themeColor: i }) => {
|
|
57
|
-
const n = t.items, a = x.useMemo(() => i === "light" ? L : P, [i]), r = `${a.spacing.half}px`;
|
|
58
|
-
return s("div", { style: {
|
|
59
|
-
width: "100%",
|
|
60
|
-
height: "100%",
|
|
61
|
-
display: "flex",
|
|
62
|
-
flexDirection: "row",
|
|
63
|
-
flexWrap: "wrap",
|
|
64
|
-
justifyContent: "space-between",
|
|
65
|
-
paddingBottom: r,
|
|
66
|
-
paddingRight: r
|
|
67
|
-
}, children: n.map((d, l) => {
|
|
68
|
-
const h = Le(d);
|
|
69
|
-
return s("div", { style: {
|
|
70
|
-
flexGrow: 1,
|
|
71
|
-
flexBasis: "33.3333%",
|
|
72
|
-
boxSizing: "border-box",
|
|
73
|
-
paddingLeft: r,
|
|
74
|
-
paddingTop: r
|
|
75
|
-
}, children: b("div", { style: {
|
|
76
|
-
position: "relative",
|
|
77
|
-
cursor: "pointer",
|
|
78
|
-
height: "100%",
|
|
79
|
-
width: "100%",
|
|
80
|
-
border: 1,
|
|
81
|
-
padding: 0,
|
|
82
|
-
margin: 0,
|
|
83
|
-
borderStyle: "solid",
|
|
84
|
-
borderColor: a.palette.grey[300]
|
|
85
|
-
}, onClick: () => o(h), children: [s("img", { style: {
|
|
86
|
-
width: "100%",
|
|
87
|
-
backgroundColor: a.palette.grey[300],
|
|
88
|
-
display: "block",
|
|
89
|
-
objectFit: "contain",
|
|
90
|
-
aspectRatio: "1/1",
|
|
91
|
-
height: "auto"
|
|
92
|
-
}, src: d.data, alt: `Captcha image ${l + 1}` }), s("div", { style: {
|
|
93
|
-
position: "absolute",
|
|
94
|
-
top: 0,
|
|
95
|
-
left: 0,
|
|
96
|
-
bottom: 0,
|
|
97
|
-
right: 0,
|
|
98
|
-
height: "100%",
|
|
99
|
-
width: "100%",
|
|
100
|
-
display: "flex",
|
|
101
|
-
alignItems: "center",
|
|
102
|
-
justifyContent: "center",
|
|
103
|
-
backgroundColor: "rgba(0,0,0,0.5)",
|
|
104
|
-
visibility: e.includes(h) ? "visible" : "hidden"
|
|
105
|
-
}, children: s("svg", { style: {
|
|
106
|
-
backgroundColor: "transparent",
|
|
107
|
-
display: "block",
|
|
108
|
-
width: "35%",
|
|
109
|
-
height: "35%",
|
|
110
|
-
transition: "fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
111
|
-
userSelect: "none",
|
|
112
|
-
fill: "currentcolor"
|
|
113
|
-
}, focusable: "false", color: "#fff", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "CheckIcon", "aria-label": "Check icon", children: s("path", { d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }) }) })] }) }, d.hash);
|
|
114
|
-
}) });
|
|
115
|
-
};
|
|
116
|
-
function Me(t = {}) {
|
|
117
|
-
return Object.keys(t).reduce((e, o) => ({ ...e, [`data-${o}`]: t[o] }), {});
|
|
118
|
-
}
|
|
119
|
-
function q({ general: t, dev: e }) {
|
|
120
|
-
return {
|
|
121
|
-
...Me(t)
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
const Se = {
|
|
125
|
-
display: "inline-flex",
|
|
126
|
-
alignItems: "center",
|
|
127
|
-
justifyContent: "center",
|
|
128
|
-
position: "relative",
|
|
129
|
-
boxSizing: "border-box",
|
|
130
|
-
outline: "0px",
|
|
131
|
-
border: "0px",
|
|
132
|
-
margin: "0px",
|
|
133
|
-
cursor: "pointer",
|
|
134
|
-
userSelect: "none",
|
|
135
|
-
verticalAlign: "middle",
|
|
136
|
-
appearance: void 0,
|
|
137
|
-
textDecoration: "none",
|
|
138
|
-
fontWeight: "500",
|
|
139
|
-
fontSize: "0.875rem",
|
|
140
|
-
lineHeight: "1.75",
|
|
141
|
-
letterSpacing: "0.02857em",
|
|
142
|
-
textTransform: "uppercase",
|
|
143
|
-
minWidth: "64px",
|
|
144
|
-
padding: "6px 16px",
|
|
145
|
-
borderRadius: "4px",
|
|
146
|
-
transition: "background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
147
|
-
color: "rgb(0, 0, 0)",
|
|
148
|
-
backgroundColor: "#ffffff",
|
|
149
|
-
boxShadow: "rgba(0, 0, 0, 0.2) 0px 3px 1px -2px, rgba(0, 0, 0, 0.14) 0px 2px 2px 0px, rgba(0, 0, 0, 0.12) 0px 1px 5px 0px"
|
|
150
|
-
}, $ = ({ themeColor: t, buttonType: e, text: o, onClick: i }) => {
|
|
151
|
-
const n = x.useMemo(() => t === "light" ? L : P, [t]), [a, r] = x.useState(!1), d = x.useMemo(() => {
|
|
152
|
-
const l = {
|
|
153
|
-
...Se,
|
|
154
|
-
color: a ? n.palette.primary.contrastText : n.palette.background.contrastText
|
|
155
|
-
};
|
|
156
|
-
return e === "cancel" ? {
|
|
157
|
-
...l,
|
|
158
|
-
backgroundColor: a ? n.palette.grey[600] : "transparent"
|
|
159
|
-
} : {
|
|
160
|
-
...l,
|
|
161
|
-
backgroundColor: a ? n.palette.primary.main : n.palette.background.default
|
|
162
|
-
};
|
|
163
|
-
}, [e, a, n]);
|
|
164
|
-
return s("button", { ...q({ dev: {} }), onMouseEnter: () => r(!0), onMouseLeave: () => r(!1), style: d, onClick: (l) => {
|
|
165
|
-
l.preventDefault(), i();
|
|
166
|
-
}, "aria-label": o, children: o });
|
|
167
|
-
}, Ge = ({ challenge: t, index: e, solutions: o, onSubmit: i, onCancel: n, onClick: a, onNext: r, onReload: d, themeColor: l }) => {
|
|
168
|
-
const { t: h } = V(), C = t.captchas ? m(t.captchas, e) : null, w = o ? m(o, e) : [], y = x.useMemo(() => l === "light" ? L : P, [l]), H = `${y.spacing.unit}px`, I = `${y.spacing.half}px`;
|
|
169
|
-
return s(x.Suspense, { fallback: s("div", { children: "Loading..." }), children: s("div", { style: {
|
|
170
|
-
overflowX: "auto",
|
|
171
|
-
overflowY: "auto",
|
|
172
|
-
width: "100%",
|
|
173
|
-
maxWidth: "500px",
|
|
174
|
-
maxHeight: "100%",
|
|
175
|
-
display: "flex",
|
|
176
|
-
flexDirection: "column",
|
|
177
|
-
border: "1px solid #dddddd",
|
|
178
|
-
boxShadow: "rgba(255, 255, 255, 0.2) 0px 0px 4px",
|
|
179
|
-
borderRadius: "4px",
|
|
180
|
-
backgroundColor: y.palette.background.default,
|
|
181
|
-
userSelect: "none",
|
|
182
|
-
touchAction: "none",
|
|
183
|
-
overscrollBehavior: "none"
|
|
184
|
-
}, children: b("div", { style: {
|
|
185
|
-
backgroundColor: y.palette.background.default,
|
|
186
|
-
display: "flex",
|
|
187
|
-
flexDirection: "column",
|
|
188
|
-
minWidth: "300px"
|
|
189
|
-
}, children: [s("div", { style: {
|
|
190
|
-
display: "flex",
|
|
191
|
-
alignItems: "center",
|
|
192
|
-
width: "100%"
|
|
193
|
-
}, children: s("div", { style: {
|
|
194
|
-
backgroundColor: y.palette.primary.main,
|
|
195
|
-
width: "100%",
|
|
196
|
-
marginTop: H,
|
|
197
|
-
marginLeft: H,
|
|
198
|
-
marginRight: H
|
|
199
|
-
}, children: b("div", { style: {
|
|
200
|
-
paddingLeft: `${y.spacing.half}px`,
|
|
201
|
-
paddingRight: `${y.spacing.half}px`
|
|
202
|
-
}, children: [b("p", { style: {
|
|
203
|
-
color: "#ffffff",
|
|
204
|
-
fontWeight: 700,
|
|
205
|
-
lineHeight: 1.5
|
|
206
|
-
}, children: [h("WIDGET.SELECT_ALL"), ":", " ", s("span", { children: `${h(m(t.captchas, e).target)} ` })] }), s("p", { style: {
|
|
207
|
-
color: "#ffffff",
|
|
208
|
-
fontWeight: 500,
|
|
209
|
-
lineHeight: 0.8,
|
|
210
|
-
fontSize: "0.8rem"
|
|
211
|
-
}, children: h("WIDGET.IF_NONE_CLICK_NEXT") })] }) }) }), s("div", { ...q({ dev: {} }), style: {
|
|
212
|
-
paddingRight: I,
|
|
213
|
-
paddingLeft: I
|
|
214
|
-
}, children: C && s(Pe, { challenge: C, solution: w, onClick: a, themeColor: l }) }), s("div", { style: {
|
|
215
|
-
display: "flex",
|
|
216
|
-
alignItems: "center",
|
|
217
|
-
justifyContent: "space-between",
|
|
218
|
-
lineHeight: 1.75,
|
|
219
|
-
padding: H,
|
|
220
|
-
paddingBottom: I,
|
|
221
|
-
paddingTop: I
|
|
222
|
-
}, children: b("div", { style: {
|
|
223
|
-
display: "grid",
|
|
224
|
-
gridAutoFlow: "column",
|
|
225
|
-
gridTemplateColumns: "repeat(3, minmax(0, 1fr)",
|
|
226
|
-
width: "100%"
|
|
227
|
-
}, children: [s("div", { style: { justifySelf: "left" }, children: s($, { themeColor: l, buttonType: "cancel", onClick: n, text: h("WIDGET.CANCEL"), "aria-label": h("WIDGET.CANCEL") }) }), s("div", { style: { justifySelf: "center" }, children: s(_e, { themeColor: l, onReload: d }) }), s("div", { style: { justifySelf: "right" }, children: s($, { themeColor: l, buttonType: "next", text: e < t.captchas.length - 1 ? h("WIDGET.NEXT") : h("WIDGET.SUBMIT"), onClick: e < t.captchas.length - 1 ? r : i, "aria-label": e < t.captchas.length - 1 ? h("WIDGET.NEXT") : h("WIDGET.SUBMIT"), "data-cy": "button-next" }) })] }) })] }) }) });
|
|
228
|
-
};
|
|
229
|
-
function Oe(t) {
|
|
230
|
-
return U([
|
|
231
|
-
t.captchaId,
|
|
232
|
-
t.captchaContentId,
|
|
233
|
-
[...t.solution].sort(),
|
|
234
|
-
t.salt
|
|
235
|
-
]);
|
|
236
|
-
}
|
|
237
|
-
class z {
|
|
238
|
-
constructor(e) {
|
|
239
|
-
this.hash = e, this.parent = null;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
class We {
|
|
243
|
-
constructor() {
|
|
244
|
-
this.leaves = [], this.layers = [];
|
|
245
|
-
}
|
|
246
|
-
getRoot() {
|
|
247
|
-
if (this.root === void 0)
|
|
248
|
-
throw new T("DATASET.MERKLE_ERROR", {
|
|
249
|
-
context: {
|
|
250
|
-
error: "root undefined",
|
|
251
|
-
failedFuncName: this.getRoot.name
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
return this.root;
|
|
255
|
-
}
|
|
256
|
-
build(e) {
|
|
257
|
-
this.layers.length && (this.layers = []);
|
|
258
|
-
const o = [];
|
|
259
|
-
for (const i of e) {
|
|
260
|
-
const n = new z(i);
|
|
261
|
-
this.leaves.push(n), o.push(n.hash);
|
|
262
|
-
}
|
|
263
|
-
this.layers.push(o), this.root = this.buildMerkleTree(this.leaves)[0];
|
|
264
|
-
}
|
|
265
|
-
buildMerkleTree(e) {
|
|
266
|
-
const o = e.length;
|
|
267
|
-
if (o === 1)
|
|
268
|
-
return e;
|
|
269
|
-
const i = [];
|
|
270
|
-
let n = 0;
|
|
271
|
-
const a = [];
|
|
272
|
-
for (; n < o; ) {
|
|
273
|
-
const r = e[n];
|
|
274
|
-
if (r === void 0)
|
|
275
|
-
throw new T("DEVELOPER.GENERAL", {
|
|
276
|
-
context: { error: "leftChild undefined" }
|
|
277
|
-
});
|
|
278
|
-
const d = n + 1 < o ? m(e, n + 1) : r, l = this.createParent(r, d);
|
|
279
|
-
a.push(l.hash), i.push(l), n += 2;
|
|
280
|
-
}
|
|
281
|
-
return this.layers.push(a), this.buildMerkleTree(i);
|
|
282
|
-
}
|
|
283
|
-
createParent(e, o) {
|
|
284
|
-
const i = new z(U([e.hash, o.hash]));
|
|
285
|
-
return e.parent = i.hash, o.parent = i.hash, i;
|
|
286
|
-
}
|
|
287
|
-
proof(e) {
|
|
288
|
-
const o = [];
|
|
289
|
-
let i = 0;
|
|
290
|
-
for (; i < this.layers.length - 1; ) {
|
|
291
|
-
const a = this.layers[i];
|
|
292
|
-
if (a === void 0)
|
|
293
|
-
throw new T("DATASET.MERKLE_ERROR", {
|
|
294
|
-
context: {
|
|
295
|
-
error: "layer undefined",
|
|
296
|
-
failedFuncName: this.proof.name,
|
|
297
|
-
layerNum: i
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
const r = a.indexOf(e);
|
|
301
|
-
let d = r % 2 && r > 0 ? r - 1 : r + 1;
|
|
302
|
-
d > a.length - 1 && (d = r);
|
|
303
|
-
const l = [e], h = m(a, d);
|
|
304
|
-
d > r ? l.push(h) : l.unshift(h), o.push([m(l, 0), m(l, 1)]), i += 1, e = U(l);
|
|
305
|
-
}
|
|
306
|
-
const n = m(this.layers, this.layers.length - 1);
|
|
307
|
-
return [...o, [m(n, 0)]];
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
class F {
|
|
311
|
-
constructor(e, o, i, n, a) {
|
|
312
|
-
this.userAccount = e, this.provider = o, this.providerApi = i, this._web2 = n, this.dappAccount = a;
|
|
313
|
-
}
|
|
314
|
-
get web2() {
|
|
315
|
-
return this._web2;
|
|
316
|
-
}
|
|
317
|
-
async getCaptchaChallenge(e) {
|
|
318
|
-
try {
|
|
319
|
-
const o = await this.providerApi.getCaptchaChallenge(this.userAccount, this.provider, e);
|
|
320
|
-
if (o[f.error])
|
|
321
|
-
return o;
|
|
322
|
-
for (const i of o.captchas)
|
|
323
|
-
for (const n of i.items)
|
|
324
|
-
n.data && (n.data = `https://${n.data.replace(/^http(s)*:\/\//, "")}`);
|
|
325
|
-
return o;
|
|
326
|
-
} catch (o) {
|
|
327
|
-
throw new N("CAPTCHA.INVALID_CAPTCHA_CHALLENGE", {
|
|
328
|
-
context: { error: o }
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
async submitCaptchaSolution(e, o, i, n, a) {
|
|
333
|
-
const r = new We(), d = i.map((w) => Oe(w));
|
|
334
|
-
if (r.build(d), !r.root)
|
|
335
|
-
throw new _("CAPTCHA.INVALID_CAPTCHA_CHALLENGE", {
|
|
336
|
-
context: { error: "Merkle tree root is undefined" }
|
|
337
|
-
});
|
|
338
|
-
const l = r.root.hash, h = void 0;
|
|
339
|
-
let C;
|
|
340
|
-
try {
|
|
341
|
-
C = await this.providerApi.submitCaptchaSolution(i, o, this.userAccount, n, a, e);
|
|
342
|
-
} catch (w) {
|
|
343
|
-
throw new _("CAPTCHA.INVALID_CAPTCHA_CHALLENGE", {
|
|
344
|
-
context: { error: w }
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
return [C, l, h];
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
const Ue = () => ({
|
|
351
|
-
showModal: !1,
|
|
352
|
-
loading: !1,
|
|
353
|
-
index: 0,
|
|
354
|
-
challenge: void 0,
|
|
355
|
-
solutions: void 0,
|
|
356
|
-
isHuman: !1,
|
|
357
|
-
captchaApi: void 0,
|
|
358
|
-
account: void 0
|
|
359
|
-
});
|
|
360
|
-
function Be(t, e, o, i, n) {
|
|
361
|
-
const a = oe(i), r = Ae(e, o), d = () => {
|
|
362
|
-
const c = {
|
|
363
|
-
userAccountAddress: "",
|
|
364
|
-
...t
|
|
365
|
-
};
|
|
366
|
-
return e.account && (c.userAccountAddress = e.account.account.address), K.parse(c);
|
|
367
|
-
}, l = async () => {
|
|
368
|
-
a.onOpen(), await B(async () => {
|
|
369
|
-
var D;
|
|
370
|
-
if (e.loading || e.isHuman)
|
|
371
|
-
return;
|
|
372
|
-
r({ loading: !0 }), r({
|
|
373
|
-
attemptCount: e.attemptCount ? e.attemptCount + 1 : 1
|
|
374
|
-
}), r({
|
|
375
|
-
sessionId: n == null ? void 0 : n.sessionId
|
|
376
|
-
});
|
|
377
|
-
const c = d();
|
|
378
|
-
r({ dappAccount: c.account.address }), await Ee(100);
|
|
379
|
-
const p = await Z();
|
|
380
|
-
let g = e.captchaApi;
|
|
381
|
-
if (n != null && n.provider) {
|
|
382
|
-
const v = n.provider.provider.url, A = await I(v);
|
|
383
|
-
g = new F(p.account.address, n.provider, A, c.web2, c.account.address || ""), r({ captchaApi: g });
|
|
384
|
-
} else {
|
|
385
|
-
const v = await ae(d()), A = v.provider.url, E = await I(A);
|
|
386
|
-
g = new F(p.account.address, v, E, c.web2, c.account.address || ""), r({ captchaApi: g });
|
|
387
|
-
}
|
|
388
|
-
const u = await (g == null ? void 0 : g.getCaptchaChallenge(e.sessionId));
|
|
389
|
-
if (u.error)
|
|
390
|
-
r({
|
|
391
|
-
loading: !1,
|
|
392
|
-
error: u.error.message
|
|
393
|
-
}), a.onError(new Error((D = u.error) == null ? void 0 : D.message));
|
|
394
|
-
else {
|
|
395
|
-
if (u.captchas.length <= 0)
|
|
396
|
-
throw new _("DEVELOPER.PROVIDER_NO_CAPTCHA");
|
|
397
|
-
const v = u.captchas.map((E) => E.timeLimitMs || c.captchas.image.challengeTimeout).reduce((E, R) => E + R), A = setTimeout(() => {
|
|
398
|
-
a.onChallengeExpired(), r({ isHuman: !1, showModal: !1, loading: !1 });
|
|
399
|
-
}, v);
|
|
400
|
-
r({
|
|
401
|
-
index: 0,
|
|
402
|
-
solutions: u.captchas.map(() => []),
|
|
403
|
-
challenge: u,
|
|
404
|
-
showModal: !0,
|
|
405
|
-
timeout: A,
|
|
406
|
-
loading: !1
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
}, l, k, e.attemptCount, 10);
|
|
410
|
-
}, h = async () => {
|
|
411
|
-
await B(async () => {
|
|
412
|
-
if (M(), !e.challenge)
|
|
413
|
-
throw new T("CAPTCHA.NO_CAPTCHA", {
|
|
414
|
-
context: { error: "Cannot submit, no Captcha found in state" }
|
|
415
|
-
});
|
|
416
|
-
r({ showModal: !1 });
|
|
417
|
-
const c = e.challenge, p = Ne(), g = e.challenge.captchas.map((S, te) => {
|
|
418
|
-
const ne = m(e.solutions, te);
|
|
419
|
-
return {
|
|
420
|
-
captchaId: S.captchaId,
|
|
421
|
-
captchaContentId: S.captchaContentId,
|
|
422
|
-
salt: p,
|
|
423
|
-
solution: ne
|
|
424
|
-
};
|
|
425
|
-
}), u = O(), D = Q(u).signer;
|
|
426
|
-
if (!m(c.captchas, 0).datasetId)
|
|
427
|
-
throw new _("CAPTCHA.INVALID_CAPTCHA_ID", {
|
|
428
|
-
context: { error: "No datasetId set for challenge" }
|
|
429
|
-
});
|
|
430
|
-
const A = e.captchaApi;
|
|
431
|
-
if (!A)
|
|
432
|
-
throw new T("CAPTCHA.INVALID_TOKEN", {
|
|
433
|
-
context: { error: "No Captcha API found in state" }
|
|
434
|
-
});
|
|
435
|
-
if (!D || !D.signRaw)
|
|
436
|
-
throw new N("GENERAL.CANT_FIND_KEYRINGPAIR", {
|
|
437
|
-
context: {
|
|
438
|
-
error: "Signer is not defined, cannot sign message to prove account ownership"
|
|
439
|
-
}
|
|
440
|
-
});
|
|
441
|
-
const E = await D.signRaw({
|
|
442
|
-
address: u.account.address,
|
|
443
|
-
data: Te(c[f.timestamp]),
|
|
444
|
-
type: "bytes"
|
|
445
|
-
}), R = await A.submitCaptchaSolution(E.signature, c.requestHash, g, c.timestamp, c.signature.provider.requestHash), ee = R[0].verified;
|
|
446
|
-
if (r({
|
|
447
|
-
submission: R,
|
|
448
|
-
isHuman: ee,
|
|
449
|
-
loading: !1
|
|
450
|
-
}), e.isHuman) {
|
|
451
|
-
const S = A.provider.provider.url;
|
|
452
|
-
a.onHuman(re({
|
|
453
|
-
[f.providerUrl]: S,
|
|
454
|
-
[f.user]: u.account.address,
|
|
455
|
-
[f.dapp]: J(),
|
|
456
|
-
[f.commitmentId]: ke(R[1]),
|
|
457
|
-
[f.timestamp]: c.timestamp,
|
|
458
|
-
[f.signature]: {
|
|
459
|
-
[f.provider]: {
|
|
460
|
-
[f.requestHash]: c.signature.provider.requestHash
|
|
461
|
-
},
|
|
462
|
-
[f.user]: {
|
|
463
|
-
[f.timestamp]: E.signature
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
})), Y();
|
|
467
|
-
} else
|
|
468
|
-
a.onFailed(), k(n == null ? void 0 : n.restart);
|
|
469
|
-
}, l, k, e.attemptCount, 10);
|
|
470
|
-
}, C = async () => {
|
|
471
|
-
M(), k(n == null ? void 0 : n.restart), a.onClose();
|
|
472
|
-
}, w = async () => {
|
|
473
|
-
M(), a.onReload(), k(n == null ? void 0 : n.restart), n != null && n.restart || await l();
|
|
474
|
-
}, y = (c) => {
|
|
475
|
-
if (!e.challenge)
|
|
476
|
-
throw new T("CAPTCHA.NO_CAPTCHA", {
|
|
477
|
-
context: { error: "Cannot select, no Captcha found in state" }
|
|
478
|
-
});
|
|
479
|
-
if (e.index >= e.challenge.captchas.length || e.index < 0)
|
|
480
|
-
throw new T("CAPTCHA.NO_CAPTCHA", {
|
|
481
|
-
context: {
|
|
482
|
-
error: "Cannot select, index is out of range for this Captcha"
|
|
483
|
-
}
|
|
484
|
-
});
|
|
485
|
-
const p = e.index, g = e.solutions, u = m(g, p);
|
|
486
|
-
u.includes(c) ? u.splice(u.indexOf(c), 1) : u.push(c), r({ solutions: g });
|
|
487
|
-
}, H = () => {
|
|
488
|
-
if (!e.challenge)
|
|
489
|
-
throw new T("CAPTCHA.NO_CAPTCHA", {
|
|
490
|
-
context: { error: "Cannot select, no Captcha found in state" }
|
|
491
|
-
});
|
|
492
|
-
if (e.index + 1 >= e.challenge.captchas.length)
|
|
493
|
-
throw new T("CAPTCHA.NO_CAPTCHA", {
|
|
494
|
-
context: {
|
|
495
|
-
error: "Cannot select, index is out of range for this Captcha"
|
|
496
|
-
}
|
|
497
|
-
});
|
|
498
|
-
r({ index: e.index + 1 });
|
|
499
|
-
}, I = async (c) => {
|
|
500
|
-
const p = d();
|
|
501
|
-
if (!p.account.address)
|
|
502
|
-
throw new N("GENERAL.SITE_KEY_MISSING");
|
|
503
|
-
return new ie(c, p.account.address);
|
|
504
|
-
}, M = () => {
|
|
505
|
-
window.clearTimeout(Number(e.timeout)), r({ timeout: void 0 });
|
|
506
|
-
}, Y = () => {
|
|
507
|
-
const c = t.captchas.image.solutionTimeout, p = setTimeout(() => {
|
|
508
|
-
r({ isHuman: !1 }), a.onExpired();
|
|
509
|
-
}, c);
|
|
510
|
-
r({ successfullChallengeTimeout: p });
|
|
511
|
-
}, k = (c) => {
|
|
512
|
-
M(), r(Ue()), a.onReset(), c && c();
|
|
513
|
-
}, Z = async () => {
|
|
514
|
-
const c = d();
|
|
515
|
-
if (!c.web2 && !c.userAccountAddress)
|
|
516
|
-
throw new N("GENERAL.ACCOUNT_NOT_FOUND", {
|
|
517
|
-
context: { error: "Account address has not been set for web3 mode" }
|
|
518
|
-
});
|
|
519
|
-
const g = await (async () => {
|
|
520
|
-
const u = new (await se(c.web2))();
|
|
521
|
-
return n ? n.userAccount : await u.getAccount(c);
|
|
522
|
-
})();
|
|
523
|
-
return r({ account: g }), O();
|
|
524
|
-
}, O = () => {
|
|
525
|
-
if (!e.account)
|
|
526
|
-
throw new N("GENERAL.ACCOUNT_NOT_FOUND", {
|
|
527
|
-
context: { error: "Account not loaded" }
|
|
528
|
-
});
|
|
529
|
-
return e.account;
|
|
530
|
-
}, J = () => {
|
|
531
|
-
if (!e.dappAccount)
|
|
532
|
-
throw new N("GENERAL.SITE_KEY_MISSING");
|
|
533
|
-
return e.dappAccount;
|
|
534
|
-
}, Q = (c) => {
|
|
535
|
-
const p = c || O();
|
|
536
|
-
if (!p.extension)
|
|
537
|
-
throw new N("ACCOUNT.NO_POLKADOT_EXTENSION", {
|
|
538
|
-
context: { error: "Extension not loaded" }
|
|
539
|
-
});
|
|
540
|
-
return p.extension;
|
|
541
|
-
};
|
|
542
|
-
return {
|
|
543
|
-
start: l,
|
|
544
|
-
cancel: C,
|
|
545
|
-
submit: h,
|
|
546
|
-
select: y,
|
|
547
|
-
nextRound: H,
|
|
548
|
-
reload: w
|
|
549
|
-
};
|
|
550
|
-
}
|
|
551
|
-
const je = ce.memo((t, e) => {
|
|
552
|
-
const { show: o, children: i } = t, a = {
|
|
553
|
-
position: "fixed",
|
|
554
|
-
zIndex: 2147483646,
|
|
555
|
-
inset: 0,
|
|
556
|
-
display: o ? "block" : "none"
|
|
557
|
-
}, r = {
|
|
558
|
-
position: "fixed",
|
|
559
|
-
display: "flex",
|
|
560
|
-
alignItems: "center",
|
|
561
|
-
justifyContent: "center",
|
|
562
|
-
right: 0,
|
|
563
|
-
bottom: 0,
|
|
564
|
-
top: 0,
|
|
565
|
-
left: 0,
|
|
566
|
-
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
567
|
-
zIndex: -1
|
|
568
|
-
}, d = {
|
|
569
|
-
position: "absolute",
|
|
570
|
-
top: "50%",
|
|
571
|
-
left: "50%",
|
|
572
|
-
transform: "translate(-50%, -50%)",
|
|
573
|
-
width: "inherit",
|
|
574
|
-
backgroundColor: "transparent",
|
|
575
|
-
border: "none",
|
|
576
|
-
boxShadow: "rgba(0, 0, 0, 0.2) 0px 11px 15px -7px, rgba(0, 0, 0, 0.14) 0px 24px 38px 3px, rgba(0, 0, 0, 0.12) 0px 9px 46px 8px,"
|
|
577
|
-
};
|
|
578
|
-
return b("div", { className: "prosopo-modalOuter", style: a, children: [s("div", { className: "prosopo-modalBackground", style: r }), s("div", { className: "prosopo-modalInner", style: d, children: i })] });
|
|
579
|
-
}), Ve = (t) => {
|
|
580
|
-
const { t: e } = V(), o = K.parse(t.config), i = t.frictionlessState, n = t.callbacks || {}, [a, r] = Ie(x.useState, x.useRef), d = Be(o, a, r, n, i), l = t.config.theme === "light" ? "light" : "dark", h = t.config.theme === "light" ? L : P;
|
|
581
|
-
return x.useEffect(() => {
|
|
582
|
-
o.language && ve().then((C) => {
|
|
583
|
-
C.changeLanguage(o.language).then((w) => w);
|
|
584
|
-
});
|
|
585
|
-
}, [o.language]), s("div", { style: { width: "100%", minHeight: j }, children: b("div", { style: {
|
|
586
|
-
maxWidth: le,
|
|
587
|
-
minHeight: j,
|
|
588
|
-
maxHeight: "100%",
|
|
589
|
-
overflowX: "auto",
|
|
590
|
-
width: "100%",
|
|
591
|
-
...h.font
|
|
592
|
-
}, children: [s(je, { show: a.showModal, children: a.challenge ? s(Ge, { challenge: a.challenge, index: a.index, solutions: a.solutions, onSubmit: d.submit, onCancel: d.cancel, onClick: d.select, onNext: d.nextRound, onReload: d.reload, themeColor: o.theme ?? "light" }) : s("div", { children: "No challenge set." }) }), s(de, { children: s(he, { children: b("div", { style: ue, "data-cy": "button-human", children: [" ", b("div", { style: {
|
|
593
|
-
padding: me,
|
|
594
|
-
border: fe,
|
|
595
|
-
backgroundColor: h.palette.background.default,
|
|
596
|
-
borderColor: h.palette.grey[300],
|
|
597
|
-
borderRadius: ge,
|
|
598
|
-
display: "flex",
|
|
599
|
-
alignItems: "center",
|
|
600
|
-
flexWrap: "wrap",
|
|
601
|
-
justifyContent: "space-between",
|
|
602
|
-
minHeight: `${pe}px`,
|
|
603
|
-
overflow: "hidden"
|
|
604
|
-
}, children: [s("div", { style: { display: "inline-flex", flexDirection: "column" }, children: s("div", { style: {
|
|
605
|
-
alignItems: "center",
|
|
606
|
-
flex: 1
|
|
607
|
-
}, children: s("div", { style: {
|
|
608
|
-
display: "flex",
|
|
609
|
-
alignItems: "center",
|
|
610
|
-
justifyContent: "center",
|
|
611
|
-
flexDirection: "column",
|
|
612
|
-
verticalAlign: "middle"
|
|
613
|
-
}, children: s("div", { style: {
|
|
614
|
-
display: "flex"
|
|
615
|
-
}, children: a.loading ? s(xe, { themeColor: l, "aria-label": "Loading spinner" }) : s(Ce, { themeColor: l, onChange: d.start, checked: a.isHuman, labelText: e("WIDGET.I_AM_HUMAN"), error: a.error, "aria-label": "human checkbox" }) }) }) }) }), s("div", { style: { display: "inline-flex", flexDirection: "column" }, children: s("a", { href: we, target: "_blank", "aria-label": be, children: s("div", { style: { flex: 1 }, children: s(ye, { themeColor: l, "aria-label": "Prosopo logo" }) }) }) })] })] }) }) })] }) });
|
|
616
|
-
};
|
|
617
|
-
export {
|
|
618
|
-
Ve as default
|
|
619
|
-
};
|