@mx-cartographer/experiences 8.0.0-alpha.bb3 → 8.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 (203) hide show
  1. package/CHANGELOG.md +178 -1
  2. package/dist/{Account-Bxw0_4FU.mjs → Account-CvR2-dSR.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-CitErkuS.mjs} +89 -82
  4. package/dist/AccountDetailsHeader-BkG3MNYo.mjs +87 -0
  5. package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-zCMqet85.mjs} +6 -6
  6. package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-DHrz8Mml.mjs} +9 -9
  7. package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-LgfBcYMe.mjs} +112 -75
  8. package/dist/Accounts-Bzy1_REQ.mjs +9 -0
  9. package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
  10. package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
  11. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-BmZXkL0C.mjs} +2 -2
  12. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +23 -21
  13. package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
  14. package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
  15. package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-BkvlItWx.mjs} +11 -11
  16. package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
  17. package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-itK0R3wV.mjs} +2 -2
  18. package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
  19. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
  20. package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-Bq-aPy-5.mjs} +1 -1
  21. package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
  22. package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
  23. package/dist/Drawer-By9V-B5L.mjs +178 -0
  24. package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
  25. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-Cglo8Mca.mjs} +3 -3
  26. package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
  27. package/dist/FinstrongStore-BIrX0Xg2.mjs +451 -0
  28. package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-1P19goZ7.mjs} +112 -152
  29. package/dist/{Help-B6dIcujh.mjs → Help-Ea3BlXQp.mjs} +2 -2
  30. package/dist/LineChart-KpPw1phO.mjs +580 -0
  31. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BxTkF6Tz.mjs} +10 -10
  32. package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-CaoQl609.mjs} +91 -88
  33. package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
  34. package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
  35. package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
  36. package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-rC0q7P7t.mjs} +2 -2
  37. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-uzM8tCoH.mjs} +236 -231
  38. package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-CDX_kqHa.mjs} +7 -15
  39. package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
  40. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +4 -4
  41. package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-B4ybrS0B.mjs} +4 -4
  42. package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-BqijW_8S.mjs} +49 -48
  43. package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +26 -29
  44. package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
  45. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DQ1b9uqq.mjs} +11 -13
  46. package/dist/SpendingLegend-CDO060GT.mjs +193 -0
  47. package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
  48. package/dist/TransactionApi-CjBoLleL.mjs +86 -0
  49. package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
  50. package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
  51. package/dist/TrendsStore-yO7qYv97.mjs +186 -0
  52. package/dist/{User-BQUxBeZV.mjs → User-Cnlegl1N.mjs} +2 -2
  53. package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +711 -728
  54. package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CoFDmQRE.mjs} +4 -4
  55. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  56. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
  57. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
  58. package/dist/accounts/index.es.js +245 -235
  59. package/dist/accounts/stores/AccountStore.d.ts +24 -25
  60. package/dist/accounts/utils/Accounts.d.ts +1 -2
  61. package/dist/analytics/index.es.js +2 -2
  62. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  63. package/dist/budgets/index.es.js +611 -580
  64. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  65. package/dist/cashflow/index.es.js +187 -180
  66. package/dist/categories/index.es.js +2 -2
  67. package/dist/categories/stores/CategoryStore.d.ts +2 -5
  68. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  69. package/dist/common/components/Select.d.ts +4 -2
  70. package/dist/common/components/charts/LineChart.d.ts +12 -2
  71. package/dist/common/components/charts/index.d.ts +0 -3
  72. package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
  73. package/dist/common/components/charts/linechart/CustomMark.d.ts +4 -0
  74. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  75. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  76. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  77. package/dist/common/components/drawer/Footer.d.ts +17 -0
  78. package/dist/common/hooks/index.d.ts +1 -0
  79. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  80. package/dist/common/index.es.js +397 -387
  81. package/dist/common/stores/AppDataStore.d.ts +1 -3
  82. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  83. package/dist/common/stores/GlobalStore.d.ts +10 -4
  84. package/dist/common/stores/GlobalUiStore.d.ts +2 -3
  85. package/dist/common/stores/UserStore.d.ts +2 -3
  86. package/dist/common/types/Account.d.ts +6 -9
  87. package/dist/common/types/Finstrong.d.ts +54 -0
  88. package/dist/common/types/Global.d.ts +1 -0
  89. package/dist/common/types/Widgets.d.ts +1 -0
  90. package/dist/common/types/index.d.ts +1 -1
  91. package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
  92. package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
  93. package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
  94. package/dist/dashboard/index.es.js +90 -88
  95. package/dist/debts/index.es.js +458 -448
  96. package/dist/exportTransactionsToCSV-DuAaI5XA.mjs +48 -0
  97. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  98. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  99. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
  100. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  101. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  102. package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
  103. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  104. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  105. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  106. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  107. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  108. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
  109. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  110. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  111. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  112. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  113. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  114. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  115. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  116. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  117. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  118. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  119. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  120. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  121. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  122. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  123. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  124. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  125. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  126. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
  127. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  128. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  129. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  130. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  131. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  132. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  133. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  134. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +24 -0
  135. package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
  136. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  137. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  138. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  139. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  140. package/dist/finstrong/constants/index.d.ts +9 -0
  141. package/dist/finstrong/index.es.js +3190 -1073
  142. package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
  143. package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
  144. package/dist/goals/index.es.js +302 -291
  145. package/dist/goals/stores/GoalStore.d.ts +4 -17
  146. package/dist/help/index.es.js +13 -9
  147. package/dist/{hooks-D6XlXHf4.mjs → hooks-ZMp65DFz.mjs} +12 -12
  148. package/dist/insights/index.es.js +1 -1
  149. package/dist/investments/index.es.js +108 -104
  150. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  151. package/dist/merchants/index.es.js +2 -2
  152. package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
  153. package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
  154. package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
  155. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
  156. package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
  157. package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
  158. package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
  159. package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
  160. package/dist/microinsights/carousel/BeatList.d.ts +10 -0
  161. package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
  162. package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
  163. package/dist/microinsights/constants/App.d.ts +0 -1
  164. package/dist/microinsights/index.d.ts +4 -3
  165. package/dist/microinsights/index.es.js +101 -14
  166. package/dist/microinsights/interfaces.d.ts +0 -6
  167. package/dist/networth/index.es.js +197 -190
  168. package/dist/notifications/index.es.js +25 -25
  169. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  170. package/dist/recurringtransactions/index.es.js +395 -351
  171. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -3
  172. package/dist/settings/index.es.js +307 -298
  173. package/dist/spending/index.es.js +299 -438
  174. package/dist/spending/utils/SpendingData.d.ts +2 -1
  175. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
  176. package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
  177. package/dist/transactions/index.es.js +115 -112
  178. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  179. package/dist/trends/components/TrendsTable.d.ts +0 -2
  180. package/dist/trends/index.es.js +1025 -604
  181. package/dist/trends/utils/TrendsData.d.ts +1 -0
  182. package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
  183. package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
  184. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  185. package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
  186. package/package.json +4 -4
  187. package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
  188. package/dist/Accounts-BRf_YeTf.mjs +0 -27
  189. package/dist/CategoryStore-yHI0hWmK.mjs +0 -174
  190. package/dist/CategoryUtil-pZRIYOgN.mjs +0 -80
  191. package/dist/Drawer-kEE73B87.mjs +0 -113
  192. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  193. package/dist/LineChart-D4GI7nVh.mjs +0 -541
  194. package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
  195. package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
  196. package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
  197. package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
  198. package/dist/TransactionStore-ai3uII_r.mjs +0 -690
  199. package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
  200. package/dist/common/components/SkeletonLoader.d.ts +0 -7
  201. package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
  202. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
  203. package/dist/useAriaLive-B3_pRUio.mjs +0 -35
