@nivaro/react 0.2.54 → 0.2.56

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 (151) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +99 -98
  3. package/dist/index.d.ts +367 -2
  4. package/dist/index.js +645 -616
  5. package/dist/layout-editor.d.ts +4 -0
  6. package/dist/shared/components/BackgroundRunOffer.js +117 -0
  7. package/dist/shared/components/BroadcastView.js +214 -213
  8. package/dist/shared/components/CollectionBrowserView.js +2592 -2695
  9. package/dist/shared/components/ItemEditForm.js +4066 -3832
  10. package/dist/shared/components/JobsTray.js +100 -55
  11. package/dist/shared/components/MyWorkView.js +91 -89
  12. package/dist/shared/components/NotificationBell.js +80 -79
  13. package/dist/shared/components/ProfileView.js +568 -520
  14. package/dist/shared/components/RecordCompare.js +254 -0
  15. package/dist/shared/components/RecordReadView.js +599 -552
  16. package/dist/shared/components/ReportView.js +578 -543
  17. package/dist/shared/components/RowPresence.js +91 -0
  18. package/dist/shared/components/WidgetSlot.js +474 -458
  19. package/dist/shared/components/ai/AiAnalyticsView.js +16 -6
  20. package/dist/shared/components/ai/AskPanel.js +139 -119
  21. package/dist/shared/components/ai/FirstWeekCard.js +126 -0
  22. package/dist/shared/components/bulk/BulkFieldUpdate.js +289 -0
  23. package/dist/shared/components/bulk/bulk-field-options.js +45 -0
  24. package/dist/shared/components/charts/CumulativeFlowChart.js +176 -0
  25. package/dist/shared/components/chat/ChannelArchive.js +326 -0
  26. package/dist/shared/components/chat/ChannelExtras.js +141 -121
  27. package/dist/shared/components/chat/ChatAnalyticsView.js +112 -110
  28. package/dist/shared/components/chat/ChatPanel.js +1695 -1733
  29. package/dist/shared/components/chat/Composer.js +357 -303
  30. package/dist/shared/components/chat/MessageActions.js +92 -0
  31. package/dist/shared/components/chat/MessageFormat.js +290 -264
  32. package/dist/shared/components/chat/OutboxBubbles.js +146 -0
  33. package/dist/shared/components/chat/RequestIdCard.js +135 -0
  34. package/dist/shared/components/chat/RoomHeaderMenu.js +202 -0
  35. package/dist/shared/components/chat/RoomParts.js +213 -274
  36. package/dist/shared/components/chat/ScreenClip.js +184 -0
  37. package/dist/shared/components/chat/chat-core.js +402 -483
  38. package/dist/shared/components/chat/chat-drafts.js +59 -0
  39. package/dist/shared/components/chat/chat-emoji.js +348 -0
  40. package/dist/shared/components/chat/chat-local-time.js +41 -0
  41. package/dist/shared/components/chat/chat-outbox.js +303 -0
  42. package/dist/shared/components/chat/chat-window.js +163 -0
  43. package/dist/shared/components/chat/huddle/HuddleControls.js +143 -0
  44. package/dist/shared/components/chat/huddle/HuddleStage.js +164 -0
  45. package/dist/shared/components/chat/huddle/huddle-store.js +342 -0
  46. package/dist/shared/components/chat/huddle/useHuddle.js +58 -0
  47. package/dist/shared/components/help-videos/api.js +76 -73
  48. package/dist/shared/components/item-edit/CatalogPickerField.js +113 -112
  49. package/dist/shared/components/item-edit/ChangeReasonDialog.js +13 -13
  50. package/dist/shared/components/item-edit/FieldAffordances.js +2 -2
  51. package/dist/shared/components/item-edit/FieldRenderer.js +248 -245
  52. package/dist/shared/components/item-edit/FieldRow.js +292 -279
  53. package/dist/shared/components/item-edit/GroupSection.js +698 -574
  54. package/dist/shared/components/item-edit/InlineTableField.js +3 -1
  55. package/dist/shared/components/item-edit/RelationCombobox.js +186 -176
  56. package/dist/shared/components/item-edit/entry/EntryStrip.js +54 -0
  57. package/dist/shared/components/item-edit/entry/entry-keys.js +27 -0
  58. package/dist/shared/components/item-edit/entry/useEntryKeyboard.js +70 -0
  59. package/dist/shared/components/item-edit/entry/useEntryMode.js +59 -0
  60. package/dist/shared/components/item-edit/form-structure-ui.js +105 -0
  61. package/dist/shared/components/item-edit/lazy-sections.js +36 -0
  62. package/dist/shared/components/item-edit/lock-why.js +39 -32
  63. package/dist/shared/components/item-edit/picker-miss.js +26 -0
  64. package/dist/shared/components/item-edit/placement-behaviour.js +196 -0
  65. package/dist/shared/components/item-edit/useFormUsageBeacon.js +51 -45
  66. package/dist/shared/components/layout-editor/AddPanel.js +134 -117
  67. package/dist/shared/components/layout-editor/ChangeNote.js +25 -24
  68. package/dist/shared/components/layout-editor/CollabParts.js +80 -75
  69. package/dist/shared/components/layout-editor/DesignNode.js +126 -120
  70. package/dist/shared/components/layout-editor/EditorCanvas.js +30 -27
  71. package/dist/shared/components/layout-editor/EditorTopBar.js +203 -192
  72. package/dist/shared/components/layout-editor/HistoryPanel.js +120 -104
  73. package/dist/shared/components/layout-editor/LayoutEditor.js +768 -671
  74. package/dist/shared/components/layout-editor/RestorePiece.js +143 -0
  75. package/dist/shared/components/layout-editor/StagedChip.js +22 -0
  76. package/dist/shared/components/layout-editor/StructureMenu.js +237 -186
  77. package/dist/shared/components/layout-editor/collab/FormFollowShare.js +149 -103
  78. package/dist/shared/components/layout-editor/collab/collab-api.js +29 -26
  79. package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +81 -80
  80. package/dist/shared/components/layout-editor/dnd/node.js +69 -57
  81. package/dist/shared/components/layout-editor/draft-recovery.js +113 -43
  82. package/dist/shared/components/layout-editor/entry/PlacementPresets.js +149 -0
  83. package/dist/shared/components/layout-editor/entry/entry-editor-context.js +10 -0
  84. package/dist/shared/components/layout-editor/entry/presets.js +71 -0
  85. package/dist/shared/components/layout-editor/entry/tab-order.js +110 -0
  86. package/dist/shared/components/layout-editor/entry/theme-preview.js +37 -0
  87. package/dist/shared/components/layout-editor/grid-guides.js +142 -0
  88. package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +402 -0
  89. package/dist/shared/components/layout-editor/inspector/BulkInspector.js +61 -57
  90. package/dist/shared/components/layout-editor/inspector/GroupInspector.js +247 -151
  91. package/dist/shared/components/layout-editor/inspector/Inspector.js +176 -155
  92. package/dist/shared/components/layout-editor/inspector/LookTab.js +167 -116
  93. package/dist/shared/components/layout-editor/inspector/PickerMisses.js +129 -0
  94. package/dist/shared/components/layout-editor/inspector/PickerTab.js +84 -82
  95. package/dist/shared/components/layout-editor/inspector/RulesTab.js +66 -62
  96. package/dist/shared/components/layout-editor/inspector/kit.js +69 -68
  97. package/dist/shared/components/layout-editor/outputs/OutputsButton.js +254 -0
  98. package/dist/shared/components/layout-editor/outputs/help-sheet.js +154 -0
  99. package/dist/shared/components/layout-editor/outputs/output-api.js +61 -0
  100. package/dist/shared/components/layout-editor/overview/describe-conditions.js +6 -0
  101. package/dist/shared/components/layout-editor/overview/purpose.js +15 -13
  102. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  103. package/dist/shared/components/layout-editor/restore-piece.js +192 -0
  104. package/dist/shared/components/layout-editor/section-structure.js +241 -0
  105. package/dist/shared/components/layout-editor/settings/EntrySection.js +296 -0
  106. package/dist/shared/components/layout-editor/settings/FormSettings.js +41 -39
  107. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +255 -0
  108. package/dist/shared/components/layout-editor/settings/ToolsSection.js +147 -111
  109. package/dist/shared/components/layout-editor/settings/WhoSection.js +29 -26
  110. package/dist/shared/components/layout-editor/settings/settings-registry.js +114 -17
  111. package/dist/shared/components/layout-editor/staged-api.js +64 -0
  112. package/dist/shared/components/layout-editor/structure-ops.js +81 -77
  113. package/dist/shared/components/layout-editor/testing/TestingPanels.js +65 -60
  114. package/dist/shared/components/layout-editor/testing/testing-model.js +198 -185
  115. package/dist/shared/components/layout-editor/toolbar-kit.js +11 -11
  116. package/dist/shared/components/layout-editor/usage/AbTestSection.js +355 -0
  117. package/dist/shared/components/layout-editor/usage/UsagePanel.js +144 -70
  118. package/dist/shared/components/layout-editor/usage/ab-api.js +86 -0
  119. package/dist/shared/components/layout-editor/usage/suggest-collapse.js +32 -0
  120. package/dist/shared/components/layout-editor/useLayoutDraft.js +25 -24
  121. package/dist/shared/components/notifications/NotificationAnalyticsView.js +148 -77
  122. package/dist/shared/components/panels/ErpFailureBanner.js +18 -17
  123. package/dist/shared/components/panels/ExternalRequestsChip.js +63 -62
  124. package/dist/shared/components/pipeline/PipelineEditorView.js +106 -104
  125. package/dist/shared/components/profile/AgentsPanel.js +479 -0
  126. package/dist/shared/components/queue/QueueWorklist.js +1026 -1040
  127. package/dist/shared/components/support/SupportAnalytics.js +171 -0
  128. package/dist/shared/components/support/SupportView.js +75 -73
  129. package/dist/shared/lib/background-runs.js +150 -0
  130. package/dist/shared/lib/delivery-ack.js +9 -0
  131. package/dist/shared/lib/entry-badge-style.js +13 -0
  132. package/dist/shared/lib/entry-config.js +71 -0
  133. package/dist/shared/lib/form-sections.js +64 -0
  134. package/dist/shared/lib/form-structure.js +99 -0
  135. package/dist/shared/lib/form-usage-beacon.js +101 -52
  136. package/dist/shared/lib/jobs-tray.js +25 -23
  137. package/dist/shared/lib/keyset-pager.js +37 -0
  138. package/dist/shared/lib/layout-ops.js +84 -82
  139. package/dist/shared/lib/layout-resolve.js +113 -0
  140. package/dist/shared/lib/placement-behaviour.js +144 -0
  141. package/dist/shared/lib/prefetch.js +149 -0
  142. package/dist/shared/lib/presence-hooks.js +199 -0
  143. package/dist/shared/lib/record-outbox.js +82 -81
  144. package/dist/shared/lib/replay-socket.js +93 -0
  145. package/dist/shared/lib/request-gate.js +51 -50
  146. package/dist/shared/lib/room-gaps.js +96 -0
  147. package/dist/shared/lib/search-log.js +27 -0
  148. package/dist/shared/lib/socket-realtime.js +101 -80
  149. package/dist/shared/lib/stale-chunk.js +60 -0
  150. package/dist/shared/lib/worker-socket.js +200 -0
  151. package/package.json +1 -1
