@australiangreens/ag-internal-components 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -1,26 +1,26 @@
1
- var Lt = Object.defineProperty, _t = Object.defineProperties;
1
+ var _t = Object.defineProperty, Lt = Object.defineProperties;
2
2
  var Mt = Object.getOwnPropertyDescriptors;
3
3
  var oe = Object.getOwnPropertySymbols;
4
- var Oe = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable;
5
- var he = (e, t, n) => t in e ? Lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, a = (e, t) => {
4
+ var Ee = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
5
+ var he = (e, t, n) => t in e ? _t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, a = (e, t) => {
6
6
  for (var n in t || (t = {}))
7
- Oe.call(t, n) && he(e, n, t[n]);
7
+ Ee.call(t, n) && he(e, n, t[n]);
8
8
  if (oe)
9
9
  for (var n of oe(t))
10
- Be.call(t, n) && he(e, n, t[n]);
10
+ Oe.call(t, n) && he(e, n, t[n]);
11
11
  return e;
12
- }, D = (e, t) => _t(e, Mt(t));
13
- var Ee = (e, t) => {
12
+ }, I = (e, t) => Lt(e, Mt(t));
13
+ var Be = (e, t) => {
14
14
  var n = {};
15
15
  for (var i in e)
16
- Oe.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
16
+ Ee.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
17
17
  if (e != null && oe)
18
18
  for (var i of oe(e))
19
- t.indexOf(i) < 0 && Be.call(e, i) && (n[i] = e[i]);
19
+ t.indexOf(i) < 0 && Oe.call(e, i) && (n[i] = e[i]);
20
20
  return n;
21
21
  };
22
22
  var Fe = (e, t, n) => (he(e, typeof t != "symbol" ? t + "" : t, n), n);
23
- var L = (e, t, n) => new Promise((i, r) => {
23
+ var _ = (e, t, n) => new Promise((i, r) => {
24
24
  var s = (l) => {
25
25
  try {
26
26
  c(n.next(l));
@@ -36,9 +36,9 @@ var L = (e, t, n) => new Promise((i, r) => {
36
36
  }, c = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(s, d);
37
37
  c((n = n.apply(e, t)).next());
38
38
  });
39
- import { jsxs as u, Fragment as P, jsx as o } from "react/jsx-runtime";
39
+ import { jsxs as u, Fragment as N, jsx as o } from "react/jsx-runtime";
40
40
  import { useState as F, createContext as Je, useCallback as ae, useContext as Ze, useEffect as K, createElement as xe, useMemo as Rt, useRef as ge } from "react";
41
- import { Typography as T, Button as J, Paper as je, Box as y, Drawer as we, styled as Ae, IconButton as Z, Container as et, useTheme as se, useMediaQuery as Ht, Collapse as Wt, Avatar as Pe, Fade as zt, Skeleton as Ne, Toolbar as Ut, Divider as Le, CssBaseline as Gt, Dialog as tt, LinearProgress as nt, DialogTitle as ot, DialogContent as it, DialogActions as rt, Autocomplete as Se, TextField as be, CircularProgress as De, Chip as Vt, Tooltip as qt, Stack as Xt, Snackbar as Qt, Alert as Yt, FormHelperText as Kt } from "@mui/material";
41
+ import { Typography as T, Button as J, Paper as je, Box as k, Drawer as we, styled as Ae, IconButton as Z, Container as et, useTheme as se, useMediaQuery as Ht, Collapse as Wt, Avatar as Ne, Fade as Ut, Skeleton as Pe, Toolbar as zt, Divider as _e, CssBaseline as Gt, Dialog as tt, LinearProgress as nt, DialogTitle as ot, DialogContent as it, DialogActions as rt, Autocomplete as be, TextField as Se, CircularProgress as Ie, Chip as Vt, Tooltip as qt, Stack as Xt, Snackbar as Qt, Alert as Yt, FormHelperText as Kt } from "@mui/material";
42
42
  import Jt from "@mui/material/CssBaseline";
43
43
  import { styled as W, createTheme as at, alpha as fe } from "@mui/material/styles";
44
44
  import { AgError as Zt } from "@australiangreens/ag-error";
@@ -46,7 +46,7 @@ import { createHelper as Q } from "souvlaki";
46
46
  import { BrowserRouter as jt } from "react-router-dom";
47
47
  import st from "@mui/material/List";
48
48
  import { ArrowForward as lt, ArrowBack as ct, ViewHeadline as en, Cancel as tn, ArrowDropDown as nn } from "@mui/icons-material";
49
- import { atom as R, useSetAtom as dt, useAtomValue as _e, useAtom as V, getDefaultStore as on, Provider as ut } from "jotai";
49
+ import { atom as R, useSetAtom as dt, useAtomValue as Le, useAtom as V, getDefaultStore as on, Provider as ut } from "jotai";
50
50
  import { useHydrateAtoms as pt } from "jotai/utils";
51
51
  import Me from "react-avatar";
52
52
  import rn from "autosuggest-highlight/match";
@@ -55,9 +55,9 @@ import { useQuery as sn, QueryClient as ln, QueryClientProvider as cn } from "@t
55
55
  import { useAuth0 as ht } from "@auth0/auth0-react";
56
56
  import { Buffer as dn } from "buffer";
57
57
  import un from "@mui/material/Skeleton";
58
- function Oo({ text: e }) {
58
+ function Eo({ text: e }) {
59
59
  const [t, n] = F(0);
60
- return /* @__PURE__ */ u(P, { children: [
60
+ return /* @__PURE__ */ u(N, { children: [
61
61
  /* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
62
62
  /* @__PURE__ */ o(T, { variant: "caption", display: "block", children: /* @__PURE__ */ o("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
63
63
  /* @__PURE__ */ o(
@@ -79,15 +79,15 @@ function Oo({ text: e }) {
79
79
  ] })
80
80
  ] });
81
81
  }
82
- const gt = 330, ft = 73, U = "Navbar", q = {
83
- root: `${U}-root`,
84
- menuButton: `${U}-menuButton`,
85
- hide: `${U}-hide`,
86
- content: `${U}-content`,
87
- userInfoHolder: `${U}-userInfoHolder`,
88
- settings: `${U}-settings`,
89
- pieChartIcon: `${U}-pieChartIcon`
90
- }, pn = W(y, {
82
+ const gt = 330, ft = 73, z = "Navbar", q = {
83
+ root: `${z}-root`,
84
+ menuButton: `${z}-menuButton`,
85
+ hide: `${z}-hide`,
86
+ content: `${z}-content`,
87
+ userInfoHolder: `${z}-userInfoHolder`,
88
+ settings: `${z}-settings`,
89
+ pieChartIcon: `${z}-pieChartIcon`
90
+ }, pn = W(k, {
91
91
  name: "NavBar"
92
92
  })(({ theme: e }) => ({
93
93
  [`&.${q.root}`]: {
@@ -133,9 +133,9 @@ const gt = 330, ft = 73, U = "Navbar", q = {
133
133
  }), !t && {
134
134
  "& .MuiDrawer-paper": gn()
135
135
  }));
136
- class ke extends Zt {
136
+ class De extends Zt {
137
137
  }
138
- Fe(ke, "errorName", "ContextError");
138
+ Fe(De, "errorName", "ContextError");
139
139
  const Ct = Je(null), mn = {}, Cn = {}, xn = ({
140
140
  overrideState: e = mn,
141
141
  overrideActions: t = Cn,
@@ -144,7 +144,7 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
144
144
  const [{ open: i }, r] = F({ open: !0 }), s = ae((l) => {
145
145
  r({ open: l });
146
146
  }, []), d = ae(() => {
147
- r((l) => D(a({}, l), { open: !l.open }));
147
+ r((l) => I(a({}, l), { open: !l.open }));
148
148
  }, []), c = a(a({
149
149
  open: i,
150
150
  setOpen: s,
@@ -154,13 +154,13 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
154
154
  }, vn = () => {
155
155
  const e = Ze(Ct);
156
156
  if (e === null)
157
- throw new ke("Error: Tried to useNavBar outside of a <NavBarProvider>");
157
+ throw new De("Error: Tried to useNavBar outside of a <NavBarProvider>");
158
158
  return e;
159
159
  }, wn = (e = {}) => a({
160
160
  open: !0
161
- }, e), Bo = Q(
161
+ }, e), Oo = Q(
162
162
  (e = wn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(xn, { overrideState: e, overrideActions: t, children: n })
163
- ), Eo = Q(() => ({ children: e }) => /* @__PURE__ */ o(jt, { children: e })), Re = 7, Fo = W(st)(({ theme: e }) => ({
163
+ ), Bo = Q(() => ({ children: e }) => /* @__PURE__ */ o(jt, { children: e })), Re = 7, Fo = W(st)(({ theme: e }) => ({
164
164
  backgroundColor: "black",
165
165
  color: "white",
166
166
  "& .MuiListItem-root": {
@@ -198,7 +198,7 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
198
198
  // '&.Mui-selected.Mui-focusVisible:hover': {
199
199
  // },
200
200
  }
201
- })), He = 7, Po = W(st)(({ theme: e }) => ({
201
+ })), He = 7, No = W(st)(({ theme: e }) => ({
202
202
  backgroundColor: "#e8e8e8",
203
203
  color: "inherit",
204
204
  "& .MuiListItem-root": {
@@ -237,7 +237,7 @@ const Ct = Je(null), mn = {}, Cn = {}, xn = ({
237
237
  // },
238
238
  }
239
239
  }));
240
- function No({
240
+ function Po({
241
241
  "data-testid": e,
242
242
  children: t
243
243
  }) {
@@ -256,32 +256,32 @@ function No({
256
256
  )
257
257
  ] });
258
258
  }
259
- const An = 24, Sn = 64, G = "TopBar", E = {
259
+ const An = 24, bn = 64, G = "TopBar", B = {
260
260
  topStripe: `${G}-topStripe`,
261
261
  titleBar: `${G}-titleBar`,
262
262
  titleSlider: `${G}-titleSlider`,
263
263
  titleText: `${G}-titleText`,
264
264
  leftPanelButton: `${G}-leftPanelButton`,
265
265
  rightPanelButton: `${G}-leftPanelButton`
266
- }, bn = Ae("div", {
266
+ }, Sn = Ae("div", {
267
267
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
268
268
  name: G
269
269
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
270
270
  var i, r;
271
271
  return {
272
272
  width: "100%",
273
- [`& .${E.topStripe}`]: {
273
+ [`& .${B.topStripe}`]: {
274
274
  width: "100%",
275
275
  height: `${An}px`,
276
276
  backgroundColor: e.palette.primary.main
277
277
  },
278
- [`& .${E.titleBar}`]: {
278
+ [`& .${B.titleBar}`]: {
279
279
  backgroundColor: e.palette.primary.light,
280
- height: `${Sn}px`,
280
+ height: `${bn}px`,
281
281
  padding: e.spacing(0, 3),
282
282
  width: "100%"
283
283
  },
284
- [`& .${E.titleSlider}`]: a(a({
284
+ [`& .${B.titleSlider}`]: a(a({
285
285
  height: "100%",
286
286
  display: "flex",
287
287
  alignItems: "center",
@@ -290,14 +290,14 @@ const An = 24, Sn = 64, G = "TopBar", E = {
290
290
  easing: e.transitions.easing.sharp,
291
291
  duration: e.transitions.duration.leavingScreen
292
292
  }),
293
- [`& .${E.leftPanelButton}`]: {
293
+ [`& .${B.leftPanelButton}`]: {
294
294
  marginRight: e.spacing(2),
295
295
  flexGrow: 0
296
296
  },
297
- [`& .${E.titleText}`]: {
297
+ [`& .${B.titleText}`]: {
298
298
  flexGrow: 1
299
299
  },
300
- [`& .${E.rightPanelButton}`]: {
300
+ [`& .${B.rightPanelButton}`]: {
301
301
  flexGrow: 0
302
302
  }
303
303
  }, (t == null ? void 0 : t.open) && {
@@ -315,19 +315,19 @@ const An = 24, Sn = 64, G = "TopBar", E = {
315
315
  })
316
316
  };
317
317
  });
318
- function Dn({
318
+ function In({
319
319
  titleText: e = "",
320
320
  leftPanel: t,
321
321
  rightPanel: n,
322
322
  "data-testid": i
323
323
  }) {
324
- return /* @__PURE__ */ u(bn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
325
- /* @__PURE__ */ o("div", { className: E.topStripe }),
326
- /* @__PURE__ */ o("div", { className: E.titleBar, children: /* @__PURE__ */ u(y, { className: E.titleSlider, children: [
324
+ return /* @__PURE__ */ u(Sn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
325
+ /* @__PURE__ */ o("div", { className: B.topStripe }),
326
+ /* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */ u(k, { className: B.titleSlider, children: [
327
327
  t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ u(
328
328
  Z,
329
329
  {
330
- className: E.leftPanelButton,
330
+ className: B.leftPanelButton,
331
331
  color: "inherit",
332
332
  "aria-label": "Open left side panel",
333
333
  onClick: t == null ? void 0 : t.onOpen,
@@ -339,11 +339,11 @@ function Dn({
339
339
  ]
340
340
  }
341
341
  ),
342
- /* @__PURE__ */ o(T, { className: E.titleText, variant: "h6", noWrap: !0, children: e }),
342
+ /* @__PURE__ */ o(T, { className: B.titleText, variant: "h6", noWrap: !0, children: e }),
343
343
  n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ u(
344
344
  Z,
345
345
  {
346
- className: E.rightPanelButton,
346
+ className: B.rightPanelButton,
347
347
  color: "inherit",
348
348
  "aria-label": "Open right side panel",
349
349
  onClick: n == null ? void 0 : n.onOpen,
@@ -358,7 +358,7 @@ function Dn({
358
358
  ] }) })
359
359
  ] });
360
360
  }
361
- const xt = 400, kn = Ae(we, {
361
+ const xt = 400, Dn = Ae(we, {
362
362
  shouldForwardProp: (e) => (
363
363
  // Note we do want anchor to be forwarded to the Drawer component
364
364
  ![
@@ -388,9 +388,9 @@ const xt = 400, kn = Ae(we, {
388
388
  marginLeft: `${r}px`
389
389
  }))
390
390
  })
391
- ), yn = Ae(y, {
391
+ ), kn = Ae(k, {
392
392
  shouldForwardProp: (e) => !["anchor"].includes(e)
393
- })(({ theme: e, anchor: t }) => D(a({
393
+ })(({ theme: e, anchor: t }) => I(a({
394
394
  display: "flex",
395
395
  alignItems: "center",
396
396
  padding: e.spacing(2)
@@ -424,10 +424,10 @@ function We({
424
424
  "data-testid": m,
425
425
  navBarOpen: w = !1,
426
426
  navBarWidthOpen: h = 0,
427
- navBarWidthClosed: b = 0
427
+ navBarWidthClosed: S = 0
428
428
  }) {
429
429
  return /* @__PURE__ */ u(
430
- kn,
430
+ Dn,
431
431
  {
432
432
  SlideProps: {
433
433
  onEntered: () => p == null ? void 0 : p(),
@@ -441,15 +441,15 @@ function We({
441
441
  "data-testid": m,
442
442
  navBarOpen: w,
443
443
  navBarWidthOpen: h,
444
- navBarWidthClosed: b,
444
+ navBarWidthClosed: S,
445
445
  children: [
446
- /* @__PURE__ */ o(yn, D(a({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ u(P, { children: [
446
+ /* @__PURE__ */ o(kn, I(a({ anchor: t }, l), { children: t === "left" ? /* @__PURE__ */ u(N, { children: [
447
447
  /* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", children: r }),
448
448
  d && /* @__PURE__ */ u(Z, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
449
449
  /* @__PURE__ */ o(ct, { "data-testid": "arrowbackicon" }),
450
450
  " "
451
451
  ] })
452
- ] }) : /* @__PURE__ */ u(P, { children: [
452
+ ] }) : /* @__PURE__ */ u(N, { children: [
453
453
  d && /* @__PURE__ */ u(Z, { onClick: i, size: "large", "aria-label": "Close right side panel", children: [
454
454
  /* @__PURE__ */ o(lt, {}),
455
455
  " "
@@ -461,7 +461,7 @@ function We({
461
461
  }
462
462
  );
463
463
  }
464
- const In = W(y, {
464
+ const yn = W(k, {
465
465
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
466
466
  name: "PanelAwareMargins"
467
467
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
@@ -499,12 +499,12 @@ const In = W(y, {
499
499
  startOpen: !1,
500
500
  open: void 0,
501
501
  onChangeOpen: void 0,
502
- content: /* @__PURE__ */ o(P, {}),
502
+ content: /* @__PURE__ */ o(N, {}),
503
503
  onOpened: void 0,
504
504
  onClosed: void 0,
505
505
  dataTestId: void 0
506
506
  };
507
- function Lo({
507
+ function _o({
508
508
  children: e,
509
509
  titleText: t = "",
510
510
  leftPanel: n,
@@ -518,9 +518,9 @@ function Lo({
518
518
  navBarWidthOpen: g,
519
519
  navBarWidthClosed: m
520
520
  }) {
521
- const [w, h] = F(me), [b, S] = F(Ce), [k, $] = F(me), [O, B] = F(Ce), _ = n !== void 0, N = i !== void 0, {
521
+ const [w, h] = F(me), [S, b] = F(Ce), [D, $] = F(me), [E, O] = F(Ce), L = n !== void 0, P = i !== void 0, {
522
522
  titleText: v,
523
- content: I,
523
+ content: y,
524
524
  flavour: M,
525
525
  open: f,
526
526
  onChangeOpen: C,
@@ -529,35 +529,35 @@ function Lo({
529
529
  startOpen: H,
530
530
  onOpened: ee,
531
531
  onClosed: le,
532
- dataTestId: Ot
532
+ dataTestId: Et
533
533
  } = n ? a(a({}, ie), n) : a({}, ie), {
534
- titleText: Bt,
535
- content: Et,
536
- flavour: ye,
534
+ titleText: Ot,
535
+ content: Bt,
536
+ flavour: ke,
537
537
  open: ce,
538
- onChangeOpen: Ie,
538
+ onChangeOpen: ye,
539
539
  width: de,
540
540
  arrowButtons: te,
541
541
  startOpen: ne,
542
542
  onOpened: Ft,
543
- onClosed: Pt,
544
- dataTestId: Nt
543
+ onClosed: Nt,
544
+ dataTestId: Pt
545
545
  } = i ? a(a({}, ie), i) : a({}, ie);
546
546
  K(() => {
547
547
  H !== me && (h(H), $(H));
548
548
  }, [H]), K(() => {
549
- ne !== Ce && (S(ne), B(ne));
549
+ ne !== Ce && (b(ne), O(ne));
550
550
  }, [ne]);
551
- const ue = f === void 0 ? w : f, pe = ce === void 0 ? b : ce, $e = (z) => {
552
- f === void 0 && (h(z), r && N && (z ? (S(!1), B(b)) : S(O))), C && C(z);
553
- }, Te = (z) => {
554
- ce === void 0 && (S(z), r && _ && (z ? (h(!1), $(w)) : h(k))), Ie && Ie(z);
551
+ const ue = f === void 0 ? w : f, pe = ce === void 0 ? S : ce, $e = (U) => {
552
+ f === void 0 && (h(U), r && P && (U ? (b(!1), O(S)) : b(E))), C && C(U);
553
+ }, Te = (U) => {
554
+ ce === void 0 && (b(U), r && L && (U ? (h(!1), $(w)) : h(D))), ye && ye(U);
555
555
  };
556
- return /* @__PURE__ */ u(y, { children: [
557
- _ && /* @__PURE__ */ o(
556
+ return /* @__PURE__ */ u(k, { children: [
557
+ L && /* @__PURE__ */ o(
558
558
  We,
559
559
  {
560
- "data-testid": Ot,
560
+ "data-testid": Et,
561
561
  anchor: "left",
562
562
  open: ue,
563
563
  onClose: () => $e(!1),
@@ -570,41 +570,41 @@ function Lo({
570
570
  navBarOpen: p,
571
571
  navBarWidthOpen: g,
572
572
  navBarWidthClosed: m,
573
- children: I
573
+ children: y
574
574
  }
575
575
  ),
576
- N && /* @__PURE__ */ o(
576
+ P && /* @__PURE__ */ o(
577
577
  We,
578
578
  {
579
- "data-testid": Nt,
579
+ "data-testid": Pt,
580
580
  anchor: "right",
581
581
  open: pe,
582
582
  onClose: () => Te(!1),
583
583
  width: de,
584
- titleText: Bt,
584
+ titleText: Ot,
585
585
  debugOpacity: s,
586
586
  showCloseArrow: te === "both" || te === "close",
587
587
  onOpened: Ft,
588
- onClosed: Pt,
588
+ onClosed: Nt,
589
589
  navBarOpen: p,
590
590
  navBarWidthOpen: g,
591
591
  navBarWidthClosed: m,
592
- children: Et
592
+ children: Bt
593
593
  }
594
594
  ),
595
595
  /* @__PURE__ */ o(
596
- Dn,
596
+ In,
597
597
  a(a({
598
598
  titleText: t,
599
599
  "data-testid": l
600
- }, _ && M === "push" ? {
600
+ }, L && M === "push" ? {
601
601
  leftPanel: {
602
602
  open: ue,
603
603
  width: x,
604
604
  onOpen: () => $e(!0),
605
605
  showOpenArrow: A === "both" || A === "open"
606
606
  }
607
- } : {}), N && ye === "push" ? {
607
+ } : {}), P && ke === "push" ? {
608
608
  rightPanel: {
609
609
  open: pe,
610
610
  width: de,
@@ -614,19 +614,19 @@ function Lo({
614
614
  } : {})
615
615
  ),
616
616
  /* @__PURE__ */ o(
617
- In,
618
- D(a(a({}, M === "push" ? {
617
+ yn,
618
+ I(a(a({}, M === "push" ? {
619
619
  leftPanel: {
620
620
  open: ue,
621
621
  width: x
622
622
  }
623
- } : {}), ye === "push" ? {
623
+ } : {}), ke === "push" ? {
624
624
  rightPanel: {
625
625
  open: pe,
626
626
  width: de
627
627
  }
628
628
  } : {}), {
629
- children: /* @__PURE__ */ o($n, D(a({ "data-testid": c }, d), { children: e }))
629
+ children: /* @__PURE__ */ o($n, I(a({ "data-testid": c }, d), { children: e }))
630
630
  })
631
631
  )
632
632
  ] });
@@ -634,7 +634,7 @@ function Lo({
634
634
  const vt = () => {
635
635
  const e = se();
636
636
  return Ht(e.breakpoints.down("sm"));
637
- }, Tn = 64, On = 72, Bn = 256, j = R(!0), wt = R(Bn), At = R(On), ve = R(""), En = R(void 0), St = R(Tn), bt = R(void 0);
637
+ }, Tn = 64, En = 72, On = 256, j = R(!0), wt = R(On), At = R(En), ve = R(""), Bn = R(void 0), bt = R(Tn), St = R(void 0);
638
638
  function Fn({ links: e }) {
639
639
  return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
640
640
  }
@@ -646,7 +646,7 @@ const re = "Navbar", Y = {
646
646
  // userInfoHolder: `${PREFIX}-userInfoHolder`,
647
647
  // settings: `${PREFIX}-settings`,
648
648
  // pieChartIcon: `${PREFIX}-pieChartIcon`,
649
- }, Pn = W(y, { name: "NavBar" })(({ theme: e }) => ({
649
+ }, Nn = W(k, { name: "NavBar" })(({ theme: e }) => ({
650
650
  [`&.${Y.root}`]: {
651
651
  display: "flex"
652
652
  },
@@ -668,7 +668,7 @@ const re = "Navbar", Y = {
668
668
  })), X = (e, t, n) => e.transitions.create(t, {
669
669
  easing: e.transitions.easing.sharp,
670
670
  duration: n === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
671
- }), Nn = (e) => {
671
+ }), Pn = (e) => {
672
672
  const t = se();
673
673
  return /* @__PURE__ */ o(
674
674
  Wt,
@@ -680,7 +680,7 @@ const re = "Navbar", Y = {
680
680
  }
681
681
  }, e)
682
682
  );
683
- }, Dt = (e) => {
683
+ }, It = (e) => {
684
684
  var t, n;
685
685
  return {
686
686
  overflowX: "hidden",
@@ -688,13 +688,13 @@ const re = "Navbar", Y = {
688
688
  backgroundColor: (n = (t = e == null ? void 0 : e.navBar) == null ? void 0 : t.backgroundColor) != null ? n : "white"
689
689
  // Provide default so tests don't need to wrap theme provider
690
690
  };
691
- }, ze = (e, t) => a({
691
+ }, Ue = (e, t) => a({
692
692
  width: t,
693
693
  transition: X(e, "width", "entering")
694
- }, Dt(e)), Ue = (e, t) => a({
694
+ }, It(e)), ze = (e, t) => a({
695
695
  width: t,
696
696
  transition: X(e, "width", "leaving")
697
- }, Dt(e)), Ln = W(we, {
697
+ }, It(e)), _n = W(we, {
698
698
  shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
699
699
  })(({ theme: e, open: t, widthOpen: n, widthClosed: i, isSmallScreen: r }) => a(a({
700
700
  flexShrink: 0,
@@ -702,14 +702,15 @@ const re = "Navbar", Y = {
702
702
  boxSizing: "border-box",
703
703
  display: "flex",
704
704
  flexDirection: "column"
705
- }, t && D(a({}, ze(e, n)), {
705
+ }, t && I(a({}, Ue(e, n)), {
706
706
  backgroundColor: "",
707
- "& .MuiDrawer-paper": ze(e, n)
708
- })), !t && D(a({}, Ue(e, r ? n : i)), {
707
+ "& .MuiDrawer-paper": Ue(e, n)
708
+ })), !t && I(a({}, ze(e, r ? n : i)), {
709
709
  backgroundColor: "",
710
- "& .MuiDrawer-paper": Ue(e, r ? n : i)
710
+ "& .MuiDrawer-paper": ze(e, r ? n : i)
711
711
  })));
712
- function _n(e) {
712
+ console.warn.bind(console), console.error.bind(console), console.warn.bind(console), console.info.bind(console), console.debug.bind(console);
713
+ function Ln(e) {
713
714
  let t = 0;
714
715
  for (let n = 0, i = e.length; n < i; n++) {
715
716
  const r = e.charCodeAt(n);
@@ -721,7 +722,7 @@ const Ge = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], V
721
722
  function Mn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
722
723
  const r = se();
723
724
  return /* @__PURE__ */ u(
724
- y,
725
+ k,
725
726
  {
726
727
  sx: {
727
728
  paddingTop: 3,
@@ -732,36 +733,36 @@ function Mn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
732
733
  },
733
734
  children: [
734
735
  !i && /* @__PURE__ */ o(
735
- y,
736
+ k,
736
737
  {
737
738
  sx: {
738
739
  width: n ? "5rem" : "2rem",
739
740
  transition: n ? X(r, ["width", "height"], "entering") : X(r, ["width", "height"], "leaving"),
740
741
  aspectRatio: 1
741
742
  },
742
- children: e != null && e.name ? /* @__PURE__ */ o(P, { children: /* @__PURE__ */ o(
743
- Pe,
743
+ children: e != null && e.name ? /* @__PURE__ */ o(N, { children: /* @__PURE__ */ o(
744
+ Ne,
744
745
  {
745
746
  src: e == null ? void 0 : e.picture,
746
747
  sx: {
747
748
  width: "100%",
748
749
  height: "100%",
749
- bgcolor: Ge[Math.abs(_n(e == null ? void 0 : e.name)) % Ge.length]
750
+ bgcolor: Ge[Math.abs(Ln(e == null ? void 0 : e.name)) % Ge.length]
750
751
  },
751
752
  children: Ve(e == null ? void 0 : e.name)
752
753
  }
753
- ) }) : /* @__PURE__ */ o(Pe, { sx: { width: "100%", height: "100%" } })
754
+ ) }) : /* @__PURE__ */ o(Ne, { sx: { width: "100%", height: "100%" } })
754
755
  }
755
756
  ),
756
757
  i && /* @__PURE__ */ o(
757
- y,
758
+ k,
758
759
  {
759
760
  sx: {
760
761
  width: n ? "5rem" : "2rem",
761
762
  transition: n ? X(r, ["width", "height"], "entering") : X(r, ["width", "height"], "leaving"),
762
763
  aspectRatio: 1
763
764
  },
764
- children: e != null && e.name ? /* @__PURE__ */ o(P, { children: /* @__PURE__ */ u(Me, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: n ? "80" : "32", children: [
765
+ children: e != null && e.name ? /* @__PURE__ */ o(N, { children: /* @__PURE__ */ u(Me, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: n ? "80" : "32", children: [
765
766
  " ",
766
767
  Ve(e == null ? void 0 : e.name),
767
768
  " ",
@@ -769,9 +770,9 @@ function Mn({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
769
770
  ] }) }) : /* @__PURE__ */ o(Me, {})
770
771
  }
771
772
  ),
772
- /* @__PURE__ */ o(Nn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(zt, { in: n, children: /* @__PURE__ */ u(y, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
773
- e != null && e.name ? /* @__PURE__ */ o(T, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "50%" }),
774
- t ? /* @__PURE__ */ o(T, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "25%" })
773
+ /* @__PURE__ */ o(Pn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Ut, { in: n, children: /* @__PURE__ */ u(k, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
774
+ e != null && e.name ? /* @__PURE__ */ o(T, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ o(Pe, { animation: !1, width: "50%" }),
775
+ t ? /* @__PURE__ */ o(T, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Pe, { animation: !1, width: "25%" })
775
776
  ] }) }) })
776
777
  ]
777
778
  }
@@ -790,8 +791,8 @@ function Rn({
790
791
  useNewAvatar: p = !1
791
792
  }) {
792
793
  const g = vt(), m = dt(j);
793
- return /* @__PURE__ */ o(Pn, { className: Y.root, "data-testid": i, children: /* @__PURE__ */ u(
794
- Ln,
794
+ return /* @__PURE__ */ o(Nn, { className: Y.root, "data-testid": i, children: /* @__PURE__ */ u(
795
+ _n,
795
796
  {
796
797
  open: e,
797
798
  widthOpen: n,
@@ -806,16 +807,16 @@ function Rn({
806
807
  },
807
808
  isSmallScreen: g,
808
809
  children: [
809
- !g && /* @__PURE__ */ o(Ut, {}),
810
- r && /* @__PURE__ */ u(y, { flexGrow: "0", children: [
810
+ !g && /* @__PURE__ */ o(zt, {}),
811
+ r && /* @__PURE__ */ u(k, { flexGrow: "0", children: [
811
812
  r,
812
- /* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } })
813
+ /* @__PURE__ */ o(_e, { variant: "middle", sx: { marginY: "0.5rem" } })
813
814
  ] }),
814
- /* @__PURE__ */ o(y, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(Fn, { links: s }) : s }),
815
- /* @__PURE__ */ u(y, { flexGrow: "0", children: [
816
- /* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } }),
815
+ /* @__PURE__ */ o(k, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(Fn, { links: s }) : s }),
816
+ /* @__PURE__ */ u(k, { flexGrow: "0", children: [
817
+ /* @__PURE__ */ o(_e, { variant: "middle", sx: { marginY: "0.5rem" } }),
817
818
  /* @__PURE__ */ o(Mn, { user: c, domainCode: l, open: e, useNewAvatar: p }),
818
- d && /* @__PURE__ */ o(P, { children: d })
819
+ d && /* @__PURE__ */ o(N, { children: d })
819
820
  ] })
820
821
  ]
821
822
  }
@@ -828,14 +829,14 @@ function Hn({
828
829
  noPadding: i
829
830
  }) {
830
831
  return /* @__PURE__ */ o(
831
- y,
832
+ k,
832
833
  {
833
834
  sx: {
834
835
  overflow: "auto",
835
836
  height: `calc(100vh - ${t}px)`,
836
837
  flexGrow: 1
837
838
  },
838
- children: i ? /* @__PURE__ */ o(y, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
839
+ children: i ? /* @__PURE__ */ o(k, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
839
840
  et,
840
841
  {
841
842
  component: "main",
@@ -848,10 +849,10 @@ function Hn({
848
849
  }
849
850
  );
850
851
  }
851
- const Wn = "TopBar", zn = {
852
+ const Wn = "TopBar", Un = {
852
853
  titleText: `${Wn}-titleText`
853
854
  };
854
- function Un({
855
+ function zn({
855
856
  titleText: e = "",
856
857
  height: t,
857
858
  "data-testid": n,
@@ -886,13 +887,13 @@ function Un({
886
887
  children: /* @__PURE__ */ o(en, { fontSize: "medium" })
887
888
  }
888
889
  ),
889
- /* @__PURE__ */ o(T, { className: zn.titleText, variant: "h6", component: "h1", children: e }),
890
+ /* @__PURE__ */ o(T, { className: Un.titleText, variant: "h6", component: "h1", children: e }),
890
891
  i
891
892
  ]
892
893
  }
893
894
  ) });
894
895
  }
895
- function _o({
896
+ function Lo({
896
897
  children: e,
897
898
  initialTitleText: t,
898
899
  initialNavBarOpen: n,
@@ -910,40 +911,40 @@ function _o({
910
911
  [j, n != null ? n : !0],
911
912
  [ve, t != null ? t : ""]
912
913
  ]);
913
- const w = _e(j), [h] = V(wt), [b] = V(At), S = _e(ve), [k] = V(St), [$] = V(En), [O] = V(bt);
914
- return /* @__PURE__ */ u(y, { children: [
914
+ const w = Le(j), [h] = V(wt), [S] = V(At), b = Le(ve), [D] = V(bt), [$] = V(Bn), [E] = V(St);
915
+ return /* @__PURE__ */ u(k, { children: [
915
916
  /* @__PURE__ */ o(Gt, {}),
916
917
  /* @__PURE__ */ o(
917
- Un,
918
+ zn,
918
919
  {
919
- titleText: S,
920
+ titleText: b,
920
921
  "data-testid": s,
921
- height: k,
922
+ height: D,
922
923
  middle: $
923
924
  }
924
925
  ),
925
- /* @__PURE__ */ u(y, { sx: { display: "flex" }, children: [
926
+ /* @__PURE__ */ u(k, { sx: { display: "flex" }, children: [
926
927
  /* @__PURE__ */ o(
927
928
  Rn,
928
929
  {
929
930
  open: w,
930
- top: O,
931
+ top: E,
931
932
  middle: c,
932
933
  bottom: l,
933
934
  user: p,
934
935
  domainCode: g,
935
936
  widthOpen: h,
936
- widthClosed: b,
937
- offsetTop: k,
937
+ widthClosed: S,
938
+ offsetTop: D,
938
939
  "data-testid": d,
939
940
  useNewAvatar: m
940
941
  }
941
942
  ),
942
943
  /* @__PURE__ */ o(
943
944
  Hn,
944
- D(a({
945
+ I(a({
945
946
  "data-testid": r,
946
- topBarHeight: k
947
+ topBarHeight: D
947
948
  }, i), {
948
949
  children: e
949
950
  })
@@ -951,7 +952,7 @@ function _o({
951
952
  ] })
952
953
  ] });
953
954
  }
954
- const kt = ({
955
+ const Dt = ({
955
956
  isOpen: e,
956
957
  dialogTitle: t,
957
958
  children: n,
@@ -964,14 +965,14 @@ const kt = ({
964
965
  disableCloseOnBackdropOrEscape: p = !1,
965
966
  isLoading: g = !1
966
967
  }) => {
967
- var h, b;
968
+ var h, S;
968
969
  const [m, w] = F(!1);
969
970
  return /* @__PURE__ */ u(
970
971
  tt,
971
972
  {
972
973
  open: e,
973
- onClose: (S, k) => L(void 0, null, function* () {
974
- p && (k === "backdropClick" || k === "escapeKeyDown") || m || (s != null && s.onClick ? yield s.onClick() : d());
974
+ onClose: (b, D) => _(void 0, null, function* () {
975
+ p && (D === "backdropClick" || D === "escapeKeyDown") || m || (s != null && s.onClick ? yield s.onClick() : d());
975
976
  }),
976
977
  fullWidth: !0,
977
978
  maxWidth: i != null ? i : "xs",
@@ -989,15 +990,15 @@ const kt = ({
989
990
  "data-testid": s == null ? void 0 : s.testId,
990
991
  disabled: (s == null ? void 0 : s.disabled) || m,
991
992
  color: s == null ? void 0 : s.buttonColor,
992
- children: (b = s == null ? void 0 : s.text) != null ? b : "Cancel"
993
+ children: (S = s == null ? void 0 : s.text) != null ? S : "Cancel"
993
994
  }
994
995
  ),
995
996
  r && /* @__PURE__ */ o(
996
997
  J,
997
998
  {
998
- onClick: () => L(void 0, null, function* () {
999
- var S;
1000
- w(!0), yield (S = r.onClick) == null ? void 0 : S.call(r), w(!1);
999
+ onClick: () => _(void 0, null, function* () {
1000
+ var b;
1001
+ w(!0), yield (b = r.onClick) == null ? void 0 : b.call(r), w(!1);
1001
1002
  }),
1002
1003
  "data-testid": r.testId,
1003
1004
  disabled: r.disabled || m,
@@ -1009,7 +1010,7 @@ const kt = ({
1009
1010
  ]
1010
1011
  }
1011
1012
  );
1012
- }, yt = ({
1013
+ }, kt = ({
1013
1014
  minLength: e,
1014
1015
  preLoadedOptions: t,
1015
1016
  lookup: n,
@@ -1022,7 +1023,7 @@ const kt = ({
1022
1023
  queryKey: ["autocomplete", i, r]
1023
1024
  });
1024
1025
  function Mo({
1025
- lookup: e = () => L(this, null, function* () {
1026
+ lookup: e = () => _(this, null, function* () {
1026
1027
  }),
1027
1028
  enableHighlighting: t = !0,
1028
1029
  onChange: n,
@@ -1037,32 +1038,32 @@ function Mo({
1037
1038
  loadingText: m = "Loading...",
1038
1039
  noOptionsText: w = "No options",
1039
1040
  popupIcon: h = /* @__PURE__ */ o(nn, {}),
1040
- error: b = !1,
1041
- helperText: S = "",
1042
- preLoadedOptions: k = void 0,
1041
+ error: S = !1,
1042
+ helperText: b = "",
1043
+ preLoadedOptions: D = void 0,
1043
1044
  disablePortal: $ = !1,
1044
- disableIconFlip: O = !1
1045
+ disableIconFlip: E = !1
1045
1046
  }) {
1046
- const [B, _] = F(""), N = (f, C) => {
1047
+ const [O, L] = F(""), P = (f, C) => {
1047
1048
  const x = s.filter((A) => A.id !== C);
1048
1049
  n(x, "delete", f);
1049
- }, { data: v, isLoading: I } = yt({
1050
- inputValue: B,
1050
+ }, { data: v, isLoading: y } = kt({
1051
+ inputValue: O,
1051
1052
  label: r,
1052
1053
  lookup: e,
1053
1054
  minLength: i,
1054
- preLoadedOptions: k
1055
- }), M = B.length >= i;
1055
+ preLoadedOptions: D
1056
+ }), M = O.length >= i;
1056
1057
  return /* @__PURE__ */ u("div", { "data-testid": d, children: [
1057
1058
  /* @__PURE__ */ o(
1058
- Se,
1059
+ be,
1059
1060
  {
1060
- sx: a(a({}, c), O ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1061
+ sx: a(a({}, c), E ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1061
1062
  "data-testid": d ? `${d}:Autocomplete` : void 0,
1062
1063
  disablePortal: $,
1063
1064
  multiple: !0,
1064
1065
  getOptionLabel: (f) => typeof f == "string" ? f : f.label,
1065
- loading: M ? I : !1,
1066
+ loading: M ? y : !1,
1066
1067
  options: [...s, ...v != null ? v : []],
1067
1068
  filterSelectedOptions: !0,
1068
1069
  includeInputInList: !0,
@@ -1070,21 +1071,21 @@ function Mo({
1070
1071
  onChange: (f, C, x) => {
1071
1072
  n(C, x, f);
1072
1073
  },
1073
- onInputChange: (f, C) => _(C),
1074
+ onInputChange: (f, C) => L(C),
1074
1075
  noOptionsText: M ? w : "Start typing to search",
1075
1076
  loadingText: m,
1076
1077
  popupIcon: h,
1077
1078
  renderInput: (f) => /* @__PURE__ */ o(
1078
- be,
1079
- D(a({}, f), {
1079
+ Se,
1080
+ I(a({}, f), {
1080
1081
  label: r,
1081
1082
  fullWidth: !0,
1082
1083
  variant: g,
1083
- error: b,
1084
- helperText: S,
1085
- InputProps: D(a({}, f.InputProps), {
1086
- endAdornment: /* @__PURE__ */ u(P, { children: [
1087
- I ? /* @__PURE__ */ o(De, { color: "inherit", size: 20 }) : null,
1084
+ error: S,
1085
+ helperText: b,
1086
+ InputProps: I(a({}, f.InputProps), {
1087
+ endAdornment: /* @__PURE__ */ u(N, { children: [
1088
+ y ? /* @__PURE__ */ o(Ie, { color: "inherit", size: 20 }) : null,
1088
1089
  f.InputProps.endAdornment
1089
1090
  ] })
1090
1091
  }),
@@ -1105,7 +1106,7 @@ function Mo({
1105
1106
  }), H = an(C.label, A);
1106
1107
  return /* @__PURE__ */ xe(
1107
1108
  "li",
1108
- D(a({}, f), {
1109
+ I(a({}, f), {
1109
1110
  key: C.id,
1110
1111
  "data-testid": d ? `${d}:Autocomplete:option(${C.id.toString()})` : void 0
1111
1112
  }),
@@ -1123,7 +1124,7 @@ function Mo({
1123
1124
  } else
1124
1125
  return /* @__PURE__ */ xe(
1125
1126
  "li",
1126
- D(a({}, f), {
1127
+ I(a({}, f), {
1127
1128
  key: C.id,
1128
1129
  "data-testid": d ? `${d}:option(${C.id.toString()})` : void 0
1129
1130
  }),
@@ -1132,7 +1133,7 @@ function Mo({
1132
1133
  }
1133
1134
  }
1134
1135
  ),
1135
- s.length > 0 && /* @__PURE__ */ o(y, { sx: l, children: s.map((f) => /* @__PURE__ */ o(
1136
+ s.length > 0 && /* @__PURE__ */ o(k, { sx: l, children: s.map((f) => /* @__PURE__ */ o(
1136
1137
  Vt,
1137
1138
  {
1138
1139
  sx: {
@@ -1159,7 +1160,7 @@ function Mo({
1159
1160
  }
1160
1161
  ),
1161
1162
  "data-testid": d ? `${d}:Chip(${f.id.toString()})` : void 0,
1162
- onDelete: (C) => N(C, f.id),
1163
+ onDelete: (C) => P(C, f.id),
1163
1164
  deleteIcon: /* @__PURE__ */ o(
1164
1165
  tn,
1165
1166
  {
@@ -1171,8 +1172,8 @@ function Mo({
1171
1172
  )) })
1172
1173
  ] });
1173
1174
  }
1174
- const Ro = ({
1175
- lookup: e = () => L(void 0, null, function* () {
1175
+ const Ro = /MUI: The value provided to.*is invalid/i, Ho = ({
1176
+ lookup: e = () => _(void 0, null, function* () {
1176
1177
  }),
1177
1178
  onChange: t,
1178
1179
  label: n,
@@ -1187,36 +1188,36 @@ const Ro = ({
1187
1188
  disablePortal: m = !1,
1188
1189
  preLoadedOptions: w,
1189
1190
  helperText: h = "",
1190
- disabled: b,
1191
- popupIcon: S,
1192
- disableIconFlip: k
1191
+ disabled: S,
1192
+ popupIcon: b,
1193
+ disableIconFlip: D
1193
1194
  }) => {
1194
- const [$, O] = F(""), { data: B, isLoading: _ } = yt({
1195
+ const [$, E] = F(""), { data: O, isLoading: L } = kt({
1195
1196
  inputValue: $,
1196
1197
  label: n,
1197
1198
  lookup: e,
1198
1199
  minLength: g != null ? g : 0,
1199
1200
  preLoadedOptions: w
1200
- }), N = $.length >= g;
1201
+ }), P = $.length >= g;
1201
1202
  return /* @__PURE__ */ o("div", { "data-testid": l, children: /* @__PURE__ */ o(Xt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
1202
- Se,
1203
+ be,
1203
1204
  {
1204
- sx: a(a({}, r), k ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1205
+ sx: a(a({}, r), D ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1205
1206
  "data-testid": l ? `${l}:Autocomplete` : void 0,
1206
- loading: N ? _ : !1,
1207
- options: B != null ? B : [],
1208
- onChange: (v, I, M) => {
1209
- t(v, I, M);
1207
+ loading: P ? L : !1,
1208
+ options: O != null ? O : [],
1209
+ onChange: (v, y, M) => {
1210
+ t(v, y, M);
1210
1211
  },
1211
1212
  disablePortal: m,
1212
1213
  filterOptions: (v) => v,
1213
1214
  value: i,
1214
- noOptionsText: N ? p : "Start typing to search",
1215
+ noOptionsText: P ? p : "Start typing to search",
1215
1216
  getOptionLabel: (v) => v.label,
1216
- popupIcon: S,
1217
+ popupIcon: b,
1217
1218
  renderInput: (v) => /* @__PURE__ */ o(
1218
- be,
1219
- D(a({
1219
+ Se,
1220
+ I(a({
1220
1221
  "data-testid": l ? `${l}:Autocomplete:TextField` : void 0
1221
1222
  }, v), {
1222
1223
  variant: d,
@@ -1226,19 +1227,19 @@ const Ro = ({
1226
1227
  helperText: h
1227
1228
  })
1228
1229
  ),
1229
- isOptionEqualToValue: (v, I) => v.id === I.id,
1230
- onInputChange: (v, I) => {
1231
- O(I);
1230
+ isOptionEqualToValue: (v, y) => v.id === y.id,
1231
+ onInputChange: (v, y) => {
1232
+ E(y);
1232
1233
  },
1233
- renderOption: (v, I) => /* @__PURE__ */ xe(
1234
+ renderOption: (v, y) => /* @__PURE__ */ xe(
1234
1235
  "li",
1235
- D(a({}, v), {
1236
- key: I.id,
1237
- "data-testid": l ? `${l}:Autocomplete:option(${I.id.toString()})` : void 0
1236
+ I(a({}, v), {
1237
+ key: y.id,
1238
+ "data-testid": l ? `${l}:Autocomplete:option(${y.id.toString()})` : void 0
1238
1239
  }),
1239
- I.label
1240
+ y.label
1240
1241
  ),
1241
- disabled: b
1242
+ disabled: S
1242
1243
  }
1243
1244
  ) }) });
1244
1245
  }, Gn = (e) => {
@@ -1254,25 +1255,25 @@ const Ro = ({
1254
1255
  } catch (t) {
1255
1256
  return -1;
1256
1257
  }
1257
- }, Ho = ({
1258
+ }, Wo = ({
1258
1259
  open: e = !1,
1259
1260
  closeHandler: t,
1260
1261
  setAuth0ExpiryTime: n
1261
1262
  }) => {
1262
- const { logout: i, getAccessTokenSilently: r } = ht(), [s, d] = F(0), c = () => L(void 0, null, function* () {
1263
+ const { logout: i, getAccessTokenSilently: r } = ht(), [s, d] = F(0), c = () => _(void 0, null, function* () {
1263
1264
  i({ logoutParams: { returnTo: `${window.location.origin}` } });
1264
- }), l = () => L(void 0, null, function* () {
1265
+ }), l = () => _(void 0, null, function* () {
1265
1266
  d(s + 1), t();
1266
1267
  });
1267
1268
  return K(() => {
1268
- (() => L(void 0, null, function* () {
1269
+ (() => _(void 0, null, function* () {
1269
1270
  if (s > 0) {
1270
1271
  const w = yield r({ cacheMode: "off" }), h = Gn(w) * 1e3;
1271
1272
  n(h);
1272
1273
  }
1273
1274
  }))();
1274
1275
  }, [s, r, n]), /* @__PURE__ */ o(
1275
- kt,
1276
+ Dt,
1276
1277
  {
1277
1278
  isOpen: e,
1278
1279
  primaryButton: {
@@ -1314,7 +1315,7 @@ function Qn(e) {
1314
1315
  const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
1315
1316
  return t === "access_denied" && n.match(/Script.*time.*exceeded/);
1316
1317
  }
1317
- function Wo({
1318
+ function Uo({
1318
1319
  children: e,
1319
1320
  appName: t = "the app",
1320
1321
  throwErrors: n = "none",
@@ -1344,22 +1345,22 @@ function Wo({
1344
1345
  ), n === "all")
1345
1346
  throw c;
1346
1347
  if (Vn(c)) {
1347
- let h = "Auth error", b = "An unknown Auth0 error occurred.";
1348
+ let h = "Auth error", S = "An unknown Auth0 error occurred.";
1348
1349
  if (qn(c))
1349
- h = "Unauthorised", b = `You are not authorised to access ${t}.`;
1350
+ h = "Unauthorised", S = `You are not authorised to access ${t}.`;
1350
1351
  else if (Xn(c))
1351
- h = "App not authorised", b = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
1352
+ h = "App not authorised", S = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
1352
1353
  else if (Qn(c))
1353
- h = "Auth0 script execution time exceeded", b = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";
1354
+ h = "Auth0 script execution time exceeded", S = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";
1354
1355
  else if (c.message === "Invalid state") {
1355
- const S = localStorage.getItem("auth0_redirect_count");
1356
- S ? S && parseInt(S) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(S) + 1)), l(g)) : (localStorage.setItem("auth0_redirect_count", "1"), l(g));
1356
+ const b = localStorage.getItem("auth0_redirect_count");
1357
+ b ? b && parseInt(b) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(b) + 1)), l(g)) : (localStorage.setItem("auth0_redirect_count", "1"), l(g));
1357
1358
  } else if (n === "unknown")
1358
1359
  throw c;
1359
1360
  return /* @__PURE__ */ u(tt, { open: !0, children: [
1360
1361
  /* @__PURE__ */ o(ot, { children: h }),
1361
1362
  /* @__PURE__ */ u(it, { children: [
1362
- /* @__PURE__ */ o(T, { children: b }),
1363
+ /* @__PURE__ */ o(T, { children: S }),
1363
1364
  /* @__PURE__ */ o("br", {}),
1364
1365
  /* @__PURE__ */ o(T, { variant: "subtitle2", children: "Details from Auth0" }),
1365
1366
  /* @__PURE__ */ u(T, { variant: "body2", children: [
@@ -1379,7 +1380,7 @@ function Wo({
1379
1380
  } else if (n === "unknown")
1380
1381
  throw c;
1381
1382
  }
1382
- return s ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ o(P, { children: e })) : /* @__PURE__ */ o(un, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
1383
+ return s ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ o(N, { children: e })) : /* @__PURE__ */ o(un, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
1383
1384
  }
1384
1385
  const Yn = {
1385
1386
  autoHideDuration: 6e3,
@@ -1401,14 +1402,14 @@ const Yn = {
1401
1402
  })(), jn = {
1402
1403
  borderBottomLeftRadius: "0px",
1403
1404
  borderBottomRightRadius: "0px"
1404
- }, eo = {}, to = {}, It = Je(null);
1405
+ }, eo = {}, to = {}, yt = Je(null);
1405
1406
  function no(s) {
1406
1407
  var d = s, {
1407
1408
  overrideState: e = eo,
1408
1409
  overrideActions: t = to,
1409
1410
  shouldClose: n = Kn.shouldClose,
1410
1411
  children: i
1411
- } = d, r = Ee(d, [
1412
+ } = d, r = Be(d, [
1412
1413
  "overrideState",
1413
1414
  "overrideActions",
1414
1415
  "shouldClose",
@@ -1421,51 +1422,51 @@ function no(s) {
1421
1422
  m.current += 1, p.current.length >= Xe && Date.now() - g.current >= Qe && (g.current = Date.now(), console.error(
1422
1423
  `SaladBarProvider: MAX_QUEUE_LENGTH (${Xe}) hit ${m.current} times in last ${Qe}ms)`
1423
1424
  ), m.current = 0);
1424
- const A = a(D(a({}, qe), {
1425
+ const A = a(I(a({}, qe), {
1425
1426
  key: Zn()
1426
1427
  }), x);
1427
1428
  return p.current.push(A), p.current.length === 1 && l({ open: !0 }), A.key;
1428
- }, []), b = (x = "", A = {}) => h(a({ message: x, severity: "success" }, A)), S = (x = "", A = {}) => h(a({ message: x, severity: "info" }, A)), k = (x = "", A = {}) => h(a({ message: x, severity: "warning" }, A)), $ = (x = "", A = {}) => h(a({ message: x, severity: "error" }, A)), O = (x) => {
1429
+ }, []), S = (x = "", A = {}) => h(a({ message: x, severity: "success" }, A)), b = (x = "", A = {}) => h(a({ message: x, severity: "info" }, A)), D = (x = "", A = {}) => h(a({ message: x, severity: "warning" }, A)), $ = (x = "", A = {}) => h(a({ message: x, severity: "error" }, A)), E = (x) => {
1429
1430
  const A = p.current.findIndex((H) => H.key === x);
1430
1431
  if (A !== -1)
1431
1432
  return A === 0 ? (l({ open: !1 }), p.current[0]) : p.current.splice(A, 1);
1432
- }, B = (x, A) => {
1433
+ }, O = (x, A) => {
1433
1434
  n(x, A) && l({ open: !1 });
1434
- }, _ = () => {
1435
- }, N = () => {
1435
+ }, L = () => {
1436
+ }, P = () => {
1436
1437
  p.current.shift(), p.current.length > 0 && l({ open: !0 });
1437
- }, v = (C = p.current[0]) != null ? C : a({}, qe), I = {};
1438
- "autoHideDuration" in v && (I.autoHideDuration = v.autoHideDuration);
1438
+ }, v = (C = p.current[0]) != null ? C : a({}, qe), y = {};
1439
+ "autoHideDuration" in v && (y.autoHideDuration = v.autoHideDuration);
1439
1440
  const M = a(a({}, Yn), r), f = a(a({
1440
1441
  open: c,
1441
1442
  setOpen: w,
1442
1443
  enqueueNotification: h,
1443
- enqueueSuccessNotification: b,
1444
- enqueueInfoNotification: S,
1445
- enqueueWarningNotification: k,
1444
+ enqueueSuccessNotification: S,
1445
+ enqueueInfoNotification: b,
1446
+ enqueueWarningNotification: D,
1446
1447
  enqueueErrorNotification: $,
1447
- removeNotification: O
1448
+ removeNotification: E
1448
1449
  }, e), t);
1449
- return /* @__PURE__ */ u(It.Provider, { value: f, children: [
1450
+ return /* @__PURE__ */ u(yt.Provider, { value: f, children: [
1450
1451
  i,
1451
1452
  /* @__PURE__ */ o(
1452
1453
  Qt,
1453
- D(a(a({}, M), I), {
1454
+ I(a(a({}, M), y), {
1454
1455
  open: c,
1455
- onClose: B,
1456
+ onClose: O,
1456
1457
  TransitionProps: {
1457
- onExited: N,
1458
- onExit: _
1458
+ onExited: P,
1459
+ onExit: L
1459
1460
  },
1460
1461
  sx: { zIndex: Jn },
1461
1462
  children: /* @__PURE__ */ u("div", { children: [
1462
1463
  /* @__PURE__ */ o(
1463
1464
  Yt,
1464
1465
  {
1465
- onClose: (x) => B(x, "closeAlert"),
1466
+ onClose: (x) => O(x, "closeAlert"),
1466
1467
  severity: v.severity,
1467
1468
  variant: "filled",
1468
- icon: v.progressIndicator === "circular" ? /* @__PURE__ */ o(De, { size: "1em" }) : void 0,
1469
+ icon: v.progressIndicator === "circular" ? /* @__PURE__ */ o(Ie, { size: "1em" }) : void 0,
1469
1470
  style: v.progressIndicator === "linear" ? jn : void 0,
1470
1471
  children: v.message
1471
1472
  }
@@ -1477,14 +1478,14 @@ function no(s) {
1477
1478
  ] });
1478
1479
  }
1479
1480
  function oo() {
1480
- const e = Ze(It);
1481
+ const e = Ze(yt);
1481
1482
  if (e === null)
1482
- throw new ke("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1483
+ throw new De("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1483
1484
  return e;
1484
1485
  }
1485
1486
  const zo = Q(
1486
- (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(no, D(a({}, e), { overrideState: t, overrideActions: n, children: i }))
1487
- ), io = on(), Uo = ({
1487
+ (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(no, I(a({}, e), { overrideState: t, overrideActions: n, children: i }))
1488
+ ), io = on(), Go = ({
1488
1489
  children: e,
1489
1490
  store: t
1490
1491
  }) => /* @__PURE__ */ o(ut, { store: t != null ? t : io, children: e }), $t = "domainCode";
@@ -1511,7 +1512,7 @@ const Ye = R(
1511
1512
  }, ao = (e) => {
1512
1513
  var t;
1513
1514
  return e === null ? "N/A" : (t = ro[e]) != null ? t : "";
1514
- }, Go = ({
1515
+ }, Vo = ({
1515
1516
  isLoading: e,
1516
1517
  isOpen: t,
1517
1518
  onClose: n,
@@ -1519,26 +1520,26 @@ const Ye = R(
1519
1520
  applicationName: r,
1520
1521
  handleLogout: s
1521
1522
  }) => {
1522
- const [d, c] = V(Tt), [l, p] = F(d), { enqueueSuccessNotification: g } = oo(), m = i.length === 0, w = !!d && !i.includes(d) && !i.includes(l), h = !d || m || w, b = () => L(void 0, null, function* () {
1523
+ const [d, c] = V(Tt), [l, p] = F(d), { enqueueSuccessNotification: g } = oo(), m = i.length === 0, w = !!d && !i.includes(d) && !i.includes(l), h = !d || m || w, S = () => _(void 0, null, function* () {
1523
1524
  l ? (c(l), g(`Set organisation to ${l}`), n()) : c("");
1524
- }), S = () => L(void 0, null, function* () {
1525
+ }), b = () => _(void 0, null, function* () {
1525
1526
  d && !m && !w ? (p(d), n()) : h && s();
1526
1527
  });
1527
- let k;
1528
- return m ? k = "Unable to retrieve your active organisations. Try logging in again." : w && (k = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ u(
1529
- kt,
1528
+ let D;
1529
+ return m ? D = "Unable to retrieve your active organisations. Try logging in again." : w && (D = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ u(
1530
+ Dt,
1530
1531
  {
1531
1532
  isOpen: t,
1532
1533
  dialogTitle: "Select an organisation",
1533
1534
  primaryButton: {
1534
1535
  text: "Confirm",
1535
- onClick: b,
1536
+ onClick: S,
1536
1537
  disabled: !l || m || w,
1537
1538
  buttonColor: "primary"
1538
1539
  },
1539
1540
  secondaryButton: {
1540
1541
  text: h ? "Logout" : "Cancel",
1541
- onClick: S
1542
+ onClick: b
1542
1543
  },
1543
1544
  onClose: h ? () => {
1544
1545
  } : n,
@@ -1549,23 +1550,23 @@ const Ye = R(
1549
1550
  "."
1550
1551
  ] }),
1551
1552
  /* @__PURE__ */ o(
1552
- Se,
1553
+ be,
1553
1554
  {
1554
1555
  loading: e,
1555
1556
  multiple: !1,
1556
1557
  disableClearable: !1,
1557
1558
  value: l !== "" ? l : null,
1558
- onChange: ($, O) => p(O != null ? O : ""),
1559
+ onChange: ($, E) => p(E != null ? E : ""),
1559
1560
  getOptionLabel: ao,
1560
1561
  options: [...i],
1561
1562
  renderInput: ($) => /* @__PURE__ */ o(
1562
- be,
1563
- D(a({}, $), {
1563
+ Se,
1564
+ I(a({}, $), {
1564
1565
  variant: "filled",
1565
1566
  label: "Select organisation",
1566
- InputProps: D(a({}, $.InputProps), {
1567
- endAdornment: /* @__PURE__ */ u(P, { children: [
1568
- e ? /* @__PURE__ */ o(De, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1567
+ InputProps: I(a({}, $.InputProps), {
1568
+ endAdornment: /* @__PURE__ */ u(N, { children: [
1569
+ e ? /* @__PURE__ */ o(Ie, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1569
1570
  $.InputProps.endAdornment
1570
1571
  ] })
1571
1572
  })
@@ -1573,11 +1574,11 @@ const Ye = R(
1573
1574
  )
1574
1575
  }
1575
1576
  ),
1576
- k && /* @__PURE__ */ o(Kt, { error: !0, children: k })
1577
+ D && /* @__PURE__ */ o(Kt, { error: !0, children: D })
1577
1578
  ]
1578
1579
  }
1579
1580
  );
1580
- }, Vo = at({
1581
+ }, qo = at({
1581
1582
  palette: {
1582
1583
  primary: {
1583
1584
  dark: "#00A651",
@@ -1628,7 +1629,7 @@ const Ye = R(
1628
1629
  navBar: {
1629
1630
  backgroundColor: "#E8E8E8"
1630
1631
  }
1631
- }), qo = at({
1632
+ }), Xo = at({
1632
1633
  palette: {
1633
1634
  primary: {
1634
1635
  main: "#007236",
@@ -1728,12 +1729,12 @@ const Ye = R(
1728
1729
  navBarWidthOpen: wt,
1729
1730
  navBarWidthClosed: At,
1730
1731
  titleText: ve,
1731
- topBarHeight: St,
1732
- navBarTop: bt
1733
- }, Xo = Q(() => ({ children: e }) => /* @__PURE__ */ o(ut, { children: e })), lo = ({
1732
+ topBarHeight: bt,
1733
+ navBarTop: St
1734
+ }, Qo = Q(() => ({ children: e }) => /* @__PURE__ */ o(ut, { children: e })), lo = ({
1734
1735
  initialValues: e,
1735
1736
  children: t
1736
- }) => (pt(e), /* @__PURE__ */ o(P, { children: t })), Qo = Q(
1737
+ }) => (pt(e), /* @__PURE__ */ o(N, { children: t })), Yo = Q(
1737
1738
  (e) => ({ children: t }) => /* @__PURE__ */ o(
1738
1739
  lo,
1739
1740
  {
@@ -1746,53 +1747,54 @@ const Ye = R(
1746
1747
  children: t
1747
1748
  }
1748
1749
  )
1749
- ), Yo = Q(() => ({ children: e }) => {
1750
+ ), Ko = Q(() => ({ children: e }) => {
1750
1751
  const t = new ln();
1751
1752
  return /* @__PURE__ */ o(cn, { client: t, children: e });
1752
1753
  });
1753
1754
  export {
1754
- kt as AgDialog,
1755
- _o as AppLayout,
1756
- Uo as AtomProvider,
1757
- Wo as AuthGuard,
1758
- It as Context,
1759
- ke as ContextError,
1760
- Go as DomainCodeDialog,
1761
- Oo as ExampleComponent,
1755
+ Dt as AgDialog,
1756
+ Lo as AppLayout,
1757
+ Go as AtomProvider,
1758
+ Uo as AuthGuard,
1759
+ yt as Context,
1760
+ De as ContextError,
1761
+ Vo as DomainCodeDialog,
1762
+ Eo as ExampleComponent,
1762
1763
  Mo as FetchAutocomplete,
1763
1764
  lo as HydrateAtoms,
1765
+ Ro as MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX,
1764
1766
  ft as NAVBAR_WIDTH_CLOSED,
1765
1767
  gt as NAVBAR_WIDTH_OPENED,
1766
- No as NavBar,
1768
+ Po as NavBar,
1767
1769
  Fo as NavBarDarkStyledList,
1768
- Po as NavBarLightStyledList,
1770
+ No as NavBarLightStyledList,
1769
1771
  xn as NavBarProvider,
1770
- Lo as PageLayout,
1772
+ _o as PageLayout,
1771
1773
  no as SaladBarProvider,
1772
- Ho as SessionExpiryDialog,
1773
- Ro as SingleAutocomplete,
1774
+ Wo as SessionExpiryDialog,
1775
+ Ho as SingleAutocomplete,
1774
1776
  io as atomStore,
1775
1777
  wn as buildNavBarState,
1776
1778
  Tt as domainCodeAtom,
1777
- Vo as fed21Theme,
1779
+ qo as fed21Theme,
1778
1780
  Gn as getAuth0Expiry,
1779
- qo as internalAgSystemsTheme,
1781
+ Xo as internalAgSystemsTheme,
1780
1782
  q as navBarClasses,
1781
1783
  j as navBarOpenAtom,
1782
- bt as navBarTopAtom,
1784
+ St as navBarTopAtom,
1783
1785
  At as navBarWidthClosedAtom,
1784
1786
  wt as navBarWidthOpenAtom,
1785
1787
  ve as titleTextAtom,
1786
- St as topBarHeightAtom,
1787
- En as topBarMiddleAtom,
1788
- yt as useAutocompleteOptions,
1788
+ bt as topBarHeightAtom,
1789
+ Bn as topBarMiddleAtom,
1790
+ kt as useAutocompleteOptions,
1789
1791
  vn as useNavBar,
1790
1792
  oo as useSaladBar,
1791
- Xo as withAtomProvider,
1792
- Eo as withBrowserRouter,
1793
- Bo as withNavBarProvider,
1794
- Qo as withOverrideDefaults,
1795
- Yo as withQueryClient,
1793
+ Qo as withAtomProvider,
1794
+ Bo as withBrowserRouter,
1795
+ Oo as withNavBarProvider,
1796
+ Yo as withOverrideDefaults,
1797
+ Ko as withQueryClient,
1796
1798
  zo as withSaladBarProvider
1797
1799
  };
1798
1800
  //# sourceMappingURL=index.js.map