@nivaro/react 0.3.66 → 0.3.68

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 (41) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +15 -1
  4. package/dist/index.js +836 -835
  5. package/dist/shared/components/ActivityEntry.js +28 -28
  6. package/dist/shared/components/CollectionBrowserView.js +584 -585
  7. package/dist/shared/components/ConformanceView.js +34 -34
  8. package/dist/shared/components/ItemEditForm.js +1758 -1758
  9. package/dist/shared/components/RecordCompare.js +149 -129
  10. package/dist/shared/components/ReportView.js +196 -196
  11. package/dist/shared/components/SlaRulesView.js +36 -36
  12. package/dist/shared/components/bulk/BulkCompareButton.js +16 -16
  13. package/dist/shared/components/chat/ChatPanel.js +484 -487
  14. package/dist/shared/components/chat/ChatViews.js +66 -66
  15. package/dist/shared/components/chat/RoomParts.js +159 -157
  16. package/dist/shared/components/help-videos/editor/StatsTab.js +48 -47
  17. package/dist/shared/components/help-videos/editor/VersionsTab.js +17 -16
  18. package/dist/shared/components/imports/CollectionImportPanel.js +72 -72
  19. package/dist/shared/components/integrations/IntegrationObligationsView.js +199 -187
  20. package/dist/shared/components/integrations/console/EventsView.js +22 -24
  21. package/dist/shared/components/integrations/console/SubmissionRow.js +6 -13
  22. package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +29 -28
  23. package/dist/shared/components/integrations/console/tone.js +22 -21
  24. package/dist/shared/components/item-edit/FieldRow.js +188 -188
  25. package/dist/shared/components/item-edit/FilePickerField.js +281 -297
  26. package/dist/shared/components/item-edit/GroupSection.js +209 -209
  27. package/dist/shared/components/item-edit/RecordInsights.js +101 -101
  28. package/dist/shared/components/item-edit/SummaryPanel.js +31 -31
  29. package/dist/shared/components/layout-editor/assist/ExplainDiff.js +12 -12
  30. package/dist/shared/components/panels/AddendumPanel.js +409 -411
  31. package/dist/shared/components/panels/BranchLanes.js +7 -7
  32. package/dist/shared/components/panels/CommentPanel.js +204 -197
  33. package/dist/shared/components/panels/PipelinePanel.js +264 -264
  34. package/dist/shared/components/panels/RecordIntegrityBanner.js +78 -78
  35. package/dist/shared/components/panels/RevisionsPanel.js +229 -229
  36. package/dist/shared/components/panels/TaskPanel.js +75 -75
  37. package/dist/shared/components/queue/QueueWorklist.js +591 -589
  38. package/dist/shared/lib/compare-value.js +73 -0
  39. package/dist/shared/lib/format-value.js +18 -17
  40. package/dist/shared/lib/utils.js +87 -80
  41. package/package.json +1 -1
@@ -1,91 +1,91 @@
1
1
  import { jsxs as d, Fragment as Se, jsx as a } from "react/jsx-runtime";
2
- import { useSensors as po, useSensor as bo, PointerSensor as ho, DndContext as fo, closestCenter as go } from "@dnd-kit/core";
3
- import { SortableContext as xo, verticalListSortingStrategy as yo, arrayMove as ko, useSortable as vo } from "@dnd-kit/sortable";
4
- import { CSS as wo } from "@dnd-kit/utilities";
5
- import { useQueryClient as _o, useQuery as X, useMutation as Te, useQueries as je } from "@tanstack/react-query";
6
- import { AlertTriangle as No, FileDiff as So, RefreshCw as Co, Rows3 as Fa, Flame as $o, Sparkles as qo, Download as Ro, BarChart3 as Fo, SlidersHorizontal as Lo, ListChecks as To, Rows4 as Ao, Rows2 as Eo, Play as Oo, Plus as on, ChevronDown as La, Star as Do, Pin as Ko, Loader2 as Po, Check as Mo, Save as Bo, Bell as Qo, Inbox as jo, GripVertical as Uo } from "lucide-react";
7
- import { useState as w, useRef as Q, useEffect as P, useMemo as J } from "react";
2
+ import { useSensors as bo, useSensor as fo, PointerSensor as ho, DndContext as go, closestCenter as xo } from "@dnd-kit/core";
3
+ import { SortableContext as yo, verticalListSortingStrategy as ko, arrayMove as vo, useSortable as wo } from "@dnd-kit/sortable";
4
+ import { CSS as _o } from "@dnd-kit/utilities";
5
+ import { useQueryClient as No, useQuery as X, useMutation as Te, useQueries as je } from "@tanstack/react-query";
6
+ import { AlertTriangle as So, FileDiff as Co, RefreshCw as $o, Rows3 as Fa, Flame as qo, Sparkles as Ro, Download as Fo, BarChart3 as Lo, SlidersHorizontal as To, ListChecks as Eo, Rows4 as Ao, Rows2 as Oo, Play as Ko, Plus as on, ChevronDown as La, Star as Po, Pin as Do, Loader2 as Mo, Check as Bo, Save as Qo, Bell as jo, Inbox as Uo, GripVertical as Vo } from "lucide-react";
7
+ import { useState as w, useRef as Q, useEffect as D, useMemo as J } from "react";
8
8
  import { createPortal as Ta } from "react-dom";
9
- import { toast as E } from "sonner";
10
- import { useNivaroClient as Qa, useItemEditAuth as Aa, useItemNavigation as Vo, useNavigation as Io, useOverlayState as Go } from "../../context.js";
11
- import { useDebounced as Wo } from "../../hooks/useDebounced.js";
12
- import { useElapsedLoading as Ho } from "../../hooks/useElapsedLoading.js";
13
- import { useSlowReason as Jo } from "../../hooks/useSlowReason.js";
14
- import { useBulkProgressFeed as Yo } from "../../lib/bulk-progress.js";
15
- import { get as O, post as ce, patch as Ea, del as zn, put as zo } from "../../lib/commands.js";
16
- import { deepenForLightSurface as Xo } from "../../lib/display-prefs.js";
17
- import { evaluateExpression as Zo } from "../../lib/expression.js";
18
- import { clauseFromControlValue as es, filterSentence as ts } from "../../lib/filter-sentence.js";
19
- import { deliverLive as ns, releaseLiveOwner as rs } from "../../lib/focus-mode.js";
20
- import { formatMultiValue as Ue, formatValue as as } from "../../lib/format-value.js";
9
+ import { toast as A } from "sonner";
10
+ import { useNivaroClient as ja, useItemEditAuth as Ea, useItemNavigation as Io, useNavigation as Go, useOverlayState as Wo } from "../../context.js";
11
+ import { useDebounced as Ho } from "../../hooks/useDebounced.js";
12
+ import { useElapsedLoading as Jo } from "../../hooks/useElapsedLoading.js";
13
+ import { useSlowReason as Yo } from "../../hooks/useSlowReason.js";
14
+ import { useBulkProgressFeed as zo } from "../../lib/bulk-progress.js";
15
+ import { get as O, post as ce, patch as Aa, del as zn, put as Xo } from "../../lib/commands.js";
16
+ import { deepenForLightSurface as Zo } from "../../lib/display-prefs.js";
17
+ import { evaluateExpression as es } from "../../lib/expression.js";
18
+ import { clauseFromControlValue as ts, filterSentence as ns } from "../../lib/filter-sentence.js";
19
+ import { deliverLive as rs, releaseLiveOwner as as } from "../../lib/focus-mode.js";
20
+ import { formatMultiValue as Ue } from "../../lib/format-value.js";
21
21
  import { createCursorBook as ls, pageRequest as os, noteNextCursor as ss } from "../../lib/keyset-pager.js";
22
22
  import { normalizeInlineEdit as is, inlineM2oTarget as cs, inlineChoices as ds, inlineEditFor as us, nextInlineKey as ms } from "../../lib/list-inline-edit.js";
23
- import { sanitizeQueueLinkState as ps, readListLinkFromLocation as bs, dropListLinkParam as hs, encodeListLink as fs, replaceListLinkParam as gs } from "../../lib/list-link.js";
23
+ import { sanitizeQueueLinkState as ps, readListLinkFromLocation as bs, dropListLinkParam as fs, encodeListLink as hs, replaceListLinkParam as gs } from "../../lib/list-link.js";
24
24
  import { arrivedByListReturn as xs, historyKey as ys, ensureHistoryKey as ks } from "../../lib/list-page-memory.js";
25
- import { expandCoalesced as vs, LIVE_ASPECTS as Et } from "../../lib/live.js";
25
+ import { expandCoalesced as vs, LIVE_ASPECTS as At } from "../../lib/live.js";
26
26
  import { useRowChanges as ws, useRowLocksByCollection as _s, lockLabel as Ns } from "../../lib/live-list.js";
27
27
  import { OPEN_IN_TABS_CAP as Ss, openInTabs as Cs, openInTabsMessage as Oa } from "../../lib/open-in-tabs.js";
28
28
  import { isOwnWrite as $s } from "../../lib/own-writes.js";
29
29
  import { usePrefetchIntent as qs } from "../../lib/prefetch.js";
30
30
  import { useRowPresence as Rs, rowPresenceKey as Fs } from "../../lib/presence-hooks.js";
31
31
  import { buildGroups as Ls } from "../../lib/queue-grouping.js";
32
- import { cascadeFilter as Ts, fetchCascadeRelations as As } from "../../lib/quick-filter-cascade.js";
33
- import { useOptionalRealtime as Es } from "../../lib/realtime.js";
34
- import { copyIdText as Da } from "../../lib/record-ref.js";
35
- import { rowHighlightTextClass as Os, rowHighlightClass as Ds } from "../../lib/row-highlight.js";
32
+ import { cascadeFilter as Ts, fetchCascadeRelations as Es } from "../../lib/quick-filter-cascade.js";
33
+ import { useOptionalRealtime as As } from "../../lib/realtime.js";
34
+ import { copyIdText as Ka } from "../../lib/record-ref.js";
35
+ import { rowHighlightTextClass as Os, rowHighlightClass as Ks } from "../../lib/row-highlight.js";
36
36
  import { userErrorMessage as dt } from "../../lib/safe-error.js";
37
- import { useMyScopes as Ks, matchScopeDimension as Ps } from "../../lib/use-my-scopes.js";
37
+ import { useMyScopes as Ps, matchScopeDimension as Ds } from "../../lib/use-my-scopes.js";
38
38
  import { useNewItemLayouts as Ms } from "../../lib/use-new-item-layouts.js";
39
- import { formatNumber as ee, cn as L, titleCase as Xn, humanHours as Bs, formatRelative as Qs, formatDateTime as js, formatDate as Us } from "../../lib/utils.js";
40
- import { usePublishAskContext as Vs, useAskRecordDrag as Is } from "../ai/ask-context.js";
41
- import { useBuiltinGate as Gs, BulkActionButtons as Ws } from "../bulk/BulkActionButtons.js";
42
- import { BulkCompareButton as Hs } from "../bulk/BulkCompareButton.js";
43
- import { BulkFieldUpdateButton as Js } from "../bulk/BulkFieldUpdateButton.js";
44
- import { BulkRowMark as Ys } from "../bulk/BulkRowMark.js";
45
- import { BulkMessageButton as zs } from "../bulk/MessageStakeholders.js";
46
- import { compareCell as Xs, RowActionsMenu as Zs, roleMayUpdate as ei } from "../CollectionBrowserView.js";
47
- import { DataTable as ti } from "../DataTable.js";
48
- import { EmptyState as ni } from "../EmptyState.js";
49
- import { FocusModeToggle as ri } from "../FocusModeToggle.js";
50
- import { FulfilmentPill as ai, FULFILMENT_FILTER_OPTIONS as li } from "../FulfilmentPill.js";
51
- import { ImportFromFileButton as oi } from "../import/ImportFromFileButton.js";
52
- import { IntegrationDots as si, INTEGRATIONS_FILTER_OPTIONS as ii } from "../integrations/IntegrationDots.js";
53
- import { IntegrationsFilterPill as ci } from "../integrations/IntegrationsFilterPill.js";
54
- import { readQueueReturn as di, queueReturnApplies as ui, writeQueueReturn as Ka } from "../item-edit/QueueReturnChip.js";
55
- import { ListLoadError as mi } from "../ListLoadError.js";
56
- import { LiveRowMark as pi } from "../LiveRowMark.js";
57
- import { CopyListLinkButton as bi } from "../list/CopyListLinkButton.js";
58
- import { useInlineEdit as hi, InlineEditCell as fi } from "../list/InlineEdit.js";
59
- import { usePickerExcludedRows as gi, PICKER_EXCLUDED_ROW_CLASS as xi, PICKER_EXCLUDED_TITLE as yi } from "../PickerExcludedRows.js";
60
- import { RealtimeStaleMark as ki } from "../RealtimeStatusBanner.js";
61
- import { RecordDrilldownSheet as vi } from "../RecordDrilldownSheet.js";
62
- import { RowHighlightLegend as wi } from "../RowHighlightLegend.js";
63
- import { RowPresence as _i } from "../RowPresence.js";
39
+ import { formatNumber as ee, cn as L, formatDateTime as Pa, titleCase as Xn, humanHours as Bs, formatRelative as Qs, formatDate as js } from "../../lib/utils.js";
40
+ import { usePublishAskContext as Us, useAskRecordDrag as Vs } from "../ai/ask-context.js";
41
+ import { useBuiltinGate as Is, BulkActionButtons as Gs } from "../bulk/BulkActionButtons.js";
42
+ import { BulkCompareButton as Ws } from "../bulk/BulkCompareButton.js";
43
+ import { BulkFieldUpdateButton as Hs } from "../bulk/BulkFieldUpdateButton.js";
44
+ import { BulkRowMark as Js } from "../bulk/BulkRowMark.js";
45
+ import { BulkMessageButton as Ys } from "../bulk/MessageStakeholders.js";
46
+ import { compareCell as zs, RowActionsMenu as Xs, roleMayUpdate as Zs } from "../CollectionBrowserView.js";
47
+ import { DataTable as ei } from "../DataTable.js";
48
+ import { EmptyState as ti } from "../EmptyState.js";
49
+ import { FocusModeToggle as ni } from "../FocusModeToggle.js";
50
+ import { FulfilmentPill as ri, FULFILMENT_FILTER_OPTIONS as ai } from "../FulfilmentPill.js";
51
+ import { ImportFromFileButton as li } from "../import/ImportFromFileButton.js";
52
+ import { IntegrationDots as oi, INTEGRATIONS_FILTER_OPTIONS as si } from "../integrations/IntegrationDots.js";
53
+ import { IntegrationsFilterPill as ii } from "../integrations/IntegrationsFilterPill.js";
54
+ import { readQueueReturn as ci, queueReturnApplies as di, writeQueueReturn as Da } from "../item-edit/QueueReturnChip.js";
55
+ import { ListLoadError as ui } from "../ListLoadError.js";
56
+ import { LiveRowMark as mi } from "../LiveRowMark.js";
57
+ import { CopyListLinkButton as pi } from "../list/CopyListLinkButton.js";
58
+ import { useInlineEdit as bi, InlineEditCell as fi } from "../list/InlineEdit.js";
59
+ import { usePickerExcludedRows as hi, PICKER_EXCLUDED_ROW_CLASS as gi, PICKER_EXCLUDED_TITLE as xi } from "../PickerExcludedRows.js";
60
+ import { RealtimeStaleMark as yi } from "../RealtimeStatusBanner.js";
61
+ import { RecordDrilldownSheet as ki } from "../RecordDrilldownSheet.js";
62
+ import { RowHighlightLegend as vi } from "../RowHighlightLegend.js";
63
+ import { RowPresence as wi } from "../RowPresence.js";
64
64
  import { TickerNumber as Zn } from "../TickerNumber.js";
65
- import { UnseenDot as Ni } from "../UnseenDot.js";
66
- import { Badge as Si } from "../ui/badge.js";
65
+ import { UnseenDot as _i } from "../UnseenDot.js";
66
+ import { Badge as Ni } from "../ui/badge.js";
67
67
  import { Checkbox as er } from "../ui/checkbox.js";
68
- import { Command as Pa, CommandInput as Ci, CommandList as Ma, CommandEmpty as $i, CommandItem as Ot } from "../ui/command.js";
69
- import { Label as qi } from "../ui/label.js";
68
+ import { Command as Ma, CommandInput as Si, CommandList as Ba, CommandEmpty as Ci, CommandItem as Ot } from "../ui/command.js";
69
+ import { Label as $i } from "../ui/label.js";
70
70
  import { Popover as ut, PopoverTrigger as mt, PopoverContent as pt } from "../ui/popover.js";
71
- import { Skeleton as Ri } from "../ui/skeleton.js";
72
- import { dedupeChooserKeys as Fi } from "./column-chooser.js";
73
- import { groupSumPathsFor as Li } from "./group-sums.js";
74
- import { offscreenPill as Ti, statsOutrunRows as Ai, stateAspectEffect as Ei } from "./live-state-aspect.js";
75
- import { OwnerAvatars as Oi } from "./OwnerAvatars.js";
76
- import { pathHeader as Di } from "./path-label.js";
71
+ import { Skeleton as qi } from "../ui/skeleton.js";
72
+ import { dedupeChooserKeys as Ri } from "./column-chooser.js";
73
+ import { groupSumPathsFor as Fi } from "./group-sums.js";
74
+ import { offscreenPill as Li, statsOutrunRows as Ti, stateAspectEffect as Ei } from "./live-state-aspect.js";
75
+ import { OwnerAvatars as Ai } from "./OwnerAvatars.js";
76
+ import { pathHeader as Oi } from "./path-label.js";
77
77
  import { QueueBulkBar as Ki } from "./QueueBulkBar.js";
78
78
  import { QueueItemSheet as Pi } from "./QueueItemSheet.js";