@@ -0,0 +1,87 @@
1
+ import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
+ import { observer as m } from "mobx-react-lite";
3
+ import e from "@mui/material/Stack";
4
+ import { H3 as _, InstitutionLogo as x, Text as a, H2 as T } from "@mxenabled/mxui";
5
+ import d from "react";
6
+ import { G as N, d as f, m as D, f as w, u as E } from "./hooks-ZMp65DFz.mjs";
7
+ import { g as I } from "./AccountFields-zCMqet85.mjs";
8
+ import G from "@mui/material/Card";
9
+ import v from "@mui/material/CardContent";
10
+ import O from "@mui/material/CardHeader";
11
+ import { L as H } from "./Loader-DUaFpDGv.mjs";
12
+ import { f as M, a as P } from "./Dialog-BPTr3qHE.mjs";
13
+ import { I as L, P as U, S as j } from "./Account-CvR2-dSR.mjs";
14
+ import { u as z } from "./useAccountDisplayName-B7iXTNM8.mjs";
15
+ import { f as B } from "./NumberFormatting-DjTD0t3W.mjs";
16
+ const p = () => {
17
+ if (!d.useContext(N))
18
+ throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
19
+ return f().uiStore;
20
+ }, Y = ({ sx: n, ChartComponent: s }) => {
21
+ const { loadMonthlyCategoryTotals: c } = D(), { isInitialized: o } = w(), { selectedAccount: r } = p(), [l, u] = d.useState(!1);
22
+ return d.useEffect(() => {
23
+ o && c([r]).finally(() => {
24
+ u(!0);
25
+ });
26
+ }, [o, r]), !o || !l ? /* @__PURE__ */ t(H, {}) : /* @__PURE__ */ i(
27
+ G,
28
+ {
29
+ sx: {
30
+ "& .MuiCardContent-root:last-child": {
31
+ pb: 0
32
+ },
33
+ ...n
34
+ },
35
+ children: [
36
+ /* @__PURE__ */ t(
37
+ O,
38
+ {
39
+ sx: { pb: 0 },
40
+ title: /* @__PURE__ */ t(_, { sx: { pb: 4 }, children: M(/* @__PURE__ */ new Date(), P.MONTH_LONG) })
41
+ }
42
+ ),
43
+ /* @__PURE__ */ t(v, { sx: { p: 0 }, children: s ? /* @__PURE__ */ t(s, {}) : null })
44
+ ]
45
+ }
46
+ );
47
+ }, k = m(Y), R = ({
48
+ customDetailsChart: n,
49
+ ChartComponent: s
50
+ }) => {
51
+ const { institutions: c } = f(), { selectedAccount: o } = p(), { accounts: r } = E(), { firstSubtitle: l, firstValue: u, hasAvailableBalance: C, secondSubtitle: h, secondValue: S } = I(o, r), b = c.find(
52
+ (y) => y.guid === o?.institution_guid
53
+ ), A = [
54
+ ...L,
55
+ ...U,
56
+ ...j
57
+ ].includes(o.account_type), g = z(o);
58
+ return /* @__PURE__ */ i(e, { bgcolor: "background.default", p: 24, children: [
59
+ /* @__PURE__ */ i(e, { gap: 12, children: [
60
+ /* @__PURE__ */ t(
61
+ x,
62
+ {
63
+ alt: r.institution_logo_alt,
64
+ institutionGuid: o.institution_guid || "",
65
+ size: 64
66
+ }
67
+ ),
68
+ /* @__PURE__ */ t(a, { variant: "Small", children: b?.name })
69
+ ] }),
70
+ /* @__PURE__ */ i(e, { gap: 8, mb: 24, mt: 4, children: [
71
+ /* @__PURE__ */ t(T, { children: g }),
72
+ /* @__PURE__ */ i(e, { direction: "row", justifyContent: "space-between", children: [
73
+ /* @__PURE__ */ t(a, { bold: C, variant: "Body", children: l }),
74
+ /* @__PURE__ */ t(a, { bold: !0, variant: "Body", children: B(u, "0,0.00") })
75
+ ] }),
76
+ /* @__PURE__ */ i(e, { direction: "row", justifyContent: "space-between", children: [
77
+ /* @__PURE__ */ t(a, { variant: "Small", children: h }),
78
+ /* @__PURE__ */ t(a, { variant: "Small", children: S })
79
+ ] })
80
+ ] }),
81
+ A && /* @__PURE__ */ t(e, { children: n || /* @__PURE__ */ t(k, { ChartComponent: s }) })
82
+ ] });
83
+ }, rt = m(R);
84
+ export {
85
+ rt as A,
86
+ p as u
87
+ };
@@ -1,10 +1,10 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
2
  import { Icon as p, Text as y } from "@mxenabled/mxui";
