@burdenoff/microfe-brainyrich 2026.706.4 → 2026.713.1

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 (112) hide show
  1. package/dist/brainyrich/BrainyRichRoot.d.ts +5 -0
  2. package/dist/brainyrich/BrainyRichRoot.d.ts.map +1 -0
  3. package/dist/brainyrich/BrainyRichRoutes.d.ts +2 -0
  4. package/dist/brainyrich/BrainyRichRoutes.d.ts.map +1 -0
  5. package/dist/brainyrich/BrainyRichRoutes.js +27 -15
  6. package/dist/brainyrich/BrainyRichRoutes.js.map +1 -1
  7. package/dist/brainyrich/components/ActorName.d.ts +26 -0
  8. package/dist/brainyrich/components/ActorName.d.ts.map +1 -0
  9. package/dist/brainyrich/components/ConfirmDialog.d.ts +20 -0
  10. package/dist/brainyrich/components/ConfirmDialog.d.ts.map +1 -0
  11. package/dist/brainyrich/components/LoadMore.d.ts +21 -0
  12. package/dist/brainyrich/components/LoadMore.d.ts.map +1 -0
  13. package/dist/brainyrich/components/index.d.ts +11 -0
  14. package/dist/brainyrich/components/index.d.ts.map +1 -0
  15. package/dist/brainyrich/components/notify.d.ts +33 -0
  16. package/dist/brainyrich/components/notify.d.ts.map +1 -0
  17. package/dist/brainyrich/components/pickers.d.ts +63 -0
  18. package/dist/brainyrich/components/pickers.d.ts.map +1 -0
  19. package/dist/brainyrich/components/reuse/CommentThread.d.ts +35 -0
  20. package/dist/brainyrich/components/reuse/CommentThread.d.ts.map +1 -0
  21. package/dist/brainyrich/components/reuse/DocumentsPanel.d.ts +33 -0
  22. package/dist/brainyrich/components/reuse/DocumentsPanel.d.ts.map +1 -0
  23. package/dist/brainyrich/components/reuse/TagField.d.ts +34 -0
  24. package/dist/brainyrich/components/reuse/TagField.d.ts.map +1 -0
  25. package/dist/brainyrich/components/reuse/transport.d.ts +20 -0
  26. package/dist/brainyrich/components/reuse/transport.d.ts.map +1 -0
  27. package/dist/brainyrich/components/viz.d.ts +129 -0
  28. package/dist/brainyrich/components/viz.d.ts.map +1 -0
  29. package/dist/brainyrich/components/viz.js.map +1 -1
  30. package/dist/brainyrich/hooks/useBrainyRichAnalytics.d.ts +17 -0
  31. package/dist/brainyrich/hooks/useBrainyRichAnalytics.d.ts.map +1 -0
  32. package/dist/brainyrich/hooks/useBrainyRichAnalytics.js +24 -0
  33. package/dist/brainyrich/hooks/useBrainyRichAnalytics.js.map +1 -0
  34. package/dist/brainyrich/hooks/useBrainyRichApi.d.ts +2125 -0
  35. package/dist/brainyrich/hooks/useBrainyRichApi.d.ts.map +1 -0
  36. package/dist/brainyrich/hooks/useBrainyRichApi.js +1 -1
  37. package/dist/brainyrich/hooks/useBrainyRichApi.js.map +1 -1
  38. package/dist/brainyrich/index.d.ts +6 -0
  39. package/dist/brainyrich/index.d.ts.map +1 -0
  40. package/dist/brainyrich/index.js +1 -0
  41. package/dist/brainyrich/pages/AccountsPage.d.ts +2 -0
  42. package/dist/brainyrich/pages/AccountsPage.d.ts.map +1 -0
  43. package/dist/brainyrich/pages/AccountsPage.js +608 -593
  44. package/dist/brainyrich/pages/AccountsPage.js.map +1 -1
  45. package/dist/brainyrich/pages/AiAssistantPage.d.ts +2 -0
  46. package/dist/brainyrich/pages/AiAssistantPage.d.ts.map +1 -0
  47. package/dist/brainyrich/pages/AnalyticsPage.d.ts +2 -0
  48. package/dist/brainyrich/pages/AnalyticsPage.d.ts.map +1 -0
  49. package/dist/brainyrich/pages/DashboardPage.d.ts +2 -0
  50. package/dist/brainyrich/pages/DashboardPage.d.ts.map +1 -0
  51. package/dist/brainyrich/pages/DashboardPage.js +264 -256
  52. package/dist/brainyrich/pages/DashboardPage.js.map +1 -1
  53. package/dist/brainyrich/pages/FamilyPage.d.ts +2 -0
  54. package/dist/brainyrich/pages/FamilyPage.d.ts.map +1 -0
  55. package/dist/brainyrich/pages/FamilyPage.js +467 -446
  56. package/dist/brainyrich/pages/FamilyPage.js.map +1 -1
  57. package/dist/brainyrich/pages/GoalsPage.d.ts +2 -0
  58. package/dist/brainyrich/pages/GoalsPage.d.ts.map +1 -0
  59. package/dist/brainyrich/pages/GoalsPage.js +553 -531
  60. package/dist/brainyrich/pages/GoalsPage.js.map +1 -1
  61. package/dist/brainyrich/pages/InvestmentsPage.d.ts +2 -0
  62. package/dist/brainyrich/pages/InvestmentsPage.d.ts.map +1 -0
  63. package/dist/brainyrich/pages/PortfoliosPage.d.ts +2 -0
  64. package/dist/brainyrich/pages/PortfoliosPage.d.ts.map +1 -0
  65. package/dist/brainyrich/pages/PortfoliosPage.js +378 -354
  66. package/dist/brainyrich/pages/PortfoliosPage.js.map +1 -1
  67. package/dist/brainyrich/pages/ReportsPage.d.ts +2 -0
  68. package/dist/brainyrich/pages/ReportsPage.d.ts.map +1 -0
  69. package/dist/brainyrich/pages/RiskPage.d.ts +2 -0
  70. package/dist/brainyrich/pages/RiskPage.d.ts.map +1 -0
  71. package/dist/brainyrich/pages/TaxPage.d.ts +2 -0
  72. package/dist/brainyrich/pages/TaxPage.d.ts.map +1 -0
  73. package/dist/brainyrich/pages/_shared.d.ts +77 -0
  74. package/dist/brainyrich/pages/_shared.d.ts.map +1 -0
  75. package/dist/brainyrich/providers/BrainyRichProvider.d.ts +6 -0
  76. package/dist/brainyrich/providers/BrainyRichProvider.d.ts.map +1 -0
  77. package/dist/brainyrich/services/createSandboxAssistantTransport.d.ts +24 -0
  78. package/dist/brainyrich/services/createSandboxAssistantTransport.d.ts.map +1 -0
  79. package/dist/brainyrich/services/createSandboxAssistantTransport.js +14 -0
  80. package/dist/brainyrich/services/createSandboxAssistantTransport.js.map +1 -0
  81. package/dist/brainyrich/types/bra.d.ts +394 -0
  82. package/dist/brainyrich/types/bra.d.ts.map +1 -0
  83. package/dist/brainyrich/types/index.d.ts +39 -0
  84. package/dist/brainyrich/types/index.d.ts.map +1 -0
  85. package/dist/brainyrich/utils/cn.d.ts +4 -0
  86. package/dist/brainyrich/utils/cn.d.ts.map +1 -0
  87. package/dist/brainyrich/utils/i18n.d.ts +6 -0
  88. package/dist/brainyrich/utils/i18n.d.ts.map +1 -0
  89. package/dist/brainyrich/utils/nativeControls.d.ts +12 -0
  90. package/dist/brainyrich/utils/nativeControls.d.ts.map +1 -0
  91. package/dist/brainyrich/utils/nativeControls.js +12 -0
  92. package/dist/brainyrich/utils/nativeControls.js.map +1 -0
  93. package/dist/brainyrich/utils/navigation.d.ts +2 -0
  94. package/dist/brainyrich/utils/navigation.d.ts.map +1 -0
  95. package/dist/brainyrich/utils/pageContext.d.ts +30 -0
  96. package/dist/brainyrich/utils/pageContext.d.ts.map +1 -0
  97. package/dist/brainyrich/utils/pageContext.js +46 -0
  98. package/dist/brainyrich/utils/pageContext.js.map +1 -0
  99. package/dist/dev/main.d.ts +2 -0
  100. package/dist/dev/main.d.ts.map +1 -0
  101. package/dist/generated/global-operations.d.ts +2 -0
  102. package/dist/generated/global-operations.d.ts.map +1 -0
  103. package/dist/generated/global-types.d.ts +18199 -0
  104. package/dist/generated/global-types.d.ts.map +1 -0
  105. package/dist/generated/wspace-operations.d.ts +2 -0
  106. package/dist/generated/wspace-operations.d.ts.map +1 -0
  107. package/dist/generated/wspace-types.d.ts +43046 -0
  108. package/dist/generated/wspace-types.d.ts.map +1 -0
  109. package/dist/index.d.ts +2 -0
  110. package/dist/index.d.ts.map +1 -0
  111. package/dist/index.js +2 -1
  112. package/package.json +6 -2
@@ -1,18 +1,21 @@
1
1
  import { useAccount as e, useAllAccounts as t, useArchiveAccount as n, useCreateAccount as r, usePagedAccounts as i, usePagedTransactions as a, useRecordTransaction as ee, useUpdateAccount as te } from "../hooks/useBrainyRichApi.js";
2
- import { LoadMore as ne } from "../components/LoadMore.js";
3
- import { ConfirmDialog as re } from "../components/ConfirmDialog.js";
4
- import { ActorName as o } from "../components/ActorName.js";
5
- import { DonutChart as ie, FadeIn as s, GlassCard as ae, StatTile as c } from "../components/viz.js";
6
- import { HouseholdPicker as l } from "../components/pickers.js";
2
+ import { LoadMore as o } from "../components/LoadMore.js";
3
+ import { ConfirmDialog as ne } from "../components/ConfirmDialog.js";
4
+ import { ActorName as s } from "../components/ActorName.js";
5
+ import { DonutChart as re, FadeIn as c, GlassCard as ie, StatTile as l } from "../components/viz.js";
6
+ import { HouseholdPicker as u } from "../components/pickers.js";
7
7
  import "../components/index.js";
