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