@mx-cartographer/experiences 8.0.0-alpha.sms2 → 9.0.0-alpha.mega1

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 (139) hide show
  1. package/CHANGELOG.md +217 -0
  2. package/dist/{Account-Cp30A3ad.mjs → Account-BIKn4XEZ.mjs} +1 -1
  3. package/dist/Account-CMjOp7S2.mjs +118 -0
  4. package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
  5. package/dist/AccountDetailsHeader-BOV91g1o.mjs +95 -0
  6. package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
  7. package/dist/{AccountFields-CW6cIthP.mjs → AccountFields-BRRH37K1.mjs} +10 -11
  8. package/dist/{AccountListItem-DxmAs98Z.mjs → AccountListItem-Ds5C0mOT.mjs} +4 -4
  9. package/dist/{AccountStore-hIs-yA6W.mjs → AccountStore-BFKvXJSD.mjs} +79 -69
  10. package/dist/{Accounts-DUHkUyK4.mjs → Accounts-CuE8aSZN.mjs} +1 -1
  11. package/dist/{BudgetUtil-CIDAPPPT.mjs → BudgetUtil-CDSOZXem.mjs} +4 -4
  12. package/dist/CategorySelectorDrawer-C4aZYP4N.mjs +418 -0
  13. package/dist/CategoryStore-DEqAnHbi.mjs +186 -0
  14. package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-CFHBvaV4.mjs} +1 -1
  15. package/dist/{ConnectionsDrawer-CSo6AFkG.mjs → ConnectionsDrawer-BExzgE16.mjs} +5 -5
  16. package/dist/{CurrencyInput-BrGvhgVK.mjs → CurrencyInput-DDQ4DBrE.mjs} +1 -1
  17. package/dist/{CurrencyText-Dr0EZ7bp.mjs → CurrencyText-C-85TnUF.mjs} +3 -3
  18. package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CVsMhbZU.mjs} +3 -3
  19. package/dist/{DebtsStore-hi1cqrRk.mjs → DebtsStore-Dv_T7Dts.mjs} +12 -12
  20. package/dist/{Dialog-CDV0kKxj.mjs → Dialog-CWymUiuO.mjs} +32 -35
  21. package/dist/Drawer-Bet2ZPJo.mjs +176 -0
  22. package/dist/{ExportCsvAction-CQ1grpwo.mjs → ExportCsvAction-oG_Mn66T.mjs} +3 -3
  23. package/dist/{FinstrongStore-dKZOZ2hM.mjs → FinstrongStore-BjFkMTIL.mjs} +6 -6
  24. package/dist/GlobalAccountFilter-BpWlPAl5.mjs +316 -0
  25. package/dist/{GoalStore-CFeAJloA.mjs → GoalStore-Dbjgft2i.mjs} +155 -137
  26. package/dist/{Help-i4OasOO-.mjs → Help-BW_ar-4B.mjs} +2 -2
  27. package/dist/LineChart-DHj-Bufi.mjs +580 -0
  28. package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-Cbr3417C.mjs} +10 -10
  29. package/dist/{ManageIncome-D_qVX5dN.mjs → ManageIncome-DIIyqDTp.mjs} +85 -85
  30. package/dist/{MicroWidgetContainer-BGpNl5ZS.mjs → MicroWidgetContainer-DSyYwRCU.mjs} +2 -2
  31. package/dist/{MiniWidgetContainer-D7MkHG15.mjs → MiniWidgetContainer-DKn7ndO6.mjs} +1 -1
  32. package/dist/NetWorthStore-B6ziBtaH.mjs +168 -0
  33. package/dist/NotificationSettings-e789PcRb.mjs +676 -0
  34. package/dist/{OriginalBalanceAction-62e0mU_3.mjs → OriginalBalanceAction-DFoG79Ba.mjs} +3 -3
  35. package/dist/{RecurringSettings-RfZ8Wuhh.mjs → RecurringSettings-BpCUcE8w.mjs} +4 -4
  36. package/dist/{RecurringTransactionsStore-D3EOKZ2B.mjs → RecurringTransactionsStore-D_--5PWH.mjs} +1 -1
  37. package/dist/{RecurringTransactions-Bhx56aA3.mjs → RepeatingTransaction-C2txVA9O.mjs} +3 -3
  38. package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-CInvh-rQ.mjs} +1 -1
  39. package/dist/SpendingData-B7NuTQ9s.mjs +53 -0
  40. package/dist/SpendingLegend-BxefXiQd.mjs +193 -0
  41. package/dist/TransactionDetails-CPwv9xtZ.mjs +1374 -0
  42. package/dist/{TransactionStore-DgLrYW4C.mjs → TransactionStore-D2aMUClq.mjs} +128 -111
  43. package/dist/TrendsStore-BdsYfCc7.mjs +183 -0
  44. package/dist/{User-DqNX2GAK.mjs → User-CulNdZUr.mjs} +21 -20
  45. package/dist/ViewMoreMicroCard-CDWR16_h.mjs +1147 -0
  46. package/dist/WidgetContainer-mzejMmz2.mjs +555 -0
  47. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -0
  48. package/dist/accounts/index.es.js +933 -232
  49. package/dist/accounts/stores/AccountStore.d.ts +6 -2
  50. package/dist/accounts/utils/AccountDetails.d.ts +5 -0
  51. package/dist/analytics/index.es.js +2 -2
  52. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  53. package/dist/budgets/index.es.js +561 -522
  54. package/dist/cashflow/index.es.js +397 -396
  55. package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -0
  56. package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -0
  57. package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -0
  58. package/dist/categories/components/SubcategoryRow.d.ts +1 -0
  59. package/dist/categories/index.es.js +2 -2
  60. package/dist/categories/stores/CategoryStore.d.ts +5 -3
  61. package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
  62. package/dist/common/components/WidgetContainer.d.ts +7 -6
  63. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  64. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  65. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
  66. package/dist/common/components/index.d.ts +2 -2
  67. package/dist/common/hooks/index.d.ts +1 -0
  68. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  69. package/dist/common/index.es.js +325 -306
  70. package/dist/common/stores/GlobalUiStore.d.ts +7 -4
  71. package/dist/common/types/localization/AccountsCopy.d.ts +6 -0
  72. package/dist/common/types/localization/CategoryCopy.d.ts +3 -0
  73. package/dist/common/types/localization/CommonCopy.d.ts +3 -0
  74. package/dist/common/types/localization/GoalsCopy.d.ts +3 -1
  75. package/dist/common/types/localization/MicroInsightsCopy.d.ts +1 -0
  76. package/dist/common/types/localization/TransactionsCopy.d.ts +4 -0
  77. package/dist/common/types/localization/TrendsCopy.d.ts +4 -0
  78. package/dist/dashboard/index.es.js +95 -125
  79. package/dist/debts/index.es.js +466 -460
  80. package/dist/{exportTransactionsToCSV-BFpuIAXW.mjs → exportTransactionsToCSV-BU1jTY0Q.mjs} +4 -4
  81. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
  82. package/dist/finstrong/index.es.js +1660 -1553
  83. package/dist/goals/index.es.js +716 -677
  84. package/dist/goals/stores/GoalStore.d.ts +2 -0
  85. package/dist/help/index.es.js +14 -10
  86. package/dist/{hooks-C41HAxM5.mjs → hooks-fY_n74f7.mjs} +16 -16
  87. package/dist/investments/index.es.js +464 -457
  88. package/dist/merchants/index.es.js +1 -1
  89. package/dist/microinsights/MicroCardTemplate.d.ts +23 -0
  90. package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +8 -0
  91. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +1 -2
  92. package/dist/microinsights/beaticons/index.d.ts +1 -0
  93. package/dist/microinsights/cards/InsightCard.d.ts +0 -2
  94. package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +2 -5
  95. package/dist/microinsights/index.d.ts +2 -2
  96. package/dist/microinsights/index.es.js +824 -14
  97. package/dist/networth/components/NetWorthChart.d.ts +3 -2
  98. package/dist/networth/components/NetWorthList.d.ts +3 -3
  99. package/dist/networth/index.es.js +433 -438
  100. package/dist/networth/stores/NetWorthStore.d.ts +20 -9
  101. package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
  102. package/dist/notifications/index.es.js +5 -5
  103. package/dist/recurringtransactions/index.es.js +331 -325
  104. package/dist/settings/index.es.js +293 -285
  105. package/dist/spending/components/SpendingChart.d.ts +1 -1
  106. package/dist/spending/components/SpendingList.d.ts +1 -1
  107. package/dist/spending/components/SpendingTabLabel.d.ts +1 -0
  108. package/dist/spending/index.es.js +250 -235
  109. package/dist/transactions/index.es.js +288 -281
  110. package/dist/transactions/stores/TransactionStore.d.ts +5 -0
  111. package/dist/trends/components/TrendsTable.d.ts +0 -2
  112. package/dist/trends/index.es.js +876 -802
  113. package/dist/trends/utils/TrendsData.d.ts +1 -0
  114. package/dist/trends/utils/TrendsTable.d.ts +12 -0
  115. package/dist/{useAccountDisplayName-usSZCQ7I.mjs → useAccountDisplayName-DbkgGLdg.mjs} +2 -2
  116. package/dist/useAriaLive-B3_pRUio.mjs +35 -0
  117. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-dhmXeSyF.mjs} +1 -1
  118. package/dist/useWidgetLoadTimer-CrUzxN-P.mjs +19 -0
  119. package/package.json +26 -21
  120. package/dist/AccountDetailsContent-C1HumFnW.mjs +0 -683
  121. package/dist/AccountDetailsHeader-NMx79DGs.mjs +0 -87
  122. package/dist/CategorySelectorDrawer-DqDAA_5I.mjs +0 -399
  123. package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
  124. package/dist/ConnectDrawer-Dn1MlqLz.mjs +0 -545
  125. package/dist/Drawer-Dqe5EqvA.mjs +0 -163
  126. package/dist/LineChart-bc1D9xBE.mjs +0 -581
  127. package/dist/NetWorthStore-8FFC1Bs0.mjs +0 -150
  128. package/dist/NotificationSettings-BsWiYD94.mjs +0 -672
  129. package/dist/SpendingData-DPQ96k3x.mjs +0 -55
  130. package/dist/SpendingLegend-CZzDb-7d.mjs +0 -193
  131. package/dist/TransactionDetails-Duv1X9ec.mjs +0 -1379
  132. package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
  133. package/dist/ViewMoreMicroCard-CH9E-jOx.mjs +0 -1930
  134. package/dist/WidgetContainer-B1Jzb4XA.mjs +0 -565
  135. package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
  136. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
  137. package/dist/common/components/accountfilter/index.d.ts +0 -1
  138. package/dist/microinsights/cards/BaseCard.d.ts +0 -13
  139. package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
@@ -1,46 +1,48 @@
1
- import { jsxs as o, jsx as e, Fragment as ae } from "react/jsx-runtime";
1
+ import { jsxs as o, jsx as e, Fragment as se } from "react/jsx-runtime";
2
2
  import A, { useState as O } from "react";
3
3
  import { observer as P } from "mobx-react-lite";
4
4
  import _ from "@mui/material/Stack";
