leesto-connect 0.7.0 → 0.8.1

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.
@@ -1,62 +1,66 @@
1
- var Mt = "login", xt = "rrweb-buffer", Dt = "ambient", Pt = "login-anchor", Ft = 6e3, $t = 3e3;
2
- function Bt(e) {
1
+ var Bt = "login", qt = "rrweb-buffer", Ut = "ambient", Ht = "login-anchor", Gt = ["ArrowDown", "Escape"];
2
+ function Wt(e) {
3
+ return Gt.includes(e);
4
+ }
5
+ var Vt = 6e3, zt = 3e3;
6
+ function Kt(e) {
3
7
  return typeof e == "object" && e !== null && typeof e.type == "string" && e.type.startsWith("leesto:");
4
8
  }
5
- var qt = [
9
+ var jt = [
6
10
  "mask_all",
7
11
  "labels_visible",
8
12
  "inputs_only"
9
- ], ve = "mask_all";
10
- function Ht(e) {
11
- return typeof e == "string" && qt.includes(e);
13
+ ], Ie = "mask_all";
14
+ function Xt(e) {
15
+ return typeof e == "string" && jt.includes(e);
12
16
  }
13
- var Ut = "leesto_diag", Gt = "leesto_run", Ye = "X-Leesto-Run-Id", Wt = "leesto_mask", Vt = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
14
- function de(e) {
15
- return typeof e == "string" && Vt.test(e);
17
+ var Yt = "leesto_diag", Zt = "leesto_run", Je = "X-Leesto-Run-Id", Qt = "leesto_mask", Jt = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
18
+ function we(e) {
19
+ return typeof e == "string" && Jt.test(e);
16
20
  }
17
- function zt() {
21
+ function en() {
18
22
  try {
19
23
  const e = globalThis.crypto, t = e?.randomUUID?.();
20
- if (de(t)) return t;
24
+ if (we(t)) return t;
21
25
  if (!e?.getRandomValues) return;
22
26
  const n = e.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
23
27
  n[6] = (n[6] ?? 0) & 15 | 64, n[8] = (n[8] ?? 0) & 63 | 128;
24
28
  const r = Array.from(n, (i) => i.toString(16).padStart(2, "0")).join(""), o = `${r.slice(0, 8)}-${r.slice(8, 12)}-${r.slice(12, 16)}-${r.slice(16, 20)}-${r.slice(20)}`;
25
- return de(o) ? o : void 0;
29
+ return we(o) ? o : void 0;
26
30
  } catch {
27
31
  return;
28
32
  }
29
33
  }
30
- function jt(e) {
34
+ function tn(e) {
31
35
  try {
32
- const t = new URLSearchParams(e).getAll(Wt), [n] = t;
33
- return t.some((r) => r !== n) ? ve : Ht(n) ? n : ve;
36
+ const t = new URLSearchParams(e).getAll(Qt), [n] = t;
37
+ return t.some((r) => r !== n) ? Ie : Xt(n) ? n : Ie;
34
38
  } catch {
35
- return ve;
39
+ return Ie;
36
40
  }
37
41
  }
38
- function Xt(e) {
42
+ function nn(e) {
39
43
  try {
40
- const t = new URLSearchParams(e).get(Gt);
41
- return de(t) ? t : void 0;
44
+ const t = new URLSearchParams(e).get(Zt);
45
+ return we(t) ? t : void 0;
42
46
  } catch {
43
47
  return;
44
48
  }
45
49
  }
46
- function Le(e) {
50
+ function xe(e) {
47
51
  try {
48
- return new URLSearchParams(e).get(Ut) === "1";
52
+ return new URLSearchParams(e).get(Yt) === "1";
49
53
  } catch {
50
54
  return !1;
51
55
  }
52
56
  }
53
- function Kt(e, t) {
54
- if (Le(e)) return e;
57
+ function rn(e, t) {
58
+ if (xe(e)) return e;
55
59
  if (typeof t != "string" || !t.startsWith("leesto-arming?")) return "";
56
60
  const n = `?${t.slice(14)}`;
57
- return Le(n) ? n : "";
61
+ return xe(n) ? n : "";
58
62
  }
59
- function mt(e) {
63
+ function yt(e) {
60
64
  try {
61
65
  const t = new URL(e);
62
66
  return `${t.origin}${t.pathname}`;
@@ -64,28 +68,28 @@ function mt(e) {
64
68
  return e.split(/[?#]/)[0] ?? e;
65
69
  }
66
70
  }
67
- var Ze = "leesto/console", Yt = "leesto/network", Zt = "leesto/network-ring", Qt = "leesto/console-ring", Jt = {
71
+ var et = "leesto/console", on = "leesto/network", sn = "leesto/network-ring", an = "leesto/console-ring", ln = {
68
72
  primary: "#08783f",
69
73
  hover: "#066633",
70
74
  foreground: "#f3fff7"
71
- }, en = {
75
+ }, cn = {
72
76
  primary: "#46c383",
73
77
  hover: "#65d49b",
74
78
  foreground: "#082315"
75
- }, tn = {
76
- light: Jt,
77
- dark: en
78
- }, B = (e) => Math.min(1, Math.max(0, e));
79
- function Re(e, [t, n, r]) {
79
+ }, un = {
80
+ light: ln,
81
+ dark: cn
82
+ }, V = (e) => Math.min(1, Math.max(0, e));
83
+ function Fe(e, [t, n, r]) {
80
84
  return e.map((o) => o[0] * t + o[1] * n + o[2] * r);
81
85
  }
82
- var Y = (e) => {
86
+ var te = (e) => {
83
87
  const t = Math.abs(e);
84
88
  return t <= 0.04045 ? e / 12.92 : Math.sign(e) * ((t + 0.055) / 1.055) ** 2.4;
85
- }, we = (e) => {
89
+ }, Re = (e) => {
86
90
  const t = Math.abs(e);
87
91
  return t <= 31308e-7 ? e * 12.92 : Math.sign(e) * (1.055 * t ** (1 / 2.4) - 0.055);
88
- }, nn = [
92
+ }, fn = [
89
93
  [
90
94
  1.2249401762805598,
91
95
  -0.22494017628055996,
@@ -101,7 +105,7 @@ var Y = (e) => {
101
105
  -0.07863604555063188,
102
106
  1.0982736001409663
103
107
  ]
104
- ], rn = [
108
+ ], dn = [
105
109
  [
106
110
  0.955473421488075,
107
111
  -0.02309845494876471,
@@ -117,7 +121,7 @@ var Y = (e) => {
117
121
  -0.020507649298898964,
118
122
  1.330365926242124
119
123
  ]
120
- ], on = [
124
+ ], pn = [
121
125
  [
122
126
  3.2409699419045226,
123
127
  -1.537383177570094,
@@ -133,20 +137,20 @@ var Y = (e) => {
133
137
  -0.20397695888897652,
134
138
  1.0569715142428786
135
139
  ]
136
- ], Ee = [
140
+ ], Ne = [
137
141
  0.3457 / 0.3585,
138
142
  1,
139
143
  0.2958 / 0.3585
140
144
  ];
141
- function ie([e, t, n], r) {
145
+ function pe([e, t, n], r) {
142
146
  return {
143
- r: B(we(e)),
144
- g: B(we(t)),
145
- b: B(we(n)),
146
- a: B(r)
147
+ r: V(Re(e)),
148
+ g: V(Re(t)),
149
+ b: V(Re(n)),
150
+ a: V(r)
147
151
  };
148
152
  }
149
- function Qe(e, t, n) {
153
+ function tt(e, t, n) {
150
154
  const r = (e + 0.3963377774 * t + 0.2158037573 * n) ** 3, o = (e - 0.1055613458 * t - 0.0638541728 * n) ** 3, i = (e - 0.0894841775 * t - 1.291485548 * n) ** 3;
151
155
  return [
152
156
  4.0767416621 * r - 3.3077115913 * o + 0.2309699292 * i,
@@ -154,22 +158,22 @@ function Qe(e, t, n) {
154
158
  -0.0041960863 * r - 0.7034186147 * o + 1.707614701 * i
155
159
  ];
156
160
  }
157
- function Je(e, t, n) {
158
- const r = 903.2962962962963, o = 216 / 24389, i = (e + 16) / 116, l = i + t / 500, c = i - n / 200, s = l ** 3 > o ? l ** 3 : (116 * l - 16) / r, a = e > r * o ? i ** 3 : e / r, u = c ** 3 > o ? c ** 3 : (116 * c - 16) / r, d = [
159
- s * Ee[0],
160
- a * Ee[1],
161
- u * Ee[2]
161
+ function nt(e, t, n) {
162
+ const r = 903.2962962962963, o = 216 / 24389, i = (e + 16) / 116, l = i + t / 500, c = i - n / 200, s = l ** 3 > o ? l ** 3 : (116 * l - 16) / r, a = e > r * o ? i ** 3 : e / r, u = c ** 3 > o ? c ** 3 : (116 * c - 16) / r, f = [
163
+ s * Ne[0],
164
+ a * Ne[1],
165
+ u * Ne[2]
162
166
  ];
163
- return Re(on, Re(rn, d));
167
+ return Fe(pn, Fe(dn, f));
164
168
  }
165
- function $(e, t) {
169
+ function W(e, t) {
166
170
  if (e === void 0) return null;
167
171
  if (e === "none") return 0;
168
172
  const n = Number.parseFloat(e);
169
173
  return Number.isFinite(n) ? e.endsWith("%") ? n / 100 * t : n : null;
170
174
  }
171
- var sn = /^(rgba?|oklch|oklab|lab|lch|color)\((.*)\)$/, an = /^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/;
172
- function ln(e) {
175
+ var mn = /^(rgba?|oklch|oklab|lab|lch|color)\((.*)\)$/, hn = /^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/;
176
+ function gn(e) {
173
177
  const t = e.length <= 4 ? [...e].map((r) => r + r).join("") : e, n = (r) => Number.parseInt(t.slice(r * 2, r * 2 + 2), 16) / 255;
174
178
  return {
175
179
  r: n(0),
@@ -178,7 +182,7 @@ function ln(e) {
178
182
  a: t.length === 8 ? n(3) : 1
179
183
  };
180
184
  }
181
- function Pe(e) {
185
+ function We(e) {
182
186
  const t = e.trim().toLowerCase();
183
187
  if (t === "transparent") return {
184
188
  r: 0,
@@ -186,61 +190,61 @@ function Pe(e) {
186
190
  b: 0,
187
191
  a: 0
188
192
  };
189
- const n = an.exec(t);
190
- if (n) return ln(n[1] ?? "");
191
- const r = sn.exec(t);
193
+ const n = hn.exec(t);
194
+ if (n) return gn(n[1] ?? "");
195
+ const r = mn.exec(t);
192
196
  if (!r) return null;
193
- const o = r[1], [i = "", l] = (r[2] ?? "").split("/"), c = i.split(/[\s,]+/).filter(Boolean), s = l?.trim() ?? (o === "color" ? void 0 : c[3]), a = s === void 0 ? 1 : $(s, 1);
197
+ const o = r[1], [i = "", l] = (r[2] ?? "").split("/"), c = i.split(/[\s,]+/).filter(Boolean), s = l?.trim() ?? (o === "color" ? void 0 : c[3]), a = s === void 0 ? 1 : W(s, 1);
194
198
  if (a === null) return null;
195
199
  if (o === "color") {
196
- const S = c[0], [v, _, L] = [
197
- $(c[1], 1),
198
- $(c[2], 1),
199
- $(c[3], 1)
200
+ const v = c[0], [E, A, L] = [
201
+ W(c[1], 1),
202
+ W(c[2], 1),
203
+ W(c[3], 1)
200
204
  ];
201
- return v === null || _ === null || L === null ? null : S === "srgb" ? {
202
- r: B(v),
203
- g: B(_),
204
- b: B(L),
205
- a: B(a)
206
- } : S === "srgb-linear" ? ie([
207
- v,
208
- _,
205
+ return E === null || A === null || L === null ? null : v === "srgb" ? {
206
+ r: V(E),
207
+ g: V(A),
208
+ b: V(L),
209
+ a: V(a)
210
+ } : v === "srgb-linear" ? pe([
211
+ E,
212
+ A,
209
213
  L
210
- ], a) : S === "display-p3" ? ie(Re(nn, [
211
- Y(v),
212
- Y(_),
213
- Y(L)
214
+ ], a) : v === "display-p3" ? pe(Fe(fn, [
215
+ te(E),
216
+ te(A),
217
+ te(L)
214
218
  ]), a) : null;
215
219
  }
216
220
  if (o === "rgb" || o === "rgba") {
217
- const [S, v, _] = [
218
- $(c[0], 255),
219
- $(c[1], 255),
220
- $(c[2], 255)
221
+ const [v, E, A] = [
222
+ W(c[0], 255),
223
+ W(c[1], 255),
224
+ W(c[2], 255)
221
225
  ];
222
- return S === null || v === null || _ === null ? null : {
223
- r: B(S / 255),
224
- g: B(v / 255),
225
- b: B(_ / 255),
226
- a: B(a)
226
+ return v === null || E === null || A === null ? null : {
227
+ r: V(v / 255),
228
+ g: V(E / 255),
229
+ b: V(A / 255),
230
+ a: V(a)
227
231
  };
228
232
  }
229
- const u = o === "lab" || o === "lch", d = $(c[0], u ? 100 : 1);
230
- if (d === null) return null;
233
+ const u = o === "lab" || o === "lch", f = W(c[0], u ? 100 : 1);
234
+ if (f === null) return null;
231
235
  if (o === "oklab" || o === "lab") {
232
- const [S, v] = [$(c[1], u ? 125 : 0.4), $(c[2], u ? 125 : 0.4)];
233
- return S === null || v === null ? null : ie(u ? Je(d, S, v) : Qe(d, S, v), a);
236
+ const [v, E] = [W(c[1], u ? 125 : 0.4), W(c[2], u ? 125 : 0.4)];
237
+ return v === null || E === null ? null : pe(u ? nt(f, v, E) : tt(f, v, E), a);
234
238
  }
235
- const [p, h] = [$(c[1], u ? 150 : 0.4), $(c[2], 1)];
236
- if (p === null || h === null) return null;
237
- const b = h * Math.PI / 180, [E, A] = [p * Math.cos(b), p * Math.sin(b)];
238
- return ie(u ? Je(d, E, A) : Qe(d, E, A), a);
239
+ const [d, m] = [W(c[1], u ? 150 : 0.4), W(c[2], 1)];
240
+ if (d === null || m === null) return null;
241
+ const y = m * Math.PI / 180, [T, I] = [d * Math.cos(y), d * Math.sin(y)];
242
+ return pe(u ? nt(f, T, I) : tt(f, T, I), a);
239
243
  }
240
- var cn = /(?:rgba?|oklch|oklab|lab|lch|color)\([^()]*\)|\btransparent\b/g;
241
- function un(e) {
244
+ var bn = /(?:rgba?|oklch|oklab|lab|lch|color)\([^()]*\)|\btransparent\b/g;
245
+ function yn(e) {
242
246
  if (!e.includes("gradient(")) return null;
243
- const t = (e.toLowerCase().match(cn) ?? []).map(Pe).filter((o) => o !== null);
247
+ const t = (e.toLowerCase().match(bn) ?? []).map(We).filter((o) => o !== null);
244
248
  if (t.length === 0) return null;
245
249
  const n = t.reduce((o, i) => o + i.a, 0);
246
250
  if (n === 0) return {
@@ -257,37 +261,37 @@ function un(e) {
257
261
  a: n / t.length
258
262
  };
259
263
  }
260
- function Ie({ r: e, g: t, b: n }) {
264
+ function De({ r: e, g: t, b: n }) {
261
265
  const [r, o, i] = [
262
- Y(e),
263
- Y(t),
264
- Y(n)
265
- ], l = Math.cbrt(0.4122214708 * r + 0.5363325363 * o + 0.0514459929 * i), c = Math.cbrt(0.2119034982 * r + 0.6806995451 * o + 0.1073969566 * i), s = Math.cbrt(0.0883024619 * r + 0.2817188376 * o + 0.6299787005 * i), a = 0.2104542553 * l + 0.793617785 * c - 0.0040720468 * s, u = 1.9779984951 * l - 2.428592205 * c + 0.4505937099 * s, d = 0.0259040371 * l + 0.7827717662 * c - 0.808675766 * s, p = Math.atan2(d, u) * 180 / Math.PI;
266
+ te(e),
267
+ te(t),
268
+ te(n)
269
+ ], l = Math.cbrt(0.4122214708 * r + 0.5363325363 * o + 0.0514459929 * i), c = Math.cbrt(0.2119034982 * r + 0.6806995451 * o + 0.1073969566 * i), s = Math.cbrt(0.0883024619 * r + 0.2817188376 * o + 0.6299787005 * i), a = 0.2104542553 * l + 0.793617785 * c - 0.0040720468 * s, u = 1.9779984951 * l - 2.428592205 * c + 0.4505937099 * s, f = 0.0259040371 * l + 0.7827717662 * c - 0.808675766 * s, d = Math.atan2(f, u) * 180 / Math.PI;
266
270
  return {
267
271
  L: a,
268
- C: Math.hypot(u, d),
269
- H: p < 0 ? p + 360 : p
272
+ C: Math.hypot(u, f),
273
+ H: d < 0 ? d + 360 : d
270
274
  };
271
275
  }
272
- var fn = {
276
+ var vn = {
273
277
  r: 1,
274
278
  g: 1,
275
279
  b: 1
276
- }, dn = {
280
+ }, wn = {
277
281
  r: 18 / 255,
278
282
  g: 18 / 255,
279
283
  b: 18 / 255
280
284
  };
281
- function pn(e, t) {
282
- return e.includes("dark") && (!e.includes("light") || t) ? dn : fn;
285
+ function En(e, t) {
286
+ return e.includes("dark") && (!e.includes("light") || t) ? wn : vn;
283
287
  }
284
- function hn(e) {
285
- const t = [], n = un(e.backgroundImage);
288
+ function Sn(e) {
289
+ const t = [], n = yn(e.backgroundImage);
286
290
  n && n.a > 0 && t.push(n);
287
- const r = Pe(e.backgroundColor);
291
+ const r = We(e.backgroundColor);
288
292
  return r && r.a > 0 && t.push(r), t;
289
293
  }
290
- function mn(e, t) {
294
+ function Tn(e, t) {
291
295
  const n = {
292
296
  r: 0,
293
297
  g: 0,
@@ -305,28 +309,28 @@ function mn(e, t) {
305
309
  b: n.b + t.b * r
306
310
  };
307
311
  }
308
- function gn(e) {
312
+ function An(e) {
309
313
  const t = e.defaultView;
310
314
  if (!t || typeof e.elementsFromPoint != "function") return [];
311
315
  const { innerWidth: n, innerHeight: r } = t;
312
316
  if (!n || !r) return [];
313
- const o = pn(t.getComputedStyle(e.documentElement).colorScheme ?? "", typeof t.matchMedia == "function" && t.matchMedia("(prefers-color-scheme: dark)").matches), i = /* @__PURE__ */ new Map(), l = (s) => {
317
+ const o = En(t.getComputedStyle(e.documentElement).colorScheme ?? "", typeof t.matchMedia == "function" && t.matchMedia("(prefers-color-scheme: dark)").matches), i = /* @__PURE__ */ new Map(), l = (s) => {
314
318
  let a = i.get(s);
315
- return a || (a = s.matches("[data-leesto-picker-outline], [data-leesto-capture-cover]") ? [] : hn(t.getComputedStyle(s)), i.set(s, a)), a;
319
+ return a || (a = s.matches("[data-leesto-picker-outline], [data-leesto-capture-cover]") ? [] : Sn(t.getComputedStyle(s)), i.set(s, a)), a;
316
320
  }, c = [];
317
321
  for (let s = 0; s < 10; s++) for (let a = 0; a < 16; a++) {
318
- const u = (a + 0.5) * n / 16, d = (s + 0.5) * r / 10, p = [];
319
- let h = 0;
320
- for (const b of e.elementsFromPoint(u, d)) {
321
- for (const E of l(b))
322
- p.push(E), h += (1 - h) * E.a;
323
- if (h >= 0.95) break;
322
+ const u = (a + 0.5) * n / 16, f = (s + 0.5) * r / 10, d = [];
323
+ let m = 0;
324
+ for (const y of e.elementsFromPoint(u, f)) {
325
+ for (const T of l(y))
326
+ d.push(T), m += (1 - m) * T.a;
327
+ if (m >= 0.95) break;
324
328
  }
325
- c.push(mn(p, o));
329
+ c.push(Tn(d, o));
326
330
  }
327
331
  return c;
328
332
  }
329
- function bn(e) {
333
+ function _n(e) {
330
334
  const t = e.defaultView, n = [];
331
335
  for (const r of e.querySelectorAll('meta[name="theme-color"]')) {
332
336
  const o = r.getAttribute("media");
@@ -334,33 +338,33 @@ function bn(e) {
334
338
  }
335
339
  t && n.push(t.getComputedStyle(e.documentElement).getPropertyValue("accent-color"));
336
340
  for (const r of n) {
337
- const o = Pe(r);
341
+ const o = We(r);
338
342
  if (!o || o.a < 0.95) continue;
339
343
  const i = {
340
344
  r: o.r,
341
345
  g: o.g,
342
346
  b: o.b
343
347
  };
344
- if (Ie(i).C >= 0.035) return i;
348
+ if (De(i).C >= 0.035) return i;
345
349
  }
346
350
  return null;
347
351
  }
348
- var et = (e) => Math.floor(e / 30) % 12;
349
- function yn(e, t = null) {
352
+ var rt = (e) => Math.floor(e / 30) % 12;
353
+ function Ln(e, t = null) {
350
354
  if (e.length === 0) return null;
351
- const n = e.map(Ie), r = n.reduce((p, h) => p + h.L, 0) / n.length, o = Math.round(Math.min(1, Math.max(0, r)) * 100) / 100, i = Array.from({ length: 12 }, () => 0), l = Array.from({ length: 12 }, () => 0);
352
- for (const p of n) {
353
- if (p.C < 0.035) continue;
354
- const h = et(p.H);
355
- i[h] = (i[h] ?? 0) + p.C ** 2, l[h] = (l[h] ?? 0) + 1;
355
+ const n = e.map(De), r = n.reduce((d, m) => d + m.L, 0) / n.length, o = Math.round(Math.min(1, Math.max(0, r)) * 100) / 100, i = Array.from({ length: 12 }, () => 0), l = Array.from({ length: 12 }, () => 0);
356
+ for (const d of n) {
357
+ if (d.C < 0.035) continue;
358
+ const m = rt(d.H);
359
+ i[m] = (i[m] ?? 0) + d.C ** 2, l[m] = (l[m] ?? 0) + 1;
356
360
  }
357
- const c = (p, h) => (p[(h + 11) % 12] ?? 0) + (p[h] ?? 0) + (p[(h + 1) % 12] ?? 0);
361
+ const c = (d, m) => (d[(m + 11) % 12] ?? 0) + (d[m] ?? 0) + (d[(m + 1) % 12] ?? 0);
358
362
  let s = null;
359
- for (let p = 0; p < 12; p++)
360
- c(l, p) < 4 || (s === null || c(i, p) > c(i, s)) && (s = p);
363
+ for (let d = 0; d < 12; d++)
364
+ c(l, d) < 4 || (s === null || c(i, d) > c(i, s)) && (s = d);
361
365
  if (s === null || c(i, s) < 3e-3) return {
362
366
  lightness: o,
363
- hue: t ? Math.round(Ie(t).H) % 360 : null
367
+ hue: t ? Math.round(De(t).H) % 360 : null
364
368
  };
365
369
  const a = /* @__PURE__ */ new Set([
366
370
  (s + 11) % 12,
@@ -370,117 +374,137 @@ function yn(e, t = null) {
370
374
  x: 0,
371
375
  y: 0
372
376
  };
373
- for (const p of n) {
374
- if (p.C < 0.035 || !a.has(et(p.H))) continue;
375
- const h = p.C ** 2, b = p.H * Math.PI / 180;
376
- u.x += h * Math.cos(b), u.y += h * Math.sin(b);
377
+ for (const d of n) {
378
+ if (d.C < 0.035 || !a.has(rt(d.H))) continue;
379
+ const m = d.C ** 2, y = d.H * Math.PI / 180;
380
+ u.x += m * Math.cos(y), u.y += m * Math.sin(y);
377
381
  }
378
- const d = Math.atan2(u.y, u.x) * 180 / Math.PI;
382
+ const f = Math.atan2(u.y, u.x) * 180 / Math.PI;
379
383
  return {
380
384
  lightness: o,
381
- hue: Math.round(d + 360) % 360
385
+ hue: Math.round(f + 360) % 360
382
386
  };
383
387
  }
384
- function vn(e, t) {
388
+ function In(e, t) {
385
389
  if (!e || Math.abs(Math.round(e.lightness * 100) - Math.round(t.lightness * 100)) >= 2) return !0;
386
390
  if (e.hue === null || t.hue === null) return e.hue !== t.hue;
387
391
  const n = Math.abs(e.hue - t.hue) % 360;
388
392
  return Math.min(n, 360 - n) >= 10;
389
393
  }
390
- var wn = [150, 800], En = 1e3;
391
- var Sn = 2e3, tt = [
394
+ var Rn = [150, 800], Nn = 1e3;
395
+ var On = 2e3, ot = [
392
396
  "class",
393
397
  "style",
394
398
  "data-theme",
395
399
  "data-mode"
396
400
  ];
397
- function Tn(e, t = () => yn(gn(document), bn(document))) {
401
+ function Cn(e, t = () => Ln(An(document), _n(document))) {
398
402
  let n = !1, r = !1, o = null, i = Number.NEGATIVE_INFINITY, l = null, c = null, s = null, a = null, u = null;
399
- const d = /* @__PURE__ */ new Set(), p = () => {
403
+ const f = /* @__PURE__ */ new Set(), d = () => {
400
404
  if (n || document.hidden) return;
401
- const I = i + 250 - Date.now();
402
- if (I > 0) {
405
+ const R = i + 250 - Date.now();
406
+ if (R > 0) {
403
407
  l ?? (l = setTimeout(() => {
404
- l = null, p();
405
- }, I));
408
+ l = null, d();
409
+ }, R));
406
410
  return;
407
411
  }
408
412
  i = Date.now();
409
- let O;
413
+ let C;
410
414
  try {
411
- O = t();
415
+ C = t();
412
416
  } catch {
413
417
  return;
414
418
  }
415
- !O || !r && !vn(o, O) || (r = !1, o = O, e(O));
416
- }, h = (I) => {
417
- const O = setTimeout(() => {
418
- d.delete(O), p();
419
- }, I);
420
- d.add(O);
421
- }, b = () => {
422
- p(), c && clearTimeout(c), c = setTimeout(() => {
423
- c = null, p();
419
+ !C || !r && !In(o, C) || (r = !1, o = C, e(C));
420
+ }, m = (R) => {
421
+ const C = setTimeout(() => {
422
+ f.delete(C), d();
423
+ }, R);
424
+ f.add(C);
425
+ }, y = () => {
426
+ d(), c && clearTimeout(c), c = setTimeout(() => {
427
+ c = null, d();
424
428
  }, 250);
425
- }, E = () => {
426
- p(), a && clearTimeout(a), a = setTimeout(() => {
427
- a = null, p();
428
- }, En);
429
- }, A = () => {
430
- const I = Date.now();
431
- u ?? (u = I), s && clearTimeout(s);
432
- const O = Math.max(0, Math.min(500, u + Sn - I));
429
+ }, T = () => {
430
+ d(), a && clearTimeout(a), a = setTimeout(() => {
431
+ a = null, d();
432
+ }, Nn);
433
+ }, I = () => {
434
+ const R = Date.now();
435
+ u ?? (u = R), s && clearTimeout(s);
436
+ const C = Math.max(0, Math.min(500, u + On - R));
433
437
  s = setTimeout(() => {
434
- s = null, u = null, p();
435
- }, O);
436
- }, S = () => {
437
- document.hidden || h(0);
438
- }, v = () => p(), _ = typeof window.matchMedia == "function" ? window.matchMedia("(prefers-color-scheme: dark)") : null, L = () => h(0), k = new MutationObserver(E);
438
+ s = null, u = null, d();
439
+ }, C);
440
+ }, v = () => {
441
+ document.hidden || m(0);
442
+ }, E = () => d(), A = typeof window.matchMedia == "function" ? window.matchMedia("(prefers-color-scheme: dark)") : null, L = () => m(0), k = new MutationObserver(T);
439
443
  k.observe(document.documentElement, {
440
444
  attributes: !0,
441
- attributeFilter: tt
445
+ attributeFilter: ot
442
446
  });
443
- const D = new MutationObserver(A);
447
+ const P = new MutationObserver(I);
444
448
  return document.body && (k.observe(document.body, {
445
449
  attributes: !0,
446
- attributeFilter: tt
447
- }), D.observe(document.body, {
450
+ attributeFilter: ot
451
+ }), P.observe(document.body, {
448
452
  subtree: !0,
449
453
  childList: !0,
450
454
  attributes: !0,
451
455
  attributeFilter: ["class", "style"]
452
- })), document.addEventListener("scroll", b, {
456
+ })), document.addEventListener("scroll", y, {
453
457
  capture: !0,
454
458
  passive: !0
455
- }), window.addEventListener("resize", b), document.addEventListener("visibilitychange", S), _?.addEventListener("change", L), {
459
+ }), window.addEventListener("resize", y), document.addEventListener("visibilitychange", v), A?.addEventListener("change", L), {
456
460
  announce: () => {
457
- n || (r = !0, document.readyState === "complete" ? p() : window.addEventListener("load", v, { once: !0 }));
461
+ n || (r = !0, document.readyState === "complete" ? d() : window.addEventListener("load", E, { once: !0 }));
458
462
  },
459
463
  navigated: () => {
460
464
  if (!n)
461
- for (const I of wn) h(I);
465
+ for (const R of Rn) m(R);
462
466
  },
463
467
  stop: () => {
464
468
  n = !0;
465
- for (const I of [
466
- ...d,
469
+ for (const R of [
470
+ ...f,
467
471
  l,
468
472
  c,
469
473
  s,
470
474
  a
471
- ]) I && clearTimeout(I);
472
- d.clear(), k.disconnect(), D.disconnect(), document.removeEventListener("scroll", b, { capture: !0 }), window.removeEventListener("resize", b), document.removeEventListener("visibilitychange", S), window.removeEventListener("load", v), _?.removeEventListener("change", L);
475
+ ]) R && clearTimeout(R);
476
+ f.clear(), k.disconnect(), P.disconnect(), document.removeEventListener("scroll", y, { capture: !0 }), window.removeEventListener("resize", y), document.removeEventListener("visibilitychange", v), window.removeEventListener("load", E), A?.removeEventListener("change", L);
473
477
  }
474
478
  };
475
479
  }
476
- var _n = /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g, An = /\b\d{3}-\d{2}-\d{4}\b/g, Ln = /\d(?:[ -]?\d){12,18}/g, Rn = /\b(Bearer|Basic|Token)\s+(?=[A-Za-z0-9._~+/=-]*\d)[A-Za-z0-9._~+/=-]{6,}/gi, In = /\b((?:proxy-)?authorization)\b(["']?\s*[:=]\s*["']?)(?:Digest\s+[^\r\n]*|(?:(?:Bearer|Basic|Token)\s+)?[^\s"'&,;}]+)/gi, Cn = /(token|secret|passw(?:or)?d|api[-_]?key)\b(["']?\s*[:=]\s*["']?)[^\s"'&,;}]+/gi, On = /\b((?:set-)?cookie)\b(["']?\s*[:=]\s*["']?)[^"'\r\n]+/gi, kn = /\b(session(?:[-_]?id)?)\b(["']?\s*[:=]\s*["']?)(?=[^\s"'&,;}]{0,256}\d)[^\s"'&,;}]+/gi, Nn = /\beyJ[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\b/g, Mn = /\bhttps?:\/\/[^\s"'<>)]+/gi, xn = /(?::\d+){1,2}$/;
477
- function Dn(e) {
480
+ var ne = "data-leesto-autocomplete";
481
+ function vt(e) {
482
+ return `input[autocomplete="${e}"], input[${ne}="${e}"]`;
483
+ }
484
+ function kn(e) {
485
+ return e.getAttribute(ne) ?? e.autocomplete;
486
+ }
487
+ function Mn(e) {
488
+ e.type === "password" || e.hasAttribute(ne) || (e.setAttribute(ne, e.getAttribute("autocomplete") ?? ""), e.setAttribute("autocomplete", "off"));
489
+ }
490
+ function xn(e) {
491
+ const t = e.getAttribute(ne);
492
+ t !== null && (e.removeAttribute(ne), t ? e.setAttribute("autocomplete", t) : e.removeAttribute("autocomplete"));
493
+ }
494
+ function Fn() {
495
+ let e = null;
496
+ return { follow(t) {
497
+ t !== e && (e && xn(e), e = t, t && Mn(t));
498
+ } };
499
+ }
500
+ var Dn = /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g, Pn = /\b\d{3}-\d{2}-\d{4}\b/g, $n = /\d(?:[ -]?\d){12,18}/g, Bn = /\b(Bearer|Basic|Token)\s+(?=[A-Za-z0-9._~+/=-]*\d)[A-Za-z0-9._~+/=-]{6,}/gi, qn = /\b((?:proxy-)?authorization)\b(["']?\s*[:=]\s*["']?)(?:Digest\s+[^\r\n]*|(?:(?:Bearer|Basic|Token)\s+)?[^\s"'&,;}]+)/gi, Un = /(token|secret|passw(?:or)?d|api[-_]?key)\b(["']?\s*[:=]\s*["']?)[^\s"'&,;}]+/gi, Hn = /\b((?:set-)?cookie)\b(["']?\s*[:=]\s*["']?)[^"'\r\n]+/gi, Gn = /\b(session(?:[-_]?id)?)\b(["']?\s*[:=]\s*["']?)(?=[^\s"'&,;}]{0,256}\d)[^\s"'&,;}]+/gi, Wn = /\beyJ[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\b/g, Vn = /\bhttps?:\/\/[^\s"'<>)]+/gi, zn = /(?::\d+){1,2}$/;
501
+ function Kn(e) {
478
502
  const t = e.search(/[?#]/);
479
503
  if (t < 0) return e;
480
- const n = xn.exec(e.slice(t))?.[0] ?? "";
504
+ const n = zn.exec(e.slice(t))?.[0] ?? "";
481
505
  return e.slice(0, t) + n;
482
506
  }
483
- function Pn(e) {
507
+ function jn(e) {
484
508
  let t = 0, n = !1;
485
509
  for (let r = e.length - 1; r >= 0; r--) {
486
510
  let o = e.charCodeAt(r) - 48;
@@ -489,62 +513,62 @@ function Pn(e) {
489
513
  }
490
514
  return t % 10 === 0;
491
515
  }
492
- function J(e) {
516
+ function ie(e) {
493
517
  if (!e) return e;
494
- let t = e.replace(Mn, Dn).replace(In, "$1$2[secret masqué]").replace(Rn, "$1 [secret masqué]").replace(Nn, "[jeton masqué]").replace(On, "$1$2[secret masqué]").replace(Cn, "$1$2[secret masqué]").replace(kn, "$1$2[secret masqué]");
495
- return t = t.replace(_n, "[email masqué]"), t = t.replace(An, "[id masqué]"), t = t.replace(Ln, (n) => {
518
+ let t = e.replace(Vn, Kn).replace(qn, "$1$2[secret masqué]").replace(Bn, "$1 [secret masqué]").replace(Wn, "[jeton masqué]").replace(Hn, "$1$2[secret masqué]").replace(Un, "$1$2[secret masqué]").replace(Gn, "$1$2[secret masqué]");
519
+ return t = t.replace(Dn, "[email masqué]"), t = t.replace(Pn, "[id masqué]"), t = t.replace($n, (n) => {
496
520
  const r = n.replace(/[ -]/g, "");
497
- return r.length >= 13 && r.length <= 19 && Pn(r) ? "[carte masquée]" : n;
521
+ return r.length >= 13 && r.length <= 19 && jn(r) ? "[carte masquée]" : n;
498
522
  }), t;
499
523
  }
500
- var Fn = /^(mailto|tel|sms|callto):/i;
501
- function Fe(e) {
502
- const t = e.trim(), n = Fn.exec(t);
503
- return n ? `${n[1]}:` : /^(data|blob):/i.test(t) ? e : J(mt(t));
524
+ var Xn = /^(mailto|tel|sms|callto):/i;
525
+ function Ve(e) {
526
+ const t = e.trim(), n = Xn.exec(t);
527
+ return n ? `${n[1]}:` : /^(data|blob):/i.test(t) ? e : ie(yt(t));
504
528
  }
505
- function $n(e) {
529
+ function Yn(e) {
506
530
  return e.split(",").map((t) => {
507
531
  const [n = "", ...r] = t.trim().split(/\s+/);
508
- return [Fe(n), ...r].join(" ");
532
+ return [Ve(n), ...r].join(" ");
509
533
  }).join(", ");
510
534
  }
511
- function Bn(e) {
512
- return e.replace(/url\(\s*(['"]?)([^'")]*)\1\s*\)/gi, (t, n, r) => `url(${n}${Fe(r)}${n})`);
535
+ function Zn(e) {
536
+ return e.replace(/url\(\s*(['"]?)([^'")]*)\1\s*\)/gi, (t, n, r) => `url(${n}${Ve(r)}${n})`);
513
537
  }
514
- var me = "leesto-mask", ee = "[data-leesto-block]", $e = "leesto-mask-text", Be = "[data-private]", gt = `.${$e}, ${Be}`, qn = 'img, picture, video, canvas, object, embed, svg image, input[type="image"]', Hn = 'button, a, [role="button"], [role="link"], input[type="button"], input[type="submit"], input[type="reset"]';
515
- var bt = 'input:not([type="button"]):not([type="submit"]):not([type="reset"]), textarea, select';
516
- function ge(e) {
538
+ var Te = "leesto-mask", se = "[data-leesto-block]", ze = "leesto-mask-text", Ke = "[data-private]", wt = `.${ze}, ${Ke}`, Qn = 'img, picture, video, canvas, object, embed, svg image, input[type="image"]', Jn = 'button, a, [role="button"], [role="link"], input[type="button"], input[type="submit"], input[type="reset"]';
539
+ var Et = 'input:not([type="button"]):not([type="submit"]):not([type="reset"]), textarea, select';
540
+ function Ae(e) {
517
541
  return e.replace(/\S/g, "*");
518
542
  }
519
- function Un(e, t) {
543
+ function er(e, t) {
520
544
  try {
521
545
  return e.closest(t);
522
546
  } catch {
523
547
  return null;
524
548
  }
525
549
  }
526
- function yt(e) {
527
- return Un(e, gt) !== null;
550
+ function St(e) {
551
+ return er(e, wt) !== null;
528
552
  }
529
- var Gn = `.${me}, ${ee}, ${gt}`;
530
- function ne(e) {
553
+ var tr = `.${Te}, ${se}, ${wt}`;
554
+ function le(e) {
531
555
  try {
532
- return e.closest(Gn) !== null;
556
+ return e.closest(tr) !== null;
533
557
  } catch {
534
558
  return !0;
535
559
  }
536
560
  }
537
- function vt(e) {
561
+ function Tt(e) {
538
562
  if (!e || typeof e.closest != "function") return !1;
539
563
  try {
540
- if (yt(e) || e.matches(bt)) return !1;
541
- const t = e.closest(Hn);
564
+ if (St(e) || e.matches(Et)) return !1;
565
+ const t = e.closest(Jn);
542
566
  return t ? (t.textContent ?? "").trim().length <= 80 : !1;
543
567
  } catch {
544
568
  return !1;
545
569
  }
546
570
  }
547
- var nt = {
571
+ var it = {
548
572
  maskAllInputs: !0,
549
573
  maskInputOptions: {
550
574
  password: !0,
@@ -552,26 +576,26 @@ var nt = {
552
576
  tel: !0,
553
577
  text: !0
554
578
  },
555
- blockClass: me,
556
- maskTextClass: $e
579
+ blockClass: Te,
580
+ maskTextClass: ze
557
581
  };
558
- function wt(e) {
582
+ function At(e) {
559
583
  if (e === "inputs_only") return {
560
- ...nt,
561
- blockSelector: ee,
562
- maskTextSelector: Be
584
+ ...it,
585
+ blockSelector: se,
586
+ maskTextSelector: Ke
563
587
  };
564
588
  const t = {
565
- ...nt,
566
- blockSelector: `${ee}, ${qn}`,
589
+ ...it,
590
+ blockSelector: `${se}, ${Qn}`,
567
591
  maskTextSelector: "*"
568
592
  };
569
593
  return e === "labels_visible" ? {
570
594
  ...t,
571
- maskTextFn: (n, r) => vt(r) ? n : ge(n)
595
+ maskTextFn: (n, r) => Tt(r) ? n : Ae(n)
572
596
  } : t;
573
597
  }
574
- var rt = /* @__PURE__ */ new Set([
598
+ var st = /* @__PURE__ */ new Set([
575
599
  "placeholder",
576
600
  "title",
577
601
  "alt",
@@ -581,7 +605,7 @@ var rt = /* @__PURE__ */ new Set([
581
605
  "aria-placeholder",
582
606
  "aria-roledescription",
583
607
  "aria-valuetext"
584
- ]), Wn = /* @__PURE__ */ new Set([
608
+ ]), nr = /* @__PURE__ */ new Set([
585
609
  "href",
586
610
  "src",
587
611
  "action",
@@ -594,16 +618,16 @@ var rt = /* @__PURE__ */ new Set([
594
618
  "longdesc",
595
619
  "xlink:href"
596
620
  ]);
597
- function Vn(e, t) {
598
- if (e === "srcset") return $n(t);
599
- if (e === "style") return Bn(t);
600
- if (Wn.has(e)) return Fe(t);
601
- if (e.startsWith("data-")) return J(t);
602
- }
603
- var zn = 2, jn = 3, Xn = 4, Kn = 0, Yn = 2;
604
- function Zn(e, t, n) {
621
+ function rr(e, t) {
622
+ if (e === "srcset") return Yn(t);
623
+ if (e === "style") return Zn(t);
624
+ if (nr.has(e)) return Ve(t);
625
+ if (e.startsWith("data-")) return ie(t);
626
+ }
627
+ var or = 2, ir = 3, sr = 4, ar = 0, lr = 2;
628
+ function cr(e, t, n) {
605
629
  if (e) try {
606
- return e.matches(bt);
630
+ return e.matches(Et);
607
631
  } catch {
608
632
  return !0;
609
633
  }
@@ -613,7 +637,7 @@ function Zn(e, t, n) {
613
637
  const o = String(n.type ?? "").toLowerCase();
614
638
  return o !== "button" && o !== "submit" && o !== "reset";
615
639
  }
616
- function Et(e, t, n) {
640
+ function _t(e, t, n) {
617
641
  const r = e;
618
642
  if (!r || typeof r != "object" || !r.data) return e;
619
643
  const o = (a) => {
@@ -624,33 +648,33 @@ function Et(e, t, n) {
624
648
  } catch {
625
649
  return null;
626
650
  }
627
- }, i = (a, u, d, p) => {
651
+ }, i = (a, u, f, d) => {
628
652
  if (u === "value") {
629
- if (Zn(a, d, p)) return !1;
630
- } else if (!rt.has(u)) return !0;
631
- return !a || yt(a) ? !1 : t === "inputs_only" ? !0 : t === "labels_visible" ? vt(a) : !1;
632
- }, l = (a, u, d) => {
633
- if (d)
634
- for (const p of Object.keys(d)) {
635
- const h = d[p];
636
- if (typeof h != "string" || !h) continue;
637
- const b = Vn(p, h);
638
- if (b !== void 0) {
639
- d[p] = b;
653
+ if (cr(a, f, d)) return !1;
654
+ } else if (!st.has(u)) return !0;
655
+ return !a || St(a) ? !1 : t === "inputs_only" ? !0 : t === "labels_visible" ? Tt(a) : !1;
656
+ }, l = (a, u, f) => {
657
+ if (f)
658
+ for (const d of Object.keys(f)) {
659
+ const m = f[d];
660
+ if (typeof m != "string" || !m) continue;
661
+ const y = rr(d, m);
662
+ if (y !== void 0) {
663
+ f[d] = y;
640
664
  continue;
641
665
  }
642
- p !== "value" && !rt.has(p) || i(a, p, u, d) || (d[p] = ge(h));
666
+ d !== "value" && !st.has(d) || i(a, d, u, f) || (f[d] = Ae(m));
643
667
  }
644
668
  }, c = (a) => {
645
669
  const u = a ? [a] : [];
646
670
  for (; u.length > 0; ) {
647
- const d = u.pop();
648
- d.type === Yn && d.attributes && l(o(d.id), String(d.tagName ?? ""), d.attributes), Array.isArray(d.childNodes) && u.push(...d.childNodes);
671
+ const f = u.pop();
672
+ f.type === lr && f.attributes && l(o(f.id), String(f.tagName ?? ""), f.attributes), Array.isArray(f.childNodes) && u.push(...f.childNodes);
649
673
  }
650
674
  }, s = r.data;
651
- if (r.type === Xn && typeof s.href == "string") s.href = mt(s.href);
652
- else if (r.type === zn) c(s.node);
653
- else if (r.type === jn && s.source === Kn) {
675
+ if (r.type === sr && typeof s.href == "string") s.href = yt(s.href);
676
+ else if (r.type === or) c(s.node);
677
+ else if (r.type === ir && s.source === ar) {
654
678
  for (const a of s.adds ?? []) c(a.node);
655
679
  for (const a of s.attributes ?? []) {
656
680
  const u = o(a.id);
@@ -659,50 +683,50 @@ function Et(e, t, n) {
659
683
  }
660
684
  return e;
661
685
  }
662
- var Ce = "data-leesto-capture-field", Oe = "data-leesto-capture-text", ke = "data-leesto-capture-block", St = `.${me}, ${ee}`, Qn = 'input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="image"]), textarea, select', Jn = `.${$e}, ${Be}`;
663
- function ot(e, t = {}) {
686
+ var Pe = "data-leesto-capture-field", $e = "data-leesto-capture-text", Be = "data-leesto-capture-block", Lt = `.${Te}, ${se}`, ur = 'input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="image"]), textarea, select', fr = `.${ze}, ${Ke}`;
687
+ function at(e, t = {}) {
664
688
  const n = [], r = (i, l, c = "") => {
665
689
  i.hasAttribute(l) || (i.setAttribute(l, c), n.push([i, l]));
666
690
  }, o = (i) => [...e.matches(i) ? [e] : [], ...e.querySelectorAll(i)];
667
- for (const i of o(Qn)) r(i, Ce);
668
- for (const i of o(Jn)) r(i, Oe);
669
- if (t.blocks) for (const i of e.querySelectorAll(St)) {
691
+ for (const i of o(ur)) r(i, Pe);
692
+ for (const i of o(fr)) r(i, $e);
693
+ if (t.blocks) for (const i of e.querySelectorAll(Lt)) {
670
694
  const l = i.getBoundingClientRect();
671
- r(i, ke, `${Math.round(l.width)}x${Math.round(l.height)}`);
695
+ r(i, Be, `${Math.round(l.width)}x${Math.round(l.height)}`);
672
696
  }
673
697
  return () => {
674
698
  for (const [i, l] of n) i.removeAttribute(l);
675
699
  };
676
700
  }
677
- function Ne(e) {
701
+ function qe(e) {
678
702
  const t = e.ownerDocument.createTreeWalker(e, 4);
679
703
  for (let n = t.nextNode(); n; n = t.nextNode()) {
680
704
  const r = n;
681
- r.data = ge(r.data);
705
+ r.data = Ae(r.data);
682
706
  }
683
707
  }
684
- function er(e) {
708
+ function dr(e) {
685
709
  const t = e.tagName.toLowerCase();
686
710
  if (t === "select") {
687
- for (const r of e.querySelectorAll("option")) Ne(r);
711
+ for (const r of e.querySelectorAll("option")) qe(r);
688
712
  return;
689
713
  }
690
714
  const n = e.getAttribute("value");
691
- n && e.setAttribute("value", ge(n)), t === "textarea" && Ne(e);
715
+ n && e.setAttribute("value", Ae(n)), t === "textarea" && qe(e);
692
716
  }
693
- function it(e) {
717
+ function lt(e) {
694
718
  if (e.nodeType !== 1) return;
695
719
  const t = e, n = (r) => [...t.hasAttribute(r) ? [t] : [], ...t.querySelectorAll(`[${r}]`)];
696
- for (const r of n(Ce))
697
- er(r), r.removeAttribute(Ce);
698
- for (const r of n(Oe))
699
- Ne(r), r.removeAttribute(Oe);
700
- for (const r of t.querySelectorAll(`[${ke}]`)) {
701
- const [o, i] = (r.getAttribute(ke) ?? "0x0").split("x"), l = r.ownerDocument.createElement("div");
720
+ for (const r of n(Pe))
721
+ dr(r), r.removeAttribute(Pe);
722
+ for (const r of n($e))
723
+ qe(r), r.removeAttribute($e);
724
+ for (const r of t.querySelectorAll(`[${Be}]`)) {
725
+ const [o, i] = (r.getAttribute(Be) ?? "0x0").split("x"), l = r.ownerDocument.createElement("div");
702
726
  l.setAttribute("style", `display:inline-block;width:${o}px;height:${i}px;background:#a1a1aa`), r.replaceWith(l);
703
727
  }
704
728
  }
705
- function se(e) {
729
+ function me(e) {
706
730
  const t = [];
707
731
  return {
708
732
  push(n) {
@@ -713,46 +737,46 @@ function se(e) {
713
737
  }
714
738
  };
715
739
  }
716
- function j(e) {
740
+ function Q(e) {
717
741
  const t = typeof e == "string" ? e : e instanceof URL ? e.href : e instanceof Request ? e.url : String(e);
718
742
  try {
719
743
  const n = new URL(t, typeof location < "u" ? location.href : void 0);
720
- return n.origin + J(n.pathname);
744
+ return n.origin + ie(n.pathname);
721
745
  } catch {
722
- return J(t.split("?")[0] ?? t);
746
+ return ie(t.split("?")[0] ?? t);
723
747
  }
724
748
  }
725
- var tr = /* @__PURE__ */ new Set(["fetch", "xmlhttprequest"]), nr = ["deprecation", "intervention"], rr = { teardown: () => {
749
+ var pr = /* @__PURE__ */ new Set(["fetch", "xmlhttprequest"]), mr = ["deprecation", "intervention"], hr = { teardown: () => {
726
750
  } };
727
- function or(e) {
751
+ function gr(e) {
728
752
  const t = typeof performance < "u" ? performance.timeOrigin : 0;
729
753
  return Math.round(t + e);
730
754
  }
731
- function ir(e) {
755
+ function br(e) {
732
756
  const t = e.responseStatus;
733
757
  return typeof t == "number" && t > 0 ? t : void 0;
734
758
  }
735
- function sr(e) {
736
- if (tr.has(e.initiatorType)) return null;
737
- const t = ir(e), n = e.transferSize || e.encodedBodySize || void 0;
759
+ function yr(e) {
760
+ if (pr.has(e.initiatorType)) return null;
761
+ const t = br(e), n = e.transferSize || e.encodedBodySize || void 0;
738
762
  return {
739
763
  method: "GET",
740
- url: j(e.name),
764
+ url: Q(e.name),
741
765
  ...t !== void 0 ? { status: t } : {},
742
766
  durationMs: Math.round(e.duration),
743
767
  ...n ? { responseSize: n } : {},
744
- startedAt: or(e.startTime),
768
+ startedAt: gr(e.startTime),
745
769
  ...t !== void 0 && t >= 400 ? { failed: !0 } : {},
746
770
  initiatorType: e.initiatorType
747
771
  };
748
772
  }
749
- function ar(e) {
750
- if (typeof window > "u") return rr;
773
+ function vr(e) {
774
+ if (typeof window > "u") return hr;
751
775
  const t = [];
752
776
  if (typeof PerformanceObserver < "u") try {
753
777
  const i = new PerformanceObserver((l) => {
754
778
  for (const c of l.getEntries()) try {
755
- const s = sr(c);
779
+ const s = yr(c);
756
780
  s && e.onResource(s);
757
781
  } catch {
758
782
  }
@@ -771,7 +795,7 @@ function ar(e) {
771
795
  e.onReport("warn", `Navigateur (${c.type}) : ${s}`);
772
796
  }
773
797
  }), {
774
- types: nr,
798
+ types: mr,
775
799
  buffered: !0
776
800
  });
777
801
  i.observe(), t.push(() => i.disconnect());
@@ -793,43 +817,43 @@ function ar(e) {
793
817
  }
794
818
  } };
795
819
  }
796
- var lr = 50, cr = 30, ur = 100, fr = 50, te = 500, Tt = 8e3, dr = te * 4, pr = Tt * 2;
797
- function _t(e, t, n) {
798
- return J(e.slice(0, n)).slice(0, t);
820
+ var wr = 50, Er = 30, Sr = 100, Tr = 50, ae = 500, It = 8e3, Ar = ae * 4, _r = It * 2;
821
+ function Rt(e, t, n) {
822
+ return ie(e.slice(0, n)).slice(0, t);
799
823
  }
800
- function Z(e) {
801
- return _t(e, te, dr);
824
+ function re(e) {
825
+ return Rt(e, ae, Ar);
802
826
  }
803
- var hr = /(token|secret|passw(or)?d|api[-_]?key|authorization|cookie)$/i;
804
- function Se(e) {
827
+ var Lr = /(token|secret|passw(or)?d|api[-_]?key|authorization|cookie)$/i;
828
+ function Oe(e) {
805
829
  const t = e instanceof Error ? e.stack : void 0;
806
830
  if (t)
807
- return _t(t, Tt, pr);
831
+ return Rt(t, It, _r);
808
832
  }
809
- function Te(e) {
833
+ function Ce(e) {
810
834
  if (e instanceof Error) return `${e.name}: ${e.message}`;
811
835
  if (typeof e == "string") return e;
812
836
  if (typeof e == "object" && e !== null) {
813
837
  const t = /* @__PURE__ */ Symbol("overflow");
814
- let n = te * 8;
838
+ let n = ae * 8;
815
839
  try {
816
840
  return JSON.stringify(e, (r, o) => {
817
- if (hr.test(r)) return "[masqué]";
841
+ if (Lr.test(r)) return "[masqué]";
818
842
  if (n -= r.length + (typeof o == "string" ? o.length : 8), n < 0) throw t;
819
843
  return o;
820
- }).slice(0, te);
844
+ }).slice(0, ae);
821
845
  } catch (r) {
822
846
  return r === t ? "[objet volumineux]" : "[objet]";
823
847
  }
824
848
  }
825
849
  return String(e);
826
850
  }
827
- function st(e) {
851
+ function ct(e) {
828
852
  if (!e) return;
829
853
  const t = Number(e);
830
854
  return Number.isFinite(t) && t >= 0 ? t : void 0;
831
855
  }
832
- var mr = {
856
+ var Ir = {
833
857
  snapshot: () => ({
834
858
  errors: [],
835
859
  logs: [],
@@ -842,219 +866,219 @@ var mr = {
842
866
  teardown: () => {
843
867
  }
844
868
  };
845
- function At(e) {
846
- if (typeof window > "u") return mr;
847
- const t = se(lr), n = se(cr), r = se(ur), o = se(fr), i = de(e.runId) ? e.runId : void 0, l = (f) => {
869
+ function Nt(e) {
870
+ if (typeof window > "u") return Ir;
871
+ const t = me(wr), n = me(Er), r = me(Sr), o = me(Tr), i = we(e.runId) ? e.runId : void 0, l = (p) => {
848
872
  if (!i) return !1;
849
873
  try {
850
- const m = new URL(String(f), location.href);
851
- return m.origin === location.origin || (e.runIdOrigins ?? []).includes(m.origin);
874
+ const b = new URL(String(p), location.href);
875
+ return b.origin === location.origin || (e.runIdOrigins ?? []).includes(b.origin);
852
876
  } catch {
853
877
  return !1;
854
878
  }
855
879
  };
856
880
  let c = e.sink ?? null;
857
- const s = (f, m) => {
858
- c?.(f, m);
859
- }, a = (f) => {
860
- e.captureNetwork && t.push(f);
861
- }, u = (f) => {
862
- e.captureNetwork && s(Yt, f);
863
- }, d = (f, m, y, R = {}) => {
864
- if (!m) return;
865
- const N = {
866
- level: f,
867
- message: m,
868
- ...y ? { stack: y } : {},
869
- ...R,
881
+ const s = (p, b) => {
882
+ c?.(p, b);
883
+ }, a = (p) => {
884
+ e.captureNetwork && t.push(p);
885
+ }, u = (p) => {
886
+ e.captureNetwork && s(on, p);
887
+ }, f = (p, b, w, N = {}) => {
888
+ if (!b) return;
889
+ const x = {
890
+ level: p,
891
+ message: b,
892
+ ...w ? { stack: w } : {},
893
+ ...N,
870
894
  at: Date.now()
871
895
  };
872
- o.push(N), s(Ze, N);
873
- }, p = (f, m) => {
896
+ o.push(x), s(et, x);
897
+ }, d = (p, b) => {
874
898
  try {
875
- const y = Z(m.map(Te).join(" ")), R = m.find((N) => N instanceof Error);
876
- d(f, y, Se(R), {
899
+ const w = re(b.map(Ce).join(" ")), N = b.find((x) => x instanceof Error);
900
+ f(p, w, Oe(N), {
877
901
  mechanism: "console",
878
- ...R instanceof Error && R.name ? { name: R.name } : {}
902
+ ...N instanceof Error && N.name ? { name: N.name } : {}
879
903
  });
880
904
  } catch {
881
905
  }
882
- }, h = (f, m) => {
906
+ }, m = (p, b) => {
883
907
  try {
884
- const y = Z(m.map(Te).join(" "));
885
- y && r.push({
886
- level: f,
887
- message: y,
908
+ const w = re(b.map(Ce).join(" "));
909
+ w && r.push({
910
+ level: p,
911
+ message: w,
888
912
  at: Date.now()
889
913
  });
890
914
  } catch {
891
915
  }
892
- }, b = console.error, E = console.warn, A = console.log, S = console.info;
893
- console.error = (...f) => (p("error", f), b.apply(console, f)), console.warn = (...f) => (p("warn", f), E.apply(console, f)), console.log = (...f) => (h("log", f), A.apply(console, f)), console.info = (...f) => (h("info", f), S.apply(console, f));
894
- const v = (f) => {
895
- const m = f.target;
896
- if (m instanceof Element) {
897
- const R = m.src || m.href || "";
898
- if (!R) return;
899
- d("error", `Ressource non chargée : <${m.tagName.toLowerCase()}> ${j(R)}`.slice(0, te), void 0, {
916
+ }, y = console.error, T = console.warn, I = console.log, v = console.info;
917
+ console.error = (...p) => (d("error", p), y.apply(console, p)), console.warn = (...p) => (d("warn", p), T.apply(console, p)), console.log = (...p) => (m("log", p), I.apply(console, p)), console.info = (...p) => (m("info", p), v.apply(console, p));
918
+ const E = (p) => {
919
+ const b = p.target;
920
+ if (b instanceof Element) {
921
+ const N = b.src || b.href || "";
922
+ if (!N) return;
923
+ f("error", `Ressource non chargée : <${b.tagName.toLowerCase()}> ${Q(N)}`.slice(0, ae), void 0, {
900
924
  mechanism: "resource",
901
- sourceUrl: j(R)
925
+ sourceUrl: Q(N)
902
926
  });
903
927
  return;
904
928
  }
905
- const y = f;
906
- d("error", Z(`Erreur non gérée : ${y.message}`), Se(y.error), {
929
+ const w = p;
930
+ f("error", re(`Erreur non gérée : ${w.message}`), Oe(w.error), {
907
931
  mechanism: "window.error",
908
- ...typeof y.error?.name == "string" ? { name: y.error.name } : {},
909
- ...typeof y.filename == "string" && y.filename ? { sourceUrl: j(y.filename) } : {},
910
- ...typeof y.lineno == "number" && y.lineno > 0 ? { line: y.lineno } : {},
911
- ...typeof y.colno == "number" && y.colno > 0 ? { column: y.colno } : {}
932
+ ...typeof w.error?.name == "string" ? { name: w.error.name } : {},
933
+ ...typeof w.filename == "string" && w.filename ? { sourceUrl: Q(w.filename) } : {},
934
+ ...typeof w.lineno == "number" && w.lineno > 0 ? { line: w.lineno } : {},
935
+ ...typeof w.colno == "number" && w.colno > 0 ? { column: w.colno } : {}
912
936
  });
913
- }, _ = (f) => {
914
- d("error", Z(`Promesse rejetée : ${Te(f.reason)}`), Se(f.reason), {
937
+ }, A = (p) => {
938
+ f("error", re(`Promesse rejetée : ${Ce(p.reason)}`), Oe(p.reason), {
915
939
  mechanism: "unhandledrejection",
916
- ...f.reason instanceof Error && f.reason.name ? { name: f.reason.name } : {}
940
+ ...p.reason instanceof Error && p.reason.name ? { name: p.reason.name } : {}
917
941
  });
918
942
  };
919
- window.addEventListener("error", v, !0), window.addEventListener("unhandledrejection", _);
943
+ window.addEventListener("error", E, !0), window.addEventListener("unhandledrejection", A);
920
944
  const L = typeof window.fetch == "function" ? window.fetch.bind(window) : null;
921
- L && (window.fetch = (async (f, m) => {
922
- const y = Date.now(), R = (m?.method ?? (f instanceof Request ? f.method : "GET") ?? "GET").toUpperCase(), N = j(f);
923
- let H = m;
924
- if (i && l(f)) {
925
- const C = new Headers(f instanceof Request ? f.headers : void 0);
926
- for (const [P, U] of new Headers(m?.headers)) C.set(P, U);
927
- C.set(Ye, i), H = {
928
- ...m,
929
- headers: C
945
+ L && (window.fetch = (async (p, b) => {
946
+ const w = Date.now(), N = (b?.method ?? (p instanceof Request ? p.method : "GET") ?? "GET").toUpperCase(), x = Q(p);
947
+ let F = b;
948
+ if (i && l(p)) {
949
+ const O = new Headers(p instanceof Request ? p.headers : void 0);
950
+ for (const [$, H] of new Headers(b?.headers)) O.set($, H);
951
+ O.set(Je, i), F = {
952
+ ...b,
953
+ headers: O
930
954
  };
931
955
  }
932
956
  try {
933
- const C = await L(f, H);
957
+ const O = await L(p, F);
934
958
  try {
935
- const P = C.headers.get("x-request-id"), U = C.headers.get("traceparent");
959
+ const $ = O.headers.get("x-request-id"), H = O.headers.get("traceparent");
936
960
  a({
937
- method: R,
938
- url: N,
939
- status: C.status,
940
- durationMs: Date.now() - y,
941
- responseSize: st(C.headers.get("content-length")),
942
- contentType: C.headers.get("content-type") ?? void 0,
943
- startedAt: y,
944
- ...P ? { requestId: P.slice(0, 200) } : {},
945
- ...U ? { traceparent: U.slice(0, 200) } : {},
961
+ method: N,
962
+ url: x,
963
+ status: O.status,
964
+ durationMs: Date.now() - w,
965
+ responseSize: ct(O.headers.get("content-length")),
966
+ contentType: O.headers.get("content-type") ?? void 0,
967
+ startedAt: w,
968
+ ...$ ? { requestId: $.slice(0, 200) } : {},
969
+ ...H ? { traceparent: H.slice(0, 200) } : {},
946
970
  ...i ? { runId: i } : {}
947
- }), C.ok || u({
948
- method: R,
949
- url: N,
950
- status: C.status,
951
- durationMs: Date.now() - y
971
+ }), O.ok || u({
972
+ method: N,
973
+ url: x,
974
+ status: O.status,
975
+ durationMs: Date.now() - w
952
976
  });
953
977
  } catch {
954
978
  }
955
- return C;
956
- } catch (C) {
979
+ return O;
980
+ } catch (O) {
957
981
  try {
958
- const P = Date.now() - y;
982
+ const $ = Date.now() - w;
959
983
  a({
960
- method: R,
961
- url: N,
984
+ method: N,
985
+ url: x,
962
986
  status: 0,
963
- durationMs: P,
964
- startedAt: y,
987
+ durationMs: $,
988
+ startedAt: w,
965
989
  failed: !0,
966
990
  ...i ? { runId: i } : {}
967
991
  }), u({
968
- method: R,
969
- url: N,
992
+ method: N,
993
+ url: x,
970
994
  status: 0,
971
- durationMs: P
995
+ durationMs: $
972
996
  });
973
997
  } catch {
974
998
  }
975
- throw C;
999
+ throw O;
976
1000
  }
977
1001
  }));
978
- const k = XMLHttpRequest.prototype.open, D = XMLHttpRequest.prototype.send, I = "__echoNet";
979
- XMLHttpRequest.prototype.open = function(f, m, ...y) {
980
- return this[I] = {
981
- method: (f || "GET").toUpperCase(),
982
- url: j(m),
1002
+ const k = XMLHttpRequest.prototype.open, P = XMLHttpRequest.prototype.send, R = "__echoNet";
1003
+ XMLHttpRequest.prototype.open = function(p, b, ...w) {
1004
+ return this[R] = {
1005
+ method: (p || "GET").toUpperCase(),
1006
+ url: Q(b),
983
1007
  start: 0,
984
- propagate: l(m)
1008
+ propagate: l(b)
985
1009
  }, k.apply(this, [
986
- f,
987
- m,
988
- ...y
1010
+ p,
1011
+ b,
1012
+ ...w
989
1013
  ]);
990
- }, XMLHttpRequest.prototype.send = function(...f) {
991
- const m = this[I];
992
- if (m) {
993
- if (m.start = Date.now(), i && m.propagate) try {
994
- this.setRequestHeader(Ye, i);
1014
+ }, XMLHttpRequest.prototype.send = function(...p) {
1015
+ const b = this[R];
1016
+ if (b) {
1017
+ if (b.start = Date.now(), i && b.propagate) try {
1018
+ this.setRequestHeader(Je, i);
995
1019
  } catch {
996
1020
  }
997
1021
  this.addEventListener("loadend", () => {
998
1022
  try {
999
- const y = Date.now() - m.start, R = this.status, N = R === 0, H = this.getResponseHeader("x-request-id"), C = this.getResponseHeader("traceparent");
1023
+ const w = Date.now() - b.start, N = this.status, x = N === 0, F = this.getResponseHeader("x-request-id"), O = this.getResponseHeader("traceparent");
1000
1024
  a({
1001
- method: m.method,
1002
- url: m.url,
1003
- status: R,
1004
- durationMs: y,
1005
- responseSize: st(this.getResponseHeader("content-length")),
1025
+ method: b.method,
1026
+ url: b.url,
1027
+ status: N,
1028
+ durationMs: w,
1029
+ responseSize: ct(this.getResponseHeader("content-length")),
1006
1030
  contentType: this.getResponseHeader("content-type") ?? void 0,
1007
- startedAt: m.start,
1008
- ...N ? { failed: !0 } : {},
1031
+ startedAt: b.start,
1032
+ ...x ? { failed: !0 } : {},
1009
1033
  ...i ? { runId: i } : {},
1010
- ...H ? { requestId: H.slice(0, 200) } : {},
1011
- ...C ? { traceparent: C.slice(0, 200) } : {}
1012
- }), (N || R >= 400) && u({
1013
- method: m.method,
1014
- url: m.url,
1015
- status: R,
1016
- durationMs: y
1034
+ ...F ? { requestId: F.slice(0, 200) } : {},
1035
+ ...O ? { traceparent: O.slice(0, 200) } : {}
1036
+ }), (x || N >= 400) && u({
1037
+ method: b.method,
1038
+ url: b.url,
1039
+ status: N,
1040
+ durationMs: w
1017
1041
  });
1018
1042
  } catch {
1019
1043
  }
1020
1044
  }, { once: !0 });
1021
1045
  }
1022
- return D.apply(this, f);
1046
+ return P.apply(this, p);
1023
1047
  };
1024
- const O = ar({
1025
- onResource: (f) => {
1048
+ const C = vr({
1049
+ onResource: (p) => {
1026
1050
  e.captureNetwork && n.push(i ? {
1027
- ...f,
1051
+ ...p,
1028
1052
  runId: i
1029
- } : f);
1053
+ } : p);
1030
1054
  },
1031
- onReport: (f, m) => d(f, Z(m), void 0, { mechanism: "report" })
1032
- }), V = () => e.captureNetwork ? [...t.snapshot(), ...n.snapshot()].sort((f, m) => f.startedAt - m.startedAt) : [];
1033
- let q = !1;
1055
+ onReport: (p, b) => f(p, re(b), void 0, { mechanism: "report" })
1056
+ }), K = () => e.captureNetwork ? [...t.snapshot(), ...n.snapshot()].sort((p, b) => p.startedAt - b.startedAt) : [];
1057
+ let X = !1;
1034
1058
  return {
1035
1059
  snapshot: () => ({
1036
1060
  errors: o.snapshot(),
1037
1061
  logs: r.snapshot(),
1038
- network: V(),
1062
+ network: K(),
1039
1063
  ...i ? { runId: i } : {}
1040
1064
  }),
1041
- setSink: (f) => {
1042
- c = f;
1065
+ setSink: (p) => {
1066
+ c = p;
1043
1067
  },
1044
1068
  flushRings: () => {
1045
- const f = V();
1046
- f.length > 0 && s(Zt, { entries: f });
1047
- const m = r.snapshot();
1048
- m.length > 0 && s(Qt, { entries: m });
1049
- const y = o.snapshot();
1050
- y.length > 0 && s(Ze, { entries: y });
1069
+ const p = K();
1070
+ p.length > 0 && s(sn, { entries: p });
1071
+ const b = r.snapshot();
1072
+ b.length > 0 && s(an, { entries: b });
1073
+ const w = o.snapshot();
1074
+ w.length > 0 && s(et, { entries: w });
1051
1075
  },
1052
1076
  teardown: () => {
1053
- q || (q = !0, c = null, O.teardown(), console.error = b, console.warn = E, console.log = A, console.info = S, window.removeEventListener("error", v, !0), window.removeEventListener("unhandledrejection", _), L && (window.fetch = L), XMLHttpRequest.prototype.open = k, XMLHttpRequest.prototype.send = D);
1077
+ X || (X = !0, c = null, C.teardown(), console.error = y, console.warn = T, console.log = I, console.info = v, window.removeEventListener("error", E, !0), window.removeEventListener("unhandledrejection", A), L && (window.fetch = L), XMLHttpRequest.prototype.open = k, XMLHttpRequest.prototype.send = P);
1054
1078
  }
1055
1079
  };
1056
1080
  }
1057
- var gr = "data-leesto-scrollbars", br = `@supports selector(::-webkit-scrollbar) {
1081
+ var Rr = "data-leesto-scrollbars", Nr = `@supports selector(::-webkit-scrollbar) {
1058
1082
  ::-webkit-scrollbar { width: 10px; height: 10px; }
1059
1083
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
1060
1084
  ::-webkit-scrollbar-thumb {
@@ -1068,21 +1092,21 @@ var gr = "data-leesto-scrollbars", br = `@supports selector(::-webkit-scrollbar)
1068
1092
  :where(html) { scrollbar-color: rgb(128 128 128 / 0.5) transparent; }
1069
1093
  :where(*) { scrollbar-width: thin; }
1070
1094
  }`;
1071
- function yr(e) {
1095
+ function Or(e) {
1072
1096
  const t = e.createElement("div");
1073
1097
  t.style.cssText = "position:absolute;top:-9999px;width:100px;height:100px;overflow:scroll;visibility:hidden", e.documentElement.append(t);
1074
1098
  const n = t.offsetWidth - t.clientWidth;
1075
1099
  return t.remove(), n;
1076
1100
  }
1077
- function vr(e = document, t = yr) {
1101
+ function Cr(e = document, t = Or) {
1078
1102
  if (e.querySelector("style[data-leesto-scrollbars]")) return () => {
1079
1103
  };
1080
1104
  if (t(e) <= 0) return () => {
1081
1105
  };
1082
1106
  const n = e.createElement("style");
1083
- return n.setAttribute(gr, ""), n.textContent = br, (e.head ?? e.documentElement).prepend(n), () => n.remove();
1107
+ return n.setAttribute(Rr, ""), n.textContent = Nr, (e.head ?? e.documentElement).prepend(n), () => n.remove();
1084
1108
  }
1085
- var wr = 80, Er = {
1109
+ var kr = 80, Mr = {
1086
1110
  a: "link",
1087
1111
  button: "button",
1088
1112
  img: "img",
@@ -1095,50 +1119,50 @@ var wr = 80, Er = {
1095
1119
  h5: "heading",
1096
1120
  h6: "heading",
1097
1121
  dialog: "dialog"
1098
- }, Sr = {
1122
+ }, xr = {
1099
1123
  button: "button",
1100
1124
  submit: "button",
1101
1125
  reset: "button",
1102
1126
  checkbox: "checkbox",
1103
1127
  radio: "radio",
1104
1128
  search: "searchbox"
1105
- }, z = (e) => {
1129
+ }, Z = (e) => {
1106
1130
  const t = (e ?? "").replace(/\s+/g, " ").trim();
1107
- return t ? t.slice(0, wr) : null;
1131
+ return t ? t.slice(0, kr) : null;
1108
1132
  };
1109
- function Tr(e) {
1133
+ function Fr(e) {
1110
1134
  const t = [];
1111
1135
  let n = 0;
1112
1136
  const r = e.ownerDocument.createTreeWalker(e, NodeFilter.SHOW_TEXT);
1113
1137
  for (let o = r.nextNode(); o && n < 320; o = r.nextNode()) {
1114
1138
  const i = o.parentElement;
1115
- if (i && i !== e && ne(i)) continue;
1139
+ if (i && i !== e && le(i)) continue;
1116
1140
  const l = o.nodeValue ?? "";
1117
1141
  l.trim() && (t.push(l), n += l.length);
1118
1142
  }
1119
1143
  return t.join(" ");
1120
1144
  }
1121
- function _r(e, t) {
1145
+ function Dr(e, t) {
1122
1146
  const n = e.getAttribute("role")?.trim().split(/\s+/)[0];
1123
- return n || (t === "input" ? Sr[e.type] ?? "textbox" : t === "a" && !e.hasAttribute("href") ? null : Er[t] ?? null);
1147
+ return n || (t === "input" ? xr[e.type] ?? "textbox" : t === "a" && !e.hasAttribute("href") ? null : Mr[t] ?? null);
1124
1148
  }
1125
- function Ar(e) {
1149
+ function Pr(e) {
1126
1150
  const t = (e.getAttribute("aria-labelledby")?.split(/\s+/).filter(Boolean) ?? []).map((n) => {
1127
1151
  const r = e.ownerDocument.getElementById(n);
1128
- return r && !ne(r) ? r.textContent ?? "" : "";
1152
+ return r && !le(r) ? r.textContent ?? "" : "";
1129
1153
  });
1130
- return z(t.join(" "));
1154
+ return Z(t.join(" "));
1131
1155
  }
1132
- function Lr(e, t) {
1133
- const n = z(e.getAttribute("aria-label")) ?? Ar(e) ?? (t === "img" ? z(e.getAttribute("alt")) : null) ?? z(e.getAttribute("title"));
1156
+ function $r(e, t) {
1157
+ const n = Z(e.getAttribute("aria-label")) ?? Pr(e) ?? (t === "img" ? Z(e.getAttribute("alt")) : null) ?? Z(e.getAttribute("title"));
1134
1158
  if (n) return n;
1135
1159
  if (t === "input" || t === "textarea" || t === "select") {
1136
- const r = e.getAttribute("id"), o = r ? e.ownerDocument.querySelector(`label[for="${CSS.escape(r)}"]`) : null, i = o && !ne(o) ? o.textContent : null;
1137
- return z(i) ?? z(e.getAttribute("placeholder"));
1160
+ const r = e.getAttribute("id"), o = r ? e.ownerDocument.querySelector(`label[for="${CSS.escape(r)}"]`) : null, i = o && !le(o) ? o.textContent : null;
1161
+ return Z(i) ?? Z(e.getAttribute("placeholder"));
1138
1162
  }
1139
- return z(Tr(e));
1163
+ return Z(Fr(e));
1140
1164
  }
1141
- function Rr(e) {
1165
+ function Br(e) {
1142
1166
  if (!e) return null;
1143
1167
  try {
1144
1168
  const t = new URL(e, document.baseURI);
@@ -1147,52 +1171,52 @@ function Rr(e) {
1147
1171
  return null;
1148
1172
  }
1149
1173
  }
1150
- function Ir(e) {
1151
- const t = e.tagName.toLowerCase(), n = ne(e), r = {
1174
+ function qr(e) {
1175
+ const t = e.tagName.toLowerCase(), n = le(e), r = {
1152
1176
  tag: t,
1153
- role: _r(e, t),
1154
- name: n ? null : Lr(e, t)
1177
+ role: Dr(e, t),
1178
+ name: n ? null : $r(e, t)
1155
1179
  };
1156
1180
  return e instanceof HTMLImageElement && (r.image = {
1157
- src: n ? null : Rr(e.currentSrc || e.getAttribute("src") || ""),
1181
+ src: n ? null : Br(e.currentSrc || e.getAttribute("src") || ""),
1158
1182
  loaded: e.complete && e.naturalWidth > 0
1159
1183
  }), r;
1160
1184
  }
1161
- var Cr = /\b(se deconnecter|deconnexion|log ?out|sign ?out)\b/, Or = /\/(logout|log-out|signout|sign-out|deconnexion)\b/i, kr = 'a, button, [role="button"], [role="menuitem"], input[type="submit"], input[type="button"]', Nr = 3;
1162
- function Me(e) {
1185
+ var Ur = /\b(se deconnecter|deconnexion|log ?out|sign ?out)\b/, Hr = /\/(logout|log-out|signout|sign-out|deconnexion)\b/i, Gr = 'a, button, [role="button"], [role="menuitem"], input[type="submit"], input[type="button"]', Wr = 3;
1186
+ function Ue(e) {
1163
1187
  return (e ?? "").normalize("NFD").replace(/[̀-ͯ]/g, "").replace(/\s+/g, " ").trim().toLowerCase();
1164
1188
  }
1165
- function Mr(e) {
1189
+ function Vr(e) {
1166
1190
  const t = e.getAttribute("aria-label");
1167
1191
  return t || (e instanceof HTMLInputElement ? e.value : e.textContent ?? "");
1168
1192
  }
1169
- function xr(e) {
1170
- for (const t of Array.from(e.querySelectorAll(kr))) {
1171
- if (Cr.test(Me(Mr(t)))) return !0;
1193
+ function zr(e) {
1194
+ for (const t of Array.from(e.querySelectorAll(Gr))) {
1195
+ if (Ur.test(Ue(Vr(t)))) return !0;
1172
1196
  const n = t.getAttribute("href");
1173
- if (n && Or.test(n)) return !0;
1197
+ if (n && Hr.test(n)) return !0;
1174
1198
  }
1175
1199
  return !1;
1176
1200
  }
1177
- function Dr(e, t) {
1178
- const n = Me(t);
1179
- return n.length < Nr || !e.body ? !1 : Me(e.body.innerText ?? e.body.textContent).includes(n);
1201
+ function Kr(e, t) {
1202
+ const n = Ue(t);
1203
+ return n.length < Wr || !e.body ? !1 : Ue(e.body.innerText ?? e.body.textContent).includes(n);
1180
1204
  }
1181
- function Pr(e, t) {
1182
- return Dr(e, t) ? "same-account" : xr(e) ? "signed-in" : "unknown";
1205
+ function jr(e, t) {
1206
+ return Kr(e, t) ? "same-account" : zr(e) ? "signed-in" : "unknown";
1183
1207
  }
1184
- var Fr = 100, $r = 800, Br = [
1208
+ var Xr = 100, Yr = 800, Zr = [
1185
1209
  "hidden",
1186
1210
  "class",
1187
1211
  "style",
1188
1212
  "type",
1189
1213
  "disabled",
1190
1214
  "aria-hidden"
1191
- ], be = 'input[type="password"]', Lt = 'input[autocomplete="username"], input[autocomplete="email"], input[type="email"]', ye = `${be}, ${Lt}`, pe = /\b(connexion|se connecter|connectez[- ]vous|s'identifier|identifiez[- ]vous|login|log ?in|sign ?in)\b/, xe = /\b(inscription|s'inscrire|inscrivez|creer (un|votre|mon) compte|sign ?up|register|create (an |your )?account|mot de passe oublie|oublie|reinitialiser|forgot|reset|lien de connexion|magic link|envoyer (un|le) lien|send (me )?(a |the )?link|code|newsletter|abonner|subscribe|enregistrer|sauvegarder|mettre a jour|save|update|confirmer|confirm|supprimer mon compte|delete account|payer|pay)\b/, qr = /\b(inscription|s'inscrire|inscrivez|creer (un|votre|mon) compte|sign ?up|create (an |your )?account|mot de passe oublie|reinitialiser|forgot|lien de connexion|magic link|envoyer (un|le) lien|send (me )?(a |the )?link|newsletter|abonner|subscribe)\b/, Hr = /\b(afficher|masquer|voir|show|hide|toggle)\b/, Ur = /\b(effacer|vider|supprimer|clear|reset)\b/, Gr = /[\u{1F441}\u{1F576}\u{1F440}]/u;
1192
- function Q(e) {
1215
+ ], _e = 'input[type="password"]', Ot = vt("username"), Ct = vt("email"), kt = `${Ot}, ${Ct}, input[type="email"]`, Le = `${_e}, ${kt}`, Ee = /\b(connexion|se connecter|connectez[- ]vous|s'identifier|identifiez[- ]vous|login|log ?in|sign ?in)\b/, He = /\b(inscription|s'inscrire|inscrivez|creer (un|votre|mon) compte|sign ?up|register|create (an |your )?account|mot de passe oublie|oublie|reinitialiser|forgot|reset|lien de connexion|magic link|envoyer (un|le) lien|send (me )?(a |the )?link|code|newsletter|abonner|subscribe|enregistrer|sauvegarder|mettre a jour|save|update|confirmer|confirm|supprimer mon compte|delete account|payer|pay)\b/, Qr = /\b(inscription|s'inscrire|inscrivez|creer (un|votre|mon) compte|sign ?up|create (an |your )?account|mot de passe oublie|reinitialiser|forgot|lien de connexion|magic link|envoyer (un|le) lien|send (me )?(a |the )?link|newsletter|abonner|subscribe)\b/, Jr = /\b(afficher|masquer|voir|show|hide|toggle)\b/, eo = /\b(effacer|vider|supprimer|clear|reset)\b/, to = /[\u{1F441}\u{1F576}\u{1F440}]/u;
1216
+ function oe(e) {
1193
1217
  return (e ?? "").normalize("NFD").replace(/[̀-ͯ]/g, "").replace(/[’‘]/g, "'").replace(/\s+/g, " ").trim().toLowerCase();
1194
1218
  }
1195
- function re(e) {
1219
+ function ce(e) {
1196
1220
  let t = e;
1197
1221
  for (; t; ) {
1198
1222
  if (t.hasAttribute("hidden") || t.getAttribute("aria-hidden") === "true" || t instanceof HTMLInputElement && t.type === "hidden") return !1;
@@ -1202,43 +1226,43 @@ function re(e) {
1202
1226
  }
1203
1227
  return !0;
1204
1228
  }
1205
- function X(e, t) {
1206
- return Array.from(e.querySelectorAll(t)).filter(re);
1229
+ function J(e, t) {
1230
+ return Array.from(e.querySelectorAll(t)).filter(ce);
1207
1231
  }
1208
- function Wr(e) {
1232
+ function no(e) {
1209
1233
  return e ? e instanceof HTMLInputElement ? e.value : e.textContent ?? "" : "";
1210
1234
  }
1211
- function Rt(e, t) {
1235
+ function Mt(e, t) {
1212
1236
  return !e.outsideForms || !t.closest("form");
1213
1237
  }
1214
- function ae(e, t) {
1215
- return Array.from(e.scope.querySelectorAll(t)).filter((n) => re(n) && Rt(e, n));
1238
+ function he(e, t) {
1239
+ return Array.from(e.scope.querySelectorAll(t)).filter((n) => ce(n) && Mt(e, n));
1216
1240
  }
1217
- function he(e) {
1218
- return Q(e.getAttribute("aria-label") ?? e.getAttribute("title") ?? e.textContent);
1241
+ function Se(e) {
1242
+ return oe(e.getAttribute("aria-label") ?? e.getAttribute("title") ?? e.textContent);
1219
1243
  }
1220
- function Vr(e) {
1221
- const t = he(e);
1222
- return Hr.test(t) || Gr.test(t);
1244
+ function ro(e) {
1245
+ const t = Se(e);
1246
+ return Jr.test(t) || to.test(t);
1223
1247
  }
1224
- function zr(e, t) {
1248
+ function oo(e, t) {
1225
1249
  if (e.getAttribute("type") === "submit" || !t) return !1;
1226
1250
  const n = e.parentElement;
1227
- return !n || X(n, ye).length === 0 ? !1 : !n.contains(t);
1251
+ return !n || J(n, Le).length === 0 ? !1 : !n.contains(t);
1228
1252
  }
1229
- var jr = 'button, input[type="submit"], input[type="button"], input[type="image"], a[href]';
1230
- function Xr(e) {
1231
- return Array.from(e.querySelectorAll(jr)).some(re);
1253
+ var io = 'button, input[type="submit"], input[type="button"], input[type="image"], a[href]';
1254
+ function so(e) {
1255
+ return Array.from(e.querySelectorAll(io)).some(ce);
1232
1256
  }
1233
- function Kr(e, t) {
1257
+ function ao(e, t) {
1234
1258
  let n = e.parentElement;
1235
1259
  for (; n && !n.contains(t); ) {
1236
- if (Xr(n)) return !0;
1260
+ if (so(n)) return !0;
1237
1261
  n = n.parentElement;
1238
1262
  }
1239
1263
  return !1;
1240
1264
  }
1241
- function Yr(e) {
1265
+ function lo(e) {
1242
1266
  const t = [
1243
1267
  e.getAttribute("name"),
1244
1268
  e.getAttribute("id"),
@@ -1250,30 +1274,30 @@ function Yr(e) {
1250
1274
  const r = e.ownerDocument.querySelector(`label[for="${CSS.escape(n)}"]`);
1251
1275
  r && t.push(r.textContent);
1252
1276
  }
1253
- return Q(t.filter(Boolean).join(" "));
1277
+ return oe(t.filter(Boolean).join(" "));
1254
1278
  }
1255
- function Zr(e, t) {
1279
+ function co(e, t) {
1256
1280
  const n = e.parentElement;
1257
1281
  if (!n) return null;
1258
- const r = e.ownerDocument.body, o = (u) => t ? It({
1282
+ const r = e.ownerDocument.body, o = (u) => t ? xt({
1259
1283
  scope: u,
1260
1284
  outsideForms: !0
1261
- }, t) : e, i = (u) => De({
1285
+ }, t) : e, i = (u) => Ge({
1262
1286
  scope: u,
1263
1287
  outsideForms: !0
1264
1288
  }, e, o(u)), l = (u) => !!o(u) && !!i(u);
1265
1289
  let c = n, s = null;
1266
1290
  const a = (u) => {
1267
- const d = i(u);
1268
- d && !s && pe.test(he(d)) && (s = u);
1291
+ const f = i(u);
1292
+ f && !s && Ee.test(Se(f)) && (s = u);
1269
1293
  };
1270
1294
  for (a(n); c !== r && !l(c); ) {
1271
1295
  const u = c.parentElement;
1272
1296
  if (!u || u.querySelector("form")) break;
1273
- const d = [e], p = o(c);
1274
- p && p !== e && d.push(p);
1275
- const h = !!p;
1276
- if (X(u, ye).filter((b) => !b.closest("form") && !d.includes(b)).some((b) => b.matches(be) || h || xe.test(Yr(b)) ? !0 : Kr(b, e))) break;
1297
+ const f = [e], d = o(c);
1298
+ d && d !== e && f.push(d);
1299
+ const m = !!d;
1300
+ if (J(u, Le).filter((y) => !y.closest("form") && !f.includes(y)).some((y) => y.matches(_e) || m || He.test(lo(y)) ? !0 : ao(y, e))) break;
1277
1301
  c = u, a(u);
1278
1302
  }
1279
1303
  return {
@@ -1281,28 +1305,28 @@ function Zr(e, t) {
1281
1305
  outsideForms: !0
1282
1306
  };
1283
1307
  }
1284
- function at(e, t, n) {
1308
+ function ut(e, t, n) {
1285
1309
  return e ? {
1286
1310
  scope: e,
1287
1311
  outsideForms: !1
1288
- } : Zr(t, n);
1312
+ } : co(t, n);
1289
1313
  }
1290
- function Qr(e, t) {
1314
+ function uo(e, t) {
1291
1315
  let n = e.parentElement;
1292
1316
  for (; n && n !== t.scope; ) {
1293
- if (X(n, ye).length === 1) return !0;
1317
+ if (J(n, Le).length === 1) return !0;
1294
1318
  n = n.parentElement;
1295
1319
  }
1296
1320
  return !1;
1297
1321
  }
1298
- function De(e, t, n) {
1299
- const r = (s) => !!(t.compareDocumentPosition(s) & Node.DOCUMENT_POSITION_FOLLOWING), o = Array.from(e.scope.querySelectorAll('button, input[type="submit"]')).filter((s) => re(s) && Rt(e, s) && (s.getAttribute("type") === "submit" || r(s)) && !Vr(s) && !Ur.test(he(s)) && !zr(s, n));
1322
+ function Ge(e, t, n) {
1323
+ const r = (s) => !!(t.compareDocumentPosition(s) & Node.DOCUMENT_POSITION_FOLLOWING), o = Array.from(e.scope.querySelectorAll('button, input[type="submit"]')).filter((s) => ce(s) && Mt(e, s) && (s.getAttribute("type") === "submit" || r(s)) && !ro(s) && !eo.test(Se(s)) && !oo(s, n));
1300
1324
  if (o.length === 0) return null;
1301
1325
  const i = (s, a) => {
1302
1326
  const u = r(s);
1303
1327
  return [
1304
- Qr(s, e) ? 1 : 0,
1305
- pe.test(he(s)) ? 0 : 1,
1328
+ uo(s, e) ? 1 : 0,
1329
+ Ee.test(Se(s)) ? 0 : 1,
1306
1330
  s.getAttribute("type") === "submit" ? 0 : 1,
1307
1331
  u ? 0 : 1,
1308
1332
  u ? a : -a
@@ -1311,19 +1335,19 @@ function De(e, t, n) {
1311
1335
  let l = o[0], c = i(l, 0);
1312
1336
  return o.forEach((s, a) => {
1313
1337
  const u = i(s, a);
1314
- for (let d = 0; d < u.length; d++) {
1315
- const p = u[d], h = c[d];
1316
- if (p !== h) {
1317
- p < h && (l = s, c = u);
1338
+ for (let f = 0; f < u.length; f++) {
1339
+ const d = u[f], m = c[f];
1340
+ if (d !== m) {
1341
+ d < m && (l = s, c = u);
1318
1342
  return;
1319
1343
  }
1320
1344
  }
1321
1345
  }), l;
1322
1346
  }
1323
- function lt(e) {
1324
- return e.querySelectorAll("form").length + (X(e, ye).some((t) => !t.closest("form")) ? 1 : 0) === 1;
1347
+ function ft(e) {
1348
+ return e.querySelectorAll("form").length + (J(e, Le).some((t) => !t.closest("form")) ? 1 : 0) === 1;
1325
1349
  }
1326
- function Jr(e, t) {
1350
+ function fo(e, t) {
1327
1351
  if (e) {
1328
1352
  const n = e.getAttribute("aria-label");
1329
1353
  if (n) return n;
@@ -1339,7 +1363,7 @@ function Jr(e, t) {
1339
1363
  const c = /^(h1|h2|h3|legend)$/i.test(i.tagName) ? i : i.querySelector("h1, h2, h3, legend");
1340
1364
  if (c) {
1341
1365
  const s = e.parentElement;
1342
- return s && lt(s) ? c.textContent ?? "" : "";
1366
+ return s && ft(s) ? c.textContent ?? "" : "";
1343
1367
  }
1344
1368
  i = i.previousElementSibling;
1345
1369
  }
@@ -1347,53 +1371,53 @@ function Jr(e, t) {
1347
1371
  if (l && l !== e) {
1348
1372
  const c = l.querySelector("h1, h2, h3, legend");
1349
1373
  if (c)
1350
- return lt(l) ? c.textContent ?? "" : "";
1374
+ return ft(l) ? c.textContent ?? "" : "";
1351
1375
  }
1352
1376
  return "";
1353
1377
  }
1354
1378
  return (t instanceof Document ? t.body : t)?.querySelector("h1, h2, h3")?.textContent ?? "";
1355
1379
  }
1356
- function ct(e, t, n) {
1357
- const r = Q(Wr(n)), o = Q(Jr(e, t)), i = (e?.getAttribute("action") ?? "").split("?")[0], l = Q([
1380
+ function dt(e, t, n) {
1381
+ const r = oe(no(n)), o = oe(fo(e, t)), i = (e?.getAttribute("action") ?? "").split("?")[0], l = oe([
1358
1382
  e?.id,
1359
1383
  e?.getAttribute("name"),
1360
1384
  e?.className,
1361
1385
  i
1362
1386
  ].filter(Boolean).join(" "));
1363
1387
  return {
1364
- positive: pe.test(r) || pe.test(o),
1365
- negative: xe.test(r) || xe.test(o) || qr.test(l)
1388
+ positive: Ee.test(r) || Ee.test(o),
1389
+ negative: He.test(r) || He.test(o) || Qr.test(l)
1366
1390
  };
1367
1391
  }
1368
- function It(e, t) {
1369
- const n = ae(e, 'input[autocomplete="username"]')[0] ?? ae(e, 'input[autocomplete="email"]')[0] ?? ae(e, 'input[type="email"]')[0];
1392
+ function xt(e, t) {
1393
+ const n = he(e, Ot)[0] ?? he(e, Ct)[0] ?? he(e, 'input[type="email"]')[0];
1370
1394
  if (n) return n;
1371
1395
  if (!t) return null;
1372
- const r = ae(e, 'input[type="text"], input:not([type])').filter((o) => o.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING);
1396
+ const r = he(e, 'input[type="text"], input:not([type])').filter((o) => o.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING);
1373
1397
  return r[r.length - 1] ?? null;
1374
1398
  }
1375
- function _e(e, t) {
1399
+ function ke(e, t) {
1376
1400
  if (t.querySelector('input[autocomplete="new-password"]')) return null;
1377
- const n = X(t, be);
1401
+ const n = J(t, _e);
1378
1402
  if (n.length > 1) return null;
1379
1403
  if (n.length === 1) {
1380
- const s = n[0], a = at(e, s, s);
1404
+ const s = n[0], a = ut(e, s, s);
1381
1405
  if (!a) return null;
1382
- const u = It(a, s), d = De(a, s, u), p = ct(e, t, d);
1383
- return !(s.autocomplete === "current-password" || p.positive) || p.negative ? null : {
1406
+ const u = xt(a, s), f = Ge(a, s, u), d = dt(e, t, f);
1407
+ return !(s.autocomplete === "current-password" || d.positive) || d.negative ? null : {
1384
1408
  kind: "password",
1385
1409
  form: e,
1386
1410
  identifier: u,
1387
1411
  password: s,
1388
- submit: d
1412
+ submit: f
1389
1413
  };
1390
1414
  }
1391
- const r = X(t, Lt);
1415
+ const r = J(t, kt);
1392
1416
  if (r.length !== 1) return null;
1393
- const o = r[0], i = at(e, o, null);
1417
+ const o = r[0], i = ut(e, o, null);
1394
1418
  if (!i) return null;
1395
- const l = De(i, o, o), c = ct(e, t, l);
1396
- return !(o.autocomplete === "username" || c.positive) || c.negative ? null : {
1419
+ const l = Ge(i, o, o), c = dt(e, t, l);
1420
+ return !(kn(o) === "username" || c.positive) || c.negative ? null : {
1397
1421
  kind: "identifier",
1398
1422
  form: e,
1399
1423
  identifier: o,
@@ -1401,22 +1425,22 @@ function _e(e, t) {
1401
1425
  submit: l
1402
1426
  };
1403
1427
  }
1404
- function le(e = document) {
1428
+ function ge(e = document) {
1405
1429
  const t = Array.from(e.querySelectorAll("form"));
1406
1430
  for (const n of t) {
1407
- const r = _e(n, n);
1431
+ const r = ke(n, n);
1408
1432
  if (r) return r;
1409
1433
  }
1410
- return t.length === 0 || X(e, be).find((n) => !n.closest("form")) ? _e(null, e) : null;
1434
+ return t.length === 0 || J(e, _e).find((n) => !n.closest("form")) ? ke(null, e) : null;
1411
1435
  }
1412
- function ut(e, t) {
1436
+ function pt(e, t) {
1413
1437
  const n = Object.getPrototypeOf(e), r = Object.getOwnPropertyDescriptor(n, "value")?.set ?? Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
1414
1438
  r ? r.call(e, t) : e.value = t, e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }));
1415
1439
  }
1416
- function eo(e) {
1440
+ function po(e) {
1417
1441
  return !!e.form || !!e.submit;
1418
1442
  }
1419
- function to(e) {
1443
+ function mo(e) {
1420
1444
  const t = e.form, n = t?.noValidate;
1421
1445
  t && (t.noValidate = !0);
1422
1446
  try {
@@ -1425,28 +1449,28 @@ function to(e) {
1425
1449
  t && (t.noValidate = n ?? !1);
1426
1450
  }
1427
1451
  }
1428
- var no = {
1452
+ var ho = {
1429
1453
  identifier: null,
1430
1454
  password: null
1431
1455
  };
1432
- function ft(e, t) {
1456
+ function mt(e, t) {
1433
1457
  return !e || e.disabled || e.readOnly ? !1 : e.value === "" || t !== null && e.value === t;
1434
1458
  }
1435
- function Ct(e, t, n) {
1459
+ function Ft(e, t, n) {
1436
1460
  return {
1437
- identifier: ft(e.identifier, n.identifier) && !t.identifier,
1438
- password: ft(e.password, n.password) && !t.password
1461
+ identifier: mt(e.identifier, n.identifier) && !t.identifier,
1462
+ password: mt(e.password, n.password) && !t.password
1439
1463
  };
1440
1464
  }
1441
- function ro(e, t, n) {
1465
+ function go(e, t, n) {
1442
1466
  const r = e.identifier;
1443
1467
  return !r || n.identifier ? !1 : r.value !== "" && r.value !== t.login;
1444
1468
  }
1445
- function oo(e, t, n, r = no) {
1446
- const o = Ct(e, n, r);
1447
- return !o.identifier && !o.password ? { error: "nothing-to-fill" } : ro(e, t, o) ? { error: "identifier-mismatch" } : eo(e) ? (o.identifier && ut(e.identifier, t.login), o.password && ut(e.password, t.password), to(e) ? { step: o.identifier && o.password ? "both" : o.password ? "password" : "identifier" } : { error: "no-submit" }) : { error: "no-submit" };
1469
+ function bo(e, t, n, r = ho) {
1470
+ const o = Ft(e, n, r);
1471
+ return !o.identifier && !o.password ? { error: "nothing-to-fill" } : go(e, t, o) ? { error: "identifier-mismatch" } : po(e) ? (o.identifier && pt(e.identifier, t.login), o.password && pt(e.password, t.password), mo(e) ? { step: o.identifier && o.password ? "both" : o.password ? "password" : "identifier" } : { error: "no-submit" }) : { error: "no-submit" };
1448
1472
  }
1449
- function io(e) {
1473
+ function yo(e) {
1450
1474
  if (typeof window > "u" || typeof MutationObserver > "u") return {
1451
1475
  watch() {
1452
1476
  },
@@ -1466,22 +1490,22 @@ function io(e) {
1466
1490
  }, o = !1, i = null, l = null, c = null, s = null, a = 0;
1467
1491
  const u = () => {
1468
1492
  c && clearTimeout(c), c = null;
1469
- }, d = () => {
1493
+ }, f = () => {
1470
1494
  s && clearTimeout(s), s = null, a = 0;
1471
- }, p = () => {
1472
- if (s = null, a = 0, !t || n.identifier || n.password || le(document)) return;
1473
- const v = Pr(document, t.login);
1474
- t = null, e.onNoForm(v);
1475
- }, h = () => {
1495
+ }, d = () => {
1496
+ if (s = null, a = 0, !t || n.identifier || n.password || ge(document)) return;
1497
+ const E = jr(document, t.login);
1498
+ t = null, e.onNoForm(E);
1499
+ }, m = () => {
1476
1500
  if (!a) return;
1477
1501
  s && clearTimeout(s);
1478
- const v = Math.max(0, a - Date.now());
1479
- s = setTimeout(p, Math.min($r, v));
1480
- }, b = () => {
1481
- i?.disconnect(), i = null, u(), d(), l && clearTimeout(l), l = null;
1482
- }, E = () => {
1483
- const v = le(document);
1484
- if (e.onMatch?.(v), !v) {
1502
+ const E = Math.max(0, a - Date.now());
1503
+ s = setTimeout(d, Math.min(Yr, E));
1504
+ }, y = () => {
1505
+ i?.disconnect(), i = null, u(), f(), l && clearTimeout(l), l = null;
1506
+ }, T = () => {
1507
+ const E = ge(document);
1508
+ if (e.onMatch?.(E), !E) {
1485
1509
  o = !1, r = {
1486
1510
  identifier: null,
1487
1511
  password: null
@@ -1491,14 +1515,14 @@ function io(e) {
1491
1515
  if (!t)
1492
1516
  o || (o = !0, e.onDetected());
1493
1517
  else {
1494
- const _ = Ct(v, n, r), L = oo(v, t, n, r);
1495
- if ("error" in L || (_.identifier && (n = {
1518
+ const A = Ft(E, n, r), L = bo(E, t, n, r);
1519
+ if ("error" in L || (A.identifier && (n = {
1496
1520
  ...n,
1497
1521
  identifier: !0
1498
1522
  }, r = {
1499
1523
  ...r,
1500
1524
  identifier: t.login
1501
- }), _.password && (n = {
1525
+ }), A.password && (n = {
1502
1526
  ...n,
1503
1527
  password: !0
1504
1528
  }, r = {
@@ -1506,44 +1530,44 @@ function io(e) {
1506
1530
  password: t.password
1507
1531
  })), "error" in L) {
1508
1532
  const k = L.error !== "nothing-to-fill" ? L.error : !n.identifier && !n.password ? "already-filled" : null;
1509
- k && (e.onError(k), t = null, b());
1533
+ k && (e.onError(k), t = null, y());
1510
1534
  } else
1511
1535
  e.onFilled(L.step), n.password && (t = null, u(), c = setTimeout(() => {
1512
- c = null, le(document) && (o = !0, e.onDetected());
1513
- }, Ft));
1536
+ c = null, ge(document) && (o = !0, e.onDetected());
1537
+ }, Vt));
1514
1538
  }
1515
- }, A = () => {
1516
- h(), l && clearTimeout(l), l = setTimeout(() => {
1517
- l = null, E();
1518
- }, Fr);
1519
- }, S = () => {
1520
- i || (i = new MutationObserver(A), i.observe(document.body, {
1539
+ }, I = () => {
1540
+ m(), l && clearTimeout(l), l = setTimeout(() => {
1541
+ l = null, T();
1542
+ }, Xr);
1543
+ }, v = () => {
1544
+ i || (i = new MutationObserver(I), i.observe(document.body, {
1521
1545
  childList: !0,
1522
1546
  subtree: !0,
1523
1547
  attributes: !0,
1524
- attributeFilter: Br
1548
+ attributeFilter: Zr
1525
1549
  }));
1526
1550
  };
1527
1551
  return {
1528
1552
  watch() {
1529
- i || (o = !1, S()), E();
1553
+ i || (o = !1, v()), T();
1530
1554
  },
1531
- fill(v) {
1532
- d(), t = v, S(), E(), t && !n.identifier && !n.password && !le(document) && (a = Date.now() + $t, h());
1555
+ fill(E) {
1556
+ f(), t = E, v(), T(), t && !n.identifier && !n.password && !ge(document) && (a = Date.now() + zt, m());
1533
1557
  },
1534
1558
  cancel() {
1535
1559
  t = null, n = {
1536
1560
  identifier: !1,
1537
1561
  password: !1
1538
- }, o = !1, b(), e.onMatch?.(null);
1562
+ }, o = !1, y(), e.onMatch?.(null);
1539
1563
  },
1540
1564
  teardown() {
1541
- t = null, b(), e.onMatch?.(null);
1565
+ t = null, y(), e.onMatch?.(null);
1542
1566
  }
1543
1567
  };
1544
1568
  }
1545
- var ce = 0.5;
1546
- function so(e) {
1569
+ var vo = 500, be = 0.5;
1570
+ function wo(e) {
1547
1571
  const t = e?.identifier ?? e?.password ?? null;
1548
1572
  if (!e || !t) return null;
1549
1573
  const n = [e.identifier, e.password].filter((r) => r !== null);
@@ -1553,143 +1577,189 @@ function so(e) {
1553
1577
  inputs: n
1554
1578
  };
1555
1579
  }
1556
- var ue = (e) => Math.round(e * 2) / 2;
1557
- function ao(e, t) {
1558
- return e === null || t === null ? e === t : Math.abs(e.x - t.x) <= ce && Math.abs(e.y - t.y) <= ce && Math.abs(e.width - t.width) <= ce && Math.abs(e.height - t.height) <= ce;
1580
+ var ye = (e) => Math.round(e * 2) / 2;
1581
+ function Eo(e, t) {
1582
+ return e === null || t === null ? e === t : e.crowded === t.crowded && Math.abs(e.x - t.x) <= be && Math.abs(e.y - t.y) <= be && Math.abs(e.width - t.width) <= be && Math.abs(e.height - t.height) <= be;
1559
1583
  }
1560
- function lo(e, t) {
1584
+ function So(e, t) {
1561
1585
  if (typeof document.elementFromPoint != "function") return !1;
1562
1586
  const n = t.left + t.width / 2, r = t.top + t.height / 2;
1563
1587
  if (n < 0 || r < 0 || n >= window.innerWidth || r >= window.innerHeight) return !1;
1564
1588
  const o = document.elementFromPoint(n, r);
1565
1589
  return !o || o === e || e.contains(o) ? !1 : !Array.from(e.labels ?? []).some((i) => i.contains(o));
1566
1590
  }
1567
- function co(e) {
1568
- if (!e.isConnected || !re(e)) return null;
1591
+ var To = 8, Ao = [24, 32], _o = "button, a[href], input, select, textarea, [role=button], [tabindex]";
1592
+ function Lo(e, t) {
1593
+ if (typeof document.elementFromPoint != "function") return !1;
1594
+ const n = t.top + t.height / 2;
1595
+ return Ao.some((r) => {
1596
+ const o = t.right - To - r / 2;
1597
+ if (o <= t.left || o < 0 || n < 0 || o >= window.innerWidth || n >= window.innerHeight) return !1;
1598
+ const i = document.elementFromPoint(o, n)?.closest(_o);
1599
+ return !!i && !i.contains(e);
1600
+ });
1601
+ }
1602
+ function Io(e) {
1603
+ if (!e.isConnected || !ce(e)) return null;
1569
1604
  const t = e.getBoundingClientRect();
1570
- return t.width <= 0 || t.height <= 0 || t.right <= 0 || t.bottom <= 0 || t.left >= window.innerWidth || t.top >= window.innerHeight || lo(e, t) ? null : {
1571
- x: ue(t.left),
1572
- y: ue(t.top),
1573
- width: ue(t.width),
1574
- height: ue(t.height)
1605
+ return t.width <= 0 || t.height <= 0 || t.right <= 0 || t.bottom <= 0 || t.left >= window.innerWidth || t.top >= window.innerHeight || So(e, t) ? null : {
1606
+ x: ye(t.left),
1607
+ y: ye(t.top),
1608
+ width: ye(t.width),
1609
+ height: ye(t.height),
1610
+ ...Lo(e, t) ? { crowded: !0 } : {}
1575
1611
  };
1576
1612
  }
1577
- function uo(e, t = {}) {
1613
+ function Ro(e, t = {}) {
1578
1614
  if (typeof window > "u") return {
1579
1615
  track() {
1580
1616
  },
1617
+ focusField() {
1618
+ },
1581
1619
  teardown() {
1582
1620
  }
1583
1621
  };
1584
- const n = t.frame ?? ((f) => window.requestAnimationFrame(() => f())), r = t.trusted ?? ((f) => f.isTrusted);
1585
- let o = null, i = null, l = !1, c = !1, s = Number.NEGATIVE_INFINITY, a = null, u = null, d = null;
1586
- const p = () => {
1622
+ const n = t.frame ?? ((h) => window.requestAnimationFrame(() => h())), r = t.trusted ?? ((h) => h.isTrusted);
1623
+ let o = null, i = null, l = !1, c = !1, s = Number.NEGATIVE_INFINITY, a = Number.NEGATIVE_INFINITY, u = Number.NEGATIVE_INFINITY, f = !1, d = !1, m = null, y = null, T = null;
1624
+ const I = () => {
1587
1625
  if (c = !1, !o) return;
1588
- const f = co(o.field);
1589
- i && i.scrolling === l && ao(i.rect, f) || (i = {
1590
- rect: f,
1626
+ const h = Io(o.field);
1627
+ i && i.scrolling === l && Eo(i.rect, h) || (i = {
1628
+ rect: h,
1591
1629
  scrolling: l
1592
- }, e.onAnchor(f, l));
1593
- }, h = () => {
1594
- !o || c || (c = !0, n(p));
1595
- }, b = (f) => {
1630
+ }, e.onAnchor(h, l));
1631
+ }, v = () => {
1632
+ !o || c || (c = !0, n(I));
1633
+ }, E = (h) => {
1596
1634
  if (!o) return;
1597
- const m = f.target;
1598
- m instanceof Node && !m.contains(o.field) || (l = !0, a && clearTimeout(a), a = setTimeout(() => {
1599
- a = null, l = !1, h();
1600
- }, 150), h());
1601
- }, E = () => {
1602
- const f = Date.now();
1603
- f - s < 250 || (s = f, e.onInteraction());
1604
- }, A = /* @__PURE__ */ new Set(), S = (f) => f.pointerType === "touch", v = (f) => f.pointerId ?? 0, _ = (f) => {
1605
- !o || !r(f) || (S(f) ? A.add(v(f)) : E());
1606
- }, L = (f) => {
1607
- o && r(f) && S(f) && A.delete(v(f)) && E();
1608
- }, k = (f) => {
1609
- A.delete(v(f));
1610
- }, D = (f) => {
1611
- if (!o || !r(f) || !(f.target instanceof Node)) return;
1612
- const m = f.target;
1613
- (o.scope ? o.scope.contains(m) : o.inputs.some((y) => y === m)) && E();
1614
- }, I = () => {
1615
- document.visibilityState === "visible" && h();
1616
- }, O = () => {
1617
- document.addEventListener("scroll", b, {
1635
+ const M = h.target;
1636
+ M instanceof Node && !M.contains(o.field) || (l = !0, m && clearTimeout(m), m = setTimeout(() => {
1637
+ m = null, l = !1, v();
1638
+ }, 150), v());
1639
+ }, A = () => {
1640
+ const h = Date.now();
1641
+ h - s < 250 || (s = h, e.onInteraction());
1642
+ }, L = /* @__PURE__ */ new Set(), k = (h) => h.pointerType === "touch", P = (h) => h.pointerId ?? 0, R = () => {
1643
+ e.onFieldFocus(), s = Number.NEGATIVE_INFINITY;
1644
+ }, C = (h) => {
1645
+ if (!o || (h.button ?? 0) !== 0) return;
1646
+ const M = h.target;
1647
+ if (!(M instanceof Node)) return;
1648
+ const G = o.field;
1649
+ !G.contains(M) && !Array.from(G.labels ?? []).some((q) => q.contains(M)) || (a = Date.now(), document.activeElement === G && R());
1650
+ }, K = (h) => {
1651
+ !o || !r(h) || (u = Date.now(), k(h) ? L.add(P(h)) : (A(), C(h)));
1652
+ }, X = (h) => {
1653
+ o && r(h) && (u = Date.now()), o && r(h) && k(h) && L.delete(P(h)) && (A(), C(h));
1654
+ }, p = (h) => {
1655
+ if (!o) return;
1656
+ const M = f;
1657
+ f = !1, !(h.target !== o.field || M || d || !r(h)) && (Date.now() - a > 1e3 || (A(), R()));
1658
+ }, b = (h) => {
1659
+ !o || h.target !== o.field || !r(h) || h.relatedTarget instanceof Node && A();
1660
+ }, w = (h) => {
1661
+ !r(h) || Date.now() - u <= vo || (a = Date.now());
1662
+ }, N = () => {
1663
+ o && document.activeElement === o.field && (f = !0);
1664
+ }, x = (h) => {
1665
+ if (!o || !r(h)) return;
1666
+ const { key: M, isComposing: G, shiftKey: q, altKey: ue, ctrlKey: fe, metaKey: de } = h;
1667
+ M === "Tab" && (a = Date.now()), !(h.target !== o.field || G || q || ue || fe || de) && Wt(M) && e.onFieldKey(M);
1668
+ }, F = (h) => {
1669
+ L.delete(P(h));
1670
+ }, O = (h) => {
1671
+ if (!o || !r(h) || !(h.target instanceof Node)) return;
1672
+ const M = h.target;
1673
+ (o.scope ? o.scope.contains(M) : o.inputs.some((G) => G === M)) && A();
1674
+ }, $ = () => {
1675
+ document.visibilityState === "visible" && v();
1676
+ }, H = () => {
1677
+ document.addEventListener("scroll", E, {
1618
1678
  capture: !0,
1619
1679
  passive: !0
1620
- }), window.addEventListener("resize", h), window.visualViewport?.addEventListener("resize", h), window.visualViewport?.addEventListener("scroll", h), document.addEventListener("pointerdown", _, !0), document.addEventListener("pointerup", L, !0), document.addEventListener("pointercancel", k, !0), document.addEventListener("input", D, !0), document.addEventListener("visibilitychange", I), u = setInterval(() => {
1621
- document.visibilityState === "visible" && h();
1680
+ }), window.addEventListener("resize", v), window.visualViewport?.addEventListener("resize", v), window.visualViewport?.addEventListener("scroll", v), document.addEventListener("pointerdown", K, !0), document.addEventListener("pointerup", X, !0), document.addEventListener("pointercancel", F, !0), document.addEventListener("input", O, !0), document.addEventListener("focusin", p, !0), document.addEventListener("focusout", b, !0), document.addEventListener("keydown", x, !0), window.addEventListener("focus", w), window.addEventListener("blur", N), document.addEventListener("visibilitychange", $), y = setInterval(() => {
1681
+ document.visibilityState === "visible" && v();
1622
1682
  }, 250);
1623
- }, V = () => {
1624
- document.removeEventListener("scroll", b, { capture: !0 }), window.removeEventListener("resize", h), window.visualViewport?.removeEventListener("resize", h), window.visualViewport?.removeEventListener("scroll", h), document.removeEventListener("pointerdown", _, !0), document.removeEventListener("pointerup", L, !0), document.removeEventListener("pointercancel", k, !0), document.removeEventListener("input", D, !0), A.clear(), document.removeEventListener("visibilitychange", I), u && clearInterval(u), a && clearTimeout(a), u = null, a = null, d?.disconnect(), d = null, l = !1, c = !1;
1625
- }, q = () => {
1626
- const f = o !== null;
1627
- o = null, V(), i = null, f && e.onAnchor(null, !1);
1683
+ }, Y = () => {
1684
+ document.removeEventListener("scroll", E, { capture: !0 }), window.removeEventListener("resize", v), window.visualViewport?.removeEventListener("resize", v), window.visualViewport?.removeEventListener("scroll", v), document.removeEventListener("pointerdown", K, !0), document.removeEventListener("pointerup", X, !0), document.removeEventListener("pointercancel", F, !0), document.removeEventListener("input", O, !0), document.removeEventListener("focusin", p, !0), document.removeEventListener("focusout", b, !0), document.removeEventListener("keydown", x, !0), window.removeEventListener("focus", w), window.removeEventListener("blur", N), L.clear(), f = !1, a = Number.NEGATIVE_INFINITY, u = Number.NEGATIVE_INFINITY, document.removeEventListener("visibilitychange", $), y && clearInterval(y), m && clearTimeout(m), y = null, m = null, T?.disconnect(), T = null, l = !1, c = !1;
1685
+ }, j = () => {
1686
+ const h = o !== null;
1687
+ o = null, Y(), i = null, h && e.onAnchor(null, !1);
1628
1688
  };
1629
1689
  return {
1630
- track(f) {
1631
- if (!f) {
1632
- q();
1690
+ track(h) {
1691
+ if (!h) {
1692
+ j();
1633
1693
  return;
1634
1694
  }
1635
- const m = o?.field === f.field, y = o !== null;
1636
- o = f, y || O(), m || (d?.disconnect(), d = typeof ResizeObserver > "u" ? null : new ResizeObserver(() => h()), d?.observe(f.field), i = null), h();
1695
+ const M = o?.field === h.field, G = o !== null;
1696
+ o = h, G || H(), M || (T?.disconnect(), T = typeof ResizeObserver > "u" ? null : new ResizeObserver(() => v()), T?.observe(h.field), i = null), v();
1637
1697
  },
1638
- teardown: q
1698
+ focusField() {
1699
+ if (o) {
1700
+ d = !0;
1701
+ try {
1702
+ o.field.focus({ preventScroll: !0 });
1703
+ } finally {
1704
+ d = !1;
1705
+ }
1706
+ }
1707
+ },
1708
+ teardown: j
1639
1709
  };
1640
1710
  }
1641
- var fo = "leesto/navigation";
1642
- function po(e) {
1711
+ var No = "leesto/navigation";
1712
+ function Oo(e) {
1643
1713
  const t = e?.timestamp;
1644
1714
  return typeof t == "number" ? t : void 0;
1645
1715
  }
1646
- function ho(e) {
1716
+ function Co(e) {
1647
1717
  return e?.type === 4;
1648
1718
  }
1649
- function mo(e) {
1719
+ function ko(e) {
1650
1720
  try {
1651
1721
  return JSON.stringify(e)?.length ?? 0;
1652
1722
  } catch {
1653
1723
  return 0;
1654
1724
  }
1655
1725
  }
1656
- function go(e) {
1657
- const t = e.now ?? Date.now, n = e.measure ?? mo;
1726
+ function Mo(e) {
1727
+ const t = e.now ?? Date.now, n = e.measure ?? ko;
1658
1728
  let r = [], o = 0, i = !1, l = Number.NEGATIVE_INFINITY;
1659
1729
  const c = () => {
1660
1730
  const a = r.shift();
1661
1731
  a && (o -= a.bytes);
1662
1732
  }, s = () => {
1663
1733
  if (!i) {
1664
- const d = t() - e.windowMs;
1665
- for (; r.length > 1 && (r[1]?.start ?? Number.POSITIVE_INFINITY) <= d; ) c();
1734
+ const f = t() - e.windowMs;
1735
+ for (; r.length > 1 && (r[1]?.start ?? Number.POSITIVE_INFINITY) <= f; ) c();
1666
1736
  }
1667
1737
  const a = i ? e.heldMaxBytes : e.maxBytes;
1668
1738
  for (; o > a && r.length > 1; ) c();
1669
1739
  const u = r[r.length - 1];
1670
1740
  if (o > a && e.requestCheckout && (u?.events.length ?? 0) > 2) {
1671
- const d = t();
1672
- d - l >= e.minCheckoutIntervalMs && (l = d, e.requestCheckout());
1741
+ const f = t();
1742
+ f - l >= e.minCheckoutIntervalMs && (l = f, e.requestCheckout());
1673
1743
  }
1674
1744
  };
1675
1745
  return {
1676
1746
  push(a) {
1677
1747
  const u = n(a);
1678
- if (ho(a)) r.push({
1679
- start: po(a) ?? t(),
1748
+ if (Co(a)) r.push({
1749
+ start: Oo(a) ?? t(),
1680
1750
  events: [a],
1681
1751
  bytes: u
1682
1752
  });
1683
1753
  else {
1684
- const d = r[r.length - 1];
1685
- if (!d) return;
1686
- d.events.push(a), d.bytes += u;
1754
+ const f = r[r.length - 1];
1755
+ if (!f) return;
1756
+ f.events.push(a), f.bytes += u;
1687
1757
  }
1688
1758
  o += u, s();
1689
1759
  },
1690
1760
  snapshot() {
1691
1761
  const a = [];
1692
- for (const u of r) for (const d of u.events) a.push(d);
1762
+ for (const u of r) for (const f of u.events) a.push(f);
1693
1763
  return a;
1694
1764
  },
1695
1765
  hold() {
@@ -1713,44 +1783,44 @@ function go(e) {
1713
1783
  }
1714
1784
  };
1715
1785
  }
1716
- var Ot = 6e5, kt = 1e3, bo = {
1786
+ var Dt = 6e5, Pt = 1e3, xo = {
1717
1787
  mousemove: 100,
1718
1788
  scroll: 150
1719
- }, yo = {
1789
+ }, Fo = {
1720
1790
  windowMs: 12e4,
1721
1791
  checkoutEveryNms: 6e4,
1722
1792
  maxBytes: 8388608,
1723
1793
  heldMaxBytes: 33554432,
1724
1794
  minCheckoutIntervalMs: 15e3,
1725
- sampling: bo
1726
- }, vo = 5;
1727
- async function wo(e) {
1795
+ sampling: xo
1796
+ }, Do = 5;
1797
+ async function Po(e) {
1728
1798
  const { record: t, addCustomEvent: n } = await import("./chunks/rrweb-qwppqH_c.js"), r = e.maskPolicy ?? "mask_all", o = Date.now();
1729
1799
  let i = [], l = !1, c = 0;
1730
1800
  const s = () => {
1731
1801
  if (i.length === 0) return;
1732
- const A = i;
1733
- i = [], e.onBatch(A);
1802
+ const I = i;
1803
+ i = [], e.onBatch(I);
1734
1804
  }, a = t({
1735
- emit(A) {
1736
- i.push(Et(A, r, (S) => t.mirror.getNode(S)));
1805
+ emit(I) {
1806
+ i.push(_t(I, r, (v) => t.mirror.getNode(v)));
1737
1807
  },
1738
- ...wt(r)
1739
- }), u = e.diagnostics ?? null, d = a ? u ?? At({ captureNetwork: e.captureNetwork !== !1 }) : null, p = d !== null && u === null;
1740
- d?.setSink((A, S) => {
1808
+ ...At(r)
1809
+ }), u = e.diagnostics ?? null, f = a ? u ?? Nt({ captureNetwork: e.captureNetwork !== !1 }) : null, d = f !== null && u === null;
1810
+ f?.setSink((I, v) => {
1741
1811
  try {
1742
- n(A, S);
1812
+ n(I, v);
1743
1813
  } catch {
1744
1814
  }
1745
1815
  });
1746
- const h = setInterval(s, kt), b = { timer: null }, E = () => (l || (l = !0, clearInterval(h), clearTimeout(b.timer ?? void 0), d?.flushRings(), d?.setSink(null), p && d?.teardown(), a?.(), s(), c = Date.now() - o), c);
1747
- return b.timer = setTimeout(() => {
1748
- E(), e.onCap();
1749
- }, Ot), { stop: E };
1816
+ const m = setInterval(s, Pt), y = { timer: null }, T = () => (l || (l = !0, clearInterval(m), clearTimeout(y.timer ?? void 0), f?.flushRings(), f?.setSink(null), d && f?.teardown(), a?.(), s(), c = Date.now() - o), c);
1817
+ return y.timer = setTimeout(() => {
1818
+ T(), e.onCap();
1819
+ }, Dt), { stop: T };
1750
1820
  }
1751
- async function Eo(e) {
1821
+ async function $o(e) {
1752
1822
  const { record: t, addCustomEvent: n } = await import("./chunks/rrweb-qwppqH_c.js"), r = {
1753
- ...yo,
1823
+ ...Fo,
1754
1824
  ...e.config
1755
1825
  }, { diagnostics: o } = e, i = e.maskPolicy ?? "mask_all";
1756
1826
  let l = !1, c = null, s = null;
@@ -1759,7 +1829,7 @@ async function Eo(e) {
1759
1829
  t.takeFullSnapshot(!0);
1760
1830
  } catch {
1761
1831
  }
1762
- }, u = go({
1832
+ }, u = Mo({
1763
1833
  windowMs: r.windowMs,
1764
1834
  maxBytes: r.maxBytes,
1765
1835
  heldMaxBytes: r.heldMaxBytes,
@@ -1767,78 +1837,78 @@ async function Eo(e) {
1767
1837
  requestCheckout: () => queueMicrotask(() => {
1768
1838
  l || a();
1769
1839
  })
1770
- }), d = t({
1771
- emit(h) {
1772
- const b = Et(h, i, (E) => t.mirror.getNode(E));
1773
- u.push(b), c?.(b);
1840
+ }), f = t({
1841
+ emit(m) {
1842
+ const y = _t(m, i, (T) => t.mirror.getNode(T));
1843
+ u.push(y), c?.(y);
1774
1844
  },
1775
1845
  checkoutEveryNms: r.checkoutEveryNms,
1776
1846
  sampling: r.sampling,
1777
- ...wt(i)
1847
+ ...At(i)
1778
1848
  });
1779
- if (!d) return null;
1780
- const p = (h, b) => {
1849
+ if (!f) return null;
1850
+ const d = (m, y) => {
1781
1851
  try {
1782
- n(h, b);
1852
+ n(m, y);
1783
1853
  } catch {
1784
1854
  }
1785
1855
  };
1786
- return o.setSink(p), {
1856
+ return o.setSink(d), {
1787
1857
  snapshot() {
1788
- const h = u.snapshot(), b = Date.now();
1789
- o.setSink((A, S) => {
1790
- h.push({
1791
- type: vo,
1858
+ const m = u.snapshot(), y = Date.now();
1859
+ o.setSink((I, v) => {
1860
+ m.push({
1861
+ type: Do,
1792
1862
  data: {
1793
- tag: A,
1794
- payload: S
1863
+ tag: I,
1864
+ payload: v
1795
1865
  },
1796
- timestamp: b
1866
+ timestamp: y
1797
1867
  });
1798
1868
  });
1799
1869
  try {
1800
1870
  o.flushRings();
1801
1871
  } finally {
1802
- o.setSink(l ? null : p);
1872
+ o.setSink(l ? null : d);
1803
1873
  }
1804
- const E = h[0]?.timestamp;
1874
+ const T = m[0]?.timestamp;
1805
1875
  return {
1806
- events: h,
1807
- durationMs: typeof E == "number" ? Math.max(0, b - E) : 0
1876
+ events: m,
1877
+ durationMs: typeof T == "number" ? Math.max(0, y - T) : 0
1808
1878
  };
1809
1879
  },
1810
1880
  hold: () => u.hold(),
1811
1881
  release: () => u.release(),
1812
- markNavigation(h) {
1813
- l || p(fo, { href: j(h) });
1882
+ markNavigation(m) {
1883
+ l || d(No, { href: Q(m) });
1814
1884
  },
1815
1885
  stats: () => u.stats(),
1816
- stream({ onBatch: h, onCap: b }) {
1886
+ stream({ onBatch: m, onCap: y }) {
1817
1887
  s?.stop();
1818
- const E = Date.now();
1819
- let A = [], S = !1, v = 0;
1820
- const _ = () => {
1821
- if (A.length === 0) return;
1822
- const O = A;
1823
- A = [], h(O);
1824
- }, L = (O) => {
1825
- A.push(O);
1888
+ const T = Date.now();
1889
+ let I = [], v = !1, E = 0;
1890
+ const A = () => {
1891
+ if (I.length === 0) return;
1892
+ const C = I;
1893
+ I = [], m(C);
1894
+ }, L = (C) => {
1895
+ I.push(C);
1826
1896
  };
1827
1897
  c = L, a();
1828
- const k = setInterval(_, kt), D = { timer: null }, I = { stop() {
1829
- return S || (S = !0, clearInterval(k), clearTimeout(D.timer ?? void 0), o.flushRings(), c === L && (c = null), s === I && (s = null), _(), v = Date.now() - E), v;
1898
+ const k = setInterval(A, Pt), P = { timer: null }, R = { stop() {
1899
+ return v || (v = !0, clearInterval(k), clearTimeout(P.timer ?? void 0), o.flushRings(), c === L && (c = null), s === R && (s = null), A(), E = Date.now() - T), E;
1830
1900
  } };
1831
- return D.timer = setTimeout(() => {
1832
- I.stop(), b();
1833
- }, Ot), s = I, I;
1901
+ return P.timer = setTimeout(() => {
1902
+ R.stop(), y();
1903
+ }, Dt), s = R, R;
1834
1904
  },
1835
1905
  stop() {
1836
- l || (l = !0, s?.stop(), o.setSink(null), d(), u.clear());
1906
+ l || (l = !0, s?.stop(), o.setSink(null), f(), u.clear());
1837
1907
  }
1838
1908
  };
1839
1909
  }
1840
- var So = ["https://lab.leesto.app", "https://lab-dev.leesto.app"], To = ["http://localhost:3505", "http://127.0.0.1:3505"];
1841
- function _o(e) {
1910
+ var Bo = ["https://lab.leesto.app", "https://lab-dev.leesto.app"], qo = ["http://localhost:3505", "http://127.0.0.1:3505"];
1911
+ function Uo(e) {
1842
1912
  try {
1843
1913
  const t = new URL(e).hostname;
1844
1914
  return t === "localhost" || t.endsWith(".localhost") || t === "127.0.0.1" || t === "[::1]";
@@ -1846,7 +1916,7 @@ function _o(e) {
1846
1916
  return !1;
1847
1917
  }
1848
1918
  }
1849
- function Ao(e) {
1919
+ function Ho(e) {
1850
1920
  const t = e.trim();
1851
1921
  if (!t) return null;
1852
1922
  try {
@@ -1856,19 +1926,19 @@ function Ao(e) {
1856
1926
  return null;
1857
1927
  }
1858
1928
  }
1859
- function Lo(e) {
1860
- const t = (e.explicit ?? []).map(Ao).filter((r) => r !== null);
1929
+ function Go(e) {
1930
+ const t = (e.explicit ?? []).map(Ho).filter((r) => r !== null);
1861
1931
  if (t.length > 0) return [...new Set(t)];
1862
- const n = [...So];
1863
- return _o(e.pageOrigin) && n.push(...To), [...new Set(n)];
1932
+ const n = [...Bo];
1933
+ return Uo(e.pageOrigin) && n.push(...qo), [...new Set(n)];
1864
1934
  }
1865
- function Ae(e, t) {
1935
+ function Me(e, t) {
1866
1936
  return !e || e === "*" || e === "null" ? !1 : t.includes(e);
1867
1937
  }
1868
- function fe() {
1938
+ function ve() {
1869
1939
  return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
1870
1940
  }
1871
- function Ro(e) {
1941
+ function Wo(e) {
1872
1942
  const t = (l) => {
1873
1943
  const c = typeof l == "string" ? l.trim() : "";
1874
1944
  return c.length > 0 ? c : void 0;
@@ -1882,7 +1952,7 @@ function Ro(e) {
1882
1952
  ...i ? { environment: i } : {}
1883
1953
  };
1884
1954
  }
1885
- function Io() {
1955
+ function Vo() {
1886
1956
  if (typeof document > "u") return;
1887
1957
  const e = document.querySelector('link[rel~="icon"], link[rel="shortcut icon"], link[rel="apple-touch-icon"]');
1888
1958
  if (e?.href)
@@ -1892,36 +1962,36 @@ function Io() {
1892
1962
  return;
1893
1963
  }
1894
1964
  }
1895
- function Co() {
1965
+ function zo() {
1896
1966
  const e = (r) => !!r && r !== "transparent" && !/^rgba\(\s*0,\s*0,\s*0,\s*0\s*\)$/.test(r), t = getComputedStyle(document.body).backgroundColor;
1897
1967
  if (e(t)) return t;
1898
1968
  const n = getComputedStyle(document.documentElement).backgroundColor;
1899
1969
  return e(n) ? n : "#ffffff";
1900
1970
  }
1901
- var dt = Promise.resolve();
1902
- function pt(e) {
1903
- const t = dt.then(() => ko(e));
1904
- return dt = t.catch(() => {
1971
+ var ht = Promise.resolve();
1972
+ function gt(e) {
1973
+ const t = ht.then(() => jo(e));
1974
+ return ht = t.catch(() => {
1905
1975
  }), t;
1906
1976
  }
1907
- function Oo(e, t, n, r) {
1977
+ function Ko(e, t, n, r) {
1908
1978
  if (t !== "sticky") return [n, r];
1909
1979
  const o = e.getBoundingClientRect(), i = e.style.position;
1910
1980
  e.style.position = "static";
1911
1981
  const l = e.getBoundingClientRect();
1912
1982
  return e.style.position = i, [o.x - l.x, o.y - l.y];
1913
1983
  }
1914
- async function ko(e) {
1984
+ async function jo(e) {
1915
1985
  const { domToPng: t } = await import("./chunks/dist-BTlWkbvW.js");
1916
1986
  if (e) {
1917
1987
  const s = document.querySelector(e);
1918
1988
  if (!s) throw new Error("element_not_found");
1919
- if (s.closest(St)) throw new Error("capture_blocked");
1920
- const a = ot(s, { blocks: !0 });
1989
+ if (s.closest(Lt)) throw new Error("capture_blocked");
1990
+ const a = at(s, { blocks: !0 });
1921
1991
  try {
1922
1992
  return await t(s, {
1923
1993
  quality: 0.92,
1924
- onCloneNode: it
1994
+ onCloneNode: lt
1925
1995
  });
1926
1996
  } finally {
1927
1997
  a();
@@ -1931,8 +2001,8 @@ async function ko(e) {
1931
2001
  let c = () => {
1932
2002
  };
1933
2003
  try {
1934
- c = ot(n);
1935
- for (const s of n.querySelectorAll(`.${me}, ${ee}`)) {
2004
+ c = at(n);
2005
+ for (const s of n.querySelectorAll(`.${Te}, ${se}`)) {
1936
2006
  const a = s.getBoundingClientRect();
1937
2007
  if (a.width <= 0 || a.height <= 0) continue;
1938
2008
  const u = document.createElement("div");
@@ -1950,20 +2020,20 @@ async function ko(e) {
1950
2020
  for (const s of n.querySelectorAll("*")) {
1951
2021
  const a = getComputedStyle(s).position;
1952
2022
  if (a === "fixed" || a === "sticky") {
1953
- const [u, d] = Oo(s, a, r, o), p = s.style.transform;
1954
- l.push([s, p]), s.style.transform = `translate(${u}px, ${d}px)${p ? ` ${p}` : ""}`;
2023
+ const [u, f] = Ko(s, a, r, o), d = s.style.transform;
2024
+ l.push([s, d]), s.style.transform = `translate(${u}px, ${f}px)${d ? ` ${d}` : ""}`;
1955
2025
  }
1956
2026
  }
1957
2027
  return await t(n, {
1958
2028
  quality: 0.92,
1959
- backgroundColor: Co(),
2029
+ backgroundColor: zo(),
1960
2030
  width: n.clientWidth,
1961
2031
  height: n.clientHeight,
1962
2032
  style: {
1963
2033
  transform: `translate(${-r}px, ${-o}px)`,
1964
2034
  transformOrigin: "top left"
1965
2035
  },
1966
- onCloneNode: it
2036
+ onCloneNode: lt
1967
2037
  });
1968
2038
  } finally {
1969
2039
  c();
@@ -1971,7 +2041,7 @@ async function ko(e) {
1971
2041
  for (const [s, a] of l) s.style.transform = a;
1972
2042
  }
1973
2043
  }
1974
- function No(e) {
2044
+ function Xo(e) {
1975
2045
  if (e.id) return `#${CSS.escape(e.id)}`;
1976
2046
  const t = [];
1977
2047
  let n = e;
@@ -1992,56 +2062,56 @@ function No(e) {
1992
2062
  }
1993
2063
  return t.join(" > ");
1994
2064
  }
1995
- function Mo(e) {
2065
+ function Yo(e) {
1996
2066
  const t = e.tagName.toLowerCase();
1997
- if (ne(e)) return t;
2067
+ if (le(e)) return t;
1998
2068
  const n = (e.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 40);
1999
2069
  return n ? `${t} · ${n}` : t;
2000
2070
  }
2001
- var Nt = "leesto:shell-origin";
2002
- function xo() {
2071
+ var $t = "leesto:shell-origin";
2072
+ function Zo() {
2003
2073
  try {
2004
- return sessionStorage.getItem(Nt);
2074
+ return sessionStorage.getItem($t);
2005
2075
  } catch {
2006
2076
  return null;
2007
2077
  }
2008
2078
  }
2009
- function Do(e) {
2079
+ function Qo(e) {
2010
2080
  try {
2011
- sessionStorage.setItem(Nt, e);
2081
+ sessionStorage.setItem($t, e);
2012
2082
  } catch {
2013
2083
  }
2014
2084
  }
2015
- function Po() {
2085
+ function Jo() {
2016
2086
  try {
2017
2087
  return typeof window.name == "string" ? window.name : "";
2018
2088
  } catch {
2019
2089
  return "";
2020
2090
  }
2021
2091
  }
2022
- function ht(e = {}) {
2092
+ function bt(e = {}) {
2023
2093
  if (typeof window > "u" || window.parent === window) return () => {
2024
2094
  };
2025
- const t = window.parent, n = e.highlightColor ?? tn.light.primary, r = Lo({
2095
+ const t = window.parent, n = e.highlightColor ?? un.light.primary, r = Go({
2026
2096
  explicit: e.shellOrigins,
2027
2097
  pageOrigin: location.origin
2028
2098
  });
2029
2099
  let o = null;
2030
2100
  try {
2031
2101
  const g = document.referrer ? new URL(document.referrer).origin : "";
2032
- Ae(g, r) && (o = g);
2102
+ Me(g, r) && (o = g);
2033
2103
  } catch {
2034
2104
  }
2035
2105
  if (!o) {
2036
- const g = xo();
2037
- g && Ae(g, r) && (o = g);
2106
+ const g = Zo();
2107
+ g && Me(g, r) && (o = g);
2038
2108
  }
2039
2109
  const i = (g) => {
2040
2110
  if (o) {
2041
2111
  t.postMessage(g, o);
2042
2112
  return;
2043
2113
  }
2044
- for (const w of r) t.postMessage(g, w);
2114
+ for (const S of r) t.postMessage(g, S);
2045
2115
  };
2046
2116
  let l = null, c = "";
2047
2117
  const s = () => {
@@ -2060,90 +2130,95 @@ function ht(e = {}) {
2060
2130
  borderRadius: "4px",
2061
2131
  display: "none"
2062
2132
  }), document.documentElement.append(g);
2063
- let w = null, T = null, W = null;
2064
- const K = document.body.style.cursor, x = () => {
2065
- const M = T ?? w;
2066
- if (!M) return;
2067
- const F = M.getBoundingClientRect();
2068
- T ? i({
2133
+ let S = null, _ = null, z = null;
2134
+ const ee = document.body.style.cursor, B = () => {
2135
+ const D = _ ?? S;
2136
+ if (!D) return;
2137
+ const U = D.getBoundingClientRect();
2138
+ _ ? i({
2069
2139
  type: "leesto:element-picked",
2070
- selector: No(M),
2071
- label: Mo(M),
2140
+ selector: Xo(D),
2141
+ label: Yo(D),
2072
2142
  rect: {
2073
- x: F.x,
2074
- y: F.y,
2075
- width: F.width,
2076
- height: F.height
2143
+ x: U.x,
2144
+ y: U.y,
2145
+ width: U.width,
2146
+ height: U.height
2077
2147
  },
2078
- ...W ? { point: {
2079
- x: F.x + W.x,
2080
- y: F.y + W.y
2148
+ ...z ? { point: {
2149
+ x: U.x + z.x,
2150
+ y: U.y + z.y
2081
2151
  } } : {},
2082
2152
  viewport: {
2083
2153
  width: document.documentElement.clientWidth,
2084
2154
  height: document.documentElement.clientHeight
2085
2155
  },
2086
- context: Ir(M)
2156
+ context: qr(D)
2087
2157
  }) : Object.assign(g.style, {
2088
2158
  display: "block",
2089
- left: `${F.x}px`,
2090
- top: `${F.y}px`,
2091
- width: `${F.width}px`,
2092
- height: `${F.height}px`
2159
+ left: `${U.x}px`,
2160
+ top: `${U.y}px`,
2161
+ width: `${U.width}px`,
2162
+ height: `${U.height}px`
2093
2163
  });
2094
- }, ze = (M) => {
2095
- w = M.target instanceof Element ? M.target : null, x();
2096
- }, je = () => {
2097
- g.remove(), document.removeEventListener("mousemove", ze, !0), document.removeEventListener("click", Xe, !0), document.body.style.cursor = K;
2098
- }, Xe = (M) => {
2099
- if (M.preventDefault(), M.stopPropagation(), T = M.target instanceof Element ? M.target : null, T) {
2100
- const F = T.getBoundingClientRect();
2101
- W = {
2102
- x: M.clientX - F.x,
2103
- y: M.clientY - F.y
2164
+ }, Xe = (D) => {
2165
+ S = D.target instanceof Element ? D.target : null, B();
2166
+ }, Ye = () => {
2167
+ g.remove(), document.removeEventListener("mousemove", Xe, !0), document.removeEventListener("click", Ze, !0), document.body.style.cursor = ee;
2168
+ }, Ze = (D) => {
2169
+ if (D.preventDefault(), D.stopPropagation(), _ = D.target instanceof Element ? D.target : null, _) {
2170
+ const U = _.getBoundingClientRect();
2171
+ z = {
2172
+ x: D.clientX - U.x,
2173
+ y: D.clientY - U.y
2104
2174
  };
2105
2175
  }
2106
- je(), x();
2107
- }, Ke = (M) => {
2108
- M.key === "Escape" && (a?.(), i({ type: "leesto:pick-cancelled" }));
2176
+ Ye(), B();
2177
+ }, Qe = (D) => {
2178
+ D.key === "Escape" && (a?.(), i({ type: "leesto:pick-cancelled" }));
2109
2179
  };
2110
2180
  a = () => {
2111
- je(), document.removeEventListener("keydown", Ke, !0), document.removeEventListener("scroll", x, !0), window.removeEventListener("resize", x), a = null;
2112
- }, document.body.style.cursor = "crosshair", document.addEventListener("mousemove", ze, !0), document.addEventListener("click", Xe, !0), document.addEventListener("keydown", Ke, !0), document.addEventListener("scroll", x, !0), window.addEventListener("resize", x);
2113
- }, d = Kt(location.search, Po()), p = Le(d) && !fe(), h = jt(d), b = p ? Xt(d) ?? zt() : void 0, E = p ? At({
2181
+ Ye(), document.removeEventListener("keydown", Qe, !0), document.removeEventListener("scroll", B, !0), window.removeEventListener("resize", B), a = null;
2182
+ }, document.body.style.cursor = "crosshair", document.addEventListener("mousemove", Xe, !0), document.addEventListener("click", Ze, !0), document.addEventListener("keydown", Qe, !0), document.addEventListener("scroll", B, !0), window.addEventListener("resize", B);
2183
+ }, f = rn(location.search, Jo()), d = xe(f) && !ve(), m = tn(f), y = d ? nn(f) ?? en() : void 0, T = d ? Nt({
2114
2184
  captureNetwork: e.captureNetwork !== !1,
2115
- runId: b,
2185
+ runId: y,
2116
2186
  runIdOrigins: e.runIdOrigins
2117
2187
  }) : null;
2118
- let A = null;
2119
- const S = () => {
2120
- A ?? (A = vr());
2188
+ let I = null;
2189
+ const v = () => {
2190
+ I ?? (I = Cr());
2121
2191
  };
2122
- (o || d) && S();
2123
- let v = !1;
2124
- const _ = E ? Eo({
2125
- diagnostics: E,
2126
- maskPolicy: h
2127
- }).then((g) => g && v ? (g.stop(), null) : g).catch(() => null) : null;
2128
- let L = null, k = !1, D = !1;
2129
- const I = () => {
2192
+ (o || f) && v();
2193
+ let E = !1;
2194
+ const A = T ? $o({
2195
+ diagnostics: T,
2196
+ maskPolicy: m
2197
+ }).then((g) => g && E ? (g.stop(), null) : g).catch(() => null) : null;
2198
+ let L = null, k = !1, P = !1;
2199
+ const R = () => {
2130
2200
  if (L) {
2131
2201
  const g = L.stop();
2132
2202
  L = null, i({
2133
2203
  type: "leesto:rec-stopped",
2134
2204
  durationMs: g
2135
2205
  });
2136
- } else k && (D = !0);
2206
+ } else k && (P = !0);
2137
2207
  };
2138
- let O = !1;
2139
- const V = uo({
2140
- onAnchor: (g, w) => i({
2208
+ let C = !1, K = !1;
2209
+ const X = Fn(), p = Ro({
2210
+ onAnchor: (g, S) => i({
2141
2211
  type: "leesto:login-anchor",
2142
2212
  rect: g,
2143
- scrolling: w
2213
+ scrolling: S
2144
2214
  }),
2145
- onInteraction: () => i({ type: "leesto:login-interaction" })
2146
- }), q = io({
2215
+ onInteraction: () => i({ type: "leesto:login-interaction" }),
2216
+ onFieldFocus: () => i({ type: "leesto:login-field-focus" }),
2217
+ onFieldKey: (g) => i({
2218
+ type: "leesto:login-field-key",
2219
+ key: g
2220
+ })
2221
+ }), b = yo({
2147
2222
  onDetected: () => i({ type: "leesto:login-form-detected" }),
2148
2223
  onFilled: (g) => i({
2149
2224
  type: "leesto:login-filled",
@@ -2157,118 +2232,121 @@ function ht(e = {}) {
2157
2232
  type: "leesto:login-no-form",
2158
2233
  signedIn: g
2159
2234
  }),
2160
- onMatch: (g) => V.track(O ? so(g) : null)
2161
- }), f = () => q.cancel();
2162
- window.addEventListener("pagehide", f);
2163
- const m = Tn((g) => i({
2235
+ onMatch: (g) => {
2236
+ const S = C ? wo(g) : null;
2237
+ p.track(S), X.follow(K ? S?.field ?? null : null);
2238
+ }
2239
+ }), w = () => b.cancel();
2240
+ window.addEventListener("pagehide", w);
2241
+ const N = Cn((g) => i({
2164
2242
  type: "leesto:ambient",
2165
2243
  ...g
2166
- })), y = Ro(e.build), R = window.navigation;
2167
- let N = !1;
2168
- const H = () => !N && R?.canGoBack === !0, C = () => !N && R?.canGoForward === !0;
2169
- let P = C(), U = H(), oe = location.href;
2170
- const qe = () => {
2171
- oe = location.href, U = H(), P = C();
2172
- const g = Io();
2244
+ })), x = Wo(e.build), F = window.navigation;
2245
+ let O = !1;
2246
+ const $ = () => !O && F?.canGoBack === !0, H = () => !O && F?.canGoForward === !0;
2247
+ let Y = H(), j = $(), h = location.href;
2248
+ const M = () => {
2249
+ h = location.href, j = $(), Y = H();
2250
+ const g = Vo();
2173
2251
  i({
2174
2252
  type: "leesto:ready",
2175
2253
  url: location.href,
2176
2254
  bridgeVersion: 1,
2177
2255
  capabilities: [
2178
- Mt,
2179
- Pt,
2180
- Dt,
2181
- ...R ? ["navigation", "navigation-forward"] : [],
2182
- ..._ ? [xt] : []
2256
+ Bt,
2257
+ Ht,
2258
+ Ut,
2259
+ ...F ? ["navigation", "navigation-forward"] : [],
2260
+ ...A ? [qt] : []
2183
2261
  ],
2184
- canGoBack: U,
2185
- canGoForward: P,
2262
+ canGoBack: j,
2263
+ canGoForward: Y,
2186
2264
  ...g ? { favicon: g } : {},
2187
- ...y ? { build: y } : {},
2188
- ...b ? { diagnosticRunId: b } : {},
2189
- ...fe() ? { gpc: !0 } : {}
2190
- }), m.announce();
2191
- }, He = (g) => {
2192
- if (g.source !== t || !Ae(g.origin, r) || !Bt(g.data)) return;
2193
- o !== g.origin && (o = g.origin, Do(g.origin)), S();
2194
- const w = g.data;
2195
- if (w.type === "leesto:ping")
2196
- i({ type: "leesto:pong" }), qe();
2197
- else if (w.type === "leesto:navigate-back" || w.type === "leesto:navigate-forward") {
2198
- const T = w.type === "leesto:navigate-forward";
2199
- if (!R || !(T ? C() : H())) return;
2200
- N = !0, G(), Promise.resolve((T ? R.forward() : R.back()).finished).catch(() => {
2265
+ ...x ? { build: x } : {},
2266
+ ...y ? { diagnosticRunId: y } : {},
2267
+ ...ve() ? { gpc: !0 } : {}
2268
+ }), N.announce();
2269
+ }, G = (g) => {
2270
+ if (g.source !== t || !Me(g.origin, r) || !Kt(g.data)) return;
2271
+ o !== g.origin && (o = g.origin, Qo(g.origin)), v();
2272
+ const S = g.data;
2273
+ if (S.type === "leesto:ping")
2274
+ i({ type: "leesto:pong" }), M();
2275
+ else if (S.type === "leesto:navigate-back" || S.type === "leesto:navigate-forward") {
2276
+ const _ = S.type === "leesto:navigate-forward";
2277
+ if (!F || !(_ ? H() : $())) return;
2278
+ O = !0, q(), Promise.resolve((_ ? F.forward() : F.back()).finished).catch(() => {
2201
2279
  }).finally(() => {
2202
- N = !1, v || G();
2280
+ O = !1, E || q();
2203
2281
  });
2204
- } else if (w.type === "leesto:highlight") {
2205
- if (s(), w.selector) {
2206
- let T = null;
2282
+ } else if (S.type === "leesto:highlight") {
2283
+ if (s(), S.selector) {
2284
+ let _ = null;
2207
2285
  try {
2208
- T = document.querySelector(w.selector);
2286
+ _ = document.querySelector(S.selector);
2209
2287
  } catch {
2210
- T = null;
2288
+ _ = null;
2211
2289
  }
2212
- T && (l = T, c = T.style.outline, T.style.outline = `2px solid ${n}`, T.style.outlineOffset = "2px", T.scrollIntoView({
2290
+ _ && (l = _, c = _.style.outline, _.style.outline = `2px solid ${n}`, _.style.outlineOffset = "2px", _.scrollIntoView({
2213
2291
  block: "center",
2214
2292
  behavior: "smooth"
2215
2293
  }));
2216
2294
  }
2217
- } else if (w.type === "leesto:pick-start") u();
2218
- else if (w.type === "leesto:pick-stop") a?.();
2219
- else if (w.type === "leesto:capture-request") (w.selector ? pt(w.selector) : (e.capture ?? pt)()).then((T) => i({
2295
+ } else if (S.type === "leesto:pick-start") u();
2296
+ else if (S.type === "leesto:pick-stop") a?.();
2297
+ else if (S.type === "leesto:capture-request") (S.selector ? gt(S.selector) : (e.capture ?? gt)()).then((_) => i({
2220
2298
  type: "leesto:screenshot",
2221
- dataUrl: T,
2222
- ...w.selector ? { selector: w.selector } : {}
2223
- })).catch((T) => i({
2299
+ dataUrl: _,
2300
+ ...S.selector ? { selector: S.selector } : {}
2301
+ })).catch((_) => i({
2224
2302
  type: "leesto:capture-failed",
2225
- reason: T instanceof Error ? T.message : "capture_error"
2303
+ reason: _ instanceof Error ? _.message : "capture_error"
2226
2304
  }));
2227
- else if (w.type === "leesto:rec-start") {
2305
+ else if (S.type === "leesto:rec-start") {
2228
2306
  if (L || k) return;
2229
- if (fe()) {
2307
+ if (ve()) {
2230
2308
  i({
2231
2309
  type: "leesto:rec-blocked",
2232
2310
  reason: "gpc"
2233
2311
  });
2234
2312
  return;
2235
2313
  }
2236
- k = !0, D = !1;
2237
- const T = (x) => i({
2314
+ k = !0, P = !1;
2315
+ const _ = (B) => i({
2238
2316
  type: "leesto:rec-batch",
2239
- events: x
2240
- }), W = () => I(), K = () => wo({
2241
- onBatch: T,
2242
- onCap: W,
2317
+ events: B
2318
+ }), z = () => R(), ee = () => Po({
2319
+ onBatch: _,
2320
+ onCap: z,
2243
2321
  captureNetwork: e.captureNetwork,
2244
- maskPolicy: h,
2245
- diagnostics: E
2322
+ maskPolicy: m,
2323
+ diagnostics: T
2246
2324
  });
2247
- (_ ? _.then((x) => x ? x.stream({
2248
- onBatch: T,
2249
- onCap: W
2250
- }) : K()) : K()).then((x) => {
2251
- k = !1, L = x, D && I();
2252
- }).catch((x) => {
2325
+ (A ? A.then((B) => B ? B.stream({
2326
+ onBatch: _,
2327
+ onCap: z
2328
+ }) : ee()) : ee()).then((B) => {
2329
+ k = !1, L = B, P && R();
2330
+ }).catch((B) => {
2253
2331
  k = !1, i({
2254
2332
  type: "leesto:rec-error",
2255
- reason: x instanceof Error ? x.message : "rec_error"
2333
+ reason: B instanceof Error ? B.message : "rec_error"
2256
2334
  });
2257
2335
  });
2258
- } else if (w.type === "leesto:rec-stop") I();
2259
- else if (w.type === "leesto:rec-buffer-request") {
2260
- if (!_) {
2336
+ } else if (S.type === "leesto:rec-stop") R();
2337
+ else if (S.type === "leesto:rec-buffer-request") {
2338
+ if (!A) {
2261
2339
  i({
2262
2340
  type: "leesto:rec-buffer",
2263
2341
  events: [],
2264
2342
  durationMs: 0,
2265
- unavailable: fe() ? "gpc" : "not-armed"
2343
+ unavailable: ve() ? "gpc" : "not-armed"
2266
2344
  });
2267
2345
  return;
2268
2346
  }
2269
- _.then((T) => {
2270
- if (v) return;
2271
- if (!T) {
2347
+ A.then((_) => {
2348
+ if (E) return;
2349
+ if (!_) {
2272
2350
  i({
2273
2351
  type: "leesto:rec-buffer",
2274
2352
  events: [],
@@ -2277,62 +2355,62 @@ function ht(e = {}) {
2277
2355
  });
2278
2356
  return;
2279
2357
  }
2280
- const { events: W, durationMs: K } = T.snapshot();
2358
+ const { events: z, durationMs: ee } = _.snapshot();
2281
2359
  i({
2282
2360
  type: "leesto:rec-buffer",
2283
- events: W,
2284
- durationMs: K
2361
+ events: z,
2362
+ durationMs: ee
2285
2363
  });
2286
2364
  });
2287
- } else w.type === "leesto:rec-buffer-hold" ? _?.then((T) => T?.hold()) : w.type === "leesto:rec-buffer-release" ? _?.then((T) => T?.release()) : w.type === "leesto:diagnostics-request" ? i({
2365
+ } else S.type === "leesto:rec-buffer-hold" ? A?.then((_) => _?.hold()) : S.type === "leesto:rec-buffer-release" ? A?.then((_) => _?.release()) : S.type === "leesto:diagnostics-request" ? i({
2288
2366
  type: "leesto:diagnostics",
2289
- snapshot: E?.snapshot() ?? {
2367
+ snapshot: T?.snapshot() ?? {
2290
2368
  errors: [],
2291
2369
  logs: [],
2292
2370
  network: []
2293
2371
  }
2294
- }) : w.type === "leesto:login-watch" ? (O = w.anchor === !0, q.watch()) : w.type === "leesto:login-fill" ? q.fill({
2295
- login: w.login,
2296
- password: w.password
2297
- }) : w.type === "leesto:login-cancel" && q.cancel();
2372
+ }) : S.type === "leesto:login-watch" ? (C = S.anchor === !0, K = C && S.silenceAutofill === !0, b.watch()) : S.type === "leesto:login-fill" ? b.fill({
2373
+ login: S.login,
2374
+ password: S.password
2375
+ }) : S.type === "leesto:login-cancel" ? b.cancel() : S.type === "leesto:login-focus-field" && p.focusField();
2298
2376
  };
2299
- window.addEventListener("message", He), qe();
2300
- const G = (g) => {
2301
- if (!(location.href === oe && H() === U && C() === P)) {
2302
- if (location.href !== oe) {
2303
- const w = location.href;
2304
- _?.then((T) => T?.markNavigation(w)), m.navigated();
2377
+ window.addEventListener("message", G), M();
2378
+ const q = (g) => {
2379
+ if (!(location.href === h && $() === j && H() === Y)) {
2380
+ if (location.href !== h) {
2381
+ const S = location.href;
2382
+ A?.then((_) => _?.markNavigation(S)), N.navigated();
2305
2383
  }
2306
- oe = location.href, U = H(), P = C(), i({
2384
+ h = location.href, j = $(), Y = H(), i({
2307
2385
  type: "leesto:location",
2308
2386
  url: location.href,
2309
- canGoBack: U,
2310
- canGoForward: P,
2387
+ canGoBack: j,
2388
+ canGoForward: Y,
2311
2389
  navigationType: typeof g == "string" ? g : "traverse"
2312
2390
  });
2313
2391
  }
2314
- }, Ue = history.pushState, Ge = history.replaceState, We = (...g) => {
2315
- Ue.apply(history, g), G("push");
2316
- }, Ve = (...g) => {
2317
- Ge.apply(history, g), G("replace");
2392
+ }, ue = history.pushState, fe = history.replaceState, de = (...g) => {
2393
+ ue.apply(history, g), q("push");
2394
+ }, je = (...g) => {
2395
+ fe.apply(history, g), q("replace");
2318
2396
  };
2319
- return history.pushState = We, history.replaceState = Ve, R?.addEventListener("currententrychange", G), window.addEventListener("popstate", G), window.addEventListener("hashchange", G), () => {
2320
- v = !0, m.stop(), A?.(), R?.removeEventListener("currententrychange", G), I(), _?.then((g) => g?.stop()), E?.teardown(), s(), a?.(), q.teardown(), V.teardown(), window.removeEventListener("pagehide", f), window.removeEventListener("message", He), window.removeEventListener("popstate", G), window.removeEventListener("hashchange", G), history.pushState === We && (history.pushState = Ue), history.replaceState === Ve && (history.replaceState = Ge);
2397
+ return history.pushState = de, history.replaceState = je, F?.addEventListener("currententrychange", q), window.addEventListener("popstate", q), window.addEventListener("hashchange", q), () => {
2398
+ E = !0, N.stop(), I?.(), F?.removeEventListener("currententrychange", q), R(), A?.then((g) => g?.stop()), T?.teardown(), s(), a?.(), b.teardown(), p.teardown(), window.removeEventListener("pagehide", w), window.removeEventListener("message", G), window.removeEventListener("popstate", q), window.removeEventListener("hashchange", q), history.pushState === de && (history.pushState = ue), history.replaceState === je && (history.replaceState = fe);
2321
2399
  };
2322
2400
  }
2323
- function Fo() {
2401
+ function ei() {
2324
2402
  return typeof document > "u" ? null : document.currentScript ?? document.querySelector("script[data-leesto-connect]");
2325
2403
  }
2326
- function $o(e) {
2404
+ function ti(e) {
2327
2405
  const t = {}, n = e?.dataset.highlightColor;
2328
2406
  n && (t.highlightColor = n);
2329
2407
  const r = (e?.dataset.shellOrigin ?? "").split(",").map((o) => o.trim()).filter(Boolean);
2330
2408
  return r.length > 0 && (t.shellOrigins = r), t;
2331
2409
  }
2332
2410
  if (typeof window < "u") {
2333
- window.LeestoConnect = { connect: (t) => ht(t) };
2334
- const e = Fo();
2335
- (!e || e.dataset.leestoManual === void 0) && ht($o(e));
2411
+ window.LeestoConnect = { connect: (t) => bt(t) };
2412
+ const e = ei();
2413
+ (!e || e.dataset.leestoManual === void 0) && bt(ti(e));
2336
2414
  }
2337
2415
 
2338
2416
  //# sourceMappingURL=leesto-connect.js.map