@australiangreens/ag-internal-components 0.1.0 → 0.1.2

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,22 +1,22 @@
1
1
  var Lt = Object.defineProperty, _t = Object.defineProperties;
2
2
  var Mt = Object.getOwnPropertyDescriptors;
3
3
  var ne = Object.getOwnPropertySymbols;
4
- var Te = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable;
4
+ var Be = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
5
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) => {
6
6
  for (var n in t || (t = {}))
7
- Te.call(t, n) && he(e, n, t[n]);
7
+ Be.call(t, n) && he(e, n, t[n]);
8
8
  if (ne)
9
9
  for (var n of ne(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
- }, k = (e, t) => _t(e, Mt(t));
12
+ }, D = (e, t) => _t(e, Mt(t));
13
13
  var Ee = (e, t) => {
14
14
  var n = {};
15
15
  for (var i in e)
16
- Te.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
16
+ Be.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
17
17
  if (e != null && ne)
18
18
  for (var i of ne(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);
@@ -38,7 +38,7 @@ var L = (e, t, n) => new Promise((i, r) => {
38
38
  });
39
39
  import { jsxs as u, Fragment as F, jsx as o } from "react/jsx-runtime";
40
40
  import { useState as E, createContext as Je, useCallback as re, useContext as Ze, useEffect as K, createElement as xe, useRef as ge } from "react";
41
- import { Typography as T, Button as ae, Paper as je, Box as $, Drawer as we, styled as Ae, IconButton as J, Container as et, useTheme as se, useMediaQuery as Rt, Collapse as Ht, Avatar as Pe, Fade as Wt, Skeleton as Ne, Toolbar as zt, Divider as Le, CssBaseline as Ut, Dialog as tt, LinearProgress as nt, DialogTitle as ot, DialogContent as it, DialogActions as rt, Autocomplete as be, TextField as Se, CircularProgress as De, Chip as Gt, Tooltip as Vt, Stack as qt, Snackbar as Xt, Alert as Qt, FormHelperText as Yt } from "@mui/material";
41
+ import { Typography as B, Button as ae, Paper as je, Box as y, Drawer as we, styled as Ae, IconButton as J, Container as et, useTheme as se, useMediaQuery as Rt, Collapse as Ht, Avatar as Pe, Fade as Wt, Skeleton as Ne, Toolbar as zt, Divider as Le, CssBaseline as Ut, 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 Gt, Tooltip as Vt, Stack as qt, Snackbar as Xt, Alert as Qt, FormHelperText as Yt } from "@mui/material";
42
42
  import Kt from "@mui/material/CssBaseline";
43
43
  import { styled as R, createTheme as at, alpha as fe } from "@mui/material/styles";
44
44
  import { AgError as Jt } from "@australiangreens/ag-error";
@@ -55,11 +55,11 @@ import { useQuery as an, QueryClient as sn, QueryClientProvider as ln } from "@t
55
55
  import { useAuth0 as ht } from "@auth0/auth0-react";
56
56
  import { Buffer as cn } from "buffer";
57
57
  import dn from "@mui/material/Skeleton";
58
- function Io({ text: e }) {
58
+ function To({ text: e }) {
59
59
  const [t, n] = E(0);
60
60
  return /* @__PURE__ */ u(F, { children: [
61
- /* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
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" }) }),
61
+ /* @__PURE__ */ o(B, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
62
+ /* @__PURE__ */ o(B, { 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(
64
64
  ae,
65
65
  {
@@ -87,7 +87,7 @@ const gt = 330, ft = 73, U = "Navbar", q = {
87
87
  userInfoHolder: `${U}-userInfoHolder`,
88
88
  settings: `${U}-settings`,
89
89
  pieChartIcon: `${U}-pieChartIcon`
90
- }, pn = R($, {
90
+ }, pn = R(y, {
91
91
  name: "NavBar"
92
92
  })(({ theme: e }) => ({
93
93
  [`&.${q.root}`]: {
@@ -144,7 +144,7 @@ const Ct = Je(null), fn = {}, mn = {}, Cn = ({
144
144
  const [{ open: i }, r] = E({ open: !0 }), s = re((d) => {
145
145
  r({ open: d });
146
146
  }, []), c = re(() => {
147
- r((d) => k(a({}, d), { open: !d.open }));
147
+ r((d) => D(a({}, d), { open: !d.open }));
148
148
  }, []), l = a(a({
149
149
  open: i,
150
150
  setOpen: s,
@@ -158,9 +158,9 @@ const Ct = Je(null), fn = {}, mn = {}, Cn = ({
158
158
  return e;
159
159
  }, vn = (e = {}) => a({
160
160
  open: !0
161
- }, e), Oo = Q(
161
+ }, e), Bo = Q(
162
162
  (e = vn(), t = {}) => ({ children: n }) => /* @__PURE__ */ o(Cn, { overrideState: e, overrideActions: t, children: n })
163
- ), To = Q(() => ({ children: e }) => /* @__PURE__ */ o(Zt, { children: e })), Re = 7, Bo = R(st)(({ theme: e }) => ({
163
+ ), Oo = Q(() => ({ children: e }) => /* @__PURE__ */ o(Zt, { children: e })), Re = 7, Eo = R(st)(({ theme: e }) => ({
164
164
  backgroundColor: "black",
165
165
  color: "white",
166
166
  "& .MuiListItem-root": {
@@ -198,7 +198,7 @@ const Ct = Je(null), fn = {}, mn = {}, Cn = ({
198
198
  // '&.Mui-selected.Mui-focusVisible:hover': {
199
199
  // },
200
200
  }
201
- })), He = 7, Eo = R(st)(({ theme: e }) => ({
201
+ })), He = 7, Fo = R(st)(({ theme: e }) => ({
202
202
  backgroundColor: "#e8e8e8",
203
203
  color: "inherit",
204
204
  "& .MuiListItem-root": {
@@ -237,7 +237,7 @@ const Ct = Je(null), fn = {}, mn = {}, Cn = ({
237
237
  // },
238
238
  }
239
239
  }));
240
- function Fo({
240
+ function Po({
241
241
  "data-testid": e,
242
242
  children: t
243
243
  }) {
@@ -256,32 +256,32 @@ function Fo({
256
256
  )
257
257
  ] });
258
258
  }
259
- const wn = 24, An = 64, G = "TopBar", B = {
259
+ const wn = 24, An = 64, G = "TopBar", O = {
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
- [`& .${B.topStripe}`]: {
273
+ [`& .${O.topStripe}`]: {
274
274
  width: "100%",
275
275
  height: `${wn}px`,
276
276
  backgroundColor: e.palette.primary.main
277
277
  },
278
- [`& .${B.titleBar}`]: {
278
+ [`& .${O.titleBar}`]: {
279
279
  backgroundColor: e.palette.primary.light,
280
280
  height: `${An}px`,
281
281
  padding: e.spacing(0, 3),
282
282
  width: "100%"
283
283
  },
284
- [`& .${B.titleSlider}`]: a(a({
284
+ [`& .${O.titleSlider}`]: a(a({
285
285
  height: "100%",
286
286
  display: "flex",
287
287
  alignItems: "center",
@@ -290,14 +290,14 @@ const wn = 24, An = 64, G = "TopBar", B = {
290
290
  easing: e.transitions.easing.sharp,
291
291
  duration: e.transitions.duration.leavingScreen
292
292
  }),
293
- [`& .${B.leftPanelButton}`]: {
293
+ [`& .${O.leftPanelButton}`]: {
294
294
  marginRight: e.spacing(2),
295
295
  flexGrow: 0
296
296
  },
297
- [`& .${B.titleText}`]: {
297
+ [`& .${O.titleText}`]: {
298
298
  flexGrow: 1
299
299
  },
300
- [`& .${B.rightPanelButton}`]: {
300
+ [`& .${O.rightPanelButton}`]: {
301
301
  flexGrow: 0
302
302
  }
303
303
  }, (t == null ? void 0 : t.open) && {
@@ -315,19 +315,19 @@ const wn = 24, An = 64, G = "TopBar", B = {
315
315
  })
316
316
  };
317
317
  });
318
- function Sn({
318
+ function bn({
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: B.topStripe }),
326
- /* @__PURE__ */ o("div", { className: B.titleBar, children: /* @__PURE__ */ u($, { className: B.titleSlider, children: [
324
+ return /* @__PURE__ */ u(Sn, { leftPanel: t, rightPanel: n, "data-testid": i, children: [
325
+ /* @__PURE__ */ o("div", { className: O.topStripe }),
326
+ /* @__PURE__ */ o("div", { className: O.titleBar, children: /* @__PURE__ */ u(y, { className: O.titleSlider, children: [
327
327
  t !== void 0 && !t.open && t.showOpenArrow && /* @__PURE__ */ u(
328
328
  J,
329
329
  {
330
- className: B.leftPanelButton,
330
+ className: O.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 Sn({
339
339
  ]
340
340
  }
341
341
  ),
342
- /* @__PURE__ */ o(T, { className: B.titleText, variant: "h6", noWrap: !0, children: e }),
342
+ /* @__PURE__ */ o(B, { className: O.titleText, variant: "h6", noWrap: !0, children: e }),
343
343
  n !== void 0 && !n.open && n.showOpenArrow && /* @__PURE__ */ u(
344
344
  J,
345
345
  {
346
- className: B.rightPanelButton,
346
+ className: O.rightPanelButton,
347
347
  color: "inherit",
348
348
  "aria-label": "Open right side panel",
349
349
  onClick: n == null ? void 0 : n.onOpen,
@@ -388,9 +388,9 @@ const xt = 400, Dn = Ae(we, {
388
388
  marginLeft: `${r}px`
389
389
  }))
390
390
  })
391
- ), kn = Ae($, {
391
+ ), kn = Ae(y, {
392
392
  shouldForwardProp: (e) => !["anchor"].includes(e)
393
- })(({ theme: e, anchor: t }) => k(a({
393
+ })(({ theme: e, anchor: t }) => D(a({
394
394
  display: "flex",
395
395
  alignItems: "center",
396
396
  padding: e.spacing(2)
@@ -423,8 +423,8 @@ function We({
423
423
  onClosed: C,
424
424
  "data-testid": f,
425
425
  navBarOpen: m = !1,
426
- navBarWidthOpen: g = 0,
427
- navBarWidthClosed: b = 0
426
+ navBarWidthOpen: h = 0,
427
+ navBarWidthClosed: $ = 0
428
428
  }) {
429
429
  return /* @__PURE__ */ u(
430
430
  Dn,
@@ -440,11 +440,11 @@ function We({
440
440
  debugOpacity: l,
441
441
  "data-testid": f,
442
442
  navBarOpen: m,
443
- navBarWidthOpen: g,
444
- navBarWidthClosed: b,
443
+ navBarWidthOpen: h,
444
+ navBarWidthClosed: $,
445
445
  children: [
446
- /* @__PURE__ */ o(kn, k(a({ anchor: t }, d), { children: t === "left" ? /* @__PURE__ */ u(F, { children: [
447
- /* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", children: r }),
446
+ /* @__PURE__ */ o(kn, D(a({ anchor: t }, d), { children: t === "left" ? /* @__PURE__ */ u(F, { children: [
447
+ /* @__PURE__ */ o(B, { variant: "h6", color: "inherit", component: "div", children: r }),
448
448
  c && /* @__PURE__ */ u(J, { onClick: i, size: "large", "aria-label": "Close left side panel", children: [
449
449
  /* @__PURE__ */ o(ct, { "data-testid": "arrowbackicon" }),
450
450
  " "
@@ -454,14 +454,14 @@ function We({
454
454
  /* @__PURE__ */ o(lt, {}),
455
455
  " "
456
456
  ] }),
457
- /* @__PURE__ */ o(T, { variant: "h6", color: "inherit", component: "div", children: r })
457
+ /* @__PURE__ */ o(B, { variant: "h6", color: "inherit", component: "div", children: r })
458
458
  ] }) })),
459
459
  e
460
460
  ]
461
461
  }
462
462
  );
463
463
  }
464
- const yn = R($, {
464
+ const yn = R(y, {
465
465
  shouldForwardProp: (e) => !["leftPanel", "rightPanel"].includes(e),
466
466
  name: "PanelAwareMargins"
467
467
  })(({ theme: e, leftPanel: t, rightPanel: n }) => {
@@ -504,7 +504,7 @@ const yn = R($, {
504
504
  onClosed: void 0,
505
505
  dataTestId: void 0
506
506
  };
507
- function Po({
507
+ function No({
508
508
  children: e,
509
509
  titleText: t = "",
510
510
  leftPanel: n,
@@ -518,20 +518,20 @@ function Po({
518
518
  navBarWidthOpen: C,
519
519
  navBarWidthClosed: f
520
520
  }) {
521
- const [m, g] = E(me), [b, y] = E(Ce), [S, I] = E(me), [O, P] = E(Ce), N = n !== void 0, D = i !== void 0, {
521
+ const [m, h] = E(me), [$, k] = E(Ce), [S, I] = E(me), [T, P] = E(Ce), N = n !== void 0, b = i !== void 0, {
522
522
  titleText: A,
523
523
  content: H,
524
524
  flavour: W,
525
- open: h,
525
+ open: g,
526
526
  onChangeOpen: x,
527
527
  width: v,
528
528
  arrowButtons: w,
529
529
  startOpen: M,
530
530
  onOpened: j,
531
531
  onClosed: le,
532
- dataTestId: Tt
532
+ dataTestId: Bt
533
533
  } = n ? a(a({}, oe), n) : a({}, oe), {
534
- titleText: Bt,
534
+ titleText: Ot,
535
535
  content: Et,
536
536
  flavour: ye,
537
537
  open: ce,
@@ -544,20 +544,20 @@ function Po({
544
544
  dataTestId: Nt
545
545
  } = i ? a(a({}, oe), i) : a({}, oe);
546
546
  K(() => {
547
- M !== me && (g(M), I(M));
547
+ M !== me && (h(M), I(M));
548
548
  }, [M]), K(() => {
549
- te !== Ce && (y(te), P(te));
549
+ te !== Ce && (k(te), P(te));
550
550
  }, [te]);
551
- const pe = h === void 0 ? m : h, ue = ce === void 0 ? b : ce, Ie = (z) => {
552
- h === void 0 && (g(z), r && D && (z ? (y(!1), P(b)) : y(O))), x && x(z);
553
- }, Oe = (z) => {
554
- ce === void 0 && (y(z), r && N && (z ? (g(!1), I(m)) : g(S))), $e && $e(z);
551
+ const pe = g === void 0 ? m : g, ue = ce === void 0 ? $ : ce, Ie = (z) => {
552
+ g === void 0 && (h(z), r && b && (z ? (k(!1), P($)) : k(T))), x && x(z);
553
+ }, Te = (z) => {
554
+ ce === void 0 && (k(z), r && N && (z ? (h(!1), I(m)) : h(S))), $e && $e(z);
555
555
  };
556
- return /* @__PURE__ */ u($, { children: [
556
+ return /* @__PURE__ */ u(y, { children: [
557
557
  N && /* @__PURE__ */ o(
558
558
  We,
559
559
  {
560
- "data-testid": Tt,
560
+ "data-testid": Bt,
561
561
  anchor: "left",
562
562
  open: pe,
563
563
  onClose: () => Ie(!1),
@@ -573,15 +573,15 @@ function Po({
573
573
  children: H
574
574
  }
575
575
  ),
576
- D && /* @__PURE__ */ o(
576
+ b && /* @__PURE__ */ o(
577
577
  We,
578
578
  {
579
579
  "data-testid": Nt,
580
580
  anchor: "right",
581
581
  open: ue,
582
- onClose: () => Oe(!1),
582
+ onClose: () => Te(!1),
583
583
  width: de,
584
- titleText: Bt,
584
+ titleText: Ot,
585
585
  debugOpacity: s,
586
586
  showCloseArrow: ee === "both" || ee === "close",
587
587
  onOpened: Ft,
@@ -593,7 +593,7 @@ function Po({
593
593
  }
594
594
  ),
595
595
  /* @__PURE__ */ o(
596
- Sn,
596
+ bn,
597
597
  a(a({
598
598
  titleText: t,
599
599
  "data-testid": d
@@ -604,18 +604,18 @@ function Po({
604
604
  onOpen: () => Ie(!0),
605
605
  showOpenArrow: w === "both" || w === "open"
606
606
  }
607
- } : {}), D && ye === "push" ? {
607
+ } : {}), b && ye === "push" ? {
608
608
  rightPanel: {
609
609
  open: ue,
610
610
  width: de,
611
- onOpen: () => Oe(!0),
611
+ onOpen: () => Te(!0),
612
612
  showOpenArrow: ee === "both" || ee === "open"
613
613
  }
614
614
  } : {})
615
615
  ),
616
616
  /* @__PURE__ */ o(
617
617
  yn,
618
- k(a(a({}, W === "push" ? {
618
+ D(a(a({}, W === "push" ? {
619
619
  leftPanel: {
620
620
  open: pe,
621
621
  width: v
@@ -626,7 +626,7 @@ function Po({
626
626
  width: de
627
627
  }
628
628
  } : {}), {
629
- children: /* @__PURE__ */ o($n, k(a({ "data-testid": l }, c), { children: e }))
629
+ children: /* @__PURE__ */ o($n, D(a({ "data-testid": l }, c), { children: e }))
630
630
  })
631
631
  )
632
632
  ] });
@@ -634,7 +634,7 @@ function Po({
634
634
  const vt = () => {
635
635
  const e = se();
636
636
  return Rt(e.breakpoints.down("sm"));
637
- }, In = 64, On = 72, Tn = 256, Z = _(!0), wt = _(Tn), At = _(On), ve = _(""), Bn = _(void 0), bt = _(In), St = _(void 0);
637
+ }, In = 64, Tn = 72, Bn = 256, Z = _(!0), wt = _(Bn), At = _(Tn), ve = _(""), On = _(void 0), St = _(In), bt = _(void 0);
638
638
  function En({ links: e }) {
639
639
  return /* @__PURE__ */ o("div", { children: "LinksMenu not implemented yet" });
640
640
  }
@@ -646,7 +646,7 @@ const ie = "Navbar", Y = {
646
646
  // userInfoHolder: `${PREFIX}-userInfoHolder`,
647
647
  // settings: `${PREFIX}-settings`,
648
648
  // pieChartIcon: `${PREFIX}-pieChartIcon`,
649
- }, Fn = R($, { name: "NavBar" })(({ theme: e }) => ({
649
+ }, Fn = R(y, { name: "NavBar" })(({ theme: e }) => ({
650
650
  [`&.${Y.root}`]: {
651
651
  display: "flex"
652
652
  },
@@ -702,10 +702,10 @@ const ie = "Navbar", Y = {
702
702
  boxSizing: "border-box",
703
703
  display: "flex",
704
704
  flexDirection: "column"
705
- }, t && k(a({}, ze(e, n)), {
705
+ }, t && D(a({}, ze(e, n)), {
706
706
  backgroundColor: "",
707
707
  "& .MuiDrawer-paper": ze(e, n)
708
- })), !t && k(a({}, Ue(e, r ? n : i)), {
708
+ })), !t && D(a({}, Ue(e, r ? n : i)), {
709
709
  backgroundColor: "",
710
710
  "& .MuiDrawer-paper": Ue(e, r ? n : i)
711
711
  })));
@@ -721,7 +721,7 @@ const Ge = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], V
721
721
  function _n({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
722
722
  const r = se();
723
723
  return /* @__PURE__ */ u(
724
- $,
724
+ y,
725
725
  {
726
726
  sx: {
727
727
  paddingTop: 3,
@@ -732,7 +732,7 @@ function _n({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
732
732
  },
733
733
  children: [
734
734
  !i && /* @__PURE__ */ o(
735
- $,
735
+ y,
736
736
  {
737
737
  sx: {
738
738
  width: n ? "5rem" : "2rem",
@@ -754,7 +754,7 @@ function _n({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
754
754
  }
755
755
  ),
756
756
  i && /* @__PURE__ */ o(
757
- $,
757
+ y,
758
758
  {
759
759
  sx: {
760
760
  width: n ? "5rem" : "2rem",
@@ -769,9 +769,9 @@ function _n({ user: e, domainCode: t, open: n, useNewAvatar: i = !1 }) {
769
769
  ] }) }) : /* @__PURE__ */ o(Me, {})
770
770
  }
771
771
  ),
772
- /* @__PURE__ */ o(Pn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Wt, { in: n, children: /* @__PURE__ */ u($, { 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%" })
772
+ /* @__PURE__ */ o(Pn, { sx: { width: "100%" }, in: n, children: /* @__PURE__ */ o(Wt, { in: n, children: /* @__PURE__ */ u(y, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
773
+ e != null && e.name ? /* @__PURE__ */ o(B, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "50%" }),
774
+ t ? /* @__PURE__ */ o(B, { children: t.toUpperCase() }) : /* @__PURE__ */ o(Ne, { animation: !1, width: "25%" })
775
775
  ] }) }) })
776
776
  ]
777
777
  }
@@ -807,12 +807,12 @@ function Mn({
807
807
  isSmallScreen: C,
808
808
  children: [
809
809
  !C && /* @__PURE__ */ o(zt, {}),
810
- r && /* @__PURE__ */ u($, { flexGrow: "0", children: [
810
+ r && /* @__PURE__ */ u(y, { flexGrow: "0", children: [
811
811
  r,
812
812
  /* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } })
813
813
  ] }),
814
- /* @__PURE__ */ o($, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(En, { links: s }) : s }),
815
- /* @__PURE__ */ u($, { flexGrow: "0", children: [
814
+ /* @__PURE__ */ o(y, { flexGrow: "1", children: Array.isArray(s) ? /* @__PURE__ */ o(En, { links: s }) : s }),
815
+ /* @__PURE__ */ u(y, { flexGrow: "0", children: [
816
816
  /* @__PURE__ */ o(Le, { variant: "middle", sx: { marginY: "0.5rem" } }),
817
817
  /* @__PURE__ */ o(_n, { user: l, domainCode: d, open: e, useNewAvatar: p }),
818
818
  c && /* @__PURE__ */ o(F, { children: c })
@@ -828,14 +828,14 @@ function Rn({
828
828
  noPadding: i
829
829
  }) {
830
830
  return /* @__PURE__ */ o(
831
- $,
831
+ y,
832
832
  {
833
833
  sx: {
834
834
  overflow: "auto",
835
835
  height: `calc(100vh - ${t}px)`,
836
836
  flexGrow: 1
837
837
  },
838
- children: i ? /* @__PURE__ */ o($, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
838
+ children: i ? /* @__PURE__ */ o(y, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ o(
839
839
  et,
840
840
  {
841
841
  component: "main",
@@ -886,13 +886,13 @@ function zn({
886
886
  children: /* @__PURE__ */ o(jt, { fontSize: "medium" })
887
887
  }
888
888
  ),
889
- /* @__PURE__ */ o(T, { className: Wn.titleText, variant: "h6", component: "h1", children: e }),
889
+ /* @__PURE__ */ o(B, { className: Wn.titleText, variant: "h6", component: "h1", children: e }),
890
890
  i
891
891
  ]
892
892
  }
893
893
  ) });
894
894
  }
895
- function No({
895
+ function Lo({
896
896
  children: e,
897
897
  initialTitleText: t,
898
898
  initialNavBarOpen: n,
@@ -910,30 +910,30 @@ function No({
910
910
  [Z, n != null ? n : !0],
911
911
  [ve, t != null ? t : ""]
912
912
  ]);
913
- const m = _e(Z), [g] = V(wt), [b] = V(At), y = _e(ve), [S] = V(bt), [I] = V(Bn), [O] = V(St);
914
- return /* @__PURE__ */ u($, { children: [
913
+ const m = _e(Z), [h] = V(wt), [$] = V(At), k = _e(ve), [S] = V(St), [I] = V(On), [T] = V(bt);
914
+ return /* @__PURE__ */ u(y, { children: [
915
915
  /* @__PURE__ */ o(Ut, {}),
916
916
  /* @__PURE__ */ o(
917
917
  zn,
918
918
  {
919
- titleText: y,
919
+ titleText: k,
920
920
  "data-testid": s,
921
921
  height: S,
922
922
  middle: I
923
923
  }
924
924
  ),
925
- /* @__PURE__ */ u($, { sx: { display: "flex" }, children: [
925
+ /* @__PURE__ */ u(y, { sx: { display: "flex" }, children: [
926
926
  /* @__PURE__ */ o(
927
927
  Mn,
928
928
  {
929
929
  open: m,
930
- top: O,
930
+ top: T,
931
931
  middle: l,
932
932
  bottom: d,
933
933
  user: p,
934
934
  domainCode: C,
935
- widthOpen: g,
936
- widthClosed: b,
935
+ widthOpen: h,
936
+ widthClosed: $,
937
937
  offsetTop: S,
938
938
  "data-testid": c,
939
939
  useNewAvatar: f
@@ -941,7 +941,7 @@ function No({
941
941
  ),
942
942
  /* @__PURE__ */ o(
943
943
  Rn,
944
- k(a({
944
+ D(a({
945
945
  "data-testid": r,
946
946
  topBarHeight: S
947
947
  }, i), {
@@ -964,13 +964,13 @@ const kt = ({
964
964
  disableCloseOnBackdropOrEscape: p = !1,
965
965
  isLoading: C = !1
966
966
  }) => {
967
- var g, b;
967
+ var h, $;
968
968
  const [f, m] = E(!1);
969
969
  return /* @__PURE__ */ u(
970
970
  tt,
971
971
  {
972
972
  open: e,
973
- onClose: (y, S) => L(void 0, null, function* () {
973
+ onClose: (k, S) => L(void 0, null, function* () {
974
974
  p && (S === "backdropClick" || S === "escapeKeyDown") || f || (s != null && s.onClick ? yield s.onClick() : c());
975
975
  }),
976
976
  fullWidth: !0,
@@ -985,19 +985,19 @@ const kt = ({
985
985
  /* @__PURE__ */ o(
986
986
  ae,
987
987
  {
988
- onClick: (g = s == null ? void 0 : s.onClick) != null ? g : c,
988
+ onClick: (h = s == null ? void 0 : s.onClick) != null ? h : c,
989
989
  "data-testid": s == null ? void 0 : s.testId,
990
990
  disabled: (s == null ? void 0 : s.disabled) || f,
991
991
  color: s == null ? void 0 : s.buttonColor,
992
- children: (b = s == null ? void 0 : s.text) != null ? b : "Cancel"
992
+ children: ($ = s == null ? void 0 : s.text) != null ? $ : "Cancel"
993
993
  }
994
994
  ),
995
995
  r && /* @__PURE__ */ o(
996
996
  ae,
997
997
  {
998
998
  onClick: () => L(void 0, null, function* () {
999
- var y;
1000
- m(!0), yield (y = r.onClick) == null ? void 0 : y.call(r), m(!1);
999
+ var k;
1000
+ m(!0), yield (k = r.onClick) == null ? void 0 : k.call(r), m(!1);
1001
1001
  }),
1002
1002
  "data-testid": r.testId,
1003
1003
  disabled: r.disabled || f,
@@ -1021,7 +1021,7 @@ const kt = ({
1021
1021
  ) : n(r),
1022
1022
  queryKey: ["autocomplete", i, r]
1023
1023
  });
1024
- function Lo({
1024
+ function _o({
1025
1025
  lookup: e = () => L(this, null, function* () {
1026
1026
  }),
1027
1027
  enableHighlighting: t = !0,
@@ -1036,16 +1036,16 @@ function Lo({
1036
1036
  textFieldVariant: C = "filled",
1037
1037
  loadingText: f = "Loading...",
1038
1038
  noOptionsText: m = "No options",
1039
- popupIcon: g = /* @__PURE__ */ o(tn, {}),
1040
- error: b = !1,
1041
- helperText: y = "",
1039
+ popupIcon: h = /* @__PURE__ */ o(tn, {}),
1040
+ error: $ = !1,
1041
+ helperText: k = "",
1042
1042
  preLoadedOptions: S = void 0,
1043
1043
  disablePortal: I = !1,
1044
- disableIconFlip: O = !1
1044
+ disableIconFlip: T = !1
1045
1045
  }) {
1046
- const [P, N] = E(""), D = (h, x) => {
1046
+ const [P, N] = E(""), b = (g, x) => {
1047
1047
  const v = s.filter((w) => w.id !== x);
1048
- n(v, "delete", h);
1048
+ n(v, "delete", g);
1049
1049
  }, { data: A, isLoading: H } = yt({
1050
1050
  inputValue: P,
1051
1051
  label: r,
@@ -1055,37 +1055,37 @@ function Lo({
1055
1055
  }), W = P.length >= i;
1056
1056
  return /* @__PURE__ */ u("div", { "data-testid": c, children: [
1057
1057
  /* @__PURE__ */ o(
1058
- be,
1058
+ Se,
1059
1059
  {
1060
- sx: a(a({}, l), O ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1060
+ sx: a(a({}, l), T ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1061
1061
  "data-testid": c ? `${c}:Autocomplete` : void 0,
1062
1062
  disablePortal: I,
1063
1063
  multiple: !0,
1064
- getOptionLabel: (h) => typeof h == "string" ? h : h.label,
1064
+ getOptionLabel: (g) => typeof g == "string" ? g : g.label,
1065
1065
  loading: W ? H : !1,
1066
1066
  options: [...s, ...A != null ? A : []],
1067
1067
  filterSelectedOptions: !0,
1068
1068
  includeInputInList: !0,
1069
1069
  value: s,
1070
- onChange: (h, x, v) => {
1071
- n(x, v, h);
1070
+ onChange: (g, x, v) => {
1071
+ n(x, v, g);
1072
1072
  },
1073
- onInputChange: (h, x) => N(x),
1073
+ onInputChange: (g, x) => N(x),
1074
1074
  noOptionsText: W ? m : "Start typing to search",
1075
1075
  loadingText: f,
1076
- popupIcon: g,
1077
- renderInput: (h) => /* @__PURE__ */ o(
1078
- Se,
1079
- k(a({}, h), {
1076
+ popupIcon: h,
1077
+ renderInput: (g) => /* @__PURE__ */ o(
1078
+ be,
1079
+ D(a({}, g), {
1080
1080
  label: r,
1081
1081
  fullWidth: !0,
1082
1082
  variant: C,
1083
- error: b,
1084
- helperText: y,
1085
- InputProps: k(a({}, h.InputProps), {
1083
+ error: $,
1084
+ helperText: k,
1085
+ InputProps: D(a({}, g.InputProps), {
1086
1086
  endAdornment: /* @__PURE__ */ u(F, { children: [
1087
1087
  H ? /* @__PURE__ */ o(De, { color: "inherit", size: 20 }) : null,
1088
- h.InputProps.endAdornment
1088
+ g.InputProps.endAdornment
1089
1089
  ] })
1090
1090
  }),
1091
1091
  "data-testid": c ? `${c}:Autocomplete:TextField` : void 0,
@@ -1096,8 +1096,8 @@ function Lo({
1096
1096
  })
1097
1097
  ),
1098
1098
  renderTags: () => null,
1099
- isOptionEqualToValue: (h, x) => h.id === x.id,
1100
- renderOption: (h, x, v) => {
1099
+ isOptionEqualToValue: (g, x) => g.id === x.id,
1100
+ renderOption: (g, x, v) => {
1101
1101
  if (t) {
1102
1102
  const w = on(x.label, v.inputValue, {
1103
1103
  insideWords: !0,
@@ -1105,7 +1105,7 @@ function Lo({
1105
1105
  }), M = rn(x.label, w);
1106
1106
  return /* @__PURE__ */ xe(
1107
1107
  "li",
1108
- k(a({}, h), {
1108
+ D(a({}, g), {
1109
1109
  key: x.id,
1110
1110
  "data-testid": c ? `${c}:Autocomplete:option(${x.id.toString()})` : void 0
1111
1111
  }),
@@ -1123,7 +1123,7 @@ function Lo({
1123
1123
  } else
1124
1124
  return /* @__PURE__ */ xe(
1125
1125
  "li",
1126
- k(a({}, h), {
1126
+ D(a({}, g), {
1127
1127
  key: x.id,
1128
1128
  "data-testid": c ? `${c}:option(${x.id.toString()})` : void 0
1129
1129
  }),
@@ -1132,7 +1132,7 @@ function Lo({
1132
1132
  }
1133
1133
  }
1134
1134
  ),
1135
- s.length > 0 && /* @__PURE__ */ o($, { sx: d, children: s.map((h) => /* @__PURE__ */ o(
1135
+ s.length > 0 && /* @__PURE__ */ o(y, { sx: d, children: s.map((g) => /* @__PURE__ */ o(
1136
1136
  Gt,
1137
1137
  {
1138
1138
  sx: {
@@ -1143,7 +1143,7 @@ function Lo({
1143
1143
  label: /* @__PURE__ */ o(
1144
1144
  Vt,
1145
1145
  {
1146
- title: h.tooltipContent || "",
1146
+ title: g.tooltipContent || "",
1147
1147
  placement: "bottom-start",
1148
1148
  PopperProps: {
1149
1149
  modifiers: [
@@ -1155,23 +1155,23 @@ function Lo({
1155
1155
  }
1156
1156
  ]
1157
1157
  },
1158
- children: /* @__PURE__ */ o(T, { style: { whiteSpace: "normal" }, children: h.chipLabel ? h.chipLabel : h.label })
1158
+ children: /* @__PURE__ */ o(B, { style: { whiteSpace: "normal" }, children: g.chipLabel ? g.chipLabel : g.label })
1159
1159
  }
1160
1160
  ),
1161
- "data-testid": c ? `${c}:Chip(${h.id.toString()})` : void 0,
1162
- onDelete: (x) => D(x, h.id),
1161
+ "data-testid": c ? `${c}:Chip(${g.id.toString()})` : void 0,
1162
+ onDelete: (x) => b(x, g.id),
1163
1163
  deleteIcon: /* @__PURE__ */ o(
1164
1164
  en,
1165
1165
  {
1166
- "data-testid": c ? `${c}:Chip(${h.id.toString()}):deleteIcon` : void 0
1166
+ "data-testid": c ? `${c}:Chip(${g.id.toString()}):deleteIcon` : void 0
1167
1167
  }
1168
1168
  )
1169
1169
  },
1170
- h.id
1170
+ g.id
1171
1171
  )) })
1172
1172
  ] });
1173
1173
  }
1174
- const _o = ({
1174
+ const Mo = ({
1175
1175
  lookup: e = () => L(void 0, null, function* () {
1176
1176
  }),
1177
1177
  onChange: t,
@@ -1186,11 +1186,11 @@ const _o = ({
1186
1186
  disablePortal: C = !1,
1187
1187
  preLoadedOptions: f,
1188
1188
  helperText: m = "",
1189
- disabled: g,
1190
- popupIcon: b,
1191
- disableIconFlip: y
1189
+ disabled: h,
1190
+ popupIcon: $,
1191
+ disableIconFlip: k
1192
1192
  }) => {
1193
- const [S, I] = E(""), { data: O, isLoading: P } = yt({
1193
+ const [S, I] = E(""), { data: T, isLoading: P } = yt({
1194
1194
  inputValue: S,
1195
1195
  label: n,
1196
1196
  lookup: e,
@@ -1198,45 +1198,45 @@ const _o = ({
1198
1198
  preLoadedOptions: f
1199
1199
  }), N = S.length >= p;
1200
1200
  return /* @__PURE__ */ o("div", { "data-testid": l, children: /* @__PURE__ */ o(qt, { direction: "row", spacing: 1, children: /* @__PURE__ */ o(
1201
- be,
1201
+ Se,
1202
1202
  {
1203
- sx: a(a({}, r), y ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1203
+ sx: a(a({}, r), k ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
1204
1204
  "data-testid": l ? `${l}:Autocomplete` : void 0,
1205
1205
  loading: N ? P : !1,
1206
- options: O != null ? O : [],
1207
- onChange: (D, A) => {
1208
- t(D, A);
1206
+ options: T != null ? T : [],
1207
+ onChange: (b, A) => {
1208
+ t(b, A);
1209
1209
  },
1210
1210
  disablePortal: C,
1211
- filterOptions: (D) => D,
1211
+ filterOptions: (b) => b,
1212
1212
  value: i,
1213
1213
  noOptionsText: N ? d : "Start typing to search",
1214
- getOptionLabel: (D) => D.label,
1215
- popupIcon: b,
1216
- renderInput: (D) => /* @__PURE__ */ o(
1217
- Se,
1218
- k(a({
1214
+ getOptionLabel: (b) => b.label,
1215
+ popupIcon: $,
1216
+ renderInput: (b) => /* @__PURE__ */ o(
1217
+ be,
1218
+ D(a({
1219
1219
  "data-testid": l ? `${l}:Autocomplete:TextField` : void 0
1220
- }, D), {
1220
+ }, b), {
1221
1221
  variant: c,
1222
1222
  label: n,
1223
1223
  color: s,
1224
1224
  helperText: m
1225
1225
  })
1226
1226
  ),
1227
- isOptionEqualToValue: (D, A) => D.id === A.id,
1228
- onInputChange: (D, A) => {
1227
+ isOptionEqualToValue: (b, A) => b.id === A.id,
1228
+ onInputChange: (b, A) => {
1229
1229
  I(A);
1230
1230
  },
1231
- renderOption: (D, A) => /* @__PURE__ */ xe(
1231
+ renderOption: (b, A) => /* @__PURE__ */ xe(
1232
1232
  "li",
1233
- k(a({}, D), {
1233
+ D(a({}, b), {
1234
1234
  key: A.id,
1235
1235
  "data-testid": l ? `${l}:Autocomplete:option(${A.id.toString()})` : void 0
1236
1236
  }),
1237
1237
  A.label
1238
1238
  ),
1239
- disabled: g
1239
+ disabled: h
1240
1240
  }
1241
1241
  ) }) });
1242
1242
  }, Un = (e) => {
@@ -1252,7 +1252,7 @@ const _o = ({
1252
1252
  } catch (t) {
1253
1253
  return -1;
1254
1254
  }
1255
- }, Mo = ({
1255
+ }, Ro = ({
1256
1256
  open: e = !1,
1257
1257
  closeHandler: t,
1258
1258
  setAuth0ExpiryTime: n
@@ -1265,8 +1265,8 @@ const _o = ({
1265
1265
  return K(() => {
1266
1266
  (() => L(void 0, null, function* () {
1267
1267
  if (s > 0) {
1268
- const m = yield r({ cacheMode: "off" }), g = Un(m) * 1e3;
1269
- n(g);
1268
+ const m = yield r({ cacheMode: "off" }), h = Un(m) * 1e3;
1269
+ n(h);
1270
1270
  }
1271
1271
  }))();
1272
1272
  }, [s, r, n]), /* @__PURE__ */ o(
@@ -1307,10 +1307,15 @@ function qn(e) {
1307
1307
  const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
1308
1308
  return t === "access_denied" && n.startsWith("User did not authorize the request");
1309
1309
  }
1310
- function Ro({
1310
+ function Xn(e) {
1311
+ var i;
1312
+ const t = e.error, n = (i = e == null ? void 0 : e.error_description) != null ? i : "";
1313
+ return t === "access_denied" && n.match(/Script.*time.*exceeded/);
1314
+ }
1315
+ function Ho({
1311
1316
  children: e,
1312
1317
  appName: t = "the app",
1313
- throwErrors: n,
1318
+ throwErrors: n = "none",
1314
1319
  disableConsoleLogging: i = !1,
1315
1320
  onError: r = () => {
1316
1321
  }
@@ -1328,42 +1333,51 @@ function Ro({
1328
1333
  }
1329
1334
  };
1330
1335
  d(m);
1331
- }, [c, s, l, d, r]), l && (i || console.error(
1332
- `Error detected in AuthGuard [isAuthenticated=${s},isLoading=${c}]`,
1333
- l
1334
- ), Gn(l))) {
1335
- let m = "Auth error", g = "An unknown Auth0 error occurred.", b = !1;
1336
- if (Vn(l) ? (m = "Unauthorised", g = `You are not authorised to access ${t}.`, b = !0) : qn(l) && (m = "App not authorised", g = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`, b = !0), n === "all")
1337
- throw l;
1338
- if (n === "unknown" && !b)
1336
+ }, [c, s, l, d, r]), l) {
1337
+ if (i || console.error(
1338
+ `Error detected in AuthGuard [isAuthenticated=${s},isLoading=${c}]`,
1339
+ l
1340
+ ), n === "all")
1339
1341
  throw l;
1340
- return /* @__PURE__ */ u(tt, { open: !0, children: [
1341
- /* @__PURE__ */ o(ot, { children: m }),
1342
- /* @__PURE__ */ u(it, { children: [
1343
- /* @__PURE__ */ o(T, { children: g }),
1344
- /* @__PURE__ */ o("br", {}),
1345
- /* @__PURE__ */ o(T, { variant: "subtitle2", children: "Details from Auth0" }),
1346
- /* @__PURE__ */ u(T, { variant: "body2", children: [
1347
- "error: ",
1348
- (C = l == null ? void 0 : l.error) != null ? C : "N/A"
1342
+ if (Gn(l)) {
1343
+ let m = "Auth error", h = "An unknown Auth0 error occurred.";
1344
+ if (Vn(l))
1345
+ m = "Unauthorised", h = `You are not authorised to access ${t}.`;
1346
+ else if (qn(l))
1347
+ m = "App not authorised", h = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
1348
+ else if (Xn(l))
1349
+ m = "Auth0 script execution time exceeded", h = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute.";
1350
+ else if (n === "unknown")
1351
+ throw l;
1352
+ return /* @__PURE__ */ u(tt, { open: !0, children: [
1353
+ /* @__PURE__ */ o(ot, { children: m }),
1354
+ /* @__PURE__ */ u(it, { children: [
1355
+ /* @__PURE__ */ o(B, { children: h }),
1356
+ /* @__PURE__ */ o("br", {}),
1357
+ /* @__PURE__ */ o(B, { variant: "subtitle2", children: "Details from Auth0" }),
1358
+ /* @__PURE__ */ u(B, { variant: "body2", children: [
1359
+ "error: ",
1360
+ (C = l == null ? void 0 : l.error) != null ? C : "N/A"
1361
+ ] }),
1362
+ /* @__PURE__ */ u(B, { variant: "body2", children: [
1363
+ "description: ",
1364
+ (f = l == null ? void 0 : l.error_description) != null ? f : "N/A"
1365
+ ] })
1349
1366
  ] }),
1350
- /* @__PURE__ */ u(T, { variant: "body2", children: [
1351
- "description: ",
1352
- (f = l == null ? void 0 : l.error_description) != null ? f : "N/A"
1353
- ] })
1354
- ] }),
1355
- /* @__PURE__ */ o(rt, { children: /* @__PURE__ */ o(ae, { onClick: () => p({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" }) })
1356
- ] });
1367
+ /* @__PURE__ */ o(rt, { children: /* @__PURE__ */ o(ae, { onClick: () => p({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" }) })
1368
+ ] });
1369
+ } else if (n === "unknown")
1370
+ throw l;
1357
1371
  }
1358
1372
  return s ? /* @__PURE__ */ o(F, { children: e }) : /* @__PURE__ */ o(dn, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
1359
1373
  }
1360
- const Xn = {
1374
+ const Qn = {
1361
1375
  autoHideDuration: 6e3,
1362
1376
  anchorOrigin: { vertical: "top", horizontal: "center" },
1363
1377
  // The default is false. If we prefer timer to continue when window loses
1364
1378
  // focus, change to true
1365
1379
  disableWindowBlurListener: !1
1366
- }, Qn = {
1380
+ }, Yn = {
1367
1381
  shouldClose: (e, t) => t !== "clickaway"
1368
1382
  }, qe = {
1369
1383
  message: "",
@@ -1371,18 +1385,18 @@ const Xn = {
1371
1385
  variant: "standard",
1372
1386
  progressIndicator: void 0
1373
1387
  // Can use 'circular' or 'linear'
1374
- }, Xe = 100, Qe = 2e3, Yn = 2e3, Kn = (() => {
1388
+ }, Xe = 100, Qe = 2e3, Kn = 2e3, Jn = (() => {
1375
1389
  let e = 0;
1376
1390
  return () => (e += 1, e);
1377
- })(), Jn = {
1391
+ })(), Zn = {
1378
1392
  borderBottomLeftRadius: "0px",
1379
1393
  borderBottomRightRadius: "0px"
1380
- }, Zn = {}, jn = {}, $t = Je(null);
1381
- function eo(s) {
1394
+ }, jn = {}, eo = {}, $t = Je(null);
1395
+ function to(s) {
1382
1396
  var c = s, {
1383
- overrideState: e = Zn,
1384
- overrideActions: t = jn,
1385
- shouldClose: n = Qn.shouldClose,
1397
+ overrideState: e = jn,
1398
+ overrideActions: t = eo,
1399
+ shouldClose: n = Yn.shouldClose,
1386
1400
  children: i
1387
1401
  } = c, r = Ee(c, [
1388
1402
  "overrideState",
@@ -1393,47 +1407,47 @@ function eo(s) {
1393
1407
  var x;
1394
1408
  const [{ open: l }, d] = E({ open: !1 }), p = ge([]), C = ge(Date.now()), f = ge(0), m = re((v) => {
1395
1409
  d({ open: v });
1396
- }, []), g = re((v = {}) => {
1410
+ }, []), h = re((v = {}) => {
1397
1411
  f.current += 1, p.current.length >= Xe && Date.now() - C.current >= Qe && (C.current = Date.now(), console.error(
1398
1412
  `SaladBarProvider: MAX_QUEUE_LENGTH (${Xe}) hit ${f.current} times in last ${Qe}ms)`
1399
1413
  ), f.current = 0);
1400
- const w = a(k(a({}, qe), {
1401
- key: Kn()
1414
+ const w = a(D(a({}, qe), {
1415
+ key: Jn()
1402
1416
  }), v);
1403
1417
  return p.current.push(w), p.current.length === 1 && d({ open: !0 }), w.key;
1404
- }, []), b = (v = "", w = {}) => g(a({ message: v, severity: "success" }, w)), y = (v = "", w = {}) => g(a({ message: v, severity: "info" }, w)), S = (v = "", w = {}) => g(a({ message: v, severity: "warning" }, w)), I = (v = "", w = {}) => g(a({ message: v, severity: "error" }, w)), O = (v) => {
1418
+ }, []), $ = (v = "", w = {}) => h(a({ message: v, severity: "success" }, w)), k = (v = "", w = {}) => h(a({ message: v, severity: "info" }, w)), S = (v = "", w = {}) => h(a({ message: v, severity: "warning" }, w)), I = (v = "", w = {}) => h(a({ message: v, severity: "error" }, w)), T = (v) => {
1405
1419
  const w = p.current.findIndex((M) => M.key === v);
1406
1420
  if (w !== -1)
1407
1421
  return w === 0 ? (d({ open: !1 }), p.current[0]) : p.current.splice(w, 1);
1408
1422
  }, P = (v, w) => {
1409
1423
  n(v, w) && d({ open: !1 });
1410
1424
  }, N = () => {
1411
- }, D = () => {
1425
+ }, b = () => {
1412
1426
  p.current.shift(), p.current.length > 0 && d({ open: !0 });
1413
1427
  }, A = (x = p.current[0]) != null ? x : a({}, qe), H = {};
1414
1428
  "autoHideDuration" in A && (H.autoHideDuration = A.autoHideDuration);
1415
- const W = a(a({}, Xn), r), h = a(a({
1429
+ const W = a(a({}, Qn), r), g = a(a({
1416
1430
  open: l,
1417
1431
  setOpen: m,
1418
- enqueueNotification: g,
1419
- enqueueSuccessNotification: b,
1420
- enqueueInfoNotification: y,
1432
+ enqueueNotification: h,
1433
+ enqueueSuccessNotification: $,
1434
+ enqueueInfoNotification: k,
1421
1435
  enqueueWarningNotification: S,
1422
1436
  enqueueErrorNotification: I,
1423
- removeNotification: O
1437
+ removeNotification: T
1424
1438
  }, e), t);
1425
- return /* @__PURE__ */ u($t.Provider, { value: h, children: [
1439
+ return /* @__PURE__ */ u($t.Provider, { value: g, children: [
1426
1440
  i,
1427
1441
  /* @__PURE__ */ o(
1428
1442
  Xt,
1429
- k(a(a({}, W), H), {
1443
+ D(a(a({}, W), H), {
1430
1444
  open: l,
1431
1445
  onClose: P,
1432
1446
  TransitionProps: {
1433
- onExited: D,
1447
+ onExited: b,
1434
1448
  onExit: N
1435
1449
  },
1436
- sx: { zIndex: Yn },
1450
+ sx: { zIndex: Kn },
1437
1451
  children: /* @__PURE__ */ u("div", { children: [
1438
1452
  /* @__PURE__ */ o(
1439
1453
  Qt,
@@ -1442,7 +1456,7 @@ function eo(s) {
1442
1456
  severity: A.severity,
1443
1457
  variant: "filled",
1444
1458
  icon: A.progressIndicator === "circular" ? /* @__PURE__ */ o(De, { size: "1em" }) : void 0,
1445
- style: A.progressIndicator === "linear" ? Jn : void 0,
1459
+ style: A.progressIndicator === "linear" ? Zn : void 0,
1446
1460
  children: A.message
1447
1461
  }
1448
1462
  ),
@@ -1452,27 +1466,27 @@ function eo(s) {
1452
1466
  )
1453
1467
  ] });
1454
1468
  }
1455
- function to() {
1469
+ function no() {
1456
1470
  const e = Ze($t);
1457
1471
  if (e === null)
1458
1472
  throw new ke("Error: Tried to useSaladBar outside of a <SaladBarProvider>");
1459
1473
  return e;
1460
1474
  }
1461
- const Ho = Q(
1462
- (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(eo, k(a({}, e), { overrideState: t, overrideActions: n, children: i }))
1463
- ), no = nn(), Wo = ({
1475
+ const Wo = Q(
1476
+ (e = { autoHideDuration: 1 }, t = {}, n = {}) => ({ children: i }) => /* @__PURE__ */ o(to, D(a({}, e), { overrideState: t, overrideActions: n, children: i }))
1477
+ ), oo = nn(), zo = ({
1464
1478
  children: e,
1465
1479
  store: t
1466
- }) => /* @__PURE__ */ o(pt, { store: t != null ? t : no, children: e }), It = "domainCode";
1480
+ }) => /* @__PURE__ */ o(pt, { store: t != null ? t : oo, children: e }), It = "domainCode";
1467
1481
  var Ke;
1468
1482
  const Ye = _(
1469
1483
  JSON.parse((Ke = localStorage.getItem(It)) != null ? Ke : '{"domainCode": ""}').domainCode
1470
- ), Ot = _(
1484
+ ), Tt = _(
1471
1485
  (e) => e(Ye),
1472
1486
  (e, t, n) => {
1473
1487
  t(Ye, n), localStorage.setItem(It, JSON.stringify({ domainCode: n }));
1474
1488
  }
1475
- ), oo = {
1489
+ ), io = {
1476
1490
  act: "ACT",
1477
1491
  nsw: "NSW",
1478
1492
  nt: "NT",
@@ -1484,10 +1498,10 @@ const Ye = _(
1484
1498
  ag: "AG",
1485
1499
  fedmps: "Fedmps",
1486
1500
  "": ""
1487
- }, io = (e) => {
1501
+ }, ro = (e) => {
1488
1502
  var t;
1489
- return e === null ? "N/A" : (t = oo[e]) != null ? t : "";
1490
- }, zo = ({
1503
+ return e === null ? "N/A" : (t = io[e]) != null ? t : "";
1504
+ }, Uo = ({
1491
1505
  isLoading: e,
1492
1506
  isOpen: t,
1493
1507
  onClose: n,
@@ -1495,10 +1509,10 @@ const Ye = _(
1495
1509
  applicationName: r,
1496
1510
  handleLogout: s
1497
1511
  }) => {
1498
- const [c, l] = V(Ot), [d, p] = E(c), { enqueueSuccessNotification: C } = to(), f = i.length === 0, m = !!c && !i.includes(c) && !i.includes(d), g = !c || f || m, b = () => L(void 0, null, function* () {
1499
- d ? (l(d), C(`Set domain to ${d}`), n()) : l("");
1500
- }), y = () => L(void 0, null, function* () {
1501
- c && !f && !m ? (p(c), n()) : g && s();
1512
+ const [c, l] = V(Tt), [d, p] = E(c), { enqueueSuccessNotification: C } = no(), f = i.length === 0, m = !!c && !i.includes(c) && !i.includes(d), h = !c || f || m, $ = () => L(void 0, null, function* () {
1513
+ d ? (l(d), C(`Set organisation to ${d}`), n()) : l("");
1514
+ }), k = () => L(void 0, null, function* () {
1515
+ c && !f && !m ? (p(c), n()) : h && s();
1502
1516
  });
1503
1517
  let S;
1504
1518
  return f ? S = "Unable to retrieve your active organisations. Try logging in again." : m && (S = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ u(
@@ -1508,38 +1522,38 @@ const Ye = _(
1508
1522
  dialogTitle: "Select an organisation",
1509
1523
  primaryButton: {
1510
1524
  text: "Confirm",
1511
- onClick: b,
1525
+ onClick: $,
1512
1526
  disabled: !d || f || m,
1513
1527
  buttonColor: "primary"
1514
1528
  },
1515
1529
  secondaryButton: {
1516
- text: g ? "Logout" : "Cancel",
1517
- onClick: y
1530
+ text: h ? "Logout" : "Cancel",
1531
+ onClick: k
1518
1532
  },
1519
- onClose: g ? () => {
1533
+ onClose: h ? () => {
1520
1534
  } : n,
1521
1535
  children: [
1522
- /* @__PURE__ */ u(T, { marginBottom: 2, children: [
1536
+ /* @__PURE__ */ u(B, { marginBottom: 2, children: [
1523
1537
  "Select the default organisation that you want to use with the ",
1524
1538
  r,
1525
1539
  "."
1526
1540
  ] }),
1527
1541
  /* @__PURE__ */ o(
1528
- be,
1542
+ Se,
1529
1543
  {
1530
1544
  loading: e,
1531
1545
  multiple: !1,
1532
1546
  disableClearable: !1,
1533
1547
  value: d !== "" ? d : null,
1534
- onChange: (I, O) => p(O != null ? O : ""),
1535
- getOptionLabel: io,
1548
+ onChange: (I, T) => p(T != null ? T : ""),
1549
+ getOptionLabel: ro,
1536
1550
  options: [...i],
1537
1551
  renderInput: (I) => /* @__PURE__ */ o(
1538
- Se,
1539
- k(a({}, I), {
1552
+ be,
1553
+ D(a({}, I), {
1540
1554
  variant: "filled",
1541
1555
  label: "Select organisation",
1542
- InputProps: k(a({}, I.InputProps), {
1556
+ InputProps: D(a({}, I.InputProps), {
1543
1557
  endAdornment: /* @__PURE__ */ u(F, { children: [
1544
1558
  e ? /* @__PURE__ */ o(De, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
1545
1559
  I.InputProps.endAdornment
@@ -1553,7 +1567,7 @@ const Ye = _(
1553
1567
  ]
1554
1568
  }
1555
1569
  );
1556
- }, Uo = at({
1570
+ }, Go = at({
1557
1571
  palette: {
1558
1572
  primary: {
1559
1573
  dark: "#00A651",
@@ -1604,7 +1618,7 @@ const Ye = _(
1604
1618
  navBar: {
1605
1619
  backgroundColor: "#E8E8E8"
1606
1620
  }
1607
- }), Go = at({
1621
+ }), Vo = at({
1608
1622
  palette: {
1609
1623
  primary: {
1610
1624
  main: "#007236",
@@ -1698,77 +1712,77 @@ const Ye = _(
1698
1712
  navBar: {
1699
1713
  backgroundColor: "#E8E8E8"
1700
1714
  }
1701
- }), ro = {
1702
- domainCode: Ot,
1715
+ }), ao = {
1716
+ domainCode: Tt,
1703
1717
  navBarOpen: Z,
1704
1718
  navBarWidthOpen: wt,
1705
1719
  navBarWidthClosed: At,
1706
1720
  titleText: ve,
1707
- topBarHeight: bt,
1708
- navBarTop: St
1709
- }, Vo = Q(() => ({ children: e }) => /* @__PURE__ */ o(pt, { children: e })), ao = ({
1721
+ topBarHeight: St,
1722
+ navBarTop: bt
1723
+ }, qo = Q(() => ({ children: e }) => /* @__PURE__ */ o(pt, { children: e })), so = ({
1710
1724
  initialValues: e,
1711
1725
  children: t
1712
- }) => (ut(e), /* @__PURE__ */ o(F, { children: t })), qo = Q(
1726
+ }) => (ut(e), /* @__PURE__ */ o(F, { children: t })), Xo = Q(
1713
1727
  (e) => ({ children: t }) => /* @__PURE__ */ o(
1714
- ao,
1728
+ so,
1715
1729
  {
1716
1730
  initialValues: Object.entries(e).map(
1717
1731
  ([n, i]) => [
1718
- ro[n],
1732
+ ao[n],
1719
1733
  i
1720
1734
  ]
1721
1735
  ),
1722
1736
  children: t
1723
1737
  }
1724
1738
  )
1725
- ), Xo = Q(() => ({ children: e }) => {
1739
+ ), Qo = Q(() => ({ children: e }) => {
1726
1740
  const t = new sn();
1727
1741
  return /* @__PURE__ */ o(ln, { client: t, children: e });
1728
1742
  });
1729
1743
  export {
1730
1744
  kt as AgDialog,
1731
- No as AppLayout,
1732
- Wo as AtomProvider,
1733
- Ro as AuthGuard,
1745
+ Lo as AppLayout,
1746
+ zo as AtomProvider,
1747
+ Ho as AuthGuard,
1734
1748
  $t as Context,
1735
1749
  ke as ContextError,
1736
- zo as DomainCodeDialog,
1737
- Io as ExampleComponent,
1738
- Lo as FetchAutocomplete,
1739
- ao as HydrateAtoms,
1750
+ Uo as DomainCodeDialog,
1751
+ To as ExampleComponent,
1752
+ _o as FetchAutocomplete,
1753
+ so as HydrateAtoms,
1740
1754
  ft as NAVBAR_WIDTH_CLOSED,
1741
1755
  gt as NAVBAR_WIDTH_OPENED,
1742
- Fo as NavBar,
1743
- Bo as NavBarDarkStyledList,
1744
- Eo as NavBarLightStyledList,
1756
+ Po as NavBar,
1757
+ Eo as NavBarDarkStyledList,
1758
+ Fo as NavBarLightStyledList,
1745
1759
  Cn as NavBarProvider,
1746
- Po as PageLayout,
1747
- eo as SaladBarProvider,
1748
- Mo as SessionExpiryDialog,
1749
- _o as SingleAutocomplete,
1750
- no as atomStore,
1760
+ No as PageLayout,
1761
+ to as SaladBarProvider,
1762
+ Ro as SessionExpiryDialog,
1763
+ Mo as SingleAutocomplete,
1764
+ oo as atomStore,
1751
1765
  vn as buildNavBarState,
1752
- Ot as domainCodeAtom,
1753
- Uo as fed21Theme,
1766
+ Tt as domainCodeAtom,
1767
+ Go as fed21Theme,
1754
1768
  Un as getAuth0Expiry,
1755
- Go as internalAgSystemsTheme,
1769
+ Vo as internalAgSystemsTheme,
1756
1770
  q as navBarClasses,
1757
1771
  Z as navBarOpenAtom,
1758
- St as navBarTopAtom,
1772
+ bt as navBarTopAtom,
1759
1773
  At as navBarWidthClosedAtom,
1760
1774
  wt as navBarWidthOpenAtom,
1761
1775
  ve as titleTextAtom,
1762
- bt as topBarHeightAtom,
1763
- Bn as topBarMiddleAtom,
1776
+ St as topBarHeightAtom,
1777
+ On as topBarMiddleAtom,
1764
1778
  yt as useAutocompleteOptions,
1765
1779
  xn as useNavBar,
1766
- to as useSaladBar,
1767
- Vo as withAtomProvider,
1768
- To as withBrowserRouter,
1769
- Oo as withNavBarProvider,
1770
- qo as withOverrideDefaults,
1771
- Xo as withQueryClient,
1772
- Ho as withSaladBarProvider
1780
+ no as useSaladBar,
1781
+ qo as withAtomProvider,
1782
+ Oo as withBrowserRouter,
1783
+ Bo as withNavBarProvider,
1784
+ Xo as withOverrideDefaults,
1785
+ Qo as withQueryClient,
1786
+ Wo as withSaladBarProvider
1773
1787
  };
1774
1788
  //# sourceMappingURL=index.js.map