@mx-cartographer/experiences 9.2.9-alpha.al4 → 9.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AccountDetailsDrawer-CwDPr4i5.mjs → AccountDetailsDrawer-uaxiCVOl.mjs} +2 -2
  3. package/dist/{AccountDetailsDrawer-CwDPr4i5.mjs.map → AccountDetailsDrawer-uaxiCVOl.mjs.map} +1 -1
  4. package/dist/{Analytics-DST_WxYZ.mjs → Analytics-B8AaC22u.mjs} +2 -2
  5. package/dist/{Analytics-DST_WxYZ.mjs.map → Analytics-B8AaC22u.mjs.map} +1 -1
  6. package/dist/{ApiEndpoints-YY8ajnnd.mjs → ApiEndpoints-DXwIYNUV.mjs} +1 -2
  7. package/dist/ApiEndpoints-DXwIYNUV.mjs.map +1 -0
  8. package/dist/{CategorySelectorDrawer-NJsFsKP1.mjs → CategorySelectorDrawer-BYeVJ_kO.mjs} +94 -86
  9. package/dist/{CategorySelectorDrawer-NJsFsKP1.mjs.map → CategorySelectorDrawer-BYeVJ_kO.mjs.map} +1 -1
  10. package/dist/{GlobalCopyApi-DNC5K2QG.mjs → GlobalCopyApi-CLhyon-B.mjs} +2 -2
  11. package/dist/{GlobalCopyApi-DNC5K2QG.mjs.map → GlobalCopyApi-CLhyon-B.mjs.map} +1 -1
  12. package/dist/{ManageIncome-Br11zvAT.mjs → ManageIncome-CtD65bN_.mjs} +3 -3
  13. package/dist/{ManageIncome-Br11zvAT.mjs.map → ManageIncome-CtD65bN_.mjs.map} +1 -1
  14. package/dist/{NotificationSettings-DXYTQcTs.mjs → NotificationSettings-CW7okUrk.mjs} +127 -117
  15. package/dist/NotificationSettings-CW7okUrk.mjs.map +1 -0
  16. package/dist/{RecurringSettings-BkRz-uzd.mjs → RecurringSettings-BM2bQfSY.mjs} +2 -2
  17. package/dist/{RecurringSettings-BkRz-uzd.mjs.map → RecurringSettings-BM2bQfSY.mjs.map} +1 -1
  18. package/dist/{TransactionDetails-CLc7oeHT.mjs → TransactionDetails-Bo0rVT-L.mjs} +2 -2
  19. package/dist/{TransactionDetails-CLc7oeHT.mjs.map → TransactionDetails-Bo0rVT-L.mjs.map} +1 -1
  20. package/dist/{UserStore-cI7SJMs_.mjs → UserStore-CgsAunf1.mjs} +145 -166
  21. package/dist/UserStore-CgsAunf1.mjs.map +1 -0
  22. package/dist/{ViewMoreMicroCard-Bx9xa2z5.mjs → ViewMoreMicroCard-B4oeGrbE.mjs} +3 -3
  23. package/dist/{ViewMoreMicroCard-Bx9xa2z5.mjs.map → ViewMoreMicroCard-B4oeGrbE.mjs.map} +1 -1
  24. package/dist/accounts/index.es.js +2 -2
  25. package/dist/budgets/index.es.js +3 -3
  26. package/dist/cashflow/index.es.js +3 -3
  27. package/dist/categories/index.es.js +1 -1
  28. package/dist/common/index.es.js +2 -2
  29. package/dist/core/api/SettingsApi.d.ts +0 -4
  30. package/dist/core/constants/ApiEndpoints.d.ts +0 -1
  31. package/dist/core/index.es.js +4 -4
  32. package/dist/core/stores/SettingsStore.d.ts +0 -4
  33. package/dist/core/types/localization/SettingsCopy.d.ts +0 -6
  34. package/dist/finstrong/index.es.js +2 -2
  35. package/dist/microinsights/index.es.js +1 -1
  36. package/dist/notifications/index.es.js +2 -2
  37. package/dist/recurringtransactions/index.es.js +4 -4
  38. package/dist/settings/components/profile/ProfileTab.d.ts +1 -1
  39. package/dist/settings/index.es.js +405 -468
  40. package/dist/settings/index.es.js.map +1 -1
  41. package/dist/spending/index.es.js +1 -1
  42. package/dist/transactions/index.es.js +3 -3
  43. package/dist/trends/index.es.js +2 -2
  44. package/package.json +1 -1
  45. package/dist/ApiEndpoints-YY8ajnnd.mjs.map +0 -1
  46. package/dist/NotificationSettings-DXYTQcTs.mjs.map +0 -1
  47. package/dist/UserStore-cI7SJMs_.mjs.map +0 -1
  48. package/dist/settings/components/profile/actions/ResetPasswordAction.d.ts +0 -4
@@ -1,234 +1,171 @@
1
- import { jsxs as m, jsx as e, Fragment as oe } from "react/jsx-runtime";
2
- import u from "react";
1
+ import { jsxs as c, Fragment as X, jsx as e } from "react/jsx-runtime";
2
+ import m from "react";
3
3
  import { observer as C } from "mobx-react-lite";
4
4
  import p from "@mui/material/Stack";
5
- import pe from "@mui/material/Tab";
6
- import he from "@mui/material/Tabs";
7
- import fe from "@mui/material/Alert";
8
- import _e from "@mui/material/Snackbar";
9
- import { getUnixTime as ge } from "date-fns/getUnixTime";
10
- import { AdapterDateFns as be } from "@mui/x-date-pickers/AdapterDateFnsV3";
11
- import { DatePicker as ye } from "@mui/x-date-pickers";
12
- import { LocalizationProvider as xe } from "@mui/x-date-pickers/LocalizationProvider";
13
- import { useTheme as B, alpha as W } from "@mui/material/styles";
5
+ import ue from "@mui/material/Tab";
6
+ import pe from "@mui/material/Tabs";
7
+ import he from "@mui/material/Alert";
8
+ import fe from "@mui/material/Snackbar";
9
+ import { getUnixTime as _e } from "date-fns/getUnixTime";
10
+ import { AdapterDateFns as ge } from "@mui/x-date-pickers/AdapterDateFnsV3";
11
+ import { DatePicker as be } from "@mui/x-date-pickers";
12
+ import { LocalizationProvider as ye } from "@mui/x-date-pickers/LocalizationProvider";
13
+ import { useTheme as L, alpha as W } from "@mui/material/styles";
14
14
  import z from "@mui/material/Box";
15
- import Y from "@mui/material/Button";
16
- import P from "@mui/material/TextField";
17
- import { Text as x, H3 as Z, P as L, Icon as O } from "@mxenabled/mxui";
18
- import N from "@mui/material/IconButton";
19
- import X from "@mui/material/InputAdornment";
20
- import { ChevronRight as ne, VisibilityOff as ee, Visibility as te, ChevronLeft as ve } from "@mxenabled/mx-icons";
21
- import { u as A, A as I, i as G, C as Ce, a as ie, l as j } from "../hooks-97sNJ_lf.mjs";
22
- import { D as U } from "../Dialog-Bvd2n8hz.mjs";
23
- import { V as we, a as De, N as J } from "../NotificationSettings-DXYTQcTs.mjs";
24
- import { A as Xt, B as eo, I as to } from "../NotificationSettings-DXYTQcTs.mjs";
15
+ import Z from "@mui/material/Button";
16
+ import I from "@mui/material/TextField";
17
+ import { H3 as Y, P as M, Text as x, Icon as B } from "@mxenabled/mxui";
18
+ import { V as xe, a as ve, N as J } from "../NotificationSettings-CW7okUrk.mjs";
19
+ import { A as Jt, B as Kt, I as Yt } from "../NotificationSettings-CW7okUrk.mjs";
20
+ import { u as k, i as G, A as E, C as Ce, a as ee, l as j } from "../hooks-97sNJ_lf.mjs";
25
21
  import { u as F } from "../useScreenSize-mWpmnh5w.mjs";
26
- import { formatDistanceToNow as re } from "date-fns/formatDistanceToNow";
27
- import { fromUnixTime as ae } from "date-fns/fromUnixTime";
28
- import { DataGridPro as Se } from "@mui/x-data-grid-pro";
22
+ import { D as $ } from "../Dialog-Bvd2n8hz.mjs";
23
+ import { formatDistanceToNow as te } from "date-fns/formatDistanceToNow";
24
+ import { fromUnixTime as oe } from "date-fns/fromUnixTime";
25
+ import O from "@mui/material/IconButton";
26
+ import { DataGridPro as De } from "@mui/x-data-grid-pro";
29
27
  import { b as H } from "../Localization-DnoVyBNK.mjs";