@@ -1,21 +1,22 @@
1
1
  import { jsxs as c, jsx as n, Fragment as kt } from "react/jsx-runtime";
2
- import { useQueryClient as pr, useQuery as B, useQueries as wt } from "@tanstack/react-query";
3
- import { Search as Xe, Loader2 as ae, ChevronRight as Nt, Star as Ke, AlertTriangle as Ce, AlertCircle as hr, X as et, ChevronDown as xr } from "lucide-react";
2
+ import { useQueryClient as hr, useQuery as B, useQueries as wt } from "@tanstack/react-query";
3
+ import { Search as Xe, Loader2 as ae, ChevronRight as Nt, Star as Ke, AlertTriangle as Ce, AlertCircle as xr, X as et, ChevronDown as gr } from "lucide-react";
4
4
  import { useState as re, useRef as Je, useMemo as P, useEffect as Se, Fragment as Re } from "react";
5
- import { createPortal as gr } from "react-dom";
6
- import { useNivaroClient as vt, useParentDraft as yr, useReimportHandler as kr } from "../../context.js";
5
+ import { createPortal as yr } from "react-dom";
6
+ import { useNivaroClient as vt, useParentDraft as kr, useReimportHandler as wr } from "../../context.js";
7
7
  import { canOpenCatalogItem as Dt, openCatalogItem as Ht } from "../../lib/catalog-item-open.js";
