@rpcbase/ui 0.235.0 → 0.237.0

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 (85) hide show
  1. package/dist/components/Notifications/NotificationsDrawer.d.ts.map +1 -1
  2. package/dist/components/Notifications/types.d.ts +11 -2
  3. package/dist/components/Notifications/types.d.ts.map +1 -1
  4. package/dist/index16.js +247 -175
  5. package/dist/index16.js.map +1 -1
  6. package/dist/index167.js +3 -3
  7. package/dist/index172.js +6 -6
  8. package/dist/index178.js +1 -1
  9. package/dist/index185.js +1 -1
  10. package/dist/index187.js +1 -1
  11. package/dist/index189.js +3 -3
  12. package/dist/index190.js +4 -4
  13. package/dist/index270.js +1 -1
  14. package/dist/index272.js +1 -1
  15. package/dist/index275.js +1 -1
  16. package/dist/index277.js +1 -1
  17. package/dist/index278.js +2 -2
  18. package/dist/index282.js +1 -1
  19. package/dist/index285.js +1 -1
  20. package/dist/index287.js +1 -1
  21. package/dist/index298.js +1 -1
  22. package/dist/index302.js +1 -1
  23. package/dist/index320.js +2 -2
  24. package/dist/index332.js +1 -1
  25. package/dist/index336.js +19 -8
  26. package/dist/index336.js.map +1 -1
  27. package/dist/index337.js +28 -11
  28. package/dist/index337.js.map +1 -1
  29. package/dist/index338.js +15 -7
  30. package/dist/index338.js.map +1 -1
  31. package/dist/index339.js +8 -13
  32. package/dist/index339.js.map +1 -1
  33. package/dist/index340.js +11 -3
  34. package/dist/index340.js.map +1 -1
  35. package/dist/index341.js +8 -3
  36. package/dist/index341.js.map +1 -1
  37. package/dist/index342.js +12 -16
  38. package/dist/index342.js.map +1 -1
  39. package/dist/index343.js +3 -19
  40. package/dist/index343.js.map +1 -1
  41. package/dist/index344.js +3 -28
  42. package/dist/index344.js.map +1 -1
  43. package/dist/index345.js +16 -15
  44. package/dist/index345.js.map +1 -1
  45. package/dist/index347.js +5 -122
  46. package/dist/index347.js.map +1 -1
  47. package/dist/index348.js +121 -31
  48. package/dist/index348.js.map +1 -1
  49. package/dist/index349.js +31 -72
  50. package/dist/index349.js.map +1 -1
  51. package/dist/index350.js +70 -139
  52. package/dist/index350.js.map +1 -1
  53. package/dist/index351.js +116 -35
  54. package/dist/index351.js.map +1 -1
  55. package/dist/index352.js +56 -44
  56. package/dist/index352.js.map +1 -1
  57. package/dist/index353.js +49 -14
  58. package/dist/index353.js.map +1 -1
  59. package/dist/index354.js +15 -6
  60. package/dist/index354.js.map +1 -1
  61. package/dist/index362.js +4 -12
  62. package/dist/index362.js.map +1 -1
  63. package/dist/index363.js +11 -16
  64. package/dist/index363.js.map +1 -1
  65. package/dist/index364.js +16 -5
  66. package/dist/index364.js.map +1 -1
  67. package/dist/index365.js +6 -4
  68. package/dist/index365.js.map +1 -1
  69. package/dist/index384.js +2 -2
  70. package/dist/index386.js +1 -1
  71. package/dist/index44.js +1 -1
  72. package/dist/index45.js +2 -2
  73. package/dist/index70.js +1 -1
  74. package/dist/index71.js +1 -1
  75. package/dist/index74.js +6 -2
  76. package/dist/index74.js.map +1 -1
  77. package/dist/index75.js +8 -2
  78. package/dist/index75.js.map +1 -1
  79. package/dist/index76.js +5 -5
  80. package/dist/index76.js.map +1 -1
  81. package/dist/index77.js +2 -8
  82. package/dist/index77.js.map +1 -1
  83. package/dist/index78.js +2 -6
  84. package/dist/index78.js.map +1 -1
  85. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/Notifications/NotificationsDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgF,KAAK,OAAO,EAAE,MAAM,OAAO,CAAA;AAMlH,OAAO,KAAK,EAAoB,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAsE3E,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,KAAU,EACV,iBAAyB,EACzB,eAAe,GAChB,EAAE;IACD,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAAA;CAC7D,2CAwPA"}
1
+ {"version":3,"file":"NotificationsDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/Notifications/NotificationsDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgF,KAAK,OAAO,EAAE,MAAM,OAAO,CAAA;AAMlH,OAAO,KAAK,EAAoB,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAsF3E,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,KAAU,EACV,iBAAyB,EACzB,eAAe,GAChB,EAAE;IACD,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAAA;CAC7D,2CAkTA"}
@@ -15,17 +15,26 @@ export type NotificationSettings = {
15
15
  topicPreferences: NotificationTopicPreference[];
16
16
  lastDigestSentAt?: string;
17
17
  };
