@launchsecure/launch-kit 0.0.30 → 0.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/beacon/beacon.mjs +934 -865
  2. package/dist/beacon/beacon.mjs.map +1 -1
  3. package/dist/beacon/beacon.umd.js +9 -9
  4. package/dist/beacon/beacon.umd.js.map +1 -1
  5. package/dist/beacon/types/internal/screenshot.d.ts +19 -1
  6. package/dist/beacon/types/internal/screenshot.d.ts.map +1 -1
  7. package/dist/beacon/types/plugins/domEle.d.ts.map +1 -1
  8. package/dist/chart-client/assets/{index-CJ4mgRRF.css → index-CDIhdgWg.css} +1 -1
  9. package/dist/chart-client/index.html +2 -2
  10. package/dist/client/assets/{index-DI5qSR_w.css → index-CfW4n40I.css} +1 -1
  11. package/dist/client/index.html +2 -2
  12. package/dist/council-client/assets/{index-C_-vAM9L.css → index-CZim6x1u.css} +1 -1
  13. package/dist/council-client/index.html +2 -2
  14. package/dist/deck-client/assets/{_baseUniq-DCt2IMRR.js → _baseUniq-DdHaBFYO.js} +1 -1
  15. package/dist/deck-client/assets/{arc-h-ifqmNR.js → arc-D98e_18X.js} +1 -1
  16. package/dist/deck-client/assets/{architectureDiagram-Q4EWVU46-C9dITSPv.js → architectureDiagram-Q4EWVU46-DNFZzh-4.js} +1 -1
  17. package/dist/deck-client/assets/{blockDiagram-DXYQGD6D-BHuJT34t.js → blockDiagram-DXYQGD6D-DeQvGUdX.js} +1 -1
  18. package/dist/deck-client/assets/{c4Diagram-AHTNJAMY-CpvMGtDG.js → c4Diagram-AHTNJAMY-B6ekZf1n.js} +1 -1
  19. package/dist/deck-client/assets/channel-DmR7Tyyt.js +1 -0
  20. package/dist/deck-client/assets/{chunk-4BX2VUAB-B6md1VIm.js → chunk-4BX2VUAB-9aDWymq2.js} +1 -1
  21. package/dist/deck-client/assets/{chunk-4TB4RGXK-BmEnX8ik.js → chunk-4TB4RGXK-DtKQqaI7.js} +1 -1
  22. package/dist/deck-client/assets/{chunk-55IACEB6-BZPUyZAZ.js → chunk-55IACEB6-COy9hEae.js} +1 -1
  23. package/dist/deck-client/assets/{chunk-EDXVE4YY-BWwNUK-l.js → chunk-EDXVE4YY-D_f861An.js} +1 -1
  24. package/dist/deck-client/assets/{chunk-FMBD7UC4-o7gSppGI.js → chunk-FMBD7UC4-CmuA5UKn.js} +1 -1
  25. package/dist/deck-client/assets/{chunk-OYMX7WX6-C4KoTL5p.js → chunk-OYMX7WX6-vT8z8D-0.js} +1 -1
  26. package/dist/deck-client/assets/{chunk-QZHKN3VN-jkf68sDs.js → chunk-QZHKN3VN-CTlwwg-R.js} +1 -1
  27. package/dist/deck-client/assets/{chunk-YZCP3GAM-Cd4yBE7o.js → chunk-YZCP3GAM-C44yr620.js} +1 -1
  28. package/dist/deck-client/assets/classDiagram-6PBFFD2Q-Bl4ozQWs.js +1 -0
  29. package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-Bl4ozQWs.js +1 -0
  30. package/dist/deck-client/assets/clone-BAy58j24.js +1 -0
  31. package/dist/deck-client/assets/{cose-bilkent-S5V4N54A-DeGFUgAV.js → cose-bilkent-S5V4N54A-DBB2J2nL.js} +1 -1
  32. package/dist/deck-client/assets/{dagre-KV5264BT-ekcYJuUV.js → dagre-KV5264BT-DxDTYbKl.js} +1 -1
  33. package/dist/deck-client/assets/{diagram-5BDNPKRD-YHPk4rV2.js → diagram-5BDNPKRD-DByWrWd1.js} +1 -1
  34. package/dist/deck-client/assets/{diagram-G4DWMVQ6-DM-JCd_B.js → diagram-G4DWMVQ6-B8B6ddMq.js} +1 -1
  35. package/dist/deck-client/assets/{diagram-MMDJMWI5-l5FK1ybk.js → diagram-MMDJMWI5-BMUZ2PWK.js} +1 -1
  36. package/dist/deck-client/assets/{diagram-TYMM5635-CIN4_1-j.js → diagram-TYMM5635-Bk9e8BB-.js} +1 -1
  37. package/dist/deck-client/assets/{erDiagram-SMLLAGMA-MyinSkEl.js → erDiagram-SMLLAGMA-DcOSwSol.js} +1 -1
  38. package/dist/deck-client/assets/{flowDiagram-DWJPFMVM-Dk8nn42x.js → flowDiagram-DWJPFMVM-DI-4BR0F.js} +1 -1
  39. package/dist/deck-client/assets/{ganttDiagram-T4ZO3ILL-BU1ihicu.js → ganttDiagram-T4ZO3ILL-BeZuXBoU.js} +1 -1
  40. package/dist/deck-client/assets/{gitGraphDiagram-UUTBAWPF-BjsTL13C.js → gitGraphDiagram-UUTBAWPF-Bcki__f-.js} +1 -1
  41. package/dist/deck-client/assets/{graph-DJmh-xi7.js → graph-CifKx6G1.js} +1 -1
  42. package/dist/deck-client/assets/index-6sdqbm2o.js +2 -0
  43. package/dist/deck-client/assets/{index-DsIZ3LqL.css → index-BlTlhxFW.css} +1 -1
  44. package/dist/deck-client/assets/index-CB-qlwRT.js +1195 -0
  45. package/dist/deck-client/assets/{infoDiagram-42DDH7IO-Dxvy_RB4.js → infoDiagram-42DDH7IO-CReN1nFN.js} +1 -1
  46. package/dist/deck-client/assets/{ishikawaDiagram-UXIWVN3A-DPOaNF1l.js → ishikawaDiagram-UXIWVN3A-CDF_VLN_.js} +1 -1
  47. package/dist/deck-client/assets/{journeyDiagram-VCZTEJTY-DMew3K5c.js → journeyDiagram-VCZTEJTY-DwgGrNVB.js} +1 -1
  48. package/dist/deck-client/assets/{kanban-definition-6JOO6SKY-csciJFuk.js → kanban-definition-6JOO6SKY-DB_zohh5.js} +1 -1
  49. package/dist/deck-client/assets/{layout-Dg4yyms2.js → layout-DFfX1O3z.js} +1 -1
  50. package/dist/deck-client/assets/{linear-BA3zU6gq.js → linear-CtKb4EXj.js} +1 -1
  51. package/dist/deck-client/assets/{min-lz-Ird-p.js → min-DCRRwUZv.js} +1 -1
  52. package/dist/deck-client/assets/{mindmap-definition-QFDTVHPH-CCEN8OQV.js → mindmap-definition-QFDTVHPH-D0QBOiFe.js} +1 -1
  53. package/dist/deck-client/assets/{pieDiagram-DEJITSTG-DM6n1HY7.js → pieDiagram-DEJITSTG-CD-EV5WB.js} +1 -1
  54. package/dist/deck-client/assets/{quadrantDiagram-34T5L4WZ-_ULoR66n.js → quadrantDiagram-34T5L4WZ-B-JXZ8xI.js} +1 -1
  55. package/dist/deck-client/assets/{requirementDiagram-MS252O5E-BuwJs7Tn.js → requirementDiagram-MS252O5E-D2_OK5Dp.js} +1 -1
  56. package/dist/deck-client/assets/{sankeyDiagram-XADWPNL6-BEsuzkW4.js → sankeyDiagram-XADWPNL6-BbBJqVSC.js} +1 -1
  57. package/dist/deck-client/assets/{sequenceDiagram-FGHM5R23-CP2H0YWf.js → sequenceDiagram-FGHM5R23-Db8A-Rkk.js} +1 -1
  58. package/dist/deck-client/assets/{stateDiagram-FHFEXIEX-B5Gw_NNL.js → stateDiagram-FHFEXIEX-DGJnanjS.js} +1 -1
  59. package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-CR7riiab.js +1 -0
  60. package/dist/deck-client/assets/{timeline-definition-GMOUNBTQ-DsoYydQa.js → timeline-definition-GMOUNBTQ-BRkr6T4w.js} +1 -1
  61. package/dist/deck-client/assets/{vennDiagram-DHZGUBPP-Dz8JT_ob.js → vennDiagram-DHZGUBPP-d0rsTqFo.js} +1 -1
  62. package/dist/deck-client/assets/wardley-RL74JXVD-2t7cMqdS.js +162 -0
  63. package/dist/deck-client/assets/{wardleyDiagram-NUSXRM2D-DN1LJMB1.js → wardleyDiagram-NUSXRM2D-DzboAsHh.js} +1 -1
  64. package/dist/deck-client/assets/{xychartDiagram-5P7HB3ND-nb0oSfrQ.js → xychartDiagram-5P7HB3ND-CgTP9u2V.js} +1 -1
  65. package/dist/deck-client/index.html +2 -2
  66. package/dist/server/cli.js +666 -12
  67. package/dist/server/council-entry.js +0 -0
  68. package/dist/server/deck-mcp-entry.js +141 -21
  69. package/dist/server/deck-serve.js +141 -21
  70. package/dist/server/fb-wizard.js +0 -0
  71. package/dist/server/graph-mcp-entry.js +666 -12
  72. package/dist/server/init-entry.js +15 -9
  73. package/package.json +23 -21
  74. package/scaffolds/ls-marketplace/plugins/kit/skills/analyse/SKILL.md +180 -0
  75. package/scaffolds/ls-marketplace/plugins/kit/skills/{blast-radius.md → blast-radius/SKILL.md} +28 -12
  76. package/scaffolds/ls-marketplace/plugins/kit/skills/{debug.md → debug/SKILL.md} +2 -9
  77. package/scaffolds/ls-marketplace/plugins/kit/skills/{diagram.md → diagram/SKILL.md} +27 -9
  78. package/scaffolds/ls-marketplace/plugins/kit/skills/{prototype.md → prototype/SKILL.md} +21 -1
  79. package/scaffolds/ls-marketplace/plugins/kit/skills/recovery/SKILL.md +95 -0
  80. package/scaffolds/ls-marketplace/plugins/kit/skills/{wireframe.md → wireframe/SKILL.md} +21 -1
  81. package/scaffolds/migrate-safety/scripts/migrate-with-backup.sh +0 -0
  82. package/scaffolds/recall-hook/scripts/ensure-recall.sh +0 -0
  83. package/dist/deck-client/assets/channel-2PZVMiXf.js +0 -1
  84. package/dist/deck-client/assets/classDiagram-6PBFFD2Q-Bt8xBAof.js +0 -1
  85. package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-Bt8xBAof.js +0 -1
  86. package/dist/deck-client/assets/clone-BHQryoDl.js +0 -1
  87. package/dist/deck-client/assets/index-KsShfCV-.js +0 -476
  88. package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-4T4wMDXr.js +0 -1
  89. package/dist/deck-client/assets/wardley-RL74JXVD-DGHQ_Ijv.js +0 -162
  90. package/scaffolds/ls-marketplace/plugins/kit/skills/recall.md +0 -83
  91. /package/dist/chart-client/assets/{index-Ccy-DpI-.js → index-B__ARB8k.js} +0 -0
  92. /package/dist/client/assets/{index-Dp0_okva.js → index-h8kMzVtG.js} +0 -0
  93. /package/dist/council-client/assets/{index-Dt4zWKSj.js → index-CWaDcsFR.js} +0 -0
  94. /package/scaffolds/ls-marketplace/plugins/kit/skills/{beacon-array.md → beacon-array/SKILL.md} +0 -0
  95. /package/scaffolds/ls-marketplace/plugins/kit/skills/{beacon-clear.md → beacon-clear/SKILL.md} +0 -0
  96. /package/scaffolds/ls-marketplace/plugins/kit/skills/{beacon-pulse.md → beacon-pulse/SKILL.md} +0 -0
  97. /package/scaffolds/ls-marketplace/plugins/kit/skills/{beacon-scan.md → beacon-scan/SKILL.md} +0 -0
  98. /package/scaffolds/ls-marketplace/plugins/kit/skills/{brief.md → brief/SKILL.md} +0 -0
  99. /package/scaffolds/ls-marketplace/plugins/kit/skills/{course.md → course/SKILL.md} +0 -0
  100. /package/scaffolds/ls-marketplace/plugins/kit/skills/{deploy-check.md → deploy-check/SKILL.md} +0 -0
  101. /package/scaffolds/ls-marketplace/plugins/kit/skills/{orbit.md → orbit/SKILL.md} +0 -0
  102. /package/scaffolds/ls-marketplace/plugins/kit/skills/{show-mcp-status.md → show-mcp-status/SKILL.md} +0 -0
