@spectosh/browser 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
- import { _ as e } from "./src-oKUp2jmR.js";
1
+ import { _ as e, v as t } from "./src-mrKmVGmE.js";
2
2
  //#region src/point/describe.js
3
- var t = [
3
+ var n = [
4
4
  "data-testid",
5
5
  "data-test",
6
6
  "data-test-id",
7
7
  "data-cy",
8
8
  "data-qa"
9
- ], n = [
9
+ ], r = [
10
10
  "display",
11
11
  "visibility",
12
12
  "opacity",
@@ -16,7 +16,7 @@ var t = [
16
16
  "cursor",
17
17
  "color",
18
18
  "background"
19
- ], r = /* @__PURE__ */ new Set([
19
+ ], i = /* @__PURE__ */ new Set([
20
20
  "id",
21
21
  "class",
22
22
  "role",
@@ -33,8 +33,8 @@ var t = [
33
33
  "aria-checked",
34
34
  "for",
35
35
  "data-specto-src",
36
- ...t
37
- ]), i = /* @__PURE__ */ new Set([
36
+ ...n
37
+ ]), a = /* @__PURE__ */ new Set([
38
38
  "area",
39
39
  "base",
40
40
  "br",
@@ -48,59 +48,60 @@ var t = [
48
48
  "source",
49
49
  "track",
50
50
  "wbr"
51
- ]), a = (e) => String(e).replace(/\\/g, "\\\\").replace(/"/g, "\\\""), o = (e) => String(e?.tagName || "").toLowerCase(), s = (e, t) => {
51
+ ]), o = (e) => String(e).replace(/\\/g, "\\\\").replace(/"/g, "\\\""), s = (e) => String(e?.tagName || "").toLowerCase(), c = (e, t) => {
52
52
  try {
53
53
  return e.getAttribute(t);
54
54
  } catch {
55
55
  return null;
56
56
  }
57
- }, c = (e) => !!e && e.length <= 64 && !/\d{4,}|^:|:r\w*:|^(ember|react|radix|headlessui|mui|rc|el)[-_:]?\d/i.test(e) && /^[A-Za-z][\w-]*$/.test(e), l = (e) => e && !e.startsWith("specto-") && e.length <= 40 && !/\d{3,}|^(css|sc|jsx|emotion|tw)-|__[A-Za-z0-9]{5,}$|^[a-z0-9]{6,}$/i.test(e);
58
- function u(e, t) {
59
- if (t) return !0;
57
+ }, l = (e) => !!e && e.length <= 64 && !/\d{4,}|^:|:r\w*:|^(ember|react|radix|headlessui|mui|rc|el)[-_:]?\d/i.test(e) && /^[A-Za-z][\w-]*$/.test(e), u = (e) => e && !e.startsWith("specto-") && e.length <= 40 && !/\d{3,}|^(css|sc|jsx|emotion|tw)-|__[A-Za-z0-9]{5,}$|^[a-z0-9]{6,}$/i.test(e);
58
+ function d(e, n, r = "") {
59
+ let i = s(e);
60
+ if (i === "input" || i === "textarea" || i === "select" || c(e, "contenteditable") === "true") return !0;
61
+ if (n) return !t(e, r);
60
62
  for (let t = e; t && t.nodeType === 1; t = t.parentElement) if (t.classList?.contains("specto-mask") || t.classList?.contains("specto-block")) return !0;
61
- let n = o(e);
62
- return n === "input" || n === "textarea" || n === "select" || s(e, "contenteditable") === "true";
63
+ return !1;
63
64
  }
64
- function d(e) {
65
- for (let n of t) {
66
- let t = s(e, n);
67
- if (t) return [n, t];
65
+ function f(e) {
66
+ for (let t of n) {
67
+ let n = c(e, t);
68
+ if (n) return [t, n];
68
69
  }
69
70
  return null;
70
71
  }
71
- function f(e) {
72
- let t = o(e), n = e.id;
73
- if (c(n)) return {
72
+ function p(e) {
73
+ let t = s(e), n = e.id;
74
+ if (l(n)) return {
74
75
  sel: `${t}#${n}`,
75
76
  anchor: !0
76
77
  };
77
- let r = d(e);
78
+ let r = f(e);
78
79
  if (r) return {
79
- sel: `${t}[${r[0]}="${a(r[1])}"]`,
80
+ sel: `${t}[${r[0]}="${o(r[1])}"]`,
80
81
  anchor: !0
81
82
  };
82
- let i = typeof e.className == "string" ? e.className.trim().split(/\s+/).filter(l).slice(0, 2) : [], s = i.length ? `${t}.${i.join(".")}` : t, u = e.parentElement;
83
- if (u) {
84
- let n = Array.from(u.children || []).filter((e) => o(e) === t);
85
- n.length > 1 && (s += `:nth-of-type(${n.indexOf(e) + 1})`);
83
+ let i = typeof e.className == "string" ? e.className.trim().split(/\s+/).filter(u).slice(0, 2) : [], a = i.length ? `${t}.${i.join(".")}` : t, c = e.parentElement;
84
+ if (c) {
85
+ let n = Array.from(c.children || []).filter((e) => s(e) === t);
86
+ n.length > 1 && (a += `:nth-of-type(${n.indexOf(e) + 1})`);
86
87
  }
87
88
  return {
88
- sel: s,
89
+ sel: a,
89
90
  anchor: !1
90
91
  };
91
92
  }
92
- function p(e, t = 5) {
93
+ function m(e, t = 5) {
93
94
  let n = [];
94
- for (let r = e, i = 0; r && r.nodeType === 1 && i < t && o(r) !== "html" && o(r) !== "body"; r = r.parentElement, i++) {
95
- let e = f(r);
95
+ for (let r = e, i = 0; r && r.nodeType === 1 && i < t && s(r) !== "html" && s(r) !== "body"; r = r.parentElement, i++) {
96
+ let e = p(r);
96
97
  if (n.unshift(e.sel), e.anchor) break;
97
98
  }
98
- return n.join(" > ") || o(e) || "body";
99
+ return n.join(" > ") || s(e) || "body";
99
100
  }
100
- function m(t, n) {
101
- let r = s(t, "aria-label") || s(t, "title") || s(t, "alt");
101
+ function h(t, n) {
102
+ let r = c(t, "aria-label") || c(t, "title") || c(t, "alt");
102
103
  if (r && !n) return e(r).trim().slice(0, 80);
103
- let i = s(t, "aria-labelledby");
104
+ let i = c(t, "aria-labelledby");
104
105
  if (i && !n) try {
105
106
  let t = document.getElementById(i)?.textContent;
106
107
  if (t) return e(t).trim().slice(0, 80);
@@ -109,25 +110,25 @@ function m(t, n) {
109
110
  let a = (t.innerText ?? t.textContent ?? "").replace(/\s+/g, " ").trim();
110
111
  return e(a).slice(0, 80);
111
112
  }
112
- function h(e) {
113
- let t = s(e, "role");
113
+ function g(e) {
114
+ let t = c(e, "role");
114
115
  if (t) return t;
115
- let n = o(e);
116
- return n === "a" && s(e, "href") != null ? "link" : n === "button" || n === "input" && [
116
+ let n = s(e);
117
+ return n === "a" && c(e, "href") != null ? "link" : n === "button" || n === "input" && [
117
118
  "submit",
118
119
  "button",
119
120
  "reset"
120
- ].includes(s(e, "type")) ? "button" : n === "input" ? s(e, "type") === "checkbox" ? "checkbox" : s(e, "type") === "radio" ? "radio" : "textbox" : n === "select" ? "combobox" : n === "textarea" ? "textbox" : /^h[1-6]$/.test(n) ? "heading" : n === "img" ? "img" : null;
121
+ ].includes(c(e, "type")) ? "button" : n === "input" ? c(e, "type") === "checkbox" ? "checkbox" : c(e, "type") === "radio" ? "radio" : "textbox" : n === "select" ? "combobox" : n === "textarea" ? "textbox" : /^h[1-6]$/.test(n) ? "heading" : n === "img" ? "img" : null;
121
122
  }
122
- function g(e, { masked: t } = {}) {
123
- let n = [], r = d(e);
124
- r && n.push(`[${r[0]}="${a(r[1])}"]`), c(e.id) && n.push(`#${e.id}`);
125
- let i = h(e), o = m(e, t);
126
- return i && o && o.length <= 40 && n.push(`role=${i}[name="${a(o)}"]`), n.push(p(e)), [...new Set(n)].slice(0, 6);
123
+ function _(e, { masked: t } = {}) {
124
+ let n = [], r = f(e);
125
+ r && n.push(`[${r[0]}="${o(r[1])}"]`), l(e.id) && n.push(`#${e.id}`);
126
+ let i = g(e), a = h(e, t);
127
+ return i && a && a.length <= 40 && n.push(`role=${i}[name="${o(a)}"]`), n.push(m(e)), [...new Set(n)].slice(0, 6);
127
128
  }
128
- function _(e) {
129
+ function v(e) {
129
130
  let t = null;
130
- for (let n = e; n && n.nodeType === 1 && !t; n = n.parentElement) t = s(n, "data-specto-src");
131
+ for (let n = e; n && n.nodeType === 1 && !t; n = n.parentElement) t = c(n, "data-specto-src");
131
132
  let n = e && Object.keys(e).find((e) => e.startsWith("__reactFiber$") || e.startsWith("__reactInternalInstance$"));
132
133
  if (n) for (let r = e[n], i = 0; r && i < 60; r = r.return, i++) {
133
134
  let e = r.type;
@@ -161,12 +162,12 @@ function _(e) {
161
162
  source: t
162
163
  };
163
164
  }
164
- function v(t) {
165
+ function y(t) {
165
166
  let n = [];
166
167
  for (let r = t.parentElement, i = 0; r && r.nodeType === 1 && i < 25 && n.length < 6; r = r.parentElement, i++) {
167
- let t = o(r);
168
+ let t = s(r);
168
169
  if (t === "body" || t === "html") break;
169
- let i = s(r, "role"), a = s(r, "aria-label");
170
+ let i = c(r, "role"), a = c(r, "aria-label");
170
171
  ([
171
172
  "main",
172
173
  "nav",
@@ -184,83 +185,83 @@ function v(t) {
184
185
  "region",
185
186
  "tabpanel",
186
187
  "menu"
187
- ].includes(i) || c(r.id) || d(r)) && n.unshift(`${t}${c(r.id) ? `#${r.id}` : ""}${a ? `[${e(a).slice(0, 30)}]` : ""}`);
188
+ ].includes(i) || l(r.id) || f(r)) && n.unshift(`${t}${l(r.id) ? `#${r.id}` : ""}${a ? `[${e(a).slice(0, 30)}]` : ""}`);
188
189
  }
189
190
  return n;
190
191
  }
191
- function y(e) {
192
- let t = {}, n = o(e);
193
- e.disabled === !0 || s(e, "aria-disabled") === "true" ? t.disabled = !0 : [
192
+ function b(e) {
193
+ let t = {}, n = s(e);
194
+ e.disabled === !0 || c(e, "aria-disabled") === "true" ? t.disabled = !0 : [
194
195
  "button",
195
196
  "input",
196
197
  "select",
197
198
  "textarea"
198
- ].includes(n) && (t.disabled = !1), n === "input" && ["checkbox", "radio"].includes(s(e, "type")) && (t.checked = !!e.checked);
199
- let r = s(e, "aria-expanded");
200
- return r != null && (t.expanded = r === "true"), s(e, "aria-busy") === "true" && (t.busy = !0), Object.keys(t).length ? t : void 0;
199
+ ].includes(n) && (t.disabled = !1), n === "input" && ["checkbox", "radio"].includes(c(e, "type")) && (t.checked = !!e.checked);
200
+ let r = c(e, "aria-expanded");
201
+ return r != null && (t.expanded = r === "true"), c(e, "aria-busy") === "true" && (t.busy = !0), Object.keys(t).length ? t : void 0;
201
202
  }
202
- function b(e) {
203
+ function x(e) {
203
204
  try {
204
- let t = getComputedStyle(e), r = {};
205
- for (let e of n) {
206
- let n = e === "background" ? t.backgroundColor : t[e];
207
- n != null && n !== "" && (r[e] = String(n).slice(0, 80));
205
+ let t = getComputedStyle(e), n = {};
206
+ for (let e of r) {
207
+ let r = e === "background" ? t.backgroundColor : t[e];
208
+ r != null && r !== "" && (n[e] = String(r).slice(0, 80));
208
209
  }
209
- return r;
210
+ return n;
210
211
  } catch {
211
212
  return {};
212
213
  }
213
214
  }
214
- function x(t, { strict: n = !1, maxNodes: a = 60, maxDepth: s = 4, maxChars: c = 4e3 } = {}) {
215
- let l = 0, d = (t, f, p) => {
216
- if (l++ > a) return "…";
215
+ function S(t, { strict: n = !1, unmask: r = "", maxNodes: o = 60, maxDepth: c = 4, maxChars: l = 4e3 } = {}) {
216
+ let u = 0, f = (t, p, m) => {
217
+ if (u++ > o) return "…";
217
218
  if (t.nodeType === 3) {
218
219
  let n = String(t.textContent || "").replace(/\s+/g, " ");
219
- return n.trim() ? p ? n.replace(/\S/g, "•").slice(0, 60) : e(n).slice(0, 120).replace(/</g, "&lt;") : n ? " " : "";
220
+ return n.trim() ? m ? n.replace(/\S/g, "•").slice(0, 60) : e(n).slice(0, 120).replace(/</g, "&lt;") : n ? " " : "";
220
221
  }
221
222
  if (t.nodeType !== 1) return "";
222
- let m = o(t);
223
+ let h = s(t);
223
224
  if ([
224
225
  "script",
225
226
  "style",
226
227
  "noscript",
227
228
  "template",
228
229
  "svg"
229
- ].includes(m)) return m === "svg" ? "<svg/>" : "";
230
- let h = p || u(t, n), g = [];
230
+ ].includes(h)) return h === "svg" ? "<svg/>" : "";
231
+ let g = n ? d(t, !0, r) || !!t.closest?.("[contenteditable=\"true\"]") : m || d(t, !1), _ = [];
231
232
  for (let n of Array.from(t.attributes || [])) {
232
- if (!r.has(n.name)) continue;
233
+ if (!i.has(n.name)) continue;
233
234
  let t = n.value;
234
235
  if (n.name === "href") try {
235
236
  t = new URL(t, location.href).pathname;
236
237
  } catch {
237
238
  t = "";
238
239
  }
239
- n.name === "class" && (t = t.split(/\s+/).filter((e) => e && !e.startsWith("specto-")).slice(0, 4).join(" ")), g.push(t === "" ? n.name : `${n.name}="${e(t).slice(0, 80).replace(/"/g, "&quot;")}"`);
240
+ n.name === "class" && (t = t.split(/\s+/).filter((e) => e && !e.startsWith("specto-")).slice(0, 4).join(" ")), _.push(t === "" ? n.name : `${n.name}="${e(t).slice(0, 80).replace(/"/g, "&quot;")}"`);
240
241
  }
241
- m === "input" && g.push("value=\"[masked]\"");
242
- let _ = `<${m}${g.length ? " " + g.join(" ") : ""}>`;
243
- if (i.has(m)) return _;
244
- if (f >= s) return `${_}…</${m}>`;
245
- let v = "";
246
- for (let e of Array.from(t.childNodes || [])) if (v += d(e, f + 1, h), v.length > c) break;
247
- return `${_}${v}</${m}>`;
242
+ h === "input" && _.push("value=\"[masked]\"");
243
+ let v = `<${h}${_.length ? " " + _.join(" ") : ""}>`;
244
+ if (a.has(h)) return v;
245
+ if (p >= c) return `${v}…</${h}>`;
246
+ let y = "";
247
+ for (let e of Array.from(t.childNodes || [])) if (y += f(e, p + 1, g), y.length > l) break;
248
+ return `${v}${y}</${h}>`;
248
249
  };
249
- return d(t, 0, u(t, n)).slice(0, c);
250
+ return f(t, 0, d(t, n, r)).slice(0, l);
250
251
  }
251
- function S(e, t) {
252
- let n = d(e);
252
+ function ee(e, t) {
253
+ let n = f(e);
253
254
  return [
254
255
  t.component,
255
256
  n ? n[1] : null,
256
- t.name || o(e)
257
- ].filter(Boolean).slice(0, 2).join(" › ") || o(e);
257
+ t.name || s(e)
258
+ ].filter(Boolean).slice(0, 2).join(" › ") || s(e);
258
259
  }
259
- function ee(t, { strict: n = !1 } = {}) {
260
- let r = u(t, n), { component: i, source: a } = _(t), c = m(t, r), l = h(t), d = null;
260
+ function C(t, { strict: n = !1, unmask: r = "" } = {}) {
261
+ let i = d(t, n, r), { component: a, source: o } = v(t), l = h(t, i), u = g(t), f = null;
261
262
  try {
262
263
  let e = t.getBoundingClientRect();
263
- d = {
264
+ f = {
264
265
  x: Math.round(e.left),
265
266
  y: Math.round(e.top),
266
267
  w: Math.round(e.width),
@@ -268,25 +269,28 @@ function ee(t, { strict: n = !1 } = {}) {
268
269
  };
269
270
  } catch {}
270
271
  return {
271
- tag: o(t),
272
- role: l,
273
- label: r ? null : s(t, "aria-label") ? e(s(t, "aria-label")).slice(0, 120) : null,
274
- name: c ? `${c}${l ? ` ${l}` : ""}` : l || o(t),
275
- component: i,
276
- source: a,
277
- selectors: g(t, { masked: r }),
278
- path: v(t),
279
- rect: d,
280
- text: r ? null : c || null,
281
- state: y(t),
282
- styles: b(t),
283
- snapshot: x(t, { strict: n })
272
+ tag: s(t),
273
+ role: u,
274
+ label: i ? null : c(t, "aria-label") ? e(c(t, "aria-label")).slice(0, 120) : null,
275
+ name: l ? `${l}${u ? ` ${u}` : ""}` : u || s(t),
276
+ component: a,
277
+ source: o,
278
+ selectors: _(t, { masked: i }),
279
+ path: y(t),
280
+ rect: f,
281
+ text: i ? null : l || null,
282
+ state: b(t),
283
+ styles: x(t),
284
+ snapshot: S(t, {
285
+ strict: n,
286
+ unmask: r
287
+ })
284
288
  };
285
289
  }
286
290
  //#endregion
287
291
  //#region src/point/context.js
288
- var C = 1e3, w = 6e3, T = 1e4;
289
- function E(e, t, n = Date.now()) {
292
+ var w = 1e3, T = 6e3, E = 1e4;
293
+ function D(e, t, n = Date.now()) {
290
294
  for (let r = e.length - 1; r >= 0; r--) {
291
295
  let i = e[r];
292
296
  if (n - i.at > 6e4) break;
@@ -297,7 +301,7 @@ function E(e, t, n = Date.now()) {
297
301
  return null;
298
302
  }
299
303
  function te({ recent: e, contains: t, now: n = Date.now() }) {
300
- let r = E(e.clicks || [], t, n), [i, a] = r ? [r - C, r + w] : [n - T, n], o = (e.network || []).filter((e) => e.at >= i && e.at <= a).slice(-20).map((e) => ({
304
+ let r = D(e.clicks || [], t, n), [i, a] = r ? [r - w, r + T] : [n - E, n], o = (e.network || []).filter((e) => e.at >= i && e.at <= a).slice(-20).map((e) => ({
301
305
  at: e.at,
302
306
  method: e.method,
303
307
  url: e.url,
@@ -363,18 +367,18 @@ function ne() {
363
367
  }
364
368
  //#endregion
365
369
  //#region src/point/voice.js
366
- var D = [
370
+ var O = [
367
371
  "audio/webm;codecs=opus",
368
372
  "audio/ogg;codecs=opus",
369
373
  "audio/mp4",
370
374
  "audio/webm"
371
- ], O = .08, k = 700, re = 2e4, ie = () => typeof window < "u" && window.MediaRecorder !== void 0 && !!navigator.mediaDevices?.getUserMedia;
375
+ ], k = .08, A = 700, re = 2e4, ie = () => typeof window < "u" && window.MediaRecorder !== void 0 && !!navigator.mediaDevices?.getUserMedia;
372
376
  async function ae({ onPhrase: e = () => {}, keep: t = !1 } = {}) {
373
377
  let n = await navigator.mediaDevices.getUserMedia({ audio: {
374
378
  channelCount: 1,
375
379
  echoCancellation: !0,
376
380
  noiseSuppression: !0
377
- } }), r = D.find((e) => {
381
+ } }), r = O.find((e) => {
378
382
  try {
379
383
  return MediaRecorder.isTypeSupported(e);
380
384
  } catch {
@@ -436,7 +440,7 @@ async function ae({ onPhrase: e = () => {}, keep: t = !1 } = {}) {
436
440
  let h = setInterval(() => {
437
441
  if (!u) return;
438
442
  let e = Date.now();
439
- o && l() >= O && (u.spoke = !0, u.loudAt = e), u.spoke && (u.loudAt && e - u.loudAt > k || e - u.at > re) && m();
443
+ o && l() >= k && (u.spoke = !0, u.loudAt = e), u.spoke && (u.loudAt && e - u.loudAt > A || e - u.at > re) && m();
440
444
  }, 50), g = null;
441
445
  t && (g = {
442
446
  rec: new MediaRecorder(n, i),
@@ -482,19 +486,19 @@ function oe(e) {
482
486
  }
483
487
  //#endregion
484
488
  //#region src/point/entry.js
485
- var A = "specto-point-used", j = "specto-point-visits", se = "specto-point-visit", M = "specto-point-hint", N = "specto-point-nudged", P = "specto-point-me", F = "specto-point-hidden", I = 12e3, L = "specto-point-receipts", R = 7776e6, z = () => {
489
+ var j = "specto-point-used", M = "specto-point-visits", se = "specto-point-visit", ce = "specto-point-hint", N = "specto-point-nudged", P = "specto-point-me", F = "specto-point-hidden", I = 12e3, L = "specto-point-receipts", R = 7776e6, z = () => {
486
490
  try {
487
491
  return (JSON.parse(localStorage.getItem("specto-point-receipts") || "[]") || []).filter((e) => e && e.r && Date.now() - e.at < R);
488
492
  } catch {
489
493
  return [];
490
494
  }
491
- }, ce = (e) => H.set(localStorage, L, JSON.stringify(e.slice(-20))), B = (e) => {
495
+ }, B = (e) => U.set(localStorage, L, JSON.stringify(e.slice(-20))), le = (e) => {
492
496
  let t = z().filter((t) => t.r !== e);
493
497
  t.push({
494
498
  r: e,
495
499
  at: Date.now()
496
- }), ce(t), H.set(localStorage, `${L}-at`, String(Date.now()));
497
- }, le = (e) => ce(z().filter((t) => t.r !== e)), ue = 2e3, V = 2592e6, H = {
500
+ }), B(t), U.set(localStorage, `${L}-at`, String(Date.now()));
501
+ }, V = (e) => B(z().filter((t) => t.r !== e)), ue = 2e3, H = 2592e6, U = {
498
502
  get: (e, t) => {
499
503
  try {
500
504
  return e.getItem(t);
@@ -521,24 +525,24 @@ function fe(e) {
521
525
  ].map((e) => (e /= 255, e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4));
522
526
  return .2126 * n + .7152 * r + .0722 * i > .4 ? "#0E1320" : "#fff";
523
527
  }
524
- var U = () => /Mac|iPhone|iPad/.test(globalThis.navigator?.platform || "");
525
- function pe(e, t = U()) {
528
+ var W = () => /Mac|iPhone|iPad/.test(globalThis.navigator?.platform || "");
529
+ function pe(e, t = W()) {
526
530
  return e.trigger === "double-ctrl" ? t ? ["⌘", "⌘"] : ["Ctrl", "Ctrl"] : e.trigger === "chord" ? [
527
531
  "Alt",
528
532
  "Shift",
529
533
  "P"
530
534
  ] : e.trigger === "hold-alt" ? [t ? "⌥" : "Alt"] : e.trigger === "hold-ctrl" ? ["Ctrl"] : e.trigger === "custom" ? String(e.shortcut?.label || "").split("+").filter(Boolean) : [];
531
535
  }
532
- function W(e, t = U()) {
536
+ function G(e, t = W()) {
533
537
  let n = pe(e, t);
534
538
  return n.length ? e.trigger.startsWith("hold") ? `hold ${n[0]}` : e.trigger === "double-ctrl" ? n.join(" ") : n.join("+") : "";
535
539
  }
536
- var G = (e) => String(e).replace(/[&<>"]/g, (e) => ({
540
+ var K = (e) => String(e).replace(/[&<>"]/g, (e) => ({
537
541
  "&": "&amp;",
538
542
  "<": "&lt;",
539
543
  ">": "&gt;",
540
544
  "\"": "&quot;"
541
- })[e]), me = (e, t = "kc") => e.map((e) => `<kbd class="${t}">${G(e)}</kbd>`).join("");
545
+ })[e]), me = (e, t = "kc") => e.map((e) => `<kbd class="${t}">${K(e)}</kbd>`).join("");
542
546
  function he(e) {
543
547
  let t = pe(e);
544
548
  return t.length ? e.trigger === "double-ctrl" ? `Tap ${t[0] === "⌘" ? "⌘" : "Ctrl"} twice` : e.trigger.startsWith("hold") ? `Hold ${t[0]}` : `Press ${t.join("+")}` : "";
@@ -548,7 +552,7 @@ var ge = [
548
552
  "bottom-left",
549
553
  "edge"
550
554
  ];
551
- function K(e, t) {
555
+ function q(e, t) {
552
556
  if (t === !1) return null;
553
557
  if (!t || typeof t != "object") return e;
554
558
  let n = e || {
@@ -566,7 +570,7 @@ function K(e, t) {
566
570
  };
567
571
  }
568
572
  function _e(e, { used: t, visits: n, last: r, release: i, now: a = Date.now() }) {
569
- return !e || t ? !1 : e.when === "monthly" ? !r || a - r.at >= V : e.when === "release" ? !!i && r?.release !== i : n >= 3 && !r;
573
+ return !e || t ? !1 : e.when === "monthly" ? !r || a - r.at >= H : e.when === "release" ? !!i && r?.release !== i : n >= 3 && !r;
570
574
  }
571
575
  function ve(e, t, n) {
572
576
  let r = 0;
@@ -574,28 +578,28 @@ function ve(e, t, n) {
574
578
  for (let i of e.event || []) i.at <= n || (i.type === "error" && t.includes("error") || i.type === "rage" && t.includes("rage") || i.type === "dead" && t.includes("dead")) && (r = Math.max(r, i.at));
575
579
  return r;
576
580
  }
577
- function q(e, t, { open: n, may: r, local: i }) {
581
+ function J(e, t, { open: n, may: r, local: i }) {
578
582
  let a = e._point, o = typeof matchMedia == "function" && matchMedia("(pointer: coarse)").matches, s = o ? [] : pe(t);
579
- H.get(sessionStorage, se) || (H.set(sessionStorage, se, "1"), H.set(localStorage, j, String((Number(H.get(localStorage, j)) || 0) + 1)));
583
+ U.get(sessionStorage, se) || (U.set(sessionStorage, se, "1"), U.set(localStorage, M, String((Number(U.get(localStorage, M)) || 0) + 1)));
580
584
  let c = document.createElement("div");
581
585
  c.id = "specto-point-entry", c.className = "specto-block", c.setAttribute("style", "all:initial;position:fixed;top:0;left:0;width:0;height:0;overflow:visible;z-index:var(--specto-launcher-z,2147483645)");
582
- let l = c.attachShadow({ mode: "open" }), u = K(t.launcher, i), d = {};
586
+ let l = c.attachShadow({ mode: "open" }), u = q(t.launcher, i), d = {};
583
587
  try {
584
- d = JSON.parse(H.get(localStorage, P) || "{}") || {};
588
+ d = JSON.parse(U.get(localStorage, P) || "{}") || {};
585
589
  } catch {}
586
590
  let f = (e) => {
587
591
  d = {
588
592
  ...d,
589
593
  ...e
590
- }, H.set(localStorage, P, JSON.stringify(d)), x(), V();
594
+ }, U.set(localStorage, P, JSON.stringify(d)), x(), V();
591
595
  }, p = () => u?.position === "edge" ? "edge" : d.side || (u?.position === "bottom-left" ? "left" : "right"), m = () => p() === "left" ? "left" : "right";
592
- l.innerHTML = `<style>${Y}</style>
596
+ l.innerHTML = `<style>${X}</style>
593
597
  <button class="pill" type="button" hidden>
594
598
  <svg class="ic" viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="5.5"/><circle class="d" cx="8" cy="8" r="1.6"/></svg>
595
599
  <span class="lbl"></span>${s.length ? `<span class="keys" aria-hidden="true">${me(s)}</span>` : ""}
596
600
  </button>
597
601
  <div class="menu lmenu" role="menu" aria-label="Report a problem button" hidden>
598
- <button class="m-open" type="button" role="menuitem">${G(u?.label || "Report a problem")}</button>
602
+ <button class="m-open" type="button" role="menuitem">${K(u?.label || "Report a problem")}</button>
599
603
  <hr>
600
604
  <button class="m-size" type="button" role="menuitem"></button>
601
605
  <button class="m-side" type="button" role="menuitem"></button>
@@ -613,14 +617,14 @@ function q(e, t, { open: n, may: r, local: i }) {
613
617
  </div>
614
618
  <div class="card hint" role="dialog" aria-label="Report a problem" hidden>
615
619
  <div class="hd">${s.length ? `<span class="big" aria-hidden="true">${me(s, "kc lg")}</span>` : ""}<b>Spot something broken?</b></div>
616
- <p>${s.length ? `${he(t)}, click` : `${o ? "Tap" : "Click"} “${G(K(t.launcher, i)?.label || "Report a problem")}”, then ${o ? "tap" : "click"}`} what’s wrong and tell us. We see exactly what you saw.</p>
620
+ <p>${s.length ? `${he(t)}, click` : `${o ? "Tap" : "Click"} “${K(q(t.launcher, i)?.label || "Report a problem")}”, then ${o ? "tap" : "click"}`} what’s wrong and tell us. We see exactly what you saw.</p>
617
621
  <div class="row"><button class="go" type="button">Try it now</button><button class="no" type="button">Got it</button></div>
618
622
  </div>`;
619
623
  let h = (e) => l.querySelector(e);
620
624
  document.documentElement.appendChild(c);
621
625
  let g = h(".pill"), _ = h(".nudge"), v = h(".hint"), y = h(".lmenu"), b = h(".cmenu");
622
626
  function x() {
623
- g.querySelector(".lbl").textContent = u?.label || "", g.className = `pill ${p()}${d.compact && p() !== "edge" ? " compact" : ""}`, g.setAttribute("aria-label", u?.label || "Report a problem"), g.title = `${u?.label || "Report a problem"}${s.length ? ` (${W(t)})` : ""}`, g.style.setProperty("--bg", u?.color || "#0E1320"), g.style.setProperty("--ink", fe(u?.color || "#0E1320"));
627
+ g.querySelector(".lbl").textContent = u?.label || "", g.className = `pill ${p()}${d.compact && p() !== "edge" ? " compact" : ""}`, g.setAttribute("aria-label", u?.label || "Report a problem"), g.title = `${u?.label || "Report a problem"}${s.length ? ` (${G(t)})` : ""}`, g.style.setProperty("--bg", u?.color || "#0E1320"), g.style.setProperty("--ink", fe(u?.color || "#0E1320"));
624
628
  for (let [e, t] of ["x", "y"].entries()) {
625
629
  let n = t === "y" && Number.isFinite(d.y) ? d.y : u?.offset?.[e];
626
630
  n == null ? c.style.removeProperty(`--specto-launcher-${t}`) : c.style.setProperty(`--specto-launcher-${t}`, `${n}px`);
@@ -656,7 +660,7 @@ function q(e, t, { open: n, may: r, local: i }) {
656
660
  clearTimeout(ee), S.moved = !0, g.classList.add("dragging");
657
661
  let t = g.getBoundingClientRect(), n = p() === "edge";
658
662
  g.style.left = `${n ? innerWidth - t.width : Math.min(innerWidth - t.width - 8, Math.max(8, e.clientX - t.width / 2))}px`, g.style.right = "auto", g.style.top = `${Math.min(innerHeight - t.height - 8, Math.max(8, e.clientY - t.height / 2))}px`, g.style.bottom = "auto", g.style.transform = n ? "rotate(180deg)" : "none";
659
- }, te = (e) => {
663
+ }, D = (e) => {
660
664
  if (clearTimeout(ee), !S?.moved) {
661
665
  S = null;
662
666
  return;
@@ -678,73 +682,73 @@ function q(e, t, { open: n, may: r, local: i }) {
678
682
  S = null;
679
683
  }, 0);
680
684
  };
681
- window.addEventListener("pointermove", E, !0), window.addEventListener("pointerup", te, !0), y.querySelector(".m-open").addEventListener("click", () => {
685
+ window.addEventListener("pointermove", E, !0), window.addEventListener("pointerup", D, !0), y.querySelector(".m-open").addEventListener("click", () => {
682
686
  w(), g.hidden = !0, n("launcher");
683
687
  }), y.querySelector(".m-size").addEventListener("click", () => {
684
688
  w(), f({ compact: !d.compact });
685
689
  }), y.querySelector(".m-side").addEventListener("click", () => {
686
690
  w(), f({ side: p() === "left" ? "right" : "left" });
687
691
  }), y.querySelector(".m-hide").addEventListener("click", () => {
688
- w(), H.set(sessionStorage, F, "1"), V();
692
+ w(), U.set(sessionStorage, F, "1"), V();
689
693
  });
690
- let ne = null, D = (e) => !!e.closest("a[href],input,textarea,select,img,video,[contenteditable=\"\"],[contenteditable=\"true\"]") || !!String(getSelection?.() || "").trim(), O = (e) => {
694
+ let te = null, ne = (e) => !!e.closest("a[href],input,textarea,select,img,video,[contenteditable=\"\"],[contenteditable=\"true\"]") || !!String(getSelection?.() || "").trim(), O = (e) => {
691
695
  if (!t.context || t.context === "off" || e.composedPath?.().includes(c) || document.getElementById("specto-point") || !r()) return;
692
696
  let i = e.target instanceof Element ? e.target : null;
693
697
  if (i) {
694
698
  if (e.shiftKey || e.altKey) {
695
699
  if (t.context === "menu" && e.shiftKey) return;
696
700
  e.preventDefault(), w(), n("context", i);
697
- } else t.context !== "menu" || D(i) || (e.preventDefault(), w(), ne = i, b.style.left = `${Math.min(e.clientX, innerWidth - 250)}px`, b.style.top = `${Math.min(e.clientY, innerHeight - 90)}px`, b.hidden = !1, C = !0, b.querySelector("button").focus());
701
+ } else t.context !== "menu" || ne(i) || (e.preventDefault(), w(), te = i, b.style.left = `${Math.min(e.clientX, innerWidth - 250)}px`, b.style.top = `${Math.min(e.clientY, innerHeight - 90)}px`, b.hidden = !1, C = !0, b.querySelector("button").focus());
698
702
  }
699
703
  };
700
704
  b.querySelector(".c-go").addEventListener("click", () => {
701
- let e = ne;
705
+ let e = te;
702
706
  w(), e?.isConnected && n("context", e);
703
707
  }), window.addEventListener("contextmenu", O, !0);
704
708
  let k = (e) => {
705
709
  C && !e.composedPath?.().includes(c) && w();
706
- }, re = (e) => {
710
+ }, A = (e) => {
707
711
  C && e.key === "Escape" && (w(), g.focus?.());
708
712
  };
709
- window.addEventListener("pointerdown", k, !0), window.addEventListener("keydown", re, !0), window.addEventListener("scroll", w, {
713
+ window.addEventListener("pointerdown", k, !0), window.addEventListener("keydown", A, !0), window.addEventListener("scroll", w, {
710
714
  passive: !0,
711
715
  capture: !0
712
716
  });
713
- let ie = 0, ae = 0, oe = Date.now(), L = () => {
714
- ie = Date.now();
717
+ let re = 0, ie = 0, ae = Date.now(), oe = () => {
718
+ re = Date.now();
715
719
  };
716
- window.addEventListener("keydown", L, !0);
717
- let R = () => {
720
+ window.addEventListener("keydown", oe, !0);
721
+ let L = () => {
718
722
  _.hidden = !0;
719
723
  };
720
724
  _.querySelector(".go").addEventListener("click", () => {
721
- R(), n("nudge");
722
- }), _.querySelector(".no").addEventListener("click", R);
723
- let z = null;
725
+ L(), n("nudge");
726
+ }), _.querySelector(".no").addEventListener("click", L);
727
+ let R = null;
724
728
  try {
725
- z = JSON.parse(H.get(localStorage, M) || "null");
729
+ R = JSON.parse(U.get(localStorage, ce) || "null");
726
730
  } catch {}
727
- let ce = () => H.get(localStorage, A) === "1", B = () => {
731
+ let z = () => U.get(localStorage, j) === "1", B = () => {
728
732
  v.hidden = !0;
729
733
  };
730
734
  v.querySelector(".go").addEventListener("click", () => {
731
735
  B(), n("hint");
732
736
  }), v.querySelector(".no").addEventListener("click", B);
733
737
  let le = !1, V = () => {
734
- let e = !!document.getElementById("specto-point"), n = r() && !e, i = !!document.getElementById("specto-feedback-host"), o = H.get(sessionStorage, F) === "1";
735
- if (g.hidden = !(u && n && !i && !o && de(u.pages)), g.hidden && !y.hidden && w(), e && (R(), B()), t.nudge && n && !ae && !H.get(sessionStorage, N)) {
736
- let e = ve(a.recent(), t.nudge, oe), n = Date.now() - ie < ue || /^(INPUT|TEXTAREA|SELECT)$/.test(document.activeElement?.tagName || "") || document.activeElement?.isContentEditable;
737
- e && !n && (ae = Date.now(), H.set(sessionStorage, N, "1"), B(), _.hidden = !1, setTimeout(R, I)), e && (oe = e);
738
+ let e = !!document.getElementById("specto-point"), n = r() && !e, i = !!document.getElementById("specto-feedback-host"), o = U.get(sessionStorage, F) === "1";
739
+ if (g.hidden = !(u && n && !i && !o && de(u.pages)), g.hidden && !y.hidden && w(), e && (L(), B()), t.nudge && n && !ie && !U.get(sessionStorage, N)) {
740
+ let e = ve(a.recent(), t.nudge, ae), n = Date.now() - re < ue || /^(INPUT|TEXTAREA|SELECT)$/.test(document.activeElement?.tagName || "") || document.activeElement?.isContentEditable;
741
+ e && !n && (ie = Date.now(), U.set(sessionStorage, N, "1"), B(), _.hidden = !1, setTimeout(L, I)), e && (ae = e);
738
742
  }
739
743
  if (t.hint && n && !le) {
740
744
  le = !0;
741
- let e = Number(H.get(localStorage, j)) || 0;
745
+ let e = Number(U.get(localStorage, M)) || 0;
742
746
  _e(t.hint, {
743
- used: ce(),
747
+ used: z(),
744
748
  visits: e,
745
- last: z,
749
+ last: R,
746
750
  release: a.release
747
- }) && (H.set(localStorage, M, JSON.stringify({
751
+ }) && (U.set(localStorage, ce, JSON.stringify({
748
752
  at: Date.now(),
749
753
  release: a.release || null
750
754
  })), setTimeout(() => {
@@ -753,13 +757,13 @@ function q(e, t, { open: n, may: r, local: i }) {
753
757
  }
754
758
  };
755
759
  V();
756
- let U = setInterval(V, 1e3), ge = new MutationObserver(V);
757
- return ge.observe(document.documentElement, { childList: !0 }), {
760
+ let H = setInterval(V, 1e3), W = new MutationObserver(V);
761
+ return W.observe(document.documentElement, { childList: !0 }), {
758
762
  launcher(e) {
759
- u = K(t.launcher, e), x(), V();
763
+ u = q(t.launcher, e), x(), V();
760
764
  },
761
765
  stop() {
762
- clearInterval(U), ge.disconnect(), window.removeEventListener("keydown", L, !0), window.removeEventListener("pointermove", E, !0), window.removeEventListener("pointerup", te, !0), window.removeEventListener("contextmenu", O, !0), window.removeEventListener("pointerdown", k, !0), window.removeEventListener("keydown", re, !0), window.removeEventListener("scroll", w, !0), c.remove();
766
+ clearInterval(H), W.disconnect(), window.removeEventListener("keydown", oe, !0), window.removeEventListener("pointermove", E, !0), window.removeEventListener("pointerup", D, !0), window.removeEventListener("contextmenu", O, !0), window.removeEventListener("pointerdown", k, !0), window.removeEventListener("keydown", A, !0), window.removeEventListener("scroll", w, !0), c.remove();
763
767
  }
764
768
  };
765
769
  }
@@ -769,7 +773,7 @@ function ye(e, { open: t } = {}) {
769
773
  let r = document.createElement("div");
770
774
  r.id = "specto-point-fixed", r.className = "specto-block", r.setAttribute("style", "all:initial;position:fixed;top:0;left:0;width:0;height:0;overflow:visible;z-index:2147483646");
771
775
  let i = r.attachShadow({ mode: "open" }), a = n[0];
772
- i.innerHTML = `<style>${Y}${J}</style>
776
+ i.innerHTML = `<style>${X}${Y}</style>
773
777
  <div class="card fixed" role="status" aria-live="polite">
774
778
  <button class="x" type="button" aria-label="Dismiss"><svg viewBox="0 0 12 12" aria-hidden="true"><path d="M3 3l6 6M9 3l-6 6"/></svg></button>
775
779
  <div class="hd"><span class="okc" aria-hidden="true"><svg viewBox="0 0 12 12"><path d="M2.5 6.2 5 8.5 9.5 3.5"/></svg></span><b></b></div>
@@ -781,7 +785,7 @@ function ye(e, { open: t } = {}) {
781
785
  o(), t?.("fixed", null, a.receipt);
782
786
  }), document.documentElement.appendChild(r), { close: o };
783
787
  }
784
- var J = "\n.card.fixed{top:20px;right:20px;bottom:auto;width:340px;padding:16px 16px 14px}\n.fixed .hd{align-items:flex-start;padding-right:22px}\n.fixed .hd b{line-height:1.4}\n.okc{width:22px;height:22px;flex:none;border-radius:50%;background:#14C8A6;display:flex;align-items:center;justify-content:center}\n.okc svg{width:12px;height:12px;fill:none;stroke:#0E1320;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}\n.fixed .more{font-size:12px;color:#8A93A6}\n.fixed .row{margin-top:2px}\n.x{position:absolute;top:8px;right:8px;width:28px;height:28px;border:0;border-radius:6px;background:none;color:#8A93A6;display:flex;align-items:center;justify-content:center;cursor:pointer}\n.x svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}\n.x:hover{color:#F4F5F8}\n@media (max-width:480px){.card.fixed{left:12px;right:12px;width:auto}}\n", Y = "\n:host{all:initial}\n*{-webkit-user-select:none;user-select:none}\ninput,textarea{-webkit-user-select:text;user-select:text}\n*{box-sizing:border-box;font-family:ui-sans-serif,system-ui,-apple-system,\"Segoe UI\",sans-serif}\n[hidden]{display:none!important}\n.kc{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border:1px solid rgba(255,255,255,.22);border-bottom-width:2px;border-radius:5px;background:rgba(255,255,255,.06);color:inherit;font:600 10.5px/1 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:nowrap}\n.kc.lg{min-width:34px;height:26px;padding:0 8px;font-size:12.5px;border-bottom-width:3px;border-radius:6px}\n.keys,.or,.big{display:inline-flex;align-items:center;gap:3px}\n.pill{position:fixed;bottom:var(--specto-launcher-y,20px);display:inline-flex;align-items:center;gap:10px;height:40px;padding:0 12px 0 11px;border:0;border-radius:999px;background:var(--bg,#0E1320);color:var(--ink,#fff);font:600 13px/1 ui-sans-serif,system-ui,-apple-system,\"Segoe UI\",sans-serif;cursor:pointer;box-shadow:0 8px 22px rgba(7,10,16,.28);white-space:nowrap}\n.pill.right{right:var(--specto-launcher-x,20px)}.pill.left{left:var(--specto-launcher-x,20px)}\n.pill .ic{width:16px;height:16px;flex:none;fill:none;stroke:#A9A0FF;stroke-width:1.6}\n.pill .ic .d{fill:#A9A0FF;stroke:none}\n.pill .keys{opacity:.7}\n.pill .kc{height:18px;min-width:18px;border-color:currentColor;background:transparent;opacity:.85}\n.pill.edge{right:0;bottom:auto;top:calc(50% + var(--specto-launcher-y,0px) - 20px);height:auto;padding:14px 9px;gap:8px;border-radius:10px 0 0 10px;writing-mode:vertical-rl;transform:translateY(-50%) rotate(180deg)}\n.pill.edge .keys{display:none}\n.pill:hover{filter:brightness(1.12)}\n.pill:focus-visible,.card button:focus-visible{outline:2px solid #5B4BF0;outline-offset:2px}\n.card{position:fixed;bottom:calc(var(--specto-launcher-y,20px) + 52px);width:330px;background:#0E1320;color:#F4F5F8;border-radius:12px;padding:14px 16px;box-shadow:0 12px 32px rgba(7,10,16,.35);font-size:13px;display:flex;flex-direction:column;gap:10px}\n.card.right{right:var(--specto-launcher-x,20px)}.card.left{left:var(--specto-launcher-x,20px)}\n.card.hint:not(.by){bottom:24px}\n.hd{display:flex;align-items:center;gap:10px}\n.hd b{font-size:14px;font-weight:600}\n.red{width:8px;height:8px;border-radius:50%;background:#F87171;flex:none}\n.card p{margin:0;line-height:1.5;color:#C3C8D4}\n.row{display:flex;align-items:center;gap:10px}\n.go{height:34px;padding:0 14px;background:#5B4BF0;border:0;color:#fff;border-radius:8px;font-weight:600;font-size:13px;cursor:pointer}\n.no{height:34px;padding:0 10px;background:none;border:0;color:#8A93A6;font-size:13px;cursor:pointer}\n.or{margin-left:auto;gap:4px;font-size:11px;color:#8A93A6}\n.pill.compact{width:44px;height:44px;padding:0;justify-content:center;gap:0}\n.pill.compact .lbl,.pill.compact .keys{display:none}\n.pill.compact .ic{width:20px;height:20px}\n.pill.compact::after{content:\"\";position:absolute;inset:-4px;border-radius:50%;border:2px solid rgba(169,160,255,.55);animation:sp-pulse 2.4s ease-out 2;pointer-events:none}\n@keyframes sp-pulse{0%{transform:scale(.85);opacity:1}100%{transform:scale(1.35);opacity:0}}\n.pill.dragging{cursor:grabbing;transition:none;box-shadow:0 14px 34px rgba(7,10,16,.4)}\n.menu{position:fixed;min-width:210px;background:#0E1320;color:#F4F5F8;border:1px solid #2a3346;border-radius:10px;padding:5px;box-shadow:0 12px 32px rgba(7,10,16,.4);font-size:13px;display:flex;flex-direction:column}\n.menu button{display:flex;align-items:center;gap:8px;text-align:left;background:none;border:0;color:inherit;font:inherit;padding:8px 10px;border-radius:7px;cursor:pointer}\n.menu button:hover,.menu button:focus-visible{background:rgba(91,75,240,.22);outline:none}\n.menu .m-open,.menu .c-go{font-weight:600}\n.menu .ic{width:16px;height:16px;fill:none;stroke:#A9A0FF;stroke-width:1.6}\n.menu .ic .d{fill:#A9A0FF;stroke:none}\n.menu hr{border:0;border-top:1px solid #232c40;margin:4px 2px}\n.menu .tip{margin:4px 10px 6px;font-size:11px;color:#8A93A6}\n@media (prefers-reduced-motion:reduce){.pill.compact::after{animation:none;opacity:0}}\n@media (max-width:480px){.card{width:calc(100vw - 40px)}}\n", be = [
788
+ var Y = "\n.card.fixed{top:20px;right:20px;bottom:auto;width:340px;padding:16px 16px 14px}\n.fixed .hd{align-items:flex-start;padding-right:22px}\n.fixed .hd b{line-height:1.4}\n.okc{width:22px;height:22px;flex:none;border-radius:50%;background:#14C8A6;display:flex;align-items:center;justify-content:center}\n.okc svg{width:12px;height:12px;fill:none;stroke:#0E1320;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}\n.fixed .more{font-size:12px;color:#8A93A6}\n.fixed .row{margin-top:2px}\n.x{position:absolute;top:8px;right:8px;width:28px;height:28px;border:0;border-radius:6px;background:none;color:#8A93A6;display:flex;align-items:center;justify-content:center;cursor:pointer}\n.x svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}\n.x:hover{color:#F4F5F8}\n@media (max-width:480px){.card.fixed{left:12px;right:12px;width:auto}}\n", X = "\n:host{all:initial}\n*{-webkit-user-select:none;user-select:none}\ninput,textarea{-webkit-user-select:text;user-select:text}\n*{box-sizing:border-box;font-family:ui-sans-serif,system-ui,-apple-system,\"Segoe UI\",sans-serif}\n[hidden]{display:none!important}\n.kc{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border:1px solid rgba(255,255,255,.22);border-bottom-width:2px;border-radius:5px;background:rgba(255,255,255,.06);color:inherit;font:600 10.5px/1 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:nowrap}\n.kc.lg{min-width:34px;height:26px;padding:0 8px;font-size:12.5px;border-bottom-width:3px;border-radius:6px}\n.keys,.or,.big{display:inline-flex;align-items:center;gap:3px}\n.pill{position:fixed;bottom:var(--specto-launcher-y,20px);display:inline-flex;align-items:center;gap:10px;height:40px;padding:0 12px 0 11px;border:0;border-radius:999px;background:var(--bg,#0E1320);color:var(--ink,#fff);font:600 13px/1 ui-sans-serif,system-ui,-apple-system,\"Segoe UI\",sans-serif;cursor:pointer;box-shadow:0 8px 22px rgba(7,10,16,.28);white-space:nowrap}\n.pill.right{right:var(--specto-launcher-x,20px)}.pill.left{left:var(--specto-launcher-x,20px)}\n.pill .ic{width:16px;height:16px;flex:none;fill:none;stroke:#A9A0FF;stroke-width:1.6}\n.pill .ic .d{fill:#A9A0FF;stroke:none}\n.pill .keys{opacity:.7}\n.pill .kc{height:18px;min-width:18px;border-color:currentColor;background:transparent;opacity:.85}\n.pill.edge{right:0;bottom:auto;top:calc(50% + var(--specto-launcher-y,0px) - 20px);height:auto;padding:14px 9px;gap:8px;border-radius:10px 0 0 10px;writing-mode:vertical-rl;transform:translateY(-50%) rotate(180deg)}\n.pill.edge .keys{display:none}\n.pill:hover{filter:brightness(1.12)}\n.pill:focus-visible,.card button:focus-visible{outline:2px solid #5B4BF0;outline-offset:2px}\n.card{position:fixed;bottom:calc(var(--specto-launcher-y,20px) + 52px);width:330px;background:#0E1320;color:#F4F5F8;border-radius:12px;padding:14px 16px;box-shadow:0 12px 32px rgba(7,10,16,.35);font-size:13px;display:flex;flex-direction:column;gap:10px}\n.card.right{right:var(--specto-launcher-x,20px)}.card.left{left:var(--specto-launcher-x,20px)}\n.card.hint:not(.by){bottom:24px}\n.hd{display:flex;align-items:center;gap:10px}\n.hd b{font-size:14px;font-weight:600}\n.red{width:8px;height:8px;border-radius:50%;background:#F87171;flex:none}\n.card p{margin:0;line-height:1.5;color:#C3C8D4}\n.row{display:flex;align-items:center;gap:10px}\n.go{height:34px;padding:0 14px;background:#5B4BF0;border:0;color:#fff;border-radius:8px;font-weight:600;font-size:13px;cursor:pointer}\n.no{height:34px;padding:0 10px;background:none;border:0;color:#8A93A6;font-size:13px;cursor:pointer}\n.or{margin-left:auto;gap:4px;font-size:11px;color:#8A93A6}\n.pill.compact{width:44px;height:44px;padding:0;justify-content:center;gap:0}\n.pill.compact .lbl,.pill.compact .keys{display:none}\n.pill.compact .ic{width:20px;height:20px}\n.pill.compact::after{content:\"\";position:absolute;inset:-4px;border-radius:50%;border:2px solid rgba(169,160,255,.55);animation:sp-pulse 2.4s ease-out 2;pointer-events:none}\n@keyframes sp-pulse{0%{transform:scale(.85);opacity:1}100%{transform:scale(1.35);opacity:0}}\n.pill.dragging{cursor:grabbing;transition:none;box-shadow:0 14px 34px rgba(7,10,16,.4)}\n.menu{position:fixed;min-width:210px;background:#0E1320;color:#F4F5F8;border:1px solid #2a3346;border-radius:10px;padding:5px;box-shadow:0 12px 32px rgba(7,10,16,.4);font-size:13px;display:flex;flex-direction:column}\n.menu button{display:flex;align-items:center;gap:8px;text-align:left;background:none;border:0;color:inherit;font:inherit;padding:8px 10px;border-radius:7px;cursor:pointer}\n.menu button:hover,.menu button:focus-visible{background:rgba(91,75,240,.22);outline:none}\n.menu .m-open,.menu .c-go{font-weight:600}\n.menu .ic{width:16px;height:16px;fill:none;stroke:#A9A0FF;stroke-width:1.6}\n.menu .ic .d{fill:#A9A0FF;stroke:none}\n.menu hr{border:0;border-top:1px solid #232c40;margin:4px 2px}\n.menu .tip{margin:4px 10px 6px;font-size:11px;color:#8A93A6}\n@media (prefers-reduced-motion:reduce){.pill.compact::after{animation:none;opacity:0}}\n@media (max-width:480px){.card{width:calc(100vw - 40px)}}\n", be = [
785
789
  "broken",
786
790
  "wrong",
787
791
  "slow",
@@ -799,7 +803,7 @@ var J = "\n.card.fixed{top:20px;right:20px;bottom:auto;width:340px;padding:16px
799
803
  "⑧",
800
804
  "⑨",
801
805
  "⑩"
802
- ], De = "<svg viewBox=\"0 0 18 18\" aria-hidden=\"true\"><rect x=\"6.5\" y=\"2\" width=\"5\" height=\"9\" rx=\"2.5\"/><path d=\"M3.5 8.5a5.5 5.5 0 0 0 11 0M9 14v2.5\"/></svg>", Oe = "<svg viewBox=\"0 0 12 12\" aria-hidden=\"true\"><path d=\"M2.5 6.2 5 8.5 9.5 3.5\"/></svg>", X = {
806
+ ], De = "<svg viewBox=\"0 0 18 18\" aria-hidden=\"true\"><rect x=\"6.5\" y=\"2\" width=\"5\" height=\"9\" rx=\"2.5\"/><path d=\"M3.5 8.5a5.5 5.5 0 0 0 11 0M9 14v2.5\"/></svg>", Oe = "<svg viewBox=\"0 0 12 12\" aria-hidden=\"true\"><path d=\"M2.5 6.2 5 8.5 9.5 3.5\"/></svg>", Z = {
803
807
  get: (e) => {
804
808
  try {
805
809
  return localStorage.getItem(e);
@@ -841,12 +845,12 @@ var J = "\n.card.fixed{top:20px;right:20px;bottom:auto;width:340px;padding:16px
841
845
  "touchstart",
842
846
  "touchend"
843
847
  ];
844
- function Z(e, t = {}) {
848
+ function Q(e, t = {}) {
845
849
  if (document.getElementById("specto-point")) return null;
846
- let n = e._point, r = () => n.strict(), i = [], a = "armed", o = null, s = null, c = null, l = null, d = null, f = null, p = 0, h = [], g = 0, v = !1, y = !1, b = 0, x = !1, C = !1, w = document.createElement("div");
847
- w.id = "specto-point", w.className = "specto-block", w.setAttribute("style", "all:initial;position:fixed;top:0;left:0;width:0;height:0;overflow:visible;z-index:2147483646");
848
- let T = w.attachShadow({ mode: "open" });
849
- T.innerHTML = `<style>${Ie}</style>
850
+ let n = e._point, r = () => n.strict(), i = () => n.unmask?.() || "", a = [], o = "armed", s = null, c = null, l = null, u = null, f = null, p = null, m = 0, g = [], _ = 0, y = !1, b = !1, x = 0, S = !1, w = !1, T = document.createElement("div");
851
+ T.id = "specto-point", T.className = "specto-block", T.setAttribute("style", "all:initial;position:fixed;top:0;left:0;width:0;height:0;overflow:visible;z-index:2147483646");
852
+ let E = T.attachShadow({ mode: "open" });
853
+ E.innerHTML = `<style>${Ie}</style>
850
854
  <div class="ring" data-state="armed" aria-hidden="true"><span class="badge"></span><span class="dot"></span></div>
851
855
  <div class="outline" aria-hidden="true"><span class="chip"></span></div>
852
856
  <div class="frame" aria-hidden="true"></div>
@@ -881,45 +885,48 @@ function Z(e, t = {}) {
881
885
  <p class="status" role="status" aria-live="polite"></p>
882
886
  </section>
883
887
  <div class="howto" hidden role="dialog" aria-label="How Point works"></div>`;
884
- let E = (e) => T.querySelector(e), D = E(".ring"), O = E(".outline"), k = E(".frame"), re = E(".marks"), A = E(".rail"), j = E(".list"), se = E(".status"), M = E(".hint");
885
- document.documentElement.appendChild(w);
888
+ let D = (e) => E.querySelector(e), O = D(".ring"), k = D(".outline"), A = D(".frame"), re = D(".marks"), j = D(".rail"), M = D(".list"), se = D(".status"), ce = D(".hint");
889
+ document.documentElement.appendChild(T);
886
890
  let N = document.createElement("style");
887
891
  N.id = "specto-point-cursor", N.textContent = "html.specto-point-on,html.specto-point-on *{cursor:none!important}", document.head?.appendChild(N);
888
892
  let P = (e) => document.documentElement.classList.toggle("specto-point-on", e);
889
893
  P(!0), n.active(!0);
890
- let F = (e) => e.composedPath?.().includes(w), I = (e, t) => {
894
+ let F = (e) => e.composedPath?.().includes(T), I = (e, t) => {
891
895
  se.textContent = e || "", se.classList.toggle("bad", !!t);
892
896
  };
893
897
  function L(e) {
894
- a = e, D.dataset.state = l ? `${e} listening` : e;
898
+ o = e, O.dataset.state = u ? `${e} listening` : e;
895
899
  let t = e === "flow";
896
- P(!t && e !== "sent"), n.active(!t && e !== "sent"), O.style.display = t ? "none" : "", M.textContent = e === "flow" ? "Use the page — F ends the flow" : "Esc to cancel", E(".flowbtn").textContent = c && !c.end ? "End the flow" : c?.end ? "Flow recorded ✓" : "Record a flow", E(".flowbtn").classList.toggle("on", e === "flow"), E(".send").disabled = y || !(i.length || c?.end || E(".expected").value.trim() || E(".actual").value.trim()), E(".empty").hidden = i.length > 0, D.querySelector(".badge").textContent = e === "marking" || e === "armed" ? String(i.length + 1) : "";
900
+ P(!t && e !== "sent"), n.active(!t && e !== "sent"), k.style.display = t ? "none" : "", ce.textContent = e === "flow" ? "Use the page — F ends the flow" : "Esc to cancel", D(".flowbtn").textContent = l && !l.end ? "End the flow" : l?.end ? "Flow recorded ✓" : "Record a flow", D(".flowbtn").classList.toggle("on", e === "flow"), D(".send").disabled = b || !(a.length || l?.end || D(".expected").value.trim() || D(".actual").value.trim()), D(".empty").hidden = a.length > 0, O.querySelector(".badge").textContent = e === "marking" || e === "armed" ? String(a.length + 1) : "";
897
901
  }
898
902
  function R(e) {
899
- e !== g && (l && (l.cut(), h.push({
903
+ e !== _ && (u && (u.cut(), g.push({
900
904
  at: Date.now(),
901
905
  marker: e
902
- })), g = e);
906
+ })), _ = e);
903
907
  }
904
908
  function z(e, t) {
905
- if (i.length >= Me) {
909
+ if (a.length >= Me) {
906
910
  I(`At most ${Me} markers in one report`, !0);
907
911
  return;
908
912
  }
909
913
  Xe();
910
- let a = Date.now(), o = ee(e, { strict: r() }), s = te({
914
+ let o = Date.now(), s = C(e, {
915
+ strict: r(),
916
+ unmask: i()
917
+ }), c = te({
911
918
  recent: n.recent(),
912
919
  contains: (t) => e === t || e.contains(t) || t.contains?.(e),
913
- now: a
914
- }), c = {
915
- n: i.length + 1,
920
+ now: o
921
+ }), l = {
922
+ n: a.length + 1,
916
923
  el: e,
917
924
  kind: t ? "region" : "element",
918
925
  flag: "broken",
919
926
  note: "",
920
- at: a,
921
- desc: o,
922
- ctx: s,
927
+ at: o,
928
+ desc: s,
929
+ ctx: c,
923
930
  region: t ? {
924
931
  x: t.x + scrollX,
925
932
  y: t.y + scrollY,
@@ -927,14 +934,14 @@ function Z(e, t = {}) {
927
934
  h: t.h
928
935
  } : null
929
936
  };
930
- t && (c.desc.rect = {
937
+ t && (l.desc.rect = {
931
938
  x: Math.round(t.x),
932
939
  y: Math.round(t.y),
933
940
  w: Math.round(t.w),
934
941
  h: Math.round(t.h)
935
- }), i.push(c), R(c.n), H(), L("marking"), tt || ce(e, t);
942
+ }), a.push(l), R(l.n), U(), L("marking"), nt || B(e, t);
936
943
  }
937
- function ce(e, t) {
944
+ function B(e, t) {
938
945
  if (innerWidth <= 560) return;
939
946
  let n;
940
947
  try {
@@ -942,35 +949,35 @@ function Z(e, t = {}) {
942
949
  } catch {
943
950
  return;
944
951
  }
945
- let r = A.getBoundingClientRect();
946
- n.x < r.right && n.x + (n.w ?? n.width) > r.left && n.y < r.bottom && n.y + (n.h ?? n.height) > r.top && A.classList.toggle("left");
952
+ let r = j.getBoundingClientRect();
953
+ n.x < r.right && n.x + (n.w ?? n.width) > r.left && n.y < r.bottom && n.y + (n.h ?? n.height) > r.top && j.classList.toggle("left");
947
954
  }
948
955
  function ue(e) {
949
- i.splice(e, 1), i.forEach((e, t) => {
956
+ a.splice(e, 1), a.forEach((e, t) => {
950
957
  e.n = t + 1;
951
- }), R(i.length ? i[i.length - 1].n : 0), H(), L(i.length ? "marking" : "armed");
958
+ }), R(a.length ? a[a.length - 1].n : 0), U(), L(a.length ? "marking" : "armed");
952
959
  }
953
- let V = (e) => {
954
- e.flag = be[(be.indexOf(e.flag) + 1) % be.length], H();
960
+ let H = (e) => {
961
+ e.flag = be[(be.indexOf(e.flag) + 1) % be.length], U();
955
962
  };
956
- function H() {
957
- j.replaceChildren(...i.map((e, t) => {
963
+ function U() {
964
+ M.replaceChildren(...a.map((e, t) => {
958
965
  let n = document.createElement("li");
959
966
  return n.innerHTML = `<button class="num" type="button" title="Change the flag" style="--c:${ke[e.flag]}">${e.n}</button>
960
967
  <span class="what"><span class="name"></span><button class="flag" type="button" style="--c:${ke[e.flag]}">${Ae[e.flag]}</button></span>
961
- <textarea class="note" rows="1" maxlength="1000" placeholder="${l ? "Talk, or type here" : "Note (optional)"}" aria-label="Note for marker ${e.n}"></textarea>
968
+ <textarea class="note" rows="1" maxlength="1000" placeholder="${u ? "Talk, or type here" : "Note (optional)"}" aria-label="Note for marker ${e.n}"></textarea>
962
969
  <button class="rm" type="button" aria-label="Remove marker ${e.n}">×</button>`, n.dataset.n = String(e.n), n.querySelector(".name").textContent = e.desc.component ? `${e.desc.component} · ${e.desc.name}` : e.desc.name, n.querySelector(".note").value = e.note, n.querySelector(".note").addEventListener("input", (t) => {
963
970
  e.note = t.target.value;
964
- }), n.querySelector(".note").addEventListener("focus", () => R(e.n)), n.querySelector(".num").addEventListener("click", () => V(e)), n.querySelector(".flag").addEventListener("click", () => V(e)), n.querySelector(".rm").addEventListener("click", () => ue(t)), n.addEventListener("pointerenter", () => R(e.n)), n;
965
- })), re.replaceChildren(...i.map((e) => {
971
+ }), n.querySelector(".note").addEventListener("focus", () => R(e.n)), n.querySelector(".num").addEventListener("click", () => H(e)), n.querySelector(".flag").addEventListener("click", () => H(e)), n.querySelector(".rm").addEventListener("click", () => ue(t)), n.addEventListener("pointerenter", () => R(e.n)), n;
972
+ })), re.replaceChildren(...a.map((e) => {
966
973
  let t = document.createElement("div");
967
974
  return t.className = `mk ${e.kind}`, t.style.setProperty("--c", ke[e.flag]), t.innerHTML = `<button class="pin" type="button" aria-label="Marker ${e.n}: ${Ae[e.flag]} — click to change">${e.n}</button>`, t.querySelector(".pin").addEventListener("click", (t) => {
968
- t.stopPropagation(), V(e);
975
+ t.stopPropagation(), H(e);
969
976
  }), e.node = t, t;
970
977
  })), de();
971
978
  }
972
979
  function de() {
973
- for (let e of i) {
980
+ for (let e of a) {
974
981
  if (!e.node) continue;
975
982
  let t;
976
983
  if (e.region) t = {
@@ -988,22 +995,22 @@ function Z(e, t = {}) {
988
995
  }
989
996
  }
990
997
  let fe = () => {
991
- if (!x) {
992
- if (de(), l) {
993
- let e = l.level();
994
- D.style.setProperty("--lv", e.toFixed(2)), E(".bars").style.setProperty("--lv", Math.min(1, e * 2.5).toFixed(2));
998
+ if (!S) {
999
+ if (de(), u) {
1000
+ let e = u.level();
1001
+ O.style.setProperty("--lv", e.toFixed(2)), D(".bars").style.setProperty("--lv", Math.min(1, e * 2.5).toFixed(2));
995
1002
  }
996
- b = requestAnimationFrame(fe);
1003
+ x = requestAnimationFrame(fe);
997
1004
  }
998
1005
  };
999
- b = requestAnimationFrame(fe);
1000
- let U = (e, t) => {
1006
+ x = requestAnimationFrame(fe);
1007
+ let W = (e, t) => {
1001
1008
  let n = document.elementFromPoint(e, t);
1002
- return n && n !== w && n !== document.documentElement ? n : null;
1009
+ return n && n !== T && n !== document.documentElement ? n : null;
1003
1010
  };
1004
- function W(e) {
1011
+ function G(e) {
1005
1012
  if (!e) {
1006
- O.style.opacity = "0";
1013
+ k.style.opacity = "0";
1007
1014
  return;
1008
1015
  }
1009
1016
  let t;
@@ -1012,62 +1019,62 @@ function Z(e, t = {}) {
1012
1019
  } catch {
1013
1020
  return;
1014
1021
  }
1015
- if (O.style.opacity = "1", O.style.transform = `translate(${t.left}px, ${t.top}px)`, O.style.width = `${t.width}px`, O.style.height = `${t.height}px`, o !== e) {
1016
- let n = u(e, r()), { component: i } = _(e), a = S(e, {
1017
- component: i,
1018
- name: m(e, n).slice(0, 30)
1022
+ if (k.style.opacity = "1", k.style.transform = `translate(${t.left}px, ${t.top}px)`, k.style.width = `${t.width}px`, k.style.height = `${t.height}px`, s !== e) {
1023
+ let n = d(e, r(), i()), { component: a } = v(e), o = ee(e, {
1024
+ component: a,
1025
+ name: h(e, n).slice(0, 30)
1019
1026
  });
1020
- O.querySelector(".chip").textContent = a, O.classList.toggle("below", t.top < 24);
1027
+ k.querySelector(".chip").textContent = o, k.classList.toggle("below", t.top < 24);
1021
1028
  }
1022
1029
  }
1023
- let G = (e) => {
1024
- if (D.style.transform = `translate(${e.clientX}px, ${e.clientY}px)`, D.classList.add("seen"), a === "flow" || a === "sent") return;
1030
+ let K = (e) => {
1031
+ if (O.style.transform = `translate(${e.clientX}px, ${e.clientY}px)`, O.classList.add("seen"), o === "flow" || o === "sent") return;
1025
1032
  if (F(e)) {
1026
- W(null), o = null;
1033
+ G(null), s = null;
1027
1034
  return;
1028
1035
  }
1029
- if (s && (Math.abs(e.clientX - s.x) > Ne || Math.abs(e.clientY - s.y) > Ne)) {
1030
- s.region = {
1031
- x: Math.min(s.x, e.clientX),
1032
- y: Math.min(s.y, e.clientY),
1033
- w: Math.abs(e.clientX - s.x),
1034
- h: Math.abs(e.clientY - s.y)
1035
- }, Object.assign(k.style, {
1036
+ if (c && (Math.abs(e.clientX - c.x) > Ne || Math.abs(e.clientY - c.y) > Ne)) {
1037
+ c.region = {
1038
+ x: Math.min(c.x, e.clientX),
1039
+ y: Math.min(c.y, e.clientY),
1040
+ w: Math.abs(e.clientX - c.x),
1041
+ h: Math.abs(e.clientY - c.y)
1042
+ }, Object.assign(A.style, {
1036
1043
  display: "block",
1037
- transform: `translate(${s.region.x}px, ${s.region.y}px)`,
1038
- width: `${s.region.w}px`,
1039
- height: `${s.region.h}px`
1040
- }), W(null);
1044
+ transform: `translate(${c.region.x}px, ${c.region.y}px)`,
1045
+ width: `${c.region.w}px`,
1046
+ height: `${c.region.h}px`
1047
+ }), G(null);
1041
1048
  return;
1042
1049
  }
1043
- let t = U(e.clientX, e.clientY);
1044
- W(t), o = t;
1045
- let n = t && i.find((e) => e.el === t || e.el.contains?.(t));
1050
+ let t = W(e.clientX, e.clientY);
1051
+ G(t), s = t;
1052
+ let n = t && a.find((e) => e.el === t || e.el.contains?.(t));
1046
1053
  n && R(n.n);
1047
1054
  }, he = (e) => {
1048
- if (!(x || a === "flow" || a === "sent" || F(e)) && (e.preventDefault(), e.stopImmediatePropagation(), e.type === "pointerdown" && e.button === 0 && (s = {
1055
+ if (!(S || o === "flow" || o === "sent" || F(e)) && (e.preventDefault(), e.stopImmediatePropagation(), e.type === "pointerdown" && e.button === 0 && (c = {
1049
1056
  x: e.clientX,
1050
1057
  y: e.clientY,
1051
- el: U(e.clientX, e.clientY),
1058
+ el: W(e.clientX, e.clientY),
1052
1059
  region: null
1053
- }), e.type === "pointerup" && s)) {
1054
- let e = s;
1055
- if (s = null, k.style.display = "none", e.region && e.region.w > Ne && e.region.h > Ne) {
1060
+ }), e.type === "pointerup" && c)) {
1061
+ let e = c;
1062
+ if (c = null, A.style.display = "none", e.region && e.region.w > Ne && e.region.h > Ne) {
1056
1063
  let t = e.region.x + e.region.w / 2, n = e.region.y + e.region.h / 2;
1057
- z(U(t, n) || document.body, e.region);
1064
+ z(W(t, n) || document.body, e.region);
1058
1065
  } else e.el && z(e.el, null);
1059
1066
  }
1060
1067
  }, ge = (e) => {
1061
1068
  let t = e.composedPath?.()[0];
1062
1069
  return t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA") && F(e);
1063
- }, K = (e) => {
1064
- if (x || a === "sent") return;
1070
+ }, q = (e) => {
1071
+ if (S || o === "sent") return;
1065
1072
  if (ge(e)) {
1066
- e.key === "Escape" ? (e.target.blur?.(), A.focus?.()) : e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q());
1073
+ e.key === "Escape" ? (e.target.blur?.(), j.focus?.()) : e.key === "Enter" && !e.shiftKey && (e.preventDefault(), $e());
1067
1074
  return;
1068
1075
  }
1069
1076
  let t = e.key;
1070
- if ((!Y.hidden || l) && t.length === 1 && t !== "?" && !e.ctrlKey && !e.metaKey && !e.altKey && a !== "flow") Ze(e);
1077
+ if ((!X.hidden || u) && t.length === 1 && t !== "?" && !e.ctrlKey && !e.metaKey && !e.altKey && o !== "flow") Ze(e);
1071
1078
  else if ((e.ctrlKey || e.metaKey) && (t === "a" || t === "A")) e.preventDefault();
1072
1079
  else if ([
1073
1080
  "Escape",
@@ -1079,24 +1086,24 @@ function Z(e, t = {}) {
1079
1086
  "M",
1080
1087
  "?",
1081
1088
  "Tab"
1082
- ].includes(t) && (a !== "flow" || [
1089
+ ].includes(t) && (o !== "flow" || [
1083
1090
  "f",
1084
1091
  "F",
1085
1092
  "Escape"
1086
1093
  ].includes(t))) {
1087
1094
  if (e.preventDefault(), e.stopImmediatePropagation(), t === "Escape") {
1088
- if (a === "flow") {
1089
- q();
1095
+ if (o === "flow") {
1096
+ J();
1090
1097
  return;
1091
1098
  }
1092
- if (i.length && !v) {
1093
- v = !0, I("Press Esc again to discard this report"), setTimeout(() => {
1094
- v = !1;
1099
+ if (a.length && !y) {
1100
+ y = !0, I("Press Esc again to discard this report"), setTimeout(() => {
1101
+ y = !1;
1095
1102
  }, 3e3);
1096
1103
  return;
1097
1104
  }
1098
1105
  $();
1099
- } else t === "Enter" ? o && !i.some((e) => e.el === o) && _e.active ? z(o, null) : Q() : t === "Backspace" ? i.length && ue(i.length - 1) : t === "f" || t === "F" ? a === "flow" ? q() : ve() : t === "m" || t === "M" ? Je() : t === "?" ? Qe(!0) : t === "Tab" && _e.next(e.shiftKey);
1106
+ } else t === "Enter" ? s && !a.some((e) => e.el === s) && _e.active ? z(s, null) : $e() : t === "Backspace" ? a.length && ue(a.length - 1) : t === "f" || t === "F" ? o === "flow" ? J() : ve() : t === "m" || t === "M" ? Je() : t === "?" ? Qe(!0) : t === "Tab" && _e.next(e.shiftKey);
1100
1107
  }
1101
1108
  }, _e = {
1102
1109
  active: !1,
@@ -1104,48 +1111,48 @@ function Z(e, t = {}) {
1104
1111
  next(e) {
1105
1112
  let t = Array.from(document.querySelectorAll("a[href],button,input,select,textarea,summary,[tabindex]:not([tabindex=\"-1\"]),[role=button],[role=link]")).filter((e) => {
1106
1113
  let t = e.getBoundingClientRect();
1107
- return t.width > 0 && t.height > 0 && !w.contains(e);
1114
+ return t.width > 0 && t.height > 0 && !T.contains(e);
1108
1115
  });
1109
1116
  if (t.length) {
1110
- this.active = !0, this.i = (this.i + (e ? -1 : 1) + t.length) % t.length, o = t[this.i];
1117
+ this.active = !0, this.i = (this.i + (e ? -1 : 1) + t.length) % t.length, s = t[this.i];
1111
1118
  try {
1112
- o.scrollIntoView({ block: "nearest" });
1119
+ s.scrollIntoView({ block: "nearest" });
1113
1120
  } catch {}
1114
- W(o);
1121
+ G(s);
1115
1122
  }
1116
1123
  }
1117
1124
  };
1118
1125
  function ve() {
1119
- c?.end && (c = null), c = {
1126
+ l?.end && (l = null), l = {
1120
1127
  start: Date.now(),
1121
1128
  end: null
1122
- }, W(null), L("flow"), ye();
1129
+ }, G(null), L("flow"), ye();
1123
1130
  }
1124
- function q() {
1125
- c && !c.end && (c.end = Date.now(), L(i.length ? "marking" : "armed"), I(`Flow recorded (${Math.round((c.end - c.start) / 1e3)} s)`));
1131
+ function J() {
1132
+ l && !l.end && (l.end = Date.now(), L(a.length ? "marking" : "armed"), I(`Flow recorded (${Math.round((l.end - l.start) / 1e3)} s)`));
1126
1133
  }
1127
1134
  function ye() {
1128
- if (x || !c || c.end) return;
1129
- let e = Math.round((Date.now() - c.start) / 1e3);
1130
- M.textContent = `Recording the flow ${String(Math.floor(e / 60)).padStart(2, "0")}:${String(e % 60).padStart(2, "0")} — F ends it`, setTimeout(ye, 500);
1135
+ if (S || !l || l.end) return;
1136
+ let e = Math.round((Date.now() - l.start) / 1e3);
1137
+ ce.textContent = `Recording the flow ${String(Math.floor(e / 60)).padStart(2, "0")}:${String(e % 60).padStart(2, "0")} — F ends it`, setTimeout(ye, 500);
1131
1138
  }
1132
- let J = E(".mic"), Y = E(".vcard"), Z = !!t.voice && ie(), Le = t.voiceLang && t.voiceLang !== "auto" ? t.voiceLang : String(navigator.language || "").slice(0, 2).toLowerCase(), Re = String(n.endpoint).replace(/\/api\/point$/, "/api/point-transcribe");
1133
- Z && (J.hidden = !1), Z && t.keepAudio && (E(".keep").hidden = !1);
1139
+ let Y = D(".mic"), X = D(".vcard"), Q = !!t.voice && ie(), Le = t.voiceLang && t.voiceLang !== "auto" ? t.voiceLang : String(navigator.language || "").slice(0, 2).toLowerCase(), Re = String(n.endpoint).replace(/\/api\/point$/, "/api/point-transcribe");
1140
+ Q && (Y.hidden = !1), Q && t.keepAudio && (D(".keep").hidden = !1);
1134
1141
  let ze = (e) => {
1135
1142
  let t = 0;
1136
- for (let n of h) if (n.at <= e) t = n.marker;
1143
+ for (let n of g) if (n.at <= e) t = n.marker;
1137
1144
  else break;
1138
1145
  return t;
1139
1146
  };
1140
1147
  function Be(e) {
1141
- let t = e && j.querySelector(`li[data-n="${e}"]`);
1142
- return t ? t.querySelector(".note") : (E(".exp").open = !0, E(".actual"));
1148
+ let t = e && M.querySelector(`li[data-n="${e}"]`);
1149
+ return t ? t.querySelector(".note") : (D(".exp").open = !0, D(".actual"));
1143
1150
  }
1144
1151
  async function Ve(e) {
1145
1152
  let t = ze(e.startedAt), r = Date.now();
1146
- p++, L(a);
1153
+ m++, L(o);
1147
1154
  try {
1148
- let a = await fetch(Re, {
1155
+ let i = await fetch(Re, {
1149
1156
  method: "POST",
1150
1157
  headers: { "Content-Type": "text/plain;charset=UTF-8" },
1151
1158
  credentials: "omit",
@@ -1155,18 +1162,18 @@ function Z(e, t = {}) {
1155
1162
  data: await oe(e.blob),
1156
1163
  lang: Le
1157
1164
  })
1158
- }), o = await a.json().catch(() => ({})), s = a.ok ? String(o.text || "").trim() : "";
1165
+ }), o = await i.json().catch(() => ({})), s = i.ok ? String(o.text || "").trim() : "";
1159
1166
  if (s) {
1160
1167
  We(t, s, e.startedAt, r);
1161
- let n = i.find((e) => e.n === t), a = Be(n ? t : 0);
1162
- n && (n.note = `${n.note ? `${n.note} ` : ""}${s}`.slice(0, 1e3)), a && (a.value = n ? n.note : `${a.value ? `${a.value} ` : ""}${s}`.slice(0, 500), a.dispatchEvent(new Event("input")));
1163
- } else a.ok || I("Some of what you said couldn’t be written down — type it if it’s missing", !0);
1168
+ let n = a.find((e) => e.n === t), i = Be(n ? t : 0);
1169
+ n && (n.note = `${n.note ? `${n.note} ` : ""}${s}`.slice(0, 1e3)), i && (i.value = n ? n.note : `${i.value ? `${i.value} ` : ""}${s}`.slice(0, 500), i.dispatchEvent(new Event("input")));
1170
+ } else i.ok || I("Some of what you said couldn’t be written down — type it if it’s missing", !0);
1164
1171
  } catch {
1165
1172
  I("Some of what you said couldn’t be written down — type it if it’s missing", !0);
1166
1173
  }
1167
- p--, L(a);
1174
+ m--, L(o);
1168
1175
  }
1169
- let He = E(".cap"), Ue = [];
1176
+ let He = D(".cap"), Ue = [];
1170
1177
  function We(e, t, n, r) {
1171
1178
  Ue.push({
1172
1179
  n: e,
@@ -1174,44 +1181,44 @@ function Z(e, t = {}) {
1174
1181
  at: n,
1175
1182
  end: r
1176
1183
  }), He.replaceChildren(...Ue.slice(-4).map((e) => {
1177
- let t = document.createElement("span"), n = i.find((t) => t.n === e.n);
1184
+ let t = document.createElement("span"), n = a.find((t) => t.n === e.n);
1178
1185
  return n && (t.className = "said", t.style.setProperty("--c", ke[n.flag])), t.textContent = `${e.words}${n ? ` ${Ee[n.n] || `(${n.n})`}` : ""} `, t;
1179
1186
  }));
1180
1187
  }
1181
1188
  function Ge(e) {
1182
- J.classList.toggle("on", e), J.setAttribute("aria-label", e ? "Stop talking" : "Talk"), E(".typei").hidden = !e, E(".listening").hidden = !e;
1189
+ Y.classList.toggle("on", e), Y.setAttribute("aria-label", e ? "Stop talking" : "Talk"), D(".typei").hidden = !e, D(".listening").hidden = !e;
1183
1190
  }
1184
1191
  async function Ke() {
1185
- if (!l) return;
1186
- let e = l;
1187
- l = null, Ge(!1), L(a), d = await e.stop();
1192
+ if (!u) return;
1193
+ let e = u;
1194
+ u = null, Ge(!1), L(o), f = await e.stop();
1188
1195
  }
1189
1196
  async function qe() {
1190
- if (Z && !l) {
1191
- Y.hidden = !0, J.hidden = !1;
1197
+ if (Q && !u) {
1198
+ X.hidden = !0, Y.hidden = !1;
1192
1199
  try {
1193
- l = await ae({
1200
+ u = await ae({
1194
1201
  onPhrase: Ve,
1195
1202
  keep: !!t.keepAudio
1196
- }), f ||= { startedAt: l.startedAt }, X.set(xe, "yes"), h.push({
1197
- at: l.startedAt,
1198
- marker: g
1199
- }), Ue.length || (He.textContent = "Say what you see…"), Ge(!0), L(a);
1203
+ }), p ||= { startedAt: u.startedAt }, Z.set(xe, "yes"), g.push({
1204
+ at: u.startedAt,
1205
+ marker: _
1206
+ }), Ue.length || (He.textContent = "Say what you see…"), Ge(!0), L(o);
1200
1207
  } catch (e) {
1201
- l = null, e?.name === "NotAllowedError" && X.set(xe, "no"), I(e?.name === "NotAllowedError" ? "The microphone is blocked for this site — type instead" : "The microphone could not start — type instead", !0);
1208
+ u = null, e?.name === "NotAllowedError" && Z.set(xe, "no"), I(e?.name === "NotAllowedError" ? "The microphone is blocked for this site — type instead" : "The microphone could not start — type instead", !0);
1202
1209
  }
1203
1210
  }
1204
1211
  }
1205
- let Je = () => l ? Ke() : qe(), Ye = !1;
1212
+ let Je = () => u ? Ke() : qe(), Ye = !1;
1206
1213
  function Xe() {
1207
- Ye || !Z || l || X.get(xe) || (Ye = !0, Y.hidden = !1, J.hidden = !0);
1214
+ Ye || !Q || u || Z.get(xe) || (Ye = !0, X.hidden = !1, Y.hidden = !0);
1208
1215
  }
1209
- E(".typei").addEventListener("click", () => {
1210
- Ke(), Be(g)?.focus();
1216
+ D(".typei").addEventListener("click", () => {
1217
+ Ke(), Be(_)?.focus();
1211
1218
  });
1212
1219
  function Ze(e) {
1213
- Y.hidden = !0, J.hidden = !Z, l && Ke();
1214
- let t = Be(g);
1220
+ X.hidden = !0, Y.hidden = !Q, u && Ke();
1221
+ let t = Be(_);
1215
1222
  t && (e.preventDefault(), e.stopImmediatePropagation(), t.focus(), t.value += e.key, t.dispatchEvent(new Event("input")));
1216
1223
  }
1217
1224
  function Qe(e) {
@@ -1223,8 +1230,8 @@ function Z(e, t = {}) {
1223
1230
  try {
1224
1231
  localStorage.setItem(je, "1");
1225
1232
  } catch {}
1226
- C = !0;
1227
- let r = E(".howto");
1233
+ w = !0;
1234
+ let r = D(".howto");
1228
1235
  r.innerHTML = `<div class="scene" aria-hidden="true"><div class="page"><i></i><i></i><b class="btn">Pay</b></div><span class="cur"></span><span class="pinh">1</span><span class="wave"></span></div>
1229
1236
  <ol><li><b>${Pe[t.trigger] || "Use the shortcut"}</b> to point</li><li><b>Click</b> what is wrong</li>${t.voice ? "<li><b>Say</b> what you see</li>" : "<li><b>Add a note</b> if you like</li>"}<li><b>Enter</b> sends it</li></ol>
1230
1237
  <button class="ok" type="button">Got it</button>`, r.hidden = !1;
@@ -1233,27 +1240,27 @@ function Z(e, t = {}) {
1233
1240
  };
1234
1241
  r.querySelector(".ok").addEventListener("click", i), setTimeout(i, 9e3);
1235
1242
  }
1236
- async function Q() {
1237
- if (y) return;
1238
- c && !c.end && q();
1239
- let r = E(".expected").value.trim(), o = E(".actual").value.trim();
1240
- if (!i.length && !c?.end && !r && !o) {
1243
+ async function $e() {
1244
+ if (b) return;
1245
+ l && !l.end && J();
1246
+ let r = D(".expected").value.trim(), i = D(".actual").value.trim();
1247
+ if (!a.length && !l?.end && !r && !i) {
1241
1248
  I("Mark something first — click what is wrong", !0);
1242
1249
  return;
1243
1250
  }
1244
- y = !0, L(a);
1245
- let s = E(".send");
1246
- s.innerHTML = "<span class=\"spin\" aria-hidden=\"true\"></span>Sending…", A.classList.add("busy"), I("");
1251
+ b = !0, L(o);
1252
+ let s = D(".send");
1253
+ s.innerHTML = "<span class=\"spin\" aria-hidden=\"true\"></span>Sending…", j.classList.add("busy"), I("");
1247
1254
  try {
1248
- l && await Ke(), p > 0 && I("Writing down the last of what you said…");
1249
- for (let e = Date.now() + Te; p > 0 && Date.now() < e;) await new Promise((e) => setTimeout(e, 100));
1255
+ u && await Ke(), m > 0 && I("Writing down the last of what you said…");
1256
+ for (let e = Date.now() + Te; m > 0 && Date.now() < e;) await new Promise((e) => setTimeout(e, 100));
1250
1257
  I("");
1251
- let a = !!(t.keepAudio && E(".keep input").checked && d?.blob?.size), s = {
1258
+ let o = !!(t.keepAudio && D(".keep input").checked && f?.blob?.size), s = {
1252
1259
  page: location.pathname,
1253
1260
  release: n.release || void 0,
1254
1261
  expected: r || void 0,
1255
- actual: o || void 0,
1256
- markers: i.map((e) => ({
1262
+ actual: i || void 0,
1263
+ markers: a.map((e) => ({
1257
1264
  n: e.n,
1258
1265
  kind: e.kind,
1259
1266
  flag: e.flag,
@@ -1273,58 +1280,58 @@ function Z(e, t = {}) {
1273
1280
  network: e.ctx.network,
1274
1281
  console: e.ctx.console
1275
1282
  })),
1276
- flow: c?.end ? c : void 0,
1283
+ flow: l?.end ? l : void 0,
1277
1284
  env: ne(),
1278
- voice: f ? {
1285
+ voice: p ? {
1279
1286
  live: !0,
1280
- startedAt: f.startedAt,
1281
- timeline: h,
1287
+ startedAt: p.startedAt,
1288
+ timeline: g,
1282
1289
  lang: Le || void 0,
1283
- keep: a,
1290
+ keep: o,
1284
1291
  phrases: Ue.map((e) => ({
1285
1292
  at: e.at,
1286
1293
  end: e.end,
1287
- marker: i.some((t) => t.n === e.n) ? e.n : 0,
1294
+ marker: a.some((t) => t.n === e.n) ? e.n : 0,
1288
1295
  text: e.words
1289
1296
  }))
1290
1297
  } : void 0,
1291
1298
  via: t.via || void 0
1292
- }, u = {
1299
+ }, c = {
1293
1300
  key: n.key,
1294
1301
  sessionId: e.sessionId || null,
1295
1302
  report: s,
1296
1303
  notify: { on: !!t.notify?.tick },
1297
1304
  ...t.about ? { about: t.about } : {}
1298
1305
  };
1299
- a && (u.audio = {
1300
- mime: d.mime,
1301
- data: await oe(d.blob)
1306
+ o && (c.audio = {
1307
+ mime: f.mime,
1308
+ data: await oe(f.blob)
1302
1309
  });
1303
- let m = await fetch(n.endpoint, {
1310
+ let d = await fetch(n.endpoint, {
1304
1311
  method: "POST",
1305
1312
  headers: { "Content-Type": "text/plain;charset=UTF-8" },
1306
1313
  credentials: "omit",
1307
- body: JSON.stringify(u)
1308
- }), g = await m.json().catch(() => ({}));
1309
- if (!m.ok) throw Error(g.error || `HTTP ${m.status}`);
1310
- $e(g.bug, g.receipt, g.reopened);
1314
+ body: JSON.stringify(c)
1315
+ }), h = await d.json().catch(() => ({}));
1316
+ if (!d.ok) throw Error(h.error || `HTTP ${d.status}`);
1317
+ et(h.bug, h.receipt, h.reopened);
1311
1318
  } catch (e) {
1312
- y = !1, s.textContent = "Send", A.classList.remove("busy"), L(a), I(`Couldn't send: ${String(e?.message || e).slice(0, 80)} — try again`, !0);
1319
+ b = !1, s.textContent = "Send", j.classList.remove("busy"), L(o), I(`Couldn't send: ${String(e?.message || e).slice(0, 80)} — try again`, !0);
1313
1320
  }
1314
1321
  }
1315
- function $e(e, r = null, i = !1) {
1316
- L("sent"), n.active(!1), P(!1), W(null), A.classList.add("done");
1322
+ function et(e, r = null, i = !1) {
1323
+ L("sent"), n.active(!1), P(!1), G(null), j.classList.add("done");
1317
1324
  let a = Math.floor(Number(e)) || 0, o = t.thanks?.message ? t.thanks.message.replace(/\{number\}/g, a ? String(a) : "") : i ? `Thanks — bug #${a} is open again, and the team can see what you saw.` : a ? `Sent as bug #${a} — thank you.` : "Sent — thank you.", s = document.createElement("div");
1318
1325
  s.className = "thanks", s.innerHTML = `<div class="th"><span class="okc" aria-hidden="true">${Oe}</span><b></b></div>`, s.querySelector("b").textContent = o;
1319
- let c = (Number(X.get(Se)) || 0) + 1;
1320
- X.set(Se, String(c));
1326
+ let c = (Number(Z.get(Se)) || 0) + 1;
1327
+ Z.set(Se, String(c));
1321
1328
  let l = pe(t), u = typeof matchMedia == "function" && matchMedia("(pointer: coarse)").matches, d = t.thanks?.teach !== !1 && l.length > 0 && !u && t.via !== "shortcut" && c <= we;
1322
1329
  if (d) {
1323
1330
  let e = document.createElement("p");
1324
1331
  e.className = "teach", e.innerHTML = `Next time, from any page: ${t.trigger === "double-ctrl" ? "tap " : ""}<span class="caps">${me(l)}</span> and click what’s wrong.`, s.append(e);
1325
1332
  }
1326
- let f = t.notify && r ? et(r) : null;
1327
- f && s.append(f), A.replaceChildren(s), t.onSent?.(e);
1333
+ let f = t.notify && r ? tt(r) : null;
1334
+ f && s.append(f), j.replaceChildren(s), t.onSent?.(e);
1328
1335
  let p = null, m = (e) => {
1329
1336
  clearTimeout(p), p = setTimeout($, e);
1330
1337
  };
@@ -1332,7 +1339,7 @@ function Z(e, t = {}) {
1332
1339
  s.contains(s.getRootNode().activeElement) || m(2500);
1333
1340
  }), s.addEventListener("focusout", () => m(2500)), m(f ? 6500 : d ? 5200 : 2600);
1334
1341
  }
1335
- function et(e) {
1342
+ function tt(e) {
1336
1343
  let r = n.endpoint.replace(/\/api\/point$/, "/api/point-notify"), i = (t) => fetch(r, {
1337
1344
  method: "POST",
1338
1345
  headers: { "Content-Type": "text/plain;charset=UTF-8" },
@@ -1345,7 +1352,7 @@ function Z(e, t = {}) {
1345
1352
  }), a = !!n.identified?.(), o = document.createElement("div");
1346
1353
  o.className = "tell", o.innerHTML = "<label class=\"tick\"><input type=\"checkbox\"><span><b>Tell me when it’s fixed</b><small></small></span></label>";
1347
1354
  let s = o.querySelector("input"), c = o.querySelector("small");
1348
- s.checked = !!t.notify.tick, c.textContent = a && t.notify.email ? "Here, and by email" : "We’ll show it here next time you visit", s.checked && B(e);
1355
+ s.checked = !!t.notify.tick, c.textContent = a && t.notify.email ? "Here, and by email" : "We’ll show it here next time you visit", s.checked && le(e);
1349
1356
  let l = null;
1350
1357
  return t.notify.email && !a && (l = document.createElement("form"), l.className = "mail", l.innerHTML = "<label for=\"sp-mail\">Email me too (optional)</label><div><input id=\"sp-mail\" type=\"email\" autocomplete=\"email\" placeholder=\"you@example.com\" maxlength=\"254\"><button type=\"submit\">Save</button></div><p class=\"mailmsg\" role=\"status\"></p>", l.hidden = !s.checked, l.addEventListener("submit", async (e) => {
1351
1358
  e.preventDefault();
@@ -1364,14 +1371,14 @@ function Z(e, t = {}) {
1364
1371
  }
1365
1372
  }), o.append(l)), s.addEventListener("change", () => {
1366
1373
  let t = s.checked;
1367
- t ? B(e) : le(e), l && (l.hidden = !t), i({ on: t }).catch(() => {});
1374
+ t ? le(e) : V(e), l && (l.hidden = !t), i({ on: t }).catch(() => {});
1368
1375
  }), o;
1369
1376
  }
1370
1377
  function $() {
1371
- if (!x) {
1372
- x = !0, cancelAnimationFrame(b), l && l.stop(), n.active(!1), P(!1);
1378
+ if (!S) {
1379
+ S = !0, cancelAnimationFrame(x), u && u.stop(), n.active(!1), P(!1);
1373
1380
  for (let e of Fe) window.removeEventListener(e, he, !0);
1374
- window.removeEventListener("pointermove", G, !0), window.removeEventListener("keydown", K, !0), w.remove(), N.remove(), t.onClose?.();
1381
+ window.removeEventListener("pointermove", K, !0), window.removeEventListener("keydown", q, !0), T.remove(), N.remove(), t.onClose?.();
1375
1382
  }
1376
1383
  }
1377
1384
  for (let e of Fe) window.addEventListener(e, he, {
@@ -1381,38 +1388,38 @@ function Z(e, t = {}) {
1381
1388
  try {
1382
1389
  getSelection()?.removeAllRanges();
1383
1390
  } catch {}
1384
- window.addEventListener("pointermove", G, !0), window.addEventListener("keydown", K, !0), E(".x").addEventListener("click", $);
1385
- let tt = !1, nt = (e, t) => {
1386
- let n = A.offsetWidth, r = A.offsetHeight;
1387
- A.style.left = `${Math.min(innerWidth - n - 8, Math.max(8, e))}px`, A.style.top = `${Math.min(innerHeight - Math.min(r, 120), Math.max(8, t))}px`, A.style.right = "auto", A.style.bottom = "auto", tt = !0;
1388
- }, rt = A.querySelector("header");
1389
- rt.title = "Drag to move", rt.addEventListener("pointerdown", (e) => {
1391
+ window.addEventListener("pointermove", K, !0), window.addEventListener("keydown", q, !0), D(".x").addEventListener("click", $);
1392
+ let nt = !1, rt = (e, t) => {
1393
+ let n = j.offsetWidth, r = j.offsetHeight;
1394
+ j.style.left = `${Math.min(innerWidth - n - 8, Math.max(8, e))}px`, j.style.top = `${Math.min(innerHeight - Math.min(r, 120), Math.max(8, t))}px`, j.style.right = "auto", j.style.bottom = "auto", nt = !0;
1395
+ }, it = j.querySelector("header");
1396
+ it.title = "Drag to move", it.addEventListener("pointerdown", (e) => {
1390
1397
  if (e.button !== 0 || e.target.closest("button") || innerWidth <= 560) return;
1391
- let t = A.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top;
1392
- A.classList.add("moving");
1393
- let i = (e) => nt(e.clientX - n, e.clientY - r), a = () => {
1394
- A.classList.remove("moving"), window.removeEventListener("pointermove", i, !0), window.removeEventListener("pointerup", a, !0);
1398
+ let t = j.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top;
1399
+ j.classList.add("moving");
1400
+ let i = (e) => rt(e.clientX - n, e.clientY - r), a = () => {
1401
+ j.classList.remove("moving"), window.removeEventListener("pointermove", i, !0), window.removeEventListener("pointerup", a, !0);
1395
1402
  };
1396
1403
  window.addEventListener("pointermove", i, !0), window.addEventListener("pointerup", a, !0), e.preventDefault();
1397
- }), E(".send").addEventListener("click", Q), E(".flowbtn").addEventListener("click", () => c && !c.end ? q() : ve()), J.addEventListener("click", Je), E(".vstart").addEventListener("click", qe);
1398
- for (let e of [".expected", ".actual"]) E(e).addEventListener("input", () => L(a));
1399
- L("armed"), X.set(Ce, "1");
1400
- let it = X.get(xe);
1401
- return Z && it === "yes" && qe(), Qe(!1), C || Xe(), t.target?.isConnected && !w.contains(t.target) && z(t.target, null), {
1402
- toggle: () => i.length || c?.end ? Q() : $(),
1404
+ }), D(".send").addEventListener("click", $e), D(".flowbtn").addEventListener("click", () => l && !l.end ? J() : ve()), Y.addEventListener("click", Je), D(".vstart").addEventListener("click", qe);
1405
+ for (let e of [".expected", ".actual"]) D(e).addEventListener("input", () => L(o));
1406
+ L("armed"), Z.set(Ce, "1");
1407
+ let at = Z.get(xe);
1408
+ return Q && at === "yes" && qe(), Qe(!1), w || Xe(), t.target?.isConnected && !T.contains(t.target) && z(t.target, null), {
1409
+ toggle: () => a.length || l?.end ? $e() : $(),
1403
1410
  released: () => {
1404
- !i.length && !c && !C && a === "armed" && $();
1411
+ !a.length && !l && !w && o === "armed" && $();
1405
1412
  },
1406
1413
  close: $,
1407
- send: Q,
1414
+ send: $e,
1408
1415
  get markers() {
1409
- return i.length;
1416
+ return a.length;
1410
1417
  },
1411
1418
  get state() {
1412
- return a;
1419
+ return o;
1413
1420
  }
1414
1421
  };
1415
1422
  }
1416
1423
  var Ie = "\n:host{all:initial}\n*{-webkit-user-select:none;user-select:none}\ninput,textarea{-webkit-user-select:text;user-select:text}\n*{box-sizing:border-box;font-family:ui-sans-serif,system-ui,-apple-system,\"Segoe UI\",sans-serif}\n[hidden]{display:none!important}\n.ring{position:fixed;left:0;top:0;width:24px;height:24px;margin:-12px 0 0 -12px;border-radius:50%;border:2px solid #94A3B8;background:rgba(148,163,184,.12);pointer-events:none;z-index:4;transition:border-color .15s,background .15s;will-change:transform}\n.ring .dot{position:absolute;left:50%;top:50%;width:4px;height:4px;margin:-2px;border-radius:50%;background:#94A3B8}\n.ring .badge{position:absolute;left:16px;top:-12px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:#0E1320;color:#fff;font-size:10px;font-weight:700;line-height:16px;text-align:center;display:none}\n.ring[data-state~=\"marking\"]{border-color:#5B4BF0;background:rgba(91,75,240,.16)}\n.ring[data-state~=\"marking\"] .dot{background:#5B4BF0}\n.ring[data-state~=\"armed\"] .badge,.ring[data-state~=\"marking\"] .badge{display:block}\n.ring[data-state~=\"listening\"]{box-shadow:0 0 0 calc(2px + var(--lv,0) * 10px) rgba(91,75,240,.35)}\n.ring[data-state~=\"flow\"]{width:14px;height:14px;margin:-7px 0 0 -7px;border-color:#F43F5E;background:#F43F5E;opacity:.9}\n.ring[data-state~=\"flow\"] .dot{display:none}\n.ring[data-state~=\"sent\"]{display:none}\n.ring:not(.seen){opacity:0}\n@media (prefers-reduced-motion:reduce){.ring{transition:none}}\n.outline{position:fixed;left:0;top:0;border:1.5px solid #5B4BF0;border-radius:3px;background:rgba(91,75,240,.06);pointer-events:none;opacity:0;z-index:2}\n.outline .chip{position:absolute;left:-1px;bottom:100%;margin-bottom:4px;max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#0E1320;color:#fff;font-size:11px;font-weight:600;padding:3px 7px;border-radius:5px}\n.outline.below .chip{bottom:auto;top:100%;margin:4px 0 0}\n.frame{position:fixed;left:0;top:0;display:none;border:1.5px dashed #5B4BF0;background:rgba(91,75,240,.08);pointer-events:none;z-index:2}\n.marks{position:fixed;left:0;top:0;width:0;height:0;z-index:3}\n.mk{position:fixed;left:0;top:0;border:2px solid var(--c);border-radius:4px;pointer-events:none}\n.mk.region{border-style:dashed}\n.mk .pin{position:absolute;left:-11px;top:-11px;width:22px;height:22px;border-radius:50%;border:2px solid #fff;background:var(--c);color:#fff;font:700 11px/18px ui-sans-serif,system-ui;text-align:center;pointer-events:auto;cursor:pointer;padding:0;box-shadow:0 2px 8px rgba(0,0,0,.35)}\n.rail{position:fixed;top:16px;right:16px;width:320px;max-height:calc(100vh - 32px);overflow:auto;background:#0E1320;color:#E6E8EE;border:1px solid #2a3346;border-radius:12px;padding:12px;box-shadow:0 12px 40px rgba(0,0,0,.45);font-size:13px;z-index:5;cursor:default}\n.rail *{cursor:auto}\n.rail header,.rail header *:not(button){cursor:grab}\n.rail.moving,.rail.moving *{cursor:grabbing!important;user-select:none}\n.rail.left{right:auto;left:16px}\n.rail button{cursor:pointer}\n.rail header{display:flex;align-items:center;gap:8px;margin-bottom:8px}\n.rail header b{font-size:14px}\n.hint{flex:1;color:#94A3B8;font-size:11.5px}\n.x{background:none;border:0;color:#94A3B8;font-size:18px;line-height:1;padding:2px 6px}\n.list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}\n.list li{display:grid;grid-template-columns:22px 1fr 18px;gap:4px 8px;align-items:center;background:#151B2B;border:1px solid #232c40;border-radius:8px;padding:6px 8px}\n.num{width:22px;height:22px;border-radius:50%;border:0;background:var(--c);color:#fff;font-weight:700;font-size:11px;padding:0}\n.what{display:flex;align-items:center;gap:6px;min-width:0}\n.name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}\n.flag{border:1px solid var(--c);color:var(--c);background:transparent;border-radius:999px;font-size:10.5px;font-weight:700;padding:1px 7px}\n.note{grid-column:2/4;grid-row:2;width:100%;background:#0B0F19;border:1px solid #2a3346;border-radius:6px;color:#E6E8EE;padding:5px 8px;font-size:12.5px;outline:none;resize:none;min-height:28px;field-sizing:content;max-height:120px;line-height:1.45}\n.vcard{margin-top:10px;background:#151B2B;border:1px solid #3b3a7a;border-radius:10px;padding:12px}\n.vcard b{font-size:13.5px}\n.vcard p{margin:6px 0;color:#C3C8D4;font-size:12.5px;line-height:1.5}\n.vcard .fine{color:#94A3B8;font-size:11.5px}\n.vcard .c{text-align:center;margin-bottom:0}\n.kc{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border:1px solid rgba(255,255,255,.22);border-bottom-width:2px;border-radius:5px;background:rgba(255,255,255,.06);color:inherit;font:600 10.5px/1 ui-monospace,SFMono-Regular,Menlo,monospace}\n.caps{display:inline-flex;gap:3px;vertical-align:middle;margin:0 2px}\n.vstart{width:100%;height:44px;margin-top:6px;display:flex;align-items:center;justify-content:center;gap:8px;background:#5B4BF0;border:0;color:#fff;font-weight:700;border-radius:10px;font-size:13.5px}\n.vstart svg,.mic svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}\n.listening{margin-top:10px;background:rgba(255,255,255,.04);border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:8px}\n.lh{display:flex;align-items:center;gap:8px;font-size:12px;color:#C3C8D4}\n.rd{width:8px;height:8px;border-radius:50%;background:#F87171;box-shadow:0 0 0 4px rgba(248,113,113,.2)}\n.bars{margin-left:auto;display:flex;align-items:flex-end;gap:2px;height:14px}\n.bars i{display:block;width:3px;border-radius:2px;background:#14C8A6;height:calc(3px + var(--lv,0) * 11px)}\n.bars i:nth-child(2){height:calc(5px + var(--lv,0) * 9px)}.bars i:nth-child(3){height:calc(3px + var(--lv,0) * 8px)}.bars i:nth-child(4){height:calc(6px + var(--lv,0) * 8px)}.bars i:nth-child(5){height:calc(2px + var(--lv,0) * 6px)}\n.cap{margin:0;font-size:14px;line-height:1.6;color:#F4F5F8;min-height:1.6em}\n.cap .said{color:var(--c);font-weight:600}\n.listening .fine{margin:0;font-size:11px;color:#8A93A6;line-height:1.5}\n.flowbtn{margin-top:10px;width:100%;background:#151B2B;border:1px solid #2a3346;color:#E6E8EE;border-radius:8px;padding:7px 8px;font-size:12px;font-weight:600}\n.flowbtn.on{border-color:#F43F5E;color:#FDA4AF}\n.bottom{gap:8px}\n.mic{flex:none;width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:transparent;border:1px solid rgba(169,160,255,.5);color:#A9A0FF;padding:0}\n.mic.on{background:#F87171;border-color:#F87171;color:#0E1320}\n.typei{height:44px;padding:0 12px;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:transparent;color:#C3C8D4;font-size:13px}\n.send{flex:1;height:44px;background:#5B4BF0;border:0;color:#fff;font-weight:700;border-radius:10px;padding:0 16px;font-size:14px}\n.send:disabled{opacity:.45;cursor:default}\n.rail.busy .send:disabled{opacity:1}\n.rail.busy .list,.rail.busy .exp,.rail.busy .flowbtn,.rail.busy .mic,.rail.busy .typei,.rail.busy .listening{opacity:.5;pointer-events:none}\n.send{display:flex;align-items:center;justify-content:center;gap:8px}\n.spin{width:15px;height:15px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:sp-spin .7s linear infinite}\n@keyframes sp-spin{to{transform:rotate(360deg)}}\n@media (prefers-reduced-motion:reduce){.spin{animation-duration:2s}}\n@media (max-width:560px){.rail{top:auto;left:8px;right:8px;bottom:8px;width:auto;max-height:55vh;border-radius:14px}.howto{width:calc(100vw - 24px);bottom:auto;top:12px}}\n.rail.done{width:auto;max-width:360px;padding:14px 16px}\n.thanks{margin:0;color:#F4F5F8;display:flex;flex-direction:column;gap:8px}\n.th{display:flex;align-items:center;gap:10px}\n.th b{font-size:14px;font-weight:600}\n.okc{width:22px;height:22px;flex:none;border-radius:50%;background:#14C8A6;display:flex;align-items:center;justify-content:center}\n.okc svg{width:12px;height:12px;fill:none;stroke:#0E1320;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}\n.teach{margin:0;font-size:13px;line-height:1.7;color:#C3C8D4}\n.tell{border-top:1px solid rgba(255,255,255,.1);padding-top:12px;display:flex;flex-direction:column;gap:10px}\n.tick{display:flex;gap:10px;align-items:flex-start;font-size:13px;line-height:1.5;color:#C3C8D4;cursor:pointer}\n.tick input{width:16px;height:16px;margin:2px 0 0;flex:none;accent-color:#14C8A6;cursor:pointer}\n.tick b{display:block;color:#F4F5F8;font-weight:600}\n.tick small{font-size:13px}\n.mail{display:flex;flex-direction:column;gap:6px;padding-left:26px;margin:0}\n.mail label{font-size:12px;color:#C3C8D4}\n.mail div{display:flex;gap:8px}\n.mail input{flex:1;min-width:0;height:34px;border-radius:8px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.06);color:#F4F5F8;padding:0 10px;font:inherit;font-size:13px}\n.mail input:disabled{opacity:.6}\n.mail button{height:34px;padding:0 14px;border:0;border-radius:8px;background:#F4F5F8;color:#0E1320;font:inherit;font-size:13px;font-weight:600;cursor:pointer}\n.mailmsg{margin:0;font-size:12px;color:#8A93A6}\n.mailmsg:empty{display:none}\n.keep{display:flex;gap:6px;align-items:center;margin-top:10px;font-size:12px;color:#C3C8D4}\n.note:focus,.exp input:focus{border-color:#5B4BF0}\n.rm{grid-column:3;grid-row:1;background:none;border:0;color:#64748B;font-size:15px;padding:0}\n.empty{color:#94A3B8;margin:6px 0 8px;font-size:12.5px}\n.row{display:flex;align-items:center;gap:8px;margin-top:10px}\n.exp{margin-top:10px;color:#94A3B8;font-size:12px}\n.exp summary{cursor:pointer}\n.exp input{display:block;width:100%;margin-top:6px;background:#0B0F19;border:1px solid #2a3346;border-radius:6px;color:#E6E8EE;padding:6px 8px;font-size:12.5px;outline:none}\n.status{margin:8px 0 0;font-size:12px;color:#94A3B8;min-height:1em}\n.status:empty{display:none}\n.status.bad{color:#FCA5A5}\n.howto{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);width:360px;background:#0E1320;color:#E6E8EE;border:1px solid #2a3346;border-radius:14px;padding:14px;box-shadow:0 16px 50px rgba(0,0,0,.5);z-index:6;font-size:13px}\n.howto ol{margin:10px 0 8px;padding-left:20px;line-height:1.7}\n.howto .ok{background:#5B4BF0;border:0;color:#fff;border-radius:8px;padding:6px 12px;font-weight:700;cursor:pointer}\n.scene{position:relative;height:96px;border-radius:9px;background:#151B2B;overflow:hidden}\n.scene .page{position:absolute;inset:12px 14px}\n.scene .page i{display:block;height:8px;border-radius:4px;background:#232c40;margin-bottom:8px;width:70%}\n.scene .page i+i{width:45%}\n.scene .btn{position:absolute;right:10px;bottom:6px;background:#2E86F0;color:#fff;font-size:11px;padding:5px 14px;border-radius:6px}\n.scene .cur{position:absolute;left:30px;top:20px;width:18px;height:18px;margin:-9px;border-radius:50%;border:2px solid #94A3B8;animation:sp-move 8s infinite}\n.scene .pinh{position:absolute;right:62px;bottom:20px;width:18px;height:18px;border-radius:50%;background:#F43F5E;color:#fff;font:700 10px/18px ui-sans-serif,system-ui;text-align:center;opacity:0;animation:sp-pin 8s infinite}\n.scene .wave{position:absolute;left:20px;bottom:16px;width:40px;height:10px;border-radius:5px;background:linear-gradient(90deg,#5B4BF0,#2E86F0);opacity:0;animation:sp-wave 8s infinite}\n@keyframes sp-move{0%,8%{transform:translate(0,0);border-color:#94A3B8}30%,100%{transform:translate(250px,52px);border-color:#5B4BF0}}\n@keyframes sp-pin{0%,34%{opacity:0;transform:scale(.4)}40%,100%{opacity:1;transform:scale(1)}}\n@keyframes sp-wave{0%,48%{opacity:0;transform:scaleX(.3)}55%,60%{opacity:1;transform:scaleX(1)}65%,70%{opacity:1;transform:scaleX(.5)}75%,85%{opacity:1;transform:scaleX(1)}92%,100%{opacity:0}}\n@media (prefers-reduced-motion:reduce){.scene .cur,.scene .pinh,.scene .wave{animation:none}.scene .pinh,.scene .wave{opacity:1}.scene .cur{transform:translate(250px,52px)}}\n";
1417
1424
  //#endregion
1418
- export { be as FLAGS, q as mountEntry, Z as openPoint, ye as showFixed };
1425
+ export { be as FLAGS, J as mountEntry, Q as openPoint, ye as showFixed };