30
28
  import { H as V } from "../HeaderCell-P8w6CmfO.mjs";
31
29
  import ke from "@mui/material/Accordion";
32
- import Ae from "@mui/material/AccordionDetails";
33
- import Te from "@mui/material/AccordionSummary";
34
- import { L as se } from "../Loader-CxeBwuPG.mjs";
35
- import Pe from "@mui/material/List";
30
+ import we from "@mui/material/AccordionDetails";
31
+ import Se from "@mui/material/AccordionSummary";
32
+ import { L as ie } from "../Loader-CxeBwuPG.mjs";
33
+ import Te from "@mui/material/List";
36
34
  import K from "@mui/material/Divider";
37
- import Ie from "@mui/material/ListSubheader";
38
- import { b as Ee, u as Ne } from "../CategorySelectorDrawer-NJsFsKP1.mjs";
39
- import Re from "@mui/material/ListItem";
40
- import Me from "@mui/material/ListItemButton";
41
- import Le from "@mui/material/ListItemIcon";
42
- import Be from "@mui/material/ListItemText";
43
- import { D as Oe } from "../Drawer-DsnW2o0v.mjs";
44
- import { u as le } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
45
- import { H as He } from "../Help-D4sOpItq.mjs";
35
+ import Ae from "@mui/material/ListSubheader";
36
+ import { b as Ie, u as Ee } from "../CategorySelectorDrawer-BYeVJ_kO.mjs";
37
+ import Pe from "@mui/material/ListItem";
38
+ import Re from "@mui/material/ListItemButton";
39
+ import Ne from "@mui/material/ListItemIcon";
40
+ import Me from "@mui/material/ListItemText";
41
+ import { ChevronRight as Le, ChevronLeft as Be } from "@mxenabled/mx-icons";
42
+ import { D as He } from "../Drawer-DsnW2o0v.mjs";
43
+ import { u as ne } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
44
+ import { H as Oe } from "../Help-D4sOpItq.mjs";
46
45
  import { W as q } from "../WidgetContainer-eosXfD5G.mjs";