3
- import { F as m, A as d, a as v, P as h, b as F } from "./ConnectDrawer-BQNs-hjk.mjs";
4
- import { i as T, u as D, a as A, b as g, c as O } from "./Accounts-BRf_YeTf.mjs";
5
- import { f as _, i as b, a as N, b as S } from "./NumberFormatting-Buh7u8Oi.mjs";
3
+ import { F as m, A as d, a as v, P as h, b as F } from "./ConnectDrawer-BkvlItWx.mjs";
4
+ import { i as T, u as A, a as D, b as g, c as O } from "./Accounts-Bzy1_REQ.mjs";
5
+ import { f as _, i as b, a as N, b as S } from "./NumberFormatting-DjTD0t3W.mjs";
6
6
  import { b as i } from "./Localization-2MODESHW.mjs";
7
- import { f as o, D as f } from "./Dialog-CWW597AF.mjs";
7
+ import { f as o, a as f } from "./Dialog-BPTr3qHE.mjs";
8
8
  const w = (l, e) => {
9
9
  const r = [
10
10
  {
@@ -54,7 +54,7 @@ const w = (l, e) => {
54
54
  valueFormatter: (t) => a.find((n) => n.value === t)?.label
55
55
  });
56
56
  }
57
- if (D(l)) {
57
+ if (A(l)) {
58
58
  let a = e.interest_rate, t = "interest_rate";
59
59
  l.is_manual || (typeof l.apr == "number" && (a = e.apr, t = "apr"), typeof l.apy == "number" && (a = e.apy, t = "apy")), r.push({
60
60
  event: "account_details_click_interest_rate",
@@ -66,7 +66,7 @@ const w = (l, e) => {
66
66
  valueFormatter: (n) => b(n) ? N(n / 100) : n
67
67
  });
68
68
  }
69
- return A(l) && (r.push({
69
+ return D(l) && (r.push({
70
70
  label: e.minimum_payment,
71
71
  name: "minimum_payment",
72
72
  placeholder: i(e.enter_value, e.minimum_payment),
@@ -4,17 +4,17 @@ import I from "@mui/material/Badge";
4
4
  import m from "@mui/material/Box";
5
5
  import S from "@mui/material/ListItem";
6
6
  import v from "@mui/material/ListItemAvatar";
7
- import C from "@mui/material/ListItemButton";
8
- import _ from "@mui/material/ListItemText";
7
+ import _ from "@mui/material/ListItemButton";
8
+ import C from "@mui/material/ListItemText";
9
9
  import B from "@mui/material/styles/useTheme";
10
10
  import { InstitutionLogo as L, Text as o } from "@mxenabled/mxui";
11
11
  import { Error as A } from "@mxenabled/mx-icons";
12
12
  import { I as j } from "./IconBacking-B9oC6uL2.mjs";
13
- import { g as T } from "./AccountFields-C9FlatNb.mjs";
14
- import { u as X } from "./useAccountDisplayName-BUAApBIb.mjs";
15
- import { u as $ } from "./hooks-D6XlXHf4.mjs";
16
- import { C as d } from "./ConnectDrawer-BQNs-hjk.mjs";
17
- import { f as k } from "./NumberFormatting-Buh7u8Oi.mjs";
13
+ import { g as T } from "./AccountFields-zCMqet85.mjs";
14
+ import { u as X } from "./useAccountDisplayName-B7iXTNM8.mjs";
15
+ import { d } from "./ConnectDrawer-BkvlItWx.mjs";
16
+ import { u as $ } from "./hooks-ZMp65DFz.mjs";
17
+ import { f as k } from "./NumberFormatting-DjTD0t3W.mjs";
18
18
  const w = {
19
19
  gridRow: 1,
20
20
  gridColumn: 1,
@@ -45,7 +45,7 @@ const w = {
45
45
  }
46
46
  ) }),
47
47
  /* @__PURE__ */ e(
48
- _,
48
+ C,
49
49
  {
50
50
  disableTypography: !0,
51
51
  primary: /* @__PURE__ */ r(
@@ -81,7 +81,7 @@ const w = {
81
81
  {
82
82
  sx: { backgroundColor: "background.paper", color: t.is_closed ? "grey.700" : "" },
83
83
  ...c,
84
- children: s ? /* @__PURE__ */ e(C, { alignItems: "flex-start", onClick: s, sx: { px: 24 }, children: a }) : a
84
+ children: s ? /* @__PURE__ */ e(_, { alignItems: "flex-start", onClick: s, sx: { px: 24 }, children: a }) : a
85
85
  }
86
86
  );
87
87
  }, Z = b(M);
@@ -1,12 +1,11 @@
1
- import { makeAutoObservable as l, runInAction as a } from "mobx";
2
- import { i as A } from "./User-BQUxBeZV.mjs";
3
- import { F as g, A as i } from "./Fetch-87LIQbEA.mjs";
4
- import { d as m } from "./Accounts-BRf_YeTf.mjs";
5
- import { A as c, j as u } from "./ConnectDrawer-BQNs-hjk.mjs";
6
- class d {
1
+ import { makeAutoObservable as _, runInAction as a } from "mobx";
2
+ import { i as f } from "./User-Cnlegl1N.mjs";
3
+ import { F as p, A as i } from "./Fetch-DecPFeGU.mjs";
4
+ import { A as c, h as d, d as h, E as y, i as I, j as b } from "./ConnectDrawer-BkvlItWx.mjs";
5
+ class A {
7
6
  fetchInstance;
8
- constructor(t, e, s) {
9
- this.fetchInstance = new g(t, e, void 0, s);
7
+ constructor(t, e, n) {
8
+ this.fetchInstance = new p(t, e, void 0, n);
10
9
  }
11
10
  createAccount = async (t) => this.fetchInstance.post(i.ACCOUNTS, t).then((e) => e.account).catch((e) => e);
12
11
  deleteAccount = async (t) => this.fetchInstance.delete(`${i.ACCOUNTS}/${t}`).catch((e) => e);
@@ -18,42 +17,35 @@ class d {
18
17
  refreshAllMembers = async () => this.fetchInstance.get(`${i.MEMBERS}/refresh_all`).then((t) => t).catch((t) => t);
19
18
  updateAccount = async (t) => this.fetchInstance.put(`${i.ACCOUNTS}/${t.guid}`, t).then((e) => e.account).catch((e) => e);
20
19
  }
21
- class p {
20
+ class C {
22
21
  isLoading = !1;
23
22
  selectedAccount = {};
24
23
  selectedMember = {};
25
24
  constructor() {
26
- l(this);
25
+ _(this);
27
26
  }
28
27
  setIsLoading = (t) => this.isLoading = t;
29
28
  setSelectedAccount = (t) => this.selectedAccount = t;
30
29
  setSelectedMember = (t) => this.selectedMember = t;
31
30
  }
32
- class E {
31
+ class w {
33
32
  globalStore;
34
- api = new d("/", "");
33
+ api = new A("/", "");
35
34
  accounts = [];
36
- accountsLoaded = !1;
37
35
  institutions = [];
38
- institutionsLoaded = !1;
39
36
  members = [];
40
- membersLoaded = !1;
41
37
  uiStore;
42
38
  constructor(t) {
43
- this.globalStore = t, this.uiStore = new p(), this.api = new d(t.endpoint, t.sessionToken, t.onError), l(this);
39
+ this.globalStore = t, this.uiStore = new C(), this.api = new A(t.endpoint, t.sessionToken, t.onError), _(this);
44
40
  }
45
- loadAccountData = async () => {
46
- await Promise.all([this.loadAccounts(), this.loadMembers(), this.loadInstitutions()]);
41
+ loadAccountData = async ({
42
+ accounts: t,
43
+ institutions: e
44
+ } = {}) => {
45
+ await Promise.all([this.loadAccounts(t), this.loadInstitutions(e)]);
47
46
  };
48
- get isAccountDataLoaded() {
49
- return this.accountsLoaded && this.membersLoaded && this.institutionsLoaded;
50
- }
51
- get detailedAccounts() {
52
- const t = this.globalStore.userStore.userFeatures, e = A(t, "MD_EXCLUDE_EXTERNAL_ACCOUNTS");
53
- return m(this.accounts, this.institutions, this.members, e);
54
- }
55
47
  get cashAccounts() {
56
- return this.detailedAccounts.filter(
48
+ return this.accounts.filter(
57
49
  (t) => t.account_type === c.CASH || t.account_type === c.CHECKING || t.account_type === c.PREPAID || t.account_type === c.SAVINGS || t.account_type === c.CHECKING_LINE_OF_CREDIT
58
50
  );
59
51
  }
@@ -61,10 +53,10 @@ class E {
61
53
  return this.cashAccounts.reduce((t, e) => t + (e?.balance || 0), 0);
62
54
  }
63
55
  get checkingAccounts() {
64
- return this.detailedAccounts.filter((t) => t.account_type === c.CHECKING);
56
+ return this.accounts.filter((t) => t.account_type === c.CHECKING);
65
57
  }
66
58
  get debtAccounts() {
67
- return this.detailedAccounts.filter(
59
+ return this.accounts.filter(
68
60
  (t) => t.account_type === c.CREDIT_CARD || t.account_type === c.LOAN || t.account_type === c.MORTGAGE || t.account_type === c.LINE_OF_CREDIT || t.account_type === c.CHECKING_LINE_OF_CREDIT
69
61
  );
70
62
  }
@@ -75,23 +67,23 @@ class E {
75
67
  c.CREDIT_CARD,
76
68
  c.INVESTMENT
77
69
  ]);
78
- return this.detailedAccounts.filter((e) => t.has(e.account_type));
70
+ return this.accounts.filter((e) => t.has(e.account_type));
79
71
  }
80
72
  get investmentAccounts() {
81
- return this.detailedAccounts.filter(
73
+ return this.accounts.filter(
82
74
  (t) => t.account_type === c.INVESTMENT
83
75
  );
84
76
  }
85
77
  get savingsAccounts() {
86
- return this.detailedAccounts.filter((t) => t.account_type === c.SAVINGS);
78
+ return this.accounts.filter((t) => t.account_type === c.SAVINGS);
87
79
  }
88
80
  get retirementAccounts() {
89
- return this.detailedAccounts.filter(
90
- (t) => t.account_type === c.INVESTMENT || t.account_type === c.SAVINGS || t.account_type === c.CHECKING || t.account_type === c.CASH || t.account_type === c.PROPERTY || t.account_type === c.INSURANCE && (t.account_subtype === u.WHOLE_LIFE || t.account_subtype === u.UNIVERSAL_LIFE || t.account_subtype === u.VARIABLE_UNIVERSAL_LIFE)
81
+ return this.accounts.filter(
82
+ (t) => t.account_type === c.INVESTMENT || t.account_type === c.SAVINGS || t.account_type === c.CHECKING || t.account_type === c.CASH || t.account_type === c.PROPERTY || t.account_type === c.INSURANCE && (t.account_subtype === d.WHOLE_LIFE || t.account_subtype === d.UNIVERSAL_LIFE || t.account_subtype === d.VARIABLE_UNIVERSAL_LIFE)
91
83
  );
92
84
  }
93
85
  get visibleAccounts() {
94
- return this.detailedAccounts.filter((t) => !t.is_hidden);
86
+ return this.accounts.filter((t) => !t.is_hidden);
95
87
  }
96
88
  get visibleCashAccounts() {
97
89
  return this.cashAccounts.filter((t) => !t.is_hidden);
@@ -119,15 +111,17 @@ class E {
119
111
  get visibleSavingsAccounts() {
120
112
  return this.savingsAccounts.filter((t) => !t.is_hidden);
121
113
  }
122
- setAccounts = (t) => {
123
- this.accounts = t, this.accountsLoaded = !0;
124
- };
125
- setMembers = (t) => {
126
- this.members = t, this.membersLoaded = !0;
127
- };
128
- setInstitutions = (t) => {
129
- this.institutions = t, this.institutionsLoaded = !0;
130
- };
114
+ get savingsAndCheckingAccountsBalance() {
115
+ return this.savingsAndCheckingAccounts.reduce(
116
+ (e, n) => e + (n?.balance || 0),
117
+ 0
118
+ );
119
+ }
120
+ get savingsAndCheckingAccounts() {
121
+ return this.accounts.filter(
122
+ (e) => e.account_type === c.SAVINGS || e.account_type === c.CHECKING
123
+ );
124
+ }
131
125
  addAccount = async (t) => {
132
126
  try {
133
127
  const e = await this.api.createAccount(t);
@@ -138,45 +132,77 @@ class E {
138
132
  console.error(`Error occurred while adding an account: ${e}`);
139
133
  }
140
134
  };
141
- loadAccounts = async () => {
135
+ augmentAccounts = (t = this.accounts) => {
136
+ const e = [], n = this.globalStore.userStore.userFeatures, s = f(
137
+ n,
138
+ "MD_EXCLUDE_EXTERNAL_ACCOUNTS"
139
+ );
140
+ for (const o of t) {
141
+ if (s && o.member_is_managed_by_user) continue;
142
+ const r = this.members.find((m) => m.guid === o.member_guid);
143
+ if (!r) continue;
144
+ let u = h.Connected;
145
+ y.includes(r.connection_status) ? u = h.Error : I.includes(r.connection_status) ? u = h.Processing : b.includes(r.connection_status) && (u = h.RequiresMfa);
146
+ const g = [
147
+ o.user_name || o.feed_name || "",
148
+ o.account_number ? `*${o.account_number}` : ""
149
+ ].join(" ").trim();
150
+ e.push({
151
+ ...o,
152
+ connectionStatus: u,
153
+ institutionName: g,
154
+ memberName: r.name
155
+ }), r.connectionStatus = u;
156
+ }
157
+ return e;
158
+ };
159
+ loadAccounts = async (t) => {
160
+ await this.loadMembers();
142
161
  try {
143
- const t = await this.api.getAccounts();
144
- this.setAccounts(t);
145
- } catch (t) {
146
- console.error(`Error occurred while loading accounts: ${t}`);
162
+ const e = t || await this.api.getAccounts();
163
+ a(() => {
164
+ this.accounts = this.sortAccounts(this.augmentAccounts(e));
165
+ });
166
+ } catch (e) {
167
+ console.error(`Error occurred while loading accounts: ${e}`);
147
168
  }
148
169
  };
149
- loadInstitutions = async () => {
170
+ loadInstitutions = async (t) => {
150
171
  try {
151
- const t = await this.api.getInstitutions();
152
- this.setInstitutions(t);
153
- } catch (t) {
154
- console.error(`Error occurred while loading institutions: ${t}`);
172
+ const e = t || await this.api.getInstitutions();
173
+ a(() => {
174
+ this.institutions = e;
175
+ });
176
+ } catch (e) {
177
+ console.error(`Error occurred while loading institutions: ${e}`);
155
178
  }
156
179
  };
157
180
  loadMembers = async () => {
158
181
  try {
159
182
  const t = await this.api.getMembers();
160
- this.setMembers(t);
183
+ a(() => {
184
+ this.members = t;
185
+ });
161
186
  } catch (t) {
162
187
  console.error(`Error occurred while loading members: ${t}`);
163
188
  }
164
189
  };
165
190
  mergeAccounts = async (t) => {
166
191
  try {
167
- const e = await this.api.mergeAccounts(t), s = e[Object.keys(e)[0]];
192
+ const e = await this.api.mergeAccounts(t), n = e[Object.keys(e)[0]];
168
193
  a(() => {
169
- const n = this.accounts.findIndex((o) => o.guid === t[1]);
170
- this.accounts.splice(n, 1);
171
- const r = this.accounts.findIndex((o) => o.guid === t[0]);
172
- this.accounts.splice(r, 1, s);
194
+ const s = this.accounts.findIndex((r) => r.guid === t[1]);
195
+ this.accounts.splice(s, 1);
196
+ const o = this.accounts.findIndex((r) => r.guid === t[0]);
197
+ this.accounts.splice(o, 1, n);
173
198
  });
174
199
  } catch (e) {
175
200
  console.error(`Error occurred while merging accounts: ${e}`);
176
201
  }
177
202
  };
203
+ sortAccounts = (t = this.accounts) => t.sort((e, n) => e.account_type > n.account_type ? 1 : e.account_type < n.account_type ? -1 : (e.name || "") > (n.name || "") ? 1 : (e.name || "") < (n.name || "") ? -1 : 0);
178
204
  refreshAccounts = async () => {
179
- this.uiStore.setIsLoading(!0), await Promise.all([this.loadAccounts(), this.loadInstitutions(), this.loadMembers()]), this.uiStore.setIsLoading(!1);
205
+ this.uiStore.setIsLoading(!0), await Promise.all([this.loadAccounts(), this.loadInstitutions()]), this.uiStore.setIsLoading(!1);
180
206
  };
181
207
  refreshMembers = async () => {
182
208
  try {
@@ -187,37 +213,48 @@ class E {
187
213
  };
188
214
  removeAccount = async (t) => {
189
215
  try {
190
- await this.api.deleteAccount(t);
191
- const e = this.accounts.findIndex((s) => s.guid === t);
192
- this.accounts.splice(e, 1);
216
+ await this.api.deleteAccount(t), a(() => {
217
+ const e = this.accounts.findIndex((n) => n.guid === t);
218
+ this.accounts.splice(e, 1);
219
+ });
193
220
  } catch (e) {
194
221
  console.error(`Error occurred while removing an account: ${e}`);
195
222
  }
196
223
  };
197
224
  updateAccount = async (t) => {
198
225
  try {
199
- const e = await this.api.updateAccount(t), s = this.accounts.findIndex(
200
- (n) => n.guid === e.guid
201
- );
202
- this.accounts.splice(s, 1, e);
226
+ const e = await this.api.updateAccount(t);
227
+ a(() => {
228
+ const n = this.accounts.findIndex(
229
+ (s) => s.guid === e.guid
230
+ );
231
+ this.accounts.splice(n, 1, e), this.accounts = this.augmentAccounts(this.accounts);
232
+ });
203
233
  } catch (e) {
204
234
  console.error(`Error occurred while updating account: ${e}`);
205
235
  }
206
236
  };
207
237
  updateAccountBalance = (t, e) => {
208
- const s = this.accounts.find((n) => n.guid === t);
209
- s && a(() => {
210
- s.balance = (s.balance || 0) + e;
238
+ const n = this.accounts.find((s) => s.guid === t);
239
+ n && a(() => {
240
+ n.balance = (n.balance || 0) + e;
211
241
  });
212
242
  };
213
243
  updateAccountFiltering = async (t, e) => {
214
- for (const s of t) {
215
- const n = this.accounts.find((r) => r.guid === s);
216
- n && (n.is_excluded_from_accounts = e, await this.updateAccount(n));
244
+ for (const n of t) {
245
+ const s = this.accounts.find((o) => o.guid === n);
246
+ if (s) {
247
+ s.is_excluded_from_accounts = e, s.is_excluded_from_budgets = e, s.is_excluded_from_cash_flow = e, s.is_excluded_from_debts = e, s.is_excluded_from_goals = e, s.is_excluded_from_investments = e, s.is_excluded_from_net_worth = e, s.is_excluded_from_spending = e, s.is_excluded_from_transactions = e, s.is_excluded_from_trends = e;
248
+ try {
249
+ this.updateAccount(s);
250
+ } catch (o) {
251
+ console.error(`Failed to update account ${n} (added):`, o);
252
+ }
253
+ }
217
254
  }
218
255
  };
219
256
  }
220
257
  export {
221
- d as A,
222
- E as a
258
+ A,
259
+ w as a
223
260
  };
@@ -0,0 +1,9 @@
1
+ import { A as _ } from "./ConnectDrawer-BkvlItWx.mjs";
2
+ const s = (t) => t && (t.account_type === _.CREDIT_CARD || t.account_type === _.LOAN || t.account_type === _.MORTGAGE || t.account_type === _.LINE_OF_CREDIT || t.account_type === _.CHECKING_LINE_OF_CREDIT), p = (t) => t.is_manual || !t.guid, E = (t) => t.account_type === _.LINE_OF_CREDIT || t.account_type === _.CREDIT_CARD || t.account_type === _.CHECKING_LINE_OF_CREDIT, a = (t) => t.account_type === _.SAVINGS || t.account_type === _.CHECKING || t.account_type === _.LINE_OF_CREDIT || t.account_type === _.CREDIT_CARD || t.account_type === _.LOAN || t.account_type === _.MORTGAGE, y = (t) => t.account_type === _.LOAN || t.account_type === _.MORTGAGE;
3
+ export {
4
+ s as a,
5
+ E as b,
6
+ y as c,
7
+ p as i,
8
+ a as u
9
+ };
@@ -1,4 +1,4 @@
1
- import { F as c, A as s } from "./Fetch-87LIQbEA.mjs";
1
+ import { F as c, A as s } from "./Fetch-DecPFeGU.mjs";
2
2
  class i {
3
3
  fetchInstance;
4
4
  constructor(t, e, n) {
@@ -1,5 +1,5 @@
1
1
  import { makeAutoObservable as c, runInAction as r } from "mobx";
2
- import { B as l } from "./BeatApi-DhJpgCLz.mjs";
2
+ import { B as l } from "./BeatApi-De2IaqH2.mjs";
3
3
  function d(t, e, s, i = "asc") {
4
4
  const a = i === "desc" ? -1 : 1;
5
5
  return [...t, ...e].sort((_, n) => _[s] < n[s] ? -1 * a : _[s] > n[s] ? 1 * a : 0);
@@ -1,7 +1,7 @@
1
- import { i as _ } from "./hooks-D6XlXHf4.mjs";
1
+ import { i as _ } from "./hooks-ZMp65DFz.mjs";
2
2
  import { b as d } from "./Category-CevNQ03n.mjs";
3
3
  import { b as f } from "./Localization-2MODESHW.mjs";
4
- import { f as l } from "./NumberFormatting-Buh7u8Oi.mjs";
4
+ import { f as l } from "./NumberFormatting-DjTD0t3W.mjs";
5
5
  const p = (n, e) => n.find((t) => t.guid === e), B = (n, e) => n.find((t) => t.guid === e), T = (n, e) => {
6
6
  const t = n.find((r) => r.subCategories.find((a) => a.guid === e));
7
7
  if (t)
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as E } from "react/jsx-runtime";
2
2
  import { observer as g } from "mobx-react-lite";
3
3
  import C from "react";
4
4
  import $ from "@mui/material/Stack";
5
- import { G as K, m as y, u as b, g as D, b as U } from "./hooks-D6XlXHf4.mjs";
5
+ import { G as K, m as y, u as b, g as D, b as U } from "./hooks-ZMp65DFz.mjs";
6
6
  import Y from "@mui/material/List";
7
7
  import V from "@mui/material/Paper";
8
8
  import v from "@mui/material/Divider";
@@ -16,14 +16,14 @@ import { Text as B, TextField as q, CategoryIcon as H } from "@mxenabled/mxui";
16
16
  import J from "@mui/material/Collapse";
17
17
  import Q from "@mui/material/DialogContent";
18
18
  import { b as S } from "./Localization-2MODESHW.mjs";
19
- import { a as Z } from "./Dialog-CWW597AF.mjs";
19
+ import { D as Z } from "./Dialog-BPTr3qHE.mjs";
20
20
  import ee from "@mui/material/Box";
21
21
  import te from "@mui/material/Chip";
22
22
  import I from "@mui/material/IconButton";
23
23
  import { S as oe } from "./SearchBox-B2_zLv8-.mjs";
24
24
  import { L as k } from "./Loader-DUaFpDGv.mjs";
25
- import { D as ae } from "./Drawer-kEE73B87.mjs";
26
- const h = () => {
25
+ import { D as ae } from "./Drawer-By9V-B5L.mjs";
26
+ const p = () => {
27
27
  if (!C.useContext(K))
28
28
  throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
29
29
  return y().uiStore;
@@ -48,7 +48,7 @@ const re = ({
48
48
  isOpen: c,
49
49
  type: s
50
50
  }) => {
51
- const [a, i] = C.useState(e), { categories: n } = b(), { setShouldDisableDrawerScroll: l } = h();
51
+ const [a, i] = C.useState(e), { categories: n } = b(), { setShouldDisableDrawerScroll: l } = p();
52
52
  let u = "", d = [];
53
53
  const _ = s === "delete";
54
54
  switch (s) {
@@ -82,9 +82,11 @@ const re = ({
82
82
  children: /* @__PURE__ */ t(Q, { children: _ ? /* @__PURE__ */ t(B, { children: d }) : /* @__PURE__ */ t(
83
83
  q,
84
84
  {
85
- "aria-label": s === "edit" ? n.edit_subcategory_aria : n.add_subcategory_aria,
85
+ inputProps: {
86
+ "aria-label": s === "edit" ? n.edit_subcategory_aria : n.add_subcategory_aria
87
+ },
86
88
  name: "modify-subcategory",
87
- onChange: (p) => i(p.target.value),
89
+ onChange: (h) => i(h.target.value),
88
90
  placeholder: n.input_placeholder,
89
91
  sx: { width: "100%" },
90
92
  value: a
@@ -93,7 +95,7 @@ const re = ({
93
95
  }
94
96
  );
95
97
  }, R = g(re), ne = ({ parentCategory: e }) => {
96
- const [o, r] = C.useState(!1), { addCategory: c } = y(), { categories: s } = b(), { onEvent: a } = D(), { setShouldDisableDrawerScroll: i } = h(), n = async (d) => {
98
+ const [o, r] = C.useState(!1), { addCategory: c } = y(), { categories: s } = b(), { onEvent: a } = D(), { setShouldDisableDrawerScroll: i } = p(), n = async (d) => {
97
99
  await c(d.trim(), e.guid), a(m.ON_SUBCATEGORY_ADDED), r(!1);
98
100
  }, l = async () => {
99
101
  a(m.ON_SUBCATEGORY_ADD_CLICK), i(!0), r(!0);
@@ -168,7 +170,7 @@ const re = ({
168
170
  showSelected: i,
169
171
  unselectable: n,
170
172
  unselectableText: l
171
- } = h(), { categories: u } = b(), { onEvent: d } = D(), [_, p] = C.useState(!1), [f, O] = C.useState(!1), T = !!o.revision, A = o.guid === c, w = !n.some((P) => P === o.guid);
173
+ } = p(), { categories: u } = b(), { onEvent: d } = D(), [_, h] = C.useState(!1), [f, O] = C.useState(!1), T = !!o.revision, A = o.guid === c, w = !n.some((P) => P === o.guid);
172
174
  return /* @__PURE__ */ E(
173
175
  x,
174
176
  {
@@ -205,7 +207,7 @@ const re = ({
205
207
  {
206
208
  "aria-label": S(u.edit_subcategory_aria, o.name),
207
209
  onClick: () => {
208
- p(!0), a(!0), d(m.ON_SUBCATEGORY_EDIT_CLICK);
210
+ h(!0), a(!0), d(m.ON_SUBCATEGORY_EDIT_CLICK);
209
211
  },
210
212
  children: /* @__PURE__ */ t(j, { color: "secondary" })
211
213
  }
@@ -234,7 +236,7 @@ const re = ({
234
236
  _ && /* @__PURE__ */ t(
235
237
  ce,
236
238
  {
237
- setShowRename: p,
239
+ setShowRename: h,
238
240
  showRename: _,
239
241
  subCategory: o
240
242
  }
@@ -243,7 +245,7 @@ const re = ({
243
245
  }
244
246
  );
245
247
  }, me = g(ue), Ce = ({ categories: e, parentCategory: o }) => {
246
- const { expandedGuid: r, searchValue: c } = h(), s = o.guid === r, a = !!c;
248
+ const { expandedGuid: r, searchValue: c } = p(), s = o.guid === r, a = !!c;
247
249
  return /* @__PURE__ */ t(
248
250
  J,
249
251
  {
@@ -269,7 +271,7 @@ const re = ({
269
271
  }
270
272
  );
271
273
  }, ge = g(Ce), _e = ({ category: e, subCategories: o }) => {
272
- const { expandedGuid: r, searchValue: c, setExpandedGuid: s } = h(), { onEvent: a } = D(), i = e.guid === r, n = () => {
274
+ const { expandedGuid: r, searchValue: c, setExpandedGuid: s } = p(), { onEvent: a } = D(), i = e.guid === r, n = () => {
273
275
  const l = e.guid !== r ? e.guid : null;
274
276
  s(l), a(l ? m.ON_CATEGORY_EXPANDED : m.ON_CATEGORY_COLLAPSED);
275
277
  };
@@ -307,8 +309,8 @@ const re = ({
307
309
  /* @__PURE__ */ t(v, { sx: { ml: 58 } }),
308
310
  /* @__PURE__ */ t(ge, { categories: o, parentCategory: e })
309
311
  ] });
310
- }, Ee = g(_e), he = () => {
311
- const { categories: e } = y(), { searchValue: o } = h(), { categories: r } = b(), s = ((a, i = "") => a.reduce((n, l) => {
312
+ }, Ee = g(_e), pe = () => {
313
+ const { categories: e } = y(), { searchValue: o } = p(), { categories: r } = b(), s = ((a, i = "") => a.reduce((n, l) => {
312
314
  if (l.parent_guid === null) {
313
315
  const d = [
314
316
  {
@@ -333,7 +335,7 @@ const re = ({
333
335
  },
334
336
  a.category.guid
335
337
  )) }) });
336
- }, pe = g(he), Se = ({
338
+ }, he = g(pe), Se = ({
337
339
  initialSelected: e,
338
340
  onSelect: o = void 0,
339
341
  showSelected: r = !0,
@@ -344,17 +346,17 @@ const re = ({
344
346
  searchValue: u,
345
347
  setOnSelect: d,
346
348
  setSearchValue: _,
347
- setSelectedGuid: p,
349
+ setSelectedGuid: h,
348
350
  setShowSelected: f,
349
351
  setUnselectable: O,
350
352
  setUnselectableText: T
351
- } = h();
353
+ } = p();
352
354
  return C.useEffect(() => {
353
355
  o && d(o);
354
356
  }), C.useEffect(() => {
355
357
  a.length || i();
356
358
  }, []), C.useEffect(() => {
357
- e && p(e), f(r), O(c), T(s);
359
+ e && h(e), f(r), O(c), T(s);
358
360
  }, [e, r, c, s]), l ? /* @__PURE__ */ E($, { className: "mx-cat-category-selector", sx: { width: "100%" }, children: [
359
361
  /* @__PURE__ */ t(
360
362
  oe,
@@ -366,7 +368,7 @@ const re = ({
366
368
  searchValue: u
367
369
  }
368
370
  ),
369
- /* @__PURE__ */ t(pe, {})
371
+ /* @__PURE__ */ t(he, {})
370
372
  ] }) : /* @__PURE__ */ t(k, {});
371
373
  }, ye = g(Se), be = ({
372
374
  id: e,
@@ -393,5 +395,5 @@ export {
393
395
  ye as C,
394
396
  ze as a,
395
397
  Ee as b,
396
- h as u
398
+ p as u
397
399
  };