@mx-cartographer/experiences 7.7.2 → 7.8.0-alpha-ram-goal-bug

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 (92) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/Account-BiB1F8lL.mjs +118 -0
  3. package/dist/{Account-BfkKlfsW.mjs → Account-DuOz1a27.mjs} +1 -1
  4. package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
  5. package/dist/{AccountDetailsHeader-DqYIuhOs.mjs → AccountDetailsHeader-Cf2TUJnM.mjs} +4 -4
  6. package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
  7. package/dist/{AccountFields-yP8QdgPd.mjs → AccountFields-UdOvbQ5H.mjs} +7 -6
  8. package/dist/{AccountListItem-DMbu9ehd.mjs → AccountListItem-BPVxmNT_.mjs} +7 -7
  9. package/dist/AccountStore-BbPWe2C9.mjs +244 -0
  10. package/dist/Accounts-M-LTzStv.mjs +27 -0
  11. package/dist/{CategoryStore-Cnw9yUys.mjs → CategoryStore-BYICdb9m.mjs} +73 -73
  12. package/dist/CategoryUtil-meuejJqP.mjs +80 -0
  13. package/dist/{ConnectionsDrawer-BqR6FWJO.mjs → ConnectionsDrawer-BDpVTTSe.mjs} +1 -1
  14. package/dist/{DebtsStore-DuSdXM1k.mjs → DebtsStore-BIbOVCPe.mjs} +12 -12
  15. package/dist/{ExportCsvAction-HK5CeZWR.mjs → ExportCsvAction-CDuzTva1.mjs} +2 -2
  16. package/dist/GlobalAccountFilter-DQCPNc95.mjs +316 -0
  17. package/dist/GoalStore-B4LVt_kH.mjs +422 -0
  18. package/dist/{ManageIncome-BrTrlplL.mjs → ManageIncome-CL3hv8i9.mjs} +44 -44
  19. package/dist/NetWorthStore-yV43kJro.mjs +168 -0
  20. package/dist/{NotificationSettings-D4Vh3z8I.mjs → NotificationSettings-SPg3pwbX.mjs} +171 -169
  21. package/dist/{NotificationStore-CDX_kqHa.mjs → NotificationStore-Ck2KdNmT.mjs} +22 -14
  22. package/dist/{RecurringSettings-D2V6l77l.mjs → RecurringSettings-Bmnnpb48.mjs} +16 -16
  23. package/dist/{RecurringTransactionsStore-Caf1cq4v.mjs → RecurringTransactionsStore-BQBEJOPP.mjs} +91 -81
  24. package/dist/{RecurringTransactions-Bf4lX0Cn.mjs → RepeatingTransaction-miZVnk_A.mjs} +4 -4
  25. package/dist/{SettingsStore-krIRNwHK.mjs → SettingsStore-BHpuyujx.mjs} +1 -1
  26. package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
  27. package/dist/{SpendingLegend-gTCJLLkV.mjs → SpendingLegend-CD60HCYS.mjs} +33 -33
  28. package/dist/{TransactionDetails-7MHOshKQ.mjs → TransactionDetails-BDhz3DLT.mjs} +2 -2
  29. package/dist/TransactionStore-BSp5bOKg.mjs +705 -0
  30. package/dist/{User-LJpEwPtn.mjs → User-B0LnmiKO.mjs} +21 -20
  31. package/dist/WidgetContainer-BbPS3Yxz.mjs +555 -0
  32. package/dist/accounts/index.es.js +421 -391
  33. package/dist/accounts/stores/AccountStore.d.ts +30 -23
  34. package/dist/accounts/utils/Accounts.d.ts +2 -1
  35. package/dist/budgets/index.es.js +546 -540
  36. package/dist/budgets/store/BudgetsStore.d.ts +1 -0
  37. package/dist/cashflow/index.es.js +444 -457
  38. package/dist/categories/index.es.js +1 -1
  39. package/dist/categories/stores/CategoryStore.d.ts +10 -5
  40. package/dist/categories/util/CategoryUtil.d.ts +3 -2
  41. package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
  42. package/dist/common/components/SkeletonLoader.d.ts +7 -0
  43. package/dist/common/components/WidgetContainer.d.ts +7 -6
  44. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
  45. package/dist/common/components/index.d.ts +2 -2
  46. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  47. package/dist/common/index.es.js +459 -445
  48. package/dist/common/stores/AppDataStore.d.ts +3 -1
  49. package/dist/common/stores/GlobalCopyStore.d.ts +0 -1
  50. package/dist/common/stores/GlobalStore.d.ts +3 -3
  51. package/dist/common/stores/GlobalUiStore.d.ts +10 -6
  52. package/dist/common/stores/UserStore.d.ts +3 -2
  53. package/dist/common/types/Account.d.ts +9 -6
  54. package/dist/dashboard/index.es.js +84 -116
  55. package/dist/debts/index.es.js +417 -413
  56. package/dist/{exportTransactionsToCSV-BrTYdSgJ.mjs → exportTransactionsToCSV-DtQ7ovAR.mjs} +1 -1
  57. package/dist/finstrong/index.es.js +1167 -1110
  58. package/dist/goals/index.es.js +618 -598
  59. package/dist/goals/stores/GoalStore.d.ts +19 -4
  60. package/dist/help/index.es.js +13 -13
  61. package/dist/investments/index.es.js +330 -325
  62. package/dist/investments/stores/HoldingStore.d.ts +1 -0
  63. package/dist/networth/components/NetWorthChart.d.ts +3 -2
  64. package/dist/networth/components/NetWorthList.d.ts +3 -3
  65. package/dist/networth/index.es.js +423 -433
  66. package/dist/networth/stores/NetWorthStore.d.ts +20 -9
  67. package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
  68. package/dist/notifications/index.es.js +90 -91
  69. package/dist/notifications/stores/NotificationStore.d.ts +3 -1
  70. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
  71. package/dist/recurringtransactions/index.es.js +543 -562
  72. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +4 -2
  73. package/dist/settings/index.es.js +253 -248
  74. package/dist/spending/index.es.js +282 -301
  75. package/dist/transactions/index.es.js +269 -263
  76. package/dist/transactions/stores/TransactionStore.d.ts +26 -77
  77. package/dist/transactions/stores/UiStore.d.ts +0 -2
  78. package/dist/trends/index.es.js +708 -699
  79. package/dist/{useAccountDisplayName-BTvP_pw6.mjs → useAccountDisplayName-Bot2tb4n.mjs} +1 -1
  80. package/package.json +3 -3
  81. package/dist/AccountStore-CWFzg8-E.mjs +0 -260
  82. package/dist/Accounts-CWt-NRq8.mjs +0 -9
  83. package/dist/CategoryUtil-DZflYFam.mjs +0 -78
  84. package/dist/ConnectDrawer-BOjfI6rz.mjs +0 -563
  85. package/dist/GoalStore-C7ahxxLi.mjs +0 -364
  86. package/dist/NetWorthStore-xWIo9CYU.mjs +0 -150
  87. package/dist/TransactionStore-DJwPaZuM.mjs +0 -677
  88. package/dist/WidgetContainer-CrK6tyHr.mjs +0 -572
  89. package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
  90. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
  91. package/dist/common/components/accountfilter/index.d.ts +0 -1
  92. package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
@@ -4,20 +4,20 @@ import { observer as P } from "mobx-react-lite";
4
4
  import _ from "@mui/material/Stack";
5
5
  import Fe from "@mui/material/Tab";
6
6
  import Ee from "@mui/material/Tabs";
7
- import { C as pe } from "../ConnectionsDrawer-BqR6FWJO.mjs";
7
+ import { C as pe } from "../ConnectionsDrawer-BDpVTTSe.mjs";
8
8
  import xe from "@mui/material/useMediaQuery";
9
9
  import Ne from "@mui/material/Box";
10
- import Ge from "@mui/material/Collapse";
10
+ import Me from "@mui/material/Collapse";
11
11
  import K from "@mui/material/Divider";
12
12
  import te from "@mui/material/List";
13
13
  import ne from "@mui/material/ListItem";
14
- import Me from "@mui/material/ListItemButton";
14
+ import Ge from "@mui/material/ListItemButton";
15
15
  import ye from "@mui/material/ToggleButton";
16
16
  import fe from "@mui/material/ToggleButtonGroup";
17
17
  import { Text as r, P as J, InstitutionLogo as oe } from "@mxenabled/mxui";
18
18
  import He from "@mui/material/Button";
19
- import { u as G, g as ve, s as H, b as Q, d as le } from "../hooks-ZMp65DFz.mjs";
20
- import { A as z, W as Ue } from "../WidgetContainer-CrK6tyHr.mjs";
19
+ import { u as M, g as ve, s as H, b as Q, d as le } from "../hooks-ZMp65DFz.mjs";
20
+ import { A as z, W as Ue } from "../WidgetContainer-BbPS3Yxz.mjs";
21
21
  import { a as je, f as ie } from "../NumberFormatting-DjTD0t3W.mjs";
22
22
  import { u as U } from "../useScreenSize-B6JyS_Lj.mjs";
23
23
  import ce from "@mui/material/styles/useTheme";
@@ -32,16 +32,17 @@ import be from "@mui/material/Accordion";
32
32
  import _e from "@mui/material/AccordionDetails";
33
33
  import we from "@mui/material/AccordionSummary";
34
34
  import re from "@mui/material/Paper";
35
- import p from "@mui/system/Stack";
35
+ import y from "@mui/system/Stack";
36
36
  import Ce from "@mui/material/TextField";
37
37
  import { D as Xe } from "../Drawer-DV4NTsFg.mjs";
38
38
  import { DataGridPro as $e } from "@mui/x-data-grid-pro";
39
39
  import { Stack as qe } from "@mui/material";
40
40
  import { L as Se } from "../Loader-DUaFpDGv.mjs";
41
41
  import { u as Ke } from "../useWidgetLoadTimer-hIOioiKx.mjs";
