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