@launchsecure/launch-kit 0.0.29 → 0.0.30

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.
Files changed (191) hide show
  1. package/dist/beacon/beacon.mjs +2759 -1246
  2. package/dist/beacon/beacon.mjs.map +1 -1
  3. package/dist/beacon/beacon.umd.js +710 -95
  4. package/dist/beacon/beacon.umd.js.map +1 -1
  5. package/dist/beacon/types/core.d.ts +14 -0
  6. package/dist/beacon/types/core.d.ts.map +1 -0
  7. package/dist/beacon/types/ctx.d.ts +14 -0
  8. package/dist/beacon/types/ctx.d.ts.map +1 -0
  9. package/dist/beacon/types/element.d.ts +16 -48
  10. package/dist/beacon/types/element.d.ts.map +1 -1
  11. package/dist/beacon/types/index.d.ts +5 -4
  12. package/dist/beacon/types/index.d.ts.map +1 -1
  13. package/dist/beacon/types/internal/annotation-cache.d.ts +10 -0
  14. package/dist/beacon/types/internal/annotation-cache.d.ts.map +1 -0
  15. package/dist/beacon/types/internal/element-capture.d.ts +19 -0
  16. package/dist/beacon/types/internal/element-capture.d.ts.map +1 -0
  17. package/dist/beacon/types/internal/event-buffer.d.ts +16 -0
  18. package/dist/beacon/types/internal/event-buffer.d.ts.map +1 -0
  19. package/dist/beacon/types/internal/framework-detect.d.ts +6 -0
  20. package/dist/beacon/types/internal/framework-detect.d.ts.map +1 -0
  21. package/dist/beacon/types/internal/markers.d.ts +17 -0
  22. package/dist/beacon/types/internal/markers.d.ts.map +1 -0
  23. package/dist/beacon/types/internal/monitor/capture-dom.d.ts +14 -0
  24. package/dist/beacon/types/internal/monitor/capture-dom.d.ts.map +1 -0
  25. package/dist/beacon/types/internal/monitor/capture-network.d.ts +12 -0
  26. package/dist/beacon/types/internal/monitor/capture-network.d.ts.map +1 -0
  27. package/dist/beacon/types/internal/monitor/overlay.d.ts +16 -0
  28. package/dist/beacon/types/internal/monitor/overlay.d.ts.map +1 -0
  29. package/dist/beacon/types/internal/monitor/session.d.ts +41 -0
  30. package/dist/beacon/types/internal/monitor/session.d.ts.map +1 -0
  31. package/dist/beacon/types/{monitor → internal/monitor}/transport.d.ts +3 -3
  32. package/dist/beacon/types/internal/monitor/transport.d.ts.map +1 -0
  33. package/dist/beacon/types/{monitor/types.d.ts → internal/monitor/wire.d.ts} +69 -27
  34. package/dist/beacon/types/internal/monitor/wire.d.ts.map +1 -0
  35. package/dist/beacon/types/{ui → internal}/pick-mode-overlay.d.ts +4 -5
  36. package/dist/beacon/types/internal/pick-mode-overlay.d.ts.map +1 -0
  37. package/dist/beacon/types/{capture → internal}/picker.d.ts +0 -1
  38. package/dist/beacon/types/internal/picker.d.ts.map +1 -0
  39. package/dist/beacon/types/{ui → internal}/pin-popover.d.ts +1 -1
  40. package/dist/beacon/types/internal/pin-popover.d.ts.map +1 -0
  41. package/dist/beacon/types/{capture → internal}/screenshot.d.ts +1 -0
  42. package/dist/beacon/types/internal/screenshot.d.ts.map +1 -0
  43. package/dist/beacon/types/internal/selector.d.ts.map +1 -0
  44. package/dist/beacon/types/plugins/domEle.d.ts +14 -0
  45. package/dist/beacon/types/plugins/domEle.d.ts.map +1 -0
  46. package/dist/beacon/types/plugins/domSS.d.ts +8 -0
  47. package/dist/beacon/types/plugins/domSS.d.ts.map +1 -0
  48. package/dist/beacon/types/plugins/errors.d.ts +3 -0
  49. package/dist/beacon/types/plugins/errors.d.ts.map +1 -0
  50. package/dist/beacon/types/plugins/index.d.ts +8 -0
  51. package/dist/beacon/types/plugins/index.d.ts.map +1 -0
  52. package/dist/beacon/types/plugins/liveMonitor.d.ts +14 -0
  53. package/dist/beacon/types/plugins/liveMonitor.d.ts.map +1 -0
  54. package/dist/beacon/types/plugins/metadata.d.ts +3 -0
  55. package/dist/beacon/types/plugins/metadata.d.ts.map +1 -0
  56. package/dist/beacon/types/registry.d.ts +33 -0
  57. package/dist/beacon/types/registry.d.ts.map +1 -0
  58. package/dist/beacon/types/styles.d.ts +8 -0
  59. package/dist/beacon/types/styles.d.ts.map +1 -0
  60. package/dist/beacon/types/transport.d.ts +3 -0
  61. package/dist/beacon/types/transport.d.ts.map +1 -0
  62. package/dist/beacon/types/types.d.ts +152 -68
  63. package/dist/beacon/types/types.d.ts.map +1 -1
  64. package/dist/beacon/types/ui/dialog.d.ts +53 -0
  65. package/dist/beacon/types/ui/dialog.d.ts.map +1 -0
  66. package/dist/beacon/types/ui/form.d.ts +7 -0
  67. package/dist/beacon/types/ui/form.d.ts.map +1 -0
  68. package/dist/beacon/types/ui/overlay.d.ts +6 -0
  69. package/dist/beacon/types/ui/overlay.d.ts.map +1 -0
  70. package/dist/deck-client/assets/{_baseUniq-W2JQDmje.js → _baseUniq-DCt2IMRR.js} +1 -1
  71. package/dist/deck-client/assets/{arc-DIBWAId9.js → arc-h-ifqmNR.js} +1 -1
  72. package/dist/deck-client/assets/{architectureDiagram-Q4EWVU46-CAIRMvJK.js → architectureDiagram-Q4EWVU46-C9dITSPv.js} +1 -1
  73. package/dist/deck-client/assets/{blockDiagram-DXYQGD6D-BeNaNiOi.js → blockDiagram-DXYQGD6D-BHuJT34t.js} +1 -1
  74. package/dist/deck-client/assets/{c4Diagram-AHTNJAMY-B9Ozi62h.js → c4Diagram-AHTNJAMY-CpvMGtDG.js} +1 -1
  75. package/dist/deck-client/assets/channel-2PZVMiXf.js +1 -0
  76. package/dist/deck-client/assets/{chunk-4BX2VUAB-D7AZ47dt.js → chunk-4BX2VUAB-B6md1VIm.js} +1 -1
  77. package/dist/deck-client/assets/{chunk-4TB4RGXK-DnVnNPcI.js → chunk-4TB4RGXK-BmEnX8ik.js} +1 -1
  78. package/dist/deck-client/assets/{chunk-55IACEB6-UKYs-YNd.js → chunk-55IACEB6-BZPUyZAZ.js} +1 -1
  79. package/dist/deck-client/assets/{chunk-EDXVE4YY-D43b-SKn.js → chunk-EDXVE4YY-BWwNUK-l.js} +1 -1
  80. package/dist/deck-client/assets/{chunk-FMBD7UC4-QzBAoyyW.js → chunk-FMBD7UC4-o7gSppGI.js} +1 -1
  81. package/dist/deck-client/assets/{chunk-OYMX7WX6-Cjif4r6W.js → chunk-OYMX7WX6-C4KoTL5p.js} +1 -1
  82. package/dist/deck-client/assets/{chunk-QZHKN3VN-CqLDirEI.js → chunk-QZHKN3VN-jkf68sDs.js} +1 -1
  83. package/dist/deck-client/assets/{chunk-YZCP3GAM-_FQvmMs4.js → chunk-YZCP3GAM-Cd4yBE7o.js} +1 -1
  84. package/dist/deck-client/assets/classDiagram-6PBFFD2Q-Bt8xBAof.js +1 -0
  85. package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-Bt8xBAof.js +1 -0
  86. package/dist/deck-client/assets/clone-BHQryoDl.js +1 -0
  87. package/dist/deck-client/assets/{cose-bilkent-S5V4N54A-rfrocesE.js → cose-bilkent-S5V4N54A-DeGFUgAV.js} +1 -1
  88. package/dist/deck-client/assets/{dagre-KV5264BT-Bv_7DJat.js → dagre-KV5264BT-ekcYJuUV.js} +1 -1
  89. package/dist/deck-client/assets/{diagram-5BDNPKRD-4F1414G5.js → diagram-5BDNPKRD-YHPk4rV2.js} +1 -1
  90. package/dist/deck-client/assets/{diagram-G4DWMVQ6-C4-Pszqm.js → diagram-G4DWMVQ6-DM-JCd_B.js} +1 -1
  91. package/dist/deck-client/assets/{diagram-MMDJMWI5-B647TIx9.js → diagram-MMDJMWI5-l5FK1ybk.js} +1 -1
  92. package/dist/deck-client/assets/{diagram-TYMM5635-BFAqpezd.js → diagram-TYMM5635-CIN4_1-j.js} +1 -1
  93. package/dist/deck-client/assets/{erDiagram-SMLLAGMA-BfBfrJOC.js → erDiagram-SMLLAGMA-MyinSkEl.js} +1 -1
  94. package/dist/deck-client/assets/{flowDiagram-DWJPFMVM-DX9YAYes.js → flowDiagram-DWJPFMVM-Dk8nn42x.js} +1 -1
  95. package/dist/deck-client/assets/{ganttDiagram-T4ZO3ILL-DCuiy7wF.js → ganttDiagram-T4ZO3ILL-BU1ihicu.js} +1 -1
  96. package/dist/deck-client/assets/{gitGraphDiagram-UUTBAWPF-CGp1IXUh.js → gitGraphDiagram-UUTBAWPF-BjsTL13C.js} +1 -1
  97. package/dist/deck-client/assets/{graph-B7g8aoxv.js → graph-DJmh-xi7.js} +1 -1
  98. package/dist/deck-client/assets/{index-Dg1r-WSN.js → index-KsShfCV-.js} +3 -3
  99. package/dist/deck-client/assets/{infoDiagram-42DDH7IO-L3fahMkF.js → infoDiagram-42DDH7IO-Dxvy_RB4.js} +1 -1
  100. package/dist/deck-client/assets/{ishikawaDiagram-UXIWVN3A-aS_EjWBZ.js → ishikawaDiagram-UXIWVN3A-DPOaNF1l.js} +1 -1
  101. package/dist/deck-client/assets/{journeyDiagram-VCZTEJTY-djTSQZF9.js → journeyDiagram-VCZTEJTY-DMew3K5c.js} +1 -1
  102. package/dist/deck-client/assets/{kanban-definition-6JOO6SKY-CcTHo4CM.js → kanban-definition-6JOO6SKY-csciJFuk.js} +1 -1
  103. package/dist/deck-client/assets/{layout-mEJiadb7.js → layout-Dg4yyms2.js} +1 -1
  104. package/dist/deck-client/assets/{linear-XgTKqyRu.js → linear-BA3zU6gq.js} +1 -1
  105. package/dist/deck-client/assets/{min-Ct9jZdpd.js → min-lz-Ird-p.js} +1 -1
  106. package/dist/deck-client/assets/{mindmap-definition-QFDTVHPH-BaFxCGNU.js → mindmap-definition-QFDTVHPH-CCEN8OQV.js} +1 -1
  107. package/dist/deck-client/assets/{pieDiagram-DEJITSTG-CIbYYjtw.js → pieDiagram-DEJITSTG-DM6n1HY7.js} +1 -1
  108. package/dist/deck-client/assets/{quadrantDiagram-34T5L4WZ-D9EtCOvh.js → quadrantDiagram-34T5L4WZ-_ULoR66n.js} +1 -1
  109. package/dist/deck-client/assets/{requirementDiagram-MS252O5E-xeni9eVG.js → requirementDiagram-MS252O5E-BuwJs7Tn.js} +1 -1
  110. package/dist/deck-client/assets/{sankeyDiagram-XADWPNL6-LYeknz9h.js → sankeyDiagram-XADWPNL6-BEsuzkW4.js} +1 -1
  111. package/dist/deck-client/assets/{sequenceDiagram-FGHM5R23-RDbsKFZf.js → sequenceDiagram-FGHM5R23-CP2H0YWf.js} +1 -1
  112. package/dist/deck-client/assets/{stateDiagram-FHFEXIEX-BH1Zjglk.js → stateDiagram-FHFEXIEX-B5Gw_NNL.js} +1 -1
  113. package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-4T4wMDXr.js +1 -0
  114. package/dist/deck-client/assets/{timeline-definition-GMOUNBTQ-IFXxKptt.js → timeline-definition-GMOUNBTQ-DsoYydQa.js} +1 -1
  115. package/dist/deck-client/assets/{vennDiagram-DHZGUBPP-D-sLkQs9.js → vennDiagram-DHZGUBPP-Dz8JT_ob.js} +1 -1
  116. package/dist/deck-client/assets/wardley-RL74JXVD-DGHQ_Ijv.js +162 -0
  117. package/dist/deck-client/assets/{wardleyDiagram-NUSXRM2D-BTjjuDU3.js → wardleyDiagram-NUSXRM2D-DN1LJMB1.js} +1 -1
  118. package/dist/deck-client/assets/{xychartDiagram-5P7HB3ND-AYbv92n-.js → xychartDiagram-5P7HB3ND-nb0oSfrQ.js} +1 -1
  119. package/dist/deck-client/index.html +1 -1
  120. package/dist/server/beacon-monitor-entry.js +548 -6
  121. package/dist/server/chart-serve.js +917 -248
  122. package/dist/server/cli.js +1368 -374
  123. package/dist/server/council-entry.js +0 -0
  124. package/dist/server/fb-wizard.js +0 -0
  125. package/dist/server/graph-mcp-entry.js +1326 -322
  126. package/dist/server/init-entry.js +16 -11
  127. package/dist/server/orbit-entry.js +135 -7
  128. package/dist/server/parse-worker-entry.js +918 -247
  129. package/package.json +22 -22
  130. package/scaffolds/ls-marketplace/plugins/kit/skills/beacon-array.md +107 -0
  131. package/scaffolds/ls-marketplace/plugins/kit/skills/beacon-clear.md +94 -0
  132. package/scaffolds/ls-marketplace/plugins/kit/skills/beacon-pulse.md +82 -0
  133. package/scaffolds/ls-marketplace/plugins/kit/skills/beacon-scan.md +66 -0
  134. package/scaffolds/ls-marketplace/plugins/kit/skills/blast-radius.md +101 -0
  135. package/scaffolds/ls-marketplace/plugins/kit/skills/brief.md +112 -0
  136. package/scaffolds/ls-marketplace/plugins/kit/skills/course.md +84 -0
  137. package/scaffolds/ls-marketplace/plugins/kit/skills/debug.md +92 -0
  138. package/scaffolds/ls-marketplace/plugins/kit/skills/deploy-check.md +160 -0
  139. package/scaffolds/ls-marketplace/plugins/kit/skills/diagram.md +134 -0
  140. package/scaffolds/ls-marketplace/plugins/kit/skills/orbit.md +87 -0
  141. package/scaffolds/ls-marketplace/plugins/kit/skills/prototype.md +90 -0
  142. package/scaffolds/ls-marketplace/plugins/kit/skills/recall.md +83 -0
  143. package/scaffolds/ls-marketplace/plugins/kit/{commands → skills}/show-mcp-status.md +4 -4
  144. package/scaffolds/ls-marketplace/plugins/kit/skills/wireframe.md +70 -0
  145. package/scaffolds/migrate-safety/scripts/migrate-with-backup.sh +0 -0
  146. package/scaffolds/recall-hook/scripts/ensure-recall.sh +0 -0
  147. package/scaffolds/statusline/statusline-mcp.sh +21 -9
  148. package/dist/beacon/types/capture/element.d.ts +0 -3
  149. package/dist/beacon/types/capture/element.d.ts.map +0 -1
  150. package/dist/beacon/types/capture/events.d.ts +0 -20
  151. package/dist/beacon/types/capture/events.d.ts.map +0 -1
  152. package/dist/beacon/types/capture/framework.d.ts +0 -3
  153. package/dist/beacon/types/capture/framework.d.ts.map +0 -1
  154. package/dist/beacon/types/capture/metadata.d.ts +0 -3
  155. package/dist/beacon/types/capture/metadata.d.ts.map +0 -1
  156. package/dist/beacon/types/capture/overlay.d.ts +0 -7
  157. package/dist/beacon/types/capture/overlay.d.ts.map +0 -1
  158. package/dist/beacon/types/capture/picker.d.ts.map +0 -1
  159. package/dist/beacon/types/capture/screenshot.d.ts.map +0 -1
  160. package/dist/beacon/types/capture/selector.d.ts.map +0 -1
  161. package/dist/beacon/types/monitor/dom.d.ts +0 -13
  162. package/dist/beacon/types/monitor/dom.d.ts.map +0 -1
  163. package/dist/beacon/types/monitor/index.d.ts +0 -19
  164. package/dist/beacon/types/monitor/index.d.ts.map +0 -1
  165. package/dist/beacon/types/monitor/network.d.ts +0 -12
  166. package/dist/beacon/types/monitor/network.d.ts.map +0 -1
  167. package/dist/beacon/types/monitor/transport.d.ts.map +0 -1
  168. package/dist/beacon/types/monitor/types.d.ts.map +0 -1
  169. package/dist/beacon/types/transport/submit.d.ts +0 -3
  170. package/dist/beacon/types/transport/submit.d.ts.map +0 -1
  171. package/dist/beacon/types/ui/button.d.ts +0 -2
  172. package/dist/beacon/types/ui/button.d.ts.map +0 -1
  173. package/dist/beacon/types/ui/drawer.d.ts +0 -33
  174. package/dist/beacon/types/ui/drawer.d.ts.map +0 -1
  175. package/dist/beacon/types/ui/icons.d.ts +0 -9
  176. package/dist/beacon/types/ui/icons.d.ts.map +0 -1
  177. package/dist/beacon/types/ui/monitor-panel.d.ts +0 -19
  178. package/dist/beacon/types/ui/monitor-panel.d.ts.map +0 -1
  179. package/dist/beacon/types/ui/pick-mode-overlay.d.ts.map +0 -1
  180. package/dist/beacon/types/ui/pin-popover.d.ts.map +0 -1
  181. package/dist/deck-client/assets/channel-CRdozqbp.js +0 -1
  182. package/dist/deck-client/assets/classDiagram-6PBFFD2Q-lIZMp57W.js +0 -1
  183. package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-lIZMp57W.js +0 -1
  184. package/dist/deck-client/assets/clone-BtWeSTyJ.js +0 -1
  185. package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-BrV78NDR.js +0 -1
  186. package/dist/deck-client/assets/wardley-RL74JXVD-C010F8l4.js +0 -162
  187. package/scaffolds/ls-marketplace/plugins/kit/commands/beacon-array.md +0 -92
  188. package/scaffolds/ls-marketplace/plugins/kit/commands/beacon-clear.md +0 -68
  189. package/scaffolds/ls-marketplace/plugins/kit/commands/beacon-pulse.md +0 -80
  190. package/scaffolds/ls-marketplace/plugins/kit/commands/beacon-scan.md +0 -62
  191. /package/dist/beacon/types/{capture → internal}/selector.d.ts +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
