altcha 0.7.0 → 0.9.0
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/README.md +86 -50
- package/dist/altcha.d.ts +24 -5
- package/dist/altcha.js +972 -824
- package/dist/altcha.umd.cjs +2 -2
- package/dist_external/altcha.d.ts +24 -5
- package/dist_external/altcha.js +1009 -861
- package/dist_external/altcha.umd.cjs +2 -2
- package/dist_external/worker.js +1 -1
- package/dist_plugins/analytics.d.ts +1 -0
- package/dist_plugins/analytics.js +290 -0
- package/dist_plugins/analytics.umd.cjs +1 -0
- package/dist_plugins/obfuscation.d.ts +1 -0
- package/dist_plugins/obfuscation.js +138 -0
- package/dist_plugins/obfuscation.umd.cjs +1 -0
- package/dist_plugins/upload.d.ts +1 -0
- package/dist_plugins/upload.js +458 -0
- package/dist_plugins/upload.umd.cjs +4 -0
- package/package.json +39 -22
package/dist/altcha.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
var T = (n, e, t) => Gt(n, typeof e != "symbol" ? e + "" : e, t), it = (n, e, t) => e.has(n) || rt("Cannot " + t);
|
|
7
|
-
var V = (n, e, t) => (it(n, e, "read from private field"), t ? t.call(n) : e.get(n)), ie = (n, e, t) => e.has(n) ? rt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), ot = (n, e, t, i) => (it(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t);
|
|
8
|
-
const wt = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IGY9bmV3IFRleHRFbmNvZGVyO2Z1bmN0aW9uIGQoZSl7cmV0dXJuWy4uLm5ldyBVaW50OEFycmF5KGUpXS5tYXAodD0+dC50b1N0cmluZygxNikucGFkU3RhcnQoMiwiMCIpKS5qb2luKCIiKX1hc3luYyBmdW5jdGlvbiBwKGUsdCxvKXtyZXR1cm4gZChhd2FpdCBjcnlwdG8uc3VidGxlLmRpZ2VzdChvLnRvVXBwZXJDYXNlKCksZi5lbmNvZGUoZSt0KSkpfWZ1bmN0aW9uIGcoZSx0LG89IlNIQS0yNTYiLGw9MWU2LGM9MCl7Y29uc3QgYT1uZXcgQWJvcnRDb250cm9sbGVyLGk9RGF0ZS5ub3coKTtyZXR1cm57cHJvbWlzZTooYXN5bmMoKT0+e2ZvcihsZXQgbj1jO248PWw7bis9MSl7aWYoYS5zaWduYWwuYWJvcnRlZClyZXR1cm4gbnVsbDtpZihhd2FpdCBwKHQsbixvKT09PWUpcmV0dXJue251bWJlcjpuLHRvb2s6RGF0ZS5ub3coKS1pfX1yZXR1cm4gbnVsbH0pKCksY29udHJvbGxlcjphfX1sZXQgcjtvbm1lc3NhZ2U9YXN5bmMgZT0+e2NvbnN0e3R5cGU6dCxwYXlsb2FkOm99PWUuZGF0YTtpZih0PT09ImFib3J0IilyPT1udWxsfHxyLmFib3J0KCkscj12b2lkIDA7ZWxzZSBpZih0PT09IndvcmsiKXtjb25zdHthbGc6bCxjaGFsbGVuZ2U6YyxtYXg6YSxzYWx0Omksc3RhcnQ6dX09b3x8e30sbj1nKGMsaSxsLGEsdSk7cj1uLmNvbnRyb2xsZXIsbi5wcm9taXNlLnRoZW4ocz0+e3NlbGYucG9zdE1lc3NhZ2UocyYmey4uLnMsd29ya2VyOiEwfSl9KX19fSkoKTsK", Ot = (n) => Uint8Array.from(atob(n), (e) => e.charCodeAt(0)), st = typeof self < "u" && self.Blob && new Blob([Ot(wt)], { type: "text/javascript;charset=utf-8" });
|
|
9
|
-
function Xt(n) {
|
|
1
|
+
var Ft = Object.defineProperty;
|
|
2
|
+
var Dt = (n, e, t) => e in n ? Ft(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var U = (n, e, t) => Dt(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
const ht = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IGY9bmV3IFRleHRFbmNvZGVyO2Z1bmN0aW9uIHAoZSl7cmV0dXJuWy4uLm5ldyBVaW50OEFycmF5KGUpXS5tYXAodD0+dC50b1N0cmluZygxNikucGFkU3RhcnQoMiwiMCIpKS5qb2luKCIiKX1hc3luYyBmdW5jdGlvbiB3KGUsdCxyKXtyZXR1cm4gcChhd2FpdCBjcnlwdG8uc3VidGxlLmRpZ2VzdChyLnRvVXBwZXJDYXNlKCksZi5lbmNvZGUoZSt0KSkpfWZ1bmN0aW9uIGIoZSx0LHI9IlNIQS0yNTYiLG49MWU2LHM9MCl7Y29uc3Qgbz1uZXcgQWJvcnRDb250cm9sbGVyLGE9RGF0ZS5ub3coKTtyZXR1cm57cHJvbWlzZTooYXN5bmMoKT0+e2ZvcihsZXQgYz1zO2M8PW47Yys9MSl7aWYoby5zaWduYWwuYWJvcnRlZClyZXR1cm4gbnVsbDtpZihhd2FpdCB3KHQsYyxyKT09PWUpcmV0dXJue251bWJlcjpjLHRvb2s6RGF0ZS5ub3coKS1hfX1yZXR1cm4gbnVsbH0pKCksY29udHJvbGxlcjpvfX1mdW5jdGlvbiBoKGUpe2NvbnN0IHQ9YXRvYihlKSxyPW5ldyBVaW50OEFycmF5KHQubGVuZ3RoKTtmb3IobGV0IG49MDtuPHQubGVuZ3RoO24rKylyW25dPXQuY2hhckNvZGVBdChuKTtyZXR1cm4gcn1mdW5jdGlvbiBnKGUsdD0xMil7Y29uc3Qgcj1uZXcgVWludDhBcnJheSh0KTtmb3IobGV0IG49MDtuPHQ7bisrKXJbbl09ZSUyNTYsZT1NYXRoLmZsb29yKGUvMjU2KTtyZXR1cm4gcn1hc3luYyBmdW5jdGlvbiBtKGUsdD0iIixyPTFlNixuPTApe2NvbnN0IHM9IkFFUy1HQ00iLG89bmV3IEFib3J0Q29udHJvbGxlcixhPURhdGUubm93KCksbD1hc3luYygpPT57Zm9yKGxldCB1PW47dTw9cjt1Kz0xKXtpZihvLnNpZ25hbC5hYm9ydGVkfHwhY3x8IXkpcmV0dXJuIG51bGw7dHJ5e2NvbnN0IGQ9YXdhaXQgY3J5cHRvLnN1YnRsZS5kZWNyeXB0KHtuYW1lOnMsaXY6Zyh1KX0sYyx5KTtpZihkKXJldHVybntjbGVhclRleHQ6bmV3IFRleHREZWNvZGVyKCkuZGVjb2RlKGQpLHRvb2s6RGF0ZS5ub3coKS1hfX1jYXRjaHt9fXJldHVybiBudWxsfTtsZXQgYz1udWxsLHk9bnVsbDt0cnl7eT1oKGUpO2NvbnN0IHU9YXdhaXQgY3J5cHRvLnN1YnRsZS5kaWdlc3QoIlNIQS0yNTYiLGYuZW5jb2RlKHQpKTtjPWF3YWl0IGNyeXB0by5zdWJ0bGUuaW1wb3J0S2V5KCJyYXciLHUscywhMSxbImRlY3J5cHQiXSl9Y2F0Y2h7cmV0dXJue3Byb21pc2U6UHJvbWlzZS5yZWplY3QoKSxjb250cm9sbGVyOm99fXJldHVybntwcm9taXNlOmwoKSxjb250cm9sbGVyOm99fWxldCBpO29ubWVzc2FnZT1hc3luYyBlPT57Y29uc3R7dHlwZTp0LHBheWxvYWQ6cixzdGFydDpuLG1heDpzfT1lLmRhdGE7bGV0IG89bnVsbDtpZih0PT09ImFib3J0IilpPT1udWxsfHxpLmFib3J0KCksaT12b2lkIDA7ZWxzZSBpZih0PT09IndvcmsiKXtpZigib2JmdXNjYXRlZCJpbiByKXtjb25zdHtrZXk6YSxvYmZ1c2NhdGVkOmx9PXJ8fHt9O289YXdhaXQgbShsLGEscyxuKX1lbHNle2NvbnN0e2FsZ29yaXRobTphLGNoYWxsZW5nZTpsLHNhbHQ6Y309cnx8e307bz1iKGwsYyxhLHMsbil9aT1vLmNvbnRyb2xsZXIsby5wcm9taXNlLnRoZW4oYT0+e3NlbGYucG9zdE1lc3NhZ2UoYSYmey4uLmEsd29ya2VyOiEwfSl9KX19fSkoKTsK", jt = (n) => Uint8Array.from(atob(n), (e) => e.charCodeAt(0)), nt = typeof self < "u" && self.Blob && new Blob([jt(ht)], { type: "text/javascript;charset=utf-8" });
|
|
5
|
+
function Pt(n) {
|
|
10
6
|
let e;
|
|
11
7
|
try {
|
|
12
|
-
if (e =
|
|
8
|
+
if (e = nt && (self.URL || self.webkitURL).createObjectURL(nt), !e) throw "";
|
|
13
9
|
const t = new Worker(e, {
|
|
14
10
|
name: n == null ? void 0 : n.name
|
|
15
11
|
});
|
|
@@ -18,7 +14,7 @@ function Xt(n) {
|
|
|
18
14
|
}), t;
|
|
19
15
|
} catch {
|
|
20
16
|
return new Worker(
|
|
21
|
-
"data:text/javascript;base64," +
|
|
17
|
+
"data:text/javascript;base64," + ht,
|
|
22
18
|
{
|
|
23
19
|
name: n == null ? void 0 : n.name
|
|
24
20
|
}
|
|
@@ -27,37 +23,83 @@ function Xt(n) {
|
|
|
27
23
|
e && (self.URL || self.webkitURL).revokeObjectURL(e);
|
|
28
24
|
}
|
|
29
25
|
}
|
|
30
|
-
function
|
|
26
|
+
function Re() {
|
|
27
|
+
}
|
|
28
|
+
function Wt(n, e) {
|
|
29
|
+
for (const t in e) n[t] = e[t];
|
|
30
|
+
return (
|
|
31
|
+
/** @type {T & S} */
|
|
32
|
+
n
|
|
33
|
+
);
|
|
31
34
|
}
|
|
32
|
-
function
|
|
35
|
+
function gt(n) {
|
|
33
36
|
return n();
|
|
34
37
|
}
|
|
35
|
-
function
|
|
38
|
+
function rt() {
|
|
36
39
|
return /* @__PURE__ */ Object.create(null);
|
|
37
40
|
}
|
|
38
|
-
function
|
|
39
|
-
n.forEach(
|
|
41
|
+
function we(n) {
|
|
42
|
+
n.forEach(gt);
|
|
40
43
|
}
|
|
41
|
-
function
|
|
44
|
+
function mt(n) {
|
|
42
45
|
return typeof n == "function";
|
|
43
46
|
}
|
|
44
|
-
function
|
|
47
|
+
function Ut(n, e) {
|
|
45
48
|
return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
|
|
46
49
|
}
|
|
47
|
-
function
|
|
50
|
+
function Kt(n) {
|
|
48
51
|
return Object.keys(n).length === 0;
|
|
49
52
|
}
|
|
50
|
-
function
|
|
53
|
+
function Mt(n, e, t, i) {
|
|
54
|
+
if (n) {
|
|
55
|
+
const o = bt(n, e, t, i);
|
|
56
|
+
return n[0](o);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function bt(n, e, t, i) {
|
|
60
|
+
return n[1] && i ? Wt(t.ctx.slice(), n[1](i(e))) : t.ctx;
|
|
61
|
+
}
|
|
62
|
+
function Bt(n, e, t, i) {
|
|
63
|
+
if (n[2] && i) {
|
|
64
|
+
const o = n[2](i(t));
|
|
65
|
+
if (e.dirty === void 0)
|
|
66
|
+
return o;
|
|
67
|
+
if (typeof o == "object") {
|
|
68
|
+
const l = [], s = Math.max(e.dirty.length, o.length);
|
|
69
|
+
for (let d = 0; d < s; d += 1)
|
|
70
|
+
l[d] = e.dirty[d] | o[d];
|
|
71
|
+
return l;
|
|
72
|
+
}
|
|
73
|
+
return e.dirty | o;
|
|
74
|
+
}
|
|
75
|
+
return e.dirty;
|
|
76
|
+
}
|
|
77
|
+
function Ot(n, e, t, i, o, l) {
|
|
78
|
+
if (o) {
|
|
79
|
+
const s = bt(e, t, i, l);
|
|
80
|
+
n.p(s, o);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function Jt(n) {
|
|
84
|
+
if (n.ctx.length > 32) {
|
|
85
|
+
const e = [], t = n.ctx.length / 32;
|
|
86
|
+
for (let i = 0; i < t; i++)
|
|
87
|
+
e[i] = -1;
|
|
88
|
+
return e;
|
|
89
|
+
}
|
|
90
|
+
return -1;
|
|
91
|
+
}
|
|
92
|
+
function L(n, e) {
|
|
51
93
|
n.appendChild(e);
|
|
52
94
|
}
|
|
53
|
-
function
|
|
54
|
-
const i =
|
|
95
|
+
function Qt(n, e, t) {
|
|
96
|
+
const i = $t(n);
|
|
55
97
|
if (!i.getElementById(e)) {
|
|
56
|
-
const o =
|
|
57
|
-
o.id = e, o.textContent = t,
|
|
98
|
+
const o = Z("style");
|
|
99
|
+
o.id = e, o.textContent = t, qt(i, o);
|
|
58
100
|
}
|
|
59
101
|
}
|
|
60
|
-
function
|
|
102
|
+
function $t(n) {
|
|
61
103
|
if (!n) return document;
|
|
62
104
|
const e = n.getRootNode ? n.getRootNode() : n.ownerDocument;
|
|
63
105
|
return e && /** @type {ShadowRoot} */
|
|
@@ -66,50 +108,47 @@ function Yt(n) {
|
|
|
66
108
|
e
|
|
67
109
|
) : n.ownerDocument;
|
|
68
110
|
}
|
|
69
|
-
function
|
|
70
|
-
return
|
|
111
|
+
function qt(n, e) {
|
|
112
|
+
return L(
|
|
71
113
|
/** @type {Document} */
|
|
72
114
|
n.head || n,
|
|
73
115
|
e
|
|
74
116
|
), e.sheet;
|
|
75
117
|
}
|
|
76
|
-
function
|
|
118
|
+
function X(n, e, t) {
|
|
77
119
|
n.insertBefore(e, t || null);
|
|
78
120
|
}
|
|
79
|
-
function
|
|
121
|
+
function Y(n) {
|
|
80
122
|
n.parentNode && n.parentNode.removeChild(n);
|
|
81
123
|
}
|
|
82
|
-
function
|
|
124
|
+
function Z(n) {
|
|
83
125
|
return document.createElement(n);
|
|
84
126
|
}
|
|
85
127
|
function $(n) {
|
|
86
128
|
return document.createElementNS("http://www.w3.org/2000/svg", n);
|
|
87
129
|
}
|
|
88
|
-
function
|
|
130
|
+
function en(n) {
|
|
89
131
|
return document.createTextNode(n);
|
|
90
132
|
}
|
|
91
|
-
function
|
|
92
|
-
return
|
|
93
|
-
}
|
|
94
|
-
function Jt() {
|
|
95
|
-
return pt("");
|
|
133
|
+
function Q() {
|
|
134
|
+
return en(" ");
|
|
96
135
|
}
|
|
97
|
-
function
|
|
136
|
+
function Le(n, e, t, i) {
|
|
98
137
|
return n.addEventListener(e, t, i), () => n.removeEventListener(e, t, i);
|
|
99
138
|
}
|
|
100
139
|
function a(n, e, t) {
|
|
101
140
|
t == null ? n.removeAttribute(e) : n.getAttribute(e) !== t && n.setAttribute(e, t);
|
|
102
141
|
}
|
|
103
|
-
function
|
|
142
|
+
function tn(n) {
|
|
104
143
|
return Array.from(n.childNodes);
|
|
105
144
|
}
|
|
106
|
-
function
|
|
145
|
+
function it(n, e, t) {
|
|
107
146
|
n.classList.toggle(e, !!t);
|
|
108
147
|
}
|
|
109
|
-
function
|
|
148
|
+
function nn(n, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
|
|
110
149
|
return new CustomEvent(n, { detail: e, bubbles: t, cancelable: i });
|
|
111
150
|
}
|
|
112
|
-
function
|
|
151
|
+
function rn(n) {
|
|
113
152
|
const e = {};
|
|
114
153
|
return n.childNodes.forEach(
|
|
115
154
|
/** @param {Element} node */
|
|
@@ -118,167 +157,176 @@ function Qt(n) {
|
|
|
118
157
|
}
|
|
119
158
|
), e;
|
|
120
159
|
}
|
|
121
|
-
let
|
|
122
|
-
function
|
|
123
|
-
|
|
160
|
+
let pe;
|
|
161
|
+
function ve(n) {
|
|
162
|
+
pe = n;
|
|
124
163
|
}
|
|
125
|
-
function
|
|
126
|
-
if (!
|
|
127
|
-
return
|
|
164
|
+
function Ae() {
|
|
165
|
+
if (!pe) throw new Error("Function called outside component initialization");
|
|
166
|
+
return pe;
|
|
128
167
|
}
|
|
129
|
-
function
|
|
130
|
-
|
|
168
|
+
function on(n) {
|
|
169
|
+
Ae().$$.on_mount.push(n);
|
|
131
170
|
}
|
|
132
|
-
function
|
|
133
|
-
|
|
171
|
+
function ln(n) {
|
|
172
|
+
Ae().$$.on_destroy.push(n);
|
|
134
173
|
}
|
|
135
|
-
function
|
|
136
|
-
const n =
|
|
174
|
+
function sn() {
|
|
175
|
+
const n = Ae();
|
|
137
176
|
return (e, t, { cancelable: i = !1 } = {}) => {
|
|
138
177
|
const o = n.$$.callbacks[e];
|
|
139
178
|
if (o) {
|
|
140
|
-
const
|
|
179
|
+
const l = nn(
|
|
141
180
|
/** @type {string} */
|
|
142
181
|
e,
|
|
143
182
|
t,
|
|
144
183
|
{ cancelable: i }
|
|
145
184
|
);
|
|
146
|
-
return o.slice().forEach((
|
|
147
|
-
|
|
148
|
-
}), !
|
|
185
|
+
return o.slice().forEach((s) => {
|
|
186
|
+
s.call(n, l);
|
|
187
|
+
}), !l.defaultPrevented;
|
|
149
188
|
}
|
|
150
189
|
return !0;
|
|
151
190
|
};
|
|
152
191
|
}
|
|
153
|
-
const
|
|
154
|
-
let
|
|
155
|
-
const
|
|
156
|
-
let
|
|
157
|
-
function
|
|
158
|
-
|
|
192
|
+
const ae = [], Ce = [];
|
|
193
|
+
let fe = [];
|
|
194
|
+
const ot = [], yt = /* @__PURE__ */ Promise.resolve();
|
|
195
|
+
let ze = !1;
|
|
196
|
+
function vt() {
|
|
197
|
+
ze || (ze = !0, yt.then(w));
|
|
159
198
|
}
|
|
160
|
-
function
|
|
161
|
-
return
|
|
199
|
+
function cn() {
|
|
200
|
+
return vt(), yt;
|
|
162
201
|
}
|
|
163
|
-
function
|
|
164
|
-
|
|
202
|
+
function Se(n) {
|
|
203
|
+
fe.push(n);
|
|
165
204
|
}
|
|
166
|
-
const
|
|
167
|
-
let
|
|
168
|
-
function
|
|
169
|
-
if (
|
|
205
|
+
const Ne = /* @__PURE__ */ new Set();
|
|
206
|
+
let ce = 0;
|
|
207
|
+
function w() {
|
|
208
|
+
if (ce !== 0)
|
|
170
209
|
return;
|
|
171
|
-
const n =
|
|
210
|
+
const n = pe;
|
|
172
211
|
do {
|
|
173
212
|
try {
|
|
174
|
-
for (;
|
|
175
|
-
const e =
|
|
176
|
-
|
|
213
|
+
for (; ce < ae.length; ) {
|
|
214
|
+
const e = ae[ce];
|
|
215
|
+
ce++, ve(e), an(e.$$);
|
|
177
216
|
}
|
|
178
217
|
} catch (e) {
|
|
179
|
-
throw
|
|
218
|
+
throw ae.length = 0, ce = 0, e;
|
|
180
219
|
}
|
|
181
|
-
for (
|
|
182
|
-
for (let e = 0; e <
|
|
183
|
-
const t =
|
|
184
|
-
|
|
220
|
+
for (ve(null), ae.length = 0, ce = 0; Ce.length; ) Ce.pop()();
|
|
221
|
+
for (let e = 0; e < fe.length; e += 1) {
|
|
222
|
+
const t = fe[e];
|
|
223
|
+
Ne.has(t) || (Ne.add(t), t());
|
|
185
224
|
}
|
|
186
|
-
|
|
187
|
-
} while (
|
|
188
|
-
for (;
|
|
189
|
-
|
|
190
|
-
|
|
225
|
+
fe.length = 0;
|
|
226
|
+
} while (ae.length);
|
|
227
|
+
for (; ot.length; )
|
|
228
|
+
ot.pop()();
|
|
229
|
+
ze = !1, Ne.clear(), ve(n);
|
|
191
230
|
}
|
|
192
|
-
function
|
|
231
|
+
function an(n) {
|
|
193
232
|
if (n.fragment !== null) {
|
|
194
|
-
n.update(),
|
|
233
|
+
n.update(), we(n.before_update);
|
|
195
234
|
const e = n.dirty;
|
|
196
|
-
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(
|
|
235
|
+
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(Se);
|
|
197
236
|
}
|
|
198
237
|
}
|
|
199
|
-
function
|
|
238
|
+
function fn(n) {
|
|
200
239
|
const e = [], t = [];
|
|
201
|
-
|
|
240
|
+
fe.forEach((i) => n.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), fe = e;
|
|
202
241
|
}
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
242
|
+
const xe = /* @__PURE__ */ new Set();
|
|
243
|
+
let un;
|
|
244
|
+
function pt(n, e) {
|
|
245
|
+
n && n.i && (xe.delete(n), n.i(e));
|
|
246
|
+
}
|
|
247
|
+
function dn(n, e, t, i) {
|
|
248
|
+
if (n && n.o) {
|
|
249
|
+
if (xe.has(n)) return;
|
|
250
|
+
xe.add(n), un.c.push(() => {
|
|
251
|
+
xe.delete(n);
|
|
252
|
+
}), n.o(e);
|
|
253
|
+
}
|
|
206
254
|
}
|
|
207
|
-
function
|
|
255
|
+
function hn(n, e, t) {
|
|
208
256
|
const { fragment: i, after_update: o } = n.$$;
|
|
209
|
-
i && i.m(e, t),
|
|
210
|
-
const
|
|
211
|
-
n.$$.on_destroy ? n.$$.on_destroy.push(...
|
|
212
|
-
}), o.forEach(
|
|
257
|
+
i && i.m(e, t), Se(() => {
|
|
258
|
+
const l = n.$$.on_mount.map(gt).filter(mt);
|
|
259
|
+
n.$$.on_destroy ? n.$$.on_destroy.push(...l) : we(l), n.$$.on_mount = [];
|
|
260
|
+
}), o.forEach(Se);
|
|
213
261
|
}
|
|
214
|
-
function
|
|
262
|
+
function gn(n, e) {
|
|
215
263
|
const t = n.$$;
|
|
216
|
-
t.fragment !== null && (
|
|
264
|
+
t.fragment !== null && (fn(t.after_update), we(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
217
265
|
}
|
|
218
|
-
function
|
|
219
|
-
n.$$.dirty[0] === -1 && (
|
|
266
|
+
function mn(n, e) {
|
|
267
|
+
n.$$.dirty[0] === -1 && (ae.push(n), vt(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
220
268
|
}
|
|
221
|
-
function
|
|
222
|
-
const
|
|
223
|
-
|
|
269
|
+
function bn(n, e, t, i, o, l, s = null, d = [-1]) {
|
|
270
|
+
const h = pe;
|
|
271
|
+
ve(n);
|
|
224
272
|
const f = n.$$ = {
|
|
225
273
|
fragment: null,
|
|
226
274
|
ctx: [],
|
|
227
275
|
// state
|
|
228
|
-
props:
|
|
229
|
-
update:
|
|
276
|
+
props: l,
|
|
277
|
+
update: Re,
|
|
230
278
|
not_equal: o,
|
|
231
|
-
bound:
|
|
279
|
+
bound: rt(),
|
|
232
280
|
// lifecycle
|
|
233
281
|
on_mount: [],
|
|
234
282
|
on_destroy: [],
|
|
235
283
|
on_disconnect: [],
|
|
236
284
|
before_update: [],
|
|
237
285
|
after_update: [],
|
|
238
|
-
context: new Map(e.context || (
|
|
286
|
+
context: new Map(e.context || (h ? h.$$.context : [])),
|
|
239
287
|
// everything else
|
|
240
|
-
callbacks:
|
|
241
|
-
dirty:
|
|
288
|
+
callbacks: rt(),
|
|
289
|
+
dirty: d,
|
|
242
290
|
skip_bound: !1,
|
|
243
|
-
root: e.target ||
|
|
291
|
+
root: e.target || h.$$.root
|
|
244
292
|
};
|
|
245
|
-
|
|
246
|
-
let
|
|
247
|
-
if (f.ctx = t ? t(n, e.props || {}, (
|
|
248
|
-
const
|
|
249
|
-
return f.ctx && o(f.ctx[
|
|
250
|
-
}) : [], f.update(),
|
|
293
|
+
s && s(f.root);
|
|
294
|
+
let C = !1;
|
|
295
|
+
if (f.ctx = t ? t(n, e.props || {}, (b, M, ...D) => {
|
|
296
|
+
const j = D.length ? D[0] : M;
|
|
297
|
+
return f.ctx && o(f.ctx[b], f.ctx[b] = j) && (!f.skip_bound && f.bound[b] && f.bound[b](j), C && mn(n, b)), M;
|
|
298
|
+
}) : [], f.update(), C = !0, we(f.before_update), f.fragment = i ? i(f.ctx) : !1, e.target) {
|
|
251
299
|
if (e.hydrate) {
|
|
252
|
-
const
|
|
253
|
-
f.fragment && f.fragment.l(
|
|
300
|
+
const b = tn(e.target);
|
|
301
|
+
f.fragment && f.fragment.l(b), b.forEach(Y);
|
|
254
302
|
} else
|
|
255
303
|
f.fragment && f.fragment.c();
|
|
256
|
-
e.intro &&
|
|
304
|
+
e.intro && pt(n.$$.fragment), hn(n, e.target, e.anchor), w();
|
|
257
305
|
}
|
|
258
|
-
|
|
306
|
+
ve(h);
|
|
259
307
|
}
|
|
260
|
-
let
|
|
261
|
-
typeof HTMLElement == "function" && (
|
|
308
|
+
let wt;
|
|
309
|
+
typeof HTMLElement == "function" && (wt = class extends HTMLElement {
|
|
262
310
|
constructor(e, t, i) {
|
|
263
311
|
super();
|
|
264
312
|
/** The Svelte component constructor */
|
|
265
|
-
|
|
313
|
+
U(this, "$$ctor");
|
|
266
314
|
/** Slots */
|
|
267
|
-
|
|
315
|
+
U(this, "$$s");
|
|
268
316
|
/** The Svelte component instance */
|
|
269
|
-
|
|
317
|
+
U(this, "$$c");
|
|
270
318
|
/** Whether or not the custom element is connected */
|
|
271
|
-
|
|
319
|
+
U(this, "$$cn", !1);
|
|
272
320
|
/** Component props data */
|
|
273
|
-
|
|
321
|
+
U(this, "$$d", {});
|
|
274
322
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
275
|
-
|
|
323
|
+
U(this, "$$r", !1);
|
|
276
324
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
277
|
-
|
|
325
|
+
U(this, "$$p_d", {});
|
|
278
326
|
/** @type {Record<string, Function[]>} Event listeners */
|
|
279
|
-
|
|
327
|
+
U(this, "$$l", {});
|
|
280
328
|
/** @type {Map<Function, Function>} Event listener unsubscribe functions */
|
|
281
|
-
|
|
329
|
+
U(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
282
330
|
this.$$ctor = e, this.$$s = t, i && this.attachShadow({ mode: "open" });
|
|
283
331
|
}
|
|
284
332
|
addEventListener(e, t, i) {
|
|
@@ -296,37 +344,37 @@ typeof HTMLElement == "function" && (xt = class extends HTMLElement {
|
|
|
296
344
|
}
|
|
297
345
|
async connectedCallback() {
|
|
298
346
|
if (this.$$cn = !0, !this.$$c) {
|
|
299
|
-
let e = function(
|
|
347
|
+
let e = function(l) {
|
|
300
348
|
return () => {
|
|
301
|
-
let
|
|
349
|
+
let s;
|
|
302
350
|
return {
|
|
303
351
|
c: function() {
|
|
304
|
-
|
|
352
|
+
s = Z("slot"), l !== "default" && a(s, "name", l);
|
|
305
353
|
},
|
|
306
354
|
/**
|
|
307
355
|
* @param {HTMLElement} target
|
|
308
356
|
* @param {HTMLElement} [anchor]
|
|
309
357
|
*/
|
|
310
|
-
m: function(f,
|
|
311
|
-
|
|
358
|
+
m: function(f, C) {
|
|
359
|
+
X(f, s, C);
|
|
312
360
|
},
|
|
313
361
|
d: function(f) {
|
|
314
|
-
f &&
|
|
362
|
+
f && Y(s);
|
|
315
363
|
}
|
|
316
364
|
};
|
|
317
365
|
};
|
|
318
366
|
};
|
|
319
367
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
320
368
|
return;
|
|
321
|
-
const t = {}, i =
|
|
322
|
-
for (const
|
|
323
|
-
|
|
324
|
-
for (const
|
|
325
|
-
const
|
|
326
|
-
|
|
369
|
+
const t = {}, i = rn(this);
|
|
370
|
+
for (const l of this.$$s)
|
|
371
|
+
l in i && (t[l] = [e(l)]);
|
|
372
|
+
for (const l of this.attributes) {
|
|
373
|
+
const s = this.$$g_p(l.name);
|
|
374
|
+
s in this.$$d || (this.$$d[s] = Ee(s, l.value, this.$$p_d, "toProp"));
|
|
327
375
|
}
|
|
328
|
-
for (const
|
|
329
|
-
!(
|
|
376
|
+
for (const l in this.$$p_d)
|
|
377
|
+
!(l in this.$$d) && this[l] !== void 0 && (this.$$d[l] = this[l], delete this[l]);
|
|
330
378
|
this.$$c = new this.$$ctor({
|
|
331
379
|
target: this.shadowRoot || this,
|
|
332
380
|
props: {
|
|
@@ -339,23 +387,23 @@ typeof HTMLElement == "function" && (xt = class extends HTMLElement {
|
|
|
339
387
|
});
|
|
340
388
|
const o = () => {
|
|
341
389
|
this.$$r = !0;
|
|
342
|
-
for (const
|
|
343
|
-
if (this.$$d[
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
this.$$d[
|
|
390
|
+
for (const l in this.$$p_d)
|
|
391
|
+
if (this.$$d[l] = this.$$c.$$.ctx[this.$$c.$$.props[l]], this.$$p_d[l].reflect) {
|
|
392
|
+
const s = Ee(
|
|
393
|
+
l,
|
|
394
|
+
this.$$d[l],
|
|
347
395
|
this.$$p_d,
|
|
348
396
|
"toAttribute"
|
|
349
397
|
);
|
|
350
|
-
|
|
398
|
+
s == null ? this.removeAttribute(this.$$p_d[l].attribute || l) : this.setAttribute(this.$$p_d[l].attribute || l, s);
|
|
351
399
|
}
|
|
352
400
|
this.$$r = !1;
|
|
353
401
|
};
|
|
354
402
|
this.$$c.$$.after_update.push(o), o();
|
|
355
|
-
for (const
|
|
356
|
-
for (const
|
|
357
|
-
const
|
|
358
|
-
this.$$l_u.set(
|
|
403
|
+
for (const l in this.$$l)
|
|
404
|
+
for (const s of this.$$l[l]) {
|
|
405
|
+
const d = this.$$c.$on(l, s);
|
|
406
|
+
this.$$l_u.set(s, d);
|
|
359
407
|
}
|
|
360
408
|
this.$$l = {};
|
|
361
409
|
}
|
|
@@ -364,7 +412,7 @@ typeof HTMLElement == "function" && (xt = class extends HTMLElement {
|
|
|
364
412
|
// and setting attributes through setAttribute etc, this is helpful
|
|
365
413
|
attributeChangedCallback(e, t, i) {
|
|
366
414
|
var o;
|
|
367
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
415
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = Ee(e, i, this.$$p_d, "toProp"), (o = this.$$c) == null || o.$set({ [e]: this.$$d[e] }));
|
|
368
416
|
}
|
|
369
417
|
disconnectedCallback() {
|
|
370
418
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -377,9 +425,9 @@ typeof HTMLElement == "function" && (xt = class extends HTMLElement {
|
|
|
377
425
|
) || e;
|
|
378
426
|
}
|
|
379
427
|
});
|
|
380
|
-
function
|
|
381
|
-
var
|
|
382
|
-
const o = (
|
|
428
|
+
function Ee(n, e, t, i) {
|
|
429
|
+
var l;
|
|
430
|
+
const o = (l = t[n]) == null ? void 0 : l.type;
|
|
383
431
|
if (e = o === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !t[n])
|
|
384
432
|
return e;
|
|
385
433
|
if (i === "toAttribute")
|
|
@@ -407,38 +455,38 @@ function Ae(n, e, t, i) {
|
|
|
407
455
|
return e;
|
|
408
456
|
}
|
|
409
457
|
}
|
|
410
|
-
function
|
|
411
|
-
let
|
|
458
|
+
function yn(n, e, t, i, o, l) {
|
|
459
|
+
let s = class extends wt {
|
|
412
460
|
constructor() {
|
|
413
461
|
super(n, t, o), this.$$p_d = e;
|
|
414
462
|
}
|
|
415
463
|
static get observedAttributes() {
|
|
416
464
|
return Object.keys(e).map(
|
|
417
|
-
(
|
|
465
|
+
(d) => (e[d].attribute || d).toLowerCase()
|
|
418
466
|
);
|
|
419
467
|
}
|
|
420
468
|
};
|
|
421
|
-
return Object.keys(e).forEach((
|
|
422
|
-
Object.defineProperty(
|
|
469
|
+
return Object.keys(e).forEach((d) => {
|
|
470
|
+
Object.defineProperty(s.prototype, d, {
|
|
423
471
|
get() {
|
|
424
|
-
return this.$$c &&
|
|
472
|
+
return this.$$c && d in this.$$c ? this.$$c[d] : this.$$d[d];
|
|
425
473
|
},
|
|
426
|
-
set(
|
|
474
|
+
set(h) {
|
|
427
475
|
var f;
|
|
428
|
-
|
|
476
|
+
h = Ee(d, h, e), this.$$d[d] = h, (f = this.$$c) == null || f.$set({ [d]: h });
|
|
429
477
|
}
|
|
430
478
|
});
|
|
431
|
-
}), i.forEach((
|
|
432
|
-
Object.defineProperty(
|
|
479
|
+
}), i.forEach((d) => {
|
|
480
|
+
Object.defineProperty(s.prototype, d, {
|
|
433
481
|
get() {
|
|
434
|
-
var
|
|
435
|
-
return (
|
|
482
|
+
var h;
|
|
483
|
+
return (h = this.$$c) == null ? void 0 : h[d];
|
|
436
484
|
}
|
|
437
485
|
});
|
|
438
486
|
}), n.element = /** @type {any} */
|
|
439
|
-
|
|
487
|
+
s, s;
|
|
440
488
|
}
|
|
441
|
-
class
|
|
489
|
+
class vn {
|
|
442
490
|
constructor() {
|
|
443
491
|
/**
|
|
444
492
|
* ### PRIVATE API
|
|
@@ -447,7 +495,7 @@ class mn {
|
|
|
447
495
|
*
|
|
448
496
|
* @type {any}
|
|
449
497
|
*/
|
|
450
|
-
|
|
498
|
+
U(this, "$$");
|
|
451
499
|
/**
|
|
452
500
|
* ### PRIVATE API
|
|
453
501
|
*
|
|
@@ -455,11 +503,11 @@ class mn {
|
|
|
455
503
|
*
|
|
456
504
|
* @type {any}
|
|
457
505
|
*/
|
|
458
|
-
|
|
506
|
+
U(this, "$$set");
|
|
459
507
|
}
|
|
460
508
|
/** @returns {void} */
|
|
461
509
|
$destroy() {
|
|
462
|
-
|
|
510
|
+
gn(this, 1), this.$destroy = Re;
|
|
463
511
|
}
|
|
464
512
|
/**
|
|
465
513
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -468,8 +516,8 @@ class mn {
|
|
|
468
516
|
* @returns {() => void}
|
|
469
517
|
*/
|
|
470
518
|
$on(e, t) {
|
|
471
|
-
if (!
|
|
472
|
-
return
|
|
519
|
+
if (!mt(t))
|
|
520
|
+
return Re;
|
|
473
521
|
const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
474
522
|
return i.push(t), () => {
|
|
475
523
|
const o = i.indexOf(t);
|
|
@@ -481,19 +529,19 @@ class mn {
|
|
|
481
529
|
* @returns {void}
|
|
482
530
|
*/
|
|
483
531
|
$set(e) {
|
|
484
|
-
this.$$set && !
|
|
532
|
+
this.$$set && !Kt(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
485
533
|
}
|
|
486
534
|
}
|
|
487
|
-
const
|
|
488
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
489
|
-
const
|
|
490
|
-
function
|
|
535
|
+
const pn = "4";
|
|
536
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(pn);
|
|
537
|
+
const _t = new TextEncoder();
|
|
538
|
+
function wn(n) {
|
|
491
539
|
return [...new Uint8Array(n)].map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
492
540
|
}
|
|
493
|
-
async function
|
|
541
|
+
async function _n(n, e = "SHA-256", t = 1e5) {
|
|
494
542
|
const i = Date.now().toString(16);
|
|
495
543
|
n || (n = Math.round(Math.random() * t));
|
|
496
|
-
const o = await
|
|
544
|
+
const o = await kt(i, n, e);
|
|
497
545
|
return {
|
|
498
546
|
algorithm: e,
|
|
499
547
|
challenge: o,
|
|
@@ -501,212 +549,172 @@ async function wn(n, e = "SHA-256", t = 1e5) {
|
|
|
501
549
|
signature: ""
|
|
502
550
|
};
|
|
503
551
|
}
|
|
504
|
-
async function
|
|
505
|
-
return
|
|
552
|
+
async function kt(n, e, t) {
|
|
553
|
+
return wn(
|
|
506
554
|
await crypto.subtle.digest(
|
|
507
555
|
t.toUpperCase(),
|
|
508
|
-
|
|
556
|
+
_t.encode(n + e)
|
|
509
557
|
)
|
|
510
558
|
);
|
|
511
559
|
}
|
|
512
|
-
function
|
|
513
|
-
const
|
|
560
|
+
function kn(n, e, t = "SHA-256", i = 1e6, o = 0) {
|
|
561
|
+
const l = new AbortController(), s = Date.now();
|
|
514
562
|
return {
|
|
515
563
|
promise: (async () => {
|
|
516
|
-
for (let
|
|
517
|
-
if (
|
|
564
|
+
for (let h = o; h <= i; h += 1) {
|
|
565
|
+
if (l.signal.aborted)
|
|
518
566
|
return null;
|
|
519
|
-
if (await
|
|
567
|
+
if (await kt(e, h, t) === n)
|
|
520
568
|
return {
|
|
521
|
-
number:
|
|
522
|
-
took: Date.now() -
|
|
569
|
+
number: h,
|
|
570
|
+
took: Date.now() - s
|
|
523
571
|
};
|
|
524
572
|
}
|
|
525
573
|
return null;
|
|
526
574
|
})(),
|
|
527
|
-
controller:
|
|
575
|
+
controller: l
|
|
528
576
|
};
|
|
529
577
|
}
|
|
530
|
-
function
|
|
578
|
+
function xn() {
|
|
531
579
|
try {
|
|
532
580
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
533
581
|
} catch {
|
|
534
582
|
}
|
|
535
583
|
}
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
data() {
|
|
554
|
-
const e = Object.entries(V(this, ae));
|
|
555
|
-
return {
|
|
556
|
-
correction: e.length && e.filter(([t, i]) => i > 1).length / e.length || 0,
|
|
557
|
-
dropoff: !this.submitTime && !this.error && V(this, ce) ? V(this, ce) : null,
|
|
558
|
-
error: this.error,
|
|
559
|
-
mobile: this.isMobile(),
|
|
560
|
-
start: this.startTime,
|
|
561
|
-
submit: this.submitTime,
|
|
562
|
-
tz: Lt()
|
|
563
|
-
};
|
|
564
|
-
}
|
|
565
|
-
dataAsBase64() {
|
|
566
|
-
try {
|
|
567
|
-
return btoa(
|
|
568
|
-
JSON.stringify(this.data())
|
|
569
|
-
);
|
|
570
|
-
} catch (e) {
|
|
571
|
-
console.error("failed to encode ALTCHA session data to base64", e);
|
|
572
|
-
}
|
|
573
|
-
return "";
|
|
574
|
-
}
|
|
575
|
-
destroy() {
|
|
576
|
-
window.removeEventListener("unload", V(this, ye)), this.elForm.removeEventListener("change", V(this, be)), this.elForm.removeEventListener("focusin", V(this, ve)), this.elForm.removeEventListener("submit", V(this, we));
|
|
577
|
-
}
|
|
578
|
-
end() {
|
|
579
|
-
this.submitTime || (this.submitTime = Date.now());
|
|
580
|
-
}
|
|
581
|
-
getFieldName(e, t = 40) {
|
|
582
|
-
const i = e.getAttribute("data-group-label"), o = e.getAttribute("name") || e.getAttribute("aria-label");
|
|
583
|
-
return ((i ? i + ": " : "") + o).slice(0, t);
|
|
584
|
-
}
|
|
585
|
-
isMobile() {
|
|
586
|
-
const e = "userAgentData" in navigator && navigator.userAgentData ? navigator.userAgentData : {};
|
|
587
|
-
return "mobile" in e ? e.mobile === !0 : /Mobi/i.test(window.navigator.userAgent);
|
|
588
|
-
}
|
|
589
|
-
isInput(e) {
|
|
590
|
-
return ["INPUT", "SELECT", "TEXTAREA"].includes(e.tagName);
|
|
591
|
-
}
|
|
592
|
-
onFormFieldChange(e) {
|
|
593
|
-
const t = this.getFieldName(e);
|
|
594
|
-
t && this.trackFieldChange(t);
|
|
595
|
-
}
|
|
596
|
-
onFormChange(e) {
|
|
597
|
-
const t = e.target;
|
|
598
|
-
t && this.isInput(t) && this.onFormFieldChange(t);
|
|
599
|
-
}
|
|
600
|
-
onFormFocus(e) {
|
|
601
|
-
const t = e.target;
|
|
602
|
-
if (this.startTime || this.start(), t && this.isInput(t)) {
|
|
603
|
-
const i = this.getFieldName(t);
|
|
604
|
-
i && ot(this, ce, i);
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
onFormSubmit() {
|
|
608
|
-
this.end();
|
|
609
|
-
}
|
|
610
|
-
onUnload() {
|
|
611
|
-
this.loadTime <= Date.now() - this.viewTimeThresholdMs && !this.submitTime && this.sendBeacon();
|
|
612
|
-
}
|
|
613
|
-
async sendBeacon() {
|
|
614
|
-
if (this.beaconUrl && "sendBeacon" in navigator)
|
|
584
|
+
function En(n) {
|
|
585
|
+
const e = atob(n), t = new Uint8Array(e.length);
|
|
586
|
+
for (let i = 0; i < e.length; i++)
|
|
587
|
+
t[i] = e.charCodeAt(i);
|
|
588
|
+
return t;
|
|
589
|
+
}
|
|
590
|
+
function Rn(n, e = 12) {
|
|
591
|
+
const t = new Uint8Array(e);
|
|
592
|
+
for (let i = 0; i < e; i++)
|
|
593
|
+
t[i] = n % 256, n = Math.floor(n / 256);
|
|
594
|
+
return t;
|
|
595
|
+
}
|
|
596
|
+
async function Cn(n, e = "", t = 1e6, i = 0) {
|
|
597
|
+
const o = "AES-GCM", l = new AbortController(), s = Date.now(), d = async () => {
|
|
598
|
+
for (let C = i; C <= t; C += 1) {
|
|
599
|
+
if (l.signal.aborted || !h || !f)
|
|
600
|
+
return null;
|
|
615
601
|
try {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
602
|
+
const b = await crypto.subtle.decrypt(
|
|
603
|
+
{
|
|
604
|
+
name: o,
|
|
605
|
+
iv: Rn(C)
|
|
606
|
+
},
|
|
607
|
+
h,
|
|
608
|
+
f
|
|
619
609
|
);
|
|
610
|
+
if (b)
|
|
611
|
+
return {
|
|
612
|
+
clearText: new TextDecoder().decode(b),
|
|
613
|
+
took: Date.now() - s
|
|
614
|
+
};
|
|
620
615
|
} catch {
|
|
621
616
|
}
|
|
617
|
+
}
|
|
618
|
+
return null;
|
|
619
|
+
};
|
|
620
|
+
let h = null, f = null;
|
|
621
|
+
try {
|
|
622
|
+
f = En(n);
|
|
623
|
+
const C = await crypto.subtle.digest(
|
|
624
|
+
"SHA-256",
|
|
625
|
+
_t.encode(e)
|
|
626
|
+
);
|
|
627
|
+
h = await crypto.subtle.importKey(
|
|
628
|
+
"raw",
|
|
629
|
+
C,
|
|
630
|
+
o,
|
|
631
|
+
!1,
|
|
632
|
+
["decrypt"]
|
|
633
|
+
);
|
|
634
|
+
} catch {
|
|
635
|
+
return {
|
|
636
|
+
promise: Promise.reject(),
|
|
637
|
+
controller: l
|
|
638
|
+
};
|
|
622
639
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
this.error = e === null ? null : String(e);
|
|
628
|
-
}
|
|
629
|
-
trackFieldChange(e) {
|
|
630
|
-
V(this, ae)[e] = (V(this, ae)[e] || 0) + 1;
|
|
631
|
-
}
|
|
640
|
+
return {
|
|
641
|
+
promise: d(),
|
|
642
|
+
controller: l
|
|
643
|
+
};
|
|
632
644
|
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
Wt(n, "svelte-ddsc3z", '.altcha.svelte-ddsc3z.svelte-ddsc3z{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative;text-align:left}.altcha.svelte-ddsc3z.svelte-ddsc3z:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating].svelte-ddsc3z.svelte-ddsc3z{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top].svelte-ddsc3z .altcha-anchor-arrow.svelte-ddsc3z{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom].svelte-ddsc3z.svelte-ddsc3z:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top].svelte-ddsc3z.svelte-ddsc3z:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating].svelte-ddsc3z.svelte-ddsc3z:not([data-state=unverified]){display:block}.altcha-anchor-arrow.svelte-ddsc3z.svelte-ddsc3z{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main.svelte-ddsc3z.svelte-ddsc3z{align-items:center;display:flex;gap:0.4rem;padding:0.7rem}.altcha-label.svelte-ddsc3z.svelte-ddsc3z{flex-grow:1}.altcha-label.svelte-ddsc3z label.svelte-ddsc3z{cursor:pointer}.altcha-logo.svelte-ddsc3z.svelte-ddsc3z{color:currentColor;opacity:0.3}.altcha-logo.svelte-ddsc3z.svelte-ddsc3z:hover{opacity:1}.altcha-error.svelte-ddsc3z.svelte-ddsc3z{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:0.85rem;gap:0.3rem;padding:0 0.7rem 0.7rem}.altcha-footer.svelte-ddsc3z.svelte-ddsc3z{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:0.75rem;opacity:0.4;padding:0.2rem 0.7rem;text-align:right}.altcha-footer.svelte-ddsc3z.svelte-ddsc3z:hover{opacity:1}.altcha-footer.svelte-ddsc3z>.svelte-ddsc3z:first-child{flex-grow:1}.altcha-footer.svelte-ddsc3z a{color:currentColor}.altcha-checkbox.svelte-ddsc3z.svelte-ddsc3z{display:flex;align-items:center;height:24px;width:24px}.altcha-checkbox.svelte-ddsc3z input.svelte-ddsc3z{width:18px;height:18px;margin:0}.altcha-hidden.svelte-ddsc3z.svelte-ddsc3z{display:none}.altcha-spinner.svelte-ddsc3z.svelte-ddsc3z{animation:svelte-ddsc3z-altcha-spinner 0.75s infinite linear;transform-origin:center}@keyframes svelte-ddsc3z-altcha-spinner{100%{transform:rotate(360deg)}}');
|
|
645
|
+
var m = /* @__PURE__ */ ((n) => (n.ERROR = "error", n.VERIFIED = "verified", n.VERIFYING = "verifying", n.UNVERIFIED = "unverified", n.EXPIRED = "expired", n))(m || {});
|
|
646
|
+
function In(n) {
|
|
647
|
+
Qt(n, "svelte-ddsc3z", '.altcha.svelte-ddsc3z.svelte-ddsc3z{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative;text-align:left}.altcha.svelte-ddsc3z.svelte-ddsc3z:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating].svelte-ddsc3z.svelte-ddsc3z{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top].svelte-ddsc3z .altcha-anchor-arrow.svelte-ddsc3z{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom].svelte-ddsc3z.svelte-ddsc3z:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top].svelte-ddsc3z.svelte-ddsc3z:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating].svelte-ddsc3z.svelte-ddsc3z:not([data-state=unverified]){display:block}.altcha-anchor-arrow.svelte-ddsc3z.svelte-ddsc3z{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main.svelte-ddsc3z.svelte-ddsc3z{align-items:center;display:flex;gap:0.4rem;padding:0.7rem}.altcha-label.svelte-ddsc3z.svelte-ddsc3z{flex-grow:1}.altcha-label.svelte-ddsc3z label.svelte-ddsc3z{cursor:pointer}.altcha-logo.svelte-ddsc3z.svelte-ddsc3z{color:currentColor;opacity:0.3}.altcha-logo.svelte-ddsc3z.svelte-ddsc3z:hover{opacity:1}.altcha-error.svelte-ddsc3z.svelte-ddsc3z{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:0.85rem;gap:0.3rem;padding:0 0.7rem 0.7rem}.altcha-footer.svelte-ddsc3z.svelte-ddsc3z{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:0.75rem;opacity:0.4;padding:0.2rem 0.7rem;text-align:right}.altcha-footer.svelte-ddsc3z.svelte-ddsc3z:hover{opacity:1}.altcha-footer.svelte-ddsc3z>.svelte-ddsc3z:first-child{flex-grow:1}.altcha-footer.svelte-ddsc3z a{color:currentColor}.altcha-checkbox.svelte-ddsc3z.svelte-ddsc3z{display:flex;align-items:center;height:24px;width:24px}.altcha-checkbox.svelte-ddsc3z input.svelte-ddsc3z{width:18px;height:18px;margin:0}.altcha-hidden.svelte-ddsc3z.svelte-ddsc3z{display:none}.altcha-spinner.svelte-ddsc3z.svelte-ddsc3z{animation:svelte-ddsc3z-altcha-spinner 0.75s infinite linear;transform-origin:center}@keyframes svelte-ddsc3z-altcha-spinner{100%{transform:rotate(360deg)}}');
|
|
637
648
|
}
|
|
638
|
-
function
|
|
649
|
+
function lt(n) {
|
|
639
650
|
let e, t, i;
|
|
640
651
|
return {
|
|
641
652
|
c() {
|
|
642
653
|
e = $("svg"), t = $("path"), i = $("path"), a(t, "d", "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z"), a(t, "fill", "currentColor"), a(t, "opacity", ".25"), a(i, "d", "M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z"), a(i, "fill", "currentColor"), a(i, "class", "altcha-spinner svelte-ddsc3z"), a(e, "width", "24"), a(e, "height", "24"), a(e, "viewBox", "0 0 24 24"), a(e, "xmlns", "http://www.w3.org/2000/svg");
|
|
643
654
|
},
|
|
644
|
-
m(o,
|
|
645
|
-
|
|
655
|
+
m(o, l) {
|
|
656
|
+
X(o, e, l), L(e, t), L(e, i);
|
|
646
657
|
},
|
|
647
658
|
d(o) {
|
|
648
|
-
o &&
|
|
659
|
+
o && Y(e);
|
|
649
660
|
}
|
|
650
661
|
};
|
|
651
662
|
}
|
|
652
|
-
function
|
|
663
|
+
function Ln(n) {
|
|
653
664
|
let e, t = (
|
|
654
665
|
/*_strings*/
|
|
655
|
-
n[
|
|
666
|
+
n[11].label + ""
|
|
656
667
|
), i;
|
|
657
668
|
return {
|
|
658
669
|
c() {
|
|
659
|
-
e =
|
|
670
|
+
e = Z("label"), a(e, "for", i = /*name*/
|
|
660
671
|
n[4] + "_checkbox"), a(e, "class", "svelte-ddsc3z");
|
|
661
672
|
},
|
|
662
|
-
m(o,
|
|
663
|
-
|
|
673
|
+
m(o, l) {
|
|
674
|
+
X(o, e, l), e.innerHTML = t;
|
|
664
675
|
},
|
|
665
|
-
p(o,
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
o[
|
|
676
|
+
p(o, l) {
|
|
677
|
+
l[0] & /*_strings*/
|
|
678
|
+
2048 && t !== (t = /*_strings*/
|
|
679
|
+
o[11].label + "") && (e.innerHTML = t), l[0] & /*name*/
|
|
669
680
|
16 && i !== (i = /*name*/
|
|
670
681
|
o[4] + "_checkbox") && a(e, "for", i);
|
|
671
682
|
},
|
|
672
683
|
d(o) {
|
|
673
|
-
o &&
|
|
684
|
+
o && Y(e);
|
|
674
685
|
}
|
|
675
686
|
};
|
|
676
687
|
}
|
|
677
|
-
function
|
|
688
|
+
function Nn(n) {
|
|
678
689
|
let e, t = (
|
|
679
690
|
/*_strings*/
|
|
680
|
-
n[
|
|
691
|
+
n[11].verifying + ""
|
|
681
692
|
);
|
|
682
693
|
return {
|
|
683
694
|
c() {
|
|
684
|
-
e =
|
|
695
|
+
e = Z("span");
|
|
685
696
|
},
|
|
686
697
|
m(i, o) {
|
|
687
|
-
|
|
698
|
+
X(i, e, o), e.innerHTML = t;
|
|
688
699
|
},
|
|
689
700
|
p(i, o) {
|
|
690
701
|
o[0] & /*_strings*/
|
|
691
|
-
|
|
692
|
-
i[
|
|
702
|
+
2048 && t !== (t = /*_strings*/
|
|
703
|
+
i[11].verifying + "") && (e.innerHTML = t);
|
|
693
704
|
},
|
|
694
705
|
d(i) {
|
|
695
|
-
i &&
|
|
706
|
+
i && Y(e);
|
|
696
707
|
}
|
|
697
708
|
};
|
|
698
709
|
}
|
|
699
|
-
function
|
|
710
|
+
function zn(n) {
|
|
700
711
|
let e, t = (
|
|
701
712
|
/*_strings*/
|
|
702
|
-
n[
|
|
703
|
-
), i, o
|
|
704
|
-
/*session*/
|
|
705
|
-
n[11] && ut(n)
|
|
706
|
-
);
|
|
713
|
+
n[11].verified + ""
|
|
714
|
+
), i, o;
|
|
707
715
|
return {
|
|
708
716
|
c() {
|
|
709
|
-
e =
|
|
717
|
+
e = Z("span"), i = Q(), o = Z("input"), a(o, "type", "hidden"), a(
|
|
710
718
|
o,
|
|
711
719
|
"name",
|
|
712
720
|
/*name*/
|
|
@@ -714,100 +722,79 @@ function xn(n) {
|
|
|
714
722
|
), o.value = /*payload*/
|
|
715
723
|
n[6];
|
|
716
724
|
},
|
|
717
|
-
m(l,
|
|
718
|
-
|
|
725
|
+
m(l, s) {
|
|
726
|
+
X(l, e, s), e.innerHTML = t, X(l, i, s), X(l, o, s);
|
|
719
727
|
},
|
|
720
|
-
p(l,
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
l[
|
|
728
|
+
p(l, s) {
|
|
729
|
+
s[0] & /*_strings*/
|
|
730
|
+
2048 && t !== (t = /*_strings*/
|
|
731
|
+
l[11].verified + "") && (e.innerHTML = t), s[0] & /*name*/
|
|
724
732
|
16 && a(
|
|
725
733
|
o,
|
|
726
734
|
"name",
|
|
727
735
|
/*name*/
|
|
728
736
|
l[4]
|
|
729
|
-
),
|
|
737
|
+
), s[0] & /*payload*/
|
|
730
738
|
64 && (o.value = /*payload*/
|
|
731
|
-
l[6])
|
|
732
|
-
l[11] ? c ? c.p(l, f) : (c = ut(l), c.c(), c.m(u.parentNode, u)) : c && (c.d(1), c = null);
|
|
739
|
+
l[6]);
|
|
733
740
|
},
|
|
734
741
|
d(l) {
|
|
735
|
-
l && (
|
|
742
|
+
l && (Y(e), Y(i), Y(o));
|
|
736
743
|
}
|
|
737
744
|
};
|
|
738
745
|
}
|
|
739
|
-
function
|
|
740
|
-
let e;
|
|
746
|
+
function st(n) {
|
|
747
|
+
let e, t, i, o, l, s, d;
|
|
741
748
|
return {
|
|
742
749
|
c() {
|
|
743
|
-
e =
|
|
744
|
-
n[
|
|
750
|
+
e = Z("div"), t = Z("a"), i = $("svg"), o = $("path"), l = $("path"), s = $("path"), a(o, "d", "M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z"), a(o, "fill", "currentColor"), a(l, "d", "M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z"), a(l, "fill", "currentColor"), a(s, "d", "M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z"), a(s, "fill", "currentColor"), a(i, "width", "22"), a(i, "height", "22"), a(i, "viewBox", "0 0 20 20"), a(i, "fill", "none"), a(i, "xmlns", "http://www.w3.org/2000/svg"), a(t, "href", xt), a(t, "target", "_blank"), a(t, "class", "altcha-logo svelte-ddsc3z"), a(t, "aria-label", d = /*_strings*/
|
|
751
|
+
n[11].ariaLinkLabel);
|
|
745
752
|
},
|
|
746
|
-
m(
|
|
747
|
-
|
|
748
|
-
},
|
|
749
|
-
p(t, i) {
|
|
750
|
-
i[0] & /*sessionPayload*/
|
|
751
|
-
4096 && (e.value = /*sessionPayload*/
|
|
752
|
-
t[12]);
|
|
753
|
-
},
|
|
754
|
-
d(t) {
|
|
755
|
-
t && N(e);
|
|
756
|
-
}
|
|
757
|
-
};
|
|
758
|
-
}
|
|
759
|
-
function dt(n) {
|
|
760
|
-
let e, t, i, o, s, u, c;
|
|
761
|
-
return {
|
|
762
|
-
c() {
|
|
763
|
-
e = R("div"), t = R("a"), i = $("svg"), o = $("path"), s = $("path"), u = $("path"), a(o, "d", "M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z"), a(o, "fill", "currentColor"), a(s, "d", "M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z"), a(s, "fill", "currentColor"), a(u, "d", "M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z"), a(u, "fill", "currentColor"), a(i, "width", "22"), a(i, "height", "22"), a(i, "viewBox", "0 0 20 20"), a(i, "fill", "none"), a(i, "xmlns", "http://www.w3.org/2000/svg"), a(t, "href", Rt), a(t, "target", "_blank"), a(t, "class", "altcha-logo svelte-ddsc3z"), a(t, "aria-label", c = /*_strings*/
|
|
764
|
-
n[13].ariaLinkLabel);
|
|
753
|
+
m(h, f) {
|
|
754
|
+
X(h, e, f), L(e, t), L(t, i), L(i, o), L(i, l), L(i, s);
|
|
765
755
|
},
|
|
766
|
-
|
|
767
|
-
S(l, e, f), E(e, t), E(t, i), E(i, o), E(i, s), E(i, u);
|
|
768
|
-
},
|
|
769
|
-
p(l, f) {
|
|
756
|
+
p(h, f) {
|
|
770
757
|
f[0] & /*_strings*/
|
|
771
|
-
|
|
772
|
-
|
|
758
|
+
2048 && d !== (d = /*_strings*/
|
|
759
|
+
h[11].ariaLinkLabel) && a(t, "aria-label", d);
|
|
773
760
|
},
|
|
774
|
-
d(
|
|
775
|
-
|
|
761
|
+
d(h) {
|
|
762
|
+
h && Y(e);
|
|
776
763
|
}
|
|
777
764
|
};
|
|
778
765
|
}
|
|
779
|
-
function
|
|
766
|
+
function ct(n) {
|
|
780
767
|
let e, t, i, o;
|
|
781
|
-
function
|
|
768
|
+
function l(h, f) {
|
|
782
769
|
return (
|
|
783
770
|
/*state*/
|
|
784
|
-
|
|
771
|
+
h[7] === m.EXPIRED ? An : Sn
|
|
785
772
|
);
|
|
786
773
|
}
|
|
787
|
-
let
|
|
774
|
+
let s = l(n), d = s(n);
|
|
788
775
|
return {
|
|
789
776
|
c() {
|
|
790
|
-
e =
|
|
777
|
+
e = Z("div"), t = $("svg"), i = $("path"), o = Q(), d.c(), a(i, "stroke-linecap", "round"), a(i, "stroke-linejoin", "round"), a(i, "d", "M6 18L18 6M6 6l12 12"), a(t, "width", "14"), a(t, "height", "14"), a(t, "xmlns", "http://www.w3.org/2000/svg"), a(t, "fill", "none"), a(t, "viewBox", "0 0 24 24"), a(t, "stroke-width", "1.5"), a(t, "stroke", "currentColor"), a(e, "class", "altcha-error svelte-ddsc3z");
|
|
791
778
|
},
|
|
792
|
-
m(
|
|
793
|
-
|
|
779
|
+
m(h, f) {
|
|
780
|
+
X(h, e, f), L(e, t), L(t, i), L(e, o), d.m(e, null);
|
|
794
781
|
},
|
|
795
|
-
p(
|
|
796
|
-
|
|
782
|
+
p(h, f) {
|
|
783
|
+
s === (s = l(h)) && d ? d.p(h, f) : (d.d(1), d = s(h), d && (d.c(), d.m(e, null)));
|
|
797
784
|
},
|
|
798
|
-
d(
|
|
799
|
-
|
|
785
|
+
d(h) {
|
|
786
|
+
h && Y(e), d.d();
|
|
800
787
|
}
|
|
801
788
|
};
|
|
802
789
|
}
|
|
803
|
-
function
|
|
790
|
+
function Sn(n) {
|
|
804
791
|
let e, t = (
|
|
805
792
|
/*_strings*/
|
|
806
|
-
n[
|
|
793
|
+
n[11].error + ""
|
|
807
794
|
);
|
|
808
795
|
return {
|
|
809
796
|
c() {
|
|
810
|
-
e =
|
|
797
|
+
e = Z("div"), a(
|
|
811
798
|
e,
|
|
812
799
|
"title",
|
|
813
800
|
/*error*/
|
|
@@ -815,12 +802,12 @@ function Cn(n) {
|
|
|
815
802
|
);
|
|
816
803
|
},
|
|
817
804
|
m(i, o) {
|
|
818
|
-
|
|
805
|
+
X(i, e, o), e.innerHTML = t;
|
|
819
806
|
},
|
|
820
807
|
p(i, o) {
|
|
821
808
|
o[0] & /*_strings*/
|
|
822
|
-
|
|
823
|
-
i[
|
|
809
|
+
2048 && t !== (t = /*_strings*/
|
|
810
|
+
i[11].error + "") && (e.innerHTML = t), o[0] & /*error*/
|
|
824
811
|
32 && a(
|
|
825
812
|
e,
|
|
826
813
|
"title",
|
|
@@ -829,18 +816,18 @@ function Cn(n) {
|
|
|
829
816
|
);
|
|
830
817
|
},
|
|
831
818
|
d(i) {
|
|
832
|
-
i &&
|
|
819
|
+
i && Y(e);
|
|
833
820
|
}
|
|
834
821
|
};
|
|
835
822
|
}
|
|
836
|
-
function
|
|
823
|
+
function An(n) {
|
|
837
824
|
let e, t = (
|
|
838
825
|
/*_strings*/
|
|
839
|
-
n[
|
|
826
|
+
n[11].expired + ""
|
|
840
827
|
);
|
|
841
828
|
return {
|
|
842
829
|
c() {
|
|
843
|
-
e =
|
|
830
|
+
e = Z("div"), a(
|
|
844
831
|
e,
|
|
845
832
|
"title",
|
|
846
833
|
/*error*/
|
|
@@ -848,12 +835,12 @@ function Ln(n) {
|
|
|
848
835
|
);
|
|
849
836
|
},
|
|
850
837
|
m(i, o) {
|
|
851
|
-
|
|
838
|
+
X(i, e, o), e.innerHTML = t;
|
|
852
839
|
},
|
|
853
840
|
p(i, o) {
|
|
854
841
|
o[0] & /*_strings*/
|
|
855
|
-
|
|
856
|
-
i[
|
|
842
|
+
2048 && t !== (t = /*_strings*/
|
|
843
|
+
i[11].expired + "") && (e.innerHTML = t), o[0] & /*error*/
|
|
857
844
|
32 && a(
|
|
858
845
|
e,
|
|
859
846
|
"title",
|
|
@@ -862,387 +849,286 @@ function Ln(n) {
|
|
|
862
849
|
);
|
|
863
850
|
},
|
|
864
851
|
d(i) {
|
|
865
|
-
i &&
|
|
852
|
+
i && Y(e);
|
|
866
853
|
}
|
|
867
854
|
};
|
|
868
855
|
}
|
|
869
|
-
function
|
|
856
|
+
function at(n) {
|
|
870
857
|
let e, t, i = (
|
|
871
858
|
/*_strings*/
|
|
872
|
-
n[
|
|
859
|
+
n[11].footer + ""
|
|
873
860
|
);
|
|
874
861
|
return {
|
|
875
862
|
c() {
|
|
876
|
-
e =
|
|
863
|
+
e = Z("div"), t = Z("div"), a(t, "class", "svelte-ddsc3z"), a(e, "class", "altcha-footer svelte-ddsc3z");
|
|
877
864
|
},
|
|
878
|
-
m(o,
|
|
879
|
-
|
|
865
|
+
m(o, l) {
|
|
866
|
+
X(o, e, l), L(e, t), t.innerHTML = i;
|
|
880
867
|
},
|
|
881
|
-
p(o,
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
o[
|
|
868
|
+
p(o, l) {
|
|
869
|
+
l[0] & /*_strings*/
|
|
870
|
+
2048 && i !== (i = /*_strings*/
|
|
871
|
+
o[11].footer + "") && (t.innerHTML = i);
|
|
885
872
|
},
|
|
886
873
|
d(o) {
|
|
887
|
-
o &&
|
|
874
|
+
o && Y(e);
|
|
888
875
|
}
|
|
889
876
|
};
|
|
890
877
|
}
|
|
891
|
-
function
|
|
878
|
+
function ft(n) {
|
|
892
879
|
let e;
|
|
893
880
|
return {
|
|
894
881
|
c() {
|
|
895
|
-
e =
|
|
882
|
+
e = Z("div"), a(e, "class", "altcha-anchor-arrow svelte-ddsc3z");
|
|
896
883
|
},
|
|
897
884
|
m(t, i) {
|
|
898
|
-
|
|
885
|
+
X(t, e, i), n[48](e);
|
|
899
886
|
},
|
|
900
|
-
p:
|
|
887
|
+
p: Re,
|
|
901
888
|
d(t) {
|
|
902
|
-
t &&
|
|
889
|
+
t && Y(e), n[48](null);
|
|
903
890
|
}
|
|
904
891
|
};
|
|
905
892
|
}
|
|
906
|
-
function
|
|
907
|
-
let e, t, i, o,
|
|
893
|
+
function Tn(n) {
|
|
894
|
+
let e, t, i, o, l, s, d, h, f, C, b, M, D, j, S, N, O;
|
|
895
|
+
const J = (
|
|
896
|
+
/*#slots*/
|
|
897
|
+
n[46].default
|
|
898
|
+
), G = Mt(
|
|
899
|
+
J,
|
|
900
|
+
n,
|
|
901
|
+
/*$$scope*/
|
|
902
|
+
n[45],
|
|
903
|
+
null
|
|
904
|
+
);
|
|
905
|
+
let A = (
|
|
908
906
|
/*state*/
|
|
909
|
-
n[7] ===
|
|
907
|
+
n[7] === m.VERIFYING && lt()
|
|
910
908
|
);
|
|
911
|
-
function q(
|
|
909
|
+
function q(u, y) {
|
|
912
910
|
return (
|
|
913
911
|
/*state*/
|
|
914
|
-
|
|
912
|
+
u[7] === m.VERIFIED ? zn : (
|
|
915
913
|
/*state*/
|
|
916
|
-
|
|
914
|
+
u[7] === m.VERIFYING ? Nn : Ln
|
|
917
915
|
)
|
|
918
916
|
);
|
|
919
917
|
}
|
|
920
|
-
let K = q(n),
|
|
918
|
+
let K = q(n), H = K(n), x = (
|
|
921
919
|
/*hidelogo*/
|
|
922
920
|
(n[3] !== !0 || /*isFreeSaaS*/
|
|
923
|
-
n[
|
|
924
|
-
),
|
|
921
|
+
n[12]) && st(n)
|
|
922
|
+
), T = (
|
|
925
923
|
/*error*/
|
|
926
924
|
(n[5] || /*state*/
|
|
927
|
-
n[7] ===
|
|
928
|
-
),
|
|
925
|
+
n[7] === m.EXPIRED) && ct(n)
|
|
926
|
+
), z = (
|
|
929
927
|
/*_strings*/
|
|
930
|
-
n[
|
|
928
|
+
n[11].footer && /*hidefooter*/
|
|
931
929
|
(n[2] !== !0 || /*isFreeSaaS*/
|
|
932
|
-
n[
|
|
933
|
-
),
|
|
930
|
+
n[12]) && at(n)
|
|
931
|
+
), _ = (
|
|
934
932
|
/*floating*/
|
|
935
|
-
n[1] &&
|
|
933
|
+
n[1] && ft(n)
|
|
936
934
|
);
|
|
937
935
|
return {
|
|
938
936
|
c() {
|
|
939
|
-
e =
|
|
940
|
-
n[4] + "_checkbox"), s.required =
|
|
941
|
-
n[0] !== "onsubmit"
|
|
942
|
-
|
|
937
|
+
G && G.c(), e = Q(), t = Z("div"), i = Z("div"), A && A.c(), o = Q(), l = Z("div"), s = Z("input"), f = Q(), C = Z("div"), H.c(), b = Q(), x && x.c(), M = Q(), T && T.c(), D = Q(), z && z.c(), j = Q(), _ && _.c(), a(s, "type", "checkbox"), a(s, "id", d = /*name*/
|
|
938
|
+
n[4] + "_checkbox"), s.required = h = /*auto*/
|
|
939
|
+
n[0] !== "onsubmit" && (!/*floating*/
|
|
940
|
+
n[1] || /*auto*/
|
|
941
|
+
n[0] !== "off"), a(s, "class", "svelte-ddsc3z"), a(l, "class", "altcha-checkbox svelte-ddsc3z"), it(
|
|
942
|
+
l,
|
|
943
943
|
"altcha-hidden",
|
|
944
944
|
/*state*/
|
|
945
|
-
n[7] ===
|
|
946
|
-
), a(
|
|
947
|
-
|
|
945
|
+
n[7] === m.VERIFYING
|
|
946
|
+
), a(C, "class", "altcha-label svelte-ddsc3z"), a(i, "class", "altcha-main svelte-ddsc3z"), a(t, "class", "altcha svelte-ddsc3z"), a(
|
|
947
|
+
t,
|
|
948
948
|
"data-state",
|
|
949
949
|
/*state*/
|
|
950
950
|
n[7]
|
|
951
951
|
), a(
|
|
952
|
-
|
|
952
|
+
t,
|
|
953
953
|
"data-floating",
|
|
954
954
|
/*floating*/
|
|
955
955
|
n[1]
|
|
956
956
|
);
|
|
957
957
|
},
|
|
958
|
-
m(
|
|
959
|
-
|
|
960
|
-
n[8],
|
|
961
|
-
|
|
958
|
+
m(u, y) {
|
|
959
|
+
G && G.m(u, y), X(u, e, y), X(u, t, y), L(t, i), A && A.m(i, null), L(i, o), L(i, l), L(l, s), s.checked = /*checked*/
|
|
960
|
+
n[8], L(i, f), L(i, C), H.m(C, null), L(i, b), x && x.m(i, null), L(t, M), T && T.m(t, null), L(t, D), z && z.m(t, null), L(t, j), _ && _.m(t, null), n[49](t), S = !0, N || (O = [
|
|
961
|
+
Le(
|
|
962
962
|
s,
|
|
963
963
|
"change",
|
|
964
964
|
/*input_change_handler*/
|
|
965
|
-
n[
|
|
965
|
+
n[47]
|
|
966
966
|
),
|
|
967
|
-
|
|
967
|
+
Le(
|
|
968
968
|
s,
|
|
969
969
|
"change",
|
|
970
970
|
/*onCheckedChange*/
|
|
971
|
-
n[
|
|
971
|
+
n[13]
|
|
972
972
|
),
|
|
973
|
-
|
|
973
|
+
Le(
|
|
974
974
|
s,
|
|
975
975
|
"invalid",
|
|
976
976
|
/*onInvalid*/
|
|
977
|
-
n[
|
|
977
|
+
n[14]
|
|
978
978
|
)
|
|
979
|
-
],
|
|
979
|
+
], N = !0);
|
|
980
980
|
},
|
|
981
|
-
p(
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
981
|
+
p(u, y) {
|
|
982
|
+
G && G.p && (!S || y[1] & /*$$scope*/
|
|
983
|
+
16384) && Ot(
|
|
984
|
+
G,
|
|
985
|
+
J,
|
|
986
|
+
u,
|
|
987
|
+
/*$$scope*/
|
|
988
|
+
u[45],
|
|
989
|
+
S ? Bt(
|
|
990
|
+
J,
|
|
991
|
+
/*$$scope*/
|
|
992
|
+
u[45],
|
|
993
|
+
y,
|
|
994
|
+
null
|
|
995
|
+
) : Jt(
|
|
996
|
+
/*$$scope*/
|
|
997
|
+
u[45]
|
|
998
|
+
),
|
|
999
|
+
null
|
|
1000
|
+
), /*state*/
|
|
1001
|
+
u[7] === m.VERIFYING ? A || (A = lt(), A.c(), A.m(i, o)) : A && (A.d(1), A = null), (!S || y[0] & /*name*/
|
|
1002
|
+
16 && d !== (d = /*name*/
|
|
1003
|
+
u[4] + "_checkbox")) && a(s, "id", d), (!S || y[0] & /*auto, floating*/
|
|
1004
|
+
3 && h !== (h = /*auto*/
|
|
1005
|
+
u[0] !== "onsubmit" && (!/*floating*/
|
|
1006
|
+
u[1] || /*auto*/
|
|
1007
|
+
u[0] !== "off"))) && (s.required = h), y[0] & /*checked*/
|
|
988
1008
|
256 && (s.checked = /*checked*/
|
|
989
|
-
|
|
990
|
-
128 &&
|
|
991
|
-
|
|
1009
|
+
u[8]), (!S || y[0] & /*state*/
|
|
1010
|
+
128) && it(
|
|
1011
|
+
l,
|
|
992
1012
|
"altcha-hidden",
|
|
993
1013
|
/*state*/
|
|
994
|
-
|
|
995
|
-
), K === (K = q(
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
(
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
128 && a(
|
|
1005
|
-
|
|
1014
|
+
u[7] === m.VERIFYING
|
|
1015
|
+
), K === (K = q(u)) && H ? H.p(u, y) : (H.d(1), H = K(u), H && (H.c(), H.m(C, null))), /*hidelogo*/
|
|
1016
|
+
u[3] !== !0 || /*isFreeSaaS*/
|
|
1017
|
+
u[12] ? x ? x.p(u, y) : (x = st(u), x.c(), x.m(i, null)) : x && (x.d(1), x = null), /*error*/
|
|
1018
|
+
u[5] || /*state*/
|
|
1019
|
+
u[7] === m.EXPIRED ? T ? T.p(u, y) : (T = ct(u), T.c(), T.m(t, D)) : T && (T.d(1), T = null), /*_strings*/
|
|
1020
|
+
u[11].footer && /*hidefooter*/
|
|
1021
|
+
(u[2] !== !0 || /*isFreeSaaS*/
|
|
1022
|
+
u[12]) ? z ? z.p(u, y) : (z = at(u), z.c(), z.m(t, j)) : z && (z.d(1), z = null), /*floating*/
|
|
1023
|
+
u[1] ? _ ? _.p(u, y) : (_ = ft(u), _.c(), _.m(t, null)) : _ && (_.d(1), _ = null), (!S || y[0] & /*state*/
|
|
1024
|
+
128) && a(
|
|
1025
|
+
t,
|
|
1006
1026
|
"data-state",
|
|
1007
1027
|
/*state*/
|
|
1008
|
-
|
|
1009
|
-
),
|
|
1010
|
-
2 && a(
|
|
1011
|
-
|
|
1028
|
+
u[7]
|
|
1029
|
+
), (!S || y[0] & /*floating*/
|
|
1030
|
+
2) && a(
|
|
1031
|
+
t,
|
|
1012
1032
|
"data-floating",
|
|
1013
1033
|
/*floating*/
|
|
1014
|
-
|
|
1034
|
+
u[1]
|
|
1015
1035
|
);
|
|
1016
1036
|
},
|
|
1017
|
-
i
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1037
|
+
i(u) {
|
|
1038
|
+
S || (pt(G, u), S = !0);
|
|
1039
|
+
},
|
|
1040
|
+
o(u) {
|
|
1041
|
+
dn(G, u), S = !1;
|
|
1042
|
+
},
|
|
1043
|
+
d(u) {
|
|
1044
|
+
u && (Y(e), Y(t)), G && G.d(u), A && A.d(), H.d(), x && x.d(), T && T.d(), z && z.d(), _ && _.d(), n[49](null), N = !1, we(O);
|
|
1021
1045
|
}
|
|
1022
1046
|
};
|
|
1023
1047
|
}
|
|
1024
|
-
const
|
|
1025
|
-
function
|
|
1048
|
+
const ut = "Visit Altcha.org", xt = "https://altcha.org/";
|
|
1049
|
+
function dt(n) {
|
|
1026
1050
|
return JSON.parse(n);
|
|
1027
1051
|
}
|
|
1028
|
-
function
|
|
1029
|
-
var
|
|
1030
|
-
let i, o,
|
|
1031
|
-
const
|
|
1032
|
-
let
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
}),
|
|
1036
|
-
k("mounted", "0.
|
|
1052
|
+
function Zn(n, e, t) {
|
|
1053
|
+
var qe, et;
|
|
1054
|
+
let i, o, l, s, { $$slots: d = {}, $$scope: h } = e, { auto: f = void 0 } = e, { blockspam: C = void 0 } = e, { challengeurl: b = void 0 } = e, { challengejson: M = void 0 } = e, { debug: D = !1 } = e, { delay: j = 0 } = e, { expire: S = void 0 } = e, { floating: N = void 0 } = e, { floatinganchor: O = void 0 } = e, { floatingoffset: J = void 0 } = e, { hidefooter: G = !1 } = e, { hidelogo: A = !1 } = e, { name: q = "altcha" } = e, { maxnumber: K = 1e6 } = e, { mockerror: H = !1 } = e, { obfuscated: x = void 0 } = e, { plugins: T = void 0 } = e, { refetchonexpire: z = !0 } = e, { spamfilter: _ = !1 } = e, { strings: u = void 0 } = e, { test: y = !1 } = e, { verifyurl: ee = void 0 } = e, { workers: le = Math.min(16, navigator.hardwareConcurrency || 8) } = e, { workerurl: ue = void 0 } = e;
|
|
1055
|
+
const de = sn(), Te = ["SHA-256", "SHA-384", "SHA-512"], Ze = (et = (qe = document.documentElement.lang) == null ? void 0 : qe.split("-")) == null ? void 0 : et[0];
|
|
1056
|
+
let re = !1, E, ie = null, se = null, v = null, he = null, B = null, oe = null, te = [], R = m.UNVERIFIED;
|
|
1057
|
+
ln(() => {
|
|
1058
|
+
Et(), v && (v.removeEventListener("submit", Fe), v.removeEventListener("reset", De), v.removeEventListener("focusin", Xe), v = null), B && (clearTimeout(B), B = null), document.removeEventListener("click", He), document.removeEventListener("scroll", Ye), window.removeEventListener("resize", Pe);
|
|
1059
|
+
}), on(() => {
|
|
1060
|
+
k("mounted", "0.9.0"), k("workers", le), Nt(), k("plugins", te.length ? te.map((r) => r.constructor.pluginName).join(", ") : "none"), y && k("using test mode"), S && ke(S), f !== void 0 && k("auto", f), N !== void 0 && We(N), v = E.closest("form"), v && (v.addEventListener("submit", Fe, { capture: !0 }), v.addEventListener("reset", De), f === "onfocus" && v.addEventListener("focusin", Xe)), f === "onload" && (x ? ge() : ne()), i && (G || A) && k("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."), requestAnimationFrame(() => {
|
|
1061
|
+
de("load");
|
|
1062
|
+
});
|
|
1037
1063
|
});
|
|
1038
|
-
function
|
|
1039
|
-
(O || r.some((d) => d instanceof Error)) && console[r[0] instanceof Error ? "error" : "log"]("ALTCHA", ...r);
|
|
1040
|
-
}
|
|
1041
|
-
function Ge(r) {
|
|
1042
|
-
U === w.UNVERIFIED && re();
|
|
1043
|
-
}
|
|
1044
|
-
function Oe(r) {
|
|
1045
|
-
m && D && U === w.VERIFIED && (D.end(), t(12, Be = D.dataAsBase64())), m && l === "onsubmit" && (U === w.UNVERIFIED ? (r.preventDefault(), r.stopPropagation(), re().then(() => {
|
|
1046
|
-
m == null || m.requestSubmit();
|
|
1047
|
-
})) : U !== w.VERIFIED && (r.preventDefault(), r.stopPropagation(), U === w.VERIFYING && $e()));
|
|
1048
|
-
}
|
|
1049
|
-
function Xe() {
|
|
1050
|
-
Le();
|
|
1051
|
-
}
|
|
1052
|
-
function He(r, d) {
|
|
1064
|
+
function Ve(r, c) {
|
|
1053
1065
|
return btoa(JSON.stringify({
|
|
1054
1066
|
algorithm: r.algorithm,
|
|
1055
1067
|
challenge: r.challenge,
|
|
1056
|
-
number:
|
|
1068
|
+
number: c.number,
|
|
1057
1069
|
salt: r.salt,
|
|
1058
1070
|
signature: r.signature,
|
|
1059
|
-
test:
|
|
1060
|
-
took:
|
|
1071
|
+
test: y ? !0 : void 0,
|
|
1072
|
+
took: c.took
|
|
1061
1073
|
}));
|
|
1062
1074
|
}
|
|
1063
|
-
function
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
throw new Error(`Unknown algorithm value. Allowed values: ${Ze.join(", ")}`);
|
|
1070
|
-
if (!r.challenge || r.challenge.length < 40)
|
|
1071
|
-
throw new Error("Challenge is too short. Min. 40 chars.");
|
|
1072
|
-
if (!r.salt || r.salt.length < 10)
|
|
1073
|
-
throw new Error("Salt is too short. Min. 10 chars.");
|
|
1075
|
+
function Et() {
|
|
1076
|
+
for (const r of te)
|
|
1077
|
+
r.destroy();
|
|
1078
|
+
}
|
|
1079
|
+
function Ge() {
|
|
1080
|
+
b && z && R === m.VERIFIED ? ne() : me(m.EXPIRED, s.expired);
|
|
1074
1081
|
}
|
|
1075
|
-
async function
|
|
1082
|
+
async function Rt() {
|
|
1076
1083
|
var r;
|
|
1077
|
-
if (
|
|
1084
|
+
if (H)
|
|
1078
1085
|
throw k("mocking error"), new Error("Mocked error.");
|
|
1079
1086
|
if (o)
|
|
1080
1087
|
return k("using provided json data"), o;
|
|
1081
|
-
if (
|
|
1082
|
-
return k("generating test challenge", { test:
|
|
1088
|
+
if (y)
|
|
1089
|
+
return k("generating test challenge", { test: y }), _n(typeof y != "boolean" ? +y : void 0);
|
|
1083
1090
|
{
|
|
1084
|
-
if (!
|
|
1085
|
-
const
|
|
1086
|
-
|
|
1091
|
+
if (!b && v) {
|
|
1092
|
+
const p = v.getAttribute("action");
|
|
1093
|
+
p != null && p.includes("/form/") && t(15, b = p + "/altcha");
|
|
1087
1094
|
}
|
|
1088
|
-
if (!
|
|
1095
|
+
if (!b)
|
|
1089
1096
|
throw new Error("Attribute challengeurl not set.");
|
|
1090
|
-
k("fetching challenge from",
|
|
1091
|
-
const
|
|
1092
|
-
headers:
|
|
1097
|
+
k("fetching challenge from", b);
|
|
1098
|
+
const c = await fetch(b, {
|
|
1099
|
+
headers: _ ? { "x-altcha-spam-filter": "1" } : {}
|
|
1093
1100
|
});
|
|
1094
|
-
if (
|
|
1095
|
-
throw new Error(`Server responded with ${
|
|
1096
|
-
const
|
|
1097
|
-
if (
|
|
1098
|
-
const
|
|
1099
|
-
|
|
1101
|
+
if (c.status !== 200)
|
|
1102
|
+
throw new Error(`Server responded with ${c.status}.`);
|
|
1103
|
+
const g = c.headers.get("Expires"), I = c.headers.get("X-Altcha-Config"), P = await c.json(), F = new URLSearchParams((r = P.salt.split("?")) == null ? void 0 : r[1]), V = F.get("expires") || F.get("expire");
|
|
1104
|
+
if (V) {
|
|
1105
|
+
const p = new Date(+V * 1e3), W = isNaN(p.getTime()) ? 0 : p.getTime() - Date.now();
|
|
1106
|
+
W > 0 && ke(W);
|
|
1100
1107
|
}
|
|
1101
|
-
if (
|
|
1108
|
+
if (I)
|
|
1102
1109
|
try {
|
|
1103
|
-
const
|
|
1104
|
-
|
|
1105
|
-
} catch (
|
|
1106
|
-
k("unable to configure from X-Altcha-Config",
|
|
1107
|
-
}
|
|
1108
|
-
if (!Y && (v != null && v.length)) {
|
|
1109
|
-
const y = Date.parse(v);
|
|
1110
|
-
if (y) {
|
|
1111
|
-
const L = y - Date.now();
|
|
1112
|
-
L > 0 && Ce(L);
|
|
1110
|
+
const p = JSON.parse(I);
|
|
1111
|
+
p && typeof p == "object" && (p.verifyurl && (p.verifyurl = new URL(p.verifyurl, new URL(b)).toString()), Me(p));
|
|
1112
|
+
} catch (p) {
|
|
1113
|
+
k("unable to configure from X-Altcha-Config", p);
|
|
1113
1114
|
}
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
if (!D)
|
|
1120
|
-
if (m) {
|
|
1121
|
-
if (k("analytics enabled"), t(11, D = new _n(m)), f === void 0) {
|
|
1122
|
-
const r = m.getAttribute("action");
|
|
1123
|
-
r && t(19, f = r + "/beacon");
|
|
1115
|
+
if (!S && (g != null && g.length)) {
|
|
1116
|
+
const p = Date.parse(g);
|
|
1117
|
+
if (p) {
|
|
1118
|
+
const W = p - Date.now();
|
|
1119
|
+
W > 0 && ke(W);
|
|
1124
1120
|
}
|
|
1125
|
-
t(11, D.beaconUrl = f || null, D);
|
|
1126
|
-
} else
|
|
1127
|
-
k("analytics cannot be enabled - form element not found");
|
|
1128
|
-
}
|
|
1129
|
-
function Ye() {
|
|
1130
|
-
g && h && U === w.VERIFIED ? re() : Le(w.EXPIRED, u.expired);
|
|
1131
|
-
}
|
|
1132
|
-
async function At(r) {
|
|
1133
|
-
let d = null;
|
|
1134
|
-
if ("Worker" in window) {
|
|
1135
|
-
try {
|
|
1136
|
-
d = await zt(r.challenge, r.salt, r.algorithm, r.maxnumber);
|
|
1137
|
-
} catch (v) {
|
|
1138
|
-
k(v);
|
|
1139
1121
|
}
|
|
1140
|
-
|
|
1141
|
-
return { data: r, solution: d };
|
|
1122
|
+
return P;
|
|
1142
1123
|
}
|
|
1143
|
-
return {
|
|
1144
|
-
data: r,
|
|
1145
|
-
solution: await yn(r.challenge, r.salt, r.algorithm, r.maxnumber || x).promise
|
|
1146
|
-
};
|
|
1147
|
-
}
|
|
1148
|
-
async function zt(r, d, v, z = typeof H == "number" ? H : x, Z = Math.ceil(ue)) {
|
|
1149
|
-
const M = [];
|
|
1150
|
-
Z = Math.min(16, Math.max(1, Z));
|
|
1151
|
-
for (let L = 0; L < Z; L++)
|
|
1152
|
-
M.push(createAltchaWorker(ke));
|
|
1153
|
-
const W = Math.ceil(z / Z), y = await Promise.all(M.map((L, Ne) => {
|
|
1154
|
-
const de = Ne * W;
|
|
1155
|
-
return new Promise((Re) => {
|
|
1156
|
-
L.addEventListener("message", (Ie) => {
|
|
1157
|
-
if (Ie.data)
|
|
1158
|
-
for (const he of M)
|
|
1159
|
-
he !== L && he.postMessage({ type: "abort" });
|
|
1160
|
-
Re(Ie.data);
|
|
1161
|
-
}), L.postMessage({
|
|
1162
|
-
payload: {
|
|
1163
|
-
alg: v,
|
|
1164
|
-
challenge: r,
|
|
1165
|
-
max: de + W,
|
|
1166
|
-
salt: d,
|
|
1167
|
-
start: de
|
|
1168
|
-
},
|
|
1169
|
-
type: "work"
|
|
1170
|
-
});
|
|
1171
|
-
});
|
|
1172
|
-
}));
|
|
1173
|
-
for (const L of M)
|
|
1174
|
-
L.terminate();
|
|
1175
|
-
return y.find((L) => !!L) || null;
|
|
1176
|
-
}
|
|
1177
|
-
function Ft() {
|
|
1178
|
-
[w.UNVERIFIED, w.ERROR, w.EXPIRED].includes(U) ? p && (m == null ? void 0 : m.reportValidity()) === !1 ? t(8, Q = !1) : re() : t(8, Q = !0);
|
|
1179
|
-
}
|
|
1180
|
-
function Ke(r) {
|
|
1181
|
-
const d = r.target;
|
|
1182
|
-
b && d && !C.contains(d) && U === w.VERIFIED && t(9, C.style.display = "none", C);
|
|
1183
|
-
}
|
|
1184
|
-
function Je() {
|
|
1185
|
-
b && Te();
|
|
1186
|
-
}
|
|
1187
|
-
function $e() {
|
|
1188
|
-
U === w.VERIFYING && u.waitAlert && alert(u.waitAlert);
|
|
1189
|
-
}
|
|
1190
|
-
function Tt(r) {
|
|
1191
|
-
D && D.trackError(xe);
|
|
1192
|
-
}
|
|
1193
|
-
function Nt(r) {
|
|
1194
|
-
b && U !== w.UNVERIFIED && requestAnimationFrame(() => {
|
|
1195
|
-
Te();
|
|
1196
|
-
});
|
|
1197
|
-
}
|
|
1198
|
-
function qe() {
|
|
1199
|
-
b && Te();
|
|
1200
|
-
}
|
|
1201
|
-
function Ce(r) {
|
|
1202
|
-
k("expire", r), P && (clearTimeout(P), P = null), r < 1 ? Ye() : P = setTimeout(Ye, r);
|
|
1203
|
-
}
|
|
1204
|
-
function Qe(r) {
|
|
1205
|
-
k("floating", r), b !== r && (t(9, C.style.left = "", C), t(9, C.style.top = "", C)), t(1, b = r === !0 || r === "" ? "auto" : r === !1 || r === "false" ? void 0 : b), b ? (l || t(0, l = "onsubmit"), document.addEventListener("scroll", Je), document.addEventListener("click", Ke), window.addEventListener("resize", qe)) : l === "onsubmit" && t(0, l = void 0);
|
|
1206
|
-
}
|
|
1207
|
-
function St(r) {
|
|
1208
|
-
var v;
|
|
1209
|
-
const d = m == null ? void 0 : m.querySelector(typeof r == "string" ? `input[name="${r}"]` : 'input[type="email"]:not([data-no-spamfilter])');
|
|
1210
|
-
return ((v = d == null ? void 0 : d.value) == null ? void 0 : v.slice(d.value.indexOf("@"))) || void 0;
|
|
1211
|
-
}
|
|
1212
|
-
function Mt(r) {
|
|
1213
|
-
return [
|
|
1214
|
-
...(m == null ? void 0 : m.querySelectorAll(r != null && r.length ? r.map((v) => `input[name="${v}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
|
|
1215
|
-
].reduce(
|
|
1216
|
-
(v, z) => {
|
|
1217
|
-
const Z = z.name, M = z.value;
|
|
1218
|
-
return Z && M && (v[Z] = /\n/.test(M) ? M.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
|
|
1219
|
-
`) : M), v;
|
|
1220
|
-
},
|
|
1221
|
-
{}
|
|
1222
|
-
);
|
|
1223
1124
|
}
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
const d = { payload: r };
|
|
1229
|
-
if (p) {
|
|
1230
|
-
const { blockedCountries: Z, classifier: M, disableRules: W, email: y, expectedLanguages: L, expectedCountries: Ne, fields: de, ipAddress: Re, text: Ie, timeZone: he } = Dt();
|
|
1231
|
-
d.blockedCountries = Z, d.classifier = M, d.disableRules = W, d.email = y === !1 ? void 0 : St(y), d.expectedCountries = Ne, d.expectedLanguages = L || (Ve ? [Ve] : void 0), d.fields = de === !1 ? void 0 : Mt(de), d.ipAddress = Re === !1 ? void 0 : Re || "auto", d.text = Ie, d.timeZone = he === !1 ? void 0 : he || Lt();
|
|
1232
|
-
}
|
|
1233
|
-
const v = await fetch(ee, {
|
|
1234
|
-
body: JSON.stringify(d),
|
|
1235
|
-
headers: { "content-type": "application/json" },
|
|
1236
|
-
method: "POST"
|
|
1237
|
-
});
|
|
1238
|
-
if (v.status !== 200)
|
|
1239
|
-
throw new Error(`Server responded with ${v.status}.`);
|
|
1240
|
-
const z = await v.json();
|
|
1241
|
-
if (z != null && z.payload && t(6, ne = z.payload), Fe("serververification", z), B && z.classification === "BAD")
|
|
1242
|
-
throw new Error("SpamFilter returned negative classification.");
|
|
1125
|
+
function Ct(r) {
|
|
1126
|
+
var g;
|
|
1127
|
+
const c = v == null ? void 0 : v.querySelector(typeof r == "string" ? `input[name="${r}"]` : 'input[type="email"]:not([data-no-spamfilter])');
|
|
1128
|
+
return ((g = c == null ? void 0 : c.value) == null ? void 0 : g.slice(c.value.indexOf("@"))) || void 0;
|
|
1243
1129
|
}
|
|
1244
|
-
function
|
|
1245
|
-
return
|
|
1130
|
+
function It() {
|
|
1131
|
+
return _ === "ipAddress" ? {
|
|
1246
1132
|
blockedCountries: void 0,
|
|
1247
1133
|
classifier: void 0,
|
|
1248
1134
|
disableRules: void 0,
|
|
@@ -1253,7 +1139,7 @@ function In(n, e, t) {
|
|
|
1253
1139
|
ipAddress: void 0,
|
|
1254
1140
|
text: void 0,
|
|
1255
1141
|
timeZone: void 0
|
|
1256
|
-
} : typeof
|
|
1142
|
+
} : typeof _ == "object" ? _ : {
|
|
1257
1143
|
blockedCountries: void 0,
|
|
1258
1144
|
classifier: void 0,
|
|
1259
1145
|
disableRules: void 0,
|
|
@@ -1266,316 +1152,578 @@ function In(n, e, t) {
|
|
|
1266
1152
|
timeZone: void 0
|
|
1267
1153
|
};
|
|
1268
1154
|
}
|
|
1269
|
-
function
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1155
|
+
function Lt(r) {
|
|
1156
|
+
return [
|
|
1157
|
+
...(v == null ? void 0 : v.querySelectorAll(r != null && r.length ? r.map((g) => `input[name="${g}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
|
|
1158
|
+
].reduce(
|
|
1159
|
+
(g, I) => {
|
|
1160
|
+
const P = I.name, F = I.value;
|
|
1161
|
+
return P && F && (g[P] = /\n/.test(F) ? F.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
|
|
1162
|
+
`) : F), g;
|
|
1163
|
+
},
|
|
1164
|
+
{}
|
|
1165
|
+
);
|
|
1166
|
+
}
|
|
1167
|
+
function Nt() {
|
|
1168
|
+
const r = T !== void 0 ? T.split(",") : void 0;
|
|
1169
|
+
for (const c of globalThis.altchaPlugins)
|
|
1170
|
+
(!r || r.includes(c.pluginName)) && te.push(new c({
|
|
1171
|
+
el: E,
|
|
1172
|
+
clarify: ge,
|
|
1173
|
+
dispatch: de,
|
|
1174
|
+
getConfiguration: Be,
|
|
1175
|
+
getFloatingAnchor: Oe,
|
|
1176
|
+
getState: Je,
|
|
1177
|
+
log: k,
|
|
1178
|
+
reset: me,
|
|
1179
|
+
solve: Ke,
|
|
1180
|
+
setState: $e,
|
|
1181
|
+
setFloatingAnchor: Qe,
|
|
1182
|
+
verify: ne
|
|
1183
|
+
}));
|
|
1184
|
+
}
|
|
1185
|
+
function k(...r) {
|
|
1186
|
+
(D || r.some((c) => c instanceof Error)) && console[r[0] instanceof Error ? "error" : "log"]("ALTCHA", `[name=${q}]`, ...r);
|
|
1187
|
+
}
|
|
1188
|
+
function zt() {
|
|
1189
|
+
[m.UNVERIFIED, m.ERROR, m.EXPIRED].includes(R) ? _ && (v == null ? void 0 : v.reportValidity()) === !1 ? t(8, re = !1) : x ? ge() : ne() : t(8, re = !0);
|
|
1190
|
+
}
|
|
1191
|
+
function He(r) {
|
|
1192
|
+
const c = r.target;
|
|
1193
|
+
N && c && !E.contains(c) && (R === m.VERIFIED || f === "off" && R === m.UNVERIFIED) && t(9, E.style.display = "none", E);
|
|
1194
|
+
}
|
|
1195
|
+
function Ye() {
|
|
1196
|
+
N && R !== m.UNVERIFIED && _e();
|
|
1197
|
+
}
|
|
1198
|
+
function St(r) {
|
|
1199
|
+
for (const c of te)
|
|
1200
|
+
typeof c.onErrorChange == "function" && c.onErrorChange(he);
|
|
1201
|
+
}
|
|
1202
|
+
function Xe(r) {
|
|
1203
|
+
R === m.UNVERIFIED && ne();
|
|
1204
|
+
}
|
|
1205
|
+
function Fe(r) {
|
|
1206
|
+
v && f === "onsubmit" ? R === m.UNVERIFIED ? (r.preventDefault(), r.stopPropagation(), ne().then(() => {
|
|
1207
|
+
v == null || v.requestSubmit();
|
|
1208
|
+
})) : R !== m.VERIFIED && (r.preventDefault(), r.stopPropagation(), R === m.VERIFYING && je()) : v && N && f === "off" && R === m.UNVERIFIED && (r.preventDefault(), r.stopPropagation(), t(9, E.style.display = "block", E), _e());
|
|
1209
|
+
}
|
|
1210
|
+
function De() {
|
|
1211
|
+
me();
|
|
1212
|
+
}
|
|
1213
|
+
function je() {
|
|
1214
|
+
R === m.VERIFYING && s.waitAlert && alert(s.waitAlert);
|
|
1215
|
+
}
|
|
1216
|
+
function At(r) {
|
|
1217
|
+
for (const c of te)
|
|
1218
|
+
typeof c.onStateChange == "function" && c.onStateChange(R);
|
|
1219
|
+
N && R !== m.UNVERIFIED && requestAnimationFrame(() => {
|
|
1220
|
+
_e();
|
|
1221
|
+
}), t(8, re = R === m.VERIFIED);
|
|
1222
|
+
}
|
|
1223
|
+
function Pe() {
|
|
1224
|
+
N && _e();
|
|
1225
|
+
}
|
|
1226
|
+
function _e(r = 20) {
|
|
1227
|
+
if (E)
|
|
1228
|
+
if (se || (se = (O ? document.querySelector(O) : v == null ? void 0 : v.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || v), se) {
|
|
1229
|
+
const c = parseInt(J, 10) || 12, g = se.getBoundingClientRect(), I = E.getBoundingClientRect(), P = document.documentElement.clientHeight, F = document.documentElement.clientWidth, V = N === "auto" ? g.bottom + I.height + c + r > P : N === "top", p = Math.max(r, Math.min(F - r - I.width, g.left + g.width / 2 - I.width / 2));
|
|
1230
|
+
if (V ? t(9, E.style.top = `${g.top - (I.height + c)}px`, E) : t(9, E.style.top = `${g.bottom + c}px`, E), t(9, E.style.left = `${p}px`, E), E.setAttribute("data-floating", V ? "top" : "bottom"), ie) {
|
|
1231
|
+
const W = ie.getBoundingClientRect();
|
|
1232
|
+
t(10, ie.style.left = g.left - p + g.width / 2 - W.width / 2 + "px", ie);
|
|
1276
1233
|
}
|
|
1277
1234
|
} else
|
|
1278
1235
|
k("unable to find floating anchor element");
|
|
1279
1236
|
}
|
|
1280
|
-
function
|
|
1281
|
-
|
|
1237
|
+
async function Tt(r) {
|
|
1238
|
+
if (!ee)
|
|
1239
|
+
throw new Error("Attribute verifyurl not set.");
|
|
1240
|
+
k("requesting server verification from", ee);
|
|
1241
|
+
const c = { payload: r };
|
|
1242
|
+
if (_) {
|
|
1243
|
+
const { blockedCountries: P, classifier: F, disableRules: V, email: p, expectedLanguages: W, expectedCountries: Ie, fields: be, ipAddress: ye, text: Xt, timeZone: tt } = It();
|
|
1244
|
+
c.blockedCountries = P, c.classifier = F, c.disableRules = V, c.email = p === !1 ? void 0 : Ct(p), c.expectedCountries = Ie, c.expectedLanguages = W || (Ze ? [Ze] : void 0), c.fields = be === !1 ? void 0 : Lt(be), c.ipAddress = ye === !1 ? void 0 : ye || "auto", c.text = Xt, c.timeZone = tt === !1 ? void 0 : tt || xn();
|
|
1245
|
+
}
|
|
1246
|
+
const g = await fetch(ee, {
|
|
1247
|
+
body: JSON.stringify(c),
|
|
1248
|
+
headers: { "content-type": "application/json" },
|
|
1249
|
+
method: "POST"
|
|
1250
|
+
});
|
|
1251
|
+
if (g.status !== 200)
|
|
1252
|
+
throw new Error(`Server responded with ${g.status}.`);
|
|
1253
|
+
const I = await g.json();
|
|
1254
|
+
if (I != null && I.payload && t(6, oe = I.payload), de("serververification", I), C && I.classification === "BAD")
|
|
1255
|
+
throw new Error("SpamFilter returned negative classification.");
|
|
1256
|
+
}
|
|
1257
|
+
function ke(r) {
|
|
1258
|
+
k("expire", r), B && (clearTimeout(B), B = null), r < 1 ? Ge() : B = setTimeout(Ge, r);
|
|
1282
1259
|
}
|
|
1283
|
-
function
|
|
1284
|
-
|
|
1260
|
+
function We(r) {
|
|
1261
|
+
k("floating", r), N !== r && (t(9, E.style.left = "", E), t(9, E.style.top = "", E)), t(1, N = r === !0 || r === "" ? "auto" : r === !1 || r === "false" ? void 0 : N), N ? (f || t(0, f = "onsubmit"), document.addEventListener("scroll", Ye), document.addEventListener("click", He), window.addEventListener("resize", Pe)) : f === "onsubmit" && t(0, f = void 0);
|
|
1285
1262
|
}
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1263
|
+
function Ue(r) {
|
|
1264
|
+
if (!r.algorithm)
|
|
1265
|
+
throw new Error("Invalid challenge. Property algorithm is missing.");
|
|
1266
|
+
if (r.signature === void 0)
|
|
1267
|
+
throw new Error("Invalid challenge. Property signature is missing.");
|
|
1268
|
+
if (!Te.includes(r.algorithm.toUpperCase()))
|
|
1269
|
+
throw new Error(`Unknown algorithm value. Allowed values: ${Te.join(", ")}`);
|
|
1270
|
+
if (!r.challenge || r.challenge.length < 40)
|
|
1271
|
+
throw new Error("Challenge is too short. Min. 40 chars.");
|
|
1272
|
+
if (!r.salt || r.salt.length < 10)
|
|
1273
|
+
throw new Error("Salt is too short. Min. 10 chars.");
|
|
1274
|
+
}
|
|
1275
|
+
async function Ke(r) {
|
|
1276
|
+
let c = null;
|
|
1277
|
+
if ("Worker" in window) {
|
|
1278
|
+
try {
|
|
1279
|
+
c = await Zt(r, r.maxnumber);
|
|
1280
|
+
} catch (g) {
|
|
1281
|
+
k(g);
|
|
1282
|
+
}
|
|
1283
|
+
if ((c == null ? void 0 : c.number) !== void 0 || "obfuscated" in r)
|
|
1284
|
+
return { data: r, solution: c };
|
|
1285
|
+
}
|
|
1286
|
+
if ("obfuscated" in r) {
|
|
1287
|
+
const g = await Cn(r.obfuscated, r.key, r.maxnumber);
|
|
1288
|
+
return { data: r, solution: await g.promise };
|
|
1289
|
+
}
|
|
1290
|
+
return {
|
|
1291
|
+
data: r,
|
|
1292
|
+
solution: await kn(r.challenge, r.salt, r.algorithm, r.maxnumber || K).promise
|
|
1293
|
+
};
|
|
1294
|
+
}
|
|
1295
|
+
async function Zt(r, c = typeof y == "number" ? y : K, g = Math.ceil(le)) {
|
|
1296
|
+
const I = [];
|
|
1297
|
+
g = Math.min(16, Math.max(1, g));
|
|
1298
|
+
for (let V = 0; V < g; V++)
|
|
1299
|
+
I.push(altchaCreateWorker(ue));
|
|
1300
|
+
const P = Math.ceil(c / g), F = await Promise.all(I.map((V, p) => {
|
|
1301
|
+
const W = p * P;
|
|
1302
|
+
return new Promise((Ie) => {
|
|
1303
|
+
V.addEventListener("message", (be) => {
|
|
1304
|
+
if (be.data)
|
|
1305
|
+
for (const ye of I)
|
|
1306
|
+
ye !== V && ye.postMessage({ type: "abort" });
|
|
1307
|
+
Ie(be.data);
|
|
1308
|
+
}), V.postMessage({
|
|
1309
|
+
payload: r,
|
|
1310
|
+
max: W + P,
|
|
1311
|
+
start: W,
|
|
1312
|
+
type: "work"
|
|
1313
|
+
});
|
|
1314
|
+
});
|
|
1315
|
+
}));
|
|
1316
|
+
for (const V of I)
|
|
1317
|
+
V.terminate();
|
|
1318
|
+
return F.find((V) => !!V) || null;
|
|
1319
|
+
}
|
|
1320
|
+
async function ge() {
|
|
1321
|
+
if (!x) {
|
|
1322
|
+
t(7, R = m.ERROR);
|
|
1323
|
+
return;
|
|
1324
|
+
}
|
|
1325
|
+
const r = te.find((c) => c.constructor.pluginName === "obfuscation");
|
|
1326
|
+
if (!r || !("clarify" in r)) {
|
|
1327
|
+
t(7, R = m.ERROR), k("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");
|
|
1328
|
+
return;
|
|
1329
|
+
}
|
|
1330
|
+
if ("clarify" in r && typeof r.clarify == "function")
|
|
1331
|
+
return r.clarify();
|
|
1332
|
+
}
|
|
1333
|
+
function Me(r) {
|
|
1334
|
+
r.obfuscated !== void 0 && t(24, x = r.obfuscated), r.auto !== void 0 && (t(0, f = r.auto), f === "onload" && (x ? ge() : ne())), r.blockspam !== void 0 && t(16, C = !!r.blockspam), r.floatinganchor !== void 0 && t(20, O = r.floatinganchor), r.delay !== void 0 && t(18, j = r.delay), r.floatingoffset !== void 0 && t(21, J = r.floatingoffset), r.floating !== void 0 && We(r.floating), r.expire !== void 0 && (ke(r.expire), t(19, S = r.expire)), r.challenge && (Ue(r.challenge), o = r.challenge), r.challengeurl !== void 0 && t(15, b = r.challengeurl), r.debug !== void 0 && t(17, D = !!r.debug), r.hidefooter !== void 0 && t(2, G = !!r.hidefooter), r.hidelogo !== void 0 && t(3, A = !!r.hidelogo), r.maxnumber !== void 0 && t(22, K = +r.maxnumber), r.mockerror !== void 0 && t(23, H = !!r.mockerror), r.name !== void 0 && t(4, q = r.name), r.refetchonexpire !== void 0 && t(25, z = !!r.refetchonexpire), r.spamfilter !== void 0 && t(26, _ = typeof r.spamfilter == "object" ? r.spamfilter : !!r.spamfilter), r.strings && t(44, l = r.strings), r.test !== void 0 && t(27, y = typeof r.test == "number" ? r.test : !!r.test), r.verifyurl !== void 0 && t(28, ee = r.verifyurl), r.workers !== void 0 && t(29, le = +r.workers), r.workerurl !== void 0 && t(30, ue = r.workerurl);
|
|
1335
|
+
}
|
|
1336
|
+
function Be() {
|
|
1337
|
+
return {
|
|
1338
|
+
auto: f,
|
|
1339
|
+
blockspam: C,
|
|
1340
|
+
challengeurl: b,
|
|
1341
|
+
debug: D,
|
|
1342
|
+
delay: j,
|
|
1343
|
+
expire: S,
|
|
1344
|
+
floating: N,
|
|
1345
|
+
floatinganchor: O,
|
|
1346
|
+
floatingoffset: J,
|
|
1347
|
+
hidefooter: G,
|
|
1348
|
+
hidelogo: A,
|
|
1349
|
+
name: q,
|
|
1350
|
+
maxnumber: K,
|
|
1351
|
+
mockerror: H,
|
|
1352
|
+
obfuscated: x,
|
|
1353
|
+
refetchonexpire: z,
|
|
1354
|
+
spamfilter: _,
|
|
1355
|
+
strings: s,
|
|
1356
|
+
test: y,
|
|
1357
|
+
verifyurl: ee,
|
|
1358
|
+
workers: le,
|
|
1359
|
+
workerurl: ue
|
|
1360
|
+
};
|
|
1361
|
+
}
|
|
1362
|
+
function Oe() {
|
|
1363
|
+
return se;
|
|
1364
|
+
}
|
|
1365
|
+
function Vt(r) {
|
|
1366
|
+
return te.find((c) => c.constructor.pluginName === r);
|
|
1367
|
+
}
|
|
1368
|
+
function Je() {
|
|
1369
|
+
return R;
|
|
1370
|
+
}
|
|
1371
|
+
function me(r = m.UNVERIFIED, c = null) {
|
|
1372
|
+
B && (clearTimeout(B), B = null), t(8, re = !1), t(5, he = c), t(6, oe = null), t(7, R = r);
|
|
1373
|
+
}
|
|
1374
|
+
function Qe(r) {
|
|
1375
|
+
se = r;
|
|
1376
|
+
}
|
|
1377
|
+
function $e(r, c = null) {
|
|
1378
|
+
t(7, R = r), t(5, he = c);
|
|
1379
|
+
}
|
|
1380
|
+
async function ne() {
|
|
1381
|
+
return me(m.VERIFYING), await new Promise((r) => setTimeout(r, j || 0)), Rt().then((r) => (Ue(r), k("challenge", r), Ke(r))).then(({ data: r, solution: c }) => {
|
|
1382
|
+
if (k("solution", c), "challenge" in r && c && !("clearText" in c))
|
|
1383
|
+
if ((c == null ? void 0 : c.number) !== void 0) {
|
|
1384
|
+
if (ee)
|
|
1385
|
+
return Tt(Ve(r, c));
|
|
1386
|
+
t(6, oe = Ve(r, c)), k("payload", oe);
|
|
1387
|
+
} else
|
|
1388
|
+
throw k("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
|
|
1294
1389
|
}).then(() => {
|
|
1295
|
-
|
|
1296
|
-
t(7,
|
|
1390
|
+
cn().then(() => {
|
|
1391
|
+
t(7, R = m.VERIFIED), k("verified"), de("verified", { payload: oe });
|
|
1297
1392
|
});
|
|
1298
1393
|
}).catch((r) => {
|
|
1299
|
-
k(r), t(7,
|
|
1394
|
+
k(r), t(7, R = m.ERROR), t(5, he = r.message);
|
|
1300
1395
|
});
|
|
1301
1396
|
}
|
|
1302
|
-
function
|
|
1303
|
-
|
|
1397
|
+
function Gt() {
|
|
1398
|
+
re = this.checked, t(8, re);
|
|
1304
1399
|
}
|
|
1305
|
-
function
|
|
1306
|
-
|
|
1307
|
-
|
|
1400
|
+
function Ht(r) {
|
|
1401
|
+
Ce[r ? "unshift" : "push"](() => {
|
|
1402
|
+
ie = r, t(10, ie);
|
|
1308
1403
|
});
|
|
1309
1404
|
}
|
|
1310
|
-
function
|
|
1311
|
-
|
|
1312
|
-
|
|
1405
|
+
function Yt(r) {
|
|
1406
|
+
Ce[r ? "unshift" : "push"](() => {
|
|
1407
|
+
E = r, t(9, E);
|
|
1313
1408
|
});
|
|
1314
1409
|
}
|
|
1315
1410
|
return n.$$set = (r) => {
|
|
1316
|
-
"
|
|
1411
|
+
"auto" in r && t(0, f = r.auto), "blockspam" in r && t(16, C = r.blockspam), "challengeurl" in r && t(15, b = r.challengeurl), "challengejson" in r && t(31, M = r.challengejson), "debug" in r && t(17, D = r.debug), "delay" in r && t(18, j = r.delay), "expire" in r && t(19, S = r.expire), "floating" in r && t(1, N = r.floating), "floatinganchor" in r && t(20, O = r.floatinganchor), "floatingoffset" in r && t(21, J = r.floatingoffset), "hidefooter" in r && t(2, G = r.hidefooter), "hidelogo" in r && t(3, A = r.hidelogo), "name" in r && t(4, q = r.name), "maxnumber" in r && t(22, K = r.maxnumber), "mockerror" in r && t(23, H = r.mockerror), "obfuscated" in r && t(24, x = r.obfuscated), "plugins" in r && t(32, T = r.plugins), "refetchonexpire" in r && t(25, z = r.refetchonexpire), "spamfilter" in r && t(26, _ = r.spamfilter), "strings" in r && t(33, u = r.strings), "test" in r && t(27, y = r.test), "verifyurl" in r && t(28, ee = r.verifyurl), "workers" in r && t(29, le = r.workers), "workerurl" in r && t(30, ue = r.workerurl), "$$scope" in r && t(45, h = r.$$scope);
|
|
1317
1412
|
}, n.$$.update = () => {
|
|
1318
1413
|
n.$$.dirty[0] & /*challengeurl*/
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
ariaLinkLabel:
|
|
1414
|
+
32768 && t(12, i = !!(b != null && b.includes(".altcha.org")) && !!(b != null && b.includes("apiKey=ckey_"))), n.$$.dirty[1] & /*challengejson*/
|
|
1415
|
+
1 && (o = M ? dt(M) : void 0), n.$$.dirty[1] & /*strings*/
|
|
1416
|
+
4 && t(44, l = u ? dt(u) : {}), n.$$.dirty[1] & /*parsedStrings*/
|
|
1417
|
+
8192 && t(11, s = {
|
|
1418
|
+
ariaLinkLabel: ut,
|
|
1324
1419
|
error: "Verification failed. Try again later.",
|
|
1325
1420
|
expired: "Verification expired. Try again.",
|
|
1326
|
-
footer: `Protected by <a href="${
|
|
1421
|
+
footer: `Protected by <a href="${xt}" target="_blank" aria-label="${l.ariaLinkLabel || ut}">ALTCHA</a>`,
|
|
1327
1422
|
label: "I'm not a robot",
|
|
1328
1423
|
verified: "Verified",
|
|
1329
1424
|
verifying: "Verifying...",
|
|
1330
1425
|
waitAlert: "Verifying... please wait.",
|
|
1331
|
-
...
|
|
1426
|
+
...l
|
|
1332
1427
|
}), n.$$.dirty[0] & /*payload, state*/
|
|
1333
|
-
192 &&
|
|
1334
|
-
32 &&
|
|
1335
|
-
128 &&
|
|
1428
|
+
192 && de("statechange", { payload: oe, state: R }), n.$$.dirty[0] & /*error*/
|
|
1429
|
+
32 && St(), n.$$.dirty[0] & /*state*/
|
|
1430
|
+
128 && At();
|
|
1336
1431
|
}, [
|
|
1337
|
-
|
|
1432
|
+
f,
|
|
1433
|
+
N,
|
|
1434
|
+
G,
|
|
1435
|
+
A,
|
|
1436
|
+
q,
|
|
1437
|
+
he,
|
|
1438
|
+
oe,
|
|
1439
|
+
R,
|
|
1440
|
+
re,
|
|
1441
|
+
E,
|
|
1442
|
+
ie,
|
|
1443
|
+
s,
|
|
1444
|
+
i,
|
|
1445
|
+
zt,
|
|
1446
|
+
je,
|
|
1338
1447
|
b,
|
|
1339
|
-
j,
|
|
1340
|
-
I,
|
|
1341
|
-
F,
|
|
1342
|
-
xe,
|
|
1343
|
-
ne,
|
|
1344
|
-
U,
|
|
1345
|
-
Q,
|
|
1346
1448
|
C,
|
|
1347
|
-
te,
|
|
1348
1449
|
D,
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
i,
|
|
1352
|
-
Ft,
|
|
1353
|
-
$e,
|
|
1354
|
-
g,
|
|
1355
|
-
c,
|
|
1356
|
-
f,
|
|
1450
|
+
j,
|
|
1451
|
+
S,
|
|
1357
1452
|
O,
|
|
1358
|
-
|
|
1359
|
-
Y,
|
|
1360
|
-
q,
|
|
1453
|
+
J,
|
|
1361
1454
|
K,
|
|
1362
|
-
x,
|
|
1363
|
-
A,
|
|
1364
|
-
h,
|
|
1365
|
-
p,
|
|
1366
1455
|
H,
|
|
1456
|
+
x,
|
|
1457
|
+
z,
|
|
1458
|
+
_,
|
|
1459
|
+
y,
|
|
1367
1460
|
ee,
|
|
1461
|
+
le,
|
|
1368
1462
|
ue,
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1463
|
+
M,
|
|
1464
|
+
T,
|
|
1465
|
+
u,
|
|
1466
|
+
ge,
|
|
1467
|
+
Me,
|
|
1468
|
+
Be,
|
|
1469
|
+
Oe,
|
|
1470
|
+
Vt,
|
|
1471
|
+
Je,
|
|
1472
|
+
me,
|
|
1473
|
+
Qe,
|
|
1474
|
+
$e,
|
|
1475
|
+
ne,
|
|
1476
|
+
l,
|
|
1477
|
+
h,
|
|
1478
|
+
d,
|
|
1479
|
+
Gt,
|
|
1480
|
+
Ht,
|
|
1481
|
+
Yt
|
|
1380
1482
|
];
|
|
1381
1483
|
}
|
|
1382
|
-
class
|
|
1484
|
+
class Vn extends vn {
|
|
1383
1485
|
constructor(e) {
|
|
1384
|
-
super(),
|
|
1486
|
+
super(), bn(
|
|
1385
1487
|
this,
|
|
1386
1488
|
e,
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1489
|
+
Zn,
|
|
1490
|
+
Tn,
|
|
1491
|
+
Ut,
|
|
1390
1492
|
{
|
|
1391
|
-
analytics: 18,
|
|
1392
1493
|
auto: 0,
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
expire: 22,
|
|
1494
|
+
blockspam: 16,
|
|
1495
|
+
challengeurl: 15,
|
|
1496
|
+
challengejson: 31,
|
|
1497
|
+
debug: 17,
|
|
1498
|
+
delay: 18,
|
|
1499
|
+
expire: 19,
|
|
1400
1500
|
floating: 1,
|
|
1401
|
-
floatinganchor:
|
|
1402
|
-
floatingoffset:
|
|
1501
|
+
floatinganchor: 20,
|
|
1502
|
+
floatingoffset: 21,
|
|
1403
1503
|
hidefooter: 2,
|
|
1404
1504
|
hidelogo: 3,
|
|
1405
1505
|
name: 4,
|
|
1406
|
-
maxnumber:
|
|
1407
|
-
mockerror:
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1506
|
+
maxnumber: 22,
|
|
1507
|
+
mockerror: 23,
|
|
1508
|
+
obfuscated: 24,
|
|
1509
|
+
plugins: 32,
|
|
1510
|
+
refetchonexpire: 25,
|
|
1511
|
+
spamfilter: 26,
|
|
1512
|
+
strings: 33,
|
|
1513
|
+
test: 27,
|
|
1514
|
+
verifyurl: 28,
|
|
1515
|
+
workers: 29,
|
|
1516
|
+
workerurl: 30,
|
|
1517
|
+
clarify: 34,
|
|
1518
|
+
configure: 35,
|
|
1519
|
+
getConfiguration: 36,
|
|
1520
|
+
getFloatingAnchor: 37,
|
|
1521
|
+
getPlugin: 38,
|
|
1522
|
+
getState: 39,
|
|
1523
|
+
reset: 40,
|
|
1524
|
+
setFloatingAnchor: 41,
|
|
1525
|
+
setState: 42,
|
|
1526
|
+
verify: 43
|
|
1418
1527
|
},
|
|
1419
|
-
|
|
1528
|
+
In,
|
|
1420
1529
|
[-1, -1, -1]
|
|
1421
1530
|
);
|
|
1422
1531
|
}
|
|
1423
|
-
get analytics() {
|
|
1424
|
-
return this.$$.ctx[18];
|
|
1425
|
-
}
|
|
1426
|
-
set analytics(e) {
|
|
1427
|
-
this.$$set({ analytics: e }), _();
|
|
1428
|
-
}
|
|
1429
1532
|
get auto() {
|
|
1430
1533
|
return this.$$.ctx[0];
|
|
1431
1534
|
}
|
|
1432
1535
|
set auto(e) {
|
|
1433
|
-
this.$$set({ auto: e }),
|
|
1434
|
-
}
|
|
1435
|
-
get beaconurl() {
|
|
1436
|
-
return this.$$.ctx[19];
|
|
1437
|
-
}
|
|
1438
|
-
set beaconurl(e) {
|
|
1439
|
-
this.$$set({ beaconurl: e }), _();
|
|
1536
|
+
this.$$set({ auto: e }), w();
|
|
1440
1537
|
}
|
|
1441
1538
|
get blockspam() {
|
|
1442
|
-
return this.$$.ctx[
|
|
1539
|
+
return this.$$.ctx[16];
|
|
1443
1540
|
}
|
|
1444
1541
|
set blockspam(e) {
|
|
1445
|
-
this.$$set({ blockspam: e }),
|
|
1542
|
+
this.$$set({ blockspam: e }), w();
|
|
1446
1543
|
}
|
|
1447
1544
|
get challengeurl() {
|
|
1448
|
-
return this.$$.ctx[
|
|
1545
|
+
return this.$$.ctx[15];
|
|
1449
1546
|
}
|
|
1450
1547
|
set challengeurl(e) {
|
|
1451
|
-
this.$$set({ challengeurl: e }),
|
|
1548
|
+
this.$$set({ challengeurl: e }), w();
|
|
1452
1549
|
}
|
|
1453
1550
|
get challengejson() {
|
|
1454
|
-
return this.$$.ctx[
|
|
1551
|
+
return this.$$.ctx[31];
|
|
1455
1552
|
}
|
|
1456
1553
|
set challengejson(e) {
|
|
1457
|
-
this.$$set({ challengejson: e }),
|
|
1554
|
+
this.$$set({ challengejson: e }), w();
|
|
1458
1555
|
}
|
|
1459
1556
|
get debug() {
|
|
1460
|
-
return this.$$.ctx[
|
|
1557
|
+
return this.$$.ctx[17];
|
|
1461
1558
|
}
|
|
1462
1559
|
set debug(e) {
|
|
1463
|
-
this.$$set({ debug: e }),
|
|
1560
|
+
this.$$set({ debug: e }), w();
|
|
1464
1561
|
}
|
|
1465
1562
|
get delay() {
|
|
1466
|
-
return this.$$.ctx[
|
|
1563
|
+
return this.$$.ctx[18];
|
|
1467
1564
|
}
|
|
1468
1565
|
set delay(e) {
|
|
1469
|
-
this.$$set({ delay: e }),
|
|
1566
|
+
this.$$set({ delay: e }), w();
|
|
1470
1567
|
}
|
|
1471
1568
|
get expire() {
|
|
1472
|
-
return this.$$.ctx[
|
|
1569
|
+
return this.$$.ctx[19];
|
|
1473
1570
|
}
|
|
1474
1571
|
set expire(e) {
|
|
1475
|
-
this.$$set({ expire: e }),
|
|
1572
|
+
this.$$set({ expire: e }), w();
|
|
1476
1573
|
}
|
|
1477
1574
|
get floating() {
|
|
1478
1575
|
return this.$$.ctx[1];
|
|
1479
1576
|
}
|
|
1480
1577
|
set floating(e) {
|
|
1481
|
-
this.$$set({ floating: e }),
|
|
1578
|
+
this.$$set({ floating: e }), w();
|
|
1482
1579
|
}
|
|
1483
1580
|
get floatinganchor() {
|
|
1484
|
-
return this.$$.ctx[
|
|
1581
|
+
return this.$$.ctx[20];
|
|
1485
1582
|
}
|
|
1486
1583
|
set floatinganchor(e) {
|
|
1487
|
-
this.$$set({ floatinganchor: e }),
|
|
1584
|
+
this.$$set({ floatinganchor: e }), w();
|
|
1488
1585
|
}
|
|
1489
1586
|
get floatingoffset() {
|
|
1490
|
-
return this.$$.ctx[
|
|
1587
|
+
return this.$$.ctx[21];
|
|
1491
1588
|
}
|
|
1492
1589
|
set floatingoffset(e) {
|
|
1493
|
-
this.$$set({ floatingoffset: e }),
|
|
1590
|
+
this.$$set({ floatingoffset: e }), w();
|
|
1494
1591
|
}
|
|
1495
1592
|
get hidefooter() {
|
|
1496
1593
|
return this.$$.ctx[2];
|
|
1497
1594
|
}
|
|
1498
1595
|
set hidefooter(e) {
|
|
1499
|
-
this.$$set({ hidefooter: e }),
|
|
1596
|
+
this.$$set({ hidefooter: e }), w();
|
|
1500
1597
|
}
|
|
1501
1598
|
get hidelogo() {
|
|
1502
1599
|
return this.$$.ctx[3];
|
|
1503
1600
|
}
|
|
1504
1601
|
set hidelogo(e) {
|
|
1505
|
-
this.$$set({ hidelogo: e }),
|
|
1602
|
+
this.$$set({ hidelogo: e }), w();
|
|
1506
1603
|
}
|
|
1507
1604
|
get name() {
|
|
1508
1605
|
return this.$$.ctx[4];
|
|
1509
1606
|
}
|
|
1510
1607
|
set name(e) {
|
|
1511
|
-
this.$$set({ name: e }),
|
|
1608
|
+
this.$$set({ name: e }), w();
|
|
1512
1609
|
}
|
|
1513
1610
|
get maxnumber() {
|
|
1514
|
-
return this.$$.ctx[
|
|
1611
|
+
return this.$$.ctx[22];
|
|
1515
1612
|
}
|
|
1516
1613
|
set maxnumber(e) {
|
|
1517
|
-
this.$$set({ maxnumber: e }),
|
|
1614
|
+
this.$$set({ maxnumber: e }), w();
|
|
1518
1615
|
}
|
|
1519
1616
|
get mockerror() {
|
|
1520
|
-
return this.$$.ctx[
|
|
1617
|
+
return this.$$.ctx[23];
|
|
1521
1618
|
}
|
|
1522
1619
|
set mockerror(e) {
|
|
1523
|
-
this.$$set({ mockerror: e }),
|
|
1620
|
+
this.$$set({ mockerror: e }), w();
|
|
1621
|
+
}
|
|
1622
|
+
get obfuscated() {
|
|
1623
|
+
return this.$$.ctx[24];
|
|
1624
|
+
}
|
|
1625
|
+
set obfuscated(e) {
|
|
1626
|
+
this.$$set({ obfuscated: e }), w();
|
|
1627
|
+
}
|
|
1628
|
+
get plugins() {
|
|
1629
|
+
return this.$$.ctx[32];
|
|
1630
|
+
}
|
|
1631
|
+
set plugins(e) {
|
|
1632
|
+
this.$$set({ plugins: e }), w();
|
|
1524
1633
|
}
|
|
1525
1634
|
get refetchonexpire() {
|
|
1526
|
-
return this.$$.ctx[
|
|
1635
|
+
return this.$$.ctx[25];
|
|
1527
1636
|
}
|
|
1528
1637
|
set refetchonexpire(e) {
|
|
1529
|
-
this.$$set({ refetchonexpire: e }),
|
|
1638
|
+
this.$$set({ refetchonexpire: e }), w();
|
|
1530
1639
|
}
|
|
1531
1640
|
get spamfilter() {
|
|
1532
|
-
return this.$$.ctx[
|
|
1641
|
+
return this.$$.ctx[26];
|
|
1533
1642
|
}
|
|
1534
1643
|
set spamfilter(e) {
|
|
1535
|
-
this.$$set({ spamfilter: e }),
|
|
1644
|
+
this.$$set({ spamfilter: e }), w();
|
|
1536
1645
|
}
|
|
1537
1646
|
get strings() {
|
|
1538
|
-
return this.$$.ctx[
|
|
1647
|
+
return this.$$.ctx[33];
|
|
1539
1648
|
}
|
|
1540
1649
|
set strings(e) {
|
|
1541
|
-
this.$$set({ strings: e }),
|
|
1650
|
+
this.$$set({ strings: e }), w();
|
|
1542
1651
|
}
|
|
1543
1652
|
get test() {
|
|
1544
|
-
return this.$$.ctx[
|
|
1653
|
+
return this.$$.ctx[27];
|
|
1545
1654
|
}
|
|
1546
1655
|
set test(e) {
|
|
1547
|
-
this.$$set({ test: e }),
|
|
1656
|
+
this.$$set({ test: e }), w();
|
|
1548
1657
|
}
|
|
1549
1658
|
get verifyurl() {
|
|
1550
|
-
return this.$$.ctx[
|
|
1659
|
+
return this.$$.ctx[28];
|
|
1551
1660
|
}
|
|
1552
1661
|
set verifyurl(e) {
|
|
1553
|
-
this.$$set({ verifyurl: e }),
|
|
1662
|
+
this.$$set({ verifyurl: e }), w();
|
|
1554
1663
|
}
|
|
1555
1664
|
get workers() {
|
|
1556
|
-
return this.$$.ctx[
|
|
1665
|
+
return this.$$.ctx[29];
|
|
1557
1666
|
}
|
|
1558
1667
|
set workers(e) {
|
|
1559
|
-
this.$$set({ workers: e }),
|
|
1668
|
+
this.$$set({ workers: e }), w();
|
|
1560
1669
|
}
|
|
1561
1670
|
get workerurl() {
|
|
1562
|
-
return this.$$.ctx[
|
|
1671
|
+
return this.$$.ctx[30];
|
|
1563
1672
|
}
|
|
1564
1673
|
set workerurl(e) {
|
|
1565
|
-
this.$$set({ workerurl: e }),
|
|
1674
|
+
this.$$set({ workerurl: e }), w();
|
|
1675
|
+
}
|
|
1676
|
+
get clarify() {
|
|
1677
|
+
return this.$$.ctx[34];
|
|
1566
1678
|
}
|
|
1567
1679
|
get configure() {
|
|
1680
|
+
return this.$$.ctx[35];
|
|
1681
|
+
}
|
|
1682
|
+
get getConfiguration() {
|
|
1568
1683
|
return this.$$.ctx[36];
|
|
1569
1684
|
}
|
|
1570
|
-
get
|
|
1685
|
+
get getFloatingAnchor() {
|
|
1571
1686
|
return this.$$.ctx[37];
|
|
1572
1687
|
}
|
|
1573
|
-
get
|
|
1688
|
+
get getPlugin() {
|
|
1574
1689
|
return this.$$.ctx[38];
|
|
1575
1690
|
}
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1691
|
+
get getState() {
|
|
1692
|
+
return this.$$.ctx[39];
|
|
1693
|
+
}
|
|
1694
|
+
get reset() {
|
|
1695
|
+
return this.$$.ctx[40];
|
|
1696
|
+
}
|
|
1697
|
+
get setFloatingAnchor() {
|
|
1698
|
+
return this.$$.ctx[41];
|
|
1699
|
+
}
|
|
1700
|
+
get setState() {
|
|
1701
|
+
return this.$$.ctx[42];
|
|
1702
|
+
}
|
|
1703
|
+
get verify() {
|
|
1704
|
+
return this.$$.ctx[43];
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
customElements.define("altcha-widget", yn(
|
|
1708
|
+
Vn,
|
|
1709
|
+
{ auto: {}, blockspam: {}, challengeurl: {}, challengejson: {}, debug: { type: "Boolean" }, delay: {}, expire: {}, floating: {}, floatinganchor: {}, floatingoffset: {}, hidefooter: { type: "Boolean" }, hidelogo: { type: "Boolean" }, name: {}, maxnumber: {}, mockerror: { type: "Boolean" }, obfuscated: {}, plugins: {}, refetchonexpire: { type: "Boolean" }, spamfilter: { type: "Boolean" }, strings: {}, test: { type: "Boolean" }, verifyurl: {}, workers: {}, workerurl: {} },
|
|
1710
|
+
["default"],
|
|
1711
|
+
[
|
|
1712
|
+
"clarify",
|
|
1713
|
+
"configure",
|
|
1714
|
+
"getConfiguration",
|
|
1715
|
+
"getFloatingAnchor",
|
|
1716
|
+
"getPlugin",
|
|
1717
|
+
"getState",
|
|
1718
|
+
"reset",
|
|
1719
|
+
"setFloatingAnchor",
|
|
1720
|
+
"setState",
|
|
1721
|
+
"verify"
|
|
1722
|
+
],
|
|
1723
|
+
!1
|
|
1724
|
+
));
|
|
1725
|
+
globalThis.altchaCreateWorker = (n) => n ? new Worker(new URL(n)) : new Pt();
|
|
1726
|
+
globalThis.altchaPlugins = globalThis.altchaPlugins || [];
|
|
1579
1727
|
export {
|
|
1580
|
-
|
|
1728
|
+
Vn as Altcha
|
|
1581
1729
|
};
|