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