@nivaro/react 0.3.111 → 0.3.113

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 (77) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +207 -3
  4. package/dist/index.js +745 -728
  5. package/dist/shared/components/CollectionBrowserView.js +3133 -2954
  6. package/dist/shared/components/CollectionImportBanner.js +135 -0
  7. package/dist/shared/components/ItemEditForm.js +2235 -2218
  8. package/dist/shared/components/JobsTray.js +54 -47
  9. package/dist/shared/components/ViewAsPersonButton.js +109 -0
  10. package/dist/shared/components/bulk/BulkFieldUpdate.js +228 -150
  11. package/dist/shared/components/bulk/BulkFieldUpdateButton.js +35 -41
  12. package/dist/shared/components/bulk/BulkLinksValue.js +91 -0
  13. package/dist/shared/components/bulk/bulk-field-options.js +20 -19
  14. package/dist/shared/components/bulk/bulk-update-preview.js +39 -0
  15. package/dist/shared/components/cbv/ColumnHeaderMenu.js +130 -0
  16. package/dist/shared/components/cbv/column-totals.js +163 -0
  17. package/dist/shared/components/collections-directory/CollectionHoverCard.js +108 -81
  18. package/dist/shared/components/collections-directory/CollectionRow.js +164 -148
  19. package/dist/shared/components/collections-directory/CollectionsDirectory.js +167 -166
  20. package/dist/shared/components/collections-directory/directory-data.js +70 -58
  21. package/dist/shared/components/imports/CollectionImportPanel.js +120 -118
  22. package/dist/shared/components/imports/DefinitionsPanel.js +24 -24
  23. package/dist/shared/components/imports/ImportDuplicatesNotice.js +65 -0
  24. package/dist/shared/components/item-edit/CatalogPickerField.js +631 -639
  25. package/dist/shared/components/item-edit/DuplicateNotice.js +168 -0
  26. package/dist/shared/components/item-edit/FieldRow.js +248 -246
  27. package/dist/shared/components/item-edit/InlineGridField.js +34 -33
  28. package/dist/shared/components/item-edit/InlineTableField.js +3002 -2825
  29. package/dist/shared/components/item-edit/MembershipSetField.js +165 -169
  30. package/dist/shared/components/item-edit/NestedRelationEditor.js +184 -189
  31. package/dist/shared/components/item-edit/PlanGrid.js +2 -1
  32. package/dist/shared/components/item-edit/QuickPickerDialog.js +35 -34
  33. package/dist/shared/components/item-edit/RecordLiveSync.js +32 -30
  34. package/dist/shared/components/item-edit/RelationCombobox.js +101 -100
  35. package/dist/shared/components/item-edit/RowHistorySheet.js +28 -27
  36. package/dist/shared/components/item-edit/SummaryPanel.js +133 -135
  37. package/dist/shared/components/item-edit/UserChip.js +262 -239
  38. package/dist/shared/components/item-edit/ViewAsRole.js +129 -52
  39. package/dist/shared/components/item-edit/grid-search.js +375 -0
  40. package/dist/shared/components/item-edit/render-stability.js +61 -54
  41. package/dist/shared/components/notifications/NotificationRulesEditor.js +25 -20
  42. package/dist/shared/components/ops-report/DigestSections.js +163 -144
  43. package/dist/shared/components/ops-report/drill.js +97 -97
  44. package/dist/shared/components/panels/AddendumLinesDiff.js +52 -51
  45. package/dist/shared/components/panels/AddendumPanel.js +92 -91
  46. package/dist/shared/components/panels/AsyncUserPicker.js +108 -0
  47. package/dist/shared/components/panels/CommentPanel.js +265 -252
  48. package/dist/shared/components/panels/OwnersSlot.js +47 -35
  49. package/dist/shared/components/panels/PipelineInsight.js +186 -0
  50. package/dist/shared/components/panels/PipelinePanel.js +1440 -1397
  51. package/dist/shared/components/panels/RecordIntegrityBanner.js +39 -38
  52. package/dist/shared/components/panels/RevisionsPanel.js +261 -260
  53. package/dist/shared/components/panels/StandInReason.js +69 -0
  54. package/dist/shared/components/pipeline/FieldPicker.js +41 -40
  55. package/dist/shared/components/pipeline/OwnerMatrix.js +829 -700
  56. package/dist/shared/components/pipeline/OwnerRecordTrial.js +362 -0
  57. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -467
  58. package/dist/shared/components/pipeline/PipelineStateOwners.js +65 -64
  59. package/dist/shared/components/pipeline/owner-matrix-draft.js +178 -0
  60. package/dist/shared/components/profile/MyDefaultsCard.js +36 -35
  61. package/dist/shared/components/profile/PersonHeader.js +29 -29
  62. package/dist/shared/components/profile/PersonProfile.js +30 -28
  63. package/dist/shared/components/profile/SlowScreensCard.js +286 -0
  64. package/dist/shared/components/queue/QueueWorklist.js +1090 -1071
  65. package/dist/shared/components/quick-filters/useQuickFilterEditing.js +45 -44
  66. package/dist/shared/components/support/TicketDetailSheet.js +25 -16
  67. package/dist/shared/components/support/TicketSlowScreens.js +32 -0
  68. package/dist/shared/lib/activity-sentence.js +224 -178
  69. package/dist/shared/lib/collection-import-banner.js +27 -0
  70. package/dist/shared/lib/crash-report.js +112 -0
  71. package/dist/shared/lib/export-runs.js +99 -0
  72. package/dist/shared/lib/jobs-tray.js +89 -67
  73. package/dist/shared/lib/list-link.js +76 -69
  74. package/dist/shared/lib/nav-trail.js +180 -76
  75. package/dist/shared/lib/query-keys.js +26 -0
  76. package/dist/shared/lib/view-as.js +16 -11
  77. package/package.json +1 -1
@@ -1,101 +1,103 @@
1
- import { jsxs as d, Fragment as Se, jsx as r } from "react/jsx-runtime";
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 Ve } 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 Do, Pin as Po, 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 P, useMemo as J } from "react";
8
- import { createPortal as Ta } from "react-dom";
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 Ie } from "../../lib/format-value.js";
21
- import { createCursorBook as ls, pageRequest as os, noteNextCursor as ss } from "../../lib/keyset-pager.js";
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 fs, encodeListLink as hs, replaceListLinkParam as gs } from "../../lib/list-link.js";
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 At } from "../../lib/live.js";
26
- import { useRowChanges as ws, useRowLocksByCollection as _s, lockLabel as Ns } from "../../lib/live-list.js";
27
- import { OPEN_IN_TABS_CAP as Ss, openInTabs as Cs, openInTabsMessage as Oa } from "../../lib/open-in-tabs.js";
28
- import { isOwnWrite as $s } from "../../lib/own-writes.js";
29
- import { usePrefetchIntent as qs } from "../../lib/prefetch.js";
30
- import { useRowPresence as Rs, rowPresenceKey as Fs } from "../../lib/presence-hooks.js";
31
- import { buildGroups as Ls } from "../../lib/queue-grouping.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";
1
+ import { jsxs as d, Fragment as Ce, jsx as r } from "react/jsx-runtime";
2
+ import { useSensors as vo, useSensor as wo, PointerSensor as _o, DndContext as No, closestCenter as So } from "@dnd-kit/core";
3
+ import { SortableContext as Co, verticalListSortingStrategy as $o, arrayMove as qo, useSortable as Ro } from "@dnd-kit/sortable";
4
+ import { CSS as Fo } from "@dnd-kit/utilities";
5
+ import { useQueryClient as To, useQuery as X, useMutation as Ae, useQueries as Ge } from "@tanstack/react-query";
6
+ import { AlertTriangle as Lo, FileDiff as Ao, RefreshCw as Eo, Rows3 as Oa, Flame as Oo, Sparkles as Do, Download as Ko, BarChart3 as Po, SlidersHorizontal as Mo, ListChecks as Bo, Rows4 as Qo, Rows2 as jo, Play as Uo, Plus as on, ChevronDown as Da, Star as Vo, Pin as Io, Loader2 as Go, Check as Wo, Save as Ho, Bell as Jo, Inbox as Yo, GripVertical as zo } from "lucide-react";
7
+ import { useState as w, useRef as Q, useEffect as K, useMemo as Y } from "react";
8
+ import { createPortal as Ka } from "react-dom";
9
+ import { toast as O } from "sonner";
10
+ import { useNivaroClient as Ha, useItemEditAuth as Pa, useItemNavigation as Xo, useNavigation as Zo, useOverlayState as es } from "../../context.js";
11
+ import { useDebounced as ts } from "../../hooks/useDebounced.js";
12
+ import { useElapsedLoading as ns } from "../../hooks/useElapsedLoading.js";
13
+ import { useSlowReason as rs } from "../../hooks/useSlowReason.js";
14
+ import { useBulkProgressFeed as as } from "../../lib/bulk-progress.js";
15
+ import { get as D, post as ue, patch as Ma, del as Xn, put as ls } from "../../lib/commands.js";
16
+ import { deepenForLightSurface as os } from "../../lib/display-prefs.js";
17
+ import { evaluateExpression as ss } from "../../lib/expression.js";
18
+ import { clauseFromControlValue as is, filterSentence as cs } from "../../lib/filter-sentence.js";
19
+ import { deliverLive as ds, releaseLiveOwner as us } from "../../lib/focus-mode.js";
20
+ import { formatMultiValue as We } from "../../lib/format-value.js";
21
+ import { createCursorBook as ms, pageRequest as ps, noteNextCursor as bs } from "../../lib/keyset-pager.js";
22
+ import { normalizeInlineEdit as fs, inlineM2oTarget as hs, inlineChoices as gs, inlineEditFor as xs, nextInlineKey as ys } from "../../lib/list-inline-edit.js";
23
+ import { sanitizeQueueLinkState as ks, readListLinkFromLocation as vs, dropListLinkParam as ws, encodeListLink as _s, replaceListLinkParam as Ns } from "../../lib/list-link.js";
24
+ import { arrivedByListReturn as Ss, historyKey as Cs, ensureHistoryKey as $s } from "../../lib/list-page-memory.js";
25
+ import { expandCoalesced as qs, LIVE_ASPECTS as Et } from "../../lib/live.js";
26
+ import { useRowChanges as Rs, useRowLocksByCollection as Fs, lockLabel as Ts } from "../../lib/live-list.js";
27
+ import { listTrailDetail as Ls, setTrailDetail as As } from "../../lib/nav-trail.js";
28
+ import { OPEN_IN_TABS_CAP as Es, openInTabs as Os, openInTabsMessage as Ba } from "../../lib/open-in-tabs.js";
29
+ import { isOwnWrite as Ds } from "../../lib/own-writes.js";
30
+ import { usePrefetchIntent as Ks } from "../../lib/prefetch.js";
31
+ import { useRowPresence as Ps, rowPresenceKey as Ms } from "../../lib/presence-hooks.js";
32
+ import { queryKeys as Bs } from "../../lib/query-keys.js";
33
+ import { buildGroups as Qs } from "../../lib/queue-grouping.js";
34
+ import { cascadeFilter as js, fetchCascadeRelations as Us } from "../../lib/quick-filter-cascade.js";
35
+ import { useOptionalRealtime as Vs } from "../../lib/realtime.js";
36
+ import { copyIdText as Qa } from "../../lib/record-ref.js";
37
+ import { rowHighlightTextClass as Is, rowHighlightClass as Gs } from "../../lib/row-highlight.js";
36
38
  import { userErrorMessage as ut } from "../../lib/safe-error.js";
37
- import { useMyScopes as Ds, matchScopeDimension as Ps } from "../../lib/use-my-scopes.js";
38
- import { useNewItemLayouts as Ms } from "../../lib/use-new-item-layouts.js";
39
- import { formatNumber as ee, cn as L, formatDateTime as Da, 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 Pa } 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
- import { TickerNumber as Zn } from "../TickerNumber.js";
65
- import { UnseenDot as _i } from "../UnseenDot.js";
66
- import { Badge as Ni } from "../ui/badge.js";
67
- import { Checkbox as er } from "../ui/checkbox.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";
39
+ import { useMyScopes as Ws, matchScopeDimension as Hs } from "../../lib/use-my-scopes.js";
40
+ import { useNewItemLayouts as Js } from "../../lib/use-new-item-layouts.js";
41
+ import { formatNumber as ee, cn as T, formatDateTime as ja, titleCase as Zn, humanHours as Ys, formatRelative as zs, formatDate as Xs } from "../../lib/utils.js";
42
+ import { usePublishAskContext as Zs, useAskRecordDrag as ei } from "../ai/ask-context.js";
43
+ import { useBuiltinGate as ti, BulkActionButtons as ni } from "../bulk/BulkActionButtons.js";
44
+ import { BulkCompareButton as ri } from "../bulk/BulkCompareButton.js";
45
+ import { BulkFieldUpdateButton as ai } from "../bulk/BulkFieldUpdateButton.js";
46
+ import { BulkRowMark as li } from "../bulk/BulkRowMark.js";
47
+ import { BulkMessageButton as oi } from "../bulk/MessageStakeholders.js";
48
+ import { compareCell as si, RowActionsMenu as ii, roleMayUpdate as ci } from "../CollectionBrowserView.js";
49
+ import { DataTable as di } from "../DataTable.js";
50
+ import { EmptyState as ui } from "../EmptyState.js";
51
+ import { FocusModeToggle as mi } from "../FocusModeToggle.js";
52
+ import { FulfilmentPill as pi, FULFILMENT_FILTER_OPTIONS as bi } from "../FulfilmentPill.js";
53
+ import { ImportFromFileButton as fi } from "../import/ImportFromFileButton.js";
54
+ import { IntegrationDots as hi, INTEGRATIONS_FILTER_OPTIONS as gi } from "../integrations/IntegrationDots.js";
55
+ import { IntegrationsFilterPill as xi } from "../integrations/IntegrationsFilterPill.js";
56
+ import { readQueueReturn as yi, queueReturnApplies as ki, writeQueueReturn as Ua } from "../item-edit/QueueReturnChip.js";
57
+ import { ListLoadError as vi } from "../ListLoadError.js";
58
+ import { LiveRowMark as wi } from "../LiveRowMark.js";
59
+ import { CopyListLinkButton as _i } from "../list/CopyListLinkButton.js";
60
+ import { useInlineEdit as Ni, InlineEditCell as Si } from "../list/InlineEdit.js";
61
+ import { usePickerExcludedRows as Ci, PICKER_EXCLUDED_ROW_CLASS as $i, PICKER_EXCLUDED_TITLE as qi } from "../PickerExcludedRows.js";
62
+ import { RealtimeStaleMark as Ri } from "../RealtimeStatusBanner.js";
63
+ import { RecordDrilldownSheet as Fi } from "../RecordDrilldownSheet.js";
64
+ import { RowHighlightLegend as Ti } from "../RowHighlightLegend.js";
65
+ import { RowPresence as Li } from "../RowPresence.js";
66
+ import { TickerNumber as er } from "../TickerNumber.js";
67
+ import { UnseenDot as Ai } from "../UnseenDot.js";
68
+ import { Badge as Ei } from "../ui/badge.js";
69
+ import { Checkbox as tr } from "../ui/checkbox.js";
70
+ import { Command as Va, CommandInput as Oi, CommandList as Ia, CommandEmpty as Di, CommandItem as Ot } from "../ui/command.js";
71
+ import { Label as Ki } from "../ui/label.js";
70
72
  import { Popover as mt, PopoverTrigger as pt, PopoverContent as bt } from "../ui/popover.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
