@nivaro/react 0.3.57 → 0.3.58

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.
Files changed (50) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +5 -1
  4. package/dist/shared/components/CollectionBrowserView.js +2633 -2590
  5. package/dist/shared/components/DataTable.js +247 -236
  6. package/dist/shared/components/ItemEditForm.js +1693 -1668
  7. package/dist/shared/components/ProfileView.js +716 -715
  8. package/dist/shared/components/RecordReadView.js +367 -364
  9. package/dist/shared/components/ReportView.js +64 -39
  10. package/dist/shared/components/alerts/AlertManagerView.js +284 -271
  11. package/dist/shared/components/cbv/row-focus.js +19 -0
  12. package/dist/shared/components/help-videos/HelpVideoPlayer.js +152 -147
  13. package/dist/shared/components/integrations/console/SignalCard.js +59 -59
  14. package/dist/shared/components/integrations/console/tone.js +52 -30
  15. package/dist/shared/components/item-edit/CatalogPickerField.js +525 -505
  16. package/dist/shared/components/item-edit/FieldRow.js +175 -173
  17. package/dist/shared/components/item-edit/InlineTableField.js +407 -402
  18. package/dist/shared/components/item-edit/M2MCombobox.js +313 -291
  19. package/dist/shared/components/item-edit/MidairCollisionDialog.js +1 -1
  20. package/dist/shared/components/item-edit/PlanGrid.js +826 -803
  21. package/dist/shared/components/item-edit/QuickCreateButton.js +115 -79
  22. package/dist/shared/components/item-edit/RecordLiveSync.js +77 -75
  23. package/dist/shared/components/item-edit/RelationCombobox.js +412 -328
  24. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +147 -125
  25. package/dist/shared/components/item-edit/SummaryPanel.js +406 -392
  26. package/dist/shared/components/item-edit/option-disambiguate.js +44 -32
  27. package/dist/shared/components/item-edit/related-missing.js +45 -0
  28. package/dist/shared/components/item-edit/save-outcome.js +5 -5
  29. package/dist/shared/components/notifications/NotificationRulesEditor.js +130 -123
  30. package/dist/shared/components/panels/AccessDeniedPanel.js +52 -48
  31. package/dist/shared/components/panels/ItemLockBanner.js +2 -3
  32. package/dist/shared/components/panels/PipelinePanel.js +1027 -978
  33. package/dist/shared/components/panels/RevisionsPanel.js +4 -1
  34. package/dist/shared/components/panels/TaskPanel.js +265 -249
  35. package/dist/shared/components/panels/landing-state.js +27 -0
  36. package/dist/shared/components/pipeline/PipelineEditorView.js +86 -78
  37. package/dist/shared/components/profile/AiMemoryCard.js +12 -10
  38. package/dist/shared/components/queue/OwnerAvatars.js +80 -41
  39. package/dist/shared/components/queue/QueueQuickFilters.js +48 -48
  40. package/dist/shared/components/queue/QueueWorklist.js +357 -358
  41. package/dist/shared/components/queue/group-sums.js +27 -0
  42. package/dist/shared/components/widgets/ReviewListWidget.js +186 -168
  43. package/dist/shared/lib/back-closes.js +25 -0
  44. package/dist/shared/lib/form-usage-beacon.js +7 -7
  45. package/dist/shared/lib/list-page-memory.js +41 -0
  46. package/dist/shared/lib/live.js +44 -44
  47. package/dist/shared/lib/own-writes.js +76 -28
  48. package/dist/shared/lib/request-gate.js +110 -109
  49. package/dist/shared/lib/validation-rules.js +34 -19
  50. package/package.json +1 -1
