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