@nivaro/react 0.3.139 → 0.3.141

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 (100) hide show
  1. package/dist/components/InlineGridField.js +95 -92
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +39 -2
  5. package/dist/shared/components/AudienceConfirmPanel.js +19 -19
  6. package/dist/shared/components/BroadcastView.js +213 -211
  7. package/dist/shared/components/CollectionBrowserView.js +2702 -2671
  8. package/dist/shared/components/ConfigHistory.js +45 -45
  9. package/dist/shared/components/ConformanceView.js +110 -110
  10. package/dist/shared/components/DataTable.js +51 -51
  11. package/dist/shared/components/FilePreviewLightbox.js +26 -25
  12. package/dist/shared/components/ItemEditForm.js +3475 -3458
  13. package/dist/shared/components/LiveCount.js +27 -23
  14. package/dist/shared/components/LiveTraceView.js +62 -61
  15. package/dist/shared/components/PageRenderer.js +422 -410
  16. package/dist/shared/components/ProfileView.js +199 -199
  17. package/dist/shared/components/QualityRulesView.js +70 -70
  18. package/dist/shared/components/QueryTable.js +131 -130
  19. package/dist/shared/components/RecordGraph.js +98 -98
  20. package/dist/shared/components/RecordReadView.js +287 -288
  21. package/dist/shared/components/ReportView.js +1279 -1259
  22. package/dist/shared/components/RowPresence.js +83 -76
  23. package/dist/shared/components/SlaRulesView.js +73 -74
  24. package/dist/shared/components/UnseenDot.js +183 -22
  25. package/dist/shared/components/WidgetSlot.js +73 -73
  26. package/dist/shared/components/ai/AiChart.js +36 -32
  27. package/dist/shared/components/ai/AiMarkdown.js +136 -129
  28. package/dist/shared/components/ai/TaskDo.js +87 -87
  29. package/dist/shared/components/ai/answer-formats.js +37 -30
  30. package/dist/shared/components/ai/call-log/format.js +17 -16
  31. package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
  32. package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
  33. package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
  34. package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
  35. package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
  36. package/dist/shared/components/bulk/bulk-field-options.js +10 -10
  37. package/dist/shared/components/cbv/column-totals.js +53 -51
  38. package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
  39. package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
  40. package/dist/shared/components/command-center/announce.js +7 -6
  41. package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
  42. package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
  43. package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
  44. package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
  45. package/dist/shared/components/delivery-analytics/drill.js +32 -32
  46. package/dist/shared/components/imports/RunDetailSheet.js +1 -1
  47. package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
  48. package/dist/shared/components/integrations/console/EventsView.js +35 -35
  49. package/dist/shared/components/integrations/console/FirefightView.js +15 -14
  50. package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
  51. package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
  52. package/dist/shared/components/integrations/console/SignalCard.js +67 -67
  53. package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
  54. package/dist/shared/components/item-edit/ChangesTray.js +88 -74
  55. package/dist/shared/components/item-edit/FilePickerField.js +123 -123
  56. package/dist/shared/components/item-edit/GroupSection.js +301 -292
  57. package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
  58. package/dist/shared/components/item-edit/InlineGridField.js +45 -36
  59. package/dist/shared/components/item-edit/InlineTableField.js +1390 -1376
  60. package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
  61. package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
  62. package/dist/shared/components/item-edit/RecordRecapChanges.js +116 -74
  63. package/dist/shared/components/item-edit/RecordRecapStrip.js +148 -160
  64. package/dist/shared/components/item-edit/summary-layout-request.js +15 -0
  65. package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
  66. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  67. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +226 -157
  68. package/dist/shared/components/layout-editor/settings/WhoSection.js +53 -52
  69. package/dist/shared/components/layout-editor/settings/controls.js +98 -90
  70. package/dist/shared/components/layout-editor/settings/settings-registry.js +8 -0
  71. package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
  72. package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
  73. package/dist/shared/components/ops-report/format.js +37 -36
  74. package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
  75. package/dist/shared/components/panels/RevisionsPanel.js +306 -305
  76. package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
  77. package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
  78. package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
  79. package/dist/shared/components/pipeline/TeamsView.js +189 -130
  80. package/dist/shared/components/profile/AgentsPanel.js +6 -6
  81. package/dist/shared/components/profile/DelegationCard.js +13 -12
  82. package/dist/shared/components/profile/PersonActivity.js +48 -48
  83. package/dist/shared/components/profile/PersonExtras.js +107 -107
  84. package/dist/shared/components/profile/PersonWeek.js +9 -9
  85. package/dist/shared/components/queue/QueueBulkBar.js +19 -18
  86. package/dist/shared/components/queue/QueueBulkMove.js +21 -20
  87. package/dist/shared/components/queue/QueueItemSheet.js +136 -131
  88. package/dist/shared/components/queue/QueueWorklist.js +884 -872
  89. package/dist/shared/components/queue/worklist-helpers.js +36 -21
  90. package/dist/shared/components/support/RequestList.js +123 -123
  91. package/dist/shared/components/support/SupportAnalytics.js +29 -29
  92. package/dist/shared/lib/activity-sentence.js +251 -229
  93. package/dist/shared/lib/format-value.js +5 -4
  94. package/dist/shared/lib/layout-resolve.js +64 -48
  95. package/dist/shared/lib/number-format.js +87 -0
  96. package/dist/shared/lib/number-kind.js +133 -0
  97. package/dist/shared/lib/utils.js +24 -20
  98. package/dist/shared/lib/watch-list.js +1 -1
  99. package/dist/shared/lib/widget-value-format.js +26 -12
  100. package/package.json +1 -1
