@mx-cartographer/experiences 5.3.3-ram1-alpha-budgets-empty-state → 5.3.3-ram3-alpha-budgets-empty-state

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.
package/dist/index.es.js CHANGED
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as s, Fragment as J } from "react/jsx-runtime";
2
2
  import h, { useMemo as aI, useRef as yo, useEffect as Ht, useState as Fe } from "react";
3
3
  import { observer as C } from "mobx-react-lite";
4
4
  import L from "@mui/material/Box";
5
- import G from "@mui/material/Divider";
5
+ import M from "@mui/material/Divider";
6
6
  import aA from "@mui/material/List";
7
7
  import me from "@mui/material/ListSubheader";
8
8
  import Ir from "@mui/system/Stack";
@@ -41,7 +41,7 @@ import { eachWeekOfInterval as PI } from "date-fns/eachWeekOfInterval";
41
41
  import { endOfMonth as BA } from "date-fns/endOfMonth";
42
42
  import { format as le } from "date-fns/format";
43
43
  import { isSameMonth as bI } from "date-fns/isSameMonth";
44
- import { startOfMonth as QA } from "date-fns/startOfMonth";
44
+ import { startOfMonth as qA } from "date-fns/startOfMonth";
45
45
  import { subMonths as Ne } from "date-fns/subMonths";
46
46
  import De from "@mui/material/Paper";
47
47
  import HI from "@mui/icons-material/KeyboardArrowLeftRounded";
@@ -481,7 +481,7 @@ const aP = {
481
481
  eA.LINE_OF_CREDIT,
482
482
  eA.PREPAID,
483
483
  eA.SAVINGS
484
- ], X = {
484
+ ], g = {
485
485
  // Top-level categories
486
486
  AUTO_AND_TRANSPORT: "CAT-7829f71c-2e8c-afa5-2f55-fa3634b89874",
487
487
  BILLS_AND_UTILITIES: "CAT-79b02f2f-2adc-88f0-ac2b-4e71ead9cfc8",
@@ -604,175 +604,175 @@ const aP = {
604
604
  BONUS: "CAT-f52f2a88-2cb6-04e4-e36a-58f7b7c6a798",
605
605
  PET_FOOD_SUPPLIES: "CAT-fbcdb437-2533-2857-1d1a-0624c9d9e1dc"
606
606
  }, Hr = [
607
- X.CREDIT_CARD_PAYMENT,
608
- X.MORTGAGE_PAYMENT,
609
- X.AUTO_PAYMENT
607
+ g.CREDIT_CARD_PAYMENT,
608
+ g.MORTGAGE_PAYMENT,
609
+ g.AUTO_PAYMENT
610
610
  ], Gi = {
611
611
  // Top-level categories
612
- [X.AUTO_AND_TRANSPORT]: "Auto & Transport",
613
- [X.BILLS_AND_UTILITIES]: "Bills & Utilities",
614
- [X.BUSINESS_SERVICES]: "Business Services",
615
- [X.EDUCATION]: "Education",
616
- [X.ENTERTAINMENT]: "Entertainment",
617
- [X.FEES_AND_CHARGES]: "Fees & Charges",
618
- [X.FINANCIAL]: "Financial",
619
- [X.FOOD_AND_DINING]: "Food & Dining",
620
- [X.GIFTS_AND_DONATIONS]: "Gifts & Donations",
621
- [X.HEALTH_AND_FITNESS]: "Health & Fitness",
622
- [X.HOME]: "Home",
623
- [X.INCOME]: "Income",
624
- [X.INVESTMENTS]: "Investments",
625
- [X.KIDS]: "Kids",
626
- [X.PERSONAL_CARE]: "Personal Care",
627
- [X.PETS]: "Pets",
628
- [X.SHOPPING]: "Shopping",
629
- [X.TAXES]: "Taxes",
630
- [X.TRANSFER]: "Transfer",
631
- [X.TRAVEL]: "Travel",
632
- [X.UNCATEGORIZED]: "Uncategorized",
612
+ [g.AUTO_AND_TRANSPORT]: "Auto & Transport",
613
+ [g.BILLS_AND_UTILITIES]: "Bills & Utilities",
614
+ [g.BUSINESS_SERVICES]: "Business Services",
615
+ [g.EDUCATION]: "Education",
616
+ [g.ENTERTAINMENT]: "Entertainment",
617
+ [g.FEES_AND_CHARGES]: "Fees & Charges",
618
+ [g.FINANCIAL]: "Financial",
619
+ [g.FOOD_AND_DINING]: "Food & Dining",
620
+ [g.GIFTS_AND_DONATIONS]: "Gifts & Donations",
621
+ [g.HEALTH_AND_FITNESS]: "Health & Fitness",
622
+ [g.HOME]: "Home",
623
+ [g.INCOME]: "Income",
624
+ [g.INVESTMENTS]: "Investments",
625
+ [g.KIDS]: "Kids",
626
+ [g.PERSONAL_CARE]: "Personal Care",
627
+ [g.PETS]: "Pets",
628
+ [g.SHOPPING]: "Shopping",
629
+ [g.TAXES]: "Taxes",
630
+ [g.TRANSFER]: "Transfer",
631
+ [g.TRAVEL]: "Travel",
632
+ [g.UNCATEGORIZED]: "Uncategorized",
633
633
  // Subcategories
634
- [X.LOCAL_TAX]: "Local Tax",
635
- [X.WITHDRAWAL]: "Withdrawal",
636
- [X.TRADE_COMMISSIONS]: "Trade Commissions",
637
- [X.BABYSITTER_DAYCARE]: "Babysitter & Daycare",
638
- [X.CHILD_SUPPORT]: "Child Support",
639
- [X.CREDIT_CARD_PAYMENT]: "Credit Card Payment",
640
- [X.STUDENT_LOAN]: "Student Loan",
641
- [X.LIFE_INSURANCE]: "Life Insurance",
642
- [X.PRINTING]: "Printing",
643
- [X.FINANCIAL_ADVISOR]: "Financial Advisor",
644
- [X.INTEREST_INCOME]: "Interest Income",
645
- [X.LATE_FEE]: "Late Fee",
646
- [X.LAWN_GARDEN]: "Lawn & Garden",
647
- [X.FINANCE_CHARGE]: "Finance Charge",
648
- [X.FRAUD_PROTECTION]: "Fraud Protection",
649
- [X.MOVIES_DVDS]: "Movies & DVDs",
650
- [X.HOME_INSURANCE]: "Home Insurance",
651
- [X.CASH]: "Cash",
652
- [X.TUITION]: "Tuition",
653
- [X.HEALTH_INSURANCE]: "Health Insurance",
654
- [X.DIVIDEND_CAP_GAINS]: "Dividend & Cap Gains",
655
- [X.ALCOHOL_BARS]: "Alcohol & Bars",
656
- [X.LEGAL]: "Legal",
657
- [X.PUBLIC_TRANSPORTATION]: "Public Transportation",
658
- [X.MORTGAGE_RENT]: "Mortgage & Rent",
659
- [X.HOTEL]: "Hotel",
660
- [X.TRANSFER_FOR_CASH_SPENDING]: "Transfer for Cash Spending",
661
- [X.UTILITIES]: "Utilities",
662
- [X.DEPOSIT]: "Deposit",
663
- [X.HOME_PHONE]: "Home Phone",
664
- [X.SERVICE_PARTS]: "Service Parts",
665
- [X.INTERNET]: "Internet",
666
- [X.BOOKS]: "Books",
667
- [X.NEWSPAPERS_MAGAZINES]: "Newspapers & Magazines",
668
- [X.FAST_FOOD]: "Fast Food",
669
- [X.COFFEE_SHOPS]: "Coffee Shops",
670
- [X.SELL]: "Sell",
671
- [X.OFFICE_SUPPLIES]: "Office Supplies",
672
- [X.PET_GROOMING]: "Pet Grooming",
673
- [X.AMUSEMENT]: "Amusement",
674
- [X.BOOKS_SUPPLIES]: "Books & Supplies",
675
- [X.VACATION]: "Vacation",
676
- [X.SERVICE_FEE]: "Service Fee",
677
- [X.GIFT]: "Gift",
678
- [X.CHARITY]: "Charity",
679
- [X.PARKING]: "Parking",
680
- [X.SHIPPING]: "Shipping",
681
- [X.ARTS]: "Arts",
682
- [X.PAYCHECK]: "Paycheck",
683
- [X.FURNISHINGS]: "Furnishings",
684
- [X.RESTAURANTS]: "Restaurants",
685
- [X.SPA_MASSAGE]: "Spa & Massage",
686
- [X.RENTAL_CAR_TAXI]: "Rental Car & Taxi",
687
- [X.ALLOWANCE]: "Allowance",
688
- [X.BANKING_FEE]: "Banking Fee",
689
- [X.BUY]: "Buy",
690
- [X.STATE_TAX]: "State Tax",
691
- [X.TOYS]: "Toys",
692
- [X.KIDS_ACTIVITIES]: "Kids Activities",
693
- [X.RENTAL_INCOME]: "Rental Income",
694
- [X.VETERINARY]: "Veterinary",
695
- [X.SPORTING_GOODS]: "Sporting Goods",
696
- [X.LAUNDRY]: "Laundry",
697
- [X.CLOTHING]: "Clothing",
698
- [X.PHARMACY]: "Pharmacy",
699
- [X.HOME_SERVICES]: "Home Services",
700
- [X.ATM_FEE]: "ATM Fee",
701
- [X.HAIR]: "Hair",
702
- [X.GROCERIES]: "Groceries",
703
- [X.GAS]: "Gas",
704
- [X.FEDERAL_TAX]: "Federal Tax",
705
- [X.HOSTING]: "Hosting",
706
- [X.TELEVISION]: "Television",
707
- [X.MOBILE_PHONE]: "Mobile Phone",
708
- [X.BABY_SUPPLIES]: "Baby Supplies",
709
- [X.MUSIC]: "Music",
710
- [X.MORTGAGE_PAYMENT]: "Mortgage Payment",
711
- [X.SPORTS]: "Sports",
712
- [X.AUTO_PAYMENT]: "Auto Payment",
713
- [X.GYM]: "Gym",
714
- [X.REIMBURSEMENT]: "Reimbursement",
715
- [X.AIR_TRAVEL]: "Air Travel",
716
- [X.EYECARE]: "Eyecare",
717
- [X.HOBBIES]: "Hobbies",
718
- [X.SALES_TAX]: "Sales Tax",
719
- [X.ELECTRONICS_SOFTWARE]: "Electronics & Software",
720
- [X.DOCTOR]: "Doctor",
721
- [X.RETURNED_PURCHASE]: "Returned Purchase",
722
- [X.HOME_IMPROVEMENT]: "Home Improvement",
723
- [X.AUTO_INSURANCE]: "Auto Insurance",
724
- [X.PROPERTY_TAX]: "Property Tax",
725
- [X.DOMAIN_NAMES]: "Domain Names",
726
- [X.HOME_SUPPLIES]: "Home Supplies",
727
- [X.ADVERTISING]: "Advertising",
728
- [X.CHECK]: "Check",
729
- [X.DENTIST]: "Dentist",
730
- [X.BONUS]: "Bonus",
731
- [X.PET_FOOD_SUPPLIES]: "Pet Food & Supplies"
634
+ [g.LOCAL_TAX]: "Local Tax",
635
+ [g.WITHDRAWAL]: "Withdrawal",
636
+ [g.TRADE_COMMISSIONS]: "Trade Commissions",
637
+ [g.BABYSITTER_DAYCARE]: "Babysitter & Daycare",
638
+ [g.CHILD_SUPPORT]: "Child Support",
639
+ [g.CREDIT_CARD_PAYMENT]: "Credit Card Payment",
640
+ [g.STUDENT_LOAN]: "Student Loan",
641
+ [g.LIFE_INSURANCE]: "Life Insurance",
642
+ [g.PRINTING]: "Printing",
643
+ [g.FINANCIAL_ADVISOR]: "Financial Advisor",
644
+ [g.INTEREST_INCOME]: "Interest Income",
645
+ [g.LATE_FEE]: "Late Fee",
646
+ [g.LAWN_GARDEN]: "Lawn & Garden",
647
+ [g.FINANCE_CHARGE]: "Finance Charge",
648
+ [g.FRAUD_PROTECTION]: "Fraud Protection",
649
+ [g.MOVIES_DVDS]: "Movies & DVDs",
650
+ [g.HOME_INSURANCE]: "Home Insurance",
651
+ [g.CASH]: "Cash",
652
+ [g.TUITION]: "Tuition",
653
+ [g.HEALTH_INSURANCE]: "Health Insurance",
654
+ [g.DIVIDEND_CAP_GAINS]: "Dividend & Cap Gains",
655
+ [g.ALCOHOL_BARS]: "Alcohol & Bars",
656
+ [g.LEGAL]: "Legal",
657
+ [g.PUBLIC_TRANSPORTATION]: "Public Transportation",
658
+ [g.MORTGAGE_RENT]: "Mortgage & Rent",
659
+ [g.HOTEL]: "Hotel",
660
+ [g.TRANSFER_FOR_CASH_SPENDING]: "Transfer for Cash Spending",
661
+ [g.UTILITIES]: "Utilities",
662
+ [g.DEPOSIT]: "Deposit",
663
+ [g.HOME_PHONE]: "Home Phone",
664
+ [g.SERVICE_PARTS]: "Service Parts",
665
+ [g.INTERNET]: "Internet",
666
+ [g.BOOKS]: "Books",
667
+ [g.NEWSPAPERS_MAGAZINES]: "Newspapers & Magazines",
668
+ [g.FAST_FOOD]: "Fast Food",
669
+ [g.COFFEE_SHOPS]: "Coffee Shops",
670
+ [g.SELL]: "Sell",
671
+ [g.OFFICE_SUPPLIES]: "Office Supplies",
672
+ [g.PET_GROOMING]: "Pet Grooming",
673
+ [g.AMUSEMENT]: "Amusement",
674
+ [g.BOOKS_SUPPLIES]: "Books & Supplies",
675
+ [g.VACATION]: "Vacation",
676
+ [g.SERVICE_FEE]: "Service Fee",
677
+ [g.GIFT]: "Gift",
678
+ [g.CHARITY]: "Charity",
679
+ [g.PARKING]: "Parking",
680
+ [g.SHIPPING]: "Shipping",
681
+ [g.ARTS]: "Arts",
682
+ [g.PAYCHECK]: "Paycheck",
683
+ [g.FURNISHINGS]: "Furnishings",
684
+ [g.RESTAURANTS]: "Restaurants",
685
+ [g.SPA_MASSAGE]: "Spa & Massage",
686
+ [g.RENTAL_CAR_TAXI]: "Rental Car & Taxi",
687
+ [g.ALLOWANCE]: "Allowance",
688
+ [g.BANKING_FEE]: "Banking Fee",
689
+ [g.BUY]: "Buy",
690
+ [g.STATE_TAX]: "State Tax",
691
+ [g.TOYS]: "Toys",
692
+ [g.KIDS_ACTIVITIES]: "Kids Activities",
693
+ [g.RENTAL_INCOME]: "Rental Income",
694
+ [g.VETERINARY]: "Veterinary",
695
+ [g.SPORTING_GOODS]: "Sporting Goods",
696
+ [g.LAUNDRY]: "Laundry",
697
+ [g.CLOTHING]: "Clothing",
698
+ [g.PHARMACY]: "Pharmacy",
699
+ [g.HOME_SERVICES]: "Home Services",
700
+ [g.ATM_FEE]: "ATM Fee",
701
+ [g.HAIR]: "Hair",
702
+ [g.GROCERIES]: "Groceries",
703
+ [g.GAS]: "Gas",
704
+ [g.FEDERAL_TAX]: "Federal Tax",
705
+ [g.HOSTING]: "Hosting",
706
+ [g.TELEVISION]: "Television",
707
+ [g.MOBILE_PHONE]: "Mobile Phone",
708
+ [g.BABY_SUPPLIES]: "Baby Supplies",
709
+ [g.MUSIC]: "Music",
710
+ [g.MORTGAGE_PAYMENT]: "Mortgage Payment",
711
+ [g.SPORTS]: "Sports",
712
+ [g.AUTO_PAYMENT]: "Auto Payment",
713
+ [g.GYM]: "Gym",
714
+ [g.REIMBURSEMENT]: "Reimbursement",
715
+ [g.AIR_TRAVEL]: "Air Travel",
716
+ [g.EYECARE]: "Eyecare",
717
+ [g.HOBBIES]: "Hobbies",
718
+ [g.SALES_TAX]: "Sales Tax",
719
+ [g.ELECTRONICS_SOFTWARE]: "Electronics & Software",
720
+ [g.DOCTOR]: "Doctor",
721
+ [g.RETURNED_PURCHASE]: "Returned Purchase",
722
+ [g.HOME_IMPROVEMENT]: "Home Improvement",
723
+ [g.AUTO_INSURANCE]: "Auto Insurance",
724
+ [g.PROPERTY_TAX]: "Property Tax",
725
+ [g.DOMAIN_NAMES]: "Domain Names",
726
+ [g.HOME_SUPPLIES]: "Home Supplies",
727
+ [g.ADVERTISING]: "Advertising",
728
+ [g.CHECK]: "Check",
729
+ [g.DENTIST]: "Dentist",
730
+ [g.BONUS]: "Bonus",
731
+ [g.PET_FOOD_SUPPLIES]: "Pet Food & Supplies"
732
732
  }, ct = {
733
- [X.AUTO_AND_TRANSPORT]: "#4B9DBC",
734
- [X.BILLS_AND_UTILITIES]: "#EF9B2C",
735
- [X.BUSINESS_SERVICES]: "#B3DE8C",
736
- [X.EDUCATION]: "#F8AB3A",
737
- [X.ENTERTAINMENT]: "#AB5B89",
738
- [X.FEES_AND_CHARGES]: "#FF9696",
739
- [X.FINANCIAL]: "#6BCDDB",
740
- [X.FOOD_AND_DINING]: "#58AC7B",
741
- [X.GIFTS_AND_DONATIONS]: "#347AA5",
742
- [X.HEALTH_AND_FITNESS]: "#5C446E",
743
- [X.HOME]: "#FFD84D",
744
- [X.INCOME]: "#133F49",
745
- [X.INVESTMENTS]: "#FF7070",
746
- [X.KIDS]: "#82D196",
747
- [X.PERSONAL_CARE]: "#338B7A",
748
- [X.PETS]: "#615BAB",
749
- [X.SHOPPING]: "#CF5F84",
750
- [X.TAXES]: "#32588D",
751
- [X.TRANSFER]: "#959CA6",
752
- [X.TRAVEL]: "#E37434",
753
- [X.UNCATEGORIZED]: "#FA5555"
733
+ [g.AUTO_AND_TRANSPORT]: "#4B9DBC",
734
+ [g.BILLS_AND_UTILITIES]: "#EF9B2C",
735
+ [g.BUSINESS_SERVICES]: "#B3DE8C",
736
+ [g.EDUCATION]: "#F8AB3A",
737
+ [g.ENTERTAINMENT]: "#AB5B89",
738
+ [g.FEES_AND_CHARGES]: "#FF9696",
739
+ [g.FINANCIAL]: "#6BCDDB",
740
+ [g.FOOD_AND_DINING]: "#58AC7B",
741
+ [g.GIFTS_AND_DONATIONS]: "#347AA5",
742
+ [g.HEALTH_AND_FITNESS]: "#5C446E",
743
+ [g.HOME]: "#FFD84D",
744
+ [g.INCOME]: "#133F49",
745
+ [g.INVESTMENTS]: "#FF7070",
746
+ [g.KIDS]: "#82D196",
747
+ [g.PERSONAL_CARE]: "#338B7A",
748
+ [g.PETS]: "#615BAB",
749
+ [g.SHOPPING]: "#CF5F84",
750
+ [g.TAXES]: "#32588D",
751
+ [g.TRANSFER]: "#959CA6",
752
+ [g.TRAVEL]: "#E37434",
753
+ [g.UNCATEGORIZED]: "#FA5555"
754
754
  }, Us = {
755
- [X.AUTO_AND_TRANSPORT]: "directions_car",
756
- [X.BILLS_AND_UTILITIES]: "electrical_services",
757
- [X.BUSINESS_SERVICES]: "business_center",
758
- [X.EDUCATION]: "school",
759
- [X.ENTERTAINMENT]: "stadium",
760
- [X.FEES_AND_CHARGES]: "problem",
761
- [X.FINANCIAL]: "price_check",
762
- [X.FOOD_AND_DINING]: "grocery",
763
- [X.GIFTS_AND_DONATIONS]: "featured_seasonal_and_gifts",
764
- [X.HEALTH_AND_FITNESS]: "ecg_heart",
765
- [X.HOME]: "cottage",
766
- [X.INCOME]: "monetization_on",
767
- [X.INVESTMENTS]: "bid_landscape",
768
- [X.KIDS]: "face",
769
- [X.PERSONAL_CARE]: "volunteer_activism",
770
- [X.PETS]: "pet_supplies",
771
- [X.SHOPPING]: "shopping_cart",
772
- [X.TAXES]: "heap_snapshot_large",
773
- [X.TRANSFER]: "compare_arrows",
774
- [X.TRAVEL]: "airplane_ticket",
775
- [X.UNCATEGORIZED]: "category",
755
+ [g.AUTO_AND_TRANSPORT]: "directions_car",
756
+ [g.BILLS_AND_UTILITIES]: "electrical_services",
757
+ [g.BUSINESS_SERVICES]: "business_center",
758
+ [g.EDUCATION]: "school",
759
+ [g.ENTERTAINMENT]: "stadium",
760
+ [g.FEES_AND_CHARGES]: "problem",
761
+ [g.FINANCIAL]: "price_check",
762
+ [g.FOOD_AND_DINING]: "grocery",
763
+ [g.GIFTS_AND_DONATIONS]: "featured_seasonal_and_gifts",
764
+ [g.HEALTH_AND_FITNESS]: "ecg_heart",
765
+ [g.HOME]: "cottage",
766
+ [g.INCOME]: "monetization_on",
767
+ [g.INVESTMENTS]: "bid_landscape",
768
+ [g.KIDS]: "face",
769
+ [g.PERSONAL_CARE]: "volunteer_activism",
770
+ [g.PETS]: "pet_supplies",
771
+ [g.SHOPPING]: "shopping_cart",
772
+ [g.TAXES]: "heap_snapshot_large",
773
+ [g.TRANSFER]: "compare_arrows",
774
+ [g.TRAVEL]: "airplane_ticket",
775
+ [g.UNCATEGORIZED]: "category",
776
776
  UNKNOWN: "help"
777
777
  }, zr = 9999999999e-2;
778
778
  var Pi = /* @__PURE__ */ ((A) => (A.CAD = "CAD", A.USD = "USD", A))(Pi || {}), F = /* @__PURE__ */ ((A) => (A[A.Unknown = 0] = "Unknown", A[A.EveryWeek = 1] = "EveryWeek", A[A.EveryOtherWeek = 2] = "EveryOtherWeek", A[A.EveryMonth = 3] = "EveryMonth", A[A.EveryOtherMonth = 4] = "EveryOtherMonth", A[A.EveryQuarter = 5] = "EveryQuarter", A[A.EveryOtherQuarter = 6] = "EveryOtherQuarter", A[A.EveryYear = 7] = "EveryYear", A))(F || {});
@@ -820,7 +820,7 @@ const St = 44, Cr = (A, t) => A.find((i) => i.guid === t), Ks = (A, t) => A.find
820
820
  return i;
821
821
  }, dP = (A, t) => {
822
822
  const i = A.find((n) => n.guid === t);
823
- return i ? i.guid === X.INCOME || i.parent_guid === X.INCOME : !1;
823
+ return i ? i.guid === g.INCOME || i.parent_guid === g.INCOME : !1;
824
824
  }, Js = /(?<static>.*?)(?<dynamic>(?:_\d+{(?:.*?)}))|(?<staticEnd>.+)/g, z = (A, ...t) => {
825
825
  if (!A) return "";
826
826
  const i = t.some((o) => typeof o != "string"), r = [...A.matchAll(Js)].reduce(
@@ -904,7 +904,7 @@ class Ae {
904
904
  });
905
905
  };
906
906
  }