@@ -3,7 +3,7 @@ import { useSensors as no, useSensor as ro, PointerSensor as ao, DndContext as l
3
3
  import { SortableContext as so, verticalListSortingStrategy as io, arrayMove as co, useSortable as uo } from "@dnd-kit/sortable";
4
4
  import { CSS as mo } from "@dnd-kit/utilities";
5
5
  import { useQueryClient as po, useQuery as W, useMutation as $e, useQueries as Be } from "@tanstack/react-query";
6
- import { AlertTriangle as bo, FileDiff as ho, RefreshCw as fo, Rows3 as _a, Flame as go, Sparkles as xo, BarChart3 as yo, SlidersHorizontal as ko, ListChecks as vo, Rows4 as wo, Rows2 as _o, Play as No, Plus as en, ChevronDown as Na, Star as So, Pin as Co, Loader2 as $o, Check as qo, Save as Fo, Bell as To, Inbox as Ro, GripVertical as Eo } from "lucide-react";
6
+ import { AlertTriangle as bo, FileDiff as ho, RefreshCw as fo, Rows3 as _a, Flame as go, Sparkles as xo, BarChart3 as yo, SlidersHorizontal as ko, ListChecks as vo, Rows4 as wo, Rows2 as _o, Play as No, Plus as nn, ChevronDown as Na, Star as So, Pin as Co, Loader2 as $o, Check as qo, Save as Fo, Bell as To, Inbox as Ro, GripVertical as Eo } from "lucide-react";
7
7
  import { useState as v, useRef as U, useEffect as P, useMemo as V } from "react";
8
8
  import { createPortal as Sa } from "react-dom";
9
9
  import { toast as O } from "sonner";
@@ -12,7 +12,7 @@ import { useDebounced as Do } from "../../hooks/useDebounced.js";
12
12
  import { useElapsedLoading as Ko } from "../../hooks/useElapsedLoading.js";
13
13
  import { useSlowReason as Po } from "../../hooks/useSlowReason.js";
14
14
  import { useBulkProgressFeed as Mo } from "../../lib/bulk-progress.js";
15
- import { get as L, post as se, patch as $a, del as In, put as Qo } from "../../lib/commands.js";
15
+ import { get as L, post as ie, patch as $a, del as Vn, put as Qo } from "../../lib/commands.js";
16
16
  import { evaluateExpression as Bo } from "../../lib/expression.js";
17
17
  import { clauseFromControlValue as jo, filterSentence as Uo } from "../../lib/filter-sentence.js";
18
18
  import { deliverLive as Io, releaseLiveOwner as Vo } from "../../lib/focus-mode.js";
@@ -34,7 +34,7 @@ import { rowHighlightTextClass as xs, rowHighlightClass as ys } from "../../lib/
34
34
  import { userErrorMessage as qt } from "../../lib/safe-error.js";
35
35
  import { useMyScopes as ks, matchScopeDimension as vs } from "../../lib/use-my-scopes.js";
36
36
  import { useNewItemLayouts as ws } from "../../lib/use-new-item-layouts.js";
37
- import { formatNumber as ie, cn as E, titleCase as Vn, humanHours as _s, formatRelative as Ns, formatDateTime as Ss, formatDate as Cs } from "../../lib/utils.js";
37
+ import { formatNumber as ce, cn as E, titleCase as Gn, humanHours as _s, formatRelative as Ns, formatDateTime as Ss, formatDate as Cs } from "../../lib/utils.js";
38
38
  import { usePublishAskContext as $s, useAskRecordDrag as qs } from "../ai/ask-context.js";
39
39
  import { useBuiltinGate as Fs, BulkActionButtons as Ts } from "../bulk/BulkActionButtons.js";
40
40
  import { BulkRowMark as Rs } from "../bulk/BulkRowMark.js";
@@ -56,25 +56,26 @@ import { RealtimeStaleMark as Xs } from "../RealtimeStatusBanner.js";
56
56
  import { RecordDrilldownSheet as Zs } from "../RecordDrilldownSheet.js";
57
57
  import { RowHighlightLegend as ei } from "../RowHighlightLegend.js";
58
58
  import { RowPresence as ti } from "../RowPresence.js";
59
- import { TickerNumber as Gn } from "../TickerNumber.js";
59
+ import { TickerNumber as Wn } from "../TickerNumber.js";
60
60
  import { UnseenDot as ni } from "../UnseenDot.js";
61
61
  import { Badge as ri } from "../ui/badge.js";
62
- import { Checkbox as Wn } from "../ui/checkbox.js";
62
+ import { Checkbox as Hn } from "../ui/checkbox.js";
63
63
  import { Command as Ra, CommandInput as ai, CommandList as Ea, CommandEmpty as li, CommandItem as Ft } from "../ui/command.js";
64
64
  import { Label as oi } from "../ui/label.js";
65
65
  import { Popover as rt, PopoverTrigger as at, PopoverContent as lt } from "../ui/popover.js";
66
66
  import { Skeleton as si } from "../ui/skeleton.js";
67
67
  import { dedupeChooserKeys as ii } from "./column-chooser.js";
68
- import { statsOutrunRows as ci, stateAspectEffect as di } from "./live-state-aspect.js";
69
- import { pathHeader as ui } from "./path-label.js";
68
+ import { groupSumPathsFor as ci } from "./group-sums.js";
69
+ import { statsOutrunRows as di, stateAspectEffect as ui } from "./live-state-aspect.js";
70
70
  import { OwnerAvatars as mi } from "./OwnerAvatars.js";
71
- import { QueueBulkBar as pi } from "./QueueBulkBar.js";
72
- import { QueueItemSheet as bi } from "./QueueItemSheet.js";
73
- import { QueueKanbanBoard as hi } from "./QueueKanbanBoard.js";
74
- import { QueueQuickFilters as fi } from "./QueueQuickFilters.js";
75
- import { QueueWorkloadView as gi } from "./QueueWorkloadView.js";
76
- import { useTransitionNote as xi, needsTransitionNote as yi } from "./transition-note.js";
77
- function ki({ summary: l }) {
71
+ import { pathHeader as pi } from "./path-label.js";
72
+ import { QueueBulkBar as bi } from "./QueueBulkBar.js";
73
+ import { QueueItemSheet as hi } from "./QueueItemSheet.js";
74
+ import { QueueKanbanBoard as fi } from "./QueueKanbanBoard.js";
75
+ import { QueueQuickFilters as gi } from "./QueueQuickFilters.js";
76
+ import { QueueWorkloadView as xi } from "./QueueWorkloadView.js";
77
+ import { useTransitionNote as yi, needsTransitionNote as ki } from "./transition-note.js";
78
+ function vi({ summary: l }) {
78
79
  if (!l || l.count === 0)
79
80
  return /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-muted-foreground", children: "—" });
80
81
  const k = [l.last_from, l.last_to].filter(Boolean).join(" → "), K = [
@@ -101,13 +102,13 @@ function ki({ summary: l }) {
101
102
  }
102
103
  );
103
104
  }
104
- const vi = 50, tn = "nivaro_addendums", wi = [
105
+ const wi = 50, rn = "nivaro_addendums", _i = [
105
106
  { value: "mine", label: "My Items" },
106
107
  { value: "unowned", label: "No Owners" },
107
108
  { value: "claimed", label: "Claimed by me" },
108
109
  { value: "all", label: "All Items" }
109
110
  ];
110
- function _i({ summary: l }) {
111
+ function Ni({ summary: l }) {
111
112
  if (!l || l.total === 0) return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
112
113
  const k = l.active > 0, K = l.latest_status === "review" ? "in review" : l.latest_status ?? "active", M = l.cost_impact, G = M != null && M !== 0 ? `${M > 0 ? "+" : "−"}$${Math.abs(M).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null;
113
114
  return /* @__PURE__ */ d(
@@ -138,13 +139,13 @@ function _i({ summary: l }) {
138
139
  }
139
140
  );
140
141
  }
141
- function Ni(l) {
142
+ function Si(l) {
142
143
  return _s(l);
143
144
  }
144
- function Si({ status: l }) {
145
+ function Ci({ status: l }) {
145
146
  return l ? /* @__PURE__ */ a("span", { className: E("rounded px-1.5 py-0.5 text-[11px] font-medium", l === "breached" ? "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400" : l === "warning" ? "bg-amber-50 text-amber-600 dark:bg-amber-500/10 dark:text-amber-400" : "bg-emerald-50 text-emerald-600 dark:bg-emerald-500/10 dark:text-emerald-400"), children: l }) : /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
146
147
  }
147
- function Ci({ points: l, inline: k = !1 }) {
148
+ function $i({ points: l, inline: k = !1 }) {
148
149
  if (l.length < 2) return null;
149
150
  const K = k ? 40 : 64, M = k ? 14 : 18, G = Math.max(...l), f = Math.min(...l), h = G - f || 1, N = K / (l.length - 1), H = l.map(
150
151
  (ye, g) => `${g === 0 ? "M" : "L"}${(g * N).toFixed(1)},${(M - 2 - (ye - f) / h * (M - 4)).toFixed(1)}`
@@ -184,12 +185,12 @@ function Tt({
184
185
  ),
185
186
  children: G ? /* @__PURE__ */ a(si, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(qe, { children: [
186
187
  /* @__PURE__ */ a("span", { className: "flex items-baseline gap-1 text-[15px] font-semibold leading-none tabular-nums text-slate-900 dark:text-foreground", children: K != null ? /* @__PURE__ */ d(qe, { children: [
187
- /* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ a(Gn, { value: K, format: ie }) }),
188
+ /* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ a(Wn, { value: K, format: ce }) }),
188
189
  /* @__PURE__ */ d("span", { className: "text-[11px] font-medium text-slate-400", children: [
189
190
  "/ ",
190
- /* @__PURE__ */ a(Gn, { value: k, format: ie })
191
+ /* @__PURE__ */ a(Wn, { value: k, format: ce })
191
192
  ] })
192
- ] }) : /* @__PURE__ */ a(Gn, { value: k, format: ie }) }),
193
+ ] }) : /* @__PURE__ */ a(Wn, { value: k, format: ce }) }),
193
194
  /* @__PURE__ */ a(
194
195
  "span",
195
196
  {
@@ -209,16 +210,16 @@ function Tt({
209
210
  ),
210
211
  children: [
211
212
  N > 0 ? "↑" : "↓",
212
- ie(Math.abs(N))
213
+ ce(Math.abs(N))
213
214
  ]
214
215
  }
215
216
  ),
216
- h && k > 0 && /* @__PURE__ */ a(Ci, { points: h, inline: !0 })
217
+ h && k > 0 && /* @__PURE__ */ a($i, { points: h, inline: !0 })
217
218
  ] })
218
219
  }
219
220
  );
220
221
  }
221
- function $i({
222
+ function qi({
222
223
  label: l,
223
224
  count: k,
224
225
  filteredCount: K,
@@ -245,18 +246,18 @@ function $i({
245
246
  ),
246
247
  l,
247
248
  /* @__PURE__ */ a("span", { className: "font-semibold tabular-nums text-slate-900 dark:text-foreground", children: K != null ? /* @__PURE__ */ d(qe, { children: [
248
- /* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: ie(K) }),
249
+ /* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: ce(K) }),
249
250
  /* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
250
251
  " / ",
251
- ie(k)
252
+ ce(k)
252
253
  ] })
253
- ] }) : ie(k) })
254
+ ] }) : ce(k) })
254
255
  ]
255
256
  }
256
257
  );
257
258
  }
258
- const je = ui;
259
- function qi({
259
+ const je = pi;
260
+ function Fi({
260
261
  id: l,
261
262
  label: k,
262
263
  checked: K,
@@ -279,11 +280,11 @@ function qi({
279
280
  children: /* @__PURE__ */ a(Eo, { className: "h-3.5 w-3.5" })
280
281
  }
281
282
  ),
282
- /* @__PURE__ */ a(Wn, { id: Y, checked: K, onCheckedChange: M }),
283
+ /* @__PURE__ */ a(Hn, { id: Y, checked: K, onCheckedChange: M }),
283
284
  /* @__PURE__ */ a(oi, { htmlFor: Y, className: "cursor-pointer text-[12px] font-normal", children: k })
284
285
  ] });
285
286
  }
286
- function td({
287
+ function rd({
287
288
  queueId: l,
288
289
  realtime: k,
289
290
  renderError: K,
@@ -291,27 +292,27 @@ function td({
291
292
  onAsk: G
292
293
  }) {
293
294
  var la, oa, sa, ia, ca, da, ua, ma, pa, ba, ha, fa, ga, xa, ya, ka, va;
294
- const f = po(), h = La(), { userId: N } = Ca(), H = Lo(), { navigate: ye } = Ao(), [g, Y] = v("all"), [de, A] = v(1), Hn = U(Wo()), [Rt, Aa] = v(() => {
295
+ const f = po(), h = La(), { userId: N } = Ca(), H = Lo(), { navigate: ye } = Ao(), [g, Y] = v("all"), [de, A] = v(1), Yn = U(Wo()), [Rt, Aa] = v(() => {
295
296
  try {
296
297
  return localStorage.getItem("nvr_table_density") === "comfortable" ? "comfortable" : "compact";
297
298
  } catch {
298
299
  return "compact";
299
300
  }
300
- }), [C, Ue] = v("table"), [I, Ie] = v(""), [_, Q] = v({}), [Et, Yn] = v(() => /* @__PURE__ */ new Set()), [$, ot] = v(null), [ke, nn] = v(/* @__PURE__ */ new Set()), [st, rn] = v(null), [it, an] = v(null), [ln, Lt] = v(0), Fe = ls(), on = gs(), sn = U({}).current, Jn = U(/* @__PURE__ */ new Set()), [Oa, Da] = v(0), [zn, Ka] = v(0), ue = U(!1), At = U([]), Xn = U(null), cn = U(!1), dn = U(0), un = U("table");
301
- un.current = C;
302
- const mn = 25, { data: c, error: Ot } = W({
301
+ }), [C, Ue] = v("table"), [I, Ie] = v(""), [_, Q] = v({}), [Et, Jn] = v(() => /* @__PURE__ */ new Set()), [$, ot] = v(null), [ke, an] = v(/* @__PURE__ */ new Set()), [st, ln] = v(null), [it, on] = v(null), [sn, Lt] = v(0), Fe = ls(), cn = gs(), dn = U({}).current, zn = U(/* @__PURE__ */ new Set()), [Oa, Da] = v(0), [Xn, Ka] = v(0), ue = U(!1), At = U([]), Zn = U(null), un = U(!1), mn = U(0), pn = U("table");
302
+ pn.current = C;
303
+ const bn = 25, { data: c, error: Ot } = W({
303
304
  queryKey: ["queue-meta", l],
304
305
  queryFn: () => h.request(L(`/queues/${l}`)).then((e) => e.data),
305
306
  enabled: !!l
306
- }), { scopes: Dt, ready: Zn } = ks(), er = U(!1), [tr, nr] = v(!1), [Te, Pa] = v({}), me = U({});
307
+ }), { scopes: Dt, ready: er } = ks(), tr = U(!1), [nr, rr] = v(!1), [Te, Pa] = v({}), me = U({});
307
308
  P(() => {
308
- if (er.current || !Zn || !c) return;
309
- er.current = !0;
309
+ if (tr.current || !er || !c) return;
310
+ tr.current = !0;
310
311
  const e = (c.extra_field_meta ?? []).filter(
311
312
  (t) => t.kind === "relation" && t.target_collection && t.display_field
312
313
  );
313
314
  if (e.length === 0 || !Dt) {
314
- nr(!0);
315
+ rr(!0);
315
316
  return;
316
317
  }
317
318
  (async () => {
@@ -342,10 +343,10 @@ function td({
342
343
  } catch {
343
344
  }
344
345
  }
345
- Object.keys(n).length > 0 && Pa(n), Object.keys(t).length > 0 && (me.current = t, Q((o) => ({ ...o, ...t }))), nr(!0);
346
+ Object.keys(n).length > 0 && Pa(n), Object.keys(t).length > 0 && (me.current = t, Q((o) => ({ ...o, ...t }))), rr(!0);
346
347
  })();
347
- }, [Zn, Dt, c]);
348
- const Ve = ((oa = (la = c == null ? void 0 : c.sources) == null ? void 0 : la.find((e) => e.type === "collection")) == null ? void 0 : oa.collection) ?? null, { data: rr = [] } = W({
348
+ }, [er, Dt, c]);
349
+ const Ve = ((oa = (la = c == null ? void 0 : c.sources) == null ? void 0 : la.find((e) => e.type === "collection")) == null ? void 0 : oa.collection) ?? null, { data: ar = [] } = W({
349
350
  queryKey: ["queue-browser-quick-filters", Ve],
350
351
  queryFn: () => h.request(L(`/collections/${Ve}`)).then((e) => {
351
352
  var t, n;
@@ -360,7 +361,7 @@ function td({
360
361
  return t;
361
362
  }, [c == null ? void 0 : c.sources]), Kt = ws(
362
363
  re.length === 1 ? re[0] : null
363
- ), pn = M === !0 || Array.isArray(M) && re.length > 0 && re.every((e) => M.includes(e)), pe = (c == null ? void 0 : c.claims_enabled) !== !1, u = c == null ? void 0 : c.display_config, Re = (u == null ? void 0 : u.views) ?? ["table", "kanban", "workload"], Ma = (u == null ? void 0 : u.work_next) !== !1, Pt = (u == null ? void 0 : u.bulk_actions) !== !1, bn = Fs(
364
+ ), hn = M === !0 || Array.isArray(M) && re.length > 0 && re.every((e) => M.includes(e)), pe = (c == null ? void 0 : c.claims_enabled) !== !1, u = c == null ? void 0 : c.display_config, Re = (u == null ? void 0 : u.views) ?? ["table", "kanban", "workload"], Ma = (u == null ? void 0 : u.work_next) !== !1, Pt = (u == null ? void 0 : u.bulk_actions) !== !1, fn = Fs(
364
365
  [
365
366
  ...new Set(
366
367
  ((c == null ? void 0 : c.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
@@ -370,16 +371,16 @@ function td({
370
371
  ), T = (e, t) => {
371
372
  var n, r;
372
373
  return ((r = (n = c == null ? void 0 : c.column_aliases) == null ? void 0 : n[e]) == null ? void 0 : r.trim()) || t;
373
- }, ar = U(!1);
374
+ }, lr = U(!1);
374
375
  P(() => {
375
- !c || ar.current || (ar.current = !0, Ie("-priority"));
376
+ !c || lr.current || (lr.current = !0, Ie("-priority"));
376
377
  }, [c]);
377
378
  const [J, Qa] = v(!1);
378
379
  P(() => {
379
380
  c != null && c.display_config && !Re.includes(C) && Ue(Re[0]);
380
381
  }, [c, C, Re]), P(() => {
381
382
  if (!(c != null && c.sources)) return;
382
- const e = on ? (b, R) => on.subscribeCollections(b, R) : k == null ? void 0 : k.subscribe;
383
+ const e = cn ? (b, R) => cn.subscribeCollections(b, R) : k == null ? void 0 : k.subscribe;
383
384
  if (!e) return;
384
385
  const t = [
385
386
  ...new Set(
@@ -395,7 +396,7 @@ function td({
395
396
  }, 1500));
396
397
  }, p = () => {
397
398
  o || (o = setTimeout(() => {
398
- if (o = null, dn.current > 0 || cn.current) {
399
+ if (o = null, mn.current > 0 || un.current) {
399
400
  At.current = [], Lt((b) => b + 1);
400
401
  return;
401
402
  }
@@ -407,10 +408,10 @@ function td({
407
408
  (F) => F ? as(F) : [F]
408
409
  );
409
410
  for (const F of Z) {
410
- const ne = F == null ? void 0 : F.changed_fields, Zt = (F == null ? void 0 : F.collection) != null ? `${F.collection}:${String(F.item)}` : null, wa = Zt != null && Jn.current.has(Zt);
411
+ const ne = F == null ? void 0 : F.changed_fields, tn = (F == null ? void 0 : F.collection) != null ? `${F.collection}:${String(F.item)}` : null, wa = tn != null && zn.current.has(tn);
411
412
  if (F && !F.action && (ne != null && ne.length) && ne.every((Ce) => Ce.startsWith("$"))) {
412
413
  if (ne.includes($t.tasks) && n.add("queue-task-counts"), ne.includes($t.integrations) && n.add("queue-integrations-summary"), ne.includes($t.addendums) && n.add("queue-collection-addendums"), ne.includes($t.lock) && Da((Ce) => Ce + 1), ne.includes($t.state)) {
413
- const Ce = di(wa, un.current === "kanban");
414
+ const Ce = ui(wa, pn.current === "kanban");
414
415
  X = !0, Ce.refresh && (R = !0), y += Ce.pill;
415
416
  }
416
417
  r || (r = setTimeout(() => {
@@ -422,25 +423,15 @@ function td({
422
423
  }
423
424
  X = !0;
424
425
  const to = (F == null ? void 0 : F.collection) != null && ds(F.collection, F.item);
425
- Zt && (wa || (F == null ? void 0 : F.action) === "create" || un.current === "kanban") ? (R = !0, to || At.current.push({ key: Zt, by: null })) : y += 1;
426
+ tn && (wa || (F == null ? void 0 : F.action) === "create" || pn.current === "kanban") ? (R = !0, to || At.current.push({ key: tn, by: null })) : y += 1;
426
427
  }
427
428
  y > 0 && Lt((F) => F + y), R && p(), X && m();
428
- }, w = e(t, (b) => Io(sn, [b ?? {}], S));
429
+ }, w = e(t, (b) => Io(dn, [b ?? {}], S));
429
430
  return () => {
430
- w(), Vo(sn), r && clearTimeout(r), o && clearTimeout(o), s && clearTimeout(s);
431
+ w(), Vo(dn), r && clearTimeout(r), o && clearTimeout(o), s && clearTimeout(s);
431
432
  };
432
- }, [on, k, c == null ? void 0 : c.sources, f, l, N, sn]);
433
- const Ee = Do(_, 350), Ba = JSON.stringify(Ee) === JSON.stringify(_), hn = U(!1), ve = C === "table" && !!$, lr = (() => {
434
- const e = /* @__PURE__ */ new Set();
435
- for (const t of (c == null ? void 0 : c.extra_field_meta) ?? [])
436
- t.aggregate && t.aggregate !== "count" && e.add(t.path);
437
- for (const t of (c == null ? void 0 : c.sources) ?? []) {
438
- for (const [n, r] of Object.entries(t.column_formats ?? {}))
439
- (r == null ? void 0 : r.type) === "number" && e.add(n);
440
- t.type === "addendums" && e.add("cost_impact");
441
- }
442
- return [...e].slice(0, 12);
443
- })(), we = (() => {
433
+ }, [cn, k, c == null ? void 0 : c.sources, f, l, N, dn]);
434
+ const Ee = Do(_, 350), Ba = JSON.stringify(Ee) === JSON.stringify(_), gn = U(!1), ve = C === "table" && !!$, or = ci(c), we = (() => {
444
435
  const e = {};
445
436
  for (const [t, n] of Object.entries(Ee))
446
437
  if (n) {
@@ -489,8 +480,8 @@ function td({
489
480
  staleTime: 3e4
490
481
  }), Mt = (e) => Wa.find((t) => t.queue_view_id === e), Ha = (e) => {
491
482
  const t = Mt(e);
492
- (t ? h.request(In(`/notification-subscriptions/${t.id}`)) : h.request(
493
- se("/notification-subscriptions", {
483
+ (t ? h.request(Vn(`/notification-subscriptions/${t.id}`)) : h.request(
484
+ ie("/notification-subscriptions", {
494
485
  queue_id: l,
495
486
  queue_view_id: e,
496
487
  digest_frequency: "instant"
@@ -500,15 +491,15 @@ function td({
500
491
  t ? "Unsubscribed" : "Subscribed — new arrivals in this view notify you"
501
492
  ), f.invalidateQueries({ queryKey: ["queue-view-subs", l] });
502
493
  }).catch((r) => O.error(qt(r, "Failed")));
503
- }, [or, fn] = v(null), gn = [
494
+ }, [sr, xn] = v(null), yn = [
504
495
  ...new Set(
505
496
  ((c == null ? void 0 : c.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
506
497
  )
507
498
  ], { data: Ya = {} } = W({
508
- queryKey: ["queue-custom-actions", l, gn.join(",")],
499
+ queryKey: ["queue-custom-actions", l, yn.join(",")],
509
500
  queryFn: async () => {
510
501
  const e = {};
511
- for (const t of gn.slice(0, 6))
502
+ for (const t of yn.slice(0, 6))
512
503
  try {
513
504
  const n = await h.request(
514
505
  L("/custom-actions", { collection: t })
@@ -519,22 +510,22 @@ function td({
519
510
  }
520
511
  return e;
521
512
  },
522
- enabled: gn.length > 0,
513
+ enabled: yn.length > 0,
523
514
  staleTime: 6e4
524
515
  }), Ja = (e) => Ya[e] ?? [], za = (e, t) => {
525
- h.request(se(`/custom-actions/${e.id}/execute`, { item: t.item_id })).then(() => {
516
+ h.request(ie(`/custom-actions/${e.id}/execute`, { item: t.item_id })).then(() => {
526
517
  O.success(`${e.label} ran`), f.invalidateQueries({ queryKey: ["queue-items", l] });
527
518
  }).catch((n) => {
528
519
  const r = n.response;
529
520
  O.error((r == null ? void 0 : r.error) ?? qt(n, `${e.label} failed`));
530
521
  });
531
- }, { data: xn = [] } = W({
522
+ }, { data: kn = [] } = W({
532
523
  queryKey: ["queue-triage-labels", l],
533
524
  queryFn: () => h.request(L(`/queues/${l}/triage-labels`)).then((e) => e.data ?? []).catch(() => []),
534
525
  staleTime: 3e4
535
- }), sr = (e, t) => {
526
+ }), ir = (e, t) => {
536
527
  h.request(
537
- se(`/queues/${l}/triage-labels/toggle`, {
528
+ ie(`/queues/${l}/triage-labels/toggle`, {
538
529
  collection: e.collection,
539
530
  item_id: e.item_id,
540
531
  label: t
@@ -544,11 +535,11 @@ function td({
544
535
  }).catch((n) => O.error(qt(n, "Label failed")));
545
536
  }, {
546
537
  data: i,
547
- isLoading: ir,
538
+ isLoading: cr,
548
539
  isFetching: dt,
549
540
  isPlaceholderData: Xa,
550
- dataUpdatedAt: ce,
551
- isError: cr,
541
+ dataUpdatedAt: le,
542
+ isError: dr,
552
543
  error: Za,
553
544
  refetch: el
554
545
  } = W({
@@ -562,7 +553,7 @@ function td({
562
553
  $
563
554
  ],
564
555
  queryFn: async () => {
565
- const e = !ve && C === "table", t = JSON.stringify([l, g, I, we, mn]), n = e ? Ho(Hn.current, t, de, "").after : void 0, r = await h.request(
556
+ const e = !ve && C === "table", t = JSON.stringify([l, g, I, we, bn]), n = e ? Ho(Yn.current, t, de, "").after : void 0, r = await h.request(
566
557
  L(`/queues/${l}/items`, {
567
558
  scope: g,
568
559
  // Last State Change is Aging read the other way round: the newest
@@ -573,11 +564,11 @@ function td({
573
564
  // Kanban renders the full matching set, grouped client-side.
574
565
  ...ve ? {
575
566
  group_by: $,
576
- ...lr.length ? { group_sums: lr.join(",") } : {}
577
- } : C === "table" ? { page: de, limit: mn, ...n ? { after: n } : {} } : {}
567
+ ...or.length ? { group_sums: or.join(",") } : {}
568
+ } : C === "table" ? { page: de, limit: bn, ...n ? { after: n } : {} } : {}
578
569
  })
579
570
  );
580
- return n && Yo(Hn.current, t, de, r.next_cursor), r;
571
+ return n && Yo(Yn.current, t, de, r.next_cursor), r;
581
572
  },
582
573
  // Wait for display_config AND scope seeding so the first fetch uses the
583
574
  // configured defaults and already carries the viewer's restricted filters.
@@ -586,33 +577,33 @@ function td({
586
577
  // first fetch went out WITHOUT the seeded scope and refired ~350ms later
587
578
  // with it (3.3s + 8.7s of work for one page). The first fetch now also
588
579
  // waits for the debounced copy to settle; later typing still debounces.
589
- enabled: !!l && J && tr && (hn.current || Ba),
580
+ enabled: !!l && J && nr && (gn.current || Ba),
590
581
  // Keep the previous page rendered while a sort/filter/page change refetches —
591
582
  // swapping to skeletons collapsed the table height and jittered the page.
592
583
  placeholderData: (e) => e
593
584
  });
594
- i && !hn.current && (hn.current = !0);
585
+ i && !gn.current && (gn.current = !0);
595
586
  const We = Object.entries(me.current).filter(
596
587
  ([e, t]) => {
597
588
  var n;
598
589
  return !((n = Te[e.slice(6)]) != null && n.length) && JSON.stringify(we[e] ?? null) === JSON.stringify(t);
599
590
  }
600
- ).map(([e]) => e), dr = We.length > 0 && Object.keys(we).every((e) => We.includes(e)), ur = Object.fromEntries(
591
+ ).map(([e]) => e), ur = We.length > 0 && Object.keys(we).every((e) => We.includes(e)), mr = Object.fromEntries(
601
592
  Object.entries(we).filter(([e]) => !We.includes(e))
602
593
  ), { data: tl } = W({
603
- queryKey: ["queue-default-hidden", l, g, ur],
604
- enabled: !!l && !!i && !dt && i.total === 0 && ((sa = i.empty) == null ? void 0 : sa.reason) === "filters" && We.length > 0 && !dr,
594
+ queryKey: ["queue-default-hidden", l, g, mr],
595
+ enabled: !!l && !!i && !dt && i.total === 0 && ((sa = i.empty) == null ? void 0 : sa.reason) === "filters" && We.length > 0 && !ur,
605
596
  staleTime: 3e4,
606
597
  retry: !1,
607
598
  queryFn: () => h.request(
608
599
  L(`/queues/${l}/items`, {
609
600
  scope: g,
610
- filters: JSON.stringify(ur),
601
+ filters: JSON.stringify(mr),
611
602
  page: 1,
612
603
  limit: 1
613
604
  })
614
605
  ).then((e) => Number(e.total ?? 0))
615
- }), be = dr ? Math.max(0, (((ia = i == null ? void 0 : i.stats) == null ? void 0 : ia.total) ?? 0) - ((i == null ? void 0 : i.total) ?? 0)) : tl ?? 0, mr = (e) => We.map(e).join(" and "), pr = () => {
606
+ }), be = ur ? Math.max(0, (((ia = i == null ? void 0 : i.stats) == null ? void 0 : ia.total) ?? 0) - ((i == null ? void 0 : i.total) ?? 0)) : tl ?? 0, pr = (e) => We.map(e).join(" and "), br = () => {
616
607
  Q((e) => {
617
608
  const t = { ...e };
618
609
  for (const n of We) delete t[n];
@@ -620,28 +611,28 @@ function td({
620
611
  }), A(1);
621
612
  };
622
613
  P(() => {
623
- if (typeof window > "u" || !ce) return;
614
+ if (typeof window > "u" || !le) return;
624
615
  const e = window;
625
616
  e.__nvrQueueTrace || (e.__nvrQueueTrace = []);
626
617
  const t = e.__nvrQueueTrace, n = {
627
618
  queue: l,
628
- at: ce,
619
+ at: le,
629
620
  scope: g,
630
621
  sort: I,
631
622
  filters: JSON.stringify(Ee),
632
623
  page: de
633
624
  }, r = t.find((o) => o.queue === l);
634
- t.push(n), t.length > 50 && t.shift(), r && r !== n && ce - Number(r.at) < 2e3 && t.filter((o) => o.queue === l).length === 2 && console.warn("[queue] duplicate first fetch", { first: r, second: n });
635
- }, [ce]);
636
- const He = ir && !i || !J || !tr && !i, br = (dt && !ir || Xa && dt) && !ue.current, nl = V(
625
+ t.push(n), t.length > 50 && t.shift(), r && r !== n && le - Number(r.at) < 2e3 && t.filter((o) => o.queue === l).length === 2 && console.warn("[queue] duplicate first fetch", { first: r, second: n });
626
+ }, [le]);
627
+ const He = cr && !i || !J || !nr && !i, hr = (dt && !cr || Xa && dt) && !ue.current, nl = V(
637
628
  () => (ve ? [] : (i == null ? void 0 : i.data) ?? []).slice(0, 100).map((e) => ({ collection: e.collection, item: e.item_id })),
638
629
  [ve, i == null ? void 0 : i.data]
639
- ), rl = ms(nl), Qt = xi(), hr = Ko(dt && !ue.current), al = Po({
630
+ ), rl = ms(nl), Qt = yi(), fr = Ko(dt && !ue.current), al = Po({
640
631
  pending: dt && !ue.current,
641
632
  request: l != null ? { method: "GET", url: `/queues/${l}/items` } : null,
642
633
  noun: "items"
643
634
  }), ll = us();
644
- async function fr(e, t) {
635
+ async function gr(e, t) {
645
636
  var p;
646
637
  const r = (await h.request(L(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
647
638
  if (!r || r.states.length === 0)
@@ -653,10 +644,10 @@ function td({
653
644
  );
654
645
  if (!s) throw new Error("No transition available to move this item here");
655
646
  let m = null;
656
- if (yi(s) && (m = await Qt.ask(((p = s.label) == null ? void 0 : p.trim()) || "Move"), !m))
647
+ if (ki(s) && (m = await Qt.ask(((p = s.label) == null ? void 0 : p.trim()) || "Move"), !m))
657
648
  throw new Error("Not moved — this move needs a note");
658
649
  await h.request(
659
- se(`/pipelines/instance/${e.collection}/${e.item_id}/transition`, {
650
+ ie(`/pipelines/instance/${e.collection}/${e.item_id}/transition`, {
660
651
  transition_id: s.id,
661
652
  ...m ? { comment: m } : {}
662
653
  })
@@ -664,7 +655,7 @@ function td({
664
655
  }
665
656
  const ol = $e({
666
657
  mutationFn: async ({ item: e, targetState: t }) => {
667
- await fr(e, t);
658
+ await gr(e, t);
668
659
  },
669
660
  onSuccess: () => {
670
661
  f.invalidateQueries({ queryKey: ["queue-items", l, g] });
@@ -674,7 +665,7 @@ function td({
674
665
  }
675
666
  }), Le = $e({
676
667
  mutationFn: (e) => h.request(
677
- se(`/queues/${l}/claim`, {
668
+ ie(`/queues/${l}/claim`, {
678
669
  source_collection: e.collection,
679
670
  item_id: e.item_id
680
671
  })
@@ -683,7 +674,7 @@ function td({
683
674
  onError: () => O.error("Failed to claim item")
684
675
  }), Ye = $e({
685
676
  mutationFn: (e) => h.request(
686
- se(`/queues/${l}/release`, {
677
+ ie(`/queues/${l}/release`, {
687
678
  source_collection: e.collection,
688
679
  item_id: e.item_id
689
680
  })
@@ -694,13 +685,13 @@ function td({
694
685
  queryKey: ["queue-column-prefs", l],
695
686
  queryFn: () => h.request(L(`/queues/${l}/column-prefs`)),
696
687
  enabled: !!l
697
- }), [Bt, jt] = v(null), [ze, yn] = v(null);
688
+ }), [Bt, jt] = v(null), [ze, vn] = v(null);
698
689
  P(() => {
699
- Je && yn(Je.data.default_view_id);
690
+ Je && vn(Je.data.default_view_id);
700
691
  }, [Je]);
701
- const [sl, gr] = v({}), he = ve ? (i == null ? void 0 : i.groups) ?? null : null, Ut = (he ?? []).filter((e) => !ke.has(e.key)).map((e) => e.key).flatMap(
692
+ const [sl, xr] = v({}), he = ve ? (i == null ? void 0 : i.groups) ?? null : null, Ut = (he ?? []).filter((e) => !ke.has(e.key)).map((e) => e.key).flatMap(
702
693
  (e) => Array.from({ length: sl[e] ?? 1 }, (t, n) => ({ key: e, page: n + 1 }))
703
- ), kn = Be({
694
+ ), wn = Be({
704
695
  queries: Ut.map(({ key: e, page: t }) => ({
705
696
  queryKey: [
706
697
  "queue-items",
@@ -721,22 +712,22 @@ function td({
721
712
  group_by: $,
722
713
  group_key: e,
723
714
  page: t,
724
- limit: vi
715
+ limit: wi
725
716
  })
726
717
  ).then((n) => ({ key: e, rows: n.data })),
727
718
  enabled: !!i && ve,
728
719
  placeholderData: (n) => n
729
720
  }))
730
- }), il = kn.map((e) => e.dataUpdatedAt).join(","), vn = V(() => {
721
+ }), il = wn.map((e) => e.dataUpdatedAt).join(","), _n = V(() => {
731
722
  const e = /* @__PURE__ */ new Map();
732
- return kn.forEach((t, n) => {
723
+ return wn.forEach((t, n) => {
733
724
  if (!t.data) return;
734
725
  const r = Ut[n].key;
735
726
  e.set(r, [...e.get(r) ?? [], ...t.data.rows]);
736
727
  }), e;
737
728
  }, [il, Ut.map((e) => `${e.key}\0${e.page}`).join("")]), cl = new Set(
738
- kn.flatMap((e, t) => e.isFetching ? [Ut[t].key] : [])
739
- ), q = he ? [...vn.values()].flat() : (i == null ? void 0 : i.data) ?? [];
729
+ wn.flatMap((e, t) => e.isFetching ? [Ut[t].key] : [])
730
+ ), q = he ? [..._n.values()].flat() : (i == null ? void 0 : i.data) ?? [];
740
731
  $s(
741
732
  l ? {
742
733
  queue: {
@@ -748,8 +739,8 @@ function td({
748
739
  }
749
740
  } : null
750
741
  );
751
- const dl = qs(), ut = q.some((e) => e.fulfilment !== void 0), mt = q.some((e) => e.send_backs !== void 0), { data: pt, dataUpdatedAt: xr } = W({
752
- queryKey: ["queue-live-stats", l, g, Ee, zn],
742
+ const dl = qs(), ut = q.some((e) => e.fulfilment !== void 0), mt = q.some((e) => e.send_backs !== void 0), { data: pt, dataUpdatedAt: yr } = W({
743
+ queryKey: ["queue-live-stats", l, g, Ee, Xn],
753
744
  queryFn: () => h.request(
754
745
  L(`/queues/${l}/items`, {
755
746
  scope: g,
@@ -758,36 +749,40 @@ function td({
758
749
  limit: 1
759
750
  })
760
751
  ),
761
- enabled: zn > 0 && !!i,
752
+ enabled: Xn > 0 && !!i,
762
753
  staleTime: Number.POSITIVE_INFINITY,
763
754
  placeholderData: (e) => e,
764
755
  retry: !1
765
- }), It = !!pt && xr > ce, x = It ? pt.stats : i == null ? void 0 : i.stats, z = It ? pt.filtered_stats ?? null : (i == null ? void 0 : i.filtered_stats) ?? null, yr = It ? pt.state_counts : i == null ? void 0 : i.state_counts;
756
+ }), It = !!pt && yr > le, x = It ? pt.stats : i == null ? void 0 : i.stats, z = It ? pt.filtered_stats ?? null : (i == null ? void 0 : i.filtered_stats) ?? null, kr = It ? pt.state_counts : i == null ? void 0 : i.state_counts;
766
757
  P(() => {
767
- !It || !ci({
758
+ !It || !di({
768
759
  liveTotal: pt.total,
769
760
  rowsTotal: i == null ? void 0 : i.total,
770
- table: C === "table" && !ve,
771
- busy: dn.current > 0 || cn.current
772
- }) || (ue.current = !0, f.invalidateQueries({ queryKey: ["queue-items", l, g] }).finally(() => {
761
+ // Grouped tables too (army 8 b08-N6): their headers count the whole set, and
762
+ // nothing else re-read them — "37 of 38" with the strip at 38 for minutes.
763
+ table: C === "table",
764
+ busy: mn.current > 0 || un.current
765
+ }) || (ue.current = !0, f.invalidateQueries({
766
+ queryKey: ve ? ["queue-items", l] : ["queue-items", l, g]
767
+ }).finally(() => {
773
768
  ue.current = !1;
774
769
  }));
775
- }, [xr]);
776
- const wn = (ca = z ?? x) == null ? void 0 : ca.aging, kr = U(void 0);
777
- !_.aging_hours && wn && (kr.current = wn);
778
- const bt = _.aging_hours ? kr.current ?? (x == null ? void 0 : x.aging) : wn ?? (x == null ? void 0 : x.aging);
779
- Jn.current = new Set(q.map((e) => `${e.collection}:${e.item_id}`));
770
+ }, [yr]);
771
+ const Nn = (ca = z ?? x) == null ? void 0 : ca.aging, vr = U(void 0);
772
+ !_.aging_hours && Nn && (vr.current = Nn);
773
+ const bt = _.aging_hours ? vr.current ?? (x == null ? void 0 : x.aging) : Nn ?? (x == null ? void 0 : x.aging);
774
+ zn.current = new Set(q.map((e) => `${e.collection}:${e.item_id}`));
780
775
  const ht = os(
781
776
  q.map((e) => ({ collection: e.collection, id: e.item_id })),
782
777
  Oa
783
- ), vr = U(ce), wr = U(0);
784
- !ue.current && ce !== wr.current && (vr.current = ce), P(() => {
778
+ ), wr = U(le), _r = U(0);
779
+ !ue.current && le !== _r.current && (wr.current = le), P(() => {
785
780
  const e = new Set(q.map((t) => `${t.collection}:${t.item_id}`));
786
781
  if (ue.current) {
787
- ue.current = !1, wr.current = ce;
782
+ ue.current = !1, _r.current = le;
788
783
  const t = At.current;
789
784
  At.current = [];
790
- const n = Xn.current, r = /* @__PURE__ */ new Set();
785
+ const n = Zn.current, r = /* @__PURE__ */ new Set();
791
786
  for (const o of t)
792
787
  !e.has(o.key) || r.has(o.key) || (r.add(o.key), Fe.note([o.key], o.by, n && !n.has(o.key) ? "create" : "update"));
793
788
  if (n) {
@@ -795,10 +790,10 @@ function td({
795
790
  o.length > 0 && o.length <= 20 && Fe.note(o, null, "create");
796
791
  }
797
792
  }
798
- Xn.current = e;
799
- }, [ce]), P(() => {
793
+ Zn.current = e;
794
+ }, [le]), P(() => {
800
795
  Lt(0);
801
- }, [i]);
796
+ }, [le]);
802
797
  function ul() {
803
798
  f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-workload", l] }), Lt(0);
804
799
  }
@@ -848,39 +843,39 @@ function td({
848
843
  }).catch(() => !1),
849
844
  staleTime: 300 * 1e3
850
845
  }))
851
- }).some((e) => e.data === !0), { data: _n = [] } = W({
846
+ }).some((e) => e.data === !0), { data: Sn = [] } = W({
852
847
  queryKey: ["queue-integrations-collections"],
853
848
  queryFn: () => h.request(L("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
854
849
  staleTime: 300 * 1e3
855
- }), _e = gt.some((e) => _n.includes(e)), Nn = V(() => {
850
+ }), _e = gt.some((e) => Sn.includes(e)), Cn = V(() => {
856
851
  var t;
857
852
  const e = {};
858
853
  if (!_e) return e;
859
854
  for (const n of q) {
860
- if (!_n.includes(n.collection)) continue;
855
+ if (!Sn.includes(n.collection)) continue;
861
856
  const r = e[t = n.collection] ?? (e[t] = []);
862
857
  r.length < 500 && r.push(n.item_id);
863
858
  }
864
859
  return e;
865
- }, [q, _n, _e]), _r = Object.keys(Nn), Nr = Be({
866
- queries: _r.map((e) => ({
867
- queryKey: ["queue-integrations-summary", e, Nn[e].join(",")],
860
+ }, [q, Sn, _e]), Nr = Object.keys(Cn), Sr = Be({
861
+ queries: Nr.map((e) => ({
862
+ queryKey: ["queue-integrations-summary", e, Cn[e].join(",")],
868
863
  queryFn: () => h.request(
869
- se("/integration-obligations/summary", {
864
+ ie("/integration-obligations/summary", {
870
865
  collection: e,
871
- ids: Nn[e]
866
+ ids: Cn[e]
872
867
  })
873
868
  ).then((t) => t.data ?? {}).catch(() => ({})),
874
869
  staleTime: 3e4
875
870
  }))
876
- }), pl = Nr.map((e) => e.dataUpdatedAt).join(","), bl = V(() => {
871
+ }), pl = Sr.map((e) => e.dataUpdatedAt).join(","), bl = V(() => {
877
872
  const e = {};
878
- return _r.forEach((t, n) => {
873
+ return Nr.forEach((t, n) => {
879
874
  var o;
880
- const r = ((o = Nr[n]) == null ? void 0 : o.data) ?? {};
875
+ const r = ((o = Sr[n]) == null ? void 0 : o.data) ?? {};
881
876
  for (const [s, m] of Object.entries(r)) e[`${t}:${s}`] = m;
882
877
  }), e;
883
- }, [pl]), Sn = V(() => {
878
+ }, [pl]), $n = V(() => {
884
879
  var t;
885
880
  const e = {};
886
881
  for (const n of q) {
@@ -890,21 +885,21 @@ function td({
890
885
  r.length < 500 && r.push(n.item_id);
891
886
  }
892
887
  return e;
893
- }, [q]), Cn = Object.keys(Sn), Sr = Be({
894
- queries: Cn.map((e) => ({
895
- queryKey: ["queue-task-counts", e, Sn[e].join(",")],
888
+ }, [q]), qn = Object.keys($n), Cr = Be({
889
+ queries: qn.map((e) => ({
890
+ queryKey: ["queue-task-counts", e, $n[e].join(",")],
896
891
  queryFn: () => h.request(
897
- se("/tasks/counts", { collection: e, ids: Sn[e] })
892
+ ie("/tasks/counts", { collection: e, ids: $n[e] })
898
893
  ).then((t) => t.data ?? {}).catch(() => ({})),
899
894
  staleTime: 3e4
900
895
  }))
901
- }), hl = Sr.map((e) => e.dataUpdatedAt).join(","), fl = V(() => {
896
+ }), hl = Cr.map((e) => e.dataUpdatedAt).join(","), fl = V(() => {
902
897
  const e = {};
903
- return Cn.forEach((t, n) => {
898
+ return qn.forEach((t, n) => {
904
899
  var r;
905
- for (const [o, s] of Object.entries(((r = Sr[n]) == null ? void 0 : r.data) ?? {})) e[`${t}:${o}`] = s;
900
+ for (const [o, s] of Object.entries(((r = Cr[n]) == null ? void 0 : r.data) ?? {})) e[`${t}:${o}`] = s;
906
901
  }), e;
907
- }, [hl]), Cr = Cn.length > 0, $r = Be({
902
+ }, [hl]), $r = qn.length > 0, qr = Be({
908
903
  queries: gt.map((e) => ({
909
904
  queryKey: ["queue-collection-risk-rules", e],
910
905
  queryFn: () => h.request(
@@ -912,9 +907,9 @@ function td({
912
907
  ).then((t) => t.data ?? []).catch(() => []),
913
908
  staleTime: 300 * 1e3
914
909
  }))
915
- }), gl = $r.map((e) => e.dataUpdatedAt).join(","), qr = V(() => {
910
+ }), gl = qr.map((e) => e.dataUpdatedAt).join(","), Fr = V(() => {
916
911
  const e = /* @__PURE__ */ new Map();
917
- for (const t of $r)
912
+ for (const t of qr)
918
913
  for (const n of t.data ?? []) {
919
914
  const r = e.get(n.name);
920
915
  e.set(n.name, {
@@ -923,7 +918,7 @@ function td({
923
918
  });
924
919
  }
925
920
  return [...e.values()];
926
- }, [gl]), Fr = Be({
921
+ }, [gl]), Tr = Be({
927
922
  queries: gt.map((e) => ({
928
923
  queryKey: ["queue-collection-states", e],
929
924
  queryFn: () => h.request(
@@ -931,57 +926,57 @@ function td({
931
926
  ).then((t) => t.data),
932
927
  staleTime: 300 * 1e3
933
928
  }))
934
- }), Tr = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), Ne = V(() => {
929
+ }), Rr = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), Ne = V(() => {
935
930
  const e = {};
936
- for (const t of Fr)
931
+ for (const t of Tr)
937
932
  (t.data ?? []).forEach((n, r) => {
938
933
  e[n.key] = { label: n.label, color: n.color, sort: r };
939
934
  });
940
935
  return e;
941
- }, [Fr.map((e) => e.data)]), Rr = x ? Object.entries(x.by_state).sort(
936
+ }, [Tr.map((e) => e.data)]), Er = x ? Object.entries(x.by_state).sort(
942
937
  (e, t) => {
943
938
  var n, r;
944
939
  return (((n = Ne[e[0]]) == null ? void 0 : n.sort) ?? Number.MAX_SAFE_INTEGER) - (((r = Ne[t[0]]) == null ? void 0 : r.sort) ?? Number.MAX_SAFE_INTEGER);
945
940
  }
946
- ) : [], Er = (e) => [...e].sort(
941
+ ) : [], Lr = (e) => [...e].sort(
947
942
  (t, n) => {
948
943
  var r, o;
949
944
  return (((r = Ne[t]) == null ? void 0 : r.sort) ?? Number.MAX_SAFE_INTEGER) - (((o = Ne[n]) == null ? void 0 : o.sort) ?? Number.MAX_SAFE_INTEGER);
950
945
  }
951
- ), $n = V(() => {
946
+ ), Fn = V(() => {
952
947
  const e = {};
953
948
  for (const [t, n] of Object.entries(Ne)) e[t] = n.label;
954
949
  return e;
955
- }, [Ne]), Ae = (e) => e ? e === "none" ? "No State" : $n[e] ?? Tr(e) : "—", xt = (e) => {
956
- if (e === tn) return "Addendums";
950
+ }, [Ne]), Ae = (e) => e ? e === "none" ? "No State" : Fn[e] ?? Rr(e) : "—", xt = (e) => {
951
+ if (e === rn) return "Addendums";
957
952
  const t = (ml ?? []).find((n) => n.collection === e);
958
- return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || Tr(e);
959
- }, le = V(() => $ ? he ? he.map((e) => ({
953
+ return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || Rr(e);
954
+ }, oe = V(() => $ ? he ? he.map((e) => ({
960
955
  key: e.key,
961
- rows: vn.get(e.key) ?? [],
956
+ rows: _n.get(e.key) ?? [],
962
957
  breached: e.breached,
963
958
  atRisk: e.at_risk,
964
959
  count: e.count,
965
960
  sums: e.sums ?? {}
966
- })) : bs(q, $).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [q, $, he, vn]), qn = U(null);
961
+ })) : bs(q, $).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [q, $, he, _n]), Tn = U(null);
967
962
  P(() => {
968
- if (!$ || !le) {
969
- qn.current = null;
963
+ if (!$ || !oe) {
964
+ Tn.current = null;
970
965
  return;
971
966
  }
972
- if (ve && !he || qn.current === $) return;
973
- qn.current = $;
974
- const e = le.reduce((t, n) => t + n.count, 0);
975
- nn(e > 200 ? new Set(le.map((t) => t.key)) : /* @__PURE__ */ new Set()), gr({});
967
+ if (ve && !he || Tn.current === $) return;
968
+ Tn.current = $;
969
+ const e = oe.reduce((t, n) => t + n.count, 0);
970
+ an(e > 200 ? new Set(oe.map((t) => t.key)) : /* @__PURE__ */ new Set()), xr({});
976
971
  }, [$, he]);
977
972
  function xl(e) {
978
- nn((t) => {
973
+ an((t) => {
979
974
  const n = new Set(t);
980
975
  return n.has(e) ? n.delete(e) : n.add(e), n;
981
976
  });
982
977
  }
983
- const oe = V(() => le ? le.filter((e) => !ke.has(e.key)).flatMap((e) => e.rows) : q, [le, q, ke]), D = (e) => `${e.collection}:${e.item_id}`, [Se, Oe] = v(null), [yl, Fn] = v(!1), [Vt, Gt] = v(null), Tn = (e) => {
984
- if (e.collection === tn && e.url) {
978
+ const se = V(() => oe ? oe.filter((e) => !ke.has(e.key)).flatMap((e) => e.rows) : q, [oe, q, ke]), D = (e) => `${e.collection}:${e.item_id}`, [Se, Oe] = v(null), [yl, Rn] = v(!1), [Vt, Gt] = v(null), En = (e) => {
979
+ if (e.collection === rn && e.url) {
985
980
  const t = e.url.match(/^\/collections\/([^/?]+)\/([^/?]+)(?:\?(.*))?$/);
986
981
  if (t) {
987
982
  const n = {};
@@ -1006,9 +1001,9 @@ function td({
1006
1001
  name: c.name,
1007
1002
  path: `${window.location.pathname}${window.location.search}`,
1008
1003
  at: Date.now(),
1009
- scroll: ((t = Ht.current) == null ? void 0 : t.scrollTop) ?? 0,
1004
+ scroll: ((t = Yt.current) == null ? void 0 : t.scrollTop) ?? 0,
1010
1005
  state: { scope: g, page: de, sort: I, filters: _, group_by: $, view: C }
1011
- }), H.open(Tn(e));
1006
+ }), H.open(En(e));
1012
1007
  }, [B, kt] = v(
1013
1008
  null
1014
1009
  );
@@ -1022,7 +1017,7 @@ function td({
1022
1017
  const Wt = (e) => {
1023
1018
  Gt(D(e));
1024
1019
  const t = (u == null ? void 0 : u.row_click) ?? "preview";
1025
- if (t === "full" || e.collection === tn) {
1020
+ if (t === "full" || e.collection === rn) {
1026
1021
  yt(e);
1027
1022
  return;
1028
1023
  }
@@ -1044,17 +1039,17 @@ function td({
1044
1039
  e && e !== Se && Oe(e);
1045
1040
  }, [q]);
1046
1041
  const kl = (e) => !e.claimed_by || e.claimed_by.id === N;
1047
- function Lr(e) {
1048
- const t = e ? oe.findIndex((r) => D(r) === D(e)) + 1 : 0, n = oe.slice(t).find(kl);
1042
+ function Ar(e) {
1043
+ const t = e ? se.findIndex((r) => D(r) === D(e)) + 1 : 0, n = se.slice(t).find(kl);
1049
1044
  if (!n) {
1050
- Fn(!1), Oe(null), O.info("Nothing left to work on — queue clear!");
1045
+ Rn(!1), Oe(null), O.info("Nothing left to work on — queue clear!");
1051
1046
  return;
1052
1047
  }
1053
1048
  if (Gt(D(n)), pe && !n.claimed_by && Le.mutate(n), (u == null ? void 0 : u.row_click) === "full") {
1054
1049
  yt(n);
1055
1050
  return;
1056
1051
  }
1057
- Fn(!0), Oe(n);
1052
+ Rn(!0), Oe(n);
1058
1053
  }
1059
1054
  P(() => {
1060
1055
  if (C !== "table") return;
@@ -1063,33 +1058,33 @@ function td({
1063
1058
  const n = t.target;
1064
1059
  if (n && (n.tagName === "INPUT" || n.tagName === "TEXTAREA" || n.tagName === "SELECT" || n.isContentEditable))
1065
1060
  return;
1066
- const r = Vt ? oe.findIndex((s) => D(s) === Vt) : -1;
1061
+ const r = Vt ? se.findIndex((s) => D(s) === Vt) : -1;
1067
1062
  if (t.key === "j" || t.key === "ArrowDown") {
1068
1063
  t.preventDefault();
1069
- const s = oe[Math.min(r + 1, oe.length - 1)];
1064
+ const s = se[Math.min(r + 1, se.length - 1)];
1070
1065
  s && Gt(D(s));
1071
1066
  } else if (t.key === "k" || t.key === "ArrowUp") {
1072
1067
  t.preventDefault();
1073
- const s = oe[Math.max(r - 1, 0)];
1068
+ const s = se[Math.max(r - 1, 0)];
1074
1069
  s && Gt(D(s));
1075
1070
  } else if (t.key === "Enter" && r >= 0 && !Se)
1076
- t.preventDefault(), Wt(oe[r]);
1071
+ t.preventDefault(), Wt(se[r]);
1077
1072
  else if (t.key === "c" && r >= 0 && pe) {
1078
1073
  t.preventDefault();
1079
- const s = oe[r];
1074
+ const s = se[r];
1080
1075
  ((o = s.claimed_by) == null ? void 0 : o.id) === N ? Ye.mutate(s) : Le.mutate(s);
1081
- } else t.key === "o" && r >= 0 && (t.preventDefault(), yt(oe[r]));
1076
+ } else t.key === "o" && r >= 0 && (t.preventDefault(), yt(se[r]));
1082
1077
  }
1083
1078
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
1084
- }, [C, oe, Vt, Se, N, Le, Ye, pe]);
1079
+ }, [C, se, Vt, Se, N, Le, Ye, pe]);
1085
1080
  const { data: j } = W({
1086
1081
  queryKey: ["queue-views", l],
1087
1082
  queryFn: () => h.request(L(`/queues/${l}/views`)),
1088
1083
  enabled: !!l
1089
- }), [Ze, et] = v(null), [vl, Rn] = v(!1), [En, Ar] = v(""), [Or, Dr] = v(!1), [vt, Kr] = v(!1);
1084
+ }), [Ze, et] = v(null), [vl, Ln] = v(!1), [Ht, Or] = v(""), [Dr, Kr] = v(!1), [vt, Pr] = v(!1);
1090
1085
  function wt(e) {
1091
1086
  const t = e.state ?? {};
1092
- Y(t.scope ?? "all"), Q({ ...me.current, ...t.filters ?? {} }), Ie(t.sort ?? ""), ot(t.group_by ?? null), jt(t.columns ?? null), an(t.pins ?? null), t.view && Ue(Re.includes(t.view) ? t.view : Re[0]), A(1), et(e.id);
1087
+ Y(t.scope ?? "all"), Q({ ...me.current, ...t.filters ?? {} }), Ie(t.sort ?? ""), ot(t.group_by ?? null), jt(t.columns ?? null), on(t.pins ?? null), t.view && Ue(Re.includes(t.view) ? t.view : Re[0]), A(1), et(e.id);
1093
1088
  }
1094
1089
  function wl() {
1095
1090
  var t, n;
@@ -1098,21 +1093,21 @@ function td({
1098
1093
  wt(e);
1099
1094
  return;
1100
1095
  }
1101
- Y(((t = c == null ? void 0 : c.display_config) == null ? void 0 : t.default_scope) ?? "all"), Q({ ...me.current }), Ie(""), ot(null), jt(null), an(null), (n = c == null ? void 0 : c.display_config) != null && n.default_view && Ue(c.display_config.default_view), A(1), et(null);
1096
+ Y(((t = c == null ? void 0 : c.display_config) == null ? void 0 : t.default_scope) ?? "all"), Q({ ...me.current }), Ie(""), ot(null), jt(null), on(null), (n = c == null ? void 0 : c.display_config) != null && n.default_view && Ue(c.display_config.default_view), A(1), et(null);
1102
1097
  }
1103
1098
  P(() => {
1104
1099
  if (J || !(c != null && c.display_config) || Je === void 0 || j === void 0) return;
1105
1100
  const e = Je.data.default_view_id, t = e != null ? j.data.find((r) => r.id === e) : void 0, n = j.data.find((r) => r.is_default);
1106
1101
  t ? wt(t) : n ? wt(n) : (Ue(c.display_config.default_view), Y(c.display_config.default_scope)), Qa(!0);
1107
1102
  }, [c, Je, j, J]);
1108
- const Ht = U(null), Yt = U(null);
1103
+ const Yt = U(null), Jt = U(null);
1109
1104
  P(() => {
1110
1105
  if (!J) return;
1111
1106
  const e = Us();
1112
1107
  if (!(e != null && e.restore) || e.queue_id !== l) return;
1113
1108
  Ta({ ...e, restore: !1 });
1114
1109
  const t = e.state ?? {};
1115
- t.scope && Y(t.scope), t.filters && Q({ ...me.current, ...t.filters }), t.sort != null && Ie(t.sort), ot(t.group_by ?? null), t.view && Ue(t.view), t.page && A(t.page), Yt.current = e.scroll ?? 0;
1110
+ t.scope && Y(t.scope), t.filters && Q({ ...me.current, ...t.filters }), t.sort != null && Ie(t.sort), ot(t.group_by ?? null), t.view && Ue(t.view), t.page && A(t.page), Jt.current = e.scroll ?? 0;
1116
1111
  }, [J, l]), P(() => {
1117
1112
  var s;
1118
1113
  if (!J || typeof window > "u") return;
@@ -1156,28 +1151,28 @@ function td({
1156
1151
  ...de > 1 ? { page: de } : {}
1157
1152
  });
1158
1153
  P(() => {
1159
- Yt.current == null || q.length === 0 || !Ht.current || (Ht.current.scrollTop = Yt.current, Yt.current = null);
1154
+ Jt.current == null || q.length === 0 || !Yt.current || (Yt.current.scrollTop = Jt.current, Jt.current = null);
1160
1155
  }, [q]);
1161
1156
  const { isAdmin: De } = Ca(), Nl = q.map((e) => `${e.collection}|${e.item_id}`).join(","), Sl = V(
1162
1157
  () => q.map((e) => ({ collection: e.collection, id: e.item_id })),
1163
1158
  [Nl]
1164
- ), Pr = Ys(Sl, De), Cl = (e) => Vt === D(e) ? (
1159
+ ), Mr = Ys(Sl, De), Cl = (e) => Vt === D(e) ? (
1165
1160
  // Pinned sticky cells use bg-inherit — the highlight must be
1166
1161
  // OPAQUE (nvr-cyan/5-over-white equivalents) or horizontally
1167
1162
  // scrolled content bleeds through the pinned columns. Same
1168
1163
  // pair DataTable uses for selected rows when pins are active.
1169
1164
  "bg-[#f2fdff] dark:bg-[#20303a]"
1170
- ) : e.at_risk ? ys(e.at_risk_color ?? "red") : void 0, Jt = De || (c == null ? void 0 : c.owner) != null && c.owner === N, $l = $e({
1165
+ ) : e.at_risk ? ys(e.at_risk_color ?? "red") : void 0, zt = De || (c == null ? void 0 : c.owner) != null && c.owner === N, $l = $e({
1171
1166
  mutationFn: ({ viewId: e, on: t }) => h.request($a(`/queues/views/${e}`, { is_default: t })),
1172
1167
  onSuccess: () => {
1173
1168
  f.invalidateQueries({ queryKey: ["queue-views", l] }), O.success("Queue default view updated");
1174
1169
  },
1175
1170
  onError: () => O.error("Could not update the queue default view")
1176
- }), Mr = $e({
1171
+ }), Xt = $e({
1177
1172
  mutationFn: () => h.request(
1178
- se(`/queues/${l}/views`, {
1179
- name: En.trim(),
1180
- is_shared: Jt && (Or || vt),
1173
+ ie(`/queues/${l}/views`, {
1174
+ name: Ht.trim(),
1175
+ is_shared: zt && (Dr || vt),
1181
1176
  is_default: vt,
1182
1177
  state: {
1183
1178
  scope: g,
@@ -1191,7 +1186,7 @@ function td({
1191
1186
  })
1192
1187
  ),
1193
1188
  onSuccess: (e) => {
1194
- Rn(!1), Ar(""), Dr(!1), Kr(!1), et(e.data.id), f.invalidateQueries({ queryKey: ["queue-views", l] }), O.success("View saved");
1189
+ Ln(!1), Or(""), Kr(!1), Pr(!1), et(e.data.id), f.invalidateQueries({ queryKey: ["queue-views", l] }), O.success("View saved");
1195
1190
  },
1196
1191
  onError: () => O.error("Failed to save view")
1197
1192
  }), [Qr, Br] = v(null), Ke = $e({
@@ -1212,21 +1207,21 @@ function td({
1212
1207
  f.invalidateQueries({ queryKey: ["queue-views", l] }), Br(t.id), setTimeout(() => Br((n) => n === t.id ? null : n), 2e3), O.success(`Saved "${t.name}" with the current filters, scope and sort`);
1213
1208
  },
1214
1209
  onError: () => O.error("Failed to update view")
1215
- }), [Ln, zt] = v(null);
1210
+ }), [An, Zt] = v(null);
1216
1211
  P(() => {
1217
- if (Ln == null) return;
1218
- const e = setTimeout(() => zt(null), 5e3);
1212
+ if (An == null) return;
1213
+ const e = setTimeout(() => Zt(null), 5e3);
1219
1214
  return () => clearTimeout(e);
1220
- }, [Ln]);
1215
+ }, [An]);
1221
1216
  const jr = $e({
1222
- mutationFn: (e) => h.request(In(`/queues/views/${e}`)),
1217
+ mutationFn: (e) => h.request(Vn(`/queues/views/${e}`)),
1223
1218
  onSuccess: (e, t) => {
1224
- zt(null), f.invalidateQueries({ queryKey: ["queue-views", l] }), et(null), ze === t && yn(null);
1219
+ Zt(null), f.invalidateQueries({ queryKey: ["queue-views", l] }), et(null), ze === t && vn(null);
1225
1220
  },
1226
1221
  onError: () => O.error("Failed to delete view")
1227
1222
  }), ql = $e({
1228
1223
  mutationFn: (e) => h.request(Qo(`/queues/${l}/default-view`, { view_id: e })),
1229
- onMutate: (e) => yn(e),
1224
+ onMutate: (e) => vn(e),
1230
1225
  onSuccess: (e, t) => {
1231
1226
  f.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), O.success(
1232
1227
  t === null ? "Reverted to the general default" : "Set as your default view"
@@ -1240,9 +1235,9 @@ function td({
1240
1235
  };
1241
1236
  P(() => {
1242
1237
  C !== "table" && ee && (Ur(!1), tt([]));
1243
- }, [C, ee]), Mo(), dn.current = Pe.length;
1238
+ }, [C, ee]), Mo(), mn.current = Pe.length;
1244
1239
  const [Ir, Vr] = v(!1);
1245
- async function An(e, t) {
1240
+ async function On(e, t) {
1246
1241
  const n = q.filter((m) => Pe.includes(D(m)));
1247
1242
  Vr(!0), Qt.beginBatch();
1248
1243
  const r = await Promise.allSettled(n.map(t));
@@ -1265,14 +1260,14 @@ function td({
1265
1260
  if (t) return nt(e, t);
1266
1261
  }
1267
1262
  return e;
1268
- }, Rl = le == null ? void 0 : le.map((e) => ({
1263
+ }, Rl = oe == null ? void 0 : oe.map((e) => ({
1269
1264
  key: e.key,
1270
1265
  rows: e.rows,
1271
1266
  header: /* @__PURE__ */ d(qe, { children: [
1272
1267
  /* @__PURE__ */ a("span", { children: Tl(e.key) }),
1273
1268
  /* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
1274
1269
  "(",
1275
- ie(e.count),
1270
+ ce(e.count),
1276
1271
  ")"
1277
1272
  ] }),
1278
1273
  Object.entries(e.sums).map(([t, n]) => {
@@ -1286,7 +1281,7 @@ function td({
1286
1281
  T(`extra.${t}`, je(t)),
1287
1282
  ":",
1288
1283
  " ",
1289
- r ? nt(String(n), r) : ie(n)
1284
+ r ? nt(String(n), r) : ce(n)
1290
1285
  ]
1291
1286
  },
1292
1287
  t
@@ -1299,14 +1294,14 @@ function td({
1299
1294
  type: "button",
1300
1295
  "data-queue-group-more": e.key,
1301
1296
  onClick: (t) => {
1302
- t.stopPropagation(), gr((n) => ({ ...n, [e.key]: (n[e.key] ?? 1) + 1 }));
1297
+ t.stopPropagation(), xr((n) => ({ ...n, [e.key]: (n[e.key] ?? 1) + 1 }));
1303
1298
  },
1304
1299
  className: "rounded px-1.5 py-0.5 text-[11px] font-medium text-nvr-navy hover:bg-nvr-cyan/10 dark:text-nvr-cyan",
1305
1300
  children: [
1306
1301
  "Showing ",
1307
- ie(e.rows.length),
1302
+ ce(e.rows.length),
1308
1303
  " of ",
1309
- ie(e.count),
1304
+ ce(e.count),
1310
1305
  " · Show more"
1311
1306
  ]
1312
1307
  }
@@ -1320,8 +1315,8 @@ function td({
1320
1315
  " at risk"
1321
1316
  ] })
1322
1317
  ] })
1323
- })), On = (((da = i == null ? void 0 : i.available_values.collection) == null ? void 0 : da.length) ?? 0) > 1, Gr = q.some((e) => !!e.unseen) || ht.size > 0 || q.some((e) => Fe.isNew(D(e))), Wr = [
1324
- ...On ? [
1318
+ })), Dn = (((da = i == null ? void 0 : i.available_values.collection) == null ? void 0 : da.length) ?? 0) > 1, Gr = q.some((e) => !!e.unseen) || ht.size > 0 || q.some((e) => Fe.isNew(D(e))), Wr = [
1319
+ ...Dn ? [
1325
1320
  {
1326
1321
  key: "collection",
1327
1322
  header: T("collection", "Collection"),
@@ -1407,7 +1402,7 @@ function td({
1407
1402
  key: "aging_hours",
1408
1403
  header: T("aging_hours", "Aging"),
1409
1404
  sortable: !0,
1410
- render: (e) => Ni(e.aging_hours)
1405
+ render: (e) => Si(e.aging_hours)
1411
1406
  },
1412
1407
  {
1413
1408
  // When the record entered its current state — the same moment Aging
@@ -1421,7 +1416,7 @@ function td({
1421
1416
  key: "sla_status",
1422
1417
  header: T("sla_status", "SLA"),
1423
1418
  sortable: !0,
1424
- render: (e) => /* @__PURE__ */ a(Si, { status: e.sla_status })
1419
+ render: (e) => /* @__PURE__ */ a(Ci, { status: e.sla_status })
1425
1420
  },
1426
1421
  {
1427
1422
  key: "at_risk",
@@ -1440,7 +1435,7 @@ function td({
1440
1435
  key: "addendums",
1441
1436
  header: T("addendums", "Addendums"),
1442
1437
  sortable: !1,
1443
- render: (e) => /* @__PURE__ */ a(_i, { summary: e.addendums })
1438
+ render: (e) => /* @__PURE__ */ a(Ni, { summary: e.addendums })
1444
1439
  }
1445
1440
  ] : [],
1446
1441
  ...ut ? [
@@ -1466,7 +1461,7 @@ function td({
1466
1461
  render: (e) => /* @__PURE__ */ a(Qs, { rows: bl[`${e.collection}:${e.item_id}`] })
1467
1462
  }
1468
1463
  ] : [],
1469
- ...Cr ? [
1464
+ ...$r ? [
1470
1465
  {
1471
1466
  key: "tasks",
1472
1467
  header: T("tasks", "Tasks"),
@@ -1492,7 +1487,7 @@ function td({
1492
1487
  key: "send_backs",
1493
1488
  header: T("send_backs", "Sent back"),
1494
1489
  sortable: !0,
1495
- render: (e) => /* @__PURE__ */ a(ki, { summary: e.send_backs })
1490
+ render: (e) => /* @__PURE__ */ a(vi, { summary: e.send_backs })
1496
1491
  }
1497
1492
  ] : []
1498
1493
  ], El = {
@@ -1550,7 +1545,7 @@ function td({
1550
1545
  }
1551
1546
  return { text: e, title: e };
1552
1547
  }
1553
- const Dn = Jo(u == null ? void 0 : u.inline_edit), Yr = Dn.enabled ? [
1548
+ const Kn = Jo(u == null ? void 0 : u.inline_edit), Yr = Kn.enabled ? [
1554
1549
  ...new Set(
1555
1550
  ((c == null ? void 0 : c.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
1556
1551
  )
@@ -1561,11 +1556,11 @@ function td({
1561
1556
  staleTime: 10 * 6e4,
1562
1557
  retry: !1
1563
1558
  }))
1564
- }), Kn = /* @__PURE__ */ new Map();
1559
+ }), Pn = /* @__PURE__ */ new Map();
1565
1560
  Yr.forEach((e, t) => {
1566
1561
  var r;
1567
1562
  const n = (r = Pl[t]) == null ? void 0 : r.data;
1568
- n && Kn.set(e, {
1563
+ n && Pn.set(e, {
1569
1564
  fields: new Map((n.fields ?? []).map((o) => [o.field, o])),
1570
1565
  relations: n.relations ?? []
1571
1566
  });
@@ -1573,15 +1568,15 @@ function td({
1573
1568
  const { data: Ml } = W({
1574
1569
  queryKey: ["my-permissions"],
1575
1570
  queryFn: () => h.request(L("/security/my/permissions")).then((e) => e.data),
1576
- enabled: Dn.enabled && !De,
1571
+ enabled: Kn.enabled && !De,
1577
1572
  staleTime: 5 * 6e4
1578
1573
  }), Jr = Ws(), zr = (e, t) => {
1579
1574
  if (t.includes(".")) return null;
1580
- const n = Kn.get(e.collection);
1575
+ const n = Pn.get(e.collection);
1581
1576
  if (!n) return null;
1582
1577
  const r = ht.get(D(e));
1583
1578
  return r && !r.is_mine ? null : Zo({
1584
- config: Dn,
1579
+ config: Kn,
1585
1580
  key: t,
1586
1581
  field: n.fields.get(t),
1587
1582
  collection: e.collection,
@@ -1620,7 +1615,7 @@ function td({
1620
1615
  }, Bl = (e, t, n) => {
1621
1616
  const r = zr(e, t);
1622
1617
  if (!r) return n;
1623
- const o = Kn.get(e.collection), s = o == null ? void 0 : o.fields.get(t);
1618
+ const o = Pn.get(e.collection), s = o == null ? void 0 : o.fields.get(t);
1624
1619
  return /* @__PURE__ */ a(
1625
1620
  Hs,
1626
1621
  {
@@ -1669,7 +1664,7 @@ function td({
1669
1664
  {
1670
1665
  type: "button",
1671
1666
  onClick: (y) => {
1672
- y.stopPropagation(), fn({ row: e, path: t, value: m });
1667
+ y.stopPropagation(), xn({ row: e, path: t, value: m });
1673
1668
  },
1674
1669
  title: "Show the rows behind this number",
1675
1670
  className: "block max-w-[200px] truncate text-left text-[12px] tabular-nums underline decoration-slate-300 decoration-dotted underline-offset-2 hover:text-nvr-navy hover:decoration-nvr-cyan dark:hover:text-nvr-cyan",
@@ -1679,7 +1674,7 @@ function td({
1679
1674
  }
1680
1675
  }
1681
1676
  const Zr = [
1682
- ...On ? ["collection"] : [],
1677
+ ...Dn ? ["collection"] : [],
1683
1678
  "state",
1684
1679
  "owners",
1685
1680
  "aging_hours",
@@ -1690,10 +1685,10 @@ function td({
1690
1685
  ...ut ? ["fulfilment"] : [],
1691
1686
  ..._e ? ["integrations"] : [],
1692
1687
  ...mt ? ["send_backs"] : [],
1693
- ...Cr ? ["tasks"] : [],
1688
+ ...$r ? ["tasks"] : [],
1694
1689
  ..._t.map((e) => `extra.${e}`)
1695
1690
  ], Il = [
1696
- ...On ? ["collection"] : [],
1691
+ ...Dn ? ["collection"] : [],
1697
1692
  "state",
1698
1693
  "owners",
1699
1694
  ...Xe ? ["addendums"] : [],
@@ -1704,13 +1699,13 @@ function td({
1704
1699
  "sla_status",
1705
1700
  "at_risk",
1706
1701
  ..._t.slice(0, 2).map((e) => `extra.${e}`)
1707
- ], Vl = (u == null ? void 0 : u.default_columns) ?? null, Pn = Bt ?? Vl, te = new Set(Pn ?? Il);
1702
+ ], Vl = (u == null ? void 0 : u.default_columns) ?? null, Mn = Bt ?? Vl, te = new Set(Mn ?? Il);
1708
1703
  Xe && !Et.has("addendums") && te.add("addendums"), ut && !Et.has("fulfilment") && te.add("fulfilment"), _e && !Et.has("integrations") && te.add("integrations"), mt && !Et.has("send_backs") && te.add("send_backs");
1709
1704
  const Gl = new Set(De ? [] : (u == null ? void 0 : u.admin_only_columns) ?? []);
1710
1705
  for (const e of Gl) te.delete(e);
1711
1706
  const St = [
1712
- ...(Pn ?? []).filter((e) => Zr.includes(e)),
1713
- ...Zr.filter((e) => !(Pn ?? []).includes(e))
1707
+ ...(Mn ?? []).filter((e) => Zr.includes(e)),
1708
+ ...Zr.filter((e) => !(Mn ?? []).includes(e))
1714
1709
  ], Wl = no(ro(ao, { activationConstraint: { distance: 4 } }));
1715
1710
  function Hl(e) {
1716
1711
  const { active: t, over: n } = e;
@@ -1743,18 +1738,18 @@ function td({
1743
1738
  return Number.isFinite(o) ? /* @__PURE__ */ a("span", { className: "tabular-nums", children: e.format === "currency" ? o.toLocaleString(void 0, { style: "currency", currency: "USD" }) : o.toLocaleString() }) : /* @__PURE__ */ a("span", { children: String(r) });
1744
1739
  }
1745
1740
  })
1746
- ), Mn = [...Wr, ...jl, ...Jl], ta = ii(
1741
+ ), Qn = [...Wr, ...jl, ...Jl], ta = ii(
1747
1742
  St,
1748
1743
  (e) => {
1749
1744
  var n;
1750
- const t = (n = Mn.find((r) => r.key === e)) == null ? void 0 : n.header;
1745
+ const t = (n = Qn.find((r) => r.key === e)) == null ? void 0 : n.header;
1751
1746
  return typeof t == "string" ? t : e;
1752
1747
  },
1753
1748
  te
1754
1749
  ), zl = {
1755
1750
  key: "__actions__",
1756
1751
  header: "",
1757
- render: (e) => e.collection === "tasks" || e.collection === tn ? null : /* @__PURE__ */ a("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ a(
1752
+ render: (e) => e.collection === "tasks" || e.collection === rn ? null : /* @__PURE__ */ a("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ a(
1758
1753
  Es,
1759
1754
  {
1760
1755
  collection: e.collection,
@@ -1765,7 +1760,7 @@ function td({
1765
1760
  onPeek: () => Oe(e),
1766
1761
  urlFor: H.urlFor,
1767
1762
  onDeleted: () => {
1768
- h.request(In(`/items/${e.collection}/${e.item_id}`)).then(() => {
1763
+ h.request(Vn(`/items/${e.collection}/${e.item_id}`)).then(() => {
1769
1764
  O.success("Moved to trash"), f.invalidateQueries({ queryKey: ["queue-items", l] });
1770
1765
  }).catch((t) => O.error(qt(t, "Delete failed")));
1771
1766
  },
@@ -1774,16 +1769,16 @@ function td({
1774
1769
  disabled: ee
1775
1770
  }
1776
1771
  ) })
1777
- }, Xt = [
1772
+ }, en = [
1778
1773
  Yl,
1779
- ...St.filter((e) => te.has(e)).map((e) => Mn.find((t) => t.key === e)).filter((e) => e !== void 0),
1774
+ ...St.filter((e) => te.has(e)).map((e) => Qn.find((t) => t.key === e)).filter((e) => e !== void 0),
1780
1775
  ...pe ? [El] : [],
1781
1776
  zl
1782
1777
  ], na = V(() => {
1783
1778
  var r;
1784
- const e = u == null ? void 0 : u.default_pins, t = it ?? (e && Object.keys(e).length > 0 ? e : { [((r = Xt[0]) == null ? void 0 : r.key) ?? "label"]: "left" }), n = new Set(Xt.map((o) => o.key));
1779
+ const e = u == null ? void 0 : u.default_pins, t = it ?? (e && Object.keys(e).length > 0 ? e : { [((r = en[0]) == null ? void 0 : r.key) ?? "label"]: "left" }), n = new Set(en.map((o) => o.key));
1785
1780
  return Object.fromEntries(Object.entries(t).filter(([o]) => n.has(o)));
1786
- }, [it, u == null ? void 0 : u.default_pins, Xt.map((e) => e.key).join("|")]), ra = [
1781
+ }, [it, u == null ? void 0 : u.default_pins, en.map((e) => e.key).join("|")]), ra = [
1787
1782
  { value: "state", label: "State" },
1788
1783
  { value: "collection", label: "Collection" },
1789
1784
  { value: "sla_status", label: "SLA status" },
@@ -1817,7 +1812,7 @@ function td({
1817
1812
  b.has(Z) || w && !w.has(Z) || (b.add(Z), R.push({ label: S ? nt(Z, S) : Z, value: Z }));
1818
1813
  }
1819
1814
  return R;
1820
- }, Qn = new Map(((c == null ? void 0 : c.extra_field_meta) ?? []).map((e) => [e.path, e])), Qe = [
1815
+ }, Bn = new Map(((c == null ? void 0 : c.extra_field_meta) ?? []).map((e) => [e.path, e])), Qe = [
1821
1816
  {
1822
1817
  key: "collection",
1823
1818
  placeholder: T("collection", "Collection"),
@@ -1835,7 +1830,7 @@ function td({
1835
1830
  multi: !0,
1836
1831
  // Until the rows land, the pipeline's own states (no counts yet) rather
1837
1832
  // than an empty list.
1838
- options: Er(
1833
+ options: Lr(
1839
1834
  i ? i.available_values.state ?? [] : Object.keys(Ne)
1840
1835
  ).map((e) => {
1841
1836
  var t;
@@ -1844,7 +1839,7 @@ function td({
1844
1839
  value: e,
1845
1840
  // How many rows sit in it under the other active filters (the State
1846
1841
  // filter itself left out, or every other state would read 0).
1847
- count: yr ? yr[e] ?? 0 : (t = x == null ? void 0 : x.by_state) == null ? void 0 : t[e]
1842
+ count: kr ? kr[e] ?? 0 : (t = x == null ? void 0 : x.by_state) == null ? void 0 : t[e]
1848
1843
  };
1849
1844
  })
1850
1845
  },
@@ -1867,12 +1862,12 @@ function td({
1867
1862
  { label: "No", value: "no" }
1868
1863
  ]
1869
1864
  },
1870
- ...qr.length > 0 ? [
1865
+ ...Fr.length > 0 ? [
1871
1866
  {
1872
1867
  key: "at_risk_rule",
1873
1868
  placeholder: "Highlight rule",
1874
1869
  type: "select",
1875
- options: qr
1870
+ options: Fr
1876
1871
  }
1877
1872
  ] : [],
1878
1873
  {
@@ -1922,13 +1917,13 @@ function td({
1922
1917
  ]
1923
1918
  }
1924
1919
  ] : [],
1925
- ...xn.length > 0 ? [
1920
+ ...kn.length > 0 ? [
1926
1921
  {
1927
1922
  key: "labels",
1928
1923
  placeholder: "Triage label",
1929
1924
  type: "combobox",
1930
1925
  multi: !0,
1931
- options: xn.map((e) => ({ label: e, value: e }))
1926
+ options: kn.map((e) => ({ label: e, value: e }))
1932
1927
  }
1933
1928
  ] : [],
1934
1929
  {
@@ -1952,7 +1947,7 @@ function td({
1952
1947
  },
1953
1948
  ..._t.map((e) => {
1954
1949
  var m, p;
1955
- const t = Qn.get(e), n = T(`extra.${e}`, je(e)), r = { key: `extra.${e}`, placeholder: n }, o = Me(e);
1950
+ const t = Bn.get(e), n = T(`extra.${e}`, je(e)), r = { key: `extra.${e}`, placeholder: n }, o = Me(e);
1956
1951
  if ((o == null ? void 0 : o.type) === "datetime") return { ...r, type: "date" };
1957
1952
  if ((o == null ? void 0 : o.type) === "number") return { ...r, type: "number" };
1958
1953
  if ((o == null ? void 0 : o.type) === "boolean")
@@ -1978,18 +1973,18 @@ function td({
1978
1973
  loadOptions: aa(t)
1979
1974
  } : { ...r, placeholder: `Search ${n}…`, type: "text" };
1980
1975
  })
1981
- ], Bn = Qe.filter(
1976
+ ], jn = Qe.filter(
1982
1977
  (e) => te.has(e.key) || e.key === "label" || e.key === "owners"
1983
- ), jn = (e) => {
1978
+ ), Un = (e) => {
1984
1979
  var t;
1985
1980
  return (((t = Qe.find((n) => n.key === e)) == null ? void 0 : t.placeholder) ?? e).replace(/^Search\s+/, "").replace(/…$/, "");
1986
- }, Un = (() => {
1981
+ }, In = (() => {
1987
1982
  var n, r;
1988
1983
  const e = [];
1989
1984
  for (const [o, s] of Object.entries(Ee)) {
1990
1985
  if (!s || Array.isArray(s) && s.length === 0) continue;
1991
1986
  const m = Qe.find((b) => b.key === o), p = o.startsWith("extra.") ? o.slice(6) : null, S = p ? Me(p) : null, w = jo({
1992
- field: jn(o),
1987
+ field: Un(o),
1993
1988
  type: (m == null ? void 0 : m.type) ?? "select",
1994
1989
  value: s,
1995
1990
  optionLabel: (b) => {
@@ -2022,7 +2017,7 @@ function td({
2022
2017
  var X, Z, F;
2023
2018
  if (!s.key.startsWith("extra.")) return null;
2024
2019
  if (s.type === "combobox") return s;
2025
- const m = s.key.slice(6), p = Qn.get(m), S = Ct.has(s.key);
2020
+ const m = s.key.slice(6), p = Bn.get(m), S = Ct.has(s.key);
2026
2021
  if ((p == null ? void 0 : p.kind) !== "relation" && !S) return null;
2027
2022
  const w = Me(m), b = (X = i == null ? void 0 : i.available_values.extra) == null ? void 0 : X[m], R = s.placeholder.replace(/^Search (.*)…$/, "$1"), y = (p == null ? void 0 : p.kind) === "relation" && p.target_collection && p.display_field ? { collection: p.target_collection, field: p.display_field } : void 0;
2028
2023
  return b != null && b.length ? {
@@ -2046,9 +2041,9 @@ function td({
2046
2041
  loadOptions: aa(p)
2047
2042
  } : null;
2048
2043
  };
2049
- if (rr.length > 0) {
2044
+ if (ar.length > 0) {
2050
2045
  const s = [], m = /* @__PURE__ */ new Set();
2051
- for (const p of rr) {
2046
+ for (const p of ar) {
2052
2047
  const S = (p.path ?? []).join(".");
2053
2048
  let w;
2054
2049
  if (p.key === "state" || /(^|_)state$/.test(((o = p.path) == null ? void 0 : o[0]) ?? ""))
@@ -2058,7 +2053,7 @@ function td({
2058
2053
  var Z;
2059
2054
  if (!y.key.startsWith("extra.") || m.has(y.key)) return !1;
2060
2055
  const X = y.key.slice(6);
2061
- return ((Z = Qn.get(X)) == null ? void 0 : Z.target_collection) === p.collection;
2056
+ return ((Z = Bn.get(X)) == null ? void 0 : Z.target_collection) === p.collection;
2062
2057
  }), R = b.find((y) => y.key.slice(6).startsWith(`${S}.`)) ?? b[0];
2063
2058
  w = R ? e(R) : null;
2064
2059
  }
@@ -2068,11 +2063,11 @@ function td({
2068
2063
  p && !m.has(p.key) && (Ct.has(p.key) || p.restricted) && s.push(p);
2069
2064
  if (s.length > 0) return s;
2070
2065
  }
2071
- const t = Bn.map(e).filter((s) => s !== null), r = [
2066
+ const t = jn.map(e).filter((s) => s !== null), r = [
2072
2067
  ...t.filter((s) => Ct.has(s.key) || s.restricted),
2073
2068
  ...t.filter((s) => !Ct.has(s.key) && !s.restricted)
2074
2069
  ].slice(0, 6);
2075
- return r.length > 0 ? r : Bn.filter((s) => s.key === "state" || s.key === "owners");
2070
+ return r.length > 0 ? r : jn.filter((s) => s.key === "state" || s.key === "owners");
2076
2071
  })()
2077
2072
  ), Zl = (() => {
2078
2073
  if (!x) return null;
@@ -2148,7 +2143,7 @@ function td({
2148
2143
  })();
2149
2144
  function eo(e) {
2150
2145
  const t = new Set(te);
2151
- t.has(e) ? (t.delete(e), (e === "addendums" || e === "integrations") && Yn((n) => new Set(n).add(e))) : (t.add(e), (e === "addendums" || e === "integrations") && Yn((n) => {
2146
+ t.has(e) ? (t.delete(e), (e === "addendums" || e === "integrations") && Jn((n) => new Set(n).add(e))) : (t.add(e), (e === "addendums" || e === "integrations") && Jn((n) => {
2152
2147
  const r = new Set(n);
2153
2148
  return r.delete(e), r;
2154
2149
  })), jt([...t]);
@@ -2165,7 +2160,7 @@ function td({
2165
2160
  className: "flex flex-wrap items-center gap-2 border-b border-slate-200 bg-white px-4 py-2.5 dark:border-slate-700 dark:bg-slate-900",
2166
2161
  "data-queue-toolbar": !0,
2167
2162
  children: [
2168
- J ? /* @__PURE__ */ a("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: wi.filter((e) => pe || e.value !== "claimed").map(
2163
+ J ? /* @__PURE__ */ a("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: _i.filter((e) => pe || e.value !== "claimed").map(
2169
2164
  (e, t) => /* @__PURE__ */ a(
2170
2165
  "button",
2171
2166
  {
@@ -2252,7 +2247,7 @@ function td({
2252
2247
  ),
2253
2248
  /* @__PURE__ */ a(Xs, { className: "h-8" }),
2254
2249
  /* @__PURE__ */ a(Ds, {}),
2255
- ln > 0 && /* @__PURE__ */ d(
2250
+ sn > 0 && /* @__PURE__ */ d(
2256
2251
  "button",
2257
2252
  {
2258
2253
  type: "button",
@@ -2260,9 +2255,9 @@ function td({
2260
2255
  className: "nvr-pop-in flex h-8 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/[0.08] px-2.5 text-[12px] font-medium transition-colors text-nvr-navy hover:bg-nvr-cyan/20 dark:text-nvr-cyan",
2261
2256
  children: [
2262
2257
  /* @__PURE__ */ a(fo, { className: "h-3 w-3" }),
2263
- ln,
2258
+ sn,
2264
2259
  " update",
2265
- ln === 1 ? "" : "s",
2260
+ sn === 1 ? "" : "s",
2266
2261
  " · Refresh"
2267
2262
  ]
2268
2263
  }
@@ -2317,12 +2312,12 @@ function td({
2317
2312
  ]
2318
2313
  }
2319
2314
  ),
2320
- C === "table" && $ && le && /* @__PURE__ */ a(
2315
+ C === "table" && $ && oe && /* @__PURE__ */ a(
2321
2316
  "button",
2322
2317
  {
2323
2318
  type: "button",
2324
- onClick: () => nn(
2325
- ke.size > 0 ? /* @__PURE__ */ new Set() : new Set(le.map((e) => e.key))
2319
+ onClick: () => an(
2320
+ ke.size > 0 ? /* @__PURE__ */ new Set() : new Set(oe.map((e) => e.key))
2326
2321
  ),
2327
2322
  className: "flex h-8 items-center rounded-md px-2 text-[12px] text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200",
2328
2323
  children: ke.size > 0 ? "Expand all" : "Collapse all"
@@ -2344,9 +2339,9 @@ function td({
2344
2339
  }
2345
2340
  ) }),
2346
2341
  /* @__PURE__ */ a(lt, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ a(Ra, { children: /* @__PURE__ */ d(Ea, { children: [
2347
- /* @__PURE__ */ a(Ft, { value: "none", onSelect: () => rn(null), children: "None" }),
2348
- /* @__PURE__ */ a(Ft, { value: "collection", onSelect: () => rn("collection"), children: "Collection" }),
2349
- /* @__PURE__ */ a(Ft, { value: "owner", onSelect: () => rn("owners"), children: "Owner" })
2342
+ /* @__PURE__ */ a(Ft, { value: "none", onSelect: () => ln(null), children: "None" }),
2343
+ /* @__PURE__ */ a(Ft, { value: "collection", onSelect: () => ln("collection"), children: "Collection" }),
2344
+ /* @__PURE__ */ a(Ft, { value: "owner", onSelect: () => ln("owners"), children: "Owner" })
2350
2345
  ] }) }) })
2351
2346
  ] }),
2352
2347
  G && c && /* @__PURE__ */ d(
@@ -2401,9 +2396,9 @@ function td({
2401
2396
  collisionDetection: oo,
2402
2397
  onDragEnd: Hl,
2403
2398
  children: /* @__PURE__ */ a(so, { items: ta, strategy: io, children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: ta.map((e) => {
2404
- const t = Mn.find((n) => n.key === e);
2399
+ const t = Qn.find((n) => n.key === e);
2405
2400
  return /* @__PURE__ */ a(
2406
- qi,
2401
+ Fi,
2407
2402
  {
2408
2403
  id: e,
2409
2404
  label: typeof (t == null ? void 0 : t.header) == "string" ? t.header : e,
@@ -2449,11 +2444,11 @@ function td({
2449
2444
  children: Rt === "compact" ? /* @__PURE__ */ a(wo, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(_o, { className: "h-3.5 w-3.5" })
2450
2445
  }
2451
2446
  ),
2452
- C === "table" && Ma && oe.length > 0 && /* @__PURE__ */ d(
2447
+ C === "table" && Ma && se.length > 0 && /* @__PURE__ */ d(
2453
2448
  "button",
2454
2449
  {
2455
2450
  type: "button",
2456
- onClick: () => Lr(),
2451
+ onClick: () => Ar(),
2457
2452
  className: "flex h-8 items-center gap-1.5 rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white hover:brightness-110",
2458
2453
  children: [
2459
2454
  /* @__PURE__ */ a(No, { className: "h-3 w-3 fill-current" }),
@@ -2461,16 +2456,16 @@ function td({
2461
2456
  ]
2462
2457
  }
2463
2458
  ),
2464
- !pn && re.length === 1 && (Kt ? /* @__PURE__ */ d(rt, { children: [
2459
+ !hn && re.length === 1 && (Kt ? /* @__PURE__ */ d(rt, { children: [
2465
2460
  /* @__PURE__ */ a(at, { asChild: !0, children: /* @__PURE__ */ d(
2466
2461
  "button",
2467
2462
  {
2468
2463
  type: "button",
2469
2464
  className: "flex h-8 items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
2470
2465
  children: [
2471
- /* @__PURE__ */ a(en, { className: "h-3.5 w-3.5" }),
2466
+ /* @__PURE__ */ a(nn, { className: "h-3.5 w-3.5" }),
2472
2467
  "New ",
2473
- Vn(re[0]),
2468
+ Gn(re[0]),
2474
2469
  /* @__PURE__ */ a(Na, { className: "h-3 w-3 opacity-60" })
2475
2470
  ]
2476
2471
  }
@@ -2521,20 +2516,20 @@ function td({
2521
2516
  }),
2522
2517
  className: "flex h-8 items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
2523
2518
  children: [
2524
- /* @__PURE__ */ a(en, { className: "h-3.5 w-3.5" }),
2519
+ /* @__PURE__ */ a(nn, { className: "h-3.5 w-3.5" }),
2525
2520
  "New ",
2526
- Vn(re[0])
2521
+ Gn(re[0])
2527
2522
  ]
2528
2523
  }
2529
2524
  )),
2530
- !pn && re.length > 1 && /* @__PURE__ */ d(rt, { children: [
2525
+ !hn && re.length > 1 && /* @__PURE__ */ d(rt, { children: [
2531
2526
  /* @__PURE__ */ a(at, { asChild: !0, children: /* @__PURE__ */ d(
2532
2527
  "button",
2533
2528
  {
2534
2529
  type: "button",
2535
2530
  className: "flex h-8 items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
2536
2531
  children: [
2537
- /* @__PURE__ */ a(en, { className: "h-3.5 w-3.5" }),
2532
+ /* @__PURE__ */ a(nn, { className: "h-3.5 w-3.5" }),
2538
2533
  "New",
2539
2534
  /* @__PURE__ */ a(Na, { className: "h-3 w-3 opacity-60" })
2540
2535
  ]
@@ -2551,14 +2546,14 @@ function td({
2551
2546
  }),
2552
2547
  className: "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-muted",
2553
2548
  children: [
2554
- /* @__PURE__ */ a(en, { className: "h-3 w-3 opacity-60" }),
2555
- Vn(e)
2549
+ /* @__PURE__ */ a(nn, { className: "h-3 w-3 opacity-60" }),
2550
+ Gn(e)
2556
2551
  ]
2557
2552
  },
2558
2553
  e
2559
2554
  )) })
2560
2555
  ] }),
2561
- !pn && Ve && ye && /* @__PURE__ */ a(
2556
+ !hn && Ve && ye && /* @__PURE__ */ a(
2562
2557
  Ms,
2563
2558
  {
2564
2559
  collection: Ve,
@@ -2697,10 +2692,10 @@ function td({
2697
2692
  ] }) : /* @__PURE__ */ a(qe, { children: "→ Holding steady" })
2698
2693
  }
2699
2694
  ),
2700
- Rr.length > 0 && /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: Rr.map(([e, t]) => {
2695
+ Er.length > 0 && /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: Er.map(([e, t]) => {
2701
2696
  var n;
2702
2697
  return /* @__PURE__ */ a(
2703
- $i,
2698
+ qi,
2704
2699
  {
2705
2700
  label: Ae(e),
2706
2701
  count: t,
@@ -2716,7 +2711,7 @@ function td({
2716
2711
  }
2717
2712
  ),
2718
2713
  C !== "workload" && /* @__PURE__ */ a(
2719
- fi,
2714
+ gi,
2720
2715
  {
2721
2716
  defs: Xl,
2722
2717
  values: _,
@@ -2743,7 +2738,7 @@ function td({
2743
2738
  className: "inline-flex h-6 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/[0.06] px-2.5 text-[12px] text-slate-700 dark:text-slate-200",
2744
2739
  children: [
2745
2740
  "Your default ",
2746
- mr(jn),
2741
+ pr(Un),
2747
2742
  " filter is hiding",
2748
2743
  " ",
2749
2744
  be.toLocaleString("en-US"),
@@ -2754,7 +2749,7 @@ function td({
2754
2749
  "button",
2755
2750
  {
2756
2751
  type: "button",
2757
- onClick: pr,
2752
+ onClick: br,
2758
2753
  className: "font-medium text-[#0284a8] underline-offset-2 hover:underline dark:text-nvr-cyan",
2759
2754
  children: "Show all"
2760
2755
  }
@@ -2843,7 +2838,7 @@ function td({
2843
2838
  e.name,
2844
2839
  e.is_default ? /* @__PURE__ */ a("span", { className: "ml-1 text-nvr-navy/60 dark:text-nvr-cyan/70", children: "· default" }) : e.is_shared && /* @__PURE__ */ a("span", { className: "ml-1 text-slate-400", children: "· shared" })
2845
2840
  ] }),
2846
- Jt && /* @__PURE__ */ a(
2841
+ zt && /* @__PURE__ */ a(
2847
2842
  "button",
2848
2843
  {
2849
2844
  type: "button",
@@ -2890,7 +2885,7 @@ function td({
2890
2885
  children: /* @__PURE__ */ a(To, { className: E("h-3 w-3", Mt(e.id) && "fill-current") })
2891
2886
  }
2892
2887
  ),
2893
- e.user === N && (Ln === e.id ? /* @__PURE__ */ d(
2888
+ e.user === N && (An === e.id ? /* @__PURE__ */ d(
2894
2889
  "span",
2895
2890
  {
2896
2891
  className: "flex shrink-0 items-center gap-1",
@@ -2912,7 +2907,7 @@ function td({
2912
2907
  "button",
2913
2908
  {
2914
2909
  type: "button",
2915
- onClick: () => zt(null),
2910
+ onClick: () => Zt(null),
2916
2911
  className: "text-slate-500 hover:underline dark:text-slate-400",
2917
2912
  "aria-label": `Keep view ${e.name}`,
2918
2913
  children: "No"
@@ -2924,7 +2919,7 @@ function td({
2924
2919
  "button",
2925
2920
  {
2926
2921
  type: "button",
2927
- onClick: () => zt(e.id),
2922
+ onClick: () => Zt(e.id),
2928
2923
  className: "invisible text-slate-400 hover:text-red-500 group-hover:visible",
2929
2924
  "aria-label": `Delete view ${e.name}`,
2930
2925
  children: "×"
@@ -2935,7 +2930,7 @@ function td({
2935
2930
  e.id
2936
2931
  );
2937
2932
  }),
2938
- /* @__PURE__ */ d(rt, { open: vl, onOpenChange: Rn, children: [
2933
+ /* @__PURE__ */ d(rt, { open: vl, onOpenChange: Ln, children: [
2939
2934
  /* @__PURE__ */ a(at, { asChild: !0, children: /* @__PURE__ */ a(
2940
2935
  "button",
2941
2936
  {
@@ -2954,7 +2949,7 @@ function td({
2954
2949
  type: "button",
2955
2950
  disabled: Ke.isPending,
2956
2951
  onClick: () => {
2957
- Ke.mutate(e), Rn(!1);
2952
+ Ke.mutate(e), Ln(!1);
2958
2953
  },
2959
2954
  className: "mb-2 w-full rounded-md border border-nvr-cyan/40 bg-nvr-cyan/5 px-2 py-1.5 text-[12px] font-medium text-nvr-navy hover:bg-nvr-cyan/10 disabled:opacity-50 dark:text-nvr-cyan",
2960
2955
  children: [
@@ -2968,29 +2963,33 @@ function td({
2968
2963
  /* @__PURE__ */ a(
2969
2964
  "input",
2970
2965
  {
2971
- value: En,
2972
- onChange: (e) => Ar(e.target.value),
2966
+ value: Ht,
2967
+ onChange: (e) => Or(e.target.value),
2968
+ onKeyDown: (e) => {
2969
+ e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), Ht.trim() && !Xt.isPending && Xt.mutate());
2970
+ },
2973
2971
  placeholder: "View name",
2972
+ "aria-label": "View name",
2974
2973
  className: "mb-2 w-full rounded-md border border-slate-200 px-2 py-1.5 text-[12px] focus:border-nvr-cyan focus:outline-none dark:border-border dark:bg-card"
2975
2974
  }
2976
2975
  ),
2977
- Jt && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2976
+ zt && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2978
2977
  /* @__PURE__ */ a(
2979
- Wn,
2978
+ Hn,
2980
2979
  {
2981
- checked: Or || vt,
2980
+ checked: Dr || vt,
2982
2981
  disabled: vt,
2983
- onCheckedChange: (e) => Dr(e === !0)
2982
+ onCheckedChange: (e) => Kr(e === !0)
2984
2983
  }
2985
2984
  ),
2986
2985
  "Share with everyone"
2987
2986
  ] }),
2988
- Jt && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2987
+ zt && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
2989
2988
  /* @__PURE__ */ a(
2990
- Wn,
2989
+ Hn,
2991
2990
  {
2992
2991
  checked: vt,
2993
- onCheckedChange: (e) => Kr(e === !0)
2992
+ onCheckedChange: (e) => Pr(e === !0)
2994
2993
  }
2995
2994
  ),
2996
2995
  "Set as queue default (everyone starts here)"
@@ -2999,8 +2998,8 @@ function td({
2999
2998
  "button",
3000
2999
  {
3001
3000
  type: "button",
3002
- disabled: !En.trim() || Mr.isPending,
3003
- onClick: () => Mr.mutate(),
3001
+ disabled: !Ht.trim() || Xt.isPending,
3002
+ onClick: () => Xt.mutate(),
3004
3003
  className: "w-full rounded-md bg-nvr-cyan px-2 py-1.5 text-[12px] font-semibold text-white hover:bg-nvr-cyan/90 disabled:opacity-50",
3005
3004
  children: "Save current view"
3006
3005
  }
@@ -3011,16 +3010,16 @@ function td({
3011
3010
  }
3012
3011
  )
3013
3012
  ] }),
3014
- /* @__PURE__ */ d("div", { ref: Ht, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: [
3015
- cr && /* @__PURE__ */ a(Is, { error: Za, onRetry: () => void el(), className: "mb-3" }),
3016
- Un && /* @__PURE__ */ a(
3013
+ /* @__PURE__ */ d("div", { ref: Yt, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: [
3014
+ dr && /* @__PURE__ */ a(Is, { error: Za, onRetry: () => void el(), className: "mb-3" }),
3015
+ In && /* @__PURE__ */ a(
3017
3016
  "p",
3018
3017
  {
3019
3018
  "data-filter-sentence": !0,
3020
- "data-tip": Un,
3019
+ "data-tip": In,
3021
3020
  "aria-live": "polite",
3022
3021
  className: "mb-1.5 shrink-0 truncate px-0.5 text-[11.5px] text-slate-500 dark:text-slate-400",
3023
- children: Un
3022
+ children: In
3024
3023
  }
3025
3024
  ),
3026
3025
  C === "table" ? /* @__PURE__ */ a(qe, { children: /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1", children: /* @__PURE__ */ d(
@@ -3029,29 +3028,29 @@ function td({
3029
3028
  ref: Fe.rootRef,
3030
3029
  className: E(
3031
3030
  "relative min-w-0 flex-1 transition-opacity duration-200",
3032
- br && "pointer-events-none opacity-60"
3031
+ hr && "pointer-events-none opacity-60"
3033
3032
  ),
3034
- "aria-busy": br || void 0,
3033
+ "aria-busy": hr || void 0,
3035
3034
  children: [
3036
- hr != null && /* @__PURE__ */ d("span", { className: "nvr-slide-up-centered absolute left-1/2 top-6 z-[6] -translate-x-1/2 rounded-full border border-slate-200 bg-white px-3 py-1.5 text-[12px] font-medium text-slate-600 shadow-lg dark:border-border dark:bg-card dark:text-slate-300", children: [
3035
+ fr != null && /* @__PURE__ */ d("span", { className: "nvr-slide-up-centered absolute left-1/2 top-6 z-[6] -translate-x-1/2 rounded-full border border-slate-200 bg-white px-3 py-1.5 text-[12px] font-medium text-slate-600 shadow-lg dark:border-border dark:bg-card dark:text-slate-300", children: [
3037
3036
  al.text ?? "Still working",
3038
3037
  " — ",
3039
- hr,
3038
+ fr,
3040
3039
  "s"
3041
3040
  ] }),
3042
3041
  /* @__PURE__ */ a(
3043
3042
  As,
3044
3043
  {
3045
3044
  fillHeight: !0,
3046
- enterKey: vr.current,
3045
+ enterKey: wr.current,
3047
3046
  density: Rt,
3048
3047
  minBodyHeight: 360,
3049
- columns: Xt,
3048
+ columns: en,
3050
3049
  rows: q,
3051
3050
  rowKey: (e) => `${e.collection}:${e.item_id}`,
3052
3051
  total: (i == null ? void 0 : i.total) ?? 0,
3053
3052
  page: de,
3054
- limit: mn,
3053
+ limit: bn,
3055
3054
  isLoading: He,
3056
3055
  onPageChange: A,
3057
3056
  onRowClick: (e) => Wt(e),
@@ -3064,24 +3063,24 @@ function td({
3064
3063
  },
3065
3064
  rowTitle: (e) => {
3066
3065
  const t = ht.get(D(e));
3067
- return Fe.titleFor(D(e)) ?? (t && !t.is_mine ? ss(t) : void 0) ?? (Pr(e.collection, e.item_id) ? zs : void 0);
3066
+ return Fe.titleFor(D(e)) ?? (t && !t.is_mine ? ss(t) : void 0) ?? (Mr(e.collection, e.item_id) ? zs : void 0);
3068
3067
  },
3069
3068
  rowClassName: (e) => E(
3070
3069
  Cl(e),
3071
- Pr(e.collection, e.item_id) && Js
3070
+ Mr(e.collection, e.item_id) && Js
3072
3071
  ),
3073
- emptyMessage: cr ? /* @__PURE__ */ a("span", { className: "sr-only", children: "The list did not load." }) : /* @__PURE__ */ a(
3072
+ emptyMessage: dr ? /* @__PURE__ */ a("span", { className: "sr-only", children: "The list did not load." }) : /* @__PURE__ */ a(
3074
3073
  Os,
3075
3074
  {
3076
3075
  icon: Ro,
3077
3076
  title: ((ba = i == null ? void 0 : i.empty) == null ? void 0 : ba.reason) === "not_permitted" ? "You cannot read this queue’s records" : ((ha = i == null ? void 0 : i.empty) == null ? void 0 : ha.reason) === "scope_mine" ? "Nothing waiting on you" : ((fa = i == null ? void 0 : i.empty) == null ? void 0 : fa.reason) === "filters" ? "No records match these filters" : "Nothing in this queue",
3078
- detail: ((ga = i == null ? void 0 : i.empty) == null ? void 0 : ga.reason) === "filters" && be > 0 ? `Your default ${mr(jn)} filter is hiding ${be.toLocaleString("en-US")} item${be === 1 ? "" : "s"} here.` : ((xa = i == null ? void 0 : i.empty) == null ? void 0 : xa.reason) === "filters" ? g !== "all" ? "Your filters and the current tab leave nothing to show. Widen a filter or look across all items." : "Widen or clear a filter to see more of the queue." : ((ya = i == null ? void 0 : i.empty) == null ? void 0 : ya.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
3077
+ detail: ((ga = i == null ? void 0 : i.empty) == null ? void 0 : ga.reason) === "filters" && be > 0 ? `Your default ${pr(Un)} filter is hiding ${be.toLocaleString("en-US")} item${be === 1 ? "" : "s"} here.` : ((xa = i == null ? void 0 : i.empty) == null ? void 0 : xa.reason) === "filters" ? g !== "all" ? "Your filters and the current tab leave nothing to show. Widen a filter or look across all items." : "Widen or clear a filter to see more of the queue." : ((ya = i == null ? void 0 : i.empty) == null ? void 0 : ya.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
3079
3078
  action: ((ka = i == null ? void 0 : i.empty) == null ? void 0 : ka.reason) === "filters" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-2", children: [
3080
3079
  be > 0 && /* @__PURE__ */ d(
3081
3080
  "button",
3082
3081
  {
3083
3082
  type: "button",
3084
- onClick: pr,
3083
+ onClick: br,
3085
3084
  className: "h-7 rounded-md bg-nvr-cyan px-2.5 text-[12px] font-semibold text-white hover:brightness-105",
3086
3085
  "data-queue-empty-defaults": !0,
3087
3086
  children: [
@@ -3125,7 +3124,7 @@ function td({
3125
3124
  onSortChange: (e) => {
3126
3125
  Ie(e), A(1);
3127
3126
  },
3128
- filterDefs: Bn,
3127
+ filterDefs: jn,
3129
3128
  filterValues: _,
3130
3129
  onFilterChange: (e, t) => {
3131
3130
  Q((n) => ({ ...n, [e]: t })), A(1);
@@ -3139,7 +3138,7 @@ function td({
3139
3138
  nowrapCells: !0,
3140
3139
  columnPins: na,
3141
3140
  onColumnPinChange: (e, t) => {
3142
- an((n) => {
3141
+ on((n) => {
3143
3142
  const r = { ...n ?? na };
3144
3143
  return t ? r[e] = t : delete r[e], r;
3145
3144
  });
@@ -3166,7 +3165,7 @@ function td({
3166
3165
  ]
3167
3166
  }
3168
3167
  ) }) }) : C === "kanban" ? /* @__PURE__ */ a(
3169
- hi,
3168
+ fi,
3170
3169
  {
3171
3170
  items: q,
3172
3171
  onCardClick: (e) => Wt(e),
@@ -3174,47 +3173,47 @@ function td({
3174
3173
  onClaim: (e) => Le.mutate(e),
3175
3174
  onRelease: (e) => Ye.mutate(e),
3176
3175
  swimlaneBy: st,
3177
- stateLabels: $n,
3176
+ stateLabels: Fn,
3178
3177
  laneLabel: st === "collection" ? xt : void 0,
3179
3178
  claimsEnabled: pe,
3180
3179
  onDraggingChange: (e) => {
3181
- cn.current = e;
3180
+ un.current = e;
3182
3181
  }
3183
3182
  }
3184
- ) : /* @__PURE__ */ a(gi, { queueId: l })
3183
+ ) : /* @__PURE__ */ a(xi, { queueId: l })
3185
3184
  ] }),
3186
3185
  Pt && ee && /* @__PURE__ */ d(
3187
- pi,
3186
+ bi,
3188
3187
  {
3189
3188
  count: Pe.length,
3190
3189
  claimsEnabled: pe,
3191
- showClaim: bn("claim"),
3192
- showRelease: bn("release"),
3193
- showTransition: bn("transition"),
3194
- states: Er((i == null ? void 0 : i.available_values.state) ?? []).map((e) => ({
3190
+ showClaim: fn("claim"),
3191
+ showRelease: fn("release"),
3192
+ showTransition: fn("transition"),
3193
+ states: Lr((i == null ? void 0 : i.available_values.state) ?? []).map((e) => ({
3195
3194
  value: e,
3196
3195
  label: Ae(e)
3197
3196
  })),
3198
3197
  busy: Ir,
3199
- onClaim: () => An(
3198
+ onClaim: () => On(
3200
3199
  "Claim",
3201
3200
  (e) => h.request(
3202
- se(`/queues/${l}/claim`, {
3201
+ ie(`/queues/${l}/claim`, {
3203
3202
  source_collection: e.collection,
3204
3203
  item_id: e.item_id
3205
3204
  })
3206
3205
  )
3207
3206
  ),
3208
- onRelease: () => An(
3207
+ onRelease: () => On(
3209
3208
  "Release",
3210
3209
  (e) => h.request(
3211
- se(`/queues/${l}/release`, {
3210
+ ie(`/queues/${l}/release`, {
3212
3211
  source_collection: e.collection,
3213
3212
  item_id: e.item_id
3214
3213
  })
3215
3214
  )
3216
3215
  ),
3217
- onTransition: (e) => An("Transition", (t) => fr(t, e)),
3216
+ onTransition: (e) => On("Transition", (t) => gr(t, e)),
3218
3217
  onClear: () => tt([]),
3219
3218
  children: [
3220
3219
  Pe.length >= 2 && /* @__PURE__ */ a(
@@ -3223,7 +3222,7 @@ function td({
3223
3222
  type: "button",
3224
3223
  onClick: () => {
3225
3224
  const e = cs(
3226
- q.filter((t) => Pe.includes(D(t)) && t.collection !== "tasks").map((t) => H.urlFor(Tn(t)))
3225
+ q.filter((t) => Pe.includes(D(t)) && t.collection !== "tasks").map((t) => H.urlFor(En(t)))
3227
3226
  );
3228
3227
  e.blocked > 0 || e.capped > 0 ? O.warning(qa(e)) : O.success(qa(e));
3229
3228
  },
@@ -3303,7 +3302,7 @@ function td({
3303
3302
  run: () => {
3304
3303
  var e;
3305
3304
  return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(
3306
- `${window.location.origin}${H.urlFor(Tn(B.row))}`
3305
+ `${window.location.origin}${H.urlFor(En(B.row))}`
3307
3306
  ));
3308
3307
  }
3309
3308
  },
@@ -3326,14 +3325,14 @@ function td({
3326
3325
  )),
3327
3326
  B.row.collection !== "tasks" && /* @__PURE__ */ d("div", { className: "mt-1 border-t border-slate-100 pt-1 dark:border-border/60", children: [
3328
3327
  /* @__PURE__ */ a("p", { className: "px-3 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Triage labels" }),
3329
- xn.slice(0, 8).map((e) => {
3328
+ kn.slice(0, 8).map((e) => {
3330
3329
  const t = (B.row.labels ?? []).includes(e);
3331
3330
  return /* @__PURE__ */ d(
3332
3331
  "button",
3333
3332
  {
3334
3333
  type: "button",
3335
3334
  onClick: () => {
3336
- sr(B.row, e), kt(null);
3335
+ ir(B.row, e), kt(null);
3337
3336
  },
3338
3337
  className: "flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 dark:text-slate-200 dark:hover:bg-slate-800",
3339
3338
  children: [
@@ -3357,7 +3356,7 @@ function td({
3357
3356
  const n = e.target.elements.namedItem(
3358
3357
  "newlabel"
3359
3358
  ).value.trim();
3360
- n && (sr(B.row, n), kt(null));
3359
+ n && (ir(B.row, n), kt(null));
3361
3360
  },
3362
3361
  className: "px-3 py-1",
3363
3362
  children: /* @__PURE__ */ a(
@@ -3378,25 +3377,25 @@ function td({
3378
3377
  ),
3379
3378
  document.body
3380
3379
  ),
3381
- or && Sa(
3380
+ sr && Sa(
3382
3381
  /* @__PURE__ */ a(
3383
- Fi,
3382
+ Ti,
3384
3383
  {
3385
3384
  queueId: l,
3386
- drill: or,
3387
- onClose: () => fn(null),
3385
+ drill: sr,
3386
+ onClose: () => xn(null),
3388
3387
  onOpenRecord: (e, t) => {
3389
- fn(null), H.open({ collection: e, itemId: t, layoutSlug: null });
3388
+ xn(null), H.open({ collection: e, itemId: t, layoutSlug: null });
3390
3389
  }
3391
3390
  }
3392
3391
  ),
3393
3392
  document.body
3394
3393
  ),
3395
3394
  /* @__PURE__ */ a(
3396
- bi,
3395
+ hi,
3397
3396
  {
3398
3397
  item: Se,
3399
- stateLabels: $n,
3398
+ stateLabels: Fn,
3400
3399
  collectionLabel: xt,
3401
3400
  claimsEnabled: pe,
3402
3401
  columnFormats: Al,
@@ -3404,19 +3403,19 @@ function td({
3404
3403
  width: u == null ? void 0 : u.sheet_width,
3405
3404
  itemLayout: u == null ? void 0 : u.item_layout,
3406
3405
  onOpenChange: (e) => {
3407
- e || (Oe(null), Fn(!1));
3406
+ e || (Oe(null), Rn(!1));
3408
3407
  },
3409
3408
  onClaim: (e) => Le.mutate(e),
3410
3409
  onRelease: (e) => Ye.mutate(e),
3411
3410
  workNextActive: yl,
3412
- onNext: () => Se && Lr(Se),
3411
+ onNext: () => Se && Ar(Se),
3413
3412
  refetchItems: () => f.invalidateQueries({ queryKey: ["queue-items", l] })
3414
3413
  }
3415
3414
  ),
3416
3415
  Qt.dialog
3417
3416
  ] });
3418
3417
  }
3419
- function Fi({
3418
+ function Ti({
3420
3419
  queueId: l,
3421
3420
  drill: k,
3422
3421
  onClose: K,
@@ -3483,5 +3482,5 @@ function Fi({
3483
3482
  );
3484
3483
  }
3485
3484
  export {
3486
- td as QueueWorklist
3485
+ rd as QueueWorklist
3487
3486
  };