@nivaro/react 0.3.117 → 0.3.118

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 (137) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +136 -14
  4. package/dist/index.js +488 -485
  5. package/dist/shared/components/ActivityEntry.js +130 -125
  6. package/dist/shared/components/AgentPresenceChip.js +36 -26
  7. package/dist/shared/components/CellCopyLayer.js +50 -45
  8. package/dist/shared/components/CollectionBrowserView.js +3757 -3695
  9. package/dist/shared/components/FilePreviewLightbox.js +96 -58
  10. package/dist/shared/components/InStep.js +18 -17
  11. package/dist/shared/components/ItemEditForm.js +4220 -4175
  12. package/dist/shared/components/JobsTray.js +8 -8
  13. package/dist/shared/components/LiveNewMatchesPill.js +21 -14
  14. package/dist/shared/components/LiveOffNote.js +3 -2
  15. package/dist/shared/components/LiveRowMark.js +53 -23
  16. package/dist/shared/components/LiveTraceView.js +162 -123
  17. package/dist/shared/components/MyWorkView.js +320 -299
  18. package/dist/shared/components/NotificationBell.js +14 -14
  19. package/dist/shared/components/OverflowRail.js +1 -1
  20. package/dist/shared/components/PageRenderer.js +120 -116
  21. package/dist/shared/components/ProfileView.js +203 -202
  22. package/dist/shared/components/RealtimeStatusBanner.js +31 -29
  23. package/dist/shared/components/RecordDrilldownSheet.js +7 -7
  24. package/dist/shared/components/RecordHoverCard.js +102 -84
  25. package/dist/shared/components/RecordReadView.js +146 -146
  26. package/dist/shared/components/ScreenRefreshButton.js +34 -32
  27. package/dist/shared/components/TipLayer.js +65 -58
  28. package/dist/shared/components/WidgetImageMenu.js +83 -43
  29. package/dist/shared/components/activity/RecordActivityStream.js +175 -173
  30. package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
  31. package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
  32. package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
  33. package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
  34. package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
  35. package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
  36. package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
  37. package/dist/shared/components/collections-directory/page-model.js +72 -67
  38. package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
  39. package/dist/shared/components/integrations/SendStatus.js +65 -59
  40. package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
  41. package/dist/shared/components/integrations/console/SignalCard.js +237 -230
  42. package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
  43. package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +131 -92
  44. package/dist/shared/components/item-edit/CloneDialog.js +191 -161
  45. package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
  46. package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
  47. package/dist/shared/components/item-edit/FieldComments.js +54 -53
  48. package/dist/shared/components/item-edit/FieldPointer.js +82 -67
  49. package/dist/shared/components/item-edit/FieldRow.js +106 -100
  50. package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
  51. package/dist/shared/components/item-edit/FilePickerField.js +452 -387
  52. package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
  53. package/dist/shared/components/item-edit/HeaderTools.js +94 -85
  54. package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
  55. package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
  56. package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
  57. package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
  58. package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
  59. package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
  60. package/dist/shared/components/item-edit/RecalcValue.js +57 -32
  61. package/dist/shared/components/item-edit/RecordHelpChip.js +21 -22
  62. package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
  63. package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
  64. package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
  65. package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
  66. package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
  67. package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
  68. package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
  69. package/dist/shared/components/item-edit/SectionPresence.js +18 -10
  70. package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
  71. package/dist/shared/components/item-edit/UserChip.js +1 -1
  72. package/dist/shared/components/item-edit/file-live.js +69 -54
  73. package/dist/shared/components/item-edit/layout-switch.js +98 -89
  74. package/dist/shared/components/item-edit/partner-needs.js +12 -12
  75. package/dist/shared/components/item-edit/removed-line.js +31 -25
  76. package/dist/shared/components/layout-editor/pickers/field-picker.js +112 -104
  77. package/dist/shared/components/list/ListViewers.js +46 -35
  78. package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
  79. package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
  80. package/dist/shared/components/panels/AlertBanners.js +82 -72
  81. package/dist/shared/components/panels/BranchLanes.js +22 -22
  82. package/dist/shared/components/panels/CommentImages.js +123 -102
  83. package/dist/shared/components/panels/CommentPanel.js +186 -185
  84. package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
  85. package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
  86. package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
  87. package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
  88. package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
  89. package/dist/shared/components/pipeline/PipelineEditorView.js +7 -2
  90. package/dist/shared/components/profile/AgentNameField.js +107 -81
  91. package/dist/shared/components/profile/AgentsPanel.js +184 -184
  92. package/dist/shared/components/profile/PersonAccess.js +599 -495
  93. package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
  94. package/dist/shared/components/profile/SignedInDevices.js +17 -17
  95. package/dist/shared/components/profile/primitives.js +1 -1
  96. package/dist/shared/components/queue/OwnerAvatars.js +91 -54
  97. package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
  98. package/dist/shared/components/queue/QueueWorklist.js +1002 -983
  99. package/dist/shared/components/support/AssignRules.js +1733 -0
  100. package/dist/shared/components/support/PersonPick.js +88 -0
  101. package/dist/shared/components/support/RequestList.js +790 -0
  102. package/dist/shared/components/support/ScreenShare.js +158 -152
  103. package/dist/shared/components/support/SupportRequestDialog.js +50 -48
  104. package/dist/shared/components/support/SupportView.js +140 -246
  105. package/dist/shared/components/support/TicketDetailSheet.js +82 -75
  106. package/dist/shared/components/support/TicketSlowScreens.js +9 -9
  107. package/dist/shared/components/support/assign-rules-text.js +171 -0
  108. package/dist/shared/components/support/support-list.js +125 -0
  109. package/dist/shared/components/ui/SimpleSelect.js +28 -20
  110. package/dist/shared/components/ui/checkbox.js +6 -6
  111. package/dist/shared/components/ui/select.js +43 -39
  112. package/dist/shared/components/ui/sheet.js +9 -9
  113. package/dist/shared/components/ui/switch.js +12 -11
  114. package/dist/shared/components/watch-list/WatchDock.js +532 -459
  115. package/dist/shared/components/watch-list/WatchExtras.js +332 -286
  116. package/dist/shared/components/watch-list/WatchRows.js +164 -140
  117. package/dist/shared/lib/activity-sentence.js +103 -91
  118. package/dist/shared/lib/agent-presence.js +27 -21
  119. package/dist/shared/lib/approval-progress.js +2 -2
  120. package/dist/shared/lib/copy-rules.js +31 -24
  121. package/dist/shared/lib/derived-causes.js +113 -78
  122. package/dist/shared/lib/grid-cursors.js +26 -26
  123. package/dist/shared/lib/label-flash.js +27 -0
  124. package/dist/shared/lib/list-return.js +137 -125
  125. package/dist/shared/lib/live-deltas.js +40 -34
  126. package/dist/shared/lib/live-groups.js +56 -52
  127. package/dist/shared/lib/live-preference.js +64 -59
  128. package/dist/shared/lib/live-screen.js +223 -192
  129. package/dist/shared/lib/partner-failure.js +11 -11
  130. package/dist/shared/lib/rollup-recalc.js +68 -64
  131. package/dist/shared/lib/screen-refresh.js +74 -68
  132. package/dist/shared/lib/screen-share.js +108 -104
  133. package/dist/shared/lib/send-status.js +77 -61
  134. package/dist/shared/lib/text-diff-window.js +29 -0
  135. package/dist/shared/lib/watch-list.js +210 -209
  136. package/dist/shared/lib/widget-image-render.js +72 -49
  137. package/package.json +1 -1