42
- import { E as Ye } from "../EmptyState-DoxNUae-.mjs";
42
+ import { A as Ye } from "../Account-BiB1F8lL.mjs";
43
+ import { E as Qe } from "../EmptyState-DoxNUae-.mjs";
43
44
  const me = ({ sx: t = {} }) => {
44
- const { investments: h } = G(), { onEvent: c } = ve(), { setShowConnectionsWidget: u } = H();
45
+ const { investments: h } = M(), { onEvent: c } = ve(), { setShowConnectionsWidget: m } = H();
45
46
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", gap: 24, height: 164, p: 24, width: "100%", ...t }, children: [
46
47
  /* @__PURE__ */ o(
47
48
  _,
@@ -74,7 +75,7 @@ const me = ({ sx: t = {} }) => {
74
75
  He,
75
76
  {
76
77
  onClick: () => {
77
- u(!0), c(z.ACCOUNTS_CLICK_CONNECT);
78
+ m(!0), c(z.ACCOUNTS_CLICK_CONNECT);
78
79
  },
79
80
  sx: { fontWeight: 600 },
80
81
  variant: "outlined",
@@ -82,7 +83,7 @@ const me = ({ sx: t = {} }) => {
82
83
  }
83
84
  )
84
85
  ] });
85
- }, Qe = {
86
+ }, Je = {
86
87
  allocations_cash: "#AEDCCC",
87
88
  allocations_convertible: "#80CAD0",
88
89
  allocations_foreign_bond: "#51B9D4",
@@ -92,7 +93,7 @@ const me = ({ sx: t = {} }) => {
92
93
  allocations_unknown: "#161D6A",
93
94
  allocations_us_bond: "#254995",
94
95
  allocations_us_stock: "#1E2D84"
95
- }, Je = [
96
+ }, Ze = [
96
97
  {
97
98
  name: "allocations_cash"
98
99
  },
@@ -120,122 +121,122 @@ const me = ({ sx: t = {} }) => {
120
121
  {
121
122
  name: "allocations_unknown"
122
123
  }
123
- ], Ze = (t, h, c) => {
124
- const u = h, x = c;
125
- return t >= Math.min(u, x) && t < Math.max(u, x);
126
- }, et = (t, h, c) => {
127
- const u = [
124
+ ], et = (t, h, c) => {
125
+ const m = h, v = c;
126
+ return t >= Math.min(m, v) && t < Math.max(m, v);
127
+ }, tt = (t, h, c) => {
128
+ const m = [
128
129
  ...new Set(t.map((d) => d.name.toLowerCase()))
129
130
  ];
130
- let x;
131
- return u.map((d) => {
132
- const l = t.reduce((m, y) => {
133
- const b = y.name;
134
- return b.toLowerCase() === d ? (x = b, Y(y) * y[h] / 100 + m) : m;
131
+ let v;
132
+ return m.map((d) => {
133
+ const s = t.reduce((g, f) => {
134
+ const p = f.name;
135
+ return p.toLowerCase() === d ? (v = p, Y(f) * f[h] / 100 + g) : g;
135
136
  }, 0);
136
137
  return {
137
- displayName: x,
138
- name: x,
139
- value: l,
140
- percentage: l / c
138
+ displayName: v,
139
+ name: v,
140
+ value: s,
141
+ percentage: s / c
141
142
  };
142
143
  });
143
- }, Y = (t) => t.calculated_market_value ? t.calculated_market_value : t.market_value, tt = (t, h, c) => {
144
- const u = Object.values(h.allocations_list), x = [];
145
- let v = 0;
146
- const d = t.map(({ guid: n }) => n), l = c.filter(({ account_guid: n }) => d.includes(n)).map((n) => ({
144
+ }, Y = (t) => t.calculated_market_value ? t.calculated_market_value : t.market_value, nt = (t, h, c) => {
145
+ const m = Object.values(h.allocations_list), v = [];
146
+ let b = 0;
147
+ const d = t.map(({ guid: n }) => n), s = c.filter(({ account_guid: n }) => d.includes(n)).map((n) => ({
147
148
  ...n,
148
149
  name: n.symbol || n.description,
149
150
  gainLoss: n.cost_basis || n.cost_basis === 0 ? Y(n) - n.cost_basis : 0
150
- })), { cashBalance: m, totalAccountBalance: y } = t.reduce(
151
- (n, g) => ({
152
- cashBalance: n.cashBalance + (g.cash_balance || 0),
153
- totalAccountBalance: n.totalAccountBalance + (g.balance || 0)
151
+ })), { cashBalance: g, totalAccountBalance: f } = t.reduce(
152
+ (n, x) => ({
153
+ cashBalance: n.cashBalance + (x.cash_balance || 0),
154
+ totalAccountBalance: n.totalAccountBalance + (x.balance || 0)
154
155
  }),
155
156
  { cashBalance: 0, totalAccountBalance: 0 }
156
- ), { marketValue: b, totalGainLoss: s } = l.reduce(
157
- (n, g) => ({
158
- marketValue: n.marketValue + Y(g),
159
- totalGainLoss: n.totalGainLoss + g.gainLoss
157
+ ), { marketValue: p, totalGainLoss: l } = s.reduce(
158
+ (n, x) => ({
159
+ marketValue: n.marketValue + Y(x),
160
+ totalGainLoss: n.totalGainLoss + x.gainLoss
160
161
  }),
161
162
  { marketValue: 0, totalGainLoss: 0 }
162
- ), f = b + m;
163
- Je.forEach((n, g) => {
164
- const C = l.filter(
163
+ ), u = p + g;
164
+ Ze.forEach((n, x) => {
165
+ const w = s.filter(
165
166
  (I) => !!I[n.name]
166
167
  );
167
- let S = C.reduce(
168
+ let S = w.reduce(
168
169
  (I, W) => I + Y(W) * W[n.name] / 100,
169
170
  0
170
171
  );
171
- const B = et(
172
- C,
172
+ const B = tt(
173
+ w,
173
174
  n.name,
174
175
  S
175
176
  );
176
- if (n.name === "allocations_cash" && m > 0) {
177
- S += m;
177
+ if (n.name === "allocations_cash" && g > 0) {
178
+ S += g;
178
179
  const I = {
179
180
  displayName: h.cash_balance_display_name,
180
181
  name: "allocations_name",
181
- value: m,
182
- percentage: m / f
182
+ value: g,
183
+ percentage: g / u
183
184
  };
184
185
  B.push(I);
185
186
  }
186
- S > 0 && (x.push({
187
+ S > 0 && (v.push({
187
188
  name: n.name,
188
- displayName: u[g],
189
- guid: `${n.name}-${g}`,
189
+ displayName: m[x],
190
+ guid: `${n.name}-${x}`,
190
191
  holdings: B,
191
- percentage: S / f,
192
+ percentage: S / u,
192
193
  value: S,
193
- color: Qe[n.name]
194
- }), v += S);
194
+ color: Je[n.name]
195
+ }), b += S);
195
196
  });
196
- const i = x.map(
197
- ({ displayName: n, guid: g, color: C, value: S }) => ({
198
- id: g,
199
- color: C,
197
+ const i = v.map(
198
+ ({ displayName: n, guid: x, color: w, value: S }) => ({
199
+ id: x,
200
+ color: w,
200
201
  label: n,
201
- value: S / v * 100
202
+ value: S / b * 100
202
203
  })
203
204
  );
204
205
  return {
205
- investmentsData: x,
206
+ investmentsData: v,
206
207
  donutData: i,
207
- totalAmount: v,
208
- totalGainLoss: s,
209
- totalMarketValue: f,
210
- totalGainLossPercentage: s / y
208
+ totalAmount: b,
209
+ totalGainLoss: l,
210
+ totalMarketValue: u,
211
+ totalGainLossPercentage: l / f
211
212
  };
212
- }, ae = (t) => t < 1e-3 ? "< 0.1%" : je(t), R = (t) => t === 0 ? ie(t, "0,0.00") : Ze(t, -0.01, 0.01) ? "< $0.01" : ie(t, "0,0.00"), nt = ({
213
+ }, ae = (t) => t < 1e-3 ? "< 0.1%" : je(t), R = (t) => t === 0 ? ie(t, "0,0.00") : et(t, -0.01, 0.01) ? "< $0.01" : ie(t, "0,0.00"), ot = ({
213
214
  data: t,
214
215
  onSelected: h,
215
216
  selectedId: c,
216
- selectedTabs: u,
217
- setSelectedTabs: x
217
+ selectedTabs: m,
218
+ setSelectedTabs: v
218
219
  }) => {
219
- const v = (s, f) => {
220
- f !== null && x(f);
220
+ const b = (l, u) => {
221
+ u !== null && v(u);
221
222
  }, { isMobile: d } = U(), {
222
- investments: { allocation: l }
223
- } = G(), m = [
224
- { label: l.tabs_label_dollar, value: 0 },
225
- { label: l.tabs_label_percent, value: 1 }
226
- ], y = !t?.investmentsData.length, { isSmallMobile: b } = U();
223
+ investments: { allocation: s }
224
+ } = M(), g = [
225
+ { label: s.tabs_label_dollar, value: 0 },
226
+ { label: s.tabs_label_percent, value: 1 }
227
+ ], f = !t?.investmentsData.length, { isSmallMobile: p } = U();
227
228
  return /* @__PURE__ */ o(_, { sx: { mt: 15, gap: 12, width: d ? 250 : 412 }, children: [
228
229
  /* @__PURE__ */ e(
229
230
  fe,
230
231
  {
231
232
  exclusive: !0,
232
233
  fullWidth: !0,
233
- onChange: v,
234
- value: y ? -1 : u,
235
- children: m.map(({ label: s, value: f }) => /* @__PURE__ */ e(ye, { color: "primary", value: f, children: /* @__PURE__ */ e(r, { bold: !0, textTransform: "capitalize", variant: "Body", children: s }) }, s))
234
+ onChange: b,
235
+ value: f ? -1 : m,
236
+ children: g.map(({ label: l, value: u }) => /* @__PURE__ */ e(ye, { color: "primary", value: u, children: /* @__PURE__ */ e(r, { bold: !0, textTransform: "capitalize", variant: "Body", children: l }) }, l))
236
237
  }
237
238
  ),
238
- /* @__PURE__ */ e(te, { sx: { px: 12 }, children: t.investmentsData.map((s) => /* @__PURE__ */ o(A.Fragment, { children: [
239
+ /* @__PURE__ */ e(te, { sx: { px: 12 }, children: t.investmentsData.map((l) => /* @__PURE__ */ o(A.Fragment, { children: [
239
240
  /* @__PURE__ */ e(
240
241
  ne,
241
242
  {
@@ -245,10 +246,10 @@ const me = ({ sx: t = {} }) => {
245
246
  minHeight: 44
246
247
  },
247
248
  children: /* @__PURE__ */ o(
248
- Me,
249
+ Ge,
249
250
  {
250
- "aria-expanded": c === s.guid,
251
- onClick: () => h(s.guid),
251
+ "aria-expanded": c === l.guid,
252
+ onClick: () => h(l.guid),
252
253
  sx: { minHeight: 44, px: 12, py: 0 },
253
254
  children: [
254
255
  /* @__PURE__ */ e(
@@ -257,7 +258,7 @@ const me = ({ sx: t = {} }) => {
257
258
  borderRadius: 4,
258
259
  flexShrink: 0,
259
260
  height: 8,
260
- sx: { backgroundColor: s.color, mr: 8 },
261
+ sx: { backgroundColor: l.color, mr: 8 },
261
262
  width: 8
262
263
  }
263
264
  ),
@@ -269,8 +270,8 @@ const me = ({ sx: t = {} }) => {
269
270
  justifyContent: "space-between",
270
271
  width: "100%",
271
272
  children: [
272
- /* @__PURE__ */ e(r, { bold: c === s.guid, children: s.displayName }),
273
- /* @__PURE__ */ e(r, { bold: c === s.guid, variant: "Body", children: u === 0 ? R(s.value) : ae(s.percentage) })
273
+ /* @__PURE__ */ e(r, { bold: c === l.guid, children: l.displayName }),
274
+ /* @__PURE__ */ e(r, { bold: c === l.guid, variant: "Body", children: m === 0 ? R(l.value) : ae(l.percentage) })
274
275
  ]
275
276
  }
276
277
  )
@@ -280,8 +281,8 @@ const me = ({ sx: t = {} }) => {
280
281
  }
281
282
  ),
282
283
  /* @__PURE__ */ e(K, {}),
283
- s.holdings && s.holdings.length > 0 && /* @__PURE__ */ e(Ge, { in: c === s.guid, unmountOnExit: !0, children: /* @__PURE__ */ o(te, { children: [
284
- s?.holdings?.map((f) => /* @__PURE__ */ e(
284
+ l.holdings && l.holdings.length > 0 && /* @__PURE__ */ e(Me, { in: c === l.guid, unmountOnExit: !0, children: /* @__PURE__ */ o(te, { children: [
285
+ l?.holdings?.map((u) => /* @__PURE__ */ e(
285
286
  ne,
286
287
  {
287
288
  sx: {
@@ -291,62 +292,62 @@ const me = ({ sx: t = {} }) => {
291
292
  },
292
293
  children: /* @__PURE__ */ o(_, { direction: "row", justifyContent: "space-between", width: "100%", children: [
293
294
  /* @__PURE__ */ o(r, { children: [
294
- f.displayName,
295
+ u.displayName,
295
296
  " "
296
297
  ] }),
297
- /* @__PURE__ */ e(r, { children: u === 0 ? R(f.value) : ae(f.percentage) })
298
+ /* @__PURE__ */ e(r, { children: m === 0 ? R(u.value) : ae(u.percentage) })
298
299
  ] })
299
300
  },
300
- f.displayName
301
+ u.displayName
301
302
  )),
302
303
  /* @__PURE__ */ e(K, {})
303
304
  ] }) })
304
- ] }, s.guid)) }),
305
- y ? /* @__PURE__ */ o(se, { children: [
306
- /* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: l.empty_data }),
305
+ ] }, l.guid)) }),
306
+ f ? /* @__PURE__ */ o(se, { children: [
307
+ /* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: s.empty_data }),
307
308
  /* @__PURE__ */ e(K, { sx: { borderColor: "border.light" } }),
308
309
  /* @__PURE__ */ e(
309
310
  me,
310
311
  {
311
312
  sx: {
312
- ".inner-container": { width: b ? "100%" : 364 }
313
+ ".inner-container": { width: p ? "100%" : 364 }
313
314
  }
314
315
  }
315
316
  )
316
- ] }) : u === 0 && /* @__PURE__ */ e(r, { bold: !0, sx: { textAlign: "right", pr: 24 }, children: `${l.total_label_text} ${R(t.totalAmount)}` })
317
+ ] }) : m === 0 && /* @__PURE__ */ e(r, { bold: !0, sx: { textAlign: "right", pr: 24 }, children: `${s.total_label_text} ${R(t.totalAmount)}` })
317
318
  ] });
318
- }, ot = ({
319
+ }, it = ({
319
320
  data: t,
320
321
  hoveredId: h,
321
322
  isPercentage: c,
322
- onMouseEnter: u,
323
- onMouseLeave: x,
324
- onSelected: v,
323
+ onMouseEnter: m,
324
+ onMouseLeave: v,
325
+ onSelected: b,
325
326
  selectedId: d,
326
- size: l = 150,
327
- totalLabel: m
327
+ size: s = 150,
328
+ totalLabel: g
328
329
  }) => {
329
- const y = ce(), b = y.palette.mode === "dark", s = A.useMemo(
330
+ const f = ce(), p = f.palette.mode === "dark", l = A.useMemo(
330
331
  () => d ? t.investmentsData.find(({ guid: B }) => B === d) : void 0,
331
332
  [d]
332
333
  ), {
333
- investments: { allocation: f }
334
- } = G(), i = A.useMemo(() => t.donutData.length > 0 ? t.donutData : [{ id: "0", color: y.palette.border.light, value: 100 }], [t, y]), n = b ? "#0AC295" : "#09A57F", g = b ? "grey.300" : "grey.700", C = () => s ? f.pie_chart_centered_click_for_details : c ? ae(t.totalGainLossPercentage) : R(t.totalGainLoss), S = t.totalGainLoss >= 0 ? n : g;
334
+ investments: { allocation: u }
335
+ } = M(), i = A.useMemo(() => t.donutData.length > 0 ? t.donutData : [{ id: "0", color: f.palette.border.light, value: 100 }], [t, f]), n = p ? "#0AC295" : "#09A57F", x = p ? "grey.300" : "grey.700", w = () => l ? u.pie_chart_centered_click_for_details : c ? ae(t.totalGainLossPercentage) : R(t.totalGainLoss), S = t.totalGainLoss >= 0 ? n : x;
335
336
  return /* @__PURE__ */ e(
336
337
  ze,
337
338
  {
338
339
  data: i,
339
340
  hoveredId: h,
340
- onClick: v,
341
- onMouseEnter: u,
342
- onMouseLeave: x,
341
+ onClick: b,
342
+ onMouseEnter: m,
343
+ onMouseLeave: v,
343
344
  selectedId: d,
344
- size: l,
345
- children: /* @__PURE__ */ e(_, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ e(_, { alignItems: "center", justifyContent: "center", minHeight: l, minWidth: l, children: /* @__PURE__ */ o(_, { alignItems: "center", sx: { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } }, children: [
346
- /* @__PURE__ */ e(r, { color: "text.secondary", noWrap: !0, children: s?.displayName ?? m }),
347
- /* @__PURE__ */ e(J, { color: "text.primary", variant: "H1", children: R(s?.value ?? t.totalMarketValue) }),
345
+ size: s,
346
+ children: /* @__PURE__ */ e(_, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ e(_, { alignItems: "center", justifyContent: "center", minHeight: s, minWidth: s, children: /* @__PURE__ */ o(_, { alignItems: "center", sx: { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } }, children: [
347
+ /* @__PURE__ */ e(r, { color: "text.secondary", noWrap: !0, children: l?.displayName ?? g }),
348
+ /* @__PURE__ */ e(J, { color: "text.primary", variant: "H1", children: R(l?.value ?? t.totalMarketValue) }),
348
349
  /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
349
- !s && /* @__PURE__ */ e(
350
+ !l && /* @__PURE__ */ e(
350
351
  k,
351
352
  {
352
353
  name: t.totalGainLoss >= 0 ? "trending_up" : "trending_down",
@@ -362,23 +363,23 @@ const me = ({ sx: t = {} }) => {
362
363
  fontWeight: 700
363
364
  },
364
365
  variant: "Small",
365
- children: C()
366
+ children: w()
366
367
  }
367
368
  )
368
369
  ] })
369
370
  ] }) }) })
370
371
  }
371
372
  );
372
- }, it = () => {
373
- const [t, h] = A.useState(0), [c, u] = A.useState(""), [x, v] = A.useState(""), d = (n) => {
374
- c !== n ? u(n) : (u(""), v(""));
375
- }, { selectedAccountGuids: l } = Q(), { visibleHoldings: m } = H(), { visibleInvestmentAccounts: y } = le(), {
376
- investments: { allocation: b }
377
- } = G(), s = tt(
378
- y.filter(({ guid: n }) => l.includes(n)),
379
- b,
380
- m
381
- ), { isMobile: f } = U(), i = xe("(max-width:768px)");
373
+ }, rt = () => {
374
+ const [t, h] = A.useState(0), [c, m] = A.useState(""), [v, b] = A.useState(""), d = (n) => {
375
+ c !== n ? m(n) : (m(""), b(""));
376
+ }, { selectedAccountGuids: s } = Q(), { visibleHoldings: g } = H(), { visibleInvestmentAccounts: f } = le(), {
377
+ investments: { allocation: p }
378
+ } = M(), l = nt(
379
+ f.filter(({ guid: n }) => s.includes(n)),
380
+ p,
381
+ g
382
+ ), { isMobile: u } = U(), i = xe("(max-width:768px)");
382
383
  return /* @__PURE__ */ o(
383
384
  _,
384
385
  {
@@ -392,27 +393,27 @@ const me = ({ sx: t = {} }) => {
392
393
  },
393
394
  children: [
394
395
  /* @__PURE__ */ e(
395
- ot,
396
+ it,
396
397
  {
397
- data: s,
398
- hoveredId: x,
398
+ data: l,
399
+ hoveredId: v,
399
400
  isPercentage: t === 1,
400
401
  onMouseEnter: (n) => {
401
- c === n ? v("") : c || v(n);
402
+ c === n ? b("") : c || b(n);
402
403
  },
403
404
  onMouseLeave: () => {
404
- v("");
405
+ b("");
405
406
  },
406
407
  onSelected: d,
407
408
  selectedId: c,
408
- size: f ? 280 : 400,
409
- totalLabel: b.pie_chart_centered_text
409
+ size: u ? 280 : 400,
410
+ totalLabel: p.pie_chart_centered_text
410
411
  }
411
412
  ),
412
413
  /* @__PURE__ */ e(
413
- nt,
414
+ ot,
414
415
  {
415
- data: s,
416
+ data: l,
416
417
  onSelected: d,
417
418
  selectedId: c,
418
419
  selectedTabs: t,
@@ -422,16 +423,16 @@ const me = ({ sx: t = {} }) => {
422
423
  ]
423
424
  }
424
425
  );
425
- }, rt = P(it), at = ({
426
+ }, at = P(rt), st = ({
426
427
  analysisDetails: t,
427
428
  analysisType: h,
428
429
  copy: c,
429
- setAnalysisType: u
430
+ setAnalysisType: m
430
431
  }) => {
431
- const { isSmallMobile: x } = U(), v = A.useMemo(() => Object.keys(t).filter((l) => t[l] >= 1).map((l) => ({
432
- key: l,
433
- value: ie(t[l], "0,0"),
434
- formattedKey: Ve(l)
432
+ const { isSmallMobile: v } = U(), b = A.useMemo(() => Object.keys(t).filter((s) => t[s] >= 1).map((s) => ({
433
+ key: s,
434
+ value: ie(t[s], "0,0"),
435
+ formattedKey: Ve(s)
435
436
  })), [t]), d = [
436
437
  { label: c.equities, value: V.Stocks },
437
438
  { label: c.bonds, value: V.Bonds }
@@ -442,7 +443,7 @@ const me = ({ sx: t = {} }) => {
442
443
  {
443
444
  color: "primary",
444
445
  exclusive: !0,
445
- onChange: (l, m) => m && u(m),
446
+ onChange: (s, g) => g && m(g),
446
447
  sx: {
447
448
  width: "100%",
448
449
  "& .MuiToggleButton-root": {
@@ -451,11 +452,11 @@ const me = ({ sx: t = {} }) => {
451
452
  textTransform: "capitalize"
452
453
  }
453
454
  },
454
- value: v.length ? h : -1,
455
- children: d.map(({ label: l, value: m }) => /* @__PURE__ */ e(ye, { sx: { width: "100%" }, value: m, children: l }, m))
455
+ value: b.length ? h : -1,
456
+ children: d.map(({ label: s, value: g }) => /* @__PURE__ */ e(ye, { sx: { width: "100%" }, value: g, children: s }, g))
456
457
  }
457
458
  ),
458
- v.length ? /* @__PURE__ */ e(
459
+ b.length ? /* @__PURE__ */ e(
459
460
  te,
460
461
  {
461
462
  sx: {
@@ -463,13 +464,13 @@ const me = ({ sx: t = {} }) => {
463
464
  "& .MuiListItem-divider": { borderColor: "border.light" },
464
465
  "& .MuiListItem-root": { minHeight: 44, px: 12 }
465
466
  },
466
- children: v.map(({ value: l, formattedKey: m }) => /* @__PURE__ */ e(ne, { divider: !0, secondaryAction: /* @__PURE__ */ e(r, { children: l }), children: /* @__PURE__ */ e(
467
+ children: b.map(({ value: s, formattedKey: g }) => /* @__PURE__ */ e(ne, { divider: !0, secondaryAction: /* @__PURE__ */ e(r, { children: s }), children: /* @__PURE__ */ e(
467
468
  Re,
468
469
  {
469
- primary: m,
470
+ primary: g,
470
471
  primaryTypographyProps: { fontStyle: "normal" }
471
472
  }
472
- ) }, m))
473
+ ) }, g))
473
474
  }
474
475
  ) : /* @__PURE__ */ o(se, { children: [
475
476
  /* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: c.empty_data }),
@@ -478,16 +479,16 @@ const me = ({ sx: t = {} }) => {
478
479
  me,
479
480
  {
480
481
  sx: {
481
- ".inner-container": { width: x ? "100%" : 364 }
482
+ ".inner-container": { width: v ? "100%" : 364 }
482
483
  }
483
484
  }
484
485
  )
485
486
  ] })
486
487
  ] });
487
- }, st = ({ body: t, title: h }) => /* @__PURE__ */ o(_, { sx: { gap: 4, p: 12 }, children: [
488
+ }, lt = ({ body: t, title: h }) => /* @__PURE__ */ o(_, { sx: { gap: 4, p: 12 }, children: [
488
489
  /* @__PURE__ */ e(r, { bold: !0, variant: "Body", children: h }),
489
490
  /* @__PURE__ */ e(J, { variant: "ParagraphSmall", children: t })
490
- ] }), lt = ({
491
+ ] }), ct = ({
491
492
  placement: t = "bottom",
492
493
  tooltip_info_body: h,
493
494
  tooltip_info_title: c
@@ -496,16 +497,16 @@ const me = ({ sx: t = {} }) => {
496
497
  {
497
498
  enterTouchDelay: 500,
498
499
  placement: t,
499
- title: /* @__PURE__ */ e(st, { body: h, title: c }),
500
+ title: /* @__PURE__ */ e(lt, { body: h, title: c }),
500
501
  children: /* @__PURE__ */ e(de, { "aria-label": c, sx: { minHeight: 0, minWidth: 0, p: 0 }, children: /* @__PURE__ */ e(k, { name: "info", sx: { color: "info.main" } }) })
501
502
  }
502
- ), ct = () => {
503
+ ), dt = () => {
503
504
  const {
504
505
  investments: { analysis: t }
505
- } = G(), { analysisChartData: h, analysisDetails: c, analysisType: u, setAnalysisType: x } = H(), v = xe("(min-width:320px) and (max-width:375px)"), { isMobile: d } = U(), m = Oe().palette.mode === "dark", { cellDimension: y, columns: b, rows: s, textVariant: f } = A.useMemo(() => {
506
- const i = u === V.Stocks, n = Object.values(i ? t.stock_column_labels : t.bond_column_labels), g = Object.values(i ? t.stock_row_labels : t.bond_row_labels);
507
- return { cellDimension: d ? 72 : 100, columns: n, rows: g, textVariant: d ? "XSmall" : "Body" };
508
- }, [t, d, u]);
506
+ } = M(), { analysisChartData: h, analysisDetails: c, analysisType: m, setAnalysisType: v } = H(), b = xe("(min-width:320px) and (max-width:375px)"), { isMobile: d } = U(), g = Oe().palette.mode === "dark", { cellDimension: f, columns: p, rows: l, textVariant: u } = A.useMemo(() => {
507
+ const i = m === V.Stocks, n = Object.values(i ? t.stock_column_labels : t.bond_column_labels), x = Object.values(i ? t.stock_row_labels : t.bond_row_labels);
508
+ return { cellDimension: d ? 72 : 100, columns: n, rows: x, textVariant: d ? "XSmall" : "Body" };
509
+ }, [t, d, m]);
509
510
  return /* @__PURE__ */ o(
510
511
  _,
511
512
  {
@@ -539,7 +540,7 @@ const me = ({ sx: t = {} }) => {
539
540
  writingMode: "vertical-rl"
540
541
  },
541
542
  children: [
542
- /* @__PURE__ */ e(J, { bold: !0, color: "secondary.main", variant: f, children: u === V.Stocks ? t.market_capitalization : t.credit_quality }),
543
+ /* @__PURE__ */ e(J, { bold: !0, color: "secondary.main", variant: u, children: m === V.Stocks ? t.market_capitalization : t.credit_quality }),
543
544
  /* @__PURE__ */ e(
544
545
  _,
545
546
  {
@@ -548,7 +549,7 @@ const me = ({ sx: t = {} }) => {
548
549
  height: d ? 224 : 308,
549
550
  justifyContent: "space-around"
550
551
  },
551
- children: b.map((i) => /* @__PURE__ */ e(
552
+ children: p.map((i) => /* @__PURE__ */ e(
552
553
  r,
553
554
  {
554
555
  sx: {
@@ -556,7 +557,7 @@ const me = ({ sx: t = {} }) => {
556
557
  pl: 12,
557
558
  pr: d ? 4 : 0
558
559
  },
559
- variant: f,
560
+ variant: u,
560
561
  children: i
561
562
  },
562
563
  i
@@ -571,7 +572,7 @@ const me = ({ sx: t = {} }) => {
571
572
  _,
572
573
  {
573
574
  sx: {
574
- alignSelf: v ? "start" : "center",
575
+ alignSelf: b ? "start" : "center",
575
576
  flexDirection: "row",
576
577
  gap: 8,
577
578
  pb: 12
@@ -579,7 +580,7 @@ const me = ({ sx: t = {} }) => {
579
580
  children: [
580
581
  /* @__PURE__ */ e(r, { bold: !0, children: t.invest_analysis }),
581
582
  /* @__PURE__ */ e(
582
- lt,
583
+ ct,
583
584
  {
584
585
  tooltip_info_body: t.tooltip_info_body,
585
586
  tooltip_info_title: t.tooltip_info_title
@@ -588,10 +589,10 @@ const me = ({ sx: t = {} }) => {
588
589
  ]
589
590
  }
590
591
  ),
591
- h.map((i, n, g) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: i.map((C, S) => {
592
- const B = n === 0, I = n === g.length - 1, W = S === 0, N = S === i.length - 1, F = Number(C.replace("%", "")) >= 25;
592
+ h.map((i, n, x) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: i.map((w, S) => {
593
+ const B = n === 0, I = n === x.length - 1, W = S === 0, N = S === i.length - 1, F = Number(w.replace("%", "")) >= 25;
593
594
  let T = "grey.200", j = "grey.900";
594
- return m ? (T = F ? "grey.200" : "grey.700", j = F ? "grey.900" : "common.white") : (T = F ? "grey.700" : "grey.200", j = F ? "common.white" : "grey.900"), /* @__PURE__ */ e(
595
+ return g ? (T = F ? "grey.200" : "grey.700", j = F ? "grey.900" : "common.white") : (T = F ? "grey.700" : "grey.200", j = F ? "common.white" : "grey.900"), /* @__PURE__ */ e(
595
596
  _,
596
597
  {
597
598
  sx: {
@@ -603,9 +604,9 @@ const me = ({ sx: t = {} }) => {
603
604
  },
604
605
  alignItems: "center",
605
606
  bgcolor: T,
606
- height: y,
607
+ height: f,
607
608
  justifyContent: "center",
608
- width: y
609
+ width: f
609
610
  },
610
611
  children: /* @__PURE__ */ e(
611
612
  r,
@@ -615,21 +616,21 @@ const me = ({ sx: t = {} }) => {
615
616
  fontWeight: d ? 600 : 700
616
617
  },
617
618
  variant: d ? "Body" : "H3",
618
- children: C
619
+ children: w
619
620
  }
620
621
  )
621
622
  },
622
623
  S
623
624
  );
624
625
  }) }, n)),
625
- /* @__PURE__ */ e(_, { sx: { alignSelf: "center", flexDirection: "row", pt: 12 }, children: s.map((i) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", width: y }, children: /* @__PURE__ */ e(r, { color: "secondary.main", variant: f, children: i }) }, i)) }),
626
+ /* @__PURE__ */ e(_, { sx: { alignSelf: "center", flexDirection: "row", pt: 12 }, children: l.map((i) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", width: f }, children: /* @__PURE__ */ e(r, { color: "secondary.main", variant: u, children: i }) }, i)) }),
626
627
  /* @__PURE__ */ e(
627
628
  r,
628
629
  {
629
630
  bold: !0,
630
631
  sx: { color: "secondary.main", pt: d ? 4 : 24, textAlign: "center" },
631
- variant: f,
632
- children: u === V.Stocks ? t.valuation : t.duration
632
+ variant: u,
633
+ children: m === V.Stocks ? t.valuation : t.duration
633
634
  }
634
635
  )
635
636
  ] })
@@ -637,47 +638,47 @@ const me = ({ sx: t = {} }) => {
637
638
  }
638
639
  ),
639
640
  /* @__PURE__ */ e(
640
- at,
641
+ st,
641
642
  {
642
643
  analysisDetails: c,
643
- analysisType: u,
644
+ analysisType: m,
644
645
  copy: {
645
646
  empty_data: t.empty_data,
646
647
  equities: t.equities,
647
648
  bonds: t.bonds
648
649
  },
649
- setAnalysisType: x
650
+ setAnalysisType: v
650
651
  }
651
652
  )
652
653
  ]
653
654
  }
654
655
  );
655
- }, dt = P(ct), mt = ({
656
+ }, mt = P(dt), ut = ({
656
657
  accountHoldingsData: t,
657
658
  currentEditedCostBasis: h,
658
659
  editingHoldingId: c,
659
- handleCostBasisBlur: u,
660
- handleCostBasisClick: x,
661
- handleCostBasisChange: v,
660
+ handleCostBasisBlur: m,
661
+ handleCostBasisClick: v,
662
+ handleCostBasisChange: b,
662
663
  handleCostBasisKeyDown: d,
663
- isOpen: l,
664
- onClose: m
664
+ isOpen: s,
665
+ onClose: g
665
666
  }) => {
666
- const { investments: y } = G(), [b, s] = A.useState({}), f = (i) => (n, g) => {
667
- s((C) => ({
668
- ...C,
669
- [i]: g
667
+ const { investments: f } = M(), [p, l] = A.useState({}), u = (i) => (n, x) => {
668
+ l((w) => ({
669
+ ...w,
670
+ [i]: x
670
671
  }));
671
672
  };
672
673
  return /* @__PURE__ */ o(
673
674
  Xe,
674
675
  {
675
- ariaLabelClose: y.overview.close_investment_drawer,
676
- isOpen: l,
677
- onClose: m,
678
- title: y.overview.investment_details,
676
+ ariaLabelClose: f.overview.close_investment_drawer,
677
+ isOpen: s,
678
+ onClose: g,
679
+ title: f.overview.investment_details,
679
680
  children: [
680
- /* @__PURE__ */ o(p, { sx: { gap: 8, p: 24 }, children: [
681
+ /* @__PURE__ */ o(y, { sx: { gap: 8, p: 24 }, children: [
681
682
  /* @__PURE__ */ e(
682
683
  oe,
683
684
  {
@@ -688,8 +689,8 @@ const me = ({ sx: t = {} }) => {
688
689
  ),
689
690
  /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Small", children: t.accounts.memberName }),
690
691
  /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "H2", children: t.accounts.user_name || t.accounts.name }),
691
- /* @__PURE__ */ o(p, { sx: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" }, children: [
692
- /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: y.overview.current_balance }),
692
+ /* @__PURE__ */ o(y, { sx: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" }, children: [
693
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: f.overview.current_balance }),
693
694
  /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: t.accounts.balance?.toLocaleString("en-US", {
694
695
  currency: "USD",
695
696
  maximumFractionDigits: 2,
@@ -699,7 +700,7 @@ const me = ({ sx: t = {} }) => {
699
700
  ] })
700
701
  ] }),
701
702
  /* @__PURE__ */ o(
702
- p,
703
+ y,
703
704
  {
704
705
  sx: {
705
706
  bgcolor: "background.default",
@@ -709,19 +710,19 @@ const me = ({ sx: t = {} }) => {
709
710
  py: 10
710
711
  },
711
712
  children: [
712
- /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: y.overview.holding }),
713
- /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: y.overview.market_value })
713
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: f.overview.holding }),
714
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: f.overview.market_value })
714
715
  ]
715
716
  }
716
717
  ),
717
718
  t.holdings?.map((i, n) => {
718
- const g = c === i.id;
719
+ const x = c === i.id;
719
720
  return /* @__PURE__ */ o(
720
721
  be,
721
722
  {
722
723
  disableGutters: !0,
723
- expanded: b[i.id] === !0,
724
- onChange: i ? f(i?.id) : () => {
724
+ expanded: p[i.id] === !0,
725
+ onChange: i ? u(i?.id) : () => {
725
726
  },
726
727
  sx: {
727
728
  ":before": n === 0 ? { opacity: 0 } : {},
@@ -735,15 +736,15 @@ const me = ({ sx: t = {} }) => {
735
736
  id: "panel1a-header",
736
737
  sx: [
737
738
  { height: 64 },
738
- b[i.id] && n > 0 && {
739
+ p[i.id] && n > 0 && {
739
740
  borderTop: 1,
740
741
  borderColor: "border.main"
741
742
  }
742
743
  ],
743
- children: /* @__PURE__ */ o(p, { sx: { flexDirection: "row", width: "100%" }, children: [
744
+ children: /* @__PURE__ */ o(y, { sx: { flexDirection: "row", width: "100%" }, children: [
744
745
  /* @__PURE__ */ e("div", { style: { width: 24 } }),
745
746
  /* @__PURE__ */ o(
746
- p,
747
+ y,
747
748
  {
748
749
  sx: [
749
750
  {
@@ -754,28 +755,28 @@ const me = ({ sx: t = {} }) => {
754
755
  py: 14,
755
756
  width: "100%"
756
757
  },
757
- b[i.id] && {
758
+ p[i.id] && {
758
759
  borderBottom: 1,
759
760
  borderColor: "border.main"
760
761
  }
761
762
  ],
762
763
  children: [
763
764
  /* @__PURE__ */ e(
764
- p,
765
+ y,
765
766
  {
766
767
  sx: {
767
768
  alignItems: "center",
768
769
  flexDirection: "row",
769
770
  gap: 12
770
771
  },
771
- children: /* @__PURE__ */ o(p, { sx: { overflow: "hidden", width: 98 }, children: [
772
+ children: /* @__PURE__ */ o(y, { sx: { overflow: "hidden", width: 98 }, children: [
772
773
  /* @__PURE__ */ e(r, { sx: { fontWeight: 600 }, variant: "Body", children: i.holding }),
773
774
  /* @__PURE__ */ e(r, { variant: "XSmall", children: i.description })
774
775
  ] })
775
776
  }
776
777
  ),
777
778
  /* @__PURE__ */ o(
778
- p,
779
+ y,
779
780
  {
780
781
  sx: {
781
782
  alignItems: "center",
@@ -785,14 +786,14 @@ const me = ({ sx: t = {} }) => {
785
786
  justifyContent: "flex-end"
786
787
  },
787
788
  children: [
788
- /* @__PURE__ */ o(p, { children: [
789
+ /* @__PURE__ */ o(y, { children: [
789
790
  /* @__PURE__ */ e(r, { sx: { fontWeight: 600, textAlign: "right" }, variant: "Body", children: i.marketValue?.toLocaleString("en-US", {
790
791
  currency: "USD",
791
792
  maximumFractionDigits: 2,
792
793
  minimumFractionDigits: 2,
793
794
  style: "currency"
794
795
  }) }),
795
- /* @__PURE__ */ o(p, { sx: { alignItems: "center", gap: 2, flexDirection: "row" }, children: [
796
+ /* @__PURE__ */ o(y, { sx: { alignItems: "center", gap: 2, flexDirection: "row" }, children: [
796
797
  i.totalGainLoss !== 0 && /* @__PURE__ */ e(
797
798
  k,
798
799
  {
@@ -838,7 +839,7 @@ const me = ({ sx: t = {} }) => {
838
839
  /* @__PURE__ */ e(
839
840
  k,
840
841
  {
841
- name: b[i.id] ? "expand_less" : "expand_more",
842
+ name: p[i.id] ? "expand_less" : "expand_more",
842
843
  size: 20
843
844
  }
844
845
  )
@@ -852,7 +853,7 @@ const me = ({ sx: t = {} }) => {
852
853
  }
853
854
  ),
854
855
  /* @__PURE__ */ e(_e, { children: /* @__PURE__ */ o(
855
- p,
856
+ y,
856
857
  {
857
858
  sx: {
858
859
  alignItems: "center",
@@ -861,10 +862,10 @@ const me = ({ sx: t = {} }) => {
861
862
  pl: 24
862
863
  },
863
864
  children: [
864
- /* @__PURE__ */ e(p, { sx: { width: 32 } }),
865
- /* @__PURE__ */ o(p, { sx: { flex: 1 }, children: [
865
+ /* @__PURE__ */ e(y, { sx: { width: 32 } }),
866
+ /* @__PURE__ */ o(y, { sx: { flex: 1 }, children: [
866
867
  /* @__PURE__ */ o(
867
- p,
868
+ y,
868
869
  {
869
870
  sx: {
870
871
  alignItems: "center",
@@ -876,13 +877,13 @@ const me = ({ sx: t = {} }) => {
876
877
  pr: 24
877
878
  },
878
879
  children: [
879
- /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Body", children: y.overview.quantity }),
880
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Body", children: f.overview.quantity }),
880
881
  /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Small", children: i.qty })
881
882
  ]
882
883
  }
883
884
  ),
884
885
  /* @__PURE__ */ o(
885
- p,
886
+ y,
886
887
  {
887
888
  sx: {
888
889
  alignItems: "center",
@@ -892,9 +893,9 @@ const me = ({ sx: t = {} }) => {
892
893
  pr: 24
893
894
  },
894
895
  children: [
895
- /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Body", children: y.overview.cost_basis_header }),
896
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Body", children: f.overview.cost_basis_header }),
896
897
  /* @__PURE__ */ o(
897
- p,
898
+ y,
898
899
  {
899
900
  direction: "row",
900
901
  sx: {
@@ -902,13 +903,13 @@ const me = ({ sx: t = {} }) => {
902
903
  gap: 4
903
904
  },
904
905
  children: [
905
- g ? /* @__PURE__ */ e(
906
+ x ? /* @__PURE__ */ e(
906
907
  Ce,
907
908
  {
908
909
  autoFocus: !0,
909
- onBlur: () => u(i.id),
910
- onChange: v,
911
- onKeyDown: (C) => d(C, i.id),
910
+ onBlur: () => m(i.id),
911
+ onChange: b,
912
+ onKeyDown: (w) => d(w, i.id),
912
913
  size: "small",
913
914
  sx: {
914
915
  fontSize: 14,
@@ -934,7 +935,7 @@ const me = ({ sx: t = {} }) => {
934
935
  /* @__PURE__ */ e(
935
936
  de,
936
937
  {
937
- onClick: () => x(i.id, i.costBasis),
938
+ onClick: () => v(i.id, i.costBasis),
938
939
  sx: { minWidth: 16, minHeight: 16 },
939
940
  children: /* @__PURE__ */ e(k, { name: "stylus", size: 16, sx: { color: "grey.700" } })
940
941
  }
@@ -957,22 +958,22 @@ const me = ({ sx: t = {} }) => {
957
958
  ]
958
959
  }
959
960
  );
960
- }, ut = P(mt), q = (t) => /* @__PURE__ */ o(qe, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
961
+ }, ht = P(ut), q = (t) => /* @__PURE__ */ o(qe, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
961
962
  /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600, fontSize: 14 }, variant: "Small", children: t.colDef.headerName }),
962
963
  /* @__PURE__ */ e(k, { name: "expand_all", size: 12 })
963
- ] }), ht = ({
964
+ ] }), gt = ({
964
965
  data: t,
965
966
  editingHoldingId: h,
966
967
  currentEditedCostBasis: c,
967
- handleCostBasisClick: u,
968
- handleCostBasisChange: x,
969
- handleCostBasisKeyDown: v,
968
+ handleCostBasisClick: m,
969
+ handleCostBasisChange: v,
970
+ handleCostBasisKeyDown: b,
970
971
  handleCostBasisBlur: d
971
972
  }) => {
972
- const { investments: l } = G(), y = ce().palette.mode === "dark", b = "success.main", s = y ? "grey.300" : "grey.700", f = (n, g = "lesserThan") => g === "greaterThan" ? n >= 0 ? b : s : n <= 0 ? s : b, i = [
973
+ const { investments: s } = M(), f = ce().palette.mode === "dark", p = "success.main", l = f ? "grey.300" : "grey.700", u = (n, x = "lesserThan") => x === "greaterThan" ? n >= 0 ? p : l : n <= 0 ? l : p, i = [
973
974
  {
974
975
  field: "qty",
975
- headerName: l.overview.qty_header,
976
+ headerName: s.overview.qty_header,
976
977
  sortable: !1,
977
978
  width: 48,
978
979
  align: "center",
@@ -980,7 +981,7 @@ const me = ({ sx: t = {} }) => {
980
981
  },
981
982
  {
982
983
  field: "holding",
983
- headerName: l.overview.holding_header,
984
+ headerName: s.overview.holding_header,
984
985
  flex: 1,
985
986
  renderHeader: q,
986
987
  renderCell: (n) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", gap: 16, flexDirection: "row" }, children: /* @__PURE__ */ o(_, { children: [
@@ -990,19 +991,19 @@ const me = ({ sx: t = {} }) => {
990
991
  },
991
992
  {
992
993
  field: "costBasis",
993
- headerName: l.overview.cost_basis_header,
994
+ headerName: s.overview.cost_basis_header,
994
995
  width: 132,
995
996
  renderHeader: q,
996
997
  renderCell: (n) => {
997
- const g = h === n.row.id;
998
+ const x = h === n.row.id;
998
999
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
999
- g ? /* @__PURE__ */ e(
1000
+ x ? /* @__PURE__ */ e(
1000
1001
  Ce,
1001
1002
  {
1002
1003
  autoFocus: !0,
1003
1004
  onBlur: () => d(n.row.id),
1004
- onChange: x,
1005
- onKeyDown: (C) => v(C, n.row.id),
1005
+ onChange: v,
1006
+ onKeyDown: (w) => b(w, n.row.id),
1006
1007
  size: "small",
1007
1008
  sx: {
1008
1009
  fontSize: 14,
@@ -1028,7 +1029,7 @@ const me = ({ sx: t = {} }) => {
1028
1029
  /* @__PURE__ */ e(
1029
1030
  de,
1030
1031
  {
1031
- onClick: () => u(n.row.id, n.row.costBasis),
1032
+ onClick: () => m(n.row.id, n.row.costBasis),
1032
1033
  sx: { minWidth: 12, minHeight: 12 },
1033
1034
  children: /* @__PURE__ */ e(k, { name: "stylus", size: 12, sx: { color: "grey.700" } })
1034
1035
  }
@@ -1040,11 +1041,11 @@ const me = ({ sx: t = {} }) => {
1040
1041
  },
1041
1042
  {
1042
1043
  field: "totalGainLoss",
1043
- headerName: l.overview.total_gain_loss_header,
1044
+ headerName: s.overview.total_gain_loss_header,
1044
1045
  width: 196,
1045
1046
  renderHeader: q,
1046
1047
  renderCell: (n) => {
1047
- const g = n.row.costBasis, C = g ? n.row.totalGainLoss / g * 100 : 0;
1048
+ const x = n.row.costBasis, w = x ? n.row.totalGainLoss / x * 100 : 0;
1048
1049
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
1049
1050
  n.value !== 0 && /* @__PURE__ */ e(
1050
1051
  k,
@@ -1052,7 +1053,7 @@ const me = ({ sx: t = {} }) => {
1052
1053
  name: n.value > 0 ? "trending_up" : "trending_down",
1053
1054
  size: 16,
1054
1055
  sx: {
1055
- color: f(n.value),
1056
+ color: u(n.value),
1056
1057
  mr: 1,
1057
1058
  verticalAlign: "middle"
1058
1059
  }
@@ -1062,11 +1063,11 @@ const me = ({ sx: t = {} }) => {
1062
1063
  r,
1063
1064
  {
1064
1065
  sx: {
1065
- color: f(n.value),
1066
+ color: u(n.value),
1066
1067
  fontWeight: n.value > 0 ? 700 : 400
1067
1068
  },
1068
1069
  variant: "Small",
1069
- children: g ? `${C.toFixed(2)}%` : "0.00%"
1070
+ children: x ? `${w.toFixed(2)}%` : "0.00%"
1070
1071
  }
1071
1072
  ),
1072
1073
  /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
@@ -1074,7 +1075,7 @@ const me = ({ sx: t = {} }) => {
1074
1075
  r,
1075
1076
  {
1076
1077
  sx: {
1077
- color: f(n.value),
1078
+ color: u(n.value),
1078
1079
  fontWeight: n.value > 0 ? 700 : 400
1079
1080
  },
1080
1081
  variant: "Small",
@@ -1094,7 +1095,7 @@ const me = ({ sx: t = {} }) => {
1094
1095
  },
1095
1096
  {
1096
1097
  field: "marketValue",
1097
- headerName: l.overview.market_value_header,
1098
+ headerName: s.overview.market_value_header,
1098
1099
  width: 132,
1099
1100
  renderHeader: q,
1100
1101
  renderCell: (n) => /* @__PURE__ */ e(r, { sx: { fontWeight: 700 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
@@ -1128,48 +1129,48 @@ const me = ({ sx: t = {} }) => {
1128
1129
  )
1129
1130
  }
1130
1131
  );
1131
- }, gt = () => {
1132
- const { isMobile: t } = U(), [h, c] = O({}), [u, x] = O(!1), { selectedAccountGuids: v } = Q(), { visibleHoldings: d, updateHoldings: l } = H(), [m, y] = A.useState(!1), [b, s] = O({
1132
+ }, pt = () => {
1133
+ const { isMobile: t } = U(), [h, c] = O({}), [m, v] = O(!1), { selectedAccountGuids: b } = Q(), { visibleHoldings: d, updateHoldings: s } = H(), [g, f] = A.useState(!1), [p, l] = O({
1133
1134
  accounts: [],
1134
1135
  holdings: []
1135
- }), { accounts: f, investments: i } = G(), { isCopyLoaded: n } = Q(), [g, C] = O(null), [S, B] = O(""), W = ce().palette.mode === "dark", N = W ? "#0AC295" : "#09A57F", F = W ? "grey.300" : "grey.700", T = (a, w = "lesserThan") => w === "greaterThan" ? a >= 0 ? N : F : a <= 0 ? F : N, j = (a, w) => {
1136
- C(a), B(w.toFixed(2));
1136
+ }), { accounts: u, investments: i } = M(), { isCopyLoaded: n } = Q(), [x, w] = O(null), [S, B] = O(""), W = ce().palette.mode === "dark", N = W ? "#0AC295" : "#09A57F", F = W ? "grey.300" : "grey.700", T = (a, C = "lesserThan") => C === "greaterThan" ? a >= 0 ? N : F : a <= 0 ? F : N, j = (a, C) => {
1137
+ w(a), B(C.toFixed(2));
1137
1138
  }, Z = (a) => {
1138
- const w = a.target.value;
1139
- /^\d*\.?\d*$/.test(w) && B(w);
1140
- }, ue = (a, w) => {
1141
- a.key === "Enter" ? ee(w) : a.key === "Escape" && C(null);
1139
+ const C = a.target.value;
1140
+ /^\d*\.?\d*$/.test(C) && B(C);
1141
+ }, ue = (a, C) => {
1142
+ a.key === "Enter" ? ee(C) : a.key === "Escape" && w(null);
1142
1143
  }, ee = (a) => {
1143
- const w = d.find(({ guid: E }) => E === a);
1144
- if (!w) return;
1145
- const M = Number(S);
1146
- if (l({ ...w, cost_basis: M }), t) {
1147
- const E = b.holdings.map(
1148
- (D) => D.id === a ? { ...D, costBasis: M } : D
1144
+ const C = d.find(({ guid: E }) => E === a);
1145
+ if (!C) return;
1146
+ const G = Number(S);
1147
+ if (s({ ...C, cost_basis: G }), t) {
1148
+ const E = p.holdings.map(
1149
+ (D) => D.id === a ? { ...D, costBasis: G } : D
1149
1150
  );
1150
- s((D) => ({
1151
+ l((D) => ({
1151
1152
  ...D,
1152
1153
  holdings: E
1153
1154
  }));
1154
1155
  }
1155
- C(null);
1156
- }, De = (a) => (w, M) => {
1156
+ w(null);
1157
+ }, De = (a) => (C, G) => {
1157
1158
  c((E) => ({
1158
1159
  ...E,
1159
- [a]: M
1160
+ [a]: G
1160
1161
  }));
1161
1162
  }, { visibleHoldings: he } = H(), { visibleInvestmentAccounts: Le } = le(), X = Le.filter(
1162
- ({ guid: a }) => v.includes(a)
1163
- ), Ie = X.reduce((a, w) => a + (w.balance || 0), 0), Ae = X.map(({ guid: a }) => a), $ = he.filter(
1163
+ ({ guid: a }) => b.includes(a)
1164
+ ), Ie = X.reduce((a, C) => a + (C.balance || 0), 0), Ae = X.map(({ guid: a }) => a), $ = he.filter(
1164
1165
  ({ account_guid: a }) => Ae.includes(a)
1165
- ).reduce((a, w) => {
1166
- const M = w.market_value ? w.market_value - (w.cost_basis || 0) : 0;
1167
- return a + M;
1166
+ ).reduce((a, C) => {
1167
+ const G = C.market_value ? C.market_value - (C.cost_basis || 0) : 0;
1168
+ return a + G;
1168
1169
  }, 0), Be = () => {
1169
- x(!1);
1170
+ v(!1);
1170
1171
  };
1171
- return n ? /* @__PURE__ */ o(p, { sx: { alignItems: "center", gap: 48, pt: 48, width: "100%" }, children: [
1172
- !!X.length && /* @__PURE__ */ o(p, { sx: { alignItems: "center" }, children: [
1172
+ return n ? /* @__PURE__ */ o(y, { sx: { alignItems: "center", gap: 48, pt: 48, width: "100%" }, children: [
1173
+ !!X.length && /* @__PURE__ */ o(y, { sx: { alignItems: "center" }, children: [
1173
1174
  /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, children: i.overview.total_portfolio }),
1174
1175
  /* @__PURE__ */ e(J, { variant: "H1", children: Ie.toLocaleString("en-US", {
1175
1176
  currency: "USD",
@@ -1177,7 +1178,7 @@ const me = ({ sx: t = {} }) => {
1177
1178
  minimumFractionDigits: 2,
1178
1179
  style: "currency"
1179
1180
  }) }),
1180
- /* @__PURE__ */ o(p, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
1181
+ /* @__PURE__ */ o(y, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
1181
1182
  /* @__PURE__ */ e(
1182
1183
  k,
1183
1184
  {
@@ -1202,7 +1203,7 @@ const me = ({ sx: t = {} }) => {
1202
1203
  ] })
1203
1204
  ] }),
1204
1205
  X.map((a) => {
1205
- const w = he.filter((L) => L.account_guid === a.guid).map((L) => ({
1206
+ const C = he.filter((L) => L.account_guid === a.guid).map((L) => ({
1206
1207
  id: L.guid,
1207
1208
  qty: L.shares || 0,
1208
1209
  holding: L.symbol || L.description || "Unknown",
@@ -1210,7 +1211,7 @@ const me = ({ sx: t = {} }) => {
1210
1211
  totalGainLoss: L.market_value ? L.market_value - (L.cost_basis || 0) : 0,
1211
1212
  marketValue: L.market_value || 0,
1212
1213
  description: L.description || ""
1213
- })), M = w.length > 0, E = a.balance, D = w.reduce(
1214
+ })), G = C.length > 0, E = a.balance, D = C.reduce(
1214
1215
  (L, We) => We.totalGainLoss + L,
1215
1216
  0
1216
1217
  ), ge = E ? D / E * 100 : 0;
@@ -1218,9 +1219,9 @@ const me = ({ sx: t = {} }) => {
1218
1219
  return /* @__PURE__ */ e(
1219
1220
  re,
1220
1221
  {
1221
- onClick: w.length ? () => {
1222
- x(!0), s({
1223
- holdings: w,
1222
+ onClick: C.length ? () => {
1223
+ v(!0), l({
1224
+ holdings: C,
1224
1225
  accounts: a
1225
1226
  });
1226
1227
  } : void 0,
@@ -1229,7 +1230,7 @@ const me = ({ sx: t = {} }) => {
1229
1230
  overflow: "hidden"
1230
1231
  },
1231
1232
  children: /* @__PURE__ */ o(
1232
- p,
1233
+ y,
1233
1234
  {
1234
1235
  sx: {
1235
1236
  border: 1,
@@ -1242,7 +1243,7 @@ const me = ({ sx: t = {} }) => {
1242
1243
  },
1243
1244
  children: [
1244
1245
  /* @__PURE__ */ o(
1245
- p,
1246
+ y,
1246
1247
  {
1247
1248
  sx: {
1248
1249
  alignItems: "center",
@@ -1262,7 +1263,7 @@ const me = ({ sx: t = {} }) => {
1262
1263
  size: 32
1263
1264
  }
1264
1265
  ),
1265
- /* @__PURE__ */ o(p, { sx: { overflow: "hidden", pl: 13, pr: 13 }, children: [
1266
+ /* @__PURE__ */ o(y, { sx: { overflow: "hidden", pl: 13, pr: 13 }, children: [
1266
1267
  /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1267
1268
  /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1268
1269
  ] })
@@ -1270,7 +1271,7 @@ const me = ({ sx: t = {} }) => {
1270
1271
  }
1271
1272
  ),
1272
1273
  /* @__PURE__ */ o(
1273
- p,
1274
+ y,
1274
1275
  {
1275
1276
  sx: {
1276
1277
  alignItems: "center",
@@ -1281,7 +1282,7 @@ const me = ({ sx: t = {} }) => {
1281
1282
  },
1282
1283
  children: [
1283
1284
  /* @__PURE__ */ o(
1284
- p,
1285
+ y,
1285
1286
  {
1286
1287
  sx: {
1287
1288
  alignItems: "center",
@@ -1297,7 +1298,7 @@ const me = ({ sx: t = {} }) => {
1297
1298
  children: [
1298
1299
  /* @__PURE__ */ e(r, { sx: { color: "text.secondary", fontSize: 11 }, variant: "Small", children: i.overview.total_gain_Loss }),
1299
1300
  /* @__PURE__ */ o(
1300
- p,
1301
+ y,
1301
1302
  {
1302
1303
  sx: {
1303
1304
  alignItems: "center",
@@ -1352,7 +1353,7 @@ const me = ({ sx: t = {} }) => {
1352
1353
  }
1353
1354
  ),
1354
1355
  /* @__PURE__ */ o(
1355
- p,
1356
+ y,
1356
1357
  {
1357
1358
  sx: {
1358
1359
  alignItems: "center",
@@ -1383,12 +1384,12 @@ const me = ({ sx: t = {} }) => {
1383
1384
  },
1384
1385
  a.guid
1385
1386
  );
1386
- const Te = W ? "grey.700" : "grey.400", ke = w.length ? "text.primary" : Te;
1387
+ const Te = W ? "grey.700" : "grey.400", ke = C.length ? "text.primary" : Te;
1387
1388
  return /* @__PURE__ */ o(
1388
1389
  be,
1389
1390
  {
1390
1391
  expanded: h[a.guid] === !0,
1391
- onChange: M ? De(a.guid) : () => {
1392
+ onChange: G ? De(a.guid) : () => {
1392
1393
  },
1393
1394
  sx: {
1394
1395
  border: 1,
@@ -1411,7 +1412,7 @@ const me = ({ sx: t = {} }) => {
1411
1412
  ],
1412
1413
  children: [
1413
1414
  /* @__PURE__ */ o(
1414
- p,
1415
+ y,
1415
1416
  {
1416
1417
  sx: {
1417
1418
  alignItems: "center",
@@ -1430,18 +1431,18 @@ const me = ({ sx: t = {} }) => {
1430
1431
  size: 32
1431
1432
  }
1432
1433
  ),
1433
- /* @__PURE__ */ o(p, { sx: { alignItems: "flex-start" }, children: [
1434
+ /* @__PURE__ */ o(y, { sx: { alignItems: "flex-start" }, children: [
1434
1435
  /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1435
1436
  /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1436
1437
  ] })
1437
1438
  ]
1438
1439
  }
1439
1440
  ),
1440
- /* @__PURE__ */ o(p, { sx: { flexDirection: "row" }, children: [
1441
- /* @__PURE__ */ o(p, { sx: { alignItems: "flex-end", pb: 14, pl: 24, pr: 24, pt: 14 }, children: [
1441
+ /* @__PURE__ */ o(y, { sx: { flexDirection: "row" }, children: [
1442
+ /* @__PURE__ */ o(y, { sx: { alignItems: "flex-end", pb: 14, pl: 24, pr: 24, pt: 14 }, children: [
1442
1443
  /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_gain_Loss }),
1443
1444
  /* @__PURE__ */ o(
1444
- p,
1445
+ y,
1445
1446
  {
1446
1447
  sx: {
1447
1448
  alignItems: "center",
@@ -1493,7 +1494,7 @@ const me = ({ sx: t = {} }) => {
1493
1494
  }
1494
1495
  )
1495
1496
  ] }),
1496
- /* @__PURE__ */ e(p, { sx: { alignItems: "flex-end", gap: 12, pb: 14, pl: 16, pr: 16, pt: 14 }, children: /* @__PURE__ */ o(p, { sx: { alignItems: "flex-end" }, children: [
1497
+ /* @__PURE__ */ e(y, { sx: { alignItems: "flex-end", gap: 12, pb: 14, pl: 16, pr: 16, pt: 14 }, children: /* @__PURE__ */ o(y, { sx: { alignItems: "flex-end" }, children: [
1497
1498
  /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_value }),
1498
1499
  /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
1499
1500
  currency: "USD",
@@ -1507,11 +1508,11 @@ const me = ({ sx: t = {} }) => {
1507
1508
  }
1508
1509
  ),
1509
1510
  /* @__PURE__ */ e(_e, { sx: { bgcolor: "background.default", p: 12 }, children: /* @__PURE__ */ e(re, { sx: { border: 1, borderColor: "border.light" }, children: /* @__PURE__ */ e(
1510
- ht,
1511
+ gt,
1511
1512
  {
1512
1513
  currentEditedCostBasis: S,
1513
- data: w,
1514
- editingHoldingId: g,
1514
+ data: C,
1515
+ editingHoldingId: x,
1515
1516
  handleCostBasisBlur: ee,
1516
1517
  handleCostBasisChange: Z,
1517
1518
  handleCostBasisClick: j,
@@ -1525,65 +1526,69 @@ const me = ({ sx: t = {} }) => {
1525
1526
  }),
1526
1527
  /* @__PURE__ */ e(me, {}),
1527
1528
  /* @__PURE__ */ e(
1528
- ut,
1529
+ ht,
1529
1530
  {
1530
- accountHoldingsData: b,
1531
+ accountHoldingsData: p,
1531
1532
  currentEditedCostBasis: S,
1532
- editingHoldingId: g,
1533
+ editingHoldingId: x,
1533
1534
  handleCostBasisBlur: ee,
1534
1535
  handleCostBasisChange: Z,
1535
1536
  handleCostBasisClick: j,
1536
1537
  handleCostBasisKeyDown: ue,
1537
- isOpen: u,
1538
+ isOpen: m,
1538
1539
  onClose: Be
1539
1540
  }
1540
1541
  ),
1541
1542
  /* @__PURE__ */ e(
1542
1543
  pe,
1543
1544
  {
1544
- onClose: () => y(!1),
1545
- showConnectionsWidget: m,
1546
- title: f.manage_connections
1545
+ onClose: () => f(!1),
1546
+ showConnectionsWidget: g,
1547
+ title: u.manage_connections
1547
1548
  }
1548
1549
  )
1549
1550
  ] }) : /* @__PURE__ */ e(Se, {});
1550
- }, pt = P(gt), xt = ({ title: t }) => /* @__PURE__ */ e(r, { bold: !0, variant: "Body", children: t }), sn = P(({ onBackClick: t, sx: h }) => {
1551
- const { onEvent: c } = ve(), { isMobile: u } = U(), { visibleInvestmentAccounts: x } = le(), {
1552
- visibleHoldings: v,
1553
- setShowConnectionsWidget: d,
1554
- showConnectionsWidget: l
1555
- } = H(), { investments: m, accounts: y } = G(), { isCopyLoaded: b, isInitialized: s, setSelectedAccounts: f } = Q(), [i, n] = A.useState(0), { loadHoldings: g, holdingsLoaded: C } = H();
1551
+ }, xt = P(pt), yt = ({ title: t }) => /* @__PURE__ */ e(r, { bold: !0, variant: "Body", children: t }), cn = P(({ onBackClick: t, sx: h }) => {
1552
+ const { onEvent: c } = ve(), { isMobile: m } = U(), {
1553
+ isAccountDataLoaded: v,
1554
+ loadAccountData: b,
1555
+ visibleInvestmentAccounts: d
1556
+ } = le(), {
1557
+ visibleHoldings: s,
1558
+ setShowConnectionsWidget: g,
1559
+ showConnectionsWidget: f
1560
+ } = H(), { investments: p, accounts: l } = M(), { isInitialized: u } = Q(), [i, n] = A.useState(0), { loadHoldings: x, holdingsLoaded: w } = H();
1556
1561
  Ke({
1557
1562
  widgetName: "InvestmentsWidget",
1558
- isLoaded: C
1563
+ isLoaded: w
1559
1564
  }), A.useEffect(() => {
1560
- f(x);
1561
- }, [x]), A.useEffect(() => {
1562
- s && g().finally();
1563
- }, [s]);
1565
+ v || b().finally();
1566
+ }, []), A.useEffect(() => {
1567
+ u && x().finally();
1568
+ }, [u]);
1564
1569
  const S = () => {
1565
1570
  c(z.INVESTMENT_WIDGET_ACCOUNT_FILTER_CLICK);
1566
1571
  };
1567
- if (!b || !s) return /* @__PURE__ */ e(Se, {});
1572
+ if (!u || !w) return /* @__PURE__ */ e(Se, {});
1568
1573
  const B = [
1569
1574
  z.INVESTMENT_WIDGET_DETAILS_CLICK,
1570
1575
  z.INVESTMENT_WIDGET_ALLOCATION_CLICK,
1571
1576
  z.INVESTMENT_WIDGET_ANALYSIS_CLICK
1572
- ], I = x.length === 0 && v.length === 0, W = [
1573
- m.tab_overview_title,
1574
- m.tab_allocation_title,
1575
- m.tab_analysis_title
1577
+ ], I = d.length === 0 && s.length === 0, W = [
1578
+ p.tab_overview_title,
1579
+ p.tab_allocation_title,
1580
+ p.tab_analysis_title
1576
1581
  ];
1577
1582
  return /* @__PURE__ */ o(
1578
1583
  Ue,
1579
1584
  {
1580
- accountOptions: x,
1585
+ allowedAccountTypes: [Ye.INVESTMENT],
1581
1586
  onAccountsFilterClick: S,
1582
1587
  onBackClick: t,
1583
1588
  sx: h,
1584
- title: m.title,
1589
+ title: p.title,
1585
1590
  children: [
1586
- /* @__PURE__ */ o(_, { mx: u ? 0 : 48, my: 24, children: [
1591
+ /* @__PURE__ */ o(_, { mx: m ? 0 : 48, my: 24, children: [
1587
1592
  /* @__PURE__ */ e(
1588
1593
  Ee,
1589
1594
  {
@@ -1594,19 +1599,19 @@ const me = ({ sx: t = {} }) => {
1594
1599
  textColor: "primary",
1595
1600
  value: I ? -1 : i,
1596
1601
  variant: "fullWidth",
1597
- children: W.map((N) => /* @__PURE__ */ e(Fe, { disabled: I, label: /* @__PURE__ */ e(xt, { title: N }) }, N))
1602
+ children: W.map((N) => /* @__PURE__ */ e(Fe, { disabled: I, label: /* @__PURE__ */ e(yt, { title: N }) }, N))
1598
1603
  }
1599
1604
  ),
1600
1605
  I ? /* @__PURE__ */ e(
1601
- Ye,
1606
+ Qe,
1602
1607
  {
1603
- header: m.empty_state_header,
1608
+ header: p.empty_state_header,
1604
1609
  icon: "bid_landscape",
1605
1610
  onClick: () => {
1606
- d(!0), c(z.ACCOUNTS_CLICK_CONNECT);
1611
+ g(!0), c(z.ACCOUNTS_CLICK_CONNECT);
1607
1612
  },
1608
- primaryButton: m.overview.connect_accounts,
1609
- subText: m.empty_state_description,
1613
+ primaryButton: p.overview.connect_accounts,
1614
+ subText: p.empty_state_description,
1610
1615
  sx: {
1611
1616
  width: { sm: 432 },
1612
1617
  ".buttons-footer": {
@@ -1620,17 +1625,17 @@ const me = ({ sx: t = {} }) => {
1620
1625
  }
1621
1626
  }
1622
1627
  ) : /* @__PURE__ */ o(se, { children: [
1623
- i === 0 && /* @__PURE__ */ e(pt, {}),
1624
- i === 1 && /* @__PURE__ */ e(rt, {}),
1625
- i === 2 && /* @__PURE__ */ e(dt, {})
1628
+ i === 0 && /* @__PURE__ */ e(xt, {}),
1629
+ i === 1 && /* @__PURE__ */ e(at, {}),
1630
+ i === 2 && /* @__PURE__ */ e(mt, {})
1626
1631
  ] })
1627
1632
  ] }),
1628
1633
  /* @__PURE__ */ e(
1629
1634
  pe,
1630
1635
  {
1631
- onClose: () => d(!1),
1632
- showConnectionsWidget: l,
1633
- title: y.manage_connections
1636
+ onClose: () => g(!1),
1637
+ showConnectionsWidget: f,
1638
+ title: l.manage_connections
1634
1639
  }
1635
1640
  )
1636
1641
  ]
@@ -1638,5 +1643,5 @@ const me = ({ sx: t = {} }) => {
1638
1643
  );
1639
1644
  });
1640
1645
  export {
1641
- sn as InvestmentsWidget
1646
+ cn as InvestmentsWidget
1642
1647
  };