@instructure/platform-institutional-tagging 7.1.3 → 7.1.5

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/index.js CHANGED
@@ -9,13 +9,13 @@ import { Pagination as $o } from "@instructure/ui-pagination";
9
9
  import { Badge as md } from "@instructure/ui-badge";
10
10
  import { IconButton as Ue, CloseButton as pd, Button as fn } from "@instructure/ui-buttons";
11
11
  import { Heading as Gn } from "@instructure/ui-heading";
12
- import { IconMoreSolid as Mo, IconUnarchiveLine as yd, IconWarningLine as vd, IconDragHandleSolid as wd, IconUserSolid as oc, IconTagLine as ic, IconUserLine as bd, IconAddLine as Ro, IconAddSolid as Td, IconCheckMarkSolid as ac, IconArrowOpenDownLine as Cd, IconArrowOpenEndLine as Sd, IconXLine as Po, IconSearchLine as cc, IconArrowUpLine as xd, IconArrowDownLine as kd, IconPlusLine as Id, IconEditLine as Nd, IconArchiveLine as Ed } from "@instructure/ui-icons";
12
+ import { IconMoreSolid as Mo, IconUnarchiveLine as yd, IconWarningLine as vd, IconDragHandleSolid as wd, IconUserSolid as oc, IconTagLine as ic, IconUserLine as bd, IconAddLine as Ro, IconAddSolid as Cd, IconCheckMarkSolid as ac, IconArrowOpenDownLine as Td, IconArrowOpenEndLine as Sd, IconXLine as Po, IconSearchLine as cc, IconArrowUpLine as xd, IconArrowDownLine as kd, IconPlusLine as Id, IconEditLine as Nd, IconArchiveLine as Ed } from "@instructure/ui-icons";
13
13
  import { Menu as gn } from "@instructure/ui-menu";
14
14
  import { Text as X } from "@instructure/ui-text";
15
15
  import { Pill as qr } from "@instructure/ui-pill";
16
16
  import { usePlatformUi as lc } from "@instructure/platform-provider";
17
17
  import { useQueryClient as Ve, useMutation as Be, useQuery as bt } from "@tanstack/react-query";
18
- import { gql as Te } from "graphql-tag";
18
+ import { gql as Ce } from "graphql-tag";
19
19
  import { TruncateText as Ei } from "@instructure/ui-truncate-text";
20
20
  import { FormFieldGroup as Lo } from "@instructure/ui-form-field";
21
21
  import { TextInput as Bt } from "@instructure/ui-text-input";
@@ -136,6 +136,7 @@ const $d = {
136
136
  confirmRemoveUserTitle: "Remove user from tag?",
137
137
  dragCancelled: "Dragging %{tagName} was cancelled. Tag remains in %{categoryName}.",
138
138
  dragDropped: "%{tagName} moved to %{categoryName}.",
139
+ dragDroppedCategoryExpanded: "%{tagName} moved to %{categoryName}. %{categoryName} expanded.",
139
140
  dragDroppedSameCategory: "%{tagName} dropped back in its original category. No change.",
140
141
  dragHandleLabel: "Drag handle for %{tagName} tag",
141
142
  dragInstructions: "Press Space or Enter to pick up a tag. Use arrow keys to navigate between categories. Press Space or Enter to drop, or press Escape to cancel.",
@@ -314,7 +315,7 @@ function Di(e, t) {
314
315
  return !ht(n, t);
315
316
  });
316
317
  }
317
- var ts = 1, hn = 1, Tc = 0, Qe = 0, pe = 0, yn = "";
318
+ var ts = 1, hn = 1, Cc = 0, Qe = 0, pe = 0, yn = "";
318
319
  function ns(e, t, n, r, s, o, i, a) {
319
320
  return { value: e, root: t, parent: n, type: r, props: s, children: o, line: ts, column: hn, length: i, return: "", siblings: a };
320
321
  }
@@ -333,7 +334,7 @@ function Zd() {
333
334
  return pe = Qe > 0 ? ye(yn, --Qe) : 0, hn--, pe === 10 && (hn = 1, ts--), pe;
334
335
  }
335
336
  function nt() {
336
- return pe = Qe < Tc ? ye(yn, Qe++) : 0, hn++, pe === 10 && (hn = 1, ts++), pe;
337
+ return pe = Qe < Cc ? ye(yn, Qe++) : 0, hn++, pe === 10 && (hn = 1, ts++), pe;
337
338
  }