79
- import { QueueKanbanBoard as Mi } from "./QueueKanbanBoard.js";
80
- import { QueueQuickFilters as Bi } from "./QueueQuickFilters.js";
81
- import { QueueWorkloadView as Qi } from "./QueueWorkloadView.js";
82
- import { useTransitionNote as ji, needsTransitionNote as Ui } from "./transition-note.js";
83
- import { worklistCsv as Vi, worklistCsvName as Ii } from "./worklist-csv.js";
84
- import { extraChoiceText as Dt, atRiskBreakdown as Ba, worklistKeyTarget as Gi } from "./worklist-helpers.js";
85
- function Wi({ summary: l }) {
79
+ import { QueueKanbanBoard as Di } from "./QueueKanbanBoard.js";
80
+ import { QueueQuickFilters as Mi } from "./QueueQuickFilters.js";
81
+ import { QueueWorkloadView as Bi } from "./QueueWorkloadView.js";
82
+ import { useTransitionNote as Qi, needsTransitionNote as ji } from "./transition-note.js";
83
+ import { worklistCsv as Ui, worklistCsvName as Vi } from "./worklist-csv.js";
84
+ import { extraChoiceText as Kt, atRiskBreakdown as Qa, worklistKeyTarget as Ii } from "./worklist-helpers.js";
85
+ function Gi({ summary: l }) {
86
86
  if (!l || l.count === 0)
87
87
  return /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-muted-foreground", children: "—" });
88
- const k = [l.last_from, l.last_to].filter(Boolean).join(" → "), D = [
88
+ const k = [l.last_from, l.last_to].filter(Boolean).join(" → "), K = [
89
89
  k ? `Last: ${k}` : null,
90
90
  l.last_at ? Qs(l.last_at) : null,
91
91
  l.last_reason ? `“${l.last_reason}”` : "no reason given"
@@ -94,7 +94,7 @@ function Wi({ summary: l }) {
94
94
  "span",
95
95
  {
96
96
  className: "inline-flex max-w-[260px] items-center gap-1.5 truncate rounded-full border border-rose-200 bg-rose-50 px-2 py-0.5 text-[11px] font-medium text-rose-700 dark:border-rose-900/40 dark:bg-rose-900/10 dark:text-rose-300",
97
- "data-tip": D,
97
+ "data-tip": K,
98
98
  "data-send-backs": l.count,
99
99
  children: [
100
100
  /* @__PURE__ */ d("span", { className: "tabular-nums", children: [
@@ -109,15 +109,15 @@ function Wi({ summary: l }) {
109
109
  }
110
110
  );
111
111
  }
112
- const Hi = 50, sn = "nivaro_addendums", Ji = [
112
+ const Wi = 50, sn = "nivaro_addendums", Hi = [
113
113
  { value: "mine", label: "My Items" },
114
114
  { value: "unowned", label: "No Owners" },
115
115
  { value: "claimed", label: "Claimed by me" },
116
116
  { value: "all", label: "All Items" }
117
117
  ];
118
- function Yi({ summary: l }) {
118
+ function Ji({ summary: l }) {
119
119
  if (!l || l.total === 0) return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
120
- const k = l.active > 0, D = l.latest_status === "review" ? "in review" : l.latest_status ?? "active", M = l.cost_impact, Z = M != null && M !== 0 ? `${M > 0 ? "+" : "−"}$${Math.abs(M).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null;
120
+ const k = l.active > 0, K = l.latest_status === "review" ? "in review" : l.latest_status ?? "active", M = l.cost_impact, Z = M != null && M !== 0 ? `${M > 0 ? "+" : "−"}$${Math.abs(M).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null;
121
121
  return /* @__PURE__ */ d(
122
122
  "span",
123
123
  {
@@ -137,7 +137,7 @@ function Yi({ summary: l }) {
137
137
  )
138
138
  }
139
139
  ),
140
- k ? `${l.active} ${l.active === 1 ? "addendum" : "addendums"} ${D}` : `${l.total} ${D}`,
140
+ k ? `${l.active} ${l.active === 1 ? "addendum" : "addendums"} ${K}` : `${l.total} ${K}`,
141
141
  Z && /* @__PURE__ */ d("span", { className: "tabular-nums opacity-80", children: [
142
142
  "· ",
143
143
  Z
@@ -146,21 +146,21 @@ function Yi({ summary: l }) {
146
146
  }
147
147
  );
148
148
  }
149
- function zi(l) {
149
+ function Yi(l) {
150
150
  return Bs(l);
151
151
  }
152
- function Xi({ status: l }) {
152
+ function zi({ status: l }) {
153
153
  return l ? /* @__PURE__ */ a("span", { className: L("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: "—" });
154
154
  }
155
- function Zi({ points: l, inline: k = !1 }) {
155
+ function Xi({ points: l, inline: k = !1 }) {
156
156
  if (l.length < 2) return null;
157
- const D = k ? 40 : 64, M = k ? 14 : 18, Z = Math.max(...l), f = Math.min(...l), h = Z - f || 1, S = D / (l.length - 1), Y = l.map(
158
- (de, g) => `${g === 0 ? "M" : "L"}${(g * S).toFixed(1)},${(M - 2 - (de - f) / h * (M - 4)).toFixed(1)}`
157
+ const K = k ? 40 : 64, M = k ? 14 : 18, Z = Math.max(...l), h = Math.min(...l), f = Z - h || 1, S = K / (l.length - 1), Y = l.map(
158
+ (de, g) => `${g === 0 ? "M" : "L"}${(g * S).toFixed(1)},${(M - 2 - (de - h) / f * (M - 4)).toFixed(1)}`
159
159
  ).join(" ");
160
160
  return /* @__PURE__ */ a(
161
161
  "svg",
162
162
  {
163
- width: D,
163
+ width: K,
164
164
  height: M,
165
165
  className: k ? "opacity-40" : "mt-1.5 opacity-40",
166
166
  "aria-hidden": "true",
@@ -168,14 +168,14 @@ function Zi({ points: l, inline: k = !1 }) {
168
168
  }
169
169
  );
170
170
  }
171
- function Kt({
171
+ function Pt({
172
172
  label: l,
173
173
  count: k,
174
- filteredCount: D,
174
+ filteredCount: K,
175
175
  active: M,
176
176
  isLoading: Z,
177
- tone: f,
178
- trend: h,
177
+ tone: h,
178
+ trend: f,
179
179
  delta: S,
180
180
  deltaBadIsUp: Y,
181
181
  breakdown: de,
@@ -188,7 +188,7 @@ function Kt({
188
188
  onClick: g,
189
189
  "aria-pressed": M,
190
190
  "aria-label": [
191
- D != null ? `${ee(D)} of ${ee(k)} ${l}` : `${ee(k)} ${l}`,
191
+ K != null ? `${ee(K)} of ${ee(k)} ${l}` : `${ee(k)} ${l}`,
192
192
  de || null,
193
193
  S != null && S !== 0 ? `${S > 0 ? "up" : "down"} ${ee(Math.abs(S))} since the last daily count` : null
194
194
  ].filter(Boolean).join(", "),
@@ -198,7 +198,7 @@ function Kt({
198
198
  "grow justify-center sm:justify-start",
199
199
  M && "bg-nvr-cyan/5 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/10"
200
200
  ),
201
- children: Z ? /* @__PURE__ */ a(Ri, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(Se, { children: [
201
+ children: Z ? /* @__PURE__ */ a(qi, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(Se, { children: [
202
202
  /* @__PURE__ */ a(
203
203
  "span",
204
204
  {
@@ -206,8 +206,8 @@ function Kt({
206
206
  "flex items-baseline gap-1 text-[15px] font-semibold leading-none tabular-nums",
207
207
  k === 0 && !M ? "text-slate-500 dark:text-slate-400" : "text-slate-900 dark:text-foreground"
208
208
  ),
209
- children: D != null ? /* @__PURE__ */ d(Se, { children: [
210
- /* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ a(Zn, { value: D, format: ee }) }),
209
+ children: K != null ? /* @__PURE__ */ d(Se, { children: [
210
+ /* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ a(Zn, { value: K, format: ee }) }),
211
211
  /* @__PURE__ */ d("span", { className: "text-[11px] font-medium text-slate-500 dark:text-slate-400", children: [
212
212
  "/ ",
213
213
  /* @__PURE__ */ a(Zn, { value: k, format: ee })
@@ -220,7 +220,7 @@ function Kt({
220
220
  {
221
221
  className: L(
222
222
  "whitespace-nowrap text-[11px] font-medium leading-none",
223
- f === "red" ? "text-red-700 dark:text-red-400" : f === "amber" ? "text-amber-800 dark:text-amber-400" : "text-slate-500 dark:text-muted-foreground"
223
+ h === "red" ? "text-red-700 dark:text-red-400" : h === "amber" ? "text-amber-800 dark:text-amber-400" : "text-slate-500 dark:text-muted-foreground"
224
224
  ),
225
225
  children: l
226
226
  }
@@ -246,24 +246,24 @@ function Kt({
246
246
  ]
247
247
  }
248
248
  ),
249
- h && k > 0 && /* @__PURE__ */ a(Zi, { points: h, inline: !0 })
249
+ f && k > 0 && /* @__PURE__ */ a(Xi, { points: f, inline: !0 })
250
250
  ] })
251
251
  }
252
252
  );
253
253
  }
254
- function ec({
254
+ function Zi({
255
255
  label: l,
256
256
  count: k,
257
- filteredCount: D,
257
+ filteredCount: K,
258
258
  color: M,
259
259
  active: Z,
260
- onClick: f
260
+ onClick: h
261
261
  }) {
262
262
  return /* @__PURE__ */ d(
263
263
  "button",
264
264
  {
265
265
  type: "button",
266
- onClick: f,
266
+ onClick: h,
267
267
  className: L(
268
268
  "flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[12px] font-medium transition-colors",
269
269
  Z ? "border-nvr-cyan bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 bg-white text-slate-600 hover:border-slate-300 hover:bg-slate-50 dark:border-border dark:bg-card dark:text-slate-300"
@@ -277,8 +277,8 @@ function ec({
277
277
  }
278
278
  ),
279
279
  l,
280
- /* @__PURE__ */ a("span", { className: "font-semibold tabular-nums text-slate-900 dark:text-foreground", children: D != null ? /* @__PURE__ */ d(Se, { children: [
281
- /* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: ee(D) }),
280
+ /* @__PURE__ */ a("span", { className: "font-semibold tabular-nums text-slate-900 dark:text-foreground", children: K != null ? /* @__PURE__ */ d(Se, { children: [
281
+ /* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: ee(K) }),
282
282
  /* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
283
283
  " / ",
284
284
  ee(k)
@@ -288,56 +288,56 @@ function ec({
288
288
  }
289
289
  );
290
290
  }
291
- const Ve = Di;
292
- function tc({
291
+ const Ve = Oi;
292
+ function ec({
293
293
  id: l,
294
294
  label: k,
295
- checked: D,
295
+ checked: K,
296
296
  onCheckedChange: M
297
297
  }) {
298
- const { attributes: Z, listeners: f, setNodeRef: h, transform: S, transition: Y, isDragging: de } = vo({
298
+ const { attributes: Z, listeners: h, setNodeRef: f, transform: S, transition: Y, isDragging: de } = wo({
299
299
  id: l
300
300
  }), g = {
301
- transform: wo.Transform.toString(S),
301
+ transform: _o.Transform.toString(S),
302
302
  transition: Y,
303
303
  opacity: de ? 0.4 : 1
304
304
  }, te = `col-toggle-${l}`;
305
- return /* @__PURE__ */ d("div", { ref: h, style: g, className: "flex items-center gap-2 text-[12px]", children: [
305
+ return /* @__PURE__ */ d("div", { ref: f, style: g, className: "flex items-center gap-2 text-[12px]", children: [
306
306
  /* @__PURE__ */ a(
307
307
  "span",
308
308
  {
309
309
  ...Z,
310
- ...f,
310
+ ...h,
311
311
  className: "cursor-grab text-slate-300 hover:text-slate-500 dark:text-muted-foreground",
312
- children: /* @__PURE__ */ a(Uo, { className: "h-3.5 w-3.5" })
312
+ children: /* @__PURE__ */ a(Vo, { className: "h-3.5 w-3.5" })
313
313
  }
314
314
  ),
315
- /* @__PURE__ */ a(er, { id: te, checked: D, onCheckedChange: M }),
316
- /* @__PURE__ */ a(qi, { htmlFor: te, className: "cursor-pointer text-[12px] font-normal", children: k })
315
+ /* @__PURE__ */ a(er, { id: te, checked: K, onCheckedChange: M }),
316
+ /* @__PURE__ */ a($i, { htmlFor: te, className: "cursor-pointer text-[12px] font-normal", children: k })
317
317
  ] });
318
318
  }
319
- function Dd({
319
+ function Od({
320
320
  queueId: l,
321
321
  realtime: k,
322
- renderError: D,
322
+ renderError: K,
323
323
  hideCreateActions: M = !1,
324
324
  onAsk: Z
325
325
  }) {
326
- var pa, ba, ha, fa, ga, xa, ya, ka, va, wa, _a, Na, Sa, Ca, $a, qa, Ra;
327
- const f = _o(), h = Qa(), { userId: S } = Aa(), Y = Vo(), { navigate: de } = Io(), [g, te] = w("all"), [ue, K] = w(1), tr = Q(ls()), [Pt, ja] = w(() => {
326
+ var pa, ba, fa, ha, ga, xa, ya, ka, va, wa, _a, Na, Sa, Ca, $a, qa, Ra;
327
+ const h = No(), f = ja(), { userId: S } = Ea(), Y = Io(), { navigate: de } = Go(), [g, te] = w("all"), [ue, P] = w(1), tr = Q(ls()), [Dt, Ua] = w(() => {
328
328
  try {
329
329
  return localStorage.getItem("nvr_table_density") === "comfortable" ? "comfortable" : "compact";
330
330
  } catch {
331
331
  return "compact";
332
332
  }
333
- }), [C, Ie] = w("table"), [B, Ge] = w(""), [_, j] = w({}), [Mt, nr] = w(() => /* @__PURE__ */ new Set()), [R, bt] = w(null), [Ce, cn] = w(/* @__PURE__ */ new Set()), [ht, dn] = w(null), [We, un] = w(null), [mn, Bt] = w(0), pn = Q(0), Ae = ws(), bn = Es(), hn = Q({}).current, rr = Q(/* @__PURE__ */ new Set()), [Ua, Va] = w(0), [ar, Ia] = w(0), be = Q(!1), Qt = Q([]), lr = Q(null), fn = Q(!1), gn = Q(0), xn = Q("table");
333
+ }), [C, Ie] = w("table"), [B, Ge] = w(""), [_, j] = w({}), [Mt, nr] = w(() => /* @__PURE__ */ new Set()), [R, bt] = w(null), [Ce, cn] = w(/* @__PURE__ */ new Set()), [ft, dn] = w(null), [We, un] = w(null), [mn, Bt] = w(0), pn = Q(0), Ee = ws(), bn = As(), fn = Q({}).current, rr = Q(/* @__PURE__ */ new Set()), [Va, Ia] = w(0), [ar, Ga] = w(0), be = Q(!1), Qt = Q([]), lr = Q(null), hn = Q(!1), gn = Q(0), xn = Q("table");
334
334
  xn.current = C;
335
335
  const yn = 25, { data: c, error: jt } = X({
336
336
  queryKey: ["queue-meta", l],
337
- queryFn: () => h.request(O(`/queues/${l}`)).then((e) => e.data),
337
+ queryFn: () => f.request(O(`/queues/${l}`)).then((e) => e.data),
338
338
  enabled: !!l
339
- }), { scopes: Ut, ready: or } = Ks(), sr = Q(!1), [ir, cr] = w(!1), [he, Ga] = w({}), fe = Q({});
340
- P(() => {
339
+ }), { scopes: Ut, ready: or } = Ps(), sr = Q(!1), [ir, cr] = w(!1), [fe, Wa] = w({}), he = Q({});
340
+ D(() => {
341
341
  if (sr.current || !or || !c) return;
342
342
  sr.current = !0;
343
343
  const e = (c.extra_field_meta ?? []).filter(
@@ -349,7 +349,7 @@ function Dd({
349
349
  }
350
350
  (async () => {
351
351
  const t = {}, n = {}, r = async (o, s) => {
352
- const u = await h.request(
352
+ const u = await f.request(
353
353
  O(`/items/${o.target_collection}`, {
354
354
  filter: JSON.stringify({ id: { _in: s } }),
355
355
  fields: `id,${o.display_field}`,
@@ -363,7 +363,7 @@ function Dd({
363
363
  ];
364
364
  };
365
365
  for (const o of e) {
366
- const s = Ps(Ut, { collection: o.target_collection });
366
+ const s = Ds(Ut, { collection: o.target_collection });
367
367
  if (!s) continue;
368
368
  const u = `extra.${o.path}`;
369
369
  try {
@@ -375,12 +375,12 @@ function Dd({
375
375
  } catch {
376
376
  }
377
377
  }
378
- Object.keys(n).length > 0 && Ga(n), Object.keys(t).length > 0 && (fe.current = t, j((o) => ({ ...o, ...t }))), cr(!0);
378
+ Object.keys(n).length > 0 && Wa(n), Object.keys(t).length > 0 && (he.current = t, j((o) => ({ ...o, ...t }))), cr(!0);
379
379
  })();
380
380
  }, [or, Ut, c]);
381
381
  const He = ((ba = (pa = c == null ? void 0 : c.sources) == null ? void 0 : pa.find((e) => e.type === "collection")) == null ? void 0 : ba.collection) ?? null, { data: dr = [] } = X({
382
382
  queryKey: ["queue-browser-quick-filters", He],
383
- queryFn: () => h.request(O(`/collections/${He}`)).then((e) => {
383
+ queryFn: () => f.request(O(`/collections/${He}`)).then((e) => {
384
384
  var t, n;
385
385
  return ((n = (t = e.data) == null ? void 0 : t.browser_config) == null ? void 0 : n.quick_filters) ?? [];
386
386
  }).catch(() => []),
@@ -393,7 +393,7 @@ function Dd({
393
393
  return t;
394
394
  }, [c == null ? void 0 : c.sources]), Vt = Ms(
395
395
  le.length === 1 ? le[0] : null
396
- ), kn = M === !0 || Array.isArray(M) && le.length > 0 && le.every((e) => M.includes(e)), ge = (c == null ? void 0 : c.claims_enabled) !== !1, p = c == null ? void 0 : c.display_config, Ee = (p == null ? void 0 : p.views) ?? ["table", "kanban", "workload"], Wa = (p == null ? void 0 : p.work_next) !== !1, It = (p == null ? void 0 : p.bulk_actions) !== !1, Je = Gs(
396
+ ), kn = M === !0 || Array.isArray(M) && le.length > 0 && le.every((e) => M.includes(e)), ge = (c == null ? void 0 : c.claims_enabled) !== !1, p = c == null ? void 0 : c.display_config, Ae = (p == null ? void 0 : p.views) ?? ["table", "kanban", "workload"], Ha = (p == null ? void 0 : p.work_next) !== !1, It = (p == null ? void 0 : p.bulk_actions) !== !1, Je = Is(
397
397
  [
398
398
  ...new Set(
399
399
  ((c == null ? void 0 : c.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
@@ -404,15 +404,15 @@ function Dd({
404
404
  var n, r;
405
405
  return ((r = (n = c == null ? void 0 : c.column_aliases) == null ? void 0 : n[e]) == null ? void 0 : r.trim()) || t;
406
406
  }, ur = Q(!1);
407
- P(() => {
407
+ D(() => {
408
408
  !c || ur.current || (ur.current = !0, Ge("-priority"));
409
409
  }, [c]);
410
- const [z, Ha] = w(!1);
411
- P(() => {
412
- c != null && c.display_config && !Ee.includes(C) && Ie(Ee[0]);
413
- }, [c, C, Ee]), P(() => {
410
+ const [z, Ja] = w(!1);
411
+ D(() => {
412
+ c != null && c.display_config && !Ae.includes(C) && Ie(Ae[0]);
413
+ }, [c, C, Ae]), D(() => {
414
414
  if (!(c != null && c.sources)) return;
415
- const e = bn ? (b, A) => bn.subscribeCollections(b, A) : k == null ? void 0 : k.subscribe;
415
+ const e = bn ? (b, E) => bn.subscribeCollections(b, E) : k == null ? void 0 : k.subscribe;
416
416
  if (!e) return;
417
417
  const t = [
418
418
  ...new Set(
@@ -424,46 +424,46 @@ function Dd({
424
424
  let r = null, o = null, s = null;
425
425
  const u = () => {
426
426
  s || (s = setTimeout(() => {
427
- s = null, Ia((b) => b + 1);
427
+ s = null, Ga((b) => b + 1);
428
428
  }, 1500));
429
429
  }, m = () => {
430
430
  o || (o = setTimeout(() => {
431
- if (o = null, gn.current > 0 || fn.current) {
431
+ if (o = null, gn.current > 0 || hn.current) {
432
432
  Qt.current = [], Bt((b) => b + 1);
433
433
  return;
434
434
  }
435
- be.current = !0, f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-workload", l] });
435
+ be.current = !0, h.invalidateQueries({ queryKey: ["queue-items", l] }), h.invalidateQueries({ queryKey: ["queue-workload", l] });
436
436
  }, 900));
437
437
  }, y = (b) => {
438
- let A = !1, v = 0, ae = !1;
438
+ let E = !1, v = 0, ae = !1;
439
439
  const pe = b.flatMap(
440
440
  (q) => q ? vs(q) : [q]
441
441
  );
442
442
  for (const q of pe) {
443
443
  const V = q == null ? void 0 : q.changed_fields, H = (q == null ? void 0 : q.collection) != null ? `${q.collection}:${String(q.item)}` : null, ln = H != null && rr.current.has(H);
444
444
  if (q && !q.action && (V != null && V.length) && V.every((Le) => Le.startsWith("$"))) {
445
- if (V.includes(Et.tasks) && n.add("queue-task-counts"), V.includes(Et.integrations) && n.add("queue-integrations-summary"), V.includes(Et.addendums) && n.add("queue-collection-addendums"), V.includes(Et.lock) && Va((Le) => Le + 1), V.includes(Et.state)) {
445
+ if (V.includes(At.tasks) && n.add("queue-task-counts"), V.includes(At.integrations) && n.add("queue-integrations-summary"), V.includes(At.addendums) && n.add("queue-collection-addendums"), V.includes(At.lock) && Ia((Le) => Le + 1), V.includes(At.state)) {
446
446
  const Le = Ei(ln, xn.current === "kanban");
447
- ae = !0, Le.refresh && (A = !0), v += Le.pill;
447
+ ae = !0, Le.refresh && (E = !0), v += Le.pill;
448
448
  }
449
449
  r || (r = setTimeout(() => {
450
450
  r = null;
451
- for (const Le of n) f.invalidateQueries({ queryKey: [Le] });
451
+ for (const Le of n) h.invalidateQueries({ queryKey: [Le] });
452
452
  n.clear();
453
453
  }, 300));
454
454
  continue;
455
455
  }
456
456
  ae = !0;
457
- const mo = (q == null ? void 0 : q.collection) != null && $s(q.collection, q.item);
458
- H && (ln || (q == null ? void 0 : q.action) === "create" || xn.current === "kanban") ? (A = !0, mo || Qt.current.push({ key: H, by: null })) : v += 1;
457
+ const po = (q == null ? void 0 : q.collection) != null && $s(q.collection, q.item);
458
+ H && (ln || (q == null ? void 0 : q.action) === "create" || xn.current === "kanban") ? (E = !0, po || Qt.current.push({ key: H, by: null })) : v += 1;
459
459
  }
460
- v > 0 && (pn.current += v), A && m(), ae && u();
461
- }, N = e(t, (b) => ns(hn, [b ?? {}], y));
460
+ v > 0 && (pn.current += v), E && m(), ae && u();
461
+ }, N = e(t, (b) => rs(fn, [b ?? {}], y));
462
462
  return () => {
463
- N(), rs(hn), r && clearTimeout(r), o && clearTimeout(o), s && clearTimeout(s);
463
+ N(), as(fn), r && clearTimeout(r), o && clearTimeout(o), s && clearTimeout(s);
464
464
  };
465
- }, [bn, k, c == null ? void 0 : c.sources, f, l, S, hn]);
466
- const Oe = Wo(_, 350), Ja = JSON.stringify(Oe) === JSON.stringify(_), vn = Q(!1), $e = C === "table" && !!R, mr = Li(c), xe = (() => {
465
+ }, [bn, k, c == null ? void 0 : c.sources, h, l, S, fn]);
466
+ const Oe = Ho(_, 350), Ya = JSON.stringify(Oe) === JSON.stringify(_), vn = Q(!1), $e = C === "table" && !!R, mr = Fi(c), xe = (() => {
467
467
  const e = {};
468
468
  for (const [t, n] of Object.entries(Oe))
469
469
  if (n) {
@@ -481,59 +481,59 @@ function Dd({
481
481
  return e;
482
482
  })();
483
483
  function Ye(e, t) {
484
- j((n) => ({ ...n, [e]: n[e] === t ? "" : t })), K(1);
484
+ j((n) => ({ ...n, [e]: n[e] === t ? "" : t })), P(1);
485
485
  }
486
- function Ya(e) {
486
+ function za(e) {
487
487
  j((t) => {
488
488
  const n = t.state, r = Array.isArray(n) ? n : n ? [n] : [], o = r.includes(e) ? r.filter((s) => s !== e) : [...r, e];
489
489
  return { ...t, state: o };
490
- }), K(1);
490
+ }), P(1);
491
491
  }
492
- const za = Array.isArray(_.state) ? _.state : _.state ? [_.state] : [], Xa = (e) => !e || Array.isArray(e) && e.length === 0;
493
- function Za() {
494
- j({ ...fe.current }), te("all"), K(1);
492
+ const Xa = Array.isArray(_.state) ? _.state : _.state ? [_.state] : [], Za = (e) => !e || Array.isArray(e) && e.length === 0;
493
+ function el() {
494
+ j({ ...he.current }), te("all"), P(1);
495
495
  }
496
- const [ft, el] = w(() => {
496
+ const [ht, tl] = w(() => {
497
497
  try {
498
498
  return localStorage.getItem("nvr_queue_insights_open") === "1";
499
499
  } catch {
500
500
  return !1;
501
501
  }
502
502
  });
503
- P(() => {
503
+ D(() => {
504
504
  try {
505
- localStorage.setItem("nvr_queue_insights_open", ft ? "1" : "0");
505
+ localStorage.setItem("nvr_queue_insights_open", ht ? "1" : "0");
506
506
  } catch {
507
507
  }
508
- }, [ft]);
509
- const { data: tl = [] } = X({
508
+ }, [ht]);
509
+ const { data: nl = [] } = X({
510
510
  queryKey: ["queue-view-subs", l],
511
- queryFn: () => h.request(O("/notification-subscriptions")).then((e) => (e.data ?? []).filter((t) => t.queue_id === l)).catch(() => []),
511
+ queryFn: () => f.request(O("/notification-subscriptions")).then((e) => (e.data ?? []).filter((t) => t.queue_id === l)).catch(() => []),
512
512
  staleTime: 3e4
513
- }), Gt = (e) => tl.find((t) => t.queue_view_id === e), nl = (e) => {
513
+ }), Gt = (e) => nl.find((t) => t.queue_view_id === e), rl = (e) => {
514
514
  const t = Gt(e);
515
- (t ? h.request(zn(`/notification-subscriptions/${t.id}`)) : h.request(
515
+ (t ? f.request(zn(`/notification-subscriptions/${t.id}`)) : f.request(
516
516
  ce("/notification-subscriptions", {
517
517
  queue_id: l,
518
518
  queue_view_id: e,
519
519
  digest_frequency: "instant"
520
520
  })
521
521
  )).then(() => {
522
- E.success(
522
+ A.success(
523
523
  t ? "Unsubscribed" : "Subscribed — new arrivals in this view notify you"
524
- ), f.invalidateQueries({ queryKey: ["queue-view-subs", l] });
525
- }).catch((r) => E.error(dt(r, "Failed")));
524
+ ), h.invalidateQueries({ queryKey: ["queue-view-subs", l] });
525
+ }).catch((r) => A.error(dt(r, "Failed")));
526
526
  }, [pr, wn] = w(null), _n = [
527
527
  ...new Set(
528
528
  ((c == null ? void 0 : c.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
529
529
  )
530
- ], { data: rl = {} } = X({
530
+ ], { data: al = {} } = X({
531
531
  queryKey: ["queue-custom-actions", l, _n.join(",")],
532
532
  queryFn: async () => {
533
533
  const e = {};
534
534
  for (const t of _n.slice(0, 6))
535
535
  try {
536
- const n = await h.request(
536
+ const n = await f.request(
537
537
  O("/custom-actions", { collection: t })
538
538
  );
539
539
  e[t] = n.data ?? [];
@@ -544,36 +544,36 @@ function Dd({
544
544
  },
545
545
  enabled: _n.length > 0,
546
546
  staleTime: 6e4
547
- }), al = (e) => rl[e] ?? [], ll = (e, t) => {
548
- h.request(ce(`/custom-actions/${e.id}/execute`, { item: t.item_id })).then(() => {
549
- E.success(`${e.label} ran`), f.invalidateQueries({ queryKey: ["queue-items", l] });
547
+ }), ll = (e) => al[e] ?? [], ol = (e, t) => {
548
+ f.request(ce(`/custom-actions/${e.id}/execute`, { item: t.item_id })).then(() => {
549
+ A.success(`${e.label} ran`), h.invalidateQueries({ queryKey: ["queue-items", l] });
550
550
  }).catch((n) => {
551
551
  const r = n.response;
552
- E.error((r == null ? void 0 : r.error) ?? dt(n, `${e.label} failed`));
552
+ A.error((r == null ? void 0 : r.error) ?? dt(n, `${e.label} failed`));
553
553
  });
554
554
  }, { data: Nn = [] } = X({
555
555
  queryKey: ["queue-triage-labels", l],
556
- queryFn: () => h.request(O(`/queues/${l}/triage-labels`)).then((e) => e.data ?? []).catch(() => []),
556
+ queryFn: () => f.request(O(`/queues/${l}/triage-labels`)).then((e) => e.data ?? []).catch(() => []),
557
557
  staleTime: 3e4
558
558
  }), br = (e, t) => {
559
- h.request(
559
+ f.request(
560
560
  ce(`/queues/${l}/triage-labels/toggle`, {
561
561
  collection: e.collection,
562
562
  item_id: e.item_id,
563
563
  label: t
564
564
  })
565
565
  ).then(() => {
566
- f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-triage-labels", l] });
567
- }).catch((n) => E.error(dt(n, "Label failed")));
566
+ h.invalidateQueries({ queryKey: ["queue-items", l] }), h.invalidateQueries({ queryKey: ["queue-triage-labels", l] });
567
+ }).catch((n) => A.error(dt(n, "Label failed")));
568
568
  }, {
569
569
  data: i,
570
- isLoading: hr,
570
+ isLoading: fr,
571
571
  isFetching: gt,
572
- isPlaceholderData: ol,
572
+ isPlaceholderData: sl,
573
573
  dataUpdatedAt: oe,
574
- isError: fr,
575
- error: sl,
576
- refetch: il
574
+ isError: hr,
575
+ error: il,
576
+ refetch: cl
577
577
  } = X({
578
578
  queryKey: [
579
579
  "queue-items",
@@ -585,7 +585,7 @@ function Dd({
585
585
  R
586
586
  ],
587
587
  queryFn: async () => {
588
- const e = !$e && C === "table", t = JSON.stringify([l, g, B, xe, yn]), n = e ? os(tr.current, t, ue, "").after : void 0, r = await h.request(
588
+ const e = !$e && C === "table", t = JSON.stringify([l, g, B, xe, yn]), n = e ? os(tr.current, t, ue, "").after : void 0, r = await f.request(
589
589
  O(`/queues/${l}/items`, {
590
590
  scope: g,
591
591
  // Last State Change is Aging read the other way round: the newest
@@ -609,25 +609,25 @@ function Dd({
609
609
  // first fetch went out WITHOUT the seeded scope and refired ~350ms later
610
610
  // with it (3.3s + 8.7s of work for one page). The first fetch now also
611
611
  // waits for the debounced copy to settle; later typing still debounces.
612
- enabled: !!l && z && ir && (vn.current || Ja),
612
+ enabled: !!l && z && ir && (vn.current || Ya),
613
613
  // Keep the previous page rendered while a sort/filter/page change refetches —
614
614
  // swapping to skeletons collapsed the table height and jittered the page.
615
615
  placeholderData: (e) => e
616
616
  });
617
617
  i && !vn.current && (vn.current = !0);
618
- const ze = Object.entries(fe.current).filter(
618
+ const ze = Object.entries(he.current).filter(
619
619
  ([e, t]) => {
620
620
  var n;
621
- return !((n = he[e.slice(6)]) != null && n.length) && JSON.stringify(xe[e] ?? null) === JSON.stringify(t);
621
+ return !((n = fe[e.slice(6)]) != null && n.length) && JSON.stringify(xe[e] ?? null) === JSON.stringify(t);
622
622
  }
623
623
  ).map(([e]) => e), gr = ze.length > 0 && Object.keys(xe).every((e) => ze.includes(e)), xr = Object.fromEntries(
624
624
  Object.entries(xe).filter(([e]) => !ze.includes(e))
625
- ), { data: cl } = X({
625
+ ), { data: dl } = X({
626
626
  queryKey: ["queue-default-hidden", l, g, xr],
627
- enabled: !!l && !!i && !gt && i.total === 0 && ((ha = i.empty) == null ? void 0 : ha.reason) === "filters" && ze.length > 0 && !gr,
627
+ enabled: !!l && !!i && !gt && i.total === 0 && ((fa = i.empty) == null ? void 0 : fa.reason) === "filters" && ze.length > 0 && !gr,
628
628
  staleTime: 3e4,
629
629
  retry: !1,
630
- queryFn: () => h.request(
630
+ queryFn: () => f.request(
631
631
  O(`/queues/${l}/items`, {
632
632
  scope: g,
633
633
  filters: JSON.stringify(xr),
@@ -635,14 +635,14 @@ function Dd({
635
635
  limit: 1
636
636
  })
637
637
  ).then((e) => Number(e.total ?? 0))
638
- }), ye = gr ? Math.max(0, (((fa = i == null ? void 0 : i.stats) == null ? void 0 : fa.total) ?? 0) - ((i == null ? void 0 : i.total) ?? 0)) : cl ?? 0, yr = (e) => ze.map(e).join(" and "), kr = () => {
638
+ }), ye = gr ? Math.max(0, (((ha = i == null ? void 0 : i.stats) == null ? void 0 : ha.total) ?? 0) - ((i == null ? void 0 : i.total) ?? 0)) : dl ?? 0, yr = (e) => ze.map(e).join(" and "), kr = () => {
639
639
  j((e) => {
640
640
  const t = { ...e };
641
641
  for (const n of ze) delete t[n];
642
642
  return t;
643
- }), K(1);
643
+ }), P(1);
644
644
  };
645
- P(() => {
645
+ D(() => {
646
646
  if (typeof window > "u" || !oe) return;
647
647
  const e = window;
648
648
  e.__nvrQueueTrace || (e.__nvrQueueTrace = []);
@@ -656,17 +656,17 @@ function Dd({
656
656
  }, r = t.find((o) => o.queue === l);
657
657
  t.push(n), t.length > 50 && t.shift(), r && r !== n && oe - Number(r.at) < 2e3 && t.filter((o) => o.queue === l).length === 2 && console.warn("[queue] duplicate first fetch", { first: r, second: n });
658
658
  }, [oe]);
659
- const Xe = hr && !i || !z || !ir && !i, vr = (gt && !hr || ol && gt) && !be.current, dl = J(
659
+ const Xe = fr && !i || !z || !ir && !i, vr = (gt && !fr || sl && gt) && !be.current, ul = J(
660
660
  () => ($e ? [] : (i == null ? void 0 : i.data) ?? []).slice(0, 100).map((e) => ({ collection: e.collection, item: e.item_id })),
661
661
  [$e, i == null ? void 0 : i.data]
662
- ), ul = Rs(dl), Wt = ji(), wr = Ho(gt && !be.current), ml = Jo({
662
+ ), ml = Rs(ul), Wt = Qi(), wr = Jo(gt && !be.current), pl = Yo({
663
663
  pending: gt && !be.current,
664
664
  request: l != null ? { method: "GET", url: `/queues/${l}/items` } : null,
665
665
  noun: "items"
666
- }), pl = qs();
666
+ }), bl = qs();
667
667
  async function _r(e, t) {
668
668
  var m;
669
- const r = (await h.request(O(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
669
+ const r = (await f.request(O(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
670
670
  if (!r || r.states.length === 0)
671
671
  throw new Error("This item has no workflow instance");
672
672
  const o = r.states.find((y) => y.key === t);
@@ -676,49 +676,49 @@ function Dd({
676
676
  );
677
677
  if (!s) throw new Error("No transition available to move this item here");
678
678
  let u = null;
679
- if (Ui(s) && (u = await Wt.ask(((m = s.label) == null ? void 0 : m.trim()) || "Move"), !u))
679
+ if (ji(s) && (u = await Wt.ask(((m = s.label) == null ? void 0 : m.trim()) || "Move"), !u))
680
680
  throw new Error("Not moved — this move needs a note");
681
- await h.request(
681
+ await f.request(
682
682
  ce(`/pipelines/instance/${e.collection}/${e.item_id}/transition`, {
683
683
  transition_id: s.id,
684
684
  ...u ? { comment: u } : {}
685
685
  })
686
686
  );
687
687
  }
688
- const bl = Te({
688
+ const fl = Te({
689
689
  mutationFn: async ({ item: e, targetState: t }) => {
690
690
  await _r(e, t);
691
691
  },
692
692
  onSuccess: () => {
693
- f.invalidateQueries({ queryKey: ["queue-items", l, g] });
693
+ h.invalidateQueries({ queryKey: ["queue-items", l, g] });
694
694
  },
695
695
  onError: (e) => {
696
- E.error(dt(e, "Failed to move item")), f.invalidateQueries({ queryKey: ["queue-items", l, g] });
696
+ A.error(dt(e, "Failed to move item")), h.invalidateQueries({ queryKey: ["queue-items", l, g] });
697
697
  }
698
- }), De = Te({
699
- mutationFn: (e) => h.request(
698
+ }), Ke = Te({
699
+ mutationFn: (e) => f.request(
700
700
  ce(`/queues/${l}/claim`, {
701
701
  source_collection: e.collection,
702
702
  item_id: e.item_id
703
703
  })
704
704
  ),
705
- onSuccess: () => f.invalidateQueries({ queryKey: ["queue-items", l, g] }),
706
- onError: () => E.error("Failed to claim item")
705
+ onSuccess: () => h.invalidateQueries({ queryKey: ["queue-items", l, g] }),
706
+ onError: () => A.error("Failed to claim item")
707
707
  }), Ze = Te({
708
- mutationFn: (e) => h.request(
708
+ mutationFn: (e) => f.request(
709
709
  ce(`/queues/${l}/release`, {
710
710
  source_collection: e.collection,
711
711
  item_id: e.item_id
712
712
  })
713
713
  ),
714
- onSuccess: () => f.invalidateQueries({ queryKey: ["queue-items", l, g] }),
715
- onError: () => E.error("Failed to release item")
714
+ onSuccess: () => h.invalidateQueries({ queryKey: ["queue-items", l, g] }),
715
+ onError: () => A.error("Failed to release item")
716
716
  }), { data: et } = X({
717
717
  queryKey: ["queue-column-prefs", l],
718
- queryFn: () => h.request(O(`/queues/${l}/column-prefs`)),
718
+ queryFn: () => f.request(O(`/queues/${l}/column-prefs`)),
719
719
  enabled: !!l
720
720
  }), [xt, Ht] = w(null), [tt, Sn] = w(null);
721
- P(() => {
721
+ D(() => {
722
722
  et && Sn(et.data.default_view_id);
723
723
  }, [et]);
724
724
  const [hl, Nr] = w({}), ke = $e ? (i == null ? void 0 : i.groups) ?? null : null, Jt = (ke ?? []).filter((e) => !Ce.has(e.key)).map((e) => e.key).flatMap(
@@ -736,7 +736,7 @@ function Dd({
736
736
  e,
737
737
  t
738
738
  ],
739
- queryFn: () => h.request(
739
+ queryFn: () => f.request(
740
740
  O(`/queues/${l}/items`, {
741
741
  scope: g,
742
742
  sort: B === "state_entered" ? "-aging_hours" : B === "-state_entered" ? "aging_hours" : B,
@@ -744,23 +744,23 @@ function Dd({
744
744
  group_by: R,
745
745
  group_key: e,
746
746
  page: t,
747
- limit: Hi
747
+ limit: Wi
748
748
  })
749
749
  ).then((n) => ({ key: e, rows: n.data })),
750
750
  enabled: !!i && $e,
751
751
  placeholderData: (n) => n
752
752
  }))
753
- }), fl = Cn.map((e) => e.dataUpdatedAt).join(","), $n = J(() => {
753
+ }), gl = Cn.map((e) => e.dataUpdatedAt).join(","), $n = J(() => {
754
754
  const e = /* @__PURE__ */ new Map();
755
755
  return Cn.forEach((t, n) => {
756
756
  if (!t.data) return;
757
757
  const r = Jt[n].key;
758
758
  e.set(r, [...e.get(r) ?? [], ...t.data.rows]);
759
759
  }), e;
760
- }, [fl, Jt.map((e) => `${e.key}\0${e.page}`).join("")]), gl = new Set(
760
+ }, [gl, Jt.map((e) => `${e.key}\0${e.page}`).join("")]), xl = new Set(
761
761
  Cn.flatMap((e, t) => e.isFetching ? [Jt[t].key] : [])
762
762
  ), $ = ke ? [...$n.values()].flat() : (i == null ? void 0 : i.data) ?? [];
763
- Vs(
763
+ Us(
764
764
  l ? {
765
765
  queue: {
766
766
  id: l,
@@ -771,9 +771,9 @@ function Dd({
771
771
  }
772
772
  } : null
773
773
  );
774
- const xl = Is(), yt = $.some((e) => e.fulfilment !== void 0), kt = $.some((e) => e.send_backs !== void 0), { data: nt, dataUpdatedAt: Sr } = X({
774
+ const yl = Vs(), yt = $.some((e) => e.fulfilment !== void 0), kt = $.some((e) => e.send_backs !== void 0), { data: nt, dataUpdatedAt: Sr } = X({
775
775
  queryKey: ["queue-live-stats", l, g, Oe, ar],
776
- queryFn: () => h.request(
776
+ queryFn: () => f.request(
777
777
  O(`/queues/${l}/items`, {
778
778
  scope: g,
779
779
  filters: JSON.stringify(xe),
@@ -786,23 +786,23 @@ function Dd({
786
786
  placeholderData: (e) => e,
787
787
  retry: !1
788
788
  }), Yt = !!nt && Sr > oe, x = Yt ? nt.stats : i == null ? void 0 : i.stats, I = Yt ? nt.filtered_stats ?? null : (i == null ? void 0 : i.filtered_stats) ?? null, Cr = Yt ? nt.state_counts : i == null ? void 0 : i.state_counts;
789
- P(() => {
789
+ D(() => {
790
790
  if (!Yt) return;
791
- const e = gn.current > 0 || fn.current, t = Ti({
791
+ const e = gn.current > 0 || hn.current, t = Li({
792
792
  pending: pn.current,
793
793
  liveTotal: nt.total,
794
794
  rowsTotal: i == null ? void 0 : i.total,
795
795
  // Only a table re-reads its rows quietly; the other views keep the pill.
796
796
  busy: e || C !== "table"
797
797
  });
798
- pn.current = 0, t > 0 && Bt((r) => r + t), Ai({
798
+ pn.current = 0, t > 0 && Bt((r) => r + t), Ti({
799
799
  liveTotal: nt.total,
800
800
  rowsTotal: i == null ? void 0 : i.total,
801
801
  // Grouped tables too (army 8 b08-N6): their headers count the whole set, and
802
802
  // nothing else re-read them — "37 of 38" with the strip at 38 for minutes.
803
803
  table: C === "table",
804
804
  busy: e
805
- }) && (be.current = !0, f.invalidateQueries({
805
+ }) && (be.current = !0, h.invalidateQueries({
806
806
  queryKey: $e ? ["queue-items", l] : ["queue-items", l, g]
807
807
  }).finally(() => {
808
808
  be.current = !1;
@@ -814,9 +814,9 @@ function Dd({
814
814
  rr.current = new Set($.map((e) => `${e.collection}:${e.item_id}`));
815
815
  const wt = _s(
816
816
  $.map((e) => ({ collection: e.collection, id: e.item_id })),
817
- Ua
817
+ Va
818
818
  ), qr = Q(oe), Rr = Q(0);
819
- !be.current && oe !== Rr.current && (qr.current = oe), P(() => {
819
+ !be.current && oe !== Rr.current && (qr.current = oe), D(() => {
820
820
  const e = new Set($.map((t) => `${t.collection}:${t.item_id}`));
821
821
  if (be.current) {
822
822
  be.current = !1, Rr.current = oe;
@@ -824,27 +824,27 @@ function Dd({
824
824
  Qt.current = [];
825
825
  const n = lr.current, r = /* @__PURE__ */ new Set();
826
826
  for (const o of t)
827
- !e.has(o.key) || r.has(o.key) || (r.add(o.key), Ae.note([o.key], o.by, n && !n.has(o.key) ? "create" : "update"));
827
+ !e.has(o.key) || r.has(o.key) || (r.add(o.key), Ee.note([o.key], o.by, n && !n.has(o.key) ? "create" : "update"));
828
828
  if (n) {
829
829
  const o = [...e].filter((s) => !n.has(s) && !r.has(s));
830
- o.length > 0 && o.length <= 20 && Ae.note(o, null, "create");
830
+ o.length > 0 && o.length <= 20 && Ee.note(o, null, "create");
831
831
  }
832
832
  }
833
833
  lr.current = e;
834
- }, [oe]), P(() => {
834
+ }, [oe]), D(() => {
835
835
  Bt(0);
836
836
  }, [oe]);
837
- function yl() {
838
- f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-workload", l] }), Bt(0);
837
+ function kl() {
838
+ h.invalidateQueries({ queryKey: ["queue-items", l] }), h.invalidateQueries({ queryKey: ["queue-workload", l] }), Bt(0);
839
839
  }
840
840
  const { data: ve } = X({
841
841
  queryKey: ["queue-trends", l],
842
- queryFn: () => h.request(O(`/queues/${l}/trends`, { days: 14 })),
842
+ queryFn: () => f.request(O(`/queues/${l}/trends`, { days: 14 })),
843
843
  enabled: !!l,
844
844
  staleTime: 300 * 1e3
845
845
  }), { data: we } = X({
846
846
  queryKey: ["queue-trends", l, "mine"],
847
- queryFn: () => h.request(O(`/queues/${l}/trends`, { days: 14, scope: "mine" })),
847
+ queryFn: () => f.request(O(`/queues/${l}/trends`, { days: 14, scope: "mine" })),
848
848
  enabled: !!l && g === "mine",
849
849
  staleTime: 300 * 1e3
850
850
  });
@@ -869,14 +869,14 @@ function Dd({
869
869
  )
870
870
  ],
871
871
  [c == null ? void 0 : c.sources]
872
- ), { data: kl } = X({
872
+ ), { data: vl } = X({
873
873
  queryKey: ["collections"],
874
- queryFn: () => h.request(O("/collections")).then((e) => e.data),
874
+ queryFn: () => f.request(O("/collections")).then((e) => e.data),
875
875
  staleTime: 300 * 1e3
876
876
  }), rt = je({
877
877
  queries: Nt.map((e) => ({
878
878
  queryKey: ["queue-collection-addendums", e],
879
- queryFn: () => h.request(
879
+ queryFn: () => f.request(
880
880
  O(`/collections/${e}`)
881
881
  ).then((t) => {
882
882
  var n;
@@ -886,7 +886,7 @@ function Dd({
886
886
  }))
887
887
  }).some((e) => e.data === !0), { data: Rn = [] } = X({
888
888
  queryKey: ["queue-integrations-collections"],
889
- queryFn: () => h.request(O("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
889
+ queryFn: () => f.request(O("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
890
890
  staleTime: 300 * 1e3
891
891
  }), qe = Nt.some((e) => Rn.includes(e)), Fn = J(() => {
892
892
  var t;
@@ -901,7 +901,7 @@ function Dd({
901
901
  }, [$, Rn, qe]), Fr = Object.keys(Fn), Lr = je({
902
902
  queries: Fr.map((e) => ({
903
903
  queryKey: ["queue-integrations-summary", e, Fn[e].join(",")],
904
- queryFn: () => h.request(
904
+ queryFn: () => f.request(
905
905
  ce("/integration-obligations/summary", {
906
906
  collection: e,
907
907
  ids: Fn[e]
@@ -909,14 +909,14 @@ function Dd({
909
909
  ).then((t) => t.data ?? {}).catch(() => ({})),
910
910
  staleTime: 3e4
911
911
  }))
912
- }), vl = Lr.map((e) => e.dataUpdatedAt).join(","), wl = J(() => {
912
+ }), wl = Lr.map((e) => e.dataUpdatedAt).join(","), _l = J(() => {
913
913
  const e = {};
914
914
  return Fr.forEach((t, n) => {
915
915
  var o;
916
916
  const r = ((o = Lr[n]) == null ? void 0 : o.data) ?? {};
917
917
  for (const [s, u] of Object.entries(r)) e[`${t}:${s}`] = u;
918
918
  }), e;
919
- }, [vl]), Ln = J(() => {
919
+ }, [wl]), Ln = J(() => {
920
920
  var t;
921
921
  const e = {};
922
922
  for (const n of $) {
@@ -929,28 +929,28 @@ function Dd({
929
929
  }, [$]), Tn = Object.keys(Ln), Tr = je({
930
930
  queries: Tn.map((e) => ({
931
931
  queryKey: ["queue-task-counts", e, Ln[e].join(",")],
932
- queryFn: () => h.request(
932
+ queryFn: () => f.request(
933
933
  ce("/tasks/counts", { collection: e, ids: Ln[e] })
934
934
  ).then((t) => t.data ?? {}).catch(() => ({})),
935
935
  staleTime: 3e4
936
936
  }))
937
- }), _l = Tr.map((e) => e.dataUpdatedAt).join(","), Nl = J(() => {
937
+ }), Nl = Tr.map((e) => e.dataUpdatedAt).join(","), Sl = J(() => {
938
938
  const e = {};
939
939
  return Tn.forEach((t, n) => {
940
940
  var r;
941
941
  for (const [o, s] of Object.entries(((r = Tr[n]) == null ? void 0 : r.data) ?? {})) e[`${t}:${o}`] = s;
942
942
  }), e;
943
- }, [_l]), Ar = Tn.length > 0, Er = je({
943
+ }, [Nl]), Er = Tn.length > 0, Ar = je({
944
944
  queries: Nt.map((e) => ({
945
945
  queryKey: ["queue-collection-risk-rules", e],
946
- queryFn: () => h.request(
946
+ queryFn: () => f.request(
947
947
  O("/at-risk/rules/active", { collection: e })
948
948
  ).then((t) => t.data ?? []).catch(() => []),
949
949
  staleTime: 300 * 1e3
950
950
  }))
951
- }), Sl = Er.map((e) => e.dataUpdatedAt).join(","), Or = J(() => {
951
+ }), Cl = Ar.map((e) => e.dataUpdatedAt).join(","), Or = J(() => {
952
952
  const e = /* @__PURE__ */ new Map();
953
- for (const t of Er)
953
+ for (const t of Ar)
954
954
  for (const n of t.data ?? []) {
955
955
  const r = e.get(n.name);
956
956
  e.set(n.name, {
@@ -959,22 +959,22 @@ function Dd({
959
959
  });
960
960
  }
961
961
  return [...e.values()];
962
- }, [Sl]), Dr = je({
962
+ }, [Cl]), Kr = je({
963
963
  queries: Nt.map((e) => ({
964
964
  queryKey: ["queue-collection-states", e],
965
- queryFn: () => h.request(
965
+ queryFn: () => f.request(
966
966
  O(`/queues/collection-states/${e}`)
967
967
  ).then((t) => t.data),
968
968
  staleTime: 300 * 1e3
969
969
  }))
970
- }), Kr = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), Re = J(() => {
970
+ }), Pr = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), Re = J(() => {
971
971
  const e = {};
972
- for (const t of Dr)
972
+ for (const t of Kr)
973
973
  (t.data ?? []).forEach((n, r) => {
974
974
  e[n.key] = { label: n.label, color: n.color, sort: r };
975
975
  });
976
976
  return e;
977
- }, [Dr.map((e) => e.data)]), Pr = x ? Object.entries(x.by_state).sort(
977
+ }, [Kr.map((e) => e.data)]), Dr = x ? Object.entries(x.by_state).sort(
978
978
  (e, t) => {
979
979
  var n, r;
980
980
  return (((n = Re[e[0]]) == null ? void 0 : n.sort) ?? Number.MAX_SAFE_INTEGER) - (((r = Re[t[0]]) == null ? void 0 : r.sort) ?? Number.MAX_SAFE_INTEGER);
@@ -984,14 +984,14 @@ function Dd({
984
984
  var r, o;
985
985
  return (((r = Re[t]) == null ? void 0 : r.sort) ?? Number.MAX_SAFE_INTEGER) - (((o = Re[n]) == null ? void 0 : o.sort) ?? Number.MAX_SAFE_INTEGER);
986
986
  }
987
- ), An = J(() => {
987
+ ), En = J(() => {
988
988
  const e = {};
989
989
  for (const [t, n] of Object.entries(Re)) e[t] = n.label;
990
990
  return e;
991
- }, [Re]), Fe = (e) => e ? e === "none" ? "No State" : An[e] ?? Kr(e) : "—", at = (e) => {
991
+ }, [Re]), Fe = (e) => e ? e === "none" ? "No State" : En[e] ?? Pr(e) : "—", at = (e) => {
992
992
  if (e === sn) return "Addendums";
993
- const t = (kl ?? []).find((n) => n.collection === e);
994
- return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || Kr(e);
993
+ const t = (vl ?? []).find((n) => n.collection === e);
994
+ return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || Pr(e);
995
995
  }, se = J(() => R ? ke ? ke.map((e) => ({
996
996
  key: e.key,
997
997
  rows: $n.get(e.key) ?? [],
@@ -999,24 +999,24 @@ function Dd({
999
999
  atRisk: e.at_risk,
1000
1000
  count: e.count,
1001
1001
  sums: e.sums ?? {}
1002
- })) : Ls($, R).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [$, R, ke, $n]), En = Q(null);
1003
- P(() => {
1002
+ })) : Ls($, R).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [$, R, ke, $n]), An = Q(null);
1003
+ D(() => {
1004
1004
  if (!R || !se) {
1005
- En.current = null;
1005
+ An.current = null;
1006
1006
  return;
1007
1007
  }
1008
- if ($e && !ke || En.current === R) return;
1009
- En.current = R;
1008
+ if ($e && !ke || An.current === R) return;
1009
+ An.current = R;
1010
1010
  const e = se.reduce((t, n) => t + n.count, 0);
1011
1011
  cn(e > 200 ? new Set(se.map((t) => t.key)) : /* @__PURE__ */ new Set()), Nr({});
1012
1012
  }, [R, ke]);
1013
- function Cl(e) {
1013
+ function $l(e) {
1014
1014
  cn((t) => {
1015
1015
  const n = new Set(t);
1016
1016
  return n.has(e) ? n.delete(e) : n.add(e), n;
1017
1017
  });
1018
1018
  }
1019
- const me = J(() => se ? se.filter((e) => !Ce.has(e.key)).flatMap((e) => e.rows) : $, [se, $, Ce]), F = (e) => `${e.collection}:${e.item_id}`, [Ke, Pe] = w(null), [$l, On] = w(!1), [St, zt] = w(null), Dn = (e) => {
1019
+ const me = J(() => se ? se.filter((e) => !Ce.has(e.key)).flatMap((e) => e.rows) : $, [se, $, Ce]), F = (e) => `${e.collection}:${e.item_id}`, [Pe, De] = w(null), [ql, On] = w(!1), [St, zt] = w(null), Kn = (e) => {
1020
1020
  if (e.collection === sn && e.url) {
1021
1021
  const t = e.url.match(/^\/collections\/([^/?]+)\/([^/?]+)(?:\?(.*))?$/);
1022
1022
  if (t) {
@@ -1037,7 +1037,7 @@ function Dd({
1037
1037
  };
1038
1038
  }, Br = () => {
1039
1039
  var e;
1040
- c && Ka({
1040
+ c && Da({
1041
1041
  queue_id: l,
1042
1042
  name: c.name,
1043
1043
  path: `${window.location.pathname}${window.location.search}`,
@@ -1047,8 +1047,8 @@ function Dd({
1047
1047
  entry: ks()
1048
1048
  });
1049
1049
  }, lt = (e) => {
1050
- Br(), Y.open(Dn(e));
1051
- }, ql = (e) => {
1050
+ Br(), Y.open(Kn(e));
1051
+ }, Rl = (e) => {
1052
1052
  Br();
1053
1053
  const t = W == null ? void 0 : W[0], n = !!t && t.collection === e.collection && String(t.itemId) === e.itemId;
1054
1054
  Y.open({
@@ -1059,14 +1059,14 @@ function Dd({
1059
1059
  }, [U, Ct] = w(
1060
1060
  null
1061
1061
  );
1062
- P(() => {
1062
+ D(() => {
1063
1063
  if (!U) return;
1064
1064
  const e = () => Ct(null);
1065
1065
  return window.addEventListener("mousedown", e), window.addEventListener("scroll", e, !0), () => {
1066
1066
  window.removeEventListener("mousedown", e), window.removeEventListener("scroll", e, !0);
1067
1067
  };
1068
1068
  }, [U]);
1069
- const Kn = (e) => {
1069
+ const Pn = (e) => {
1070
1070
  zt(F(e));
1071
1071
  const t = (p == null ? void 0 : p.row_click) ?? "preview";
1072
1072
  if (t === "full" || e.collection === sn) {
@@ -1083,31 +1083,31 @@ function Dd({
1083
1083
  });
1084
1084
  return;
1085
1085
  }
1086
- Pe(e);
1086
+ De(e);
1087
1087
  };
1088
- P(() => {
1089
- if (!Ke) return;
1090
- const e = $.find((t) => F(t) === F(Ke));
1091
- e && e !== Ke && Pe(e);
1088
+ D(() => {
1089
+ if (!Pe) return;
1090
+ const e = $.find((t) => F(t) === F(Pe));
1091
+ e && e !== Pe && De(e);
1092
1092
  }, [$]);
1093
- const Rl = (e) => !e.claimed_by || e.claimed_by.id === S;
1093
+ const Fl = (e) => !e.claimed_by || e.claimed_by.id === S;
1094
1094
  function Qr(e) {
1095
- const t = e ? me.findIndex((r) => F(r) === F(e)) + 1 : 0, n = me.slice(t).find(Rl);
1095
+ const t = e ? me.findIndex((r) => F(r) === F(e)) + 1 : 0, n = me.slice(t).find(Fl);
1096
1096
  if (!n) {
1097
- On(!1), Pe(null), E.info("Nothing left to work on — queue clear!");
1097
+ On(!1), De(null), A.info("Nothing left to work on — queue clear!");
1098
1098
  return;
1099
1099
  }
1100
- if (zt(F(n)), ge && !n.claimed_by && De.mutate(n), (p == null ? void 0 : p.row_click) === "full") {
1100
+ if (zt(F(n)), ge && !n.claimed_by && Ke.mutate(n), (p == null ? void 0 : p.row_click) === "full") {
1101
1101
  lt(n);
1102
1102
  return;
1103
1103
  }
1104
- On(!0), Pe(n);
1104
+ On(!0), De(n);
1105
1105
  }
1106
- P(() => {
1106
+ D(() => {
1107
1107
  if (C !== "table") return;
1108
1108
  function e(t) {
1109
1109
  var o;
1110
- if (t.metaKey || t.ctrlKey || t.altKey || !Gi(t.target)) return;
1110
+ if (t.metaKey || t.ctrlKey || t.altKey || !Ii(t.target)) return;
1111
1111
  const n = St ? me.findIndex((s) => F(s) === St) : -1, r = (s) => {
1112
1112
  zt(F(s));
1113
1113
  const u = F(s), m = [...document.querySelectorAll("tr[data-row-key]")].find(
@@ -1126,43 +1126,43 @@ function Dd({
1126
1126
  } else if (t.key === "c" && n >= 0 && ge) {
1127
1127
  t.preventDefault();
1128
1128
  const s = me[n];
1129
- ((o = s.claimed_by) == null ? void 0 : o.id) === S ? Ze.mutate(s) : De.mutate(s);
1129
+ ((o = s.claimed_by) == null ? void 0 : o.id) === S ? Ze.mutate(s) : Ke.mutate(s);
1130
1130
  } else t.key === "o" && n >= 0 && (t.preventDefault(), lt(me[n]));
1131
1131
  }
1132
1132
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
1133
- }, [C, me, St, Ke, S, De, Ze, ge]);
1133
+ }, [C, me, St, Pe, S, Ke, Ze, ge]);
1134
1134
  const { data: G } = X({
1135
1135
  queryKey: ["queue-views", l],
1136
- queryFn: () => h.request(O(`/queues/${l}/views`)),
1136
+ queryFn: () => f.request(O(`/queues/${l}/views`)),
1137
1137
  enabled: !!l
1138
- }), [ot, st] = w(null), [Fl, Pn] = w(!1), [Xt, jr] = w(""), [Ur, Vr] = w(!1), [$t, Ir] = w(!1);
1138
+ }), [ot, st] = w(null), [Ll, Dn] = w(!1), [Xt, jr] = w(""), [Ur, Vr] = w(!1), [$t, Ir] = w(!1);
1139
1139
  function qt(e) {
1140
1140
  const t = e.state ?? {};
1141
- te(t.scope ?? "all"), j({ ...fe.current, ...t.filters ?? {} }), Ge(t.sort ?? ""), bt(t.group_by ?? null), Ht(t.columns ?? null), un(t.pins ?? null), t.view && Ie(Ee.includes(t.view) ? t.view : Ee[0]), K(1), st(e.id);
1141
+ te(t.scope ?? "all"), j({ ...he.current, ...t.filters ?? {} }), Ge(t.sort ?? ""), bt(t.group_by ?? null), Ht(t.columns ?? null), un(t.pins ?? null), t.view && Ie(Ae.includes(t.view) ? t.view : Ae[0]), P(1), st(e.id);
1142
1142
  }
1143
- function Ll() {
1143
+ function Tl() {
1144
1144
  var t, n;
1145
1145
  const e = G == null ? void 0 : G.data.find((r) => r.is_default);
1146
1146
  if (e) {
1147
1147
  qt(e);
1148
1148
  return;
1149
1149
  }
1150
- te(((t = c == null ? void 0 : c.display_config) == null ? void 0 : t.default_scope) ?? "all"), j({ ...fe.current }), Ge(""), bt(null), Ht(null), un(null), (n = c == null ? void 0 : c.display_config) != null && n.default_view && Ie(c.display_config.default_view), K(1), st(null);
1150
+ te(((t = c == null ? void 0 : c.display_config) == null ? void 0 : t.default_scope) ?? "all"), j({ ...he.current }), Ge(""), bt(null), Ht(null), un(null), (n = c == null ? void 0 : c.display_config) != null && n.default_view && Ie(c.display_config.default_view), P(1), st(null);
1151
1151
  }
1152
- P(() => {
1152
+ D(() => {
1153
1153
  if (z || !(c != null && c.display_config) || et === void 0 || G === void 0) return;
1154
1154
  const e = et.data.default_view_id, t = e != null ? G.data.find((r) => r.id === e) : void 0, n = G.data.find((r) => r.is_default);
1155
- t ? qt(t) : n ? qt(n) : (Ie(c.display_config.default_view), te(c.display_config.default_scope)), Ha(!0);
1155
+ t ? qt(t) : n ? qt(n) : (Ie(c.display_config.default_view), te(c.display_config.default_scope)), Ja(!0);
1156
1156
  }, [c, et, G, z]);
1157
1157
  const Zt = Q(null), en = Q(null);
1158
- P(() => {
1158
+ D(() => {
1159
1159
  if (!z) return;
1160
- const e = di();
1161
- if (!e || !ui(e, l, ys(), xs())) return;
1162
- Ka({ ...e, restore: !1 });
1160
+ const e = ci();
1161
+ if (!e || !di(e, l, ys(), xs())) return;
1162
+ Da({ ...e, restore: !1 });
1163
1163
  const t = e.state ?? {};
1164
- t.scope && te(t.scope), t.filters && j({ ...fe.current, ...t.filters }), t.sort != null && Ge(t.sort), bt(t.group_by ?? null), t.view && Ie(t.view), t.page && K(t.page), en.current = e.scroll ?? 0, W && W.length > 0 && ct.back(W.length);
1165
- }, [z, l]), P(() => {
1164
+ t.scope && te(t.scope), t.filters && j({ ...he.current, ...t.filters }), t.sort != null && Ge(t.sort), bt(t.group_by ?? null), t.view && Ie(t.view), t.page && P(t.page), en.current = e.scroll ?? 0, W && W.length > 0 && ct.back(W.length);
1165
+ }, [z, l]), D(() => {
1166
1166
  var s;
1167
1167
  if (!z || typeof window > "u") return;
1168
1168
  const e = new URLSearchParams(window.location.search), t = e.get("scope"), n = ((s = e.get("state")) == null ? void 0 : s.trim()) || null, r = t === "all" || t === "mine";
@@ -1173,8 +1173,8 @@ function Dd({
1173
1173
  window.history.state,
1174
1174
  "",
1175
1175
  `${window.location.pathname}${o ? `?${o}` : ""}${window.location.hash}`
1176
- ), r && te(t), n && j((u) => ({ ...u, state: [n] })), K(1);
1177
- }, [z]), P(() => {
1176
+ ), r && te(t), n && j((u) => ({ ...u, state: [n] })), P(1);
1177
+ }, [z]), D(() => {
1178
1178
  if (!z || typeof window > "u") return;
1179
1179
  const e = new URLSearchParams(window.location.search), t = e.get("owner");
1180
1180
  if (!t) return;
@@ -1184,15 +1184,15 @@ function Dd({
1184
1184
  window.history.state,
1185
1185
  "",
1186
1186
  `${window.location.pathname}${n ? `?${n}` : ""}${window.location.hash}`
1187
- ), te("all"), j((r) => ({ ...r, owners: [t] })), st(null), K(1);
1188
- }, [z]), P(() => {
1187
+ ), te("all"), j((r) => ({ ...r, owners: [t] })), st(null), P(1);
1188
+ }, [z]), D(() => {
1189
1189
  if (!z) return;
1190
1190
  const e = ps(bs(`queue:${l}`));
1191
- e && (hs(), qt({
1191
+ e && (fs(), qt({
1192
1192
  id: -1,
1193
1193
  // Saved views type filters loosely as strings; multi-selects ride as arrays there too.
1194
1194
  state: e
1195
- }), st(null), e.page && K(e.page));
1195
+ }), st(null), e.page && P(e.page));
1196
1196
  }, [z]);
1197
1197
  const Gr = () => ({
1198
1198
  scope: g,
@@ -1204,26 +1204,26 @@ function Dd({
1204
1204
  pins: We,
1205
1205
  ...ue > 1 ? { page: ue } : {}
1206
1206
  });
1207
- P(() => {
1207
+ D(() => {
1208
1208
  en.current == null || $.length === 0 || !Zt.current || (Zt.current.scrollTop = en.current, en.current = null);
1209
1209
  }, [$]);
1210
- const { isAdmin: Me } = Aa(), Tl = $.map((e) => `${e.collection}|${e.item_id}`).join(","), Al = J(
1210
+ const { isAdmin: Me } = Ea(), El = $.map((e) => `${e.collection}|${e.item_id}`).join(","), Al = J(
1211
1211
  () => $.map((e) => ({ collection: e.collection, id: e.item_id })),
1212
- [Tl]
1213
- ), Wr = gi(Al, Me), El = (e) => St === F(e) ? (
1212
+ [El]
1213
+ ), Wr = hi(Al, Me), Ol = (e) => St === F(e) ? (
1214
1214
  // Pinned sticky cells use bg-inherit — the highlight must be
1215
1215
  // OPAQUE (nvr-cyan/5-over-white equivalents) or horizontally
1216
1216
  // scrolled content bleeds through the pinned columns. Same
1217
1217
  // pair DataTable uses for selected rows when pins are active.
1218
1218
  "bg-[#f2fdff] dark:bg-[#20303a]"
1219
- ) : e.at_risk ? Ds(e.at_risk_color ?? "red") : void 0, tn = Me || (c == null ? void 0 : c.owner) != null && c.owner === S, Ol = Te({
1220
- mutationFn: ({ viewId: e, on: t }) => h.request(Ea(`/queues/views/${e}`, { is_default: t })),
1219
+ ) : e.at_risk ? Ks(e.at_risk_color ?? "red") : void 0, tn = Me || (c == null ? void 0 : c.owner) != null && c.owner === S, Kl = Te({
1220
+ mutationFn: ({ viewId: e, on: t }) => f.request(Aa(`/queues/views/${e}`, { is_default: t })),
1221
1221
  onSuccess: () => {
1222
- f.invalidateQueries({ queryKey: ["queue-views", l] }), E.success("Queue default view updated");
1222
+ h.invalidateQueries({ queryKey: ["queue-views", l] }), A.success("Queue default view updated");
1223
1223
  },
1224
- onError: () => E.error("Could not update the queue default view")
1224
+ onError: () => A.error("Could not update the queue default view")
1225
1225
  }), nn = Te({
1226
- mutationFn: () => h.request(
1226
+ mutationFn: () => f.request(
1227
1227
  ce(`/queues/${l}/views`, {
1228
1228
  name: Xt.trim(),
1229
1229
  is_shared: tn && (Ur || $t),
@@ -1240,12 +1240,12 @@ function Dd({
1240
1240
  })
1241
1241
  ),
1242
1242
  onSuccess: (e) => {
1243
- Pn(!1), jr(""), Vr(!1), Ir(!1), st(e.data.id), f.invalidateQueries({ queryKey: ["queue-views", l] }), E.success("View saved");
1243
+ Dn(!1), jr(""), Vr(!1), Ir(!1), st(e.data.id), h.invalidateQueries({ queryKey: ["queue-views", l] }), A.success("View saved");
1244
1244
  },
1245
- onError: () => E.error("Failed to save view")
1245
+ onError: () => A.error("Failed to save view")
1246
1246
  }), [Hr, Jr] = w(null), Be = Te({
1247
- mutationFn: (e) => h.request(
1248
- Ea(`/queues/views/${e.id}`, {
1247
+ mutationFn: (e) => f.request(
1248
+ Aa(`/queues/views/${e.id}`, {
1249
1249
  state: {
1250
1250
  scope: g,
1251
1251
  filters: _,
@@ -1258,38 +1258,38 @@ function Dd({
1258
1258
  })
1259
1259
  ),
1260
1260
  onSuccess: (e, t) => {
1261
- f.invalidateQueries({ queryKey: ["queue-views", l] }), Jr(t.id), setTimeout(() => Jr((n) => n === t.id ? null : n), 2e3), E.success(`Saved "${t.name}" with the current filters, scope and sort`);
1261
+ h.invalidateQueries({ queryKey: ["queue-views", l] }), Jr(t.id), setTimeout(() => Jr((n) => n === t.id ? null : n), 2e3), A.success(`Saved "${t.name}" with the current filters, scope and sort`);
1262
1262
  },
1263
- onError: () => E.error("Failed to update view")
1263
+ onError: () => A.error("Failed to update view")
1264
1264
  }), [Mn, rn] = w(null);
1265
- P(() => {
1265
+ D(() => {
1266
1266
  if (Mn == null) return;
1267
1267
  const e = setTimeout(() => rn(null), 5e3);
1268
1268
  return () => clearTimeout(e);
1269
1269
  }, [Mn]);
1270
1270
  const Yr = Te({
1271
- mutationFn: (e) => h.request(zn(`/queues/views/${e}`)),
1271
+ mutationFn: (e) => f.request(zn(`/queues/views/${e}`)),
1272
1272
  onSuccess: (e, t) => {
1273
- rn(null), f.invalidateQueries({ queryKey: ["queue-views", l] }), st(null), tt === t && Sn(null);
1273
+ rn(null), h.invalidateQueries({ queryKey: ["queue-views", l] }), st(null), tt === t && Sn(null);
1274
1274
  },
1275
- onError: () => E.error("Failed to delete view")
1276
- }), Dl = Te({
1277
- mutationFn: (e) => h.request(zo(`/queues/${l}/default-view`, { view_id: e })),
1275
+ onError: () => A.error("Failed to delete view")
1276
+ }), Pl = Te({
1277
+ mutationFn: (e) => f.request(Xo(`/queues/${l}/default-view`, { view_id: e })),
1278
1278
  onMutate: (e) => Sn(e),
1279
1279
  onSuccess: (e, t) => {
1280
- f.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), E.success(
1280
+ h.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), A.success(
1281
1281
  t === null ? "Reverted to the general default" : "Set as your default view"
1282
1282
  );
1283
1283
  },
1284
1284
  onError: () => {
1285
- f.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), E.error("Failed to update default view");
1285
+ h.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), A.error("Failed to update default view");
1286
1286
  }
1287
- }), [ie, it] = w([]), [ne, zr] = w(!1), Kl = () => {
1287
+ }), [ie, it] = w([]), [ne, zr] = w(!1), Dl = () => {
1288
1288
  ne && it([]), zr(!ne);
1289
1289
  };
1290
- P(() => {
1290
+ D(() => {
1291
1291
  C !== "table" && ne && (zr(!1), it([]));
1292
- }, [C, ne]), Yo(), gn.current = ie.length;
1292
+ }, [C, ne]), zo(), gn.current = ie.length;
1293
1293
  const [Rt, Xr] = w(!1);
1294
1294
  async function Bn(e, t) {
1295
1295
  const n = $.filter((u) => ie.includes(F(u)));
@@ -1297,7 +1297,7 @@ function Dd({
1297
1297
  const r = await Promise.allSettled(n.map(t));
1298
1298
  Wt.endBatch();
1299
1299
  const o = r.filter((u) => u.status === "fulfilled").length, s = r.length - o;
1300
- Xr(!1), it([]), f.invalidateQueries({ queryKey: ["queue-items", l] }), s ? E.warning(`${e}: ${o} succeeded, ${s} failed`) : E.success(`${e}: ${o} succeeded`);
1300
+ Xr(!1), it([]), h.invalidateQueries({ queryKey: ["queue-items", l] }), s ? A.warning(`${e}: ${o} succeeded, ${s} failed`) : A.success(`${e}: ${o} succeeded`);
1301
1301
  }
1302
1302
  const Ne = (e) => {
1303
1303
  var t;
@@ -1306,22 +1306,22 @@ function Dd({
1306
1306
  if (r) return r;
1307
1307
  }
1308
1308
  return null;
1309
- }, Pl = (e) => {
1309
+ }, Ml = (e) => {
1310
1310
  if (R === "state") return e === "No state" ? e : Fe(e);
1311
1311
  if (R === "collection") return at(e);
1312
1312
  if (R != null && R.startsWith("extra.") && e !== "—") {
1313
1313
  const t = R.slice(6), n = Ne(t);
1314
- return n ? Ue(e, n) : Dt(
1314
+ return n ? Ue(e, n) : Kt(
1315
1315
  ((c == null ? void 0 : c.extra_field_meta) ?? []).find((r) => r.path === t),
1316
1316
  e
1317
1317
  );
1318
1318
  }
1319
1319
  return e;
1320
- }, Ml = se == null ? void 0 : se.map((e) => ({
1320
+ }, Bl = se == null ? void 0 : se.map((e) => ({
1321
1321
  key: e.key,
1322
1322
  rows: e.rows,
1323
1323
  header: /* @__PURE__ */ d(Se, { children: [
1324
- /* @__PURE__ */ a("span", { children: Pl(e.key) }),
1324
+ /* @__PURE__ */ a("span", { children: Ml(e.key) }),
1325
1325
  /* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
1326
1326
  "(",
1327
1327
  ee(e.count),
@@ -1344,7 +1344,7 @@ function Dd({
1344
1344
  t
1345
1345
  );
1346
1346
  }),
1347
- ke && !Ce.has(e.key) && gl.has(e.key) && /* @__PURE__ */ a("span", { className: "font-normal text-slate-400", children: "loading…" }),
1347
+ ke && !Ce.has(e.key) && xl.has(e.key) && /* @__PURE__ */ a("span", { className: "font-normal text-slate-400", children: "loading…" }),
1348
1348
  ke && !Ce.has(e.key) && e.rows.length > 0 && e.rows.length < e.count && /* @__PURE__ */ d(
1349
1349
  "button",
1350
1350
  {
@@ -1372,13 +1372,13 @@ function Dd({
1372
1372
  " at risk"
1373
1373
  ] })
1374
1374
  ] })
1375
- })), Qn = (((xa = i == null ? void 0 : i.available_values.collection) == null ? void 0 : xa.length) ?? 0) > 1, Zr = $.some((e) => !!e.unseen) || wt.size > 0 || $.some((e) => Ae.isNew(F(e))), ea = [
1375
+ })), Qn = (((xa = i == null ? void 0 : i.available_values.collection) == null ? void 0 : xa.length) ?? 0) > 1, Zr = $.some((e) => !!e.unseen) || wt.size > 0 || $.some((e) => Ee.isNew(F(e))), ea = [
1376
1376
  ...Qn ? [
1377
1377
  {
1378
1378
  key: "collection",
1379
1379
  header: T("collection", "Collection"),
1380
1380
  sortable: !0,
1381
- render: (e) => /* @__PURE__ */ a(Si, { variant: "outline", children: at(e.collection) })
1381
+ render: (e) => /* @__PURE__ */ a(Ni, { variant: "outline", children: at(e.collection) })
1382
1382
  }
1383
1383
  ] : [],
1384
1384
  {
@@ -1393,15 +1393,15 @@ function Dd({
1393
1393
  // a whole, but nothing on it said so — an underline is the one
1394
1394
  // convention people already read as "this goes somewhere".
1395
1395
  /* @__PURE__ */ d("span", { className: "flex items-center gap-1.5", children: [
1396
- wt.get(F(e)) || Ae.isNew(F(e)) ? /* @__PURE__ */ a(
1397
- pi,
1396
+ wt.get(F(e)) || Ee.isNew(F(e)) ? /* @__PURE__ */ a(
1397
+ mi,
1398
1398
  {
1399
1399
  lock: wt.get(F(e)),
1400
- isNew: Ae.isNew(F(e)),
1400
+ isNew: Ee.isNew(F(e)),
1401
1401
  dataAttr: "data-queue-live-mark",
1402
1402
  hang: !0
1403
1403
  }
1404
- ) : /* @__PURE__ */ a(Ni, { change: e.unseen, dataAttr: "data-queue-unseen", hang: !0 }),
1404
+ ) : /* @__PURE__ */ a(_i, { change: e.unseen, dataAttr: "data-queue-unseen", hang: !0 }),
1405
1405
  /* @__PURE__ */ a(
1406
1406
  "span",
1407
1407
  {
@@ -1420,9 +1420,9 @@ function Dd({
1420
1420
  t
1421
1421
  )),
1422
1422
  /* @__PURE__ */ a(
1423
- _i,
1423
+ wi,
1424
1424
  {
1425
- viewers: ul[Fs(e.collection, e.item_id)],
1425
+ viewers: ml[Fs(e.collection, e.item_id)],
1426
1426
  dataAttr: "data-queue-presence"
1427
1427
  }
1428
1428
  )
@@ -1442,7 +1442,7 @@ function Dd({
1442
1442
  ),
1443
1443
  style: e.state_color ? {
1444
1444
  backgroundColor: `${e.state_color}1a`,
1445
- "--nvr-state-ink": Xo(e.state_color),
1445
+ "--nvr-state-ink": Zo(e.state_color),
1446
1446
  "--nvr-state-ink-dark": e.state_color
1447
1447
  } : void 0,
1448
1448
  title: e.via_addendum ? `Addendum "${e.via_addendum.title ?? ""}" — ${Fe(e.state)}` : Fe(e.state),
@@ -1457,13 +1457,13 @@ function Dd({
1457
1457
  key: "owners",
1458
1458
  header: T("owners", "Owners"),
1459
1459
  sortable: !0,
1460
- render: (e) => /* @__PURE__ */ a(Oi, { owners: e.owners })
1460
+ render: (e) => /* @__PURE__ */ a(Ai, { owners: e.owners })
1461
1461
  },
1462
1462
  {
1463
1463
  key: "aging_hours",
1464
1464
  header: T("aging_hours", "Aging"),
1465
1465
  sortable: !0,
1466
- render: (e) => zi(e.aging_hours)
1466
+ render: (e) => Yi(e.aging_hours)
1467
1467
  },
1468
1468
  {
1469
1469
  // When the record entered its current state — the same moment Aging
@@ -1471,13 +1471,13 @@ function Dd({
1471
1471
  key: "state_entered",
1472
1472
  header: T("state_entered", "Last State Change"),
1473
1473
  sortable: !0,
1474
- render: (e) => e.state_entered_at ? as(e.state_entered_at, { type: "datetime", template: "MM/DD/YYYY - h:mmA" }) : /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-slate-600", children: "—" })
1474
+ render: (e) => e.state_entered_at ? Pa(e.state_entered_at) : /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-slate-600", children: "—" })
1475
1475
  },
1476
1476
  {
1477
1477
  key: "sla_status",
1478
1478
  header: T("sla_status", "SLA"),
1479
1479
  sortable: !0,
1480
- render: (e) => /* @__PURE__ */ a(Xi, { status: e.sla_status })
1480
+ render: (e) => /* @__PURE__ */ a(zi, { status: e.sla_status })
1481
1481
  },
1482
1482
  {
1483
1483
  key: "at_risk",
@@ -1496,7 +1496,7 @@ function Dd({
1496
1496
  key: "addendums",
1497
1497
  header: T("addendums", "Addendums"),
1498
1498
  sortable: !1,
1499
- render: (e) => /* @__PURE__ */ a(Yi, { summary: e.addendums })
1499
+ render: (e) => /* @__PURE__ */ a(Ji, { summary: e.addendums })
1500
1500
  }
1501
1501
  ] : [],
1502
1502
  ...yt ? [
@@ -1505,7 +1505,7 @@ function Dd({
1505
1505
  header: T("fulfilment", "Shipped"),
1506
1506
  sortable: !0,
1507
1507
  render: (e) => /* @__PURE__ */ a(
1508
- ai,
1508
+ ri,
1509
1509
  {
1510
1510
  collection: e.collection,
1511
1511
  itemId: e.item_id,
@@ -1519,16 +1519,16 @@ function Dd({
1519
1519
  key: "integrations",
1520
1520
  header: T("integrations", "Integrations"),
1521
1521
  sortable: !1,
1522
- render: (e) => /* @__PURE__ */ a(si, { rows: wl[`${e.collection}:${e.item_id}`] })
1522
+ render: (e) => /* @__PURE__ */ a(oi, { rows: _l[`${e.collection}:${e.item_id}`] })
1523
1523
  }
1524
1524
  ] : [],
1525
- ...Ar ? [
1525
+ ...Er ? [
1526
1526
  {
1527
1527
  key: "tasks",
1528
1528
  header: T("tasks", "Tasks"),
1529
1529
  sortable: !1,
1530
1530
  render: (e) => {
1531
- const t = Nl[`${e.collection}:${e.item_id}`];
1531
+ const t = Sl[`${e.collection}:${e.item_id}`];
1532
1532
  return !t || t.open === 0 ? /* @__PURE__ */ a("span", { className: "text-[11px] text-slate-400", children: "—" }) : /* @__PURE__ */ d(
1533
1533
  "span",
1534
1534
  {
@@ -1548,10 +1548,10 @@ function Dd({
1548
1548
  key: "send_backs",
1549
1549
  header: T("send_backs", "Sent back"),
1550
1550
  sortable: !0,
1551
- render: (e) => /* @__PURE__ */ a(Wi, { summary: e.send_backs })
1551
+ render: (e) => /* @__PURE__ */ a(Gi, { summary: e.send_backs })
1552
1552
  }
1553
1553
  ] : []
1554
- ], Bl = {
1554
+ ], Ql = {
1555
1555
  key: "claim",
1556
1556
  header: "",
1557
1557
  render: (e) => e.claimed_by ? /* @__PURE__ */ a(
@@ -1569,17 +1569,17 @@ function Dd({
1569
1569
  {
1570
1570
  type: "button",
1571
1571
  onClick: (t) => {
1572
- t.stopPropagation(), De.mutate(e);
1572
+ t.stopPropagation(), Ke.mutate(e);
1573
1573
  },
1574
1574
  className: "text-[11px] font-medium text-nvr-navy underline dark:text-nvr-cyan",
1575
1575
  children: "Claim"
1576
1576
  }
1577
1577
  )
1578
- }, Ft = (c == null ? void 0 : c.available_extra_fields) ?? [], ct = Go("drill.queue"), W = ct.value, ta = (e) => ct.push([e]), jn = Q(null);
1579
- P(() => {
1578
+ }, Ft = (c == null ? void 0 : c.available_extra_fields) ?? [], ct = Wo("drill.queue"), W = ct.value, ta = (e) => ct.push([e]), jn = Q(null);
1579
+ D(() => {
1580
1580
  var r;
1581
1581
  if (!z || !l) return;
1582
- const e = `queue:${l}`, t = Gr(), n = fs(e, t);
1582
+ const e = `queue:${l}`, t = Gr(), n = hs(e, t);
1583
1583
  if (((r = jn.current) == null ? void 0 : r.queue) !== l) {
1584
1584
  jn.current = { queue: l, enc: n };
1585
1585
  return;
@@ -1598,7 +1598,7 @@ function Dd({
1598
1598
  ue,
1599
1599
  W
1600
1600
  ]);
1601
- const Ql = (e) => {
1601
+ const jl = (e) => {
1602
1602
  var t;
1603
1603
  for (const n of (c == null ? void 0 : c.sources) ?? []) {
1604
1604
  const r = (t = n.drilldown) == null ? void 0 : t[e];
@@ -1610,21 +1610,22 @@ function Dd({
1610
1610
  };
1611
1611
  }
1612
1612
  return { enabled: !0, layout_id: null, width: null };
1613
- }, jl = J(() => {
1613
+ }, Ul = J(() => {
1614
1614
  const e = {};
1615
1615
  for (const t of (c == null ? void 0 : c.sources) ?? [])
1616
1616
  for (const [n, r] of Object.entries(t.column_formats ?? {}))
1617
1617
  n in e || (e[n] = r);
1618
1618
  return e;
1619
- }, [c == null ? void 0 : c.sources]), Ul = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Vl = /^\d{4}-\d{2}-\d{2}T\d{2}:/;
1620
- function Il(e) {
1621
- if (Ul.test(e)) return { text: e.split("@")[0], title: e };
1622
- if (Vl.test(e)) {
1619
+ }, [c == null ? void 0 : c.sources]), Vl = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Il = /^\d{4}-\d{2}-\d{2}T\d{2}:/;
1620
+ function Gl(e) {
1621
+ if (Vl.test(e)) return { text: e.split("@")[0], title: e };
1622
+ if (Il.test(e)) {
1623
1623
  const t = new Date(e);
1624
1624
  if (!Number.isNaN(t.getTime()))
1625
1625
  return {
1626
- text: Us(t, { month: "2-digit", day: "2-digit", year: "2-digit" }),
1627
- title: js(t)
1626
+ // The one read-only date style (army 11), the full stamp on hover.
1627
+ text: js(t),
1628
+ title: Pa(t)
1628
1629
  };
1629
1630
  }
1630
1631
  return { text: e, title: e };
@@ -1633,28 +1634,28 @@ function Dd({
1633
1634
  ...new Set(
1634
1635
  ((c == null ? void 0 : c.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
1635
1636
  )
1636
- ] : [], Gl = je({
1637
+ ] : [], Wl = je({
1637
1638
  queries: na.map((e) => ({
1638
1639
  queryKey: ["cbv-collection-meta", e],
1639
- queryFn: () => h.request(O(`/collections/${e}`)).then((t) => t.data),
1640
+ queryFn: () => f.request(O(`/collections/${e}`)).then((t) => t.data),
1640
1641
  staleTime: 10 * 6e4,
1641
1642
  retry: !1
1642
1643
  }))
1643
1644
  }), Vn = /* @__PURE__ */ new Map();
1644
1645
  na.forEach((e, t) => {
1645
1646
  var r;
1646
- const n = (r = Gl[t]) == null ? void 0 : r.data;
1647
+ const n = (r = Wl[t]) == null ? void 0 : r.data;
1647
1648
  n && Vn.set(e, {
1648
1649
  fields: new Map((n.fields ?? []).map((o) => [o.field, o])),
1649
1650
  relations: n.relations ?? []
1650
1651
  });
1651
1652
  });
1652
- const { data: Wl } = X({
1653
+ const { data: Hl } = X({
1653
1654
  queryKey: ["my-permissions"],
1654
- queryFn: () => h.request(O("/security/my/permissions")).then((e) => e.data),
1655
+ queryFn: () => f.request(O("/security/my/permissions")).then((e) => e.data),
1655
1656
  enabled: Un.enabled && !Me,
1656
1657
  staleTime: 5 * 6e4
1657
- }), ra = hi(), aa = (e, t) => {
1658
+ }), ra = bi(), aa = (e, t) => {
1658
1659
  if (t.includes(".")) return null;
1659
1660
  const n = Vn.get(e.collection);
1660
1661
  if (!n) return null;
@@ -1665,12 +1666,12 @@ function Dd({
1665
1666
  field: n.fields.get(t),
1666
1667
  collection: e.collection,
1667
1668
  relations: n.relations,
1668
- mayUpdate: Me || ei(Wl, e.collection)
1669
+ mayUpdate: Me || Zs(Hl, e.collection)
1669
1670
  });
1670
1671
  }, la = (e, t, n) => {
1671
1672
  var r, o, s;
1672
1673
  return n === "m2o" ? ((o = (r = e.extra_ids) == null ? void 0 : r[t]) == null ? void 0 : o[0]) ?? null : ((s = e.extra) == null ? void 0 : s[t]) ?? null;
1673
- }, Hl = (e, t, n, r, o) => {
1674
+ }, Jl = (e, t, n, r, o) => {
1674
1675
  const s = (b) => `${F(e)}|${b}`, u = [...re].filter((b) => b.startsWith("extra.")).map((b) => b.slice(6)).filter((b) => !!aa(e, b)), m = o === 0 ? null : ms(u, t, o), y = (b) => b.collection === e.collection && b.item_id === e.item_id, N = (b) => y(b) ? n === "m2o" ? {
1675
1676
  ...b,
1676
1677
  extra_ids: { ...b.extra_ids ?? {}, [t]: r == null ? [] : [String(r)] }
@@ -1685,18 +1686,18 @@ function Dd({
1685
1686
  value: r,
1686
1687
  next: m ? s(m) : null,
1687
1688
  optimistic: () => {
1688
- const b = f.getQueriesData({ queryKey: ["queue-items", l] });
1689
- return f.setQueriesData({ queryKey: ["queue-items", l] }, (A) => {
1690
- const v = A;
1691
- return Array.isArray(v == null ? void 0 : v.data) ? { ...v, data: v.data.map(N) } : Array.isArray(v == null ? void 0 : v.rows) ? { ...v, rows: v.rows.map(N) } : A;
1689
+ const b = h.getQueriesData({ queryKey: ["queue-items", l] });
1690
+ return h.setQueriesData({ queryKey: ["queue-items", l] }, (E) => {
1691
+ const v = E;
1692
+ return Array.isArray(v == null ? void 0 : v.data) ? { ...v, data: v.data.map(N) } : Array.isArray(v == null ? void 0 : v.rows) ? { ...v, rows: v.rows.map(N) } : E;
1692
1693
  }), () => {
1693
- for (const [A, v] of b) f.setQueryData(A, v);
1694
+ for (const [E, v] of b) h.setQueryData(E, v);
1694
1695
  };
1695
1696
  },
1696
1697
  // Labels, rollups and the row's place in the queue follow the server.
1697
- onSaved: () => void f.invalidateQueries({ queryKey: ["queue-items", l] })
1698
+ onSaved: () => void h.invalidateQueries({ queryKey: ["queue-items", l] })
1698
1699
  });
1699
- }, Jl = (e, t, n) => {
1700
+ }, Yl = (e, t, n) => {
1700
1701
  const r = aa(e, t);
1701
1702
  if (!r) return n;
1702
1703
  const o = Vn.get(e.collection), s = o == null ? void 0 : o.fields.get(t);
@@ -1710,23 +1711,23 @@ function Dd({
1710
1711
  label: T(`extra.${t}`, Ve(t)),
1711
1712
  choices: s ? ds(s) : void 0,
1712
1713
  target: r === "m2o" && o ? cs(o.relations, e.collection, t) : null,
1713
- onCommit: (u, m) => Hl(e, t, r, u, m),
1714
+ onCommit: (u, m) => Jl(e, t, r, u, m),
1714
1715
  children: n
1715
1716
  }
1716
1717
  );
1717
- }, Yl = Ft.map((e) => ({
1718
+ }, zl = Ft.map((e) => ({
1718
1719
  key: `extra.${e}`,
1719
1720
  header: T(`extra.${e}`, Ve(e)),
1720
1721
  sortable: !0,
1721
- render: (t) => Jl(t, e, zl(t, e))
1722
+ render: (t) => Yl(t, e, Xl(t, e))
1722
1723
  }));
1723
- function zl(e, t) {
1724
+ function Xl(e, t) {
1724
1725
  var n, r;
1725
1726
  {
1726
1727
  const o = (n = e.extra) == null ? void 0 : n[t];
1727
1728
  if (o == null || o === "") return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
1728
- const s = Ne(t), u = ((c == null ? void 0 : c.extra_field_meta) ?? []).find((v) => v.path === t), m = s ? Ue(String(o), s) : Dt(u, String(o)), { text: y, title: N } = Il(m), b = ((r = e.extra_ids) == null ? void 0 : r[t]) ?? [], A = Ql(t);
1729
- return (u == null ? void 0 : u.kind) === "relation" && u.target_collection && b.length > 0 && A.enabled && !u.aggregate ? /* @__PURE__ */ a(
1729
+ const s = Ne(t), u = ((c == null ? void 0 : c.extra_field_meta) ?? []).find((v) => v.path === t), m = s ? Ue(String(o), s) : Kt(u, String(o)), { text: y, title: N } = Gl(m), b = ((r = e.extra_ids) == null ? void 0 : r[t]) ?? [], E = jl(t);
1730
+ return (u == null ? void 0 : u.kind) === "relation" && u.target_collection && b.length > 0 && E.enabled && !u.aggregate ? /* @__PURE__ */ a(
1730
1731
  "button",
1731
1732
  {
1732
1733
  type: "button",
@@ -1734,8 +1735,8 @@ function Dd({
1734
1735
  v.stopPropagation(), ta({
1735
1736
  collection: u.target_collection,
1736
1737
  itemId: b[0],
1737
- layoutId: A.layout_id,
1738
- width: A.width,
1738
+ layoutId: E.layout_id,
1739
+ width: E.width,
1739
1740
  title: m
1740
1741
  });
1741
1742
  },
@@ -1769,9 +1770,9 @@ function Dd({
1769
1770
  ...yt ? ["fulfilment"] : [],
1770
1771
  ...qe ? ["integrations"] : [],
1771
1772
  ...kt ? ["send_backs"] : [],
1772
- ...Ar ? ["tasks"] : [],
1773
+ ...Er ? ["tasks"] : [],
1773
1774
  ...Ft.map((e) => `extra.${e}`)
1774
- ], Xl = [
1775
+ ], Zl = [
1775
1776
  ...Qn ? ["collection"] : [],
1776
1777
  "state",
1777
1778
  "owners",
@@ -1783,29 +1784,29 @@ function Dd({
1783
1784
  "sla_status",
1784
1785
  "at_risk",
1785
1786
  ...Ft.slice(0, 2).map((e) => `extra.${e}`)
1786
- ], Zl = (p == null ? void 0 : p.default_columns) ?? null, In = xt ?? Zl, re = new Set(In ?? Xl);
1787
+ ], eo = (p == null ? void 0 : p.default_columns) ?? null, In = xt ?? eo, re = new Set(In ?? Zl);
1787
1788
  rt && !Mt.has("addendums") && re.add("addendums"), yt && !Mt.has("fulfilment") && re.add("fulfilment"), qe && !Mt.has("integrations") && re.add("integrations"), kt && !Mt.has("send_backs") && re.add("send_backs");
1788
- const eo = new Set(Me ? [] : (p == null ? void 0 : p.admin_only_columns) ?? []);
1789
- for (const e of eo) re.delete(e);
1789
+ const to = new Set(Me ? [] : (p == null ? void 0 : p.admin_only_columns) ?? []);
1790
+ for (const e of to) re.delete(e);
1790
1791
  const Lt = [
1791
1792
  ...(In ?? []).filter((e) => oa.includes(e)),
1792
1793
  ...oa.filter((e) => !(In ?? []).includes(e))
1793
- ], to = po(bo(ho, { activationConstraint: { distance: 4 } }));
1794
- function no(e) {
1794
+ ], no = bo(fo(ho, { activationConstraint: { distance: 4 } }));
1795
+ function ro(e) {
1795
1796
  const { active: t, over: n } = e;
1796
1797
  if (!n || t.id === n.id) return;
1797
1798
  const r = Lt.indexOf(String(t.id)), o = Lt.indexOf(String(n.id));
1798
1799
  r === -1 || o === -1 || Ht(
1799
- ko(Lt, r, o).filter((s) => re.has(s))
1800
+ vo(Lt, r, o).filter((s) => re.has(s))
1800
1801
  );
1801
1802
  }
1802
- const sa = ea.find((e) => e.key === "label"), ro = {
1803
+ const sa = ea.find((e) => e.key === "label"), ao = {
1803
1804
  ...sa,
1804
1805
  render: (e, ...t) => /* @__PURE__ */ d("span", { className: "inline-flex min-w-0 items-center gap-1.5", children: [
1805
- /* @__PURE__ */ a(Ys, { rowId: e.item_id }),
1806
+ /* @__PURE__ */ a(Js, { rowId: e.item_id }),
1806
1807
  sa.render(e, ...t)
1807
1808
  ] })
1808
- }, ao = ((p == null ? void 0 : p.formula_columns) ?? []).map(
1809
+ }, lo = ((p == null ? void 0 : p.formula_columns) ?? []).map(
1809
1810
  (e) => ({
1810
1811
  key: `formula.${e.key}`,
1811
1812
  header: e.label,
@@ -1813,7 +1814,7 @@ function Dd({
1813
1814
  const n = {
1814
1815
  ...t,
1815
1816
  ...t.extra ? Object.fromEntries(Object.entries(t.extra).map(([s, u]) => [`extra.${s}`, u])) : {}
1816
- }, r = Zo(e.formula, (s) => {
1817
+ }, r = es(e.formula, (s) => {
1817
1818
  const u = n[s] ?? (t.extra ? t.extra[s] : void 0), m = Number(u);
1818
1819
  return Number.isFinite(m) ? m : u ?? null;
1819
1820
  });
@@ -1822,7 +1823,7 @@ function Dd({
1822
1823
  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) });
1823
1824
  }
1824
1825
  })
1825
- ), Gn = [...ea, ...Yl, ...ao], ia = Fi(
1826
+ ), Gn = [...ea, ...zl, ...lo], ia = Ri(
1826
1827
  Lt,
1827
1828
  (e) => {
1828
1829
  var n;
@@ -1830,42 +1831,42 @@ function Dd({
1830
1831
  return typeof t == "string" ? t : e;
1831
1832
  },
1832
1833
  re
1833
- ), lo = {
1834
+ ), oo = {
1834
1835
  key: "__actions__",
1835
1836
  header: "",
1836
1837
  render: (e) => e.collection === "tasks" || e.collection === sn ? null : /* @__PURE__ */ a("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ a(
1837
- Zs,
1838
+ Xs,
1838
1839
  {
1839
1840
  collection: e.collection,
1840
1841
  id: e.item_id,
1841
1842
  label: e.label,
1842
1843
  hasPipeline: e.state != null,
1843
1844
  onOpen: () => lt(e),
1844
- onPeek: () => Pe(e),
1845
+ onPeek: () => De(e),
1845
1846
  urlFor: Y.urlFor,
1846
1847
  onDeleted: () => {
1847
- h.request(zn(`/items/${e.collection}/${e.item_id}`)).then(() => {
1848
- E.success("Moved to trash"), f.invalidateQueries({ queryKey: ["queue-items", l] });
1849
- }).catch((t) => E.error(dt(t, "Delete failed")));
1848
+ f.request(zn(`/items/${e.collection}/${e.item_id}`)).then(() => {
1849
+ A.success("Moved to trash"), h.invalidateQueries({ queryKey: ["queue-items", l] });
1850
+ }).catch((t) => A.error(dt(t, "Delete failed")));
1850
1851
  },
1851
- onAfterTransition: () => void f.invalidateQueries({ queryKey: ["queue-items", l] }),
1852
+ onAfterTransition: () => void h.invalidateQueries({ queryKey: ["queue-items", l] }),
1852
1853
  bulkEnabledKeys: (p == null ? void 0 : p.bulk_action_keys) ?? null,
1853
1854
  disabled: ne
1854
1855
  }
1855
1856
  ) })
1856
1857
  }, Tt = [
1857
- ro,
1858
+ ao,
1858
1859
  ...Lt.filter((e) => re.has(e)).map((e) => Gn.find((t) => t.key === e)).filter((e) => e !== void 0),
1859
- ...ge ? [Bl] : [],
1860
- lo
1860
+ ...ge ? [Ql] : [],
1861
+ oo
1861
1862
  ], [Wn, ca] = w(!1);
1862
- async function oo() {
1863
+ async function so() {
1863
1864
  if (!(!c || Wn)) {
1864
1865
  ca(!0);
1865
1866
  try {
1866
1867
  const t = [];
1867
1868
  for (let m = 1; t.length < 1e4; m++) {
1868
- const y = await h.request(
1869
+ const y = await f.request(
1869
1870
  O(`/queues/${l}/items`, {
1870
1871
  scope: g,
1871
1872
  sort: B === "state_entered" ? "-aging_hours" : B === "-state_entered" ? "aging_hours" : B,
@@ -1876,7 +1877,7 @@ function Dd({
1876
1877
  ), N = y.data ?? [];
1877
1878
  if (t.push(...N), N.length < 100 || t.length >= (y.total ?? 0)) break;
1878
1879
  }
1879
- const n = (m) => (c.extra_field_meta ?? []).find((y) => y.path === m), r = Vi(
1880
+ const n = (m) => (c.extra_field_meta ?? []).find((y) => y.path === m), r = Ui(
1880
1881
  t.slice(0, 1e4),
1881
1882
  Tt.map((m) => ({
1882
1883
  key: m.key,
@@ -1887,7 +1888,7 @@ function Dd({
1887
1888
  collectionLabel: at,
1888
1889
  extraText: (m, y) => {
1889
1890
  const N = Ne(m);
1890
- return N && N.type !== "number" ? Ue(y, N) : Dt(n(m), y);
1891
+ return N && N.type !== "number" ? Ue(y, N) : Kt(n(m), y);
1891
1892
  },
1892
1893
  extraIsNumber: (m) => {
1893
1894
  var y;
@@ -1895,11 +1896,11 @@ function Dd({
1895
1896
  }
1896
1897
  }
1897
1898
  ), o = new Blob([r], { type: "text/csv;charset=utf-8" }), s = URL.createObjectURL(o), u = document.createElement("a");
1898
- u.href = s, u.download = Ii(c.name), document.body.appendChild(u), u.click(), u.remove(), setTimeout(() => URL.revokeObjectURL(s), 1e3), E.success(
1899
+ u.href = s, u.download = Vi(c.name), document.body.appendChild(u), u.click(), u.remove(), setTimeout(() => URL.revokeObjectURL(s), 1e3), A.success(
1899
1900
  t.length >= 1e4 ? `Exported the first ${1e4.toLocaleString("en-US")} rows` : `Exported ${t.length.toLocaleString("en-US")} ${t.length === 1 ? "row" : "rows"}`
1900
1901
  );
1901
1902
  } catch (e) {
1902
- E.error(dt(e, "Could not export this worklist"));
1903
+ A.error(dt(e, "Could not export this worklist"));
1903
1904
  } finally {
1904
1905
  ca(!1);
1905
1906
  }
@@ -1925,28 +1926,28 @@ function Dd({
1925
1926
  // Records hidden from pickers (a retired zone) are not offered.
1926
1927
  picker: "1"
1927
1928
  }, o = (n == null ? void 0 : n.narrowBy) ?? [], s = [];
1928
- for (const [q, V] of Object.entries(he)) {
1929
+ for (const [q, V] of Object.entries(fe)) {
1929
1930
  if (q === e.path || V.length === 0) continue;
1930
1931
  const H = an.get(q);
1931
1932
  !(H != null && H.target_collection) || !H.display_field || o.some((ln) => ln.collection === H.target_collection) || s.push({ collection: H.target_collection, field: H.display_field, values: V });
1932
1933
  }
1933
1934
  const u = [...o, ...s], m = u.length ? Ts(
1934
1935
  e.target_collection,
1935
- await As(h, f, e.target_collection),
1936
+ await Es(f, h, e.target_collection),
1936
1937
  u
1937
1938
  ) : null, y = [
1938
1939
  ...t.trim() ? [{ [e.display_field]: { _contains: t.trim() } }] : [],
1939
1940
  ...m ? [m] : []
1940
1941
  ];
1941
1942
  y.length > 0 && (r.filter = JSON.stringify(y.length === 1 ? y[0] : { _and: y }));
1942
- const b = (await h.request(
1943
+ const b = (await f.request(
1943
1944
  O(`/items/${e.target_collection}`, r)
1944
- )).data ?? [], A = Ne(e.path), v = he[e.path] ? new Set(he[e.path]) : null, ae = /* @__PURE__ */ new Set(), pe = [];
1945
+ )).data ?? [], E = Ne(e.path), v = fe[e.path] ? new Set(fe[e.path]) : null, ae = /* @__PURE__ */ new Set(), pe = [];
1945
1946
  for (const q of b) {
1946
1947
  const V = q[e.display_field];
1947
1948
  if (V == null || V === "") continue;
1948
1949
  const H = String(V);
1949
- ae.has(H) || v && !v.has(H) || (ae.add(H), pe.push({ label: A ? Ue(H, A) : H, value: H }));
1950
+ ae.has(H) || v && !v.has(H) || (ae.add(H), pe.push({ label: E ? Ue(H, E) : H, value: H }));
1950
1951
  }
1951
1952
  return pe;
1952
1953
  }, an = new Map(((c == null ? void 0 : c.extra_field_meta) ?? []).map((e) => [e.path, e])), Qe = [
@@ -2031,7 +2032,7 @@ function Dd({
2031
2032
  key: "integrations",
2032
2033
  placeholder: T("integrations", "Integrations"),
2033
2034
  type: "select",
2034
- options: ii.map((e) => ({ label: e.label, value: e.value }))
2035
+ options: si.map((e) => ({ label: e.label, value: e.value }))
2035
2036
  }
2036
2037
  ] : [],
2037
2038
  ...yt ? [
@@ -2039,7 +2040,7 @@ function Dd({
2039
2040
  key: "fulfilment",
2040
2041
  placeholder: "Shipped",
2041
2042
  type: "select",
2042
- options: li
2043
+ options: ai
2043
2044
  }
2044
2045
  ] : [],
2045
2046
  ...kt ? [
@@ -2068,7 +2069,7 @@ function Dd({
2068
2069
  placeholder: T("label", "Item"),
2069
2070
  type: "combobox",
2070
2071
  multi: !0,
2071
- loadOptions: async (e) => ((await h.request(
2072
+ loadOptions: async (e) => ((await f.request(
2072
2073
  O(`/queues/${l}/label-suggest`, e.trim() ? { q: e.trim() } : {})
2073
2074
  )).data ?? []).map((n) => ({ label: n, value: n }))
2074
2075
  },
@@ -2104,16 +2105,16 @@ function Dd({
2104
2105
  multi: !0,
2105
2106
  // The "your access" mark follows the person's restriction on every tab,
2106
2107
  // not only on an empty one (army 11 Q2-1).
2107
- restricted: !!((m = he[e]) != null && m.length),
2108
+ restricted: !!((m = fe[e]) != null && m.length),
2108
2109
  options: s.map((N) => ({
2109
- label: o ? Ue(N, o) : Dt(t, N),
2110
+ label: o ? Ue(N, o) : Kt(t, N),
2110
2111
  value: N
2111
2112
  }))
2112
2113
  } : (t == null ? void 0 : t.kind) === "relation" ? {
2113
2114
  ...r,
2114
2115
  type: "combobox",
2115
2116
  multi: !0,
2116
- restricted: !!((y = he[e]) != null && y.length),
2117
+ restricted: !!((y = fe[e]) != null && y.length),
2117
2118
  loadOptions: ma(t)
2118
2119
  } : { ...r, placeholder: `Search ${n}…`, type: "text" };
2119
2120
  })
@@ -2127,13 +2128,13 @@ function Dd({
2127
2128
  const e = [];
2128
2129
  for (const [o, s] of Object.entries(Oe)) {
2129
2130
  if (!s || Array.isArray(s) && s.length === 0) continue;
2130
- const u = Qe.find((b) => b.key === o), m = o.startsWith("extra.") ? o.slice(6) : null, y = m ? Ne(m) : null, N = es({
2131
+ const u = Qe.find((b) => b.key === o), m = o.startsWith("extra.") ? o.slice(6) : null, y = m ? Ne(m) : null, N = ts({
2131
2132
  field: Jn(o),
2132
2133
  type: (u == null ? void 0 : u.type) ?? "select",
2133
2134
  value: s,
2134
2135
  optionLabel: (b) => {
2135
- var A, v;
2136
- return (v = (A = u == null ? void 0 : u.options) == null ? void 0 : A.find((ae) => ae.value === b)) == null ? void 0 : v.label;
2136
+ var E, v;
2137
+ return (v = (E = u == null ? void 0 : u.options) == null ? void 0 : E.find((ae) => ae.value === b)) == null ? void 0 : v.label;
2137
2138
  },
2138
2139
  currency: (y == null ? void 0 : y.type) === "number" && y.prefix === "$",
2139
2140
  rangeUnit: u == null ? void 0 : u.range_unit
@@ -2141,7 +2142,7 @@ function Dd({
2141
2142
  N && e.push(N);
2142
2143
  }
2143
2144
  const t = i == null ? void 0 : i.total;
2144
- return ts({
2145
+ return ns({
2145
2146
  noun: "items",
2146
2147
  scope: g === "mine" ? "you own" : g === "unowned" ? "with no owners" : g === "claimed" ? "you claimed" : null,
2147
2148
  viewName: ((r = (n = G == null ? void 0 : G.data) == null ? void 0 : n.find((o) => o.id === ot)) == null ? void 0 : r.name) ?? null,
@@ -2149,7 +2150,7 @@ function Dd({
2149
2150
  shown: typeof t == "number" ? t : null,
2150
2151
  of: (x == null ? void 0 : x.total) ?? null
2151
2152
  });
2152
- })(), At = new Set(Object.keys(fe.current)), so = ((e) => {
2153
+ })(), Et = new Set(Object.keys(he.current)), io = ((e) => {
2153
2154
  var n;
2154
2155
  if (e.some((r) => r.key === "state")) return e;
2155
2156
  const t = Qe.find((r) => r.key === "state");
@@ -2161,27 +2162,27 @@ function Dd({
2161
2162
  var ae, pe, q;
2162
2163
  if (!s.key.startsWith("extra.")) return null;
2163
2164
  if (s.type === "combobox") return s;
2164
- const u = s.key.slice(6), m = an.get(u), y = At.has(s.key);
2165
+ const u = s.key.slice(6), m = an.get(u), y = Et.has(s.key);
2165
2166
  if ((m == null ? void 0 : m.kind) !== "relation" && !y) return null;
2166
- const N = Ne(u), b = (ae = i == null ? void 0 : i.available_values.extra) == null ? void 0 : ae[u], A = s.placeholder.replace(/^Search (.*)…$/, "$1"), v = (m == null ? void 0 : m.kind) === "relation" && m.target_collection && m.display_field ? { collection: m.target_collection, field: m.display_field } : void 0;
2167
+ const N = Ne(u), b = (ae = i == null ? void 0 : i.available_values.extra) == null ? void 0 : ae[u], E = s.placeholder.replace(/^Search (.*)…$/, "$1"), v = (m == null ? void 0 : m.kind) === "relation" && m.target_collection && m.display_field ? { collection: m.target_collection, field: m.display_field } : void 0;
2167
2168
  return b != null && b.length ? {
2168
2169
  key: s.key,
2169
- placeholder: A,
2170
+ placeholder: E,
2170
2171
  type: "combobox",
2171
2172
  multi: !0,
2172
2173
  cascade: v,
2173
- restricted: !!((pe = he[u]) != null && pe.length),
2174
+ restricted: !!((pe = fe[u]) != null && pe.length),
2174
2175
  options: b.map((V) => ({
2175
- label: N && N.type !== "number" ? Ue(V, N) : Dt(m, V),
2176
+ label: N && N.type !== "number" ? Ue(V, N) : Kt(m, V),
2176
2177
  value: V
2177
2178
  }))
2178
2179
  } : (m == null ? void 0 : m.kind) === "relation" ? {
2179
2180
  key: s.key,
2180
- placeholder: A,
2181
+ placeholder: E,
2181
2182
  type: "combobox",
2182
2183
  multi: !0,
2183
2184
  cascade: v,
2184
- restricted: !!((q = he[u]) != null && q.length),
2185
+ restricted: !!((q = fe[u]) != null && q.length),
2185
2186
  loadOptions: ma(m)
2186
2187
  } : null;
2187
2188
  };
@@ -2198,22 +2199,22 @@ function Dd({
2198
2199
  if (!v.key.startsWith("extra.") || u.has(v.key)) return !1;
2199
2200
  const ae = v.key.slice(6);
2200
2201
  return ((pe = an.get(ae)) == null ? void 0 : pe.target_collection) === m.collection;
2201
- }), A = b.find((v) => v.key.slice(6).startsWith(`${y}.`)) ?? b[0];
2202
- N = A ? e(A) : null;
2202
+ }), E = b.find((v) => v.key.slice(6).startsWith(`${y}.`)) ?? b[0];
2203
+ N = E ? e(E) : null;
2203
2204
  }
2204
2205
  !N || u.has(N.key) || (u.add(N.key), s.push(m.label ? { ...N, placeholder: m.label } : N));
2205
2206
  }
2206
2207
  for (const m of Qe.map(e))
2207
- m && !u.has(m.key) && (At.has(m.key) || m.restricted) && s.push(m);
2208
+ m && !u.has(m.key) && (Et.has(m.key) || m.restricted) && s.push(m);
2208
2209
  if (s.length > 0) return s;
2209
2210
  }
2210
2211
  const t = Hn.map(e).filter((s) => s !== null), r = [
2211
- ...t.filter((s) => At.has(s.key) || s.restricted),
2212
- ...t.filter((s) => !At.has(s.key) && !s.restricted)
2212
+ ...t.filter((s) => Et.has(s.key) || s.restricted),
2213
+ ...t.filter((s) => !Et.has(s.key) && !s.restricted)
2213
2214
  ].slice(0, 6);
2214
2215
  return r.length > 0 ? r : Hn.filter((s) => s.key === "state" || s.key === "owners");
2215
2216
  })()
2216
- ), io = (x == null ? void 0 : x.sla_tracked) !== 0 || _.sla_status === "warning" || _.sla_status === "breached", co = (() => {
2217
+ ), co = (x == null ? void 0 : x.sla_tracked) !== 0 || _.sla_status === "warning" || _.sla_status === "breached", uo = (() => {
2217
2218
  if (!x) return null;
2218
2219
  const e = I ?? x, t = [
2219
2220
  {
@@ -2247,7 +2248,7 @@ function Dd({
2247
2248
  tone: "text-slate-600 dark:text-slate-300",
2248
2249
  on: g === "unowned",
2249
2250
  toggle: () => {
2250
- te(g === "unowned" ? "all" : "unowned"), K(1);
2251
+ te(g === "unowned" ? "all" : "unowned"), P(1);
2251
2252
  }
2252
2253
  }
2253
2254
  ].filter((n) => n.n > 0 || n.on);
@@ -2285,17 +2286,17 @@ function Dd({
2285
2286
  }
2286
2287
  );
2287
2288
  })();
2288
- function uo(e) {
2289
+ function mo(e) {
2289
2290
  const t = new Set(re);
2290
2291
  t.has(e) ? (t.delete(e), (e === "addendums" || e === "integrations") && nr((n) => new Set(n).add(e))) : (t.add(e), (e === "addendums" || e === "integrations") && nr((n) => {
2291
2292
  const r = new Set(n);
2292
2293
  return r.delete(e), r;
2293
2294
  })), Ht([...t]);
2294
2295
  }
2295
- return jt ? (D == null ? void 0 : D((jt == null ? void 0 : jt.status) ?? 500)) ?? null : /* @__PURE__ */ d("div", { className: "flex flex-1 min-h-0 flex-col", children: [
2296
+ return jt ? (K == null ? void 0 : K((jt == null ? void 0 : jt.status) ?? 500)) ?? null : /* @__PURE__ */ d("div", { className: "flex flex-1 min-h-0 flex-col", children: [
2296
2297
  /* @__PURE__ */ d("div", { className: "shrink-0", children: [
2297
2298
  (i == null ? void 0 : i.truncated) && /* @__PURE__ */ d("div", { className: "mx-4 mt-3 flex items-center gap-2 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-[12px] text-amber-800 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-300", children: [
2298
- /* @__PURE__ */ a(No, { className: "h-4 w-4 shrink-0" }),
2299
+ /* @__PURE__ */ a(So, { className: "h-4 w-4 shrink-0" }),
2299
2300
  /* @__PURE__ */ a("span", { children: "This view hit the row safety limit — the table below may not include every matching item, but the totals above are exact. Narrow the filters (or clear the priority sort on a large queue) to browse everything." })
2300
2301
  ] }),
2301
2302
  /* @__PURE__ */ d(
@@ -2304,13 +2305,13 @@ function Dd({
2304
2305
  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",
2305
2306
  "data-queue-toolbar": !0,
2306
2307
  children: [
2307
- z ? /* @__PURE__ */ a("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: Ji.filter((e) => ge || e.value !== "claimed").map(
2308
+ z ? /* @__PURE__ */ a("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: Hi.filter((e) => ge || e.value !== "claimed").map(
2308
2309
  (e, t) => /* @__PURE__ */ a(
2309
2310
  "button",
2310
2311
  {
2311
2312
  type: "button",
2312
2313
  onClick: () => {
2313
- te(e.value), K(1);
2314
+ te(e.value), P(1);
2314
2315
  },
2315
2316
  className: L(
2316
2317
  "flex h-8 items-center px-3 text-[12px] font-medium transition-colors",
@@ -2322,13 +2323,13 @@ function Dd({
2322
2323
  e.value
2323
2324
  )
2324
2325
  ) }) : /* @__PURE__ */ a("div", { className: "h-8 w-64 animate-pulse rounded-md bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
2325
- z ? Ee.length <= 1 ? null : (
2326
+ z ? Ae.length <= 1 ? null : (
2326
2327
  // One allowed view means nothing to switch to — no button.
2327
2328
  /* @__PURE__ */ a("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: [
2328
2329
  { value: "table", label: "Table" },
2329
2330
  { value: "kanban", label: "Kanban" },
2330
2331
  { value: "workload", label: "Workload" }
2331
- ].filter((e) => Ee.includes(e.value)).map((e, t) => /* @__PURE__ */ a(
2332
+ ].filter((e) => Ae.includes(e.value)).map((e, t) => /* @__PURE__ */ a(
2332
2333
  "button",
2333
2334
  {
2334
2335
  type: "button",
@@ -2373,13 +2374,13 @@ function Dd({
2373
2374
  }),
2374
2375
  className: `flex h-8 items-center gap-1.5 rounded-full border px-2.5 text-[12px] font-medium transition-colors ${_.addendums === "active" ? "border-amber-400 bg-amber-50 text-amber-800 dark:border-amber-500/60 dark:bg-amber-500/10 dark:text-amber-300" : "border-slate-200 bg-white text-slate-600 hover:border-slate-300 dark:border-border dark:bg-card dark:text-slate-300"}`,
2375
2376
  children: [
2376
- /* @__PURE__ */ a(So, { className: "h-3.5 w-3.5" }),
2377
+ /* @__PURE__ */ a(Co, { className: "h-3.5 w-3.5" }),
2377
2378
  "Active addendums"
2378
2379
  ]
2379
2380
  }
2380
2381
  ),
2381
2382
  qe && /* @__PURE__ */ a(
2382
- ci,
2383
+ ii,
2383
2384
  {
2384
2385
  label: T("integrations", "Integrations"),
2385
2386
  value: _.integrations,
@@ -2389,16 +2390,16 @@ function Dd({
2389
2390
  })
2390
2391
  }
2391
2392
  ),
2392
- /* @__PURE__ */ a(ki, { className: "h-8" }),
2393
- /* @__PURE__ */ a(ri, {}),
2393
+ /* @__PURE__ */ a(yi, { className: "h-8" }),
2394
+ /* @__PURE__ */ a(ni, {}),
2394
2395
  mn > 0 && /* @__PURE__ */ d(
2395
2396
  "button",
2396
2397
  {
2397
2398
  type: "button",
2398
- onClick: yl,
2399
+ onClick: kl,
2399
2400
  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",
2400
2401
  children: [
2401
- /* @__PURE__ */ a(Co, { className: "h-3 w-3" }),
2402
+ /* @__PURE__ */ a($o, { className: "h-3 w-3" }),
2402
2403
  mn,
2403
2404
  " update",
2404
2405
  mn === 1 ? "" : "s",
@@ -2422,10 +2423,10 @@ function Dd({
2422
2423
  ]
2423
2424
  }
2424
2425
  ) }),
2425
- /* @__PURE__ */ a(pt, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(Pa, { children: [
2426
- /* @__PURE__ */ a(Ci, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
2427
- /* @__PURE__ */ d(Ma, { children: [
2428
- /* @__PURE__ */ a($i, { children: "No attribute found." }),
2426
+ /* @__PURE__ */ a(pt, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(Ma, { children: [
2427
+ /* @__PURE__ */ a(Si, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
2428
+ /* @__PURE__ */ d(Ba, { children: [
2429
+ /* @__PURE__ */ a(Ci, { children: "No attribute found." }),
2429
2430
  /* @__PURE__ */ a(Ot, { value: "__none__", onSelect: () => bt(null), children: "None" }),
2430
2431
  ua.map((e) => /* @__PURE__ */ a(
2431
2432
  Ot,
@@ -2444,14 +2445,14 @@ function Dd({
2444
2445
  {
2445
2446
  type: "button",
2446
2447
  onClick: () => {
2447
- Ge(B === "-priority" ? "" : "-priority"), K(1);
2448
+ Ge(B === "-priority" ? "" : "-priority"), P(1);
2448
2449
  },
2449
2450
  className: L(
2450
2451
  "flex h-8 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium",
2451
2452
  B === "-priority" ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
2452
2453
  ),
2453
2454
  children: [
2454
- /* @__PURE__ */ a($o, { className: "h-3.5 w-3.5" }),
2455
+ /* @__PURE__ */ a(qo, { className: "h-3.5 w-3.5" }),
2455
2456
  "Priority"
2456
2457
  ]
2457
2458
  }
@@ -2474,15 +2475,15 @@ function Dd({
2474
2475
  type: "button",
2475
2476
  className: L(
2476
2477
  "flex h-8 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium",
2477
- ht ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
2478
+ ft ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
2478
2479
  ),
2479
2480
  children: [
2480
2481
  /* @__PURE__ */ a(Fa, { className: "h-3.5 w-3.5" }),
2481
- ht ? `Lanes: ${ht === "collection" ? "Collection" : "Owner"}` : "Lanes"
2482
+ ft ? `Lanes: ${ft === "collection" ? "Collection" : "Owner"}` : "Lanes"
2482
2483
  ]
2483
2484
  }
2484
2485
  ) }),
2485
- /* @__PURE__ */ a(pt, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ a(Pa, { children: /* @__PURE__ */ d(Ma, { children: [
2486
+ /* @__PURE__ */ a(pt, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ a(Ma, { children: /* @__PURE__ */ d(Ba, { children: [
2486
2487
  /* @__PURE__ */ a(Ot, { value: "none", onSelect: () => dn(null), children: "None" }),
2487
2488
  /* @__PURE__ */ a(Ot, { value: "collection", onSelect: () => dn("collection"), children: "Collection" }),
2488
2489
  /* @__PURE__ */ a(Ot, { value: "owner", onSelect: () => dn("owners"), children: "Owner" })
@@ -2497,24 +2498,24 @@ function Dd({
2497
2498
  className: "flex h-8 items-center gap-1 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",
2498
2499
  "data-queue-ask": !0,
2499
2500
  children: [
2500
- /* @__PURE__ */ a(qo, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
2501
+ /* @__PURE__ */ a(Ro, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
2501
2502
  "Ask about this queue"
2502
2503
  ]
2503
2504
  }
2504
2505
  ),
2505
- /* @__PURE__ */ a(bi, { listKey: `queue:${l}`, getState: Gr }),
2506
+ /* @__PURE__ */ a(pi, { listKey: `queue:${l}`, getState: Gr }),
2506
2507
  C === "table" && /* @__PURE__ */ d(
2507
2508
  "button",
2508
2509
  {
2509
2510
  type: "button",
2510
- onClick: () => void oo(),
2511
+ onClick: () => void so(),
2511
2512
  disabled: Wn || !i || (i.total ?? 0) === 0,
2512
2513
  "data-tip": "Download the rows on this tab, with these filters and columns, as a spreadsheet (CSV)",
2513
2514
  "aria-label": "Export to CSV",
2514
2515
  className: "flex h-8 items-center gap-1 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:bg-slate-50 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",
2515
2516
  "data-queue-export": !0,
2516
2517
  children: [
2517
- /* @__PURE__ */ a(Ro, { className: "h-3.5 w-3.5" }),
2518
+ /* @__PURE__ */ a(Fo, { className: "h-3.5 w-3.5" }),
2518
2519
  Wn ? "Exporting…" : "Export"
2519
2520
  ]
2520
2521
  }
@@ -2523,16 +2524,16 @@ function Dd({
2523
2524
  "button",
2524
2525
  {
2525
2526
  type: "button",
2526
- onClick: () => el((e) => !e),
2527
- "aria-expanded": ft,
2527
+ onClick: () => tl((e) => !e),
2528
+ "aria-expanded": ht,
2528
2529
  title: "Trends, aging, pace and states",
2529
2530
  className: L(
2530
2531
  "flex h-8 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium",
2531
- ft ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
2532
+ ht ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
2532
2533
  ),
2533
2534
  "data-queue-insights-toggle": !0,
2534
2535
  children: [
2535
- /* @__PURE__ */ a(Fo, { className: "h-3.5 w-3.5" }),
2536
+ /* @__PURE__ */ a(Lo, { className: "h-3.5 w-3.5" }),
2536
2537
  "Insights"
2537
2538
  ]
2538
2539
  }
@@ -2544,26 +2545,26 @@ function Dd({
2544
2545
  type: "button",
2545
2546
  className: "flex h-8 items-center gap-1 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",
2546
2547
  children: [
2547
- /* @__PURE__ */ a(Lo, { className: "h-3.5 w-3.5" }),
2548
+ /* @__PURE__ */ a(To, { className: "h-3.5 w-3.5" }),
2548
2549
  "Columns"
2549
2550
  ]
2550
2551
  }
2551
2552
  ) }),
2552
2553
  /* @__PURE__ */ a(pt, { className: "w-[220px] p-2", align: "end", children: /* @__PURE__ */ a(
2553
- fo,
2554
+ go,
2554
2555
  {
2555
- sensors: to,
2556
- collisionDetection: go,
2557
- onDragEnd: no,
2558
- children: /* @__PURE__ */ a(xo, { items: ia, strategy: yo, children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: ia.map((e) => {
2556
+ sensors: no,
2557
+ collisionDetection: xo,
2558
+ onDragEnd: ro,
2559
+ children: /* @__PURE__ */ a(yo, { items: ia, strategy: ko, children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: ia.map((e) => {
2559
2560
  const t = Gn.find((n) => n.key === e);
2560
2561
  return /* @__PURE__ */ a(
2561
- tc,
2562
+ ec,
2562
2563
  {
2563
2564
  id: e,
2564
2565
  label: typeof (t == null ? void 0 : t.header) == "string" ? t.header : e,
2565
2566
  checked: re.has(e),
2566
- onCheckedChange: () => uo(e)
2567
+ onCheckedChange: () => mo(e)
2567
2568
  },
2568
2569
  e
2569
2570
  );
@@ -2575,13 +2576,13 @@ function Dd({
2575
2576
  "button",
2576
2577
  {
2577
2578
  type: "button",
2578
- onClick: Kl,
2579
+ onClick: Dl,
2579
2580
  "aria-pressed": ne,
2580
2581
  "data-queue-bulk-mode": ne ? "on" : "off",
2581
2582
  "data-tip": ne ? "Leave bulk mode — clears the selection and turns row actions back on" : "Select rows to act on several at once",
2582
2583
  className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium shadow-sm ${ne ? "border-nvr-cyan bg-nvr-cyan/10 text-slate-800 dark:text-slate-100" : "border-slate-200 bg-white text-slate-500 hover:bg-slate-50 hover:text-slate-700 dark:border-border dark:bg-card dark:text-slate-400 dark:hover:bg-muted"}`,
2583
2584
  children: [
2584
- /* @__PURE__ */ a(To, { className: "h-3.5 w-3.5" }),
2585
+ /* @__PURE__ */ a(Eo, { className: "h-3.5 w-3.5" }),
2585
2586
  ne ? "Done" : "Bulk select"
2586
2587
  ]
2587
2588
  }
@@ -2591,27 +2592,27 @@ function Dd({
2591
2592
  {
2592
2593
  type: "button",
2593
2594
  onClick: () => {
2594
- const e = Pt === "compact" ? "comfortable" : "compact";
2595
- ja(e);
2595
+ const e = Dt === "compact" ? "comfortable" : "compact";
2596
+ Ua(e);
2596
2597
  try {
2597
2598
  localStorage.setItem("nvr_table_density", e);
2598
2599
  } catch {
2599
2600
  }
2600
2601
  },
2601
2602
  "aria-label": "Row density",
2602
- title: Pt === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
2603
+ title: Dt === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
2603
2604
  className: "flex h-8 w-8 items-center justify-center rounded-md border border-slate-200 bg-white text-slate-500 shadow-sm hover:bg-slate-50 hover:text-slate-700 dark:border-border dark:bg-card dark:text-slate-400 dark:hover:bg-muted",
2604
- children: Pt === "compact" ? /* @__PURE__ */ a(Ao, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(Eo, { className: "h-3.5 w-3.5" })
2605
+ children: Dt === "compact" ? /* @__PURE__ */ a(Ao, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(Oo, { className: "h-3.5 w-3.5" })
2605
2606
  }
2606
2607
  ),
2607
- C === "table" && Wa && me.length > 0 && /* @__PURE__ */ d(
2608
+ C === "table" && Ha && me.length > 0 && /* @__PURE__ */ d(
2608
2609
  "button",
2609
2610
  {
2610
2611
  type: "button",
2611
2612
  onClick: () => Qr(),
2612
2613
  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",
2613
2614
  children: [
2614
- /* @__PURE__ */ a(Oo, { className: "h-3 w-3 fill-current" }),
2615
+ /* @__PURE__ */ a(Ko, { className: "h-3 w-3 fill-current" }),
2615
2616
  "Work Next"
2616
2617
  ]
2617
2618
  }
@@ -2714,7 +2715,7 @@ function Dd({
2714
2715
  )) })
2715
2716
  ] }),
2716
2717
  !kn && He && de && /* @__PURE__ */ a(
2717
- oi,
2718
+ li,
2718
2719
  {
2719
2720
  collection: He,
2720
2721
  onParsed: (e, t) => de(`/collections/${He}/new`, {
@@ -2726,7 +2727,7 @@ function Dd({
2726
2727
  ]
2727
2728
  }
2728
2729
  ),
2729
- ft && /* @__PURE__ */ d(
2730
+ ht && /* @__PURE__ */ d(
2730
2731
  "div",
2731
2732
  {
2732
2733
  className: "flex flex-wrap items-center gap-x-4 gap-y-2 border-b border-slate-100 bg-white px-4 py-2.5 dark:border-slate-800 dark:bg-slate-900",
@@ -2734,20 +2735,20 @@ function Dd({
2734
2735
  children: [
2735
2736
  /* @__PURE__ */ d("div", { className: "nvr-stagger-direct flex max-w-full flex-wrap gap-px overflow-hidden rounded-lg border border-slate-200 bg-slate-200 dark:border-border dark:bg-border", children: [
2736
2737
  /* @__PURE__ */ a(
2737
- Kt,
2738
+ Pt,
2738
2739
  {
2739
2740
  label: "Total",
2740
2741
  count: (x == null ? void 0 : x.total) ?? 0,
2741
2742
  filteredCount: I ? I.total : null,
2742
- active: Object.values(_).every(Xa) && g === "all",
2743
+ active: Object.values(_).every(Za) && g === "all",
2743
2744
  isLoading: Xe,
2744
2745
  ..._t("total"),
2745
- onClick: Za
2746
+ onClick: el
2746
2747
  }
2747
2748
  ),
2748
- io && /* @__PURE__ */ d(Se, { children: [
2749
+ co && /* @__PURE__ */ d(Se, { children: [
2749
2750
  /* @__PURE__ */ a(
2750
- Kt,
2751
+ Pt,
2751
2752
  {
2752
2753
  label: "Warning",
2753
2754
  count: (x == null ? void 0 : x.sla_warning) ?? 0,
@@ -2761,7 +2762,7 @@ function Dd({
2761
2762
  }
2762
2763
  ),
2763
2764
  /* @__PURE__ */ a(
2764
- Kt,
2765
+ Pt,
2765
2766
  {
2766
2767
  label: "Breached",
2767
2768
  count: (x == null ? void 0 : x.sla_breached) ?? 0,
@@ -2776,10 +2777,10 @@ function Dd({
2776
2777
  )
2777
2778
  ] }),
2778
2779
  /* @__PURE__ */ a(
2779
- Kt,
2780
+ Pt,
2780
2781
  {
2781
2782
  label: "At Risk",
2782
- breakdown: I ? Ba(I.at_risk_by_rule) : Ba(x == null ? void 0 : x.at_risk_by_rule),
2783
+ breakdown: I ? Qa(I.at_risk_by_rule) : Qa(x == null ? void 0 : x.at_risk_by_rule),
2783
2784
  count: (x == null ? void 0 : x.at_risk) ?? 0,
2784
2785
  filteredCount: I ? I.at_risk : null,
2785
2786
  tone: "red",
@@ -2791,7 +2792,7 @@ function Dd({
2791
2792
  }
2792
2793
  ),
2793
2794
  /* @__PURE__ */ a(
2794
- Kt,
2795
+ Pt,
2795
2796
  {
2796
2797
  label: "Unowned",
2797
2798
  count: (x == null ? void 0 : x.unowned) ?? 0,
@@ -2801,7 +2802,7 @@ function Dd({
2801
2802
  deltaBadIsUp: !0,
2802
2803
  ..._t("unowned"),
2803
2804
  onClick: () => {
2804
- te(g === "unowned" ? "all" : "unowned"), K(1);
2805
+ te(g === "unowned" ? "all" : "unowned"), P(1);
2805
2806
  }
2806
2807
  }
2807
2808
  )
@@ -2819,7 +2820,7 @@ function Dd({
2819
2820
  j((r) => ({
2820
2821
  ...r,
2821
2822
  aging_hours: r.aging_hours === t ? "" : t
2822
- })), K(1);
2823
+ })), P(1);
2823
2824
  },
2824
2825
  className: L(
2825
2826
  "rounded-md border px-2 py-1 tabular-nums transition-colors",
@@ -2855,17 +2856,17 @@ function Dd({
2855
2856
  ] }) : /* @__PURE__ */ a(Se, { children: "→ Holding steady" })
2856
2857
  }
2857
2858
  ),
2858
- Pr.length > 0 && /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: Pr.map(([e, t]) => {
2859
+ Dr.length > 0 && /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: Dr.map(([e, t]) => {
2859
2860
  var n;
2860
2861
  return /* @__PURE__ */ a(
2861
- ec,
2862
+ Zi,
2862
2863
  {
2863
2864
  label: Fe(e),
2864
2865
  count: t,
2865
2866
  filteredCount: I ? I.by_state[e] ?? 0 : null,
2866
2867
  color: ((n = Re[e]) == null ? void 0 : n.color) ?? null,
2867
- active: za.includes(e),
2868
- onClick: () => Ya(e)
2868
+ active: Xa.includes(e),
2869
+ onClick: () => za(e)
2869
2870
  },
2870
2871
  e
2871
2872
  );
@@ -2874,18 +2875,18 @@ function Dd({
2874
2875
  }
2875
2876
  ),
2876
2877
  C !== "workload" && /* @__PURE__ */ a(
2877
- Bi,
2878
+ Mi,
2878
2879
  {
2879
- defs: so,
2880
+ defs: io,
2880
2881
  values: _,
2881
- seededKeys: At,
2882
+ seededKeys: Et,
2882
2883
  onApply: (e) => {
2883
- j((t) => ({ ...t, ...e })), K(1);
2884
+ j((t) => ({ ...t, ...e })), P(1);
2884
2885
  },
2885
2886
  onClear: () => {
2886
- j({ ...fe.current }), K(1);
2887
+ j({ ...he.current }), P(1);
2887
2888
  },
2888
- right: co
2889
+ right: uo
2889
2890
  }
2890
2891
  ),
2891
2892
  /* @__PURE__ */ d(
@@ -2946,7 +2947,7 @@ function Dd({
2946
2947
  j((e) => {
2947
2948
  const { owners: t, ...n } = e;
2948
2949
  return n;
2949
- }), K(1);
2950
+ }), P(1);
2950
2951
  },
2951
2952
  className: "flex h-4 w-4 items-center justify-center rounded-full text-[10px] hover:bg-black/10 dark:hover:bg-white/10",
2952
2953
  children: "✕"
@@ -2959,7 +2960,7 @@ function Dd({
2959
2960
  "button",
2960
2961
  {
2961
2962
  type: "button",
2962
- onClick: Ll,
2963
+ onClick: Tl,
2963
2964
  title: "Revert to the queue default (filters, columns and sort cleared)",
2964
2965
  className: L(
2965
2966
  "inline-flex h-6 items-center rounded-full border px-2.5 text-[12px] transition-colors",
@@ -2983,13 +2984,13 @@ function Dd({
2983
2984
  {
2984
2985
  type: "button",
2985
2986
  title: tt === e.id ? "Your default view — click to revert to the general default" : "Set as your default view",
2986
- onClick: () => Dl.mutate(tt === e.id ? null : e.id),
2987
+ onClick: () => Pl.mutate(tt === e.id ? null : e.id),
2987
2988
  className: L(
2988
2989
  "shrink-0",
2989
2990
  tt === e.id ? "text-amber-400" : "text-slate-300 hover:text-amber-400 dark:text-slate-600"
2990
2991
  ),
2991
2992
  children: /* @__PURE__ */ a(
2992
- Do,
2993
+ Po,
2993
2994
  {
2994
2995
  className: L("h-3 w-3", tt === e.id && "fill-current"),
2995
2996
  "aria-label": tt === e.id ? "Default view" : "Set as default"
@@ -3005,14 +3006,14 @@ function Dd({
3005
3006
  "button",
3006
3007
  {
3007
3008
  type: "button",
3008
- onClick: () => Ol.mutate({ viewId: e.id, on: !e.is_default }),
3009
+ onClick: () => Kl.mutate({ viewId: e.id, on: !e.is_default }),
3009
3010
  title: e.is_default ? "Queue default — click to unset" : "Set as the default view for everyone on this queue",
3010
3011
  className: L(
3011
3012
  "shrink-0",
3012
3013
  e.is_default ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
3013
3014
  ),
3014
3015
  "aria-label": e.is_default ? "Unset queue default" : "Set queue default",
3015
- children: /* @__PURE__ */ a(Ko, { className: L("h-3 w-3", e.is_default && "fill-current") })
3016
+ children: /* @__PURE__ */ a(Do, { className: L("h-3 w-3", e.is_default && "fill-current") })
3016
3017
  }
3017
3018
  ),
3018
3019
  (e.user === S || Me) && ot === e.id && /* @__PURE__ */ a(
@@ -3025,27 +3026,27 @@ function Dd({
3025
3026
  className: "shrink-0 text-slate-400 hover:text-nvr-navy disabled:opacity-50 dark:hover:text-nvr-cyan",
3026
3027
  "aria-label": `Update view ${e.name}`,
3027
3028
  "data-view-update-state": Be.isPending ? "saving" : Hr === e.id ? "saved" : "idle",
3028
- children: Be.isPending && ((t = Be.variables) == null ? void 0 : t.id) === e.id ? /* @__PURE__ */ a(Po, { className: "h-3 w-3 animate-spin" }) : Hr === e.id ? /* @__PURE__ */ a(
3029
- Mo,
3029
+ children: Be.isPending && ((t = Be.variables) == null ? void 0 : t.id) === e.id ? /* @__PURE__ */ a(Mo, { className: "h-3 w-3 animate-spin" }) : Hr === e.id ? /* @__PURE__ */ a(
3030
+ Bo,
3030
3031
  {
3031
3032
  className: "h-3 w-3 text-emerald-600 dark:text-emerald-400",
3032
3033
  strokeWidth: 3
3033
3034
  }
3034
- ) : /* @__PURE__ */ a(Bo, { className: "h-3 w-3" })
3035
+ ) : /* @__PURE__ */ a(Qo, { className: "h-3 w-3" })
3035
3036
  }
3036
3037
  ),
3037
3038
  ot === e.id && /* @__PURE__ */ a(
3038
3039
  "button",
3039
3040
  {
3040
3041
  type: "button",
3041
- onClick: () => nl(e.id),
3042
+ onClick: () => rl(e.id),
3042
3043
  title: Gt(e.id) ? "Subscribed to new arrivals in this view — click to unsubscribe" : "Notify me when items enter this view (checked every 5 min)",
3043
3044
  className: L(
3044
3045
  "shrink-0",
3045
3046
  Gt(e.id) ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
3046
3047
  ),
3047
3048
  "aria-label": `Subscribe to view ${e.name}`,
3048
- children: /* @__PURE__ */ a(Qo, { className: L("h-3 w-3", Gt(e.id) && "fill-current") })
3049
+ children: /* @__PURE__ */ a(jo, { className: L("h-3 w-3", Gt(e.id) && "fill-current") })
3049
3050
  }
3050
3051
  ),
3051
3052
  e.user === S && (Mn === e.id ? /* @__PURE__ */ d(
@@ -3093,7 +3094,7 @@ function Dd({
3093
3094
  e.id
3094
3095
  );
3095
3096
  }),
3096
- /* @__PURE__ */ d(ut, { open: Fl, onOpenChange: Pn, children: [
3097
+ /* @__PURE__ */ d(ut, { open: Ll, onOpenChange: Dn, children: [
3097
3098
  /* @__PURE__ */ a(mt, { asChild: !0, children: /* @__PURE__ */ a(
3098
3099
  "button",
3099
3100
  {
@@ -3112,7 +3113,7 @@ function Dd({
3112
3113
  type: "button",
3113
3114
  disabled: Be.isPending,
3114
3115
  onClick: () => {
3115
- Be.mutate(e), Pn(!1);
3116
+ Be.mutate(e), Dn(!1);
3116
3117
  },
3117
3118
  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",
3118
3119
  children: [
@@ -3174,7 +3175,7 @@ function Dd({
3174
3175
  )
3175
3176
  ] }),
3176
3177
  /* @__PURE__ */ d("div", { ref: Zt, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: [
3177
- fr && /* @__PURE__ */ a(mi, { error: sl, onRetry: () => void il(), className: "mb-3" }),
3178
+ hr && /* @__PURE__ */ a(ui, { error: il, onRetry: () => void cl(), className: "mb-3" }),
3178
3179
  Yn && /* @__PURE__ */ a(
3179
3180
  "p",
3180
3181
  {
@@ -3188,7 +3189,7 @@ function Dd({
3188
3189
  C === "table" ? /* @__PURE__ */ a(Se, { children: /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1", children: /* @__PURE__ */ d(
3189
3190
  "div",
3190
3191
  {
3191
- ref: Ae.rootRef,
3192
+ ref: Ee.rootRef,
3192
3193
  className: L(
3193
3194
  "relative min-w-0 flex-1 transition-opacity duration-200",
3194
3195
  vr && "pointer-events-none opacity-60"
@@ -3196,17 +3197,17 @@ function Dd({
3196
3197
  "aria-busy": vr || void 0,
3197
3198
  children: [
3198
3199
  wr != 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: [
3199
- ml.text ?? "Still working",
3200
+ pl.text ?? "Still working",
3200
3201
  " — ",
3201
3202
  wr,
3202
3203
  "s"
3203
3204
  ] }),
3204
3205
  /* @__PURE__ */ a(
3205
- ti,
3206
+ ei,
3206
3207
  {
3207
3208
  fillHeight: !0,
3208
3209
  enterKey: qr.current,
3209
- density: Pt,
3210
+ density: Dt,
3210
3211
  minBodyHeight: 360,
3211
3212
  columns: Tt,
3212
3213
  rows: $,
@@ -3215,30 +3216,30 @@ function Dd({
3215
3216
  page: ue,
3216
3217
  limit: yn,
3217
3218
  isLoading: Xe,
3218
- onPageChange: K,
3219
- onRowClick: (e) => Kn(e),
3219
+ onPageChange: P,
3220
+ onRowClick: (e) => Pn(e),
3220
3221
  onRowFocus: (e) => zt(F(e)),
3221
3222
  activeRowKey: St,
3222
3223
  rowAriaLabel: (e) => e.label || void 0,
3223
3224
  rowDragProps: (e) => ({
3224
- ...xl({ collection: e.collection, id: e.item_id }),
3225
- ...pl.record(e.collection, e.item_id)
3225
+ ...yl({ collection: e.collection, id: e.item_id }),
3226
+ ...bl.record(e.collection, e.item_id)
3226
3227
  }),
3227
3228
  onRowContextMenu: (e, t) => {
3228
3229
  t.preventDefault(), Ct({ x: t.clientX, y: t.clientY, row: e });
3229
3230
  },
3230
3231
  rowTitle: (e) => {
3231
3232
  const t = wt.get(F(e));
3232
- return Ae.titleFor(F(e)) ?? (t && !t.is_mine ? Ns(t) : void 0) ?? (Wr(e.collection, e.item_id) ? yi : void 0);
3233
+ return Ee.titleFor(F(e)) ?? (t && !t.is_mine ? Ns(t) : void 0) ?? (Wr(e.collection, e.item_id) ? xi : void 0);
3233
3234
  },
3234
3235
  rowClassName: (e) => L(
3235
- El(e),
3236
- Wr(e.collection, e.item_id) && xi
3236
+ Ol(e),
3237
+ Wr(e.collection, e.item_id) && gi
3237
3238
  ),
3238
- emptyMessage: fr ? /* @__PURE__ */ a("span", { className: "sr-only", children: "The list did not load." }) : /* @__PURE__ */ a(
3239
- ni,
3239
+ emptyMessage: hr ? /* @__PURE__ */ a("span", { className: "sr-only", children: "The list did not load." }) : /* @__PURE__ */ a(
3240
+ ti,
3240
3241
  {
3241
- icon: jo,
3242
+ icon: Uo,
3242
3243
  title: ((wa = i == null ? void 0 : i.empty) == null ? void 0 : wa.reason) === "not_permitted" ? "You cannot read this queue’s records" : ((_a = i == null ? void 0 : i.empty) == null ? void 0 : _a.reason) === "scope_mine" ? "Nothing waiting on you" : ((Na = i == null ? void 0 : i.empty) == null ? void 0 : Na.reason) === "filters" ? "No records match these filters" : "Nothing in this queue",
3243
3244
  detail: ((Sa = i == null ? void 0 : i.empty) == null ? void 0 : Sa.reason) === "filters" && ye > 0 ? `Your default ${yr(Jn)} filter is hiding ${ye.toLocaleString("en-US")} item${ye === 1 ? "" : "s"} here.` : ((Ca = i == null ? void 0 : i.empty) == null ? void 0 : Ca.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." : (($a = i == null ? void 0 : i.empty) == null ? void 0 : $a.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
3244
3245
  action: ((qa = i == null ? void 0 : i.empty) == null ? void 0 : qa.reason) === "filters" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-2", children: [
@@ -3262,9 +3263,9 @@ function Dd({
3262
3263
  onClick: () => {
3263
3264
  var t;
3264
3265
  const e = {};
3265
- for (const [n, r] of Object.entries(fe.current))
3266
- (t = he[n.slice(6)]) != null && t.length && (e[n] = r);
3267
- j(e), K(1);
3266
+ for (const [n, r] of Object.entries(he.current))
3267
+ (t = fe[n.slice(6)]) != null && t.length && (e[n] = r);
3268
+ j(e), P(1);
3268
3269
  },
3269
3270
  className: "h-7 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",
3270
3271
  "data-queue-empty-clear": !0,
@@ -3276,7 +3277,7 @@ function Dd({
3276
3277
  {
3277
3278
  type: "button",
3278
3279
  onClick: () => {
3279
- te("all"), K(1);
3280
+ te("all"), P(1);
3280
3281
  },
3281
3282
  className: "h-7 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",
3282
3283
  "data-queue-empty-all": !0,
@@ -3288,16 +3289,16 @@ function Dd({
3288
3289
  ),
3289
3290
  sort: B,
3290
3291
  onSortChange: (e) => {
3291
- Ge(e), K(1);
3292
+ Ge(e), P(1);
3292
3293
  },
3293
3294
  filterDefs: Hn,
3294
3295
  filterValues: _,
3295
3296
  onFilterChange: (e, t) => {
3296
- j((n) => ({ ...n, [e]: t })), K(1);
3297
+ j((n) => ({ ...n, [e]: t })), P(1);
3297
3298
  },
3298
- rowGroups: Ml ?? void 0,
3299
+ rowGroups: Bl ?? void 0,
3299
3300
  collapsedGroups: Ce,
3300
- onToggleGroup: Cl,
3301
+ onToggleGroup: $l,
3301
3302
  selectedIds: It && ne ? ie : void 0,
3302
3303
  onSelectionChange: It && ne ? it : void 0,
3303
3304
  hideFilterRow: !0,
@@ -3312,7 +3313,7 @@ function Dd({
3312
3313
  columnFilterRow: !0,
3313
3314
  hScrollProxy: !0,
3314
3315
  footer: /* @__PURE__ */ a(
3315
- wi,
3316
+ vi,
3316
3317
  {
3317
3318
  collections: Nt,
3318
3319
  selectedIds: String(_.at_risk_rule ?? "").split(",").map((e) => Number(e)).filter((e) => Number.isFinite(e) && e > 0),
@@ -3321,7 +3322,7 @@ function Dd({
3321
3322
  j((n) => ({
3322
3323
  ...n,
3323
3324
  at_risk_rule: n.at_risk_rule === t ? "" : t
3324
- })), K(1);
3325
+ })), P(1);
3325
3326
  },
3326
3327
  className: "shrink-0 border-t border-slate-100 bg-white px-3 py-1.5 dark:border-slate-800 dark:bg-slate-900"
3327
3328
  }
@@ -3331,22 +3332,22 @@ function Dd({
3331
3332
  ]
3332
3333
  }
3333
3334
  ) }) }) : C === "kanban" ? /* @__PURE__ */ a(
3334
- Mi,
3335
+ Di,
3335
3336
  {
3336
3337
  items: $,
3337
- onCardClick: (e) => Kn(e),
3338
- onDrop: (e, t) => bl.mutate({ item: e, targetState: t }),
3339
- onClaim: (e) => De.mutate(e),
3338
+ onCardClick: (e) => Pn(e),
3339
+ onDrop: (e, t) => fl.mutate({ item: e, targetState: t }),
3340
+ onClaim: (e) => Ke.mutate(e),
3340
3341
  onRelease: (e) => Ze.mutate(e),
3341
- swimlaneBy: ht,
3342
- stateLabels: An,
3343
- laneLabel: ht === "collection" ? at : void 0,
3342
+ swimlaneBy: ft,
3343
+ stateLabels: En,
3344
+ laneLabel: ft === "collection" ? at : void 0,
3344
3345
  claimsEnabled: ge,
3345
3346
  onDraggingChange: (e) => {
3346
- fn.current = e;
3347
+ hn.current = e;
3347
3348
  }
3348
3349
  }
3349
- ) : /* @__PURE__ */ a(Qi, { queueId: l })
3350
+ ) : /* @__PURE__ */ a(Bi, { queueId: l })
3350
3351
  ] }),
3351
3352
  It && ne && /* @__PURE__ */ d(
3352
3353
  Ki,
@@ -3363,7 +3364,7 @@ function Dd({
3363
3364
  busy: Rt,
3364
3365
  onClaim: () => Bn(
3365
3366
  "Claim",
3366
- (e) => h.request(
3367
+ (e) => f.request(
3367
3368
  ce(`/queues/${l}/claim`, {
3368
3369
  source_collection: e.collection,
3369
3370
  item_id: e.item_id
@@ -3372,7 +3373,7 @@ function Dd({
3372
3373
  ),
3373
3374
  onRelease: () => Bn(
3374
3375
  "Release",
3375
- (e) => h.request(
3376
+ (e) => f.request(
3376
3377
  ce(`/queues/${l}/release`, {
3377
3378
  source_collection: e.collection,
3378
3379
  item_id: e.item_id
@@ -3388,9 +3389,9 @@ function Dd({
3388
3389
  type: "button",
3389
3390
  onClick: () => {
3390
3391
  const e = Cs(
3391
- $.filter((t) => ie.includes(F(t)) && t.collection !== "tasks").map((t) => Y.urlFor(Dn(t)))
3392
+ $.filter((t) => ie.includes(F(t)) && t.collection !== "tasks").map((t) => Y.urlFor(Kn(t)))
3392
3393
  );
3393
- e.blocked > 0 || e.capped > 0 ? E.warning(Oa(e)) : E.success(Oa(e));
3394
+ e.blocked > 0 || e.capped > 0 ? A.warning(Oa(e)) : A.success(Oa(e));
3394
3395
  },
3395
3396
  "data-bulk-open-tabs": !0,
3396
3397
  title: `Open the selected records in new tabs (up to ${Ss})`,
@@ -3399,37 +3400,38 @@ function Dd({
3399
3400
  }
3400
3401
  ),
3401
3402
  /* @__PURE__ */ a(
3402
- Ws,
3403
+ Gs,
3403
3404
  {
3404
3405
  targets: $.filter((e) => ie.includes(F(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id, label: e.label })),
3405
3406
  enabledKeys: (p == null ? void 0 : p.bulk_action_keys) ?? null,
3406
3407
  tone: "light",
3407
3408
  disabled: Rt,
3408
3409
  onDone: (e) => {
3409
- e.failed === 0 && it([]), f.invalidateQueries({ queryKey: ["queue-items", l] });
3410
+ e.failed === 0 && it([]), h.invalidateQueries({ queryKey: ["queue-items", l] });
3410
3411
  }
3411
3412
  }
3412
3413
  ),
3413
3414
  Je("update-field") && /* @__PURE__ */ a(
3414
- Js,
3415
+ Hs,
3415
3416
  {
3416
3417
  targets: $.filter((e) => ie.includes(F(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
3417
3418
  disabled: Rt,
3418
- onDone: () => void f.invalidateQueries({ queryKey: ["queue-items", l] }),
3419
+ onDone: () => void h.invalidateQueries({ queryKey: ["queue-items", l] }),
3419
3420
  className: "rounded-md px-2.5 py-1 text-[12px] font-medium text-slate-600 hover:bg-slate-100 disabled:opacity-50 dark:text-slate-300 dark:hover:bg-muted"
3420
3421
  }
3421
3422
  ),
3422
3423
  Je("compare") && /* @__PURE__ */ a(
3423
- Hs,
3424
+ Ws,
3424
3425
  {
3425
3426
  targets: $.filter((e) => ie.includes(F(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
3426
- renderValue: (e, t, n) => {
3427
- var r;
3428
- return Xs(
3429
- ((r = $.find((o) => ie.includes(F(o)))) == null ? void 0 : r.collection) ?? "",
3427
+ renderValue: (e, t, n, r) => {
3428
+ var o;
3429
+ return zs(
3430
+ ((o = $.find((s) => ie.includes(F(s)))) == null ? void 0 : o.collection) ?? "",
3430
3431
  e,
3431
3432
  t,
3432
- n
3433
+ n,
3434
+ r
3433
3435
  );
3434
3436
  },
3435
3437
  disabled: Rt,
@@ -3437,7 +3439,7 @@ function Dd({
3437
3439
  }
3438
3440
  ),
3439
3441
  Je("message") && /* @__PURE__ */ a(
3440
- zs,
3442
+ Ys,
3441
3443
  {
3442
3444
  targets: $.filter((e) => ie.includes(F(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
3443
3445
  disabled: Rt,
@@ -3448,7 +3450,7 @@ function Dd({
3448
3450
  }
3449
3451
  ),
3450
3452
  W != null && W.length ? /* @__PURE__ */ a(
3451
- vi,
3453
+ ki,
3452
3454
  {
3453
3455
  collection: W[0].collection,
3454
3456
  itemId: W[0].itemId,
@@ -3460,7 +3462,7 @@ function Dd({
3460
3462
  onPush: (e) => ct.push([...W, e]),
3461
3463
  onPop: () => ct.back(),
3462
3464
  onClose: () => ct.back(W.length),
3463
- onOpenRecord: ql
3465
+ onOpenRecord: Rl
3464
3466
  }
3465
3467
  ) : null,
3466
3468
  U && Ta(
@@ -3478,23 +3480,23 @@ function Dd({
3478
3480
  "data-queue-row-menu": !0,
3479
3481
  children: [
3480
3482
  [
3481
- { label: "Open", run: () => Kn(U.row) },
3483
+ { label: "Open", run: () => Pn(U.row) },
3482
3484
  {
3483
3485
  label: "Open full record",
3484
3486
  run: () => lt(U.row)
3485
3487
  },
3486
- { label: "Peek", run: () => Pe(U.row) },
3488
+ { label: "Peek", run: () => De(U.row) },
3487
3489
  ...ge ? [
3488
- ((Ra = U.row.claimed_by) == null ? void 0 : Ra.id) === S ? { label: "Release claim", run: () => Ze.mutate(U.row) } : { label: "Claim", run: () => De.mutate(U.row) }
3490
+ ((Ra = U.row.claimed_by) == null ? void 0 : Ra.id) === S ? { label: "Release claim", run: () => Ze.mutate(U.row) } : { label: "Claim", run: () => Ke.mutate(U.row) }
3489
3491
  ] : [],
3490
3492
  // The friendly id (PW26-76166), never the row id (army 6 M52);
3491
3493
  // a record with no number has nothing to copy.
3492
- ...Da(U.row) ? [
3494
+ ...Ka(U.row) ? [
3493
3495
  {
3494
3496
  label: "Copy ID",
3495
3497
  run: () => {
3496
3498
  var e;
3497
- return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(Da(U.row) ?? ""));
3499
+ return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(Ka(U.row) ?? ""));
3498
3500
  }
3499
3501
  }
3500
3502
  ] : [],
@@ -3503,14 +3505,14 @@ function Dd({
3503
3505
  run: () => {
3504
3506
  var e;
3505
3507
  return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(
3506
- `${window.location.origin}${Y.urlFor(Dn(U.row))}`
3508
+ `${window.location.origin}${Y.urlFor(Kn(U.row))}`
3507
3509
  ));
3508
3510
  }
3509
3511
  },
3510
3512
  // Custom actions (#125): the record's registered actions, right here.
3511
- ...al(U.row.collection).map((e) => ({
3513
+ ...ll(U.row.collection).map((e) => ({
3512
3514
  label: e.label,
3513
- run: () => ll(e, U.row)
3515
+ run: () => ol(e, U.row)
3514
3516
  }))
3515
3517
  ].map((e) => /* @__PURE__ */ a(
3516
3518
  "button",
@@ -3580,7 +3582,7 @@ function Dd({
3580
3582
  ),
3581
3583
  pr && Ta(
3582
3584
  /* @__PURE__ */ a(
3583
- nc,
3585
+ tc,
3584
3586
  {
3585
3587
  queueId: l,
3586
3588
  drill: pr,
@@ -3595,35 +3597,35 @@ function Dd({
3595
3597
  /* @__PURE__ */ a(
3596
3598
  Pi,
3597
3599
  {
3598
- item: Ke,
3599
- stateLabels: An,
3600
+ item: Pe,
3601
+ stateLabels: En,
3600
3602
  collectionLabel: at,
3601
3603
  claimsEnabled: ge,
3602
- columnFormats: jl,
3604
+ columnFormats: Ul,
3603
3605
  fieldLabel: (e) => T(`extra.${e}`, Ve(e)),
3604
3606
  width: p == null ? void 0 : p.sheet_width,
3605
3607
  itemLayout: p == null ? void 0 : p.item_layout,
3606
3608
  onOpenRecord: (e) => lt(e),
3607
3609
  onOpenChange: (e) => {
3608
- e || (Pe(null), On(!1));
3610
+ e || (De(null), On(!1));
3609
3611
  },
3610
- onClaim: (e) => De.mutate(e),
3612
+ onClaim: (e) => Ke.mutate(e),
3611
3613
  onRelease: (e) => Ze.mutate(e),
3612
- workNextActive: $l,
3613
- onNext: () => Ke && Qr(Ke),
3614
- refetchItems: () => f.invalidateQueries({ queryKey: ["queue-items", l] })
3614
+ workNextActive: ql,
3615
+ onNext: () => Pe && Qr(Pe),
3616
+ refetchItems: () => h.invalidateQueries({ queryKey: ["queue-items", l] })
3615
3617
  }
3616
3618
  ),
3617
3619
  Wt.dialog
3618
3620
  ] });
3619
3621
  }
3620
- function nc({
3622
+ function tc({
3621
3623
  queueId: l,
3622
3624
  drill: k,
3623
- onClose: D,
3625
+ onClose: K,
3624
3626
  onOpenRecord: M
3625
3627
  }) {
3626
- const Z = Qa(), { data: f, isLoading: h } = X({
3628
+ const Z = ja(), { data: h, isLoading: f } = X({
3627
3629
  queryKey: ["queue-agg-rows", l, k.row.collection, k.row.item_id, k.path],
3628
3630
  queryFn: () => Z.request(
3629
3631
  O(`/queues/${l}/aggregate-rows`, {
@@ -3637,7 +3639,7 @@ function nc({
3637
3639
  "div",
3638
3640
  {
3639
3641
  className: "fixed inset-0 z-[130] flex items-center justify-center bg-black/30 p-6",
3640
- onClick: D,
3642
+ onClick: K,
3641
3643
  children: /* @__PURE__ */ d(
3642
3644
  "div",
3643
3645
  {
@@ -3659,18 +3661,18 @@ function nc({
3659
3661
  "button",
3660
3662
  {
3661
3663
  type: "button",
3662
- onClick: D,
3664
+ onClick: K,
3663
3665
  className: "rounded-md px-2 py-1 text-[12px] text-slate-400 hover:bg-muted",
3664
3666
  children: "✕"
3665
3667
  }
3666
3668
  )
3667
3669
  ] }),
3668
- h ? /* @__PURE__ */ a("p", { className: "py-6 text-center text-[12.5px] text-slate-400", children: "Loading…" }) : ((f == null ? void 0 : f.rows) ?? []).length === 0 ? /* @__PURE__ */ a("p", { className: "py-6 text-center text-[12.5px] text-slate-400", children: "No contributing rows resolved." }) : /* @__PURE__ */ a("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: f == null ? void 0 : f.rows.map((S) => /* @__PURE__ */ d("li", { className: "flex items-center justify-between gap-3 py-1.5", children: [
3670
+ f ? /* @__PURE__ */ a("p", { className: "py-6 text-center text-[12.5px] text-slate-400", children: "Loading…" }) : ((h == null ? void 0 : h.rows) ?? []).length === 0 ? /* @__PURE__ */ a("p", { className: "py-6 text-center text-[12.5px] text-slate-400", children: "No contributing rows resolved." }) : /* @__PURE__ */ a("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: h == null ? void 0 : h.rows.map((S) => /* @__PURE__ */ d("li", { className: "flex items-center justify-between gap-3 py-1.5", children: [
3669
3671
  /* @__PURE__ */ a(
3670
3672
  "button",
3671
3673
  {
3672
3674
  type: "button",
3673
- onClick: () => f.target && M(f.target, String(S.id)),
3675
+ onClick: () => h.target && M(h.target, String(S.id)),
3674
3676
  className: "min-w-0 truncate text-left text-[12.5px] underline decoration-dotted underline-offset-2 hover:text-nvr-navy dark:hover:text-nvr-cyan",
3675
3677
  children: S.label
3676
3678
  }
@@ -3684,5 +3686,5 @@ function nc({
3684
3686
  );
3685
3687
  }
3686
3688
  export {
3687
- Dd as QueueWorklist
3689
+ Od as QueueWorklist
3688
3690
  };