18
+ export type NotificationDataPayload = Record<string, string>;
19
+ export type NotificationPlatformPayload = {
20
+ webpush?: Record<string, unknown>;
21
+ fcmOptions?: Record<string, unknown>;
22
+ android?: Record<string, unknown>;
23
+ apns?: Record<string, unknown>;
24
+ [key: string]: unknown;
25
+ };
18
26
  export type NotificationItem = {
19
27
  id: string;
20
28
  topic?: string;
21
29
  title: string;
22
30
  body?: string;
23
- url?: string;
31
+ image?: string;
32
+ data?: NotificationDataPayload;
33
+ platform?: NotificationPlatformPayload;
24
34
  createdAt: string;
25
35
  seenAt?: string;
26
36
  readAt?: string;
27
37
  archivedAt?: string;
28
- metadata?: Record<string, unknown>;
29
38
  };
30
39
  export type NotificationsRealtimeState = {
31
40
  notifications: NotificationItem[];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Notifications/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,2BAA2B,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEpE,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,WAAW,EAAE,OAAO,CAAA;IACpB,IAAI,EAAE,OAAO,CAAA;CACd,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,eAAe,EAAE,2BAA2B,CAAA;IAC5C,gBAAgB,EAAE,2BAA2B,EAAE,CAAA;IAC/C,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,aAAa,EAAE,gBAAgB,EAAE,CAAA;IACjC,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,OAAO,CAAA;CACf,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Notifications/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,2BAA2B,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEpE,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,WAAW,EAAE,OAAO,CAAA;IACpB,IAAI,EAAE,OAAO,CAAA;CACd,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,eAAe,EAAE,2BAA2B,CAAA;IAC5C,gBAAgB,EAAE,2BAA2B,EAAE,CAAA;IAC/C,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAE5D,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,uBAAuB,CAAA;IAC9B,QAAQ,CAAC,EAAE,2BAA2B,CAAA;IACtC,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,aAAa,EAAE,gBAAgB,EAAE,CAAA;IACjC,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,OAAO,CAAA;CACf,CAAA"}
package/dist/index16.js CHANGED
@@ -1,30 +1,30 @@
1
1
  import { j as t } from "./index30.js";
2
- import { c as q } from "./index28.js";
3
- import { useContext as H, useState as T, useMemo as B, useCallback as Q, useEffect as Y, createContext as W, useRef as G } from "react";
4
- import { X as Z, Loader2 as _, MoreVertical as ee } from "lucide-react";
5
- import { cn as K } from "./index2.js";
6
- import { DialogRoot as te } from "./index34.js";
7
- import { DialogPortal as ne } from "./index39.js";
8
- import { DialogBackdrop as re } from "./index38.js";
9
- import { DialogPopup as oe } from "./index36.js";
10
- import { DialogTitle as se } from "./index40.js";
11
- import { DialogClose as ie } from "./index35.js";
12
- const X = (s) => {
13
- const e = Date.parse(s);
2
+ import { c as _ } from "./index28.js";
3
+ import { useContext as te, useState as R, useMemo as Y, useCallback as ne, useEffect as J, createContext as oe, useRef as H } from "react";
4
+ import { X as ie, Loader2 as re, MoreVertical as se } from "lucide-react";
5
+ import { cn as W } from "./index2.js";
6
+ import { DialogRoot as ae } from "./index34.js";
7
+ import { DialogPortal as ce } from "./index39.js";
8
+ import { DialogBackdrop as le } from "./index38.js";
9
+ import { DialogPopup as de } from "./index36.js";
10
+ import { DialogTitle as ue } from "./index40.js";
11
+ import { DialogClose as me } from "./index35.js";
12
+ const ee = (r) => {
13
+ const e = Date.parse(r);
14
14
  return Number.isFinite(e) ? e : 0;
15
- }, ae = (s) => {
16
- const e = new Date(X(s));
15
+ }, fe = (r) => {
16
+ const e = new Date(ee(r));
17
17
  if (!Number.isFinite(e.getTime())) return "unknown";
18
- const n = e.getFullYear(), i = String(e.getMonth() + 1).padStart(2, "0"), a = String(e.getDate()).padStart(2, "0");
19
- return `${n}-${i}-${a}`;
20
- }, le = (s) => {
21
- if (s === "unknown") return "Unknown date";
22
- const [e, n, i] = s.split("-"), a = Number(e), l = Number(n), o = Number(i);
23
- if (!Number.isFinite(a) || !Number.isFinite(l) || !Number.isFinite(o)) return "Unknown date";
24
- const U = new Date(a, l - 1, o);
25
- if (!Number.isFinite(U.getTime())) return "Unknown date";
26
- const f = (/* @__PURE__ */ new Date()).getFullYear() !== a;
27
- return U.toLocaleDateString(void 0, f ? {
18
+ const n = e.getFullYear(), s = String(e.getMonth() + 1).padStart(2, "0"), a = String(e.getDate()).padStart(2, "0");
19
+ return `${n}-${s}-${a}`;
20
+ }, xe = (r) => {
21
+ if (r === "unknown") return "Unknown date";
22
+ const [e, n, s] = r.split("-"), a = Number(e), c = Number(n), i = Number(s);
23
+ if (!Number.isFinite(a) || !Number.isFinite(c) || !Number.isFinite(i)) return "Unknown date";
24
+ const f = new Date(a, c - 1, i);
25
+ if (!Number.isFinite(f.getTime())) return "Unknown date";
26
+ const l = (/* @__PURE__ */ new Date()).getFullYear() !== a;
27
+ return f.toLocaleDateString(void 0, l ? {
28
28
  weekday: "short",
29
29
  month: "short",
30
30
  day: "numeric",
@@ -34,60 +34,65 @@ const X = (s) => {
34
34
  month: "short",
35
35
  day: "numeric"
36
36
  });
37
- }, J = (s) => {
37
+ }, pe = (r) => {
38
+ const e = r.platform?.webpush;
39
+ if (!e || typeof e != "object" || Array.isArray(e)) return "";
40
+ const n = e.fcmOptions;
41
+ return !n || typeof n != "object" || Array.isArray(n) ? "" : typeof n.link == "string" ? n.link : "";
42
+ }, Q = (r) => {
38
43
  const e = [];
39
44
  let n = null;
40
- for (const i of s) {
41
- const a = ae(i.createdAt);
45
+ for (const s of r) {
46
+ const a = fe(s.createdAt);
42
47
  a !== n && (n = a, e.push({
43
48
  key: a,
44
- label: le(a),
49
+ label: xe(a),
45
50
  items: []
46
- })), e[e.length - 1].items.push(i);
51
+ })), e[e.length - 1].items.push(s);
47
52
  }
48
53
  return e;
49
- }, ce = W(null);
50
- function Ne({
51
- open: s,
54
+ }, G = () => typeof window > "u" || !("Notification" in window) ? "unsupported" : window.Notification.permission, he = oe(null);
55
+ function Re({
56
+ open: r,
52
57
  onOpenChange: e,
53
58
  className: n,
54
- limit: i = 50,
59
+ limit: s = 50,
55
60
  defaultUnreadOnly: a = !1,
56
- realtimeContext: l
61
+ realtimeContext: c
57
62
  }) {
58
- const o = H(l ?? ce), [U, A] = T([]), [f, g] = T(0), [F, D] = T(0), [L, $] = T(!1), [S, h] = T(null), [c, M] = T(a), y = o?.notifications ?? U, v = o?.unreadCount ?? f, j = o?.unseenCount ?? F, R = o?.loading ?? L, O = o?.error ? o.error instanceof Error ? o.error.message : String(o.error) : S, p = B(() => y.slice(0, i), [i, y]), N = B(() => p.filter((r) => !r.readAt), [p]), w = B(() => p.filter((r) => !!r.readAt), [p]), k = B(() => J(N), [N]), E = B(() => J(w), [w]), b = Q(async ({
59
- unreadOnly: r,
60
- markSeen: u
63
+ const i = te(c ?? he), [f, h] = R([]), [l, b] = R(0), [d, x] = R(0), [v, B] = R(!1), [q, T] = R(null), [p, P] = R(a), [M, g] = R(() => G()), [O, k] = R(!1), A = i?.notifications ?? f, C = i?.unreadCount ?? l, F = i?.unseenCount ?? d, z = i?.loading ?? v, S = i?.error ? i.error instanceof Error ? i.error.message : String(i.error) : q, y = Y(() => A.slice(0, s), [s, A]), D = Y(() => y.filter((o) => !o.readAt), [y]), $ = Y(() => y.filter((o) => !!o.readAt), [y]), U = Y(() => Q(D), [D]), I = Y(() => Q($), [$]), L = ne(async ({
64
+ unreadOnly: o,
65
+ markSeen: m
61
66
  }) => {
62
- $(!0), h(null);
67
+ B(!0), T(null);
63
68
  try {
64
- const I = await fetch("/api/rb/notifications", {
69
+ const j = await fetch("/api/rb/notifications", {
65
70
  method: "POST",
66
71
  headers: {
67
72
  "Content-Type": "application/json"
68
73
  },
69
74
  credentials: "include",
70
75
  body: JSON.stringify({
71
- limit: i,
72
- unreadOnly: r,
73
- markSeen: u
76
+ limit: s,
77
+ unreadOnly: o,
78
+ markSeen: m
74
79
  })
75
- }), d = await I.json().catch(() => null);
76
- if (!I.ok || !d?.ok) {
77
- h(d?.error || "Unable to load notifications.");
80
+ }), u = await j.json().catch(() => null);
81
+ if (!j.ok || !u?.ok) {
82
+ T(u?.error || "Unable to load notifications.");
78
83
  return;
79
84
  }
80
- const C = Array.isArray(d.notifications) ? d.notifications : [];
81
- A(C), g(Number.isFinite(d.unreadCount) ? Math.max(0, Math.floor(d.unreadCount ?? 0)) : 0), D(Number.isFinite(d.unseenCount) ? Math.max(0, Math.floor(d.unseenCount ?? 0)) : 0);
85
+ const E = Array.isArray(u.notifications) ? u.notifications : [];
86
+ h(E), b(Number.isFinite(u.unreadCount) ? Math.max(0, Math.floor(u.unreadCount ?? 0)) : 0), x(Number.isFinite(u.unseenCount) ? Math.max(0, Math.floor(u.unseenCount ?? 0)) : 0);
82
87
  } catch {
83
- h("Unable to load notifications.");
88
+ T("Unable to load notifications.");
84
89
  } finally {
85
- $(!1);
90
+ B(!1);
86
91
  }
87
- }, [i]);
88
- Y(() => {
89
- if (s) {
90
- if (o) {
92
+ }, [s]);
93
+ J(() => {
94
+ if (r) {
95
+ if (i) {
91
96
  (async () => {
92
97
  try {
93
98
  await fetch("/api/rb/notifications", {
@@ -108,20 +113,53 @@ function Ne({
108
113
  })();
109
114
  return;
110
115
  }
111
- b({
112
- unreadOnly: c,
116
+ L({
117
+ unreadOnly: p,
113
118
  markSeen: !0
114
119
  });
115
120
  }
116
- }, [s, o, b, c]), Y(() => {
117
- s && (o || b({
118
- unreadOnly: c,
121
+ }, [r, i, L, p]), J(() => {
122
+ r && (i || L({
123
+ unreadOnly: p,
119
124
  markSeen: !1
120
125
  }));
121
- }, [s, o, b, c]);
122
- const P = async (r) => {
126
+ }, [r, i, L, p]), J(() => {
127
+ if (!r || (g(G()), typeof navigator > "u" || !navigator.permissions?.query)) return;
128
+ let o = null, m = !1;
129
+ const j = () => {
130
+ g(G());
131
+ };
132
+ try {
133
+ navigator.permissions.query({
134
+ name: "notifications"
135
+ }).then((u) => {
136
+ m || (o = u, j(), u.addEventListener("change", j));
137
+ }).catch(() => {
138
+ });
139
+ } catch {
140
+ return;
141
+ }
142
+ return () => {
143
+ m = !0, o?.removeEventListener("change", j);
144
+ };
145
+ }, [r]);
146
+ const K = async () => {
147
+ if (typeof window > "u" || !("Notification" in window)) {
148
+ g("unsupported");
149
+ return;
150
+ }
151
+ k(!0);
152
+ try {
153
+ const o = await window.Notification.requestPermission();
154
+ g(o);
155
+ } catch {
156
+ g(G());
157
+ } finally {
158
+ k(!1);
159
+ }
160
+ }, V = async (o) => {
123
161
  try {
124
- const u = await fetch(`/api/rb/notifications/${encodeURIComponent(r)}/read`, {
162
+ const m = await fetch(`/api/rb/notifications/${encodeURIComponent(o)}/read`, {
125
163
  method: "POST",
126
164
  headers: {
127
165
  "Content-Type": "application/json"
@@ -129,164 +167,198 @@ function Ne({
129
167
  credentials: "include",
130
168
  keepalive: !0,
131
169
  body: "{}"
132
- }), I = await u.json().catch(() => null);
133
- if (!u.ok || !I?.ok) return;
134
- const d = (/* @__PURE__ */ new Date()).toISOString();
135
- if (o) return;
136
- A((C) => {
137
- const m = C.find((x) => x.id === r);
138
- return m && !m.readAt && g((x) => Math.max(0, x - 1)), m && !m.seenAt && D((x) => Math.max(0, x - 1)), C.map((x) => x.id === r && !x.readAt ? {
139
- ...x,
140
- readAt: d,
141
- ...x.seenAt ? {} : {
142
- seenAt: d
170
+ }), j = await m.json().catch(() => null);
171
+ if (!m.ok || !j?.ok) return;
172
+ const u = (/* @__PURE__ */ new Date()).toISOString();
173
+ if (i) return;
174
+ h((E) => {
175
+ const w = E.find((N) => N.id === o);
176
+ return w && !w.readAt && b((N) => Math.max(0, N - 1)), w && !w.seenAt && x((N) => Math.max(0, N - 1)), E.map((N) => N.id === o && !N.readAt ? {
177
+ ...N,
178
+ readAt: u,
179
+ ...N.seenAt ? {} : {
180
+ seenAt: u
143
181
  }
144
- } : x);
182
+ } : N);
145
183
  });
146
184
  } catch {
147
185
  return;
148
186
  }
149
- }, z = async (r) => {
187
+ }, X = async (o) => {
150
188
  try {
151
- const u = await fetch(`/api/rb/notifications/${encodeURIComponent(r)}/archive`, {
189
+ const m = await fetch(`/api/rb/notifications/${encodeURIComponent(o)}/archive`, {
152
190
  method: "POST",
153
191
  headers: {
154
192
  "Content-Type": "application/json"
155
193
  },
156
194
  credentials: "include",
157
195
  body: "{}"
158
- }), I = await u.json().catch(() => null);
159
- if (!u.ok || !I?.ok || o) return;
160
- A((d) => {
161
- const C = d.find((m) => m.id === r);
162
- return C && !C.readAt && g((m) => Math.max(0, m - 1)), C && !C.seenAt && D((m) => Math.max(0, m - 1)), d.filter((m) => m.id !== r);
196
+ }), j = await m.json().catch(() => null);
197
+ if (!m.ok || !j?.ok || i) return;
198
+ h((u) => {
199
+ const E = u.find((w) => w.id === o);
200
+ return E && !E.readAt && b((w) => Math.max(0, w - 1)), E && !E.seenAt && x((w) => Math.max(0, w - 1)), u.filter((w) => w.id !== o);
163
201
  });
164
202
  } catch {
165
203
  return;
166
204
  }
167
205
  };
168
- return /* @__PURE__ */ t.jsx(te, { open: s, onOpenChange: e, children: /* @__PURE__ */ t.jsxs(ne, { children: [
169
- /* @__PURE__ */ t.jsx(re, { className: "fixed inset-0 z-50 bg-black/50" }),
170
- /* @__PURE__ */ t.jsxs(oe, { className: K("fixed right-0 top-0 z-50 flex h-full w-full max-w-md flex-col border-l bg-background shadow-xl outline-none", n), children: [
206
+ return /* @__PURE__ */ t.jsx(ae, { open: r, onOpenChange: e, children: /* @__PURE__ */ t.jsxs(ce, { children: [
207
+ /* @__PURE__ */ t.jsx(le, { className: "fixed inset-0 z-50 bg-black/50" }),
208
+ /* @__PURE__ */ t.jsxs(de, { className: W("fixed right-0 top-0 z-50 flex h-full w-full max-w-md flex-col border-l bg-background shadow-xl outline-none", n), children: [
171
209
  /* @__PURE__ */ t.jsxs("header", { className: "flex items-center justify-between gap-2 border-b px-4 py-3", children: [
172
210
  /* @__PURE__ */ t.jsxs("div", { className: "flex min-w-0 flex-col", children: [
173
- /* @__PURE__ */ t.jsx(se, { className: "text-sm font-semibold", children: "Notifications" }),
174
- /* @__PURE__ */ t.jsx("span", { className: "text-xs text-muted-foreground", children: v > 0 ? `${v} unread` : j > 0 ? `${j} new` : "All caught up" })
211
+ /* @__PURE__ */ t.jsx(ue, { className: "text-sm font-semibold", children: "Notifications" }),
212
+ /* @__PURE__ */ t.jsx("span", { className: "text-xs text-muted-foreground", children: C > 0 ? `${C} unread` : F > 0 ? `${F} new` : "All caught up" })
175
213
  ] }),
176
214
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
177
- /* @__PURE__ */ t.jsx("button", { type: "button", onClick: () => M((r) => !r), className: K("rounded-md border px-2 py-1 text-xs", c ? "bg-accent text-foreground" : "bg-background text-muted-foreground hover:bg-accent"), children: c ? "Unread" : "All" }),
178
- /* @__PURE__ */ t.jsx(ie, { render: /* @__PURE__ */ t.jsx("button", { type: "button", className: "inline-flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent" }), children: /* @__PURE__ */ t.jsx(Z, { className: "h-4 w-4" }) })
215
+ /* @__PURE__ */ t.jsx("button", { type: "button", onClick: () => P((o) => !o), className: W("rounded-md border px-2 py-1 text-xs", p ? "bg-accent text-foreground" : "bg-background text-muted-foreground hover:bg-accent"), children: p ? "Unread" : "All" }),
216
+ /* @__PURE__ */ t.jsx(me, { render: /* @__PURE__ */ t.jsx("button", { type: "button", className: "inline-flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent" }), children: /* @__PURE__ */ t.jsx(ie, { className: "h-4 w-4" }) })
179
217
  ] })
180
218
  ] }),
181
- /* @__PURE__ */ t.jsx("div", { className: "flex-1 overflow-y-auto px-4 pb-3", children: R ? /* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-center py-10 text-muted-foreground", children: /* @__PURE__ */ t.jsx(_, { className: "h-4 w-4 animate-spin" }) }) : O ? /* @__PURE__ */ t.jsx("div", { className: "py-10 text-center text-sm text-muted-foreground", children: O }) : p.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "py-10 text-center text-sm text-muted-foreground", children: "No notifications." }) : /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-4", children: [
182
- /* @__PURE__ */ t.jsxs("div", { children: [
183
- /* @__PURE__ */ t.jsx("div", { className: "sticky top-0 z-20 -mx-4 flex h-8 items-center border-b bg-background px-4 text-xs font-semibold text-muted-foreground", children: "Unread notifications" }),
184
- k.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "py-6 text-center text-sm text-muted-foreground", children: "No unread notifications." }) : k.map((r) => /* @__PURE__ */ t.jsxs("div", { children: [
185
- /* @__PURE__ */ t.jsx("div", { className: "sticky top-8 z-10 -mx-4 flex h-7 items-center bg-background px-4 text-[11px] font-semibold text-muted-foreground", children: r.label }),
186
- /* @__PURE__ */ t.jsx("div", { className: "-mx-4 flex flex-col divide-y divide-border", children: r.items.map((u) => /* @__PURE__ */ t.jsx(V, { notification: u, onMarkRead: P, onArchive: z }, u.id)) })
187
- ] }, `unread:${r.key}`))
188
- ] }),
189
- c ? null : /* @__PURE__ */ t.jsxs("div", { children: [
190
- /* @__PURE__ */ t.jsx("div", { className: "sticky top-0 z-20 -mx-4 flex h-8 items-center border-b bg-background px-4 text-xs font-semibold text-muted-foreground", children: "Previous notifications" }),
191
- E.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "py-6 text-center text-sm text-muted-foreground", children: "No previous notifications." }) : E.map((r) => /* @__PURE__ */ t.jsxs("div", { children: [
192
- /* @__PURE__ */ t.jsx("div", { className: "sticky top-8 z-10 -mx-4 flex h-7 items-center bg-background px-4 text-[11px] font-semibold text-muted-foreground", children: r.label }),
193
- /* @__PURE__ */ t.jsx("div", { className: "-mx-4 flex flex-col divide-y divide-border", children: r.items.map((u) => /* @__PURE__ */ t.jsx(V, { notification: u, onMarkRead: P, onArchive: z }, u.id)) })
194
- ] }, `previous:${r.key}`))
219
+ /* @__PURE__ */ t.jsxs("div", { className: "flex-1 overflow-y-auto px-4 pb-3", children: [
220
+ /* @__PURE__ */ t.jsx(be, { permission: M, requesting: O, onEnable: K }),
221
+ z ? /* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-center py-10 text-muted-foreground", children: /* @__PURE__ */ t.jsx(re, { className: "h-4 w-4 animate-spin" }) }) : S ? /* @__PURE__ */ t.jsx("div", { className: "py-10 text-center text-sm text-muted-foreground", children: S }) : y.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "py-10 text-center text-sm text-muted-foreground", children: "No notifications." }) : /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-4", children: [
222
+ /* @__PURE__ */ t.jsxs("div", { children: [
223
+ /* @__PURE__ */ t.jsx("div", { className: "sticky top-0 z-20 -mx-4 flex h-8 items-center border-b bg-background px-4 text-xs font-semibold text-muted-foreground", children: "Unread notifications" }),
224
+ U.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "py-6 text-center text-sm text-muted-foreground", children: "No unread notifications." }) : U.map((o) => /* @__PURE__ */ t.jsxs("div", { children: [
225
+ /* @__PURE__ */ t.jsx("div", { className: "sticky top-8 z-10 -mx-4 flex h-7 items-center bg-background px-4 text-[11px] font-semibold text-muted-foreground", children: o.label }),
226
+ /* @__PURE__ */ t.jsx("div", { className: "-mx-4 flex flex-col divide-y divide-border", children: o.items.map((m) => /* @__PURE__ */ t.jsx(Z, { notification: m, onMarkRead: V, onArchive: X }, m.id)) })
227
+ ] }, `unread:${o.key}`))
228
+ ] }),
229
+ p ? null : /* @__PURE__ */ t.jsxs("div", { children: [
230
+ /* @__PURE__ */ t.jsx("div", { className: "sticky top-0 z-20 -mx-4 flex h-8 items-center border-b bg-background px-4 text-xs font-semibold text-muted-foreground", children: "Previous notifications" }),
231
+ I.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "py-6 text-center text-sm text-muted-foreground", children: "No previous notifications." }) : I.map((o) => /* @__PURE__ */ t.jsxs("div", { children: [
232
+ /* @__PURE__ */ t.jsx("div", { className: "sticky top-8 z-10 -mx-4 flex h-7 items-center bg-background px-4 text-[11px] font-semibold text-muted-foreground", children: o.label }),
233
+ /* @__PURE__ */ t.jsx("div", { className: "-mx-4 flex flex-col divide-y divide-border", children: o.items.map((m) => /* @__PURE__ */ t.jsx(Z, { notification: m, onMarkRead: V, onArchive: X }, m.id)) })
234
+ ] }, `previous:${o.key}`))
235
+ ] })
195
236
  ] })
196
- ] }) })
237
+ ] })
197
238
  ] })
198
239
  ] }) });
199
240
  }
200
- function V(s) {
201
- const e = q.c(45), {
241
+ function be(r) {
242
+ const e = _.c(13), {
243
+ permission: n,
244
+ requesting: s,
245
+ onEnable: a
246
+ } = r;
247
+ if (n === "granted")
248
+ return null;
249
+ if (n === "unsupported") {
250
+ let v;
251
+ return e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ t.jsx("div", { className: "mt-3 rounded-md border bg-muted/40 p-3 text-sm text-muted-foreground", children: "Browser notifications are not supported by this browser." }), e[0] = v) : v = e[0], v;
252
+ }
253
+ const c = n === "denied", i = c ? "Browser notifications are blocked." : "Browser notifications are not enabled.";
254
+ let f;
255
+ e[1] !== i ? (f = /* @__PURE__ */ t.jsx("div", { className: "text-sm font-medium", children: i }), e[1] = i, e[2] = f) : f = e[2];
256
+ const h = c ? "Enable notifications for this site in your browser settings, then click again." : "Enable browser notifications to receive important alerts.";
257
+ let l;
258
+ e[3] !== h ? (l = /* @__PURE__ */ t.jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: h }), e[3] = h, e[4] = l) : l = e[4];
259
+ const b = s ? "Enabling..." : "Enable browser notifications";
260
+ let d;
261
+ e[5] !== a || e[6] !== s || e[7] !== b ? (d = /* @__PURE__ */ t.jsx("button", { type: "button", className: "mt-3 inline-flex h-8 items-center rounded-md border bg-background px-2.5 text-xs font-medium hover:bg-accent disabled:pointer-events-none disabled:opacity-50", disabled: s, onClick: a, children: b }), e[5] = a, e[6] = s, e[7] = b, e[8] = d) : d = e[8];
262
+ let x;
263
+ return e[9] !== f || e[10] !== l || e[11] !== d ? (x = /* @__PURE__ */ t.jsxs("div", { className: "mt-3 rounded-md border bg-muted/40 p-3", children: [
264
+ f,
265
+ l,
266
+ d
267
+ ] }), e[9] = f, e[10] = l, e[11] = d, e[12] = x) : x = e[12], x;
268
+ }
269
+ function Z(r) {
270
+ const e = _.c(47), {
202
271
  notification: n,
203
- onMarkRead: i,
272
+ onMarkRead: s,
204
273
  onArchive: a
205
- } = s, [l, o] = T(!1), U = G(null), A = G(null), f = !n.readAt;
206
- let g;
207
- if (e[0] !== n.createdAt) {
274
+ } = r, [c, i] = R(!1), f = H(null), h = H(null), l = !n.readAt;
275
+ let b;
276
+ e[0] !== n ? (b = pe(n), e[0] = n, e[1] = b) : b = e[1];
277
+ const d = b;
278
+ let x;
279
+ if (e[2] !== n.createdAt) {
208
280
  e: {
209
- const b = new Date(X(n.createdAt));
210
- if (!Number.isFinite(b.getTime())) {
211
- g = "";
281
+ const U = new Date(ee(n.createdAt));
282
+ if (!Number.isFinite(U.getTime())) {
283
+ x = "";
212
284
  break e;
213
285
  }
214
- g = b.toLocaleString();
286
+ x = U.toLocaleString();
215
287
  }
216
- e[0] = n.createdAt, e[1] = g;
288
+ e[2] = n.createdAt, e[3] = x;
217
289
  } else
218
- g = e[1];
219
- const F = g;
220
- let D, L;
221
- e[2] !== l ? (D = () => {
222
- if (!l)
290
+ x = e[3];
291
+ const v = x;
292
+ let B, q;
293
+ e[4] !== c ? (B = () => {
294
+ if (!c)
223
295
  return;
224
- const b = (z) => {
225
- const r = z.target;
226
- r instanceof Node && (U.current?.contains(r) || A.current?.contains(r) || o(!1));
227
- }, P = (z) => {
228
- z.key === "Escape" && (o(!1), A.current?.focus());
296
+ const U = (L) => {
297
+ const K = L.target;
298
+ K instanceof Node && (f.current?.contains(K) || h.current?.contains(K) || i(!1));
299
+ }, I = (L) => {
300
+ L.key === "Escape" && (i(!1), h.current?.focus());
229
301
  };
230
- return document.addEventListener("pointerdown", b), document.addEventListener("keydown", P), () => {
231
- document.removeEventListener("pointerdown", b), document.removeEventListener("keydown", P);
302
+ return document.addEventListener("pointerdown", U), document.addEventListener("keydown", I), () => {
303
+ document.removeEventListener("pointerdown", U), document.removeEventListener("keydown", I);
232
304
  };
233
- }, L = [l], e[2] = l, e[3] = D, e[4] = L) : (D = e[3], L = e[4]), Y(D, L);
234
- const $ = f ? "bg-primary/5" : "bg-background";
235
- let S;
236
- e[5] !== $ ? (S = K("group flex w-full gap-3 px-4 py-3 hover:bg-accent/40", $), e[5] = $, e[6] = S) : S = e[6];
237
- let h;
238
- e[7] !== f || e[8] !== n.id || e[9] !== n.url || e[10] !== i ? (h = () => {
239
- f && i(n.id), n.url && (window.location.href = n.url);
240
- }, e[7] = f, e[8] = n.id, e[9] = n.url, e[10] = i, e[11] = h) : h = e[11];
241
- let c;
242
- e[12] !== n.title ? (c = /* @__PURE__ */ t.jsx("div", { className: "truncate text-sm font-semibold", children: n.title }), e[12] = n.title, e[13] = c) : c = e[13];
305
+ }, q = [c], e[4] = c, e[5] = B, e[6] = q) : (B = e[5], q = e[6]), J(B, q);
306
+ const T = l ? "bg-primary/5" : "bg-background";
307
+ let p;
308
+ e[7] !== T ? (p = W("group flex w-full gap-3 px-4 py-3 hover:bg-accent/40", T), e[7] = T, e[8] = p) : p = e[8];
309
+ let P;
310
+ e[9] !== l || e[10] !== d || e[11] !== n.id || e[12] !== s ? (P = () => {
311
+ l && s(n.id), d && (window.location.href = d);
312
+ }, e[9] = l, e[10] = d, e[11] = n.id, e[12] = s, e[13] = P) : P = e[13];
243
313
  let M;
244
- e[14] !== n.body ? (M = n.body ? /* @__PURE__ */ t.jsx("div", { className: "mt-0.5 line-clamp-2 text-xs text-muted-foreground", children: n.body }) : null, e[14] = n.body, e[15] = M) : M = e[15];
314
+ e[14] !== n.title ? (M = /* @__PURE__ */ t.jsx("div", { className: "truncate text-sm font-semibold", children: n.title }), e[14] = n.title, e[15] = M) : M = e[15];
315
+ let g;
316
+ e[16] !== n.body ? (g = n.body ? /* @__PURE__ */ t.jsx("div", { className: "mt-0.5 line-clamp-2 text-xs text-muted-foreground", children: n.body }) : null, e[16] = n.body, e[17] = g) : g = e[17];
317
+ let O;
318
+ e[18] !== M || e[19] !== g ? (O = /* @__PURE__ */ t.jsxs("div", { className: "min-w-0", children: [
319
+ M,
320
+ g
321
+ ] }), e[18] = M, e[19] = g, e[20] = O) : O = e[20];
322
+ let k;
323
+ e[21] !== d ? (k = d ? /* @__PURE__ */ t.jsx("div", { className: "mt-2 truncate text-xs text-primary", children: d }) : null, e[21] = d, e[22] = k) : k = e[22];
324
+ let A;
325
+ e[23] !== v ? (A = v ? /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-[11px] text-muted-foreground", children: v }) : null, e[23] = v, e[24] = A) : A = e[24];
326
+ let C;
327
+ e[25] !== O || e[26] !== k || e[27] !== A || e[28] !== P ? (C = /* @__PURE__ */ t.jsxs("button", { type: "button", className: "min-w-0 flex-1 text-left", onClick: P, children: [
328
+ O,
329
+ k,
330
+ A
331
+ ] }), e[25] = O, e[26] = k, e[27] = A, e[28] = P, e[29] = C) : C = e[29];
332
+ let F, z;
333
+ e[30] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (F = () => {
334
+ i(ge);
335
+ }, z = /* @__PURE__ */ t.jsx(se, { className: "h-4 w-4" }), e[30] = F, e[31] = z) : (F = e[30], z = e[31]);
336
+ let S;
337
+ e[32] !== c ? (S = /* @__PURE__ */ t.jsx("button", { ref: h, type: "button", className: "inline-flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent", "aria-label": "Notification options", "aria-haspopup": "menu", "aria-expanded": c, onClick: F, children: z }), e[32] = c, e[33] = S) : S = e[33];
245
338
  let y;
246
- e[16] !== c || e[17] !== M ? (y = /* @__PURE__ */ t.jsxs("div", { className: "min-w-0", children: [
247
- c,
248
- M
249
- ] }), e[16] = c, e[17] = M, e[18] = y) : y = e[18];
250
- let v;
251
- e[19] !== n.url ? (v = n.url ? /* @__PURE__ */ t.jsx("div", { className: "mt-2 truncate text-xs text-primary", children: n.url }) : null, e[19] = n.url, e[20] = v) : v = e[20];
252
- let j;
253
- e[21] !== F ? (j = F ? /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-[11px] text-muted-foreground", children: F }) : null, e[21] = F, e[22] = j) : j = e[22];
254
- let R;
255
- e[23] !== v || e[24] !== j || e[25] !== h || e[26] !== y ? (R = /* @__PURE__ */ t.jsxs("button", { type: "button", className: "min-w-0 flex-1 text-left", onClick: h, children: [
256
- y,
257
- v,
258
- j
259
- ] }), e[23] = v, e[24] = j, e[25] = h, e[26] = y, e[27] = R) : R = e[27];
260
- let O, p;
261
- e[28] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = () => {
262
- o(de);
263
- }, p = /* @__PURE__ */ t.jsx(ee, { className: "h-4 w-4" }), e[28] = O, e[29] = p) : (O = e[28], p = e[29]);
264
- let N;
265
- e[30] !== l ? (N = /* @__PURE__ */ t.jsx("button", { ref: A, type: "button", className: "inline-flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent", "aria-label": "Notification options", "aria-haspopup": "menu", "aria-expanded": l, onClick: O, children: p }), e[30] = l, e[31] = N) : N = e[31];
266
- let w;
267
- e[32] !== f || e[33] !== l || e[34] !== n.id || e[35] !== a || e[36] !== i ? (w = l ? /* @__PURE__ */ t.jsxs("div", { ref: U, role: "menu", className: K("absolute right-0 top-full z-50 mt-1 min-w-[10rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md", "animate-in fade-in-0 zoom-in-95"), children: [
339
+ e[34] !== l || e[35] !== c || e[36] !== n.id || e[37] !== a || e[38] !== s ? (y = c ? /* @__PURE__ */ t.jsxs("div", { ref: f, role: "menu", className: W("absolute right-0 top-full z-50 mt-1 min-w-[10rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md", "animate-in fade-in-0 zoom-in-95"), children: [
268
340
  /* @__PURE__ */ t.jsx("button", { type: "button", role: "menuitem", className: "relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm outline-none transition-colors hover:bg-accent focus:bg-accent focus:text-accent-foreground", onClick: () => {
269
- o(!1), a(n.id);
341
+ i(!1), a(n.id);
270
342
  }, children: "Archive" }),
271
- /* @__PURE__ */ t.jsx("button", { type: "button", role: "menuitem", className: "relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm outline-none transition-colors hover:bg-accent focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50", disabled: !f, onClick: () => {
272
- o(!1), i(n.id);
343
+ /* @__PURE__ */ t.jsx("button", { type: "button", role: "menuitem", className: "relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm outline-none transition-colors hover:bg-accent focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50", disabled: !l, onClick: () => {
344
+ i(!1), s(n.id);
273
345
  }, children: "Mark as read" })
274
- ] }) : null, e[32] = f, e[33] = l, e[34] = n.id, e[35] = a, e[36] = i, e[37] = w) : w = e[37];
275
- let k;
276
- e[38] !== N || e[39] !== w ? (k = /* @__PURE__ */ t.jsxs("div", { className: "relative flex items-start", children: [
277
- N,
278
- w
279
- ] }), e[38] = N, e[39] = w, e[40] = k) : k = e[40];
280
- let E;
281
- return e[41] !== R || e[42] !== k || e[43] !== S ? (E = /* @__PURE__ */ t.jsxs("div", { className: S, children: [
282
- R,
283
- k
284
- ] }), e[41] = R, e[42] = k, e[43] = S, e[44] = E) : E = e[44], E;
346
+ ] }) : null, e[34] = l, e[35] = c, e[36] = n.id, e[37] = a, e[38] = s, e[39] = y) : y = e[39];
347
+ let D;
348
+ e[40] !== S || e[41] !== y ? (D = /* @__PURE__ */ t.jsxs("div", { className: "relative flex items-start", children: [
349
+ S,
350
+ y
351
+ ] }), e[40] = S, e[41] = y, e[42] = D) : D = e[42];
352
+ let $;
353
+ return e[43] !== C || e[44] !== D || e[45] !== p ? ($ = /* @__PURE__ */ t.jsxs("div", { className: p, children: [
354
+ C,
355
+ D
356
+ ] }), e[43] = C, e[44] = D, e[45] = p, e[46] = $) : $ = e[46], $;
285
357
  }
286
- function de(s) {
287
- return !s;
358
+ function ge(r) {
359
+ return !r;
288
360
  }
289
361
  export {
290
- Ne as NotificationsDrawer
362
+ Re as NotificationsDrawer
291
363
  };
292
364
  //# sourceMappingURL=index16.js.map