@mx-cartographer/experiences 7.0.24-alpha.sms2 → 7.0.24

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.
@@ -2,10 +2,10 @@ import { S as Jt, a as Kt } from "../SettingsStore-B4gi6oOw.mjs";
2
2
  import { jsxs as c, Fragment as q, jsx as e } from "react/jsx-runtime";
3
3
  import h from "react";
4
4
  import { observer as D } from "mobx-react-lite";
5
- import u from "@mui/material/Stack";
5
+ import p from "@mui/material/Stack";
6
6
  import me from "@mui/material/Tab";
7
- import pe from "@mui/material/Tabs";
8
- import ue from "@mui/material/Alert";
7
+ import ue from "@mui/material/Tabs";
8
+ import pe from "@mui/material/Alert";
9
9
  import he from "@mui/material/Snackbar";
10
10
  import { getUnixTime as fe } from "date-fns/getUnixTime";
11
11
  import { AdapterDateFns as _e } from "@mui/x-date-pickers/AdapterDateFnsV3";
@@ -18,7 +18,7 @@ import I from "@mui/material/TextField";
18
18
  import { H3 as J, P as H, Text as x, Icon as M, ChevronRightIcon as xe } from "@mxenabled/mxui";
19
19
  import { V as ve, a as Ce, N as G } from "../NotificationSettings-BJFyyZYE.mjs";
20
20
  import { A as Yt, B as qt, I as Qt } from "../NotificationSettings-BJFyyZYE.mjs";
21
- import { u as w, m as $, r as A, o as De, a as Z, k as ee } from "../hooks-DkUqN6JE.mjs";
21
+ import { u as k, m as $, r as A, o as De, a as Z, k as ee } from "../hooks-DkUqN6JE.mjs";
22
22
  import { u as L } from "../useScreenSize-B6JyS_Lj.mjs";
23
23
  import { a as W } from "../Dialog-CWW597AF.mjs";
24
24
  import { formatDistanceToNow as te } from "date-fns/formatDistanceToNow";
@@ -28,8 +28,8 @@ import V from "@mui/material/IconButton";
28
28
  import { DataGridPro as Se } from "@mui/x-data-grid-pro";
29
29
  import { H as O } from "../HeaderCell-DjuifqHJ.mjs";
30
30
  import { b as N } from "../Localization-2MODESHW.mjs";
31
- import we from "@mui/material/Accordion";
32
- import ke from "@mui/material/AccordionDetails";
31
+ import ke from "@mui/material/Accordion";
32
+ import we from "@mui/material/AccordionDetails";
33
33
  import Te from "@mui/material/AccordionSummary";
34
34
  import { L as ne } from "../Loader-DUaFpDGv.mjs";
35
35
  import Ie from "@mui/material/List";
@@ -44,7 +44,7 @@ import { D as He } from "../Drawer-kEE73B87.mjs";
44
44
  import { H as Le } from "../Help-KAAMEubC.mjs";
45
45
  import { W as K } from "../WidgetContainer-CdBs9WOZ.mjs";
46
46
  const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
47
- const o = ye(), { common: n, settings: i } = w(), { isDesktop: m, isMobile: l, isSmallMobile: r, isTablet: s } = L(t), { config: g } = $(), { updateUser: _ } = A(), { user: d } = De(), [p, S] = h.useState({
47
+ const o = ye(), { common: n, settings: r } = k(), { isDesktop: m, isMobile: l, isSmallMobile: i, isTablet: s } = L(t), { config: g } = $(), { updateUser: _ } = A(), { user: d } = De(), [u, S] = h.useState({
48
48
  first_name: d.first_name,
49
49
  last_name: d.last_name,
50
50
  email: d.email,
@@ -52,7 +52,7 @@ const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
52
52
  birthday: d.birthday,
53
53
  postal_code: d.postal_code,
54
54
  credit_score: d.credit_score
55
- }), [v, k] = h.useState(!1), [C, T] = h.useState(!1), y = h.useRef(null), z = p.email && !d.email_is_verified && !v, Y = p.phone && !d.phone_is_verified && !v;
55
+ }), [v, w] = h.useState(!1), [C, T] = h.useState(!1), y = h.useRef(null), z = u.email && !d.email_is_verified && !v, Y = u.phone && !d.phone_is_verified && !v;
56
56
  h.useEffect(() => {
57
57
  if (a) {
58
58
  const f = (R) => {
@@ -63,23 +63,23 @@ const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
63
63
  };
64
64
  }
65
65
  }, [v]);
