@nivaro/react 0.3.138 → 0.3.140

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 (88) hide show
  1. package/dist/components/InlineGridField.js +95 -92
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +36 -2
  5. package/dist/shared/components/AudienceConfirmPanel.js +19 -19
  6. package/dist/shared/components/BroadcastView.js +213 -211
  7. package/dist/shared/components/CollectionBrowserView.js +2677 -2658
  8. package/dist/shared/components/ConfigHistory.js +45 -45
  9. package/dist/shared/components/ConformanceView.js +110 -110
  10. package/dist/shared/components/DataTable.js +51 -51
  11. package/dist/shared/components/FilePreviewLightbox.js +26 -25
  12. package/dist/shared/components/ItemEditForm.js +3038 -3027
  13. package/dist/shared/components/LiveCount.js +27 -23
  14. package/dist/shared/components/LiveTraceView.js +62 -61
  15. package/dist/shared/components/PageRenderer.js +422 -410
  16. package/dist/shared/components/ProfileView.js +199 -199
  17. package/dist/shared/components/QualityRulesView.js +70 -70
  18. package/dist/shared/components/QueryTable.js +131 -130
  19. package/dist/shared/components/RecordGraph.js +98 -98
  20. package/dist/shared/components/RecordReadView.js +287 -288
  21. package/dist/shared/components/ReportView.js +1279 -1259
  22. package/dist/shared/components/SlaRulesView.js +73 -74
  23. package/dist/shared/components/WidgetSlot.js +73 -73
  24. package/dist/shared/components/ai/AiChart.js +36 -32
  25. package/dist/shared/components/ai/AiMarkdown.js +136 -129
  26. package/dist/shared/components/ai/TaskDo.js +87 -87
  27. package/dist/shared/components/ai/answer-formats.js +37 -30
  28. package/dist/shared/components/ai/call-log/format.js +17 -16
  29. package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
  30. package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
  31. package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
  32. package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
  33. package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
  34. package/dist/shared/components/bulk/bulk-field-options.js +10 -10
  35. package/dist/shared/components/cbv/column-totals.js +53 -51
  36. package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
  37. package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
  38. package/dist/shared/components/command-center/announce.js +7 -6
  39. package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
  40. package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
  41. package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
  42. package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
  43. package/dist/shared/components/imports/RunDetailSheet.js +1 -1
  44. package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
  45. package/dist/shared/components/integrations/console/EventsView.js +35 -35
  46. package/dist/shared/components/integrations/console/FirefightView.js +15 -14
  47. package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
  48. package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
  49. package/dist/shared/components/integrations/console/SignalCard.js +67 -67
  50. package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
  51. package/dist/shared/components/item-edit/ChangesTray.js +88 -74
  52. package/dist/shared/components/item-edit/FilePickerField.js +123 -123
  53. package/dist/shared/components/item-edit/GroupSection.js +301 -292
  54. package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
  55. package/dist/shared/components/item-edit/InlineGridField.js +45 -36
  56. package/dist/shared/components/item-edit/InlineTableField.js +1167 -1153
  57. package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
  58. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
  59. package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
  60. package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
  61. package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
  62. package/dist/shared/components/ops-report/format.js +37 -36
  63. package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
  64. package/dist/shared/components/panels/RevisionsPanel.js +306 -305
  65. package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
  66. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
  67. package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
  68. package/dist/shared/components/pipeline/TeamsView.js +189 -130
  69. package/dist/shared/components/profile/AgentsPanel.js +6 -6
  70. package/dist/shared/components/profile/DelegationCard.js +13 -12
  71. package/dist/shared/components/profile/PersonActivity.js +48 -48
  72. package/dist/shared/components/profile/PersonExtras.js +107 -107
  73. package/dist/shared/components/profile/PersonWeek.js +9 -9
  74. package/dist/shared/components/queue/QueueBulkBar.js +19 -18
  75. package/dist/shared/components/queue/QueueBulkMove.js +21 -20
  76. package/dist/shared/components/queue/QueueItemSheet.js +136 -131
  77. package/dist/shared/components/queue/QueueWorklist.js +671 -670
  78. package/dist/shared/components/queue/worklist-helpers.js +36 -21
  79. package/dist/shared/components/support/RequestList.js +121 -121
  80. package/dist/shared/components/support/SupportAnalytics.js +29 -29
  81. package/dist/shared/lib/activity-sentence.js +316 -278
  82. package/dist/shared/lib/format-value.js +5 -4
  83. package/dist/shared/lib/number-format.js +87 -0
  84. package/dist/shared/lib/number-kind.js +133 -0
  85. package/dist/shared/lib/utils.js +24 -20
  86. package/dist/shared/lib/watch-list.js +1 -1
  87. package/dist/shared/lib/widget-value-format.js +26 -12
  88. package/package.json +1 -1
