@prosopo/client-bundle-example 2.9.5 → 2.10.7
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/CHANGELOG.md +150 -0
- package/dist/cjs/index.cjs +49 -0
- package/dist/index.js +49 -1
- package/package.json +10 -14
- package/vite.config.ts +1 -0
- package/dist/assets/captcha-BaCo3bEP.js +0 -1
- package/dist/assets/captcha-DAWM1slf.css +0 -1
- package/dist/assets/dummy.txt +0 -0
- package/dist/assets/frictionless-explicit-CtnTw8dK.js +0 -1
- package/dist/assets/frictionless-implicit-BH7anfOq.js +0 -1
- package/dist/assets/image-explicit-Dm_JoW0N.js +0 -4
- package/dist/assets/image-implicit-M0Y7U93R.js +0 -1
- package/dist/assets/index-Ck5HfpfQ.js +0 -1
- package/dist/assets/invisible-frictionless-explicit-CSPYfcNr.js +0 -4
- package/dist/assets/invisible-frictionless-implicit-D0saDt4U.js +0 -1
- package/dist/assets/invisible-image-explicit-erOMAo-F.js +0 -4
- package/dist/assets/invisible-image-implicit-c0sMfk2s.js +0 -1
- package/dist/assets/invisible-pow-explicit-BgMt7lhN.js +0 -4
- package/dist/assets/invisible-pow-implicit-CnxS8gw2.js +0 -4
- package/dist/assets/pow-explicit-BgDWNJK9.js +0 -4
- package/dist/assets/pow-implicit-Ck5HfpfQ.js +0 -1
- package/dist/frictionless-explicit.html +0 -875
- package/dist/frictionless-implicit.html +0 -874
- package/dist/image-explicit.html +0 -877
- package/dist/index.html +0 -850
- package/dist/invisible-frictionless-explicit.html +0 -877
- package/dist/invisible-frictionless-implicit.html +0 -884
- package/dist/invisible-image-explicit.html +0 -878
- package/dist/invisible-image-implicit.html +0 -884
- package/dist/invisible-pow-explicit.html +0 -878
- package/dist/invisible-pow-implicit.html +0 -878
- package/dist/plugins/explanation-injector.ts +0 -250
- package/dist/plugins/form-filler-injector.ts +0 -233
- package/dist/plugins/navigation-injector.ts +0 -602
- package/dist/plugins/status-log-injector.ts +0 -199
- package/dist/pow-explicit.html +0 -877
- package/dist/pow-implicit.html +0 -881
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,155 @@
|
|
|
1
1
|
# @prosopo/client-bundle-example
|
|
2
2
|
|
|
3
|
+
## 2.10.7
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- 8ce9205: Change engine requirements
|
|
7
|
+
- b6e98b2: Run npm audit
|
|
8
|
+
- Updated dependencies [8ce9205]
|
|
9
|
+
- Updated dependencies [df79c03]
|
|
10
|
+
- Updated dependencies [b6e98b2]
|
|
11
|
+
- @prosopo/config@3.1.22
|
|
12
|
+
|
|
13
|
+
## 2.10.6
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [b8185a4]
|
|
17
|
+
- @prosopo/config@3.1.21
|
|
18
|
+
|
|
19
|
+
## 2.10.5
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [1e3a838]
|
|
23
|
+
- @prosopo/config@3.1.20
|
|
24
|
+
|
|
25
|
+
## 2.10.4
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- 5659b24: Release 3.4.4
|
|
29
|
+
- Updated dependencies [5659b24]
|
|
30
|
+
- @prosopo/config@3.1.19
|
|
31
|
+
|
|
32
|
+
## 2.10.3
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- 50c4120: Release 3.4.3
|
|
36
|
+
- Updated dependencies [50c4120]
|
|
37
|
+
- @prosopo/config@3.1.18
|
|
38
|
+
|
|
39
|
+
## 2.10.2
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- 618703f: Release 3.4.2
|
|
43
|
+
- Updated dependencies [618703f]
|
|
44
|
+
- @prosopo/config@3.1.17
|
|
45
|
+
|
|
46
|
+
## 2.10.1
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- 11303d9: Release 3.4.0
|
|
50
|
+
- 18cb28b: Release 3.4.1
|
|
51
|
+
- Updated dependencies [11303d9]
|
|
52
|
+
- Updated dependencies [18cb28b]
|
|
53
|
+
- @prosopo/config@3.1.16
|
|
54
|
+
|
|
55
|
+
## 2.10.0
|
|
56
|
+
### Minor Changes
|
|
57
|
+
|
|
58
|
+
- 6768f14: Update salt
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- f3f7aec: Release 3.4.0
|
|
63
|
+
- Updated dependencies [f3f7aec]
|
|
64
|
+
- @prosopo/config@3.1.15
|
|
65
|
+
|
|
66
|
+
## 2.9.17
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- Release 3.3.1
|
|
70
|
+
- 0824221: Release 3.2.4
|
|
71
|
+
- Updated dependencies
|
|
72
|
+
- Updated dependencies [0824221]
|
|
73
|
+
- @prosopo/config@3.1.14
|
|
74
|
+
|
|
75
|
+
## 2.9.16
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- 008d112: Release 3.3.0
|
|
79
|
+
- Updated dependencies [008d112]
|
|
80
|
+
- @prosopo/config@3.1.13
|
|
81
|
+
|
|
82
|
+
## 2.9.15
|
|
83
|
+
### Patch Changes
|
|
84
|
+
|
|
85
|
+
- 0824221: Release 3.2.4
|
|
86
|
+
- Updated dependencies [0824221]
|
|
87
|
+
- @prosopo/config@3.1.12
|
|
88
|
+
|
|
89
|
+
## 2.9.14
|
|
90
|
+
### Patch Changes
|
|
91
|
+
|
|
92
|
+
- 1a23649: Release 3.2.3
|
|
93
|
+
- Updated dependencies [1a23649]
|
|
94
|
+
- @prosopo/config@3.1.11
|
|
95
|
+
|
|
96
|
+
## 2.9.13
|
|
97
|
+
### Patch Changes
|
|
98
|
+
|
|
99
|
+
- 657a827: Release 3.2.2
|
|
100
|
+
- Updated dependencies [657a827]
|
|
101
|
+
- @prosopo/config@3.1.10
|
|
102
|
+
|
|
103
|
+
## 2.9.12
|
|
104
|
+
### Patch Changes
|
|
105
|
+
|
|
106
|
+
- 4440947: fix type-only tsc compilation
|
|
107
|
+
- 7bdaca6: Release 3.2.1
|
|
108
|
+
- Updated dependencies [4440947]
|
|
109
|
+
- Updated dependencies [7bdaca6]
|
|
110
|
+
- Updated dependencies [809b984]
|
|
111
|
+
- Updated dependencies [809b984]
|
|
112
|
+
- @prosopo/config@3.1.9
|
|
113
|
+
|
|
114
|
+
## 2.9.11
|
|
115
|
+
### Patch Changes
|
|
116
|
+
|
|
117
|
+
- 6fe8570: Release 3.2.0
|
|
118
|
+
- Updated dependencies [6fe8570]
|
|
119
|
+
- @prosopo/config@3.1.8
|
|
120
|
+
|
|
121
|
+
## 2.9.10
|
|
122
|
+
### Patch Changes
|
|
123
|
+
|
|
124
|
+
- 181e0f5: Hot fix migrate Ips script
|
|
125
|
+
- f304be9: Release 3.1.13
|
|
126
|
+
- Updated dependencies [f304be9]
|
|
127
|
+
- @prosopo/config@3.1.7
|
|
128
|
+
|
|
129
|
+
## 2.9.9
|
|
130
|
+
### Patch Changes
|
|
131
|
+
|
|
132
|
+
- Updated dependencies [9eed772]
|
|
133
|
+
- @prosopo/config@3.1.6
|
|
134
|
+
|
|
135
|
+
## 2.9.8
|
|
136
|
+
### Patch Changes
|
|
137
|
+
|
|
138
|
+
- 6960643: lint detect missing and unneccessary imports
|
|
139
|
+
|
|
140
|
+
## 2.9.7
|
|
141
|
+
### Patch Changes
|
|
142
|
+
|
|
143
|
+
- Updated dependencies [30e7d4d]
|
|
144
|
+
- @prosopo/config@3.1.5
|
|
145
|
+
|
|
146
|
+
## 2.9.6
|
|
147
|
+
### Patch Changes
|
|
148
|
+
|
|
149
|
+
- Updated dependencies [44ffda2]
|
|
150
|
+
- Updated dependencies [a49b538]
|
|
151
|
+
- @prosopo/config@3.1.4
|
|
152
|
+
|
|
3
153
|
## 2.9.5
|
|
4
154
|
### Patch Changes
|
|
5
155
|
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
(() => {
|
|
3
|
+
function whenDOMReady(fn) {
|
|
4
|
+
if (document.readyState !== "loading") fn();
|
|
5
|
+
else document.addEventListener("DOMContentLoaded", fn);
|
|
6
|
+
}
|
|
7
|
+
whenDOMReady(() => {
|
|
8
|
+
const wrappers = Array.from(
|
|
9
|
+
document.querySelectorAll(".mui-textfield--float-label")
|
|
10
|
+
);
|
|
11
|
+
for (const wrapper of wrappers) {
|
|
12
|
+
const input = wrapper.querySelector("input, textarea, select");
|
|
13
|
+
const label = wrapper.querySelector("label");
|
|
14
|
+
if (!input || !label) return;
|
|
15
|
+
if (!input.getAttribute("aria-label") && label.textContent) {
|
|
16
|
+
input.setAttribute("aria-label", label.textContent.trim());
|
|
17
|
+
}
|
|
18
|
+
const update = () => {
|
|
19
|
+
const isChecked = input.type === "checkbox" || input.type === "radio";
|
|
20
|
+
const hasValue = isChecked ? input.checked : input.value && input.value.trim() !== "";
|
|
21
|
+
if (document.activeElement === input || hasValue) {
|
|
22
|
+
wrapper.classList.add("label-hidden");
|
|
23
|
+
} else {
|
|
24
|
+
wrapper.classList.remove("label-hidden");
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
for (const evt of [
|
|
28
|
+
"focus",
|
|
29
|
+
"input",
|
|
30
|
+
"blur",
|
|
31
|
+
"change",
|
|
32
|
+
"keyup",
|
|
33
|
+
"paste"
|
|
34
|
+
]) {
|
|
35
|
+
input.addEventListener(evt, update, { passive: true });
|
|
36
|
+
}
|
|
37
|
+
update();
|
|
38
|
+
}
|
|
39
|
+
const maxChecks = 12;
|
|
40
|
+
let checks = 0;
|
|
41
|
+
const iv = setInterval(() => {
|
|
42
|
+
checks++;
|
|
43
|
+
for (const w of wrappers) {
|
|
44
|
+
const input = w.querySelector("input,textarea,select");
|
|
45
|
+
if (input) input.dispatchEvent(new Event("input", { bubbles: true }));
|
|
46
|
+
}
|
|
47
|
+
if (checks >= maxChecks) clearInterval(iv);
|
|
48
|
+
}, 250);
|
|
49
|
+
});
|
|
50
|
+
})();
|
package/dist/index.js
CHANGED
|
@@ -1 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
(() => {
|
|
2
|
+
function whenDOMReady(fn) {
|
|
3
|
+
if (document.readyState !== "loading") fn();
|
|
4
|
+
else document.addEventListener("DOMContentLoaded", fn);
|
|
5
|
+
}
|
|
6
|
+
whenDOMReady(() => {
|
|
7
|
+
const wrappers = Array.from(
|
|
8
|
+
document.querySelectorAll(".mui-textfield--float-label")
|
|
9
|
+
);
|
|
10
|
+
for (const wrapper of wrappers) {
|
|
11
|
+
const input = wrapper.querySelector("input, textarea, select");
|
|
12
|
+
const label = wrapper.querySelector("label");
|
|
13
|
+
if (!input || !label) return;
|
|
14
|
+
if (!input.getAttribute("aria-label") && label.textContent) {
|
|
15
|
+
input.setAttribute("aria-label", label.textContent.trim());
|
|
16
|
+
}
|
|
17
|
+
const update = () => {
|
|
18
|
+
const isChecked = input.type === "checkbox" || input.type === "radio";
|
|
19
|
+
const hasValue = isChecked ? input.checked : input.value && input.value.trim() !== "";
|
|
20
|
+
if (document.activeElement === input || hasValue) {
|
|
21
|
+
wrapper.classList.add("label-hidden");
|
|
22
|
+
} else {
|
|
23
|
+
wrapper.classList.remove("label-hidden");
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
for (const evt of [
|
|
27
|
+
"focus",
|
|
28
|
+
"input",
|
|
29
|
+
"blur",
|
|
30
|
+
"change",
|
|
31
|
+
"keyup",
|
|
32
|
+
"paste"
|
|
33
|
+
]) {
|
|
34
|
+
input.addEventListener(evt, update, { passive: true });
|
|
35
|
+
}
|
|
36
|
+
update();
|
|
37
|
+
}
|
|
38
|
+
const maxChecks = 12;
|
|
39
|
+
let checks = 0;
|
|
40
|
+
const iv = setInterval(() => {
|
|
41
|
+
checks++;
|
|
42
|
+
for (const w of wrappers) {
|
|
43
|
+
const input = w.querySelector("input,textarea,select");
|
|
44
|
+
if (input) input.dispatchEvent(new Event("input", { bubbles: true }));
|
|
45
|
+
}
|
|
46
|
+
if (checks >= maxChecks) clearInterval(iv);
|
|
47
|
+
}, 250);
|
|
48
|
+
});
|
|
49
|
+
})();
|
package/package.json
CHANGED
|
@@ -11,37 +11,33 @@
|
|
|
11
11
|
},
|
|
12
12
|
"type": "module",
|
|
13
13
|
"engines": {
|
|
14
|
-
"node": "
|
|
15
|
-
"npm": "10.
|
|
14
|
+
"node": ">=v20.0.0",
|
|
15
|
+
"npm": ">=10.6.0"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
18
|
"clean": "del-cli --verbose dist tsconfig.tsbuildinfo",
|
|
19
19
|
"build": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.esm.config.ts --mode $NODE_ENV",
|
|
20
|
+
"build:tsc": "tsc --build --verbose",
|
|
20
21
|
"build:cjs": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV",
|
|
21
22
|
"bundle": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.config.ts --mode $NODE_ENV",
|
|
22
|
-
"typecheck": "tsc --
|
|
23
|
+
"typecheck": "tsc --project tsconfig.types.json",
|
|
23
24
|
"start": "NODE_ENV=${NODE_ENV:-development}; vite serve ./src --port 9232 --config vite.config.ts --mode=$NODE_ENV"
|
|
24
25
|
},
|
|
25
|
-
"version": "2.
|
|
26
|
+
"version": "2.10.7",
|
|
26
27
|
"dependencies": {
|
|
27
|
-
"@
|
|
28
|
-
"axios": "1.10.0",
|
|
29
|
-
"esbuild": "0.25.6",
|
|
30
|
-
"openpgp": "5.11.3",
|
|
31
|
-
"webpack-dev-server": "5.2.2",
|
|
32
|
-
"@prosopo/config": "3.1.3"
|
|
28
|
+
"@prosopo/config": "3.1.22"
|
|
33
29
|
},
|
|
34
30
|
"devDependencies": {
|
|
35
|
-
"@prosopo/dotenv": "3.0.
|
|
31
|
+
"@prosopo/dotenv": "3.0.27",
|
|
36
32
|
"@types/node": "22.5.5",
|
|
37
|
-
"@vitest/coverage-v8": "3.
|
|
33
|
+
"@vitest/coverage-v8": "3.2.4",
|
|
38
34
|
"concurrently": "9.0.1",
|
|
39
35
|
"del-cli": "6.0.0",
|
|
40
36
|
"npm-run-all": "4.1.5",
|
|
41
37
|
"tslib": "2.7.0",
|
|
42
38
|
"tsx": "4.20.3",
|
|
43
39
|
"typescript": "5.6.2",
|
|
44
|
-
"vite": "6.
|
|
45
|
-
"vitest": "3.
|
|
40
|
+
"vite": "6.4.1",
|
|
41
|
+
"vitest": "3.2.4"
|
|
46
42
|
}
|
|
47
43
|
}
|
package/vite.config.ts
CHANGED
|
@@ -196,6 +196,7 @@ export default defineConfig(({ command, mode }) => {
|
|
|
196
196
|
console.log("Copying additional files from src to dist...");
|
|
197
197
|
// Only copy assets and other non-HTML files since HTML files are processed by Vite
|
|
198
198
|
const srcAssetsDir = path.resolve(__dirname, "src/assets");
|
|
199
|
+
|
|
199
200
|
const destAssetsDir = path.resolve(__dirname, "dist/assets");
|
|
200
201
|
if (fs.existsSync(srcAssetsDir)) {
|
|
201
202
|
copyDirContents(srcAssetsDir, destAssetsDir);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function s(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=s(e);fetch(e.href,r)}})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.console-output{margin-top:20px;padding:10px;background-color:#f5f5f5;border:1px solid #ddd;border-radius:4px;font-family:monospace;white-space:pre-wrap;max-height:200px;overflow-y:auto}.info-box{background-color:#e7f3fe;border-left:4px solid #2196f3;padding:15px;margin:20px 0}.explanation{margin:20px 0;padding:20px;background-color:#f9f9f9;border-radius:5px;border:1px solid #ddd}code{background-color:#f0f0f0;padding:2px 4px;border-radius:3px;font-family:monospace}pre{background-color:#f5f5f5;padding:10px;border-radius:5px;overflow-x:auto;border:1px solid #ddd}.captcha-status{margin-top:20px;padding:15px;background-color:#f0f8ff;border:2px solid #2196f3;border-radius:5px;font-family:monospace;font-size:14px}.status-item{margin:5px 0;padding:5px}.status-success{color:#4caf50;font-weight:700}.status-error{color:#f44336;font-weight:700}.status-info{color:#2196f3}.status-warning{color:#ff9800}.status-title{font-weight:700;margin-bottom:10px;border-bottom:1px solid #2196f3;padding-bottom:5px}.account-select{margin:10px 0;padding:10px;background-color:#f9f9f9;border-radius:5px;border:1px solid #ddd}
|
package/dist/assets/dummy.txt
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./captcha-BaCo3bEP.js";import{render as l}from"http://localhost:9269/procaptcha.bundle.js";window.onCaptchaFailed=function(){console.log("Challenge failed"),updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")};window.addEventListener("load",()=>{updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info"),window.setIsError=s=>{const t=document.getElementById("messageContainer");t.style.color=s?"red":"black",t.style.display="block"},window.setMessage=s=>{document.getElementById("message").innerText=s},window.onLoggedIn=s=>{updateCaptchaStatus("Logged in, fetching private resource","info");const t=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",s,"at",t),fetch(t,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${s}`}}).then(async e=>{try{const a=await e.json();e.status===200?(updateCaptchaStatus("Successfully accessed private resource","success"),setMessage(a.message)):updateCaptchaStatus(`Failed to access private resource: ${e.status}`,"error")}catch(a){console.log(a),updateCaptchaStatus(`Error parsing response: ${a}`,"error")}}).catch(e=>{console.log(e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})},window.onActionHandler=()=>{updateCaptchaStatus("Form submission initiated","info");const s=document.getElementsByName("procaptcha-response");if(!s.length){updateCaptchaStatus("Error: No CAPTCHA response found","error"),alert("Must complete captcha");return}const t=s[0].value;updateCaptchaStatus(`Token received: ${t.substring(0,15)}...`,"success");const e={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":t},a=new URL("signup",void 0).href;console.log("posting to",a,"with payload",e),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),contentType:"application/json"}).then(o=>new Promise(n=>o.json().then(r=>n({status:o.status,ok:o.ok,json:r})))).then(async({status:o,json:n,ok:r})=>{console.log("status",o,"json",n.message,"ok",r),console.log("json",n);try{o!==200?(updateCaptchaStatus(`API Error: ${n.message}`,"error"),setIsError(!0),setMessage(n.message)):(updateCaptchaStatus(`API Success: ${n.message}`,"success"),setIsError(!1),setMessage(n.message))}catch(i){console.log(i),updateCaptchaStatus(`Error processing response: ${i}`,"error")}}).catch(o=>{console.log(o),updateCaptchaStatus(`Fetch error: ${o}`,"error"),setIsError(!0),setMessage("Error: "+o)})};const c=new MutationObserver(s=>{s.forEach(t=>{if(t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){const a=t.addedNodes[e];if(a.classList&&(a.classList.contains("procaptcha")||a.querySelector&&a.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),c.disconnect();break}}})});c.observe(document.body,{childList:!0,subtree:!0})});function d(c){console.log("Challenge passed"),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${c.substring(0,15)}...`,"success")}const p=document.getElementById("procaptcha-container");l(p,{siteKey:void 0,captchaType:"frictionless",callback:d,"failed-callback":function(){console.log("Challenge failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./captcha-BaCo3bEP.js";import{render as d}from"http://localhost:9269/procaptcha.bundle.js";window.addEventListener("load",()=>{updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info"),window.setIsError=s=>{const t=document.getElementById("messageContainer");t.style.color=s?"red":"black",t.style.display="block"},window.setMessage=s=>{document.getElementById("message").innerText=s},window.onLoggedIn=s=>{updateCaptchaStatus("Logged in, fetching private resource","info");const t=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",s,"at",t),fetch(t,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${s}`}}).then(async e=>{try{const a=await e.json();e.status===200?(updateCaptchaStatus("Successfully accessed private resource","success"),setMessage(a.message)):updateCaptchaStatus(`Failed to access private resource: ${e.status}`,"error")}catch(a){console.log(a),updateCaptchaStatus(`Error parsing response: ${a}`,"error")}}).catch(e=>{console.log(e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})},window.onActionHandler=()=>{updateCaptchaStatus("Form submission initiated","info");const s=document.getElementsByName("procaptcha-response");if(!s.length){updateCaptchaStatus("Error: No CAPTCHA response found","error"),alert("Must complete captcha");return}const t=s[0].value;updateCaptchaStatus(`Token received: ${t.substring(0,15)}...`,"success");const e={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":t},a=new URL("signup",void 0).href;console.log("posting to",a,"with payload",e),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),contentType:"application/json"}).then(o=>new Promise(n=>o.json().then(c=>n({status:o.status,ok:o.ok,json:c})))).then(async({status:o,json:n,ok:c})=>{console.log("status",o,"json",n.message,"ok",c),console.log("json",n);try{o!==200?(updateCaptchaStatus(`API Error: ${n.message}`,"error"),setIsError(!0),setMessage(n.message)):(updateCaptchaStatus(`API Success: ${n.message}`,"success"),setIsError(!1),setMessage(n.message))}catch(i){console.log(i),updateCaptchaStatus(`Error processing response: ${i}`,"error")}}).catch(o=>{console.log(o),updateCaptchaStatus(`Fetch error: ${o}`,"error"),setIsError(!0),setMessage("Error: "+o)})};const r=new MutationObserver(s=>{s.forEach(t=>{if(t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){const a=t.addedNodes[e];if(a.classList&&(a.classList.contains("procaptcha")||a.querySelector&&a.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),r.disconnect();break}}})});r.observe(document.body,{childList:!0,subtree:!0})});function l(r){console.log("Challenge passed"),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${r.substring(0,15)}...`,"success")}const p=document.getElementById("procaptcha-container"),u=d(p,{siteKey:void 0,captchaType:"frictionless",callback:l,"failed-callback":function(){console.log("Challenge failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")}});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+u,"info");
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import"./captcha-BaCo3bEP.js";import{render as o}from"http://localhost:9269/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const t=new MutationObserver(a=>{a.forEach(e=>{if(e.addedNodes.length)for(let n=0;n<e.addedNodes.length;n++){const i=e.addedNodes[n];if(i.classList&&(i.classList.contains("procaptcha")||i.querySelector&&i.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),t.disconnect();break}}})});t.observe(document.body,{childList:!0,subtree:!0})});function d(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function s(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
|
|
2
|
-
- Name: ${a}<br>
|
|
3
|
-
- Email: ${e}<br>
|
|
4
|
-
- Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function l(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=o(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"image",callback:s,"failed-callback":l});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),d()&&window.updateCaptchaStatus("Waiting for CAPTCHA verification","info")})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./captcha-BaCo3bEP.js";import"./index-Ck5HfpfQ.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./captcha-BaCo3bEP.js";window.addEventListener("load",()=>{window.setIsError=s=>{const t=document.getElementById("messageContainer");t.style.color=s?"red":"black",t.style.display="block"},window.setMessage=s=>{document.getElementById("message").innerText=s},window.onLoggedIn=s=>{updateCaptchaStatus("Logged in, fetching private resource","info");const t=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",s,"at",t),fetch(t,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${s}`}}).then(async e=>{try{const a=await e.json();e.status===200?(updateCaptchaStatus("Successfully accessed private resource","success"),setMessage(a.message)):updateCaptchaStatus(`Failed to access private resource: ${e.status}`,"error")}catch(a){console.log(a),updateCaptchaStatus(`Error parsing response: ${a}`,"error")}}).catch(e=>{console.log(e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})},window.onActionHandler=()=>{updateCaptchaStatus("Form submission initiated","info");const s=document.getElementsByName("procaptcha-response");if(!s.length){updateCaptchaStatus("Error: No CAPTCHA response found","error"),alert("Must complete captcha");return}const t=s[0].value;updateCaptchaStatus(`Token received: ${t.substring(0,15)}...`,"success");const e={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":t},a=new URL("signup",void 0).href;console.log("posting to",a,"with payload",e),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),contentType:"application/json"}).then(o=>new Promise(n=>o.json().then(c=>n({status:o.status,ok:o.ok,json:c})))).then(async({status:o,json:n,ok:c})=>{console.log("status",o,"json",n.message,"ok",c),console.log("json",n);try{o!==200?(updateCaptchaStatus(`API Error: ${n.message}`,"error"),setIsError(!0),setMessage(n.message)):(updateCaptchaStatus(`API Success: ${n.message}`,"success"),setIsError(!1),setMessage(n.message))}catch(i){console.log(i),updateCaptchaStatus(`Error processing response: ${i}`,"error")}}).catch(o=>{console.log(o),updateCaptchaStatus(`Fetch error: ${o}`,"error"),setIsError(!0),setMessage("Error: "+o)})},updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const r=new MutationObserver(s=>{s.forEach(t=>{if(t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){const a=t.addedNodes[e];if(a.classList&&(a.classList.contains("procaptcha")||a.querySelector&&a.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),r.disconnect();break}}})});r.observe(document.body,{childList:!0,subtree:!0})});window.onCaptchaFailed=function(){console.log("Challenge failed"),updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")};window.onCaptchaVerified=r=>{console.log("Challenge passed"),updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${r.substring(0,15)}...`,"success")};document.addEventListener("DOMContentLoaded",function(){setTimeout(()=>{updateCaptchaStatus("CAPTCHA script loaded and initialized","info"),updateCaptchaStatus("Waiting for user interaction...","info")},500)});
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import"./captcha-BaCo3bEP.js";import{render as i,execute as o}from"http://localhost:9269/procaptcha.bundle.js";function l(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function d(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
|
|
2
|
-
- Name: ${a}<br>
|
|
3
|
-
- Email: ${e}<br>
|
|
4
|
-
- Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function s(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=i(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"frictionless",callback:d,"failed-callback":s,size:"invisible"});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),l()&&(window.updateCaptchaStatus("Waiting for CAPTCHA verification","info"),o())})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./captcha-BaCo3bEP.js";window.onCaptchaFailed=function(){updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")};window.onCaptchaVerified=function(s){updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${s.substring(0,15)}...`,"success")};window.onActionHandler=function(s){if(updateCaptchaStatus("CAPTCHA callback executed with token","success"),!s){updateCaptchaStatus("Error: No token received from CAPTCHA","error"),alert("Must complete captcha");return}updateCaptchaStatus("Form submission initiated with valid CAPTCHA token","info");const o={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":s},a=new URL("signup",void 0).href;console.log("Posting to",a,"with payload",o),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o),contentType:"application/json"}).then(e=>new Promise(t=>e.json().then(n=>t({status:e.status,ok:e.ok,json:n})))).then(async({status:e,json:t,ok:n})=>{console.log("Response status:",e,"message:",t.message,"ok:",n),console.log("Full response:",t);try{e!==200?(window.setIsError(!0),window.setMessage(t.message),updateCaptchaStatus(`API Error: ${t.message}`,"error")):(window.setIsError(!1),window.setMessage(t.message),updateCaptchaStatus(`API Success: ${t.message}`,"success"))}catch(r){console.log("Error processing response:",r),updateCaptchaStatus(`Error processing response: ${r}`,"error")}}).catch(e=>{console.log("Fetch error:",e),window.setIsError(!0),window.setMessage("Error: "+e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})};window.addEventListener("load",()=>{window.setIsError=o=>{const a=document.getElementById("messageContainer");a.style.color=o?"red":"black",a.style.display="block"},window.setMessage=o=>{document.getElementById("message").innerText=o},window.onLoggedIn=o=>{const a=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",o,"at",a),fetch(a,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${o}`}}).then(async e=>{try{const t=await e.json();e.status===200&&setMessage(t.message)}catch(t){console.log(t)}}).catch(e=>{console.log(e)})},updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const s=new MutationObserver(o=>{o.forEach(a=>{if(a.addedNodes.length)for(let e=0;e<a.addedNodes.length;e++){const t=a.addedNodes[e];if(t.classList&&(t.classList.contains("procaptcha")||t.querySelector&&t.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),s.disconnect();break}}})});s.observe(document.body,{childList:!0,subtree:!0})});document.addEventListener("procaptcha:execute",function(s){updateCaptchaStatus("CAPTCHA execution started: type=frictionless, mode=invisible","info"),updateCaptchaStatus(`Container: ${s.detail.containerId}, timestamp: ${new Date(s.detail.timestamp).toLocaleTimeString()}`,"info")});document.addEventListener("DOMContentLoaded",function(){setTimeout(()=>{updateCaptchaStatus("CAPTCHA script loaded and initialized","info"),updateCaptchaStatus("Waiting for user interaction...","info")},500)});
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import"./captcha-BaCo3bEP.js";import{render as o,execute as d}from"http://localhost:9269/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const t=new MutationObserver(a=>{a.forEach(e=>{if(e.addedNodes.length)for(let n=0;n<e.addedNodes.length;n++){const i=e.addedNodes[n];if(i.classList&&(i.classList.contains("procaptcha")||i.querySelector&&i.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),t.disconnect();break}}})});t.observe(document.body,{childList:!0,subtree:!0})});function s(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function l(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
|
|
2
|
-
- Name: ${a}<br>
|
|
3
|
-
- Email: ${e}<br>
|
|
4
|
-
- Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function c(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=o(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"image",callback:l,"failed-callback":c,size:"invisible"});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),s()&&(window.updateCaptchaStatus("Waiting for CAPTCHA verification","info"),d())})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./captcha-BaCo3bEP.js";window.onCaptchaFailed=function(){updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")};window.onCaptchaVerified=function(s){updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${s.substring(0,15)}...`,"success")};window.onActionHandler=function(s){if(updateCaptchaStatus("CAPTCHA callback executed with token","success"),!s){updateCaptchaStatus("Error: No token received from CAPTCHA","error"),alert("Must complete captcha");return}updateCaptchaStatus("Form submission initiated with valid CAPTCHA token","info");const o={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":s},a=new URL("signup",void 0).href;console.log("Posting to",a,"with payload",o),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o),contentType:"application/json"}).then(e=>new Promise(t=>e.json().then(n=>t({status:e.status,ok:e.ok,json:n})))).then(async({status:e,json:t,ok:n})=>{console.log("Response status:",e,"message:",t.message,"ok:",n),console.log("Full response:",t);try{e!==200?(window.setIsError(!0),window.setMessage(t.message),updateCaptchaStatus(`API Error: ${t.message}`,"error")):(window.setIsError(!1),window.setMessage(t.message),updateCaptchaStatus(`API Success: ${t.message}`,"success"))}catch(r){console.log("Error processing response:",r),updateCaptchaStatus(`Error processing response: ${r}`,"error")}}).catch(e=>{console.log("Fetch error:",e),window.setIsError(!0),window.setMessage("Error: "+e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})};window.addEventListener("load",()=>{window.setIsError=o=>{const a=document.getElementById("messageContainer");a.style.color=o?"red":"black",a.style.display="block"},window.setMessage=o=>{document.getElementById("message").innerText=o},window.onLoggedIn=o=>{const a=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",o,"at",a),fetch(a,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${o}`}}).then(async e=>{try{const t=await e.json();e.status===200&&setMessage(t.message)}catch(t){console.log(t)}}).catch(e=>{console.log(e)})},updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const s=new MutationObserver(o=>{o.forEach(a=>{if(a.addedNodes.length)for(let e=0;e<a.addedNodes.length;e++){const t=a.addedNodes[e];if(t.classList&&(t.classList.contains("procaptcha")||t.querySelector&&t.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),s.disconnect();break}}})});s.observe(document.body,{childList:!0,subtree:!0})});document.addEventListener("procaptcha:execute",function(s){updateCaptchaStatus("CAPTCHA execution started: type=image, mode=invisible","info"),updateCaptchaStatus(`Container: ${s.detail.containerId}, timestamp: ${new Date(s.detail.timestamp).toLocaleTimeString()}`,"info")});document.addEventListener("DOMContentLoaded",function(){setTimeout(()=>{updateCaptchaStatus("CAPTCHA script loaded and initialized","info"),updateCaptchaStatus("Waiting for user interaction...","info")},500)});
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import"./captcha-BaCo3bEP.js";import{render as o,execute as d}from"http://localhost:9269/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const t=new MutationObserver(a=>{a.forEach(e=>{if(e.addedNodes.length)for(let n=0;n<e.addedNodes.length;n++){const i=e.addedNodes[n];if(i.classList&&(i.classList.contains("procaptcha")||i.querySelector&&i.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),t.disconnect();break}}})});t.observe(document.body,{childList:!0,subtree:!0})});function s(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function l(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
|
|
2
|
-
- Name: ${a}<br>
|
|
3
|
-
- Email: ${e}<br>
|
|
4
|
-
- Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function c(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=o(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"pow",callback:l,"failed-callback":c,size:"invisible"});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),s()&&(window.updateCaptchaStatus("Waiting for CAPTCHA verification","info"),d())})});
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import"./captcha-BaCo3bEP.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const e=new MutationObserver(n=>{n.forEach(a=>{if(a.addedNodes.length)for(let t=0;t<a.addedNodes.length;t++){const s=a.addedNodes[t];if(s.classList&&(s.classList.contains("procaptcha")||s.querySelector&&s.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),e.disconnect();break}}})});e.observe(document.body,{childList:!0,subtree:!0})});document.addEventListener("procaptcha:execute",function(e){updateCaptchaStatus("CAPTCHA execution started: type=pow, mode=invisible","info"),updateCaptchaStatus(`Container: ${e.detail.containerId}, timestamp: ${new Date(e.detail.timestamp).toLocaleTimeString()}`,"info")});window.onSubmit=function(e){console.log("Procaptcha verified, token: "+e),updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${e.substring(0,15)}...`,"success");const n=document.getElementById("name").value,a=document.getElementById("email").value,t=document.getElementById("result");return t&&(t.innerHTML=`<strong>Form submitted with:</strong><br>
|
|
2
|
-
- Name: ${n}<br>
|
|
3
|
-
- Email: ${a}<br>
|
|
4
|
-
- Procaptcha verified: Yes`,t.style.display="block"),updateCaptchaStatus("Form submission completed","success"),!1};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import"./captcha-BaCo3bEP.js";import{render as i}from"http://localhost:9269/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const t=new MutationObserver(a=>{a.forEach(e=>{if(e.addedNodes.length)for(let n=0;n<e.addedNodes.length;n++){const o=e.addedNodes[n];if(o.classList&&(o.classList.contains("procaptcha")||o.querySelector&&o.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),t.disconnect();break}}})});t.observe(document.body,{childList:!0,subtree:!0})});function d(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function s(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
|
|
2
|
-
- Name: ${a}<br>
|
|
3
|
-
- Email: ${e}<br>
|
|
4
|
-
- Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function l(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=i(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"pow",callback:s,"failed-callback":l});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),d()&&window.updateCaptchaStatus("Waiting for CAPTCHA verification","info")})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./captcha-BaCo3bEP.js";window.addEventListener("load",()=>{window.setIsError=s=>{const t=document.getElementById("messageContainer");t.style.color=s?"red":"black",t.style.display="block"},window.setMessage=s=>{document.getElementById("message").innerText=s},window.onLoggedIn=s=>{updateCaptchaStatus("Logged in, fetching private resource","info");const t=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",s,"at",t),fetch(t,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${s}`}}).then(async e=>{try{const a=await e.json();e.status===200?(updateCaptchaStatus("Successfully accessed private resource","success"),setMessage(a.message)):updateCaptchaStatus(`Failed to access private resource: ${e.status}`,"error")}catch(a){console.log(a),updateCaptchaStatus(`Error parsing response: ${a}`,"error")}}).catch(e=>{console.log(e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})},window.onActionHandler=()=>{updateCaptchaStatus("Form submission initiated","info");const s=document.getElementsByName("procaptcha-response");if(!s.length){updateCaptchaStatus("Error: No CAPTCHA response found","error"),alert("Must complete captcha");return}const t=s[0].value;updateCaptchaStatus(`Token received: ${t.substring(0,15)}...`,"success");const e={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":t},a=new URL("signup",void 0).href;console.log("posting to",a,"with payload",e),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),contentType:"application/json"}).then(o=>new Promise(n=>o.json().then(c=>n({status:o.status,ok:o.ok,json:c})))).then(async({status:o,json:n,ok:c})=>{console.log("status",o,"json",n.message,"ok",c),console.log("json",n);try{o!==200?(updateCaptchaStatus(`API Error: ${n.message}`,"error"),setIsError(!0),setMessage(n.message)):(updateCaptchaStatus(`API Success: ${n.message}`,"success"),setIsError(!1),setMessage(n.message))}catch(i){console.log(i),updateCaptchaStatus(`Error processing response: ${i}`,"error")}}).catch(o=>{console.log(o),updateCaptchaStatus(`Fetch error: ${o}`,"error"),setIsError(!0),setMessage("Error: "+o)})},updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const r=new MutationObserver(s=>{s.forEach(t=>{if(t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){const a=t.addedNodes[e];if(a.classList&&(a.classList.contains("procaptcha")||a.querySelector&&a.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),r.disconnect();break}}})});r.observe(document.body,{childList:!0,subtree:!0})});window.onCaptchaFailed=function(){console.log("Challenge failed"),updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")};window.onCaptchaVerified=r=>{console.log("Challenge passed"),updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${r.substring(0,15)}...`,"success")};document.addEventListener("DOMContentLoaded",function(){setTimeout(()=>{updateCaptchaStatus("CAPTCHA script loaded and initialized","info"),updateCaptchaStatus("Waiting for user interaction...","info")},500)});
|