66
- const re = () => {
67
- if (p.birthday) {
68
- const f = new Date(p.birthday * 1e3), R = f.getUTCFullYear(), ce = f.getUTCMonth(), de = f.getUTCDate();
66
+ const ie = () => {
67
+ if (u.birthday) {
68
+ const f = new Date(u.birthday * 1e3), R = f.getUTCFullYear(), ce = f.getUTCMonth(), de = f.getUTCDate();
69
69
  return new Date(R, ce, de);
70
70
  }
71
71
  }, ae = async () => {
72
- await _({ ...d, ...p }), k(!1);
72
+ await _({ ...d, ...u }), w(!1);
73
73
  }, le = () => {
74
74
  T(!1), a && a();
75
75
  }, se = () => {
76
76
  T(!1);
77
77
  }, E = (f) => {
78
78
  const R = {
79
- ...p,
79
+ ...u,
80
80
  ...f
81
81
  };
82
- S(R), k(JSON.stringify({ ...d, ...R }) !== JSON.stringify(d));
82
+ S(R), w(JSON.stringify({ ...d, ...R }) !== JSON.stringify(d));
83
83
  };
84
84
  return /* @__PURE__ */ c(q, { children: [
85
85
  /* @__PURE__ */ c(
@@ -90,16 +90,16 @@ const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
90
90
  sx: {
91
91
  backgroundColor: "background.paper",
92
92
  p: 24,
93
- width: r ? 320 : s ? 680 : m ? 990 : 400,
93
+ width: i ? 320 : s ? 680 : m ? 990 : 400,
94
94
  "& .MuiTextField-root": {
95
- width: r ? 272 : s ? 328 : m ? 483 : 352
95
+ width: i ? 272 : s ? 328 : m ? 483 : 352
96
96
  }
97
97
  },
98
98
  children: [
99
- /* @__PURE__ */ e(J, { children: i.personal_details }),
100
- /* @__PURE__ */ e(H, { variant: "Body", children: i.update_information }),
99
+ /* @__PURE__ */ e(J, { children: r.personal_details }),
100
+ /* @__PURE__ */ e(H, { variant: "Body", children: r.update_information }),
101
101
  /* @__PURE__ */ c(
102
- u,
102
+ p,
103
103
  {
104
104
  direction: l ? "column" : "row",
105
105
  spacing: l ? 44 : 24,
@@ -108,40 +108,40 @@ const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
108
108
  /* @__PURE__ */ e(
109
109
  I,
110
110
  {
111
- defaultValue: p.first_name,
112
- label: i.first_name,
111
+ defaultValue: u.first_name,
112
+ label: r.first_name,
113
113
  onChange: (f) => E({ first_name: f.target.value })
114
114
  }
115
115
  ),
116
116
  /* @__PURE__ */ e(
117
117
  I,
118
118
  {
119
- defaultValue: p.last_name,
120
- label: i.last_name,
119
+ defaultValue: u.last_name,
120
+ label: r.last_name,
121
121
  onChange: (f) => E({ last_name: f.target.value })
122
122
  }
123
123
  )
124
124
  ]
125
125
  }
126
126
  ),
127
- /* @__PURE__ */ c(u, { direction: l ? "column" : "row", children: [
128
- g.display_email_edit_field_in_settings && /* @__PURE__ */ c(u, { sx: { mb: z ? 20 : 44, mr: l ? 0 : 24 }, children: [
127
+ /* @__PURE__ */ c(p, { direction: l ? "column" : "row", children: [
128
+ g.display_email_edit_field_in_settings && /* @__PURE__ */ c(p, { sx: { mb: z ? 20 : 44, mr: l ? 0 : 24 }, children: [
129
129
  /* @__PURE__ */ e(
130
130
  I,
131
131
  {
132
- defaultValue: p.email,
133
- label: i.email_address,
132
+ defaultValue: u.email,
133
+ label: r.email_address,
134
134
  onChange: (f) => E({ email: f.target.value })
135
135
  }
136
136
  ),
137
137
  z && /* @__PURE__ */ e(ve, {})
138
138
  ] }),
139
- g.display_sms_edit_field_in_settings && /* @__PURE__ */ c(u, { sx: { mb: Y ? 20 : 44 }, children: [
139
+ g.display_sms_edit_field_in_settings && /* @__PURE__ */ c(p, { sx: { mb: Y ? 20 : 44 }, children: [
140
140
  /* @__PURE__ */ e(
141
141
  I,
142
142
  {
143
- defaultValue: p.phone,
144
- label: i.mobile_number,
143
+ defaultValue: u.phone,
144
+ label: r.mobile_number,
145
145
  onChange: (f) => E({ phone: f.target.value }),
146
146
  type: "tel"
147
147
  }
@@ -149,11 +149,11 @@ const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
149
149
  Y && /* @__PURE__ */ e(Ce, {})
150
150
  ] })
151
151
  ] }),
152
- /* @__PURE__ */ c(u, { direction: l ? "column" : "row", spacing: l ? 44 : 24, sx: { mb: 44 }, children: [
152
+ /* @__PURE__ */ c(p, { direction: l ? "column" : "row", spacing: l ? 44 : 24, sx: { mb: 44 }, children: [
153
153
  /* @__PURE__ */ e(be, { dateAdapter: _e, children: /* @__PURE__ */ e(
154
154
  ge,
155
155
  {
156
- label: i.birthdate,
156
+ label: r.birthdate,
157
157
  onChange: (f) => E({ birthday: fe(f) }),
158
158
  slotProps: {
159
159
  nextIconButton: {
@@ -176,24 +176,24 @@ const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
176
176
  "&:hover": { backgroundColor: U(o.palette.primary.light, 0.1) }
177
177
  }
178
178
  },
179
- value: re()
179
+ value: ie()
180
180
  }
181
181
  ) }),
182
182
  /* @__PURE__ */ e(
183
183
  I,
184
184
  {
185
- defaultValue: p.postal_code,
186
- label: i.zip_code,
185
+ defaultValue: u.postal_code,
186
+ label: r.zip_code,
187
187
  onChange: (f) => E({ postal_code: f.target.value })
188
188
  }
189
189
  )
190
190
  ] }),
191
- /* @__PURE__ */ c(u, { children: [
191
+ /* @__PURE__ */ c(p, { children: [
192
192
  /* @__PURE__ */ e(
193
193
  I,
194
194
  {
195
- defaultValue: p.credit_score,
196
- label: i.credit_score,
195
+ defaultValue: u.credit_score,
196
+ label: r.credit_score,
197
197
  onChange: (f) => E({ credit_score: Number(f.target.value) }),
198
198
  sx: { mb: 44 }
199
199
  }
@@ -203,7 +203,7 @@ const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
203
203
  {
204
204
  disabled: !v,
205
205
  onClick: ae,
206
- sx: { width: r ? 272 : 124 },
206
+ sx: { width: i ? 272 : 124 },
207
207
  variant: "contained",
208
208
  children: n.save_button
209
209
  }
@@ -215,13 +215,13 @@ const Oe = ({ availableWidth: t, handleOnLeavClick: a }) => {
215
215
  /* @__PURE__ */ e(
216
216
  W,
217
217
  {
218
- copy: { title: i.discard_changes },
218
+ copy: { title: r.discard_changes },
219
219
  isOpen: C,
220
220
  onClose: se,
221
221
  onSecondaryAction: le,
222
- primaryText: i.keep_editing,
223
- secondaryText: i.leave,
224
- children: i.discard_changes_message
222
+ primaryText: r.keep_editing,
223
+ secondaryText: r.leave,
224
+ children: r.discard_changes_message
225
225
  }
226
226
  )
227
227
  ] });
@@ -232,19 +232,19 @@ const Fe = ({
232
232
  onClickDeviceEdit: a,
233
233
  onClickDeviceDelete: o
234
234
  }) => {
235
- const n = P(), { settings: i } = w(), m = [
235
+ const n = P(), { settings: r } = k(), m = [
236
236
  {
237
237
  field: "name",
238
- headerName: i.mobile_devices_column_name,
238
+ headerName: r.mobile_devices_column_name,
239
239
  renderHeader: O,
240
- renderCell: (r) => /* @__PURE__ */ c(u, { alignItems: "center", direction: "row", gap: 4, children: [
241
- /* @__PURE__ */ e(x, { variant: "Small", children: r.value }),
240
+ renderCell: (i) => /* @__PURE__ */ c(p, { alignItems: "center", direction: "row", gap: 4, children: [
241
+ /* @__PURE__ */ e(x, { variant: "Small", children: i.value }),
242
242
  /* @__PURE__ */ e(
243
243
  V,
244
244
  {
245
- "aria-label": i.mobile_devices_edit_label,
245
+ "aria-label": r.mobile_devices_edit_label,
246
246
  color: "secondary",
247
- onClick: () => a(r.row),
247
+ onClick: () => a(i.row),
248
248
  children: /* @__PURE__ */ e(M, { name: "edit" })
249
249
  }
250
250
  )
@@ -255,7 +255,7 @@ const Fe = ({
255
255
  },
256
256
  {
257
257
  field: "device_type",
258
- headerName: i.mobile_devices_column_type,
258
+ headerName: r.mobile_devices_column_type,
259
259
  renderHeader: O,
260
260
  sortable: !0,
261
261
  hideSortIcons: !1,
@@ -264,9 +264,9 @@ const Fe = ({
264
264
  },
265
265
  {
266
266
  field: "created_at",
267
- headerName: i.mobile_devices_column_added,
267
+ headerName: r.mobile_devices_column_added,
268
268
  renderHeader: O,
269
- valueFormatter: (r) => te(oe(r), { addSuffix: !0 }),
269
+ valueFormatter: (i) => te(oe(i), { addSuffix: !0 }),
270
270
  sortable: !0,
271
271
  hideSortIcons: !1,
272
272
  flex: 1,
@@ -276,12 +276,12 @@ const Fe = ({
276
276
  field: "delete",
277
277
  headerName: "",
278
278
  renderHeader: O,
279
- renderCell: (r) => /* @__PURE__ */ e(u, { mr: 4, children: /* @__PURE__ */ e(
279
+ renderCell: (i) => /* @__PURE__ */ e(p, { mr: 4, children: /* @__PURE__ */ e(
280
280
  V,
281
281
  {
282
- "aria-label": i.mobile_devices_delete_label,
282
+ "aria-label": r.mobile_devices_delete_label,
283
283
  color: "secondary",
284
- onClick: () => o(r.row),
284
+ onClick: () => o(i.row),
285
285
  children: /* @__PURE__ */ e(M, { name: "delete" })
286
286
  }
287
287
  ) }),
@@ -289,10 +289,10 @@ const Fe = ({
289
289
  hideSortIcons: !1,
290
290
  width: 58
291
291
  }
292
- ], l = h.useMemo(() => t.map((r) => ({
293
- id: r.guid,
294
- ...r,
295
- device_type: `${r.make} ${r.model}`
292
+ ], l = h.useMemo(() => t.map((i) => ({
293
+ id: i.guid,
294
+ ...i,
295
+ device_type: `${i.make} ${i.model}`
296
296
  })), [t]);
297
297
  return /* @__PURE__ */ e(F, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
298
298
  Se,
@@ -319,7 +319,7 @@ const Fe = ({
319
319
  p: "12px 16px"
320
320
  },
321
321
  children: /* @__PURE__ */ e(x, { color: n.palette.text.secondary, variant: "Small", children: N(
322
- i.mobile_devices_count,
322
+ r.mobile_devices_count,
323
323
  /* @__PURE__ */ e("b", { children: t.length }),
324
324
  /* @__PURE__ */ e("b", { children: t.length })
325
325
  ) })
@@ -347,15 +347,15 @@ const Fe = ({
347
347
  onClickDeviceEdit: a,
348
348
  onClickDeviceDelete: o
349
349
  }) => {
350
- const n = P(), { settings: i } = w(), [m, l] = h.useState(!1), r = (s) => (g, _) => {
350
+ const n = P(), { settings: r } = k(), [m, l] = h.useState(!1), i = (s) => (g, _) => {
351
351
  l(_ ? s : !1);
352
352
  };
353
- return /* @__PURE__ */ c(u, { mx: -28, sx: { "& .MuiAccordion-root": { mb: 0, mt: 0 } }, children: [
353
+ return /* @__PURE__ */ c(p, { mx: -28, sx: { "& .MuiAccordion-root": { mb: 0, mt: 0 } }, children: [
354
354
  t.map((s) => /* @__PURE__ */ c(
355
- we,
355
+ ke,
356
356
  {
357
357
  expanded: m === s.guid,
358
- onChange: r(s.guid),
358
+ onChange: i(s.guid),
359
359
  sx: { boxShadow: "none" },
360
360
  children: [
361
361
  /* @__PURE__ */ e(
@@ -367,7 +367,7 @@ const Fe = ({
367
367
  borderBottom: "1px solid",
368
368
  borderColor: n.palette.border.light
369
369
  },
370
- children: /* @__PURE__ */ c(u, { gap: 4, children: [
370
+ children: /* @__PURE__ */ c(p, { gap: 4, children: [
371
371
  /* @__PURE__ */ e(x, { bold: !0, variant: "Body", children: s.name }),
372
372
  /* @__PURE__ */ e(x, { color: n.palette.text.secondary, variant: "Small", children: `${s.make} ${s.model}` }),
373
373
  /* @__PURE__ */ e(x, { color: n.palette.text.secondary, variant: "Small", children: te(oe(s.created_at), { addSuffix: !0 }) })
@@ -375,12 +375,12 @@ const Fe = ({
375
375
  }
376
376
  ),
377
377
  /* @__PURE__ */ c(
378
- ke,
378
+ we,
379
379
  {
380
380
  sx: { backgroundColor: n.palette.background.default, p: "0 0 0 24px" },
381
381
  children: [
382
382
  /* @__PURE__ */ c(
383
- u,
383
+ p,
384
384
  {
385
385
  onClick: () => a(s),
386
386
  sx: {
@@ -394,13 +394,13 @@ const Fe = ({
394
394
  borderColor: n.palette.border.light
395
395
  },
396
396
  children: [
397
- /* @__PURE__ */ e(V, { "aria-label": i.mobile_devices_edit_label, color: "secondary", children: /* @__PURE__ */ e(M, { name: "edit" }) }),
398
- /* @__PURE__ */ e(x, { variant: "Body", children: i.mobile_devices_edit_label })
397
+ /* @__PURE__ */ e(V, { "aria-label": r.mobile_devices_edit_label, color: "secondary", children: /* @__PURE__ */ e(M, { name: "edit" }) }),
398
+ /* @__PURE__ */ e(x, { variant: "Body", children: r.mobile_devices_edit_label })
399
399
  ]
400
400
  }
401
401
  ),
402
402
  /* @__PURE__ */ c(
403
- u,
403
+ p,
404
404
  {
405
405
  onClick: () => o(s),
406
406
  sx: {
@@ -412,8 +412,8 @@ const Fe = ({
412
412
  cursor: "pointer"
413
413
  },
414
414
  children: [
415
- /* @__PURE__ */ e(V, { "aria-label": i.mobile_devices_delete_label, color: "secondary", children: /* @__PURE__ */ e(M, { name: "delete" }) }),
416
- /* @__PURE__ */ e(x, { variant: "Body", children: i.mobile_devices_delete_label })
415
+ /* @__PURE__ */ e(V, { "aria-label": r.mobile_devices_delete_label, color: "secondary", children: /* @__PURE__ */ e(M, { name: "delete" }) }),
416
+ /* @__PURE__ */ e(x, { variant: "Body", children: r.mobile_devices_delete_label })
417
417
  ]
418
418
  }
419
419
  )
@@ -434,7 +434,7 @@ const Fe = ({
434
434
  p: "12px 16px"
435
435
  },
436
436
  children: /* @__PURE__ */ e(x, { color: n.palette.text.secondary, variant: "Small", children: N(
437
- i.mobile_devices_count,
437
+ r.mobile_devices_count,
438
438
  /* @__PURE__ */ e("b", { children: t.length }),
439
439
  /* @__PURE__ */ e("b", { children: t.length })
440
440
  ) })
@@ -446,22 +446,22 @@ const Fe = ({
446
446
  isOpen: a,
447
447
  onClose: o,
448
448
  device: n,
449
- deviceToken: i = ""
449
+ deviceToken: r = ""
450
450
  }) => {
451
- const m = P(), { common: l, settings: r } = w(), { updateDevice: s, deleteDevice: g, setAlert: _, loadDevices: d } = A(), [p, S] = h.useState("");
451
+ const m = P(), { common: l, settings: i } = k(), { updateDevice: s, deleteDevice: g, setAlert: _, loadDevices: d } = A(), [u, S] = h.useState("");
452
452
  h.useEffect(() => {
453
453
  n && S(n.name);
454
454
  }, [n, t]);
455
455
  const v = () => {
456
456
  switch (t) {
457
457
  case b.Edit:
458
- return r.mobile_devices_edit_label;
458
+ return i.mobile_devices_edit_label;
459
459
  case b.Delete:
460
- return r.mobile_devices_delete_label;
460
+ return i.mobile_devices_delete_label;
461
461
  default:
462
462
  return "";
463
463
  }
464
- }, k = () => {
464
+ }, w = () => {
465
465
  switch (t) {
466
466
  case b.Token:
467
467
  return l.done_button;
@@ -506,17 +506,17 @@ const Fe = ({
506
506
  };
507
507
  }, T = async () => {
508
508
  if (t === b.Token && o(), t === b.Edit && n) {
509
- const y = { ...n, name: p };
510
- (await s(y)).success ? (_(r.mobile_devices_edit_success, "success"), d()) : _(
511
- N(r.mobile_devices_edit_error, n.name),
509
+ const y = { ...n, name: u };
510
+ (await s(y)).success ? (_(i.mobile_devices_edit_success, "success"), d()) : _(
511
+ N(i.mobile_devices_edit_error, n.name),
512
512
  "error"
513
513
  ), o();
514
514
  }
515
515
  t === b.Delete && n && ((await g(n.guid)).success ? (_(
516
- N(r.mobile_devices_delete_success, n.name),
516
+ N(i.mobile_devices_delete_success, n.name),
517
517
  "success"
518
518
  ), d()) : _(
519
- N(r.mobile_devices_delete_error, n.name),
519
+ N(i.mobile_devices_delete_error, n.name),
520
520
  "error"
521
521
  ), o());
522
522
  };
@@ -529,13 +529,13 @@ const Fe = ({
529
529
  onPrimaryAction: T,
530
530
  onSecondaryAction: o,
531
531
  primaryColor: t === b.Delete ? "error" : void 0,
532
- primaryText: k(),
532
+ primaryText: w(),
533
533
  secondaryText: t === b.Token ? l.back : l.cancel_button,
534
534
  sx: C(),
535
535
  children: [
536
- t === b.Token && /* @__PURE__ */ c(u, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
537
- /* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "Body", children: r.mobile_devices_access_label }),
538
- /* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: r.mobile_devices_access_info_1 }),
536
+ t === b.Token && /* @__PURE__ */ c(p, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
537
+ /* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "Body", children: i.mobile_devices_access_label }),
538
+ /* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: i.mobile_devices_access_info_1 }),
539
539
  /* @__PURE__ */ e(
540
540
  x,
541
541
  {
@@ -545,25 +545,25 @@ const Fe = ({
545
545
  p: "16px 32px"
546
546
  },
547
547
  variant: "H1",
548
- children: i
548
+ children: r
549
549
  }
550
550
  ),
551
- /* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: r.mobile_devices_access_info_2 })
551
+ /* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: i.mobile_devices_access_info_2 })
552
552
  ] }),
553
- t === b.Edit && /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(I, { onChange: (y) => S(y.target.value), value: p }) }),
554
- t === b.Delete && /* @__PURE__ */ e(H, { children: r.mobile_devices_delete_info })
553
+ t === b.Edit && /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(I, { onChange: (y) => S(y.target.value), value: u }) }),
554
+ t === b.Delete && /* @__PURE__ */ e(H, { children: i.mobile_devices_delete_info })
555
555
  ]
556
556
  }
557
557
  );
558
558
  }, We = D($e), ze = D(() => {
559
- const { isMobile: t } = L(), { settings: a } = w(), { isCopyLoaded: o, isInitialized: n } = Z(), { setAlert: i, devices: m, loadDevices: l, generateDeviceToken: r } = A(), [s, g] = h.useState({ open: !1, type: "" }), [_, d] = h.useState(), [p, S] = h.useState("");
559
+ const { isMobile: t } = L(), { settings: a } = k(), { isCopyLoaded: o, isInitialized: n } = Z(), { setAlert: r, devices: m, loadDevices: l, generateDeviceToken: i } = A(), [s, g] = h.useState({ open: !1, type: "" }), [_, d] = h.useState(), [u, S] = h.useState("");
560
560
  h.useEffect(() => {
561
561
  n && l();
562
562
  }, [n]);
563
563
  const v = async () => {
564
- const y = await r();
565
- y ? (S(y), g({ open: !0, type: b.Token })) : i(a.mobile_devices_access_error, "error");
566
- }, k = (y) => {
564
+ const y = await i();
565
+ y ? (S(y), g({ open: !0, type: b.Token })) : r(a.mobile_devices_access_error, "error");
566
+ }, w = (y) => {
567
567
  d(y), g({ open: !0, type: b.Edit });
568
568
  }, C = (y) => {
569
569
  d(y), g({ open: !0, type: b.Delete });
@@ -571,7 +571,7 @@ const Fe = ({
571
571
  g({ open: !1, type: "" }), d(void 0);
572
572
  };
573
573
  return !o || !n ? /* @__PURE__ */ e(ne, {}) : /* @__PURE__ */ c(
574
- u,
574
+ p,
575
575
  {
576
576
  sx: {
577
577
  backgroundColor: "background.paper",
@@ -579,7 +579,7 @@ const Fe = ({
579
579
  gap: 24
580
580
  },
581
581
  children: [
582
- /* @__PURE__ */ c(u, { gap: 4, children: [
582
+ /* @__PURE__ */ c(p, { gap: 4, children: [
583
583
  /* @__PURE__ */ e(J, { children: a.mobile_devices_title }),
584
584
  /* @__PURE__ */ e(H, { variant: "Body", children: a.mobile_devices_info })
585
585
  ] }),
@@ -588,17 +588,17 @@ const Fe = ({
588
588
  {
589
589
  devices: m,
590
590
  onClickDeviceDelete: C,
591
- onClickDeviceEdit: k
591
+ onClickDeviceEdit: w
592
592
  }
593
593
  ) : /* @__PURE__ */ e(
594
594
  Fe,
595
595
  {
596
596
  devices: m,
597
597
  onClickDeviceDelete: C,
598
- onClickDeviceEdit: k
598
+ onClickDeviceEdit: w
599
599
  }
600
600
  ),
601
- /* @__PURE__ */ c(u, { sx: { alignItems: "center", px: 24, py: 12, gap: 4 }, children: [
601
+ /* @__PURE__ */ c(p, { sx: { alignItems: "center", px: 24, py: 12, gap: 4 }, children: [
602
602
  /* @__PURE__ */ e(x, { bold: !0, variant: "Body", children: a.mobile_devices_access_title }),
603
603
  /* @__PURE__ */ e(H, { align: "center", variant: "Small", children: a.mobile_devices_access_description }),
604
604
  /* @__PURE__ */ e(Q, { onClick: v, variant: "text", children: a.mobile_devices_access_cta })
@@ -607,7 +607,7 @@ const Fe = ({
607
607
  We,
608
608
  {
609
609
  device: _,
610
- deviceToken: p,
610
+ deviceToken: u,
611
611
  dialogType: s.type,
612
612
  isOpen: s.open,
613
613
  onClose: T
@@ -618,16 +618,16 @@ const Fe = ({
618
618
  );
619
619
  }), Ge = ze, X = D(
620
620
  ({ onClick: t, primaryText: a, secondaryText: o, sx: n }) => {
621
- const i = P();
622
- return /* @__PURE__ */ e(Re, { sx: { bgcolor: i.palette.background.paper }, children: /* @__PURE__ */ c(Be, { alignItems: "flex-start", onClick: t, sx: n, children: [
621
+ const r = P();
622
+ return /* @__PURE__ */ e(Re, { sx: { bgcolor: r.palette.background.paper }, children: /* @__PURE__ */ c(Be, { alignItems: "flex-start", onClick: t, sx: n, children: [
623
623
  /* @__PURE__ */ e(Ne, { primary: a, secondary: o }),
624
624
  /* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(xe, {}) })
625
625
  ] }) });
626
626
  }
627
627
  ), je = D(() => {
628
- const { settings: t } = w(), { categories: a } = ee(), { selectedRule: o, updateRuleCategory: n } = A(), [i, m] = h.useState(!1), l = () => {
628
+ const { settings: t } = k(), { categories: a } = ee(), { selectedRule: o, updateRuleCategory: n } = A(), [r, m] = h.useState(!1), l = () => {
629
629
  m(!1);
630
- }, r = () => {
630
+ }, i = () => {
631
631
  m(!0);
632
632
  }, s = (_) => a.find((d) => d.guid === _)?.name, g = async (_) => {
633
633
  o && o.category_guid !== _ && (o.category_guid = _, await n(o)), l();
@@ -636,7 +636,7 @@ const Fe = ({
636
636
  /* @__PURE__ */ e(
637
637
  X,
638
638
  {
639
- onClick: r,
639
+ onClick: i,
640
640
  primaryText: o?.category_guid ? s(o.category_guid) : "",
641
641
  secondaryText: t.category
642
642
  }
@@ -647,23 +647,23 @@ const Fe = ({
647
647
  initialSelected: o?.category_guid ? o.category_guid : void 0,
648
648
  onClose: l,
649
649
  onSelect: g,
650
- showDrawer: i,
650
+ showDrawer: r,
651
651
  title: t.select_category
652
652
  }
653
653
  )
654
654
  ] });
655
655
  }), Je = D(() => {
656
- const { common: t, settings: a } = w(), { selectedRule: o, updateRulePayee: n } = A(), i = P(), [m, l] = h.useState(!1), r = o?.description ? o.description : o?.match_description, [s, g] = h.useState(r || ""), _ = () => {
656
+ const { common: t, settings: a } = k(), { selectedRule: o, updateRulePayee: n } = A(), r = P(), [m, l] = h.useState(!1), i = o?.description ? o.description : o?.match_description, [s, g] = h.useState(i || ""), _ = () => {
657
657
  l(!0);
658
658
  }, d = async () => {
659
- s !== r && o && (o.description = s, await n(o), l(!1));
659
+ s !== i && o && (o.description = s, await n(o), l(!1));
660
660
  };
661
661
  return /* @__PURE__ */ c(h.Fragment, { children: [
662
662
  /* @__PURE__ */ e(
663
663
  X,
664
664
  {
665
665
  onClick: _,
666
- primaryText: r,
666
+ primaryText: i,
667
667
  secondaryText: a.payee
668
668
  }
669
669
  ),
@@ -679,12 +679,12 @@ const Fe = ({
679
679
  secondaryText: t.cancel_button,
680
680
  sx: {
681
681
  "& .MuiDialogContent-root": { pt: 0, width: 400 },
682
- path: { fill: i.palette.secondary.darker }
682
+ path: { fill: r.palette.secondary.darker }
683
683
  },
684
684
  children: /* @__PURE__ */ e(
685
685
  I,
686
686
  {
687
- onChange: (p) => g(p.target.value),
687
+ onChange: (u) => g(u.target.value),
688
688
  sx: { width: 352 },
689
689
  value: s
690
690
  }
@@ -693,11 +693,11 @@ const Fe = ({
693
693
  )
694
694
  ] });
695
695
  }), Ke = D(({ onClose: t, onDelete: a, isOpen: o }) => {
696
- const { common: n, settings: i } = w(), m = P();
696
+ const { common: n, settings: r } = k(), m = P();
697
697
  return /* @__PURE__ */ e(
698
698
  W,
699
699
  {
700
- copy: { title: i.delete_rule },
700
+ copy: { title: r.delete_rule },
701
701
  isOpen: o,
702
702
  onClose: t,
703
703
  onPrimaryAction: a,
@@ -713,12 +713,12 @@ const Fe = ({
713
713
  "& .MuiDialogContent-root": { pt: 0, width: 400 },
714
714
  path: { fill: m.palette.secondary.darker }
715
715
  },
716
- children: /* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: i.delete_rule_confirm })
716
+ children: /* @__PURE__ */ e(x, { truncate: !1, variant: "Small", children: r.delete_rule_confirm })
717
717
  }
718
718
  );
719
719
  }), Xe = D(
720
720
  ({ isOpen: t, onClose: a, onDelete: o }) => {
721
- const { common: n, settings: i } = w(), m = P(), [l, r] = h.useState(!1);
721
+ const { common: n, settings: r } = k(), m = P(), [l, i] = h.useState(!1);
722
722
  return /* @__PURE__ */ c(
723
723
  He,
724
724
  {
@@ -726,16 +726,16 @@ const Fe = ({
726
726
  isOpen: t,
727
727
  onClose: a,
728
728
  onPrimaryAction: () => {
729
- r(!0);
729
+ i(!0);
730
730
  },
731
731
  primaryColor: "error",
732
732
  primaryText: n.delete_button,
733
733
  sx: {
734
734
  "& .MuiToolbar-root": { borderTop: `1px solid ${m.palette.border.light}` }
735
735
  },
736
- title: i.edit_rule,
736
+ title: r.edit_rule,
737
737
  children: [
738
- /* @__PURE__ */ e(Ae, { children: /* @__PURE__ */ e(x, { bold: !0, variant: "XSmall", children: i.details }) }),
738
+ /* @__PURE__ */ e(Ae, { children: /* @__PURE__ */ e(x, { bold: !0, variant: "XSmall", children: r.details }) }),
739
739
  /* @__PURE__ */ e(Je, {}),
740
740
  /* @__PURE__ */ e(j, { sx: { ml: 24 } }),
741
741
  /* @__PURE__ */ e(je, {}),
@@ -744,7 +744,7 @@ const Fe = ({
744
744
  Ke,
745
745
  {
746
746
  isOpen: l,
747
- onClose: () => r(!1),
747
+ onClose: () => i(!1),
748
748
  onDelete: o
749
749
  }
750
750
  )
@@ -753,37 +753,37 @@ const Fe = ({
753
753
  );
754
754
  }
755
755
  ), Ye = D(({ rule: t }) => {
756
- const { categories: a } = ee(), { setSelectedGuid: o } = Pe(), { deleteTransactionRule: n, setSelectedRule: i } = A(), { isDesktop: m, isTablet: l } = L(), [r, s] = h.useState(!1), g = () => {
757
- s(!1), o(null), i(void 0);
756
+ const { categories: a } = ee(), { setSelectedGuid: o } = Pe(), { deleteTransactionRule: n, setSelectedRule: r } = A(), { isDesktop: m, isTablet: l } = L(), [i, s] = h.useState(!1), g = () => {
757
+ s(!1), o(null), r(void 0);
758
758
  }, _ = async () => {
759
759
  await n(), g();
760
760
  }, d = () => {
761
- s(!0), i(t);
762
- }, p = (S) => a.find((v) => v.guid === S)?.name;
761
+ s(!0), r(t);
762
+ }, u = (S) => a.find((v) => v.guid === S)?.name;
763
763
  return /* @__PURE__ */ c(h.Fragment, { children: [
764
764
  /* @__PURE__ */ e(
765
765
  X,
766
766
  {
767
767
  onClick: d,
768
768
  primaryText: t.description ? t.description : t.match_description,
769
- secondaryText: t.category_guid ? p(t.category_guid) : ""
769
+ secondaryText: t.category_guid ? u(t.category_guid) : ""
770
770
  }
771
771
  ),
772
772
  /* @__PURE__ */ e(j, { sx: { ml: l || m ? 0 : 24 } }),
773
- /* @__PURE__ */ e(Xe, { isOpen: r, onClose: g, onDelete: _ })
773
+ /* @__PURE__ */ e(Xe, { isOpen: i, onClose: g, onDelete: _ })
774
774
  ] });
775
775
  }), qe = D(() => {
776
- const { settings: t } = w(), { loadTransactionRules: a, transactionRules: o } = A();
776
+ const { settings: t } = k(), { loadTransactionRules: a, transactionRules: o } = A();
777
777
  return h.useEffect(() => {
778
778
  a().finally();
779
- }, []), /* @__PURE__ */ c(u, { sx: { gap: 24, py: 24 }, children: [
780
- /* @__PURE__ */ c(u, { sx: { px: 24 }, children: [
779
+ }, []), /* @__PURE__ */ c(p, { sx: { gap: 24, py: 24 }, children: [
780
+ /* @__PURE__ */ c(p, { sx: { px: 24 }, children: [
781
781
  /* @__PURE__ */ e(J, { children: t.transaction_rules_label }),
782
782
  /* @__PURE__ */ e(H, { variant: "Body", children: t.transaction_rules_description })
783
783
  ] }),
784
- /* @__PURE__ */ e(Ie, { children: o.map((n, i) => /* @__PURE__ */ e(Ye, { rule: n }, i)) })
784
+ /* @__PURE__ */ e(Ie, { children: o.map((n, r) => /* @__PURE__ */ e(Ye, { rule: n }, r)) })
785
785
  ] });
786
- }), ie = qe, Qe = D(({ selectedTab: t }) => {
786
+ }), re = qe, Qe = D(({ selectedTab: t }) => {
787
787
  const { alert: a, setAlert: o } = A(), {
788
788
  config: { display_user_profile_in_settings: n }
789
789
  } = $();
@@ -791,8 +791,8 @@ const Fe = ({
791
791
  t === B.Profile && /* @__PURE__ */ e(Ue, {}),
792
792
  t === B.Devices && /* @__PURE__ */ e(Ge, {}),
793
793
  t === B.Notifications && /* @__PURE__ */ e(G, { showPersonalDetails: !n }),
794
- t === B.TransactionRules && /* @__PURE__ */ e(ie, {}),
795
- t === B.Help && /* @__PURE__ */ e(u, { sx: { px: 24 }, children: /* @__PURE__ */ e(Le, {}) }),
794
+ t === B.TransactionRules && /* @__PURE__ */ e(re, {}),
795
+ t === B.Help && /* @__PURE__ */ e(p, { sx: { px: 24 }, children: /* @__PURE__ */ e(Le, {}) }),
796
796
  /* @__PURE__ */ e(
797
797
  he,
798
798
  {
@@ -801,7 +801,7 @@ const Fe = ({
801
801
  onClose: () => o(""),
802
802
  open: !!a.message,
803
803
  children: /* @__PURE__ */ e(
804
- ue,
804
+ pe,
805
805
  {
806
806
  onClose: () => {
807
807
  o("");
@@ -817,35 +817,35 @@ const Fe = ({
817
817
  });
818
818
  var B = /* @__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))(B || {});
819
819
  const $t = D(({ onBackClick: t, sx: a }) => {
820
- const { settings: o } = w(), { isCopyLoaded: n, isInitialized: i } = Z(), { config: m } = $(), { isMobile: l } = L(), {
821
- display_user_profile_in_settings: r,
820
+ const { settings: o } = k(), { isCopyLoaded: n, isInitialized: r } = Z(), { config: m } = $(), { isMobile: l } = L(), {
821
+ display_user_profile_in_settings: i,
822
822
  display_mobile_devices_in_settings: s,
823
823
  display_notification_settings_in_settings: g,
824
824
  display_user_transaction_rules_in_settings: _,
825
825
  show_help_widget_in_master: d
826
- } = m, p = [
827
- { enabled: r, index: 0, label: o?.profile_label },
826
+ } = m, u = [
827
+ { enabled: i, index: 0, label: o?.profile_label },
828
828
  { enabled: s, index: 1, label: o?.mobile_devices_label },
829
829
  { enabled: g, index: 2, label: o?.notifications_label },
830
830
  { enabled: _, index: 3, label: o?.transaction_rules_label },
831
831
  { enabled: d, index: 4, label: o?.help_label }
832
- ], S = p.find((C) => C.enabled), [v, k] = h.useState(S ? S.index : -1);
833
- return !n || !i ? /* @__PURE__ */ e(ne, {}) : /* @__PURE__ */ e(
832
+ ], S = u.find((C) => C.enabled), [v, w] = h.useState(S ? S.index : -1);
833
+ return !n || !r ? /* @__PURE__ */ e(ne, {}) : /* @__PURE__ */ e(
834
834
  K,
835
835
  {
836
836
  onBackClick: t,
837
837
  sx: { height: "calc(100dvh - 24px)", overflow: "auto", ...a },
838
838
  title: o.title,
839
- children: /* @__PURE__ */ c(u, { mx: l ? 0 : 48, my: 24, children: [
839
+ children: /* @__PURE__ */ c(p, { mx: l ? 0 : 48, my: 24, children: [
840
840
  /* @__PURE__ */ e(
841
- pe,
841
+ ue,
842
842
  {
843
- onChange: (C, T) => k(T),
843
+ onChange: (C, T) => w(T),
844
844
  sx: { bgcolor: "background.paper" },
845
845
  textColor: "primary",
846
846
  value: v,
847
847
  variant: "scrollable",
848
- children: p.map(
848
+ children: u.map(
849
849
  (C) => C.enabled && /* @__PURE__ */ e(me, { label: C.label, value: C.index }, C.index)
850
850
  )
851
851
  }
@@ -855,13 +855,11 @@ const $t = D(({ onBackClick: t, sx: a }) => {
855
855
  }
856
856
  );
857
857
  }), Wt = D((t) => {
858
- const { clientConfig: a } = $();
859
- console.log("clientConfig", a);
860
- const o = a?.master?.deep_link_params?.view || window.app?.clientConfig?.master?.deep_link_params?.view;
861
- return console.log("view", o), o ? /* @__PURE__ */ e(G, { view: o }) : /* @__PURE__ */ e(K, { ...t, children: /* @__PURE__ */ e(u, { my: 24, children: /* @__PURE__ */ e(G, {}) }) });
858
+ const { clientConfig: a } = $(), o = a?.master?.deep_link_params?.view;
859
+ return o ? /* @__PURE__ */ e(G, { view: o }) : /* @__PURE__ */ e(K, { ...t, children: /* @__PURE__ */ e(p, { my: 24, children: /* @__PURE__ */ e(G, {}) }) });
862
860
  }), zt = (t) => {
863
861
  const { isMobile: a } = L();
864
- return /* @__PURE__ */ e(K, { ...t, children: /* @__PURE__ */ e(u, { sx: { mx: a ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(ie, {}) }) });
862
+ return /* @__PURE__ */ e(K, { ...t, children: /* @__PURE__ */ e(p, { sx: { mx: a ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(re, {}) }) });
865
863
  };
866
864
  export {
867
865
  Yt as AccountNotificationProfiles,
@@ -876,6 +874,6 @@ export {
876
874
  B as SettingsTabs,
877
875
  $t as SettingsWidget,
878
876
  Qe as SettingsWidgetContents,
879
- ie as TransactionRulesTab,
877
+ re as TransactionRulesTab,
880
878
  zt as TransactionRulesWidget
881
879
  };