@@ -1,4 +1,4 @@
1
- const Te = String.raw`
1
+ const Me = String.raw`
2
2
  :host {
3
3
  --beacon-accent: #0ea5e9;
4
4
  --beacon-bg: #ffffff;
@@ -694,10 +694,10 @@ dialog.beacon-dialog::backdrop {
694
694
  max-width: 100%;
695
695
  }
696
696
  `, se = "launch-kit-beacon-portal-styles";
697
- function Ye() {
697
+ function Xe() {
698
698
  if (typeof document > "u" || !document.head || document.getElementById(se)) return;
699
699
  const e = document.createElement("style");
700
- e.id = se, e.textContent = Te, document.head.appendChild(e);
700
+ e.id = se, e.textContent = Me, document.head.appendChild(e);
701
701
  }
702
702
  const V = "http://www.w3.org/2000/svg";
703
703
  function Ke() {
@@ -708,9 +708,9 @@ function Ke() {
708
708
  const n = document.createElementNS(V, "path");
709
709
  return n.setAttribute("d", "M11.6 16.8a3 3 0 1 1-5.8-1.6"), e.appendChild(t), e.appendChild(n), e;
710
710
  }
711
- const B = "launch-kit-beacon", Xe = typeof HTMLElement < "u" ? HTMLElement : class {
711
+ const z = "launch-kit-beacon", Ge = typeof HTMLElement < "u" ? HTMLElement : class {
712
712
  };
713
- class Ge extends Xe {
713
+ class Je extends Ge {
714
714
  constructor() {
715
715
  super(...arguments), this.onTriggerClick = null;
716
716
  }
@@ -718,7 +718,7 @@ class Ge extends Xe {
718
718
  if (this.shadow) return;
719
719
  this.shadow = this.attachShadow({ mode: "open" });
720
720
  const t = document.createElement("style");
721
- t.textContent = Te, this.shadow.appendChild(t), this.triggerSlot = document.createElement("slot"), this.triggerSlot.name = "trigger", this.shadow.appendChild(this.triggerSlot), this.defaultTrigger = document.createElement("button"), this.defaultTrigger.type = "button", this.defaultTrigger.className = "beacon-default-trigger", this.defaultTrigger.appendChild(Ke());
721
+ t.textContent = Me, this.shadow.appendChild(t), this.triggerSlot = document.createElement("slot"), this.triggerSlot.name = "trigger", this.shadow.appendChild(this.triggerSlot), this.defaultTrigger = document.createElement("button"), this.defaultTrigger.type = "button", this.defaultTrigger.className = "beacon-default-trigger", this.defaultTrigger.appendChild(Ke());
722
722
  const n = document.createElement("span");
723
723
  n.textContent = "Feedback", this.defaultTrigger.appendChild(n), this.healthDot = document.createElement("span"), this.healthDot.className = "beacon-health-dot", this.defaultTrigger.appendChild(this.healthDot), this.shadow.appendChild(this.defaultTrigger), this.defaultTrigger.addEventListener("click", () => {
724
724
  var o;
@@ -727,10 +727,10 @@ class Ge extends Xe {
727
727
  const o = this.triggerSlot.assignedElements();
728
728
  if (o.length > 0) {
729
729
  this.defaultTrigger.style.display = "none";
730
- for (const r of o)
731
- r.addEventListener("click", () => {
732
- var a;
733
- return (a = this.onTriggerClick) == null ? void 0 : a.call(this);
730
+ for (const a of o)
731
+ a.addEventListener("click", () => {
732
+ var r;
733
+ return (r = this.onTriggerClick) == null ? void 0 : r.call(this);
734
734
  });
735
735
  } else
736
736
  this.defaultTrigger.style.display = "";
@@ -746,10 +746,10 @@ class Ge extends Xe {
746
746
  (n = this.healthDot) == null || n.classList.toggle("visible", t);
747
747
  }
748
748
  }
749
- function Me() {
750
- typeof window > "u" || typeof customElements > "u" || customElements.get(B) || customElements.define(B, Ge);
749
+ function Ie() {
750
+ typeof window > "u" || typeof customElements > "u" || customElements.get(z) || customElements.define(z, Je);
751
751
  }
752
- function Je(e, t) {
752
+ function Ze(e, t) {
753
753
  return {
754
754
  pluginName: e,
755
755
  captured: (n) => t.getCaptured(n),
@@ -765,15 +765,15 @@ function Je(e, t) {
765
765
  captureSignal: () => t.getCaptureSignal()
766
766
  };
767
767
  }
768
- class Ze extends Error {
768
+ class Qe extends Error {
769
769
  constructor(t) {
770
770
  super(`Duplicate plugin name: "${t}"`), this.name = "DuplicatePluginNameError";
771
771
  }
772
772
  }
773
- function Qe(e) {
773
+ function et(e) {
774
774
  const t = /* @__PURE__ */ new Set();
775
775
  for (const o of e) {
776
- if (t.has(o.name)) throw new Ze(o.name);
776
+ if (t.has(o.name)) throw new Qe(o.name);
777
777
  t.add(o.name);
778
778
  }
779
779
  const n = e.map((o) => ({
@@ -784,154 +784,154 @@ function Qe(e) {
784
784
  }));
785
785
  return {
786
786
  entries: n,
787
- install(o, r) {
788
- for (const a of n)
789
- if (a.ctx = o(a.plugin.name), !!a.plugin.setupOnce)
787
+ install(o, a) {
788
+ for (const r of n)
789
+ if (r.ctx = o(r.plugin.name), !!r.plugin.setupOnce)
790
790
  try {
791
- const i = a.plugin.setupOnce(a.ctx);
792
- typeof i == "function" && (a.teardown = i);
791
+ const i = r.plugin.setupOnce(r.ctx);
792
+ typeof i == "function" && (r.teardown = i);
793
793
  } catch (i) {
794
794
  const s = i instanceof Error ? i : new Error(String(i));
795
- a.status = {
795
+ r.status = {
796
796
  state: "failed",
797
- failures: a.status.failures + 1,
797
+ failures: r.status.failures + 1,
798
798
  error: { message: s.message, ...s.stack ? { stack: s.stack } : {}, at: "setupOnce" }
799
- }, r({ plugin: a.plugin.name, error: s, at: "setupOnce" });
799
+ }, a({ plugin: r.plugin.name, error: s, at: "setupOnce" });
800
800
  }
801
801
  },
802
802
  destroy() {
803
803
  var o;
804
- for (const r of n) {
804
+ for (const a of n) {
805
805
  try {
806
- (o = r.teardown) == null || o.call(r);
806
+ (o = a.teardown) == null || o.call(a);
807
807
  } catch {
808
808
  }
809
- r.teardown = void 0;
809
+ a.teardown = void 0;
810
810
  }
811
811
  },
812
- async capture(o, r) {
813
- const a = {};
812
+ async capture(o, a) {
813
+ const r = {};
814
814
  for (const i of n)
815
815
  if (i.plugin.capture)
816
816
  try {
817
- const s = await i.plugin.capture(i.ctx), c = et(s, i.plugin.version);
818
- c !== null && (a[i.plugin.name] = c);
817
+ const s = await i.plugin.capture(i.ctx), c = tt(s, i.plugin.version);
818
+ c !== null && (r[i.plugin.name] = c);
819
819
  } catch (s) {
820
820
  const c = s instanceof Error ? s : new Error(String(s));
821
- a[i.plugin.name] = tt(c), i.status = {
821
+ r[i.plugin.name] = nt(c), i.status = {
822
822
  state: "failed",
823
823
  failures: i.status.failures + 1,
824
824
  error: { message: c.message, ...c.stack ? { stack: c.stack } : {}, at: "capture" }
825
- }, r({ plugin: i.plugin.name, error: c, at: "capture" });
825
+ }, a({ plugin: i.plugin.name, error: c, at: "capture" });
826
826
  }
827
- return a;
827
+ return r;
828
828
  },
829
829
  status() {
830
830
  const o = {};
831
- for (const r of n)
832
- o[r.plugin.name] = r.status;
831
+ for (const a of n)
832
+ o[a.plugin.name] = a.status;
833
833
  return o;
834
834
  }
835
835
  };
836
836
  }
837
- function et(e, t) {
837
+ function tt(e, t) {
838
838
  if (e == null) return null;
839
839
  const n = t ?? 1;
840
840
  return Array.isArray(e) || typeof e != "object" ? { v: n, value: e } : { ...e, v: n };
841
841
  }
842
- function tt(e) {
842
+ function nt(e) {
843
843
  return {
844
844
  error: e.message,
845
845
  ...e.stack ? { stack: e.stack } : {}
846
846
  };
847
847
  }
848
- async function nt(e, t, n, o, r = "omit") {
849
- const a = await ot(n), i = await fetch(e, {
848
+ async function ot(e, t, n, o, a = "omit") {
849
+ const r = await rt(n), i = await fetch(e, {
850
850
  method: "POST",
851
- credentials: r,
852
- headers: { "Content-Type": "application/json", ...a },
851
+ credentials: a,
852
+ headers: { "Content-Type": "application/json", ...r },
853
853
  body: JSON.stringify(t),
854
854
  signal: o
855
855
  }), c = (i.headers.get("content-type") ?? "").includes("application/json") ? await i.json().catch(() => null) : await i.text();
856
856
  return { ok: i.ok, status: i.status, body: c };
857
857
  }
858
- async function ot(e) {
858
+ async function rt(e) {
859
859
  return e ? typeof e == "function" ? await e() ?? {} : e : {};
860
860
  }
861
- function rt(e, t, n) {
861
+ function at(e, t, n) {
862
862
  for (const o of t) {
863
- const r = document.createElement("div");
864
- if (r.className = "beacon-field", o.label) {
863
+ const a = document.createElement("div");
864
+ if (a.className = "beacon-field", o.label) {
865
865
  const i = document.createElement("label");
866
- i.className = "beacon-label", i.textContent = o.label, r.appendChild(i);
866
+ i.className = "beacon-label", i.textContent = o.label, a.appendChild(i);
867
867
  }
868
868
  if (o.description) {
869
869
  const i = document.createElement("div");
870
- i.className = "beacon-description", i.textContent = o.description, r.appendChild(i);
870
+ i.className = "beacon-description", i.textContent = o.description, a.appendChild(i);
871
871
  }
872
- const a = at(o, n);
873
- r.appendChild(a), e.appendChild(r);
872
+ const r = it(o, n);
873
+ a.appendChild(r), e.appendChild(a);
874
874
  }
875
875
  }
876
- function at(e, t) {
877
- var o, r;
876
+ function it(e, t) {
877
+ var o, a;
878
878
  const n = t.get(e.name);
879
879
  switch (e.type) {
880
880
  case "toggle": {
881
- const a = document.createElement("label");
882
- a.className = "beacon-toggle";
881
+ const r = document.createElement("label");
882
+ r.className = "beacon-toggle";
883
883
  const i = document.createElement("input");
884
- 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;
884
+ return i.type = "checkbox", i.checked = n ?? e.defaultValue ?? !1, i.addEventListener("change", () => t.set(e.name, i.checked)), r.appendChild(i), t.set(e.name, i.checked), r;
885
885
  }
886
886
  case "text": {
887
- const a = document.createElement("input");
888
- a.type = "text", a.className = "beacon-input";
887
+ const r = document.createElement("input");
888
+ r.type = "text", r.className = "beacon-input";
889
889
  const i = n ?? e.defaultValue ?? "";
890
- 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;
890
+ return r.value = i, e.placeholder && (r.placeholder = e.placeholder), r.addEventListener("input", () => t.set(e.name, r.value)), t.set(e.name, i), r;
891
891
  }
892
892
  case "textarea": {
893
- const a = document.createElement("textarea");
894
- a.className = "beacon-textarea";
893
+ const r = document.createElement("textarea");
894
+ r.className = "beacon-textarea";
895
895
  const i = n ?? e.defaultValue ?? "";
896
- 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;
896
+ return r.value = i, e.placeholder && (r.placeholder = e.placeholder), e.rows && (r.rows = e.rows), r.addEventListener("input", () => t.set(e.name, r.value)), t.set(e.name, i), r;
897
897
  }
898
898
  case "select": {
899
- const a = document.createElement("select");
900
- a.className = "beacon-select";
899
+ const r = document.createElement("select");
900
+ r.className = "beacon-select";
901
901
  const i = n ?? e.defaultValue ?? ((o = e.options[0]) == null ? void 0 : o.value) ?? "";
902
902
  for (const s of e.options) {
903
903
  const c = document.createElement("option");
904
- c.value = s.value, c.textContent = s.label ?? s.value, s.value === i && (c.selected = !0), a.appendChild(c);
904
+ c.value = s.value, c.textContent = s.label ?? s.value, s.value === i && (c.selected = !0), r.appendChild(c);
905
905
  }
906
- return a.addEventListener("change", () => t.set(e.name, a.value)), t.set(e.name, i), a;
906
+ return r.addEventListener("change", () => t.set(e.name, r.value)), t.set(e.name, i), r;
907
907
  }
908
908
  case "radio": {
909
- const a = document.createElement("div");
910
- a.className = "beacon-radio-group";
911
- const i = n ?? e.defaultValue ?? ((r = e.options[0]) == null ? void 0 : r.value) ?? "";
909
+ const r = document.createElement("div");
910
+ r.className = "beacon-radio-group";
911
+ const i = n ?? e.defaultValue ?? ((a = e.options[0]) == null ? void 0 : a.value) ?? "";
912
912
  for (const s of e.options) {
913
913
  const c = document.createElement("label");
914
914
  c.className = "beacon-radio-opt";
915
915
  const d = document.createElement("input");
916
916
  d.type = "radio", d.name = e.name, d.value = s.value, s.value === i && (d.checked = !0), d.addEventListener("change", () => t.set(e.name, s.value));
917
917
  const l = document.createElement("span");
918
- l.textContent = s.label ?? s.value, c.appendChild(d), c.appendChild(l), a.appendChild(c);
918
+ l.textContent = s.label ?? s.value, c.appendChild(d), c.appendChild(l), r.appendChild(c);
919
919
  }
920
- return t.set(e.name, i), a;
920
+ return t.set(e.name, i), r;
921
921
  }
922
922
  case "number": {
923
- const a = document.createElement("input");
924
- a.type = "number", a.className = "beacon-input";
923
+ const r = document.createElement("input");
924
+ r.type = "number", r.className = "beacon-input";
925
925
  const i = n ?? e.defaultValue;
926
- 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", () => {
927
- const s = a.value === "" ? void 0 : Number(a.value);
926
+ return i !== void 0 && (r.value = String(i)), e.min !== void 0 && (r.min = String(e.min)), e.max !== void 0 && (r.max = String(e.max)), e.step !== void 0 && (r.step = String(e.step)), r.addEventListener("input", () => {
927
+ const s = r.value === "" ? void 0 : Number(r.value);
928
928
  t.set(e.name, s);
929
- }), i !== void 0 && t.set(e.name, i), a;
929
+ }), i !== void 0 && t.set(e.name, i), r;
930
930
  }
931
931
  }
932
932
  }
933
933
  const W = "http://www.w3.org/2000/svg";
934
- function it() {
934
+ function st() {
935
935
  const e = document.createElementNS(W, "svg");
936
936
  e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round");
937
937
  const t = document.createElementNS(W, "line");
@@ -939,16 +939,16 @@ function it() {
939
939
  const n = document.createElementNS(W, "line");
940
940
  return n.setAttribute("x1", "6"), n.setAttribute("y1", "6"), n.setAttribute("x2", "18"), n.setAttribute("y2", "18"), e.appendChild(t), e.appendChild(n), e;
941
941
  }
942
- class st {
942
+ class ct {
943
943
  constructor(t, n, o) {
944
944
  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);
945
- const r = document.createElement("div");
946
- r.className = "beacon-drawer-header";
947
945
  const a = document.createElement("div");
948
- a.className = "beacon-drawer-title", a.textContent = t.drawerTitle, r.appendChild(a);
946
+ a.className = "beacon-drawer-header";
947
+ const r = document.createElement("div");
948
+ r.className = "beacon-drawer-title", r.textContent = t.drawerTitle, a.appendChild(r);
949
949
  const i = document.createElement("button");
950
- i.type = "button", i.className = "beacon-icon-btn", i.setAttribute("aria-label", t.closeButton), i.appendChild(it()), i.addEventListener("click", () => this.userCloseAttempt()), r.appendChild(i), this.inner.appendChild(r), this.root.addEventListener("cancel", (b) => {
951
- this.submitSucceeded || this.hasUnsavedInput() && (b.preventDefault(), window.confirm("You have unsaved feedback. Discard?") && this.root.close());
950
+ i.type = "button", i.className = "beacon-icon-btn", i.setAttribute("aria-label", t.closeButton), i.appendChild(st()), i.addEventListener("click", () => this.userCloseAttempt()), a.appendChild(i), this.inner.appendChild(a), this.root.addEventListener("cancel", (g) => {
951
+ this.submitSucceeded || this.hasUnsavedInput() && (g.preventDefault(), window.confirm("You have unsaved feedback. Discard?") && this.root.close());
952
952
  });
953
953
  const s = document.createElement("div");
954
954
  s.className = "beacon-drawer-body", this.inner.appendChild(s);
@@ -958,17 +958,17 @@ class st {
958
958
  d.className = "beacon-label", d.textContent = t.descriptionLabel, this.descTextarea = document.createElement("textarea"), this.descTextarea.className = "beacon-textarea", this.descTextarea.placeholder = t.descriptionPlaceholder, this.descTextarea.rows = 4, c.appendChild(d), c.appendChild(this.descTextarea), s.appendChild(c);
959
959
  const l = document.createElement("div");
960
960
  l.className = "beacon-field";
961
- const p = document.createElement("label");
962
- p.className = "beacon-label", p.textContent = t.severityLabel, this.severitiesContainer = document.createElement("div"), this.severitiesContainer.className = "beacon-severity";
963
- for (const b of n) {
964
- const m = document.createElement("label");
965
- m.className = "beacon-severity-opt", m.dataset.sev = b;
966
- const x = document.createElement("input");
967
- x.type = "radio", x.name = "beacon-severity", x.value = b, b === this.severitySelected && (x.checked = !0, m.classList.add("selected")), x.addEventListener("change", () => this.setSeverity(b)), m.appendChild(x), m.appendChild(document.createTextNode(this.severityLabel(b))), this.severitiesContainer.appendChild(m);
968
- }
969
- 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);
970
- const f = document.createElement("div");
971
- 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", () => {
961
+ const m = document.createElement("label");
962
+ m.className = "beacon-label", m.textContent = t.severityLabel, this.severitiesContainer = document.createElement("div"), this.severitiesContainer.className = "beacon-severity";
963
+ for (const g of n) {
964
+ const u = document.createElement("label");
965
+ u.className = "beacon-severity-opt", u.dataset.sev = g;
966
+ const v = document.createElement("input");
967
+ v.type = "radio", v.name = "beacon-severity", v.value = g, g === this.severitySelected && (v.checked = !0, u.classList.add("selected")), v.addEventListener("change", () => this.setSeverity(g)), u.appendChild(v), u.appendChild(document.createTextNode(this.severityLabel(g))), this.severitiesContainer.appendChild(u);
968
+ }
969
+ l.appendChild(m), 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);
970
+ const p = document.createElement("div");
971
+ p.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()), p.appendChild(this.submitBtn), s.appendChild(p), this.root.addEventListener("close", () => {
972
972
  if (this.expectedSuppressedCloses > 0) {
973
973
  this.expectedSuppressedCloses -= 1;
974
974
  return;
@@ -985,10 +985,10 @@ class st {
985
985
  };
986
986
  }
987
987
  applyMode(t, n) {
988
- var o, r;
988
+ var o, a;
989
989
  switch (t) {
990
990
  case "pickElement": {
991
- 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));
991
+ n ? (this.lastActive = document.activeElement instanceof HTMLElement ? document.activeElement : null, this.root.open && (this.expectedSuppressedCloses += 1, this.root.close())) : (this.root.open || this.tryShowModal(), (a = (o = this.lastActive) == null ? void 0 : o.focus) == null || a.call(o));
992
992
  break;
993
993
  }
994
994
  case "hide": {
@@ -996,8 +996,8 @@ class st {
996
996
  break;
997
997
  }
998
998
  case "minimize": {
999
- const a = this.inner.querySelector(".beacon-drawer-body");
1000
- a && (a.style.display = n ? "none" : "");
999
+ const r = this.inner.querySelector(".beacon-drawer-body");
1000
+ r && (r.style.display = n ? "none" : "");
1001
1001
  break;
1002
1002
  }
1003
1003
  }
@@ -1049,21 +1049,21 @@ class st {
1049
1049
  installPluginPanels(t, n) {
1050
1050
  this.clearPluginPanels();
1051
1051
  for (const o of t) {
1052
- const r = document.createElement("div");
1053
- if (r.className = "beacon-plugin-panel", o.form.title) {
1054
- const a = document.createElement("div");
1055
- a.className = "beacon-plugin-panel-title", a.textContent = o.form.title, r.appendChild(a);
1052
+ const a = document.createElement("div");
1053
+ if (a.className = "beacon-plugin-panel", o.form.title) {
1054
+ const r = document.createElement("div");
1055
+ r.className = "beacon-plugin-panel-title", r.textContent = o.form.title, a.appendChild(r);
1056
1056
  }
1057
1057
  if ("fields" in o.form)
1058
- rt(r, o.form.fields, {
1059
- get: (a) => n.get(o.name, a),
1060
- set: (a, i) => n.set(o.name, a, i)
1058
+ at(a, o.form.fields, {
1059
+ get: (r) => n.get(o.name, r),
1060
+ set: (r, i) => n.set(o.name, r, i)
1061
1061
  });
1062
1062
  else {
1063
- const a = o.form.render(r, o.ctx);
1064
- typeof a == "function" && this.pluginCleanups.push(a);
1063
+ const r = o.form.render(a, o.ctx);
1064
+ typeof r == "function" && this.pluginCleanups.push(r);
1065
1065
  }
1066
- this.pluginSlot.appendChild(r);
1066
+ this.pluginSlot.appendChild(a);
1067
1067
  }
1068
1068
  }
1069
1069
  clearPluginPanels() {
@@ -1094,7 +1094,7 @@ class st {
1094
1094
  }
1095
1095
  }
1096
1096
  }
1097
- function ct() {
1097
+ function lt() {
1098
1098
  return {
1099
1099
  triggerButton: "Feedback",
1100
1100
  drawerTitle: "Send feedback",
@@ -1111,18 +1111,18 @@ function ct() {
1111
1111
  severityA11y: "a11y"
1112
1112
  };
1113
1113
  }
1114
- function lt(e) {
1114
+ function dt(e) {
1115
1115
  const t = document.createElement("div");
1116
1116
  return t.className = "beacon-overlay-layer", e.appendChild(t), { layer: t };
1117
1117
  }
1118
- function dt(e, t) {
1118
+ function ut(e, t) {
1119
1119
  const n = document.createElement("div");
1120
1120
  e.layer.appendChild(n);
1121
1121
  let o;
1122
1122
  try {
1123
1123
  o = t(n);
1124
- } catch (r) {
1125
- throw n.remove(), r;
1124
+ } catch (a) {
1125
+ throw n.remove(), a;
1126
1126
  }
1127
1127
  return () => {
1128
1128
  try {
@@ -1132,55 +1132,55 @@ function dt(e, t) {
1132
1132
  n.parentNode && n.parentNode.removeChild(n);
1133
1133
  };
1134
1134
  }
1135
- function ut() {
1135
+ function pt() {
1136
1136
  var n, o;
1137
1137
  const e = navigator;
1138
1138
  return e.userAgentData ? {
1139
- 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",
1139
+ brand: ((n = e.userAgentData.brands.find((a) => !/Not[.\-]?A.?Brand/i.test(a.brand))) == null ? void 0 : n.brand) ?? ((o = e.userAgentData.brands[0]) == null ? void 0 : o.brand) ?? "unknown",
1140
1140
  mobile: e.userAgentData.mobile,
1141
1141
  platform: e.userAgentData.platform
1142
1142
  } : void 0;
1143
1143
  }
1144
- function pt() {
1144
+ function ft() {
1145
1145
  return {
1146
1146
  name: "metadata",
1147
1147
  capture() {
1148
- const e = ut();
1148
+ const e = pt();
1149
1149
  return e ? { uaData: e } : null;
1150
1150
  }
1151
1151
  };
1152
1152
  }
1153
- const ft = 30, K = 500, ce = 2e3, mt = 500, ht = 5e3, bt = /launch-kit-beacon|beacon\.(?:es|umd|mjs)|\/beacon\//i;
1154
- function R(e, t) {
1153
+ const mt = 30, X = 500, ce = 2e3, ht = 500, bt = 5e3, gt = /launch-kit-beacon|beacon\.(?:es|umd|mjs)|\/beacon\//i;
1154
+ function _(e, t) {
1155
1155
  if (e)
1156
1156
  return e.length > t ? e.slice(0, t) : e;
1157
1157
  }
1158
- function gt(e, t) {
1158
+ function yt(e, t) {
1159
1159
  const n = (t == null ? void 0 : t.split(`
1160
1160
  `).slice(0, 3).join("|")) ?? "";
1161
1161
  return `${e}::${n}`;
1162
1162
  }
1163
- function yt(e) {
1164
- return !!e && bt.test(e);
1165
- }
1166
1163
  function vt(e) {
1164
+ return !!e && gt.test(e);
1165
+ }
1166
+ function xt(e) {
1167
1167
  try {
1168
- return JSON.stringify(e).slice(0, K);
1168
+ return JSON.stringify(e).slice(0, X);
1169
1169
  } catch {
1170
1170
  return String(e);
1171
1171
  }
1172
1172
  }
1173
- function Ie() {
1173
+ function Re() {
1174
1174
  const e = [], t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set();
1175
- let o = !1, r, a;
1175
+ let o = !1, a, r;
1176
1176
  function i(s) {
1177
- if (yt(s.stack) || s.kind === "unhandledrejection" && /AbortError/i.test(s.message)) return;
1178
- const c = gt(s.message, s.stack), d = t.get(c);
1179
- if (d !== void 0 && s.ts - d < ht) {
1177
+ if (vt(s.stack) || s.kind === "unhandledrejection" && /AbortError/i.test(s.message)) return;
1178
+ const c = yt(s.message, s.stack), d = t.get(c);
1179
+ if (d !== void 0 && s.ts - d < bt) {
1180
1180
  t.set(c, s.ts);
1181
1181
  return;
1182
1182
  }
1183
- t.set(c, s.ts), e.push(s), e.length > ft && e.shift();
1183
+ t.set(c, s.ts), e.push(s), e.length > mt && e.shift();
1184
1184
  for (const l of n)
1185
1185
  try {
1186
1186
  l();
@@ -1191,33 +1191,33 @@ function Ie() {
1191
1191
  install() {
1192
1192
  return o ? () => {
1193
1193
  } : typeof window > "u" ? () => {
1194
- } : (o = !0, r = (s) => {
1194
+ } : (o = !0, a = (s) => {
1195
1195
  try {
1196
1196
  const c = s.error instanceof Error ? s.error.message : void 0, d = s.error instanceof Error ? s.error.stack : void 0;
1197
1197
  i({
1198
1198
  ts: Date.now(),
1199
1199
  kind: "error",
1200
- message: R(s.message || c || "Unknown error", K) ?? "Unknown error",
1201
- ...d ? { stack: R(d, ce) } : {},
1202
- ...s.filename ? { source: R(s.filename, mt) } : {},
1200
+ message: _(s.message || c || "Unknown error", X) ?? "Unknown error",
1201
+ ...d ? { stack: _(d, ce) } : {},
1202
+ ...s.filename ? { source: _(s.filename, ht) } : {},
1203
1203
  ...Number.isFinite(s.lineno) ? { line: s.lineno } : {},
1204
1204
  ...Number.isFinite(s.colno) ? { col: s.colno } : {}
1205
1205
  });
1206
1206
  } catch {
1207
1207
  }
1208
- }, a = (s) => {
1208
+ }, r = (s) => {
1209
1209
  try {
1210
- const c = s.reason, d = c instanceof Error ? c.message : typeof c == "string" ? c : vt(c), l = c instanceof Error ? c.stack : void 0;
1210
+ const c = s.reason, d = c instanceof Error ? c.message : typeof c == "string" ? c : xt(c), l = c instanceof Error ? c.stack : void 0;
1211
1211
  i({
1212
1212
  ts: Date.now(),
1213
1213
  kind: "unhandledrejection",
1214
- message: R(d || "Unknown rejection", K) ?? "Unknown rejection",
1215
- ...l ? { stack: R(l, ce) } : {}
1214
+ message: _(d || "Unknown rejection", X) ?? "Unknown rejection",
1215
+ ...l ? { stack: _(l, ce) } : {}
1216
1216
  });
1217
1217
  } catch {
1218
1218
  }
1219
- }, window.addEventListener("error", r), window.addEventListener("unhandledrejection", a), () => {
1220
- r && window.removeEventListener("error", r), a && window.removeEventListener("unhandledrejection", a), o = !1, n.clear();
1219
+ }, window.addEventListener("error", a), window.addEventListener("unhandledrejection", r), () => {
1220
+ a && window.removeEventListener("error", a), r && window.removeEventListener("unhandledrejection", r), o = !1, n.clear();
1221
1221
  });
1222
1222
  },
1223
1223
  snapshot() {
@@ -1230,12 +1230,12 @@ function Ie() {
1230
1230
  }
1231
1231
  };
1232
1232
  }
1233
- function xt() {
1233
+ function wt() {
1234
1234
  let e = null;
1235
1235
  return {
1236
1236
  name: "errors",
1237
1237
  setupOnce(t) {
1238
- e = Ie();
1238
+ e = Re();
1239
1239
  const n = e.install();
1240
1240
  return t.signal.addEventListener("abort", n, { once: !0 }), n;
1241
1241
  },
@@ -1246,10 +1246,10 @@ function xt() {
1246
1246
  n.className = "beacon-events";
1247
1247
  const o = document.createElement("summary");
1248
1248
  o.className = "beacon-events-summary";
1249
- const r = document.createElement("span");
1250
- r.className = "beacon-events-dot", r.textContent = "●";
1251
1249
  const a = document.createElement("span");
1252
- a.className = "beacon-events-label", o.appendChild(r), o.appendChild(a), n.appendChild(o);
1250
+ a.className = "beacon-events-dot", a.textContent = "●";
1251
+ const r = document.createElement("span");
1252
+ r.className = "beacon-events-label", o.appendChild(a), o.appendChild(r), n.appendChild(o);
1253
1253
  const i = document.createElement("ul");
1254
1254
  i.className = "beacon-events-list", n.appendChild(i), t.appendChild(n);
1255
1255
  function s() {
@@ -1258,14 +1258,14 @@ function xt() {
1258
1258
  t.style.display = "none";
1259
1259
  return;
1260
1260
  }
1261
- t.style.display = "", a.textContent = `${l} runtime error${l !== 1 ? "s" : ""} captured`, i.innerHTML = "";
1262
- for (const p of d) {
1263
- const f = document.createElement("li");
1264
- f.className = "beacon-events-item";
1265
- const b = document.createElement("span");
1266
- b.className = `beacon-events-kind ${p.kind === "unhandledrejection" ? "rejection" : "error"}`, b.textContent = p.kind === "unhandledrejection" ? "REJ" : "ERR";
1267
- const m = document.createElement("span");
1268
- m.className = "beacon-events-msg", m.textContent = p.message, f.appendChild(b), f.appendChild(m), i.appendChild(f);
1261
+ t.style.display = "", r.textContent = `${l} runtime error${l !== 1 ? "s" : ""} captured`, i.innerHTML = "";
1262
+ for (const m of d) {
1263
+ const p = document.createElement("li");
1264
+ p.className = "beacon-events-item";
1265
+ const g = document.createElement("span");
1266
+ g.className = `beacon-events-kind ${m.kind === "unhandledrejection" ? "rejection" : "error"}`, g.textContent = m.kind === "unhandledrejection" ? "REJ" : "ERR";
1267
+ const u = document.createElement("span");
1268
+ u.className = "beacon-events-msg", u.textContent = m.message, p.appendChild(g), p.appendChild(u), i.appendChild(p);
1269
1269
  }
1270
1270
  }
1271
1271
  s();
@@ -1282,7 +1282,7 @@ function xt() {
1282
1282
  }
1283
1283
  };
1284
1284
  }
1285
- const wt = 8;
1285
+ const Et = 8;
1286
1286
  function le(e, t = document) {
1287
1287
  if (!e) return !1;
1288
1288
  try {
@@ -1291,70 +1291,70 @@ function le(e, t = document) {
1291
1291
  return !1;
1292
1292
  }
1293
1293
  }
1294
- function Et(e) {
1294
+ function St(e) {
1295
1295
  const t = e.tagName.toLowerCase(), n = Array.from(e.classList).filter((o) => o.length > 0 && o.length < 40).slice(0, 3).map((o) => `.${CSS.escape(o)}`).join("");
1296
1296
  return t + n;
1297
1297
  }
1298
- function St(e) {
1298
+ function Ct(e) {
1299
1299
  const t = e.parentElement;
1300
1300
  return t ? Array.from(t.children).filter((o) => o.tagName === e.tagName).indexOf(e) + 1 : 1;
1301
1301
  }
1302
- function Ct(e) {
1302
+ function kt(e) {
1303
1303
  if (!e || e.nodeType !== Node.ELEMENT_NODE) return "";
1304
1304
  if (e.id && le(e.id))
1305
1305
  return `#${CSS.escape(e.id)}`;
1306
1306
  const t = [];
1307
1307
  let n = e, o = 0;
1308
- for (; n && n.tagName.toLowerCase() !== "body" && o < wt; ) {
1309
- const r = n;
1310
- if (r.id && le(r.id)) {
1311
- t.unshift(`#${CSS.escape(r.id)}`);
1308
+ for (; n && n.tagName.toLowerCase() !== "body" && o < Et; ) {
1309
+ const a = n;
1310
+ if (a.id && le(a.id)) {
1311
+ t.unshift(`#${CSS.escape(a.id)}`);
1312
1312
  break;
1313
1313
  }
1314
- const a = Et(r), i = r.parentElement;
1315
- let s = a;
1314
+ const r = St(a), i = a.parentElement;
1315
+ let s = r;
1316
1316
  if (i)
1317
1317
  try {
1318
- const c = Array.from(r.classList).join(" ");
1318
+ const c = Array.from(a.classList).join(" ");
1319
1319
  Array.from(i.children).filter(
1320
- (l) => l.tagName === r.tagName && Array.from(l.classList).join(" ") === c
1321
- ).length > 1 && (s = `${r.tagName.toLowerCase()}:nth-of-type(${St(r)})`);
1320
+ (l) => l.tagName === a.tagName && Array.from(l.classList).join(" ") === c
1321
+ ).length > 1 && (s = `${a.tagName.toLowerCase()}:nth-of-type(${Ct(a)})`);
1322
1322
  } catch {
1323
1323
  }
1324
1324
  t.unshift(s), n = i, o++;
1325
1325
  }
1326
1326
  return t.join(" > ");
1327
1327
  }
1328
- function kt(e) {
1328
+ function At(e) {
1329
1329
  const t = Object.keys(e).filter(
1330
1330
  (o) => o.startsWith("__reactFiber$") || o.startsWith("__reactInternalInstance$")
1331
1331
  );
1332
1332
  if (t.length === 0) return null;
1333
1333
  let n = e[t[0]];
1334
1334
  for (let o = 0; o < 10 && n; o++) {
1335
- const r = n, a = r.type;
1336
- if (typeof a == "function") {
1337
- const i = a.displayName ?? a.name;
1335
+ const a = n, r = a.type;
1336
+ if (typeof r == "function") {
1337
+ const i = r.displayName ?? r.name;
1338
1338
  if (i && i !== "_default") return { lib: "react", name: i };
1339
1339
  }
1340
- if (typeof a == "object" && a !== null) {
1341
- const i = a.displayName ?? a.name;
1340
+ if (typeof r == "object" && r !== null) {
1341
+ const i = r.displayName ?? r.name;
1342
1342
  if (i) return { lib: "react", name: i };
1343
1343
  }
1344
- n = r.return;
1344
+ n = a.return;
1345
1345
  }
1346
1346
  return { lib: "react" };
1347
1347
  }
1348
- function At(e) {
1349
- var o, r;
1348
+ function Lt(e) {
1349
+ var o, a;
1350
1350
  const t = e, n = t.__vueParentComponent;
1351
1351
  if (n) {
1352
- const a = ((o = n.type) == null ? void 0 : o.name) ?? ((r = n.type) == null ? void 0 : r.__name);
1353
- return { lib: "vue", ...a ? { name: a } : {} };
1352
+ const r = ((o = n.type) == null ? void 0 : o.name) ?? ((a = n.type) == null ? void 0 : a.__name);
1353
+ return { lib: "vue", ...r ? { name: r } : {} };
1354
1354
  }
1355
1355
  return t.__vue__ ? { lib: "vue" } : null;
1356
1356
  }
1357
- function Lt(e) {
1357
+ function Tt(e) {
1358
1358
  const t = window.ng;
1359
1359
  if (!(t != null && t.getComponent)) return null;
1360
1360
  try {
@@ -1369,10 +1369,10 @@ function Lt(e) {
1369
1369
  function Nt(e) {
1370
1370
  return "__svelte_meta" in e ? { lib: "svelte" } : null;
1371
1371
  }
1372
- function Tt(e) {
1373
- return kt(e) ?? At(e) ?? Lt(e) ?? Nt(e) ?? void 0;
1372
+ function Mt(e) {
1373
+ return At(e) ?? Lt(e) ?? Tt(e) ?? Nt(e) ?? void 0;
1374
1374
  }
1375
- const Mt = 5e3, It = 1e3, de = 1e3, ue = 200, Rt = 50, pe = 200, _t = 500, Pt = [
1375
+ const It = 5e3, Rt = 1e3, de = 1e3, ue = 200, Pt = 50, pe = 200, _t = 500, Dt = [
1376
1376
  "display",
1377
1377
  "position",
1378
1378
  "top",
@@ -1416,55 +1416,55 @@ function fe(e, t) {
1416
1416
 
1417
1417
  /* … truncated, original was ${e.length} chars */`;
1418
1418
  }
1419
- function Dt(e) {
1419
+ function $t(e) {
1420
1420
  const t = getComputedStyle(e), n = {};
1421
- for (const o of Pt) {
1422
- const r = t.getPropertyValue(o);
1423
- r && r !== "normal" && r !== "none" && r !== "auto" && r !== "0px" && (n[o] = r.trim().slice(0, _t));
1421
+ for (const o of Dt) {
1422
+ const a = t.getPropertyValue(o);
1423
+ a && a !== "normal" && a !== "none" && a !== "auto" && a !== "0px" && (n[o] = a.trim().slice(0, _t));
1424
1424
  }
1425
1425
  return n;
1426
1426
  }
1427
- function $t(e) {
1428
- return Array.from(e.classList).slice(0, Rt).map((t) => t.length > pe ? t.slice(0, pe) : t);
1429
- }
1430
1427
  function Bt(e) {
1431
- const t = e.getBoundingClientRect(), n = Ct(e), o = e.id || null, r = Tt(e);
1428
+ return Array.from(e.classList).slice(0, Pt).map((t) => t.length > pe ? t.slice(0, pe) : t);
1429
+ }
1430
+ function zt(e) {
1431
+ const t = e.getBoundingClientRect(), n = kt(e), o = e.id || null, a = Mt(e);
1432
1432
  return {
1433
1433
  selector: n.length > de ? n.slice(0, de) : n,
1434
1434
  tagName: e.tagName.toLowerCase(),
1435
1435
  id: o && o.length > ue ? o.slice(0, ue) : o,
1436
- classList: $t(e),
1437
- outerHTML: fe(e.outerHTML, Mt),
1438
- ...e.parentElement ? { parentOuterHTML: fe(e.parentElement.outerHTML, It) } : {},
1439
- computedStyles: Dt(e),
1436
+ classList: Bt(e),
1437
+ outerHTML: fe(e.outerHTML, It),
1438
+ ...e.parentElement ? { parentOuterHTML: fe(e.parentElement.outerHTML, Rt) } : {},
1439
+ computedStyles: $t(e),
1440
1440
  boundingRect: {
1441
1441
  x: Math.round(t.x),
1442
1442
  y: Math.round(t.y),
1443
1443
  w: Math.round(t.width),
1444
1444
  h: Math.round(t.height)
1445
1445
  },
1446
- ...r ? { framework: r } : {}
1446
+ ...a ? { framework: a } : {}
1447
1447
  };
1448
1448
  }
1449
- const zt = 14, Ot = "#ffffff", Ht = "#ffffff", qt = 3, Ut = "#0ea5e9";
1450
- async function Re(e, t, n, o = Ut) {
1451
- const r = await jt(e), a = document.createElement("canvas");
1452
- a.width = r.naturalWidth, a.height = r.naturalHeight;
1453
- const i = a.getContext("2d");
1449
+ const Ot = 14, Ht = "#ffffff", Ut = "#ffffff", qt = 3, Ft = "#0ea5e9";
1450
+ async function Pe(e, t, n, o = Ft) {
1451
+ const a = await Vt(e), r = document.createElement("canvas");
1452
+ r.width = a.naturalWidth, r.height = a.naturalHeight;
1453
+ const i = r.getContext("2d");
1454
1454
  if (!i) throw new Error("Could not get 2D canvas context");
1455
- i.drawImage(r, 0, 0);
1456
- const s = a.width / n.w, c = a.height / n.h;
1455
+ i.drawImage(a, 0, 0);
1456
+ const s = r.width / n.w, c = r.height / n.h;
1457
1457
  for (const d of t) {
1458
- const l = Ft(d);
1458
+ const l = jt(d);
1459
1459
  if (!l) continue;
1460
- const p = l.x * s, f = l.y * c, b = l.w * s, m = l.h * c;
1461
- i.lineWidth = qt, i.strokeStyle = o, i.strokeRect(p, f, b, m);
1462
- const x = p + b, g = f;
1463
- i.beginPath(), i.fillStyle = o, i.arc(x, g, zt, 0, Math.PI * 2), i.fill(), i.lineWidth = 3, i.strokeStyle = Ot, i.stroke(), i.fillStyle = Ht, i.font = "bold 16px system-ui, -apple-system, sans-serif", i.textAlign = "center", i.textBaseline = "middle", i.fillText(String(d.number), x, g + 1);
1460
+ const m = l.x * s, p = l.y * c, g = l.w * s, u = l.h * c;
1461
+ i.lineWidth = qt, i.strokeStyle = o, i.strokeRect(m, p, g, u);
1462
+ const v = m + g, E = p;
1463
+ i.beginPath(), i.fillStyle = o, i.arc(v, E, Ot, 0, Math.PI * 2), i.fill(), i.lineWidth = 3, i.strokeStyle = Ht, i.stroke(), i.fillStyle = Ut, i.font = "bold 16px system-ui, -apple-system, sans-serif", i.textAlign = "center", i.textBaseline = "middle", i.fillText(String(d.number), v, E + 1);
1464
1464
  }
1465
- return a.toDataURL("image/jpeg", 0.85);
1465
+ return r.toDataURL("image/jpeg", 0.85);
1466
1466
  }
1467
- function Ft(e) {
1467
+ function jt(e) {
1468
1468
  if (e.liveElement && document.contains(e.liveElement)) {
1469
1469
  const t = e.liveElement.getBoundingClientRect();
1470
1470
  if (t.width > 0 || t.height > 0)
@@ -1482,21 +1482,21 @@ function Ft(e) {
1482
1482
  }
1483
1483
  return e.boundingRect;
1484
1484
  }
1485
- function jt(e) {
1485
+ function Vt(e) {
1486
1486
  return new Promise((t, n) => {
1487
1487
  const o = new Image();
1488
- o.onload = () => t(o), o.onerror = (r) => n(r), o.src = e;
1488
+ o.onload = () => t(o), o.onerror = (a) => n(a), o.src = e;
1489
1489
  });
1490
1490
  }
1491
- const _ = "beacon-no-capture", Vt = "#0ea5e9", me = "Click any element to pin it · Press Esc to finish";
1491
+ const D = "beacon-no-capture", Wt = "#0ea5e9", me = "Click any element to pin it · Press Esc to finish";
1492
1492
  function he(e, t) {
1493
1493
  return /^#[0-9a-fA-F]{6}$/.test(e) ? `${e}${t}` : e;
1494
1494
  }
1495
- function Wt(e = {}) {
1496
- const t = e.accent ?? Vt, n = he(t, "b3"), o = he(t, "2e"), r = document.createElement("style");
1497
- r.className = _, r.textContent = "@keyframes beacon-spin { to { transform: rotate(360deg); } }", document.head.appendChild(r);
1498
- const a = document.createElement("div");
1499
- a.className = _, a.setAttribute("aria-hidden", "true"), a.style.cssText = [
1495
+ function Yt(e = {}) {
1496
+ const t = e.accent ?? Wt, n = he(t, "b3"), o = he(t, "2e"), a = document.createElement("style");
1497
+ a.className = D, a.textContent = "@keyframes beacon-spin { to { transform: rotate(360deg); } }", document.head.appendChild(a);
1498
+ const r = document.createElement("div");
1499
+ r.className = D, r.setAttribute("aria-hidden", "true"), r.style.cssText = [
1500
1500
  "position: fixed",
1501
1501
  "inset: 0",
1502
1502
  "pointer-events: none",
@@ -1507,7 +1507,7 @@ function Wt(e = {}) {
1507
1507
  "box-sizing: border-box"
1508
1508
  ].join("; ");
1509
1509
  const i = document.createElement("div");
1510
- i.className = _, i.setAttribute("role", "status"), i.style.cssText = [
1510
+ i.className = D, i.setAttribute("role", "status"), i.style.cssText = [
1511
1511
  "position: fixed",
1512
1512
  "top: 16px",
1513
1513
  "left: 50%",
@@ -1534,14 +1534,14 @@ function Wt(e = {}) {
1534
1534
  vertical-align: middle;
1535
1535
  margin-right: 8px;
1536
1536
  "></span>`;
1537
- function c(u) {
1538
- return u.replace(/[<>&]/g, (y) => ({ "<": "&lt;", ">": "&gt;", "&": "&amp;" })[y]);
1537
+ function c(b) {
1538
+ return b.replace(/[<>&]/g, (f) => ({ "<": "&lt;", ">": "&gt;", "&": "&amp;" })[f]);
1539
1539
  }
1540
- document.body.appendChild(a), document.body.appendChild(i);
1540
+ document.body.appendChild(r), document.body.appendChild(i);
1541
1541
  const d = /* @__PURE__ */ new Map();
1542
- function l(u) {
1543
- const y = document.createElement("div");
1544
- return y.className = _, y.setAttribute("aria-hidden", "true"), y.style.cssText = [
1542
+ function l(b) {
1543
+ const f = document.createElement("div");
1544
+ return f.className = D, f.setAttribute("aria-hidden", "true"), f.style.cssText = [
1545
1545
  "position: fixed",
1546
1546
  "width: 24px",
1547
1547
  "height: 24px",
@@ -1556,67 +1556,67 @@ function Wt(e = {}) {
1556
1556
  "box-shadow: 0 2px 8px hsl(0 0% 0% / 0.4)",
1557
1557
  "pointer-events: none",
1558
1558
  "z-index: 2147483646"
1559
- ].join("; "), y.textContent = String(u), document.body.appendChild(y), y;
1559
+ ].join("; "), f.textContent = String(b), document.body.appendChild(f), f;
1560
1560
  }
1561
- function p() {
1562
- const u = document.createElement("div");
1563
- return u.className = _, u.setAttribute("aria-hidden", "true"), u.style.cssText = [
1561
+ function m() {
1562
+ const b = document.createElement("div");
1563
+ return b.className = D, b.setAttribute("aria-hidden", "true"), b.style.cssText = [
1564
1564
  "position: fixed",
1565
1565
  "pointer-events: none",
1566
1566
  `border: 2px solid ${t}`,
1567
1567
  "border-radius: 2px",
1568
1568
  "box-sizing: border-box",
1569
1569
  "z-index: 2147483645"
1570
- ].join("; "), document.body.appendChild(u), u;
1571
- }
1572
- function f(u, y, h) {
1573
- const v = h ? "0.5" : "1";
1574
- u.outline.style.display = "block", u.outline.style.opacity = v, u.outline.style.left = `${y.x}px`, u.outline.style.top = `${y.y}px`, u.outline.style.width = `${y.w}px`, u.outline.style.height = `${y.h}px`, u.marker.style.display = "flex", u.marker.style.opacity = v, u.marker.style.left = `${y.x + y.w - 12}px`, u.marker.style.top = `${Math.max(2, y.y - 12)}px`;
1575
- }
1576
- function b(u) {
1577
- u.marker.style.display = "none", u.outline.style.display = "none";
1578
- }
1579
- function m() {
1580
- d.forEach((u) => {
1581
- let y = u.anchor.target;
1582
- if (document.contains(y) || (y = null), !y && u.anchor.selector && (y = document.querySelector(u.anchor.selector), y && (u.anchor.target = y)), y) {
1583
- const v = y.getBoundingClientRect();
1584
- if (v.width > 0 || v.height > 0) {
1585
- f(u, { x: v.left, y: v.top, w: v.width, h: v.height }, !1);
1570
+ ].join("; "), document.body.appendChild(b), b;
1571
+ }
1572
+ function p(b, f, h) {
1573
+ const y = h ? "0.5" : "1";
1574
+ b.outline.style.display = "block", b.outline.style.opacity = y, b.outline.style.left = `${f.x}px`, b.outline.style.top = `${f.y}px`, b.outline.style.width = `${f.w}px`, b.outline.style.height = `${f.h}px`, b.marker.style.display = "flex", b.marker.style.opacity = y, b.marker.style.left = `${f.x + f.w - 12}px`, b.marker.style.top = `${Math.max(2, f.y - 12)}px`;
1575
+ }
1576
+ function g(b) {
1577
+ b.marker.style.display = "none", b.outline.style.display = "none";
1578
+ }
1579
+ function u() {
1580
+ d.forEach((b) => {
1581
+ let f = b.anchor.target;
1582
+ if (document.contains(f) || (f = null), !f && b.anchor.selector && (f = document.querySelector(b.anchor.selector), f && (b.anchor.target = f)), f) {
1583
+ const y = f.getBoundingClientRect();
1584
+ if (y.width > 0 || y.height > 0) {
1585
+ p(b, { x: y.left, y: y.top, w: y.width, h: y.height }, !1);
1586
1586
  return;
1587
1587
  }
1588
1588
  }
1589
- const h = u.anchor.fallbackRect;
1589
+ const h = b.anchor.fallbackRect;
1590
1590
  if (h && (h.w > 0 || h.h > 0)) {
1591
- f(u, h, !0);
1591
+ p(b, h, !0);
1592
1592
  return;
1593
1593
  }
1594
- b(u);
1594
+ g(b);
1595
1595
  });
1596
1596
  }
1597
- let x = null;
1598
- function g() {
1599
- x === null && (x = requestAnimationFrame(() => {
1600
- x = null, m();
1597
+ let v = null;
1598
+ function E() {
1599
+ v === null && (v = requestAnimationFrame(() => {
1600
+ v = null, u();
1601
1601
  }));
1602
1602
  }
1603
- return window.addEventListener("scroll", g, !0), window.addEventListener("resize", g), {
1604
- addPin(u, y) {
1605
- const h = l(u), v = p();
1606
- d.set(u, { anchor: y, marker: h, outline: v }), m();
1603
+ return window.addEventListener("scroll", E, !0), window.addEventListener("resize", E), {
1604
+ addPin(b, f) {
1605
+ const h = l(b), y = m();
1606
+ d.set(b, { anchor: f, marker: h, outline: y }), u();
1607
1607
  },
1608
- setLoading(u) {
1609
- u ? i.innerHTML = s + c(u) : i.textContent = me;
1608
+ setLoading(b) {
1609
+ b ? i.innerHTML = s + c(b) : i.textContent = me;
1610
1610
  },
1611
1611
  destroy() {
1612
- window.removeEventListener("scroll", g, !0), window.removeEventListener("resize", g), x !== null && cancelAnimationFrame(x), a.remove(), i.remove(), r.remove(), d.forEach(({ marker: u, outline: y }) => {
1613
- u.remove(), y.remove();
1612
+ window.removeEventListener("scroll", E, !0), window.removeEventListener("resize", E), v !== null && cancelAnimationFrame(v), r.remove(), i.remove(), a.remove(), d.forEach(({ marker: b, outline: f }) => {
1613
+ b.remove(), f.remove();
1614
1614
  }), d.clear();
1615
1615
  }
1616
1616
  };
1617
1617
  }
1618
- const Yt = '<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>', Kt = '<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>';
1619
- function Xt(e) {
1618
+ const Xt = '<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>', Kt = '<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>';
1619
+ function Gt(e) {
1620
1620
  return new Promise((t) => {
1621
1621
  const n = document.createElement("div");
1622
1622
  n.className = "beacon-pin-popover open beacon-no-capture beacon-theme-auto", n.innerHTML = `
@@ -1625,15 +1625,15 @@ function Xt(e) {
1625
1625
  <span class="beacon-pin-num">${e.pinNumber}</span>
1626
1626
  <span>Note for this pin</span>
1627
1627
  </div>
1628
- <button type="button" class="beacon-icon-btn" data-action="cancel" aria-label="Discard this pin">${Yt}</button>
1628
+ <button type="button" class="beacon-icon-btn" data-action="cancel" aria-label="Discard this pin">${Xt}</button>
1629
1629
  </div>
1630
1630
  <textarea class="beacon-textarea" rows="2" placeholder="Optional — describe what's wrong here…" style="min-height:48px;"></textarea>
1631
1631
  <div class="beacon-pin-popover-actions">
1632
1632
  <button type="button" class="beacon-btn primary" data-action="save">${Kt} Save</button>
1633
1633
  </div>
1634
1634
  `;
1635
- 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);
1636
- n.style.left = `${a}px`, n.style.top = `${i}px`, document.body.appendChild(n);
1635
+ const o = 240, a = 160, r = Math.min(Math.max(8, e.anchor.x), window.innerWidth - o - 8), i = Math.min(Math.max(8, e.anchor.y + 12), window.innerHeight - a - 8);
1636
+ n.style.left = `${r}px`, n.style.top = `${i}px`, document.body.appendChild(n);
1637
1637
  const s = n.querySelector("textarea");
1638
1638
  s.focus();
1639
1639
  function c(l) {
@@ -1643,37 +1643,37 @@ function Xt(e) {
1643
1643
  l.key === "Escape" && (l.preventDefault(), l.stopPropagation(), c({ cancelled: "all" }));
1644
1644
  }
1645
1645
  document.addEventListener("keydown", d, !0), n.addEventListener("click", (l) => {
1646
- var b;
1647
- const f = (b = l.target.closest("[data-action]")) == null ? void 0 : b.getAttribute("data-action");
1648
- if (f === "cancel" && c({ cancelled: "pin" }), f === "save") {
1649
- const m = s.value.trim();
1650
- c({ ...m ? { note: m } : {}, cancelled: !1 });
1646
+ var g;
1647
+ const p = (g = l.target.closest("[data-action]")) == null ? void 0 : g.getAttribute("data-action");
1648
+ if (p === "cancel" && c({ cancelled: "pin" }), p === "save") {
1649
+ const u = s.value.trim();
1650
+ c({ ...u ? { note: u } : {}, cancelled: !1 });
1651
1651
  }
1652
1652
  }), s.addEventListener("keydown", (l) => {
1653
1653
  if (l.key === "Enter" && (l.metaKey || l.ctrlKey)) {
1654
1654
  l.preventDefault();
1655
- const p = s.value.trim();
1656
- c({ ...p ? { note: p } : {}, cancelled: !1 });
1655
+ const m = s.value.trim();
1656
+ c({ ...m ? { note: m } : {}, cancelled: !1 });
1657
1657
  }
1658
1658
  });
1659
1659
  });
1660
1660
  }
1661
- const Gt = "#0ea5e9";
1662
- function Jt(e, t) {
1661
+ const Jt = "#0ea5e9";
1662
+ function Zt(e, t) {
1663
1663
  return /^#[0-9a-fA-F]{6}$/.test(e) ? `${e}${t}` : e;
1664
1664
  }
1665
- function Zt(e) {
1666
- const { shadowRoot: t, onHover: n } = e, o = e.accent ?? Gt, r = Jt(o, "14"), a = document.createElement("div");
1667
- a.style.cssText = [
1665
+ function Qt(e) {
1666
+ const { shadowRoot: t, onHover: n } = e, o = e.accent ?? Jt, a = Zt(o, "14"), r = document.createElement("div");
1667
+ r.style.cssText = [
1668
1668
  "position: fixed",
1669
1669
  "pointer-events: none",
1670
1670
  "z-index: 2147483646",
1671
1671
  `border: 2px solid ${o}`,
1672
- `background: ${r}`,
1672
+ `background: ${a}`,
1673
1673
  "transition: all 60ms ease-out",
1674
1674
  "box-sizing: border-box",
1675
1675
  "border-radius: 2px"
1676
- ].join("; "), document.body.appendChild(a);
1676
+ ].join("; "), document.body.appendChild(r);
1677
1677
  const i = document.createElement("div");
1678
1678
  i.style.cssText = [
1679
1679
  "position: fixed",
@@ -1696,60 +1696,60 @@ function Zt(e) {
1696
1696
  const l = new Promise((h) => {
1697
1697
  d = h;
1698
1698
  });
1699
- function p(h) {
1699
+ function m(h) {
1700
1700
  if (!h || !(h instanceof Node)) return !1;
1701
- let v = h;
1702
- for (; v; ) {
1703
- if (v === t || v === t.host) return !0;
1704
- v = v.parentNode ?? v.host ?? null;
1701
+ let y = h;
1702
+ for (; y; ) {
1703
+ if (y === t || y === t.host) return !0;
1704
+ y = y.parentNode ?? y.host ?? null;
1705
1705
  }
1706
1706
  return !1;
1707
1707
  }
1708
- function f(h, v) {
1709
- a.style.display = "none", i.style.display = "none";
1710
- const C = document.elementsFromPoint(h, v);
1711
- a.style.display = "block", i.style.display = "block";
1712
- for (const S of C)
1713
- if (!p(S)) return S;
1708
+ function p(h, y) {
1709
+ r.style.display = "none", i.style.display = "none";
1710
+ const C = document.elementsFromPoint(h, y);
1711
+ r.style.display = "block", i.style.display = "block";
1712
+ for (const k of C)
1713
+ if (!m(k)) return k;
1714
1714
  return null;
1715
1715
  }
1716
- function b(h) {
1717
- const v = h.getBoundingClientRect();
1718
- a.style.left = `${v.left}px`, a.style.top = `${v.top}px`, a.style.width = `${v.width}px`, a.style.height = `${v.height}px`;
1719
- const C = h.tagName.toLowerCase(), S = h.classList.length > 0 ? "." + Array.from(h.classList).slice(0, 2).join(".") : "";
1720
- i.textContent = C + S;
1721
- const L = v.top - 22;
1722
- i.style.left = `${v.left}px`, i.style.top = `${L >= 0 ? L : v.bottom + 4}px`;
1716
+ function g(h) {
1717
+ const y = h.getBoundingClientRect();
1718
+ r.style.left = `${y.left}px`, r.style.top = `${y.top}px`, r.style.width = `${y.width}px`, r.style.height = `${y.height}px`;
1719
+ const C = h.tagName.toLowerCase(), k = h.classList.length > 0 ? "." + Array.from(h.classList).slice(0, 2).join(".") : "";
1720
+ i.textContent = C + k;
1721
+ const S = y.top - 22;
1722
+ i.style.left = `${y.left}px`, i.style.top = `${S >= 0 ? S : y.bottom + 4}px`;
1723
1723
  }
1724
- function m(h) {
1725
- const v = f(h.clientX, h.clientY);
1726
- v ? (b(v), n == null || n(v)) : (a.style.display = "none", i.style.display = "none", n == null || n(null));
1724
+ function u(h) {
1725
+ const y = p(h.clientX, h.clientY);
1726
+ y ? (g(y), n == null || n(y)) : (r.style.display = "none", i.style.display = "none", n == null || n(null));
1727
1727
  }
1728
- function x(h) {
1728
+ function v(h) {
1729
1729
  if (h.button !== 0) return;
1730
1730
  h.preventDefault(), h.stopPropagation();
1731
- const v = f(h.clientX, h.clientY);
1732
- v && y(v);
1731
+ const y = p(h.clientX, h.clientY);
1732
+ y && f(y);
1733
1733
  }
1734
- function g(h) {
1734
+ function E(h) {
1735
1735
  h.preventDefault(), h.stopPropagation();
1736
1736
  }
1737
- function u(h) {
1738
- h.key === "Escape" && (h.preventDefault(), y(null));
1737
+ function b(h) {
1738
+ h.key === "Escape" && (h.preventDefault(), f(null));
1739
1739
  }
1740
- function y(h) {
1741
- c || (c = !0, document.removeEventListener("mousemove", m, !0), document.removeEventListener("pointerdown", x, !0), document.removeEventListener("click", g, !0), document.removeEventListener("mouseup", g, !0), document.removeEventListener("keydown", u, !0), a.remove(), i.remove(), document.body.style.cursor = s, d(h));
1740
+ function f(h) {
1741
+ c || (c = !0, document.removeEventListener("mousemove", u, !0), document.removeEventListener("pointerdown", v, !0), document.removeEventListener("click", E, !0), document.removeEventListener("mouseup", E, !0), document.removeEventListener("keydown", b, !0), r.remove(), i.remove(), document.body.style.cursor = s, d(h));
1742
1742
  }
1743
- return document.addEventListener("mousemove", m, !0), document.addEventListener("pointerdown", x, !0), document.addEventListener("click", g, !0), document.addEventListener("mouseup", g, !0), document.addEventListener("keydown", u, !0), {
1744
- cancel: () => y(null),
1743
+ return document.addEventListener("mousemove", u, !0), document.addEventListener("pointerdown", v, !0), document.addEventListener("click", E, !0), document.addEventListener("mouseup", E, !0), document.addEventListener("keydown", b, !0), {
1744
+ cancel: () => f(null),
1745
1745
  promise: l
1746
1746
  };
1747
1747
  }
1748
1748
  let Y = null;
1749
- async function Qt() {
1749
+ async function en() {
1750
1750
  return Y || (Y = await import("./index-DAIDnjfR.mjs")), Y;
1751
1751
  }
1752
- const q = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkAAIAAAoAAv/lxKUAAAAASUVORK5CYII=";
1752
+ const U = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkAAIAAAoAAv/lxKUAAAAASUVORK5CYII=";
1753
1753
  function be(e, t) {
1754
1754
  if (!e || e.startsWith("data:") || e.startsWith("blob:") || e.startsWith("/") || e.startsWith("#")) return !0;
1755
1755
  try {
@@ -1759,61 +1759,119 @@ function be(e, t) {
1759
1759
  }
1760
1760
  return t === "anonymous" || t === "use-credentials";
1761
1761
  }
1762
- function en() {
1762
+ function tn() {
1763
1763
  const e = [], t = [];
1764
1764
  return document.querySelectorAll("img").forEach((n) => {
1765
- be(n.src, n.crossOrigin) || (e.push({ el: n, src: n.src }), n.src = q);
1765
+ be(n.src, n.crossOrigin) || (e.push({ el: n, src: n.src }), n.src = U);
1766
1766
  }), document.querySelectorAll("image").forEach((n) => {
1767
- const o = n, r = o.getAttribute("href"), a = o.getAttributeNS("http://www.w3.org/1999/xlink", "href"), i = r || a || "";
1768
- i && !be(i) && (t.push({ el: o, href: r, xlink: a }), r !== null && o.setAttribute("href", q), a !== null && o.setAttributeNS("http://www.w3.org/1999/xlink", "href", q));
1767
+ const o = n, a = o.getAttribute("href"), r = o.getAttributeNS("http://www.w3.org/1999/xlink", "href"), i = a || r || "";
1768
+ i && !be(i) && (t.push({ el: o, href: a, xlink: r }), a !== null && o.setAttribute("href", U), r !== null && o.setAttributeNS("http://www.w3.org/1999/xlink", "href", U));
1769
1769
  }), () => {
1770
1770
  for (const { el: n, src: o } of e) n.src = o;
1771
- for (const { el: n, href: o, xlink: r } of t)
1772
- o !== null && n.setAttribute("href", o), r !== null && n.setAttributeNS("http://www.w3.org/1999/xlink", "href", r);
1771
+ for (const { el: n, href: o, xlink: a } of t)
1772
+ o !== null && n.setAttribute("href", o), a !== null && n.setAttributeNS("http://www.w3.org/1999/xlink", "href", a);
1773
+ };
1774
+ }
1775
+ function nn() {
1776
+ const e = [];
1777
+ document.querySelectorAll("*").forEach((r) => {
1778
+ const i = getComputedStyle(r), s = (i.overflowY === "auto" || i.overflowY === "scroll") && r.scrollHeight > r.clientHeight, c = (i.overflowX === "auto" || i.overflowX === "scroll") && r.scrollWidth > r.clientWidth;
1779
+ (s || c) && e.push(r);
1780
+ });
1781
+ const t = window.scrollX, n = window.scrollY, o = e.map((r) => ({
1782
+ el: r,
1783
+ scrollLeft: r.scrollLeft,
1784
+ scrollTop: r.scrollTop
1785
+ })), a = /* @__PURE__ */ new Map();
1786
+ for (const r of e) {
1787
+ let i = r;
1788
+ for (; i && i !== document.documentElement.parentElement; )
1789
+ a.has(i) || a.set(i, i.style.cssText), i = i.parentElement;
1790
+ }
1791
+ for (const r of a.keys())
1792
+ r.style.setProperty("overflow", "visible", "important"), r.style.setProperty("overflow-x", "visible", "important"), r.style.setProperty("overflow-y", "visible", "important"), r.style.setProperty("max-height", "none", "important"), r.style.setProperty("height", "auto", "important"), r.style.setProperty("min-height", "0", "important");
1793
+ return () => {
1794
+ for (const [r, i] of a)
1795
+ r.style.cssText = i;
1796
+ for (const { el: r, scrollLeft: i, scrollTop: s } of o)
1797
+ r.scrollLeft = i, r.scrollTop = s;
1798
+ window.scrollTo(t, n);
1773
1799
  };
1774
1800
  }
1801
+ let ge = Promise.resolve();
1775
1802
  async function _e(e = {}) {
1803
+ const t = ge;
1804
+ let n;
1805
+ ge = new Promise((o) => {
1806
+ n = o;
1807
+ });
1808
+ try {
1809
+ return await t, await on(e, n);
1810
+ } catch (o) {
1811
+ throw n(), o;
1812
+ }
1813
+ }
1814
+ async function on(e, t) {
1776
1815
  const {
1777
- quality: t = 0.7,
1778
- pixelRatio: n = Math.min(window.devicePixelRatio || 1, 2),
1779
- excludeShadowRoot: o,
1780
- excludeHosts: r
1781
- } = e, a = await Qt(), i = o || r != null && r.length ? (c) => {
1782
- let d = c;
1783
- for (; d; ) {
1784
- if (o && d === o.host || r && d instanceof Element && r.includes(d) || d instanceof Element && d.classList.contains("beacon-no-capture")) return !1;
1785
- d = d.parentNode;
1816
+ quality: n = 0.7,
1817
+ pixelRatio: o = Math.min(window.devicePixelRatio || 1, 2),
1818
+ excludeShadowRoot: a,
1819
+ excludeHosts: r,
1820
+ fullPage: i = !0
1821
+ } = e, s = await en(), c = a || r != null && r.length ? (g) => {
1822
+ let u = g;
1823
+ for (; u; ) {
1824
+ if (a && u === a.host || r && u instanceof Element && r.includes(u) || u instanceof Element && u.classList.contains("beacon-no-capture")) return !1;
1825
+ u = u.parentNode;
1786
1826
  }
1787
1827
  return !0;
1788
- } : void 0, s = en();
1828
+ } : void 0, d = tn(), l = i ? nn() : () => {
1829
+ };
1830
+ let m = !1;
1831
+ const p = () => {
1832
+ if (!m) {
1833
+ m = !0;
1834
+ try {
1835
+ l();
1836
+ } finally {
1837
+ try {
1838
+ d();
1839
+ } finally {
1840
+ t();
1841
+ }
1842
+ }
1843
+ }
1844
+ };
1789
1845
  try {
1790
- return await a.toJpeg(document.documentElement, {
1791
- quality: t,
1792
- pixelRatio: n,
1846
+ i && await new Promise((b) => requestAnimationFrame(() => b()));
1847
+ const g = document.documentElement, u = i ? Math.max(g.scrollWidth, window.innerWidth) : window.innerWidth, v = i ? Math.max(g.scrollHeight, window.innerHeight) : window.innerHeight;
1848
+ return { dataUrl: await s.toJpeg(g, {
1849
+ quality: n,
1850
+ pixelRatio: o,
1793
1851
  cacheBust: !0,
1794
- ...i ? { filter: i } : {},
1795
- imagePlaceholder: q,
1796
- width: window.innerWidth,
1797
- height: window.innerHeight,
1852
+ ...c ? { filter: c } : {},
1853
+ imagePlaceholder: U,
1854
+ width: u,
1855
+ height: v,
1798
1856
  style: { transform: "none" }
1799
- });
1800
- } finally {
1801
- s();
1857
+ }), width: u, height: v, pixelRatio: o, dispose: p };
1858
+ } catch (g) {
1859
+ throw p(), g;
1802
1860
  }
1803
1861
  }
1804
1862
  let Q = null;
1805
- function tn(e) {
1863
+ function rn(e) {
1806
1864
  Q = e;
1807
1865
  }
1808
- function nn() {
1866
+ function an() {
1809
1867
  return Q;
1810
1868
  }
1811
- function D() {
1869
+ function R() {
1812
1870
  Q = null;
1813
1871
  }
1814
- const ge = "http://www.w3.org/2000/svg";
1815
- function on() {
1816
- const e = document.createElementNS(ge, "svg");
1872
+ const ye = "http://www.w3.org/2000/svg";
1873
+ function sn() {
1874
+ const e = document.createElementNS(ye, "svg");
1817
1875
  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");
1818
1876
  const t = [
1819
1877
  "M3 6h18",
@@ -1821,129 +1879,139 @@ function on() {
1821
1879
  "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
1822
1880
  ];
1823
1881
  for (const n of t) {
1824
- const o = document.createElementNS(ge, "path");
1882
+ const o = document.createElementNS(ye, "path");
1825
1883
  o.setAttribute("d", n), e.appendChild(o);
1826
1884
  }
1827
1885
  return e;
1828
1886
  }
1829
- function rn(e = {}) {
1887
+ function cn(e = {}) {
1830
1888
  const t = e.maxPins ?? 20;
1831
- let n = [], o = /* @__PURE__ */ new WeakMap(), r = null, a = null, i = null, s = null, c = null;
1832
- function d() {
1833
- n = [], o = /* @__PURE__ */ new WeakMap(), r = null, D(), m(), x();
1834
- }
1889
+ let n = [], o = /* @__PURE__ */ new WeakMap(), a = null, r = 0, i = null, s = null, c = null, d = null;
1835
1890
  function l() {
1836
- const g = document.querySelector("launch-kit-beacon");
1837
- return (g == null ? void 0 : g.shadowRoot) ?? null;
1891
+ n = [], o = /* @__PURE__ */ new WeakMap(), a = null, r += 1, R(), E(), b();
1892
+ }
1893
+ function m() {
1894
+ const f = document.querySelector("launch-kit-beacon");
1895
+ return (f == null ? void 0 : f.shadowRoot) ?? null;
1838
1896
  }
1839
1897
  function p() {
1840
1898
  if (typeof window > "u") return e.accent ?? "#0ea5e9";
1841
1899
  if (e.accent) return e.accent;
1842
- const g = document.querySelector("launch-kit-beacon");
1843
- return g && getComputedStyle(g).getPropertyValue("--beacon-accent").trim() || "#0ea5e9";
1844
- }
1845
- async function f(g) {
1846
- const u = l();
1847
- if (!u) return;
1848
- const y = p(), h = await g.requestMode("pickElement"), v = Wt({ accent: y });
1849
- for (const C of n) {
1850
- const S = o.get(C);
1851
- S && v.addPin(C.number, {
1852
- target: S,
1853
- selector: C.selector,
1854
- fallbackRect: C.boundingRect
1900
+ const f = document.querySelector("launch-kit-beacon");
1901
+ return f && getComputedStyle(f).getPropertyValue("--beacon-accent").trim() || "#0ea5e9";
1902
+ }
1903
+ async function g(f) {
1904
+ const h = m();
1905
+ if (!h) return;
1906
+ const y = p(), C = await f.requestMode("pickElement"), k = Yt({ accent: y });
1907
+ for (const S of n) {
1908
+ const A = o.get(S);
1909
+ A && k.addPin(S.number, {
1910
+ target: A,
1911
+ selector: S.selector,
1912
+ fallbackRect: S.boundingRect
1855
1913
  });
1856
1914
  }
1857
1915
  try {
1858
- let C = !0;
1859
- for (; C && !(n.length >= t); ) {
1860
- const L = await Zt({ shadowRoot: u, accent: y }).promise;
1861
- if (!L) break;
1862
- const T = L.getBoundingClientRect(), N = await Xt({
1863
- anchor: { x: T.left, y: T.bottom },
1916
+ let S = !0;
1917
+ for (; S && !(n.length >= t); ) {
1918
+ const N = await Qt({ shadowRoot: h, accent: y }).promise;
1919
+ if (!N) break;
1920
+ const w = N.getBoundingClientRect(), L = await Gt({
1921
+ anchor: { x: w.left, y: w.bottom },
1864
1922
  pinNumber: n.length + 1
1865
1923
  });
1866
- if (N.cancelled === "all") {
1867
- C = !1;
1924
+ if (L.cancelled === "all") {
1925
+ S = !1;
1868
1926
  break;
1869
1927
  }
1870
- if (N.cancelled === "pin") continue;
1871
- const w = Bt(L), k = {
1928
+ if (L.cancelled === "pin") continue;
1929
+ const M = zt(N), I = {
1872
1930
  number: n.length + 1,
1873
- ...w,
1874
- ...N.note ? { note: N.note } : {}
1931
+ ...M,
1932
+ ...L.note ? { note: L.note } : {}
1875
1933
  };
1876
- n.push(k), o.set(k, L), v.addPin(k.number, {
1877
- target: L,
1878
- selector: w.selector,
1879
- fallbackRect: w.boundingRect
1934
+ n.push(I), o.set(I, N), k.addPin(I.number, {
1935
+ target: N,
1936
+ selector: M.selector,
1937
+ fallbackRect: M.boundingRect
1880
1938
  });
1881
1939
  }
1882
- if (n.length > 0) {
1883
- v.setLoading("Capturing screenshot…"), await new Promise((S) => requestAnimationFrame(() => S()));
1884
- try {
1885
- const S = Array.from(document.querySelectorAll("launch-kit-beacon")), L = await _e({ excludeHosts: S }), T = n.map((k) => ({
1886
- number: k.number,
1887
- selector: k.selector,
1888
- boundingRect: k.boundingRect,
1889
- ...o.get(k) ? { liveElement: o.get(k) } : {}
1890
- })), N = {
1891
- w: window.innerWidth,
1892
- h: window.innerHeight,
1893
- dpr: window.devicePixelRatio || 1
1894
- }, w = await Re(L, T, N, y);
1895
- r = w, tn({ dataUrl: w, mime: "image/jpeg" });
1896
- } catch {
1897
- r = null, D();
1898
- }
1899
- } else
1900
- r = null, D();
1940
+ n.length > 0 ? (k.setLoading("Capturing screenshot…"), await new Promise((A) => requestAnimationFrame(() => A())), await u()) : (a = null, R());
1901
1941
  } finally {
1902
- v.destroy(), h();
1942
+ k.destroy(), C();
1903
1943
  }
1904
- m(), x();
1944
+ E(), b();
1905
1945
  }
1906
- function b(g) {
1907
- const u = n.findIndex((y) => y.number === g);
1908
- u !== -1 && (n.splice(u, 1), n.forEach((y, h) => {
1909
- y.number = h + 1;
1910
- }), r = null, D(), m(), x());
1946
+ async function u() {
1947
+ const f = ++r;
1948
+ if (n.length === 0) {
1949
+ a = null, R(), b();
1950
+ return;
1951
+ }
1952
+ const h = p();
1953
+ try {
1954
+ const y = Array.from(document.querySelectorAll("launch-kit-beacon")), C = await _e({ excludeHosts: y });
1955
+ try {
1956
+ if (f !== r) return;
1957
+ const k = n.map((N) => ({
1958
+ number: N.number,
1959
+ selector: N.selector,
1960
+ boundingRect: N.boundingRect,
1961
+ ...o.get(N) ? { liveElement: o.get(N) } : {}
1962
+ })), S = { w: C.width, h: C.height, dpr: C.pixelRatio }, A = await Pe(C.dataUrl, k, S, h);
1963
+ if (f !== r) return;
1964
+ a = A, rn({ dataUrl: A, mime: "image/jpeg" });
1965
+ } finally {
1966
+ C.dispose();
1967
+ }
1968
+ } catch {
1969
+ if (f !== r) return;
1970
+ a = null, R();
1971
+ }
1972
+ f === r && b();
1911
1973
  }
1912
- function m() {
1913
- 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) {
1914
- i.innerHTML = "", i.style.display = n.length === 0 ? "none" : "";
1915
- for (const g of n) {
1916
- const u = document.createElement("div");
1917
- u.className = "beacon-pin-item", u.dataset.pin = String(g.number);
1918
- const y = document.createElement("span");
1919
- y.className = "beacon-pin-num", y.textContent = String(g.number);
1974
+ function v(f) {
1975
+ const h = n.findIndex((y) => y.number === f);
1976
+ h !== -1 && (n.splice(h, 1), n.forEach((y, C) => {
1977
+ y.number = C + 1;
1978
+ }), a = null, R(), E(), b(), u());
1979
+ }
1980
+ function E() {
1981
+ if (i && (i.textContent = `Pins (${n.length})`, i.style.display = n.length === 0 ? "none" : ""), d && (d.textContent = n.length === 0 ? "Annotate elements" : "Add another pin"), !!s) {
1982
+ s.innerHTML = "", s.style.display = n.length === 0 ? "none" : "";
1983
+ for (const f of n) {
1920
1984
  const h = document.createElement("div");
1921
- h.className = "beacon-pin-meta";
1922
- const v = document.createElement("div");
1923
- v.className = "beacon-pin-selector", v.title = g.selector, v.textContent = g.selector || g.tagName;
1924
- const C = document.createElement("input");
1925
- C.type = "text", C.className = "beacon-pin-note-input", C.placeholder = "Add a note (optional)", C.value = g.note ?? "", C.addEventListener("input", () => {
1926
- C.value.trim() ? g.note = C.value : delete g.note;
1927
- }), h.appendChild(v), h.appendChild(C);
1928
- const S = document.createElement("button");
1929
- S.type = "button", S.className = "beacon-icon-btn", S.setAttribute("aria-label", `Remove pin ${g.number}`), S.appendChild(on()), S.addEventListener("click", () => b(g.number)), u.appendChild(y), u.appendChild(h), u.appendChild(S), i.appendChild(u);
1985
+ h.className = "beacon-pin-item", h.dataset.pin = String(f.number);
1986
+ const y = document.createElement("span");
1987
+ y.className = "beacon-pin-num", y.textContent = String(f.number);
1988
+ const C = document.createElement("div");
1989
+ C.className = "beacon-pin-meta";
1990
+ const k = document.createElement("div");
1991
+ k.className = "beacon-pin-selector", k.title = f.selector, k.textContent = f.selector || f.tagName;
1992
+ const S = document.createElement("input");
1993
+ S.type = "text", S.className = "beacon-pin-note-input", S.placeholder = "Add a note (optional)", S.value = f.note ?? "", S.addEventListener("input", () => {
1994
+ S.value.trim() ? f.note = S.value : delete f.note;
1995
+ }), C.appendChild(k), C.appendChild(S);
1996
+ const A = document.createElement("button");
1997
+ A.type = "button", A.className = "beacon-icon-btn", A.setAttribute("aria-label", `Remove pin ${f.number}`), A.appendChild(sn()), A.addEventListener("click", () => v(f.number)), h.appendChild(y), h.appendChild(C), h.appendChild(A), s.appendChild(h);
1930
1998
  }
1931
1999
  }
1932
2000
  }
1933
- function x() {
1934
- s && (r ? (s.src = r, s.style.display = "block") : (s.removeAttribute("src"), s.style.display = "none"));
2001
+ function b() {
2002
+ c && (a ? (c.src = a, c.style.display = "block") : (c.removeAttribute("src"), c.style.display = "none"));
1935
2003
  }
1936
2004
  return {
1937
2005
  name: "domEle",
1938
- setupOnce(g) {
1939
- return g.on("close", () => d());
2006
+ setupOnce(f) {
2007
+ return f.on("close", () => l());
1940
2008
  },
1941
- form(g) {
2009
+ form(f) {
1942
2010
  return {
1943
- render: (u) => (a = document.createElement("div"), a.className = "beacon-pin-list-header", u.appendChild(a), i = document.createElement("div"), i.className = "beacon-pin-list", u.appendChild(i), c = document.createElement("button"), c.type = "button", c.className = "beacon-btn secondary beacon-pin-annotate", c.addEventListener("click", () => {
1944
- f(g);
1945
- }), u.appendChild(c), s = document.createElement("img"), s.className = "beacon-thumb", s.alt = "Annotated screenshot preview", s.style.display = "none", u.appendChild(s), m(), x(), () => {
1946
- a = null, i = null, s = null, c = null;
2011
+ render: (h) => (i = document.createElement("div"), i.className = "beacon-pin-list-header", h.appendChild(i), s = document.createElement("div"), s.className = "beacon-pin-list", h.appendChild(s), d = document.createElement("button"), d.type = "button", d.className = "beacon-btn secondary beacon-pin-annotate", d.addEventListener("click", () => {
2012
+ g(f);
2013
+ }), h.appendChild(d), c = document.createElement("img"), c.className = "beacon-thumb", c.alt = "Annotated screenshot preview", c.style.display = "none", h.appendChild(c), E(), b(), () => {
2014
+ i = null, s = null, c = null, d = null;
1947
2015
  })
1948
2016
  };
1949
2017
  },
@@ -1952,37 +2020,38 @@ function rn(e = {}) {
1952
2020
  }
1953
2021
  };
1954
2022
  }
1955
- function an(e) {
2023
+ function ln(e) {
1956
2024
  return !!e && typeof e == "object" && !("v" in e) && "error" in e;
1957
2025
  }
1958
- function sn(e = {}) {
2026
+ function dn(e = {}) {
1959
2027
  return {
1960
2028
  name: "domSS",
1961
2029
  async capture(t) {
1962
- const n = nn();
2030
+ const n = an();
1963
2031
  if (n)
1964
2032
  return { dataUrl: n.dataUrl, mime: n.mime };
1965
2033
  const o = await t.requestMode("hide");
1966
2034
  try {
1967
- await new Promise((p) => requestAnimationFrame(() => p()));
1968
- const r = Array.from(document.querySelectorAll("launch-kit-beacon")), a = await _e({
2035
+ await new Promise((i) => requestAnimationFrame(() => i()));
2036
+ const a = Array.from(document.querySelectorAll("launch-kit-beacon")), r = await _e({
1969
2037
  quality: e.quality,
1970
2038
  pixelRatio: e.pixelRatio,
1971
- excludeHosts: r
1972
- }), i = t.captured("domEle"), s = cn(i), c = {
1973
- w: window.innerWidth,
1974
- h: window.innerHeight,
1975
- dpr: window.devicePixelRatio || 1
1976
- }, d = e.accent ?? ln();
1977
- return { dataUrl: s.length > 0 ? await Re(a, s, c, d) : a, mime: "image/jpeg" };
2039
+ excludeHosts: a
2040
+ });
2041
+ try {
2042
+ const i = t.captured("domEle"), s = un(i), c = { w: r.width, h: r.height, dpr: r.pixelRatio }, d = e.accent ?? pn();
2043
+ return { dataUrl: s.length > 0 ? await Pe(r.dataUrl, s, c, d) : r.dataUrl, mime: "image/jpeg" };
2044
+ } finally {
2045
+ r.dispose();
2046
+ }
1978
2047
  } finally {
1979
2048
  o();
1980
2049
  }
1981
2050
  }
1982
2051
  };
1983
2052
  }
1984
- function cn(e) {
1985
- if (!e || an(e)) return [];
2053
+ function un(e) {
2054
+ if (!e || ln(e)) return [];
1986
2055
  const t = e.pins;
1987
2056
  return Array.isArray(t) ? t.filter((n) => !!n && typeof n == "object").map((n) => ({
1988
2057
  number: Number(n.number) || 0,
@@ -1990,19 +2059,19 @@ function cn(e) {
1990
2059
  boundingRect: n.boundingRect ?? { x: 0, y: 0, w: 0, h: 0 }
1991
2060
  })) : [];
1992
2061
  }
1993
- function ln() {
2062
+ function pn() {
1994
2063
  if (typeof window > "u") return "#0ea5e9";
1995
2064
  const e = document.querySelector("launch-kit-beacon");
1996
2065
  return e && getComputedStyle(e).getPropertyValue("--beacon-accent").trim() || "#0ea5e9";
1997
2066
  }
1998
- const ye = "beacon-no-capture", ve = "__lsBeaconMonitorChipPos", dn = "#10b981";
1999
- function un(e) {
2000
- const t = e.accent ?? dn, n = e.startedAt ?? Date.now(), o = document.createElement("div");
2001
- o.className = `${ye} beacon-monitor-overlay-frame`, o.setAttribute("aria-hidden", "true"), o.style.setProperty("--beacon-monitor-accent", t), document.body.appendChild(o);
2002
- const r = document.createElement("div");
2003
- r.className = `${ye} beacon-monitor-overlay-chip`, r.setAttribute("role", "status"), r.setAttribute("aria-label", "Recording — drag to move"), r.style.setProperty("--beacon-monitor-accent", t);
2067
+ const ve = "beacon-no-capture", xe = "__lsBeaconMonitorChipPos", fn = "#10b981";
2068
+ function mn(e) {
2069
+ const t = e.accent ?? fn, n = e.startedAt ?? Date.now(), o = document.createElement("div");
2070
+ o.className = `${ve} beacon-monitor-overlay-frame`, o.setAttribute("aria-hidden", "true"), o.style.setProperty("--beacon-monitor-accent", t), document.body.appendChild(o);
2004
2071
  const a = document.createElement("div");
2005
- a.className = "beacon-monitor-overlay-chip-row";
2072
+ a.className = `${ve} beacon-monitor-overlay-chip`, a.setAttribute("role", "status"), a.setAttribute("aria-label", "Recording — drag to move"), a.style.setProperty("--beacon-monitor-accent", t);
2073
+ const r = document.createElement("div");
2074
+ r.className = "beacon-monitor-overlay-chip-row";
2006
2075
  const i = document.createElement("span");
2007
2076
  i.className = "beacon-monitor-overlay-rec-dot", i.setAttribute("aria-hidden", "true");
2008
2077
  const s = document.createElement("span");
@@ -2012,95 +2081,95 @@ function un(e) {
2012
2081
  const d = document.createElement("span");
2013
2082
  d.className = "beacon-monitor-overlay-timer", d.textContent = "00:00";
2014
2083
  const l = document.createElement("button");
2015
- 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(d), a.appendChild(l), r.appendChild(a);
2016
- const p = document.createElement("div");
2017
- 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);
2018
- const f = b() ?? m();
2019
- g(x(f));
2020
- function b() {
2084
+ l.type = "button", l.className = "beacon-monitor-overlay-stop", l.textContent = "Stop", l.setAttribute("aria-label", "Stop monitoring"), r.appendChild(i), r.appendChild(s), r.appendChild(c), r.appendChild(d), r.appendChild(l), a.appendChild(r);
2085
+ const m = document.createElement("div");
2086
+ m.className = "beacon-monitor-overlay-url", e.url ? (m.textContent = e.url, m.title = e.url) : m.style.display = "none", a.appendChild(m), document.body.appendChild(a);
2087
+ const p = g() ?? u();
2088
+ E(v(p));
2089
+ function g() {
2021
2090
  try {
2022
- const w = localStorage.getItem(ve);
2091
+ const w = localStorage.getItem(xe);
2023
2092
  if (!w) return null;
2024
- const k = JSON.parse(w), I = typeof k.x == "number" ? k.x : NaN, z = typeof k.y == "number" ? k.y : NaN;
2025
- return !Number.isFinite(I) || !Number.isFinite(z) ? null : { x: I, y: z };
2093
+ const L = JSON.parse(w), M = typeof L.x == "number" ? L.x : NaN, I = typeof L.y == "number" ? L.y : NaN;
2094
+ return !Number.isFinite(M) || !Number.isFinite(I) ? null : { x: M, y: I };
2026
2095
  } catch {
2027
2096
  return null;
2028
2097
  }
2029
2098
  }
2030
- function m() {
2031
- const k = r.getBoundingClientRect().width || 200;
2032
- return { x: Math.max(8, Math.floor((window.innerWidth - k) / 2)), y: 16 };
2099
+ function u() {
2100
+ const L = a.getBoundingClientRect().width || 200;
2101
+ return { x: Math.max(8, Math.floor((window.innerWidth - L) / 2)), y: 16 };
2033
2102
  }
2034
- function x(w) {
2035
- const I = r.getBoundingClientRect(), z = I.width || 200, je = I.height || 40, Ve = Math.max(8, window.innerWidth - z - 8), We = Math.max(8, window.innerHeight - je - 8);
2103
+ function v(w) {
2104
+ const M = a.getBoundingClientRect(), I = M.width || 200, Ve = M.height || 40, We = Math.max(8, window.innerWidth - I - 8), Ye = Math.max(8, window.innerHeight - Ve - 8);
2036
2105
  return {
2037
- x: Math.min(Math.max(8, w.x), Ve),
2038
- y: Math.min(Math.max(8, w.y), We)
2106
+ x: Math.min(Math.max(8, w.x), We),
2107
+ y: Math.min(Math.max(8, w.y), Ye)
2039
2108
  };
2040
2109
  }
2041
- function g(w) {
2042
- r.style.left = `${w.x}px`, r.style.top = `${w.y}px`;
2110
+ function E(w) {
2111
+ a.style.left = `${w.x}px`, a.style.top = `${w.y}px`;
2043
2112
  }
2044
- let u = !1, y = null, h = { x: 0, y: 0 };
2045
- function v(w) {
2113
+ let b = !1, f = null, h = { x: 0, y: 0 };
2114
+ function y(w) {
2046
2115
  if (w.target instanceof Element && w.target.closest(".beacon-monitor-overlay-stop")) return;
2047
- w.preventDefault(), u = !0, y = w.pointerId;
2116
+ w.preventDefault(), b = !0, f = w.pointerId;
2048
2117
  try {
2049
- r.setPointerCapture(w.pointerId);
2118
+ a.setPointerCapture(w.pointerId);
2050
2119
  } catch {
2051
2120
  }
2052
- r.setAttribute("data-dragging", "true");
2053
- const k = r.getBoundingClientRect();
2054
- h = { x: w.clientX - k.left, y: w.clientY - k.top };
2121
+ a.setAttribute("data-dragging", "true");
2122
+ const L = a.getBoundingClientRect();
2123
+ h = { x: w.clientX - L.left, y: w.clientY - L.top };
2055
2124
  }
2056
2125
  function C(w) {
2057
- !u || w.pointerId !== y || g(x({ x: w.clientX - h.x, y: w.clientY - h.y }));
2126
+ !b || w.pointerId !== f || E(v({ x: w.clientX - h.x, y: w.clientY - h.y }));
2058
2127
  }
2059
- function S(w) {
2060
- if (!u || w.pointerId !== y) return;
2061
- u = !1, y = null, r.removeAttribute("data-dragging");
2128
+ function k(w) {
2129
+ if (!b || w.pointerId !== f) return;
2130
+ b = !1, f = null, a.removeAttribute("data-dragging");
2062
2131
  try {
2063
- r.releasePointerCapture(w.pointerId);
2132
+ a.releasePointerCapture(w.pointerId);
2064
2133
  } catch {
2065
2134
  }
2066
- const k = r.getBoundingClientRect();
2135
+ const L = a.getBoundingClientRect();
2067
2136
  try {
2068
- localStorage.setItem(ve, JSON.stringify({ x: k.left, y: k.top }));
2137
+ localStorage.setItem(xe, JSON.stringify({ x: L.left, y: L.top }));
2069
2138
  } catch {
2070
2139
  }
2071
2140
  }
2072
- r.addEventListener("pointerdown", v), r.addEventListener("pointermove", C), r.addEventListener("pointerup", S), r.addEventListener("pointercancel", S), l.addEventListener("click", (w) => {
2141
+ a.addEventListener("pointerdown", y), a.addEventListener("pointermove", C), a.addEventListener("pointerup", k), a.addEventListener("pointercancel", k), l.addEventListener("click", (w) => {
2073
2142
  w.stopPropagation(), e.onStop();
2074
2143
  });
2075
- function L() {
2076
- const w = r.getBoundingClientRect();
2077
- g(x({ x: w.left, y: w.top }));
2144
+ function S() {
2145
+ const w = a.getBoundingClientRect();
2146
+ E(v({ x: w.left, y: w.top }));
2078
2147
  }
2079
- window.addEventListener("resize", L);
2080
- function T() {
2148
+ window.addEventListener("resize", S);
2149
+ function A() {
2081
2150
  const w = Math.max(0, Math.floor((Date.now() - n) / 1e3));
2082
- d.textContent = pn(w);
2151
+ d.textContent = hn(w);
2083
2152
  }
2084
- T();
2085
- const N = window.setInterval(T, 1e3);
2153
+ A();
2154
+ const N = window.setInterval(A, 1e3);
2086
2155
  return {
2087
2156
  updateUrl(w) {
2088
- w ? (p.textContent = w, p.title = w, p.style.display = "") : p.style.display = "none";
2157
+ w ? (m.textContent = w, m.title = w, m.style.display = "") : m.style.display = "none";
2089
2158
  },
2090
2159
  destroy() {
2091
- window.clearInterval(N), window.removeEventListener("resize", L), r.removeEventListener("pointerdown", v), r.removeEventListener("pointermove", C), r.removeEventListener("pointerup", S), r.removeEventListener("pointercancel", S), o.remove(), r.remove();
2160
+ window.clearInterval(N), window.removeEventListener("resize", S), a.removeEventListener("pointerdown", y), a.removeEventListener("pointermove", C), a.removeEventListener("pointerup", k), a.removeEventListener("pointercancel", k), o.remove(), a.remove();
2092
2161
  }
2093
2162
  };
2094
2163
  }
2095
- function pn(e) {
2164
+ function hn(e) {
2096
2165
  const t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), o = e % 60;
2097
- return t > 0 ? `${P(t)}:${P(n)}:${P(o)}` : `${P(n)}:${P(o)}`;
2166
+ return t > 0 ? `${$(t)}:${$(n)}:${$(o)}` : `${$(n)}:${$(o)}`;
2098
2167
  }
2099
- function P(e) {
2168
+ function $(e) {
2100
2169
  return e < 10 ? `0${e}` : String(e);
2101
2170
  }
2102
- const O = 80, fn = 'button, a, input[type="submit"], input[type="button"], [role="button"], [role="link"], [role="menuitem"], [role="tab"], [role="option"]', mn = 1024, hn = 5;
2103
- function bn(e, t) {
2171
+ const O = 80, bn = 'button, a, input[type="submit"], input[type="button"], [role="button"], [role="link"], [role="menuitem"], [role="tab"], [role="option"]', gn = 1024, yn = 5;
2172
+ function vn(e, t) {
2104
2173
  return e.length > t ? e.slice(0, t) : e;
2105
2174
  }
2106
2175
  function ee(e) {
@@ -2108,8 +2177,8 @@ function ee(e) {
2108
2177
  const t = [];
2109
2178
  let n = e;
2110
2179
  for (let o = 0; o < 5 && n; o++) {
2111
- 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(".") : "";
2112
- if (t.unshift(`${r}${a}${i}`), a) break;
2180
+ const a = n.tagName.toLowerCase(), r = n.id ? `#${CSS.escape(n.id)}` : "", i = n.classList.length > 0 ? "." + Array.from(n.classList).slice(0, 3).map(CSS.escape).join(".") : "";
2181
+ if (t.unshift(`${a}${r}${i}`), r) break;
2113
2182
  n = n.parentElement;
2114
2183
  }
2115
2184
  return t.join(" > ");
@@ -2120,12 +2189,12 @@ function H(e, t) {
2120
2189
  if (n)
2121
2190
  return n.length > t ? n.slice(0, t) : n;
2122
2191
  }
2123
- function xe(e) {
2124
- const t = H(e.textContent, O), n = H(e.getAttribute("aria-label"), O), o = e.getAttribute("data-testid") || void 0, r = e.getAttribute("name") || void 0;
2125
- let a = n || t;
2126
- if (!a) {
2127
- const i = e.closest(fn);
2128
- i && i !== e && (a = H(i.getAttribute("aria-label"), O) || H(i.textContent, O));
2192
+ function we(e) {
2193
+ const t = H(e.textContent, O), n = H(e.getAttribute("aria-label"), O), o = e.getAttribute("data-testid") || void 0, a = e.getAttribute("name") || void 0;
2194
+ let r = n || t;
2195
+ if (!r) {
2196
+ const i = e.closest(bn);
2197
+ i && i !== e && (r = H(i.getAttribute("aria-label"), O) || H(i.textContent, O));
2129
2198
  }
2130
2199
  return {
2131
2200
  tag: e.tagName.toLowerCase(),
@@ -2136,52 +2205,52 @@ function xe(e) {
2136
2205
  ...t ? { text: t } : {},
2137
2206
  ...n ? { ariaLabel: n } : {},
2138
2207
  ...o ? { testid: o } : {},
2139
- ...r ? { name: r } : {},
2208
+ ...a ? { name: a } : {},
2140
2209
  // Only include label when it adds something beyond `text` (avoids dup).
2141
- ...a && a !== t ? { label: a } : {}
2210
+ ...r && r !== t ? { label: r } : {}
2142
2211
  };
2143
2212
  }
2144
- function gn(e, t) {
2213
+ function xn(e, t) {
2145
2214
  const n = [], o = document.querySelectorAll("body *");
2146
- for (const r of Array.from(o)) {
2147
- const a = getComputedStyle(r);
2148
- if (a.position !== "fixed" && a.position !== "sticky") continue;
2149
- const i = r.getBoundingClientRect();
2215
+ for (const a of Array.from(o)) {
2216
+ const r = getComputedStyle(a);
2217
+ if (r.position !== "fixed" && r.position !== "sticky") continue;
2218
+ const i = a.getBoundingClientRect();
2150
2219
  if (e < i.left || e > i.right || t < i.top || t > i.bottom) continue;
2151
- const s = parseInt(a.zIndex, 10);
2152
- !Number.isFinite(s) && a.zIndex !== "auto" || n.push({
2153
- tag: r.tagName.toLowerCase(),
2220
+ const s = parseInt(r.zIndex, 10);
2221
+ !Number.isFinite(s) && r.zIndex !== "auto" || n.push({
2222
+ tag: a.tagName.toLowerCase(),
2154
2223
  zIndex: Number.isFinite(s) ? s : 0,
2155
- pointerEvents: a.pointerEvents,
2156
- classes: Array.from(r.classList).slice(0, 5).join(" ")
2224
+ pointerEvents: r.pointerEvents,
2225
+ classes: Array.from(a.classList).slice(0, 5).join(" ")
2157
2226
  });
2158
2227
  }
2159
- return n.sort((r, a) => a.zIndex - r.zIndex).slice(0, hn);
2228
+ return n.sort((a, r) => r.zIndex - a.zIndex).slice(0, yn);
2160
2229
  }
2161
- function yn(e) {
2162
- const t = (r) => (a) => {
2163
- const i = a, s = i.target;
2230
+ function wn(e) {
2231
+ const t = (a) => (r) => {
2232
+ const i = r, s = i.target;
2164
2233
  if (!(s instanceof Element)) return;
2165
- const c = i.clientX, d = i.clientY, l = document.elementFromPoint(c, d), 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 ? [] : gn(c, d);
2234
+ const c = i.clientX, d = i.clientY, l = document.elementFromPoint(c, d), m = l === s || (l ? s.contains(l) || l.contains(s) : !1), p = document.querySelectorAll('[role="dialog"][data-state="open"]').length, g = getComputedStyle(document.body).pointerEvents, u = m ? [] : xn(c, d);
2166
2235
  e.emitClick({
2167
- kind: r,
2168
- target: xe(s),
2169
- hitMatchesTarget: p,
2170
- ...!p && l instanceof Element ? { hitTarget: xe(l) } : {},
2236
+ kind: a,
2237
+ target: we(s),
2238
+ hitMatchesTarget: m,
2239
+ ...!m && l instanceof Element ? { hitTarget: we(l) } : {},
2171
2240
  coords: { x: c, y: d },
2172
- openDialogs: f,
2173
- bodyPointerEvents: b,
2174
- ...m.length > 0 ? { overlaysAtPoint: m } : {}
2241
+ openDialogs: p,
2242
+ bodyPointerEvents: g,
2243
+ ...u.length > 0 ? { overlaysAtPoint: u } : {}
2175
2244
  });
2176
2245
  }, n = t("click"), o = t("mousedown");
2177
2246
  return document.addEventListener("click", n, { capture: !0, passive: !0 }), document.addEventListener("mousedown", o, { capture: !0, passive: !0 }), () => {
2178
2247
  document.removeEventListener("click", n, { capture: !0 }), document.removeEventListener("mousedown", o, { capture: !0 });
2179
2248
  };
2180
2249
  }
2181
- function vn(e) {
2250
+ function En(e) {
2182
2251
  const t = history.pushState, n = history.replaceState;
2183
2252
  let o = window.location.href;
2184
- const r = (s) => {
2253
+ const a = (s) => {
2185
2254
  const c = window.location.href;
2186
2255
  if (c === o) return;
2187
2256
  const d = o;
@@ -2189,43 +2258,43 @@ function vn(e) {
2189
2258
  };
2190
2259
  history.pushState = function(...c) {
2191
2260
  const d = t.apply(this, c);
2192
- return r("pushState"), d;
2261
+ return a("pushState"), d;
2193
2262
  }, history.replaceState = function(...c) {
2194
2263
  const d = n.apply(this, c);
2195
- return r("replaceState"), d;
2264
+ return a("replaceState"), d;
2196
2265
  };
2197
- const a = () => r("popstate"), i = () => r("hashchange");
2198
- return window.addEventListener("popstate", a), window.addEventListener("hashchange", i), () => {
2199
- history.pushState = t, history.replaceState = n, window.removeEventListener("popstate", a), window.removeEventListener("hashchange", i);
2266
+ const r = () => a("popstate"), i = () => a("hashchange");
2267
+ return window.addEventListener("popstate", r), window.addEventListener("hashchange", i), () => {
2268
+ history.pushState = t, history.replaceState = n, window.removeEventListener("popstate", r), window.removeEventListener("hashchange", i);
2200
2269
  };
2201
2270
  }
2202
- function xn(e) {
2203
- const t = /* @__PURE__ */ new WeakSet(), n = (r, a) => {
2204
- const i = ee(r);
2271
+ function Sn(e) {
2272
+ const t = /* @__PURE__ */ new WeakSet(), n = (a, r) => {
2273
+ const i = ee(a);
2205
2274
  e.emitDialog({
2206
2275
  kind: "dialog",
2207
- action: a,
2276
+ action: r,
2208
2277
  selector: i,
2209
- state: r.getAttribute("data-state"),
2210
- ...a === "mount" ? { outerHTML: bn(r.outerHTML, mn) } : {}
2278
+ state: a.getAttribute("data-state"),
2279
+ ...r === "mount" ? { outerHTML: vn(a.outerHTML, gn) } : {}
2211
2280
  });
2212
2281
  };
2213
- for (const r of Array.from(document.querySelectorAll('[role="dialog"]')))
2214
- t.add(r);
2215
- const o = new MutationObserver((r) => {
2216
- var a, i, s, c;
2217
- for (const d of r) {
2282
+ for (const a of Array.from(document.querySelectorAll('[role="dialog"]')))
2283
+ t.add(a);
2284
+ const o = new MutationObserver((a) => {
2285
+ var r, i, s, c;
2286
+ for (const d of a) {
2218
2287
  for (const l of Array.from(d.addedNodes)) {
2219
2288
  if (!(l instanceof Element)) continue;
2220
- 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"]')) ?? []);
2221
- for (const f of p)
2222
- t.has(f) || (t.add(f), n(f, "mount"));
2289
+ const m = (r = l.matches) != null && r.call(l, '[role="dialog"]') ? [l] : Array.from(((i = l.querySelectorAll) == null ? void 0 : i.call(l, '[role="dialog"]')) ?? []);
2290
+ for (const p of m)
2291
+ t.has(p) || (t.add(p), n(p, "mount"));
2223
2292
  }
2224
2293
  for (const l of Array.from(d.removedNodes)) {
2225
2294
  if (!(l instanceof Element)) continue;
2226
- 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"]')) ?? []);
2227
- for (const f of p)
2228
- t.has(f) && (t.delete(f), n(f, "unmount"));
2295
+ const m = (s = l.matches) != null && s.call(l, '[role="dialog"]') ? [l] : Array.from(((c = l.querySelectorAll) == null ? void 0 : c.call(l, '[role="dialog"]')) ?? []);
2296
+ for (const p of m)
2297
+ t.has(p) && (t.delete(p), n(p, "unmount"));
2229
2298
  }
2230
2299
  d.type === "attributes" && d.attributeName === "data-state" && d.target instanceof Element && d.target.getAttribute("role") === "dialog" && n(d.target, "state");
2231
2300
  }
@@ -2237,16 +2306,16 @@ function xn(e) {
2237
2306
  attributeFilter: ["data-state"]
2238
2307
  }), () => o.disconnect();
2239
2308
  }
2240
- function wn(e) {
2309
+ function Cn(e) {
2241
2310
  const t = (n) => {
2242
2311
  const o = n.target;
2243
2312
  if (!(o instanceof HTMLFormElement)) return;
2244
- const r = [];
2245
- for (const a of Array.from(o.elements)) {
2246
- if (!(a instanceof HTMLInputElement || a instanceof HTMLTextAreaElement || a instanceof HTMLSelectElement)) continue;
2247
- const i = a.getAttribute("name") || "<unnamed>", s = a instanceof HTMLInputElement ? a.type : a.tagName.toLowerCase();
2313
+ const a = [];
2314
+ for (const r of Array.from(o.elements)) {
2315
+ if (!(r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement || r instanceof HTMLSelectElement)) continue;
2316
+ const i = r.getAttribute("name") || "<unnamed>", s = r instanceof HTMLInputElement ? r.type : r.tagName.toLowerCase();
2248
2317
  let c;
2249
- a instanceof HTMLInputElement && (a.type === "checkbox" || a.type === "radio") ? c = a.checked : c = !!a.value, r.push({ name: i, type: s, hasValue: c });
2318
+ r instanceof HTMLInputElement && (r.type === "checkbox" || r.type === "radio") ? c = r.checked : c = !!r.value, a.push({ name: i, type: s, hasValue: c });
2250
2319
  }
2251
2320
  e.emitSubmit({
2252
2321
  kind: "submit",
@@ -2255,128 +2324,128 @@ function wn(e) {
2255
2324
  action: o.getAttribute("action") || null,
2256
2325
  method: (o.getAttribute("method") || "GET").toUpperCase(),
2257
2326
  selector: ee(o),
2258
- fields: r
2327
+ fields: a
2259
2328
  }
2260
2329
  });
2261
2330
  };
2262
2331
  return document.addEventListener("submit", t, { capture: !0 }), () => document.removeEventListener("submit", t, { capture: !0 });
2263
2332
  }
2264
- function En(e) {
2265
- const t = yn(e), n = vn(e), o = xn(e), r = wn(e);
2333
+ function kn(e) {
2334
+ const t = wn(e), n = En(e), o = Sn(e), a = Cn(e);
2266
2335
  return {
2267
2336
  uninstall() {
2268
- t(), n(), o(), r();
2337
+ t(), n(), o(), a();
2269
2338
  }
2270
2339
  };
2271
2340
  }
2272
- const X = 1e3, we = 10 * 1024, Pe = "[REDACTED]", De = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]), Sn = [
2341
+ const K = 1e3, Ee = 10 * 1024, De = "[REDACTED]", $e = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]), An = [
2273
2342
  /Bearer\s+[A-Za-z0-9._\-+/=]+/gi,
2274
2343
  /\bls_pat_[A-Za-z0-9_]+/g,
2275
2344
  // JWT: three dot-separated base64url segments starting with eyJ (the b64
2276
2345
  // encoding of the JSON {"). Matches Auth0/Clerk/most providers' tokens.
2277
2346
  /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g
2278
- ], Cn = /^(password|passwd|secret|token|api[_-]?key|auth|access[_-]?token|refresh[_-]?token|client[_-]?secret|private[_-]?key)$/i;
2347
+ ], Ln = /^(password|passwd|secret|token|api[_-]?key|auth|access[_-]?token|refresh[_-]?token|client[_-]?secret|private[_-]?key)$/i;
2279
2348
  function G(e, t) {
2280
2349
  return e.length > t ? e.slice(0, t) : e;
2281
2350
  }
2282
- function $e(e) {
2351
+ function Be(e) {
2283
2352
  let t = e;
2284
- for (const n of Sn)
2285
- t = t.replace(n, Pe);
2353
+ for (const n of An)
2354
+ t = t.replace(n, De);
2286
2355
  return t;
2287
2356
  }
2288
2357
  function J(e) {
2289
2358
  if (e === null || typeof e != "object")
2290
- return typeof e == "string" ? $e(e) : e;
2359
+ return typeof e == "string" ? Be(e) : e;
2291
2360
  if (Array.isArray(e)) return e.map(J);
2292
2361
  const t = {};
2293
2362
  for (const [n, o] of Object.entries(e))
2294
- t[n] = Cn.test(n) ? Pe : J(o);
2363
+ t[n] = Ln.test(n) ? De : J(o);
2295
2364
  return t;
2296
2365
  }
2297
- function Ee(e, t) {
2366
+ function Se(e, t) {
2298
2367
  if (t && t.includes("application/json"))
2299
2368
  try {
2300
2369
  const n = JSON.parse(e);
2301
2370
  return JSON.stringify(J(n));
2302
2371
  } catch {
2303
2372
  }
2304
- return $e(e);
2373
+ return Be(e);
2305
2374
  }
2306
- function U(e, t) {
2375
+ function q(e, t) {
2307
2376
  const n = e.length, o = { bodySize: n };
2308
- return n > we ? (o.body = Ee(e.slice(0, we), t), o.bodyTruncated = !0) : o.body = Ee(e, t), t && (o.contentType = t), o;
2377
+ return n > Ee ? (o.body = Se(e.slice(0, Ee), t), o.bodyTruncated = !0) : o.body = Se(e, t), t && (o.contentType = t), o;
2309
2378
  }
2310
- function kn(e, t) {
2379
+ function Tn(e, t) {
2311
2380
  const n = t == null ? void 0 : t.body;
2312
2381
  if (n != null) {
2313
2382
  if (typeof n == "string") return n;
2314
2383
  if (n instanceof URLSearchParams) return n.toString();
2315
2384
  if (n instanceof FormData) {
2316
2385
  const o = [];
2317
- return n.forEach((r, a) => {
2318
- o.push(`${a}=${typeof r == "string" ? `[${r.length}b]` : "[file]"}`);
2386
+ return n.forEach((a, r) => {
2387
+ o.push(`${r}=${typeof a == "string" ? `[${a.length}b]` : "[file]"}`);
2319
2388
  }), `[FormData] ${o.join("&")}`;
2320
2389
  }
2321
2390
  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;
2322
2391
  }
2323
2392
  return e instanceof Request, null;
2324
2393
  }
2325
- function An(e, t) {
2326
- 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"));
2394
+ function Nn(e, t) {
2395
+ return !!(((o) => o ? o instanceof Headers ? o.has("authorization") : Array.isArray(o) ? o.some(([a]) => a.toLowerCase() === "authorization") : typeof o == "object" ? Object.keys(o).some((a) => a.toLowerCase() === "authorization") : !1 : !1)(t == null ? void 0 : t.headers) || e instanceof Request && e.headers.has("authorization"));
2327
2396
  }
2328
- function Ln(e, t) {
2397
+ function Mn(e, t) {
2329
2398
  return ((o) => {
2330
2399
  if (o) {
2331
2400
  if (o instanceof Headers) return o.get("content-type") || void 0;
2332
2401
  if (Array.isArray(o)) {
2333
- const r = o.find(([a]) => a.toLowerCase() === "content-type");
2334
- return r ? r[1] : void 0;
2402
+ const a = o.find(([r]) => r.toLowerCase() === "content-type");
2403
+ return a ? a[1] : void 0;
2335
2404
  }
2336
2405
  if (typeof o == "object") {
2337
- for (const [r, a] of Object.entries(o))
2338
- if (r.toLowerCase() === "content-type") return a;
2406
+ for (const [a, r] of Object.entries(o))
2407
+ if (a.toLowerCase() === "content-type") return r;
2339
2408
  }
2340
2409
  }
2341
2410
  })(t == null ? void 0 : t.headers) ?? (e instanceof Request && e.headers.get("content-type") || void 0);
2342
2411
  }
2343
- function Nn(e, t, n) {
2344
- if (!De.has(n)) return;
2345
- const o = An(e, t), r = kn(e, t);
2346
- if (r == null && !o) return;
2347
- const a = Ln(e, t), i = r != null ? U(r, a) : {};
2412
+ function In(e, t, n) {
2413
+ if (!$e.has(n)) return;
2414
+ const o = Nn(e, t), a = Tn(e, t);
2415
+ if (a == null && !o) return;
2416
+ const r = Mn(e, t), i = a != null ? q(a, r) : {};
2348
2417
  return o && (i.hasAuth = !0), i;
2349
2418
  }
2350
- function Tn(e) {
2419
+ function Rn(e) {
2351
2420
  const t = window.fetch;
2352
2421
  if (typeof t != "function") return () => {
2353
2422
  };
2354
- const n = async (o, r) => {
2355
- 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 = Nn(o, r, i);
2423
+ const n = async (o, a) => {
2424
+ const r = performance.now(), i = ((a == null ? void 0 : a.method) ?? (o instanceof Request ? o.method : "GET")).toUpperCase(), s = typeof o == "string" ? o : o instanceof URL ? o.toString() : o.url, c = In(o, a, i);
2356
2425
  try {
2357
- const d = await t.call(window, o, r), l = Math.round(performance.now() - a), p = d.status >= 400;
2358
- let f;
2359
- if (p || e.verbose)
2426
+ const d = await t.call(window, o, a), l = Math.round(performance.now() - r), m = d.status >= 400;
2427
+ let p;
2428
+ if (m || e.verbose)
2360
2429
  try {
2361
- const b = await d.clone().text(), m = d.headers.get("content-type") || void 0;
2362
- f = U(b, m);
2430
+ const g = await d.clone().text(), u = d.headers.get("content-type") || void 0;
2431
+ p = q(g, u);
2363
2432
  } catch {
2364
2433
  }
2365
- return (p || e.verbose) && e.emit({
2434
+ return (m || e.verbose) && e.emit({
2366
2435
  kind: "fetch",
2367
- url: G(s, X),
2436
+ url: G(s, K),
2368
2437
  method: i,
2369
2438
  status: d.status,
2370
2439
  durationMs: l,
2371
- failed: p,
2440
+ failed: m,
2372
2441
  ...c ? { request: c } : {},
2373
- ...f ? { response: f } : {}
2442
+ ...p ? { response: p } : {}
2374
2443
  }), d;
2375
2444
  } catch (d) {
2376
- const l = Math.round(performance.now() - a);
2445
+ const l = Math.round(performance.now() - r);
2377
2446
  throw e.emit({
2378
2447
  kind: "fetch",
2379
- url: G(s, X),
2448
+ url: G(s, K),
2380
2449
  method: i,
2381
2450
  status: 0,
2382
2451
  durationMs: l,
@@ -2390,7 +2459,7 @@ function Tn(e) {
2390
2459
  window.fetch.__lsBeaconWrapped && (window.fetch = t);
2391
2460
  };
2392
2461
  }
2393
- function Mn(e) {
2462
+ function Pn(e) {
2394
2463
  if (e == null) return null;
2395
2464
  if (typeof e == "string") return e;
2396
2465
  if (e instanceof URLSearchParams) return e.toString();
@@ -2402,88 +2471,88 @@ function Mn(e) {
2402
2471
  }
2403
2472
  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;
2404
2473
  }
2405
- function In(e) {
2406
- const t = XMLHttpRequest.prototype, n = t.open, o = t.send, r = t.setRequestHeader, a = /* @__PURE__ */ new WeakMap();
2474
+ function _n(e) {
2475
+ const t = XMLHttpRequest.prototype, n = t.open, o = t.send, a = t.setRequestHeader, r = /* @__PURE__ */ new WeakMap();
2407
2476
  return t.open = function(s, c, ...d) {
2408
- return a.set(this, {
2477
+ return r.set(this, {
2409
2478
  method: s.toUpperCase(),
2410
2479
  url: typeof c == "string" ? c : c.toString(),
2411
2480
  start: 0,
2412
2481
  hasAuth: !1
2413
2482
  }), n.call(this, s, c, ...d);
2414
2483
  }, t.setRequestHeader = function(s, c) {
2415
- const d = a.get(this);
2484
+ const d = r.get(this);
2416
2485
  if (d) {
2417
2486
  const l = s.toLowerCase();
2418
2487
  l === "authorization" ? d.hasAuth = !0 : l === "content-type" && (d.requestContentType = c);
2419
2488
  }
2420
- return r.call(this, s, c);
2489
+ return a.call(this, s, c);
2421
2490
  }, t.send = function(s) {
2422
- const c = a.get(this);
2491
+ const c = r.get(this);
2423
2492
  if (c)
2424
- if (c.start = performance.now(), De.has(c.method)) {
2425
- const l = Mn(s);
2426
- l != null ? c.request = U(l, c.requestContentType) : c.request = {}, c.hasAuth && (c.request.hasAuth = !0);
2493
+ if (c.start = performance.now(), $e.has(c.method)) {
2494
+ const l = Pn(s);
2495
+ l != null ? c.request = q(l, c.requestContentType) : c.request = {}, c.hasAuth && (c.request.hasAuth = !0);
2427
2496
  } else c.hasAuth && (c.request = { hasAuth: !0 });
2428
2497
  const d = () => {
2429
2498
  this.removeEventListener("loadend", d);
2430
- const l = a.get(this);
2499
+ const l = r.get(this);
2431
2500
  if (!l) return;
2432
- const p = Math.round(performance.now() - l.start), f = this.status === 0 || this.status >= 400;
2433
- let b;
2434
- if ((f || e.verbose) && this.status > 0)
2501
+ const m = Math.round(performance.now() - l.start), p = this.status === 0 || this.status >= 400;
2502
+ let g;
2503
+ if ((p || e.verbose) && this.status > 0)
2435
2504
  try {
2436
- const m = this.responseType === "" || this.responseType === "text" ? this.responseText : "";
2437
- if (m) {
2438
- const x = this.getResponseHeader("content-type") || void 0;
2439
- b = U(m, x);
2505
+ const u = this.responseType === "" || this.responseType === "text" ? this.responseText : "";
2506
+ if (u) {
2507
+ const v = this.getResponseHeader("content-type") || void 0;
2508
+ g = q(u, v);
2440
2509
  }
2441
2510
  } catch {
2442
2511
  }
2443
- (f || e.verbose) && e.emit({
2512
+ (p || e.verbose) && e.emit({
2444
2513
  kind: "xhr",
2445
- url: G(l.url, X),
2514
+ url: G(l.url, K),
2446
2515
  method: l.method,
2447
2516
  status: this.status,
2448
- durationMs: p,
2449
- failed: f,
2517
+ durationMs: m,
2518
+ failed: p,
2450
2519
  ...l.request ? { request: l.request } : {},
2451
- ...b ? { response: b } : {}
2452
- }), a.delete(this);
2520
+ ...g ? { response: g } : {}
2521
+ }), r.delete(this);
2453
2522
  };
2454
2523
  return this.addEventListener("loadend", d), o.call(this, s);
2455
2524
  }, () => {
2456
- t.open = n, t.send = o, t.setRequestHeader = r;
2525
+ t.open = n, t.send = o, t.setRequestHeader = a;
2457
2526
  };
2458
2527
  }
2459
- function Rn(e) {
2460
- const t = Tn(e), n = In(e);
2528
+ function Dn(e) {
2529
+ const t = Rn(e), n = _n(e);
2461
2530
  return {
2462
2531
  uninstall() {
2463
2532
  t(), n();
2464
2533
  }
2465
2534
  };
2466
2535
  }
2467
- const _n = 1e3, Se = 50, Pn = 500;
2468
- class Dn {
2536
+ const $n = 1e3, Ce = 50, Bn = 500;
2537
+ class zn {
2469
2538
  constructor(t) {
2470
2539
  this.buffer = [], this.inflight = !1, this.timer = null, this.destroyed = !1, this.handleVisibilityChange = () => {
2471
2540
  document.visibilityState === "hidden" && this.flushSync();
2472
2541
  }, this.url = t.url, this.sessionId = t.sessionId, this.onError = t.onError, this.timer = setInterval(() => {
2473
2542
  this.flush();
2474
- }, _n), this.pagehideHandler = () => this.flushSync(), window.addEventListener("pagehide", this.pagehideHandler), document.addEventListener("visibilitychange", this.handleVisibilityChange);
2543
+ }, $n), this.pagehideHandler = () => this.flushSync(), window.addEventListener("pagehide", this.pagehideHandler), document.addEventListener("visibilitychange", this.handleVisibilityChange);
2475
2544
  }
2476
2545
  enqueue(t) {
2477
- this.destroyed || (this.buffer.push(t), this.buffer.length > Pn && this.buffer.shift(), this.buffer.length >= Se && this.flush());
2546
+ this.destroyed || (this.buffer.push(t), this.buffer.length > Bn && this.buffer.shift(), this.buffer.length >= Ce && this.flush());
2478
2547
  }
2479
2548
  /** Async flush via fetch. No-op when in-flight or empty. */
2480
2549
  async flush() {
2481
- var o, r;
2550
+ var o, a;
2482
2551
  if (this.destroyed || this.inflight || this.buffer.length === 0) return;
2483
- const t = this.buffer.splice(0, Se), n = this.makeBatch(t);
2552
+ const t = this.buffer.splice(0, Ce), n = this.makeBatch(t);
2484
2553
  this.inflight = !0;
2485
2554
  try {
2486
- const a = await fetch(this.url, {
2555
+ const r = await fetch(this.url, {
2487
2556
  method: "POST",
2488
2557
  // credentials:'omit' — going to the dev's local server, not the app
2489
2558
  // backend; avoid leaking session cookies cross-origin.
@@ -2494,9 +2563,9 @@ class Dn {
2494
2563
  // pagehide didn't fire (e.g. a window.location.assign from script).
2495
2564
  keepalive: !0
2496
2565
  });
2497
- a.ok || (o = this.onError) == null || o.call(this, new Error(`monitor flush: HTTP ${a.status}`));
2498
- } catch (a) {
2499
- (r = this.onError) == null || r.call(this, a instanceof Error ? a : new Error(String(a)));
2566
+ r.ok || (o = this.onError) == null || o.call(this, new Error(`monitor flush: HTTP ${r.status}`));
2567
+ } catch (r) {
2568
+ (a = this.onError) == null || a.call(this, r instanceof Error ? r : new Error(String(r)));
2500
2569
  } finally {
2501
2570
  this.inflight = !1;
2502
2571
  }
@@ -2534,26 +2603,26 @@ class Dn {
2534
2603
  };
2535
2604
  }
2536
2605
  }
2537
- const te = "__lsBeaconMonitorUrl", Be = "__lsBeaconMonitorSession", ne = "__lsBeaconMonitorVerbose", oe = "__lsBeaconMonitorDeadline", ze = 30 * 6e4, Ce = 4096;
2538
- let E = null;
2606
+ const te = "__lsBeaconMonitorUrl", ze = "__lsBeaconMonitorSession", ne = "__lsBeaconMonitorVerbose", oe = "__lsBeaconMonitorDeadline", Oe = 30 * 6e4, ke = 4096;
2607
+ let x = null;
2539
2608
  const Z = /* @__PURE__ */ new Set();
2540
- function $n() {
2609
+ function On() {
2541
2610
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID().slice(0, 8) : Math.random().toString(36).slice(2, 10);
2542
2611
  }
2543
- function Bn(e) {
2612
+ function Hn(e) {
2544
2613
  const t = /* @__PURE__ */ new WeakSet(), n = (o) => {
2545
2614
  if (o === null || typeof o != "object")
2546
- return typeof o == "string" && o.length > Ce ? o.slice(0, Ce) : o;
2615
+ return typeof o == "string" && o.length > ke ? o.slice(0, ke) : o;
2547
2616
  if (t.has(o)) return "[cyclic]";
2548
2617
  if (t.add(o), Array.isArray(o)) return o.map(n);
2549
- const r = {};
2550
- for (const a of Object.keys(o).slice(0, 50))
2618
+ const a = {};
2619
+ for (const r of Object.keys(o).slice(0, 50))
2551
2620
  try {
2552
- r[a] = n(o[a]);
2621
+ a[r] = n(o[r]);
2553
2622
  } catch {
2554
- r[a] = "[unreadable]";
2623
+ a[r] = "[unreadable]";
2555
2624
  }
2556
- return r;
2625
+ return a;
2557
2626
  };
2558
2627
  try {
2559
2628
  return n(e);
@@ -2564,16 +2633,16 @@ function Bn(e) {
2564
2633
  function re() {
2565
2634
  for (const e of Z)
2566
2635
  try {
2567
- e(E !== null, (E == null ? void 0 : E.url) ?? null);
2636
+ e(x !== null, (x == null ? void 0 : x.url) ?? null);
2568
2637
  } catch {
2569
2638
  }
2570
2639
  }
2571
- function zn(e) {
2572
- return E ? (E.seq += 1, {
2640
+ function Un(e) {
2641
+ return x ? (x.seq += 1, {
2573
2642
  ...e,
2574
2643
  ts: Date.now(),
2575
- sessionId: E.sessionId,
2576
- seq: E.seq
2644
+ sessionId: x.sessionId,
2645
+ seq: x.seq
2577
2646
  }) : {
2578
2647
  ...e,
2579
2648
  ts: Date.now(),
@@ -2581,40 +2650,40 @@ function zn(e) {
2581
2650
  seq: 0
2582
2651
  };
2583
2652
  }
2584
- function M(e) {
2585
- if (!E) return;
2586
- const t = zn(e);
2587
- E.transport.enqueue(t);
2653
+ function P(e) {
2654
+ if (!x) return;
2655
+ const t = Un(e);
2656
+ x.transport.enqueue(t);
2588
2657
  }
2589
- function On() {
2590
- if (E)
2658
+ function qn() {
2659
+ if (x)
2591
2660
  try {
2592
- sessionStorage.setItem(te, E.url), sessionStorage.setItem(Be, E.sessionId), sessionStorage.setItem(ne, E.verbose ? "1" : "0"), sessionStorage.setItem(oe, String(E.deadlineMs));
2661
+ sessionStorage.setItem(te, x.url), sessionStorage.setItem(ze, x.sessionId), sessionStorage.setItem(ne, x.verbose ? "1" : "0"), sessionStorage.setItem(oe, String(x.deadlineMs));
2593
2662
  } catch {
2594
2663
  }
2595
2664
  }
2596
- function Oe() {
2665
+ function He() {
2597
2666
  try {
2598
- sessionStorage.removeItem(te), sessionStorage.removeItem(Be), sessionStorage.removeItem(ne), sessionStorage.removeItem(oe);
2667
+ sessionStorage.removeItem(te), sessionStorage.removeItem(ze), sessionStorage.removeItem(ne), sessionStorage.removeItem(oe);
2599
2668
  } catch {
2600
2669
  }
2601
2670
  }
2602
- function Hn() {
2671
+ function Fn() {
2603
2672
  try {
2604
2673
  const e = sessionStorage.getItem(te);
2605
2674
  if (!e) return null;
2606
- const t = sessionStorage.getItem(ne) === "1", n = sessionStorage.getItem(oe), o = n ? Number(n) : Date.now() + ze;
2607
- return Number.isFinite(o) && o <= Date.now() ? (Oe(), null) : { url: e, verbose: t, deadlineMs: o };
2675
+ const t = sessionStorage.getItem(ne) === "1", n = sessionStorage.getItem(oe), o = n ? Number(n) : Date.now() + Oe;
2676
+ return Number.isFinite(o) && o <= Date.now() ? (He(), null) : { url: e, verbose: t, deadlineMs: o };
2608
2677
  } catch {
2609
2678
  return null;
2610
2679
  }
2611
2680
  }
2612
- function ke(e) {
2613
- E && (E.seq += 1, E.transport.enqueue({
2681
+ function Ae(e) {
2682
+ x && (x.seq += 1, x.transport.enqueue({
2614
2683
  kind: e.kind,
2615
2684
  ts: e.ts,
2616
- sessionId: E.sessionId,
2617
- seq: E.seq,
2685
+ sessionId: x.sessionId,
2686
+ seq: x.seq,
2618
2687
  message: e.message,
2619
2688
  ...e.stack ? { stack: e.stack } : {},
2620
2689
  ...e.source ? { source: e.source } : {},
@@ -2622,102 +2691,102 @@ function ke(e) {
2622
2691
  ...typeof e.col == "number" ? { col: e.col } : {}
2623
2692
  }));
2624
2693
  }
2625
- function He(e) {
2626
- if (E && F(), !e.url) return;
2627
- const t = e.maxSessionMs ?? ze, n = Date.now() + t, o = $n(), r = !!e.verbose, a = new Dn({
2694
+ function Ue(e) {
2695
+ if (x && F(), !e.url) return;
2696
+ const t = e.maxSessionMs ?? Oe, n = Date.now() + t, o = On(), a = !!e.verbose, r = new zn({
2628
2697
  url: e.url,
2629
2698
  sessionId: o,
2630
- onError: (m) => {
2631
- console.warn("[launch-kit-beacon] monitor transport error:", m.message);
2699
+ onError: (u) => {
2700
+ console.warn("[launch-kit-beacon] monitor transport error:", u.message);
2632
2701
  }
2633
- }), i = Ie(), s = i.install(), c = i.snapshot();
2634
- for (const m of c) ke(m);
2702
+ }), i = Re(), s = i.install(), c = i.snapshot();
2703
+ for (const u of c) Ae(u);
2635
2704
  let d = c.length;
2636
2705
  const l = i.subscribe(() => {
2637
- if (!E) return;
2638
- const m = E.errorsBuffer.snapshot();
2639
- for (; E.drainedThrough < m.length; ) {
2640
- const x = m[E.drainedThrough];
2641
- x && ke(x), E.drainedThrough += 1;
2642
- }
2643
- }), p = Rn({
2644
- emit: (m) => M(m),
2645
- verbose: r
2646
- }), f = En({
2647
- emitClick: (m) => M(m),
2648
- emitRoute: (m) => M(m),
2649
- emitDialog: (m) => M(m),
2650
- emitSubmit: (m) => M(m)
2651
- }), b = setTimeout(() => {
2706
+ if (!x) return;
2707
+ const u = x.errorsBuffer.snapshot();
2708
+ for (; x.drainedThrough < u.length; ) {
2709
+ const v = u[x.drainedThrough];
2710
+ v && Ae(v), x.drainedThrough += 1;
2711
+ }
2712
+ }), m = Dn({
2713
+ emit: (u) => P(u),
2714
+ verbose: a
2715
+ }), p = kn({
2716
+ emitClick: (u) => P(u),
2717
+ emitRoute: (u) => P(u),
2718
+ emitDialog: (u) => P(u),
2719
+ emitSubmit: (u) => P(u)
2720
+ }), g = setTimeout(() => {
2652
2721
  console.info("[launch-kit-beacon] monitor session expired (max duration reached)"), F();
2653
2722
  }, Math.max(0, n - Date.now()));
2654
- E = {
2723
+ x = {
2655
2724
  url: e.url,
2656
2725
  sessionId: o,
2657
- verbose: r,
2726
+ verbose: a,
2658
2727
  deadlineMs: n,
2659
2728
  seq: 0,
2660
- transport: a,
2729
+ transport: r,
2661
2730
  errorsBuffer: i,
2662
- uninstallNetwork: p.uninstall,
2663
- uninstallDom: f.uninstall,
2731
+ uninstallNetwork: m.uninstall,
2732
+ uninstallDom: p.uninstall,
2664
2733
  uninstallErrors: s,
2665
2734
  errorsUnsub: l,
2666
- deadlineTimer: b,
2735
+ deadlineTimer: g,
2667
2736
  drainedThrough: d
2668
- }, On(), re();
2737
+ }, qn(), re();
2669
2738
  }
2670
2739
  function F() {
2671
- qe(), Oe(), re();
2740
+ qe(), He(), re();
2672
2741
  }
2673
- function qn() {
2674
- E && (qe(), re());
2742
+ function jn() {
2743
+ x && (qe(), re());
2675
2744
  }
2676
2745
  function qe() {
2677
- E && (clearTimeout(E.deadlineTimer), E.errorsUnsub(), E.uninstallErrors(), E.uninstallNetwork(), E.uninstallDom(), E.transport.destroy(), E = null);
2746
+ x && (clearTimeout(x.deadlineTimer), x.errorsUnsub(), x.uninstallErrors(), x.uninstallNetwork(), x.uninstallDom(), x.transport.destroy(), x = null);
2678
2747
  }
2679
- function Qn(e, t) {
2680
- E && M({
2748
+ function no(e, t) {
2749
+ x && P({
2681
2750
  kind: "probe",
2682
2751
  label: e.slice(0, 200),
2683
- data: Bn(t)
2752
+ data: Hn(t)
2684
2753
  });
2685
2754
  }
2686
- function Ae() {
2687
- return E !== null;
2688
- }
2689
2755
  function Le() {
2690
- return (E == null ? void 0 : E.url) ?? null;
2756
+ return x !== null;
2757
+ }
2758
+ function Te() {
2759
+ return (x == null ? void 0 : x.url) ?? null;
2691
2760
  }
2692
2761
  function Ne(e) {
2693
2762
  return Z.add(e), () => {
2694
2763
  Z.delete(e);
2695
2764
  };
2696
2765
  }
2697
- function Un() {
2698
- if (E || typeof window > "u") return;
2699
- const e = Hn();
2700
- e && He({
2766
+ function Vn() {
2767
+ if (x || typeof window > "u") return;
2768
+ const e = Fn();
2769
+ e && Ue({
2701
2770
  url: e.url,
2702
2771
  verbose: e.verbose,
2703
2772
  maxSessionMs: Math.max(6e4, e.deadlineMs - Date.now())
2704
2773
  });
2705
2774
  }
2706
- function eo(e = {}) {
2707
- let t = null, n = null, o = "", r = null;
2708
- function a() {
2709
- r || (r = un({
2775
+ function oo(e = {}) {
2776
+ let t = null, n = null, o = "", a = null;
2777
+ function r() {
2778
+ a || (a = mn({
2710
2779
  onStop: () => F(),
2711
- url: Le()
2780
+ url: Te()
2712
2781
  }));
2713
2782
  }
2714
2783
  function i() {
2715
- if (r) {
2784
+ if (a) {
2716
2785
  try {
2717
- r.destroy();
2786
+ a.destroy();
2718
2787
  } catch {
2719
2788
  }
2720
- r = null;
2789
+ a = null;
2721
2790
  }
2722
2791
  }
2723
2792
  function s() {
@@ -2725,31 +2794,31 @@ function eo(e = {}) {
2725
2794
  t.innerHTML = "";
2726
2795
  const l = document.createElement("div");
2727
2796
  l.className = "beacon-monitor-title", l.textContent = "Monitor — paste a stream URL", t.appendChild(l);
2728
- const p = document.createElement("div");
2729
- p.className = "beacon-monitor-row";
2730
- const f = document.createElement("input");
2731
- 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);
2732
- const b = document.createElement("button");
2733
- b.type = "button", b.className = "beacon-monitor-btn", b.textContent = "Start", b.disabled = !o.trim(), p.appendChild(b), t.appendChild(p);
2734
- const m = document.createElement("label");
2735
- m.className = "beacon-monitor-verbose";
2736
- const x = document.createElement("input");
2737
- x.type = "checkbox", x.dataset.role = "verbose", m.appendChild(x), m.appendChild(document.createTextNode(" verbose (capture successful network too)")), t.appendChild(m);
2738
- const g = document.createElement("div");
2739
- g.className = "beacon-monitor-help", g.textContent = "Streams clicks, failed network, errors, route + dialog changes.", t.appendChild(g), f.addEventListener("input", () => {
2740
- o = f.value, b.disabled = !f.value.trim();
2741
- }), b.addEventListener("click", () => {
2742
- const u = f.value.trim();
2743
- if (u) {
2797
+ const m = document.createElement("div");
2798
+ m.className = "beacon-monitor-row";
2799
+ const p = document.createElement("input");
2800
+ p.type = "url", p.className = "beacon-monitor-input", p.placeholder = "http://localhost:9876/m/…", p.value = o, p.autocomplete = "off", p.spellcheck = !1, m.appendChild(p);
2801
+ const g = document.createElement("button");
2802
+ g.type = "button", g.className = "beacon-monitor-btn", g.textContent = "Start", g.disabled = !o.trim(), m.appendChild(g), t.appendChild(m);
2803
+ const u = document.createElement("label");
2804
+ u.className = "beacon-monitor-verbose";
2805
+ const v = document.createElement("input");
2806
+ v.type = "checkbox", v.dataset.role = "verbose", u.appendChild(v), u.appendChild(document.createTextNode(" verbose (capture successful network too)")), t.appendChild(u);
2807
+ const E = document.createElement("div");
2808
+ E.className = "beacon-monitor-help", E.textContent = "Streams clicks, failed network, errors, route + dialog changes.", t.appendChild(E), p.addEventListener("input", () => {
2809
+ o = p.value, g.disabled = !p.value.trim();
2810
+ }), g.addEventListener("click", () => {
2811
+ const b = p.value.trim();
2812
+ if (b) {
2744
2813
  try {
2745
- new URL(u);
2814
+ new URL(b);
2746
2815
  } catch {
2747
- f.setCustomValidity("Enter a valid URL (e.g. http://localhost:9876/m/abc)"), f.reportValidity();
2816
+ p.setCustomValidity("Enter a valid URL (e.g. http://localhost:9876/m/abc)"), p.reportValidity();
2748
2817
  return;
2749
2818
  }
2750
- f.setCustomValidity(""), He({
2751
- url: u,
2752
- verbose: x.checked,
2819
+ p.setCustomValidity(""), Ue({
2820
+ url: b,
2821
+ verbose: v.checked,
2753
2822
  ...e.maxSessionMs !== void 0 ? { maxSessionMs: e.maxSessionMs } : {}
2754
2823
  });
2755
2824
  }
@@ -2758,36 +2827,36 @@ function eo(e = {}) {
2758
2827
  function c() {
2759
2828
  if (!t) return;
2760
2829
  t.innerHTML = "";
2761
- const l = Le() ?? "", p = document.createElement("div");
2762
- p.className = "beacon-monitor-title";
2763
- const f = document.createElement("span");
2764
- f.className = "beacon-monitor-rec", f.setAttribute("aria-hidden", "true"), p.appendChild(f), p.appendChild(document.createTextNode(" Monitor — recording")), t.appendChild(p);
2765
- const b = document.createElement("div");
2766
- b.className = "beacon-monitor-active-url", b.title = l, b.textContent = l, t.appendChild(b);
2767
- const m = document.createElement("div");
2768
- m.className = "beacon-monitor-row";
2769
- const x = document.createElement("button");
2770
- x.type = "button", x.className = "beacon-monitor-btn stop", x.textContent = "Stop monitoring", x.addEventListener("click", () => F()), m.appendChild(x), t.appendChild(m);
2830
+ const l = Te() ?? "", m = document.createElement("div");
2831
+ m.className = "beacon-monitor-title";
2832
+ const p = document.createElement("span");
2833
+ p.className = "beacon-monitor-rec", p.setAttribute("aria-hidden", "true"), m.appendChild(p), m.appendChild(document.createTextNode(" Monitor — recording")), t.appendChild(m);
2771
2834
  const g = document.createElement("div");
2772
- g.className = "beacon-monitor-help", g.textContent = "Events stream to the URL above. Auto-stops after 30 min.", t.appendChild(g);
2835
+ g.className = "beacon-monitor-active-url", g.title = l, g.textContent = l, t.appendChild(g);
2836
+ const u = document.createElement("div");
2837
+ u.className = "beacon-monitor-row";
2838
+ const v = document.createElement("button");
2839
+ v.type = "button", v.className = "beacon-monitor-btn stop", v.textContent = "Stop monitoring", v.addEventListener("click", () => F()), u.appendChild(v), t.appendChild(u);
2840
+ const E = document.createElement("div");
2841
+ E.className = "beacon-monitor-help", E.textContent = "Events stream to the URL above. Auto-stops after 30 min.", t.appendChild(E);
2773
2842
  }
2774
2843
  function d() {
2775
- Ae() ? c() : s();
2844
+ Le() ? c() : s();
2776
2845
  }
2777
2846
  return {
2778
2847
  name: "liveMonitor",
2779
2848
  setupOnce(l) {
2780
- Un(), Ae() && a();
2781
- const p = Ne((b, m) => {
2782
- b ? (a(), r == null || r.updateUrl(m)) : i();
2783
- }), f = () => {
2784
- i(), p();
2849
+ Vn(), Le() && r();
2850
+ const m = Ne((g, u) => {
2851
+ g ? (r(), a == null || a.updateUrl(u)) : i();
2852
+ }), p = () => {
2853
+ i(), m();
2785
2854
  try {
2786
- qn();
2855
+ jn();
2787
2856
  } catch {
2788
2857
  }
2789
2858
  };
2790
- l.signal.addEventListener("abort", f, { once: !0 });
2859
+ l.signal.addEventListener("abort", p, { once: !0 });
2791
2860
  },
2792
2861
  form() {
2793
2862
  return {
@@ -2799,38 +2868,38 @@ function eo(e = {}) {
2799
2868
  // No capture(): liveMonitor is a side-channel, not a feedback payload contributor.
2800
2869
  };
2801
2870
  }
2802
- let A = null;
2871
+ let T = null;
2803
2872
  const ae = {
2804
2873
  "plugin:error": /* @__PURE__ */ new Set(),
2805
2874
  "submit:success": /* @__PURE__ */ new Set(),
2806
2875
  "submit:error": /* @__PURE__ */ new Set(),
2807
2876
  ready: /* @__PURE__ */ new Set()
2808
2877
  };
2809
- function to(e) {
2878
+ function ro(e) {
2810
2879
  if (typeof window > "u") return;
2811
2880
  if (!e.endpoint) throw new Error("init: endpoint is required");
2812
- Me(), jn();
2813
- const t = { ...ct(), ...e.labels ?? {} }, n = new AbortController(), o = Yn(e), r = e.position ?? "bottom-right", a = e.theme ?? "auto";
2814
- Ye(), Wn(e, r, a);
2815
- const i = document.querySelector(B);
2881
+ Ie(), Yn();
2882
+ const t = { ...lt(), ...e.labels ?? {} }, n = new AbortController(), o = Gn(e), a = e.position ?? "bottom-right", r = e.theme ?? "auto";
2883
+ Xe(), Kn(e, a, r);
2884
+ const i = document.querySelector(z);
2816
2885
  if (!i)
2817
2886
  throw new Error("init: failed to acquire <launch-kit-beacon> host");
2818
2887
  if (!i.shadow)
2819
2888
  throw new Error("init: host element shadow root not initialized");
2820
- const s = lt(i.shadow), c = new st(
2889
+ const s = dt(i.shadow), c = new ct(
2821
2890
  t,
2822
2891
  ["bug", "idea", "ux", "a11y"],
2823
2892
  {
2824
2893
  onSubmit: () => {
2825
- Gn();
2894
+ Qn();
2826
2895
  },
2827
- onClose: (p) => {
2828
- j("close", {}), p === "user" && Fe();
2896
+ onClose: (m) => {
2897
+ j("close", {}), m === "user" && je();
2829
2898
  }
2830
2899
  }
2831
2900
  );
2832
2901
  i.shadow.appendChild(c.root), i.classList.add("beacon-no-capture");
2833
- const d = Qe(o), l = {
2902
+ const d = et(o), l = {
2834
2903
  endpoint: e.endpoint,
2835
2904
  headers: e.headers,
2836
2905
  context: e.context,
@@ -2842,10 +2911,10 @@ function to(e) {
2842
2911
  hostElement: i,
2843
2912
  initAbort: n,
2844
2913
  labels: t,
2845
- debug: !!e.debug || Xn(),
2914
+ debug: !!e.debug || Zn(),
2846
2915
  healthIndicator: e.healthIndicator ?? "never",
2847
- position: r,
2848
- theme: a,
2916
+ position: a,
2917
+ theme: r,
2849
2918
  currentSubmit: null,
2850
2919
  capturedEntries: {},
2851
2920
  formValues: {},
@@ -2857,23 +2926,23 @@ function to(e) {
2857
2926
  },
2858
2927
  panelSources: []
2859
2928
  };
2860
- A = l, i.onTriggerClick = () => Fn(), d.install(
2861
- (p) => Ue(p),
2862
- (p) => ie(p)
2863
- ), $("ready", { ready: !0 }), l.debug && console.info("[beacon] ready", l.endpoint);
2929
+ T = l, i.onTriggerClick = () => Wn(), d.install(
2930
+ (m) => Fe(m),
2931
+ (m) => ie(m)
2932
+ ), B("ready", { ready: !0 }), l.debug && console.info("[beacon] ready", l.endpoint);
2864
2933
  }
2865
- function Fn() {
2866
- const e = A;
2934
+ function Wn() {
2935
+ const e = T;
2867
2936
  e && (e.currentSubmit || (e.panelSources = e.plugins.map((t) => {
2868
2937
  if (!t.form) return null;
2869
- const n = Ue(t.name);
2938
+ const n = Fe(t.name);
2870
2939
  let o;
2871
2940
  try {
2872
2941
  o = t.form(n);
2873
- } catch (r) {
2942
+ } catch (a) {
2874
2943
  return ie({
2875
2944
  plugin: t.name,
2876
- error: r instanceof Error ? r : new Error(String(r)),
2945
+ error: a instanceof Error ? a : new Error(String(a)),
2877
2946
  at: "form"
2878
2947
  }), null;
2879
2948
  }
@@ -2884,57 +2953,57 @@ function Fn() {
2884
2953
  return (o = e.formValues[t]) == null ? void 0 : o[n];
2885
2954
  },
2886
2955
  set: (t, n, o) => {
2887
- var a;
2888
- const r = (a = e.formValues)[t] ?? (a[t] = {});
2889
- r[n] = o;
2956
+ var r;
2957
+ const a = (r = e.formValues)[t] ?? (r[t] = {});
2958
+ a[n] = o;
2890
2959
  }
2891
2960
  }), e.dialog.open(), j("open", {})));
2892
2961
  }
2893
- function no() {
2894
- const e = A;
2962
+ function ao() {
2963
+ const e = T;
2895
2964
  e && e.dialog.close("user");
2896
2965
  }
2897
- function jn() {
2966
+ function Yn() {
2898
2967
  var t;
2899
- const e = A;
2968
+ const e = T;
2900
2969
  if (e) {
2901
- e.initAbort.abort(), (t = e.currentSubmit) == null || t.abort(), e.registry.destroy(), D();
2970
+ e.initAbort.abort(), (t = e.currentSubmit) == null || t.abort(), e.registry.destroy(), R();
2902
2971
  try {
2903
2972
  e.dialog.root.remove(), e.overlayHost.layer.remove();
2904
2973
  } catch {
2905
2974
  }
2906
- e.hostElement.onTriggerClick = null, A = null;
2975
+ e.hostElement.onTriggerClick = null, T = null;
2907
2976
  }
2908
2977
  }
2909
- function oo() {
2910
- const e = A;
2978
+ function io() {
2979
+ const e = T;
2911
2980
  return e ? {
2912
2981
  ready: !0,
2913
2982
  transport: "idle",
2914
2983
  plugins: e.registry.status()
2915
2984
  } : { ready: !1, transport: "idle", plugins: {} };
2916
2985
  }
2917
- function ro(e, t) {
2918
- return ae[e].add(t), () => Vn(e, t);
2986
+ function so(e, t) {
2987
+ return ae[e].add(t), () => Xn(e, t);
2919
2988
  }
2920
- function Vn(e, t) {
2989
+ function Xn(e, t) {
2921
2990
  ae[e].delete(t);
2922
2991
  }
2923
- function Wn(e, t, n) {
2924
- let o = document.querySelector(B);
2992
+ function Kn(e, t, n) {
2993
+ let o = document.querySelector(z);
2925
2994
  if (!o) {
2926
- o = document.createElement(B), o.setAttribute("position", t), o.setAttribute("theme", n), t === "hidden" && (o.style.position = "absolute", o.style.left = "-9999px"), (document.body ?? document.documentElement).appendChild(o);
2995
+ o = document.createElement(z), o.setAttribute("position", t), o.setAttribute("theme", n), t === "hidden" && (o.style.position = "absolute", o.style.left = "-9999px"), (document.body ?? document.documentElement).appendChild(o);
2927
2996
  return;
2928
2997
  }
2929
2998
  e.position !== void 0 && o.setAttribute("position", t), e.theme !== void 0 && o.setAttribute("theme", n);
2930
2999
  }
2931
- function Yn(e) {
2932
- return e.plugins ? e.plugins : e.defaultPlugins === !1 ? [] : Kn();
3000
+ function Gn(e) {
3001
+ return e.plugins ? e.plugins : e.defaultPlugins === !1 ? [] : Jn();
2933
3002
  }
2934
- function Kn() {
2935
- return [pt(), xt(), rn(), sn()];
3003
+ function Jn() {
3004
+ return [ft(), wt(), cn(), dn()];
2936
3005
  }
2937
- function Xn() {
3006
+ function Zn() {
2938
3007
  if (typeof window > "u") return !1;
2939
3008
  try {
2940
3009
  return new URLSearchParams(window.location.search).has("lsbeacon-debug");
@@ -2942,13 +3011,13 @@ function Xn() {
2942
3011
  return !1;
2943
3012
  }
2944
3013
  }
2945
- function Ue(e) {
2946
- const t = A;
2947
- return Je(e, {
3014
+ function Fe(e) {
3015
+ const t = T;
3016
+ return Ze(e, {
2948
3017
  getCaptured: (o) => t == null ? void 0 : t.capturedEntries[o],
2949
3018
  getFormValues: (o) => {
2950
- var r;
2951
- return t ? (r = t.formValues)[o] ?? (r[o] = {}) : {};
3019
+ var a;
3020
+ return t ? (a = t.formValues)[o] ?? (a[o] = {}) : {};
2952
3021
  },
2953
3022
  getCaptureSignal: () => {
2954
3023
  var o;
@@ -2957,45 +3026,45 @@ function Ue(e) {
2957
3026
  getInitSignal: () => t.initAbort.signal,
2958
3027
  requestMode: async (o) => t ? t.dialog.requestMode(o) : () => {
2959
3028
  },
2960
- overlay: (o) => t ? dt(t.overlayHost, o.render) : () => {
3029
+ overlay: (o) => t ? ut(t.overlayHost, o.render) : () => {
2961
3030
  },
2962
- onLifecycle: (o, r) => {
3031
+ onLifecycle: (o, a) => {
2963
3032
  if (!t) return () => {
2964
3033
  };
2965
- const a = t.lifecycleHandlers[o];
2966
- return a.add(r), () => a.delete(r);
3034
+ const r = t.lifecycleHandlers[o];
3035
+ return r.add(a), () => r.delete(a);
2967
3036
  }
2968
3037
  });
2969
3038
  }
2970
3039
  function j(e, t) {
2971
- const n = A;
3040
+ const n = T;
2972
3041
  if (n)
2973
3042
  for (const o of n.lifecycleHandlers[e])
2974
3043
  try {
2975
3044
  o(t);
2976
- } catch (r) {
2977
- n.debug && console.error("[beacon] lifecycle handler threw:", r);
3045
+ } catch (a) {
3046
+ n.debug && console.error("[beacon] lifecycle handler threw:", a);
2978
3047
  }
2979
3048
  }
2980
- function $(e, t) {
3049
+ function B(e, t) {
2981
3050
  for (const n of ae[e])
2982
3051
  try {
2983
3052
  n(t);
2984
3053
  } catch (o) {
2985
- A != null && A.debug && console.error("[beacon] system handler threw:", o);
3054
+ T != null && T.debug && console.error("[beacon] system handler threw:", o);
2986
3055
  }
2987
3056
  }
2988
3057
  function ie(e) {
2989
- $("plugin:error", { plugin: e.plugin, error: e.error, at: e.at });
2990
- const t = A;
3058
+ B("plugin:error", { plugin: e.plugin, error: e.error, at: e.at });
3059
+ const t = T;
2991
3060
  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));
2992
3061
  }
2993
- function Fe() {
2994
- const e = A;
3062
+ function je() {
3063
+ const e = T;
2995
3064
  e && (e.dialog.resetState(), e.dialog.clearPluginPanels(), e.formValues = {});
2996
3065
  }
2997
- async function Gn() {
2998
- const e = A;
3066
+ async function Qn() {
3067
+ const e = T;
2999
3068
  if (!e || e.currentSubmit) return;
3000
3069
  const t = e.dialog.getDescription().trim();
3001
3070
  if (!t) {
@@ -3009,45 +3078,45 @@ async function Gn() {
3009
3078
  (s) => e.capturedEntries[s],
3010
3079
  (s) => ie(s)
3011
3080
  );
3012
- e.capturedEntries = o, n = Jn(e, t, o);
3013
- let r = null;
3081
+ e.capturedEntries = o, n = eo(e, t, o);
3082
+ let a = null;
3014
3083
  if (j("beforeSubmit", { payload: n, cancel: (s) => {
3015
- r === null && (r = s);
3016
- } }), r !== null) {
3017
- e.dialog.setSubmitting(!1), e.dialog.setStatus(`Cancelled: ${r}`, "error");
3084
+ a === null && (a = s);
3085
+ } }), a !== null) {
3086
+ e.dialog.setSubmitting(!1), e.dialog.setStatus(`Cancelled: ${a}`, "error");
3018
3087
  return;
3019
3088
  }
3020
3089
  e.dialog.setStatus("Sending…");
3021
- const i = await nt(
3090
+ const i = await ot(
3022
3091
  e.endpoint,
3023
3092
  n,
3024
3093
  e.headers,
3025
3094
  e.currentSubmit.signal,
3026
3095
  e.credentials
3027
3096
  );
3028
- j("afterSubmit", { payload: n, response: i }), e.dialog.setSubmitting(!1), i.ok ? ($("submit:success", { payload: n, response: i }), e.dialog.setSubmitSucceeded(!0), e.dialog.setStatus(e.labels.sentSuccess, "success"), window.setTimeout(() => {
3029
- A === e && e.dialog.close("submitted"), Fe();
3030
- }, 1500)) : ($("submit:error", { payload: n, error: new Error(`HTTP ${i.status}`) }), e.dialog.setStatus(`Failed (${i.status})`, "error"));
3097
+ j("afterSubmit", { payload: n, response: i }), e.dialog.setSubmitting(!1), i.ok ? (B("submit:success", { payload: n, response: i }), e.dialog.setSubmitSucceeded(!0), e.dialog.setStatus(e.labels.sentSuccess, "success"), window.setTimeout(() => {
3098
+ T === e && e.dialog.close("submitted"), je();
3099
+ }, 1500)) : (B("submit:error", { payload: n, error: new Error(`HTTP ${i.status}`) }), e.dialog.setStatus(`Failed (${i.status})`, "error"));
3031
3100
  } catch (o) {
3032
3101
  e.dialog.setSubmitting(!1);
3033
- const r = o instanceof Error ? o : new Error(String(o));
3034
- n && $("submit:error", { payload: n, error: r }), e.dialog.setStatus(`Failed: ${r.message}`, "error");
3102
+ const a = o instanceof Error ? o : new Error(String(o));
3103
+ n && B("submit:error", { payload: n, error: a }), e.dialog.setStatus(`Failed: ${a.message}`, "error");
3035
3104
  } finally {
3036
3105
  e.currentSubmit = null;
3037
3106
  }
3038
3107
  }
3039
- function Jn(e, t, n) {
3040
- var a;
3041
- const o = Zn(), r = (a = e.context) == null ? void 0 : a.call(e);
3108
+ function eo(e, t, n) {
3109
+ var r;
3110
+ const o = to(), a = (r = e.context) == null ? void 0 : r.call(e);
3042
3111
  return {
3043
3112
  description: t,
3044
3113
  severity: e.dialog.getSeverity(),
3045
3114
  metadata: o,
3046
- ...r ? { context: r } : {},
3115
+ ...a ? { context: a } : {},
3047
3116
  plugins: n
3048
3117
  };
3049
3118
  }
3050
- function Zn() {
3119
+ function to() {
3051
3120
  const e = window.location.href, t = document.referrer, n = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
3052
3121
  return {
3053
3122
  url: e,
@@ -3068,25 +3137,25 @@ function Zn() {
3068
3137
  capturedAt: (/* @__PURE__ */ new Date()).toISOString()
3069
3138
  };
3070
3139
  }
3071
- Me();
3140
+ Ie();
3072
3141
  export {
3073
- Le as currentMonitorUrl,
3074
- jn as destroy,
3075
- rn as domEle,
3076
- sn as domSS,
3077
- xt as errors,
3078
- no as hide,
3079
- to as init,
3080
- Ae as isMonitorActive,
3081
- an as isPluginFailure,
3082
- eo as liveMonitor,
3083
- pt as metadata,
3084
- Vn as off,
3085
- ro as on,
3086
- Qn as probe,
3087
- Fn as show,
3088
- He as startMonitor,
3089
- oo as status,
3142
+ Te as currentMonitorUrl,
3143
+ Yn as destroy,
3144
+ cn as domEle,
3145
+ dn as domSS,
3146
+ wt as errors,
3147
+ ao as hide,
3148
+ ro as init,
3149
+ Le as isMonitorActive,
3150
+ ln as isPluginFailure,
3151
+ oo as liveMonitor,
3152
+ ft as metadata,
3153
+ Xn as off,
3154
+ so as on,
3155
+ no as probe,
3156
+ Wn as show,
3157
+ Ue as startMonitor,
3158
+ io as status,
3090
3159
  F as stopMonitor
3091
3160
  };
3092
3161
  //# sourceMappingURL=beacon.mjs.map