907
- const M = (A, t, i) => {
907
+ const N = (A, t, i) => {
908
908
  switch (ht()) {
909
909
  case "fr-ca":
910
910
  return fr(A).format(`${t} $`, i);
@@ -1202,8 +1202,8 @@ const en = (A, t) => A.reduce((i, n) => (i[n.guid] = t?.includes(n.guid), i), {}
1202
1202
  disableRipple: !0,
1203
1203
  onChange: () => {
1204
1204
  const b = {};
1205
- Object.keys(c).forEach((g) => {
1206
- b[g] = !H;
1205
+ Object.keys(c).forEach((X) => {
1206
+ b[X] = !H;
1207
1207
  }), d(b);
1208
1208
  },
1209
1209
  size: "small",
@@ -1219,7 +1219,7 @@ const en = (A, t) => A.reduce((i, n) => (i[n.guid] = t?.includes(n.guid), i), {}
1219
1219
  }
1220
1220
  ) }),
1221
1221
  Object.keys(l).map((b) => {
1222
- const g = l[b], y = g.every(
1222
+ const X = l[b], y = X.every(
1223
1223
  (x) => c[x.guid]
1224
1224
  );
1225
1225
  return /* @__PURE__ */ e(W, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ e(
@@ -1254,8 +1254,8 @@ const en = (A, t) => A.reduce((i, n) => (i[n.guid] = t?.includes(n.guid), i), {}
1254
1254
  }
1255
1255
  ) }),
1256
1256
  sx: { overflow: "auto", width: "100%" },
1257
- children: g.map((x) => {
1258
- const w = c[x.guid], j = `${x.name}${E && x.accountNumber ? ` *${x.accountNumber.slice(-4)}` : ""}`;
1257
+ children: X.map((x) => {
1258
+ const w = c[x.guid], D = `${x.name}${E && x.accountNumber ? ` *${x.accountNumber.slice(-4)}` : ""}`;
1259
1259
  return /* @__PURE__ */ e(
1260
1260
  W,
1261
1261
  {
@@ -1284,7 +1284,7 @@ const en = (A, t) => A.reduce((i, n) => (i[n.guid] = t?.includes(n.guid), i), {}
1284
1284
  }
1285
1285
  }
1286
1286
  ),
1287
- label: j
1287
+ label: D
1288
1288
  }
1289
1289
  )
1290
1290
  },
@@ -1402,10 +1402,10 @@ const ac = (A, t) => {
1402
1402
  onAccountClick: (H) => {
1403
1403
  l({ ...E, [H.guid]: !E[H.guid] });
1404
1404
  },
1405
- onAccountGroupClick: (H, b, g) => {
1405
+ onAccountGroupClick: (H, b, X) => {
1406
1406
  const y = { ...E };
1407
1407
  b[H].forEach((x) => {
1408
- y[x.guid] = !g;
1408
+ y[x.guid] = !X;
1409
1409
  }), l(y);
1410
1410
  },
1411
1411
  onCancelClick: () => {
@@ -1546,7 +1546,7 @@ const ac = (A, t) => {
1546
1546
  width: E,
1547
1547
  xAxisLabel: l = ""
1548
1548
  }) => {
1549
- const v = KA(), u = dc(v, E), H = d / a * c, b = Math.abs(d) / a * i, g = I === void 0 || I === r ? "primary" : "secondary";
1549
+ const v = KA(), u = dc(v, E), H = d / a * c, b = Math.abs(d) / a * i, X = I === void 0 || I === r ? "primary" : "secondary";
1550
1550
  return /* @__PURE__ */ s("div", { className: `mx-cmn-barchart-bar-column ${u}`, children: [
1551
1551
  /* @__PURE__ */ e("div", { style: { height: c }, children: d >= 0 && /* @__PURE__ */ e(
1552
1552
  Dr,
@@ -1580,7 +1580,7 @@ const ac = (A, t) => {
1580
1580
  {
1581
1581
  className: `mx-cmn-bar-label ${o ? "mx-cmn-clickable" : ""}`,
1582
1582
  onClick: o ? () => o(r) : void 0,
1583
- children: /* @__PURE__ */ e(R, { bold: I === r, color: g, variant: "Small", children: l })
1583
+ children: /* @__PURE__ */ e(R, { bold: I === r, color: X, variant: "Small", children: l })
1584
1584
  }
1585
1585
  )
1586
1586
  ] });
@@ -1624,10 +1624,10 @@ const ac = (A, t) => {
1624
1624
  selectedIndex: c,
1625
1625
  valueFormatter: d = (f) => `${f}`
1626
1626
  }) => {
1627
- const f = KA(), E = Rc(f), l = n.reduce(lc, []), v = A !== void 0 ? A : l.reduce(Ec, 0) / l.length, u = Math.max(...l), H = Math.min(...l), b = l.reduce(hc, 0), g = u >= 0, y = H < 0, x = mr(g, y, r), w = mr(y, g, r), j = vc(v, u, H, x || w), D = (O) => c === void 0 || O === c ? i : `${i}80`, m = () => /* @__PURE__ */ e(
1627
+ const f = KA(), E = Rc(f), l = n.reduce(lc, []), v = A !== void 0 ? A : l.reduce(Ec, 0) / l.length, u = Math.max(...l), H = Math.min(...l), b = l.reduce(hc, 0), X = u >= 0, y = H < 0, x = mr(X, y, r), w = mr(y, X, r), D = vc(v, u, H, x || w), j = (O) => c === void 0 || O === c ? i : `${i}80`, m = () => /* @__PURE__ */ e(
1628
1628
  jr,
1629
1629
  {
1630
- averageLineHeight: j,
1630
+ averageLineHeight: D,
1631
1631
  bottomHeight: w,
1632
1632
  color: "",
1633
1633
  range: b,
@@ -1639,15 +1639,15 @@ const ac = (A, t) => {
1639
1639
  return /* @__PURE__ */ s("div", { className: `mx-cmn-bar-chart ${E}`, children: [
1640
1640
  /* @__PURE__ */ s("div", { className: "mx-cmn-chart-container", children: [
1641
1641
  /* @__PURE__ */ e(m, {}),
1642
- n.map((O, N) => /* @__PURE__ */ s(h.Fragment, { children: [
1642
+ n.map((O, G) => /* @__PURE__ */ s(h.Fragment, { children: [
1643
1643
  /* @__PURE__ */ e(
1644
1644
  jr,
1645
1645
  {
1646
1646
  ariaLabel: O.ariaLabel,
1647
- averageLineHeight: j,
1647
+ averageLineHeight: D,
1648
1648
  bottomHeight: w,
1649
- color: D(N),
1650
- index: N,
1649
+ color: j(G),
1650
+ index: G,
1651
1651
  onClick: I,
1652
1652
  range: b,
1653
1653
  selectedIndex: c,
@@ -1659,7 +1659,7 @@ const ac = (A, t) => {
1659
1659
  }
1660
1660
  ),
1661
1661
  /* @__PURE__ */ e(m, {})
1662
- ] }, `column-${N}`))
1662
+ ] }, `column-${G}`))
1663
1663
  ] }),
1664
1664
  /* @__PURE__ */ e(sc, { color: i, labelAverage: o, labelMain: a })
1665
1665
  ] });
@@ -1791,11 +1791,11 @@ const Cc = ({
1791
1791
  E(t), v(i), t && d(t);
1792
1792
  }, [t, i]);
1793
1793
  const u = h.useMemo(() => {
1794
- const x = PI({ start: QA(c), end: BA(c) }), w = [];
1795
- for (let j = 0; j < x.length; j++) {
1796
- const D = x[j], m = uI({ start: D, end: We(D, 6) }), O = [];
1797
- for (let N = 0; N < m.length; N++)
1798
- O.push(m[N]);
1794
+ const x = PI({ start: qA(c), end: BA(c) }), w = [];
1795
+ for (let D = 0; D < x.length; D++) {
1796
+ const j = x[D], m = uI({ start: j, end: We(j, 6) }), O = [];
1797
+ for (let G = 0; G < m.length; G++)
1798
+ O.push(m[G]);
1799
1799
  w.push(O);
1800
1800
  }
1801
1801
  return w;
@@ -1810,7 +1810,7 @@ const Cc = ({
1810
1810
  }, b = () => {
1811
1811
  const x = fA();
1812
1812
  d(x), o !== "None" && (E(x), o === "Single" ? n?.(x) : (v(x), r?.(x, x)));
1813
- }, g = () => {
1813
+ }, X = () => {
1814
1814
  d(Re(c, 1));
1815
1815
  }, y = () => {
1816
1816
  d(Ne(c, 1));
@@ -1821,21 +1821,21 @@ const Cc = ({
1821
1821
  {
1822
1822
  copy: A,
1823
1823
  date: c,
1824
- onNextClick: g,
1824
+ onNextClick: X,
1825
1825
  onPreviousClick: y
1826
1826
  }
1827
1827
  ),
1828
1828
  /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-header-row", children: u[0].map((x, w) => /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-header-cell", children: /* @__PURE__ */ e(R, { bold: !0, variant: "Small", children: le(x, "EEEEE") }) }, w)) }),
1829
- u.map((x, w) => /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-week", children: x.map((j, D) => /* @__PURE__ */ e(
1829
+ u.map((x, w) => /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-week", children: x.map((D, j) => /* @__PURE__ */ e(
1830
1830
  bc,
1831
1831
  {
1832
1832
  beginDate: f,
1833
- date: j,
1833
+ date: D,
1834
1834
  endDate: l,
1835
- isInMonth: bI(j, c),
1835
+ isInMonth: bI(D, c),
1836
1836
  onClick: H
1837
1837
  },
1838
- D
1838
+ j
1839
1839
  )) }, `w-${w}`)),
1840
1840
  /* @__PURE__ */ e("div", { className: "mx-cmn-calendar-today-container", children: /* @__PURE__ */ e($, { onClick: b, size: "small", variant: "text", children: A.today }) })
1841
1841
  ] }) });
@@ -1934,7 +1934,7 @@ const Cc = ({
1934
1934
  style: { fontSize: t.typography.Small?.fontSize },
1935
1935
  x: r - 5,
1936
1936
  y: o - 15,
1937
- children: M(A.yData[A.dataIndex], "0,0")
1937
+ children: N(A.yData[A.dataIndex], "0,0")
1938
1938
  }
1939
1939
  ),
1940
1940
  /* @__PURE__ */ e(
@@ -2007,7 +2007,7 @@ const Cc = ({
2007
2007
  /* @__PURE__ */ s(R, { variant: "Small", children: [
2008
2008
  n.average,
2009
2009
  " ",
2010
- /* @__PURE__ */ e(R, { bold: !0, variant: "Small", children: M(t, "0,0") })
2010
+ /* @__PURE__ */ e(R, { bold: !0, variant: "Small", children: N(t, "0,0") })
2011
2011
  ] })
2012
2012
  ] })
2013
2013
  ] });
@@ -2028,16 +2028,16 @@ const Cc = ({
2028
2028
  valueFormatterString: v = "0,0",
2029
2029
  width: u
2030
2030
  }) => {
2031
- const H = oe(), b = i.flat().map((D) => D.x), g = i.flat().map((D) => D.y), y = Math.round(g.reduce((D, m) => m + D, 0) / g.length), x = Math.floor(Math.min(...g) / 100) * 100, w = Math.ceil(Math.max(...g) / 100) * 100, j = i.map((D, m) => ({
2031
+ const H = oe(), b = i.flat().map((j) => j.x), X = i.flat().map((j) => j.y), y = Math.round(X.reduce((j, m) => m + j, 0) / X.length), x = Math.floor(Math.min(...X) / 100) * 100, w = Math.ceil(Math.max(...X) / 100) * 100, D = i.map((j, m) => ({
2032
2032
  type: c ? "bar" : "line",
2033
2033
  curve: "linear",
2034
2034
  color: c ? H.palette.chart?.chart6 : t[m] ?? H.palette.primary.main,
2035
- data: D.map((O) => O.y),
2035
+ data: j.map((O) => O.y),
2036
2036
  area: d,
2037
2037
  baseline: A,
2038
2038
  showMark: !0,
2039
2039
  label: r[m],
2040
- valueFormatter: (O) => M(O || 0, v)
2040
+ valueFormatter: (O) => N(O || 0, v)
2041
2041
  }));
2042
2042
  return /* @__PURE__ */ s("div", { style: { position: "relative" }, children: [
2043
2043
  /* @__PURE__ */ s(
@@ -2045,7 +2045,7 @@ const Cc = ({
2045
2045
  {
2046
2046
  height: n,
2047
2047
  margin: o,
2048
- series: j,
2048
+ series: D,
2049
2049
  sx: {
2050
2050
  p: 4,
2051
2051
  "& .MuiBarLabel-root": {
@@ -2068,7 +2068,7 @@ const Cc = ({
2068
2068
  max: w,
2069
2069
  color: [H.palette.background.paper, t[0] ?? H.palette.primary.main]
2070
2070
  } : void 0,
2071
- valueFormatter: (D) => M(D, v)
2071
+ valueFormatter: (j) => N(j, v)
2072
2072
  }
2073
2073
  ],
2074
2074
  children: [
@@ -2076,8 +2076,8 @@ const Cc = ({
2076
2076
  /* @__PURE__ */ e(
2077
2077
  DI,
2078
2078
  {
2079
- slots: d && j.length < 2 ? {
2080
- line: (D) => /* @__PURE__ */ e(Dc, { ...D, lineColor: t[0] ?? H.palette.primary.main })
2079
+ slots: d && D.length < 2 ? {
2080
+ line: (j) => /* @__PURE__ */ e(Dc, { ...j, lineColor: t[0] ?? H.palette.primary.main })
2081
2081
  } : void 0
2082
2082
  }
2083
2083
  ),
@@ -2085,14 +2085,14 @@ const Cc = ({
2085
2085
  jI,
2086
2086
  {
2087
2087
  slots: l ? {
2088
- mark: (D) => /* @__PURE__ */ e(
2088
+ mark: (j) => /* @__PURE__ */ e(
2089
2089
  xc,
2090
2090
  {
2091
2091
  handlers: a,
2092
2092
  showLabel: E,
2093
- style: I?.(D.dataIndex) ?? {},
2094
- yData: g,
2095
- ...D
2093
+ style: I?.(j.dataIndex) ?? {},
2094
+ yData: X,
2095
+ ...j
2096
2096
  }
2097
2097
  )
2098
2098
  } : void 0
@@ -2101,7 +2101,7 @@ const Cc = ({
2101
2101
  /* @__PURE__ */ e(
2102
2102
  mI,
2103
2103
  {
2104
- barLabel: (D) => Number(D.value) > 0 ? `$${D.value}` : null,
2104
+ barLabel: (j) => Number(j.value) > 0 ? `$${j.value}` : null,
2105
2105
  borderRadius: 10
2106
2106
  }
2107
2107
  ),
@@ -2138,7 +2138,7 @@ const Cc = ({
2138
2138
  mc,
2139
2139
  {
2140
2140
  average: y,
2141
- series: j,
2141
+ series: D,
2142
2142
  style: { position: "absolute", top: 16, left: 16 }
2143
2143
  }
2144
2144
  )
@@ -2174,13 +2174,13 @@ const Cc = ({
2174
2174
  if (!t)
2175
2175
  throw new Error(`${A}() must be used within the GlobalDataContext`);
2176
2176
  return t;
2177
- }, CA = () => UA("useAccountStore").globalStore.accountStore, ra = () => UA("useAppConfig").globalStore.appDataStore.appConfig, te = () => UA("useBudgetsStore").globalStore.budgetsStore, Tn = () => UA("useCashflowStore").globalStore.cashflowStore, qA = () => UA("useCategoryStore").globalStore.categoryStore, oa = () => UA("useConnectStore").globalStore.connectStore, Ti = () => UA("useDebtsStore").globalStore.debtsStore, oi = () => UA("useGlobalStore").globalStore, wA = () => UA("useGlobalUiStore").globalStore.globalUiStore, p = () => UA("globalCopyStore").globalStore.copyStore.copy, FA = () => UA("useGoalStore").globalStore.goalStore, Yn = () => UA("useHelpStore").globalStore.helpStore, Oc = () => UA("useMerchantStore").globalStore.merchantStore, Lc = () => UA("useNetWorthStore").globalStore.netWorthStore, aa = () => UA("useNotificationStore").globalStore.notificationStore, ZA = () => UA("useRecurringActivityStore").globalStore.recurringActivityStore, ge = () => UA("useSettingsStore").globalStore.settingsStore, PA = () => UA("useTransactionStore").globalStore.transactionStore, Ue = () => UA("useUserStore").globalStore.userStore, K = () => ({ onEvent: UA().onEvent }), uP = () => ({ onPageView: UA().onPageView }), Qc = (A = "useWidgetContainerContext") => {
2177
+ }, CA = () => UA("useAccountStore").globalStore.accountStore, ra = () => UA("useAppConfig").globalStore.appDataStore.appConfig, te = () => UA("useBudgetsStore").globalStore.budgetsStore, Tn = () => UA("useCashflowStore").globalStore.cashflowStore, LA = () => UA("useCategoryStore").globalStore.categoryStore, oa = () => UA("useConnectStore").globalStore.connectStore, Ti = () => UA("useDebtsStore").globalStore.debtsStore, oi = () => UA("useGlobalStore").globalStore, wA = () => UA("useGlobalUiStore").globalStore.globalUiStore, p = () => UA("globalCopyStore").globalStore.copyStore.copy, FA = () => UA("useGoalStore").globalStore.goalStore, Yn = () => UA("useHelpStore").globalStore.helpStore, Oc = () => UA("useMerchantStore").globalStore.merchantStore, Lc = () => UA("useNetWorthStore").globalStore.netWorthStore, aa = () => UA("useNotificationStore").globalStore.notificationStore, ZA = () => UA("useRecurringActivityStore").globalStore.recurringActivityStore, ge = () => UA("useSettingsStore").globalStore.settingsStore, PA = () => UA("useTransactionStore").globalStore.transactionStore, Ue = () => UA("useUserStore").globalStore.userStore, K = () => ({ onEvent: UA().onEvent }), uP = () => ({ onPageView: UA().onPageView }), Qc = (A = "useWidgetContainerContext") => {
2178
2178
  const t = h.useContext(ia);
2179
2179
  if (!t)
2180
2180
  throw new Error(`${A}() must be used within the WidgetContainerContext`);
2181
2181
  return t;
2182
2182
  }, Xt = () => Qc(), Ia = ({ categoryGuid: A, topLevelCategoryGuid: t }) => {
2183
- const { categories: i } = p(), { getCategoryName: n } = qA(), r = n(A);
2183
+ const { categories: i } = p(), { getCategoryName: n } = LA(), r = n(A);
2184
2184
  return /* @__PURE__ */ s(P, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
2185
2185
  /* @__PURE__ */ e(
2186
2186
  L,
@@ -2205,7 +2205,7 @@ const Cc = ({
2205
2205
  ...c
2206
2206
  }) => /* @__PURE__ */ s(R, { bold: i, color: n || (A ? "success.main" : "text.primary"), sx: o, variant: I, ...c, children: [
2207
2207
  a && a,
2208
- M(Number(t), r ?? "0,0.00")
2208
+ N(Number(t), r ?? "0,0.00")
2209
2209
  ] }), qc = ({
2210
2210
  categoryGuids: { guid: A, topLevelGuid: t },
2211
2211
  hoveredAreaData: i,
@@ -2240,9 +2240,9 @@ const Cc = ({
2240
2240
  /* @__PURE__ */ e(R, { variant: "Small", children: `${i.length}-month total` }),
2241
2241
  /* @__PURE__ */ e(OA, { amount: d, bold: !0, formatString: "0,0", variant: "body2" })
2242
2242
  ] }),
2243
- /* @__PURE__ */ e(G, { sx: { my: 16, width: "100%" } }),
2243
+ /* @__PURE__ */ e(M, { sx: { my: 16, width: "100%" } }),
2244
2244
  /* @__PURE__ */ e(YA, { container: !0, children: i.map((f, E) => /* @__PURE__ */ s(h.Fragment, { children: [
2245
- E > 0 && E % 3 === 0 && /* @__PURE__ */ e(G, { sx: { my: 16, width: "100%" } }),
2245
+ E > 0 && E % 3 === 0 && /* @__PURE__ */ e(M, { sx: { my: 16, width: "100%" } }),
2246
2246
  /* @__PURE__ */ e(YA, { item: !0, xs: 4, children: /* @__PURE__ */ s(L, { alignItems: "center", display: "flex", flexDirection: "column", children: [
2247
2247
  /* @__PURE__ */ e(R, { color: o.palette.text.secondary, variant: "XSmall", children: f.x }),
2248
2248
  /* @__PURE__ */ e(
@@ -2278,7 +2278,7 @@ const Cc = ({
2278
2278
  onHoverLegend: n,
2279
2279
  onClickLegend: r
2280
2280
  }) => {
2281
- const { isMobile: o } = zA(), { getCategoryName: a } = qA();
2281
+ const { isMobile: o } = zA(), { getCategoryName: a } = LA();
2282
2282
  return /* @__PURE__ */ e(P, { direction: "row", flexWrap: "wrap", gap: o ? 2 : 6, justifyContent: "start", sx: A, children: t.map(({ guid: I, top_level_guid: c }) => {
2283
2283
  const d = i === I, f = ct[I], E = ct[c], l = f ?? E ?? ct.default, v = l + "33";
2284
2284
  return /* @__PURE__ */ s(
@@ -2332,9 +2332,9 @@ const Cc = ({
2332
2332
  hoveredAreaData: null,
2333
2333
  isAreaHovered: !1,
2334
2334
  cursorPos: { x: 0, y: 0 }
2335
- }), { hoveredSeriesId: H, hoveredAreaData: b, isAreaHovered: g, cursorPos: y } = v, x = g && H && b, w = !x, j = [...r, ...o], D = j[0]?.dataset.length ?? 0, m = j.flatMap((_) => _.dataset.map((yA) => yA.x)), O = j.flatMap((_) => _.dataset.map((yA) => yA.y)), N = r[0]?.dataset?.map(
2335
+ }), { hoveredSeriesId: H, hoveredAreaData: b, isAreaHovered: X, cursorPos: y } = v, x = X && H && b, w = !x, D = [...r, ...o], j = D[0]?.dataset.length ?? 0, m = D.flatMap((_) => _.dataset.map((yA) => yA.x)), O = D.flatMap((_) => _.dataset.map((yA) => yA.y)), G = r[0]?.dataset?.map(
2336
2336
  (_, yA) => r.reduce((VA, Ze) => VA + Ze.dataset[yA]?.y || 0, 0)
2337
- ) ?? [0], tA = Math.max(...N), Y = Math.max(
2337
+ ) ?? [0], tA = Math.max(...G), Y = Math.max(
2338
2338
  ...o.flatMap((_) => _.dataset.map((yA) => yA.y))
2339
2339
  ), AA = Math.floor(Math.min(...O) / 100) * 100, rA = Math.ceil(Math.max(tA, Y) / 100) * 100, sA = r.map((_, yA) => ({
2340
2340
  id: `stacked-${yA}`,
@@ -2347,7 +2347,7 @@ const Cc = ({
2347
2347
  stack: "total",
2348
2348
  type: "line",
2349
2349
  highlightScope: { highlight: "item" },
2350
- valueFormatter: (VA) => M(VA, "0,0")
2350
+ valueFormatter: (VA) => N(VA, "0,0")
2351
2351
  })), hA = o.map((_, yA) => ({
2352
2352
  id: `unstacked-${yA}`,
2353
2353
  guid: _.category_guid,
@@ -2357,7 +2357,7 @@ const Cc = ({
2357
2357
  data: _.dataset.map((VA) => VA.y),
2358
2358
  label: _.category_name,
2359
2359
  type: "line",
2360
- valueFormatter: (VA) => M(VA, "0,0")
2360
+ valueFormatter: (VA) => N(VA, "0,0")
2361
2361
  })), Z = [...sA, ...hA], gA = [
2362
2362
  ...sA.map(({ guid: _, top_level_guid: yA }) => ({
2363
2363
  guid: _,
@@ -2480,7 +2480,7 @@ const Cc = ({
2480
2480
  data: m,
2481
2481
  scaleType: "time",
2482
2482
  valueFormatter: (_) => oA(_, iA.MONTH_SHORT_YEAR),
2483
- tickNumber: D
2483
+ tickNumber: j
2484
2484
  // How many ticks to show on the x-axis
2485
2485
  }
2486
2486
  ],
@@ -2707,12 +2707,12 @@ const Cc = ({
2707
2707
  calendarActions: A,
2708
2708
  color: t = "primary",
2709
2709
  copy: i,
2710
- range: n = [QA(fA()), BA(zt())],
2710
+ range: n = [qA(fA()), BA(zt())],
2711
2711
  shouldShrinkToIcon: r = !0,
2712
2712
  toolTipContent: o = "",
2713
2713
  variant: a = "outlined"
2714
2714
  }) => {
2715
- const I = uA(), c = I.palette.mode === "dark", { isMobile: d } = zA(), [f, E] = h.useState(n), [l, v] = h.useState(i.dateRangePickerCopy.dateRangeThisMonth), [u, H] = h.useState(f), [b, g] = h.useState(!1), [y, x] = h.useState(!0), [w, j] = h.useState(6), D = {
2715
+ const I = uA(), c = I.palette.mode === "dark", { isMobile: d } = zA(), [f, E] = h.useState(n), [l, v] = h.useState(i.dateRangePickerCopy.dateRangeThisMonth), [u, H] = h.useState(f), [b, X] = h.useState(!1), [y, x] = h.useState(!0), [w, D] = h.useState(6), j = {
2716
2716
  buttons: [
2717
2717
  { label: "3M", value: 3 },
2718
2718
  { label: "6M", value: 6 },
@@ -2745,12 +2745,12 @@ const Cc = ({
2745
2745
  AA[0] = Y === "previous" ? Ve(rA, Z) : We(rA, Z), AA[1] = Y === "previous" ? Ve(sA, Z) : We(sA, Z);
2746
2746
  }
2747
2747
  E(AA), A.onRangeChanged(AA);
2748
- }, N = () => {
2748
+ }, G = () => {
2749
2749
  E(u), x(
2750
2750
  l === i.dateRangePickerCopy.dateRangeThisMonth || l === i.dateRangePickerCopy.dateRangeLastMonth
2751
2751
  ), A.onRangeChanged(u);
2752
2752
  }, tA = (Y) => {
2753
- j(Y);
2753
+ D(Y);
2754
2754
  };
2755
2755
  return /* @__PURE__ */ s(L, { className: "mx-cmn-date-range-selector", m: 4, children: [
2756
2756
  /* @__PURE__ */ e(
@@ -2765,7 +2765,7 @@ const Cc = ({
2765
2765
  {
2766
2766
  "aria-describedby": "select-date",
2767
2767
  "aria-label": "Select a date",
2768
- onClick: () => g(!0),
2768
+ onClick: () => X(!0),
2769
2769
  children: /* @__PURE__ */ e(q, { name: "calendar_month" })
2770
2770
  }
2771
2771
  )
@@ -2818,7 +2818,7 @@ const Cc = ({
2818
2818
  {
2819
2819
  "aria-disabled": A.shouldDisablePicker,
2820
2820
  color: t,
2821
- onClick: () => A.shouldDisablePicker ? null : g(!0),
2821
+ onClick: () => A.shouldDisablePicker ? null : X(!0),
2822
2822
  startIcon: /* @__PURE__ */ e(q, { name: "calendar_month", size: 20 }),
2823
2823
  sx: {
2824
2824
  p: d ? 0 : 8
@@ -2851,7 +2851,7 @@ const Cc = ({
2851
2851
  exclusive: !0,
2852
2852
  orientation: "horizontal",
2853
2853
  value: w,
2854
- children: D.buttons.map((Y) => /* @__PURE__ */ e(
2854
+ children: j.buttons.map((Y) => /* @__PURE__ */ e(
2855
2855
  Xn,
2856
2856
  {
2857
2857
  onClick: () => tA(Y.value),
@@ -2893,7 +2893,7 @@ const Cc = ({
2893
2893
  textColor: "primary",
2894
2894
  value: w,
2895
2895
  variant: "fullWidth",
2896
- children: D.tabs.map((Y) => /* @__PURE__ */ e(
2896
+ children: j.tabs.map((Y) => /* @__PURE__ */ e(
2897
2897
  GA,
2898
2898
  {
2899
2899
  label: /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: Y.label }),
@@ -2912,9 +2912,9 @@ const Cc = ({
2912
2912
  {
2913
2913
  ariaLabelClose: i.dateRangeCloseAria,
2914
2914
  isOpen: b,
2915
- onClose: () => g(!1),
2915
+ onClose: () => X(!1),
2916
2916
  onPrimaryAction: () => {
2917
- N(), g(!1);
2917
+ G(), X(!1);
2918
2918
  },
2919
2919
  primaryText: i.dateRangeEditApply,
2920
2920
  title: i.dateRangeEditTitle,
@@ -2937,8 +2937,8 @@ const Cc = ({
2937
2937
  {
2938
2938
  copy: { title: i.dateRangeEditTitle },
2939
2939
  isOpen: !0,
2940
- onClose: () => g(!1),
2941
- onPrimaryAction: () => N(),
2940
+ onClose: () => X(!1),
2941
+ onPrimaryAction: () => G(),
2942
2942
  primaryText: i.dateRangeEditApply,
2943
2943
  sx: {
2944
2944
  "& .MuiDialogContent-root": {
@@ -3153,7 +3153,7 @@ const pt = ({
3153
3153
  sx: E = {},
3154
3154
  title: l = ""
3155
3155
  }) => {
3156
- const [v, { height: u, width: H }] = ca(), { onEvent: b } = K(), { isDesktop: g, isLargeDesktop: y, isMobile: x, isTablet: w } = zA(), { displayedDateRange: j, selectedAccountGuids: D, setSelectedAccountGuids: m } = wA(), { common: O } = p(), N = () => {
3156
+ const [v, { height: u, width: H }] = ca(), { onEvent: b } = K(), { isDesktop: X, isLargeDesktop: y, isMobile: x, isTablet: w } = zA(), { displayedDateRange: D, selectedAccountGuids: j, setSelectedAccountGuids: m } = wA(), { common: O } = p(), G = () => {
3157
3157
  c && (c(), b(V.WIDGET_BACK_CLICK));
3158
3158
  }, tA = {
3159
3159
  accountFilterOptionsCopy: {
@@ -3187,7 +3187,7 @@ const pt = ({
3187
3187
  dateRangeEditTitle: O.date_range_picker.edit_title,
3188
3188
  dateRangeNextAria: O.date_range_picker.next_aria,
3189
3189
  dateRangePreviousAria: O.date_range_picker.previous_aria
3190
- }, AA = r ? r.start : j.start, rA = r ? r.end : j.end, sA = t?.length > 1;
3190
+ }, AA = r ? r.start : D.start, rA = r ? r.end : D.end, sA = t?.length > 1;
3191
3191
  return /* @__PURE__ */ s(
3192
3192
  ze,
3193
3193
  {
@@ -3209,7 +3209,7 @@ const pt = ({
3209
3209
  ot,
3210
3210
  {
3211
3211
  action: /* @__PURE__ */ s(P, { alignItems: "center", flexDirection: "row", children: [
3212
- g && i && /* @__PURE__ */ e(L, { sx: { flexGrow: 1 }, children: /* @__PURE__ */ e(
3212
+ X && i && /* @__PURE__ */ e(L, { sx: { flexGrow: 1 }, children: /* @__PURE__ */ e(
3213
3213
  Or,
3214
3214
  {
3215
3215
  calendarActions: i,
@@ -3227,7 +3227,7 @@ const pt = ({
3227
3227
  onFilterClick: (hA) => {
3228
3228
  m(hA), d?.();
3229
3229
  },
3230
- selectedAccountGuids: D,
3230
+ selectedAccountGuids: j,
3231
3231
  showAccountNumbers: !1,
3232
3232
  variant: "text"
3233
3233
  }
@@ -3244,7 +3244,7 @@ const pt = ({
3244
3244
  children: WA
3245
3245
  },
3246
3246
  Z
3247
- ) : /* @__PURE__ */ e(NA, { "aria-label": WA, onClick: gA, children: /* @__PURE__ */ e(q, { name: Z }) }, Z) : g || w ? /* @__PURE__ */ e(
3247
+ ) : /* @__PURE__ */ e(NA, { "aria-label": WA, onClick: gA, children: /* @__PURE__ */ e(q, { name: Z }) }, Z) : X || w ? /* @__PURE__ */ e(
3248
3248
  $,
3249
3249
  {
3250
3250
  onClick: gA,
@@ -3258,20 +3258,20 @@ const pt = ({
3258
3258
  ] }),
3259
3259
  sx: {
3260
3260
  "& .MuiCardHeader-action": {
3261
- ...i && g && { flexGrow: 1 },
3261
+ ...i && X && { flexGrow: 1 },
3262
3262
  ...(x || w) && {
3263
3263
  alignSelf: "center"
3264
3264
  }
3265
3265
  },
3266
- p: g ? 48 : 24,
3266
+ p: X ? 48 : 24,
3267
3267
  pb: 0
3268
3268
  },
3269
- title: g || w ? /* @__PURE__ */ e(nt, { children: l }) : /* @__PURE__ */ s(P, { alignItems: "center", flexDirection: "row", children: [
3269
+ title: X || w ? /* @__PURE__ */ e(nt, { children: l }) : /* @__PURE__ */ s(P, { alignItems: "center", flexDirection: "row", children: [
3270
3270
  x && c && /* @__PURE__ */ e(
3271
3271
  NA,
3272
3272
  {
3273
3273
  "aria-label": O.back_to_dashboard,
3274
- onClick: N,
3274
+ onClick: G,
3275
3275
  sx: { ml: -16, mr: 16 },
3276
3276
  children: /* @__PURE__ */ e(q, { name: "arrow_back" })
3277
3277
  }
@@ -3280,9 +3280,9 @@ const pt = ({
3280
3280
  ] })
3281
3281
  }
3282
3282
  ),
3283
- I && /* @__PURE__ */ e(G, { sx: { mt: g ? 48 : 24 } }),
3283
+ I && /* @__PURE__ */ e(M, { sx: { mt: X ? 48 : 24 } }),
3284
3284
  i && (x || w) && /* @__PURE__ */ s(P, { gap: 24, justifyContent: "center", sx: { mt: 16 }, children: [
3285
- f && /* @__PURE__ */ e(G, {}),
3285
+ f && /* @__PURE__ */ e(M, {}),
3286
3286
  /* @__PURE__ */ e(
3287
3287
  Or,
3288
3288
  {
@@ -3383,20 +3383,20 @@ const Lr = "connect_widget", Qr = "connections_widget", Fc = ({
3383
3383
  setHasValidInput: f,
3384
3384
  ...E
3385
3385
  }) => {
3386
- const [l, v] = h.useState(""), { common: u } = p(), H = r || u.currency_input, b = KA(), g = Wc(b), y = /^[0-9]*$/, x = /^(\d)*(\,)?([0-9]{1,2})?$/, w = /^(\d)*(\.)?([0-9]{1,2})?$/;
3387
- let j;
3388
- const D = h.useRef(FI());
3386
+ const [l, v] = h.useState(""), { common: u } = p(), H = r || u.currency_input, b = KA(), X = Wc(b), y = /^[0-9]*$/, x = /^(\d)*(\,)?([0-9]{1,2})?$/, w = /^(\d)*(\.)?([0-9]{1,2})?$/;
3387
+ let D;
3388
+ const j = h.useRef(FI());
3389
3389
  if (A)
3390
3390
  switch (_s()) {
3391
3391
  case Pi.CAD:
3392
- j = x;
3392
+ D = x;
3393
3393
  break;
3394
3394
  default:
3395
- j = w;
3395
+ D = w;
3396
3396
  break;
3397
3397
  }
3398
3398
  else
3399
- j = y;
3399
+ D = y;
3400
3400
  h.useEffect(() => {
3401
3401
  m(i);
3402
3402
  }, [i]);
@@ -3404,14 +3404,14 @@ const Lr = "connect_widget", Qr = "connections_widget", Fc = ({
3404
3404
  !n && (O === "" || O === "." || O === ",") ? (v(""), f?.(!1)) : Number(O) < c ? (v(
3405
3405
  z(
3406
3406
  H.error_amount_must_be_equal_to,
3407
- M(c, "0")
3407
+ N(c, "0")
3408
3408
  )
3409
3409
  ), f?.(!1)) : Number(O) > zr ? (v(
3410
3410
  z(
3411
3411
  H.error_amount_must_be_less_than_or_equal_to,
3412
- M(zr, A ? "0,0.00" : "0,0", Math.floor)
3412
+ N(zr, A ? "0,0.00" : "0,0", Math.floor)
3413
3413
  )
3414
- ), f?.(!1)) : O.toString().match(j) ? o() ? (v(""), f?.(!0)) : (v(a), f?.(!1)) : (v(H.error_amount_is_invalid), f?.(!1)), d(O.toString());
3414
+ ), f?.(!1)) : O.toString().match(D) ? o() ? (v(""), f?.(!0)) : (v(a), f?.(!1)) : (v(H.error_amount_is_invalid), f?.(!1)), d(O.toString());
3415
3415
  };
3416
3416
  return /* @__PURE__ */ e(
3417
3417
  Et,
@@ -3421,7 +3421,7 @@ const Lr = "connect_widget", Qr = "connections_widget", Fc = ({
3421
3421
  startAdornment: ht().includes("fr-ca") ? void 0 : /* @__PURE__ */ e(HA, { children: "$" })
3422
3422
  },
3423
3423
  "aria-label": t || H.enter_amount,
3424
- className: `mx-cmn-currency-input ${g}`,
3424
+ className: `mx-cmn-currency-input ${X}`,
3425
3425
  error: !!l,
3426
3426
  helperText: l,
3427
3427
  inputMode: A ? "decimal" : "numeric",
@@ -3430,7 +3430,7 @@ const Lr = "connect_widget", Qr = "connections_widget", Fc = ({
3430
3430
  pattern: "[0-9]*"
3431
3431
  },
3432
3432
  label: I,
3433
- name: `currency-input-${D.current}`,
3433
+ name: `currency-input-${j.current}`,
3434
3434
  onChange: (O) => m(O.target.value),
3435
3435
  value: i,
3436
3436
  ...E
@@ -4030,7 +4030,7 @@ const Nr = (A, t) => !A && !t ? 0 : !A && t ? 101 : t / A * 100, Tr = (A, t) =>
4030
4030
  category: a,
4031
4031
  description: z(
4032
4032
  d < 0 ? i.budget_remaining_over : i.budget_remaining_left,
4033
- M(Math.abs(d), "0,0")
4033
+ N(Math.abs(d), "0,0")
4034
4034
  ),
4035
4035
  percentage: c,
4036
4036
  subBudgets: [],
@@ -4049,7 +4049,7 @@ const Nr = (A, t) => !A && !t ? 0 : !A && t ? 101 : t / A * 100, Tr = (A, t) =>
4049
4049
  category: a,
4050
4050
  description: z(
4051
4051
  d < 0 ? i.budget_remaining_over : i.budget_remaining_left,
4052
- M(Math.abs(d), "0,0")
4052
+ N(Math.abs(d), "0,0")
4053
4053
  ),
4054
4054
  percentage: f,
4055
4055
  subBudgets: [],
@@ -4067,7 +4067,7 @@ class rf {
4067
4067
  categoryApi = new bi("/", "");
4068
4068
  globalStore;
4069
4069
  alert = "";
4070
- dateRange = { start: QA(fA()), end: BA(fA()) };
4070
+ dateRange = { start: qA(fA()), end: BA(fA()) };
4071
4071
  budgets = [];
4072
4072
  selectedBudget;
4073
4073
  selectedSubBudget;
@@ -4095,7 +4095,7 @@ class rf {
4095
4095
  get detailedBudgets() {
4096
4096
  return tf(
4097
4097
  this.budgets.filter(
4098
- (t) => t.category_guid !== X.INCOME && t.category_guid !== X.TRANSFER && t.category_guid !== X.INVESTMENTS
4098
+ (t) => t.category_guid !== g.INCOME && t.category_guid !== g.TRANSFER && t.category_guid !== g.INVESTMENTS
4099
4099
  ),
4100
4100
  this.globalStore.categoryStore.detailedCategories,
4101
4101
  this.globalStore.copyStore.copy.budgets,
@@ -4132,7 +4132,7 @@ class rf {
4132
4132
  };
4133
4133
  generateBudgets = async () => {
4134
4134
  try {
4135
- const t = await this.api.generateBudgets();
4135
+ const t = (await this.api.generateBudgets()).budgets;
4136
4136
  return U(() => {
4137
4137
  this.budgets = t;
4138
4138
  }), this.budgets;
@@ -4221,14 +4221,14 @@ const Tt = () => {
4221
4221
  u && E(u), v(H);
4222
4222
  }, [u, H]);
4223
4223
  const b = h.useMemo(
4224
- () => n.filter((w) => o.includes(w.guid)).reduce((w, j) => w + (j?.balance || 0), 0),
4224
+ () => n.filter((w) => o.includes(w.guid)).reduce((w, D) => w + (D?.balance || 0), 0),
4225
4225
  [o, H]
4226
- ), g = h.useMemo(
4227
- () => d.filter((w) => o.includes(w.accountGuid || "")).reduce((w, j) => w + j.amount, 0),
4226
+ ), X = h.useMemo(
4227
+ () => d.filter((w) => o.includes(w.accountGuid || "")).reduce((w, D) => w + D.amount, 0),
4228
4228
  [o, d]
4229
4229
  ), y = h.useMemo(
4230
- () => b - g,
4231
- [b, g]
4230
+ () => b - X,
4231
+ [b, X]
4232
4232
  ), x = I?.has_completed_cash_flow_onboarding && !!A;
4233
4233
  return /* @__PURE__ */ e(L, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: i > 610 ? /* @__PURE__ */ s(
4234
4234
  P,
@@ -4248,7 +4248,7 @@ const Tt = () => {
4248
4248
  ] }),
4249
4249
  /* @__PURE__ */ e(P, { pt: 18, children: /* @__PURE__ */ e(q, { name: "remove" }) }),
4250
4250
  /* @__PURE__ */ s(P, { pb: 14, pt: 12, children: [
4251
- /* @__PURE__ */ e(OA, { amount: g, variant: "H2" }),
4251
+ /* @__PURE__ */ e(OA, { amount: X, variant: "H2" }),
4252
4252
  /* @__PURE__ */ e(HA, { variant: "XSmall", whiteSpace: "nowrap", children: z(a.expenses_due, d.length) })
4253
4253
  ] }),
4254
4254
  /* @__PURE__ */ e(P, { pt: 18, children: /* @__PURE__ */ e(q, { name: "equals" }) }),
@@ -4281,12 +4281,12 @@ const Tt = () => {
4281
4281
  ) }),
4282
4282
  /* @__PURE__ */ e(OA, { amount: r, bold: !0, variant: "XSmall" })
4283
4283
  ] }),
4284
- /* @__PURE__ */ e(G, {}),
4284
+ /* @__PURE__ */ e(M, {}),
4285
4285
  /* @__PURE__ */ s(P, { direction: "row", justifyContent: "space-between", p: 16, children: [
4286
4286
  /* @__PURE__ */ e(R, { variant: "Small", children: z(a.expenses_due, d.length) }),
4287
- /* @__PURE__ */ e(OA, { amount: g, bold: !0, symbol: "-", variant: "XSmall" })
4287
+ /* @__PURE__ */ e(OA, { amount: X, bold: !0, symbol: "-", variant: "XSmall" })
4288
4288
  ] }),
4289
- /* @__PURE__ */ e(G, {}),
4289
+ /* @__PURE__ */ e(M, {}),
4290
4290
  /* @__PURE__ */ e(
4291
4291
  P,
4292
4292
  {
@@ -4301,7 +4301,7 @@ const Tt = () => {
4301
4301
  children: /* @__PURE__ */ e(Vn, { remaining: y })
4302
4302
  }
4303
4303
  ),
4304
- /* @__PURE__ */ e(G, {}),
4304
+ /* @__PURE__ */ e(M, {}),
4305
4305
  x ? /* @__PURE__ */ s(P, { direction: "row", justifyContent: "space-between", p: 16, children: [
4306
4306
  /* @__PURE__ */ e(R, { variant: "Small", children: a.next_paycheck }),
4307
4307
  /* @__PURE__ */ e(R, { bold: !0, variant: "XSmall", children: z(a.days, c) })
@@ -4516,7 +4516,7 @@ const cf = [
4516
4516
  accountIsClosed: c?.is_closed,
4517
4517
  accountIsHidden: c?.is_hidden,
4518
4518
  category: d?.name || "Uncategorized",
4519
- isIncome: I.top_level_category_guid === X.INCOME,
4519
+ isIncome: I.top_level_category_guid === g.INCOME,
4520
4520
  isPending: I.feed_status === Bn.PENDING,
4521
4521
  number: c?.account_number || "",
4522
4522
  payee: I.description,
@@ -4790,7 +4790,7 @@ const cf = [
4790
4790
  }, vf = (A, t, i) => {
4791
4791
  const {
4792
4792
  accounts: n = [],
4793
- dateRange: r = { start: QA(fA()), end: zt() },
4793
+ dateRange: r = { start: qA(fA()), end: zt() },
4794
4794
  custom: o = () => !0,
4795
4795
  searchTerm: a = ""
4796
4796
  } = A;
@@ -4812,7 +4812,7 @@ const cf = [
4812
4812
  const i = A.toLowerCase().split(" "), n = t?.toString().toLowerCase() ?? "";
4813
4813
  return i.every((r) => n.indexOf(r) > -1);
4814
4814
  };
4815
- var TA = /* @__PURE__ */ ((A) => (A[A.Expense = 0] = "Expense", A[A.Income = 1] = "Income", A))(TA || {}), SA = /* @__PURE__ */ ((A) => (A[A.Paid = 0] = "Paid", A[A.Missed = 1] = "Missed", A[A.Upcoming = 2] = "Upcoming", A))(SA || {}), uf = /* @__PURE__ */ ((A) => (A[A.UNKNOWN = 0] = "UNKNOWN", A[A.CORRECT = 1] = "CORRECT", A[A.INCORRECT = 2] = "INCORRECT", A))(uf || {}), Pf = /* @__PURE__ */ ((A) => (A.Missed = "Missed", A.Paid = "Paid", A.Upcoming = "Upcoming expense", A.Income = "Income", A))(Pf || {}), bf = /* @__PURE__ */ ((A) => (A[A.Unknown = 0] = "Unknown", A[A.Subscription = 1] = "Subscription", A[A.Bill = 2] = "Bill", A))(bf || {}), B = /* @__PURE__ */ ((A) => (A[A.DEBT_TRACK = 1] = "DEBT_TRACK", A[A.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", A[A.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", A[A.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", A))(B || {}), Pn = /* @__PURE__ */ ((A) => (A[A.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", A[A.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", A[A.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", A[A.ACTION = 4] = "ACTION", A))(Pn || {}), he = /* @__PURE__ */ ((A) => (A[A.AUTOMOBILE = 1] = "AUTOMOBILE", A[A.COLLEGE = 2] = "COLLEGE", A[A.HOUSE = 3] = "HOUSE", A[A.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", A[A.VACATION = 5] = "VACATION", A[A.ELECTRONIC = 6] = "ELECTRONIC", A[A.OTHER = 7] = "OTHER", A[A.RETIREMENT = 8] = "RETIREMENT", A[A.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", A[A.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", A[A.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", A[A.CREDIT_CARD = 12] = "CREDIT_CARD", A[A.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", A[A.LOANS = 14] = "LOANS", A))(he || {}), LA = /* @__PURE__ */ ((A) => (A[A.BudgetExceeded = 1] = "BudgetExceeded", A[A.BudgetOffTarget = 2] = "BudgetOffTarget", A[A.DebtPaymentReminder = 3] = "DebtPaymentReminder", A[A.AccountBalanceLow = 6] = "AccountBalanceLow", A[A.AccountDepositLarge = 7] = "AccountDepositLarge", A[A.TransactionExpenseLarge = 8] = "TransactionExpenseLarge", A[A.TransactionFeeCharge = 9] = "TransactionFeeCharge", A[A.InternationalTransaction = 23] = "InternationalTransaction", A))(LA || {}), se = /* @__PURE__ */ ((A) => (A[A.CREDIT = 1] = "CREDIT", A[A.DEBIT = 2] = "DEBIT", A))(se || {}), Bn = /* @__PURE__ */ ((A) => (A[A.POSTED = 1] = "POSTED", A[A.PENDING = 2] = "PENDING", A))(Bn || {}), Hf = /* @__PURE__ */ ((A) => (A.Desktop = "Desktop", A.Mobile = "Mobile", A))(Hf || {});
4815
+ var TA = /* @__PURE__ */ ((A) => (A[A.Expense = 0] = "Expense", A[A.Income = 1] = "Income", A))(TA || {}), SA = /* @__PURE__ */ ((A) => (A[A.Paid = 0] = "Paid", A[A.Missed = 1] = "Missed", A[A.Upcoming = 2] = "Upcoming", A))(SA || {}), uf = /* @__PURE__ */ ((A) => (A[A.UNKNOWN = 0] = "UNKNOWN", A[A.CORRECT = 1] = "CORRECT", A[A.INCORRECT = 2] = "INCORRECT", A))(uf || {}), Pf = /* @__PURE__ */ ((A) => (A.Missed = "Missed", A.Paid = "Paid", A.Upcoming = "Upcoming expense", A.Income = "Income", A))(Pf || {}), bf = /* @__PURE__ */ ((A) => (A[A.Unknown = 0] = "Unknown", A[A.Subscription = 1] = "Subscription", A[A.Bill = 2] = "Bill", A))(bf || {}), B = /* @__PURE__ */ ((A) => (A[A.DEBT_TRACK = 1] = "DEBT_TRACK", A[A.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", A[A.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", A[A.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", A))(B || {}), Pn = /* @__PURE__ */ ((A) => (A[A.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", A[A.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", A[A.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", A[A.ACTION = 4] = "ACTION", A))(Pn || {}), he = /* @__PURE__ */ ((A) => (A[A.AUTOMOBILE = 1] = "AUTOMOBILE", A[A.COLLEGE = 2] = "COLLEGE", A[A.HOUSE = 3] = "HOUSE", A[A.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", A[A.VACATION = 5] = "VACATION", A[A.ELECTRONIC = 6] = "ELECTRONIC", A[A.OTHER = 7] = "OTHER", A[A.RETIREMENT = 8] = "RETIREMENT", A[A.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", A[A.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", A[A.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", A[A.CREDIT_CARD = 12] = "CREDIT_CARD", A[A.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", A[A.LOANS = 14] = "LOANS", A))(he || {}), QA = /* @__PURE__ */ ((A) => (A[A.BudgetExceeded = 1] = "BudgetExceeded", A[A.BudgetOffTarget = 2] = "BudgetOffTarget", A[A.DebtPaymentReminder = 3] = "DebtPaymentReminder", A[A.AccountBalanceLow = 6] = "AccountBalanceLow", A[A.AccountDepositLarge = 7] = "AccountDepositLarge", A[A.TransactionExpenseLarge = 8] = "TransactionExpenseLarge", A[A.TransactionFeeCharge = 9] = "TransactionFeeCharge", A[A.InternationalTransaction = 23] = "InternationalTransaction", A))(QA || {}), se = /* @__PURE__ */ ((A) => (A[A.CREDIT = 1] = "CREDIT", A[A.DEBIT = 2] = "DEBIT", A))(se || {}), Bn = /* @__PURE__ */ ((A) => (A[A.POSTED = 1] = "POSTED", A[A.PENDING = 2] = "PENDING", A))(Bn || {}), Hf = /* @__PURE__ */ ((A) => (A.Desktop = "Desktop", A.Mobile = "Mobile", A))(Hf || {});
4816
4816
  const Ea = {
4817
4817
  account_guid: "",
4818
4818
  amount: 0,
@@ -4843,7 +4843,7 @@ const Ea = {
4843
4843
  tags: []
4844
4844
  };
4845
4845
  let zf = class {
4846
- beginDate = QA(/* @__PURE__ */ new Date());
4846
+ beginDate = qA(/* @__PURE__ */ new Date());
4847
4847
  endDate = BA(/* @__PURE__ */ new Date());
4848
4848
  expandedSplits = [];
4849
4849
  isInitialized = !1;
@@ -4901,7 +4901,7 @@ class Cf {
4901
4901
  }
4902
4902
  initialize = async (t, i) => {
4903
4903
  this.api = new Xi(t, i), this.beatApi = new Lt(t, i), Promise.all([
4904
- this.loadAssociatedBeats(QA(/* @__PURE__ */ new Date())),
4904
+ this.loadAssociatedBeats(qA(/* @__PURE__ */ new Date())),
4905
4905
  this.loadTags(),
4906
4906
  this.loadTaggings(),
4907
4907
  this.loadTransactionRules(),
@@ -5146,7 +5146,7 @@ const Pe = () => {
5146
5146
  variant: "Body",
5147
5147
  children: [
5148
5148
  o ? "+" : "",
5149
- M(A.amount, "0,0.00")
5149
+ N(A.amount, "0,0.00")
5150
5150
  ]
5151
5151
  }
5152
5152
  )
@@ -5193,31 +5193,31 @@ const Pe = () => {
5193
5193
  account_guid: x?.account_guid,
5194
5194
  transaction_guid: y
5195
5195
  }), n?.(y);
5196
- }, b = h.useRef(null), g = qo({
5196
+ }, b = h.useRef(null), X = qo({
5197
5197
  count: E.length,
5198
5198
  getScrollElement: () => b.current,
5199
5199
  estimateSize: (y) => Br + (Vr(y, E) ? Sr : 0),
5200
5200
  overscan: 5
5201
5201
  });
5202
- return h.useEffect(() => g.measure(), [E]), h.useEffect(() => l(r), [r]), /* @__PURE__ */ e(aA, { children: /* @__PURE__ */ e(L, { height: t, overflow: "auto", ref: b, width: I, children: /* @__PURE__ */ s(
5202
+ return h.useEffect(() => X.measure(), [E]), h.useEffect(() => l(r), [r]), /* @__PURE__ */ e(aA, { children: /* @__PURE__ */ e(L, { height: t, overflow: "auto", ref: b, width: I, children: /* @__PURE__ */ s(
5203
5203
  L,
5204
5204
  {
5205
5205
  height: (
5206
5206
  // set the height to auto when there are no transactions so the zero state isn't set to 0
5207
- g.getVirtualItems().length === 0 ? "auto" : g.getTotalSize()
5207
+ X.getVirtualItems().length === 0 ? "auto" : X.getTotalSize()
5208
5208
  ),
5209
5209
  position: "relative",
5210
5210
  width: "100%",
5211
5211
  children: [
5212
5212
  (d || o) && i,
5213
- !d && !o && g.getVirtualItems().length === 0 && c,
5214
- !d && !o && g.getVirtualItems().length > 0 && g.getVirtualItems().map((y) => {
5215
- const x = E[y.index], w = Vr(y.index, E), j = jf(y.index, E), D = Br + (w ? Sr : 0);
5213
+ !d && !o && X.getVirtualItems().length === 0 && c,
5214
+ !d && !o && X.getVirtualItems().length > 0 && X.getVirtualItems().map((y) => {
5215
+ const x = E[y.index], w = Vr(y.index, E), D = jf(y.index, E), j = Br + (w ? Sr : 0);
5216
5216
  return /* @__PURE__ */ s(
5217
5217
  L,
5218
5218
  {
5219
5219
  sx: {
5220
- height: D,
5220
+ height: j,
5221
5221
  position: "absolute",
5222
5222
  transform: `translateY(${y.start}px)`,
5223
5223
  width: "100%"
@@ -5225,7 +5225,7 @@ const Pe = () => {
5225
5225
  children: [
5226
5226
  w && /* @__PURE__ */ e(Un, { bgcolor: A, children: Ni(x.date) }),
5227
5227
  /* @__PURE__ */ e(Sn, { onClick: H, transaction: x }),
5228
- /* @__PURE__ */ e(G, { sx: { ml: j ? 24 : 0 } })
5228
+ /* @__PURE__ */ e(M, { sx: { ml: D ? 24 : 0 } })
5229
5229
  ]
5230
5230
  },
5231
5231
  x.guid
@@ -5242,7 +5242,7 @@ const Pe = () => {
5242
5242
  return /* @__PURE__ */ s(P, { alignItems: "flex-end", tabIndex: A.tabIndex, children: [
5243
5243
  /* @__PURE__ */ s(R, { color: a ? "success.main" : "text.primary", variant: "Small", children: [
5244
5244
  a ? "+" : "",
5245
- M(n, "0,0.00")
5245
+ N(n, "0,0.00")
5246
5246
  ] }),
5247
5247
  o && i && /* @__PURE__ */ e(R, { bold: !0, color: "action.active", variant: "XSmall", children: o.short_title })
5248
5248
  ] });
@@ -5387,7 +5387,7 @@ const Pe = () => {
5387
5387
  }, Vf = C(Yf), at = () => {
5388
5388
  if (!h.useContext(gt))
5389
5389
  throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
5390
- return qA().uiStore;
5390
+ return LA().uiStore;
5391
5391
  }, je = {
5392
5392
  ON_CATEGORY_EXPANDED: "onCategoryExpanded",
5393
5393
  ON_CATEGORY_COLLAPSED: "onCategoryCollapsed",
@@ -5454,7 +5454,7 @@ const Bf = ({
5454
5454
  }
5455
5455
  );
5456
5456
  }, Fn = C(Bf), Sf = ({ parentCategory: A }) => {
5457
- const [t, i] = h.useState(!1), { addCategory: n } = qA(), { categories: r } = p(), { onEvent: o } = K(), { setShouldDisableDrawerScroll: a } = at(), I = async (f) => {
5457
+ const [t, i] = h.useState(!1), { addCategory: n } = LA(), { categories: r } = p(), { onEvent: o } = K(), { setShouldDisableDrawerScroll: a } = at(), I = async (f) => {
5458
5458
  await n(f.trim(), A.guid), o(je.ON_SUBCATEGORY_ADDED), i(!1);
5459
5459
  }, c = async () => {
5460
5460
  o(je.ON_SUBCATEGORY_ADD_CLICK), a(!0), i(!0);
@@ -5484,7 +5484,7 @@ const Bf = ({
5484
5484
  subCategory: t,
5485
5485
  showRename: i
5486
5486
  }) => {
5487
- const { updateCategory: n } = qA(), { onEvent: r } = K(), o = async (I) => {
5487
+ const { updateCategory: n } = LA(), { onEvent: r } = K(), o = async (I) => {
5488
5488
  await n({ ...t, name: I }), r(je.ON_SUBCATEGORY_SAVED), A(!1);
5489
5489
  }, a = () => {
5490
5490
  A(!1), r(je.ON_SUBCATEGORY_EDIT_CANCEL_CLICK);
@@ -5505,7 +5505,7 @@ const Bf = ({
5505
5505
  setShowDelete: i,
5506
5506
  subCategory: n
5507
5507
  }) => {
5508
- const { onEvent: r } = K(), { removeCategory: o } = qA(), a = () => {
5508
+ const { onEvent: r } = K(), { removeCategory: o } = LA(), a = () => {
5509
5509
  i(!1), r(je.ON_SUBCATEGORY_DELETE_CLICK);
5510
5510
  }, I = async () => {
5511
5511
  r(je.ON_SUBCATEGORY_DELETED), await o(n.guid), i(!1);
@@ -5529,7 +5529,7 @@ const Bf = ({
5529
5529
  showSelected: a,
5530
5530
  unselectable: I,
5531
5531
  unselectableText: c
5532
- } = at(), { categories: d } = p(), { onEvent: f } = K(), [E, l] = h.useState(!1), [v, u] = h.useState(!1), H = !!t.revision, b = t.guid === n, g = !I.some((x) => x === t.guid);
5532
+ } = at(), { categories: d } = p(), { onEvent: f } = K(), [E, l] = h.useState(!1), [v, u] = h.useState(!1), H = !!t.revision, b = t.guid === n, X = !I.some((x) => x === t.guid);
5533
5533
  return /* @__PURE__ */ s(
5534
5534
  W,
5535
5535
  {
@@ -5544,7 +5544,7 @@ const Bf = ({
5544
5544
  "aria-pressed": b,
5545
5545
  color: "secondary",
5546
5546
  onClick: () => {
5547
- g && (r(t.guid), i(t.guid), f(je.ON_CATEGORY_SELECTED));
5547
+ X && (r(t.guid), i(t.guid), f(je.ON_CATEGORY_SELECTED));
5548
5548
  },
5549
5549
  sx: { height: 44 },
5550
5550
  children: [
@@ -5556,7 +5556,7 @@ const Bf = ({
5556
5556
  }
5557
5557
  ),
5558
5558
  a && b && /* @__PURE__ */ e(Li, { fontSize: "small" }),
5559
- !g && /* @__PURE__ */ e(Xs, { label: c })
5559
+ !X && /* @__PURE__ */ e(Xs, { label: c })
5560
5560
  ]
5561
5561
  }
5562
5562
  ),
@@ -5621,7 +5621,7 @@ const Bf = ({
5621
5621
  children: [
5622
5622
  A.map((a) => /* @__PURE__ */ s(h.Fragment, { children: [
5623
5623
  /* @__PURE__ */ e(Jf, { parentCategory: t, subCategory: a }),
5624
- /* @__PURE__ */ e(G, { sx: { ml: 58 } })
5624
+ /* @__PURE__ */ e(M, { sx: { ml: 58 } })
5625
5625
  ] }, a.guid)),
5626
5626
  !o && /* @__PURE__ */ e(Uf, { parentCategory: t })
5627
5627
  ]
@@ -5657,11 +5657,11 @@ const Bf = ({
5657
5657
  },
5658
5658
  A.guid
5659
5659
  ) }),
5660
- /* @__PURE__ */ e(G, { sx: { ml: 58 } }),
5660
+ /* @__PURE__ */ e(M, { sx: { ml: 58 } }),
5661
5661
  /* @__PURE__ */ e($f, { categories: t, parentCategory: A })
5662
5662
  ] });
5663
5663
  }, la = C(Ad), ed = () => {
5664
- const { categories: A } = qA(), { searchValue: t } = at(), { categories: i } = p(), r = ((o, a = "") => o.reduce((I, c) => {
5664
+ const { categories: A } = LA(), { searchValue: t } = at(), { categories: i } = p(), r = ((o, a = "") => o.reduce((I, c) => {
5665
5665
  if (c.parent_guid === null) {
5666
5666
  const f = [
5667
5667
  {
@@ -5693,7 +5693,7 @@ const Bf = ({
5693
5693
  unselectable: n = [],
5694
5694
  unselectableText: r = "Unselectable"
5695
5695
  }) => {
5696
- const o = nd(), { categories: a, loadCategories: I } = qA(), { common: c } = p(), {
5696
+ const o = nd(), { categories: a, loadCategories: I } = LA(), { common: c } = p(), {
5697
5697
  searchValue: d,
5698
5698
  setOnSelect: f,
5699
5699
  setSearchValue: E,
@@ -5771,7 +5771,7 @@ const Bf = ({
5771
5771
  averageAmount: Fr(c),
5772
5772
  color: ct[o],
5773
5773
  icon: Us[o],
5774
- isTransfer: o === X.TRANSFER,
5774
+ isTransfer: o === g.TRANSFER,
5775
5775
  monthlyAmounts: c,
5776
5776
  subCategories: f,
5777
5777
  totalAmount: a ? E : 0,
@@ -5789,7 +5789,7 @@ const Bf = ({
5789
5789
  }, Wr = (A) => {
5790
5790
  const t = [], i = fA();
5791
5791
  for (let n = 0; n <= Ur; n++) {
5792
- const r = QA(Ne(i, Ur - n)), a = A.filter(
5792
+ const r = qA(Ne(i, Ur - n)), a = A.filter(
5793
5793
  (I) => I.year_month === Number(le(r, "yyyyMM"))
5794
5794
  ).reduce((I, c) => I + c.total, 0);
5795
5795
  t.push({
@@ -5849,7 +5849,7 @@ class cd {
5849
5849
  }
5850
5850
  get spendCategories() {
5851
5851
  return this.detailedCategories.filter(
5852
- (t) => !t.is_income && !t.isTransfer && t.guid !== X.INVESTMENTS
5852
+ (t) => !t.is_income && !t.isTransfer && t.guid !== g.INVESTMENTS
5853
5853
  );
5854
5854
  }
5855
5855
  get transferCategories() {
@@ -5892,7 +5892,7 @@ class cd {
5892
5892
  }
5893
5893
  };
5894
5894
  loadMonthlyCategoryTotals = async (t = this.globalStore.globalUiStore.selectedAccounts, i, n) => {
5895
- const r = XA(QA(i ?? Ne(/* @__PURE__ */ new Date(), 11))), o = XA(BA(n ?? /* @__PURE__ */ new Date()));
5895
+ const r = XA(qA(i ?? Ne(/* @__PURE__ */ new Date(), 11))), o = XA(BA(n ?? /* @__PURE__ */ new Date()));
5896
5896
  try {
5897
5897
  const a = await this.api.getMonthlyCategoryTotals(r, o, t);
5898
5898
  U(() => {
@@ -5910,7 +5910,7 @@ class cd {
5910
5910
  XA(n),
5911
5911
  t
5912
5912
  ), o = await this.api.getMonthlyCategoryTotals(
5913
- XA(QA(Ne(n, 11))),
5913
+ XA(qA(Ne(n, 11))),
5914
5914
  XA(BA(n)),
5915
5915
  t
5916
5916
  );
@@ -5923,7 +5923,7 @@ class cd {
5923
5923
  };
5924
5924
  removeCategory = async (t) => {
5925
5925
  try {
5926
- await this.api.removeCategory(t), await this.loadCategories();
5926
+ await this.api.removeCategory(t), await this.loadCategories(), console.log(JSON.parse(JSON.stringify(this.categories)), "after removing the category");
5927
5927
  } catch (i) {
5928
5928
  console.error(`Error occurred while removing category: ${i}`);
5929
5929
  }
@@ -5942,18 +5942,18 @@ class cd {
5942
5942
  getCategoryName = (t) => this.categories.find((n) => n.guid === t)?.name ?? Gi[t];
5943
5943
  }
5944
5944
  const Ra = ({ transaction: A }) => {
5945
- const { addOrUpdateTransactionRule: t, updateTransaction: i } = PA(), { categories: n } = qA(), { onEvent: r } = K(), { setShouldDisableDrawerScroll: o, updateManualTransaction: a } = Pe(), { transactions: I } = p(), [c, d] = h.useState(!1), [f, E] = h.useState(""), l = async (b) => {
5945
+ const { addOrUpdateTransactionRule: t, updateTransaction: i } = PA(), { categories: n } = LA(), { onEvent: r } = K(), { setShouldDisableDrawerScroll: o, updateManualTransaction: a } = Pe(), { transactions: I } = p(), [c, d] = h.useState(!1), [f, E] = h.useState(""), l = async (b) => {
5946
5946
  await i({ ...A, category_guid: f }), b && await t(f, A), E(""), r(V.TRANSACTION_DETAILS_CLICK_CATEGORY, {
5947
5947
  transaction_guid: A.guid
5948
5948
  });
5949
5949
  }, v = (b) => {
5950
5950
  if (A.is_manual && !A.guid) {
5951
- const g = n.find((y) => y.guid === b);
5951
+ const X = n.find((y) => y.guid === b);
5952
5952
  a({
5953
5953
  ...A,
5954
- category: g?.name,
5954
+ category: X?.name,
5955
5955
  category_guid: b,
5956
- top_level_category_guid: g?.parent_guid || b
5956
+ top_level_category_guid: X?.parent_guid || b
5957
5957
  });
5958
5958
  } else
5959
5959
  E(b);
@@ -6248,7 +6248,7 @@ const Ra = ({ transaction: A }) => {
6248
6248
  /* @__PURE__ */ e(R, { bold: !0, mb: 4, truncate: !0, variant: "Body", children: i || o }),
6249
6249
  /* @__PURE__ */ s(nt, { color: n ? "success.main" : "text.primary", truncate: !0, children: [
6250
6250
  n ? "+" : "",
6251
- M(t, "0,0.00")
6251
+ N(t, "0,0.00")
6252
6252
  ] })
6253
6253
  ] })
6254
6254
  ] });
@@ -6366,7 +6366,7 @@ const Ra = ({ transaction: A }) => {
6366
6366
  }
6367
6367
  ) })
6368
6368
  ] }) }),
6369
- /* @__PURE__ */ e(YA, { item: !0, xs: 5, children: l ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(R, { children: M(r.amount, "0,0.00") }) }) : /* @__PURE__ */ s(P, { alignItems: "start", children: [
6369
+ /* @__PURE__ */ e(YA, { item: !0, xs: 5, children: l ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(R, { children: N(r.amount, "0,0.00") }) }) : /* @__PURE__ */ s(P, { alignItems: "start", children: [
6370
6370
  /* @__PURE__ */ s(P, { alignItems: "start", direction: "row", gap: o.Spacing.XSmall, children: [
6371
6371
  /* @__PURE__ */ e(
6372
6372
  qe,
@@ -6436,7 +6436,7 @@ const Ra = ({ transaction: A }) => {
6436
6436
  f(r.length <= 1 ? I.split_transaction_errors_min_splits : ""), f(
6437
6437
  r[0].amount < 0 ? z(
6438
6438
  I.split_transaction_errors_totals_must_equal_amount,
6439
- M(o.amount, "0,0.00")
6439
+ N(o.amount, "0,0.00")
6440
6440
  ) : ""
6441
6441
  );
6442
6442
  }, [r]), /* @__PURE__ */ s(L, { className: "mx-txn-split-manager", children: [
@@ -6476,7 +6476,7 @@ const Ra = ({ transaction: A }) => {
6476
6476
  ) })
6477
6477
  ] });
6478
6478
  }, Hd = C(bd), zd = ({ transaction: A }) => {
6479
- const { onEvent: t } = K(), { splitTransaction: i, unSplitTransaction: n } = PA(), { common: r, transactions: o } = p(), { setShouldDisableDrawerScroll: a } = Pe(), { categories: I } = qA(), c = {
6479
+ const { onEvent: t } = K(), { splitTransaction: i, unSplitTransaction: n } = PA(), { common: r, transactions: o } = p(), { setShouldDisableDrawerScroll: a } = Pe(), { categories: I } = LA(), c = {
6480
6480
  ...A,
6481
6481
  amount: A.amount - 1,
6482
6482
  guid: "",
@@ -6492,23 +6492,23 @@ const Ra = ({ transaction: A }) => {
6492
6492
  parent_guid: A.guid,
6493
6493
  top_level_category_guid: void 0
6494
6494
  }, [f, E] = h.useState(!1), [l, v] = h.useState(!1), [u, H] = h.useState([]), b = () => {
6495
- const N = [...u];
6496
- N.push({ ...d }), N[0].amount -= 1, H(N);
6497
- }, g = (N) => {
6498
- if (N > 0) {
6499
- const tA = u[N], Y = [...u];
6500
- Y.splice(N, 1), Y[0].amount += tA.amount, H(Y);
6501
- }
6502
- }, y = (N, tA) => {
6495
+ const G = [...u];
6496
+ G.push({ ...d }), G[0].amount -= 1, H(G);
6497
+ }, X = (G) => {
6498
+ if (G > 0) {
6499
+ const tA = u[G], Y = [...u];
6500
+ Y.splice(G, 1), Y[0].amount += tA.amount, H(Y);
6501
+ }
6502
+ }, y = (G, tA) => {
6503
6503
  const Y = [...u];
6504
- Y[N].amount = tA, Y[0].amount = A.amount - Y.reduce(
6504
+ Y[G].amount = tA, Y[0].amount = A.amount - Y.reduce(
6505
6505
  (AA, rA, sA) => AA + (sA !== 0 ? rA.amount : 0),
6506
6506
  0
6507
6507
  ), H(Y);
6508
- }, x = (N, tA) => {
6508
+ }, x = (G, tA) => {
6509
6509
  const Y = [...u], AA = I.find((rA) => rA.guid === tA);
6510
- AA && (Y[N] = {
6511
- ...Y[N],
6510
+ AA && (Y[G] = {
6511
+ ...Y[G],
6512
6512
  category_guid: tA,
6513
6513
  category: AA.name,
6514
6514
  top_level_category_guid: AA.parent_guid || tA
@@ -6521,19 +6521,19 @@ const Ra = ({ transaction: A }) => {
6521
6521
  H([{ ...c }, { ...d }]), t(V.TRANSACTION_DETAILS_CLICK_SPLIT, {
6522
6522
  transaction_guid: A.guid
6523
6523
  }), E(!0);
6524
- }, j = async () => {
6525
- t(S.ON_TRANSACTION_SPLIT_SAVE_CLICK), await i({ ...A, has_been_split: !0 }, u), E(!1);
6526
6524
  }, D = async () => {
6525
+ t(S.ON_TRANSACTION_SPLIT_SAVE_CLICK), await i({ ...A, has_been_split: !0 }, u), E(!1);
6526
+ }, j = async () => {
6527
6527
  t(S.ON_TRANSACTION_SPLIT_CANCEL_CLICK), H([{ ...c }, { ...d }]), E(!1);
6528
6528
  }, m = async () => {
6529
6529
  t(V.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
6530
6530
  transaction_guid: A.guid
6531
6531
  });
6532
- const N = A.parent_guid ?? A.guid;
6533
- await n(N);
6532
+ const G = A.parent_guid ?? A.guid;
6533
+ await n(G);
6534
6534
  }, O = h.useMemo(() => {
6535
- const N = u.some((Y) => !Y.category_guid), tA = u.some((Y) => Y.amount <= 0);
6536
- return N || tA;
6535
+ const G = u.some((Y) => !Y.category_guid), tA = u.some((Y) => Y.amount <= 0);
6536
+ return G || tA;
6537
6537
  }, [u]);
6538
6538
  return /* @__PURE__ */ s(h.Fragment, { children: [
6539
6539
  A && /* @__PURE__ */ e(W, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(cA, { onClick: w, children: [
@@ -6553,8 +6553,8 @@ const Ra = ({ transaction: A }) => {
6553
6553
  ariaLabelClose: r.close_aria,
6554
6554
  isOpen: f,
6555
6555
  isPrimaryDisabled: O,
6556
- onClose: D,
6557
- onPrimaryAction: j,
6556
+ onClose: j,
6557
+ onPrimaryAction: D,
6558
6558
  primaryText: r.save_button,
6559
6559
  secondaryText: r.cancel_button,
6560
6560
  title: o.split_transaction_title,
@@ -6565,7 +6565,7 @@ const Ra = ({ transaction: A }) => {
6565
6565
  {
6566
6566
  onAddSplit: b,
6567
6567
  onCategoryChanged: x,
6568
- onDeleteSplit: g,
6568
+ onDeleteSplit: X,
6569
6569
  onUpdateAmount: y,
6570
6570
  splits: u,
6571
6571
  transaction: A
@@ -6685,7 +6685,7 @@ const Ra = ({ transaction: A }) => {
6685
6685
  }, wd = C(pd), yd = ({ onTagChecked: A, selectedTags: t, tag: i }) => {
6686
6686
  const { onEvent: n } = K(), { removeTag: r, updateTag: o } = PA(), { common: a, transactions: I } = p(), [c, d] = h.useState(!1), [f, E] = h.useState(!1), [l, v] = h.useState(""), [u, H] = h.useState(""), b = async () => {
6687
6687
  n(S.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await o({ ...i, name: l }), d(!1);
6688
- }, g = async () => {
6688
+ }, X = async () => {
6689
6689
  n(S.ON_TRANSACTION_TAGS_TAG_DELETED), await r(i.guid), E(!1);
6690
6690
  };
6691
6691
  h.useEffect(() => {
@@ -6766,7 +6766,7 @@ const Ra = ({ transaction: A }) => {
6766
6766
  copy: { title: I.tags_delete_title },
6767
6767
  isOpen: f,
6768
6768
  onClose: () => E(!1),
6769
- onPrimaryAction: g,
6769
+ onPrimaryAction: X,
6770
6770
  onSecondaryAction: () => n(S.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK),
6771
6771
  primaryText: a.delete_button,
6772
6772
  secondaryText: a.cancel_button,
@@ -6791,7 +6791,7 @@ const Ra = ({ transaction: A }) => {
6791
6791
  /* @__PURE__ */ e(Xd, {}),
6792
6792
  /* @__PURE__ */ e(De, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(aA, { children: o.map((a) => /* @__PURE__ */ s(h.Fragment, { children: [
6793
6793
  /* @__PURE__ */ e(xd, { onTagChecked: t, selectedTags: A, tag: a }),
6794
- /* @__PURE__ */ e(G, { sx: { ml: 24 } })
6794
+ /* @__PURE__ */ e(M, { sx: { ml: 24 } })
6795
6795
  ] }, a.guid)) }) })
6796
6796
  ] });
6797
6797
  }, jd = C(Dd), md = ({ transaction: A }) => {
@@ -6800,8 +6800,8 @@ const Ra = ({ transaction: A }) => {
6800
6800
  E(A.tags);
6801
6801
  }, [c, A]);
6802
6802
  const l = (H) => {
6803
- const b = [...f], g = f.indexOf(H);
6804
- g >= 0 ? b.splice(g, 1) : b.push(H), E(b);
6803
+ const b = [...f], X = f.indexOf(H);
6804
+ X >= 0 ? b.splice(X, 1) : b.push(H), E(b);
6805
6805
  }, v = async () => {
6806
6806
  if (A.is_manual && !A.guid) {
6807
6807
  I({ ...A, tags: f }), d(!1);
@@ -6810,7 +6810,7 @@ const Ra = ({ transaction: A }) => {
6810
6810
  await n(f, A.guid), await r({ ...A }), t(V.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: A.guid }), d(!1);
6811
6811
  }, u = h.useMemo(
6812
6812
  () => A.tags.map(
6813
- (H, b, g) => `${i.find((y) => y.guid === H)?.name}${b < g.length - 1 ? " / " : ""}`
6813
+ (H, b, X) => `${i.find((y) => y.guid === H)?.name}${b < X.length - 1 ? " / " : ""}`
6814
6814
  ),
6815
6815
  [i, A]
6816
6816
  );
@@ -6955,7 +6955,7 @@ const Ra = ({ transaction: A }) => {
6955
6955
  /* @__PURE__ */ s(P, { direction: "row", justifyContent: "space-between", children: [
6956
6956
  /* @__PURE__ */ s(nt, { color: i.isIncome ? "success.main" : "text.primary", children: [
6957
6957
  i.isIncome ? "+" : "",
6958
- M(i.amount, "0,0.00")
6958
+ N(i.amount, "0,0.00")
6959
6959
  ] }),
6960
6960
  /* @__PURE__ */ e(qd, { transaction: i })
6961
6961
  ] }),
@@ -6979,7 +6979,7 @@ const Ra = ({ transaction: A }) => {
6979
6979
  a === kt.Date && /* @__PURE__ */ e(ua, { transaction: i }),
6980
6980
  a === kt.Memo && /* @__PURE__ */ e(ba, { transaction: i }),
6981
6981
  a === kt.Tags && /* @__PURE__ */ e(Ha, { transaction: i }),
6982
- /* @__PURE__ */ e(G, { variant: I < t.length - 1 ? "inset" : "fullWidth" })
6982
+ /* @__PURE__ */ e(M, { variant: I < t.length - 1 ? "inset" : "fullWidth" })
6983
6983
  ] }, a)) }) }),
6984
6984
  /* @__PURE__ */ e(R, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "Body", children: "Actions" }),
6985
6985
  /* @__PURE__ */ e(De, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ s(aA, { children: [
@@ -6987,7 +6987,7 @@ const Ra = ({ transaction: A }) => {
6987
6987
  a === hi.SplitTransaction && /* @__PURE__ */ e(Cd, { transaction: i }),
6988
6988
  a === hi.HideTransaction && /* @__PURE__ */ e(vd, { transaction: i }),
6989
6989
  a === hi.MerchantLogo && /* @__PURE__ */ e(hd, { transaction: i }),
6990
- /* @__PURE__ */ e(G, { variant: I < A.length - 1 ? "inset" : "fullWidth" })
6990
+ /* @__PURE__ */ e(M, { variant: I < A.length - 1 ? "inset" : "fullWidth" })
6991
6991
  ] }, a)),
6992
6992
  i.is_manual && /* @__PURE__ */ e(dd, { transaction: i })
6993
6993
  ] }) })
@@ -7016,7 +7016,7 @@ const Ra = ({ transaction: A }) => {
7016
7016
  () => A.filter((b) => b.is_manual),
7017
7017
  [A]
7018
7018
  ).map((b) => ({
7019
- label: `${b.name} | ${M(b.balance, "0,0.00")}`,
7019
+ label: `${b.name} | ${N(b.balance, "0,0.00")}`,
7020
7020
  value: b.guid
7021
7021
  })), E = {
7022
7022
  error_amount_is_invalid: t.currency_input.error_amount_is_invalid,
@@ -7025,8 +7025,8 @@ const Ra = ({ transaction: A }) => {
7025
7025
  enter_amount: t.currency_input.enter_amount
7026
7026
  }, l = (b) => {
7027
7027
  I(b), o({ ...n, amount: Number(b) });
7028
- }, v = (b, g) => {
7029
- o({ ...n, transaction_type: Number(g) });
7028
+ }, v = (b, X) => {
7029
+ o({ ...n, transaction_type: Number(X) });
7030
7030
  }, u = (b) => {
7031
7031
  d(b), o({ ...n, payee: b, description: b });
7032
7032
  }, H = (b) => {
@@ -7101,7 +7101,7 @@ const Ra = ({ transaction: A }) => {
7101
7101
  }
7102
7102
  )
7103
7103
  ] }),
7104
- /* @__PURE__ */ e(G, { light: !0 }),
7104
+ /* @__PURE__ */ e(M, { light: !0 }),
7105
7105
  /* @__PURE__ */ s(L, { bgcolor: "background.paper", children: [
7106
7106
  /* @__PURE__ */ e(Ra, { transaction: n }),
7107
7107
  /* @__PURE__ */ e(ua, { transaction: n }),
@@ -7110,7 +7110,7 @@ const Ra = ({ transaction: A }) => {
7110
7110
  ] })
7111
7111
  ] });
7112
7112
  }, Yd = C(Td), Vd = ({ onClose: A, transaction: t }) => {
7113
- const { addOrUpdateTransactionRule: i, updateTransaction: n } = PA(), { transactions: r } = p(), { categories: o } = qA(), [a, I] = h.useState(""), c = h.useMemo(
7113
+ const { addOrUpdateTransactionRule: i, updateTransaction: n } = PA(), { transactions: r } = p(), { categories: o } = LA(), [a, I] = h.useState(""), c = h.useMemo(
7114
7114
  () => o.find((f) => f.guid === a),
7115
7115
  [a]
7116
7116
  ), d = async (f) => {
@@ -7168,12 +7168,12 @@ const Ra = ({ transaction: A }) => {
7168
7168
  filter: u,
7169
7169
  loadAssociatedBeats: H,
7170
7170
  setFilter: b,
7171
- tags: g,
7171
+ tags: X,
7172
7172
  transactions: y,
7173
7173
  updateTransaction: x
7174
- } = PA(), { common: w, transactions: j } = p(), { userProfile: D } = Ue(), { onEvent: m } = K(), {
7174
+ } = PA(), { common: w, transactions: D } = p(), { userProfile: j } = Ue(), { onEvent: m } = K(), {
7175
7175
  displayedDateRange: O,
7176
- isInitialized: N,
7176
+ isInitialized: G,
7177
7177
  selectedAccountGuids: tA,
7178
7178
  selectedAccounts: Y,
7179
7179
  setDisplayedDate: AA,
@@ -7182,7 +7182,7 @@ const Ra = ({ transaction: A }) => {
7182
7182
  h.useEffect(() => {
7183
7183
  rA(r);
7184
7184
  }, [r]), h.useEffect(() => {
7185
- const kA = QA(fA()), ar = BA(fA());
7185
+ const kA = qA(fA()), ar = BA(fA());
7186
7186
  AA(kA, ar), b({
7187
7187
  dateRange: { start: kA, end: ar },
7188
7188
  accounts: Y.map((An) => An.guid),
@@ -7208,12 +7208,12 @@ const Ra = ({ transaction: A }) => {
7208
7208
  searchTerm: kA
7209
7209
  }), m(V.TRANSACTIONS_CLICK_SEARCH, { search_term: kA });
7210
7210
  }, Zi = () => {
7211
- ha(y, g), m(V.TRANSACTIONS_CLICK_EXPORT);
7211
+ ha(y, X), m(V.TRANSACTIONS_CLICK_EXPORT);
7212
7212
  }, Ji = () => {
7213
7213
  Vt.length > 0 ? (l({
7214
7214
  ...Ea,
7215
7215
  date: XA(fA()),
7216
- user_guid: D?.user_guid || ""
7216
+ user_guid: j?.user_guid || ""
7217
7217
  }), hA(
7218
7218
  "addTransaction"
7219
7219
  /* AddTransaction */
@@ -7225,19 +7225,19 @@ const Ra = ({ transaction: A }) => {
7225
7225
  }, $i = () => {
7226
7226
  bA(!1), o();
7227
7227
  };
7228
- return !N || !JA ? /* @__PURE__ */ e(ee, {}) : /* @__PURE__ */ s(
7228
+ return !G || !JA ? /* @__PURE__ */ e(ee, {}) : /* @__PURE__ */ s(
7229
7229
  Le,
7230
7230
  {
7231
7231
  accountOptions: r,
7232
7232
  actions: [
7233
7233
  {
7234
7234
  iconName: "open_in_new",
7235
- label: j.export_csv_btn,
7235
+ label: D.export_csv_btn,
7236
7236
  onClick: Zi
7237
7237
  },
7238
7238
  {
7239
7239
  iconName: "add",
7240
- label: j.add_transaction_btn,
7240
+ label: D.add_transaction_btn,
7241
7241
  onClick: Ji
7242
7242
  }
7243
7243
  ],
@@ -7247,13 +7247,13 @@ const Ra = ({ transaction: A }) => {
7247
7247
  onAccountsFilterClick: () => m(V.ACCOUNTS_CLICK_FILTER),
7248
7248
  onBackClick: A,
7249
7249
  sx: n,
7250
- title: j.transactions_title,
7250
+ title: D.transactions_title,
7251
7251
  children: [
7252
7252
  /* @__PURE__ */ e(L, { mt: 16, children: /* @__PURE__ */ e(
7253
7253
  Yi,
7254
7254
  {
7255
7255
  onChange: Ze,
7256
- placeholder: j.action_bar_search_placeholder,
7256
+ placeholder: D.action_bar_search_placeholder,
7257
7257
  searchValue: d
7258
7258
  }
7259
7259
  ) }),
@@ -7315,7 +7315,7 @@ const Ra = ({ transaction: A }) => {
7315
7315
  onClose: () => {
7316
7316
  _ && !_.has_been_viewed && x({ ..._, has_been_viewed: !0 }), hA("");
7317
7317
  },
7318
- title: j.details_title,
7318
+ title: D.details_title,
7319
7319
  children: _ && /* @__PURE__ */ e(Yt, { transaction: _ })
7320
7320
  }
7321
7321
  ),
@@ -7336,14 +7336,14 @@ const Ra = ({ transaction: A }) => {
7336
7336
  isPrimaryDisabled: !yA,
7337
7337
  onClose: () => hA(""),
7338
7338
  onPrimaryAction: Bt,
7339
- title: j.add_transaction_title,
7339
+ title: D.add_transaction_title,
7340
7340
  children: /* @__PURE__ */ e(Yd, {})
7341
7341
  }
7342
7342
  ),
7343
7343
  /* @__PURE__ */ e(
7344
7344
  Nd,
7345
7345
  {
7346
- copy: { title: j.add_manual_account },
7346
+ copy: { title: D.add_manual_account },
7347
7347
  isOpen: WA,
7348
7348
  onClose: () => {
7349
7349
  fe(!1);
@@ -7356,7 +7356,7 @@ const Ra = ({ transaction: A }) => {
7356
7356
  {
7357
7357
  onClose: $i,
7358
7358
  showConnectWidget: ae,
7359
- title: j.add_manual_account
7359
+ title: D.add_manual_account
7360
7360
  }
7361
7361
  )
7362
7362
  ]
@@ -7405,10 +7405,10 @@ const Ra = ({ transaction: A }) => {
7405
7405
  ], E = async (u) => {
7406
7406
  const H = { ...A, recurrenceType: u };
7407
7407
  if (A.activityType === TA.Expense) {
7408
- const b = n.find((g) => g.guid === A.scheduledPaymentGuid);
7408
+ const b = n.find((X) => X.guid === A.scheduledPaymentGuid);
7409
7409
  b && await o(Ca(H, b));
7410
7410
  } else {
7411
- const b = i.find((g) => g.guid === A.sequenceGuid);
7411
+ const b = i.find((X) => X.guid === A.sequenceGuid);
7412
7412
  b && await r(za(H, b));
7413
7413
  }
7414
7414
  c(!1);
@@ -7454,7 +7454,7 @@ const Ra = ({ transaction: A }) => {
7454
7454
  ),
7455
7455
  A.recurrenceType === u.id && /* @__PURE__ */ e(q, { color: "primary", fill: !0, name: "check_circle", size: 24 })
7456
7456
  ] }) }, u.id),
7457
- /* @__PURE__ */ e(G, {})
7457
+ /* @__PURE__ */ e(M, {})
7458
7458
  ] }, u.id)) })
7459
7459
  }
7460
7460
  )
@@ -7508,8 +7508,8 @@ const Ra = ({ transaction: A }) => {
7508
7508
  )
7509
7509
  ] });
7510
7510
  }, kd = C(Wd), Kd = ({ activity: A, onDeleted: t }) => {
7511
- const { recurring: i } = p(), { categories: n } = qA(), { deleteCashflowSequence: r, deleteScheduledPayment: o, paidActivities: a } = ZA(), { filter: I, setFilter: c, transactions: d } = PA(), { selectedAccountGuids: f } = wA(), { onEvent: E } = K(), [l, v] = h.useState(!1), [u, H] = h.useState(""), b = n.find((j) => j.guid === A.categoryGuid), g = A.activityType === TA.Income, y = h.useMemo(
7512
- () => d.find((j) => j.guid === u),
7511
+ const { recurring: i } = p(), { categories: n } = LA(), { deleteCashflowSequence: r, deleteScheduledPayment: o, paidActivities: a } = ZA(), { filter: I, setFilter: c, transactions: d } = PA(), { selectedAccountGuids: f } = wA(), { onEvent: E } = K(), [l, v] = h.useState(!1), [u, H] = h.useState(""), b = n.find((D) => D.guid === A.categoryGuid), X = A.activityType === TA.Income, y = h.useMemo(
7512
+ () => d.find((D) => D.guid === u),
7513
7513
  [u]
7514
7514
  );
7515
7515
  h.useEffect(() => {
@@ -7518,22 +7518,22 @@ const Ra = ({ transaction: A }) => {
7518
7518
  dateRange: { start: Ve(fA(), 90), end: BA(fA()) }
7519
7519
  });
7520
7520
  }, []), h.useEffect(() => {
7521
- if (g && A.sequenceGuid) {
7522
- const j = a.filter((D) => D.sequenceGuid === A.sequenceGuid).map((D) => D.transactionGuid);
7521
+ if (X && A.sequenceGuid) {
7522
+ const D = a.filter((j) => j.sequenceGuid === A.sequenceGuid).map((j) => j.transactionGuid);
7523
7523
  c({
7524
7524
  ...I,
7525
- custom: (D) => !!j.find((m) => D.guid === m)
7525
+ custom: (j) => !!D.find((m) => j.guid === m)
7526
7526
  });
7527
- } else !g && A.scheduledPaymentGuid && c({
7527
+ } else !X && A.scheduledPaymentGuid && c({
7528
7528
  ...I,
7529
- custom: (j) => j.scheduled_payment_guid === A.scheduledPaymentGuid
7529
+ custom: (D) => D.scheduled_payment_guid === A.scheduledPaymentGuid
7530
7530
  });
7531
7531
  }, [A]);
7532
7532
  const x = async () => {
7533
- g && A.sequenceGuid ? await r(A.sequenceGuid) : A.scheduledPaymentGuid && await o(A.scheduledPaymentGuid), t();
7533
+ X && A.sequenceGuid ? await r(A.sequenceGuid) : A.scheduledPaymentGuid && await o(A.scheduledPaymentGuid), t();
7534
7534
  }, w = () => {
7535
7535
  v(!0), E(
7536
- g ? "recurring_transactions_widget_income_details_click_delete" : "recurring_transactions_widget_expense_details_click_delete",
7536
+ X ? "recurring_transactions_widget_income_details_click_delete" : "recurring_transactions_widget_expense_details_click_delete",
7537
7537
  {
7538
7538
  transaction_guid: A.transactionGuid
7539
7539
  }
@@ -7550,9 +7550,9 @@ const Ra = ({ transaction: A }) => {
7550
7550
  }
7551
7551
  ),
7552
7552
  /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: A.name }),
7553
- /* @__PURE__ */ s(nt, { color: g ? "success.main" : "text.primary", children: [
7554
- g ? "+" : "",
7555
- M(A.amount, "0,0.00")
7553
+ /* @__PURE__ */ s(nt, { color: X ? "success.main" : "text.primary", children: [
7554
+ X ? "+" : "",
7555
+ N(A.amount, "0,0.00")
7556
7556
  ] })
7557
7557
  ] }),
7558
7558
  /* @__PURE__ */ s(aA, { sx: { bgcolor: "background.paper" }, children: [
@@ -7565,7 +7565,7 @@ const Ra = ({ transaction: A }) => {
7565
7565
  value: A.institution
7566
7566
  }
7567
7567
  ),
7568
- /* @__PURE__ */ e(G, { color: "secondary", variant: "inset" })
7568
+ /* @__PURE__ */ e(M, { color: "secondary", variant: "inset" })
7569
7569
  ] }),
7570
7570
  b && /* @__PURE__ */ s(J, { children: [
7571
7571
  /* @__PURE__ */ e(
@@ -7576,12 +7576,12 @@ const Ra = ({ transaction: A }) => {
7576
7576
  value: b.name
7577
7577
  }
7578
7578
  ),
7579
- /* @__PURE__ */ e(G, { color: "secondary", variant: "inset" })
7579
+ /* @__PURE__ */ e(M, { color: "secondary", variant: "inset" })
7580
7580
  ] }),
7581
7581
  /* @__PURE__ */ e(Fd, { activity: A }),
7582
- /* @__PURE__ */ e(G, { color: "secondary", variant: "inset" }),
7582
+ /* @__PURE__ */ e(M, { color: "secondary", variant: "inset" }),
7583
7583
  /* @__PURE__ */ e(kd, { activity: A }),
7584
- /* @__PURE__ */ e(G, { color: "secondary" })
7584
+ /* @__PURE__ */ e(M, { color: "secondary" })
7585
7585
  ] }),
7586
7586
  /* @__PURE__ */ e(
7587
7587
  $,
@@ -7591,7 +7591,7 @@ const Ra = ({ transaction: A }) => {
7591
7591
  startIcon: /* @__PURE__ */ e(q, { name: "delete" }),
7592
7592
  sx: { mx: 24, my: 16 },
7593
7593
  variant: "text",
7594
- children: g ? i.delete_income_title : i.delete_expense_title
7594
+ children: X ? i.delete_income_title : i.delete_expense_title
7595
7595
  }
7596
7596
  ),
7597
7597
  /* @__PURE__ */ e(R, { bold: !0, sx: { ml: 24, mt: 16 }, variant: "Body", children: i.paid_transactions }),
@@ -7610,13 +7610,13 @@ const Ra = ({ transaction: A }) => {
7610
7610
  pA,
7611
7611
  {
7612
7612
  copy: {
7613
- title: g ? i.delete_income_title : i.delete_expense_title,
7613
+ title: X ? i.delete_income_title : i.delete_expense_title,
7614
7614
  close_aria: i.close_drawer_aria
7615
7615
  },
7616
7616
  isOpen: l,
7617
7617
  onClose: () => v(!1),
7618
7618
  onPrimaryAction: x,
7619
- children: /* @__PURE__ */ e(R, { children: g ? i.delete_income_description : i.delete_expense_description })
7619
+ children: /* @__PURE__ */ e(R, { children: X ? i.delete_income_description : i.delete_expense_description })
7620
7620
  }
7621
7621
  )
7622
7622
  ] });
@@ -7742,7 +7742,7 @@ const Ra = ({ transaction: A }) => {
7742
7742
  children: /* @__PURE__ */ s(P, { alignItems: "flex-end", width: "100%", children: [
7743
7743
  /* @__PURE__ */ s(R, { bold: !0, color: I ? "success.main" : "text.primary", variant: "Body", children: [
7744
7744
  I ? "+" : "",
7745
- M(A.amount, "0,0.00")
7745
+ N(A.amount, "0,0.00")
7746
7746
  ] }),
7747
7747
  !t && /* @__PURE__ */ s(
7748
7748
  P,
@@ -7952,33 +7952,33 @@ const Ra = ({ transaction: A }) => {
7952
7952
  }
7953
7953
  ) })
7954
7954
  ] });
7955
- }, wa = C(tE), bn = (A) => A.top_level_category_guid !== X.INCOME && A.transaction_type === se.DEBIT, iE = (A, t) => bn(A) ? A.payee?.toLowerCase().includes(t.toLowerCase()) || A.description.toLowerCase().includes(t.toLowerCase()) || A.feed_description.toLowerCase().includes(t.toLowerCase()) : !1, ni = (A) => A.top_level_category_guid === X.INCOME || A.top_level_category_guid === X.TRANSFER && A.transaction_type === se.CREDIT, ya = (A, t) => ni(A) ? A.payee?.toLowerCase().includes(t.toLowerCase()) || A.description?.toLowerCase().includes(t.toLowerCase()) || A.feed_description?.toLowerCase().includes(t.toLowerCase()) : !1, nE = ({
7955
+ }, wa = C(tE), bn = (A) => A.top_level_category_guid !== g.INCOME && A.transaction_type === se.DEBIT, iE = (A, t) => bn(A) ? A.payee?.toLowerCase().includes(t.toLowerCase()) || A.description.toLowerCase().includes(t.toLowerCase()) || A.feed_description.toLowerCase().includes(t.toLowerCase()) : !1, ni = (A) => A.top_level_category_guid === g.INCOME || A.top_level_category_guid === g.TRANSFER && A.transaction_type === se.CREDIT, ya = (A, t) => ni(A) ? A.payee?.toLowerCase().includes(t.toLowerCase()) || A.description?.toLowerCase().includes(t.toLowerCase()) || A.feed_description?.toLowerCase().includes(t.toLowerCase()) : !1, nE = ({
7956
7956
  isIncome: A = !1,
7957
7957
  label: t,
7958
7958
  onAddActivity: i = () => null
7959
7959
  }) => {
7960
- const { recurring: n } = p(), { addCashflowEvent: r, addCashflowSequence: o, addScheduledPayment: a } = ZA(), { filter: I, setFilter: c, transactions: d } = PA(), [f, E] = h.useState(!1), [l, v] = h.useState(""), [u, H] = h.useState(F.EveryMonth), [b, g] = h.useState(null), y = h.useMemo(
7961
- () => d.find((D) => D.guid === l),
7960
+ const { recurring: n } = p(), { addCashflowEvent: r, addCashflowSequence: o, addScheduledPayment: a } = ZA(), { filter: I, setFilter: c, transactions: d } = PA(), [f, E] = h.useState(!1), [l, v] = h.useState(""), [u, H] = h.useState(F.EveryMonth), [b, X] = h.useState(null), y = h.useMemo(
7961
+ () => d.find((j) => j.guid === l),
7962
7962
  [l]
7963
7963
  ), x = () => {
7964
7964
  E(!0), c(A ? { ...I, custom: ni } : { ...I, custom: bn });
7965
7965
  }, w = async () => {
7966
7966
  if (i(), !y || !b) {
7967
- j();
7967
+ D();
7968
7968
  return;
7969
7969
  }
7970
7970
  if (A) {
7971
- const D = ga(y, u, b), m = await o(D);
7971
+ const j = ga(y, u, b), m = await o(j);
7972
7972
  if (m) {
7973
7973
  const O = Xa(m, y);
7974
7974
  await r(O);
7975
7975
  }
7976
7976
  } else {
7977
- const D = AE(y, u, b);
7978
- await a(D, y);
7977
+ const j = AE(y, u, b);
7978
+ await a(j, y);
7979
7979
  }
7980
- j();
7981
- }, j = () => {
7980
+ D();
7981
+ }, D = () => {
7982
7982
  v(""), E(!1);
7983
7983
  };
7984
7984
  return /* @__PURE__ */ s(L, { children: [
@@ -7989,7 +7989,7 @@ const Ra = ({ transaction: A }) => {
7989
7989
  ] }),
7990
7990
  /* @__PURE__ */ e(q, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
7991
7991
  ] }) }) }) }),
7992
- /* @__PURE__ */ e(G, {}),
7992
+ /* @__PURE__ */ e(M, {}),
7993
7993
  /* @__PURE__ */ e(
7994
7994
  IA,
7995
7995
  {
@@ -8001,13 +8001,13 @@ const Ra = ({ transaction: A }) => {
8001
8001
  pa,
8002
8002
  {
8003
8003
  description: A ? n.add_income_description : n.add_expense_description,
8004
- onSearch: (D) => {
8004
+ onSearch: (j) => {
8005
8005
  c({
8006
8006
  ...I,
8007
- custom: (m) => A ? D ? ya(m, D) : ni(m) : D ? iE(m, D) : bn(m)
8007
+ custom: (m) => A ? j ? ya(m, j) : ni(m) : j ? iE(m, j) : bn(m)
8008
8008
  });
8009
8009
  },
8010
- onSelected: (D) => v(D)
8010
+ onSelected: (j) => v(j)
8011
8011
  }
8012
8012
  )
8013
8013
  }
@@ -8027,7 +8027,7 @@ const Ra = ({ transaction: A }) => {
8027
8027
  isIncome: A,
8028
8028
  nextDate: b,
8029
8029
  onFrequencyChange: H,
8030
- onNextDateChange: g,
8030
+ onNextDateChange: X,
8031
8031
  transaction: y
8032
8032
  }
8033
8033
  )
@@ -8061,7 +8061,7 @@ const Ra = ({ transaction: A }) => {
8061
8061
  return /* @__PURE__ */ s(aA, { sx: { bgcolor: "background.paper" }, children: [
8062
8062
  o.map((c, d) => /* @__PURE__ */ s(h.Fragment, { children: [
8063
8063
  /* @__PURE__ */ e(pi, { activity: c, onActivityClick: a, showOrdinal: !0 }),
8064
- /* @__PURE__ */ e(G, { variant: d < o.length - 1 ? "inset" : "fullWidth" })
8064
+ /* @__PURE__ */ e(M, { variant: d < o.length - 1 ? "inset" : "fullWidth" })
8065
8065
  ] }, c.scheduledPaymentGuid)),
8066
8066
  /* @__PURE__ */ e(xa, { label: A.add_expense, onAddActivity: I })
8067
8067
  ] });
@@ -8093,7 +8093,7 @@ const Ra = ({ transaction: A }) => {
8093
8093
  };
8094
8094
  }), I = n.filter(
8095
8095
  (f) => mt(xA(f.expected_date), {
8096
- start: QA(fA()),
8096
+ start: qA(fA()),
8097
8097
  end: We(fA(), 30)
8098
8098
  })
8099
8099
  ).filter((f) => {
@@ -8143,7 +8143,7 @@ const Ra = ({ transaction: A }) => {
8143
8143
  recurrenceDay: t.recurrence_day,
8144
8144
  scheduledPaymentGuid: t.guid,
8145
8145
  transactionGuid: ""
8146
- }, c = t.recurrence_day, d = fA(), f = QA(fA()), E = We(fA(), 30);
8146
+ }, c = t.recurrence_day, d = fA(), f = qA(fA()), E = We(fA(), 30);
8147
8147
  let l = f;
8148
8148
  switch (t.recurrence_type) {
8149
8149
  case F.EveryWeek:
@@ -8262,7 +8262,7 @@ const Ra = ({ transaction: A }) => {
8262
8262
  return /* @__PURE__ */ s(aA, { sx: { bgcolor: "background.paper" }, children: [
8263
8263
  I.map((f, E) => /* @__PURE__ */ s(h.Fragment, { children: [
8264
8264
  /* @__PURE__ */ e(pi, { activity: f, onActivityClick: c, showOrdinal: !0 }),
8265
- /* @__PURE__ */ e(G, { variant: E < I.length - 1 ? "inset" : "fullWidth" })
8265
+ /* @__PURE__ */ e(M, { variant: E < I.length - 1 ? "inset" : "fullWidth" })
8266
8266
  ] }, f.sequenceGuid)),
8267
8267
  /* @__PURE__ */ e(xa, { isIncome: !0, label: A.add_income, onAddActivity: d })
8268
8268
  ] });
@@ -8290,16 +8290,16 @@ const Ra = ({ transaction: A }) => {
8290
8290
  A === 1 && /* @__PURE__ */ e(Jn, {})
8291
8291
  ] });
8292
8292
  }, Da = C(dE), Ft = (A, t) => A + t.amount, tn = (A) => A.activityType === TA.Income && mt(A.expectedDate, {
8293
- start: QA(fA()),
8293
+ start: qA(fA()),
8294
8294
  end: BA(fA())
8295
8295
  }), di = (A) => A.activityType === TA.Expense && mt(A.expectedDate, {
8296
- start: QA(fA()),
8296
+ start: qA(fA()),
8297
8297
  end: BA(fA())
8298
8298
  }), nn = (A) => A.occurredOnDate && mt(A.occurredOnDate, {
8299
- start: QA(/* @__PURE__ */ new Date()),
8299
+ start: qA(/* @__PURE__ */ new Date()),
8300
8300
  end: We(fA(), 30)
8301
8301
  }) || mt(A.expectedDate, {
8302
- start: QA(/* @__PURE__ */ new Date()),
8302
+ start: qA(/* @__PURE__ */ new Date()),
8303
8303
  end: We(fA(), 30)
8304
8304
  }), EE = ({ day: A, outsideCurrentMonth: t, ...i }) => {
8305
8305
  const { recurring: n } = p(), { selectedAccountGuids: r } = wA(), { activities: o, setSelectedDay: a } = ZA(), c = h.useMemo(
@@ -8385,7 +8385,7 @@ const Ra = ({ transaction: A }) => {
8385
8385
  Oi,
8386
8386
  {
8387
8387
  maxDate: BA(Re(/* @__PURE__ */ new Date(), 1)),
8388
- minDate: QA(/* @__PURE__ */ new Date()),
8388
+ minDate: qA(/* @__PURE__ */ new Date()),
8389
8389
  onMonthChange: o,
8390
8390
  showDaysOutsideCurrentMonth: !0,
8391
8391
  slots: {
@@ -8465,7 +8465,7 @@ const Ra = ({ transaction: A }) => {
8465
8465
  },
8466
8466
  c.expectedDate.toString() + d
8467
8467
  ),
8468
- /* @__PURE__ */ e(G, { sx: { mx: 24 } })
8468
+ /* @__PURE__ */ e(M, { sx: { mx: 24 } })
8469
8469
  ] })) : I.map((c) => /* @__PURE__ */ s(J, { children: [
8470
8470
  /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(
8471
8471
  aA,
@@ -8485,11 +8485,11 @@ const Ra = ({ transaction: A }) => {
8485
8485
  },
8486
8486
  d.expectedDate.toString() + f
8487
8487
  ),
8488
- f !== c.activities.length - 1 && /* @__PURE__ */ e(G, { sx: { ml: 64, mr: 24 } })
8488
+ f !== c.activities.length - 1 && /* @__PURE__ */ e(M, { sx: { ml: 64, mr: 24 } })
8489
8489
  ] }))
8490
8490
  }
8491
8491
  ) }, c.id),
8492
- /* @__PURE__ */ e(G, { sx: { mx: 24 } })
8492
+ /* @__PURE__ */ e(M, { sx: { mx: 24 } })
8493
8493
  ] })) })
8494
8494
  ] });
8495
8495
  }, Kt = C(PE), bE = ({
@@ -8509,15 +8509,15 @@ const Ra = ({ transaction: A }) => {
8509
8509
  /* @__PURE__ */ s(L, { children: [
8510
8510
  /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: `${r} ${A}` }),
8511
8511
  /* @__PURE__ */ s(P, { direction: "row", gap: 2, mb: 8, children: [
8512
- /* @__PURE__ */ e(R, { bold: !0, variant: "XSmall", children: M(i, "0,0.00") }),
8512
+ /* @__PURE__ */ e(R, { bold: !0, variant: "XSmall", children: N(i, "0,0.00") }),
8513
8513
  /* @__PURE__ */ e(R, { variant: "XSmall", children: a.paid?.toLowerCase() }),
8514
8514
  n !== void 0 && /* @__PURE__ */ s(J, { children: [
8515
8515
  /* @__PURE__ */ e(R, { variant: "XSmall", children: "/" }),
8516
- /* @__PURE__ */ e(R, { bold: !0, variant: "XSmall", children: M(n, "0,0.00") }),
8516
+ /* @__PURE__ */ e(R, { bold: !0, variant: "XSmall", children: N(n, "0,0.00") }),
8517
8517
  /* @__PURE__ */ e(R, { variant: "XSmall", children: a.missed?.toLowerCase() })
8518
8518
  ] }),
8519
8519
  /* @__PURE__ */ e(R, { variant: "XSmall", children: "/" }),
8520
- /* @__PURE__ */ e(R, { bold: !0, variant: "XSmall", children: M(t, "0,0.00") }),
8520
+ /* @__PURE__ */ e(R, { bold: !0, variant: "XSmall", children: N(t, "0,0.00") }),
8521
8521
  /* @__PURE__ */ e(R, { variant: "XSmall", children: a.expected })
8522
8522
  ] })
8523
8523
  ] }),
@@ -8534,13 +8534,13 @@ const Ra = ({ transaction: A }) => {
8534
8534
  selectedDayActivities: I,
8535
8535
  setSelectedDay: c,
8536
8536
  upcomingActivities: d
8537
- } = ZA(), [f, E] = h.useState(0), { onEvent: l } = K(), v = n.filter(nn), u = o.filter(nn), H = r.filter(nn), b = v.filter(di).reduce(Ft, 0), g = u.filter(di).reduce(Ft, 0), y = H.filter(di).reduce(Ft, 0), x = v.filter(di).length, w = v.filter(tn).reduce(Ft, 0), j = u.filter(tn).reduce(Ft, 0), D = v.filter(tn).length, m = (tA, Y) => {
8537
+ } = ZA(), [f, E] = h.useState(0), { onEvent: l } = K(), v = n.filter(nn), u = o.filter(nn), H = r.filter(nn), b = v.filter(di).reduce(Ft, 0), X = u.filter(di).reduce(Ft, 0), y = H.filter(di).reduce(Ft, 0), x = v.filter(di).length, w = v.filter(tn).reduce(Ft, 0), D = u.filter(tn).reduce(Ft, 0), j = v.filter(tn).length, m = (tA, Y) => {
8538
8538
  E(Y);
8539
8539
  }, O = (tA) => {
8540
8540
  l(V.RECURRING_ACTIVITY_CLICK_UPCOMING, {
8541
8541
  transaction_guid: tA.transactionGuid
8542
8542
  });
8543
- }, N = (tA) => {
8543
+ }, G = (tA) => {
8544
8544
  l(V.RECURRING_ACTIVITY_CLICK_PAID, {
8545
8545
  transaction_guid: tA.transactionGuid
8546
8546
  });
@@ -8552,7 +8552,7 @@ const Ra = ({ transaction: A }) => {
8552
8552
  {
8553
8553
  expected: b,
8554
8554
  missed: y,
8555
- paid: g,
8555
+ paid: X,
8556
8556
  title: A.expenses,
8557
8557
  total: x
8558
8558
  }
@@ -8561,9 +8561,9 @@ const Ra = ({ transaction: A }) => {
8561
8561
  Jr,
8562
8562
  {
8563
8563
  expected: w,
8564
- paid: j,
8564
+ paid: D,
8565
8565
  title: A.deposits,
8566
- total: D
8566
+ total: j
8567
8567
  }
8568
8568
  ),
8569
8569
  !i && !t && /* @__PURE__ */ e(
@@ -8596,7 +8596,7 @@ const Ra = ({ transaction: A }) => {
8596
8596
  onActivityClick: O
8597
8597
  }
8598
8598
  ),
8599
- f === 1 && /* @__PURE__ */ e(Kt, { activities: u, onActivityClick: N })
8599
+ f === 1 && /* @__PURE__ */ e(Kt, { activities: u, onActivityClick: G })
8600
8600
  ] })
8601
8601
  ] }) }),
8602
8602
  !i && !t && /* @__PURE__ */ e(tt, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ s(P, { gap: 35, children: [
@@ -8605,7 +8605,7 @@ const Ra = ({ transaction: A }) => {
8605
8605
  Kt,
8606
8606
  {
8607
8607
  activities: I || u,
8608
- onActivityClick: N,
8608
+ onActivityClick: G,
8609
8609
  onResetClick: a ? () => c(a) : void 0,
8610
8610
  title: a ? z(
8611
8611
  A.day_transactions,
@@ -8672,7 +8672,7 @@ const Ra = ({ transaction: A }) => {
8672
8672
  ), { availableWidth: I } = Xt(), c = I < 750;
8673
8673
  return /* @__PURE__ */ s(P, { flexDirection: c ? "column" : "row", width: "100%", children: [
8674
8674
  /* @__PURE__ */ e(ja, {}),
8675
- !c && /* @__PURE__ */ e(G, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
8675
+ !c && /* @__PURE__ */ e(M, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
8676
8676
  /* @__PURE__ */ e(
8677
8677
  Kt,
8678
8678
  {
@@ -8832,7 +8832,7 @@ class wE {
8832
8832
  loadExpectedEvents = async () => {
8833
8833
  try {
8834
8834
  const t = await this.cashflowApi.getProjectedCashflowEvents(
8835
- QA(fA()),
8835
+ qA(fA()),
8836
8836
  We(fA(), 30)
8837
8837
  );
8838
8838
  U(() => {
@@ -8930,7 +8930,7 @@ const yE = {
8930
8930
  name: "balance",
8931
8931
  placeholder: z(t.enter_value, t.account_balance),
8932
8932
  type: de.Currency,
8933
- valueFormatter: (r) => M(r, "0,0.00")
8933
+ valueFormatter: (r) => N(r, "0,0.00")
8934
8934
  });
8935
8935
  const n = Object.keys(eA).filter((r) => Number(r)).map((r) => ({
8936
8936
  label: t.account_types[r],
@@ -8978,7 +8978,7 @@ const yE = {
8978
8978
  name: "minimum_payment",
8979
8979
  placeholder: z(t.enter_value, t.minimum_payment),
8980
8980
  type: de.Currency,
8981
- valueFormatter: (n) => M(n, "0,0.00")
8981
+ valueFormatter: (n) => N(n, "0,0.00")
8982
8982
  }), A.payment_due_at ? i.push({
8983
8983
  label: t.next_payment,
8984
8984
  name: "payment_due_at",
@@ -9001,21 +9001,21 @@ const yE = {
9001
9001
  name: "credit_limit",
9002
9002
  placeholder: z(t.enter_value, t.credit_limit),
9003
9003
  type: de.Currency,
9004
- valueFormatter: (n) => M(n, "0,0.00")
9004
+ valueFormatter: (n) => N(n, "0,0.00")
9005
9005
  }), OE(A) && i.push({
9006
9006
  label: t.original_balance,
9007
9007
  minAmount: 1,
9008
9008
  name: "original_balance",
9009
9009
  placeholder: z(t.enter_value, t.original_balance),
9010
9010
  type: de.Currency,
9011
- valueFormatter: (n) => M(n, "0,0.00")
9011
+ valueFormatter: (n) => N(n, "0,0.00")
9012
9012
  }), i;
9013
9013
  }, ma = (A, t) => {
9014
9014
  let i = "", n = null, r = null, o = null, a = !1;
9015
9015
  switch (A.account_type) {
9016
9016
  case 1:
9017
9017
  case 2: {
9018
- A.available_balance ? (i = t.available_balance, n = A.available_balance, r = A.available_balance ? t.current_balance : null, o = M(A.balance, "0,0.00"), a = !0) : (i = t.current_balance, n = A.balance);
9018
+ A.available_balance ? (i = t.available_balance, n = A.available_balance, r = A.available_balance ? t.current_balance : null, o = N(A.balance, "0,0.00"), a = !0) : (i = t.current_balance, n = A.balance);
9019
9019
  break;
9020
9020
  }
9021
9021
  default:
@@ -9023,10 +9023,10 @@ const yE = {
9023
9023
  const I = typeof A.payment_due_at == "number" ? new Date(A.payment_due_at * 1e3) : A.payment_due_at;
9024
9024
  r = /* @__PURE__ */ e(R, { component: "strong", variant: "XSmall", children: z(
9025
9025
  t.payment_due_on,
9026
- M(A.minimum_payment, "0,0.00"),
9026
+ N(A.minimum_payment, "0,0.00"),
9027
9027
  oA(I, iA.FULL_MONTH_DAY)
9028
9028
  ) });
9029
- } else A.credit_limit && (r = t.available_credit, o = M(A.credit_limit, "0,0.00"));
9029
+ } else A.credit_limit && (r = t.available_credit, o = N(A.credit_limit, "0,0.00"));
9030
9030
  }
9031
9031
  return {
9032
9032
  firstSubtitle: i,
@@ -9073,7 +9073,7 @@ const yE = {
9073
9073
  secondary: /* @__PURE__ */ s(J, { children: [
9074
9074
  /* @__PURE__ */ s(L, { sx: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
9075
9075
  /* @__PURE__ */ e(R, { variant: "XSmall", children: o }),
9076
- /* @__PURE__ */ e(R, { bold: !0, variant: "Small", children: M(a, "0,0.00") })
9076
+ /* @__PURE__ */ e(R, { bold: !0, variant: "Small", children: N(a, "0,0.00") })
9077
9077
  ] }),
9078
9078
  /* @__PURE__ */ s(L, { sx: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
9079
9079
  /* @__PURE__ */ e(R, { variant: "XSmall", children: I }),
@@ -9117,7 +9117,7 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9117
9117
  }
9118
9118
  )
9119
9119
  ] }),
9120
- /* @__PURE__ */ e(G, {})
9120
+ /* @__PURE__ */ e(M, {})
9121
9121
  ] }), _r = C(GE), ME = ({ total: A, type: t }) => {
9122
9122
  const { cashflow: i } = p();
9123
9123
  return /* @__PURE__ */ s(J, { children: [
@@ -9137,12 +9137,12 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9137
9137
  /* @__PURE__ */ e(R, { bold: !0, sx: { fontSize: 12 }, children: t === ri.EXPENSE ? i.expenses : i.income }),
9138
9138
  /* @__PURE__ */ s(R, { bold: !0, sx: { fontSize: 13 }, children: [
9139
9139
  t === ri.EXPENSE ? "-" : "+",
9140
- M(A, "0,0.00")
9140
+ N(A, "0,0.00")
9141
9141
  ] })
9142
9142
  ]
9143
9143
  }
9144
9144
  ),
9145
- /* @__PURE__ */ e(G, {})
9145
+ /* @__PURE__ */ e(M, {})
9146
9146
  ] });
9147
9147
  }, $r = C(ME), Ao = (A, t) => (i) => i.accountGuid === A.guid && (On(i.expectedDate) || Ot(i.expectedDate, t.start)) && mA(i.expectedDate, t.end), NE = () => {
9148
9148
  const { availableWidth: A } = Xt(), { cashflow: t } = p(), { upcomingExpenses: i, upcomingIncome: n } = ZA(), { dateRange: r, selectedCashAccounts: o } = Tt();
@@ -9187,7 +9187,7 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9187
9187
  }
9188
9188
  }
9189
9189
  ),
9190
- /* @__PURE__ */ e(G, {}),
9190
+ /* @__PURE__ */ e(M, {}),
9191
9191
  I.length > 0 && /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(
9192
9192
  aA,
9193
9193
  {
@@ -9242,21 +9242,21 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9242
9242
  flex: 1,
9243
9243
  headerName: i.balance,
9244
9244
  type: "number",
9245
- renderCell: (d) => M(d.value, "0,0.00")
9245
+ renderCell: (d) => N(d.value, "0,0.00")
9246
9246
  },
9247
9247
  {
9248
9248
  field: "income",
9249
9249
  flex: 1,
9250
9250
  headerName: i.projected_income,
9251
9251
  type: "number",
9252
- renderCell: (d) => `+${M(d.value, "0,0.00")}`
9252
+ renderCell: (d) => `+${N(d.value, "0,0.00")}`
9253
9253
  },
9254
9254
  {
9255
9255
  field: "expenses",
9256
9256
  flex: 1.1,
9257
9257
  headerName: i.projected_expenses,
9258
9258
  type: "number",
9259
- renderCell: (d) => `-${M(d.value, "0,0.00")}`
9259
+ renderCell: (d) => `-${N(d.value, "0,0.00")}`
9260
9260
  },
9261
9261
  {
9262
9262
  field: "remaining",
@@ -9270,7 +9270,7 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9270
9270
  {
9271
9271
  color: Math.sign(f) === -1 ? t.palette.error.main : t.palette.text.primary,
9272
9272
  variant: "Small",
9273
- children: M(f, "0,0.00")
9273
+ children: N(f, "0,0.00")
9274
9274
  }
9275
9275
  );
9276
9276
  }
@@ -9383,7 +9383,7 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9383
9383
  ]
9384
9384
  }
9385
9385
  ),
9386
- /* @__PURE__ */ e(G, { sx: { width: "100%" } }),
9386
+ /* @__PURE__ */ e(M, { sx: { width: "100%" } }),
9387
9387
  /* @__PURE__ */ s(
9388
9388
  P,
9389
9389
  {
@@ -9398,7 +9398,7 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9398
9398
  ]
9399
9399
  }
9400
9400
  ),
9401
- /* @__PURE__ */ e(G, { sx: { width: "100%" } }),
9401
+ /* @__PURE__ */ e(M, { sx: { width: "100%" } }),
9402
9402
  /* @__PURE__ */ s(
9403
9403
  P,
9404
9404
  {
@@ -9413,7 +9413,7 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9413
9413
  ]
9414
9414
  }
9415
9415
  ),
9416
- /* @__PURE__ */ e(G, { sx: { width: "100%" } }),
9416
+ /* @__PURE__ */ e(M, { sx: { width: "100%" } }),
9417
9417
  /* @__PURE__ */ e(
9418
9418
  P,
9419
9419
  {
@@ -9511,9 +9511,9 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9511
9511
  ), l = h.useMemo(
9512
9512
  () => c.reduce((y, x) => y + (x?.balance || 0), 0),
9513
9513
  [c]
9514
- ), v = f.reduce((y, x) => y + x.amount, 0), u = E.reduce((y, x) => y + x.amount, 0), H = l - v + u, b = o.length > 0 && d?.has_completed_cash_flow_onboarding, g = i < 725;
9515
- return /* @__PURE__ */ s(P, { flexDirection: "row", gap: 24, justifyContent: "center", my: g ? 24 : 42, children: [
9516
- g ? /* @__PURE__ */ s(P, { border: "1px solid", borderColor: "border.light", borderRadius: 1, mx: 16, width: "100%", children: [
9514
+ ), v = f.reduce((y, x) => y + x.amount, 0), u = E.reduce((y, x) => y + x.amount, 0), H = l - v + u, b = o.length > 0 && d?.has_completed_cash_flow_onboarding, X = i < 725;
9515
+ return /* @__PURE__ */ s(P, { flexDirection: "row", gap: 24, justifyContent: "center", my: X ? 24 : 42, children: [
9516
+ X ? /* @__PURE__ */ s(P, { border: "1px solid", borderColor: "border.light", borderRadius: 1, mx: 16, width: "100%", children: [
9517
9517
  /* @__PURE__ */ e(
9518
9518
  It,
9519
9519
  {
@@ -9522,7 +9522,7 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9522
9522
  label: n.cash_and_bank
9523
9523
  }
9524
9524
  ),
9525
- /* @__PURE__ */ e(G, {}),
9525
+ /* @__PURE__ */ e(M, {}),
9526
9526
  b ? /* @__PURE__ */ e(
9527
9527
  It,
9528
9528
  {
@@ -9540,7 +9540,7 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9540
9540
  children: n.add_income
9541
9541
  }
9542
9542
  ),
9543
- /* @__PURE__ */ e(G, {}),
9543
+ /* @__PURE__ */ e(M, {}),
9544
9544
  /* @__PURE__ */ e(
9545
9545
  It,
9546
9546
  {
@@ -9550,7 +9550,7 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9550
9550
  symbol: "-"
9551
9551
  }
9552
9552
  ),
9553
- /* @__PURE__ */ e(G, {}),
9553
+ /* @__PURE__ */ e(M, {}),
9554
9554
  /* @__PURE__ */ e(
9555
9555
  It,
9556
9556
  {
@@ -9702,15 +9702,15 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9702
9702
  transform: rotate(360deg);
9703
9703
  }
9704
9704
  `, Ah = () => {
9705
- const { addCashflowEvent: A, addCashflowSequence: t, cashflowSequences: i } = ZA(), { cashflow: n, common: r } = p(), { completeOnboarding: o } = Tn(), { isDirty: a } = Tt(), { isMobile: I } = zA(), { setDisplayedDate: c } = wA(), { filter: d, setFilter: f, transactions: E } = PA(), l = uA(), [v, u] = Fe(!0), [H, b] = h.useState(F.EveryMonth), [g, y] = Fe(!1), [x, w] = h.useState(null), [j, D] = Fe(1), [m, O] = Fe([]), [N, tA] = Fe(""), Y = h.useMemo(
9706
- () => E.find((Z) => Z.guid === N),
9707
- [N]
9705
+ const { addCashflowEvent: A, addCashflowSequence: t, cashflowSequences: i } = ZA(), { cashflow: n, common: r } = p(), { completeOnboarding: o } = Tn(), { isDirty: a } = Tt(), { isMobile: I } = zA(), { setDisplayedDate: c } = wA(), { filter: d, setFilter: f, transactions: E } = PA(), l = uA(), [v, u] = Fe(!0), [H, b] = h.useState(F.EveryMonth), [X, y] = Fe(!1), [x, w] = h.useState(null), [D, j] = Fe(1), [m, O] = Fe([]), [G, tA] = Fe(""), Y = h.useMemo(
9706
+ () => E.find((Z) => Z.guid === G),
9707
+ [G]
9708
9708
  ), AA = !!i.length, rA = async () => {
9709
- D(2), c(
9709
+ j(2), c(
9710
9710
  // Beginning of the month, 90 days before today
9711
- QA(Ve(fA(), 90)),
9711
+ qA(Ve(fA(), 90)),
9712
9712
  fA()
9713
- ), f({ ...d, custom: ni }), D(3);
9713
+ ), f({ ...d, custom: ni }), j(3);
9714
9714
  }, sA = async () => {
9715
9715
  if (!(m.length < 1)) {
9716
9716
  y(!0);
@@ -9742,7 +9742,7 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9742
9742
  py: 24
9743
9743
  },
9744
9744
  children: [
9745
- j === 1 && /* @__PURE__ */ e(
9745
+ D === 1 && /* @__PURE__ */ e(
9746
9746
  L,
9747
9747
  {
9748
9748
  sx: {
@@ -9751,7 +9751,7 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9751
9751
  children: /* @__PURE__ */ e(kE, { handleNextStep: rA })
9752
9752
  }
9753
9753
  ),
9754
- j === 2 && /* @__PURE__ */ e(
9754
+ D === 2 && /* @__PURE__ */ e(
9755
9755
  L,
9756
9756
  {
9757
9757
  sx: {
@@ -9760,7 +9760,7 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9760
9760
  children: /* @__PURE__ */ e(JE, {})
9761
9761
  }
9762
9762
  ),
9763
- j === 3 && /* @__PURE__ */ s(
9763
+ D === 3 && /* @__PURE__ */ s(
9764
9764
  L,
9765
9765
  {
9766
9766
  sx: {
@@ -9775,10 +9775,10 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9775
9775
  XA(Z.nextDate || Z.date)
9776
9776
  ) }),
9777
9777
  /* @__PURE__ */ e(Sn, { transaction: Z }),
9778
- gA !== m.length - 1 && /* @__PURE__ */ e(G, {})
9778
+ gA !== m.length - 1 && /* @__PURE__ */ e(M, {})
9779
9779
  ] }, Z.guid)) }),
9780
9780
  /* @__PURE__ */ s(P, { alignItems: "center", direction: "row", children: [
9781
- /* @__PURE__ */ e(G, { sx: { flexGrow: 1 } }),
9781
+ /* @__PURE__ */ e(M, { sx: { flexGrow: 1 } }),
9782
9782
  /* @__PURE__ */ e(
9783
9783
  $,
9784
9784
  {
@@ -9845,9 +9845,9 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9845
9845
  /* @__PURE__ */ e(
9846
9846
  $,
9847
9847
  {
9848
- "aria-disabled": m.length < 1 || g,
9848
+ "aria-disabled": m.length < 1 || X,
9849
9849
  onClick: sA,
9850
- startIcon: g ? /* @__PURE__ */ e(
9850
+ startIcon: X ? /* @__PURE__ */ e(
9851
9851
  q,
9852
9852
  {
9853
9853
  name: "progress_activity",
@@ -9879,10 +9879,10 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(J, { children: [
9879
9879
  return h.useEffect(() => {
9880
9880
  r(c);
9881
9881
  }, [c]), h.useEffect(() => {
9882
- const b = c.map((y) => y.guid), g = i.filter(
9882
+ const b = c.map((y) => y.guid), X = i.filter(
9883
9883
  (y) => n.includes(y.guid) && b.includes(y.guid)
9884
9884
  );
9885
- l(g), d({ accounts: g.map((y) => y.guid) });
9885
+ l(X), d({ accounts: X.map((y) => y.guid) });
9886
9886
  }, [c, i]), f?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ s(
9887
9887
  Le,
9888
9888
  {
@@ -10042,18 +10042,18 @@ function oh(A, t, i = 0) {
10042
10042
  const u = (l.interest_rate ?? 0) / 100 / 12, H = l.balance * u;
10043
10043
  let b = l.monthly_payment ?? 0;
10044
10044
  E === 0 && i && (b += i), l.balance += H;
10045
- const g = Math.min(l.balance, b + o);
10046
- if (g <= H) {
10045
+ const X = Math.min(l.balance, b + o);
10046
+ if (X <= H) {
10047
10047
  l.is_impossible = !0;
10048
10048
  continue;
10049
10049
  }
10050
- l.balance -= g, l.balance = l.balance < 0.01 ? 0 : l.balance, r += H, l.balance <= 0 && (o += b), g > 0 && (f = !0);
10050
+ l.balance -= X, l.balance = l.balance < 0.01 ? 0 : l.balance, r += H, l.balance <= 0 && (o += b), X > 0 && (f = !0);
10051
10051
  }
10052
10052
  f && I.setMonth(I.getMonth() + 1);
10053
10053
  }
10054
10054
  const c = n.some((f) => f.is_impossible && f.balance > 0), d = rs({ start: a, end: I });
10055
10055
  return {
10056
- payoffSavings: c ? "N/A" : M(r, "0,0.00"),
10056
+ payoffSavings: c ? "N/A" : N(r, "0,0.00"),
10057
10057
  payoffDate: c ? "Never" : oA(I, iA.MONTH_YEAR),
10058
10058
  payoffDuration: c ? "Stagnant" : os(d, { format: ["years", "months"] }) || "0 months"
10059
10059
  };
@@ -10480,9 +10480,9 @@ const ke = () => {
10480
10480
  if (!h.useContext(gt))
10481
10481
  throw new Error("useCategoryUiStore() must be used within the GlobalDataContext");
10482
10482
  return CA().uiStore;
10483
- }, Wi = (A) => A.top_level_category_guid === X.INCOME || A.category_guid === X.INCOME, fh = (A) => !Wi(A) && !Qa(A), La = (A) => Hr.includes(A.top_level_category_guid) || Hr.includes(A.category_guid), Qa = (A) => A.top_level_category_guid === X.TRANSFER || A.category_guid === X.TRANSFER, dh = (A) => !Wi(A) && !La(A) && !Qa(A), Eh = (A) => A.filter((t) => t.category_guid === t.top_level_category_guid), $n = (A, t) => {
10483
+ }, Wi = (A) => A.top_level_category_guid === g.INCOME || A.category_guid === g.INCOME, fh = (A) => !Wi(A) && !Qa(A), La = (A) => Hr.includes(A.top_level_category_guid) || Hr.includes(A.category_guid), Qa = (A) => A.top_level_category_guid === g.TRANSFER || A.category_guid === g.TRANSFER, dh = (A) => !Wi(A) && !La(A) && !Qa(A), Eh = (A) => A.filter((t) => t.category_guid === t.top_level_category_guid), $n = (A, t) => {
10484
10484
  const i = [];
10485
- let n = QA(Ne(/* @__PURE__ */ new Date(), 5));
10485
+ let n = qA(Ne(/* @__PURE__ */ new Date(), 5));
10486
10486
  const r = /* @__PURE__ */ new Date();
10487
10487
  for (; mA(n, r); )
10488
10488
  i.push({
@@ -10501,9 +10501,9 @@ const ke = () => {
10501
10501
  return $n(i);
10502
10502
  }, Rh = (A) => {
10503
10503
  const t = [], i = A.filter(
10504
- (o) => o.top_level_category_guid !== X.INCOME && o.top_level_category_guid !== X.TRANSFER && o.total > 0
10504
+ (o) => o.top_level_category_guid !== g.INCOME && o.top_level_category_guid !== g.TRANSFER && o.total > 0
10505
10505
  );
10506
- let n = QA(Ne(/* @__PURE__ */ new Date(), 5));
10506
+ let n = qA(Ne(/* @__PURE__ */ new Date(), 5));
10507
10507
  const r = BA(/* @__PURE__ */ new Date());
10508
10508
  for (; mA(n, r); )
10509
10509
  t.push({
@@ -10517,19 +10517,19 @@ const ke = () => {
10517
10517
  }, Ph = (A, t, i) => {
10518
10518
  const [n, r] = A, o = n, a = r ?? n, I = [];
10519
10519
  if (o && a && Qn.includes(t)) {
10520
- const c = M(o[o.length - 1].y, "0,0");
10520
+ const c = N(o[o.length - 1].y, "0,0");
10521
10521
  I.push(`${i.income_label} ${c}`);
10522
10522
  } else if (qn.includes(t)) {
10523
- const c = M(o[o.length - 1].y, "0,0");
10523
+ const c = N(o[o.length - 1].y, "0,0");
10524
10524
  I.push(`${i.payments_label} ${c}`);
10525
10525
  }
10526
10526
  if (a && Gn.includes(t)) {
10527
- const c = M(a[a.length - 1].y, "0,0");
10527
+ const c = N(a[a.length - 1].y, "0,0");
10528
10528
  I.push(`${i.spending_label} ${c}`);
10529
10529
  }
10530
10530
  return I;
10531
10531
  }, bh = () => {
10532
- const A = oe(), { selectedAccount: t } = Xe(), { monthlyCategoryTotals: i } = qA(), { trends: n } = p(), r = [A.palette.chart?.chart1, A.palette.chart?.chart2], o = uh(i, t.account_type), a = Ph(o, t.account_type, n), I = [eA.LOAN, eA.MORTGAGE].includes(t.account_type);
10532
+ const A = oe(), { selectedAccount: t } = Xe(), { monthlyCategoryTotals: i } = LA(), { trends: n } = p(), r = [A.palette.chart?.chart1, A.palette.chart?.chart2], o = uh(i, t.account_type), a = Ph(o, t.account_type, n), I = [eA.LOAN, eA.MORTGAGE].includes(t.account_type);
10533
10533
  return /* @__PURE__ */ e("div", { "data-testid": "TrendsChart", children: /* @__PURE__ */ e(
10534
10534
  Nn,
10535
10535
  {
@@ -10542,7 +10542,7 @@ const ke = () => {
10542
10542
  }
10543
10543
  ) });
10544
10544
  }, Hh = C(bh), zh = ({ sx: A }) => {
10545
- const { loadMonthlyCategoryTotals: t } = qA(), { isInitialized: i } = oi(), { selectedAccount: n } = Xe(), [r, o] = h.useState(!1);
10545
+ const { loadMonthlyCategoryTotals: t } = LA(), { isInitialized: i } = oi(), { selectedAccount: n } = Xe(), [r, o] = h.useState(!1);
10546
10546
  return h.useEffect(() => {
10547
10547
  i && t([n]).finally(() => {
10548
10548
  o(!0);
@@ -10593,7 +10593,7 @@ const ke = () => {
10593
10593
  /* @__PURE__ */ e(lt, { children: i.name || i.feed_name }),
10594
10594
  /* @__PURE__ */ s(P, { direction: "row", justifyContent: "space-between", children: [
10595
10595
  /* @__PURE__ */ e(R, { bold: a, variant: "Body", children: r }),
10596
- /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: M(o, "0,0.00") })
10596
+ /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: N(o, "0,0.00") })
10597
10597
  ] }),
10598
10598
  /* @__PURE__ */ s(P, { direction: "row", justifyContent: "space-between", children: [
10599
10599
  /* @__PURE__ */ e(R, { variant: "Small", children: I }),
@@ -10622,26 +10622,26 @@ const qa = ({
10622
10622
  }) => {
10623
10623
  const I = oe(), { onEvent: c } = K(), d = n.filter((w) => !w.is_impossible), f = [
10624
10624
  ...new Set(
10625
- d.flatMap((w) => w.dataset.map((j) => new Date(j.x).getTime()))
10625
+ d.flatMap((w) => w.dataset.map((D) => new Date(D.x).getTime()))
10626
10626
  )
10627
- ].sort((w, j) => w - j).map((w) => new Date(w)), E = d.map((w) => {
10628
- const j = new Map(w.dataset.map((O) => [new Date(O.x).getTime(), O.y]));
10629
- let D = j.get(f[0].getTime()) ?? 0;
10627
+ ].sort((w, D) => w - D).map((w) => new Date(w)), E = d.map((w) => {
10628
+ const D = new Map(w.dataset.map((O) => [new Date(O.x).getTime(), O.y]));
10629
+ let j = D.get(f[0].getTime()) ?? 0;
10630
10630
  const m = f.map((O) => {
10631
- const N = j.get(O.getTime()) ?? D;
10632
- return D = N, { x: O, y: N };
10631
+ const G = D.get(O.getTime()) ?? j;
10632
+ return j = G, { x: O, y: G };
10633
10633
  });
10634
10634
  return { ...w, dataset: m };
10635
10635
  }), l = E.reduce(
10636
- (w, j) => w + (j.dataset[0]?.y ?? 0),
10636
+ (w, D) => w + (D.dataset[0]?.y ?? 0),
10637
10637
  0
10638
- ), v = f.map((w, j) => {
10639
- const D = j / (f.length - 1), m = l * (1 - D);
10638
+ ), v = f.map((w, D) => {
10639
+ const j = D / (f.length - 1), m = l * (1 - j);
10640
10640
  return { x: w, y: m };
10641
- }), u = Math.ceil(l / 100) * 100, H = f, b = E.map((w, j) => {
10642
- const D = 1 - j / E.length * 0.5, m = ph(Xh, D);
10641
+ }), u = Math.ceil(l / 100) * 100, H = f, b = E.map((w, D) => {
10642
+ const j = 1 - D / E.length * 0.5, m = ph(Xh, j);
10643
10643
  return {
10644
- id: `debt-${j}`,
10644
+ id: `debt-${D}`,
10645
10645
  guid: w.guid,
10646
10646
  label: w.name,
10647
10647
  data: w.dataset.map((O) => O.y),
@@ -10664,21 +10664,21 @@ const qa = ({
10664
10664
  showMark: !1,
10665
10665
  disableHighlight: !0
10666
10666
  });
10667
- const g = (w) => b.findIndex((j) => j?.guid === w);
10667
+ const X = (w) => b.findIndex((D) => D?.guid === w);
10668
10668
  return /* @__PURE__ */ e(
10669
10669
  jo,
10670
10670
  {
10671
10671
  axisHighlight: { x: "none" },
10672
10672
  disableLineItemHighlight: !0,
10673
10673
  height: t,
10674
- onAreaClick: (w, j) => {
10674
+ onAreaClick: (w, D) => {
10675
10675
  o?.();
10676
- const D = b.find((m) => m.id === j.seriesId);
10677
- c(V.DEBTS_CLICK_CHART_AREA, { account_guid: D?.guid });
10676
+ const j = b.find((m) => m.id === D.seriesId);
10677
+ c(V.DEBTS_CLICK_CHART_AREA, { account_guid: j?.guid });
10678
10678
  },
10679
10679
  onHighlightChange: (w) => {
10680
- const j = b.find((D) => D.id === w?.seriesId)?.guid;
10681
- a?.(j ?? "");
10680
+ const D = b.find((j) => j.id === w?.seriesId)?.guid;
10681
+ a?.(D ?? "");
10682
10682
  },
10683
10683
  series: b,
10684
10684
  skipAnimation: !0,
@@ -10704,10 +10704,10 @@ const qa = ({
10704
10704
  strokeDasharray: "10 5",
10705
10705
  strokeWidth: 1
10706
10706
  },
10707
- [`& .MuiLineElement-series-debt-${g(r ?? "0")}`]: {
10707
+ [`& .MuiLineElement-series-debt-${X(r ?? "0")}`]: {
10708
10708
  opacity: 1
10709
10709
  },
10710
- [`& .MuiAreaElement-series-debt-${g(r ?? "0")}`]: {
10710
+ [`& .MuiAreaElement-series-debt-${X(r ?? "0")}`]: {
10711
10711
  opacity: 1
10712
10712
  },
10713
10713
  ...A
@@ -10728,7 +10728,7 @@ const qa = ({
10728
10728
  min: 0,
10729
10729
  max: u,
10730
10730
  disableTicks: !0,
10731
- valueFormatter: (w) => M(w, "0a")
10731
+ valueFormatter: (w) => N(w, "0a")
10732
10732
  }
10733
10733
  ]
10734
10734
  }
@@ -10793,7 +10793,7 @@ const qa = ({
10793
10793
  /* @__PURE__ */ e(R, { color: A.palette.secondary.main, variant: "XSmall", children: i.schedule_month_label })
10794
10794
  ] }),
10795
10795
  /* @__PURE__ */ s(P, { children: [
10796
- /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: M(I, "0,0.00") }),
10796
+ /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: N(I, "0,0.00") }),
10797
10797
  /* @__PURE__ */ e(
10798
10798
  R,
10799
10799
  {
@@ -10801,7 +10801,7 @@ const qa = ({
10801
10801
  color: A.palette.success.main,
10802
10802
  textAlign: "end",
10803
10803
  variant: "Tiny",
10804
- children: `+${M(c, "0,0")}`
10804
+ children: `+${N(c, "0,0")}`
10805
10805
  }
10806
10806
  )
10807
10807
  ] })
@@ -10876,7 +10876,7 @@ const qa = ({
10876
10876
  onCancel: f,
10877
10877
  onSave: d,
10878
10878
  primaryText: t.details_monthly_payment,
10879
- secondaryText: M(A.monthly_payment, "0,0"),
10879
+ secondaryText: N(A.monthly_payment, "0,0"),
10880
10880
  zeroStateText: A.monthly_payment ? void 0 : t.add_monthly_payment,
10881
10881
  children: /* @__PURE__ */ e(
10882
10882
  qe,
@@ -10910,7 +10910,7 @@ const qa = ({
10910
10910
  onCancel: f,
10911
10911
  onSave: d,
10912
10912
  primaryText: t.details_original_balance,
10913
- secondaryText: M(A.initial_amount, "0,0"),
10913
+ secondaryText: N(A.initial_amount, "0,0"),
10914
10914
  zeroStateText: !A.initial_amount && !A.is_complete ? t.add_original_balance : void 0,
10915
10915
  children: /* @__PURE__ */ e(
10916
10916
  qe,
@@ -10972,7 +10972,7 @@ const qa = ({
10972
10972
  onCancel: c,
10973
10973
  onSave: I,
10974
10974
  primaryText: t.details_monthly_payment,
10975
- secondaryText: M(A.monthly_payment, "0,0"),
10975
+ secondaryText: N(A.monthly_payment, "0,0"),
10976
10976
  zeroStateText: A.monthly_payment ? void 0 : t.add_monthly_payment,
10977
10977
  children: /* @__PURE__ */ e(
10978
10978
  qe,
@@ -11004,7 +11004,7 @@ const qa = ({
11004
11004
  onCancel: c,
11005
11005
  onSave: I,
11006
11006
  primaryText: t.details_original_balance,
11007
- secondaryText: M(A.original_balance, "0,0"),
11007
+ secondaryText: N(A.original_balance, "0,0"),
11008
11008
  zeroStateText: A.original_balance ? void 0 : t.add_original_balance,
11009
11009
  children: /* @__PURE__ */ e(
11010
11010
  qe,
@@ -11025,19 +11025,19 @@ const qa = ({
11025
11025
  return h.useEffect(() => A(V.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(P, { bgcolor: "background.paper", children: [
11026
11026
  t?.goal && /* @__PURE__ */ s(J, { children: [
11027
11027
  /* @__PURE__ */ e(Ma, { goal: t.goal }),
11028
- /* @__PURE__ */ e(G, {}),
11028
+ /* @__PURE__ */ e(M, {}),
11029
11029
  /* @__PURE__ */ e(Ga, { goal: t.goal }),
11030
- /* @__PURE__ */ e(G, {}),
11030
+ /* @__PURE__ */ e(M, {}),
11031
11031
  /* @__PURE__ */ e(Na, { goal: t.goal }),
11032
- /* @__PURE__ */ e(G, {})
11032
+ /* @__PURE__ */ e(M, {})
11033
11033
  ] }),
11034
11034
  !t?.goal && t?.account && /* @__PURE__ */ s(J, { children: [
11035
11035
  /* @__PURE__ */ e(mh, { debt: t }),
11036
- /* @__PURE__ */ e(G, {}),
11036
+ /* @__PURE__ */ e(M, {}),
11037
11037
  /* @__PURE__ */ e(jh, { debt: t }),
11038
- /* @__PURE__ */ e(G, {}),
11038
+ /* @__PURE__ */ e(M, {}),
11039
11039
  /* @__PURE__ */ e(Oh, { debt: t }),
11040
- /* @__PURE__ */ e(G, {})
11040
+ /* @__PURE__ */ e(M, {})
11041
11041
  ] })
11042
11042
  ] });
11043
11043
  }, Qh = C(Lh), qh = ({ setTabValue: A, sx: t }) => {
@@ -11154,7 +11154,7 @@ const qa = ({
11154
11154
  onCancel: c,
11155
11155
  onSave: I,
11156
11156
  primaryText: A.paydown_drawer_extra_payment,
11157
- secondaryText: M(t?.extra_payment, "0,0"),
11157
+ secondaryText: N(t?.extra_payment, "0,0"),
11158
11158
  zeroStateText: t?.extra_payment ? void 0 : A.add_extra_payment,
11159
11159
  children: /* @__PURE__ */ e(
11160
11160
  qe,
@@ -11176,7 +11176,7 @@ const qa = ({
11176
11176
  /* @__PURE__ */ s(P, { p: 24, children: [
11177
11177
  /* @__PURE__ */ s(P, { alignItems: "center", gap: 4, mb: 24, children: [
11178
11178
  /* @__PURE__ */ e(R, { variant: "Body", children: A.paydown_drawer_mimimum_label }),
11179
- /* @__PURE__ */ e(R, { bold: !0, variant: "H1", children: M(t, "0,0") }),
11179
+ /* @__PURE__ */ e(R, { bold: !0, variant: "H1", children: N(t, "0,0") }),
11180
11180
  /* @__PURE__ */ e(R, { textAlign: "center", truncate: !1, variant: "Small", width: 208, children: A.paydown_drawer_minimum_info })
11181
11181
  ] }),
11182
11182
  /* @__PURE__ */ s(P, { children: [
@@ -11187,7 +11187,7 @@ const qa = ({
11187
11187
  /* @__PURE__ */ e(P, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(Yh, {}) }),
11188
11188
  /* @__PURE__ */ e(P, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(P, { gap: 4, children: [
11189
11189
  /* @__PURE__ */ e(R, { variant: "Small", children: A.paydown_drawer_total_payment }),
11190
- /* @__PURE__ */ e(R, { bold: !0, textAlign: "right", variant: "Body", children: M(n, "0,0") })
11190
+ /* @__PURE__ */ e(R, { bold: !0, textAlign: "right", variant: "Body", children: N(n, "0,0") })
11191
11191
  ] }) })
11192
11192
  ] });
11193
11193
  }, Bh = C(Vh), Sh = ({ isOpen: A, onClose: t, sx: i }) => {
@@ -11295,7 +11295,7 @@ const we = (A) => /* @__PURE__ */ e(R, { fontWeight: 600, variant: "Small", chil
11295
11295
  field: "balance",
11296
11296
  headerName: c.table_column_balance,
11297
11297
  renderHeader: we,
11298
- valueFormatter: (b) => M(b, "0,0"),
11298
+ valueFormatter: (b) => N(b, "0,0"),
11299
11299
  sortable: !0,
11300
11300
  hideSortIcons: I,
11301
11301
  type: "number",
@@ -11334,7 +11334,7 @@ const we = (A) => /* @__PURE__ */ e(R, { fontWeight: 600, variant: "Small", chil
11334
11334
  field: "monthly_payment",
11335
11335
  headerName: c.table_column_amount_due,
11336
11336
  renderHeader: we,
11337
- valueFormatter: (b) => typeof b == "number" ? M(b, "0,0") : "---",
11337
+ valueFormatter: (b) => typeof b == "number" ? N(b, "0,0") : "---",
11338
11338
  sortable: !0,
11339
11339
  hideSortIcons: I,
11340
11340
  type: "number",
@@ -11357,14 +11357,14 @@ const we = (A) => /* @__PURE__ */ e(R, { fontWeight: 600, variant: "Small", chil
11357
11357
  headerAlign: "right",
11358
11358
  width: 20
11359
11359
  }
11360
- ], v = h.useMemo(() => t.map((b, g) => ({
11360
+ ], v = h.useMemo(() => t.map((b, X) => ({
11361
11361
  ...b,
11362
- id: g,
11362
+ id: X,
11363
11363
  priority: Fh(b)
11364
11364
  })), [t]), u = (b) => {
11365
11365
  const x = b.target.closest("[data-id]")?.getAttribute("data-id"), w = t[Number(x)];
11366
11366
  n?.(w?.guid ?? "");
11367
- }, H = (b) => v.find((g) => g.guid === b)?.id;
11367
+ }, H = (b) => v.find((X) => X.guid === b)?.id;
11368
11368
  return /* @__PURE__ */ e(
11369
11369
  L,
11370
11370
  {
@@ -11556,14 +11556,14 @@ const we = (A) => /* @__PURE__ */ e(R, { fontWeight: 600, variant: "Small", chil
11556
11556
  "aria-label": "extra-paydown",
11557
11557
  onClick: A,
11558
11558
  sx: { justifyContent: "start", minWidth: 100, mx: 4 },
11559
- children: z(a, M(o, "0,0"))
11559
+ children: z(a, N(o, "0,0"))
11560
11560
  }
11561
11561
  );
11562
11562
  }), tl = ({ onBackClick: A, sx: t }) => {
11563
- const [i, n] = h.useState(!1), [r, o] = h.useState(!1), [a, I] = h.useState(!1), [c, d] = h.useState(""), { isDesktop: f, isMobile: E } = zA(), { debts: l } = p(), { onEvent: v } = K(), { isInitialized: u, setSelectedAccounts: H } = wA(), { setSelectedAccount: b } = Xe(), { selectedDebtPriority: g, setSelectedDebtChartData: y } = ke(), { accounts: x } = CA(), { loadGoals: w, monthlyCashFlowProfile: j } = FA(), { debts: D } = Ti(), m = h.useMemo(() => {
11564
- const rA = j?.extra_payment ?? 0;
11565
- return Al(D, g, rA);
11566
- }, [D, g, j]);
11563
+ const [i, n] = h.useState(!1), [r, o] = h.useState(!1), [a, I] = h.useState(!1), [c, d] = h.useState(""), { isDesktop: f, isMobile: E } = zA(), { debts: l } = p(), { onEvent: v } = K(), { isInitialized: u, setSelectedAccounts: H } = wA(), { setSelectedAccount: b } = Xe(), { selectedDebtPriority: X, setSelectedDebtChartData: y } = ke(), { accounts: x } = CA(), { loadGoals: w, monthlyCashFlowProfile: D } = FA(), { debts: j } = Ti(), m = h.useMemo(() => {
11564
+ const rA = D?.extra_payment ?? 0;
11565
+ return Al(j, X, rA);
11566
+ }, [j, X, D]);
11567
11567
  h.useEffect(() => {
11568
11568
  H(x), v(V.DEBTS_VIEW);
11569
11569
  }, []), h.useEffect(() => {
@@ -11571,7 +11571,7 @@ const we = (A) => /* @__PURE__ */ e(R, { fontWeight: 600, variant: "Small", chil
11571
11571
  }, [x]), h.useEffect(() => {
11572
11572
  u && w().finally();
11573
11573
  }, [u]);
11574
- const O = (rA) => d(rA), N = () => {
11574
+ const O = (rA) => d(rA), G = () => {
11575
11575
  const rA = x.find((hA) => hA.guid === c), sA = m.find((hA) => hA.guid === c);
11576
11576
  rA && b(rA), sA && y(sA), n(!0);
11577
11577
  }, tA = () => v(V.DEBTS_CLICK_FILTER), Y = () => {
@@ -11608,7 +11608,7 @@ const we = (A) => /* @__PURE__ */ e(R, { fontWeight: 600, variant: "Small", chil
11608
11608
  debts: m,
11609
11609
  height: E ? 250 : void 0,
11610
11610
  hoveredDebtGuid: c,
11611
- onClickArea: N,
11611
+ onClickArea: G,
11612
11612
  onHoverArea: O,
11613
11613
  sx: { mr: E ? "4px" : "-48px" }
11614
11614
  }
@@ -11629,7 +11629,7 @@ const we = (A) => /* @__PURE__ */ e(R, { fontWeight: 600, variant: "Small", chil
11629
11629
  {
11630
11630
  debts: m,
11631
11631
  hoveredDebtGuid: c,
11632
- onClickRow: N,
11632
+ onClickRow: G,
11633
11633
  onHoverRow: O
11634
11634
  }
11635
11635
  ) })
@@ -11705,7 +11705,7 @@ class al {
11705
11705
  selectedAccountGuids = this.selectedAccounts.map((t) => t.guid);
11706
11706
  displayedDate = /* @__PURE__ */ new Date();
11707
11707
  displayedDateRange = {
11708
- start: QA(this.displayedDate),
11708
+ start: qA(this.displayedDate),
11709
11709
  end: BA(this.displayedDate)
11710
11710
  };
11711
11711
  constructor(t) {
@@ -11855,10 +11855,10 @@ const cl = (A, t) => {
11855
11855
  default:
11856
11856
  return z(t.zero_state_ongoing, "retirement");
11857
11857
  }
11858
- }, fl = (A, t) => t ? M(A, A < 1e3 ? "0" : "0.00a").replace(
11858
+ }, fl = (A, t) => t ? N(A, A < 1e3 ? "0" : "0.00a").replace(
11859
11859
  /(\d+)(?:\.0+|(\.\d*?[1-9])0*)([a-zA-Z]* ?\$?)/g,
11860
11860
  "$1$2$3"
11861
- ) : M(A, "0,0.00"), Ta = C(
11861
+ ) : N(A, "0,0.00"), Ta = C(
11862
11862
  ({ goal: A, isInDrawer: t = !1, onClick: i }) => {
11863
11863
  const { goals: n } = p(), { isMobile: r, isTablet: o } = zA(), a = r || o, {
11864
11864
  backgroundColor: I,
@@ -11878,7 +11878,7 @@ const cl = (A, t) => {
11878
11878
  ot,
11879
11879
  {
11880
11880
  avatar: /* @__PURE__ */ e(Qe, { sx: { bgcolor: I, color: c, height: 48, width: 48 }, variant: "rounded", children: u }),
11881
- subheader: /* @__PURE__ */ e(R, { variant: t || a ? "H3" : "H2", children: `${M(A.current_amount, a ? "0,0" : "0,0.00")} / ${fl(
11881
+ subheader: /* @__PURE__ */ e(R, { variant: t || a ? "H3" : "H2", children: `${N(A.current_amount, a ? "0,0" : "0,0.00")} / ${fl(
11882
11882
  l,
11883
11883
  a
11884
11884
  )}` }),
@@ -11912,7 +11912,7 @@ const cl = (A, t) => {
11912
11912
  onCancel: () => I(o),
11913
11913
  onSave: c,
11914
11914
  primaryText: t.contribution_label,
11915
- secondaryText: M(o, "0,0.00"),
11915
+ secondaryText: N(o, "0,0.00"),
11916
11916
  children: /* @__PURE__ */ e(
11917
11917
  qe,
11918
11918
  {
@@ -11957,7 +11957,7 @@ const cl = (A, t) => {
11957
11957
  minWidth: 140,
11958
11958
  renderCell: (v) => {
11959
11959
  const u = v.row;
11960
- return /* @__PURE__ */ e(R, { bold: !0, sx: { mr: 12 }, variant: "Body", children: M(u.amount, "0,0.00") });
11960
+ return /* @__PURE__ */ e(R, { bold: !0, sx: { mr: 12 }, variant: "Body", children: N(u.amount, "0,0.00") });
11961
11961
  },
11962
11962
  sortable: !1
11963
11963
  }
@@ -12051,7 +12051,7 @@ const cl = (A, t) => {
12051
12051
  )
12052
12052
  ) })
12053
12053
  ] }),
12054
- /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: M(A.amount, "0,0.00") })
12054
+ /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: N(A.amount, "0,0.00") })
12055
12055
  ] }) })
12056
12056
  ] }) });
12057
12057
  }, ll = ({ goal: A }) => {
@@ -12069,7 +12069,7 @@ const cl = (A, t) => {
12069
12069
  )
12070
12070
  ) })
12071
12071
  ] }),
12072
- /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: M(A.amount, "0,0.00") })
12072
+ /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: N(A.amount, "0,0.00") })
12073
12073
  ] }) })
12074
12074
  ] }) }, A.guid);
12075
12075
  }, vl = ({ trackType: A }) => {
@@ -12101,7 +12101,7 @@ const cl = (A, t) => {
12101
12101
  return /* @__PURE__ */ s(P, { children: [
12102
12102
  /* @__PURE__ */ e(hl, { goal: v, index: u }),
12103
12103
  /* @__PURE__ */ e(
12104
- G,
12104
+ M,
12105
12105
  {
12106
12106
  variant: H && A === B.RETIREMENT_TRACK ? "fullWidth" : "inset"
12107
12107
  }
@@ -12110,7 +12110,7 @@ const cl = (A, t) => {
12110
12110
  }),
12111
12111
  A !== B.RETIREMENT_TRACK && /* @__PURE__ */ s(P, { children: [
12112
12112
  /* @__PURE__ */ e(El, { goals: o }),
12113
- /* @__PURE__ */ e(G, {})
12113
+ /* @__PURE__ */ e(M, {})
12114
12114
  ] })
12115
12115
  ] }),
12116
12116
  A !== B.RETIREMENT_TRACK && a.length > 0 && /* @__PURE__ */ s(P, { children: [
@@ -12119,7 +12119,7 @@ const cl = (A, t) => {
12119
12119
  const H = u > o.length - 1;
12120
12120
  return /* @__PURE__ */ s(P, { children: [
12121
12121
  /* @__PURE__ */ e(ll, { goal: v }),
12122
- /* @__PURE__ */ e(G, { variant: H ? "fullWidth" : "inset" })
12122
+ /* @__PURE__ */ e(M, { variant: H ? "fullWidth" : "inset" })
12123
12123
  ] }, `complete-${v.guid}`);
12124
12124
  }) })
12125
12125
  ] })
@@ -12164,7 +12164,7 @@ const cl = (A, t) => {
12164
12164
  /* @__PURE__ */ e(q, { color: "success", fill: !0, name: "check_circle", size: 20 }),
12165
12165
  /* @__PURE__ */ e(R, { color: "text.secondary", variant: "Body", children: f.name })
12166
12166
  ] }),
12167
- /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: M(f.amount, "0,0.00") })
12167
+ /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: N(f.amount, "0,0.00") })
12168
12168
  ] }) }) }) }, f.guid))
12169
12169
  ] })
12170
12170
  ] });
@@ -12187,7 +12187,7 @@ const cl = (A, t) => {
12187
12187
  ]
12188
12188
  }
12189
12189
  ) }),
12190
- /* @__PURE__ */ e(G, { variant: "inset" }),
12190
+ /* @__PURE__ */ e(M, { variant: "inset" }),
12191
12191
  E && /* @__PURE__ */ e(Qi, { in: d, children: /* @__PURE__ */ e(aA, { sx: { bgcolor: "background.default" }, children: I.map((l, v) => /* @__PURE__ */ e(W, { sx: { pl: 48 }, children: /* @__PURE__ */ s(cA, { onClick: () => t(l.label, l.metaType, c), children: [
12192
12192
  /* @__PURE__ */ e(re, { sx: { mr: 8 }, children: /* @__PURE__ */ e(Ri, { name: l.icon }) }),
12193
12193
  /* @__PURE__ */ e(
@@ -12222,7 +12222,7 @@ const cl = (A, t) => {
12222
12222
  children: [
12223
12223
  /* @__PURE__ */ e(HA, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: o.select_debt_accounts_description }),
12224
12224
  /* @__PURE__ */ s(aA, { sx: { bgcolor: "background.white" }, children: [
12225
- /* @__PURE__ */ e(G, { variant: "fullWidth" }),
12225
+ /* @__PURE__ */ e(M, { variant: "fullWidth" }),
12226
12226
  A.map((f, E) => /* @__PURE__ */ s(h.Fragment, { children: [
12227
12227
  /* @__PURE__ */ e(W, { children: /* @__PURE__ */ s(cA, { onClick: () => d(f), children: [
12228
12228
  /* @__PURE__ */ e(DA, { children: /* @__PURE__ */ e(
@@ -12236,12 +12236,12 @@ const cl = (A, t) => {
12236
12236
  nA,
12237
12237
  {
12238
12238
  primary: f.name || f.feed_name,
12239
- secondary: M(f.balance || 0, "0,0.00")
12239
+ secondary: N(f.balance || 0, "0,0.00")
12240
12240
  }
12241
12241
  ),
12242
12242
  /* @__PURE__ */ e(li, { checked: I.some((l) => l.guid === f.guid) })
12243
12243
  ] }) }),
12244
- /* @__PURE__ */ e(G, { variant: E < A.length - 1 ? "inset" : "fullWidth" })
12244
+ /* @__PURE__ */ e(M, { variant: E < A.length - 1 ? "inset" : "fullWidth" })
12245
12245
  ] }, f.guid))
12246
12246
  ] }),
12247
12247
  /* @__PURE__ */ e(
@@ -12314,7 +12314,7 @@ const cl = (A, t) => {
12314
12314
  nA,
12315
12315
  {
12316
12316
  primary: A.name || A.feed_name,
12317
- secondary: M(A.balance || 0, "0,0.00")
12317
+ secondary: N(A.balance || 0, "0,0.00")
12318
12318
  }
12319
12319
  ),
12320
12320
  /* @__PURE__ */ e(ce, {})
@@ -12342,7 +12342,7 @@ const cl = (A, t) => {
12342
12342
  onCancel: E,
12343
12343
  onSave: f,
12344
12344
  primaryText: t.details_amount_to_save,
12345
- secondaryText: M(A.amount, "0,0"),
12345
+ secondaryText: N(A.amount, "0,0"),
12346
12346
  zeroStateText: I && A.amount === 0 ? t.add_amount : void 0,
12347
12347
  children: /* @__PURE__ */ e(
12348
12348
  qe,
@@ -12396,7 +12396,7 @@ const cl = (A, t) => {
12396
12396
  nA,
12397
12397
  {
12398
12398
  primary: l?.name || l?.feed_name,
12399
- secondary: M(l?.balance || 0, "0,0.00")
12399
+ secondary: N(l?.balance || 0, "0,0.00")
12400
12400
  }
12401
12401
  ),
12402
12402
  /* @__PURE__ */ e(ce, {})
@@ -12414,7 +12414,7 @@ const cl = (A, t) => {
12414
12414
  nA,
12415
12415
  {
12416
12416
  primary: l?.name || l?.feed_name,
12417
- secondary: M(l?.balance || 0, "0,0.00")
12417
+ secondary: N(l?.balance || 0, "0,0.00")
12418
12418
  }
12419
12419
  ),
12420
12420
  /* @__PURE__ */ e(ce, {})
@@ -12546,7 +12546,7 @@ const cl = (A, t) => {
12546
12546
  return /* @__PURE__ */ s(P, { children: [
12547
12547
  E.map((u) => /* @__PURE__ */ s(P, { children: [
12548
12548
  /* @__PURE__ */ e(Va, { account: u }),
12549
- /* @__PURE__ */ e(G, {})
12549
+ /* @__PURE__ */ e(M, {})
12550
12550
  ] }, u.guid)),
12551
12551
  /* @__PURE__ */ e(W, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ s(cA, { onClick: () => d(!0), children: [
12552
12552
  /* @__PURE__ */ e(nA, { children: /* @__PURE__ */ s(P, { alignItems: "center", color: "action.active", direction: "row", gap: 8, children: [
@@ -12580,34 +12580,34 @@ const cl = (A, t) => {
12580
12580
  ] }),
12581
12581
  /* @__PURE__ */ s(aA, { sx: { bgcolor: "background.paper" }, children: [
12582
12582
  /* @__PURE__ */ e(Hl, { goal: A }),
12583
- /* @__PURE__ */ e(G, { sx: { ml: 24 } }),
12583
+ /* @__PURE__ */ e(M, { sx: { ml: 24 } }),
12584
12584
  (r === B.SAVINGS_TRACK || r === B.RETIREMENT_TRACK) && /* @__PURE__ */ s(J, { children: [
12585
12585
  /* @__PURE__ */ e(Pl, { goal: A }),
12586
- /* @__PURE__ */ e(G, { sx: { ml: r === B.RETIREMENT_TRACK ? 24 : 0 } })
12586
+ /* @__PURE__ */ e(M, { sx: { ml: r === B.RETIREMENT_TRACK ? 24 : 0 } })
12587
12587
  ] }),
12588
12588
  A.track_type === B.DEBT_TRACK && /* @__PURE__ */ s(J, { children: [
12589
12589
  /* @__PURE__ */ e(Ma, { goal: A }),
12590
- /* @__PURE__ */ e(G, { sx: { ml: 24 } }),
12590
+ /* @__PURE__ */ e(M, { sx: { ml: 24 } }),
12591
12591
  /* @__PURE__ */ e(Ga, { goal: A }),
12592
- /* @__PURE__ */ e(G, { sx: { ml: 24 } }),
12592
+ /* @__PURE__ */ e(M, { sx: { ml: 24 } }),
12593
12593
  /* @__PURE__ */ e(Na, { goal: A }),
12594
- /* @__PURE__ */ e(G, { variant: "fullWidth" })
12594
+ /* @__PURE__ */ e(M, { variant: "fullWidth" })
12595
12595
  ] }),
12596
12596
  A.track_type === B.RETIREMENT_TRACK && /* @__PURE__ */ s(J, { children: [
12597
12597
  /* @__PURE__ */ e(zl, { goal: A }),
12598
- /* @__PURE__ */ e(G, { sx: { ml: 24 } }),
12598
+ /* @__PURE__ */ e(M, { sx: { ml: 24 } }),
12599
12599
  /* @__PURE__ */ e(Cl, { goal: A }),
12600
- /* @__PURE__ */ e(G, { variant: "fullWidth" })
12600
+ /* @__PURE__ */ e(M, { variant: "fullWidth" })
12601
12601
  ] })
12602
12602
  ] }),
12603
12603
  /* @__PURE__ */ e(R, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: A.track_type === B.RETIREMENT_TRACK ? t.details_accounts : t.details_account }),
12604
12604
  A.track_type !== B.RETIREMENT_TRACK && n && /* @__PURE__ */ s(J, { children: [
12605
12605
  /* @__PURE__ */ e(Va, { account: n }),
12606
- /* @__PURE__ */ e(G, {})
12606
+ /* @__PURE__ */ e(M, {})
12607
12607
  ] }),
12608
12608
  A.track_type === B.RETIREMENT_TRACK && /* @__PURE__ */ s(J, { children: [
12609
12609
  /* @__PURE__ */ e(gl, { goal: A }),
12610
- /* @__PURE__ */ e(G, {})
12610
+ /* @__PURE__ */ e(M, {})
12611
12611
  ] }),
12612
12612
  A.track_type === B.SAVINGS_TRACK && !A.is_complete && /* @__PURE__ */ e(bl, { goal: A })
12613
12613
  ] });
@@ -12622,21 +12622,21 @@ const cl = (A, t) => {
12622
12622
  setSelectedGoal: d,
12623
12623
  updateGoal: f
12624
12624
  } = FA(), { user: E } = Ue(), [l, v] = h.useState(!1), u = !I?.guid, H = I?.track_type === B.SAVINGS_TRACK && I.is_complete && !I.has_been_spent, b = h.useMemo(() => I ? I.track_type === B.SAVINGS_TRACK ? !!I.name && !!I.amount : I.track_type === B.DEBT_TRACK ? !0 : I.track_type === B.RETIREMENT_TRACK ? !!I.name && !!I.amount && !!I.retirement_age && !!E.birthday : !0 : !1, [I]);
12625
- let g = i.delete_button, y = () => v(!0);
12626
- u ? (y = () => x(), g = i.save_button) : H && (y = () => j(), g = t.mark_as_complete_button);
12625
+ let X = i.delete_button, y = () => v(!0);
12626
+ u ? (y = () => x(), X = i.save_button) : H && (y = () => D(), X = t.mark_as_complete_button);
12627
12627
  const x = async () => {
12628
12628
  if (I) {
12629
- const D = I.track_type;
12630
- D !== B.RETIREMENT_TRACK ? await n(I) : D === B.RETIREMENT_TRACK && await r({ ...I, target_amount: I.amount }), c(t.alert_goal_added), d(void 0), D && A?.(D);
12629
+ const j = I.track_type;
12630
+ j !== B.RETIREMENT_TRACK ? await n(I) : j === B.RETIREMENT_TRACK && await r({ ...I, target_amount: I.amount }), c(t.alert_goal_added), d(void 0), j && A?.(j);
12631
12631
  }
12632
12632
  }, w = async () => {
12633
12633
  I && (I.track_type !== B.RETIREMENT_TRACK ? await o(I.guid) : I.track_type === B.RETIREMENT_TRACK && await a(I), c(t.alert_goal_deleted), d(void 0));
12634
- }, j = async () => {
12635
- const D = {
12634
+ }, D = async () => {
12635
+ const j = {
12636
12636
  ...I,
12637
12637
  has_been_spent: !0
12638
12638
  };
12639
- await f(D), c(t.alert_goal_completed), d(void 0);
12639
+ await f(j), c(t.alert_goal_completed), d(void 0);
12640
12640
  };
12641
12641
  return /* @__PURE__ */ s(P, { children: [
12642
12642
  /* @__PURE__ */ e(
@@ -12649,7 +12649,7 @@ const cl = (A, t) => {
12649
12649
  onClose: () => d(void 0),
12650
12650
  onPrimaryAction: y,
12651
12651
  primaryColor: u || H ? "primary" : "error",
12652
- primaryText: g,
12652
+ primaryText: X,
12653
12653
  secondaryColor: "primary",
12654
12654
  title: t.goal_details,
12655
12655
  children: I && /* @__PURE__ */ e(Xl, { goal: I })
@@ -12725,22 +12725,22 @@ const cl = (A, t) => {
12725
12725
  ]
12726
12726
  }
12727
12727
  ), DP = C(({ onBackClick: A, sx: t }) => {
12728
- const { onEvent: i } = K(), { isMobile: n } = zA(), { accounts: r } = CA(), { isInitialized: o, setSelectedAccounts: a } = wA(), { goals: I, common: c } = p(), { alert: d, goals: f, loadGoals: E, monthlyCashFlowProfile: l, setAlert: v, retirmentGoals: u } = FA(), [H, b] = h.useState(0), [g, y] = h.useState(!1), x = l?.amount_allocated_for_savings_goals || 0, w = l?.amount_allocated_for_debt_goals || 0, j = l?.amount_allocated_for_retirement_goals || 0, D = z(
12728
+ const { onEvent: i } = K(), { isMobile: n } = zA(), { accounts: r } = CA(), { isInitialized: o, setSelectedAccounts: a } = wA(), { goals: I, common: c } = p(), { alert: d, goals: f, loadGoals: E, monthlyCashFlowProfile: l, setAlert: v, retirmentGoals: u } = FA(), [H, b] = h.useState(0), [X, y] = h.useState(!1), x = l?.amount_allocated_for_savings_goals || 0, w = l?.amount_allocated_for_debt_goals || 0, D = l?.amount_allocated_for_retirement_goals || 0, j = z(
12729
12729
  n ? I.tab_subtitle_mobile : I.tab_subtitle,
12730
- M(x, "0,0")
12730
+ N(x, "0,0")
12731
12731
  ), m = z(
12732
12732
  n ? I.tab_subtitle_mobile : I.tab_subtitle,
12733
- M(w, "0,0")
12733
+ N(w, "0,0")
12734
12734
  ), O = z(
12735
12735
  n ? I.tab_subtitle_mobile : I.tab_subtitle,
12736
- M(j, "0,0")
12736
+ N(D, "0,0")
12737
12737
  );
12738
12738
  h.useEffect(() => {
12739
12739
  a(r), i(V.GOALS_VIEW);
12740
12740
  }, []), h.useEffect(() => {
12741
12741
  o && E().finally();
12742
- }, [o, x, w, j]);
12743
- const N = () => {
12742
+ }, [o, x, w, D]);
12743
+ const G = () => {
12744
12744
  i(V.GOALS_CLICK_FILTER);
12745
12745
  }, tA = () => {
12746
12746
  y(!0), i(V.GOALS_CLICK_ADD);
@@ -12761,7 +12761,7 @@ const cl = (A, t) => {
12761
12761
  onClick: tA
12762
12762
  }
12763
12763
  ],
12764
- onAccountsFilterClick: N,
12764
+ onAccountsFilterClick: G,
12765
12765
  onBackClick: A,
12766
12766
  sx: t,
12767
12767
  title: I.title,
@@ -12780,7 +12780,7 @@ const cl = (A, t) => {
12780
12780
  GA,
12781
12781
  {
12782
12782
  disabled: AA,
12783
- label: /* @__PURE__ */ e(rn, { subtitle: D, title: I.tab_saving_title })
12783
+ label: /* @__PURE__ */ e(rn, { subtitle: j, title: I.tab_saving_title })
12784
12784
  }
12785
12785
  ),
12786
12786
  /* @__PURE__ */ e(
@@ -12822,7 +12822,7 @@ const cl = (A, t) => {
12822
12822
  IA,
12823
12823
  {
12824
12824
  ariaLabelClose: c.close_aria,
12825
- isOpen: g,
12825
+ isOpen: X,
12826
12826
  onClose: () => y(!1),
12827
12827
  title: I.add_goal_title,
12828
12828
  children: /* @__PURE__ */ e(ul, { onClose: Y })
@@ -13323,7 +13323,7 @@ const ml = /^[ a-zA-ZÀ-ÿ0-9]+$/, Ol = 50, oo = 65, Ll = ({
13323
13323
  /* @__PURE__ */ e(DA, { children: /* @__PURE__ */ e(vt, { categoryGuid: "", merchantGuid: v.guid }) }),
13324
13324
  /* @__PURE__ */ e(nA, { primary: v.name })
13325
13325
  ] }) }),
13326
- /* @__PURE__ */ e(G, { sx: { ml: 24 } })
13326
+ /* @__PURE__ */ e(M, { sx: { ml: 24 } })
13327
13327
  ]
13328
13328
  },
13329
13329
  v.guid
@@ -13374,7 +13374,7 @@ const Ba = 13, ql = (A, t) => A.filter((i) => {
13374
13374
  }), Gl = (A, t) => [...A, ...t], Io = (A) => {
13375
13375
  if (A && A.length > 0)
13376
13376
  return A[A.length - 1];
13377
- }, Ml = (A, t) => A.year_month - t.year_month, Nl = () => Array.from({ length: Ba }, (A, t) => Math.floor(QA(Ne(/* @__PURE__ */ new Date(), t)).getTime() / 1e3)).sort(), Tl = (A, t, i) => !A.length || !t.length ? [] : Nl().reduceRight((r, o) => {
13377
+ }, Ml = (A, t) => A.year_month - t.year_month, Nl = () => Array.from({ length: Ba }, (A, t) => Math.floor(qA(Ne(/* @__PURE__ */ new Date(), t)).getTime() / 1e3)).sort(), Tl = (A, t, i) => !A.length || !t.length ? [] : Nl().reduceRight((r, o) => {
13378
13378
  const a = t.filter(
13379
13379
  ({ year_month: f }) => f === parseInt(le(xA(o), "yyyyMM"))
13380
13380
  ), I = A.map((f) => {
@@ -13583,7 +13583,7 @@ const Sl = ({
13583
13583
  )
13584
13584
  }
13585
13585
  ),
13586
- /* @__PURE__ */ e(G, {})
13586
+ /* @__PURE__ */ e(M, {})
13587
13587
  ] }, A.x);
13588
13588
  }, Wl = C(Fl), kl = ({
13589
13589
  chartData: A,
@@ -13605,7 +13605,7 @@ const Sl = ({
13605
13605
  return /* @__PURE__ */ s(P, { direction: "column", sx: { minWidth: 320 }, children: [
13606
13606
  /* @__PURE__ */ s(aA, { children: [
13607
13607
  /* @__PURE__ */ e(me, { sx: { backgroundColor: "transparent", mb: 8, mt: 12, px: 12 }, children: /* @__PURE__ */ e(R, { bold: !0, component: "h2", variant: "Body", children: I.monthly_totals }) }),
13608
- /* @__PURE__ */ e(G, {}),
13608
+ /* @__PURE__ */ e(M, {}),
13609
13609
  A.map((f, E) => /* @__PURE__ */ e(
13610
13610
  Wl,
13611
13611
  {
@@ -13672,7 +13672,7 @@ const Sl = ({
13672
13672
  ),
13673
13673
  /* @__PURE__ */ e(re, { children: n ? /* @__PURE__ */ e(q, { name: "expand_less", size: 24 }) : /* @__PURE__ */ e(q, { name: "expand_more", size: 24 }) })
13674
13674
  ] }) }),
13675
- /* @__PURE__ */ e(G, {}),
13675
+ /* @__PURE__ */ e(M, {}),
13676
13676
  /* @__PURE__ */ e(Qi, { in: n, timeout: "auto", unmountOnExit: !0, children: A.map((o, a) => /* @__PURE__ */ s(aA, { children: [
13677
13677
  /* @__PURE__ */ e(W, { sx: () => ({ py: 14 }), children: /* @__PURE__ */ e(
13678
13678
  nA,
@@ -13684,7 +13684,7 @@ const Sl = ({
13684
13684
  sx: { pl: 72, pr: 16 }
13685
13685
  }
13686
13686
  ) }),
13687
- a < A.length - 1 ? /* @__PURE__ */ e(G, { variant: "inset" }) : /* @__PURE__ */ e(G, {})
13687
+ a < A.length - 1 ? /* @__PURE__ */ e(M, { variant: "inset" }) : /* @__PURE__ */ e(M, {})
13688
13688
  ] }, o.accountName)) })
13689
13689
  ] });
13690
13690
  }, co = ({ groupedAccounts: A }) => /* @__PURE__ */ e(J, { children: A.map(({ accounts: t, icon: i, name: n }) => /* @__PURE__ */ e($l, { accounts: t, icon: i, name: n }, n)) }), A9 = ({
@@ -13787,7 +13787,7 @@ const Sl = ({
13787
13787
  sx: { px: 16 }
13788
13788
  }
13789
13789
  ) }),
13790
- /* @__PURE__ */ e(G, {})
13790
+ /* @__PURE__ */ e(M, {})
13791
13791
  ] }, I.accountName)),
13792
13792
  /* @__PURE__ */ e(me, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
13793
13793
  nA,
@@ -13816,7 +13816,7 @@ const Sl = ({
13816
13816
  },
13817
13817
  I.accountName
13818
13818
  ),
13819
- /* @__PURE__ */ e(G, {})
13819
+ /* @__PURE__ */ e(M, {})
13820
13820
  ] }))
13821
13821
  ] })
13822
13822
  ] });
@@ -13871,17 +13871,17 @@ const Sl = ({
13871
13871
  selectedData: v,
13872
13872
  setHoveredData: u,
13873
13873
  setSelectedData: H
13874
- } = Lc(), { isMobile: b } = zA(), { onEvent: g } = K(), [y, x] = h.useState(!1), [w, j] = h.useState(6), [D, m] = h.useState(!1), [O, N] = h.useState(!1), [tA, Y] = h.useState(!1), AA = async () => {
13874
+ } = Lc(), { isMobile: b } = zA(), { onEvent: X } = K(), [y, x] = h.useState(!1), [w, D] = h.useState(6), [j, m] = h.useState(!1), [O, G] = h.useState(!1), [tA, Y] = h.useState(!1), AA = async () => {
13875
13875
  await E(i), await f(w), x(!0);
13876
13876
  };
13877
13877
  h.useEffect(() => {
13878
- g(V.NET_WORTH_VIEW), n(a);
13878
+ X(V.NET_WORTH_VIEW), n(a);
13879
13879
  }, []), h.useEffect(() => {
13880
13880
  n(a);
13881
13881
  }, [a]), h.useEffect(() => {
13882
13882
  t && AA();
13883
13883
  }, [t, i]), h.useEffect(() => {
13884
- g(V.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: w + "M" }), f(w);
13884
+ X(V.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: w + "M" }), f(w);
13885
13885
  }, [w]);
13886
13886
  const rA = (ae, bA) => {
13887
13887
  H(bA), ae.currentTarget instanceof HTMLDivElement && m(!0);
@@ -13890,10 +13890,10 @@ const Sl = ({
13890
13890
  }, hA = () => {
13891
13891
  u(null);
13892
13892
  }, Z = () => {
13893
- g(V.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES), N(!0);
13893
+ X(V.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES), G(!0);
13894
13894
  }, gA = async (ae) => {
13895
13895
  const bA = ae[0], JA = ae[1];
13896
- bA && JA && j(Is(JA, bA));
13896
+ bA && JA && D(Is(JA, bA));
13897
13897
  }, WA = {
13898
13898
  chartData: l,
13899
13899
  hoveredData: d,
@@ -13903,7 +13903,7 @@ const Sl = ({
13903
13903
  onMouseLeave: hA,
13904
13904
  selectedData: v
13905
13905
  }, fe = () => {
13906
- Y(!0), g(V.ACCOUNTS_CLICK_CONNECT);
13906
+ Y(!0), X(V.ACCOUNTS_CLICK_CONNECT);
13907
13907
  };
13908
13908
  return y ? /* @__PURE__ */ e(
13909
13909
  Le,
@@ -13913,7 +13913,7 @@ const Sl = ({
13913
13913
  onRangeChanged: gA
13914
13914
  },
13915
13915
  dateRangeVariant: b ? "timeframetabs" : "timeframebuttons",
13916
- onAccountsFilterClick: () => g(V.NET_WORTH_WIDGET_CLICK_FILTER),
13916
+ onAccountsFilterClick: () => X(V.NET_WORTH_WIDGET_CLICK_FILTER),
13917
13917
  onBackClick: A,
13918
13918
  showDividerAboveDateSelector: !1,
13919
13919
  sx: { p: b ? 0 : 48 },
@@ -13957,7 +13957,7 @@ const Sl = ({
13957
13957
  IA,
13958
13958
  {
13959
13959
  ariaLabelClose: "Close",
13960
- isOpen: D,
13960
+ isOpen: j,
13961
13961
  onClose: () => m(!1),
13962
13962
  shouldShowHeaderBorders: !1,
13963
13963
  shouldShowHeaderShadow: !0,
@@ -13970,7 +13970,7 @@ const Sl = ({
13970
13970
  {
13971
13971
  ariaLabelClose: "Close",
13972
13972
  isOpen: O,
13973
- onClose: () => N(!1),
13973
+ onClose: () => G(!1),
13974
13974
  shouldShowHeaderBorders: !1,
13975
13975
  shouldShowHeaderShadow: !0,
13976
13976
  title: o.assets_and_liabilities,
@@ -13982,16 +13982,16 @@ const Sl = ({
13982
13982
  ) : /* @__PURE__ */ e(ee, {});
13983
13983
  }), OP = (A) => {
13984
13984
  switch (A) {
13985
- case LA.BudgetExceeded:
13986
- case LA.BudgetOffTarget:
13985
+ case QA.BudgetExceeded:
13986
+ case QA.BudgetOffTarget:
13987
13987
  return Q.BUDGETS;
13988
- case LA.DebtPaymentReminder:
13989
- case LA.AccountBalanceLow:
13990
- case LA.AccountDepositLarge:
13988
+ case QA.DebtPaymentReminder:
13989
+ case QA.AccountBalanceLow:
13990
+ case QA.AccountDepositLarge:
13991
13991
  return Q.ACCOUNTS;
13992
- case LA.TransactionExpenseLarge:
13993
- case LA.TransactionFeeCharge:
13994
- case LA.InternationalTransaction:
13992
+ case QA.TransactionExpenseLarge:
13993
+ case QA.TransactionFeeCharge:
13994
+ case QA.InternationalTransaction:
13995
13995
  return Q.TRANSACTIONS;
13996
13996
  default:
13997
13997
  return null;
@@ -14130,21 +14130,21 @@ class fo {
14130
14130
  }
14131
14131
  const Eo = "PARENT-ENTITY", E9 = (A, t) => {
14132
14132
  switch (A) {
14133
- case LA.BudgetExceeded:
14133
+ case QA.BudgetExceeded:
14134
14134
  return t.notification_budget_exceeded;
14135
- case LA.BudgetOffTarget:
14135
+ case QA.BudgetOffTarget:
14136
14136
  return t.notification_budget_off_target;
14137
- case LA.DebtPaymentReminder:
14137
+ case QA.DebtPaymentReminder:
14138
14138
  return t.notification_debt_payment_reminder;
14139
- case LA.AccountBalanceLow:
14139
+ case QA.AccountBalanceLow:
14140
14140
  return t.notification_low_balance;
14141
- case LA.AccountDepositLarge:
14141
+ case QA.AccountDepositLarge:
14142
14142
  return t.notification_large_deposit;
14143
- case LA.TransactionExpenseLarge:
14143
+ case QA.TransactionExpenseLarge:
14144
14144
  return t.notification_large_expense;
14145
- case LA.TransactionFeeCharge:
14145
+ case QA.TransactionFeeCharge:
14146
14146
  return t.notification_transaction_fee;
14147
- case LA.InternationalTransaction:
14147
+ case QA.InternationalTransaction:
14148
14148
  return t.notification_transaction_is_international;
14149
14149
  default:
14150
14150
  return "";
@@ -14167,7 +14167,7 @@ const Eo = "PARENT-ENTITY", E9 = (A, t) => {
14167
14167
  ...l,
14168
14168
  children: u.map((b) => ({
14169
14169
  ...b,
14170
- account: A.find((g) => g.guid === b.entity_guid),
14170
+ account: A.find((X) => X.guid === b.entity_guid),
14171
14171
  label: v
14172
14172
  })),
14173
14173
  deliveryMethodsLabel: H.join(", "),
@@ -14193,12 +14193,12 @@ class l9 {
14193
14193
  };
14194
14194
  get accountProfiles() {
14195
14195
  return this.detailedNotificationProfiles.filter(
14196
- (t) => t.notification_type === LA.DebtPaymentReminder || t.notification_type === LA.AccountBalanceLow || t.notification_type === LA.AccountDepositLarge || t.notification_type === LA.TransactionExpenseLarge || t.notification_type === LA.TransactionFeeCharge || t.notification_type === LA.InternationalTransaction
14196
+ (t) => t.notification_type === QA.DebtPaymentReminder || t.notification_type === QA.AccountBalanceLow || t.notification_type === QA.AccountDepositLarge || t.notification_type === QA.TransactionExpenseLarge || t.notification_type === QA.TransactionFeeCharge || t.notification_type === QA.InternationalTransaction
14197
14197
  );
14198
14198
  }
14199
14199
  get budgetProfiles() {
14200
14200
  return this.detailedNotificationProfiles.filter(
14201
- (t) => t.notification_type === LA.BudgetExceeded || t.notification_type === LA.BudgetOffTarget
14201
+ (t) => t.notification_type === QA.BudgetExceeded || t.notification_type === QA.BudgetOffTarget
14202
14202
  );
14203
14203
  }
14204
14204
  get clientCommunicationProfile() {
@@ -14454,7 +14454,7 @@ const u9 = ({
14454
14454
  }
14455
14455
  )
14456
14456
  ] }) }),
14457
- i && /* @__PURE__ */ e(G, {})
14457
+ i && /* @__PURE__ */ e(M, {})
14458
14458
  ] });
14459
14459
  }, ve = ({
14460
14460
  altImage: A,
@@ -14494,7 +14494,7 @@ const u9 = ({
14494
14494
  ),
14495
14495
  /* @__PURE__ */ e(YA, { item: !0, lg: 12 - r, md: 12, sm: 12, xs: 12, children: t })
14496
14496
  ] }) }),
14497
- i && /* @__PURE__ */ e(G, {})
14497
+ i && /* @__PURE__ */ e(M, {})
14498
14498
  ] });
14499
14499
  }, MA = ({
14500
14500
  content: A,
@@ -14502,7 +14502,7 @@ const u9 = ({
14502
14502
  sx: i
14503
14503
  }) => /* @__PURE__ */ s(J, { children: [
14504
14504
  /* @__PURE__ */ e(L, { sx: { pb: 48, ...i }, children: A }),
14505
- t && /* @__PURE__ */ e(G, {})
14505
+ t && /* @__PURE__ */ e(M, {})
14506
14506
  ] }), Ye = ({
14507
14507
  altImage: A,
14508
14508
  content: t,
@@ -14539,7 +14539,7 @@ const u9 = ({
14539
14539
  }
14540
14540
  )
14541
14541
  ] }) }),
14542
- i && /* @__PURE__ */ e(G, {})
14542
+ i && /* @__PURE__ */ e(M, {})
14543
14543
  ] });
14544
14544
  }, Be = ({
14545
14545
  altImage: A,
@@ -14579,7 +14579,7 @@ const u9 = ({
14579
14579
  ),
14580
14580
  /* @__PURE__ */ e(YA, { item: !0, lg: 12, md: 12, sm: 12, xs: 12, children: t })
14581
14581
  ] }) }),
14582
- i && /* @__PURE__ */ e(G, {})
14582
+ i && /* @__PURE__ */ e(M, {})
14583
14583
  ] });
14584
14584
  }, T = ({ content: A, sx: t }) => /* @__PURE__ */ e(HA, { sx: { lineHeight: "24px", py: 6, ...t }, children: A }), dA = ({ content: A, sx: t }) => /* @__PURE__ */ e(ne, { color: "text.primary", sx: { py: 12, whiteSpace: { sm: "nowrap", xs: "wrap" }, ...t }, children: A }), k = ({
14585
14585
  items: A,
@@ -16766,14 +16766,14 @@ const u9 = ({
16766
16766
  ] }),
16767
16767
  /* @__PURE__ */ e(P, { sx: { flexDirection: { xs: "column", md: "row" }, gap: 12 }, children: [0, 1].map((f) => {
16768
16768
  const E = f === 0 ? 0 : d, l = f === 0 ? d : i.length, v = i.slice(E, l);
16769
- return /* @__PURE__ */ e(P, { sx: { flex: 1, gap: 12, maxWidth: { md: "calc(50% - 6px)" } }, children: v.map(({ guid: u, icon: H, topics: b, title: g }, y) => {
16769
+ return /* @__PURE__ */ e(P, { sx: { flex: 1, gap: 12, maxWidth: { md: "calc(50% - 6px)" } }, children: v.map(({ guid: u, icon: H, topics: b, title: X }, y) => {
16770
16770
  const x = y + E;
16771
16771
  return /* @__PURE__ */ s(
16772
16772
  xn,
16773
16773
  {
16774
16774
  disableGutters: !0,
16775
16775
  expanded: x === I,
16776
- onChange: (w, j) => c(j ? x : null),
16776
+ onChange: (w, D) => c(D ? x : null),
16777
16777
  sx: (w) => ({
16778
16778
  border: `1px solid ${w.palette.border?.light}`,
16779
16779
  borderRadius: "8px !important",
@@ -16794,11 +16794,11 @@ const u9 = ({
16794
16794
  sx: { height: 64, p: "14px 24px" },
16795
16795
  children: /* @__PURE__ */ s(P, { sx: { alignItems: "center", flexDirection: "row", gap: 12 }, children: [
16796
16796
  /* @__PURE__ */ e(q, { name: H, size: 24 }),
16797
- /* @__PURE__ */ e(R, { variant: "Body", children: g })
16797
+ /* @__PURE__ */ e(R, { variant: "Body", children: X })
16798
16798
  ] })
16799
16799
  }
16800
16800
  ),
16801
- /* @__PURE__ */ e(G, {}),
16801
+ /* @__PURE__ */ e(M, {}),
16802
16802
  /* @__PURE__ */ e(
16803
16803
  Dn,
16804
16804
  {
@@ -16806,12 +16806,12 @@ const u9 = ({
16806
16806
  ml: 56,
16807
16807
  p: 0
16808
16808
  },
16809
- children: /* @__PURE__ */ e(aA, { disablePadding: !0, children: b.map(({ label: w, topicKey: j }) => /* @__PURE__ */ e(
16809
+ children: /* @__PURE__ */ e(aA, { disablePadding: !0, children: b.map(({ label: w, topicKey: D }) => /* @__PURE__ */ e(
16810
16810
  cA,
16811
16811
  {
16812
16812
  "aria-label": w,
16813
16813
  divider: !0,
16814
- onClick: () => a({ guid: u, category: g, pageTitle: w, topicKey: j }),
16814
+ onClick: () => a({ guid: u, category: X, pageTitle: w, topicKey: D }),
16815
16815
  sx: {
16816
16816
  pl: "6px !important",
16817
16817
  borderColor: "border.light",
@@ -16822,7 +16822,7 @@ const u9 = ({
16822
16822
  },
16823
16823
  children: /* @__PURE__ */ e(R, { color: "secondary", variant: "Small", children: w })
16824
16824
  },
16825
- j
16825
+ D
16826
16826
  )) })
16827
16827
  }
16828
16828
  )
@@ -17063,7 +17063,7 @@ const u9 = ({
17063
17063
  ] })
17064
17064
  }
17065
17065
  ),
17066
- /* @__PURE__ */ e(G, {}),
17066
+ /* @__PURE__ */ e(M, {}),
17067
17067
  /* @__PURE__ */ e(
17068
17068
  Dn,
17069
17069
  {
@@ -17124,11 +17124,11 @@ const u9 = ({
17124
17124
  c(ho), f(an), i();
17125
17125
  }, v = (H) => {
17126
17126
  const {
17127
- target: { name: b, value: g }
17127
+ target: { name: b, value: X }
17128
17128
  } = H;
17129
17129
  f((y) => ({
17130
17130
  ...y,
17131
- [b]: g
17131
+ [b]: X
17132
17132
  }));
17133
17133
  };
17134
17134
  return /* @__PURE__ */ s(
@@ -17139,9 +17139,9 @@ const u9 = ({
17139
17139
  onPrimaryAction: () => {
17140
17140
  const H = {};
17141
17141
  let b = !0;
17142
- E.forEach(({ label: g, name: y, required: x }) => {
17142
+ E.forEach(({ label: X, name: y, required: x }) => {
17143
17143
  const w = d[y];
17144
- x && !w && (H[y] = `${g} ${A.request_support_required_message}`, b = !1), (y === "institutionWebsite" || y === "institutionLoginPage") && w && !/(.+)\.(.{2,})/g.test(w) && (H[y] = A.request_support_valid_url_message, b = !1);
17144
+ x && !w && (H[y] = `${X} ${A.request_support_required_message}`, b = !1), (y === "institutionWebsite" || y === "institutionLoginPage") && w && !/(.+)\.(.{2,})/g.test(w) && (H[y] = A.request_support_valid_url_message, b = !1);
17145
17145
  }), c(H), b && (n(d), f(an));
17146
17146
  },
17147
17147
  secondaryColor: "primary",
@@ -17214,7 +17214,7 @@ const u9 = ({
17214
17214
  sx: i
17215
17215
  }
17216
17216
  ),
17217
- /* @__PURE__ */ e(G, { sx: { ml: 24 } })
17217
+ /* @__PURE__ */ e(M, { sx: { ml: 24 } })
17218
17218
  ] }, `${n}-${I}`)) }) }), xv = (A, t, i) => {
17219
17219
  const n = t.reduce((r, { institution_guid: o }) => (r[o] = (r[o] || 0) + 1, r), {});
17220
17220
  return A.filter(({ guid: r }) => !!n[r]).map(({ guid: r, ...o }) => {
@@ -17369,11 +17369,11 @@ const u9 = ({
17369
17369
  }), b = zv.map((m) => ({
17370
17370
  ...m,
17371
17371
  title: A.help_by_category_list[m.guid].label,
17372
- topics: m.topics.map(({ type: O }, N) => ({
17372
+ topics: m.topics.map(({ type: O }, G) => ({
17373
17373
  type: O,
17374
- label: A.help_by_category_list[m.guid].topics[N]
17374
+ label: A.help_by_category_list[m.guid].topics[G]
17375
17375
  }))
17376
- })), g = Object.keys(A.popular_topics_list).map((m, O) => ({
17376
+ })), X = Object.keys(A.popular_topics_list).map((m, O) => ({
17377
17377
  name: A.popular_topics_list[m],
17378
17378
  type: Cv[O].type
17379
17379
  })), y = () => {
@@ -17386,9 +17386,9 @@ const u9 = ({
17386
17386
  });
17387
17387
  }, w = (m, O) => {
17388
17388
  O === "other" ? v(!0) : H({ isOpen: !0, topic: m, type: O });
17389
- }, j = () => {
17389
+ }, D = () => {
17390
17390
  a(""), E(!1), v(!1), y();
17391
- }, D = (m) => {
17391
+ }, j = (m) => {
17392
17392
  if (!I.email) {
17393
17393
  a(A.request_support_email_not_exists_message, "error");
17394
17394
  return;
@@ -17422,7 +17422,7 @@ const u9 = ({
17422
17422
  /* @__PURE__ */ e(
17423
17423
  Sa,
17424
17424
  {
17425
- list: g,
17425
+ list: X,
17426
17426
  onClick: w,
17427
17427
  sx: { fontWeight: 400 }
17428
17428
  }
@@ -17476,7 +17476,7 @@ const u9 = ({
17476
17476
  copy: A,
17477
17477
  isOpen: l,
17478
17478
  onClose: () => v(!1),
17479
- onSave: D
17479
+ onSave: j
17480
17480
  }
17481
17481
  ),
17482
17482
  /* @__PURE__ */ e(
@@ -17500,7 +17500,7 @@ const u9 = ({
17500
17500
  onBack: () => {
17501
17501
  a(""), u.type === "internal" && E(!1);
17502
17502
  },
17503
- onClose: j
17503
+ onClose: D
17504
17504
  }
17505
17505
  ),
17506
17506
  /* @__PURE__ */ e(
@@ -17693,8 +17693,8 @@ const u9 = ({
17693
17693
  )
17694
17694
  ] });
17695
17695
  }), Yv = () => {
17696
- const { common: A, settings: t } = p(), { isDesktop: i, isMobile: n, isSmallMobile: r, isTablet: o } = zA(), { updateUser: a } = ge(), { user: I } = Ue(), [c, d] = h.useState(I.first_name), [f, E] = h.useState(I.last_name), [l, v] = h.useState(I.email), [u, H] = h.useState(I.phone), [b, g] = h.useState(I.postal_code), [y, x] = h.useState(I.credit_score), [w, j] = h.useState(xA(I.birthday ?? 0)), D = l && !I.email_is_verified, m = u && !I.phone_is_verified, O = async () => {
17697
- const N = {
17696
+ const { common: A, settings: t } = p(), { isDesktop: i, isMobile: n, isSmallMobile: r, isTablet: o } = zA(), { updateUser: a } = ge(), { user: I } = Ue(), [c, d] = h.useState(I.first_name), [f, E] = h.useState(I.last_name), [l, v] = h.useState(I.email), [u, H] = h.useState(I.phone), [b, X] = h.useState(I.postal_code), [y, x] = h.useState(I.credit_score), [w, D] = h.useState(xA(I.birthday ?? 0)), j = l && !I.email_is_verified, m = u && !I.phone_is_verified, O = async () => {
17697
+ const G = {
17698
17698
  ...I,
17699
17699
  first_name: c,
17700
17700
  last_name: f,
@@ -17704,7 +17704,7 @@ const u9 = ({
17704
17704
  postal_code: b,
17705
17705
  credit_score: y
17706
17706
  };
17707
- await a(N);
17707
+ await a(G);
17708
17708
  };
17709
17709
  return /* @__PURE__ */ s(
17710
17710
  L,
@@ -17733,7 +17733,7 @@ const u9 = ({
17733
17733
  {
17734
17734
  defaultValue: c,
17735
17735
  label: t.first_name,
17736
- onChange: (N) => d(N.target.value)
17736
+ onChange: (G) => d(G.target.value)
17737
17737
  }
17738
17738
  ),
17739
17739
  /* @__PURE__ */ e(
@@ -17741,23 +17741,23 @@ const u9 = ({
17741
17741
  {
17742
17742
  defaultValue: f,
17743
17743
  label: t.last_name,
17744
- onChange: (N) => E(N.target.value)
17744
+ onChange: (G) => E(G.target.value)
17745
17745
  }
17746
17746
  )
17747
17747
  ]
17748
17748
  }
17749
17749
  ),
17750
17750
  /* @__PURE__ */ s(P, { direction: n ? "column" : "row", children: [
17751
- /* @__PURE__ */ s(P, { sx: { mb: D ? 20 : 44, mr: n ? 0 : 24 }, children: [
17751
+ /* @__PURE__ */ s(P, { sx: { mb: j ? 20 : 44, mr: n ? 0 : 24 }, children: [
17752
17752
  /* @__PURE__ */ e(
17753
17753
  $A,
17754
17754
  {
17755
17755
  defaultValue: l,
17756
17756
  label: t.email_address,
17757
- onChange: (N) => v(N.target.value)
17757
+ onChange: (G) => v(G.target.value)
17758
17758
  }
17759
17759
  ),
17760
- D && /* @__PURE__ */ e(Mv, {})
17760
+ j && /* @__PURE__ */ e(Mv, {})
17761
17761
  ] }),
17762
17762
  /* @__PURE__ */ s(P, { sx: { mb: m ? 20 : 44 }, children: [
17763
17763
  /* @__PURE__ */ e(
@@ -17765,7 +17765,7 @@ const u9 = ({
17765
17765
  {
17766
17766
  defaultValue: u,
17767
17767
  label: t.mobile_number,
17768
- onChange: (N) => H(N.target.value),
17768
+ onChange: (G) => H(G.target.value),
17769
17769
  type: "tel"
17770
17770
  }
17771
17771
  ),
@@ -17777,7 +17777,7 @@ const u9 = ({
17777
17777
  yn,
17778
17778
  {
17779
17779
  label: t.birthdate,
17780
- onChange: j,
17780
+ onChange: D,
17781
17781
  sx: { width: "100%" },
17782
17782
  value: w
17783
17783
  }
@@ -17787,7 +17787,7 @@ const u9 = ({
17787
17787
  {
17788
17788
  defaultValue: b,
17789
17789
  label: t.zip_code,
17790
- onChange: (N) => g(N.target.value)
17790
+ onChange: (G) => X(G.target.value)
17791
17791
  }
17792
17792
  )
17793
17793
  ] }),
@@ -17797,7 +17797,7 @@ const u9 = ({
17797
17797
  {
17798
17798
  defaultValue: y,
17799
17799
  label: t.credit_score,
17800
- onChange: (N) => x(Number(N.target.value)),
17800
+ onChange: (G) => x(Number(G.target.value)),
17801
17801
  sx: { mb: 44 }
17802
17802
  }
17803
17803
  ),
@@ -18076,7 +18076,7 @@ const Bv = ({
18076
18076
  }
18077
18077
  }
18078
18078
  };
18079
- }, g = async () => {
18079
+ }, X = async () => {
18080
18080
  if (A === _A.Token && i(), A === _A.Edit && n) {
18081
18081
  const y = { ...n, name: l };
18082
18082
  (await c(y)).success ? (f(I.mobile_devices_edit_success, "success"), E()) : f(
@@ -18098,7 +18098,7 @@ const Bv = ({
18098
18098
  copy: { title: u() },
18099
18099
  isOpen: t,
18100
18100
  onClose: i,
18101
- onPrimaryAction: g,
18101
+ onPrimaryAction: X,
18102
18102
  onSecondaryAction: i,
18103
18103
  primaryColor: A === _A.Delete ? "error" : void 0,
18104
18104
  primaryText: H(),
@@ -18197,7 +18197,7 @@ const Bv = ({
18197
18197
  ] }) });
18198
18198
  }
18199
18199
  ), kv = C(() => {
18200
- const { settings: A } = p(), { categories: t } = qA(), { selectedRule: i, updateRuleCategory: n } = ge(), [r, o] = h.useState(!1), a = () => {
18200
+ const { settings: A } = p(), { categories: t } = LA(), { selectedRule: i, updateRuleCategory: n } = ge(), [r, o] = h.useState(!1), a = () => {
18201
18201
  o(!1);
18202
18202
  }, I = () => {
18203
18203
  o(!0);
@@ -18309,9 +18309,9 @@ const Bv = ({
18309
18309
  children: [
18310
18310
  /* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(R, { bold: !0, variant: "XSmall", children: r.details }) }),
18311
18311
  /* @__PURE__ */ e(Kv, {}),
18312
- /* @__PURE__ */ e(G, { sx: { ml: 24 } }),
18312
+ /* @__PURE__ */ e(M, { sx: { ml: 24 } }),
18313
18313
  /* @__PURE__ */ e(kv, {}),
18314
- /* @__PURE__ */ e(G, { sx: { ml: 24 } }),
18314
+ /* @__PURE__ */ e(M, { sx: { ml: 24 } }),
18315
18315
  /* @__PURE__ */ e(
18316
18316
  Zv,
18317
18317
  {
@@ -18325,7 +18325,7 @@ const Bv = ({
18325
18325
  );
18326
18326
  }
18327
18327
  ), _v = C(({ rule: A }) => {
18328
- const { categories: t } = qA(), { setSelectedGuid: i } = at(), { deleteTransactionRule: n, setSelectedRule: r } = ge(), { isDesktop: o, isTablet: a } = zA(), [I, c] = h.useState(!1), d = () => {
18328
+ const { categories: t } = LA(), { setSelectedGuid: i } = at(), { deleteTransactionRule: n, setSelectedRule: r } = ge(), { isDesktop: o, isTablet: a } = zA(), [I, c] = h.useState(!1), d = () => {
18329
18329
  c(!1), i(null), r(void 0);
18330
18330
  }, f = async () => {
18331
18331
  await n(), d();
@@ -18342,7 +18342,7 @@ const Bv = ({
18342
18342
  sx: { px: a || o ? 0 : 24 }
18343
18343
  }
18344
18344
  ),
18345
- /* @__PURE__ */ e(G, { sx: { ml: a || o ? 0 : 24 } }),
18345
+ /* @__PURE__ */ e(M, { sx: { ml: a || o ? 0 : 24 } }),
18346
18346
  /* @__PURE__ */ e(Jv, { isOpen: I, onClose: d, onDelete: f })
18347
18347
  ] });
18348
18348
  }), $v = C(() => {
@@ -18374,7 +18374,7 @@ const Bv = ({
18374
18374
  primaryText: A.delivery_method_email_title
18375
18375
  }
18376
18376
  ),
18377
- /* @__PURE__ */ e(G, {})
18377
+ /* @__PURE__ */ e(M, {})
18378
18378
  ] }),
18379
18379
  t.sms_notifications_enabled && /* @__PURE__ */ s(J, { children: [
18380
18380
  /* @__PURE__ */ e(
@@ -18389,7 +18389,7 @@ const Bv = ({
18389
18389
  secondaryText: A.delivery_method_sms_subtitle
18390
18390
  }
18391
18391
  ),
18392
- /* @__PURE__ */ e(G, {})
18392
+ /* @__PURE__ */ e(M, {})
18393
18393
  ] }),
18394
18394
  t.push_notifications_enabled && /* @__PURE__ */ e(
18395
18395
  jt,
@@ -18409,12 +18409,12 @@ const Bv = ({
18409
18409
  ] });
18410
18410
  }), eR = C(
18411
18411
  ({ onProfileUpdated: A, profile: t }) => {
18412
- const { common: i, settings: n } = p(), { updateAccount: r } = CA(), o = t.notification_type === LA.DebtPaymentReminder, [a, I] = h.useState(!1), [c, d] = h.useState(t.threshold || 0), [f, E] = h.useState(
18412
+ const { common: i, settings: n } = p(), { updateAccount: r } = CA(), o = t.notification_type === QA.DebtPaymentReminder, [a, I] = h.useState(!1), [c, d] = h.useState(t.threshold || 0), [f, E] = h.useState(
18413
18413
  t.account?.day_payment_is_due || 0
18414
18414
  ), l = t.account?.name || t.account?.feed_name || "", v = t.account?.day_payment_is_due ? z(
18415
18415
  n.notification_debt_payment_date,
18416
18416
  Jo(t.account?.day_payment_is_due)
18417
- ) : n.notification_debt_payment_zero_state, u = o ? v : M(t.threshold ?? 0, "0,0"), H = async () => {
18417
+ ) : n.notification_debt_payment_zero_state, u = o ? v : N(t.threshold ?? 0, "0,0"), H = async () => {
18418
18418
  o && t.account ? await r({ ...t.account, day_payment_is_due: f }) : A({ ...t, threshold: c });
18419
18419
  };
18420
18420
  return /* @__PURE__ */ s(P, { children: [
@@ -18539,7 +18539,7 @@ const Bv = ({
18539
18539
  };
18540
18540
  return /* @__PURE__ */ s(P, { sx: { px: i ? 24 : 0 }, children: [
18541
18541
  /* @__PURE__ */ e(AR, {}),
18542
- /* @__PURE__ */ e(G, { sx: { my: 24 } }),
18542
+ /* @__PURE__ */ e(M, { sx: { my: 24 } }),
18543
18543
  /* @__PURE__ */ e(ne, { mb: 24, children: t.accounts_title }),
18544
18544
  n.map((E) => /* @__PURE__ */ e(
18545
18545
  vn,
@@ -18556,7 +18556,7 @@ const Bv = ({
18556
18556
  },
18557
18557
  E.guid
18558
18558
  )),
18559
- /* @__PURE__ */ e(G, { sx: { my: 24 } }),
18559
+ /* @__PURE__ */ e(M, { sx: { my: 24 } }),
18560
18560
  /* @__PURE__ */ e(ne, { mb: 24, children: t.budgets_title }),
18561
18561
  r.map((E) => /* @__PURE__ */ e(
18562
18562
  vn,
@@ -18838,18 +18838,18 @@ const In = ({
18838
18838
  /* @__PURE__ */ e(nA, { primary: n, secondary: r }),
18839
18839
  A
18840
18840
  ] }) }),
18841
- /* @__PURE__ */ e(G, { sx: { ml: t ? 0 : 24 } })
18841
+ /* @__PURE__ */ e(M, { sx: { ml: t ? 0 : 24 } })
18842
18842
  ] }), oR = () => {
18843
18843
  const { accounts: A } = CA(), { selectedAccount: t, selectedMember: i } = Xe();
18844
18844
  return A.filter(
18845
18845
  (n) => n.member_guid === i.guid && i.successfully_aggregated_at && n.guid !== t.guid
18846
18846
  );
18847
18847
  }, aR = () => {
18848
- const [A, t] = h.useState(!1), [i, n] = h.useState(!1), [r, o] = h.useState(!1), [a, I] = h.useState({}), { selectedAccount: c } = Xe(), { mergeAccounts: d, updateAccount: f } = CA(), { accounts: E } = p(), l = oR(), { onEvent: v } = K(), { modifyTransactionByAccountGuid: u } = PA(), H = async (g) => {
18848
+ const [A, t] = h.useState(!1), [i, n] = h.useState(!1), [r, o] = h.useState(!1), [a, I] = h.useState({}), { selectedAccount: c } = Xe(), { mergeAccounts: d, updateAccount: f } = CA(), { accounts: E } = p(), l = oR(), { onEvent: v } = K(), { modifyTransactionByAccountGuid: u } = PA(), H = async (X) => {
18849
18849
  await f({
18850
18850
  ...c,
18851
- ...g
18852
- }), "is_closed" in g && g.is_closed !== c.is_closed && u(c.guid, { accountIsClosed: g.is_closed });
18851
+ ...X
18852
+ }), "is_closed" in X && X.is_closed !== c.is_closed && u(c.guid, { accountIsClosed: X.is_closed });
18853
18853
  }, b = () => {
18854
18854
  d([c.guid, a.guid]).finally(
18855
18855
  () => n(!1)
@@ -18920,20 +18920,20 @@ const In = ({
18920
18920
  isOpen: i,
18921
18921
  onClose: () => n(!1),
18922
18922
  title: E.mark_as_duplicate,
18923
- children: /* @__PURE__ */ e(aA, { children: l.map((g) => {
18924
- const y = l.indexOf(g) === l.length - 1;
18923
+ children: /* @__PURE__ */ e(aA, { children: l.map((X) => {
18924
+ const y = l.indexOf(X) === l.length - 1;
18925
18925
  return /* @__PURE__ */ s(h.Fragment, { children: [
18926
18926
  /* @__PURE__ */ e(
18927
18927
  Fi,
18928
18928
  {
18929
- account: g,
18929
+ account: X,
18930
18930
  onRowClick: () => {
18931
- o(!0), I(g);
18931
+ o(!0), I(X);
18932
18932
  }
18933
18933
  }
18934
18934
  ),
18935
18935
  /* @__PURE__ */ e(aA, { sx: { ml: y ? 0 : 24 } })
18936
- ] }, g.guid);
18936
+ ] }, X.guid);
18937
18937
  }) })
18938
18938
  }
18939
18939
  ),
@@ -19151,7 +19151,7 @@ const In = ({
19151
19151
  ),
19152
19152
  /* @__PURE__ */ e(q, { name: "chevron_right" })
19153
19153
  ] }) }),
19154
- /* @__PURE__ */ e(G, { sx: { ml: n.is_manual || !n.institution_url ? 0 : 24 } }),
19154
+ /* @__PURE__ */ e(M, { sx: { ml: n.is_manual || !n.institution_url ? 0 : 24 } }),
19155
19155
  !n.is_manual && n.institution_url && /* @__PURE__ */ s(J, { children: [
19156
19156
  /* @__PURE__ */ e(W, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ s(cA, { component: "a", href: n.institution_url, target: "_blank", children: [
19157
19157
  /* @__PURE__ */ e(DA, { children: /* @__PURE__ */ e(
@@ -19176,7 +19176,7 @@ const In = ({
19176
19176
  /* @__PURE__ */ e(nA, { primary: n.name, secondary: n.institution_url }),
19177
19177
  /* @__PURE__ */ e(q, { name: "launch" })
19178
19178
  ] }) }),
19179
- /* @__PURE__ */ e(G, {})
19179
+ /* @__PURE__ */ e(M, {})
19180
19180
  ] }),
19181
19181
  A && /* @__PURE__ */ e(
19182
19182
  ai,
@@ -19301,10 +19301,10 @@ const In = ({
19301
19301
  ]
19302
19302
  }
19303
19303
  ) }),
19304
- /* @__PURE__ */ e(G, { sx: { ml: v ? 0 : 24 } })
19304
+ /* @__PURE__ */ e(M, { sx: { ml: v ? 0 : 24 } })
19305
19305
  ] }) : l && /* @__PURE__ */ s(J, { children: [
19306
19306
  /* @__PURE__ */ e(W, { sx: { backgroundColor: "background.paper", px: 24 }, children: u }),
19307
- /* @__PURE__ */ e(G, { sx: { ml: v ? 0 : 24 } })
19307
+ /* @__PURE__ */ e(M, { sx: { ml: v ? 0 : 24 } })
19308
19308
  ] }) }, E.name);
19309
19309
  }),
19310
19310
  a && c && /* @__PURE__ */ e(
@@ -19465,7 +19465,7 @@ const In = ({
19465
19465
  sx: { display: "flex", justifyContent: "space-between" },
19466
19466
  children: [
19467
19467
  /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: i.account_types[f] }),
19468
- /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: M(l, "0,0.00") })
19468
+ /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: N(l, "0,0.00") })
19469
19469
  ]
19470
19470
  }
19471
19471
  ) }),
@@ -19481,7 +19481,7 @@ const In = ({
19481
19481
  }
19482
19482
  ),
19483
19483
  !H && /* @__PURE__ */ e(
19484
- G,
19484
+ M,
19485
19485
  {
19486
19486
  sx: {
19487
19487
  mb: b ? 24 : 4,
@@ -19582,7 +19582,7 @@ const In = ({
19582
19582
  shouldShowConnectionStatus: !0
19583
19583
  }
19584
19584
  ),
19585
- !d && /* @__PURE__ */ e(G, { "aria-hidden": "true", variant: "inset" })
19585
+ !d && /* @__PURE__ */ e(M, { "aria-hidden": "true", variant: "inset" })
19586
19586
  ] }, `account-item${c}`);
19587
19587
  })
19588
19588
  ] })
@@ -20319,8 +20319,8 @@ function BR({ bubble: A, isDraggable: t, onClick: i = () => {
20319
20319
  const [n, r] = h.useState(!1);
20320
20320
  if (h.useEffect(() => {
20321
20321
  document.fonts.ready.then(() => {
20322
- const g = ue.select(`.icon-${I}`), y = g.node()?.getComputedTextLength();
20323
- g.attr("x", () => E < yt ? y ? y / 2 - 12 : 12 : y ? y / 2 - 16 : 16);
20322
+ const X = ue.select(`.icon-${I}`), y = X.node()?.getComputedTextLength();
20323
+ X.attr("x", () => E < yt ? y ? y / 2 - 12 : 12 : y ? y / 2 - 16 : 16);
20324
20324
  });
20325
20325
  }, []), !A) return;
20326
20326
  const {
@@ -20442,13 +20442,13 @@ const SR = ({
20442
20442
  },
20443
20443
  unavailableWidth: o = 24
20444
20444
  }) => {
20445
- const { onEvent: a } = K(), { setSelectedBudget: I, setAlert: c, alert: d, generateBudgets: f, deleteBudget: E, budgets: l } = te(), { isLoadingCategoryTotals: v } = qA(), { isInitialized: u } = wA(), { budgets: H, accounts: b } = p(), { availableWidth: g } = Xt(), { isMobile: y } = zA(), [x, w] = h.useState(!1), [j, D] = h.useState(!1), m = h.useMemo(() => g - o, [g]), O = h.useMemo(() => {
20446
- const Z = g - o - 432;
20445
+ const { onEvent: a } = K(), { setSelectedBudget: I, setAlert: c, alert: d, generateBudgets: f, deleteBudget: E, budgets: l } = te(), { isLoadingCategoryTotals: v } = LA(), { isInitialized: u } = wA(), { budgets: H, accounts: b } = p(), { availableWidth: X } = Xt(), { isMobile: y } = zA(), [x, w] = h.useState(!1), [D, j] = h.useState(!1), m = h.useMemo(() => X - o, [X]), O = h.useMemo(() => {
20446
+ const Z = X - o - 432;
20447
20447
  return m - Z;
20448
- }, [g]), N = h.useMemo(() => {
20449
- const Z = g - o - 500;
20448
+ }, [X]), G = h.useMemo(() => {
20449
+ const Z = X - o - 500;
20450
20450
  return m - Z;
20451
- }, [g]);
20451
+ }, [X]);
20452
20452
  h.useEffect(() => {
20453
20453
  x && r();
20454
20454
  }, [x]);
@@ -20471,7 +20471,7 @@ const SR = ({
20471
20471
  AA();
20472
20472
  }
20473
20473
  }, sA = () => {
20474
- D(!0), a(V.ACCOUNTS_CLICK_CONNECT);
20474
+ j(!0), a(V.ACCOUNTS_CLICK_CONNECT);
20475
20475
  }, hA = () => x ? {
20476
20476
  header: H.zero_state_generate_budgets_header,
20477
20477
  icon: "error",
@@ -20482,7 +20482,7 @@ const SR = ({
20482
20482
  secondaryButton: H.zero_state_generate_budgets_secondary_button,
20483
20483
  subText: H.zero_state_generate_budgets_subheader,
20484
20484
  sx: {
20485
- width: N,
20485
+ width: G,
20486
20486
  mt: 86
20487
20487
  }
20488
20488
  } : {
@@ -20534,8 +20534,8 @@ const SR = ({
20534
20534
  /* @__PURE__ */ e(
20535
20535
  ir,
20536
20536
  {
20537
- onClose: () => D(!1),
20538
- showConnectionsWidget: j,
20537
+ onClose: () => j(!1),
20538
+ showConnectionsWidget: D,
20539
20539
  title: b.manage_connections
20540
20540
  }
20541
20541
  )
@@ -20554,7 +20554,7 @@ const SR = ({
20554
20554
  children: /* @__PURE__ */ s(P, { height: 450, mt: 32, children: [
20555
20555
  /* @__PURE__ */ e(Wa, { height: 370, shouldShowZeroState: I }),
20556
20556
  !I && /* @__PURE__ */ s(L, { ml: 16, children: [
20557
- /* @__PURE__ */ e(R, { bold: !0, color: a < 0 ? "error.main" : "success.main", children: M(Math.abs(a), "0,0") }),
20557
+ /* @__PURE__ */ e(R, { bold: !0, color: a < 0 ? "error.main" : "success.main", children: N(Math.abs(a), "0,0") }),
20558
20558
  /* @__PURE__ */ e(R, { children: a < 0 ? o.overspent_in_budgets : o.left_in_budgets })
20559
20559
  ] })
20560
20560
  ] })
@@ -20578,8 +20578,8 @@ const SR = ({
20578
20578
  primary: /* @__PURE__ */ s(P, { component: "span", direction: "row", justifyContent: "space-between", children: [
20579
20579
  /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: A.category.name }),
20580
20580
  /* @__PURE__ */ e(R, { fontWeight: 400, variant: "Body", children: `
20581
- ${M(d, "0,0")} /
20582
- ${M(i, "0,0")}
20581
+ ${N(d, "0,0")} /
20582
+ ${N(i, "0,0")}
20583
20583
  ` })
20584
20584
  ] }),
20585
20585
  secondary: /* @__PURE__ */ s(P, { component: "span", direction: "row", justifyContent: "space-between", children: [
@@ -20614,56 +20614,65 @@ const SR = ({
20614
20614
  )
20615
20615
  ] }) : /* @__PURE__ */ e(aA, { children: n.map((a) => /* @__PURE__ */ s(h.Fragment, { children: [
20616
20616
  /* @__PURE__ */ e(WR, { budget: a, onClick: o }),
20617
- /* @__PURE__ */ e(G, {})
20617
+ /* @__PURE__ */ e(M, {})
20618
20618
  ] }, a.guid)) }) })
20619
20619
  ] });
20620
20620
  }
20621
20621
  ), KR = C(() => {
20622
- const A = uA(), { onEvent: t } = K(), { accounts: i } = CA(), { budgets: n, common: r, recurring: o } = p(), { incomeCategories: a, spendCategories: I } = qA(), { detailedBudgets: c, totalBudgeted: d } = te(), { projectedIncome: f } = ZA(), { setFilter: E } = PA(), [l, v] = h.useState(!1), [u, H] = h.useMemo(() => {
20623
- const x = I.reduce((m, O) => m + O.totalAmount, 0);
20624
- let w = x / d;
20625
- w > 1 && (w = 1);
20622
+ const A = uA(), { onEvent: t } = K(), { accounts: i } = CA(), { budgets: n, common: r, recurring: o } = p(), { incomeCategories: a, spendCategories: I, categories: c } = LA(), { detailedBudgets: d, totalBudgeted: f } = te(), { projectedIncome: E } = ZA(), { setFilter: l } = PA(), [v, u] = h.useState(!1);
20623
+ console.log(
20624
+ a,
20625
+ "incomeCategories",
20626
+ I,
20627
+ "spendCategories",
20628
+ JSON.parse(JSON.stringify(c)),
20629
+ "categories"
20630
+ );
20631
+ const [H, b] = h.useMemo(() => {
20632
+ const w = I.reduce((O, G) => O + G.totalAmount, 0);
20633
+ let D = w / f;
20634
+ D > 1 && (D = 1);
20626
20635
  let j = A.palette.success.main;
20627
- w > 0.8 && w < 1 ? j = A.palette.warning.main : w >= 1 && (j = A.palette.error.main);
20628
- const D = [
20636
+ D > 0.8 && D < 1 ? j = A.palette.warning.main : D >= 1 && (j = A.palette.error.main);
20637
+ const m = [
20629
20638
  {
20630
20639
  color: j,
20631
- percentage: `${w}`
20640
+ percentage: `${D}`
20632
20641
  }
20633
20642
  ];
20634
- return [x, D];
20635
- }, [c, I]), [b, g] = h.useMemo(() => {
20636
- const x = Math.abs(
20637
- a.reduce((D, m) => D + m.totalAmount, 0)
20643
+ return [w, m];
20644
+ }, [d, I]), [X, y] = h.useMemo(() => {
20645
+ const w = Math.abs(
20646
+ a.reduce((m, O) => m + O.totalAmount, 0)
20638
20647
  );
20639
- let w = x / f;
20640
- w > 1 && (w = 1);
20648
+ let D = w / E;
20649
+ D > 1 && (D = 1);
20641
20650
  const j = [
20642
20651
  {
20643
20652
  color: A.palette.secondary.main,
20644
- percentage: `${w}`
20653
+ percentage: `${D}`
20645
20654
  }
20646
20655
  ];
20647
- return [x, j];
20648
- }, [a, f]), y = () => {
20649
- E({
20650
- accounts: i.map((x) => x.guid),
20656
+ return [w, j];
20657
+ }, [a, E]), x = () => {
20658
+ l({
20659
+ accounts: i.map((w) => w.guid),
20651
20660
  dateRange: {
20652
20661
  start: Ve(/* @__PURE__ */ new Date(), 90),
20653
20662
  end: /* @__PURE__ */ new Date()
20654
20663
  }
20655
- }), v(!0), t(V.BUDGETS_CLICK_EDIT_INCOME);
20664
+ }), u(!0), t(V.BUDGETS_CLICK_EDIT_INCOME);
20656
20665
  };
20657
20666
  return /* @__PURE__ */ s(ze, { elevation: 2, sx: { overflow: "visible", borderRadius: 2 }, children: [
20658
20667
  /* @__PURE__ */ e(ot, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(ne, { children: n.overview_title }) }),
20659
20668
  /* @__PURE__ */ e(Ce, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ s(P, { gap: 24, children: [
20660
20669
  /* @__PURE__ */ s(P, { gap: 8, children: [
20661
20670
  /* @__PURE__ */ e(R, { bold: !0, sx: { mb: 8 }, variant: "Body", children: n.spending_title }),
20662
- /* @__PURE__ */ e(ii, { data: H, height: 16 }),
20671
+ /* @__PURE__ */ e(ii, { data: b, height: 16 }),
20663
20672
  /* @__PURE__ */ e(R, { variant: "Small", children: z(
20664
20673
  n.spending_description,
20665
- M(u, "0,0"),
20666
- M(d, "0,0")
20674
+ N(H, "0,0"),
20675
+ N(f, "0,0")
20667
20676
  ) })
20668
20677
  ] }),
20669
20678
  /* @__PURE__ */ s(P, { gap: 8, children: [
@@ -20673,17 +20682,17 @@ const SR = ({
20673
20682
  NA,
20674
20683
  {
20675
20684
  "aria-label": o.manage_income,
20676
- onClick: y,
20685
+ onClick: x,
20677
20686
  sx: { p: 0 },
20678
20687
  children: /* @__PURE__ */ e(q, { name: "edit" })
20679
20688
  }
20680
20689
  )
20681
20690
  ] }),
20682
- /* @__PURE__ */ e(ii, { data: g, height: 16 }),
20691
+ /* @__PURE__ */ e(ii, { data: y, height: 16 }),
20683
20692
  /* @__PURE__ */ e(R, { variant: "Small", children: z(
20684
20693
  n.income_description,
20685
- M(b, "0,0"),
20686
- M(f, "0,0")
20694
+ N(X, "0,0"),
20695
+ N(E, "0,0")
20687
20696
  ) })
20688
20697
  ] })
20689
20698
  ] }) }),
@@ -20691,8 +20700,8 @@ const SR = ({
20691
20700
  IA,
20692
20701
  {
20693
20702
  ariaLabelClose: r.close_aria,
20694
- isOpen: l,
20695
- onClose: () => v(!1),
20703
+ isOpen: v,
20704
+ onClose: () => u(!1),
20696
20705
  title: o.manage_income,
20697
20706
  children: /* @__PURE__ */ s(P, { gap: 4, children: [
20698
20707
  /* @__PURE__ */ e(R, { bold: !0, sx: { mt: 12, mx: 24 }, variant: "Small", children: n.income_title }),
@@ -20705,24 +20714,24 @@ const SR = ({
20705
20714
  const { budgets: A } = p(), { totalBudgeted: t } = te(), { projectedIncome: i } = ZA(), n = i - t;
20706
20715
  return /* @__PURE__ */ s(P, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
20707
20716
  /* @__PURE__ */ s(P, { alignItems: "center", children: [
20708
- /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: M(i, "0,0") }),
20717
+ /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: N(i, "0,0") }),
20709
20718
  /* @__PURE__ */ e(R, { color: "secondary", variant: "Small", children: A.projected_income })
20710
20719
  ] }),
20711
20720
  /* @__PURE__ */ e(R, { bold: !0, justifyContent: "center", variant: "Body", children: "-" }),
20712
20721
  /* @__PURE__ */ s(P, { alignItems: "center", children: [
20713
- /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: M(t, "0,0") }),
20722
+ /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: N(t, "0,0") }),
20714
20723
  /* @__PURE__ */ e(R, { color: "secondary", variant: "Small", children: A.budgeted })
20715
20724
  ] }),
20716
20725
  /* @__PURE__ */ e(R, { bold: !0, justifyContent: "center", variant: "Body", children: "=" }),
20717
20726
  /* @__PURE__ */ s(P, { alignItems: "center", children: [
20718
- /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: M(n, "0,0") }),
20727
+ /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: N(n, "0,0") }),
20719
20728
  /* @__PURE__ */ e(R, { color: "secondary", variant: "Small", children: A.remaining })
20720
20729
  ] })
20721
20730
  ] });
20722
20731
  }), JR = C(
20723
20732
  ({ category: A }) => {
20724
20733
  const { budgets: t } = p(), { budgets: i } = te(), n = h.useMemo(() => {
20725
- const r = i.find((I) => I.category_guid === A.guid), o = M(A.totalAverageAmount, "0,0"), a = r ? z(t.recalculate_previous_budget, M(r.amount, "0,0")) : t.recalculate_new_budget;
20734
+ const r = i.find((I) => I.category_guid === A.guid), o = N(A.totalAverageAmount, "0,0"), a = r ? z(t.recalculate_previous_budget, N(r.amount, "0,0")) : t.recalculate_new_budget;
20726
20735
  return `${o} - ${a}`;
20727
20736
  }, [t, i]);
20728
20737
  return /* @__PURE__ */ s(h.Fragment, { children: [
@@ -20730,11 +20739,11 @@ const SR = ({
20730
20739
  /* @__PURE__ */ e(DA, { children: /* @__PURE__ */ e(be, { categoryGuid: A.guid, variant: "filled" }) }),
20731
20740
  /* @__PURE__ */ e(nA, { primary: A.name, secondary: n })
20732
20741
  ] }) }),
20733
- /* @__PURE__ */ e(G, {})
20742
+ /* @__PURE__ */ e(M, {})
20734
20743
  ] }, A.guid);
20735
20744
  }
20736
20745
  ), _R = ({ onRecalculateBudgets: A }) => {
20737
- const { budgets: t, common: i } = p(), { spendCategories: n } = qA(), { recalculateBudgets: r, setAlert: o } = te(), [a, I] = h.useState(!1), c = n.filter((f) => f.totalAverageAmount > 0), d = async () => {
20746
+ const { budgets: t, common: i } = p(), { spendCategories: n } = LA(), { recalculateBudgets: r, setAlert: o } = te(), [a, I] = h.useState(!1), c = n.filter((f) => f.totalAverageAmount > 0), d = async () => {
20738
20747
  await r(c), I(!1), o(t.alert_recalculated_budgets), A?.();
20739
20748
  };
20740
20749
  return /* @__PURE__ */ s(h.Fragment, { children: [
@@ -20768,7 +20777,7 @@ const SR = ({
20768
20777
  /* @__PURE__ */ s(P, { children: [
20769
20778
  /* @__PURE__ */ e(R, { children: z(
20770
20779
  n.add_description_top,
20771
- M(a, "0,0")
20780
+ N(a, "0,0")
20772
20781
  ) }),
20773
20782
  /* @__PURE__ */ e(R, { children: z(n.add_description_bottom, t) })
20774
20783
  ] }),
@@ -20795,7 +20804,7 @@ const SR = ({
20795
20804
  nA,
20796
20805
  {
20797
20806
  primary: A.name,
20798
- secondary: M(A.totalAmount, "0,0")
20807
+ secondary: N(A.totalAmount, "0,0")
20799
20808
  }
20800
20809
  ),
20801
20810
  /* @__PURE__ */ e(Ls, { children: /* @__PURE__ */ e(q, { name: "add", size: 20 }) })
@@ -20845,7 +20854,7 @@ const SR = ({
20845
20854
  ];
20846
20855
  return /* @__PURE__ */ e(ze, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(Ce, { children: /* @__PURE__ */ s(P, { alignItems: "center", gap: 16, children: [
20847
20856
  /* @__PURE__ */ e(be, { categoryGuid: r, size: 56 }),
20848
- /* @__PURE__ */ e(nt, { children: `${M(a, "0,0")} / ${M(t, "0,0")}` }),
20857
+ /* @__PURE__ */ e(nt, { children: `${N(a, "0,0")} / ${N(t, "0,0")}` }),
20849
20858
  /* @__PURE__ */ e(R, { bold: !0, variant: "XSmall", children: n }),
20850
20859
  /* @__PURE__ */ e(ii, { data: I, height: 10 })
20851
20860
  ] }) }) });
@@ -20871,8 +20880,8 @@ const SR = ({
20871
20880
  {
20872
20881
  primary: /* @__PURE__ */ e(P, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(R, { bold: !0, variant: "Body", children: A.category.name }) }),
20873
20882
  secondary: /* @__PURE__ */ e(P, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(R, { fontWeight: 400, variant: "Body", children: `
20874
- ${M(o, "0,0")} /
20875
- ${M(t, "0,0")}
20883
+ ${N(o, "0,0")} /
20884
+ ${N(t, "0,0")}
20876
20885
  ` }) })
20877
20886
  }
20878
20887
  )
@@ -20880,8 +20889,8 @@ const SR = ({
20880
20889
  }), i3 = C(({ category: A, parentBudget: t }) => {
20881
20890
  const { budgets: i, common: n } = p(), { setExpandedGuid: r, setOnSelect: o } = at(), { addBudget: a } = te(), [I, c] = h.useState(!1), [d, f] = h.useState(!1), [E, l] = h.useState(""), [v, u] = h.useState(void 0);
20882
20891
  h.useEffect(() => {
20883
- o((g) => {
20884
- const y = A.subCategories.find((x) => x.guid === g);
20892
+ o((X) => {
20893
+ const y = A.subCategories.find((x) => x.guid === X);
20885
20894
  y && (u(y), l(`${y.currentAmount === 0 ? "" : y.currentAmount}`), f(!0));
20886
20895
  });
20887
20896
  }, []);
@@ -20898,7 +20907,7 @@ const SR = ({
20898
20907
  ] }),
20899
20908
  /* @__PURE__ */ e(q, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
20900
20909
  ] }) }) }) }),
20901
- /* @__PURE__ */ e(G, {}),
20910
+ /* @__PURE__ */ e(M, {}),
20902
20911
  /* @__PURE__ */ e(
20903
20912
  IA,
20904
20913
  {
@@ -20937,7 +20946,7 @@ const SR = ({
20937
20946
  custom: (w) => w.category_guid === a.category_guid
20938
20947
  }));
20939
20948
  }, [a]);
20940
- const g = async () => {
20949
+ const X = async () => {
20941
20950
  a && await c({
20942
20951
  ...a,
20943
20952
  amount: Number(H)
@@ -20954,7 +20963,7 @@ const SR = ({
20954
20963
  /* @__PURE__ */ s(aA, { sx: { bgcolor: "background.paper" }, children: [
20955
20964
  i.length === 0 ? /* @__PURE__ */ e(e3, {}) : i.map((w) => /* @__PURE__ */ s(h.Fragment, { children: [
20956
20965
  /* @__PURE__ */ e(t3, { budget: w }),
20957
- /* @__PURE__ */ e(G, {})
20966
+ /* @__PURE__ */ e(M, {})
20958
20967
  ] }, w.guid)),
20959
20968
  /* @__PURE__ */ e(i3, { category: t, parentBudget: A })
20960
20969
  ] }),
@@ -20983,7 +20992,7 @@ const SR = ({
20983
20992
  disablePrimaryButton: Number(H) <= 0,
20984
20993
  isOpen: E,
20985
20994
  onClose: () => l(!1),
20986
- onPrimaryAction: g,
20995
+ onPrimaryAction: X,
20987
20996
  primaryText: n.edit_save_button,
20988
20997
  children: /* @__PURE__ */ e(
20989
20998
  ki,
@@ -21069,24 +21078,24 @@ const SR = ({
21069
21078
  setAlert: I,
21070
21079
  setSelectedBudget: c,
21071
21080
  updateBudget: d
21072
- } = te(), { setFilter: f } = PA(), [E, l] = h.useState(!1), [v, u] = h.useState(!1), [H, b] = h.useState(!1), [g, y] = h.useState("");
21081
+ } = te(), { removeCategory: f } = LA(), { setFilter: E } = PA(), [l, v] = h.useState(!1), [u, H] = h.useState(!1), [b, X] = h.useState(!1), [y, x] = h.useState("");
21073
21082
  h.useEffect(() => {
21074
- o && !a && (y(`${o.amount}`), l(!0), f({
21083
+ o && !a && (x(`${o.amount}`), v(!0), E({
21075
21084
  accounts: A,
21076
21085
  dateRange: n,
21077
- custom: (D) => D.category_guid === o.category_guid || D.top_level_category_guid === o.category_guid
21086
+ custom: (m) => m.category_guid === o.category_guid || m.top_level_category_guid === o.category_guid
21078
21087
  }));
21079
21088
  }, [o]);
21080
- const x = async () => {
21089
+ const w = async () => {
21081
21090
  o && (await d({
21082
21091
  ...o,
21083
- amount: Number(g),
21084
- percentage: o.category.totalAmount / Number(g) * 100
21092
+ amount: Number(y),
21093
+ percentage: o.category.totalAmount / Number(y) * 100
21085
21094
  }), I(z(t.alert_budget_updated, o.category.name)));
21086
- }, w = async () => {
21087
- o && (await r(o.guid), I(z(t.alert_budget_deleted, o.category.name))), b(!1), j();
21095
+ }, D = async () => {
21096
+ o && (await r(o.guid), await f(o.category_guid), I(z(t.alert_budget_deleted, o.category.name))), X(!1), j();
21088
21097
  }, j = () => {
21089
- l(!1), setTimeout(() => {
21098
+ v(!1), setTimeout(() => {
21090
21099
  c(void 0);
21091
21100
  }, 250);
21092
21101
  };
@@ -21096,10 +21105,10 @@ const SR = ({
21096
21105
  IA,
21097
21106
  {
21098
21107
  ariaLabelClose: i.close_aria,
21099
- isOpen: E,
21108
+ isOpen: l,
21100
21109
  onClose: j,
21101
- onPrimaryAction: () => u(!0),
21102
- onSecondaryAction: () => b(!0),
21110
+ onPrimaryAction: () => H(!0),
21111
+ onSecondaryAction: () => X(!0),
21103
21112
  primaryText: t.details_edit_button,
21104
21113
  secondaryColor: "error",
21105
21114
  secondaryText: t.details_delete_button,
@@ -21111,17 +21120,17 @@ const SR = ({
21111
21120
  pA,
21112
21121
  {
21113
21122
  copy: { close_aria: i.close_aria, title: t.details_edit_title },
21114
- disablePrimaryButton: Number(g) <= 0,
21115
- isOpen: v,
21116
- onClose: () => u(!1),
21117
- onPrimaryAction: x,
21123
+ disablePrimaryButton: Number(y) <= 0,
21124
+ isOpen: u,
21125
+ onClose: () => H(!1),
21126
+ onPrimaryAction: w,
21118
21127
  primaryText: t.edit_save_button,
21119
21128
  children: /* @__PURE__ */ e(
21120
21129
  ki,
21121
21130
  {
21122
- amount: g,
21131
+ amount: y,
21123
21132
  categoryName: o.category.name,
21124
- onAmountChanged: y
21133
+ onAmountChanged: x
21125
21134
  }
21126
21135
  )
21127
21136
  }
@@ -21130,9 +21139,9 @@ const SR = ({
21130
21139
  pA,
21131
21140
  {
21132
21141
  copy: { close_aria: i.close_aria, title: t.delete_title },
21133
- isOpen: H,
21134
- onClose: () => b(!1),
21135
- onPrimaryAction: w,
21142
+ isOpen: b,
21143
+ onClose: () => X(!1),
21144
+ onPrimaryAction: D,
21136
21145
  primaryColor: "error",
21137
21146
  primaryText: t.details_delete_button,
21138
21147
  secondaryColor: "secondary",
@@ -21141,24 +21150,24 @@ const SR = ({
21141
21150
  )
21142
21151
  ] });
21143
21152
  }), Po = 480, YP = C(({ onBackClick: A, sx: t }) => {
21144
- const i = uA(), { onEvent: n } = K(), { accounts: r } = CA(), { budgets: o, common: a } = p(), { isInitialized: I, selectedAccounts: c, setDisplayedDate: d, setSelectedAccounts: f } = wA(), { alert: E, dateRange: l, loadBudgets: v, setDateRange: u, setAlert: H, setTheme: b, budgets: g } = te(), { loadCashflowSequences: y } = ZA(), { isDesktop: x, isTablet: w } = zA(), { reloadCategoryTotals: j } = qA(), [D, m] = h.useState(!1), [O, N] = h.useState(!1), [tA, Y] = h.useState(!1);
21153
+ const i = uA(), { onEvent: n } = K(), { accounts: r } = CA(), { budgets: o, common: a } = p(), { isInitialized: I, selectedAccounts: c, setDisplayedDate: d, setSelectedAccounts: f } = wA(), { alert: E, dateRange: l, loadBudgets: v, setDateRange: u, setAlert: H, setTheme: b, budgets: X } = te(), { loadCashflowSequences: y } = ZA(), { isDesktop: x, isTablet: w } = zA(), { reloadCategoryTotals: D } = LA(), [j, m] = h.useState(!1), [O, G] = h.useState(!1), [tA, Y] = h.useState(!1);
21145
21154
  h.useEffect(() => {
21146
21155
  b(i), f(r), d(l.start, l.end), n(V.BUDGETS_VIEW);
21147
21156
  }, []), h.useEffect(() => {
21148
21157
  f(r);
21149
21158
  }, [r]), h.useEffect(() => {
21150
- I && (j(c, l.start, l.end).finally(), D || (y().finally(), v().finally(() => m(!0))));
21159
+ I && (D(c, l.start, l.end).finally(), j || (y().finally(), v().finally(() => m(!0))));
21151
21160
  }, [I, c, l]);
21152
21161
  const AA = (gA) => {
21153
21162
  u({ start: gA[0] || /* @__PURE__ */ new Date(), end: gA[1] || /* @__PURE__ */ new Date() });
21154
21163
  }, rA = () => {
21155
21164
  n(V.BUDGETS_CLICK_FILTER);
21156
21165
  }, sA = () => {
21157
- N(!0), n(V.BUDGETS_CLICK_ADD);
21166
+ G(!0), n(V.BUDGETS_CLICK_ADD);
21158
21167
  }, hA = () => {
21159
- N(!1);
21160
- }, Z = Ot(l.end, QA(/* @__PURE__ */ new Date()));
21161
- return !I || !D ? /* @__PURE__ */ e(ee, {}) : /* @__PURE__ */ s(
21168
+ G(!1);
21169
+ }, Z = Ot(l.end, qA(/* @__PURE__ */ new Date()));
21170
+ return !I || !j ? /* @__PURE__ */ e(ee, {}) : /* @__PURE__ */ s(
21162
21171
  Le,
21163
21172
  {
21164
21173
  accountOptions: r,
@@ -21175,8 +21184,8 @@ const SR = ({
21175
21184
  sx: t,
21176
21185
  title: o.budgets_title,
21177
21186
  children: [
21178
- (!I || !D) && /* @__PURE__ */ e(ee, {}),
21179
- I && D && /* @__PURE__ */ s(
21187
+ (!I || !j) && /* @__PURE__ */ e(ee, {}),
21188
+ I && j && /* @__PURE__ */ s(
21180
21189
  P,
21181
21190
  {
21182
21191
  direction: x || w ? "row" : "column",
@@ -21191,7 +21200,7 @@ const SR = ({
21191
21200
  height: x || w ? 800 : 450,
21192
21201
  isDraggable: !0,
21193
21202
  shouldShowEmptyGeneratedBudgetsCallback: () => Y(!0),
21194
- shouldShowZeroState: g.length === 0,
21203
+ shouldShowZeroState: X.length === 0,
21195
21204
  unavailableWidth: x || w ? Po : 0
21196
21205
  }
21197
21206
  ) }),
@@ -21217,7 +21226,7 @@ const SR = ({
21217
21226
  {
21218
21227
  ariaLabelClose: a.close_aria,
21219
21228
  isOpen: O,
21220
- onClose: () => N(!1),
21229
+ onClose: () => G(!1),
21221
21230
  title: o.add_new_title,
21222
21231
  children: /* @__PURE__ */ e(A3, { onRecalculateBudgets: hA })
21223
21232
  }
@@ -21599,11 +21608,11 @@ const si = h.createContext(null), R3 = ({
21599
21608
  variant: u,
21600
21609
  widthOverrides: H
21601
21610
  }, b) {
21602
- const [g, y] = h.useState(2);
21611
+ const [X, y] = h.useState(2);
21603
21612
  h.useEffect(() => {
21604
21613
  H && H <= 325 && y(3);
21605
21614
  }, [H]);
21606
- const { cardStyle: x, linkTextStyle: w } = E, j = u ? x : { border: "none", boxShadow: "none", ...x }, D = /* @__PURE__ */ e(
21615
+ const { cardStyle: x, linkTextStyle: w } = E, D = u ? x : { border: "none", boxShadow: "none", ...x }, j = /* @__PURE__ */ e(
21607
21616
  HA,
21608
21617
  {
21609
21618
  className: "mx-micro-card-description",
@@ -21615,7 +21624,7 @@ const si = h.createContext(null), R3 = ({
21615
21624
  lineHeight: "20px",
21616
21625
  px: c ? 0 : 28,
21617
21626
  overflow: "hidden",
21618
- WebkitLineClamp: g,
21627
+ WebkitLineClamp: X,
21619
21628
  WebkitBoxOrient: "vertical",
21620
21629
  wordWrap: "break-word"
21621
21630
  },
@@ -21649,7 +21658,7 @@ const si = h.createContext(null), R3 = ({
21649
21658
  cursor: "pointer",
21650
21659
  height: o ? "100%" : 124,
21651
21660
  p: 16,
21652
- ...j,
21661
+ ...D,
21653
21662
  "& .MuiCardHeader-avatar": {
21654
21663
  color: l.iconColor,
21655
21664
  mr: "8px"
@@ -21668,13 +21677,13 @@ const si = h.createContext(null), R3 = ({
21668
21677
  ot,
21669
21678
  {
21670
21679
  avatar: f && a,
21671
- subheader: c && D,
21680
+ subheader: c && j,
21672
21681
  sx: { color: l.headerColor, p: 0 },
21673
21682
  title: v,
21674
21683
  titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
21675
21684
  }
21676
21685
  ),
21677
- /* @__PURE__ */ e(Ce, { sx: { p: 0 }, children: !c && D }),
21686
+ /* @__PURE__ */ e(Ce, { sx: { p: 0 }, children: !c && j }),
21678
21687
  !!t && /* @__PURE__ */ e(Qs, { sx: { padding: 0 }, children: /* @__PURE__ */ e(
21679
21688
  L,
21680
21689
  {
@@ -21698,7 +21707,7 @@ const si = h.createContext(null), R3 = ({
21698
21707
  );
21699
21708
  }
21700
21709
  ), u3 = ({ beat: A }) => {
21701
- const [t, i] = Fe(X.UNCATEGORIZED);
21710
+ const [t, i] = Fe(g.UNCATEGORIZED);
21702
21711
  return Ht(() => {
21703
21712
  A.primary_category_guid ? i(A.primary_category_guid) : A.category_guids?.length && i(A.category_guids[0]);
21704
21713
  }, []), /* @__PURE__ */ e(be, { categoryGuid: t, size: 16, sx: { minWidth: 16 } });
@@ -22592,12 +22601,12 @@ const si = h.createContext(null), R3 = ({
22592
22601
  }) => {
22593
22602
  const { ref: v, inView: u } = Bo({
22594
22603
  threshold: tI
22595
- }), { cardsCopy: H } = ut(), { onEvent: b } = ci(), { updateBeat: g, updateOffer: y } = p3();
22604
+ }), { cardsCopy: H } = ut(), { onEvent: b } = ci(), { updateBeat: X, updateOffer: y } = p3();
22596
22605
  Ht(() => {
22597
22606
  u && (i.has_been_displayed ? b(Za(i.template)) : (i.guid.startsWith("OFR") ? y({
22598
22607
  ...i,
22599
22608
  has_been_displayed: !0
22600
- }) : g({
22609
+ }) : X({
22601
22610
  ...i,
22602
22611
  has_been_displayed: !0
22603
22612
  }), b(Ja(i.template))));
@@ -22730,7 +22739,7 @@ const si = h.createContext(null), R3 = ({
22730
22739
  variant: d,
22731
22740
  widthOverrides: f
22732
22741
  }) => {
22733
- const E = O3(n, c, f), l = h.useRef(null), [v, u] = h.useState(0), [H, b] = h.useState(null), [g, y] = h.useState(null), { carouselCopy: x } = ut(), { onEvent: w } = ci(), j = () => {
22742
+ const E = O3(n, c, f), l = h.useRef(null), [v, u] = h.useState(0), [H, b] = h.useState(null), [X, y] = h.useState(null), { carouselCopy: x } = ut(), { onEvent: w } = ci(), D = () => {
22734
22743
  w(xe.ON_CAROUSEL_FORWARD_CLICK), l.current && l.current.scrollTo({
22735
22744
  left: (
22736
22745
  // Adds the flex gap to the carousel ref's width
@@ -22739,7 +22748,7 @@ const si = h.createContext(null), R3 = ({
22739
22748
  top: 0,
22740
22749
  behavior: "smooth"
22741
22750
  });
22742
- }, D = () => {
22751
+ }, j = () => {
22743
22752
  w(xe.ON_CAROUSEL_BACK_CLICK), l.current && l.current.scrollTo({
22744
22753
  left: (l.current.offsetWidth + 8) * (Math.floor(v / (l.current.offsetWidth + 8)) - 1),
22745
22754
  top: 0,
@@ -22748,9 +22757,9 @@ const si = h.createContext(null), R3 = ({
22748
22757
  }, m = () => {
22749
22758
  l.current && u(l.current.scrollLeft);
22750
22759
  }, O = () => {
22751
- if (!g || !H) return;
22752
- g - H > w3 ? w(xe.ON_CAROUSEL_FORWARD_SWIPE) : w(xe.ON_CAROUSEL_BACK_SWIPE);
22753
- }, N = (sA) => {
22760
+ if (!X || !H) return;
22761
+ X - H > w3 ? w(xe.ON_CAROUSEL_FORWARD_SWIPE) : w(xe.ON_CAROUSEL_BACK_SWIPE);
22762
+ }, G = (sA) => {
22754
22763
  b(sA.targetTouches[0].clientX);
22755
22764
  }, tA = (sA) => {
22756
22765
  b(null), y(sA.targetTouches[0].clientX);
@@ -22777,7 +22786,7 @@ const si = h.createContext(null), R3 = ({
22777
22786
  className: "mx-insights-micro-carousel-container",
22778
22787
  onScroll: m,
22779
22788
  onTouchEnd: O,
22780
- onTouchMove: N,
22789
+ onTouchMove: G,
22781
22790
  onTouchStart: tA,
22782
22791
  ref: l,
22783
22792
  children: [
@@ -22817,8 +22826,8 @@ const si = h.createContext(null), R3 = ({
22817
22826
  clientColorScheme: t,
22818
22827
  currentBeatIndex: AA,
22819
22828
  numBeats: A.length + 1,
22820
- onNextClick: j,
22821
- onPreviousClick: D,
22829
+ onNextClick: D,
22830
+ onPreviousClick: j,
22822
22831
  scrollRightBoundary: rA,
22823
22832
  scrollX: v
22824
22833
  }
@@ -23072,17 +23081,17 @@ const si = h.createContext(null), R3 = ({
23072
23081
  showIcon: u,
23073
23082
  showWithMargin: H = !0,
23074
23083
  token: b = "",
23075
- useDarkMode: g,
23084
+ useDarkMode: X,
23076
23085
  userHasFullInsightFeedBeats: y,
23077
23086
  variant: x,
23078
23087
  widthOverrides: w
23079
23088
  }) => {
23080
- const [j, D] = Fe("STANDARD"), [m, O] = Fe(!1), N = ac([c], Je), tA = Ic([d], Je);
23089
+ const [D, j] = Fe("STANDARD"), [m, O] = Fe(!1), G = ac([c], Je), tA = Ic([d], Je);
23081
23090
  h.useEffect(() => {
23082
23091
  Je.isInitialized || Je.initialize(r, b, a);
23083
23092
  }, [r, b, a, Je.isInitialized]), h.useEffect(() => {
23084
23093
  const rA = window.innerHeight;
23085
- rA < 180 ? D("STANDARD") : rA >= 180 && rA < 200 ? D("LARGE") : rA >= 200 && rA < 248 ? D("XLARGE") : rA >= 248 && D("XXLARGE");
23094
+ rA < 180 ? j("STANDARD") : rA >= 180 && rA < 200 ? j("LARGE") : rA >= 200 && rA < 248 ? j("XLARGE") : rA >= 248 && j("XXLARGE");
23086
23095
  }, [window.innerHeight]), h.useEffect(() => {
23087
23096
  O(!A && Je.isInitialized);
23088
23097
  }, [A, Je.isInitialized]);
@@ -23093,18 +23102,18 @@ const si = h.createContext(null), R3 = ({
23093
23102
  posthog: f,
23094
23103
  showIcon: u,
23095
23104
  showWithMargin: H,
23096
- useDarkMode: g,
23105
+ useDarkMode: X,
23097
23106
  widthOverrides: w
23098
23107
  }, AA = {
23099
- carouselSize: j,
23108
+ carouselSize: D,
23100
23109
  variant: x,
23101
23110
  ...Y
23102
23111
  };
23103
23112
  return (
23104
23113
  // The Theme provider must wrap the component so that the styles don't break when imported into other applications.
23105
- /* @__PURE__ */ s(wI, { theme: hI(g ? "dark" : "light"), children: [
23114
+ /* @__PURE__ */ s(wI, { theme: hI(X ? "dark" : "light"), children: [
23106
23115
  /* @__PURE__ */ e(Gs, {}),
23107
- /* @__PURE__ */ e(R3, { onEvent: N, onPageview: tA, store: Je, children: /* @__PURE__ */ s(q3, { heightOverrides: o, widthOverrides: w, children: [
23116
+ /* @__PURE__ */ e(R3, { onEvent: G, onPageview: tA, store: Je, children: /* @__PURE__ */ s(q3, { heightOverrides: o, widthOverrides: w, children: [
23108
23117
  (A || !Je.isInitialized) && /* @__PURE__ */ e(G3, {}),
23109
23118
  m && v && /* @__PURE__ */ e(
23110
23119
  Q3,
@@ -23200,7 +23209,7 @@ const si = h.createContext(null), R3 = ({
23200
23209
  }
23201
23210
  return i;
23202
23211
  }, []), rI = (A, t) => {
23203
- const i = Y3(A, t), n = i.filter((c) => c.guid !== X.INCOME && c.guid !== X.TRANSFER).sort((c, d) => d.amount - c.amount), r = n.reduce(
23212
+ const i = Y3(A, t), n = i.filter((c) => c.guid !== g.INCOME && c.guid !== g.TRANSFER).sort((c, d) => d.amount - c.amount), r = n.reduce(
23204
23213
  (c, d) => c + d.amount,
23205
23214
  0
23206
23215
  ), o = n.length > cn ? cn : n.length, a = n.slice(0, o), I = a.map((c) => ({
@@ -23238,7 +23247,7 @@ const si = h.createContext(null), R3 = ({
23238
23247
  };
23239
23248
  }, oI = (A, t, i) => {
23240
23249
  const n = A.filter(
23241
- (I) => I.parent_guid === X.INCOME
23250
+ (I) => I.parent_guid === g.INCOME
23242
23251
  ), r = t.filter((I) => n.some((c) => c.guid === I.category_guid)).sort((I, c) => I.total - c.total).map((I, c) => ({
23243
23252
  guid: I.category_guid,
23244
23253
  name: A.find((d) => d.guid === I.category_guid)?.name,
@@ -23261,7 +23270,7 @@ const si = h.createContext(null), R3 = ({
23261
23270
  };
23262
23271
  }, wi = ({ amount: A, label: t }) => /* @__PURE__ */ s(P, { direction: "column", children: [
23263
23272
  /* @__PURE__ */ e(R, { bold: !0, sx: { textTransform: "none" }, variant: "Body", children: t }),
23264
- /* @__PURE__ */ e(R, { variant: "XSmall", children: M(A, "0,0") })
23273
+ /* @__PURE__ */ e(R, { variant: "XSmall", children: N(A, "0,0") })
23265
23274
  ] }), V3 = ({
23266
23275
  data: A,
23267
23276
  isIncome: t = !1,
@@ -23291,7 +23300,7 @@ const si = h.createContext(null), R3 = ({
23291
23300
  /* @__PURE__ */ e(
23292
23301
  be,
23293
23302
  {
23294
- categoryGuid: t ? X.INCOME : E.guid,
23303
+ categoryGuid: t ? g.INCOME : E.guid,
23295
23304
  size: I === "mini" ? 24 : u,
23296
23305
  variant: xo.Transparent
23297
23306
  }
@@ -23301,7 +23310,7 @@ const si = h.createContext(null), R3 = ({
23301
23310
  }
23302
23311
  ),
23303
23312
  !E && I === "full" && /* @__PURE__ */ e(R, { bold: !0, color: "secondary", sx: { mb: { xs: 4, xl: 8 } }, children: a }),
23304
- /* @__PURE__ */ e(R, { variant: I === "mini" ? "H2" : "H1", children: M(E ? E.amount : A.totalAmount, "0,0") }),
23313
+ /* @__PURE__ */ e(R, { variant: I === "mini" ? "H2" : "H1", children: N(E ? E.amount : A.totalAmount, "0,0") }),
23305
23314
  !E && I === "mini" && /* @__PURE__ */ e(R, { color: "secondary", noWrap: !0, variant: "Tiny", children: a }),
23306
23315
  I === "full" && /* @__PURE__ */ e(
23307
23316
  $,
@@ -23343,11 +23352,11 @@ const si = h.createContext(null), R3 = ({
23343
23352
  A.palette.chartMono.chartMono6
23344
23353
  ],
23345
23354
  [A]
23346
- ), { categories: r, dateRangeCategoryTotals: o, loadDateRangeCategoryTotals: a } = qA();
23355
+ ), { categories: r, dateRangeCategoryTotals: o, loadDateRangeCategoryTotals: a } = LA();
23347
23356
  h.useEffect(() => {
23348
23357
  a(
23349
23358
  i,
23350
- QA(/* @__PURE__ */ new Date()),
23359
+ qA(/* @__PURE__ */ new Date()),
23351
23360
  BA(/* @__PURE__ */ new Date())
23352
23361
  ).finally();
23353
23362
  }, [i]);
@@ -23444,7 +23453,7 @@ const si = h.createContext(null), R3 = ({
23444
23453
  const { spending: r } = p(), o = A.categoryData.find((a) => a.guid === i);
23445
23454
  return /* @__PURE__ */ s(P, { direction: "column", justifyContent: "center", maxWidth: 400, minWidth: 275, width: "100%", children: [
23446
23455
  /* @__PURE__ */ e(R, { bold: !0, sx: { py: 12 }, children: `${n} ${r.by_category}` }),
23447
- /* @__PURE__ */ e(G, { "aria-hidden": "true" }),
23456
+ /* @__PURE__ */ e(M, { "aria-hidden": "true" }),
23448
23457
  /* @__PURE__ */ e(aA, { children: A.categoryData.map((a) => /* @__PURE__ */ s(h.Fragment, { children: [
23449
23458
  /* @__PURE__ */ e(
23450
23459
  W,
@@ -23480,7 +23489,7 @@ const si = h.createContext(null), R3 = ({
23480
23489
  width: "100%",
23481
23490
  children: [
23482
23491
  /* @__PURE__ */ e(R, { bold: i === a.guid, children: a.name }),
23483
- /* @__PURE__ */ e(R, { bold: i === a.guid, variant: "Body", children: M(a.amount, "0,0") })
23492
+ /* @__PURE__ */ e(R, { bold: i === a.guid, variant: "Body", children: N(a.amount, "0,0") })
23484
23493
  ]
23485
23494
  }
23486
23495
  )
@@ -23489,7 +23498,7 @@ const si = h.createContext(null), R3 = ({
23489
23498
  )
23490
23499
  }
23491
23500
  ),
23492
- /* @__PURE__ */ e(G, {}),
23501
+ /* @__PURE__ */ e(M, {}),
23493
23502
  a.categoryTotals && a.categoryTotals.length > 0 && /* @__PURE__ */ e(Qi, { in: o?.guid === a.guid, unmountOnExit: !0, children: /* @__PURE__ */ s(aA, { children: [
23494
23503
  o?.categoryTotals?.map((I) => /* @__PURE__ */ e(
23495
23504
  W,
@@ -23504,15 +23513,15 @@ const si = h.createContext(null), R3 = ({
23504
23513
  I.name,
23505
23514
  " "
23506
23515
  ] }),
23507
- /* @__PURE__ */ e(R, { children: M(I.amount, "0,0") })
23516
+ /* @__PURE__ */ e(R, { children: N(I.amount, "0,0") })
23508
23517
  ] })
23509
23518
  },
23510
23519
  I.guid
23511
23520
  )),
23512
- /* @__PURE__ */ e(G, {})
23521
+ /* @__PURE__ */ e(M, {})
23513
23522
  ] }) })
23514
23523
  ] }, a.guid)) }),
23515
- /* @__PURE__ */ e(R, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${r.total}: ${M(A.totalAmount, "0,0")}` })
23524
+ /* @__PURE__ */ e(R, { bold: !0, sx: { mt: 12, pr: 8, textAlign: "right" }, children: `${r.total}: ${N(A.totalAmount, "0,0")}` })
23516
23525
  ] });
23517
23526
  }, W3 = C(F3), k3 = ({
23518
23527
  data: A,
@@ -23521,7 +23530,7 @@ const si = h.createContext(null), R3 = ({
23521
23530
  selectedId: n,
23522
23531
  title: r
23523
23532
  }) => {
23524
- const { isDesktop: o, isMobile: a } = zA(), { isLoadingCategoryTotals: I } = qA(), { spending: c } = p();
23533
+ const { isDesktop: o, isMobile: a } = zA(), { isLoadingCategoryTotals: I } = LA(), { spending: c } = p();
23525
23534
  return /* @__PURE__ */ s(
23526
23535
  P,
23527
23536
  {
@@ -23572,7 +23581,7 @@ const si = h.createContext(null), R3 = ({
23572
23581
  A.palette.chartMono.chartMono1,
23573
23582
  A.palette.chartMono.chartMono6
23574
23583
  ], Z3 = () => {
23575
- const A = rt(), { categories: t, dateRangeCategoryTotals: i, loadDateRangeCategoryTotals: n } = qA(), { spending: r } = p(), { displayedDateRange: o, selectedAccounts: a, selectedAccountGuids: I } = wA(), { setFilter: c, sortedTransactions: d } = PA(), [f, E] = h.useState(""), [l, v] = h.useState(0), [u, H] = h.useState(""), [b, g] = h.useState(!1);
23584
+ const A = rt(), { categories: t, dateRangeCategoryTotals: i, loadDateRangeCategoryTotals: n } = LA(), { spending: r } = p(), { displayedDateRange: o, selectedAccounts: a, selectedAccountGuids: I } = wA(), { setFilter: c, sortedTransactions: d } = PA(), [f, E] = h.useState(""), [l, v] = h.useState(0), [u, H] = h.useState(""), [b, X] = h.useState(!1);
23576
23585
  h.useEffect(() => {
23577
23586
  n(
23578
23587
  a,
@@ -23589,12 +23598,12 @@ const si = h.createContext(null), R3 = ({
23589
23598
  ), w = h.useMemo(
23590
23599
  () => d.find((O) => O.guid === u),
23591
23600
  [u]
23592
- ), j = (O, N) => {
23593
- v(N), E("");
23594
- }, D = (O) => {
23601
+ ), D = (O, G) => {
23602
+ v(G), E("");
23603
+ }, j = (O) => {
23595
23604
  E(f === O || O === "0" ? "" : O);
23596
23605
  }, m = (O) => {
23597
- const N = {
23606
+ const G = {
23598
23607
  accounts: I,
23599
23608
  dateRange: o
23600
23609
  };
@@ -23602,23 +23611,23 @@ const si = h.createContext(null), R3 = ({
23602
23611
  if (O === "other") {
23603
23612
  const tA = y.categoryData.find((Y) => Y.guid === "other");
23604
23613
  c({
23605
- ...N,
23614
+ ...G,
23606
23615
  custom: (Y) => !!tA?.categoryTotals?.find((AA) => AA.guid === Y.top_level_category_guid)
23607
23616
  });
23608
23617
  } else
23609
23618
  c({
23610
- ...N,
23611
- custom: (tA) => O ? tA.top_level_category_guid === O : tA.top_level_category_guid !== X.INCOME
23619
+ ...G,
23620
+ custom: (tA) => O ? tA.top_level_category_guid === O : tA.top_level_category_guid !== g.INCOME
23612
23621
  });
23613
23622
  else
23614
23623
  c({
23615
- ...N,
23616
- custom: (tA) => O ? tA.category_guid === O : tA.top_level_category_guid === X.INCOME
23624
+ ...G,
23625
+ custom: (tA) => O ? tA.category_guid === O : tA.top_level_category_guid === g.INCOME
23617
23626
  });
23618
- g(!0);
23627
+ X(!0);
23619
23628
  };
23620
23629
  return /* @__PURE__ */ s(L, { children: [
23621
- /* @__PURE__ */ s(Se, { onChange: j, value: l, variant: "fullWidth", children: [
23630
+ /* @__PURE__ */ s(Se, { onChange: D, value: l, variant: "fullWidth", children: [
23622
23631
  /* @__PURE__ */ e(
23623
23632
  GA,
23624
23633
  {
@@ -23648,7 +23657,7 @@ const si = h.createContext(null), R3 = ({
23648
23657
  wo,
23649
23658
  {
23650
23659
  data: y,
23651
- onSelected: D,
23660
+ onSelected: j,
23652
23661
  onViewTransactions: m,
23653
23662
  selectedId: f,
23654
23663
  title: r.spend_tab_title
@@ -23658,7 +23667,7 @@ const si = h.createContext(null), R3 = ({
23658
23667
  wo,
23659
23668
  {
23660
23669
  data: x,
23661
- onSelected: D,
23670
+ onSelected: j,
23662
23671
  onViewTransactions: m,
23663
23672
  selectedId: f,
23664
23673
  title: r.income_tab_title
@@ -23669,7 +23678,7 @@ const si = h.createContext(null), R3 = ({
23669
23678
  {
23670
23679
  ariaLabelClose: r.close_drawer_aria,
23671
23680
  isOpen: b,
23672
- onClose: () => g(!1),
23681
+ onClose: () => X(!1),
23673
23682
  title: r.transactions_drawer_title,
23674
23683
  children: /* @__PURE__ */ e(Rt, { onClick: H })
23675
23684
  }
@@ -23690,7 +23699,7 @@ const si = h.createContext(null), R3 = ({
23690
23699
  h.useEffect(() => {
23691
23700
  a(i);
23692
23701
  }, [i]), h.useEffect(() => {
23693
- o(QA(fA()), BA(fA())), d(!0), I(V.SPENDING_VIEW);
23702
+ o(qA(fA()), BA(fA())), d(!0), I(V.SPENDING_VIEW);
23694
23703
  }, []);
23695
23704
  const f = (E) => {
23696
23705
  o(E[0], E[1]);
@@ -23811,15 +23820,15 @@ const t7 = (A) => A.reduce((i, n) => {
23811
23820
  (H) => H.category_guid === i || H.top_level_category_guid === i
23812
23821
  ) : A).reduce(
23813
23822
  (H, b) => {
23814
- const { category_guid: g, top_level_category_guid: y, month: x, total: w, year: j } = b, D = i ? g : y;
23815
- H[D] || (H[D] = {
23816
- id: D,
23817
- category: D,
23818
- category_guid: g,
23823
+ const { category_guid: X, top_level_category_guid: y, month: x, total: w, year: D } = b, j = i ? X : y;
23824
+ H[j] || (H[j] = {
23825
+ id: j,
23826
+ category: j,
23827
+ category_guid: X,
23819
23828
  top_level_category_guid: y
23820
23829
  });
23821
- const m = oA(new Date(j, x - 1), iA.MONTH_SHORT);
23822
- return H[D][m] || (H[D][m] = 0), H[D][m] = H[D][m] + w, H;
23830
+ const m = oA(new Date(D, x - 1), iA.MONTH_SHORT);
23831
+ return H[j][m] || (H[j][m] = 0), H[j][m] = H[j][m] + w, H;
23823
23832
  },
23824
23833
  {}
23825
23834
  );
@@ -23880,7 +23889,7 @@ const t7 = (A) => A.reduce((i, n) => {
23880
23889
  }, d7 = C(f7), E7 = {
23881
23890
  view_transactions: "View Transactions"
23882
23891
  }, h7 = ({ onBackClick: A, sx: t }) => {
23883
- const i = oe(), { onEvent: n } = K(), { isDesktop: r, isTablet: o, isMobile: a } = zA(), { accounts: I } = CA(), { loadMonthlyCategoryTotals: c, monthlyCategoryTotals: d, getCategoryName: f } = qA(), { sortedTransactions: E } = PA(), { isInitialized: l, selectedAccounts: v, setSelectedAccounts: u } = wA(), { trends: H } = p(), b = i.palette.mode === "dark", [g, y] = h.useState(!1), [x, w] = h.useState(!1), [j, D] = h.useState("Chart"), [m, O] = h.useState(""), [N, tA] = h.useState({
23892
+ const i = oe(), { onEvent: n } = K(), { isDesktop: r, isTablet: o, isMobile: a } = zA(), { accounts: I } = CA(), { loadMonthlyCategoryTotals: c, monthlyCategoryTotals: d, getCategoryName: f } = LA(), { sortedTransactions: E } = PA(), { isInitialized: l, selectedAccounts: v, setSelectedAccounts: u } = wA(), { trends: H } = p(), b = i.palette.mode === "dark", [X, y] = h.useState(!1), [x, w] = h.useState(!1), [D, j] = h.useState("Chart"), [m, O] = h.useState(""), [G, tA] = h.useState({
23884
23893
  start: br(BA(Ne(/* @__PURE__ */ new Date(), 6)), 1),
23885
23894
  end: BA(/* @__PURE__ */ new Date())
23886
23895
  });
@@ -23889,18 +23898,18 @@ const t7 = (A) => A.reduce((i, n) => {
23889
23898
  }, [I]), h.useEffect(() => {
23890
23899
  l && c(
23891
23900
  v,
23892
- N.start,
23893
- N.end
23901
+ G.start,
23902
+ G.end
23894
23903
  ).finally(() => {
23895
23904
  y(!0);
23896
23905
  });
23897
- }, [l, v, N]);
23906
+ }, [l, v, G]);
23898
23907
  const Y = h.useMemo(() => {
23899
- if (!g) return { stackedDatasets: [], unstackedDatasets: [] };
23908
+ if (!X) return { stackedDatasets: [], unstackedDatasets: [] };
23900
23909
  const bA = i7(
23901
23910
  d,
23902
- N.start,
23903
- N.end
23911
+ G.start,
23912
+ G.end
23904
23913
  ), JA = m.length ? bA.filter(
23905
23914
  (Ke) => Ke.top_level_category_guid === m || Ke.category_guid === m
23906
23915
  ) : Eh(bA);
@@ -23908,17 +23917,17 @@ const t7 = (A) => A.reduce((i, n) => {
23908
23917
  stackedDatasets: JA.filter(fh),
23909
23918
  unstackedDatasets: JA.filter(Wi)
23910
23919
  };
23911
- }, [d, m, N]), AA = h.useMemo(() => {
23920
+ }, [d, m, G]), AA = h.useMemo(() => {
23912
23921
  const bA = oA(
23913
- N.start,
23922
+ G.start,
23914
23923
  a ? iA.MONTH_SHORT_YEAR : iA.MONTH_YEAR
23915
23924
  ), JA = oA(
23916
- N.end,
23925
+ G.end,
23917
23926
  a ? iA.MONTH_SHORT_YEAR : iA.MONTH_YEAR
23918
23927
  );
23919
23928
  return `${bA} - ${JA}`;
23920
- }, [N, a]), rA = (bA, JA) => {
23921
- D(JA ?? j), n(V.TRENDS_CLICK_TOGGLE);
23929
+ }, [G, a]), rA = (bA, JA) => {
23930
+ j(JA ?? D), n(V.TRENDS_CLICK_TOGGLE);
23922
23931
  }, sA = (bA) => {
23923
23932
  const JA = br(bA?.[0], 1), Ke = bA?.[1], Vt = Ms(Ke, JA);
23924
23933
  tA({ start: JA, end: Ke }), n(V.TRENDS_CLICK_DATE, {
@@ -23937,12 +23946,12 @@ const t7 = (A) => A.reduce((i, n) => {
23937
23946
  }, ae = (bA) => {
23938
23947
  n(V.TRENDS_HOVER_POINT, { category: bA });
23939
23948
  };
23940
- return !l || !g ? /* @__PURE__ */ e(ee, {}) : /* @__PURE__ */ s(
23949
+ return !l || !X ? /* @__PURE__ */ e(ee, {}) : /* @__PURE__ */ s(
23941
23950
  Le,
23942
23951
  {
23943
23952
  accountOptions: I,
23944
23953
  calendarActions: { onRangeChanged: sA },
23945
- dateRange: N,
23954
+ dateRange: G,
23946
23955
  dateRangeVariant: "timeframebuttons",
23947
23956
  onAccountsFilterClick: hA,
23948
23957
  onBackClick: A,
@@ -23987,7 +23996,7 @@ const t7 = (A) => A.reduce((i, n) => {
23987
23996
  exclusive: !0,
23988
23997
  onChange: rA,
23989
23998
  orientation: "horizontal",
23990
- value: j,
23999
+ value: D,
23991
24000
  children: ["Chart", "Table"].map((bA) => /* @__PURE__ */ e(
23992
24001
  Xn,
23993
24002
  {
@@ -24031,7 +24040,7 @@ const t7 = (A) => A.reduce((i, n) => {
24031
24040
  /* @__PURE__ */ e($, { onClick: () => w(!0), sx: { px: 5 }, children: `${E7.view_transactions} (${E.length})` })
24032
24041
  ] }),
24033
24042
  /* @__PURE__ */ s(L, { children: [
24034
- j === "Chart" && /* @__PURE__ */ e(
24043
+ D === "Chart" && /* @__PURE__ */ e(
24035
24044
  Tc,
24036
24045
  {
24037
24046
  onClickLegend: gA,
@@ -24042,13 +24051,13 @@ const t7 = (A) => A.reduce((i, n) => {
24042
24051
  unstackedDatasets: Y.unstackedDatasets
24043
24052
  }
24044
24053
  ),
24045
- j === "Table" && /* @__PURE__ */ e(
24054
+ D === "Table" && /* @__PURE__ */ e(
24046
24055
  s7,
24047
24056
  {
24048
24057
  monthlyCategoryTotals: d,
24049
24058
  onClickRow: Z,
24050
24059
  selectedCategory: m,
24051
- selectedDateRange: N
24060
+ selectedDateRange: G
24052
24061
  }
24053
24062
  )
24054
24063
  ] })
@@ -24059,7 +24068,7 @@ const t7 = (A) => A.reduce((i, n) => {
24059
24068
  d7,
24060
24069
  {
24061
24070
  categoryGuid: m,
24062
- dateRange: N,
24071
+ dateRange: G,
24063
24072
  isOpen: x,
24064
24073
  onClose: () => w(!1)
24065
24074
  }
@@ -24068,7 +24077,7 @@ const t7 = (A) => A.reduce((i, n) => {
24068
24077
  }
24069
24078
  );
24070
24079
  }, kP = C(h7), l7 = () => {
24071
- const A = oe(), { monthlyCategoryTotals: t } = qA(), { trends: i } = p(), n = Rh(t);
24080
+ const A = oe(), { monthlyCategoryTotals: t } = LA(), { trends: i } = p(), n = Rh(t);
24072
24081
  return /* @__PURE__ */ e(
24073
24082
  Nn,
24074
24083
  {
@@ -24084,7 +24093,7 @@ const t7 = (A) => A.reduce((i, n) => {
24084
24093
  }
24085
24094
  );
24086
24095
  }, v7 = C(l7), R7 = ({ onPrimaryCtaClick: A, sx: t }) => {
24087
- const { loadMonthlyCategoryTotals: i } = qA(), { isInitialized: n } = oi(), { trends: r } = p(), { selectedAccounts: o } = wA(), [a, I] = h.useState(!1);
24096
+ const { loadMonthlyCategoryTotals: i } = LA(), { isInitialized: n } = oi(), { trends: r } = p(), { selectedAccounts: o } = wA(), [a, I] = h.useState(!1);
24088
24097
  return h.useEffect(() => {
24089
24098
  n && i(o).finally(() => {
24090
24099
  I(!0);
@@ -24140,7 +24149,7 @@ export {
24140
24149
  bi as CategoryApi,
24141
24150
  ct as CategoryColors,
24142
24151
  Gi as CategoryGuidToName,
24143
- X as CategoryGuids,
24152
+ g as CategoryGuids,
24144
24153
  Us as CategoryIcon,
24145
24154
  la as CategoryRow,
24146
24155
  rd as CategorySelector,
@@ -24220,7 +24229,7 @@ export {
24220
24229
  LP as NotificationList,
24221
24230
  iR as NotificationSettings,
24222
24231
  o9 as NotificationStore,
24223
- LA as NotificationType,
24232
+ QA as NotificationType,
24224
24233
  Ts as ORDINAL_DATE_FORMAT,
24225
24234
  oP as ORDINAL_MONTH_DAY_YEAR_FORMAT,
24226
24235
  qn as PAYMENT_ACCOUNT_TYPES,
@@ -24285,7 +24294,7 @@ export {
24285
24294
  z as buildDynamicCopy,
24286
24295
  EP as buildPluralCopy,
24287
24296
  ha as exportTransactionsToCSV,
24288
- M as formatCurrency,
24297
+ N as formatCurrency,
24289
24298
  oA as formatDate,
24290
24299
  Jo as formatOrdinal,
24291
24300
  Mi as formatPercentage,
@@ -24306,7 +24315,7 @@ export {
24306
24315
  ra as useAppConfig,
24307
24316
  te as useBudgetsStore,
24308
24317
  Tn as useCashflowStore,
24309
- qA as useCategoryStore,
24318
+ LA as useCategoryStore,
24310
24319
  at as useCategoryUiStore,
24311
24320
  ac as useCombineEvents,
24312
24321
  Ic as useCombinePageviews,