@@ -1,157 +1,157 @@
1
- import { jsxs as a, jsx as t, Fragment as Q } from "react/jsx-runtime";
2
- import { useQueryClient as pe, useQuery as k, useMutation as $ } from "@tanstack/react-query";
3
- import { useState as u, useMemo as J, useEffect as Fe } from "react";
4
- import { createPortal as je } from "react-dom";
5
- import { useNivaroClient as R } from "../context.js";
6
- import { get as v, post as j, patch as Ke, del as Le } from "../lib/commands.js";
7
- import { useLiveOps as Pe } from "../lib/live-ops.js";
8
- import { useLiveRefetchInterval as Ee } from "../lib/live-queries.js";
9
- import { cn as y, formatDateTime as I } from "../lib/utils.js";
10
- import { audienceConfirmFromError as Oe, AudienceConfirmPanel as De } from "./AudienceConfirmPanel.js";
11
- import { BroadcastDraftPanel as Ie } from "./BroadcastDraft.js";
12
- import { useHelpVideoLibrary as Qe } from "./help-videos/api.js";
13
- import { formatDuration as Re } from "./help-videos/viewer/format.js";
14
- import { PickList as Me } from "./imports/ServiceConfigBuilder.js";
15
- import { LiveFigure as ue } from "./LiveFigure.js";
16
- const xe = {
1
+ import { jsxs as a, jsx as t, Fragment as R } from "react/jsx-runtime";
2
+ import { useQueryClient as xe, useQuery as v, useMutation as A } from "@tanstack/react-query";
3
+ import { useState as u, useMemo as W, useEffect as je } from "react";
4
+ import { createPortal as Ke } from "react-dom";
5
+ import { useNivaroClient as M } from "../context.js";
6
+ import { get as N, post as K, patch as Le, del as Pe } from "../lib/commands.js";
7
+ import { useLiveOps as Ee } from "../lib/live-ops.js";
8
+ import { useLiveRefetchInterval as Oe } from "../lib/live-queries.js";
9
+ import { cn as k, formatNumber as y, formatDateTime as Q } from "../lib/utils.js";
10
+ import { audienceConfirmFromError as De, AudienceConfirmPanel as Ie } from "./AudienceConfirmPanel.js";
11
+ import { BroadcastDraftPanel as Qe } from "./BroadcastDraft.js";
12
+ import { useHelpVideoLibrary as Re } from "./help-videos/api.js";
13
+ import { formatDuration as Me } from "./help-videos/viewer/format.js";
14
+ import { PickList as He } from "./imports/ServiceConfigBuilder.js";
15
+ import { LiveFigure as pe } from "./LiveFigure.js";
16
+ const he = {
17
17
  info: "bg-sky-500",
18
18
  warn: "bg-amber-500",
19
19
  critical: "bg-red-500"
20
20
  };
21
- function ot({ className: r }) {
22
- var me;
23
- const i = R(), c = pe(), [b, h] = u(""), [s, p] = u(""), [o, n] = u("info"), [m, x] = u(!1), [d, N] = u(!1), [g, be] = u(!0), [M, ge] = u(!1), [S, fe] = u("banner"), [H, ye] = u(!1), [W, ke] = u(""), [V, U] = u(""), [X, ve] = u(""), [K, B] = u([]), [A, Ne] = u([]), [ee, q] = u(null), [T, te] = u(""), [ae, re] = u(""), F = Qe({ status: "published" }), ne = () => {
24
- if (!T) return {};
25
- const e = Number(ae);
21
+ function it({ className: r }) {
22
+ var ue;
23
+ const i = M(), c = xe(), [b, h] = u(""), [s, p] = u(""), [o, n] = u("info"), [m, x] = u(!1), [d, w] = u(!1), [g, ge] = u(!0), [H, fe] = u(!1), [q, ye] = u("banner"), [V, ke] = u(!1), [X, ve] = u(""), [U, B] = u(""), [ee, Ne] = u(""), [L, G] = u([]), [T, we] = u([]), [te, C] = u(null), [F, ae] = u(""), [re, ne] = u(""), j = Re({ status: "published" }), se = () => {
24
+ if (!F) return {};
25
+ const e = Number(re);
26
26
  return {
27
- help_video_id: T,
27
+ help_video_id: F,
28
28
  help_video_t_ms: Number.isFinite(e) && e > 0 ? Math.round(e * 1e3) : null
29
29
  };
30
- }, { data: G } = k({
30
+ }, { data: z } = v({
31
31
  queryKey: ["broadcast-config"],
32
- queryFn: () => i.request(v("/announcements/config")).then((e) => e.data).catch(() => ({ sms_enabled: !1 })),
32
+ queryFn: () => i.request(N("/announcements/config")).then((e) => e.data).catch(() => ({ sms_enabled: !1 })),
33
33
  staleTime: 5 * 6e4
34
- }), { data: we = [] } = k({
34
+ }), { data: _e = [] } = v({
35
35
  queryKey: ["broadcast-dimensions"],
36
- queryFn: () => i.request(v("/scope-dimensions")).then((e) => e.data ?? []).catch(() => []),
36
+ queryFn: () => i.request(N("/scope-dimensions")).then((e) => e.data ?? []).catch(() => []),
37
37
  staleTime: 5 * 6e4
38
- }), { data: _e = [] } = k({
38
+ }), { data: Se = [] } = v({
39
39
  queryKey: ["broadcast-roles"],
40
- queryFn: () => i.request(v("/chat/roles")).then((e) => e.data ?? []).catch(() => []),
40
+ queryFn: () => i.request(N("/chat/roles")).then((e) => e.data ?? []).catch(() => []),
41
41
  staleTime: 5 * 6e4
42
- }), { data: se = [] } = k({
42
+ }), { data: de = [] } = v({
43
43
  queryKey: ["broadcasts"],
44
- queryFn: () => i.request(v("/announcements")).then((e) => e.data ?? [])
44
+ queryFn: () => i.request(N("/announcements")).then((e) => e.data ?? [])
45
45
  });
46
- Pe("broadcasts", () => {
46
+ Ee("broadcasts", () => {
47
47
  c.invalidateQueries({ queryKey: ["broadcasts"] }), c.invalidateQueries({ queryKey: ["broadcast-receipt-summary"] }), c.invalidateQueries({ queryKey: ["broadcast-receipts"] });
48
48
  });
49
- const w = J(() => {
49
+ const _ = W(() => {
50
50
  const e = [];
51
- return g && e.push(S), m && e.push("email"), d && e.push("sms"), M && e.push("login"), e;
52
- }, [g, S, m, d, M]), L = J(
53
- () => K.map((e) => {
51
+ return g && e.push(q), m && e.push("email"), d && e.push("sms"), H && e.push("login"), e;
52
+ }, [g, q, m, d, H]), P = W(
53
+ () => L.map((e) => {
54
54
  const l = {};
55
- for (const [f, _] of Object.entries(e)) f && _.length > 0 && (l[f] = _);
55
+ for (const [f, S] of Object.entries(e)) f && S.length > 0 && (l[f] = S);
56
56
  return l;
57
57
  }).filter((e) => Object.keys(e).length > 0),
58
- [K]
59
- ), P = J(
58
+ [L]
59
+ ), E = W(
60
60
  () => ({
61
- ...L.length > 0 ? { groups: L } : {},
62
- ...A.length > 0 ? { roles: A } : {}
61
+ ...P.length > 0 ? { groups: P } : {},
62
+ ...T.length > 0 ? { roles: T } : {}
63
63
  }),
64
- [L, A]
65
- ), [de, E] = u(null), C = $({
64
+ [P, T]
65
+ ), [le, O] = u(null), $ = A({
66
66
  mutationFn: (e) => i.request(
67
- j("/announcements", {
67
+ K("/announcements", {
68
68
  ...e != null && e.confirm ? { confirm_audience: !0 } : {},
69
69
  subject: b.trim() || void 0,
70
70
  message: s.trim(),
71
71
  severity: o,
72
- channels: w,
73
- starts_at: W || void 0,
74
- scheduled_send_at: V || void 0,
75
- ends_at: X || void 0,
76
- require_ack: g && S === "banner" ? H : !1,
77
- audience: P,
78
- ...ne()
72
+ channels: _,
73
+ starts_at: X || void 0,
74
+ scheduled_send_at: U || void 0,
75
+ ends_at: ee || void 0,
76
+ require_ack: g && q === "banner" ? V : !1,
77
+ audience: E,
78
+ ...se()
79
79
  })
80
80
  ),
81
81
  onSuccess: (e) => {
82
- E(null);
82
+ O(null);
83
83
  const l = e.data.scheduled_for;
84
- q(
85
- l ? `Scheduled — delivers ${new Date(l).toLocaleString()}. Cancel from the history below.` : w.some((f) => f !== "banner") ? `Sent — reached ${e.data.delivered} recipient(s).` : "Banner published."
86
- ), p(""), h(""), U(""), te(""), re(""), c.invalidateQueries({ queryKey: ["broadcasts"] }), c.invalidateQueries({ queryKey: ["announcements-active"] });
84
+ C(
85
+ l ? `Scheduled — delivers ${new Date(l).toLocaleString()}. Cancel from the history below.` : _.some((f) => f !== "banner") ? `Sent — reached ${e.data.delivered} recipient(s).` : "Banner published."
86
+ ), p(""), h(""), B(""), ae(""), ne(""), c.invalidateQueries({ queryKey: ["broadcasts"] }), c.invalidateQueries({ queryKey: ["announcements-active"] });
87
87
  },
88
88
  onError: (e) => {
89
- const l = Oe(e);
89
+ const l = De(e);
90
90
  if (l) {
91
- E(l);
91
+ O(l);
92
92
  return;
93
93
  }
94
- q(e.message);
94
+ C(e.message);
95
95
  }
96
- }), O = s.trim().length > 0 && w.length > 0 && !C.isPending, { data: le = [] } = k({
96
+ }), D = s.trim().length > 0 && _.length > 0 && !$.isPending, { data: oe = [] } = v({
97
97
  queryKey: ["broadcast-templates"],
98
- queryFn: () => i.request(v("/announcements/templates")).then((e) => e.data ?? []).catch(() => []),
98
+ queryFn: () => i.request(N("/announcements/templates")).then((e) => e.data ?? []).catch(() => []),
99
99
  staleTime: 6e4
100
- }), oe = $({
100
+ }), ie = A({
101
101
  mutationFn: (e) => i.request(
102
- j("/announcements/templates", {
102
+ K("/announcements/templates", {
103
103
  name: e,
104
104
  snapshot: {
105
105
  subject: b,
106
106
  message: s,
107
107
  severity: o,
108
- channels: w,
109
- require_ack: H,
110
- audience: P
108
+ channels: _,
109
+ require_ack: V,
110
+ audience: E
111
111
  }
112
112
  })
113
113
  ),
114
114
  onSuccess: () => void c.invalidateQueries({ queryKey: ["broadcast-templates"] })
115
- }), Se = (e) => {
115
+ }), qe = (e) => {
116
116
  const l = e.snapshot ?? {};
117
117
  typeof l.subject == "string" && h(l.subject), typeof l.message == "string" && p(l.message);
118
- }, [z, ie] = u(""), [qe, ce] = u(!1), Y = $({
118
+ }, [Y, ce] = u(""), [Ce, me] = u(!1), Z = A({
119
119
  mutationFn: () => i.request(
120
- j("/announcements/test-send", {
120
+ K("/announcements/test-send", {
121
121
  subject: b.trim() || void 0,
122
122
  message: s.trim(),
123
- channels: w.filter((e) => e !== "banner"),
124
- ...ne()
123
+ channels: _.filter((e) => e !== "banner"),
124
+ ...se()
125
125
  })
126
126
  ),
127
- onSuccess: (e) => q(
127
+ onSuccess: (e) => C(
128
128
  `Test sent to you — ${Object.entries(e.data ?? {}).map(([l, f]) => `${l}: ${f}`).join(", ")}`
129
129
  ),
130
- onError: (e) => q(e.message)
131
- }), D = (/* @__PURE__ */ new Date()).getHours(), Ce = !V && (D >= 21 || D < 7), $e = $({
132
- mutationFn: ({ id: e, body: l }) => i.request(Ke(`/announcements/${e}`, l)),
130
+ onError: (e) => C(e.message)
131
+ }), I = (/* @__PURE__ */ new Date()).getHours(), $e = !U && (I >= 21 || I < 7), Ae = A({
132
+ mutationFn: ({ id: e, body: l }) => i.request(Le(`/announcements/${e}`, l)),
133
133
  onSuccess: () => {
134
134
  c.invalidateQueries({ queryKey: ["broadcasts"] }), c.invalidateQueries({ queryKey: ["announcements-active"] });
135
135
  }
136
- }), Ae = $({
137
- mutationFn: (e) => i.request(Le(`/announcements/${e}`)),
136
+ }), Te = A({
137
+ mutationFn: (e) => i.request(Pe(`/announcements/${e}`)),
138
138
  onSuccess: () => {
139
139
  c.invalidateQueries({ queryKey: ["broadcasts"] }), c.invalidateQueries({ queryKey: ["announcements-active"] });
140
140
  }
141
141
  });
142
- return /* @__PURE__ */ a("div", { className: y("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-6", r), children: [
142
+ return /* @__PURE__ */ a("div", { className: k("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-6", r), children: [
143
143
  /* @__PURE__ */ a("div", { className: "max-w-[760px] rounded-lg border border-slate-200 bg-white p-4 dark:border-border dark:bg-card", children: [
144
144
  /* @__PURE__ */ t("p", { className: "text-[13px] font-semibold text-slate-800 dark:text-foreground", children: "Audience" }),
145
145
  /* @__PURE__ */ t("p", { className: "mt-0.5 text-[11.5px] text-slate-400", children: "No selection = everyone. Zone/role targeting narrows both send channels and who sees a banner." }),
146
146
  /* @__PURE__ */ a("div", { className: "mt-3 space-y-2", children: [
147
- K.map((e, l) => /* @__PURE__ */ t(
148
- Ve,
147
+ L.map((e, l) => /* @__PURE__ */ t(
148
+ Ue,
149
149
  {
150
150
  index: l,
151
151
  group: e,
152
- dimensions: we,
153
- onChange: (f) => B((_) => _.map((Z, Te) => Te === l ? f : Z)),
154
- onRemove: () => B((f) => f.filter((_, Z) => Z !== l))
152
+ dimensions: _e,
153
+ onChange: (f) => G((S) => S.map((J, Fe) => Fe === l ? f : J)),
154
+ onRemove: () => G((f) => f.filter((S, J) => J !== l))
155
155
  },
156
156
  l
157
157
  )),
@@ -159,26 +159,26 @@ function ot({ className: r }) {
159
159
  "button",
160
160
  {
161
161
  type: "button",
162
- onClick: () => B((e) => [...e, {}]),
162
+ onClick: () => G((e) => [...e, {}]),
163
163
  className: "rounded-md border border-dashed border-slate-300 px-3 py-1.5 text-[11.5px] text-slate-500 hover:border-slate-400 hover:text-slate-700 dark:border-border dark:text-muted-foreground",
164
164
  children: [
165
165
  "+",
166
166
  " ",
167
- K.length === 0 ? "Target by scope (e.g. Zone 2 + Node Splits)" : "Add another group (OR)"
167
+ L.length === 0 ? "Target by scope (e.g. Zone 2 + Node Splits)" : "Add another group (OR)"
168
168
  ]
169
169
  }
170
170
  )
171
171
  ] }),
172
172
  /* @__PURE__ */ a("div", { className: "mt-3", children: [
173
173
  /* @__PURE__ */ t("p", { className: "mb-1 text-[11.5px] font-medium text-slate-700 dark:text-foreground", children: "Limit to roles" }),
174
- /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-1.5", children: _e.map((e) => {
175
- const l = A.includes(e.id);
174
+ /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-1.5", children: Se.map((e) => {
175
+ const l = T.includes(e.id);
176
176
  return /* @__PURE__ */ t(
177
177
  "button",
178
178
  {
179
179
  type: "button",
180
- onClick: () => Ne((f) => l ? f.filter((_) => _ !== e.id) : [...f, e.id]),
181
- className: y(
180
+ onClick: () => we((f) => l ? f.filter((S) => S !== e.id) : [...f, e.id]),
181
+ className: k(
182
182
  "rounded-full border px-2.5 py-0.5 text-[11.5px] transition-colors",
183
183
  l ? "border-nvr-cyan/50 bg-nvr-cyan/10 text-slate-800 dark:text-foreground" : "border-slate-200 text-slate-500 hover:text-slate-700 dark:border-border dark:text-muted-foreground"
184
184
  ),
@@ -189,10 +189,10 @@ function ot({ className: r }) {
189
189
  }) })
190
190
  ] }),
191
191
  /* @__PURE__ */ t("div", { className: "mt-3 border-t border-slate-100 pt-2.5 dark:border-border", children: /* @__PURE__ */ t(
192
- he,
192
+ be,
193
193
  {
194
- audience: P,
195
- everyone: L.length === 0 && A.length === 0,
194
+ audience: E,
195
+ everyone: P.length === 0 && T.length === 0,
196
196
  label: "Sending to"
197
197
  }
198
198
  ) })
@@ -200,10 +200,10 @@ function ot({ className: r }) {
200
200
  /* @__PURE__ */ a("div", { className: "max-w-[760px] rounded-lg border border-slate-200 bg-white p-4 dark:border-border dark:bg-card", children: [
201
201
  /* @__PURE__ */ t("p", { className: "text-[13px] font-semibold text-slate-800 dark:text-foreground", children: "Message" }),
202
202
  /* @__PURE__ */ t(
203
- Ie,
203
+ Qe,
204
204
  {
205
- audience: P,
206
- channels: w,
205
+ audience: E,
206
+ channels: _,
207
207
  severity: o,
208
208
  onUse: (e) => {
209
209
  e.subject !== void 0 && h(e.subject), p(e.message);
@@ -255,22 +255,22 @@ function ot({ className: r }) {
255
255
  /* @__PURE__ */ a(
256
256
  "select",
257
257
  {
258
- value: T,
259
- onChange: (e) => te(e.target.value),
258
+ value: F,
259
+ onChange: (e) => ae(e.target.value),
260
260
  className: "h-7 max-w-[320px] rounded-md border border-slate-200 bg-background px-1.5 text-[12px] text-slate-800 dark:border-border dark:text-foreground",
261
261
  "aria-label": "Attach a video",
262
262
  "data-broadcast-video-id": !0,
263
263
  children: [
264
264
  /* @__PURE__ */ t("option", { value: "", children: "None" }),
265
- (((me = F.data) == null ? void 0 : me.data) ?? []).map((e) => /* @__PURE__ */ a("option", { value: e.id, children: [
265
+ (((ue = j.data) == null ? void 0 : ue.data) ?? []).map((e) => /* @__PURE__ */ a("option", { value: e.id, children: [
266
266
  e.title || "Untitled video",
267
- e.duration_ms != null ? ` (${Re(e.duration_ms)})` : ""
267
+ e.duration_ms != null ? ` (${Me(e.duration_ms)})` : ""
268
268
  ] }, e.id))
269
269
  ]
270
270
  }
271
271
  )
272
272
  ] }),
273
- T && /* @__PURE__ */ a("label", { className: "flex items-center gap-1.5", children: [
273
+ F && /* @__PURE__ */ a("label", { className: "flex items-center gap-1.5", children: [
274
274
  "Start at",
275
275
  /* @__PURE__ */ t(
276
276
  "input",
@@ -278,8 +278,8 @@ function ot({ className: r }) {
278
278
  type: "number",
279
279
  min: 0,
280
280
  step: 1,
281
- value: ae,
282
- onChange: (e) => re(e.target.value),
281
+ value: re,
282
+ onChange: (e) => ne(e.target.value),
283
283
  placeholder: "0",
284
284
  className: "h-7 w-20 rounded-md border border-slate-200 bg-background px-1.5 text-[12px] dark:border-border",
285
285
  "aria-label": "Start at (seconds)",
@@ -288,17 +288,17 @@ function ot({ className: r }) {
288
288
  ),
289
289
  "seconds"
290
290
  ] }),
291
- F.hasNextPage && /* @__PURE__ */ t(
291
+ j.hasNextPage && /* @__PURE__ */ t(
292
292
  "button",
293
293
  {
294
294
  type: "button",
295
- onClick: () => void F.fetchNextPage(),
296
- disabled: F.isFetchingNextPage,
295
+ onClick: () => void j.fetchNextPage(),
296
+ disabled: j.isFetchingNextPage,
297
297
  className: "rounded border border-slate-200 px-1.5 py-0.5 text-[11px] hover:bg-slate-50 dark:border-border dark:hover:bg-muted",
298
- children: F.isFetchingNextPage ? "Loading…" : "More videos"
298
+ children: j.isFetchingNextPage ? "Loading…" : "More videos"
299
299
  }
300
300
  ),
301
- T && /* @__PURE__ */ t("span", { className: "text-slate-400 dark:text-slate-500", children: "Shown as a card with a link to that moment — only to people who can watch the video." })
301
+ F && /* @__PURE__ */ t("span", { className: "text-slate-400 dark:text-slate-500", children: "Shown as a card with a link to that moment — only to people who can watch the video." })
302
302
  ]
303
303
  }
304
304
  ),
@@ -309,7 +309,7 @@ function ot({ className: r }) {
309
309
  {
310
310
  type: "checkbox",
311
311
  checked: g,
312
- onChange: (e) => be(e.target.checked),
312
+ onChange: (e) => ge(e.target.checked),
313
313
  className: "h-3.5 w-3.5"
314
314
  }
315
315
  ),
@@ -322,10 +322,10 @@ function ot({ className: r }) {
322
322
  "button",
323
323
  {
324
324
  type: "button",
325
- onClick: () => fe(e.value),
326
- className: y(
325
+ onClick: () => ye(e.value),
326
+ className: k(
327
327
  "rounded px-2 py-0.5 text-[11px] font-medium transition-colors",
328
- S === e.value ? "bg-nvr-cyan/10 text-slate-800 dark:text-foreground" : "text-slate-400 hover:text-slate-600"
328
+ q === e.value ? "bg-nvr-cyan/10 text-slate-800 dark:text-foreground" : "text-slate-400 hover:text-slate-600"
329
329
  ),
330
330
  children: e.label
331
331
  },
@@ -353,8 +353,8 @@ function ot({ className: r }) {
353
353
  "input",
354
354
  {
355
355
  type: "checkbox",
356
- checked: M,
357
- onChange: (e) => ge(e.target.checked),
356
+ checked: H,
357
+ onChange: (e) => fe(e.target.checked),
358
358
  className: "h-3.5 w-3.5"
359
359
  }
360
360
  ),
@@ -362,26 +362,26 @@ function ot({ className: r }) {
362
362
  ]
363
363
  }
364
364
  ),
365
- (G == null ? void 0 : G.sms_enabled) && /* @__PURE__ */ a("label", { className: "flex cursor-pointer items-center gap-1.5 text-[12px] text-slate-600 dark:text-muted-foreground", children: [
365
+ (z == null ? void 0 : z.sms_enabled) && /* @__PURE__ */ a("label", { className: "flex cursor-pointer items-center gap-1.5 text-[12px] text-slate-600 dark:text-muted-foreground", children: [
366
366
  /* @__PURE__ */ t(
367
367
  "input",
368
368
  {
369
369
  type: "checkbox",
370
370
  checked: d,
371
- onChange: (e) => N(e.target.checked),
371
+ onChange: (e) => w(e.target.checked),
372
372
  className: "h-3.5 w-3.5"
373
373
  }
374
374
  ),
375
375
  "Text (SMS)"
376
376
  ] }),
377
- g && S === "banner" && /* @__PURE__ */ a(Q, { children: [
377
+ g && q === "banner" && /* @__PURE__ */ a(R, { children: [
378
378
  /* @__PURE__ */ a("label", { className: "flex cursor-pointer items-center gap-1.5 text-[12px] text-slate-600 dark:text-slate-300", children: [
379
379
  /* @__PURE__ */ t(
380
380
  "input",
381
381
  {
382
382
  type: "checkbox",
383
- checked: H,
384
- onChange: (e) => ye(e.target.checked),
383
+ checked: V,
384
+ onChange: (e) => ke(e.target.checked),
385
385
  className: "h-3.5 w-3.5"
386
386
  }
387
387
  ),
@@ -392,12 +392,12 @@ function ot({ className: r }) {
392
392
  {
393
393
  type: "button",
394
394
  onClick: () => n(e),
395
- className: y(
395
+ className: k(
396
396
  "flex items-center gap-1.5 rounded px-2 py-0.5 text-[11px] font-medium capitalize transition-colors",
397
397
  o === e ? "bg-nvr-cyan/10 text-slate-800 dark:text-foreground" : "text-slate-400 hover:text-slate-600"
398
398
  ),
399
399
  children: [
400
- /* @__PURE__ */ t("span", { className: y("h-1.5 w-1.5 rounded-full", xe[e]) }),
400
+ /* @__PURE__ */ t("span", { className: k("h-1.5 w-1.5 rounded-full", he[e]) }),
401
401
  e
402
402
  ]
403
403
  },
@@ -409,8 +409,8 @@ function ot({ className: r }) {
409
409
  "input",
410
410
  {
411
411
  type: "datetime-local",
412
- value: W,
413
- onChange: (e) => ke(e.target.value),
412
+ value: X,
413
+ onChange: (e) => ve(e.target.value),
414
414
  className: "h-7 rounded-md border border-slate-200 bg-background px-1.5 text-[12px] dark:border-border"
415
415
  }
416
416
  )
@@ -421,15 +421,15 @@ function ot({ className: r }) {
421
421
  "input",
422
422
  {
423
423
  type: "datetime-local",
424
- value: X,
425
- onChange: (e) => ve(e.target.value),
424
+ value: ee,
425
+ onChange: (e) => Ne(e.target.value),
426
426
  className: "h-7 rounded-md border border-slate-200 bg-background px-1.5 text-[12px] dark:border-border"
427
427
  }
428
428
  )
429
429
  ] })
430
430
  ] })
431
431
  ] }),
432
- g && S === "banner" && /* @__PURE__ */ t("p", { className: "mt-1.5 text-[11px] text-slate-400", children: "Starts/Ends control only the banner's visibility window: it appears at Starts (empty = right away) and auto-expires at Ends for everyone who hasn't dismissed it (empty = stays up until each person dismisses it, or you turn it Off in history). Email, text, and inbox messages always send once, immediately — the window doesn't delay them." }),
432
+ g && q === "banner" && /* @__PURE__ */ t("p", { className: "mt-1.5 text-[11px] text-slate-400", children: "Starts/Ends control only the banner's visibility window: it appears at Starts (empty = right away) and auto-expires at Ends for everyone who hasn't dismissed it (empty = stays up until each person dismisses it, or you turn it Off in history). Email, text, and inbox messages always send once, immediately — the window doesn't delay them." }),
433
433
  /* @__PURE__ */ a("div", { className: "mt-4 flex flex-wrap items-center gap-3", children: [
434
434
  /* @__PURE__ */ a("label", { className: "flex items-center gap-1.5 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
435
435
  "Send later",
@@ -437,44 +437,44 @@ function ot({ className: r }) {
437
437
  "input",
438
438
  {
439
439
  type: "datetime-local",
440
- value: V,
441
- onChange: (e) => U(e.target.value),
440
+ value: U,
441
+ onChange: (e) => B(e.target.value),
442
442
  title: "Leave empty to send immediately. With a time set, every channel (banner included) waits until then.",
443
443
  className: "h-7 rounded-md border border-slate-200 bg-background px-1.5 text-[12px] dark:border-border"
444
444
  }
445
445
  )
446
446
  ] }),
447
- w.some((e) => e !== "banner") && /* @__PURE__ */ t(
447
+ _.some((e) => e !== "banner") && /* @__PURE__ */ t(
448
448
  "button",
449
449
  {
450
450
  type: "button",
451
- disabled: !O || Y.isPending,
451
+ disabled: !D || Z.isPending,
452
452
  onClick: () => {
453
- q(null), Y.mutate();
453
+ C(null), Z.mutate();
454
454
  },
455
455
  "data-tip": "Send this compose to YOURSELF over the picked channels first (#429)",
456
456
  className: "h-8 rounded-md border border-slate-200 px-3 text-[12.5px] font-medium text-slate-600 hover:bg-muted disabled:opacity-50 dark:border-border dark:text-slate-300",
457
- children: Y.isPending ? "Testing…" : "Test on me"
457
+ children: Z.isPending ? "Testing…" : "Test on me"
458
458
  }
459
459
  ),
460
460
  /* @__PURE__ */ t(
461
461
  "button",
462
462
  {
463
463
  type: "button",
464
- disabled: !O,
464
+ disabled: !D,
465
465
  onClick: () => {
466
- q(null), E(null), C.mutate(void 0);
466
+ C(null), O(null), $.mutate(void 0);
467
467
  },
468
468
  className: "h-8 rounded-md bg-nvr-cyan px-4 text-[12.5px] font-medium text-white disabled:opacity-50",
469
- children: C.isPending ? "Sending…" : "Send"
469
+ children: $.isPending ? "Sending…" : "Send"
470
470
  }
471
471
  ),
472
- qe ? /* @__PURE__ */ a("span", { className: "flex items-center gap-1", children: [
472
+ Ce ? /* @__PURE__ */ a("span", { className: "flex items-center gap-1", children: [
473
473
  /* @__PURE__ */ t(
474
474
  "input",
475
475
  {
476
- value: z,
477
- onChange: (e) => ie(e.target.value),
476
+ value: Y,
477
+ onChange: (e) => ce(e.target.value),
478
478
  placeholder: "Template name…",
479
479
  className: "h-7 w-40 rounded-md border border-slate-200 bg-background px-1.5 text-[12px] dark:border-border"
480
480
  }
@@ -483,9 +483,9 @@ function ot({ className: r }) {
483
483
  "button",
484
484
  {
485
485
  type: "button",
486
- disabled: !z.trim() || oe.isPending,
486
+ disabled: !Y.trim() || ie.isPending,
487
487
  onClick: () => {
488
- oe.mutate(z.trim()), ce(!1), ie("");
488
+ ie.mutate(Y.trim()), me(!1), ce("");
489
489
  },
490
490
  className: "h-7 rounded-md border border-slate-200 px-2 text-[11.5px] hover:bg-muted dark:border-border",
491
491
  children: "Save"
@@ -496,29 +496,29 @@ function ot({ className: r }) {
496
496
  {
497
497
  type: "button",
498
498
  disabled: !s.trim(),
499
- onClick: () => ce(!0),
499
+ onClick: () => me(!0),
500
500
  "data-tip": "Save this compose (audience + channels + text) as a reusable template (#104)",
501
501
  className: "h-8 rounded-md border border-dashed border-slate-300 px-2.5 text-[11.5px] text-slate-500 hover:text-slate-700 disabled:opacity-40 dark:border-border",
502
502
  children: "☆ Save template"
503
503
  }
504
504
  ),
505
- !O && !C.isPending && /* @__PURE__ */ t("span", { className: "text-[11.5px] text-slate-400", children: "A message and at least one channel are required." }),
506
- ee && /* @__PURE__ */ t("span", { className: "text-[12px] font-medium text-emerald-600 dark:text-emerald-400", children: ee })
505
+ !D && !$.isPending && /* @__PURE__ */ t("span", { className: "text-[11.5px] text-slate-400", children: "A message and at least one channel are required." }),
506
+ te && /* @__PURE__ */ t("span", { className: "text-[12px] font-medium text-emerald-600 dark:text-emerald-400", children: te })
507
507
  ] }),
508
- de && /* @__PURE__ */ t(
509
- De,
508
+ le && /* @__PURE__ */ t(
509
+ Ie,
510
510
  {
511
511
  className: "mt-3",
512
- preview: de,
513
- busy: C.isPending,
512
+ preview: le,
513
+ busy: $.isPending,
514
514
  confirmLabel: "Confirm and send",
515
- onConfirm: () => C.mutate({ confirm: !0 }),
516
- onCancel: () => E(null)
515
+ onConfirm: () => $.mutate({ confirm: !0 }),
516
+ onCancel: () => O(null)
517
517
  }
518
518
  ),
519
- Ce && O && /* @__PURE__ */ a("p", { className: "mt-2 rounded-md bg-amber-50 px-3 py-1.5 text-[12px] text-amber-700 dark:bg-amber-400/10 dark:text-amber-400", children: [
519
+ $e && D && /* @__PURE__ */ a("p", { className: "mt-2 rounded-md bg-amber-50 px-3 py-1.5 text-[12px] text-amber-700 dark:bg-amber-400/10 dark:text-amber-400", children: [
520
520
  "It's ",
521
- D >= 21 ? "late" : "early",
521
+ I >= 21 ? "late" : "early",
522
522
  " for most recipients — consider the schedule field so this lands in the morning instead of overnight.",
523
523
  " ",
524
524
  /* @__PURE__ */ t(
@@ -528,9 +528,9 @@ function ot({ className: r }) {
528
528
  className: "font-medium underline underline-offset-2",
529
529
  onClick: () => {
530
530
  const e = /* @__PURE__ */ new Date();
531
- D >= 21 && e.setDate(e.getDate() + 1), e.setHours(8, 0, 0, 0);
531
+ I >= 21 && e.setDate(e.getDate() + 1), e.setHours(8, 0, 0, 0);
532
532
  const l = (f) => String(f).padStart(2, "0");
533
- U(
533
+ B(
534
534
  `${e.getFullYear()}-${l(e.getMonth() + 1)}-${l(e.getDate())}T${l(e.getHours())}:${l(e.getMinutes())}`
535
535
  );
536
536
  },
@@ -538,9 +538,9 @@ function ot({ className: r }) {
538
538
  }
539
539
  )
540
540
  ] }),
541
- le.length > 0 && /* @__PURE__ */ a("div", { className: "mt-2 flex flex-wrap items-center gap-1.5", children: [
541
+ oe.length > 0 && /* @__PURE__ */ a("div", { className: "mt-2 flex flex-wrap items-center gap-1.5", children: [
542
542
  /* @__PURE__ */ t("span", { className: "text-[11px] text-slate-400", children: "Templates:" }),
543
- le.map((e) => /* @__PURE__ */ t(
543
+ oe.map((e) => /* @__PURE__ */ t(
544
544
  "span",
545
545
  {
546
546
  className: "inline-flex items-center overflow-hidden rounded-full border border-slate-200 dark:border-border",
@@ -548,7 +548,7 @@ function ot({ className: r }) {
548
548
  "button",
549
549
  {
550
550
  type: "button",
551
- onClick: () => Se(e),
551
+ onClick: () => qe(e),
552
552
  className: "px-2 py-0.5 text-[11.5px] text-slate-600 hover:bg-muted dark:text-slate-300",
553
553
  children: e.name
554
554
  }
@@ -560,39 +560,39 @@ function ot({ className: r }) {
560
560
  ] }),
561
561
  /* @__PURE__ */ a("div", { className: "max-w-[760px] space-y-2", children: [
562
562
  /* @__PURE__ */ t("p", { className: "text-[11px] font-semibold uppercase tracking-wide text-slate-500 dark:text-muted-foreground", children: "History" }),
563
- se.length === 0 && /* @__PURE__ */ t("p", { className: "text-[12px] text-slate-400", children: "Nothing sent yet." }),
564
- se.map((e) => /* @__PURE__ */ t(
565
- He,
563
+ de.length === 0 && /* @__PURE__ */ t("p", { className: "text-[12px] text-slate-400", children: "Nothing sent yet." }),
564
+ de.map((e) => /* @__PURE__ */ t(
565
+ Ve,
566
566
  {
567
567
  broadcast: e,
568
- onPatch: $e.mutate,
569
- onRemove: Ae.mutate
568
+ onPatch: Ae.mutate,
569
+ onRemove: Te.mutate
570
570
  },
571
571
  e.id
572
572
  ))
573
573
  ] })
574
574
  ] });
575
575
  }
576
- function He({
576
+ function Ve({
577
577
  broadcast: r,
578
578
  onPatch: i,
579
579
  onRemove: c
580
580
  }) {
581
- const b = R(), h = pe(), [s, p] = u(!1), { data: o } = k({
581
+ const b = M(), h = xe(), [s, p] = u(!1), { data: o } = v({
582
582
  queryKey: ["broadcast-receipt-summary", r.id],
583
- queryFn: () => b.request(v(`/announcements/${r.id}/receipts/summary`)).then((d) => d.data),
583
+ queryFn: () => b.request(N(`/announcements/${r.id}/receipts/summary`)).then((d) => d.data),
584
584
  enabled: s,
585
585
  staleTime: 5e3
586
- }), n = $({
586
+ }), n = A({
587
587
  mutationFn: () => b.request(
588
- j(`/announcements/${r.id}/nudge`, {})
588
+ K(`/announcements/${r.id}/nudge`, {})
589
589
  ),
590
590
  onSuccess: () => {
591
591
  h.invalidateQueries({ queryKey: ["broadcast-receipt-summary", r.id] }), h.invalidateQueries({ queryKey: ["broadcast-receipts", r.id] });
592
592
  }
593
- }), m = Ee(4e3), { data: x } = k({
593
+ }), m = Oe(4e3), { data: x } = v({
594
594
  queryKey: ["broadcast-receipts", r.id],
595
- queryFn: () => b.request(v(`/announcements/${r.id}/receipts`)).then((d) => d.data),
595
+ queryFn: () => b.request(N(`/announcements/${r.id}/receipts`)).then((d) => d.data),
596
596
  enabled: s,
597
597
  staleTime: 5e3,
598
598
  // Live ticker (#265): a freshly-sent broadcast's counts climb in real
@@ -601,7 +601,7 @@ function He({
601
601
  });
602
602
  return /* @__PURE__ */ a("div", { className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: [
603
603
  /* @__PURE__ */ a("div", { className: "flex items-start gap-3 px-4 py-3", children: [
604
- /* @__PURE__ */ t("span", { className: y("mt-1.5 h-2 w-2 shrink-0 rounded-full", xe[r.severity]) }),
604
+ /* @__PURE__ */ t("span", { className: k("mt-1.5 h-2 w-2 shrink-0 rounded-full", he[r.severity]) }),
605
605
  /* @__PURE__ */ a("div", { className: "min-w-0 flex-1", children: [
606
606
  r.subject && /* @__PURE__ */ t("p", { className: "text-[12.5px] font-medium text-slate-800 dark:text-foreground", children: r.subject }),
607
607
  /* @__PURE__ */ t("p", { className: "text-[12.5px] text-slate-600 dark:text-muted-foreground", children: r.message }),
@@ -612,7 +612,7 @@ function He({
612
612
  r.scheduled_send_at && !r.sent_at && /* @__PURE__ */ a("p", { className: "mt-1 flex items-center gap-2 text-[11.5px]", children: [
613
613
  /* @__PURE__ */ a("span", { className: "rounded-full bg-amber-100 px-2 py-0.5 font-semibold text-amber-700 dark:bg-amber-500/15 dark:text-amber-400", children: [
614
614
  "Scheduled · ",
615
- I(r.scheduled_send_at)
615
+ Q(r.scheduled_send_at)
616
616
  ] }),
617
617
  /* @__PURE__ */ t(
618
618
  "button",
@@ -627,15 +627,15 @@ function He({
627
627
  /* @__PURE__ */ a("p", { className: "mt-0.5 text-[11px] text-slate-500 dark:text-slate-400", children: [
628
628
  (r.channels ?? []).join(" + "),
629
629
  r.delivered_count != null && ` · reached ${r.delivered_count}`,
630
- r.opened_count != null && (r.channels ?? []).includes("message") && /* @__PURE__ */ a(Q, { children: [
630
+ r.opened_count != null && (r.channels ?? []).includes("message") && /* @__PURE__ */ a(R, { children: [
631
631
  " · inbox opened ",
632
- /* @__PURE__ */ t(ue, { value: r.opened_count, className: "font-medium", children: r.opened_count })
632
+ /* @__PURE__ */ t(pe, { value: r.opened_count, className: "font-medium", children: y(r.opened_count) })
633
633
  ] }),
634
- (r.channels ?? []).includes("banner") && /* @__PURE__ */ a(Q, { children: [
634
+ (r.channels ?? []).includes("banner") && /* @__PURE__ */ a(R, { children: [
635
635
  " · banner dismissed ",
636
- /* @__PURE__ */ t(ue, { value: r.ack_count, className: "font-medium", children: r.ack_count })
636
+ /* @__PURE__ */ t(pe, { value: r.ack_count, className: "font-medium", children: y(r.ack_count) })
637
637
  ] }),
638
- r.created_at && ` · ${I(r.created_at)}`,
638
+ r.created_at && ` · ${Q(r.created_at)}`,
639
639
  " · ",
640
640
  /* @__PURE__ */ a(
641
641
  "button",
@@ -646,7 +646,7 @@ function He({
646
646
  children: [
647
647
  s ? "hide receipts" : "who saw this?",
648
648
  (r.click_count ?? 0) > 0 && /* @__PURE__ */ a("span", { className: "ml-1.5 rounded bg-nvr-cyan/[0.08] px-1.5 py-px text-[10px] font-medium text-[#007a99] dark:text-nvr-cyan", children: [
649
- r.click_count,
649
+ y(r.click_count),
650
650
  " link click",
651
651
  r.click_count === 1 ? "" : "s"
652
652
  ] })
@@ -660,7 +660,7 @@ function He({
660
660
  {
661
661
  type: "button",
662
662
  onClick: () => i({ id: r.id, body: { is_active: !r.is_active } }),
663
- className: y(
663
+ className: k(
664
664
  "shrink-0 rounded-full border px-2 py-0.5 text-[11px] font-medium",
665
665
  r.is_active ? "border-emerald-300 text-emerald-700 dark:border-emerald-500/40 dark:text-emerald-400" : "border-slate-200 text-slate-400 dark:border-border"
666
666
  ),
@@ -687,14 +687,16 @@ function He({
687
687
  /* @__PURE__ */ t("p", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "By audience" }),
688
688
  /* @__PURE__ */ a("span", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
689
689
  "delivered ",
690
- /* @__PURE__ */ t("b", { children: o.totals.delivered }),
691
- " · opened ",
692
- /* @__PURE__ */ t("b", { children: o.totals.opened }),
693
- " · acknowledged ",
694
- /* @__PURE__ */ t("b", { children: o.totals.acked }),
690
+ /* @__PURE__ */ t("b", { children: y(o.totals.delivered) }),
691
+ " · opened",
692
+ " ",
693
+ /* @__PURE__ */ t("b", { children: y(o.totals.opened) }),
694
+ " · acknowledged",
695
+ " ",
696
+ /* @__PURE__ */ t("b", { children: y(o.totals.acked) }),
695
697
  " · still unread",
696
698
  " ",
697
- /* @__PURE__ */ t("b", { children: o.totals.unread })
699
+ /* @__PURE__ */ t("b", { children: y(o.totals.unread) })
698
700
  ] }),
699
701
  /* @__PURE__ */ t("span", { className: "flex-1" }),
700
702
  o.totals.unread > 0 && /* @__PURE__ */ t(
@@ -710,7 +712,7 @@ function He({
710
712
  )
711
713
  ] }),
712
714
  /* @__PURE__ */ t("div", { className: "mt-2 grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-3", children: [["Role", o.by_role], ...Object.entries(o.by_dimension)].map(
713
- ([d, N]) => /* @__PURE__ */ a("table", { className: "w-full text-[11.5px] tabular-nums", children: [
715
+ ([d, w]) => /* @__PURE__ */ a("table", { className: "w-full text-[11.5px] tabular-nums", children: [
714
716
  /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ a("tr", { className: "text-left text-[10px] uppercase tracking-wide text-slate-400", children: [
715
717
  /* @__PURE__ */ t("th", { className: "py-0.5 font-semibold", children: d }),
716
718
  /* @__PURE__ */ t("th", { className: "py-0.5 text-right font-semibold", children: "Sent" }),
@@ -718,7 +720,7 @@ function He({
718
720
  /* @__PURE__ */ t("th", { className: "py-0.5 text-right font-semibold", children: "Ack" }),
719
721
  /* @__PURE__ */ t("th", { className: "py-0.5 text-right font-semibold", children: "Unread" })
720
722
  ] }) }),
721
- /* @__PURE__ */ t("tbody", { children: N.map((g) => /* @__PURE__ */ a("tr", { className: "border-t border-slate-100 dark:border-border", children: [
723
+ /* @__PURE__ */ t("tbody", { children: w.map((g) => /* @__PURE__ */ a("tr", { className: "border-t border-slate-100 dark:border-border", children: [
722
724
  /* @__PURE__ */ t("td", { className: "py-0.5 text-slate-700 dark:text-foreground", children: g.label }),
723
725
  /* @__PURE__ */ t("td", { className: "py-0.5 text-right", children: g.delivered }),
724
726
  /* @__PURE__ */ t("td", { className: "py-0.5 text-right text-emerald-700 dark:text-emerald-400", children: g.opened }),
@@ -726,7 +728,7 @@ function He({
726
728
  /* @__PURE__ */ t(
727
729
  "td",
728
730
  {
729
- className: y(
731
+ className: k(
730
732
  "py-0.5 text-right",
731
733
  g.unread > 0 ? "text-amber-700 dark:text-amber-400" : "text-slate-400"
732
734
  ),
@@ -750,21 +752,21 @@ function He({
750
752
  /* @__PURE__ */ t("p", { className: "mb-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "Seen (banner dismissed)" }),
751
753
  !x && /* @__PURE__ */ t("p", { className: "text-[11.5px] text-slate-400", children: "Loading…" }),
752
754
  x && x.acks.length === 0 && /* @__PURE__ */ t("p", { className: "text-[11.5px] text-slate-400", children: "Nobody has dismissed it yet." }),
753
- x == null ? void 0 : x.acks.map((d, N) => /* @__PURE__ */ a("p", { className: "text-[11.5px] text-slate-600 dark:text-muted-foreground", children: [
755
+ x == null ? void 0 : x.acks.map((d, w) => /* @__PURE__ */ a("p", { className: "text-[11.5px] text-slate-600 dark:text-muted-foreground", children: [
754
756
  d.user_name || d.user_email || "Unknown",
755
- /* @__PURE__ */ t("span", { className: "text-slate-400", children: d.acked_at ? ` · ${I(d.acked_at)}` : "" })
756
- ] }, N))
757
+ /* @__PURE__ */ t("span", { className: "text-slate-400", children: d.acked_at ? ` · ${Q(d.acked_at)}` : "" })
758
+ ] }, w))
757
759
  ] }),
758
760
  /* @__PURE__ */ a("div", { children: [
759
761
  /* @__PURE__ */ t("p", { className: "mb-1 text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: "Deliveries" }),
760
762
  !x && /* @__PURE__ */ t("p", { className: "text-[11.5px] text-slate-400", children: "Loading…" }),
761
763
  x && x.deliveries.length === 0 && /* @__PURE__ */ t("p", { className: "text-[11.5px] text-slate-400", children: "Banner-only — no send channels on this broadcast." }),
762
- x == null ? void 0 : x.deliveries.map((d, N) => /* @__PURE__ */ a("p", { className: "text-[11.5px] text-slate-600 dark:text-muted-foreground", children: [
764
+ x == null ? void 0 : x.deliveries.map((d, w) => /* @__PURE__ */ a("p", { className: "text-[11.5px] text-slate-600 dark:text-muted-foreground", children: [
763
765
  d.user_name || d.user_email || "Unknown",
764
766
  /* @__PURE__ */ a(
765
767
  "span",
766
768
  {
767
- className: y(
769
+ className: k(
768
770
  "ml-1.5 rounded px-1 py-px text-[9.5px] font-medium uppercase",
769
771
  d.status === "sent" ? "bg-emerald-500/10 text-emerald-700 dark:text-emerald-400" : d.status === "failed" ? "bg-red-500/10 text-red-700 dark:text-red-400" : "bg-slate-500/10 text-slate-500"
770
772
  ),
@@ -775,13 +777,13 @@ function He({
775
777
  ]
776
778
  }
777
779
  ),
778
- /* @__PURE__ */ t("span", { className: "text-slate-400", children: d.delivered_at ? ` · ${I(d.delivered_at)}` : "" })
779
- ] }, N))
780
+ /* @__PURE__ */ t("span", { className: "text-slate-400", children: d.delivered_at ? ` · ${Q(d.delivered_at)}` : "" })
781
+ ] }, w))
780
782
  ] })
781
783
  ] })
782
784
  ] });
783
785
  }
784
- function Ve({
786
+ function Ue({
785
787
  index: r,
786
788
  group: i,
787
789
  dimensions: c,
@@ -798,7 +800,7 @@ function Ve({
798
800
  ] }),
799
801
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2.5", children: [
800
802
  o && /* @__PURE__ */ t(
801
- he,
803
+ be,
802
804
  {
803
805
  audience: { groups: [i] },
804
806
  everyone: !1,
@@ -823,7 +825,7 @@ function Ve({
823
825
  return /* @__PURE__ */ a("div", { className: "flex flex-wrap items-start gap-2", children: [
824
826
  /* @__PURE__ */ t("span", { className: "mt-0.5 w-[110px] shrink-0 text-[11.5px] font-medium text-slate-600 dark:text-muted-foreground", children: (m == null ? void 0 : m.label) ?? n }),
825
827
  /* @__PURE__ */ t("div", { className: "min-w-0 flex-1", children: m ? /* @__PURE__ */ t(
826
- Ue,
828
+ Be,
827
829
  {
828
830
  dim: m,
829
831
  selected: i[n] ?? [],
@@ -836,7 +838,7 @@ function Ve({
836
838
  ] }, n);
837
839
  }),
838
840
  p.length > 0 && /* @__PURE__ */ t("div", { className: "w-[200px]", children: /* @__PURE__ */ t(
839
- Me,
841
+ He,
840
842
  {
841
843
  value: "",
842
844
  onChange: (n) => {
@@ -849,15 +851,15 @@ function Ve({
849
851
  ] })
850
852
  ] });
851
853
  }
852
- function Ue({
854
+ function Be({
853
855
  dim: r,
854
856
  selected: i,
855
857
  onChange: c
856
858
  }) {
857
- const b = R(), { data: h = [] } = k({
859
+ const b = M(), { data: h = [] } = v({
858
860
  queryKey: ["broadcast-dim-options", r.target_collection],
859
861
  queryFn: () => b.request(
860
- v(`/items/${r.target_collection}`, { limit: 200 })
862
+ N(`/items/${r.target_collection}`, { limit: 200 })
861
863
  ).then(
862
864
  (s) => (s.data ?? []).map((p) => ({
863
865
  id: p.id,
@@ -877,7 +879,7 @@ function Ue({
877
879
  onClick: () => c(
878
880
  p ? i.filter((o) => String(o) !== String(s.id)) : [...i, s.id]
879
881
  ),
880
- className: y(
882
+ className: k(
881
883
  "rounded-full border px-2.5 py-0.5 text-[11.5px] transition-colors",
882
884
  p ? "border-nvr-cyan/50 bg-nvr-cyan/10 text-slate-800 dark:text-foreground" : "border-slate-200 bg-white text-slate-500 hover:text-slate-700 dark:border-border dark:bg-card dark:text-muted-foreground"
883
885
  ),
@@ -888,15 +890,15 @@ function Ue({
888
890
  })
889
891
  ] });
890
892
  }
891
- function he({
893
+ function be({
892
894
  audience: r,
893
895
  everyone: i,
894
896
  label: c,
895
897
  compact: b
896
898
  }) {
897
- const h = R(), [s, p] = u(!1), o = JSON.stringify(r), { data: n } = k({
899
+ const h = M(), [s, p] = u(!1), o = JSON.stringify(r), { data: n } = v({
898
900
  queryKey: ["broadcast-audience-preview", o],
899
- queryFn: () => h.request(j("/announcements/preview-audience", { audience: r })).then((m) => m.data),
901
+ queryFn: () => h.request(K("/announcements/preview-audience", { audience: r })).then((m) => m.data),
900
902
  enabled: !i,
901
903
  staleTime: 3e4
902
904
  });
@@ -904,7 +906,7 @@ function he({
904
906
  c,
905
907
  ": ",
906
908
  /* @__PURE__ */ t("span", { className: "font-medium", children: "Everyone" })
907
- ] }) : /* @__PURE__ */ a(Q, { children: [
909
+ ] }) : /* @__PURE__ */ a(R, { children: [
908
910
  /* @__PURE__ */ a(
909
911
  "button",
910
912
  {
@@ -916,13 +918,13 @@ function he({
916
918
  c,
917
919
  ":",
918
920
  " ",
919
- /* @__PURE__ */ t("span", { className: "font-medium", children: n ? `${n.count} user${n.count === 1 ? "" : "s"}` : "…" }),
921
+ /* @__PURE__ */ t("span", { className: "font-medium", children: n ? `${y(n.count)} user${n.count === 1 ? "" : "s"}` : "…" }),
920
922
  !b && n != null && n.count > 0 && " (deduped across groups)"
921
923
  ]
922
924
  }
923
925
  ),
924
926
  s && n && /* @__PURE__ */ t(
925
- Be,
927
+ Ge,
926
928
  {
927
929
  title: c === "Matches" ? "This group matches" : "Sending to",
928
930
  count: n.count,
@@ -933,7 +935,7 @@ function he({
933
935
  )
934
936
  ] });
935
937
  }
936
- function Be({
938
+ function Ge({
937
939
  title: r,
938
940
  count: i,
939
941
  users: c,
@@ -941,7 +943,7 @@ function Be({
941
943
  onClose: h
942
944
  }) {
943
945
  const [s, p] = u("");
944
- Fe(() => {
946
+ je(() => {
945
947
  const m = (x) => {
946
948
  x.key === "Escape" && h();
947
949
  };
@@ -950,7 +952,7 @@ function Be({
950
952
  const o = s.trim().toLowerCase(), n = o ? c.filter(
951
953
  (m) => m.name.toLowerCase().includes(o) || (m.email ?? "").toLowerCase().includes(o)
952
954
  ) : c;
953
- return je(
955
+ return Ke(
954
956
  /* @__PURE__ */ a("div", { className: "fixed inset-0 z-[100]", children: [
955
957
  /* @__PURE__ */ t("div", { className: "absolute inset-0 bg-black/30", onClick: h }),
956
958
  /* @__PURE__ */ a("div", { className: "absolute right-0 top-0 flex h-full w-[380px] max-w-[92vw] flex-col border-l border-slate-200 bg-white shadow-xl dark:border-border dark:bg-card", children: [
@@ -959,7 +961,7 @@ function Be({
959
961
  /* @__PURE__ */ a("p", { className: "text-[13px] font-semibold text-slate-800 dark:text-foreground", children: [
960
962
  r,
961
963
  /* @__PURE__ */ a("span", { className: "ml-1.5 font-normal text-slate-400", children: [
962
- i,
964
+ y(i),
963
965
  " user",
964
966
  i === 1 ? "" : "s"
965
967
  ] })
@@ -1000,9 +1002,9 @@ function Be({
1000
1002
  )),
1001
1003
  b && /* @__PURE__ */ a("p", { className: "py-2 text-[11px] text-slate-400", children: [
1002
1004
  "Showing the first ",
1003
- c.length,
1005
+ y(c.length),
1004
1006
  " of ",
1005
- i,
1007
+ y(i),
1006
1008
  "."
1007
1009
  ] })
1008
1010
  ] })
@@ -1012,5 +1014,5 @@ function Be({
1012
1014
  );
1013
1015
  }
1014
1016
  export {
1015
- ot as BroadcastView
1017
+ it as BroadcastView
1016
1018
  };