@launchsecure/launch-kit 0.0.29 → 0.0.31
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 +2825 -1243
- package/dist/beacon/beacon.mjs.map +1 -1
- package/dist/beacon/beacon.umd.js +710 -95
- package/dist/beacon/beacon.umd.js.map +1 -1
- package/dist/beacon/types/core.d.ts +14 -0
- package/dist/beacon/types/core.d.ts.map +1 -0
- package/dist/beacon/types/ctx.d.ts +14 -0
- package/dist/beacon/types/ctx.d.ts.map +1 -0
- package/dist/beacon/types/element.d.ts +16 -48
- package/dist/beacon/types/element.d.ts.map +1 -1
- package/dist/beacon/types/index.d.ts +5 -4
- package/dist/beacon/types/index.d.ts.map +1 -1
- package/dist/beacon/types/internal/annotation-cache.d.ts +10 -0
- package/dist/beacon/types/internal/annotation-cache.d.ts.map +1 -0
- package/dist/beacon/types/internal/element-capture.d.ts +19 -0
- package/dist/beacon/types/internal/element-capture.d.ts.map +1 -0
- package/dist/beacon/types/internal/event-buffer.d.ts +16 -0
- package/dist/beacon/types/internal/event-buffer.d.ts.map +1 -0
- package/dist/beacon/types/internal/framework-detect.d.ts +6 -0
- package/dist/beacon/types/internal/framework-detect.d.ts.map +1 -0
- package/dist/beacon/types/internal/markers.d.ts +17 -0
- package/dist/beacon/types/internal/markers.d.ts.map +1 -0
- package/dist/beacon/types/internal/monitor/capture-dom.d.ts +14 -0
- package/dist/beacon/types/internal/monitor/capture-dom.d.ts.map +1 -0
- package/dist/beacon/types/internal/monitor/capture-network.d.ts +12 -0
- package/dist/beacon/types/internal/monitor/capture-network.d.ts.map +1 -0
- package/dist/beacon/types/internal/monitor/overlay.d.ts +16 -0
- package/dist/beacon/types/internal/monitor/overlay.d.ts.map +1 -0
- package/dist/beacon/types/internal/monitor/session.d.ts +41 -0
- package/dist/beacon/types/internal/monitor/session.d.ts.map +1 -0
- package/dist/beacon/types/{monitor → internal/monitor}/transport.d.ts +3 -3
- package/dist/beacon/types/internal/monitor/transport.d.ts.map +1 -0
- package/dist/beacon/types/{monitor/types.d.ts → internal/monitor/wire.d.ts} +69 -27
- package/dist/beacon/types/internal/monitor/wire.d.ts.map +1 -0
- package/dist/beacon/types/{ui → internal}/pick-mode-overlay.d.ts +4 -5
- package/dist/beacon/types/internal/pick-mode-overlay.d.ts.map +1 -0
- package/dist/beacon/types/{capture → internal}/picker.d.ts +0 -1
- package/dist/beacon/types/internal/picker.d.ts.map +1 -0
- package/dist/beacon/types/{ui → internal}/pin-popover.d.ts +1 -1
- package/dist/beacon/types/internal/pin-popover.d.ts.map +1 -0
- package/dist/beacon/types/internal/screenshot.d.ts +26 -0
- package/dist/beacon/types/internal/screenshot.d.ts.map +1 -0
- package/dist/beacon/types/internal/selector.d.ts.map +1 -0
- package/dist/beacon/types/plugins/domEle.d.ts +14 -0
- package/dist/beacon/types/plugins/domEle.d.ts.map +1 -0
- package/dist/beacon/types/plugins/domSS.d.ts +8 -0
- package/dist/beacon/types/plugins/domSS.d.ts.map +1 -0
- package/dist/beacon/types/plugins/errors.d.ts +3 -0
- package/dist/beacon/types/plugins/errors.d.ts.map +1 -0
- package/dist/beacon/types/plugins/index.d.ts +8 -0
- package/dist/beacon/types/plugins/index.d.ts.map +1 -0
- package/dist/beacon/types/plugins/liveMonitor.d.ts +14 -0
- package/dist/beacon/types/plugins/liveMonitor.d.ts.map +1 -0
- package/dist/beacon/types/plugins/metadata.d.ts +3 -0
- package/dist/beacon/types/plugins/metadata.d.ts.map +1 -0
- package/dist/beacon/types/registry.d.ts +33 -0
- package/dist/beacon/types/registry.d.ts.map +1 -0
- package/dist/beacon/types/styles.d.ts +8 -0
- package/dist/beacon/types/styles.d.ts.map +1 -0
- package/dist/beacon/types/transport.d.ts +3 -0
- package/dist/beacon/types/transport.d.ts.map +1 -0
- package/dist/beacon/types/types.d.ts +152 -68
- package/dist/beacon/types/types.d.ts.map +1 -1
- package/dist/beacon/types/ui/dialog.d.ts +53 -0
- package/dist/beacon/types/ui/dialog.d.ts.map +1 -0
- package/dist/beacon/types/ui/form.d.ts +7 -0
- package/dist/beacon/types/ui/form.d.ts.map +1 -0
- package/dist/beacon/types/ui/overlay.d.ts +6 -0
- package/dist/beacon/types/ui/overlay.d.ts.map +1 -0
- package/dist/chart-client/assets/{index-CJ4mgRRF.css → index-CDIhdgWg.css} +1 -1
- package/dist/chart-client/index.html +2 -2
- package/dist/client/assets/{index-DI5qSR_w.css → index-CfW4n40I.css} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/council-client/assets/{index-C_-vAM9L.css → index-CZim6x1u.css} +1 -1
- package/dist/council-client/index.html +2 -2
- package/dist/deck-client/assets/{_baseUniq-W2JQDmje.js → _baseUniq-DdHaBFYO.js} +1 -1
- package/dist/deck-client/assets/{arc-DIBWAId9.js → arc-D98e_18X.js} +1 -1
- package/dist/deck-client/assets/{architectureDiagram-Q4EWVU46-CAIRMvJK.js → architectureDiagram-Q4EWVU46-DNFZzh-4.js} +1 -1
- package/dist/deck-client/assets/{blockDiagram-DXYQGD6D-BeNaNiOi.js → blockDiagram-DXYQGD6D-DeQvGUdX.js} +1 -1
- package/dist/deck-client/assets/{c4Diagram-AHTNJAMY-B9Ozi62h.js → c4Diagram-AHTNJAMY-B6ekZf1n.js} +1 -1
- package/dist/deck-client/assets/channel-DmR7Tyyt.js +1 -0
- package/dist/deck-client/assets/{chunk-4BX2VUAB-D7AZ47dt.js → chunk-4BX2VUAB-9aDWymq2.js} +1 -1
- package/dist/deck-client/assets/{chunk-4TB4RGXK-DnVnNPcI.js → chunk-4TB4RGXK-DtKQqaI7.js} +1 -1
- package/dist/deck-client/assets/{chunk-55IACEB6-UKYs-YNd.js → chunk-55IACEB6-COy9hEae.js} +1 -1
- package/dist/deck-client/assets/{chunk-EDXVE4YY-D43b-SKn.js → chunk-EDXVE4YY-D_f861An.js} +1 -1
- package/dist/deck-client/assets/{chunk-FMBD7UC4-QzBAoyyW.js → chunk-FMBD7UC4-CmuA5UKn.js} +1 -1
- package/dist/deck-client/assets/{chunk-OYMX7WX6-Cjif4r6W.js → chunk-OYMX7WX6-vT8z8D-0.js} +1 -1
- package/dist/deck-client/assets/{chunk-QZHKN3VN-CqLDirEI.js → chunk-QZHKN3VN-CTlwwg-R.js} +1 -1
- package/dist/deck-client/assets/{chunk-YZCP3GAM-_FQvmMs4.js → chunk-YZCP3GAM-C44yr620.js} +1 -1
- package/dist/deck-client/assets/classDiagram-6PBFFD2Q-Bl4ozQWs.js +1 -0
- package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-Bl4ozQWs.js +1 -0
- package/dist/deck-client/assets/clone-BAy58j24.js +1 -0
- package/dist/deck-client/assets/{cose-bilkent-S5V4N54A-rfrocesE.js → cose-bilkent-S5V4N54A-DBB2J2nL.js} +1 -1
- package/dist/deck-client/assets/{dagre-KV5264BT-Bv_7DJat.js → dagre-KV5264BT-DxDTYbKl.js} +1 -1
- package/dist/deck-client/assets/{diagram-5BDNPKRD-4F1414G5.js → diagram-5BDNPKRD-DByWrWd1.js} +1 -1
- package/dist/deck-client/assets/{diagram-G4DWMVQ6-C4-Pszqm.js → diagram-G4DWMVQ6-B8B6ddMq.js} +1 -1
- package/dist/deck-client/assets/{diagram-MMDJMWI5-B647TIx9.js → diagram-MMDJMWI5-BMUZ2PWK.js} +1 -1
- package/dist/deck-client/assets/{diagram-TYMM5635-BFAqpezd.js → diagram-TYMM5635-Bk9e8BB-.js} +1 -1
- package/dist/deck-client/assets/{erDiagram-SMLLAGMA-BfBfrJOC.js → erDiagram-SMLLAGMA-DcOSwSol.js} +1 -1
- package/dist/deck-client/assets/{flowDiagram-DWJPFMVM-DX9YAYes.js → flowDiagram-DWJPFMVM-DI-4BR0F.js} +1 -1
- package/dist/deck-client/assets/{ganttDiagram-T4ZO3ILL-DCuiy7wF.js → ganttDiagram-T4ZO3ILL-BeZuXBoU.js} +1 -1
- package/dist/deck-client/assets/{gitGraphDiagram-UUTBAWPF-CGp1IXUh.js → gitGraphDiagram-UUTBAWPF-Bcki__f-.js} +1 -1
- package/dist/deck-client/assets/{graph-B7g8aoxv.js → graph-CifKx6G1.js} +1 -1
- package/dist/deck-client/assets/index-6sdqbm2o.js +2 -0
- package/dist/deck-client/assets/{index-DsIZ3LqL.css → index-BlTlhxFW.css} +1 -1
- package/dist/deck-client/assets/index-CB-qlwRT.js +1195 -0
- package/dist/deck-client/assets/{infoDiagram-42DDH7IO-L3fahMkF.js → infoDiagram-42DDH7IO-CReN1nFN.js} +1 -1
- package/dist/deck-client/assets/{ishikawaDiagram-UXIWVN3A-aS_EjWBZ.js → ishikawaDiagram-UXIWVN3A-CDF_VLN_.js} +1 -1
- package/dist/deck-client/assets/{journeyDiagram-VCZTEJTY-djTSQZF9.js → journeyDiagram-VCZTEJTY-DwgGrNVB.js} +1 -1
- package/dist/deck-client/assets/{kanban-definition-6JOO6SKY-CcTHo4CM.js → kanban-definition-6JOO6SKY-DB_zohh5.js} +1 -1
- package/dist/deck-client/assets/{layout-mEJiadb7.js → layout-DFfX1O3z.js} +1 -1
- package/dist/deck-client/assets/{linear-XgTKqyRu.js → linear-CtKb4EXj.js} +1 -1
- package/dist/deck-client/assets/{min-Ct9jZdpd.js → min-DCRRwUZv.js} +1 -1
- package/dist/deck-client/assets/{mindmap-definition-QFDTVHPH-BaFxCGNU.js → mindmap-definition-QFDTVHPH-D0QBOiFe.js} +1 -1
- package/dist/deck-client/assets/{pieDiagram-DEJITSTG-CIbYYjtw.js → pieDiagram-DEJITSTG-CD-EV5WB.js} +1 -1
- package/dist/deck-client/assets/{quadrantDiagram-34T5L4WZ-D9EtCOvh.js → quadrantDiagram-34T5L4WZ-B-JXZ8xI.js} +1 -1
- package/dist/deck-client/assets/{requirementDiagram-MS252O5E-xeni9eVG.js → requirementDiagram-MS252O5E-D2_OK5Dp.js} +1 -1
- package/dist/deck-client/assets/{sankeyDiagram-XADWPNL6-LYeknz9h.js → sankeyDiagram-XADWPNL6-BbBJqVSC.js} +1 -1
- package/dist/deck-client/assets/{sequenceDiagram-FGHM5R23-RDbsKFZf.js → sequenceDiagram-FGHM5R23-Db8A-Rkk.js} +1 -1
- package/dist/deck-client/assets/{stateDiagram-FHFEXIEX-BH1Zjglk.js → stateDiagram-FHFEXIEX-DGJnanjS.js} +1 -1
- package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-CR7riiab.js +1 -0
- package/dist/deck-client/assets/{timeline-definition-GMOUNBTQ-IFXxKptt.js → timeline-definition-GMOUNBTQ-BRkr6T4w.js} +1 -1
- package/dist/deck-client/assets/{vennDiagram-DHZGUBPP-D-sLkQs9.js → vennDiagram-DHZGUBPP-d0rsTqFo.js} +1 -1
- package/dist/deck-client/assets/{wardley-RL74JXVD-C010F8l4.js → wardley-RL74JXVD-2t7cMqdS.js} +1 -1
- package/dist/deck-client/assets/{wardleyDiagram-NUSXRM2D-BTjjuDU3.js → wardleyDiagram-NUSXRM2D-DzboAsHh.js} +1 -1
- package/dist/deck-client/assets/{xychartDiagram-5P7HB3ND-AYbv92n-.js → xychartDiagram-5P7HB3ND-CgTP9u2V.js} +1 -1
- package/dist/deck-client/index.html +2 -2
- package/dist/server/beacon-monitor-entry.js +548 -6
- package/dist/server/chart-serve.js +917 -248
- package/dist/server/cli.js +2033 -385
- package/dist/server/deck-mcp-entry.js +141 -21
- package/dist/server/deck-serve.js +141 -21
- package/dist/server/graph-mcp-entry.js +1991 -333
- package/dist/server/init-entry.js +24 -13
- package/dist/server/orbit-entry.js +135 -7
- package/dist/server/parse-worker-entry.js +918 -247
- package/package.json +4 -2
- package/scaffolds/ls-marketplace/plugins/kit/skills/analyse/SKILL.md +180 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/beacon-array/SKILL.md +107 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/beacon-clear/SKILL.md +94 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/beacon-pulse/SKILL.md +82 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/beacon-scan/SKILL.md +66 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/blast-radius/SKILL.md +117 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/brief/SKILL.md +112 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/course/SKILL.md +84 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/debug/SKILL.md +85 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/deploy-check/SKILL.md +160 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/diagram/SKILL.md +152 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/orbit/SKILL.md +87 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/prototype/SKILL.md +110 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/recovery/SKILL.md +95 -0
- package/scaffolds/ls-marketplace/plugins/kit/{commands/show-mcp-status.md → skills/show-mcp-status/SKILL.md} +4 -4
- package/scaffolds/ls-marketplace/plugins/kit/skills/wireframe/SKILL.md +90 -0
- package/scaffolds/statusline/statusline-mcp.sh +21 -9
- package/dist/beacon/types/capture/element.d.ts +0 -3
- package/dist/beacon/types/capture/element.d.ts.map +0 -1
- package/dist/beacon/types/capture/events.d.ts +0 -20
- package/dist/beacon/types/capture/events.d.ts.map +0 -1
- package/dist/beacon/types/capture/framework.d.ts +0 -3
- package/dist/beacon/types/capture/framework.d.ts.map +0 -1
- package/dist/beacon/types/capture/metadata.d.ts +0 -3
- package/dist/beacon/types/capture/metadata.d.ts.map +0 -1
- package/dist/beacon/types/capture/overlay.d.ts +0 -7
- package/dist/beacon/types/capture/overlay.d.ts.map +0 -1
- package/dist/beacon/types/capture/picker.d.ts.map +0 -1
- package/dist/beacon/types/capture/screenshot.d.ts +0 -7
- package/dist/beacon/types/capture/screenshot.d.ts.map +0 -1
- package/dist/beacon/types/capture/selector.d.ts.map +0 -1
- package/dist/beacon/types/monitor/dom.d.ts +0 -13
- package/dist/beacon/types/monitor/dom.d.ts.map +0 -1
- package/dist/beacon/types/monitor/index.d.ts +0 -19
- package/dist/beacon/types/monitor/index.d.ts.map +0 -1
- package/dist/beacon/types/monitor/network.d.ts +0 -12
- package/dist/beacon/types/monitor/network.d.ts.map +0 -1
- package/dist/beacon/types/monitor/transport.d.ts.map +0 -1
- package/dist/beacon/types/monitor/types.d.ts.map +0 -1
- package/dist/beacon/types/transport/submit.d.ts +0 -3
- package/dist/beacon/types/transport/submit.d.ts.map +0 -1
- package/dist/beacon/types/ui/button.d.ts +0 -2
- package/dist/beacon/types/ui/button.d.ts.map +0 -1
- package/dist/beacon/types/ui/drawer.d.ts +0 -33
- package/dist/beacon/types/ui/drawer.d.ts.map +0 -1
- package/dist/beacon/types/ui/icons.d.ts +0 -9
- package/dist/beacon/types/ui/icons.d.ts.map +0 -1
- package/dist/beacon/types/ui/monitor-panel.d.ts +0 -19
- package/dist/beacon/types/ui/monitor-panel.d.ts.map +0 -1
- package/dist/beacon/types/ui/pick-mode-overlay.d.ts.map +0 -1
- package/dist/beacon/types/ui/pin-popover.d.ts.map +0 -1
- package/dist/deck-client/assets/channel-CRdozqbp.js +0 -1
- package/dist/deck-client/assets/classDiagram-6PBFFD2Q-lIZMp57W.js +0 -1
- package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-lIZMp57W.js +0 -1
- package/dist/deck-client/assets/clone-BtWeSTyJ.js +0 -1
- package/dist/deck-client/assets/index-Dg1r-WSN.js +0 -476
- package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-BrV78NDR.js +0 -1
- package/scaffolds/ls-marketplace/plugins/kit/commands/beacon-array.md +0 -92
- package/scaffolds/ls-marketplace/plugins/kit/commands/beacon-clear.md +0 -68
- package/scaffolds/ls-marketplace/plugins/kit/commands/beacon-pulse.md +0 -80
- package/scaffolds/ls-marketplace/plugins/kit/commands/beacon-scan.md +0 -62
- /package/dist/beacon/types/{capture → internal}/selector.d.ts +0 -0
- /package/dist/chart-client/assets/{index-Ccy-DpI-.js → index-B__ARB8k.js} +0 -0
- /package/dist/client/assets/{index-Dp0_okva.js → index-h8kMzVtG.js} +0 -0
- /package/dist/council-client/assets/{index-Dt4zWKSj.js → index-CWaDcsFR.js} +0 -0
|
@@ -1,96 +1,702 @@
|
|
|
1
|
-
(function(A,R){typeof exports=="object"&&typeof module<"u"?R(exports):typeof define=="function"&&define.amd?define(["exports"],R):(A=typeof globalThis<"u"?globalThis:A||self,R(A.LaunchKitBeacon={}))})(this,function(A){"use strict";const R='.beacon-drawer,.beacon-pin-popover{--beacon-accent: #0ea5e9;--beacon-bg: #ffffff;--beacon-fg: #0f172a;--beacon-muted: #64748b;--beacon-border: #e2e8f0;--beacon-radius: 10px;--beacon-shadow: 0 10px 30px rgba(0, 0, 0, .15), 0 2px 6px rgba(0, 0, 0, .08);--beacon-z-index: 2147483647;--beacon-bug: #ef4444;--beacon-idea: #22c55e;--beacon-ux: #a855f7;--beacon-a11y: #06b6d4}.beacon-drawer.beacon-theme-dark,.beacon-pin-popover.beacon-theme-dark{--beacon-bg: #0f172a;--beacon-fg: #f1f5f9;--beacon-muted: #94a3b8;--beacon-border: #334155}@media (prefers-color-scheme: dark){.beacon-drawer.beacon-theme-auto,.beacon-pin-popover.beacon-theme-auto{--beacon-bg: #0f172a;--beacon-fg: #f1f5f9;--beacon-muted: #94a3b8;--beacon-border: #334155}}:host{--beacon-accent: #0ea5e9;--beacon-bg: #ffffff;--beacon-fg: #0f172a;--beacon-muted: #64748b;--beacon-border: #e2e8f0;--beacon-radius: 10px;--beacon-z-index: 2147483645;--beacon-shadow: 0 10px 30px rgba(0, 0, 0, .15), 0 2px 6px rgba(0, 0, 0, .08);--beacon-bug: #ef4444;--beacon-idea: #22c55e;--beacon-ux: #a855f7;--beacon-a11y: #06b6d4;position:fixed;z-index:var(--beacon-z-index);font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:14px;color:var(--beacon-fg);line-height:1.5}:host([theme="dark"]){--beacon-bg: #0f172a;--beacon-fg: #f1f5f9;--beacon-muted: #94a3b8;--beacon-border: #334155}@media (prefers-color-scheme: dark){:host([theme="auto"]){--beacon-bg: #0f172a;--beacon-fg: #f1f5f9;--beacon-muted: #94a3b8;--beacon-border: #334155}}:host([position="bottom-right"]){right:20px;bottom:20px;left:auto;top:auto}:host([position="bottom-left"]){left:20px;bottom:20px;right:auto;top:auto}:host([position="hidden"]){position:static;display:contents}:host([position="hidden"]) .beacon-default-trigger{display:none}.beacon-default-trigger{display:inline-flex;align-items:center;gap:6px;background:var(--beacon-accent);color:#fff;border:0;border-radius:999px;padding:10px 16px;font:inherit;font-weight:500;cursor:pointer;box-shadow:var(--beacon-shadow);transition:transform .15s ease,box-shadow .15s ease}.beacon-default-trigger:hover{transform:translateY(-1px);box-shadow:0 14px 36px #0003}.beacon-default-trigger svg{width:18px;height:18px}.beacon-drawer{position:fixed;right:20px;bottom:20px;width:380px;max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);background:var(--beacon-bg);color:var(--beacon-fg);border:1px solid var(--beacon-border);border-radius:var(--beacon-radius);box-shadow:var(--beacon-shadow);display:none;flex-direction:column;overflow:hidden;z-index:var(--beacon-z-index)}:host([position="bottom-left"]) .beacon-drawer{left:20px;right:auto}.beacon-drawer.open{display:flex}.beacon-drawer.minimized{display:none}.beacon-drawer-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--beacon-border)}.beacon-drawer-title{font-weight:600}.beacon-icon-btn{background:transparent;border:0;color:var(--beacon-muted);cursor:pointer;padding:4px;border-radius:4px;display:inline-flex}.beacon-icon-btn:hover{background:var(--beacon-border);color:var(--beacon-fg)}.beacon-icon-btn svg{width:16px;height:16px}.beacon-drawer-body{padding:16px;overflow-y:auto;display:flex;flex-direction:column;gap:14px}.beacon-field{display:flex;flex-direction:column;gap:6px}.beacon-label{font-size:12px;color:var(--beacon-muted);font-weight:500}.beacon-textarea{width:100%;min-height:80px;padding:8px 10px;background:var(--beacon-bg);color:var(--beacon-fg);border:1px solid var(--beacon-border);border-radius:6px;font:inherit;resize:vertical;box-sizing:border-box}.beacon-textarea:focus{outline:2px solid var(--beacon-accent);outline-offset:-1px;border-color:var(--beacon-accent)}.beacon-severity{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.beacon-severity-opt{position:relative;display:flex;align-items:center;justify-content:center;padding:6px 4px;background:transparent;border:1px solid var(--beacon-border);border-radius:6px;cursor:pointer;font-size:12px;font-weight:500;color:var(--beacon-fg);text-transform:capitalize}.beacon-severity-opt input{position:absolute;opacity:0;pointer-events:none}.beacon-severity-opt:hover{background:var(--beacon-border)}.beacon-severity-opt.selected[data-sev=bug]{border-color:var(--beacon-bug);color:var(--beacon-bug)}.beacon-severity-opt.selected[data-sev=idea]{border-color:var(--beacon-idea);color:var(--beacon-idea)}.beacon-severity-opt.selected[data-sev=ux]{border-color:var(--beacon-ux);color:var(--beacon-ux)}.beacon-severity-opt.selected[data-sev=a11y]{border-color:var(--beacon-a11y);color:var(--beacon-a11y)}.beacon-actions{display:flex;gap:8px;align-items:center}.beacon-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:6px;border:0;cursor:pointer;font:inherit;font-weight:500;font-size:13px;transition:opacity .15s ease}.beacon-btn[disabled]{opacity:.5;cursor:not-allowed}.beacon-btn svg{width:14px;height:14px}.beacon-btn.primary{background:var(--beacon-accent);color:#fff}.beacon-btn.secondary{background:transparent;color:var(--beacon-fg);border:1px solid var(--beacon-border)}.beacon-btn.secondary:hover{background:var(--beacon-border)}.beacon-pin-list{display:flex;flex-direction:column;gap:6px;max-height:200px;overflow-y:auto}.beacon-pin-item{display:flex;align-items:flex-start;gap:8px;padding:8px;background:var(--beacon-border);border-radius:6px}.beacon-pin-num{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:var(--beacon-accent);color:#fff;font-size:11px;font-weight:600;flex-shrink:0}.beacon-pin-meta{flex:1;min-width:0}.beacon-pin-selector{font:11px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--beacon-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.beacon-pin-note{margin-top:4px;font-size:12px;color:var(--beacon-fg)}.beacon-pin-note-input{margin-top:4px;width:100%;padding:4px 6px;background:var(--beacon-bg);color:var(--beacon-fg);border:1px solid var(--beacon-border);border-radius:4px;font:inherit;font-size:12px;box-sizing:border-box}.beacon-thumb{width:100%;border:1px solid var(--beacon-border);border-radius:6px;display:block}.beacon-status{font-size:12px;color:var(--beacon-muted);text-align:center;padding:4px}.beacon-status.error{color:var(--beacon-bug)}.beacon-status.success{color:var(--beacon-idea)}.beacon-events{font-size:12px;border:1px solid var(--beacon-border);border-radius:6px;padding:6px 8px}.beacon-events-summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:6px;color:var(--beacon-muted);-webkit-user-select:none;-moz-user-select:none;user-select:none}.beacon-events-summary::-webkit-details-marker{display:none}.beacon-events-dot{color:var(--beacon-bug);font-size:10px;line-height:1}.beacon-events-list{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:4px;max-height:160px;overflow-y:auto}.beacon-events-item{display:flex;align-items:flex-start;gap:6px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;line-height:1.4}.beacon-events-kind{flex-shrink:0;padding:1px 5px;border-radius:3px;font-size:10px;text-transform:uppercase;letter-spacing:.04em}.beacon-events-kind.error{background:#eb141426;color:var(--beacon-bug)}.beacon-events-kind.rejection{background:#f59f0a26;color:#f59f0a}.beacon-events-msg{word-break:break-word;color:var(--beacon-fg)}.beacon-pin-popover{position:fixed;z-index:2147483647;width:240px;background:var(--beacon-bg);color:var(--beacon-fg);border:1px solid var(--beacon-border);border-radius:6px;box-shadow:var(--beacon-shadow);padding:10px;display:none;flex-direction:column;gap:8px}.beacon-pin-popover.open{display:flex}.beacon-pin-popover-header{display:flex;align-items:center;justify-content:space-between;gap:6px}.beacon-pin-popover-actions{display:flex;gap:6px;justify-content:flex-end}',L={feedback:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>',pin:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 17v5"/><path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"/></svg>',close:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>',trash:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 6h18"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>',send:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m22 2-7 20-4-9-9-4Z"/><path d="M22 2 11 13"/></svg>',check:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"/></svg>'};function rt(e="Feedback"){const t=document.createElement("button");return t.type="button",t.className="beacon-default-trigger",t.setAttribute("aria-label",e),t.innerHTML=`${L.feedback}<span>${e}</span>`,t}const st=["bug","idea","ux","a11y"];class it{constructor(t,n){this.state={description:"",severity:"bug",pins:[],events:[],annotatedScreenshot:void 0,submitting:!1,status:"",statusKind:""},this.severities=t.length>0?t:st,this.callbacks=n,this.root=document.createElement("div"),this.root.className="beacon-drawer",this.root.innerHTML=`
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<div class="beacon-field">
|
|
14
|
-
<label class="beacon-label" for="beacon-desc">What's the issue?</label>
|
|
15
|
-
<textarea id="beacon-desc" class="beacon-textarea" placeholder="Describe what you saw, what you expected, anything that helps reproduce…">${T(this.state.description)}</textarea>
|
|
16
|
-
</div>
|
|
1
|
+
(function(C,D){typeof exports=="object"&&typeof module<"u"?D(exports):typeof define=="function"&&define.amd?define(["exports"],D):(C=typeof globalThis<"u"?globalThis:C||self,D(C.LaunchKitBeacon={}))})(this,function(C){"use strict";const D=String.raw`
|
|
2
|
+
:host {
|
|
3
|
+
--beacon-accent: #0ea5e9;
|
|
4
|
+
--beacon-bg: #ffffff;
|
|
5
|
+
--beacon-fg: #0f172a;
|
|
6
|
+
--beacon-muted: #64748b;
|
|
7
|
+
--beacon-border: #e2e8f0;
|
|
8
|
+
--beacon-radius: 10px;
|
|
9
|
+
--beacon-z-index: 2147483645;
|
|
10
|
+
--beacon-shadow: 0 10px 30px hsl(0 0% 0% / 0.15), 0 2px 6px hsl(0 0% 0% / 0.08);
|
|
11
|
+
--beacon-font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
12
|
+
--beacon-color-scheme: light dark;
|
|
17
13
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<label class="beacon-severity-opt ${s===this.state.severity?"selected":""}" data-sev="${s}">
|
|
23
|
-
<input type="radio" name="beacon-severity" value="${s}" ${s===this.state.severity?"checked":""}>
|
|
24
|
-
${s}
|
|
25
|
-
</label>
|
|
26
|
-
`).join("")}
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
14
|
+
--beacon-bug: #ef4444;
|
|
15
|
+
--beacon-idea: #22c55e;
|
|
16
|
+
--beacon-ux: #a855f7;
|
|
17
|
+
--beacon-a11y: #06b6d4;
|
|
29
18
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<div class="beacon-field">
|
|
39
|
-
<span class="beacon-label">Pins (${this.state.pins.length})</span>
|
|
40
|
-
<div class="beacon-pin-list">
|
|
41
|
-
${this.state.pins.map(s=>`
|
|
42
|
-
<div class="beacon-pin-item" data-pin="${s.number}">
|
|
43
|
-
<span class="beacon-pin-num">${s.number}</span>
|
|
44
|
-
<div class="beacon-pin-meta">
|
|
45
|
-
<div class="beacon-pin-selector" title="${T(s.selector)}">${T(s.selector)}</div>
|
|
46
|
-
<input type="text" class="beacon-pin-note-input" placeholder="Add a note (optional)" value="${T(s.note??"")}">
|
|
47
|
-
</div>
|
|
48
|
-
<button type="button" class="beacon-icon-btn" data-pin-delete="${s.number}" aria-label="Remove pin ${s.number}">${L.trash}</button>
|
|
49
|
-
</div>
|
|
50
|
-
`).join("")}
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
`:""}
|
|
54
|
-
|
|
55
|
-
<details class="beacon-events" data-count="${this.state.events.length}" ${this.state.events.length===0?"hidden":""}>
|
|
56
|
-
<summary class="beacon-events-summary">
|
|
57
|
-
<span class="beacon-events-dot" aria-hidden="true">●</span>
|
|
58
|
-
<span class="beacon-events-label">${this.state.events.length} runtime ${this.state.events.length===1?"error":"errors"} will be included</span>
|
|
59
|
-
</summary>
|
|
60
|
-
<ul class="beacon-events-list">
|
|
61
|
-
${this.state.events.map(s=>`
|
|
62
|
-
<li class="beacon-events-item">
|
|
63
|
-
<span class="beacon-events-kind ${s.kind==="unhandledrejection"?"rejection":"error"}">${s.kind==="unhandledrejection"?"rejection":"error"}</span>
|
|
64
|
-
<span class="beacon-events-msg">${T(s.message)}</span>
|
|
65
|
-
</li>
|
|
66
|
-
`).join("")}
|
|
67
|
-
</ul>
|
|
68
|
-
</details>
|
|
69
|
-
|
|
70
|
-
<div class="beacon-actions">
|
|
71
|
-
<button type="button" class="beacon-btn secondary" data-action="annotate" ${this.state.submitting?"disabled":""}>
|
|
72
|
-
${L.pin} ${this.state.pins.length>0?"Add another pin":"Annotate elements"}
|
|
73
|
-
</button>
|
|
74
|
-
<span style="flex:1"></span>
|
|
75
|
-
<button type="button" class="beacon-btn primary" data-action="submit" ${t?"":"disabled"}>
|
|
76
|
-
${L.send} ${this.state.submitting?"Sending…":"Send"}
|
|
77
|
-
</button>
|
|
78
|
-
</div>
|
|
19
|
+
position: fixed;
|
|
20
|
+
z-index: var(--beacon-z-index);
|
|
21
|
+
font-family: var(--beacon-font-family);
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
color: var(--beacon-fg);
|
|
24
|
+
line-height: 1.5;
|
|
25
|
+
color-scheme: var(--beacon-color-scheme);
|
|
26
|
+
}
|
|
79
27
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
28
|
+
:host([theme='dark']) {
|
|
29
|
+
--beacon-bg: #0f172a;
|
|
30
|
+
--beacon-fg: #f1f5f9;
|
|
31
|
+
--beacon-muted: #94a3b8;
|
|
32
|
+
--beacon-border: #334155;
|
|
33
|
+
--beacon-color-scheme: dark;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@media (prefers-color-scheme: dark) {
|
|
37
|
+
:host([theme='auto']) {
|
|
38
|
+
--beacon-bg: #0f172a;
|
|
39
|
+
--beacon-fg: #f1f5f9;
|
|
40
|
+
--beacon-muted: #94a3b8;
|
|
41
|
+
--beacon-border: #334155;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:host([position='bottom-right']) { right: 20px; bottom: 20px; left: auto; top: auto; }
|
|
46
|
+
:host([position='bottom-left']) { left: 20px; bottom: 20px; right: auto; top: auto; }
|
|
47
|
+
|
|
48
|
+
:host([position='hidden']) {
|
|
49
|
+
position: static;
|
|
50
|
+
display: contents;
|
|
51
|
+
}
|
|
52
|
+
:host([position='hidden']) .beacon-default-trigger { display: none; }
|
|
53
|
+
|
|
54
|
+
.beacon-default-trigger {
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 6px;
|
|
58
|
+
background: var(--beacon-accent);
|
|
59
|
+
color: white;
|
|
60
|
+
border: 0;
|
|
61
|
+
border-radius: 999px;
|
|
62
|
+
padding: 10px 16px;
|
|
63
|
+
font: inherit;
|
|
64
|
+
font-weight: 500;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
box-shadow: var(--beacon-shadow);
|
|
67
|
+
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
68
|
+
}
|
|
69
|
+
.beacon-default-trigger:hover { transform: translateY(-1px); }
|
|
70
|
+
.beacon-default-trigger svg { width: 18px; height: 18px; }
|
|
71
|
+
|
|
72
|
+
.beacon-health-dot {
|
|
73
|
+
display: none;
|
|
74
|
+
width: 8px;
|
|
75
|
+
height: 8px;
|
|
76
|
+
border-radius: 50%;
|
|
77
|
+
background: var(--beacon-bug);
|
|
78
|
+
margin-left: 2px;
|
|
79
|
+
}
|
|
80
|
+
.beacon-health-dot.visible { display: inline-block; }
|
|
81
|
+
|
|
82
|
+
dialog.beacon-dialog {
|
|
83
|
+
width: 380px;
|
|
84
|
+
max-width: calc(100vw - 24px);
|
|
85
|
+
max-height: calc(100vh - 24px);
|
|
86
|
+
padding: 0;
|
|
87
|
+
background: var(--beacon-bg);
|
|
88
|
+
color: var(--beacon-fg);
|
|
89
|
+
border: 1px solid var(--beacon-border);
|
|
90
|
+
border-radius: var(--beacon-radius);
|
|
91
|
+
box-shadow: var(--beacon-shadow);
|
|
92
|
+
font-family: var(--beacon-font-family);
|
|
93
|
+
font-size: 14px;
|
|
94
|
+
line-height: 1.5;
|
|
95
|
+
}
|
|
96
|
+
dialog.beacon-dialog::backdrop {
|
|
97
|
+
background: hsl(0 0% 0% / 0.8);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.beacon-dialog-inner {
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
max-height: calc(100vh - 24px);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.beacon-drawer-header {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
justify-content: space-between;
|
|
110
|
+
padding: 12px 16px;
|
|
111
|
+
border-bottom: 1px solid var(--beacon-border);
|
|
112
|
+
}
|
|
113
|
+
.beacon-drawer-title { font-weight: 600; }
|
|
114
|
+
.beacon-icon-btn {
|
|
115
|
+
background: transparent;
|
|
116
|
+
border: 0;
|
|
117
|
+
color: var(--beacon-muted);
|
|
118
|
+
cursor: pointer;
|
|
119
|
+
padding: 4px;
|
|
120
|
+
border-radius: 4px;
|
|
121
|
+
display: inline-flex;
|
|
122
|
+
}
|
|
123
|
+
.beacon-icon-btn:hover { background: var(--beacon-border); color: var(--beacon-fg); }
|
|
124
|
+
.beacon-icon-btn svg { width: 16px; height: 16px; }
|
|
125
|
+
|
|
126
|
+
.beacon-drawer-body {
|
|
127
|
+
padding: 16px;
|
|
128
|
+
overflow-y: auto;
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
gap: 14px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* Plugin panels share the same vertical rhythm as the drawer body so sibling
|
|
135
|
+
panels (annotate, monitor, etc.) don't visually collide. Without this, every
|
|
136
|
+
plugin panel renders flush against the previous one. */
|
|
137
|
+
.beacon-plugin-panels {
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
gap: 14px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.beacon-field { display: flex; flex-direction: column; gap: 6px; }
|
|
144
|
+
.beacon-label { font-size: 12px; color: var(--beacon-muted); font-weight: 500; }
|
|
145
|
+
.beacon-description { font-size: 12px; color: var(--beacon-muted); }
|
|
146
|
+
|
|
147
|
+
.beacon-input,
|
|
148
|
+
.beacon-textarea,
|
|
149
|
+
.beacon-select {
|
|
150
|
+
width: 100%;
|
|
151
|
+
padding: 8px 10px;
|
|
152
|
+
background: var(--beacon-bg);
|
|
153
|
+
color: var(--beacon-fg);
|
|
154
|
+
border: 1px solid var(--beacon-border);
|
|
155
|
+
border-radius: 6px;
|
|
156
|
+
font: inherit;
|
|
157
|
+
box-sizing: border-box;
|
|
158
|
+
}
|
|
159
|
+
.beacon-textarea { min-height: 80px; resize: vertical; }
|
|
160
|
+
.beacon-input:focus,
|
|
161
|
+
.beacon-textarea:focus,
|
|
162
|
+
.beacon-select:focus { outline: 2px solid var(--beacon-accent); outline-offset: -1px; border-color: var(--beacon-accent); }
|
|
163
|
+
|
|
164
|
+
.beacon-toggle {
|
|
165
|
+
display: inline-flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
gap: 8px;
|
|
168
|
+
cursor: pointer;
|
|
169
|
+
user-select: none;
|
|
170
|
+
}
|
|
171
|
+
.beacon-toggle input { margin: 0; }
|
|
172
|
+
|
|
173
|
+
.beacon-radio-group { display: flex; flex-direction: column; gap: 4px; }
|
|
174
|
+
.beacon-radio-opt { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
|
|
175
|
+
|
|
176
|
+
.beacon-severity {
|
|
177
|
+
display: grid;
|
|
178
|
+
grid-template-columns: repeat(4, 1fr);
|
|
179
|
+
gap: 6px;
|
|
180
|
+
}
|
|
181
|
+
.beacon-severity-opt {
|
|
182
|
+
position: relative;
|
|
183
|
+
display: flex;
|
|
184
|
+
align-items: center;
|
|
185
|
+
justify-content: center;
|
|
186
|
+
padding: 6px 4px;
|
|
187
|
+
background: transparent;
|
|
188
|
+
border: 1px solid var(--beacon-border);
|
|
189
|
+
border-radius: 6px;
|
|
190
|
+
cursor: pointer;
|
|
191
|
+
font-size: 12px;
|
|
192
|
+
font-weight: 500;
|
|
193
|
+
color: var(--beacon-fg);
|
|
194
|
+
text-transform: capitalize;
|
|
195
|
+
}
|
|
196
|
+
.beacon-severity-opt input { position: absolute; opacity: 0; pointer-events: none; }
|
|
197
|
+
.beacon-severity-opt:hover { background: var(--beacon-border); }
|
|
198
|
+
.beacon-severity-opt.selected[data-sev='bug'] { border-color: var(--beacon-bug); color: var(--beacon-bug); }
|
|
199
|
+
.beacon-severity-opt.selected[data-sev='idea'] { border-color: var(--beacon-idea); color: var(--beacon-idea); }
|
|
200
|
+
.beacon-severity-opt.selected[data-sev='ux'] { border-color: var(--beacon-ux); color: var(--beacon-ux); }
|
|
201
|
+
.beacon-severity-opt.selected[data-sev='a11y'] { border-color: var(--beacon-a11y); color: var(--beacon-a11y); }
|
|
202
|
+
|
|
203
|
+
.beacon-actions {
|
|
204
|
+
display: flex;
|
|
205
|
+
gap: 8px;
|
|
206
|
+
align-items: center;
|
|
207
|
+
}
|
|
208
|
+
.beacon-btn {
|
|
209
|
+
display: inline-flex;
|
|
210
|
+
align-items: center;
|
|
211
|
+
gap: 6px;
|
|
212
|
+
padding: 8px 14px;
|
|
213
|
+
border-radius: 6px;
|
|
214
|
+
border: 0;
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
font: inherit;
|
|
217
|
+
font-weight: 500;
|
|
218
|
+
font-size: 13px;
|
|
219
|
+
transition: opacity 0.15s ease;
|
|
220
|
+
}
|
|
221
|
+
.beacon-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
|
|
222
|
+
.beacon-btn svg { width: 14px; height: 14px; }
|
|
223
|
+
.beacon-btn.primary { background: var(--beacon-accent); color: white; }
|
|
224
|
+
.beacon-btn.secondary {
|
|
225
|
+
background: transparent;
|
|
226
|
+
color: var(--beacon-fg);
|
|
227
|
+
border: 1px solid var(--beacon-border);
|
|
228
|
+
}
|
|
229
|
+
.beacon-btn.secondary:hover { background: var(--beacon-border); }
|
|
230
|
+
|
|
231
|
+
.beacon-status {
|
|
232
|
+
font-size: 12px;
|
|
233
|
+
color: var(--beacon-muted);
|
|
234
|
+
text-align: center;
|
|
235
|
+
padding: 4px;
|
|
236
|
+
}
|
|
237
|
+
.beacon-status.error { color: var(--beacon-bug); }
|
|
238
|
+
.beacon-status.success { color: var(--beacon-idea); }
|
|
239
|
+
|
|
240
|
+
.beacon-plugin-panel {
|
|
241
|
+
display: flex;
|
|
242
|
+
flex-direction: column;
|
|
243
|
+
gap: 10px;
|
|
244
|
+
padding: 12px;
|
|
245
|
+
border: 1px solid var(--beacon-border);
|
|
246
|
+
border-radius: 6px;
|
|
247
|
+
}
|
|
248
|
+
.beacon-plugin-panel-title {
|
|
249
|
+
font-size: 12px;
|
|
250
|
+
text-transform: uppercase;
|
|
251
|
+
letter-spacing: 0.04em;
|
|
252
|
+
color: var(--beacon-muted);
|
|
253
|
+
font-weight: 600;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/* ── Pin list (domEle plugin) ─────────────────────────────── */
|
|
257
|
+
.beacon-pin-list-header {
|
|
258
|
+
font-size: 12px;
|
|
259
|
+
color: var(--beacon-muted);
|
|
260
|
+
font-weight: 500;
|
|
261
|
+
}
|
|
262
|
+
.beacon-pin-list {
|
|
263
|
+
display: flex;
|
|
264
|
+
flex-direction: column;
|
|
265
|
+
gap: 6px;
|
|
266
|
+
max-height: 200px;
|
|
267
|
+
overflow-y: auto;
|
|
268
|
+
}
|
|
269
|
+
.beacon-pin-item {
|
|
270
|
+
display: flex;
|
|
271
|
+
align-items: flex-start;
|
|
272
|
+
gap: 8px;
|
|
273
|
+
padding: 8px;
|
|
274
|
+
background: var(--beacon-border);
|
|
275
|
+
border-radius: 6px;
|
|
276
|
+
}
|
|
277
|
+
.beacon-pin-num {
|
|
278
|
+
display: inline-flex;
|
|
279
|
+
align-items: center;
|
|
280
|
+
justify-content: center;
|
|
281
|
+
width: 20px;
|
|
282
|
+
height: 20px;
|
|
283
|
+
border-radius: 50%;
|
|
284
|
+
background: var(--beacon-accent);
|
|
285
|
+
color: white;
|
|
286
|
+
font-size: 11px;
|
|
287
|
+
font-weight: 600;
|
|
288
|
+
flex-shrink: 0;
|
|
289
|
+
}
|
|
290
|
+
.beacon-pin-meta { flex: 1; min-width: 0; }
|
|
291
|
+
.beacon-pin-selector {
|
|
292
|
+
font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
293
|
+
color: var(--beacon-muted);
|
|
294
|
+
white-space: nowrap;
|
|
295
|
+
overflow: hidden;
|
|
296
|
+
text-overflow: ellipsis;
|
|
297
|
+
}
|
|
298
|
+
.beacon-pin-note-input {
|
|
299
|
+
margin-top: 4px;
|
|
300
|
+
width: 100%;
|
|
301
|
+
padding: 4px 6px;
|
|
302
|
+
background: var(--beacon-bg);
|
|
303
|
+
color: var(--beacon-fg);
|
|
304
|
+
border: 1px solid var(--beacon-border);
|
|
305
|
+
border-radius: 4px;
|
|
306
|
+
font: inherit;
|
|
307
|
+
font-size: 12px;
|
|
308
|
+
box-sizing: border-box;
|
|
309
|
+
}
|
|
310
|
+
.beacon-pin-annotate { align-self: flex-start; }
|
|
311
|
+
.beacon-thumb {
|
|
312
|
+
width: 100%;
|
|
313
|
+
border: 1px solid var(--beacon-border);
|
|
314
|
+
border-radius: 6px;
|
|
315
|
+
display: block;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* ── Captured runtime events chip (errors plugin form panel) ─── */
|
|
319
|
+
.beacon-events {
|
|
320
|
+
font-size: 12px;
|
|
321
|
+
border: 1px solid var(--beacon-border);
|
|
322
|
+
border-radius: 6px;
|
|
323
|
+
padding: 6px 8px;
|
|
324
|
+
}
|
|
325
|
+
.beacon-events-summary {
|
|
326
|
+
cursor: pointer;
|
|
327
|
+
list-style: none;
|
|
328
|
+
display: flex;
|
|
329
|
+
align-items: center;
|
|
330
|
+
gap: 6px;
|
|
331
|
+
color: var(--beacon-muted);
|
|
332
|
+
user-select: none;
|
|
333
|
+
}
|
|
334
|
+
.beacon-events-summary::-webkit-details-marker { display: none; }
|
|
335
|
+
.beacon-events-dot {
|
|
336
|
+
color: var(--beacon-bug);
|
|
337
|
+
font-size: 10px;
|
|
338
|
+
line-height: 1;
|
|
339
|
+
}
|
|
340
|
+
.beacon-events-list {
|
|
341
|
+
list-style: none;
|
|
342
|
+
margin: 8px 0 0;
|
|
343
|
+
padding: 0;
|
|
344
|
+
display: flex;
|
|
345
|
+
flex-direction: column;
|
|
346
|
+
gap: 4px;
|
|
347
|
+
max-height: 160px;
|
|
348
|
+
overflow-y: auto;
|
|
349
|
+
}
|
|
350
|
+
.beacon-events-item {
|
|
351
|
+
display: flex;
|
|
352
|
+
align-items: flex-start;
|
|
353
|
+
gap: 6px;
|
|
354
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
355
|
+
font-size: 11px;
|
|
356
|
+
line-height: 1.4;
|
|
357
|
+
}
|
|
358
|
+
.beacon-events-kind {
|
|
359
|
+
flex-shrink: 0;
|
|
360
|
+
padding: 1px 5px;
|
|
361
|
+
border-radius: 3px;
|
|
362
|
+
font-size: 10px;
|
|
363
|
+
text-transform: uppercase;
|
|
364
|
+
letter-spacing: 0.04em;
|
|
365
|
+
}
|
|
366
|
+
.beacon-events-kind.error { background: hsl(0 84% 50% / 0.15); color: var(--beacon-bug); }
|
|
367
|
+
.beacon-events-kind.rejection { background: hsl(38 92% 50% / 0.15); color: hsl(38 92% 50%); }
|
|
368
|
+
.beacon-events-msg {
|
|
369
|
+
word-break: break-word;
|
|
370
|
+
color: var(--beacon-fg);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/* ── liveMonitor plugin panel ─────────────────────────────── */
|
|
374
|
+
.beacon-monitor {
|
|
375
|
+
padding: 0 0 4px;
|
|
376
|
+
font-size: 12px;
|
|
377
|
+
color: var(--beacon-fg);
|
|
378
|
+
display: flex;
|
|
379
|
+
flex-direction: column;
|
|
380
|
+
gap: 6px;
|
|
381
|
+
}
|
|
382
|
+
.beacon-monitor-title {
|
|
383
|
+
display: flex;
|
|
384
|
+
align-items: center;
|
|
385
|
+
gap: 8px;
|
|
386
|
+
font-weight: 600;
|
|
387
|
+
text-transform: uppercase;
|
|
388
|
+
letter-spacing: 0.04em;
|
|
389
|
+
color: var(--beacon-muted);
|
|
390
|
+
font-size: 11px;
|
|
391
|
+
}
|
|
392
|
+
.beacon-monitor-rec {
|
|
393
|
+
width: 8px;
|
|
394
|
+
height: 8px;
|
|
395
|
+
border-radius: 50%;
|
|
396
|
+
background: var(--beacon-bug);
|
|
397
|
+
animation: beacon-rec-pulse 1.4s ease-in-out infinite;
|
|
398
|
+
}
|
|
399
|
+
@keyframes beacon-rec-pulse {
|
|
400
|
+
0%, 100% { opacity: 1; }
|
|
401
|
+
50% { opacity: 0.35; }
|
|
402
|
+
}
|
|
403
|
+
.beacon-monitor-row {
|
|
404
|
+
display: flex;
|
|
405
|
+
gap: 6px;
|
|
406
|
+
align-items: center;
|
|
407
|
+
}
|
|
408
|
+
.beacon-monitor-input {
|
|
409
|
+
flex: 1;
|
|
410
|
+
font: inherit;
|
|
411
|
+
padding: 6px 8px;
|
|
412
|
+
background: var(--beacon-bg);
|
|
413
|
+
color: var(--beacon-fg);
|
|
414
|
+
border: 1px solid var(--beacon-border);
|
|
415
|
+
border-radius: 6px;
|
|
416
|
+
min-width: 0;
|
|
417
|
+
box-sizing: border-box;
|
|
418
|
+
}
|
|
419
|
+
.beacon-monitor-input::placeholder { color: var(--beacon-muted); opacity: 0.7; }
|
|
420
|
+
.beacon-monitor-input:focus {
|
|
421
|
+
outline: 2px solid var(--beacon-accent);
|
|
422
|
+
outline-offset: -1px;
|
|
423
|
+
border-color: var(--beacon-accent);
|
|
424
|
+
}
|
|
425
|
+
.beacon-monitor-btn {
|
|
426
|
+
font: inherit;
|
|
427
|
+
padding: 6px 10px;
|
|
428
|
+
border-radius: 6px;
|
|
429
|
+
border: 1px solid var(--beacon-accent);
|
|
430
|
+
background: var(--beacon-accent);
|
|
431
|
+
color: white;
|
|
432
|
+
cursor: pointer;
|
|
433
|
+
font-weight: 500;
|
|
434
|
+
}
|
|
435
|
+
.beacon-monitor-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
436
|
+
.beacon-monitor-btn.stop {
|
|
437
|
+
background: transparent;
|
|
438
|
+
color: var(--beacon-accent);
|
|
439
|
+
}
|
|
440
|
+
.beacon-monitor-help {
|
|
441
|
+
color: var(--beacon-muted);
|
|
442
|
+
font-size: 11px;
|
|
443
|
+
}
|
|
444
|
+
.beacon-monitor-active-url {
|
|
445
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
446
|
+
font-size: 11px;
|
|
447
|
+
color: var(--beacon-muted);
|
|
448
|
+
word-break: break-all;
|
|
449
|
+
background: hsl(0 0% 0% / 0.18);
|
|
450
|
+
border-radius: 4px;
|
|
451
|
+
padding: 4px 6px;
|
|
452
|
+
}
|
|
453
|
+
.beacon-monitor-verbose {
|
|
454
|
+
display: inline-flex;
|
|
455
|
+
align-items: center;
|
|
456
|
+
gap: 6px;
|
|
457
|
+
color: var(--beacon-muted);
|
|
458
|
+
font-size: 11px;
|
|
459
|
+
cursor: pointer;
|
|
460
|
+
user-select: none;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.beacon-overlay-layer {
|
|
464
|
+
position: fixed;
|
|
465
|
+
inset: 0;
|
|
466
|
+
pointer-events: none;
|
|
467
|
+
z-index: calc(var(--beacon-z-index) + 1);
|
|
468
|
+
}
|
|
469
|
+
.beacon-overlay-layer > * { pointer-events: auto; }
|
|
470
|
+
|
|
471
|
+
/* ── Body-mounted UI ──────────────────────────────────────
|
|
472
|
+
Pin-popover and other overlays mount on document.body to escape transformed
|
|
473
|
+
ancestors. Shadow DOM :host vars don't reach them, so we re-declare the
|
|
474
|
+
variables here on each body-mounted root. */
|
|
475
|
+
|
|
476
|
+
.beacon-pin-popover {
|
|
477
|
+
--beacon-accent: #0ea5e9;
|
|
478
|
+
--beacon-bg: #ffffff;
|
|
479
|
+
--beacon-fg: #0f172a;
|
|
480
|
+
--beacon-muted: #64748b;
|
|
481
|
+
--beacon-border: #e2e8f0;
|
|
482
|
+
--beacon-radius: 10px;
|
|
483
|
+
--beacon-shadow: 0 10px 30px hsl(0 0% 0% / 0.15), 0 2px 6px hsl(0 0% 0% / 0.08);
|
|
484
|
+
--beacon-bug: #ef4444;
|
|
485
|
+
--beacon-idea: #22c55e;
|
|
486
|
+
--beacon-ux: #a855f7;
|
|
487
|
+
--beacon-a11y: #06b6d4;
|
|
488
|
+
|
|
489
|
+
position: fixed;
|
|
490
|
+
z-index: 2147483647;
|
|
491
|
+
width: 240px;
|
|
492
|
+
background: var(--beacon-bg);
|
|
493
|
+
color: var(--beacon-fg);
|
|
494
|
+
border: 1px solid var(--beacon-border);
|
|
495
|
+
border-radius: 6px;
|
|
496
|
+
box-shadow: var(--beacon-shadow);
|
|
497
|
+
padding: 10px;
|
|
498
|
+
display: none;
|
|
499
|
+
flex-direction: column;
|
|
500
|
+
gap: 8px;
|
|
501
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
502
|
+
font-size: 14px;
|
|
503
|
+
line-height: 1.5;
|
|
504
|
+
}
|
|
505
|
+
.beacon-pin-popover.open { display: flex; }
|
|
506
|
+
.beacon-pin-popover.beacon-theme-dark {
|
|
507
|
+
--beacon-bg: #0f172a;
|
|
508
|
+
--beacon-fg: #f1f5f9;
|
|
509
|
+
--beacon-muted: #94a3b8;
|
|
510
|
+
--beacon-border: #334155;
|
|
511
|
+
}
|
|
512
|
+
@media (prefers-color-scheme: dark) {
|
|
513
|
+
.beacon-pin-popover.beacon-theme-auto {
|
|
514
|
+
--beacon-bg: #0f172a;
|
|
515
|
+
--beacon-fg: #f1f5f9;
|
|
516
|
+
--beacon-muted: #94a3b8;
|
|
517
|
+
--beacon-border: #334155;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.beacon-pin-popover .beacon-pin-popover-header {
|
|
522
|
+
display: flex;
|
|
523
|
+
align-items: center;
|
|
524
|
+
justify-content: space-between;
|
|
525
|
+
gap: 6px;
|
|
526
|
+
}
|
|
527
|
+
.beacon-pin-popover .beacon-pin-popover-actions {
|
|
528
|
+
display: flex;
|
|
529
|
+
gap: 6px;
|
|
530
|
+
justify-content: flex-end;
|
|
531
|
+
}
|
|
532
|
+
.beacon-pin-popover .beacon-pin-num {
|
|
533
|
+
display: inline-flex;
|
|
534
|
+
align-items: center;
|
|
535
|
+
justify-content: center;
|
|
536
|
+
width: 20px;
|
|
537
|
+
height: 20px;
|
|
538
|
+
border-radius: 50%;
|
|
539
|
+
background: var(--beacon-accent);
|
|
540
|
+
color: white;
|
|
541
|
+
font-size: 11px;
|
|
542
|
+
font-weight: 600;
|
|
543
|
+
flex-shrink: 0;
|
|
544
|
+
}
|
|
545
|
+
.beacon-pin-popover .beacon-icon-btn {
|
|
546
|
+
background: transparent;
|
|
547
|
+
border: 0;
|
|
548
|
+
color: var(--beacon-muted);
|
|
549
|
+
cursor: pointer;
|
|
550
|
+
padding: 4px;
|
|
551
|
+
border-radius: 4px;
|
|
552
|
+
display: inline-flex;
|
|
553
|
+
}
|
|
554
|
+
.beacon-pin-popover .beacon-icon-btn:hover { background: var(--beacon-border); color: var(--beacon-fg); }
|
|
555
|
+
.beacon-pin-popover .beacon-icon-btn svg { width: 16px; height: 16px; }
|
|
556
|
+
.beacon-pin-popover .beacon-textarea {
|
|
557
|
+
width: 100%;
|
|
558
|
+
min-height: 48px;
|
|
559
|
+
padding: 6px 8px;
|
|
560
|
+
background: var(--beacon-bg);
|
|
561
|
+
color: var(--beacon-fg);
|
|
562
|
+
border: 1px solid var(--beacon-border);
|
|
563
|
+
border-radius: 6px;
|
|
564
|
+
font: inherit;
|
|
565
|
+
resize: vertical;
|
|
566
|
+
box-sizing: border-box;
|
|
567
|
+
}
|
|
568
|
+
.beacon-pin-popover .beacon-textarea:focus {
|
|
569
|
+
outline: 2px solid var(--beacon-accent);
|
|
570
|
+
outline-offset: -1px;
|
|
571
|
+
border-color: var(--beacon-accent);
|
|
572
|
+
}
|
|
573
|
+
.beacon-pin-popover .beacon-btn {
|
|
574
|
+
display: inline-flex;
|
|
575
|
+
align-items: center;
|
|
576
|
+
gap: 6px;
|
|
577
|
+
padding: 6px 12px;
|
|
578
|
+
border-radius: 6px;
|
|
579
|
+
border: 0;
|
|
580
|
+
cursor: pointer;
|
|
581
|
+
font: inherit;
|
|
582
|
+
font-weight: 500;
|
|
583
|
+
font-size: 13px;
|
|
584
|
+
}
|
|
585
|
+
.beacon-pin-popover .beacon-btn.primary { background: var(--beacon-accent); color: white; }
|
|
586
|
+
.beacon-pin-popover .beacon-btn svg { width: 14px; height: 14px; }
|
|
587
|
+
|
|
588
|
+
/* ── liveMonitor body-portal overlay ───────────────────────
|
|
589
|
+
Dashed viewport frame + draggable status chip. Body-mounted (same reason as
|
|
590
|
+
pick-mode-overlay), so the CSS var --beacon-monitor-accent is set inline on
|
|
591
|
+
the frame and chip elements by the plugin — the shadow root's :host vars
|
|
592
|
+
don't reach here. */
|
|
593
|
+
|
|
594
|
+
@keyframes beacon-monitor-frame-pulse {
|
|
595
|
+
0%, 100% { opacity: 0.55; }
|
|
596
|
+
50% { opacity: 1; }
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.beacon-monitor-overlay-frame {
|
|
600
|
+
--beacon-monitor-accent: #10b981;
|
|
601
|
+
position: fixed;
|
|
602
|
+
inset: 0;
|
|
603
|
+
pointer-events: none;
|
|
604
|
+
z-index: 2147483646;
|
|
605
|
+
border: 2px dashed var(--beacon-monitor-accent);
|
|
606
|
+
border-radius: 4px;
|
|
607
|
+
box-shadow: inset 0 0 56px color-mix(in srgb, var(--beacon-monitor-accent) 18%, transparent);
|
|
608
|
+
box-sizing: border-box;
|
|
609
|
+
animation: beacon-monitor-frame-pulse 2.4s ease-in-out infinite;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
.beacon-monitor-overlay-chip {
|
|
613
|
+
--beacon-monitor-accent: #10b981;
|
|
614
|
+
position: fixed;
|
|
615
|
+
z-index: 2147483647;
|
|
616
|
+
pointer-events: auto;
|
|
617
|
+
cursor: grab;
|
|
618
|
+
user-select: none;
|
|
619
|
+
background: #0f172a;
|
|
620
|
+
color: #f1f5f9;
|
|
621
|
+
border: 1px solid color-mix(in srgb, var(--beacon-monitor-accent) 50%, transparent);
|
|
622
|
+
border-radius: 999px;
|
|
623
|
+
padding: 6px 6px 6px 12px;
|
|
624
|
+
box-shadow: 0 6px 20px hsl(0 0% 0% / 0.3);
|
|
625
|
+
font: 500 12px/1.2 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
626
|
+
letter-spacing: 0.01em;
|
|
627
|
+
display: flex;
|
|
628
|
+
flex-direction: column;
|
|
629
|
+
gap: 4px;
|
|
630
|
+
min-width: 140px;
|
|
631
|
+
max-width: min(360px, calc(100vw - 32px));
|
|
632
|
+
touch-action: none;
|
|
633
|
+
}
|
|
634
|
+
.beacon-monitor-overlay-chip[data-dragging] { cursor: grabbing; }
|
|
635
|
+
|
|
636
|
+
.beacon-monitor-overlay-chip-row {
|
|
637
|
+
display: flex;
|
|
638
|
+
align-items: center;
|
|
639
|
+
gap: 6px;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.beacon-monitor-overlay-rec-dot {
|
|
643
|
+
width: 8px;
|
|
644
|
+
height: 8px;
|
|
645
|
+
border-radius: 50%;
|
|
646
|
+
background: #ef4444;
|
|
647
|
+
flex-shrink: 0;
|
|
648
|
+
animation: beacon-rec-pulse 1.4s ease-in-out infinite;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
.beacon-monitor-overlay-rec-label {
|
|
652
|
+
font-weight: 700;
|
|
653
|
+
letter-spacing: 0.06em;
|
|
654
|
+
color: #ef4444;
|
|
655
|
+
font-size: 11px;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.beacon-monitor-overlay-sep {
|
|
659
|
+
color: #64748b;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
.beacon-monitor-overlay-timer {
|
|
663
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
664
|
+
font-variant-numeric: tabular-nums;
|
|
665
|
+
font-size: 12px;
|
|
666
|
+
flex: 1;
|
|
667
|
+
min-width: 48px;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.beacon-monitor-overlay-stop {
|
|
671
|
+
font: inherit;
|
|
672
|
+
font-weight: 500;
|
|
673
|
+
font-size: 11px;
|
|
674
|
+
padding: 3px 10px;
|
|
675
|
+
border-radius: 999px;
|
|
676
|
+
background: var(--beacon-monitor-accent);
|
|
677
|
+
color: #ffffff;
|
|
678
|
+
border: 0;
|
|
679
|
+
cursor: pointer;
|
|
680
|
+
flex-shrink: 0;
|
|
681
|
+
}
|
|
682
|
+
.beacon-monitor-overlay-stop:hover {
|
|
683
|
+
background: color-mix(in srgb, var(--beacon-monitor-accent) 85%, white);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
.beacon-monitor-overlay-url {
|
|
687
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
688
|
+
font-size: 10px;
|
|
689
|
+
color: #94a3b8;
|
|
690
|
+
padding: 0 6px;
|
|
691
|
+
white-space: nowrap;
|
|
692
|
+
overflow: hidden;
|
|
693
|
+
text-overflow: ellipsis;
|
|
694
|
+
max-width: 100%;
|
|
695
|
+
}
|
|
696
|
+
`,Ae="launch-kit-beacon-portal-styles";function Pt(){if(typeof document>"u"||!document.head||document.getElementById(Ae))return;const e=document.createElement("style");e.id=Ae,e.textContent=D,document.head.appendChild(e)}const ne="http://www.w3.org/2000/svg";function It(){const e=document.createElementNS(ne,"svg");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");const t=document.createElementNS(ne,"path");t.setAttribute("d","M3 11l18-5v12L3 14v-3z");const n=document.createElementNS(ne,"path");return n.setAttribute("d","M11.6 16.8a3 3 0 1 1-5.8-1.6"),e.appendChild(t),e.appendChild(n),e}const U="launch-kit-beacon",Nt=typeof HTMLElement<"u"?HTMLElement:class{};class _t extends Nt{constructor(){super(...arguments),this.onTriggerClick=null}connectedCallback(){if(this.shadow)return;this.shadow=this.attachShadow({mode:"open"});const t=document.createElement("style");t.textContent=D,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(It());const n=document.createElement("span");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",()=>{var o;return(o=this.onTriggerClick)==null?void 0:o.call(this)}),this.triggerSlot.addEventListener("slotchange",()=>{const o=this.triggerSlot.assignedElements();if(o.length>0){this.defaultTrigger.style.display="none";for(const a of o)a.addEventListener("click",()=>{var r;return(r=this.onTriggerClick)==null?void 0:r.call(this)})}else this.defaultTrigger.style.display=""}),this.hasAttribute("position")||this.setAttribute("position","bottom-right"),this.hasAttribute("theme")||this.setAttribute("theme","auto")}setTriggerLabel(t){if(!this.defaultTrigger)return;const n=this.defaultTrigger.querySelector("span");n&&(n.textContent=t)}setHealthIndicator(t){var n;(n=this.healthDot)==null||n.classList.toggle("visible",t)}}function Le(){typeof window>"u"||typeof customElements>"u"||customElements.get(U)||customElements.define(U,_t)}function $t(e,t){return{pluginName:e,captured:n=>t.getCaptured(n),get formValues(){return t.getFormValues(e)},requestMode:n=>t.requestMode(n),overlay:n=>t.overlay(n),on:(n,o)=>t.onLifecycle(n,o),get signal(){return t.getInitSignal()},captureSignal:()=>t.getCaptureSignal()}}class Dt extends Error{constructor(t){super(`Duplicate plugin name: "${t}"`),this.name="DuplicatePluginNameError"}}function Ft(e){const t=new Set;for(const o of e){if(t.has(o.name))throw new Dt(o.name);t.add(o.name)}const n=e.map(o=>({plugin:o,ctx:null,status:{state:"active",failures:0}}));return{entries:n,install(o,a){for(const r of n)if(r.ctx=o(r.plugin.name),!!r.plugin.setupOnce)try{const i=r.plugin.setupOnce(r.ctx);typeof i=="function"&&(r.teardown=i)}catch(i){const s=i instanceof Error?i:new Error(String(i));r.status={state:"failed",failures:r.status.failures+1,error:{message:s.message,...s.stack?{stack:s.stack}:{},at:"setupOnce"}},a({plugin:r.plugin.name,error:s,at:"setupOnce"})}},destroy(){var o;for(const a of n){try{(o=a.teardown)==null||o.call(a)}catch{}a.teardown=void 0}},async capture(o,a){const r={};for(const i of n)if(i.plugin.capture)try{const s=await i.plugin.capture(i.ctx),c=Ot(s,i.plugin.version);c!==null&&(r[i.plugin.name]=c)}catch(s){const c=s instanceof Error?s:new Error(String(s));r[i.plugin.name]=Ht(c),i.status={state:"failed",failures:i.status.failures+1,error:{message:c.message,...c.stack?{stack:c.stack}:{},at:"capture"}},a({plugin:i.plugin.name,error:c,at:"capture"})}return r},status(){const o={};for(const a of n)o[a.plugin.name]=a.status;return o}}}function Ot(e,t){if(e==null)return null;const n=t??1;return Array.isArray(e)||typeof e!="object"?{v:n,value:e}:{...e,v:n}}function Ht(e){return{error:e.message,...e.stack?{stack:e.stack}:{}}}async function Bt(e,t,n,o,a="omit"){const r=await Ut(n),i=await fetch(e,{method:"POST",credentials:a,headers:{"Content-Type":"application/json",...r},body:JSON.stringify(t),signal:o}),c=(i.headers.get("content-type")??"").includes("application/json")?await i.json().catch(()=>null):await i.text();return{ok:i.ok,status:i.status,body:c}}async function Ut(e){return e?typeof e=="function"?await e()??{}:e:{}}function zt(e,t,n){for(const o of t){const a=document.createElement("div");if(a.className="beacon-field",o.label){const i=document.createElement("label");i.className="beacon-label",i.textContent=o.label,a.appendChild(i)}if(o.description){const i=document.createElement("div");i.className="beacon-description",i.textContent=o.description,a.appendChild(i)}const r=qt(o,n);a.appendChild(r),e.appendChild(a)}}function qt(e,t){var o,a;const n=t.get(e.name);switch(e.type){case"toggle":{const r=document.createElement("label");r.className="beacon-toggle";const i=document.createElement("input");return i.type="checkbox",i.checked=n??e.defaultValue??!1,i.addEventListener("change",()=>t.set(e.name,i.checked)),r.appendChild(i),t.set(e.name,i.checked),r}case"text":{const r=document.createElement("input");r.type="text",r.className="beacon-input";const i=n??e.defaultValue??"";return r.value=i,e.placeholder&&(r.placeholder=e.placeholder),r.addEventListener("input",()=>t.set(e.name,r.value)),t.set(e.name,i),r}case"textarea":{const r=document.createElement("textarea");r.className="beacon-textarea";const i=n??e.defaultValue??"";return r.value=i,e.placeholder&&(r.placeholder=e.placeholder),e.rows&&(r.rows=e.rows),r.addEventListener("input",()=>t.set(e.name,r.value)),t.set(e.name,i),r}case"select":{const r=document.createElement("select");r.className="beacon-select";const i=n??e.defaultValue??((o=e.options[0])==null?void 0:o.value)??"";for(const s of e.options){const c=document.createElement("option");c.value=s.value,c.textContent=s.label??s.value,s.value===i&&(c.selected=!0),r.appendChild(c)}return r.addEventListener("change",()=>t.set(e.name,r.value)),t.set(e.name,i),r}case"radio":{const r=document.createElement("div");r.className="beacon-radio-group";const i=n??e.defaultValue??((a=e.options[0])==null?void 0:a.value)??"";for(const s of e.options){const c=document.createElement("label");c.className="beacon-radio-opt";const u=document.createElement("input");u.type="radio",u.name=e.name,u.value=s.value,s.value===i&&(u.checked=!0),u.addEventListener("change",()=>t.set(e.name,s.value));const l=document.createElement("span");l.textContent=s.label??s.value,c.appendChild(u),c.appendChild(l),r.appendChild(c)}return t.set(e.name,i),r}case"number":{const r=document.createElement("input");r.type="number",r.className="beacon-input";const i=n??e.defaultValue;return i!==void 0&&(r.value=String(i)),e.min!==void 0&&(r.min=String(e.min)),e.max!==void 0&&(r.max=String(e.max)),e.step!==void 0&&(r.step=String(e.step)),r.addEventListener("input",()=>{const s=r.value===""?void 0:Number(r.value);t.set(e.name,s)}),i!==void 0&&t.set(e.name,i),r}}}const oe="http://www.w3.org/2000/svg";function jt(){const e=document.createElementNS(oe,"svg");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");const t=document.createElementNS(oe,"line");t.setAttribute("x1","18"),t.setAttribute("y1","6"),t.setAttribute("x2","6"),t.setAttribute("y2","18");const n=document.createElementNS(oe,"line");return n.setAttribute("x1","6"),n.setAttribute("y1","6"),n.setAttribute("x2","18"),n.setAttribute("y2","18"),e.appendChild(t),e.appendChild(n),e}class Vt{constructor(t,n,o){this.labels=t,this.severities=n,this.callbacks=o,this.severitySelected="bug",this.modeCounts={minimize:0,hide:0,pickElement:0},this.pluginCleanups=[],this.lastActive=null,this.submitSucceeded=!1,this.expectedSuppressedCloses=0,this.root=document.createElement("dialog"),this.root.className="beacon-dialog",this.inner=document.createElement("div"),this.inner.className="beacon-dialog-inner",this.root.appendChild(this.inner);const a=document.createElement("div");a.className="beacon-drawer-header";const r=document.createElement("div");r.className="beacon-drawer-title",r.textContent=t.drawerTitle,a.appendChild(r);const i=document.createElement("button");i.type="button",i.className="beacon-icon-btn",i.setAttribute("aria-label",t.closeButton),i.appendChild(jt()),i.addEventListener("click",()=>this.userCloseAttempt()),a.appendChild(i),this.inner.appendChild(a),this.root.addEventListener("cancel",g=>{this.submitSucceeded||this.hasUnsavedInput()&&(g.preventDefault(),window.confirm("You have unsaved feedback. Discard?")&&this.root.close())});const s=document.createElement("div");s.className="beacon-drawer-body",this.inner.appendChild(s);const c=document.createElement("div");c.className="beacon-field";const u=document.createElement("label");u.className="beacon-label",u.textContent=t.descriptionLabel,this.descTextarea=document.createElement("textarea"),this.descTextarea.className="beacon-textarea",this.descTextarea.placeholder=t.descriptionPlaceholder,this.descTextarea.rows=4,c.appendChild(u),c.appendChild(this.descTextarea),s.appendChild(c);const l=document.createElement("div");l.className="beacon-field";const p=document.createElement("label");p.className="beacon-label",p.textContent=t.severityLabel,this.severitiesContainer=document.createElement("div"),this.severitiesContainer.className="beacon-severity";for(const g of n){const d=document.createElement("label");d.className="beacon-severity-opt",d.dataset.sev=g;const w=document.createElement("input");w.type="radio",w.name="beacon-severity",w.value=g,g===this.severitySelected&&(w.checked=!0,d.classList.add("selected")),w.addEventListener("change",()=>this.setSeverity(g)),d.appendChild(w),d.appendChild(document.createTextNode(this.severityLabel(g))),this.severitiesContainer.appendChild(d)}l.appendChild(p),l.appendChild(this.severitiesContainer),s.appendChild(l),this.pluginSlot=document.createElement("div"),this.pluginSlot.className="beacon-plugin-panels",s.appendChild(this.pluginSlot),this.statusEl=document.createElement("div"),this.statusEl.className="beacon-status",s.appendChild(this.statusEl);const f=document.createElement("div");f.className="beacon-actions",this.submitBtn=document.createElement("button"),this.submitBtn.type="button",this.submitBtn.className="beacon-btn primary",this.submitBtn.textContent=t.send,this.submitBtn.addEventListener("click",()=>this.callbacks.onSubmit()),f.appendChild(this.submitBtn),s.appendChild(f),this.root.addEventListener("close",()=>{if(this.expectedSuppressedCloses>0){this.expectedSuppressedCloses-=1;return}this.callbacks.onClose("user")})}async requestMode(t){this.modeCounts[t]+=1,this.modeCounts[t]===1&&this.applyMode(t,!0);let n=!1;return()=>{n||(n=!0,this.modeCounts[t]-=1,this.modeCounts[t]===0&&this.applyMode(t,!1))}}applyMode(t,n){var o,a;switch(t){case"pickElement":{n?(this.lastActive=document.activeElement instanceof HTMLElement?document.activeElement:null,this.root.open&&(this.expectedSuppressedCloses+=1,this.root.close())):(this.root.open||this.tryShowModal(),(a=(o=this.lastActive)==null?void 0:o.focus)==null||a.call(o));break}case"hide":{this.inner.style.visibility=n?"hidden":"",this.root.style.opacity=n?"0":"";break}case"minimize":{const r=this.inner.querySelector(".beacon-drawer-body");r&&(r.style.display=n?"none":"");break}}}open(){this.root.open||this.tryShowModal()}close(t="user"){this.root.open&&this.root.close(),t==="submitted"&&(this.statusEl.textContent="")}userCloseAttempt(){!this.submitSucceeded&&this.hasUnsavedInput()&&!window.confirm("You have unsaved feedback. Discard?")||this.root.open&&this.root.close()}hasUnsavedInput(){return this.descTextarea.value.trim().length>0}setSubmitSucceeded(t){this.submitSucceeded=t}getDescription(){return this.descTextarea.value}setDescription(t){this.descTextarea.value=t}getSeverity(){return this.severitySelected}setSeverity(t){this.severitySelected=t;for(const n of Array.from(this.severitiesContainer.children)){n.classList.toggle("selected",n.dataset.sev===t);const o=n.querySelector("input");o&&(o.checked=n.dataset.sev===t)}}setStatus(t,n="idle"){this.statusEl.textContent=t,this.statusEl.classList.remove("error","success"),n!=="idle"&&this.statusEl.classList.add(n)}setSubmitting(t){this.submitBtn.disabled=t,this.submitBtn.textContent=t?this.labels.sending:this.labels.send}resetState(){this.descTextarea.value="",this.setStatus("","idle"),this.setSubmitting(!1),this.submitSucceeded=!1,this.severities[0]&&this.setSeverity(this.severities[0])}installPluginPanels(t,n){this.clearPluginPanels();for(const o of t){const a=document.createElement("div");if(a.className="beacon-plugin-panel",o.form.title){const r=document.createElement("div");r.className="beacon-plugin-panel-title",r.textContent=o.form.title,a.appendChild(r)}if("fields"in o.form)zt(a,o.form.fields,{get:r=>n.get(o.name,r),set:(r,i)=>n.set(o.name,r,i)});else{const r=o.form.render(a,o.ctx);typeof r=="function"&&this.pluginCleanups.push(r)}this.pluginSlot.appendChild(a)}}clearPluginPanels(){for(const t of this.pluginCleanups)try{t()}catch{}this.pluginCleanups=[],this.pluginSlot.innerHTML=""}severityLabel(t){switch(t){case"bug":return this.labels.severityBug;case"idea":return this.labels.severityIdea;case"ux":return this.labels.severityUx;case"a11y":return this.labels.severityA11y}}tryShowModal(){try{this.root.showModal()}catch{this.root.show()}}}function Wt(){return{triggerButton:"Feedback",drawerTitle:"Send feedback",closeButton:"Close",send:"Send",sending:"Sending…",sentSuccess:"Sent — thanks!",descriptionLabel:"Description",descriptionPlaceholder:"What happened?",severityLabel:"Severity",severityBug:"bug",severityIdea:"idea",severityUx:"ux",severityA11y:"a11y"}}function Xt(e){const t=document.createElement("div");return t.className="beacon-overlay-layer",e.appendChild(t),{layer:t}}function Yt(e,t){const n=document.createElement("div");e.layer.appendChild(n);let o;try{o=t(n)}catch(a){throw n.remove(),a}return()=>{try{o==null||o()}catch{}n.parentNode&&n.parentNode.removeChild(n)}}function Gt(){var n,o;const e=navigator;return e.userAgentData?{brand:((n=e.userAgentData.brands.find(a=>!/Not[.\-]?A.?Brand/i.test(a.brand)))==null?void 0:n.brand)??((o=e.userAgentData.brands[0])==null?void 0:o.brand)??"unknown",mobile:e.userAgentData.mobile,platform:e.userAgentData.platform}:void 0}function Te(){return{name:"metadata",capture(){const e=Gt();return e?{uaData:e}:null}}}const Kt=30,re=500,Me=2e3,Jt=500,Zt=5e3,Qt=/launch-kit-beacon|beacon\.(?:es|umd|mjs)|\/beacon\//i;function z(e,t){if(e)return e.length>t?e.slice(0,t):e}function en(e,t){const n=(t==null?void 0:t.split(`
|
|
697
|
+
`).slice(0,3).join("|"))??"";return`${e}::${n}`}function tn(e){return!!e&&Qt.test(e)}function nn(e){try{return JSON.stringify(e).slice(0,re)}catch{return String(e)}}function Re(){const e=[],t=new Map,n=new Set;let o=!1,a,r;function i(s){if(tn(s.stack)||s.kind==="unhandledrejection"&&/AbortError/i.test(s.message))return;const c=en(s.message,s.stack),u=t.get(c);if(u!==void 0&&s.ts-u<Zt){t.set(c,s.ts);return}t.set(c,s.ts),e.push(s),e.length>Kt&&e.shift();for(const l of n)try{l()}catch{}}return{install(){return o?()=>{}:typeof window>"u"?()=>{}:(o=!0,a=s=>{try{const c=s.error instanceof Error?s.error.message:void 0,u=s.error instanceof Error?s.error.stack:void 0;i({ts:Date.now(),kind:"error",message:z(s.message||c||"Unknown error",re)??"Unknown error",...u?{stack:z(u,Me)}:{},...s.filename?{source:z(s.filename,Jt)}:{},...Number.isFinite(s.lineno)?{line:s.lineno}:{},...Number.isFinite(s.colno)?{col:s.colno}:{}})}catch{}},r=s=>{try{const c=s.reason,u=c instanceof Error?c.message:typeof c=="string"?c:nn(c),l=c instanceof Error?c.stack:void 0;i({ts:Date.now(),kind:"unhandledrejection",message:z(u||"Unknown rejection",re)??"Unknown rejection",...l?{stack:z(l,Me)}:{}})}catch{}},window.addEventListener("error",a),window.addEventListener("unhandledrejection",r),()=>{a&&window.removeEventListener("error",a),r&&window.removeEventListener("unhandledrejection",r),o=!1,n.clear()})},snapshot(){return e.slice()},subscribe(s){return n.add(s),()=>{n.delete(s)}}}}function Pe(){let e=null;return{name:"errors",setupOnce(t){e=Re();const n=e.install();return t.signal.addEventListener("abort",n,{once:!0}),n},form(){return{render:t=>{const n=document.createElement("details");n.className="beacon-events";const o=document.createElement("summary");o.className="beacon-events-summary";const a=document.createElement("span");a.className="beacon-events-dot",a.textContent="●";const r=document.createElement("span");r.className="beacon-events-label",o.appendChild(a),o.appendChild(r),n.appendChild(o);const i=document.createElement("ul");i.className="beacon-events-list",n.appendChild(i),t.appendChild(n);function s(){const u=(e==null?void 0:e.snapshot())??[],l=u.length;if(l===0){t.style.display="none";return}t.style.display="",r.textContent=`${l} runtime error${l!==1?"s":""} captured`,i.innerHTML="";for(const p of u){const f=document.createElement("li");f.className="beacon-events-item";const g=document.createElement("span");g.className=`beacon-events-kind ${p.kind==="unhandledrejection"?"rejection":"error"}`,g.textContent=p.kind==="unhandledrejection"?"REJ":"ERR";const d=document.createElement("span");d.className="beacon-events-msg",d.textContent=p.message,f.appendChild(g),f.appendChild(d),i.appendChild(f)}}s();const c=e==null?void 0:e.subscribe(s);return()=>{c==null||c()}}}},capture(){const t=(e==null?void 0:e.snapshot())??[];return t.length===0?null:{events:t}}}}const on=8;function Ie(e,t=document){if(!e)return!1;try{return t.querySelectorAll(`#${CSS.escape(e)}`).length===1}catch{return!1}}function rn(e){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("");return t+n}function an(e){const t=e.parentElement;return t?Array.from(t.children).filter(o=>o.tagName===e.tagName).indexOf(e)+1:1}function sn(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return"";if(e.id&&Ie(e.id))return`#${CSS.escape(e.id)}`;const t=[];let n=e,o=0;for(;n&&n.tagName.toLowerCase()!=="body"&&o<on;){const a=n;if(a.id&&Ie(a.id)){t.unshift(`#${CSS.escape(a.id)}`);break}const r=rn(a),i=a.parentElement;let s=r;if(i)try{const c=Array.from(a.classList).join(" ");Array.from(i.children).filter(l=>l.tagName===a.tagName&&Array.from(l.classList).join(" ")===c).length>1&&(s=`${a.tagName.toLowerCase()}:nth-of-type(${an(a)})`)}catch{}t.unshift(s),n=i,o++}return t.join(" > ")}function cn(e){const t=Object.keys(e).filter(o=>o.startsWith("__reactFiber$")||o.startsWith("__reactInternalInstance$"));if(t.length===0)return null;let n=e[t[0]];for(let o=0;o<10&&n;o++){const a=n,r=a.type;if(typeof r=="function"){const i=r.displayName??r.name;if(i&&i!=="_default")return{lib:"react",name:i}}if(typeof r=="object"&&r!==null){const i=r.displayName??r.name;if(i)return{lib:"react",name:i}}n=a.return}return{lib:"react"}}function ln(e){var o,a;const t=e,n=t.__vueParentComponent;if(n){const r=((o=n.type)==null?void 0:o.name)??((a=n.type)==null?void 0:a.__name);return{lib:"vue",...r?{name:r}:{}}}return t.__vue__?{lib:"vue"}:null}function un(e){const t=window.ng;if(!(t!=null&&t.getComponent))return null;try{const n=t.getComponent(e);if(!n)return null;const o=n.constructor;return{lib:"angular",...o!=null&&o.name?{name:o.name}:{}}}catch{return null}}function dn(e){return"__svelte_meta"in e?{lib:"svelte"}:null}function pn(e){return cn(e)??ln(e)??un(e)??dn(e)??void 0}const fn=5e3,mn=1e3,Ne=1e3,_e=200,hn=50,$e=200,bn=500,gn=["display","position","top","right","bottom","left","width","height","min-width","min-height","max-width","max-height","margin","padding","font-family","font-size","font-weight","line-height","text-align","color","background-color","background-image","border","border-radius","opacity","visibility","overflow","z-index","transform","transition","flex","flex-direction","justify-content","align-items","gap","grid-template-columns","grid-template-rows"];function De(e,t){return e.length<=t?e:e.slice(0,t)+`
|
|
698
|
+
|
|
699
|
+
/* … truncated, original was ${e.length} chars */`}function yn(e){const t=getComputedStyle(e),n={};for(const o of gn){const a=t.getPropertyValue(o);a&&a!=="normal"&&a!=="none"&&a!=="auto"&&a!=="0px"&&(n[o]=a.trim().slice(0,bn))}return n}function wn(e){return Array.from(e.classList).slice(0,hn).map(t=>t.length>$e?t.slice(0,$e):t)}function vn(e){const t=e.getBoundingClientRect(),n=sn(e),o=e.id||null,a=pn(e);return{selector:n.length>Ne?n.slice(0,Ne):n,tagName:e.tagName.toLowerCase(),id:o&&o.length>_e?o.slice(0,_e):o,classList:wn(e),outerHTML:De(e.outerHTML,fn),...e.parentElement?{parentOuterHTML:De(e.parentElement.outerHTML,mn)}:{},computedStyles:yn(e),boundingRect:{x:Math.round(t.x),y:Math.round(t.y),w:Math.round(t.width),h:Math.round(t.height)},...a?{framework:a}:{}}}const xn=14,En="#ffffff",Sn="#ffffff",Cn=3,kn="#0ea5e9";async function Fe(e,t,n,o=kn){const a=await Ln(e),r=document.createElement("canvas");r.width=a.naturalWidth,r.height=a.naturalHeight;const i=r.getContext("2d");if(!i)throw new Error("Could not get 2D canvas context");i.drawImage(a,0,0);const s=r.width/n.w,c=r.height/n.h;for(const u of t){const l=An(u);if(!l)continue;const p=l.x*s,f=l.y*c,g=l.w*s,d=l.h*c;i.lineWidth=Cn,i.strokeStyle=o,i.strokeRect(p,f,g,d);const w=p+g,E=f;i.beginPath(),i.fillStyle=o,i.arc(w,E,xn,0,Math.PI*2),i.fill(),i.lineWidth=3,i.strokeStyle=En,i.stroke(),i.fillStyle=Sn,i.font="bold 16px system-ui, -apple-system, sans-serif",i.textAlign="center",i.textBaseline="middle",i.fillText(String(u.number),w,E+1)}return r.toDataURL("image/jpeg",.85)}function An(e){if(e.liveElement&&document.contains(e.liveElement)){const t=e.liveElement.getBoundingClientRect();if(t.width>0||t.height>0)return{x:t.left,y:t.top,w:t.width,h:t.height}}if(e.selector)try{const t=document.querySelector(e.selector);if(t){const n=t.getBoundingClientRect();if(n.width>0||n.height>0)return{x:n.left,y:n.top,w:n.width,h:n.height}}}catch{}return e.boundingRect}function Ln(e){return new Promise((t,n)=>{const o=new Image;o.onload=()=>t(o),o.onerror=a=>n(a),o.src=e})}const q="beacon-no-capture",Tn="#0ea5e9",Oe="Click any element to pin it · Press Esc to finish";function He(e,t){return/^#[0-9a-fA-F]{6}$/.test(e)?`${e}${t}`:e}function Mn(e={}){const t=e.accent??Tn,n=He(t,"b3"),o=He(t,"2e"),a=document.createElement("style");a.className=q,a.textContent="@keyframes beacon-spin { to { transform: rotate(360deg); } }",document.head.appendChild(a);const r=document.createElement("div");r.className=q,r.setAttribute("aria-hidden","true"),r.style.cssText=["position: fixed","inset: 0","pointer-events: none","z-index: 2147483646",`border: 2px dashed ${n}`,"border-radius: 4px",`box-shadow: inset 0 0 56px ${o}`,"box-sizing: border-box"].join("; ");const i=document.createElement("div");i.className=q,i.setAttribute("role","status"),i.style.cssText=["position: fixed","top: 16px","left: 50%","transform: translateX(-50%)",`background: ${t}`,"color: #fff","padding: 6px 14px","border-radius: 999px","font: 500 12px/1.4 system-ui, -apple-system, sans-serif","letter-spacing: 0.01em","box-shadow: 0 4px 12px hsl(0 0% 0% / 0.3)","pointer-events: none","white-space: nowrap","z-index: 2147483646"].join("; "),i.textContent=Oe;const s=`<span style="
|
|
94
700
|
display: inline-block;
|
|
95
701
|
width: 12px;
|
|
96
702
|
height: 12px;
|
|
@@ -100,9 +706,18 @@
|
|
|
100
706
|
animation: beacon-spin 800ms linear infinite;
|
|
101
707
|
vertical-align: middle;
|
|
102
708
|
margin-right: 8px;
|
|
103
|
-
"></span>`;function c(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
`).slice(0,3).join("|"))??"";return`${e}::${n}`}function zt(e){return!!e&&Nt.test(e)}function qt(e){try{return JSON.stringify(e).slice(0,W)}catch{return String(e)}}function Ee(e){if(zt(e.stack)||e.kind==="unhandledrejection"&&/AbortError/i.test(e.message))return;const t=Ht(e.message,e.stack),n=V.get(t);if(n!==void 0&&e.ts-n<jt){V.set(t,e.ts);return}V.set(t,e.ts),B.push(e),B.length>Ut&&B.shift();for(const o of K)try{o()}catch{}}function Wt(){Se||typeof window>"u"||(Se=!0,window.addEventListener("error",e=>{try{const t=e.error instanceof Error?e.error.message:void 0,n=e.error instanceof Error?e.error.stack:void 0;Ee({ts:Date.now(),kind:"error",message:P(e.message||t||"Unknown error",W)??"Unknown error",...n?{stack:P(n,xe)}:{},...e.filename?{source:P(e.filename,Bt)}:{},...Number.isFinite(e.lineno)?{line:e.lineno}:{},...Number.isFinite(e.colno)?{col:e.colno}:{}})}catch{}}),window.addEventListener("unhandledrejection",e=>{try{const t=e.reason,n=t instanceof Error?t.message:typeof t=="string"?t:qt(t),o=t instanceof Error?t.stack:void 0;Ee({ts:Date.now(),kind:"unhandledrejection",message:P(n||"Unknown rejection",W)??"Unknown rejection",...o?{stack:P(o,xe)}:{}})}catch{}}))}function _(){return B.slice()}function ke(e){return K.add(e),()=>{K.delete(e)}}async function Vt(e,t,n){const o=await fetch(e,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...n??{}},body:JSON.stringify(t)});let r=null;if((o.headers.get("Content-Type")??"").includes("application/json"))try{r=await o.json()}catch{r=null}else try{r=await o.text()}catch{r=null}return{ok:o.ok,status:o.status,body:r}}const Kt=["endpoint","position","theme","severities"],Ce="launch-kit-beacon-portal-styles";function Xt(e){if(document.getElementById(Ce))return;const t=document.createElement("style");t.id=Ce,t.textContent=e,document.head.appendChild(t)}const Gt=["--beacon-accent","--beacon-bg","--beacon-fg","--beacon-muted","--beacon-border","--beacon-radius","--beacon-shadow","--beacon-z-index","--beacon-bug","--beacon-idea","--beacon-ux","--beacon-a11y"],Ae="#0ea5e9";class Le extends HTMLElement{constructor(){super(...arguments),this._config=null,this.pins=[],this.pinElements=new WeakMap,this.description="",this.severity="bug",this.submitSucceeded=!1}static get observedAttributes(){return Kt}set config(t){this._config=t}get config(){if(this._config)return this._config;const t=this.getAttribute("endpoint");return t?{endpoint:t}:null}connectedCallback(){if(!this.shadow){this.shadow=this.attachShadow({mode:"open"});const t=document.createElement("style");t.textContent=R,this.shadow.appendChild(t),this.slotEl=document.createElement("slot"),this.slotEl.name="trigger",this.shadow.appendChild(this.slotEl),this.trigger=rt(),this.shadow.appendChild(this.trigger),this.trigger.addEventListener("click",()=>this.open()),this.slotEl.addEventListener("slotchange",()=>{const n=this.slotEl.assignedElements();n.length>0&&(this.trigger&&(this.trigger.style.display="none"),n.forEach(o=>o.addEventListener("click",()=>this.open())))}),this.drawer=new it(this.parseSeverities(),{onClose:()=>this.close(),onAnnotate:()=>this.startAnnotate(),onSubmit:()=>this.handleSubmit(),onPinNoteChange:(n,o)=>this.updatePinNote(n,o),onPinDelete:n=>this.deletePin(n),onDescriptionChange:n=>{this.description=n},onSeverityChange:n=>{this.severity=n}}),Xt(R),this.drawer.root.classList.add("beacon-no-capture"),this.drawer.root.classList.add(`beacon-theme-${this.getAttribute("theme")??"auto"}`),document.body.appendChild(this.drawer.root),this.eventsUnsubscribe=ke(()=>{var n;(n=this.drawer)==null||n.setEvents(_())})}this.hasAttribute("position")||this.setAttribute("position","bottom-right"),this.hasAttribute("theme")||this.setAttribute("theme","auto")}attributeChangedCallback(t,n,o){t==="severities"&&this.drawer&&console.warn("[launch-kit-beacon] severities attribute changed after mount; not yet hot-reloaded."),t==="theme"&&this.drawer&&n!==o&&(this.drawer.root.classList.remove(`beacon-theme-${n??"auto"}`),this.drawer.root.classList.add(`beacon-theme-${o??"auto"}`))}open(){var t;if(this.drawer){if(this.getAttribute("position")==="hidden"){const n=(t=this.slotEl)==null?void 0:t.assignedElements()[0];n&&Jt(this.drawer.root,n)}this.submitSucceeded=!1,this.drawer.setEvents(_()),this.syncCustomProperties(),this.installClickBlocker(),this.drawer.open()}}close(){this.drawer&&(!this.submitSucceeded&&this.hasUnsavedData()&&!window.confirm("You have unsaved feedback. Close and discard it?")||this.forceClose())}disconnectedCallback(){var t;this.uninstallClickBlocker(),(t=this.eventsUnsubscribe)==null||t.call(this),this.eventsUnsubscribe=void 0,this.drawer&&this.drawer.root.parentNode&&this.drawer.root.parentNode.removeChild(this.drawer.root)}async openWithPicker(){this.open(),setTimeout(()=>this.startAnnotate(),0)}async startAnnotate(){if(!this.drawer)return;this.drawer.minimize();const t=this.getAccentColor(),n=lt({accent:t});for(const o of this.pins){const r=this.pinElements.get(o);r&&n.addPin(o.number,{target:r,selector:o.selector,fallbackRect:o.boundingRect})}try{let o=!0;for(;o;){const s=await ht({shadowRoot:this.shadow,accent:t}).promise;if(!s)break;const i=s.getBoundingClientRect(),a=await at({shadowRoot:this.shadow,anchor:{x:i.left,y:i.bottom},pinNumber:this.pins.length+1});if(a.cancelled==="all")break;if(a.cancelled==="pin")continue;const c=Tt(s),l={number:this.pins.length+1,...c,...a.note?{note:a.note}:{}};this.pins.push(l),this.pinElements.set(l,s),n.addPin(l.number,{target:s,selector:c.selector,fallbackRect:c.boundingRect})}if(this.pins.length>0){n.setLoading("Capturing screenshot…"),await new Promise(r=>requestAnimationFrame(()=>r()));try{const r=ge(),s=await we({excludeShadowRoot:this.shadow}),i=await ve(s,this.pins,r.viewport,this.pinElements,t);this.drawer.setPins(this.pins,i)}catch(r){const s=r instanceof Error?r.message:String(r);console.error("[launch-kit-beacon] screenshot capture failed:",r),this.drawer.setPins(this.pins),this.drawer.setStatus(`Screenshot capture failed: ${s}`,"error")}}}finally{n.destroy()}this.drawer.open()}updatePinNote(t,n){const o=this.pins.find(r=>r.number===t);o&&(n.trim()?o.note=n:delete o.note)}deletePin(t){var n,o;this.pins=this.pins.filter(r=>r.number!==t),this.pins.forEach((r,s)=>{r.number=s+1}),(n=this.drawer)==null||n.setAnnotatedScreenshot(void 0),(o=this.drawer)==null||o.setPins(this.pins)}async handleSubmit(){if(!this.drawer)return;const t=this.config;if(!(t!=null&&t.endpoint)){this.drawer.setStatus("Missing endpoint configuration","error");return}const n=this.drawer.getDescription().trim(),o=this.drawer.getSeverity();if(!n){this.drawer.setStatus("Description is required","error");return}this.drawer.setSubmitting(!0);let r=this.drawer.getAnnotatedScreenshot();const s=!r&&this.pins.length>0;this.drawer.setStatus(s?"Capturing screenshot…":"Sending…"),await new Promise(u=>requestAnimationFrame(()=>u()));const i=ge();if(s)try{const u=await we({excludeShadowRoot:this.shadow});r=await ve(u,this.pins,i.viewport,this.pinElements,this.getAccentColor())}catch(u){console.error("[launch-kit-beacon] screenshot capture failed at submit:",u)}const a=_(),c={description:n,severity:o,...r?{screenshot:{dataUrl:r,mime:"image/jpeg"}}:{},metadata:i,pins:this.pins,...a.length>0?{events:a}:{},...this.resolveContext()?{context:this.resolveContext()}:{}},l=new CustomEvent("beacon-before-submit",{detail:{payload:c},cancelable:!0,bubbles:!0,composed:!0});if(!this.dispatchEvent(l)){this.drawer.setSubmitting(!1),this.drawer.setStatus("Submission cancelled","error");return}this.drawer.setStatus("Sending…");try{const u=this.resolveHeaders(),g=await Vt(t.endpoint,c,u);this.drawer.setSubmitting(!1),g.ok?(this.submitSucceeded=!0,this.drawer.setStatus("Sent — thanks!","success"),this.dispatchEvent(new CustomEvent("beacon-after-submit",{detail:{response:g},bubbles:!0,composed:!0})),setTimeout(()=>{this.forceClose()},1500)):this.drawer.setStatus(`Failed: ${g.status}`,"error")}catch(u){this.drawer.setSubmitting(!1);const g=u instanceof Error?u.message:"Network error";this.drawer.setStatus(`Failed: ${g}`,"error")}}getAccentColor(){return typeof window>"u"?Ae:getComputedStyle(this).getPropertyValue("--beacon-accent").trim()||Ae}syncCustomProperties(){if(!this.drawer)return;const t=getComputedStyle(this);for(const n of Gt){const o=t.getPropertyValue(n).trim();o&&this.drawer.root.style.setProperty(n,o)}}hasUnsavedData(){var n;return this.pins.length>0?!0:(((n=this.drawer)==null?void 0:n.getDescription())??"").trim().length>0}resetState(){var t;this.pins=[],this.description="",this.severity="bug",this.pinElements=new WeakMap,(t=this.drawer)==null||t.reset()}forceClose(){var t;this.uninstallClickBlocker(),this.resetState(),this.submitSucceeded=!1,(t=this.drawer)==null||t.close()}installClickBlocker(){this.documentClickBlocker||(this.documentClickBlocker=t=>{const n=t.composedPath();if(!n.includes(this.shadow.host)){for(const o of n)if(o instanceof Element&&o.classList.contains("beacon-no-capture"))return;t.preventDefault(),t.stopPropagation()}},document.addEventListener("click",this.documentClickBlocker,!0))}uninstallClickBlocker(){this.documentClickBlocker&&(document.removeEventListener("click",this.documentClickBlocker,!0),this.documentClickBlocker=void 0)}resolveHeaders(){var n;const t=(n=this.config)==null?void 0:n.headers;if(t)return typeof t=="function"?t():t}resolveContext(){var n;const t=(n=this.config)==null?void 0:n.context;if(t)return typeof t=="function"?t():t}parseSeverities(){const t=this.getAttribute("severities");return t?t.split(",").map(n=>n.trim()).filter(Boolean):["bug","idea","ux","a11y"]}}function Te(e="launch-kit-beacon"){typeof window>"u"||customElements.get(e)||customElements.define(e,Le)}const Re=380,k=8,Yt=520;function Jt(e,t){const n=t.getBoundingClientRect(),o=window.innerWidth,r=window.innerHeight;let s=Math.max(k,o-n.right);o-s-Re<k&&(s=Math.max(k,o-Re-k));const a=r-n.bottom-k,c=n.top-k;e.style.left="auto",e.style.right=`${s}px`,a>=Yt||a>=c?(e.style.top=`${n.bottom+k}px`,e.style.bottom="auto"):(e.style.top="auto",e.style.bottom=`${r-n.top+k}px`)}const Qt=1024,Zt=5;function en(e,t){return e.length>t?e.slice(0,t):e}function $e(e){if(e.id)return`#${CSS.escape(e.id)}`;const t=[];let n=e;for(let o=0;o<3&&n;o++){const r=n.tagName.toLowerCase(),s=n.id?`#${CSS.escape(n.id)}`:"",i=n.classList.length>0?"."+Array.from(n.classList).slice(0,3).map(CSS.escape).join("."):"";if(t.unshift(`${r}${s}${i}`),s)break;n=n.parentElement}return t.join(" > ")}function Ie(e){return{tag:e.tagName.toLowerCase(),id:e.id||null,classes:Array.from(e.classList).slice(0,10),role:e.getAttribute("role"),selector:$e(e)}}function tn(e,t){const n=[],o=document.querySelectorAll("body *");for(const r of Array.from(o)){const s=getComputedStyle(r);if(s.position!=="fixed"&&s.position!=="sticky")continue;const i=r.getBoundingClientRect();if(e<i.left||e>i.right||t<i.top||t>i.bottom)continue;const a=parseInt(s.zIndex,10);!Number.isFinite(a)&&s.zIndex!=="auto"||n.push({tag:r.tagName.toLowerCase(),zIndex:Number.isFinite(a)?a:0,pointerEvents:s.pointerEvents,classes:Array.from(r.classList).slice(0,5).join(" ")})}return n.sort((r,s)=>s.zIndex-r.zIndex).slice(0,Zt)}function nn(e){const t=r=>s=>{const i=s,a=i.target;if(!(a instanceof Element))return;const c=i.clientX,l=i.clientY,d=document.elementFromPoint(c,l),u=d===a||(d?a.contains(d)||d.contains(a):!1),g=document.querySelectorAll('[role="dialog"][data-state="open"]').length,w=getComputedStyle(document.body).pointerEvents,v=tn(c,l);e.emitClick({kind:r,target:Ie(a),hitMatchesTarget:u,...!u&&d instanceof Element?{hitTarget:Ie(d)}:{},coords:{x:c,y:l},openDialogs:g,bodyPointerEvents:w,...v.length>0?{overlaysAtPoint:v}:{}})},n=t("click"),o=t("mousedown");return document.addEventListener("click",n,{capture:!0,passive:!0}),document.addEventListener("mousedown",o,{capture:!0,passive:!0}),()=>{document.removeEventListener("click",n,{capture:!0}),document.removeEventListener("mousedown",o,{capture:!0})}}function on(e){const t=history.pushState,n=history.replaceState;let o=window.location.href;const r=a=>{const c=window.location.href;if(c===o)return;const l=o;o=c,e.emitRoute({kind:"route",from:l,to:c,via:a})};history.pushState=function(...c){const l=t.apply(this,c);return r("pushState"),l},history.replaceState=function(...c){const l=n.apply(this,c);return r("replaceState"),l};const s=()=>r("popstate"),i=()=>r("hashchange");return window.addEventListener("popstate",s),window.addEventListener("hashchange",i),()=>{history.pushState=t,history.replaceState=n,window.removeEventListener("popstate",s),window.removeEventListener("hashchange",i)}}function rn(e){const t=new WeakSet,n=(r,s)=>{const i=$e(r);e.emitDialog({kind:"dialog",action:s,selector:i,state:r.getAttribute("data-state"),...s==="mount"?{outerHTML:en(r.outerHTML,Qt)}:{}})};for(const r of Array.from(document.querySelectorAll('[role="dialog"]')))t.add(r);const o=new MutationObserver(r=>{var s,i,a,c;for(const l of r){for(const d of Array.from(l.addedNodes)){if(!(d instanceof Element))continue;const u=(s=d.matches)!=null&&s.call(d,'[role="dialog"]')?[d]:Array.from(((i=d.querySelectorAll)==null?void 0:i.call(d,'[role="dialog"]'))??[]);for(const g of u)t.has(g)||(t.add(g),n(g,"mount"))}for(const d of Array.from(l.removedNodes)){if(!(d instanceof Element))continue;const u=(a=d.matches)!=null&&a.call(d,'[role="dialog"]')?[d]:Array.from(((c=d.querySelectorAll)==null?void 0:c.call(d,'[role="dialog"]'))??[]);for(const g of u)t.has(g)&&(t.delete(g),n(g,"unmount"))}l.type==="attributes"&&l.attributeName==="data-state"&&l.target instanceof Element&&l.target.getAttribute("role")==="dialog"&&n(l.target,"state")}});return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-state"]}),()=>o.disconnect()}function sn(e){const t=nn(e),n=on(e),o=rn(e);return{uninstall(){t(),n(),o()}}}const X=1e3;function G(e,t){return e.length>t?e.slice(0,t):e}function an(e){const t=window.fetch;if(typeof t!="function")return()=>{};const n=async(o,r)=>{const s=performance.now(),i=((r==null?void 0:r.method)??(o instanceof Request?o.method:"GET")).toUpperCase(),a=typeof o=="string"?o:o instanceof URL?o.toString():o.url;try{const c=await t.call(window,o,r),l=Math.round(performance.now()-s),d=c.status>=400;return(d||e.verbose)&&e.emit({kind:"fetch",url:G(a,X),method:i,status:c.status,durationMs:l,failed:d}),c}catch(c){const l=Math.round(performance.now()-s);throw e.emit({kind:"fetch",url:G(a,X),method:i,status:0,durationMs:l,failed:!0,error:c instanceof Error?c.message:String(c)}),c}};return n.__lsBeaconWrapped=!0,window.fetch=n,()=>{window.fetch.__lsBeaconWrapped&&(window.fetch=t)}}function cn(e){const t=XMLHttpRequest.prototype,n=t.open,o=t.send,r=new WeakMap;return t.open=function(i,a,...c){return r.set(this,{method:i.toUpperCase(),url:typeof a=="string"?a:a.toString(),start:0}),n.call(this,i,a,...c)},t.send=function(i){const a=r.get(this);a&&(a.start=performance.now());const c=()=>{this.removeEventListener("loadend",c);const l=r.get(this);if(!l)return;const d=Math.round(performance.now()-l.start),u=this.status===0||this.status>=400;(u||e.verbose)&&e.emit({kind:"xhr",url:G(l.url,X),method:l.method,status:this.status,durationMs:d,failed:u}),r.delete(this)};return this.addEventListener("loadend",c),o.call(this,i)},()=>{t.open=n,t.send=o}}function ln(e){const t=an(e),n=cn(e);return{uninstall(){t(),n()}}}const dn=1e3,Me=50,un=500;class hn{constructor(t){this.buffer=[],this.inflight=!1,this.timer=null,this.destroyed=!1,this.handleVisibilityChange=()=>{document.visibilityState==="hidden"&&this.flushSync()},this.url=t.url,this.sessionId=t.sessionId,this.onError=t.onError,this.timer=setInterval(()=>this.flush(),dn),this.pagehideHandler=()=>this.flushSync(),window.addEventListener("pagehide",this.pagehideHandler),document.addEventListener("visibilitychange",this.handleVisibilityChange)}enqueue(t){this.destroyed||(this.buffer.push(t),this.buffer.length>=un&&this.buffer.shift(),this.buffer.length>=Me&&this.flush())}async flush(){var o,r;if(this.destroyed||this.inflight||this.buffer.length===0)return;const t=this.buffer.splice(0,Me),n=this.makeBatch(t);this.inflight=!0;try{const s=await fetch(this.url,{method:"POST",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0});s.ok||(o=this.onError)==null||o.call(this,new Error(`monitor flush: HTTP ${s.status}`))}catch(s){(r=this.onError)==null||r.call(this,s instanceof Error?s:new Error(String(s)))}finally{this.inflight=!1}}flushSync(){if(this.destroyed||this.buffer.length===0)return;if(!navigator.sendBeacon){this.flush();return}const t=this.buffer.splice(0),n=this.makeBatch(t),o=new Blob([JSON.stringify(n)],{type:"application/json"});try{navigator.sendBeacon(this.url,o)}catch{}}destroy(){this.destroyed||(this.destroyed=!0,this.timer&&clearInterval(this.timer),this.pagehideHandler&&window.removeEventListener("pagehide",this.pagehideHandler),document.removeEventListener("visibilitychange",this.handleVisibilityChange),this.flushSync())}makeBatch(t){return{sessionId:this.sessionId,events:t,meta:{url:window.location.href,userAgent:navigator.userAgent,viewport:{w:window.innerWidth,h:window.innerHeight,dpr:window.devicePixelRatio||1},v:1}}}}const Y="__lsBeaconMonitorUrl",J="__lsBeaconMonitorSession",Q="__lsBeaconMonitorVerbose",Z="__lsBeaconMonitorDeadline",Pe=30*6e4,_e=4096;let b=null;const fn=new Set;let D=0;function De(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID().slice(0,8):Math.random().toString(36).slice(2,10)}function pn(e){const t=new WeakSet,n=o=>{if(o===null||typeof o!="object")return typeof o=="string"&&o.length>_e?o.slice(0,_e):o;if(t.has(o))return"[cyclic]";if(t.add(o),Array.isArray(o))return o.map(n);const r={};for(const s of Object.keys(o).slice(0,50))try{r[s]=n(o[s])}catch{r[s]="[unreadable]"}return r};try{return n(e)}catch{return"[unserialisable]"}}function Fe(){for(const e of fn)try{e(b!==null,(b==null?void 0:b.url)??null)}catch{}}function mn(e){return b?(b.seq+=1,{...e,ts:Date.now(),sessionId:b.sessionId,seq:b.seq}):{...e,ts:Date.now(),sessionId:"",seq:0}}function F(e){if(!b)return;const t=mn(e);b.transport.enqueue(t)}function bn(){if(b)try{sessionStorage.setItem(Y,b.url),sessionStorage.setItem(J,b.sessionId),sessionStorage.setItem(Q,b.verbose?"1":"0"),sessionStorage.setItem(Z,String(b.deadlineMs))}catch{}}function Oe(){try{sessionStorage.removeItem(Y),sessionStorage.removeItem(J),sessionStorage.removeItem(Q),sessionStorage.removeItem(Z)}catch{}}function gn(){try{const e=sessionStorage.getItem(Y);if(!e)return null;const t=sessionStorage.getItem(J)??De(),n=sessionStorage.getItem(Q)==="1",o=sessionStorage.getItem(Z),r=o?Number(o):Date.now()+Pe;return Number.isFinite(r)&&r<=Date.now()?(Oe(),null):{url:e,sessionId:t,verbose:n,deadlineMs:r}}catch{return null}}function Ue(e){if(b&&ee(),!e.url)return;const t=e.maxSessionMs??Pe,n=Date.now()+t,o=De(),r=!!e.verbose,s=new hn({url:e.url,sessionId:o,onError:u=>{console.warn("[launch-kit-beacon] monitor transport error:",u.message)}}),i=_();D=i.length;for(const u of i)Be(u,s,o);const a=ke(()=>{const u=_();for(;D<u.length;){const g=u[D];g&&Be(g,s,o),D+=1}}),c=ln({emit:u=>F(u),verbose:r}),l=sn({emitClick:u=>F(u),emitRoute:u=>F(u),emitDialog:u=>F(u)}),d=setTimeout(()=>{console.info("[launch-kit-beacon] monitor session expired (max duration reached)"),ee()},Math.max(0,n-Date.now()));b={url:e.url,sessionId:o,verbose:r,deadlineMs:n,seq:0,transport:s,uninstallNetwork:c.uninstall,uninstallDom:l.uninstall,uninstallErrors:a,deadlineTimer:d},bn(),Fe()}function Be(e,t,n){b&&(b.seq+=1,t.enqueue({kind:e.kind,ts:e.ts,sessionId:n,seq:b.seq,message:e.message,...e.stack?{stack:e.stack}:{},...e.source?{source:e.source}:{},...typeof e.line=="number"?{line:e.line}:{},...typeof e.col=="number"?{col:e.col}:{}}))}function ee(){b&&(clearTimeout(b.deadlineTimer),b.uninstallNetwork(),b.uninstallDom(),b.uninstallErrors(),b.transport.destroy(),b=null,D=0,Oe(),Fe())}function yn(e,t){b&&F({kind:"probe",label:e.slice(0,200),data:pn(t)})}function wn(){return b!==null}function vn(){return(b==null?void 0:b.url)??null}const xn={start:Ue,stop:ee,probe:yn,isActive:wn,currentUrl:vn};function Sn(){if(b)return;const e=gn();e&&Ue({url:e.url,verbose:e.verbose,maxSessionMs:Math.max(6e4,e.deadlineMs-Date.now())})}function En(){if(typeof window>"u")return;const e=window;e.__lsBeacon||(e.__lsBeacon=xn)}Te(),Wt(),En(),Sn();function kn(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),o=n.createElement("base"),r=n.createElement("a");return n.head.appendChild(o),n.body.appendChild(r),t&&(o.href=t),r.href=e,r.href}const Cn=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function C(e){const t=[];for(let n=0,o=e.length;n<o;n++)t.push(e[n]);return t}let $=null;function je(e={}){return $||(e.includeStyleProperties?($=e.includeStyleProperties,$):($=C(window.getComputedStyle(document.documentElement)),$))}function j(e,t){const o=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return o?parseFloat(o.replace("px","")):0}function An(e){const t=j(e,"border-left-width"),n=j(e,"border-right-width");return e.clientWidth+t+n}function Ln(e){const t=j(e,"border-top-width"),n=j(e,"border-bottom-width");return e.clientHeight+t+n}function te(e,t={}){const n=t.width||An(e),o=t.height||Ln(e);return{width:n,height:o}}function Tn(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const x=16384;function Rn(e){(e.width>x||e.height>x)&&(e.width>x&&e.height>x?e.width>e.height?(e.height*=x/e.width,e.width=x):(e.width*=x/e.height,e.height=x):e.width>x?(e.height*=x/e.width,e.width=x):(e.width*=x/e.height,e.height=x))}function $n(e,t={}){return e.toBlob?new Promise(n=>{e.toBlob(n,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(n=>{const o=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),r=o.length,s=new Uint8Array(r);for(let i=0;i<r;i+=1)s[i]=o.charCodeAt(i);n(new Blob([s],{type:t.type?t.type:"image/png"}))})}function N(e){return new Promise((t,n)=>{const o=new Image;o.onload=()=>{o.decode().then(()=>{requestAnimationFrame(()=>t(o))})},o.onerror=n,o.crossOrigin="anonymous",o.decoding="async",o.src=e})}async function In(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Mn(e,t,n){const o="http://www.w3.org/2000/svg",r=document.createElementNS(o,"svg"),s=document.createElementNS(o,"foreignObject");return r.setAttribute("width",`${t}`),r.setAttribute("height",`${n}`),r.setAttribute("viewBox",`0 0 ${t} ${n}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),r.appendChild(s),s.appendChild(e),In(r)}const y=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||y(n,t)};function Pn(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function _n(e,t){return je(t).map(n=>{const o=e.getPropertyValue(n),r=e.getPropertyPriority(n);return`${n}: ${o}${r?" !important":""};`}).join(" ")}function Dn(e,t,n,o){const r=`.${e}:${t}`,s=n.cssText?Pn(n):_n(n,o);return document.createTextNode(`${r}{${s}}`)}function Ne(e,t,n,o){const r=window.getComputedStyle(e,n),s=r.getPropertyValue("content");if(s===""||s==="none")return;const i=Cn();try{t.className=`${t.className} ${i}`}catch{return}const a=document.createElement("style");a.appendChild(Dn(i,n,r,o)),t.appendChild(a)}function Fn(e,t,n){Ne(e,t,":before",n),Ne(e,t,":after",n)}const He="application/font-woff",ze="image/jpeg",On={woff:He,woff2:He,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:ze,jpeg:ze,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Un(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ne(e){const t=Un(e).toLowerCase();return On[t]||""}function Bn(e){return e.split(/,/)[1]}function oe(e){return e.search(/^(data:)/)!==-1}function jn(e,t){return`data:${t};base64,${e}`}async function qe(e,t,n){const o=await fetch(e,t);if(o.status===404)throw new Error(`Resource "${o.url}" not found`);const r=await o.blob();return new Promise((s,i)=>{const a=new FileReader;a.onerror=i,a.onloadend=()=>{try{s(n({res:o,result:a.result}))}catch(c){i(c)}},a.readAsDataURL(r)})}const re={};function Nn(e,t,n){let o=e.replace(/\?.*/,"");return n&&(o=e),/ttf|otf|eot|woff2?/i.test(o)&&(o=o.replace(/.*\//,"")),t?`[${t}]${o}`:o}async function se(e,t,n){const o=Nn(e,t,n.includeQueryParams);if(re[o]!=null)return re[o];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let r;try{const s=await qe(e,n.fetchRequestInit,({res:i,result:a})=>(t||(t=i.headers.get("Content-Type")||""),Bn(a)));r=jn(s,t)}catch(s){r=n.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;s&&(i=typeof s=="string"?s:s.message),i&&console.warn(i)}return re[o]=r,r}async function Hn(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):N(t)}async function zn(e,t){if(e.currentSrc){const s=document.createElement("canvas"),i=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,i==null||i.drawImage(e,0,0,s.width,s.height);const a=s.toDataURL();return N(a)}const n=e.poster,o=ne(n),r=await se(n,o,t);return N(r)}async function qn(e,t){var n;try{if(!((n=e==null?void 0:e.contentDocument)===null||n===void 0)&&n.body)return await H(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Wn(e,t){return y(e,HTMLCanvasElement)?Hn(e):y(e,HTMLVideoElement)?zn(e,t):y(e,HTMLIFrameElement)?qn(e,t):e.cloneNode(We(e))}const Vn=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",We=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Kn(e,t,n){var o,r;if(We(t))return t;let s=[];return Vn(e)&&e.assignedNodes?s=C(e.assignedNodes()):y(e,HTMLIFrameElement)&&(!((o=e.contentDocument)===null||o===void 0)&&o.body)?s=C(e.contentDocument.body.childNodes):s=C(((r=e.shadowRoot)!==null&&r!==void 0?r:e).childNodes),s.length===0||y(e,HTMLVideoElement)||await s.reduce((i,a)=>i.then(()=>H(a,n)).then(c=>{c&&t.appendChild(c)}),Promise.resolve()),t}function Xn(e,t,n){const o=t.style;if(!o)return;const r=window.getComputedStyle(e);r.cssText?(o.cssText=r.cssText,o.transformOrigin=r.transformOrigin):je(n).forEach(s=>{let i=r.getPropertyValue(s);s==="font-size"&&i.endsWith("px")&&(i=`${Math.floor(parseFloat(i.substring(0,i.length-2)))-.1}px`),y(e,HTMLIFrameElement)&&s==="display"&&i==="inline"&&(i="block"),s==="d"&&t.getAttribute("d")&&(i=`path(${t.getAttribute("d")})`),o.setProperty(s,i,r.getPropertyPriority(s))})}function Gn(e,t){y(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),y(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function Yn(e,t){if(y(e,HTMLSelectElement)){const n=t,o=Array.from(n.children).find(r=>e.value===r.getAttribute("value"));o&&o.setAttribute("selected","")}}function Jn(e,t,n){return y(t,Element)&&(Xn(e,t,n),Fn(e,t,n),Gn(e,t),Yn(e,t)),t}async function Qn(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const o={};for(let s=0;s<n.length;s++){const a=n[s].getAttribute("xlink:href");if(a){const c=e.querySelector(a),l=document.querySelector(a);!c&&l&&!o[a]&&(o[a]=await H(l,t,!0))}}const r=Object.values(o);if(r.length){const s="http://www.w3.org/1999/xhtml",i=document.createElementNS(s,"svg");i.setAttribute("xmlns",s),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.style.display="none";const a=document.createElementNS(s,"defs");i.appendChild(a);for(let c=0;c<r.length;c++)a.appendChild(r[c]);e.appendChild(i)}return e}async function H(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(o=>Wn(o,t)).then(o=>Kn(e,o,t)).then(o=>Jn(e,o,t)).then(o=>Qn(o,t))}const Ve=/url\((['"]?)([^'"]+?)\1\)/g,Zn=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,eo=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function to(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function no(e){const t=[];return e.replace(Ve,(n,o,r)=>(t.push(r),n)),t.filter(n=>!oe(n))}async function oo(e,t,n,o,r){try{const s=n?kn(t,n):t,i=ne(t);let a;return r||(a=await se(s,i,o)),e.replace(to(t),`$1${a}$3`)}catch{}return e}function ro(e,{preferredFontFormat:t}){return t?e.replace(eo,n=>{for(;;){const[o,,r]=Zn.exec(n)||[];if(!r)return"";if(r===t)return`src: ${o};`}}):e}function Ke(e){return e.search(Ve)!==-1}async function Xe(e,t,n){if(!Ke(e))return e;const o=ro(e,n);return no(o).reduce((s,i)=>s.then(a=>oo(a,i,t,n)),Promise.resolve(o))}async function I(e,t,n){var o;const r=(o=t.style)===null||o===void 0?void 0:o.getPropertyValue(e);if(r){const s=await Xe(r,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function so(e,t){await I("background",e,t)||await I("background-image",e,t),await I("mask",e,t)||await I("-webkit-mask",e,t)||await I("mask-image",e,t)||await I("-webkit-mask-image",e,t)}async function io(e,t){const n=y(e,HTMLImageElement);if(!(n&&!oe(e.src))&&!(y(e,SVGImageElement)&&!oe(e.href.baseVal)))return;const o=n?e.src:e.href.baseVal,r=await se(o,ne(o),t);await new Promise((s,i)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...c)=>{try{s(t.onImageErrorHandler(...c))}catch(l){i(l)}}:i;const a=e;a.decode&&(a.decode=s),a.loading==="lazy"&&(a.loading="eager"),n?(e.srcset="",e.src=r):e.href.baseVal=r})}async function ao(e,t){const o=C(e.childNodes).map(r=>Ge(r,t));await Promise.all(o).then(()=>e)}async function Ge(e,t){y(e,Element)&&(await so(e,t),await io(e,t),await ao(e,t))}function co(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const o=t.style;return o!=null&&Object.keys(o).forEach(r=>{n[r]=o[r]}),e}const Ye={};async function Je(e){let t=Ye[e];if(t!=null)return t;const o=await(await fetch(e)).text();return t={url:e,cssText:o},Ye[e]=t,t}async function Qe(e,t){let n=e.cssText;const o=/url\(["']?([^"')]+)["']?\)/g,s=(n.match(/url\([^)]+\)/g)||[]).map(async i=>{let a=i.replace(o,"$1");return a.startsWith("https://")||(a=new URL(a,e.url).href),qe(a,t.fetchRequestInit,({result:c})=>(n=n.replace(i,`url(${c})`),[i,c]))});return Promise.all(s).then(()=>n)}function Ze(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let o=e.replace(n,"");const r=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const c=r.exec(o);if(c===null)break;t.push(c[0])}o=o.replace(r,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",a=new RegExp(i,"gi");for(;;){let c=s.exec(o);if(c===null){if(c=a.exec(o),c===null)break;s.lastIndex=a.lastIndex}else a.lastIndex=s.lastIndex;t.push(c[0])}return t}async function lo(e,t){const n=[],o=[];return e.forEach(r=>{if("cssRules"in r)try{C(r.cssRules||[]).forEach((s,i)=>{if(s.type===CSSRule.IMPORT_RULE){let a=i+1;const c=s.href,l=Je(c).then(d=>Qe(d,t)).then(d=>Ze(d).forEach(u=>{try{r.insertRule(u,u.startsWith("@import")?a+=1:r.cssRules.length)}catch(g){console.error("Error inserting rule from remote css",{rule:u,error:g})}})).catch(d=>{console.error("Error loading remote css",d.toString())});o.push(l)}})}catch(s){const i=e.find(a=>a.href==null)||document.styleSheets[0];r.href!=null&&o.push(Je(r.href).then(a=>Qe(a,t)).then(a=>Ze(a).forEach(c=>{i.insertRule(c,i.cssRules.length)})).catch(a=>{console.error("Error loading remote stylesheet",a)})),console.error("Error inlining remote css file",s)}}),Promise.all(o).then(()=>(e.forEach(r=>{if("cssRules"in r)try{C(r.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${r.href}`,s)}}),n))}function uo(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Ke(t.style.getPropertyValue("src")))}async function ho(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=C(e.ownerDocument.styleSheets),o=await lo(n,t);return uo(o)}function et(e){return e.trim().replace(/["']/g,"")}function fo(e){const t=new Set;function n(o){(o.style.fontFamily||getComputedStyle(o).fontFamily).split(",").forEach(s=>{t.add(et(s))}),Array.from(o.children).forEach(s=>{s instanceof HTMLElement&&n(s)})}return n(e),t}async function tt(e,t){const n=await ho(e,t),o=fo(e);return(await Promise.all(n.filter(s=>o.has(et(s.style.fontFamily))).map(s=>{const i=s.parentStyleSheet?s.parentStyleSheet.href:null;return Xe(s.cssText,i,t)}))).join(`
|
|
107
|
-
|
|
709
|
+
"></span>`;function c(b){return b.replace(/[<>&]/g,m=>({"<":"<",">":">","&":"&"})[m])}document.body.appendChild(r),document.body.appendChild(i);const u=new Map;function l(b){const m=document.createElement("div");return m.className=q,m.setAttribute("aria-hidden","true"),m.style.cssText=["position: fixed","width: 24px","height: 24px","border-radius: 999px",`background: ${t}`,"color: #fff","display: flex","align-items: center","justify-content: center","font: 700 12px/1 system-ui, -apple-system, sans-serif","border: 2px solid #fff","box-shadow: 0 2px 8px hsl(0 0% 0% / 0.4)","pointer-events: none","z-index: 2147483646"].join("; "),m.textContent=String(b),document.body.appendChild(m),m}function p(){const b=document.createElement("div");return b.className=q,b.setAttribute("aria-hidden","true"),b.style.cssText=["position: fixed","pointer-events: none",`border: 2px solid ${t}`,"border-radius: 2px","box-sizing: border-box","z-index: 2147483645"].join("; "),document.body.appendChild(b),b}function f(b,m,h){const y=h?"0.5":"1";b.outline.style.display="block",b.outline.style.opacity=y,b.outline.style.left=`${m.x}px`,b.outline.style.top=`${m.y}px`,b.outline.style.width=`${m.w}px`,b.outline.style.height=`${m.h}px`,b.marker.style.display="flex",b.marker.style.opacity=y,b.marker.style.left=`${m.x+m.w-12}px`,b.marker.style.top=`${Math.max(2,m.y-12)}px`}function g(b){b.marker.style.display="none",b.outline.style.display="none"}function d(){u.forEach(b=>{let m=b.anchor.target;if(document.contains(m)||(m=null),!m&&b.anchor.selector&&(m=document.querySelector(b.anchor.selector),m&&(b.anchor.target=m)),m){const y=m.getBoundingClientRect();if(y.width>0||y.height>0){f(b,{x:y.left,y:y.top,w:y.width,h:y.height},!1);return}}const h=b.anchor.fallbackRect;if(h&&(h.w>0||h.h>0)){f(b,h,!0);return}g(b)})}let w=null;function E(){w===null&&(w=requestAnimationFrame(()=>{w=null,d()}))}return window.addEventListener("scroll",E,!0),window.addEventListener("resize",E),{addPin(b,m){const h=l(b),y=p();u.set(b,{anchor:m,marker:h,outline:y}),d()},setLoading(b){b?i.innerHTML=s+c(b):i.textContent=Oe},destroy(){window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E),w!==null&&cancelAnimationFrame(w),r.remove(),i.remove(),a.remove(),u.forEach(({marker:b,outline:m})=>{b.remove(),m.remove()}),u.clear()}}}const Rn='<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>',Pn='<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>';function In(e){return new Promise(t=>{const n=document.createElement("div");n.className="beacon-pin-popover open beacon-no-capture beacon-theme-auto",n.innerHTML=`
|
|
710
|
+
<div class="beacon-pin-popover-header">
|
|
711
|
+
<div style="display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;">
|
|
712
|
+
<span class="beacon-pin-num">${e.pinNumber}</span>
|
|
713
|
+
<span>Note for this pin</span>
|
|
714
|
+
</div>
|
|
715
|
+
<button type="button" class="beacon-icon-btn" data-action="cancel" aria-label="Discard this pin">${Rn}</button>
|
|
716
|
+
</div>
|
|
717
|
+
<textarea class="beacon-textarea" rows="2" placeholder="Optional — describe what's wrong here…" style="min-height:48px;"></textarea>
|
|
718
|
+
<div class="beacon-pin-popover-actions">
|
|
719
|
+
<button type="button" class="beacon-btn primary" data-action="save">${Pn} Save</button>
|
|
720
|
+
</div>
|
|
721
|
+
`;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);n.style.left=`${r}px`,n.style.top=`${i}px`,document.body.appendChild(n);const s=n.querySelector("textarea");s.focus();function c(l){document.removeEventListener("keydown",u,!0),n.remove(),t(l)}function u(l){l.key==="Escape"&&(l.preventDefault(),l.stopPropagation(),c({cancelled:"all"}))}document.addEventListener("keydown",u,!0),n.addEventListener("click",l=>{var g;const f=(g=l.target.closest("[data-action]"))==null?void 0:g.getAttribute("data-action");if(f==="cancel"&&c({cancelled:"pin"}),f==="save"){const d=s.value.trim();c({...d?{note:d}:{},cancelled:!1})}}),s.addEventListener("keydown",l=>{if(l.key==="Enter"&&(l.metaKey||l.ctrlKey)){l.preventDefault();const p=s.value.trim();c({...p?{note:p}:{},cancelled:!1})}})})}const Nn="#0ea5e9";function _n(e,t){return/^#[0-9a-fA-F]{6}$/.test(e)?`${e}${t}`:e}function $n(e){const{shadowRoot:t,onHover:n}=e,o=e.accent??Nn,a=_n(o,"14"),r=document.createElement("div");r.style.cssText=["position: fixed","pointer-events: none","z-index: 2147483646",`border: 2px solid ${o}`,`background: ${a}`,"transition: all 60ms ease-out","box-sizing: border-box","border-radius: 2px"].join("; "),document.body.appendChild(r);const i=document.createElement("div");i.style.cssText=["position: fixed","pointer-events: none","z-index: 2147483647","background: #0f172a","color: #fff","font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace","padding: 3px 6px","border-radius: 3px","max-width: 280px","overflow: hidden","text-overflow: ellipsis","white-space: nowrap"].join("; "),document.body.appendChild(i);const s=document.body.style.cursor;document.body.style.cursor="crosshair";let c=!1,u=()=>{};const l=new Promise(h=>{u=h});function p(h){if(!h||!(h instanceof Node))return!1;let y=h;for(;y;){if(y===t||y===t.host)return!0;y=y.parentNode??y.host??null}return!1}function f(h,y){r.style.display="none",i.style.display="none";const k=document.elementsFromPoint(h,y);r.style.display="block",i.style.display="block";for(const A of k)if(!p(A))return A;return null}function g(h){const y=h.getBoundingClientRect();r.style.left=`${y.left}px`,r.style.top=`${y.top}px`,r.style.width=`${y.width}px`,r.style.height=`${y.height}px`;const k=h.tagName.toLowerCase(),A=h.classList.length>0?"."+Array.from(h.classList).slice(0,2).join("."):"";i.textContent=k+A;const S=y.top-22;i.style.left=`${y.left}px`,i.style.top=`${S>=0?S:y.bottom+4}px`}function d(h){const y=f(h.clientX,h.clientY);y?(g(y),n==null||n(y)):(r.style.display="none",i.style.display="none",n==null||n(null))}function w(h){if(h.button!==0)return;h.preventDefault(),h.stopPropagation();const y=f(h.clientX,h.clientY);y&&m(y)}function E(h){h.preventDefault(),h.stopPropagation()}function b(h){h.key==="Escape"&&(h.preventDefault(),m(null))}function m(h){c||(c=!0,document.removeEventListener("mousemove",d,!0),document.removeEventListener("pointerdown",w,!0),document.removeEventListener("click",E,!0),document.removeEventListener("mouseup",E,!0),document.removeEventListener("keydown",b,!0),r.remove(),i.remove(),document.body.style.cursor=s,u(h))}return document.addEventListener("mousemove",d,!0),document.addEventListener("pointerdown",w,!0),document.addEventListener("click",E,!0),document.addEventListener("mouseup",E,!0),document.addEventListener("keydown",b,!0),{cancel:()=>m(null),promise:l}}let ae=null;async function Dn(){return ae||(ae=await Promise.resolve().then(()=>Nr)),ae}const Y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkAAIAAAoAAv/lxKUAAAAASUVORK5CYII=";function Be(e,t){if(!e||e.startsWith("data:")||e.startsWith("blob:")||e.startsWith("/")||e.startsWith("#"))return!0;try{if(new URL(e,window.location.href).origin===window.location.origin)return!0}catch{return!1}return t==="anonymous"||t==="use-credentials"}function Fn(){const e=[],t=[];return document.querySelectorAll("img").forEach(n=>{Be(n.src,n.crossOrigin)||(e.push({el:n,src:n.src}),n.src=Y)}),document.querySelectorAll("image").forEach(n=>{const o=n,a=o.getAttribute("href"),r=o.getAttributeNS("http://www.w3.org/1999/xlink","href"),i=a||r||"";i&&!Be(i)&&(t.push({el:o,href:a,xlink:r}),a!==null&&o.setAttribute("href",Y),r!==null&&o.setAttributeNS("http://www.w3.org/1999/xlink","href",Y))}),()=>{for(const{el:n,src:o}of e)n.src=o;for(const{el:n,href:o,xlink:a}of t)o!==null&&n.setAttribute("href",o),a!==null&&n.setAttributeNS("http://www.w3.org/1999/xlink","href",a)}}function On(){const e=[];document.querySelectorAll("*").forEach(r=>{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;(s||c)&&e.push(r)});const t=window.scrollX,n=window.scrollY,o=e.map(r=>({el:r,scrollLeft:r.scrollLeft,scrollTop:r.scrollTop})),a=new Map;for(const r of e){let i=r;for(;i&&i!==document.documentElement.parentElement;)a.has(i)||a.set(i,i.style.cssText),i=i.parentElement}for(const r of a.keys())r.style.setProperty("overflow","visible","important"),r.style.setProperty("overflow-x","visible","important"),r.style.setProperty("overflow-y","visible","important"),r.style.setProperty("max-height","none","important"),r.style.setProperty("height","auto","important"),r.style.setProperty("min-height","0","important");return()=>{for(const[r,i]of a)r.style.cssText=i;for(const{el:r,scrollLeft:i,scrollTop:s}of o)r.scrollLeft=i,r.scrollTop=s;window.scrollTo(t,n)}}let Ue=Promise.resolve();async function ze(e={}){const t=Ue;let n;Ue=new Promise(o=>{n=o});try{return await t,await Hn(e,n)}catch(o){throw n(),o}}async function Hn(e,t){const{quality:n=.7,pixelRatio:o=Math.min(window.devicePixelRatio||1,2),excludeShadowRoot:a,excludeHosts:r,fullPage:i=!0}=e,s=await Dn(),c=a||r!=null&&r.length?g=>{let d=g;for(;d;){if(a&&d===a.host||r&&d instanceof Element&&r.includes(d)||d instanceof Element&&d.classList.contains("beacon-no-capture"))return!1;d=d.parentNode}return!0}:void 0,u=Fn(),l=i?On():()=>{};let p=!1;const f=()=>{if(!p){p=!0;try{l()}finally{try{u()}finally{t()}}}};try{i&&await new Promise(b=>requestAnimationFrame(()=>b()));const g=document.documentElement,d=i?Math.max(g.scrollWidth,window.innerWidth):window.innerWidth,w=i?Math.max(g.scrollHeight,window.innerHeight):window.innerHeight;return{dataUrl:await s.toJpeg(g,{quality:n,pixelRatio:o,cacheBust:!0,...c?{filter:c}:{},imagePlaceholder:Y,width:d,height:w,style:{transform:"none"}}),width:d,height:w,pixelRatio:o,dispose:f}}catch(g){throw f(),g}}let ie=null;function Bn(e){ie=e}function Un(){return ie}function F(){ie=null}const qe="http://www.w3.org/2000/svg";function zn(){const e=document.createElementNS(qe,"svg");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");const t=["M3 6h18","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6","M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"];for(const n of t){const o=document.createElementNS(qe,"path");o.setAttribute("d",n),e.appendChild(o)}return e}function je(e={}){const t=e.maxPins??20;let n=[],o=new WeakMap,a=null,r=0,i=null,s=null,c=null,u=null;function l(){n=[],o=new WeakMap,a=null,r+=1,F(),E(),b()}function p(){const m=document.querySelector("launch-kit-beacon");return(m==null?void 0:m.shadowRoot)??null}function f(){if(typeof window>"u")return e.accent??"#0ea5e9";if(e.accent)return e.accent;const m=document.querySelector("launch-kit-beacon");return m&&getComputedStyle(m).getPropertyValue("--beacon-accent").trim()||"#0ea5e9"}async function g(m){const h=p();if(!h)return;const y=f(),k=await m.requestMode("pickElement"),A=Mn({accent:y});for(const S of n){const L=o.get(S);L&&A.addPin(S.number,{target:L,selector:S.selector,fallbackRect:S.boundingRect})}try{let S=!0;for(;S&&!(n.length>=t);){const I=await $n({shadowRoot:h,accent:y}).promise;if(!I)break;const x=I.getBoundingClientRect(),T=await In({anchor:{x:x.left,y:x.bottom},pinNumber:n.length+1});if(T.cancelled==="all"){S=!1;break}if(T.cancelled==="pin")continue;const N=vn(I),$={number:n.length+1,...N,...T.note?{note:T.note}:{}};n.push($),o.set($,I),A.addPin($.number,{target:I,selector:N.selector,fallbackRect:N.boundingRect})}n.length>0?(A.setLoading("Capturing screenshot…"),await new Promise(L=>requestAnimationFrame(()=>L())),await d()):(a=null,F())}finally{A.destroy(),k()}E(),b()}async function d(){const m=++r;if(n.length===0){a=null,F(),b();return}const h=f();try{const y=Array.from(document.querySelectorAll("launch-kit-beacon")),k=await ze({excludeHosts:y});try{if(m!==r)return;const A=n.map(I=>({number:I.number,selector:I.selector,boundingRect:I.boundingRect,...o.get(I)?{liveElement:o.get(I)}:{}})),S={w:k.width,h:k.height,dpr:k.pixelRatio},L=await Fe(k.dataUrl,A,S,h);if(m!==r)return;a=L,Bn({dataUrl:L,mime:"image/jpeg"})}finally{k.dispose()}}catch{if(m!==r)return;a=null,F()}m===r&&b()}function w(m){const h=n.findIndex(y=>y.number===m);h!==-1&&(n.splice(h,1),n.forEach((y,k)=>{y.number=k+1}),a=null,F(),E(),b(),d())}function E(){if(i&&(i.textContent=`Pins (${n.length})`,i.style.display=n.length===0?"none":""),u&&(u.textContent=n.length===0?"Annotate elements":"Add another pin"),!!s){s.innerHTML="",s.style.display=n.length===0?"none":"";for(const m of n){const h=document.createElement("div");h.className="beacon-pin-item",h.dataset.pin=String(m.number);const y=document.createElement("span");y.className="beacon-pin-num",y.textContent=String(m.number);const k=document.createElement("div");k.className="beacon-pin-meta";const A=document.createElement("div");A.className="beacon-pin-selector",A.title=m.selector,A.textContent=m.selector||m.tagName;const S=document.createElement("input");S.type="text",S.className="beacon-pin-note-input",S.placeholder="Add a note (optional)",S.value=m.note??"",S.addEventListener("input",()=>{S.value.trim()?m.note=S.value:delete m.note}),k.appendChild(A),k.appendChild(S);const L=document.createElement("button");L.type="button",L.className="beacon-icon-btn",L.setAttribute("aria-label",`Remove pin ${m.number}`),L.appendChild(zn()),L.addEventListener("click",()=>w(m.number)),h.appendChild(y),h.appendChild(k),h.appendChild(L),s.appendChild(h)}}}function b(){c&&(a?(c.src=a,c.style.display="block"):(c.removeAttribute("src"),c.style.display="none"))}return{name:"domEle",setupOnce(m){return m.on("close",()=>l())},form(m){return{render:h=>(i=document.createElement("div"),i.className="beacon-pin-list-header",h.appendChild(i),s=document.createElement("div"),s.className="beacon-pin-list",h.appendChild(s),u=document.createElement("button"),u.type="button",u.className="beacon-btn secondary beacon-pin-annotate",u.addEventListener("click",()=>{g(m)}),h.appendChild(u),c=document.createElement("img"),c.className="beacon-thumb",c.alt="Annotated screenshot preview",c.style.display="none",h.appendChild(c),E(),b(),()=>{i=null,s=null,c=null,u=null})}},capture(){return n.length===0?null:{pins:n}}}}function Ve(e){return!!e&&typeof e=="object"&&!("v"in e)&&"error"in e}function We(e={}){return{name:"domSS",async capture(t){const n=Un();if(n)return{dataUrl:n.dataUrl,mime:n.mime};const o=await t.requestMode("hide");try{await new Promise(i=>requestAnimationFrame(()=>i()));const a=Array.from(document.querySelectorAll("launch-kit-beacon")),r=await ze({quality:e.quality,pixelRatio:e.pixelRatio,excludeHosts:a});try{const i=t.captured("domEle"),s=qn(i),c={w:r.width,h:r.height,dpr:r.pixelRatio},u=e.accent??jn();return{dataUrl:s.length>0?await Fe(r.dataUrl,s,c,u):r.dataUrl,mime:"image/jpeg"}}finally{r.dispose()}}finally{o()}}}}function qn(e){if(!e||Ve(e))return[];const t=e.pins;return Array.isArray(t)?t.filter(n=>!!n&&typeof n=="object").map(n=>({number:Number(n.number)||0,selector:typeof n.selector=="string"?n.selector:void 0,boundingRect:n.boundingRect??{x:0,y:0,w:0,h:0}})):[]}function jn(){if(typeof window>"u")return"#0ea5e9";const e=document.querySelector("launch-kit-beacon");return e&&getComputedStyle(e).getPropertyValue("--beacon-accent").trim()||"#0ea5e9"}const Xe="beacon-no-capture",Ye="__lsBeaconMonitorChipPos",Vn="#10b981";function Wn(e){const t=e.accent??Vn,n=e.startedAt??Date.now(),o=document.createElement("div");o.className=`${Xe} beacon-monitor-overlay-frame`,o.setAttribute("aria-hidden","true"),o.style.setProperty("--beacon-monitor-accent",t),document.body.appendChild(o);const a=document.createElement("div");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);const r=document.createElement("div");r.className="beacon-monitor-overlay-chip-row";const i=document.createElement("span");i.className="beacon-monitor-overlay-rec-dot",i.setAttribute("aria-hidden","true");const s=document.createElement("span");s.className="beacon-monitor-overlay-rec-label",s.textContent="REC";const c=document.createElement("span");c.className="beacon-monitor-overlay-sep",c.setAttribute("aria-hidden","true"),c.textContent="·";const u=document.createElement("span");u.className="beacon-monitor-overlay-timer",u.textContent="00:00";const l=document.createElement("button");l.type="button",l.className="beacon-monitor-overlay-stop",l.textContent="Stop",l.setAttribute("aria-label","Stop monitoring"),r.appendChild(i),r.appendChild(s),r.appendChild(c),r.appendChild(u),r.appendChild(l),a.appendChild(r);const p=document.createElement("div");p.className="beacon-monitor-overlay-url",e.url?(p.textContent=e.url,p.title=e.url):p.style.display="none",a.appendChild(p),document.body.appendChild(a);const f=g()??d();E(w(f));function g(){try{const x=localStorage.getItem(Ye);if(!x)return null;const T=JSON.parse(x),N=typeof T.x=="number"?T.x:NaN,$=typeof T.y=="number"?T.y:NaN;return!Number.isFinite(N)||!Number.isFinite($)?null:{x:N,y:$}}catch{return null}}function d(){const T=a.getBoundingClientRect().width||200;return{x:Math.max(8,Math.floor((window.innerWidth-T)/2)),y:16}}function w(x){const N=a.getBoundingClientRect(),$=N.width||200,_r=N.height||40,$r=Math.max(8,window.innerWidth-$-8),Dr=Math.max(8,window.innerHeight-_r-8);return{x:Math.min(Math.max(8,x.x),$r),y:Math.min(Math.max(8,x.y),Dr)}}function E(x){a.style.left=`${x.x}px`,a.style.top=`${x.y}px`}let b=!1,m=null,h={x:0,y:0};function y(x){if(x.target instanceof Element&&x.target.closest(".beacon-monitor-overlay-stop"))return;x.preventDefault(),b=!0,m=x.pointerId;try{a.setPointerCapture(x.pointerId)}catch{}a.setAttribute("data-dragging","true");const T=a.getBoundingClientRect();h={x:x.clientX-T.left,y:x.clientY-T.top}}function k(x){!b||x.pointerId!==m||E(w({x:x.clientX-h.x,y:x.clientY-h.y}))}function A(x){if(!b||x.pointerId!==m)return;b=!1,m=null,a.removeAttribute("data-dragging");try{a.releasePointerCapture(x.pointerId)}catch{}const T=a.getBoundingClientRect();try{localStorage.setItem(Ye,JSON.stringify({x:T.left,y:T.top}))}catch{}}a.addEventListener("pointerdown",y),a.addEventListener("pointermove",k),a.addEventListener("pointerup",A),a.addEventListener("pointercancel",A),l.addEventListener("click",x=>{x.stopPropagation(),e.onStop()});function S(){const x=a.getBoundingClientRect();E(w({x:x.left,y:x.top}))}window.addEventListener("resize",S);function L(){const x=Math.max(0,Math.floor((Date.now()-n)/1e3));u.textContent=Xn(x)}L();const I=window.setInterval(L,1e3);return{updateUrl(x){x?(p.textContent=x,p.title=x,p.style.display=""):p.style.display="none"},destroy(){window.clearInterval(I),window.removeEventListener("resize",S),a.removeEventListener("pointerdown",y),a.removeEventListener("pointermove",k),a.removeEventListener("pointerup",A),a.removeEventListener("pointercancel",A),o.remove(),a.remove()}}}function Xn(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=e%60;return t>0?`${j(t)}:${j(n)}:${j(o)}`:`${j(n)}:${j(o)}`}function j(e){return e<10?`0${e}`:String(e)}const G=80,Yn='button, a, input[type="submit"], input[type="button"], [role="button"], [role="link"], [role="menuitem"], [role="tab"], [role="option"]',Gn=1024,Kn=5;function Jn(e,t){return e.length>t?e.slice(0,t):e}function se(e){if(e.id)return`#${CSS.escape(e.id)}`;const t=[];let n=e;for(let o=0;o<5&&n;o++){const a=n.tagName.toLowerCase(),r=n.id?`#${CSS.escape(n.id)}`:"",i=n.classList.length>0?"."+Array.from(n.classList).slice(0,3).map(CSS.escape).join("."):"";if(t.unshift(`${a}${r}${i}`),r)break;n=n.parentElement}return t.join(" > ")}function K(e,t){if(!e)return;const n=e.replace(/\s+/g," ").trim();if(n)return n.length>t?n.slice(0,t):n}function Ge(e){const t=K(e.textContent,G),n=K(e.getAttribute("aria-label"),G),o=e.getAttribute("data-testid")||void 0,a=e.getAttribute("name")||void 0;let r=n||t;if(!r){const i=e.closest(Yn);i&&i!==e&&(r=K(i.getAttribute("aria-label"),G)||K(i.textContent,G))}return{tag:e.tagName.toLowerCase(),id:e.id||null,classes:Array.from(e.classList).slice(0,10),role:e.getAttribute("role"),selector:se(e),...t?{text:t}:{},...n?{ariaLabel:n}:{},...o?{testid:o}:{},...a?{name:a}:{},...r&&r!==t?{label:r}:{}}}function Zn(e,t){const n=[],o=document.querySelectorAll("body *");for(const a of Array.from(o)){const r=getComputedStyle(a);if(r.position!=="fixed"&&r.position!=="sticky")continue;const i=a.getBoundingClientRect();if(e<i.left||e>i.right||t<i.top||t>i.bottom)continue;const s=parseInt(r.zIndex,10);!Number.isFinite(s)&&r.zIndex!=="auto"||n.push({tag:a.tagName.toLowerCase(),zIndex:Number.isFinite(s)?s:0,pointerEvents:r.pointerEvents,classes:Array.from(a.classList).slice(0,5).join(" ")})}return n.sort((a,r)=>r.zIndex-a.zIndex).slice(0,Kn)}function Qn(e){const t=a=>r=>{const i=r,s=i.target;if(!(s instanceof Element))return;const c=i.clientX,u=i.clientY,l=document.elementFromPoint(c,u),p=l===s||(l?s.contains(l)||l.contains(s):!1),f=document.querySelectorAll('[role="dialog"][data-state="open"]').length,g=getComputedStyle(document.body).pointerEvents,d=p?[]:Zn(c,u);e.emitClick({kind:a,target:Ge(s),hitMatchesTarget:p,...!p&&l instanceof Element?{hitTarget:Ge(l)}:{},coords:{x:c,y:u},openDialogs:f,bodyPointerEvents:g,...d.length>0?{overlaysAtPoint:d}:{}})},n=t("click"),o=t("mousedown");return document.addEventListener("click",n,{capture:!0,passive:!0}),document.addEventListener("mousedown",o,{capture:!0,passive:!0}),()=>{document.removeEventListener("click",n,{capture:!0}),document.removeEventListener("mousedown",o,{capture:!0})}}function eo(e){const t=history.pushState,n=history.replaceState;let o=window.location.href;const a=s=>{const c=window.location.href;if(c===o)return;const u=o;o=c,e.emitRoute({kind:"route",from:u,to:c,via:s})};history.pushState=function(...c){const u=t.apply(this,c);return a("pushState"),u},history.replaceState=function(...c){const u=n.apply(this,c);return a("replaceState"),u};const r=()=>a("popstate"),i=()=>a("hashchange");return window.addEventListener("popstate",r),window.addEventListener("hashchange",i),()=>{history.pushState=t,history.replaceState=n,window.removeEventListener("popstate",r),window.removeEventListener("hashchange",i)}}function to(e){const t=new WeakSet,n=(a,r)=>{const i=se(a);e.emitDialog({kind:"dialog",action:r,selector:i,state:a.getAttribute("data-state"),...r==="mount"?{outerHTML:Jn(a.outerHTML,Gn)}:{}})};for(const a of Array.from(document.querySelectorAll('[role="dialog"]')))t.add(a);const o=new MutationObserver(a=>{var r,i,s,c;for(const u of a){for(const l of Array.from(u.addedNodes)){if(!(l instanceof Element))continue;const p=(r=l.matches)!=null&&r.call(l,'[role="dialog"]')?[l]:Array.from(((i=l.querySelectorAll)==null?void 0:i.call(l,'[role="dialog"]'))??[]);for(const f of p)t.has(f)||(t.add(f),n(f,"mount"))}for(const l of Array.from(u.removedNodes)){if(!(l instanceof Element))continue;const p=(s=l.matches)!=null&&s.call(l,'[role="dialog"]')?[l]:Array.from(((c=l.querySelectorAll)==null?void 0:c.call(l,'[role="dialog"]'))??[]);for(const f of p)t.has(f)&&(t.delete(f),n(f,"unmount"))}u.type==="attributes"&&u.attributeName==="data-state"&&u.target instanceof Element&&u.target.getAttribute("role")==="dialog"&&n(u.target,"state")}});return o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-state"]}),()=>o.disconnect()}function no(e){const t=n=>{const o=n.target;if(!(o instanceof HTMLFormElement))return;const a=[];for(const r of Array.from(o.elements)){if(!(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement))continue;const i=r.getAttribute("name")||"<unnamed>",s=r instanceof HTMLInputElement?r.type:r.tagName.toLowerCase();let c;r instanceof HTMLInputElement&&(r.type==="checkbox"||r.type==="radio")?c=r.checked:c=!!r.value,a.push({name:i,type:s,hasValue:c})}e.emitSubmit({kind:"submit",form:{id:o.id||null,action:o.getAttribute("action")||null,method:(o.getAttribute("method")||"GET").toUpperCase(),selector:se(o),fields:a}})};return document.addEventListener("submit",t,{capture:!0}),()=>document.removeEventListener("submit",t,{capture:!0})}function oo(e){const t=Qn(e),n=eo(e),o=to(e),a=no(e);return{uninstall(){t(),n(),o(),a()}}}const ce=1e3,Ke=10*1024,Je="[REDACTED]",Ze=new Set(["POST","PUT","PATCH","DELETE"]),ro=[/Bearer\s+[A-Za-z0-9._\-+/=]+/gi,/\bls_pat_[A-Za-z0-9_]+/g,/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g],ao=/^(password|passwd|secret|token|api[_-]?key|auth|access[_-]?token|refresh[_-]?token|client[_-]?secret|private[_-]?key)$/i;function le(e,t){return e.length>t?e.slice(0,t):e}function Qe(e){let t=e;for(const n of ro)t=t.replace(n,Je);return t}function ue(e){if(e===null||typeof e!="object")return typeof e=="string"?Qe(e):e;if(Array.isArray(e))return e.map(ue);const t={};for(const[n,o]of Object.entries(e))t[n]=ao.test(n)?Je:ue(o);return t}function et(e,t){if(t&&t.includes("application/json"))try{const n=JSON.parse(e);return JSON.stringify(ue(n))}catch{}return Qe(e)}function J(e,t){const n=e.length,o={bodySize:n};return n>Ke?(o.body=et(e.slice(0,Ke),t),o.bodyTruncated=!0):o.body=et(e,t),t&&(o.contentType=t),o}function io(e,t){const n=t==null?void 0:t.body;if(n!=null){if(typeof n=="string")return n;if(n instanceof URLSearchParams)return n.toString();if(n instanceof FormData){const o=[];return n.forEach((a,r)=>{o.push(`${r}=${typeof a=="string"?`[${a.length}b]`:"[file]"}`)}),`[FormData] ${o.join("&")}`}return n instanceof Blob?`[Blob ${n.size}b ${n.type||"unknown"}]`:n instanceof ArrayBuffer?`[binary ${n.byteLength}b]`:ArrayBuffer.isView(n)?`[binary ${n.byteLength}b]`:null}return e instanceof Request,null}function so(e,t){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"))}function co(e,t){return(o=>{if(o){if(o instanceof Headers)return o.get("content-type")||void 0;if(Array.isArray(o)){const a=o.find(([r])=>r.toLowerCase()==="content-type");return a?a[1]:void 0}if(typeof o=="object"){for(const[a,r]of Object.entries(o))if(a.toLowerCase()==="content-type")return r}}})(t==null?void 0:t.headers)??(e instanceof Request&&e.headers.get("content-type")||void 0)}function lo(e,t,n){if(!Ze.has(n))return;const o=so(e,t),a=io(e,t);if(a==null&&!o)return;const r=co(e,t),i=a!=null?J(a,r):{};return o&&(i.hasAuth=!0),i}function uo(e){const t=window.fetch;if(typeof t!="function")return()=>{};const n=async(o,a)=>{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=lo(o,a,i);try{const u=await t.call(window,o,a),l=Math.round(performance.now()-r),p=u.status>=400;let f;if(p||e.verbose)try{const g=await u.clone().text(),d=u.headers.get("content-type")||void 0;f=J(g,d)}catch{}return(p||e.verbose)&&e.emit({kind:"fetch",url:le(s,ce),method:i,status:u.status,durationMs:l,failed:p,...c?{request:c}:{},...f?{response:f}:{}}),u}catch(u){const l=Math.round(performance.now()-r);throw e.emit({kind:"fetch",url:le(s,ce),method:i,status:0,durationMs:l,failed:!0,error:u instanceof Error?u.message:String(u),...c?{request:c}:{}}),u}};return n.__lsBeaconWrapped=!0,window.fetch=n,()=>{window.fetch.__lsBeaconWrapped&&(window.fetch=t)}}function po(e){if(e==null)return null;if(typeof e=="string")return e;if(e instanceof URLSearchParams)return e.toString();if(e instanceof FormData){const t=[];return e.forEach((n,o)=>{t.push(`${o}=${typeof n=="string"?`[${n.length}b]`:"[file]"}`)}),`[FormData] ${t.join("&")}`}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}function fo(e){const t=XMLHttpRequest.prototype,n=t.open,o=t.send,a=t.setRequestHeader,r=new WeakMap;return t.open=function(s,c,...u){return r.set(this,{method:s.toUpperCase(),url:typeof c=="string"?c:c.toString(),start:0,hasAuth:!1}),n.call(this,s,c,...u)},t.setRequestHeader=function(s,c){const u=r.get(this);if(u){const l=s.toLowerCase();l==="authorization"?u.hasAuth=!0:l==="content-type"&&(u.requestContentType=c)}return a.call(this,s,c)},t.send=function(s){const c=r.get(this);if(c)if(c.start=performance.now(),Ze.has(c.method)){const l=po(s);l!=null?c.request=J(l,c.requestContentType):c.request={},c.hasAuth&&(c.request.hasAuth=!0)}else c.hasAuth&&(c.request={hasAuth:!0});const u=()=>{this.removeEventListener("loadend",u);const l=r.get(this);if(!l)return;const p=Math.round(performance.now()-l.start),f=this.status===0||this.status>=400;let g;if((f||e.verbose)&&this.status>0)try{const d=this.responseType===""||this.responseType==="text"?this.responseText:"";if(d){const w=this.getResponseHeader("content-type")||void 0;g=J(d,w)}}catch{}(f||e.verbose)&&e.emit({kind:"xhr",url:le(l.url,ce),method:l.method,status:this.status,durationMs:p,failed:f,...l.request?{request:l.request}:{},...g?{response:g}:{}}),r.delete(this)};return this.addEventListener("loadend",u),o.call(this,s)},()=>{t.open=n,t.send=o,t.setRequestHeader=a}}function mo(e){const t=uo(e),n=fo(e);return{uninstall(){t(),n()}}}const ho=1e3,tt=50,bo=500;class go{constructor(t){this.buffer=[],this.inflight=!1,this.timer=null,this.destroyed=!1,this.handleVisibilityChange=()=>{document.visibilityState==="hidden"&&this.flushSync()},this.url=t.url,this.sessionId=t.sessionId,this.onError=t.onError,this.timer=setInterval(()=>{this.flush()},ho),this.pagehideHandler=()=>this.flushSync(),window.addEventListener("pagehide",this.pagehideHandler),document.addEventListener("visibilitychange",this.handleVisibilityChange)}enqueue(t){this.destroyed||(this.buffer.push(t),this.buffer.length>bo&&this.buffer.shift(),this.buffer.length>=tt&&this.flush())}async flush(){var o,a;if(this.destroyed||this.inflight||this.buffer.length===0)return;const t=this.buffer.splice(0,tt),n=this.makeBatch(t);this.inflight=!0;try{const r=await fetch(this.url,{method:"POST",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0});r.ok||(o=this.onError)==null||o.call(this,new Error(`monitor flush: HTTP ${r.status}`))}catch(r){(a=this.onError)==null||a.call(this,r instanceof Error?r:new Error(String(r)))}finally{this.inflight=!1}}flushSync(){if(this.destroyed||this.buffer.length===0)return;if(!navigator.sendBeacon){this.flush();return}const t=this.buffer.splice(0),n=this.makeBatch(t),o=new Blob([JSON.stringify(n)],{type:"application/json"});try{navigator.sendBeacon(this.url,o)}catch{}}destroy(){this.destroyed||(this.destroyed=!0,this.timer&&clearInterval(this.timer),this.pagehideHandler&&window.removeEventListener("pagehide",this.pagehideHandler),document.removeEventListener("visibilitychange",this.handleVisibilityChange),this.flushSync())}makeBatch(t){return{sessionId:this.sessionId,events:t,meta:{url:window.location.href,userAgent:navigator.userAgent,viewport:{w:window.innerWidth,h:window.innerHeight,dpr:window.devicePixelRatio||1},v:1}}}}const de="__lsBeaconMonitorUrl",nt="__lsBeaconMonitorSession",pe="__lsBeaconMonitorVerbose",fe="__lsBeaconMonitorDeadline",ot=30*6e4,rt=4096;let v=null;const me=new Set;function yo(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID().slice(0,8):Math.random().toString(36).slice(2,10)}function wo(e){const t=new WeakSet,n=o=>{if(o===null||typeof o!="object")return typeof o=="string"&&o.length>rt?o.slice(0,rt):o;if(t.has(o))return"[cyclic]";if(t.add(o),Array.isArray(o))return o.map(n);const a={};for(const r of Object.keys(o).slice(0,50))try{a[r]=n(o[r])}catch{a[r]="[unreadable]"}return a};try{return n(e)}catch{return"[unserialisable]"}}function he(){for(const e of me)try{e(v!==null,(v==null?void 0:v.url)??null)}catch{}}function vo(e){return v?(v.seq+=1,{...e,ts:Date.now(),sessionId:v.sessionId,seq:v.seq}):{...e,ts:Date.now(),sessionId:"",seq:0}}function O(e){if(!v)return;const t=vo(e);v.transport.enqueue(t)}function xo(){if(v)try{sessionStorage.setItem(de,v.url),sessionStorage.setItem(nt,v.sessionId),sessionStorage.setItem(pe,v.verbose?"1":"0"),sessionStorage.setItem(fe,String(v.deadlineMs))}catch{}}function at(){try{sessionStorage.removeItem(de),sessionStorage.removeItem(nt),sessionStorage.removeItem(pe),sessionStorage.removeItem(fe)}catch{}}function Eo(){try{const e=sessionStorage.getItem(de);if(!e)return null;const t=sessionStorage.getItem(pe)==="1",n=sessionStorage.getItem(fe),o=n?Number(n):Date.now()+ot;return Number.isFinite(o)&&o<=Date.now()?(at(),null):{url:e,verbose:t,deadlineMs:o}}catch{return null}}function it(e){v&&(v.seq+=1,v.transport.enqueue({kind:e.kind,ts:e.ts,sessionId:v.sessionId,seq:v.seq,message:e.message,...e.stack?{stack:e.stack}:{},...e.source?{source:e.source}:{},...typeof e.line=="number"?{line:e.line}:{},...typeof e.col=="number"?{col:e.col}:{}}))}function be(e){if(v&&V(),!e.url)return;const t=e.maxSessionMs??ot,n=Date.now()+t,o=yo(),a=!!e.verbose,r=new go({url:e.url,sessionId:o,onError:d=>{console.warn("[launch-kit-beacon] monitor transport error:",d.message)}}),i=Re(),s=i.install(),c=i.snapshot();for(const d of c)it(d);let u=c.length;const l=i.subscribe(()=>{if(!v)return;const d=v.errorsBuffer.snapshot();for(;v.drainedThrough<d.length;){const w=d[v.drainedThrough];w&&it(w),v.drainedThrough+=1}}),p=mo({emit:d=>O(d),verbose:a}),f=oo({emitClick:d=>O(d),emitRoute:d=>O(d),emitDialog:d=>O(d),emitSubmit:d=>O(d)}),g=setTimeout(()=>{console.info("[launch-kit-beacon] monitor session expired (max duration reached)"),V()},Math.max(0,n-Date.now()));v={url:e.url,sessionId:o,verbose:a,deadlineMs:n,seq:0,transport:r,errorsBuffer:i,uninstallNetwork:p.uninstall,uninstallDom:f.uninstall,uninstallErrors:s,errorsUnsub:l,deadlineTimer:g,drainedThrough:u},xo(),he()}function V(){st(),at(),he()}function So(){v&&(st(),he())}function st(){v&&(clearTimeout(v.deadlineTimer),v.errorsUnsub(),v.uninstallErrors(),v.uninstallNetwork(),v.uninstallDom(),v.transport.destroy(),v=null)}function Co(e,t){v&&O({kind:"probe",label:e.slice(0,200),data:wo(t)})}function ge(){return v!==null}function ye(){return(v==null?void 0:v.url)??null}function ct(e){return me.add(e),()=>{me.delete(e)}}function ko(){if(v||typeof window>"u")return;const e=Eo();e&&be({url:e.url,verbose:e.verbose,maxSessionMs:Math.max(6e4,e.deadlineMs-Date.now())})}function Ao(e={}){let t=null,n=null,o="",a=null;function r(){a||(a=Wn({onStop:()=>V(),url:ye()}))}function i(){if(a){try{a.destroy()}catch{}a=null}}function s(){if(!t)return;t.innerHTML="";const l=document.createElement("div");l.className="beacon-monitor-title",l.textContent="Monitor — paste a stream URL",t.appendChild(l);const p=document.createElement("div");p.className="beacon-monitor-row";const f=document.createElement("input");f.type="url",f.className="beacon-monitor-input",f.placeholder="http://localhost:9876/m/…",f.value=o,f.autocomplete="off",f.spellcheck=!1,p.appendChild(f);const g=document.createElement("button");g.type="button",g.className="beacon-monitor-btn",g.textContent="Start",g.disabled=!o.trim(),p.appendChild(g),t.appendChild(p);const d=document.createElement("label");d.className="beacon-monitor-verbose";const w=document.createElement("input");w.type="checkbox",w.dataset.role="verbose",d.appendChild(w),d.appendChild(document.createTextNode(" verbose (capture successful network too)")),t.appendChild(d);const E=document.createElement("div");E.className="beacon-monitor-help",E.textContent="Streams clicks, failed network, errors, route + dialog changes.",t.appendChild(E),f.addEventListener("input",()=>{o=f.value,g.disabled=!f.value.trim()}),g.addEventListener("click",()=>{const b=f.value.trim();if(b){try{new URL(b)}catch{f.setCustomValidity("Enter a valid URL (e.g. http://localhost:9876/m/abc)"),f.reportValidity();return}f.setCustomValidity(""),be({url:b,verbose:w.checked,...e.maxSessionMs!==void 0?{maxSessionMs:e.maxSessionMs}:{}})}})}function c(){if(!t)return;t.innerHTML="";const l=ye()??"",p=document.createElement("div");p.className="beacon-monitor-title";const f=document.createElement("span");f.className="beacon-monitor-rec",f.setAttribute("aria-hidden","true"),p.appendChild(f),p.appendChild(document.createTextNode(" Monitor — recording")),t.appendChild(p);const g=document.createElement("div");g.className="beacon-monitor-active-url",g.title=l,g.textContent=l,t.appendChild(g);const d=document.createElement("div");d.className="beacon-monitor-row";const w=document.createElement("button");w.type="button",w.className="beacon-monitor-btn stop",w.textContent="Stop monitoring",w.addEventListener("click",()=>V()),d.appendChild(w),t.appendChild(d);const E=document.createElement("div");E.className="beacon-monitor-help",E.textContent="Events stream to the URL above. Auto-stops after 30 min.",t.appendChild(E)}function u(){ge()?c():s()}return{name:"liveMonitor",setupOnce(l){ko(),ge()&&r();const p=ct((g,d)=>{g?(r(),a==null||a.updateUrl(d)):i()}),f=()=>{i(),p();try{So()}catch{}};l.signal.addEventListener("abort",f,{once:!0})},form(){return{render:l=>(t=document.createElement("div"),t.className="beacon-monitor",l.appendChild(t),u(),n=ct(()=>u()),()=>{n==null||n(),n=null,t=null})}}}}let M=null;const we={"plugin:error":new Set,"submit:success":new Set,"submit:error":new Set,ready:new Set};function Lo(e){if(typeof window>"u")return;if(!e.endpoint)throw new Error("init: endpoint is required");Le(),ut();const t={...Wt(),...e.labels??{}},n=new AbortController,o=Io(e),a=e.position??"bottom-right",r=e.theme??"auto";Pt(),Po(e,a,r);const i=document.querySelector(U);if(!i)throw new Error("init: failed to acquire <launch-kit-beacon> host");if(!i.shadow)throw new Error("init: host element shadow root not initialized");const s=Xt(i.shadow),c=new Vt(t,["bug","idea","ux","a11y"],{onSubmit:()=>{$o()},onClose:p=>{Z("close",{}),p==="user"&&ft()}});i.shadow.appendChild(c.root),i.classList.add("beacon-no-capture");const u=Ft(o),l={endpoint:e.endpoint,headers:e.headers,context:e.context,credentials:e.credentials??"omit",plugins:o,registry:u,dialog:c,overlayHost:s,hostElement:i,initAbort:n,labels:t,debug:!!e.debug||_o(),healthIndicator:e.healthIndicator??"never",position:a,theme:r,currentSubmit:null,capturedEntries:{},formValues:{},lifecycleHandlers:{open:new Set,close:new Set,beforeSubmit:new Set,afterSubmit:new Set},panelSources:[]};M=l,i.onTriggerClick=()=>lt(),u.install(p=>pt(p),p=>ve(p)),W("ready",{ready:!0}),l.debug&&console.info("[beacon] ready",l.endpoint)}function lt(){const e=M;e&&(e.currentSubmit||(e.panelSources=e.plugins.map(t=>{if(!t.form)return null;const n=pt(t.name);let o;try{o=t.form(n)}catch(a){return ve({plugin:t.name,error:a instanceof Error?a:new Error(String(a)),at:"form"}),null}return{name:t.name,form:o,ctx:n}}).filter(t=>t!==null),e.dialog.installPluginPanels(e.panelSources,{get:(t,n)=>{var o;return(o=e.formValues[t])==null?void 0:o[n]},set:(t,n,o)=>{var r;const a=(r=e.formValues)[t]??(r[t]={});a[n]=o}}),e.dialog.open(),Z("open",{})))}function To(){const e=M;e&&e.dialog.close("user")}function ut(){var t;const e=M;if(e){e.initAbort.abort(),(t=e.currentSubmit)==null||t.abort(),e.registry.destroy(),F();try{e.dialog.root.remove(),e.overlayHost.layer.remove()}catch{}e.hostElement.onTriggerClick=null,M=null}}function Mo(){const e=M;return e?{ready:!0,transport:"idle",plugins:e.registry.status()}:{ready:!1,transport:"idle",plugins:{}}}function Ro(e,t){return we[e].add(t),()=>dt(e,t)}function dt(e,t){we[e].delete(t)}function Po(e,t,n){let o=document.querySelector(U);if(!o){o=document.createElement(U),o.setAttribute("position",t),o.setAttribute("theme",n),t==="hidden"&&(o.style.position="absolute",o.style.left="-9999px"),(document.body??document.documentElement).appendChild(o);return}e.position!==void 0&&o.setAttribute("position",t),e.theme!==void 0&&o.setAttribute("theme",n)}function Io(e){return e.plugins?e.plugins:e.defaultPlugins===!1?[]:No()}function No(){return[Te(),Pe(),je(),We()]}function _o(){if(typeof window>"u")return!1;try{return new URLSearchParams(window.location.search).has("lsbeacon-debug")}catch{return!1}}function pt(e){const t=M;return $t(e,{getCaptured:o=>t==null?void 0:t.capturedEntries[o],getFormValues:o=>{var a;return t?(a=t.formValues)[o]??(a[o]={}):{}},getCaptureSignal:()=>{var o;return(o=t==null?void 0:t.currentSubmit)==null?void 0:o.signal},getInitSignal:()=>t.initAbort.signal,requestMode:async o=>t?t.dialog.requestMode(o):()=>{},overlay:o=>t?Yt(t.overlayHost,o.render):()=>{},onLifecycle:(o,a)=>{if(!t)return()=>{};const r=t.lifecycleHandlers[o];return r.add(a),()=>r.delete(a)}})}function Z(e,t){const n=M;if(n)for(const o of n.lifecycleHandlers[e])try{o(t)}catch(a){n.debug&&console.error("[beacon] lifecycle handler threw:",a)}}function W(e,t){for(const n of we[e])try{n(t)}catch(o){M!=null&&M.debug&&console.error("[beacon] system handler threw:",o)}}function ve(e){W("plugin:error",{plugin:e.plugin,error:e.error,at:e.at});const t=M;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))}function ft(){const e=M;e&&(e.dialog.resetState(),e.dialog.clearPluginPanels(),e.formValues={})}async function $o(){const e=M;if(!e||e.currentSubmit)return;const t=e.dialog.getDescription().trim();if(!t){e.dialog.setStatus("Description is required","error");return}e.currentSubmit=new AbortController,e.capturedEntries={},e.dialog.setSubmitting(!0),e.dialog.setStatus("Capturing…");let n=null;try{const o=await e.registry.capture(s=>e.capturedEntries[s],s=>ve(s));e.capturedEntries=o,n=Do(e,t,o);let a=null;if(Z("beforeSubmit",{payload:n,cancel:s=>{a===null&&(a=s)}}),a!==null){e.dialog.setSubmitting(!1),e.dialog.setStatus(`Cancelled: ${a}`,"error");return}e.dialog.setStatus("Sending…");const i=await Bt(e.endpoint,n,e.headers,e.currentSubmit.signal,e.credentials);Z("afterSubmit",{payload:n,response:i}),e.dialog.setSubmitting(!1),i.ok?(W("submit:success",{payload:n,response:i}),e.dialog.setSubmitSucceeded(!0),e.dialog.setStatus(e.labels.sentSuccess,"success"),window.setTimeout(()=>{M===e&&e.dialog.close("submitted"),ft()},1500)):(W("submit:error",{payload:n,error:new Error(`HTTP ${i.status}`)}),e.dialog.setStatus(`Failed (${i.status})`,"error"))}catch(o){e.dialog.setSubmitting(!1);const a=o instanceof Error?o:new Error(String(o));n&&W("submit:error",{payload:n,error:a}),e.dialog.setStatus(`Failed: ${a.message}`,"error")}finally{e.currentSubmit=null}}function Do(e,t,n){var r;const o=Fo(),a=(r=e.context)==null?void 0:r.call(e);return{description:t,severity:e.dialog.getSeverity(),metadata:o,...a?{context:a}:{},plugins:n}}function Fo(){const e=window.location.href,t=document.referrer,n=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";return{url:e,...t?{referrer:t}:{},userAgent:navigator.userAgent,viewport:{w:window.innerWidth,h:window.innerHeight,dpr:window.devicePixelRatio||1},screen:{w:window.screen.width,h:window.screen.height},timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,locale:navigator.language,theme:n,capturedAt:new Date().toISOString()}}Le();function Oo(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),o=n.createElement("base"),a=n.createElement("a");return n.head.appendChild(o),n.body.appendChild(a),t&&(o.href=t),a.href=e,a.href}const Ho=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function _(e){const t=[];for(let n=0,o=e.length;n<o;n++)t.push(e[n]);return t}let H=null;function mt(e={}){return H||(e.includeStyleProperties?(H=e.includeStyleProperties,H):(H=_(window.getComputedStyle(document.documentElement)),H))}function Q(e,t){const o=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return o?parseFloat(o.replace("px","")):0}function Bo(e){const t=Q(e,"border-left-width"),n=Q(e,"border-right-width");return e.clientWidth+t+n}function Uo(e){const t=Q(e,"border-top-width"),n=Q(e,"border-bottom-width");return e.clientHeight+t+n}function xe(e,t={}){const n=t.width||Bo(e),o=t.height||Uo(e);return{width:n,height:o}}function zo(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const P=16384;function qo(e){(e.width>P||e.height>P)&&(e.width>P&&e.height>P?e.width>e.height?(e.height*=P/e.width,e.width=P):(e.width*=P/e.height,e.height=P):e.width>P?(e.height*=P/e.width,e.width=P):(e.width*=P/e.height,e.height=P))}function jo(e,t={}){return e.toBlob?new Promise(n=>{e.toBlob(n,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(n=>{const o=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),a=o.length,r=new Uint8Array(a);for(let i=0;i<a;i+=1)r[i]=o.charCodeAt(i);n(new Blob([r],{type:t.type?t.type:"image/png"}))})}function ee(e){return new Promise((t,n)=>{const o=new Image;o.onload=()=>{o.decode().then(()=>{requestAnimationFrame(()=>t(o))})},o.onerror=n,o.crossOrigin="anonymous",o.decoding="async",o.src=e})}async function Vo(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Wo(e,t,n){const o="http://www.w3.org/2000/svg",a=document.createElementNS(o,"svg"),r=document.createElementNS(o,"foreignObject");return a.setAttribute("width",`${t}`),a.setAttribute("height",`${n}`),a.setAttribute("viewBox",`0 0 ${t} ${n}`),r.setAttribute("width","100%"),r.setAttribute("height","100%"),r.setAttribute("x","0"),r.setAttribute("y","0"),r.setAttribute("externalResourcesRequired","true"),a.appendChild(r),r.appendChild(e),Vo(a)}const R=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||R(n,t)};function Xo(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Yo(e,t){return mt(t).map(n=>{const o=e.getPropertyValue(n),a=e.getPropertyPriority(n);return`${n}: ${o}${a?" !important":""};`}).join(" ")}function Go(e,t,n,o){const a=`.${e}:${t}`,r=n.cssText?Xo(n):Yo(n,o);return document.createTextNode(`${a}{${r}}`)}function ht(e,t,n,o){const a=window.getComputedStyle(e,n),r=a.getPropertyValue("content");if(r===""||r==="none")return;const i=Ho();try{t.className=`${t.className} ${i}`}catch{return}const s=document.createElement("style");s.appendChild(Go(i,n,a,o)),t.appendChild(s)}function Ko(e,t,n){ht(e,t,":before",n),ht(e,t,":after",n)}const bt="application/font-woff",gt="image/jpeg",Jo={woff:bt,woff2:bt,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:gt,jpeg:gt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Zo(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function Ee(e){const t=Zo(e).toLowerCase();return Jo[t]||""}function Qo(e){return e.split(/,/)[1]}function Se(e){return e.search(/^(data:)/)!==-1}function er(e,t){return`data:${t};base64,${e}`}async function yt(e,t,n){const o=await fetch(e,t);if(o.status===404)throw new Error(`Resource "${o.url}" not found`);const a=await o.blob();return new Promise((r,i)=>{const s=new FileReader;s.onerror=i,s.onloadend=()=>{try{r(n({res:o,result:s.result}))}catch(c){i(c)}},s.readAsDataURL(a)})}const Ce={};function tr(e,t,n){let o=e.replace(/\?.*/,"");return n&&(o=e),/ttf|otf|eot|woff2?/i.test(o)&&(o=o.replace(/.*\//,"")),t?`[${t}]${o}`:o}async function ke(e,t,n){const o=tr(e,t,n.includeQueryParams);if(Ce[o]!=null)return Ce[o];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const r=await yt(e,n.fetchRequestInit,({res:i,result:s})=>(t||(t=i.headers.get("Content-Type")||""),Qo(s)));a=er(r,t)}catch(r){a=n.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;r&&(i=typeof r=="string"?r:r.message),i&&console.warn(i)}return Ce[o]=a,a}async function nr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ee(t)}async function or(e,t){if(e.currentSrc){const r=document.createElement("canvas"),i=r.getContext("2d");r.width=e.clientWidth,r.height=e.clientHeight,i==null||i.drawImage(e,0,0,r.width,r.height);const s=r.toDataURL();return ee(s)}const n=e.poster,o=Ee(n),a=await ke(n,o,t);return ee(a)}async function rr(e,t){var n;try{if(!((n=e==null?void 0:e.contentDocument)===null||n===void 0)&&n.body)return await te(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function ar(e,t){return R(e,HTMLCanvasElement)?nr(e):R(e,HTMLVideoElement)?or(e,t):R(e,HTMLIFrameElement)?rr(e,t):e.cloneNode(wt(e))}const ir=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",wt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function sr(e,t,n){var o,a;if(wt(t))return t;let r=[];return ir(e)&&e.assignedNodes?r=_(e.assignedNodes()):R(e,HTMLIFrameElement)&&(!((o=e.contentDocument)===null||o===void 0)&&o.body)?r=_(e.contentDocument.body.childNodes):r=_(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),r.length===0||R(e,HTMLVideoElement)||await r.reduce((i,s)=>i.then(()=>te(s,n)).then(c=>{c&&t.appendChild(c)}),Promise.resolve()),t}function cr(e,t,n){const o=t.style;if(!o)return;const a=window.getComputedStyle(e);a.cssText?(o.cssText=a.cssText,o.transformOrigin=a.transformOrigin):mt(n).forEach(r=>{let i=a.getPropertyValue(r);r==="font-size"&&i.endsWith("px")&&(i=`${Math.floor(parseFloat(i.substring(0,i.length-2)))-.1}px`),R(e,HTMLIFrameElement)&&r==="display"&&i==="inline"&&(i="block"),r==="d"&&t.getAttribute("d")&&(i=`path(${t.getAttribute("d")})`),o.setProperty(r,i,a.getPropertyPriority(r))})}function lr(e,t){R(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),R(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function ur(e,t){if(R(e,HTMLSelectElement)){const n=t,o=Array.from(n.children).find(a=>e.value===a.getAttribute("value"));o&&o.setAttribute("selected","")}}function dr(e,t,n){return R(t,Element)&&(cr(e,t,n),Ko(e,t,n),lr(e,t),ur(e,t)),t}async function pr(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const o={};for(let r=0;r<n.length;r++){const s=n[r].getAttribute("xlink:href");if(s){const c=e.querySelector(s),u=document.querySelector(s);!c&&u&&!o[s]&&(o[s]=await te(u,t,!0))}}const a=Object.values(o);if(a.length){const r="http://www.w3.org/1999/xhtml",i=document.createElementNS(r,"svg");i.setAttribute("xmlns",r),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.style.display="none";const s=document.createElementNS(r,"defs");i.appendChild(s);for(let c=0;c<a.length;c++)s.appendChild(a[c]);e.appendChild(i)}return e}async function te(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(o=>ar(o,t)).then(o=>sr(e,o,t)).then(o=>dr(e,o,t)).then(o=>pr(o,t))}const vt=/url\((['"]?)([^'"]+?)\1\)/g,fr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,mr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function hr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function br(e){const t=[];return e.replace(vt,(n,o,a)=>(t.push(a),n)),t.filter(n=>!Se(n))}async function gr(e,t,n,o,a){try{const r=n?Oo(t,n):t,i=Ee(t);let s;return a||(s=await ke(r,i,o)),e.replace(hr(t),`$1${s}$3`)}catch{}return e}function yr(e,{preferredFontFormat:t}){return t?e.replace(mr,n=>{for(;;){const[o,,a]=fr.exec(n)||[];if(!a)return"";if(a===t)return`src: ${o};`}}):e}function xt(e){return e.search(vt)!==-1}async function Et(e,t,n){if(!xt(e))return e;const o=yr(e,n);return br(o).reduce((r,i)=>r.then(s=>gr(s,i,t,n)),Promise.resolve(o))}async function B(e,t,n){var o;const a=(o=t.style)===null||o===void 0?void 0:o.getPropertyValue(e);if(a){const r=await Et(a,null,n);return t.style.setProperty(e,r,t.style.getPropertyPriority(e)),!0}return!1}async function wr(e,t){await B("background",e,t)||await B("background-image",e,t),await B("mask",e,t)||await B("-webkit-mask",e,t)||await B("mask-image",e,t)||await B("-webkit-mask-image",e,t)}async function vr(e,t){const n=R(e,HTMLImageElement);if(!(n&&!Se(e.src))&&!(R(e,SVGImageElement)&&!Se(e.href.baseVal)))return;const o=n?e.src:e.href.baseVal,a=await ke(o,Ee(o),t);await new Promise((r,i)=>{e.onload=r,e.onerror=t.onImageErrorHandler?(...c)=>{try{r(t.onImageErrorHandler(...c))}catch(u){i(u)}}:i;const s=e;s.decode&&(s.decode=r),s.loading==="lazy"&&(s.loading="eager"),n?(e.srcset="",e.src=a):e.href.baseVal=a})}async function xr(e,t){const o=_(e.childNodes).map(a=>St(a,t));await Promise.all(o).then(()=>e)}async function St(e,t){R(e,Element)&&(await wr(e,t),await vr(e,t),await xr(e,t))}function Er(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const o=t.style;return o!=null&&Object.keys(o).forEach(a=>{n[a]=o[a]}),e}const Ct={};async function kt(e){let t=Ct[e];if(t!=null)return t;const o=await(await fetch(e)).text();return t={url:e,cssText:o},Ct[e]=t,t}async function At(e,t){let n=e.cssText;const o=/url\(["']?([^"')]+)["']?\)/g,r=(n.match(/url\([^)]+\)/g)||[]).map(async i=>{let s=i.replace(o,"$1");return s.startsWith("https://")||(s=new URL(s,e.url).href),yt(s,t.fetchRequestInit,({result:c})=>(n=n.replace(i,`url(${c})`),[i,c]))});return Promise.all(r).then(()=>n)}function Lt(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let o=e.replace(n,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const c=a.exec(o);if(c===null)break;t.push(c[0])}o=o.replace(a,"");const r=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",s=new RegExp(i,"gi");for(;;){let c=r.exec(o);if(c===null){if(c=s.exec(o),c===null)break;r.lastIndex=s.lastIndex}else s.lastIndex=r.lastIndex;t.push(c[0])}return t}async function Sr(e,t){const n=[],o=[];return e.forEach(a=>{if("cssRules"in a)try{_(a.cssRules||[]).forEach((r,i)=>{if(r.type===CSSRule.IMPORT_RULE){let s=i+1;const c=r.href,u=kt(c).then(l=>At(l,t)).then(l=>Lt(l).forEach(p=>{try{a.insertRule(p,p.startsWith("@import")?s+=1:a.cssRules.length)}catch(f){console.error("Error inserting rule from remote css",{rule:p,error:f})}})).catch(l=>{console.error("Error loading remote css",l.toString())});o.push(u)}})}catch(r){const i=e.find(s=>s.href==null)||document.styleSheets[0];a.href!=null&&o.push(kt(a.href).then(s=>At(s,t)).then(s=>Lt(s).forEach(c=>{i.insertRule(c,i.cssRules.length)})).catch(s=>{console.error("Error loading remote stylesheet",s)})),console.error("Error inlining remote css file",r)}}),Promise.all(o).then(()=>(e.forEach(a=>{if("cssRules"in a)try{_(a.cssRules||[]).forEach(r=>{n.push(r)})}catch(r){console.error(`Error while reading CSS rules from ${a.href}`,r)}}),n))}function Cr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>xt(t.style.getPropertyValue("src")))}async function kr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=_(e.ownerDocument.styleSheets),o=await Sr(n,t);return Cr(o)}function Tt(e){return e.trim().replace(/["']/g,"")}function Ar(e){const t=new Set;function n(o){(o.style.fontFamily||getComputedStyle(o).fontFamily).split(",").forEach(r=>{t.add(Tt(r))}),Array.from(o.children).forEach(r=>{r instanceof HTMLElement&&n(r)})}return n(e),t}async function Mt(e,t){const n=await kr(e,t),o=Ar(e);return(await Promise.all(n.filter(r=>o.has(Tt(r.style.fontFamily))).map(r=>{const i=r.parentStyleSheet?r.parentStyleSheet.href:null;return Et(r.cssText,i,t)}))).join(`
|
|
722
|
+
`)}async function Lr(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Mt(e,t);if(n){const o=document.createElement("style"),a=document.createTextNode(n);o.appendChild(a),e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o)}}async function Rt(e,t={}){const{width:n,height:o}=xe(e,t),a=await te(e,t,!0);return await Lr(a,t),await St(a,t),Er(a,t),await Wo(a,n,o)}async function X(e,t={}){const{width:n,height:o}=xe(e,t),a=await Rt(e,t),r=await ee(a),i=document.createElement("canvas"),s=i.getContext("2d"),c=t.pixelRatio||zo(),u=t.canvasWidth||n,l=t.canvasHeight||o;return i.width=u*c,i.height=l*c,t.skipAutoScale||qo(i),i.style.width=`${u}`,i.style.height=`${l}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,i.width,i.height)),s.drawImage(r,0,0,i.width,i.height),i}async function Tr(e,t={}){const{width:n,height:o}=xe(e,t);return(await X(e,t)).getContext("2d").getImageData(0,0,n,o).data}async function Mr(e,t={}){return(await X(e,t)).toDataURL()}async function Rr(e,t={}){return(await X(e,t)).toDataURL("image/jpeg",t.quality||1)}async function Pr(e,t={}){const n=await X(e,t);return await jo(n)}async function Ir(e,t={}){return Mt(e,t)}const Nr=Object.freeze(Object.defineProperty({__proto__:null,getFontEmbedCSS:Ir,toBlob:Pr,toCanvas:X,toJpeg:Rr,toPixelData:Tr,toPng:Mr,toSvg:Rt},Symbol.toStringTag,{value:"Module"}));C.currentMonitorUrl=ye,C.destroy=ut,C.domEle=je,C.domSS=We,C.errors=Pe,C.hide=To,C.init=Lo,C.isMonitorActive=ge,C.isPluginFailure=Ve,C.liveMonitor=Ao,C.metadata=Te,C.off=dt,C.on=Ro,C.probe=Co,C.show=lt,C.startMonitor=be,C.status=Mo,C.stopMonitor=V,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
|
|
108
723
|
//# sourceMappingURL=beacon.umd.js.map
|