@nivaro/react 0.3.65 → 0.3.66

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