8
- import { EmptyState as u, ErrorState as d, LoadingState as f, SectionShell as p, formatCompact as oe, formatDate as se, formatMoney as m, statusBadgeVariant as ce } from "./_shared.js";
9
- import { DocumentsPanel as h } from "../components/reuse/DocumentsPanel.js";
10
- import { useMemo as le, useState as g } from "react";
11
- import { Archive as ue, ArrowDownRight as _, ArrowUpRight as v, Building2 as de, CheckCircle2 as fe, ChevronRight as pe, Landmark as y, Layers as me, MoreHorizontal as he, Pencil as ge, Plus as _e, Receipt as b, Wallet as ve } from "lucide-react";
12
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
13
- import { Badge as C, Button as w, Card as ye, CardContent as be, CardDescription as xe, CardHeader as Se, CardTitle as Ce, Dialog as T, DialogClose as we, DialogContent as E, DialogDescription as D, DialogFooter as O, DialogHeader as k, DialogTitle as A, DropdownMenu as Te, DropdownMenuContent as Ee, DropdownMenuItem as De, DropdownMenuTrigger as Oe, Input as j, Label as M, Select as ke, SelectContent as Ae, SelectItem as je, SelectTrigger as Me, SelectValue as Ne, Sheet as N, SheetContent as P, SheetDescription as F, SheetHeader as I, SheetTitle as L, Table as Pe, TableBody as Fe, TableCell as R, TableHead as z, TableHeader as Ie, TableRow as B, Tabs as Le, TabsContent as V, TabsList as H, TabsTrigger as U, Textarea as Re } from "@burdenoff/fe-libs/ui";
8
+ import { EmptyState as d, ErrorState as f, LoadingState as p, SectionShell as m, formatCompact as ae, formatDate as oe, formatMoney as h, statusBadgeVariant as se } from "./_shared.js";
9
+ import { hapticSuccess as ce, showToast as le } from "../utils/nativeControls.js";
10
+ import { useTrackBrainyRichPageView as ue } from "../hooks/useBrainyRichAnalytics.js";
11
+ import { DocumentsPanel as g } from "../components/reuse/DocumentsPanel.js";
12
+ import { TagField as _ } from "../components/reuse/TagField.js";
13
+ import { useMemo as de, useState as v } from "react";
14
+ import { Archive as fe, ArrowDownRight as y, ArrowUpRight as b, Building2 as pe, CheckCircle2 as me, ChevronRight as he, Landmark as x, Layers as ge, MoreHorizontal as _e, Pencil as ve, Plus as ye, Receipt as S, Wallet as be } from "lucide-react";
15
+ import { jsx as C, jsxs as w } from "react/jsx-runtime";
16
+ import { Badge as T, Button as E, Card as xe, CardContent as Se, CardDescription as Ce, CardHeader as we, CardTitle as Te, Dialog as D, DialogClose as Ee, DialogContent as O, DialogDescription as k, DialogFooter as A, DialogHeader as j, DialogTitle as M, DropdownMenu as De, DropdownMenuContent as Oe, DropdownMenuItem as ke, DropdownMenuTrigger as Ae, Input as N, Label as P, Select as je, SelectContent as Me, SelectItem as Ne, SelectTrigger as Pe, SelectValue as Fe, Sheet as F, SheetContent as I, SheetDescription as L, SheetHeader as R, SheetTitle as Ie, Table as Le, TableBody as Re, TableCell as z, TableHead as B, TableHeader as ze, TableRow as V, Tabs as H, TabsContent as U, TabsList as W, TabsTrigger as G, Textarea as Be } from "@burdenoff/fe-libs/ui";
14
17
  //#region src/brainyrich/pages/AccountsPage.tsx