- import { QueueBulkBar as Ki } from "./QueueBulkBar.js";
78
- import { QueueBulkMove as Di } from "./QueueBulkMove.js";
79
- import { QueueItemSheet as Pi } from "./QueueItemSheet.js";
80
- import { QueueKanbanBoard as Mi } from "./QueueKanbanBoard.js";
81
- import { QueueQuickFilters as Bi } from "./QueueQuickFilters.js";
82
- import { QueueWorkloadView as Qi } from "./QueueWorkloadView.js";
83
- import { useTransitionNote as ji, needsTransitionNote as Ui } from "./transition-note.js";
84
- import { worklistCsv as Vi, worklistCsvName as Ii } from "./worklist-csv.js";
85
- import { extraChoiceText as Kt, atRiskBreakdown as Qa, worklistKeyTarget as Gi } from "./worklist-helpers.js";
86
- function Wi({ summary: l }) {
73
+ import { Skeleton as Pi } from "../ui/skeleton.js";
74
+ import { dedupeChooserKeys as Mi } from "./column-chooser.js";
75
+ import { groupSumPathsFor as Bi } from "./group-sums.js";
76
+ import { offscreenPill as Qi, statsOutrunRows as ji, stateAspectEffect as Ui } from "./live-state-aspect.js";
77
+ import { OwnerAvatars as Vi } from "./OwnerAvatars.js";
78
+ import { pathHeader as Ii } from "./path-label.js";
79
+ import { QueueBulkBar as Gi } from "./QueueBulkBar.js";
80
+ import { QueueBulkMove as Wi } from "./QueueBulkMove.js";
81
+ import { QueueItemSheet as Hi } from "./QueueItemSheet.js";
82
+ import { QueueKanbanBoard as Ji } from "./QueueKanbanBoard.js";
83
+ import { QueueQuickFilters as Yi } from "./QueueQuickFilters.js";
84
+ import { QueueWorkloadView as zi } from "./QueueWorkloadView.js";
85
+ import { useTransitionNote as Xi, needsTransitionNote as Zi } from "./transition-note.js";
86
+ import { worklistCsv as ec, worklistCsvName as tc } from "./worklist-csv.js";
87
+ import { extraChoiceText as Dt, atRiskBreakdown as Ga, worklistKeyTarget as nc } from "./worklist-helpers.js";
88
+ function rc({ summary: l }) {
87
89
  if (!l || l.count === 0)
88
90
  return /* @__PURE__ */ r("span", { className: "text-slate-300 dark:text-muted-foreground", children: "—" });
89
- const k = [l.last_from, l.last_to].filter(Boolean).join(" → "), K = [
91
+ const k = [l.last_from, l.last_to].filter(Boolean).join(" → "), P = [
90
92
  k ? `Last: ${k}` : null,
91
- l.last_at ? Qs(l.last_at) : null,
93
+ l.last_at ? zs(l.last_at) : null,
92
94
  l.last_reason ? `“${l.last_reason}”` : "no reason given"
93
95
  ].filter(Boolean).join(" · ");
94
96
  return /* @__PURE__ */ d(
95
97
  "span",
96
98
  {
97
99
  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",
98
- "data-tip": K,
100
+ "data-tip": P,
99
101
  "data-send-backs": l.count,
100
102
  children: [
101
103
  /* @__PURE__ */ d("span", { className: "tabular-nums", children: [
@@ -110,20 +112,20 @@ function Wi({ summary: l }) {
110
112
  }
111
113
  );
112
114
  }
113
- const Hi = 50, sn = "nivaro_addendums", Ji = [
115
+ const ac = 50, sn = "nivaro_addendums", Wa = [
114
116
  { value: "mine", label: "My Items" },
115
117
  { value: "unowned", label: "No Owners" },
116
118
  { value: "claimed", label: "Claimed by me" },
117
119
  { value: "all", label: "All Items" }
118
120
  ];
119
- function Yi({ summary: l }) {
121
+ function lc({ summary: l }) {
120
122
  if (!l || l.total === 0) return /* @__PURE__ */ r("span", { className: "text-slate-300", children: "—" });
121
- 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;
123
+ const k = l.active > 0, P = l.latest_status === "review" ? "in review" : l.latest_status ?? "active", B = l.cost_impact, Z = B != null && B !== 0 ? `${B > 0 ? "+" : "−"}$${Math.abs(B).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null;
122
124
  return /* @__PURE__ */ d(
123
125
  "span",
124
126
  {
125
127
  title: l.latest_title ?? void 0,
126
- className: L(
128
+ className: T(
127
129
  "inline-flex max-w-[220px] items-center gap-1.5 truncate rounded-full border px-2 py-0.5 text-[11px] font-medium",
128
130
  k ? "border-amber-300 bg-amber-50 text-amber-800 dark:border-amber-500/50 dark:bg-amber-500/10 dark:text-amber-300" : "border-slate-200 bg-slate-50 text-slate-600 dark:border-border dark:bg-muted dark:text-slate-300"
129
131
  ),
@@ -132,13 +134,13 @@ function Yi({ summary: l }) {
132
134
  "span",
133
135
  {
134
136
  "aria-hidden": !0,
135
- className: L(
137
+ className: T(
136
138
  "h-1.5 w-1.5 shrink-0 rounded-full",
137
139
  k ? "bg-amber-500" : "bg-slate-400"
138
140
  )
139
141
  }
140
142
  ),
141
- k ? `${l.active} ${l.active === 1 ? "addendum" : "addendums"} ${K}` : `${l.total} ${K}`,
143
+ k ? `${l.active} ${l.active === 1 ? "addendum" : "addendums"} ${P}` : `${l.total} ${P}`,
142
144
  Z && /* @__PURE__ */ d("span", { className: "tabular-nums opacity-80", children: [
143
145
  "· ",
144
146
  Z
@@ -147,39 +149,39 @@ function Yi({ summary: l }) {
147
149
  }
148
150
  );
149
151
  }
150
- function zi(l) {
151
- return Bs(l);
152
+ function oc(l) {
153
+ return Ys(l);
152
154
  }
153
- function Xi({ status: l }) {
154
- return l ? /* @__PURE__ */ r("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__ */ r("span", { className: "text-slate-300", children: "—" });
155
+ function sc({ status: l }) {
156
+ return l ? /* @__PURE__ */ r("span", { className: T("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__ */ r("span", { className: "text-slate-300", children: "—" });
155
157
  }
156
- function Zi({ points: l, inline: k = !1 }) {
158
+ function ic({ points: l, inline: k = !1 }) {
157
159
  if (l.length < 2) return null;
158
- const K = k ? 40 : 64, M = k ? 14 : 18, Z = Math.max(...l), f = Math.min(...l), h = Z - f || 1, S = K / (l.length - 1), Y = l.map(
159
- (de, g) => `${g === 0 ? "M" : "L"}${(g * S).toFixed(1)},${(M - 2 - (de - f) / h * (M - 4)).toFixed(1)}`
160
+ const P = k ? 40 : 64, B = k ? 14 : 18, Z = Math.max(...l), f = Math.min(...l), h = Z - f || 1, S = P / (l.length - 1), z = l.map(
161
+ (me, g) => `${g === 0 ? "M" : "L"}${(g * S).toFixed(1)},${(B - 2 - (me - f) / h * (B - 4)).toFixed(1)}`
160
162
  ).join(" ");
161
163
  return /* @__PURE__ */ r(
162
164
  "svg",
163
165
  {
164
- width: K,
165
- height: M,
166
+ width: P,
167
+ height: B,
166
168
  className: k ? "opacity-40" : "mt-1.5 opacity-40",
167
169
  "aria-hidden": "true",
168
- children: /* @__PURE__ */ r("path", { d: Y, fill: "none", stroke: "currentColor", strokeWidth: "1.5" })
170
+ children: /* @__PURE__ */ r("path", { d: z, fill: "none", stroke: "currentColor", strokeWidth: "1.5" })
169
171
  }
170
172
  );
171
173
  }
172
- function Dt({
174
+ function Kt({
173
175
  label: l,
174
176
  count: k,
175
- filteredCount: K,
176
- active: M,
177
+ filteredCount: P,
178
+ active: B,
177
179
  isLoading: Z,
178
180
  tone: f,
179
181
  trend: h,
180
182
  delta: S,
181
- deltaBadIsUp: Y,
182
- breakdown: de,
183
+ deltaBadIsUp: z,
184
+ breakdown: me,
183
185
  onClick: g
184
186
  }) {
185
187
  return /* @__PURE__ */ r(
@@ -187,59 +189,59 @@ function Dt({
187
189
  {
188
190
  type: "button",
189
191
  onClick: g,
190
- "aria-pressed": M,
192
+ "aria-pressed": B,
191
193
  "aria-label": [
192
- K != null ? `${ee(K)} of ${ee(k)} ${l}` : `${ee(k)} ${l}`,
193
- de || null,
194
+ P != null ? `${ee(P)} of ${ee(k)} ${l}` : `${ee(k)} ${l}`,
195
+ me || null,
194
196
  S != null && S !== 0 ? `${S > 0 ? "up" : "down"} ${ee(Math.abs(S))} since the last daily count` : null
195
197
  ].filter(Boolean).join(", "),
196
- className: L(
198
+ className: T(
197
199
  "nvr-section-enter flex items-center gap-1.5 bg-white px-3 py-2 text-left transition-colors hover:bg-slate-50 dark:bg-card dark:hover:bg-card/80",
198
200
  // Grows to fill its row when the strip wraps on a narrow screen (army 9 b08 N-R9-7).
199
201
  "grow justify-center sm:justify-start",
200
- M && "bg-nvr-cyan/5 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/10"
202
+ B && "bg-nvr-cyan/5 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/10"
201
203
  ),
202
- children: Z ? /* @__PURE__ */ r(qi, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(Se, { children: [
204
+ children: Z ? /* @__PURE__ */ r(Pi, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(Ce, { children: [
203
205
  /* @__PURE__ */ r(
204
206
  "span",
205
207
  {
206
- className: L(
208
+ className: T(
207
209
  "flex items-baseline gap-1 text-[15px] font-semibold leading-none tabular-nums",
208
- k === 0 && !M ? "text-slate-500 dark:text-slate-400" : "text-slate-900 dark:text-foreground"
210
+ k === 0 && !B ? "text-slate-500 dark:text-slate-400" : "text-slate-900 dark:text-foreground"
209
211
  ),
210
- children: K != null ? /* @__PURE__ */ d(Se, { children: [
211
- /* @__PURE__ */ r("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ r(Zn, { value: K, format: ee }) }),
212
+ children: P != null ? /* @__PURE__ */ d(Ce, { children: [
213
+ /* @__PURE__ */ r("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ r(er, { value: P, format: ee }) }),
212
214
  /* @__PURE__ */ d("span", { className: "text-[11px] font-medium text-slate-500 dark:text-slate-400", children: [
213
215
  "/ ",
214
- /* @__PURE__ */ r(Zn, { value: k, format: ee })
216
+ /* @__PURE__ */ r(er, { value: k, format: ee })
215
217
  ] })
216
- ] }) : /* @__PURE__ */ r(Zn, { value: k, format: ee })
218
+ ] }) : /* @__PURE__ */ r(er, { value: k, format: ee })
217
219
  }
218
220
  ),
219
221
  /* @__PURE__ */ r(
220
222
  "span",
221
223
  {
222
- className: L(
224
+ className: T(
223
225
  "whitespace-nowrap text-[11px] font-medium leading-none",
224
226
  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"
225
227
  ),
226
228
  children: l
227
229
  }
228
230
  ),
229
- de && /* @__PURE__ */ r(
231
+ me && /* @__PURE__ */ r(
230
232
  "span",
231
233
  {
232
234
  "data-stat-breakdown": !0,
233
235
  className: "whitespace-nowrap text-[11px] leading-none text-slate-600 dark:text-slate-300",
234
- children: de
236
+ children: me
235
237
  }
236
238
  ),
237
239
  S != null && S !== 0 && /* @__PURE__ */ d(
238
240
  "span",
239
241
  {
240
- className: L(
242
+ className: T(
241
243
  "text-[10px] font-medium leading-none",
242
- Y ? S > 0 ? "text-red-700 dark:text-red-400" : "text-emerald-700 dark:text-emerald-400" : "text-slate-500 dark:text-slate-400"
244
+ z ? S > 0 ? "text-red-700 dark:text-red-400" : "text-emerald-700 dark:text-emerald-400" : "text-slate-500 dark:text-slate-400"
243
245
  ),
244
246
  children: [
245
247
  S > 0 ? "↑" : "↓",
@@ -247,16 +249,16 @@ function Dt({
247
249
  ]
248
250
  }
249
251
  ),
250
- h && k > 0 && /* @__PURE__ */ r(Zi, { points: h, inline: !0 })
252
+ h && k > 0 && /* @__PURE__ */ r(ic, { points: h, inline: !0 })
251
253
  ] })
252
254
  }
253
255
  );
254
256
  }
255
- function ec({
257
+ function cc({
256
258
  label: l,
257
259
  count: k,
258
- filteredCount: K,
259
- color: M,
260
+ filteredCount: P,
261
+ color: B,
260
262
  active: Z,
261
263
  onClick: f
262
264
  }) {
@@ -265,7 +267,7 @@ function ec({
265
267
  {
266
268
  type: "button",
267
269
  onClick: f,
268
- className: L(
270
+ className: T(
269
271
  "flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[12px] font-medium transition-colors",
270
272
  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"
271
273
  ),
@@ -274,12 +276,12 @@ function ec({
274
276
  "span",
275
277
  {
276
278
  className: "h-2 w-2 shrink-0 rounded-full",
277
- style: { backgroundColor: M ?? "#94a3b8" }
279
+ style: { backgroundColor: B ?? "#94a3b8" }
278
280
  }
279
281
  ),
280
282
  l,
281
- /* @__PURE__ */ r("span", { className: "font-semibold tabular-nums text-slate-900 dark:text-foreground", children: K != null ? /* @__PURE__ */ d(Se, { children: [
282
- /* @__PURE__ */ r("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: ee(K) }),
283
+ /* @__PURE__ */ r("span", { className: "font-semibold tabular-nums text-slate-900 dark:text-foreground", children: P != null ? /* @__PURE__ */ d(Ce, { children: [
284
+ /* @__PURE__ */ r("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: ee(P) }),
283
285
  /* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
284
286
  " / ",
285
287
  ee(k)
@@ -289,19 +291,19 @@ function ec({
289
291
  }
290
292
  );
291
293
  }
292
- const Ge = Oi;
293
- function tc({
294
+ const He = Ii;
295
+ function dc({
294
296
  id: l,
295
297
  label: k,
296
- checked: K,
297
- onCheckedChange: M
298
+ checked: P,
299
+ onCheckedChange: B
298
300
  }) {
299
- const { attributes: Z, listeners: f, setNodeRef: h, transform: S, transition: Y, isDragging: de } = wo({
301
+ const { attributes: Z, listeners: f, setNodeRef: h, transform: S, transition: z, isDragging: me } = Ro({
300
302
  id: l
301
303
  }), g = {
302
- transform: _o.Transform.toString(S),
303
- transition: Y,
304
- opacity: de ? 0.4 : 1
304
+ transform: Fo.Transform.toString(S),
305
+ transition: z,
306
+ opacity: me ? 0.4 : 1
305
307
  }, te = `col-toggle-${l}`;
306
308
  return /* @__PURE__ */ d("div", { ref: h, style: g, className: "flex items-center gap-2 text-[12px]", children: [
307
309
  /* @__PURE__ */ r(
@@ -310,48 +312,48 @@ function tc({
310
312
  ...Z,
311
313
  ...f,
312
314
  className: "cursor-grab text-slate-300 hover:text-slate-500 dark:text-muted-foreground",
313
- children: /* @__PURE__ */ r(Vo, { className: "h-3.5 w-3.5" })
315
+ children: /* @__PURE__ */ r(zo, { className: "h-3.5 w-3.5" })
314
316
  }
315
317
  ),
316
- /* @__PURE__ */ r(er, { id: te, checked: K, onCheckedChange: M }),
317
- /* @__PURE__ */ r($i, { htmlFor: te, className: "cursor-pointer text-[12px] font-normal", children: k })
318
+ /* @__PURE__ */ r(tr, { id: te, checked: P, onCheckedChange: B }),
319
+ /* @__PURE__ */ r(Ki, { htmlFor: te, className: "cursor-pointer text-[12px] font-normal", children: k })
318
320
  ] });
319
321
  }
320
- function Dd({
322
+ function Hd({
321
323
  queueId: l,
322
324
  realtime: k,
323
- renderError: K,
324
- hideCreateActions: M = !1,
325
+ renderError: P,
326
+ hideCreateActions: B = !1,
325
327
  onAsk: Z
326
328
  }) {
327
- var pa, ba, fa, ha, ga, xa, ya, ka, va, wa, _a, Na, Sa, Ca, $a, qa, Ra;
328
- const f = No(), h = ja(), { userId: S } = Ea(), Y = Io(), { navigate: de } = Go(), [g, te] = w("all"), [ue, D] = w(1), tr = Q(ls()), [Pt, Ua] = w(() => {
329
+ var fa, ha, ga, xa, ya, ka, va, wa, _a, Na, Sa, Ca, $a, qa, Ra, Fa, Ta, La, Aa, Ea;
330
+ const f = To(), h = Ha(), { userId: S } = Pa(), z = Xo(), { navigate: me } = Zo(), [g, te] = w("all"), [se, M] = w(1), nr = Q(ms()), [Pt, Ja] = w(() => {
329
331
  try {
330
332
  return localStorage.getItem("nvr_table_density") === "comfortable" ? "comfortable" : "compact";
331
333
  } catch {
332
334
  return "compact";
333
335
  }
334
- }), [$, We] = w("table"), [B, He] = w(""), [_, j] = w({}), [Mt, nr] = w(() => /* @__PURE__ */ new Set()), [R, ft] = w(null), [Ce, cn] = w(/* @__PURE__ */ new Set()), [ht, dn] = w(null), [Je, 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");
336
+ }), [$, Je] = w("table"), [j, Ye] = w(""), [_, U] = w({}), [Mt, rr] = w(() => /* @__PURE__ */ new Set()), [R, ft] = w(null), [$e, cn] = w(/* @__PURE__ */ new Set()), [ht, dn] = w(null), [ze, un] = w(null), [mn, Bt] = w(0), pn = Q(0), Ee = Rs(), bn = Vs(), fn = Q({}).current, ar = Q(/* @__PURE__ */ new Set()), [Ya, za] = w(0), [lr, Xa] = w(0), fe = Q(!1), Qt = Q([]), or = Q(null), hn = Q(!1), gn = Q(0), xn = Q("table");
335
337
  xn.current = $;
336
338
  const yn = 25, { data: c, error: jt } = X({
337
339
  queryKey: ["queue-meta", l],
338
- queryFn: () => h.request(O(`/queues/${l}`)).then((e) => e.data),
340
+ queryFn: () => h.request(D(`/queues/${l}`)).then((e) => e.data),
339
341
  enabled: !!l
340
- }), { scopes: Ut, ready: or } = Ds(), sr = Q(!1), [ir, cr] = w(!1), [fe, Wa] = w({}), he = Q({});
341
- P(() => {
342
- if (sr.current || !or || !c) return;
343
- sr.current = !0;
342
+ }), { scopes: Ut, ready: sr } = Ws(), ir = Q(!1), [cr, dr] = w(!1), [he, Za] = w({}), ge = Q({});
343
+ K(() => {
344
+ if (ir.current || !sr || !c) return;
345
+ ir.current = !0;
344
346
  const e = (c.extra_field_meta ?? []).filter(
345
347
  (t) => t.kind === "relation" && t.target_collection && t.display_field
346
348
  );
347
349
  if (e.length === 0 || !Ut) {
348
- cr(!0);
350
+ dr(!0);
349
351
  return;
350
352
  }
351
353
  (async () => {
352
354
  const t = {}, n = {}, a = async (o, s) => {
353
355
  const u = await h.request(
354
- O(`/items/${o.target_collection}`, {
356
+ D(`/items/${o.target_collection}`, {
355
357
  filter: JSON.stringify({ id: { _in: s } }),
356
358
  fields: `id,${o.display_field}`,
357
359
  limit: "200"
@@ -364,7 +366,7 @@ function Dd({
364
366
  ];
365
367
  };
366
368
  for (const o of e) {
367
- const s = Ps(Ut, { collection: o.target_collection });
369
+ const s = Hs(Ut, { collection: o.target_collection });
368
370
  if (!s) continue;
369
371
  const u = `extra.${o.path}`;
370
372
  try {
@@ -376,42 +378,42 @@ function Dd({
376
378
  } catch {
377
379
  }
378
380
  }
379
- Object.keys(n).length > 0 && Wa(n), Object.keys(t).length > 0 && (he.current = t, j((o) => ({ ...o, ...t }))), cr(!0);
381
+ Object.keys(n).length > 0 && Za(n), Object.keys(t).length > 0 && (ge.current = t, U((o) => ({ ...o, ...t }))), dr(!0);
380
382
  })();
381
- }, [or, Ut, c]);
382
- const Ye = ((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({
383
- queryKey: ["queue-browser-quick-filters", Ye],
384
- queryFn: () => h.request(O(`/collections/${Ye}`)).then((e) => {
383
+ }, [sr, Ut, c]);
384
+ const Xe = ((ha = (fa = c == null ? void 0 : c.sources) == null ? void 0 : fa.find((e) => e.type === "collection")) == null ? void 0 : ha.collection) ?? null, { data: ur = [] } = X({
385
+ queryKey: ["queue-browser-quick-filters", Xe],
386
+ queryFn: () => h.request(D(`/collections/${Xe}`)).then((e) => {
385
387
  var t, n;
386
388
  return ((n = (t = e.data) == null ? void 0 : t.browser_config) == null ? void 0 : n.quick_filters) ?? [];
387
389
  }).catch(() => []),
388
- enabled: !!Ye,
390
+ enabled: !!Xe,
389
391
  staleTime: 3e5
390
- }), le = J(() => {
392
+ }), le = Y(() => {
391
393
  const e = /* @__PURE__ */ new Set(), t = [];
392
394
  for (const n of (c == null ? void 0 : c.sources) ?? [])
393
395
  n.type !== "collection" || !n.collection || e.has(n.collection) || (e.add(n.collection), t.push(n.collection));
394
396
  return t;
395
- }, [c == null ? void 0 : c.sources]), Vt = Ms(
397
+ }, [c == null ? void 0 : c.sources]), Vt = Js(
396
398
  le.length === 1 ? le[0] : null
397
- ), 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, Oe = Is(
399
+ ), kn = B === !0 || Array.isArray(B) && le.length > 0 && le.every((e) => B.includes(e)), xe = (c == null ? void 0 : c.claims_enabled) !== !1, p = c == null ? void 0 : c.display_config, Oe = (p == null ? void 0 : p.views) ?? ["table", "kanban", "workload"], el = (p == null ? void 0 : p.work_next) !== !1, It = (p == null ? void 0 : p.bulk_actions) !== !1, De = ti(
398
400
  [
399
401
  ...new Set(
400
402
  ((c == null ? void 0 : c.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
401
403
  )
402
404
  ],
403
405
  (p == null ? void 0 : p.bulk_action_keys) ?? null
404
- ), T = (e, t) => {
406
+ ), A = (e, t) => {
405
407
  var n, a;
406
408
  return ((a = (n = c == null ? void 0 : c.column_aliases) == null ? void 0 : n[e]) == null ? void 0 : a.trim()) || t;
407
- }, ur = Q(!1);
408
- P(() => {
409
- !c || ur.current || (ur.current = !0, He("-priority"));
409
+ }, mr = Q(!1);
410
+ K(() => {
411
+ !c || mr.current || (mr.current = !0, Ye("-priority"));
410
412
  }, [c]);
411
- const [z, Ja] = w(!1);
412
- P(() => {
413
- c != null && c.display_config && !Ae.includes($) && We(Ae[0]);
414
- }, [c, $, Ae]), P(() => {
413
+ const [G, tl] = w(!1);
414
+ K(() => {
415
+ c != null && c.display_config && !Oe.includes($) && Je(Oe[0]);
416
+ }, [c, $, Oe]), K(() => {
415
417
  if (!(c != null && c.sources)) return;
416
418
  const e = bn ? (b, E) => bn.subscribeCollections(b, E) : k == null ? void 0 : k.subscribe;
417
419
  if (!e) return;
@@ -425,7 +427,7 @@ function Dd({
425
427
  let a = null, o = null, s = null;
426
428
  const u = () => {
427
429
  s || (s = setTimeout(() => {
428
- s = null, Ga((b) => b + 1);
430
+ s = null, Xa((b) => b + 1);
429
431
  }, 1500));
430
432
  }, m = () => {
431
433
  o || (o = setTimeout(() => {
@@ -433,18 +435,18 @@ function Dd({
433
435
  Qt.current = [], Bt((b) => b + 1);
434
436
  return;
435
437
  }
436
- be.current = !0, f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-workload", l] });
438
+ fe.current = !0, f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-workload", l] });
437
439
  }, 900));
438
440
  }, y = (b) => {
439
441
  let E = !1, v = 0, ae = !1;
440
- const pe = b.flatMap(
441
- (q) => q ? vs(q) : [q]
442
+ const be = b.flatMap(
443
+ (q) => q ? qs(q) : [q]
442
444
  );
443
- for (const q of pe) {
444
- 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);
445
- if (q && !q.action && (V != null && V.length) && V.every((Le) => Le.startsWith("$"))) {
446
- 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)) {
447
- const Le = Ei(ln, xn.current === "kanban");
445
+ for (const q of be) {
446
+ const I = q == null ? void 0 : q.changed_fields, J = (q == null ? void 0 : q.collection) != null ? `${q.collection}:${String(q.item)}` : null, ln = J != null && ar.current.has(J);
447
+ if (q && !q.action && (I != null && I.length) && I.every((Le) => Le.startsWith("$"))) {
448
+ if (I.includes(Et.tasks) && n.add("queue-task-counts"), I.includes(Et.integrations) && n.add("queue-integrations-summary"), I.includes(Et.addendums) && n.add("queue-collection-addendums"), I.includes(Et.lock) && za((Le) => Le + 1), I.includes(Et.state)) {
449
+ const Le = Ui(ln, xn.current === "kanban");
448
450
  ae = !0, Le.refresh && (E = !0), v += Le.pill;
449
451
  }
450
452
  a || (a = setTimeout(() => {
@@ -455,16 +457,16 @@ function Dd({
455
457
  continue;
456
458
  }
457
459
  ae = !0;
458
- const po = (q == null ? void 0 : q.collection) != null && $s(q.collection, q.item);
459
- H && (ln || (q == null ? void 0 : q.action) === "create" || xn.current === "kanban") ? (E = !0, po || Qt.current.push({ key: H, by: null })) : v += 1;
460
+ const ko = (q == null ? void 0 : q.collection) != null && Ds(q.collection, q.item);
461
+ J && (ln || (q == null ? void 0 : q.action) === "create" || xn.current === "kanban") ? (E = !0, ko || Qt.current.push({ key: J, by: null })) : v += 1;
460
462
  }
461
463
  v > 0 && (pn.current += v), E && m(), ae && u();
462
- }, N = e(t, (b) => rs(fn, [b ?? {}], y));
464
+ }, N = e(t, (b) => ds(fn, [b ?? {}], y));
463
465
  return () => {
464
- N(), as(fn), a && clearTimeout(a), o && clearTimeout(o), s && clearTimeout(s);
466
+ N(), us(fn), a && clearTimeout(a), o && clearTimeout(o), s && clearTimeout(s);
465
467
  };
466
468
  }, [bn, k, c == null ? void 0 : c.sources, f, l, S, fn]);
467
- const Ke = Ho(_, 350), Ya = JSON.stringify(Ke) === JSON.stringify(_), vn = Q(!1), $e = $ === "table" && !!R, mr = Fi(c), xe = (() => {
469
+ const Ke = ts(_, 350), nl = JSON.stringify(Ke) === JSON.stringify(_), vn = Q(!1), qe = $ === "table" && !!R, pr = Bi(c), ye = (() => {
468
470
  const e = {};
469
471
  for (const [t, n] of Object.entries(Ke))
470
472
  if (n) {
@@ -481,61 +483,61 @@ function Dd({
481
483
  }
482
484
  return e;
483
485
  })();
484
- function ze(e, t) {
485
- j((n) => ({ ...n, [e]: n[e] === t ? "" : t })), D(1);
486
+ function Ze(e, t) {
487
+ U((n) => ({ ...n, [e]: n[e] === t ? "" : t })), M(1);
486
488
  }
487
- function za(e) {
488
- j((t) => {
489
+ function rl(e) {
490
+ U((t) => {
489
491
  const n = t.state, a = Array.isArray(n) ? n : n ? [n] : [], o = a.includes(e) ? a.filter((s) => s !== e) : [...a, e];
490
492
  return { ...t, state: o };
491
- }), D(1);
493
+ }), M(1);
492
494
  }
493
- const Xa = Array.isArray(_.state) ? _.state : _.state ? [_.state] : [], Za = (e) => !e || Array.isArray(e) && e.length === 0;
494
- function el() {
495
- j({ ...he.current }), te("all"), D(1);
495
+ const al = Array.isArray(_.state) ? _.state : _.state ? [_.state] : [], ll = (e) => !e || Array.isArray(e) && e.length === 0;
496
+ function ol() {
497
+ U({ ...ge.current }), te("all"), M(1);
496
498
  }
497
- const [gt, tl] = w(() => {
499
+ const [gt, sl] = w(() => {
498
500
  try {
499
501
  return localStorage.getItem("nvr_queue_insights_open") === "1";
500
502
  } catch {
501
503
  return !1;
502
504
  }
503
505
  });
504
- P(() => {
506
+ K(() => {
505
507
  try {
506
508
  localStorage.setItem("nvr_queue_insights_open", gt ? "1" : "0");
507
509
  } catch {
508
510
  }
509
511
  }, [gt]);
510
- const { data: nl = [] } = X({
512
+ const { data: il = [] } = X({
511
513
  queryKey: ["queue-view-subs", l],
512
- queryFn: () => h.request(O("/notification-subscriptions")).then((e) => (e.data ?? []).filter((t) => t.queue_id === l)).catch(() => []),
514
+ queryFn: () => h.request(D("/notification-subscriptions")).then((e) => (e.data ?? []).filter((t) => t.queue_id === l)).catch(() => []),
513
515
  staleTime: 3e4
514
- }), Gt = (e) => nl.find((t) => t.queue_view_id === e), rl = (e) => {
516
+ }), Gt = (e) => il.find((t) => t.queue_view_id === e), cl = (e) => {
515
517
  const t = Gt(e);
516
- (t ? h.request(zn(`/notification-subscriptions/${t.id}`)) : h.request(
517
- ce("/notification-subscriptions", {
518
+ (t ? h.request(Xn(`/notification-subscriptions/${t.id}`)) : h.request(
519
+ ue("/notification-subscriptions", {
518
520
  queue_id: l,
519
521
  queue_view_id: e,
520
522
  digest_frequency: "instant"
521
523
  })
522
524
  )).then(() => {
523
- A.success(
525
+ O.success(
524
526
  t ? "Unsubscribed" : "Subscribed — new arrivals in this view notify you"
525
527
  ), f.invalidateQueries({ queryKey: ["queue-view-subs", l] });
526
- }).catch((a) => A.error(ut(a, "Failed")));
527
- }, [pr, wn] = w(null), _n = [
528
+ }).catch((a) => O.error(ut(a, "Failed")));
529
+ }, [br, wn] = w(null), _n = [
528
530
  ...new Set(
529
531
  ((c == null ? void 0 : c.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
530
532
  )
531
- ], { data: al = {} } = X({
533
+ ], { data: dl = {} } = X({
532
534
  queryKey: ["queue-custom-actions", l, _n.join(",")],
533
535
  queryFn: async () => {
534
536
  const e = {};
535
537
  for (const t of _n.slice(0, 6))
536
538
  try {
537
539
  const n = await h.request(
538
- O("/custom-actions", { collection: t })
540
+ D("/custom-actions", { collection: t })
539
541
  );
540
542
  e[t] = n.data ?? [];
541
543
  } catch {
@@ -545,63 +547,63 @@ function Dd({
545
547
  },
546
548
  enabled: _n.length > 0,
547
549
  staleTime: 6e4
548
- }), ll = (e) => al[e] ?? [], ol = (e, t) => {
549
- h.request(ce(`/custom-actions/${e.id}/execute`, { item: t.item_id })).then(() => {
550
- A.success(`${e.label} ran`), f.invalidateQueries({ queryKey: ["queue-items", l] });
550
+ }), ul = (e) => dl[e] ?? [], ml = (e, t) => {
551
+ h.request(ue(`/custom-actions/${e.id}/execute`, { item: t.item_id })).then(() => {
552
+ O.success(`${e.label} ran`), f.invalidateQueries({ queryKey: ["queue-items", l] });
551
553
  }).catch((n) => {
552
554
  const a = n.response;
553
- A.error((a == null ? void 0 : a.error) ?? ut(n, `${e.label} failed`));
555
+ O.error((a == null ? void 0 : a.error) ?? ut(n, `${e.label} failed`));
554
556
  });
555
557
  }, { data: Nn = [] } = X({
556
558
  queryKey: ["queue-triage-labels", l],
557
- queryFn: () => h.request(O(`/queues/${l}/triage-labels`)).then((e) => e.data ?? []).catch(() => []),
559
+ queryFn: () => h.request(D(`/queues/${l}/triage-labels`)).then((e) => e.data ?? []).catch(() => []),
558
560
  staleTime: 3e4
559
- }), br = (e, t) => {
561
+ }), fr = (e, t) => {
560
562
  h.request(
561
- ce(`/queues/${l}/triage-labels/toggle`, {
563
+ ue(`/queues/${l}/triage-labels/toggle`, {
562
564
  collection: e.collection,
563
565
  item_id: e.item_id,
564
566
  label: t
565
567
  })
566
568
  ).then(() => {
567
569
  f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-triage-labels", l] });
568
- }).catch((n) => A.error(ut(n, "Label failed")));
570
+ }).catch((n) => O.error(ut(n, "Label failed")));
569
571
  }, {
570
572
  data: i,
571
- isLoading: fr,
573
+ isLoading: hr,
572
574
  isFetching: xt,
573
- isPlaceholderData: sl,
574
- dataUpdatedAt: se,
575
- isError: hr,
576
- error: il,
577
- refetch: cl
575
+ isPlaceholderData: pl,
576
+ dataUpdatedAt: ie,
577
+ isError: gr,
578
+ error: bl,
579
+ refetch: fl
578
580
  } = X({
579
581
  queryKey: [
580
582
  "queue-items",
581
583
  l,
582
584
  g,
583
- B,
585
+ j,
584
586
  Ke,
585
- $ === "table" && !R ? ue : "all",
587
+ $ === "table" && !R ? se : "all",
586
588
  R
587
589
  ],
588
590
  queryFn: async () => {
589
- const e = !$e && $ === "table", t = JSON.stringify([l, g, B, xe, yn]), n = e ? os(tr.current, t, ue, "").after : void 0, a = await h.request(
590
- O(`/queues/${l}/items`, {
591
+ const e = !qe && $ === "table", t = JSON.stringify([l, g, j, ye, yn]), n = e ? ps(nr.current, t, se, "").after : void 0, a = await h.request(
592
+ D(`/queues/${l}/items`, {
591
593
  scope: g,
592
594
  // Last State Change is Aging read the other way round: the newest
593
595
  // move is the least aged.
594
- sort: B === "state_entered" ? "-aging_hours" : B === "-state_entered" ? "aging_hours" : B,
595
- filters: JSON.stringify(xe),
596
+ sort: j === "state_entered" ? "-aging_hours" : j === "-state_entered" ? "aging_hours" : j,
597
+ filters: JSON.stringify(ye),
596
598
  // Table + group: headers only (rows load per group on expand, #741).
597
599
  // Kanban renders the full matching set, grouped client-side.
598
- ...$e ? {
600
+ ...qe ? {
599
601
  group_by: R,
600
- ...mr.length ? { group_sums: mr.join(",") } : {}
601
- } : $ === "table" ? { page: ue, limit: yn, ...n ? { after: n } : {} } : {}
602
+ ...pr.length ? { group_sums: pr.join(",") } : {}
603
+ } : $ === "table" ? { page: se, limit: yn, ...n ? { after: n } : {} } : {}
602
604
  })
603
605
  );
604
- return n && ss(tr.current, t, ue, a.next_cursor), a;
606
+ return n && bs(nr.current, t, se, a.next_cursor), a;
605
607
  },
606
608
  // Wait for display_config AND scope seeding so the first fetch uses the
607
609
  // configured defaults and already carries the viewer's restricted filters.
@@ -610,64 +612,64 @@ function Dd({
610
612
  // first fetch went out WITHOUT the seeded scope and refired ~350ms later
611
613
  // with it (3.3s + 8.7s of work for one page). The first fetch now also
612
614
  // waits for the debounced copy to settle; later typing still debounces.
613
- enabled: !!l && z && ir && (vn.current || Ya),
615
+ enabled: !!l && G && cr && (vn.current || nl),
614
616
  // Keep the previous page rendered while a sort/filter/page change refetches —
615
617
  // swapping to skeletons collapsed the table height and jittered the page.
616
618
  placeholderData: (e) => e
617
619
  });
618
620
  i && !vn.current && (vn.current = !0);
619
- const Xe = Object.entries(he.current).filter(
621
+ const et = Object.entries(ge.current).filter(
620
622
  ([e, t]) => {
621
623
  var n;
622
- return !((n = fe[e.slice(6)]) != null && n.length) && JSON.stringify(xe[e] ?? null) === JSON.stringify(t);
624
+ return !((n = he[e.slice(6)]) != null && n.length) && JSON.stringify(ye[e] ?? null) === JSON.stringify(t);
623
625
  }
624
- ).map(([e]) => e), gr = Xe.length > 0 && Object.keys(xe).every((e) => Xe.includes(e)), xr = Object.fromEntries(
625
- Object.entries(xe).filter(([e]) => !Xe.includes(e))
626
- ), { data: dl } = X({
627
- queryKey: ["queue-default-hidden", l, g, xr],
628
- enabled: !!l && !!i && !xt && i.total === 0 && ((fa = i.empty) == null ? void 0 : fa.reason) === "filters" && Xe.length > 0 && !gr,
626
+ ).map(([e]) => e), xr = et.length > 0 && Object.keys(ye).every((e) => et.includes(e)), yr = Object.fromEntries(
627
+ Object.entries(ye).filter(([e]) => !et.includes(e))
628
+ ), { data: hl } = X({
629
+ queryKey: ["queue-default-hidden", l, g, yr],
630
+ enabled: !!l && !!i && !xt && i.total === 0 && ((ga = i.empty) == null ? void 0 : ga.reason) === "filters" && et.length > 0 && !xr,
629
631
  staleTime: 3e4,
630
632
  retry: !1,
631
633
  queryFn: () => h.request(
632
- O(`/queues/${l}/items`, {
634
+ D(`/queues/${l}/items`, {
633
635
  scope: g,
634
- filters: JSON.stringify(xr),
636
+ filters: JSON.stringify(yr),
635
637
  page: 1,
636
638
  limit: 1
637
639
  })
638
640
  ).then((e) => Number(e.total ?? 0))
639
- }), 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) => Xe.map(e).join(" and "), kr = () => {
640
- j((e) => {
641
+ }), ke = xr ? Math.max(0, (((xa = i == null ? void 0 : i.stats) == null ? void 0 : xa.total) ?? 0) - ((i == null ? void 0 : i.total) ?? 0)) : hl ?? 0, kr = (e) => et.map(e).join(" and "), vr = () => {
642
+ U((e) => {
641
643
  const t = { ...e };
642
- for (const n of Xe) delete t[n];
644
+ for (const n of et) delete t[n];
643
645
  return t;
644
- }), D(1);
646
+ }), M(1);
645
647
  };
646
- P(() => {
647
- if (typeof window > "u" || !se) return;
648
+ K(() => {
649
+ if (typeof window > "u" || !ie) return;
648
650
  const e = window;
649
651
  e.__nvrQueueTrace || (e.__nvrQueueTrace = []);
650
652
  const t = e.__nvrQueueTrace, n = {
651
653
  queue: l,
652
- at: se,
654
+ at: ie,
653
655
  scope: g,
654
- sort: B,
656
+ sort: j,
655
657
  filters: JSON.stringify(Ke),
656
- page: ue
658
+ page: se
657
659
  }, a = t.find((o) => o.queue === l);
658
- t.push(n), t.length > 50 && t.shift(), a && a !== n && se - Number(a.at) < 2e3 && t.filter((o) => o.queue === l).length === 2 && console.warn("[queue] duplicate first fetch", { first: a, second: n });
659
- }, [se]);
660
- const Ze = fr && !i || !z || !ir && !i, vr = (xt && !fr || sl && xt) && !be.current, ul = J(
661
- () => ($e ? [] : (i == null ? void 0 : i.data) ?? []).slice(0, 100).map((e) => ({ collection: e.collection, item: e.item_id })),
662
- [$e, i == null ? void 0 : i.data]
663
- ), ml = Rs(ul), Wt = ji(), wr = Jo(xt && !be.current), pl = Yo({
664
- pending: xt && !be.current,
660
+ t.push(n), t.length > 50 && t.shift(), a && a !== n && ie - Number(a.at) < 2e3 && t.filter((o) => o.queue === l).length === 2 && console.warn("[queue] duplicate first fetch", { first: a, second: n });
661
+ }, [ie]);
662
+ const tt = hr && !i || !G || !cr && !i, wr = (xt && !hr || pl && xt) && !fe.current, gl = Y(
663
+ () => (qe ? [] : (i == null ? void 0 : i.data) ?? []).slice(0, 100).map((e) => ({ collection: e.collection, item: e.item_id })),
664
+ [qe, i == null ? void 0 : i.data]
665
+ ), xl = Ps(gl), Wt = Xi(), _r = ns(xt && !fe.current), yl = rs({
666
+ pending: xt && !fe.current,
665
667
  request: l != null ? { method: "GET", url: `/queues/${l}/items` } : null,
666
668
  noun: "items"
667
- }), bl = qs();
668
- async function _r(e, t) {
669
+ }), kl = Ks();
670
+ async function Nr(e, t) {
669
671
  var m;
670
- const a = (await h.request(O(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
672
+ const a = (await h.request(D(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
671
673
  if (!a || a.states.length === 0)
672
674
  throw new Error("This item has no workflow instance");
673
675
  const o = a.states.find((y) => y.key === t);
@@ -677,153 +679,153 @@ function Dd({
677
679
  );
678
680
  if (!s) throw new Error("No transition available to move this item here");
679
681
  let u = null;
680
- if (Ui(s) && (u = await Wt.ask(((m = s.label) == null ? void 0 : m.trim()) || "Move"), !u))
682
+ if (Zi(s) && (u = await Wt.ask(((m = s.label) == null ? void 0 : m.trim()) || "Move"), !u))
681
683
  throw new Error("Not moved — this move needs a note");
682
684
  await h.request(
683
- ce(`/pipelines/instance/${e.collection}/${e.item_id}/transition`, {
685
+ ue(`/pipelines/instance/${e.collection}/${e.item_id}/transition`, {
684
686
  transition_id: s.id,
685
687
  ...u ? { comment: u } : {}
686
688
  })
687
689
  );
688
690
  }
689
- const fl = Te({
691
+ const vl = Ae({
690
692
  mutationFn: async ({ item: e, targetState: t }) => {
691
- await _r(e, t);
693
+ await Nr(e, t);
692
694
  },
693
695
  onSuccess: () => {
694
696
  f.invalidateQueries({ queryKey: ["queue-items", l, g] });
695
697
  },
696
698
  onError: (e) => {
697
- A.error(ut(e, "Failed to move item")), f.invalidateQueries({ queryKey: ["queue-items", l, g] });
699
+ O.error(ut(e, "Failed to move item")), f.invalidateQueries({ queryKey: ["queue-items", l, g] });
698
700
  }
699
- }), De = Te({
701
+ }), Pe = Ae({
700
702
  mutationFn: (e) => h.request(
701
- ce(`/queues/${l}/claim`, {
703
+ ue(`/queues/${l}/claim`, {
702
704
  source_collection: e.collection,
703
705
  item_id: e.item_id
704
706
  })
705
707
  ),
706
708
  onSuccess: () => f.invalidateQueries({ queryKey: ["queue-items", l, g] }),
707
- onError: () => A.error("Failed to claim item")
708
- }), et = Te({
709
+ onError: () => O.error("Failed to claim item")
710
+ }), nt = Ae({
709
711
  mutationFn: (e) => h.request(
710
- ce(`/queues/${l}/release`, {
712
+ ue(`/queues/${l}/release`, {
711
713
  source_collection: e.collection,
712
714
  item_id: e.item_id
713
715
  })
714
716
  ),
715
717
  onSuccess: () => f.invalidateQueries({ queryKey: ["queue-items", l, g] }),
716
- onError: () => A.error("Failed to release item")
717
- }), { data: tt } = X({
718
+ onError: () => O.error("Failed to release item")
719
+ }), { data: rt } = X({
718
720
  queryKey: ["queue-column-prefs", l],
719
- queryFn: () => h.request(O(`/queues/${l}/column-prefs`)),
721
+ queryFn: () => h.request(D(`/queues/${l}/column-prefs`)),
720
722
  enabled: !!l
721
- }), [yt, Ht] = w(null), [nt, Sn] = w(null);
722
- P(() => {
723
- tt && Sn(tt.data.default_view_id);
724
- }, [tt]);
725
- 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(
726
- (e) => Array.from({ length: hl[e] ?? 1 }, (t, n) => ({ key: e, page: n + 1 }))
727
- ), Cn = Ve({
723
+ }), [yt, Ht] = w(null), [at, Sn] = w(null);
724
+ K(() => {
725
+ rt && Sn(rt.data.default_view_id);
726
+ }, [rt]);
727
+ const [wl, Sr] = w({}), ve = qe ? (i == null ? void 0 : i.groups) ?? null : null, Jt = (ve ?? []).filter((e) => !$e.has(e.key)).map((e) => e.key).flatMap(
728
+ (e) => Array.from({ length: wl[e] ?? 1 }, (t, n) => ({ key: e, page: n + 1 }))
729
+ ), Cn = Ge({
728
730
  queries: Jt.map(({ key: e, page: t }) => ({
729
731
  queryKey: [
730
732
  "queue-items",
731
733
  l,
732
734
  "group-rows",
733
735
  g,
734
- B,
736
+ j,
735
737
  Ke,
736
738
  R,
737
739
  e,
738
740
  t
739
741
  ],
740
742
  queryFn: () => h.request(
741
- O(`/queues/${l}/items`, {
743
+ D(`/queues/${l}/items`, {
742
744
  scope: g,
743
- sort: B === "state_entered" ? "-aging_hours" : B === "-state_entered" ? "aging_hours" : B,
744
- filters: JSON.stringify(xe),
745
+ sort: j === "state_entered" ? "-aging_hours" : j === "-state_entered" ? "aging_hours" : j,
746
+ filters: JSON.stringify(ye),
745
747
  group_by: R,
746
748
  group_key: e,
747
749
  page: t,
748
- limit: Hi
750
+ limit: ac
749
751
  })
750
752
  ).then((n) => ({ key: e, rows: n.data })),
751
- enabled: !!i && $e,
753
+ enabled: !!i && qe,
752
754
  placeholderData: (n) => n
753
755
  }))
754
- }), gl = Cn.map((e) => e.dataUpdatedAt).join(","), $n = J(() => {
756
+ }), _l = Cn.map((e) => e.dataUpdatedAt).join(","), $n = Y(() => {
755
757
  const e = /* @__PURE__ */ new Map();
756
758
  return Cn.forEach((t, n) => {
757
759
  if (!t.data) return;
758
760
  const a = Jt[n].key;
759
761
  e.set(a, [...e.get(a) ?? [], ...t.data.rows]);
760
762
  }), e;
761
- }, [gl, Jt.map((e) => `${e.key}\0${e.page}`).join("")]), xl = new Set(
763
+ }, [_l, Jt.map((e) => `${e.key}\0${e.page}`).join("")]), Nl = new Set(
762
764
  Cn.flatMap((e, t) => e.isFetching ? [Jt[t].key] : [])
763
- ), C = ke ? [...$n.values()].flat() : (i == null ? void 0 : i.data) ?? [];
764
- Us(
765
+ ), C = ve ? [...$n.values()].flat() : (i == null ? void 0 : i.data) ?? [];
766
+ Zs(
765
767
  l ? {
766
768
  queue: {
767
769
  id: l,
768
770
  label: c == null ? void 0 : c.name,
769
771
  scope: g,
770
- filters: JSON.stringify(xe),
772
+ filters: JSON.stringify(ye),
771
773
  items: C.slice(0, 100).map((e) => ({ collection: e.collection, id: e.item_id }))
772
774
  }
773
775
  } : null
774
776
  );
775
- const yl = Vs(), kt = C.some((e) => e.fulfilment !== void 0), vt = C.some((e) => e.send_backs !== void 0), { data: rt, dataUpdatedAt: Sr } = X({
776
- queryKey: ["queue-live-stats", l, g, Ke, ar],
777
+ const Sl = ei(), kt = C.some((e) => e.fulfilment !== void 0), vt = C.some((e) => e.send_backs !== void 0), { data: lt, dataUpdatedAt: Cr } = X({
778
+ queryKey: ["queue-live-stats", l, g, Ke, lr],
777
779
  queryFn: () => h.request(
778
- O(`/queues/${l}/items`, {
780
+ D(`/queues/${l}/items`, {
779
781
  scope: g,
780
- filters: JSON.stringify(xe),
782
+ filters: JSON.stringify(ye),
781
783
  page: 1,
782
784
  limit: 1
783
785
  })
784
786
  ),
785
- enabled: ar > 0 && !!i,
787
+ enabled: lr > 0 && !!i,
786
788
  staleTime: Number.POSITIVE_INFINITY,
787
789
  placeholderData: (e) => e,
788
790
  retry: !1
789
- }), Yt = !!rt && Sr > se, x = Yt ? rt.stats : i == null ? void 0 : i.stats, I = Yt ? rt.filtered_stats ?? null : (i == null ? void 0 : i.filtered_stats) ?? null, Cr = Yt ? rt.state_counts : i == null ? void 0 : i.state_counts;
790
- P(() => {
791
+ }), Yt = !!lt && Cr > ie, x = Yt ? lt.stats : i == null ? void 0 : i.stats, W = Yt ? lt.filtered_stats ?? null : (i == null ? void 0 : i.filtered_stats) ?? null, $r = Yt ? lt.state_counts : i == null ? void 0 : i.state_counts;
792
+ K(() => {
791
793
  if (!Yt) return;
792
- const e = gn.current > 0 || hn.current, t = Li({
794
+ const e = gn.current > 0 || hn.current, t = Qi({
793
795
  pending: pn.current,
794
- liveTotal: rt.total,
796
+ liveTotal: lt.total,
795
797
  rowsTotal: i == null ? void 0 : i.total,
796
798
  // Only a table re-reads its rows quietly; the other views keep the pill.
797
799
  busy: e || $ !== "table"
798
800
  });
799
- pn.current = 0, t > 0 && Bt((a) => a + t), Ti({
800
- liveTotal: rt.total,
801
+ pn.current = 0, t > 0 && Bt((a) => a + t), ji({
802
+ liveTotal: lt.total,
801
803
  rowsTotal: i == null ? void 0 : i.total,
802
804
  // Grouped tables too (army 8 b08-N6): their headers count the whole set, and
803
805
  // nothing else re-read them — "37 of 38" with the strip at 38 for minutes.
804
806
  table: $ === "table",
805
807
  busy: e
806
- }) && (be.current = !0, f.invalidateQueries({
807
- queryKey: $e ? ["queue-items", l] : ["queue-items", l, g]
808
+ }) && (fe.current = !0, f.invalidateQueries({
809
+ queryKey: qe ? ["queue-items", l] : ["queue-items", l, g]
808
810
  }).finally(() => {
809
- be.current = !1;
811
+ fe.current = !1;
810
812
  }));
811
- }, [Sr]);
812
- const qn = (ga = I ?? x) == null ? void 0 : ga.aging, $r = Q(void 0);
813
- !_.aging_hours && qn && ($r.current = qn);
814
- const wt = _.aging_hours ? $r.current ?? (x == null ? void 0 : x.aging) : qn ?? (x == null ? void 0 : x.aging);
815
- rr.current = new Set(C.map((e) => `${e.collection}:${e.item_id}`));
816
- const _t = _s(
813
+ }, [Cr]);
814
+ const qn = (ya = W ?? x) == null ? void 0 : ya.aging, qr = Q(void 0);
815
+ !_.aging_hours && qn && (qr.current = qn);
816
+ const wt = _.aging_hours ? qr.current ?? (x == null ? void 0 : x.aging) : qn ?? (x == null ? void 0 : x.aging);
817
+ ar.current = new Set(C.map((e) => `${e.collection}:${e.item_id}`));
818
+ const _t = Fs(
817
819
  C.map((e) => ({ collection: e.collection, id: e.item_id })),
818
- Va
819
- ), qr = Q(se), Rr = Q(0);
820
- !be.current && se !== Rr.current && (qr.current = se), P(() => {
820
+ Ya
821
+ ), Rr = Q(ie), Fr = Q(0);
822
+ !fe.current && ie !== Fr.current && (Rr.current = ie), K(() => {
821
823
  const e = new Set(C.map((t) => `${t.collection}:${t.item_id}`));
822
- if (be.current) {
823
- be.current = !1, Rr.current = se;
824
+ if (fe.current) {
825
+ fe.current = !1, Fr.current = ie;
824
826
  const t = Qt.current;
825
827
  Qt.current = [];
826
- const n = lr.current, a = /* @__PURE__ */ new Set();
828
+ const n = or.current, a = /* @__PURE__ */ new Set();
827
829
  for (const o of t)
828
830
  !e.has(o.key) || a.has(o.key) || (a.add(o.key), Ee.note([o.key], o.by, n && !n.has(o.key) ? "create" : "update"));
829
831
  if (n) {
@@ -831,54 +833,54 @@ function Dd({
831
833
  o.length > 0 && o.length <= 20 && Ee.note(o, null, "create");
832
834
  }
833
835
  }
834
- lr.current = e;
835
- }, [se]), P(() => {
836
+ or.current = e;
837
+ }, [ie]), K(() => {
836
838
  Bt(0);
837
- }, [se]);
838
- function kl() {
839
+ }, [ie]);
840
+ function Cl() {
839
841
  f.invalidateQueries({ queryKey: ["queue-items", l] }), f.invalidateQueries({ queryKey: ["queue-workload", l] }), Bt(0);
840
842
  }
841
- const { data: ve } = X({
843
+ const { data: we } = X({
842
844
  queryKey: ["queue-trends", l],
843
- queryFn: () => h.request(O(`/queues/${l}/trends`, { days: 14 })),
845
+ queryFn: () => h.request(D(`/queues/${l}/trends`, { days: 14 })),
844
846
  enabled: !!l,
845
847
  staleTime: 300 * 1e3
846
- }), { data: we } = X({
848
+ }), { data: _e } = X({
847
849
  queryKey: ["queue-trends", l, "mine"],
848
- queryFn: () => h.request(O(`/queues/${l}/trends`, { days: 14, scope: "mine" })),
850
+ queryFn: () => h.request(D(`/queues/${l}/trends`, { days: 14, scope: "mine" })),
849
851
  enabled: !!l && g === "mine",
850
852
  staleTime: 300 * 1e3
851
853
  });
852
854
  function Nt(e) {
853
- const n = (g === "all" ? ve == null ? void 0 : ve.data : g === "mine" ? we == null ? void 0 : we.data : void 0) ?? [];
855
+ const n = (g === "all" ? we == null ? void 0 : we.data : g === "mine" ? _e == null ? void 0 : _e.data : void 0) ?? [];
854
856
  if (n.length === 0) return {};
855
- if (I) return {};
857
+ if (W) return {};
856
858
  const a = n.map((s) => s[e]), o = n[n.length - 1];
857
859
  return { trend: a, delta: ((x == null ? void 0 : x[e]) ?? 0) - o[e] };
858
860
  }
859
- const _e = J(() => {
860
- const t = (g === "all" ? ve == null ? void 0 : ve.data : g === "mine" ? we == null ? void 0 : we.data : void 0) ?? [];
861
- if (t.length < 3 || !x || I) return null;
861
+ const Ne = Y(() => {
862
+ const t = (g === "all" ? we == null ? void 0 : we.data : g === "mine" ? _e == null ? void 0 : _e.data : void 0) ?? [];
863
+ if (t.length < 3 || !x || W) return null;
862
864
  const n = t.map(
863
865
  (u) => g === "mine" ? u.owned ?? u.total : u.total
864
866
  ), a = n.slice(1).map((u, m) => u - n[m]), o = a.reduce((u, m) => u + m, 0) / a.length, s = x.total;
865
867
  return Math.abs(o) < 0.05 ? { dir: "flat", pace: o, days: null } : o < 0 ? { dir: "down", pace: o, days: Math.max(1, Math.ceil(s / -o)) } : { dir: "up", pace: o, days: null };
866
- }, [ve == null ? void 0 : ve.data, we == null ? void 0 : we.data, g, x, I]), St = J(
868
+ }, [we == null ? void 0 : we.data, _e == null ? void 0 : _e.data, g, x, W]), St = Y(
867
869
  () => [
868
870
  ...new Set(
869
871
  ((c == null ? void 0 : c.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
870
872
  )
871
873
  ],
872
874
  [c == null ? void 0 : c.sources]
873
- ), { data: vl } = X({
874
- queryKey: ["collections"],
875
- queryFn: () => h.request(O("/collections")).then((e) => e.data),
875
+ ), { data: $l } = X({
876
+ queryKey: Bs.collections(),
877
+ queryFn: () => h.request(D("/collections")).then((e) => e.data),
876
878
  staleTime: 300 * 1e3
877
- }), at = Ve({
879
+ }), ot = Ge({
878
880
  queries: St.map((e) => ({
879
881
  queryKey: ["queue-collection-addendums", e],
880
882
  queryFn: () => h.request(
881
- O(`/collections/${e}`)
883
+ D(`/collections/${e}`)
882
884
  ).then((t) => {
883
885
  var n;
884
886
  return !!((n = t.data) != null && n.addendums_enabled);
@@ -887,37 +889,37 @@ function Dd({
887
889
  }))
888
890
  }).some((e) => e.data === !0), { data: Rn = [] } = X({
889
891
  queryKey: ["queue-integrations-collections"],
890
- queryFn: () => h.request(O("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
892
+ queryFn: () => h.request(D("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
891
893
  staleTime: 300 * 1e3
892
- }), qe = St.some((e) => Rn.includes(e)), Fn = J(() => {
894
+ }), Re = St.some((e) => Rn.includes(e)), Fn = Y(() => {
893
895
  var t;
894
896
  const e = {};
895
- if (!qe) return e;
897
+ if (!Re) return e;
896
898
  for (const n of C) {
897
899
  if (!Rn.includes(n.collection)) continue;
898
900
  const a = e[t = n.collection] ?? (e[t] = []);
899
901
  a.length < 500 && a.push(n.item_id);
900
902
  }
901
903
  return e;
902
- }, [C, Rn, qe]), Fr = Object.keys(Fn), Lr = Ve({
903
- queries: Fr.map((e) => ({
904
+ }, [C, Rn, Re]), Tr = Object.keys(Fn), Lr = Ge({
905
+ queries: Tr.map((e) => ({
904
906
  queryKey: ["queue-integrations-summary", e, Fn[e].join(",")],
905
907
  queryFn: () => h.request(
906
- ce("/integration-obligations/summary", {
908
+ ue("/integration-obligations/summary", {
907
909
  collection: e,
908
910
  ids: Fn[e]
909
911
  })
910
912
  ).then((t) => t.data ?? {}).catch(() => ({})),
911
913
  staleTime: 3e4
912
914
  }))
913
- }), wl = Lr.map((e) => e.dataUpdatedAt).join(","), _l = J(() => {
915
+ }), ql = Lr.map((e) => e.dataUpdatedAt).join(","), Rl = Y(() => {
914
916
  const e = {};
915
- return Fr.forEach((t, n) => {
917
+ return Tr.forEach((t, n) => {
916
918
  var o;
917
919
  const a = ((o = Lr[n]) == null ? void 0 : o.data) ?? {};
918
920
  for (const [s, u] of Object.entries(a)) e[`${t}:${s}`] = u;
919
921
  }), e;
920
- }, [wl]), Ln = J(() => {
922
+ }, [ql]), Tn = Y(() => {
921
923
  var t;
922
924
  const e = {};
923
925
  for (const n of C) {
@@ -927,31 +929,31 @@ function Dd({
927
929
  a.length < 500 && a.push(n.item_id);
928
930
  }
929
931
  return e;
930
- }, [C]), Tn = Object.keys(Ln), Tr = Ve({
931
- queries: Tn.map((e) => ({
932
- queryKey: ["queue-task-counts", e, Ln[e].join(",")],
932
+ }, [C]), Ln = Object.keys(Tn), Ar = Ge({
933
+ queries: Ln.map((e) => ({
934
+ queryKey: ["queue-task-counts", e, Tn[e].join(",")],
933
935
  queryFn: () => h.request(
934
- ce("/tasks/counts", { collection: e, ids: Ln[e] })
936
+ ue("/tasks/counts", { collection: e, ids: Tn[e] })
935
937
  ).then((t) => t.data ?? {}).catch(() => ({})),
936
938
  staleTime: 3e4
937
939
  }))
938
- }), Nl = Tr.map((e) => e.dataUpdatedAt).join(","), Sl = J(() => {
940
+ }), Fl = Ar.map((e) => e.dataUpdatedAt).join(","), Tl = Y(() => {
939
941
  const e = {};
940
- return Tn.forEach((t, n) => {
942
+ return Ln.forEach((t, n) => {
941
943
  var a;
942
- for (const [o, s] of Object.entries(((a = Tr[n]) == null ? void 0 : a.data) ?? {})) e[`${t}:${o}`] = s;
944
+ for (const [o, s] of Object.entries(((a = Ar[n]) == null ? void 0 : a.data) ?? {})) e[`${t}:${o}`] = s;
943
945
  }), e;
944
- }, [Nl]), Er = Tn.length > 0, Ar = Ve({
946
+ }, [Fl]), Er = Ln.length > 0, Or = Ge({
945
947
  queries: St.map((e) => ({
946
948
  queryKey: ["queue-collection-risk-rules", e],
947
949
  queryFn: () => h.request(
948
- O("/at-risk/rules/active", { collection: e })
950
+ D("/at-risk/rules/active", { collection: e })
949
951
  ).then((t) => t.data ?? []).catch(() => []),
950
952
  staleTime: 300 * 1e3
951
953
  }))
952
- }), Cl = Ar.map((e) => e.dataUpdatedAt).join(","), Or = J(() => {
954
+ }), Ll = Or.map((e) => e.dataUpdatedAt).join(","), Dr = Y(() => {
953
955
  const e = /* @__PURE__ */ new Map();
954
- for (const t of Ar)
956
+ for (const t of Or)
955
957
  for (const n of t.data ?? []) {
956
958
  const a = e.get(n.name);
957
959
  e.set(n.name, {
@@ -960,64 +962,64 @@ function Dd({
960
962
  });
961
963
  }
962
964
  return [...e.values()];
963
- }, [Cl]), Kr = Ve({
965
+ }, [Ll]), Kr = Ge({
964
966
  queries: St.map((e) => ({
965
967
  queryKey: ["queue-collection-states", e],
966
968
  queryFn: () => h.request(
967
- O(`/queues/collection-states/${e}`)
969
+ D(`/queues/collection-states/${e}`)
968
970
  ).then((t) => t.data),
969
971
  staleTime: 300 * 1e3
970
972
  }))
971
- }), Dr = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), Re = J(() => {
973
+ }), Pr = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), Fe = Y(() => {
972
974
  const e = {};
973
975
  for (const t of Kr)
974
976
  (t.data ?? []).forEach((n, a) => {
975
977
  e[n.key] = { label: n.label, color: n.color, sort: a };
976
978
  });
977
979
  return e;
978
- }, [Kr.map((e) => e.data)]), Pr = x ? Object.entries(x.by_state).sort(
980
+ }, [Kr.map((e) => e.data)]), Mr = x ? Object.entries(x.by_state).sort(
979
981
  (e, t) => {
980
982
  var n, a;
981
- return (((n = Re[e[0]]) == null ? void 0 : n.sort) ?? Number.MAX_SAFE_INTEGER) - (((a = Re[t[0]]) == null ? void 0 : a.sort) ?? Number.MAX_SAFE_INTEGER);
983
+ return (((n = Fe[e[0]]) == null ? void 0 : n.sort) ?? Number.MAX_SAFE_INTEGER) - (((a = Fe[t[0]]) == null ? void 0 : a.sort) ?? Number.MAX_SAFE_INTEGER);
982
984
  }
983
- ) : [], Mr = (e) => [...e].sort(
985
+ ) : [], Br = (e) => [...e].sort(
984
986
  (t, n) => {
985
987
  var a, o;
986
- return (((a = Re[t]) == null ? void 0 : a.sort) ?? Number.MAX_SAFE_INTEGER) - (((o = Re[n]) == null ? void 0 : o.sort) ?? Number.MAX_SAFE_INTEGER);
988
+ return (((a = Fe[t]) == null ? void 0 : a.sort) ?? Number.MAX_SAFE_INTEGER) - (((o = Fe[n]) == null ? void 0 : o.sort) ?? Number.MAX_SAFE_INTEGER);
987
989
  }
988
- ), En = J(() => {
990
+ ), An = Y(() => {
989
991
  const e = {};
990
- for (const [t, n] of Object.entries(Re)) e[t] = n.label;
992
+ for (const [t, n] of Object.entries(Fe)) e[t] = n.label;
991
993
  return e;
992
- }, [Re]), Fe = (e) => e ? e === "none" ? "No State" : En[e] ?? Dr(e) : "—", lt = (e) => {
994
+ }, [Fe]), Te = (e) => e ? e === "none" ? "No State" : An[e] ?? Pr(e) : "—", st = (e) => {
993
995
  if (e === sn) return "Addendums";
994
- const t = (vl ?? []).find((n) => n.collection === e);
995
- return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || Dr(e);
996
- }, ie = J(() => R ? ke ? ke.map((e) => ({
996
+ const t = ($l ?? []).find((n) => n.collection === e);
997
+ return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || Pr(e);
998
+ }, ce = Y(() => R ? ve ? ve.map((e) => ({
997
999
  key: e.key,
998
1000
  rows: $n.get(e.key) ?? [],
999
1001
  breached: e.breached,
1000
1002
  atRisk: e.at_risk,
1001
1003
  count: e.count,
1002
1004
  sums: e.sums ?? {}
1003
- })) : Ls(C, R).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [C, R, ke, $n]), An = Q(null);
1004
- P(() => {
1005
- if (!R || !ie) {
1006
- An.current = null;
1005
+ })) : Qs(C, R).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [C, R, ve, $n]), En = Q(null);
1006
+ K(() => {
1007
+ if (!R || !ce) {
1008
+ En.current = null;
1007
1009
  return;
1008
1010
  }
1009
- if ($e && !ke || An.current === R) return;
1010
- An.current = R;
1011
- const e = ie.reduce((t, n) => t + n.count, 0);
1012
- cn(e > 200 ? new Set(ie.map((t) => t.key)) : /* @__PURE__ */ new Set()), Nr({});
1013
- }, [R, ke]);
1014
- function $l(e) {
1011
+ if (qe && !ve || En.current === R) return;
1012
+ En.current = R;
1013
+ const e = ce.reduce((t, n) => t + n.count, 0);
1014
+ cn(e > 200 ? new Set(ce.map((t) => t.key)) : /* @__PURE__ */ new Set()), Sr({});
1015
+ }, [R, ve]);
1016
+ function Al(e) {
1015
1017
  cn((t) => {
1016
1018
  const n = new Set(t);
1017
1019
  return n.has(e) ? n.delete(e) : n.add(e), n;
1018
1020
  });
1019
1021
  }
1020
- const me = J(() => ie ? ie.filter((e) => !Ce.has(e.key)).flatMap((e) => e.rows) : C, [ie, C, Ce]), F = (e) => `${e.collection}:${e.item_id}`, [Pe, Me] = w(null), [ql, On] = w(!1), [Ct, zt] = w(null), Kn = (e) => {
1022
+ const pe = Y(() => ce ? ce.filter((e) => !$e.has(e.key)).flatMap((e) => e.rows) : C, [ce, C, $e]), F = (e) => `${e.collection}:${e.item_id}`, [Me, Be] = w(null), [El, On] = w(!1), [Ct, zt] = w(null), Dn = (e) => {
1021
1023
  if (e.collection === sn && e.url) {
1022
1024
  const t = e.url.match(/^\/collections\/([^/?]+)\/([^/?]+)(?:\?(.*))?$/);
1023
1025
  if (t) {
@@ -1036,46 +1038,46 @@ function Dd({
1036
1038
  itemId: e.item_id,
1037
1039
  layoutSlug: (p == null ? void 0 : p.item_layout) ?? null
1038
1040
  };
1039
- }, Br = () => {
1041
+ }, Qr = () => {
1040
1042
  var e;
1041
- c && Pa({
1043
+ c && Ua({
1042
1044
  queue_id: l,
1043
1045
  name: c.name,
1044
1046
  path: `${window.location.pathname}${window.location.search}`,
1045
1047
  at: Date.now(),
1046
1048
  scroll: ((e = Zt.current) == null ? void 0 : e.scrollTop) ?? 0,
1047
- state: { scope: g, page: ue, sort: B, filters: _, group_by: R, view: $ },
1048
- entry: ks()
1049
+ state: { scope: g, page: se, sort: j, filters: _, group_by: R, view: $ },
1050
+ entry: $s()
1049
1051
  });
1050
- }, ot = (e) => {
1051
- Br(), Y.open(Kn(e));
1052
- }, Rl = (e) => {
1053
- Br();
1054
- const t = W == null ? void 0 : W[0], n = !!t && t.collection === e.collection && String(t.itemId) === e.itemId;
1055
- Y.open({
1052
+ }, it = (e) => {
1053
+ Qr(), z.open(Dn(e));
1054
+ }, Ol = (e) => {
1055
+ Qr();
1056
+ const t = H == null ? void 0 : H[0], n = !!t && t.collection === e.collection && String(t.itemId) === e.itemId;
1057
+ z.open({
1056
1058
  collection: e.collection,
1057
1059
  itemId: e.itemId,
1058
1060
  layoutSlug: n ? (p == null ? void 0 : p.item_layout) ?? null : null
1059
1061
  });
1060
- }, [U, $t] = w(
1062
+ }, [V, $t] = w(
1061
1063
  null
1062
1064
  );
1063
- P(() => {
1064
- if (!U) return;
1065
+ K(() => {
1066
+ if (!V) return;
1065
1067
  const e = () => $t(null);
1066
1068
  return window.addEventListener("mousedown", e), window.addEventListener("scroll", e, !0), () => {
1067
1069
  window.removeEventListener("mousedown", e), window.removeEventListener("scroll", e, !0);
1068
1070
  };
1069
- }, [U]);
1070
- const Dn = (e) => {
1071
+ }, [V]);
1072
+ const Kn = (e) => {
1071
1073
  zt(F(e));
1072
1074
  const t = (p == null ? void 0 : p.row_click) ?? "preview";
1073
1075
  if (t === "full" || e.collection === sn) {
1074
- ot(e);
1076
+ it(e);
1075
1077
  return;
1076
1078
  }
1077
1079
  if (t === "layout") {
1078
- ta({
1080
+ na({
1079
1081
  collection: e.collection,
1080
1082
  itemId: e.item_id,
1081
1083
  rootLayoutSlug: (p == null ? void 0 : p.item_layout) ?? null,
@@ -1084,32 +1086,32 @@ function Dd({
1084
1086
  });
1085
1087
  return;
1086
1088
  }
1087
- Me(e);
1089
+ Be(e);
1088
1090
  };
1089
- P(() => {
1090
- if (!Pe) return;
1091
- const e = C.find((t) => F(t) === F(Pe));
1092
- e && e !== Pe && Me(e);
1091
+ K(() => {
1092
+ if (!Me) return;
1093
+ const e = C.find((t) => F(t) === F(Me));
1094
+ e && e !== Me && Be(e);
1093
1095
  }, [C]);
1094
- const Fl = (e) => !e.claimed_by || e.claimed_by.id === S;
1095
- function Qr(e) {
1096
- const t = e ? me.findIndex((a) => F(a) === F(e)) + 1 : 0, n = me.slice(t).find(Fl);
1096
+ const Dl = (e) => !e.claimed_by || e.claimed_by.id === S;
1097
+ function jr(e) {
1098
+ const t = e ? pe.findIndex((a) => F(a) === F(e)) + 1 : 0, n = pe.slice(t).find(Dl);
1097
1099
  if (!n) {
1098
- On(!1), Me(null), A.info("Nothing left to work on — queue clear!");
1100
+ On(!1), Be(null), O.info("Nothing left to work on — queue clear!");
1099
1101
  return;
1100
1102
  }
1101
- if (zt(F(n)), ge && !n.claimed_by && De.mutate(n), (p == null ? void 0 : p.row_click) === "full") {
1102
- ot(n);
1103
+ if (zt(F(n)), xe && !n.claimed_by && Pe.mutate(n), (p == null ? void 0 : p.row_click) === "full") {
1104
+ it(n);
1103
1105
  return;
1104
1106
  }
1105
- On(!0), Me(n);
1107
+ On(!0), Be(n);
1106
1108
  }
1107
- P(() => {
1109
+ K(() => {
1108
1110
  if ($ !== "table") return;
1109
1111
  function e(t) {
1110
1112
  var o;
1111
- if (t.metaKey || t.ctrlKey || t.altKey || !Gi(t.target)) return;
1112
- const n = Ct ? me.findIndex((s) => F(s) === Ct) : -1, a = (s) => {
1113
+ if (t.metaKey || t.ctrlKey || t.altKey || !nc(t.target)) return;
1114
+ const n = Ct ? pe.findIndex((s) => F(s) === Ct) : -1, a = (s) => {
1113
1115
  zt(F(s));
1114
1116
  const u = F(s), m = [...document.querySelectorAll("tr[data-row-key]")].find(
1115
1117
  (y) => y.getAttribute("data-row-key") === u
@@ -1118,54 +1120,54 @@ function Dd({
1118
1120
  };
1119
1121
  if (t.key === "j" || t.key === "ArrowDown") {
1120
1122
  t.preventDefault();
1121
- const s = me[Math.min(n + 1, me.length - 1)];
1123
+ const s = pe[Math.min(n + 1, pe.length - 1)];
1122
1124
  s && a(s);
1123
1125
  } else if (t.key === "k" || t.key === "ArrowUp") {
1124
1126
  t.preventDefault();
1125
- const s = me[Math.max(n - 1, 0)];
1127
+ const s = pe[Math.max(n - 1, 0)];
1126
1128
  s && a(s);
1127
- } else if (t.key === "c" && n >= 0 && ge) {
1129
+ } else if (t.key === "c" && n >= 0 && xe) {
1128
1130
  t.preventDefault();
1129
- const s = me[n];
1130
- ((o = s.claimed_by) == null ? void 0 : o.id) === S ? et.mutate(s) : De.mutate(s);
1131
- } else t.key === "o" && n >= 0 && (t.preventDefault(), ot(me[n]));
1131
+ const s = pe[n];
1132
+ ((o = s.claimed_by) == null ? void 0 : o.id) === S ? nt.mutate(s) : Pe.mutate(s);
1133
+ } else t.key === "o" && n >= 0 && (t.preventDefault(), it(pe[n]));
1132
1134
  }
1133
1135
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
1134
- }, [$, me, Ct, Pe, S, De, et, ge]);
1135
- const { data: G } = X({
1136
+ }, [$, pe, Ct, Me, S, Pe, nt, xe]);
1137
+ const { data: L } = X({
1136
1138
  queryKey: ["queue-views", l],
1137
- queryFn: () => h.request(O(`/queues/${l}/views`)),
1139
+ queryFn: () => h.request(D(`/queues/${l}/views`)),
1138
1140
  enabled: !!l
1139
- }), [st, it] = w(null), [Ll, Pn] = w(!1), [Xt, jr] = w(""), [Ur, Vr] = w(!1), [qt, Ir] = w(!1);
1141
+ }), [de, Qe] = w(null), [Kl, Pn] = w(!1), [Xt, Ur] = w(""), [Vr, Ir] = w(!1), [qt, Gr] = w(!1);
1140
1142
  function Rt(e) {
1141
1143
  const t = e.state ?? {};
1142
- te(t.scope ?? "all"), j({ ...he.current, ...t.filters ?? {} }), He(t.sort ?? ""), ft(t.group_by ?? null), Ht(t.columns ?? null), un(t.pins ?? null), t.view && We(Ae.includes(t.view) ? t.view : Ae[0]), D(1), it(e.id);
1144
+ te(t.scope ?? "all"), U({ ...ge.current, ...t.filters ?? {} }), Ye(t.sort ?? ""), ft(t.group_by ?? null), Ht(t.columns ?? null), un(t.pins ?? null), t.view && Je(Oe.includes(t.view) ? t.view : Oe[0]), M(1), Qe(e.id);
1143
1145
  }
1144
- function Tl() {
1146
+ function Pl() {
1145
1147
  var t, n;
1146
- const e = G == null ? void 0 : G.data.find((a) => a.is_default);
1148
+ const e = L == null ? void 0 : L.data.find((a) => a.is_default);
1147
1149
  if (e) {
1148
1150
  Rt(e);
1149
1151
  return;
1150
1152
  }
1151
- te(((t = c == null ? void 0 : c.display_config) == null ? void 0 : t.default_scope) ?? "all"), j({ ...he.current }), He(""), ft(null), Ht(null), un(null), (n = c == null ? void 0 : c.display_config) != null && n.default_view && We(c.display_config.default_view), D(1), it(null);
1153
+ te(((t = c == null ? void 0 : c.display_config) == null ? void 0 : t.default_scope) ?? "all"), U({ ...ge.current }), Ye(""), ft(null), Ht(null), un(null), (n = c == null ? void 0 : c.display_config) != null && n.default_view && Je(c.display_config.default_view), M(1), Qe(null);
1152
1154
  }
1153
- P(() => {
1154
- if (z || !(c != null && c.display_config) || tt === void 0 || G === void 0) return;
1155
- const e = tt.data.default_view_id, t = e != null ? G.data.find((a) => a.id === e) : void 0, n = G.data.find((a) => a.is_default);
1156
- t ? Rt(t) : n ? Rt(n) : (We(c.display_config.default_view), te(c.display_config.default_scope)), Ja(!0);
1157
- }, [c, tt, G, z]);
1155
+ K(() => {
1156
+ if (G || !(c != null && c.display_config) || rt === void 0 || L === void 0) return;
1157
+ const e = rt.data.default_view_id, t = e != null ? L.data.find((a) => a.id === e) : void 0, n = L.data.find((a) => a.is_default);
1158
+ t ? Rt(t) : n ? Rt(n) : (Je(c.display_config.default_view), te(c.display_config.default_scope)), tl(!0);
1159
+ }, [c, rt, L, G]);
1158
1160
  const Zt = Q(null), en = Q(null);
1159
- P(() => {
1160
- if (!z) return;
1161
- const e = ci();
1162
- if (!e || !di(e, l, ys(), xs())) return;
1163
- Pa({ ...e, restore: !1 });
1161
+ K(() => {
1162
+ if (!G) return;
1163
+ const e = yi();
1164
+ if (!e || !ki(e, l, Cs(), Ss())) return;
1165
+ Ua({ ...e, restore: !1 });
1164
1166
  const t = e.state ?? {};
1165
- t.scope && te(t.scope), t.filters && j({ ...he.current, ...t.filters }), t.sort != null && He(t.sort), ft(t.group_by ?? null), t.view && We(t.view), t.page && D(t.page), en.current = e.scroll ?? 0, W && W.length > 0 && dt.back(W.length);
1166
- }, [z, l]), P(() => {
1167
+ t.scope && te(t.scope), t.filters && U({ ...ge.current, ...t.filters }), t.sort != null && Ye(t.sort), ft(t.group_by ?? null), t.view && Je(t.view), t.page && M(t.page), en.current = e.scroll ?? 0, H && H.length > 0 && dt.back(H.length);
1168
+ }, [G, l]), K(() => {
1167
1169
  var s;
1168
- if (!z || typeof window > "u") return;
1170
+ if (!G || typeof window > "u") return;
1169
1171
  const e = new URLSearchParams(window.location.search), t = e.get("scope"), n = ((s = e.get("state")) == null ? void 0 : s.trim()) || null, a = t === "all" || t === "mine";
1170
1172
  if (!a && !n) return;
1171
1173
  e.delete("scope"), e.delete("state");
@@ -1174,9 +1176,9 @@ function Dd({
1174
1176
  window.history.state,
1175
1177
  "",
1176
1178
  `${window.location.pathname}${o ? `?${o}` : ""}${window.location.hash}`
1177
- ), a && te(t), n && j((u) => ({ ...u, state: [n] })), D(1);
1178
- }, [z]), P(() => {
1179
- if (!z || typeof window > "u") return;
1179
+ ), a && te(t), n && U((u) => ({ ...u, state: [n] })), M(1);
1180
+ }, [G]), K(() => {
1181
+ if (!G || typeof window > "u") return;
1180
1182
  const e = new URLSearchParams(window.location.search), t = e.get("owner");
1181
1183
  if (!t) return;
1182
1184
  e.delete("owner");
@@ -1185,174 +1187,180 @@ function Dd({
1185
1187
  window.history.state,
1186
1188
  "",
1187
1189
  `${window.location.pathname}${n ? `?${n}` : ""}${window.location.hash}`
1188
- ), te("all"), j((a) => ({ ...a, owners: [t] })), it(null), D(1);
1189
- }, [z]), P(() => {
1190
- if (!z) return;
1191
- const e = ps(bs(`queue:${l}`));
1192
- e && (fs(), Rt({
1190
+ ), te("all"), U((a) => ({ ...a, owners: [t] })), Qe(null), M(1);
1191
+ }, [G]);
1192
+ const Mn = Q(null);
1193
+ K(() => {
1194
+ if (!G) return;
1195
+ const e = ks(vs(`queue:${l}`));
1196
+ e && (ws(), Rt({
1193
1197
  id: -1,
1194
1198
  // Saved views type filters loosely as strings; multi-selects ride as arrays there too.
1195
1199
  state: e
1196
- }), it(null), e.page && D(e.page));
1197
- }, [z]);
1198
- const Gr = () => ({
1200
+ }), Qe(null), e.page && M(e.page), e.view_id && (Mn.current = e.view_id));
1201
+ }, [G]), K(() => {
1202
+ const e = Mn.current;
1203
+ e == null || !(L != null && L.data) || (Mn.current = null, L.data.some((t) => t.id === e) && Qe(e));
1204
+ }, [L, G]);
1205
+ const Wr = () => ({
1199
1206
  scope: g,
1200
1207
  filters: _,
1201
- sort: B,
1208
+ sort: j,
1202
1209
  group_by: R,
1203
1210
  view: $,
1204
1211
  columns: yt,
1205
- pins: Je,
1206
- ...ue > 1 ? { page: ue } : {}
1212
+ pins: ze,
1213
+ ...se > 1 ? { page: se } : {},
1214
+ ...de != null && de > 0 ? { view_id: de } : {}
1207
1215
  });
1208
- P(() => {
1216
+ K(() => {
1209
1217
  en.current == null || C.length === 0 || !Zt.current || (Zt.current.scrollTop = en.current, en.current = null);
1210
1218
  }, [C]);
1211
- const { isAdmin: Be } = Ea(), El = C.map((e) => `${e.collection}|${e.item_id}`).join(","), Al = J(
1219
+ const { isAdmin: je } = Pa(), Ml = C.map((e) => `${e.collection}|${e.item_id}`).join(","), Bl = Y(
1212
1220
  () => C.map((e) => ({ collection: e.collection, id: e.item_id })),
1213
- [El]
1214
- ), Wr = hi(Al, Be), Ol = (e) => Ct === F(e) ? (
1221
+ [Ml]
1222
+ ), Hr = Ci(Bl, je), Ql = (e) => Ct === F(e) ? (
1215
1223
  // Pinned sticky cells use bg-inherit — the highlight must be
1216
1224
  // OPAQUE (nvr-cyan/5-over-white equivalents) or horizontally
1217
1225
  // scrolled content bleeds through the pinned columns. Same
1218
1226
  // pair DataTable uses for selected rows when pins are active.
1219
1227
  "bg-[#f2fdff] dark:bg-[#20303a]"
1220
- ) : e.at_risk ? Ks(e.at_risk_color ?? "red") : void 0, tn = Be || (c == null ? void 0 : c.owner) != null && c.owner === S, Kl = Te({
1221
- mutationFn: ({ viewId: e, on: t }) => h.request(Aa(`/queues/views/${e}`, { is_default: t })),
1228
+ ) : e.at_risk ? Gs(e.at_risk_color ?? "red") : void 0, tn = je || (c == null ? void 0 : c.owner) != null && c.owner === S, jl = Ae({
1229
+ mutationFn: ({ viewId: e, on: t }) => h.request(Ma(`/queues/views/${e}`, { is_default: t })),
1222
1230
  onSuccess: () => {
1223
- f.invalidateQueries({ queryKey: ["queue-views", l] }), A.success("Queue default view updated");
1231
+ f.invalidateQueries({ queryKey: ["queue-views", l] }), O.success("Queue default view updated");
1224
1232
  },
1225
- onError: () => A.error("Could not update the queue default view")
1226
- }), nn = Te({
1233
+ onError: () => O.error("Could not update the queue default view")
1234
+ }), nn = Ae({
1227
1235
  mutationFn: () => h.request(
1228
- ce(`/queues/${l}/views`, {
1236
+ ue(`/queues/${l}/views`, {
1229
1237
  name: Xt.trim(),
1230
- is_shared: tn && (Ur || qt),
1238
+ is_shared: tn && (Vr || qt),
1231
1239
  is_default: qt,
1232
1240
  state: {
1233
1241
  scope: g,
1234
1242
  filters: _,
1235
- sort: B,
1243
+ sort: j,
1236
1244
  group_by: R,
1237
1245
  view: $,
1238
1246
  columns: yt,
1239
- pins: Je
1247
+ pins: ze
1240
1248
  }
1241
1249
  })
1242
1250
  ),
1243
1251
  onSuccess: (e) => {
1244
- Pn(!1), jr(""), Vr(!1), Ir(!1), it(e.data.id), f.invalidateQueries({ queryKey: ["queue-views", l] }), A.success("View saved");
1252
+ Pn(!1), Ur(""), Ir(!1), Gr(!1), Qe(e.data.id), f.invalidateQueries({ queryKey: ["queue-views", l] }), O.success("View saved");
1245
1253
  },
1246
- onError: () => A.error("Failed to save view")
1247
- }), [Hr, Jr] = w(null), Qe = Te({
1254
+ onError: () => O.error("Failed to save view")
1255
+ }), [Jr, Yr] = w(null), Ue = Ae({
1248
1256
  mutationFn: (e) => h.request(
1249
- Aa(`/queues/views/${e.id}`, {
1257
+ Ma(`/queues/views/${e.id}`, {
1250
1258
  state: {
1251
1259
  scope: g,
1252
1260
  filters: _,
1253
- sort: B,
1261
+ sort: j,
1254
1262
  group_by: R,
1255
1263
  view: $,
1256
1264
  columns: yt,
1257
- pins: Je
1265
+ pins: ze
1258
1266
  }
1259
1267
  })
1260
1268
  ),
1261
1269
  onSuccess: (e, t) => {
1262
- f.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`);
1270
+ f.invalidateQueries({ queryKey: ["queue-views", l] }), Yr(t.id), setTimeout(() => Yr((n) => n === t.id ? null : n), 2e3), O.success(`Saved "${t.name}" with the current filters, scope and sort`);
1263
1271
  },
1264
- onError: () => A.error("Failed to update view")
1265
- }), [Mn, rn] = w(null);
1266
- P(() => {
1267
- if (Mn == null) return;
1272
+ onError: () => O.error("Failed to update view")
1273
+ }), [Bn, rn] = w(null);
1274
+ K(() => {
1275
+ if (Bn == null) return;
1268
1276
  const e = setTimeout(() => rn(null), 5e3);
1269
1277
  return () => clearTimeout(e);
1270
- }, [Mn]);
1271
- const Yr = Te({
1272
- mutationFn: (e) => h.request(zn(`/queues/views/${e}`)),
1278
+ }, [Bn]);
1279
+ const zr = Ae({
1280
+ mutationFn: (e) => h.request(Xn(`/queues/views/${e}`)),
1273
1281
  onSuccess: (e, t) => {
1274
- rn(null), f.invalidateQueries({ queryKey: ["queue-views", l] }), it(null), nt === t && Sn(null);
1282
+ rn(null), f.invalidateQueries({ queryKey: ["queue-views", l] }), Qe(null), at === t && Sn(null);
1275
1283
  },
1276
- onError: () => A.error("Failed to delete view")
1277
- }), Dl = Te({
1278
- mutationFn: (e) => h.request(Xo(`/queues/${l}/default-view`, { view_id: e })),
1284
+ onError: () => O.error("Failed to delete view")
1285
+ }), Ul = Ae({
1286
+ mutationFn: (e) => h.request(ls(`/queues/${l}/default-view`, { view_id: e })),
1279
1287
  onMutate: (e) => Sn(e),
1280
1288
  onSuccess: (e, t) => {
1281
- f.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), A.success(
1289
+ f.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), O.success(
1282
1290
  t === null ? "Reverted to the general default" : "Set as your default view"
1283
1291
  );
1284
1292
  },
1285
1293
  onError: () => {
1286
- f.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), A.error("Failed to update default view");
1294
+ f.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), O.error("Failed to update default view");
1287
1295
  }
1288
- }), [oe, je] = w([]), [ne, zr] = w(!1), Pl = () => {
1289
- ne && je([]), zr(!ne);
1296
+ }), [oe, Ve] = w([]), [ne, Xr] = w(!1), Vl = () => {
1297
+ ne && Ve([]), Xr(!ne);
1290
1298
  };
1291
- P(() => {
1292
- $ !== "table" && ne && (zr(!1), je([]));
1293
- }, [$, ne]), zo(), gn.current = oe.length;
1294
- const [ct, Xr] = w(!1);
1295
- async function Bn(e, t) {
1299
+ K(() => {
1300
+ $ !== "table" && ne && (Xr(!1), Ve([]));
1301
+ }, [$, ne]), as(), gn.current = oe.length;
1302
+ const [ct, Zr] = w(!1);
1303
+ async function Qn(e, t) {
1296
1304
  const n = C.filter((u) => oe.includes(F(u)));
1297
- Xr(!0), Wt.beginBatch();
1305
+ Zr(!0), Wt.beginBatch();
1298
1306
  const a = await Promise.allSettled(n.map(t));
1299
1307
  Wt.endBatch();
1300
1308
  const o = a.filter((u) => u.status === "fulfilled").length, s = a.length - o;
1301
- Xr(!1), je([]), f.invalidateQueries({ queryKey: ["queue-items", l] }), s ? A.warning(`${e}: ${o} succeeded, ${s} failed`) : A.success(`${e}: ${o} succeeded`);
1309
+ Zr(!1), Ve([]), f.invalidateQueries({ queryKey: ["queue-items", l] }), s ? O.warning(`${e}: ${o} succeeded, ${s} failed`) : O.success(`${e}: ${o} succeeded`);
1302
1310
  }
1303
- const Ne = (e) => {
1311
+ const Se = (e) => {
1304
1312
  var t;
1305
1313
  for (const n of (c == null ? void 0 : c.sources) ?? []) {
1306
1314
  const a = (t = n.column_formats) == null ? void 0 : t[e];
1307
1315
  if (a) return a;
1308
1316
  }
1309
1317
  return null;
1310
- }, Ml = (e) => {
1311
- if (R === "state") return e === "No state" ? e : Fe(e);
1312
- if (R === "collection") return lt(e);
1318
+ }, Il = (e) => {
1319
+ if (R === "state") return e === "No state" ? e : Te(e);
1320
+ if (R === "collection") return st(e);
1313
1321
  if (R != null && R.startsWith("extra.") && e !== "—") {
1314
- const t = R.slice(6), n = Ne(t);
1315
- return n ? Ie(e, n) : Kt(
1322
+ const t = R.slice(6), n = Se(t);
1323
+ return n ? We(e, n) : Dt(
1316
1324
  ((c == null ? void 0 : c.extra_field_meta) ?? []).find((a) => a.path === t),
1317
1325
  e
1318
1326
  );
1319
1327
  }
1320
1328
  return e;
1321
- }, Bl = ie == null ? void 0 : ie.map((e) => ({
1329
+ }, Gl = ce == null ? void 0 : ce.map((e) => ({
1322
1330
  key: e.key,
1323
1331
  rows: e.rows,
1324
- header: /* @__PURE__ */ d(Se, { children: [
1325
- /* @__PURE__ */ r("span", { children: Ml(e.key) }),
1332
+ header: /* @__PURE__ */ d(Ce, { children: [
1333
+ /* @__PURE__ */ r("span", { children: Il(e.key) }),
1326
1334
  /* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
1327
1335
  "(",
1328
1336
  ee(e.count),
1329
1337
  ")"
1330
1338
  ] }),
1331
1339
  Object.entries(e.sums).map(([t, n]) => {
1332
- const a = Ne(t);
1340
+ const a = Se(t);
1333
1341
  return /* @__PURE__ */ d(
1334
1342
  "span",
1335
1343
  {
1336
1344
  className: "font-normal tabular-nums text-slate-500 dark:text-slate-400",
1337
1345
  "data-queue-group-sum": t,
1338
1346
  children: [
1339
- T(`extra.${t}`, Ge(t)),
1347
+ A(`extra.${t}`, He(t)),
1340
1348
  ":",
1341
1349
  " ",
1342
- a ? Ie(String(n), a) : ee(n)
1350
+ a ? We(String(n), a) : ee(n)
1343
1351
  ]
1344
1352
  },
1345
1353
  t
1346
1354
  );
1347
1355
  }),
1348
- ke && !Ce.has(e.key) && xl.has(e.key) && /* @__PURE__ */ r("span", { className: "font-normal text-slate-400", children: "loading…" }),
1349
- ke && !Ce.has(e.key) && e.rows.length > 0 && e.rows.length < e.count && /* @__PURE__ */ d(
1356
+ ve && !$e.has(e.key) && Nl.has(e.key) && /* @__PURE__ */ r("span", { className: "font-normal text-slate-400", children: "loading…" }),
1357
+ ve && !$e.has(e.key) && e.rows.length > 0 && e.rows.length < e.count && /* @__PURE__ */ d(
1350
1358
  "button",
1351
1359
  {
1352
1360
  type: "button",
1353
1361
  "data-queue-group-more": e.key,
1354
1362
  onClick: (t) => {
1355
- t.stopPropagation(), Nr((n) => ({ ...n, [e.key]: (n[e.key] ?? 1) + 1 }));
1363
+ t.stopPropagation(), Sr((n) => ({ ...n, [e.key]: (n[e.key] ?? 1) + 1 }));
1356
1364
  },
1357
1365
  className: "rounded px-1.5 py-0.5 text-[11px] font-medium text-nvr-navy hover:bg-nvr-cyan/10 dark:text-nvr-cyan",
1358
1366
  children: [
@@ -1373,36 +1381,36 @@ function Dd({
1373
1381
  " at risk"
1374
1382
  ] })
1375
1383
  ] })
1376
- })), Qn = (((xa = i == null ? void 0 : i.available_values.collection) == null ? void 0 : xa.length) ?? 0) > 1, Zr = C.some((e) => !!e.unseen) || _t.size > 0 || C.some((e) => Ee.isNew(F(e))), ea = [
1377
- ...Qn ? [
1384
+ })), jn = (((ka = i == null ? void 0 : i.available_values.collection) == null ? void 0 : ka.length) ?? 0) > 1, ea = C.some((e) => !!e.unseen) || _t.size > 0 || C.some((e) => Ee.isNew(F(e))), ta = [
1385
+ ...jn ? [
1378
1386
  {
1379
1387
  key: "collection",
1380
- header: T("collection", "Collection"),
1388
+ header: A("collection", "Collection"),
1381
1389
  sortable: !0,
1382
- render: (e) => /* @__PURE__ */ r(Ni, { variant: "outline", children: lt(e.collection) })
1390
+ render: (e) => /* @__PURE__ */ r(Ei, { variant: "outline", children: st(e.collection) })
1383
1391
  }
1384
1392
  ] : [],
1385
1393
  {
1386
1394
  key: "label",
1387
- header: T("label", "Item"),
1395
+ header: A("label", "Item"),
1388
1396
  sortable: !0,
1389
1397
  // Room in the left padding for the hanging unseen mark (#643).
1390
- className: Zr ? "pl-[30px]" : void 0,
1391
- headerClassName: Zr ? "pl-[30px]" : void 0,
1398
+ className: ea ? "pl-[30px]" : void 0,
1399
+ headerClassName: ea ? "pl-[30px]" : void 0,
1392
1400
  render: (e) => (
1393
1401
  // Underlined because clicking opens the item. The row is clickable as
1394
1402
  // a whole, but nothing on it said so — an underline is the one
1395
1403
  // convention people already read as "this goes somewhere".
1396
1404
  /* @__PURE__ */ d("span", { className: "flex items-center gap-1.5", children: [
1397
1405
  _t.get(F(e)) || Ee.isNew(F(e)) ? /* @__PURE__ */ r(
1398
- mi,
1406
+ wi,
1399
1407
  {
1400
1408
  lock: _t.get(F(e)),
1401
1409
  isNew: Ee.isNew(F(e)),
1402
1410
  dataAttr: "data-queue-live-mark",
1403
1411
  hang: !0
1404
1412
  }
1405
- ) : /* @__PURE__ */ r(_i, { change: e.unseen, dataAttr: "data-queue-unseen", hang: !0 }),
1413
+ ) : /* @__PURE__ */ r(Ai, { change: e.unseen, dataAttr: "data-queue-unseen", hang: !0 }),
1406
1414
  /* @__PURE__ */ r(
1407
1415
  "span",
1408
1416
  {
@@ -1421,9 +1429,9 @@ function Dd({
1421
1429
  t
1422
1430
  )),
1423
1431
  /* @__PURE__ */ r(
1424
- wi,
1432
+ Li,
1425
1433
  {
1426
- viewers: ml[Fs(e.collection, e.item_id)],
1434
+ viewers: xl[Ms(e.collection, e.item_id)],
1427
1435
  dataAttr: "data-queue-presence"
1428
1436
  }
1429
1437
  )
@@ -1432,23 +1440,23 @@ function Dd({
1432
1440
  },
1433
1441
  {
1434
1442
  key: "state",
1435
- header: T("state", "State"),
1443
+ header: A("state", "State"),
1436
1444
  sortable: !0,
1437
1445
  render: (e) => e.state ? /* @__PURE__ */ d(
1438
1446
  "span",
1439
1447
  {
1440
- className: L(
1448
+ className: T(
1441
1449
  "inline-block max-w-[190px] truncate whitespace-nowrap rounded px-1.5 py-0.5 align-middle text-[11px] font-medium",
1442
1450
  e.state_color && "text-[color:var(--nvr-state-ink)] dark:text-[color:var(--nvr-state-ink-dark)]"
1443
1451
  ),
1444
1452
  style: e.state_color ? {
1445
1453
  backgroundColor: `${e.state_color}1a`,
1446
- "--nvr-state-ink": Zo(e.state_color),
1454
+ "--nvr-state-ink": os(e.state_color),
1447
1455
  "--nvr-state-ink-dark": e.state_color
1448
1456
  } : void 0,
1449
- title: e.via_addendum ? `Addendum "${e.via_addendum.title ?? ""}" — ${Fe(e.state)}` : Fe(e.state),
1457
+ title: e.via_addendum ? `Addendum "${e.via_addendum.title ?? ""}" — ${Te(e.state)}` : Te(e.state),
1450
1458
  children: [
1451
- Fe(e.state),
1459
+ Te(e.state),
1452
1460
  e.via_addendum && /* @__PURE__ */ r("span", { className: "ml-1 rounded-sm bg-amber-500/15 px-1 text-[9px] font-bold uppercase tracking-wide text-amber-700 dark:text-amber-300", children: "Addendum" })
1453
1461
  ]
1454
1462
  }
@@ -1456,57 +1464,57 @@ function Dd({
1456
1464
  },
1457
1465
  {
1458
1466
  key: "owners",
1459
- header: T("owners", "Owners"),
1467
+ header: A("owners", "Owners"),
1460
1468
  sortable: !0,
1461
- render: (e) => /* @__PURE__ */ r(Ai, { owners: e.owners })
1469
+ render: (e) => /* @__PURE__ */ r(Vi, { owners: e.owners })
1462
1470
  },
1463
1471
  {
1464
1472
  key: "aging_hours",
1465
- header: T("aging_hours", "Aging"),
1473
+ header: A("aging_hours", "Aging"),
1466
1474
  sortable: !0,
1467
- render: (e) => zi(e.aging_hours)
1475
+ render: (e) => oc(e.aging_hours)
1468
1476
  },
1469
1477
  {
1470
1478
  // When the record entered its current state — the same moment Aging
1471
1479
  // counts from (the pipeline history, not the legacy column).
1472
1480
  key: "state_entered",
1473
- header: T("state_entered", "Last State Change"),
1481
+ header: A("state_entered", "Last State Change"),
1474
1482
  sortable: !0,
1475
- render: (e) => e.state_entered_at ? Da(e.state_entered_at) : /* @__PURE__ */ r("span", { className: "text-slate-300 dark:text-slate-600", children: "—" })
1483
+ render: (e) => e.state_entered_at ? ja(e.state_entered_at) : /* @__PURE__ */ r("span", { className: "text-slate-300 dark:text-slate-600", children: "—" })
1476
1484
  },
1477
1485
  {
1478
1486
  key: "sla_status",
1479
- header: T("sla_status", "SLA"),
1487
+ header: A("sla_status", "SLA"),
1480
1488
  sortable: !0,
1481
- render: (e) => /* @__PURE__ */ r(Xi, { status: e.sla_status })
1489
+ render: (e) => /* @__PURE__ */ r(sc, { status: e.sla_status })
1482
1490
  },
1483
1491
  {
1484
1492
  key: "at_risk",
1485
- header: T("at_risk", "Risk"),
1493
+ header: A("at_risk", "Risk"),
1486
1494
  sortable: !0,
1487
1495
  render: (e) => {
1488
1496
  var t;
1489
- return e.at_risk ? /* @__PURE__ */ d("span", { className: Os(e.at_risk_color ?? "red"), children: [
1497
+ return e.at_risk ? /* @__PURE__ */ d("span", { className: Is(e.at_risk_color ?? "red"), children: [
1490
1498
  "⚑ ",
1491
1499
  ((t = e.at_risk_rule) == null ? void 0 : t.name) ?? "At risk"
1492
1500
  ] }) : e.predicted_risk ? /* @__PURE__ */ r("span", { className: "text-amber-500", title: e.predicted_note ?? void 0, children: "⚑ Predicted" }) : null;
1493
1501
  }
1494
1502
  },
1495
- ...at ? [
1503
+ ...ot ? [
1496
1504
  {
1497
1505
  key: "addendums",
1498
- header: T("addendums", "Addendums"),
1506
+ header: A("addendums", "Addendums"),
1499
1507
  sortable: !1,
1500
- render: (e) => /* @__PURE__ */ r(Yi, { summary: e.addendums })
1508
+ render: (e) => /* @__PURE__ */ r(lc, { summary: e.addendums })
1501
1509
  }
1502
1510
  ] : [],
1503
1511
  ...kt ? [
1504
1512
  {
1505
1513
  key: "fulfilment",
1506
- header: T("fulfilment", "Shipped"),
1514
+ header: A("fulfilment", "Shipped"),
1507
1515
  sortable: !0,
1508
1516
  render: (e) => /* @__PURE__ */ r(
1509
- ri,
1517
+ pi,
1510
1518
  {
1511
1519
  collection: e.collection,
1512
1520
  itemId: e.item_id,
@@ -1515,21 +1523,21 @@ function Dd({
1515
1523
  )
1516
1524
  }
1517
1525
  ] : [],
1518
- ...qe ? [
1526
+ ...Re ? [
1519
1527
  {
1520
1528
  key: "integrations",
1521
- header: T("integrations", "Integrations"),
1529
+ header: A("integrations", "Integrations"),
1522
1530
  sortable: !1,
1523
- render: (e) => /* @__PURE__ */ r(oi, { rows: _l[`${e.collection}:${e.item_id}`] })
1531
+ render: (e) => /* @__PURE__ */ r(hi, { rows: Rl[`${e.collection}:${e.item_id}`] })
1524
1532
  }
1525
1533
  ] : [],
1526
1534
  ...Er ? [
1527
1535
  {
1528
1536
  key: "tasks",
1529
- header: T("tasks", "Tasks"),
1537
+ header: A("tasks", "Tasks"),
1530
1538
  sortable: !1,
1531
1539
  render: (e) => {
1532
- const t = Sl[`${e.collection}:${e.item_id}`];
1540
+ const t = Tl[`${e.collection}:${e.item_id}`];
1533
1541
  return !t || t.open === 0 ? /* @__PURE__ */ r("span", { className: "text-[11px] text-slate-400", children: "—" }) : /* @__PURE__ */ d(
1534
1542
  "span",
1535
1543
  {
@@ -1547,12 +1555,12 @@ function Dd({
1547
1555
  ...vt ? [
1548
1556
  {
1549
1557
  key: "send_backs",
1550
- header: T("send_backs", "Sent back"),
1558
+ header: A("send_backs", "Sent back"),
1551
1559
  sortable: !0,
1552
- render: (e) => /* @__PURE__ */ r(Wi, { summary: e.send_backs })
1560
+ render: (e) => /* @__PURE__ */ r(rc, { summary: e.send_backs })
1553
1561
  }
1554
1562
  ] : []
1555
- ], Ql = {
1563
+ ], Wl = {
1556
1564
  key: "claim",
1557
1565
  header: "",
1558
1566
  render: (e) => e.claimed_by ? /* @__PURE__ */ r(
@@ -1560,7 +1568,7 @@ function Dd({
1560
1568
  {
1561
1569
  type: "button",
1562
1570
  onClick: (t) => {
1563
- t.stopPropagation(), et.mutate(e);
1571
+ t.stopPropagation(), nt.mutate(e);
1564
1572
  },
1565
1573
  className: "text-[11px] text-slate-400 underline hover:text-slate-600",
1566
1574
  children: "Release"
@@ -1570,36 +1578,47 @@ function Dd({
1570
1578
  {
1571
1579
  type: "button",
1572
1580
  onClick: (t) => {
1573
- t.stopPropagation(), De.mutate(e);
1581
+ t.stopPropagation(), Pe.mutate(e);
1574
1582
  },
1575
1583
  className: "text-[11px] font-medium text-nvr-navy underline dark:text-nvr-cyan",
1576
1584
  children: "Claim"
1577
1585
  }
1578
1586
  )
1579
- }, Ft = (c == null ? void 0 : c.available_extra_fields) ?? [], dt = Wo("drill.queue"), W = dt.value, ta = (e) => dt.push([e]), jn = Q(null);
1580
- P(() => {
1587
+ }, Ft = (c == null ? void 0 : c.available_extra_fields) ?? [], dt = es("drill.queue"), H = dt.value, na = (e) => dt.push([e]), Un = Q(null);
1588
+ K(() => {
1581
1589
  var a;
1582
- if (!z || !l) return;
1583
- const e = `queue:${l}`, t = Gr(), n = hs(e, t);
1584
- if (((a = jn.current) == null ? void 0 : a.queue) !== l) {
1585
- jn.current = { queue: l, enc: n };
1590
+ if (!G || !l) return;
1591
+ const e = `queue:${l}`, t = Wr(), n = _s(e, t);
1592
+ if (((a = Un.current) == null ? void 0 : a.queue) !== l) {
1593
+ Un.current = { queue: l, enc: n };
1586
1594
  return;
1587
1595
  }
1588
- gs(e, n === jn.current.enc ? null : t);
1596
+ Ns(e, n === Un.current.enc ? null : t);
1589
1597
  }, [
1590
- z,
1598
+ G,
1591
1599
  l,
1592
1600
  g,
1593
1601
  _,
1594
- B,
1602
+ j,
1595
1603
  R,
1596
1604
  $,
1597
1605
  yt,
1598
- Je,
1599
- ue,
1600
- W
1606
+ ze,
1607
+ se,
1608
+ de,
1609
+ H
1601
1610
  ]);
1602
- const jl = (e) => {
1611
+ const Hl = ((wa = (va = L == null ? void 0 : L.data) == null ? void 0 : va.find((e) => e.id === de)) == null ? void 0 : wa.name) ?? null, ra = Ls({
1612
+ view: Hl ?? (g !== "all" ? ((_a = Wa.find((e) => e.value === g)) == null ? void 0 : _a.label) ?? null : null),
1613
+ filters: Object.values(_).filter(
1614
+ (e) => Array.isArray(e) ? e.length > 0 : String(e ?? "").trim() !== ""
1615
+ ).length,
1616
+ page: se
1617
+ });
1618
+ K(() => {
1619
+ G && l && As(ra);
1620
+ }, [G, l, ra]);
1621
+ const Jl = (e) => {
1603
1622
  var t;
1604
1623
  for (const n of (c == null ? void 0 : c.sources) ?? []) {
1605
1624
  const a = (t = n.drilldown) == null ? void 0 : t[e];
@@ -1611,79 +1630,79 @@ function Dd({
1611
1630
  };
1612
1631
  }
1613
1632
  return { enabled: !0, layout_id: null, width: null };
1614
- }, Ul = J(() => {
1633
+ }, Yl = Y(() => {
1615
1634
  const e = {};
1616
1635
  for (const t of (c == null ? void 0 : c.sources) ?? [])
1617
1636
  for (const [n, a] of Object.entries(t.column_formats ?? {}))
1618
1637
  n in e || (e[n] = a);
1619
1638
  return e;
1620
- }, [c == null ? void 0 : c.sources]), Vl = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Il = /^\d{4}-\d{2}-\d{2}T\d{2}:/;
1621
- function Gl(e) {
1622
- if (Vl.test(e)) return { text: e.split("@")[0], title: e };
1623
- if (Il.test(e)) {
1639
+ }, [c == null ? void 0 : c.sources]), zl = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xl = /^\d{4}-\d{2}-\d{2}T\d{2}:/;
1640
+ function Zl(e) {
1641
+ if (zl.test(e)) return { text: e.split("@")[0], title: e };
1642
+ if (Xl.test(e)) {
1624
1643
  const t = new Date(e);
1625
1644
  if (!Number.isNaN(t.getTime()))
1626
1645
  return {
1627
1646
  // The one read-only date style (army 11), the full stamp on hover.
1628
- text: js(t),
1629
- title: Da(t)
1647
+ text: Xs(t),
1648
+ title: ja(t)
1630
1649
  };
1631
1650
  }
1632
1651
  return { text: e, title: e };
1633
1652
  }
1634
- const Un = is(p == null ? void 0 : p.inline_edit), na = Un.enabled ? [
1653
+ const Vn = fs(p == null ? void 0 : p.inline_edit), aa = Vn.enabled ? [
1635
1654
  ...new Set(
1636
1655
  ((c == null ? void 0 : c.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
1637
1656
  )
1638
- ] : [], Wl = Ve({
1639
- queries: na.map((e) => ({
1657
+ ] : [], eo = Ge({
1658
+ queries: aa.map((e) => ({
1640
1659
  queryKey: ["cbv-collection-meta", e],
1641
- queryFn: () => h.request(O(`/collections/${e}`)).then((t) => t.data),
1660
+ queryFn: () => h.request(D(`/collections/${e}`)).then((t) => t.data),
1642
1661
  staleTime: 10 * 6e4,
1643
1662
  retry: !1
1644
1663
  }))
1645
- }), Vn = /* @__PURE__ */ new Map();
1646
- na.forEach((e, t) => {
1664
+ }), In = /* @__PURE__ */ new Map();
1665
+ aa.forEach((e, t) => {
1647
1666
  var a;
1648
- const n = (a = Wl[t]) == null ? void 0 : a.data;
1649
- n && Vn.set(e, {
1667
+ const n = (a = eo[t]) == null ? void 0 : a.data;
1668
+ n && In.set(e, {
1650
1669
  fields: new Map((n.fields ?? []).map((o) => [o.field, o])),
1651
1670
  relations: n.relations ?? []
1652
1671
  });
1653
1672
  });
1654
- const { data: Hl } = X({
1673
+ const { data: to } = X({
1655
1674
  queryKey: ["my-permissions"],
1656
- queryFn: () => h.request(O("/security/my/permissions")).then((e) => e.data),
1657
- enabled: Un.enabled && !Be,
1675
+ queryFn: () => h.request(D("/security/my/permissions")).then((e) => e.data),
1676
+ enabled: Vn.enabled && !je,
1658
1677
  staleTime: 5 * 6e4
1659
- }), ra = bi(), aa = (e, t) => {
1678
+ }), la = Ni(), oa = (e, t) => {
1660
1679
  if (t.includes(".")) return null;
1661
- const n = Vn.get(e.collection);
1680
+ const n = In.get(e.collection);
1662
1681
  if (!n) return null;
1663
1682
  const a = _t.get(F(e));
1664
- return a && !a.is_mine ? null : us({
1665
- config: Un,
1683
+ return a && !a.is_mine ? null : xs({
1684
+ config: Vn,
1666
1685
  key: t,
1667
1686
  field: n.fields.get(t),
1668
1687
  collection: e.collection,
1669
1688
  relations: n.relations,
1670
- mayUpdate: Be || Zs(Hl, e.collection)
1689
+ mayUpdate: je || ci(to, e.collection)
1671
1690
  });
1672
- }, la = (e, t, n) => {
1691
+ }, sa = (e, t, n) => {
1673
1692
  var a, o, s;
1674
1693
  return n === "m2o" ? ((o = (a = e.extra_ids) == null ? void 0 : a[t]) == null ? void 0 : o[0]) ?? null : ((s = e.extra) == null ? void 0 : s[t]) ?? null;
1675
- }, Jl = (e, t, n, a, o) => {
1676
- 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" ? {
1694
+ }, no = (e, t, n, a, o) => {
1695
+ const s = (b) => `${F(e)}|${b}`, u = [...re].filter((b) => b.startsWith("extra.")).map((b) => b.slice(6)).filter((b) => !!oa(e, b)), m = o === 0 ? null : ys(u, t, o), y = (b) => b.collection === e.collection && b.item_id === e.item_id, N = (b) => y(b) ? n === "m2o" ? {
1677
1696
  ...b,
1678
1697
  extra_ids: { ...b.extra_ids ?? {}, [t]: a == null ? [] : [String(a)] }
1679
1698
  } : { ...b, extra: { ...b.extra ?? {}, [t]: a } } : b;
1680
- ra.commit({
1699
+ la.commit({
1681
1700
  cellKey: s(t),
1682
1701
  collection: e.collection,
1683
1702
  id: e.item_id,
1684
1703
  field: t,
1685
1704
  kind: n,
1686
- before: la(e, t, n),
1705
+ before: sa(e, t, n),
1687
1706
  value: a,
1688
1707
  next: m ? s(m) : null,
1689
1708
  optimistic: () => {
@@ -1698,42 +1717,42 @@ function Dd({
1698
1717
  // Labels, rollups and the row's place in the queue follow the server.
1699
1718
  onSaved: () => void f.invalidateQueries({ queryKey: ["queue-items", l] })
1700
1719
  });
1701
- }, Yl = (e, t, n) => {
1702
- const a = aa(e, t);
1720
+ }, ro = (e, t, n) => {
1721
+ const a = oa(e, t);
1703
1722
  if (!a) return n;
1704
- const o = Vn.get(e.collection), s = o == null ? void 0 : o.fields.get(t);
1723
+ const o = In.get(e.collection), s = o == null ? void 0 : o.fields.get(t);
1705
1724
  return /* @__PURE__ */ r(
1706
- fi,
1725
+ Si,
1707
1726
  {
1708
- controller: ra,
1727
+ controller: la,
1709
1728
  cellKey: `${F(e)}|${t}`,
1710
1729
  kind: a,
1711
- value: la(e, t, a),
1712
- label: T(`extra.${t}`, Ge(t)),
1713
- choices: s ? ds(s) : void 0,
1714
- target: a === "m2o" && o ? cs(o.relations, e.collection, t) : null,
1715
- onCommit: (u, m) => Jl(e, t, a, u, m),
1730
+ value: sa(e, t, a),
1731
+ label: A(`extra.${t}`, He(t)),
1732
+ choices: s ? gs(s) : void 0,
1733
+ target: a === "m2o" && o ? hs(o.relations, e.collection, t) : null,
1734
+ onCommit: (u, m) => no(e, t, a, u, m),
1716
1735
  children: n
1717
1736
  }
1718
1737
  );
1719
- }, zl = Ft.map((e) => ({
1738
+ }, ao = Ft.map((e) => ({
1720
1739
  key: `extra.${e}`,
1721
- header: T(`extra.${e}`, Ge(e)),
1740
+ header: A(`extra.${e}`, He(e)),
1722
1741
  sortable: !0,
1723
- render: (t) => Yl(t, e, Xl(t, e))
1742
+ render: (t) => ro(t, e, lo(t, e))
1724
1743
  }));
1725
- function Xl(e, t) {
1744
+ function lo(e, t) {
1726
1745
  var n, a;
1727
1746
  {
1728
1747
  const o = (n = e.extra) == null ? void 0 : n[t];
1729
1748
  if (o == null || o === "") return /* @__PURE__ */ r("span", { className: "text-slate-300", children: "—" });
1730
- const s = Ne(t), u = ((c == null ? void 0 : c.extra_field_meta) ?? []).find((v) => v.path === t), m = s ? Ie(String(o), s) : Kt(u, String(o)), { text: y, title: N } = Gl(m), b = ((a = e.extra_ids) == null ? void 0 : a[t]) ?? [], E = jl(t);
1749
+ const s = Se(t), u = ((c == null ? void 0 : c.extra_field_meta) ?? []).find((v) => v.path === t), m = s ? We(String(o), s) : Dt(u, String(o)), { text: y, title: N } = Zl(m), b = ((a = e.extra_ids) == null ? void 0 : a[t]) ?? [], E = Jl(t);
1731
1750
  return (u == null ? void 0 : u.kind) === "relation" && u.target_collection && b.length > 0 && E.enabled && !u.aggregate ? /* @__PURE__ */ r(
1732
1751
  "button",
1733
1752
  {
1734
1753
  type: "button",
1735
1754
  onClick: (v) => {
1736
- v.stopPropagation(), ta({
1755
+ v.stopPropagation(), na({
1737
1756
  collection: u.target_collection,
1738
1757
  itemId: b[0],
1739
1758
  layoutId: E.layout_id,
@@ -1759,55 +1778,55 @@ function Dd({
1759
1778
  ) : /* @__PURE__ */ r("span", { className: "block max-w-[200px] truncate text-[12px]", title: N, children: y });
1760
1779
  }
1761
1780
  }
1762
- const oa = [
1763
- ...Qn ? ["collection"] : [],
1781
+ const ia = [
1782
+ ...jn ? ["collection"] : [],
1764
1783
  "state",
1765
1784
  "owners",
1766
1785
  "aging_hours",
1767
1786
  "state_entered",
1768
1787
  "sla_status",
1769
1788
  "at_risk",
1770
- ...at ? ["addendums"] : [],
1789
+ ...ot ? ["addendums"] : [],
1771
1790
  ...kt ? ["fulfilment"] : [],
1772
- ...qe ? ["integrations"] : [],
1791
+ ...Re ? ["integrations"] : [],
1773
1792
  ...vt ? ["send_backs"] : [],
1774
1793
  ...Er ? ["tasks"] : [],
1775
1794
  ...Ft.map((e) => `extra.${e}`)
1776
- ], Zl = [
1777
- ...Qn ? ["collection"] : [],
1795
+ ], oo = [
1796
+ ...jn ? ["collection"] : [],
1778
1797
  "state",
1779
1798
  "owners",
1780
- ...at ? ["addendums"] : [],
1799
+ ...ot ? ["addendums"] : [],
1781
1800
  ...kt ? ["fulfilment"] : [],
1782
- ...qe ? ["integrations"] : [],
1801
+ ...Re ? ["integrations"] : [],
1783
1802
  ...vt ? ["send_backs"] : [],
1784
1803
  "aging_hours",
1785
1804
  "sla_status",
1786
1805
  "at_risk",
1787
1806
  ...Ft.slice(0, 2).map((e) => `extra.${e}`)
1788
- ], eo = (p == null ? void 0 : p.default_columns) ?? null, In = yt ?? eo, re = new Set(In ?? Zl);
1789
- at && !Mt.has("addendums") && re.add("addendums"), kt && !Mt.has("fulfilment") && re.add("fulfilment"), qe && !Mt.has("integrations") && re.add("integrations"), vt && !Mt.has("send_backs") && re.add("send_backs");
1790
- const to = new Set(Be ? [] : (p == null ? void 0 : p.admin_only_columns) ?? []);
1791
- for (const e of to) re.delete(e);
1792
- const Lt = [
1793
- ...(In ?? []).filter((e) => oa.includes(e)),
1794
- ...oa.filter((e) => !(In ?? []).includes(e))
1795
- ], no = bo(fo(ho, { activationConstraint: { distance: 4 } }));
1796
- function ro(e) {
1807
+ ], so = (p == null ? void 0 : p.default_columns) ?? null, Gn = yt ?? so, re = new Set(Gn ?? oo);
1808
+ ot && !Mt.has("addendums") && re.add("addendums"), kt && !Mt.has("fulfilment") && re.add("fulfilment"), Re && !Mt.has("integrations") && re.add("integrations"), vt && !Mt.has("send_backs") && re.add("send_backs");
1809
+ const io = new Set(je ? [] : (p == null ? void 0 : p.admin_only_columns) ?? []);
1810
+ for (const e of io) re.delete(e);
1811
+ const Tt = [
1812
+ ...(Gn ?? []).filter((e) => ia.includes(e)),
1813
+ ...ia.filter((e) => !(Gn ?? []).includes(e))
1814
+ ], co = vo(wo(_o, { activationConstraint: { distance: 4 } }));
1815
+ function uo(e) {
1797
1816
  const { active: t, over: n } = e;
1798
1817
  if (!n || t.id === n.id) return;
1799
- const a = Lt.indexOf(String(t.id)), o = Lt.indexOf(String(n.id));
1818
+ const a = Tt.indexOf(String(t.id)), o = Tt.indexOf(String(n.id));
1800
1819
  a === -1 || o === -1 || Ht(
1801
- vo(Lt, a, o).filter((s) => re.has(s))
1820
+ qo(Tt, a, o).filter((s) => re.has(s))
1802
1821
  );
1803
1822
  }
1804
- const sa = ea.find((e) => e.key === "label"), ao = {
1805
- ...sa,
1823
+ const ca = ta.find((e) => e.key === "label"), mo = {
1824
+ ...ca,
1806
1825
  render: (e, ...t) => /* @__PURE__ */ d("span", { className: "inline-flex min-w-0 items-center gap-1.5", children: [
1807
- /* @__PURE__ */ r(Js, { rowId: e.item_id }),
1808
- sa.render(e, ...t)
1826
+ /* @__PURE__ */ r(li, { rowId: e.item_id }),
1827
+ ca.render(e, ...t)
1809
1828
  ] })
1810
- }, lo = ((p == null ? void 0 : p.formula_columns) ?? []).map(
1829
+ }, po = ((p == null ? void 0 : p.formula_columns) ?? []).map(
1811
1830
  (e) => ({
1812
1831
  key: `formula.${e.key}`,
1813
1832
  header: e.label,
@@ -1815,7 +1834,7 @@ function Dd({
1815
1834
  const n = {
1816
1835
  ...t,
1817
1836
  ...t.extra ? Object.fromEntries(Object.entries(t.extra).map(([s, u]) => [`extra.${s}`, u])) : {}
1818
- }, a = es(e.formula, (s) => {
1837
+ }, a = ss(e.formula, (s) => {
1819
1838
  const u = n[s] ?? (t.extra ? t.extra[s] : void 0), m = Number(u);
1820
1839
  return Number.isFinite(m) ? m : u ?? null;
1821
1840
  });
@@ -1824,102 +1843,102 @@ function Dd({
1824
1843
  return Number.isFinite(o) ? /* @__PURE__ */ r("span", { className: "tabular-nums", children: e.format === "currency" ? o.toLocaleString(void 0, { style: "currency", currency: "USD" }) : o.toLocaleString() }) : /* @__PURE__ */ r("span", { children: String(a) });
1825
1844
  }
1826
1845
  })
1827
- ), Gn = [...ea, ...zl, ...lo], ia = Ri(
1828
- Lt,
1846
+ ), Wn = [...ta, ...ao, ...po], da = Mi(
1847
+ Tt,
1829
1848
  (e) => {
1830
1849
  var n;
1831
- const t = (n = Gn.find((a) => a.key === e)) == null ? void 0 : n.header;
1850
+ const t = (n = Wn.find((a) => a.key === e)) == null ? void 0 : n.header;
1832
1851
  return typeof t == "string" ? t : e;
1833
1852
  },
1834
1853
  re
1835
- ), oo = {
1854
+ ), bo = {
1836
1855
  key: "__actions__",
1837
1856
  header: "",
1838
1857
  render: (e) => e.collection === "tasks" || e.collection === sn ? null : /* @__PURE__ */ r("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ r(
1839
- Xs,
1858
+ ii,
1840
1859
  {
1841
1860
  collection: e.collection,
1842
1861
  id: e.item_id,
1843
1862
  label: e.label,
1844
1863
  hasPipeline: e.state != null,
1845
- onOpen: () => ot(e),
1846
- onPeek: () => Me(e),
1847
- urlFor: Y.urlFor,
1864
+ onOpen: () => it(e),
1865
+ onPeek: () => Be(e),
1866
+ urlFor: z.urlFor,
1848
1867
  onDeleted: () => {
1849
- h.request(zn(`/items/${e.collection}/${e.item_id}`)).then(() => {
1850
- A.success("Moved to trash"), f.invalidateQueries({ queryKey: ["queue-items", l] });
1851
- }).catch((t) => A.error(ut(t, "Delete failed")));
1868
+ h.request(Xn(`/items/${e.collection}/${e.item_id}`)).then(() => {
1869
+ O.success("Moved to trash"), f.invalidateQueries({ queryKey: ["queue-items", l] });
1870
+ }).catch((t) => O.error(ut(t, "Delete failed")));
1852
1871
  },
1853
1872
  onAfterTransition: () => void f.invalidateQueries({ queryKey: ["queue-items", l] }),
1854
1873
  bulkEnabledKeys: (p == null ? void 0 : p.bulk_action_keys) ?? null,
1855
1874
  disabled: ne
1856
1875
  }
1857
1876
  ) })
1858
- }, Tt = [
1859
- ao,
1860
- ...Lt.filter((e) => re.has(e)).map((e) => Gn.find((t) => t.key === e)).filter((e) => e !== void 0),
1861
- ...ge ? [Ql] : [],
1862
- oo
1863
- ], [Wn, ca] = w(!1);
1864
- async function so() {
1865
- if (!(!c || Wn)) {
1866
- ca(!0);
1877
+ }, Lt = [
1878
+ mo,
1879
+ ...Tt.filter((e) => re.has(e)).map((e) => Wn.find((t) => t.key === e)).filter((e) => e !== void 0),
1880
+ ...xe ? [Wl] : [],
1881
+ bo
1882
+ ], [Hn, ua] = w(!1);
1883
+ async function fo() {
1884
+ if (!(!c || Hn)) {
1885
+ ua(!0);
1867
1886
  try {
1868
1887
  const t = [];
1869
1888
  for (let m = 1; t.length < 1e4; m++) {
1870
1889
  const y = await h.request(
1871
- O(`/queues/${l}/items`, {
1890
+ D(`/queues/${l}/items`, {
1872
1891
  scope: g,
1873
- sort: B === "state_entered" ? "-aging_hours" : B === "-state_entered" ? "aging_hours" : B,
1874
- filters: JSON.stringify(xe),
1892
+ sort: j === "state_entered" ? "-aging_hours" : j === "-state_entered" ? "aging_hours" : j,
1893
+ filters: JSON.stringify(ye),
1875
1894
  page: m,
1876
1895
  limit: 100
1877
1896
  })
1878
1897
  ), N = y.data ?? [];
1879
1898
  if (t.push(...N), N.length < 100 || t.length >= (y.total ?? 0)) break;
1880
1899
  }
1881
- const n = (m) => (c.extra_field_meta ?? []).find((y) => y.path === m), a = Vi(
1900
+ const n = (m) => (c.extra_field_meta ?? []).find((y) => y.path === m), a = ec(
1882
1901
  t.slice(0, 1e4),
1883
- Tt.map((m) => ({
1902
+ Lt.map((m) => ({
1884
1903
  key: m.key,
1885
1904
  header: typeof m.header == "string" ? m.header : m.key === "label" ? "Item" : ""
1886
1905
  })),
1887
1906
  {
1888
- stateLabel: Fe,
1889
- collectionLabel: lt,
1907
+ stateLabel: Te,
1908
+ collectionLabel: st,
1890
1909
  extraText: (m, y) => {
1891
- const N = Ne(m);
1892
- return N && N.type !== "number" ? Ie(y, N) : Kt(n(m), y);
1910
+ const N = Se(m);
1911
+ return N && N.type !== "number" ? We(y, N) : Dt(n(m), y);
1893
1912
  },
1894
1913
  extraIsNumber: (m) => {
1895
1914
  var y;
1896
- return ((y = Ne(m)) == null ? void 0 : y.type) === "number";
1915
+ return ((y = Se(m)) == null ? void 0 : y.type) === "number";
1897
1916
  }
1898
1917
  }
1899
1918
  ), o = new Blob([a], { type: "text/csv;charset=utf-8" }), s = URL.createObjectURL(o), u = document.createElement("a");
1900
- u.href = s, u.download = Ii(c.name), document.body.appendChild(u), u.click(), u.remove(), setTimeout(() => URL.revokeObjectURL(s), 1e3), A.success(
1919
+ u.href = s, u.download = tc(c.name), document.body.appendChild(u), u.click(), u.remove(), setTimeout(() => URL.revokeObjectURL(s), 1e3), O.success(
1901
1920
  t.length >= 1e4 ? `Exported the first ${1e4.toLocaleString("en-US")} rows` : `Exported ${t.length.toLocaleString("en-US")} ${t.length === 1 ? "row" : "rows"}`
1902
1921
  );
1903
1922
  } catch (e) {
1904
- A.error(ut(e, "Could not export this worklist"));
1923
+ O.error(ut(e, "Could not export this worklist"));
1905
1924
  } finally {
1906
- ca(!1);
1925
+ ua(!1);
1907
1926
  }
1908
1927
  }
1909
1928
  }
1910
- const da = J(() => {
1929
+ const ma = Y(() => {
1911
1930
  var a;
1912
- const e = p == null ? void 0 : p.default_pins, t = Je ?? (e && Object.keys(e).length > 0 ? e : { [((a = Tt[0]) == null ? void 0 : a.key) ?? "label"]: "left" }), n = new Set(Tt.map((o) => o.key));
1931
+ const e = p == null ? void 0 : p.default_pins, t = ze ?? (e && Object.keys(e).length > 0 ? e : { [((a = Lt[0]) == null ? void 0 : a.key) ?? "label"]: "left" }), n = new Set(Lt.map((o) => o.key));
1913
1932
  return Object.fromEntries(Object.entries(t).filter(([o]) => n.has(o)));
1914
- }, [Je, p == null ? void 0 : p.default_pins, Tt.map((e) => e.key).join("|")]), ua = [
1933
+ }, [ze, p == null ? void 0 : p.default_pins, Lt.map((e) => e.key).join("|")]), pa = [
1915
1934
  { value: "state", label: "State" },
1916
1935
  { value: "collection", label: "Collection" },
1917
1936
  { value: "sla_status", label: "SLA status" },
1918
1937
  { value: "at_risk", label: "At risk" },
1919
1938
  { value: "owners", label: "Owner" },
1920
1939
  { value: "aging", label: "Aging" },
1921
- ...Ft.filter((e) => re.has(`extra.${e}`)).map((e) => ({ value: `extra.${e}`, label: T(`extra.${e}`, Ge(e)) }))
1922
- ], ma = (e) => async (t, n) => {
1940
+ ...Ft.filter((e) => re.has(`extra.${e}`)).map((e) => ({ value: `extra.${e}`, label: A(`extra.${e}`, He(e)) }))
1941
+ ], ba = (e) => async (t, n) => {
1923
1942
  if (!e.target_collection || !e.display_field) return [];
1924
1943
  const a = {
1925
1944
  limit: 25,
@@ -1927,14 +1946,14 @@ function Dd({
1927
1946
  // Records hidden from pickers (a retired zone) are not offered.
1928
1947
  picker: "1"
1929
1948
  }, o = (n == null ? void 0 : n.narrowBy) ?? [], s = [];
1930
- for (const [q, V] of Object.entries(fe)) {
1931
- if (q === e.path || V.length === 0) continue;
1932
- const H = an.get(q);
1933
- !(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 });
1949
+ for (const [q, I] of Object.entries(he)) {
1950
+ if (q === e.path || I.length === 0) continue;
1951
+ const J = an.get(q);
1952
+ !(J != null && J.target_collection) || !J.display_field || o.some((ln) => ln.collection === J.target_collection) || s.push({ collection: J.target_collection, field: J.display_field, values: I });
1934
1953
  }
1935
- const u = [...o, ...s], m = u.length ? Ts(
1954
+ const u = [...o, ...s], m = u.length ? js(
1936
1955
  e.target_collection,
1937
- await Es(h, f, e.target_collection),
1956
+ await Us(h, f, e.target_collection),
1938
1957
  u
1939
1958
  ) : null, y = [
1940
1959
  ...t.trim() ? [{ [e.display_field]: { _contains: t.trim() } }] : [],
@@ -1942,43 +1961,43 @@ function Dd({
1942
1961
  ];
1943
1962
  y.length > 0 && (a.filter = JSON.stringify(y.length === 1 ? y[0] : { _and: y }));
1944
1963
  const b = (await h.request(
1945
- O(`/items/${e.target_collection}`, a)
1946
- )).data ?? [], E = Ne(e.path), v = fe[e.path] ? new Set(fe[e.path]) : null, ae = /* @__PURE__ */ new Set(), pe = [];
1964
+ D(`/items/${e.target_collection}`, a)
1965
+ )).data ?? [], E = Se(e.path), v = he[e.path] ? new Set(he[e.path]) : null, ae = /* @__PURE__ */ new Set(), be = [];
1947
1966
  for (const q of b) {
1948
- const V = q[e.display_field];
1949
- if (V == null || V === "") continue;
1950
- const H = String(V);
1951
- ae.has(H) || v && !v.has(H) || (ae.add(H), pe.push({ label: E ? Ie(H, E) : H, value: H }));
1967
+ const I = q[e.display_field];
1968
+ if (I == null || I === "") continue;
1969
+ const J = String(I);
1970
+ ae.has(J) || v && !v.has(J) || (ae.add(J), be.push({ label: E ? We(J, E) : J, value: J }));
1952
1971
  }
1953
- return pe;
1954
- }, an = new Map(((c == null ? void 0 : c.extra_field_meta) ?? []).map((e) => [e.path, e])), Ue = [
1972
+ return be;
1973
+ }, an = new Map(((c == null ? void 0 : c.extra_field_meta) ?? []).map((e) => [e.path, e])), Ie = [
1955
1974
  {
1956
1975
  key: "collection",
1957
- placeholder: T("collection", "Collection"),
1976
+ placeholder: A("collection", "Collection"),
1958
1977
  type: "combobox",
1959
1978
  multi: !0,
1960
1979
  options: ((i == null ? void 0 : i.available_values.collection) ?? []).map((e) => ({
1961
- label: lt(e),
1980
+ label: st(e),
1962
1981
  value: e
1963
1982
  }))
1964
1983
  },
1965
1984
  {
1966
1985
  key: "state",
1967
- placeholder: T("state", "State"),
1986
+ placeholder: A("state", "State"),
1968
1987
  type: "combobox",
1969
1988
  multi: !0,
1970
1989
  // Until the rows land, the pipeline's own states (no counts yet) rather
1971
1990
  // than an empty list.
1972
- options: Mr(
1973
- i ? i.available_values.state ?? [] : Object.keys(Re)
1991
+ options: Br(
1992
+ i ? i.available_values.state ?? [] : Object.keys(Fe)
1974
1993
  ).map((e) => {
1975
1994
  var t;
1976
1995
  return {
1977
- label: Fe(e),
1996
+ label: Te(e),
1978
1997
  value: e,
1979
1998
  // How many rows sit in it under the other active filters (the State
1980
1999
  // filter itself left out, or every other state would read 0).
1981
- count: Cr ? Cr[e] ?? 0 : (t = x == null ? void 0 : x.by_state) == null ? void 0 : t[e]
2000
+ count: $r ? $r[e] ?? 0 : (t = x == null ? void 0 : x.by_state) == null ? void 0 : t[e]
1982
2001
  };
1983
2002
  })
1984
2003
  },
@@ -2001,21 +2020,21 @@ function Dd({
2001
2020
  { label: "No", value: "no" }
2002
2021
  ]
2003
2022
  },
2004
- ...Or.length > 0 ? [
2023
+ ...Dr.length > 0 ? [
2005
2024
  {
2006
2025
  key: "at_risk_rule",
2007
2026
  placeholder: "Highlight rule",
2008
2027
  type: "select",
2009
- options: Or
2028
+ options: Dr
2010
2029
  }
2011
2030
  ] : [],
2012
2031
  {
2013
2032
  key: "aging_hours",
2014
- placeholder: T("aging_hours", "Aging (hours)"),
2033
+ placeholder: A("aging_hours", "Aging (hours)"),
2015
2034
  type: "range",
2016
2035
  range_unit: "h"
2017
2036
  },
2018
- ...at ? [
2037
+ ...ot ? [
2019
2038
  {
2020
2039
  key: "addendums",
2021
2040
  placeholder: "Addendums",
@@ -2028,12 +2047,12 @@ function Dd({
2028
2047
  ] : [],
2029
2048
  // #630 — integration partners; the queue read model filters on it
2030
2049
  // (live path in memory, materialized cache in SQL).
2031
- ...qe ? [
2050
+ ...Re ? [
2032
2051
  {
2033
2052
  key: "integrations",
2034
- placeholder: T("integrations", "Integrations"),
2053
+ placeholder: A("integrations", "Integrations"),
2035
2054
  type: "select",
2036
- options: si.map((e) => ({ label: e.label, value: e.value }))
2055
+ options: gi.map((e) => ({ label: e.label, value: e.value }))
2037
2056
  }
2038
2057
  ] : [],
2039
2058
  ...kt ? [
@@ -2041,7 +2060,7 @@ function Dd({
2041
2060
  key: "fulfilment",
2042
2061
  placeholder: "Shipped",
2043
2062
  type: "select",
2044
- options: ai
2063
+ options: bi
2045
2064
  }
2046
2065
  ] : [],
2047
2066
  ...vt ? [
@@ -2067,16 +2086,16 @@ function Dd({
2067
2086
  ] : [],
2068
2087
  {
2069
2088
  key: "label",
2070
- placeholder: T("label", "Item"),
2089
+ placeholder: A("label", "Item"),
2071
2090
  type: "combobox",
2072
2091
  multi: !0,
2073
2092
  loadOptions: async (e) => ((await h.request(
2074
- O(`/queues/${l}/label-suggest`, e.trim() ? { q: e.trim() } : {})
2093
+ D(`/queues/${l}/label-suggest`, e.trim() ? { q: e.trim() } : {})
2075
2094
  )).data ?? []).map((n) => ({ label: n, value: n }))
2076
2095
  },
2077
2096
  {
2078
2097
  key: "owners",
2079
- placeholder: T("owners", "Owners"),
2098
+ placeholder: A("owners", "Owners"),
2080
2099
  type: "combobox",
2081
2100
  multi: !0,
2082
2101
  options: ((i == null ? void 0 : i.available_values.owners) ?? []).map((e) => ({
@@ -2087,7 +2106,7 @@ function Dd({
2087
2106
  },
2088
2107
  ...Ft.map((e) => {
2089
2108
  var u, m, y;
2090
- const t = an.get(e), n = T(`extra.${e}`, Ge(e)), a = { key: `extra.${e}`, placeholder: n }, o = Ne(e);
2109
+ const t = an.get(e), n = A(`extra.${e}`, He(e)), a = { key: `extra.${e}`, placeholder: n }, o = Se(e);
2091
2110
  if ((o == null ? void 0 : o.type) === "datetime") return { ...a, type: "date" };
2092
2111
  if ((o == null ? void 0 : o.type) === "number") return { ...a, type: "number" };
2093
2112
  if ((o == null ? void 0 : o.type) === "boolean")
@@ -2106,31 +2125,31 @@ function Dd({
2106
2125
  multi: !0,
2107
2126
  // The "your access" mark follows the person's restriction on every tab,
2108
2127
  // not only on an empty one (army 11 Q2-1).
2109
- restricted: !!((m = fe[e]) != null && m.length),
2128
+ restricted: !!((m = he[e]) != null && m.length),
2110
2129
  options: s.map((N) => ({
2111
- label: o ? Ie(N, o) : Kt(t, N),
2130
+ label: o ? We(N, o) : Dt(t, N),
2112
2131
  value: N
2113
2132
  }))
2114
2133
  } : (t == null ? void 0 : t.kind) === "relation" ? {
2115
2134
  ...a,
2116
2135
  type: "combobox",
2117
2136
  multi: !0,
2118
- restricted: !!((y = fe[e]) != null && y.length),
2119
- loadOptions: ma(t)
2137
+ restricted: !!((y = he[e]) != null && y.length),
2138
+ loadOptions: ba(t)
2120
2139
  } : { ...a, placeholder: `Search ${n}…`, type: "text" };
2121
2140
  })
2122
- ], Hn = Ue.filter(
2141
+ ], Jn = Ie.filter(
2123
2142
  (e) => re.has(e.key) || e.key === "label" || e.key === "owners"
2124
- ), Jn = (e) => {
2143
+ ), Yn = (e) => {
2125
2144
  var t;
2126
- return (((t = Ue.find((n) => n.key === e)) == null ? void 0 : t.placeholder) ?? e).replace(/^Search\s+/, "").replace(/…$/, "");
2127
- }, Yn = (() => {
2145
+ return (((t = Ie.find((n) => n.key === e)) == null ? void 0 : t.placeholder) ?? e).replace(/^Search\s+/, "").replace(/…$/, "");
2146
+ }, zn = (() => {
2128
2147
  var n, a;
2129
2148
  const e = [];
2130
2149
  for (const [o, s] of Object.entries(Ke)) {
2131
2150
  if (!s || Array.isArray(s) && s.length === 0) continue;
2132
- const u = Ue.find((b) => b.key === o), m = o.startsWith("extra.") ? o.slice(6) : null, y = m ? Ne(m) : null, N = ts({
2133
- field: Jn(o),
2151
+ const u = Ie.find((b) => b.key === o), m = o.startsWith("extra.") ? o.slice(6) : null, y = m ? Se(m) : null, N = is({
2152
+ field: Yn(o),
2134
2153
  type: (u == null ? void 0 : u.type) ?? "select",
2135
2154
  value: s,
2136
2155
  optionLabel: (b) => {
@@ -2143,39 +2162,39 @@ function Dd({
2143
2162
  N && e.push(N);
2144
2163
  }
2145
2164
  const t = i == null ? void 0 : i.total;
2146
- return ns({
2165
+ return cs({
2147
2166
  noun: "items",
2148
2167
  scope: g === "mine" ? "you own" : g === "unowned" ? "with no owners" : g === "claimed" ? "you claimed" : null,
2149
- viewName: ((a = (n = G == null ? void 0 : G.data) == null ? void 0 : n.find((o) => o.id === st)) == null ? void 0 : a.name) ?? null,
2168
+ viewName: ((a = (n = L == null ? void 0 : L.data) == null ? void 0 : n.find((o) => o.id === de)) == null ? void 0 : a.name) ?? null,
2150
2169
  clauses: e,
2151
2170
  shown: typeof t == "number" ? t : null,
2152
2171
  of: (x == null ? void 0 : x.total) ?? null
2153
2172
  });
2154
- })(), Et = new Set(Object.keys(he.current)), io = ((e) => {
2173
+ })(), At = new Set(Object.keys(ge.current)), ho = ((e) => {
2155
2174
  var n;
2156
2175
  if (e.some((a) => a.key === "state")) return e;
2157
- const t = Ue.find((a) => a.key === "state");
2176
+ const t = Ie.find((a) => a.key === "state");
2158
2177
  return !t || i && !((n = i.available_values.state) != null && n.length) ? e : [...e, t];
2159
2178
  })(
2160
2179
  (() => {
2161
2180
  var o;
2162
2181
  const e = (s) => {
2163
- var ae, pe, q;
2182
+ var ae, be, q;
2164
2183
  if (!s.key.startsWith("extra.")) return null;
2165
2184
  if (s.type === "combobox") return s;
2166
- const u = s.key.slice(6), m = an.get(u), y = Et.has(s.key);
2185
+ const u = s.key.slice(6), m = an.get(u), y = At.has(s.key);
2167
2186
  if ((m == null ? void 0 : m.kind) !== "relation" && !y) return null;
2168
- 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;
2187
+ const N = Se(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;
2169
2188
  return b != null && b.length ? {
2170
2189
  key: s.key,
2171
2190
  placeholder: E,
2172
2191
  type: "combobox",
2173
2192
  multi: !0,
2174
2193
  cascade: v,
2175
- restricted: !!((pe = fe[u]) != null && pe.length),
2176
- options: b.map((V) => ({
2177
- label: N && N.type !== "number" ? Ie(V, N) : Kt(m, V),
2178
- value: V
2194
+ restricted: !!((be = he[u]) != null && be.length),
2195
+ options: b.map((I) => ({
2196
+ label: N && N.type !== "number" ? We(I, N) : Dt(m, I),
2197
+ value: I
2179
2198
  }))
2180
2199
  } : (m == null ? void 0 : m.kind) === "relation" ? {
2181
2200
  key: s.key,
@@ -2183,48 +2202,48 @@ function Dd({
2183
2202
  type: "combobox",
2184
2203
  multi: !0,
2185
2204
  cascade: v,
2186
- restricted: !!((q = fe[u]) != null && q.length),
2187
- loadOptions: ma(m)
2205
+ restricted: !!((q = he[u]) != null && q.length),
2206
+ loadOptions: ba(m)
2188
2207
  } : null;
2189
2208
  };
2190
- if (dr.length > 0) {
2209
+ if (ur.length > 0) {
2191
2210
  const s = [], u = /* @__PURE__ */ new Set();
2192
- for (const m of dr) {
2211
+ for (const m of ur) {
2193
2212
  const y = (m.path ?? []).join(".");
2194
2213
  let N;
2195
2214
  if (m.key === "state" || /(^|_)state$/.test(((o = m.path) == null ? void 0 : o[0]) ?? ""))
2196
- N = Ue.find((b) => b.key === "state");
2215
+ N = Ie.find((b) => b.key === "state");
2197
2216
  else {
2198
- const b = Ue.filter((v) => {
2199
- var pe;
2217
+ const b = Ie.filter((v) => {
2218
+ var be;
2200
2219
  if (!v.key.startsWith("extra.") || u.has(v.key)) return !1;
2201
2220
  const ae = v.key.slice(6);
2202
- return ((pe = an.get(ae)) == null ? void 0 : pe.target_collection) === m.collection;
2221
+ return ((be = an.get(ae)) == null ? void 0 : be.target_collection) === m.collection;
2203
2222
  }), E = b.find((v) => v.key.slice(6).startsWith(`${y}.`)) ?? b[0];
2204
2223
  N = E ? e(E) : null;
2205
2224
  }
2206
2225
  !N || u.has(N.key) || (u.add(N.key), s.push(m.label ? { ...N, placeholder: m.label } : N));
2207
2226
  }
2208
- for (const m of Ue.map(e))
2209
- m && !u.has(m.key) && (Et.has(m.key) || m.restricted) && s.push(m);
2227
+ for (const m of Ie.map(e))
2228
+ m && !u.has(m.key) && (At.has(m.key) || m.restricted) && s.push(m);
2210
2229
  if (s.length > 0) return s;
2211
2230
  }
2212
- const t = Hn.map(e).filter((s) => s !== null), a = [
2213
- ...t.filter((s) => Et.has(s.key) || s.restricted),
2214
- ...t.filter((s) => !Et.has(s.key) && !s.restricted)
2231
+ const t = Jn.map(e).filter((s) => s !== null), a = [
2232
+ ...t.filter((s) => At.has(s.key) || s.restricted),
2233
+ ...t.filter((s) => !At.has(s.key) && !s.restricted)
2215
2234
  ].slice(0, 6);
2216
- return a.length > 0 ? a : Hn.filter((s) => s.key === "state" || s.key === "owners");
2235
+ return a.length > 0 ? a : Jn.filter((s) => s.key === "state" || s.key === "owners");
2217
2236
  })()
2218
- ), co = (x == null ? void 0 : x.sla_tracked) !== 0 || _.sla_status === "warning" || _.sla_status === "breached", uo = (() => {
2237
+ ), go = (x == null ? void 0 : x.sla_tracked) !== 0 || _.sla_status === "warning" || _.sla_status === "breached", xo = (() => {
2219
2238
  if (!x) return null;
2220
- const e = I ?? x, t = [
2239
+ const e = W ?? x, t = [
2221
2240
  {
2222
2241
  key: "breached",
2223
2242
  n: e.sla_breached,
2224
2243
  label: "past SLA",
2225
2244
  tone: "text-red-600 dark:text-red-400",
2226
2245
  on: _.sla_status === "breached",
2227
- toggle: () => ze("sla_status", "breached")
2246
+ toggle: () => Ze("sla_status", "breached")
2228
2247
  },
2229
2248
  {
2230
2249
  key: "warning",
@@ -2232,7 +2251,7 @@ function Dd({
2232
2251
  label: "SLA soon",
2233
2252
  tone: "text-amber-700 dark:text-amber-400",
2234
2253
  on: _.sla_status === "warning",
2235
- toggle: () => ze("sla_status", "warning")
2254
+ toggle: () => Ze("sla_status", "warning")
2236
2255
  },
2237
2256
  {
2238
2257
  key: "at_risk",
@@ -2240,7 +2259,7 @@ function Dd({
2240
2259
  label: "at risk",
2241
2260
  tone: "text-red-600 dark:text-red-400",
2242
2261
  on: _.at_risk === "yes",
2243
- toggle: () => ze("at_risk", "yes")
2262
+ toggle: () => Ze("at_risk", "yes")
2244
2263
  },
2245
2264
  {
2246
2265
  key: "unowned",
@@ -2249,7 +2268,7 @@ function Dd({
2249
2268
  tone: "text-slate-600 dark:text-slate-300",
2250
2269
  on: g === "unowned",
2251
2270
  toggle: () => {
2252
- te(g === "unowned" ? "all" : "unowned"), D(1);
2271
+ te(g === "unowned" ? "all" : "unowned"), M(1);
2253
2272
  }
2254
2273
  }
2255
2274
  ].filter((n) => n.n > 0 || n.on);
@@ -2265,13 +2284,13 @@ function Dd({
2265
2284
  type: "button",
2266
2285
  onClick: n.toggle,
2267
2286
  "aria-pressed": n.on,
2268
- className: L(
2287
+ className: T(
2269
2288
  "rounded px-1 tabular-nums hover:bg-slate-100 dark:hover:bg-slate-800",
2270
2289
  n.on && "bg-slate-100 dark:bg-slate-800"
2271
2290
  ),
2272
2291
  "data-queue-summary-item": n.key,
2273
2292
  children: [
2274
- /* @__PURE__ */ r("span", { className: L("font-semibold", n.tone), children: n.n.toLocaleString() }),
2293
+ /* @__PURE__ */ r("span", { className: T("font-semibold", n.tone), children: n.n.toLocaleString() }),
2275
2294
  " ",
2276
2295
  n.label
2277
2296
  ]
@@ -2287,17 +2306,17 @@ function Dd({
2287
2306
  }
2288
2307
  );
2289
2308
  })();
2290
- function mo(e) {
2309
+ function yo(e) {
2291
2310
  const t = new Set(re);
2292
- 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) => {
2311
+ t.has(e) ? (t.delete(e), (e === "addendums" || e === "integrations") && rr((n) => new Set(n).add(e))) : (t.add(e), (e === "addendums" || e === "integrations") && rr((n) => {
2293
2312
  const a = new Set(n);
2294
2313
  return a.delete(e), a;
2295
2314
  })), Ht([...t]);
2296
2315
  }
2297
- 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: [
2316
+ return jt ? (P == null ? void 0 : P((jt == null ? void 0 : jt.status) ?? 500)) ?? null : /* @__PURE__ */ d("div", { className: "flex flex-1 min-h-0 flex-col", children: [
2298
2317
  /* @__PURE__ */ d("div", { className: "shrink-0", children: [
2299
2318
  (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: [
2300
- /* @__PURE__ */ r(So, { className: "h-4 w-4 shrink-0" }),
2319
+ /* @__PURE__ */ r(Lo, { className: "h-4 w-4 shrink-0" }),
2301
2320
  /* @__PURE__ */ r("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." })
2302
2321
  ] }),
2303
2322
  /* @__PURE__ */ d(
@@ -2306,15 +2325,15 @@ function Dd({
2306
2325
  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",
2307
2326
  "data-queue-toolbar": !0,
2308
2327
  children: [
2309
- z ? /* @__PURE__ */ r("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: Ji.filter((e) => ge || e.value !== "claimed").map(
2328
+ G ? /* @__PURE__ */ r("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: Wa.filter((e) => xe || e.value !== "claimed").map(
2310
2329
  (e, t) => /* @__PURE__ */ r(
2311
2330
  "button",
2312
2331
  {
2313
2332
  type: "button",
2314
2333
  onClick: () => {
2315
- te(e.value), D(1);
2334
+ te(e.value), M(1);
2316
2335
  },
2317
- className: L(
2336
+ className: T(
2318
2337
  "flex h-8 items-center px-3 text-[12px] font-medium transition-colors",
2319
2338
  t > 0 && "border-l border-slate-200 dark:border-border",
2320
2339
  g === e.value ? "bg-nvr-cyan/10 text-slate-900 dark:text-white" : "bg-white text-slate-500 hover:text-slate-700 dark:bg-slate-900 dark:text-slate-400 dark:hover:text-slate-200"
@@ -2324,18 +2343,18 @@ function Dd({
2324
2343
  e.value
2325
2344
  )
2326
2345
  ) }) : /* @__PURE__ */ r("div", { className: "h-8 w-64 animate-pulse rounded-md bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
2327
- z ? Ae.length <= 1 ? null : (
2346
+ G ? Oe.length <= 1 ? null : (
2328
2347
  // One allowed view means nothing to switch to — no button.
2329
2348
  /* @__PURE__ */ r("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: [
2330
2349
  { value: "table", label: "Table" },
2331
2350
  { value: "kanban", label: "Kanban" },
2332
2351
  { value: "workload", label: "Workload" }
2333
- ].filter((e) => Ae.includes(e.value)).map((e, t) => /* @__PURE__ */ r(
2352
+ ].filter((e) => Oe.includes(e.value)).map((e, t) => /* @__PURE__ */ r(
2334
2353
  "button",
2335
2354
  {
2336
2355
  type: "button",
2337
- onClick: () => We(e.value),
2338
- className: L(
2356
+ onClick: () => Je(e.value),
2357
+ className: T(
2339
2358
  "flex h-8 items-center px-3 text-[12px] font-medium transition-colors",
2340
2359
  t > 0 && "border-l border-slate-200 dark:border-border",
2341
2360
  $ === e.value ? "bg-nvr-cyan/10 text-slate-900 dark:text-white" : "bg-white text-slate-500 hover:text-slate-700 dark:bg-slate-900 dark:text-slate-400 dark:hover:text-slate-200"
@@ -2352,7 +2371,7 @@ function Dd({
2352
2371
  "aria-pressed": _.unseen === "yes",
2353
2372
  "data-queue-unseen-filter": !0,
2354
2373
  title: "Only records someone else changed since you last opened them",
2355
- onClick: () => j((e) => {
2374
+ onClick: () => U((e) => {
2356
2375
  const t = { ...e };
2357
2376
  return t.unseen === "yes" ? delete t.unseen : t.unseen = "yes", t;
2358
2377
  }),
@@ -2363,44 +2382,44 @@ function Dd({
2363
2382
  ]
2364
2383
  }
2365
2384
  ),
2366
- at && /* @__PURE__ */ d(
2385
+ ot && /* @__PURE__ */ d(
2367
2386
  "button",
2368
2387
  {
2369
2388
  type: "button",
2370
2389
  "aria-pressed": _.addendums === "active",
2371
2390
  title: "Only records with an addendum still in review",
2372
- onClick: () => j((e) => {
2391
+ onClick: () => U((e) => {
2373
2392
  const t = { ...e };
2374
2393
  return t.addendums === "active" ? delete t.addendums : t.addendums = "active", t;
2375
2394
  }),
2376
2395
  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"}`,
2377
2396
  children: [
2378
- /* @__PURE__ */ r(Co, { className: "h-3.5 w-3.5" }),
2397
+ /* @__PURE__ */ r(Ao, { className: "h-3.5 w-3.5" }),
2379
2398
  "Active addendums"
2380
2399
  ]
2381
2400
  }
2382
2401
  ),
2383
- qe && /* @__PURE__ */ r(
2384
- ii,
2402
+ Re && /* @__PURE__ */ r(
2403
+ xi,
2385
2404
  {
2386
- label: T("integrations", "Integrations"),
2405
+ label: A("integrations", "Integrations"),
2387
2406
  value: _.integrations,
2388
- onChange: (e) => j((t) => {
2407
+ onChange: (e) => U((t) => {
2389
2408
  const n = { ...t };
2390
2409
  return e ? n.integrations = e : delete n.integrations, n;
2391
2410
  })
2392
2411
  }
2393
2412
  ),
2394
- /* @__PURE__ */ r(yi, { className: "h-8" }),
2395
- /* @__PURE__ */ r(ni, {}),
2413
+ /* @__PURE__ */ r(Ri, { className: "h-8" }),
2414
+ /* @__PURE__ */ r(mi, {}),
2396
2415
  mn > 0 && /* @__PURE__ */ d(
2397
2416
  "button",
2398
2417
  {
2399
2418
  type: "button",
2400
- onClick: kl,
2419
+ onClick: Cl,
2401
2420
  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",
2402
2421
  children: [
2403
- /* @__PURE__ */ r($o, { className: "h-3 w-3" }),
2422
+ /* @__PURE__ */ r(Eo, { className: "h-3 w-3" }),
2404
2423
  mn,
2405
2424
  " update",
2406
2425
  mn === 1 ? "" : "s",
@@ -2414,22 +2433,22 @@ function Dd({
2414
2433
  "button",
2415
2434
  {
2416
2435
  type: "button",
2417
- className: L(
2436
+ className: T(
2418
2437
  "flex h-8 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium",
2419
2438
  R ? "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"
2420
2439
  ),
2421
2440
  children: [
2422
- /* @__PURE__ */ r(Fa, { className: "h-3.5 w-3.5" }),
2423
- R ? `Group: ${((ya = ua.find((e) => e.value === R)) == null ? void 0 : ya.label) ?? R}` : "Group"
2441
+ /* @__PURE__ */ r(Oa, { className: "h-3.5 w-3.5" }),
2442
+ R ? `Group: ${((Na = pa.find((e) => e.value === R)) == null ? void 0 : Na.label) ?? R}` : "Group"
2424
2443
  ]
2425
2444
  }
2426
2445
  ) }),
2427
- /* @__PURE__ */ r(bt, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(Ma, { children: [
2428
- /* @__PURE__ */ r(Si, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
2429
- /* @__PURE__ */ d(Ba, { children: [
2430
- /* @__PURE__ */ r(Ci, { children: "No attribute found." }),
2446
+ /* @__PURE__ */ r(bt, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(Va, { children: [
2447
+ /* @__PURE__ */ r(Oi, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
2448
+ /* @__PURE__ */ d(Ia, { children: [
2449
+ /* @__PURE__ */ r(Di, { children: "No attribute found." }),
2431
2450
  /* @__PURE__ */ r(Ot, { value: "__none__", onSelect: () => ft(null), children: "None" }),
2432
- ua.map((e) => /* @__PURE__ */ r(
2451
+ pa.map((e) => /* @__PURE__ */ r(
2433
2452
  Ot,
2434
2453
  {
2435
2454
  value: e.label,
@@ -2446,27 +2465,27 @@ function Dd({
2446
2465
  {
2447
2466
  type: "button",
2448
2467
  onClick: () => {
2449
- He(B === "-priority" ? "" : "-priority"), D(1);
2468
+ Ye(j === "-priority" ? "" : "-priority"), M(1);
2450
2469
  },
2451
- className: L(
2470
+ className: T(
2452
2471
  "flex h-8 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium",
2453
- 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"
2472
+ j === "-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"
2454
2473
  ),
2455
2474
  children: [
2456
- /* @__PURE__ */ r(qo, { className: "h-3.5 w-3.5" }),
2475
+ /* @__PURE__ */ r(Oo, { className: "h-3.5 w-3.5" }),
2457
2476
  "Priority"
2458
2477
  ]
2459
2478
  }
2460
2479
  ),
2461
- $ === "table" && R && ie && /* @__PURE__ */ r(
2480
+ $ === "table" && R && ce && /* @__PURE__ */ r(
2462
2481
  "button",
2463
2482
  {
2464
2483
  type: "button",
2465
2484
  onClick: () => cn(
2466
- Ce.size > 0 ? /* @__PURE__ */ new Set() : new Set(ie.map((e) => e.key))
2485
+ $e.size > 0 ? /* @__PURE__ */ new Set() : new Set(ce.map((e) => e.key))
2467
2486
  ),
2468
2487
  className: "flex h-8 items-center rounded-md px-2 text-[12px] text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200",
2469
- children: Ce.size > 0 ? "Expand all" : "Collapse all"
2488
+ children: $e.size > 0 ? "Expand all" : "Collapse all"
2470
2489
  }
2471
2490
  ),
2472
2491
  $ === "kanban" && /* @__PURE__ */ d(mt, { children: [
@@ -2474,17 +2493,17 @@ function Dd({
2474
2493
  "button",
2475
2494
  {
2476
2495
  type: "button",
2477
- className: L(
2496
+ className: T(
2478
2497
  "flex h-8 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium",
2479
2498
  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"
2480
2499
  ),
2481
2500
  children: [
2482
- /* @__PURE__ */ r(Fa, { className: "h-3.5 w-3.5" }),
2501
+ /* @__PURE__ */ r(Oa, { className: "h-3.5 w-3.5" }),
2483
2502
  ht ? `Lanes: ${ht === "collection" ? "Collection" : "Owner"}` : "Lanes"
2484
2503
  ]
2485
2504
  }
2486
2505
  ) }),
2487
- /* @__PURE__ */ r(bt, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ r(Ma, { children: /* @__PURE__ */ d(Ba, { children: [
2506
+ /* @__PURE__ */ r(bt, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ r(Va, { children: /* @__PURE__ */ d(Ia, { children: [
2488
2507
  /* @__PURE__ */ r(Ot, { value: "none", onSelect: () => dn(null), children: "None" }),
2489
2508
  /* @__PURE__ */ r(Ot, { value: "collection", onSelect: () => dn("collection"), children: "Collection" }),
2490
2509
  /* @__PURE__ */ r(Ot, { value: "owner", onSelect: () => dn("owners"), children: "Owner" })
@@ -2499,25 +2518,25 @@ function Dd({
2499
2518
  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",
2500
2519
  "data-queue-ask": !0,
2501
2520
  children: [
2502
- /* @__PURE__ */ r(Ro, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
2521
+ /* @__PURE__ */ r(Do, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
2503
2522
  "Ask about this queue"
2504
2523
  ]
2505
2524
  }
2506
2525
  ),
2507
- /* @__PURE__ */ r(pi, { listKey: `queue:${l}`, getState: Gr }),
2526
+ /* @__PURE__ */ r(_i, { listKey: `queue:${l}`, getState: Wr }),
2508
2527
  $ === "table" && /* @__PURE__ */ d(
2509
2528
  "button",
2510
2529
  {
2511
2530
  type: "button",
2512
- onClick: () => void so(),
2513
- disabled: Wn || !i || (i.total ?? 0) === 0,
2531
+ onClick: () => void fo(),
2532
+ disabled: Hn || !i || (i.total ?? 0) === 0,
2514
2533
  "data-tip": "Download the rows on this tab, with these filters and columns, as a spreadsheet (CSV)",
2515
2534
  "aria-label": "Export to CSV",
2516
2535
  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",
2517
2536
  "data-queue-export": !0,
2518
2537
  children: [
2519
- /* @__PURE__ */ r(Fo, { className: "h-3.5 w-3.5" }),
2520
- Wn ? "Exporting…" : "Export"
2538
+ /* @__PURE__ */ r(Ko, { className: "h-3.5 w-3.5" }),
2539
+ Hn ? "Exporting…" : "Export"
2521
2540
  ]
2522
2541
  }
2523
2542
  ),
@@ -2525,16 +2544,16 @@ function Dd({
2525
2544
  "button",
2526
2545
  {
2527
2546
  type: "button",
2528
- onClick: () => tl((e) => !e),
2547
+ onClick: () => sl((e) => !e),
2529
2548
  "aria-expanded": gt,
2530
2549
  title: "Trends, aging, pace and states",
2531
- className: L(
2550
+ className: T(
2532
2551
  "flex h-8 items-center gap-1 rounded-md border px-2.5 text-[12px] font-medium",
2533
2552
  gt ? "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"
2534
2553
  ),
2535
2554
  "data-queue-insights-toggle": !0,
2536
2555
  children: [
2537
- /* @__PURE__ */ r(Lo, { className: "h-3.5 w-3.5" }),
2556
+ /* @__PURE__ */ r(Po, { className: "h-3.5 w-3.5" }),
2538
2557
  "Insights"
2539
2558
  ]
2540
2559
  }
@@ -2546,26 +2565,26 @@ function Dd({
2546
2565
  type: "button",
2547
2566
  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",
2548
2567
  children: [
2549
- /* @__PURE__ */ r(To, { className: "h-3.5 w-3.5" }),
2568
+ /* @__PURE__ */ r(Mo, { className: "h-3.5 w-3.5" }),
2550
2569
  "Columns"
2551
2570
  ]
2552
2571
  }
2553
2572
  ) }),
2554
2573
  /* @__PURE__ */ r(bt, { className: "w-[220px] p-2", align: "end", children: /* @__PURE__ */ r(
2555
- go,
2574
+ No,
2556
2575
  {
2557
- sensors: no,
2558
- collisionDetection: xo,
2559
- onDragEnd: ro,
2560
- children: /* @__PURE__ */ r(yo, { items: ia, strategy: ko, children: /* @__PURE__ */ r("div", { className: "space-y-1.5", children: ia.map((e) => {
2561
- const t = Gn.find((n) => n.key === e);
2576
+ sensors: co,
2577
+ collisionDetection: So,
2578
+ onDragEnd: uo,
2579
+ children: /* @__PURE__ */ r(Co, { items: da, strategy: $o, children: /* @__PURE__ */ r("div", { className: "space-y-1.5", children: da.map((e) => {
2580
+ const t = Wn.find((n) => n.key === e);
2562
2581
  return /* @__PURE__ */ r(
2563
- tc,
2582
+ dc,
2564
2583
  {
2565
2584
  id: e,
2566
2585
  label: typeof (t == null ? void 0 : t.header) == "string" ? t.header : e,
2567
2586
  checked: re.has(e),
2568
- onCheckedChange: () => mo(e)
2587
+ onCheckedChange: () => yo(e)
2569
2588
  },
2570
2589
  e
2571
2590
  );
@@ -2577,13 +2596,13 @@ function Dd({
2577
2596
  "button",
2578
2597
  {
2579
2598
  type: "button",
2580
- onClick: Pl,
2599
+ onClick: Vl,
2581
2600
  "aria-pressed": ne,
2582
2601
  "data-queue-bulk-mode": ne ? "on" : "off",
2583
2602
  "data-tip": ne ? "Leave bulk mode — clears the selection and turns row actions back on" : "Select rows to act on several at once",
2584
2603
  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"}`,
2585
2604
  children: [
2586
- /* @__PURE__ */ r(Eo, { className: "h-3.5 w-3.5" }),
2605
+ /* @__PURE__ */ r(Bo, { className: "h-3.5 w-3.5" }),
2587
2606
  ne ? "Done" : "Bulk select"
2588
2607
  ]
2589
2608
  }
@@ -2594,7 +2613,7 @@ function Dd({
2594
2613
  type: "button",
2595
2614
  onClick: () => {
2596
2615
  const e = Pt === "compact" ? "comfortable" : "compact";
2597
- Ua(e);
2616
+ Ja(e);
2598
2617
  try {
2599
2618
  localStorage.setItem("nvr_table_density", e);
2600
2619
  } catch {
@@ -2603,17 +2622,17 @@ function Dd({
2603
2622
  "aria-label": "Row density",
2604
2623
  title: Pt === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
2605
2624
  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",
2606
- children: Pt === "compact" ? /* @__PURE__ */ r(Ao, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(Oo, { className: "h-3.5 w-3.5" })
2625
+ children: Pt === "compact" ? /* @__PURE__ */ r(Qo, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(jo, { className: "h-3.5 w-3.5" })
2607
2626
  }
2608
2627
  ),
2609
- $ === "table" && Ha && me.length > 0 && /* @__PURE__ */ d(
2628
+ $ === "table" && el && pe.length > 0 && /* @__PURE__ */ d(
2610
2629
  "button",
2611
2630
  {
2612
2631
  type: "button",
2613
- onClick: () => Qr(),
2632
+ onClick: () => jr(),
2614
2633
  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",
2615
2634
  children: [
2616
- /* @__PURE__ */ r(Ko, { className: "h-3 w-3 fill-current" }),
2635
+ /* @__PURE__ */ r(Uo, { className: "h-3 w-3 fill-current" }),
2617
2636
  "Work Next"
2618
2637
  ]
2619
2638
  }
@@ -2627,8 +2646,8 @@ function Dd({
2627
2646
  children: [
2628
2647
  /* @__PURE__ */ r(on, { className: "h-3.5 w-3.5" }),
2629
2648
  "New ",
2630
- Xn(le[0]),
2631
- /* @__PURE__ */ r(La, { className: "h-3 w-3 opacity-60" })
2649
+ Zn(le[0]),
2650
+ /* @__PURE__ */ r(Da, { className: "h-3 w-3 opacity-60" })
2632
2651
  ]
2633
2652
  }
2634
2653
  ) }),
@@ -2637,7 +2656,7 @@ function Dd({
2637
2656
  "button",
2638
2657
  {
2639
2658
  type: "button",
2640
- onClick: () => Y.open({
2659
+ onClick: () => z.open({
2641
2660
  collection: le[0],
2642
2661
  itemId: "new",
2643
2662
  // Same layout the queue opens existing records with.
@@ -2645,7 +2664,7 @@ function Dd({
2645
2664
  }),
2646
2665
  className: "flex w-full items-center rounded px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-muted",
2647
2666
  children: [
2648
- ((ka = Vt.active) == null ? void 0 : ka.create_label) ?? ((va = Vt.active) == null ? void 0 : va.name) ?? "Default layout",
2667
+ ((Sa = Vt.active) == null ? void 0 : Sa.create_label) ?? ((Ca = Vt.active) == null ? void 0 : Ca.name) ?? "Default layout",
2649
2668
  /* @__PURE__ */ r("span", { className: "ml-auto pl-3 text-[10px] text-slate-400 dark:text-slate-500", children: "default" })
2650
2669
  ]
2651
2670
  }
@@ -2654,7 +2673,7 @@ function Dd({
2654
2673
  "button",
2655
2674
  {
2656
2675
  type: "button",
2657
- onClick: () => Y.open({
2676
+ onClick: () => z.open({
2658
2677
  collection: le[0],
2659
2678
  itemId: "new",
2660
2679
  layoutSlug: e.slug
@@ -2669,7 +2688,7 @@ function Dd({
2669
2688
  "button",
2670
2689
  {
2671
2690
  type: "button",
2672
- onClick: () => Y.open({
2691
+ onClick: () => z.open({
2673
2692
  collection: le[0],
2674
2693
  itemId: "new",
2675
2694
  // Open a new record on the same layout the queue opens
@@ -2680,7 +2699,7 @@ function Dd({
2680
2699
  children: [
2681
2700
  /* @__PURE__ */ r(on, { className: "h-3.5 w-3.5" }),
2682
2701
  "New ",
2683
- Xn(le[0])
2702
+ Zn(le[0])
2684
2703
  ]
2685
2704
  }
2686
2705
  )),
@@ -2693,7 +2712,7 @@ function Dd({
2693
2712
  children: [
2694
2713
  /* @__PURE__ */ r(on, { className: "h-3.5 w-3.5" }),
2695
2714
  "New",
2696
- /* @__PURE__ */ r(La, { className: "h-3 w-3 opacity-60" })
2715
+ /* @__PURE__ */ r(Da, { className: "h-3 w-3 opacity-60" })
2697
2716
  ]
2698
2717
  }
2699
2718
  ) }),
@@ -2701,7 +2720,7 @@ function Dd({
2701
2720
  "button",
2702
2721
  {
2703
2722
  type: "button",
2704
- onClick: () => Y.open({
2723
+ onClick: () => z.open({
2705
2724
  collection: e,
2706
2725
  itemId: "new",
2707
2726
  layoutSlug: (p == null ? void 0 : p.item_layout) ?? null
@@ -2709,17 +2728,17 @@ function Dd({
2709
2728
  className: "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-muted",
2710
2729
  children: [
2711
2730
  /* @__PURE__ */ r(on, { className: "h-3 w-3 opacity-60" }),
2712
- Xn(e)
2731
+ Zn(e)
2713
2732
  ]
2714
2733
  },
2715
2734
  e
2716
2735
  )) })
2717
2736
  ] }),
2718
- !kn && Ye && de && /* @__PURE__ */ r(
2719
- li,
2737
+ !kn && Xe && me && /* @__PURE__ */ r(
2738
+ fi,
2720
2739
  {
2721
- collection: Ye,
2722
- onParsed: (e, t) => de(`/collections/${Ye}/new`, {
2740
+ collection: Xe,
2741
+ onParsed: (e, t) => me(`/collections/${Xe}/new`, {
2723
2742
  state: { importResult: e, importTemplateId: t.id }
2724
2743
  })
2725
2744
  }
@@ -2736,74 +2755,74 @@ function Dd({
2736
2755
  children: [
2737
2756
  /* @__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: [
2738
2757
  /* @__PURE__ */ r(
2739
- Dt,
2758
+ Kt,
2740
2759
  {
2741
2760
  label: "Total",
2742
2761
  count: (x == null ? void 0 : x.total) ?? 0,
2743
- filteredCount: I ? I.total : null,
2744
- active: Object.values(_).every(Za) && g === "all",
2745
- isLoading: Ze,
2762
+ filteredCount: W ? W.total : null,
2763
+ active: Object.values(_).every(ll) && g === "all",
2764
+ isLoading: tt,
2746
2765
  ...Nt("total"),
2747
- onClick: el
2766
+ onClick: ol
2748
2767
  }
2749
2768
  ),
2750
- co && /* @__PURE__ */ d(Se, { children: [
2769
+ go && /* @__PURE__ */ d(Ce, { children: [
2751
2770
  /* @__PURE__ */ r(
2752
- Dt,
2771
+ Kt,
2753
2772
  {
2754
2773
  label: "Warning",
2755
2774
  count: (x == null ? void 0 : x.sla_warning) ?? 0,
2756
- filteredCount: I ? I.sla_warning : null,
2775
+ filteredCount: W ? W.sla_warning : null,
2757
2776
  tone: "amber",
2758
2777
  active: _.sla_status === "warning",
2759
- isLoading: Ze,
2778
+ isLoading: tt,
2760
2779
  deltaBadIsUp: !0,
2761
2780
  ...Nt("sla_warning"),
2762
- onClick: () => ze("sla_status", "warning")
2781
+ onClick: () => Ze("sla_status", "warning")
2763
2782
  }
2764
2783
  ),
2765
2784
  /* @__PURE__ */ r(
2766
- Dt,
2785
+ Kt,
2767
2786
  {
2768
2787
  label: "Breached",
2769
2788
  count: (x == null ? void 0 : x.sla_breached) ?? 0,
2770
- filteredCount: I ? I.sla_breached : null,
2789
+ filteredCount: W ? W.sla_breached : null,
2771
2790
  tone: "red",
2772
2791
  active: _.sla_status === "breached",
2773
- isLoading: Ze,
2792
+ isLoading: tt,
2774
2793
  deltaBadIsUp: !0,
2775
2794
  ...Nt("sla_breached"),
2776
- onClick: () => ze("sla_status", "breached")
2795
+ onClick: () => Ze("sla_status", "breached")
2777
2796
  }
2778
2797
  )
2779
2798
  ] }),
2780
2799
  /* @__PURE__ */ r(
2781
- Dt,
2800
+ Kt,
2782
2801
  {
2783
2802
  label: "At Risk",
2784
- breakdown: I ? Qa(I.at_risk_by_rule) : Qa(x == null ? void 0 : x.at_risk_by_rule),
2803
+ breakdown: W ? Ga(W.at_risk_by_rule) : Ga(x == null ? void 0 : x.at_risk_by_rule),
2785
2804
  count: (x == null ? void 0 : x.at_risk) ?? 0,
2786
- filteredCount: I ? I.at_risk : null,
2805
+ filteredCount: W ? W.at_risk : null,
2787
2806
  tone: "red",
2788
2807
  active: _.at_risk === "yes",
2789
- isLoading: Ze,
2808
+ isLoading: tt,
2790
2809
  deltaBadIsUp: !0,
2791
2810
  ...Nt("at_risk"),
2792
- onClick: () => ze("at_risk", "yes")
2811
+ onClick: () => Ze("at_risk", "yes")
2793
2812
  }
2794
2813
  ),
2795
2814
  /* @__PURE__ */ r(
2796
- Dt,
2815
+ Kt,
2797
2816
  {
2798
2817
  label: "Unowned",
2799
2818
  count: (x == null ? void 0 : x.unowned) ?? 0,
2800
- filteredCount: I ? I.unowned : null,
2819
+ filteredCount: W ? W.unowned : null,
2801
2820
  active: g === "unowned",
2802
- isLoading: Ze,
2821
+ isLoading: tt,
2803
2822
  deltaBadIsUp: !0,
2804
2823
  ...Nt("unowned"),
2805
2824
  onClick: () => {
2806
- te(g === "unowned" ? "all" : "unowned"), D(1);
2825
+ te(g === "unowned" ? "all" : "unowned"), M(1);
2807
2826
  }
2808
2827
  }
2809
2828
  )
@@ -2818,12 +2837,12 @@ function Dd({
2818
2837
  {
2819
2838
  type: "button",
2820
2839
  onClick: () => {
2821
- j((a) => ({
2840
+ U((a) => ({
2822
2841
  ...a,
2823
2842
  aging_hours: a.aging_hours === t ? "" : t
2824
- })), D(1);
2843
+ })), M(1);
2825
2844
  },
2826
- className: L(
2845
+ className: T(
2827
2846
  "rounded-md border px-2 py-1 tabular-nums transition-colors",
2828
2847
  _.aging_hours === t ? "border-nvr-cyan bg-nvr-cyan/10 font-medium text-[#0e7490] dark:text-[#67e8f9]" : "border-slate-200 text-slate-500 hover:bg-muted dark:border-border dark:text-muted-foreground",
2829
2848
  n === 0 && "opacity-45"
@@ -2836,38 +2855,38 @@ function Dd({
2836
2855
  },
2837
2856
  e
2838
2857
  )) }),
2839
- _e && /* @__PURE__ */ r(
2858
+ Ne && /* @__PURE__ */ r(
2840
2859
  "span",
2841
2860
  {
2842
2861
  "data-queue-burndown": !0,
2843
- className: `inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[11.5px] font-medium ${_e.dir === "down" ? "border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-400" : _e.dir === "up" ? "border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-400" : "border-slate-200 bg-slate-50 text-slate-500 dark:border-border dark:bg-muted dark:text-muted-foreground"}`,
2862
+ className: `inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[11.5px] font-medium ${Ne.dir === "down" ? "border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-400" : Ne.dir === "up" ? "border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-400" : "border-slate-200 bg-slate-50 text-slate-500 dark:border-border dark:bg-muted dark:text-muted-foreground"}`,
2844
2863
  "data-tip": "Average net change per day over the last 14 days of snapshots",
2845
- children: _e.dir === "down" ? /* @__PURE__ */ d(Se, { children: [
2864
+ children: Ne.dir === "down" ? /* @__PURE__ */ d(Ce, { children: [
2846
2865
  "▼ ",
2847
- Math.abs(_e.pace).toFixed(1),
2866
+ Math.abs(Ne.pace).toFixed(1),
2848
2867
  "/day — clears in ~",
2849
- _e.days,
2868
+ Ne.days,
2850
2869
  " day",
2851
- _e.days === 1 ? "" : "s",
2870
+ Ne.days === 1 ? "" : "s",
2852
2871
  " at this pace"
2853
- ] }) : _e.dir === "up" ? /* @__PURE__ */ d(Se, { children: [
2872
+ ] }) : Ne.dir === "up" ? /* @__PURE__ */ d(Ce, { children: [
2854
2873
  "▲ Growing ",
2855
- _e.pace.toFixed(1),
2874
+ Ne.pace.toFixed(1),
2856
2875
  "/day"
2857
- ] }) : /* @__PURE__ */ r(Se, { children: "→ Holding steady" })
2876
+ ] }) : /* @__PURE__ */ r(Ce, { children: "→ Holding steady" })
2858
2877
  }
2859
2878
  ),
2860
- Pr.length > 0 && /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: Pr.map(([e, t]) => {
2879
+ Mr.length > 0 && /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: Mr.map(([e, t]) => {
2861
2880
  var n;
2862
2881
  return /* @__PURE__ */ r(
2863
- ec,
2882
+ cc,
2864
2883
  {
2865
- label: Fe(e),
2884
+ label: Te(e),
2866
2885
  count: t,
2867
- filteredCount: I ? I.by_state[e] ?? 0 : null,
2868
- color: ((n = Re[e]) == null ? void 0 : n.color) ?? null,
2869
- active: Xa.includes(e),
2870
- onClick: () => za(e)
2886
+ filteredCount: W ? W.by_state[e] ?? 0 : null,
2887
+ color: ((n = Fe[e]) == null ? void 0 : n.color) ?? null,
2888
+ active: al.includes(e),
2889
+ onClick: () => rl(e)
2871
2890
  },
2872
2891
  e
2873
2892
  );
@@ -2876,18 +2895,18 @@ function Dd({
2876
2895
  }
2877
2896
  ),
2878
2897
  $ !== "workload" && /* @__PURE__ */ r(
2879
- Bi,
2898
+ Yi,
2880
2899
  {
2881
- defs: io,
2900
+ defs: ho,
2882
2901
  values: _,
2883
- seededKeys: Et,
2902
+ seededKeys: At,
2884
2903
  onApply: (e) => {
2885
- j((t) => ({ ...t, ...e })), D(1);
2904
+ U((t) => ({ ...t, ...e })), M(1);
2886
2905
  },
2887
2906
  onClear: () => {
2888
- j({ ...he.current }), D(1);
2907
+ U({ ...ge.current }), M(1);
2889
2908
  },
2890
- right: uo
2909
+ right: xo
2891
2910
  }
2892
2911
  ),
2893
2912
  /* @__PURE__ */ d(
@@ -2896,25 +2915,25 @@ function Dd({
2896
2915
  className: "flex shrink-0 flex-wrap items-center gap-1.5 border-b border-slate-100 bg-white px-4 py-1.5 dark:border-slate-800 dark:bg-slate-900",
2897
2916
  "data-queue-saved-views": !0,
2898
2917
  children: [
2899
- ((i == null ? void 0 : i.total) ?? 0) > 0 && ye > 0 && /* @__PURE__ */ d(
2918
+ ((i == null ? void 0 : i.total) ?? 0) > 0 && ke > 0 && /* @__PURE__ */ d(
2900
2919
  "span",
2901
2920
  {
2902
- "data-queue-default-hiding": ye,
2921
+ "data-queue-default-hiding": ke,
2903
2922
  className: "inline-flex h-6 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/[0.06] px-2.5 text-[12px] text-slate-700 dark:text-slate-200",
2904
2923
  children: [
2905
2924
  "Your default ",
2906
- yr(Jn),
2925
+ kr(Yn),
2907
2926
  " filter is hiding",
2908
2927
  " ",
2909
- ye.toLocaleString("en-US"),
2928
+ ke.toLocaleString("en-US"),
2910
2929
  " item",
2911
- ye === 1 ? "" : "s",
2930
+ ke === 1 ? "" : "s",
2912
2931
  " ·",
2913
2932
  /* @__PURE__ */ r(
2914
2933
  "button",
2915
2934
  {
2916
2935
  type: "button",
2917
- onClick: kr,
2936
+ onClick: vr,
2918
2937
  className: "font-medium text-[#0284a8] underline-offset-2 hover:underline dark:text-nvr-cyan",
2919
2938
  children: "Show all"
2920
2939
  }
@@ -2945,10 +2964,10 @@ function Dd({
2945
2964
  "aria-label": "Clear the owner filter",
2946
2965
  "data-queue-owner-filter-clear": !0,
2947
2966
  onClick: () => {
2948
- j((e) => {
2967
+ U((e) => {
2949
2968
  const { owners: t, ...n } = e;
2950
2969
  return n;
2951
- }), D(1);
2970
+ }), M(1);
2952
2971
  },
2953
2972
  className: "flex h-4 w-4 items-center justify-center rounded-full text-[10px] hover:bg-black/10 dark:hover:bg-white/10",
2954
2973
  children: "✕"
@@ -2957,44 +2976,44 @@ function Dd({
2957
2976
  ]
2958
2977
  }
2959
2978
  ),
2960
- !((G == null ? void 0 : G.data) ?? []).some((e) => e.is_default) && /* @__PURE__ */ r(
2979
+ !((L == null ? void 0 : L.data) ?? []).some((e) => e.is_default) && /* @__PURE__ */ r(
2961
2980
  "button",
2962
2981
  {
2963
2982
  type: "button",
2964
- onClick: Tl,
2983
+ onClick: Pl,
2965
2984
  title: "Revert to the queue default (filters, columns and sort cleared)",
2966
- className: L(
2985
+ className: T(
2967
2986
  "inline-flex h-6 items-center rounded-full border px-2.5 text-[12px] transition-colors",
2968
- st == null ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 bg-white text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300"
2987
+ de == null ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 bg-white text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300"
2969
2988
  ),
2970
2989
  children: "Default"
2971
2990
  }
2972
2991
  ),
2973
- ((G == null ? void 0 : G.data) ?? []).map((e) => {
2992
+ ((L == null ? void 0 : L.data) ?? []).map((e) => {
2974
2993
  var t;
2975
2994
  return /* @__PURE__ */ d(
2976
2995
  "span",
2977
2996
  {
2978
- className: L(
2997
+ className: T(
2979
2998
  "group inline-flex h-6 items-center gap-1 rounded-full border px-2.5 text-[12px] transition-colors",
2980
- st === e.id ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 bg-white text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300"
2999
+ de === e.id ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 bg-white text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-300"
2981
3000
  ),
2982
3001
  children: [
2983
3002
  /* @__PURE__ */ r(
2984
3003
  "button",
2985
3004
  {
2986
3005
  type: "button",
2987
- title: nt === e.id ? "Your default view — click to revert to the general default" : "Set as your default view",
2988
- onClick: () => Dl.mutate(nt === e.id ? null : e.id),
2989
- className: L(
3006
+ title: at === e.id ? "Your default view — click to revert to the general default" : "Set as your default view",
3007
+ onClick: () => Ul.mutate(at === e.id ? null : e.id),
3008
+ className: T(
2990
3009
  "shrink-0",
2991
- nt === e.id ? "text-amber-400" : "text-slate-300 hover:text-amber-400 dark:text-slate-600"
3010
+ at === e.id ? "text-amber-400" : "text-slate-300 hover:text-amber-400 dark:text-slate-600"
2992
3011
  ),
2993
3012
  children: /* @__PURE__ */ r(
2994
- Do,
3013
+ Vo,
2995
3014
  {
2996
- className: L("h-3 w-3", nt === e.id && "fill-current"),
2997
- "aria-label": nt === e.id ? "Default view" : "Set as default"
3015
+ className: T("h-3 w-3", at === e.id && "fill-current"),
3016
+ "aria-label": at === e.id ? "Default view" : "Set as default"
2998
3017
  }
2999
3018
  )
3000
3019
  }
@@ -3007,50 +3026,50 @@ function Dd({
3007
3026
  "button",
3008
3027
  {
3009
3028
  type: "button",
3010
- onClick: () => Kl.mutate({ viewId: e.id, on: !e.is_default }),
3029
+ onClick: () => jl.mutate({ viewId: e.id, on: !e.is_default }),
3011
3030
  title: e.is_default ? "Queue default — click to unset" : "Set as the default view for everyone on this queue",
3012
- className: L(
3031
+ className: T(
3013
3032
  "shrink-0",
3014
3033
  e.is_default ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
3015
3034
  ),
3016
3035
  "aria-label": e.is_default ? "Unset queue default" : "Set queue default",
3017
- children: /* @__PURE__ */ r(Po, { className: L("h-3 w-3", e.is_default && "fill-current") })
3036
+ children: /* @__PURE__ */ r(Io, { className: T("h-3 w-3", e.is_default && "fill-current") })
3018
3037
  }
3019
3038
  ),
3020
- (e.user === S || Be) && st === e.id && /* @__PURE__ */ r(
3039
+ (e.user === S || je) && de === e.id && /* @__PURE__ */ r(
3021
3040
  "button",
3022
3041
  {
3023
3042
  type: "button",
3024
- onClick: () => Qe.mutate(e),
3025
- disabled: Qe.isPending,
3043
+ onClick: () => Ue.mutate(e),
3044
+ disabled: Ue.isPending,
3026
3045
  title: "Update this view with the current filters, scope and sort",
3027
3046
  className: "shrink-0 text-slate-400 hover:text-nvr-navy disabled:opacity-50 dark:hover:text-nvr-cyan",
3028
3047
  "aria-label": `Update view ${e.name}`,
3029
- "data-view-update-state": Qe.isPending ? "saving" : Hr === e.id ? "saved" : "idle",
3030
- children: Qe.isPending && ((t = Qe.variables) == null ? void 0 : t.id) === e.id ? /* @__PURE__ */ r(Mo, { className: "h-3 w-3 animate-spin" }) : Hr === e.id ? /* @__PURE__ */ r(
3031
- Bo,
3048
+ "data-view-update-state": Ue.isPending ? "saving" : Jr === e.id ? "saved" : "idle",
3049
+ children: Ue.isPending && ((t = Ue.variables) == null ? void 0 : t.id) === e.id ? /* @__PURE__ */ r(Go, { className: "h-3 w-3 animate-spin" }) : Jr === e.id ? /* @__PURE__ */ r(
3050
+ Wo,
3032
3051
  {
3033
3052
  className: "h-3 w-3 text-emerald-600 dark:text-emerald-400",
3034
3053
  strokeWidth: 3
3035
3054
  }
3036
- ) : /* @__PURE__ */ r(Qo, { className: "h-3 w-3" })
3055
+ ) : /* @__PURE__ */ r(Ho, { className: "h-3 w-3" })
3037
3056
  }
3038
3057
  ),
3039
- st === e.id && /* @__PURE__ */ r(
3058
+ de === e.id && /* @__PURE__ */ r(
3040
3059
  "button",
3041
3060
  {
3042
3061
  type: "button",
3043
- onClick: () => rl(e.id),
3062
+ onClick: () => cl(e.id),
3044
3063
  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)",
3045
- className: L(
3064
+ className: T(
3046
3065
  "shrink-0",
3047
3066
  Gt(e.id) ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
3048
3067
  ),
3049
3068
  "aria-label": `Subscribe to view ${e.name}`,
3050
- children: /* @__PURE__ */ r(jo, { className: L("h-3 w-3", Gt(e.id) && "fill-current") })
3069
+ children: /* @__PURE__ */ r(Jo, { className: T("h-3 w-3", Gt(e.id) && "fill-current") })
3051
3070
  }
3052
3071
  ),
3053
- e.user === S && (Mn === e.id ? /* @__PURE__ */ d(
3072
+ e.user === S && (Bn === e.id ? /* @__PURE__ */ d(
3054
3073
  "span",
3055
3074
  {
3056
3075
  className: "flex shrink-0 items-center gap-1",
@@ -3061,8 +3080,8 @@ function Dd({
3061
3080
  "button",
3062
3081
  {
3063
3082
  type: "button",
3064
- onClick: () => Yr.mutate(e.id),
3065
- disabled: Yr.isPending,
3083
+ onClick: () => zr.mutate(e.id),
3084
+ disabled: zr.isPending,
3066
3085
  className: "font-semibold text-red-600 hover:underline disabled:opacity-50 dark:text-red-400",
3067
3086
  "aria-label": `Yes, delete view ${e.name}`,
3068
3087
  children: "Yes"
@@ -3095,7 +3114,7 @@ function Dd({
3095
3114
  e.id
3096
3115
  );
3097
3116
  }),
3098
- /* @__PURE__ */ d(mt, { open: Ll, onOpenChange: Pn, children: [
3117
+ /* @__PURE__ */ d(mt, { open: Kl, onOpenChange: Pn, children: [
3099
3118
  /* @__PURE__ */ r(pt, { asChild: !0, children: /* @__PURE__ */ r(
3100
3119
  "button",
3101
3120
  {
@@ -3107,14 +3126,14 @@ function Dd({
3107
3126
  ) }),
3108
3127
  /* @__PURE__ */ d(bt, { className: "w-[240px] p-3", align: "end", children: [
3109
3128
  (() => {
3110
- const e = G == null ? void 0 : G.data.find((t) => t.id === st);
3111
- return !e || e.user !== S && !Be ? null : /* @__PURE__ */ d(
3129
+ const e = L == null ? void 0 : L.data.find((t) => t.id === de);
3130
+ return !e || e.user !== S && !je ? null : /* @__PURE__ */ d(
3112
3131
  "button",
3113
3132
  {
3114
3133
  type: "button",
3115
- disabled: Qe.isPending,
3134
+ disabled: Ue.isPending,
3116
3135
  onClick: () => {
3117
- Qe.mutate(e), Pn(!1);
3136
+ Ue.mutate(e), Pn(!1);
3118
3137
  },
3119
3138
  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",
3120
3139
  children: [
@@ -3129,7 +3148,7 @@ function Dd({
3129
3148
  "input",
3130
3149
  {
3131
3150
  value: Xt,
3132
- onChange: (e) => jr(e.target.value),
3151
+ onChange: (e) => Ur(e.target.value),
3133
3152
  onKeyDown: (e) => {
3134
3153
  e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), Xt.trim() && !nn.isPending && nn.mutate());
3135
3154
  },
@@ -3140,21 +3159,21 @@ function Dd({
3140
3159
  ),
3141
3160
  tn && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
3142
3161
  /* @__PURE__ */ r(
3143
- er,
3162
+ tr,
3144
3163
  {
3145
- checked: Ur || qt,
3164
+ checked: Vr || qt,
3146
3165
  disabled: qt,
3147
- onCheckedChange: (e) => Vr(e === !0)
3166
+ onCheckedChange: (e) => Ir(e === !0)
3148
3167
  }
3149
3168
  ),
3150
3169
  "Share with everyone"
3151
3170
  ] }),
3152
3171
  tn && /* @__PURE__ */ d("label", { className: "mb-2 flex items-center gap-2 text-[12px] text-slate-600 dark:text-slate-300", children: [
3153
3172
  /* @__PURE__ */ r(
3154
- er,
3173
+ tr,
3155
3174
  {
3156
3175
  checked: qt,
3157
- onCheckedChange: (e) => Ir(e === !0)
3176
+ onCheckedChange: (e) => Gr(e === !0)
3158
3177
  }
3159
3178
  ),
3160
3179
  "Set as queue default (everyone starts here)"
@@ -3176,84 +3195,84 @@ function Dd({
3176
3195
  )
3177
3196
  ] }),
3178
3197
  /* @__PURE__ */ d("div", { ref: Zt, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: [
3179
- hr && /* @__PURE__ */ r(ui, { error: il, onRetry: () => void cl(), className: "mb-3" }),
3180
- Yn && /* @__PURE__ */ r(
3198
+ gr && /* @__PURE__ */ r(vi, { error: bl, onRetry: () => void fl(), className: "mb-3" }),
3199
+ zn && /* @__PURE__ */ r(
3181
3200
  "p",
3182
3201
  {
3183
3202
  "data-filter-sentence": !0,
3184
- "data-tip": Yn,
3203
+ "data-tip": zn,
3185
3204
  "aria-live": "polite",
3186
3205
  className: "mb-1.5 shrink-0 truncate px-0.5 text-[11.5px] text-slate-500 dark:text-slate-400",
3187
- children: Yn
3206
+ children: zn
3188
3207
  }
3189
3208
  ),
3190
- $ === "table" ? /* @__PURE__ */ r(Se, { children: /* @__PURE__ */ r("div", { className: "flex min-h-0 flex-1", children: /* @__PURE__ */ d(
3209
+ $ === "table" ? /* @__PURE__ */ r(Ce, { children: /* @__PURE__ */ r("div", { className: "flex min-h-0 flex-1", children: /* @__PURE__ */ d(
3191
3210
  "div",
3192
3211
  {
3193
3212
  ref: Ee.rootRef,
3194
- className: L(
3213
+ className: T(
3195
3214
  "relative min-w-0 flex-1 transition-opacity duration-200",
3196
- vr && "pointer-events-none opacity-60"
3215
+ wr && "pointer-events-none opacity-60"
3197
3216
  ),
3198
- "aria-busy": vr || void 0,
3217
+ "aria-busy": wr || void 0,
3199
3218
  children: [
3200
- 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: [
3201
- pl.text ?? "Still working",
3219
+ _r != 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: [
3220
+ yl.text ?? "Still working",
3202
3221
  " — ",
3203
- wr,
3222
+ _r,
3204
3223
  "s"
3205
3224
  ] }),
3206
3225
  /* @__PURE__ */ r(
3207
- ei,
3226
+ di,
3208
3227
  {
3209
3228
  fillHeight: !0,
3210
- enterKey: qr.current,
3229
+ enterKey: Rr.current,
3211
3230
  density: Pt,
3212
3231
  minBodyHeight: 360,
3213
- columns: Tt,
3232
+ columns: Lt,
3214
3233
  rows: C,
3215
3234
  rowKey: (e) => `${e.collection}:${e.item_id}`,
3216
3235
  total: (i == null ? void 0 : i.total) ?? 0,
3217
- page: ue,
3236
+ page: se,
3218
3237
  limit: yn,
3219
- isLoading: Ze,
3220
- onPageChange: D,
3221
- onRowClick: (e) => Dn(e),
3238
+ isLoading: tt,
3239
+ onPageChange: M,
3240
+ onRowClick: (e) => Kn(e),
3222
3241
  onRowFocus: (e) => zt(F(e)),
3223
3242
  activeRowKey: Ct,
3224
3243
  rowAriaLabel: (e) => e.label || void 0,
3225
3244
  rowDragProps: (e) => ({
3226
- ...yl({ collection: e.collection, id: e.item_id }),
3227
- ...bl.record(e.collection, e.item_id)
3245
+ ...Sl({ collection: e.collection, id: e.item_id }),
3246
+ ...kl.record(e.collection, e.item_id)
3228
3247
  }),
3229
3248
  onRowContextMenu: (e, t) => {
3230
3249
  t.preventDefault(), $t({ x: t.clientX, y: t.clientY, row: e });
3231
3250
  },
3232
3251
  rowTitle: (e) => {
3233
3252
  const t = _t.get(F(e));
3234
- return Ee.titleFor(F(e)) ?? (t && !t.is_mine ? Ns(t) : void 0) ?? (Wr(e.collection, e.item_id) ? xi : void 0);
3253
+ return Ee.titleFor(F(e)) ?? (t && !t.is_mine ? Ts(t) : void 0) ?? (Hr(e.collection, e.item_id) ? qi : void 0);
3235
3254
  },
3236
- rowClassName: (e) => L(
3237
- Ol(e),
3238
- Wr(e.collection, e.item_id) && gi
3255
+ rowClassName: (e) => T(
3256
+ Ql(e),
3257
+ Hr(e.collection, e.item_id) && $i
3239
3258
  ),
3240
- emptyMessage: hr ? /* @__PURE__ */ r("span", { className: "sr-only", children: "The list did not load." }) : /* @__PURE__ */ r(
3241
- ti,
3259
+ emptyMessage: gr ? /* @__PURE__ */ r("span", { className: "sr-only", children: "The list did not load." }) : /* @__PURE__ */ r(
3260
+ ui,
3242
3261
  {
3243
- icon: Uo,
3244
- 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",
3245
- 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.",
3246
- 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: [
3247
- ye > 0 && /* @__PURE__ */ d(
3262
+ icon: Yo,
3263
+ title: (($a = i == null ? void 0 : i.empty) == null ? void 0 : $a.reason) === "not_permitted" ? "You cannot read this queue’s records" : ((qa = i == null ? void 0 : i.empty) == null ? void 0 : qa.reason) === "scope_mine" ? "Nothing waiting on you" : ((Ra = i == null ? void 0 : i.empty) == null ? void 0 : Ra.reason) === "filters" ? "No records match these filters" : "Nothing in this queue",
3264
+ detail: ((Fa = i == null ? void 0 : i.empty) == null ? void 0 : Fa.reason) === "filters" && ke > 0 ? `Your default ${kr(Yn)} filter is hiding ${ke.toLocaleString("en-US")} item${ke === 1 ? "" : "s"} here.` : ((Ta = i == null ? void 0 : i.empty) == null ? void 0 : Ta.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." : ((La = i == null ? void 0 : i.empty) == null ? void 0 : La.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
3265
+ action: ((Aa = i == null ? void 0 : i.empty) == null ? void 0 : Aa.reason) === "filters" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-2", children: [
3266
+ ke > 0 && /* @__PURE__ */ d(
3248
3267
  "button",
3249
3268
  {
3250
3269
  type: "button",
3251
- onClick: kr,
3270
+ onClick: vr,
3252
3271
  className: "h-7 rounded-md bg-nvr-cyan px-2.5 text-[12px] font-semibold text-white hover:brightness-105",
3253
3272
  "data-queue-empty-defaults": !0,
3254
3273
  children: [
3255
3274
  "Show all ",
3256
- ye.toLocaleString("en-US")
3275
+ ke.toLocaleString("en-US")
3257
3276
  ]
3258
3277
  }
3259
3278
  ),
@@ -3264,9 +3283,9 @@ function Dd({
3264
3283
  onClick: () => {
3265
3284
  var t;
3266
3285
  const e = {};
3267
- for (const [n, a] of Object.entries(he.current))
3268
- (t = fe[n.slice(6)]) != null && t.length && (e[n] = a);
3269
- j(e), D(1);
3286
+ for (const [n, a] of Object.entries(ge.current))
3287
+ (t = he[n.slice(6)]) != null && t.length && (e[n] = a);
3288
+ U(e), M(1);
3270
3289
  },
3271
3290
  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",
3272
3291
  "data-queue-empty-clear": !0,
@@ -3278,7 +3297,7 @@ function Dd({
3278
3297
  {
3279
3298
  type: "button",
3280
3299
  onClick: () => {
3281
- te("all"), D(1);
3300
+ te("all"), M(1);
3282
3301
  },
3283
3302
  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",
3284
3303
  "data-queue-empty-all": !0,
@@ -3288,42 +3307,42 @@ function Dd({
3288
3307
  ] }) : void 0
3289
3308
  }
3290
3309
  ),
3291
- sort: B,
3310
+ sort: j,
3292
3311
  onSortChange: (e) => {
3293
- He(e), D(1);
3312
+ Ye(e), M(1);
3294
3313
  },
3295
- filterDefs: Hn,
3314
+ filterDefs: Jn,
3296
3315
  filterValues: _,
3297
3316
  onFilterChange: (e, t) => {
3298
- j((n) => ({ ...n, [e]: t })), D(1);
3317
+ U((n) => ({ ...n, [e]: t })), M(1);
3299
3318
  },
3300
- rowGroups: Bl ?? void 0,
3301
- collapsedGroups: Ce,
3302
- onToggleGroup: $l,
3319
+ rowGroups: Gl ?? void 0,
3320
+ collapsedGroups: $e,
3321
+ onToggleGroup: Al,
3303
3322
  selectedIds: It && ne ? oe : void 0,
3304
- onSelectionChange: It && ne ? je : void 0,
3323
+ onSelectionChange: It && ne ? Ve : void 0,
3305
3324
  hideFilterRow: !0,
3306
3325
  nowrapCells: !0,
3307
- columnPins: da,
3326
+ columnPins: ma,
3308
3327
  onColumnPinChange: (e, t) => {
3309
3328
  un((n) => {
3310
- const a = { ...n ?? da };
3329
+ const a = { ...n ?? ma };
3311
3330
  return t ? a[e] = t : delete a[e], a;
3312
3331
  });
3313
3332
  },
3314
3333
  columnFilterRow: !0,
3315
3334
  hScrollProxy: !0,
3316
3335
  footer: /* @__PURE__ */ r(
3317
- vi,
3336
+ Ti,
3318
3337
  {
3319
3338
  collections: St,
3320
3339
  selectedIds: String(_.at_risk_rule ?? "").split(",").map((e) => Number(e)).filter((e) => Number.isFinite(e) && e > 0),
3321
3340
  onToggle: (e) => {
3322
3341
  const t = e.ids.join(",");
3323
- j((n) => ({
3342
+ U((n) => ({
3324
3343
  ...n,
3325
3344
  at_risk_rule: n.at_risk_rule === t ? "" : t
3326
- })), D(1);
3345
+ })), M(1);
3327
3346
  },
3328
3347
  className: "shrink-0 border-t border-slate-100 bg-white px-3 py-1.5 dark:border-slate-800 dark:bg-slate-900"
3329
3348
  }
@@ -3333,103 +3352,103 @@ function Dd({
3333
3352
  ]
3334
3353
  }
3335
3354
  ) }) }) : $ === "kanban" ? /* @__PURE__ */ r(
3336
- Mi,
3355
+ Ji,
3337
3356
  {
3338
3357
  items: C,
3339
- onCardClick: (e) => Dn(e),
3340
- onDrop: (e, t) => fl.mutate({ item: e, targetState: t }),
3341
- onClaim: (e) => De.mutate(e),
3342
- onRelease: (e) => et.mutate(e),
3358
+ onCardClick: (e) => Kn(e),
3359
+ onDrop: (e, t) => vl.mutate({ item: e, targetState: t }),
3360
+ onClaim: (e) => Pe.mutate(e),
3361
+ onRelease: (e) => nt.mutate(e),
3343
3362
  swimlaneBy: ht,
3344
- stateLabels: En,
3345
- laneLabel: ht === "collection" ? lt : void 0,
3346
- claimsEnabled: ge,
3363
+ stateLabels: An,
3364
+ laneLabel: ht === "collection" ? st : void 0,
3365
+ claimsEnabled: xe,
3347
3366
  onDraggingChange: (e) => {
3348
3367
  hn.current = e;
3349
3368
  }
3350
3369
  }
3351
- ) : /* @__PURE__ */ r(Qi, { queueId: l })
3370
+ ) : /* @__PURE__ */ r(zi, { queueId: l })
3352
3371
  ] }),
3353
3372
  It && ne && /* @__PURE__ */ d(
3354
- Ki,
3373
+ Gi,
3355
3374
  {
3356
3375
  count: oe.length,
3357
- claimsEnabled: ge,
3358
- showClaim: Oe("claim"),
3359
- showRelease: Oe("release"),
3360
- showTransition: Oe("transition"),
3361
- states: Mr((i == null ? void 0 : i.available_values.state) ?? []).map((e) => ({
3376
+ claimsEnabled: xe,
3377
+ showClaim: De("claim"),
3378
+ showRelease: De("release"),
3379
+ showTransition: De("transition"),
3380
+ states: Br((i == null ? void 0 : i.available_values.state) ?? []).map((e) => ({
3362
3381
  value: e,
3363
- label: Fe(e)
3382
+ label: Te(e)
3364
3383
  })),
3365
3384
  busy: ct,
3366
- onClaim: () => Bn(
3385
+ onClaim: () => Qn(
3367
3386
  "Claim",
3368
3387
  (e) => h.request(
3369
- ce(`/queues/${l}/claim`, {
3388
+ ue(`/queues/${l}/claim`, {
3370
3389
  source_collection: e.collection,
3371
3390
  item_id: e.item_id
3372
3391
  })
3373
3392
  )
3374
3393
  ),
3375
- onRelease: () => Bn(
3394
+ onRelease: () => Qn(
3376
3395
  "Release",
3377
3396
  (e) => h.request(
3378
- ce(`/queues/${l}/release`, {
3397
+ ue(`/queues/${l}/release`, {
3379
3398
  source_collection: e.collection,
3380
3399
  item_id: e.item_id
3381
3400
  })
3382
3401
  )
3383
3402
  ),
3384
- onTransition: (e) => Bn("Transition", (t) => _r(t, e)),
3385
- onClear: () => je([]),
3403
+ onTransition: (e) => Qn("Transition", (t) => Nr(t, e)),
3404
+ onClear: () => Ve([]),
3386
3405
  children: [
3387
3406
  oe.length >= 2 && /* @__PURE__ */ r(
3388
3407
  "button",
3389
3408
  {
3390
3409
  type: "button",
3391
3410
  onClick: () => {
3392
- const e = Cs(
3393
- C.filter((t) => oe.includes(F(t)) && t.collection !== "tasks").map((t) => Y.urlFor(Kn(t)))
3411
+ const e = Os(
3412
+ C.filter((t) => oe.includes(F(t)) && t.collection !== "tasks").map((t) => z.urlFor(Dn(t)))
3394
3413
  );
3395
- e.blocked > 0 || e.capped > 0 ? A.warning(Oa(e)) : A.success(Oa(e));
3414
+ e.blocked > 0 || e.capped > 0 ? O.warning(Ba(e)) : O.success(Ba(e));
3396
3415
  },
3397
3416
  "data-bulk-open-tabs": !0,
3398
- title: `Open the selected records in new tabs (up to ${Ss})`,
3417
+ title: `Open the selected records in new tabs (up to ${Es})`,
3399
3418
  className: "h-8 rounded-md border border-white/20 px-3 text-[12.5px] font-medium hover:bg-white/10 dark:border-border dark:hover:bg-muted",
3400
3419
  children: "Open in tabs"
3401
3420
  }
3402
3421
  ),
3403
- Oe("transition") && (() => {
3422
+ De("transition") && (() => {
3404
3423
  const e = C.filter(
3405
3424
  (n) => oe.includes(F(n)) && n.collection !== "tasks"
3406
3425
  ), t = [...new Set(e.map((n) => n.collection))];
3407
3426
  return e.length > 0 ? /* @__PURE__ */ r(
3408
- Di,
3427
+ Wi,
3409
3428
  {
3410
3429
  collection: t.length === 1 ? t[0] : null,
3411
3430
  ids: e.map((n) => n.item_id),
3412
3431
  disabled: ct,
3413
3432
  onDone: () => {
3414
- je([]), f.invalidateQueries({ queryKey: ["queue-items", l] });
3433
+ Ve([]), f.invalidateQueries({ queryKey: ["queue-items", l] });
3415
3434
  }
3416
3435
  }
3417
3436
  ) : null;
3418
3437
  })(),
3419
3438
  /* @__PURE__ */ r(
3420
- Gs,
3439
+ ni,
3421
3440
  {
3422
3441
  targets: C.filter((e) => oe.includes(F(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id, label: e.label })),
3423
3442
  enabledKeys: (p == null ? void 0 : p.bulk_action_keys) ?? null,
3424
3443
  tone: "light",
3425
3444
  disabled: ct,
3426
3445
  onDone: (e) => {
3427
- e.failed === 0 && je([]), f.invalidateQueries({ queryKey: ["queue-items", l] });
3446
+ e.failed === 0 && Ve([]), f.invalidateQueries({ queryKey: ["queue-items", l] });
3428
3447
  }
3429
3448
  }
3430
3449
  ),
3431
- Oe("update-field") && /* @__PURE__ */ r(
3432
- Hs,
3450
+ De("update-field") && /* @__PURE__ */ r(
3451
+ ai,
3433
3452
  {
3434
3453
  targets: C.filter((e) => oe.includes(F(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
3435
3454
  disabled: ct,
@@ -3437,13 +3456,13 @@ function Dd({
3437
3456
  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"
3438
3457
  }
3439
3458
  ),
3440
- Oe("compare") && /* @__PURE__ */ r(
3441
- Ws,
3459
+ De("compare") && /* @__PURE__ */ r(
3460
+ ri,
3442
3461
  {
3443
3462
  targets: C.filter((e) => oe.includes(F(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
3444
3463
  renderValue: (e, t, n, a) => {
3445
3464
  var o;
3446
- return zs(
3465
+ return si(
3447
3466
  ((o = C.find((s) => oe.includes(F(s)))) == null ? void 0 : o.collection) ?? "",
3448
3467
  e,
3449
3468
  t,
@@ -3455,8 +3474,8 @@ function Dd({
3455
3474
  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"
3456
3475
  }
3457
3476
  ),
3458
- Oe("message") && /* @__PURE__ */ r(
3459
- Ys,
3477
+ De("message") && /* @__PURE__ */ r(
3478
+ oi,
3460
3479
  {
3461
3480
  targets: C.filter((e) => oe.includes(F(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
3462
3481
  disabled: ct,
@@ -3466,30 +3485,30 @@ function Dd({
3466
3485
  ]
3467
3486
  }
3468
3487
  ),
3469
- W != null && W.length ? /* @__PURE__ */ r(
3470
- ki,
3488
+ H != null && H.length ? /* @__PURE__ */ r(
3489
+ Fi,
3471
3490
  {
3472
- collection: W[0].collection,
3473
- itemId: W[0].itemId,
3474
- layoutId: W[0].layoutId,
3475
- rootLayoutSlug: W[0].rootLayoutSlug,
3476
- width: W[0].width,
3477
- title: W[0].title,
3478
- stack: W,
3479
- onPush: (e) => dt.push([...W, e]),
3491
+ collection: H[0].collection,
3492
+ itemId: H[0].itemId,
3493
+ layoutId: H[0].layoutId,
3494
+ rootLayoutSlug: H[0].rootLayoutSlug,
3495
+ width: H[0].width,
3496
+ title: H[0].title,
3497
+ stack: H,
3498
+ onPush: (e) => dt.push([...H, e]),
3480
3499
  onPop: () => dt.back(),
3481
- onClose: () => dt.back(W.length),
3482
- onOpenRecord: Rl
3500
+ onClose: () => dt.back(H.length),
3501
+ onOpenRecord: Ol
3483
3502
  }
3484
3503
  ) : null,
3485
- U && Ta(
3504
+ V && Ka(
3486
3505
  /* @__PURE__ */ d(
3487
3506
  "div",
3488
3507
  {
3489
3508
  style: {
3490
3509
  position: "fixed",
3491
- left: Math.min(U.x, window.innerWidth - 200),
3492
- top: Math.min(U.y, window.innerHeight - 260),
3510
+ left: Math.min(V.x, window.innerWidth - 200),
3511
+ top: Math.min(V.y, window.innerHeight - 260),
3493
3512
  zIndex: 125
3494
3513
  },
3495
3514
  className: "w-48 overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-xl dark:border-slate-700 dark:bg-slate-900",
@@ -3497,23 +3516,23 @@ function Dd({
3497
3516
  "data-queue-row-menu": !0,
3498
3517
  children: [
3499
3518
  [
3500
- { label: "Open", run: () => Dn(U.row) },
3519
+ { label: "Open", run: () => Kn(V.row) },
3501
3520
  {
3502
3521
  label: "Open full record",
3503
- run: () => ot(U.row)
3522
+ run: () => it(V.row)
3504
3523
  },
3505
- { label: "Peek", run: () => Me(U.row) },
3506
- ...ge ? [
3507
- ((Ra = U.row.claimed_by) == null ? void 0 : Ra.id) === S ? { label: "Release claim", run: () => et.mutate(U.row) } : { label: "Claim", run: () => De.mutate(U.row) }
3524
+ { label: "Peek", run: () => Be(V.row) },
3525
+ ...xe ? [
3526
+ ((Ea = V.row.claimed_by) == null ? void 0 : Ea.id) === S ? { label: "Release claim", run: () => nt.mutate(V.row) } : { label: "Claim", run: () => Pe.mutate(V.row) }
3508
3527
  ] : [],
3509
3528
  // The friendly id (PW26-76166), never the row id (army 6 M52);
3510
3529
  // a record with no number has nothing to copy.
3511
- ...Ka(U.row) ? [
3530
+ ...Qa(V.row) ? [
3512
3531
  {
3513
3532
  label: "Copy ID",
3514
3533
  run: () => {
3515
3534
  var e;
3516
- return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(Ka(U.row) ?? ""));
3535
+ return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(Qa(V.row) ?? ""));
3517
3536
  }
3518
3537
  }
3519
3538
  ] : [],
@@ -3522,14 +3541,14 @@ function Dd({
3522
3541
  run: () => {
3523
3542
  var e;
3524
3543
  return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(
3525
- `${window.location.origin}${Y.urlFor(Kn(U.row))}`
3544
+ `${window.location.origin}${z.urlFor(Dn(V.row))}`
3526
3545
  ));
3527
3546
  }
3528
3547
  },
3529
3548
  // Custom actions (#125): the record's registered actions, right here.
3530
- ...ll(U.row.collection).map((e) => ({
3549
+ ...ul(V.row.collection).map((e) => ({
3531
3550
  label: e.label,
3532
- run: () => ol(e, U.row)
3551
+ run: () => ml(e, V.row)
3533
3552
  }))
3534
3553
  ].map((e) => /* @__PURE__ */ r(
3535
3554
  "button",
@@ -3543,16 +3562,16 @@ function Dd({
3543
3562
  },
3544
3563
  e.label
3545
3564
  )),
3546
- U.row.collection !== "tasks" && /* @__PURE__ */ d("div", { className: "mt-1 border-t border-slate-100 pt-1 dark:border-border/60", children: [
3565
+ V.row.collection !== "tasks" && /* @__PURE__ */ d("div", { className: "mt-1 border-t border-slate-100 pt-1 dark:border-border/60", children: [
3547
3566
  /* @__PURE__ */ r("p", { className: "px-3 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Triage labels" }),
3548
3567
  Nn.slice(0, 8).map((e) => {
3549
- const t = (U.row.labels ?? []).includes(e);
3568
+ const t = (V.row.labels ?? []).includes(e);
3550
3569
  return /* @__PURE__ */ d(
3551
3570
  "button",
3552
3571
  {
3553
3572
  type: "button",
3554
3573
  onClick: () => {
3555
- br(U.row, e), $t(null);
3574
+ fr(V.row, e), $t(null);
3556
3575
  },
3557
3576
  className: "flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-50 dark:text-slate-200 dark:hover:bg-slate-800",
3558
3577
  children: [
@@ -3576,7 +3595,7 @@ function Dd({
3576
3595
  const n = e.target.elements.namedItem(
3577
3596
  "newlabel"
3578
3597
  ).value.trim();
3579
- n && (br(U.row, n), $t(null));
3598
+ n && (fr(V.row, n), $t(null));
3580
3599
  },
3581
3600
  className: "px-3 py-1",
3582
3601
  children: /* @__PURE__ */ r(
@@ -3597,55 +3616,55 @@ function Dd({
3597
3616
  ),
3598
3617
  document.body
3599
3618
  ),
3600
- pr && Ta(
3619
+ br && Ka(
3601
3620
  /* @__PURE__ */ r(
3602
- nc,
3621
+ uc,
3603
3622
  {
3604
3623
  queueId: l,
3605
- drill: pr,
3624
+ drill: br,
3606
3625
  onClose: () => wn(null),
3607
3626
  onOpenRecord: (e, t) => {
3608
- wn(null), Y.open({ collection: e, itemId: t, layoutSlug: null });
3627
+ wn(null), z.open({ collection: e, itemId: t, layoutSlug: null });
3609
3628
  }
3610
3629
  }
3611
3630
  ),
3612
3631
  document.body
3613
3632
  ),
3614
3633
  /* @__PURE__ */ r(
3615
- Pi,
3634
+ Hi,
3616
3635
  {
3617
- item: Pe,
3618
- stateLabels: En,
3619
- collectionLabel: lt,
3620
- claimsEnabled: ge,
3621
- columnFormats: Ul,
3622
- fieldLabel: (e) => T(`extra.${e}`, Ge(e)),
3636
+ item: Me,
3637
+ stateLabels: An,
3638
+ collectionLabel: st,
3639
+ claimsEnabled: xe,
3640
+ columnFormats: Yl,
3641
+ fieldLabel: (e) => A(`extra.${e}`, He(e)),
3623
3642
  width: p == null ? void 0 : p.sheet_width,
3624
3643
  itemLayout: p == null ? void 0 : p.item_layout,
3625
- onOpenRecord: (e) => ot(e),
3644
+ onOpenRecord: (e) => it(e),
3626
3645
  onOpenChange: (e) => {
3627
- e || (Me(null), On(!1));
3646
+ e || (Be(null), On(!1));
3628
3647
  },
3629
- onClaim: (e) => De.mutate(e),
3630
- onRelease: (e) => et.mutate(e),
3631
- workNextActive: ql,
3632
- onNext: () => Pe && Qr(Pe),
3648
+ onClaim: (e) => Pe.mutate(e),
3649
+ onRelease: (e) => nt.mutate(e),
3650
+ workNextActive: El,
3651
+ onNext: () => Me && jr(Me),
3633
3652
  refetchItems: () => f.invalidateQueries({ queryKey: ["queue-items", l] })
3634
3653
  }
3635
3654
  ),
3636
3655
  Wt.dialog
3637
3656
  ] });
3638
3657
  }
3639
- function nc({
3658
+ function uc({
3640
3659
  queueId: l,
3641
3660
  drill: k,
3642
- onClose: K,
3643
- onOpenRecord: M
3661
+ onClose: P,
3662
+ onOpenRecord: B
3644
3663
  }) {
3645
- const Z = ja(), { data: f, isLoading: h } = X({
3664
+ const Z = Ha(), { data: f, isLoading: h } = X({
3646
3665
  queryKey: ["queue-agg-rows", l, k.row.collection, k.row.item_id, k.path],
3647
3666
  queryFn: () => Z.request(
3648
- O(`/queues/${l}/aggregate-rows`, {
3667
+ D(`/queues/${l}/aggregate-rows`, {
3649
3668
  collection: k.row.collection,
3650
3669
  item_id: k.row.item_id,
3651
3670
  path: k.path
@@ -3656,7 +3675,7 @@ function nc({
3656
3675
  "div",
3657
3676
  {
3658
3677
  className: "fixed inset-0 z-[130] flex items-center justify-center bg-black/30 p-6",
3659
- onClick: K,
3678
+ onClick: P,
3660
3679
  children: /* @__PURE__ */ d(
3661
3680
  "div",
3662
3681
  {
@@ -3667,7 +3686,7 @@ function nc({
3667
3686
  /* @__PURE__ */ d("div", { children: [
3668
3687
  /* @__PURE__ */ r("p", { className: "text-[13px] font-semibold", children: k.row.label }),
3669
3688
  /* @__PURE__ */ d("p", { className: "text-[11.5px] text-muted-foreground", children: [
3670
- Ge(k.path),
3689
+ He(k.path),
3671
3690
  " = ",
3672
3691
  /* @__PURE__ */ r("span", { className: "tabular-nums", children: k.value }),
3673
3692
  " ",
@@ -3678,7 +3697,7 @@ function nc({
3678
3697
  "button",
3679
3698
  {
3680
3699
  type: "button",
3681
- onClick: K,
3700
+ onClick: P,
3682
3701
  className: "rounded-md px-2 py-1 text-[12px] text-slate-400 hover:bg-muted",
3683
3702
  children: "✕"
3684
3703
  }
@@ -3689,7 +3708,7 @@ function nc({
3689
3708
  "button",
3690
3709
  {
3691
3710
  type: "button",
3692
- onClick: () => f.target && M(f.target, String(S.id)),
3711
+ onClick: () => f.target && B(f.target, String(S.id)),
3693
3712
  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",
3694
3713
  children: S.label
3695
3714
  }
@@ -3703,5 +3722,5 @@ function nc({
3703
3722
  );
3704
3723
  }
3705
3724
  export {
3706
- Dd as QueueWorklist
3725
+ Hd as QueueWorklist
3707
3726
  };