altcha 0.6.2 → 0.6.4
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 +3 -2
- package/dist/altcha.d.ts +35 -0
- package/dist/altcha.js +568 -550
- package/dist/altcha.umd.cjs +2 -1
- package/dist_external/altcha.d.ts +35 -0
- package/dist_external/altcha.js +557 -539
- package/dist_external/altcha.umd.cjs +2 -1
- package/package.json +3 -3
package/dist_external/altcha.js
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
1
|
+
var yt = Object.defineProperty;
|
|
2
|
+
var vt = (n, e, t) => e in n ? yt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var O = (n, e, t) => vt(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
function ie() {
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function et(n) {
|
|
7
7
|
return n();
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function qe() {
|
|
10
10
|
return /* @__PURE__ */ Object.create(null);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
n.forEach(
|
|
12
|
+
function ue(n) {
|
|
13
|
+
n.forEach(et);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function tt(n) {
|
|
16
16
|
return typeof n == "function";
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function kt(n, e) {
|
|
19
19
|
return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Et(n) {
|
|
22
22
|
return Object.keys(n).length === 0;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function p(n, e) {
|
|
25
25
|
n.appendChild(e);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function F(n, e, t) {
|
|
28
28
|
n.insertBefore(e, t || null);
|
|
29
29
|
}
|
|
30
30
|
function D(n) {
|
|
31
31
|
n.parentNode && n.parentNode.removeChild(n);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function M(n) {
|
|
34
34
|
return document.createElement(n);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function Y(n) {
|
|
37
37
|
return document.createElementNS("http://www.w3.org/2000/svg", n);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function pt(n) {
|
|
40
40
|
return document.createTextNode(n);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return
|
|
42
|
+
function X() {
|
|
43
|
+
return pt(" ");
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function pe(n, e, t, i) {
|
|
46
46
|
return n.addEventListener(e, t, i), () => n.removeEventListener(e, t, i);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function s(n, e, t) {
|
|
49
49
|
t == null ? n.removeAttribute(e) : n.getAttribute(e) !== t && n.setAttribute(e, t);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function xt(n) {
|
|
52
52
|
return Array.from(n.childNodes);
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Ze(n, e, t) {
|
|
55
55
|
n.classList.toggle(e, !!t);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Ct(n, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
|
|
58
58
|
return new CustomEvent(n, { detail: e, bubbles: t, cancelable: i });
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function Lt(n) {
|
|
61
61
|
const e = {};
|
|
62
62
|
return n.childNodes.forEach(
|
|
63
63
|
/** @param {Element} node */
|
|
@@ -66,167 +66,167 @@ function xt(n) {
|
|
|
66
66
|
}
|
|
67
67
|
), e;
|
|
68
68
|
}
|
|
69
|
-
let
|
|
70
|
-
function
|
|
71
|
-
|
|
69
|
+
let ce;
|
|
70
|
+
function fe(n) {
|
|
71
|
+
ce = n;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
if (!
|
|
75
|
-
return
|
|
73
|
+
function Ie() {
|
|
74
|
+
if (!ce) throw new Error("Function called outside component initialization");
|
|
75
|
+
return ce;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
77
|
+
function It(n) {
|
|
78
|
+
Ie().$$.on_mount.push(n);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
|
|
80
|
+
function At(n) {
|
|
81
|
+
Ie().$$.on_destroy.push(n);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
const n =
|
|
83
|
+
function Rt() {
|
|
84
|
+
const n = Ie();
|
|
85
85
|
return (e, t, { cancelable: i = !1 } = {}) => {
|
|
86
86
|
const l = n.$$.callbacks[e];
|
|
87
87
|
if (l) {
|
|
88
|
-
const o =
|
|
88
|
+
const o = Ct(
|
|
89
89
|
/** @type {string} */
|
|
90
90
|
e,
|
|
91
91
|
t,
|
|
92
92
|
{ cancelable: i }
|
|
93
93
|
);
|
|
94
|
-
return l.slice().forEach((
|
|
95
|
-
|
|
94
|
+
return l.slice().forEach((f) => {
|
|
95
|
+
f.call(n, o);
|
|
96
96
|
}), !o.defaultPrevented;
|
|
97
97
|
}
|
|
98
98
|
return !0;
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
const
|
|
102
|
-
let
|
|
103
|
-
const
|
|
104
|
-
let
|
|
105
|
-
function
|
|
106
|
-
|
|
101
|
+
const ne = [], we = [];
|
|
102
|
+
let re = [];
|
|
103
|
+
const Ye = [], nt = /* @__PURE__ */ Promise.resolve();
|
|
104
|
+
let Ce = !1;
|
|
105
|
+
function rt() {
|
|
106
|
+
Ce || (Ce = !0, nt.then(y));
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
return
|
|
108
|
+
function $t() {
|
|
109
|
+
return rt(), nt;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
|
|
111
|
+
function Le(n) {
|
|
112
|
+
re.push(n);
|
|
113
113
|
}
|
|
114
|
-
const
|
|
115
|
-
let
|
|
116
|
-
function
|
|
117
|
-
if (
|
|
114
|
+
const xe = /* @__PURE__ */ new Set();
|
|
115
|
+
let te = 0;
|
|
116
|
+
function y() {
|
|
117
|
+
if (te !== 0)
|
|
118
118
|
return;
|
|
119
|
-
const n =
|
|
119
|
+
const n = ce;
|
|
120
120
|
do {
|
|
121
121
|
try {
|
|
122
|
-
for (;
|
|
123
|
-
const e = te
|
|
124
|
-
|
|
122
|
+
for (; te < ne.length; ) {
|
|
123
|
+
const e = ne[te];
|
|
124
|
+
te++, fe(e), Mt(e.$$);
|
|
125
125
|
}
|
|
126
126
|
} catch (e) {
|
|
127
|
-
throw
|
|
127
|
+
throw ne.length = 0, te = 0, e;
|
|
128
128
|
}
|
|
129
|
-
for (
|
|
130
|
-
for (let e = 0; e <
|
|
131
|
-
const t =
|
|
132
|
-
|
|
129
|
+
for (fe(null), ne.length = 0, te = 0; we.length; ) we.pop()();
|
|
130
|
+
for (let e = 0; e < re.length; e += 1) {
|
|
131
|
+
const t = re[e];
|
|
132
|
+
xe.has(t) || (xe.add(t), t());
|
|
133
133
|
}
|
|
134
|
-
|
|
135
|
-
} while (
|
|
136
|
-
for (;
|
|
137
|
-
|
|
138
|
-
|
|
134
|
+
re.length = 0;
|
|
135
|
+
} while (ne.length);
|
|
136
|
+
for (; Ye.length; )
|
|
137
|
+
Ye.pop()();
|
|
138
|
+
Ce = !1, xe.clear(), fe(n);
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function Mt(n) {
|
|
141
141
|
if (n.fragment !== null) {
|
|
142
|
-
n.update(),
|
|
142
|
+
n.update(), ue(n.before_update);
|
|
143
143
|
const e = n.dirty;
|
|
144
|
-
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(
|
|
144
|
+
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(Le);
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function St(n) {
|
|
148
148
|
const e = [], t = [];
|
|
149
|
-
|
|
149
|
+
re.forEach((i) => n.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), re = e;
|
|
150
150
|
}
|
|
151
|
-
const
|
|
152
|
-
function
|
|
153
|
-
n && n.i && (
|
|
151
|
+
const Tt = /* @__PURE__ */ new Set();
|
|
152
|
+
function Dt(n, e) {
|
|
153
|
+
n && n.i && (Tt.delete(n), n.i(e));
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Nt(n, e, t) {
|
|
156
156
|
const { fragment: i, after_update: l } = n.$$;
|
|
157
|
-
i && i.m(e, t),
|
|
158
|
-
const o = n.$$.on_mount.map(
|
|
159
|
-
n.$$.on_destroy ? n.$$.on_destroy.push(...o) :
|
|
160
|
-
}), l.forEach(
|
|
157
|
+
i && i.m(e, t), Le(() => {
|
|
158
|
+
const o = n.$$.on_mount.map(et).filter(tt);
|
|
159
|
+
n.$$.on_destroy ? n.$$.on_destroy.push(...o) : ue(o), n.$$.on_mount = [];
|
|
160
|
+
}), l.forEach(Le);
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function jt(n, e) {
|
|
163
163
|
const t = n.$$;
|
|
164
|
-
t.fragment !== null && (
|
|
164
|
+
t.fragment !== null && (St(t.after_update), ue(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
n.$$.dirty[0] === -1 && (
|
|
166
|
+
function Vt(n, e) {
|
|
167
|
+
n.$$.dirty[0] === -1 && (ne.push(n), rt(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
const
|
|
169
|
+
function Ft(n, e, t, i, l, o, f = null, c = [-1]) {
|
|
170
|
+
const h = ce;
|
|
171
|
+
fe(n);
|
|
172
|
+
const u = n.$$ = {
|
|
173
173
|
fragment: null,
|
|
174
174
|
ctx: [],
|
|
175
175
|
// state
|
|
176
176
|
props: o,
|
|
177
|
-
update:
|
|
177
|
+
update: ie,
|
|
178
178
|
not_equal: l,
|
|
179
|
-
bound:
|
|
179
|
+
bound: qe(),
|
|
180
180
|
// lifecycle
|
|
181
181
|
on_mount: [],
|
|
182
182
|
on_destroy: [],
|
|
183
183
|
on_disconnect: [],
|
|
184
184
|
before_update: [],
|
|
185
185
|
after_update: [],
|
|
186
|
-
context: new Map(e.context || (
|
|
186
|
+
context: new Map(e.context || (h ? h.$$.context : [])),
|
|
187
187
|
// everything else
|
|
188
|
-
callbacks:
|
|
189
|
-
dirty:
|
|
188
|
+
callbacks: qe(),
|
|
189
|
+
dirty: c,
|
|
190
190
|
skip_bound: !1,
|
|
191
|
-
root: e.target ||
|
|
191
|
+
root: e.target || h.$$.root
|
|
192
192
|
};
|
|
193
|
-
|
|
193
|
+
f && f(u.root);
|
|
194
194
|
let H = !1;
|
|
195
|
-
if (
|
|
196
|
-
const
|
|
197
|
-
return
|
|
198
|
-
}) : [],
|
|
195
|
+
if (u.ctx = t ? t(n, e.props || {}, (S, B, ...P) => {
|
|
196
|
+
const k = P.length ? P[0] : B;
|
|
197
|
+
return u.ctx && l(u.ctx[S], u.ctx[S] = k) && (!u.skip_bound && u.bound[S] && u.bound[S](k), H && Vt(n, S)), B;
|
|
198
|
+
}) : [], u.update(), H = !0, ue(u.before_update), u.fragment = i ? i(u.ctx) : !1, e.target) {
|
|
199
199
|
if (e.hydrate) {
|
|
200
|
-
const
|
|
201
|
-
|
|
200
|
+
const S = xt(e.target);
|
|
201
|
+
u.fragment && u.fragment.l(S), S.forEach(D);
|
|
202
202
|
} else
|
|
203
|
-
|
|
204
|
-
e.intro &&
|
|
203
|
+
u.fragment && u.fragment.c();
|
|
204
|
+
e.intro && Dt(n.$$.fragment), Nt(n, e.target, e.anchor), y();
|
|
205
205
|
}
|
|
206
|
-
|
|
206
|
+
fe(h);
|
|
207
207
|
}
|
|
208
|
-
let
|
|
209
|
-
typeof HTMLElement == "function" && (
|
|
208
|
+
let it;
|
|
209
|
+
typeof HTMLElement == "function" && (it = class extends HTMLElement {
|
|
210
210
|
constructor(e, t, i) {
|
|
211
211
|
super();
|
|
212
212
|
/** The Svelte component constructor */
|
|
213
|
-
|
|
213
|
+
O(this, "$$ctor");
|
|
214
214
|
/** Slots */
|
|
215
|
-
|
|
215
|
+
O(this, "$$s");
|
|
216
216
|
/** The Svelte component instance */
|
|
217
|
-
|
|
217
|
+
O(this, "$$c");
|
|
218
218
|
/** Whether or not the custom element is connected */
|
|
219
|
-
|
|
219
|
+
O(this, "$$cn", !1);
|
|
220
220
|
/** Component props data */
|
|
221
|
-
|
|
221
|
+
O(this, "$$d", {});
|
|
222
222
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
223
|
-
|
|
223
|
+
O(this, "$$r", !1);
|
|
224
224
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
225
|
-
|
|
225
|
+
O(this, "$$p_d", {});
|
|
226
226
|
/** @type {Record<string, Function[]>} Event listeners */
|
|
227
|
-
|
|
227
|
+
O(this, "$$l", {});
|
|
228
228
|
/** @type {Map<Function, Function>} Event listener unsubscribe functions */
|
|
229
|
-
|
|
229
|
+
O(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
230
230
|
this.$$ctor = e, this.$$s = t, i && this.attachShadow({ mode: "open" });
|
|
231
231
|
}
|
|
232
232
|
addEventListener(e, t, i) {
|
|
@@ -246,32 +246,32 @@ typeof HTMLElement == "function" && (rt = class extends HTMLElement {
|
|
|
246
246
|
if (this.$$cn = !0, !this.$$c) {
|
|
247
247
|
let e = function(o) {
|
|
248
248
|
return () => {
|
|
249
|
-
let
|
|
249
|
+
let f;
|
|
250
250
|
return {
|
|
251
251
|
c: function() {
|
|
252
|
-
|
|
252
|
+
f = M("slot"), o !== "default" && s(f, "name", o);
|
|
253
253
|
},
|
|
254
254
|
/**
|
|
255
255
|
* @param {HTMLElement} target
|
|
256
256
|
* @param {HTMLElement} [anchor]
|
|
257
257
|
*/
|
|
258
|
-
m: function(
|
|
259
|
-
|
|
258
|
+
m: function(u, H) {
|
|
259
|
+
F(u, f, H);
|
|
260
260
|
},
|
|
261
|
-
d: function(
|
|
262
|
-
|
|
261
|
+
d: function(u) {
|
|
262
|
+
u && D(f);
|
|
263
263
|
}
|
|
264
264
|
};
|
|
265
265
|
};
|
|
266
266
|
};
|
|
267
267
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
268
268
|
return;
|
|
269
|
-
const t = {}, i =
|
|
269
|
+
const t = {}, i = Lt(this);
|
|
270
270
|
for (const o of this.$$s)
|
|
271
271
|
o in i && (t[o] = [e(o)]);
|
|
272
272
|
for (const o of this.attributes) {
|
|
273
|
-
const
|
|
274
|
-
|
|
273
|
+
const f = this.$$g_p(o.name);
|
|
274
|
+
f in this.$$d || (this.$$d[f] = _e(f, o.value, this.$$p_d, "toProp"));
|
|
275
275
|
}
|
|
276
276
|
for (const o in this.$$p_d)
|
|
277
277
|
!(o in this.$$d) && this[o] !== void 0 && (this.$$d[o] = this[o], delete this[o]);
|
|
@@ -289,21 +289,21 @@ typeof HTMLElement == "function" && (rt = class extends HTMLElement {
|
|
|
289
289
|
this.$$r = !0;
|
|
290
290
|
for (const o in this.$$p_d)
|
|
291
291
|
if (this.$$d[o] = this.$$c.$$.ctx[this.$$c.$$.props[o]], this.$$p_d[o].reflect) {
|
|
292
|
-
const
|
|
292
|
+
const f = _e(
|
|
293
293
|
o,
|
|
294
294
|
this.$$d[o],
|
|
295
295
|
this.$$p_d,
|
|
296
296
|
"toAttribute"
|
|
297
297
|
);
|
|
298
|
-
|
|
298
|
+
f == null ? this.removeAttribute(this.$$p_d[o].attribute || o) : this.setAttribute(this.$$p_d[o].attribute || o, f);
|
|
299
299
|
}
|
|
300
300
|
this.$$r = !1;
|
|
301
301
|
};
|
|
302
302
|
this.$$c.$$.after_update.push(l), l();
|
|
303
303
|
for (const o in this.$$l)
|
|
304
|
-
for (const
|
|
305
|
-
const
|
|
306
|
-
this.$$l_u.set(
|
|
304
|
+
for (const f of this.$$l[o]) {
|
|
305
|
+
const c = this.$$c.$on(o, f);
|
|
306
|
+
this.$$l_u.set(f, c);
|
|
307
307
|
}
|
|
308
308
|
this.$$l = {};
|
|
309
309
|
}
|
|
@@ -312,7 +312,7 @@ typeof HTMLElement == "function" && (rt = class extends HTMLElement {
|
|
|
312
312
|
// and setting attributes through setAttribute etc, this is helpful
|
|
313
313
|
attributeChangedCallback(e, t, i) {
|
|
314
314
|
var l;
|
|
315
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
315
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = _e(e, i, this.$$p_d, "toProp"), (l = this.$$c) == null || l.$set({ [e]: this.$$d[e] }));
|
|
316
316
|
}
|
|
317
317
|
disconnectedCallback() {
|
|
318
318
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -325,7 +325,7 @@ typeof HTMLElement == "function" && (rt = class extends HTMLElement {
|
|
|
325
325
|
) || e;
|
|
326
326
|
}
|
|
327
327
|
});
|
|
328
|
-
function
|
|
328
|
+
function _e(n, e, t, i) {
|
|
329
329
|
var o;
|
|
330
330
|
const l = (o = t[n]) == null ? void 0 : o.type;
|
|
331
331
|
if (e = l === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !t[n])
|
|
@@ -355,38 +355,38 @@ function me(n, e, t, i) {
|
|
|
355
355
|
return e;
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
|
-
function
|
|
359
|
-
let
|
|
358
|
+
function Pt(n, e, t, i, l, o) {
|
|
359
|
+
let f = class extends it {
|
|
360
360
|
constructor() {
|
|
361
361
|
super(n, t, l), this.$$p_d = e;
|
|
362
362
|
}
|
|
363
363
|
static get observedAttributes() {
|
|
364
364
|
return Object.keys(e).map(
|
|
365
|
-
(
|
|
365
|
+
(c) => (e[c].attribute || c).toLowerCase()
|
|
366
366
|
);
|
|
367
367
|
}
|
|
368
368
|
};
|
|
369
|
-
return Object.keys(e).forEach((
|
|
370
|
-
Object.defineProperty(
|
|
369
|
+
return Object.keys(e).forEach((c) => {
|
|
370
|
+
Object.defineProperty(f.prototype, c, {
|
|
371
371
|
get() {
|
|
372
|
-
return this.$$c &&
|
|
372
|
+
return this.$$c && c in this.$$c ? this.$$c[c] : this.$$d[c];
|
|
373
373
|
},
|
|
374
|
-
set(
|
|
375
|
-
var
|
|
376
|
-
|
|
374
|
+
set(h) {
|
|
375
|
+
var u;
|
|
376
|
+
h = _e(c, h, e), this.$$d[c] = h, (u = this.$$c) == null || u.$set({ [c]: h });
|
|
377
377
|
}
|
|
378
378
|
});
|
|
379
|
-
}), i.forEach((
|
|
380
|
-
Object.defineProperty(
|
|
379
|
+
}), i.forEach((c) => {
|
|
380
|
+
Object.defineProperty(f.prototype, c, {
|
|
381
381
|
get() {
|
|
382
|
-
var
|
|
383
|
-
return (
|
|
382
|
+
var h;
|
|
383
|
+
return (h = this.$$c) == null ? void 0 : h[c];
|
|
384
384
|
}
|
|
385
385
|
});
|
|
386
|
-
}), o && (
|
|
387
|
-
|
|
386
|
+
}), o && (f = o(f)), n.element = /** @type {any} */
|
|
387
|
+
f, f;
|
|
388
388
|
}
|
|
389
|
-
class
|
|
389
|
+
class Ht {
|
|
390
390
|
constructor() {
|
|
391
391
|
/**
|
|
392
392
|
* ### PRIVATE API
|
|
@@ -395,7 +395,7 @@ class Pt {
|
|
|
395
395
|
*
|
|
396
396
|
* @type {any}
|
|
397
397
|
*/
|
|
398
|
-
|
|
398
|
+
O(this, "$$");
|
|
399
399
|
/**
|
|
400
400
|
* ### PRIVATE API
|
|
401
401
|
*
|
|
@@ -403,11 +403,11 @@ class Pt {
|
|
|
403
403
|
*
|
|
404
404
|
* @type {any}
|
|
405
405
|
*/
|
|
406
|
-
|
|
406
|
+
O(this, "$$set");
|
|
407
407
|
}
|
|
408
408
|
/** @returns {void} */
|
|
409
409
|
$destroy() {
|
|
410
|
-
|
|
410
|
+
jt(this, 1), this.$destroy = ie;
|
|
411
411
|
}
|
|
412
412
|
/**
|
|
413
413
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -416,8 +416,8 @@ class Pt {
|
|
|
416
416
|
* @returns {() => void}
|
|
417
417
|
*/
|
|
418
418
|
$on(e, t) {
|
|
419
|
-
if (!
|
|
420
|
-
return
|
|
419
|
+
if (!tt(t))
|
|
420
|
+
return ie;
|
|
421
421
|
const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
422
422
|
return i.push(t), () => {
|
|
423
423
|
const l = i.indexOf(t);
|
|
@@ -429,19 +429,19 @@ class Pt {
|
|
|
429
429
|
* @returns {void}
|
|
430
430
|
*/
|
|
431
431
|
$set(e) {
|
|
432
|
-
this.$$set && !
|
|
432
|
+
this.$$set && !Et(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
-
const
|
|
436
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
437
|
-
const
|
|
438
|
-
function
|
|
435
|
+
const Ot = "4";
|
|
436
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Ot);
|
|
437
|
+
const Bt = new TextEncoder();
|
|
438
|
+
function Ut(n) {
|
|
439
439
|
return [...new Uint8Array(n)].map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
440
440
|
}
|
|
441
|
-
async function
|
|
441
|
+
async function qt(n, e = "SHA-256", t = 1e5) {
|
|
442
442
|
const i = Date.now().toString(16);
|
|
443
443
|
n || (n = Math.round(Math.random() * t));
|
|
444
|
-
const l = await
|
|
444
|
+
const l = await ot(i, n, e);
|
|
445
445
|
return {
|
|
446
446
|
algorithm: e,
|
|
447
447
|
challenge: l,
|
|
@@ -449,25 +449,25 @@ async function Bt(n, e = "SHA-256", t = 1e5) {
|
|
|
449
449
|
signature: ""
|
|
450
450
|
};
|
|
451
451
|
}
|
|
452
|
-
async function
|
|
453
|
-
return
|
|
452
|
+
async function ot(n, e, t) {
|
|
453
|
+
return Ut(
|
|
454
454
|
await crypto.subtle.digest(
|
|
455
455
|
t.toUpperCase(),
|
|
456
|
-
|
|
456
|
+
Bt.encode(n + e)
|
|
457
457
|
)
|
|
458
458
|
);
|
|
459
459
|
}
|
|
460
|
-
function
|
|
461
|
-
const o = new AbortController(),
|
|
460
|
+
function Zt(n, e, t = "SHA-256", i = 1e6, l = 0) {
|
|
461
|
+
const o = new AbortController(), f = Date.now();
|
|
462
462
|
return {
|
|
463
463
|
promise: (async () => {
|
|
464
|
-
for (let
|
|
464
|
+
for (let h = l; h <= i; h += 1) {
|
|
465
465
|
if (o.signal.aborted)
|
|
466
466
|
return null;
|
|
467
|
-
if (await
|
|
467
|
+
if (await ot(e, h, t) === n)
|
|
468
468
|
return {
|
|
469
|
-
number:
|
|
470
|
-
took: Date.now() -
|
|
469
|
+
number: h,
|
|
470
|
+
took: Date.now() - f
|
|
471
471
|
};
|
|
472
472
|
}
|
|
473
473
|
return null;
|
|
@@ -476,56 +476,56 @@ function Ut(n, e, t = "SHA-256", i = 1e6, l = 0) {
|
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
478
|
var b = /* @__PURE__ */ ((n) => (n.ERROR = "error", n.VERIFIED = "verified", n.VERIFYING = "verifying", n.UNVERIFIED = "unverified", n.EXPIRED = "expired", n))(b || {});
|
|
479
|
-
function
|
|
479
|
+
function Ge(n) {
|
|
480
480
|
let e, t, i;
|
|
481
481
|
return {
|
|
482
482
|
c() {
|
|
483
|
-
e =
|
|
483
|
+
e = Y("svg"), t = Y("path"), i = Y("path"), s(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"), s(t, "fill", "currentColor"), s(t, "opacity", ".25"), s(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"), s(i, "fill", "currentColor"), s(i, "class", "altcha-spinner"), s(e, "width", "24"), s(e, "height", "24"), s(e, "viewBox", "0 0 24 24"), s(e, "xmlns", "http://www.w3.org/2000/svg");
|
|
484
484
|
},
|
|
485
485
|
m(l, o) {
|
|
486
|
-
|
|
486
|
+
F(l, e, o), p(e, t), p(e, i);
|
|
487
487
|
},
|
|
488
488
|
d(l) {
|
|
489
489
|
l && D(e);
|
|
490
490
|
}
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function Yt(n) {
|
|
494
494
|
let e, t = (
|
|
495
495
|
/*_strings*/
|
|
496
496
|
n[11].label + ""
|
|
497
497
|
), i;
|
|
498
498
|
return {
|
|
499
499
|
c() {
|
|
500
|
-
e =
|
|
500
|
+
e = M("label"), s(e, "for", i = /*name*/
|
|
501
501
|
n[4] + "_checkbox");
|
|
502
502
|
},
|
|
503
503
|
m(l, o) {
|
|
504
|
-
|
|
504
|
+
F(l, e, o), e.innerHTML = t;
|
|
505
505
|
},
|
|
506
506
|
p(l, o) {
|
|
507
507
|
o[0] & /*_strings*/
|
|
508
508
|
2048 && t !== (t = /*_strings*/
|
|
509
509
|
l[11].label + "") && (e.innerHTML = t), o[0] & /*name*/
|
|
510
510
|
16 && i !== (i = /*name*/
|
|
511
|
-
l[4] + "_checkbox") &&
|
|
511
|
+
l[4] + "_checkbox") && s(e, "for", i);
|
|
512
512
|
},
|
|
513
513
|
d(l) {
|
|
514
514
|
l && D(e);
|
|
515
515
|
}
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function Gt(n) {
|
|
519
519
|
let e, t = (
|
|
520
520
|
/*_strings*/
|
|
521
521
|
n[11].verifying + ""
|
|
522
522
|
);
|
|
523
523
|
return {
|
|
524
524
|
c() {
|
|
525
|
-
e =
|
|
525
|
+
e = M("span");
|
|
526
526
|
},
|
|
527
527
|
m(i, l) {
|
|
528
|
-
|
|
528
|
+
F(i, e, l), e.innerHTML = t;
|
|
529
529
|
},
|
|
530
530
|
p(i, l) {
|
|
531
531
|
l[0] & /*_strings*/
|
|
@@ -537,14 +537,14 @@ function Zt(n) {
|
|
|
537
537
|
}
|
|
538
538
|
};
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function Wt(n) {
|
|
541
541
|
let e, t = (
|
|
542
542
|
/*_strings*/
|
|
543
543
|
n[11].verified + ""
|
|
544
544
|
), i, l;
|
|
545
545
|
return {
|
|
546
546
|
c() {
|
|
547
|
-
e =
|
|
547
|
+
e = M("span"), i = X(), l = M("input"), s(l, "type", "hidden"), s(
|
|
548
548
|
l,
|
|
549
549
|
"name",
|
|
550
550
|
/*name*/
|
|
@@ -552,19 +552,19 @@ function Yt(n) {
|
|
|
552
552
|
), l.value = /*payload*/
|
|
553
553
|
n[5];
|
|
554
554
|
},
|
|
555
|
-
m(o,
|
|
556
|
-
|
|
555
|
+
m(o, f) {
|
|
556
|
+
F(o, e, f), e.innerHTML = t, F(o, i, f), F(o, l, f);
|
|
557
557
|
},
|
|
558
|
-
p(o,
|
|
559
|
-
|
|
558
|
+
p(o, f) {
|
|
559
|
+
f[0] & /*_strings*/
|
|
560
560
|
2048 && t !== (t = /*_strings*/
|
|
561
|
-
o[11].verified + "") && (e.innerHTML = t),
|
|
562
|
-
16 &&
|
|
561
|
+
o[11].verified + "") && (e.innerHTML = t), f[0] & /*name*/
|
|
562
|
+
16 && s(
|
|
563
563
|
l,
|
|
564
564
|
"name",
|
|
565
565
|
/*name*/
|
|
566
566
|
o[4]
|
|
567
|
-
),
|
|
567
|
+
), f[0] & /*payload*/
|
|
568
568
|
32 && (l.value = /*payload*/
|
|
569
569
|
o[5]);
|
|
570
570
|
},
|
|
@@ -573,58 +573,58 @@ function Yt(n) {
|
|
|
573
573
|
}
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
|
-
function
|
|
577
|
-
let e, t, i, l, o,
|
|
576
|
+
function We(n) {
|
|
577
|
+
let e, t, i, l, o, f, c;
|
|
578
578
|
return {
|
|
579
579
|
c() {
|
|
580
|
-
e =
|
|
580
|
+
e = M("div"), t = M("a"), i = Y("svg"), l = Y("path"), o = Y("path"), f = Y("path"), s(l, "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"), s(l, "fill", "currentColor"), s(o, "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"), s(o, "fill", "currentColor"), s(f, "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"), s(f, "fill", "currentColor"), s(i, "width", "22"), s(i, "height", "22"), s(i, "viewBox", "0 0 20 20"), s(i, "fill", "none"), s(i, "xmlns", "http://www.w3.org/2000/svg"), s(t, "href", lt), s(t, "target", "_blank"), s(t, "class", "altcha-logo"), s(t, "aria-label", c = /*_strings*/
|
|
581
581
|
n[11].ariaLinkLabel);
|
|
582
582
|
},
|
|
583
|
-
m(
|
|
584
|
-
|
|
583
|
+
m(h, u) {
|
|
584
|
+
F(h, e, u), p(e, t), p(t, i), p(i, l), p(i, o), p(i, f);
|
|
585
585
|
},
|
|
586
|
-
p(
|
|
587
|
-
|
|
588
|
-
2048 &&
|
|
589
|
-
|
|
586
|
+
p(h, u) {
|
|
587
|
+
u[0] & /*_strings*/
|
|
588
|
+
2048 && c !== (c = /*_strings*/
|
|
589
|
+
h[11].ariaLinkLabel) && s(t, "aria-label", c);
|
|
590
590
|
},
|
|
591
|
-
d(
|
|
592
|
-
|
|
591
|
+
d(h) {
|
|
592
|
+
h && D(e);
|
|
593
593
|
}
|
|
594
594
|
};
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function Xe(n) {
|
|
597
597
|
let e, t, i, l;
|
|
598
|
-
function o(
|
|
598
|
+
function o(h, u) {
|
|
599
599
|
return (
|
|
600
600
|
/*state*/
|
|
601
|
-
|
|
601
|
+
h[6] === b.EXPIRED ? Jt : Xt
|
|
602
602
|
);
|
|
603
603
|
}
|
|
604
|
-
let
|
|
604
|
+
let f = o(n), c = f(n);
|
|
605
605
|
return {
|
|
606
606
|
c() {
|
|
607
|
-
e =
|
|
607
|
+
e = M("div"), t = Y("svg"), i = Y("path"), l = X(), c.c(), s(i, "stroke-linecap", "round"), s(i, "stroke-linejoin", "round"), s(i, "d", "M6 18L18 6M6 6l12 12"), s(t, "width", "14"), s(t, "height", "14"), s(t, "xmlns", "http://www.w3.org/2000/svg"), s(t, "fill", "none"), s(t, "viewBox", "0 0 24 24"), s(t, "stroke-width", "1.5"), s(t, "stroke", "currentColor"), s(e, "class", "altcha-error");
|
|
608
608
|
},
|
|
609
|
-
m(
|
|
610
|
-
|
|
609
|
+
m(h, u) {
|
|
610
|
+
F(h, e, u), p(e, t), p(t, i), p(e, l), c.m(e, null);
|
|
611
611
|
},
|
|
612
|
-
p(
|
|
613
|
-
|
|
612
|
+
p(h, u) {
|
|
613
|
+
f === (f = o(h)) && c ? c.p(h, u) : (c.d(1), c = f(h), c && (c.c(), c.m(e, null)));
|
|
614
614
|
},
|
|
615
|
-
d(
|
|
616
|
-
|
|
615
|
+
d(h) {
|
|
616
|
+
h && D(e), c.d();
|
|
617
617
|
}
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function Xt(n) {
|
|
621
621
|
let e, t = (
|
|
622
622
|
/*_strings*/
|
|
623
623
|
n[11].error + ""
|
|
624
624
|
);
|
|
625
625
|
return {
|
|
626
626
|
c() {
|
|
627
|
-
e =
|
|
627
|
+
e = M("div"), s(
|
|
628
628
|
e,
|
|
629
629
|
"title",
|
|
630
630
|
/*error*/
|
|
@@ -632,13 +632,13 @@ function Gt(n) {
|
|
|
632
632
|
);
|
|
633
633
|
},
|
|
634
634
|
m(i, l) {
|
|
635
|
-
|
|
635
|
+
F(i, e, l), e.innerHTML = t;
|
|
636
636
|
},
|
|
637
637
|
p(i, l) {
|
|
638
638
|
l[0] & /*_strings*/
|
|
639
639
|
2048 && t !== (t = /*_strings*/
|
|
640
640
|
i[11].error + "") && (e.innerHTML = t), l[0] & /*error*/
|
|
641
|
-
1024 &&
|
|
641
|
+
1024 && s(
|
|
642
642
|
e,
|
|
643
643
|
"title",
|
|
644
644
|
/*error*/
|
|
@@ -650,14 +650,14 @@ function Gt(n) {
|
|
|
650
650
|
}
|
|
651
651
|
};
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function Jt(n) {
|
|
654
654
|
let e, t = (
|
|
655
655
|
/*_strings*/
|
|
656
656
|
n[11].expired + ""
|
|
657
657
|
);
|
|
658
658
|
return {
|
|
659
659
|
c() {
|
|
660
|
-
e =
|
|
660
|
+
e = M("div"), s(
|
|
661
661
|
e,
|
|
662
662
|
"title",
|
|
663
663
|
/*error*/
|
|
@@ -665,13 +665,13 @@ function Wt(n) {
|
|
|
665
665
|
);
|
|
666
666
|
},
|
|
667
667
|
m(i, l) {
|
|
668
|
-
|
|
668
|
+
F(i, e, l), e.innerHTML = t;
|
|
669
669
|
},
|
|
670
670
|
p(i, l) {
|
|
671
671
|
l[0] & /*_strings*/
|
|
672
672
|
2048 && t !== (t = /*_strings*/
|
|
673
673
|
i[11].expired + "") && (e.innerHTML = t), l[0] & /*error*/
|
|
674
|
-
1024 &&
|
|
674
|
+
1024 && s(
|
|
675
675
|
e,
|
|
676
676
|
"title",
|
|
677
677
|
/*error*/
|
|
@@ -683,17 +683,17 @@ function Wt(n) {
|
|
|
683
683
|
}
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
|
-
function
|
|
686
|
+
function Je(n) {
|
|
687
687
|
let e, t, i = (
|
|
688
688
|
/*_strings*/
|
|
689
689
|
n[11].footer + ""
|
|
690
690
|
);
|
|
691
691
|
return {
|
|
692
692
|
c() {
|
|
693
|
-
e =
|
|
693
|
+
e = M("div"), t = M("div"), s(e, "class", "altcha-footer");
|
|
694
694
|
},
|
|
695
695
|
m(l, o) {
|
|
696
|
-
|
|
696
|
+
F(l, e, o), p(e, t), t.innerHTML = i;
|
|
697
697
|
},
|
|
698
698
|
p(l, o) {
|
|
699
699
|
o[0] & /*_strings*/
|
|
@@ -705,498 +705,516 @@ function Xe(n) {
|
|
|
705
705
|
}
|
|
706
706
|
};
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function ze(n) {
|
|
709
709
|
let e;
|
|
710
710
|
return {
|
|
711
711
|
c() {
|
|
712
|
-
e =
|
|
712
|
+
e = M("div"), s(e, "class", "altcha-anchor-arrow");
|
|
713
713
|
},
|
|
714
714
|
m(t, i) {
|
|
715
|
-
|
|
715
|
+
F(t, e, i), n[37](e);
|
|
716
716
|
},
|
|
717
|
-
p:
|
|
717
|
+
p: ie,
|
|
718
718
|
d(t) {
|
|
719
|
-
t && D(e), n[
|
|
719
|
+
t && D(e), n[37](null);
|
|
720
720
|
}
|
|
721
721
|
};
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
let e, t, i, l, o,
|
|
723
|
+
function zt(n) {
|
|
724
|
+
let e, t, i, l, o, f, c, h, u, H, S, B, P, k, G, $ = (
|
|
725
725
|
/*state*/
|
|
726
|
-
n[6] === b.VERIFYING &&
|
|
726
|
+
n[6] === b.VERIFYING && Ge()
|
|
727
727
|
);
|
|
728
|
-
function
|
|
728
|
+
function J(d, _) {
|
|
729
729
|
return (
|
|
730
730
|
/*state*/
|
|
731
|
-
d[6] === b.VERIFIED ?
|
|
731
|
+
d[6] === b.VERIFIED ? Wt : (
|
|
732
732
|
/*state*/
|
|
733
|
-
d[6] === b.VERIFYING ?
|
|
733
|
+
d[6] === b.VERIFYING ? Gt : Yt
|
|
734
734
|
)
|
|
735
735
|
);
|
|
736
736
|
}
|
|
737
|
-
let
|
|
737
|
+
let Z = J(n), N = Z(n), x = (
|
|
738
738
|
/*hidelogo*/
|
|
739
|
-
n[3] !== !0
|
|
739
|
+
(n[3] !== !0 || /*isFreeSaaS*/
|
|
740
|
+
n[12]) && We(n)
|
|
740
741
|
), I = (
|
|
741
742
|
/*error*/
|
|
742
743
|
(n[10] || /*state*/
|
|
743
|
-
n[6] === b.EXPIRED) &&
|
|
744
|
-
),
|
|
744
|
+
n[6] === b.EXPIRED) && Xe(n)
|
|
745
|
+
), A = (
|
|
745
746
|
/*_strings*/
|
|
746
747
|
n[11].footer && /*hidefooter*/
|
|
747
|
-
n[2] !== !0
|
|
748
|
-
|
|
748
|
+
(n[2] !== !0 || /*isFreeSaaS*/
|
|
749
|
+
n[12]) && Je(n)
|
|
750
|
+
), w = (
|
|
749
751
|
/*floating*/
|
|
750
|
-
n[1] &&
|
|
752
|
+
n[1] && ze(n)
|
|
751
753
|
);
|
|
752
754
|
return {
|
|
753
755
|
c() {
|
|
754
|
-
e =
|
|
755
|
-
n[4] + "_checkbox"), o.required =
|
|
756
|
-
n[0] !== "onsubmit",
|
|
756
|
+
e = M("div"), t = M("div"), $ && $.c(), i = X(), l = M("div"), o = M("input"), h = X(), u = M("div"), N.c(), H = X(), x && x.c(), S = X(), I && I.c(), B = X(), A && A.c(), P = X(), w && w.c(), s(o, "type", "checkbox"), s(o, "id", f = /*name*/
|
|
757
|
+
n[4] + "_checkbox"), o.required = c = /*auto*/
|
|
758
|
+
n[0] !== "onsubmit", s(l, "class", "altcha-checkbox"), Ze(
|
|
757
759
|
l,
|
|
758
760
|
"altcha-hidden",
|
|
759
761
|
/*state*/
|
|
760
762
|
n[6] === b.VERIFYING
|
|
761
|
-
),
|
|
763
|
+
), s(u, "class", "altcha-label"), s(t, "class", "altcha-main"), s(e, "class", "altcha"), s(
|
|
762
764
|
e,
|
|
763
765
|
"data-state",
|
|
764
766
|
/*state*/
|
|
765
767
|
n[6]
|
|
766
|
-
),
|
|
768
|
+
), s(
|
|
767
769
|
e,
|
|
768
770
|
"data-floating",
|
|
769
771
|
/*floating*/
|
|
770
772
|
n[1]
|
|
771
773
|
);
|
|
772
774
|
},
|
|
773
|
-
m(d,
|
|
774
|
-
|
|
775
|
-
n[7],
|
|
776
|
-
|
|
775
|
+
m(d, _) {
|
|
776
|
+
F(d, e, _), p(e, t), $ && $.m(t, null), p(t, i), p(t, l), p(l, o), o.checked = /*checked*/
|
|
777
|
+
n[7], p(t, h), p(t, u), N.m(u, null), p(t, H), x && x.m(t, null), p(e, S), I && I.m(e, null), p(e, B), A && A.m(e, null), p(e, P), w && w.m(e, null), n[38](e), k || (G = [
|
|
778
|
+
pe(
|
|
777
779
|
o,
|
|
778
780
|
"change",
|
|
779
781
|
/*input_change_handler*/
|
|
780
|
-
n[
|
|
782
|
+
n[36]
|
|
781
783
|
),
|
|
782
|
-
|
|
784
|
+
pe(
|
|
783
785
|
o,
|
|
784
786
|
"change",
|
|
785
787
|
/*onCheckedChange*/
|
|
786
|
-
n[
|
|
788
|
+
n[13]
|
|
787
789
|
),
|
|
788
|
-
|
|
790
|
+
pe(
|
|
789
791
|
o,
|
|
790
792
|
"invalid",
|
|
791
793
|
/*onInvalid*/
|
|
792
|
-
n[
|
|
794
|
+
n[14]
|
|
793
795
|
)
|
|
794
|
-
],
|
|
796
|
+
], k = !0);
|
|
795
797
|
},
|
|
796
|
-
p(d,
|
|
798
|
+
p(d, _) {
|
|
797
799
|
/*state*/
|
|
798
|
-
d[6] === b.VERIFYING ?
|
|
799
|
-
16 &&
|
|
800
|
-
d[4] + "_checkbox") &&
|
|
801
|
-
1 &&
|
|
802
|
-
d[0] !== "onsubmit") && (o.required =
|
|
800
|
+
d[6] === b.VERIFYING ? $ || ($ = Ge(), $.c(), $.m(t, i)) : $ && ($.d(1), $ = null), _[0] & /*name*/
|
|
801
|
+
16 && f !== (f = /*name*/
|
|
802
|
+
d[4] + "_checkbox") && s(o, "id", f), _[0] & /*auto*/
|
|
803
|
+
1 && c !== (c = /*auto*/
|
|
804
|
+
d[0] !== "onsubmit") && (o.required = c), _[0] & /*checked*/
|
|
803
805
|
128 && (o.checked = /*checked*/
|
|
804
|
-
d[7]),
|
|
805
|
-
64 &&
|
|
806
|
+
d[7]), _[0] & /*state*/
|
|
807
|
+
64 && Ze(
|
|
806
808
|
l,
|
|
807
809
|
"altcha-hidden",
|
|
808
810
|
/*state*/
|
|
809
811
|
d[6] === b.VERIFYING
|
|
810
|
-
),
|
|
811
|
-
d[3] !== !0
|
|
812
|
+
), Z === (Z = J(d)) && N ? N.p(d, _) : (N.d(1), N = Z(d), N && (N.c(), N.m(u, null))), /*hidelogo*/
|
|
813
|
+
d[3] !== !0 || /*isFreeSaaS*/
|
|
814
|
+
d[12] ? x ? x.p(d, _) : (x = We(d), x.c(), x.m(t, null)) : x && (x.d(1), x = null), /*error*/
|
|
812
815
|
d[10] || /*state*/
|
|
813
|
-
d[6] === b.EXPIRED ? I ? I.p(d,
|
|
816
|
+
d[6] === b.EXPIRED ? I ? I.p(d, _) : (I = Xe(d), I.c(), I.m(e, B)) : I && (I.d(1), I = null), /*_strings*/
|
|
814
817
|
d[11].footer && /*hidefooter*/
|
|
815
|
-
d[2] !== !0
|
|
816
|
-
d[
|
|
817
|
-
|
|
818
|
+
(d[2] !== !0 || /*isFreeSaaS*/
|
|
819
|
+
d[12]) ? A ? A.p(d, _) : (A = Je(d), A.c(), A.m(e, P)) : A && (A.d(1), A = null), /*floating*/
|
|
820
|
+
d[1] ? w ? w.p(d, _) : (w = ze(d), w.c(), w.m(e, null)) : w && (w.d(1), w = null), _[0] & /*state*/
|
|
821
|
+
64 && s(
|
|
818
822
|
e,
|
|
819
823
|
"data-state",
|
|
820
824
|
/*state*/
|
|
821
825
|
d[6]
|
|
822
|
-
),
|
|
823
|
-
2 &&
|
|
826
|
+
), _[0] & /*floating*/
|
|
827
|
+
2 && s(
|
|
824
828
|
e,
|
|
825
829
|
"data-floating",
|
|
826
830
|
/*floating*/
|
|
827
831
|
d[1]
|
|
828
832
|
);
|
|
829
833
|
},
|
|
830
|
-
i:
|
|
831
|
-
o:
|
|
834
|
+
i: ie,
|
|
835
|
+
o: ie,
|
|
832
836
|
d(d) {
|
|
833
|
-
d && D(e),
|
|
837
|
+
d && D(e), $ && $.d(), N.d(), x && x.d(), I && I.d(), A && A.d(), w && w.d(), n[38](null), k = !1, ue(G);
|
|
834
838
|
}
|
|
835
839
|
};
|
|
836
840
|
}
|
|
837
|
-
const
|
|
838
|
-
function
|
|
841
|
+
const Ke = "Visit Altcha.org", lt = "https://altcha.org/";
|
|
842
|
+
function Qe(n) {
|
|
839
843
|
return JSON.parse(n);
|
|
840
844
|
}
|
|
841
|
-
function
|
|
845
|
+
function Kt() {
|
|
842
846
|
try {
|
|
843
847
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
844
848
|
} catch {
|
|
845
849
|
}
|
|
846
850
|
}
|
|
847
|
-
function
|
|
848
|
-
var
|
|
849
|
-
let i, l, o, { auto:
|
|
850
|
-
const
|
|
851
|
-
let
|
|
852
|
-
|
|
853
|
-
m && (m.removeEventListener("submit",
|
|
854
|
-
}),
|
|
855
|
-
|
|
851
|
+
function Qt(n, e, t) {
|
|
852
|
+
var Be, Ue;
|
|
853
|
+
let i, l, o, f, { auto: c = void 0 } = e, { blockspam: h = void 0 } = e, { challengeurl: u = void 0 } = e, { challengejson: H = void 0 } = e, { debug: S = !1 } = e, { delay: B = 0 } = e, { expire: P = void 0 } = e, { floating: k = void 0 } = e, { floatinganchor: G = void 0 } = e, { floatingoffset: $ = void 0 } = e, { hidefooter: J = !1 } = e, { hidelogo: Z = !1 } = e, { name: N = "altcha" } = e, { maxnumber: x = 1e6 } = e, { mockerror: I = !1 } = e, { refetchonexpire: A = !0 } = e, { spamfilter: w = !1 } = e, { strings: d = void 0 } = e, { test: _ = !1 } = e, { verifyurl: z = void 0 } = e, { workers: oe = Math.min(16, navigator.hardwareConcurrency || 8) } = e, { workerurl: ae = void 0 } = e;
|
|
854
|
+
const ye = Rt(), Ae = ["SHA-256", "SHA-384", "SHA-512"], Re = (Ue = (Be = document.documentElement.lang) == null ? void 0 : Be.split("-")) == null ? void 0 : Ue[0];
|
|
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.4"), 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.");
|
|
856
860
|
});
|
|
857
|
-
function
|
|
858
|
-
(
|
|
859
|
-
}
|
|
860
|
-
function Re(r) {
|
|
861
|
-
N === b.UNVERIFIED && K();
|
|
861
|
+
function E(...r) {
|
|
862
|
+
(S || r.some((a) => a instanceof Error)) && console[r[0] instanceof Error ? "error" : "log"]("ALTCHA", ...r);
|
|
862
863
|
}
|
|
863
864
|
function $e(r) {
|
|
864
|
-
|
|
865
|
+
j === b.UNVERIFIED && ee();
|
|
866
|
+
}
|
|
867
|
+
function Me(r) {
|
|
868
|
+
m && c === "onsubmit" && (j === b.UNVERIFIED ? (r.preventDefault(), r.stopPropagation(), ee().then(() => {
|
|
865
869
|
m == null || m.requestSubmit();
|
|
866
|
-
})) :
|
|
870
|
+
})) : j !== b.VERIFIED && (r.preventDefault(), r.stopPropagation(), j === b.VERIFYING && Fe()));
|
|
867
871
|
}
|
|
868
|
-
function
|
|
869
|
-
|
|
872
|
+
function Se() {
|
|
873
|
+
ge();
|
|
870
874
|
}
|
|
871
|
-
function Te(r,
|
|
875
|
+
function Te(r, a) {
|
|
872
876
|
return btoa(JSON.stringify({
|
|
873
877
|
algorithm: r.algorithm,
|
|
874
878
|
challenge: r.challenge,
|
|
875
|
-
number:
|
|
879
|
+
number: a.number,
|
|
876
880
|
salt: r.salt,
|
|
877
881
|
signature: r.signature,
|
|
878
|
-
test:
|
|
879
|
-
took:
|
|
882
|
+
test: _ ? !0 : void 0,
|
|
883
|
+
took: a.took
|
|
880
884
|
}));
|
|
881
885
|
}
|
|
882
|
-
function
|
|
886
|
+
function De(r) {
|
|
883
887
|
if (!r.algorithm)
|
|
884
888
|
throw new Error("Invalid challenge. Property algorithm is missing.");
|
|
885
889
|
if (r.signature === void 0)
|
|
886
890
|
throw new Error("Invalid challenge. Property signature is missing.");
|
|
887
|
-
if (!
|
|
888
|
-
throw new Error(`Unknown algorithm value. Allowed values: ${
|
|
891
|
+
if (!Ae.includes(r.algorithm.toUpperCase()))
|
|
892
|
+
throw new Error(`Unknown algorithm value. Allowed values: ${Ae.join(", ")}`);
|
|
889
893
|
if (!r.challenge || r.challenge.length < 40)
|
|
890
894
|
throw new Error("Challenge is too short. Min. 40 chars.");
|
|
891
895
|
if (!r.salt || r.salt.length < 10)
|
|
892
896
|
throw new Error("Salt is too short. Min. 10 chars.");
|
|
893
897
|
}
|
|
894
|
-
async function
|
|
898
|
+
async function st() {
|
|
895
899
|
var r;
|
|
896
|
-
if (
|
|
897
|
-
throw
|
|
898
|
-
if (
|
|
899
|
-
return
|
|
900
|
-
if (
|
|
901
|
-
return
|
|
900
|
+
if (I)
|
|
901
|
+
throw E("mocking error"), new Error("Mocked error.");
|
|
902
|
+
if (l)
|
|
903
|
+
return E("using provided json data"), l;
|
|
904
|
+
if (_)
|
|
905
|
+
return E("generating test challenge", { test: _ }), qt(typeof _ != "boolean" ? +_ : void 0);
|
|
902
906
|
{
|
|
903
907
|
if (!u)
|
|
904
908
|
throw new Error("Attribute challengeurl not set.");
|
|
905
|
-
|
|
906
|
-
const
|
|
909
|
+
E("fetching challenge from", u);
|
|
910
|
+
const a = await fetch(u, {
|
|
907
911
|
headers: {
|
|
908
|
-
"x-altcha-spam-filter":
|
|
912
|
+
"x-altcha-spam-filter": w ? "1" : "0"
|
|
909
913
|
}
|
|
910
914
|
});
|
|
911
|
-
if (
|
|
912
|
-
throw new Error(`Server responded with ${
|
|
913
|
-
const g =
|
|
915
|
+
if (a.status !== 200)
|
|
916
|
+
throw new Error(`Server responded with ${a.status}.`);
|
|
917
|
+
const g = a.headers.get("Expires"), R = a.headers.get("X-Altcha-Config"), V = await a.json(), T = new URLSearchParams((r = V.salt.split("?")) == null ? void 0 : r[1]), q = T.get("expires") || T.get("expire");
|
|
914
918
|
if (q) {
|
|
915
|
-
const
|
|
916
|
-
|
|
919
|
+
const v = new Date(+q * 1e3), L = isNaN(v.getTime()) ? 0 : v.getTime() - Date.now();
|
|
920
|
+
L > 0 && de(L);
|
|
917
921
|
}
|
|
918
922
|
if (R)
|
|
919
923
|
try {
|
|
920
|
-
const
|
|
921
|
-
|
|
922
|
-
} catch (
|
|
923
|
-
|
|
924
|
+
const v = JSON.parse(R);
|
|
925
|
+
v && typeof v == "object" && (v.verifyurl && (v.verifyurl = new URL(v.verifyurl, new URL(u)).toString()), Oe(v));
|
|
926
|
+
} catch (v) {
|
|
927
|
+
E("unable to configure from X-Altcha-Config", v);
|
|
924
928
|
}
|
|
925
|
-
if (!
|
|
926
|
-
const
|
|
927
|
-
if (
|
|
928
|
-
const
|
|
929
|
-
|
|
929
|
+
if (!P && (g != null && g.length)) {
|
|
930
|
+
const v = Date.parse(g);
|
|
931
|
+
if (v) {
|
|
932
|
+
const L = v - Date.now();
|
|
933
|
+
L > 0 && de(L);
|
|
930
934
|
}
|
|
931
935
|
}
|
|
932
|
-
return
|
|
936
|
+
return V;
|
|
933
937
|
}
|
|
934
938
|
}
|
|
935
|
-
function
|
|
936
|
-
u &&
|
|
939
|
+
function Ne() {
|
|
940
|
+
u && A && j === b.VERIFIED ? ee() : ge(b.EXPIRED, f.expired);
|
|
937
941
|
}
|
|
938
|
-
async function
|
|
939
|
-
let
|
|
942
|
+
async function ft(r) {
|
|
943
|
+
let a = null;
|
|
940
944
|
if ("Worker" in window) {
|
|
941
945
|
try {
|
|
942
|
-
|
|
946
|
+
a = await ct(r.challenge, r.salt, r.algorithm, r.maxnumber);
|
|
943
947
|
} catch (g) {
|
|
944
|
-
|
|
948
|
+
E(g);
|
|
945
949
|
}
|
|
946
|
-
if ((
|
|
947
|
-
return { data: r, solution:
|
|
950
|
+
if ((a == null ? void 0 : a.number) !== void 0)
|
|
951
|
+
return { data: r, solution: a };
|
|
948
952
|
}
|
|
949
953
|
return {
|
|
950
954
|
data: r,
|
|
951
|
-
solution: await
|
|
955
|
+
solution: await Zt(r.challenge, r.salt, r.algorithm, r.maxnumber || x).promise
|
|
952
956
|
};
|
|
953
957
|
}
|
|
954
|
-
async function
|
|
955
|
-
const
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
le !== C && le.postMessage({ type: "abort" });
|
|
969
|
-
de(ge.data);
|
|
970
|
-
}), C.postMessage({
|
|
958
|
+
async function ct(r, a, g, R = typeof _ == "number" ? _ : x, V = Math.ceil(oe)) {
|
|
959
|
+
const T = [];
|
|
960
|
+
V = Math.min(16, Math.max(1, V));
|
|
961
|
+
for (let L = 0; L < V; L++)
|
|
962
|
+
T.push(createAltchaWorker(ae));
|
|
963
|
+
const q = Math.ceil(R / V), v = await Promise.all(T.map((L, Ee) => {
|
|
964
|
+
const le = Ee * q;
|
|
965
|
+
return new Promise((me) => {
|
|
966
|
+
L.addEventListener("message", (be) => {
|
|
967
|
+
if (be.data)
|
|
968
|
+
for (const se of T)
|
|
969
|
+
se !== L && se.postMessage({ type: "abort" });
|
|
970
|
+
me(be.data);
|
|
971
|
+
}), L.postMessage({
|
|
971
972
|
payload: {
|
|
972
973
|
alg: g,
|
|
973
974
|
challenge: r,
|
|
974
|
-
max:
|
|
975
|
-
salt:
|
|
976
|
-
start:
|
|
975
|
+
max: le + q,
|
|
976
|
+
salt: a,
|
|
977
|
+
start: le
|
|
977
978
|
},
|
|
978
979
|
type: "work"
|
|
979
980
|
});
|
|
980
981
|
});
|
|
981
982
|
}));
|
|
982
|
-
for (const
|
|
983
|
-
|
|
984
|
-
return
|
|
985
|
-
}
|
|
986
|
-
function ct() {
|
|
987
|
-
[b.UNVERIFIED, b.ERROR, b.EXPIRED].includes(N) ? _ && (m == null ? void 0 : m.reportValidity()) === !1 ? t(7, G = !1) : K() : t(7, G = !0);
|
|
983
|
+
for (const L of T)
|
|
984
|
+
L.terminate();
|
|
985
|
+
return v.find((L) => !!L) || null;
|
|
988
986
|
}
|
|
989
|
-
function
|
|
990
|
-
|
|
991
|
-
v && c && !p.contains(c) && N === b.VERIFIED && t(8, p.style.display = "none", p);
|
|
987
|
+
function ut() {
|
|
988
|
+
[b.UNVERIFIED, b.ERROR, b.EXPIRED].includes(j) ? w && (m == null ? void 0 : m.reportValidity()) === !1 ? t(7, W = !1) : ee() : t(7, W = !0);
|
|
992
989
|
}
|
|
993
|
-
function je() {
|
|
994
|
-
|
|
990
|
+
function je(r) {
|
|
991
|
+
const a = r.target;
|
|
992
|
+
k && a && !C.contains(a) && j === b.VERIFIED && t(8, C.style.display = "none", C);
|
|
995
993
|
}
|
|
996
994
|
function Ve() {
|
|
997
|
-
|
|
995
|
+
k && ke();
|
|
996
|
+
}
|
|
997
|
+
function Fe() {
|
|
998
|
+
j === b.VERIFYING && f.waitAlert && alert(f.waitAlert);
|
|
998
999
|
}
|
|
999
|
-
function
|
|
1000
|
-
|
|
1000
|
+
function at(r) {
|
|
1001
|
+
k && j !== b.UNVERIFIED && requestAnimationFrame(() => {
|
|
1001
1002
|
ke();
|
|
1002
1003
|
});
|
|
1003
1004
|
}
|
|
1004
1005
|
function Pe() {
|
|
1005
|
-
|
|
1006
|
+
k && ke();
|
|
1006
1007
|
}
|
|
1007
|
-
function
|
|
1008
|
-
|
|
1008
|
+
function de(r) {
|
|
1009
|
+
E("expire", r), U && (clearTimeout(U), U = null), r < 1 ? Ne() : U = setTimeout(Ne, r);
|
|
1009
1010
|
}
|
|
1010
|
-
function
|
|
1011
|
-
|
|
1011
|
+
function He(r) {
|
|
1012
|
+
E("floating", r), k !== r && (t(8, C.style.left = "", C), t(8, C.style.top = "", C)), t(1, k = r === !0 || r === "" ? "auto" : r === !1 || r === "false" ? void 0 : k), k ? (c || t(0, c = "onsubmit"), document.addEventListener("scroll", Ve), document.addEventListener("click", je), window.addEventListener("resize", Pe)) : c === "onsubmit" && t(0, c = void 0);
|
|
1012
1013
|
}
|
|
1013
|
-
function
|
|
1014
|
+
function ht(r) {
|
|
1014
1015
|
var g;
|
|
1015
|
-
const
|
|
1016
|
-
return ((g =
|
|
1016
|
+
const a = m == null ? void 0 : m.querySelector(typeof r == "string" ? `input[name="${r}"]` : 'input[type="email"]:not([data-no-spamfilter])');
|
|
1017
|
+
return ((g = a == null ? void 0 : a.value) == null ? void 0 : g.slice(a.value.indexOf("@"))) || void 0;
|
|
1017
1018
|
}
|
|
1018
|
-
function
|
|
1019
|
+
function dt(r) {
|
|
1019
1020
|
return [
|
|
1020
1021
|
...(m == null ? void 0 : m.querySelectorAll(r != null && r.length ? r.map((g) => `input[name="${g}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
|
|
1021
1022
|
].reduce(
|
|
1022
1023
|
(g, R) => {
|
|
1023
|
-
const
|
|
1024
|
-
return
|
|
1024
|
+
const V = R.name, T = R.value;
|
|
1025
|
+
return V && T && (g[V] = /\n/.test(T) ? T.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
|
|
1026
|
+
`) : T), g;
|
|
1025
1027
|
},
|
|
1026
1028
|
{}
|
|
1027
1029
|
);
|
|
1028
1030
|
}
|
|
1029
|
-
async function
|
|
1030
|
-
if (!
|
|
1031
|
+
async function gt(r) {
|
|
1032
|
+
if (!z)
|
|
1031
1033
|
throw new Error("Attribute verifyurl not set.");
|
|
1032
|
-
|
|
1033
|
-
const
|
|
1034
|
-
if (
|
|
1035
|
-
const { blockedCountries:
|
|
1036
|
-
|
|
1037
|
-
classifier: void 0,
|
|
1038
|
-
disableRules: void 0,
|
|
1039
|
-
email: void 0,
|
|
1040
|
-
expectedCountries: void 0,
|
|
1041
|
-
expectedLanguages: void 0,
|
|
1042
|
-
fields: void 0,
|
|
1043
|
-
ipAddress: void 0,
|
|
1044
|
-
text: void 0,
|
|
1045
|
-
timeZone: void 0
|
|
1046
|
-
};
|
|
1047
|
-
c.blockedCountries = j, c.classifier = V, c.disableRules = q, c.email = k === !1 ? void 0 : at(k), c.expectedCountries = ve, c.expectedLanguages = C || (Ae ? [Ae] : void 0), c.fields = oe === !1 ? void 0 : ht(oe), c.ipAddress = de === !1 ? void 0 : de || "auto", c.text = ge, c.timeZone = le === !1 ? void 0 : le || Jt();
|
|
1034
|
+
E("requesting server verification from", z);
|
|
1035
|
+
const a = { payload: r };
|
|
1036
|
+
if (w) {
|
|
1037
|
+
const { blockedCountries: V, classifier: T, disableRules: q, email: v, expectedLanguages: L, expectedCountries: Ee, fields: le, ipAddress: me, text: be, timeZone: se } = mt();
|
|
1038
|
+
a.blockedCountries = V, a.classifier = T, a.disableRules = q, a.email = v === !1 ? void 0 : ht(v), a.expectedCountries = Ee, a.expectedLanguages = L || (Re ? [Re] : void 0), a.fields = le === !1 ? void 0 : dt(le), a.ipAddress = me === !1 ? void 0 : me || "auto", a.text = be, a.timeZone = se === !1 ? void 0 : se || Kt();
|
|
1048
1039
|
}
|
|
1049
|
-
const g = await fetch(
|
|
1050
|
-
body: JSON.stringify(
|
|
1040
|
+
const g = await fetch(z, {
|
|
1041
|
+
body: JSON.stringify(a),
|
|
1051
1042
|
headers: { "content-type": "application/json" },
|
|
1052
1043
|
method: "POST"
|
|
1053
1044
|
});
|
|
1054
1045
|
if (g.status !== 200)
|
|
1055
1046
|
throw new Error(`Server responded with ${g.status}.`);
|
|
1056
1047
|
const R = await g.json();
|
|
1057
|
-
if (R != null && R.payload && t(5,
|
|
1048
|
+
if (R != null && R.payload && t(5, Q = R.payload), ye("serververification", R), h && R.classification === "BAD")
|
|
1058
1049
|
throw new Error("SpamFilter returned negative classification.");
|
|
1059
1050
|
}
|
|
1051
|
+
function mt() {
|
|
1052
|
+
return w === "ipAddress" ? {
|
|
1053
|
+
blockedCountries: void 0,
|
|
1054
|
+
classifier: void 0,
|
|
1055
|
+
disableRules: void 0,
|
|
1056
|
+
email: !1,
|
|
1057
|
+
expectedCountries: void 0,
|
|
1058
|
+
expectedLanguages: void 0,
|
|
1059
|
+
fields: !1,
|
|
1060
|
+
ipAddress: void 0,
|
|
1061
|
+
text: void 0,
|
|
1062
|
+
timeZone: void 0
|
|
1063
|
+
} : typeof w == "object" ? w : {
|
|
1064
|
+
blockedCountries: void 0,
|
|
1065
|
+
classifier: void 0,
|
|
1066
|
+
disableRules: void 0,
|
|
1067
|
+
email: void 0,
|
|
1068
|
+
expectedCountries: void 0,
|
|
1069
|
+
expectedLanguages: void 0,
|
|
1070
|
+
fields: void 0,
|
|
1071
|
+
ipAddress: void 0,
|
|
1072
|
+
text: void 0,
|
|
1073
|
+
timeZone: void 0
|
|
1074
|
+
};
|
|
1075
|
+
}
|
|
1060
1076
|
function ke(r = 20) {
|
|
1061
|
-
if (
|
|
1062
|
-
if (
|
|
1063
|
-
const
|
|
1064
|
-
if (q ? t(8,
|
|
1065
|
-
const
|
|
1066
|
-
t(9,
|
|
1077
|
+
if (C)
|
|
1078
|
+
if (he || (he = (G ? document.querySelector(G) : m == null ? void 0 : m.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || m), he) {
|
|
1079
|
+
const a = parseInt($, 10) || 12, g = he.getBoundingClientRect(), R = C.getBoundingClientRect(), V = document.documentElement.clientHeight, T = document.documentElement.clientWidth, q = k === "auto" ? g.bottom + R.height + a + r > V : k === "top", v = Math.max(r, Math.min(T - r - R.width, g.left + g.width / 2 - R.width / 2));
|
|
1080
|
+
if (q ? t(8, C.style.top = `${g.top - (R.height + a)}px`, C) : t(8, C.style.top = `${g.bottom + a}px`, C), t(8, C.style.left = `${v}px`, C), C.setAttribute("data-floating", q ? "top" : "bottom"), K) {
|
|
1081
|
+
const L = K.getBoundingClientRect();
|
|
1082
|
+
t(9, K.style.left = g.left - v + g.width / 2 - L.width / 2 + "px", K);
|
|
1067
1083
|
}
|
|
1068
1084
|
} else
|
|
1069
|
-
|
|
1085
|
+
E("unable to find floating anchor element");
|
|
1070
1086
|
}
|
|
1071
|
-
function
|
|
1072
|
-
r.auto !== void 0 && (t(0,
|
|
1087
|
+
function Oe(r) {
|
|
1088
|
+
r.auto !== void 0 && (t(0, c = r.auto), c === "onload" && ee()), r.floatinganchor !== void 0 && t(19, G = r.floatinganchor), r.delay !== void 0 && t(17, B = r.delay), r.floatingoffset !== void 0 && t(20, $ = r.floatingoffset), r.floating !== void 0 && He(r.floating), r.expire !== void 0 && (de(r.expire), t(18, P = r.expire)), r.challenge && (De(r.challenge), l = r.challenge), r.challengeurl !== void 0 && t(15, u = r.challengeurl), r.debug !== void 0 && t(16, S = !!r.debug), r.hidefooter !== void 0 && t(2, J = !!r.hidefooter), r.hidelogo !== void 0 && t(3, Z = !!r.hidelogo), r.maxnumber !== void 0 && t(21, x = +r.maxnumber), r.mockerror !== void 0 && t(22, I = !!r.mockerror), r.name !== void 0 && t(4, N = r.name), r.refetchonexpire !== void 0 && t(23, A = !!r.refetchonexpire), r.spamfilter !== void 0 && t(24, w = typeof r.spamfilter == "object" ? r.spamfilter : !!r.spamfilter), r.strings && t(35, o = r.strings), r.test !== void 0 && t(25, _ = typeof r.test == "number" ? r.test : !!r.test), r.verifyurl !== void 0 && t(26, z = r.verifyurl), r.workers !== void 0 && t(27, oe = +r.workers), r.workerurl !== void 0 && t(28, ae = r.workerurl);
|
|
1073
1089
|
}
|
|
1074
|
-
function
|
|
1075
|
-
U && (clearTimeout(U), U = null), t(7,
|
|
1090
|
+
function ge(r = b.UNVERIFIED, a = null) {
|
|
1091
|
+
U && (clearTimeout(U), U = null), t(7, W = !1), t(10, ve = a), t(5, Q = null), t(6, j = r);
|
|
1076
1092
|
}
|
|
1077
|
-
async function
|
|
1078
|
-
return
|
|
1079
|
-
if (
|
|
1080
|
-
if (
|
|
1081
|
-
return
|
|
1082
|
-
t(5,
|
|
1093
|
+
async function ee() {
|
|
1094
|
+
return ge(b.VERIFYING), await new Promise((r) => setTimeout(r, B || 0)), st().then((r) => (De(r), E("challenge", r), ft(r))).then(({ data: r, solution: a }) => {
|
|
1095
|
+
if (E("solution", a), (a == null ? void 0 : a.number) !== void 0) {
|
|
1096
|
+
if (z)
|
|
1097
|
+
return gt(Te(r, a));
|
|
1098
|
+
t(5, Q = Te(r, a)), E("payload", Q);
|
|
1083
1099
|
} else
|
|
1084
|
-
throw
|
|
1100
|
+
throw E("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
|
|
1085
1101
|
}).then(() => {
|
|
1086
|
-
|
|
1087
|
-
t(6,
|
|
1102
|
+
$t().then(() => {
|
|
1103
|
+
t(6, j = b.VERIFIED), t(7, W = !0), E("verified"), ye("verified", { payload: Q });
|
|
1088
1104
|
});
|
|
1089
1105
|
}).catch((r) => {
|
|
1090
|
-
|
|
1106
|
+
E(r), t(6, j = b.ERROR), t(7, W = !1), t(10, ve = r.message);
|
|
1091
1107
|
});
|
|
1092
1108
|
}
|
|
1093
|
-
function
|
|
1094
|
-
|
|
1109
|
+
function bt() {
|
|
1110
|
+
W = this.checked, t(7, W);
|
|
1095
1111
|
}
|
|
1096
|
-
function
|
|
1097
|
-
|
|
1098
|
-
|
|
1112
|
+
function _t(r) {
|
|
1113
|
+
we[r ? "unshift" : "push"](() => {
|
|
1114
|
+
K = r, t(9, K);
|
|
1099
1115
|
});
|
|
1100
1116
|
}
|
|
1101
|
-
function
|
|
1102
|
-
|
|
1103
|
-
|
|
1117
|
+
function wt(r) {
|
|
1118
|
+
we[r ? "unshift" : "push"](() => {
|
|
1119
|
+
C = r, t(8, C);
|
|
1104
1120
|
});
|
|
1105
1121
|
}
|
|
1106
1122
|
return n.$$set = (r) => {
|
|
1107
|
-
"auto" in r && t(0,
|
|
1123
|
+
"auto" in r && t(0, c = r.auto), "blockspam" in r && t(29, h = r.blockspam), "challengeurl" in r && t(15, u = r.challengeurl), "challengejson" in r && t(30, H = r.challengejson), "debug" in r && t(16, S = r.debug), "delay" in r && t(17, B = r.delay), "expire" in r && t(18, P = r.expire), "floating" in r && t(1, k = r.floating), "floatinganchor" in r && t(19, G = r.floatinganchor), "floatingoffset" in r && t(20, $ = r.floatingoffset), "hidefooter" in r && t(2, J = r.hidefooter), "hidelogo" in r && t(3, Z = r.hidelogo), "name" in r && t(4, N = r.name), "maxnumber" in r && t(21, x = r.maxnumber), "mockerror" in r && t(22, I = r.mockerror), "refetchonexpire" in r && t(23, A = r.refetchonexpire), "spamfilter" in r && t(24, w = r.spamfilter), "strings" in r && t(31, d = r.strings), "test" in r && t(25, _ = r.test), "verifyurl" in r && t(26, z = r.verifyurl), "workers" in r && t(27, oe = r.workers), "workerurl" in r && t(28, ae = r.workerurl);
|
|
1108
1124
|
}, n.$$.update = () => {
|
|
1109
|
-
n.$$.dirty[0] & /*
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1125
|
+
n.$$.dirty[0] & /*challengeurl*/
|
|
1126
|
+
32768 && t(12, i = !!(u != null && u.includes(".altcha.org")) && !!(u != null && u.includes("apiKey=ckey_"))), n.$$.dirty[0] & /*challengejson*/
|
|
1127
|
+
1073741824 && (l = H ? Qe(H) : void 0), n.$$.dirty[1] & /*strings*/
|
|
1128
|
+
1 && t(35, o = d ? Qe(d) : {}), n.$$.dirty[1] & /*parsedStrings*/
|
|
1129
|
+
16 && t(11, f = {
|
|
1130
|
+
ariaLinkLabel: Ke,
|
|
1114
1131
|
error: "Verification failed. Try again later.",
|
|
1115
1132
|
expired: "Verification expired. Try again.",
|
|
1116
|
-
footer: `Protected by <a href="${
|
|
1133
|
+
footer: `Protected by <a href="${lt}" target="_blank" aria-label="${o.ariaLinkLabel || Ke}">ALTCHA</a>`,
|
|
1117
1134
|
label: "I'm not a robot",
|
|
1118
1135
|
verified: "Verified",
|
|
1119
1136
|
verifying: "Verifying...",
|
|
1120
1137
|
waitAlert: "Verifying... please wait.",
|
|
1121
|
-
...
|
|
1138
|
+
...o
|
|
1122
1139
|
}), n.$$.dirty[0] & /*payload, state*/
|
|
1123
|
-
96 &&
|
|
1124
|
-
64 &&
|
|
1140
|
+
96 && ye("statechange", { payload: Q, state: j }), n.$$.dirty[0] & /*state*/
|
|
1141
|
+
64 && at();
|
|
1125
1142
|
}, [
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
M,
|
|
1129
|
-
Q,
|
|
1130
|
-
Y,
|
|
1131
|
-
z,
|
|
1132
|
-
N,
|
|
1133
|
-
G,
|
|
1134
|
-
p,
|
|
1143
|
+
c,
|
|
1144
|
+
k,
|
|
1135
1145
|
J,
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1146
|
+
Z,
|
|
1147
|
+
N,
|
|
1148
|
+
Q,
|
|
1149
|
+
j,
|
|
1150
|
+
W,
|
|
1151
|
+
C,
|
|
1152
|
+
K,
|
|
1153
|
+
ve,
|
|
1154
|
+
f,
|
|
1155
|
+
i,
|
|
1156
|
+
ut,
|
|
1157
|
+
Fe,
|
|
1140
1158
|
u,
|
|
1141
|
-
H,
|
|
1142
|
-
T,
|
|
1143
|
-
F,
|
|
1144
|
-
O,
|
|
1145
|
-
X,
|
|
1146
1159
|
S,
|
|
1147
|
-
|
|
1160
|
+
B,
|
|
1161
|
+
P,
|
|
1162
|
+
G,
|
|
1163
|
+
$,
|
|
1164
|
+
x,
|
|
1148
1165
|
I,
|
|
1166
|
+
A,
|
|
1167
|
+
w,
|
|
1149
1168
|
_,
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
a,
|
|
1169
|
+
z,
|
|
1170
|
+
oe,
|
|
1171
|
+
ae,
|
|
1154
1172
|
h,
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1173
|
+
H,
|
|
1174
|
+
d,
|
|
1175
|
+
Oe,
|
|
1176
|
+
ge,
|
|
1177
|
+
ee,
|
|
1178
|
+
o,
|
|
1179
|
+
bt,
|
|
1180
|
+
_t,
|
|
1181
|
+
wt
|
|
1164
1182
|
];
|
|
1165
1183
|
}
|
|
1166
|
-
class
|
|
1184
|
+
class en extends Ht {
|
|
1167
1185
|
constructor(e) {
|
|
1168
|
-
super(),
|
|
1186
|
+
super(), Ft(
|
|
1169
1187
|
this,
|
|
1170
1188
|
e,
|
|
1189
|
+
Qt,
|
|
1171
1190
|
zt,
|
|
1172
|
-
|
|
1173
|
-
yt,
|
|
1191
|
+
kt,
|
|
1174
1192
|
{
|
|
1175
1193
|
auto: 0,
|
|
1176
|
-
blockspam:
|
|
1177
|
-
challengeurl:
|
|
1178
|
-
challengejson:
|
|
1179
|
-
debug:
|
|
1180
|
-
delay:
|
|
1181
|
-
expire:
|
|
1194
|
+
blockspam: 29,
|
|
1195
|
+
challengeurl: 15,
|
|
1196
|
+
challengejson: 30,
|
|
1197
|
+
debug: 16,
|
|
1198
|
+
delay: 17,
|
|
1199
|
+
expire: 18,
|
|
1182
1200
|
floating: 1,
|
|
1183
|
-
floatinganchor:
|
|
1184
|
-
floatingoffset:
|
|
1201
|
+
floatinganchor: 19,
|
|
1202
|
+
floatingoffset: 20,
|
|
1185
1203
|
hidefooter: 2,
|
|
1186
1204
|
hidelogo: 3,
|
|
1187
1205
|
name: 4,
|
|
1188
|
-
maxnumber:
|
|
1189
|
-
mockerror:
|
|
1190
|
-
refetchonexpire:
|
|
1191
|
-
spamfilter:
|
|
1192
|
-
strings:
|
|
1193
|
-
test:
|
|
1194
|
-
verifyurl:
|
|
1195
|
-
workers:
|
|
1196
|
-
workerurl:
|
|
1197
|
-
configure:
|
|
1198
|
-
reset:
|
|
1199
|
-
verify:
|
|
1206
|
+
maxnumber: 21,
|
|
1207
|
+
mockerror: 22,
|
|
1208
|
+
refetchonexpire: 23,
|
|
1209
|
+
spamfilter: 24,
|
|
1210
|
+
strings: 31,
|
|
1211
|
+
test: 25,
|
|
1212
|
+
verifyurl: 26,
|
|
1213
|
+
workers: 27,
|
|
1214
|
+
workerurl: 28,
|
|
1215
|
+
configure: 32,
|
|
1216
|
+
reset: 33,
|
|
1217
|
+
verify: 34
|
|
1200
1218
|
},
|
|
1201
1219
|
null,
|
|
1202
1220
|
[-1, -1, -1]
|
|
@@ -1206,146 +1224,146 @@ class Kt extends Pt {
|
|
|
1206
1224
|
return this.$$.ctx[0];
|
|
1207
1225
|
}
|
|
1208
1226
|
set auto(e) {
|
|
1209
|
-
this.$$set({ auto: e }),
|
|
1227
|
+
this.$$set({ auto: e }), y();
|
|
1210
1228
|
}
|
|
1211
1229
|
get blockspam() {
|
|
1212
|
-
return this.$$.ctx[
|
|
1230
|
+
return this.$$.ctx[29];
|
|
1213
1231
|
}
|
|
1214
1232
|
set blockspam(e) {
|
|
1215
|
-
this.$$set({ blockspam: e }),
|
|
1233
|
+
this.$$set({ blockspam: e }), y();
|
|
1216
1234
|
}
|
|
1217
1235
|
get challengeurl() {
|
|
1218
|
-
return this.$$.ctx[
|
|
1236
|
+
return this.$$.ctx[15];
|
|
1219
1237
|
}
|
|
1220
1238
|
set challengeurl(e) {
|
|
1221
|
-
this.$$set({ challengeurl: e }),
|
|
1239
|
+
this.$$set({ challengeurl: e }), y();
|
|
1222
1240
|
}
|
|
1223
1241
|
get challengejson() {
|
|
1224
|
-
return this.$$.ctx[
|
|
1242
|
+
return this.$$.ctx[30];
|
|
1225
1243
|
}
|
|
1226
1244
|
set challengejson(e) {
|
|
1227
|
-
this.$$set({ challengejson: e }),
|
|
1245
|
+
this.$$set({ challengejson: e }), y();
|
|
1228
1246
|
}
|
|
1229
1247
|
get debug() {
|
|
1230
|
-
return this.$$.ctx[
|
|
1248
|
+
return this.$$.ctx[16];
|
|
1231
1249
|
}
|
|
1232
1250
|
set debug(e) {
|
|
1233
|
-
this.$$set({ debug: e }),
|
|
1251
|
+
this.$$set({ debug: e }), y();
|
|
1234
1252
|
}
|
|
1235
1253
|
get delay() {
|
|
1236
|
-
return this.$$.ctx[
|
|
1254
|
+
return this.$$.ctx[17];
|
|
1237
1255
|
}
|
|
1238
1256
|
set delay(e) {
|
|
1239
|
-
this.$$set({ delay: e }),
|
|
1257
|
+
this.$$set({ delay: e }), y();
|
|
1240
1258
|
}
|
|
1241
1259
|
get expire() {
|
|
1242
|
-
return this.$$.ctx[
|
|
1260
|
+
return this.$$.ctx[18];
|
|
1243
1261
|
}
|
|
1244
1262
|
set expire(e) {
|
|
1245
|
-
this.$$set({ expire: e }),
|
|
1263
|
+
this.$$set({ expire: e }), y();
|
|
1246
1264
|
}
|
|
1247
1265
|
get floating() {
|
|
1248
1266
|
return this.$$.ctx[1];
|
|
1249
1267
|
}
|
|
1250
1268
|
set floating(e) {
|
|
1251
|
-
this.$$set({ floating: e }),
|
|
1269
|
+
this.$$set({ floating: e }), y();
|
|
1252
1270
|
}
|
|
1253
1271
|
get floatinganchor() {
|
|
1254
|
-
return this.$$.ctx[
|
|
1272
|
+
return this.$$.ctx[19];
|
|
1255
1273
|
}
|
|
1256
1274
|
set floatinganchor(e) {
|
|
1257
|
-
this.$$set({ floatinganchor: e }),
|
|
1275
|
+
this.$$set({ floatinganchor: e }), y();
|
|
1258
1276
|
}
|
|
1259
1277
|
get floatingoffset() {
|
|
1260
|
-
return this.$$.ctx[
|
|
1278
|
+
return this.$$.ctx[20];
|
|
1261
1279
|
}
|
|
1262
1280
|
set floatingoffset(e) {
|
|
1263
|
-
this.$$set({ floatingoffset: e }),
|
|
1281
|
+
this.$$set({ floatingoffset: e }), y();
|
|
1264
1282
|
}
|
|
1265
1283
|
get hidefooter() {
|
|
1266
1284
|
return this.$$.ctx[2];
|
|
1267
1285
|
}
|
|
1268
1286
|
set hidefooter(e) {
|
|
1269
|
-
this.$$set({ hidefooter: e }),
|
|
1287
|
+
this.$$set({ hidefooter: e }), y();
|
|
1270
1288
|
}
|
|
1271
1289
|
get hidelogo() {
|
|
1272
1290
|
return this.$$.ctx[3];
|
|
1273
1291
|
}
|
|
1274
1292
|
set hidelogo(e) {
|
|
1275
|
-
this.$$set({ hidelogo: e }),
|
|
1293
|
+
this.$$set({ hidelogo: e }), y();
|
|
1276
1294
|
}
|
|
1277
1295
|
get name() {
|
|
1278
1296
|
return this.$$.ctx[4];
|
|
1279
1297
|
}
|
|
1280
1298
|
set name(e) {
|
|
1281
|
-
this.$$set({ name: e }),
|
|
1299
|
+
this.$$set({ name: e }), y();
|
|
1282
1300
|
}
|
|
1283
1301
|
get maxnumber() {
|
|
1284
|
-
return this.$$.ctx[
|
|
1302
|
+
return this.$$.ctx[21];
|
|
1285
1303
|
}
|
|
1286
1304
|
set maxnumber(e) {
|
|
1287
|
-
this.$$set({ maxnumber: e }),
|
|
1305
|
+
this.$$set({ maxnumber: e }), y();
|
|
1288
1306
|
}
|
|
1289
1307
|
get mockerror() {
|
|
1290
|
-
return this.$$.ctx[
|
|
1308
|
+
return this.$$.ctx[22];
|
|
1291
1309
|
}
|
|
1292
1310
|
set mockerror(e) {
|
|
1293
|
-
this.$$set({ mockerror: e }),
|
|
1311
|
+
this.$$set({ mockerror: e }), y();
|
|
1294
1312
|
}
|
|
1295
1313
|
get refetchonexpire() {
|
|
1296
|
-
return this.$$.ctx[
|
|
1314
|
+
return this.$$.ctx[23];
|
|
1297
1315
|
}
|
|
1298
1316
|
set refetchonexpire(e) {
|
|
1299
|
-
this.$$set({ refetchonexpire: e }),
|
|
1317
|
+
this.$$set({ refetchonexpire: e }), y();
|
|
1300
1318
|
}
|
|
1301
1319
|
get spamfilter() {
|
|
1302
|
-
return this.$$.ctx[
|
|
1320
|
+
return this.$$.ctx[24];
|
|
1303
1321
|
}
|
|
1304
1322
|
set spamfilter(e) {
|
|
1305
|
-
this.$$set({ spamfilter: e }),
|
|
1323
|
+
this.$$set({ spamfilter: e }), y();
|
|
1306
1324
|
}
|
|
1307
1325
|
get strings() {
|
|
1308
|
-
return this.$$.ctx[
|
|
1326
|
+
return this.$$.ctx[31];
|
|
1309
1327
|
}
|
|
1310
1328
|
set strings(e) {
|
|
1311
|
-
this.$$set({ strings: e }),
|
|
1329
|
+
this.$$set({ strings: e }), y();
|
|
1312
1330
|
}
|
|
1313
1331
|
get test() {
|
|
1314
|
-
return this.$$.ctx[
|
|
1332
|
+
return this.$$.ctx[25];
|
|
1315
1333
|
}
|
|
1316
1334
|
set test(e) {
|
|
1317
|
-
this.$$set({ test: e }),
|
|
1335
|
+
this.$$set({ test: e }), y();
|
|
1318
1336
|
}
|
|
1319
1337
|
get verifyurl() {
|
|
1320
|
-
return this.$$.ctx[
|
|
1338
|
+
return this.$$.ctx[26];
|
|
1321
1339
|
}
|
|
1322
1340
|
set verifyurl(e) {
|
|
1323
|
-
this.$$set({ verifyurl: e }),
|
|
1341
|
+
this.$$set({ verifyurl: e }), y();
|
|
1324
1342
|
}
|
|
1325
1343
|
get workers() {
|
|
1326
|
-
return this.$$.ctx[
|
|
1344
|
+
return this.$$.ctx[27];
|
|
1327
1345
|
}
|
|
1328
1346
|
set workers(e) {
|
|
1329
|
-
this.$$set({ workers: e }),
|
|
1347
|
+
this.$$set({ workers: e }), y();
|
|
1330
1348
|
}
|
|
1331
1349
|
get workerurl() {
|
|
1332
|
-
return this.$$.ctx[
|
|
1350
|
+
return this.$$.ctx[28];
|
|
1333
1351
|
}
|
|
1334
1352
|
set workerurl(e) {
|
|
1335
|
-
this.$$set({ workerurl: e }),
|
|
1353
|
+
this.$$set({ workerurl: e }), y();
|
|
1336
1354
|
}
|
|
1337
1355
|
get configure() {
|
|
1338
|
-
return this.$$.ctx[
|
|
1356
|
+
return this.$$.ctx[32];
|
|
1339
1357
|
}
|
|
1340
1358
|
get reset() {
|
|
1341
|
-
return this.$$.ctx[
|
|
1359
|
+
return this.$$.ctx[33];
|
|
1342
1360
|
}
|
|
1343
1361
|
get verify() {
|
|
1344
|
-
return this.$$.ctx[
|
|
1362
|
+
return this.$$.ctx[34];
|
|
1345
1363
|
}
|
|
1346
1364
|
}
|
|
1347
|
-
customElements.define("altcha-widget",
|
|
1365
|
+
customElements.define("altcha-widget", Pt(en, { auto: {}, blockspam: {}, challengeurl: {}, challengejson: {}, debug: { type: "Boolean" }, delay: {}, expire: {}, floating: {}, floatinganchor: {}, floatingoffset: {}, hidefooter: { type: "Boolean" }, hidelogo: { type: "Boolean" }, name: {}, maxnumber: {}, mockerror: { type: "Boolean" }, refetchonexpire: { type: "Boolean" }, spamfilter: { type: "Boolean" }, strings: {}, test: { type: "Boolean" }, verifyurl: {}, workers: {}, workerurl: {} }, [], ["configure", "reset", "verify"], !1));
|
|
1348
1366
|
globalThis.createAltchaWorker = (n) => new Worker(new URL(n || "./worker.js", import.meta.url));
|
|
1349
1367
|
export {
|
|
1350
|
-
|
|
1368
|
+
en as Altcha
|
|
1351
1369
|
};
|