@nivaro/react 0.3.99 → 0.3.100

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 (43) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useFormSchema.js +82 -85
  3. package/dist/hooks/useSessionRecorder.js +206 -175
  4. package/dist/index.d.ts +38 -13
  5. package/dist/index.js +182 -180
  6. package/dist/lib/commands.js +15 -11
  7. package/dist/shared/components/CollectionBrowserView.js +516 -503
  8. package/dist/shared/components/ItemEditForm.js +3021 -3019
  9. package/dist/shared/components/JobsTray.js +20 -16
  10. package/dist/shared/components/MyWorkView.js +133 -126
  11. package/dist/shared/components/NotificationBell.js +314 -288
  12. package/dist/shared/components/RecordCompare.js +38 -40
  13. package/dist/shared/components/RecordReadView.js +119 -119
  14. package/dist/shared/components/cbv/FoundElsewhere.js +61 -0
  15. package/dist/shared/components/item-edit/InlineGridField.js +45 -45
  16. package/dist/shared/components/item-edit/InlineTableField.js +750 -749
  17. package/dist/shared/components/item-edit/QuickPickerDialog.js +44 -44
  18. package/dist/shared/components/item-edit/RawEditSheet.js +122 -114
  19. package/dist/shared/components/item-edit/RelationCombobox.js +454 -378
  20. package/dist/shared/components/item-edit/SummaryPanel.js +56 -48
  21. package/dist/shared/components/item-edit/related-missing.js +75 -19
  22. package/dist/shared/components/notifications/NotificationCenterView.js +249 -226
  23. package/dist/shared/components/panels/AccessDeniedPanel.js +31 -28
  24. package/dist/shared/components/panels/BackgroundMove.js +175 -0
  25. package/dist/shared/components/panels/MoveAdvisory.js +204 -0
  26. package/dist/shared/components/panels/PipelinePanel.js +1450 -1219
  27. package/dist/shared/components/panels/RecordIntegrityBanner.js +113 -112
  28. package/dist/shared/lib/commands.js +18 -14
  29. package/dist/shared/lib/error-hints.js +1 -1
  30. package/dist/shared/lib/job-failure-text.js +12 -0
  31. package/dist/shared/lib/move-failure.js +9 -0
  32. package/dist/shared/lib/obligation-banner.js +15 -14
  33. package/dist/shared/lib/partner-failure.js +71 -0
  34. package/dist/shared/lib/prefetch.js +73 -73
  35. package/dist/shared/lib/replay-checkout.js +18 -13
  36. package/dist/shared/lib/replay-context.js +90 -77
  37. package/dist/shared/lib/replay-idle.js +21 -0
  38. package/dist/shared/lib/replay-socket.js +21 -17
  39. package/dist/shared/lib/rum.js +56 -51
  40. package/dist/shared/lib/safe-error.js +17 -13
  41. package/dist/shared/lib/stale-chunk.js +69 -26
  42. package/dist/shared/lib/system-collections.js +20 -0
  43. package/package.json +1 -1
