@launchsecure/launch-kit 0.0.31 → 0.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beacon/beacon.mjs +550 -521
- package/dist/beacon/beacon.mjs.map +1 -1
- package/dist/beacon/beacon.umd.js +9 -9
- package/dist/beacon/beacon.umd.js.map +1 -1
- package/dist/beacon/types/internal/pick-mode-overlay.d.ts.map +1 -1
- package/dist/beacon/types/internal/picker.d.ts.map +1 -1
- package/dist/beacon/types/internal/pin-popover.d.ts.map +1 -1
- package/dist/beacon/types/internal/selector.d.ts.map +1 -1
- package/dist/deck-client/assets/{_baseUniq-DdHaBFYO.js → _baseUniq-C7GsHvgg.js} +1 -1
- package/dist/deck-client/assets/{arc-D98e_18X.js → arc-CSrZRINY.js} +1 -1
- package/dist/deck-client/assets/{architectureDiagram-Q4EWVU46-DNFZzh-4.js → architectureDiagram-Q4EWVU46-zoB-G17J.js} +1 -1
- package/dist/deck-client/assets/{blockDiagram-DXYQGD6D-DeQvGUdX.js → blockDiagram-DXYQGD6D-BRjjtYH6.js} +1 -1
- package/dist/deck-client/assets/{c4Diagram-AHTNJAMY-B6ekZf1n.js → c4Diagram-AHTNJAMY-C3D3sd2U.js} +1 -1
- package/dist/deck-client/assets/channel-8ReQnQfH.js +1 -0
- package/dist/deck-client/assets/{chunk-4BX2VUAB-9aDWymq2.js → chunk-4BX2VUAB-DhpDMOPO.js} +1 -1
- package/dist/deck-client/assets/{chunk-4TB4RGXK-DtKQqaI7.js → chunk-4TB4RGXK-BIRgPXRl.js} +1 -1
- package/dist/deck-client/assets/{chunk-55IACEB6-COy9hEae.js → chunk-55IACEB6-BF24dwDZ.js} +1 -1
- package/dist/deck-client/assets/{chunk-EDXVE4YY-D_f861An.js → chunk-EDXVE4YY-CW75Y61B.js} +1 -1
- package/dist/deck-client/assets/{chunk-FMBD7UC4-CmuA5UKn.js → chunk-FMBD7UC4-B5-oyL79.js} +1 -1
- package/dist/deck-client/assets/{chunk-OYMX7WX6-vT8z8D-0.js → chunk-OYMX7WX6-BB2bHe_Q.js} +1 -1
- package/dist/deck-client/assets/{chunk-QZHKN3VN-CTlwwg-R.js → chunk-QZHKN3VN-D80eZO4B.js} +1 -1
- package/dist/deck-client/assets/{chunk-YZCP3GAM-C44yr620.js → chunk-YZCP3GAM-Dz9787p_.js} +1 -1
- package/dist/deck-client/assets/classDiagram-6PBFFD2Q-cRxTeGkK.js +1 -0
- package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-cRxTeGkK.js +1 -0
- package/dist/deck-client/assets/clone-LSHZ3K6R.js +1 -0
- package/dist/deck-client/assets/{cose-bilkent-S5V4N54A-DBB2J2nL.js → cose-bilkent-S5V4N54A-MQjiZLcL.js} +1 -1
- package/dist/deck-client/assets/{dagre-KV5264BT-DxDTYbKl.js → dagre-KV5264BT-DG4EcLpJ.js} +1 -1
- package/dist/deck-client/assets/{diagram-5BDNPKRD-DByWrWd1.js → diagram-5BDNPKRD-1n7hM3Gc.js} +1 -1
- package/dist/deck-client/assets/{diagram-G4DWMVQ6-B8B6ddMq.js → diagram-G4DWMVQ6-CYMarncV.js} +1 -1
- package/dist/deck-client/assets/{diagram-MMDJMWI5-BMUZ2PWK.js → diagram-MMDJMWI5-DSisoipe.js} +1 -1
- package/dist/deck-client/assets/{diagram-TYMM5635-Bk9e8BB-.js → diagram-TYMM5635-Btnq49OJ.js} +1 -1
- package/dist/deck-client/assets/{erDiagram-SMLLAGMA-DcOSwSol.js → erDiagram-SMLLAGMA-Cu2Hb_Tz.js} +1 -1
- package/dist/deck-client/assets/{flowDiagram-DWJPFMVM-DI-4BR0F.js → flowDiagram-DWJPFMVM-CGJzUzsO.js} +1 -1
- package/dist/deck-client/assets/{ganttDiagram-T4ZO3ILL-BeZuXBoU.js → ganttDiagram-T4ZO3ILL-D9sqGUBT.js} +1 -1
- package/dist/deck-client/assets/{gitGraphDiagram-UUTBAWPF-Bcki__f-.js → gitGraphDiagram-UUTBAWPF-C0QwX2od.js} +1 -1
- package/dist/deck-client/assets/{graph-CifKx6G1.js → graph-CcBjOQCl.js} +1 -1
- package/dist/deck-client/assets/{index-CB-qlwRT.js → index-0arwoc0z.js} +76 -76
- package/dist/deck-client/assets/{infoDiagram-42DDH7IO-CReN1nFN.js → infoDiagram-42DDH7IO-DTimhhhS.js} +1 -1
- package/dist/deck-client/assets/{ishikawaDiagram-UXIWVN3A-CDF_VLN_.js → ishikawaDiagram-UXIWVN3A-DxOxg_B4.js} +1 -1
- package/dist/deck-client/assets/{journeyDiagram-VCZTEJTY-DwgGrNVB.js → journeyDiagram-VCZTEJTY-Bpq0qa4j.js} +1 -1
- package/dist/deck-client/assets/{kanban-definition-6JOO6SKY-DB_zohh5.js → kanban-definition-6JOO6SKY-aTIrpcVO.js} +1 -1
- package/dist/deck-client/assets/{layout-DFfX1O3z.js → layout-DqglLR2E.js} +1 -1
- package/dist/deck-client/assets/{linear-CtKb4EXj.js → linear-D5GxehPc.js} +1 -1
- package/dist/deck-client/assets/{min-DCRRwUZv.js → min-DXLfSREq.js} +1 -1
- package/dist/deck-client/assets/{mindmap-definition-QFDTVHPH-D0QBOiFe.js → mindmap-definition-QFDTVHPH-mO5Vys7I.js} +1 -1
- package/dist/deck-client/assets/{pieDiagram-DEJITSTG-CD-EV5WB.js → pieDiagram-DEJITSTG-Dm0gzdAr.js} +1 -1
- package/dist/deck-client/assets/{quadrantDiagram-34T5L4WZ-B-JXZ8xI.js → quadrantDiagram-34T5L4WZ-Daq7j3qD.js} +1 -1
- package/dist/deck-client/assets/{requirementDiagram-MS252O5E-D2_OK5Dp.js → requirementDiagram-MS252O5E-CmwV95um.js} +1 -1
- package/dist/deck-client/assets/{sankeyDiagram-XADWPNL6-BbBJqVSC.js → sankeyDiagram-XADWPNL6-BOYl3Nkf.js} +1 -1
- package/dist/deck-client/assets/{sequenceDiagram-FGHM5R23-Db8A-Rkk.js → sequenceDiagram-FGHM5R23-BuUjhIcW.js} +1 -1
- package/dist/deck-client/assets/{stateDiagram-FHFEXIEX-DGJnanjS.js → stateDiagram-FHFEXIEX-LUZ_uwio.js} +1 -1
- package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-CnnRwE5D.js +1 -0
- package/dist/deck-client/assets/{timeline-definition-GMOUNBTQ-BRkr6T4w.js → timeline-definition-GMOUNBTQ-CDUxCCAW.js} +1 -1
- package/dist/deck-client/assets/{vennDiagram-DHZGUBPP-d0rsTqFo.js → vennDiagram-DHZGUBPP-BRb24Tf7.js} +1 -1
- package/dist/deck-client/assets/wardley-RL74JXVD-B0BYyVBY.js +162 -0
- package/dist/deck-client/assets/{wardleyDiagram-NUSXRM2D-DzboAsHh.js → wardleyDiagram-NUSXRM2D-BLGlYrQz.js} +1 -1
- package/dist/deck-client/assets/{xychartDiagram-5P7HB3ND-CgTP9u2V.js → xychartDiagram-5P7HB3ND-De31MSnk.js} +1 -1
- package/dist/deck-client/index.html +1 -1
- package/dist/server/deck-mcp-entry.js +83 -40
- package/dist/server/deck-serve.js +54 -20
- package/dist/server/init-entry.js +216 -73
- package/package.json +1 -1
- package/scaffolds/ls-marketplace/plugins/kit/skills/diagram/SKILL.md +27 -5
- package/dist/deck-client/assets/channel-DmR7Tyyt.js +0 -1
- package/dist/deck-client/assets/classDiagram-6PBFFD2Q-Bl4ozQWs.js +0 -1
- package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-Bl4ozQWs.js +0 -1
- package/dist/deck-client/assets/clone-BAy58j24.js +0 -1
- package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-CR7riiab.js +0 -1
- package/dist/deck-client/assets/wardley-RL74JXVD-2t7cMqdS.js +0 -162
package/dist/beacon/beacon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Ie = String.raw`
|
|
2
2
|
:host {
|
|
3
3
|
--beacon-accent: #0ea5e9;
|
|
4
4
|
--beacon-bg: #ffffff;
|
|
@@ -693,19 +693,19 @@ dialog.beacon-dialog::backdrop {
|
|
|
693
693
|
text-overflow: ellipsis;
|
|
694
694
|
max-width: 100%;
|
|
695
695
|
}
|
|
696
|
-
`,
|
|
696
|
+
`, ce = "launch-kit-beacon-portal-styles";
|
|
697
697
|
function Xe() {
|
|
698
|
-
if (typeof document > "u" || !document.head || document.getElementById(
|
|
698
|
+
if (typeof document > "u" || !document.head || document.getElementById(ce)) return;
|
|
699
699
|
const e = document.createElement("style");
|
|
700
|
-
e.id =
|
|
700
|
+
e.id = ce, e.textContent = Ie, document.head.appendChild(e);
|
|
701
701
|
}
|
|
702
|
-
const
|
|
702
|
+
const W = "http://www.w3.org/2000/svg";
|
|
703
703
|
function Ke() {
|
|
704
|
-
const e = document.createElementNS(
|
|
704
|
+
const e = document.createElementNS(W, "svg");
|
|
705
705
|
e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round");
|
|
706
|
-
const t = document.createElementNS(
|
|
706
|
+
const t = document.createElementNS(W, "path");
|
|
707
707
|
t.setAttribute("d", "M3 11l18-5v12L3 14v-3z");
|
|
708
|
-
const n = document.createElementNS(
|
|
708
|
+
const n = document.createElementNS(W, "path");
|
|
709
709
|
return n.setAttribute("d", "M11.6 16.8a3 3 0 1 1-5.8-1.6"), e.appendChild(t), e.appendChild(n), e;
|
|
710
710
|
}
|
|
711
711
|
const z = "launch-kit-beacon", Ge = typeof HTMLElement < "u" ? HTMLElement : class {
|
|
@@ -718,7 +718,7 @@ class Je extends Ge {
|
|
|
718
718
|
if (this.shadow) return;
|
|
719
719
|
this.shadow = this.attachShadow({ mode: "open" });
|
|
720
720
|
const t = document.createElement("style");
|
|
721
|
-
t.textContent =
|
|
721
|
+
t.textContent = Ie, this.shadow.appendChild(t), this.triggerSlot = document.createElement("slot"), this.triggerSlot.name = "trigger", this.shadow.appendChild(this.triggerSlot), this.defaultTrigger = document.createElement("button"), this.defaultTrigger.type = "button", this.defaultTrigger.className = "beacon-default-trigger", this.defaultTrigger.appendChild(Ke());
|
|
722
722
|
const n = document.createElement("span");
|
|
723
723
|
n.textContent = "Feedback", this.defaultTrigger.appendChild(n), this.healthDot = document.createElement("span"), this.healthDot.className = "beacon-health-dot", this.defaultTrigger.appendChild(this.healthDot), this.shadow.appendChild(this.defaultTrigger), this.defaultTrigger.addEventListener("click", () => {
|
|
724
724
|
var o;
|
|
@@ -746,7 +746,7 @@ class Je extends Ge {
|
|
|
746
746
|
(n = this.healthDot) == null || n.classList.toggle("visible", t);
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function Re() {
|
|
750
750
|
typeof window > "u" || typeof customElements > "u" || customElements.get(z) || customElements.define(z, Je);
|
|
751
751
|
}
|
|
752
752
|
function Ze(e, t) {
|
|
@@ -930,13 +930,13 @@ function it(e, t) {
|
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
|
-
const
|
|
933
|
+
const Y = "http://www.w3.org/2000/svg";
|
|
934
934
|
function st() {
|
|
935
|
-
const e = document.createElementNS(
|
|
935
|
+
const e = document.createElementNS(Y, "svg");
|
|
936
936
|
e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round");
|
|
937
|
-
const t = document.createElementNS(
|
|
937
|
+
const t = document.createElementNS(Y, "line");
|
|
938
938
|
t.setAttribute("x1", "18"), t.setAttribute("y1", "6"), t.setAttribute("x2", "6"), t.setAttribute("y2", "18");
|
|
939
|
-
const n = document.createElementNS(
|
|
939
|
+
const n = document.createElementNS(Y, "line");
|
|
940
940
|
return n.setAttribute("x1", "6"), n.setAttribute("y1", "6"), n.setAttribute("x2", "18"), n.setAttribute("y2", "18"), e.appendChild(t), e.appendChild(n), e;
|
|
941
941
|
}
|
|
942
942
|
class ct {
|
|
@@ -1150,7 +1150,7 @@ function ft() {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
};
|
|
1152
1152
|
}
|
|
1153
|
-
const mt = 30,
|
|
1153
|
+
const mt = 30, K = 500, le = 2e3, ht = 500, bt = 5e3, gt = /launch-kit-beacon|beacon\.(?:es|umd|mjs)|\/beacon\//i;
|
|
1154
1154
|
function _(e, t) {
|
|
1155
1155
|
if (e)
|
|
1156
1156
|
return e.length > t ? e.slice(0, t) : e;
|
|
@@ -1165,12 +1165,12 @@ function vt(e) {
|
|
|
1165
1165
|
}
|
|
1166
1166
|
function xt(e) {
|
|
1167
1167
|
try {
|
|
1168
|
-
return JSON.stringify(e).slice(0,
|
|
1168
|
+
return JSON.stringify(e).slice(0, K);
|
|
1169
1169
|
} catch {
|
|
1170
1170
|
return String(e);
|
|
1171
1171
|
}
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function Pe() {
|
|
1174
1174
|
const e = [], t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set();
|
|
1175
1175
|
let o = !1, a, r;
|
|
1176
1176
|
function i(s) {
|
|
@@ -1197,8 +1197,8 @@ function Re() {
|
|
|
1197
1197
|
i({
|
|
1198
1198
|
ts: Date.now(),
|
|
1199
1199
|
kind: "error",
|
|
1200
|
-
message: _(s.message || c || "Unknown error",
|
|
1201
|
-
...d ? { stack: _(d,
|
|
1200
|
+
message: _(s.message || c || "Unknown error", K) ?? "Unknown error",
|
|
1201
|
+
...d ? { stack: _(d, le) } : {},
|
|
1202
1202
|
...s.filename ? { source: _(s.filename, ht) } : {},
|
|
1203
1203
|
...Number.isFinite(s.lineno) ? { line: s.lineno } : {},
|
|
1204
1204
|
...Number.isFinite(s.colno) ? { col: s.colno } : {}
|
|
@@ -1211,8 +1211,8 @@ function Re() {
|
|
|
1211
1211
|
i({
|
|
1212
1212
|
ts: Date.now(),
|
|
1213
1213
|
kind: "unhandledrejection",
|
|
1214
|
-
message: _(d || "Unknown rejection",
|
|
1215
|
-
...l ? { stack: _(l,
|
|
1214
|
+
message: _(d || "Unknown rejection", K) ?? "Unknown rejection",
|
|
1215
|
+
...l ? { stack: _(l, le) } : {}
|
|
1216
1216
|
});
|
|
1217
1217
|
} catch {
|
|
1218
1218
|
}
|
|
@@ -1235,7 +1235,7 @@ function wt() {
|
|
|
1235
1235
|
return {
|
|
1236
1236
|
name: "errors",
|
|
1237
1237
|
setupOnce(t) {
|
|
1238
|
-
e =
|
|
1238
|
+
e = Pe();
|
|
1239
1239
|
const n = e.install();
|
|
1240
1240
|
return t.signal.addEventListener("abort", n, { once: !0 }), n;
|
|
1241
1241
|
},
|
|
@@ -1282,8 +1282,8 @@ function wt() {
|
|
|
1282
1282
|
}
|
|
1283
1283
|
};
|
|
1284
1284
|
}
|
|
1285
|
-
const Et = 8;
|
|
1286
|
-
function
|
|
1285
|
+
const Et = 8, St = " >> ";
|
|
1286
|
+
function de(e, t = document) {
|
|
1287
1287
|
if (!e) return !1;
|
|
1288
1288
|
try {
|
|
1289
1289
|
return t.querySelectorAll(`#${CSS.escape(e)}`).length === 1;
|
|
@@ -1291,41 +1291,50 @@ function le(e, t = document) {
|
|
|
1291
1291
|
return !1;
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function Ct(e) {
|
|
1295
1295
|
const t = e.tagName.toLowerCase(), n = Array.from(e.classList).filter((o) => o.length > 0 && o.length < 40).slice(0, 3).map((o) => `.${CSS.escape(o)}`).join("");
|
|
1296
1296
|
return t + n;
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1298
|
+
function kt(e) {
|
|
1299
1299
|
const t = e.parentElement;
|
|
1300
1300
|
return t ? Array.from(t.children).filter((o) => o.tagName === e.tagName).indexOf(e) + 1 : 1;
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function At(e) {
|
|
1303
1303
|
if (!e || e.nodeType !== Node.ELEMENT_NODE) return "";
|
|
1304
|
-
if (e.id &&
|
|
1304
|
+
if (e.id && de(e.id))
|
|
1305
1305
|
return `#${CSS.escape(e.id)}`;
|
|
1306
|
-
const t = [];
|
|
1307
|
-
let
|
|
1308
|
-
for (;
|
|
1309
|
-
const
|
|
1310
|
-
if (
|
|
1311
|
-
t.unshift(`#${CSS.escape(
|
|
1306
|
+
const t = [], n = [];
|
|
1307
|
+
let o = e, a = 0;
|
|
1308
|
+
for (; o && o.tagName.toLowerCase() !== "body" && a < Et; ) {
|
|
1309
|
+
const i = o;
|
|
1310
|
+
if (i.id && de(i.id)) {
|
|
1311
|
+
t.unshift(`#${CSS.escape(i.id)}`);
|
|
1312
1312
|
break;
|
|
1313
1313
|
}
|
|
1314
|
-
const
|
|
1315
|
-
let
|
|
1316
|
-
if (
|
|
1314
|
+
const s = Ct(i), c = i.parentElement;
|
|
1315
|
+
let d = s;
|
|
1316
|
+
if (c)
|
|
1317
1317
|
try {
|
|
1318
|
-
const
|
|
1319
|
-
Array.from(
|
|
1320
|
-
(
|
|
1321
|
-
).length > 1 && (
|
|
1318
|
+
const l = Array.from(i.classList).join(" ");
|
|
1319
|
+
Array.from(c.children).filter(
|
|
1320
|
+
(p) => p.tagName === i.tagName && Array.from(p.classList).join(" ") === l
|
|
1321
|
+
).length > 1 && (d = `${i.tagName.toLowerCase()}:nth-of-type(${kt(i)})`);
|
|
1322
1322
|
} catch {
|
|
1323
1323
|
}
|
|
1324
|
-
t.unshift(
|
|
1324
|
+
if (t.unshift(d), t.length > 1 && n.unshift(" > "), c)
|
|
1325
|
+
o = c;
|
|
1326
|
+
else {
|
|
1327
|
+
const l = i.getRootNode();
|
|
1328
|
+
l instanceof ShadowRoot ? (o = l.host, t.length > 0 && (n[0] = St)) : o = null;
|
|
1329
|
+
}
|
|
1330
|
+
a++;
|
|
1325
1331
|
}
|
|
1326
|
-
|
|
1332
|
+
let r = t[0] ?? "";
|
|
1333
|
+
for (let i = 1; i < t.length; i++)
|
|
1334
|
+
r += (n[i - 1] ?? " > ") + t[i];
|
|
1335
|
+
return r;
|
|
1327
1336
|
}
|
|
1328
|
-
function
|
|
1337
|
+
function Lt(e) {
|
|
1329
1338
|
const t = Object.keys(e).filter(
|
|
1330
1339
|
(o) => o.startsWith("__reactFiber$") || o.startsWith("__reactInternalInstance$")
|
|
1331
1340
|
);
|
|
@@ -1345,7 +1354,7 @@ function At(e) {
|
|
|
1345
1354
|
}
|
|
1346
1355
|
return { lib: "react" };
|
|
1347
1356
|
}
|
|
1348
|
-
function
|
|
1357
|
+
function Tt(e) {
|
|
1349
1358
|
var o, a;
|
|
1350
1359
|
const t = e, n = t.__vueParentComponent;
|
|
1351
1360
|
if (n) {
|
|
@@ -1354,7 +1363,7 @@ function Lt(e) {
|
|
|
1354
1363
|
}
|
|
1355
1364
|
return t.__vue__ ? { lib: "vue" } : null;
|
|
1356
1365
|
}
|
|
1357
|
-
function
|
|
1366
|
+
function Nt(e) {
|
|
1358
1367
|
const t = window.ng;
|
|
1359
1368
|
if (!(t != null && t.getComponent)) return null;
|
|
1360
1369
|
try {
|
|
@@ -1366,13 +1375,13 @@ function Tt(e) {
|
|
|
1366
1375
|
return null;
|
|
1367
1376
|
}
|
|
1368
1377
|
}
|
|
1369
|
-
function
|
|
1378
|
+
function Mt(e) {
|
|
1370
1379
|
return "__svelte_meta" in e ? { lib: "svelte" } : null;
|
|
1371
1380
|
}
|
|
1372
|
-
function
|
|
1373
|
-
return
|
|
1381
|
+
function It(e) {
|
|
1382
|
+
return Lt(e) ?? Tt(e) ?? Nt(e) ?? Mt(e) ?? void 0;
|
|
1374
1383
|
}
|
|
1375
|
-
const
|
|
1384
|
+
const Rt = 5e3, Pt = 1e3, ue = 1e3, pe = 200, _t = 50, fe = 200, Dt = 500, $t = [
|
|
1376
1385
|
"display",
|
|
1377
1386
|
"position",
|
|
1378
1387
|
"top",
|
|
@@ -1411,32 +1420,32 @@ const It = 5e3, Rt = 1e3, de = 1e3, ue = 200, Pt = 50, pe = 200, _t = 500, Dt =
|
|
|
1411
1420
|
"grid-template-columns",
|
|
1412
1421
|
"grid-template-rows"
|
|
1413
1422
|
];
|
|
1414
|
-
function
|
|
1423
|
+
function me(e, t) {
|
|
1415
1424
|
return e.length <= t ? e : e.slice(0, t) + `
|
|
1416
1425
|
|
|
1417
1426
|
/* … truncated, original was ${e.length} chars */`;
|
|
1418
1427
|
}
|
|
1419
|
-
function
|
|
1428
|
+
function Bt(e) {
|
|
1420
1429
|
const t = getComputedStyle(e), n = {};
|
|
1421
|
-
for (const o of
|
|
1430
|
+
for (const o of $t) {
|
|
1422
1431
|
const a = t.getPropertyValue(o);
|
|
1423
|
-
a && a !== "normal" && a !== "none" && a !== "auto" && a !== "0px" && (n[o] = a.trim().slice(0,
|
|
1432
|
+
a && a !== "normal" && a !== "none" && a !== "auto" && a !== "0px" && (n[o] = a.trim().slice(0, Dt));
|
|
1424
1433
|
}
|
|
1425
1434
|
return n;
|
|
1426
1435
|
}
|
|
1427
|
-
function Bt(e) {
|
|
1428
|
-
return Array.from(e.classList).slice(0, Pt).map((t) => t.length > pe ? t.slice(0, pe) : t);
|
|
1429
|
-
}
|
|
1430
1436
|
function zt(e) {
|
|
1431
|
-
|
|
1437
|
+
return Array.from(e.classList).slice(0, _t).map((t) => t.length > fe ? t.slice(0, fe) : t);
|
|
1438
|
+
}
|
|
1439
|
+
function Ot(e) {
|
|
1440
|
+
const t = e.getBoundingClientRect(), n = At(e), o = e.id || null, a = It(e);
|
|
1432
1441
|
return {
|
|
1433
|
-
selector: n.length >
|
|
1442
|
+
selector: n.length > ue ? n.slice(0, ue) : n,
|
|
1434
1443
|
tagName: e.tagName.toLowerCase(),
|
|
1435
|
-
id: o && o.length >
|
|
1436
|
-
classList:
|
|
1437
|
-
outerHTML:
|
|
1438
|
-
...e.parentElement ? { parentOuterHTML:
|
|
1439
|
-
computedStyles:
|
|
1444
|
+
id: o && o.length > pe ? o.slice(0, pe) : o,
|
|
1445
|
+
classList: zt(e),
|
|
1446
|
+
outerHTML: me(e.outerHTML, Rt),
|
|
1447
|
+
...e.parentElement ? { parentOuterHTML: me(e.parentElement.outerHTML, Pt) } : {},
|
|
1448
|
+
computedStyles: Bt(e),
|
|
1440
1449
|
boundingRect: {
|
|
1441
1450
|
x: Math.round(t.x),
|
|
1442
1451
|
y: Math.round(t.y),
|
|
@@ -1446,25 +1455,25 @@ function zt(e) {
|
|
|
1446
1455
|
...a ? { framework: a } : {}
|
|
1447
1456
|
};
|
|
1448
1457
|
}
|
|
1449
|
-
const
|
|
1450
|
-
async function
|
|
1451
|
-
const a = await
|
|
1458
|
+
const Ht = 14, Ut = "#ffffff", qt = "#ffffff", Ft = 3, jt = "#0ea5e9";
|
|
1459
|
+
async function _e(e, t, n, o = jt) {
|
|
1460
|
+
const a = await Wt(e), r = document.createElement("canvas");
|
|
1452
1461
|
r.width = a.naturalWidth, r.height = a.naturalHeight;
|
|
1453
1462
|
const i = r.getContext("2d");
|
|
1454
1463
|
if (!i) throw new Error("Could not get 2D canvas context");
|
|
1455
1464
|
i.drawImage(a, 0, 0);
|
|
1456
1465
|
const s = r.width / n.w, c = r.height / n.h;
|
|
1457
1466
|
for (const d of t) {
|
|
1458
|
-
const l =
|
|
1467
|
+
const l = Vt(d);
|
|
1459
1468
|
if (!l) continue;
|
|
1460
1469
|
const m = l.x * s, p = l.y * c, g = l.w * s, u = l.h * c;
|
|
1461
|
-
i.lineWidth =
|
|
1462
|
-
const v = m + g,
|
|
1463
|
-
i.beginPath(), i.fillStyle = o, i.arc(v,
|
|
1470
|
+
i.lineWidth = Ft, i.strokeStyle = o, i.strokeRect(m, p, g, u);
|
|
1471
|
+
const v = m + g, S = p;
|
|
1472
|
+
i.beginPath(), i.fillStyle = o, i.arc(v, S, Ht, 0, Math.PI * 2), i.fill(), i.lineWidth = 3, i.strokeStyle = Ut, i.stroke(), i.fillStyle = qt, i.font = "bold 16px system-ui, -apple-system, sans-serif", i.textAlign = "center", i.textBaseline = "middle", i.fillText(String(d.number), v, S + 1);
|
|
1464
1473
|
}
|
|
1465
1474
|
return r.toDataURL("image/jpeg", 0.85);
|
|
1466
1475
|
}
|
|
1467
|
-
function
|
|
1476
|
+
function Vt(e) {
|
|
1468
1477
|
if (e.liveElement && document.contains(e.liveElement)) {
|
|
1469
1478
|
const t = e.liveElement.getBoundingClientRect();
|
|
1470
1479
|
if (t.width > 0 || t.height > 0)
|
|
@@ -1482,18 +1491,18 @@ function jt(e) {
|
|
|
1482
1491
|
}
|
|
1483
1492
|
return e.boundingRect;
|
|
1484
1493
|
}
|
|
1485
|
-
function
|
|
1494
|
+
function Wt(e) {
|
|
1486
1495
|
return new Promise((t, n) => {
|
|
1487
1496
|
const o = new Image();
|
|
1488
1497
|
o.onload = () => t(o), o.onerror = (a) => n(a), o.src = e;
|
|
1489
1498
|
});
|
|
1490
1499
|
}
|
|
1491
|
-
const D = "beacon-no-capture",
|
|
1492
|
-
function
|
|
1500
|
+
const D = "beacon-no-capture", Yt = "#0ea5e9", he = "Click any element to pin it · Press Esc to finish";
|
|
1501
|
+
function be(e, t) {
|
|
1493
1502
|
return /^#[0-9a-fA-F]{6}$/.test(e) ? `${e}${t}` : e;
|
|
1494
1503
|
}
|
|
1495
|
-
function
|
|
1496
|
-
const t = e.accent ??
|
|
1504
|
+
function Xt(e = {}) {
|
|
1505
|
+
const t = e.accent ?? Yt, n = be(t, "b3"), o = be(t, "2e"), a = document.createElement("style");
|
|
1497
1506
|
a.className = D, a.textContent = "@keyframes beacon-spin { to { transform: rotate(360deg); } }", document.head.appendChild(a);
|
|
1498
1507
|
const r = document.createElement("div");
|
|
1499
1508
|
r.className = D, r.setAttribute("aria-hidden", "true"), r.style.cssText = [
|
|
@@ -1522,7 +1531,7 @@ function Yt(e = {}) {
|
|
|
1522
1531
|
"pointer-events: none",
|
|
1523
1532
|
"white-space: nowrap",
|
|
1524
1533
|
"z-index: 2147483646"
|
|
1525
|
-
].join("; "), i.textContent =
|
|
1534
|
+
].join("; "), i.textContent = he;
|
|
1526
1535
|
const s = `<span style="
|
|
1527
1536
|
display: inline-block;
|
|
1528
1537
|
width: 12px;
|
|
@@ -1534,12 +1543,12 @@ function Yt(e = {}) {
|
|
|
1534
1543
|
vertical-align: middle;
|
|
1535
1544
|
margin-right: 8px;
|
|
1536
1545
|
"></span>`;
|
|
1537
|
-
function c(
|
|
1538
|
-
return
|
|
1546
|
+
function c(h) {
|
|
1547
|
+
return h.replace(/[<>&]/g, (f) => ({ "<": "<", ">": ">", "&": "&" })[f]);
|
|
1539
1548
|
}
|
|
1540
1549
|
document.body.appendChild(r), document.body.appendChild(i);
|
|
1541
1550
|
const d = /* @__PURE__ */ new Map();
|
|
1542
|
-
function l(
|
|
1551
|
+
function l(h) {
|
|
1543
1552
|
const f = document.createElement("div");
|
|
1544
1553
|
return f.className = D, f.setAttribute("aria-hidden", "true"), f.style.cssText = [
|
|
1545
1554
|
"position: fixed",
|
|
@@ -1556,67 +1565,75 @@ function Yt(e = {}) {
|
|
|
1556
1565
|
"box-shadow: 0 2px 8px hsl(0 0% 0% / 0.4)",
|
|
1557
1566
|
"pointer-events: none",
|
|
1558
1567
|
"z-index: 2147483646"
|
|
1559
|
-
].join("; "), f.textContent = String(
|
|
1568
|
+
].join("; "), f.textContent = String(h), document.body.appendChild(f), f;
|
|
1560
1569
|
}
|
|
1561
1570
|
function m() {
|
|
1562
|
-
const
|
|
1563
|
-
return
|
|
1571
|
+
const h = document.createElement("div");
|
|
1572
|
+
return h.className = D, h.setAttribute("aria-hidden", "true"), h.style.cssText = [
|
|
1564
1573
|
"position: fixed",
|
|
1565
1574
|
"pointer-events: none",
|
|
1566
1575
|
`border: 2px solid ${t}`,
|
|
1567
1576
|
"border-radius: 2px",
|
|
1568
1577
|
"box-sizing: border-box",
|
|
1569
1578
|
"z-index: 2147483645"
|
|
1570
|
-
].join("; "), document.body.appendChild(
|
|
1579
|
+
].join("; "), document.body.appendChild(h), h;
|
|
1571
1580
|
}
|
|
1572
|
-
function p(
|
|
1573
|
-
const
|
|
1574
|
-
|
|
1581
|
+
function p(h, f, E) {
|
|
1582
|
+
const b = E ? "0.5" : "1";
|
|
1583
|
+
h.outline.style.display = "block", h.outline.style.opacity = b, h.outline.style.left = `${f.x}px`, h.outline.style.top = `${f.y}px`, h.outline.style.width = `${f.w}px`, h.outline.style.height = `${f.h}px`, h.marker.style.display = "flex", h.marker.style.opacity = b, h.marker.style.left = `${f.x + f.w - 12}px`, h.marker.style.top = `${Math.max(2, f.y - 12)}px`;
|
|
1575
1584
|
}
|
|
1576
|
-
function g(
|
|
1577
|
-
|
|
1585
|
+
function g(h) {
|
|
1586
|
+
h.marker.style.display = "none", h.outline.style.display = "none";
|
|
1578
1587
|
}
|
|
1579
1588
|
function u() {
|
|
1580
|
-
d.forEach((
|
|
1581
|
-
let f =
|
|
1582
|
-
if (
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1589
|
+
d.forEach((h) => {
|
|
1590
|
+
let f = h.anchor.target;
|
|
1591
|
+
if (f && !f.isConnected && (f = null), !f && h.anchor.selector) {
|
|
1592
|
+
try {
|
|
1593
|
+
f = document.querySelector(h.anchor.selector);
|
|
1594
|
+
} catch {
|
|
1595
|
+
f = null;
|
|
1596
|
+
}
|
|
1597
|
+
f && (h.anchor.target = f);
|
|
1598
|
+
}
|
|
1599
|
+
if (f) {
|
|
1600
|
+
const b = f.getBoundingClientRect();
|
|
1601
|
+
if (b.width > 0 || b.height > 0) {
|
|
1602
|
+
p(h, { x: b.left, y: b.top, w: b.width, h: b.height }, !1);
|
|
1586
1603
|
return;
|
|
1587
1604
|
}
|
|
1588
1605
|
}
|
|
1589
|
-
const
|
|
1590
|
-
if (
|
|
1591
|
-
p(
|
|
1606
|
+
const E = h.anchor.fallbackRect;
|
|
1607
|
+
if (E && (E.w > 0 || E.h > 0)) {
|
|
1608
|
+
p(h, E, !0);
|
|
1592
1609
|
return;
|
|
1593
1610
|
}
|
|
1594
|
-
g(
|
|
1611
|
+
g(h);
|
|
1595
1612
|
});
|
|
1596
1613
|
}
|
|
1597
1614
|
let v = null;
|
|
1598
|
-
function
|
|
1615
|
+
function S() {
|
|
1599
1616
|
v === null && (v = requestAnimationFrame(() => {
|
|
1600
1617
|
v = null, u();
|
|
1601
1618
|
}));
|
|
1602
1619
|
}
|
|
1603
|
-
return window.addEventListener("scroll",
|
|
1604
|
-
addPin(
|
|
1605
|
-
const
|
|
1606
|
-
d.set(
|
|
1620
|
+
return window.addEventListener("scroll", S, !0), window.addEventListener("resize", S), {
|
|
1621
|
+
addPin(h, f) {
|
|
1622
|
+
const E = l(h), b = m();
|
|
1623
|
+
d.set(h, { anchor: f, marker: E, outline: b }), u();
|
|
1607
1624
|
},
|
|
1608
|
-
setLoading(
|
|
1609
|
-
|
|
1625
|
+
setLoading(h) {
|
|
1626
|
+
h ? i.innerHTML = s + c(h) : i.textContent = he;
|
|
1610
1627
|
},
|
|
1611
1628
|
destroy() {
|
|
1612
|
-
window.removeEventListener("scroll",
|
|
1613
|
-
|
|
1629
|
+
window.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S), v !== null && cancelAnimationFrame(v), r.remove(), i.remove(), a.remove(), d.forEach(({ marker: h, outline: f }) => {
|
|
1630
|
+
h.remove(), f.remove();
|
|
1614
1631
|
}), d.clear();
|
|
1615
1632
|
}
|
|
1616
1633
|
};
|
|
1617
1634
|
}
|
|
1618
|
-
const
|
|
1619
|
-
function
|
|
1635
|
+
const Kt = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>', Gt = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>';
|
|
1636
|
+
function Jt(e) {
|
|
1620
1637
|
return new Promise((t) => {
|
|
1621
1638
|
const n = document.createElement("div");
|
|
1622
1639
|
n.className = "beacon-pin-popover open beacon-no-capture beacon-theme-auto", n.innerHTML = `
|
|
@@ -1625,11 +1642,11 @@ function Gt(e) {
|
|
|
1625
1642
|
<span class="beacon-pin-num">${e.pinNumber}</span>
|
|
1626
1643
|
<span>Note for this pin</span>
|
|
1627
1644
|
</div>
|
|
1628
|
-
<button type="button" class="beacon-icon-btn" data-action="cancel" aria-label="Discard this pin">${
|
|
1645
|
+
<button type="button" class="beacon-icon-btn" data-action="cancel" aria-label="Discard this pin">${Kt}</button>
|
|
1629
1646
|
</div>
|
|
1630
1647
|
<textarea class="beacon-textarea" rows="2" placeholder="Optional — describe what's wrong here…" style="min-height:48px;"></textarea>
|
|
1631
1648
|
<div class="beacon-pin-popover-actions">
|
|
1632
|
-
<button type="button" class="beacon-btn primary" data-action="save">${
|
|
1649
|
+
<button type="button" class="beacon-btn primary" data-action="save">${Gt} Save</button>
|
|
1633
1650
|
</div>
|
|
1634
1651
|
`;
|
|
1635
1652
|
const o = 240, a = 160, r = Math.min(Math.max(8, e.anchor.x), window.innerWidth - o - 8), i = Math.min(Math.max(8, e.anchor.y + 12), window.innerHeight - a - 8);
|
|
@@ -1645,7 +1662,7 @@ function Gt(e) {
|
|
|
1645
1662
|
document.addEventListener("keydown", d, !0), n.addEventListener("click", (l) => {
|
|
1646
1663
|
var g;
|
|
1647
1664
|
const p = (g = l.target.closest("[data-action]")) == null ? void 0 : g.getAttribute("data-action");
|
|
1648
|
-
if (p === "cancel" && c({ cancelled: "pin" }), p === "save") {
|
|
1665
|
+
if (p && (l.stopPropagation(), p === "cancel" && c({ cancelled: "pin" }), p === "save")) {
|
|
1649
1666
|
const u = s.value.trim();
|
|
1650
1667
|
c({ ...u ? { note: u } : {}, cancelled: !1 });
|
|
1651
1668
|
}
|
|
@@ -1658,12 +1675,12 @@ function Gt(e) {
|
|
|
1658
1675
|
});
|
|
1659
1676
|
});
|
|
1660
1677
|
}
|
|
1661
|
-
const
|
|
1662
|
-
function
|
|
1678
|
+
const Zt = "#0ea5e9";
|
|
1679
|
+
function Qt(e, t) {
|
|
1663
1680
|
return /^#[0-9a-fA-F]{6}$/.test(e) ? `${e}${t}` : e;
|
|
1664
1681
|
}
|
|
1665
|
-
function
|
|
1666
|
-
const { shadowRoot: t, onHover: n } = e, o = e.accent ??
|
|
1682
|
+
function en(e) {
|
|
1683
|
+
const { shadowRoot: t, onHover: n } = e, o = e.accent ?? Zt, a = Qt(o, "14"), r = document.createElement("div");
|
|
1667
1684
|
r.style.cssText = [
|
|
1668
1685
|
"position: fixed",
|
|
1669
1686
|
"pointer-events: none",
|
|
@@ -1693,64 +1710,76 @@ function Qt(e) {
|
|
|
1693
1710
|
document.body.style.cursor = "crosshair";
|
|
1694
1711
|
let c = !1, d = () => {
|
|
1695
1712
|
};
|
|
1696
|
-
const l = new Promise((
|
|
1697
|
-
d =
|
|
1713
|
+
const l = new Promise((b) => {
|
|
1714
|
+
d = b;
|
|
1698
1715
|
});
|
|
1699
|
-
function m(
|
|
1700
|
-
if (!
|
|
1701
|
-
let
|
|
1702
|
-
for (;
|
|
1703
|
-
if (
|
|
1704
|
-
|
|
1716
|
+
function m(b) {
|
|
1717
|
+
if (!b || !(b instanceof Node)) return !1;
|
|
1718
|
+
let x = b;
|
|
1719
|
+
for (; x; ) {
|
|
1720
|
+
if (x === t || x === t.host) return !0;
|
|
1721
|
+
x = x.parentNode ?? x.host ?? null;
|
|
1705
1722
|
}
|
|
1706
1723
|
return !1;
|
|
1707
1724
|
}
|
|
1708
|
-
function p(
|
|
1725
|
+
function p(b) {
|
|
1726
|
+
return b.tagName.includes("-");
|
|
1727
|
+
}
|
|
1728
|
+
function g(b, x) {
|
|
1729
|
+
var C, k;
|
|
1709
1730
|
r.style.display = "none", i.style.display = "none";
|
|
1710
|
-
const
|
|
1731
|
+
const A = document.elementsFromPoint(b, x);
|
|
1711
1732
|
r.style.display = "block", i.style.display = "block";
|
|
1712
|
-
for (const
|
|
1713
|
-
if (
|
|
1733
|
+
for (const T of A) {
|
|
1734
|
+
if (m(T)) continue;
|
|
1735
|
+
let y = T, L = 16;
|
|
1736
|
+
for (; y.shadowRoot && !p(y) && L-- > 0; ) {
|
|
1737
|
+
const M = (((k = (C = y.shadowRoot).elementsFromPoint) == null ? void 0 : k.call(C, b, x)) ?? []).find((O) => !m(O) && O !== y);
|
|
1738
|
+
if (!M) break;
|
|
1739
|
+
y = M;
|
|
1740
|
+
}
|
|
1741
|
+
return y;
|
|
1742
|
+
}
|
|
1714
1743
|
return null;
|
|
1715
1744
|
}
|
|
1716
|
-
function
|
|
1717
|
-
const
|
|
1718
|
-
r.style.left = `${
|
|
1719
|
-
const
|
|
1720
|
-
i.textContent =
|
|
1721
|
-
const
|
|
1722
|
-
i.style.left = `${
|
|
1723
|
-
}
|
|
1724
|
-
function
|
|
1725
|
-
const
|
|
1726
|
-
|
|
1727
|
-
}
|
|
1728
|
-
function
|
|
1729
|
-
if (
|
|
1730
|
-
|
|
1731
|
-
const
|
|
1732
|
-
|
|
1733
|
-
}
|
|
1734
|
-
function
|
|
1735
|
-
|
|
1736
|
-
}
|
|
1737
|
-
function b
|
|
1738
|
-
|
|
1739
|
-
}
|
|
1740
|
-
function
|
|
1741
|
-
c || (c = !0, document.removeEventListener("mousemove",
|
|
1742
|
-
}
|
|
1743
|
-
return document.addEventListener("mousemove",
|
|
1744
|
-
cancel: () =>
|
|
1745
|
+
function u(b) {
|
|
1746
|
+
const x = b.getBoundingClientRect();
|
|
1747
|
+
r.style.left = `${x.left}px`, r.style.top = `${x.top}px`, r.style.width = `${x.width}px`, r.style.height = `${x.height}px`;
|
|
1748
|
+
const A = b.tagName.toLowerCase(), C = b.classList.length > 0 ? "." + Array.from(b.classList).slice(0, 2).join(".") : "";
|
|
1749
|
+
i.textContent = A + C;
|
|
1750
|
+
const k = x.top - 22;
|
|
1751
|
+
i.style.left = `${x.left}px`, i.style.top = `${k >= 0 ? k : x.bottom + 4}px`;
|
|
1752
|
+
}
|
|
1753
|
+
function v(b) {
|
|
1754
|
+
const x = g(b.clientX, b.clientY);
|
|
1755
|
+
x ? (u(x), n == null || n(x)) : (r.style.display = "none", i.style.display = "none", n == null || n(null));
|
|
1756
|
+
}
|
|
1757
|
+
function S(b) {
|
|
1758
|
+
if (b.button !== 0) return;
|
|
1759
|
+
b.preventDefault(), b.stopPropagation();
|
|
1760
|
+
const x = g(b.clientX, b.clientY);
|
|
1761
|
+
x && E(x);
|
|
1762
|
+
}
|
|
1763
|
+
function h(b) {
|
|
1764
|
+
b.preventDefault(), b.stopPropagation();
|
|
1765
|
+
}
|
|
1766
|
+
function f(b) {
|
|
1767
|
+
b.key === "Escape" && (b.preventDefault(), E(null));
|
|
1768
|
+
}
|
|
1769
|
+
function E(b) {
|
|
1770
|
+
c || (c = !0, document.removeEventListener("mousemove", v, !0), document.removeEventListener("pointerdown", S, !0), document.removeEventListener("click", h, !0), document.removeEventListener("mouseup", h, !0), document.removeEventListener("keydown", f, !0), r.remove(), i.remove(), document.body.style.cursor = s, d(b));
|
|
1771
|
+
}
|
|
1772
|
+
return document.addEventListener("mousemove", v, !0), document.addEventListener("pointerdown", S, !0), document.addEventListener("click", h, !0), document.addEventListener("mouseup", h, !0), document.addEventListener("keydown", f, !0), {
|
|
1773
|
+
cancel: () => E(null),
|
|
1745
1774
|
promise: l
|
|
1746
1775
|
};
|
|
1747
1776
|
}
|
|
1748
|
-
let
|
|
1749
|
-
async function
|
|
1750
|
-
return
|
|
1777
|
+
let X = null;
|
|
1778
|
+
async function tn() {
|
|
1779
|
+
return X || (X = await import("./index-DAIDnjfR.mjs")), X;
|
|
1751
1780
|
}
|
|
1752
|
-
const
|
|
1753
|
-
function
|
|
1781
|
+
const q = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkAAIAAAoAAv/lxKUAAAAASUVORK5CYII=";
|
|
1782
|
+
function ge(e, t) {
|
|
1754
1783
|
if (!e || e.startsWith("data:") || e.startsWith("blob:") || e.startsWith("/") || e.startsWith("#")) return !0;
|
|
1755
1784
|
try {
|
|
1756
1785
|
if (new URL(e, window.location.href).origin === window.location.origin) return !0;
|
|
@@ -1759,20 +1788,20 @@ function be(e, t) {
|
|
|
1759
1788
|
}
|
|
1760
1789
|
return t === "anonymous" || t === "use-credentials";
|
|
1761
1790
|
}
|
|
1762
|
-
function
|
|
1791
|
+
function nn() {
|
|
1763
1792
|
const e = [], t = [];
|
|
1764
1793
|
return document.querySelectorAll("img").forEach((n) => {
|
|
1765
|
-
|
|
1794
|
+
ge(n.src, n.crossOrigin) || (e.push({ el: n, src: n.src }), n.src = q);
|
|
1766
1795
|
}), document.querySelectorAll("image").forEach((n) => {
|
|
1767
1796
|
const o = n, a = o.getAttribute("href"), r = o.getAttributeNS("http://www.w3.org/1999/xlink", "href"), i = a || r || "";
|
|
1768
|
-
i && !
|
|
1797
|
+
i && !ge(i) && (t.push({ el: o, href: a, xlink: r }), a !== null && o.setAttribute("href", q), r !== null && o.setAttributeNS("http://www.w3.org/1999/xlink", "href", q));
|
|
1769
1798
|
}), () => {
|
|
1770
1799
|
for (const { el: n, src: o } of e) n.src = o;
|
|
1771
1800
|
for (const { el: n, href: o, xlink: a } of t)
|
|
1772
1801
|
o !== null && n.setAttribute("href", o), a !== null && n.setAttributeNS("http://www.w3.org/1999/xlink", "href", a);
|
|
1773
1802
|
};
|
|
1774
1803
|
}
|
|
1775
|
-
function
|
|
1804
|
+
function on() {
|
|
1776
1805
|
const e = [];
|
|
1777
1806
|
document.querySelectorAll("*").forEach((r) => {
|
|
1778
1807
|
const i = getComputedStyle(r), s = (i.overflowY === "auto" || i.overflowY === "scroll") && r.scrollHeight > r.clientHeight, c = (i.overflowX === "auto" || i.overflowX === "scroll") && r.scrollWidth > r.clientWidth;
|
|
@@ -1798,34 +1827,34 @@ function nn() {
|
|
|
1798
1827
|
window.scrollTo(t, n);
|
|
1799
1828
|
};
|
|
1800
1829
|
}
|
|
1801
|
-
let
|
|
1802
|
-
async function
|
|
1803
|
-
const t =
|
|
1830
|
+
let ye = Promise.resolve();
|
|
1831
|
+
async function De(e = {}) {
|
|
1832
|
+
const t = ye;
|
|
1804
1833
|
let n;
|
|
1805
|
-
|
|
1834
|
+
ye = new Promise((o) => {
|
|
1806
1835
|
n = o;
|
|
1807
1836
|
});
|
|
1808
1837
|
try {
|
|
1809
|
-
return await t, await
|
|
1838
|
+
return await t, await rn(e, n);
|
|
1810
1839
|
} catch (o) {
|
|
1811
1840
|
throw n(), o;
|
|
1812
1841
|
}
|
|
1813
1842
|
}
|
|
1814
|
-
async function
|
|
1843
|
+
async function rn(e, t) {
|
|
1815
1844
|
const {
|
|
1816
1845
|
quality: n = 0.7,
|
|
1817
1846
|
pixelRatio: o = Math.min(window.devicePixelRatio || 1, 2),
|
|
1818
1847
|
excludeShadowRoot: a,
|
|
1819
1848
|
excludeHosts: r,
|
|
1820
1849
|
fullPage: i = !0
|
|
1821
|
-
} = e, s = await
|
|
1850
|
+
} = e, s = await tn(), c = a || r != null && r.length ? (g) => {
|
|
1822
1851
|
let u = g;
|
|
1823
1852
|
for (; u; ) {
|
|
1824
1853
|
if (a && u === a.host || r && u instanceof Element && r.includes(u) || u instanceof Element && u.classList.contains("beacon-no-capture")) return !1;
|
|
1825
1854
|
u = u.parentNode;
|
|
1826
1855
|
}
|
|
1827
1856
|
return !0;
|
|
1828
|
-
} : void 0, d =
|
|
1857
|
+
} : void 0, d = nn(), l = i ? on() : () => {
|
|
1829
1858
|
};
|
|
1830
1859
|
let m = !1;
|
|
1831
1860
|
const p = () => {
|
|
@@ -1843,14 +1872,14 @@ async function on(e, t) {
|
|
|
1843
1872
|
}
|
|
1844
1873
|
};
|
|
1845
1874
|
try {
|
|
1846
|
-
i && await new Promise((
|
|
1875
|
+
i && await new Promise((h) => requestAnimationFrame(() => h()));
|
|
1847
1876
|
const g = document.documentElement, u = i ? Math.max(g.scrollWidth, window.innerWidth) : window.innerWidth, v = i ? Math.max(g.scrollHeight, window.innerHeight) : window.innerHeight;
|
|
1848
1877
|
return { dataUrl: await s.toJpeg(g, {
|
|
1849
1878
|
quality: n,
|
|
1850
1879
|
pixelRatio: o,
|
|
1851
1880
|
cacheBust: !0,
|
|
1852
1881
|
...c ? { filter: c } : {},
|
|
1853
|
-
imagePlaceholder:
|
|
1882
|
+
imagePlaceholder: q,
|
|
1854
1883
|
width: u,
|
|
1855
1884
|
height: v,
|
|
1856
1885
|
style: { transform: "none" }
|
|
@@ -1859,19 +1888,19 @@ async function on(e, t) {
|
|
|
1859
1888
|
throw p(), g;
|
|
1860
1889
|
}
|
|
1861
1890
|
}
|
|
1862
|
-
let
|
|
1863
|
-
function
|
|
1864
|
-
|
|
1891
|
+
let ee = null;
|
|
1892
|
+
function an(e) {
|
|
1893
|
+
ee = e;
|
|
1865
1894
|
}
|
|
1866
|
-
function
|
|
1867
|
-
return
|
|
1895
|
+
function sn() {
|
|
1896
|
+
return ee;
|
|
1868
1897
|
}
|
|
1869
1898
|
function R() {
|
|
1870
|
-
|
|
1899
|
+
ee = null;
|
|
1871
1900
|
}
|
|
1872
|
-
const
|
|
1873
|
-
function
|
|
1874
|
-
const e = document.createElementNS(
|
|
1901
|
+
const ve = "http://www.w3.org/2000/svg";
|
|
1902
|
+
function cn() {
|
|
1903
|
+
const e = document.createElementNS(ve, "svg");
|
|
1875
1904
|
e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("aria-hidden", "true");
|
|
1876
1905
|
const t = [
|
|
1877
1906
|
"M3 6h18",
|
|
@@ -1879,16 +1908,16 @@ function sn() {
|
|
|
1879
1908
|
"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
|
|
1880
1909
|
];
|
|
1881
1910
|
for (const n of t) {
|
|
1882
|
-
const o = document.createElementNS(
|
|
1911
|
+
const o = document.createElementNS(ve, "path");
|
|
1883
1912
|
o.setAttribute("d", n), e.appendChild(o);
|
|
1884
1913
|
}
|
|
1885
1914
|
return e;
|
|
1886
1915
|
}
|
|
1887
|
-
function
|
|
1916
|
+
function ln(e = {}) {
|
|
1888
1917
|
const t = e.maxPins ?? 20;
|
|
1889
1918
|
let n = [], o = /* @__PURE__ */ new WeakMap(), a = null, r = 0, i = null, s = null, c = null, d = null;
|
|
1890
1919
|
function l() {
|
|
1891
|
-
n = [], o = /* @__PURE__ */ new WeakMap(), a = null, r += 1, R(),
|
|
1920
|
+
n = [], o = /* @__PURE__ */ new WeakMap(), a = null, r += 1, R(), S(), h();
|
|
1892
1921
|
}
|
|
1893
1922
|
function m() {
|
|
1894
1923
|
const f = document.querySelector("launch-kit-beacon");
|
|
@@ -1901,104 +1930,104 @@ function cn(e = {}) {
|
|
|
1901
1930
|
return f && getComputedStyle(f).getPropertyValue("--beacon-accent").trim() || "#0ea5e9";
|
|
1902
1931
|
}
|
|
1903
1932
|
async function g(f) {
|
|
1904
|
-
const
|
|
1905
|
-
if (!
|
|
1906
|
-
const
|
|
1907
|
-
for (const
|
|
1908
|
-
const
|
|
1909
|
-
|
|
1910
|
-
target:
|
|
1911
|
-
selector:
|
|
1912
|
-
fallbackRect:
|
|
1933
|
+
const E = m();
|
|
1934
|
+
if (!E) return;
|
|
1935
|
+
const b = p(), x = await f.requestMode("pickElement"), A = Xt({ accent: b });
|
|
1936
|
+
for (const C of n) {
|
|
1937
|
+
const k = o.get(C);
|
|
1938
|
+
k && A.addPin(C.number, {
|
|
1939
|
+
target: k,
|
|
1940
|
+
selector: C.selector,
|
|
1941
|
+
fallbackRect: C.boundingRect
|
|
1913
1942
|
});
|
|
1914
1943
|
}
|
|
1915
1944
|
try {
|
|
1916
|
-
let
|
|
1917
|
-
for (;
|
|
1918
|
-
const
|
|
1919
|
-
if (!
|
|
1920
|
-
const
|
|
1921
|
-
anchor: { x:
|
|
1945
|
+
let C = !0;
|
|
1946
|
+
for (; C && !(n.length >= t); ) {
|
|
1947
|
+
const T = await en({ shadowRoot: E, accent: b }).promise;
|
|
1948
|
+
if (!T) break;
|
|
1949
|
+
const y = T.getBoundingClientRect(), L = await Jt({
|
|
1950
|
+
anchor: { x: y.left, y: y.bottom },
|
|
1922
1951
|
pinNumber: n.length + 1
|
|
1923
1952
|
});
|
|
1924
1953
|
if (L.cancelled === "all") {
|
|
1925
|
-
|
|
1954
|
+
C = !1;
|
|
1926
1955
|
break;
|
|
1927
1956
|
}
|
|
1928
1957
|
if (L.cancelled === "pin") continue;
|
|
1929
|
-
const
|
|
1958
|
+
const I = Ot(T), M = {
|
|
1930
1959
|
number: n.length + 1,
|
|
1931
|
-
...
|
|
1960
|
+
...I,
|
|
1932
1961
|
...L.note ? { note: L.note } : {}
|
|
1933
1962
|
};
|
|
1934
|
-
n.push(
|
|
1935
|
-
target:
|
|
1936
|
-
selector:
|
|
1937
|
-
fallbackRect:
|
|
1963
|
+
n.push(M), o.set(M, T), A.addPin(M.number, {
|
|
1964
|
+
target: T,
|
|
1965
|
+
selector: I.selector,
|
|
1966
|
+
fallbackRect: I.boundingRect
|
|
1938
1967
|
});
|
|
1939
1968
|
}
|
|
1940
|
-
n.length > 0 ? (
|
|
1969
|
+
n.length > 0 ? (A.setLoading("Capturing screenshot…"), await new Promise((k) => requestAnimationFrame(() => k())), await u()) : (a = null, R());
|
|
1941
1970
|
} finally {
|
|
1942
|
-
|
|
1971
|
+
A.destroy(), x();
|
|
1943
1972
|
}
|
|
1944
|
-
|
|
1973
|
+
S(), h();
|
|
1945
1974
|
}
|
|
1946
1975
|
async function u() {
|
|
1947
1976
|
const f = ++r;
|
|
1948
1977
|
if (n.length === 0) {
|
|
1949
|
-
a = null, R(),
|
|
1978
|
+
a = null, R(), h();
|
|
1950
1979
|
return;
|
|
1951
1980
|
}
|
|
1952
|
-
const
|
|
1981
|
+
const E = p();
|
|
1953
1982
|
try {
|
|
1954
|
-
const
|
|
1983
|
+
const b = Array.from(document.querySelectorAll("launch-kit-beacon")), x = await De({ excludeHosts: b });
|
|
1955
1984
|
try {
|
|
1956
1985
|
if (f !== r) return;
|
|
1957
|
-
const
|
|
1958
|
-
number:
|
|
1959
|
-
selector:
|
|
1960
|
-
boundingRect:
|
|
1961
|
-
...o.get(
|
|
1962
|
-
})),
|
|
1986
|
+
const A = n.map((T) => ({
|
|
1987
|
+
number: T.number,
|
|
1988
|
+
selector: T.selector,
|
|
1989
|
+
boundingRect: T.boundingRect,
|
|
1990
|
+
...o.get(T) ? { liveElement: o.get(T) } : {}
|
|
1991
|
+
})), C = { w: x.width, h: x.height, dpr: x.pixelRatio }, k = await _e(x.dataUrl, A, C, E);
|
|
1963
1992
|
if (f !== r) return;
|
|
1964
|
-
a =
|
|
1993
|
+
a = k, an({ dataUrl: k, mime: "image/jpeg" });
|
|
1965
1994
|
} finally {
|
|
1966
|
-
|
|
1995
|
+
x.dispose();
|
|
1967
1996
|
}
|
|
1968
1997
|
} catch {
|
|
1969
1998
|
if (f !== r) return;
|
|
1970
1999
|
a = null, R();
|
|
1971
2000
|
}
|
|
1972
|
-
f === r &&
|
|
2001
|
+
f === r && h();
|
|
1973
2002
|
}
|
|
1974
2003
|
function v(f) {
|
|
1975
|
-
const
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
}), a = null, R(),
|
|
2004
|
+
const E = n.findIndex((b) => b.number === f);
|
|
2005
|
+
E !== -1 && (n.splice(E, 1), n.forEach((b, x) => {
|
|
2006
|
+
b.number = x + 1;
|
|
2007
|
+
}), a = null, R(), S(), h(), u());
|
|
1979
2008
|
}
|
|
1980
|
-
function
|
|
2009
|
+
function S() {
|
|
1981
2010
|
if (i && (i.textContent = `Pins (${n.length})`, i.style.display = n.length === 0 ? "none" : ""), d && (d.textContent = n.length === 0 ? "Annotate elements" : "Add another pin"), !!s) {
|
|
1982
2011
|
s.innerHTML = "", s.style.display = n.length === 0 ? "none" : "";
|
|
1983
2012
|
for (const f of n) {
|
|
1984
|
-
const
|
|
1985
|
-
|
|
1986
|
-
const
|
|
1987
|
-
|
|
1988
|
-
const
|
|
1989
|
-
|
|
1990
|
-
const
|
|
1991
|
-
|
|
1992
|
-
const
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
}),
|
|
1996
|
-
const
|
|
1997
|
-
|
|
2013
|
+
const E = document.createElement("div");
|
|
2014
|
+
E.className = "beacon-pin-item", E.dataset.pin = String(f.number);
|
|
2015
|
+
const b = document.createElement("span");
|
|
2016
|
+
b.className = "beacon-pin-num", b.textContent = String(f.number);
|
|
2017
|
+
const x = document.createElement("div");
|
|
2018
|
+
x.className = "beacon-pin-meta";
|
|
2019
|
+
const A = document.createElement("div");
|
|
2020
|
+
A.className = "beacon-pin-selector", A.title = f.selector, A.textContent = f.selector || f.tagName;
|
|
2021
|
+
const C = document.createElement("input");
|
|
2022
|
+
C.type = "text", C.className = "beacon-pin-note-input", C.placeholder = "Add a note (optional)", C.value = f.note ?? "", C.addEventListener("input", () => {
|
|
2023
|
+
C.value.trim() ? f.note = C.value : delete f.note;
|
|
2024
|
+
}), x.appendChild(A), x.appendChild(C);
|
|
2025
|
+
const k = document.createElement("button");
|
|
2026
|
+
k.type = "button", k.className = "beacon-icon-btn", k.setAttribute("aria-label", `Remove pin ${f.number}`), k.appendChild(cn()), k.addEventListener("click", () => v(f.number)), E.appendChild(b), E.appendChild(x), E.appendChild(k), s.appendChild(E);
|
|
1998
2027
|
}
|
|
1999
2028
|
}
|
|
2000
2029
|
}
|
|
2001
|
-
function
|
|
2030
|
+
function h() {
|
|
2002
2031
|
c && (a ? (c.src = a, c.style.display = "block") : (c.removeAttribute("src"), c.style.display = "none"));
|
|
2003
2032
|
}
|
|
2004
2033
|
return {
|
|
@@ -2008,9 +2037,9 @@ function cn(e = {}) {
|
|
|
2008
2037
|
},
|
|
2009
2038
|
form(f) {
|
|
2010
2039
|
return {
|
|
2011
|
-
render: (
|
|
2040
|
+
render: (E) => (i = document.createElement("div"), i.className = "beacon-pin-list-header", E.appendChild(i), s = document.createElement("div"), s.className = "beacon-pin-list", E.appendChild(s), d = document.createElement("button"), d.type = "button", d.className = "beacon-btn secondary beacon-pin-annotate", d.addEventListener("click", () => {
|
|
2012
2041
|
g(f);
|
|
2013
|
-
}),
|
|
2042
|
+
}), E.appendChild(d), c = document.createElement("img"), c.className = "beacon-thumb", c.alt = "Annotated screenshot preview", c.style.display = "none", E.appendChild(c), S(), h(), () => {
|
|
2014
2043
|
i = null, s = null, c = null, d = null;
|
|
2015
2044
|
})
|
|
2016
2045
|
};
|
|
@@ -2020,27 +2049,27 @@ function cn(e = {}) {
|
|
|
2020
2049
|
}
|
|
2021
2050
|
};
|
|
2022
2051
|
}
|
|
2023
|
-
function
|
|
2052
|
+
function dn(e) {
|
|
2024
2053
|
return !!e && typeof e == "object" && !("v" in e) && "error" in e;
|
|
2025
2054
|
}
|
|
2026
|
-
function
|
|
2055
|
+
function un(e = {}) {
|
|
2027
2056
|
return {
|
|
2028
2057
|
name: "domSS",
|
|
2029
2058
|
async capture(t) {
|
|
2030
|
-
const n =
|
|
2059
|
+
const n = sn();
|
|
2031
2060
|
if (n)
|
|
2032
2061
|
return { dataUrl: n.dataUrl, mime: n.mime };
|
|
2033
2062
|
const o = await t.requestMode("hide");
|
|
2034
2063
|
try {
|
|
2035
2064
|
await new Promise((i) => requestAnimationFrame(() => i()));
|
|
2036
|
-
const a = Array.from(document.querySelectorAll("launch-kit-beacon")), r = await
|
|
2065
|
+
const a = Array.from(document.querySelectorAll("launch-kit-beacon")), r = await De({
|
|
2037
2066
|
quality: e.quality,
|
|
2038
2067
|
pixelRatio: e.pixelRatio,
|
|
2039
2068
|
excludeHosts: a
|
|
2040
2069
|
});
|
|
2041
2070
|
try {
|
|
2042
|
-
const i = t.captured("domEle"), s =
|
|
2043
|
-
return { dataUrl: s.length > 0 ? await
|
|
2071
|
+
const i = t.captured("domEle"), s = pn(i), c = { w: r.width, h: r.height, dpr: r.pixelRatio }, d = e.accent ?? fn();
|
|
2072
|
+
return { dataUrl: s.length > 0 ? await _e(r.dataUrl, s, c, d) : r.dataUrl, mime: "image/jpeg" };
|
|
2044
2073
|
} finally {
|
|
2045
2074
|
r.dispose();
|
|
2046
2075
|
}
|
|
@@ -2050,8 +2079,8 @@ function dn(e = {}) {
|
|
|
2050
2079
|
}
|
|
2051
2080
|
};
|
|
2052
2081
|
}
|
|
2053
|
-
function
|
|
2054
|
-
if (!e ||
|
|
2082
|
+
function pn(e) {
|
|
2083
|
+
if (!e || dn(e)) return [];
|
|
2055
2084
|
const t = e.pins;
|
|
2056
2085
|
return Array.isArray(t) ? t.filter((n) => !!n && typeof n == "object").map((n) => ({
|
|
2057
2086
|
number: Number(n.number) || 0,
|
|
@@ -2059,17 +2088,17 @@ function un(e) {
|
|
|
2059
2088
|
boundingRect: n.boundingRect ?? { x: 0, y: 0, w: 0, h: 0 }
|
|
2060
2089
|
})) : [];
|
|
2061
2090
|
}
|
|
2062
|
-
function
|
|
2091
|
+
function fn() {
|
|
2063
2092
|
if (typeof window > "u") return "#0ea5e9";
|
|
2064
2093
|
const e = document.querySelector("launch-kit-beacon");
|
|
2065
2094
|
return e && getComputedStyle(e).getPropertyValue("--beacon-accent").trim() || "#0ea5e9";
|
|
2066
2095
|
}
|
|
2067
|
-
const
|
|
2068
|
-
function
|
|
2069
|
-
const t = e.accent ??
|
|
2070
|
-
o.className = `${
|
|
2096
|
+
const xe = "beacon-no-capture", we = "__lsBeaconMonitorChipPos", mn = "#10b981";
|
|
2097
|
+
function hn(e) {
|
|
2098
|
+
const t = e.accent ?? mn, n = e.startedAt ?? Date.now(), o = document.createElement("div");
|
|
2099
|
+
o.className = `${xe} beacon-monitor-overlay-frame`, o.setAttribute("aria-hidden", "true"), o.style.setProperty("--beacon-monitor-accent", t), document.body.appendChild(o);
|
|
2071
2100
|
const a = document.createElement("div");
|
|
2072
|
-
a.className = `${
|
|
2101
|
+
a.className = `${xe} beacon-monitor-overlay-chip`, a.setAttribute("role", "status"), a.setAttribute("aria-label", "Recording — drag to move"), a.style.setProperty("--beacon-monitor-accent", t);
|
|
2073
2102
|
const r = document.createElement("div");
|
|
2074
2103
|
r.className = "beacon-monitor-overlay-chip-row";
|
|
2075
2104
|
const i = document.createElement("span");
|
|
@@ -2085,13 +2114,13 @@ function mn(e) {
|
|
|
2085
2114
|
const m = document.createElement("div");
|
|
2086
2115
|
m.className = "beacon-monitor-overlay-url", e.url ? (m.textContent = e.url, m.title = e.url) : m.style.display = "none", a.appendChild(m), document.body.appendChild(a);
|
|
2087
2116
|
const p = g() ?? u();
|
|
2088
|
-
|
|
2117
|
+
S(v(p));
|
|
2089
2118
|
function g() {
|
|
2090
2119
|
try {
|
|
2091
|
-
const
|
|
2092
|
-
if (!
|
|
2093
|
-
const L = JSON.parse(
|
|
2094
|
-
return !Number.isFinite(
|
|
2120
|
+
const y = localStorage.getItem(we);
|
|
2121
|
+
if (!y) return null;
|
|
2122
|
+
const L = JSON.parse(y), I = typeof L.x == "number" ? L.x : NaN, M = typeof L.y == "number" ? L.y : NaN;
|
|
2123
|
+
return !Number.isFinite(I) || !Number.isFinite(M) ? null : { x: I, y: M };
|
|
2095
2124
|
} catch {
|
|
2096
2125
|
return null;
|
|
2097
2126
|
}
|
|
@@ -2100,79 +2129,79 @@ function mn(e) {
|
|
|
2100
2129
|
const L = a.getBoundingClientRect().width || 200;
|
|
2101
2130
|
return { x: Math.max(8, Math.floor((window.innerWidth - L) / 2)), y: 16 };
|
|
2102
2131
|
}
|
|
2103
|
-
function v(
|
|
2104
|
-
const
|
|
2132
|
+
function v(y) {
|
|
2133
|
+
const I = a.getBoundingClientRect(), M = I.width || 200, O = I.height || 40, We = Math.max(8, window.innerWidth - M - 8), Ye = Math.max(8, window.innerHeight - O - 8);
|
|
2105
2134
|
return {
|
|
2106
|
-
x: Math.min(Math.max(8,
|
|
2107
|
-
y: Math.min(Math.max(8,
|
|
2135
|
+
x: Math.min(Math.max(8, y.x), We),
|
|
2136
|
+
y: Math.min(Math.max(8, y.y), Ye)
|
|
2108
2137
|
};
|
|
2109
2138
|
}
|
|
2110
|
-
function
|
|
2111
|
-
a.style.left = `${
|
|
2139
|
+
function S(y) {
|
|
2140
|
+
a.style.left = `${y.x}px`, a.style.top = `${y.y}px`;
|
|
2112
2141
|
}
|
|
2113
|
-
let
|
|
2114
|
-
function y
|
|
2115
|
-
if (
|
|
2116
|
-
|
|
2142
|
+
let h = !1, f = null, E = { x: 0, y: 0 };
|
|
2143
|
+
function b(y) {
|
|
2144
|
+
if (y.target instanceof Element && y.target.closest(".beacon-monitor-overlay-stop")) return;
|
|
2145
|
+
y.preventDefault(), h = !0, f = y.pointerId;
|
|
2117
2146
|
try {
|
|
2118
|
-
a.setPointerCapture(
|
|
2147
|
+
a.setPointerCapture(y.pointerId);
|
|
2119
2148
|
} catch {
|
|
2120
2149
|
}
|
|
2121
2150
|
a.setAttribute("data-dragging", "true");
|
|
2122
2151
|
const L = a.getBoundingClientRect();
|
|
2123
|
-
|
|
2152
|
+
E = { x: y.clientX - L.left, y: y.clientY - L.top };
|
|
2124
2153
|
}
|
|
2125
|
-
function
|
|
2126
|
-
!
|
|
2154
|
+
function x(y) {
|
|
2155
|
+
!h || y.pointerId !== f || S(v({ x: y.clientX - E.x, y: y.clientY - E.y }));
|
|
2127
2156
|
}
|
|
2128
|
-
function
|
|
2129
|
-
if (!
|
|
2130
|
-
|
|
2157
|
+
function A(y) {
|
|
2158
|
+
if (!h || y.pointerId !== f) return;
|
|
2159
|
+
h = !1, f = null, a.removeAttribute("data-dragging");
|
|
2131
2160
|
try {
|
|
2132
|
-
a.releasePointerCapture(
|
|
2161
|
+
a.releasePointerCapture(y.pointerId);
|
|
2133
2162
|
} catch {
|
|
2134
2163
|
}
|
|
2135
2164
|
const L = a.getBoundingClientRect();
|
|
2136
2165
|
try {
|
|
2137
|
-
localStorage.setItem(
|
|
2166
|
+
localStorage.setItem(we, JSON.stringify({ x: L.left, y: L.top }));
|
|
2138
2167
|
} catch {
|
|
2139
2168
|
}
|
|
2140
2169
|
}
|
|
2141
|
-
a.addEventListener("pointerdown",
|
|
2142
|
-
|
|
2170
|
+
a.addEventListener("pointerdown", b), a.addEventListener("pointermove", x), a.addEventListener("pointerup", A), a.addEventListener("pointercancel", A), l.addEventListener("click", (y) => {
|
|
2171
|
+
y.stopPropagation(), e.onStop();
|
|
2143
2172
|
});
|
|
2144
|
-
function
|
|
2145
|
-
const
|
|
2146
|
-
|
|
2173
|
+
function C() {
|
|
2174
|
+
const y = a.getBoundingClientRect();
|
|
2175
|
+
S(v({ x: y.left, y: y.top }));
|
|
2147
2176
|
}
|
|
2148
|
-
window.addEventListener("resize",
|
|
2149
|
-
function
|
|
2150
|
-
const
|
|
2151
|
-
d.textContent =
|
|
2177
|
+
window.addEventListener("resize", C);
|
|
2178
|
+
function k() {
|
|
2179
|
+
const y = Math.max(0, Math.floor((Date.now() - n) / 1e3));
|
|
2180
|
+
d.textContent = bn(y);
|
|
2152
2181
|
}
|
|
2153
|
-
|
|
2154
|
-
const
|
|
2182
|
+
k();
|
|
2183
|
+
const T = window.setInterval(k, 1e3);
|
|
2155
2184
|
return {
|
|
2156
|
-
updateUrl(
|
|
2157
|
-
|
|
2185
|
+
updateUrl(y) {
|
|
2186
|
+
y ? (m.textContent = y, m.title = y, m.style.display = "") : m.style.display = "none";
|
|
2158
2187
|
},
|
|
2159
2188
|
destroy() {
|
|
2160
|
-
window.clearInterval(
|
|
2189
|
+
window.clearInterval(T), window.removeEventListener("resize", C), a.removeEventListener("pointerdown", b), a.removeEventListener("pointermove", x), a.removeEventListener("pointerup", A), a.removeEventListener("pointercancel", A), o.remove(), a.remove();
|
|
2161
2190
|
}
|
|
2162
2191
|
};
|
|
2163
2192
|
}
|
|
2164
|
-
function
|
|
2193
|
+
function bn(e) {
|
|
2165
2194
|
const t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), o = e % 60;
|
|
2166
2195
|
return t > 0 ? `${$(t)}:${$(n)}:${$(o)}` : `${$(n)}:${$(o)}`;
|
|
2167
2196
|
}
|
|
2168
2197
|
function $(e) {
|
|
2169
2198
|
return e < 10 ? `0${e}` : String(e);
|
|
2170
2199
|
}
|
|
2171
|
-
const
|
|
2172
|
-
function
|
|
2200
|
+
const H = 80, gn = 'button, a, input[type="submit"], input[type="button"], [role="button"], [role="link"], [role="menuitem"], [role="tab"], [role="option"]', yn = 1024, vn = 5;
|
|
2201
|
+
function xn(e, t) {
|
|
2173
2202
|
return e.length > t ? e.slice(0, t) : e;
|
|
2174
2203
|
}
|
|
2175
|
-
function
|
|
2204
|
+
function te(e) {
|
|
2176
2205
|
if (e.id) return `#${CSS.escape(e.id)}`;
|
|
2177
2206
|
const t = [];
|
|
2178
2207
|
let n = e;
|
|
@@ -2183,25 +2212,25 @@ function ee(e) {
|
|
|
2183
2212
|
}
|
|
2184
2213
|
return t.join(" > ");
|
|
2185
2214
|
}
|
|
2186
|
-
function
|
|
2215
|
+
function U(e, t) {
|
|
2187
2216
|
if (!e) return;
|
|
2188
2217
|
const n = e.replace(/\s+/g, " ").trim();
|
|
2189
2218
|
if (n)
|
|
2190
2219
|
return n.length > t ? n.slice(0, t) : n;
|
|
2191
2220
|
}
|
|
2192
|
-
function
|
|
2193
|
-
const t =
|
|
2221
|
+
function Ee(e) {
|
|
2222
|
+
const t = U(e.textContent, H), n = U(e.getAttribute("aria-label"), H), o = e.getAttribute("data-testid") || void 0, a = e.getAttribute("name") || void 0;
|
|
2194
2223
|
let r = n || t;
|
|
2195
2224
|
if (!r) {
|
|
2196
|
-
const i = e.closest(
|
|
2197
|
-
i && i !== e && (r =
|
|
2225
|
+
const i = e.closest(gn);
|
|
2226
|
+
i && i !== e && (r = U(i.getAttribute("aria-label"), H) || U(i.textContent, H));
|
|
2198
2227
|
}
|
|
2199
2228
|
return {
|
|
2200
2229
|
tag: e.tagName.toLowerCase(),
|
|
2201
2230
|
id: e.id || null,
|
|
2202
2231
|
classes: Array.from(e.classList).slice(0, 10),
|
|
2203
2232
|
role: e.getAttribute("role"),
|
|
2204
|
-
selector:
|
|
2233
|
+
selector: te(e),
|
|
2205
2234
|
...t ? { text: t } : {},
|
|
2206
2235
|
...n ? { ariaLabel: n } : {},
|
|
2207
2236
|
...o ? { testid: o } : {},
|
|
@@ -2210,7 +2239,7 @@ function we(e) {
|
|
|
2210
2239
|
...r && r !== t ? { label: r } : {}
|
|
2211
2240
|
};
|
|
2212
2241
|
}
|
|
2213
|
-
function
|
|
2242
|
+
function wn(e, t) {
|
|
2214
2243
|
const n = [], o = document.querySelectorAll("body *");
|
|
2215
2244
|
for (const a of Array.from(o)) {
|
|
2216
2245
|
const r = getComputedStyle(a);
|
|
@@ -2225,18 +2254,18 @@ function xn(e, t) {
|
|
|
2225
2254
|
classes: Array.from(a.classList).slice(0, 5).join(" ")
|
|
2226
2255
|
});
|
|
2227
2256
|
}
|
|
2228
|
-
return n.sort((a, r) => r.zIndex - a.zIndex).slice(0,
|
|
2257
|
+
return n.sort((a, r) => r.zIndex - a.zIndex).slice(0, vn);
|
|
2229
2258
|
}
|
|
2230
|
-
function
|
|
2259
|
+
function En(e) {
|
|
2231
2260
|
const t = (a) => (r) => {
|
|
2232
2261
|
const i = r, s = i.target;
|
|
2233
2262
|
if (!(s instanceof Element)) return;
|
|
2234
|
-
const c = i.clientX, d = i.clientY, l = document.elementFromPoint(c, d), m = l === s || (l ? s.contains(l) || l.contains(s) : !1), p = document.querySelectorAll('[role="dialog"][data-state="open"]').length, g = getComputedStyle(document.body).pointerEvents, u = m ? [] :
|
|
2263
|
+
const c = i.clientX, d = i.clientY, l = document.elementFromPoint(c, d), m = l === s || (l ? s.contains(l) || l.contains(s) : !1), p = document.querySelectorAll('[role="dialog"][data-state="open"]').length, g = getComputedStyle(document.body).pointerEvents, u = m ? [] : wn(c, d);
|
|
2235
2264
|
e.emitClick({
|
|
2236
2265
|
kind: a,
|
|
2237
|
-
target:
|
|
2266
|
+
target: Ee(s),
|
|
2238
2267
|
hitMatchesTarget: m,
|
|
2239
|
-
...!m && l instanceof Element ? { hitTarget:
|
|
2268
|
+
...!m && l instanceof Element ? { hitTarget: Ee(l) } : {},
|
|
2240
2269
|
coords: { x: c, y: d },
|
|
2241
2270
|
openDialogs: p,
|
|
2242
2271
|
bodyPointerEvents: g,
|
|
@@ -2247,7 +2276,7 @@ function wn(e) {
|
|
|
2247
2276
|
document.removeEventListener("click", n, { capture: !0 }), document.removeEventListener("mousedown", o, { capture: !0 });
|
|
2248
2277
|
};
|
|
2249
2278
|
}
|
|
2250
|
-
function
|
|
2279
|
+
function Sn(e) {
|
|
2251
2280
|
const t = history.pushState, n = history.replaceState;
|
|
2252
2281
|
let o = window.location.href;
|
|
2253
2282
|
const a = (s) => {
|
|
@@ -2268,15 +2297,15 @@ function En(e) {
|
|
|
2268
2297
|
history.pushState = t, history.replaceState = n, window.removeEventListener("popstate", r), window.removeEventListener("hashchange", i);
|
|
2269
2298
|
};
|
|
2270
2299
|
}
|
|
2271
|
-
function
|
|
2300
|
+
function Cn(e) {
|
|
2272
2301
|
const t = /* @__PURE__ */ new WeakSet(), n = (a, r) => {
|
|
2273
|
-
const i =
|
|
2302
|
+
const i = te(a);
|
|
2274
2303
|
e.emitDialog({
|
|
2275
2304
|
kind: "dialog",
|
|
2276
2305
|
action: r,
|
|
2277
2306
|
selector: i,
|
|
2278
2307
|
state: a.getAttribute("data-state"),
|
|
2279
|
-
...r === "mount" ? { outerHTML:
|
|
2308
|
+
...r === "mount" ? { outerHTML: xn(a.outerHTML, yn) } : {}
|
|
2280
2309
|
});
|
|
2281
2310
|
};
|
|
2282
2311
|
for (const a of Array.from(document.querySelectorAll('[role="dialog"]')))
|
|
@@ -2306,7 +2335,7 @@ function Sn(e) {
|
|
|
2306
2335
|
attributeFilter: ["data-state"]
|
|
2307
2336
|
}), () => o.disconnect();
|
|
2308
2337
|
}
|
|
2309
|
-
function
|
|
2338
|
+
function kn(e) {
|
|
2310
2339
|
const t = (n) => {
|
|
2311
2340
|
const o = n.target;
|
|
2312
2341
|
if (!(o instanceof HTMLFormElement)) return;
|
|
@@ -2323,60 +2352,60 @@ function Cn(e) {
|
|
|
2323
2352
|
id: o.id || null,
|
|
2324
2353
|
action: o.getAttribute("action") || null,
|
|
2325
2354
|
method: (o.getAttribute("method") || "GET").toUpperCase(),
|
|
2326
|
-
selector:
|
|
2355
|
+
selector: te(o),
|
|
2327
2356
|
fields: a
|
|
2328
2357
|
}
|
|
2329
2358
|
});
|
|
2330
2359
|
};
|
|
2331
2360
|
return document.addEventListener("submit", t, { capture: !0 }), () => document.removeEventListener("submit", t, { capture: !0 });
|
|
2332
2361
|
}
|
|
2333
|
-
function
|
|
2334
|
-
const t =
|
|
2362
|
+
function An(e) {
|
|
2363
|
+
const t = En(e), n = Sn(e), o = Cn(e), a = kn(e);
|
|
2335
2364
|
return {
|
|
2336
2365
|
uninstall() {
|
|
2337
2366
|
t(), n(), o(), a();
|
|
2338
2367
|
}
|
|
2339
2368
|
};
|
|
2340
2369
|
}
|
|
2341
|
-
const
|
|
2370
|
+
const G = 1e3, Se = 10 * 1024, $e = "[REDACTED]", Be = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]), Ln = [
|
|
2342
2371
|
/Bearer\s+[A-Za-z0-9._\-+/=]+/gi,
|
|
2343
2372
|
/\bls_pat_[A-Za-z0-9_]+/g,
|
|
2344
2373
|
// JWT: three dot-separated base64url segments starting with eyJ (the b64
|
|
2345
2374
|
// encoding of the JSON {"). Matches Auth0/Clerk/most providers' tokens.
|
|
2346
2375
|
/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g
|
|
2347
|
-
],
|
|
2348
|
-
function
|
|
2376
|
+
], Tn = /^(password|passwd|secret|token|api[_-]?key|auth|access[_-]?token|refresh[_-]?token|client[_-]?secret|private[_-]?key)$/i;
|
|
2377
|
+
function J(e, t) {
|
|
2349
2378
|
return e.length > t ? e.slice(0, t) : e;
|
|
2350
2379
|
}
|
|
2351
|
-
function
|
|
2380
|
+
function ze(e) {
|
|
2352
2381
|
let t = e;
|
|
2353
|
-
for (const n of
|
|
2354
|
-
t = t.replace(n,
|
|
2382
|
+
for (const n of Ln)
|
|
2383
|
+
t = t.replace(n, $e);
|
|
2355
2384
|
return t;
|
|
2356
2385
|
}
|
|
2357
|
-
function
|
|
2386
|
+
function Z(e) {
|
|
2358
2387
|
if (e === null || typeof e != "object")
|
|
2359
|
-
return typeof e == "string" ?
|
|
2360
|
-
if (Array.isArray(e)) return e.map(
|
|
2388
|
+
return typeof e == "string" ? ze(e) : e;
|
|
2389
|
+
if (Array.isArray(e)) return e.map(Z);
|
|
2361
2390
|
const t = {};
|
|
2362
2391
|
for (const [n, o] of Object.entries(e))
|
|
2363
|
-
t[n] =
|
|
2392
|
+
t[n] = Tn.test(n) ? $e : Z(o);
|
|
2364
2393
|
return t;
|
|
2365
2394
|
}
|
|
2366
|
-
function
|
|
2395
|
+
function Ce(e, t) {
|
|
2367
2396
|
if (t && t.includes("application/json"))
|
|
2368
2397
|
try {
|
|
2369
2398
|
const n = JSON.parse(e);
|
|
2370
|
-
return JSON.stringify(
|
|
2399
|
+
return JSON.stringify(Z(n));
|
|
2371
2400
|
} catch {
|
|
2372
2401
|
}
|
|
2373
|
-
return
|
|
2402
|
+
return ze(e);
|
|
2374
2403
|
}
|
|
2375
|
-
function
|
|
2404
|
+
function F(e, t) {
|
|
2376
2405
|
const n = e.length, o = { bodySize: n };
|
|
2377
|
-
return n >
|
|
2406
|
+
return n > Se ? (o.body = Ce(e.slice(0, Se), t), o.bodyTruncated = !0) : o.body = Ce(e, t), t && (o.contentType = t), o;
|
|
2378
2407
|
}
|
|
2379
|
-
function
|
|
2408
|
+
function Nn(e, t) {
|
|
2380
2409
|
const n = t == null ? void 0 : t.body;
|
|
2381
2410
|
if (n != null) {
|
|
2382
2411
|
if (typeof n == "string") return n;
|
|
@@ -2391,10 +2420,10 @@ function Tn(e, t) {
|
|
|
2391
2420
|
}
|
|
2392
2421
|
return e instanceof Request, null;
|
|
2393
2422
|
}
|
|
2394
|
-
function
|
|
2423
|
+
function Mn(e, t) {
|
|
2395
2424
|
return !!(((o) => o ? o instanceof Headers ? o.has("authorization") : Array.isArray(o) ? o.some(([a]) => a.toLowerCase() === "authorization") : typeof o == "object" ? Object.keys(o).some((a) => a.toLowerCase() === "authorization") : !1 : !1)(t == null ? void 0 : t.headers) || e instanceof Request && e.headers.has("authorization"));
|
|
2396
2425
|
}
|
|
2397
|
-
function
|
|
2426
|
+
function In(e, t) {
|
|
2398
2427
|
return ((o) => {
|
|
2399
2428
|
if (o) {
|
|
2400
2429
|
if (o instanceof Headers) return o.get("content-type") || void 0;
|
|
@@ -2409,31 +2438,31 @@ function Mn(e, t) {
|
|
|
2409
2438
|
}
|
|
2410
2439
|
})(t == null ? void 0 : t.headers) ?? (e instanceof Request && e.headers.get("content-type") || void 0);
|
|
2411
2440
|
}
|
|
2412
|
-
function
|
|
2413
|
-
if (
|
|
2414
|
-
const o =
|
|
2441
|
+
function Rn(e, t, n) {
|
|
2442
|
+
if (!Be.has(n)) return;
|
|
2443
|
+
const o = Mn(e, t), a = Nn(e, t);
|
|
2415
2444
|
if (a == null && !o) return;
|
|
2416
|
-
const r =
|
|
2445
|
+
const r = In(e, t), i = a != null ? F(a, r) : {};
|
|
2417
2446
|
return o && (i.hasAuth = !0), i;
|
|
2418
2447
|
}
|
|
2419
|
-
function
|
|
2448
|
+
function Pn(e) {
|
|
2420
2449
|
const t = window.fetch;
|
|
2421
2450
|
if (typeof t != "function") return () => {
|
|
2422
2451
|
};
|
|
2423
2452
|
const n = async (o, a) => {
|
|
2424
|
-
const r = performance.now(), i = ((a == null ? void 0 : a.method) ?? (o instanceof Request ? o.method : "GET")).toUpperCase(), s = typeof o == "string" ? o : o instanceof URL ? o.toString() : o.url, c =
|
|
2453
|
+
const r = performance.now(), i = ((a == null ? void 0 : a.method) ?? (o instanceof Request ? o.method : "GET")).toUpperCase(), s = typeof o == "string" ? o : o instanceof URL ? o.toString() : o.url, c = Rn(o, a, i);
|
|
2425
2454
|
try {
|
|
2426
2455
|
const d = await t.call(window, o, a), l = Math.round(performance.now() - r), m = d.status >= 400;
|
|
2427
2456
|
let p;
|
|
2428
2457
|
if (m || e.verbose)
|
|
2429
2458
|
try {
|
|
2430
2459
|
const g = await d.clone().text(), u = d.headers.get("content-type") || void 0;
|
|
2431
|
-
p =
|
|
2460
|
+
p = F(g, u);
|
|
2432
2461
|
} catch {
|
|
2433
2462
|
}
|
|
2434
2463
|
return (m || e.verbose) && e.emit({
|
|
2435
2464
|
kind: "fetch",
|
|
2436
|
-
url:
|
|
2465
|
+
url: J(s, G),
|
|
2437
2466
|
method: i,
|
|
2438
2467
|
status: d.status,
|
|
2439
2468
|
durationMs: l,
|
|
@@ -2445,7 +2474,7 @@ function Rn(e) {
|
|
|
2445
2474
|
const l = Math.round(performance.now() - r);
|
|
2446
2475
|
throw e.emit({
|
|
2447
2476
|
kind: "fetch",
|
|
2448
|
-
url:
|
|
2477
|
+
url: J(s, G),
|
|
2449
2478
|
method: i,
|
|
2450
2479
|
status: 0,
|
|
2451
2480
|
durationMs: l,
|
|
@@ -2459,7 +2488,7 @@ function Rn(e) {
|
|
|
2459
2488
|
window.fetch.__lsBeaconWrapped && (window.fetch = t);
|
|
2460
2489
|
};
|
|
2461
2490
|
}
|
|
2462
|
-
function
|
|
2491
|
+
function _n(e) {
|
|
2463
2492
|
if (e == null) return null;
|
|
2464
2493
|
if (typeof e == "string") return e;
|
|
2465
2494
|
if (e instanceof URLSearchParams) return e.toString();
|
|
@@ -2471,7 +2500,7 @@ function Pn(e) {
|
|
|
2471
2500
|
}
|
|
2472
2501
|
return e instanceof Blob ? `[Blob ${e.size}b ${e.type || "unknown"}]` : e instanceof ArrayBuffer ? `[binary ${e.byteLength}b]` : ArrayBuffer.isView(e) ? `[binary ${e.byteLength}b]` : null;
|
|
2473
2502
|
}
|
|
2474
|
-
function
|
|
2503
|
+
function Dn(e) {
|
|
2475
2504
|
const t = XMLHttpRequest.prototype, n = t.open, o = t.send, a = t.setRequestHeader, r = /* @__PURE__ */ new WeakMap();
|
|
2476
2505
|
return t.open = function(s, c, ...d) {
|
|
2477
2506
|
return r.set(this, {
|
|
@@ -2490,9 +2519,9 @@ function _n(e) {
|
|
|
2490
2519
|
}, t.send = function(s) {
|
|
2491
2520
|
const c = r.get(this);
|
|
2492
2521
|
if (c)
|
|
2493
|
-
if (c.start = performance.now(),
|
|
2494
|
-
const l =
|
|
2495
|
-
l != null ? c.request =
|
|
2522
|
+
if (c.start = performance.now(), Be.has(c.method)) {
|
|
2523
|
+
const l = _n(s);
|
|
2524
|
+
l != null ? c.request = F(l, c.requestContentType) : c.request = {}, c.hasAuth && (c.request.hasAuth = !0);
|
|
2496
2525
|
} else c.hasAuth && (c.request = { hasAuth: !0 });
|
|
2497
2526
|
const d = () => {
|
|
2498
2527
|
this.removeEventListener("loadend", d);
|
|
@@ -2505,13 +2534,13 @@ function _n(e) {
|
|
|
2505
2534
|
const u = this.responseType === "" || this.responseType === "text" ? this.responseText : "";
|
|
2506
2535
|
if (u) {
|
|
2507
2536
|
const v = this.getResponseHeader("content-type") || void 0;
|
|
2508
|
-
g =
|
|
2537
|
+
g = F(u, v);
|
|
2509
2538
|
}
|
|
2510
2539
|
} catch {
|
|
2511
2540
|
}
|
|
2512
2541
|
(p || e.verbose) && e.emit({
|
|
2513
2542
|
kind: "xhr",
|
|
2514
|
-
url:
|
|
2543
|
+
url: J(l.url, G),
|
|
2515
2544
|
method: l.method,
|
|
2516
2545
|
status: this.status,
|
|
2517
2546
|
durationMs: m,
|
|
@@ -2525,31 +2554,31 @@ function _n(e) {
|
|
|
2525
2554
|
t.open = n, t.send = o, t.setRequestHeader = a;
|
|
2526
2555
|
};
|
|
2527
2556
|
}
|
|
2528
|
-
function
|
|
2529
|
-
const t =
|
|
2557
|
+
function $n(e) {
|
|
2558
|
+
const t = Pn(e), n = Dn(e);
|
|
2530
2559
|
return {
|
|
2531
2560
|
uninstall() {
|
|
2532
2561
|
t(), n();
|
|
2533
2562
|
}
|
|
2534
2563
|
};
|
|
2535
2564
|
}
|
|
2536
|
-
const
|
|
2537
|
-
class
|
|
2565
|
+
const Bn = 1e3, ke = 50, zn = 500;
|
|
2566
|
+
class On {
|
|
2538
2567
|
constructor(t) {
|
|
2539
2568
|
this.buffer = [], this.inflight = !1, this.timer = null, this.destroyed = !1, this.handleVisibilityChange = () => {
|
|
2540
2569
|
document.visibilityState === "hidden" && this.flushSync();
|
|
2541
2570
|
}, this.url = t.url, this.sessionId = t.sessionId, this.onError = t.onError, this.timer = setInterval(() => {
|
|
2542
2571
|
this.flush();
|
|
2543
|
-
},
|
|
2572
|
+
}, Bn), this.pagehideHandler = () => this.flushSync(), window.addEventListener("pagehide", this.pagehideHandler), document.addEventListener("visibilitychange", this.handleVisibilityChange);
|
|
2544
2573
|
}
|
|
2545
2574
|
enqueue(t) {
|
|
2546
|
-
this.destroyed || (this.buffer.push(t), this.buffer.length >
|
|
2575
|
+
this.destroyed || (this.buffer.push(t), this.buffer.length > zn && this.buffer.shift(), this.buffer.length >= ke && this.flush());
|
|
2547
2576
|
}
|
|
2548
2577
|
/** Async flush via fetch. No-op when in-flight or empty. */
|
|
2549
2578
|
async flush() {
|
|
2550
2579
|
var o, a;
|
|
2551
2580
|
if (this.destroyed || this.inflight || this.buffer.length === 0) return;
|
|
2552
|
-
const t = this.buffer.splice(0,
|
|
2581
|
+
const t = this.buffer.splice(0, ke), n = this.makeBatch(t);
|
|
2553
2582
|
this.inflight = !0;
|
|
2554
2583
|
try {
|
|
2555
2584
|
const r = await fetch(this.url, {
|
|
@@ -2603,16 +2632,16 @@ class zn {
|
|
|
2603
2632
|
};
|
|
2604
2633
|
}
|
|
2605
2634
|
}
|
|
2606
|
-
const
|
|
2607
|
-
let
|
|
2608
|
-
const
|
|
2609
|
-
function
|
|
2635
|
+
const ne = "__lsBeaconMonitorUrl", Oe = "__lsBeaconMonitorSession", oe = "__lsBeaconMonitorVerbose", re = "__lsBeaconMonitorDeadline", He = 30 * 6e4, Ae = 4096;
|
|
2636
|
+
let w = null;
|
|
2637
|
+
const Q = /* @__PURE__ */ new Set();
|
|
2638
|
+
function Hn() {
|
|
2610
2639
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID().slice(0, 8) : Math.random().toString(36).slice(2, 10);
|
|
2611
2640
|
}
|
|
2612
|
-
function
|
|
2641
|
+
function Un(e) {
|
|
2613
2642
|
const t = /* @__PURE__ */ new WeakSet(), n = (o) => {
|
|
2614
2643
|
if (o === null || typeof o != "object")
|
|
2615
|
-
return typeof o == "string" && o.length >
|
|
2644
|
+
return typeof o == "string" && o.length > Ae ? o.slice(0, Ae) : o;
|
|
2616
2645
|
if (t.has(o)) return "[cyclic]";
|
|
2617
2646
|
if (t.add(o), Array.isArray(o)) return o.map(n);
|
|
2618
2647
|
const a = {};
|
|
@@ -2630,19 +2659,19 @@ function Hn(e) {
|
|
|
2630
2659
|
return "[unserialisable]";
|
|
2631
2660
|
}
|
|
2632
2661
|
}
|
|
2633
|
-
function
|
|
2634
|
-
for (const e of
|
|
2662
|
+
function ae() {
|
|
2663
|
+
for (const e of Q)
|
|
2635
2664
|
try {
|
|
2636
|
-
e(
|
|
2665
|
+
e(w !== null, (w == null ? void 0 : w.url) ?? null);
|
|
2637
2666
|
} catch {
|
|
2638
2667
|
}
|
|
2639
2668
|
}
|
|
2640
|
-
function
|
|
2641
|
-
return
|
|
2669
|
+
function qn(e) {
|
|
2670
|
+
return w ? (w.seq += 1, {
|
|
2642
2671
|
...e,
|
|
2643
2672
|
ts: Date.now(),
|
|
2644
|
-
sessionId:
|
|
2645
|
-
seq:
|
|
2673
|
+
sessionId: w.sessionId,
|
|
2674
|
+
seq: w.seq
|
|
2646
2675
|
}) : {
|
|
2647
2676
|
...e,
|
|
2648
2677
|
ts: Date.now(),
|
|
@@ -2651,39 +2680,39 @@ function Un(e) {
|
|
|
2651
2680
|
};
|
|
2652
2681
|
}
|
|
2653
2682
|
function P(e) {
|
|
2654
|
-
if (!
|
|
2655
|
-
const t =
|
|
2656
|
-
|
|
2683
|
+
if (!w) return;
|
|
2684
|
+
const t = qn(e);
|
|
2685
|
+
w.transport.enqueue(t);
|
|
2657
2686
|
}
|
|
2658
|
-
function
|
|
2659
|
-
if (
|
|
2687
|
+
function Fn() {
|
|
2688
|
+
if (w)
|
|
2660
2689
|
try {
|
|
2661
|
-
sessionStorage.setItem(
|
|
2690
|
+
sessionStorage.setItem(ne, w.url), sessionStorage.setItem(Oe, w.sessionId), sessionStorage.setItem(oe, w.verbose ? "1" : "0"), sessionStorage.setItem(re, String(w.deadlineMs));
|
|
2662
2691
|
} catch {
|
|
2663
2692
|
}
|
|
2664
2693
|
}
|
|
2665
|
-
function
|
|
2694
|
+
function Ue() {
|
|
2666
2695
|
try {
|
|
2667
|
-
sessionStorage.removeItem(
|
|
2696
|
+
sessionStorage.removeItem(ne), sessionStorage.removeItem(Oe), sessionStorage.removeItem(oe), sessionStorage.removeItem(re);
|
|
2668
2697
|
} catch {
|
|
2669
2698
|
}
|
|
2670
2699
|
}
|
|
2671
|
-
function
|
|
2700
|
+
function jn() {
|
|
2672
2701
|
try {
|
|
2673
|
-
const e = sessionStorage.getItem(
|
|
2702
|
+
const e = sessionStorage.getItem(ne);
|
|
2674
2703
|
if (!e) return null;
|
|
2675
|
-
const t = sessionStorage.getItem(
|
|
2676
|
-
return Number.isFinite(o) && o <= Date.now() ? (
|
|
2704
|
+
const t = sessionStorage.getItem(oe) === "1", n = sessionStorage.getItem(re), o = n ? Number(n) : Date.now() + He;
|
|
2705
|
+
return Number.isFinite(o) && o <= Date.now() ? (Ue(), null) : { url: e, verbose: t, deadlineMs: o };
|
|
2677
2706
|
} catch {
|
|
2678
2707
|
return null;
|
|
2679
2708
|
}
|
|
2680
2709
|
}
|
|
2681
|
-
function
|
|
2682
|
-
|
|
2710
|
+
function Le(e) {
|
|
2711
|
+
w && (w.seq += 1, w.transport.enqueue({
|
|
2683
2712
|
kind: e.kind,
|
|
2684
2713
|
ts: e.ts,
|
|
2685
|
-
sessionId:
|
|
2686
|
-
seq:
|
|
2714
|
+
sessionId: w.sessionId,
|
|
2715
|
+
seq: w.seq,
|
|
2687
2716
|
message: e.message,
|
|
2688
2717
|
...e.stack ? { stack: e.stack } : {},
|
|
2689
2718
|
...e.source ? { source: e.source } : {},
|
|
@@ -2691,36 +2720,36 @@ function Ae(e) {
|
|
|
2691
2720
|
...typeof e.col == "number" ? { col: e.col } : {}
|
|
2692
2721
|
}));
|
|
2693
2722
|
}
|
|
2694
|
-
function
|
|
2695
|
-
if (
|
|
2696
|
-
const t = e.maxSessionMs ??
|
|
2723
|
+
function qe(e) {
|
|
2724
|
+
if (w && j(), !e.url) return;
|
|
2725
|
+
const t = e.maxSessionMs ?? He, n = Date.now() + t, o = Hn(), a = !!e.verbose, r = new On({
|
|
2697
2726
|
url: e.url,
|
|
2698
2727
|
sessionId: o,
|
|
2699
2728
|
onError: (u) => {
|
|
2700
2729
|
console.warn("[launch-kit-beacon] monitor transport error:", u.message);
|
|
2701
2730
|
}
|
|
2702
|
-
}), i =
|
|
2703
|
-
for (const u of c)
|
|
2731
|
+
}), i = Pe(), s = i.install(), c = i.snapshot();
|
|
2732
|
+
for (const u of c) Le(u);
|
|
2704
2733
|
let d = c.length;
|
|
2705
2734
|
const l = i.subscribe(() => {
|
|
2706
|
-
if (!
|
|
2707
|
-
const u =
|
|
2708
|
-
for (;
|
|
2709
|
-
const v = u[
|
|
2710
|
-
v &&
|
|
2735
|
+
if (!w) return;
|
|
2736
|
+
const u = w.errorsBuffer.snapshot();
|
|
2737
|
+
for (; w.drainedThrough < u.length; ) {
|
|
2738
|
+
const v = u[w.drainedThrough];
|
|
2739
|
+
v && Le(v), w.drainedThrough += 1;
|
|
2711
2740
|
}
|
|
2712
|
-
}), m =
|
|
2741
|
+
}), m = $n({
|
|
2713
2742
|
emit: (u) => P(u),
|
|
2714
2743
|
verbose: a
|
|
2715
|
-
}), p =
|
|
2744
|
+
}), p = An({
|
|
2716
2745
|
emitClick: (u) => P(u),
|
|
2717
2746
|
emitRoute: (u) => P(u),
|
|
2718
2747
|
emitDialog: (u) => P(u),
|
|
2719
2748
|
emitSubmit: (u) => P(u)
|
|
2720
2749
|
}), g = setTimeout(() => {
|
|
2721
|
-
console.info("[launch-kit-beacon] monitor session expired (max duration reached)"),
|
|
2750
|
+
console.info("[launch-kit-beacon] monitor session expired (max duration reached)"), j();
|
|
2722
2751
|
}, Math.max(0, n - Date.now()));
|
|
2723
|
-
|
|
2752
|
+
w = {
|
|
2724
2753
|
url: e.url,
|
|
2725
2754
|
sessionId: o,
|
|
2726
2755
|
verbose: a,
|
|
@@ -2734,50 +2763,50 @@ function Ue(e) {
|
|
|
2734
2763
|
errorsUnsub: l,
|
|
2735
2764
|
deadlineTimer: g,
|
|
2736
2765
|
drainedThrough: d
|
|
2737
|
-
},
|
|
2766
|
+
}, Fn(), ae();
|
|
2738
2767
|
}
|
|
2739
|
-
function
|
|
2740
|
-
|
|
2768
|
+
function j() {
|
|
2769
|
+
Fe(), Ue(), ae();
|
|
2741
2770
|
}
|
|
2742
|
-
function
|
|
2743
|
-
|
|
2771
|
+
function Vn() {
|
|
2772
|
+
w && (Fe(), ae());
|
|
2744
2773
|
}
|
|
2745
|
-
function
|
|
2746
|
-
|
|
2774
|
+
function Fe() {
|
|
2775
|
+
w && (clearTimeout(w.deadlineTimer), w.errorsUnsub(), w.uninstallErrors(), w.uninstallNetwork(), w.uninstallDom(), w.transport.destroy(), w = null);
|
|
2747
2776
|
}
|
|
2748
|
-
function
|
|
2749
|
-
|
|
2777
|
+
function oo(e, t) {
|
|
2778
|
+
w && P({
|
|
2750
2779
|
kind: "probe",
|
|
2751
2780
|
label: e.slice(0, 200),
|
|
2752
|
-
data:
|
|
2781
|
+
data: Un(t)
|
|
2753
2782
|
});
|
|
2754
2783
|
}
|
|
2755
|
-
function Le() {
|
|
2756
|
-
return x !== null;
|
|
2757
|
-
}
|
|
2758
2784
|
function Te() {
|
|
2759
|
-
return
|
|
2785
|
+
return w !== null;
|
|
2786
|
+
}
|
|
2787
|
+
function Ne() {
|
|
2788
|
+
return (w == null ? void 0 : w.url) ?? null;
|
|
2760
2789
|
}
|
|
2761
|
-
function
|
|
2762
|
-
return
|
|
2763
|
-
|
|
2790
|
+
function Me(e) {
|
|
2791
|
+
return Q.add(e), () => {
|
|
2792
|
+
Q.delete(e);
|
|
2764
2793
|
};
|
|
2765
2794
|
}
|
|
2766
|
-
function
|
|
2767
|
-
if (
|
|
2768
|
-
const e =
|
|
2769
|
-
e &&
|
|
2795
|
+
function Wn() {
|
|
2796
|
+
if (w || typeof window > "u") return;
|
|
2797
|
+
const e = jn();
|
|
2798
|
+
e && qe({
|
|
2770
2799
|
url: e.url,
|
|
2771
2800
|
verbose: e.verbose,
|
|
2772
2801
|
maxSessionMs: Math.max(6e4, e.deadlineMs - Date.now())
|
|
2773
2802
|
});
|
|
2774
2803
|
}
|
|
2775
|
-
function
|
|
2804
|
+
function ro(e = {}) {
|
|
2776
2805
|
let t = null, n = null, o = "", a = null;
|
|
2777
2806
|
function r() {
|
|
2778
|
-
a || (a =
|
|
2779
|
-
onStop: () =>
|
|
2780
|
-
url:
|
|
2807
|
+
a || (a = hn({
|
|
2808
|
+
onStop: () => j(),
|
|
2809
|
+
url: Ne()
|
|
2781
2810
|
}));
|
|
2782
2811
|
}
|
|
2783
2812
|
function i() {
|
|
@@ -2804,20 +2833,20 @@ function oo(e = {}) {
|
|
|
2804
2833
|
u.className = "beacon-monitor-verbose";
|
|
2805
2834
|
const v = document.createElement("input");
|
|
2806
2835
|
v.type = "checkbox", v.dataset.role = "verbose", u.appendChild(v), u.appendChild(document.createTextNode(" verbose (capture successful network too)")), t.appendChild(u);
|
|
2807
|
-
const
|
|
2808
|
-
|
|
2836
|
+
const S = document.createElement("div");
|
|
2837
|
+
S.className = "beacon-monitor-help", S.textContent = "Streams clicks, failed network, errors, route + dialog changes.", t.appendChild(S), p.addEventListener("input", () => {
|
|
2809
2838
|
o = p.value, g.disabled = !p.value.trim();
|
|
2810
2839
|
}), g.addEventListener("click", () => {
|
|
2811
|
-
const
|
|
2812
|
-
if (
|
|
2840
|
+
const h = p.value.trim();
|
|
2841
|
+
if (h) {
|
|
2813
2842
|
try {
|
|
2814
|
-
new URL(
|
|
2843
|
+
new URL(h);
|
|
2815
2844
|
} catch {
|
|
2816
2845
|
p.setCustomValidity("Enter a valid URL (e.g. http://localhost:9876/m/abc)"), p.reportValidity();
|
|
2817
2846
|
return;
|
|
2818
2847
|
}
|
|
2819
|
-
p.setCustomValidity(""),
|
|
2820
|
-
url:
|
|
2848
|
+
p.setCustomValidity(""), qe({
|
|
2849
|
+
url: h,
|
|
2821
2850
|
verbose: v.checked,
|
|
2822
2851
|
...e.maxSessionMs !== void 0 ? { maxSessionMs: e.maxSessionMs } : {}
|
|
2823
2852
|
});
|
|
@@ -2827,7 +2856,7 @@ function oo(e = {}) {
|
|
|
2827
2856
|
function c() {
|
|
2828
2857
|
if (!t) return;
|
|
2829
2858
|
t.innerHTML = "";
|
|
2830
|
-
const l =
|
|
2859
|
+
const l = Ne() ?? "", m = document.createElement("div");
|
|
2831
2860
|
m.className = "beacon-monitor-title";
|
|
2832
2861
|
const p = document.createElement("span");
|
|
2833
2862
|
p.className = "beacon-monitor-rec", p.setAttribute("aria-hidden", "true"), m.appendChild(p), m.appendChild(document.createTextNode(" Monitor — recording")), t.appendChild(m);
|
|
@@ -2836,23 +2865,23 @@ function oo(e = {}) {
|
|
|
2836
2865
|
const u = document.createElement("div");
|
|
2837
2866
|
u.className = "beacon-monitor-row";
|
|
2838
2867
|
const v = document.createElement("button");
|
|
2839
|
-
v.type = "button", v.className = "beacon-monitor-btn stop", v.textContent = "Stop monitoring", v.addEventListener("click", () =>
|
|
2840
|
-
const
|
|
2841
|
-
|
|
2868
|
+
v.type = "button", v.className = "beacon-monitor-btn stop", v.textContent = "Stop monitoring", v.addEventListener("click", () => j()), u.appendChild(v), t.appendChild(u);
|
|
2869
|
+
const S = document.createElement("div");
|
|
2870
|
+
S.className = "beacon-monitor-help", S.textContent = "Events stream to the URL above. Auto-stops after 30 min.", t.appendChild(S);
|
|
2842
2871
|
}
|
|
2843
2872
|
function d() {
|
|
2844
|
-
|
|
2873
|
+
Te() ? c() : s();
|
|
2845
2874
|
}
|
|
2846
2875
|
return {
|
|
2847
2876
|
name: "liveMonitor",
|
|
2848
2877
|
setupOnce(l) {
|
|
2849
|
-
|
|
2850
|
-
const m =
|
|
2878
|
+
Wn(), Te() && r();
|
|
2879
|
+
const m = Me((g, u) => {
|
|
2851
2880
|
g ? (r(), a == null || a.updateUrl(u)) : i();
|
|
2852
2881
|
}), p = () => {
|
|
2853
2882
|
i(), m();
|
|
2854
2883
|
try {
|
|
2855
|
-
|
|
2884
|
+
Vn();
|
|
2856
2885
|
} catch {
|
|
2857
2886
|
}
|
|
2858
2887
|
};
|
|
@@ -2860,7 +2889,7 @@ function oo(e = {}) {
|
|
|
2860
2889
|
},
|
|
2861
2890
|
form() {
|
|
2862
2891
|
return {
|
|
2863
|
-
render: (l) => (t = document.createElement("div"), t.className = "beacon-monitor", l.appendChild(t), d(), n =
|
|
2892
|
+
render: (l) => (t = document.createElement("div"), t.className = "beacon-monitor", l.appendChild(t), d(), n = Me(() => d()), () => {
|
|
2864
2893
|
n == null || n(), n = null, t = null;
|
|
2865
2894
|
})
|
|
2866
2895
|
};
|
|
@@ -2868,19 +2897,19 @@ function oo(e = {}) {
|
|
|
2868
2897
|
// No capture(): liveMonitor is a side-channel, not a feedback payload contributor.
|
|
2869
2898
|
};
|
|
2870
2899
|
}
|
|
2871
|
-
let
|
|
2872
|
-
const
|
|
2900
|
+
let N = null;
|
|
2901
|
+
const ie = {
|
|
2873
2902
|
"plugin:error": /* @__PURE__ */ new Set(),
|
|
2874
2903
|
"submit:success": /* @__PURE__ */ new Set(),
|
|
2875
2904
|
"submit:error": /* @__PURE__ */ new Set(),
|
|
2876
2905
|
ready: /* @__PURE__ */ new Set()
|
|
2877
2906
|
};
|
|
2878
|
-
function
|
|
2907
|
+
function ao(e) {
|
|
2879
2908
|
if (typeof window > "u") return;
|
|
2880
2909
|
if (!e.endpoint) throw new Error("init: endpoint is required");
|
|
2881
|
-
|
|
2882
|
-
const t = { ...lt(), ...e.labels ?? {} }, n = new AbortController(), o =
|
|
2883
|
-
Xe(),
|
|
2910
|
+
Re(), Xn();
|
|
2911
|
+
const t = { ...lt(), ...e.labels ?? {} }, n = new AbortController(), o = Jn(e), a = e.position ?? "bottom-right", r = e.theme ?? "auto";
|
|
2912
|
+
Xe(), Gn(e, a, r);
|
|
2884
2913
|
const i = document.querySelector(z);
|
|
2885
2914
|
if (!i)
|
|
2886
2915
|
throw new Error("init: failed to acquire <launch-kit-beacon> host");
|
|
@@ -2891,10 +2920,10 @@ function ro(e) {
|
|
|
2891
2920
|
["bug", "idea", "ux", "a11y"],
|
|
2892
2921
|
{
|
|
2893
2922
|
onSubmit: () => {
|
|
2894
|
-
|
|
2923
|
+
eo();
|
|
2895
2924
|
},
|
|
2896
2925
|
onClose: (m) => {
|
|
2897
|
-
|
|
2926
|
+
V("close", {}), m === "user" && Ve();
|
|
2898
2927
|
}
|
|
2899
2928
|
}
|
|
2900
2929
|
);
|
|
@@ -2911,7 +2940,7 @@ function ro(e) {
|
|
|
2911
2940
|
hostElement: i,
|
|
2912
2941
|
initAbort: n,
|
|
2913
2942
|
labels: t,
|
|
2914
|
-
debug: !!e.debug ||
|
|
2943
|
+
debug: !!e.debug || Qn(),
|
|
2915
2944
|
healthIndicator: e.healthIndicator ?? "never",
|
|
2916
2945
|
position: a,
|
|
2917
2946
|
theme: r,
|
|
@@ -2926,21 +2955,21 @@ function ro(e) {
|
|
|
2926
2955
|
},
|
|
2927
2956
|
panelSources: []
|
|
2928
2957
|
};
|
|
2929
|
-
|
|
2930
|
-
(m) =>
|
|
2931
|
-
(m) =>
|
|
2958
|
+
N = l, i.onTriggerClick = () => Yn(), d.install(
|
|
2959
|
+
(m) => je(m),
|
|
2960
|
+
(m) => se(m)
|
|
2932
2961
|
), B("ready", { ready: !0 }), l.debug && console.info("[beacon] ready", l.endpoint);
|
|
2933
2962
|
}
|
|
2934
|
-
function
|
|
2935
|
-
const e =
|
|
2963
|
+
function Yn() {
|
|
2964
|
+
const e = N;
|
|
2936
2965
|
e && (e.currentSubmit || (e.panelSources = e.plugins.map((t) => {
|
|
2937
2966
|
if (!t.form) return null;
|
|
2938
|
-
const n =
|
|
2967
|
+
const n = je(t.name);
|
|
2939
2968
|
let o;
|
|
2940
2969
|
try {
|
|
2941
2970
|
o = t.form(n);
|
|
2942
2971
|
} catch (a) {
|
|
2943
|
-
return
|
|
2972
|
+
return se({
|
|
2944
2973
|
plugin: t.name,
|
|
2945
2974
|
error: a instanceof Error ? a : new Error(String(a)),
|
|
2946
2975
|
at: "form"
|
|
@@ -2957,39 +2986,39 @@ function Wn() {
|
|
|
2957
2986
|
const a = (r = e.formValues)[t] ?? (r[t] = {});
|
|
2958
2987
|
a[n] = o;
|
|
2959
2988
|
}
|
|
2960
|
-
}), e.dialog.open(),
|
|
2989
|
+
}), e.dialog.open(), V("open", {})));
|
|
2961
2990
|
}
|
|
2962
|
-
function
|
|
2963
|
-
const e =
|
|
2991
|
+
function io() {
|
|
2992
|
+
const e = N;
|
|
2964
2993
|
e && e.dialog.close("user");
|
|
2965
2994
|
}
|
|
2966
|
-
function
|
|
2995
|
+
function Xn() {
|
|
2967
2996
|
var t;
|
|
2968
|
-
const e =
|
|
2997
|
+
const e = N;
|
|
2969
2998
|
if (e) {
|
|
2970
2999
|
e.initAbort.abort(), (t = e.currentSubmit) == null || t.abort(), e.registry.destroy(), R();
|
|
2971
3000
|
try {
|
|
2972
3001
|
e.dialog.root.remove(), e.overlayHost.layer.remove();
|
|
2973
3002
|
} catch {
|
|
2974
3003
|
}
|
|
2975
|
-
e.hostElement.onTriggerClick = null,
|
|
3004
|
+
e.hostElement.onTriggerClick = null, N = null;
|
|
2976
3005
|
}
|
|
2977
3006
|
}
|
|
2978
|
-
function
|
|
2979
|
-
const e =
|
|
3007
|
+
function so() {
|
|
3008
|
+
const e = N;
|
|
2980
3009
|
return e ? {
|
|
2981
3010
|
ready: !0,
|
|
2982
3011
|
transport: "idle",
|
|
2983
3012
|
plugins: e.registry.status()
|
|
2984
3013
|
} : { ready: !1, transport: "idle", plugins: {} };
|
|
2985
3014
|
}
|
|
2986
|
-
function
|
|
2987
|
-
return
|
|
3015
|
+
function co(e, t) {
|
|
3016
|
+
return ie[e].add(t), () => Kn(e, t);
|
|
2988
3017
|
}
|
|
2989
|
-
function
|
|
2990
|
-
|
|
3018
|
+
function Kn(e, t) {
|
|
3019
|
+
ie[e].delete(t);
|
|
2991
3020
|
}
|
|
2992
|
-
function
|
|
3021
|
+
function Gn(e, t, n) {
|
|
2993
3022
|
let o = document.querySelector(z);
|
|
2994
3023
|
if (!o) {
|
|
2995
3024
|
o = document.createElement(z), o.setAttribute("position", t), o.setAttribute("theme", n), t === "hidden" && (o.style.position = "absolute", o.style.left = "-9999px"), (document.body ?? document.documentElement).appendChild(o);
|
|
@@ -2997,13 +3026,13 @@ function Kn(e, t, n) {
|
|
|
2997
3026
|
}
|
|
2998
3027
|
e.position !== void 0 && o.setAttribute("position", t), e.theme !== void 0 && o.setAttribute("theme", n);
|
|
2999
3028
|
}
|
|
3000
|
-
function
|
|
3001
|
-
return e.plugins ? e.plugins : e.defaultPlugins === !1 ? [] :
|
|
3002
|
-
}
|
|
3003
|
-
function Jn() {
|
|
3004
|
-
return [ft(), wt(), cn(), dn()];
|
|
3029
|
+
function Jn(e) {
|
|
3030
|
+
return e.plugins ? e.plugins : e.defaultPlugins === !1 ? [] : Zn();
|
|
3005
3031
|
}
|
|
3006
3032
|
function Zn() {
|
|
3033
|
+
return [ft(), wt(), ln(), un()];
|
|
3034
|
+
}
|
|
3035
|
+
function Qn() {
|
|
3007
3036
|
if (typeof window > "u") return !1;
|
|
3008
3037
|
try {
|
|
3009
3038
|
return new URLSearchParams(window.location.search).has("lsbeacon-debug");
|
|
@@ -3011,8 +3040,8 @@ function Zn() {
|
|
|
3011
3040
|
return !1;
|
|
3012
3041
|
}
|
|
3013
3042
|
}
|
|
3014
|
-
function
|
|
3015
|
-
const t =
|
|
3043
|
+
function je(e) {
|
|
3044
|
+
const t = N;
|
|
3016
3045
|
return Ze(e, {
|
|
3017
3046
|
getCaptured: (o) => t == null ? void 0 : t.capturedEntries[o],
|
|
3018
3047
|
getFormValues: (o) => {
|
|
@@ -3036,8 +3065,8 @@ function Fe(e) {
|
|
|
3036
3065
|
}
|
|
3037
3066
|
});
|
|
3038
3067
|
}
|
|
3039
|
-
function
|
|
3040
|
-
const n =
|
|
3068
|
+
function V(e, t) {
|
|
3069
|
+
const n = N;
|
|
3041
3070
|
if (n)
|
|
3042
3071
|
for (const o of n.lifecycleHandlers[e])
|
|
3043
3072
|
try {
|
|
@@ -3047,24 +3076,24 @@ function j(e, t) {
|
|
|
3047
3076
|
}
|
|
3048
3077
|
}
|
|
3049
3078
|
function B(e, t) {
|
|
3050
|
-
for (const n of
|
|
3079
|
+
for (const n of ie[e])
|
|
3051
3080
|
try {
|
|
3052
3081
|
n(t);
|
|
3053
3082
|
} catch (o) {
|
|
3054
|
-
|
|
3083
|
+
N != null && N.debug && console.error("[beacon] system handler threw:", o);
|
|
3055
3084
|
}
|
|
3056
3085
|
}
|
|
3057
|
-
function
|
|
3086
|
+
function se(e) {
|
|
3058
3087
|
B("plugin:error", { plugin: e.plugin, error: e.error, at: e.at });
|
|
3059
|
-
const t =
|
|
3088
|
+
const t = N;
|
|
3060
3089
|
t && ((t.healthIndicator === "always" || t.healthIndicator === "dev" && t.debug) && t.hostElement.setHealthIndicator(!0), t.debug && console.warn(`[beacon] plugin "${e.plugin}" ${e.at} failed:`, e.error));
|
|
3061
3090
|
}
|
|
3062
|
-
function
|
|
3063
|
-
const e =
|
|
3091
|
+
function Ve() {
|
|
3092
|
+
const e = N;
|
|
3064
3093
|
e && (e.dialog.resetState(), e.dialog.clearPluginPanels(), e.formValues = {});
|
|
3065
3094
|
}
|
|
3066
|
-
async function
|
|
3067
|
-
const e =
|
|
3095
|
+
async function eo() {
|
|
3096
|
+
const e = N;
|
|
3068
3097
|
if (!e || e.currentSubmit) return;
|
|
3069
3098
|
const t = e.dialog.getDescription().trim();
|
|
3070
3099
|
if (!t) {
|
|
@@ -3076,11 +3105,11 @@ async function Qn() {
|
|
|
3076
3105
|
try {
|
|
3077
3106
|
const o = await e.registry.capture(
|
|
3078
3107
|
(s) => e.capturedEntries[s],
|
|
3079
|
-
(s) =>
|
|
3108
|
+
(s) => se(s)
|
|
3080
3109
|
);
|
|
3081
|
-
e.capturedEntries = o, n =
|
|
3110
|
+
e.capturedEntries = o, n = to(e, t, o);
|
|
3082
3111
|
let a = null;
|
|
3083
|
-
if (
|
|
3112
|
+
if (V("beforeSubmit", { payload: n, cancel: (s) => {
|
|
3084
3113
|
a === null && (a = s);
|
|
3085
3114
|
} }), a !== null) {
|
|
3086
3115
|
e.dialog.setSubmitting(!1), e.dialog.setStatus(`Cancelled: ${a}`, "error");
|
|
@@ -3094,8 +3123,8 @@ async function Qn() {
|
|
|
3094
3123
|
e.currentSubmit.signal,
|
|
3095
3124
|
e.credentials
|
|
3096
3125
|
);
|
|
3097
|
-
|
|
3098
|
-
|
|
3126
|
+
V("afterSubmit", { payload: n, response: i }), e.dialog.setSubmitting(!1), i.ok ? (B("submit:success", { payload: n, response: i }), e.dialog.setSubmitSucceeded(!0), e.dialog.setStatus(e.labels.sentSuccess, "success"), window.setTimeout(() => {
|
|
3127
|
+
N === e && e.dialog.close("submitted"), Ve();
|
|
3099
3128
|
}, 1500)) : (B("submit:error", { payload: n, error: new Error(`HTTP ${i.status}`) }), e.dialog.setStatus(`Failed (${i.status})`, "error"));
|
|
3100
3129
|
} catch (o) {
|
|
3101
3130
|
e.dialog.setSubmitting(!1);
|
|
@@ -3105,9 +3134,9 @@ async function Qn() {
|
|
|
3105
3134
|
e.currentSubmit = null;
|
|
3106
3135
|
}
|
|
3107
3136
|
}
|
|
3108
|
-
function
|
|
3137
|
+
function to(e, t, n) {
|
|
3109
3138
|
var r;
|
|
3110
|
-
const o =
|
|
3139
|
+
const o = no(), a = (r = e.context) == null ? void 0 : r.call(e);
|
|
3111
3140
|
return {
|
|
3112
3141
|
description: t,
|
|
3113
3142
|
severity: e.dialog.getSeverity(),
|
|
@@ -3116,7 +3145,7 @@ function eo(e, t, n) {
|
|
|
3116
3145
|
plugins: n
|
|
3117
3146
|
};
|
|
3118
3147
|
}
|
|
3119
|
-
function
|
|
3148
|
+
function no() {
|
|
3120
3149
|
const e = window.location.href, t = document.referrer, n = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
3121
3150
|
return {
|
|
3122
3151
|
url: e,
|
|
@@ -3137,25 +3166,25 @@ function to() {
|
|
|
3137
3166
|
capturedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
3138
3167
|
};
|
|
3139
3168
|
}
|
|
3140
|
-
|
|
3169
|
+
Re();
|
|
3141
3170
|
export {
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3171
|
+
Ne as currentMonitorUrl,
|
|
3172
|
+
Xn as destroy,
|
|
3173
|
+
ln as domEle,
|
|
3174
|
+
un as domSS,
|
|
3146
3175
|
wt as errors,
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3176
|
+
io as hide,
|
|
3177
|
+
ao as init,
|
|
3178
|
+
Te as isMonitorActive,
|
|
3179
|
+
dn as isPluginFailure,
|
|
3180
|
+
ro as liveMonitor,
|
|
3152
3181
|
ft as metadata,
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3182
|
+
Kn as off,
|
|
3183
|
+
co as on,
|
|
3184
|
+
oo as probe,
|
|
3185
|
+
Yn as show,
|
|
3186
|
+
qe as startMonitor,
|
|
3187
|
+
so as status,
|
|
3188
|
+
j as stopMonitor
|
|
3160
3189
|
};
|
|
3161
3190
|
//# sourceMappingURL=beacon.mjs.map
|