47
- const Ue = 12, Fe = /[a-zA-Z]/, Ve = /\d/, We = "Passwords must be at least 12 characters, and must contain at least one number and one letter.", ze = C(() => {
48
- const { common: t, settings: r } = A(), { updatePassword: n } = I(), [o, i] = u.useState(!1), [l, c] = u.useState(""), [a, s] = u.useState(""), [d, h] = u.useState(!1), [f, y] = u.useState(!1), S = l.length >= Ue && Fe.test(l) && Ve.test(l) && l === a, v = () => {
49
- i(!1), c(""), s(""), h(!1), y(!1);
50
- }, w = () => {
51
- i(!0);
52
- }, k = () => {
53
- n({ new_password: l, new_password_again: a });
54
- };
55
- return /* @__PURE__ */ m(p, { children: [
56
- /* @__PURE__ */ m(Y, { onClick: w, children: [
57
- /* @__PURE__ */ e(x, { variant: "body2", children: r.reset_password }),
58
- /* @__PURE__ */ e(ne, {})
59
- ] }),
60
- /* @__PURE__ */ e(
61
- U,
62
- {
63
- copy: { title: r.reset_password },
64
- disablePrimaryButton: !S,
65
- isOpen: o,
66
- onClose: v,
67
- onPrimaryAction: k,
68
- onSecondaryAction: v,
69
- primaryText: r.save_password,
70
- secondaryText: t.cancel_button,
71
- sx: {
72
- "& .MuiToolbar-root:last-child": {
73
- padding: 24,
74
- justifyContent: "flex-end"
75
- }
76
- },
77
- children: /* @__PURE__ */ m(p, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
78
- /* @__PURE__ */ e(x, { variant: "body1", children: We }),
79
- /* @__PURE__ */ e(
80
- P,
81
- {
82
- label: r.new_password,
83
- onChange: (D) => c(D.target.value),
84
- slotProps: {
85
- input: {
86
- endAdornment: /* @__PURE__ */ e(X, { position: "end", children: /* @__PURE__ */ e(N, { edge: "end", onClick: () => h(!d), children: d ? /* @__PURE__ */ e(ee, {}) : /* @__PURE__ */ e(te, {}) }) })
87
- }
88
- },
89
- type: d ? "text" : "password",
90
- value: l
91
- }
92
- ),
93
- /* @__PURE__ */ e(
94
- P,
95
- {
96
- label: r.confirm_new_password,
97
- onChange: (D) => s(D.target.value),
98
- slotProps: {
99
- input: {
100
- endAdornment: /* @__PURE__ */ e(X, { position: "end", children: /* @__PURE__ */ e(
101
- N,
102
- {
103
- edge: "end",
104
- onClick: () => y(!f),
105
- children: f ? /* @__PURE__ */ e(ee, {}) : /* @__PURE__ */ e(te, {})
106
- }
107
- ) })
108
- }
109
- },
110
- type: f ? "text" : "password",
111
- value: a
112
- }
113
- )
114
- ] })
115
- }
116
- )
117
- ] });
118
- }), Ge = ({ availableWidth: t, handleOnLeaveClick: r }) => {
119
- const n = B(), { common: o, settings: i } = A(), { isMobile: l } = F(t), { config: c } = G(), { updateUser: a } = I(), { user: s } = Ce(), [d, h] = u.useState({
120
- first_name: s.first_name,
121
- last_name: s.last_name,
122
- email: s.email,
123
- phone: s.phone,
124
- birthday: s.birthday,
125
- postal_code: s.postal_code,
126
- credit_score: s.credit_score
127
- }), [f, y] = u.useState(!1), [S, v] = u.useState(!1), w = u.useRef(null), k = d.email && !s.email_is_verified && !f, D = d.phone && !s.phone_is_verified && !f;
128
- u.useEffect(() => {
46
+ const Fe = ({ availableWidth: t, handleOnLeavClick: r }) => {
47
+ const i = L(), { common: o, settings: n } = k(), { isDesktop: u, isMobile: s, isSmallMobile: a, isTablet: l } = F(t), { config: b } = G(), { updateUser: _ } = E(), { user: d } = Ce(), [h, w] = m.useState({
48
+ first_name: d.first_name,
49
+ last_name: d.last_name,
50
+ email: d.email,
51
+ phone: d.phone,
52
+ birthday: d.birthday,
53
+ postal_code: d.postal_code,
54
+ credit_score: d.credit_score
55
+ }), [v, S] = m.useState(!1), [A, T] = m.useState(!1), g = m.useRef(null), D = h.email && !d.email_is_verified && !v, U = h.phone && !d.phone_is_verified && !v;
56
+ m.useEffect(() => {
129
57
  if (r) {
130
- const _ = (R) => {
131
- w.current && !w.current.contains(R.target) && f && v(!0);
58
+ const f = (R) => {
59
+ g.current && !g.current.contains(R.target) && v && T(!0);
132
60
  };
133
- return document.addEventListener("mousedown", _), () => {
134
- document.removeEventListener("mousedown", _);
61
+ return document.addEventListener("mousedown", f), () => {
62
+ document.removeEventListener("mousedown", f);
135
63
  };
136
64
  }
137
- }, [f]);
138
- const b = () => {
139
- if (d.birthday) {
140
- const _ = new Date(d.birthday * 1e3), R = _.getUTCFullYear(), me = _.getUTCMonth(), ue = _.getUTCDate();
141
- return new Date(R, me, ue);
65
+ }, [v]);
66
+ const ae = () => {
67
+ if (h.birthday) {
68
+ const f = new Date(h.birthday * 1e3), R = f.getUTCFullYear(), de = f.getUTCMonth(), me = f.getUTCDate();
69
+ return new Date(R, de, me);
142
70
  }
143
- }, T = async () => {
144
- await a({ ...s, ...d }), y(!1);
145
- }, $ = () => {
146
- v(!1), r && r();
147
- }, de = () => {
148
- v(!1);
149
- }, E = (_) => {
71
+ }, se = async () => {
72
+ await _({ ...d, ...h }), S(!1);
73
+ }, le = () => {
74
+ T(!1), r && r();
75
+ }, ce = () => {
76
+ T(!1);
77
+ }, P = (f) => {
150
78
  const R = {
151
- ...d,
152
- ..._
79
+ ...h,
80
+ ...f
153
81
  };
154
- h(R), y(JSON.stringify({ ...s, ...R }) !== JSON.stringify(s));
82
+ w(R), S(JSON.stringify({ ...d, ...R }) !== JSON.stringify(d));
155
83
  };
156
- return /* @__PURE__ */ m(oe, { children: [
157
- /* @__PURE__ */ m(
84
+ return /* @__PURE__ */ c(X, { children: [
85
+ /* @__PURE__ */ c(
158
86
  z,
159
87
  {
160
88
  component: "form",
161
- ref: w,
89
+ ref: g,
162
90
  sx: {
163
91
  backgroundColor: "background.paper",
164
92
  p: 24,
93
+ width: a ? 320 : l ? 680 : u ? 990 : 400,
165
94
  "& .MuiTextField-root": {
166
- flex: 1
95
+ width: a ? 272 : l ? 328 : u ? 483 : 352
167
96
  }
168
97
  },
169
98
  children: [
170
- /* @__PURE__ */ e(Z, { children: i.personal_details }),
171
- /* @__PURE__ */ e(L, { variant: "body1", children: i.update_information }),
172
- /* @__PURE__ */ m(p, { direction: l ? "column" : "row", spacing: 24, sx: { mb: 24, pt: 24 }, children: [
173
- /* @__PURE__ */ e(
174
- P,
175
- {
176
- defaultValue: d.first_name,
177
- label: i.first_name,
178
- onChange: (_) => E({ first_name: _.target.value })
179
- }
180
- ),
181
- /* @__PURE__ */ e(
182
- P,
183
- {
184
- defaultValue: d.last_name,
185
- label: i.last_name,
186
- onChange: (_) => E({ last_name: _.target.value })
187
- }
188
- )
189
- ] }),
190
- /* @__PURE__ */ m(p, { direction: l ? "column" : "row", children: [
191
- c.display_email_edit_field_in_settings && /* @__PURE__ */ m(p, { sx: { flex: 1, mb: k ? 20 : 24, mr: l ? 0 : 24 }, children: [
99
+ /* @__PURE__ */ e(Y, { children: n.personal_details }),
100
+ /* @__PURE__ */ e(M, { variant: "body1", children: n.update_information }),
101
+ /* @__PURE__ */ c(
102
+ p,
103
+ {
104
+ direction: s ? "column" : "row",
105
+ spacing: s ? 44 : 24,
106
+ sx: { mb: 44, pt: 32 },
107
+ children: [
108
+ /* @__PURE__ */ e(
109
+ I,
110
+ {
111
+ defaultValue: h.first_name,
112
+ label: n.first_name,
113
+ onChange: (f) => P({ first_name: f.target.value })
114
+ }
115
+ ),
116
+ /* @__PURE__ */ e(
117
+ I,
118
+ {
119
+ defaultValue: h.last_name,
120
+ label: n.last_name,
121
+ onChange: (f) => P({ last_name: f.target.value })
122
+ }
123
+ )
124
+ ]
125
+ }
126
+ ),
127
+ /* @__PURE__ */ c(p, { direction: s ? "column" : "row", children: [
128
+ b.display_email_edit_field_in_settings && /* @__PURE__ */ c(p, { sx: { mb: D ? 20 : 44, mr: s ? 0 : 24 }, children: [
192
129
  /* @__PURE__ */ e(
193
- P,
130
+ I,
194
131
  {
195
- defaultValue: d.email,
196
- label: i.email_address,
197
- onChange: (_) => E({ email: _.target.value })
132
+ defaultValue: h.email,
133
+ label: n.email_address,
134
+ onChange: (f) => P({ email: f.target.value })
198
135
  }
199
136
  ),
200
- k && /* @__PURE__ */ e(we, {})
137
+ D && /* @__PURE__ */ e(xe, {})
201
138
  ] }),
202
- c.display_sms_edit_field_in_settings && /* @__PURE__ */ m(p, { sx: { flex: 1, mb: D ? 20 : 24 }, children: [
139
+ b.display_sms_edit_field_in_settings && /* @__PURE__ */ c(p, { sx: { mb: U ? 20 : 44 }, children: [
203
140
  /* @__PURE__ */ e(
204
- P,
141
+ I,
205
142
  {
206
- defaultValue: d.phone,
207
- label: i.mobile_number,
208
- onChange: (_) => E({ phone: _.target.value }),
143
+ defaultValue: h.phone,
144
+ label: n.mobile_number,
145
+ onChange: (f) => P({ phone: f.target.value }),
209
146
  type: "tel"
210
147
  }
211
148
  ),
212
- D && /* @__PURE__ */ e(De, {})
149
+ U && /* @__PURE__ */ e(ve, {})
213
150
  ] })
214
151
  ] }),
215
- /* @__PURE__ */ m(p, { direction: l ? "column" : "row", spacing: 24, sx: { mb: 24 }, children: [
216
- /* @__PURE__ */ e(xe, { dateAdapter: be, children: /* @__PURE__ */ e(
217
- ye,
152
+ /* @__PURE__ */ c(p, { direction: s ? "column" : "row", spacing: s ? 44 : 24, sx: { mb: 44 }, children: [
153
+ /* @__PURE__ */ e(ye, { dateAdapter: ge, children: /* @__PURE__ */ e(
154
+ be,
218
155
  {
219
- label: i.birthdate,
220
- onChange: (_) => E({ birthday: ge(_) }),
156
+ label: n.birthdate,
157
+ onChange: (f) => P({ birthday: _e(f) }),
221
158
  slotProps: {
222
159
  nextIconButton: {
223
160
  sx: {
224
161
  color: "primary.main",
225
- "&:hover": { backgroundColor: W(n.palette.primary.light, 0.1) }
162
+ "&:hover": { backgroundColor: W(i.palette.primary.light, 0.1) }
226
163
  }
227
164
  },
228
165
  previousIconButton: {
229
166
  sx: {
230
167
  color: "primary.main",
231
- "&:hover": { backgroundColor: W(n.palette.primary.light, 0.1) }
168
+ "&:hover": { backgroundColor: W(i.palette.primary.light, 0.1) }
232
169
  }
233
170
  }
234
171
  },
@@ -236,37 +173,37 @@ const Ue = 12, Fe = /[a-zA-Z]/, Ve = /\d/, We = "Passwords must be at least 12 c
236
173
  width: "100%",
237
174
  "& .MuiIconButton-edgeEnd": {
238
175
  color: "primary.main",
239
- "&:hover": { backgroundColor: W(n.palette.primary.light, 0.1) }
176
+ "&:hover": { backgroundColor: W(i.palette.primary.light, 0.1) }
240
177
  }
241
178
  },
242
- value: b()
179
+ value: ae()
243
180
  }
244
181
  ) }),
245
182
  /* @__PURE__ */ e(
246
- P,
183
+ I,
247
184
  {
248
- defaultValue: d.postal_code,
249
- label: i.zip_code,
250
- onChange: (_) => E({ postal_code: _.target.value })
185
+ defaultValue: h.postal_code,
186
+ label: n.zip_code,
187
+ onChange: (f) => P({ postal_code: f.target.value })
251
188
  }
252
189
  )
253
190
  ] }),
254
- /* @__PURE__ */ m(p, { children: [
191
+ /* @__PURE__ */ c(p, { children: [
255
192
  /* @__PURE__ */ e(
256
- P,
193
+ I,
257
194
  {
258
- defaultValue: d.credit_score,
259
- label: i.credit_score,
260
- onChange: (_) => E({ credit_score: Number(_.target.value) })
195
+ defaultValue: h.credit_score,
196
+ label: n.credit_score,
197
+ onChange: (f) => P({ credit_score: Number(f.target.value) }),
198
+ sx: { mb: 44 }
261
199
  }
262
200
  ),
263
- c.display_password_options_in_settings && /* @__PURE__ */ e(ze, {}),
264
201
  /* @__PURE__ */ e(
265
- Y,
202
+ Z,
266
203
  {
267
- disabled: !f,
268
- onClick: T,
269
- sx: { width: l ? "100%" : 124 },
204
+ disabled: !v,
205
+ onClick: se,
206
+ sx: { width: a ? 272 : 124 },
270
207
  variant: "contained",
271
208
  children: o.save_button
272
209
  }
@@ -276,39 +213,39 @@ const Ue = 12, Fe = /[a-zA-Z]/, Ve = /\d/, We = "Passwords must be at least 12 c
276
213
  }
277
214
  ),
278
215
  /* @__PURE__ */ e(
279
- U,
216
+ $,
280
217
  {
281
- copy: { title: i.discard_changes },
282
- isOpen: S,
283
- onClose: de,
284
- onSecondaryAction: $,
285
- primaryText: i.keep_editing,
286
- secondaryText: i.leave,
287
- children: i.discard_changes_message
218
+ copy: { title: n.discard_changes },
219
+ isOpen: A,
220
+ onClose: ce,
221
+ onSecondaryAction: le,
222
+ primaryText: n.keep_editing,
223
+ secondaryText: n.leave,
224
+ children: n.discard_changes_message
288
225
  }
289
226
  )
290
227
  ] });
291
- }, je = C(Ge);
292
- var g = /* @__PURE__ */ ((t) => (t.Delete = "delete", t.Edit = "edit", t.Token = "token", t))(g || {});
293
- const $e = ({
228
+ }, Ue = C(Fe);
229
+ var y = /* @__PURE__ */ ((t) => (t.Delete = "delete", t.Edit = "edit", t.Token = "token", t))(y || {});
230
+ const Ve = ({
294
231
  devices: t,
295
232
  onClickDeviceEdit: r,
296
- onClickDeviceDelete: n
233
+ onClickDeviceDelete: i
297
234
  }) => {
298
- const o = B(), { settings: i } = A(), l = [
235
+ const o = L(), { settings: n } = k(), u = [
299
236
  {
300
237
  field: "name",
301
- headerName: i.mobile_devices_column_name,
238
+ headerName: n.mobile_devices_column_name,
302
239
  renderHeader: V,
303
- renderCell: (a) => /* @__PURE__ */ m(p, { alignItems: "center", direction: "row", gap: 4, children: [
240
+ renderCell: (a) => /* @__PURE__ */ c(p, { alignItems: "center", direction: "row", gap: 4, children: [
304
241
  /* @__PURE__ */ e(x, { variant: "body2", children: a.value }),
305
242
  /* @__PURE__ */ e(
306
- N,
243
+ O,
307
244
  {
308
- "aria-label": i.mobile_devices_edit_label,
245
+ "aria-label": n.mobile_devices_edit_label,
309
246
  color: "secondary",
310
247
  onClick: () => r(a.row),
311
- children: /* @__PURE__ */ e(O, { name: "edit" })
248
+ children: /* @__PURE__ */ e(B, { name: "edit" })
312
249
  }
313
250
  )
314
251
  ] }),
@@ -318,7 +255,7 @@ const $e = ({
318
255
  },
319
256
  {
320
257
  field: "device_type",
321
- headerName: i.mobile_devices_column_type,
258
+ headerName: n.mobile_devices_column_type,
322
259
  renderHeader: V,
323
260
  sortable: !0,
324
261
  hideSortIcons: !1,
@@ -327,9 +264,9 @@ const $e = ({
327
264
  },
328
265
  {
329
266
  field: "created_at",
330
- headerName: i.mobile_devices_column_added,
267
+ headerName: n.mobile_devices_column_added,
331
268
  renderHeader: V,
332
- valueFormatter: (a) => re(ae(a), { addSuffix: !0 }),
269
+ valueFormatter: (a) => te(oe(a), { addSuffix: !0 }),
333
270
  sortable: !0,
334
271
  hideSortIcons: !1,
335
272
  flex: 1,
@@ -340,31 +277,31 @@ const $e = ({
340
277
  headerName: "",
341
278
  renderHeader: V,
342
279
  renderCell: (a) => /* @__PURE__ */ e(p, { mr: 4, children: /* @__PURE__ */ e(
343
- N,
280
+ O,
344
281
  {
345
- "aria-label": i.mobile_devices_delete_label,
282
+ "aria-label": n.mobile_devices_delete_label,
346
283
  color: "secondary",
347
- onClick: () => n(a.row),
348
- children: /* @__PURE__ */ e(O, { name: "delete" })
284
+ onClick: () => i(a.row),
285
+ children: /* @__PURE__ */ e(B, { name: "delete" })
349
286
  }
350
287
  ) }),
351
288
  sortable: !1,
352
289
  hideSortIcons: !1,
353
290
  width: 58
354
291
  }
355
- ], c = u.useMemo(() => t.map((a) => ({
292
+ ], s = m.useMemo(() => t.map((a) => ({
356
293
  id: a.guid,
357
294
  ...a,
358
295
  device_type: `${a.make} ${a.model}`
359
296
  })), [t]);
360
297
  return /* @__PURE__ */ e(z, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
361
- Se,
298
+ De,
362
299
  {
363
- columns: l,
300
+ columns: u,
364
301
  disableColumnFilter: !0,
365
302
  disableColumnMenu: !0,
366
303
  disableRowSelectionOnClick: !0,
367
- rows: c,
304
+ rows: s,
368
305
  slotProps: {
369
306
  footer: {
370
307
  sx: { justifyContent: "flex-end" }
@@ -382,7 +319,7 @@ const $e = ({
382
319
  p: "12px 16px"
383
320
  },
384
321
  children: /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: H(
385
- i.mobile_devices_count,
322
+ n.mobile_devices_count,
386
323
  /* @__PURE__ */ e("b", { children: t.length }),
387
324
  /* @__PURE__ */ e("b", { children: t.length })
388
325
  ) })
@@ -405,47 +342,47 @@ const $e = ({
405
342
  }
406
343
  }
407
344
  ) });
408
- }, Je = ({
345
+ }, We = ({
409
346
  devices: t,
410
347
  onClickDeviceEdit: r,
411
- onClickDeviceDelete: n
348
+ onClickDeviceDelete: i
412
349
  }) => {
413
- const o = B(), { settings: i } = A(), [l, c] = u.useState(!1), a = (s) => (d, h) => {
414
- c(h ? s : !1);
350
+ const o = L(), { settings: n } = k(), [u, s] = m.useState(!1), a = (l) => (b, _) => {
351
+ s(_ ? l : !1);
415
352
  };
416
- return /* @__PURE__ */ m(p, { mx: -28, sx: { "& .MuiAccordion-root": { mb: 0, mt: 0 } }, children: [
417
- t.map((s) => /* @__PURE__ */ m(
353
+ return /* @__PURE__ */ c(p, { mx: -28, sx: { "& .MuiAccordion-root": { mb: 0, mt: 0 } }, children: [
354
+ t.map((l) => /* @__PURE__ */ c(
418
355
  ke,
419
356
  {
420
- expanded: l === s.guid,
421
- onChange: a(s.guid),
357
+ expanded: u === l.guid,
358
+ onChange: a(l.guid),
422
359
  sx: { boxShadow: "none" },
423
360
  children: [
424
361
  /* @__PURE__ */ e(
425
- Te,
362
+ Se,
426
363
  {
427
- expandIcon: /* @__PURE__ */ e(O, { color: "secondary", name: "keyboard_arrow_down", size: 24 }),
364
+ expandIcon: /* @__PURE__ */ e(B, { color: "secondary", name: "keyboard_arrow_down", size: 24 }),
428
365
  sx: {
429
366
  padding: "14px 24px",
430
367
  borderBottom: "1px solid",
431
368
  borderColor: o.palette.divider
432
369
  },
433
- children: /* @__PURE__ */ m(p, { gap: 4, children: [
434
- /* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: s.name }),
435
- /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: `${s.make} ${s.model}` }),
436
- /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: re(ae(s.created_at), { addSuffix: !0 }) })
370
+ children: /* @__PURE__ */ c(p, { gap: 4, children: [
371
+ /* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: l.name }),
372
+ /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: `${l.make} ${l.model}` }),
373
+ /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: te(oe(l.created_at), { addSuffix: !0 }) })
437
374
  ] })
438
375
  }
439
376
  ),
440
- /* @__PURE__ */ m(
441
- Ae,
377
+ /* @__PURE__ */ c(
378
+ we,
442
379
  {
443
380
  sx: { backgroundColor: o.palette.background.default, p: "0 0 0 24px" },
444
381
  children: [
445
- /* @__PURE__ */ m(
382
+ /* @__PURE__ */ c(
446
383
  p,
447
384
  {
448
- onClick: () => r(s),
385
+ onClick: () => r(l),
449
386
  sx: {
450
387
  alignItems: "center",
451
388
  flexDirection: "row",
@@ -457,15 +394,15 @@ const $e = ({
457
394
  borderColor: o.palette.divider
458
395
  },
459
396
  children: [
460
- /* @__PURE__ */ e(N, { "aria-label": i.mobile_devices_edit_label, color: "secondary", children: /* @__PURE__ */ e(O, { name: "edit" }) }),
461
- /* @__PURE__ */ e(x, { variant: "body1", children: i.mobile_devices_edit_label })
397
+ /* @__PURE__ */ e(O, { "aria-label": n.mobile_devices_edit_label, color: "secondary", children: /* @__PURE__ */ e(B, { name: "edit" }) }),
398
+ /* @__PURE__ */ e(x, { variant: "body1", children: n.mobile_devices_edit_label })
462
399
  ]
463
400
  }
464
401
  ),
465
- /* @__PURE__ */ m(
402
+ /* @__PURE__ */ c(
466
403
  p,
467
404
  {
468
- onClick: () => n(s),
405
+ onClick: () => i(l),
469
406
  sx: {
470
407
  alignItems: "center",
471
408
  flexDirection: "row",
@@ -475,8 +412,8 @@ const $e = ({
475
412
  cursor: "pointer"
476
413
  },
477
414
  children: [
478
- /* @__PURE__ */ e(N, { "aria-label": i.mobile_devices_delete_label, color: "secondary", children: /* @__PURE__ */ e(O, { name: "delete" }) }),
479
- /* @__PURE__ */ e(x, { variant: "body1", children: i.mobile_devices_delete_label })
415
+ /* @__PURE__ */ e(O, { "aria-label": n.mobile_devices_delete_label, color: "secondary", children: /* @__PURE__ */ e(B, { name: "delete" }) }),
416
+ /* @__PURE__ */ e(x, { variant: "body1", children: n.mobile_devices_delete_label })
480
417
  ]
481
418
  }
482
419
  )
@@ -485,7 +422,7 @@ const $e = ({
485
422
  )
486
423
  ]
487
424
  },
488
- s.guid
425
+ l.guid
489
426
  )),
490
427
  /* @__PURE__ */ e(
491
428
  z,
@@ -497,53 +434,53 @@ const $e = ({
497
434
  p: "12px 16px"
498
435
  },
499
436
  children: /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: H(
500
- i.mobile_devices_count,
437
+ n.mobile_devices_count,
501
438
  /* @__PURE__ */ e("b", { children: t.length }),
502
439
  /* @__PURE__ */ e("b", { children: t.length })
503
440
  ) })
504
441
  }
505
442
  )
506
443
  ] });
507
- }, Ke = ({
444
+ }, ze = ({
508
445
  dialogType: t,
509
446
  isOpen: r,
510
- onClose: n,
447
+ onClose: i,
511
448
  device: o,
512
- deviceToken: i = ""
449
+ deviceToken: n = ""
513
450
  }) => {
514
- const l = B(), { common: c, settings: a } = A(), { updateDevice: s, deleteDevice: d, setAlert: h, loadDevices: f } = I(), [y, S] = u.useState("");
515
- u.useEffect(() => {
516
- o && S(o.name);
451
+ const u = L(), { common: s, settings: a } = k(), { updateDevice: l, deleteDevice: b, setAlert: _, loadDevices: d } = E(), [h, w] = m.useState("");
452
+ m.useEffect(() => {
453
+ o && w(o.name);
517
454
  }, [o, t]);
518
455
  const v = () => {
519
456
  switch (t) {
520
- case g.Edit:
457
+ case y.Edit:
521
458
  return a.mobile_devices_edit_label;
522
- case g.Delete:
459
+ case y.Delete:
523
460
  return a.mobile_devices_delete_label;
524
461
  default:
525
462
  return "";
526
463
  }
527
- }, w = () => {
464
+ }, S = () => {
528
465
  switch (t) {
529
- case g.Token:
530
- return c.done_button;
531
- case g.Edit:
532
- return c.save_button;
533
- case g.Delete:
534
- return c.delete_button;
466
+ case y.Token:
467
+ return s.done_button;
468
+ case y.Edit:
469
+ return s.save_button;
470
+ case y.Delete:
471
+ return s.delete_button;
535
472
  default:
536
473
  return "";
537
474
  }
538
- }, k = () => {
539
- const b = {
475
+ }, A = () => {
476
+ const g = {
540
477
  "& .MuiDialogContent-root": {
541
478
  width: 400,
542
479
  pt: 0
543
480
  }
544
481
  };
545
- return t === g.Token ? {
546
- ...b,
482
+ return t === y.Token ? {
483
+ ...g,
547
484
  "& .MuiToolbar-root:last-child": {
548
485
  padding: "32px 60px 48px",
549
486
  justifyContent: "center"
@@ -555,85 +492,85 @@ const $e = ({
555
492
  flex: 1
556
493
  }
557
494
  } : {
558
- ...b,
495
+ ...g,
559
496
  "& .MuiToolbar-root:last-child": {
560
497
  gap: 8,
561
498
  padding: 24,
562
499
  justifyContent: "flex-end"
563
500
  },
564
- ...t === g.Delete && {
501
+ ...t === y.Delete && {
565
502
  "& .MuiTypography-body1": {
566
503
  padding: 0
567
504
  }
568
505
  }
569
506
  };
570
- }, D = async () => {
571
- if (t === g.Token && n(), t === g.Edit && o) {
572
- const b = { ...o, name: y };
573
- (await s(b)).success ? (h(a.mobile_devices_edit_success, "success"), f()) : h(
507
+ }, T = async () => {
508
+ if (t === y.Token && i(), t === y.Edit && o) {
509
+ const g = { ...o, name: h };
510
+ (await l(g)).success ? (_(a.mobile_devices_edit_success, "success"), d()) : _(
574
511
  H(a.mobile_devices_edit_error, o.name),
575
512
  "error"
576
- ), n();
513
+ ), i();
577
514
  }
578
- t === g.Delete && o && ((await d(o.guid)).success ? (h(
515
+ t === y.Delete && o && ((await b(o.guid)).success ? (_(
579
516
  H(a.mobile_devices_delete_success, o.name),
580
517
  "success"
581
- ), f()) : h(
518
+ ), d()) : _(
582
519
  H(a.mobile_devices_delete_error, o.name),
583
520
  "error"
584
- ), n());
521
+ ), i());
585
522
  };
586
- return /* @__PURE__ */ m(
587
- U,
523
+ return /* @__PURE__ */ c(
524
+ $,
588
525
  {
589
526
  copy: { title: v() },
590
527
  isOpen: r,
591
- onClose: n,
592
- onPrimaryAction: D,
593
- onSecondaryAction: n,
594
- primaryColor: t === g.Delete ? "error" : void 0,
595
- primaryText: w(),
596
- secondaryText: t === g.Token ? c.back : c.cancel_button,
597
- sx: k(),
528
+ onClose: i,
529
+ onPrimaryAction: T,
530
+ onSecondaryAction: i,
531
+ primaryColor: t === y.Delete ? "error" : void 0,
532
+ primaryText: S(),
533
+ secondaryText: t === y.Token ? s.back : s.cancel_button,
534
+ sx: A(),
598
535
  children: [
599
- t === g.Token && /* @__PURE__ */ m(p, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
536
+ t === y.Token && /* @__PURE__ */ c(p, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
600
537
  /* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "body1", children: a.mobile_devices_access_label }),
601
538
  /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: a.mobile_devices_access_info_1 }),
602
539
  /* @__PURE__ */ e(
603
- L,
540
+ M,
604
541
  {
605
542
  sx: {
606
- border: `1px solid ${l.palette.neutral.light}`,
543
+ border: `1px solid ${u.palette.neutral.light}`,
607
544
  borderRadius: "4px",
608
545
  p: "16px 32px"
609
546
  },
610
547
  variant: "h1",
611
- children: i
548
+ children: n
612
549
  }
613
550
  ),
614
551
  /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: a.mobile_devices_access_info_2 })
615
552
  ] }),
616
- t === g.Edit && /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(P, { onChange: (b) => S(b.target.value), value: y }) }),
617
- t === g.Delete && /* @__PURE__ */ e(L, { children: a.mobile_devices_delete_info })
553
+ t === y.Edit && /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(I, { onChange: (g) => w(g.target.value), value: h }) }),
554
+ t === y.Delete && /* @__PURE__ */ e(M, { children: a.mobile_devices_delete_info })
618
555
  ]
619
556
  }
620
557
  );
621
- }, Ye = C(Ke), Ze = C(() => {
622
- const { isMobile: t } = F(), { settings: r } = A(), { isCopyLoaded: n, isInitialized: o } = ie(), { setAlert: i, devices: l, loadDevices: c, generateDeviceToken: a } = I(), [s, d] = u.useState({ open: !1, type: "" }), [h, f] = u.useState(), [y, S] = u.useState("");
623
- u.useEffect(() => {
624
- o && c();
558
+ }, Ge = C(ze), je = C(() => {
559
+ const { isMobile: t } = F(), { settings: r } = k(), { isCopyLoaded: i, isInitialized: o } = ee(), { setAlert: n, devices: u, loadDevices: s, generateDeviceToken: a } = E(), [l, b] = m.useState({ open: !1, type: "" }), [_, d] = m.useState(), [h, w] = m.useState("");
560
+ m.useEffect(() => {
561
+ o && s();
625
562
  }, [o]);
626
563
  const v = async () => {
627
- const b = await a();
628
- b ? (S(b), d({ open: !0, type: g.Token })) : i(r.mobile_devices_access_error, "error");
629
- }, w = (b) => {
630
- f(b), d({ open: !0, type: g.Edit });
631
- }, k = (b) => {
632
- f(b), d({ open: !0, type: g.Delete });
633
- }, D = () => {
634
- d({ open: !1, type: "" }), f(void 0);
564
+ const g = await a();
565
+ g ? (w(g), b({ open: !0, type: y.Token })) : n(r.mobile_devices_access_error, "error");
566
+ }, S = (g) => {
567
+ d(g), b({ open: !0, type: y.Edit });
568
+ }, A = (g) => {
569
+ d(g), b({ open: !0, type: y.Delete });
570
+ }, T = () => {
571
+ b({ open: !1, type: "" }), d(void 0);
635
572
  };
636
- return !n || !o ? /* @__PURE__ */ e(se, {}) : /* @__PURE__ */ m(
573
+ return !i || !o ? /* @__PURE__ */ e(ie, {}) : /* @__PURE__ */ c(
637
574
  p,
638
575
  {
639
576
  sx: {
@@ -642,126 +579,126 @@ const $e = ({
642
579
  gap: 24
643
580
  },
644
581
  children: [
645
- /* @__PURE__ */ m(p, { gap: 4, children: [
646
- /* @__PURE__ */ e(Z, { children: r.mobile_devices_title }),
647
- /* @__PURE__ */ e(L, { variant: "body1", children: r.mobile_devices_info })
582
+ /* @__PURE__ */ c(p, { gap: 4, children: [
583
+ /* @__PURE__ */ e(Y, { children: r.mobile_devices_title }),
584
+ /* @__PURE__ */ e(M, { variant: "body1", children: r.mobile_devices_info })
648
585
  ] }),
649
586
  t ? /* @__PURE__ */ e(
650
- Je,
587
+ We,
651
588
  {
652
- devices: l,
653
- onClickDeviceDelete: k,
654
- onClickDeviceEdit: w
589
+ devices: u,
590
+ onClickDeviceDelete: A,
591
+ onClickDeviceEdit: S
655
592
  }
656
593
  ) : /* @__PURE__ */ e(
657
- $e,
594
+ Ve,
658
595
  {
659
- devices: l,
660
- onClickDeviceDelete: k,
661
- onClickDeviceEdit: w
596
+ devices: u,
597
+ onClickDeviceDelete: A,
598
+ onClickDeviceEdit: S
662
599
  }
663
600
  ),
664
- /* @__PURE__ */ m(p, { sx: { alignItems: "center", px: 24, py: 12, gap: 4 }, children: [
601
+ /* @__PURE__ */ c(p, { sx: { alignItems: "center", px: 24, py: 12, gap: 4 }, children: [
665
602
  /* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: r.mobile_devices_access_title }),
666
- /* @__PURE__ */ e(L, { align: "center", variant: "body2", children: r.mobile_devices_access_description }),
667
- /* @__PURE__ */ e(Y, { onClick: v, variant: "text", children: r.mobile_devices_access_cta })
603
+ /* @__PURE__ */ e(M, { align: "center", variant: "body2", children: r.mobile_devices_access_description }),
604
+ /* @__PURE__ */ e(Z, { onClick: v, variant: "text", children: r.mobile_devices_access_cta })
668
605
  ] }),
669
606
  /* @__PURE__ */ e(
670
- Ye,
607
+ Ge,
671
608
  {
672
- device: h,
673
- deviceToken: y,
674
- dialogType: s.type,
675
- isOpen: s.open,
676
- onClose: D
609
+ device: _,
610
+ deviceToken: h,
611
+ dialogType: l.type,
612
+ isOpen: l.open,
613
+ onClose: T
677
614
  }
678
615
  )
679
616
  ]
680
617
  }
681
618
  );
682
619
  }), Q = C(
683
- ({ onClick: t, primaryText: r, secondaryText: n, sx: o }) => {
684
- const i = B();
685
- return /* @__PURE__ */ e(Re, { sx: { bgcolor: i.palette.background.paper }, children: /* @__PURE__ */ m(Me, { alignItems: "flex-start", onClick: t, sx: o, children: [
686
- /* @__PURE__ */ e(Be, { primary: r, secondary: n }),
687
- /* @__PURE__ */ e(Le, { children: /* @__PURE__ */ e(ne, {}) })
620
+ ({ onClick: t, primaryText: r, secondaryText: i, sx: o }) => {
621
+ const n = L();
622
+ return /* @__PURE__ */ e(Pe, { sx: { bgcolor: n.palette.background.paper }, children: /* @__PURE__ */ c(Re, { alignItems: "flex-start", onClick: t, sx: o, children: [
623
+ /* @__PURE__ */ e(Me, { primary: r, secondary: i }),
624
+ /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(Le, {}) })
688
625
  ] }) });
689
626
  }
690
- ), qe = C(() => {
691
- const { settings: t } = A(), { categories: r } = j(), { selectedRule: n, updateRuleCategory: o } = I(), [i, l] = u.useState(!1), c = () => {
692
- l(!1);
627
+ ), $e = C(() => {
628
+ const { settings: t } = k(), { categories: r } = j(), { selectedRule: i, updateRuleCategory: o } = E(), [n, u] = m.useState(!1), s = () => {
629
+ u(!1);
693
630
  }, a = () => {
694
- l(!0);
695
- }, s = (h) => r.find((f) => f.guid === h)?.name, d = async (h) => {
696
- n && n.category_guid !== h && (n.category_guid = h, await o(n)), c();
631
+ u(!0);
632
+ }, l = (_) => r.find((d) => d.guid === _)?.name, b = async (_) => {
633
+ i && i.category_guid !== _ && (i.category_guid = _, await o(i)), s();
697
634
  };
698
- return /* @__PURE__ */ m(u.Fragment, { children: [
635
+ return /* @__PURE__ */ c(m.Fragment, { children: [
699
636
  /* @__PURE__ */ e(
700
637
  Q,
701
638
  {
702
639
  onClick: a,
703
- primaryText: n?.category_guid ? s(n.category_guid) : "",
640
+ primaryText: i?.category_guid ? l(i.category_guid) : "",
704
641
  secondaryText: t.category
705
642
  }
706
643
  ),
707
644
  /* @__PURE__ */ e(
708
- Ee,
645
+ Ie,
709
646
  {
710
- initialSelected: n?.category_guid ? n.category_guid : void 0,
711
- onClose: c,
712
- onSelect: d,
713
- showDrawer: i,
647
+ initialSelected: i?.category_guid ? i.category_guid : void 0,
648
+ onClose: s,
649
+ onSelect: b,
650
+ showDrawer: n,
714
651
  title: t.select_category
715
652
  }
716
653
  )
717
654
  ] });
718
- }), Qe = C(() => {
719
- const { common: t, settings: r } = A(), { selectedRule: n, updateRulePayee: o } = I(), i = B(), [l, c] = u.useState(!1), a = n?.description ? n.description : n?.match_description, [s, d] = u.useState(a || ""), h = () => {
720
- c(!0);
721
- }, f = async () => {
722
- s !== a && n && (n.description = s, await o(n), c(!1));
655
+ }), Je = C(() => {
656
+ const { common: t, settings: r } = k(), { selectedRule: i, updateRulePayee: o } = E(), n = L(), [u, s] = m.useState(!1), a = i?.description ? i.description : i?.match_description, [l, b] = m.useState(a || ""), _ = () => {
657
+ s(!0);
658
+ }, d = async () => {
659
+ l !== a && i && (i.description = l, await o(i), s(!1));
723
660
  };
724
- return /* @__PURE__ */ m(u.Fragment, { children: [
661
+ return /* @__PURE__ */ c(m.Fragment, { children: [
725
662
  /* @__PURE__ */ e(
726
663
  Q,
727
664
  {
728
- onClick: h,
665
+ onClick: _,
729
666
  primaryText: a,
730
667
  secondaryText: r.payee
731
668
  }
732
669
  ),
733
670
  /* @__PURE__ */ e(
734
- U,
671
+ $,
735
672
  {
736
673
  copy: { title: r.edit_payee },
737
- isOpen: l,
738
- onClose: () => c(!1),
739
- onPrimaryAction: f,
740
- onSecondaryAction: () => c(!1),
674
+ isOpen: u,
675
+ onClose: () => s(!1),
676
+ onPrimaryAction: d,
677
+ onSecondaryAction: () => s(!1),
741
678
  primaryText: t.save_button,
742
679
  secondaryText: t.cancel_button,
743
680
  sx: {
744
681
  "& .MuiDialogContent-root": { pt: 0, width: 400 },
745
- path: { fill: i.palette.secondary.darker }
682
+ path: { fill: n.palette.secondary.darker }
746
683
  },
747
684
  children: /* @__PURE__ */ e(
748
- P,
685
+ I,
749
686
  {
750
- onChange: (y) => d(y.target.value),
687
+ onChange: (h) => b(h.target.value),
751
688
  sx: { width: 352 },
752
- value: s
689
+ value: l
753
690
  }
754
691
  )
755
692
  }
756
693
  )
757
694
  ] });
758
- }), Xe = C(({ onClose: t, onDelete: r, isOpen: n }) => {
759
- const { common: o, settings: i } = A();
695
+ }), Ke = C(({ onClose: t, onDelete: r, isOpen: i }) => {
696
+ const { common: o, settings: n } = k();
760
697
  return /* @__PURE__ */ e(
761
- U,
698
+ $,
762
699
  {
763
- copy: { title: i.delete_rule },
764
- isOpen: n,
700
+ copy: { title: n.delete_rule },
701
+ isOpen: i,
765
702
  onClose: t,
766
703
  onPrimaryAction: r,
767
704
  onSecondaryAction: t,
@@ -770,98 +707,98 @@ const $e = ({
770
707
  secondaryColor: "secondary",
771
708
  secondaryText: o.cancel_button,
772
709
  sx: { "& .MuiDialogContent-root": { pt: 0, width: 400 } },
773
- children: /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: i.delete_rule_confirm })
710
+ children: /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: n.delete_rule_confirm })
774
711
  }
775
712
  );
776
- }), et = C(
777
- ({ isOpen: t, onClose: r, onDelete: n }) => {
778
- const { common: o, settings: i } = A(), [l, c] = u.useState(!1);
779
- return /* @__PURE__ */ m(
780
- Oe,
713
+ }), Ye = C(
714
+ ({ isOpen: t, onClose: r, onDelete: i }) => {
715
+ const { common: o, settings: n } = k(), [u, s] = m.useState(!1);
716
+ return /* @__PURE__ */ c(
717
+ He,
781
718
  {
782
719
  hasSecondaryAction: !1,
783
720
  isOpen: t,
784
721
  onClose: r,
785
722
  onPrimaryAction: () => {
786
- c(!0);
723
+ s(!0);
787
724
  },
788
725
  primaryColor: "error",
789
726
  primaryText: o.delete_button,
790
- title: i.edit_rule,
727
+ title: n.edit_rule,
791
728
  children: [
792
- /* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(x, { bold: !0, variant: "caption", children: i.details }) }),
793
- /* @__PURE__ */ e(Qe, {}),
729
+ /* @__PURE__ */ e(Ae, { children: /* @__PURE__ */ e(x, { bold: !0, variant: "caption", children: n.details }) }),
730
+ /* @__PURE__ */ e(Je, {}),
794
731
  /* @__PURE__ */ e(K, { sx: { ml: 24 } }),
795
- /* @__PURE__ */ e(qe, {}),
732
+ /* @__PURE__ */ e($e, {}),
796
733
  /* @__PURE__ */ e(K, { sx: { ml: 24 } }),
797
734
  /* @__PURE__ */ e(
798
- Xe,
735
+ Ke,
799
736
  {
800
- isOpen: l,
801
- onClose: () => c(!1),
802
- onDelete: n
737
+ isOpen: u,
738
+ onClose: () => s(!1),
739
+ onDelete: i
803
740
  }
804
741
  )
805
742
  ]
806
743
  }
807
744
  );
808
745
  }
809
- ), tt = C(({ rule: t }) => {
810
- const { categories: r } = j(), { setSelectedGuid: n } = Ne(), { deleteTransactionRule: o, setSelectedRule: i } = I(), { isDesktop: l, isTablet: c } = F(), [a, s] = u.useState(!1), d = () => {
811
- s(!1), n(null), i(void 0);
812
- }, h = async () => {
813
- await o(), d();
814
- }, f = () => {
815
- s(!0), i(t);
816
- }, y = (S) => r.find((v) => v.guid === S)?.name;
817
- return /* @__PURE__ */ m(u.Fragment, { children: [
746
+ ), qe = C(({ rule: t }) => {
747
+ const { categories: r } = j(), { setSelectedGuid: i } = Ee(), { deleteTransactionRule: o, setSelectedRule: n } = E(), { isDesktop: u, isTablet: s } = F(), [a, l] = m.useState(!1), b = () => {
748
+ l(!1), i(null), n(void 0);
749
+ }, _ = async () => {
750
+ await o(), b();
751
+ }, d = () => {
752
+ l(!0), n(t);
753
+ }, h = (w) => r.find((v) => v.guid === w)?.name;
754
+ return /* @__PURE__ */ c(m.Fragment, { children: [
818
755
  /* @__PURE__ */ e(
819
756
  Q,
820
757
  {
821
- onClick: f,
758
+ onClick: d,
822
759
  primaryText: t.description ? t.description : t.match_description,
823
- secondaryText: t.category_guid ? y(t.category_guid) : ""
760
+ secondaryText: t.category_guid ? h(t.category_guid) : ""
824
761
  }
825
762
  ),
826
- /* @__PURE__ */ e(K, { sx: { ml: c || l ? 0 : 24 } }),
827
- /* @__PURE__ */ e(et, { isOpen: a, onClose: d, onDelete: h })
763
+ /* @__PURE__ */ e(K, { sx: { ml: s || u ? 0 : 24 } }),
764
+ /* @__PURE__ */ e(Ye, { isOpen: a, onClose: b, onDelete: _ })
828
765
  ] });
829
- }), ce = C(() => {
830
- const { settings: t } = A(), { loadTransactionRules: r, transactionRules: n } = I(), [o, i] = u.useState(!1);
831
- return le({
766
+ }), re = C(() => {
767
+ const { settings: t } = k(), { loadTransactionRules: r, transactionRules: i } = E(), [o, n] = m.useState(!1);
768
+ return ne({
832
769
  widgetName: "TransactionRulesTab",
833
770
  isLoaded: o
834
- }), u.useEffect(() => {
835
- r().finally(() => i(!0));
836
- }, []), /* @__PURE__ */ m(p, { sx: { gap: 24, py: 24 }, children: [
837
- /* @__PURE__ */ m(p, { sx: { px: 24 }, children: [
838
- /* @__PURE__ */ e(Z, { children: t.transaction_rules_label }),
839
- /* @__PURE__ */ e(L, { variant: "body1", children: t.transaction_rules_description })
771
+ }), m.useEffect(() => {
772
+ r().finally(() => n(!0));
773
+ }, []), /* @__PURE__ */ c(p, { sx: { gap: 24, py: 24 }, children: [
774
+ /* @__PURE__ */ c(p, { sx: { px: 24 }, children: [
775
+ /* @__PURE__ */ e(Y, { children: t.transaction_rules_label }),
776
+ /* @__PURE__ */ e(M, { variant: "body1", children: t.transaction_rules_description })
840
777
  ] }),
841
- /* @__PURE__ */ e(Pe, { children: n.map((l, c) => /* @__PURE__ */ e(tt, { rule: l }, c)) })
778
+ /* @__PURE__ */ e(Te, { children: i.map((u, s) => /* @__PURE__ */ e(qe, { rule: u }, s)) })
842
779
  ] });
843
- }), ot = C(({ selectedTab: t }) => {
844
- const { alert: r, setAlert: n } = I(), {
780
+ }), Qe = C(({ selectedTab: t }) => {
781
+ const { alert: r, setAlert: i } = E(), {
845
782
  config: { display_user_profile_in_settings: o }
846
783
  } = G();
847
- return /* @__PURE__ */ m(oe, { children: [
848
- t === M.Profile && /* @__PURE__ */ e(je, {}),
849
- t === M.Devices && /* @__PURE__ */ e(Ze, {}),
850
- t === M.Notifications && /* @__PURE__ */ e(J, { showPersonalDetails: !o }),
851
- t === M.TransactionRules && /* @__PURE__ */ e(ce, {}),
852
- t === M.Help && /* @__PURE__ */ e(p, { sx: { px: 24 }, children: /* @__PURE__ */ e(He, {}) }),
784
+ return /* @__PURE__ */ c(X, { children: [
785
+ t === N.Profile && /* @__PURE__ */ e(Ue, {}),
786
+ t === N.Devices && /* @__PURE__ */ e(je, {}),
787
+ t === N.Notifications && /* @__PURE__ */ e(J, { showPersonalDetails: !o }),
788
+ t === N.TransactionRules && /* @__PURE__ */ e(re, {}),
789
+ t === N.Help && /* @__PURE__ */ e(p, { sx: { px: 24 }, children: /* @__PURE__ */ e(Oe, {}) }),
853
790
  /* @__PURE__ */ e(
854
- _e,
791
+ fe,
855
792
  {
856
793
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
857
794
  autoHideDuration: 3500,
858
- onClose: () => n(""),
795
+ onClose: () => i(""),
859
796
  open: !!r.message,
860
797
  children: /* @__PURE__ */ e(
861
- fe,
798
+ he,
862
799
  {
863
800
  onClose: () => {
864
- n("");
801
+ i("");
865
802
  },
866
803
  severity: r.severity,
867
804
  variant: "filled",
@@ -872,86 +809,86 @@ const $e = ({
872
809
  )
873
810
  ] });
874
811
  });
875
- var M = /* @__PURE__ */ ((t) => (t[t.Profile = 0] = "Profile", t[t.Devices = 1] = "Devices", t[t.Notifications = 2] = "Notifications", t[t.TransactionRules = 3] = "TransactionRules", t[t.Help = 4] = "Help", t))(M || {});
876
- const Kt = C(({ onBackClick: t, onMenuClick: r, sx: n }) => {
877
- const { settings: o } = A(), { isCopyLoaded: i, isInitialized: l } = ie(), { config: c } = G(), { isMobile: a } = F(), { categoriesLoaded: s, loadCategories: d } = j();
878
- le({
812
+ var N = /* @__PURE__ */ ((t) => (t[t.Profile = 0] = "Profile", t[t.Devices = 1] = "Devices", t[t.Notifications = 2] = "Notifications", t[t.TransactionRules = 3] = "TransactionRules", t[t.Help = 4] = "Help", t))(N || {});
813
+ const Wt = C(({ onBackClick: t, onMenuClick: r, sx: i }) => {
814
+ const { settings: o } = k(), { isCopyLoaded: n, isInitialized: u } = ee(), { config: s } = G(), { isMobile: a } = F(), { categoriesLoaded: l, loadCategories: b } = j();
815
+ ne({
879
816
  widgetName: "SettingsWidget",
880
- isLoaded: l && i
881
- }), u.useEffect(() => {
882
- s || d().finally();
817
+ isLoaded: u && n
818
+ }), m.useEffect(() => {
819
+ l || b().finally();
883
820
  }, []);
884
821
  const {
885
- display_user_profile_in_settings: h,
886
- display_mobile_devices_in_settings: f,
887
- display_notification_settings_in_settings: y,
888
- display_user_transaction_rules_in_settings: S,
822
+ display_user_profile_in_settings: _,
823
+ display_mobile_devices_in_settings: d,
824
+ display_notification_settings_in_settings: h,
825
+ display_user_transaction_rules_in_settings: w,
889
826
  show_help_widget_in_master: v
890
- } = c, w = [
891
- { enabled: h, index: 0, label: o?.profile_label },
892
- { enabled: f, index: 1, label: o?.mobile_devices_label },
893
- { enabled: y, index: 2, label: o?.notifications_label },
894
- { enabled: S, index: 3, label: o?.transaction_rules_label },
827
+ } = s, S = [
828
+ { enabled: _, index: 0, label: o?.profile_label },
829
+ { enabled: d, index: 1, label: o?.mobile_devices_label },
830
+ { enabled: h, index: 2, label: o?.notifications_label },
831
+ { enabled: w, index: 3, label: o?.transaction_rules_label },
895
832
  { enabled: v, index: 4, label: o?.help_label }
896
- ], k = w.find((T) => T.enabled), [D, b] = u.useState(k ? k.index : -1);
897
- return !i || !l ? /* @__PURE__ */ e(se, {}) : /* @__PURE__ */ e(
833
+ ], A = S.find((D) => D.enabled), [T, g] = m.useState(A ? A.index : -1);
834
+ return !n || !u ? /* @__PURE__ */ e(ie, {}) : /* @__PURE__ */ e(
898
835
  q,
899
836
  {
900
837
  onBackClick: t,
901
838
  onMenuClick: r,
902
839
  showAccountFilter: !1,
903
- sx: { height: "calc(100dvh - 24px)", overflow: "auto", ...n },
840
+ sx: { height: "calc(100dvh - 24px)", overflow: "auto", ...i },
904
841
  title: o.title,
905
- children: /* @__PURE__ */ m(p, { mx: a ? 0 : 48, my: 24, children: [
842
+ children: /* @__PURE__ */ c(p, { mx: a ? 0 : 48, my: 24, children: [
906
843
  /* @__PURE__ */ e(
907
- he,
844
+ pe,
908
845
  {
909
- onChange: (T, $) => b($),
846
+ onChange: (D, U) => g(U),
910
847
  sx: { bgcolor: "background.paper" },
911
848
  textColor: "primary",
912
- value: D,
849
+ value: T,
913
850
  variant: "scrollable",
914
- children: w.map(
915
- (T) => T.enabled && /* @__PURE__ */ e(pe, { label: T.label, value: T.index }, T.index)
851
+ children: S.map(
852
+ (D) => D.enabled && /* @__PURE__ */ e(ue, { label: D.label, value: D.index }, D.index)
916
853
  )
917
854
  }
918
855
  ),
919
- /* @__PURE__ */ e(ot, { selectedTab: D })
856
+ /* @__PURE__ */ e(Qe, { selectedTab: T })
920
857
  ] })
921
858
  }
922
859
  );
923
- }), Yt = C((t) => {
924
- const { clientConfig: r } = G(), n = r?.master?.deep_link_params?.view, o = r?.master?.show_back_button;
925
- return n ? /* @__PURE__ */ m(p, { children: [
860
+ }), zt = C((t) => {
861
+ const { clientConfig: r } = G(), i = r?.master?.deep_link_params?.view, o = r?.master?.show_back_button;
862
+ return i ? /* @__PURE__ */ c(p, { children: [
926
863
  o && t.onBackClick && /* @__PURE__ */ e(
927
- N,
864
+ O,
928
865
  {
929
866
  color: "primary",
930
867
  onClick: t.onBackClick,
931
868
  sx: { p: 10, alignSelf: "flex-start" },
932
- children: /* @__PURE__ */ e(ve, { size: 24 })
869
+ children: /* @__PURE__ */ e(Be, { size: 24 })
933
870
  }
934
871
  ),
935
- /* @__PURE__ */ e(J, { view: n })
872
+ /* @__PURE__ */ e(J, { view: i })
936
873
  ] }) : /* @__PURE__ */ e(q, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(p, { my: 24, children: /* @__PURE__ */ e(J, {}) }) });
937
- }), Zt = (t) => {
938
- const { isMobile: r } = F(), { categoriesLoaded: n, loadCategories: o } = j();
939
- return u.useEffect(() => {
940
- n || o().finally();
941
- }), /* @__PURE__ */ e(q, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(p, { sx: { mx: r ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(ce, {}) }) });
874
+ }), Gt = (t) => {
875
+ const { isMobile: r } = F(), { categoriesLoaded: i, loadCategories: o } = j();
876
+ return m.useEffect(() => {
877
+ i || o().finally();
878
+ }), /* @__PURE__ */ e(q, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(p, { sx: { mx: r ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(re, {}) }) });
942
879
  };
943
880
  export {
944
- Xt as AccountNotificationProfiles,
945
- eo as BudgetNotificationProfiles,
946
- Ze as DeviceTab,
947
- to as InsightsNotificationProfiles,
881
+ Jt as AccountNotificationProfiles,
882
+ Kt as BudgetNotificationProfiles,
883
+ je as DeviceTab,
884
+ Yt as InsightsNotificationProfiles,
948
885
  J as NotificationSettings,
949
- Yt as NotificationSettingsWidget,
950
- je as ProfileTab,
951
- M as SettingsTabs,
952
- Kt as SettingsWidget,
953
- ot as SettingsWidgetContents,
954
- ce as TransactionRulesTab,
955
- Zt as TransactionRulesWidget
886
+ zt as NotificationSettingsWidget,
887
+ Ue as ProfileTab,
888
+ N as SettingsTabs,
889
+ Wt as SettingsWidget,
890
+ Qe as SettingsWidgetContents,
891
+ re as TransactionRulesTab,
892
+ Gt as TransactionRulesWidget
956
893
  };
957
894
  //# sourceMappingURL=index.es.js.map