@nivaro/react 0.3.57 → 0.3.59

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 (69) hide show
  1. package/dist/components/fields/RelationField.js +110 -80
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useRelationOptions.js +1 -0
  4. package/dist/hooks/useSessionRecorder.js +1 -1
  5. package/dist/index.d.ts +37 -2
  6. package/dist/index.js +523 -520
  7. package/dist/shared/components/CollectionBrowserView.js +2693 -2619
  8. package/dist/shared/components/DataTable.js +538 -495
  9. package/dist/shared/components/ItemEditForm.js +4559 -4386
  10. package/dist/shared/components/PageRenderer.js +537 -508
  11. package/dist/shared/components/ProfileView.js +716 -715
  12. package/dist/shared/components/QueryTable.js +74 -74
  13. package/dist/shared/components/RecordReadView.js +367 -364
  14. package/dist/shared/components/ReportView.js +64 -39
  15. package/dist/shared/components/WidgetSlot.js +543 -520
  16. package/dist/shared/components/alerts/AlertManagerView.js +324 -317
  17. package/dist/shared/components/alerts/types.js +37 -14
  18. package/dist/shared/components/cbv/row-focus.js +19 -0
  19. package/dist/shared/components/help-videos/HelpVideoPlayer.js +152 -147
  20. package/dist/shared/components/integrations/console/SignalCard.js +59 -59
  21. package/dist/shared/components/integrations/console/tone.js +52 -30
  22. package/dist/shared/components/item-edit/CatalogPickerField.js +525 -505
  23. package/dist/shared/components/item-edit/FieldRenderer.js +22 -20
  24. package/dist/shared/components/item-edit/FieldRow.js +175 -173
  25. package/dist/shared/components/item-edit/GridBulkEditDialog.js +55 -54
  26. package/dist/shared/components/item-edit/InlineTableField.js +2487 -2442
  27. package/dist/shared/components/item-edit/M2MCombobox.js +321 -295
  28. package/dist/shared/components/item-edit/MidairCollisionDialog.js +1 -1
  29. package/dist/shared/components/item-edit/PlanGrid.js +973 -894
  30. package/dist/shared/components/item-edit/QuickCreateButton.js +335 -106
  31. package/dist/shared/components/item-edit/RecordLiveSync.js +77 -75
  32. package/dist/shared/components/item-edit/RelationCombobox.js +452 -335
  33. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +262 -141
  34. package/dist/shared/components/item-edit/SummaryPanel.js +385 -358
  35. package/dist/shared/components/item-edit/duplicate-rehearsal.js +47 -0
  36. package/dist/shared/components/item-edit/line-midair.js +82 -75
  37. package/dist/shared/components/item-edit/option-disambiguate.js +44 -32
  38. package/dist/shared/components/item-edit/related-missing.js +45 -0
  39. package/dist/shared/components/item-edit/save-outcome.js +9 -7
  40. package/dist/shared/components/notifications/NotificationRulesEditor.js +130 -123
  41. package/dist/shared/components/panels/AccessDeniedPanel.js +52 -48
  42. package/dist/shared/components/panels/ItemLockBanner.js +213 -211
  43. package/dist/shared/components/panels/PipelinePanel.js +1140 -1053
  44. package/dist/shared/components/panels/RecordIntegrityBanner.js +114 -86
  45. package/dist/shared/components/panels/RevisionsPanel.js +316 -299
  46. package/dist/shared/components/panels/TaskPanel.js +265 -249
  47. package/dist/shared/components/panels/landing-state.js +27 -0
  48. package/dist/shared/components/pipeline/PipelineEditorView.js +110 -92
  49. package/dist/shared/components/profile/AiMemoryCard.js +12 -10
  50. package/dist/shared/components/queue/OwnerAvatars.js +80 -41
  51. package/dist/shared/components/queue/QueueQuickFilters.js +52 -52
  52. package/dist/shared/components/queue/QueueWorklist.js +1050 -1026
  53. package/dist/shared/components/queue/group-sums.js +27 -0
  54. package/dist/shared/components/queue/live-state-aspect.js +9 -5
  55. package/dist/shared/components/widgets/ReviewListWidget.js +175 -154
  56. package/dist/shared/lib/back-closes.js +25 -0
  57. package/dist/shared/lib/display-prefs.js +60 -52
  58. package/dist/shared/lib/draft-store.js +71 -48
  59. package/dist/shared/lib/expression.js +53 -53
  60. package/dist/shared/lib/form-usage-beacon.js +7 -7
  61. package/dist/shared/lib/list-page-memory.js +63 -0
  62. package/dist/shared/lib/live.js +44 -44
  63. package/dist/shared/lib/money-input.js +45 -0
  64. package/dist/shared/lib/own-writes.js +76 -28
  65. package/dist/shared/lib/request-gate.js +110 -109
  66. package/dist/shared/lib/sanitize-html.js +10 -6
  67. package/dist/shared/lib/staged-row-labels.js +18 -0
  68. package/dist/shared/lib/validation-rules.js +34 -19
  69. package/package.json +1 -1