338
339
  function Dt() {
339
340
  return ye(yn, Qe);
@@ -377,7 +378,7 @@ function Hn(e) {
377
378
  return 0;
378
379
  }
379
380
  function Yd(e) {
380
- return ts = hn = 1, Tc = et(yn = e), Qe = 0, [];
381
+ return ts = hn = 1, Cc = et(yn = e), Qe = 0, [];
381
382
  }
382
383
  function Kd(e) {
383
384
  return yn = "", e;
@@ -428,11 +429,11 @@ function tf(e) {
428
429
  return Kd(Or("", null, null, null, [""], e = Yd(e), 0, [0], e));
429
430
  }
430
431
  function Or(e, t, n, r, s, o, i, a, c) {
431
- for (var l = 0, d = 0, f = i, m = 0, g = 0, v = 0, h = 1, b = 1, T = 1, w = 0, C = "", A = s, x = o, $ = r, k = C; b; )
432
+ for (var l = 0, d = 0, f = i, h = 0, g = 0, v = 0, m = 1, b = 1, C = 1, w = 0, T = "", I = s, x = o, $ = r, k = T; b; )
432
433
  switch (v = w, w = nt()) {
433
434
  case 40:
434
435
  if (v != 108 && ye(k, f - 1) == 58) {
435
- Er(k += U(Ss(w), "&", "&\f"), "&\f", vc(l ? a[l - 1] : 0)) != -1 && (T = -1);
436
+ Er(k += U(Ss(w), "&", "&\f"), "&\f", vc(l ? a[l - 1] : 0)) != -1 && (C = -1);
436
437
  break;
437
438
  }
438
439
  case 34:
@@ -459,9 +460,9 @@ function Or(e, t, n, r, s, o, i, a, c) {
459
460
  k += "/";
460
461
  }
461
462
  break;
462
- case 123 * h:
463
- a[l++] = et(k) * T;
464
- case 125 * h:
463
+ case 123 * m:
464
+ a[l++] = et(k) * C;
465
+ case 125 * m:
465
466
  case 59:
466
467
  case 0:
467
468
  switch (w) {
@@ -469,16 +470,16 @@ function Or(e, t, n, r, s, o, i, a, c) {
469
470
  case 125:
470
471
  b = 0;
471
472
  case 59 + d:
472
- T == -1 && (k = U(k, /\f/g, "")), g > 0 && (et(k) - f || h === 0 && v === 47) && $n(g > 32 ? Mi(k + ";", r, n, f - 1, c) : Mi(U(k, " ", "") + ";", r, n, f - 2, c), c);
473
+ C == -1 && (k = U(k, /\f/g, "")), g > 0 && (et(k) - f || m === 0 && v === 47) && $n(g > 32 ? Mi(k + ";", r, n, f - 1, c) : Mi(U(k, " ", "") + ";", r, n, f - 2, c), c);
473
474
  break;
474
475
  case 59:
475
476
  k += ";";
476
477
  default:
477
- if ($n($ = $i(k, t, n, l, d, s, a, C, A = [], x = [], f, o), o), w === 123)
478
+ if ($n($ = $i(k, t, n, l, d, s, a, T, I = [], x = [], f, o), o), w === 123)
478
479
  if (d === 0)
479
- Or(k, t, $, $, A, o, f, a, x);
480
+ Or(k, t, $, $, I, o, f, a, x);
480
481
  else {
481
- switch (m) {
482
+ switch (h) {
482
483
  case 99:
483
484
  if (ye(k, 3) === 110) break;
484
485
  case 108:
@@ -489,40 +490,40 @@ function Or(e, t, n, r, s, o, i, a, c) {
489
490
  case 109:
490
491
  case 115:
491
492
  }
492
- d ? Or(e, $, $, r && $n($i(e, $, $, 0, 0, s, a, C, s, A = [], f, x), x), s, x, f, a, r ? A : x) : Or(k, $, $, $, [""], x, 0, a, x);
493
+ d ? Or(e, $, $, r && $n($i(e, $, $, 0, 0, s, a, T, s, I = [], f, x), x), s, x, f, a, r ? I : x) : Or(k, $, $, $, [""], x, 0, a, x);
493
494
  }
494
495
  }
495
- l = d = g = 0, h = T = 1, C = k = "", f = i;
496
+ l = d = g = 0, m = C = 1, T = k = "", f = i;
496
497
  break;
497
498
  case 58:
498
499
  f = 1 + et(k), g = v;
499
500
  default:
500
- if (h < 1) {
501
+ if (m < 1) {
501
502
  if (w == 123)
502
- --h;
503
- else if (w == 125 && h++ == 0 && Zd() == 125)
503
+ --m;
504
+ else if (w == 125 && m++ == 0 && Zd() == 125)
504
505
  continue;
505
506
  }
506
- switch (k += _o(w), w * h) {
507
+ switch (k += _o(w), w * m) {
507
508
  case 38:
508
- T = d > 0 ? 1 : (k += "\f", -1);
509
+ C = d > 0 ? 1 : (k += "\f", -1);
509
510
  break;
510
511
  case 44:
511
- a[l++] = (et(k) - 1) * T, T = 1;
512
+ a[l++] = (et(k) - 1) * C, C = 1;
512
513
  break;
513
514
  case 64:
514
- Dt() === 45 && (k += Ss(nt())), m = Dt(), d = f = et(C = k += ef(Ar())), w++;
515
+ Dt() === 45 && (k += Ss(nt())), h = Dt(), d = f = et(T = k += ef(Ar())), w++;
515
516
  break;
516
517
  case 45:
517
- v === 45 && et(k) == 2 && (h = 0);
518
+ v === 45 && et(k) == 2 && (m = 0);
518
519
  }
519
520
  }
520
521
  return o;
521
522
  }
522
523
  function $i(e, t, n, r, s, o, i, a, c, l, d, f) {
523
- for (var m = s - 1, g = s === 0 ? o : [""], v = bc(g), h = 0, b = 0, T = 0; h < r; ++h)
524
- for (var w = 0, C = jt(e, m + 1, m = vc(b = i[h])), A = e; w < v; ++w)
525
- (A = wc(b > 0 ? g[w] + " " + C : U(C, /&\f/g, g[w]))) && (c[T++] = A);
524
+ for (var h = s - 1, g = s === 0 ? o : [""], v = bc(g), m = 0, b = 0, C = 0; m < r; ++m)
525
+ for (var w = 0, T = jt(e, h + 1, h = vc(b = i[m])), I = e; w < v; ++w)
526
+ (I = wc(b > 0 ? g[w] + " " + T : U(T, /&\f/g, g[w]))) && (c[C++] = I);
526
527
  return ns(e, t, n, s === 0 ? es : a, c, l, d, f);
527
528
  }
528
529
  function nf(e, t, n, r) {
@@ -531,7 +532,7 @@ function nf(e, t, n, r) {
531
532
  function Mi(e, t, n, r, s) {
532
533
  return ns(e, t, n, Fo, jt(e, 0, r), jt(e, r + 1, -1), r, s);
533
534
  }
534
- function Cc(e, t, n) {
535
+ function Tc(e, t, n) {
535
536
  switch (jd(e, t)) {
536
537
  case 5103:
537
538
  return Z + "print-" + e + e;
@@ -647,7 +648,7 @@ function Cc(e, t, n) {
647
648
  case 102:
648
649
  return U(e, /(.+:)(.+)-([^]+)/, "$1" + Z + "$2-$3$1" + _n + (ye(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
649
650
  case 115:
650
- return ~Er(e, "stretch", 0) ? Cc(U(e, "stretch", "fill-available"), t, n) + e : e;
651
+ return ~Er(e, "stretch", 0) ? Tc(U(e, "stretch", "fill-available"), t, n) + e : e;
651
652
  }
652
653
  break;
653
654
  case 5152:
@@ -715,7 +716,7 @@ function af(e, t, n, r) {
715
716
  if (e.length > -1 && !e.return)
716
717
  switch (e.type) {
717
718
  case Fo:
718
- e.return = Cc(e.value, e.length, n);
719
+ e.return = Tc(e.value, e.length, n);
719
720
  return;
720
721
  case yc:
721
722
  return Wr([Nt(e, { value: U(e.value, "@", "@" + Z) })], r);
@@ -877,9 +878,9 @@ function Mr(e) {
877
878
  function vf(e) {
878
879
  return Mr(e) ? `styled.${e}` : `Styled(${zo(e)})`;
879
880
  }
880
- const Ac = Symbol.for("react.memo"), wf = Symbol.for("react.forward_ref"), bf = { contextType: !0, defaultProps: !0, displayName: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, propTypes: !0, type: !0 }, Tf = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, Oc = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, Cf = { [wf]: { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, [Ac]: Oc };
881
+ const Ac = Symbol.for("react.memo"), wf = Symbol.for("react.forward_ref"), bf = { contextType: !0, defaultProps: !0, displayName: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, propTypes: !0, type: !0 }, Cf = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, Oc = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, Tf = { [wf]: { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, [Ac]: Oc };
881
882
  function Fi(e) {
882
- return ("type" in (t = e) && t.type.$$typeof) === Ac ? Oc : "$$typeof" in e ? Cf[e.$$typeof] : bf;
883
+ return ("type" in (t = e) && t.type.$$typeof) === Ac ? Oc : "$$typeof" in e ? Tf[e.$$typeof] : bf;
883
884
  var t;
884
885
  }
885
886
  const Sf = Object.defineProperty, xf = Object.getOwnPropertyNames, kf = Object.getOwnPropertySymbols, If = Object.getOwnPropertyDescriptor, Nf = Object.getPrototypeOf, Ef = Object.prototype;
@@ -890,7 +891,7 @@ function Dc(e, t, n) {
890
891
  const s = xf(t).concat(kf(t)), o = Fi(e), i = Fi(t);
891
892
  for (let a = 0; a < s.length; ++a) {
892
893
  const c = s[a];
893
- if (!(c in Tf || n && n[c] || i && c in i || o && c in o)) {
894
+ if (!(c in Cf || n && n[c] || i && c in i || o && c in o)) {
894
895
  const l = If(t, c);
895
896
  try {
896
897
  Sf(e, c, l);
@@ -1075,10 +1076,10 @@ class is {
1075
1076
  if (d === void 0 || !d.size) continue;
1076
1077
  const f = o.getGroup(c);
1077
1078
  if (f.length === 0) continue;
1078
- const m = Gt + ".g" + c + '[id="' + l + '"]';
1079
+ const h = Gt + ".g" + c + '[id="' + l + '"]';
1079
1080
  let g = "";
1080
1081
  for (const v of d) v.length > 0 && (g += v + ",");
1081
- a += f + m + '{content:"' + g + '"}' + qo;
1082
+ a += f + h + '{content:"' + g + '"}' + qo;
1082
1083
  }
1083
1084
  return a;
1084
1085
  })(this));
@@ -1259,42 +1260,42 @@ function Wc(e, t) {
1259
1260
  }
1260
1261
  function Bf({ options: e = mn, plugins: t = Wo } = mn) {
1261
1262
  let n, r, s;
1262
- const o = (m, g, v) => v.startsWith(r) && v.endsWith(r) && v.replaceAll(r, "").length > 0 ? `.${n}` : m, i = t.slice();
1263
- i.push((m) => {
1264
- m.type === es && m.value.includes("&") && (s || (s = new RegExp(`\\${r}\\b`, "g")), m.props[0] = m.props[0].replace(Vf, r).replace(s, o));
1263
+ const o = (h, g, v) => v.startsWith(r) && v.endsWith(r) && v.replaceAll(r, "").length > 0 ? `.${n}` : h, i = t.slice();
1264
+ i.push((h) => {
1265
+ h.type === es && h.value.includes("&") && (s || (s = new RegExp(`\\${r}\\b`, "g")), h.props[0] = h.props[0].replace(Vf, r).replace(s, o));
1265
1266
  }), e.prefix && i.push(af), i.push(rf);
1266
1267
  let a = [];
1267
- const c = sf(i.concat(of((m) => a.push(m)))), l = (m, g = "", v = "", h = "&") => {
1268
- n = h, r = g, s = void 0;
1268
+ const c = sf(i.concat(of((h) => a.push(h)))), l = (h, g = "", v = "", m = "&") => {
1269
+ n = m, r = g, s = void 0;
1269
1270
  const b = function(w) {
1270
- const C = w.indexOf("//") !== -1, A = w.indexOf("}") !== -1;
1271
- if (!C && !A) return w;
1272
- if (!C) return Ns(w);
1271
+ const T = w.indexOf("//") !== -1, I = w.indexOf("}") !== -1;
1272
+ if (!T && !I) return w;
1273
+ if (!T) return Ns(w);
1273
1274
  const x = w.length;
1274
- let $ = "", k = 0, I = 0, R = 0, S = 0, N = 0, L = !1;
1275
- for (; I < x; ) {
1276
- const O = w.charCodeAt(I);
1277
- if (O !== 34 && O !== 39 || qc(w, I)) if (R === 0) if (O === Ft && I + 1 < x && w.charCodeAt(I + 1) === 42) {
1278
- for (I += 2; I + 1 < x && (w.charCodeAt(I) !== 42 || w.charCodeAt(I + 1) !== Ft); ) I++;
1279
- I += 2;
1280
- } else if (O !== 40) if (O !== 41) if (S > 0) I++;
1281
- else if (O === 42 && I + 1 < x && w.charCodeAt(I + 1) === Ft) $ += w.substring(k, I), I += 2, k = I, L = !0;
1282
- else if (O === Ft && I + 1 < x && w.charCodeAt(I + 1) === Ft) {
1283
- for ($ += w.substring(k, I); I < x && w.charCodeAt(I) !== 10; ) I++;
1284
- k = I, L = !0;
1285
- } else O === 123 ? N++ : O === 125 && N--, I++;
1286
- else S > 0 && S--, I++;
1287
- else S++, I++;
1288
- else I++;
1289
- else R === 0 ? R = O : R === O && (R = 0), I++;
1290
- }
1291
- return L ? (k < x && ($ += w.substring(k)), N === 0 ? $ : Ns($)) : N === 0 ? w : Ns(w);
1292
- }(m);
1293
- let T = tf(v || g ? v + " " + g + " { " + b + " }" : b);
1294
- return e.namespace && (T = Wc(T, e.namespace)), a = [], Wr(T, c), a;
1275
+ let $ = "", k = 0, N = 0, R = 0, S = 0, E = 0, L = !1;
1276
+ for (; N < x; ) {
1277
+ const O = w.charCodeAt(N);
1278
+ if (O !== 34 && O !== 39 || qc(w, N)) if (R === 0) if (O === Ft && N + 1 < x && w.charCodeAt(N + 1) === 42) {
1279
+ for (N += 2; N + 1 < x && (w.charCodeAt(N) !== 42 || w.charCodeAt(N + 1) !== Ft); ) N++;
1280
+ N += 2;
1281
+ } else if (O !== 40) if (O !== 41) if (S > 0) N++;
1282
+ else if (O === 42 && N + 1 < x && w.charCodeAt(N + 1) === Ft) $ += w.substring(k, N), N += 2, k = N, L = !0;
1283
+ else if (O === Ft && N + 1 < x && w.charCodeAt(N + 1) === Ft) {
1284
+ for ($ += w.substring(k, N); N < x && w.charCodeAt(N) !== 10; ) N++;
1285
+ k = N, L = !0;
1286
+ } else O === 123 ? E++ : O === 125 && E--, N++;
1287
+ else S > 0 && S--, N++;
1288
+ else S++, N++;
1289
+ else N++;
1290
+ else R === 0 ? R = O : R === O && (R = 0), N++;
1291
+ }
1292
+ return L ? (k < x && ($ += w.substring(k)), E === 0 ? $ : Ns($)) : E === 0 ? w : Ns(w);
1293
+ }(h);
1294
+ let C = tf(v || g ? v + " " + g + " { " + b + " }" : b);
1295
+ return e.namespace && (C = Wc(C, e.namespace)), a = [], Wr(C, c), a;
1295
1296
  }, d = e;
1296
1297
  let f = io;
1297
- for (let m = 0; m < t.length; m++) t[m].name || vn(15), f = Ut(f, t[m].name);
1298
+ for (let h = 0; h < t.length; h++) t[h].name || vn(15), f = Ut(f, t[h].name);
1298
1299
  return d != null && d.namespace && (f = Ut(f, d.namespace)), d != null && d.prefix && (f = Ut(f, "p")), l.hash = f !== io ? f.toString() : "", l;
1299
1300
  }
1300
1301
  const jf = new is(), fo = Bf(), Uc = y.createContext({ shouldForwardProp: void 0, styleSheet: jf, stylis: fo, stylisPlugins: void 0 });
@@ -1316,22 +1317,22 @@ function Zf(e, t, n) {
1316
1317
  const r = $c(e), s = e, o = !Mr(e), { attrs: i = Wo, componentId: a = Hf(t.displayName, t.parentComponentId), displayName: c = vf(e) } = t, l = t.displayName && t.componentId ? Ic(t.displayName) + "-" + t.componentId : t.componentId || a, d = r && s.attrs ? s.attrs.concat(i).filter(Boolean) : i;
1317
1318
  let { shouldForwardProp: f } = t;
1318
1319
  if (r && s.shouldForwardProp) {
1319
- const h = s.shouldForwardProp;
1320
+ const m = s.shouldForwardProp;
1320
1321
  if (t.shouldForwardProp) {
1321
1322
  const b = t.shouldForwardProp;
1322
- f = (T, w) => h(T, w) && b(T, w);
1323
- } else f = h;
1324
- }
1325
- const m = new zf(n, l, r ? s.componentStyle : void 0);
1326
- function g(h, b) {
1327
- return function(T, w, C) {
1328
- const { attrs: A, componentStyle: x, defaultProps: $, foldedComponentIds: k, styledComponentId: I, target: R } = T, S = y.useContext(zc), N = Gf(), L = T.shouldForwardProp || N.shouldForwardProp;
1329
- process.env.NODE_ENV !== "production" && y.useDebugValue && y.useDebugValue(I);
1323
+ f = (C, w) => m(C, w) && b(C, w);
1324
+ } else f = m;
1325
+ }
1326
+ const h = new zf(n, l, r ? s.componentStyle : void 0);
1327
+ function g(m, b) {
1328
+ return function(C, w, T) {
1329
+ const { attrs: I, componentStyle: x, defaultProps: $, foldedComponentIds: k, styledComponentId: N, target: R } = C, S = y.useContext(zc), E = Gf(), L = C.shouldForwardProp || E.shouldForwardProp;
1330
+ process.env.NODE_ENV !== "production" && y.useDebugValue && y.useDebugValue(N);
1330
1331
  const O = hf(w, S, $) || mn;
1331
1332
  let z, M;
1332
1333
  {
1333
1334
  const F = y.useRef(null), J = F.current;
1334
- if (J !== null && J[1] === O && J[2] === N.styleSheet && J[3] === N.stylis && J[7] === x && function(Oe, se, oe) {
1335
+ if (J !== null && J[1] === O && J[2] === E.styleSheet && J[3] === E.stylis && J[7] === x && function(Oe, se, oe) {
1335
1336
  const te = Oe, ge = se;
1336
1337
  let he = 0;
1337
1338
  for (const Fe in ge) if (Vi.call(ge, Fe) && (he++, te[Fe] !== ge[Fe])) return !1;
@@ -1345,38 +1346,38 @@ function Zf(e, t, n) {
1345
1346
  for (const ce in dt) ce === "className" ? ge.className = Rn(ge.className, dt[ce]) : ce === "style" ? ge.style = Object.assign(Object.assign({}, ge.style), dt[ce]) : ce in oe && oe[ce] === void 0 || (ge[ce] = dt[ce]);
1346
1347
  }
1347
1348
  return "className" in oe && typeof oe.className == "string" && (ge.className = Rn(ge.className, oe.className)), ge;
1348
- }(A, w, O), M = function(se, oe, te, ge) {
1349
+ }(I, w, O), M = function(se, oe, te, ge) {
1349
1350
  const he = se.generateAndInjectStyles(oe, te, ge);
1350
1351
  return process.env.NODE_ENV !== "production" && y.useDebugValue && y.useDebugValue(he), he;
1351
- }(x, z, N.styleSheet, N.stylis);
1352
+ }(x, z, E.styleSheet, E.stylis);
1352
1353
  let Oe = 0;
1353
1354
  for (const se in w) Vi.call(w, se) && Oe++;
1354
- F.current = [w, O, N.styleSheet, N.stylis, Oe, z, M, x];
1355
+ F.current = [w, O, E.styleSheet, E.stylis, Oe, z, M, x];
1355
1356
  }
1356
1357
  }
1357
- process.env.NODE_ENV !== "production" && T.warnTooManyClasses && T.warnTooManyClasses(M);
1358
+ process.env.NODE_ENV !== "production" && C.warnTooManyClasses && C.warnTooManyClasses(M);
1358
1359
  const Y = z.as || R, B = function(F, J, Oe, se) {
1359
1360
  const oe = {};
1360
1361
  for (const te in F) F[te] === void 0 || te[0] === "$" || te === "as" || te === "theme" && F.theme === Oe || (te === "forwardedAs" ? oe.as = F.forwardedAs : se && !se(te, J) || (oe[te] = F[te], se || process.env.NODE_ENV !== "development" || Ud(te) || (As || (As = /* @__PURE__ */ new Set())).has(te) || !Mr(J) || J.includes("-") || (As.add(te), console.warn(`styled-components: it looks like an unknown prop "${te}" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via \`<StyleSheetManager shouldForwardProp={...}>\` (connect an API like \`@emotion/is-prop-valid\`) or consider using transient props (\`$\` prefix for automatic filtering.)`))));
1361
1362
  return oe;
1362
1363
  }(z, Y, O, L);
1363
- let Ce = Rn(k, I);
1364
- return M && (Ce += " " + M), z.className && (Ce += " " + z.className), B[Mr(Y) && Y.includes("-") ? "class" : "className"] = Ce, C && (B.ref = C), ld(Y, B);
1365
- }(v, h, b);
1364
+ let Te = Rn(k, N);
1365
+ return M && (Te += " " + M), z.className && (Te += " " + z.className), B[Mr(Y) && Y.includes("-") ? "class" : "className"] = Te, T && (B.ref = T), ld(Y, B);
1366
+ }(v, m, b);
1366
1367
  }
1367
1368
  g.displayName = c;
1368
1369
  let v = y.forwardRef(g);
1369
- return v.attrs = d, v.componentStyle = m, v.displayName = c, v.shouldForwardProp = f, v.foldedComponentIds = r ? Rn(s.foldedComponentIds, s.styledComponentId) : "", v.styledComponentId = l, v.target = r ? s.target : e, Object.defineProperty(v, "defaultProps", { get() {
1370
+ return v.attrs = d, v.componentStyle = h, v.displayName = c, v.shouldForwardProp = f, v.foldedComponentIds = r ? Rn(s.foldedComponentIds, s.styledComponentId) : "", v.styledComponentId = l, v.target = r ? s.target : e, Object.defineProperty(v, "defaultProps", { get() {
1370
1371
  return this._foldedDefaultProps;
1371
- }, set(h) {
1372
- this._foldedDefaultProps = r ? function(b, ...T) {
1373
- for (const w of T) co(b, w, !0);
1372
+ }, set(m) {
1373
+ this._foldedDefaultProps = r ? function(b, ...C) {
1374
+ for (const w of C) co(b, w, !0);
1374
1375
  return b;
1375
- }({}, s.defaultProps, h) : h;
1376
- } }), process.env.NODE_ENV !== "production" && (gf(c, l), v.warnTooManyClasses = /* @__PURE__ */ ((h, b) => {
1377
- let T = {}, w = !1;
1378
- return (C) => {
1379
- !w && (T[C] = !0, Object.keys(T).length >= 200) && (console.warn(`Over 200 classes were generated for component ${h}${b ? ` with the id of "${b}"` : ""}.
1376
+ }({}, s.defaultProps, m) : m;
1377
+ } }), process.env.NODE_ENV !== "production" && (gf(c, l), v.warnTooManyClasses = /* @__PURE__ */ ((m, b) => {
1378
+ let C = {}, w = !1;
1379
+ return (T) => {
1380
+ !w && (C[T] = !0, Object.keys(C).length >= 200) && (console.warn(`Over 200 classes were generated for component ${m}${b ? ` with the id of "${b}"` : ""}.
1380
1381
  Consider using the attrs method, together with a style object for frequently changed styles.
1381
1382
  Example:
1382
1383
  const Component = styled.div.attrs(props => ({
@@ -1385,7 +1386,7 @@ Example:
1385
1386
  },
1386
1387
  }))\`width: 100%;\`
1387
1388
 
1388
- <Component />`), w = !0, T = {});
1389
+ <Component />`), w = !0, C = {});
1389
1390
  };
1390
1391
  })(c, l)), Vo(v, () => `.${v.styledComponentId}`), o && Dc(v, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), v;
1391
1392
  }
@@ -1406,9 +1407,9 @@ function go(e, t, n = mn) {
1406
1407
  const r = (s, ...o) => e(t, n, Vc(s, ...o));
1407
1408
  return r.attrs = (s) => go(e, t, Object.assign(Object.assign({}, n), { attrs: Array.prototype.concat(n.attrs, s).filter(Boolean) })), r.withConfig = (s) => go(e, t, Object.assign(Object.assign({}, n), s)), r;
1408
1409
  }
1409
- const Bc = (e) => go(Zf, e), E = Bc;
1410
+ const Bc = (e) => go(Zf, e), A = Bc;
1410
1411
  Yf.forEach((e) => {
1411
- E[e] = Bc(e);
1412
+ A[e] = Bc(e);
1412
1413
  });
1413
1414
  var jc;
1414
1415
  class Kf {
@@ -1440,11 +1441,11 @@ const br = `__sc-${Gt}__`;
1440
1441
  process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof window < "u" && (window[br] || (window[br] = 0), window[br] === 1 && console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
1441
1442
 
1442
1443
  See https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info.`), window[br] += 1);
1443
- const Xf = E.div`
1444
+ const Xf = A.div`
1444
1445
  display: inline-flex;
1445
1446
  flex-wrap: wrap;
1446
1447
  gap: ${p.spacing.space4};
1447
- `, Jf = E.span`
1448
+ `, Jf = A.span`
1448
1449
  cursor: default;
1449
1450
  `, eg = (e) => "_id" in e ? e._id : String(e.id), _b = ({ tags: e }) => {
1450
1451
  if (!e.length) return null;
@@ -1466,13 +1467,13 @@ const Xf = E.div`
1466
1467
  }), Pe = () => y.useContext(Gc), Bo = ["inst-tagging-sr-polite-0", "inst-tagging-sr-polite-1"], Hc = [
1467
1468
  "inst-tagging-sr-assertive-0",
1468
1469
  "inst-tagging-sr-assertive-1"
1469
- ], tg = E.div`
1470
+ ], tg = A.div`
1470
1471
  position: fixed;
1471
1472
  top: 0;
1472
1473
  left: 0;
1473
1474
  right: 0;
1474
1475
  z-index: 9999;
1475
- `, Zt = E.span`
1476
+ `, Zt = A.span`
1476
1477
  position: absolute;
1477
1478
  width: 1px;
1478
1479
  height: 1px;
@@ -1482,7 +1483,7 @@ const Xf = E.div`
1482
1483
  clip: rect(0, 0, 0, 0);
1483
1484
  white-space: nowrap;
1484
1485
  border: 0;
1485
- `, ng = E.div`
1486
+ `, ng = A.div`
1486
1487
  width: 50%;
1487
1488
  margin: 0 auto;
1488
1489
  overflow-wrap: break-word;
@@ -1845,49 +1846,49 @@ function vg(e) {
1845
1846
  }, []), hg(de(() => ({
1846
1847
  onDragStart(f) {
1847
1848
  let {
1848
- active: m
1849
+ active: h
1849
1850
  } = f;
1850
1851
  o(t.onDragStart({
1851
- active: m
1852
+ active: h
1852
1853
  }));
1853
1854
  },
1854
1855
  onDragMove(f) {
1855
1856
  let {
1856
- active: m,
1857
+ active: h,
1857
1858
  over: g
1858
1859
  } = f;
1859
1860
  t.onDragMove && o(t.onDragMove({
1860
- active: m,
1861
+ active: h,
1861
1862
  over: g
1862
1863
  }));
1863
1864
  },
1864
1865
  onDragOver(f) {
1865
1866
  let {
1866
- active: m,
1867
+ active: h,
1867
1868
  over: g
1868
1869
  } = f;
1869
1870
  o(t.onDragOver({
1870
- active: m,
1871
+ active: h,
1871
1872
  over: g
1872
1873
  }));
1873
1874
  },
1874
1875
  onDragEnd(f) {
1875
1876
  let {
1876
- active: m,
1877
+ active: h,
1877
1878
  over: g
1878
1879
  } = f;
1879
1880
  o(t.onDragEnd({
1880
- active: m,
1881
+ active: h,
1881
1882
  over: g
1882
1883
  }));
1883
1884
  },
1884
1885
  onDragCancel(f) {
1885
1886
  let {
1886
- active: m,
1887
+ active: h,
1887
1888
  over: g
1888
1889
  } = f;
1889
1890
  o(t.onDragCancel({
1890
- active: m,
1891
+ active: h,
1891
1892
  over: g
1892
1893
  }));
1893
1894
  }
@@ -1956,7 +1957,7 @@ function Xc(e, t) {
1956
1957
  } = t;
1957
1958
  return n - r;
1958
1959
  }
1959
- function Tg(e, t) {
1960
+ function Cg(e, t) {
1960
1961
  let {
1961
1962
  data: {
1962
1963
  value: n
@@ -1968,7 +1969,7 @@ function Tg(e, t) {
1968
1969
  } = t;
1969
1970
  return r - n;
1970
1971
  }
1971
- function Cg(e) {
1972
+ function Tg(e) {
1972
1973
  let {
1973
1974
  left: t,
1974
1975
  top: n,
@@ -2055,7 +2056,7 @@ const Ig = (e) => {
2055
2056
  });
2056
2057
  }
2057
2058
  }
2058
- return s.sort(Tg);
2059
+ return s.sort(Cg);
2059
2060
  };
2060
2061
  function Ng(e, t) {
2061
2062
  const {
@@ -2080,7 +2081,7 @@ const Eg = (e) => {
2080
2081
  id: i
2081
2082
  } = o, a = n.get(i);
2082
2083
  if (a && Ng(r, a)) {
2083
- const l = Cg(a).reduce((f, m) => f + Qc(r, m), 0), d = Number((l / 4).toFixed(4));
2084
+ const l = Tg(a).reduce((f, h) => f + Qc(r, h), 0), d = Number((l / 4).toFixed(4));
2084
2085
  s.push({
2085
2086
  id: i,
2086
2087
  data: {
@@ -2296,18 +2297,18 @@ function _g(e, t, n, r, s) {
2296
2297
  isTop: l,
2297
2298
  isBottom: d,
2298
2299
  isLeft: f,
2299
- isRight: m
2300
+ isRight: h
2300
2301
  } = ol(e), g = {
2301
2302
  x: 0,
2302
2303
  y: 0
2303
2304
  }, v = {
2304
2305
  x: 0,
2305
2306
  y: 0
2306
- }, h = {
2307
+ }, m = {
2307
2308
  height: t.height * s.y,
2308
2309
  width: t.width * s.x
2309
2310
  };
2310
- return !l && o <= t.top + h.height ? (g.y = we.Backward, v.y = r * Math.abs((t.top + h.height - o) / h.height)) : !d && c >= t.bottom - h.height && (g.y = we.Forward, v.y = r * Math.abs((t.bottom - h.height - c) / h.height)), !m && a >= t.right - h.width ? (g.x = we.Forward, v.x = r * Math.abs((t.right - h.width - a) / h.width)) : !f && i <= t.left + h.width && (g.x = we.Backward, v.x = r * Math.abs((t.left + h.width - i) / h.width)), {
2311
+ return !l && o <= t.top + m.height ? (g.y = we.Backward, v.y = r * Math.abs((t.top + m.height - o) / m.height)) : !d && c >= t.bottom - m.height && (g.y = we.Forward, v.y = r * Math.abs((t.bottom - m.height - c) / m.height)), !h && a >= t.right - m.width ? (g.x = we.Forward, v.x = r * Math.abs((t.right - m.width - a) / m.width)) : !f && i <= t.left + m.width && (g.x = we.Backward, v.x = r * Math.abs((t.left + m.width - i) / m.width)), {
2311
2312
  direction: g,
2312
2313
  speed: v
2313
2314
  };
@@ -2510,48 +2511,48 @@ class Ko {
2510
2511
  currentCoordinates: d
2511
2512
  });
2512
2513
  if (f) {
2513
- const m = Br(f, d), g = {
2514
+ const h = Br(f, d), g = {
2514
2515
  x: 0,
2515
2516
  y: 0
2516
2517
  }, {
2517
2518
  scrollableAncestors: v
2518
2519
  } = r.current;
2519
- for (const h of v) {
2520
+ for (const m of v) {
2520
2521
  const b = t.code, {
2521
- isTop: T,
2522
+ isTop: C,
2522
2523
  isRight: w,
2523
- isLeft: C,
2524
- isBottom: A,
2524
+ isLeft: T,
2525
+ isBottom: I,
2525
2526
  maxScroll: x,
2526
2527
  minScroll: $
2527
- } = ol(h), k = qg(h), I = {
2528
+ } = ol(m), k = qg(m), N = {
2528
2529
  x: Math.min(b === G.Right ? k.right - k.width / 2 : k.right, Math.max(b === G.Right ? k.left : k.left + k.width / 2, f.x)),
2529
2530
  y: Math.min(b === G.Down ? k.bottom - k.height / 2 : k.bottom, Math.max(b === G.Down ? k.top : k.top + k.height / 2, f.y))
2530
- }, R = b === G.Right && !w || b === G.Left && !C, S = b === G.Down && !A || b === G.Up && !T;
2531
- if (R && I.x !== f.x) {
2532
- const N = h.scrollLeft + m.x, L = b === G.Right && N <= x.x || b === G.Left && N >= $.x;
2533
- if (L && !m.y) {
2534
- h.scrollTo({
2535
- left: N,
2531
+ }, R = b === G.Right && !w || b === G.Left && !T, S = b === G.Down && !I || b === G.Up && !C;
2532
+ if (R && N.x !== f.x) {
2533
+ const E = m.scrollLeft + h.x, L = b === G.Right && E <= x.x || b === G.Left && E >= $.x;
2534
+ if (L && !h.y) {
2535
+ m.scrollTo({
2536
+ left: E,
2536
2537
  behavior: a
2537
2538
  });
2538
2539
  return;
2539
2540
  }
2540
- L ? g.x = h.scrollLeft - N : g.x = b === G.Right ? h.scrollLeft - x.x : h.scrollLeft - $.x, g.x && h.scrollBy({
2541
+ L ? g.x = m.scrollLeft - E : g.x = b === G.Right ? m.scrollLeft - x.x : m.scrollLeft - $.x, g.x && m.scrollBy({
2541
2542
  left: -g.x,
2542
2543
  behavior: a
2543
2544
  });
2544
2545
  break;
2545
- } else if (S && I.y !== f.y) {
2546
- const N = h.scrollTop + m.y, L = b === G.Down && N <= x.y || b === G.Up && N >= $.y;
2547
- if (L && !m.x) {
2548
- h.scrollTo({
2549
- top: N,
2546
+ } else if (S && N.y !== f.y) {
2547
+ const E = m.scrollTop + h.y, L = b === G.Down && E <= x.y || b === G.Up && E >= $.y;
2548
+ if (L && !h.x) {
2549
+ m.scrollTo({
2550
+ top: E,
2550
2551
  behavior: a
2551
2552
  });
2552
2553
  return;
2553
2554
  }
2554
- L ? g.y = h.scrollTop - N : g.y = b === G.Down ? h.scrollTop - x.y : h.scrollTop - $.y, g.y && h.scrollBy({
2555
+ L ? g.y = m.scrollTop - E : g.y = b === G.Down ? m.scrollTop - x.y : m.scrollTop - $.y, g.y && m.scrollBy({
2555
2556
  top: -g.y,
2556
2557
  behavior: a
2557
2558
  });
@@ -2848,15 +2849,15 @@ function Kg(e) {
2848
2849
  scrollableAncestors: l,
2849
2850
  scrollableAncestorRects: d,
2850
2851
  delta: f,
2851
- threshold: m
2852
+ threshold: h
2852
2853
  } = e;
2853
2854
  const g = Xg({
2854
2855
  delta: f,
2855
2856
  disabled: !o
2856
- }), [v, h] = ig(), b = ie({
2857
+ }), [v, m] = ig(), b = ie({
2857
2858
  x: 0,
2858
2859
  y: 0
2859
- }), T = ie({
2860
+ }), C = ie({
2860
2861
  x: 0,
2861
2862
  y: 0
2862
2863
  }), w = de(() => {
@@ -2871,50 +2872,50 @@ function Kg(e) {
2871
2872
  case Un.DraggableRect:
2872
2873
  return s;
2873
2874
  }
2874
- }, [n, s, c]), C = ie(null), A = Ie(() => {
2875
- const $ = C.current;
2875
+ }, [n, s, c]), T = ie(null), I = Ie(() => {
2876
+ const $ = T.current;
2876
2877
  if (!$)
2877
2878
  return;
2878
- const k = b.current.x * T.current.x, I = b.current.y * T.current.y;
2879
- $.scrollBy(k, I);
2879
+ const k = b.current.x * C.current.x, N = b.current.y * C.current.y;
2880
+ $.scrollBy(k, N);
2880
2881
  }, []), x = de(() => a === Hr.TreeOrder ? [...l].reverse() : l, [a, l]);
2881
2882
  fe(
2882
2883
  () => {
2883
2884
  if (!o || !l.length || !w) {
2884
- h();
2885
+ m();
2885
2886
  return;
2886
2887
  }
2887
2888
  for (const $ of x) {
2888
2889
  if ((r == null ? void 0 : r($)) === !1)
2889
2890
  continue;
2890
- const k = l.indexOf($), I = d[k];
2891
- if (!I)
2891
+ const k = l.indexOf($), N = d[k];
2892
+ if (!N)
2892
2893
  continue;
2893
2894
  const {
2894
2895
  direction: R,
2895
2896
  speed: S
2896
- } = _g($, I, w, t, m);
2897
- for (const N of ["x", "y"])
2898
- g[N][R[N]] || (S[N] = 0, R[N] = 0);
2897
+ } = _g($, N, w, t, h);
2898
+ for (const E of ["x", "y"])
2899
+ g[E][R[E]] || (S[E] = 0, R[E] = 0);
2899
2900
  if (S.x > 0 || S.y > 0) {
2900
- h(), C.current = $, v(A, i), b.current = S, T.current = R;
2901
+ m(), T.current = $, v(I, i), b.current = S, C.current = R;
2901
2902
  return;
2902
2903
  }
2903
2904
  }
2904
2905
  b.current = {
2905
2906
  x: 0,
2906
2907
  y: 0
2907
- }, T.current = {
2908
+ }, C.current = {
2908
2909
  x: 0,
2909
2910
  y: 0
2910
- }, h();
2911
+ }, m();
2911
2912
  },
2912
2913
  // eslint-disable-next-line react-hooks/exhaustive-deps
2913
2914
  [
2914
2915
  t,
2915
- A,
2916
+ I,
2916
2917
  r,
2917
- h,
2918
+ m,
2918
2919
  o,
2919
2920
  i,
2920
2921
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -2926,7 +2927,7 @@ function Kg(e) {
2926
2927
  x,
2927
2928
  d,
2928
2929
  // eslint-disable-next-line react-hooks/exhaustive-deps
2929
- JSON.stringify(m)
2930
+ JSON.stringify(h)
2930
2931
  ]
2931
2932
  );
2932
2933
  }
@@ -3002,26 +3003,26 @@ function th(e, t) {
3002
3003
  frequency: a,
3003
3004
  measure: c,
3004
3005
  strategy: l
3005
- } = s, d = ie(e), f = b(), m = Zn(f), g = Ie(function(T) {
3006
- T === void 0 && (T = []), !m.current && i((w) => w === null ? T : w.concat(T.filter((C) => !w.includes(C))));
3007
- }, [m]), v = ie(null), h = tr((T) => {
3006
+ } = s, d = ie(e), f = b(), h = Zn(f), g = Ie(function(C) {
3007
+ C === void 0 && (C = []), !h.current && i((w) => w === null ? C : w.concat(C.filter((T) => !w.includes(T))));
3008
+ }, [h]), v = ie(null), m = tr((C) => {
3008
3009
  if (f && !n)
3009
3010
  return ea;
3010
- if (!T || T === ea || d.current !== e || o != null) {
3011
+ if (!C || C === ea || d.current !== e || o != null) {
3011
3012
  const w = /* @__PURE__ */ new Map();
3012
- for (let C of e) {
3013
- if (!C)
3013
+ for (let T of e) {
3014
+ if (!T)
3014
3015
  continue;
3015
- if (o && o.length > 0 && !o.includes(C.id) && C.rect.current) {
3016
- w.set(C.id, C.rect.current);
3016
+ if (o && o.length > 0 && !o.includes(T.id) && T.rect.current) {
3017
+ w.set(T.id, T.rect.current);
3017
3018
  continue;
3018
3019
  }
3019
- const A = C.node.current, x = A ? new Yo(c(A), A) : null;
3020
- C.rect.current = x, x && w.set(C.id, x);
3020
+ const I = T.node.current, x = I ? new Yo(c(I), I) : null;
3021
+ T.rect.current = x, x && w.set(T.id, x);
3021
3022
  }
3022
3023
  return w;
3023
3024
  }
3024
- return T;
3025
+ return C;
3025
3026
  }, [e, o, n, f, c]);
3026
3027
  return fe(() => {
3027
3028
  d.current = e;
@@ -3046,7 +3047,7 @@ function th(e, t) {
3046
3047
  // eslint-disable-next-line react-hooks/exhaustive-deps
3047
3048
  [a, f, g, ...r]
3048
3049
  ), {
3049
- droppableRects: h,
3050
+ droppableRects: m,
3050
3051
  measureDroppableContainers: g,
3051
3052
  measuringScheduled: o != null
3052
3053
  };
@@ -3268,12 +3269,12 @@ function dh(e) {
3268
3269
  } of l)
3269
3270
  if (er(d)) {
3270
3271
  r((f) => {
3271
- const m = t(d);
3272
+ const h = t(d);
3272
3273
  return f ? {
3273
3274
  ...f,
3274
- width: m.width,
3275
- height: m.height
3276
- } : m;
3275
+ width: h.width,
3276
+ height: h.height
3277
+ } : h;
3277
3278
  });
3278
3279
  break;
3279
3280
  }
@@ -3572,8 +3573,8 @@ function wh(e) {
3572
3573
  return;
3573
3574
  const d = n(l), f = Jc(d, r);
3574
3575
  if (i || (f.x = 0), a || (f.y = 0), o.current = !0, Math.abs(f.x) > 0 || Math.abs(f.y) > 0) {
3575
- const m = tl(l);
3576
- m && m.scrollBy({
3576
+ const h = tl(l);
3577
+ h && h.scrollBy({
3577
3578
  top: f.y,
3578
3579
  left: f.x
3579
3580
  });
@@ -3598,20 +3599,20 @@ const bh = /* @__PURE__ */ dd(function(t) {
3598
3599
  children: l,
3599
3600
  sensors: d = fh,
3600
3601
  collisionDetection: f = Ig,
3601
- measuring: m,
3602
+ measuring: h,
3602
3603
  modifiers: g,
3603
3604
  ...v
3604
3605
  } = t;
3605
- const h = fd(ph, void 0, mh), [b, T] = h, [w, C] = mg(), [A, x] = De(Et.Uninitialized), $ = A === Et.Initialized, {
3606
+ const m = fd(ph, void 0, mh), [b, C] = m, [w, T] = mg(), [I, x] = De(Et.Uninitialized), $ = I === Et.Initialized, {
3606
3607
  draggable: {
3607
3608
  active: k,
3608
- nodes: I,
3609
+ nodes: N,
3609
3610
  translate: R
3610
3611
  },
3611
3612
  droppable: {
3612
3613
  containers: S
3613
3614
  }
3614
- } = b, N = k != null ? I.get(k) : null, L = ie({
3615
+ } = b, E = k != null ? N.get(k) : null, L = ie({
3615
3616
  initial: null,
3616
3617
  translated: null
3617
3618
  }), O = de(() => {
@@ -3619,10 +3620,10 @@ const bh = /* @__PURE__ */ dd(function(t) {
3619
3620
  return k != null ? {
3620
3621
  id: k,
3621
3622
  // It's possible for the active node to unmount while dragging
3622
- data: (Se = N == null ? void 0 : N.data) != null ? Se : gh,
3623
+ data: (Se = E == null ? void 0 : E.data) != null ? Se : gh,
3623
3624
  rect: L
3624
3625
  } : null;
3625
- }, [k, N]), z = ie(null), [M, Y] = De(null), [B, Ce] = De(null), F = Zn(v, Object.values(v)), J = ls("DndDescribedBy", i), Oe = de(() => S.getEnabled(), [S]), se = vh(m), {
3626
+ }, [k, E]), z = ie(null), [M, Y] = De(null), [B, Te] = De(null), F = Zn(v, Object.values(v)), J = ls("DndDescribedBy", i), Oe = de(() => S.getEnabled(), [S]), se = vh(h), {
3626
3627
  droppableRects: oe,
3627
3628
  measureDroppableContainers: te,
3628
3629
  measuringScheduled: ge
@@ -3630,9 +3631,9 @@ const bh = /* @__PURE__ */ dd(function(t) {
3630
3631
  dragging: $,
3631
3632
  dependencies: [R.x, R.y],
3632
3633
  config: se.droppable
3633
- }), he = Jg(I, k), Fe = de(() => B ? jr(B) : null, [B]), ut = cd(), dt = nh(he, se.draggable.measure);
3634
+ }), he = Jg(N, k), Fe = de(() => B ? jr(B) : null, [B]), ut = cd(), dt = nh(he, se.draggable.measure);
3634
3635
  wh({
3635
- activeNode: k != null ? I.get(k) : null,
3636
+ activeNode: k != null ? N.get(k) : null,
3636
3637
  config: ut.layoutShiftCompensation,
3637
3638
  initialRect: dt,
3638
3639
  measure: se.draggable.measure
@@ -3644,7 +3645,7 @@ const bh = /* @__PURE__ */ dd(function(t) {
3644
3645
  collisionRect: null,
3645
3646
  collisions: null,
3646
3647
  droppableRects: oe,
3647
- draggableNodes: I,
3648
+ draggableNodes: N,
3648
3649
  draggingNode: null,
3649
3650
  draggingNodeRect: null,
3650
3651
  droppableContainers: S,
@@ -3653,10 +3654,10 @@ const bh = /* @__PURE__ */ dd(function(t) {
3653
3654
  scrollAdjustedTranslate: null
3654
3655
  }), ee = S.getNodeFor((n = ne.current.over) == null ? void 0 : n.id), je = dh({
3655
3656
  measure: se.dragOverlay.measure
3656
- }), hr = (r = je.nodeRef.current) != null ? r : he, Qt = $ ? (s = je.rect) != null ? s : ce : null, bi = !!(je.nodeRef.current && je.rect), Ti = oh(bi ? null : ce), bs = ll(hr ? Ae(hr) : null), Tt = ih($ ? ee ?? he : null), mr = uh(Tt), pr = gl(g, {
3657
+ }), hr = (r = je.nodeRef.current) != null ? r : he, Qt = $ ? (s = je.rect) != null ? s : ce : null, bi = !!(je.nodeRef.current && je.rect), Ci = oh(bi ? null : ce), bs = ll(hr ? Ae(hr) : null), Ct = ih($ ? ee ?? he : null), mr = uh(Ct), pr = gl(g, {
3657
3658
  transform: {
3658
- x: R.x - Ti.x,
3659
- y: R.y - Ti.y,
3659
+ x: R.x - Ci.x,
3660
+ y: R.y - Ci.y,
3660
3661
  scaleX: 1,
3661
3662
  scaleY: 1
3662
3663
  },
@@ -3667,16 +3668,16 @@ const bh = /* @__PURE__ */ dd(function(t) {
3667
3668
  draggingNodeRect: Qt,
3668
3669
  over: ne.current.over,
3669
3670
  overlayNodeRect: je.rect,
3670
- scrollableAncestors: Tt,
3671
+ scrollableAncestors: Ct,
3671
3672
  scrollableAncestorRects: mr,
3672
3673
  windowRect: bs
3673
- }), Ci = Fe ? ln(Fe, R) : null, Si = ah(Tt), td = ra(Si), nd = ra(Si, [ce]), Xt = ln(pr, td), Jt = Qt ? Dg(Qt, pr) : null, kn = O && Jt ? f({
3674
+ }), Ti = Fe ? ln(Fe, R) : null, Si = ah(Ct), td = ra(Si), nd = ra(Si, [ce]), Xt = ln(pr, td), Jt = Qt ? Dg(Qt, pr) : null, kn = O && Jt ? f({
3674
3675
  active: O,
3675
3676
  collisionRect: Jt,
3676
3677
  droppableRects: oe,
3677
3678
  droppableContainers: Oe,
3678
- pointerCoordinates: Ci
3679
- }) : null, xi = Sg(kn, "id"), [Ct, ki] = De(null), rd = bi ? pr : ln(pr, nd), sd = Ag(rd, (o = Ct == null ? void 0 : Ct.rect) != null ? o : null, ce), Ts = ie(null), Ii = Ie(
3679
+ pointerCoordinates: Ti
3680
+ }) : null, xi = Sg(kn, "id"), [Tt, ki] = De(null), rd = bi ? pr : ln(pr, nd), sd = Ag(rd, (o = Tt == null ? void 0 : Tt.rect) != null ? o : null, ce), Cs = ie(null), Ii = Ie(
3680
3681
  (Se, _e) => {
3681
3682
  let {
3682
3683
  sensor: qe,
@@ -3684,7 +3685,7 @@ const bh = /* @__PURE__ */ dd(function(t) {
3684
3685
  } = _e;
3685
3686
  if (z.current == null)
3686
3687
  return;
3687
- const Ge = I.get(z.current);
3688
+ const Ge = N.get(z.current);
3688
3689
  if (!Ge)
3689
3690
  return;
3690
3691
  const We = Se.nativeEvent, ot = new qe({
@@ -3696,7 +3697,7 @@ const bh = /* @__PURE__ */ dd(function(t) {
3696
3697
  // otherwise they are frozen in time with the stale arguments
3697
3698
  context: ne,
3698
3699
  onAbort(be) {
3699
- if (!I.get(be))
3700
+ if (!N.get(be))
3700
3701
  return;
3701
3702
  const {
3702
3703
  onDragAbort: it
@@ -3709,7 +3710,7 @@ const bh = /* @__PURE__ */ dd(function(t) {
3709
3710
  });
3710
3711
  },
3711
3712
  onPending(be, xt, it, ft) {
3712
- if (!I.get(be))
3713
+ if (!N.get(be))
3713
3714
  return;
3714
3715
  const {
3715
3716
  onDragPending: Nn
@@ -3728,7 +3729,7 @@ const bh = /* @__PURE__ */ dd(function(t) {
3728
3729
  const xt = z.current;
3729
3730
  if (xt == null)
3730
3731
  return;
3731
- const it = I.get(xt);
3732
+ const it = N.get(xt);
3732
3733
  if (!it)
3733
3734
  return;
3734
3735
  const {
@@ -3742,18 +3743,18 @@ const bh = /* @__PURE__ */ dd(function(t) {
3742
3743
  }
3743
3744
  };
3744
3745
  yr(() => {
3745
- ft == null || ft(In), x(Et.Initializing), T({
3746
+ ft == null || ft(In), x(Et.Initializing), C({
3746
3747
  type: ve.DragStart,
3747
3748
  initialCoordinates: be,
3748
3749
  active: xt
3749
3750
  }), w({
3750
3751
  type: "onDragStart",
3751
3752
  event: In
3752
- }), Y(Ts.current), Ce(We);
3753
+ }), Y(Cs.current), Te(We);
3753
3754
  });
3754
3755
  },
3755
3756
  onMove(be) {
3756
- T({
3757
+ C({
3757
3758
  type: ve.DragMove,
3758
3759
  coordinates: be
3759
3760
  });
@@ -3761,7 +3762,7 @@ const bh = /* @__PURE__ */ dd(function(t) {
3761
3762
  onEnd: en(ve.DragEnd),
3762
3763
  onCancel: en(ve.DragCancel)
3763
3764
  });
3764
- Ts.current = ot;
3765
+ Cs.current = ot;
3765
3766
  function en(be) {
3766
3767
  return async function() {
3767
3768
  const {
@@ -3784,13 +3785,13 @@ const bh = /* @__PURE__ */ dd(function(t) {
3784
3785
  }, be === ve.DragEnd && typeof En == "function" && await Promise.resolve(En(kt)) && (be = ve.DragCancel);
3785
3786
  }
3786
3787
  z.current = null, yr(() => {
3787
- T({
3788
+ C({
3788
3789
  type: be
3789
- }), x(Et.Uninitialized), ki(null), Y(null), Ce(null), Ts.current = null;
3790
+ }), x(Et.Uninitialized), ki(null), Y(null), Te(null), Cs.current = null;
3790
3791
  const En = be === ve.DragEnd ? "onDragEnd" : "onDragCancel";
3791
3792
  if (kt) {
3792
- const Cs = F.current[En];
3793
- Cs == null || Cs(kt), w({
3793
+ const Ts = F.current[En];
3794
+ Ts == null || Ts(kt), w({
3794
3795
  type: En,
3795
3796
  event: kt
3796
3797
  });
@@ -3800,9 +3801,9 @@ const bh = /* @__PURE__ */ dd(function(t) {
3800
3801
  }
3801
3802
  },
3802
3803
  // eslint-disable-next-line react-hooks/exhaustive-deps
3803
- [I]
3804
+ [N]
3804
3805
  ), od = Ie((Se, _e) => (qe, St) => {
3805
- const Ge = qe.nativeEvent, We = I.get(St);
3806
+ const Ge = qe.nativeEvent, We = N.get(St);
3806
3807
  if (
3807
3808
  // Another sensor is already instantiating
3808
3809
  z.current !== null || // No active draggable
@@ -3816,10 +3817,10 @@ const bh = /* @__PURE__ */ dd(function(t) {
3816
3817
  Se(qe, _e.options, ot) === !0 && (Ge.dndKit = {
3817
3818
  capturedBy: _e.sensor
3818
3819
  }, z.current = St, Ii(qe, _e));
3819
- }, [I, Ii]), Ni = eh(d, od);
3820
+ }, [N, Ii]), Ni = eh(d, od);
3820
3821
  ch(d), vt(() => {
3821
- ce && A === Et.Initializing && x(Et.Initialized);
3822
- }, [ce, A]), fe(
3822
+ ce && I === Et.Initializing && x(Et.Initialized);
3823
+ }, [ce, I]), fe(
3823
3824
  () => {
3824
3825
  const {
3825
3826
  onDragMove: Se
@@ -3895,23 +3896,23 @@ const bh = /* @__PURE__ */ dd(function(t) {
3895
3896
  collisionRect: Jt,
3896
3897
  collisions: kn,
3897
3898
  droppableRects: oe,
3898
- draggableNodes: I,
3899
+ draggableNodes: N,
3899
3900
  draggingNode: hr,
3900
3901
  draggingNodeRect: Qt,
3901
3902
  droppableContainers: S,
3902
- over: Ct,
3903
- scrollableAncestors: Tt,
3903
+ over: Tt,
3904
+ scrollableAncestors: Ct,
3904
3905
  scrollAdjustedTranslate: Xt
3905
3906
  }, L.current = {
3906
3907
  initial: Qt,
3907
3908
  translated: Jt
3908
3909
  };
3909
- }, [O, he, kn, Jt, I, hr, Qt, oe, S, Ct, Tt, Xt]), Kg({
3910
+ }, [O, he, kn, Jt, N, hr, Qt, oe, S, Tt, Ct, Xt]), Kg({
3910
3911
  ...ut,
3911
3912
  delta: R,
3912
3913
  draggingRect: Jt,
3913
- pointerCoordinates: Ci,
3914
- scrollableAncestors: Tt,
3914
+ pointerCoordinates: Ti,
3915
+ scrollableAncestors: Ct,
3915
3916
  scrollableAncestorRects: mr
3916
3917
  });
3917
3918
  const id = de(() => ({
@@ -3922,17 +3923,17 @@ const bh = /* @__PURE__ */ dd(function(t) {
3922
3923
  collisions: kn,
3923
3924
  containerNodeRect: Q,
3924
3925
  dragOverlay: je,
3925
- draggableNodes: I,
3926
+ draggableNodes: N,
3926
3927
  droppableContainers: S,
3927
3928
  droppableRects: oe,
3928
- over: Ct,
3929
+ over: Tt,
3929
3930
  measureDroppableContainers: te,
3930
- scrollableAncestors: Tt,
3931
+ scrollableAncestors: Ct,
3931
3932
  scrollableAncestorRects: mr,
3932
3933
  measuringConfiguration: se,
3933
3934
  measuringScheduled: ge,
3934
3935
  windowRect: bs
3935
- }), [O, he, ce, B, kn, Q, je, I, S, oe, Ct, te, Tt, mr, se, ge, bs]), ad = de(() => ({
3936
+ }), [O, he, ce, B, kn, Q, je, N, S, oe, Tt, te, Ct, mr, se, ge, bs]), ad = de(() => ({
3936
3937
  activatorEvent: B,
3937
3938
  activators: Ni,
3938
3939
  active: O,
@@ -3940,13 +3941,13 @@ const bh = /* @__PURE__ */ dd(function(t) {
3940
3941
  ariaDescribedById: {
3941
3942
  draggable: J
3942
3943
  },
3943
- dispatch: T,
3944
- draggableNodes: I,
3945
- over: Ct,
3944
+ dispatch: C,
3945
+ draggableNodes: N,
3946
+ over: Tt,
3946
3947
  measureDroppableContainers: te
3947
- }), [B, Ni, O, ce, T, J, I, Ct, te]);
3948
+ }), [B, Ni, O, ce, C, J, N, Tt, te]);
3948
3949
  return y.createElement(Kc.Provider, {
3949
- value: C
3950
+ value: T
3950
3951
  }, y.createElement(rr.Provider, {
3951
3952
  value: ad
3952
3953
  }, y.createElement(fl.Provider, {
@@ -3968,7 +3969,7 @@ const bh = /* @__PURE__ */ dd(function(t) {
3968
3969
  enabled: qe
3969
3970
  };
3970
3971
  }
3971
- }), Th = /* @__PURE__ */ Jn(null), oa = "button", Ch = "Draggable";
3972
+ }), Ch = /* @__PURE__ */ Jn(null), oa = "button", Th = "Draggable";
3972
3973
  function Sh(e) {
3973
3974
  let {
3974
3975
  id: t,
@@ -3976,25 +3977,25 @@ function Sh(e) {
3976
3977
  disabled: r = !1,
3977
3978
  attributes: s
3978
3979
  } = e;
3979
- const o = ls(Ch), {
3980
+ const o = ls(Th), {
3980
3981
  activators: i,
3981
3982
  activatorEvent: a,
3982
3983
  active: c,
3983
3984
  activeNodeRect: l,
3984
3985
  ariaDescribedById: d,
3985
3986
  draggableNodes: f,
3986
- over: m
3987
+ over: h
3987
3988
  } = Vt(rr), {
3988
3989
  role: g = oa,
3989
3990
  roleDescription: v = "draggable",
3990
- tabIndex: h = 0
3991
- } = s ?? {}, b = (c == null ? void 0 : c.id) === t, T = Vt(b ? ds : Th), [w, C] = zr(), [A, x] = zr(), $ = lh(i, t), k = Zn(n);
3991
+ tabIndex: m = 0
3992
+ } = s ?? {}, b = (c == null ? void 0 : c.id) === t, C = Vt(b ? ds : Ch), [w, T] = zr(), [I, x] = zr(), $ = lh(i, t), k = Zn(n);
3992
3993
  vt(
3993
3994
  () => (f.set(t, {
3994
3995
  id: t,
3995
3996
  key: o,
3996
3997
  node: w,
3997
- activatorNode: A,
3998
+ activatorNode: I,
3998
3999
  data: k
3999
4000
  }), () => {
4000
4001
  const R = f.get(t);
@@ -4003,26 +4004,26 @@ function Sh(e) {
4003
4004
  // eslint-disable-next-line react-hooks/exhaustive-deps
4004
4005
  [f, t]
4005
4006
  );
4006
- const I = de(() => ({
4007
+ const N = de(() => ({
4007
4008
  role: g,
4008
- tabIndex: h,
4009
+ tabIndex: m,
4009
4010
  "aria-disabled": r,
4010
4011
  "aria-pressed": b && g === oa ? !0 : void 0,
4011
4012
  "aria-roledescription": v,
4012
4013
  "aria-describedby": d.draggable
4013
- }), [r, g, h, b, v, d.draggable]);
4014
+ }), [r, g, m, b, v, d.draggable]);
4014
4015
  return {
4015
4016
  active: c,
4016
4017
  activatorEvent: a,
4017
4018
  activeNodeRect: l,
4018
- attributes: I,
4019
+ attributes: N,
4019
4020
  isDragging: b,
4020
4021
  listeners: r ? void 0 : $,
4021
4022
  node: w,
4022
- over: m,
4023
- setNodeRef: C,
4023
+ over: h,
4024
+ setNodeRef: T,
4024
4025
  setActivatorNodeRef: x,
4025
- transform: T
4026
+ transform: C
4026
4027
  };
4027
4028
  }
4028
4029
  function xh() {
@@ -4045,34 +4046,34 @@ function Nh(e) {
4045
4046
  measureDroppableContainers: l
4046
4047
  } = Vt(rr), d = ie({
4047
4048
  disabled: n
4048
- }), f = ie(!1), m = ie(null), g = ie(null), {
4049
+ }), f = ie(!1), h = ie(null), g = ie(null), {
4049
4050
  disabled: v,
4050
- updateMeasurementsFor: h,
4051
+ updateMeasurementsFor: m,
4051
4052
  timeout: b
4052
4053
  } = {
4053
4054
  ...Ih,
4054
4055
  ...s
4055
- }, T = Zn(h ?? r), w = Ie(
4056
+ }, C = Zn(m ?? r), w = Ie(
4056
4057
  () => {
4057
4058
  if (!f.current) {
4058
4059
  f.current = !0;
4059
4060
  return;
4060
4061
  }
4061
4062
  g.current != null && clearTimeout(g.current), g.current = setTimeout(() => {
4062
- l(Array.isArray(T.current) ? T.current : [T.current]), g.current = null;
4063
+ l(Array.isArray(C.current) ? C.current : [C.current]), g.current = null;
4063
4064
  }, b);
4064
4065
  },
4065
4066
  //eslint-disable-next-line react-hooks/exhaustive-deps
4066
4067
  [b]
4067
- ), C = us({
4068
+ ), T = us({
4068
4069
  callback: w,
4069
4070
  disabled: v || !i
4070
- }), A = Ie((I, R) => {
4071
- C && (R && (C.unobserve(R), f.current = !1), I && C.observe(I));
4072
- }, [C]), [x, $] = zr(A), k = Zn(t);
4071
+ }), I = Ie((N, R) => {
4072
+ T && (R && (T.unobserve(R), f.current = !1), N && T.observe(N));
4073
+ }, [T]), [x, $] = zr(I), k = Zn(t);
4073
4074
  return fe(() => {
4074
- !C || !x.current || (C.disconnect(), f.current = !1, C.observe(x.current));
4075
- }, [x, C]), fe(
4075
+ !T || !x.current || (T.disconnect(), f.current = !1, T.observe(x.current));
4076
+ }, [x, T]), fe(
4076
4077
  () => (a({
4077
4078
  type: ve.RegisterDroppable,
4078
4079
  element: {
@@ -4080,7 +4081,7 @@ function Nh(e) {
4080
4081
  key: o,
4081
4082
  disabled: n,
4082
4083
  node: x,
4083
- rect: m,
4084
+ rect: h,
4084
4085
  data: k
4085
4086
  }
4086
4087
  }), () => a({
@@ -4099,7 +4100,7 @@ function Nh(e) {
4099
4100
  }), d.current.disabled = n);
4100
4101
  }, [r, o, n, a]), {
4101
4102
  active: i,
4102
- rect: m,
4103
+ rect: h,
4103
4104
  isOver: (c == null ? void 0 : c.id) === r,
4104
4105
  node: x,
4105
4106
  over: c,
@@ -4164,7 +4165,7 @@ const Dh = {
4164
4165
  ...l,
4165
4166
  scaleX: 1,
4166
4167
  scaleY: 1
4167
- }, m = {
4168
+ }, h = {
4168
4169
  ...Dh,
4169
4170
  width: a.width,
4170
4171
  height: a.height,
@@ -4177,7 +4178,7 @@ const Dh = {
4177
4178
  };
4178
4179
  return y.createElement(n, {
4179
4180
  className: i,
4180
- style: m,
4181
+ style: h,
4181
4182
  ref: t
4182
4183
  }, o);
4183
4184
  }), Rh = (e) => (t) => {
@@ -4248,8 +4249,8 @@ function Fh(e) {
4248
4249
  } = Ae(i).getComputedStyle(i), f = el(d);
4249
4250
  if (!f)
4250
4251
  return;
4251
- const m = typeof t == "function" ? t : _h(t);
4252
- return al(c, s.draggable.measure), m({
4252
+ const h = typeof t == "function" ? t : _h(t);
4253
+ return al(c, s.draggable.measure), h({
4253
4254
  active: {
4254
4255
  id: o,
4255
4256
  data: a.data,
@@ -4292,7 +4293,7 @@ function _h(e) {
4292
4293
  }, f = {
4293
4294
  scaleX: c.scaleX !== 1 ? i.rect.width * c.scaleX / a.rect.width : 1,
4294
4295
  scaleY: c.scaleY !== 1 ? i.rect.height * c.scaleY / a.rect.height : 1
4295
- }, m = {
4296
+ }, h = {
4296
4297
  x: c.x - d.x,
4297
4298
  y: c.y - d.y,
4298
4299
  ...f
@@ -4302,22 +4303,22 @@ function _h(e) {
4302
4303
  dragOverlay: a,
4303
4304
  transform: {
4304
4305
  initial: c,
4305
- final: m
4306
+ final: h
4306
4307
  }
4307
- }), [v] = g, h = g[g.length - 1];
4308
- if (JSON.stringify(v) === JSON.stringify(h))
4308
+ }), [v] = g, m = g[g.length - 1];
4309
+ if (JSON.stringify(v) === JSON.stringify(m))
4309
4310
  return;
4310
4311
  const b = r == null ? void 0 : r({
4311
4312
  active: i,
4312
4313
  dragOverlay: a,
4313
4314
  ...l
4314
- }), T = a.node.animate(g, {
4315
+ }), C = a.node.animate(g, {
4315
4316
  duration: t,
4316
4317
  easing: n,
4317
4318
  fill: "forwards"
4318
4319
  });
4319
4320
  return new Promise((w) => {
4320
- T.onfinish = () => {
4321
+ C.onfinish = () => {
4321
4322
  b == null || b(), w();
4322
4323
  };
4323
4324
  });
@@ -4345,40 +4346,40 @@ const Wh = /* @__PURE__ */ y.memo((e) => {
4345
4346
  const {
4346
4347
  activatorEvent: d,
4347
4348
  active: f,
4348
- activeNodeRect: m,
4349
+ activeNodeRect: h,
4349
4350
  containerNodeRect: g,
4350
4351
  draggableNodes: v,
4351
- droppableContainers: h,
4352
+ droppableContainers: m,
4352
4353
  dragOverlay: b,
4353
- over: T,
4354
+ over: C,
4354
4355
  measuringConfiguration: w,
4355
- scrollableAncestors: C,
4356
- scrollableAncestorRects: A,
4356
+ scrollableAncestors: T,
4357
+ scrollableAncestorRects: I,
4357
4358
  windowRect: x
4358
- } = xh(), $ = Vt(ds), k = qh(f == null ? void 0 : f.id), I = gl(i, {
4359
+ } = xh(), $ = Vt(ds), k = qh(f == null ? void 0 : f.id), N = gl(i, {
4359
4360
  activatorEvent: d,
4360
4361
  active: f,
4361
- activeNodeRect: m,
4362
+ activeNodeRect: h,
4362
4363
  containerNodeRect: g,
4363
4364
  draggingNodeRect: b.rect,
4364
- over: T,
4365
+ over: C,
4365
4366
  overlayNodeRect: b.rect,
4366
- scrollableAncestors: C,
4367
- scrollableAncestorRects: A,
4367
+ scrollableAncestors: T,
4368
+ scrollableAncestorRects: I,
4368
4369
  transform: $,
4369
4370
  windowRect: x
4370
- }), R = Jo(m), S = Fh({
4371
+ }), R = Jo(h), S = Fh({
4371
4372
  config: r,
4372
4373
  draggableNodes: v,
4373
- droppableContainers: h,
4374
+ droppableContainers: m,
4374
4375
  measuringConfiguration: w
4375
- }), N = R ? b.setRef : void 0;
4376
+ }), E = R ? b.setRef : void 0;
4376
4377
  return y.createElement(Oh, null, y.createElement(Eh, {
4377
4378
  animation: S
4378
4379
  }, f && k ? y.createElement(Mh, {
4379
4380
  key: k,
4380
4381
  id: f.id,
4381
- ref: N,
4382
+ ref: E,
4382
4383
  as: a,
4383
4384
  activatorEvent: d,
4384
4385
  adjustScale: t,
@@ -4389,7 +4390,7 @@ const Wh = /* @__PURE__ */ y.memo((e) => {
4389
4390
  zIndex: l,
4390
4391
  ...s
4391
4392
  },
4392
- transform: I
4393
+ transform: N
4393
4394
  }, n) : null));
4394
4395
  }), Zr = ({
4395
4396
  count: e,
@@ -4423,7 +4424,7 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4423
4424
  "create"
4424
4425
  /* Create */
4425
4426
  ) || n)
4426
- ).map(({ label: r, onClick: s }) => /* @__PURE__ */ u(gn.Item, { onClick: s, children: r }, r)), Qn = "institutional-tagging-app-container", vo = "new", sr = `@container ${Qn} (max-width: ${p.breakpoints.small})`, ml = E.div`
4427
+ ).map(({ label: r, onClick: s }) => /* @__PURE__ */ u(gn.Item, { onClick: s, children: r }, r)), Qn = "institutional-tagging-app-container", vo = "new", sr = `@container ${Qn} (max-width: ${p.breakpoints.small})`, ml = A.div`
4427
4428
  width: 100%;
4428
4429
  display: flex;
4429
4430
  flex-direction: column;
@@ -4433,7 +4434,7 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4433
4434
  flex: 1;
4434
4435
  flex-direction: column;
4435
4436
  }
4436
- `, Bh = E.div`
4437
+ `, Bh = A.div`
4437
4438
  padding: ${p.spacing.small};
4438
4439
  border: ${p.borders.widthSmall} solid ${p.colors.contrasts.grey1214};
4439
4440
  border-radius: ${p.borders.radiusLarge};
@@ -4457,7 +4458,7 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4457
4458
  column-gap: ${p.spacing.small};
4458
4459
  row-gap: ${p.spacing.xxSmall};
4459
4460
  }
4460
- `, jh = E.div`
4461
+ `, jh = A.div`
4461
4462
  display: flex;
4462
4463
  flex-direction: column;
4463
4464
  overflow: hidden;
@@ -4468,19 +4469,19 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4468
4469
  text-align: start;
4469
4470
 
4470
4471
  ${sr} { grid-area: text; }
4471
- `, Gh = E.div`
4472
+ `, Gh = A.div`
4472
4473
  font-weight: ${p.typography.fontWeightBold};
4473
- `, Hh = E.div`
4474
+ `, Hh = A.div`
4474
4475
  flex: none;
4475
4476
  order: -1;
4476
4477
  cursor: ${({ $isDraggable: e, $isDragging: t }) => e ? t ? "grabbing" : "grab" : "default"};
4477
4478
 
4478
4479
  ${sr} { grid-area: drag; align-self: center; }
4479
- `, Zh = E.div`
4480
+ `, Zh = A.div`
4480
4481
  flex: 1;
4481
4482
 
4482
4483
  ${sr} { grid-area: pill; align-self: start; }
4483
- `, Yh = E.div`
4484
+ `, Yh = A.div`
4484
4485
  flex: none;
4485
4486
 
4486
4487
  ${sr} { grid-area: menu; align-self:
@@ -4556,11 +4557,11 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4556
4557
  moreButtonRef: i,
4557
4558
  dragHandleRef: a
4558
4559
  }) => {
4559
- const { translations: c, resolveToken: l } = W(), { canCreate: d, canEdit: f } = Yt(), { archiveEnabled: m } = Rt(), g = e.associationsCount === 0, { setActivatorNodeRef: v, setNodeRef: h, listeners: b, attributes: T, isDragging: w } = Sh({
4560
+ const { translations: c, resolveToken: l } = W(), { canCreate: d, canEdit: f } = Yt(), { archiveEnabled: h } = Rt(), g = e.associationsCount === 0, { setActivatorNodeRef: v, setNodeRef: m, listeners: b, attributes: C, isDragging: w } = Sh({
4560
4561
  id: e._id,
4561
4562
  data: { tag: e }
4562
- }), C = () => {
4563
- const A = [
4563
+ }), T = () => {
4564
+ const I = [
4564
4565
  {
4565
4566
  label: c.viewTagDetails,
4566
4567
  requiredPermissions: [],
@@ -4581,7 +4582,7 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4581
4582
  requiredPermissions: [$t.Edit],
4582
4583
  onClick: () => o()
4583
4584
  },
4584
- ...m ? [
4585
+ ...h ? [
4585
4586
  {
4586
4587
  label: c.archive,
4587
4588
  requiredPermissions: [$t.Edit],
@@ -4589,9 +4590,9 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4589
4590
  }
4590
4591
  ] : []
4591
4592
  ];
4592
- return yo(A, { canEdit: f, canCreate: d });
4593
+ return yo(I, { canEdit: f, canCreate: d });
4593
4594
  };
4594
- return /* @__PURE__ */ u(ml, { ref: h, children: /* @__PURE__ */ u(
4595
+ return /* @__PURE__ */ u(ml, { ref: m, children: /* @__PURE__ */ u(
4595
4596
  md,
4596
4597
  {
4597
4598
  variant: "inverse",
@@ -4602,7 +4603,7 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4602
4603
  {
4603
4604
  tag: e,
4604
4605
  isArchived: !1,
4605
- dragHandleProps: { setActivatorNodeRef: v, listeners: b, attributes: T, isDragging: w },
4606
+ dragHandleProps: { setActivatorNodeRef: v, listeners: b, attributes: C, isDragging: w },
4606
4607
  dragHandleRef: a,
4607
4608
  pill: /* @__PURE__ */ u(pl, { tag: e }),
4608
4609
  actions: /* @__PURE__ */ u(
@@ -4611,7 +4612,7 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4611
4612
  trigger: /* @__PURE__ */ u(
4612
4613
  Kh,
4613
4614
  {
4614
- elementRef: (A) => i == null ? void 0 : i(A),
4615
+ elementRef: (I) => i == null ? void 0 : i(I),
4615
4616
  screenReaderLabel: l({
4616
4617
  key: "tagActions",
4617
4618
  vars: { tagName: e.name }
@@ -4619,7 +4620,7 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4619
4620
  }
4620
4621
  ),
4621
4622
  withArrow: !0,
4622
- children: C()
4623
+ children: T()
4623
4624
  }
4624
4625
  )
4625
4626
  }
@@ -4651,20 +4652,20 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4651
4652
  }, Jh = ({ tag: e, ...t }) => e.workflowState === Me.Deleted ? /* @__PURE__ */ u(Xh, { tag: e, ...t }) : /* @__PURE__ */ u(Qh, { tag: e, ...t }), em = ({ tag: e }) => /* @__PURE__ */ u(ei, { tag: e, isArchived: !1, pill: /* @__PURE__ */ u(pl, { tag: e }), actions: null }), tm = (e, t) => {
4652
4653
  const n = parseInt(e.slice(1, 3), 16), r = parseInt(e.slice(3, 5), 16), s = parseInt(e.slice(5, 7), 16);
4653
4654
  return `rgb(${n} ${r} ${s} / ${t * 100}%)`;
4654
- }, nm = E.div`
4655
+ }, nm = A.div`
4655
4656
  cursor: grabbing;
4656
4657
  opacity: 0.92;
4657
4658
  pointer-events: none;
4658
4659
  max-width: 260px; /* caps the overlay at ~3 tag columns wide — no theme token at this scale */
4659
4660
  min-width: 0;
4660
- `, yl = E.ul`
4661
+ `, yl = A.ul`
4661
4662
  list-style: none;
4662
4663
  margin: 0;
4663
4664
  padding: 0;
4664
4665
  display: flex;
4665
4666
  flex-direction: column;
4666
4667
  gap: ${p.spacing.mediumSmall};
4667
- `, rm = E.li`
4668
+ `, rm = A.li`
4668
4669
  list-style: none;
4669
4670
  margin: 0;
4670
4671
  padding: 0;
@@ -4678,7 +4679,7 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4678
4679
  width: 100%;
4679
4680
  overflow: hidden;
4680
4681
  transition: border-color 0.15s ease;
4681
- `, sm = E.div`
4682
+ `, sm = A.div`
4682
4683
  position: absolute;
4683
4684
  inset: 0;
4684
4685
  background: ${tm(p.colors.contrasts.blue4570, 0.12)};
@@ -4688,14 +4689,14 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4688
4689
  justify-content: center;
4689
4690
  pointer-events: none;
4690
4691
  z-index: ${p.stacking.topmost};
4691
- `, om = E.span`
4692
+ `, om = A.span`
4692
4693
  background: ${p.colors.contrasts.blue4570};
4693
4694
  color: ${p.colors.contrasts.white1010};
4694
4695
  padding: ${p.spacing.xSmall} ${p.spacing.small};
4695
4696
  border-radius: ${p.borders.radiusMedium};
4696
4697
  font-size: ${p.typography.fontSizeMedium};
4697
4698
  font-weight: ${p.typography.fontWeightBold};
4698
- `, im = E.div`
4699
+ `, im = A.div`
4699
4700
  background: ${p.colors.contrasts.grey100100};
4700
4701
  color: ${p.colors.contrasts.white1010};
4701
4702
  border-radius: ${p.borders.radiusLarge} ${p.borders.radiusLarge} 0 0;
@@ -4705,22 +4706,22 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4705
4706
  display: flex;
4706
4707
  flex-direction: row;
4707
4708
  align-items: flex-start;
4708
- `, am = E.div`
4709
+ `, am = A.div`
4709
4710
  order: -1;
4710
4711
  flex-shrink: 0;
4711
- `, cm = E.div`
4712
+ `, cm = A.div`
4712
4713
  gap: ${({ $isExpanded: e }) => e ? p.spacing.small : "0"};
4713
4714
  display: flex;
4714
4715
  flex-direction: column;
4715
4716
  flex: 1;
4716
4717
  min-width: 0;
4717
- `, aa = E.div`
4718
+ `, aa = A.div`
4718
4719
  display: flex;
4719
4720
  flex-direction: ${({ $isMobile: e }) => e ? "column" : "row"};
4720
4721
  justify-content: space-between;
4721
4722
  align-items: ${({ $isMobile: e }) => e ? "flex-start" : "center"};
4722
4723
  gap: ${({ $isMobile: e }) => e ? p.spacing.xSmall : "0"};
4723
- `, lm = E.div`
4724
+ `, lm = A.div`
4724
4725
  display: flex;
4725
4726
  flex-direction: row;
4726
4727
  overflow: hidden;
@@ -4729,51 +4730,51 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4729
4730
  align-items: center;
4730
4731
  flex: 1;
4731
4732
  min-width: 0;
4732
- `, ca = E.div`
4733
+ `, ca = A.div`
4733
4734
  white-space: nowrap;
4734
4735
  flex-shrink: 0;
4735
4736
  font-size: ${p.typography.fontSizeMedium};
4736
4737
  font-weight: ${p.typography.fontWeightBold};
4737
- `, um = E.div`
4738
+ `, um = A.div`
4738
4739
  width: 100%;
4739
4740
  overflow: hidden;
4740
4741
  overflow-wrap: break-word;
4741
4742
  word-break: break-word;
4742
- `, dm = E.div`
4743
+ `, dm = A.div`
4743
4744
  display: flex;
4744
4745
  flex-direction: row;
4745
4746
  gap: ${p.spacing.small};
4746
- `, fm = E.div`
4747
+ `, fm = A.div`
4747
4748
  display: flex;
4748
4749
  flex-direction: row;
4749
4750
  justify-content: space-between;
4750
4751
  align-items: center;
4751
- `, gm = E.div`
4752
+ `, gm = A.div`
4752
4753
  display: flex;
4753
4754
  flex-direction: row;
4754
4755
  flex-wrap: wrap;
4755
4756
  gap: ${p.spacing.small};
4756
4757
  align-items: center;
4757
4758
  ${({ $withInlineSpacing: e }) => e && `margin: 0 ${p.spacing.medium};`}
4758
- `, hm = E.div`
4759
+ `, hm = A.div`
4759
4760
  padding: ${p.spacing.medium} ${p.spacing.small};
4760
- `, mm = E.div`
4761
+ `, mm = A.div`
4761
4762
  display: flex;
4762
4763
  flex-direction: column;
4763
4764
  gap: ${p.spacing.medium};
4764
4765
  width: 100%;
4765
- `, pm = E.ul`
4766
+ `, pm = A.ul`
4766
4767
  list-style: none;
4767
4768
  margin: 0;
4768
4769
  padding: 0;
4769
4770
  display: grid;
4770
4771
  grid-template-columns: repeat(${({ $columns: e }) => e}, minmax(0, 1fr));
4771
4772
  gap: ${p.spacing.medium};
4772
- `, On = E.li`
4773
+ `, On = A.li`
4773
4774
  list-style: none;
4774
4775
  margin: 0;
4775
4776
  padding: 0;
4776
- `, ym = E.div`
4777
+ `, ym = A.div`
4777
4778
  border: ${p.borders.widthSmall} dashed ${p.colors.contrasts.grey3045};
4778
4779
  border-radius: ${p.borders.radiusLarge};
4779
4780
  padding: ${p.spacing.medium} ${p.spacing.mediumSmall};
@@ -4787,16 +4788,15 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4787
4788
  },
4788
4789
  registerCategoryExpandTrigger: () => () => {
4789
4790
  },
4790
- requestCategoryExpand: () => {
4791
- }
4791
+ requestCategoryExpand: () => !1
4792
4792
  }), ti = () => y.useContext(vl), wm = ({
4793
4793
  children: e,
4794
4794
  pendingFocusRef: t
4795
4795
  }) => {
4796
4796
  const n = y.useCallback(
4797
4797
  (l, d, f) => {
4798
- const m = t.current;
4799
- f && m && m.tagId === l && m.target === d && (f.focus(), t.current = null);
4798
+ const h = t.current;
4799
+ f && h && h.tagId === l && h.target === d && (f.focus(), t.current = null);
4800
4800
  },
4801
4801
  [t]
4802
4802
  ), r = y.useCallback(
@@ -4815,10 +4815,13 @@ const yo = (e, { canEdit: t, canCreate: n }) => e.filter(
4815
4815
  i.current.delete(l);
4816
4816
  }),
4817
4817
  []
4818
- ), c = y.useCallback((l) => {
4819
- var d;
4820
- (d = i.current.get(l)) == null || d();
4821
- }, []);
4818
+ ), c = y.useCallback(
4819
+ (l) => {
4820
+ var d;
4821
+ return ((d = i.current.get(l)) == null ? void 0 : d()) ?? !1;
4822
+ },
4823
+ []
4824
+ );
4822
4825
  return /* @__PURE__ */ u(
4823
4826
  vl.Provider,
4824
4827
  {
@@ -4845,7 +4848,7 @@ function or(e) {
4845
4848
  return r.includes("taken") || r.includes("already exists") || r.includes("unique");
4846
4849
  })) ?? !1;
4847
4850
  }
4848
- const wl = Te`
4851
+ const wl = Ce`
4849
4852
  mutation CreateInstitutionalTagCategory($input: CreateInstitutionalTagCategoryInput!) {
4850
4853
  createInstitutionalTagCategory(input: $input) {
4851
4854
  institutionalTagCategory {
@@ -4862,7 +4865,7 @@ const wl = Te`
4862
4865
  }
4863
4866
  }
4864
4867
  }
4865
- `, bm = Te`
4868
+ `, bm = Ce`
4866
4869
  mutation UpdateInstitutionalTagCategory($input: UpdateInstitutionalTagCategoryInput!) {
4867
4870
  updateInstitutionalTagCategory(input: $input) {
4868
4871
  institutionalTagCategory {
@@ -4879,7 +4882,7 @@ const wl = Te`
4879
4882
  }
4880
4883
  }
4881
4884
  }
4882
- `, bl = Te`
4885
+ `, bl = Ce`
4883
4886
  mutation ArchiveInstitutionalTagCategory($input: UpdateInstitutionalTagCategoryArchivedStateInput!) {
4884
4887
  updateInstitutionalTagCategoryArchivedState(input: $input) {
4885
4888
  institutionalTagCategory {
@@ -4892,7 +4895,7 @@ const wl = Te`
4892
4895
  }
4893
4896
  }
4894
4897
  }
4895
- `, Tm = Te`
4898
+ `, Cm = Ce`
4896
4899
  mutation CreateInstitutionalTag($input: CreateInstitutionalTagInput!) {
4897
4900
  createInstitutionalTag(input: $input) {
4898
4901
  institutionalTag {
@@ -4914,7 +4917,7 @@ const wl = Te`
4914
4917
  }
4915
4918
  }
4916
4919
  }
4917
- `, ni = Te`
4920
+ `, ni = Ce`
4918
4921
  mutation UpdateInstitutionalTag($input: UpdateInstitutionalTagInput!) {
4919
4922
  updateInstitutionalTag(input: $input) {
4920
4923
  institutionalTag {
@@ -4936,7 +4939,7 @@ const wl = Te`
4936
4939
  }
4937
4940
  }
4938
4941
  }
4939
- `, Tl = Te`
4942
+ `, Cl = Ce`
4940
4943
  mutation ArchiveInstitutionalTag($input: UpdateInstitutionalTagArchivedStateInput!) {
4941
4944
  updateInstitutionalTagArchivedState(input: $input) {
4942
4945
  institutionalTag {
@@ -4949,7 +4952,7 @@ const wl = Te`
4949
4952
  }
4950
4953
  }
4951
4954
  }
4952
- `, Cl = Te`
4955
+ `, Tl = Ce`
4953
4956
  mutation ApplyInstitutionalTag($input: ApplyInstitutionalTagInput!) {
4954
4957
  applyInstitutionalTag(input: $input) {
4955
4958
  institutionalTagAssociation {
@@ -4969,7 +4972,7 @@ const wl = Te`
4969
4972
  }
4970
4973
  }
4971
4974
  }
4972
- `, Sl = Te`
4975
+ `, Sl = Ce`
4973
4976
  mutation RemoveInstitutionalTag($input: RemoveInstitutionalTagInput!) {
4974
4977
  removeInstitutionalTag(input: $input) {
4975
4978
  institutionalTagAssociation {
@@ -4987,44 +4990,44 @@ function ae() {
4987
4990
  return { accountId: e[0].id, executeQuery: t };
4988
4991
  }
4989
4992
  const xl = () => {
4990
- const e = Ve(), { showAlert: t } = Pe(), { resolveToken: n } = W(), { executeQuery: r } = ae(), s = y.useRef(void 0), o = y.useRef(void 0), i = y.useRef(""), a = async (m, g) => {
4991
- e.removeQueries({ queryKey: ["tags", m] }), e.removeQueries({ queryKey: ["tags", g] }), await Promise.all([
4993
+ const e = Ve(), { showAlert: t } = Pe(), { resolveToken: n } = W(), { executeQuery: r } = ae(), s = y.useRef(void 0), o = y.useRef(void 0), i = y.useRef(""), a = async (h, g) => {
4994
+ e.removeQueries({ queryKey: ["tags", h] }), e.removeQueries({ queryKey: ["tags", g] }), await Promise.all([
4992
4995
  e.invalidateQueries({ queryKey: ["categories"] }),
4993
4996
  e.invalidateQueries({ queryKey: ["allTagNames"] })
4994
4997
  ]);
4995
- }, c = (m) => {
4996
- m && or(m) ? t({ message: n("tagMoveConflict"), variant: "error" }) : t({ message: n("tagMoveFailed"), variant: "error" });
4998
+ }, c = (h) => {
4999
+ h && or(h) ? t({ message: n("tagMoveConflict"), variant: "error" }) : t({ message: n("tagMoveFailed"), variant: "error" });
4997
5000
  }, { mutate: l } = Be({
4998
- mutationFn: ({ tag: m, categoryId: g }) => r(
5001
+ mutationFn: ({ tag: h, categoryId: g }) => r(
4999
5002
  ni,
5000
- { input: { id: m._id, name: m.name, description: m.description, categoryId: g } }
5003
+ { input: { id: h._id, name: h.name, description: h.description, categoryId: g } }
5001
5004
  ),
5002
- onSuccess: async (m, { sourceCategoryId: g, categoryId: v, categoryName: h, onSettled: b }) => {
5003
- if (Re(m.updateInstitutionalTag)) {
5004
- await a(g, v), c(m.updateInstitutionalTag), b == null || b();
5005
+ onSuccess: async (h, { sourceCategoryId: g, categoryId: v, categoryName: m, onSettled: b }) => {
5006
+ if (Re(h.updateInstitutionalTag)) {
5007
+ await a(g, v), c(h.updateInstitutionalTag), b == null || b();
5005
5008
  return;
5006
5009
  }
5007
5010
  await a(g, v), t({
5008
- message: n({ key: "tagMoved", vars: { categoryName: h } }),
5011
+ message: n({ key: "tagMoved", vars: { categoryName: m } }),
5009
5012
  variant: "success"
5010
5013
  }), b == null || b();
5011
5014
  },
5012
- onError: async (m, { sourceCategoryId: g, categoryId: v, onSettled: h }) => {
5013
- await a(g, v), c(), h == null || h();
5015
+ onError: async (h, { sourceCategoryId: g, categoryId: v, onSettled: m }) => {
5016
+ await a(g, v), c(), m == null || m();
5014
5017
  }
5015
5018
  });
5016
5019
  return {
5017
- handleMoveTag: (m) => {
5020
+ handleMoveTag: (h) => {
5018
5021
  const g = o.current;
5019
5022
  g !== void 0 && l({
5020
- tag: m,
5021
- sourceCategoryId: m.category._id,
5023
+ tag: h,
5024
+ sourceCategoryId: h.category._id,
5022
5025
  categoryId: g,
5023
5026
  categoryName: i.current
5024
5027
  });
5025
5028
  },
5026
- moveTagDirect: (m, g, v, h) => {
5027
- l({ tag: m, sourceCategoryId: m.category._id, categoryId: g, categoryName: v, onSettled: h });
5029
+ moveTagDirect: (h, g, v, m) => {
5030
+ l({ tag: h, sourceCategoryId: h.category._id, categoryId: g, categoryName: v, onSettled: m });
5028
5031
  },
5029
5032
  validateRef: s,
5030
5033
  selectedCategoryRef: o,
@@ -5033,71 +5036,74 @@ const xl = () => {
5033
5036
  }, nn = (e) => {
5034
5037
  var t;
5035
5038
  return (t = e.data.current) == null ? void 0 : t.tag;
5036
- }, Cm = () => {
5037
- const [e, t] = y.useState(null), [n, r] = y.useState(null), [s, o] = y.useState(null), { moveTagDirect: i } = xl(), { setPendingFocus: a, requestCategoryExpand: c } = ti(), { resolveToken: l } = W(), d = (h) => {
5038
- const b = nn(h.active);
5039
- b && (t(b), r(b.category._id));
5040
- }, f = (h) => {
5041
- var x, $;
5042
- const { active: b, over: T } = h;
5043
- if (t(null), r(null), !T) return;
5044
- const w = nn(b);
5045
- if (!w) return;
5046
- const C = String(T.id);
5047
- if (C === w.category._id) return;
5048
- const A = ((x = T.data.current) == null ? void 0 : x.categoryName) ?? "";
5049
- (($ = h.activatorEvent) == null ? void 0 : $.type) === "keydown" && (a(w._id, "dragHandle"), c(C)), o({ tagId: w._id, sourceCategoryId: w.category._id, targetCategoryId: C }), i(w, C, A, () => o(null));
5050
- }, m = () => {
5039
+ }, Tm = () => {
5040
+ const [e, t] = y.useState(null), [n, r] = y.useState(null), [s, o] = y.useState(null), { moveTagDirect: i } = xl(), { setPendingFocus: a, requestCategoryExpand: c } = ti(), { resolveToken: l } = W(), d = (b) => {
5041
+ const C = nn(b.active);
5042
+ C && (t(C), r(C.category._id));
5043
+ }, f = y.useRef(!1), h = (b) => {
5044
+ var $, k;
5045
+ const { active: C, over: w } = b;
5046
+ if (t(null), r(null), f.current = !1, !w) return;
5047
+ const T = nn(C);
5048
+ if (!T) return;
5049
+ const I = String(w.id);
5050
+ if (I === T.category._id) return;
5051
+ const x = (($ = w.data.current) == null ? void 0 : $.categoryName) ?? "";
5052
+ ((k = b.activatorEvent) == null ? void 0 : k.type) === "keydown" && (a(T._id, "dragHandle"), f.current = c(I)), o({ tagId: T._id, sourceCategoryId: T.category._id, targetCategoryId: I }), i(T, I, x, () => o(null));
5053
+ }, g = () => {
5051
5054
  t(null), r(null);
5052
- }, g = y.useMemo(
5055
+ }, v = y.useMemo(
5053
5056
  () => ({
5054
- onDragStart: ({ active: h }) => {
5055
- const b = nn(h);
5056
- if (b)
5057
+ onDragStart: ({ active: b }) => {
5058
+ const C = nn(b);
5059
+ if (C)
5057
5060
  return l({
5058
5061
  key: "dragPickedUp",
5059
- vars: { tagName: b.name, categoryName: b.category.name }
5062
+ vars: { tagName: C.name, categoryName: C.category.name }
5060
5063
  });
5061
5064
  },
5062
- onDragOver: ({ active: h, over: b }) => {
5063
- var C;
5064
- const T = nn(h);
5065
- if (!T || !b) return;
5066
- const w = ((C = b.data.current) == null ? void 0 : C.categoryName) ?? "";
5067
- return l({ key: "dragOverCategory", vars: { tagName: T.name, categoryName: w } });
5065
+ onDragOver: ({ active: b, over: C }) => {
5066
+ var I;
5067
+ const w = nn(b);
5068
+ if (!w || !C) return;
5069
+ const T = ((I = C.data.current) == null ? void 0 : I.categoryName) ?? "";
5070
+ return l({ key: "dragOverCategory", vars: { tagName: w.name, categoryName: T } });
5068
5071
  },
5069
- onDragEnd: ({ active: h, over: b }) => {
5070
- var C;
5071
- const T = nn(h);
5072
- if (!T) return;
5073
- if (!b)
5072
+ onDragEnd: ({ active: b, over: C }) => {
5073
+ var I;
5074
+ const w = nn(b);
5075
+ if (!w) return;
5076
+ if (!C)
5074
5077
  return l({
5075
5078
  key: "dragCancelled",
5076
- vars: { tagName: T.name, categoryName: T.category.name }
5079
+ vars: { tagName: w.name, categoryName: w.category.name }
5077
5080
  });
5078
- const w = ((C = b.data.current) == null ? void 0 : C.categoryName) ?? "";
5079
- return String(b.id) !== T.category._id ? l({ key: "dragDropped", vars: { tagName: T.name, categoryName: w } }) : l({ key: "dragDroppedSameCategory", vars: { tagName: T.name } });
5081
+ const T = ((I = C.data.current) == null ? void 0 : I.categoryName) ?? "";
5082
+ return String(C.id) !== w.category._id ? l({
5083
+ key: f.current ? "dragDroppedCategoryExpanded" : "dragDropped",
5084
+ vars: { tagName: w.name, categoryName: T }
5085
+ }) : l({ key: "dragDroppedSameCategory", vars: { tagName: w.name } });
5080
5086
  },
5081
- onDragCancel: ({ active: h }) => {
5082
- const b = nn(h);
5083
- if (b)
5087
+ onDragCancel: ({ active: b }) => {
5088
+ const C = nn(b);
5089
+ if (C)
5084
5090
  return l({
5085
5091
  key: "dragCancelled",
5086
- vars: { tagName: b.name, categoryName: b.category.name }
5092
+ vars: { tagName: C.name, categoryName: C.category.name }
5087
5093
  });
5088
5094
  }
5089
5095
  }),
5090
5096
  [l]
5091
- ), v = l("dragInstructions");
5097
+ ), m = l("dragInstructions");
5092
5098
  return {
5093
5099
  activeTag: e,
5094
5100
  activeTagCategoryId: n,
5095
5101
  pendingMove: s,
5096
5102
  handleDragStart: d,
5097
- handleDragEnd: f,
5098
- handleDragCancel: m,
5099
- announcements: g,
5100
- screenReaderInstructions: v
5103
+ handleDragEnd: h,
5104
+ handleDragCancel: g,
5105
+ announcements: v,
5106
+ screenReaderInstructions: m
5101
5107
  };
5102
5108
  }, kl = y.createContext({
5103
5109
  activeTagCategoryId: null,
@@ -5111,27 +5117,27 @@ const xl = () => {
5111
5117
  e.preventDefault();
5112
5118
  const l = [...s.keys()].filter((R) => r.has(R));
5113
5119
  l.sort((R, S) => {
5114
- var N, L;
5115
- return (((N = r.get(R)) == null ? void 0 : N.top) ?? 0) - (((L = r.get(S)) == null ? void 0 : L.top) ?? 0);
5120
+ var E, L;
5121
+ return (((E = r.get(R)) == null ? void 0 : E.top) ?? 0) - (((L = r.get(S)) == null ? void 0 : L.top) ?? 0);
5116
5122
  });
5117
5123
  const d = o ? l.indexOf(o.id) : -1, f = d === -1 ? a ? 0 : l.length - 1 : a ? Math.min(d + 1, l.length - 1) : Math.max(d - 1, 0);
5118
5124
  if (f === d) return;
5119
- const m = r.get(l[f]);
5120
- if (!m) return;
5125
+ const h = r.get(l[f]);
5126
+ if (!h) return;
5121
5127
  const g = {
5122
- x: m.left + m.width / 2 - ((n == null ? void 0 : n.width) ?? 0) / 2,
5123
- y: m.top + m.height / 2 - ((n == null ? void 0 : n.height) ?? 0) / 2
5128
+ x: h.left + h.width / 2 - ((n == null ? void 0 : n.width) ?? 0) / 2,
5129
+ y: h.top + h.height / 2 - ((n == null ? void 0 : n.height) ?? 0) / 2
5124
5130
  };
5125
5131
  if (!(e.code === G.Left || e.code === G.Right)) return g;
5126
- const h = i.find((R) => R.scrollHeight > R.clientHeight) ?? document.scrollingElement ?? document.documentElement, T = h === document.scrollingElement ? { top: 0, bottom: window.innerHeight } : h.getBoundingClientRect(), w = T.bottom - T.top, C = T.top + w / 2;
5127
- if (!(a ? g.y > C : g.y < C)) return g;
5128
- const x = h.scrollHeight - w, $ = g.y - t.y, k = Math.min(
5132
+ const m = i.find((R) => R.scrollHeight > R.clientHeight) ?? document.scrollingElement ?? document.documentElement, C = m === document.scrollingElement ? { top: 0, bottom: window.innerHeight } : m.getBoundingClientRect(), w = C.bottom - C.top, T = C.top + w / 2;
5133
+ if (!(a ? g.y > T : g.y < T)) return g;
5134
+ const x = m.scrollHeight - w, $ = g.y - t.y, k = Math.min(
5129
5135
  x,
5130
- Math.max(0, h.scrollTop + $)
5131
- ), I = k - h.scrollTop;
5132
- return h.scrollTo({ top: k, behavior: "smooth" }), {
5136
+ Math.max(0, m.scrollTop + $)
5137
+ ), N = k - m.scrollTop;
5138
+ return m.scrollTo({ top: k, behavior: "smooth" }), {
5133
5139
  x: g.x,
5134
- y: g.y - I
5140
+ y: g.y - N
5135
5141
  };
5136
5142
  }, ri = () => y.useContext(kl), km = ({ children: e }) => {
5137
5143
  const {
@@ -5143,7 +5149,7 @@ const xl = () => {
5143
5149
  handleDragCancel: i,
5144
5150
  announcements: a,
5145
5151
  screenReaderInstructions: c
5146
- } = Cm(), l = wg(
5152
+ } = Tm(), l = wg(
5147
5153
  Zi(Xo, { activationConstraint: { distance: 8 } }),
5148
5154
  Zi(Ko, { coordinateGetter: xm })
5149
5155
  );
@@ -5165,7 +5171,7 @@ const xl = () => {
5165
5171
  ]
5166
5172
  }
5167
5173
  ) });
5168
- }, Yr = (e) => Array.from({ length: e }, (t, n) => ({ id: n })), ir = (e) => y.useMemo(() => Yr(e).map((t) => t.id), [e]), Im = E.li`
5174
+ }, Yr = (e) => Array.from({ length: e }, (t, n) => ({ id: n })), ir = (e) => y.useMemo(() => Yr(e).map((t) => t.id), [e]), Im = A.li`
5169
5175
  list-style: none;
5170
5176
  margin: 0;
5171
5177
  padding: 0;
@@ -5173,7 +5179,7 @@ const xl = () => {
5173
5179
  border-radius: ${p.borders.radiusLarge};
5174
5180
  box-shadow: ${p.shadows.resting};
5175
5181
  width: 100%;
5176
- `, Nm = E.div`
5182
+ `, Nm = A.div`
5177
5183
  background: ${p.colors.contrasts.grey100100};
5178
5184
  border-radius: ${p.borders.radiusLarge} ${p.borders.radiusLarge} 0 0;
5179
5185
  padding: ${p.spacing.small} ${p.spacing.medium};
@@ -5181,46 +5187,46 @@ const xl = () => {
5181
5187
  flex-direction: row;
5182
5188
  gap: ${p.spacing.small};
5183
5189
  align-items: flex-start;
5184
- `, Em = E.div`
5190
+ `, Em = A.div`
5185
5191
  display: flex;
5186
5192
  flex-direction: column;
5187
5193
  gap: ${p.spacing.small};
5188
5194
  flex: 1;
5189
5195
  min-width: 0;
5190
- `, Am = E.div`
5196
+ `, Am = A.div`
5191
5197
  display: flex;
5192
5198
  flex-direction: row;
5193
5199
  align-items: center;
5194
5200
  justify-content: space-between;
5195
- `, Om = E.div`
5201
+ `, Om = A.div`
5196
5202
  display: flex;
5197
5203
  flex-direction: row;
5198
5204
  gap: ${p.spacing.xSmall};
5199
5205
  align-items: center;
5200
5206
  width: 100%;
5201
- `, Dm = E.div`
5207
+ `, Dm = A.div`
5202
5208
  display: flex;
5203
5209
  flex-direction: row;
5204
5210
  gap: ${p.spacing.small};
5205
5211
  align-items: center;
5206
5212
  justify-content: flex-end;
5207
- `, $m = E.div`
5213
+ `, $m = A.div`
5208
5214
  display: flex;
5209
5215
  flex-direction: row;
5210
5216
  gap: ${p.spacing.small};
5211
- `, Mm = E.div`
5217
+ `, Mm = A.div`
5212
5218
  padding: ${p.spacing.medium} ${p.spacing.small};
5213
5219
  display: grid;
5214
5220
  grid-template-columns: repeat(3, minmax(0, 1fr));
5215
5221
  gap: ${p.spacing.medium};
5216
- `, Rm = E.div`
5222
+ `, Rm = A.div`
5217
5223
  padding: ${p.spacing.small};
5218
5224
  border: ${p.borders.widthSmall} solid ${p.colors.contrasts.grey1214};
5219
5225
  border-radius: ${p.borders.radiusLarge};
5220
5226
  display: flex;
5221
5227
  flex-direction: column;
5222
5228
  gap: ${p.spacing.xxSmall};
5223
- `, Pm = E.div`
5229
+ `, Pm = A.div`
5224
5230
  display: flex;
5225
5231
  flex-direction: row;
5226
5232
  align-items: center;
@@ -5230,68 +5236,68 @@ const xl = () => {
5230
5236
  border-radius: ${p.borders.radiusLarge};
5231
5237
  background: ${p.colors.contrasts.white1010};
5232
5238
  box-shadow: ${p.shadows.resting};
5233
- `, Lm = E.div`
5239
+ `, Lm = A.div`
5234
5240
  display: flex;
5235
5241
  flex-direction: column;
5236
5242
  gap: ${p.spacing.xxSmall};
5237
5243
  flex: 1;
5238
5244
  min-width: 0;
5239
- `, Fm = E.div`
5245
+ `, Fm = A.div`
5240
5246
  border: ${p.borders.widthSmall} solid ${p.colors.contrasts.grey1214};
5241
5247
  border-radius: ${p.borders.radiusLarge};
5242
5248
  padding: ${p.spacing.small} ${p.spacing.medium};
5243
5249
  display: flex;
5244
5250
  flex-direction: column;
5245
5251
  gap: ${p.spacing.small};
5246
- `, _m = E.div`
5252
+ `, _m = A.div`
5247
5253
  display: flex;
5248
5254
  flex-direction: row;
5249
5255
  align-items: center;
5250
5256
  gap: ${p.spacing.small};
5251
5257
  justify-content: space-between;
5252
- `, qm = E.div`
5258
+ `, qm = A.div`
5253
5259
  display: flex;
5254
5260
  flex-direction: row;
5255
5261
  align-items: center;
5256
5262
  gap: ${p.spacing.small};
5257
- `, Wm = E.div`
5263
+ `, Wm = A.div`
5258
5264
  display: flex;
5259
5265
  flex-direction: row;
5260
5266
  gap: ${p.spacing.xSmall};
5261
- `, Um = E.div`
5267
+ `, Um = A.div`
5262
5268
  display: flex;
5263
5269
  flex-direction: row;
5264
5270
  gap: ${p.spacing.small};
5265
5271
  align-items: flex-end;
5266
- `, zm = E.div`
5272
+ `, zm = A.div`
5267
5273
  display: flex;
5268
5274
  flex-direction: column;
5269
5275
  gap: ${p.spacing.small};
5270
- `, la = E.div`
5276
+ `, la = A.div`
5271
5277
  display: grid;
5272
5278
  grid-template-columns: 1fr 2fr 40px;
5273
5279
  gap: ${p.spacing.medium};
5274
5280
  align-items: center;
5275
5281
  padding: ${p.spacing.xSmall} 0;
5276
- `, Vm = E.ul`
5282
+ `, Vm = A.ul`
5277
5283
  display: flex;
5278
5284
  flex-wrap: wrap;
5279
5285
  gap: ${p.spacing.xxSmall};
5280
5286
  list-style: none;
5281
5287
  margin: 0;
5282
5288
  padding: 0;
5283
- `, Bm = E.span`
5289
+ `, Bm = A.span`
5284
5290
  display: flex;
5285
5291
  align-items: center;
5286
5292
  gap: ${p.spacing.small};
5287
- `, jm = E.span`
5293
+ `, jm = A.span`
5288
5294
  display: flex;
5289
5295
  flex-direction: column;
5290
5296
  gap: ${p.spacing.xxxSmall};
5291
5297
  `, Gm = Qf`
5292
5298
  0% { background-position: -200% 0; }
5293
5299
  100% { background-position: 200% 0; }
5294
- `, V = E.div`
5300
+ `, V = A.div`
5295
5301
  width: ${({ $width: e }) => e ?? "100%"};
5296
5302
  height: ${({ $height: e }) => e ?? "1rem"};
5297
5303
  border-radius: ${({ $radius: e }) => e ?? p.borders.radiusMedium};
@@ -5855,7 +5861,7 @@ class wt extends cr {
5855
5861
  const r = ep(this.name);
5856
5862
  let [s, o, i, a, c, l, d] = r.formatToParts ? rp(r, n) : np(r, n);
5857
5863
  a === "BC" && (s = -Math.abs(s) + 1);
5858
- const m = hs({
5864
+ const h = hs({
5859
5865
  year: s,
5860
5866
  month: o,
5861
5867
  day: i,
@@ -5866,7 +5872,7 @@ class wt extends cr {
5866
5872
  });
5867
5873
  let g = +n;
5868
5874
  const v = g % 1e3;
5869
- return g -= v >= 0 ? v : 1e3 + v, (m - g) / (60 * 1e3);
5875
+ return g -= v >= 0 ? v : 1e3 + v, (h - g) / (60 * 1e3);
5870
5876
  }
5871
5877
  /**
5872
5878
  * Return whether this Zone is equal to another zone
@@ -5893,16 +5899,16 @@ function sp(e, t = {}) {
5893
5899
  return r || (r = new Intl.ListFormat(e, t), ua[n] = r), r;
5894
5900
  }
5895
5901
  const bo = /* @__PURE__ */ new Map();
5896
- function To(e, t = {}) {
5902
+ function Co(e, t = {}) {
5897
5903
  const n = JSON.stringify([e, t]);
5898
5904
  let r = bo.get(n);
5899
5905
  return r === void 0 && (r = new Intl.DateTimeFormat(e, t), bo.set(n, r)), r;
5900
5906
  }
5901
- const Co = /* @__PURE__ */ new Map();
5907
+ const To = /* @__PURE__ */ new Map();
5902
5908
  function op(e, t = {}) {
5903
5909
  const n = JSON.stringify([e, t]);
5904
- let r = Co.get(n);
5905
- return r === void 0 && (r = new Intl.NumberFormat(e, t), Co.set(n, r)), r;
5910
+ let r = To.get(n);
5911
+ return r === void 0 && (r = new Intl.NumberFormat(e, t), To.set(n, r)), r;
5906
5912
  }
5907
5913
  const So = /* @__PURE__ */ new Map();
5908
5914
  function ip(e, t = {}) {
@@ -5937,10 +5943,10 @@ function lp(e) {
5937
5943
  {
5938
5944
  let r, s;
5939
5945
  try {
5940
- r = To(e).resolvedOptions(), s = e;
5946
+ r = Co(e).resolvedOptions(), s = e;
5941
5947
  } catch {
5942
5948
  const c = e.substring(0, n);
5943
- r = To(c).resolvedOptions(), s = c;
5949
+ r = Co(c).resolvedOptions(), s = c;
5944
5950
  }
5945
5951
  const { numberingSystem: o, calendar: i } = r;
5946
5952
  return [s, o, i];
@@ -5965,7 +5971,7 @@ function fp(e) {
5965
5971
  }
5966
5972
  return t;
5967
5973
  }
5968
- function Tr(e, t, n, r) {
5974
+ function Cr(e, t, n, r) {
5969
5975
  const s = e.listingMode();
5970
5976
  return s === "error" ? null : s === "en" ? n(t) : r(t);
5971
5977
  }
@@ -6002,7 +6008,7 @@ class mp {
6002
6008
  t.offset !== 0 && wt.create(a).valid ? (s = a, this.dt = t) : (s = "UTC", this.dt = t.offset === 0 ? t : t.setZone("UTC").plus({ minutes: t.offset }), this.originalZone = t.zone);
6003
6009
  } else t.zone.type === "system" ? this.dt = t : t.zone.type === "iana" ? (this.dt = t, s = t.zone.name) : (s = "UTC", this.dt = t.setZone("UTC").plus({ minutes: t.offset }), this.originalZone = t.zone);
6004
6010
  const o = { ...this.opts };
6005
- o.timeZone = o.timeZone || s, this.dtf = To(n, o);
6011
+ o.timeZone = o.timeZone || s, this.dtf = Co(n, o);
6006
6012
  }
6007
6013
  format() {
6008
6014
  return this.originalZone ? this.formatToParts().map(({ value: t }) => t).join("") : this.dtf.format(this.dt.toJSDate());
@@ -6058,7 +6064,7 @@ class K {
6058
6064
  return new K(a, c, l, d, i);
6059
6065
  }
6060
6066
  static resetCache() {
6061
- Pn = null, bo.clear(), Co.clear(), So.clear(), xo.clear(), ko.clear();
6067
+ Pn = null, bo.clear(), To.clear(), So.clear(), xo.clear(), ko.clear();
6062
6068
  }
6063
6069
  static fromObject({ locale: t, numberingSystem: n, outputCalendar: r, weekSettings: s } = {}) {
6064
6070
  return K.create(t, n, r, s);
@@ -6090,7 +6096,7 @@ class K {
6090
6096
  return this.clone({ ...t, defaultToEN: !1 });
6091
6097
  }
6092
6098
  months(t, n = !1) {
6093
- return Tr(this, t, fu, () => {
6099
+ return Cr(this, t, fu, () => {
6094
6100
  const r = this.intl === "ja" || this.intl.startsWith("ja-");
6095
6101
  n &= !r;
6096
6102
  const s = n ? { month: t, day: "numeric" } : { month: t }, o = n ? "format" : "standalone";
@@ -6102,7 +6108,7 @@ class K {
6102
6108
  });
6103
6109
  }
6104
6110
  weekdays(t, n = !1) {
6105
- return Tr(this, t, mu, () => {
6111
+ return Cr(this, t, mu, () => {
6106
6112
  const r = n ? { weekday: t, year: "numeric", month: "long", day: "numeric" } : { weekday: t }, s = n ? "format" : "standalone";
6107
6113
  return this.weekdaysCache[s][t] || (this.weekdaysCache[s][t] = fp(
6108
6114
  (o) => this.extract(o, r, "weekday")
@@ -6110,7 +6116,7 @@ class K {
6110
6116
  });
6111
6117
  }
6112
6118
  meridiems() {
6113
- return Tr(
6119
+ return Cr(
6114
6120
  this,
6115
6121
  void 0,
6116
6122
  () => pu,
@@ -6126,7 +6132,7 @@ class K {
6126
6132
  );
6127
6133
  }
6128
6134
  eras(t) {
6129
- return Tr(this, t, yu, () => {
6135
+ return Cr(this, t, yu, () => {
6130
6136
  const n = { era: t };
6131
6137
  return this.eraCache[t] || (this.eraCache[t] = [q.utc(-40, 1, 1), q.utc(2017, 1, 1)].map(
6132
6138
  (r) => this.extract(r, n, "era")
@@ -6597,11 +6603,11 @@ function Fs(e) {
6597
6603
  const { year: t, month: n, day: r } = e, s = ru(t, n, r);
6598
6604
  return { year: t, ordinal: s, ...ps(e) };
6599
6605
  }
6600
- function Ta(e) {
6606
+ function Ca(e) {
6601
6607
  const { year: t, ordinal: n } = e, { month: r, day: s } = su(t, n);
6602
6608
  return { year: t, month: r, day: s, ...ps(e) };
6603
6609
  }
6604
- function Ca(e, t) {
6610
+ function Ta(e, t) {
6605
6611
  if (!_(e.localWeekday) || !_(e.localWeekNumber) || !_(e.localWeekYear)) {
6606
6612
  if (!_(e.weekday) || !_(e.weekNumber) || !_(e.weekYear))
6607
6613
  throw new cn(
@@ -6614,7 +6620,7 @@ function Ca(e, t) {
6614
6620
  } else
6615
6621
  return { minDaysInFirstWeek: 4, startOfWeek: 1 };
6616
6622
  }
6617
- function Tp(e, t = 4, n = 1) {
6623
+ function Cp(e, t = 4, n = 1) {
6618
6624
  const r = gs(e.weekYear), s = Ke(
6619
6625
  e.weekNumber,
6620
6626
  1,
@@ -6622,7 +6628,7 @@ function Tp(e, t = 4, n = 1) {
6622
6628
  ), o = Ke(e.weekday, 1, 7);
6623
6629
  return r ? s ? o ? !1 : Ye("weekday", e.weekday) : Ye("week", e.weekNumber) : Ye("weekYear", e.weekYear);
6624
6630
  }
6625
- function Cp(e) {
6631
+ function Tp(e) {
6626
6632
  const t = gs(e.year), n = Ke(e.ordinal, 1, un(e.year));
6627
6633
  return t ? n ? !1 : Ye("ordinal", e.ordinal) : Ye("year", e.year);
6628
6634
  }
@@ -7014,7 +7020,7 @@ class ke {
7014
7020
  ), d = (g) => {
7015
7021
  const v = ke.macroTokenToFormatOpts(g);
7016
7022
  return v ? this.formatWithSystemDefault(t, v) : g;
7017
- }, f = (g) => r ? Fp(t, g) : o({ era: g }, "era"), m = (g) => {
7023
+ }, f = (g) => r ? Fp(t, g) : o({ era: g }, "era"), h = (g) => {
7018
7024
  switch (g) {
7019
7025
  case "S":
7020
7026
  return this.num(t.millisecond);
@@ -7141,7 +7147,7 @@ class ke {
7141
7147
  return d(g);
7142
7148
  }
7143
7149
  };
7144
- return ka(ke.parseFormat(n), m);
7150
+ return ka(ke.parseFormat(n), h);
7145
7151
  }
7146
7152
  formatDurationFromString(t, n) {
7147
7153
  const r = this.opts.signMode === "negativeLargestOnly" ? -1 : 1, s = (d) => {
@@ -7165,16 +7171,16 @@ class ke {
7165
7171
  default:
7166
7172
  return null;
7167
7173
  }
7168
- }, o = (d, f) => (m) => {
7169
- const g = s(m);
7174
+ }, o = (d, f) => (h) => {
7175
+ const g = s(h);
7170
7176
  if (g) {
7171
7177
  const v = f.isNegativeDuration && g !== f.largestUnit ? r : 1;
7172
- let h;
7173
- return this.opts.signMode === "negativeLargestOnly" && g !== f.largestUnit ? h = "never" : this.opts.signMode === "all" ? h = "always" : h = "auto", this.num(d.get(g) * v, m.length, h);
7178
+ let m;
7179
+ return this.opts.signMode === "negativeLargestOnly" && g !== f.largestUnit ? m = "never" : this.opts.signMode === "all" ? m = "always" : m = "auto", this.num(d.get(g) * v, h.length, m);
7174
7180
  } else
7175
- return m;
7181
+ return h;
7176
7182
  }, i = ke.parseFormat(n), a = i.reduce(
7177
- (d, { literal: f, val: m }) => f ? d : d.concat(m),
7183
+ (d, { literal: f, val: h }) => f ? d : d.concat(h),
7178
7184
  []
7179
7185
  ), c = t.shiftTo(...a.map(s).filter((d) => d)), l = {
7180
7186
  isNegativeDuration: c < 0,
@@ -7186,11 +7192,11 @@ class ke {
7186
7192
  }
7187
7193
  }
7188
7194
  const vu = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
7189
- function Tn(...e) {
7195
+ function Cn(...e) {
7190
7196
  const t = e.reduce((n, r) => n + r.source, "");
7191
7197
  return RegExp(`^${t}$`);
7192
7198
  }
7193
- function Cn(...e) {
7199
+ function Tn(...e) {
7194
7200
  return (t) => e.reduce(
7195
7201
  ([n, r, s], o) => {
7196
7202
  const [i, a, c] = o(t, s);
@@ -7218,9 +7224,9 @@ function wu(...e) {
7218
7224
  return [r, null, n + s];
7219
7225
  };
7220
7226
  }
7221
- const bu = /(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/, Wp = `(?:${bu.source}?(?:\\[(${vu.source})\\])?)?`, li = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, Tu = RegExp(`${li.source}${Wp}`), ui = RegExp(`(?:[Tt]${Tu.source})?`), Up = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, zp = /(\d{4})-?W(\d\d)(?:-?(\d))?/, Vp = /(\d{4})-?(\d{3})/, Bp = wu("weekYear", "weekNumber", "weekDay"), jp = wu("year", "ordinal"), Gp = /(\d{4})-(\d\d)-(\d\d)/, Cu = RegExp(
7227
+ const bu = /(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/, Wp = `(?:${bu.source}?(?:\\[(${vu.source})\\])?)?`, li = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, Cu = RegExp(`${li.source}${Wp}`), ui = RegExp(`(?:[Tt]${Cu.source})?`), Up = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, zp = /(\d{4})-?W(\d\d)(?:-?(\d))?/, Vp = /(\d{4})-?(\d{3})/, Bp = wu("weekYear", "weekNumber", "weekDay"), jp = wu("year", "ordinal"), Gp = /(\d{4})-(\d\d)-(\d\d)/, Tu = RegExp(
7222
7228
  `${li.source} ?(?:${bu.source}|(${vu.source}))?`
7223
- ), Hp = RegExp(`(?: ${Cu.source})?`);
7229
+ ), Hp = RegExp(`(?: ${Tu.source})?`);
7224
7230
  function dn(e, t, n) {
7225
7231
  const r = e[t];
7226
7232
  return _(r) ? n : At(r);
@@ -7250,17 +7256,17 @@ function dr(e, t) {
7250
7256
  }
7251
7257
  const Yp = RegExp(`^T?${li.source}$`), Kp = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;
7252
7258
  function Qp(e) {
7253
- const [t, n, r, s, o, i, a, c, l] = e, d = t[0] === "-", f = c && c[0] === "-", m = (g, v = !1) => g !== void 0 && (v || g && d) ? -g : g;
7259
+ const [t, n, r, s, o, i, a, c, l] = e, d = t[0] === "-", f = c && c[0] === "-", h = (g, v = !1) => g !== void 0 && (v || g && d) ? -g : g;
7254
7260
  return [
7255
7261
  {
7256
- years: m(Pt(n)),
7257
- months: m(Pt(r)),
7258
- weeks: m(Pt(s)),
7259
- days: m(Pt(o)),
7260
- hours: m(Pt(i)),
7261
- minutes: m(Pt(a)),
7262
- seconds: m(Pt(c), c === "-0"),
7263
- milliseconds: m(ai(l), f)
7262
+ years: h(Pt(n)),
7263
+ months: h(Pt(r)),
7264
+ weeks: h(Pt(s)),
7265
+ days: h(Pt(o)),
7266
+ hours: h(Pt(i)),
7267
+ minutes: h(Pt(a)),
7268
+ seconds: h(Pt(c), c === "-0"),
7269
+ milliseconds: h(ai(l), f)
7264
7270
  }
7265
7271
  ];
7266
7272
  }
@@ -7300,9 +7306,9 @@ function ey(e) {
7300
7306
  l,
7301
7307
  d,
7302
7308
  f
7303
- ] = e, m = di(t, s, r, n, o, i, a);
7309
+ ] = e, h = di(t, s, r, n, o, i, a);
7304
7310
  let g;
7305
- return c ? g = Xp[c] : l ? g = 0 : g = ms(d, f), [m, new Ee(g)];
7311
+ return c ? g = Xp[c] : l ? g = 0 : g = ms(d, f), [h, new Ee(g)];
7306
7312
  }
7307
7313
  function ty(e) {
7308
7314
  return e.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
@@ -7316,22 +7322,22 @@ function oy(e) {
7316
7322
  const [, t, n, r, s, o, i, a] = e;
7317
7323
  return [di(t, a, n, r, s, o, i), Ee.utcInstance];
7318
7324
  }
7319
- const iy = Tn(Up, ui), ay = Tn(zp, ui), cy = Tn(Vp, ui), ly = Tn(Tu), Su = Cn(
7325
+ const iy = Cn(Up, ui), ay = Cn(zp, ui), cy = Cn(Vp, ui), ly = Cn(Cu), Su = Tn(
7320
7326
  Zp,
7321
7327
  xn,
7322
7328
  ur,
7323
7329
  dr
7324
- ), uy = Cn(
7330
+ ), uy = Tn(
7325
7331
  Bp,
7326
7332
  xn,
7327
7333
  ur,
7328
7334
  dr
7329
- ), dy = Cn(
7335
+ ), dy = Tn(
7330
7336
  jp,
7331
7337
  xn,
7332
7338
  ur,
7333
7339
  dr
7334
- ), fy = Cn(
7340
+ ), fy = Tn(
7335
7341
  xn,
7336
7342
  ur,
7337
7343
  dr
@@ -7359,20 +7365,20 @@ function my(e) {
7359
7365
  function py(e) {
7360
7366
  return Sn(e, [Kp, Qp]);
7361
7367
  }
7362
- const yy = Cn(xn);
7368
+ const yy = Tn(xn);
7363
7369
  function vy(e) {
7364
7370
  return Sn(e, [Yp, yy]);
7365
7371
  }
7366
- const wy = Tn(Gp, Hp), by = Tn(Cu), Ty = Cn(
7372
+ const wy = Cn(Gp, Hp), by = Cn(Tu), Cy = Tn(
7367
7373
  xn,
7368
7374
  ur,
7369
7375
  dr
7370
7376
  );
7371
- function Cy(e) {
7377
+ function Ty(e) {
7372
7378
  return Sn(
7373
7379
  e,
7374
7380
  [wy, Su],
7375
- [by, Ty]
7381
+ [by, Cy]
7376
7382
  );
7377
7383
  }
7378
7384
  const Na = "Invalid Duration", xu = {
@@ -8565,7 +8571,7 @@ class le {
8565
8571
  return le.fromDateTimes(t(this.s), t(this.e));
8566
8572
  }
8567
8573
  }
8568
- class Cr {
8574
+ class Tr {
8569
8575
  /**
8570
8576
  * Return whether the specified zone contains a DST.
8571
8577
  * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.
@@ -8795,7 +8801,7 @@ function $y(e) {
8795
8801
  return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
8796
8802
  }
8797
8803
  function My(e, t) {
8798
- const n = Xe(t), r = Xe(t, "{2}"), s = Xe(t, "{3}"), o = Xe(t, "{4}"), i = Xe(t, "{6}"), a = Xe(t, "{1,2}"), c = Xe(t, "{1,3}"), l = Xe(t, "{1,6}"), d = Xe(t, "{1,9}"), f = Xe(t, "{2,4}"), m = Xe(t, "{4,6}"), g = (b) => ({ regex: RegExp($y(b.val)), deser: ([T]) => T, literal: !0 }), h = ((b) => {
8804
+ const n = Xe(t), r = Xe(t, "{2}"), s = Xe(t, "{3}"), o = Xe(t, "{4}"), i = Xe(t, "{6}"), a = Xe(t, "{1,2}"), c = Xe(t, "{1,3}"), l = Xe(t, "{1,6}"), d = Xe(t, "{1,9}"), f = Xe(t, "{2,4}"), h = Xe(t, "{4,6}"), g = (b) => ({ regex: RegExp($y(b.val)), deser: ([C]) => C, literal: !0 }), m = ((b) => {
8799
8805
  if (e.literal)
8800
8806
  return g(b);
8801
8807
  switch (b.val) {
@@ -8810,7 +8816,7 @@ function My(e, t) {
8810
8816
  case "yyyy":
8811
8817
  return H(o);
8812
8818
  case "yyyyy":
8813
- return H(m);
8819
+ return H(h);
8814
8820
  case "yyyyyy":
8815
8821
  return H(i);
8816
8822
  case "M":
@@ -8903,7 +8909,7 @@ function My(e, t) {
8903
8909
  })(e) || {
8904
8910
  invalidReason: Ay
8905
8911
  };
8906
- return h.token = e, h;
8912
+ return m.token = e, m;
8907
8913
  }
8908
8914
  const Ry = {
8909
8915
  year: {
@@ -9502,28 +9508,28 @@ class q {
9502
9508
  const r = Ot(n.zone, ue.defaultZone);
9503
9509
  if (!r.isValid)
9504
9510
  return q.invalid(Ln(r));
9505
- const s = K.fromObject(n), o = Jr(t, La), { minDaysInFirstWeek: i, startOfWeek: a } = Ca(o, s), c = ue.now(), l = _(n.specificOffset) ? r.offset(c) : n.specificOffset, d = !_(o.ordinal), f = !_(o.year), m = !_(o.month) || !_(o.day), g = f || m, v = o.weekYear || o.weekNumber;
9511
+ const s = K.fromObject(n), o = Jr(t, La), { minDaysInFirstWeek: i, startOfWeek: a } = Ta(o, s), c = ue.now(), l = _(n.specificOffset) ? r.offset(c) : n.specificOffset, d = !_(o.ordinal), f = !_(o.year), h = !_(o.month) || !_(o.day), g = f || h, v = o.weekYear || o.weekNumber;
9506
9512
  if ((g || d) && v)
9507
9513
  throw new cn(
9508
9514
  "Can't mix weekYear/weekNumber units with year/month/day or ordinals"
9509
9515
  );
9510
- if (m && d)
9516
+ if (h && d)
9511
9517
  throw new cn("Can't mix ordinal dates with month/day");
9512
- const h = v || o.weekday && !g;
9513
- let b, T, w = xr(c, l);
9514
- h ? (b = By, T = zy, w = Qr(w, i, a)) : d ? (b = jy, T = Vy, w = Fs(w)) : (b = Fr, T = Mu);
9515
- let C = !1;
9518
+ const m = v || o.weekday && !g;
9519
+ let b, C, w = xr(c, l);
9520
+ m ? (b = By, C = zy, w = Qr(w, i, a)) : d ? (b = jy, C = Vy, w = Fs(w)) : (b = Fr, C = Mu);
9521
+ let T = !1;
9516
9522
  for (const S of b) {
9517
- const N = o[S];
9518
- _(N) ? C ? o[S] = T[S] : o[S] = w[S] : C = !0;
9523
+ const E = o[S];
9524
+ _(E) ? T ? o[S] = C[S] : o[S] = w[S] : T = !0;
9519
9525
  }
9520
- const A = h ? Tp(o, i, a) : d ? Cp(o) : ou(o), x = A || iu(o);
9526
+ const I = m ? Cp(o, i, a) : d ? Tp(o) : ou(o), x = I || iu(o);
9521
9527
  if (x)
9522
9528
  return q.invalid(x);
9523
- const $ = h ? ba(o, i, a) : d ? Ta(o) : o, [k, I] = Lr($, l, r), R = new q({
9529
+ const $ = m ? ba(o, i, a) : d ? Ca(o) : o, [k, N] = Lr($, l, r), R = new q({
9524
9530
  ts: k,
9525
9531
  zone: r,
9526
- o: I,
9532
+ o: N,
9527
9533
  loc: s
9528
9534
  });
9529
9535
  return o.weekday && g && t.weekday !== R.weekday ? q.invalid(
@@ -9643,7 +9649,7 @@ class q {
9643
9649
  * @return {DateTime}
9644
9650
  */
9645
9651
  static fromSQL(t, n = {}) {
9646
- const [r, s] = Cy(t);
9652
+ const [r, s] = Ty(t);
9647
9653
  return on(r, s, n, "SQL", t);
9648
9654
  }
9649
9655
  /**
@@ -9903,7 +9909,7 @@ class q {
9903
9909
  * @type {string}
9904
9910
  */
9905
9911
  get monthShort() {
9906
- return this.isValid ? Cr.months("short", { locObj: this.loc })[this.month - 1] : null;
9912
+ return this.isValid ? Tr.months("short", { locObj: this.loc })[this.month - 1] : null;
9907
9913
  }
9908
9914
  /**
9909
9915
  * Get the human readable long month name, such as 'October'.
@@ -9912,7 +9918,7 @@ class q {
9912
9918
  * @type {string}
9913
9919
  */
9914
9920
  get monthLong() {
9915
- return this.isValid ? Cr.months("long", { locObj: this.loc })[this.month - 1] : null;
9921
+ return this.isValid ? Tr.months("long", { locObj: this.loc })[this.month - 1] : null;
9916
9922
  }
9917
9923
  /**
9918
9924
  * Get the human readable short weekday, such as 'Mon'.
@@ -9921,7 +9927,7 @@ class q {
9921
9927
  * @type {string}
9922
9928
  */
9923
9929
  get weekdayShort() {
9924
- return this.isValid ? Cr.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null;
9930
+ return this.isValid ? Tr.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null;
9925
9931
  }
9926
9932
  /**
9927
9933
  * Get the human readable long weekday, such as 'Monday'.
@@ -9930,7 +9936,7 @@ class q {
9930
9936
  * @type {string}
9931
9937
  */
9932
9938
  get weekdayLong() {
9933
- return this.isValid ? Cr.weekdays("long", { locObj: this.loc })[this.weekday - 1] : null;
9939
+ return this.isValid ? Tr.weekdays("long", { locObj: this.loc })[this.weekday - 1] : null;
9934
9940
  }
9935
9941
  /**
9936
9942
  * Get the UTC offset of this DateTime in minutes
@@ -10133,7 +10139,7 @@ class q {
10133
10139
  */
10134
10140
  set(t) {
10135
10141
  if (!this.isValid) return this;
10136
- const n = Jr(t, La), { minDaysInFirstWeek: r, startOfWeek: s } = Ca(n, this.loc), o = !_(n.weekYear) || !_(n.weekNumber) || !_(n.weekday), i = !_(n.ordinal), a = !_(n.year), c = !_(n.month) || !_(n.day), l = a || c, d = n.weekYear || n.weekNumber;
10142
+ const n = Jr(t, La), { minDaysInFirstWeek: r, startOfWeek: s } = Ta(n, this.loc), o = !_(n.weekYear) || !_(n.weekNumber) || !_(n.weekday), i = !_(n.ordinal), a = !_(n.year), c = !_(n.month) || !_(n.day), l = a || c, d = n.weekYear || n.weekNumber;
10137
10143
  if ((l || i) && d)
10138
10144
  throw new cn(
10139
10145
  "Can't mix weekYear/weekNumber units with year/month/day or ordinals"
@@ -10145,9 +10151,9 @@ class q {
10145
10151
  { ...Qr(this.c, r, s), ...n },
10146
10152
  r,
10147
10153
  s
10148
- ) : _(n.ordinal) ? (f = { ...this.toObject(), ...n }, _(n.day) && (f.day = Math.min(Xr(f.year, f.month), f.day))) : f = Ta({ ...Fs(this.c), ...n });
10149
- const [m, g] = Lr(f, this.o, this.zone);
10150
- return Lt(this, { ts: m, o: g });
10154
+ ) : _(n.ordinal) ? (f = { ...this.toObject(), ...n }, _(n.day) && (f.day = Math.min(Xr(f.year, f.month), f.day))) : f = Ca({ ...Fs(this.c), ...n });
10155
+ const [h, g] = Lr(f, this.o, this.zone);
10156
+ return Lt(this, { ts: h, o: g });
10151
10157
  }
10152
10158
  /**
10153
10159
  * Add a period of time to this DateTime and return the resulting DateTime
@@ -10945,7 +10951,7 @@ const Ru = (e) => q.fromISO(e).toFormat("MMM d"), Oo = ({
10945
10951
  },
10946
10952
  closeModal: () => {
10947
10953
  }
10948
- }), Le = () => y.useContext(Pu), Lu = Te`
10954
+ }), Le = () => y.useContext(Pu), Lu = Ce`
10949
10955
  query GetInstitutionalTagCategories(
10950
10956
  $accountId: ID!
10951
10957
  $first: Int
@@ -11007,7 +11013,7 @@ const Ru = (e) => q.fromISO(e).toFormat("MMM d"), Oo = ({
11007
11013
  }
11008
11014
  }
11009
11015
  `;
11010
- Te`
11016
+ Ce`
11011
11017
  query GetAllInstitutionalTagCategories(
11012
11018
  $accountId: ID!
11013
11019
  $first: Int
@@ -11035,7 +11041,7 @@ Te`
11035
11041
  }
11036
11042
  }
11037
11043
  `;
11038
- const Fu = Te`
11044
+ const Fu = Ce`
11039
11045
  query GetInstitutionalTagsForCategory(
11040
11046
  $accountId: ID!
11041
11047
  $categoryId: ID
@@ -11074,7 +11080,7 @@ const Fu = Te`
11074
11080
  }
11075
11081
  }
11076
11082
  }
11077
- `, _u = Te`
11083
+ `, _u = Ce`
11078
11084
  query GetInstitutionalTag($id: ID!, $first: Int, $after: String, $sort: InstitutionalTagUsersSortInput, $filter: AccountUsersFilter) {
11079
11085
  institutionalTag(id: $id) {
11080
11086
  _id
@@ -11106,7 +11112,7 @@ const Fu = Te`
11106
11112
  }
11107
11113
  }
11108
11114
  `;
11109
- Te`
11115
+ Ce`
11110
11116
  query GetInstitutionalTagCategory($id: ID!) {
11111
11117
  institutionalTagCategory(id: $id) {
11112
11118
  _id
@@ -11117,7 +11123,7 @@ Te`
11117
11123
  }
11118
11124
  }
11119
11125
  `;
11120
- const Hy = Te`
11126
+ const Hy = Ce`
11121
11127
  query GetAccountUsers(
11122
11128
  $accountId: ID!
11123
11129
  $first: Int
@@ -11143,7 +11149,7 @@ const Hy = Te`
11143
11149
  }
11144
11150
  }
11145
11151
  }
11146
- `, Zy = Te`
11152
+ `, Zy = Ce`
11147
11153
  query GetAllActiveTags($accountId: ID!, $first: Int, $after: String) {
11148
11154
  account(id: $accountId) {
11149
11155
  _id
@@ -11168,7 +11174,7 @@ const Hy = Te`
11168
11174
  }
11169
11175
  }
11170
11176
  }
11171
- `, Yy = Te`
11177
+ `, Yy = Ce`
11172
11178
  query GetUserInstitutionalTags($userId: ID!, $accountId: ID!) {
11173
11179
  user(id: $userId) {
11174
11180
  _id
@@ -11186,7 +11192,7 @@ const Hy = Te`
11186
11192
  }
11187
11193
  }
11188
11194
  `;
11189
- Te`
11195
+ Ce`
11190
11196
  query GetInstitutionalTagCategoryWithTags(
11191
11197
  $accountId: ID!
11192
11198
  $categoryId: ID!
@@ -11245,7 +11251,7 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11245
11251
  },
11246
11252
  staleTime: Qy
11247
11253
  });
11248
- }, gi = E.div`
11254
+ }, gi = A.div`
11249
11255
  container-type: inline-size;
11250
11256
  padding: ${p.spacing.mediumSmall};
11251
11257
  background: ${p.colors.contrasts.grey1111};
@@ -11277,8 +11283,8 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11277
11283
  onChange: (d, f) => {
11278
11284
  var g;
11279
11285
  if (!f.id) return;
11280
- const m = typeof ((g = e[0]) == null ? void 0 : g.id) == "number" ? Number(f.id) : f.id;
11281
- t(m);
11286
+ const h = typeof ((g = e[0]) == null ? void 0 : g.id) == "number" ? Number(f.id) : f.id;
11287
+ t(h);
11282
11288
  },
11283
11289
  children: e.map((d) => /* @__PURE__ */ u(
11284
11290
  Ai.Option,
@@ -11292,7 +11298,7 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11292
11298
  ))
11293
11299
  }
11294
11300
  );
11295
- }, Jy = E.div`
11301
+ }, Jy = A.div`
11296
11302
  display: grid;
11297
11303
  grid-template-columns: 1fr 1fr;
11298
11304
  gap: ${p.spacing.small};
@@ -11307,15 +11313,15 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11307
11313
  onInputChange: r
11308
11314
  }) => {
11309
11315
  const { categoryAutocomplete: s } = Rt(), { translations: o } = W(), i = fr(), [a, c] = y.useState(!1), [l, d] = y.useState(null), f = (v) => {
11310
- const h = v.target.value;
11311
- r(h), c(!0), d(null);
11312
- }, m = (v, { id: h }) => {
11313
- var T;
11314
- if (!h) return;
11315
- const b = (T = t.find((w) => w.id === h)) == null ? void 0 : T.label;
11316
+ const m = v.target.value;
11317
+ r(m), c(!0), d(null);
11318
+ }, h = (v, { id: m }) => {
11319
+ var C;
11320
+ if (!m) return;
11321
+ const b = (C = t.find((w) => w.id === m)) == null ? void 0 : C.label;
11316
11322
  b && r(b), c(!1), d(null);
11317
- }, g = (v, { id: h }) => {
11318
- d(h ?? null);
11323
+ }, g = (v, { id: m }) => {
11324
+ d(m ?? null);
11319
11325
  };
11320
11326
  return s ? /* @__PURE__ */ u(
11321
11327
  $e,
@@ -11331,7 +11337,7 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11331
11337
  onBlur: () => d(null),
11332
11338
  onInputChange: f,
11333
11339
  onRequestHighlightOption: g,
11334
- onRequestSelectOption: m,
11340
+ onRequestSelectOption: h,
11335
11341
  messages: n,
11336
11342
  children: t.length > 0 ? t.map((v) => /* @__PURE__ */ u(
11337
11343
  $e.Option,
@@ -11350,7 +11356,7 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11350
11356
  isRequired: !0,
11351
11357
  placeholder: o.categoryNamePlaceholder,
11352
11358
  value: e,
11353
- onChange: (v, h) => r(h),
11359
+ onChange: (v, m) => r(m),
11354
11360
  messages: n
11355
11361
  }
11356
11362
  );
@@ -11368,7 +11374,7 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11368
11374
  onNewCategoryNameChange: d,
11369
11375
  onNewCategoryDescriptionChange: f
11370
11376
  }) => {
11371
- const { translations: m } = W();
11377
+ const { translations: h } = W();
11372
11378
  return /* @__PURE__ */ D(Lo, { description: null, layout: "stacked", vAlign: "top", children: [
11373
11379
  /* @__PURE__ */ D(Jy, { children: [
11374
11380
  /* @__PURE__ */ u(
@@ -11380,7 +11386,7 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11380
11386
  messages: t,
11381
11387
  onChange: l,
11382
11388
  interaction: c ? "disabled" : "enabled",
11383
- description: m.useArrowKeysToNavigate,
11389
+ description: h.useArrowKeysToNavigate,
11384
11390
  options: e.map((g) => ({
11385
11391
  ...g,
11386
11392
  renderBeforeLabel: g.id === vo ? /* @__PURE__ */ u(Ro, { color: "brand" }) : void 0
@@ -11401,7 +11407,7 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11401
11407
  o && /* @__PURE__ */ u(
11402
11408
  Bt,
11403
11409
  {
11404
- renderLabel: m.categoryDescriptionLabel,
11410
+ renderLabel: h.categoryDescriptionLabel,
11405
11411
  onChange: (g, v) => f(v)
11406
11412
  }
11407
11413
  )
@@ -11415,17 +11421,17 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11415
11421
  defaultDescription: o,
11416
11422
  existingTagNames: i = []
11417
11423
  }) => {
11418
- const { translations: a } = W(), c = fr(), [l, d] = y.useState(s ?? ""), [f, m] = y.useState(!1), [g, v] = y.useState(null), h = y.useMemo(() => {
11424
+ const { translations: a } = W(), c = fr(), [l, d] = y.useState(s ?? ""), [f, h] = y.useState(!1), [g, v] = y.useState(null), m = y.useMemo(() => {
11419
11425
  if (!l.trim()) return i;
11420
11426
  const w = l.trim().toLowerCase();
11421
- return i.filter((C) => C.toLowerCase().includes(w));
11427
+ return i.filter((T) => T.toLowerCase().includes(w));
11422
11428
  }, [i, l]), b = (w) => {
11423
- const C = w.target.value;
11424
- d(C), n(C), m(!0), v(null);
11425
- }, T = (w, { id: C }) => {
11426
- if (!C) return;
11427
- const A = h.find((x) => x === C);
11428
- A && (d(A), n(A), m(!1), v(null));
11429
+ const T = w.target.value;
11430
+ d(T), n(T), h(!0), v(null);
11431
+ }, C = (w, { id: T }) => {
11432
+ if (!T) return;
11433
+ const I = m.find((x) => x === T);
11434
+ I && (d(I), n(I), h(!1), v(null));
11429
11435
  };
11430
11436
  return /* @__PURE__ */ D(
11431
11437
  Lo,
@@ -11444,14 +11450,14 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11444
11450
  inputValue: l,
11445
11451
  isShowingOptions: f,
11446
11452
  mountNode: c,
11447
- onRequestShowOptions: () => m(!0),
11448
- onRequestHideOptions: () => m(!1),
11453
+ onRequestShowOptions: () => h(!0),
11454
+ onRequestHideOptions: () => h(!1),
11449
11455
  onBlur: () => v(null),
11450
11456
  onInputChange: b,
11451
- onRequestHighlightOption: (w, { id: C }) => v(C ?? null),
11452
- onRequestSelectOption: T,
11457
+ onRequestHighlightOption: (w, { id: T }) => v(T ?? null),
11458
+ onRequestSelectOption: C,
11453
11459
  messages: e,
11454
- children: h.length > 0 ? h.map((w) => /* @__PURE__ */ u($e.Option, { id: w, isHighlighted: w === g, children: w }, w)) : /* @__PURE__ */ u($e.Option, { id: "empty-option", children: a.tagNameNoMatches }, "empty-option")
11460
+ children: m.length > 0 ? m.map((w) => /* @__PURE__ */ u($e.Option, { id: w, isHighlighted: w === g, children: w }, w)) : /* @__PURE__ */ u($e.Option, { id: "empty-option", children: a.tagNameNoMatches }, "empty-option")
11455
11461
  }
11456
11462
  ) : /* @__PURE__ */ u(
11457
11463
  Bt,
@@ -11460,8 +11466,8 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11460
11466
  placeholder: a.tagNamePlaceholder,
11461
11467
  defaultValue: s,
11462
11468
  isRequired: !0,
11463
- onChange: (w, C) => {
11464
- d(C), n(C);
11469
+ onChange: (w, T) => {
11470
+ d(T), n(T);
11465
11471
  },
11466
11472
  messages: e
11467
11473
  }
@@ -11474,7 +11480,7 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11474
11480
  defaultValue: o,
11475
11481
  isRequired: !0,
11476
11482
  messages: t,
11477
- onChange: (w, C) => r(C)
11483
+ onChange: (w, T) => r(T)
11478
11484
  }
11479
11485
  )
11480
11486
  ]
@@ -11557,13 +11563,13 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11557
11563
  }), s = y.useMemo(
11558
11564
  () => vs(n),
11559
11565
  [n]
11560
- ), [o, i] = y.useState(!1), [a, c] = y.useState([]), [l, d] = y.useState([]), [f, m] = y.useState(
11566
+ ), [o, i] = y.useState(!1), [a, c] = y.useState([]), [l, d] = y.useState([]), [f, h] = y.useState(
11561
11567
  e ?? null
11562
- ), [g, v] = y.useState(""), [h, b] = y.useState(""), [T, w] = y.useState(null), [C, A] = y.useState(0), [x, $] = y.useState(
11568
+ ), [g, v] = y.useState(""), [m, b] = y.useState(""), [C, w] = y.useState(null), [T, I] = y.useState(0), [x, $] = y.useState(
11563
11569
  e
11564
- ), { translations: k } = W(), { executeQuery: I } = ae(), R = (F) => {
11565
- F === vo ? i(!0) : (i(!1), m(F)), c([]);
11566
- }, S = (F) => s.some((J) => J.label.trim().toLowerCase() === F.trim().toLowerCase()), N = (F) => {
11570
+ ), { translations: k } = W(), { executeQuery: N } = ae(), R = (F) => {
11571
+ F === vo ? i(!0) : (i(!1), h(F)), c([]);
11572
+ }, S = (F) => s.some((J) => J.label.trim().toLowerCase() === F.trim().toLowerCase()), E = (F) => {
11567
11573
  v(F), F.trim() && S(F) ? d([{ type: "newError", text: k.categoryNameAlreadyExists }]) : d([]);
11568
11574
  }, L = (F) => b(F), O = () => {
11569
11575
  let F = !0;
@@ -11571,10 +11577,10 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11571
11577
  }, z = async () => {
11572
11578
  var F;
11573
11579
  if (o) {
11574
- const Oe = (F = (await I(wl, {
11580
+ const Oe = (F = (await N(wl, {
11575
11581
  input: {
11576
11582
  name: g.trim(),
11577
- ...h.trim() ? { description: h.trim() } : {}
11583
+ ...m.trim() ? { description: m.trim() } : {}
11578
11584
  }
11579
11585
  })).createInstitutionalTagCategory) == null ? void 0 : F.institutionalTagCategory;
11580
11586
  if (!Oe) throw new Error("Failed to create category");
@@ -11584,12 +11590,12 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11584
11590
  throw new Error("resolveCategoryId called without a selected category");
11585
11591
  return f;
11586
11592
  }, M = (F) => {
11587
- i(!1), m(F), w({ id: F, label: g }), $(F), A((J) => J + 1);
11588
- }, Y = T && !s.find((F) => F.id === T.id) ? [T] : [], B = [
11593
+ i(!1), h(F), w({ id: F, label: g }), $(F), I((J) => J + 1);
11594
+ }, Y = C && !s.find((F) => F.id === C.id) ? [C] : [], B = [
11589
11595
  { id: vo, label: k.createNewCategoryOption },
11590
11596
  ...Y,
11591
11597
  ...s
11592
- ], Ce = y.useMemo(() => {
11598
+ ], Te = y.useMemo(() => {
11593
11599
  if (!t) return [];
11594
11600
  const F = g.trim().toLowerCase();
11595
11601
  return F ? s.filter((J) => J.label.toLowerCase().includes(F)) : s;
@@ -11599,13 +11605,13 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11599
11605
  categoryError: a,
11600
11606
  newCategoryName: g,
11601
11607
  newCategoryNameError: l,
11602
- filteredSuggestions: Ce,
11608
+ filteredSuggestions: Te,
11603
11609
  categoryOptions: B,
11604
- categorySelectKey: C,
11610
+ categorySelectKey: T,
11605
11611
  defaultCategoryValue: x,
11606
11612
  categoriesPending: r,
11607
11613
  onCategoryChange: R,
11608
- onNewCategoryNameChange: N,
11614
+ onNewCategoryNameChange: E,
11609
11615
  onNewCategoryDescriptionChange: L,
11610
11616
  validateCategory: O,
11611
11617
  resolveCategoryId: z,
@@ -11618,11 +11624,11 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11618
11624
  tagDescription: r,
11619
11625
  tagNameError: o,
11620
11626
  tagDescriptionError: a,
11621
- onTagNameChange: (h) => {
11622
- n(h), h.trim() && i([]);
11627
+ onTagNameChange: (m) => {
11628
+ n(m), m.trim() && i([]);
11623
11629
  },
11624
- onTagDescriptionChange: (h) => {
11625
- s(h), h.trim() && c([]);
11630
+ onTagDescriptionChange: (m) => {
11631
+ s(m), m.trim() && c([]);
11626
11632
  },
11627
11633
  onTagNameRequired: () => i([{ type: "newError", text: l.tagNameRequired }]),
11628
11634
  onTagDescriptionRequired: () => c([{ type: "newError", text: l.tagDescriptionRequired }]),
@@ -11644,35 +11650,35 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11644
11650
  onConflictError: d
11645
11651
  } = Bu(), {
11646
11652
  isCreatingCategory: f,
11647
- categoryError: m,
11653
+ categoryError: h,
11648
11654
  newCategoryName: g,
11649
11655
  newCategoryNameError: v,
11650
- filteredSuggestions: h,
11656
+ filteredSuggestions: m,
11651
11657
  categoryOptions: b,
11652
- categorySelectKey: T,
11658
+ categorySelectKey: C,
11653
11659
  defaultCategoryValue: w,
11654
- onCategoryChange: C,
11655
- onNewCategoryNameChange: A,
11660
+ onCategoryChange: T,
11661
+ onNewCategoryNameChange: I,
11656
11662
  onNewCategoryDescriptionChange: x,
11657
11663
  categoriesPending: $,
11658
11664
  validateCategory: k,
11659
- resolveCategoryId: I,
11665
+ resolveCategoryId: N,
11660
11666
  resolveToExistingCategory: R
11661
- } = Vu({ initialCategoryId: t }), { closeModal: S } = Le(), { showAlert: N } = Pe(), { translations: L } = W(), O = Ve(), { executeQuery: z } = ae(), M = y.useRef(null), { mutate: Y } = Be({
11667
+ } = Vu({ initialCategoryId: t }), { closeModal: S } = Le(), { showAlert: E } = Pe(), { translations: L } = W(), O = Ve(), { executeQuery: z } = ae(), M = y.useRef(null), { mutate: Y } = Be({
11662
11668
  mutationFn: async () => {
11663
- const B = await I();
11669
+ const B = await N();
11664
11670
  return f && (M.current = B), z(
11665
- Tm,
11671
+ Cm,
11666
11672
  { input: { name: n, description: r, categoryId: B } }
11667
11673
  );
11668
11674
  },
11669
11675
  onSuccess: (B) => {
11670
11676
  if (Re(B.createInstitutionalTag)) {
11671
- const Ce = M.current;
11672
- M.current = null, Ce !== null && (O.invalidateQueries({ queryKey: ["categories"] }), O.invalidateQueries({ queryKey: ["allCategories"] }), R(Ce)), or(B.createInstitutionalTag) && d();
11677
+ const Te = M.current;
11678
+ M.current = null, Te !== null && (O.invalidateQueries({ queryKey: ["categories"] }), O.invalidateQueries({ queryKey: ["allCategories"] }), R(Te)), or(B.createInstitutionalTag) && d();
11673
11679
  return;
11674
11680
  }
11675
- f && (O.invalidateQueries({ queryKey: ["allCategories"] }), N({ variant: "success", message: L.categoryCreated })), M.current = null, O.invalidateQueries({ queryKey: ["categories"] }), O.invalidateQueries({ queryKey: ["tags"] }), O.invalidateQueries({ queryKey: ["allTagNames"] }), S(), N({ variant: "success", message: L.tagSaved });
11681
+ f && (O.invalidateQueries({ queryKey: ["allCategories"] }), E({ variant: "success", message: L.categoryCreated })), M.current = null, O.invalidateQueries({ queryKey: ["categories"] }), O.invalidateQueries({ queryKey: ["tags"] }), O.invalidateQueries({ queryKey: ["allTagNames"] }), S(), E({ variant: "success", message: L.tagSaved });
11676
11682
  },
11677
11683
  onError: () => {
11678
11684
  const B = M.current;
@@ -11688,16 +11694,16 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11688
11694
  onTagNameChange: i,
11689
11695
  onTagDescriptionChange: a,
11690
11696
  isCreatingCategory: f,
11691
- categoryError: m,
11697
+ categoryError: h,
11692
11698
  newCategoryName: g,
11693
11699
  newCategoryNameError: v,
11694
- filteredSuggestions: h,
11700
+ filteredSuggestions: m,
11695
11701
  categoryOptions: b,
11696
- categorySelectKey: T,
11702
+ categorySelectKey: C,
11697
11703
  defaultCategoryValue: w,
11698
11704
  categoriesPending: $,
11699
- onCategoryChange: C,
11700
- onNewCategoryNameChange: A,
11705
+ onCategoryChange: T,
11706
+ onNewCategoryNameChange: I,
11701
11707
  onNewCategoryDescriptionChange: x
11702
11708
  };
11703
11709
  }, av = ({ tag: e, submitRef: t }) => {
@@ -11716,22 +11722,22 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11716
11722
  description: e.description
11717
11723
  }), {
11718
11724
  isCreatingCategory: f,
11719
- categoryError: m,
11725
+ categoryError: h,
11720
11726
  newCategoryName: g,
11721
11727
  newCategoryNameError: v,
11722
- filteredSuggestions: h,
11728
+ filteredSuggestions: m,
11723
11729
  categoryOptions: b,
11724
- categorySelectKey: T,
11730
+ categorySelectKey: C,
11725
11731
  defaultCategoryValue: w,
11726
- categoriesPending: C,
11727
- onCategoryChange: A,
11732
+ categoriesPending: T,
11733
+ onCategoryChange: I,
11728
11734
  onNewCategoryNameChange: x,
11729
11735
  onNewCategoryDescriptionChange: $,
11730
11736
  validateCategory: k,
11731
- resolveCategoryId: I
11732
- } = Vu({ initialCategoryId: e.category._id }), { closeModal: R } = Le(), { showAlert: S } = Pe(), { translations: N } = W(), L = Ve(), { executeQuery: O } = ae(), { mutate: z } = Be({
11737
+ resolveCategoryId: N
11738
+ } = Vu({ initialCategoryId: e.category._id }), { closeModal: R } = Le(), { showAlert: S } = Pe(), { translations: E } = W(), L = Ve(), { executeQuery: O } = ae(), { mutate: z } = Be({
11733
11739
  mutationFn: async () => {
11734
- const M = await I();
11740
+ const M = await N();
11735
11741
  return O(
11736
11742
  ni,
11737
11743
  { input: { id: e._id, name: n, description: r, categoryId: M } }
@@ -11742,7 +11748,7 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11742
11748
  or(M.updateInstitutionalTag) && d();
11743
11749
  return;
11744
11750
  }
11745
- L.invalidateQueries({ queryKey: ["categories"] }), L.invalidateQueries({ queryKey: ["allCategories"] }), L.invalidateQueries({ queryKey: ["tags"] }), L.invalidateQueries({ queryKey: ["allTagNames"] }), L.invalidateQueries({ queryKey: ["tagUsers", e._id] }), R(), S({ variant: "success", message: N.tagUpdated });
11751
+ L.invalidateQueries({ queryKey: ["categories"] }), L.invalidateQueries({ queryKey: ["allCategories"] }), L.invalidateQueries({ queryKey: ["tags"] }), L.invalidateQueries({ queryKey: ["allTagNames"] }), L.invalidateQueries({ queryKey: ["tagUsers", e._id] }), R(), S({ variant: "success", message: E.tagUpdated });
11746
11752
  },
11747
11753
  onError: () => {
11748
11754
  }
@@ -11756,15 +11762,15 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11756
11762
  onTagNameChange: i,
11757
11763
  onTagDescriptionChange: a,
11758
11764
  isCreatingCategory: f,
11759
- categoryError: m,
11765
+ categoryError: h,
11760
11766
  newCategoryName: g,
11761
11767
  newCategoryNameError: v,
11762
- filteredSuggestions: h,
11768
+ filteredSuggestions: m,
11763
11769
  categoryOptions: b,
11764
- categorySelectKey: T,
11770
+ categorySelectKey: C,
11765
11771
  defaultCategoryValue: w,
11766
- categoriesPending: C,
11767
- onCategoryChange: A,
11772
+ categoriesPending: T,
11773
+ onCategoryChange: I,
11768
11774
  onNewCategoryNameChange: x,
11769
11775
  onNewCategoryDescriptionChange: $
11770
11776
  };
@@ -11783,12 +11789,12 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11783
11789
  newCategoryName: l,
11784
11790
  newCategoryNameError: d,
11785
11791
  filteredSuggestions: f,
11786
- categoryOptions: m,
11792
+ categoryOptions: h,
11787
11793
  categorySelectKey: g,
11788
11794
  defaultCategoryValue: v,
11789
- categoriesPending: h,
11795
+ categoriesPending: m,
11790
11796
  onCategoryChange: b,
11791
- onNewCategoryNameChange: T,
11797
+ onNewCategoryNameChange: C,
11792
11798
  onNewCategoryDescriptionChange: w
11793
11799
  } = iv({
11794
11800
  submitRef: e,
@@ -11808,18 +11814,18 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11808
11814
  /* @__PURE__ */ u(
11809
11815
  Wu,
11810
11816
  {
11811
- categoryOptions: m,
11817
+ categoryOptions: h,
11812
11818
  categoryError: c,
11813
11819
  newCategoryName: l,
11814
11820
  newCategoryNameError: d,
11815
11821
  filteredSuggestions: f,
11816
11822
  isCreatingCategory: a,
11817
11823
  onCategoryChange: b,
11818
- onNewCategoryNameChange: T,
11824
+ onNewCategoryNameChange: C,
11819
11825
  onNewCategoryDescriptionChange: w,
11820
11826
  defaultCategoryValue: v,
11821
11827
  categorySelectKey: g,
11822
- categoriesPending: h
11828
+ categoriesPending: m
11823
11829
  }
11824
11830
  )
11825
11831
  ] });
@@ -11827,14 +11833,14 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11827
11833
  withBackground: !1,
11828
11834
  size: "small"
11829
11835
  }, Gu = ({ category: e }) => {
11830
- const { translations: t, resolveToken: n } = W(), { data: r = [] } = fi(), { openModal: s, closeModal: o } = Le(), { editHandler: i, archiveHandler: a, restoreHandler: c, categoryMoreButtonRef: l } = El(), { canCreate: d, canEdit: f } = Yt(), { archiveEnabled: m } = Rt(), g = y.useRef(void 0), v = (w) => w == null ? void 0 : w(e._id), h = () => {
11836
+ const { translations: t, resolveToken: n } = W(), { data: r = [] } = fi(), { openModal: s, closeModal: o } = Le(), { editHandler: i, archiveHandler: a, restoreHandler: c, categoryMoreButtonRef: l } = El(), { canCreate: d, canEdit: f } = Yt(), { archiveEnabled: h } = Rt(), g = y.useRef(void 0), v = (w) => w == null ? void 0 : w(e._id), m = () => {
11831
11837
  const w = [
11832
11838
  {
11833
11839
  label: t.edit,
11834
11840
  requiredPermissions: [$t.Edit],
11835
11841
  onClick: () => v(i)
11836
11842
  },
11837
- ...m ? [
11843
+ ...h ? [
11838
11844
  {
11839
11845
  label: t.archive,
11840
11846
  requiredPermissions: [$t.Edit],
@@ -11852,7 +11858,7 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11852
11858
  }
11853
11859
  ];
11854
11860
  return yo(w, { canEdit: f, canCreate: d });
11855
- }, T = /* @__PURE__ */ u(Wt, { renderTip: t.moreOptions, children: /* @__PURE__ */ u(
11861
+ }, C = /* @__PURE__ */ u(Wt, { renderTip: t.moreOptions, children: /* @__PURE__ */ u(
11856
11862
  Ue,
11857
11863
  {
11858
11864
  ...Do,
@@ -11876,7 +11882,7 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11876
11882
  key: "addTagToCategory",
11877
11883
  vars: { categoryName: e.name }
11878
11884
  }),
11879
- renderIcon: /* @__PURE__ */ u(Td, {}),
11885
+ renderIcon: /* @__PURE__ */ u(Cd, {}),
11880
11886
  color: "primary-inverse",
11881
11887
  onClick: () => s({
11882
11888
  heading: "newTag",
@@ -11900,15 +11906,15 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11900
11906
  gn,
11901
11907
  {
11902
11908
  label: n({ key: "categoryMenuLabel", vars: { category: e.name } }),
11903
- trigger: T,
11904
- children: h()
11909
+ trigger: C,
11910
+ children: m()
11905
11911
  }
11906
11912
  ),
11907
- f && m && e.workflowState === Me.Deleted && /* @__PURE__ */ u(
11913
+ f && h && e.workflowState === Me.Deleted && /* @__PURE__ */ u(
11908
11914
  gn,
11909
11915
  {
11910
11916
  label: n({ key: "categoryMenuLabel", vars: { category: e.name } }),
11911
- trigger: T,
11917
+ trigger: C,
11912
11918
  children: b()
11913
11919
  }
11914
11920
  )
@@ -11940,20 +11946,20 @@ const lt = (e) => e != null, Ky = 500, Qy = 5 * 60 * 1e3, fi = ({ enabled: e = !
11940
11946
  r.invalidateQueries({ queryKey: ["categories"] })
11941
11947
  ]);
11942
11948
  }, { mutate: d, isPending: f } = Be({
11943
- mutationFn: async (m) => {
11949
+ mutationFn: async (h) => {
11944
11950
  const g = await Promise.all(
11945
- m.map(
11946
- (h) => a(
11947
- Cl,
11948
- { input: { tagId: e, userId: h } }
11951
+ h.map(
11952
+ (m) => a(
11953
+ Tl,
11954
+ { input: { tagId: e, userId: m } }
11949
11955
  )
11950
11956
  )
11951
- ), v = g.filter((h) => Re(h.applyInstitutionalTag));
11957
+ ), v = g.filter((m) => Re(m.applyInstitutionalTag));
11952
11958
  if (v.length > 0)
11953
- throw new Error(`${v.length} of ${m.length} associations failed`);
11959
+ throw new Error(`${v.length} of ${h.length} associations failed`);
11954
11960
  return g;
11955
11961
  },
11956
- onSuccess: async (m, g) => {
11962
+ onSuccess: async (h, g) => {
11957
11963
  c(), s({
11958
11964
  message: i({
11959
11965
  key: "addPeopleSuccess",
@@ -11992,7 +11998,7 @@ function yi(e, t) {
11992
11998
  if (!r) return;
11993
11999
  const o = (r.getAttribute("aria-describedby") ?? "").split(" ").filter(Boolean).filter((a) => a !== n), i = t ? [...o, n] : o;
11994
12000
  i.length > 0 ? r.setAttribute("aria-describedby", i.join(" ")) : r.removeAttribute("aria-describedby");
11995
- }, [t, n]), n;
12001
+ }, [t, n, e]), n;
11996
12002
  }
11997
12003
  const ws = (e) => {
11998
12004
  const {
@@ -12003,31 +12009,31 @@ const ws = (e) => {
12003
12009
  endCursorRef: o,
12004
12010
  totalCount: i,
12005
12011
  resetKey: a
12006
- } = e, c = "endCursorRef" in e || "totalCount" in e || "resetKey" in e, [l, d] = y.useState(1), [f, m] = y.useState([]), [g, v] = y.useState(0);
12012
+ } = e, c = "endCursorRef" in e || "totalCount" in e || "resetKey" in e, [l, d] = y.useState(1), [f, h] = y.useState([]), [g, v] = y.useState(0);
12007
12013
  y.useEffect(() => {
12008
- m([]), v(0);
12014
+ h([]), v(0);
12009
12015
  }, [a]);
12010
- const h = !c && s !== void 0, b = (S) => Math.ceil((S ?? 0) / ct), T = b(i), w = T > 0 && g >= T ? T - 1 : g;
12016
+ const m = !c && s !== void 0, b = (S) => Math.ceil((S ?? 0) / ct), C = b(i), w = C > 0 && g >= C ? C - 1 : g;
12011
12017
  y.useEffect(() => {
12012
12018
  w !== g && v(w);
12013
12019
  }, [w, g]);
12014
- const C = w > 0 ? f[w - 1] ?? null : null, A = w + 1, $ = c ? A : h ? n ?? 1 : l, k = c ? b(i) : r ?? b(t == null ? void 0 : t.length), I = c ? (S) => {
12015
- if (S > A) {
12016
- const N = o == null ? void 0 : o.current;
12017
- N && (m((L) => {
12020
+ const T = w > 0 ? f[w - 1] ?? null : null, I = w + 1, $ = c ? I : m ? n ?? 1 : l, k = c ? b(i) : r ?? b(t == null ? void 0 : t.length), N = c ? (S) => {
12021
+ if (S > I) {
12022
+ const E = o == null ? void 0 : o.current;
12023
+ E && (h((L) => {
12018
12024
  const O = [...L];
12019
- return O[g] = N, O;
12025
+ return O[g] = E, O;
12020
12026
  }), v(g + 1));
12021
- } else S < A && v(S - 1);
12022
- } : h ? s : d, R = y.useMemo(() => {
12027
+ } else S < I && v(S - 1);
12028
+ } : m ? s : d, R = y.useMemo(() => {
12023
12029
  if (!t) return [];
12024
- if (h || c) return t;
12030
+ if (m || c) return t;
12025
12031
  const S = ($ - 1) * ct;
12026
12032
  return t.slice(S, S + ct);
12027
- }, [t, h, c, $]);
12028
- return { cursor: C, currentPage: $, totalPages: k, shownItems: R, handlePageChange: I, getTotalPages: b };
12033
+ }, [t, m, c, $]);
12034
+ return { cursor: T, currentPage: $, totalPages: k, shownItems: R, handlePageChange: N, getTotalPages: b };
12029
12035
  }, gv = (e) => {
12030
- var m, g, v;
12036
+ var h, g, v;
12031
12037
  const { accountId: t, executeQuery: n } = ae(), r = y.useRef(void 0), { cursor: s, currentPage: o, handlePageChange: i, getTotalPages: a } = ws({
12032
12038
  endCursorRef: r,
12033
12039
  resetKey: e
@@ -12038,10 +12044,10 @@ const ws = (e) => {
12038
12044
  first: ct,
12039
12045
  after: s ?? void 0,
12040
12046
  filter: e ? { searchTerm: e } : void 0
12041
- }).then((h) => h.account),
12047
+ }).then((m) => m.account),
12042
12048
  enabled: e.length === 0 || e.length >= 2
12043
12049
  });
12044
- return r.current = (m = c == null ? void 0 : c.usersConnection) == null ? void 0 : m.pageInfo.endCursor, {
12050
+ return r.current = (h = c == null ? void 0 : c.usersConnection) == null ? void 0 : h.pageInfo.endCursor, {
12045
12051
  users: (((g = c == null ? void 0 : c.usersConnection) == null ? void 0 : g.nodes) ?? []).filter(lt).map(zu),
12046
12052
  isPending: l,
12047
12053
  isFetching: d,
@@ -12055,18 +12061,18 @@ const ws = (e) => {
12055
12061
  /* @__PURE__ */ u(V, { $width: "140px", $height: "1rem" }),
12056
12062
  /* @__PURE__ */ u(V, { $width: "180px", $height: "0.75rem" })
12057
12063
  ] })
12058
- ] }) }, t)), mv = E.div`
12064
+ ] }) }, t)), mv = A.div`
12059
12065
  display: flex;
12060
12066
  flex-direction: column;
12061
12067
  gap: ${p.spacing.small};
12062
- `, pv = E.span`
12068
+ `, pv = A.span`
12063
12069
  display: inline-block;
12064
12070
  padding: ${p.spacing.xxSmall};
12065
- `, yv = E.span`
12071
+ `, yv = A.span`
12066
12072
  display: flex;
12067
12073
  align-items: center;
12068
12074
  gap: ${p.spacing.small};
12069
- `, vv = E.span`
12075
+ `, vv = A.span`
12070
12076
  display: flex;
12071
12077
  flex-direction: column;
12072
12078
  gap: ${p.spacing.xxxSmall};
@@ -12077,20 +12083,20 @@ const ws = (e) => {
12077
12083
  onToggleUser: r,
12078
12084
  onRemoveUser: s
12079
12085
  }) => {
12080
- const { translations: o, resolveToken: i } = W(), a = ir(5), [c, l] = y.useState(""), [d, f] = y.useState(""), [m, g] = y.useState(!1), [v, h] = y.useState(null), b = y.useRef(null), T = yi(b, t.length > 0), w = fr(), { users: C, isPending: A } = gv(d), x = C.filter((S) => !e.has(S._id));
12086
+ const { translations: o, resolveToken: i } = W(), a = ir(5), [c, l] = y.useState(""), [d, f] = y.useState(""), [h, g] = y.useState(!1), [v, m] = y.useState(null), b = y.useRef(null), C = yi(b, t.length > 0), w = fr(), { users: T, isPending: I } = gv(d), x = T.filter((S) => !e.has(S._id));
12081
12087
  y.useEffect(() => {
12082
12088
  const S = setTimeout(() => {
12083
12089
  (c.length === 0 || c.length >= 2) && f(c);
12084
12090
  }, pi);
12085
12091
  return () => clearTimeout(S);
12086
12092
  }, [c]);
12087
- const $ = (S) => t.some((N) => N._id === S), k = !A && d.length > 0 && x.length === 0, I = () => A ? hv(a) : x.length === 0 ? /* @__PURE__ */ u($e.Option, { id: "no-results", isDisabled: !0, children: o.noResultsFound }) : x.map((S) => /* @__PURE__ */ u(
12093
+ const $ = (S) => t.some((E) => E._id === S), k = !I && d.length > 0 && x.length === 0, N = () => I ? hv(a) : x.length === 0 ? /* @__PURE__ */ u($e.Option, { id: "no-results", isDisabled: !0, children: o.noResultsFound }) : x.map((S) => /* @__PURE__ */ u(
12088
12094
  $e.Option,
12089
12095
  {
12090
12096
  id: S._id,
12091
12097
  isHighlighted: v === S._id,
12092
12098
  isSelected: $(S._id),
12093
- renderAfterLabel: ({ isSelected: N }) => N ? /* @__PURE__ */ u(ac, { size: "x-small" }) : null,
12099
+ renderAfterLabel: ({ isSelected: E }) => E ? /* @__PURE__ */ u(ac, { size: "x-small" }) : null,
12094
12100
  children: /* @__PURE__ */ D(yv, { children: [
12095
12101
  /* @__PURE__ */ u(uc, { name: S.name, src: S.avatarUrl, size: "x-small" }),
12096
12102
  /* @__PURE__ */ D(vv, { children: [
@@ -12107,8 +12113,8 @@ const ws = (e) => {
12107
12113
  dismissible: !0,
12108
12114
  size: "small",
12109
12115
  margin: "0 xx-small xx-small 0",
12110
- onClick: (N) => {
12111
- N.stopPropagation(), N.preventDefault(), s(S._id), setTimeout(() => {
12116
+ onClick: (E) => {
12117
+ E.stopPropagation(), E.preventDefault(), s(S._id), setTimeout(() => {
12112
12118
  var L;
12113
12119
  return (L = b.current) == null ? void 0 : L.focus();
12114
12120
  }, 0);
@@ -12121,7 +12127,7 @@ const ws = (e) => {
12121
12127
  S._id
12122
12128
  )) }) : null;
12123
12129
  return /* @__PURE__ */ D(mv, { children: [
12124
- k && /* @__PURE__ */ u(mt, { screenReaderOnly: !0, liveRegion: _t, children: o.noResultsFound }),
12130
+ k && /* @__PURE__ */ u(mt, { screenReaderOnly: !0, liveRegion: _t, liveRegionPoliteness: "polite", children: o.noResultsFound }),
12125
12131
  /* @__PURE__ */ u(
12126
12132
  $e,
12127
12133
  {
@@ -12129,7 +12135,7 @@ const ws = (e) => {
12129
12135
  isRequired: !0,
12130
12136
  placeholder: o.searchPeople,
12131
12137
  inputValue: c,
12132
- isShowingOptions: m,
12138
+ isShowingOptions: h,
12133
12139
  renderBeforeInput: R,
12134
12140
  assistiveText: o.multiSelectFieldDescription,
12135
12141
  messages: n,
@@ -12137,25 +12143,25 @@ const ws = (e) => {
12137
12143
  b.current = S;
12138
12144
  },
12139
12145
  mountNode: w,
12140
- onInputChange: (S, N) => {
12141
- l(N), g(!0);
12146
+ onInputChange: (S, E) => {
12147
+ l(E), g(!0);
12142
12148
  },
12143
12149
  onRequestShowOptions: () => g(!0),
12144
12150
  onRequestHideOptions: () => {
12145
- g(!1), h(null);
12151
+ g(!1), m(null);
12146
12152
  },
12147
- onRequestHighlightOption: (S, { id: N }) => {
12148
- h(N ?? null);
12153
+ onRequestHighlightOption: (S, { id: E }) => {
12154
+ m(E ?? null);
12149
12155
  },
12150
- onRequestSelectOption: (S, { id: N }) => {
12151
- if (!N) return;
12152
- const L = x.find((O) => O._id === N);
12153
- L && r(L), l(""), h(null);
12156
+ onRequestSelectOption: (S, { id: E }) => {
12157
+ if (!E) return;
12158
+ const L = x.find((O) => O._id === E);
12159
+ L && r(L), l(""), m(null);
12154
12160
  },
12155
- children: I()
12161
+ children: N()
12156
12162
  }
12157
12163
  ),
12158
- t.length > 0 && /* @__PURE__ */ u(X, { id: T, size: "small", weight: "bold", children: i({
12164
+ t.length > 0 && /* @__PURE__ */ u(X, { id: C, size: "small", weight: "bold", children: i({
12159
12165
  key: "selectedPeople",
12160
12166
  count: t.length,
12161
12167
  vars: { count: t.length }
@@ -12179,7 +12185,7 @@ const ws = (e) => {
12179
12185
  i([]), s((v) => v.some((b) => b._id === g._id) ? v.filter((b) => b._id !== g._id) : [...v, g]);
12180
12186
  },
12181
12187
  onRemoveUser: (g) => {
12182
- s((v) => v.filter((h) => h._id !== g));
12188
+ s((v) => v.filter((m) => m._id !== g));
12183
12189
  }
12184
12190
  }
12185
12191
  );
@@ -12205,7 +12211,7 @@ const ws = (e) => {
12205
12211
  ]);
12206
12212
  }, { mutate: i } = Be({
12207
12213
  mutationFn: (a) => s(
12208
- Tl,
12214
+ Cl,
12209
12215
  { input: { id: a, archived: !0 } }
12210
12216
  ),
12211
12217
  onSuccess: async (a) => {
@@ -12220,7 +12226,7 @@ const ws = (e) => {
12220
12226
  }
12221
12227
  });
12222
12228
  return { archive: i };
12223
- }, Tv = (e) => {
12229
+ }, Cv = (e) => {
12224
12230
  const t = Ve(), { showAlert: n } = Pe(), { translations: r } = W(), { executeQuery: s } = ae(), o = y.useRef(void 0), i = y.useRef(void 0), a = y.useRef(!1), c = async (d) => {
12225
12231
  t.removeQueries({ queryKey: ["tags", e] }), d !== void 0 && d !== e && t.removeQueries({ queryKey: ["tags", d] }), await Promise.all([
12226
12232
  t.invalidateQueries({ queryKey: ["categories"] }),
@@ -12228,17 +12234,17 @@ const ws = (e) => {
12228
12234
  ]);
12229
12235
  }, { mutate: l } = Be({
12230
12236
  mutationFn: async (d) => {
12231
- const f = await s(Tl, { input: { id: d._id, archived: !1 } });
12237
+ const f = await s(Cl, { input: { id: d._id, archived: !1 } });
12232
12238
  if (Re(f.updateInstitutionalTagArchivedState))
12233
12239
  return f;
12234
- const m = i.current;
12235
- return m !== void 0 && m !== d.category._id && await s(
12240
+ const h = i.current;
12241
+ return h !== void 0 && h !== d.category._id && await s(
12236
12242
  ni,
12237
- { input: { id: d._id, categoryId: m } }
12243
+ { input: { id: d._id, categoryId: h } }
12238
12244
  ), f;
12239
12245
  },
12240
12246
  onSuccess: async (d, f) => {
12241
- const m = i.current, g = m !== void 0 && m !== f.category._id ? m : void 0;
12247
+ const h = i.current, g = h !== void 0 && h !== f.category._id ? h : void 0;
12242
12248
  if (Re(d.updateInstitutionalTagArchivedState)) {
12243
12249
  n({ message: r.restoreTagFailed, variant: "error" }), await c(g);
12244
12250
  return;
@@ -12251,7 +12257,7 @@ const ws = (e) => {
12251
12257
  }
12252
12258
  });
12253
12259
  return { restore: l, validateRef: o, selectedCategoryRef: i, restoreAssociationsRef: a };
12254
- }, Cv = E.div`
12260
+ }, Tv = A.div`
12255
12261
  gap: ${p.spacing.small};
12256
12262
  display: flex;
12257
12263
  flex-direction: column;
@@ -12261,11 +12267,11 @@ const ws = (e) => {
12261
12267
  }), o = y.useMemo(
12262
12268
  () => vs(r, e.currentCategoryId),
12263
12269
  [r, e.currentCategoryId]
12264
- ), [i, a] = y.useState(void 0), [c, l] = y.useState([]), d = y.useRef(null), f = yi(d, !0), m = (g) => {
12270
+ ), [i, a] = y.useState(void 0), [c, l] = y.useState([]), d = y.useRef(null), f = yi(d, !0), h = (g) => {
12265
12271
  var v;
12266
- a(g), l([]), e.selectedCategoryRef.current = g, e.selectedCategoryNameRef.current = ((v = o.find((h) => h.id === g)) == null ? void 0 : v.label) ?? "";
12272
+ a(g), l([]), e.selectedCategoryRef.current = g, e.selectedCategoryNameRef.current = ((v = o.find((m) => m.id === g)) == null ? void 0 : v.label) ?? "";
12267
12273
  };
12268
- return e.validateRef.current = () => i == null ? (l([{ type: "newError", text: t.categoryRequired }]), !1) : !0, /* @__PURE__ */ D(Cv, { children: [
12274
+ return e.validateRef.current = () => i == null ? (l([{ type: "newError", text: t.categoryRequired }]), !1) : !0, /* @__PURE__ */ D(Tv, { children: [
12269
12275
  /* @__PURE__ */ u(X, { id: f, size: "small", color: "secondary", children: n({
12270
12276
  key: "tagsSelected",
12271
12277
  count: 1,
@@ -12275,7 +12281,7 @@ const ws = (e) => {
12275
12281
  ys,
12276
12282
  {
12277
12283
  options: o,
12278
- onChange: m,
12284
+ onChange: h,
12279
12285
  placeholder: "categoryPlaceholder",
12280
12286
  label: "category",
12281
12287
  messages: c,
@@ -12287,11 +12293,11 @@ const ws = (e) => {
12287
12293
  }
12288
12294
  )
12289
12295
  ] });
12290
- }, xv = E.div`
12296
+ }, xv = A.div`
12291
12297
  gap: ${p.spacing.small};
12292
12298
  display: flex;
12293
12299
  flex-direction: column;
12294
- `, kv = E.div`
12300
+ `, kv = A.div`
12295
12301
  background-color: ${p.colors.contrasts.grey1111};
12296
12302
  border-radius: ${p.borders.radiusMedium};
12297
12303
  padding: ${p.spacing.small};
@@ -12301,10 +12307,10 @@ const ws = (e) => {
12301
12307
  }), o = y.useMemo(
12302
12308
  () => vs(r),
12303
12309
  [r]
12304
- ), [i, a] = y.useState(void 0), [c, l] = y.useState([]), [d, f] = y.useState(!1), m = (h) => {
12305
- a(h), l([]), e.selectedCategoryRef.current = h;
12306
- }, g = (h) => {
12307
- f(h.target.checked), e.restoreAssociationsRef.current = h.target.checked;
12310
+ ), [i, a] = y.useState(void 0), [c, l] = y.useState([]), [d, f] = y.useState(!1), h = (m) => {
12311
+ a(m), l([]), e.selectedCategoryRef.current = m;
12312
+ }, g = (m) => {
12313
+ f(m.target.checked), e.restoreAssociationsRef.current = m.target.checked;
12308
12314
  }, v = y.useCallback(() => i == null ? (l([{ type: "newError", text: t.restoreTagCategoryRequired }]), !1) : !0, [i, t.restoreTagCategoryRequired]);
12309
12315
  return e.validateRef.current = v, /* @__PURE__ */ D(xv, { children: [
12310
12316
  /* @__PURE__ */ u(X, { children: n({ key: "restoreTagDescription", vars: { count: e.associationsCount } }) }),
@@ -12321,7 +12327,7 @@ const ws = (e) => {
12321
12327
  ys,
12322
12328
  {
12323
12329
  options: o,
12324
- onChange: m,
12330
+ onChange: h,
12325
12331
  placeholder: "categoryPlaceholder",
12326
12332
  label: "category",
12327
12333
  messages: c,
@@ -12340,12 +12346,12 @@ const ws = (e) => {
12340
12346
  newCategoryName: l,
12341
12347
  newCategoryNameError: d,
12342
12348
  filteredSuggestions: f,
12343
- categoryOptions: m,
12349
+ categoryOptions: h,
12344
12350
  categorySelectKey: g,
12345
12351
  defaultCategoryValue: v,
12346
- categoriesPending: h,
12352
+ categoriesPending: m,
12347
12353
  onCategoryChange: b,
12348
- onNewCategoryNameChange: T,
12354
+ onNewCategoryNameChange: C,
12349
12355
  onNewCategoryDescriptionChange: w
12350
12356
  } = av({ tag: e, submitRef: t });
12351
12357
  return /* @__PURE__ */ D(gi, { children: [
@@ -12364,7 +12370,7 @@ const ws = (e) => {
12364
12370
  /* @__PURE__ */ u(
12365
12371
  Wu,
12366
12372
  {
12367
- categoryOptions: m,
12373
+ categoryOptions: h,
12368
12374
  categoryError: c,
12369
12375
  newCategoryName: l,
12370
12376
  newCategoryNameError: d,
@@ -12372,9 +12378,9 @@ const ws = (e) => {
12372
12378
  isCreatingCategory: a,
12373
12379
  defaultCategoryValue: v,
12374
12380
  categorySelectKey: g,
12375
- categoriesPending: h,
12381
+ categoriesPending: m,
12376
12382
  onCategoryChange: b,
12377
- onNewCategoryNameChange: T,
12383
+ onNewCategoryNameChange: C,
12378
12384
  onNewCategoryDescriptionChange: w
12379
12385
  }
12380
12386
  )
@@ -12417,20 +12423,20 @@ const ws = (e) => {
12417
12423
  onPageChange: a,
12418
12424
  viewTagAssociationsHandler: c
12419
12425
  }) => {
12420
- const { translations: l, resolveToken: d } = W(), { pendingMove: f } = ri(), [m, g] = y.useState(null);
12426
+ const { translations: l, resolveToken: d } = W(), { pendingMove: f } = ri(), [h, g] = y.useState(null);
12421
12427
  y.useEffect(() => {
12422
12428
  (f == null ? void 0 : f.sourceCategoryId) === e && g(f.tagId);
12423
12429
  }, [f, e]), y.useEffect(() => {
12424
- m && !(r ?? []).some((Q) => Q._id === m) && (f == null ? void 0 : f.sourceCategoryId) !== e && g(null);
12425
- }, [r, m, f, e]);
12426
- const { data: v = [] } = fi(), { isMobile: h, isTablet: b } = ar(), { categoryMoreButtonRef: T } = El(), { openModal: w, closeModal: C } = Le(), { handleMoveTag: A, validateRef: x, selectedCategoryRef: $, selectedCategoryNameRef: k } = xl(), { archive: I } = Zu(e), {
12430
+ h && !(r ?? []).some((Q) => Q._id === h) && (f == null ? void 0 : f.sourceCategoryId) !== e && g(null);
12431
+ }, [r, h, f, e]);
12432
+ const { data: v = [] } = fi(), { isMobile: m, isTablet: b } = ar(), { categoryMoreButtonRef: C } = El(), { openModal: w, closeModal: T } = Le(), { handleMoveTag: I, validateRef: x, selectedCategoryRef: $, selectedCategoryNameRef: k } = xl(), { archive: N } = Zu(e), {
12427
12433
  restore: R,
12428
12434
  validateRef: S,
12429
- selectedCategoryRef: N,
12435
+ selectedCategoryRef: E,
12430
12436
  restoreAssociationsRef: L
12431
- } = Tv(e), O = y.useRef(void 0), { handleAddPeople: z } = Hu(O), M = y.useRef(/* @__PURE__ */ new Map()), { registerTagTrigger: Y, registerTagDragHandle: B, setPendingFocus: Ce } = ti(), F = h ? 1 : b ? 2 : 3, J = ir(F * 2), Oe = (Q) => {
12437
+ } = Cv(e), O = y.useRef(void 0), { handleAddPeople: z } = Hu(O), M = y.useRef(/* @__PURE__ */ new Map()), { registerTagTrigger: Y, registerTagDragHandle: B, setPendingFocus: Te } = ti(), F = m ? 1 : b ? 2 : 3, J = ir(F * 2), Oe = (Q) => {
12432
12438
  var ee;
12433
- if (Q <= 0) return T.current;
12439
+ if (Q <= 0) return C.current;
12434
12440
  const ne = (ee = r == null ? void 0 : r[Q - 1]) == null ? void 0 : ee._id;
12435
12441
  return ne ? M.current.get(ne) ?? null : null;
12436
12442
  }, se = () => {
@@ -12444,7 +12450,7 @@ const ws = (e) => {
12444
12450
  existingTagNames: v
12445
12451
  }
12446
12452
  ),
12447
- handleClose: C,
12453
+ handleClose: T,
12448
12454
  onPrimaryClick: () => {
12449
12455
  var Q;
12450
12456
  return (Q = O.current) == null ? void 0 : Q.call(O);
@@ -12455,12 +12461,12 @@ const ws = (e) => {
12455
12461
  w({
12456
12462
  heading: "archiveTag",
12457
12463
  simpleBodyText: "archiveTagConfirmation",
12458
- handleClose: C,
12464
+ handleClose: T,
12459
12465
  primaryButtonLabel: "archiveTag",
12460
12466
  size: "small",
12461
12467
  onPrimaryClick: () => {
12462
12468
  const ee = Oe(ne);
12463
- I(Q), C(ee);
12469
+ N(Q), T(ee);
12464
12470
  }
12465
12471
  });
12466
12472
  }, te = (Q) => {
@@ -12472,24 +12478,24 @@ const ws = (e) => {
12472
12478
  {
12473
12479
  associationsCount: ne.associationsCount ?? 0,
12474
12480
  validateRef: S,
12475
- selectedCategoryRef: N,
12481
+ selectedCategoryRef: E,
12476
12482
  restoreAssociationsRef: L
12477
12483
  }
12478
12484
  ),
12479
- handleClose: C,
12485
+ handleClose: T,
12480
12486
  primaryButtonLabel: "restoreTag",
12481
12487
  secondaryButtonLabel: "cancel",
12482
12488
  size: "small",
12483
12489
  onPrimaryClick: () => {
12484
12490
  var ee;
12485
- (ee = S.current) != null && ee.call(S) && (R(ne), C());
12491
+ (ee = S.current) != null && ee.call(S) && (R(ne), T());
12486
12492
  }
12487
12493
  });
12488
12494
  }, ge = (Q) => {
12489
12495
  w({
12490
12496
  heading: "editTag",
12491
12497
  body: /* @__PURE__ */ u(Yu, { tag: Q, submitRef: O, existingTagNames: v }),
12492
- handleClose: C,
12498
+ handleClose: T,
12493
12499
  onPrimaryClick: () => {
12494
12500
  var ne;
12495
12501
  return (ne = O.current) == null ? void 0 : ne.call(O);
@@ -12507,20 +12513,20 @@ const ws = (e) => {
12507
12513
  selectedCategoryNameRef: k
12508
12514
  }
12509
12515
  ),
12510
- handleClose: C,
12516
+ handleClose: T,
12511
12517
  primaryButtonLabel: "move",
12512
12518
  secondaryButtonLabel: "cancel",
12513
12519
  size: "medium",
12514
12520
  onPrimaryClick: () => {
12515
12521
  var ne;
12516
- (ne = x.current) != null && ne.call(x) && (Ce(Q._id), A(Q), C());
12522
+ (ne = x.current) != null && ne.call(x) && (Te(Q._id), I(Q), T());
12517
12523
  }
12518
12524
  });
12519
- }, Fe = (f == null ? void 0 : f.targetCategoryId) === e && !(r ?? []).some((Q) => Q._id === (f == null ? void 0 : f.tagId)) && (i ?? 0) <= 1 && (r ?? []).length < ct, ut = !!m && !(r ?? []).some((Q) => Q._id === m), dt = () => {
12525
+ }, Fe = (f == null ? void 0 : f.targetCategoryId) === e && !(r ?? []).some((Q) => Q._id === (f == null ? void 0 : f.tagId)) && (i ?? 0) <= 1 && (r ?? []).length < ct, ut = !!h && !(r ?? []).some((Q) => Q._id === h), dt = () => {
12520
12526
  if (s)
12521
12527
  return J.map((ee) => /* @__PURE__ */ u(On, { children: /* @__PURE__ */ u(Ir, {}) }, ee));
12522
12528
  const Q = (r ?? []).map(
12523
- (ee) => ee._id === m || ee._id === (f == null ? void 0 : f.tagId) && e === (f == null ? void 0 : f.sourceCategoryId) ? /* @__PURE__ */ u(On, { children: /* @__PURE__ */ u(Ir, {}) }, ee._id) : /* @__PURE__ */ u(On, { children: /* @__PURE__ */ u(
12529
+ (ee) => ee._id === h || ee._id === (f == null ? void 0 : f.tagId) && e === (f == null ? void 0 : f.sourceCategoryId) ? /* @__PURE__ */ u(On, { children: /* @__PURE__ */ u(Ir, {}) }, ee._id) : /* @__PURE__ */ u(On, { children: /* @__PURE__ */ u(
12524
12530
  Jh,
12525
12531
  {
12526
12532
  tag: ee,
@@ -12538,7 +12544,7 @@ const ws = (e) => {
12538
12544
  ) }, ee._id)
12539
12545
  ), ne = ut ? [
12540
12546
  ...Q,
12541
- /* @__PURE__ */ u(On, { children: /* @__PURE__ */ u(Ir, {}) }, m)
12547
+ /* @__PURE__ */ u(On, { children: /* @__PURE__ */ u(Ir, {}) }, h)
12542
12548
  ] : Q;
12543
12549
  return Fe ? [
12544
12550
  ...ne,
@@ -12587,14 +12593,18 @@ const ws = (e) => {
12587
12593
  restoreHandler: c,
12588
12594
  viewTagAssociationsHandler: l
12589
12595
  }) => {
12590
- const [d, f] = y.useState(!0), { allExpanded: m } = Ol(), { registerCategoryExpandTrigger: g } = ti(), { resolveToken: v } = W();
12596
+ const [d, f] = y.useState(!0), { allExpanded: h } = Ol(), { registerCategoryExpandTrigger: g } = ti(), { resolveToken: v } = W();
12591
12597
  y.useEffect(() => {
12592
- f(m);
12593
- }, [m]), y.useEffect(
12594
- () => g(e._id, () => f(!0)),
12598
+ f(h);
12599
+ }, [h]);
12600
+ const m = y.useRef(d);
12601
+ y.useEffect(() => {
12602
+ m.current = d;
12603
+ }, [d]), y.useEffect(
12604
+ () => g(e._id, () => m.current ? !1 : (f(!0), !0)),
12595
12605
  [e._id, g]
12596
12606
  );
12597
- const h = `category-info-${e._id}`;
12607
+ const b = `category-info-${e._id}`;
12598
12608
  return /* @__PURE__ */ D(
12599
12609
  Hm,
12600
12610
  {
@@ -12603,7 +12613,7 @@ const ws = (e) => {
12603
12613
  restoreHandler: c,
12604
12614
  children: [
12605
12615
  /* @__PURE__ */ D(im, { children: [
12606
- /* @__PURE__ */ D(cm, { id: h, $isExpanded: d, children: [
12616
+ /* @__PURE__ */ D(cm, { id: b, $isExpanded: d, children: [
12607
12617
  /* @__PURE__ */ u(cv, { category: e, isExpanded: d }),
12608
12618
  /* @__PURE__ */ u(lv, { category: e, isExpanded: d })
12609
12619
  ] }),
@@ -12612,12 +12622,12 @@ const ws = (e) => {
12612
12622
  {
12613
12623
  ...Do,
12614
12624
  "aria-expanded": d,
12615
- "aria-controls": h,
12625
+ "aria-controls": b,
12616
12626
  screenReaderLabel: v({
12617
12627
  key: d ? "collapseCategory" : "expandCategory",
12618
12628
  vars: { categoryName: e.name }
12619
12629
  }),
12620
- renderIcon: d ? /* @__PURE__ */ u(Cd, {}) : /* @__PURE__ */ u(Sd, {}),
12630
+ renderIcon: d ? /* @__PURE__ */ u(Td, {}) : /* @__PURE__ */ u(Sd, {}),
12621
12631
  onClick: () => f(!d),
12622
12632
  withBorder: !1,
12623
12633
  color: "primary-inverse"
@@ -12664,7 +12674,7 @@ const ws = (e) => {
12664
12674
  i(v);
12665
12675
  }, []), f = y.useCallback(() => {
12666
12676
  c((v) => v === pt.Asc ? pt.Desc : pt.Asc);
12667
- }, []), m = o === yt.Archive ? Me.Deleted : Me.Active, g = y.useMemo(
12677
+ }, []), h = o === yt.Archive ? Me.Deleted : Me.Active, g = y.useMemo(
12668
12678
  () => ({
12669
12679
  debouncedSearch: r,
12670
12680
  handleSearchQueryChange: l,
@@ -12672,7 +12682,7 @@ const ws = (e) => {
12672
12682
  handleViewTypeChange: d,
12673
12683
  sortOrder: a,
12674
12684
  handleSortToggle: f,
12675
- tagsWorkflowState: m
12685
+ tagsWorkflowState: h
12676
12686
  }),
12677
12687
  [
12678
12688
  r,
@@ -12681,7 +12691,7 @@ const ws = (e) => {
12681
12691
  d,
12682
12692
  a,
12683
12693
  f,
12684
- m
12694
+ h
12685
12695
  ]
12686
12696
  );
12687
12697
  return /* @__PURE__ */ u(Ku.Provider, { value: g, children: e });
@@ -12718,7 +12728,7 @@ const ws = (e) => {
12718
12728
  // will get the old cursor, which can include the moved tag — causing a duplicate
12719
12729
  // across pages when the categories query later puts the tag on page 1.
12720
12730
  resetKey: (n == null ? void 0 : n.pageInfo.endCursor) ?? ""
12721
- }), d = i === null && n != null, f = !(n != null && n.pageInfo.hasNextPage), m = !(d && f), { data: g, isPending: v } = bt({
12731
+ }), d = i === null && n != null, f = !(n != null && n.pageInfo.hasNextPage), h = !(d && f), { data: g, isPending: v } = bt({
12722
12732
  queryKey: ["tags", e, i, t],
12723
12733
  queryFn: () => s(Fu, {
12724
12734
  accountId: r,
@@ -12726,20 +12736,20 @@ const ws = (e) => {
12726
12736
  first: ct,
12727
12737
  after: i ?? void 0,
12728
12738
  workflowState: t
12729
- }).then((T) => {
12739
+ }).then((C) => {
12730
12740
  var w;
12731
- return (w = T.account) == null ? void 0 : w.institutionalTagsConnection;
12741
+ return (w = C.account) == null ? void 0 : w.institutionalTagsConnection;
12732
12742
  }),
12733
- enabled: m
12743
+ enabled: h
12734
12744
  });
12735
12745
  o.current = d ? (g == null ? void 0 : g.pageInfo.endCursor) ?? n.pageInfo.endCursor : g == null ? void 0 : g.pageInfo.endCursor;
12736
- const h = (g == null ? void 0 : g.pageInfo) ?? (d ? n.pageInfo : void 0);
12746
+ const m = (g == null ? void 0 : g.pageInfo) ?? (d ? n.pageInfo : void 0);
12737
12747
  return {
12738
- tags: d && (f || v) ? n.tags : ((g == null ? void 0 : g.nodes) ?? []).filter(lt).map((T) => mi(T)),
12748
+ tags: d && (f || v) ? n.tags : ((g == null ? void 0 : g.nodes) ?? []).filter(lt).map((C) => mi(C)),
12739
12749
  isPending: d ? !1 : v,
12740
12750
  currentPage: a,
12741
- totalPages: l(h == null ? void 0 : h.totalCount),
12742
- totalTagCount: (h == null ? void 0 : h.totalCount) ?? 0,
12751
+ totalPages: l(m == null ? void 0 : m.totalCount),
12752
+ totalTagCount: (m == null ? void 0 : m.totalCount) ?? 0,
12743
12753
  handlePageChange: c
12744
12754
  };
12745
12755
  }, Mv = () => {
@@ -12761,18 +12771,18 @@ const ws = (e) => {
12761
12771
  category: e,
12762
12772
  submitRef: t
12763
12773
  }) => {
12764
- const { categoryAutocomplete: n } = Rt(), [r, s] = y.useState(e.name), [o, i] = y.useState(e.description ?? ""), [a, c] = y.useState([]), { translations: l } = W(), { closeModal: d } = Le(), { showAlert: f } = Pe(), m = Ve(), { executeQuery: g } = ae(), { data: v = [] } = gr({ enabled: n }), h = y.useMemo(
12774
+ const { categoryAutocomplete: n } = Rt(), [r, s] = y.useState(e.name), [o, i] = y.useState(e.description ?? ""), [a, c] = y.useState([]), { translations: l } = W(), { closeModal: d } = Le(), { showAlert: f } = Pe(), h = Ve(), { executeQuery: g } = ae(), { data: v = [] } = gr({ enabled: n }), m = y.useMemo(
12765
12775
  () => v.filter((x) => x._id !== e._id).map((x) => ({ id: x._id, label: x.name })),
12766
12776
  [v, e._id]
12767
12777
  ), b = y.useMemo(() => {
12768
12778
  if (!n) return [];
12769
12779
  const x = r.trim().toLowerCase();
12770
- return x ? h.filter(($) => $.label.toLowerCase().includes(x)) : h;
12771
- }, [n, h, r]), T = (x) => h.some(($) => $.label.toLowerCase() === x.trim().toLowerCase()), w = (x) => {
12772
- s(x), x.trim() && T(x) ? c([{ type: "newError", text: l.categoryNameAlreadyExists }]) : x.trim() ? c([]) : a.some(($) => $.text === l.categoryNameAlreadyExists) && c([]);
12773
- }, C = (x) => {
12780
+ return x ? m.filter(($) => $.label.toLowerCase().includes(x)) : m;
12781
+ }, [n, m, r]), C = (x) => m.some(($) => $.label.toLowerCase() === x.trim().toLowerCase()), w = (x) => {
12782
+ s(x), x.trim() && C(x) ? c([{ type: "newError", text: l.categoryNameAlreadyExists }]) : x.trim() ? c([]) : a.some(($) => $.text === l.categoryNameAlreadyExists) && c([]);
12783
+ }, T = (x) => {
12774
12784
  i(x);
12775
- }, { mutate: A } = Be({
12785
+ }, { mutate: I } = Be({
12776
12786
  mutationFn: () => g(bm, {
12777
12787
  input: { id: e._id, name: r.trim(), description: o.trim() }
12778
12788
  }),
@@ -12781,7 +12791,7 @@ const ws = (e) => {
12781
12791
  or(x.updateInstitutionalTagCategory) && c([{ type: "newError", text: l.categoryNameAlreadyExists }]);
12782
12792
  return;
12783
12793
  }
12784
- m.invalidateQueries({ queryKey: ["categories"] }), m.invalidateQueries({ queryKey: ["allCategories"] }), d(), f({ variant: "success", message: l.categoryUpdated });
12794
+ h.invalidateQueries({ queryKey: ["categories"] }), h.invalidateQueries({ queryKey: ["allCategories"] }), d(), f({ variant: "success", message: l.categoryUpdated });
12785
12795
  },
12786
12796
  onError: () => {
12787
12797
  f({ variant: "error", message: l.saveCategoryFailed });
@@ -12792,8 +12802,8 @@ const ws = (e) => {
12792
12802
  c([{ type: "newError", text: l.categoryNameRequired }]);
12793
12803
  return;
12794
12804
  }
12795
- A();
12796
- }, { name: r, nameError: a, filteredSuggestions: b, onNameChange: w, onDescriptionChange: C };
12805
+ I();
12806
+ }, { name: r, nameError: a, filteredSuggestions: b, onNameChange: w, onDescriptionChange: T };
12797
12807
  }, Pv = ({ category: e, submitRef: t }) => {
12798
12808
  const { translations: n } = W(), { name: r, nameError: s, filteredSuggestions: o, onNameChange: i, onDescriptionChange: a } = Rv({
12799
12809
  category: e,
@@ -12828,11 +12838,11 @@ const ws = (e) => {
12828
12838
  ]
12829
12839
  }
12830
12840
  ) });
12831
- }, Lv = E.div`
12841
+ }, Lv = A.div`
12832
12842
  gap: ${p.spacing.small};
12833
12843
  display: flex;
12834
12844
  flex-direction: column;
12835
- `, Fv = E.div`
12845
+ `, Fv = A.div`
12836
12846
  background-color: ${p.colors.contrasts.grey1111};
12837
12847
  border-radius: ${p.borders.radiusMedium};
12838
12848
  padding: ${p.spacing.small};
@@ -12859,35 +12869,35 @@ const ws = (e) => {
12859
12869
  initialTagsData: t,
12860
12870
  viewTagAssociationsHandler: n
12861
12871
  }) => {
12862
- const { tagsWorkflowState: r } = vi(), { tags: s, isPending: o, currentPage: i, totalPages: a, totalTagCount: c, handlePageChange: l } = $v(e._id, r, t), { openModal: d, closeModal: f } = Le(), { archive: m } = Dv(), { restore: g, restoreAssociationsRef: v } = Mv(), h = y.useRef(void 0), b = () => {
12872
+ const { tagsWorkflowState: r } = vi(), { tags: s, isPending: o, currentPage: i, totalPages: a, totalTagCount: c, handlePageChange: l } = $v(e._id, r, t), { openModal: d, closeModal: f } = Le(), { archive: h } = Dv(), { restore: g, restoreAssociationsRef: v } = Mv(), m = y.useRef(void 0), b = () => {
12863
12873
  d({
12864
12874
  heading: "editCategory",
12865
- body: /* @__PURE__ */ u(Pv, { category: e, submitRef: h }),
12875
+ body: /* @__PURE__ */ u(Pv, { category: e, submitRef: m }),
12866
12876
  handleClose: f,
12867
12877
  onPrimaryClick: () => {
12868
- var C;
12869
- return (C = h.current) == null ? void 0 : C.call(h);
12878
+ var T;
12879
+ return (T = m.current) == null ? void 0 : T.call(m);
12870
12880
  }
12871
12881
  });
12872
- }, T = (C, A) => {
12882
+ }, C = (T, I) => {
12873
12883
  d({
12874
12884
  heading: "archive",
12875
12885
  simpleBodyText: "archiveCategoryConfirmation",
12876
- handleClose: () => f(A),
12886
+ handleClose: () => f(I),
12877
12887
  primaryButtonLabel: "archive",
12878
12888
  size: "small",
12879
12889
  onPrimaryClick: () => {
12880
- m(C), f(A);
12890
+ h(T), f(I);
12881
12891
  }
12882
12892
  });
12883
- }, w = (C, A) => {
12893
+ }, w = (T, I) => {
12884
12894
  v.current = !1, d({
12885
12895
  heading: "restoreCategory",
12886
12896
  body: /* @__PURE__ */ u(_v, { restoreAssociationsRef: v }),
12887
- handleClose: () => f(A),
12897
+ handleClose: () => f(I),
12888
12898
  primaryButtonLabel: "restoreCategory",
12889
12899
  onPrimaryClick: () => {
12890
- g(C), f(A);
12900
+ g(T), f(I);
12891
12901
  }
12892
12902
  });
12893
12903
  };
@@ -12901,7 +12911,7 @@ const ws = (e) => {
12901
12911
  totalPages: a,
12902
12912
  onPageChange: l,
12903
12913
  editHandler: b,
12904
- archiveHandler: T,
12914
+ archiveHandler: C,
12905
12915
  restoreHandler: w,
12906
12916
  viewTagAssociationsHandler: n
12907
12917
  }
@@ -12937,8 +12947,8 @@ const ws = (e) => {
12937
12947
  onPageChange: c,
12938
12948
  viewTagAssociationsHandler: l
12939
12949
  }) => {
12940
- const { translations: d, resolveToken: f } = W(), m = ir(4);
12941
- return n ? /* @__PURE__ */ u(yl, { children: m.map((g) => /* @__PURE__ */ u(Il, {}, g)) }) : s ? /* @__PURE__ */ u(mt, { variant: "error", margin: "medium", children: f({
12950
+ const { translations: d, resolveToken: f } = W(), h = ir(4);
12951
+ return n ? /* @__PURE__ */ u(yl, { children: h.map((g) => /* @__PURE__ */ u(Il, {}, g)) }) : s ? /* @__PURE__ */ u(mt, { variant: "error", margin: "medium", children: f({
12942
12952
  key: "loadCategories",
12943
12953
  vars: { errorMessage: (o == null ? void 0 : o.message) ?? "Unknown error" }
12944
12954
  }) }) : /* @__PURE__ */ D(km, { children: [
@@ -13116,56 +13126,56 @@ function Jv() {
13116
13126
  Ja = 1;
13117
13127
  var e = Qu(), t = Bv(), n = Xv(), r = "Expected a function", s = Math.max, o = Math.min;
13118
13128
  function i(a, c, l) {
13119
- var d, f, m, g, v, h, b = 0, T = !1, w = !1, C = !0;
13129
+ var d, f, h, g, v, m, b = 0, C = !1, w = !1, T = !0;
13120
13130
  if (typeof a != "function")
13121
13131
  throw new TypeError(r);
13122
- c = n(c) || 0, e(l) && (T = !!l.leading, w = "maxWait" in l, m = w ? s(n(l.maxWait) || 0, c) : m, C = "trailing" in l ? !!l.trailing : C);
13123
- function A(O) {
13132
+ c = n(c) || 0, e(l) && (C = !!l.leading, w = "maxWait" in l, h = w ? s(n(l.maxWait) || 0, c) : h, T = "trailing" in l ? !!l.trailing : T);
13133
+ function I(O) {
13124
13134
  var z = d, M = f;
13125
13135
  return d = f = void 0, b = O, g = a.apply(M, z), g;
13126
13136
  }
13127
13137
  function x(O) {
13128
- return b = O, v = setTimeout(I, c), T ? A(O) : g;
13138
+ return b = O, v = setTimeout(N, c), C ? I(O) : g;
13129
13139
  }
13130
13140
  function $(O) {
13131
- var z = O - h, M = O - b, Y = c - z;
13132
- return w ? o(Y, m - M) : Y;
13141
+ var z = O - m, M = O - b, Y = c - z;
13142
+ return w ? o(Y, h - M) : Y;
13133
13143
  }
13134
13144
  function k(O) {
13135
- var z = O - h, M = O - b;
13136
- return h === void 0 || z >= c || z < 0 || w && M >= m;
13145
+ var z = O - m, M = O - b;
13146
+ return m === void 0 || z >= c || z < 0 || w && M >= h;
13137
13147
  }
13138
- function I() {
13148
+ function N() {
13139
13149
  var O = t();
13140
13150
  if (k(O))
13141
13151
  return R(O);
13142
- v = setTimeout(I, $(O));
13152
+ v = setTimeout(N, $(O));
13143
13153
  }
13144
13154
  function R(O) {
13145
- return v = void 0, C && d ? A(O) : (d = f = void 0, g);
13155
+ return v = void 0, T && d ? I(O) : (d = f = void 0, g);
13146
13156
  }
13147
13157
  function S() {
13148
- v !== void 0 && clearTimeout(v), b = 0, d = h = f = v = void 0;
13158
+ v !== void 0 && clearTimeout(v), b = 0, d = m = f = v = void 0;
13149
13159
  }
13150
- function N() {
13160
+ function E() {
13151
13161
  return v === void 0 ? g : R(t());
13152
13162
  }
13153
13163
  function L() {
13154
13164
  var O = t(), z = k(O);
13155
- if (d = arguments, f = this, h = O, z) {
13165
+ if (d = arguments, f = this, m = O, z) {
13156
13166
  if (v === void 0)
13157
- return x(h);
13167
+ return x(m);
13158
13168
  if (w)
13159
- return clearTimeout(v), v = setTimeout(I, c), A(h);
13169
+ return clearTimeout(v), v = setTimeout(N, c), I(m);
13160
13170
  }
13161
- return v === void 0 && (v = setTimeout(I, c)), g;
13171
+ return v === void 0 && (v = setTimeout(N, c)), g;
13162
13172
  }
13163
- return L.cancel = S, L.flush = N, L;
13173
+ return L.cancel = S, L.flush = E, L;
13164
13174
  }
13165
13175
  return no = i, no;
13166
13176
  }
13167
13177
  var ew = Jv();
13168
- const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13178
+ const tw = /* @__PURE__ */ zv(ew), ec = A.div`
13169
13179
  container-type: inline-size;
13170
13180
  container-name: ${Qn};
13171
13181
  `, nw = ({
@@ -13198,20 +13208,20 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13198
13208
  [r]
13199
13209
  );
13200
13210
  return e ? /* @__PURE__ */ u(ec, { id: Qn, children: t }) : /* @__PURE__ */ u(ec, { id: Qn, ref: n, children: /* @__PURE__ */ u($l.Provider, { value: i, children: t }) });
13201
- }, rw = E.div`
13211
+ }, rw = A.div`
13202
13212
  display: flex;
13203
13213
  flex-direction: row;
13204
13214
  justify-content: space-between;
13205
13215
  align-items: center;
13206
13216
 
13207
- `, sw = E.div`
13217
+ `, sw = A.div`
13208
13218
  display: flex;
13209
13219
  flex-direction: row;
13210
13220
  justify-content: flex-end;
13211
13221
  align-items: center;
13212
13222
  gap: ${p.spacing.small};
13213
13223
  padding: ${p.spacing.small};
13214
- `, ow = E.div``, iw = ({
13224
+ `, ow = A.div``, iw = ({
13215
13225
  onPrimaryClick: e,
13216
13226
  primaryButton: t,
13217
13227
  primaryButtonLabel: n,
@@ -13224,13 +13234,13 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13224
13234
  footerProps: l,
13225
13235
  ...d
13226
13236
  }) => {
13227
- const { translations: f, resolveToken: m } = W(), g = m(i), v = y.useRef(null), h = y.useRef(null), b = y.useCallback(() => h.current, []), T = Od() ? void 0 : b, w = () => {
13237
+ const { translations: f, resolveToken: h } = W(), g = h(i), v = y.useRef(null), m = y.useRef(null), b = y.useCallback(() => m.current, []), C = Od() ? void 0 : b, w = () => {
13228
13238
  setTimeout(() => {
13229
- var A, x;
13230
- (x = (A = v.current) == null ? void 0 : A.querySelector('[aria-invalid="true"]')) == null || x.focus();
13239
+ var I, x;
13240
+ (x = (I = v.current) == null ? void 0 : I.querySelector('[aria-invalid="true"]')) == null || x.focus();
13231
13241
  }, 0);
13232
- }, C = () => "simpleBodyText" in d ? /* @__PURE__ */ u(X, { ...d.simpleBodyTextProps, children: m(d.simpleBodyText) }) : "body" in d ? d.body : null;
13233
- return /* @__PURE__ */ u(Xy, { value: T, children: /* @__PURE__ */ D(
13242
+ }, T = () => "simpleBodyText" in d ? /* @__PURE__ */ u(X, { ...d.simpleBodyTextProps, children: h(d.simpleBodyText) }) : "body" in d ? d.body : null;
13243
+ return /* @__PURE__ */ u(Xy, { value: C, children: /* @__PURE__ */ D(
13234
13244
  vr,
13235
13245
  {
13236
13246
  open: !0,
@@ -13255,10 +13265,10 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13255
13265
  vr.Body,
13256
13266
  {
13257
13267
  ...c,
13258
- elementRef: (A) => {
13259
- v.current = A;
13268
+ elementRef: (I) => {
13269
+ v.current = I;
13260
13270
  },
13261
- children: C()
13271
+ children: T()
13262
13272
  }
13263
13273
  ),
13264
13274
  /* @__PURE__ */ u(vr.Footer, { ...l, children: /* @__PURE__ */ D(sw, { children: [
@@ -13268,7 +13278,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13268
13278
  color: "secondary",
13269
13279
  onClick: (r == null ? void 0 : r.onClick) ?? o,
13270
13280
  ...r,
13271
- children: m(s ?? "cancel")
13281
+ children: h(s ?? "cancel")
13272
13282
  }
13273
13283
  ),
13274
13284
  /* @__PURE__ */ u(
@@ -13276,14 +13286,14 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13276
13286
  {
13277
13287
  color: "primary",
13278
13288
  ...t,
13279
- onClick: (A) => {
13280
- e == null || e(A), w();
13289
+ onClick: (I) => {
13290
+ e == null || e(I), w();
13281
13291
  },
13282
- children: m(n ?? "save")
13292
+ children: h(n ?? "save")
13283
13293
  }
13284
13294
  )
13285
13295
  ] }) }),
13286
- /* @__PURE__ */ u(ow, { ref: h })
13296
+ /* @__PURE__ */ u(ow, { ref: m })
13287
13297
  ]
13288
13298
  }
13289
13299
  ) });
@@ -13299,7 +13309,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13299
13309
  e,
13300
13310
  t && /* @__PURE__ */ u(iw, { ...t })
13301
13311
  ] });
13302
- }, ed = (e) => /* @__PURE__ */ u(Ad, { theme: { ...p }, children: /* @__PURE__ */ u(Fd, { translations: gc, translate: mc, children: /* @__PURE__ */ u(Vh, { children: /* @__PURE__ */ u(nw, { children: /* @__PURE__ */ u(og, { children: /* @__PURE__ */ u(aw, { children: e.children }) }) }) }) }) }), cw = E.div`
13312
+ }, ed = (e) => /* @__PURE__ */ u(Ad, { theme: { ...p }, children: /* @__PURE__ */ u(Fd, { translations: gc, translate: mc, children: /* @__PURE__ */ u(Vh, { children: /* @__PURE__ */ u(nw, { children: /* @__PURE__ */ u(og, { children: /* @__PURE__ */ u(aw, { children: e.children }) }) }) }) }) }), cw = A.div`
13303
13313
  display: flex;
13304
13314
  flex-direction: column;
13305
13315
  gap: ${p.spacing.mediumSmall};
@@ -13325,26 +13335,26 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13325
13335
  const { categoryAutocomplete: t } = Rt(), { data: n = [] } = gr({ enabled: t }), r = y.useMemo(
13326
13336
  () => vs(n),
13327
13337
  [n]
13328
- ), { translations: s } = W(), { showAlert: o } = Pe(), [i, a] = y.useState(""), [c, l] = y.useState(""), [d, f] = y.useState(ro), m = () => {
13338
+ ), { translations: s } = W(), { showAlert: o } = Pe(), [i, a] = y.useState(""), [c, l] = y.useState(""), [d, f] = y.useState(ro), h = () => {
13329
13339
  a(""), l(""), f(ro), e();
13330
13340
  }, { create: g, isPending: v } = lw({
13331
- onSuccess: m,
13332
- onError: (C) => {
13333
- or(C) ? f([{ text: s.categoryNameAlreadyExists, type: "newError" }]) : o({ message: s.saveCategoryFailed, variant: "error" });
13341
+ onSuccess: h,
13342
+ onError: (T) => {
13343
+ or(T) ? f([{ text: s.categoryNameAlreadyExists, type: "newError" }]) : o({ message: s.saveCategoryFailed, variant: "error" });
13334
13344
  }
13335
- }), h = (C) => r.some((A) => A.label.trim().toLowerCase() === C.trim().toLowerCase()), b = (C) => {
13336
- a(C), C.trim() && h(C) ? f([{ type: "newError", text: s.categoryNameAlreadyExists }]) : f(ro);
13337
- }, T = y.useMemo(() => {
13345
+ }), m = (T) => r.some((I) => I.label.trim().toLowerCase() === T.trim().toLowerCase()), b = (T) => {
13346
+ a(T), T.trim() && m(T) ? f([{ type: "newError", text: s.categoryNameAlreadyExists }]) : f(ro);
13347
+ }, C = y.useMemo(() => {
13338
13348
  if (!t) return uw;
13339
- const C = i.trim().toLowerCase();
13340
- return C ? r.filter((A) => A.label.toLowerCase().includes(C)) : r;
13349
+ const T = i.trim().toLowerCase();
13350
+ return T ? r.filter((I) => I.label.toLowerCase().includes(T)) : r;
13341
13351
  }, [t, r, i]);
13342
13352
  return {
13343
13353
  name: i,
13344
13354
  description: c,
13345
13355
  nameErrors: d,
13346
- filteredSuggestions: T,
13347
- onClose: m,
13356
+ filteredSuggestions: C,
13357
+ onClose: h,
13348
13358
  onNameChange: b,
13349
13359
  onDescriptionChange: l,
13350
13360
  onSave: () => {
@@ -13353,7 +13363,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13353
13363
  f([{ text: s.categoryNameRequired, type: "newError" }]);
13354
13364
  return;
13355
13365
  }
13356
- if (h(i.trim())) {
13366
+ if (m(i.trim())) {
13357
13367
  f([{ type: "newError", text: s.categoryNameAlreadyExists }]);
13358
13368
  return;
13359
13369
  }
@@ -13395,7 +13405,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13395
13405
  }
13396
13406
  )
13397
13407
  ] });
13398
- }, gw = E.div`
13408
+ }, gw = A.div`
13399
13409
  display: flex;
13400
13410
  flex-direction: row;
13401
13411
  align-items: center;
@@ -13408,7 +13418,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13408
13418
  @container (max-width: ${p.breakpoints.medium}) {
13409
13419
  flex-direction: column;
13410
13420
  }
13411
- `, hw = E.div`
13421
+ `, hw = A.div`
13412
13422
  display: flex;
13413
13423
  flex-direction: row;
13414
13424
  flex: 2;
@@ -13422,7 +13432,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13422
13432
  span[class*='-formFieldLayout__label'] {
13423
13433
  padding: 0;
13424
13434
  }
13425
- `, mw = E.div`
13435
+ `, mw = A.div`
13426
13436
  display: flex;
13427
13437
  flex-direction: row;
13428
13438
  flex: 3;
@@ -13436,14 +13446,14 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13436
13446
  flex: 1;
13437
13447
  text-align: center;
13438
13448
  }
13439
- `, pw = E.div`
13449
+ `, pw = A.div`
13440
13450
  padding: ${p.spacing.small} ${p.spacing.mediumSmall};
13441
13451
  text-align: center;
13442
- `, yw = E.hr`
13452
+ `, yw = A.hr`
13443
13453
  border: none;
13444
13454
  border-top: ${p.borders.widthSmall} solid ${p.colors.contrasts.grey1214};
13445
13455
  width: 100%;
13446
- `, vw = E.div`
13456
+ `, vw = A.div`
13447
13457
  display: flex;
13448
13458
  flex-direction: row;
13449
13459
  gap: ${p.spacing.xSmall};
@@ -13460,36 +13470,36 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13460
13470
  handleSearchQueryChange: l,
13461
13471
  selectedView: d,
13462
13472
  handleViewTypeChange: f,
13463
- sortOrder: m,
13473
+ sortOrder: h,
13464
13474
  handleSortToggle: g
13465
- } = vi(), [v, h] = y.useState(""), { openModal: b, closeModal: T } = Le(), w = y.useRef(void 0), C = () => {
13475
+ } = vi(), [v, m] = y.useState(""), { openModal: b, closeModal: C } = Le(), w = y.useRef(void 0), T = () => {
13466
13476
  b({
13467
13477
  heading: "newCategory",
13468
13478
  size: "small",
13469
13479
  body: /* @__PURE__ */ u(fw, { submitRef: w }),
13470
- handleClose: T,
13480
+ handleClose: C,
13471
13481
  onPrimaryClick: () => {
13472
13482
  var M;
13473
13483
  return (M = w.current) == null ? void 0 : M.call(w);
13474
13484
  }
13475
13485
  });
13476
- }, A = y.useRef(null), [x, $] = y.useState(""), [k, I] = y.useState(""), [R, S] = y.useState(""), N = (M) => {
13486
+ }, I = y.useRef(null), [x, $] = y.useState(""), [k, N] = y.useState(""), [R, S] = y.useState(""), E = (M) => {
13477
13487
  f(M), S(
13478
13488
  M === yt.Archive ? n.viewingArchivedCategories : n.viewingActiveCategories
13479
13489
  );
13480
13490
  }, L = () => {
13481
13491
  g(), $(
13482
- m === pt.Asc ? n.categoriesSortedDescending : n.categoriesSortedAscending
13492
+ h === pt.Asc ? n.categoriesSortedDescending : n.categoriesSortedAscending
13483
13493
  );
13484
13494
  }, O = () => {
13485
- i(), I(o ? n.allCategoriesCollapsed : n.allCategoriesExpanded);
13495
+ i(), N(o ? n.allCategoriesCollapsed : n.allCategoriesExpanded);
13486
13496
  }, z = !!v && !t && e === 0;
13487
13497
  return /* @__PURE__ */ D(Bn, { children: [
13488
13498
  /* @__PURE__ */ D(gw, { role: "group", "aria-label": n.searchAndFilter, children: [
13489
- v && /* @__PURE__ */ u(mt, { screenReaderOnly: !0, liveRegion: _t, children: t ? n.loadingData : r({ key: "searchResults", vars: { resultCount: e } }) }),
13490
- x && /* @__PURE__ */ u(mt, { screenReaderOnly: !0, liveRegion: _t, children: x }),
13491
- k && /* @__PURE__ */ u(mt, { screenReaderOnly: !0, liveRegion: _t, children: k }),
13492
- R && /* @__PURE__ */ u(mt, { screenReaderOnly: !0, liveRegion: _t, children: R }),
13499
+ v && /* @__PURE__ */ u(mt, { screenReaderOnly: !0, liveRegion: _t, liveRegionPoliteness: "polite", children: t ? n.loadingData : r({ key: "searchResults", vars: { resultCount: e } }) }),
13500
+ x && /* @__PURE__ */ u(mt, { screenReaderOnly: !0, liveRegion: _t, liveRegionPoliteness: "polite", children: x }),
13501
+ k && /* @__PURE__ */ u(mt, { screenReaderOnly: !0, liveRegion: _t, liveRegionPoliteness: "polite", children: k }),
13502
+ R && /* @__PURE__ */ u(mt, { screenReaderOnly: !0, liveRegion: _t, liveRegionPoliteness: "polite", children: R }),
13493
13503
  c && /* @__PURE__ */ u(hw, { children: /* @__PURE__ */ u(
13494
13504
  ys,
13495
13505
  {
@@ -13498,7 +13508,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13498
13508
  isInline: !s,
13499
13509
  isRequired: !1,
13500
13510
  value: d,
13501
- onChange: N,
13511
+ onChange: E,
13502
13512
  options: [
13503
13513
  { id: yt.Active, label: n.active },
13504
13514
  { id: yt.Archive, label: n.archive }
@@ -13524,16 +13534,16 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13524
13534
  withBorder: !1,
13525
13535
  onClick: () => {
13526
13536
  var M;
13527
- h(""), l(""), (M = A.current) == null || M.focus();
13537
+ m(""), l(""), (M = I.current) == null || M.focus();
13528
13538
  }
13529
13539
  }
13530
13540
  ) : void 0,
13531
13541
  value: v,
13532
13542
  onChange: (M, Y) => {
13533
- h(Y), l(Y);
13543
+ m(Y), l(Y);
13534
13544
  },
13535
13545
  inputRef: (M) => {
13536
- A.current = M;
13546
+ I.current = M;
13537
13547
  },
13538
13548
  "aria-describedby": tc,
13539
13549
  shouldNotWrap: !0
@@ -13543,8 +13553,8 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13543
13553
  Ue,
13544
13554
  {
13545
13555
  size: "small",
13546
- renderIcon: m === pt.Asc ? /* @__PURE__ */ u(xd, {}) : /* @__PURE__ */ u(kd, {}),
13547
- screenReaderLabel: m === pt.Asc ? n.sortCategoriesDescending : n.sortCategoriesAscending,
13556
+ renderIcon: h === pt.Asc ? /* @__PURE__ */ u(xd, {}) : /* @__PURE__ */ u(kd, {}),
13557
+ screenReaderLabel: h === pt.Asc ? n.sortCategoriesDescending : n.sortCategoriesAscending,
13548
13558
  onClick: L
13549
13559
  }
13550
13560
  ) })
@@ -13558,7 +13568,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13558
13568
  color: "primary",
13559
13569
  size: "small",
13560
13570
  renderIcon: /* @__PURE__ */ u(Id, {}),
13561
- onClick: C,
13571
+ onClick: T,
13562
13572
  display: "inline-block",
13563
13573
  children: n.newCategory
13564
13574
  }
@@ -13570,11 +13580,11 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13570
13580
  }, bw = {
13571
13581
  [yt.Active]: Me.Active,
13572
13582
  [yt.Archive]: Me.Deleted
13573
- }, Tw = () => {
13574
- const { debouncedSearch: e, selectedView: t, sortOrder: n, tagsWorkflowState: r } = vi(), s = y.useRef(void 0), { accountId: o, executeQuery: i } = ae(), a = bw[t], c = t === yt.Archive, l = c ? Me.Any : Me.Active, d = c ? Me.Deleted : void 0, { cursor: f, currentPage: m, handlePageChange: g, getTotalPages: v } = ws({
13583
+ }, Cw = () => {
13584
+ const { debouncedSearch: e, selectedView: t, sortOrder: n, tagsWorkflowState: r } = vi(), s = y.useRef(void 0), { accountId: o, executeQuery: i } = ae(), a = bw[t], c = t === yt.Archive, l = c ? Me.Any : Me.Active, d = c ? Me.Deleted : void 0, { cursor: f, currentPage: h, handlePageChange: g, getTotalPages: v } = ws({
13575
13585
  endCursorRef: s,
13576
13586
  resetKey: `${e}:${a}`
13577
- }), { data: h, isPending: b, isFetching: T, isError: w, error: C } = bt({
13587
+ }), { data: m, isPending: b, isFetching: C, isError: w, error: T } = bt({
13578
13588
  queryKey: ["categories", f, e, a],
13579
13589
  queryFn: () => i(
13580
13590
  Lu,
@@ -13588,38 +13598,38 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13588
13598
  tagsFirst: ct,
13589
13599
  tagsWorkflowState: r
13590
13600
  }
13591
- ).then((I) => {
13601
+ ).then((N) => {
13592
13602
  var R;
13593
- return (R = I.account) == null ? void 0 : R.institutionalTagCategoriesConnection;
13603
+ return (R = N.account) == null ? void 0 : R.institutionalTagCategoriesConnection;
13594
13604
  })
13595
13605
  });
13596
- s.current = h == null ? void 0 : h.pageInfo.endCursor;
13597
- const A = ((h == null ? void 0 : h.nodes) ?? []).filter(lt), x = Object.fromEntries(
13598
- A.map((I) => [I._id, rv(I)])
13606
+ s.current = m == null ? void 0 : m.pageInfo.endCursor;
13607
+ const I = ((m == null ? void 0 : m.nodes) ?? []).filter(lt), x = Object.fromEntries(
13608
+ I.map((N) => [N._id, rv(N)])
13599
13609
  );
13600
13610
  return {
13601
- shownCategories: [...((h == null ? void 0 : h.nodes) ?? []).filter(
13602
- (I) => I != null
13603
- )].sort((I, R) => {
13604
- const S = I.name.localeCompare(R.name);
13611
+ shownCategories: [...((m == null ? void 0 : m.nodes) ?? []).filter(
13612
+ (N) => N != null
13613
+ )].sort((N, R) => {
13614
+ const S = N.name.localeCompare(R.name);
13605
13615
  return n === pt.Asc ? S : -S;
13606
13616
  }),
13607
13617
  categoryTagsMap: x,
13608
13618
  isPending: b,
13609
- isFetching: T,
13619
+ isFetching: C,
13610
13620
  isError: w,
13611
- error: C,
13612
- currentPage: m,
13613
- totalPages: v(h == null ? void 0 : h.pageInfo.totalCount),
13621
+ error: T,
13622
+ currentPage: h,
13623
+ totalPages: v(m == null ? void 0 : m.pageInfo.totalCount),
13614
13624
  handlePageChange: g,
13615
- searchResultCount: (h == null ? void 0 : h.pageInfo.totalCount) ?? 0
13625
+ searchResultCount: (m == null ? void 0 : m.pageInfo.totalCount) ?? 0
13616
13626
  };
13617
- }, Cw = (e, t, n) => {
13618
- var b, T, w, C;
13627
+ }, Tw = (e, t, n) => {
13628
+ var b, C, w, T;
13619
13629
  const { executeQuery: r } = ae(), s = y.useRef(void 0), { cursor: o, currentPage: i, handlePageChange: a, getTotalPages: c } = ws({
13620
13630
  endCursorRef: s,
13621
13631
  resetKey: `${e}-${(t == null ? void 0 : t.field) ?? "none"}-${(t == null ? void 0 : t.direction) ?? "none"}-${n ?? ""}`
13622
- }), { data: l, isPending: d, isFetching: f, isError: m } = bt({
13632
+ }), { data: l, isPending: d, isFetching: f, isError: h } = bt({
13623
13633
  queryKey: ["tagUsers", e, o, t, n],
13624
13634
  queryFn: () => r(
13625
13635
  _u,
@@ -13630,21 +13640,21 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13630
13640
  sort: t,
13631
13641
  filter: n ? { searchTerm: n } : void 0
13632
13642
  }
13633
- ).then((A) => A.institutionalTag)
13643
+ ).then((I) => I.institutionalTag)
13634
13644
  });
13635
13645
  s.current = (b = l == null ? void 0 : l.usersConnection) == null ? void 0 : b.pageInfo.endCursor;
13636
13646
  const g = l ? tv(l) : void 0, v = y.useRef(g);
13637
13647
  g && (v.current = g);
13638
- const h = (((T = l == null ? void 0 : l.usersConnection) == null ? void 0 : T.nodes) ?? []).filter(lt).map(zu);
13648
+ const m = (((C = l == null ? void 0 : l.usersConnection) == null ? void 0 : C.nodes) ?? []).filter(lt).map(zu);
13639
13649
  return {
13640
13650
  tag: v.current,
13641
- users: h,
13651
+ users: m,
13642
13652
  isPending: d && !v.current,
13643
13653
  isFetching: f,
13644
- isError: m,
13654
+ isError: h,
13645
13655
  currentPage: i,
13646
13656
  totalPages: c((w = l == null ? void 0 : l.usersConnection) == null ? void 0 : w.pageInfo.totalCount),
13647
- totalUserCount: ((C = l == null ? void 0 : l.usersConnection) == null ? void 0 : C.pageInfo.totalCount) ?? 0,
13657
+ totalUserCount: ((T = l == null ? void 0 : l.usersConnection) == null ? void 0 : T.pageInfo.totalCount) ?? 0,
13648
13658
  handlePageChange: a
13649
13659
  };
13650
13660
  }, Sw = (e, t) => {
@@ -13742,15 +13752,15 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13742
13752
  )
13743
13753
  ] }, e.id))
13744
13754
  ] })
13745
- ] }), wi = `@container ${Qn} (max-width: ${p.breakpoints.small})`, kw = E.div`
13755
+ ] }), wi = `@container ${Qn} (max-width: ${p.breakpoints.small})`, kw = A.div`
13746
13756
  display: flex;
13747
13757
  flex-direction: column;
13748
13758
  gap: ${p.spacing.medium};
13749
- `, Iw = E.div`
13759
+ `, Iw = A.div`
13750
13760
  border: ${p.borders.widthSmall} solid ${p.colors.contrasts.grey1214};
13751
13761
  border-radius: ${p.borders.radiusLarge};
13752
13762
  padding: ${p.spacing.small} ${p.spacing.medium};
13753
- `, Nw = E.div`
13763
+ `, Nw = A.div`
13754
13764
  display: flex;
13755
13765
  flex-direction: row;
13756
13766
  align-items: center;
@@ -13762,7 +13772,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13762
13772
  ${wi} {
13763
13773
  align-items: flex-start;
13764
13774
  }
13765
- `, Ew = E.div`
13775
+ `, Ew = A.div`
13766
13776
  display: flex;
13767
13777
  flex-direction: row;
13768
13778
  align-items: center;
@@ -13770,12 +13780,12 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13770
13780
  flex: 1;
13771
13781
  min-width: 0;
13772
13782
  flex-wrap: wrap;
13773
- `, Aw = E.div`
13783
+ `, Aw = A.div`
13774
13784
  display: flex;
13775
13785
  flex-direction: row;
13776
13786
  gap: ${p.spacing.xSmall};
13777
13787
  flex-shrink: 0;
13778
- `, Ow = E.div`
13788
+ `, Ow = A.div`
13779
13789
  display: flex;
13780
13790
  flex-direction: row;
13781
13791
  gap: ${p.spacing.small};
@@ -13785,29 +13795,29 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13785
13795
  flex-direction: column;
13786
13796
  align-items: stretch;
13787
13797
  }
13788
- `, Dw = E.div`
13798
+ `, Dw = A.div`
13789
13799
  flex: 1;
13790
13800
  min-width: 0;
13791
- `, nc = E.div`
13801
+ `, nc = A.div`
13792
13802
  display: flex;
13793
13803
  flex-direction: row;
13794
13804
  align-items: center;
13795
13805
  gap: ${p.spacing.small};
13796
- `, rc = E.div`
13806
+ `, rc = A.div`
13797
13807
  display: flex;
13798
13808
  flex-direction: column;
13799
13809
  gap: ${p.spacing.xxxSmall};
13800
- `, $w = E.div`
13810
+ `, $w = A.div`
13801
13811
  padding: ${p.spacing.small} 0;
13802
13812
  text-align: center;
13803
- `, Mw = E.div`
13813
+ `, Mw = A.div`
13804
13814
  ${wi} {
13805
13815
  [role='table'] {
13806
13816
  display: block;
13807
13817
  width: 100%;
13808
13818
  }
13809
13819
  }
13810
- `, Rw = E.span.attrs({ "aria-hidden": "true" })``, Pw = ({
13820
+ `, Rw = A.span.attrs({ "aria-hidden": "true" })``, Pw = ({
13811
13821
  tag: e,
13812
13822
  onEdit: t,
13813
13823
  onArchive: n,
@@ -13884,20 +13894,20 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13884
13894
  onPageChange: l,
13885
13895
  onSort: d,
13886
13896
  removeUser: f,
13887
- onAddPeople: m
13897
+ onAddPeople: h
13888
13898
  }) => {
13889
- const { translations: g, resolveToken: v } = W(), { canEdit: h } = Yt(), { isMobile: b } = ar(), { openModal: T, closeModal: w } = Le(), [C, A] = y.useState(""), x = y.useRef(null), $ = y.useRef(/* @__PURE__ */ new Map()), k = y.useRef(null), I = y.useId(), R = (M, { id: Y }) => {
13899
+ const { translations: g, resolveToken: v } = W(), { canEdit: m } = Yt(), { isMobile: b } = ar(), { openModal: C, closeModal: w } = Le(), [T, I] = y.useState(""), x = y.useRef(null), $ = y.useRef(/* @__PURE__ */ new Map()), k = y.useRef(null), N = y.useId(), R = (M, { id: Y }) => {
13890
13900
  if (Y !== "name") return;
13891
13901
  const B = o === "ascending" ? "descending" : "ascending";
13892
- d(B), A(B === "ascending" ? g.tableSortedAscending : g.tableSortedDescending);
13902
+ d(B), I(B === "ascending" ? g.tableSortedAscending : g.tableSortedDescending);
13893
13903
  }, S = (M) => {
13894
- var Ce;
13904
+ var Te;
13895
13905
  const Y = e.findIndex((F) => F._id === M);
13896
13906
  if (Y <= 0) return k.current;
13897
- const B = (Ce = e[Y - 1]) == null ? void 0 : Ce._id;
13907
+ const B = (Te = e[Y - 1]) == null ? void 0 : Te._id;
13898
13908
  return B ? $.current.get(B) ?? null : null;
13899
- }, N = (M) => {
13900
- T({
13909
+ }, E = (M) => {
13910
+ C({
13901
13911
  heading: "confirmRemoveUserTitle",
13902
13912
  simpleBodyText: "confirmRemoveUserBody",
13903
13913
  handleClose: w,
@@ -13910,11 +13920,11 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13910
13920
  });
13911
13921
  }, L = !!i && !t && !a, O = L && e.length === 0, z = o === "none" ? g.assignedUsers : o === "ascending" ? g.userTableCaptionAscending : g.userTableCaptionDescending;
13912
13922
  return /* @__PURE__ */ D(Bn, { children: [
13913
- C && /* @__PURE__ */ u(mt, { screenReaderOnly: !0, liveRegion: _t, children: C }),
13914
- L && /* @__PURE__ */ u(mt, { screenReaderOnly: !0, liveRegion: _t, children: v({ key: "searchResults", vars: { resultCount: s } }) }),
13923
+ T && /* @__PURE__ */ u(mt, { screenReaderOnly: !0, liveRegion: _t, liveRegionPoliteness: "polite", children: T }),
13924
+ L && /* @__PURE__ */ u(mt, { screenReaderOnly: !0, liveRegion: _t, liveRegionPoliteness: "polite", children: v({ key: "searchResults", vars: { resultCount: s } }) }),
13915
13925
  /* @__PURE__ */ D(Ow, { children: [
13916
13926
  /* @__PURE__ */ D(Dw, { children: [
13917
- /* @__PURE__ */ u(Zt, { id: I, children: g.searchUsersDescription }),
13927
+ /* @__PURE__ */ u(Zt, { id: N, children: g.searchUsersDescription }),
13918
13928
  /* @__PURE__ */ u(
13919
13929
  Bt,
13920
13930
  {
@@ -13942,16 +13952,16 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13942
13952
  inputRef: (M) => {
13943
13953
  x.current = M;
13944
13954
  },
13945
- "aria-describedby": I
13955
+ "aria-describedby": N
13946
13956
  }
13947
13957
  )
13948
13958
  ] }),
13949
- h && /* @__PURE__ */ u(
13959
+ m && /* @__PURE__ */ u(
13950
13960
  fn,
13951
13961
  {
13952
13962
  color: "primary",
13953
13963
  renderIcon: /* @__PURE__ */ u(Ro, {}),
13954
- onClick: m,
13964
+ onClick: h,
13955
13965
  elementRef: (M) => {
13956
13966
  k.current = M;
13957
13967
  },
@@ -13964,7 +13974,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13964
13974
  /* @__PURE__ */ u(Ne.Head, { renderSortLabel: g.sortPeople, children: /* @__PURE__ */ D(Ne.Row, { children: [
13965
13975
  /* @__PURE__ */ u(Ne.ColHeader, { id: "name", sortDirection: o, onRequestSort: R, children: g.name }),
13966
13976
  /* @__PURE__ */ u(Ne.ColHeader, { id: "sisId", children: g.sisId }),
13967
- h && /* @__PURE__ */ u(Ne.ColHeader, { id: "actions", children: g.actions })
13977
+ m && /* @__PURE__ */ u(Ne.ColHeader, { id: "actions", children: g.actions })
13968
13978
  ] }) }),
13969
13979
  /* @__PURE__ */ u(Ne.Body, { children: t ? Yr(ct).map((M) => /* @__PURE__ */ D(Ne.Row, { children: [
13970
13980
  /* @__PURE__ */ u(Ne.Cell, { children: /* @__PURE__ */ D(nc, { children: [
@@ -13988,7 +13998,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
13988
13998
  /* @__PURE__ */ u(Rw, { children: "—" }),
13989
13999
  /* @__PURE__ */ u(Zt, { children: g.noData })
13990
14000
  ] }) }),
13991
- h && /* @__PURE__ */ u(Ne.Cell, { children: /* @__PURE__ */ u(
14001
+ m && /* @__PURE__ */ u(Ne.Cell, { children: /* @__PURE__ */ u(
13992
14002
  gn,
13993
14003
  {
13994
14004
  trigger: /* @__PURE__ */ u(
@@ -14005,7 +14015,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
14005
14015
  elementRef: (Y) => $.current.set(M._id, Y)
14006
14016
  }
14007
14017
  ),
14008
- children: /* @__PURE__ */ u(gn.Item, { onClick: () => N(M._id), children: g.removeUserFromTag })
14018
+ children: /* @__PURE__ */ u(gn.Item, { onClick: () => E(M._id), children: g.removeUserFromTag })
14009
14019
  }
14010
14020
  ) })
14011
14021
  ] }, M._id)) })
@@ -14028,7 +14038,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
14028
14038
  if (e !== "none")
14029
14039
  return { field: "username", direction: e === "ascending" ? "asc" : "desc" };
14030
14040
  }, _w = ({ tagId: e, onClose: t }) => {
14031
- const { openModal: n, closeModal: r } = Le(), { data: s = [] } = fi(), o = y.useRef(void 0), [i, a] = y.useState("none"), [c, l] = y.useState(""), [d, f] = y.useState(""), { handleAddPeople: m } = Hu(o);
14041
+ const { openModal: n, closeModal: r } = Le(), { data: s = [] } = fi(), o = y.useRef(void 0), [i, a] = y.useState("none"), [c, l] = y.useState(""), [d, f] = y.useState(""), { handleAddPeople: h } = Hu(o);
14032
14042
  y.useEffect(() => {
14033
14043
  const R = setTimeout(() => f(c), pi);
14034
14044
  return () => clearTimeout(R);
@@ -14036,13 +14046,13 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
14036
14046
  const {
14037
14047
  tag: g,
14038
14048
  users: v,
14039
- isPending: h,
14049
+ isPending: m,
14040
14050
  isFetching: b,
14041
- currentPage: T,
14051
+ currentPage: C,
14042
14052
  totalPages: w,
14043
- totalUserCount: C,
14044
- handlePageChange: A
14045
- } = Cw(e, Fw(i), d || void 0), { archive: x } = Zu((g == null ? void 0 : g.category._id) ?? ""), { removeUser: $ } = Sw(e, (g == null ? void 0 : g.category._id) ?? ""), k = () => {
14053
+ totalUserCount: T,
14054
+ handlePageChange: I
14055
+ } = Tw(e, Fw(i), d || void 0), { archive: x } = Zu((g == null ? void 0 : g.category._id) ?? ""), { removeUser: $ } = Sw(e, (g == null ? void 0 : g.category._id) ?? ""), k = () => {
14046
14056
  g && n({
14047
14057
  heading: "editTag",
14048
14058
  body: /* @__PURE__ */ u(Yu, { tag: g, submitRef: o, existingTagNames: s }),
@@ -14052,7 +14062,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
14052
14062
  return (R = o.current) == null ? void 0 : R.call(o);
14053
14063
  }
14054
14064
  });
14055
- }, I = () => {
14065
+ }, N = () => {
14056
14066
  n({
14057
14067
  heading: "archiveTag",
14058
14068
  simpleBodyText: "archiveTagConfirmation",
@@ -14064,13 +14074,13 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
14064
14074
  }
14065
14075
  });
14066
14076
  };
14067
- return h || !g ? /* @__PURE__ */ u(xw, {}) : /* @__PURE__ */ D(kw, { children: [
14077
+ return m || !g ? /* @__PURE__ */ u(xw, {}) : /* @__PURE__ */ D(kw, { children: [
14068
14078
  /* @__PURE__ */ u(
14069
14079
  Pw,
14070
14080
  {
14071
14081
  tag: g,
14072
14082
  onEdit: k,
14073
- onArchive: I,
14083
+ onArchive: N,
14074
14084
  onClose: t
14075
14085
  }
14076
14086
  ),
@@ -14079,21 +14089,21 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
14079
14089
  {
14080
14090
  users: v,
14081
14091
  isLoading: b,
14082
- currentPage: T,
14092
+ currentPage: C,
14083
14093
  totalPages: w,
14084
- totalUserCount: C,
14094
+ totalUserCount: T,
14085
14095
  sortDirection: i,
14086
14096
  searchQuery: c,
14087
14097
  isSearchPending: c !== d,
14088
14098
  onSearchChange: l,
14089
- onPageChange: A,
14099
+ onPageChange: I,
14090
14100
  onSort: a,
14091
14101
  removeUser: $,
14092
- onAddPeople: () => m(e)
14102
+ onAddPeople: () => h(e)
14093
14103
  }
14094
14104
  )
14095
14105
  ] });
14096
- }, qw = E.div`
14106
+ }, qw = A.div`
14097
14107
  display: flex;
14098
14108
  flex-direction: column;
14099
14109
  padding-block-start: ${p.spacing.mediumSmall};
@@ -14113,7 +14123,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
14113
14123
  totalPages: c,
14114
14124
  handlePageChange: l,
14115
14125
  searchResultCount: d
14116
- } = Tw();
14126
+ } = Cw();
14117
14127
  return /* @__PURE__ */ D(Zm, { children: [
14118
14128
  /* @__PURE__ */ u(ww, { searchResultCount: d, isFetching: s }),
14119
14129
  /* @__PURE__ */ u(
@@ -14203,7 +14213,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
14203
14213
  mutationFn: (d) => Promise.all(
14204
14214
  d.map(
14205
14215
  (f) => i(
14206
- Cl,
14216
+ Tl,
14207
14217
  { input: { tagId: f, userId: e } }
14208
14218
  )
14209
14219
  )
@@ -14227,12 +14237,12 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
14227
14237
  }
14228
14238
  });
14229
14239
  return { assignTags: c, isPending: l };
14230
- }, Yw = E.div`
14240
+ }, Yw = A.div`
14231
14241
  padding: ${p.spacing.mediumSmall};
14232
14242
  display: flex;
14233
14243
  flex-direction: column;
14234
14244
  gap: ${p.spacing.small};
14235
- `, Kw = E.div`
14245
+ `, Kw = A.div`
14236
14246
  display: flex;
14237
14247
  flex-wrap: wrap;
14238
14248
  gap: ${p.spacing.xxSmall};
@@ -14241,7 +14251,7 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
14241
14251
  existingTagIds: t,
14242
14252
  submitRef: n
14243
14253
  }) => {
14244
- const { translations: r, resolveToken: s } = W(), [o, i] = y.useState(""), [a, c] = y.useState(!1), [l, d] = y.useState(null), [f, m] = y.useState([]), [g, v] = y.useState([]), h = y.useRef(null), b = yi(h, f.length > 0), { data: T = [] } = Hw({ enabled: !0 }), { assignTags: w } = Zw(e), C = fr();
14254
+ const { translations: r, resolveToken: s } = W(), [o, i] = y.useState(""), [a, c] = y.useState(!1), [l, d] = y.useState(null), [f, h] = y.useState([]), [g, v] = y.useState([]), m = y.useRef(null), b = yi(m, f.length > 0), { data: C = [] } = Hw({ enabled: !0 }), { assignTags: w } = Zw(e), T = fr();
14245
14255
  y.useEffect(() => {
14246
14256
  n.current = () => {
14247
14257
  if (f.length === 0) {
@@ -14251,45 +14261,45 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
14251
14261
  w(f.map((S) => S._id));
14252
14262
  };
14253
14263
  });
14254
- const A = y.useMemo(
14255
- () => T.filter(
14256
- (S) => !t.has(S._id) && !f.some((N) => N._id === S._id)
14264
+ const I = y.useMemo(
14265
+ () => C.filter(
14266
+ (S) => !t.has(S._id) && !f.some((E) => E._id === S._id)
14257
14267
  ),
14258
- [T, t, f]
14268
+ [C, t, f]
14259
14269
  ), x = y.useMemo(() => {
14260
- const S = o.toLowerCase(), N = /* @__PURE__ */ new Map();
14261
- for (const L of A) {
14270
+ const S = o.toLowerCase(), E = /* @__PURE__ */ new Map();
14271
+ for (const L of I) {
14262
14272
  if (!L.category._id || S && !L.name.toLowerCase().includes(S)) continue;
14263
- let O = N.get(L.category._id);
14264
- O || (O = { categoryId: L.category._id, categoryName: L.category.name, tags: [] }, N.set(L.category._id, O)), O.tags.push({ _id: L._id, name: L.name });
14265
- }
14266
- return [...N.values()];
14267
- }, [A, o]), $ = (S, { id: N }) => {
14268
- if (!N) return;
14269
- const L = A.find((O) => O._id === N);
14270
- L && (v([]), m((O) => [...O, { _id: L._id, name: L.name }])), i(""), d(null), c(!1);
14273
+ let O = E.get(L.category._id);
14274
+ O || (O = { categoryId: L.category._id, categoryName: L.category.name, tags: [] }, E.set(L.category._id, O)), O.tags.push({ _id: L._id, name: L.name });
14275
+ }
14276
+ return [...E.values()];
14277
+ }, [I, o]), $ = (S, { id: E }) => {
14278
+ if (!E) return;
14279
+ const L = I.find((O) => O._id === E);
14280
+ L && (v([]), h((O) => [...O, { _id: L._id, name: L.name }])), i(""), d(null), c(!1);
14271
14281
  }, k = (S) => {
14272
- m((N) => N.filter((L) => L._id !== S)), setTimeout(() => {
14273
- var N;
14274
- return (N = h.current) == null ? void 0 : N.focus();
14282
+ h((E) => E.filter((L) => L._id !== S)), setTimeout(() => {
14283
+ var E;
14284
+ return (E = m.current) == null ? void 0 : E.focus();
14275
14285
  }, 0);
14276
- }, I = () => x.length === 0 ? /* @__PURE__ */ u($e.Option, { id: "no-results", isDisabled: !0, children: r.noResultsFound }) : x.map((S) => /* @__PURE__ */ u($e.Group, { renderLabel: S.categoryName, children: S.tags.map((N) => /* @__PURE__ */ u(
14286
+ }, N = () => x.length === 0 ? /* @__PURE__ */ u($e.Option, { id: "no-results", isDisabled: !0, children: r.noResultsFound }) : x.map((S) => /* @__PURE__ */ u($e.Group, { renderLabel: S.categoryName, children: S.tags.map((E) => /* @__PURE__ */ u(
14277
14287
  $e.Option,
14278
14288
  {
14279
- id: N._id,
14280
- isHighlighted: l === N._id,
14281
- renderAfterLabel: l === N._id ? /* @__PURE__ */ u(ac, { size: "x-small" }) : null,
14282
- children: N.name
14289
+ id: E._id,
14290
+ isHighlighted: l === E._id,
14291
+ renderAfterLabel: l === E._id ? /* @__PURE__ */ u(ac, { size: "x-small" }) : null,
14292
+ children: E.name
14283
14293
  },
14284
- N._id
14294
+ E._id
14285
14295
  )) }, S.categoryId)), R = f.length > 0 ? /* @__PURE__ */ u(Kw, { children: f.map((S) => /* @__PURE__ */ u(
14286
14296
  jn,
14287
14297
  {
14288
14298
  text: S.name,
14289
14299
  dismissible: !0,
14290
14300
  size: "small",
14291
- onClick: (N) => {
14292
- N.stopPropagation(), N.preventDefault(), k(S._id);
14301
+ onClick: (E) => {
14302
+ E.stopPropagation(), E.preventDefault(), k(S._id);
14293
14303
  },
14294
14304
  "aria-label": s({ key: "removeSelectedTag", vars: { tagName: S.name } })
14295
14305
  },
@@ -14308,19 +14318,19 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
14308
14318
  assistiveText: r.multiSelectFieldDescription,
14309
14319
  messages: g,
14310
14320
  inputRef: (S) => {
14311
- h.current = S;
14321
+ m.current = S;
14312
14322
  },
14313
- mountNode: C,
14314
- onInputChange: (S, N) => {
14315
- i(N), c(!0);
14323
+ mountNode: T,
14324
+ onInputChange: (S, E) => {
14325
+ i(E), c(!0);
14316
14326
  },
14317
14327
  onRequestShowOptions: () => c(!0),
14318
14328
  onRequestHideOptions: () => {
14319
14329
  c(!1), d(null);
14320
14330
  },
14321
- onRequestHighlightOption: (S, { id: N }) => d(N ?? null),
14331
+ onRequestHighlightOption: (S, { id: E }) => d(E ?? null),
14322
14332
  onRequestSelectOption: $,
14323
- children: I()
14333
+ children: N()
14324
14334
  }
14325
14335
  ),
14326
14336
  f.length > 0 && /* @__PURE__ */ u(X, { id: b, size: "small", weight: "bold", children: s({
@@ -14344,36 +14354,36 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
14344
14354
  $radius: "999px"
14345
14355
  }
14346
14356
  ) }, t)) });
14347
- }, tb = E.div`
14357
+ }, tb = A.div`
14348
14358
  padding: ${p.spacing.small} 0;
14349
- `, nb = E.div`
14359
+ `, nb = A.div`
14350
14360
  display: flex;
14351
14361
  align-items: flex-start;
14352
14362
  gap: ${p.spacing.mediumSmall};
14353
- `, rb = E.div`
14363
+ `, rb = A.div`
14354
14364
  flex: 1;
14355
- `, sb = E.ul`
14365
+ `, sb = A.ul`
14356
14366
  display: flex;
14357
14367
  flex-wrap: wrap;
14358
14368
  gap: ${p.spacing.xxSmall};
14359
14369
  list-style: none;
14360
14370
  margin: 0;
14361
14371
  padding: 0;
14362
- `, ob = E.li`
14372
+ `, ob = A.li`
14363
14373
  display: flex;
14364
14374
  `, ib = ({ userId: e }) => {
14365
- const { translations: t, resolveToken: n } = W(), { canEdit: r } = Yt(), { openModal: s, closeModal: o } = Le(), { tags: i, isPending: a, isError: c } = Vw(e), { removeTag: l } = Bw(e), d = y.useRef(void 0), f = y.useMemo(() => new Set(i.map((h) => h._id)), [i]), m = () => {
14375
+ const { translations: t, resolveToken: n } = W(), { canEdit: r } = Yt(), { openModal: s, closeModal: o } = Le(), { tags: i, isPending: a, isError: c } = Vw(e), { removeTag: l } = Bw(e), d = y.useRef(void 0), f = y.useMemo(() => new Set(i.map((m) => m._id)), [i]), h = () => {
14366
14376
  s({
14367
14377
  heading: "assignTagsToUser",
14368
14378
  body: /* @__PURE__ */ u(Qw, { userId: e, existingTagIds: f, submitRef: d }),
14369
14379
  handleClose: o,
14370
14380
  primaryButtonLabel: "assign",
14371
14381
  onPrimaryClick: () => {
14372
- var h;
14373
- return (h = d.current) == null ? void 0 : h.call(d);
14382
+ var m;
14383
+ return (m = d.current) == null ? void 0 : m.call(d);
14374
14384
  }
14375
14385
  });
14376
- }, g = (h) => {
14386
+ }, g = (m) => {
14377
14387
  s({
14378
14388
  heading: "confirmRemoveTagTitle",
14379
14389
  simpleBodyText: "confirmRemoveTagBody",
@@ -14381,24 +14391,24 @@ const tw = /* @__PURE__ */ zv(ew), ec = E.div`
14381
14391
  handleClose: o,
14382
14392
  primaryButtonLabel: "removeTagFromUser",
14383
14393
  onPrimaryClick: () => {
14384
- l(h._id), o();
14394
+ l(m._id), o();
14385
14395
  }
14386
14396
  });
14387
14397
  };
14388
14398
  return /* @__PURE__ */ u(tb, { children: /* @__PURE__ */ D(nb, { children: [
14389
- /* @__PURE__ */ u(rb, { children: a ? /* @__PURE__ */ u(eb, {}) : c ? /* @__PURE__ */ u(X, { color: "danger", size: "small", children: t.loadTagsFailed }) : i.length === 0 ? /* @__PURE__ */ u(X, { color: "secondary", size: "small", children: t.noTagsAssigned }) : /* @__PURE__ */ u(sb, { children: i.map((h) => /* @__PURE__ */ u(ob, { children: /* @__PURE__ */ u(
14399
+ /* @__PURE__ */ u(rb, { children: a ? /* @__PURE__ */ u(eb, {}) : c ? /* @__PURE__ */ u(X, { color: "danger", size: "small", children: t.loadTagsFailed }) : i.length === 0 ? /* @__PURE__ */ u(X, { color: "secondary", size: "small", children: t.noTagsAssigned }) : /* @__PURE__ */ u(sb, { children: i.map((m) => /* @__PURE__ */ u(ob, { children: /* @__PURE__ */ u(
14390
14400
  jn,
14391
14401
  {
14392
- text: h.name,
14402
+ text: m.name,
14393
14403
  size: "small",
14394
14404
  dismissible: r,
14395
14405
  onClick: r ? (b) => {
14396
- b.stopPropagation(), b.preventDefault(), g(h);
14406
+ b.stopPropagation(), b.preventDefault(), g(m);
14397
14407
  } : void 0,
14398
- "aria-label": r ? n({ key: "removeTagFromUserLabel", vars: { tagName: h.name } }) : void 0
14408
+ "aria-label": r ? n({ key: "removeTagFromUserLabel", vars: { tagName: m.name } }) : void 0
14399
14409
  }
14400
- ) }, h._id)) }) }),
14401
- r && /* @__PURE__ */ u(fn, { size: "small", onClick: m, children: t.assignTagsToUser })
14410
+ ) }, m._id)) }) }),
14411
+ r && /* @__PURE__ */ u(fn, { size: "small", onClick: h, children: t.assignTagsToUser })
14402
14412
  ] }) });
14403
14413
  }, Wb = ({ userId: e }) => /* @__PURE__ */ u(ed, { children: /* @__PURE__ */ u(ib, { userId: e }) });
14404
14414
  export {