@australiangreens/ag-internal-components 0.3.7 → 0.3.8

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,147 +1,147 @@
1
1
  var ot = Object.defineProperty, nt = Object.defineProperties;
2
2
  var it = Object.getOwnPropertyDescriptors;
3
- var X = Object.getOwnPropertySymbols;
3
+ var J = Object.getOwnPropertySymbols;
4
4
  var pe = Object.prototype.hasOwnProperty, he = Object.prototype.propertyIsEnumerable;
5
- var te = (e, t, o) => t in e ? ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, u = (e, t) => {
5
+ var ie = (e, t, o) => t in e ? ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, d = (e, t) => {
6
6
  for (var o in t || (t = {}))
7
- pe.call(t, o) && te(e, o, t[o]);
8
- if (X)
9
- for (var o of X(t))
10
- he.call(t, o) && te(e, o, t[o]);
7
+ pe.call(t, o) && ie(e, o, t[o]);
8
+ if (J)
9
+ for (var o of J(t))
10
+ he.call(t, o) && ie(e, o, t[o]);
11
11
  return e;
12
12
  }, b = (e, t) => nt(e, it(t));
13
13
  var fe = (e, t) => {
14
14
  var o = {};
15
- for (var n in e)
16
- pe.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
17
- if (e != null && X)
18
- for (var n of X(e))
19
- t.indexOf(n) < 0 && he.call(e, n) && (o[n] = e[n]);
15
+ for (var i in e)
16
+ pe.call(e, i) && t.indexOf(i) < 0 && (o[i] = e[i]);
17
+ if (e != null && J)
18
+ for (var i of J(e))
19
+ t.indexOf(i) < 0 && he.call(e, i) && (o[i] = e[i]);
20
20
  return o;
21
21
  };
22
- var me = (e, t, o) => te(e, typeof t != "symbol" ? t + "" : t, o);
23
- var M = (e, t, o) => new Promise((n, s) => {
24
- var a = (c) => {
22
+ var me = (e, t, o) => ie(e, typeof t != "symbol" ? t + "" : t, o);
23
+ var N = (e, t, o) => new Promise((i, s) => {
24
+ var a = (l) => {
25
25
  try {
26
- r(o.next(c));
27
- } catch (l) {
28
- s(l);
26
+ r(o.next(l));
27
+ } catch (c) {
28
+ s(c);
29
29
  }
30
- }, p = (c) => {
30
+ }, u = (l) => {
31
31
  try {
32
- r(o.throw(c));
33
- } catch (l) {
34
- s(l);
32
+ r(o.throw(l));
33
+ } catch (c) {
34
+ s(c);
35
35
  }
36
- }, r = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(a, p);
36
+ }, r = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(a, u);
37
37
  r((o = o.apply(e, t)).next());
38
38
  });
39
- import { jsxs as m, Fragment as $, jsx as i } from "react/jsx-runtime";
40
- import { useState as z, createElement as ie, useEffect as ge, useMemo as rt, createContext as st, useRef as oe, useCallback as xe, useContext as at } from "react";
41
- import { Typography as I, Button as q, Paper as Te, Dialog as $e, LinearProgress as Le, DialogTitle as Oe, DialogContent as Re, DialogActions as Ue, Autocomplete as re, TextField as se, CircularProgress as ae, Box as P, Chip as lt, Tooltip as ct, Stack as dt, Snackbar as ut, Alert as pt, FormHelperText as ht, useTheme as Z, useMediaQuery as ft, Drawer as mt, Collapse as gt, Avatar as Ae, Fade as xt, Skeleton as Ce, Toolbar as At, Divider as Se, Container as Ct, IconButton as St } from "@mui/material";
42
- import { Cancel as vt, ArrowDropDown as wt, ViewHeadline as Dt } from "@mui/icons-material";
39
+ import { jsxs as m, Fragment as M, jsx as n } from "react/jsx-runtime";
40
+ import { useState as G, createElement as ae, useEffect as ge, useMemo as rt, createContext as st, useRef as re, useCallback as xe, useContext as at } from "react";
41
+ import { Typography as I, Button as q, Paper as $e, Dialog as Me, LinearProgress as Le, DialogTitle as Oe, DialogContent as Re, DialogActions as Ue, Autocomplete as le, TextField as ce, CircularProgress as te, Box as P, Chip as lt, Tooltip as ct, Stack as dt, Snackbar as ut, Alert as pt, FormHelperText as ht, useTheme as oe, useMediaQuery as ft, Drawer as mt, Collapse as gt, Avatar as Ae, Fade as xt, Skeleton as Ce, Toolbar as At, Divider as Se, Container as Ct, IconButton as St } from "@mui/material";
42
+ import { Cancel as wt, ArrowDropDown as vt, ViewHeadline as Dt } from "@mui/icons-material";
43
43
  import kt from "autosuggest-highlight/match";
44
44
  import yt from "autosuggest-highlight/parse";
45
45
  import { useQuery as Be } from "@tanstack/react-query";
46
- import { useAuth0 as le } from "@auth0/auth0-react";
46
+ import { useAuth0 as de } from "@auth0/auth0-react";
47
47
  import { Buffer as bt } from "buffer";
48
48
  import Ft from "@mui/material/Skeleton";
49
- import { atom as T, useAtom as H, useSetAtom as He, useAtomValue as ve } from "jotai";
49
+ import { atom as L, useAtom as W, useSetAtom as He, useAtomValue as we } from "jotai";
50
50
  import { createHelper as Et } from "souvlaki";
51
51
  import _t from "@mui/material/CssBaseline";
52
- import we from "@mui/material/Box";
52
+ import ve from "@mui/material/Box";
53
53
  import { useHydrateAtoms as It } from "jotai/utils";
54
- import { styled as We, createTheme as qe, alpha as ne } from "@mui/material/styles";
54
+ import { styled as We, createTheme as ze, alpha as se } from "@mui/material/styles";
55
55
  import De from "react-avatar";
56
- function Mo({ text: e }) {
57
- const [t, o] = z(0);
58
- return /* @__PURE__ */ m($, { children: [
59
- /* @__PURE__ */ i(I, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
60
- /* @__PURE__ */ i(I, { variant: "caption", display: "block", children: /* @__PURE__ */ i("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
61
- /* @__PURE__ */ i(
56
+ function To({ text: e }) {
57
+ const [t, o] = G(0);
58
+ return /* @__PURE__ */ m(M, { children: [
59
+ /* @__PURE__ */ n(I, { variant: "h6", color: "inherit", component: "div", sx: { fontSize: "22px" }, children: "Hello world" }),
60
+ /* @__PURE__ */ n(I, { variant: "caption", display: "block", children: /* @__PURE__ */ n("span", { children: "Just ensuring MUI is working as planned as a peer dependency. v0.0.11" }) }),
61
+ /* @__PURE__ */ n(
62
62
  q,
63
63
  {
64
64
  variant: "outlined",
65
- onClick: () => o((n) => n + 1),
65
+ onClick: () => o((i) => i + 1),
66
66
  "aria-label": "Increment",
67
67
  children: "Hello I am a button"
68
68
  }
69
69
  ),
70
70
  /* @__PURE__ */ m("p", { children: [
71
71
  "This is some text: ",
72
- /* @__PURE__ */ i("span", { children: e })
72
+ /* @__PURE__ */ n("span", { children: e })
73
73
  ] }),
74
- /* @__PURE__ */ m(Te, { children: [
74
+ /* @__PURE__ */ m($e, { children: [
75
75
  "This number will incremember when button pressed: ",
76
76
  t
77
77
  ] })
78
78
  ] });
79
79
  }
80
- const ze = ({
80
+ const qe = ({
81
81
  isOpen: e,
82
82
  dialogTitle: t,
83
83
  children: o,
84
- maxWidth: n,
84
+ maxWidth: i,
85
85
  primaryButton: s,
86
86
  secondaryButton: a,
87
- additionalButtons: p,
87
+ additionalButtons: u,
88
88
  onClose: r,
89
- sx: c,
90
- "data-testid": l,
89
+ sx: l,
90
+ "data-testid": c,
91
91
  disableCloseOnBackdropOrEscape: x = !1,
92
- isLoading: C = !1
92
+ isLoading: A = !1
93
93
  }) => {
94
- var w, k;
95
- const [v, g] = z(!1);
94
+ var S, y;
95
+ const [D, g] = G(!1);
96
96
  return /* @__PURE__ */ m(
97
- $e,
97
+ Me,
98
98
  {
99
99
  open: e,
100
- onClose: (f, D) => M(null, null, function* () {
101
- x && (D === "backdropClick" || D === "escapeKeyDown") || v || (a != null && a.onClick ? yield a.onClick() : r());
100
+ onClose: (h, k) => N(null, null, function* () {
101
+ x && (k === "backdropClick" || k === "escapeKeyDown") || D || (a != null && a.onClick ? yield a.onClick() : r());
102
102
  }),
103
103
  fullWidth: !0,
104
- maxWidth: n != null ? n : "xs",
105
- "data-testid": l,
106
- sx: c,
104
+ maxWidth: i != null ? i : "xs",
105
+ "data-testid": c,
106
+ sx: l,
107
107
  children: [
108
- C && /* @__PURE__ */ i(Le, { sx: { height: "4px", marginBottom: "-4px" } }),
109
- /* @__PURE__ */ i(Oe, { children: t }),
110
- /* @__PURE__ */ i(Re, { sx: { "& > :last-child": { marginBottom: 0 } }, children: o }),
108
+ A && /* @__PURE__ */ n(Le, { sx: { height: "4px", marginBottom: "-4px" } }),
109
+ /* @__PURE__ */ n(Oe, { children: t }),
110
+ /* @__PURE__ */ n(Re, { sx: { "& > :last-child": { marginBottom: 0 } }, children: o }),
111
111
  /* @__PURE__ */ m(Ue, { children: [
112
- /* @__PURE__ */ i(
112
+ /* @__PURE__ */ n(
113
113
  q,
114
114
  {
115
- onClick: (w = a == null ? void 0 : a.onClick) != null ? w : r,
115
+ onClick: (S = a == null ? void 0 : a.onClick) != null ? S : r,
116
116
  "data-testid": a == null ? void 0 : a.testId,
117
- disabled: (a == null ? void 0 : a.disabled) || v,
117
+ disabled: (a == null ? void 0 : a.disabled) || D,
118
118
  color: a == null ? void 0 : a.buttonColor,
119
- children: (k = a == null ? void 0 : a.text) != null ? k : "Cancel"
119
+ children: (y = a == null ? void 0 : a.text) != null ? y : "Cancel"
120
120
  }
121
121
  ),
122
- p && p.map((f, D) => {
123
- var y;
124
- return /* @__PURE__ */ i(
122
+ u && u.map((h, k) => {
123
+ var F;
124
+ return /* @__PURE__ */ n(
125
125
  q,
126
126
  {
127
- onClick: f == null ? void 0 : f.onClick,
128
- "data-testid": f == null ? void 0 : f.testId,
129
- disabled: (f == null ? void 0 : f.disabled) || v,
130
- color: f == null ? void 0 : f.buttonColor,
131
- children: (y = f.text) != null ? y : `Button ${D}`
127
+ onClick: h == null ? void 0 : h.onClick,
128
+ "data-testid": h == null ? void 0 : h.testId,
129
+ disabled: (h == null ? void 0 : h.disabled) || D,
130
+ color: h == null ? void 0 : h.buttonColor,
131
+ children: (F = h.text) != null ? F : `Button ${k}`
132
132
  },
133
- D
133
+ k
134
134
  );
135
135
  }),
136
- s && /* @__PURE__ */ i(
136
+ s && /* @__PURE__ */ n(
137
137
  q,
138
138
  {
139
- onClick: () => M(null, null, function* () {
140
- var f;
141
- g(!0), yield (f = s.onClick) == null ? void 0 : f.call(s), g(!1);
139
+ onClick: () => N(null, null, function* () {
140
+ var h;
141
+ g(!0), yield (h = s.onClick) == null ? void 0 : h.call(s), g(!1);
142
142
  }),
143
143
  "data-testid": s.testId,
144
- disabled: s.disabled || v,
144
+ disabled: s.disabled || D,
145
145
  color: s == null ? void 0 : s.buttonColor,
146
146
  children: s.text
147
147
  }
@@ -167,120 +167,120 @@ const ze = ({
167
167
  minLength: e,
168
168
  preLoadedOptions: t,
169
169
  lookup: o,
170
- label: n,
170
+ label: i,
171
171
  inputValue: s
172
172
  }) => Be({
173
173
  queryFn: () => e && s.length < e ? t != null ? t : [] : t ? t.filter(
174
174
  (a) => a.label.toLowerCase().includes(s.toLowerCase())
175
175
  ) : o(s),
176
- queryKey: ["autocomplete", n, s]
176
+ queryKey: ["autocomplete", i, s]
177
177
  });
178
178
  function No({
179
- lookup: e = () => M(null, null, function* () {
179
+ lookup: e = () => N(null, null, function* () {
180
180
  }),
181
181
  enableHighlighting: t = !0,
182
182
  onChange: o,
183
- onInputChange: n,
183
+ onInputChange: i,
184
184
  minLength: s = 0,
185
185
  label: a,
186
- value: p,
186
+ value: u,
187
187
  "data-testid": r,
188
- sx: c,
189
- boxSx: l,
188
+ sx: l,
189
+ boxSx: c,
190
190
  textFieldColor: x,
191
- textFieldVariant: C = "filled",
192
- textFieldFocused: v,
191
+ textFieldVariant: A = "filled",
192
+ textFieldFocused: D,
193
193
  textFieldSx: g,
194
- loadingText: w = "Loading...",
195
- noOptionsText: k = "No options",
196
- popupIcon: f = /* @__PURE__ */ i(wt, {}),
197
- error: D = !1,
198
- helperText: y = "",
199
- preLoadedOptions: E = void 0,
200
- disablePortal: G = !1,
201
- disableIconFlip: R = !1,
194
+ loadingText: S = "Loading...",
195
+ noOptionsText: y = "No options",
196
+ popupIcon: h = /* @__PURE__ */ n(vt, {}),
197
+ error: k = !1,
198
+ helperText: F = "",
199
+ preLoadedOptions: T = void 0,
200
+ disablePortal: V = !1,
201
+ disableIconFlip: K = !1,
202
202
  chipToolTipSlotProps: _ = Pt,
203
- placeholderText: U = void 0,
204
- onRightClick: L = () => {
203
+ placeholderText: O = void 0,
204
+ onRightClick: X = () => {
205
205
  },
206
- disableDefaultRightClickBehaviour: B = !1,
207
- readOnly: O,
208
- hideInputEndAdornment: S
206
+ disableDefaultRightClickBehaviour: U = !1,
207
+ readOnly: R,
208
+ hideInputEndAdornment: v
209
209
  }) {
210
- const [d, F] = z(""), V = (h, A) => {
211
- const N = p.filter((ee) => ee.id !== A);
212
- o(N, "delete", h);
213
- }, { data: j, isLoading: ce } = Ve({
214
- inputValue: d,
210
+ const [C, B] = G(""), Q = (p, w) => {
211
+ const $ = u.filter((ne) => ne.id !== w);
212
+ o($, "delete", p);
213
+ }, { data: f, isLoading: E } = Ve({
214
+ inputValue: C,
215
215
  label: a,
216
216
  lookup: e,
217
217
  minLength: s,
218
- preLoadedOptions: E
219
- }), de = d.length >= s;
218
+ preLoadedOptions: T
219
+ }), H = C.length >= s;
220
220
  return /* @__PURE__ */ m("div", { "data-testid": r, children: [
221
- /* @__PURE__ */ i(
222
- re,
221
+ /* @__PURE__ */ n(
222
+ le,
223
223
  {
224
- sx: u(u({}, c), R ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
224
+ sx: d(d({}, l), K ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
225
225
  "data-testid": r ? `${r}:Autocomplete` : void 0,
226
- disablePortal: G,
226
+ disablePortal: V,
227
227
  multiple: !0,
228
- getOptionLabel: (h) => typeof h == "string" ? h : h.label,
229
- loading: de ? ce : !1,
230
- options: [...p, ...j != null ? j : []],
228
+ getOptionLabel: (p) => typeof p == "string" ? p : p.label,
229
+ loading: H ? E : !1,
230
+ options: [...u, ...f != null ? f : []],
231
231
  filterSelectedOptions: !0,
232
232
  includeInputInList: !0,
233
- value: p,
234
- onChange: (h, A, N) => {
235
- o(A, N, h);
233
+ value: u,
234
+ onChange: (p, w, $) => {
235
+ o(w, $, p);
236
236
  },
237
- onInputChange: (h, A, N) => {
238
- F(A), n && n(p, N, h);
237
+ onInputChange: (p, w, $) => {
238
+ B(w), i && i(u, $, p);
239
239
  },
240
- noOptionsText: de ? k : "Start typing to search",
241
- loadingText: w,
242
- popupIcon: f,
243
- renderInput: (h) => /* @__PURE__ */ i(
244
- se,
245
- b(u({}, h), {
240
+ noOptionsText: H ? y : "Start typing to search",
241
+ loadingText: S,
242
+ popupIcon: h,
243
+ renderInput: (p) => /* @__PURE__ */ n(
244
+ ce,
245
+ b(d({}, p), {
246
246
  label: a,
247
247
  fullWidth: !0,
248
- variant: C,
249
- error: D,
250
- helperText: y,
248
+ variant: A,
249
+ error: k,
250
+ helperText: F,
251
251
  slotProps: {
252
- input: b(u({}, h.InputProps), {
253
- endAdornment: S ? void 0 : /* @__PURE__ */ m($, { children: [
254
- ce ? /* @__PURE__ */ i(ae, { color: "inherit", size: 20 }) : null,
255
- h.InputProps.endAdornment
252
+ input: b(d({}, p.InputProps), {
253
+ endAdornment: v ? void 0 : /* @__PURE__ */ m(M, { children: [
254
+ E ? /* @__PURE__ */ n(te, { color: "inherit", size: 20 }) : null,
255
+ p.InputProps.endAdornment
256
256
  ] })
257
257
  })
258
258
  },
259
259
  "data-testid": r ? `${r}:Autocomplete:TextField` : void 0,
260
- onKeyDown: (A) => {
261
- (A.key === "Backspace" || A.key === "Delete") && A.stopPropagation();
260
+ onKeyDown: (w) => {
261
+ (w.key === "Backspace" || w.key === "Delete") && w.stopPropagation();
262
262
  },
263
263
  color: x,
264
- placeholder: U,
264
+ placeholder: O,
265
265
  sx: g,
266
- focused: v
266
+ focused: D
267
267
  })
268
268
  ),
269
269
  renderValue: () => null,
270
- isOptionEqualToValue: (h, A) => h.id === A.id,
271
- renderOption: (h, A, N) => {
270
+ isOptionEqualToValue: (p, w) => p.id === w.id,
271
+ renderOption: (p, w, $) => {
272
272
  if (t) {
273
- const ee = kt(A.label, N.inputValue, {
273
+ const ne = kt(w.label, $.inputValue, {
274
274
  insideWords: !0,
275
275
  findAllOccurrences: !0
276
- }), et = yt(A.label, ee);
277
- return /* @__PURE__ */ ie(
276
+ }), et = yt(w.label, ne);
277
+ return /* @__PURE__ */ ae(
278
278
  "li",
279
- b(u({}, h), {
280
- key: A.id,
281
- "data-testid": r ? `${r}:Autocomplete:option(${A.id.toString()})` : void 0
279
+ b(d({}, p), {
280
+ key: w.id,
281
+ "data-testid": r ? `${r}:Autocomplete:option(${w.id.toString()})` : void 0
282
282
  }),
283
- /* @__PURE__ */ i("div", { children: et.map((ue, tt) => /* @__PURE__ */ i(
283
+ /* @__PURE__ */ n("div", { children: et.map((ue, tt) => /* @__PURE__ */ n(
284
284
  "span",
285
285
  {
286
286
  style: {
@@ -292,27 +292,27 @@ function No({
292
292
  )) })
293
293
  );
294
294
  } else
295
- return /* @__PURE__ */ ie(
295
+ return /* @__PURE__ */ ae(
296
296
  "li",
297
- b(u({}, h), {
298
- key: A.id,
299
- "data-testid": r ? `${r}:option(${A.id.toString()})` : void 0
297
+ b(d({}, p), {
298
+ key: w.id,
299
+ "data-testid": r ? `${r}:option(${w.id.toString()})` : void 0
300
300
  }),
301
- A.label
301
+ w.label
302
302
  );
303
303
  },
304
- onMouseDownCapture: (h) => {
305
- h.button === Ge.right && B && (h.preventDefault(), h.stopPropagation());
304
+ onMouseDownCapture: (p) => {
305
+ p.button === Ge.right && U && (p.preventDefault(), p.stopPropagation());
306
306
  },
307
- onContextMenuCapture: (h) => {
308
- B && (h.preventDefault(), h.stopPropagation()), L(h);
307
+ onContextMenuCapture: (p) => {
308
+ U && (p.preventDefault(), p.stopPropagation()), X(p);
309
309
  },
310
- readOnly: O
310
+ readOnly: R
311
311
  }
312
312
  ),
313
- p.length > 0 && /* @__PURE__ */ i(P, { sx: l, children: p.map((h) => {
314
- var A;
315
- return /* @__PURE__ */ i(
313
+ u.length > 0 && /* @__PURE__ */ n(P, { sx: c, children: u.map((p) => {
314
+ var w;
315
+ return /* @__PURE__ */ n(
316
316
  lt,
317
317
  {
318
318
  sx: {
@@ -320,140 +320,144 @@ function No({
320
320
  marginRight: 1,
321
321
  height: "auto"
322
322
  },
323
- label: /* @__PURE__ */ i(
323
+ label: /* @__PURE__ */ n(
324
324
  ct,
325
325
  {
326
- title: (A = h.tooltipContent) != null ? A : "",
326
+ title: (w = p.tooltipContent) != null ? w : "",
327
327
  placement: "bottom-start",
328
328
  slotProps: _,
329
- children: /* @__PURE__ */ i(I, { style: { whiteSpace: "normal" }, children: h.chipLabel ? h.chipLabel : h.label })
329
+ children: /* @__PURE__ */ n(I, { style: { whiteSpace: "normal" }, children: p.chipLabel ? p.chipLabel : p.label })
330
330
  }
331
331
  ),
332
- "data-testid": r ? `${r}:Chip(${h.id.toString()})` : void 0,
333
- onDelete: (N) => V(N, h.id),
334
- deleteIcon: /* @__PURE__ */ i(
335
- vt,
332
+ "data-testid": r ? `${r}:Chip(${p.id.toString()})` : void 0,
333
+ onDelete: ($) => Q($, p.id),
334
+ deleteIcon: /* @__PURE__ */ n(
335
+ wt,
336
336
  {
337
- "data-testid": r ? `${r}:Chip(${h.id.toString()}):deleteIcon` : void 0
337
+ "data-testid": r ? `${r}:Chip(${p.id.toString()}):deleteIcon` : void 0
338
338
  }
339
339
  )
340
340
  },
341
- h.id
341
+ p.id
342
342
  );
343
343
  }) })
344
344
  ] });
345
345
  }
346
- const To = /MUI: The value provided to.*is invalid/i, $o = ({
347
- lookup: e = () => M(null, null, function* () {
346
+ const $o = /MUI: The value provided to.*is invalid/i, Mo = ({
347
+ lookup: e = () => N(null, null, function* () {
348
348
  }),
349
349
  onChange: t,
350
350
  onInputChange: o,
351
- label: n,
351
+ label: i,
352
352
  value: s,
353
353
  sx: a,
354
- textFieldColor: p,
354
+ textFieldColor: u,
355
355
  textFieldVariant: r = "filled",
356
- error: c = !1,
357
- "data-testid": l,
358
- noOptionsText: x = "No options",
359
- minLength: C = 3,
360
- disablePortal: v = !1,
361
- preLoadedOptions: g,
362
- helperText: w = "",
363
- disabled: k,
364
- popupIcon: f,
365
- disableIconFlip: D,
366
- isTemplatePlaceholder: y = !1,
367
- placeholderText: E = void 0,
368
- onRightClick: G = () => {
356
+ textFieldFocused: l,
357
+ textFieldSx: c,
358
+ error: x = !1,
359
+ "data-testid": A,
360
+ loadingText: D = "Loading...",
361
+ noOptionsText: g = "No options",
362
+ minLength: S = 3,
363
+ disablePortal: y = !1,
364
+ preLoadedOptions: h,
365
+ helperText: k = "",
366
+ disabled: F,
367
+ popupIcon: T,
368
+ disableIconFlip: V,
369
+ placeholderText: K = void 0,
370
+ onRightClick: _ = () => {
369
371
  },
370
- disableDefaultRightClickBehaviour: R = !1
372
+ disableDefaultRightClickBehaviour: O = !1,
373
+ readOnly: X,
374
+ hideInputEndAdornment: U
371
375
  }) => {
372
- const [_, U] = z(""), { data: L, isLoading: B } = Ve({
373
- inputValue: _,
374
- label: n,
376
+ const [R, v] = G(""), { data: C, isLoading: B } = Ve({
377
+ inputValue: R,
378
+ label: i,
375
379
  lookup: e,
376
- minLength: C != null ? C : 0,
377
- preLoadedOptions: g
378
- }), O = _.length >= C, S = y ? {
379
- sx: {
380
- "& .MuiFilledInput-root.Mui-focused": {
381
- backgroundColor: "hsla(201, 98%, 41%, 0.08)"
382
- },
383
- "& .MuiOutlinedInput-root.Mui-focused": {
384
- backgroundColor: "hsla(201, 98%, 41%, 0.08)"
385
- }
386
- },
387
- focused: !0,
388
- slotProps: { input: { endAdornment: void 0 } }
389
- } : {};
390
- return /* @__PURE__ */ i("div", { "data-testid": l, children: /* @__PURE__ */ i(
380
+ minLength: S != null ? S : 0,
381
+ preLoadedOptions: h
382
+ }), Q = R.length >= S;
383
+ return /* @__PURE__ */ n("div", { "data-testid": A, children: /* @__PURE__ */ n(
391
384
  dt,
392
385
  {
393
386
  direction: "row",
394
387
  spacing: 1,
395
- onMouseDownCapture: (d) => {
396
- d.button === Ge.right && R && (d.preventDefault(), d.stopPropagation());
388
+ onMouseDownCapture: (f) => {
389
+ f.button === Ge.right && O && (f.preventDefault(), f.stopPropagation());
397
390
  },
398
- onContextMenuCapture: (d) => {
399
- R && (d.preventDefault(), d.stopPropagation()), G(d);
391
+ onContextMenuCapture: (f) => {
392
+ O && (f.preventDefault(), f.stopPropagation()), _(f);
400
393
  },
401
- children: /* @__PURE__ */ i(
402
- re,
394
+ children: /* @__PURE__ */ n(
395
+ le,
403
396
  {
404
- sx: u(u({}, a), D ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
405
- "data-testid": l ? `${l}:Autocomplete` : void 0,
406
- loading: O ? B : !1,
407
- options: L != null ? L : [],
408
- onChange: (d, F, V) => {
409
- t(d, F, V);
397
+ sx: d(d({}, a), V ? { ".MuiAutocomplete-popupIndicatorOpen": { transform: "rotate(0deg)" } } : {}),
398
+ "data-testid": A ? `${A}:Autocomplete` : void 0,
399
+ loading: Q ? B : !1,
400
+ options: C != null ? C : [],
401
+ onChange: (f, E, H) => {
402
+ t(f, E, H);
410
403
  },
411
- disablePortal: v,
412
- filterOptions: (d) => d,
404
+ disablePortal: y,
405
+ filterOptions: (f) => f,
413
406
  value: s,
414
- noOptionsText: O ? x : "Start typing to search",
415
- getOptionLabel: (d) => d.label,
416
- popupIcon: f,
417
- renderInput: (d) => /* @__PURE__ */ i(
418
- se,
419
- u(b(u({
420
- "data-testid": l ? `${l}:Autocomplete:TextField` : void 0
421
- }, d), {
407
+ noOptionsText: Q ? g : "Start typing to search",
408
+ loadingText: D,
409
+ getOptionLabel: (f) => f.label,
410
+ popupIcon: T,
411
+ renderInput: (f) => /* @__PURE__ */ n(
412
+ ce,
413
+ b(d({
414
+ "data-testid": A ? `${A}:Autocomplete:TextField` : void 0
415
+ }, f), {
422
416
  variant: r,
423
- label: n,
424
- color: p,
425
- error: c,
426
- helperText: w,
427
- placeholder: E != null ? E : y ? "Placeholder field" : void 0
428
- }), S)
417
+ label: i,
418
+ color: u,
419
+ error: x,
420
+ helperText: k,
421
+ slotProps: {
422
+ input: b(d({}, f.InputProps), {
423
+ endAdornment: U ? void 0 : /* @__PURE__ */ m(M, { children: [
424
+ B ? /* @__PURE__ */ n(te, { color: "inherit", size: 20 }) : null,
425
+ f.InputProps.endAdornment
426
+ ] })
427
+ })
428
+ },
429
+ placeholder: K,
430
+ sx: c,
431
+ focused: l
432
+ })
429
433
  ),
430
- isOptionEqualToValue: (d, F) => d.id === F.id,
431
- onInputChange: (d, F, V) => {
432
- U(F), o && o(F, V, d);
434
+ isOptionEqualToValue: (f, E) => f.id === E.id,
435
+ onInputChange: (f, E, H) => {
436
+ v(E), o && o(E, H, f);
433
437
  },
434
- renderOption: (d, F) => /* @__PURE__ */ ie(
438
+ renderOption: (f, E) => /* @__PURE__ */ ae(
435
439
  "li",
436
- b(u({}, d), {
437
- key: F.id,
438
- "data-testid": l ? `${l}:Autocomplete:option(${F.id.toString()})` : void 0
440
+ b(d({}, f), {
441
+ key: E.id,
442
+ "data-testid": A ? `${A}:Autocomplete:option(${E.id.toString()})` : void 0
439
443
  }),
440
- F.label
444
+ E.label
441
445
  ),
442
- disabled: k,
443
- readOnly: y
446
+ disabled: F,
447
+ readOnly: X
444
448
  }
445
449
  )
446
450
  }
447
451
  ) });
448
- }, Mt = (e) => {
452
+ }, Tt = (e) => {
449
453
  if (!e)
450
454
  return -1;
451
455
  try {
452
- const o = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), n = decodeURIComponent(
456
+ const o = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), i = decodeURIComponent(
453
457
  bt.from(o, "base64").toString("utf8").split("").map(function(a) {
454
458
  return "%" + ("00" + a.charCodeAt(0).toString(16)).slice(-2);
455
459
  }).join("")
456
- ), s = JSON.parse(n);
460
+ ), s = JSON.parse(i);
457
461
  return s != null && s.exp ? s.exp : -1;
458
462
  } catch (t) {
459
463
  return -1;
@@ -463,15 +467,15 @@ const To = /MUI: The value provided to.*is invalid/i, $o = ({
463
467
  closeHandler: t,
464
468
  setAuth0ExpiryTime: o
465
469
  }) => {
466
- const { logout: n, getAccessTokenSilently: s } = le();
467
- return /* @__PURE__ */ i(
468
- ze,
470
+ const { logout: i, getAccessTokenSilently: s } = de();
471
+ return /* @__PURE__ */ n(
472
+ qe,
469
473
  {
470
474
  isOpen: e,
471
475
  primaryButton: {
472
476
  text: "Continue",
473
- onClick: () => M(null, null, function* () {
474
- const l = yield s({ cacheMode: "off" }), x = Mt(l) * 1e3;
477
+ onClick: () => N(null, null, function* () {
478
+ const c = yield s({ cacheMode: "off" }), x = Tt(c) * 1e3;
475
479
  o(x), t();
476
480
  }),
477
481
  disabled: !1,
@@ -480,8 +484,8 @@ const To = /MUI: The value provided to.*is invalid/i, $o = ({
480
484
  },
481
485
  secondaryButton: {
482
486
  text: "Log out",
483
- onClick: () => M(null, null, function* () {
484
- n({ logoutParams: { returnTo: `${window.location.origin}` } });
487
+ onClick: () => N(null, null, function* () {
488
+ i({ logoutParams: { returnTo: `${window.location.origin}` } });
485
489
  }),
486
490
  disabled: !1,
487
491
  testId: "PreferencesDialog",
@@ -490,38 +494,38 @@ const To = /MUI: The value provided to.*is invalid/i, $o = ({
490
494
  onClose: t,
491
495
  dialogTitle: "Session expiry",
492
496
  disableCloseOnBackdropOrEscape: !0,
493
- children: /* @__PURE__ */ i("p", { style: { marginBottom: 0 }, children: "Your session is about to time out due to inactivity. Do you want to continue?" })
497
+ children: /* @__PURE__ */ n("p", { style: { marginBottom: 0 }, children: "Your session is about to time out due to inactivity. Do you want to continue?" })
494
498
  }
495
499
  );
496
500
  };
497
501
  function Nt(e) {
498
502
  return "error" in e;
499
503
  }
500
- function Tt(e) {
501
- var n;
502
- const t = e.error, o = (n = e == null ? void 0 : e.error_description) != null ? n : "";
504
+ function $t(e) {
505
+ var i;
506
+ const t = e.error, o = (i = e == null ? void 0 : e.error_description) != null ? i : "";
503
507
  return t === "access_denied" && o.startsWith("You do not have the required authorization");
504
508
  }
505
- function $t(e) {
506
- var n;
507
- const t = e.error, o = (n = e == null ? void 0 : e.error_description) != null ? n : "";
509
+ function Mt(e) {
510
+ var i;
511
+ const t = e.error, o = (i = e == null ? void 0 : e.error_description) != null ? i : "";
508
512
  return t === "access_denied" && o.startsWith("User did not authorize the request");
509
513
  }
510
514
  function Lt(e) {
511
- var n;
512
- const t = e.error, o = (n = e == null ? void 0 : e.error_description) != null ? n : "";
515
+ var i;
516
+ const t = e.error, o = (i = e == null ? void 0 : e.error_description) != null ? i : "";
513
517
  return t === "access_denied" && o.match(/Script.*time.*exceeded/);
514
518
  }
515
519
  function Oo({
516
520
  children: e,
517
521
  appName: t = "the app",
518
522
  throwErrors: o = "none",
519
- disableConsoleLogging: n = !1,
523
+ disableConsoleLogging: i = !1,
520
524
  onError: s = () => {
521
525
  }
522
526
  }) {
523
- var C, v;
524
- const { isAuthenticated: a, isLoading: p, error: r, loginWithRedirect: c, logout: l } = le();
527
+ var A, D;
528
+ const { isAuthenticated: a, isLoading: u, error: r, loginWithRedirect: l, logout: c } = de();
525
529
  ge(() => {
526
530
  r && s(r);
527
531
  }, [r, s]);
@@ -534,48 +538,48 @@ function Oo({
534
538
  []
535
539
  );
536
540
  if (ge(() => {
537
- p || a || r || c(x);
538
- }, [p, a, r, c, s, x]), r) {
539
- if (n || console.error(
540
- `Error detected in AuthGuard [isAuthenticated=${a},isLoading=${p}]`,
541
+ u || a || r || l(x);
542
+ }, [u, a, r, l, s, x]), r) {
543
+ if (i || console.error(
544
+ `Error detected in AuthGuard [isAuthenticated=${a},isLoading=${u}]`,
541
545
  r
542
546
  ), o === "all")
543
547
  throw r;
544
548
  if (Nt(r)) {
545
- let g = "Auth error", w = "An unknown Auth0 error occurred.";
546
- if (Tt(r))
547
- g = "Unauthorised", w = `You are not authorised to access ${t}.`;
548
- else if ($t(r))
549
- g = "App not authorised", w = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
549
+ let g = "Auth error", S = "An unknown Auth0 error occurred.";
550
+ if ($t(r))
551
+ g = "Unauthorised", S = `You are not authorised to access ${t}.`;
552
+ else if (Mt(r))
553
+ g = "App not authorised", S = `You have not authorised ${t} to access your user profile. This is necessary to use ${t}.`;
550
554
  else if (Lt(r))
551
- g = "Auth0 script execution time exceeded", w = "The Auth0 login flow exceeded the time limit (20s). Try again in a minute by clicking the RELOAD button below.";
555
+ g = "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.";
552
556
  else if (r.message === "Invalid state") {
553
- const k = localStorage.getItem("auth0_redirect_count");
554
- k ? k && parseInt(k) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(k) + 1)), c(x)) : (localStorage.setItem("auth0_redirect_count", "1"), c(x));
557
+ const y = localStorage.getItem("auth0_redirect_count");
558
+ y ? y && parseInt(y) < 2 && (localStorage.setItem("auth0_redirect_count", String(parseInt(y) + 1)), l(x)) : (localStorage.setItem("auth0_redirect_count", "1"), l(x));
555
559
  } else if (o === "unknown") throw r;
556
- return /* @__PURE__ */ m($e, { open: !0, children: [
557
- /* @__PURE__ */ i(Oe, { children: g }),
560
+ return /* @__PURE__ */ m(Me, { open: !0, children: [
561
+ /* @__PURE__ */ n(Oe, { children: g }),
558
562
  /* @__PURE__ */ m(Re, { children: [
559
- /* @__PURE__ */ i(I, { children: w }),
560
- /* @__PURE__ */ i("br", {}),
561
- /* @__PURE__ */ i(I, { variant: "subtitle2", children: "Details from Auth0" }),
563
+ /* @__PURE__ */ n(I, { children: S }),
564
+ /* @__PURE__ */ n("br", {}),
565
+ /* @__PURE__ */ n(I, { variant: "subtitle2", children: "Details from Auth0" }),
562
566
  /* @__PURE__ */ m(I, { variant: "body2", children: [
563
567
  "error: ",
564
- (C = r == null ? void 0 : r.error) != null ? C : "N/A"
568
+ (A = r == null ? void 0 : r.error) != null ? A : "N/A"
565
569
  ] }),
566
570
  /* @__PURE__ */ m(I, { variant: "body2", children: [
567
571
  "description: ",
568
- (v = r == null ? void 0 : r.error_description) != null ? v : "N/A"
572
+ (D = r == null ? void 0 : r.error_description) != null ? D : "N/A"
569
573
  ] })
570
574
  ] }),
571
575
  /* @__PURE__ */ m(Ue, { children: [
572
- g === "Auth0 script execution time exceeded" && /* @__PURE__ */ i(q, { href: window.location.origin + window.location.pathname, children: "Reload" }),
573
- /* @__PURE__ */ i(q, { onClick: () => l({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" })
576
+ g === "Auth0 script execution time exceeded" && /* @__PURE__ */ n(q, { href: window.location.origin + window.location.pathname, children: "Reload" }),
577
+ /* @__PURE__ */ n(q, { onClick: () => c({ logoutParams: { returnTo: window.location.origin } }), children: "Logout" })
574
578
  ] })
575
579
  ] });
576
580
  } else if (o === "unknown") throw r;
577
581
  }
578
- return a ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ i($, { children: e })) : /* @__PURE__ */ i(Ft, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
582
+ return a ? (localStorage.removeItem("auth0_redirect_count"), /* @__PURE__ */ n(M, { children: e })) : /* @__PURE__ */ n(Ft, { variant: "rectangular", animation: "pulse", height: "100vh", width: "100vw" });
579
583
  }
580
584
  const Ot = {
581
585
  autoHideDuration: 6e3,
@@ -597,76 +601,76 @@ const Ot = {
597
601
  })(), Ht = {
598
602
  borderBottomLeftRadius: "0px",
599
603
  borderBottomRightRadius: "0px"
600
- }, Wt = {}, qt = {}, Ke = st(null);
601
- function zt(a) {
602
- var p = a, {
604
+ }, Wt = {}, zt = {}, Ke = st(null);
605
+ function qt(a) {
606
+ var u = a, {
603
607
  overrideState: e = Wt,
604
- overrideActions: t = qt,
608
+ overrideActions: t = zt,
605
609
  shouldClose: o = Rt.shouldClose,
606
- children: n
607
- } = p, s = fe(p, [
610
+ children: i
611
+ } = u, s = fe(u, [
608
612
  "overrideState",
609
613
  "overrideActions",
610
614
  "shouldClose",
611
615
  "children"
612
616
  ]);
613
- var O;
614
- const [{ open: r }, c] = z({ open: !1 }), l = oe([]), x = oe(Date.now()), C = oe(0), v = xe((S) => {
615
- c({ open: S });
616
- }, []), g = xe((S = {}) => {
617
- C.current += 1, l.current.length >= ye && Date.now() - x.current >= be && (x.current = Date.now(), console.error(
618
- `SaladBarProvider: MAX_QUEUE_LENGTH (${ye}) hit ${C.current} times in last ${be}ms)`
619
- ), C.current = 0);
620
- const d = u(b(u({}, ke), {
617
+ var R;
618
+ const [{ open: r }, l] = G({ open: !1 }), c = re([]), x = re(Date.now()), A = re(0), D = xe((v) => {
619
+ l({ open: v });
620
+ }, []), g = xe((v = {}) => {
621
+ A.current += 1, c.current.length >= ye && Date.now() - x.current >= be && (x.current = Date.now(), console.error(
622
+ `SaladBarProvider: MAX_QUEUE_LENGTH (${ye}) hit ${A.current} times in last ${be}ms)`
623
+ ), A.current = 0);
624
+ const C = d(b(d({}, ke), {
621
625
  key: Bt()
622
- }), S);
623
- return l.current.push(d), l.current.length === 1 && c({ open: !0 }), d.key;
624
- }, []), w = (S = "", d = {}) => g(u({ message: S, severity: "success" }, d)), k = (S = "", d = {}) => g(u({ message: S, severity: "info" }, d)), f = (S = "", d = {}) => g(u({ message: S, severity: "warning" }, d)), D = (S = "", d = {}) => g(u({ message: S, severity: "error" }, d)), y = (S) => {
625
- const d = l.current.findIndex((F) => F.key === S);
626
- if (d !== -1)
627
- return d === 0 ? (c({ open: !1 }), l.current[0]) : l.current.splice(d, 1);
628
- }, E = (S, d) => {
629
- o(S, d) && c({ open: !1 });
630
- }, G = () => {
631
- }, R = () => {
632
- l.current.shift(), l.current.length > 0 && c({ open: !0 });
633
- }, _ = (O = l.current[0]) != null ? O : u({}, ke), U = {};
634
- "autoHideDuration" in _ && (U.autoHideDuration = _.autoHideDuration);
635
- const L = u(u({}, Ot), s), B = u(u({
626
+ }), v);
627
+ return c.current.push(C), c.current.length === 1 && l({ open: !0 }), C.key;
628
+ }, []), S = (v = "", C = {}) => g(d({ message: v, severity: "success" }, C)), y = (v = "", C = {}) => g(d({ message: v, severity: "info" }, C)), h = (v = "", C = {}) => g(d({ message: v, severity: "warning" }, C)), k = (v = "", C = {}) => g(d({ message: v, severity: "error" }, C)), F = (v) => {
629
+ const C = c.current.findIndex((B) => B.key === v);
630
+ if (C !== -1)
631
+ return C === 0 ? (l({ open: !1 }), c.current[0]) : c.current.splice(C, 1);
632
+ }, T = (v, C) => {
633
+ o(v, C) && l({ open: !1 });
634
+ }, V = () => {
635
+ }, K = () => {
636
+ c.current.shift(), c.current.length > 0 && l({ open: !0 });
637
+ }, _ = (R = c.current[0]) != null ? R : d({}, ke), O = {};
638
+ "autoHideDuration" in _ && (O.autoHideDuration = _.autoHideDuration);
639
+ const X = d(d({}, Ot), s), U = d(d({
636
640
  open: r,
637
- setOpen: v,
641
+ setOpen: D,
638
642
  enqueueNotification: g,
639
- enqueueSuccessNotification: w,
640
- enqueueInfoNotification: k,
641
- enqueueWarningNotification: f,
642
- enqueueErrorNotification: D,
643
- removeNotification: y
643
+ enqueueSuccessNotification: S,
644
+ enqueueInfoNotification: y,
645
+ enqueueWarningNotification: h,
646
+ enqueueErrorNotification: k,
647
+ removeNotification: F
644
648
  }, e), t);
645
- return /* @__PURE__ */ m(Ke.Provider, { value: B, children: [
646
- n,
647
- /* @__PURE__ */ i(
649
+ return /* @__PURE__ */ m(Ke.Provider, { value: U, children: [
650
+ i,
651
+ /* @__PURE__ */ n(
648
652
  ut,
649
- b(u(u({}, L), U), {
653
+ b(d(d({}, X), O), {
650
654
  open: r,
651
- onClose: E,
655
+ onClose: T,
652
656
  TransitionProps: {
653
- onExited: R,
654
- onExit: G
657
+ onExited: K,
658
+ onExit: V
655
659
  },
656
660
  sx: { zIndex: Ut },
657
661
  children: /* @__PURE__ */ m("div", { children: [
658
- /* @__PURE__ */ i(
662
+ /* @__PURE__ */ n(
659
663
  pt,
660
664
  {
661
- onClose: (S) => E(S, "closeAlert"),
665
+ onClose: (v) => T(v, "closeAlert"),
662
666
  severity: _.severity,
663
667
  variant: "filled",
664
- icon: _.progressIndicator === "circular" ? /* @__PURE__ */ i(ae, { size: "1em" }) : void 0,
668
+ icon: _.progressIndicator === "circular" ? /* @__PURE__ */ n(te, { size: "1em" }) : void 0,
665
669
  style: _.progressIndicator === "linear" ? Ht : void 0,
666
670
  children: _.message
667
671
  }
668
672
  ),
669
- _.progressIndicator === "linear" && /* @__PURE__ */ i(Le, { color: "primary" })
673
+ _.progressIndicator === "linear" && /* @__PURE__ */ n(Le, { color: "primary" })
670
674
  ] })
671
675
  })
672
676
  )
@@ -682,12 +686,12 @@ function Gt() {
682
686
  return e;
683
687
  }
684
688
  const Ro = Et(
685
- (e = { autoHideDuration: 1 }, t = {}, o = {}) => ({ children: n }) => /* @__PURE__ */ i(zt, b(u({}, e), { overrideState: t, overrideActions: o, children: /* @__PURE__ */ i($, { children: n }) }))
689
+ (e = { autoHideDuration: 1 }, t = {}, o = {}) => ({ children: i }) => /* @__PURE__ */ n(qt, b(d({}, e), { overrideState: t, overrideActions: o, children: /* @__PURE__ */ n(M, { children: i }) }))
686
690
  ), Ye = "domainCode";
687
691
  var Ne;
688
- const Fe = T(
692
+ const Fe = L(
689
693
  JSON.parse((Ne = localStorage.getItem(Ye)) != null ? Ne : '{"domainCode": ""}').domainCode
690
- ), Vt = T(
694
+ ), Vt = L(
691
695
  (e) => e(Fe),
692
696
  (e, t, o) => {
693
697
  t(Fe, o), localStorage.setItem(Ye, JSON.stringify({ domainCode: o }));
@@ -711,33 +715,33 @@ const Fe = T(
711
715
  isLoading: e,
712
716
  isOpen: t,
713
717
  onClose: o,
714
- onDomainChange: n,
718
+ onDomainChange: i,
715
719
  domainOptions: s,
716
720
  applicationName: a,
717
- handleLogout: p
721
+ handleLogout: u
718
722
  }) => {
719
- const [r, c] = H(Vt), [l, x] = z(r), { enqueueSuccessNotification: C } = Gt(), v = s.length === 0, g = !!r && !s.includes(r) && !s.includes(l), w = !r || v || g, k = () => M(null, null, function* () {
720
- l ? (c(l), n == null || n(l), C(`Set organisation to ${l}`), o()) : (c(""), n == null || n(""));
721
- }), f = () => M(null, null, function* () {
722
- r && !v && !g ? (x(r), o()) : w && p();
723
+ const [r, l] = W(Vt), [c, x] = G(r), { enqueueSuccessNotification: A } = Gt(), D = s.length === 0, g = !!r && !s.includes(r) && !s.includes(c), S = !r || D || g, y = () => N(null, null, function* () {
724
+ c ? (l(c), i == null || i(c), A(`Set organisation to ${c}`), o()) : (l(""), i == null || i(""));
725
+ }), h = () => N(null, null, function* () {
726
+ r && !D && !g ? (x(r), o()) : S && u();
723
727
  });
724
- let D;
725
- return v ? D = "Unable to retrieve your active organisations. Try logging in again." : g && (D = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ m(
726
- ze,
728
+ let k;
729
+ return D ? k = "Unable to retrieve your active organisations. Try logging in again." : g && (k = "You no longer have any roles in your chosen organisation. Please choose another."), /* @__PURE__ */ m(
730
+ qe,
727
731
  {
728
732
  isOpen: t,
729
733
  dialogTitle: "Select an organisation",
730
734
  primaryButton: {
731
735
  text: "Confirm",
732
- onClick: k,
733
- disabled: !l || v || g,
736
+ onClick: y,
737
+ disabled: !c || D || g,
734
738
  buttonColor: "primary"
735
739
  },
736
740
  secondaryButton: {
737
- text: w ? "Logout" : "Cancel",
738
- onClick: f
741
+ text: S ? "Logout" : "Cancel",
742
+ onClick: h
739
743
  },
740
- onClose: w ? () => {
744
+ onClose: S ? () => {
741
745
  } : o,
742
746
  children: [
743
747
  /* @__PURE__ */ m(I, { marginBottom: 2, children: [
@@ -745,61 +749,61 @@ const Fe = T(
745
749
  a,
746
750
  "."
747
751
  ] }),
748
- /* @__PURE__ */ i(
749
- re,
752
+ /* @__PURE__ */ n(
753
+ le,
750
754
  {
751
755
  loading: e,
752
756
  multiple: !1,
753
757
  disableClearable: !1,
754
- value: l !== "" ? l : null,
755
- onChange: (y, E) => x(E != null ? E : ""),
758
+ value: c !== "" ? c : null,
759
+ onChange: (F, T) => x(T != null ? T : ""),
756
760
  getOptionLabel: Qe,
757
761
  options: [...s.toSorted()],
758
- renderInput: (y) => /* @__PURE__ */ i(
759
- se,
760
- b(u({}, y), {
762
+ renderInput: (F) => /* @__PURE__ */ n(
763
+ ce,
764
+ b(d({}, F), {
761
765
  variant: "filled",
762
766
  label: "Select organisation",
763
- InputProps: b(u({}, y.InputProps), {
764
- endAdornment: /* @__PURE__ */ m($, { children: [
765
- e ? /* @__PURE__ */ i(ae, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
766
- y.InputProps.endAdornment
767
+ InputProps: b(d({}, F.InputProps), {
768
+ endAdornment: /* @__PURE__ */ m(M, { children: [
769
+ e ? /* @__PURE__ */ n(te, { color: "inherit", size: 20, sx: { marginTop: "-20px" } }) : null,
770
+ F.InputProps.endAdornment
767
771
  ] })
768
772
  })
769
773
  })
770
774
  )
771
775
  }
772
776
  ),
773
- D && /* @__PURE__ */ i(ht, { error: !0, children: D })
777
+ k && /* @__PURE__ */ n(ht, { error: !0, children: k })
774
778
  ]
775
779
  }
776
780
  );
777
781
  }, Je = () => {
778
- const e = Z();
782
+ const e = oe();
779
783
  return ft(e.breakpoints.down("sm"));
780
- }, Xt = 64, Yt = 72, Qt = 256, J = T(!0), Jt = T(Qt), Zt = T(Yt), Ee = T(""), jt = T(void 0), eo = T(Xt), to = T(void 0);
784
+ }, Xt = 64, Yt = 72, Qt = 256, ee = L(!0), Jt = L(Qt), Zt = L(Yt), Ee = L(""), jt = L(void 0), eo = L(Xt), to = L(void 0);
781
785
  function oo({ links: e }) {
782
- return /* @__PURE__ */ i("div", { children: "LinksMenu not implemented yet" });
786
+ return /* @__PURE__ */ n("div", { children: "LinksMenu not implemented yet" });
783
787
  }
784
- const Y = "Navbar", K = {
785
- root: `${Y}-root`,
786
- menuButton: `${Y}-menuButton`,
787
- hide: `${Y}-hide`,
788
- content: `${Y}-content`
788
+ const Z = "Navbar", Y = {
789
+ root: `${Z}-root`,
790
+ menuButton: `${Z}-menuButton`,
791
+ hide: `${Z}-hide`,
792
+ content: `${Z}-content`
789
793
  // userInfoHolder: `${PREFIX}-userInfoHolder`,
790
794
  // settings: `${PREFIX}-settings`,
791
795
  // pieChartIcon: `${PREFIX}-pieChartIcon`,
792
796
  }, no = We(P, { name: "NavBar" })(({ theme: e }) => ({
793
- [`&.${K.root}`]: {
797
+ [`&.${Y.root}`]: {
794
798
  display: "flex"
795
799
  },
796
- [`& .${K.menuButton}`]: {
800
+ [`& .${Y.menuButton}`]: {
797
801
  marginRight: 36
798
802
  },
799
- [`& .${K.hide}`]: {
803
+ [`& .${Y.hide}`]: {
800
804
  display: "none"
801
805
  },
802
- [`& .${K.content}`]: {
806
+ [`& .${Y.content}`]: {
803
807
  flexGrow: 1,
804
808
  padding: e.spacing(3)
805
809
  }
@@ -808,14 +812,14 @@ const Y = "Navbar", K = {
808
812
  // marginTop: '64px',
809
813
  // marginBottom: '16px',
810
814
  // },
811
- })), W = (e, t, o) => e.transitions.create(t, {
815
+ })), z = (e, t, o) => e.transitions.create(t, {
812
816
  easing: e.transitions.easing.sharp,
813
817
  duration: o === "leaving" ? e.transitions.duration.leavingScreen : e.transitions.duration.enteringScreen
814
818
  }), io = (e) => {
815
- const t = Z();
816
- return /* @__PURE__ */ i(
819
+ const t = oe();
820
+ return /* @__PURE__ */ n(
817
821
  gt,
818
- u({
822
+ d({
819
823
  easing: t.transitions.easing.sharp,
820
824
  timeout: {
821
825
  enter: t.transitions.duration.enteringScreen,
@@ -831,102 +835,102 @@ const Y = "Navbar", K = {
831
835
  backgroundColor: (o = (t = e == null ? void 0 : e.navBar) == null ? void 0 : t.backgroundColor) != null ? o : "white"
832
836
  // Provide default so tests don't need to wrap theme provider
833
837
  };
834
- }, _e = (e, t) => u({
838
+ }, _e = (e, t) => d({
835
839
  width: t,
836
- transition: W(e, "width", "entering")
837
- }, Ze(e)), Ie = (e, t) => u({
840
+ transition: z(e, "width", "entering")
841
+ }, Ze(e)), Ie = (e, t) => d({
838
842
  width: t,
839
- transition: W(e, "width", "leaving")
843
+ transition: z(e, "width", "leaving")
840
844
  }, Ze(e)), ro = We(mt, {
841
845
  shouldForwardProp: (e) => !["widthOpen", "widthClosed", "isSmallScreen"].includes(e)
842
- })(({ theme: e, open: t, widthOpen: o, widthClosed: n, isSmallScreen: s }) => u(u({
846
+ })(({ theme: e, open: t, widthOpen: o, widthClosed: i, isSmallScreen: s }) => d(d({
843
847
  flexShrink: 0,
844
848
  whiteSpace: "nowrap",
845
849
  boxSizing: "border-box",
846
850
  display: "flex",
847
851
  flexDirection: "column"
848
- }, t && b(u({}, _e(e, o)), {
852
+ }, t && b(d({}, _e(e, o)), {
849
853
  backgroundColor: "",
850
854
  "& .MuiDrawer-paper": _e(e, o)
851
- })), !t && b(u({}, Ie(e, s ? o : n)), {
855
+ })), !t && b(d({}, Ie(e, s ? o : i)), {
852
856
  backgroundColor: "",
853
- "& .MuiDrawer-paper": Ie(e, s ? o : n)
857
+ "& .MuiDrawer-paper": Ie(e, s ? o : i)
854
858
  })));
855
859
  function je(e) {
856
860
  return e.replace(
857
861
  /(^|-)([a-z])/g,
858
- (t, o, n) => o === "-" ? " " + n.toUpperCase() : n.toUpperCase()
862
+ (t, o, i) => o === "-" ? " " + i.toUpperCase() : i.toUpperCase()
859
863
  );
860
864
  }
861
- function Bo(e, t, o, n) {
862
- var p;
865
+ function Bo(e, t, o, i) {
866
+ var u;
863
867
  if (!e) return "None";
864
868
  const a = Object.entries(e).filter(
865
- ([r, c]) => r.startsWith("https://greens.org.au/roles/") && c.includes(t)
869
+ ([r, l]) => r.startsWith("https://greens.org.au/roles/") && l.includes(t)
866
870
  ).map(
867
871
  ([r]) => {
868
- var c;
869
- return je((c = r.split("/").at(-1)) != null ? c : "");
872
+ var l;
873
+ return je((l = r.split("/").at(-1)) != null ? l : "");
870
874
  }
871
875
  );
872
- return (p = n.find(
873
- (r) => o[r].some((c) => a.includes(c))
874
- )) != null ? p : "None";
876
+ return (u = i.find(
877
+ (r) => o[r].some((l) => a.includes(l))
878
+ )) != null ? u : "None";
875
879
  }
876
880
  const Ho = (e) => {
877
- const { getIdTokenClaims: t, user: o } = le();
881
+ const { getIdTokenClaims: t, user: o } = de();
878
882
  return Be({
879
883
  queryKey: ["availableDomains", o == null ? void 0 : o.sub],
880
- queryFn: () => M(null, null, function* () {
881
- const n = yield t();
882
- return n ? Object.entries(n).reduce((s, [a, p]) => {
883
- var l;
884
- const r = je((l = a.split("/").at(-1)) != null ? l : ""), c = a.startsWith("https://greens.org.au/roles/") && e.includes(r) ? p : [];
885
- return [.../* @__PURE__ */ new Set([...s, ...c])];
884
+ queryFn: () => N(null, null, function* () {
885
+ const i = yield t();
886
+ return i ? Object.entries(i).reduce((s, [a, u]) => {
887
+ var c;
888
+ const r = je((c = a.split("/").at(-1)) != null ? c : ""), l = a.startsWith("https://greens.org.au/roles/") && e.includes(r) ? u : [];
889
+ return [.../* @__PURE__ */ new Set([...s, ...l])];
886
890
  }, []) : [];
887
891
  })
888
892
  });
889
893
  }, Wo = (e) => Object.values(e).reduce(
890
894
  (t, o) => [.../* @__PURE__ */ new Set([...t, ...o])],
891
895
  []
892
- ), Q = {
896
+ ), j = {
893
897
  log: console.warn.bind(console),
894
898
  error: console.error.bind(console),
895
899
  warn: console.warn.bind(console),
896
900
  info: console.info.bind(console),
897
901
  debug: console.debug.bind(console)
898
902
  };
899
- function qo(e, t) {
903
+ function zo(e, t) {
900
904
  console[e] = (...o) => {
901
- for (const n of t)
902
- if (typeof n == "function") {
903
- if (n(...o)) return;
904
- } else if (n instanceof RegExp && o.length > 0) {
905
+ for (const i of t)
906
+ if (typeof i == "function") {
907
+ if (i(...o)) return;
908
+ } else if (i instanceof RegExp && o.length > 0) {
905
909
  for (const s of o)
906
- if (typeof s == "string" && n.test(s))
910
+ if (typeof s == "string" && i.test(s))
907
911
  return;
908
912
  }
909
- Q[e](o);
913
+ j[e](o);
910
914
  };
911
915
  }
912
- function zo(e) {
916
+ function qo(e) {
913
917
  if (e)
914
- console[e] = Q[e];
918
+ console[e] = j[e];
915
919
  else
916
- for (const t of Object.keys(Q))
917
- console[t] = Q[t];
920
+ for (const t of Object.keys(j))
921
+ console[t] = j[t];
918
922
  }
919
923
  function so(e) {
920
924
  let t = 0;
921
- for (let o = 0, n = e.length; o < n; o++) {
925
+ for (let o = 0, i = e.length; o < i; o++) {
922
926
  const s = e.charCodeAt(o);
923
927
  t = (t << 5) - t + s, t |= 0;
924
928
  }
925
929
  return t;
926
930
  }
927
- const Pe = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Me = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
928
- function ao({ user: e, domainCode: t, open: o, useNewAvatar: n = !1 }) {
929
- const s = Z();
931
+ const Pe = ["#A62A21", "#7e3794", "#0B51C1", "#3A6024", "#A81563", "#B3003C"], Te = (e) => e.split(/\s/).map((t) => t.substring(0, 1).toUpperCase()).filter((t) => !!t).slice(0, 2).join("").toUpperCase();
932
+ function ao({ user: e, domainCode: t, open: o, useNewAvatar: i = !1 }) {
933
+ const s = oe();
930
934
  return /* @__PURE__ */ m(
931
935
  P,
932
936
  {
@@ -938,15 +942,15 @@ function ao({ user: e, domainCode: t, open: o, useNewAvatar: n = !1 }) {
938
942
  gap: "0.5rem"
939
943
  },
940
944
  children: [
941
- !n && /* @__PURE__ */ i(
945
+ !i && /* @__PURE__ */ n(
942
946
  P,
943
947
  {
944
948
  sx: {
945
949
  width: o ? "5rem" : "2rem",
946
- transition: o ? W(s, ["width", "height"], "entering") : W(s, ["width", "height"], "leaving"),
950
+ transition: o ? z(s, ["width", "height"], "entering") : z(s, ["width", "height"], "leaving"),
947
951
  aspectRatio: 1
948
952
  },
949
- children: e != null && e.name ? /* @__PURE__ */ i($, { children: /* @__PURE__ */ i(
953
+ children: e != null && e.name ? /* @__PURE__ */ n(M, { children: /* @__PURE__ */ n(
950
954
  Ae,
951
955
  {
952
956
  src: e == null ? void 0 : e.picture,
@@ -955,30 +959,30 @@ function ao({ user: e, domainCode: t, open: o, useNewAvatar: n = !1 }) {
955
959
  height: "100%",
956
960
  bgcolor: Pe[Math.abs(so(e == null ? void 0 : e.name)) % Pe.length]
957
961
  },
958
- children: Me(e == null ? void 0 : e.name)
962
+ children: Te(e == null ? void 0 : e.name)
959
963
  }
960
- ) }) : /* @__PURE__ */ i(Ae, { sx: { width: "100%", height: "100%" } })
964
+ ) }) : /* @__PURE__ */ n(Ae, { sx: { width: "100%", height: "100%" } })
961
965
  }
962
966
  ),
963
- n && /* @__PURE__ */ i(
967
+ i && /* @__PURE__ */ n(
964
968
  P,
965
969
  {
966
970
  sx: {
967
971
  width: o ? "5rem" : "2rem",
968
- transition: o ? W(s, ["width", "height"], "entering") : W(s, ["width", "height"], "leaving"),
972
+ transition: o ? z(s, ["width", "height"], "entering") : z(s, ["width", "height"], "leaving"),
969
973
  aspectRatio: 1
970
974
  },
971
- children: e != null && e.name ? /* @__PURE__ */ i($, { children: /* @__PURE__ */ m(De, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: o ? "80" : "32", children: [
975
+ children: e != null && e.name ? /* @__PURE__ */ n(M, { children: /* @__PURE__ */ m(De, { src: e == null ? void 0 : e.picture, name: e == null ? void 0 : e.name, round: !0, size: o ? "80" : "32", children: [
972
976
  " ",
973
- Me(e == null ? void 0 : e.name),
977
+ Te(e == null ? void 0 : e.name),
974
978
  " ",
975
979
  "ab"
976
- ] }) }) : /* @__PURE__ */ i(De, {})
980
+ ] }) }) : /* @__PURE__ */ n(De, {})
977
981
  }
978
982
  ),
979
- /* @__PURE__ */ i(io, { sx: { width: "100%" }, in: o, children: /* @__PURE__ */ i(xt, { in: o, children: /* @__PURE__ */ m(P, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
980
- e != null && e.name ? /* @__PURE__ */ i(I, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ i(Ce, { animation: !1, width: "50%" }),
981
- t ? /* @__PURE__ */ i(I, { children: Qe(t) }) : /* @__PURE__ */ i(Ce, { animation: !1, width: "25%" })
983
+ /* @__PURE__ */ n(io, { sx: { width: "100%" }, in: o, children: /* @__PURE__ */ n(xt, { in: o, children: /* @__PURE__ */ m(P, { width: "100%", display: "flex", flexDirection: "column", alignItems: "center", children: [
984
+ e != null && e.name ? /* @__PURE__ */ n(I, { children: e == null ? void 0 : e.name }) : /* @__PURE__ */ n(Ce, { animation: !1, width: "50%" }),
985
+ t ? /* @__PURE__ */ n(I, { children: Qe(t) }) : /* @__PURE__ */ n(Ce, { animation: !1, width: "25%" })
982
986
  ] }) }) })
983
987
  ]
984
988
  }
@@ -988,16 +992,16 @@ function lo({
988
992
  open: e,
989
993
  widthClosed: t,
990
994
  widthOpen: o,
991
- "data-testid": n,
995
+ "data-testid": i,
992
996
  top: s,
993
997
  middle: a,
994
- bottom: p,
998
+ bottom: u,
995
999
  user: r,
996
- domainCode: c,
997
- useNewAvatar: l = !1
1000
+ domainCode: l,
1001
+ useNewAvatar: c = !1
998
1002
  }) {
999
- const x = Je(), C = He(J);
1000
- return /* @__PURE__ */ i(no, { className: K.root, "data-testid": n, children: /* @__PURE__ */ m(
1003
+ const x = Je(), A = He(ee);
1004
+ return /* @__PURE__ */ n(no, { className: Y.root, "data-testid": i, children: /* @__PURE__ */ m(
1001
1005
  ro,
1002
1006
  {
1003
1007
  open: e,
@@ -1009,20 +1013,20 @@ function lo({
1009
1013
  component: "nav"
1010
1014
  },
1011
1015
  onClose: () => {
1012
- C(!1);
1016
+ A(!1);
1013
1017
  },
1014
1018
  isSmallScreen: x,
1015
1019
  children: [
1016
- !x && /* @__PURE__ */ i(At, {}),
1020
+ !x && /* @__PURE__ */ n(At, {}),
1017
1021
  s && /* @__PURE__ */ m(P, { flexGrow: "0", children: [
1018
1022
  s,
1019
- /* @__PURE__ */ i(Se, { variant: "middle", sx: { marginY: "0.5rem" } })
1023
+ /* @__PURE__ */ n(Se, { variant: "middle", sx: { marginY: "0.5rem" } })
1020
1024
  ] }),
1021
- /* @__PURE__ */ i(P, { flexGrow: "1", children: Array.isArray(a) ? /* @__PURE__ */ i(oo, { links: a }) : a }),
1025
+ /* @__PURE__ */ n(P, { flexGrow: "1", children: Array.isArray(a) ? /* @__PURE__ */ n(oo, { links: a }) : a }),
1022
1026
  /* @__PURE__ */ m(P, { flexGrow: "0", children: [
1023
- /* @__PURE__ */ i(Se, { variant: "middle", sx: { marginY: "0.5rem" } }),
1024
- /* @__PURE__ */ i(ao, { user: r, domainCode: c, open: e, useNewAvatar: l }),
1025
- p && /* @__PURE__ */ i($, { children: p })
1027
+ /* @__PURE__ */ n(Se, { variant: "middle", sx: { marginY: "0.5rem" } }),
1028
+ /* @__PURE__ */ n(ao, { user: r, domainCode: l, open: e, useNewAvatar: c }),
1029
+ u && /* @__PURE__ */ n(M, { children: u })
1026
1030
  ] })
1027
1031
  ]
1028
1032
  }
@@ -1032,9 +1036,9 @@ function co({
1032
1036
  children: e,
1033
1037
  topBarHeight: t,
1034
1038
  maxWidth: o = !1,
1035
- noPadding: n
1039
+ noPadding: i
1036
1040
  }) {
1037
- return /* @__PURE__ */ i(
1041
+ return /* @__PURE__ */ n(
1038
1042
  P,
1039
1043
  {
1040
1044
  sx: {
@@ -1042,7 +1046,7 @@ function co({
1042
1046
  height: `calc(100vh - ${t}px)`,
1043
1047
  flexGrow: 1
1044
1048
  },
1045
- children: n ? /* @__PURE__ */ i(P, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ i(
1049
+ children: i ? /* @__PURE__ */ n(P, { component: "main", id: "main-content", height: "inherit", children: e }) : /* @__PURE__ */ n(
1046
1050
  Ct,
1047
1051
  {
1048
1052
  component: "main",
@@ -1062,11 +1066,11 @@ function ho({
1062
1066
  titleText: e = "",
1063
1067
  height: t,
1064
1068
  "data-testid": o,
1065
- middle: n
1069
+ middle: i
1066
1070
  }) {
1067
- const s = He(J), a = () => s((c) => !c), p = Z(), r = Je();
1068
- return /* @__PURE__ */ i("header", { "data-testid": o, children: /* @__PURE__ */ m(
1069
- Te,
1071
+ const s = He(ee), a = () => s((l) => !l), u = oe(), r = Je();
1072
+ return /* @__PURE__ */ n("header", { "data-testid": o, children: /* @__PURE__ */ m(
1073
+ $e,
1070
1074
  {
1071
1075
  square: !0,
1072
1076
  elevation: 0,
@@ -1080,21 +1084,21 @@ function ho({
1080
1084
  gap: 2,
1081
1085
  flexShrink: 0,
1082
1086
  height: t,
1083
- zIndex: r ? 0 : p.zIndex.drawer + 101
1087
+ zIndex: r ? 0 : u.zIndex.drawer + 101
1084
1088
  },
1085
1089
  children: [
1086
- /* @__PURE__ */ i(
1090
+ /* @__PURE__ */ n(
1087
1091
  St,
1088
1092
  {
1089
1093
  size: "medium",
1090
1094
  color: "inherit",
1091
1095
  sx: { padding: 1.5, marginLeft: "12px" },
1092
1096
  onClick: a,
1093
- children: /* @__PURE__ */ i(Dt, { fontSize: "medium" })
1097
+ children: /* @__PURE__ */ n(Dt, { fontSize: "medium" })
1094
1098
  }
1095
1099
  ),
1096
- /* @__PURE__ */ i(I, { className: po.titleText, variant: "h6", component: "h1", children: e }),
1097
- n
1100
+ /* @__PURE__ */ n(I, { className: po.titleText, variant: "h6", component: "h1", children: e }),
1101
+ i
1098
1102
  ]
1099
1103
  }
1100
1104
  ) });
@@ -1103,62 +1107,62 @@ function Go({
1103
1107
  children: e,
1104
1108
  initialTitleText: t,
1105
1109
  initialNavBarOpen: o,
1106
- pageContainerProps: n,
1110
+ pageContainerProps: i,
1107
1111
  pageContentDataTestId: s,
1108
1112
  topBarDataTestId: a,
1109
- navBarDataTestId: p,
1113
+ navBarDataTestId: u,
1110
1114
  navBarMiddle: r,
1111
- navBarBottom: c,
1112
- user: l,
1115
+ navBarBottom: l,
1116
+ user: c,
1113
1117
  domainCode: x,
1114
- useNewAvatar: C = !1
1118
+ useNewAvatar: A = !1
1115
1119
  }) {
1116
1120
  It([
1117
- [J, o != null ? o : !0],
1121
+ [ee, o != null ? o : !0],
1118
1122
  [Ee, t != null ? t : ""]
1119
1123
  ]);
1120
- const v = ve(J), [g] = H(Jt), [w] = H(Zt), k = ve(Ee), [f] = H(eo), [D] = H(jt), [y] = H(to);
1121
- return /* @__PURE__ */ m(we, { children: [
1122
- /* @__PURE__ */ i(_t, {}),
1123
- /* @__PURE__ */ i(
1124
+ const D = we(ee), [g] = W(Jt), [S] = W(Zt), y = we(Ee), [h] = W(eo), [k] = W(jt), [F] = W(to);
1125
+ return /* @__PURE__ */ m(ve, { children: [
1126
+ /* @__PURE__ */ n(_t, {}),
1127
+ /* @__PURE__ */ n(
1124
1128
  ho,
1125
1129
  {
1126
- titleText: k,
1130
+ titleText: y,
1127
1131
  "data-testid": a,
1128
- height: f,
1129
- middle: D
1132
+ height: h,
1133
+ middle: k
1130
1134
  }
1131
1135
  ),
1132
- /* @__PURE__ */ m(we, { sx: { display: "flex" }, children: [
1133
- /* @__PURE__ */ i(
1136
+ /* @__PURE__ */ m(ve, { sx: { display: "flex" }, children: [
1137
+ /* @__PURE__ */ n(
1134
1138
  lo,
1135
1139
  {
1136
- open: v,
1137
- top: y,
1140
+ open: D,
1141
+ top: F,
1138
1142
  middle: r,
1139
- bottom: c,
1140
- user: l,
1143
+ bottom: l,
1144
+ user: c,
1141
1145
  domainCode: x,
1142
1146
  widthOpen: g,
1143
- widthClosed: w,
1144
- offsetTop: f,
1145
- "data-testid": p,
1146
- useNewAvatar: C
1147
+ widthClosed: S,
1148
+ offsetTop: h,
1149
+ "data-testid": u,
1150
+ useNewAvatar: A
1147
1151
  }
1148
1152
  ),
1149
- /* @__PURE__ */ i(
1153
+ /* @__PURE__ */ n(
1150
1154
  co,
1151
- b(u({
1155
+ b(d({
1152
1156
  "data-testid": s,
1153
- topBarHeight: f
1154
- }, n), {
1157
+ topBarHeight: h
1158
+ }, i), {
1155
1159
  children: e
1156
1160
  })
1157
1161
  )
1158
1162
  ] })
1159
1163
  ] });
1160
1164
  }
1161
- const Vo = qe({
1165
+ const Vo = ze({
1162
1166
  palette: {
1163
1167
  primary: {
1164
1168
  dark: "#00A651",
@@ -1209,7 +1213,7 @@ const Vo = qe({
1209
1213
  navBar: {
1210
1214
  backgroundColor: "#E8E8E8"
1211
1215
  }
1212
- }), Ko = qe({
1216
+ }), Ko = ze({
1213
1217
  palette: {
1214
1218
  primary: {
1215
1219
  main: "#007236",
@@ -1263,18 +1267,18 @@ const Vo = qe({
1263
1267
  styleOverrides: {
1264
1268
  root: ({ theme: e }) => ({
1265
1269
  "&.Mui-selected": {
1266
- backgroundColor: ne(
1270
+ backgroundColor: se(
1267
1271
  e.palette.secondary.main,
1268
1272
  e.palette.action.selectedOpacity
1269
1273
  ),
1270
1274
  "&:hover": {
1271
- backgroundColor: ne(
1275
+ backgroundColor: se(
1272
1276
  e.palette.secondary.main,
1273
1277
  e.palette.action.selectedOpacity
1274
1278
  )
1275
1279
  },
1276
1280
  "&.Mui-focusVisible": {
1277
- backgroundColor: ne(
1281
+ backgroundColor: se(
1278
1282
  e.palette.secondary.main,
1279
1283
  e.palette.action.focusOpacity
1280
1284
  )
@@ -1305,36 +1309,36 @@ const Vo = qe({
1305
1309
  }
1306
1310
  });
1307
1311
  export {
1308
- ze as AgDialog,
1312
+ qe as AgDialog,
1309
1313
  Go as AppLayout,
1310
1314
  Oo as AuthGuard,
1311
1315
  Ke as Context,
1312
1316
  Xe as ContextError,
1313
1317
  Kt as DOMAIN_CODE_LABELS,
1314
1318
  Uo as DomainCodeDialog,
1315
- Mo as ExampleComponent,
1319
+ To as ExampleComponent,
1316
1320
  No as FetchAutocomplete,
1317
- To as MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX,
1318
- zt as SaladBarProvider,
1321
+ $o as MUI_AUTOCOMPLETE_VALUE_WARNING_REGEX,
1322
+ qt as SaladBarProvider,
1319
1323
  Lo as SessionExpiryDialog,
1320
- $o as SingleAutocomplete,
1324
+ Mo as SingleAutocomplete,
1321
1325
  Bo as determineUserLevelFromClaims,
1322
1326
  Vt as domainCodeAtom,
1323
1327
  Vo as fed21Theme,
1324
- Mt as getAuth0Expiry,
1328
+ Tt as getAuth0Expiry,
1325
1329
  Qe as getDomainOptionLabel,
1326
1330
  Wo as getValidBusinessRoles,
1327
1331
  Ko as internalAgSystemsTheme,
1328
- J as navBarOpenAtom,
1332
+ ee as navBarOpenAtom,
1329
1333
  to as navBarTopAtom,
1330
1334
  Zt as navBarWidthClosedAtom,
1331
1335
  Jt as navBarWidthOpenAtom,
1332
1336
  so as simpleHashCode,
1333
- qo as suppressConsole,
1337
+ zo as suppressConsole,
1334
1338
  Ee as titleTextAtom,
1335
1339
  eo as topBarHeightAtom,
1336
1340
  jt as topBarMiddleAtom,
1337
- zo as unsuppressConsole,
1341
+ qo as unsuppressConsole,
1338
1342
  Ve as useAutocompleteOptions,
1339
1343
  Gt as useSaladBar,
1340
1344
  Ho as useValidDomains,