@@ -1,27 +1,27 @@
1
- import { jsx as n, jsxs as d, Fragment as re } from "react/jsx-runtime";
1
+ import { jsx as n, jsxs as u, Fragment as re } from "react/jsx-runtime";
2
2
  import { useQueryClient as ne, useQuery as ue } from "@tanstack/react-query";
3
- import { MonitorUp as Q, Minus as he, ShieldCheck as me, Loader2 as ae, Minimize2 as fe, Maximize2 as pe, Eye as be } from "lucide-react";
4
- import { useEffect as k, useState as S, useRef as z, useCallback as ge, useMemo as xe } from "react";
3
+ import { MonitorUp as H, Minus as he, ShieldCheck as me, Loader2 as ae, Minimize2 as fe, Maximize2 as pe, Eye as be } from "lucide-react";
4
+ import { useEffect as y, useState as S, useRef as z, useCallback as ge, useMemo as xe } from "react";
5
5
  import { createPortal as X } from "react-dom";
6
6
  import { useNivaroClient as Y, useApiFetchConfig as ve } from "../../context.js";
7
7
  import { get as we, del as se, post as ye } from "../../lib/commands.js";
8
8
  import { describeError as ke } from "../../lib/error-message.js";
9
9
  import { useOptionalRealtime as ie } from "../../lib/realtime.js";
10
10
  import { registerScreenShareRuntime as Ne, useScreenShareAvailable as Se, useScreenShareStatus as oe, stopScreenShare as le, screenShareRuntime as Re, startScreenShare as _e, createFrameAssembler as Ee } from "../../lib/screen-share.js";