@@ -0,0 +1,63 @@
1
+ const s = "nvr:list-page:";
2
+ function l() {
3
+ var e;
4
+ if (typeof window > "u") return null;
5
+ const t = (e = window.history) == null ? void 0 : e.state;
6
+ return typeof (t == null ? void 0 : t.key) == "string" && t.key ? t.key : null;
7
+ }
8
+ function f() {
9
+ const t = l();
10
+ if (t || typeof window > "u" || !window.history) return t;
11
+ try {
12
+ const e = window.history.state, r = e && typeof e == "object" ? e : {}, n = `nvr${Math.random().toString(36).slice(2, 10)}`;
13
+ return window.history.replaceState({ ...r, key: n }, ""), l();
14
+ } catch {
15
+ return null;
16
+ }
17
+ }
18
+ function a(t, e) {
19
+ return `${s}${t}|${e}`;
20
+ }
21
+ function h(t, e = l()) {
22
+ if (!e) return null;
23
+ try {
24
+ const r = window.sessionStorage.getItem(a(t, e)), n = r == null ? Number.NaN : Number(r);
25
+ return Number.isInteger(n) && n > 1 && n < 1e5 ? n : null;
26
+ } catch {
27
+ return null;
28
+ }
29
+ }
30
+ function y(t, e, r = e > 1 ? f() : l()) {
31
+ if (r)
32
+ try {
33
+ const n = window.sessionStorage, c = a(t, r);
34
+ if (!(e > 1)) {
35
+ n.removeItem(c);
36
+ return;
37
+ }
38
+ n.setItem(c, String(Math.floor(e)));
39
+ const u = [];
40
+ for (let o = 0; o < n.length; o++) {
41
+ const i = n.key(o);
42
+ i != null && i.startsWith(s) && u.push(i);
43
+ }
44
+ for (const o of u.slice(0, Math.max(0, u.length - 50))) n.removeItem(o);
45
+ } catch {
46
+ }
47
+ }
48
+ function g(t, e) {
49
+ return t && t > 1 && e === 1 ? t : e;
50
+ }
51
+ function w(t) {
52
+ if (t.pending == null) return null;
53
+ if (t.failed && !t.fetching) return { close: !0, page: null };
54
+ if (!t.gateOpen || !t.loaded || t.fetching || t.placeholder) return null;
55
+ const e = t.totalUnknown || t.total == null ? null : Math.max(1, Math.ceil(t.total / t.pageSize));
56
+ return { close: !0, page: e != null && t.page > e ? e : null };
57
+ }
58
+ export {
59
+ g as pageWhileSettling,
60
+ y as rememberListPage,
61
+ h as rememberedListPage,
62
+ w as restoreWindowOutcome
63
+ };
@@ -1,10 +1,10 @@
1
- import { useContext as j, useRef as h, useEffect as S } from "react";
2
- import { ItemEditAuthContext as k } from "../context.js";
3
- import { releaseLiveOwner as x, deliverLive as _ } from "./focus-mode.js";
1
+ import { useContext as _, useRef as h, useEffect as E } from "react";
2
+ import { ItemEditAuthContext as j } from "../context.js";
3
+ import { releaseLiveOwner as T, deliverLive as x } from "./focus-mode.js";
4
4
  import { isOwnWrite as F } from "./own-writes.js";
