@mx-cartographer/experiences 9.0.7-alpha.mm0 → 9.0.7-alpha.mm1

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.
@@ -1,42 +1,42 @@
1
- import { makeAutoObservable as d, runInAction as c, reaction as ut, autorun as St, observable as Tt } from "mobx";
2
- import { d as At } from "./AccountUtils-B8ZzWI-d.mjs";
3
- import { i as wt, f as bt, b as It, c as k } from "./BudgetUtil-Bg2AQJpQ.mjs";
1
+ import { makeAutoObservable as d, runInAction as c, reaction as ut, autorun as St, observable as Tt, toJS as At } from "mobx";
2
+ import { d as wt } from "./AccountUtils-B8ZzWI-d.mjs";
3
+ import { i as bt, f as It, b as Ct, c as k } from "./BudgetUtil-Bg2AQJpQ.mjs";
4
4
  import { c as h, d as M } from "./Account-DR7Plrqy.mjs";
5
5
  import { F as g, B as v, G as H } from "./GlobalCopyApi-wcnDUzMV.mjs";
6
6
  import { A as i } from "./ApiEndpoints-DXwIYNUV.mjs";
7
- import Ct from "posthog-js";
7
+ import Et from "posthog-js";
8
8
  import { endOfMonth as T } from "date-fns/endOfMonth";
9
9
  import { startOfMonth as E } from "date-fns/startOfMonth";
10
10
  import { startOfToday as y } from "date-fns/startOfToday";
11
- import { C as w, b as Et } from "./Category-DEKZGLYe.mjs";
12
- import { addDays as Rt } from "date-fns/addDays";
13
- import { differenceInDays as Dt } from "date-fns/differenceInDays";
11
+ import { C as w, b as Rt } from "./Category-DEKZGLYe.mjs";
12
+ import { addDays as Dt } from "date-fns/addDays";
13
+ import { differenceInDays as Lt } from "date-fns/differenceInDays";
14
14
  import { isBefore as F } from "date-fns/isBefore";
15
15
  import { getUnixTime as m } from "date-fns/getUnixTime";
16
16
  import { subMonths as $ } from "date-fns/subMonths";
17
- import { c as Lt, d as vt, C as $t, h as Gt, i as Nt, s as Bt, j as xt, T as Mt, D as Ot } from "./TransactionUtils-BphBJBbU.mjs";
18
- import { l as Pt, D as Ut } from "./DebtUtils-i4pI2Uoe.mjs";
19
- import { format as Ft } from "date-fns/format";
20
- import { fromUnixTime as kt } from "date-fns/fromUnixTime";
17
+ import { c as vt, d as $t, C as Gt, h as Nt, i as Bt, s as xt, j as Mt, T as Ot, D as Pt } from "./TransactionUtils-BphBJBbU.mjs";
18
+ import { l as Ut, D as Ft } from "./DebtUtils-i4pI2Uoe.mjs";
19
+ import { format as kt } from "date-fns/format";
20
+ import { fromUnixTime as Ht } from "date-fns/fromUnixTime";
21
21
  import { f as P, D as U } from "./DateFormats-HudZ3Bjs.mjs";
22
22
  import { T as S, c as W } from "./GoalsUtil-C9EnLWvC.mjs";
23
- import { A as Ht, m as Wt, a as Vt, b as zt } from "./InvestmentUtil-BItV7uEs.mjs";
24
- import { f as Kt, b as Qt, a as V, c as qt, d as Yt, e as jt, s as Xt } from "./NetWorthUtils-DfSH3z70.mjs";
25
- import { f as Jt } from "./NotificationUtils-BRGFTePr.mjs";
23
+ import { A as Wt, m as Vt, a as zt, b as Kt } from "./InvestmentUtil-BItV7uEs.mjs";
24
+ import { f as Qt, b as qt, a as V, c as Yt, d as jt, e as Xt, s as Jt } from "./NetWorthUtils-DfSH3z70.mjs";
25
+ import { f as Zt } from "./NotificationUtils-BRGFTePr.mjs";
26
26
  import { isAfter as z } from "date-fns/isAfter";
27
27
  import { isSameDay as K } from "date-fns/isSameDay";
28
28
  import { isWithinInterval as gt } from "date-fns/isWithinInterval";
29
29
  import { subDays as pt } from "date-fns/subDays";
30
- import { f as O, h as Zt, a as f, b as Q } from "./RecurringTransactionsUtil-zOxq5pzY.mjs";
30
+ import { f as O, h as te, a as f, b as Q } from "./RecurringTransactionsUtil-zOxq5pzY.mjs";
31
31
  import { I as u, A as _, B as G } from "./Notification-DTNYSd8P.mjs";
32
32
  import { endOfToday as q } from "date-fns/endOfToday";
33
- import { formatISO as te } from "date-fns/formatISO";
34
- import { addSeconds as ee } from "date-fns/addSeconds";
35
- import { differenceInCalendarMonths as se } from "date-fns/differenceInCalendarMonths";
36
- import { f as ae, b as ne } from "./TrendsUtil-D9z3kIj_.mjs";
37
- import { addMonths as ie } from "date-fns/addMonths";
33
+ import { formatISO as ee } from "date-fns/formatISO";
34
+ import { addSeconds as se } from "date-fns/addSeconds";
35
+ import { differenceInCalendarMonths as ae } from "date-fns/differenceInCalendarMonths";
36
+ import { f as ne, b as ie } from "./TrendsUtil-D9z3kIj_.mjs";
37
+ import { addMonths as re } from "date-fns/addMonths";
38
38
  import { getMonth as L } from "date-fns/getMonth";