15
- var W = [
18
+ var K = [
16
19
  "BANK",
17
20
  "BROKERAGE",
18
21
  "RETIREMENT",
@@ -21,7 +24,7 @@ var W = [
21
24
  "REAL_ESTATE",
22
25
  "ALTERNATIVE",
23
26
  "LIABILITY"
24
- ], ze = [
27
+ ], Ve = [
25
28
  "BUY",
26
29
  "SELL",
27
30
  "DIVIDEND",
@@ -30,7 +33,7 @@ var W = [
30
33
  "WITHDRAWAL",
31
34
  "FEE",
32
35
  "TRANSFER"
33
- ], Be = {
36
+ ], He = {
34
37
  BANK: "teal",
35
38
  BROKERAGE: "brand",
36
39
  RETIREMENT: "blue",
@@ -40,15 +43,15 @@ var W = [
40
43
  ALTERNATIVE: "indigo",
41
44
  LIABILITY: "error"
42
45
  };
43
- function G(e) {
46
+ function q(e) {
44
47
  return e === "DEPOSIT" || e === "DIVIDEND" || e === "INTEREST" || e === "SELL" || e === "TRANSFER";
45
48
  }
46
- function K(e) {
49
+ function J(e) {
47
50
  if (e.trim() === "") return;
48
51
  let t = Number(e);
49
52
  return Number.isFinite(t) ? t : void 0;
50
53
  }
51
- var q = {
54
+ var Y = {
52
55
  name: "",
53
56
  type: "BANK",
54
57
  institution: "",
@@ -56,7 +59,7 @@ var q = {
56
59
  cashBalance: "",
57
60
  accountMask: "",
58
61
  householdId: null
59
- }, Ve = {
62
+ }, Ue = {
60
63
  type: "DEPOSIT",
61
64
  tradeDate: "",
62
65
  symbol: "",
@@ -66,8 +69,9 @@ var q = {
66
69
  fee: "",
67
70
  notes: ""
68
71
  };
69
- function J() {
70
- let e = t().data, a = i(), [o, l] = g(void 0), [se, h] = g(!1), [_, v] = g(q), [b, N] = g(null), [P, F] = g(q), [I, L] = g(null), [Le, V] = g(!1), [H, U] = g(Ve), W = r(), G = te(), J = n(), X = ee(), Ue = e.reduce((e, t) => e + (t.cashBalance ?? 0), 0), We = e.filter((e) => e.status === "ACTIVE").length, Ge = new Set(e.map((e) => e.institution).filter((e) => !!e)).size, Z = e[0]?.currency ?? "USD", Ke = le(() => {
72
+ function X() {
73
+ ue("brainyrich.accounts.viewed");
74
+ let e = t().data, a = i(), [s, u] = v(void 0), [oe, g] = v(!1), [_, y] = v(Y), [b, S] = v(null), [F, I] = v(Y), [L, R] = v(null), [Ie, H] = v(!1), [U, W] = v(Ue), G = r(), K = te(), q = n(), X = ee(), Ke = e.reduce((e, t) => e + (t.cashBalance ?? 0), 0), qe = e.filter((e) => e.status === "ACTIVE").length, Je = new Set(e.map((e) => e.institution).filter((e) => !!e)).size, Z = e[0]?.currency ?? "USD", Ye = de(() => {
71
75
  let t = /* @__PURE__ */ new Map();
72
76
  for (let n of e) {
73
77
  let e = n.cashBalance ?? 0;
@@ -76,25 +80,25 @@ function J() {
76
80
  return [...t.entries()].map(([e, t]) => ({
77
81
  label: e.replace(/_/g, " "),
78
82
  value: t,
79
- tone: Be[e]
83
+ tone: He[e]
80
84
  })).sort((e, t) => t.value - e.value);
81
85
  }, [e]);
82
- function qe() {
83
- v(q), h(!0);
86
+ function Xe() {
87
+ y(Y), g(!0);
84
88
  }
85
- function Je() {
86
- _.name.trim() && W.mutate({
89
+ function Ze() {
90
+ _.name.trim() && G.mutate({
87
91
  name: _.name.trim(),
88
92
  type: _.type,
89
93
  institution: _.institution.trim() || null,
90
94
  currency: _.currency.trim() || "USD",
91
- cashBalance: K(_.cashBalance) ?? 0,
95
+ cashBalance: J(_.cashBalance) ?? 0,
92
96
  accountMask: _.accountMask.trim() || null,
93
97
  householdId: _.householdId
94
- }, { onSuccess: () => h(!1) });
98
+ }, { onSuccess: () => g(!1) });
95
99
  }
96
- function Ye(e) {
97
- N(e), F({
100
+ function Qe(e) {
101
+ S(e), I({
98
102
  name: e.name,
99
103
  type: e.type,
100
104
  institution: e.institution ?? "",
@@ -104,501 +108,505 @@ function J() {
104
108
  householdId: e.householdId
105
109
  });
106
110
  }
107
- function Xe() {
108
- !b || !P.name.trim() || G.mutate({
111
+ function $e() {
112
+ !b || !F.name.trim() || K.mutate({
109
113
  id: b.id,
110
114
  input: {
111
- name: P.name.trim(),
112
- type: P.type,
113
- institution: P.institution.trim() || null,
114
- currency: P.currency.trim() || "USD",
115
- cashBalance: K(P.cashBalance) ?? 0,
116
- accountMask: P.accountMask.trim() || null,
117
- householdId: P.householdId
115
+ name: F.name.trim(),
116
+ type: F.type,
117
+ institution: F.institution.trim() || null,
118
+ currency: F.currency.trim() || "USD",
119
+ cashBalance: J(F.cashBalance) ?? 0,
120
+ accountMask: F.accountMask.trim() || null,
121
+ householdId: F.householdId
118
122
  }
119
- }, { onSuccess: () => N(null) });
123
+ }, { onSuccess: () => S(null) });
120
124
  }
121
- function Ze() {
122
- if (!I) return;
123
- let e = I.id;
124
- J.mutate(e, { onSuccess: () => {
125
- L(null), o === e && l(void 0);
125
+ function et() {
126
+ if (!L) return;
127
+ let e = L.id;
128
+ q.mutate(e, { onSuccess: () => {
129
+ ce(), le("Account archived"), R(null), s === e && u(void 0);
126
130
  } });
127
131
  }
128
- function Qe() {
129
- U(Ve), V(!0);
132
+ function tt() {
133
+ W(Ue), H(!0);
130
134
  }
131
- let Q = K(H.amount), $ = Q !== void 0 && Q > 0, $e = !!(o && H.tradeDate) && $;
132
- function et() {
133
- if (!o || !H.tradeDate || !$) return;
134
- let e = new Date(H.tradeDate);
135
+ let Q = J(U.amount), $ = Q !== void 0 && Q > 0, nt = !!(s && U.tradeDate) && $;
136
+ function rt() {
137
+ if (!s || !U.tradeDate || !$) return;
138
+ let e = new Date(U.tradeDate);
135
139
  Number.isNaN(e.getTime()) || X.mutate({
136
- accountId: o,
137
- type: H.type,
140
+ accountId: s,
141
+ type: U.type,
138
142
  tradeDate: e.toISOString(),
139
- symbol: H.symbol.trim() || null,
140
- quantity: K(H.quantity),
141
- price: K(H.price),
143
+ symbol: U.symbol.trim() || null,
144
+ quantity: J(U.quantity),
145
+ price: J(U.price),
142
146
  amount: Q,
143
- fee: K(H.fee),
144
- notes: H.notes.trim() || null
145
- }, { onSuccess: () => V(!1) });
147
+ fee: J(U.fee),
148
+ notes: U.notes.trim() || null
149
+ }, { onSuccess: () => H(!1) });
146
150
  }
147
- return /* @__PURE__ */ S(p, {
148
- title: "Accounts",
149
- description: "Linked bank, brokerage and retirement accounts with recent activity.",
150
- badges: [`${e.length} account${e.length === 1 ? "" : "s"}`],
151
- actionLabel: "New account",
152
- onAction: qe,
153
- children: [
154
- /* @__PURE__ */ S("div", {
155
- className: "grid gap-4 lg:grid-cols-3",
156
- children: [/* @__PURE__ */ S("div", {
157
- className: "grid gap-4 sm:grid-cols-2 lg:col-span-2",
158
- children: [
159
- /* @__PURE__ */ x(s, {
160
- index: 0,
161
- children: /* @__PURE__ */ x(c, {
162
- label: "Total cash",
163
- value: m(Ue, Z),
164
- glow: !0,
165
- icon: /* @__PURE__ */ x(ve, {
166
- className: "size-4",
167
- "aria-hidden": "true"
151
+ return /* @__PURE__ */ C("div", {
152
+ "data-tour": "brainyrich-page-accounts",
153
+ className: "contents",
154
+ children: /* @__PURE__ */ w(m, {
155
+ title: "Accounts",
156
+ description: "Linked bank, brokerage and retirement accounts with recent activity.",
157
+ badges: [`${e.length} account${e.length === 1 ? "" : "s"}`],
158
+ actionLabel: "New account",
159
+ onAction: Xe,
160
+ children: [
161
+ /* @__PURE__ */ w("div", {
162
+ className: "grid gap-4 lg:grid-cols-3",
163
+ children: [/* @__PURE__ */ w("div", {
164
+ className: "grid gap-4 sm:grid-cols-2 lg:col-span-2",
165
+ children: [
166
+ /* @__PURE__ */ C(c, {
167
+ index: 0,
168
+ children: /* @__PURE__ */ C(l, {
169
+ label: "Total cash",
170
+ value: h(Ke, Z),
171
+ glow: !0,
172
+ icon: /* @__PURE__ */ C(be, {
173
+ className: "size-4",
174
+ "aria-hidden": "true"
175
+ })
168
176
  })
169
- })
170
- }),
171
- /* @__PURE__ */ x(s, {
172
- index: 1,
173
- children: /* @__PURE__ */ x(c, {
174
- label: "Total accounts",
175
- value: String(e.length),
176
- icon: /* @__PURE__ */ x(y, {
177
- className: "size-4",
178
- "aria-hidden": "true"
177
+ }),
178
+ /* @__PURE__ */ C(c, {
179
+ index: 1,
180
+ children: /* @__PURE__ */ C(l, {
181
+ label: "Total accounts",
182
+ value: String(e.length),
183
+ icon: /* @__PURE__ */ C(x, {
184
+ className: "size-4",
185
+ "aria-hidden": "true"
186
+ })
179
187
  })
180
- })
181
- }),
182
- /* @__PURE__ */ x(s, {
183
- index: 2,
184
- children: /* @__PURE__ */ x(c, {
185
- label: "Active",
186
- value: `${We}/${e.length}`,
187
- icon: /* @__PURE__ */ x(fe, {
188
- className: "size-4",
189
- "aria-hidden": "true"
188
+ }),
189
+ /* @__PURE__ */ C(c, {
190
+ index: 2,
191
+ children: /* @__PURE__ */ C(l, {
192
+ label: "Active",
193
+ value: `${qe}/${e.length}`,
194
+ icon: /* @__PURE__ */ C(me, {
195
+ className: "size-4",
196
+ "aria-hidden": "true"
197
+ })
190
198
  })
191
- })
192
- }),
193
- /* @__PURE__ */ x(s, {
194
- index: 3,
195
- children: /* @__PURE__ */ x(c, {
196
- label: "Institutions",
197
- value: String(Ge),
198
- icon: /* @__PURE__ */ x(de, {
199
- className: "size-4",
200
- "aria-hidden": "true"
199
+ }),
200
+ /* @__PURE__ */ C(c, {
201
+ index: 3,
202
+ children: /* @__PURE__ */ C(l, {
203
+ label: "Institutions",
204
+ value: String(Je),
205
+ icon: /* @__PURE__ */ C(pe, {
206
+ className: "size-4",
207
+ "aria-hidden": "true"
208
+ })
201
209
  })
202
210
  })
211
+ ]
212
+ }), /* @__PURE__ */ C(c, {
213
+ index: 4,
214
+ children: /* @__PURE__ */ w(ie, {
215
+ className: "h-full",
216
+ glow: !0,
217
+ children: [/* @__PURE__ */ w("div", {
218
+ className: "mb-2 flex items-center gap-2",
219
+ children: [/* @__PURE__ */ C(ge, {
220
+ className: "size-4 text-text-secondary",
221
+ "aria-hidden": "true"
222
+ }), /* @__PURE__ */ C("h2", {
223
+ className: "text-sm font-semibold text-text-primary",
224
+ children: "Cash by account type"
225
+ })]
226
+ }), Ye.length === 0 ? /* @__PURE__ */ C("p", {
227
+ className: "py-8 text-center text-sm text-text-secondary",
228
+ children: "No cash balances recorded yet."
229
+ }) : /* @__PURE__ */ C(re, {
230
+ data: Ye,
231
+ centerValue: ae(Ke, Z),
232
+ centerLabel: "Total cash",
233
+ height: 200,
234
+ valueFormatter: (e) => h(e, Z)
235
+ })]
203
236
  })
204
- ]
205
- }), /* @__PURE__ */ x(s, {
206
- index: 4,
207
- children: /* @__PURE__ */ S(ae, {
208
- className: "h-full",
209
- glow: !0,
210
- children: [/* @__PURE__ */ S("div", {
211
- className: "mb-2 flex items-center gap-2",
212
- children: [/* @__PURE__ */ x(me, {
213
- className: "size-4 text-text-secondary",
237
+ })]
238
+ }),
239
+ /* @__PURE__ */ C(c, {
240
+ index: 5,
241
+ as: "section",
242
+ children: /* @__PURE__ */ w(xe, {
243
+ className: "transition-shadow motion-safe:hover:shadow-[var(--shadow-pop-hover,var(--shadow-elevation-2))]",
244
+ children: [/* @__PURE__ */ w(we, { children: [/* @__PURE__ */ w(Te, {
245
+ className: "flex items-center gap-2",
246
+ children: [/* @__PURE__ */ C(x, {
247
+ className: "h-5 w-5",
214
248
  "aria-hidden": "true"
215
- }), /* @__PURE__ */ x("h2", {
216
- className: "text-sm font-semibold text-text-primary",
217
- children: "Cash by account type"
218
- })]
219
- }), Ke.length === 0 ? /* @__PURE__ */ x("p", {
220
- className: "py-8 text-center text-sm text-text-secondary",
221
- children: "No cash balances recorded yet."
222
- }) : /* @__PURE__ */ x(ie, {
223
- data: Ke,
224
- centerValue: oe(Ue, Z),
225
- centerLabel: "Total cash",
226
- height: 200,
227
- valueFormatter: (e) => m(e, Z)
228
- })]
229
- })
230
- })]
231
- }),
232
- /* @__PURE__ */ x(s, {
233
- index: 5,
234
- as: "section",
235
- children: /* @__PURE__ */ S(ye, {
236
- className: "transition-shadow motion-safe:hover:shadow-[var(--shadow-pop-hover,var(--shadow-elevation-2))]",
237
- children: [/* @__PURE__ */ S(Se, { children: [/* @__PURE__ */ S(Ce, {
238
- className: "flex items-center gap-2",
239
- children: [/* @__PURE__ */ x(y, {
240
- className: "h-5 w-5",
241
- "aria-hidden": "true"
242
- }), "Linked accounts"]
243
- }), /* @__PURE__ */ x(xe, { children: "Select an account to view holdings and transactions." })] }), /* @__PURE__ */ x(be, { children: a.isLoading ? /* @__PURE__ */ x(f, {}) : a.isError ? /* @__PURE__ */ x(d, { onRetry: () => a.refetch() }) : a.items.length === 0 ? /* @__PURE__ */ x(u, {
244
- icon: /* @__PURE__ */ x(y, {
245
- className: "size-6",
246
- "aria-hidden": "true"
247
- }),
248
- title: "No accounts yet",
249
- description: "Add your first bank, brokerage or retirement account to start tracking net worth.",
250
- action: /* @__PURE__ */ S(w, {
251
- size: "sm",
252
- onClick: qe,
253
- children: [/* @__PURE__ */ x(_e, {
254
- className: "size-4",
249
+ }), "Linked accounts"]
250
+ }), /* @__PURE__ */ C(Ce, { children: "Select an account to view holdings and transactions." })] }), /* @__PURE__ */ C(Se, { children: a.isLoading ? /* @__PURE__ */ C(p, {}) : a.isError ? /* @__PURE__ */ C(f, { onRetry: () => a.refetch() }) : a.items.length === 0 ? /* @__PURE__ */ C(d, {
251
+ icon: /* @__PURE__ */ C(x, {
252
+ className: "size-6",
255
253
  "aria-hidden": "true"
256
- }), "New account"]
257
- })
258
- }) : /* @__PURE__ */ S("div", {
259
- className: "overflow-x-auto",
260
- children: [/* @__PURE__ */ S(Pe, { children: [/* @__PURE__ */ x(Ie, { children: /* @__PURE__ */ S(B, { children: [
261
- /* @__PURE__ */ x(z, { children: "Account" }),
262
- /* @__PURE__ */ x(z, { children: "Type" }),
263
- /* @__PURE__ */ x(z, { children: "Institution" }),
264
- /* @__PURE__ */ x(z, {
265
- className: "text-right",
266
- children: "Cash balance"
267
254
  }),
268
- /* @__PURE__ */ x(z, { children: "Status" }),
269
- /* @__PURE__ */ x(z, {
270
- className: "w-12 text-right",
271
- children: "Actions"
255
+ title: "No accounts yet",
256
+ description: "Add your first bank, brokerage or retirement account to start tracking net worth.",
257
+ action: /* @__PURE__ */ w(E, {
258
+ size: "sm",
259
+ onClick: Xe,
260
+ children: [/* @__PURE__ */ C(ye, {
261
+ className: "size-4",
262
+ "aria-hidden": "true"
263
+ }), "New account"]
272
264
  })
273
- ] }) }), /* @__PURE__ */ x(Fe, { children: a.items.map((e) => /* @__PURE__ */ S(B, {
274
- className: "group cursor-pointer transition-colors hover:bg-bg-elevated",
275
- onClick: () => l(e.id),
276
- children: [
277
- /* @__PURE__ */ x(R, { children: /* @__PURE__ */ S("div", {
278
- className: "flex items-center gap-3",
279
- children: [/* @__PURE__ */ x("div", {
280
- className: "flex h-9 w-9 items-center justify-center rounded-lg border border-border-subtle bg-bg-sunken text-xs font-semibold text-text-secondary transition-colors group-hover:border-[var(--color-action-primary-border)] group-hover:text-text-primary",
281
- "aria-hidden": "true",
282
- children: (e.institution ?? e.name).slice(0, 2).toUpperCase()
283
- }), /* @__PURE__ */ S("div", {
284
- className: "min-w-0",
285
- children: [/* @__PURE__ */ S("p", {
286
- className: "flex items-center gap-1 truncate font-medium text-text-primary",
287
- children: [e.name, /* @__PURE__ */ x(pe, {
288
- className: "size-3.5 shrink-0 text-text-secondary opacity-0 transition-opacity group-hover:opacity-100",
289
- "aria-hidden": "true"
265
+ }) : /* @__PURE__ */ w("div", {
266
+ className: "overflow-x-auto",
267
+ children: [/* @__PURE__ */ w(Le, { children: [/* @__PURE__ */ C(ze, { children: /* @__PURE__ */ w(V, { children: [
268
+ /* @__PURE__ */ C(B, { children: "Account" }),
269
+ /* @__PURE__ */ C(B, { children: "Type" }),
270
+ /* @__PURE__ */ C(B, { children: "Institution" }),
271
+ /* @__PURE__ */ C(B, {
272
+ className: "text-right",
273
+ children: "Cash balance"
274
+ }),
275
+ /* @__PURE__ */ C(B, { children: "Status" }),
276
+ /* @__PURE__ */ C(B, {
277
+ className: "w-12 text-right",
278
+ children: "Actions"
279
+ })
280
+ ] }) }), /* @__PURE__ */ C(Re, { children: a.items.map((e) => /* @__PURE__ */ w(V, {
281
+ className: "group cursor-pointer transition-colors hover:bg-bg-elevated",
282
+ onClick: () => u(e.id),
283
+ children: [
284
+ /* @__PURE__ */ C(z, { children: /* @__PURE__ */ w("div", {
285
+ className: "flex items-center gap-3",
286
+ children: [/* @__PURE__ */ C("div", {
287
+ className: "flex h-9 w-9 items-center justify-center rounded-lg border border-border-subtle bg-bg-sunken text-xs font-semibold text-text-secondary transition-colors group-hover:border-[var(--color-action-primary-border)] group-hover:text-text-primary",
288
+ "aria-hidden": "true",
289
+ children: (e.institution ?? e.name).slice(0, 2).toUpperCase()
290
+ }), /* @__PURE__ */ w("div", {
291
+ className: "min-w-0",
292
+ children: [/* @__PURE__ */ w("p", {
293
+ className: "flex items-center gap-1 truncate font-medium text-text-primary",
294
+ children: [e.name, /* @__PURE__ */ C(he, {
295
+ className: "size-3.5 shrink-0 text-text-secondary opacity-0 transition-opacity group-hover:opacity-100",
296
+ "aria-hidden": "true"
297
+ })]
298
+ }), /* @__PURE__ */ w("p", {
299
+ className: "truncate text-xs text-text-secondary",
300
+ children: [e.institution ?? "Manual account", e.accountMask ? ` · ••${e.accountMask}` : ""]
290
301
  })]
291
- }), /* @__PURE__ */ S("p", {
292
- className: "truncate text-xs text-text-secondary",
293
- children: [e.institution ?? "Manual account", e.accountMask ? ` · ••${e.accountMask}` : ""]
294
302
  })]
295
- })]
296
- }) }),
297
- /* @__PURE__ */ x(R, { children: /* @__PURE__ */ x(C, {
298
- variant: "outline",
299
- children: e.type.replace(/_/g, " ")
300
- }) }),
301
- /* @__PURE__ */ x(R, {
302
- className: "text-sm text-text-secondary",
303
- children: e.institution ?? "—"
304
- }),
305
- /* @__PURE__ */ x(R, {
306
- className: "text-right font-semibold tabular-nums text-text-primary",
307
- children: m(e.cashBalance, e.currency)
308
- }),
309
- /* @__PURE__ */ x(R, { children: /* @__PURE__ */ x(C, {
310
- variant: ce(e.status),
311
- children: e.status
312
- }) }),
313
- /* @__PURE__ */ x(R, {
314
- className: "text-right",
315
- onClick: (e) => e.stopPropagation(),
316
- children: /* @__PURE__ */ S(Te, { children: [/* @__PURE__ */ x(Oe, {
317
- asChild: !0,
318
- children: /* @__PURE__ */ x(w, {
319
- variant: "ghost",
320
- size: "sm",
321
- "aria-label": `Actions for ${e.name}`,
322
- children: /* @__PURE__ */ x(he, {
323
- className: "size-4",
324
- "aria-hidden": "true"
303
+ }) }),
304
+ /* @__PURE__ */ C(z, { children: /* @__PURE__ */ C(T, {
305
+ variant: "outline",
306
+ children: e.type.replace(/_/g, " ")
307
+ }) }),
308
+ /* @__PURE__ */ C(z, {
309
+ className: "text-sm text-text-secondary",
310
+ children: e.institution ?? "—"
311
+ }),
312
+ /* @__PURE__ */ C(z, {
313
+ className: "text-right font-semibold tabular-nums text-text-primary",
314
+ children: h(e.cashBalance, e.currency)
315
+ }),
316
+ /* @__PURE__ */ C(z, { children: /* @__PURE__ */ C(T, {
317
+ variant: se(e.status),
318
+ children: e.status
319
+ }) }),
320
+ /* @__PURE__ */ C(z, {
321
+ className: "text-right",
322
+ onClick: (e) => e.stopPropagation(),
323
+ children: /* @__PURE__ */ w(De, { children: [/* @__PURE__ */ C(Ae, {
324
+ asChild: !0,
325
+ children: /* @__PURE__ */ C(E, {
326
+ variant: "ghost",
327
+ size: "sm",
328
+ "aria-label": `Actions for ${e.name}`,
329
+ children: /* @__PURE__ */ C(_e, {
330
+ className: "size-4",
331
+ "aria-hidden": "true"
332
+ })
325
333
  })
326
- })
327
- }), /* @__PURE__ */ S(Ee, {
328
- align: "end",
329
- children: [/* @__PURE__ */ S(De, {
330
- onClick: () => Ye(e),
331
- children: [/* @__PURE__ */ x(ge, {
332
- className: "size-4",
333
- "aria-hidden": "true"
334
- }), "Edit"]
335
- }), /* @__PURE__ */ S(De, {
336
- className: "text-status-error-text",
337
- onClick: () => L(e),
338
- children: [/* @__PURE__ */ x(ue, {
339
- className: "size-4",
340
- "aria-hidden": "true"
341
- }), "Archive"]
342
- })]
343
- })] })
334
+ }), /* @__PURE__ */ w(Oe, {
335
+ align: "end",
336
+ children: [/* @__PURE__ */ w(ke, {
337
+ onClick: () => Qe(e),
338
+ children: [/* @__PURE__ */ C(ve, {
339
+ className: "size-4",
340
+ "aria-hidden": "true"
341
+ }), "Edit"]
342
+ }), /* @__PURE__ */ w(ke, {
343
+ className: "text-status-error-text",
344
+ onClick: () => R(e),
345
+ children: [/* @__PURE__ */ C(fe, {
346
+ className: "size-4",
347
+ "aria-hidden": "true"
348
+ }), "Archive"]
349
+ })]
350
+ })] })
351
+ })
352
+ ]
353
+ }, e.id)) })] }), /* @__PURE__ */ C(o, {
354
+ hasMore: a.hasMore,
355
+ onClick: a.loadMore,
356
+ loading: a.isFetchingNextPage,
357
+ className: "mt-4"
358
+ })]
359
+ }) })]
360
+ })
361
+ }),
362
+ /* @__PURE__ */ C(D, {
363
+ open: oe,
364
+ onOpenChange: g,
365
+ children: /* @__PURE__ */ w(O, {
366
+ className: "max-h-[90vh] overflow-y-auto",
367
+ children: [
368
+ /* @__PURE__ */ w(j, { children: [/* @__PURE__ */ C(M, { children: "New account" }), /* @__PURE__ */ C(k, { children: "Add a bank, brokerage or retirement account." })] }),
369
+ /* @__PURE__ */ C(We, {
370
+ form: _,
371
+ onChange: y
372
+ }),
373
+ /* @__PURE__ */ w(A, { children: [/* @__PURE__ */ C(Ee, {
374
+ asChild: !0,
375
+ children: /* @__PURE__ */ C(E, {
376
+ variant: "outline",
377
+ children: "Cancel"
344
378
  })
345
- ]
346
- }, e.id)) })] }), /* @__PURE__ */ x(ne, {
347
- hasMore: a.hasMore,
348
- onClick: a.loadMore,
349
- loading: a.isFetchingNextPage,
350
- className: "mt-4"
351
- })]
352
- }) })]
353
- })
354
- }),
355
- /* @__PURE__ */ x(T, {
356
- open: se,
357
- onOpenChange: h,
358
- children: /* @__PURE__ */ S(E, {
359
- className: "max-h-[90vh] overflow-y-auto",
360
- children: [
361
- /* @__PURE__ */ S(k, { children: [/* @__PURE__ */ x(A, { children: "New account" }), /* @__PURE__ */ x(D, { children: "Add a bank, brokerage or retirement account." })] }),
362
- /* @__PURE__ */ x(Y, {
363
- form: _,
364
- onChange: v
365
- }),
366
- /* @__PURE__ */ S(O, { children: [/* @__PURE__ */ x(we, {
367
- asChild: !0,
368
- children: /* @__PURE__ */ x(w, {
379
+ }), /* @__PURE__ */ C(E, {
380
+ onClick: Ze,
381
+ disabled: !_.name.trim() || G.isPending,
382
+ children: G.isPending ? "Creating…" : "Create account"
383
+ })] })
384
+ ]
385
+ })
386
+ }),
387
+ /* @__PURE__ */ C(D, {
388
+ open: !!b,
389
+ onOpenChange: (e) => !e && S(null),
390
+ children: /* @__PURE__ */ w(O, {
391
+ className: "max-h-[90vh] overflow-y-auto",
392
+ children: [
393
+ /* @__PURE__ */ w(j, { children: [/* @__PURE__ */ C(M, { children: "Edit account" }), /* @__PURE__ */ C(k, { children: "Update account details." })] }),
394
+ /* @__PURE__ */ C(We, {
395
+ form: F,
396
+ onChange: I
397
+ }),
398
+ /* @__PURE__ */ w(A, { children: [/* @__PURE__ */ C(E, {
369
399
  variant: "outline",
400
+ onClick: () => S(null),
370
401
  children: "Cancel"
371
- })
372
- }), /* @__PURE__ */ x(w, {
373
- onClick: Je,
374
- disabled: !_.name.trim() || W.isPending,
375
- children: W.isPending ? "Creating…" : "Create account"
376
- })] })
377
- ]
378
- })
379
- }),
380
- /* @__PURE__ */ x(T, {
381
- open: !!b,
382
- onOpenChange: (e) => !e && N(null),
383
- children: /* @__PURE__ */ S(E, {
384
- className: "max-h-[90vh] overflow-y-auto",
385
- children: [
386
- /* @__PURE__ */ S(k, { children: [/* @__PURE__ */ x(A, { children: "Edit account" }), /* @__PURE__ */ x(D, { children: "Update account details." })] }),
387
- /* @__PURE__ */ x(Y, {
388
- form: P,
389
- onChange: F
390
- }),
391
- /* @__PURE__ */ S(O, { children: [/* @__PURE__ */ x(w, {
392
- variant: "outline",
393
- onClick: () => N(null),
394
- children: "Cancel"
395
- }), /* @__PURE__ */ x(w, {
396
- onClick: Xe,
397
- disabled: !P.name.trim() || G.isPending,
398
- children: G.isPending ? "Saving…" : "Save changes"
399
- })] })
400
- ]
401
- })
402
- }),
403
- /* @__PURE__ */ x(re, {
404
- open: !!I,
405
- onOpenChange: (e) => !e && L(null),
406
- title: "Archive account?",
407
- description: I ? `“${I.name}” will be archived and hidden from active lists. This does not delete its history.` : void 0,
408
- confirmLabel: "Archive account",
409
- pendingLabel: "Archiving…",
410
- destructive: !0,
411
- pending: J.isPending,
412
- onConfirm: Ze
413
- }),
414
- /* @__PURE__ */ x(He, {
415
- accountId: o,
416
- onClose: () => l(void 0),
417
- onRecordTransaction: Qe
418
- }),
419
- /* @__PURE__ */ x(T, {
420
- open: Le,
421
- onOpenChange: V,
422
- children: /* @__PURE__ */ S(E, {
423
- className: "max-h-[90vh] overflow-y-auto",
424
- children: [
425
- /* @__PURE__ */ S(k, { children: [/* @__PURE__ */ x(A, { children: "Record transaction" }), /* @__PURE__ */ x(D, { children: "Log activity against the selected account." })] }),
426
- /* @__PURE__ */ S("div", {
427
- className: "grid gap-4",
428
- children: [
429
- /* @__PURE__ */ S("div", {
430
- className: "grid grid-cols-2 gap-4",
431
- children: [/* @__PURE__ */ S("div", {
432
- className: "space-y-2",
433
- children: [/* @__PURE__ */ x(M, {
434
- htmlFor: "tx-type",
435
- children: "Type"
436
- }), /* @__PURE__ */ S(ke, {
437
- value: H.type,
438
- onValueChange: (e) => U((t) => ({
439
- ...t,
440
- type: e
441
- })),
442
- children: [/* @__PURE__ */ x(Me, {
443
- id: "tx-type",
444
- children: /* @__PURE__ */ x(Ne, {})
445
- }), /* @__PURE__ */ x(Ae, { children: ze.map((e) => /* @__PURE__ */ x(je, {
446
- value: e,
447
- children: e.replace(/_/g, " ")
448
- }, e)) })]
449
- })]
450
- }), /* @__PURE__ */ S("div", {
451
- className: "space-y-2",
452
- children: [/* @__PURE__ */ x(M, {
453
- htmlFor: "tx-date",
454
- children: "Trade date"
455
- }), /* @__PURE__ */ x(j, {
456
- id: "tx-date",
457
- type: "date",
458
- value: H.tradeDate,
459
- onChange: (e) => U((t) => ({
460
- ...t,
461
- tradeDate: e.target.value
462
- }))
463
- })]
464
- })]
465
- }),
466
- /* @__PURE__ */ S("div", {
467
- className: "grid grid-cols-2 gap-4",
468
- children: [/* @__PURE__ */ S("div", {
469
- className: "space-y-2",
470
- children: [/* @__PURE__ */ x(M, {
471
- htmlFor: "tx-symbol",
472
- children: "Symbol"
473
- }), /* @__PURE__ */ x(j, {
474
- id: "tx-symbol",
475
- value: H.symbol,
476
- onChange: (e) => U((t) => ({
477
- ...t,
478
- symbol: e.target.value
479
- })),
480
- placeholder: "e.g. VOO"
481
- })]
482
- }), /* @__PURE__ */ S("div", {
483
- className: "space-y-2",
484
- children: [
485
- /* @__PURE__ */ x(M, {
486
- htmlFor: "tx-amount",
487
- children: "Amount"
488
- }),
489
- /* @__PURE__ */ x(j, {
490
- id: "tx-amount",
491
- type: "number",
492
- min: "0",
493
- step: "any",
494
- value: H.amount,
495
- onChange: (e) => U((t) => ({
496
- ...t,
497
- amount: e.target.value
498
- })),
499
- "aria-invalid": H.amount.trim() !== "" && !$,
500
- "aria-describedby": "tx-amount-hint"
501
- }),
502
- /* @__PURE__ */ x("p", {
503
- id: "tx-amount-hint",
504
- className: "text-xs text-text-secondary",
505
- children: H.amount.trim() !== "" && !$ ? "Enter an amount greater than 0." : "Positive amount; direction is set by the type."
506
- })
507
- ]
508
- })]
509
- }),
510
- /* @__PURE__ */ S("div", {
511
- className: "grid grid-cols-3 gap-4",
512
- children: [
513
- /* @__PURE__ */ S("div", {
402
+ }), /* @__PURE__ */ C(E, {
403
+ onClick: $e,
404
+ disabled: !F.name.trim() || K.isPending,
405
+ children: K.isPending ? "Saving…" : "Save changes"
406
+ })] })
407
+ ]
408
+ })
409
+ }),
410
+ /* @__PURE__ */ C(ne, {
411
+ open: !!L,
412
+ onOpenChange: (e) => !e && R(null),
413
+ title: "Archive account?",
414
+ description: L ? `“${L.name}” will be archived and hidden from active lists. This does not delete its history.` : void 0,
415
+ confirmLabel: "Archive account",
416
+ pendingLabel: "Archiving…",
417
+ destructive: !0,
418
+ pending: q.isPending,
419
+ onConfirm: et
420
+ }),
421
+ /* @__PURE__ */ C(Ge, {
422
+ accountId: s,
423
+ onClose: () => u(void 0),
424
+ onRecordTransaction: tt
425
+ }),
426
+ /* @__PURE__ */ C(D, {
427
+ open: Ie,
428
+ onOpenChange: H,
429
+ children: /* @__PURE__ */ w(O, {
430
+ className: "max-h-[90vh] overflow-y-auto",
431
+ children: [
432
+ /* @__PURE__ */ w(j, { children: [/* @__PURE__ */ C(M, { children: "Record transaction" }), /* @__PURE__ */ C(k, { children: "Log activity against the selected account." })] }),
433
+ /* @__PURE__ */ w("div", {
434
+ className: "grid gap-4",
435
+ children: [
436
+ /* @__PURE__ */ w("div", {
437
+ className: "grid grid-cols-2 gap-4",
438
+ children: [/* @__PURE__ */ w("div", {
514
439
  className: "space-y-2",
515
- children: [/* @__PURE__ */ x(M, {
516
- htmlFor: "tx-qty",
517
- children: "Quantity"
518
- }), /* @__PURE__ */ x(j, {
519
- id: "tx-qty",
520
- type: "number",
521
- value: H.quantity,
522
- onChange: (e) => U((t) => ({
440
+ children: [/* @__PURE__ */ C(P, {
441
+ htmlFor: "tx-type",
442
+ children: "Type"
443
+ }), /* @__PURE__ */ w(je, {
444
+ value: U.type,
445
+ onValueChange: (e) => W((t) => ({
523
446
  ...t,
524
- quantity: e.target.value
525
- }))
447
+ type: e
448
+ })),
449
+ children: [/* @__PURE__ */ C(Pe, {
450
+ id: "tx-type",
451
+ children: /* @__PURE__ */ C(Fe, {})
452
+ }), /* @__PURE__ */ C(Me, { children: Ve.map((e) => /* @__PURE__ */ C(Ne, {
453
+ value: e,
454
+ children: e.replace(/_/g, " ")
455
+ }, e)) })]
526
456
  })]
527
- }),
528
- /* @__PURE__ */ S("div", {
457
+ }), /* @__PURE__ */ w("div", {
529
458
  className: "space-y-2",
530
- children: [/* @__PURE__ */ x(M, {
531
- htmlFor: "tx-price",
532
- children: "Price"
533
- }), /* @__PURE__ */ x(j, {
534
- id: "tx-price",
535
- type: "number",
536
- value: H.price,
537
- onChange: (e) => U((t) => ({
459
+ children: [/* @__PURE__ */ C(P, {
460
+ htmlFor: "tx-date",
461
+ children: "Trade date"
462
+ }), /* @__PURE__ */ C(N, {
463
+ id: "tx-date",
464
+ type: "date",
465
+ value: U.tradeDate,
466
+ onChange: (e) => W((t) => ({
538
467
  ...t,
539
- price: e.target.value
468
+ tradeDate: e.target.value
540
469
  }))
541
470
  })]
542
- }),
543
- /* @__PURE__ */ S("div", {
471
+ })]
472
+ }),
473
+ /* @__PURE__ */ w("div", {
474
+ className: "grid grid-cols-2 gap-4",
475
+ children: [/* @__PURE__ */ w("div", {
544
476
  className: "space-y-2",
545
- children: [/* @__PURE__ */ x(M, {
546
- htmlFor: "tx-fee",
547
- children: "Fee"
548
- }), /* @__PURE__ */ x(j, {
549
- id: "tx-fee",
550
- type: "number",
551
- value: H.fee,
552
- onChange: (e) => U((t) => ({
477
+ children: [/* @__PURE__ */ C(P, {
478
+ htmlFor: "tx-symbol",
479
+ children: "Symbol"
480
+ }), /* @__PURE__ */ C(N, {
481
+ id: "tx-symbol",
482
+ value: U.symbol,
483
+ onChange: (e) => W((t) => ({
553
484
  ...t,
554
- fee: e.target.value
555
- }))
485
+ symbol: e.target.value
486
+ })),
487
+ placeholder: "e.g. VOO"
556
488
  })]
557
- })
558
- ]
559
- }),
560
- /* @__PURE__ */ S("div", {
561
- className: "space-y-2",
562
- children: [/* @__PURE__ */ x(M, {
563
- htmlFor: "tx-notes",
564
- children: "Notes"
565
- }), /* @__PURE__ */ x(Re, {
566
- id: "tx-notes",
567
- value: H.notes,
568
- onChange: (e) => U((t) => ({
569
- ...t,
570
- notes: e.target.value
571
- })),
572
- placeholder: "Optional note"
573
- })]
574
- })
575
- ]
576
- }),
577
- /* @__PURE__ */ S(O, { children: [/* @__PURE__ */ x(w, {
578
- variant: "outline",
579
- onClick: () => V(!1),
580
- children: "Cancel"
581
- }), /* @__PURE__ */ x(w, {
582
- onClick: et,
583
- disabled: !$e || X.isPending,
584
- children: X.isPending ? "Saving…" : "Record transaction"
585
- })] })
586
- ]
489
+ }), /* @__PURE__ */ w("div", {
490
+ className: "space-y-2",
491
+ children: [
492
+ /* @__PURE__ */ C(P, {
493
+ htmlFor: "tx-amount",
494
+ children: "Amount"
495
+ }),
496
+ /* @__PURE__ */ C(N, {
497
+ id: "tx-amount",
498
+ type: "number",
499
+ min: "0",
500
+ step: "any",
501
+ value: U.amount,
502
+ onChange: (e) => W((t) => ({
503
+ ...t,
504
+ amount: e.target.value
505
+ })),
506
+ "aria-invalid": U.amount.trim() !== "" && !$,
507
+ "aria-describedby": "tx-amount-hint"
508
+ }),
509
+ /* @__PURE__ */ C("p", {
510
+ id: "tx-amount-hint",
511
+ className: "text-xs text-text-secondary",
512
+ children: U.amount.trim() !== "" && !$ ? "Enter an amount greater than 0." : "Positive amount; direction is set by the type."
513
+ })
514
+ ]
515
+ })]
516
+ }),
517
+ /* @__PURE__ */ w("div", {
518
+ className: "grid grid-cols-3 gap-4",
519
+ children: [
520
+ /* @__PURE__ */ w("div", {
521
+ className: "space-y-2",
522
+ children: [/* @__PURE__ */ C(P, {
523
+ htmlFor: "tx-qty",
524
+ children: "Quantity"
525
+ }), /* @__PURE__ */ C(N, {
526
+ id: "tx-qty",
527
+ type: "number",
528
+ value: U.quantity,
529
+ onChange: (e) => W((t) => ({
530
+ ...t,
531
+ quantity: e.target.value
532
+ }))
533
+ })]
534
+ }),
535
+ /* @__PURE__ */ w("div", {
536
+ className: "space-y-2",
537
+ children: [/* @__PURE__ */ C(P, {
538
+ htmlFor: "tx-price",
539
+ children: "Price"
540
+ }), /* @__PURE__ */ C(N, {
541
+ id: "tx-price",
542
+ type: "number",
543
+ value: U.price,
544
+ onChange: (e) => W((t) => ({
545
+ ...t,
546
+ price: e.target.value
547
+ }))
548
+ })]
549
+ }),
550
+ /* @__PURE__ */ w("div", {
551
+ className: "space-y-2",
552
+ children: [/* @__PURE__ */ C(P, {
553
+ htmlFor: "tx-fee",
554
+ children: "Fee"
555
+ }), /* @__PURE__ */ C(N, {
556
+ id: "tx-fee",
557
+ type: "number",
558
+ value: U.fee,
559
+ onChange: (e) => W((t) => ({
560
+ ...t,
561
+ fee: e.target.value
562
+ }))
563
+ })]
564
+ })
565
+ ]
566
+ }),
567
+ /* @__PURE__ */ w("div", {
568
+ className: "space-y-2",
569
+ children: [/* @__PURE__ */ C(P, {
570
+ htmlFor: "tx-notes",
571
+ children: "Notes"
572
+ }), /* @__PURE__ */ C(Be, {
573
+ id: "tx-notes",
574
+ value: U.notes,
575
+ onChange: (e) => W((t) => ({
576
+ ...t,
577
+ notes: e.target.value
578
+ })),
579
+ placeholder: "Optional note"
580
+ })]
581
+ })
582
+ ]
583
+ }),
584
+ /* @__PURE__ */ w(A, { children: [/* @__PURE__ */ C(E, {
585
+ variant: "outline",
586
+ onClick: () => H(!1),
587
+ children: "Cancel"
588
+ }), /* @__PURE__ */ C(E, {
589
+ onClick: rt,
590
+ disabled: !nt || X.isPending,
591
+ children: X.isPending ? "Saving…" : "Record transaction"
592
+ })] })
593
+ ]
594
+ })
587
595
  })
588
- })
589
- ]
596
+ ]
597
+ })
590
598
  });
591
599
  }
592
- function Y({ form: e, onChange: t }) {
593
- return /* @__PURE__ */ S("div", {
600
+ function We({ form: e, onChange: t }) {
601
+ return /* @__PURE__ */ w("div", {
594
602
  className: "grid gap-4",
595
603
  children: [
596
- /* @__PURE__ */ S("div", {
604
+ /* @__PURE__ */ w("div", {
597
605
  className: "space-y-2",
598
- children: [/* @__PURE__ */ x(M, {
606
+ children: [/* @__PURE__ */ C(P, {
599
607
  htmlFor: "acct-name",
600
608
  children: "Name"
601
- }), /* @__PURE__ */ x(j, {
609
+ }), /* @__PURE__ */ C(N, {
602
610
  id: "acct-name",
603
611
  value: e.name,
604
612
  onChange: (e) => t((t) => ({
@@ -608,33 +616,33 @@ function Y({ form: e, onChange: t }) {
608
616
  placeholder: "e.g. Everyday Checking"
609
617
  })]
610
618
  }),
611
- /* @__PURE__ */ S("div", {
619
+ /* @__PURE__ */ w("div", {
612
620
  className: "grid grid-cols-2 gap-4",
613
- children: [/* @__PURE__ */ S("div", {
621
+ children: [/* @__PURE__ */ w("div", {
614
622
  className: "space-y-2",
615
- children: [/* @__PURE__ */ x(M, {
623
+ children: [/* @__PURE__ */ C(P, {
616
624
  htmlFor: "acct-type",
617
625
  children: "Type"
618
- }), /* @__PURE__ */ S(ke, {
626
+ }), /* @__PURE__ */ w(je, {
619
627
  value: e.type,
620
628
  onValueChange: (e) => t((t) => ({
621
629
  ...t,
622
630
  type: e
623
631
  })),
624
- children: [/* @__PURE__ */ x(Me, {
632
+ children: [/* @__PURE__ */ C(Pe, {
625
633
  id: "acct-type",
626
- children: /* @__PURE__ */ x(Ne, {})
627
- }), /* @__PURE__ */ x(Ae, { children: W.map((e) => /* @__PURE__ */ x(je, {
634
+ children: /* @__PURE__ */ C(Fe, {})
635
+ }), /* @__PURE__ */ C(Me, { children: K.map((e) => /* @__PURE__ */ C(Ne, {
628
636
  value: e,
629
637
  children: e.replace(/_/g, " ")
630
638
  }, e)) })]
631
639
  })]
632
- }), /* @__PURE__ */ S("div", {
640
+ }), /* @__PURE__ */ w("div", {
633
641
  className: "space-y-2",
634
- children: [/* @__PURE__ */ x(M, {
642
+ children: [/* @__PURE__ */ C(P, {
635
643
  htmlFor: "acct-currency",
636
644
  children: "Currency"
637
- }), /* @__PURE__ */ x(j, {
645
+ }), /* @__PURE__ */ C(N, {
638
646
  id: "acct-currency",
639
647
  value: e.currency,
640
648
  onChange: (e) => t((t) => ({
@@ -645,12 +653,12 @@ function Y({ form: e, onChange: t }) {
645
653
  })]
646
654
  })]
647
655
  }),
648
- /* @__PURE__ */ S("div", {
656
+ /* @__PURE__ */ w("div", {
649
657
  className: "space-y-2",
650
- children: [/* @__PURE__ */ x(M, {
658
+ children: [/* @__PURE__ */ C(P, {
651
659
  htmlFor: "acct-institution",
652
660
  children: "Institution"
653
- }), /* @__PURE__ */ x(j, {
661
+ }), /* @__PURE__ */ C(N, {
654
662
  id: "acct-institution",
655
663
  value: e.institution,
656
664
  onChange: (e) => t((t) => ({
@@ -660,14 +668,14 @@ function Y({ form: e, onChange: t }) {
660
668
  placeholder: "e.g. Chase"
661
669
  })]
662
670
  }),
663
- /* @__PURE__ */ S("div", {
671
+ /* @__PURE__ */ w("div", {
664
672
  className: "grid grid-cols-2 gap-4",
665
- children: [/* @__PURE__ */ S("div", {
673
+ children: [/* @__PURE__ */ w("div", {
666
674
  className: "space-y-2",
667
- children: [/* @__PURE__ */ x(M, {
675
+ children: [/* @__PURE__ */ C(P, {
668
676
  htmlFor: "acct-balance",
669
677
  children: "Cash balance"
670
- }), /* @__PURE__ */ x(j, {
678
+ }), /* @__PURE__ */ C(N, {
671
679
  id: "acct-balance",
672
680
  type: "number",
673
681
  value: e.cashBalance,
@@ -676,12 +684,12 @@ function Y({ form: e, onChange: t }) {
676
684
  cashBalance: e.target.value
677
685
  }))
678
686
  })]
679
- }), /* @__PURE__ */ S("div", {
687
+ }), /* @__PURE__ */ w("div", {
680
688
  className: "space-y-2",
681
- children: [/* @__PURE__ */ x(M, {
689
+ children: [/* @__PURE__ */ C(P, {
682
690
  htmlFor: "acct-mask",
683
691
  children: "Account mask"
684
- }), /* @__PURE__ */ x(j, {
692
+ }), /* @__PURE__ */ C(N, {
685
693
  id: "acct-mask",
686
694
  value: e.accountMask,
687
695
  onChange: (e) => t((t) => ({
@@ -692,7 +700,7 @@ function Y({ form: e, onChange: t }) {
692
700
  })]
693
701
  })]
694
702
  }),
695
- /* @__PURE__ */ x(l, {
703
+ /* @__PURE__ */ C(u, {
696
704
  value: e.householdId,
697
705
  onChange: (e) => t((t) => ({
698
706
  ...t,
@@ -702,78 +710,78 @@ function Y({ form: e, onChange: t }) {
702
710
  ]
703
711
  });
704
712
  }
705
- function He({ accountId: t, onClose: n, onRecordTransaction: r }) {
706
- let { data: i, isLoading: ee, isError: te, refetch: re } = e(t), s = a(t ? { accountId: t } : {}), c = t ? s.items : [], l = le(() => i ? i.holdings.filter((e) => Number.isFinite(e.marketValue) && e.marketValue > 0).map((e) => ({
713
+ function Ge({ accountId: t, onClose: n, onRecordTransaction: r }) {
714
+ let { data: i, isLoading: ee, isError: te, refetch: ne } = e(t), c = a(t ? { accountId: t } : {}), l = t ? c.items : [], u = de(() => i ? i.holdings.filter((e) => Number.isFinite(e.marketValue) && e.marketValue > 0).map((e) => ({
707
715
  label: e.symbol,
708
716
  value: e.marketValue
709
- })).sort((e, t) => t.value - e.value) : [], [i]), p = l.reduce((e, t) => e + t.value, 0);
710
- return /* @__PURE__ */ x(N, {
717
+ })).sort((e, t) => t.value - e.value) : [], [i]), m = u.reduce((e, t) => e + t.value, 0);
718
+ return /* @__PURE__ */ C(F, {
711
719
  open: !!t,
712
720
  onOpenChange: (e) => !e && n(),
713
- children: /* @__PURE__ */ S(P, {
721
+ children: /* @__PURE__ */ w(I, {
714
722
  className: "flex w-full flex-col overflow-y-auto p-0 sm:max-w-xl",
715
- children: [/* @__PURE__ */ S(I, {
723
+ children: [/* @__PURE__ */ w(R, {
716
724
  className: "border-b border-border-subtle px-6 pb-4 pt-6",
717
- children: [/* @__PURE__ */ x(L, {
725
+ children: [/* @__PURE__ */ C(Ie, {
718
726
  className: "text-lg",
719
727
  children: i?.name ?? "Account"
720
- }), /* @__PURE__ */ x(F, { children: i ? `${i.institution ?? "Manual account"} · ${i.type.replace(/_/g, " ")}` : "Loading account details…" })]
721
- }), ee ? /* @__PURE__ */ x("div", {
728
+ }), /* @__PURE__ */ C(L, { children: i ? `${i.institution ?? "Manual account"} · ${i.type.replace(/_/g, " ")}` : "Loading account details…" })]
729
+ }), ee ? /* @__PURE__ */ C("div", {
722
730
  className: "p-6",
723
- children: /* @__PURE__ */ x(f, { rows: 3 })
724
- }) : te ? /* @__PURE__ */ x("div", {
731
+ children: /* @__PURE__ */ C(p, { rows: 3 })
732
+ }) : te ? /* @__PURE__ */ C("div", {
725
733
  className: "p-6",
726
- children: /* @__PURE__ */ x(d, { onRetry: () => re() })
727
- }) : i ? /* @__PURE__ */ S("div", {
734
+ children: /* @__PURE__ */ C(f, { onRetry: () => ne() })
735
+ }) : i ? /* @__PURE__ */ w("div", {
728
736
  className: "space-y-6 p-6",
729
737
  children: [
730
- /* @__PURE__ */ S(ae, {
738
+ /* @__PURE__ */ w(ie, {
731
739
  glow: !0,
732
740
  className: "space-y-4",
733
- children: [/* @__PURE__ */ S("div", {
741
+ children: [/* @__PURE__ */ w("div", {
734
742
  className: "flex items-start justify-between gap-3",
735
- children: [/* @__PURE__ */ S("div", {
743
+ children: [/* @__PURE__ */ w("div", {
736
744
  className: "min-w-0",
737
- children: [/* @__PURE__ */ x("p", {
745
+ children: [/* @__PURE__ */ C("p", {
738
746
  className: "text-xs uppercase tracking-wide text-text-secondary",
739
747
  children: "Cash balance"
740
- }), /* @__PURE__ */ x("p", {
748
+ }), /* @__PURE__ */ C("p", {
741
749
  className: "mt-1 text-3xl font-semibold tracking-tight text-text-primary",
742
- children: m(i.cashBalance, i.currency)
750
+ children: h(i.cashBalance, i.currency)
743
751
  })]
744
- }), /* @__PURE__ */ x(C, {
745
- variant: ce(i.status),
752
+ }), /* @__PURE__ */ C(T, {
753
+ variant: se(i.status),
746
754
  children: i.status
747
755
  })]
748
- }), /* @__PURE__ */ S("div", {
756
+ }), /* @__PURE__ */ w("div", {
749
757
  className: "flex flex-wrap items-center gap-x-6 gap-y-2 border-t border-border-subtle pt-3 text-xs",
750
758
  children: [
751
- /* @__PURE__ */ S("div", {
759
+ /* @__PURE__ */ w("div", {
752
760
  className: "flex items-center gap-1.5",
753
- children: [/* @__PURE__ */ x("span", {
761
+ children: [/* @__PURE__ */ C("span", {
754
762
  className: "text-text-secondary",
755
763
  children: "Owner"
756
- }), /* @__PURE__ */ x(o, {
764
+ }), /* @__PURE__ */ C(s, {
757
765
  id: i.ownerId,
758
766
  className: "font-medium text-text-primary"
759
767
  })]
760
768
  }),
761
- /* @__PURE__ */ S("div", {
769
+ /* @__PURE__ */ w("div", {
762
770
  className: "flex items-center gap-1.5",
763
- children: [/* @__PURE__ */ x("span", {
771
+ children: [/* @__PURE__ */ C("span", {
764
772
  className: "text-text-secondary",
765
773
  children: "Holdings value"
766
- }), /* @__PURE__ */ x("span", {
774
+ }), /* @__PURE__ */ C("span", {
767
775
  className: "font-medium text-text-primary",
768
- children: p > 0 ? m(p, i.currency) : "—"
776
+ children: m > 0 ? h(m, i.currency) : "—"
769
777
  })]
770
778
  }),
771
- /* @__PURE__ */ S("div", {
779
+ /* @__PURE__ */ w("div", {
772
780
  className: "flex items-center gap-1.5",
773
- children: [/* @__PURE__ */ x("span", {
781
+ children: [/* @__PURE__ */ C("span", {
774
782
  className: "text-text-secondary",
775
783
  children: "Positions"
776
- }), /* @__PURE__ */ x("span", {
784
+ }), /* @__PURE__ */ C("span", {
777
785
  className: "font-medium text-text-primary",
778
786
  children: i.holdings.length
779
787
  })]
@@ -781,171 +789,178 @@ function He({ accountId: t, onClose: n, onRecordTransaction: r }) {
781
789
  ]
782
790
  })]
783
791
  }),
784
- l.length > 0 ? /* @__PURE__ */ S("div", {
792
+ u.length > 0 ? /* @__PURE__ */ w("div", {
785
793
  className: "rounded-xl border border-border-subtle bg-bg-surface p-4",
786
- children: [/* @__PURE__ */ x("h3", {
794
+ children: [/* @__PURE__ */ C("h3", {
787
795
  className: "mb-2 text-sm font-semibold text-text-primary",
788
796
  children: "Holdings allocation"
789
- }), /* @__PURE__ */ x(ie, {
790
- data: l,
791
- centerValue: oe(p, i.currency),
797
+ }), /* @__PURE__ */ C(re, {
798
+ data: u,
799
+ centerValue: ae(m, i.currency),
792
800
  centerLabel: "Market value",
793
801
  height: 180,
794
- valueFormatter: (e) => m(e, i.currency)
802
+ valueFormatter: (e) => h(e, i.currency)
795
803
  })]
796
804
  }) : null,
797
- /* @__PURE__ */ S(Le, {
805
+ /* @__PURE__ */ C("div", {
806
+ className: "rounded-xl border border-border-subtle bg-bg-surface p-4",
807
+ children: /* @__PURE__ */ C(_, {
808
+ entityType: "brainyrich-account",
809
+ entityId: i.id
810
+ })
811
+ }),
812
+ /* @__PURE__ */ w(H, {
798
813
  defaultValue: "holdings",
799
814
  className: "w-full",
800
815
  children: [
801
- /* @__PURE__ */ S(H, {
816
+ /* @__PURE__ */ w(W, {
802
817
  className: "w-full",
803
818
  children: [
804
- /* @__PURE__ */ x(U, {
819
+ /* @__PURE__ */ C(G, {
805
820
  value: "holdings",
806
821
  className: "flex-1",
807
822
  children: "Holdings"
808
823
  }),
809
- /* @__PURE__ */ x(U, {
824
+ /* @__PURE__ */ C(G, {
810
825
  value: "transactions",
811
826
  className: "flex-1",
812
827
  children: "Transactions"
813
828
  }),
814
- /* @__PURE__ */ x(U, {
829
+ /* @__PURE__ */ C(G, {
815
830
  value: "documents",
816
831
  className: "flex-1",
817
832
  children: "Documents"
818
833
  })
819
834
  ]
820
835
  }),
821
- /* @__PURE__ */ x(V, {
836
+ /* @__PURE__ */ C(U, {
822
837
  value: "holdings",
823
838
  className: "mt-4",
824
- children: i.holdings.length === 0 ? /* @__PURE__ */ x(u, {
825
- icon: /* @__PURE__ */ x(me, {
839
+ children: i.holdings.length === 0 ? /* @__PURE__ */ C(d, {
840
+ icon: /* @__PURE__ */ C(ge, {
826
841
  className: "size-6",
827
842
  "aria-hidden": "true"
828
843
  }),
829
844
  title: "No holdings",
830
845
  description: "This account has no positions recorded yet."
831
- }) : /* @__PURE__ */ x("div", {
846
+ }) : /* @__PURE__ */ C("div", {
832
847
  className: "overflow-x-auto rounded-lg border border-border-subtle",
833
- children: /* @__PURE__ */ S(Pe, { children: [/* @__PURE__ */ x(Ie, { children: /* @__PURE__ */ S(B, { children: [
834
- /* @__PURE__ */ x(z, { children: "Holding" }),
835
- /* @__PURE__ */ x(z, {
848
+ children: /* @__PURE__ */ w(Le, { children: [/* @__PURE__ */ C(ze, { children: /* @__PURE__ */ w(V, { children: [
849
+ /* @__PURE__ */ C(B, { children: "Holding" }),
850
+ /* @__PURE__ */ C(B, {
836
851
  className: "text-right",
837
852
  children: "Qty"
838
853
  }),
839
- /* @__PURE__ */ x(z, {
854
+ /* @__PURE__ */ C(B, {
840
855
  className: "text-right",
841
856
  children: "Price"
842
857
  }),
843
- /* @__PURE__ */ x(z, {
858
+ /* @__PURE__ */ C(B, {
844
859
  className: "text-right",
845
860
  children: "Market value"
846
861
  })
847
- ] }) }), /* @__PURE__ */ x(Fe, { children: i.holdings.map((e) => /* @__PURE__ */ S(B, {
862
+ ] }) }), /* @__PURE__ */ C(Re, { children: i.holdings.map((e) => /* @__PURE__ */ w(V, {
848
863
  className: "transition-colors hover:bg-bg-elevated",
849
864
  children: [
850
- /* @__PURE__ */ S(R, { children: [/* @__PURE__ */ x("p", {
865
+ /* @__PURE__ */ w(z, { children: [/* @__PURE__ */ C("p", {
851
866
  className: "font-medium text-text-primary",
852
867
  children: e.symbol
853
- }), e.name ? /* @__PURE__ */ x("p", {
868
+ }), e.name ? /* @__PURE__ */ C("p", {
854
869
  className: "truncate text-xs text-text-secondary",
855
870
  children: e.name
856
871
  }) : null] }),
857
- /* @__PURE__ */ x(R, {
872
+ /* @__PURE__ */ C(z, {
858
873
  className: "text-right tabular-nums text-text-secondary",
859
874
  children: e.quantity
860
875
  }),
861
- /* @__PURE__ */ x(R, {
876
+ /* @__PURE__ */ C(z, {
862
877
  className: "text-right tabular-nums text-text-secondary",
863
- children: m(e.lastPrice, e.currency)
878
+ children: h(e.lastPrice, e.currency)
864
879
  }),
865
- /* @__PURE__ */ x(R, {
880
+ /* @__PURE__ */ C(z, {
866
881
  className: "text-right font-semibold tabular-nums text-text-primary",
867
- children: m(e.marketValue, e.currency)
882
+ children: h(e.marketValue, e.currency)
868
883
  })
869
884
  ]
870
885
  }, e.id)) })] })
871
886
  })
872
887
  }),
873
- /* @__PURE__ */ S(V, {
888
+ /* @__PURE__ */ w(U, {
874
889
  value: "transactions",
875
890
  className: "mt-4 space-y-3",
876
- children: [/* @__PURE__ */ S("div", {
891
+ children: [/* @__PURE__ */ w("div", {
877
892
  className: "flex items-center justify-between",
878
- children: [/* @__PURE__ */ x("h3", {
893
+ children: [/* @__PURE__ */ C("h3", {
879
894
  className: "text-sm font-semibold text-text-primary",
880
895
  children: "Recent activity"
881
- }), /* @__PURE__ */ S(w, {
896
+ }), /* @__PURE__ */ w(E, {
882
897
  size: "sm",
883
898
  onClick: r,
884
- children: [/* @__PURE__ */ x(b, {
899
+ children: [/* @__PURE__ */ C(S, {
885
900
  className: "size-4",
886
901
  "aria-hidden": "true"
887
902
  }), "Record"]
888
903
  })]
889
- }), s.isLoading ? /* @__PURE__ */ x(f, { rows: 2 }) : s.isError ? /* @__PURE__ */ x(d, { onRetry: () => s.refetch() }) : c.length === 0 ? /* @__PURE__ */ x(u, {
890
- icon: /* @__PURE__ */ x(b, {
904
+ }), c.isLoading ? /* @__PURE__ */ C(p, { rows: 2 }) : c.isError ? /* @__PURE__ */ C(f, { onRetry: () => c.refetch() }) : l.length === 0 ? /* @__PURE__ */ C(d, {
905
+ icon: /* @__PURE__ */ C(S, {
891
906
  className: "size-6",
892
907
  "aria-hidden": "true"
893
908
  }),
894
909
  title: "No transactions",
895
910
  description: "Record a transaction to see activity here.",
896
- action: /* @__PURE__ */ S(w, {
911
+ action: /* @__PURE__ */ w(E, {
897
912
  size: "sm",
898
913
  onClick: r,
899
- children: [/* @__PURE__ */ x(_e, {
914
+ children: [/* @__PURE__ */ C(ye, {
900
915
  className: "size-4",
901
916
  "aria-hidden": "true"
902
917
  }), "Record transaction"]
903
918
  })
904
- }) : /* @__PURE__ */ S("div", {
919
+ }) : /* @__PURE__ */ w("div", {
905
920
  className: "space-y-2",
906
- children: [c.map((e) => {
907
- let t = G(e.type), n = t ? v : _, r = t ? "text-status-success-text" : "text-status-error-text";
908
- return /* @__PURE__ */ S("div", {
921
+ children: [l.map((e) => {
922
+ let t = q(e.type), n = t ? b : y, r = t ? "text-status-success-text" : "text-status-error-text";
923
+ return /* @__PURE__ */ w("div", {
909
924
  className: "flex items-center justify-between gap-3 rounded-lg border border-border-subtle bg-bg-surface p-3 transition-colors hover:bg-bg-elevated",
910
- children: [/* @__PURE__ */ S("div", {
925
+ children: [/* @__PURE__ */ w("div", {
911
926
  className: "flex min-w-0 items-center gap-3",
912
- children: [/* @__PURE__ */ x("span", {
927
+ children: [/* @__PURE__ */ C("span", {
913
928
  className: `flex size-8 shrink-0 items-center justify-center rounded-full ${t ? "bg-status-success-bg" : "bg-status-error-bg"} ${r}`,
914
929
  "aria-hidden": "true",
915
- children: /* @__PURE__ */ x(n, { className: "size-4" })
916
- }), /* @__PURE__ */ S("div", {
930
+ children: /* @__PURE__ */ C(n, { className: "size-4" })
931
+ }), /* @__PURE__ */ w("div", {
917
932
  className: "min-w-0",
918
- children: [/* @__PURE__ */ S("div", {
933
+ children: [/* @__PURE__ */ w("div", {
919
934
  className: "flex items-center gap-2",
920
- children: [/* @__PURE__ */ x("span", {
935
+ children: [/* @__PURE__ */ C("span", {
921
936
  className: "truncate text-sm font-medium text-text-primary",
922
937
  children: e.type.replace(/_/g, " ")
923
- }), e.symbol ? /* @__PURE__ */ x(C, {
938
+ }), e.symbol ? /* @__PURE__ */ C(T, {
924
939
  variant: "outline",
925
940
  className: "shrink-0",
926
941
  children: e.symbol
927
942
  }) : null]
928
- }), /* @__PURE__ */ x("p", {
943
+ }), /* @__PURE__ */ C("p", {
929
944
  className: "mt-0.5 text-xs text-text-secondary",
930
- children: se(e.tradeDate)
945
+ children: oe(e.tradeDate)
931
946
  })]
932
947
  })]
933
- }), /* @__PURE__ */ S("span", {
948
+ }), /* @__PURE__ */ w("span", {
934
949
  className: `shrink-0 text-sm font-semibold tabular-nums ${r}`,
935
- children: [t ? "+" : "−", m(Math.abs(e.amount), e.currency)]
950
+ children: [t ? "+" : "−", h(Math.abs(e.amount), e.currency)]
936
951
  })]
937
952
  }, e.id);
938
- }), /* @__PURE__ */ x(ne, {
939
- hasMore: s.hasMore,
940
- onClick: s.loadMore,
941
- loading: s.isFetchingNextPage
953
+ }), /* @__PURE__ */ C(o, {
954
+ hasMore: c.hasMore,
955
+ onClick: c.loadMore,
956
+ loading: c.isFetchingNextPage
942
957
  })]
943
958
  })]
944
959
  }),
945
- /* @__PURE__ */ x(V, {
960
+ /* @__PURE__ */ C(U, {
946
961
  value: "documents",
947
962
  className: "mt-4",
948
- children: /* @__PURE__ */ x(h, {
963
+ children: /* @__PURE__ */ C(g, {
949
964
  entityType: "brainyrich-account",
950
965
  entityId: i.id
951
966
  })
@@ -953,9 +968,9 @@ function He({ accountId: t, onClose: n, onRecordTransaction: r }) {
953
968
  ]
954
969
  })
955
970
  ]
956
- }) : /* @__PURE__ */ x("div", {
971
+ }) : /* @__PURE__ */ C("div", {
957
972
  className: "p-6",
958
- children: /* @__PURE__ */ x(u, {
973
+ children: /* @__PURE__ */ C(d, {
959
974
  title: "Account not found",
960
975
  description: "This account is no longer available."
961
976
  })
@@ -964,6 +979,6 @@ function He({ accountId: t, onClose: n, onRecordTransaction: r }) {
964
979
  });
965
980
  }
966
981
  //#endregion
967
- export { J as AccountsPage };
982
+ export { X as AccountsPage };
968
983
 
969
984
  //# sourceMappingURL=AccountsPage.js.map