5
- import Ee from "@mui/material/Tab";
6
- import Ge from "@mui/material/Tabs";
7
- import { C as ge } from "../ConnectionsDrawer-CSo6AFkG.mjs";
8
- import pe from "@mui/material/useMediaQuery";
9
- import Me from "@mui/material/Box";
10
- import Ne from "@mui/material/Collapse";
5
+ import Fe from "@mui/material/Tab";
6
+ import Ee from "@mui/material/Tabs";
7
+ import { C as pe } from "../ConnectionsDrawer-BExzgE16.mjs";
8
+ import xe from "@mui/material/useMediaQuery";
9
+ import Ne from "@mui/material/Box";
10
+ import Me from "@mui/material/Collapse";
11
11
  import K from "@mui/material/Divider";
12
- import ee from "@mui/material/List";
13
- import te from "@mui/material/ListItem";
14
- import He from "@mui/material/ListItemButton";
15
- import xe from "@mui/material/ToggleButton";
16
- import ye from "@mui/material/ToggleButtonGroup";
17
- import { Text as i, H1 as fe, P as ve, InstitutionLogo as ne } from "@mxenabled/mxui";
18
- import Ue from "@mui/material/Button";
19
- import { u as M, g as be, t as H, b as Q, d as se, n as je } from "../hooks-C41HAxM5.mjs";
20
- import { A as z, W as ze } from "../WidgetContainer-B1Jzb4XA.mjs";
21
- import { a as Oe, f as oe } from "../NumberFormatting-DjTD0t3W.mjs";
12
+ import te from "@mui/material/List";
13
+ import ne from "@mui/material/ListItem";
14
+ import Ge from "@mui/material/ListItemButton";
15
+ import ye from "@mui/material/ToggleButton";
16
+ import fe from "@mui/material/ToggleButtonGroup";
17
+ import { Text as r, P as J, InstitutionLogo as oe } from "@mxenabled/mxui";
18
+ import He from "@mui/material/Button";
19
+ import { u as M, g as ve, s as H, b as Q, d as le } from "../hooks-fY_n74f7.mjs";
20
+ import { A as z, W as Ue } from "../WidgetContainer-mzejMmz2.mjs";
21
+ import { f as ie, a as je } from "../NumberFormatting-DjTD0t3W.mjs";
22
22
  import { u as U } from "../useScreenSize-B6JyS_Lj.mjs";
23
- import le from "@mui/material/styles/useTheme";
23
+ import ce from "@mui/material/styles/useTheme";
24
24
  import { Icon as k } from "@mxenabled/mx-icons";
25
- import { D as Ve } from "../Donut-Dmy3JTWd.mjs";
26
- import { useTheme as Re } from "@mui/material/styles";
27
- import { f as Pe, A as V } from "../InvestmentUtil-jOyOgzIB.mjs";
28
- import Xe from "@mui/material/ListItemText";
29
- import ce from "@mui/material/IconButton";
30
- import $e from "@mui/material/Tooltip";
31
- import _e from "@mui/material/Accordion";
32
- import we from "@mui/material/AccordionDetails";
33
- import Ce from "@mui/material/AccordionSummary";
34
- import ie from "@mui/material/Paper";
35
- import x from "@mui/system/Stack";
36
- import Se from "@mui/material/TextField";
37
- import { D as qe } from "../Drawer-Dqe5EqvA.mjs";
38
- import { DataGridPro as Ke } from "@mui/x-data-grid-pro";
39
- import { Stack as Ye } from "@mui/material";
40
- import { L as De } from "../Loader-BSWSYqvn.mjs";
25
+ import { D as ze } from "../Donut-Dmy3JTWd.mjs";
26
+ import { useTheme as Oe } from "@mui/material/styles";
27
+ import { f as Ve, A as V } from "../InvestmentUtil-jOyOgzIB.mjs";
28
+ import Re from "@mui/material/ListItemText";
29
+ import de from "@mui/material/IconButton";
30
+ import Pe from "@mui/material/Tooltip";
31
+ import be from "@mui/material/Accordion";
32
+ import _e from "@mui/material/AccordionDetails";
33
+ import we from "@mui/material/AccordionSummary";
34
+ import re from "@mui/material/Paper";
35
+ import y from "@mui/system/Stack";
36
+ import Ce from "@mui/material/TextField";
37
+ import { D as Xe } from "../Drawer-Bet2ZPJo.mjs";
38
+ import { DataGridPro as $e } from "@mui/x-data-grid-pro";
39
+ import { Stack as qe } from "@mui/material";
40
+ import { L as Se } from "../Loader-BSWSYqvn.mjs";
41
+ import { u as Ke } from "../useWidgetLoadTimer-CrUzxN-P.mjs";
42
+ import { A as Ye } from "../Account-CMjOp7S2.mjs";
41
43
  import { E as Qe } from "../EmptyState-DoxNUae-.mjs";
42
- const de = ({ sx: t = {} }) => {
43
- const { investments: g } = M(), { onEvent: c } = be(), { setShowConnectionsWidget: u } = H();
44
+ const me = ({ sx: t = {} }) => {
45
+ const { investments: h } = M(), { onEvent: c } = ve(), { setShowConnectionsWidget: m } = H();
44
46
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", gap: 24, height: 164, p: 24, width: "100%", ...t }, children: [
45
47
  /* @__PURE__ */ o(
46
48
  _,
@@ -53,9 +55,9 @@ const de = ({ sx: t = {} }) => {
53
55
  textAlign: "center"
54
56
  },
55
57
  children: [
56
- /* @__PURE__ */ e(i, { sx: { fontWeight: 600, whiteSpace: "normal" }, variant: "Body", children: g.overview.investment_accounts_footer }),
58
+ /* @__PURE__ */ e(r, { sx: { fontWeight: 600, whiteSpace: "normal" }, variant: "Body", children: h.overview.investment_accounts_footer }),
57
59
  /* @__PURE__ */ e(
58
- i,
60
+ r,
59
61
  {
60
62
  sx: {
61
63
  color: "text.secondary",
@@ -63,21 +65,21 @@ const de = ({ sx: t = {} }) => {
63
65
  fontWeight: 400
64
66
  },
65
67
  variant: "ParagraphSmall",
66
- children: g.overview.connect_more_accounts_description
68
+ children: h.overview.connect_more_accounts_description
67
69
  }
68
70
  )
69
71
  ]
70
72
  }
71
73
  ),
72
74
  /* @__PURE__ */ e(
73
- Ue,
75
+ He,
74
76
  {
75
77
  onClick: () => {
76
- u(!0), c(z.ACCOUNTS_CLICK_CONNECT);
78
+ m(!0), c(z.ACCOUNTS_CLICK_CONNECT);
77
79
  },
78
80
  sx: { fontWeight: 600 },
79
81
  variant: "outlined",
80
- children: g.overview.connect_accounts
82
+ children: h.overview.connect_accounts
81
83
  }
82
84
  )
83
85
  ] });