39
- import { a as re } from "./Help-CkQTjORd.mjs";
39
+ import { a as oe } from "./Help-CkQTjORd.mjs";
40
40
  class N {
41
41
  fetchInstance;
42
42
  constructor(t, e, s) {
@@ -343,7 +343,7 @@ class ct {
343
343
  }
344
344
  requestWidgetUrl = async (t) => this.fetchInstance.post(i.WIDGET_URLS, t).then((e) => e.widget_url);
345
345
  }
346
- class oe {
346
+ class ce {
347
347
  globalStore;
348
348
  api = new N("/", "");
349
349
  accounts = [];
@@ -357,7 +357,7 @@ class oe {
357
357
  membersLoading = !1;
358
358
  uiStore;
359
359
  constructor(t) {
360
- this.globalStore = t, this.uiStore = new ce(), this.api = new N(t.endpoint, t.sessionToken, t.onError), d(this);
360
+ this.globalStore = t, this.uiStore = new le(), this.api = new N(t.endpoint, t.sessionToken, t.onError), d(this);
361
361
  }
362
362
  loadAccountData = async () => {
363
363
  await Promise.all([this.loadAccounts(), this.loadMembers(), this.loadInstitutions()]);
@@ -366,8 +366,8 @@ class oe {
366
366
  return this.accountsLoaded && this.membersLoaded && this.institutionsLoaded;
367
367
  }
368
368
  get detailedAccounts() {
369
- const t = this.globalStore.userStore.userFeatures, e = wt(t, "MD_EXCLUDE_EXTERNAL_ACCOUNTS"), s = this.globalStore.appConfig.config.display_only_external_accounts_in_accounts && this.globalStore.appConfig.options.subtype === "accounts";
370
- return At(
369
+ const t = this.globalStore.userStore.userFeatures, e = bt(t, "MD_EXCLUDE_EXTERNAL_ACCOUNTS"), s = this.globalStore.appConfig.config.display_only_external_accounts_in_accounts && this.globalStore.appConfig.options.subtype === "accounts";
370
+ return wt(
371
371
  this.accounts,
372
372
  this.institutions,
373
373
  this.members,
@@ -580,7 +580,7 @@ class oe {
580
580
  this.setAccounts(a);
581
581
  };
582
582
  }
583
- let ce = class {
583
+ let le = class {
584
584
  selectedAccount = {};
585
585
  selectedMember = {};
586
586
  constructor() {
@@ -589,7 +589,7 @@ let ce = class {
589
589
  setSelectedAccount = (t) => this.selectedAccount = t;
590
590
  setSelectedMember = (t) => this.selectedMember = t;
591
591
  };
592
- class le {
592
+ class de {
593
593
  globalStore;
594
594
  api = new Y("/", "");
595
595
  bannerApi = new j("/");
@@ -642,7 +642,7 @@ class le {
642
642
  setUserCommunicationProfile = (t) => this.appData.user_communication_profile = t;
643
643
  setUserProfile = (t) => this.appData.user_profile = t;
644
644
  }
645
- class de {
645
+ class he {
646
646
  globalStore;
647
647
  survey = null;
648
648
  currentQuestionIndex = 0;
@@ -672,7 +672,7 @@ class de {
672
672
  return this.survey ? this.survey.questions : [];
673
673
  }
674
674
  loadSurvey = (t = !1) => {
675
- Ct.getActiveMatchingSurveys((e) => {
675
+ Et.getActiveMatchingSurveys((e) => {
676
676
  c(() => {
677
677
  if (e.length > 0) {
678
678
  const s = e.find((a) => a.id === this.surveyId);
@@ -691,11 +691,11 @@ class de {
691
691
  this.response = t, this.question && (this.responses[`$survey_response_${this.question.id}`] = t);
692
692
  };
693
693
  }
694
- function he(n, t, e, s = "asc") {
694
+ function ue(n, t, e, s = "asc") {
695
695
  const a = s === "desc" ? -1 : 1;
696
696
  return [...n, ...t].sort((o, r) => o[e] < r[e] ? -1 * a : o[e] > r[e] ? 1 * a : 0);
697
697
  }
698
- const ue = (n) => ({
698
+ const ge = (n) => ({
699
699
  ...n,
700
700
  //fields that are offer specific, adding here for visibility
701
701
  image_url: n.image_url,
@@ -738,7 +738,7 @@ const ue = (n) => ({
738
738
  user_guid: "",
739
739
  user_verification: 0
740
740
  });
741
- class ge {
741
+ class pe {
742
742
  globalStore;
743
743
  api = new v("/", "");
744
744
  beats = [];
@@ -748,9 +748,9 @@ class ge {
748
748
  }
749
749
  loadBeats = async () => {
750
750
  this.isLoading = !0;
751
- const t = await this.api.getBeats(), s = (await this.api.getOffers()).map((a) => ue(a));
751
+ const t = await this.api.getBeats(), s = (await this.api.getOffers()).map((a) => ge(a));
752
752
  c(() => {
753
- this.beats = he(t, s, "active_at", "desc"), this.isLoading = !1;
753
+ this.beats = ue(t, s, "active_at", "desc"), this.isLoading = !1;
754
754
  });
755
755
  };
756
756
  getFilteredBeats(t) {
@@ -767,7 +767,7 @@ class ge {
767
767
  return t.filter((s) => e.some((a) => s.template === a));
768
768
  }
769
769
  }
770
- class pe {
770
+ class _e {
771
771
  api = new X("/", "");
772
772
  globalStore;
773
773
  alert = "";
@@ -787,9 +787,9 @@ class pe {
787
787
  (t) => {
788
788
  if (t) {
789
789
  const e = this.selectedBudget;
790
- e && (this.selectedBudget = bt(t, e.guid));
790
+ e && (this.selectedBudget = It(t, e.guid));
791
791
  const s = this.selectedSubBudget;
792
- s && s.parent_guid && (this.selectedSubBudget = It(
792
+ s && s.parent_guid && (this.selectedSubBudget = Ct(
793
793
  t,
794
794
  s.guid,
795
795
  s.parent_guid
@@ -935,11 +935,11 @@ class pe {
935
935
  }
936
936
  };
937
937
  }
938
- class _e {
938
+ class fe {
939
939
  globalStore;
940
940
  uiStore;
941
941
  constructor(t) {
942
- this.globalStore = t, this.uiStore = new fe(), d(this);
942
+ this.globalStore = t, this.uiStore = new ye(), d(this);
943
943
  }
944
944
  completeOnboarding = async () => {
945
945
  const t = {
@@ -949,9 +949,9 @@ class _e {
949
949
  await this.globalStore.userStore.updateUserProfile(t);
950
950
  };
951
951
  }
952
- let fe = class {
952
+ let ye = class {
953
953
  // Cashflow is hard-coded to display 30 days starting from today
954
- dateRange = { start: y(), end: Rt(y(), 30) };
954
+ dateRange = { start: y(), end: Dt(y(), 30) };
955
955
  isDirty = !1;
956
956
  nextIncome = void 0;
957
957
  upcomingExpenses = [];
@@ -961,7 +961,7 @@ let fe = class {
961
961
  }
962
962
  // Returns the number of days until the next income activity or 0 if there is no income activity
963
963
  get daysUntilNextIncome() {
964
- return this.nextIncome ? Math.abs(Dt(y(), this.nextIncome.expectedDate)) : 0;
964
+ return this.nextIncome ? Math.abs(Lt(y(), this.nextIncome.expectedDate)) : 0;
965
965
  }
966
966
  // Returns the expenses (Activities) until the next income activity or the end of the month
967
967
  // if there is no income activity
@@ -978,7 +978,7 @@ let fe = class {
978
978
  };
979
979
  setSelectedCashAccounts = (t) => this.selectedCashAccounts = t;
980
980
  };
981
- class ye {
981
+ class me {
982
982
  globalStore;
983
983
  uiStore;
984
984
  api = new J("/", "");
@@ -992,10 +992,10 @@ class ye {
992
992
  monthlyTotalsLoaded = !1;
993
993
  monthlyTotalsLoading = !1;
994
994
  constructor(t) {
995
- this.globalStore = t, this.uiStore = new me(), this.api = new J(t.endpoint, t.sessionToken, t.onError), d(this);
995
+ this.globalStore = t, this.uiStore = new Se(), this.api = new J(t.endpoint, t.sessionToken, t.onError), d(this);
996
996
  }
997
997
  get detailedCategories() {
998
- return this.globalStore.isInitialized ? Lt(
998
+ return this.globalStore.isInitialized ? vt(
999
999
  this.categories,
1000
1000
  this.globalStore.copyStore.copy.categories,
1001
1001
  this.dateRangeCategoryTotals,
@@ -1003,7 +1003,7 @@ class ye {
1003
1003
  ) : [];
1004
1004
  }
1005
1005
  get detailedCategoriesWithTransactions() {
1006
- return vt(
1006
+ return $t(
1007
1007
  this.detailedCategories,
1008
1008
  this.globalStore.transactionStore.sortedTransactions
1009
1009
  );
@@ -1102,9 +1102,9 @@ class ye {
1102
1102
  }
1103
1103
  };
1104
1104
  // TODO: Remove this after refactoring Trends components to use detailedCategories
1105
- getCategoryName = (t) => this.categories.find((s) => s.guid === t)?.name ?? Et[t];
1105
+ getCategoryName = (t) => this.categories.find((s) => s.guid === t)?.name ?? Rt[t];
1106
1106
  }
1107
- let me = class {
1107
+ let Se = class {
1108
1108
  expandedGuid = null;
1109
1109
  selectedGuid = null;
1110
1110
  searchValue = "";
@@ -1127,7 +1127,7 @@ let me = class {
1127
1127
  onSelect = (t) => this.savedOnSelect(t);
1128
1128
  setOnSelect = (t) => this.savedOnSelect = t;
1129
1129
  };
1130
- class Se {
1130
+ class Te {
1131
1131
  globalStore;
1132
1132
  widgetApi = new ct("/", "");
1133
1133
  constructor(t) {
@@ -1137,24 +1137,24 @@ class Se {
1137
1137
  widget_url: { widget_type: t, color_scheme: e, ...s }
1138
1138
  });
1139
1139
  }
1140
- class Te {
1140
+ class Ae {
1141
1141
  globalStore;
1142
1142
  uiStore;
1143
1143
  constructor(t) {
1144
- this.globalStore = t, this.uiStore = new Ae(), d(this);
1144
+ this.globalStore = t, this.uiStore = new we(), d(this);
1145
1145
  }
1146
1146
  get debts() {
1147
1147
  const { visibleDebtAccounts: t } = this.globalStore.accountStore, { selectedAccountGuids: e } = this.globalStore.globalUiStore, { debtGoals: s } = this.globalStore.goalStore, a = e.length ? t.filter((o) => e.includes(o.guid)) : t;
1148
- return Pt(a, s);
1148
+ return Ut(a, s);
1149
1149
  }
1150
1150
  get totalMonthlyPayments() {
1151
1151
  return this.debts.map((e) => Number(e.monthly_payment)).filter((e) => !isNaN(e)).reduce((e, s) => e + s, 0);
1152
1152
  }
1153
1153
  }
1154
- let Ae = class {
1154
+ let we = class {
1155
1155
  isLoading = !1;
1156
1156
  selectedDebtChartData = {};
1157
- selectedDebtPriority = Ut.LOWEST_BALANCE;
1157
+ selectedDebtPriority = Ft.LOWEST_BALANCE;
1158
1158
  constructor() {
1159
1159
  d(this);
1160
1160
  }
@@ -1169,16 +1169,16 @@ let Ae = class {
1169
1169
  setSelectedDebtChartData = (t) => this.selectedDebtChartData = t;
1170
1170
  setSelectedDebtPriority = (t) => this.selectedDebtPriority = t;
1171
1171
  };
1172
- const we = (n) => n.sort((t, e) => t.monthly_health_score_average.year !== e.monthly_health_score_average.year ? t.monthly_health_score_average.year - e.monthly_health_score_average.year : t.monthly_health_score_average.month - e.monthly_health_score_average.month).map((t) => ({
1172
+ const be = (n) => n.sort((t, e) => t.monthly_health_score_average.year !== e.monthly_health_score_average.year ? t.monthly_health_score_average.year - e.monthly_health_score_average.year : t.monthly_health_score_average.month - e.monthly_health_score_average.month).map((t) => ({
1173
1173
  x: P(
1174
1174
  new Date(0, t.monthly_health_score_average.month - 1, 1),
1175
1175
  U.MONTH_SHORT
1176
1176
  ),
1177
1177
  y: Math.round(t.monthly_health_score_average.average_health_score)
1178
- })), be = (n) => n.map(({ transaction: e }) => ({
1178
+ })), Ie = (n) => n.map(({ transaction: e }) => ({
1179
1179
  ...e
1180
1180
  })).sort((e, s) => s.date - e.date);
1181
- class Ie {
1181
+ class Ce {
1182
1182
  api = new Z("/", "");
1183
1183
  augmentedChartData = [];
1184
1184
  averageHealthScores = [];
@@ -1272,7 +1272,7 @@ class Ie {
1272
1272
  }
1273
1273
  };
1274
1274
  loadPeerScore = async () => {
1275
- const t = Ft(kt(this.globalStore.appDataStore.user.birthday), "yyyy");
1275
+ const t = kt(Ht(this.globalStore.appDataStore.user.birthday), "yyyy");
1276
1276
  try {
1277
1277
  const e = await this.api.getPeerScore(t);
1278
1278
  c(() => {
@@ -1286,7 +1286,7 @@ class Ie {
1286
1286
  try {
1287
1287
  const t = await this.api.getAverageHealthScores();
1288
1288
  c(() => {
1289
- this.augmentedChartData = we(t);
1289
+ this.augmentedChartData = be(t);
1290
1290
  });
1291
1291
  } catch (t) {
1292
1292
  console.error(`Error occurred while getting augmented chart data: ${t}`);
@@ -1294,7 +1294,7 @@ class Ie {
1294
1294
  };
1295
1295
  getSpendingFeeTransactions = async () => {
1296
1296
  try {
1297
- const t = await this.api.getSpendingFeeTransactions(), e = be(t);
1297
+ const t = await this.api.getSpendingFeeTransactions(), e = Ie(t);
1298
1298
  c(() => {
1299
1299
  this.spendingFeeTransactions = e;
1300
1300
  });
@@ -1431,7 +1431,7 @@ const lt = {
1431
1431
  postHogPublicKey: "phc_1fVYJICC69TpW4wagp9o2XqQ8E7X98cAmcR5psSpfkE",
1432
1432
  userFeatures: []
1433
1433
  };
1434
- class Gs {
1434
+ class Ns {
1435
1435
  // Global properties
1436
1436
  appConfig = lt;
1437
1437
  endpoint = "/";
@@ -1464,7 +1464,7 @@ class Gs {
1464
1464
  // UI Stores
1465
1465
  globalUiStore;
1466
1466
  constructor(t = lt, e = "/", s, a) {
1467
- this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = s, this.onStoreUpdate = a, this.accountStore = new oe(this), this.appDataStore = new le(this), this.analyticsStore = new de(this), this.beatStore = new ge(this), this.budgetsStore = new pe(this), this.cashflowStore = new _e(this), this.categoryStore = new ye(this), this.connectStore = new Se(this), this.copyStore = new Ee(this), this.debtsStore = new Te(this), this.finstrongStore = new Ie(this), this.goalStore = new Re(this), this.helpStore = new ve(this), this.holdingStore = new $e(this), this.merchantStore = new Ge(this), this.netWorthStore = new Ne(this), this.notificationStore = new Be(this), this.recurringTransactionsStore = new xe(this), this.settingsStore = new Pe(this), this.transactionStore = new Ue(this), this.trendsStore = new ke(this), this.userStore = new He(this), this.globalUiStore = new Ce(this), d(this), St(() => {
1467
+ this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.onError = s, this.onStoreUpdate = a, this.accountStore = new ce(this), this.appDataStore = new de(this), this.analyticsStore = new he(this), this.beatStore = new pe(this), this.budgetsStore = new _e(this), this.cashflowStore = new fe(this), this.categoryStore = new me(this), this.connectStore = new Te(this), this.copyStore = new Re(this), this.debtsStore = new Ae(this), this.finstrongStore = new Ce(this), this.goalStore = new De(this), this.helpStore = new $e(this), this.holdingStore = new Ge(this), this.merchantStore = new Ne(this), this.netWorthStore = new Be(this), this.notificationStore = new xe(this), this.recurringTransactionsStore = new Me(this), this.settingsStore = new Ue(this), this.transactionStore = new Fe(this), this.trendsStore = new He(this), this.userStore = new We(this), this.globalUiStore = new Ee(this), d(this), St(() => {
1468
1468
  const { transactions: o } = this.transactionStore;
1469
1469
  this.emitUpdate({
1470
1470
  transactions: o
@@ -1501,7 +1501,7 @@ class Gs {
1501
1501
  (!e || !p) && await this.loadConfigData(), e && this.appDataStore.setAppData(e), p && this.userStore.setUserFeatures(p), t && (await this.accountStore.loadMembers(), o && this.accountStore.setInstitutions(o), this.accountStore.setAccounts(t)), s && this.transactionStore.setAssociatedBeats(s), a && this.categoryStore.setCategories(a), l && this.transactionStore.setTransactions(l), r && this.transactionStore.setTransactionRules(r), b && this.budgetsStore.setMerchantBudgets(b);
1502
1502
  };
1503
1503
  }
1504
- class Ce {
1504
+ class Ee {
1505
1505
  globalStore;
1506
1506
  accountFilterMap = /* @__PURE__ */ new Map();
1507
1507
  displayedDate = /* @__PURE__ */ new Date();
@@ -1560,7 +1560,7 @@ class Ce {
1560
1560
  };
1561
1561
  };
1562
1562
  get shouldDisableNextDate() {
1563
- const t = L(this.displayedDate), e = L(ie(/* @__PURE__ */ new Date(), 1));
1563
+ const t = L(this.displayedDate), e = L(re(/* @__PURE__ */ new Date(), 1));
1564
1564
  return t === e;
1565
1565
  }
1566
1566
  get shouldDisablePrevDate() {
@@ -1568,7 +1568,7 @@ class Ce {
1568
1568
  return t === e;
1569
1569
  }
1570
1570
  }
1571
- class Ee {
1571
+ class Re {
1572
1572
  globalStore;
1573
1573
  api = new H("/", "");
1574
1574
  copy = {};
@@ -1597,7 +1597,7 @@ class Ee {
1597
1597
  }
1598
1598
  };
1599
1599
  }
1600
- class Re {
1600
+ class De {
1601
1601
  globalStore;
1602
1602
  api = new tt("/", "");
1603
1603
  goals = [];
@@ -1835,9 +1835,9 @@ class Re {
1835
1835
  }
1836
1836
  };
1837
1837
  }
1838
- const De = (n, t) => n.guid === "general" || n.guid === "insights" ? !0 : n.flags ? n.flags.every((e) => t[e]) : !1, Le = (n, t) => {
1838
+ const Le = (n, t) => n.guid === "general" || n.guid === "insights" ? !0 : n.flags ? n.flags.every((e) => t[e]) : !1, ve = (n, t) => {
1839
1839
  const e = [];
1840
- for (const s of re) {
1840
+ for (const s of oe) {
1841
1841
  const a = t[s.guid];
1842
1842
  if (!a) continue;
1843
1843
  const o = {
@@ -1848,11 +1848,11 @@ const De = (n, t) => n.guid === "general" || n.guid === "insights" ? !0 : n.flag
1848
1848
  label: a.topics[l]
1849
1849
  }))
1850
1850
  };
1851
- De(o, n) && e.push(o);
1851
+ Le(o, n) && e.push(o);
1852
1852
  }
1853
1853
  return e;
1854
1854
  };
1855
- class ve {
1855
+ class $e {
1856
1856
  alert = { message: "", severity: void 0 };
1857
1857
  api = new et("/", "");
1858
1858
  appConfig;
@@ -1878,7 +1878,7 @@ class ve {
1878
1878
  const { client_communication_profile: t, client_profile: e } = this.globalStore.appDataStore.appData, {
1879
1879
  help: { category_list: s }
1880
1880
  } = this.globalStore.copyStore.copy;
1881
- return Le(
1881
+ return ve(
1882
1882
  {
1883
1883
  ...t,
1884
1884
  ...e,
@@ -1888,8 +1888,8 @@ class ve {
1888
1888
  );
1889
1889
  }
1890
1890
  }
1891
- class $e {
1892
- analysisType = Ht.Stocks;
1891
+ class Ge {
1892
+ analysisType = Wt.Stocks;
1893
1893
  api = new st("/", "");
1894
1894
  holdings = [];
1895
1895
  holdingsLoaded = !1;
@@ -1899,10 +1899,10 @@ class $e {
1899
1899
  this.globalStore = t, this.api = new st(t.endpoint, t.sessionToken, t.onError), d(this);
1900
1900
  }
1901
1901
  get analysisChartData() {
1902
- return Wt(Vt(this.visibleHoldings), this.analysisType);
1902
+ return Vt(zt(this.visibleHoldings), this.analysisType);
1903
1903
  }
1904
1904
  get analysisDetails() {
1905
- return zt(this.visibleHoldings)[this.analysisType] || {};
1905
+ return Kt(this.visibleHoldings)[this.analysisType] || {};
1906
1906
  }
1907
1907
  get visibleHoldings() {
1908
1908
  return this.holdings.filter(
@@ -1941,7 +1941,7 @@ class $e {
1941
1941
  }
1942
1942
  };
1943
1943
  }
1944
- class Ge {
1944
+ class Ne {
1945
1945
  globalStore;
1946
1946
  api = new at("/", "");
1947
1947
  merchant = null;
@@ -1962,7 +1962,7 @@ class Ge {
1962
1962
  c(() => this.merchant = e);
1963
1963
  };
1964
1964
  }
1965
- class Ne {
1965
+ class Be {
1966
1966
  globalStore;
1967
1967
  accountsApi = new N("/", "");
1968
1968
  monthlyAccountBalances = [];
@@ -1982,7 +1982,7 @@ class Ne {
1982
1982
  return this.globalStore.accountStore.isAccountDataLoaded && this.monthlyAccountBalancesLoaded;
1983
1983
  }
1984
1984
  get netWorthAccounts() {
1985
- return Kt(
1985
+ return Qt(
1986
1986
  this.globalStore.globalUiStore.selectedAccounts,
1987
1987
  this.globalStore.accountStore.members
1988
1988
  );
@@ -1994,7 +1994,7 @@ class Ne {
1994
1994
  };
1995
1995
  }
1996
1996
  get netWorthChartData() {
1997
- return Qt(this.netWorthAccounts, this.monthlyAccountBalances, this.timeframe);
1997
+ return qt(this.netWorthAccounts, this.monthlyAccountBalances, this.timeframe);
1998
1998
  }
1999
1999
  get selectedData() {
2000
2000
  if (!(!this.netWorthChartData || this.netWorthChartData.length === 0))
@@ -2004,10 +2004,10 @@ class Ne {
2004
2004
  return this.hoveredIndex >= 0 ? this.netWorthChartData[this.hoveredIndex] : void 0;
2005
2005
  }
2006
2006
  get gainsLosses() {
2007
- return qt(this.selectedData);
2007
+ return Yt(this.selectedData);
2008
2008
  }
2009
2009
  get assetsLiabilities() {
2010
- const { assets: t, liabilities: e, totalAssets: s, totalLiabilities: a } = Yt(
2010
+ const { assets: t, liabilities: e, totalAssets: s, totalLiabilities: a } = jt(
2011
2011
  this.netWorthData.accounts
2012
2012
  );
2013
2013
  return {
@@ -2022,7 +2022,7 @@ class Ne {
2022
2022
  this.globalStore.accountStore.isAccountDataLoaded || await this.globalStore.accountStore.loadAccountData();
2023
2023
  const e = (await Promise.all(
2024
2024
  this.netWorthAccounts.map((s) => this.getMonthlyAccountBalances(s.guid))
2025
- )).reduce(jt, []).sort(Xt);
2025
+ )).reduce(Xt, []).sort(Jt);
2026
2026
  this.setMonthlyAccountBalances(e);
2027
2027
  };
2028
2028
  getMonthlyAccountBalances = async (t) => {
@@ -2039,7 +2039,7 @@ class Ne {
2039
2039
  setSelectedIndex = (t) => this.selectedIndex = t;
2040
2040
  setTimeframe = (t) => this.timeframe = t;
2041
2041
  }
2042
- class Be {
2042
+ class xe {
2043
2043
  globalStore;
2044
2044
  api = new nt("/", "");
2045
2045
  isLoading = !0;
@@ -2057,7 +2057,7 @@ class Be {
2057
2057
  return this.recentNotifications.filter((t) => !t.has_been_viewed);
2058
2058
  }
2059
2059
  get recentNotifications() {
2060
- return Jt(this.notifications);
2060
+ return Zt(this.notifications);
2061
2061
  }
2062
2062
  setNotifications = (t) => {
2063
2063
  this.notifications = t, this.notificationsLoaded = !0;
@@ -2083,7 +2083,7 @@ class Be {
2083
2083
  };
2084
2084
  }
2085
2085
  const dt = (n, t) => gt(t.expectedDate, n), A = (n, t) => n + t.amount;
2086
- class xe {
2086
+ class Me {
2087
2087
  globalStore;
2088
2088
  api = new it("/", "");
2089
2089
  repeatingTransactions = [];
@@ -2114,7 +2114,7 @@ class xe {
2114
2114
  */
2115
2115
  get recurrences() {
2116
2116
  const t = this.globalStore.accountStore.visibleAccounts;
2117
- return Zt(this.detailedRepeatingTransactions, this.dateRange).filter((e) => t.some((s) => s.guid === e.accountGuid && !s.is_excluded_from_accounts)).filter((e) => gt(e.expectedDate, this.dateRange));
2117
+ return te(this.detailedRepeatingTransactions, this.dateRange).filter((e) => t.some((s) => s.guid === e.accountGuid && !s.is_excluded_from_accounts)).filter((e) => gt(e.expectedDate, this.dateRange));
2118
2118
  }
2119
2119
  /**
2120
2120
  * Returns all recurrences that have occurred in the past, including those that are paid or missed
@@ -2359,17 +2359,15 @@ class xe {
2359
2359
  */
2360
2360
  markRecurrenceAsUnpaid = async (t) => {
2361
2361
  try {
2362
- await this.globalStore.transactionStore.updateTransaction({
2363
- ...t,
2364
- repeating_transaction_guid: void 0
2365
- }), await this.loadRepeatingTransactions(), this.setAlert(this.copy.unlink_transaction_success, "success");
2362
+ const e = At(t);
2363
+ e.repeating_transaction_guid = null, await this.globalStore.transactionStore.updateTransaction(e), await this.loadRepeatingTransactions(), this.setAlert(this.copy.unlink_transaction_success, "success");
2366
2364
  } catch (e) {
2367
2365
  console.error(`Error occurred while marking recurrence as unpaid: ${e}`), this.setAlert(this.copy.unlink_transaction_error, "error");
2368
2366
  }
2369
2367
  };
2370
2368
  setAlert = (t, e = void 0) => this.alert = { message: t, severity: e };
2371
2369
  }
2372
- const ht = "PARENT-ENTITY", Me = (n, t) => ({
2370
+ const ht = "PARENT-ENTITY", Oe = (n, t) => ({
2373
2371
  [G.BudgetExceeded]: t.notification_budget_exceeded,
2374
2372
  [G.BudgetOffTarget]: t.notification_budget_off_target,
2375
2373
  [_.DebtPaymentReminder]: t.notification_debt_payment_reminder,
@@ -2402,7 +2400,7 @@ const ht = "PARENT-ENTITY", Me = (n, t) => ({
2402
2400
  [u.TransactionExpenseLarge]: t.large_transaction,
2403
2401
  [u.PromotionalCampaignMessages]: t.promotional_campaign_messages,
2404
2402
  [u.TransparentOverdraft]: t.transparent_overdraft
2405
- })[n] || "", Oe = (n, t, e, s, a, o) => {
2403
+ })[n] || "", Pe = (n, t, e, s, a, o) => {
2406
2404
  const r = [], {
2407
2405
  email_notifications_enabled: l,
2408
2406
  sms_notifications_enabled: p,
@@ -2413,7 +2411,7 @@ const ht = "PARENT-ENTITY", Me = (n, t) => ({
2413
2411
  opted_out_of_push_notifications: yt
2414
2412
  } = a;
2415
2413
  for (const I of s.filter((R) => R.entity_guid === ht)) {
2416
- const R = Me(I.notification_type, e), mt = s.filter(
2414
+ const R = Oe(I.notification_type, e), mt = s.filter(
2417
2415
  (C) => C.entity_guid !== ht && C.notification_type === I.notification_type && n.some((x) => x.guid === C.entity_guid)
2418
2416
  ), D = [];
2419
2417
  l && !_t && I.email_channel && o.email && D.push(e.delivery_method_email_label), p && !ft && I.sms_channel && o.phone && D.push(e.delivery_method_sms_label), b && !yt && I.push_channel && D.push(e.delivery_method_push_label), r.push({
@@ -2429,7 +2427,7 @@ const ht = "PARENT-ENTITY", Me = (n, t) => ({
2429
2427
  }
2430
2428
  return r;
2431
2429
  };
2432
- class Pe {
2430
+ class Ue {
2433
2431
  globalStore;
2434
2432
  api = new rt("/", "");
2435
2433
  transactionApi = new B("/", "");
@@ -2469,7 +2467,7 @@ class Pe {
2469
2467
  return this.globalStore.copyStore.copy.settings;
2470
2468
  }
2471
2469
  get detailedNotificationProfiles() {
2472
- return this.globalStore.isInitialized ? Oe(
2470
+ return this.globalStore.isInitialized ? Pe(
2473
2471
  this.globalStore.accountStore.accounts,
2474
2472
  this.clientCommunicationProfile,
2475
2473
  this.copy,
@@ -2612,7 +2610,7 @@ class Pe {
2612
2610
  }
2613
2611
  };
2614
2612
  }
2615
- class Ue {
2613
+ class Fe {
2616
2614
  globalStore;
2617
2615
  uiStore;
2618
2616
  api = new B("/", "");
@@ -2636,10 +2634,10 @@ class Ue {
2636
2634
  filter = {};
2637
2635
  isLoading = !0;
2638
2636
  alert = "";
2639
- sortColumn = $t.DATE;
2640
- sortDirection = Gt.DESC;
2637
+ sortColumn = Gt.DATE;
2638
+ sortDirection = Nt.DESC;
2641
2639
  constructor(t) {
2642
- this.globalStore = t, this.uiStore = new Fe(), this.api = new B(
2640
+ this.globalStore = t, this.uiStore = new ke(), this.api = new B(
2643
2641
  t.endpoint,
2644
2642
  t.sessionToken,
2645
2643
  t.onError
@@ -2659,7 +2657,7 @@ class Ue {
2659
2657
  return this.associatedBeatsLoaded && this.tagsLoaded && this.taggingsLoaded && this.transactionRulesLoaded && this.transactionsLoaded;
2660
2658
  }
2661
2659
  get detailedTransactions() {
2662
- return this.isTransactionDataLoaded ? Nt(
2660
+ return this.isTransactionDataLoaded ? Bt(
2663
2661
  this.transactions,
2664
2662
  this.globalStore.accountStore.visibleAccounts,
2665
2663
  this.globalStore.categoryStore.categories,
@@ -2667,7 +2665,7 @@ class Ue {
2667
2665
  ) : [];
2668
2666
  }
2669
2667
  get sortedTransactions() {
2670
- return Bt(
2668
+ return xt(
2671
2669
  this.filter,
2672
2670
  this.uiStore.expandedSplits,
2673
2671
  this.sortColumn,
@@ -2677,7 +2675,7 @@ class Ue {
2677
2675
  );
2678
2676
  }
2679
2677
  get sortedTransactionsWithSplits() {
2680
- return xt(this.sortedTransactions, this.detailedTransactions);
2678
+ return Mt(this.sortedTransactions, this.detailedTransactions);
2681
2679
  }
2682
2680
  setAssociatedBeats = (t) => {
2683
2681
  this.associatedBeats = t, this.associatedBeatsLoading = !1, this.associatedBeatsLoaded = !0;
@@ -2724,14 +2722,14 @@ class Ue {
2724
2722
  const e = await this.api.addTransaction(t);
2725
2723
  if (e) {
2726
2724
  this.setTransactions([e, ...this.transactions]);
2727
- const s = e.transaction_type === Mt.CREDIT ? e.amount : -e.amount;
2725
+ const s = e.transaction_type === Ot.CREDIT ? e.amount : -e.amount;
2728
2726
  this.globalStore.accountStore.updateAccountBalance(e.account_guid, s);
2729
2727
  }
2730
2728
  };
2731
2729
  loadAssociatedBeats = async (t) => {
2732
2730
  if (this.associatedBeatsLoading) return;
2733
2731
  this.associatedBeatsLoading = !0;
2734
- const e = t ? te(t, { representation: "date" }) : void 0;
2732
+ const e = t ? ee(t, { representation: "date" }) : void 0;
2735
2733
  try {
2736
2734
  const s = await this.beatApi.getBeatsWithAssociatedTransaction(e);
2737
2735
  this.setAssociatedBeats(s);
@@ -2873,7 +2871,7 @@ class Ue {
2873
2871
  }
2874
2872
  };
2875
2873
  }
2876
- class Fe {
2874
+ class ke {
2877
2875
  beginDate = E(/* @__PURE__ */ new Date());
2878
2876
  endDate = T(/* @__PURE__ */ new Date());
2879
2877
  expandedSplits = [];
@@ -2882,7 +2880,7 @@ class Fe {
2882
2880
  shouldDisableDrawerScroll = !1;
2883
2881
  searchValue = "";
2884
2882
  selectedAccountGuids = [];
2885
- manualTransaction = Ot;
2883
+ manualTransaction = Pt;
2886
2884
  isAmountValid = !1;
2887
2885
  showInsights = !1;
2888
2886
  constructor() {
@@ -2912,14 +2910,14 @@ class Fe {
2912
2910
  this.manualTransaction = t;
2913
2911
  };
2914
2912
  }
2915
- class ke {
2913
+ class He {
2916
2914
  globalStore;
2917
2915
  selectedCategoryData = null;
2918
2916
  selectedDateRange;
2919
2917
  visibleListLength = 5;
2920
2918
  constructor(t) {
2921
2919
  this.globalStore = t, this.selectedDateRange = {
2922
- start: ee(T($(/* @__PURE__ */ new Date(), 6)), 1),
2920
+ start: se(T($(/* @__PURE__ */ new Date(), 6)), 1),
2923
2921
  end: T(/* @__PURE__ */ new Date())
2924
2922
  }, d(this);
2925
2923
  }
@@ -2933,12 +2931,12 @@ class ke {
2933
2931
  this.visibleListLength = t;
2934
2932
  };
2935
2933
  get sortedDetailedCategoriesWithTransactions() {
2936
- return ae(
2934
+ return ne(
2937
2935
  this.globalStore.categoryStore.detailedCategoriesWithTransactions
2938
2936
  );
2939
2937
  }
2940
2938
  get selectedDateRangeMonthCount() {
2941
- return se(this.selectedDateRange.end, this.selectedDateRange.start) + 1;
2939
+ return ae(this.selectedDateRange.end, this.selectedDateRange.start) + 1;
2942
2940
  }
2943
2941
  get selectedDateRangeMonthRange() {
2944
2942
  const t = P(this.selectedDateRange.start, U.MONTH_LONG), e = P(this.selectedDateRange.end, U.MONTH_LONG);
@@ -2951,13 +2949,13 @@ class ke {
2951
2949
  return this.sortedDetailedCategoriesWithTransactions.slice(this.visibleListLength);
2952
2950
  }
2953
2951
  get categoryDetailsChartData() {
2954
- return ne(
2952
+ return ie(
2955
2953
  this.selectedCategoryData,
2956
2954
  this.selectedDateRangeMonthCount
2957
2955
  );
2958
2956
  }
2959
2957
  }
2960
- class He {
2958
+ class We {
2961
2959
  globalStore;
2962
2960
  api = new ot("/", "");
2963
2961
  userFeatures = [];
@@ -3002,42 +3000,42 @@ class He {
3002
3000
  export {
3003
3001
  N as A,
3004
3002
  j as B,
3005
- _e as C,
3006
- Te as D,
3003
+ fe as C,
3004
+ Ae as D,
3007
3005
  Z as F,
3008
- Ee as G,
3006
+ Re as G,
3009
3007
  et as H,
3010
3008
  at as M,
3011
- Ne as N,
3012
- xe as R,
3009
+ Be as N,
3010
+ Me as R,
3013
3011
  rt as S,
3014
3012
  B as T,
3015
3013
  ot as U,
3016
3014
  ct as W,
3017
- oe as a,
3018
- de as b,
3015
+ ce as a,
3016
+ he as b,
3019
3017
  Y as c,
3020
- le as d,
3021
- ge as e,
3018
+ de as d,
3019
+ pe as e,
3022
3020
  X as f,
3023
- pe as g,
3021
+ _e as g,
3024
3022
  J as h,
3025
- ye as i,
3026
- Se as j,
3027
- Ie as k,
3028
- Gs as l,
3029
- Ce as m,
3023
+ me as i,
3024
+ Te as j,
3025
+ Ce as k,
3026
+ Ns as l,
3027
+ Ee as m,
3030
3028
  tt as n,
3031
- Re as o,
3032
- ve as p,
3029
+ De as o,
3030
+ $e as p,
3033
3031
  st as q,
3034
- $e as r,
3035
- Ge as s,
3032
+ Ge as r,
3033
+ Ne as s,
3036
3034
  nt as t,
3037
- Be as u,
3035
+ xe as u,
3038
3036
  it as v,
3039
- Pe as w,
3040
- Ue as x,
3041
- ke as y,
3042
- He as z
3037
+ Ue as w,
3038
+ Fe as x,
3039
+ He as y,
3040
+ We as z
3043
3041
  };
@@ -1,4 +1,4 @@
1
- import { l as Y } from "../UserStore-D3pg0xks.mjs";
1
+ import { l as Y } from "../UserStore-N45sW80v.mjs";
2
2
  import { b as $, a as H } from "../Localization-DnoVyBNK.mjs";
3
3
  import { f as j, b as V, a as K, c as Z, g as J, d as X } from "../NumberFormatting--XMeeBfr.mjs";
4
4
  import { C as rr, a as er, b as or } from "../CurrencyDialog-DumQCTPO.mjs";
@@ -1,4 +1,4 @@
1
- import { A as g, a as m, b as C, c as N, d as h, B as f, e as E, f as D, g as b, C as I, h as M, i as R, j as B, D as L, F as G, k as _, G as H, l as P, m as U, n as x, o as O, H as F, p as k, q as v, r as w, M as W, s as Y, N as $, t as q, u as K, R as j, v as z, S as J, w as Q, T as X, x as Z, y as V, U as tt, z as at, W as st } from "../UserStore-D3pg0xks.mjs";
1
+ import { A as g, a as m, b as C, c as N, d as h, B as f, e as E, f as D, g as b, C as I, h as M, i as R, j as B, D as L, F as G, k as _, G as H, l as P, m as U, n as x, o as O, H as F, p as k, q as v, r as w, M as W, s as Y, N as $, t as q, u as K, R as j, v as z, S as J, w as Q, T as X, x as Z, y as V, U as tt, z as at, W as st } from "../UserStore-N45sW80v.mjs";
2
2
  import { b as ot, a as nt, d as rt, c as it, A as ct, C as pt, e as At, E as St, M as ut, N as lt, P as Tt, f as yt, g as dt, S as gt } from "../Account-DR7Plrqy.mjs";
3
3
  import { A as Ct, B as Nt, I as ht, N as ft } from "../Notification-DTNYSd8P.mjs";
4
4
  import { F as n } from "../GlobalCopyApi-wcnDUzMV.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.0.7-alpha.mm0",
3
+ "version": "9.0.7-alpha.mm1",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",