@@ -5,10 +5,10 @@ import { Undo2 as G, Loader2 as K, Check as Q, UserRound as z } from "lucide-rea
5
5
  import { useState as m, useEffect as P } from "react";
6
6
  import { useNivaroClient as B } from "../../context.js";
7
7
  import { get as I, post as L, patch as H } from "../../lib/commands.js";
8
- import { cn as J } from "../../lib/utils.js";
9
- import { RelationCombobox as V } from "../item-edit/RelationCombobox.js";
10
- import { SectionCard as X, Toggle as Z, Field as k, PersonChip as U } from "./primitives.js";
11
- function ce({
8
+ import { formatNumber as J, cn as V } from "../../lib/utils.js";
9
+ import { RelationCombobox as X } from "../item-edit/RelationCombobox.js";
10
+ import { SectionCard as Z, Toggle as U, Field as k, PersonChip as ee } from "./primitives.js";
11
+ function pe({
12
12
  user: n,
13
13
  onSaved: R,
14
14
  forUser: c,
@@ -80,7 +80,7 @@ function ce({
80
80
  day: "numeric"
81
81
  }) : null;
82
82
  return /* @__PURE__ */ o(
83
- X,
83
+ Z,
84
84
  {
85
85
  testId: "delegation",
86
86
  icon: /* @__PURE__ */ e(z, { className: "h-4 w-4" }),
@@ -119,7 +119,7 @@ function ce({
119
119
  /* @__PURE__ */ o("div", { className: "flex items-center justify-between gap-3", children: [
120
120
  /* @__PURE__ */ e("span", { className: "text-[12.5px] font-medium text-slate-700 dark:text-slate-200", children: a ? `${a} is out of office` : "I'm out of office" }),
121
121
  /* @__PURE__ */ e(
122
- Z,
122
+ U,
123
123
  {
124
124
  on: p,
125
125
  onChange: () => N((t) => !t),
@@ -136,8 +136,9 @@ function ce({
136
136
  " out,",
137
137
  " ",
138
138
  i.owned_open_records > 0 && /* @__PURE__ */ o(T, { children: [
139
- /* @__PURE__ */ e("span", { className: "font-semibold", children: i.owned_open_records }),
140
- " open record",
139
+ /* @__PURE__ */ e("span", { className: "font-semibold", children: J(i.owned_open_records) }),
140
+ " ",
141
+ "open record",
141
142
  i.owned_open_records === 1 ? "" : "s",
142
143
  " ",
143
144
  a ? "they own" : "you own"
@@ -225,7 +226,7 @@ function ce({
225
226
  /* @__PURE__ */ o("div", { children: [
226
227
  /* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Delegate" }),
227
228
  /* @__PURE__ */ e(
228
- V,
229
+ X,
229
230
  {
230
231
  collection: "nivaro_users",
231
232
  value: l,
@@ -269,7 +270,7 @@ function ce({
269
270
  /* @__PURE__ */ e(
270
271
  "p",
271
272
  {
272
- className: J(
273
+ className: V(
273
274
  "mt-3 text-[11.5px] leading-relaxed",
274
275
  p && !l ? "rounded-md bg-amber-50 px-2.5 py-1.5 text-amber-700 dark:bg-amber-500/10 dark:text-amber-400" : "text-slate-400 dark:text-slate-500"
275
276
  ),
@@ -278,12 +279,12 @@ function ce({
278
279
  ),
279
280
  w && w.length > 0 && /* @__PURE__ */ o("div", { className: "mt-3 border-t border-slate-100 pt-3 dark:border-border/60", children: [
280
281
  /* @__PURE__ */ e("p", { className: "mb-1.5 text-[11px] font-medium uppercase tracking-wide text-slate-400", children: "Covers for" }),
281
- /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-x-4 gap-y-1.5", "data-person-covers": !0, children: w.map((t) => /* @__PURE__ */ e(U, { person: t }, t.id)) })
282
+ /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-x-4 gap-y-1.5", "data-person-covers": !0, children: w.map((t) => /* @__PURE__ */ e(ee, { person: t }, t.id)) })
282
283
  ] })
283
284
  ]
284
285
  }
285
286
  );
286
287
  }
287
288
  export {
288
- ce as DelegationCard
289
+ pe as DelegationCard
289
290
  };
@@ -4,14 +4,14 @@ import { Flame as G, LogIn as Q, ChevronLeft as V, ChevronRight as X, Footprints
4
4
  import { useState as T, useMemo as R } from "react";
5
5
  import { useNivaroClient as B, useNavigation as te, useItemNavigation as ae } from "../../context.js";
6
6
  import { get as A } from "../../lib/commands.js";
7
- import { formatRelative as se, formatDateTime as ne, cn as f } from "../../lib/utils.js";
8
- import { ErrorNotice as re } from "../ErrorNotice.js";
7
+ import { formatRelative as se, formatDateTime as ne, cn as f, formatNumber as re } from "../../lib/utils.js";
8
+ import { ErrorNotice as le } from "../ErrorNotice.js";
9
9
  import { SkeletonBar as D } from "../Skeletons.js";
10
- import { SimpleSelect as le } from "../ui/SimpleSelect.js";
11
- import { localDateKey as ie, localDayOffset as oe, shiftDate as de, isSafeAdminPath as ce } from "./dayTimelineLayout.js";
12
- import { foldJourneySession as me, fmtDuration as U, fallbackJourneyLabel as ue, words as pe, fmtSpan as he, fmtClock as xe } from "./journey-view.js";
13
- import { SectionCard as E, EmptyLine as F, usePersonUrl as fe } from "./primitives.js";
14
- function Re({ userId: e, title: r = "Rhythm" }) {
10
+ import { SimpleSelect as ie } from "../ui/SimpleSelect.js";
11
+ import { localDateKey as oe, localDayOffset as de, shiftDate as ce, isSafeAdminPath as me } from "./dayTimelineLayout.js";
12
+ import { foldJourneySession as ue, fmtDuration as U, fallbackJourneyLabel as pe, words as he, fmtSpan as xe, fmtClock as fe } from "./journey-view.js";
13
+ import { SectionCard as E, EmptyLine as F, usePersonUrl as ye } from "./primitives.js";
14
+ function Je({ userId: e, title: r = "Rhythm" }) {
15
15
  const n = B(), { data: t } = $({
16
16
  queryKey: ["nvr-user-stats", e],
17
17
  queryFn: () => n.request(A(`/users/${e}/stats`)).then((u) => u.data).catch(() => null),
@@ -31,9 +31,9 @@ function Re({ userId: e, title: r = "Rhythm" }) {
31
31
  "-day streak"
32
32
  ] }),
33
33
  children: o ? /* @__PURE__ */ a(F, { children: "Nothing recorded in the last eight weeks." }) : /* @__PURE__ */ l(Z, { children: [
34
- /* @__PURE__ */ a(ye, { weeks: t.weeks, max: c }),
35
- t.active_days && /* @__PURE__ */ a(be, { days: t.active_days }),
36
- t.typical_hours_utc && /* @__PURE__ */ a(ve, { hours: t.typical_hours_utc }),
34
+ /* @__PURE__ */ a(ge, { weeks: t.weeks, max: c }),
35
+ t.active_days && /* @__PURE__ */ a(ve, { days: t.active_days }),
36
+ t.typical_hours_utc && /* @__PURE__ */ a(ke, { hours: t.typical_hours_utc }),
37
37
  /* @__PURE__ */ a("dl", { className: "mt-4 grid grid-cols-3 gap-2 text-center", children: [
38
38
  ["Approvals", t.totals.transitions],
39
39
  ["Tasks done", t.totals.tasks_done],
@@ -52,7 +52,7 @@ function P(e) {
52
52
  return r.setUTCDate(r.getUTCDate() - n), r;
53
53
  }
54
54
  const q = (e) => e.toLocaleDateString(void 0, { month: "short", day: "numeric", timeZone: "UTC" });
55
- function ye({
55
+ function ge({
56
56
  weeks: e,
57
57
  max: r
58
58
  }) {
@@ -75,7 +75,7 @@ function ye({
75
75
  o === 0 ? "text-transparent" : "text-slate-500 dark:text-slate-400"
76
76
  ),
77
77
  "aria-hidden": o === 0,
78
- children: o
78
+ children: re(o)
79
79
  }
80
80
  ),
81
81
  /* @__PURE__ */ a(
@@ -105,8 +105,8 @@ function ye({
105
105
  }) })
106
106
  ] });
107
107
  }
108
- const ge = ["Mon", "", "Wed", "", "Fri", "", "Sun"];
109
- function be({ days: e }) {
108
+ const be = ["Mon", "", "Wed", "", "Fri", "", "Sun"];
109
+ function ve({ days: e }) {
110
110
  const r = new Set(e), n = P(/* @__PURE__ */ new Date()), t = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), c = Array.from({ length: 8 }, (s, d) => {
111
111
  const m = new Date(n.getTime() - (7 - d) * 7 * M);
112
112
  return {
@@ -128,7 +128,7 @@ function be({ days: e }) {
128
128
  ] })
129
129
  ] }),
130
130
  /* @__PURE__ */ l("div", { className: "mt-1.5 flex gap-1.5", children: [
131
- /* @__PURE__ */ a("div", { className: "flex flex-col gap-[3px] pr-1", "aria-hidden": !0, children: ge.map((s, d) => /* @__PURE__ */ a(
131
+ /* @__PURE__ */ a("div", { className: "flex flex-col gap-[3px] pr-1", "aria-hidden": !0, children: be.map((s, d) => /* @__PURE__ */ a(
132
132
  "span",
133
133
  {
134
134
  className: "h-3 text-[9.5px] leading-3 text-slate-400",
@@ -164,7 +164,7 @@ function be({ days: e }) {
164
164
  ] })
165
165
  ] });
166
166
  }
167
- function ve({ hours: e }) {
167
+ function ke({ hours: e }) {
168
168
  const r = -(/* @__PURE__ */ new Date()).getTimezoneOffset() / 60, n = (c) => ((c + r) % 24 + 24) % 24, t = (c) => {
169
169
  const o = Math.round(c * 2) / 2, u = Math.floor(o) % 24, s = o % 1 ? 30 : 0;
170
170
  return new Date(2e3, 0, 1, u, s).toLocaleTimeString([], { hour: "numeric", minute: s ? "2-digit" : void 0 });
@@ -185,25 +185,25 @@ function ve({ hours: e }) {
185
185
  ] })
186
186
  ] });
187
187
  }
188
- function Je(e) {
189
- const r = ue(e);
188
+ function Be(e) {
189
+ const r = pe(e);
190
190
  return r.section && r.kind === "page" ? `${r.section} › ${r.title}` : r.title;
191
191
  }
192
- function ke(e, r, n) {
192
+ function Ne(e, r, n) {
193
193
  return e.request(
194
194
  A(`/journeys/days/${r}`, n ? { app: n } : void 0)
195
195
  ).then((t) => ({ days: t.data ?? [], apps: t.apps ?? [] })).catch(() => ({ days: [], apps: [] }));
196
196
  }
197
- function Ne(e) {
197
+ function we(e) {
198
198
  const r = e.filter((n) => n !== "admin");
199
- return (n) => !n || n === "admin" ? "Admin" : r.length <= 1 ? "Portal" : pe(n);
199
+ return (n) => !n || n === "admin" ? "Admin" : r.length <= 1 ? "Portal" : he(n);
200
200
  }
201
- function we(e) {
201
+ function Se(e) {
202
202
  return e < 600 ? e : Math.floor(e / 60) * 60;
203
203
  }
204
204
  function W(e, r) {
205
205
  if (e === r) return "Today";
206
- if (e === de(r, -1)) return "Yesterday";
206
+ if (e === ce(r, -1)) return "Yesterday";
207
207
  const [n, t, c] = e.split("-").map(Number);
208
208
  return new Date(n, t - 1, c).toLocaleDateString("en-US", {
209
209
  weekday: "short",
@@ -216,13 +216,13 @@ function J(e, r, n = !1) {
216
216
  const t = W(e, r);
217
217
  return t === "Today" || t === "Yesterday" ? t.toLowerCase() : n ? `on ${t}` : t;
218
218
  }
219
- const L = 8, Se = 300;
220
- function Be({ userId: e }) {
219
+ const L = 8, De = 300;
220
+ function Pe({ userId: e }) {
221
221
  var O;
222
- const r = B(), n = ie(/* @__PURE__ */ new Date()), [t, c] = T(n), [o, u] = T(null), { data: s } = $({
222
+ const r = B(), n = oe(/* @__PURE__ */ new Date()), [t, c] = T(n), [o, u] = T(null), { data: s } = $({
223
223
  queryKey: ["nvr-journey-days", e, o],
224
- queryFn: () => ke(r, e, o)
225
- }), d = (s == null ? void 0 : s.days) ?? [], m = (s == null ? void 0 : s.apps) ?? [], y = oe(t), { data: g, isLoading: b, isError: h, error: w, refetch: S } = $({
224
+ queryFn: () => Ne(r, e, o)
225
+ }), d = (s == null ? void 0 : s.days) ?? [], m = (s == null ? void 0 : s.apps) ?? [], y = de(t), { data: g, isLoading: b, isError: h, error: w, refetch: S } = $({
226
226
  queryKey: ["nvr-journey", e, t, y, o],
227
227
  queryFn: () => r.request(
228
228
  A(`/journeys/user/${e}`, {
@@ -236,9 +236,9 @@ function Be({ userId: e }) {
236
236
  () => [.../* @__PURE__ */ new Set([n, ...d.map((i) => i.date)])].sort().reverse(),
237
237
  [n, d]
238
238
  ), N = p.indexOf(t), _ = N > 0 ? p[N - 1] : null, C = N >= 0 && N < p.length - 1 ? p[N + 1] : null, x = R(
239
- () => ((g == null ? void 0 : g.sessions) ?? []).map((i) => ({ s: i, v: me(i.steps) })).filter((i) => i.v.rows.length > 0).sort((i, v) => i.v.start.localeCompare(v.v.start)),
239
+ () => ((g == null ? void 0 : g.sessions) ?? []).map((i) => ({ s: i, v: ue(i.steps) })).filter((i) => i.v.rows.length > 0).sort((i, v) => i.v.start.localeCompare(v.v.start)),
240
240
  [g]
241
- ), Y = Math.max(60, ...x.flatMap((i) => i.v.rows.map((v) => v.seconds ?? 0))), z = x.reduce((i, v) => i + we(v.v.seconds), 0), I = Ne(m), j = ((O = d.find((i) => i.date !== t)) == null ? void 0 : O.date) ?? null, K = "inline-flex h-7 w-7 items-center justify-center rounded-md text-slate-500 transition-colors hover:bg-slate-100 hover:text-slate-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/40 disabled:pointer-events-none disabled:opacity-30 dark:text-slate-400 dark:hover:bg-muted dark:hover:text-slate-100", H = /* @__PURE__ */ l("div", { className: "flex items-center gap-0.5", "data-journey-day-picker": !0, children: [
241
+ ), Y = Math.max(60, ...x.flatMap((i) => i.v.rows.map((v) => v.seconds ?? 0))), z = x.reduce((i, v) => i + Se(v.v.seconds), 0), I = we(m), j = ((O = d.find((i) => i.date !== t)) == null ? void 0 : O.date) ?? null, K = "inline-flex h-7 w-7 items-center justify-center rounded-md text-slate-500 transition-colors hover:bg-slate-100 hover:text-slate-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/40 disabled:pointer-events-none disabled:opacity-30 dark:text-slate-400 dark:hover:bg-muted dark:hover:text-slate-100", H = /* @__PURE__ */ l("div", { className: "flex items-center gap-0.5", "data-journey-day-picker": !0, children: [
242
242
  /* @__PURE__ */ a(
243
243
  "button",
244
244
  {
@@ -251,7 +251,7 @@ function Be({ userId: e }) {
251
251
  }
252
252
  ),
253
253
  /* @__PURE__ */ a(
254
- le,
254
+ ie,
255
255
  {
256
256
  value: t,
257
257
  onChange: c,
@@ -324,7 +324,7 @@ function Be({ userId: e }) {
324
324
  }
325
325
  )
326
326
  ] }),
327
- b ? /* @__PURE__ */ a(De, {}) : h ? /* @__PURE__ */ a(re, { error: w, what: "the pages visited", onRetry: () => void S() }) : x.length === 0 ? /* @__PURE__ */ l("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1", "data-journey-empty": !0, children: [
327
+ b ? /* @__PURE__ */ a(_e, {}) : h ? /* @__PURE__ */ a(le, { error: w, what: "the pages visited", onRetry: () => void S() }) : x.length === 0 ? /* @__PURE__ */ l("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1", "data-journey-empty": !0, children: [
328
328
  /* @__PURE__ */ l(F, { children: [
329
329
  "No pages recorded ",
330
330
  t === n ? "today" : J(t, n, !0),
@@ -343,7 +343,7 @@ function Be({ userId: e }) {
343
343
  }
344
344
  )
345
345
  ] }) : /* @__PURE__ */ a("div", { className: "divide-y divide-slate-100 dark:divide-border/60", children: x.map(({ s: i, v }) => /* @__PURE__ */ a(
346
- _e,
346
+ Ce,
347
347
  {
348
348
  app: i.app ?? "admin",
349
349
  appName: I(i.app ?? "admin"),
@@ -357,7 +357,7 @@ function Be({ userId: e }) {
357
357
  }
358
358
  );
359
359
  }
360
- function De() {
360
+ function _e() {
361
361
  return /* @__PURE__ */ l("div", { className: "space-y-3", role: "status", "aria-busy": "true", "aria-label": "Loading pages visited", children: [
362
362
  /* @__PURE__ */ a(D, { width: 160, className: "h-3.5" }),
363
363
  [72, 54, 64, 46].map((e) => /* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
@@ -367,7 +367,7 @@ function De() {
367
367
  ] }, e))
368
368
  ] });
369
369
  }
370
- function _e({
370
+ function Ce({
371
371
  app: e,
372
372
  appName: r,
373
373
  view: n,
@@ -377,7 +377,7 @@ function _e({
377
377
  const [o, u] = T(!1), s = n.rows.length > L + 2 && !o, d = s ? n.rows.slice(0, L) : n.rows;
378
378
  return /* @__PURE__ */ l("section", { className: "py-4 first:pt-0 last:pb-0", "data-journey-session": !0, children: [
379
379
  /* @__PURE__ */ l("header", { className: "mb-2 flex flex-wrap items-baseline gap-x-2 gap-y-0.5", children: [
380
- /* @__PURE__ */ a("h4", { className: "text-[13px] font-semibold tabular-nums text-slate-800 dark:text-slate-100", children: he(n.start, n.end) }),
380
+ /* @__PURE__ */ a("h4", { className: "text-[13px] font-semibold tabular-nums text-slate-800 dark:text-slate-100", children: xe(n.start, n.end) }),
381
381
  /* @__PURE__ */ l("p", { className: "text-[11.5px] tabular-nums text-slate-500 dark:text-slate-400", children: [
382
382
  U(n.seconds) || "under a minute",
383
383
  " · ",
@@ -395,7 +395,7 @@ function _e({
395
395
  )
396
396
  ] }),
397
397
  /* @__PURE__ */ a("ol", { className: "-mx-2", children: d.map((m) => /* @__PURE__ */ a(
398
- Ce,
398
+ je,
399
399
  {
400
400
  row: m,
401
401
  maxDwell: c,
@@ -421,21 +421,21 @@ function _e({
421
421
  ] })
422
422
  ] });
423
423
  }
424
- function Ce({
424
+ function je({
425
425
  row: e,
426
426
  maxDwell: r,
427
427
  appName: n
428
428
  }) {
429
429
  var k;
430
- const t = te(), { urlFor: c, open: o } = ae(), u = fe(), s = e.label, d = (p) => t.consoleUrl ? t.consoleUrl(p) : p;
430
+ const t = te(), { urlFor: c, open: o } = ae(), u = ye(), s = e.label, d = (p) => t.consoleUrl ? t.consoleUrl(p) : p;
431
431
  let m = null, y = null;
432
432
  if (s.record) {
433
433
  const p = { collection: s.record.collection, itemId: s.record.id };
434
434
  m = c(p), y = () => o(p);
435
- } else s.queue_id ? m = d(`/queues/${encodeURIComponent(s.queue_id)}`) : s.person_id ? m = u(s.person_id) : e.app === "admin" && s.kind !== "record" && ce(e.path) && (m = d(e.path));
435
+ } else s.queue_id ? m = d(`/queues/${encodeURIComponent(s.queue_id)}`) : s.person_id ? m = u(s.person_id) : e.app === "admin" && s.kind !== "record" && me(e.path) && (m = d(e.path));
436
436
  const b = [s.kind === "record" || s.kind === "new-record" || ((k = s.section) == null ? void 0 : k.toLowerCase()) === n.toLowerCase() ? null : s.section, ...e.details, e.visits > 1 ? `${e.visits} visits` : null].filter(
437
437
  Boolean
438
- ), h = (e.seconds ?? 0) >= Se, w = (e.seconds ?? 0) >= 60 ? Math.max(15, Math.round(Math.sqrt((e.seconds ?? 0) / r) * 100)) : 0, S = /* @__PURE__ */ a("span", { className: "line-clamp-2 break-words", children: s.title });
438
+ ), h = (e.seconds ?? 0) >= De, w = (e.seconds ?? 0) >= 60 ? Math.max(15, Math.round(Math.sqrt((e.seconds ?? 0) / r) * 100)) : 0, S = /* @__PURE__ */ a("span", { className: "line-clamp-2 break-words", children: s.title });
439
439
  return /* @__PURE__ */ l(
440
440
  "li",
441
441
  {
@@ -447,7 +447,7 @@ function Ce({
447
447
  {
448
448
  dateTime: e.start,
449
449
  className: "pt-px text-[11.5px] tabular-nums text-slate-500 dark:text-slate-400",
450
- children: xe(e.start)
450
+ children: fe(e.start)
451
451
  }
452
452
  ),
453
453
  /* @__PURE__ */ l("div", { className: "min-w-0", children: [
@@ -499,7 +499,7 @@ function Ce({
499
499
  }
500
500
  );
501
501
  }
502
- function Pe({ profile: e }) {
502
+ function We({ profile: e }) {
503
503
  var n;
504
504
  const r = ((n = e.admin) == null ? void 0 : n.logins) ?? [];
505
505
  return /* @__PURE__ */ a(
@@ -526,10 +526,10 @@ function Pe({ profile: e }) {
526
526
  );
527
527
  }
528
528
  export {
529
- Be as JourneyCard,
530
- Pe as SignInsCard,
531
- Re as StatsCard,
532
- ke as fetchJourneyDays,
529
+ Pe as JourneyCard,
530
+ We as SignInsCard,
531
+ Je as StatsCard,
532
+ Ne as fetchJourneyDays,
533
533
  U as fmtDuration,
534
- Je as pageLabel
534
+ Be as pageLabel
535
535
  };