- <div class="beacon-drawer-header">
3
- <div class="beacon-drawer-title">Send feedback</div>
4
- <button type="button" class="beacon-icon-btn" data-action="close" aria-label="Close">${L.close}</button>
5
- </div>
6
- <div class="beacon-drawer-body"></div>
7
- `,this.bodyEl=this.root.querySelector(".beacon-drawer-body"),this.root.querySelector('[data-action="close"]').addEventListener("click",()=>this.callbacks.onClose()),this.render()}open(){this.root.classList.remove("minimized"),this.root.classList.add("open")}close(){this.root.classList.remove("open")}minimize(){this.root.classList.add("minimized"),this.root.classList.remove("open")}setPins(t,n){this.state.pins=t,n!==void 0&&(this.state.annotatedScreenshot=n),this.render()}setEvents(t){this.state.events=t,this.updateEventsChip()}updateEventsChip(){const t=this.bodyEl.querySelector(".beacon-events");if(!t){this.render();return}const n=this.state.events.length;if(n===0){t.hidden=!0;return}t.hidden=!1,t.dataset.count=String(n);const o=t.querySelector(".beacon-events-label");o&&(o.textContent=`${n} runtime ${n===1?"error":"errors"} will be included`);const r=t.querySelector(".beacon-events-list");r&&(r.innerHTML=this.state.events.map(s=>`
8
- <li class="beacon-events-item">
9
- <span class="beacon-events-kind ${s.kind==="unhandledrejection"?"rejection":"error"}">${s.kind==="unhandledrejection"?"rejection":"error"}</span>
10
- <span class="beacon-events-msg">${T(s.message)}</span>
11
- </li>
12
- `).join(""))}getAnnotatedScreenshot(){return this.state.annotatedScreenshot}setAnnotatedScreenshot(t){this.state.annotatedScreenshot=t,this.render()}setSubmitting(t){this.state.submitting=t,this.render()}setStatus(t,n=""){this.state.status=t,this.state.statusKind=n,this.render()}reset(){this.state={description:"",severity:"bug",pins:[],events:[],annotatedScreenshot:void 0,submitting:!1,status:"",statusKind:""},this.render()}getDescription(){return this.state.description}getSeverity(){return this.state.severity}render(){var o,r;const t=this.state.description.trim().length>0&&!this.state.submitting;this.bodyEl.innerHTML=`
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,_){typeof exports=="object"&&typeof module<"u"?_(exports):typeof define=="function"&&define.amd?define(["exports"],_):(C=typeof globalThis<"u"?globalThis:C||self,_(C.LaunchKitBeacon={}))})(this,function(C){"use strict";const _=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
- <div class="beacon-field">
19
- <span class="beacon-label">Severity</span>
20
- <div class="beacon-severity" role="radiogroup">
21
- ${this.severities.map(s=>`
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
- ${this.state.annotatedScreenshot?`
31
- <div class="beacon-field">
32
- <span class="beacon-label">Annotated screenshot</span>
33
- <img src="${this.state.annotatedScreenshot}" class="beacon-thumb" alt="Annotated screenshot preview">
34
- </div>
35
- `:""}
36
-
37
- ${this.state.pins.length>0?`
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
- ${this.state.status?`<div class="beacon-status ${this.state.statusKind}">${T(this.state.status)}</div>`:""}
81
- `;const n=this.bodyEl.querySelector("#beacon-desc");n.addEventListener("input",()=>{this.state.description=n.value,this.callbacks.onDescriptionChange(n.value);const s=this.bodyEl.querySelector('[data-action="submit"]');s&&(s.disabled=!(n.value.trim().length>0)||this.state.submitting)}),this.bodyEl.querySelectorAll('input[name="beacon-severity"]').forEach(s=>{s.addEventListener("change",()=>{s.checked&&(this.state.severity=s.value,this.callbacks.onSeverityChange(this.state.severity),this.render())})}),(o=this.bodyEl.querySelector('[data-action="annotate"]'))==null||o.addEventListener("click",()=>this.callbacks.onAnnotate()),(r=this.bodyEl.querySelector('[data-action="submit"]'))==null||r.addEventListener("click",()=>this.callbacks.onSubmit()),this.bodyEl.querySelectorAll("[data-pin-delete]").forEach(s=>{s.addEventListener("click",()=>{const i=Number(s.getAttribute("data-pin-delete"));this.callbacks.onPinDelete(i)})}),this.bodyEl.querySelectorAll(".beacon-pin-note-input").forEach(s=>{const i=s.closest("[data-pin]"),a=Number((i==null?void 0:i.getAttribute("data-pin"))??0);s.addEventListener("input",()=>this.callbacks.onPinNoteChange(a,s.value))})}}function T(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function at(e){return new Promise(t=>{const n=document.createElement("div");n.className="beacon-pin-popover open beacon-no-capture beacon-theme-auto",n.innerHTML=`
82
- <div class="beacon-pin-popover-header">
83
- <div style="display:flex;align-items:center;gap:6px;font-weight:600;font-size:13px;">
84
- <span class="beacon-pin-num">${e.pinNumber}</span>
85
- <span>Note for this pin</span>
86
- </div>
87
- <button type="button" class="beacon-icon-btn" data-action="cancel" aria-label="Discard this pin">${L.close}</button>
88
- </div>
89
- <textarea class="beacon-textarea" rows="2" placeholder="Optional — describe what's wrong here…" style="min-height:48px;"></textarea>
90
- <div class="beacon-pin-popover-actions">
91
- <button type="button" class="beacon-btn primary" data-action="save">${L.check} Save</button>
92
- </div>
93
- `;const o=240,r=160,s=Math.min(Math.max(8,e.anchor.x),window.innerWidth-o-8),i=Math.min(Math.max(8,e.anchor.y+12),window.innerHeight-r-8);n.style.left=`${s}px`,n.style.top=`${i}px`,document.body.appendChild(n);const a=n.querySelector("textarea");a.focus();function c(d){document.removeEventListener("keydown",l,!0),n.remove(),t(d)}function l(d){d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),c({cancelled:"all"}))}document.addEventListener("keydown",l,!0),n.addEventListener("click",d=>{var w;const g=(w=d.target.closest("[data-action]"))==null?void 0:w.getAttribute("data-action");if(g==="cancel"&&c({cancelled:"pin"}),g==="save"){const v=a.value.trim();c({...v?{note:v}:{},cancelled:!1})}}),a.addEventListener("keydown",d=>{if(d.key==="Enter"&&(d.metaKey||d.ctrlKey)){d.preventDefault();const u=a.value.trim();c({...u?{note:u}:{},cancelled:!1})}})})}const M="beacon-no-capture",ct="#0ea5e9",ae="Click any element to pin it · Press Esc to finish";function ce(e,t){return/^#[0-9a-fA-F]{6}$/.test(e)?`${e}${t}`:e}function lt(e={}){const t=e.accent??ct,n=ce(t,"b3"),o=ce(t,"2e"),r=document.createElement("style");r.className=M,r.textContent="@keyframes beacon-spin { to { transform: rotate(360deg); } }",document.head.appendChild(r);const s=document.createElement("div");s.className=M,s.setAttribute("aria-hidden","true"),s.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=M,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 #0000004d","pointer-events: none","white-space: nowrap","z-index: 2147483646"].join("; "),i.textContent=ae;const a=`<span style="
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 Rt(){if(typeof document>"u"||!document.head||document.getElementById(Ae))return;const e=document.createElement("style");e.id=Ae,e.textContent=_,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 F="launch-kit-beacon",Pt=typeof HTMLElement<"u"?HTMLElement:class{};class Nt extends Pt{constructor(){super(...arguments),this.onTriggerClick=null}connectedCallback(){if(this.shadow)return;this.shadow=this.attachShadow({mode:"open"});const t=document.createElement("style");t.textContent=_,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 r of o)r.addEventListener("click",()=>{var a;return(a=this.onTriggerClick)==null?void 0:a.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(F)||customElements.define(F,Nt)}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 $t extends Error{constructor(t){super(`Duplicate plugin name: "${t}"`),this.name="DuplicatePluginNameError"}}function Dt(e){const t=new Set;for(const o of e){if(t.has(o.name))throw new $t(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,r){for(const a of n)if(a.ctx=o(a.plugin.name),!!a.plugin.setupOnce)try{const i=a.plugin.setupOnce(a.ctx);typeof i=="function"&&(a.teardown=i)}catch(i){const s=i instanceof Error?i:new Error(String(i));a.status={state:"failed",failures:a.status.failures+1,error:{message:s.message,...s.stack?{stack:s.stack}:{},at:"setupOnce"}},r({plugin:a.plugin.name,error:s,at:"setupOnce"})}},destroy(){var o;for(const r of n){try{(o=r.teardown)==null||o.call(r)}catch{}r.teardown=void 0}},async capture(o,r){const a={};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&&(a[i.plugin.name]=c)}catch(s){const c=s instanceof Error?s:new Error(String(s));a[i.plugin.name]=Ft(c),i.status={state:"failed",failures:i.status.failures+1,error:{message:c.message,...c.stack?{stack:c.stack}:{},at:"capture"}},r({plugin:i.plugin.name,error:c,at:"capture"})}return a},status(){const o={};for(const r of n)o[r.plugin.name]=r.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 Ft(e){return{error:e.message,...e.stack?{stack:e.stack}:{}}}async function Bt(e,t,n,o,r="omit"){const a=await Ht(n),i=await fetch(e,{method:"POST",credentials:r,headers:{"Content-Type":"application/json",...a},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 Ht(e){return e?typeof e=="function"?await e()??{}:e:{}}function Ut(e,t,n){for(const o of t){const r=document.createElement("div");if(r.className="beacon-field",o.label){const i=document.createElement("label");i.className="beacon-label",i.textContent=o.label,r.appendChild(i)}if(o.description){const i=document.createElement("div");i.className="beacon-description",i.textContent=o.description,r.appendChild(i)}const a=zt(o,n);r.appendChild(a),e.appendChild(r)}}function zt(e,t){var o,r;const n=t.get(e.name);switch(e.type){case"toggle":{const a=document.createElement("label");a.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)),a.appendChild(i),t.set(e.name,i.checked),a}case"text":{const a=document.createElement("input");a.type="text",a.className="beacon-input";const i=n??e.defaultValue??"";return a.value=i,e.placeholder&&(a.placeholder=e.placeholder),a.addEventListener("input",()=>t.set(e.name,a.value)),t.set(e.name,i),a}case"textarea":{const a=document.createElement("textarea");a.className="beacon-textarea";const i=n??e.defaultValue??"";return a.value=i,e.placeholder&&(a.placeholder=e.placeholder),e.rows&&(a.rows=e.rows),a.addEventListener("input",()=>t.set(e.name,a.value)),t.set(e.name,i),a}case"select":{const a=document.createElement("select");a.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),a.appendChild(c)}return a.addEventListener("change",()=>t.set(e.name,a.value)),t.set(e.name,i),a}case"radio":{const a=document.createElement("div");a.className="beacon-radio-group";const i=n??e.defaultValue??((r=e.options[0])==null?void 0:r.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),a.appendChild(c)}return t.set(e.name,i),a}case"number":{const a=document.createElement("input");a.type="number",a.className="beacon-input";const i=n??e.defaultValue;return i!==void 0&&(a.value=String(i)),e.min!==void 0&&(a.min=String(e.min)),e.max!==void 0&&(a.max=String(e.max)),e.step!==void 0&&(a.step=String(e.step)),a.addEventListener("input",()=>{const s=a.value===""?void 0:Number(a.value);t.set(e.name,s)}),i!==void 0&&t.set(e.name,i),a}}}const oe="http://www.w3.org/2000/svg";function qt(){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 jt{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 r=document.createElement("div");r.className="beacon-drawer-header";const a=document.createElement("div");a.className="beacon-drawer-title",a.textContent=t.drawerTitle,r.appendChild(a);const i=document.createElement("button");i.type="button",i.className="beacon-icon-btn",i.setAttribute("aria-label",t.closeButton),i.appendChild(qt()),i.addEventListener("click",()=>this.userCloseAttempt()),r.appendChild(i),this.inner.appendChild(r),this.root.addEventListener("cancel",b=>{this.submitSucceeded||this.hasUnsavedInput()&&(b.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 b of n){const m=document.createElement("label");m.className="beacon-severity-opt",m.dataset.sev=b;const w=document.createElement("input");w.type="radio",w.name="beacon-severity",w.value=b,b===this.severitySelected&&(w.checked=!0,m.classList.add("selected")),w.addEventListener("change",()=>this.setSeverity(b)),m.appendChild(w),m.appendChild(document.createTextNode(this.severityLabel(b))),this.severitiesContainer.appendChild(m)}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,r;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(),(r=(o=this.lastActive)==null?void 0:o.focus)==null||r.call(o));break}case"hide":{this.inner.style.visibility=n?"hidden":"",this.root.style.opacity=n?"0":"";break}case"minimize":{const a=this.inner.querySelector(".beacon-drawer-body");a&&(a.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 r=document.createElement("div");if(r.className="beacon-plugin-panel",o.form.title){const a=document.createElement("div");a.className="beacon-plugin-panel-title",a.textContent=o.form.title,r.appendChild(a)}if("fields"in o.form)Ut(r,o.form.fields,{get:a=>n.get(o.name,a),set:(a,i)=>n.set(o.name,a,i)});else{const a=o.form.render(r,o.ctx);typeof a=="function"&&this.pluginCleanups.push(a)}this.pluginSlot.appendChild(r)}}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 Vt(){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 Wt(e){const t=document.createElement("div");return t.className="beacon-overlay-layer",e.appendChild(t),{layer:t}}function Xt(e,t){const n=document.createElement("div");e.layer.appendChild(n);let o;try{o=t(n)}catch(r){throw n.remove(),r}return()=>{try{o==null||o()}catch{}n.parentNode&&n.parentNode.removeChild(n)}}function Kt(){var n,o;const e=navigator;return e.userAgentData?{brand:((n=e.userAgentData.brands.find(r=>!/Not[.\-]?A.?Brand/i.test(r.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=Kt();return e?{uaData:e}:null}}}const Yt=30,re=500,Me=2e3,Gt=500,Jt=5e3,Zt=/launch-kit-beacon|beacon\.(?:es|umd|mjs)|\/beacon\//i;function B(e,t){if(e)return e.length>t?e.slice(0,t):e}function Qt(e,t){const n=(t==null?void 0:t.split(`
697
+ `).slice(0,3).join("|"))??"";return`${e}::${n}`}function en(e){return!!e&&Zt.test(e)}function tn(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,r,a;function i(s){if(en(s.stack)||s.kind==="unhandledrejection"&&/AbortError/i.test(s.message))return;const c=Qt(s.message,s.stack),u=t.get(c);if(u!==void 0&&s.ts-u<Jt){t.set(c,s.ts);return}t.set(c,s.ts),e.push(s),e.length>Yt&&e.shift();for(const l of n)try{l()}catch{}}return{install(){return o?()=>{}:typeof window>"u"?()=>{}:(o=!0,r=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:B(s.message||c||"Unknown error",re)??"Unknown error",...u?{stack:B(u,Me)}:{},...s.filename?{source:B(s.filename,Gt)}:{},...Number.isFinite(s.lineno)?{line:s.lineno}:{},...Number.isFinite(s.colno)?{col:s.colno}:{}})}catch{}},a=s=>{try{const c=s.reason,u=c instanceof Error?c.message:typeof c=="string"?c:tn(c),l=c instanceof Error?c.stack:void 0;i({ts:Date.now(),kind:"unhandledrejection",message:B(u||"Unknown rejection",re)??"Unknown rejection",...l?{stack:B(l,Me)}:{}})}catch{}},window.addEventListener("error",r),window.addEventListener("unhandledrejection",a),()=>{r&&window.removeEventListener("error",r),a&&window.removeEventListener("unhandledrejection",a),o=!1,n.clear()})},snapshot(){return e.slice()},subscribe(s){return n.add(s),()=>{n.delete(s)}}}}function Ie(){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 r=document.createElement("span");r.className="beacon-events-dot",r.textContent="●";const a=document.createElement("span");a.className="beacon-events-label",o.appendChild(r),o.appendChild(a),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="",a.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 b=document.createElement("span");b.className=`beacon-events-kind ${p.kind==="unhandledrejection"?"rejection":"error"}`,b.textContent=p.kind==="unhandledrejection"?"REJ":"ERR";const m=document.createElement("span");m.className="beacon-events-msg",m.textContent=p.message,f.appendChild(b),f.appendChild(m),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 nn=8;function Pe(e,t=document){if(!e)return!1;try{return t.querySelectorAll(`#${CSS.escape(e)}`).length===1}catch{return!1}}function on(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 rn(e){const t=e.parentElement;return t?Array.from(t.children).filter(o=>o.tagName===e.tagName).indexOf(e)+1:1}function an(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return"";if(e.id&&Pe(e.id))return`#${CSS.escape(e.id)}`;const t=[];let n=e,o=0;for(;n&&n.tagName.toLowerCase()!=="body"&&o<nn;){const r=n;if(r.id&&Pe(r.id)){t.unshift(`#${CSS.escape(r.id)}`);break}const a=on(r),i=r.parentElement;let s=a;if(i)try{const c=Array.from(r.classList).join(" ");Array.from(i.children).filter(l=>l.tagName===r.tagName&&Array.from(l.classList).join(" ")===c).length>1&&(s=`${r.tagName.toLowerCase()}:nth-of-type(${rn(r)})`)}catch{}t.unshift(s),n=i,o++}return t.join(" > ")}function sn(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 r=n,a=r.type;if(typeof a=="function"){const i=a.displayName??a.name;if(i&&i!=="_default")return{lib:"react",name:i}}if(typeof a=="object"&&a!==null){const i=a.displayName??a.name;if(i)return{lib:"react",name:i}}n=r.return}return{lib:"react"}}function cn(e){var o,r;const t=e,n=t.__vueParentComponent;if(n){const a=((o=n.type)==null?void 0:o.name)??((r=n.type)==null?void 0:r.__name);return{lib:"vue",...a?{name:a}:{}}}return t.__vue__?{lib:"vue"}:null}function ln(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 un(e){return"__svelte_meta"in e?{lib:"svelte"}:null}function dn(e){return sn(e)??cn(e)??ln(e)??un(e)??void 0}const pn=5e3,fn=1e3,Ne=1e3,_e=200,mn=50,$e=200,hn=500,bn=["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 gn(e){const t=getComputedStyle(e),n={};for(const o of bn){const r=t.getPropertyValue(o);r&&r!=="normal"&&r!=="none"&&r!=="auto"&&r!=="0px"&&(n[o]=r.trim().slice(0,hn))}return n}function yn(e){return Array.from(e.classList).slice(0,mn).map(t=>t.length>$e?t.slice(0,$e):t)}function vn(e){const t=e.getBoundingClientRect(),n=an(e),o=e.id||null,r=dn(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:yn(e),outerHTML:De(e.outerHTML,pn),...e.parentElement?{parentOuterHTML:De(e.parentElement.outerHTML,fn)}:{},computedStyles:gn(e),boundingRect:{x:Math.round(t.x),y:Math.round(t.y),w:Math.round(t.width),h:Math.round(t.height)},...r?{framework:r}:{}}}const wn=14,xn="#ffffff",En="#ffffff",Sn=3,Cn="#0ea5e9";async function Oe(e,t,n,o=Cn){const r=await An(e),a=document.createElement("canvas");a.width=r.naturalWidth,a.height=r.naturalHeight;const i=a.getContext("2d");if(!i)throw new Error("Could not get 2D canvas context");i.drawImage(r,0,0);const s=a.width/n.w,c=a.height/n.h;for(const u of t){const l=kn(u);if(!l)continue;const p=l.x*s,f=l.y*c,b=l.w*s,m=l.h*c;i.lineWidth=Sn,i.strokeStyle=o,i.strokeRect(p,f,b,m);const w=p+b,g=f;i.beginPath(),i.fillStyle=o,i.arc(w,g,wn,0,Math.PI*2),i.fill(),i.lineWidth=3,i.strokeStyle=xn,i.stroke(),i.fillStyle=En,i.font="bold 16px system-ui, -apple-system, sans-serif",i.textAlign="center",i.textBaseline="middle",i.fillText(String(u.number),w,g+1)}return a.toDataURL("image/jpeg",.85)}function kn(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 An(e){return new Promise((t,n)=>{const o=new Image;o.onload=()=>t(o),o.onerror=r=>n(r),o.src=e})}const H="beacon-no-capture",Ln="#0ea5e9",Fe="Click any element to pin it · Press Esc to finish";function Be(e,t){return/^#[0-9a-fA-F]{6}$/.test(e)?`${e}${t}`:e}function Tn(e={}){const t=e.accent??Ln,n=Be(t,"b3"),o=Be(t,"2e"),r=document.createElement("style");r.className=H,r.textContent="@keyframes beacon-spin { to { transform: rotate(360deg); } }",document.head.appendChild(r);const a=document.createElement("div");a.className=H,a.setAttribute("aria-hidden","true"),a.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=H,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=Fe;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(h){return h.replace(/[<>&]/g,p=>({"<":"&lt;",">":"&gt;","&":"&amp;"})[p])}document.body.appendChild(s),document.body.appendChild(i);const l=new Map;function d(h){const p=document.createElement("div");return p.className=M,p.setAttribute("aria-hidden","true"),p.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 #00000066","pointer-events: none","z-index: 2147483646"].join("; "),p.textContent=String(h),document.body.appendChild(p),p}function u(){const h=document.createElement("div");return h.className=M,h.setAttribute("aria-hidden","true"),h.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(h),h}function g(h,p,f){const m=f?"0.5":"1";h.outline.style.display="block",h.outline.style.opacity=m,h.outline.style.left=`${p.x}px`,h.outline.style.top=`${p.y}px`,h.outline.style.width=`${p.w}px`,h.outline.style.height=`${p.h}px`,h.marker.style.display="flex",h.marker.style.opacity=m,h.marker.style.left=`${p.x+p.w-12}px`,h.marker.style.top=`${Math.max(2,p.y-12)}px`}function w(h){h.marker.style.display="none",h.outline.style.display="none"}function v(){l.forEach(h=>{let p=h.anchor.target;if(document.contains(p)||(p=null),!p&&h.anchor.selector&&(p=document.querySelector(h.anchor.selector),p&&(h.anchor.target=p)),p){const m=p.getBoundingClientRect();if(m.width>0||m.height>0){g(h,{x:m.left,y:m.top,w:m.width,h:m.height},!1);return}}const f=h.anchor.fallbackRect;if(f&&(f.w>0||f.h>0)){g(h,f,!0);return}w(h)})}let E=null;function S(){E===null&&(E=requestAnimationFrame(()=>{E=null,v()}))}return window.addEventListener("scroll",S,!0),window.addEventListener("resize",S),{addPin(h,p){const f=d(h),m=u();l.set(h,{anchor:p,marker:f,outline:m}),v()},setLoading(h){h?i.innerHTML=a+c(h):i.textContent=ae},destroy(){window.removeEventListener("scroll",S,!0),window.removeEventListener("resize",S),E!==null&&cancelAnimationFrame(E),s.remove(),i.remove(),r.remove(),l.forEach(({marker:h,outline:p})=>{h.remove(),p.remove()}),l.clear()}}}const dt="#0ea5e9";function ut(e,t){return/^#[0-9a-fA-F]{6}$/.test(e)?`${e}${t}`:e}function ht(e){const{shadowRoot:t,onHover:n}=e,o=e.accent??dt,r=ut(o,"14"),s=document.createElement("div");s.style.cssText=["position: fixed","pointer-events: none","z-index: 2147483646",`border: 2px solid ${o}`,`background: ${r}`,"transition: all 60ms ease-out","box-sizing: border-box","border-radius: 2px"].join("; "),document.body.appendChild(s);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 a=document.body.style.cursor;document.body.style.cursor="crosshair";let c=!1,l=()=>{};const d=new Promise(f=>{l=f});function u(f){if(!f||!(f instanceof Node))return!1;let m=f;for(;m;){if(m===t||m===t.host)return!0;m=m.parentNode??m.host??null}return!1}function g(f,m){s.style.display="none",i.style.display="none";const ie=document.elementsFromPoint(f,m);s.style.display="block",i.style.display="block";for(const z of ie)if(!u(z))return z;return null}function w(f){const m=f.getBoundingClientRect();s.style.left=`${m.left}px`,s.style.top=`${m.top}px`,s.style.width=`${m.width}px`,s.style.height=`${m.height}px`;const ie=f.tagName.toLowerCase(),z=f.classList.length>0?"."+Array.from(f.classList).slice(0,2).join("."):"";i.textContent=ie+z;const ot=m.top-22;i.style.left=`${m.left}px`,i.style.top=`${ot>=0?ot:m.bottom+4}px`}function v(f){const m=g(f.clientX,f.clientY);m?(w(m),n==null||n(m)):(s.style.display="none",i.style.display="none",n==null||n(null))}function E(f){if(f.button!==0)return;f.preventDefault(),f.stopPropagation();const m=g(f.clientX,f.clientY);m&&p(m)}function S(f){f.preventDefault(),f.stopPropagation()}function h(f){f.key==="Escape"&&(f.preventDefault(),p(null))}function p(f){c||(c=!0,document.removeEventListener("mousemove",v,!0),document.removeEventListener("pointerdown",E,!0),document.removeEventListener("click",S,!0),document.removeEventListener("mouseup",S,!0),document.removeEventListener("keydown",h,!0),s.remove(),i.remove(),document.body.style.cursor=a,l(f))}return document.addEventListener("mousemove",v,!0),document.addEventListener("pointerdown",E,!0),document.addEventListener("click",S,!0),document.addEventListener("mouseup",S,!0),document.addEventListener("keydown",h,!0),{cancel:()=>p(null),promise:d}}const ft=8;function le(e,t=document){if(!e)return!1;try{return t.querySelectorAll(`#${CSS.escape(e)}`).length===1}catch{return!1}}function pt(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 mt(e){const t=e.parentElement;return t?Array.from(t.children).filter(o=>o.tagName===e.tagName).indexOf(e)+1:1}function bt(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return"";if(e.id&&le(e.id))return`#${CSS.escape(e.id)}`;const t=[];let n=e,o=0;for(;n&&n.tagName.toLowerCase()!=="body"&&o<ft;){const r=n;if(r.id&&le(r.id)){t.unshift(`#${CSS.escape(r.id)}`);break}const s=pt(r),i=r.parentElement;let a=s;if(i)try{const c=Array.from(r.classList).join(" ");Array.from(i.children).filter(d=>d.tagName===r.tagName&&Array.from(d.classList).join(" ")===c).length>1&&(a=`${r.tagName.toLowerCase()}:nth-of-type(${mt(r)})`)}catch{}t.unshift(a),n=i,o++}return t.join(" > ")}function gt(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 r=n,s=r.type;if(typeof s=="function"){const i=s.displayName??s.name;if(i&&i!=="_default")return{lib:"react",name:i}}if(typeof s=="object"&&s!==null){const i=s.displayName??s.name;if(i)return{lib:"react",name:i}}n=r.return}return{lib:"react"}}function yt(e){var o,r;const t=e,n=t.__vueParentComponent;if(n){const s=((o=n.type)==null?void 0:o.name)??((r=n.type)==null?void 0:r.__name);return{lib:"vue",...s?{name:s}:{}}}return t.__vue__?{lib:"vue"}:null}function wt(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 vt(e){return"__svelte_meta"in e?{lib:"svelte"}:null}function de(e){return gt(e)??yt(e)??wt(e)??vt(e)??void 0}const xt=5e3,St=1e3,ue=1e3,he=200,Et=50,fe=200,kt=500,Ct=["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 pe(e,t){return e.length<=t?e:e.slice(0,t)+`
104
-
105
- /* … truncated, original was ${e.length} chars */`}function At(e){const t=getComputedStyle(e),n={};for(const o of Ct){const r=t.getPropertyValue(o);r&&r!=="normal"&&r!=="none"&&r!=="auto"&&r!=="0px"&&(n[o]=r.trim().slice(0,kt))}return n}function Lt(e){return Array.from(e.classList).slice(0,Et).map(n=>n.length>fe?n.slice(0,fe):n)}function Tt(e){const t=e.getBoundingClientRect(),n=bt(e),o=e.id||null;return{selector:n.length>ue?n.slice(0,ue):n,tagName:e.tagName.toLowerCase(),id:o&&o.length>he?o.slice(0,he):o,classList:Lt(e),outerHTML:pe(e.outerHTML,xt),...e.parentElement?{parentOuterHTML:pe(e.parentElement.outerHTML,St)}:{},computedStyles:At(e),boundingRect:{x:Math.round(t.x),y:Math.round(t.y),w:Math.round(t.width),h:Math.round(t.height)},...de(e)?{framework:de(e)}:{}}}function me(){var n,o;const e=navigator;return e.userAgentData?{brand:((n=e.userAgentData.brands.find(r=>!/Not[.\-]?A.?Brand/i.test(r.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 be(){if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark";if(window.matchMedia("(prefers-color-scheme: light)").matches)return"light"}function ge(){return{url:window.location.href,...document.referrer?{referrer:document.referrer}:{},userAgent:navigator.userAgent,...me()?{uaData:me()}:{},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,...be()?{theme:be()}:{},capturedAt:new Date().toISOString()}}let q=null;async function Rt(){return q||(q=await Promise.resolve().then(()=>vo)),q}const U="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkAAIAAAoAAv/lxKUAAAAASUVORK5CYII=";function ye(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 $t(){const e=[],t=[];return document.querySelectorAll("img").forEach(n=>{ye(n.src,n.crossOrigin)||(e.push({el:n,src:n.src}),n.src=U)}),document.querySelectorAll("image").forEach(n=>{const o=n,r=o.getAttribute("href"),s=o.getAttributeNS("http://www.w3.org/1999/xlink","href"),i=r||s||"";i&&!ye(i)&&(t.push({el:o,href:r,xlink:s}),r!==null&&o.setAttribute("href",U),s!==null&&o.setAttributeNS("http://www.w3.org/1999/xlink","href",U))}),()=>{for(const{el:n,src:o}of e)n.src=o;for(const{el:n,href:o,xlink:r}of t)o!==null&&n.setAttribute("href",o),r!==null&&n.setAttributeNS("http://www.w3.org/1999/xlink","href",r)}}async function we(e={}){const{quality:t=.7,pixelRatio:n=Math.min(window.devicePixelRatio||1,2),excludeShadowRoot:o}=e,r=await Rt(),s=o?a=>{let c=a;for(;c;){if(c===o.host||c instanceof Element&&c.classList.contains("beacon-no-capture"))return!1;c=c.parentNode}return!0}:void 0,i=$t();try{return await r.toJpeg(document.documentElement,{quality:t,pixelRatio:n,cacheBust:!0,...s?{filter:s}:{},imagePlaceholder:U,width:window.innerWidth,height:window.innerHeight,style:{transform:"none"}})}finally{i()}}const It=14,Mt="#ffffff",Pt="#ffffff",_t=3,Dt="#0ea5e9";async function ve(e,t,n,o,r=Dt){const s=r,i=r,a=await Ot(e),c=document.createElement("canvas");c.width=a.naturalWidth,c.height=a.naturalHeight;const l=c.getContext("2d");if(!l)throw new Error("Could not get 2D canvas context");l.drawImage(a,0,0);const d=c.width/n.w,u=c.height/n.h;for(const g of t){const w=Ft(g,o);if(!w)continue;const v=w.x*d,E=w.y*u,S=w.w*d,h=w.h*u;l.lineWidth=_t,l.strokeStyle=i,l.strokeRect(v,E,S,h);const p=v+S,f=E;l.beginPath(),l.fillStyle=s,l.arc(p,f,It,0,Math.PI*2),l.fill(),l.lineWidth=3,l.strokeStyle=Mt,l.stroke(),l.fillStyle=Pt,l.font="bold 16px system-ui, -apple-system, sans-serif",l.textAlign="center",l.textBaseline="middle",l.fillText(String(g.number),p,f+1)}return c.toDataURL("image/jpeg",.85)}function Ft(e,t){const n=t==null?void 0:t.get(e);if(n&&document.contains(n)){const o=n.getBoundingClientRect();if(o.width>0||o.height>0)return{x:o.left,y:o.top,w:o.width,h:o.height}}if(e.selector)try{const o=document.querySelector(e.selector);if(o){const r=o.getBoundingClientRect();if(r.width>0||r.height>0)return{x:r.left,y:r.top,w:r.width,h:r.height}}}catch{}return e.boundingRect}function Ot(e){return new Promise((t,n)=>{const o=new Image;o.onload=()=>t(o),o.onerror=r=>n(r),o.src=e})}const Ut=30,W=500,xe=2e3,Bt=500,jt=5e3,Nt=/launch-kit-beacon|beacon-client|beacon\.(?:es|umd|mjs)/i,B=[],V=new Map,K=new Set;let Se=!1;function P(e,t){if(e)return e.length>t?e.slice(0,t):e}function Ht(e,t){const n=(t==null?void 0:t.split(`
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
- `)}async function po(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await tt(e,t);if(n){const o=document.createElement("style"),r=document.createTextNode(n);o.appendChild(r),e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o)}}async function nt(e,t={}){const{width:n,height:o}=te(e,t),r=await H(e,t,!0);return await po(r,t),await Ge(r,t),co(r,t),await Mn(r,n,o)}async function O(e,t={}){const{width:n,height:o}=te(e,t),r=await nt(e,t),s=await N(r),i=document.createElement("canvas"),a=i.getContext("2d"),c=t.pixelRatio||Tn(),l=t.canvasWidth||n,d=t.canvasHeight||o;return i.width=l*c,i.height=d*c,t.skipAutoScale||Rn(i),i.style.width=`${l}`,i.style.height=`${d}`,t.backgroundColor&&(a.fillStyle=t.backgroundColor,a.fillRect(0,0,i.width,i.height)),a.drawImage(s,0,0,i.width,i.height),i}async function mo(e,t={}){const{width:n,height:o}=te(e,t);return(await O(e,t)).getContext("2d").getImageData(0,0,n,o).data}async function bo(e,t={}){return(await O(e,t)).toDataURL()}async function go(e,t={}){return(await O(e,t)).toDataURL("image/jpeg",t.quality||1)}async function yo(e,t={}){const n=await O(e,t);return await $n(n)}async function wo(e,t={}){return tt(e,t)}const vo=Object.freeze(Object.defineProperty({__proto__:null,getFontEmbedCSS:wo,toBlob:yo,toCanvas:O,toJpeg:go,toPixelData:mo,toPng:bo,toSvg:nt},Symbol.toStringTag,{value:"Module"}));A.LaunchKitBeacon=Le,A.defineBeacon=Te,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
709
+ "></span>`;function c(d){return d.replace(/[<>&]/g,y=>({"<":"&lt;",">":"&gt;","&":"&amp;"})[y])}document.body.appendChild(a),document.body.appendChild(i);const u=new Map;function l(d){const y=document.createElement("div");return y.className=H,y.setAttribute("aria-hidden","true"),y.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("; "),y.textContent=String(d),document.body.appendChild(y),y}function p(){const d=document.createElement("div");return d.className=H,d.setAttribute("aria-hidden","true"),d.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(d),d}function f(d,y,h){const v=h?"0.5":"1";d.outline.style.display="block",d.outline.style.opacity=v,d.outline.style.left=`${y.x}px`,d.outline.style.top=`${y.y}px`,d.outline.style.width=`${y.w}px`,d.outline.style.height=`${y.h}px`,d.marker.style.display="flex",d.marker.style.opacity=v,d.marker.style.left=`${y.x+y.w-12}px`,d.marker.style.top=`${Math.max(2,y.y-12)}px`}function b(d){d.marker.style.display="none",d.outline.style.display="none"}function m(){u.forEach(d=>{let y=d.anchor.target;if(document.contains(y)||(y=null),!y&&d.anchor.selector&&(y=document.querySelector(d.anchor.selector),y&&(d.anchor.target=y)),y){const v=y.getBoundingClientRect();if(v.width>0||v.height>0){f(d,{x:v.left,y:v.top,w:v.width,h:v.height},!1);return}}const h=d.anchor.fallbackRect;if(h&&(h.w>0||h.h>0)){f(d,h,!0);return}b(d)})}let w=null;function g(){w===null&&(w=requestAnimationFrame(()=>{w=null,m()}))}return window.addEventListener("scroll",g,!0),window.addEventListener("resize",g),{addPin(d,y){const h=l(d),v=p();u.set(d,{anchor:y,marker:h,outline:v}),m()},setLoading(d){d?i.innerHTML=s+c(d):i.textContent=Fe},destroy(){window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g),w!==null&&cancelAnimationFrame(w),a.remove(),i.remove(),r.remove(),u.forEach(({marker:d,outline:y})=>{d.remove(),y.remove()}),u.clear()}}}const Mn='<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>',Rn='<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">${Mn}</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">${Rn} Save</button>
720
+ </div>
721
+ `;const o=240,r=160,a=Math.min(Math.max(8,e.anchor.x),window.innerWidth-o-8),i=Math.min(Math.max(8,e.anchor.y+12),window.innerHeight-r-8);n.style.left=`${a}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 b;const f=(b=l.target.closest("[data-action]"))==null?void 0:b.getAttribute("data-action");if(f==="cancel"&&c({cancelled:"pin"}),f==="save"){const m=s.value.trim();c({...m?{note:m}:{},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 Pn="#0ea5e9";function Nn(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??Pn,r=Nn(o,"14"),a=document.createElement("div");a.style.cssText=["position: fixed","pointer-events: none","z-index: 2147483646",`border: 2px solid ${o}`,`background: ${r}`,"transition: all 60ms ease-out","box-sizing: border-box","border-radius: 2px"].join("; "),document.body.appendChild(a);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 v=h;for(;v;){if(v===t||v===t.host)return!0;v=v.parentNode??v.host??null}return!1}function f(h,v){a.style.display="none",i.style.display="none";const k=document.elementsFromPoint(h,v);a.style.display="block",i.style.display="block";for(const S of k)if(!p(S))return S;return null}function b(h){const v=h.getBoundingClientRect();a.style.left=`${v.left}px`,a.style.top=`${v.top}px`,a.style.width=`${v.width}px`,a.style.height=`${v.height}px`;const k=h.tagName.toLowerCase(),S=h.classList.length>0?"."+Array.from(h.classList).slice(0,2).join("."):"";i.textContent=k+S;const R=v.top-22;i.style.left=`${v.left}px`,i.style.top=`${R>=0?R:v.bottom+4}px`}function m(h){const v=f(h.clientX,h.clientY);v?(b(v),n==null||n(v)):(a.style.display="none",i.style.display="none",n==null||n(null))}function w(h){if(h.button!==0)return;h.preventDefault(),h.stopPropagation();const v=f(h.clientX,h.clientY);v&&y(v)}function g(h){h.preventDefault(),h.stopPropagation()}function d(h){h.key==="Escape"&&(h.preventDefault(),y(null))}function y(h){c||(c=!0,document.removeEventListener("mousemove",m,!0),document.removeEventListener("pointerdown",w,!0),document.removeEventListener("click",g,!0),document.removeEventListener("mouseup",g,!0),document.removeEventListener("keydown",d,!0),a.remove(),i.remove(),document.body.style.cursor=s,u(h))}return document.addEventListener("mousemove",m,!0),document.addEventListener("pointerdown",w,!0),document.addEventListener("click",g,!0),document.addEventListener("mouseup",g,!0),document.addEventListener("keydown",d,!0),{cancel:()=>y(null),promise:l}}let ae=null;async function $n(){return ae||(ae=await Promise.resolve().then(()=>Rr)),ae}const X="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkAAIAAAoAAv/lxKUAAAAASUVORK5CYII=";function He(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 Dn(){const e=[],t=[];return document.querySelectorAll("img").forEach(n=>{He(n.src,n.crossOrigin)||(e.push({el:n,src:n.src}),n.src=X)}),document.querySelectorAll("image").forEach(n=>{const o=n,r=o.getAttribute("href"),a=o.getAttributeNS("http://www.w3.org/1999/xlink","href"),i=r||a||"";i&&!He(i)&&(t.push({el:o,href:r,xlink:a}),r!==null&&o.setAttribute("href",X),a!==null&&o.setAttributeNS("http://www.w3.org/1999/xlink","href",X))}),()=>{for(const{el:n,src:o}of e)n.src=o;for(const{el:n,href:o,xlink:r}of t)o!==null&&n.setAttribute("href",o),r!==null&&n.setAttributeNS("http://www.w3.org/1999/xlink","href",r)}}async function Ue(e={}){const{quality:t=.7,pixelRatio:n=Math.min(window.devicePixelRatio||1,2),excludeShadowRoot:o,excludeHosts:r}=e,a=await $n(),i=o||r!=null&&r.length?c=>{let u=c;for(;u;){if(o&&u===o.host||r&&u instanceof Element&&r.includes(u)||u instanceof Element&&u.classList.contains("beacon-no-capture"))return!1;u=u.parentNode}return!0}:void 0,s=Dn();try{return await a.toJpeg(document.documentElement,{quality:t,pixelRatio:n,cacheBust:!0,...i?{filter:i}:{},imagePlaceholder:X,width:window.innerWidth,height:window.innerHeight,style:{transform:"none"}})}finally{s()}}let ie=null;function On(e){ie=e}function Fn(){return ie}function U(){ie=null}const ze="http://www.w3.org/2000/svg";function Bn(){const e=document.createElementNS(ze,"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(ze,"path");o.setAttribute("d",n),e.appendChild(o)}return e}function qe(e={}){const t=e.maxPins??20;let n=[],o=new WeakMap,r=null,a=null,i=null,s=null,c=null;function u(){n=[],o=new WeakMap,r=null,U(),m(),w()}function l(){const g=document.querySelector("launch-kit-beacon");return(g==null?void 0:g.shadowRoot)??null}function p(){if(typeof window>"u")return e.accent??"#0ea5e9";if(e.accent)return e.accent;const g=document.querySelector("launch-kit-beacon");return g&&getComputedStyle(g).getPropertyValue("--beacon-accent").trim()||"#0ea5e9"}async function f(g){const d=l();if(!d)return;const y=p(),h=await g.requestMode("pickElement"),v=Tn({accent:y});for(const k of n){const S=o.get(k);S&&v.addPin(k.number,{target:S,selector:k.selector,fallbackRect:k.boundingRect})}try{let k=!0;for(;k&&!(n.length>=t);){const R=await _n({shadowRoot:d,accent:y}).promise;if(!R)break;const N=R.getBoundingClientRect(),P=await In({anchor:{x:N.left,y:N.bottom},pinNumber:n.length+1});if(P.cancelled==="all"){k=!1;break}if(P.cancelled==="pin")continue;const E=vn(R),A={number:n.length+1,...E,...P.note?{note:P.note}:{}};n.push(A),o.set(A,R),v.addPin(A.number,{target:R,selector:E.selector,fallbackRect:E.boundingRect})}if(n.length>0){v.setLoading("Capturing screenshot…"),await new Promise(S=>requestAnimationFrame(()=>S()));try{const S=Array.from(document.querySelectorAll("launch-kit-beacon")),R=await Ue({excludeHosts:S}),N=n.map(A=>({number:A.number,selector:A.selector,boundingRect:A.boundingRect,...o.get(A)?{liveElement:o.get(A)}:{}})),P={w:window.innerWidth,h:window.innerHeight,dpr:window.devicePixelRatio||1},E=await Oe(R,N,P,y);r=E,On({dataUrl:E,mime:"image/jpeg"})}catch{r=null,U()}}else r=null,U()}finally{v.destroy(),h()}m(),w()}function b(g){const d=n.findIndex(y=>y.number===g);d!==-1&&(n.splice(d,1),n.forEach((y,h)=>{y.number=h+1}),r=null,U(),m(),w())}function m(){if(a&&(a.textContent=`Pins (${n.length})`,a.style.display=n.length===0?"none":""),c&&(c.textContent=n.length===0?"Annotate elements":"Add another pin"),!!i){i.innerHTML="",i.style.display=n.length===0?"none":"";for(const g of n){const d=document.createElement("div");d.className="beacon-pin-item",d.dataset.pin=String(g.number);const y=document.createElement("span");y.className="beacon-pin-num",y.textContent=String(g.number);const h=document.createElement("div");h.className="beacon-pin-meta";const v=document.createElement("div");v.className="beacon-pin-selector",v.title=g.selector,v.textContent=g.selector||g.tagName;const k=document.createElement("input");k.type="text",k.className="beacon-pin-note-input",k.placeholder="Add a note (optional)",k.value=g.note??"",k.addEventListener("input",()=>{k.value.trim()?g.note=k.value:delete g.note}),h.appendChild(v),h.appendChild(k);const S=document.createElement("button");S.type="button",S.className="beacon-icon-btn",S.setAttribute("aria-label",`Remove pin ${g.number}`),S.appendChild(Bn()),S.addEventListener("click",()=>b(g.number)),d.appendChild(y),d.appendChild(h),d.appendChild(S),i.appendChild(d)}}}function w(){s&&(r?(s.src=r,s.style.display="block"):(s.removeAttribute("src"),s.style.display="none"))}return{name:"domEle",setupOnce(g){return g.on("close",()=>u())},form(g){return{render:d=>(a=document.createElement("div"),a.className="beacon-pin-list-header",d.appendChild(a),i=document.createElement("div"),i.className="beacon-pin-list",d.appendChild(i),c=document.createElement("button"),c.type="button",c.className="beacon-btn secondary beacon-pin-annotate",c.addEventListener("click",()=>{f(g)}),d.appendChild(c),s=document.createElement("img"),s.className="beacon-thumb",s.alt="Annotated screenshot preview",s.style.display="none",d.appendChild(s),m(),w(),()=>{a=null,i=null,s=null,c=null})}},capture(){return n.length===0?null:{pins:n}}}}function je(e){return!!e&&typeof e=="object"&&!("v"in e)&&"error"in e}function Ve(e={}){return{name:"domSS",async capture(t){const n=Fn();if(n)return{dataUrl:n.dataUrl,mime:n.mime};const o=await t.requestMode("hide");try{await new Promise(p=>requestAnimationFrame(()=>p()));const r=Array.from(document.querySelectorAll("launch-kit-beacon")),a=await Ue({quality:e.quality,pixelRatio:e.pixelRatio,excludeHosts:r}),i=t.captured("domEle"),s=Hn(i),c={w:window.innerWidth,h:window.innerHeight,dpr:window.devicePixelRatio||1},u=e.accent??Un();return{dataUrl:s.length>0?await Oe(a,s,c,u):a,mime:"image/jpeg"}}finally{o()}}}}function Hn(e){if(!e||je(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 Un(){if(typeof window>"u")return"#0ea5e9";const e=document.querySelector("launch-kit-beacon");return e&&getComputedStyle(e).getPropertyValue("--beacon-accent").trim()||"#0ea5e9"}const We="beacon-no-capture",Xe="__lsBeaconMonitorChipPos",zn="#10b981";function qn(e){const t=e.accent??zn,n=e.startedAt??Date.now(),o=document.createElement("div");o.className=`${We} beacon-monitor-overlay-frame`,o.setAttribute("aria-hidden","true"),o.style.setProperty("--beacon-monitor-accent",t),document.body.appendChild(o);const r=document.createElement("div");r.className=`${We} beacon-monitor-overlay-chip`,r.setAttribute("role","status"),r.setAttribute("aria-label","Recording — drag to move"),r.style.setProperty("--beacon-monitor-accent",t);const a=document.createElement("div");a.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"),a.appendChild(i),a.appendChild(s),a.appendChild(c),a.appendChild(u),a.appendChild(l),r.appendChild(a);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",r.appendChild(p),document.body.appendChild(r);const f=b()??m();g(w(f));function b(){try{const E=localStorage.getItem(Xe);if(!E)return null;const A=JSON.parse(E),W=typeof A.x=="number"?A.x:NaN,te=typeof A.y=="number"?A.y:NaN;return!Number.isFinite(W)||!Number.isFinite(te)?null:{x:W,y:te}}catch{return null}}function m(){const A=r.getBoundingClientRect().width||200;return{x:Math.max(8,Math.floor((window.innerWidth-A)/2)),y:16}}function w(E){const W=r.getBoundingClientRect(),te=W.width||200,Ir=W.height||40,Pr=Math.max(8,window.innerWidth-te-8),Nr=Math.max(8,window.innerHeight-Ir-8);return{x:Math.min(Math.max(8,E.x),Pr),y:Math.min(Math.max(8,E.y),Nr)}}function g(E){r.style.left=`${E.x}px`,r.style.top=`${E.y}px`}let d=!1,y=null,h={x:0,y:0};function v(E){if(E.target instanceof Element&&E.target.closest(".beacon-monitor-overlay-stop"))return;E.preventDefault(),d=!0,y=E.pointerId;try{r.setPointerCapture(E.pointerId)}catch{}r.setAttribute("data-dragging","true");const A=r.getBoundingClientRect();h={x:E.clientX-A.left,y:E.clientY-A.top}}function k(E){!d||E.pointerId!==y||g(w({x:E.clientX-h.x,y:E.clientY-h.y}))}function S(E){if(!d||E.pointerId!==y)return;d=!1,y=null,r.removeAttribute("data-dragging");try{r.releasePointerCapture(E.pointerId)}catch{}const A=r.getBoundingClientRect();try{localStorage.setItem(Xe,JSON.stringify({x:A.left,y:A.top}))}catch{}}r.addEventListener("pointerdown",v),r.addEventListener("pointermove",k),r.addEventListener("pointerup",S),r.addEventListener("pointercancel",S),l.addEventListener("click",E=>{E.stopPropagation(),e.onStop()});function R(){const E=r.getBoundingClientRect();g(w({x:E.left,y:E.top}))}window.addEventListener("resize",R);function N(){const E=Math.max(0,Math.floor((Date.now()-n)/1e3));u.textContent=jn(E)}N();const P=window.setInterval(N,1e3);return{updateUrl(E){E?(p.textContent=E,p.title=E,p.style.display=""):p.style.display="none"},destroy(){window.clearInterval(P),window.removeEventListener("resize",R),r.removeEventListener("pointerdown",v),r.removeEventListener("pointermove",k),r.removeEventListener("pointerup",S),r.removeEventListener("pointercancel",S),o.remove(),r.remove()}}}function jn(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=e%60;return t>0?`${z(t)}:${z(n)}:${z(o)}`:`${z(n)}:${z(o)}`}function z(e){return e<10?`0${e}`:String(e)}const K=80,Vn='button, a, input[type="submit"], input[type="button"], [role="button"], [role="link"], [role="menuitem"], [role="tab"], [role="option"]',Wn=1024,Xn=5;function Kn(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 r=n.tagName.toLowerCase(),a=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}${a}${i}`),a)break;n=n.parentElement}return t.join(" > ")}function Y(e,t){if(!e)return;const n=e.replace(/\s+/g," ").trim();if(n)return n.length>t?n.slice(0,t):n}function Ke(e){const t=Y(e.textContent,K),n=Y(e.getAttribute("aria-label"),K),o=e.getAttribute("data-testid")||void 0,r=e.getAttribute("name")||void 0;let a=n||t;if(!a){const i=e.closest(Vn);i&&i!==e&&(a=Y(i.getAttribute("aria-label"),K)||Y(i.textContent,K))}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}:{},...r?{name:r}:{},...a&&a!==t?{label:a}:{}}}function Yn(e,t){const n=[],o=document.querySelectorAll("body *");for(const r of Array.from(o)){const a=getComputedStyle(r);if(a.position!=="fixed"&&a.position!=="sticky")continue;const i=r.getBoundingClientRect();if(e<i.left||e>i.right||t<i.top||t>i.bottom)continue;const s=parseInt(a.zIndex,10);!Number.isFinite(s)&&a.zIndex!=="auto"||n.push({tag:r.tagName.toLowerCase(),zIndex:Number.isFinite(s)?s:0,pointerEvents:a.pointerEvents,classes:Array.from(r.classList).slice(0,5).join(" ")})}return n.sort((r,a)=>a.zIndex-r.zIndex).slice(0,Xn)}function Gn(e){const t=r=>a=>{const i=a,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,b=getComputedStyle(document.body).pointerEvents,m=p?[]:Yn(c,u);e.emitClick({kind:r,target:Ke(s),hitMatchesTarget:p,...!p&&l instanceof Element?{hitTarget:Ke(l)}:{},coords:{x:c,y:u},openDialogs:f,bodyPointerEvents:b,...m.length>0?{overlaysAtPoint:m}:{}})},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 Jn(e){const t=history.pushState,n=history.replaceState;let o=window.location.href;const r=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 r("pushState"),u},history.replaceState=function(...c){const u=n.apply(this,c);return r("replaceState"),u};const a=()=>r("popstate"),i=()=>r("hashchange");return window.addEventListener("popstate",a),window.addEventListener("hashchange",i),()=>{history.pushState=t,history.replaceState=n,window.removeEventListener("popstate",a),window.removeEventListener("hashchange",i)}}function Zn(e){const t=new WeakSet,n=(r,a)=>{const i=se(r);e.emitDialog({kind:"dialog",action:a,selector:i,state:r.getAttribute("data-state"),...a==="mount"?{outerHTML:Kn(r.outerHTML,Wn)}:{}})};for(const r of Array.from(document.querySelectorAll('[role="dialog"]')))t.add(r);const o=new MutationObserver(r=>{var a,i,s,c;for(const u of r){for(const l of Array.from(u.addedNodes)){if(!(l instanceof Element))continue;const p=(a=l.matches)!=null&&a.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 Qn(e){const t=n=>{const o=n.target;if(!(o instanceof HTMLFormElement))return;const r=[];for(const a of Array.from(o.elements)){if(!(a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement))continue;const i=a.getAttribute("name")||"<unnamed>",s=a instanceof HTMLInputElement?a.type:a.tagName.toLowerCase();let c;a instanceof HTMLInputElement&&(a.type==="checkbox"||a.type==="radio")?c=a.checked:c=!!a.value,r.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:r}})};return document.addEventListener("submit",t,{capture:!0}),()=>document.removeEventListener("submit",t,{capture:!0})}function eo(e){const t=Gn(e),n=Jn(e),o=Zn(e),r=Qn(e);return{uninstall(){t(),n(),o(),r()}}}const ce=1e3,Ye=10*1024,Ge="[REDACTED]",Je=new Set(["POST","PUT","PATCH","DELETE"]),to=[/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],no=/^(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 Ze(e){let t=e;for(const n of to)t=t.replace(n,Ge);return t}function ue(e){if(e===null||typeof e!="object")return typeof e=="string"?Ze(e):e;if(Array.isArray(e))return e.map(ue);const t={};for(const[n,o]of Object.entries(e))t[n]=no.test(n)?Ge:ue(o);return t}function Qe(e,t){if(t&&t.includes("application/json"))try{const n=JSON.parse(e);return JSON.stringify(ue(n))}catch{}return Ze(e)}function G(e,t){const n=e.length,o={bodySize:n};return n>Ye?(o.body=Qe(e.slice(0,Ye),t),o.bodyTruncated=!0):o.body=Qe(e,t),t&&(o.contentType=t),o}function oo(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((r,a)=>{o.push(`${a}=${typeof r=="string"?`[${r.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 ro(e,t){return!!((o=>o?o instanceof Headers?o.has("authorization"):Array.isArray(o)?o.some(([r])=>r.toLowerCase()==="authorization"):typeof o=="object"?Object.keys(o).some(r=>r.toLowerCase()==="authorization"):!1:!1)(t==null?void 0:t.headers)||e instanceof Request&&e.headers.has("authorization"))}function ao(e,t){return(o=>{if(o){if(o instanceof Headers)return o.get("content-type")||void 0;if(Array.isArray(o)){const r=o.find(([a])=>a.toLowerCase()==="content-type");return r?r[1]:void 0}if(typeof o=="object"){for(const[r,a]of Object.entries(o))if(r.toLowerCase()==="content-type")return a}}})(t==null?void 0:t.headers)??(e instanceof Request&&e.headers.get("content-type")||void 0)}function io(e,t,n){if(!Je.has(n))return;const o=ro(e,t),r=oo(e,t);if(r==null&&!o)return;const a=ao(e,t),i=r!=null?G(r,a):{};return o&&(i.hasAuth=!0),i}function so(e){const t=window.fetch;if(typeof t!="function")return()=>{};const n=async(o,r)=>{const a=performance.now(),i=((r==null?void 0:r.method)??(o instanceof Request?o.method:"GET")).toUpperCase(),s=typeof o=="string"?o:o instanceof URL?o.toString():o.url,c=io(o,r,i);try{const u=await t.call(window,o,r),l=Math.round(performance.now()-a),p=u.status>=400;let f;if(p||e.verbose)try{const b=await u.clone().text(),m=u.headers.get("content-type")||void 0;f=G(b,m)}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()-a);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 co(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 lo(e){const t=XMLHttpRequest.prototype,n=t.open,o=t.send,r=t.setRequestHeader,a=new WeakMap;return t.open=function(s,c,...u){return a.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=a.get(this);if(u){const l=s.toLowerCase();l==="authorization"?u.hasAuth=!0:l==="content-type"&&(u.requestContentType=c)}return r.call(this,s,c)},t.send=function(s){const c=a.get(this);if(c)if(c.start=performance.now(),Je.has(c.method)){const l=co(s);l!=null?c.request=G(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=a.get(this);if(!l)return;const p=Math.round(performance.now()-l.start),f=this.status===0||this.status>=400;let b;if((f||e.verbose)&&this.status>0)try{const m=this.responseType===""||this.responseType==="text"?this.responseText:"";if(m){const w=this.getResponseHeader("content-type")||void 0;b=G(m,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}:{},...b?{response:b}:{}}),a.delete(this)};return this.addEventListener("loadend",u),o.call(this,s)},()=>{t.open=n,t.send=o,t.setRequestHeader=r}}function uo(e){const t=so(e),n=lo(e);return{uninstall(){t(),n()}}}const po=1e3,et=50,fo=500;class mo{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()},po),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>fo&&this.buffer.shift(),this.buffer.length>=et&&this.flush())}async flush(){var o,r;if(this.destroyed||this.inflight||this.buffer.length===0)return;const t=this.buffer.splice(0,et),n=this.makeBatch(t);this.inflight=!0;try{const a=await fetch(this.url,{method:"POST",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0});a.ok||(o=this.onError)==null||o.call(this,new Error(`monitor flush: HTTP ${a.status}`))}catch(a){(r=this.onError)==null||r.call(this,a instanceof Error?a:new Error(String(a)))}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",tt="__lsBeaconMonitorSession",pe="__lsBeaconMonitorVerbose",fe="__lsBeaconMonitorDeadline",nt=30*6e4,ot=4096;let x=null;const me=new Set;function ho(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID().slice(0,8):Math.random().toString(36).slice(2,10)}function bo(e){const t=new WeakSet,n=o=>{if(o===null||typeof o!="object")return typeof o=="string"&&o.length>ot?o.slice(0,ot):o;if(t.has(o))return"[cyclic]";if(t.add(o),Array.isArray(o))return o.map(n);const r={};for(const a of Object.keys(o).slice(0,50))try{r[a]=n(o[a])}catch{r[a]="[unreadable]"}return r};try{return n(e)}catch{return"[unserialisable]"}}function he(){for(const e of me)try{e(x!==null,(x==null?void 0:x.url)??null)}catch{}}function go(e){return x?(x.seq+=1,{...e,ts:Date.now(),sessionId:x.sessionId,seq:x.seq}):{...e,ts:Date.now(),sessionId:"",seq:0}}function $(e){if(!x)return;const t=go(e);x.transport.enqueue(t)}function yo(){if(x)try{sessionStorage.setItem(de,x.url),sessionStorage.setItem(tt,x.sessionId),sessionStorage.setItem(pe,x.verbose?"1":"0"),sessionStorage.setItem(fe,String(x.deadlineMs))}catch{}}function rt(){try{sessionStorage.removeItem(de),sessionStorage.removeItem(tt),sessionStorage.removeItem(pe),sessionStorage.removeItem(fe)}catch{}}function vo(){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()+nt;return Number.isFinite(o)&&o<=Date.now()?(rt(),null):{url:e,verbose:t,deadlineMs:o}}catch{return null}}function at(e){x&&(x.seq+=1,x.transport.enqueue({kind:e.kind,ts:e.ts,sessionId:x.sessionId,seq:x.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(x&&q(),!e.url)return;const t=e.maxSessionMs??nt,n=Date.now()+t,o=ho(),r=!!e.verbose,a=new mo({url:e.url,sessionId:o,onError:m=>{console.warn("[launch-kit-beacon] monitor transport error:",m.message)}}),i=Re(),s=i.install(),c=i.snapshot();for(const m of c)at(m);let u=c.length;const l=i.subscribe(()=>{if(!x)return;const m=x.errorsBuffer.snapshot();for(;x.drainedThrough<m.length;){const w=m[x.drainedThrough];w&&at(w),x.drainedThrough+=1}}),p=uo({emit:m=>$(m),verbose:r}),f=eo({emitClick:m=>$(m),emitRoute:m=>$(m),emitDialog:m=>$(m),emitSubmit:m=>$(m)}),b=setTimeout(()=>{console.info("[launch-kit-beacon] monitor session expired (max duration reached)"),q()},Math.max(0,n-Date.now()));x={url:e.url,sessionId:o,verbose:r,deadlineMs:n,seq:0,transport:a,errorsBuffer:i,uninstallNetwork:p.uninstall,uninstallDom:f.uninstall,uninstallErrors:s,errorsUnsub:l,deadlineTimer:b,drainedThrough:u},yo(),he()}function q(){it(),rt(),he()}function wo(){x&&(it(),he())}function it(){x&&(clearTimeout(x.deadlineTimer),x.errorsUnsub(),x.uninstallErrors(),x.uninstallNetwork(),x.uninstallDom(),x.transport.destroy(),x=null)}function xo(e,t){x&&$({kind:"probe",label:e.slice(0,200),data:bo(t)})}function ge(){return x!==null}function ye(){return(x==null?void 0:x.url)??null}function st(e){return me.add(e),()=>{me.delete(e)}}function Eo(){if(x||typeof window>"u")return;const e=vo();e&&be({url:e.url,verbose:e.verbose,maxSessionMs:Math.max(6e4,e.deadlineMs-Date.now())})}function So(e={}){let t=null,n=null,o="",r=null;function a(){r||(r=qn({onStop:()=>q(),url:ye()}))}function i(){if(r){try{r.destroy()}catch{}r=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 b=document.createElement("button");b.type="button",b.className="beacon-monitor-btn",b.textContent="Start",b.disabled=!o.trim(),p.appendChild(b),t.appendChild(p);const m=document.createElement("label");m.className="beacon-monitor-verbose";const w=document.createElement("input");w.type="checkbox",w.dataset.role="verbose",m.appendChild(w),m.appendChild(document.createTextNode(" verbose (capture successful network too)")),t.appendChild(m);const g=document.createElement("div");g.className="beacon-monitor-help",g.textContent="Streams clicks, failed network, errors, route + dialog changes.",t.appendChild(g),f.addEventListener("input",()=>{o=f.value,b.disabled=!f.value.trim()}),b.addEventListener("click",()=>{const d=f.value.trim();if(d){try{new URL(d)}catch{f.setCustomValidity("Enter a valid URL (e.g. http://localhost:9876/m/abc)"),f.reportValidity();return}f.setCustomValidity(""),be({url:d,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 b=document.createElement("div");b.className="beacon-monitor-active-url",b.title=l,b.textContent=l,t.appendChild(b);const m=document.createElement("div");m.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",()=>q()),m.appendChild(w),t.appendChild(m);const g=document.createElement("div");g.className="beacon-monitor-help",g.textContent="Events stream to the URL above. Auto-stops after 30 min.",t.appendChild(g)}function u(){ge()?c():s()}return{name:"liveMonitor",setupOnce(l){Eo(),ge()&&a();const p=st((b,m)=>{b?(a(),r==null||r.updateUrl(m)):i()}),f=()=>{i(),p();try{wo()}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=st(()=>u()),()=>{n==null||n(),n=null,t=null})}}}}let L=null;const ve={"plugin:error":new Set,"submit:success":new Set,"submit:error":new Set,ready:new Set};function Co(e){if(typeof window>"u")return;if(!e.endpoint)throw new Error("init: endpoint is required");Le(),lt();const t={...Vt(),...e.labels??{}},n=new AbortController,o=Mo(e),r=e.position??"bottom-right",a=e.theme??"auto";Rt(),To(e,r,a);const i=document.querySelector(F);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=Wt(i.shadow),c=new jt(t,["bug","idea","ux","a11y"],{onSubmit:()=>{Po()},onClose:p=>{J("close",{}),p==="user"&&pt()}});i.shadow.appendChild(c.root),i.classList.add("beacon-no-capture");const u=Dt(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||Io(),healthIndicator:e.healthIndicator??"never",position:r,theme:a,currentSubmit:null,capturedEntries:{},formValues:{},lifecycleHandlers:{open:new Set,close:new Set,beforeSubmit:new Set,afterSubmit:new Set},panelSources:[]};L=l,i.onTriggerClick=()=>ct(),u.install(p=>dt(p),p=>we(p)),j("ready",{ready:!0}),l.debug&&console.info("[beacon] ready",l.endpoint)}function ct(){const e=L;e&&(e.currentSubmit||(e.panelSources=e.plugins.map(t=>{if(!t.form)return null;const n=dt(t.name);let o;try{o=t.form(n)}catch(r){return we({plugin:t.name,error:r instanceof Error?r:new Error(String(r)),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 a;const r=(a=e.formValues)[t]??(a[t]={});r[n]=o}}),e.dialog.open(),J("open",{})))}function ko(){const e=L;e&&e.dialog.close("user")}function lt(){var t;const e=L;if(e){e.initAbort.abort(),(t=e.currentSubmit)==null||t.abort(),e.registry.destroy(),U();try{e.dialog.root.remove(),e.overlayHost.layer.remove()}catch{}e.hostElement.onTriggerClick=null,L=null}}function Ao(){const e=L;return e?{ready:!0,transport:"idle",plugins:e.registry.status()}:{ready:!1,transport:"idle",plugins:{}}}function Lo(e,t){return ve[e].add(t),()=>ut(e,t)}function ut(e,t){ve[e].delete(t)}function To(e,t,n){let o=document.querySelector(F);if(!o){o=document.createElement(F),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 Mo(e){return e.plugins?e.plugins:e.defaultPlugins===!1?[]:Ro()}function Ro(){return[Te(),Ie(),qe(),Ve()]}function Io(){if(typeof window>"u")return!1;try{return new URLSearchParams(window.location.search).has("lsbeacon-debug")}catch{return!1}}function dt(e){const t=L;return _t(e,{getCaptured:o=>t==null?void 0:t.capturedEntries[o],getFormValues:o=>{var r;return t?(r=t.formValues)[o]??(r[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?Xt(t.overlayHost,o.render):()=>{},onLifecycle:(o,r)=>{if(!t)return()=>{};const a=t.lifecycleHandlers[o];return a.add(r),()=>a.delete(r)}})}function J(e,t){const n=L;if(n)for(const o of n.lifecycleHandlers[e])try{o(t)}catch(r){n.debug&&console.error("[beacon] lifecycle handler threw:",r)}}function j(e,t){for(const n of ve[e])try{n(t)}catch(o){L!=null&&L.debug&&console.error("[beacon] system handler threw:",o)}}function we(e){j("plugin:error",{plugin:e.plugin,error:e.error,at:e.at});const t=L;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 pt(){const e=L;e&&(e.dialog.resetState(),e.dialog.clearPluginPanels(),e.formValues={})}async function Po(){const e=L;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=>we(s));e.capturedEntries=o,n=No(e,t,o);let r=null;if(J("beforeSubmit",{payload:n,cancel:s=>{r===null&&(r=s)}}),r!==null){e.dialog.setSubmitting(!1),e.dialog.setStatus(`Cancelled: ${r}`,"error");return}e.dialog.setStatus("Sending…");const i=await Bt(e.endpoint,n,e.headers,e.currentSubmit.signal,e.credentials);J("afterSubmit",{payload:n,response:i}),e.dialog.setSubmitting(!1),i.ok?(j("submit:success",{payload:n,response:i}),e.dialog.setSubmitSucceeded(!0),e.dialog.setStatus(e.labels.sentSuccess,"success"),window.setTimeout(()=>{L===e&&e.dialog.close("submitted"),pt()},1500)):(j("submit:error",{payload:n,error:new Error(`HTTP ${i.status}`)}),e.dialog.setStatus(`Failed (${i.status})`,"error"))}catch(o){e.dialog.setSubmitting(!1);const r=o instanceof Error?o:new Error(String(o));n&&j("submit:error",{payload:n,error:r}),e.dialog.setStatus(`Failed: ${r.message}`,"error")}finally{e.currentSubmit=null}}function No(e,t,n){var a;const o=_o(),r=(a=e.context)==null?void 0:a.call(e);return{description:t,severity:e.dialog.getSeverity(),metadata:o,...r?{context:r}:{},plugins:n}}function _o(){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 $o(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 Do=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function I(e){const t=[];for(let n=0,o=e.length;n<o;n++)t.push(e[n]);return t}let D=null;function ft(e={}){return D||(e.includeStyleProperties?(D=e.includeStyleProperties,D):(D=I(window.getComputedStyle(document.documentElement)),D))}function Z(e,t){const o=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return o?parseFloat(o.replace("px","")):0}function Oo(e){const t=Z(e,"border-left-width"),n=Z(e,"border-right-width");return e.clientWidth+t+n}function Fo(e){const t=Z(e,"border-top-width"),n=Z(e,"border-bottom-width");return e.clientHeight+t+n}function xe(e,t={}){const n=t.width||Oo(e),o=t.height||Fo(e);return{width:n,height:o}}function Bo(){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 M=16384;function Ho(e){(e.width>M||e.height>M)&&(e.width>M&&e.height>M?e.width>e.height?(e.height*=M/e.width,e.width=M):(e.width*=M/e.height,e.height=M):e.width>M?(e.height*=M/e.width,e.width=M):(e.width*=M/e.height,e.height=M))}function Uo(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,a=new Uint8Array(r);for(let i=0;i<r;i+=1)a[i]=o.charCodeAt(i);n(new Blob([a],{type:t.type?t.type:"image/png"}))})}function Q(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 zo(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function qo(e,t,n){const o="http://www.w3.org/2000/svg",r=document.createElementNS(o,"svg"),a=document.createElementNS(o,"foreignObject");return r.setAttribute("width",`${t}`),r.setAttribute("height",`${n}`),r.setAttribute("viewBox",`0 0 ${t} ${n}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),r.appendChild(a),a.appendChild(e),zo(r)}const T=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||T(n,t)};function jo(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Vo(e,t){return ft(t).map(n=>{const o=e.getPropertyValue(n),r=e.getPropertyPriority(n);return`${n}: ${o}${r?" !important":""};`}).join(" ")}function Wo(e,t,n,o){const r=`.${e}:${t}`,a=n.cssText?jo(n):Vo(n,o);return document.createTextNode(`${r}{${a}}`)}function mt(e,t,n,o){const r=window.getComputedStyle(e,n),a=r.getPropertyValue("content");if(a===""||a==="none")return;const i=Do();try{t.className=`${t.className} ${i}`}catch{return}const s=document.createElement("style");s.appendChild(Wo(i,n,r,o)),t.appendChild(s)}function Xo(e,t,n){mt(e,t,":before",n),mt(e,t,":after",n)}const ht="application/font-woff",bt="image/jpeg",Ko={woff:ht,woff2:ht,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:bt,jpeg:bt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Yo(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function Ee(e){const t=Yo(e).toLowerCase();return Ko[t]||""}function Go(e){return e.split(/,/)[1]}function Se(e){return e.search(/^(data:)/)!==-1}function Jo(e,t){return`data:${t};base64,${e}`}async function gt(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((a,i)=>{const s=new FileReader;s.onerror=i,s.onloadend=()=>{try{a(n({res:o,result:s.result}))}catch(c){i(c)}},s.readAsDataURL(r)})}const Ce={};function Zo(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=Zo(e,t,n.includeQueryParams);if(Ce[o]!=null)return Ce[o];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let r;try{const a=await gt(e,n.fetchRequestInit,({res:i,result:s})=>(t||(t=i.headers.get("Content-Type")||""),Go(s)));r=Jo(a,t)}catch(a){r=n.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;a&&(i=typeof a=="string"?a:a.message),i&&console.warn(i)}return Ce[o]=r,r}async function Qo(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):Q(t)}async function er(e,t){if(e.currentSrc){const a=document.createElement("canvas"),i=a.getContext("2d");a.width=e.clientWidth,a.height=e.clientHeight,i==null||i.drawImage(e,0,0,a.width,a.height);const s=a.toDataURL();return Q(s)}const n=e.poster,o=Ee(n),r=await ke(n,o,t);return Q(r)}async function tr(e,t){var n;try{if(!((n=e==null?void 0:e.contentDocument)===null||n===void 0)&&n.body)return await ee(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function nr(e,t){return T(e,HTMLCanvasElement)?Qo(e):T(e,HTMLVideoElement)?er(e,t):T(e,HTMLIFrameElement)?tr(e,t):e.cloneNode(yt(e))}const or=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",yt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function rr(e,t,n){var o,r;if(yt(t))return t;let a=[];return or(e)&&e.assignedNodes?a=I(e.assignedNodes()):T(e,HTMLIFrameElement)&&(!((o=e.contentDocument)===null||o===void 0)&&o.body)?a=I(e.contentDocument.body.childNodes):a=I(((r=e.shadowRoot)!==null&&r!==void 0?r:e).childNodes),a.length===0||T(e,HTMLVideoElement)||await a.reduce((i,s)=>i.then(()=>ee(s,n)).then(c=>{c&&t.appendChild(c)}),Promise.resolve()),t}function ar(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):ft(n).forEach(a=>{let i=r.getPropertyValue(a);a==="font-size"&&i.endsWith("px")&&(i=`${Math.floor(parseFloat(i.substring(0,i.length-2)))-.1}px`),T(e,HTMLIFrameElement)&&a==="display"&&i==="inline"&&(i="block"),a==="d"&&t.getAttribute("d")&&(i=`path(${t.getAttribute("d")})`),o.setProperty(a,i,r.getPropertyPriority(a))})}function ir(e,t){T(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),T(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function sr(e,t){if(T(e,HTMLSelectElement)){const n=t,o=Array.from(n.children).find(r=>e.value===r.getAttribute("value"));o&&o.setAttribute("selected","")}}function cr(e,t,n){return T(t,Element)&&(ar(e,t,n),Xo(e,t,n),ir(e,t),sr(e,t)),t}async function lr(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const o={};for(let a=0;a<n.length;a++){const s=n[a].getAttribute("xlink:href");if(s){const c=e.querySelector(s),u=document.querySelector(s);!c&&u&&!o[s]&&(o[s]=await ee(u,t,!0))}}const r=Object.values(o);if(r.length){const a="http://www.w3.org/1999/xhtml",i=document.createElementNS(a,"svg");i.setAttribute("xmlns",a),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.style.display="none";const s=document.createElementNS(a,"defs");i.appendChild(s);for(let c=0;c<r.length;c++)s.appendChild(r[c]);e.appendChild(i)}return e}async function ee(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(o=>nr(o,t)).then(o=>rr(e,o,t)).then(o=>cr(e,o,t)).then(o=>lr(o,t))}const vt=/url\((['"]?)([^'"]+?)\1\)/g,ur=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,dr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function pr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function fr(e){const t=[];return e.replace(vt,(n,o,r)=>(t.push(r),n)),t.filter(n=>!Se(n))}async function mr(e,t,n,o,r){try{const a=n?$o(t,n):t,i=Ee(t);let s;return r||(s=await ke(a,i,o)),e.replace(pr(t),`$1${s}$3`)}catch{}return e}function hr(e,{preferredFontFormat:t}){return t?e.replace(dr,n=>{for(;;){const[o,,r]=ur.exec(n)||[];if(!r)return"";if(r===t)return`src: ${o};`}}):e}function wt(e){return e.search(vt)!==-1}async function xt(e,t,n){if(!wt(e))return e;const o=hr(e,n);return fr(o).reduce((a,i)=>a.then(s=>mr(s,i,t,n)),Promise.resolve(o))}async function O(e,t,n){var o;const r=(o=t.style)===null||o===void 0?void 0:o.getPropertyValue(e);if(r){const a=await xt(r,null,n);return t.style.setProperty(e,a,t.style.getPropertyPriority(e)),!0}return!1}async function br(e,t){await O("background",e,t)||await O("background-image",e,t),await O("mask",e,t)||await O("-webkit-mask",e,t)||await O("mask-image",e,t)||await O("-webkit-mask-image",e,t)}async function gr(e,t){const n=T(e,HTMLImageElement);if(!(n&&!Se(e.src))&&!(T(e,SVGImageElement)&&!Se(e.href.baseVal)))return;const o=n?e.src:e.href.baseVal,r=await ke(o,Ee(o),t);await new Promise((a,i)=>{e.onload=a,e.onerror=t.onImageErrorHandler?(...c)=>{try{a(t.onImageErrorHandler(...c))}catch(u){i(u)}}:i;const s=e;s.decode&&(s.decode=a),s.loading==="lazy"&&(s.loading="eager"),n?(e.srcset="",e.src=r):e.href.baseVal=r})}async function yr(e,t){const o=I(e.childNodes).map(r=>Et(r,t));await Promise.all(o).then(()=>e)}async function Et(e,t){T(e,Element)&&(await br(e,t),await gr(e,t),await yr(e,t))}function vr(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 St={};async function Ct(e){let t=St[e];if(t!=null)return t;const o=await(await fetch(e)).text();return t={url:e,cssText:o},St[e]=t,t}async function kt(e,t){let n=e.cssText;const o=/url\(["']?([^"')]+)["']?\)/g,a=(n.match(/url\([^)]+\)/g)||[]).map(async i=>{let s=i.replace(o,"$1");return s.startsWith("https://")||(s=new URL(s,e.url).href),gt(s,t.fetchRequestInit,({result:c})=>(n=n.replace(i,`url(${c})`),[i,c]))});return Promise.all(a).then(()=>n)}function At(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 a=/@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=a.exec(o);if(c===null){if(c=s.exec(o),c===null)break;a.lastIndex=s.lastIndex}else s.lastIndex=a.lastIndex;t.push(c[0])}return t}async function wr(e,t){const n=[],o=[];return e.forEach(r=>{if("cssRules"in r)try{I(r.cssRules||[]).forEach((a,i)=>{if(a.type===CSSRule.IMPORT_RULE){let s=i+1;const c=a.href,u=Ct(c).then(l=>kt(l,t)).then(l=>At(l).forEach(p=>{try{r.insertRule(p,p.startsWith("@import")?s+=1:r.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(a){const i=e.find(s=>s.href==null)||document.styleSheets[0];r.href!=null&&o.push(Ct(r.href).then(s=>kt(s,t)).then(s=>At(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",a)}}),Promise.all(o).then(()=>(e.forEach(r=>{if("cssRules"in r)try{I(r.cssRules||[]).forEach(a=>{n.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${r.href}`,a)}}),n))}function xr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>wt(t.style.getPropertyValue("src")))}async function Er(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=I(e.ownerDocument.styleSheets),o=await wr(n,t);return xr(o)}function Lt(e){return e.trim().replace(/["']/g,"")}function Sr(e){const t=new Set;function n(o){(o.style.fontFamily||getComputedStyle(o).fontFamily).split(",").forEach(a=>{t.add(Lt(a))}),Array.from(o.children).forEach(a=>{a instanceof HTMLElement&&n(a)})}return n(e),t}async function Tt(e,t){const n=await Er(e,t),o=Sr(e);return(await Promise.all(n.filter(a=>o.has(Lt(a.style.fontFamily))).map(a=>{const i=a.parentStyleSheet?a.parentStyleSheet.href:null;return xt(a.cssText,i,t)}))).join(`
722
+ `)}async function Cr(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Tt(e,t);if(n){const o=document.createElement("style"),r=document.createTextNode(n);o.appendChild(r),e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o)}}async function Mt(e,t={}){const{width:n,height:o}=xe(e,t),r=await ee(e,t,!0);return await Cr(r,t),await Et(r,t),vr(r,t),await qo(r,n,o)}async function V(e,t={}){const{width:n,height:o}=xe(e,t),r=await Mt(e,t),a=await Q(r),i=document.createElement("canvas"),s=i.getContext("2d"),c=t.pixelRatio||Bo(),u=t.canvasWidth||n,l=t.canvasHeight||o;return i.width=u*c,i.height=l*c,t.skipAutoScale||Ho(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(a,0,0,i.width,i.height),i}async function kr(e,t={}){const{width:n,height:o}=xe(e,t);return(await V(e,t)).getContext("2d").getImageData(0,0,n,o).data}async function Ar(e,t={}){return(await V(e,t)).toDataURL()}async function Lr(e,t={}){return(await V(e,t)).toDataURL("image/jpeg",t.quality||1)}async function Tr(e,t={}){const n=await V(e,t);return await Uo(n)}async function Mr(e,t={}){return Tt(e,t)}const Rr=Object.freeze(Object.defineProperty({__proto__:null,getFontEmbedCSS:Mr,toBlob:Tr,toCanvas:V,toJpeg:Lr,toPixelData:kr,toPng:Ar,toSvg:Mt},Symbol.toStringTag,{value:"Module"}));C.currentMonitorUrl=ye,C.destroy=lt,C.domEle=qe,C.domSS=Ve,C.errors=Ie,C.hide=ko,C.init=Co,C.isMonitorActive=ge,C.isPluginFailure=je,C.liveMonitor=So,C.metadata=Te,C.off=ut,C.on=Lo,C.probe=xo,C.show=ct,C.startMonitor=be,C.status=Ao,C.stopMonitor=q,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
108
723
  //# sourceMappingURL=beacon.umd.js.map