5
5
  import { noteOwnWrite as ee, noteOwnWriteFromCommand as ne } from "./own-writes.js";
6
- import { useOptionalRealtime as E } from "./realtime.js";
7
- const A = "nvr:live-event";
6
+ import { useOptionalRealtime as C } from "./realtime.js";
7
+ const $ = "nvr:live-event";
8
8
  function U(n, ...o) {
9
9
  return n.changedFields === null ? !n.aspectsOnly : o.some((e) => {
10
10
  var t;
@@ -20,7 +20,7 @@ const P = {
20
20
  /** An edit lock was taken or released (list rows show the lock icon). */
21
21
  lock: "$lock"
22
22
  };
23
- function T(n) {
23
+ function k(n) {
24
24
  for (const o of ["by", "user", "user_id"]) {
25
25
  const e = n[o];
26
26
  if (typeof e == "string" && e) return e;
@@ -30,17 +30,17 @@ function T(n) {
30
30
  return null;
31
31
  }
32
32
  function N(n, o) {
33
- const e = T(n);
33
+ const e = k(n);
34
34
  if (e && o && e.toUpperCase() === o.toUpperCase()) return !0;
35
- const t = typeof n.collection == "string" ? n.collection : "";
36
- return t !== "" && n.item != null && F(t, n.item);
35
+ const t = typeof n.collection == "string" ? n.collection : "", r = Array.isArray(n.changed_fields) ? n.changed_fields : null;
36
+ return t !== "" && n.item != null && F(t, n.item, r);
37
37
  }
38
38
  function V(n) {
39
39
  if (!n.coalesced) return [n];
40
40
  const { coalesced: o, items: e, many: t, count: r, ...c } = n;
41
41
  return t || !Array.isArray(e) ? [{ ...c, item: "*", ...typeof r == "number" ? { bulk: r } : {} }] : e.map((i) => ({ ...c, item: i }));
42
42
  }
43
- function $(n) {
43
+ function v(n) {
44
44
  const o = [...new Set(n.map((r) => String(r.item)))];
45
45
  let e = /* @__PURE__ */ new Set(), t = n.length > 0;
46
46
  for (const r of n) {
@@ -62,35 +62,35 @@ function $(n) {
62
62
  };
63
63
  }
64
64
  function q(n, o, e = {}) {
65
- const t = E(), { userId: r } = j(k), c = h(o);
65
+ const t = C(), { userId: r } = _(j), c = h(o);
66
66
  c.current = o;
67
67
  const i = h(e);
68
68
  i.current = e;
69
69
  const s = h(r);
70
70
  s.current = r;
71
- const a = h({}), p = (n == null ? [] : Array.isArray(n) ? n : [n]).filter(Boolean).join(","), w = e.enabled !== !1;
72
- S(() => {
71
+ const f = h({}), p = (n == null ? [] : Array.isArray(n) ? n : [n]).filter(Boolean).join(","), w = e.enabled !== !1;
72
+ E(() => {
73
73
  if (!t || !p || !w) return;
74
74
  const g = p.split(",");
75
- let f = [], y = null;
75
+ let a = [], y = null;
76
76
  const O = () => {
77
77
  y = null;
78
- const u = f;
79
- f = [], u.length !== 0 && (i.current.focusable ? _(a.current, u, (l) => c.current($(l))) : c.current($(u)));
80
- }, C = t.subscribeCollections(g, (u) => {
78
+ const u = a;
79
+ a = [], u.length !== 0 && (i.current.focusable ? x(f.current, u, (l) => c.current(v(l))) : c.current(v(u)));
80
+ }, A = t.subscribeCollections(g, (u) => {
81
81
  const l = u;
82
82
  if (!l || !g.includes(String(l.collection))) return;
83
83
  const d = i.current;
84
84
  for (const b of V(l)) {
85
85
  const R = { ...b, own: N(b, s.current) };
86
- R.own && !d.includeOwn || d.match && !d.match(R) || f.push(R);
86
+ R.own && !d.includeOwn || d.match && !d.match(R) || a.push(R);
87
87
  }
88
- if (f.length === 0) return;
88
+ if (a.length === 0) return;
89
89
  const m = d.debounceMs ?? 250;
90
90
  m <= 0 ? O() : y || (y = setTimeout(O, m));
91
91
  });
92
92
  return () => {
93
- C(), y && clearTimeout(y), x(a.current);
93
+ A(), y && clearTimeout(y), T(f.current);
94
94
  };
95
95
  }, [t, p, w]);
96
96
  }
@@ -109,32 +109,32 @@ function z(n, o, e, t = {}) {
109
109
  n,
110
110
  o,
111
111
  (i) => {
112
- var a;
112
+ var f;
113
113
  const s = t.aspects;
114
114
  if (!(s && s.length > 0 && i.changedFields !== null && !U(i, ...s)))
115
- for (const L of r.current) (a = c.current) == null || a.invalidateQueries({ queryKey: L });
115
+ for (const L of r.current) (f = c.current) == null || f.invalidateQueries({ queryKey: L });
116
116
  },
117
117
  t
118
118
  );
119
119
  }
120
120
  function K(n, o, e = {}) {
121
- const t = E(), { userId: r } = j(k), c = h(o);
121
+ const t = C(), { userId: r } = _(j), c = h(o);
122
122
  c.current = o;
123
123
  const i = h(e);
124
124
  i.current = e;
125
125
  const s = h(r);
126
126
  s.current = r;
127
- const a = (Array.isArray(n) ? n : [n]).join(","), L = e.enabled !== !1;
128
- S(() => {
129
- if (!L || !a) return;
130
- const p = a.split(",");
131
- let w = null, g = null, f = null;
127
+ const f = (Array.isArray(n) ? n : [n]).join(","), L = e.enabled !== !1;
128
+ E(() => {
129
+ if (!L || !f) return;
130
+ const p = f.split(",");
131
+ let w = null, g = null, a = null;
132
132
  const y = (u, l) => {
133
133
  if (!p.includes(u)) return;
134
134
  const d = i.current, m = l ?? {};
135
135
  if (!d.includeOwn && typeof m == "object") {
136
- const v = T(m);
137
- if (v && s.current && v.toUpperCase() === s.current.toUpperCase())
136
+ const W = k(m);
137
+ if (W && s.current && W.toUpperCase() === s.current.toUpperCase())
138
138
  return;
139
139
  }
140
140
  if (d.match && !d.match(m)) return;
@@ -146,24 +146,24 @@ function K(n, o, e = {}) {
146
146
  const R = Date.now();
147
147
  if (w && w.sig === b && R - w.at < 150) return;
148
148
  w = { sig: b, at: R };
149
- const W = d.debounceMs ?? 0;
150
- if (W <= 0) {
149
+ const S = d.debounceMs ?? 0;
150
+ if (S <= 0) {
151
151
  c.current(m, u);
152
152
  return;
153
153
  }
154
- f = { payload: m, event: u }, g || (g = setTimeout(() => {
155
- g = null, f && c.current(f.payload, f.event), f = null;
156
- }, W));
154
+ a = { payload: m, event: u }, g || (g = setTimeout(() => {
155
+ g = null, a && c.current(a.payload, a.event), a = null;
156
+ }, S));
157
157
  }, O = p.map((u) => (t == null ? void 0 : t.on(u, (l) => y(u, l))) ?? (() => {
158
- })), C = (u) => {
158
+ })), A = (u) => {
159
159
  const l = u.detail;
160
160
  l != null && l.event && y(l.event, l.payload);
161
161
  };
162
- return window.addEventListener(A, C), () => {
162
+ return window.addEventListener($, A), () => {
163
163
  for (const u of O) u();
164
- window.removeEventListener(A, C), g && clearTimeout(g);
164
+ window.removeEventListener($, A), g && clearTimeout(g);
165
165
  };
166
- }, [t, a, L]);
166
+ }, [t, f, L]);
167
167
  }
168
168
  function G(n, o, e, t, r = {}) {
169
169
  const c = e == null || e === "new" ? null : String(e), i = r.match;
@@ -174,24 +174,24 @@ function G(n, o, e, t, r = {}) {
174
174
  });
175
175
  }
176
176
  function H(n, o = !0) {
177
- const e = E(), t = !!(e != null && e.joinWatch);
178
- return S(() => {
177
+ const e = C(), t = !!(e != null && e.joinWatch);
178
+ return E(() => {
179
179
  if (!(!o || !(e != null && e.joinWatch)))
180
180
  return e.joinWatch(n);
181
181
  }, [e, n, o]), t && o;
182
182
  }
183
183
  function X() {
184
- return E() != null;
184
+ return C() != null;
185
185
  }
186
186
  export {
187
187
  P as LIVE_ASPECTS,
188
- A as LIVE_WINDOW_EVENT,
188
+ $ as LIVE_WINDOW_EVENT,
189
189
  U as batchTouches,
190
190
  V as expandCoalesced,
191
191
  F as isOwnWrite,
192
192
  ee as noteOwnWrite,
193
193
  ne as noteOwnWriteFromCommand,
194
- $ as toLiveBatch,
194
+ v as toLiveBatch,
195
195
  X as useLiveAvailable,
196
196
  q as useLiveCollection,
197
197
  K as useLiveEvent,
@@ -0,0 +1,45 @@
1
+ const u = 999999999999e-2, a = "Enter an amount of zero or more", f = /[\t\r\n]/, c = /^(\d+(\.\d*)?|\.\d+)$/, d = /^\d{1,3}(,\d{3})+(\.\d*)?$/, m = /^\d{1,3}( \d{3})+(\.\d*)?$/;
2
+ function h(s) {
3
+ const t = +`${s}e2`;
4
+ return Number.isFinite(t) ? Math.round(t) / 100 : Math.round(Number(s) * 100) / 100;
5
+ }
6
+ function N(s) {
7
+ const t = String(s ?? "").trim();
8
+ if (f.test(t)) return { ok: !1, error: "Paste one amount per cell" };
9
+ if (t === "" || t === "—" || t === "-")
10
+ return { ok: !0, value: 0, rounded: !1 };
11
+ let e = t, o = !1;
12
+ /^\(.*\)$/.test(e) && (o = !0, e = e.slice(1, -1).trim());
13
+ let l = !1;
14
+ for (; ; )
15
+ if (e.startsWith("-")) {
16
+ if (o) return { ok: !1, error: a };
17
+ o = !0, e = e.slice(1).trim();
18
+ } else if (e.startsWith("$")) {
19
+ if (l) return { ok: !1, error: a };
20
+ l = !0, e = e.slice(1).trim();
21
+ } else break;
22
+ e = e.replace(/\s+/g, " ");
23
+ let r;
24
+ if (c.test(e)) r = e;
25
+ else if (d.test(e)) r = e.replace(/,/g, "");
26
+ else if (m.test(e)) r = e.replace(/ /g, "");
27
+ else return /^[\d., ]+$/.test(e) && /,/.test(e) ? {
28
+ ok: !1,
29
+ error: `"${t}" is not clear — use a comma only between thousands (1,234) and a point for cents (12.34)`
30
+ } : { ok: !1, error: a };
31
+ const i = Number(r);
32
+ if (!Number.isFinite(i)) return { ok: !1, error: a };
33
+ if (i > u)
34
+ return { ok: !1, error: "That is more than a month can hold ($9,999,999,999.99)" };
35
+ const n = h(r);
36
+ return {
37
+ ok: !0,
38
+ value: o && n !== 0 ? -n : n,
39
+ rounded: Math.abs(i - n) > 1e-9
40
+ };
41
+ }
42
+ export {
43
+ u as MONEY_INPUT_MAX,
44
+ N as parseMoneyInput
45
+ };
@@ -1,36 +1,84 @@
1
- const l = /* @__PURE__ */ new Map();
2
- function p(o, n) {
3
- return `${o}:${n == null ? "*" : String(n)}`;
1
+ const _ = /* @__PURE__ */ new Map();
2
+ function p(e, r) {
3
+ return `${e}:${r == null ? "*" : String(r)}`;
4
4
  }
5
- function a(o, n, i = 6e3) {
6
- if (!o) return;
7
- const e = Date.now();
8
- if (l.set(p(o, n), e + i), l.size > 200)
9
- for (const [f, c] of l) c < e && l.delete(f);
5
+ function f(e, r, n = 6e3, o) {
6
+ if (!e) return;
7
+ const s = Date.now(), i = p(e, r), l = o && o.length > 0 ? new Set(o) : null, u = _.get(i), c = u && u.exp >= s ? u : null, T = !l || c && !c.fields ? null : c != null && c.fields ? /* @__PURE__ */ new Set([...c.fields, ...l]) : l;
8
+ if (_.set(i, { exp: s + n, fields: T }), _.size > 200)
9
+ for (const [A, E] of _) E.exp < s && _.delete(A);
10
10
  }
11
- function w(o, n) {
12
- const i = Date.now(), e = l.get(p(o, n));
13
- return e != null && e >= i;
11
+ function M(e, r, n) {
12
+ const o = _.get(p(e, r));
13
+ return !o || o.exp < Date.now() ? !1 : !o.fields || !n || n.length === 0 ? !0 : n.some((s) => {
14
+ var i;
15
+ return (i = o.fields) == null ? void 0 : i.has(s);
16
+ });
14
17
  }
15
- const T = /^\/items\/([A-Za-z_][A-Za-z0-9_]*)(?:\/([^/?#]+))?/, m = /^\/pipelines\/instance\/([A-Za-z_][A-Za-z0-9_]*)\/([^/?#]+)/, W = /^\/addendums\/([A-Za-z_][A-Za-z0-9_]*)\/([^/?#]+)/;
16
- function E(o, n, i, e) {
17
- var u;
18
- if ((o ?? "GET").toUpperCase() === "GET" || !n) return;
19
- const c = n.split("?")[0], _ = T.exec(c);
20
- if (_) {
21
- const [, t, s] = _;
22
- s && !["batch", "bulk", "batch-read", "aggregate", "export"].includes(s) && a(t, decodeURIComponent(s));
23
- const d = (u = e == null ? void 0 : e.data) == null ? void 0 : u.id;
24
- d != null && a(t, d);
18
+ const w = /^\/items\/([A-Za-z_][A-Za-z0-9_]*)\/([^/?#]+)$/, O = /^\/items\/([A-Za-z_][A-Za-z0-9_]*)$/, I = /^\/items\/([A-Za-z_][A-Za-z0-9_]*)\/(batch|bulk)$/, S = /^\/pipelines\/instance\/([A-Za-z_][A-Za-z0-9_]*)\/([^/?#]+)/, y = /^\/addendums\/([A-Za-z_][A-Za-z0-9_]*)\/([^/?#]+)/, N = /* @__PURE__ */ new Set(["batch", "bulk", "batch-read", "aggregate", "export", "auto-id-preview"]), R = [
19
+ [/^\/comments(\/|$)/, ["$comments"]],
20
+ [/^\/tasks(\/|$)/, ["$tasks"]],
21
+ [/^\/addendums(\/|$)/, ["$addendums"]],
22
+ [/^\/pipelines\/instance\//, ["$state", "$owners"]]
23
+ ];
24
+ function $(e) {
25
+ for (const [r, n] of R) if (r.test(e)) return n;
26
+ return null;
27
+ }
28
+ function m(e) {
29
+ if (!e || typeof e != "object" || Array.isArray(e)) return null;
30
+ const r = Object.keys(e).filter((n) => !n.startsWith("_"));
31
+ return r.length > 0 ? r : null;
32
+ }
33
+ function x(e, r) {
34
+ const n = (s) => s === !0 || s === 1 || s === "1" || s === "true";
35
+ if (r && typeof r == "object" && n(r.dry_run))
36
+ return !0;
37
+ const o = e == null ? void 0 : e.split("?")[1];
38
+ return o ? n(new URLSearchParams(o).get("dry_run")) : !1;
39
+ }
40
+ function z(e, r, n, o) {
41
+ var A, E;
42
+ const s = (e ?? "GET").toUpperCase();
43
+ if (s === "GET" || !r) return;
44
+ const i = r.split("?")[0];
45
+ if (o !== void 0) {
46
+ const t = O.exec(i), a = (A = o == null ? void 0 : o.data) == null ? void 0 : A.id;
47
+ t && s === "POST" && a != null && f(t[1], a);
48
+ return;
49
+ }
50
+ const l = I.exec(i);
51
+ if (l) {
52
+ const t = n, a = Array.isArray(t) ? t : Array.isArray(t == null ? void 0 : t.update) ? t.update : Array.isArray(t == null ? void 0 : t.rows) ? t.rows : [];
53
+ for (const d of a)
54
+ d && typeof d == "object" && d.id != null && f(
55
+ l[1],
56
+ d.id,
57
+ 6e3,
58
+ ((E = m(d)) == null ? void 0 : E.filter((W) => W !== "id")) ?? null
59
+ );
60
+ return;
61
+ }
62
+ const u = w.exec(i);
63
+ if (u) {
64
+ const [, t, a] = u;
65
+ N.has(a) || f(
66
+ t,
67
+ decodeURIComponent(a),
68
+ 6e3,
69
+ s === "DELETE" ? null : m(n)
70
+ );
71
+ return;
25
72
  }
26
- const r = m.exec(c) ?? W.exec(c);
27
- if (r && a(r[1], decodeURIComponent(r[2])), i && typeof i == "object") {
28
- const t = i;
29
- typeof t.collection == "string" && t.item != null && a(t.collection, t.item), typeof t.parent_collection == "string" && t.parent_id != null && a(t.parent_collection, t.parent_id);
73
+ const c = $(i), T = S.exec(i) ?? y.exec(i);
74
+ if (T && f(T[1], decodeURIComponent(T[2]), 6e3, c), n && typeof n == "object" && !Array.isArray(n)) {
75
+ const t = n;
76
+ typeof t.collection == "string" && t.item != null && f(t.collection, t.item, 6e3, c), typeof t.parent_collection == "string" && t.parent_id != null && f(t.parent_collection, t.parent_id, 6e3, c);
30
77
  }
31
78
  }
32
79
  export {
33
- w as isOwnWrite,
34
- a as noteOwnWrite,
35
- E as noteOwnWriteFromCommand
80
+ M as isOwnWrite,
81
+ x as isRehearsalCommand,
82
+ f as noteOwnWrite,
83
+ z as noteOwnWriteFromCommand
36
84
  };