11
- const H = (e) => ["support-screen-share", e];
11
+ const Q = (e) => ["support-screen-share", e];
12
12
  function Me() {
13
- const e = ie(), i = Y(), { apiBase: u, authHeaders: a, credentials: l } = ve();
13
+ const e = ie(), i = Y(), { apiBase: h, authHeaders: a, credentials: c } = ve();
14
14
  return xe(() => e ? {
15
- emit: (o, c) => e.emit(o, c),
16
- on: (o, c) => e.on(o, c),
17
- stop: async (o, c, t) => {
18
- const m = `/support/tickets/${o}/screen-share?share=${encodeURIComponent(c)}${t ? `&reason=${t}` : ""}`;
15
+ emit: (l, d) => e.emit(l, d),
16
+ on: (l, d) => e.on(l, d),
17
+ stop: async (l, d, t) => {
18
+ const m = `/support/tickets/${l}/screen-share?share=${encodeURIComponent(d)}${t ? `&reason=${t}` : ""}`;
19
19
  if (t) {
20
20
  try {
21
- fetch(`${u}${m}`, {
21
+ fetch(`${h}${m}`, {
22
22
  method: "DELETE",
23
23
  keepalive: !0,
24
- credentials: l,
24
+ credentials: c,
25
25
  headers: a
26
26
  }).catch(() => {
27
27
  });
@@ -31,17 +31,17 @@ function Me() {
31
31
  }
32
32
  await i.request(se(m));
33
33
  }
34
- } : null, [e, i, u, a, l]);
34
+ } : null, [e, i, h, a, c]);
35
35
  }
36
- function Ve({ runtime: e }) {
37
- return k(() => e ? Ne(e) : void 0, [e]), /* @__PURE__ */ n(Ae, {});
36
+ function Je({ runtime: e }) {
37
+ return y(() => e ? Ne(e) : void 0, [e]), /* @__PURE__ */ n(Ae, {});
38
38
  }
39
39
  function $e(e) {
40
- const [i, u] = S(() => Date.now());
41
- if (k(() => {
40
+ const [i, h] = S(() => Date.now());
41
+ if (y(() => {
42
42
  if (e == null) return;
43
- const l = setInterval(() => u(Date.now()), 1e3);
44
- return () => clearInterval(l);
43
+ const c = setInterval(() => h(Date.now()), 1e3);
44
+ return () => clearInterval(c);
45
45
  }, [e]), e == null) return "";
46
46
  const a = Math.max(0, Math.round((e - i) / 1e3));
47
47
  return `${Math.floor(a / 60)}:${String(a % 60).padStart(2, "0")}`;
@@ -50,68 +50,68 @@ function ce(e) {
50
50
  return e.to.kind === "team" ? `the ${e.to.name} team` : e.to.name;
51
51
  }
52
52
  const Z = 340;
53
- function qe(e, i, u) {
53
+ function qe(e, i, h) {
54
54
  const a = e.filter(
55
- (t) => t.right - t.left > 0 && t.bottom - t.top > 0 && t.bottom > u - 120
55
+ (t) => t.right - t.left > 0 && t.bottom - t.top > 0 && t.bottom > h - 120
56
56
  );
57
57
  if (a.length === 0) return { kind: "free" };
58
- const l = Math.min(...a.map((t) => t.left)), o = Math.max(...a.map((t) => t.right)), c = Math.min(...a.map((t) => t.top));
59
- return l >= Z ? { kind: "beside", left: 0, width: l } : i - o >= Z ? { kind: "beside", left: o, width: i - o } : c >= 96 ? { kind: "above", bottom: u - c + 12 } : { kind: "covered" };
58
+ const c = Math.min(...a.map((t) => t.left)), l = Math.max(...a.map((t) => t.right)), d = Math.min(...a.map((t) => t.top));
59
+ return c >= Z ? { kind: "beside", left: 0, width: c } : i - l >= Z ? { kind: "beside", left: l, width: i - l } : d >= 96 ? { kind: "above", bottom: h - d + 12 } : { kind: "covered" };
60
60
  }
61
61
  function Te(e) {
62
- const [i, u] = S({ kind: "free" });
63
- return k(() => {
62
+ const [i, h] = S({ kind: "free" });
63
+ return y(() => {
64
64
  if (!e || typeof document > "u") return;
65
65
  let a = 0;
66
- const l = new ResizeObserver(() => o());
67
- function o() {
66
+ const c = new ResizeObserver(() => l());
67
+ function l() {
68
68
  cancelAnimationFrame(a), a = requestAnimationFrame(() => {
69
- l.disconnect();
69
+ c.disconnect();
70
70
  const f = [
71
71
  ...document.querySelectorAll('[role="dialog"], [role="alertdialog"]')
72
72
  ].filter((r) => r.isConnected && getComputedStyle(r).visibility !== "hidden");
73
- for (const r of f) l.observe(r);
73
+ for (const r of f) c.observe(r);
74
74
  const x = qe(
75
75
  f.map((r) => r.getBoundingClientRect()),
76
76
  window.innerWidth,
77
77
  window.innerHeight
78
78
  );
79
- u((r) => JSON.stringify(r) === JSON.stringify(x) ? r : x);
79
+ h((r) => JSON.stringify(r) === JSON.stringify(x) ? r : x);
80
80
  });
81
81
  }
82
- let c;
82
+ let d;
83
83
  const t = () => {
84
- o(), clearTimeout(c), c = setTimeout(o, 400);
84
+ l(), clearTimeout(d), d = setTimeout(l, 400);
85
85
  }, m = new MutationObserver(t);
86
86
  return m.observe(document.body, { childList: !0 }), window.addEventListener("resize", t), t(), () => {
87
- m.disconnect(), l.disconnect(), cancelAnimationFrame(a), clearTimeout(c), window.removeEventListener("resize", t);
87
+ m.disconnect(), c.disconnect(), cancelAnimationFrame(a), clearTimeout(d), window.removeEventListener("resize", t);
88
88
  };
89
89
  }, [e]), i;
90
90
  }
91
91
  function Ae() {
92
- const e = oe(), i = !!e && !e.ended, u = $e(i ? (e == null ? void 0 : e.share.expires_at) ?? null : null), a = Te(!!e), [l, o] = S(null), c = e == null ? void 0 : e.share.id;
93
- k(() => {
94
- c && o(null);
95
- }, [c]);
92
+ const e = oe(), i = !!e && !e.ended, h = $e(i ? (e == null ? void 0 : e.share.expires_at) ?? null : null), a = Te(!!e), [c, l] = S(null), d = e == null ? void 0 : e.share.id;
93
+ y(() => {
94
+ d && l(null);
95
+ }, [d]);
96
96
  const t = !!e, m = t && a.kind === "covered";
97
- if (k(() => {
97
+ if (y(() => {
98
98
  if (!(!t || typeof document > "u"))
99
99
  return document.documentElement.setAttribute("data-screen-sharing", ""), () => document.documentElement.removeAttribute("data-screen-sharing");
100
- }, [t]), k(() => {
100
+ }, [t]), y(() => {
101
101
  if (!(!m || typeof document > "u"))
102
102
  return document.documentElement.setAttribute("data-screen-share-covered", ""), () => document.documentElement.removeAttribute("data-screen-share-covered");
103
103
  }, [m]), !e || typeof document > "u") return null;
104
- const { share: f, watching: x, ended: r } = e, y = ce(f), R = x.length === 0 ? "not opened yet" : f.to.kind === "user" ? "watching now" : `${x.length === 1 ? x[0] : `${x.length} people`} watching`, b = !r && (l ?? a.kind === "covered"), g = u ? `Sharing stops by itself in ${u}` : void 0;
104
+ const { share: f, watching: x, ended: r } = e, w = ce(f), R = x.length === 0 ? "not opened yet" : f.to.kind === "user" ? "watching now" : `${x.length === 1 ? x[0] : `${x.length} people`} watching`, b = !r && (c ?? a.kind === "covered"), g = h ? `Sharing stops by itself in ${h}` : void 0;
105
105
  if (b)
106
106
  return X(
107
- /* @__PURE__ */ d(
107
+ /* @__PURE__ */ u(
108
108
  "button",
109
109
  {
110
110
  type: "button",
111
111
  "data-replay-block": !0,
112
112
  "data-screen-share-bar": "minimised",
113
- onClick: () => o(!1),
114
- "aria-label": `Sharing this app with ${y}, ${R}. Show the sharing controls`,
113
+ onClick: () => l(!1),
114
+ "aria-label": `Sharing this app with ${w}, ${R}. Show the sharing controls`,
115
115
  "data-tip": g,
116
116
  className: `nvr-no-record fixed bottom-[max(1rem,env(safe-area-inset-bottom))] z-[160] flex h-9 items-center gap-2 rounded-full border border-white/10 bg-[#111827] pl-2.5 pr-3 text-[12px] font-medium text-slate-100 shadow-[0_6px_18px_-6px_rgba(15,23,42,0.5)] transition-colors hover:bg-[#1f2937] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-300 ${a.kind === "covered" ? "left-3" : "right-3 sm:right-20"}`,
117
117
  children: [
@@ -125,7 +125,7 @@ function Ae() {
125
125
  );
126
126
  const p = a.kind === "beside" ? { left: a.left, width: a.width } : a.kind === "above" ? { bottom: a.bottom } : {};
127
127
  return X(
128
- /* @__PURE__ */ d(
128
+ /* @__PURE__ */ u(
129
129
  "div",
130
130
  {
131
131
  role: "status",
@@ -137,15 +137,15 @@ function Ae() {
137
137
  className: `nvr-no-record pointer-events-none fixed bottom-[max(0.75rem,env(safe-area-inset-bottom))] z-[160] flex justify-center px-3 sm:px-4 ${a.kind === "beside" ? "" : "inset-x-0"}`,
138
138
  children: [
139
139
  /* @__PURE__ */ n(ee, {}),
140
- /* @__PURE__ */ n("div", { className: "pointer-events-auto flex w-full items-center gap-2.5 rounded-full border border-white/10 bg-[#111827] py-1 pl-3.5 pr-1 text-[12.5px] text-slate-100 shadow-[0_8px_24px_-6px_rgba(15,23,42,0.45)] sm:w-auto sm:max-w-full sm:gap-3 sm:py-1.5 sm:pr-1.5", children: r ? /* @__PURE__ */ n("span", { className: "px-1 py-1 text-slate-300", children: r }) : /* @__PURE__ */ d(re, { children: [
140
+ /* @__PURE__ */ n("div", { className: "pointer-events-auto flex w-full items-center gap-2.5 rounded-full border border-white/10 bg-[#111827] py-1 pl-3.5 pr-1 text-[12.5px] text-slate-100 shadow-[0_8px_24px_-6px_rgba(15,23,42,0.45)] sm:w-auto sm:max-w-full sm:gap-3 sm:py-1.5 sm:pr-1.5", children: r ? /* @__PURE__ */ n("span", { className: "px-1 py-1 text-slate-300", children: r }) : /* @__PURE__ */ u(re, { children: [
141
141
  /* @__PURE__ */ n("span", { "data-tip": g, className: "flex shrink-0", children: /* @__PURE__ */ n(te, {}) }),
142
- /* @__PURE__ */ d("span", { className: "min-w-0 flex-1 truncate sm:flex-none", children: [
142
+ /* @__PURE__ */ u("span", { className: "min-w-0 flex-1 truncate sm:flex-none", children: [
143
143
  /* @__PURE__ */ n("span", { className: "sm:hidden", children: "Sharing" }),
144
- /* @__PURE__ */ d("span", { className: "hidden sm:inline", children: [
144
+ /* @__PURE__ */ u("span", { className: "hidden sm:inline", children: [
145
145
  "Sharing with ",
146
- /* @__PURE__ */ n("b", { className: "font-semibold text-white", children: y })
146
+ /* @__PURE__ */ n("b", { className: "font-semibold text-white", children: w })
147
147
  ] }),
148
- /* @__PURE__ */ d("span", { className: "text-slate-400", "data-screen-share-watching": !0, children: [
148
+ /* @__PURE__ */ u("span", { className: "text-slate-400", "data-screen-share-watching": !0, children: [
149
149
  " · ",
150
150
  R
151
151
  ] })
@@ -165,7 +165,7 @@ function Ae() {
165
165
  {
166
166
  type: "button",
167
167
  "data-screen-share-minimise": !0,
168
- onClick: () => o(!0),
168
+ onClick: () => l(!0),
169
169
  "aria-label": "Minimise the sharing controls",
170
170
  "data-tip": "Minimise",
171
171
  className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-slate-400 transition-colors hover:bg-white/10 hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400",
@@ -180,71 +180,77 @@ function Ae() {
180
180
  );
181
181
  }
182
182
  function ee() {
183
- return /* @__PURE__ */ n("style", { children: '@media (max-width: 639px){html[data-screen-sharing] [data-floating-help]{display:none!important}}html[data-screen-share-covered] [role="dialog"] [data-sheet-body]{padding-bottom:calc(2.25rem + 2rem + env(safe-area-inset-bottom))}' });
183
+ return /* @__PURE__ */ n("style", { children: '@media (max-width: 639px){html[data-screen-sharing] [data-floating-help]{display:none!important}html[data-screen-sharing] main{padding-bottom:calc(3.5rem + env(safe-area-inset-bottom))}}html[data-screen-share-covered] [role="dialog"] [data-sheet-body]{padding-bottom:calc(2.25rem + 2rem + env(safe-area-inset-bottom))}' });
184
184
  }
185
185
  function te() {
186
- return /* @__PURE__ */ d("span", { className: "relative flex h-2.5 w-2.5 shrink-0", "aria-hidden": !0, children: [
186
+ return /* @__PURE__ */ u("span", { className: "relative flex h-2.5 w-2.5 shrink-0", "aria-hidden": !0, children: [
187
187
  /* @__PURE__ */ n("span", { className: "absolute inset-0 rounded-full bg-red-500 motion-safe:animate-ping motion-safe:opacity-60" }),
188
188
  /* @__PURE__ */ n("span", { className: "relative h-2.5 w-2.5 rounded-full bg-red-500" })
189
189
  ] });
190
190
  }
191
- function Je({
191
+ function Ie({
192
192
  ticketId: e,
193
193
  onWideChange: i
194
194
  }) {
195
- const u = Y(), a = ne(), l = ie(), o = Se(), c = oe(), [t, m] = S(null), [f, x] = S(null), { data: r } = ue({
196
- queryKey: H(e),
197
- queryFn: () => u.request(we(`/support/tickets/${e}/screen-share`)).then((b) => b.data),
198
- enabled: o,
195
+ const h = Y(), a = ne(), c = ie(), l = Se(), d = oe(), [t, m] = S(null), [f, x] = S(null), { data: r } = ue({
196
+ queryKey: Q(e),
197
+ queryFn: () => h.request(we(`/support/tickets/${e}/screen-share`)).then((b) => b.data),
198
+ enabled: l,
199
199
  staleTime: 5e3
200
200
  });
201
- k(() => {
202
- if (!l) return;
203
- const b = (h) => {
204
- Number(h == null ? void 0 : h.ticket) === e && (a.invalidateQueries({ queryKey: H(e) }), a.invalidateQueries({ queryKey: ["support-ticket", e] }));
205
- }, g = (h) => {
206
- Number(h == null ? void 0 : h.ticket) === e && typeof (h == null ? void 0 : h.reason) == "string" && x(h.reason), b(h);
207
- }, p = [l.on("screenshare:state", b), l.on("screenshare:ended", g)];
201
+ y(() => {
202
+ if (!c) return;
203
+ const b = (o) => {
204
+ Number(o == null ? void 0 : o.ticket) === e && (a.invalidateQueries({ queryKey: Q(e) }), a.invalidateQueries({ queryKey: ["support-ticket", e] }));
205
+ }, g = (o) => {
206
+ Number(o == null ? void 0 : o.ticket) === e && typeof (o == null ? void 0 : o.reason) == "string" && x(o.reason), b(o);
207
+ }, p = (o) => {
208
+ Number(o == null ? void 0 : o.ticket) === e && a.invalidateQueries({ queryKey: ["support-ticket", e] });
209
+ }, k = [
210
+ c.on("screenshare:state", b),
211
+ c.on("screenshare:ended", g),
212
+ c.on("screenshare:watching", p)
213
+ ];
208
214
  return () => {
209
- for (const h of p) h();
215
+ for (const o of k) o();
210
216
  };
211
- }, [l, a, e]);
212
- const y = r != null && r.active && r.can_watch && r.share ? r.share : null;
213
- if (k(() => {
214
- y && m(y);
215
- }, [y]), !o || !(r != null && r.enabled)) return null;
216
- const R = c && !c.ended && c.share.ticket === e;
217
+ }, [c, a, e]);
218
+ const w = r != null && r.active && r.can_watch && r.share ? r.share : null;
219
+ if (y(() => {
220
+ w && m(w);
221
+ }, [w]), !l || !(r != null && r.enabled)) return null;
222
+ const R = d && !d.ended && d.share.ticket === e;
217
223
  return R || r.mine && r.active ? /* @__PURE__ */ n(
218
224
  ze,
219
225
  {
220
226
  name: r.to_name,
221
227
  onStop: async () => {
222
228
  if (R) return le();
223
- r.share && await u.request(
229
+ r.share && await h.request(
224
230
  se(
225
231
  `/support/tickets/${e}/screen-share?share=${encodeURIComponent(r.share.id)}`
226
232
  )
227
233
  ).catch(() => {
228
- }), a.invalidateQueries({ queryKey: H(e) });
234
+ }), a.invalidateQueries({ queryKey: Q(e) });
229
235
  }
230
236
  }
231
- ) : r.can_start || r.start_refusal ? /* @__PURE__ */ n(Le, { ticketId: e, answer: r }) : r.active && r.can_watch && r.share && l ? /* @__PURE__ */ n(Oe, { share: r.share, rt: l, onWideChange: i }) : !r.active && t ? /* @__PURE__ */ d(
237
+ ) : r.can_start || r.start_refusal ? /* @__PURE__ */ n(Le, { ticketId: e, answer: r }) : r.active && r.can_watch && r.share && c ? /* @__PURE__ */ n(Oe, { share: r.share, rt: c, onWideChange: i }) : !r.active && t ? /* @__PURE__ */ u(
232
238
  "p",
233
239
  {
234
240
  "data-screen-share-note": "ended",
235
241
  className: "flex items-center gap-1.5 text-[12px] text-slate-500 dark:text-muted-foreground",
236
242
  children: [
237
- /* @__PURE__ */ n(Q, { className: "h-3.5 w-3.5 shrink-0" }),
243
+ /* @__PURE__ */ n(H, { className: "h-3.5 w-3.5 shrink-0" }),
238
244
  de(t.sharer_name, f)
239
245
  ]
240
246
  }
241
- ) : r.active && r.share ? /* @__PURE__ */ d(
247
+ ) : r.active && r.share ? /* @__PURE__ */ u(
242
248
  "p",
243
249
  {
244
250
  "data-screen-share-note": !0,
245
251
  className: "flex items-center gap-1.5 text-[12px] text-slate-500 dark:text-muted-foreground",
246
252
  children: [
247
- /* @__PURE__ */ n(Q, { className: "h-3.5 w-3.5 shrink-0" }),
253
+ /* @__PURE__ */ n(H, { className: "h-3.5 w-3.5 shrink-0" }),
248
254
  r.share.sharer_name,
249
255
  " is sharing their screen with ",
250
256
  ce(r.share),
@@ -269,17 +275,17 @@ function de(e, i) {
269
275
  }
270
276
  }
271
277
  function ze({ name: e, onStop: i }) {
272
- return /* @__PURE__ */ d(
278
+ return /* @__PURE__ */ u(
273
279
  "div",
274
280
  {
275
281
  "data-screen-share-card": "sharing",
276
282
  className: "flex items-center gap-3 rounded-lg border border-slate-200 bg-slate-50 px-3.5 py-3 dark:border-border dark:bg-white/[0.03]",
277
283
  children: [
278
- /* @__PURE__ */ d("span", { className: "relative flex h-2.5 w-2.5 shrink-0", "aria-hidden": !0, children: [
284
+ /* @__PURE__ */ u("span", { className: "relative flex h-2.5 w-2.5 shrink-0", "aria-hidden": !0, children: [
279
285
  /* @__PURE__ */ n("span", { className: "absolute inset-0 rounded-full bg-red-500 motion-safe:animate-ping motion-safe:opacity-60" }),
280
286
  /* @__PURE__ */ n("span", { className: "relative h-2.5 w-2.5 rounded-full bg-red-500" })
281
287
  ] }),
282
- /* @__PURE__ */ d("p", { className: "mr-auto text-[12.5px] text-slate-700 dark:text-slate-200", children: [
288
+ /* @__PURE__ */ u("p", { className: "mr-auto text-[12.5px] text-slate-700 dark:text-slate-200", children: [
283
289
  "You are sharing this app with ",
284
290
  /* @__PURE__ */ n("b", { className: "font-semibold", children: e ?? "support" }),
285
291
  "."
@@ -299,23 +305,23 @@ function ze({ name: e, onStop: i }) {
299
305
  );
300
306
  }
301
307
  function Le({ ticketId: e, answer: i }) {
302
- const u = Y(), a = ne(), l = Me(), [o, c] = S(!1), [t, m] = S(null), f = i.to_name ?? "support", x = i.can_start && !!l, r = async () => {
303
- if (l) {
304
- c(!0), m(null);
308
+ const h = Y(), a = ne(), c = Me(), [l, d] = S(!1), [t, m] = S(null), f = i.to_name ?? "support", x = i.can_start && !!c, r = async () => {
309
+ if (c) {
310
+ d(!0), m(null);
305
311
  try {
306
- const y = await u.request(
312
+ const w = await h.request(
307
313
  ye(`/support/tickets/${e}/screen-share`)
308
314
  );
309
315
  await _e({
310
- share: y.data.share,
311
- masking: y.data.masking,
312
- transport: l
313
- }) || (await Promise.resolve(l.stop(e, y.data.share.id)).catch(() => {
316
+ share: w.data.share,
317
+ masking: w.data.masking,
318
+ transport: c
319
+ }) || (await Promise.resolve(c.stop(e, w.data.share.id)).catch(() => {
314
320
  }), m("Sharing could not start on this page. Reload the page and try again."));
315
- } catch (y) {
316
- m(ke(y, "Sharing could not start").title);
321
+ } catch (w) {
322
+ m(ke(w, "Sharing could not start").title);
317
323
  } finally {
318
- c(!1), a.invalidateQueries({ queryKey: H(e) }), a.invalidateQueries({ queryKey: ["support-ticket", e] });
324
+ d(!1), a.invalidateQueries({ queryKey: Q(e) }), a.invalidateQueries({ queryKey: ["support-ticket", e] });
319
325
  }
320
326
  }
321
327
  };
@@ -324,32 +330,32 @@ function Le({ ticketId: e, answer: i }) {
324
330
  {
325
331
  "data-screen-share-card": "start",
326
332
  className: "rounded-lg border border-slate-200 px-4 py-3.5 dark:border-border",
327
- children: /* @__PURE__ */ d("div", { className: "flex items-start gap-3", children: [
328
- /* @__PURE__ */ n(Q, { className: "mt-0.5 h-4 w-4 shrink-0 text-slate-500 dark:text-slate-400" }),
329
- /* @__PURE__ */ d("div", { className: "min-w-0 flex-1", children: [
330
- /* @__PURE__ */ d("h3", { className: "text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: [
333
+ children: /* @__PURE__ */ u("div", { className: "flex items-start gap-3", children: [
334
+ /* @__PURE__ */ n(H, { className: "mt-0.5 h-4 w-4 shrink-0 text-slate-500 dark:text-slate-400" }),
335
+ /* @__PURE__ */ u("div", { className: "min-w-0 flex-1", children: [
336
+ /* @__PURE__ */ u("h3", { className: "text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: [
331
337
  "Show ",
332
338
  x ? f : "support",
333
339
  " your screen"
334
340
  ] }),
335
- /* @__PURE__ */ d("p", { className: "mt-1 text-[12px] leading-relaxed text-slate-600 dark:text-slate-300", children: [
341
+ /* @__PURE__ */ u("p", { className: "mt-1 text-[12px] leading-relaxed text-slate-600 dark:text-slate-300", children: [
336
342
  x ? f : "Whoever picks this up",
337
343
  " sees this app as you use it — not your other tabs or anything else on your computer. They can only watch."
338
344
  ] }),
339
- /* @__PURE__ */ d("p", { className: "mt-1.5 flex items-start gap-1.5 text-[11.5px] leading-relaxed text-slate-500 dark:text-muted-foreground", children: [
345
+ /* @__PURE__ */ u("p", { className: "mt-1.5 flex items-start gap-1.5 text-[11.5px] leading-relaxed text-slate-500 dark:text-muted-foreground", children: [
340
346
  /* @__PURE__ */ n(me, { className: "mt-px h-3.5 w-3.5 shrink-0 text-emerald-600 dark:text-emerald-400" }),
341
347
  "What you type and the values on records are hidden from them. Stops when you press Stop, close the page, or after 30 minutes."
342
348
  ] }),
343
- x ? /* @__PURE__ */ d(
349
+ x ? /* @__PURE__ */ u(
344
350
  "button",
345
351
  {
346
352
  type: "button",
347
353
  "data-screen-share-start": !0,
348
- disabled: o,
354
+ disabled: l,
349
355
  onClick: () => void r(),
350
356
  className: "mt-3 inline-flex h-8 items-center gap-1.5 rounded-md bg-nvr-cyan px-3.5 text-[12.5px] font-medium text-white transition-opacity hover:opacity-90 disabled:opacity-50",
351
357
  children: [
352
- o && /* @__PURE__ */ n(ae, { className: "h-3.5 w-3.5 animate-spin" }),
358
+ l && /* @__PURE__ */ n(ae, { className: "h-3.5 w-3.5 animate-spin" }),
353
359
  "Share my screen with ",
354
360
  f
355
361
  ]
@@ -383,40 +389,40 @@ const Fe = `
383
389
  function Oe({
384
390
  share: e,
385
391
  rt: i,
386
- onWideChange: u
392
+ onWideChange: h
387
393
  }) {
388
- const a = z(null), l = z(null), o = z(null), c = z(null), [t, m] = S("joining"), [f, x] = S(!1), r = z(!1);
394
+ const a = z(null), c = z(null), l = z(null), d = z(null), [t, m] = S("joining"), [f, x] = S(!1), r = z(!1);
389
395
  r.current = f;
390
- const [y, R] = S(null), b = e.ticket, g = ge(() => {
396
+ const [w, R] = S(null), b = e.ticket, g = ge(() => {
391
397
  var P, O;
392
- const p = a.current, h = (P = o.current) == null ? void 0 : P.wrapper, v = (O = o.current) == null ? void 0 : O.iframe, M = Number(v == null ? void 0 : v.getAttribute("width")) || (v == null ? void 0 : v.offsetWidth) || 0, L = Number(v == null ? void 0 : v.getAttribute("height")) || (v == null ? void 0 : v.offsetHeight) || 0;
393
- M > 0 && L > 0 && (c.current = { width: M, height: L });
394
- const _ = c.current;
395
- if (!p || !_ || !h) return;
396
- const F = p.clientWidth, K = r.current ? Math.max(240, window.innerHeight - 140) : Number.POSITIVE_INFINITY, $ = Math.min(F / Math.max(1, _.width), K / Math.max(1, _.height));
397
- h.style.transform = `scale(${$})`, h.style.left = `${Math.max(0, Math.round((F - _.width * $) / 2))}px`, p.style.height = `${Math.round(_.height * $)}px`;
398
+ const p = a.current, k = (P = l.current) == null ? void 0 : P.wrapper, o = (O = l.current) == null ? void 0 : O.iframe, M = Number(o == null ? void 0 : o.getAttribute("width")) || (o == null ? void 0 : o.offsetWidth) || 0, L = Number(o == null ? void 0 : o.getAttribute("height")) || (o == null ? void 0 : o.offsetHeight) || 0;
399
+ M > 0 && L > 0 && (d.current = { width: M, height: L });
400
+ const _ = d.current;
401
+ if (!p || !_ || !k) return;
402
+ const F = p.clientWidth, j = r.current ? Math.max(240, window.innerHeight - 140) : Number.POSITIVE_INFINITY, $ = Math.min(F / Math.max(1, _.width), j / Math.max(1, _.height));
403
+ k.style.transform = `scale(${$})`, k.style.left = `${Math.max(0, Math.round((F - _.width * $) / 2))}px`, p.style.height = `${Math.round(_.height * $)}px`;
398
404
  }, []);
399
- return k(() => {
400
- var U, I;
405
+ return y(() => {
406
+ var U, V;
401
407
  let p = !0;
402
- const h = Ee();
403
- let v = 0, M = null;
408
+ const k = Ee();
409
+ let o = 0, M = null;
404
410
  const L = ((U = Re()) == null ? void 0 : U.loadReplayer().catch(() => null)) ?? Promise.resolve(null), _ = () => {
405
411
  const s = Date.now();
406
- s - v < 3e3 || (v = s, i.emit("screenshare:resync", { ticket: b }));
412
+ s - o < 3e3 || (o = s, i.emit("screenshare:resync", { ticket: b }));
407
413
  }, F = (s) => {
408
- var j, V, J, G, W;
409
- const w = l.current;
410
- if (!w || !M) return;
414
+ var K, J, I, W, G;
415
+ const v = c.current;
416
+ if (!v || !M) return;
411
417
  try {
412
- (V = (j = o.current) == null ? void 0 : j.destroy) == null || V.call(j);
418
+ (J = (K = l.current) == null ? void 0 : K.destroy) == null || J.call(K);
413
419
  } catch {
414
420
  }
415
- w.replaceChildren();
421
+ v.replaceChildren();
416
422
  const N = s.find((q) => q.type === 4);
417
- (J = N == null ? void 0 : N.data) != null && J.width && N.data.height && (c.current = { width: N.data.width, height: N.data.height });
423
+ (I = N == null ? void 0 : N.data) != null && I.width && N.data.height && (d.current = { width: N.data.width, height: N.data.height });
418
424
  const E = new M(s, {
419
- root: w,
425
+ root: v,
420
426
  liveMode: !0,
421
427
  mouseTail: !1,
422
428
  triggerFocus: !1,
@@ -424,24 +430,24 @@ function Oe({
424
430
  UNSAFE_replayCanvas: !1,
425
431
  insertStyleRules: Pe
426
432
  });
427
- (G = E.on) == null || G.call(E, "resize", (q) => {
433
+ (W = E.on) == null || W.call(E, "resize", (q) => {
428
434
  const A = q;
429
- A != null && A.width && A.height && (c.current = { width: A.width, height: A.height }), g();
435
+ A != null && A.width && A.height && (d.current = { width: A.width, height: A.height }), g();
430
436
  });
431
437
  const C = s.map((q) => q.timestamp).filter((q) => typeof q == "number");
432
- E.play(C.length ? Math.max(0, C[C.length - 1] - C[0]) : 0), o.current = E, (W = E.on) == null || W.call(E, "fullsnapshot-rebuilded", () => {
438
+ E.play(C.length ? Math.max(0, C[C.length - 1] - C[0]) : 0), l.current = E, (G = E.on) == null || G.call(E, "fullsnapshot-rebuilded", () => {
433
439
  g(), requestAnimationFrame(() => g());
434
440
  }), g(), requestAnimationFrame(() => requestAnimationFrame(() => g())), m("live");
435
- }, K = (s) => {
441
+ }, j = (s) => {
436
442
  if (!p || !s || Number(s.ticket) !== b || s.share !== e.id) return;
437
- const w = h.push(s);
438
- if (w.gap && _(), !!w.events.length)
439
- if (w.snapshot || !o.current) F(w.events);
440
- else for (const N of w.events) o.current.addEvent(N);
443
+ const v = k.push(s);
444
+ if (v.gap && _(), !!v.events.length)
445
+ if (v.snapshot || !l.current) F(v.events);
446
+ else for (const N of v.events) l.current.addEvent(N);
441
447
  }, $ = [
442
- i.on("screenshare:frame", K),
448
+ i.on("screenshare:frame", j),
443
449
  i.on("screenshare:joined", (s) => {
444
- p && Number(s == null ? void 0 : s.ticket) === b && m((w) => w === "live" ? w : "waiting");
450
+ p && Number(s == null ? void 0 : s.ticket) === b && m((v) => v === "live" ? v : "waiting");
445
451
  }),
446
452
  i.on("screenshare:denied", (s) => {
447
453
  p && Number(s == null ? void 0 : s.ticket) === b && m("denied");
@@ -460,8 +466,8 @@ function Oe({
460
466
  }
461
467
  });
462
468
  const P = setInterval(() => i.emit("screenshare:watch", { ticket: b }), 15e3), O = setInterval(() => {
463
- o.current || _();
464
- }, 6e3), B = (I = i.onStatus) == null ? void 0 : I.call(i, (s) => {
469
+ l.current || _();
470
+ }, 6e3), B = (V = i.onStatus) == null ? void 0 : V.call(i, (s) => {
465
471
  s.state === "live" && M && i.emit("screenshare:watch", { ticket: b });
466
472
  });
467
473
  B && $.push(B);
@@ -469,29 +475,29 @@ function Oe({
469
475
  a.current && (T == null || T.observe(a.current)), $.push(() => T == null ? void 0 : T.disconnect());
470
476
  const D = () => g();
471
477
  return window.addEventListener("resize", D), () => {
472
- var s, w;
478
+ var s, v;
473
479
  p = !1, clearInterval(P), clearInterval(O), window.removeEventListener("resize", D);
474
480
  for (const N of $) N();
475
481
  i.emit("screenshare:unwatch", { ticket: b });
476
482
  try {
477
- (w = (s = o.current) == null ? void 0 : s.destroy) == null || w.call(s);
483
+ (v = (s = l.current) == null ? void 0 : s.destroy) == null || v.call(s);
478
484
  } catch {
479
485
  }
480
- o.current = null;
486
+ l.current = null;
481
487
  };
482
- }, [i, b, e.id, g]), k(() => {
488
+ }, [i, b, e.id, g]), y(() => {
483
489
  t === "live" ? g() : a.current && (a.current.style.height = "");
484
- }, [t, g]), k(() => {
485
- u == null || u(f);
490
+ }, [t, g]), y(() => {
491
+ h == null || h(f);
486
492
  const p = setTimeout(() => {
487
- var h;
488
- g(), f && ((h = a.current) == null || h.scrollIntoView({ block: "start", behavior: "smooth" }));
493
+ var k;
494
+ g(), f && ((k = a.current) == null || k.scrollIntoView({ block: "start", behavior: "smooth" }));
489
495
  }, 320);
490
496
  return () => clearTimeout(p);
491
- }, [f, u, g]), k(() => () => u == null ? void 0 : u(!1), [u]), /* @__PURE__ */ d("section", { "data-screen-share-view": t, className: "space-y-2", children: [
497
+ }, [f, h, g]), y(() => () => h == null ? void 0 : h(!1), [h]), /* @__PURE__ */ u("section", { "data-screen-share-view": t, className: "space-y-2", children: [
492
498
  /* @__PURE__ */ n("style", { children: Fe }),
493
- /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
494
- /* @__PURE__ */ d("span", { className: "relative flex h-2 w-2 shrink-0", "aria-hidden": !0, children: [
499
+ /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
500
+ /* @__PURE__ */ u("span", { className: "relative flex h-2 w-2 shrink-0", "aria-hidden": !0, children: [
495
501
  t === "live" && /* @__PURE__ */ n("span", { className: "absolute inset-0 rounded-full bg-red-500 motion-safe:animate-ping motion-safe:opacity-60" }),
496
502
  /* @__PURE__ */ n(
497
503
  "span",
@@ -500,12 +506,12 @@ function Oe({
500
506
  }
501
507
  )
502
508
  ] }),
503
- /* @__PURE__ */ d("h3", { className: "mr-auto text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: [
509
+ /* @__PURE__ */ u("h3", { className: "mr-auto text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: [
504
510
  e.sharer_name,
505
511
  "'s screen",
506
512
  /* @__PURE__ */ n("span", { className: "ml-1.5 font-normal text-slate-500 dark:text-muted-foreground", children: t === "live" ? "· live, view only" : t === "ended" ? "· sharing stopped" : t === "denied" || t === "unavailable" ? "· not available here" : "· connecting…" })
507
513
  ] }),
508
- t === "live" && /* @__PURE__ */ d(
514
+ t === "live" && /* @__PURE__ */ u(
509
515
  "button",
510
516
  {
511
517
  type: "button",
@@ -519,17 +525,17 @@ function Oe({
519
525
  }
520
526
  )
521
527
  ] }),
522
- /* @__PURE__ */ d(
528
+ /* @__PURE__ */ u(
523
529
  "div",
524
530
  {
525
531
  ref: a,
526
532
  "data-screen-view": !0,
527
533
  className: `relative w-full overflow-hidden rounded-lg border border-slate-200 bg-slate-100 dark:border-border dark:bg-white/[0.04] ${t === "live" ? "" : "h-[180px]"}`,
528
534
  children: [
529
- /* @__PURE__ */ n("div", { ref: l, className: t === "live" ? "" : "hidden" }),
530
- t !== "live" && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex flex-col items-center justify-center gap-1.5 px-6 text-center text-[12px] text-slate-500 dark:text-muted-foreground", children: t === "ended" ? /* @__PURE__ */ n("span", { children: de(e.sharer_name, y) }) : t === "denied" ? /* @__PURE__ */ n("span", { children: "This screen share is only for the person working this request." }) : t === "unavailable" ? /* @__PURE__ */ n("span", { children: "This app cannot show a live screen. Open the request in the admin app." }) : /* @__PURE__ */ d(re, { children: [
535
+ /* @__PURE__ */ n("div", { ref: c, className: t === "live" ? "" : "hidden" }),
536
+ t !== "live" && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex flex-col items-center justify-center gap-1.5 px-6 text-center text-[12px] text-slate-500 dark:text-muted-foreground", children: t === "ended" ? /* @__PURE__ */ n("span", { children: de(e.sharer_name, w) }) : t === "denied" ? /* @__PURE__ */ n("span", { children: "This screen share is only for the person working this request." }) : t === "unavailable" ? /* @__PURE__ */ n("span", { children: "This app cannot show a live screen. Open the request in the admin app." }) : /* @__PURE__ */ u(re, { children: [
531
537
  /* @__PURE__ */ n(ae, { className: "h-4 w-4 animate-spin" }),
532
- /* @__PURE__ */ d("span", { children: [
538
+ /* @__PURE__ */ u("span", { children: [
533
539
  "Waiting for ",
534
540
  e.sharer_name,
535
541
  "'s screen…"
@@ -538,7 +544,7 @@ function Oe({
538
544
  ]
539
545
  }
540
546
  ),
541
- /* @__PURE__ */ d("p", { className: "flex items-center gap-1.5 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
547
+ /* @__PURE__ */ u("p", { className: "flex items-center gap-1.5 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
542
548
  /* @__PURE__ */ n(be, { className: "h-3.5 w-3.5 shrink-0" }),
543
549
  "Typed text and record values are hidden. You are named in the request's history."
544
550
  ] })
@@ -547,8 +553,8 @@ function Oe({
547
553
  export {
548
554
  Oe as LiveScreenViewer,
549
555
  Ae as ScreenShareBar,
550
- Ve as ScreenShareHost,
551
- Je as ScreenSharePanel,
556
+ Je as ScreenShareHost,
557
+ Ie as ScreenSharePanel,
552
558
  de as endedSentence,
553
559
  qe as pillPlacement
554
560
  };