@@ -1,322 +1,348 @@
1
- import { jsxs as o, jsx as a } from "react/jsx-runtime";
2
- import { readUnreadNotificationCount as ye, markNotificationRead as Ne, markNotificationsRead as Ce, markAllNotificationsRead as $e } from "@nivaro/sdk";
3
- import { useQueryClient as _e, useQuery as ne, useMutation as E } from "@tanstack/react-query";
4
- import { Bell as Se, CheckCheck as qe, ExternalLink as re, Check as z, History as Ee, ShieldCheck as Ae, ChevronDown as Le } from "lucide-react";
5
- import { useState as $, useRef as oe, useEffect as O, useMemo as le, Fragment as ie } from "react";
6
- import { createPortal as Re } from "react-dom";
7
- import { useNivaroClient as Fe } from "../context.js";
8
- import { get as Me, post as Ie } from "../lib/commands.js";
9
- import { useLiveRefetchInterval as De } from "../lib/live-queries.js";
10
- import { resolveNotificationTargetFor as A, runNotificationTarget as L } from "../lib/notification-target.js";
11
- import { useTabAttention as Te } from "../lib/tab-attention.js";
12
- import { formatRelative as se } from "../lib/utils.js";
13
- import { AsItWasSheet as Ke } from "./notifications/AsItWasSheet.js";
14
- import { bundleLocally as Be, laneTone as je, bundleAsNotification as ze, bundleHeadline as Oe, categoryChipLabel as Pe } from "./notifications/bundles.js";
15
- import { DeliveryChips as Qe } from "./notifications/DeliveryChips.js";
16
- import { NotificationActions as He } from "./notifications/NotificationActions.js";
17
- import { NotificationDetailBits as Ge } from "./notifications/NotificationDetailBits.js";
18
- function Ue(n) {
19
- var u, h;
1
+ import { jsxs as r, jsx as t, Fragment as Ne } from "react/jsx-runtime";
2
+ import { readUnreadNotificationCount as Ce, markNotificationRead as $e, markNotificationsRead as _e, markAllNotificationsRead as Se } from "@nivaro/sdk";
3
+ import { useQueryClient as qe, useQuery as re, useMutation as F } from "@tanstack/react-query";
4
+ import { Bell as Me, CheckCheck as Re, ExternalLink as oe, Check as A, History as Ee, ShieldCheck as Fe, ChevronDown as Ae } from "lucide-react";
5
+ import { useState as S, useRef as le, useEffect as P, useMemo as ie, Fragment as se } from "react";
6
+ import { createPortal as Le } from "react-dom";
7
+ import { useNivaroClient as Ie } from "../context.js";
8
+ import { get as De, post as Te } from "../lib/commands.js";
9
+ import { useLiveRefetchInterval as Ke } from "../lib/live-queries.js";
10
+ import { resolveNotificationTargetFor as q, runNotificationTarget as L } from "../lib/notification-target.js";
11
+ import { useTabAttention as Be } from "../lib/tab-attention.js";
12
+ import { formatRelative as de, cn as je } from "../lib/utils.js";
13
+ import { AsItWasSheet as ze } from "./notifications/AsItWasSheet.js";
14
+ import { bundleLocally as Oe, laneTone as Pe, bundleAsNotification as Qe, bundleHeadline as He, categoryChipLabel as Ge } from "./notifications/bundles.js";
15
+ import { DeliveryChips as Ue } from "./notifications/DeliveryChips.js";
16
+ import { NotificationActions as Ye } from "./notifications/NotificationActions.js";
17
+ import { NotificationDetailBits as Ve } from "./notifications/NotificationDetailBits.js";
18
+ function We(n) {
19
+ var m, g;
20
20
  if (!n) return null;
21
21
  if (n.target_label && n.kind !== "record") return n.target_label;
22
22
  if (String(n.collection ?? "") === "__chat__") return "Chat";
23
23
  if (!n.collection) return null;
24
- const d = ((u = n.record_collection_label) == null ? void 0 : u.trim()) || (() => {
25
- const f = String(n.collection).replace(/_/g, " ").trim();
26
- return f ? f.charAt(0).toUpperCase() + f.slice(1) : null;
27
- })(), c = (h = n.record_label) == null ? void 0 : h.trim();
28
- return d && c ? `${d} ${c}` : c || d || null;
24
+ const d = ((m = n.record_collection_label) == null ? void 0 : m.trim()) || (() => {
25
+ const h = String(n.collection).replace(/_/g, " ").trim();
26
+ return h ? h.charAt(0).toUpperCase() + h.slice(1) : null;
27
+ })(), u = (g = n.record_label) == null ? void 0 : g.trim();
28
+ return d && u ? `${d} ${u}` : u || d || null;
29
29
  }
30
- function Ye(n) {
31
- var d, c;
32
- return de(n) ? n.revision_id != null || (((c = (d = n.detail) == null ? void 0 : d.changes) == null ? void 0 : c.length) ?? 0) > 0 || n.category === "watch" || n.category === "workflow" : !1;
30
+ function Je(n) {
31
+ var d, u;
32
+ return ce(n) ? n.revision_id != null || (((u = (d = n.detail) == null ? void 0 : d.changes) == null ? void 0 : u.length) ?? 0) > 0 || n.category === "watch" || n.category === "workflow" : !1;
33
33
  }
34
- function de(n) {
35
- var h, f, _;
36
- if ((((h = n.target) == null ? void 0 : h.kind) ?? n.kind ?? (n.collection && n.item ? "record" : null)) !== "record") return !1;
37
- const c = ((f = n.target) == null ? void 0 : f.collection) ?? n.collection, u = ((_ = n.target) == null ? void 0 : _.id) ?? n.item;
38
- return !!c && u != null && u !== "" && !/^(nivaro|directus)_|^__/i.test(c);
34
+ function ce(n) {
35
+ var g, h, M;
36
+ if ((((g = n.target) == null ? void 0 : g.kind) ?? n.kind ?? (n.collection && n.item ? "record" : null)) !== "record") return !1;
37
+ const u = ((h = n.target) == null ? void 0 : h.collection) ?? n.collection, m = ((M = n.target) == null ? void 0 : M.id) ?? n.item;
38
+ return !!u && m != null && m !== "" && !/^(nivaro|directus)_|^__/i.test(u);
39
39
  }
40
- function mt({
40
+ function xt({
41
41
  routes: n,
42
42
  onNavigate: d,
43
- app: c,
44
- subscribe: u,
45
- buttonClassName: h,
46
- panelClassName: f,
47
- beforeList: _,
48
- extraBadge: P = 0,
49
- mailLogUrl: ce,
50
- renderTrigger: Q,
51
- allPath: H,
52
- subscriptionsPath: ue,
53
- rulesPath: me,
54
- onActionError: pe,
55
- panelPlacement: y = "below",
43
+ app: u,
44
+ subscribe: m,
45
+ buttonClassName: g,
46
+ panelClassName: h,
47
+ beforeList: M,
48
+ extraBadge: Q = 0,
49
+ mailLogUrl: ue,
50
+ renderTrigger: H,
51
+ allPath: G,
52
+ subscriptionsPath: me,
53
+ rulesPath: pe,
54
+ onActionError: fe,
55
+ panelPlacement: $ = "below",
56
56
  tabBadge: xe = !0
57
57
  }) {
58
- const k = Fe(), [b, m] = $(!1), [g, G] = $("attention"), R = oe(null), U = oe(null), [F, fe] = $(null), Y = _e(), N = () => {
59
- Y.invalidateQueries({ queryKey: ["notification-count"] }), Y.invalidateQueries({ queryKey: ["notifications"] });
60
- }, he = De(6e4, { enabled: !!u, safetyMs: 12e4 }), { data: p } = ne({
58
+ const y = Ie(), [k, p] = S(!1), [w, U] = S("attention"), I = le(null), Y = le(null), [D, he] = S(null), V = qe(), _ = () => {
59
+ V.invalidateQueries({ queryKey: ["notification-count"] }), V.invalidateQueries({ queryKey: ["notifications"] });
60
+ }, be = Ke(6e4, { enabled: !!m, safetyMs: 12e4 }), { data: f } = re({
61
61
  queryKey: ["notification-count"],
62
- queryFn: () => k.request(ye()),
63
- refetchInterval: he
64
- }), M = (p == null ? void 0 : p.unread) ?? 0, I = (p == null ? void 0 : p.attention) ?? M, S = (p == null ? void 0 : p.lanes) ?? { critical: 0, fyi: 0 }, w = M + P;
65
- Te(I + P, { enabled: xe });
66
- const { data: x } = ne({
67
- queryKey: ["notifications", "bell", c ?? null, g],
68
- queryFn: () => k.request(
69
- Me("/notifications", {
62
+ queryFn: () => y.request(Ce()),
63
+ refetchInterval: be
64
+ }), T = (f == null ? void 0 : f.unread) ?? 0, K = (f == null ? void 0 : f.attention) ?? T, R = (f == null ? void 0 : f.lanes) ?? { critical: 0, fyi: 0 }, N = T + Q;
65
+ Be(K + Q, { enabled: xe });
66
+ const { data: x } = re({
67
+ queryKey: ["notifications", "bell", u ?? null, w],
68
+ queryFn: () => y.request(
69
+ De("/notifications", {
70
70
  limit: 60,
71
- app: c,
71
+ app: u,
72
72
  bundle: "record",
73
- ...g === "attention" ? { lane: "attention", status: "inbox" } : {},
74
- ...g === "fyi" ? { lane: "fyi", status: "inbox" } : {}
73
+ ...w === "attention" ? { lane: "attention", status: "inbox" } : {},
74
+ ...w === "fyi" ? { lane: "fyi", status: "inbox" } : {}
75
75
  })
76
76
  ).then((e) => {
77
- const t = e.pinned ?? [], l = new Set(t.map((r) => r.id)), s = (e.data ?? []).filter((r) => !l.has(r.id));
78
- return e.bundles ? { rows: s, bundles: e.bundles, pinned: t } : { ...Be(s), pinned: t };
77
+ const a = e.pinned ?? [], o = new Set(a.map((s) => s.id)), i = (e.data ?? []).filter((s) => !o.has(s.id));
78
+ return e.bundles ? { rows: i, bundles: e.bundles, pinned: a } : { ...Oe(i), pinned: a };
79
79
  }),
80
- enabled: b
81
- }), V = (x == null ? void 0 : x.rows) ?? [], D = (x == null ? void 0 : x.pinned) ?? [], W = (x == null ? void 0 : x.bundles) ?? [], [be, J] = $(() => /* @__PURE__ */ new Set()), [v, T] = $(null);
82
- O(() => u == null ? void 0 : u(N), [u]), O(() => {
83
- if (!b) return;
84
- const e = (t) => {
85
- var s, r;
86
- const l = t.target;
87
- (s = R.current) != null && s.contains(l) || (r = U.current) != null && r.contains(l) || m(!1);
80
+ enabled: k
81
+ }), W = (x == null ? void 0 : x.rows) ?? [], B = (x == null ? void 0 : x.pinned) ?? [], J = (x == null ? void 0 : x.bundles) ?? [], [ge, X] = S(() => /* @__PURE__ */ new Set()), [C, j] = S(null);
82
+ P(() => m == null ? void 0 : m(_), [m]), P(() => {
83
+ if (!k) return;
84
+ const e = (a) => {
85
+ var i, s;
86
+ const o = a.target;
87
+ (i = I.current) != null && i.contains(o) || (s = Y.current) != null && s.contains(o) || p(!1);
88
88
  };
89
89
  return window.addEventListener("mousedown", e), () => window.removeEventListener("mousedown", e);
90
- }, [b]), O(() => {
91
- if (!b || y !== "right") return;
90
+ }, [k]), P(() => {
91
+ if (!k || $ !== "right") return;
92
92
  const e = () => {
93
- var l;
94
- const t = (l = R.current) == null ? void 0 : l.getBoundingClientRect();
95
- t && fe({
96
- left: Math.round(t.right + 12),
97
- bottom: Math.max(8, Math.round(window.innerHeight - t.bottom))
93
+ var o;
94
+ const a = (o = I.current) == null ? void 0 : o.getBoundingClientRect();
95
+ a && he({
96
+ left: Math.round(a.right + 12),
97
+ bottom: Math.max(8, Math.round(window.innerHeight - a.bottom))
98
98
  });
99
99
  };
100
100
  return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
101
101
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
102
102
  };
103
- }, [b, y]);
104
- const X = E({
105
- mutationFn: (e) => k.request(Ie(`/notifications/${e}/acknowledge`)),
106
- onSuccess: N
107
- }), K = E({
108
- mutationFn: (e) => k.request(Ne(e)),
109
- onSuccess: N
110
- }), B = E({
111
- mutationFn: (e) => k.request(Ce(e)),
112
- onSuccess: N
113
- }), ge = E({
114
- mutationFn: () => k.request($e()),
115
- onSuccess: N
116
- }), Z = le(() => V.slice(0, 40), [V]), ee = le(() => {
103
+ }, [k, $]);
104
+ const Z = F({
105
+ mutationFn: (e) => y.request(Te(`/notifications/${e}/acknowledge`)),
106
+ onSuccess: _
107
+ }), E = F({
108
+ mutationFn: (e) => y.request($e(e)),
109
+ onSuccess: _
110
+ }), z = F({
111
+ mutationFn: (e) => y.request(_e(e)),
112
+ onSuccess: _
113
+ }), ke = F({
114
+ mutationFn: () => y.request(Se()),
115
+ onSuccess: _
116
+ }), ee = ie(() => W.slice(0, 40), [W]), te = ie(() => {
117
117
  const e = /* @__PURE__ */ new Map();
118
- for (const t of Z) {
119
- const l = t.collection && t.item ? `${t.collection}:${t.item}` : `single:${t.id}`, s = e.get(l) ?? {
120
- key: l,
121
- collection: t.collection ?? null,
122
- item: t.item ?? null,
118
+ for (const a of ee) {
119
+ const o = a.collection && a.item ? `${a.collection}:${a.item}` : `single:${a.id}`, i = e.get(o) ?? {
120
+ key: o,
121
+ collection: a.collection ?? null,
122
+ item: a.item ?? null,
123
123
  rows: []
124
124
  };
125
- s.rows.push(t), e.set(l, s);
125
+ i.rows.push(a), e.set(o, i);
126
126
  }
127
127
  return [...e.values()];
128
- }, [Z]), ke = (e) => {
129
- const t = A(e, n);
130
- t && (m(!1), L(t, d));
131
- }, te = (e) => {
132
- m(!1), d(e);
133
- }, j = (e, t, l = !1) => {
134
- var s;
135
- return /* @__PURE__ */ o(ie, { children: [
136
- /* @__PURE__ */ o(
128
+ }, [ee]), we = (e) => {
129
+ const a = q(e, n);
130
+ a && (p(!1), L(a, d));
131
+ }, ae = (e) => {
132
+ p(!1), d(e);
133
+ }, O = (e, a, o = !1) => {
134
+ var v;
135
+ const i = q(e, n) != null, s = `py-2 pr-3 ${o ? "pl-7" : "pl-3"}`, b = /* @__PURE__ */ r(Ne, { children: [
136
+ /* @__PURE__ */ t(
137
+ "span",
138
+ {
139
+ className: `mt-1.5 h-2 w-2 shrink-0 rounded-full ${e.read ? "bg-transparent" : e.lane === "critical" ? "bg-red-500" : "bg-nvr-cyan"}`
140
+ }
141
+ ),
142
+ /* @__PURE__ */ r("span", { className: "min-w-0 flex-1", children: [
143
+ /* @__PURE__ */ r(
144
+ "span",
145
+ {
146
+ className: `block truncate text-[12.5px] ${e.read ? "font-normal text-slate-600 dark:text-slate-400" : "font-medium text-slate-900 dark:text-slate-100"}`,
147
+ children: [
148
+ e.lane === "critical" && !e.read && /* @__PURE__ */ t("span", { className: "mr-1 rounded bg-red-500/10 px-1 text-[9.5px] font-bold uppercase tracking-wide text-red-600 dark:text-red-400", children: "Critical" }),
149
+ e.title
150
+ ]
151
+ }
152
+ ),
153
+ e.message && /* @__PURE__ */ t("span", { className: "mt-0.5 line-clamp-2 text-[11px] leading-snug text-slate-500", children: e.message.replace(/<[^>]+>/g, "") }),
154
+ /* @__PURE__ */ r("span", { className: "mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-[10.5px] text-slate-400", children: [
155
+ de(e.created_at),
156
+ /* @__PURE__ */ t(
157
+ Ue,
158
+ {
159
+ delivery: e.delivery,
160
+ mailLogUrl: ue,
161
+ onNavigate: ae
162
+ }
163
+ ),
164
+ ce(e) && // biome-ignore lint/a11y/useSemanticElements: nested inside the row's <button> — a real <button> is invalid there
165
+ /* @__PURE__ */ r(
166
+ "span",
167
+ {
168
+ role: "button",
169
+ tabIndex: -1,
170
+ "data-notification-as-it-was": e.id,
171
+ "data-tip": "The record as it was when you were told",
172
+ onClick: (c) => {
173
+ c.stopPropagation(), p(!1), j(e);
174
+ },
175
+ onKeyDown: (c) => {
176
+ (c.key === "Enter" || c.key === " ") && (c.preventDefault(), c.stopPropagation(), p(!1), j(e));
177
+ },
178
+ className: "inline-flex items-center gap-0.5 rounded px-1 text-[10.5px] text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
179
+ children: [
180
+ /* @__PURE__ */ t(Ee, { className: "h-3 w-3" }),
181
+ "as it was"
182
+ ]
183
+ }
184
+ )
185
+ ] })
186
+ ] })
187
+ ] }), l = "mt-0.5 rounded p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200";
188
+ return /* @__PURE__ */ r(se, { children: [
189
+ i ? /* @__PURE__ */ r(
137
190
  "button",
138
191
  {
139
192
  type: "button",
140
193
  onClick: () => {
141
- e.read || K.mutate(e.id), ke(e);
194
+ e.read || E.mutate(e.id), we(e);
142
195
  },
143
- className: `flex w-full items-start gap-2.5 py-2 pr-3 text-left transition-colors ${l ? "pl-7" : "pl-3"} ${t ? "hover:bg-slate-50 dark:hover:bg-muted" : "cursor-default"}`,
196
+ className: `flex w-full items-start gap-2.5 text-left transition-colors hover:bg-slate-50 dark:hover:bg-muted ${s}`,
144
197
  "data-notification-row": e.id,
145
198
  children: [
146
- /* @__PURE__ */ a(
147
- "span",
148
- {
149
- className: `mt-1.5 h-2 w-2 shrink-0 rounded-full ${e.read ? "bg-transparent" : e.lane === "critical" ? "bg-red-500" : "bg-nvr-cyan"}`
150
- }
151
- ),
152
- /* @__PURE__ */ o("span", { className: "min-w-0 flex-1", children: [
153
- /* @__PURE__ */ o(
154
- "span",
155
- {
156
- className: `block truncate text-[12.5px] ${e.read ? "font-normal text-slate-600 dark:text-slate-400" : "font-medium text-slate-900 dark:text-slate-100"}`,
157
- children: [
158
- e.lane === "critical" && !e.read && /* @__PURE__ */ a("span", { className: "mr-1 rounded bg-red-500/10 px-1 text-[9.5px] font-bold uppercase tracking-wide text-red-600 dark:text-red-400", children: "Critical" }),
159
- e.title
160
- ]
161
- }
162
- ),
163
- e.message && /* @__PURE__ */ a("span", { className: "mt-0.5 line-clamp-2 text-[11px] leading-snug text-slate-500", children: e.message.replace(/<[^>]+>/g, "") }),
164
- /* @__PURE__ */ o("span", { className: "mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-[10.5px] text-slate-400", children: [
165
- se(e.created_at),
166
- /* @__PURE__ */ a(
167
- Qe,
168
- {
169
- delivery: e.delivery,
170
- mailLogUrl: ce,
171
- onNavigate: te
172
- }
173
- ),
174
- de(e) && // biome-ignore lint/a11y/useSemanticElements: nested inside the row's <button> — a real <button> is invalid there
175
- /* @__PURE__ */ o(
176
- "span",
177
- {
178
- role: "button",
179
- tabIndex: -1,
180
- "data-notification-as-it-was": e.id,
181
- "data-tip": "The record as it was when you were told",
182
- onClick: (r) => {
183
- r.stopPropagation(), m(!1), T(e);
184
- },
185
- onKeyDown: (r) => {
186
- (r.key === "Enter" || r.key === " ") && (r.preventDefault(), r.stopPropagation(), m(!1), T(e));
187
- },
188
- className: "inline-flex items-center gap-0.5 rounded px-1 text-[10.5px] text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
189
- children: [
190
- /* @__PURE__ */ a(Ee, { className: "h-3 w-3" }),
191
- "as it was"
192
- ]
193
- }
194
- )
195
- ] })
196
- ] }),
197
- !t && !e.read && // biome-ignore lint/a11y/useSemanticElements: nested inside the row's <button> — a real <button> is invalid there
198
- /* @__PURE__ */ a(
199
+ b,
200
+ !a && !e.read && // biome-ignore lint/a11y/useSemanticElements: nested inside the row's <button> — a real <button> is invalid there
201
+ /* @__PURE__ */ t(
199
202
  "span",
200
203
  {
201
204
  role: "button",
202
205
  tabIndex: -1,
203
- title: "Mark read",
204
- onClick: (r) => {
205
- r.stopPropagation(), K.mutate(e.id);
206
+ "aria-label": "Mark read",
207
+ "data-tip": "Mark read",
208
+ onClick: (c) => {
209
+ c.stopPropagation(), E.mutate(e.id);
206
210
  },
207
- onKeyDown: (r) => {
208
- (r.key === "Enter" || r.key === " ") && (r.preventDefault(), r.stopPropagation(), K.mutate(e.id));
211
+ onKeyDown: (c) => {
212
+ (c.key === "Enter" || c.key === " ") && (c.preventDefault(), c.stopPropagation(), E.mutate(e.id));
209
213
  },
210
- className: "mt-0.5 rounded p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
211
- children: /* @__PURE__ */ a(z, { className: "h-3 w-3" })
214
+ className: l,
215
+ children: /* @__PURE__ */ t(A, { className: "h-3 w-3" })
216
+ }
217
+ )
218
+ ]
219
+ }
220
+ ) : /* @__PURE__ */ r(
221
+ "div",
222
+ {
223
+ className: `flex w-full items-start gap-2.5 text-left ${s}`,
224
+ "data-notification-row": e.id,
225
+ "data-notification-plain": !0,
226
+ children: [
227
+ b,
228
+ /* @__PURE__ */ t(
229
+ "button",
230
+ {
231
+ type: "button",
232
+ "aria-label": "Mark read",
233
+ "data-tip": "Mark read",
234
+ tabIndex: e.read ? -1 : void 0,
235
+ onClick: () => E.mutate(e.id),
236
+ className: je(l, "shrink-0", e.read && "invisible"),
237
+ children: /* @__PURE__ */ t(A, { className: "h-3 w-3" })
212
238
  }
213
239
  )
214
240
  ]
215
241
  }
216
242
  ),
217
- ((s = e.ack) == null ? void 0 : s.required) && !e.ack.at && /* @__PURE__ */ a("div", { className: `pb-2 pr-3 ${l ? "pl-[46px]" : "pl-[30px]"}`, children: /* @__PURE__ */ o(
243
+ ((v = e.ack) == null ? void 0 : v.required) && !e.ack.at && /* @__PURE__ */ t("div", { className: `pb-2 pr-3 ${o ? "pl-[46px]" : "pl-[30px]"}`, children: /* @__PURE__ */ r(
218
244
  "button",
219
245
  {
220
246
  type: "button",
221
- disabled: X.isPending,
222
- onClick: () => X.mutate(e.id),
247
+ disabled: Z.isPending,
248
+ onClick: () => Z.mutate(e.id),
223
249
  "data-notification-acknowledge": e.id,
224
250
  className: "inline-flex items-center gap-1 rounded-md bg-nvr-cyan px-2 py-1 text-[11px] font-medium text-white hover:opacity-90 disabled:opacity-50",
225
251
  children: [
226
- /* @__PURE__ */ a(Ae, { className: "h-3 w-3" }),
252
+ /* @__PURE__ */ t(Fe, { className: "h-3 w-3" }),
227
253
  "Acknowledge"
228
254
  ]
229
255
  }
230
256
  ) }),
231
- e.actions && e.actions.length > 0 && !e.read && /* @__PURE__ */ a(
232
- He,
257
+ e.actions && e.actions.length > 0 && !e.read && /* @__PURE__ */ t(
258
+ Ye,
233
259
  {
234
260
  actions: e.actions,
235
261
  notificationId: e.id,
236
- onError: pe,
237
- className: `pb-2 pr-3 ${l ? "pl-[46px]" : "pl-[30px]"}`
262
+ onError: fe,
263
+ className: `pb-2 pr-3 ${o ? "pl-[46px]" : "pl-[30px]"}`
238
264
  }
239
265
  ),
240
- /* @__PURE__ */ a(
241
- Ge,
266
+ /* @__PURE__ */ t(
267
+ Ve,
242
268
  {
243
269
  detail: e.detail,
244
270
  why: e.why,
245
271
  delivery: e.delivery,
246
272
  notificationId: e.id,
247
- recordChanges: Ye(e),
248
- subscriptionsPath: ue,
249
- rulesPath: me,
250
- onNavigate: te,
251
- className: `pb-3 pr-3 ${l ? "pl-[46px]" : "pl-[30px]"}`
273
+ recordChanges: Je(e),
274
+ subscriptionsPath: me,
275
+ rulesPath: pe,
276
+ onNavigate: ae,
277
+ className: `pb-3 pr-3 ${o ? "pl-[46px]" : "pl-[30px]"}`
252
278
  }
253
279
  )
254
280
  ] }, e.id);
255
- }, we = (e) => {
256
- const t = `${e.collection}:${e.item}`, l = be.has(t), s = je(e.lane), r = e.deleted ? null : A(ze(e), n), C = e.rows.filter((i) => !i.read).map((i) => i.id);
257
- return /* @__PURE__ */ o(
281
+ }, ve = (e) => {
282
+ const a = `${e.collection}:${e.item}`, o = ge.has(a), i = Pe(e.lane), s = e.deleted ? null : q(Qe(e), n), b = e.rows.filter((l) => !l.read).map((l) => l.id);
283
+ return /* @__PURE__ */ r(
258
284
  "div",
259
285
  {
260
286
  className: "border-b border-slate-50 last:border-b-0 dark:border-border/50",
261
287
  "data-notification-bundle-deleted": e.deleted ? "true" : void 0,
262
- "data-notification-bundle": t,
288
+ "data-notification-bundle": a,
263
289
  "data-notification-bundle-count": e.count,
264
290
  "data-notification-bundle-lane": e.lane,
265
291
  children: [
266
- /* @__PURE__ */ o("div", { className: "flex items-start gap-2 px-3 py-2", children: [
267
- /* @__PURE__ */ a(
292
+ /* @__PURE__ */ r("div", { className: "flex items-start gap-2 px-3 py-2", children: [
293
+ /* @__PURE__ */ t(
268
294
  "button",
269
295
  {
270
296
  type: "button",
271
- "aria-expanded": l,
272
- "aria-label": l ? "Collapse" : "Expand",
273
- "data-notification-bundle-expand": t,
274
- onClick: () => J((i) => {
275
- const q = new Set(i);
276
- return q.has(t) ? q.delete(t) : q.add(t), q;
297
+ "aria-expanded": o,
298
+ "aria-label": o ? "Collapse" : "Expand",
299
+ "data-notification-bundle-expand": a,
300
+ onClick: () => X((l) => {
301
+ const v = new Set(l);
302
+ return v.has(a) ? v.delete(a) : v.add(a), v;
277
303
  }),
278
304
  className: "mt-0.5 rounded p-0.5 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
279
- children: /* @__PURE__ */ a(
280
- Le,
305
+ children: /* @__PURE__ */ t(
306
+ Ae,
281
307
  {
282
- className: `h-3.5 w-3.5 transition-transform ${l ? "" : "-rotate-90"}`
308
+ className: `h-3.5 w-3.5 transition-transform ${o ? "" : "-rotate-90"}`
283
309
  }
284
310
  )
285
311
  }
286
312
  ),
287
- /* @__PURE__ */ o(
313
+ /* @__PURE__ */ r(
288
314
  "button",
289
315
  {
290
316
  type: "button",
291
317
  onClick: () => {
292
- r ? (m(!1), L(r, d)) : J((i) => new Set(i).add(t));
318
+ s ? (p(!1), L(s, d)) : X((l) => new Set(l).add(a));
293
319
  },
294
320
  className: "min-w-0 flex-1 text-left",
295
321
  children: [
296
- /* @__PURE__ */ o("span", { className: "flex items-center gap-1.5", children: [
297
- /* @__PURE__ */ a(
322
+ /* @__PURE__ */ r("span", { className: "flex items-center gap-1.5", children: [
323
+ /* @__PURE__ */ t(
298
324
  "span",
299
325
  {
300
- className: `h-2 w-2 shrink-0 rounded-full ${e.unread > 0 ? s.dot : "bg-transparent"}`
326
+ className: `h-2 w-2 shrink-0 rounded-full ${e.unread > 0 ? i.dot : "bg-transparent"}`
301
327
  }
302
328
  ),
303
- /* @__PURE__ */ a(
329
+ /* @__PURE__ */ t(
304
330
  "span",
305
331
  {
306
- className: `truncate text-[12.5px] ${e.unread > 0 ? `font-medium ${s.text}` : "font-normal text-slate-600 dark:text-slate-400"}`,
307
- children: Oe(e)
332
+ className: `truncate text-[12.5px] ${e.unread > 0 ? `font-medium ${i.text}` : "font-normal text-slate-600 dark:text-slate-400"}`,
333
+ children: He(e)
308
334
  }
309
335
  )
310
336
  ] }),
311
- /* @__PURE__ */ o("span", { className: "mt-1 flex flex-wrap items-center gap-1 pl-3.5 text-[10.5px] text-slate-400", children: [
312
- e.lane === "critical" && e.unread > 0 && /* @__PURE__ */ a(
337
+ /* @__PURE__ */ r("span", { className: "mt-1 flex flex-wrap items-center gap-1 pl-3.5 text-[10.5px] text-slate-400", children: [
338
+ e.lane === "critical" && e.unread > 0 && /* @__PURE__ */ t(
313
339
  "span",
314
340
  {
315
- className: `rounded px-1 text-[9.5px] font-bold uppercase tracking-wide ${s.chip}`,
341
+ className: `rounded px-1 text-[9.5px] font-bold uppercase tracking-wide ${i.chip}`,
316
342
  children: "Critical"
317
343
  }
318
344
  ),
319
- e.collection_label && /* @__PURE__ */ a(
345
+ e.collection_label && /* @__PURE__ */ t(
320
346
  "span",
321
347
  {
322
348
  className: "rounded border border-slate-200 px-1 py-px text-[9.5px] font-medium text-slate-500 dark:border-border dark:text-slate-400",
@@ -324,7 +350,7 @@ function mt({
324
350
  children: e.collection_label
325
351
  }
326
352
  ),
327
- e.deleted && /* @__PURE__ */ a(
353
+ e.deleted && /* @__PURE__ */ t(
328
354
  "span",
329
355
  {
330
356
  className: "rounded bg-rose-50 px-1 py-px text-[9.5px] font-semibold text-rose-700 dark:bg-rose-900/30 dark:text-rose-300",
@@ -332,17 +358,17 @@ function mt({
332
358
  children: "deleted"
333
359
  }
334
360
  ),
335
- e.categories.map((i) => /* @__PURE__ */ a(
361
+ e.categories.map((l) => /* @__PURE__ */ t(
336
362
  "span",
337
363
  {
338
364
  className: "rounded bg-slate-100 px-1 py-px text-[9.5px] font-medium text-slate-600 dark:bg-muted dark:text-slate-300",
339
- "data-notification-bundle-category": i,
340
- children: Pe(i)
365
+ "data-notification-bundle-category": l,
366
+ children: Ge(l)
341
367
  },
342
- i
368
+ l
343
369
  )),
344
- /* @__PURE__ */ a("span", { children: e.newest ? se(e.newest) : "" }),
345
- e.unread > 0 && e.unread < e.count && /* @__PURE__ */ o("span", { children: [
370
+ /* @__PURE__ */ t("span", { children: e.newest ? de(e.newest) : "" }),
371
+ e.unread > 0 && e.unread < e.count && /* @__PURE__ */ r("span", { children: [
346
372
  "· ",
347
373
  e.unread,
348
374
  " unread"
@@ -351,94 +377,94 @@ function mt({
351
377
  ]
352
378
  }
353
379
  ),
354
- /* @__PURE__ */ o("span", { className: "flex shrink-0 items-center gap-0.5", children: [
355
- r && /* @__PURE__ */ a(
380
+ /* @__PURE__ */ r("span", { className: "flex shrink-0 items-center gap-0.5", children: [
381
+ s && /* @__PURE__ */ t(
356
382
  "button",
357
383
  {
358
384
  type: "button",
359
385
  title: "Open record",
360
386
  onClick: () => {
361
- m(!1), L(r, d);
387
+ p(!1), L(s, d);
362
388
  },
363
389
  className: "rounded p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
364
- children: /* @__PURE__ */ a(re, { className: "h-3 w-3" })
390
+ children: /* @__PURE__ */ t(oe, { className: "h-3 w-3" })
365
391
  }
366
392
  ),
367
- C.length > 0 && /* @__PURE__ */ a(
393
+ b.length > 0 && /* @__PURE__ */ t(
368
394
  "button",
369
395
  {
370
396
  type: "button",
371
397
  title: "Mark all read",
372
- "data-notification-bundle-read": t,
373
- onClick: () => B.mutate(C),
398
+ "data-notification-bundle-read": a,
399
+ onClick: () => z.mutate(b),
374
400
  className: "rounded p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
375
- children: /* @__PURE__ */ a(z, { className: "h-3 w-3" })
401
+ children: /* @__PURE__ */ t(A, { className: "h-3 w-3" })
376
402
  }
377
403
  )
378
404
  ] })
379
405
  ] }),
380
- l && /* @__PURE__ */ a(
406
+ o && /* @__PURE__ */ t(
381
407
  "div",
382
408
  {
383
409
  className: "border-t border-slate-50 bg-slate-50/50 dark:border-border/50 dark:bg-muted/30",
384
- "data-notification-bundle-rows": t,
385
- children: e.rows.map((i) => j(i, !0, !0))
410
+ "data-notification-bundle-rows": a,
411
+ children: e.rows.map((l) => O(l, !0, !0))
386
412
  }
387
413
  )
388
414
  ]
389
415
  },
390
- `bundle:${t}`
416
+ `bundle:${a}`
391
417
  );
392
- }, ve = [
393
- { key: "attention", label: "Needs you", count: I },
394
- { key: "fyi", label: "FYI", count: S.fyi },
418
+ }, ye = [
419
+ { key: "attention", label: "Needs you", count: K },
420
+ { key: "fyi", label: "FYI", count: R.fyi },
395
421
  { key: "all", label: "All", count: null }
396
- ], ae = () => m((e) => (!e && g === "attention" && I === 0 && S.fyi > 0 && G("fyi"), !e));
397
- return /* @__PURE__ */ o("div", { ref: R, className: "relative", "data-nvr-notification-bell": !0, children: [
398
- Q ? Q({ open: b, badge: w, toggle: ae }) : /* @__PURE__ */ o(
422
+ ], ne = () => p((e) => (!e && w === "attention" && K === 0 && R.fyi > 0 && U("fyi"), !e));
423
+ return /* @__PURE__ */ r("div", { ref: I, className: "relative", "data-nvr-notification-bell": !0, children: [
424
+ H ? H({ open: k, badge: N, toggle: ne }) : /* @__PURE__ */ r(
399
425
  "button",
400
426
  {
401
427
  type: "button",
402
- onClick: ae,
403
- className: h ?? "relative rounded-md p-1.5 text-slate-500 transition-colors hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-muted",
404
- "aria-label": w ? `Notifications (${w} unread)` : "Notifications",
428
+ onClick: ne,
429
+ className: g ?? "relative rounded-md p-1.5 text-slate-500 transition-colors hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-muted",
430
+ "aria-label": N ? `Notifications (${N} unread)` : "Notifications",
405
431
  children: [
406
- /* @__PURE__ */ a(Se, { className: "h-4 w-4", strokeWidth: 1.8 }),
407
- w > 0 && /* @__PURE__ */ a(
432
+ /* @__PURE__ */ t(Me, { className: "h-4 w-4", strokeWidth: 1.8 }),
433
+ N > 0 && /* @__PURE__ */ t(
408
434
  "span",
409
435
  {
410
436
  "data-nvr-recording-hide": !0,
411
- className: `absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[9.5px] font-bold ${S.critical > 0 ? "bg-red-500 text-white" : "bg-nvr-cyan text-nvr-navy"}`,
412
- children: w > 99 ? "99+" : w
437
+ className: `absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[9.5px] font-bold ${R.critical > 0 ? "bg-red-500 text-white" : "bg-nvr-cyan text-nvr-navy"}`,
438
+ children: N > 99 ? "99+" : N
413
439
  }
414
440
  )
415
441
  ]
416
442
  }
417
443
  ),
418
- b && (y === "right" ? Re : (e) => e)(
419
- /* @__PURE__ */ o(
444
+ k && ($ === "right" ? Le : (e) => e)(
445
+ /* @__PURE__ */ r(
420
446
  "div",
421
447
  {
422
- ref: U,
423
- className: `${y === "right" ? "fixed z-[110]" : "absolute right-0 top-10 z-40"} w-[360px] overflow-hidden rounded-xl border border-slate-200 bg-white shadow-xl dark:border-border dark:bg-card ${f ?? ""}`,
424
- style: y === "right" && F ? { left: F.left, bottom: F.bottom } : void 0,
448
+ ref: Y,
449
+ className: `${$ === "right" ? "fixed z-[110]" : "absolute right-0 top-10 z-40"} w-[360px] overflow-hidden rounded-xl border border-slate-200 bg-white shadow-xl dark:border-border dark:bg-card ${h ?? ""}`,
450
+ style: $ === "right" && D ? { left: D.left, bottom: D.bottom } : void 0,
425
451
  "data-nvr-notification-panel": !0,
426
452
  children: [
427
- _,
428
- /* @__PURE__ */ o("div", { className: "flex items-center justify-between border-b border-slate-100 px-3 py-2 dark:border-border/60", children: [
429
- /* @__PURE__ */ a("div", { className: "flex items-center gap-1 rounded-md bg-slate-100 p-0.5 dark:bg-muted", children: ve.map((e) => /* @__PURE__ */ o(
453
+ M,
454
+ /* @__PURE__ */ r("div", { className: "flex items-center justify-between border-b border-slate-100 px-3 py-2 dark:border-border/60", children: [
455
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-1 rounded-md bg-slate-100 p-0.5 dark:bg-muted", children: ye.map((e) => /* @__PURE__ */ r(
430
456
  "button",
431
457
  {
432
458
  type: "button",
433
- onClick: () => G(e.key),
459
+ onClick: () => U(e.key),
434
460
  "data-nvr-lane-tab": e.key,
435
- className: g === e.key ? "rounded bg-white px-2 py-0.5 text-[11px] font-medium text-slate-900 shadow-sm dark:bg-card dark:text-slate-100" : "rounded px-2 py-0.5 text-[11px] font-medium text-slate-500 hover:text-slate-700 dark:text-slate-400",
461
+ className: w === e.key ? "rounded bg-white px-2 py-0.5 text-[11px] font-medium text-slate-900 shadow-sm dark:bg-card dark:text-slate-100" : "rounded px-2 py-0.5 text-[11px] font-medium text-slate-500 hover:text-slate-700 dark:text-slate-400",
436
462
  children: [
437
463
  e.label,
438
- e.count != null && e.count > 0 && /* @__PURE__ */ a(
464
+ e.count != null && e.count > 0 && /* @__PURE__ */ t(
439
465
  "span",
440
466
  {
441
- className: `ml-1 rounded-full px-1 text-[9.5px] font-bold ${e.key === "attention" && S.critical > 0 ? "bg-red-500/15 text-red-600 dark:text-red-400" : "bg-slate-200 text-slate-600 dark:bg-slate-700 dark:text-slate-300"}`,
467
+ className: `ml-1 rounded-full px-1 text-[9.5px] font-bold ${e.key === "attention" && R.critical > 0 ? "bg-red-500/15 text-red-600 dark:text-red-400" : "bg-slate-200 text-slate-600 dark:bg-slate-700 dark:text-slate-300"}`,
442
468
  children: e.count
443
469
  }
444
470
  )
@@ -446,64 +472,64 @@ function mt({
446
472
  },
447
473
  e.key
448
474
  )) }),
449
- M > 0 && /* @__PURE__ */ o(
475
+ T > 0 && /* @__PURE__ */ r(
450
476
  "button",
451
477
  {
452
478
  type: "button",
453
- onClick: () => ge.mutate(),
479
+ onClick: () => ke.mutate(),
454
480
  className: "inline-flex items-center gap-1 text-[11px] font-medium text-slate-400 transition-colors hover:text-nvr-cyan",
455
481
  children: [
456
- /* @__PURE__ */ a(qe, { className: "h-3.5 w-3.5", strokeWidth: 2 }),
482
+ /* @__PURE__ */ t(Re, { className: "h-3.5 w-3.5", strokeWidth: 2 }),
457
483
  "Mark all read"
458
484
  ]
459
485
  }
460
486
  )
461
487
  ] }),
462
- /* @__PURE__ */ o("div", { className: "max-h-96 overflow-y-auto", children: [
463
- D.length > 0 && /* @__PURE__ */ o("div", { "data-notification-pinned": !0, children: [
464
- /* @__PURE__ */ a("div", { className: "bg-amber-50 px-3 py-1 text-[10px] font-semibold uppercase tracking-wide text-amber-700 dark:bg-amber-400/10 dark:text-amber-300", children: "Needs your acknowledgement" }),
465
- D.map((e) => /* @__PURE__ */ a(ie, { children: j(e, !!A(e, n)) }, e.id))
488
+ /* @__PURE__ */ r("div", { className: "max-h-96 overflow-y-auto", children: [
489
+ B.length > 0 && /* @__PURE__ */ r("div", { "data-notification-pinned": !0, children: [
490
+ /* @__PURE__ */ t("div", { className: "bg-amber-50 px-3 py-1 text-[10px] font-semibold uppercase tracking-wide text-amber-700 dark:bg-amber-400/10 dark:text-amber-300", children: "Needs your acknowledgement" }),
491
+ B.map((e) => /* @__PURE__ */ t(se, { children: O(e, !!q(e, n)) }, e.id))
466
492
  ] }),
467
- ee.length === 0 && W.length === 0 && D.length === 0 ? /* @__PURE__ */ a("p", { className: "px-3 py-6 text-center text-[12px] text-slate-400", children: g === "attention" ? "Nothing needs you right now." : g === "fyi" ? "No FYI notifications." : "No notifications" }) : [
468
- ...W.map(we),
469
- ...ee.map((e) => {
470
- const t = e.rows.filter((i) => !i.read).map((i) => i.id), l = A(e.rows[0], n), s = !!l, r = e.rows.find((i) => i.record_label) ?? e.rows[0], C = Ue(r);
471
- return /* @__PURE__ */ o(
493
+ te.length === 0 && J.length === 0 && B.length === 0 ? /* @__PURE__ */ t("p", { className: "px-3 py-6 text-center text-[12px] text-slate-400", children: w === "attention" ? "Nothing needs you right now." : w === "fyi" ? "No FYI notifications." : "No notifications" }) : [
494
+ ...J.map(ve),
495
+ ...te.map((e) => {
496
+ const a = e.rows.filter((l) => !l.read).map((l) => l.id), o = q(e.rows[0], n), i = !!o, s = e.rows.find((l) => l.record_label) ?? e.rows[0], b = We(s);
497
+ return /* @__PURE__ */ r(
472
498
  "div",
473
499
  {
474
500
  className: "border-b border-slate-50 last:border-b-0 dark:border-border/50",
475
501
  children: [
476
- s && C && /* @__PURE__ */ o("div", { className: "flex items-center gap-1.5 px-3 pt-2", children: [
477
- /* @__PURE__ */ o("span", { className: "truncate text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: [
478
- C,
502
+ i && b && /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 px-3 pt-2", children: [
503
+ /* @__PURE__ */ r("span", { className: "truncate text-[10.5px] font-semibold uppercase tracking-wide text-slate-400", children: [
504
+ b,
479
505
  e.rows.length > 1 ? ` · ${e.rows.length}` : ""
480
506
  ] }),
481
- /* @__PURE__ */ o("span", { className: "ml-auto flex items-center gap-0.5", children: [
482
- /* @__PURE__ */ a(
507
+ /* @__PURE__ */ r("span", { className: "ml-auto flex items-center gap-0.5", children: [
508
+ /* @__PURE__ */ t(
483
509
  "button",
484
510
  {
485
511
  type: "button",
486
512
  title: "Open record",
487
513
  onClick: () => {
488
- t.length && B.mutate(t), m(!1), L(l, d);
514
+ a.length && z.mutate(a), p(!1), L(o, d);
489
515
  },
490
516
  className: "rounded p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
491
- children: /* @__PURE__ */ a(re, { className: "h-3 w-3" })
517
+ children: /* @__PURE__ */ t(oe, { className: "h-3 w-3" })
492
518
  }
493
519
  ),
494
- t.length > 0 && /* @__PURE__ */ a(
520
+ a.length > 0 && /* @__PURE__ */ t(
495
521
  "button",
496
522
  {
497
523
  type: "button",
498
524
  title: "Mark read",
499
- onClick: () => B.mutate(t),
525
+ onClick: () => z.mutate(a),
500
526
  className: "rounded p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
501
- children: /* @__PURE__ */ a(z, { className: "h-3 w-3" })
527
+ children: /* @__PURE__ */ t(A, { className: "h-3 w-3" })
502
528
  }
503
529
  )
504
530
  ] })
505
531
  ] }),
506
- e.rows.map((i) => j(i, s))
532
+ e.rows.map((l) => O(l, i))
507
533
  ]
508
534
  },
509
535
  e.key
@@ -511,12 +537,12 @@ function mt({
511
537
  })
512
538
  ]
513
539
  ] }),
514
- H && /* @__PURE__ */ a(
540
+ G && /* @__PURE__ */ t(
515
541
  "button",
516
542
  {
517
543
  type: "button",
518
544
  onClick: () => {
519
- m(!1), d(H);
545
+ p(!1), d(G);
520
546
  },
521
547
  className: "block w-full border-t border-slate-100 px-3 py-1.5 text-center text-[11px] font-medium text-slate-500 hover:text-nvr-cyan dark:border-border/60",
522
548
  children: "See all notifications"
@@ -527,19 +553,19 @@ function mt({
527
553
  ),
528
554
  document.body
529
555
  ),
530
- /* @__PURE__ */ a(
531
- Ke,
556
+ /* @__PURE__ */ t(
557
+ ze,
532
558
  {
533
- notificationId: (v == null ? void 0 : v.id) ?? null,
534
- title: (v == null ? void 0 : v.title) ?? null,
535
- onClose: () => T(null)
559
+ notificationId: (C == null ? void 0 : C.id) ?? null,
560
+ title: (C == null ? void 0 : C.title) ?? null,
561
+ onClose: () => j(null)
536
562
  }
537
563
  )
538
564
  ] });
539
565
  }
540
566
  export {
541
- mt as NotificationBell,
542
- Ue as bellGroupLabel,
543
- de as hasSnapshotView,
544
- Ye as offersChanges
567
+ xt as NotificationBell,
568
+ We as bellGroupLabel,
569
+ ce as hasSnapshotView,
570
+ Je as offersChanges
545
571
  };