@@ -119,18 +121,18 @@ const de = ({ sx: t = {} }) => {
119
121
  {
120
122
  name: "allocations_unknown"
121
123
  }
122
- ], et = (t, g, c) => {
123
- const u = g, v = c;
124
- return t >= Math.min(u, v) && t < Math.max(u, v);
125
- }, tt = (t, g, c) => {
126
- const u = [
127
- ...new Set(t.map((m) => m.name.toLowerCase()))
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 = [
129
+ ...new Set(t.map((d) => d.name.toLowerCase()))
128
130
  ];
129
131
  let v;
130
- return u.map((m) => {
131
- const s = t.reduce((y, d) => {
132
- const b = d.name;
133
- return b.toLowerCase() === m ? (v = b, Y(d) * d[g] / 100 + y) : y;
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;
134
136
  }, 0);
135
137
  return {
136
138
  displayName: v,
@@ -139,104 +141,104 @@ const de = ({ sx: t = {} }) => {
139
141
  percentage: s / c
140
142
  };
141
143
  });
142
- }, Y = (t) => t.calculated_market_value ? t.calculated_market_value : t.market_value, nt = (t, g, c) => {
143
- const u = Object.values(g.allocations_list), v = [];
144
- let f = 0;
145
- const m = t.map(({ guid: n }) => n), s = c.filter(({ account_guid: n }) => m.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) => ({
146
148
  ...n,
147
149
  name: n.symbol || n.description,
148
150
  gainLoss: n.cost_basis || n.cost_basis === 0 ? Y(n) - n.cost_basis : 0
149
- })), { cashBalance: y, totalAccountBalance: d } = t.reduce(
150
- (n, p) => ({
151
- cashBalance: n.cashBalance + (p.cash_balance || 0),
152
- totalAccountBalance: n.totalAccountBalance + (p.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)
153
155
  }),
154
156
  { cashBalance: 0, totalAccountBalance: 0 }
155
- ), { marketValue: b, totalGainLoss: l } = s.reduce(
156
- (n, p) => ({
157
- marketValue: n.marketValue + Y(p),
158
- totalGainLoss: n.totalGainLoss + p.gainLoss
157
+ ), { marketValue: p, totalGainLoss: l } = s.reduce(
158
+ (n, x) => ({
159
+ marketValue: n.marketValue + Y(x),
160
+ totalGainLoss: n.totalGainLoss + x.gainLoss
159
161
  }),
160
162
  { marketValue: 0, totalGainLoss: 0 }
161
- ), h = b + y;
162
- Ze.forEach((n, p) => {
163
- const C = s.filter(
163
+ ), u = p + g;
164
+ Ze.forEach((n, x) => {
165
+ const w = s.filter(
164
166
  (I) => !!I[n.name]
165
167
  );
166
- let S = C.reduce(
168
+ let S = w.reduce(
167
169
  (I, W) => I + Y(W) * W[n.name] / 100,
168
170
  0
169
171
  );
170
172
  const B = tt(
171
- C,
173
+ w,
172
174
  n.name,
173
175
  S
174
176
  );
175
- if (n.name === "allocations_cash" && y > 0) {
176
- S += y;
177
+ if (n.name === "allocations_cash" && g > 0) {
178
+ S += g;
177
179
  const I = {
178
- displayName: g.cash_balance_display_name,
180
+ displayName: h.cash_balance_display_name,
179
181
  name: "allocations_name",
180
- value: y,
181
- percentage: y / h
182
+ value: g,
183
+ percentage: g / u
182
184
  };
183
185
  B.push(I);
184
186
  }
185
187
  S > 0 && (v.push({
186
188
  name: n.name,
187
- displayName: u[p],
188
- guid: `${n.name}-${p}`,
189
+ displayName: m[x],
190
+ guid: `${n.name}-${x}`,
189
191
  holdings: B,
190
- percentage: S / h,
192
+ percentage: S / u,
191
193
  value: S,
192
194
  color: Je[n.name]
193
- }), f += S);
195
+ }), b += S);
194
196
  });
195
- const r = v.map(
196
- ({ displayName: n, guid: p, color: C, value: S }) => ({
197
- id: p,
198
- color: C,
197
+ const i = v.map(
198
+ ({ displayName: n, guid: x, color: w, value: S }) => ({
199
+ id: x,
200
+ color: w,
199
201
  label: n,
200
- value: S / f * 100
202
+ value: S / b * 100
201
203
  })
202
204
  );
203
205
  return {
204
206
  investmentsData: v,
205
- donutData: r,
206
- totalAmount: f,
207
+ donutData: i,
208
+ totalAmount: b,
207
209
  totalGainLoss: l,
208
- totalMarketValue: h,
209
- totalGainLossPercentage: l / d
210
+ totalMarketValue: u,
211
+ totalGainLossPercentage: l / f
210
212
  };
211
- }, re = (t) => t < 1e-3 ? "< 0.1%" : Oe(t), R = (t) => t === 0 ? oe(t, "0,0.00") : et(t, -0.01, 0.01) ? "< $0.01" : oe(t, "0,0.00"), ot = ({
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 = ({
212
214
  data: t,
213
- onSelected: g,
215
+ onSelected: h,
214
216
  selectedId: c,
215
- selectedTabs: u,
217
+ selectedTabs: m,
216
218
  setSelectedTabs: v
217
219
  }) => {
218
- const f = (l, h) => {
219
- h !== null && v(h);
220
- }, { isMobile: m } = U(), {
220
+ const b = (l, u) => {
221
+ u !== null && v(u);
222
+ }, { isMobile: d } = U(), {
221
223
  investments: { allocation: s }
222
- } = M(), y = [
224
+ } = M(), g = [
223
225
  { label: s.tabs_label_dollar, value: 0 },
224
226
  { label: s.tabs_label_percent, value: 1 }
225
- ], d = !t?.investmentsData.length, { isSmallMobile: b } = U();
226
- return /* @__PURE__ */ o(_, { sx: { mt: 15, gap: 12, width: m ? 250 : 412 }, children: [
227
+ ], f = !t?.investmentsData.length, { isSmallMobile: p } = U();
228
+ return /* @__PURE__ */ o(_, { sx: { mt: 15, gap: 12, width: d ? 250 : 412 }, children: [
227
229
  /* @__PURE__ */ e(
228
- ye,
230
+ fe,
229
231
  {
230
232
  exclusive: !0,
231
233
  fullWidth: !0,
232
- onChange: f,
233
- value: d ? -1 : u,
234
- children: y.map(({ label: l, value: h }) => /* @__PURE__ */ e(xe, { color: "primary", value: h, children: /* @__PURE__ */ e(i, { bold: !0, textTransform: "capitalize", variant: "Body", children: l }) }, l))
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))
235
237
  }
236
238
  ),
237
- /* @__PURE__ */ e(ee, { sx: { px: 12 }, children: t.investmentsData.map((l) => /* @__PURE__ */ o(A.Fragment, { children: [
239
+ /* @__PURE__ */ e(te, { sx: { px: 12 }, children: t.investmentsData.map((l) => /* @__PURE__ */ o(A.Fragment, { children: [
238
240
  /* @__PURE__ */ e(
239
- te,
241
+ ne,
240
242
  {
241
243
  disableGutters: !0,
242
244
  disablePadding: !0,
@@ -244,14 +246,14 @@ const de = ({ sx: t = {} }) => {
244
246
  minHeight: 44
245
247
  },
246
248
  children: /* @__PURE__ */ o(
247
- He,
249
+ Ge,
248
250
  {
249
251
  "aria-expanded": c === l.guid,
250
- onClick: () => g(l.guid),
252
+ onClick: () => h(l.guid),
251
253
  sx: { minHeight: 44, px: 12, py: 0 },
252
254
  children: [
253
255
  /* @__PURE__ */ e(
254
- Me,
256
+ Ne,
255
257
  {
256
258
  borderRadius: 4,
257
259
  flexShrink: 0,
@@ -268,8 +270,8 @@ const de = ({ sx: t = {} }) => {
268
270
  justifyContent: "space-between",
269
271
  width: "100%",
270
272
  children: [
271
- /* @__PURE__ */ e(i, { bold: c === l.guid, children: l.displayName }),
272
- /* @__PURE__ */ e(i, { bold: c === l.guid, variant: "Body", children: u === 0 ? R(l.value) : re(l.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) })
273
275
  ]
274
276
  }
275
277
  )
@@ -279,9 +281,9 @@ const de = ({ sx: t = {} }) => {
279
281
  }
280
282
  ),
281
283
  /* @__PURE__ */ e(K, {}),
282
- l.holdings && l.holdings.length > 0 && /* @__PURE__ */ e(Ne, { in: c === l.guid, unmountOnExit: !0, children: /* @__PURE__ */ o(ee, { children: [
283
- l?.holdings?.map((h) => /* @__PURE__ */ e(
284
- te,
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(
286
+ ne,
285
287
  {
286
288
  sx: {
287
289
  pl: 24,
@@ -289,61 +291,61 @@ const de = ({ sx: t = {} }) => {
289
291
  py: 0
290
292
  },
291
293
  children: /* @__PURE__ */ o(_, { direction: "row", justifyContent: "space-between", width: "100%", children: [
292
- /* @__PURE__ */ o(i, { children: [
293
- h.displayName,
294
+ /* @__PURE__ */ o(r, { children: [
295
+ u.displayName,
294
296
  " "
295
297
  ] }),
296
- /* @__PURE__ */ e(i, { children: u === 0 ? R(h.value) : re(h.percentage) })
298
+ /* @__PURE__ */ e(r, { children: m === 0 ? R(u.value) : ae(u.percentage) })
297
299
  ] })
298
300
  },
299
- h.displayName
301
+ u.displayName
300
302
  )),
301
303
  /* @__PURE__ */ e(K, {})
302
304
  ] }) })
303
305
  ] }, l.guid)) }),
304
- d ? /* @__PURE__ */ o(ae, { children: [
305
- /* @__PURE__ */ e(i, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: s.empty_data }),
306
+ f ? /* @__PURE__ */ o(se, { children: [
307
+ /* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: s.empty_data }),
306
308
  /* @__PURE__ */ e(K, { sx: { borderColor: "border.light" } }),
307
309
  /* @__PURE__ */ e(
308
- de,
310
+ me,
309
311
  {
310
312
  sx: {
311
- ".inner-container": { width: b ? "100%" : 364 }
313
+ ".inner-container": { width: p ? "100%" : 364 }
312
314
  }
313
315
  }
314
316
  )
315
- ] }) : u === 0 && /* @__PURE__ */ e(i, { bold: !0, sx: { textAlign: "right", pr: 24 }, children: `${s.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)}` })
316
318
  ] });
317
319
  }, it = ({
318
320
  data: t,
319
- hoveredId: g,
321
+ hoveredId: h,
320
322
  isPercentage: c,
321
- onMouseEnter: u,
323
+ onMouseEnter: m,
322
324
  onMouseLeave: v,
323
- onSelected: f,
324
- selectedId: m,
325
+ onSelected: b,
326
+ selectedId: d,
325
327
  size: s = 150,
326
- totalLabel: y
328
+ totalLabel: g
327
329
  }) => {
328
- const d = le(), b = d.palette.mode === "dark", l = A.useMemo(
329
- () => m ? t.investmentsData.find(({ guid: B }) => B === m) : void 0,
330
- [m]
330
+ const f = ce(), p = f.palette.mode === "dark", l = A.useMemo(
331
+ () => d ? t.investmentsData.find(({ guid: B }) => B === d) : void 0,
332
+ [d]
331
333
  ), {
332
- investments: { allocation: h }
333
- } = M(), r = A.useMemo(() => t.donutData.length > 0 ? t.donutData : [{ id: "0", color: d.palette.border.light, value: 100 }], [t, d]), n = b ? "#0AC295" : "#09A57F", p = b ? "grey.300" : "grey.700", C = () => l ? h.pie_chart_centered_click_for_details : c ? re(t.totalGainLossPercentage) : R(t.totalGainLoss), S = t.totalGainLoss >= 0 ? n : p;
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;
334
336
  return /* @__PURE__ */ e(
335
- Ve,
337
+ ze,
336
338
  {
337
- data: r,
338
- hoveredId: g,
339
- onClick: f,
340
- onMouseEnter: u,
339
+ data: i,
340
+ hoveredId: h,
341
+ onClick: b,
342
+ onMouseEnter: m,
341
343
  onMouseLeave: v,
342
- selectedId: m,
344
+ selectedId: d,
343
345
  size: s,
344
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: [
345
- /* @__PURE__ */ e(i, { color: "text.secondary", noWrap: !0, children: l?.displayName ?? y }),
346
- /* @__PURE__ */ e(fe, { color: "text.primary", children: R(l?.value ?? t.totalMarketValue) }),
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) }),
347
349
  /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
348
350
  !l && /* @__PURE__ */ e(
349
351
  k,
@@ -354,14 +356,14 @@ const de = ({ sx: t = {} }) => {
354
356
  }
355
357
  ),
356
358
  /* @__PURE__ */ e(
357
- i,
359
+ r,
358
360
  {
359
361
  sx: {
360
362
  color: S,
361
363
  fontWeight: 700
362
364
  },
363
365
  variant: "Small",
364
- children: C()
366
+ children: w()
365
367
  }
366
368
  )
367
369
  ] })
@@ -369,20 +371,20 @@ const de = ({ sx: t = {} }) => {
369
371
  }
370
372
  );
371
373
  }, rt = () => {
372
- const [t, g] = A.useState(0), [c, u] = A.useState(""), [v, f] = A.useState(""), m = (n) => {
373
- c !== n ? u(n) : (u(""), f(""));
374
- }, { selectedAccountGuids: s } = Q(), { visibleHoldings: y } = H(), { visibleInvestmentAccounts: d } = se(), {
375
- investments: { allocation: b }
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 }
376
378
  } = M(), l = nt(
377
- d.filter(({ guid: n }) => s.includes(n)),
378
- b,
379
- y
380
- ), { isMobile: h } = U(), r = pe("(max-width:768px)");
379
+ f.filter(({ guid: n }) => s.includes(n)),
380
+ p,
381
+ g
382
+ ), { isMobile: u } = U(), i = xe("(max-width:768px)");
381
383
  return /* @__PURE__ */ o(
382
384
  _,
383
385
  {
384
- alignItems: r ? "center" : "flex-start",
385
- direction: r ? "column" : "row",
386
+ alignItems: i ? "center" : "flex-start",
387
+ direction: i ? "column" : "row",
386
388
  gap: { xs: 16, md: 64, xl: 100 },
387
389
  sx: {
388
390
  justifyContent: "center",
@@ -397,25 +399,25 @@ const de = ({ sx: t = {} }) => {
397
399
  hoveredId: v,
398
400
  isPercentage: t === 1,
399
401
  onMouseEnter: (n) => {
400
- c === n ? f("") : c || f(n);
402
+ c === n ? b("") : c || b(n);
401
403
  },
402
404
  onMouseLeave: () => {
403
- f("");
405
+ b("");
404
406
  },
405
- onSelected: m,
407
+ onSelected: d,
406
408
  selectedId: c,
407
- size: h ? 280 : 400,
408
- totalLabel: b.pie_chart_centered_text
409
+ size: u ? 280 : 400,
410
+ totalLabel: p.pie_chart_centered_text
409
411
  }
410
412
  ),
411
413
  /* @__PURE__ */ e(
412
414
  ot,
413
415
  {
414
416
  data: l,
415
- onSelected: m,
417
+ onSelected: d,
416
418
  selectedId: c,
417
419
  selectedTabs: t,
418
- setSelectedTabs: g
420
+ setSelectedTabs: h
419
421
  }
420
422
  )
421
423
  ]
@@ -423,25 +425,25 @@ const de = ({ sx: t = {} }) => {
423
425
  );
424
426
  }, at = P(rt), st = ({
425
427
  analysisDetails: t,
426
- analysisType: g,
428
+ analysisType: h,
427
429
  copy: c,
428
- setAnalysisType: u
430
+ setAnalysisType: m
429
431
  }) => {
430
- const { isSmallMobile: v } = U(), f = A.useMemo(() => Object.keys(t).filter((s) => t[s] >= 1).map((s) => ({
432
+ const { isSmallMobile: v } = U(), b = A.useMemo(() => Object.keys(t).filter((s) => t[s] >= 1).map((s) => ({
431
433
  key: s,
432
- value: oe(t[s], "0,0"),
433
- formattedKey: Pe(s)
434
- })), [t]), m = [
434
+ value: ie(t[s], "0,0"),
435
+ formattedKey: Ve(s)
436
+ })), [t]), d = [
435
437
  { label: c.equities, value: V.Stocks },
436
438
  { label: c.bonds, value: V.Bonds }
437
439
  ];
438
440
  return /* @__PURE__ */ o(_, { sx: { gap: 12, width: { md: 412 } }, children: [
439
441
  /* @__PURE__ */ e(
440
- ye,
442
+ fe,
441
443
  {
442
444
  color: "primary",
443
445
  exclusive: !0,
444
- onChange: (s, y) => y && u(y),
446
+ onChange: (s, g) => g && m(g),
445
447
  sx: {
446
448
  width: "100%",
447
449
  "& .MuiToggleButton-root": {
@@ -450,31 +452,31 @@ const de = ({ sx: t = {} }) => {
450
452
  textTransform: "capitalize"
451
453
  }
452
454
  },
453
- value: f.length ? g : -1,
454
- children: m.map(({ label: s, value: y }) => /* @__PURE__ */ e(xe, { sx: { width: "100%" }, value: y, children: s }, y))
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))
455
457
  }
456
458
  ),
457
- f.length ? /* @__PURE__ */ e(
458
- ee,
459
+ b.length ? /* @__PURE__ */ e(
460
+ te,
459
461
  {
460
462
  sx: {
461
463
  "& .MuiListItemSecondaryAction-root": { pr: 12 },
462
464
  "& .MuiListItem-divider": { borderColor: "border.light" },
463
465
  "& .MuiListItem-root": { minHeight: 44, px: 12 }
464
466
  },
465
- children: f.map(({ value: s, formattedKey: y }) => /* @__PURE__ */ e(te, { divider: !0, secondaryAction: /* @__PURE__ */ e(i, { children: s }), children: /* @__PURE__ */ e(
466
- Xe,
467
+ children: b.map(({ value: s, formattedKey: g }) => /* @__PURE__ */ e(ne, { divider: !0, secondaryAction: /* @__PURE__ */ e(r, { children: s }), children: /* @__PURE__ */ e(
468
+ Re,
467
469
  {
468
- primary: y,
470
+ primary: g,
469
471
  primaryTypographyProps: { fontStyle: "normal" }
470
472
  }
471
- ) }, y))
473
+ ) }, g))
472
474
  }
473
- ) : /* @__PURE__ */ o(ae, { children: [
474
- /* @__PURE__ */ e(i, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: c.empty_data }),
475
+ ) : /* @__PURE__ */ o(se, { children: [
476
+ /* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: c.empty_data }),
475
477
  /* @__PURE__ */ e(K, { sx: { borderColor: "border.light" } }),
476
478
  /* @__PURE__ */ e(
477
- de,
479
+ me,
478
480
  {
479
481
  sx: {
480
482
  ".inner-container": { width: v ? "100%" : 364 }
@@ -483,34 +485,34 @@ const de = ({ sx: t = {} }) => {
483
485
  )
484
486
  ] })
485
487
  ] });
486
- }, lt = ({ body: t, title: g }) => /* @__PURE__ */ o(_, { sx: { gap: 4, p: 12 }, children: [
487
- /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: g }),
488
- /* @__PURE__ */ e(ve, { variant: "ParagraphSmall", children: t })
488
+ }, lt = ({ body: t, title: h }) => /* @__PURE__ */ o(_, { sx: { gap: 4, p: 12 }, children: [
489
+ /* @__PURE__ */ e(r, { bold: !0, variant: "Body", children: h }),
490
+ /* @__PURE__ */ e(J, { variant: "ParagraphSmall", children: t })
489
491
  ] }), ct = ({
490
492
  placement: t = "bottom",
491
- tooltip_info_body: g,
493
+ tooltip_info_body: h,
492
494
  tooltip_info_title: c
493
495
  }) => /* @__PURE__ */ e(
494
- $e,
496
+ Pe,
495
497
  {
496
498
  enterTouchDelay: 500,
497
499
  placement: t,
498
- title: /* @__PURE__ */ e(lt, { body: g, title: c }),
499
- children: /* @__PURE__ */ e(ce, { "aria-label": c, sx: { minHeight: 0, minWidth: 0, p: 0 }, children: /* @__PURE__ */ e(k, { name: "info", sx: { color: "info.main" } }) })
500
+ title: /* @__PURE__ */ e(lt, { body: h, title: c }),
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" } }) })
500
502
  }
501
503
  ), dt = () => {
502
504
  const {
503
505
  investments: { analysis: t }
504
- } = M(), { analysisChartData: g, analysisDetails: c, analysisType: u, setAnalysisType: v } = H(), f = pe("(min-width:320px) and (max-width:375px)"), { isMobile: m } = U(), y = Re().palette.mode === "dark", { cellDimension: d, columns: b, rows: l, textVariant: h } = A.useMemo(() => {
505
- const r = u === V.Stocks, n = Object.values(r ? t.stock_column_labels : t.bond_column_labels), p = Object.values(r ? t.stock_row_labels : t.bond_row_labels);
506
- return { cellDimension: m ? 72 : 100, columns: n, rows: p, textVariant: m ? "XSmall" : "Body" };
507
- }, [t, m, 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]);
508
510
  return /* @__PURE__ */ o(
509
511
  _,
510
512
  {
511
513
  sx: {
512
514
  flexDirection: { md: "row" },
513
- gap: m ? 48 : 64,
515
+ gap: d ? 48 : 64,
514
516
  justifyContent: "center",
515
517
  pt: 48,
516
518
  px: 16
@@ -531,34 +533,34 @@ const de = ({ sx: t = {} }) => {
531
533
  {
532
534
  sx: {
533
535
  alignItems: "center",
534
- bottom: m ? 10 : 24,
535
- gap: m ? 0 : 24,
536
+ bottom: d ? 10 : 24,
537
+ gap: d ? 0 : 24,
536
538
  position: "relative",
537
539
  transform: "rotate(-180deg)",
538
540
  writingMode: "vertical-rl"
539
541
  },
540
542
  children: [
541
- /* @__PURE__ */ e(ve, { bold: !0, color: "secondary.main", variant: h, 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 }),
542
544
  /* @__PURE__ */ e(
543
545
  _,
544
546
  {
545
547
  sx: {
546
548
  flexDirection: "row",
547
- height: m ? 224 : 308,
549
+ height: d ? 224 : 308,
548
550
  justifyContent: "space-around"
549
551
  },
550
- children: b.map((r) => /* @__PURE__ */ e(
551
- i,
552
+ children: p.map((i) => /* @__PURE__ */ e(
553
+ r,
552
554
  {
553
555
  sx: {
554
556
  color: "secondary.main",
555
557
  pl: 12,
556
- pr: m ? 4 : 0
558
+ pr: d ? 4 : 0
557
559
  },
558
- variant: h,
559
- children: r
560
+ variant: u,
561
+ children: i
560
562
  },
561
- r
563
+ i
562
564
  ))
563
565
  }
564
566
  )
@@ -570,13 +572,13 @@ const de = ({ sx: t = {} }) => {
570
572
  _,
571
573
  {
572
574
  sx: {
573
- alignSelf: f ? "start" : "center",
575
+ alignSelf: b ? "start" : "center",
574
576
  flexDirection: "row",
575
577
  gap: 8,
576
578
  pb: 12
577
579
  },
578
580
  children: [
579
- /* @__PURE__ */ e(i, { bold: !0, children: t.invest_analysis }),
581
+ /* @__PURE__ */ e(r, { bold: !0, children: t.invest_analysis }),
580
582
  /* @__PURE__ */ e(
581
583
  ct,
582
584
  {
@@ -587,48 +589,48 @@ const de = ({ sx: t = {} }) => {
587
589
  ]
588
590
  }
589
591
  ),
590
- g.map((r, n, p) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: r.map((C, S) => {
591
- const B = n === 0, I = n === p.length - 1, W = S === 0, G = S === r.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;
592
594
  let T = "grey.200", j = "grey.900";
593
- return y ? (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(
594
596
  _,
595
597
  {
596
598
  sx: {
597
599
  ...{
598
600
  borderBottomLeftRadius: I && W ? 4 : 0,
599
- borderBottomRightRadius: I && G ? 4 : 0,
601
+ borderBottomRightRadius: I && N ? 4 : 0,
600
602
  borderTopLeftRadius: B && W ? 4 : 0,
601
- borderTopRightRadius: B && G ? 4 : 0
603
+ borderTopRightRadius: B && N ? 4 : 0
602
604
  },
603
605
  alignItems: "center",
604
606
  bgcolor: T,
605
- height: d,
607
+ height: f,
606
608
  justifyContent: "center",
607
- width: d
609
+ width: f
608
610
  },
609
611
  children: /* @__PURE__ */ e(
610
- i,
612
+ r,
611
613
  {
612
614
  sx: {
613
615
  color: j,
614
- fontWeight: m ? 600 : 700
616
+ fontWeight: d ? 600 : 700
615
617
  },
616
- variant: m ? "Body" : "H3",
617
- children: C
618
+ variant: d ? "Body" : "H3",
619
+ children: w
618
620
  }
619
621
  )
620
622
  },
621
623
  S
622
624
  );
623
625
  }) }, n)),
624
- /* @__PURE__ */ e(_, { sx: { alignSelf: "center", flexDirection: "row", pt: 12 }, children: l.map((r) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", width: d }, children: /* @__PURE__ */ e(i, { color: "secondary.main", variant: h, children: r }) }, r)) }),
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)) }),
625
627
  /* @__PURE__ */ e(
626
- i,
628
+ r,
627
629
  {
628
630
  bold: !0,
629
- sx: { color: "secondary.main", pt: m ? 4 : 24, textAlign: "center" },
630
- variant: h,
631
- children: u === V.Stocks ? t.valuation : t.duration
631
+ sx: { color: "secondary.main", pt: d ? 4 : 24, textAlign: "center" },
632
+ variant: u,
633
+ children: m === V.Stocks ? t.valuation : t.duration
632
634
  }
633
635
  )
634
636
  ] })
@@ -639,7 +641,7 @@ const de = ({ sx: t = {} }) => {
639
641
  st,
640
642
  {
641
643
  analysisDetails: c,
642
- analysisType: u,
644
+ analysisType: m,
643
645
  copy: {
644
646
  empty_data: t.empty_data,
645
647
  equities: t.equities,
@@ -653,43 +655,43 @@ const de = ({ sx: t = {} }) => {
653
655
  );
654
656
  }, mt = P(dt), ut = ({
655
657
  accountHoldingsData: t,
656
- currentEditedCostBasis: g,
658
+ currentEditedCostBasis: h,
657
659
  editingHoldingId: c,
658
- handleCostBasisBlur: u,
660
+ handleCostBasisBlur: m,
659
661
  handleCostBasisClick: v,
660
- handleCostBasisChange: f,
661
- handleCostBasisKeyDown: m,
662
+ handleCostBasisChange: b,
663
+ handleCostBasisKeyDown: d,
662
664
  isOpen: s,
663
- onClose: y
665
+ onClose: g
664
666
  }) => {
665
- const { investments: d } = M(), [b, l] = A.useState({}), h = (r) => (n, p) => {
666
- l((C) => ({
667
- ...C,
668
- [r]: p
667
+ const { investments: f } = M(), [p, l] = A.useState({}), u = (i) => (n, x) => {
668
+ l((w) => ({
669
+ ...w,
670
+ [i]: x
669
671
  }));
670
672
  };
671
673
  return /* @__PURE__ */ o(
672
- qe,
674
+ Xe,
673
675
  {
674
- ariaLabelClose: d.overview.close_investment_drawer,
676
+ ariaLabelClose: f.overview.close_investment_drawer,
675
677
  isOpen: s,
676
- onClose: y,
677
- title: d.overview.investment_details,
678
+ onClose: g,
679
+ title: f.overview.investment_details,
678
680
  children: [
679
- /* @__PURE__ */ o(x, { sx: { gap: 8, p: 24 }, children: [
681
+ /* @__PURE__ */ o(y, { sx: { gap: 8, p: 24 }, children: [
680
682
  /* @__PURE__ */ e(
681
- ne,
683
+ oe,
682
684
  {
683
685
  alt: t.accounts.institutionName || "",
684
686
  institutionGuid: t.accounts.institution_guid || "",
685
687
  size: 64
686
688
  }
687
689
  ),
688
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Small", children: t.accounts.memberName }),
689
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "H2", children: t.accounts.user_name || t.accounts.name }),
690
- /* @__PURE__ */ o(x, { sx: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" }, children: [
691
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: d.overview.current_balance }),
692
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: t.accounts.balance?.toLocaleString("en-US", {
690
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Small", children: t.accounts.memberName }),
691
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "H2", children: t.accounts.user_name || t.accounts.name }),
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 }),
694
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: t.accounts.balance?.toLocaleString("en-US", {
693
695
  currency: "USD",
694
696
  maximumFractionDigits: 2,
695
697
  minimumFractionDigits: 2,
@@ -698,7 +700,7 @@ const de = ({ sx: t = {} }) => {
698
700
  ] })
699
701
  ] }),
700
702
  /* @__PURE__ */ o(
701
- x,
703
+ y,
702
704
  {
703
705
  sx: {
704
706
  bgcolor: "background.default",
@@ -708,19 +710,19 @@ const de = ({ sx: t = {} }) => {
708
710
  py: 10
709
711
  },
710
712
  children: [
711
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: d.overview.holding }),
712
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: d.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 })
713
715
  ]
714
716
  }
715
717
  ),
716
- t.holdings?.map((r, n) => {
717
- const p = c === r.id;
718
+ t.holdings?.map((i, n) => {
719
+ const x = c === i.id;
718
720
  return /* @__PURE__ */ o(
719
- _e,
721
+ be,
720
722
  {
721
723
  disableGutters: !0,
722
- expanded: b[r.id] === !0,
723
- onChange: r ? h(r?.id) : () => {
724
+ expanded: p[i.id] === !0,
725
+ onChange: i ? u(i?.id) : () => {
724
726
  },
725
727
  sx: {
726
728
  ":before": n === 0 ? { opacity: 0 } : {},
@@ -728,21 +730,21 @@ const de = ({ sx: t = {} }) => {
728
730
  },
729
731
  children: [
730
732
  /* @__PURE__ */ e(
731
- Ce,
733
+ we,
732
734
  {
733
735
  "aria-controls": "panel1a-content",
734
736
  id: "panel1a-header",
735
737
  sx: [
736
738
  { height: 64 },
737
- b[r.id] && n > 0 && {
739
+ p[i.id] && n > 0 && {
738
740
  borderTop: 1,
739
741
  borderColor: "border.main"
740
742
  }
741
743
  ],
742
- children: /* @__PURE__ */ o(x, { sx: { flexDirection: "row", width: "100%" }, children: [
744
+ children: /* @__PURE__ */ o(y, { sx: { flexDirection: "row", width: "100%" }, children: [
743
745
  /* @__PURE__ */ e("div", { style: { width: 24 } }),
744
746
  /* @__PURE__ */ o(
745
- x,
747
+ y,
746
748
  {
747
749
  sx: [
748
750
  {
@@ -753,28 +755,28 @@ const de = ({ sx: t = {} }) => {
753
755
  py: 14,
754
756
  width: "100%"
755
757
  },
756
- b[r.id] && {
758
+ p[i.id] && {
757
759
  borderBottom: 1,
758
760
  borderColor: "border.main"
759
761
  }
760
762
  ],
761
763
  children: [
762
764
  /* @__PURE__ */ e(
763
- x,
765
+ y,
764
766
  {
765
767
  sx: {
766
768
  alignItems: "center",
767
769
  flexDirection: "row",
768
770
  gap: 12
769
771
  },
770
- children: /* @__PURE__ */ o(x, { sx: { overflow: "hidden", width: 98 }, children: [
771
- /* @__PURE__ */ e(i, { sx: { fontWeight: 600 }, variant: "Body", children: r.holding }),
772
- /* @__PURE__ */ e(i, { variant: "XSmall", children: r.description })
772
+ children: /* @__PURE__ */ o(y, { sx: { overflow: "hidden", width: 98 }, children: [
773
+ /* @__PURE__ */ e(r, { sx: { fontWeight: 600 }, variant: "Body", children: i.holding }),
774
+ /* @__PURE__ */ e(r, { variant: "XSmall", children: i.description })
773
775
  ] })
774
776
  }
775
777
  ),
776
778
  /* @__PURE__ */ o(
777
- x,
779
+ y,
778
780
  {
779
781
  sx: {
780
782
  alignItems: "center",
@@ -784,47 +786,47 @@ const de = ({ sx: t = {} }) => {
784
786
  justifyContent: "flex-end"
785
787
  },
786
788
  children: [
787
- /* @__PURE__ */ o(x, { children: [
788
- /* @__PURE__ */ e(i, { sx: { fontWeight: 600, textAlign: "right" }, variant: "Body", children: r.marketValue?.toLocaleString("en-US", {
789
+ /* @__PURE__ */ o(y, { children: [
790
+ /* @__PURE__ */ e(r, { sx: { fontWeight: 600, textAlign: "right" }, variant: "Body", children: i.marketValue?.toLocaleString("en-US", {
789
791
  currency: "USD",
790
792
  maximumFractionDigits: 2,
791
793
  minimumFractionDigits: 2,
792
794
  style: "currency"
793
795
  }) }),
794
- /* @__PURE__ */ o(x, { sx: { alignItems: "center", gap: 2, flexDirection: "row" }, children: [
795
- r.totalGainLoss !== 0 && /* @__PURE__ */ e(
796
+ /* @__PURE__ */ o(y, { sx: { alignItems: "center", gap: 2, flexDirection: "row" }, children: [
797
+ i.totalGainLoss !== 0 && /* @__PURE__ */ e(
796
798
  k,
797
799
  {
798
- name: r.totalGainLoss >= 0 ? "trending_up" : "trending_down",
800
+ name: i.totalGainLoss >= 0 ? "trending_up" : "trending_down",
799
801
  size: 12,
800
802
  sx: {
801
803
  verticalAlign: "middle",
802
804
  mr: 1,
803
- color: r.totalGainLoss >= 0 ? "success.main" : "grey.700"
805
+ color: i.totalGainLoss >= 0 ? "success.main" : "grey.700"
804
806
  }
805
807
  }
806
808
  ),
807
809
  /* @__PURE__ */ e(
808
- i,
810
+ r,
809
811
  {
810
812
  sx: {
811
- color: r.totalGainLoss <= 0 ? "grey.700" : "success.main",
812
- fontWeight: r.totalGainLoss <= 0 ? 400 : 700
813
+ color: i.totalGainLoss <= 0 ? "grey.700" : "success.main",
814
+ fontWeight: i.totalGainLoss <= 0 ? 400 : 700
813
815
  },
814
816
  variant: "XSmall",
815
- children: r.costBasis ? `${(r.totalGainLoss / r.costBasis * 100).toFixed(2)}%` : "0.00%"
817
+ children: i.costBasis ? `${(i.totalGainLoss / i.costBasis * 100).toFixed(2)}%` : "0.00%"
816
818
  }
817
819
  ),
818
- /* @__PURE__ */ e(i, { sx: { color: "grey.700" }, variant: "XSmall", children: "|" }),
820
+ /* @__PURE__ */ e(r, { sx: { color: "grey.700" }, variant: "XSmall", children: "|" }),
819
821
  /* @__PURE__ */ e(
820
- i,
822
+ r,
821
823
  {
822
824
  sx: {
823
- color: r.totalGainLoss <= 0 ? "grey.700" : "success.main",
824
- fontWeight: r.totalGainLoss <= 0 ? 400 : 700
825
+ color: i.totalGainLoss <= 0 ? "grey.700" : "success.main",
826
+ fontWeight: i.totalGainLoss <= 0 ? 400 : 700
825
827
  },
826
828
  variant: "XSmall",
827
- children: Math.abs(r.totalGainLoss).toLocaleString("en-US", {
829
+ children: Math.abs(i.totalGainLoss).toLocaleString("en-US", {
828
830
  currency: "USD",
829
831
  maximumFractionDigits: 2,
830
832
  minimumFractionDigits: 2,
@@ -837,7 +839,7 @@ const de = ({ sx: t = {} }) => {
837
839
  /* @__PURE__ */ e(
838
840
  k,
839
841
  {
840
- name: b[r.id] ? "expand_less" : "expand_more",
842
+ name: p[i.id] ? "expand_less" : "expand_more",
841
843
  size: 20
842
844
  }
843
845
  )
@@ -850,8 +852,8 @@ const de = ({ sx: t = {} }) => {
850
852
  ] })
851
853
  }
852
854
  ),
853
- /* @__PURE__ */ e(we, { children: /* @__PURE__ */ o(
854
- x,
855
+ /* @__PURE__ */ e(_e, { children: /* @__PURE__ */ o(
856
+ y,
855
857
  {
856
858
  sx: {
857
859
  alignItems: "center",
@@ -860,10 +862,10 @@ const de = ({ sx: t = {} }) => {
860
862
  pl: 24
861
863
  },
862
864
  children: [
863
- /* @__PURE__ */ e(x, { sx: { width: 32 } }),
864
- /* @__PURE__ */ o(x, { sx: { flex: 1 }, children: [
865
+ /* @__PURE__ */ e(y, { sx: { width: 32 } }),
866
+ /* @__PURE__ */ o(y, { sx: { flex: 1 }, children: [
865
867
  /* @__PURE__ */ o(
866
- x,
868
+ y,
867
869
  {
868
870
  sx: {
869
871
  alignItems: "center",
@@ -875,13 +877,13 @@ const de = ({ sx: t = {} }) => {
875
877
  pr: 24
876
878
  },
877
879
  children: [
878
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Body", children: d.overview.quantity }),
879
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Small", children: r.qty })
880
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Body", children: f.overview.quantity }),
881
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Small", children: i.qty })
880
882
  ]
881
883
  }
882
884
  ),
883
885
  /* @__PURE__ */ o(
884
- x,
886
+ y,
885
887
  {
886
888
  sx: {
887
889
  alignItems: "center",
@@ -891,9 +893,9 @@ const de = ({ sx: t = {} }) => {
891
893
  pr: 24
892
894
  },
893
895
  children: [
894
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Body", children: d.overview.cost_basis_header }),
896
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Body", children: f.overview.cost_basis_header }),
895
897
  /* @__PURE__ */ o(
896
- x,
898
+ y,
897
899
  {
898
900
  direction: "row",
899
901
  sx: {
@@ -901,13 +903,13 @@ const de = ({ sx: t = {} }) => {
901
903
  gap: 4
902
904
  },
903
905
  children: [
904
- p ? /* @__PURE__ */ e(
905
- Se,
906
+ x ? /* @__PURE__ */ e(
907
+ Ce,
906
908
  {
907
909
  autoFocus: !0,
908
- onBlur: () => u(r.id),
909
- onChange: f,
910
- onKeyDown: (C) => m(C, r.id),
910
+ onBlur: () => m(i.id),
911
+ onChange: b,
912
+ onKeyDown: (w) => d(w, i.id),
911
913
  size: "small",
912
914
  sx: {
913
915
  fontSize: 14,
@@ -922,18 +924,18 @@ const de = ({ sx: t = {} }) => {
922
924
  border: "none"
923
925
  }
924
926
  },
925
- value: g
927
+ value: h
926
928
  }
927
- ) : /* @__PURE__ */ e(i, { sx: { fontSize: 14, width: 58 }, variant: "Small", children: r.costBasis?.toLocaleString("en-US", {
929
+ ) : /* @__PURE__ */ e(r, { sx: { fontSize: 14, width: 58 }, variant: "Small", children: i.costBasis?.toLocaleString("en-US", {
928
930
  currency: "USD",
929
931
  maximumFractionDigits: 2,
930
932
  minimumFractionDigits: 2,
931
933
  style: "currency"
932
934
  }) }),
933
935
  /* @__PURE__ */ e(
934
- ce,
936
+ de,
935
937
  {
936
- onClick: () => v(r.id, r.costBasis),
938
+ onClick: () => v(i.id, i.costBasis),
937
939
  sx: { minWidth: 16, minHeight: 16 },
938
940
  children: /* @__PURE__ */ e(k, { name: "stylus", size: 16, sx: { color: "grey.700" } })
939
941
  }
@@ -950,25 +952,25 @@ const de = ({ sx: t = {} }) => {
950
952
  ) })
951
953
  ]
952
954
  },
953
- r.id
955
+ i.id
954
956
  );
955
957
  })
956
958
  ]
957
959
  }
958
960
  );
959
- }, ht = P(ut), q = (t) => /* @__PURE__ */ o(Ye, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
960
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600, fontSize: 14 }, variant: "Small", children: t.colDef.headerName }),
961
+ }, ht = P(ut), q = (t) => /* @__PURE__ */ o(qe, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
962
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600, fontSize: 14 }, variant: "Small", children: t.colDef.headerName }),
961
963
  /* @__PURE__ */ e(k, { name: "expand_all", size: 12 })
962
964
  ] }), gt = ({
963
965
  data: t,
964
- editingHoldingId: g,
966
+ editingHoldingId: h,
965
967
  currentEditedCostBasis: c,
966
- handleCostBasisClick: u,
968
+ handleCostBasisClick: m,
967
969
  handleCostBasisChange: v,
968
- handleCostBasisKeyDown: f,
969
- handleCostBasisBlur: m
970
+ handleCostBasisKeyDown: b,
971
+ handleCostBasisBlur: d
970
972
  }) => {
971
- const { investments: s } = M(), d = le().palette.mode === "dark", b = "success.main", l = d ? "grey.300" : "grey.700", h = (n, p = "lesserThan") => p === "greaterThan" ? n >= 0 ? b : l : n <= 0 ? l : b, r = [
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 = [
972
974
  {
973
975
  field: "qty",
974
976
  headerName: s.overview.qty_header,
@@ -983,8 +985,8 @@ const de = ({ sx: t = {} }) => {
983
985
  flex: 1,
984
986
  renderHeader: q,
985
987
  renderCell: (n) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", gap: 16, flexDirection: "row" }, children: /* @__PURE__ */ o(_, { children: [
986
- /* @__PURE__ */ e(i, { sx: { fontWeight: 700 }, children: n.row.holding }),
987
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary", fontWeight: 400 }, variant: "tiny", children: n.row.description })
988
+ /* @__PURE__ */ e(r, { sx: { fontWeight: 700 }, children: n.row.holding }),
989
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary", fontWeight: 400 }, variant: "tiny", children: n.row.description })
988
990
  ] }) })
989
991
  },
990
992
  {
@@ -993,15 +995,15 @@ const de = ({ sx: t = {} }) => {
993
995
  width: 132,
994
996
  renderHeader: q,
995
997
  renderCell: (n) => {
996
- const p = g === n.row.id;
998
+ const x = h === n.row.id;
997
999
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
998
- p ? /* @__PURE__ */ e(
999
- Se,
1000
+ x ? /* @__PURE__ */ e(
1001
+ Ce,
1000
1002
  {
1001
1003
  autoFocus: !0,
1002
- onBlur: () => m(n.row.id),
1004
+ onBlur: () => d(n.row.id),
1003
1005
  onChange: v,
1004
- onKeyDown: (C) => f(C, n.row.id),
1006
+ onKeyDown: (w) => b(w, n.row.id),
1005
1007
  size: "small",
1006
1008
  sx: {
1007
1009
  fontSize: 14,
@@ -1018,16 +1020,16 @@ const de = ({ sx: t = {} }) => {
1018
1020
  },
1019
1021
  value: c
1020
1022
  }
1021
- ) : /* @__PURE__ */ e(i, { sx: { fontSize: 14, width: 57 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
1023
+ ) : /* @__PURE__ */ e(r, { sx: { fontSize: 14, width: 57 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
1022
1024
  currency: "USD",
1023
1025
  maximumFractionDigits: 2,
1024
1026
  minimumFractionDigits: 2,
1025
1027
  style: "currency"
1026
1028
  }) }),
1027
1029
  /* @__PURE__ */ e(
1028
- ce,
1030
+ de,
1029
1031
  {
1030
- onClick: () => u(n.row.id, n.row.costBasis),
1032
+ onClick: () => m(n.row.id, n.row.costBasis),
1031
1033
  sx: { minWidth: 12, minHeight: 12 },
1032
1034
  children: /* @__PURE__ */ e(k, { name: "stylus", size: 12, sx: { color: "grey.700" } })
1033
1035
  }
@@ -1043,7 +1045,7 @@ const de = ({ sx: t = {} }) => {
1043
1045
  width: 196,
1044
1046
  renderHeader: q,
1045
1047
  renderCell: (n) => {
1046
- const p = n.row.costBasis, C = p ? n.row.totalGainLoss / p * 100 : 0;
1048
+ const x = n.row.costBasis, w = x ? n.row.totalGainLoss / x * 100 : 0;
1047
1049
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
1048
1050
  n.value !== 0 && /* @__PURE__ */ e(
1049
1051
  k,
@@ -1051,29 +1053,29 @@ const de = ({ sx: t = {} }) => {
1051
1053
  name: n.value > 0 ? "trending_up" : "trending_down",
1052
1054
  size: 16,
1053
1055
  sx: {
1054
- color: h(n.value),
1056
+ color: u(n.value),
1055
1057
  mr: 1,
1056
1058
  verticalAlign: "middle"
1057
1059
  }
1058
1060
  }
1059
1061
  ),
1060
1062
  /* @__PURE__ */ e(
1061
- i,
1063
+ r,
1062
1064
  {
1063
1065
  sx: {
1064
- color: h(n.value),
1066
+ color: u(n.value),
1065
1067
  fontWeight: n.value > 0 ? 700 : 400
1066
1068
  },
1067
1069
  variant: "Small",
1068
- children: p ? `${C.toFixed(2)}%` : "0.00%"
1070
+ children: x ? `${w.toFixed(2)}%` : "0.00%"
1069
1071
  }
1070
1072
  ),
1071
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1073
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1072
1074
  /* @__PURE__ */ e(
1073
- i,
1075
+ r,
1074
1076
  {
1075
1077
  sx: {
1076
- color: h(n.value),
1078
+ color: u(n.value),
1077
1079
  fontWeight: n.value > 0 ? 700 : 400
1078
1080
  },
1079
1081
  variant: "Small",
@@ -1096,7 +1098,7 @@ const de = ({ sx: t = {} }) => {
1096
1098
  headerName: s.overview.market_value_header,
1097
1099
  width: 132,
1098
1100
  renderHeader: q,
1099
- renderCell: (n) => /* @__PURE__ */ e(i, { sx: { fontWeight: 700 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
1101
+ renderCell: (n) => /* @__PURE__ */ e(r, { sx: { fontWeight: 700 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
1100
1102
  currency: "USD",
1101
1103
  maximumFractionDigits: 2,
1102
1104
  minimumFractionDigits: 2,
@@ -1107,16 +1109,16 @@ const de = ({ sx: t = {} }) => {
1107
1109
  }
1108
1110
  ];
1109
1111
  return /* @__PURE__ */ e(
1110
- ie,
1112
+ re,
1111
1113
  {
1112
1114
  sx: {
1113
1115
  boxShadow: "none",
1114
1116
  width: "100%"
1115
1117
  },
1116
1118
  children: /* @__PURE__ */ e(
1117
- Ke,
1119
+ $e,
1118
1120
  {
1119
- columns: r,
1121
+ columns: i,
1120
1122
  disableColumnFilter: !0,
1121
1123
  disableColumnMenu: !0,
1122
1124
  disableRowSelectionOnClick: !0,
@@ -1128,55 +1130,55 @@ const de = ({ sx: t = {} }) => {
1128
1130
  }
1129
1131
  );
1130
1132
  }, pt = () => {
1131
- const { isMobile: t } = U(), [g, c] = O({}), [u, v] = O(!1), { selectedAccountGuids: f } = Q(), { visibleHoldings: m, updateHoldings: s } = H(), [y, d] = A.useState(!1), [b, l] = O({
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({
1132
1134
  accounts: [],
1133
1135
  holdings: []
1134
- }), { accounts: h, investments: r } = M(), { isCopyLoaded: n } = Q(), [p, C] = O(null), [S, B] = O(""), W = le().palette.mode === "dark", G = W ? "#0AC295" : "#09A57F", F = W ? "grey.300" : "grey.700", T = (a, w = "lesserThan") => w === "greaterThan" ? a >= 0 ? G : F : a <= 0 ? F : G, j = (a, w) => {
1135
- C(a), B(w.toFixed(2));
1136
- }, J = (a) => {
1137
- const w = a.target.value;
1138
- /^\d*\.?\d*$/.test(w) && B(w);
1139
- }, me = (a, w) => {
1140
- a.key === "Enter" ? Z(w) : a.key === "Escape" && C(null);
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));
1141
1138
  }, Z = (a) => {
1142
- const w = m.find(({ guid: E }) => E === a);
1143
- if (!w) return;
1144
- const N = Number(S);
1145
- if (s({ ...w, cost_basis: N }), t) {
1146
- const E = b.holdings.map(
1147
- (D) => D.id === a ? { ...D, costBasis: N } : D
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);
1143
+ }, ee = (a) => {
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
1148
1150
  );
1149
1151
  l((D) => ({
1150
1152
  ...D,
1151
1153
  holdings: E
1152
1154
  }));
1153
1155
  }
1154
- C(null);
1155
- }, Le = (a) => (w, N) => {
1156
+ w(null);
1157
+ }, De = (a) => (C, G) => {
1156
1158
  c((E) => ({
1157
1159
  ...E,
1158
- [a]: N
1160
+ [a]: G
1159
1161
  }));
1160
- }, { visibleHoldings: ue } = H(), { visibleInvestmentAccounts: Ie } = se(), X = Ie.filter(
1161
- ({ guid: a }) => f.includes(a)
1162
- ), Ae = X.reduce((a, w) => a + (w.balance || 0), 0), Be = X.map(({ guid: a }) => a), $ = ue.filter(
1163
- ({ account_guid: a }) => Be.includes(a)
1164
- ).reduce((a, w) => {
1165
- const N = w.market_value ? w.market_value - (w.cost_basis || 0) : 0;
1166
- return a + N;
1167
- }, 0), Te = () => {
1162
+ }, { visibleHoldings: he } = H(), { visibleInvestmentAccounts: Le } = le(), X = Le.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(
1165
+ ({ account_guid: a }) => Ae.includes(a)
1166
+ ).reduce((a, C) => {
1167
+ const G = C.market_value ? C.market_value - (C.cost_basis || 0) : 0;
1168
+ return a + G;
1169
+ }, 0), Be = () => {
1168
1170
  v(!1);
1169
1171
  };
1170
- return n ? /* @__PURE__ */ o(x, { sx: { alignItems: "center", gap: 48, pt: 48, width: "100%" }, children: [
1171
- !!X.length && /* @__PURE__ */ o(x, { sx: { alignItems: "center" }, children: [
1172
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, children: r.overview.total_portfolio }),
1173
- /* @__PURE__ */ e(fe, { children: Ae.toLocaleString("en-US", {
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: [
1174
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, children: i.overview.total_portfolio }),
1175
+ /* @__PURE__ */ e(J, { variant: "H1", children: Ie.toLocaleString("en-US", {
1174
1176
  currency: "USD",
1175
1177
  maximumFractionDigits: 2,
1176
1178
  minimumFractionDigits: 2,
1177
1179
  style: "currency"
1178
1180
  }) }),
1179
- /* @__PURE__ */ o(x, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
1181
+ /* @__PURE__ */ o(y, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
1180
1182
  /* @__PURE__ */ e(
1181
1183
  k,
1182
1184
  {
@@ -1186,7 +1188,7 @@ const de = ({ sx: t = {} }) => {
1186
1188
  }
1187
1189
  ),
1188
1190
  /* @__PURE__ */ e(
1189
- i,
1191
+ r,
1190
1192
  {
1191
1193
  sx: { color: T($, "greaterThan"), fontWeight: 700 },
1192
1194
  variant: "Small",
@@ -1201,7 +1203,7 @@ const de = ({ sx: t = {} }) => {
1201
1203
  ] })
1202
1204
  ] }),
1203
1205
  X.map((a) => {
1204
- const w = ue.filter((L) => L.account_guid === a.guid).map((L) => ({
1206
+ const C = he.filter((L) => L.account_guid === a.guid).map((L) => ({
1205
1207
  id: L.guid,
1206
1208
  qty: L.shares || 0,
1207
1209
  holding: L.symbol || L.description || "Unknown",
@@ -1209,17 +1211,17 @@ const de = ({ sx: t = {} }) => {
1209
1211
  totalGainLoss: L.market_value ? L.market_value - (L.cost_basis || 0) : 0,
1210
1212
  marketValue: L.market_value || 0,
1211
1213
  description: L.description || ""
1212
- })), N = w.length > 0, E = a.balance, D = w.reduce(
1213
- (L, Fe) => Fe.totalGainLoss + L,
1214
+ })), G = C.length > 0, E = a.balance, D = C.reduce(
1215
+ (L, We) => We.totalGainLoss + L,
1214
1216
  0
1215
- ), he = E ? D / E * 100 : 0;
1217
+ ), ge = E ? D / E * 100 : 0;
1216
1218
  if (t)
1217
1219
  return /* @__PURE__ */ e(
1218
- ie,
1220
+ re,
1219
1221
  {
1220
- onClick: w.length ? () => {
1222
+ onClick: C.length ? () => {
1221
1223
  v(!0), l({
1222
- holdings: w,
1224
+ holdings: C,
1223
1225
  accounts: a
1224
1226
  });
1225
1227
  } : void 0,
@@ -1228,7 +1230,7 @@ const de = ({ sx: t = {} }) => {
1228
1230
  overflow: "hidden"
1229
1231
  },
1230
1232
  children: /* @__PURE__ */ o(
1231
- x,
1233
+ y,
1232
1234
  {
1233
1235
  sx: {
1234
1236
  border: 1,
@@ -1241,7 +1243,7 @@ const de = ({ sx: t = {} }) => {
1241
1243
  },
1242
1244
  children: [
1243
1245
  /* @__PURE__ */ o(
1244
- x,
1246
+ y,
1245
1247
  {
1246
1248
  sx: {
1247
1249
  alignItems: "center",
@@ -1254,22 +1256,22 @@ const de = ({ sx: t = {} }) => {
1254
1256
  },
1255
1257
  children: [
1256
1258
  /* @__PURE__ */ e(
1257
- ne,
1259
+ oe,
1258
1260
  {
1259
1261
  alt: a.institutionName || "",
1260
1262
  institutionGuid: a.institution_guid || "",
1261
1263
  size: 32
1262
1264
  }
1263
1265
  ),
1264
- /* @__PURE__ */ o(x, { sx: { overflow: "hidden", pl: 13, pr: 13 }, children: [
1265
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1266
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1266
+ /* @__PURE__ */ o(y, { sx: { overflow: "hidden", pl: 13, pr: 13 }, children: [
1267
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1268
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1267
1269
  ] })
1268
1270
  ]
1269
1271
  }
1270
1272
  ),
1271
1273
  /* @__PURE__ */ o(
1272
- x,
1274
+ y,
1273
1275
  {
1274
1276
  sx: {
1275
1277
  alignItems: "center",
@@ -1280,7 +1282,7 @@ const de = ({ sx: t = {} }) => {
1280
1282
  },
1281
1283
  children: [
1282
1284
  /* @__PURE__ */ o(
1283
- x,
1285
+ y,
1284
1286
  {
1285
1287
  sx: {
1286
1288
  alignItems: "center",
@@ -1294,9 +1296,9 @@ const de = ({ sx: t = {} }) => {
1294
1296
  pt: 14
1295
1297
  },
1296
1298
  children: [
1297
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary", fontSize: 11 }, variant: "Small", children: r.overview.total_gain_Loss }),
1299
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary", fontSize: 11 }, variant: "Small", children: i.overview.total_gain_Loss }),
1298
1300
  /* @__PURE__ */ o(
1299
- x,
1301
+ y,
1300
1302
  {
1301
1303
  sx: {
1302
1304
  alignItems: "center",
@@ -1314,7 +1316,7 @@ const de = ({ sx: t = {} }) => {
1314
1316
  }
1315
1317
  ),
1316
1318
  /* @__PURE__ */ o(
1317
- i,
1319
+ r,
1318
1320
  {
1319
1321
  sx: {
1320
1322
  color: T(D),
@@ -1322,14 +1324,14 @@ const de = ({ sx: t = {} }) => {
1322
1324
  },
1323
1325
  variant: "Body",
1324
1326
  children: [
1325
- he.toFixed(2),
1327
+ ge.toFixed(2),
1326
1328
  "%"
1327
1329
  ]
1328
1330
  }
1329
1331
  ),
1330
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1332
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1331
1333
  /* @__PURE__ */ e(
1332
- i,
1334
+ r,
1333
1335
  {
1334
1336
  sx: {
1335
1337
  color: T(D),
@@ -1351,7 +1353,7 @@ const de = ({ sx: t = {} }) => {
1351
1353
  }
1352
1354
  ),
1353
1355
  /* @__PURE__ */ o(
1354
- x,
1356
+ y,
1355
1357
  {
1356
1358
  sx: {
1357
1359
  alignItems: "center",
@@ -1363,8 +1365,8 @@ const de = ({ sx: t = {} }) => {
1363
1365
  pt: 14
1364
1366
  },
1365
1367
  children: [
1366
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: r.overview.total_value }),
1367
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
1368
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_value }),
1369
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
1368
1370
  currency: "USD",
1369
1371
  maximumFractionDigits: 2,
1370
1372
  minimumFractionDigits: 2,
@@ -1382,12 +1384,12 @@ const de = ({ sx: t = {} }) => {
1382
1384
  },
1383
1385
  a.guid
1384
1386
  );
1385
- const ke = W ? "grey.700" : "grey.400", We = w.length ? "text.primary" : ke;
1387
+ const Te = W ? "grey.700" : "grey.400", ke = C.length ? "text.primary" : Te;
1386
1388
  return /* @__PURE__ */ o(
1387
- _e,
1389
+ be,
1388
1390
  {
1389
- expanded: g[a.guid] === !0,
1390
- onChange: N ? Le(a.guid) : () => {
1391
+ expanded: h[a.guid] === !0,
1392
+ onChange: G ? De(a.guid) : () => {
1391
1393
  },
1392
1394
  sx: {
1393
1395
  border: 1,
@@ -1397,12 +1399,12 @@ const de = ({ sx: t = {} }) => {
1397
1399
  },
1398
1400
  children: [
1399
1401
  /* @__PURE__ */ o(
1400
- Ce,
1402
+ we,
1401
1403
  {
1402
1404
  "aria-controls": "panel1a-content",
1403
1405
  id: "panel1a-header",
1404
1406
  sx: [
1405
- g[a.guid] && {
1407
+ h[a.guid] && {
1406
1408
  borderBottom: 1,
1407
1409
  borderColor: "border.main",
1408
1410
  maxHeight: 88
@@ -1410,7 +1412,7 @@ const de = ({ sx: t = {} }) => {
1410
1412
  ],
1411
1413
  children: [
1412
1414
  /* @__PURE__ */ o(
1413
- x,
1415
+ y,
1414
1416
  {
1415
1417
  sx: {
1416
1418
  alignItems: "center",
@@ -1420,27 +1422,27 @@ const de = ({ sx: t = {} }) => {
1420
1422
  width: "100%"
1421
1423
  },
1422
1424
  children: [
1423
- /* @__PURE__ */ e(k, { name: "expand_more", size: 20, sx: { color: We } }),
1425
+ /* @__PURE__ */ e(k, { name: "expand_more", size: 20, sx: { color: ke } }),
1424
1426
  /* @__PURE__ */ e(
1425
- ne,
1427
+ oe,
1426
1428
  {
1427
1429
  alt: a.institutionName || "",
1428
1430
  institutionGuid: a.institution_guid || "",
1429
1431
  size: 32
1430
1432
  }
1431
1433
  ),
1432
- /* @__PURE__ */ o(x, { sx: { alignItems: "flex-start" }, children: [
1433
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1434
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1434
+ /* @__PURE__ */ o(y, { sx: { alignItems: "flex-start" }, children: [
1435
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1436
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1435
1437
  ] })
1436
1438
  ]
1437
1439
  }
1438
1440
  ),
1439
- /* @__PURE__ */ o(x, { sx: { flexDirection: "row" }, children: [
1440
- /* @__PURE__ */ o(x, { sx: { alignItems: "flex-end", pb: 14, pl: 24, pr: 24, pt: 14 }, children: [
1441
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: r.overview.total_gain_Loss }),
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: [
1443
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_gain_Loss }),
1442
1444
  /* @__PURE__ */ o(
1443
- x,
1445
+ y,
1444
1446
  {
1445
1447
  sx: {
1446
1448
  alignItems: "center",
@@ -1458,7 +1460,7 @@ const de = ({ sx: t = {} }) => {
1458
1460
  }
1459
1461
  ),
1460
1462
  /* @__PURE__ */ o(
1461
- i,
1463
+ r,
1462
1464
  {
1463
1465
  sx: {
1464
1466
  color: T(D),
@@ -1466,14 +1468,14 @@ const de = ({ sx: t = {} }) => {
1466
1468
  },
1467
1469
  variant: "Body",
1468
1470
  children: [
1469
- he.toFixed(2),
1471
+ ge.toFixed(2),
1470
1472
  "%"
1471
1473
  ]
1472
1474
  }
1473
1475
  ),
1474
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1476
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1475
1477
  /* @__PURE__ */ e(
1476
- i,
1478
+ r,
1477
1479
  {
1478
1480
  sx: {
1479
1481
  color: T(D),
@@ -1492,9 +1494,9 @@ const de = ({ sx: t = {} }) => {
1492
1494
  }
1493
1495
  )
1494
1496
  ] }),
1495
- /* @__PURE__ */ e(x, { sx: { alignItems: "flex-end", gap: 12, pb: 14, pl: 16, pr: 16, pt: 14 }, children: /* @__PURE__ */ o(x, { sx: { alignItems: "flex-end" }, children: [
1496
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: r.overview.total_value }),
1497
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
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: [
1498
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_value }),
1499
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
1498
1500
  currency: "USD",
1499
1501
  maximumFractionDigits: 2,
1500
1502
  minimumFractionDigits: 2,
@@ -1505,16 +1507,16 @@ const de = ({ sx: t = {} }) => {
1505
1507
  ]
1506
1508
  }
1507
1509
  ),
1508
- /* @__PURE__ */ e(we, { sx: { bgcolor: "background.default", p: 12 }, children: /* @__PURE__ */ e(ie, { sx: { border: 1, borderColor: "border.light" }, children: /* @__PURE__ */ e(
1510
+ /* @__PURE__ */ e(_e, { sx: { bgcolor: "background.default", p: 12 }, children: /* @__PURE__ */ e(re, { sx: { border: 1, borderColor: "border.light" }, children: /* @__PURE__ */ e(
1509
1511
  gt,
1510
1512
  {
1511
1513
  currentEditedCostBasis: S,
1512
- data: w,
1513
- editingHoldingId: p,
1514
- handleCostBasisBlur: Z,
1515
- handleCostBasisChange: J,
1514
+ data: C,
1515
+ editingHoldingId: x,
1516
+ handleCostBasisBlur: ee,
1517
+ handleCostBasisChange: Z,
1516
1518
  handleCostBasisClick: j,
1517
- handleCostBasisKeyDown: me
1519
+ handleCostBasisKeyDown: ue
1518
1520
  }
1519
1521
  ) }) })
1520
1522
  ]
@@ -1522,89 +1524,94 @@ const de = ({ sx: t = {} }) => {
1522
1524
  a.guid
1523
1525
  );
1524
1526
  }),
1525
- /* @__PURE__ */ e(de, {}),
1527
+ /* @__PURE__ */ e(me, {}),
1526
1528
  /* @__PURE__ */ e(
1527
1529
  ht,
1528
1530
  {
1529
- accountHoldingsData: b,
1531
+ accountHoldingsData: p,
1530
1532
  currentEditedCostBasis: S,
1531
- editingHoldingId: p,
1532
- handleCostBasisBlur: Z,
1533
- handleCostBasisChange: J,
1533
+ editingHoldingId: x,
1534
+ handleCostBasisBlur: ee,
1535
+ handleCostBasisChange: Z,
1534
1536
  handleCostBasisClick: j,
1535
- handleCostBasisKeyDown: me,
1536
- isOpen: u,
1537
- onClose: Te
1537
+ handleCostBasisKeyDown: ue,
1538
+ isOpen: m,
1539
+ onClose: Be
1538
1540
  }
1539
1541
  ),
1540
1542
  /* @__PURE__ */ e(
1541
- ge,
1543
+ pe,
1542
1544
  {
1543
- onClose: () => d(!1),
1544
- showConnectionsWidget: y,
1545
- title: h.manage_connections
1545
+ onClose: () => f(!1),
1546
+ showConnectionsWidget: g,
1547
+ title: u.manage_connections
1546
1548
  }
1547
1549
  )
1548
- ] }) : /* @__PURE__ */ e(De, {});
1549
- }, xt = P(pt), yt = ({ title: t }) => /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: t }), sn = P(({ onBackClick: t, sx: g }) => {
1550
- const { onEvent: c } = be(), { onLoad: u } = je(), { isMobile: v } = U(), { visibleInvestmentAccounts: f } = se(), {
1551
- visibleHoldings: m,
1552
- setShowConnectionsWidget: s,
1553
- showConnectionsWidget: y
1554
- } = H(), { investments: d, accounts: b } = M(), { isCopyLoaded: l, isInitialized: h, setSelectedAccounts: r } = Q(), [n, p] = A.useState(0), { loadHoldings: C } = H();
1555
- A.useEffect(() => {
1556
- r(f);
1557
- }, [f]), A.useEffect(() => {
1558
- h && C().finally(() => {
1559
- u?.("InvestmentsWidget");
1560
- });
1561
- }, [h]);
1550
+ ] }) : /* @__PURE__ */ e(Se, {});
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();
1561
+ Ke({
1562
+ widgetName: "InvestmentsWidget",
1563
+ isLoaded: w
1564
+ }), A.useEffect(() => {
1565
+ v || b().finally();
1566
+ }, []), A.useEffect(() => {
1567
+ u && x().finally();
1568
+ }, [u]);
1562
1569
  const S = () => {
1563
1570
  c(z.INVESTMENT_WIDGET_ACCOUNT_FILTER_CLICK);
1564
1571
  };
1565
- if (!l || !h) return /* @__PURE__ */ e(De, {});
1572
+ if (!u || !w) return /* @__PURE__ */ e(Se, {});
1566
1573
  const B = [
1567
1574
  z.INVESTMENT_WIDGET_DETAILS_CLICK,
1568
1575
  z.INVESTMENT_WIDGET_ALLOCATION_CLICK,
1569
1576
  z.INVESTMENT_WIDGET_ANALYSIS_CLICK
1570
- ], I = f.length === 0 && m.length === 0, W = [
1571
- d.tab_overview_title,
1572
- d.tab_allocation_title,
1573
- d.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
1574
1581
  ];
1575
1582
  return /* @__PURE__ */ o(
1576
- ze,
1583
+ Ue,
1577
1584
  {
1578
- accountOptions: f,
1585
+ allowedAccountTypes: [Ye.INVESTMENT],
1579
1586
  onAccountsFilterClick: S,
1580
1587
  onBackClick: t,
1581
- sx: g,
1582
- title: d.title,
1588
+ sx: h,
1589
+ title: p.title,
1583
1590
  children: [
1584
- /* @__PURE__ */ o(_, { mx: v ? 0 : 48, my: 24, children: [
1591
+ /* @__PURE__ */ o(_, { mx: m ? 0 : 48, my: 24, children: [
1585
1592
  /* @__PURE__ */ e(
1586
- Ge,
1593
+ Ee,
1587
1594
  {
1588
- onChange: (G, F) => {
1589
- p(F), c(B[F]);
1595
+ onChange: (N, F) => {
1596
+ n(F), c(B[F]);
1590
1597
  },
1591
1598
  sx: { bgcolor: "background.paper" },
1592
1599
  textColor: "primary",
1593
- value: I ? -1 : n,
1600
+ value: I ? -1 : i,
1594
1601
  variant: "fullWidth",
1595
- children: W.map((G) => /* @__PURE__ */ e(Ee, { disabled: I, label: /* @__PURE__ */ e(yt, { title: G }) }, G))
1602
+ children: W.map((N) => /* @__PURE__ */ e(Fe, { disabled: I, label: /* @__PURE__ */ e(yt, { title: N }) }, N))
1596
1603
  }
1597
1604
  ),
1598
1605
  I ? /* @__PURE__ */ e(
1599
1606
  Qe,
1600
1607
  {
1601
- header: d.empty_state_header,
1608
+ header: p.empty_state_header,
1602
1609
  icon: "bid_landscape",
1603
1610
  onClick: () => {
1604
- s(!0), c(z.ACCOUNTS_CLICK_CONNECT);
1611
+ g(!0), c(z.ACCOUNTS_CLICK_CONNECT);
1605
1612
  },
1606
- primaryButton: d.overview.connect_accounts,
1607
- subText: d.empty_state_description,
1613
+ primaryButton: p.overview.connect_accounts,
1614
+ subText: p.empty_state_description,
1608
1615
  sx: {
1609
1616
  width: { sm: 432 },
1610
1617
  ".buttons-footer": {
@@ -1617,18 +1624,18 @@ const de = ({ sx: t = {} }) => {
1617
1624
  px: 16
1618
1625
  }
1619
1626
  }
1620
- ) : /* @__PURE__ */ o(ae, { children: [
1621
- n === 0 && /* @__PURE__ */ e(xt, {}),
1622
- n === 1 && /* @__PURE__ */ e(at, {}),
1623
- n === 2 && /* @__PURE__ */ e(mt, {})
1627
+ ) : /* @__PURE__ */ o(se, { children: [
1628
+ i === 0 && /* @__PURE__ */ e(xt, {}),
1629
+ i === 1 && /* @__PURE__ */ e(at, {}),
1630
+ i === 2 && /* @__PURE__ */ e(mt, {})
1624
1631
  ] })
1625
1632
  ] }),
1626
1633
  /* @__PURE__ */ e(
1627
- ge,
1634
+ pe,
1628
1635
  {
1629
- onClose: () => s(!1),
1630
- showConnectionsWidget: y,
1631
- title: b.manage_connections
1636
+ onClose: () => g(!1),
1637
+ showConnectionsWidget: f,
1638
+ title: l.manage_connections
1632
1639
  }
1633
1640
  )
1634
1641
  ]
@@ -1636,5 +1643,5 @@ const de = ({ sx: t = {} }) => {
1636
1643
  );
1637
1644
  });
1638
1645
  export {
1639
- sn as InvestmentsWidget
1646
+ cn as InvestmentsWidget
1640
1647
  };