8
- import { get as E, patch as Qt, del as wr, post as Vt } from "../../lib/commands.js";
9
- import { evaluateBoolean as Nr } from "../../lib/expression.js";
10
- import { submissionLineErrors as vr, normalizeIdent as _r } from "../../lib/submission-errors.js";
11
- import { titleCase as te, cn as V, matchesAllTokens as Sr } from "../../lib/utils.js";
12
- import { ImportFromFileButton as qr } from "../import/ImportFromFileButton.js";
8
+ import { get as E, patch as Qt, del as Nr, post as Vt } from "../../lib/commands.js";
9
+ import { evaluateBoolean as vr } from "../../lib/expression.js";
10
+ import { useLiveRefetchInterval as _r } from "../../lib/live-queries.js";
11
+ import { submissionLineErrors as Sr, normalizeIdent as qr } from "../../lib/submission-errors.js";
12
+ import { titleCase as te, cn as V, matchesAllTokens as $r } from "../../lib/utils.js";
13
+ import { ImportFromFileButton as jr } from "../import/ImportFromFileButton.js";
13
14
  import { applyDisplayTemplate as qe } from "./helpers.js";
14
15
  import { evalClientFormula as Ae } from "./InlineTableField.js";
15
- import { resolveM2MRelatedCollection as $r } from "./M2MCombobox.js";
16
- import { useO2MStaging as jr } from "./O2MStagingContext.js";
17
- import { RelationCombobox as Fr } from "./RelationCombobox.js";
18
- const Mt = (m, x) => {
16
+ import { resolveM2MRelatedCollection as Fr } from "./M2MCombobox.js";
17
+ import { useO2MStaging as Tr } from "./O2MStagingContext.js";
18
+ import { RelationCombobox as Or } from "./RelationCombobox.js";
19
+ const It = (m, x) => {
19
20
  let S = m;
20
21
  for (const q of x.split(".")) {
21
22
  if (S == null || typeof S != "object") return;
@@ -82,8 +83,8 @@ function Ut(m, x) {
82
83
  }
83
84
  return !0;
84
85
  }
85
- const Tr = 2e3;
86
- function Zr({
86
+ const Lr = 2e3;
87
+ function en({
87
88
  relatedCollection: m,
88
89
  manyField: x,
89
90
  parentId: S,
@@ -92,7 +93,7 @@ function Zr({
92
93
  readOnly: h = !1
93
94
  }) {
94
95
  var Kt, Jt;
95
- const p = vt(), $ = pr(), f = jr(), R = yr(), Z = kr(), U = l.editable_fields ?? [], K = S === "new", D = l.qty_field ?? "quantity", [de, ne] = re(/* @__PURE__ */ new Set()), he = Je(!1), [J, xe] = re(""), [be, G] = re({}), [se, w] = re(/* @__PURE__ */ new Set()), { data: O = [], isPending: L } = B({
96
+ const p = vt(), $ = hr(), f = Tr(), R = kr(), Z = wr(), U = l.editable_fields ?? [], K = S === "new", D = l.qty_field ?? "quantity", [de, ne] = re(/* @__PURE__ */ new Set()), he = Je(!1), [J, xe] = re(""), [be, G] = re({}), [se, w] = re(/* @__PURE__ */ new Set()), { data: O = [], isPending: L } = B({
96
97
  queryKey: ["collection-relations", m],
97
98
  queryFn: () => p.request(E(`/collections/${m}`)).then((e) => {
98
99
  var t;
@@ -131,7 +132,7 @@ function Zr({
131
132
  if (!(T != null && T.many_field) || !z) return null;
132
133
  const e = String(T.junction_field), t = ge.find(
133
134
  (a) => a.many_collection === z && a.many_field === e
134
- ), r = $r(t);
135
+ ), r = Fr(t);
135
136
  return r ? {
136
137
  junction: z,
137
138
  fkToItem: T.many_field,
@@ -172,7 +173,7 @@ function Zr({
172
173
  queryKey: ["catalog-picker", b, ee, Be],
173
174
  queryFn: () => p.request(
174
175
  E(`/items/${b}`, {
175
- limit: Tr,
176
+ limit: Lr,
176
177
  fields: ee,
177
178
  ...je ? { filter: JSON.stringify(je) } : {}
178
179
  })
@@ -191,22 +192,22 @@ function Zr({
191
192
  ...ye ? { filter: JSON.stringify(ye) } : {}
192
193
  })).map((r) => ({
193
194
  id: String(r.id),
194
- name: String(Mt(r, e.labelPath) ?? "").trim()
195
+ name: String(It(r, e.labelPath) ?? "").trim()
195
196
  }));
196
197
  },
197
198
  enabled: !!A && ce.length === 0,
198
199
  staleTime: 6e4
199
- }), M = P(() => y.map((e) => e.id), [y]), { data: I = [], isLoading: le } = B({
200
+ }), I = P(() => y.map((e) => e.id), [y]), { data: W = [], isLoading: le } = B({
200
201
  queryKey: [
201
202
  "catalog-section-links",
202
203
  A == null ? void 0 : A.junction,
203
- M.join(","),
204
+ I.join(","),
204
205
  JSON.stringify(ie ?? null)
205
206
  ],
206
207
  queryFn: async () => {
207
208
  const e = A, t = [];
208
- for (let r = 0; r < M.length; r += 200) {
209
- const a = M.slice(r, r + 200), d = await tt(p, `/items/${e.junction}`, {
209
+ for (let r = 0; r < I.length; r += 200) {
210
+ const a = I.slice(r, r + 200), d = await tt(p, `/items/${e.junction}`, {
210
211
  fields: `${e.fkToItem},${e.fkToSection}`,
211
212
  filter: JSON.stringify(
212
213
  ie ? { _and: [{ [e.fkToSection]: { _in: a } }, ie] } : { [e.fkToSection]: { _in: a } }
@@ -217,22 +218,22 @@ function Zr({
217
218
  }
218
219
  return t;
219
220
  },
220
- enabled: !!A && M.length > 0,
221
+ enabled: !!A && I.length > 0,
221
222
  staleTime: 6e4
222
223
  }), Q = P(() => {
223
224
  const e = new Map(y.map((r) => [r.id, r.name])), t = /* @__PURE__ */ new Map();
224
- for (const r of I) {
225
+ for (const r of W) {
225
226
  const a = e.get(r.section);
226
227
  if (!a) continue;
227
228
  const d = t.get(r.item) ?? [];
228
229
  d.includes(a) || d.push(a), t.set(r.item, d);
229
230
  }
230
231
  return t;
231
- }, [y, I]), Y = !!T && (!A || H || M.length > 0 && le), me = P(() => {
232
+ }, [y, W]), Y = !!T && (!A || H || I.length > 0 && le), me = P(() => {
232
233
  const e = /* @__PURE__ */ new Map();
233
234
  for (const t of ke) e.set(String(t.id), t);
234
235
  return e;
235
- }, [ke]), { data: W = [] } = B({
236
+ }, [ke]), { data: M = [] } = B({
236
237
  queryKey: ["o2m-rows", m, x, S],
237
238
  queryFn: () => p.request(
238
239
  E(`/items/${m}`, {
@@ -242,12 +243,12 @@ function Zr({
242
243
  ).then((e) => e.data ?? []),
243
244
  enabled: !K,
244
245
  staleTime: 15e3
245
- }), Te = !K && !!f, Ne = f ? f.getPendingRows(m, x) : [], Qe = Te ? f.getPendingEdits(m, x) : /* @__PURE__ */ new Map(), Wt = JSON.stringify([...Qe.entries()]), Ve = P(
246
- () => Qe.size === 0 ? W : W.map((e) => {
246
+ }), Te = !K && !!f, Ne = f ? f.getPendingRows(m, x) : [], Qe = Te ? f.getPendingEdits(m, x) : /* @__PURE__ */ new Map(), Mt = JSON.stringify([...Qe.entries()]), Ve = P(
247
+ () => Qe.size === 0 ? M : M.map((e) => {
247
248
  const t = Qe.get(String(e.id));
248
249
  return t ? { ...e, ...t } : e;
249
250
  }),
250
- [W, Wt]
251
+ [M, Mt]
251
252
  ), Ue = !K && f ? f.getPendingDeletes(m, x) : /* @__PURE__ */ new Set(), De = P(() => {
252
253
  const e = /* @__PURE__ */ new Map();
253
254
  for (const t of Ve) {
@@ -296,9 +297,9 @@ function Zr({
296
297
  ).then((e) => e.data ?? []),
297
298
  enabled: !!b && !!l.favorites && pe.length > 0,
298
299
  staleTime: 6e4
299
- }), [Me, St] = re(/* @__PURE__ */ new Set());
300
+ }), [Ie, St] = re(/* @__PURE__ */ new Set());
300
301
  async function qt(e) {
301
- if (!(!b || Me.has(e))) {
302
+ if (!(!b || Ie.has(e))) {
302
303
  St((t) => new Set(t).add(e));
303
304
  try {
304
305
  await p.request(Vt(`/pinned/${b}/${e}/toggle`)).catch(() => {
@@ -311,17 +312,17 @@ function Zr({
311
312
  }
312
313
  }
313
314
  }
314
- const [It, $t] = re(!1), jt = Je(null), st = (e) => l.favorites ? /* @__PURE__ */ n(
315
+ const [Wt, $t] = re(!1), jt = Je(null), st = (e) => l.favorites ? /* @__PURE__ */ n(
315
316
  "button",
316
317
  {
317
318
  type: "button",
318
319
  title: nt.has(e) ? "Remove from favorites" : "Add to favorites",
319
- disabled: Me.has(e),
320
+ disabled: Ie.has(e),
320
321
  onClick: (t) => {
321
322
  t.stopPropagation(), qt(e);
322
323
  },
323
324
  className: "shrink-0 rounded p-0.5 transition-colors",
324
- children: Me.has(e) ? /* @__PURE__ */ n(ae, { className: "h-3.5 w-3.5 animate-spin text-amber-400" }) : /* @__PURE__ */ n(
325
+ children: Ie.has(e) ? /* @__PURE__ */ n(ae, { className: "h-3.5 w-3.5 animate-spin text-amber-400" }) : /* @__PURE__ */ n(
325
326
  Ke,
326
327
  {
327
328
  className: V(
@@ -353,7 +354,7 @@ function Zr({
353
354
  enabled: !!b && at.trim().length > 0,
354
355
  staleTime: 3e4,
355
356
  placeholderData: (e) => e
356
- }), ve = Gt, We = P(() => {
357
+ }), ve = Gt, Me = P(() => {
357
358
  const e = /* @__PURE__ */ new Set();
358
359
  for (const t of ke) e.add(String(t.id));
359
360
  for (const t of oe) e.add(t.key);
@@ -369,12 +370,12 @@ function Zr({
369
370
  e.key,
370
371
  e.collection,
371
372
  JSON.stringify(t),
372
- We.join(",")
373
+ Me.join(",")
373
374
  ],
374
375
  queryFn: async () => {
375
376
  const r = {}, a = e.aggregate === "sum", d = a ? 150 : 400;
376
- for (let o = 0; o < We.length; o += d) {
377
- const s = We.slice(o, o + d);
377
+ for (let o = 0; o < Me.length; o += d) {
378
+ const s = Me.slice(o, o + d);
378
379
  let u = 1;
379
380
  for (; ; ) {
380
381
  const N = await p.request(
@@ -400,7 +401,7 @@ function Zr({
400
401
  }
401
402
  return r;
402
403
  },
403
- enabled: !!b && t !== null && We.length > 0,
404
+ enabled: !!b && t !== null && Me.length > 0,
404
405
  staleTime: 3e4
405
406
  };
406
407
  })
@@ -429,59 +430,59 @@ function Zr({
429
430
  if (!(!(a != null && a.when) || !a.label))
430
431
  try {
431
432
  const d = a.when.replace(/\{\{\s*([A-Za-z_][A-Za-z0-9_.]*)\s*\}\}/g, "$1");
432
- Nr(d, e) && r.push(a.label);
433
+ vr(d, e) && r.push(a.label);
433
434
  } catch {
434
435
  }
435
436
  return r;
436
437
  }, dt = l.qty_warning ? l.qty_warning.label ?? ((Kt = (l.related_columns ?? []).find((e) => {
437
438
  var t;
438
439
  return e.key === ((t = l.qty_warning) == null ? void 0 : t.column);
439
- })) == null ? void 0 : Kt.label) ?? te(l.qty_warning.column) : "", er = !!l.submission_errors, Ie = P(
440
+ })) == null ? void 0 : Kt.label) ?? te(l.qty_warning.column) : "", er = !!l.submission_errors, We = P(
440
441
  () => {
441
442
  var e;
442
443
  return typeof l.submission_errors == "object" && Array.isArray((e = l.submission_errors) == null ? void 0 : e.match_fields) ? l.submission_errors.match_fields.filter((t) => /^[A-Za-z_][A-Za-z0-9_]*$/.test(t)) : [];
443
444
  },
444
445
  [l.submission_errors]
445
- ), { data: Tt } = B({
446
+ ), tr = _r(6e4), { data: Tt } = B({
446
447
  queryKey: ["erp-submissions", q ?? "", String(S)],
447
448
  queryFn: () => p.request(E(`/erp-submissions/${q}/${encodeURIComponent(S)}`)).then((e) => e.data ?? []),
448
449
  enabled: er && !K && !!q,
449
450
  staleTime: 15e3,
450
- refetchInterval: 6e4
451
+ refetchInterval: tr
451
452
  }), ct = P(() => {
452
453
  const e = (Tt ?? [])[0];
453
- return !e || e.status !== "failed" ? null : vr(e.payload, e.last_error);
454
- }, [Tt]), tr = oe.map((e) => e.key).join(","), { data: mt } = B({
455
- queryKey: ["catalog-suberr-idents", b, Ie.join(","), tr],
454
+ return !e || e.status !== "failed" ? null : Sr(e.payload, e.last_error);
455
+ }, [Tt]), rr = oe.map((e) => e.key).join(","), { data: mt } = B({
456
+ queryKey: ["catalog-suberr-idents", b, We.join(","), rr],
456
457
  queryFn: async () => {
457
458
  const e = oe.map((r) => r.key);
458
459
  if (e.length === 0) return {};
459
460
  const t = await p.request(
460
461
  E(`/items/${b}`, {
461
462
  limit: e.length,
462
- fields: ["id", ...Ie].join(","),
463
+ fields: ["id", ...We].join(","),
463
464
  filter: JSON.stringify({ id: { _in: e } })
464
465
  })
465
466
  ).then((r) => r.data ?? []);
466
467
  return Object.fromEntries(t.map((r) => [String(r.id), r]));
467
468
  },
468
- enabled: !!b && !!ct && Ie.length > 0 && oe.length > 0,
469
+ enabled: !!b && !!ct && We.length > 0 && oe.length > 0,
469
470
  staleTime: 6e4
470
- }), rr = (e) => {
471
+ }), nr = (e) => {
471
472
  if (!ct) return null;
472
473
  const t = mt == null ? void 0 : mt[e], r = [
473
474
  Ct(e),
474
- ...Ie.map((a) => {
475
+ ...We.map((a) => {
475
476
  const d = (t == null ? void 0 : t[a]) ?? _e(e)[a];
476
477
  return d != null && d !== "" ? String(d) : null;
477
478
  })
478
- ].filter((a) => !!a).map(_r);
479
+ ].filter((a) => !!a).map(qr);
479
480
  return ct.reasonFor(r);
480
- }, Ye = l.summary_fields ?? [], nr = W.map((e) => String(e.id)).join(","), sr = wt({
481
+ }, Ye = l.summary_fields ?? [], sr = M.map((e) => String(e.id)).join(","), ar = wt({
481
482
  queries: Ye.filter((e) => e.m2m).map((e) => ({
482
- queryKey: ["catalog-summary-m2m", e.field, e.m2m.junction, nr],
483
+ queryKey: ["catalog-summary-m2m", e.field, e.m2m.junction, sr],
483
484
  queryFn: async () => {
484
- const t = W.map((k) => String(k.id));
485
+ const t = M.map((k) => String(k.id));
485
486
  if (t.length === 0) return {};
486
487
  const r = e.m2m, a = await p.request(
487
488
  E(`/items/${r.junction}`, {
@@ -502,19 +503,19 @@ function Zr({
502
503
  }
503
504
  return N;
504
505
  },
505
- enabled: !K && W.length > 0,
506
+ enabled: !K && M.length > 0,
506
507
  staleTime: 15e3
507
508
  }))
508
- }), ar = (e, t) => {
509
+ }), ir = (e, t) => {
509
510
  var d, o;
510
511
  if (!e.m2m) return t.row[e.field];
511
512
  const r = Ye.filter((s) => s.m2m).findIndex((s) => s.field === e.field);
512
513
  if (r === -1) return;
513
514
  const a = t.row.id;
514
515
  if (a != null)
515
- return (o = (d = sr[r]) == null ? void 0 : d.data) == null ? void 0 : o[String(a)];
516
- }, ir = !!((Jt = l.fulfilment) != null && Jt.shipped_field) && (l.fulfilment.show_when ? Ut(l.fulfilment.show_when, X) : !0), lr = (e) => {
517
- if (!ir || !l.fulfilment) return null;
516
+ return (o = (d = ar[r]) == null ? void 0 : d.data) == null ? void 0 : o[String(a)];
517
+ }, lr = !!((Jt = l.fulfilment) != null && Jt.shipped_field) && (l.fulfilment.show_when ? Ut(l.fulfilment.show_when, X) : !0), or = (e) => {
518
+ if (!lr || !l.fulfilment) return null;
518
519
  const t = Number(e[l.fulfilment.qty_field ?? D] ?? 0) || 0, r = Number(e[l.fulfilment.shipped_field] ?? 0) || 0, a = t > 0 && r >= t ? {
519
520
  dot: "bg-emerald-500",
520
521
  text: "text-emerald-700 dark:text-emerald-400",
@@ -550,7 +551,7 @@ function Zr({
550
551
  }
551
552
  t = t.parentElement;
552
553
  }
553
- }, or = (e) => {
554
+ }, dr = (e) => {
554
555
  bt.current = e, e && At(e);
555
556
  };
556
557
  Se(() => {
@@ -597,7 +598,7 @@ function Zr({
597
598
  },
598
599
  r.key
599
600
  ))
600
- ] }), ht = Rt ? "w-36 shrink-0 truncate text-slate-700 dark:text-slate-200" : "min-w-0 flex-1 truncate text-slate-700 dark:text-slate-200", dr = Dt(b), Ze = (e, t, r) => dr ? /* @__PURE__ */ n(
601
+ ] }), ht = Rt ? "w-36 shrink-0 truncate text-slate-700 dark:text-slate-200" : "min-w-0 flex-1 truncate text-slate-700 dark:text-slate-200", cr = Dt(b), Ze = (e, t, r) => cr ? /* @__PURE__ */ n(
601
602
  "button",
602
603
  {
603
604
  type: "button",
@@ -618,7 +619,7 @@ function Zr({
618
619
  if (t) return Ue.has(String(t.id)) ? null : Number(t[D] ?? 0);
619
620
  const r = rt.get(e);
620
621
  return r === void 0 ? null : Number(((a = Ne[r]) == null ? void 0 : a[D]) ?? 0);
621
- }, cr = (e) => {
622
+ }, mr = (e) => {
622
623
  let t = e;
623
624
  for (const r of l.section_by.split(".")) {
624
625
  if (t == null || typeof t != "object") return "";
@@ -630,7 +631,7 @@ function Zr({
630
631
  J.trim().toLowerCase();
631
632
  const e = /* @__PURE__ */ new Map();
632
633
  for (const t of ke) {
633
- const r = qe(F, t), a = T ? Q.get(String(t.id)) ?? [] : [cr(t)];
634
+ const r = qe(F, t), a = T ? Q.get(String(t.id)) ?? [] : [mr(t)];
634
635
  if (!(T && ie && a.length === 0))
635
636
  for (const d of a.length ? a : [""]) {
636
637
  const o = d || "Uncategorized";
@@ -660,7 +661,7 @@ function Zr({
660
661
  t.items.some((a) => (fe(a.id) ?? 0) > 0) || e.add(t.name);
661
662
  ne(e);
662
663
  }
663
- async function mr(e) {
664
+ async function ur(e) {
664
665
  const t = {};
665
666
  for (const r of l.related_columns ?? []) {
666
667
  if (!r.copy_to) continue;
@@ -701,7 +702,7 @@ function Zr({
701
702
  async function xt(e, t, r) {
702
703
  const a = t.trim() === "" ? 0 : Number(t);
703
704
  if (Number.isNaN(a) || a < 0 || (fe(e) ?? 0) === a) return;
704
- const o = a > 0 ? await mr(e) : {};
705
+ const o = a > 0 ? await ur(e) : {};
705
706
  if (Te && f) {
706
707
  const s = De.get(e);
707
708
  if ((s == null ? void 0 : s.id) != null) {
@@ -718,7 +719,7 @@ function Zr({
718
719
  const C = Ae(g, { ...s, ...N });
719
720
  C !== null && (N[_] = C);
720
721
  }
721
- const k = W.find((_) => String(_.id) === u) ?? {}, v = Object.fromEntries(
722
+ const k = M.find((_) => String(_.id) === u) ?? {}, v = Object.fromEntries(
722
723
  Object.entries(N).filter(([_, g]) => String(g ?? "") !== String(k[_] ?? ""))
723
724
  );
724
725
  Object.keys(v).length === 0 ? f.cancelPendingEdit(m, x, u) : (f.cancelPendingEdit(m, x, u), f.queueEdit(m, x, u, v));
@@ -741,7 +742,7 @@ function Zr({
741
742
  try {
742
743
  const s = De.get(e);
743
744
  if (a === 0)
744
- (s == null ? void 0 : s.id) != null && await p.request(wr(`/items/${m}/${s.id}`));
745
+ (s == null ? void 0 : s.id) != null && await p.request(Nr(`/items/${m}/${s.id}`));
745
746
  else if ((s == null ? void 0 : s.id) != null) {
746
747
  const u = Pe(e, a, r, o);
747
748
  for (const _ of U)
@@ -768,7 +769,7 @@ function Zr({
768
769
  });
769
770
  }
770
771
  }
771
- async function ur(e, t, r) {
772
+ async function fr(e, t, r) {
772
773
  const a = r.trim() === "" ? null : Number(r);
773
774
  if (r.trim() !== "" && Number.isNaN(a)) return;
774
775
  const d = (s) => {
@@ -786,7 +787,7 @@ function Zr({
786
787
  return;
787
788
  }
788
789
  if (Te && f) {
789
- const s = d(o), u = W.find((k) => String(k.id) === String(o.id)) ?? {}, N = Object.fromEntries(
790
+ const s = d(o), u = M.find((k) => String(k.id) === String(o.id)) ?? {}, N = Object.fromEntries(
790
791
  Object.entries(s).filter(
791
792
  ([k, v]) => k !== "id" && String(v ?? "") !== String(u[k] ?? "")
792
793
  )
@@ -806,7 +807,7 @@ function Zr({
806
807
  });
807
808
  }
808
809
  }
809
- async function fr(e) {
810
+ async function br(e) {
810
811
  if (e == null || e === "" || !b) return;
811
812
  const t = String(e), r = _e(t);
812
813
  let a = r;
@@ -823,7 +824,7 @@ function Zr({
823
824
  const d = (fe(t) ?? 0) + 1;
824
825
  await xt(t, String(d), a);
825
826
  }
826
- const br = oe.length, gt = Object.keys(l.copy_fields ?? {}), yt = Object.keys(l.compute_fields ?? {}), Ee = (e, t) => {
827
+ const pr = oe.length, gt = Object.keys(l.copy_fields ?? {}), yt = Object.keys(l.compute_fields ?? {}), Ee = (e, t) => {
827
828
  const r = fe(e);
828
829
  if (h)
829
830
  return /* @__PURE__ */ n("span", { className: "inline-block w-20 shrink-0 text-right tabular-nums text-slate-700 dark:text-slate-200", children: r && r > 0 ? r : "—" });
@@ -869,7 +870,7 @@ function Zr({
869
870
  }
870
871
  ),
871
872
  /* @__PURE__ */ c("span", { className: "shrink-0 rounded border border-slate-200 bg-slate-50 px-1.5 py-0.5 text-[10px] font-medium text-slate-500 dark:border-border dark:bg-muted dark:text-slate-400", children: [
872
- br,
873
+ pr,
873
874
  " picked"
874
875
  ] })
875
876
  ] }),
@@ -880,7 +881,7 @@ function Zr({
880
881
  /* @__PURE__ */ c(
881
882
  "div",
882
883
  {
883
- ref: or,
884
+ ref: dr,
884
885
  className: "sticky top-0 z-[5] flex items-center gap-2 border-b border-slate-200 bg-slate-50 px-3 py-1 text-[10px] font-medium uppercase tracking-wide text-slate-400 dark:border-border dark:bg-muted",
885
886
  children: [
886
887
  l.favorites && /* @__PURE__ */ n("span", { className: "w-[18px] shrink-0" }),
@@ -1088,7 +1089,7 @@ function Zr({
1088
1089
  })
1089
1090
  ] }),
1090
1091
  (l.builders ?? []).filter((e) => Ut(e.show_when, X)).map((e) => /* @__PURE__ */ n(
1091
- Or,
1092
+ Pr,
1092
1093
  {
1093
1094
  builder: e,
1094
1095
  defaultItemField: l.item_field,
@@ -1106,7 +1107,7 @@ function Zr({
1106
1107
  /* @__PURE__ */ n("span", { className: "text-[11px] font-semibold text-slate-600 dark:text-slate-300", children: "Summary" }),
1107
1108
  !h && /* @__PURE__ */ c("div", { className: "flex items-center gap-2", onClick: (e) => e.stopPropagation(), children: [
1108
1109
  l.upload_template && !K && Z && q && /* @__PURE__ */ n(
1109
- qr,
1110
+ jr,
1110
1111
  {
1111
1112
  collection: q,
1112
1113
  templateFilter: (e) => {
@@ -1122,11 +1123,11 @@ function Zr({
1122
1123
  }
1123
1124
  ),
1124
1125
  /* @__PURE__ */ n("div", { className: "w-64", children: /* @__PURE__ */ n(
1125
- Fr,
1126
+ Or,
1126
1127
  {
1127
1128
  collection: b,
1128
1129
  value: null,
1129
- onChange: (e) => void fr(e),
1130
+ onChange: (e) => void br(e),
1130
1131
  placeholder: "+ Add any item…"
1131
1132
  }
1132
1133
  ) })
@@ -1143,7 +1144,7 @@ function Zr({
1143
1144
  !h && /* @__PURE__ */ n("span", { className: "w-6 shrink-0" })
1144
1145
  ] }),
1145
1146
  oe.map((s, u) => {
1146
- const N = s.row.id != null ? String(s.row.id) : null, k = N != null && Ue.has(N), v = k ? null : ot(s.key), _ = k ? null : rr(s.key);
1147
+ const N = s.row.id != null ? String(s.row.id) : null, k = N != null && Ue.has(N), v = k ? null : ot(s.key), _ = k ? null : nr(s.key);
1147
1148
  return /* @__PURE__ */ c(
1148
1149
  "div",
1149
1150
  {
@@ -1184,7 +1185,7 @@ function Zr({
1184
1185
  "data-tip": `This line was in the failed submission
1185
1186
  ${_}`,
1186
1187
  "data-submission-error": !0,
1187
- children: /* @__PURE__ */ n(hr, { className: "h-3.5 w-3.5 text-red-500", strokeWidth: 2 })
1188
+ children: /* @__PURE__ */ n(xr, { className: "h-3.5 w-3.5 text-red-500", strokeWidth: 2 })
1188
1189
  }
1189
1190
  ),
1190
1191
  t && /* @__PURE__ */ n(
@@ -1217,7 +1218,7 @@ ${_}`,
1217
1218
  min: 0,
1218
1219
  step: "any",
1219
1220
  defaultValue: s.row[g] == null ? "" : String(s.row[g]),
1220
- onBlur: ($e) => void ur(s.key, g, $e.target.value),
1221
+ onBlur: ($e) => void fr(s.key, g, $e.target.value),
1221
1222
  onKeyDown: ($e) => {
1222
1223
  $e.key === "Enter" && $e.currentTarget.blur();
1223
1224
  },
@@ -1289,7 +1290,7 @@ ${_}`,
1289
1290
  " ",
1290
1291
  /* @__PURE__ */ n("span", { className: "font-medium tabular-nums text-slate-700 dark:text-slate-200", children: d(lt(g.key, s.key), g.format) })
1291
1292
  ] }, g.key)),
1292
- lr(s.row),
1293
+ or(s.row),
1293
1294
  Xt(s.row).map((g) => /* @__PURE__ */ c(
1294
1295
  "span",
1295
1296
  {
@@ -1303,7 +1304,7 @@ ${_}`,
1303
1304
  g
1304
1305
  )),
1305
1306
  Ye.map((g) => {
1306
- const C = ar(g, s);
1307
+ const C = ir(g, s);
1307
1308
  return /* @__PURE__ */ c("span", { className: "whitespace-nowrap", children: [
1308
1309
  /* @__PURE__ */ n("span", { className: "text-slate-500 dark:text-muted-foreground", children: g.label ?? te(g.field) }),
1309
1310
  " ",
@@ -1356,8 +1357,8 @@ ${_}`,
1356
1357
  ] });
1357
1358
  })()
1358
1359
  ] }),
1359
- It && b && /* @__PURE__ */ n(
1360
- Pr,
1360
+ Wt && b && /* @__PURE__ */ n(
1361
+ Rr,
1361
1362
  {
1362
1363
  catalogCol: b,
1363
1364
  tmpl: F,
@@ -1365,7 +1366,7 @@ ${_}`,
1365
1366
  sectionM2M: A,
1366
1367
  pinnedSet: nt,
1367
1368
  pinnedIds: pe,
1368
- savingIds: Me,
1369
+ savingIds: Ie,
1369
1370
  relatedCols: (l.favorites_manager_columns ?? []).map((e) => (l.related_columns ?? []).find((t) => t.key === e)).filter((e) => !!e),
1370
1371
  parentDraft: X,
1371
1372
  onToggle: (e) => void qt(e),
@@ -1381,7 +1382,7 @@ ${_}`,
1381
1382
  m
1382
1383
  ] });
1383
1384
  }
1384
- function Or({
1385
+ function Pr({
1385
1386
  builder: m,
1386
1387
  defaultItemField: x,
1387
1388
  catalogCol: S,
@@ -1483,7 +1484,7 @@ function Or({
1483
1484
  ([, j], [, F]) => j.localeCompare(F, void 0, { numeric: !0 })
1484
1485
  );
1485
1486
  return /* @__PURE__ */ n(
1486
- Lr,
1487
+ Er,
1487
1488
  {
1488
1489
  label: te(w.field),
1489
1490
  value: U[w.field] ?? null,
@@ -1510,7 +1511,7 @@ function Or({
1510
1511
  ] }) })
1511
1512
  ] });
1512
1513
  }
1513
- function Lr({
1514
+ function Er({
1514
1515
  label: m,
1515
1516
  value: x,
1516
1517
  valueLabel: S,
@@ -1536,7 +1537,7 @@ function Lr({
1536
1537
  className: "flex w-44 items-center justify-between rounded border border-slate-200 bg-white px-2 py-1.5 text-left text-[12px] text-slate-700 hover:border-slate-300 disabled:opacity-50 dark:border-border dark:bg-background dark:text-slate-200",
1537
1538
  children: [
1538
1539
  /* @__PURE__ */ n("span", { className: V("truncate", !S && "text-slate-400"), children: S ?? "Select…" }),
1539
- /* @__PURE__ */ n(xr, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
1540
+ /* @__PURE__ */ n(gr, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
1540
1541
  ]
1541
1542
  }
1542
1543
  ),
@@ -1573,7 +1574,7 @@ function Lr({
1573
1574
  ] })
1574
1575
  ] });
1575
1576
  }
1576
- function Pr({
1577
+ function Rr({
1577
1578
  catalogCol: m,
1578
1579
  tmpl: x,
1579
1580
  sectionBy: S,
@@ -1640,17 +1641,17 @@ function Pr({
1640
1641
  const i = q, y = await tt(K, `/items/${i.junction}`, {
1641
1642
  fields: `${i.fkToItem},${i.fkToSection}`,
1642
1643
  filter: JSON.stringify({ [i.fkToItem]: { _in: z } })
1643
- }), H = [...new Set(y.map((Q) => String(Q[i.fkToSection])))], M = H.length ? await tt(K, `/items/${i.target}`, {
1644
+ }), H = [...new Set(y.map((Q) => String(Q[i.fkToSection])))], I = H.length ? await tt(K, `/items/${i.target}`, {
1644
1645
  fields: `id,${i.labelPath}`,
1645
1646
  filter: JSON.stringify({ id: { _in: H } })
1646
- }) : [], I = new Map(
1647
- M.map((Q) => [String(Q.id), String(Mt(Q, i.labelPath) ?? "")])
1647
+ }) : [], W = new Map(
1648
+ I.map((Q) => [String(Q.id), String(It(Q, i.labelPath) ?? "")])
1648
1649
  ), le = /* @__PURE__ */ new Map();
1649
1650
  for (const Q of y) {
1650
- const Y = I.get(String(Q[i.fkToSection]));
1651
+ const Y = W.get(String(Q[i.fkToSection]));
1651
1652
  if (!Y) continue;
1652
- const me = String(Q[i.fkToItem]), W = le.get(me) ?? [];
1653
- W.includes(Y) || W.push(Y), le.set(me, W);
1653
+ const me = String(Q[i.fkToItem]), M = le.get(me) ?? [];
1654
+ M.includes(Y) || M.push(Y), le.set(me, M);
1654
1655
  }
1655
1656
  return le;
1656
1657
  },
@@ -1688,12 +1689,12 @@ function Pr({
1688
1689
  fields: `${i.item_field},${i.value_field}`,
1689
1690
  limit: 1e3
1690
1691
  })
1691
- ).then((I) => I.data ?? []), M = /* @__PURE__ */ new Map();
1692
- for (const I of H) {
1693
- const le = String(I[i.item_field]), Q = I[i.value_field], Y = M.get(le);
1694
- Y === void 0 ? M.set(le, Q) : Number.isFinite(Number(Y)) && Number.isFinite(Number(Q)) && M.set(le, Number(Y) + Number(Q));
1692
+ ).then((W) => W.data ?? []), I = /* @__PURE__ */ new Map();
1693
+ for (const W of H) {
1694
+ const le = String(W[i.item_field]), Q = W[i.value_field], Y = I.get(le);
1695
+ Y === void 0 ? I.set(le, Q) : Number.isFinite(Number(Y)) && Number.isFinite(Number(Q)) && I.set(le, Number(Y) + Number(Q));
1695
1696
  }
1696
- return M;
1697
+ return I;
1697
1698
  },
1698
1699
  enabled: z.length > 0 && (i.match === void 0 || y !== null),
1699
1700
  staleTime: 3e4
@@ -1723,7 +1724,7 @@ function Pr({
1723
1724
  }
1724
1725
  );
1725
1726
  }, ee = (i, y) => /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n("td", { colSpan: 4 + $.length, className: V("border-b px-3 py-1.5", y), children: i }) }), Be = (i, y) => {
1726
- const H = String(i.id), M = X(i);
1727
+ const H = String(i.id), I = X(i);
1727
1728
  return /* @__PURE__ */ c(
1728
1729
  "tr",
1729
1730
  {
@@ -1743,26 +1744,26 @@ function Pr({
1743
1744
  children: A(i)
1744
1745
  }
1745
1746
  ) : A(i) }),
1746
- /* @__PURE__ */ n("td", { className: "max-w-0 px-2 py-1", children: /* @__PURE__ */ n("p", { className: "truncate text-slate-600 dark:text-slate-300", "data-tip": M || void 0, children: M || "—" }) }),
1747
+ /* @__PURE__ */ n("td", { className: "max-w-0 px-2 py-1", children: /* @__PURE__ */ n("p", { className: "truncate text-slate-600 dark:text-slate-300", "data-tip": I || void 0, children: I || "—" }) }),
1747
1748
  /* @__PURE__ */ n("td", { className: "px-2 py-1", children: /* @__PURE__ */ n("p", { className: "truncate text-slate-500 dark:text-slate-400", children: we(i) || "—" }) }),
1748
- $.map((I, le) => {
1749
- var me, W;
1750
- const Q = I.match !== void 0 && ze(I.match, f) === null, Y = Q || (W = (me = ie[le]) == null ? void 0 : me.data) == null ? void 0 : W.get(H);
1749
+ $.map((W, le) => {
1750
+ var me, M;
1751
+ const Q = W.match !== void 0 && ze(W.match, f) === null, Y = Q || (M = (me = ie[le]) == null ? void 0 : me.data) == null ? void 0 : M.get(H);
1751
1752
  return /* @__PURE__ */ n(
1752
1753
  "td",
1753
1754
  {
1754
1755
  className: "whitespace-nowrap px-2 py-1 text-right tabular-nums text-slate-600 dark:text-slate-300",
1755
- children: Q ? "—" : ye(Y, I.format)
1756
+ children: Q ? "—" : ye(Y, W.format)
1756
1757
  },
1757
- I.key
1758
+ W.key
1758
1759
  );
1759
1760
  })
1760
1761
  ]
1761
1762
  },
1762
1763
  H
1763
1764
  );
1764
- }, ke = (U == null ? void 0 : U.closest('[role="dialog"]')) ?? document.body, Fe = D.trim() ? T.filter((i) => Sr(`${A(i)} ${X(i)} ${we(i)}`, D)) : T;
1765
- return gr(
1765
+ }, ke = (U == null ? void 0 : U.closest('[role="dialog"]')) ?? document.body, Fe = D.trim() ? T.filter((i) => $r(`${A(i)} ${X(i)} ${we(i)}`, D)) : T;
1766
+ return yr(
1766
1767
  /* @__PURE__ */ c("div", { className: "fixed inset-0 z-[125]", role: "presentation", children: [
1767
1768
  /* @__PURE__ */ n(
1768
1769
  "div",
@@ -1928,6 +1929,6 @@ function Pr({
1928
1929
  );
1929
1930
  }
1930
1931
  export {
1931
- Zr as CatalogPickerField,
1932
+ en as CatalogPickerField,
1932
1933
  Ut as matchesShowWhen
1933
1934
  };