@ynput/ayon-frontend-shared 0.5.0 → 0.6.1

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 (92) hide show
  1. package/dist/ContextMenu.es.js +34 -16
  2. package/dist/DetailsPanel.es.js +307 -311
  3. package/dist/Feed.es.js +179 -50
  4. package/dist/ListTable.es.js +99 -92
  5. package/dist/NewEntity.es.js +1256 -11
  6. package/dist/ProjectTreeTable.es.js +4459 -2959
  7. package/dist/SimpleTable.es.js +8 -7
  8. package/dist/Slicer.es.js +451 -147
  9. package/dist/Views.es.js +918 -310
  10. package/dist/api.es.js +331 -329
  11. package/dist/chunks/Actions.es.js +32 -27
  12. package/dist/chunks/ColumnDropIndicator.es.js +174 -328
  13. package/dist/chunks/ColumnDropIndicator.styled.es.js +281 -0
  14. package/dist/chunks/ColumnHeaderMenuUI.es.js +52 -0
  15. package/dist/chunks/ContextMenuContextInstance.es.js +12 -0
  16. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +229 -0
  17. package/dist/chunks/DeleteEntitiesContextInstance.es.js +827 -0
  18. package/dist/chunks/DetailsDialog.es.js +3 -3
  19. package/dist/chunks/EmptyPlaceholder.es.js +4 -4
  20. package/dist/chunks/EntityPath.es.js +74 -69
  21. package/dist/chunks/EntityPickerDialog.es.js +25 -21
  22. package/dist/chunks/EntityTooltip.es.js +29 -22
  23. package/dist/chunks/EntityUpdatesContext.es.js +38 -96
  24. package/dist/chunks/Feed.es.js +2321 -2668
  25. package/dist/chunks/FilterErrorActions.es.js +25 -229
  26. package/dist/chunks/Menu.es.js +21 -17
  27. package/dist/chunks/MenuContext.es.js +14 -256
  28. package/dist/chunks/MenuItem.es.js +34 -24
  29. package/dist/chunks/MetaWidget.es.js +2895 -4919
  30. package/dist/chunks/NewEntityContextInstance.es.js +11 -0
  31. package/dist/chunks/PlayableIcon.es.js +4215 -1179
  32. package/dist/chunks/ProjectContext.es.js +102 -66
  33. package/dist/chunks/RepresentationsList.es.js +4 -4
  34. package/dist/chunks/ReviewablesSelector.es.js +468 -460
  35. package/dist/chunks/SimpleForm.es.js +18 -18
  36. package/dist/chunks/SimpleTable.es.js +15 -13
  37. package/dist/chunks/Slicer.es.js +109 -98
  38. package/dist/chunks/TableSettingsFallback.es.js +22 -10
  39. package/dist/chunks/ThumbnailSimple.es.js +290 -52
  40. package/dist/chunks/VersionUploadContextInstance.es.js +12 -0
  41. package/dist/chunks/VideoPlayer.es.js +24 -28
  42. package/dist/chunks/Watchers.es.js +669 -644
  43. package/dist/chunks/entityDefinitions.es.js +2 -350
  44. package/dist/chunks/expandRelativeDates.es.js +27 -0
  45. package/dist/chunks/extractVersionFromFilename.es.js +28 -0
  46. package/dist/chunks/getBundleMode.es.js +1 -1
  47. package/dist/chunks/getUris.es.js +737 -710
  48. package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
  49. package/dist/chunks/searchTerms.es.js +179 -174
  50. package/dist/chunks/useAttributeEnums.es.js +9 -9
  51. package/dist/chunks/useCreateContextMenu.es.js +66 -90
  52. package/dist/chunks/useDateRangeFilter.es.js +3 -3
  53. package/dist/chunks/useHierarchySelection.es.js +24 -0
  54. package/dist/chunks/useLoadModule.es.js +74 -0
  55. package/dist/chunks/useQueryArgumentChangeLoading.es.js +11 -0
  56. package/dist/chunks/versionUploadHelpers.es.js +16 -42
  57. package/dist/chunks/viewUpdateHelper.es.js +74 -57
  58. package/dist/components.es.js +1432 -1001
  59. package/dist/context.es.js +791 -78
  60. package/dist/hooks.es.js +95 -94
  61. package/dist/index.es.js +27 -26
  62. package/dist/types/Actions.d.ts +15 -15
  63. package/dist/types/ContextMenu.d.ts +19 -16
  64. package/dist/types/DetailsPanel.d.ts +110 -17
  65. package/dist/types/EntityPickerDialog.d.ts +15 -15
  66. package/dist/types/Feed.d.ts +19 -16
  67. package/dist/types/ListTable.d.ts +15 -15
  68. package/dist/types/NewEntity.d.ts +24 -18
  69. package/dist/types/ProjectTreeTable.d.ts +34 -123
  70. package/dist/types/RepresentationsList.d.ts +15 -15
  71. package/dist/types/SimpleTable.d.ts +19 -16
  72. package/dist/types/Slicer.d.ts +18 -15
  73. package/dist/types/Views.d.ts +19 -16
  74. package/dist/types/api.d.ts +515 -207
  75. package/dist/types/components.d.ts +84 -20
  76. package/dist/types/context.d.ts +108 -25
  77. package/dist/types/hooks.d.ts +15 -15
  78. package/dist/types/index.d.ts +15 -15
  79. package/dist/types/util.d.ts +20 -15
  80. package/dist/util.es.js +117 -105
  81. package/package.json +16 -4
  82. package/dist/chunks/DeleteEntitiesContext.es.js +0 -748
  83. package/dist/chunks/GlobalContext.es.js +0 -52
  84. package/dist/chunks/NewEntityContext.es.js +0 -1242
  85. package/dist/chunks/ProjectFoldersContext.es.js +0 -134
  86. package/dist/chunks/ProjectFoldersContextInstance.es.js +0 -7
  87. package/dist/chunks/VersionUploadContext.es.js +0 -232
  88. package/dist/chunks/ViewsContext.es.js +0 -878
  89. package/dist/chunks/mentionTypeOptions.es.js +0 -15
  90. package/dist/chunks/useColumnDragRestriction.es.js +0 -148
  91. package/dist/chunks/useLocalStorage.es.js +0 -355
  92. /package/dist/{useCreateContextMenu.css → ContextMenuContextInstance.css} +0 -0
@@ -1,40 +1,46 @@
1
- import { jsx as g, jsxs as C, Fragment as q } from "react/jsx-runtime";
2
- import { upperFirst as me, intersectionBy as re } from "lodash";
1
+ import { jsx as g, jsxs as N, Fragment as G } from "react/jsx-runtime";
2
+ import { useMemo as L, useCallback as B, useState as M, useEffect as O, useRef as K, forwardRef as H, useContext as ye } from "react";
3
+ import { upperFirst as be, intersectionBy as ae } from "lodash";
3
4
  import "primereact/confirmdialog";
4
- import { toast as H } from "react-toastify";
5
+ import { toast as Q } from "react-toastify";
5
6
  import { c as _ } from "./copyToClipboard.es.js";
6
7
  import "uuid";
7
- import { aw as ae, aX as ge, bi as ne, a_ as he, a$ as fe, b0 as ve, bf as ye, bm as be, bt as xe, bh as we, a as O } from "./searchTerms.es.js";
8
- import { useMemo as P, useCallback as B, useState as U, useEffect as W, useRef as G, forwardRef as Q, useContext as ke } from "react";
9
- import d, { keyframes as ie, css as se } from "styled-components";
8
+ import { aw as ne, aY as xe, bh as ie, a$ as we, b0 as ke, b1 as Ee, bj as Te, bn as Se, bv as De, bg as je, a as I, bo as Fe } from "./searchTerms.es.js";
9
+ import d, { keyframes as se, css as le } from "styled-components";
10
10
  import z from "clsx";
11
- import { BorderedSection as I, Button as L, StatusSelect as Ee, AssigneeSelect as Se, TagsSelect as Te, EnumDropdown as De, Icon as R, getMimeTypeIcon as Fe, theme as je, getFileSizeString as Ce, WatcherSelect as Ae } from "@ynput/ayon-react-components";
12
- import { l as Ne, M as $e, T as ze, j as Ue, k as Re, D as Le } from "./MetaWidget.es.js";
11
+ import { BorderedSection as V, Button as P, StatusSelect as Ce, AssigneeSelect as Ae, TagsSelect as Ne, EnumDropdown as $e, Icon as U, getMimeTypeIcon as Re, theme as ze, getFileSizeString as Me, WatcherSelect as Ue } from "@ynput/ayon-react-components";
12
+ import { m as Le, M as Pe, T as We, l as Oe, B as Ie, D as Ve } from "./MetaWidget.es.js";
13
13
  import "./PlayableIcon.es.js";
14
- import { de as Me, c5 as le, be as Pe, an as We, bt as Oe, d2 as Ie } from "./getUris.es.js";
15
- import "./useLocalStorage.es.js";
14
+ import { df as Be, c6 as ce, bf as He, an as Qe, bu as _e, d3 as qe } from "./getUris.es.js";
16
15
  import "@module-federation/enhanced/runtime";
16
+ import { v as q, d as Ge, x as Ke, T as Ye } from "./DeleteEntitiesContextInstance.es.js";
17
17
  import "semver";
18
- import { c as ce } from "./MenuContext.es.js";
19
- import { T as Ve } from "./DeleteEntitiesContext.es.js";
18
+ import "./ContextMenuContextInstance.es.js";
20
19
  import "react-dom";
21
- import { u as Be } from "./GlobalContext.es.js";
22
- import { a as He } from "./ProjectContext.es.js";
23
- import "./ProjectFoldersContextInstance.es.js";
24
20
  import "react-redux";
25
- import "./ViewsContext.es.js";
26
- import { format as _e } from "date-fns";
21
+ import { format as Ze } from "date-fns";
22
+ import "lexical";
23
+ import "@lexical/markdown";
24
+ import "@lexical/react/LexicalBlockWithAlignableContents";
25
+ import "@lexical/react/LexicalDecoratorBlockNode";
26
+ import "match-sorter";
27
+ import "@lexical/code";
28
+ import "@lexical/list";
29
+ import "@lexical/rich-text";
30
+ import "@lexical/selection";
31
+ import "@lexical/utils";
27
32
  import "react-router-dom";
28
33
  import "@tanstack/react-table";
29
- import { a as Qe } from "./useCreateContextMenu.es.js";
30
- import { g as qe, h as K } from "./humanizeFieldName.es.js";
34
+ import { g as Je, h as Y } from "./humanizeFieldName.es.js";
35
+ import { a as Xe, A as et } from "./ThumbnailSimple.es.js";
31
36
  import de from "axios";
32
- import { p as M } from "./parseFilename.es.js";
33
- import { classNames as Ge } from "primereact/utils";
34
- import { g as Ke } from "./getThumbnailUrl.es.js";
35
- const Z = [], Ze = (e) => {
36
- const { data: t, isError: r } = ve(void 0, { skip: !e });
37
- return P(
37
+ import { p as W } from "./parseFilename.es.js";
38
+ import { classNames as tt } from "primereact/utils";
39
+ import { u as ot } from "./useCreateContextMenu.es.js";
40
+ import { g as rt } from "./getThumbnailUrl.es.js";
41
+ const Z = [], at = (e) => {
42
+ const { data: t, isError: r } = Ee(void 0, { skip: !e });
43
+ return L(
38
44
  () => ({
39
45
  // a failed registry is settled too: every param is sent, same fallback as the batch
40
46
  isRegistryLoaded: !!t || r,
@@ -42,26 +48,26 @@ const Z = [], Ze = (e) => {
42
48
  }),
43
49
  [t, r, e]
44
50
  );
45
- }, Eo = () => {
46
- const [e] = he(), [t] = fe();
51
+ }, Lo = () => {
52
+ const [e] = we(), [t] = ke();
47
53
  return B(
48
54
  async (r, o) => {
49
55
  const a = (await t(void 0, !0).unwrap().catch(() => {
50
56
  }))?.find(({ name: n }) => n === r.enumResolver)?.acceptedParams;
51
57
  try {
52
58
  const n = await e(
53
- ae(r, { projectName: o }, a),
59
+ ne(r, { projectName: o }, a),
54
60
  !0
55
61
  ).unwrap();
56
62
  if (n.error) throw new Error(n.error);
57
- return ne(n.items);
63
+ return ie(n.items);
58
64
  } catch (n) {
59
- throw Je(n);
65
+ throw nt(n);
60
66
  }
61
67
  },
62
68
  [e, t]
63
69
  );
64
- }, Je = (e) => {
70
+ }, nt = (e) => {
65
71
  if (e instanceof Error) return e;
66
72
  const {
67
73
  message: t,
@@ -70,27 +76,27 @@ const Z = [], Ze = (e) => {
70
76
  error: i
71
77
  } = e || {};
72
78
  return typeof r?.detail == "string" ? new Error(r.detail) : typeof i == "string" ? new Error(i) : typeof t == "string" ? new Error(t) : new Error(o ? `Request failed (${o})` : "Request failed");
73
- }, Xe = (e, { projectName: t, skip: r } = {}) => {
74
- const o = e?.enumResolver, { acceptedParams: i, isRegistryLoaded: a } = Ze(o), n = P(
75
- () => ae(e, { projectName: t }, i),
79
+ }, it = (e, { projectName: t, skip: r } = {}) => {
80
+ const o = e?.enumResolver, { acceptedParams: i, isRegistryLoaded: a } = at(o), n = L(
81
+ () => ne(e, { projectName: t }, i),
76
82
  // eslint-disable-next-line react-hooks/exhaustive-deps
77
83
  [o, e?.enumResolverSettings, t, i]
78
84
  ), {
79
85
  currentData: s,
80
- isFetching: b,
86
+ isFetching: f,
81
87
  isError: y
82
- } = ge(n, {
88
+ } = xe(n, {
83
89
  // waiting for the registry keeps the cache key final: no request is sent with params that get dropped
84
90
  skip: !o || !!r || !a
85
- }), c = P(() => o ? s ? ne(s.items) : Z : e?.enum || Z, [o, s, e?.enum]), l = !!o && !b && (y || !!s?.error);
91
+ }), l = L(() => o ? s ? ie(s.items) : Z : e?.enum || Z, [o, s, e?.enum]), c = !!o && !f && (y || !!s?.error);
86
92
  return {
87
- options: c,
93
+ options: l,
88
94
  // a background refetch (tag invalidation) keeps the cached options, so it is not a load
89
- isLoading: !!o && !r && (!a || b && !s),
90
- isError: l,
91
- errorMessage: l ? s?.error : void 0
95
+ isLoading: !!o && !r && (!a || f && !s),
96
+ isError: c,
97
+ errorMessage: c ? s?.error : void 0
92
98
  };
93
- }, Ye = [
99
+ }, st = [
94
100
  "id",
95
101
  "name",
96
102
  "label",
@@ -112,7 +118,7 @@ const Z = [], Ze = (e) => {
112
118
  "path",
113
119
  "createdAt",
114
120
  "updatedAt"
115
- ], et = [
121
+ ], lt = [
116
122
  "name",
117
123
  "label",
118
124
  "taskType",
@@ -120,57 +126,57 @@ const Z = [], Ze = (e) => {
120
126
  "productType",
121
127
  "tags",
122
128
  "status"
123
- ], tt = (e, t) => {
124
- const [r, o] = U([]), [i, a] = U(null), n = () => {
125
- const y = {}, c = /* @__PURE__ */ new Set();
126
- e.forEach((u) => {
127
- const h = {
128
- id: u.id,
129
- name: u.name,
130
- label: u.label,
131
- entityType: u.entityType,
132
- createdAt: u.createdAt,
133
- updatedAt: u.updatedAt,
134
- projectName: u.projectName,
135
- status: u.status,
136
- tags: u.tags || [],
137
- path: u.path,
138
- folderType: u.folder?.folderType,
139
- productType: u.product?.productType,
140
- taskType: u.task?.taskType,
141
- description: u.attrib?.description?.toString() ?? ""
129
+ ], ct = (e, t) => {
130
+ const [r, o] = M([]), [i, a] = M(null), n = () => {
131
+ const y = {}, l = /* @__PURE__ */ new Set();
132
+ e.forEach((h) => {
133
+ const v = {
134
+ id: h.id,
135
+ name: h.name,
136
+ label: h.label,
137
+ entityType: h.entityType,
138
+ createdAt: h.createdAt,
139
+ updatedAt: h.updatedAt,
140
+ projectName: h.projectName,
141
+ status: h.status,
142
+ tags: h.tags || [],
143
+ path: h.path,
144
+ folderType: h.folder?.folderType,
145
+ productType: h.product?.productType,
146
+ taskType: h.task?.taskType,
147
+ description: h.attrib?.description?.toString() ?? ""
142
148
  };
143
- Object.keys(h).forEach((m) => {
144
- Ye.includes(m) && (y[m] = y[m] || [], y[m].push(h[m]));
145
- }), u.attrib && Object.keys(u.attrib).forEach((m) => {
146
- if (m !== "description") {
147
- const E = `attrib.${m}`;
148
- y[E] = y[E] || [], y[E].push(u.attrib?.[m]);
149
+ Object.keys(v).forEach((u) => {
150
+ st.includes(u) && (y[u] = y[u] || [], y[u].push(v[u]));
151
+ }), h.attrib && Object.keys(h.attrib).forEach((u) => {
152
+ if (u !== "description") {
153
+ const k = `attrib.${u}`;
154
+ y[k] = y[k] || [], y[k].push(h.attrib?.[u]);
149
155
  }
150
156
  });
151
157
  });
152
- const l = Object.entries(y).reduce((u, [h, m]) => {
153
- const { value: E, isMixed: f } = qe(m);
154
- return u[h] = E, f && c.add(h), u;
158
+ const c = Object.entries(y).reduce((h, [v, u]) => {
159
+ const { value: k, isMixed: b } = Je(u);
160
+ return h[v] = k, b && l.add(v), h;
155
161
  }, {});
156
- a(l), o(Array.from(c));
162
+ a(c), o(Array.from(l));
157
163
  };
158
- return W(() => {
164
+ return O(() => {
159
165
  t || e.length === 0 || n();
160
166
  }, [e, t]), {
161
167
  formData: i,
162
168
  mixedFields: r,
163
- updateFormData: (y, c) => {
164
- a((l) => l && {
165
- ...l,
166
- [y]: c
169
+ updateFormData: (y, l) => {
170
+ a((c) => c && {
171
+ ...c,
172
+ [y]: l
167
173
  });
168
174
  },
169
175
  clearMixedField: (y) => {
170
- o((c) => c.filter((l) => l !== y));
176
+ o((l) => l.filter((c) => c !== y));
171
177
  }
172
178
  };
173
- }, ot = ({
179
+ }, dt = ({
174
180
  attributes: e,
175
181
  folderTypes: t,
176
182
  taskTypes: r,
@@ -179,8 +185,8 @@ const Z = [], Ze = (e) => {
179
185
  entityType: a,
180
186
  folderHasVersions: n
181
187
  }) => {
182
- const s = P(() => {
183
- const l = [
188
+ const s = L(() => {
189
+ const c = [
184
190
  {
185
191
  name: "name",
186
192
  data: {
@@ -204,10 +210,10 @@ const Z = [], Ze = (e) => {
204
210
  type: "string",
205
211
  title: "Folder Type",
206
212
  description: "Type of the folder",
207
- enum: t.map((p) => ({
208
- value: p.name,
209
- label: p.name,
210
- icon: p.icon
213
+ enum: t.map((m) => ({
214
+ value: m.name,
215
+ label: m.name,
216
+ icon: m.icon
211
217
  }))
212
218
  }
213
219
  },
@@ -218,10 +224,10 @@ const Z = [], Ze = (e) => {
218
224
  type: "string",
219
225
  title: "Task Type",
220
226
  description: "Type of the task",
221
- enum: r.map((p) => ({
222
- value: p.name,
223
- label: p.name,
224
- icon: p.icon
227
+ enum: r.map((m) => ({
228
+ value: m.name,
229
+ label: m.name,
230
+ icon: m.icon
225
231
  }))
226
232
  }
227
233
  },
@@ -231,11 +237,11 @@ const Z = [], Ze = (e) => {
231
237
  type: "string",
232
238
  title: "Status",
233
239
  description: "The state the entity is in, is it approved or in progress etc.",
234
- enum: o.map((p) => ({
235
- value: p.name,
236
- label: p.name,
237
- icon: p.icon,
238
- color: p.color
240
+ enum: o.map((m) => ({
241
+ value: m.name,
242
+ label: m.name,
243
+ icon: m.icon,
244
+ color: m.color
239
245
  }))
240
246
  }
241
247
  },
@@ -244,78 +250,78 @@ const Z = [], Ze = (e) => {
244
250
  data: {
245
251
  type: "list_of_strings",
246
252
  title: "Tags",
247
- enum: i.map((p) => ({
248
- value: p.name,
249
- label: p.name,
250
- color: p.color
253
+ enum: i.map((m) => ({
254
+ value: m.name,
255
+ label: m.name,
256
+ color: m.color
251
257
  }))
252
258
  }
253
259
  }
254
260
  ].map(
255
- (p) => p.name === "folderType" && a === "folder" && n ? {
256
- ...p,
261
+ (m) => m.name === "folderType" && a === "folder" && n ? {
262
+ ...m,
257
263
  readonly: !0,
258
264
  data: {
259
- ...p.data,
265
+ ...m.data,
260
266
  description: "Folder type is locked because the folder has published versions."
261
267
  }
262
- } : p
263
- ), u = a === "version" ? [
264
- ...l.map(
265
- (p) => ["tags", "status"].includes(p.name) ? p : { ...p, readonly: !0 }
268
+ } : m
269
+ ), h = a === "version" ? [
270
+ ...c.map(
271
+ (m) => ["tags", "status"].includes(m.name) ? m : { ...m, readonly: !0 }
266
272
  )
267
- ] : l, h = a ? e.filter((p) => p.scope?.includes(a) && p.name !== "description").map((p) => ({
268
- name: "attrib." + p.name,
269
- data: p.data,
270
- ...a === "version" && p.builtin ? { readonly: !0 } : {}
271
- })) : [], m = J.map((p) => ({
272
- name: p,
273
+ ] : c, v = a ? e.filter((m) => m.scope?.includes(a) && m.name !== "description").map((m) => ({
274
+ name: "attrib." + m.name,
275
+ data: m.data,
276
+ ...a === "version" && m.builtin ? { readonly: !0 } : {}
277
+ })) : [], u = J.map((m) => ({
278
+ name: m,
273
279
  readonly: !0,
274
280
  data: {
275
281
  type: "string",
276
- title: me(p)
282
+ title: be(m)
277
283
  }
278
- })), E = [...u, ...h, ...m], f = ["path", "name"];
279
- return [...E].sort((p, T) => {
280
- const D = f.indexOf(p.name), v = f.indexOf(T.name);
281
- return D === -1 && v === -1 ? 0 : D === -1 ? 1 : v === -1 ? -1 : D - v;
284
+ })), k = [...h, ...v, ...u], b = ["path", "name"];
285
+ return [...k].sort((m, T) => {
286
+ const j = b.indexOf(m.name), w = b.indexOf(T.name);
287
+ return j === -1 && w === -1 ? 0 : j === -1 ? 1 : w === -1 ? -1 : j - w;
282
288
  });
283
- }, [e, t, r, o, i, a, n]), b = s.filter(
284
- (c) => et.includes(c.name) || c.name.startsWith("attrib.")
289
+ }, [e, t, r, o, i, a, n]), f = s.filter(
290
+ (l) => lt.includes(l.name) || l.name.startsWith("attrib.")
285
291
  ), y = s.filter(
286
- (c) => J.includes(c.name)
292
+ (l) => J.includes(l.name)
287
293
  );
288
294
  return {
289
295
  fields: s,
290
- editableFields: b,
296
+ editableFields: f,
291
297
  readOnlyFieldsData: y
292
298
  };
293
- }, rt = ({ entities: e, entityType: t }) => {
294
- const [r] = Me(), { onUpdateEntity: o } = ce();
299
+ }, pt = ({ entities: e, entityType: t }) => {
300
+ const [r] = Be(), { onUpdateEntity: o } = q();
295
301
  return { updateEntity: async (a, n) => {
296
302
  if (n == null) {
297
303
  console.error("value is null or undefined");
298
304
  return;
299
305
  }
300
306
  try {
301
- const s = e.map((b) => ({
302
- id: b.id,
303
- projectName: b.projectName,
307
+ const s = e.map((f) => ({
308
+ id: f.id,
309
+ projectName: f.projectName,
304
310
  data: {
305
311
  [a]: n
306
312
  },
307
- currentAssignees: b.users,
313
+ currentAssignees: f.users,
308
314
  meta: {
309
- folderId: b.folderId
315
+ folderId: f.folderId
310
316
  }
311
317
  }));
312
318
  await r({ operations: s, entityType: t }), o?.({ operations: s, entityType: t });
313
319
  } catch {
314
- H.error(`Error updating ${t}`);
320
+ Q.error(`Error updating ${t}`);
315
321
  }
316
322
  } };
317
- }, at = ({ entities: e, entityType: t }) => {
318
- const { updateEntity: o } = rt({
323
+ }, ut = ({ entities: e, entityType: t }) => {
324
+ const { updateEntity: o } = pt({
319
325
  entities: e.map((i) => ({
320
326
  id: i.id,
321
327
  projectName: i.projectName || "",
@@ -328,8 +334,8 @@ const Z = [], Ze = (e) => {
328
334
  enableEditing: !0,
329
335
  updateEntity: o
330
336
  };
331
- }, nt = (e, t) => {
332
- const r = le({ projects: [...new Set(e).values()] });
337
+ }, mt = (e, t) => {
338
+ const r = ce({ projects: [...new Set(e).values()] });
333
339
  if (!r || !r.data)
334
340
  return [];
335
341
  let o;
@@ -341,16 +347,16 @@ const Z = [], Ze = (e) => {
341
347
  o = a;
342
348
  continue;
343
349
  }
344
- o = re(o, a, "name");
350
+ o = ae(o, a, "name");
345
351
  }
346
352
  return o;
347
- }, So = (e, t) => {
353
+ }, Po = (e, t) => {
348
354
  let r = Object.values(e || {});
349
355
  return r.length == 0 || r[0].scope === void 0 ? r : r.filter(
350
356
  (o) => t.every((i) => o.scope === void 0 || o.scope.includes(i))
351
357
  );
352
- }, it = (e, t) => {
353
- const r = le({ projects: [...new Set(e).values()] });
358
+ }, gt = (e, t) => {
359
+ const r = ce({ projects: [...new Set(e).values()] });
354
360
  if (!r || !r.data)
355
361
  return [];
356
362
  let o;
@@ -360,10 +366,10 @@ const Z = [], Ze = (e) => {
360
366
  o = a;
361
367
  continue;
362
368
  }
363
- o = re(o, a, "name");
369
+ o = ae(o, a, "name");
364
370
  }
365
371
  return o || [];
366
- }, st = d.div`
372
+ }, ht = d.div`
367
373
  width: 100%;
368
374
  overflow: hidden;
369
375
  text-overflow: ellipsis;
@@ -373,7 +379,7 @@ const Z = [], Ze = (e) => {
373
379
  input {
374
380
  text-align: left;
375
381
  }
376
- `, lt = d(Ne)`
382
+ `, ft = d(Le)`
377
383
  .enum,
378
384
  .edit-trigger {
379
385
  &:hover {
@@ -383,7 +389,7 @@ const Z = [], Ze = (e) => {
383
389
  &:hover {
384
390
  background-color: unset;
385
391
  }
386
- `, ct = ({
392
+ `, vt = ({
387
393
  field: e,
388
394
  value: t,
389
395
  isEditing: r,
@@ -392,111 +398,111 @@ const Z = [], Ze = (e) => {
392
398
  onChange: a,
393
399
  onCancelEdit: n,
394
400
  onExpand: s,
395
- entities: b = [],
401
+ entities: f = [],
396
402
  entityType: y = "task",
397
- projectName: c
403
+ projectName: l
398
404
  }) => {
399
- const { type: l, widget: u } = e.data, h = {
405
+ const { type: c, widget: h } = e.data, v = {
400
406
  isEditing: r && !o,
401
407
  isReadOnly: o,
402
408
  isInherited: !1,
403
- onChange: (j) => a(e.name, j)
404
- }, m = b.map((j) => j.projectName), E = nt(m, [y]), f = it(m, y), w = c || m[0], {
405
- options: p,
409
+ onChange: (C) => a(e.name, C)
410
+ }, u = f.map((C) => C.projectName), k = mt(u, [y]), b = gt(u, y), E = l || u[0], {
411
+ options: m,
406
412
  isLoading: T,
407
- isError: D,
408
- errorMessage: v
409
- } = Xe(e.data, { projectName: w }), S = D ? we(v) : void 0, A = e.name === "attrib.endDate" && b.length > 0 && b.every((j) => j.data?.schedulerSyncData?.allDay === !0);
410
- let F = t ?? "";
411
- const N = e.data.title || e.name;
413
+ isError: j,
414
+ errorMessage: w
415
+ } = it(e.data, { projectName: E }), S = j ? je(w) : void 0, F = e.name === "attrib.endDate" && f.length > 0 && f.every((C) => C.data?.schedulerSyncData?.allDay === !0);
416
+ let D = t ?? "";
417
+ const $ = e.data.title || e.name;
412
418
  switch (!0) {
413
- case l === "boolean":
414
- return /* @__PURE__ */ g(Re, { value: !!F, ...h, style: { margin: 0 } });
415
- case l === "datetime":
419
+ case c === "boolean":
420
+ return /* @__PURE__ */ g(Ie, { value: !!D, ...v, style: { margin: 0 } });
421
+ case c === "datetime":
416
422
  return /* @__PURE__ */ g(
417
- Ue,
423
+ Oe,
418
424
  {
419
- value: F,
420
- ...h,
425
+ value: D,
426
+ ...v,
421
427
  isEditing: !0,
422
428
  onCancelEdit: n,
423
429
  style: { width: "fit-content" },
424
430
  autoFocus: !1,
425
- isMidnightExclusive: A
431
+ isMidnightExclusive: F
426
432
  }
427
433
  );
428
- case ye(e.data): {
429
- const j = l?.includes("list");
430
- let $ = [];
431
- j ? $ = Array.isArray(F) ? F : [] : i ? $ = [] : $ = [F];
432
- let x = p.map((k) => ({
433
- value: k.value,
434
- label: k.label,
435
- icon: be(k.icon),
436
- color: k.color,
437
- group: k.group,
438
- hidden: k.hidden
434
+ case Te(e.data): {
435
+ const C = c?.includes("list");
436
+ let R = [];
437
+ C ? R = Array.isArray(D) ? D : [] : i ? R = [] : R = [D];
438
+ let x = m.map((p) => ({
439
+ value: p.value,
440
+ label: p.label,
441
+ icon: Se(p.icon),
442
+ color: p.color,
443
+ group: p.group,
444
+ hidden: p.hidden
439
445
  }));
440
- return e.name === "status" && b.length > 0 && E && E.length > 0 && (x = E.map((k) => ({
441
- value: k.name,
442
- label: k.name,
443
- icon: k.icon,
444
- color: k.color
445
- }))), e.name === "taskType" && b.length > 0 && f && f.length > 0 && (x = f.map((k) => ({
446
- value: k.name,
447
- label: k.name,
448
- icon: k.icon,
449
- color: k.color
450
- }))), e.allowNone && $.length && !j && F && F !== "" && (x = [
446
+ return e.name === "status" && f.length > 0 && k && k.length > 0 && (x = k.map((p) => ({
447
+ value: p.name,
448
+ label: p.name,
449
+ icon: p.icon,
450
+ color: p.color
451
+ }))), e.name === "taskType" && f.length > 0 && b && b.length > 0 && (x = b.map((p) => ({
452
+ value: p.name,
453
+ label: p.name,
454
+ icon: p.icon,
455
+ color: p.color
456
+ }))), e.allowNone && R.length && !C && D && D !== "" && (x = [
451
457
  { value: "", label: `No ${e.data.title || e.name}` },
452
458
  ...x
453
459
  ]), /* @__PURE__ */ g(
454
- lt,
460
+ ft,
455
461
  {
456
462
  "data-tooltip": S,
457
- value: $,
463
+ value: R,
458
464
  options: x,
459
- type: l,
465
+ type: c,
460
466
  pt: {
461
467
  template: {
462
468
  style: { height: 32 },
463
469
  className: "enum"
464
470
  }
465
471
  },
466
- placeholder: S ? `Could not load ${N}` : i ? `Mixed ${N}` : `Select ${N}...`,
467
- error: xe(S),
472
+ placeholder: S ? `Could not load ${$}` : i ? `Mixed ${$}` : `Select ${$}...`,
473
+ error: De(S),
468
474
  onCancelEdit: n,
469
475
  align: "right",
470
476
  enableCustomValues: e.enableCustomValues,
471
477
  isLoadingOptions: T,
472
478
  search: e.enableSearch ?? x.length >= 5,
473
479
  sortBySelected: !x,
474
- ...h
480
+ ...v
475
481
  }
476
482
  );
477
483
  }
478
- case (l === "string" || l === "integer" || l === "float"):
484
+ case (c === "string" || c === "integer" || c === "float"):
479
485
  default:
480
- return u === "markdown" ? /* @__PURE__ */ g(
481
- $e,
486
+ return h === "markdown" ? /* @__PURE__ */ g(
487
+ Pe,
482
488
  {
483
- value: F.toString(),
489
+ value: D.toString(),
484
490
  onCancelEdit: n,
485
491
  onExpand: s,
486
492
  showExpand: !!s,
487
- ...h
493
+ ...v
488
494
  }
489
- ) : /* @__PURE__ */ g(st, { children: /* @__PURE__ */ g(
490
- ze,
495
+ ) : /* @__PURE__ */ g(ht, { children: /* @__PURE__ */ g(
496
+ We,
491
497
  {
492
- value: F.toString(),
498
+ value: D.toString(),
493
499
  onCancelEdit: n,
494
- type: l,
495
- ...h
500
+ type: c,
501
+ ...v
496
502
  }
497
503
  ) });
498
504
  }
499
- }, dt = d.div`
505
+ }, yt = d.div`
500
506
  color: var(--md-sys-color-outline);
501
507
  white-space: nowrap;
502
508
  overflow: hidden;
@@ -508,9 +514,9 @@ const Z = [], Ze = (e) => {
508
514
  showDetailedTooltip: r = !1,
509
515
  ...o
510
516
  }) => {
511
- const i = t.title ? K(t.title) : K(e), a = r ? `${i} (${e}) ${t.description ? "-" : ""} ${t.description || ""}` : t.description || i;
517
+ const i = t.title ? Y(t.title) : Y(e), a = r ? `${i} (${e}) ${t.description ? "-" : ""} ${t.description || ""}` : t.description || i;
512
518
  return /* @__PURE__ */ g(
513
- dt,
519
+ yt,
514
520
  {
515
521
  "data-tooltip": r ? a : void 0,
516
522
  "data-tooltip-delay": 700,
@@ -552,7 +558,7 @@ const Z = [], Ze = (e) => {
552
558
  margin-top: 6px;
553
559
  }
554
560
  }
555
- `, pt = d.div`
561
+ `, bt = d.div`
556
562
  height: 32px;
557
563
  overflow: hidden;
558
564
  width: 100%;
@@ -588,7 +594,7 @@ const Z = [], Ze = (e) => {
588
594
  &.readonly {
589
595
  pointer-events: none;
590
596
  }
591
- `, ut = d.div`
597
+ `, xt = d.div`
592
598
  display: flex;
593
599
  flex-direction: column;
594
600
  gap: var(--base-gap-small);
@@ -598,7 +604,7 @@ const Z = [], Ze = (e) => {
598
604
  height: 32px;
599
605
  padding: 2px;
600
606
  }
601
- `, mt = d(ue)`
607
+ `, wt = d(ue)`
602
608
  &.loading {
603
609
  width: 100%;
604
610
  height: 33px;
@@ -606,7 +612,7 @@ const Z = [], Ze = (e) => {
606
612
  border-radius: 4px;
607
613
  margin-bottom: 4px;
608
614
  }
609
- `, gt = ({
615
+ `, kt = ({
610
616
  title: e,
611
617
  isLoading: t,
612
618
  form: r,
@@ -615,96 +621,96 @@ const Z = [], Ze = (e) => {
615
621
  mixedFields: a,
616
622
  onChange: n,
617
623
  entities: s = [],
618
- projectName: b,
624
+ projectName: f,
619
625
  entityType: y = "task"
620
626
  }) => {
621
- const [c, l] = U(null), u = P(
622
- () => s.map((f) => f?.id).join("|"),
627
+ const [l, c] = M(null), h = L(
628
+ () => s.map((b) => b?.id).join("|"),
623
629
  [s]
624
630
  );
625
- W(() => {
626
- l(null);
627
- }, [u]);
628
- const h = (f) => {
629
- i && !o.find((w) => w.name === f)?.readonly ? l(f) : console.log("Editing not allowed:", {
631
+ O(() => {
632
+ c(null);
633
+ }, [h]);
634
+ const v = (b) => {
635
+ i && !o.find((E) => E.name === b)?.readonly ? c(b) : console.log("Editing not allowed:", {
630
636
  enableEditing: i,
631
- fieldReadonly: o.find((w) => w.name === f)?.readonly
637
+ fieldReadonly: o.find((E) => E.name === b)?.readonly
632
638
  });
633
- }, m = (f, w) => {
634
- l(null), n?.(f, w);
635
- }, E = () => {
636
- l(null);
639
+ }, u = (b, E) => {
640
+ c(null), n?.(b, E);
641
+ }, k = () => {
642
+ c(null);
637
643
  };
638
- return t ? /* @__PURE__ */ g(I, { title: "Attributes", withPadding: !0, children: Array.from({ length: 10 }).map((f, w) => /* @__PURE__ */ C(mt, { children: [
644
+ return t ? /* @__PURE__ */ g(V, { title: "Attributes", withPadding: !0, children: Array.from({ length: 10 }).map((b, E) => /* @__PURE__ */ N(wt, { children: [
639
645
  /* @__PURE__ */ g("div", { className: "loading" }),
640
646
  /* @__PURE__ */ g("div", { className: "loading" })
641
- ] }, w)) }) : /* @__PURE__ */ g(
642
- I,
647
+ ] }, E)) }) : /* @__PURE__ */ g(
648
+ V,
643
649
  {
644
650
  title: "Attributes",
645
651
  autoHeight: !0,
646
652
  showHeader: !0,
647
653
  withPadding: !0,
648
654
  pt: { content: { style: { minHeight: "unset" } } },
649
- children: o.filter((f) => !f.hidden).map((f) => {
650
- const w = r[f.name], p = c === f.name, T = f.readonly || !i, D = a?.includes(f.name) || !1;
651
- return /* @__PURE__ */ C(
655
+ children: o.filter((b) => !b.hidden).map((b) => {
656
+ const E = r[b.name], m = l === b.name, T = b.readonly || !i, j = a?.includes(b.name) || !1;
657
+ return /* @__PURE__ */ N(
652
658
  ue,
653
659
  {
654
- className: z("field-row", { "multi-line": f.data.widget === "markdown" }),
660
+ className: z("field-row", { "multi-line": b.data.widget === "markdown" }),
655
661
  children: [
656
662
  /* @__PURE__ */ g(
657
663
  pe,
658
664
  {
659
- name: f.name,
660
- data: f.data,
665
+ name: b.name,
666
+ data: b.data,
661
667
  showDetailedTooltip: !0,
662
668
  className: "field-label"
663
669
  }
664
670
  ),
665
671
  /* @__PURE__ */ g(
666
- pt,
672
+ bt,
667
673
  {
668
674
  className: z("field-value", {
669
- editing: p,
675
+ editing: m,
670
676
  readonly: T
671
677
  }),
672
- onClick: (v) => {
673
- v.target.closest("a") || (v.preventDefault(), !p && !T && f.data.type !== "boolean" && h(f.name));
678
+ onClick: (w) => {
679
+ w.target.closest("a") || (w.preventDefault(), !m && !T && b.data.type !== "boolean" && v(b.name));
674
680
  },
675
681
  children: /* @__PURE__ */ g(
676
- ct,
682
+ vt,
677
683
  {
678
- field: f,
679
- value: w,
680
- isEditing: p,
684
+ field: b,
685
+ value: E,
686
+ isEditing: m,
681
687
  isReadOnly: T,
682
- isMixed: D,
683
- onChange: m,
684
- onCancelEdit: E,
688
+ isMixed: j,
689
+ onChange: u,
690
+ onCancelEdit: k,
685
691
  onExpand: () => {
686
692
  },
687
693
  entities: s,
688
- projectName: b,
694
+ projectName: f,
689
695
  entityType: y
690
696
  }
691
697
  )
692
698
  }
693
699
  ),
694
- /* @__PURE__ */ g(ut, { className: "field-tools", children: /* @__PURE__ */ g(
695
- L,
700
+ /* @__PURE__ */ g(xt, { className: "field-tools", children: /* @__PURE__ */ g(
701
+ P,
696
702
  {
697
703
  className: "tool",
698
704
  variant: "text",
699
705
  icon: "content_copy",
700
- onClick: (v) => {
701
- v.preventDefault(), v.stopPropagation(), _((w ?? "").toString(), !0);
706
+ onClick: (w) => {
707
+ w.preventDefault(), w.stopPropagation(), _((E ?? "").toString(), !0);
702
708
  }
703
709
  }
704
710
  ) })
705
711
  ]
706
712
  },
707
- f.name
713
+ b.name
708
714
  );
709
715
  })
710
716
  }
@@ -732,7 +738,7 @@ const Z = [], Ze = (e) => {
732
738
  &:hover .copy-icon {
733
739
  opacity: 1;
734
740
  }
735
- `, ht = d.div`
741
+ `, Et = d.div`
736
742
  text-align: left;
737
743
  color: var(--md-sys-color-on-surface);
738
744
  white-space: nowrap;
@@ -741,7 +747,7 @@ const Z = [], Ze = (e) => {
741
747
  justify-self: end;
742
748
  font-size: 14px;
743
749
  width: 100%;
744
- `, Y = d.div`
750
+ `, ee = d.div`
745
751
  height: 20px;
746
752
  background: var(--md-sys-color-surface-container-low);
747
753
  border-radius: 4px;
@@ -758,7 +764,7 @@ const Z = [], Ze = (e) => {
758
764
  opacity: 0.5;
759
765
  }
760
766
  }
761
- `, ft = ({
767
+ `, Tt = ({
762
768
  fields: e,
763
769
  form: t,
764
770
  mixedFields: r = [],
@@ -769,32 +775,32 @@ const Z = [], Ze = (e) => {
769
775
  return "-";
770
776
  if (n === "createdAt" || n === "updatedAt")
771
777
  try {
772
- return _e(new Date(a), "PPpp");
778
+ return Ze(new Date(a), "PPpp");
773
779
  } catch {
774
780
  return a.toString();
775
781
  }
776
782
  return a.toString();
777
783
  };
778
- return o ? /* @__PURE__ */ g(I, { title: "Details", withPadding: !0, children: Array.from({ length: 6 }).map((a, n) => /* @__PURE__ */ C(X, { children: [
779
- /* @__PURE__ */ g(Y, { style: { width: "80px" } }),
780
- /* @__PURE__ */ g(Y, { style: { width: "120px", justifySelf: "end" } }),
784
+ return o ? /* @__PURE__ */ g(V, { title: "Details", withPadding: !0, children: Array.from({ length: 6 }).map((a, n) => /* @__PURE__ */ N(X, { children: [
785
+ /* @__PURE__ */ g(ee, { style: { width: "80px" } }),
786
+ /* @__PURE__ */ g(ee, { style: { width: "120px", justifySelf: "end" } }),
781
787
  /* @__PURE__ */ g("div", { style: { width: "24px" } })
782
- ] }, n)) }) : /* @__PURE__ */ g(I, { title: "Details", autoHeight: !0, showHeader: !0, withPadding: !0, children: e.filter((a) => !a.hidden).map((a) => {
783
- const n = t[a.name], s = r.includes(a.name), b = s ? "Multiple values" : i(n, a.name);
784
- return /* @__PURE__ */ C(X, { children: [
788
+ ] }, n)) }) : /* @__PURE__ */ g(V, { title: "Details", autoHeight: !0, showHeader: !0, withPadding: !0, children: e.filter((a) => !a.hidden).map((a) => {
789
+ const n = t[a.name], s = r.includes(a.name), f = s ? "Multiple values" : i(n, a.name);
790
+ return /* @__PURE__ */ N(X, { children: [
785
791
  /* @__PURE__ */ g(pe, { name: a.name, data: a.data, showDetailedTooltip: !0 }),
786
792
  /* @__PURE__ */ g(
787
- ht,
793
+ Et,
788
794
  {
789
795
  style: {
790
796
  color: s ? "var(--md-sys-color-on-surface-variant)" : "var(--md-sys-color-on-surface)",
791
797
  fontStyle: s ? "italic" : "normal"
792
798
  },
793
- children: b
799
+ children: f
794
800
  }
795
801
  ),
796
802
  /* @__PURE__ */ g(
797
- L,
803
+ P,
798
804
  {
799
805
  className: "copy-icon",
800
806
  variant: "text",
@@ -806,7 +812,7 @@ const Z = [], Ze = (e) => {
806
812
  )
807
813
  ] }, a.name);
808
814
  }) });
809
- }, vt = d.div`
815
+ }, St = d.div`
810
816
  display: flex;
811
817
  flex-direction: column;
812
818
  height: 100%;
@@ -815,75 +821,93 @@ const Z = [], Ze = (e) => {
815
821
  padding-right: 8px;
816
822
  padding-left: 8px;
817
823
  margin-top: 16px;
818
- `, To = ({ entities: e = [], isLoading: t }) => {
819
- const { formData: r, mixedFields: o, updateFormData: i, clearMixedField: a } = tt(
824
+ `, Wo = ({ entities: e = [], isLoading: t }) => {
825
+ const { formData: r, mixedFields: o, updateFormData: i, clearMixedField: a } = ct(
820
826
  e,
821
827
  t
822
- ), { attributes: n } = Be(), { folderTypes: s = [], taskTypes: b = [], statuses: y = [], tags: c = [] } = He(), l = (e || []).filter((v) => v.entityType === "folder"), { data: u } = Pe(
828
+ ), { attributes: n } = Ge(), {
829
+ folderTypes: s = [],
830
+ taskTypes: f = [],
831
+ statuses: y = [],
832
+ tags: l = [],
833
+ productTypes: c
834
+ } = Ke(), { openSlideOut: h } = q(), [, v] = Xe(), u = (e || []).filter((p) => p.entityType === "folder"), { data: k } = He(
823
835
  {
824
- entityIds: l.map((v) => v.id),
836
+ entityIds: u.map((p) => p.id),
825
837
  projectName: r?.projectName || "",
826
838
  referenceTypes: ["origin", "mention", "relation"],
827
839
  activityTypes: ["version.publish"]
828
840
  },
829
841
  {
830
- skip: !r?.projectName || l.length === 0
842
+ skip: !r?.projectName || u.length === 0
831
843
  }
832
- ), h = !!u?.pages?.[0]?.activities?.length, { editableFields: m, readOnlyFieldsData: E } = ot({
844
+ ), b = !!k?.pages?.[0]?.activities?.length, { editableFields: E, readOnlyFieldsData: m } = dt({
833
845
  attributes: n,
834
846
  folderTypes: s,
835
- taskTypes: b,
847
+ taskTypes: f,
836
848
  statuses: y,
837
- tags: c,
849
+ tags: l,
838
850
  entityType: r?.entityType,
839
- folderHasVersions: h
840
- }), f = r?.entityType || "task", { enableEditing: w, updateEntity: p } = at({
851
+ folderHasVersions: b
852
+ }), T = r?.entityType || "task", { enableEditing: j, updateEntity: w } = ut({
841
853
  entities: e,
842
- entityType: f
843
- }), T = (v, S) => {
844
- v === "tags" && (Array.isArray(S) || (S == null || S === "" ? S = [] : S = [String(S)])), v.startsWith("attrib.") && (S = {
845
- [v.replace("attrib.", "")]: S
846
- }, v = "attrib"), i(v, S), p(v, S);
847
- }, D = (v) => {
848
- i("description", v), a("description"), p("attrib", { description: v });
854
+ entityType: T
855
+ }), S = (p, A) => {
856
+ p === "tags" && (Array.isArray(A) || (A == null || A === "" ? A = [] : A = [String(A)])), p.startsWith("attrib.") && (A = {
857
+ [p.replace("attrib.", "")]: A
858
+ }, p = "attrib"), i(p, A), w(p, A);
859
+ }, F = r?.projectName || e[0]?.projectName, D = e[0]?.id, $ = L(
860
+ () => F && D ? { projectName: F, entityType: T, entityId: D, productTypes: c, taskTypes: f } : void 0,
861
+ [F, T, D, c, f]
862
+ ), C = ({ type: p, id: A }) => {
863
+ p === "user" || p === "team" || !F || h({ entityId: A, entityType: p, projectName: F });
864
+ }, R = ({ type: p, id: A, label: me }, ge) => {
865
+ const { x: he, y: fe, width: ve } = ge.getBoundingClientRect();
866
+ v({ id: A, name: A, type: p, label: me, pos: { left: he + ve / 2, top: fe } });
867
+ }, x = (p) => {
868
+ i("description", p), a("description"), w("attrib", { description: p });
849
869
  };
850
- return /* @__PURE__ */ C(vt, { children: [
870
+ return /* @__PURE__ */ N(St, { children: [
851
871
  /* @__PURE__ */ g(
852
- Le,
872
+ Ve,
853
873
  {
854
874
  description: r?.description || "",
855
875
  isMixed: o.includes("description"),
856
- enableEditing: w,
857
- onChange: D,
858
- isLoading: t
876
+ enableEditing: j,
877
+ onChange: x,
878
+ isLoading: t,
879
+ mentionsContext: $,
880
+ onMentionClick: C,
881
+ onMentionHover: R
859
882
  }
860
883
  ),
884
+ /* @__PURE__ */ g(et, {}),
861
885
  /* @__PURE__ */ g(
862
- gt,
886
+ kt,
863
887
  {
864
- fields: m,
888
+ fields: E,
865
889
  form: r || {},
866
890
  mixedFields: o,
867
891
  isLoading: t,
868
- enableEditing: w,
869
- onChange: T,
892
+ enableEditing: j,
893
+ onChange: S,
870
894
  entities: e,
871
- entityType: f
895
+ entityType: T
872
896
  }
873
897
  ),
874
898
  /* @__PURE__ */ g(
875
- ft,
899
+ Tt,
876
900
  {
877
- fields: E,
901
+ fields: m,
878
902
  form: r || {},
879
903
  mixedFields: o,
880
904
  isLoading: t
881
905
  }
882
906
  )
883
907
  ] });
884
- }, Do = d.div`
908
+ }, Oo = d.div`
885
909
  position: relative;
886
- `, Fo = d.div`
910
+ `, Io = d.div`
887
911
  position: relative;
888
912
  padding: 8px;
889
913
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
@@ -915,13 +939,13 @@ const Z = [], Ze = (e) => {
915
939
  /* align center */
916
940
  align-items: center;
917
941
  }
918
- `, jo = d(L)`
942
+ `, Vo = d(P)`
919
943
  position: absolute;
920
944
  right: 4px;
921
945
  top: 4px;
922
946
  width: fit-content;
923
947
  z-index: 50;
924
- `, Co = d.header`
948
+ `, Bo = d.header`
925
949
  display: flex;
926
950
  align-items: center;
927
951
  gap: var(--base-gap-large);
@@ -936,7 +960,7 @@ const Z = [], Ze = (e) => {
936
960
  display: none;
937
961
  }
938
962
  }
939
- `, Ao = d.div`
963
+ `, Ho = d.div`
940
964
  display: flex;
941
965
  align-items: center;
942
966
  gap: var(--base-gap-small);
@@ -944,7 +968,7 @@ const Z = [], Ze = (e) => {
944
968
  h2 {
945
969
  min-width: fit-content;
946
970
  }
947
- `, No = d.div`
971
+ `, Qo = d.div`
948
972
  position: relative;
949
973
  height: 100%;
950
974
 
@@ -959,7 +983,7 @@ const Z = [], Ze = (e) => {
959
983
  flex-direction: column;
960
984
  gap: var(--base-gap-small);
961
985
  }
962
- `, $o = d.div`
986
+ `, _o = d.div`
963
987
  display: flex;
964
988
  flex-direction: column;
965
989
  height: 100%;
@@ -997,7 +1021,7 @@ const Z = [], Ze = (e) => {
997
1021
  align-items: center;
998
1022
  gap: var(--base-gap-medium);
999
1023
  }
1000
- `, zo = d.div`
1024
+ `, qo = d.div`
1001
1025
  display: flex;
1002
1026
  justify-content: space-between;
1003
1027
  align-items: flex-start;
@@ -1006,10 +1030,10 @@ const Z = [], Ze = (e) => {
1006
1030
  label {
1007
1031
  color: var(--md-sys-color-outline);
1008
1032
  }
1009
- `, Uo = d.div`
1033
+ `, Go = d.div`
1010
1034
  display: flex;
1011
1035
  flex-direction: column;
1012
- `, Ro = d(Ee)`
1036
+ `, Ko = d(Ce)`
1013
1037
  width: fit-content;
1014
1038
  .status-field.value {
1015
1039
  position: relative;
@@ -1020,11 +1044,11 @@ const Z = [], Ze = (e) => {
1020
1044
  margin-bottom: 2px;
1021
1045
  color: ${(e) => e.$textColor};
1022
1046
  }
1023
- `, Lo = d(Se)`
1047
+ `, Yo = d(Ae)`
1024
1048
  width: fit-content;
1025
1049
  justify-self: end;
1026
1050
  max-width: 100%;
1027
- `, Mo = d(Te)`
1051
+ `, Zo = d(Ne)`
1028
1052
  height: 24px;
1029
1053
  .template-value {
1030
1054
  padding: 0 2px;
@@ -1038,7 +1062,7 @@ const Z = [], Ze = (e) => {
1038
1062
  display: none;
1039
1063
  }
1040
1064
  }
1041
- `, Po = d(De)`
1065
+ `, Jo = d($e)`
1042
1066
  width: max-content;
1043
1067
  justify-self: end;
1044
1068
  /* remove text and dropdown icon */
@@ -1062,12 +1086,12 @@ const Z = [], Ze = (e) => {
1062
1086
  background-color: var(--md-sys-color-surface-container-low-hover);
1063
1087
  }
1064
1088
  }
1065
- `, Wo = d.footer`
1089
+ `, Xo = d.footer`
1066
1090
  display: flex;
1067
1091
  align-items: center;
1068
1092
  gap: var(--base-gap-small);
1069
1093
  justify-content: space-between;
1070
- `, Oo = d.div`
1094
+ `, er = d.div`
1071
1095
  height: 100%;
1072
1096
 
1073
1097
  > input[type='file'] {
@@ -1078,7 +1102,7 @@ const Z = [], Ze = (e) => {
1078
1102
  input[type='file'] {
1079
1103
  display: none;
1080
1104
  }
1081
- `, Io = d.div`
1105
+ `, tr = d.div`
1082
1106
  z-index: 100;
1083
1107
  position: absolute;
1084
1108
  inset: 0;
@@ -1090,7 +1114,7 @@ const Z = [], Ze = (e) => {
1090
1114
  display: flex;
1091
1115
  align-items: center;
1092
1116
  justify-content: center;
1093
- `, Vo = d.div`
1117
+ `, or = d.div`
1094
1118
  flex: 1;
1095
1119
  height: 100%;
1096
1120
  border-radius: var(--border-radius-l);
@@ -1119,11 +1143,11 @@ const Z = [], Ze = (e) => {
1119
1143
  /* show children */
1120
1144
  opacity: 1;
1121
1145
  }
1122
- `, Bo = d(L)`
1146
+ `, rr = d(P)`
1123
1147
  position: absolute;
1124
1148
  top: 4px;
1125
1149
  right: 4px;
1126
- `, Ho = d.div`
1150
+ `, ar = d.div`
1127
1151
  display: flex;
1128
1152
  flex-direction: column;
1129
1153
  align-items: center;
@@ -1136,7 +1160,7 @@ const Z = [], Ze = (e) => {
1136
1160
  top: 12px;
1137
1161
  position: relative;
1138
1162
  }
1139
- `, _o = d.div`
1163
+ `, nr = d.div`
1140
1164
  height: 8px;
1141
1165
  position: absolute;
1142
1166
  border-radius: 4px;
@@ -1145,14 +1169,14 @@ const Z = [], Ze = (e) => {
1145
1169
  background-color: var(--md-sys-color-primary);
1146
1170
 
1147
1171
  transition: right 0.2s;
1148
- `, yt = ie`
1172
+ `, Dt = se`
1149
1173
  from {
1150
1174
  transform: rotate(0deg);
1151
1175
  }
1152
1176
  to {
1153
1177
  transform: rotate(360deg);
1154
1178
  }
1155
- `, bt = d.div`
1179
+ `, jt = d.div`
1156
1180
  position: relative;
1157
1181
  display: flex;
1158
1182
  justify-content: center;
@@ -1161,10 +1185,10 @@ const Z = [], Ze = (e) => {
1161
1185
  overflow: hidden;
1162
1186
 
1163
1187
  background-color: var(--md-sys-color-surface-container-low);
1164
- `, xt = d(R)`
1165
- animation: ${yt} 1s linear infinite;
1188
+ `, Ft = d(U)`
1189
+ animation: ${Dt} 1s linear infinite;
1166
1190
  opacity: 0.6;
1167
- `, wt = d.img`
1191
+ `, Ct = d.img`
1168
1192
  position: absolute;
1169
1193
  inset: 0;
1170
1194
  object-fit: cover;
@@ -1176,41 +1200,41 @@ const Z = [], Ze = (e) => {
1176
1200
  &.hidden {
1177
1201
  opacity: 0;
1178
1202
  }
1179
- `, kt = ({ mimetype: e = "", src: t, ...r }) => {
1180
- const [o, i] = U(!1), [a, n] = U(!1), s = G(null), b = G(0);
1181
- return W(() => {
1182
- const y = b.current + 1;
1183
- b.current = y, n(!1), i(!1);
1184
- const c = s.current;
1185
- let l = !1, u = 0, h = 0, m = 0;
1186
- const E = (T) => {
1187
- l || y !== b.current || (l = !0, cancelAnimationFrame(u), window.clearInterval(h), window.clearTimeout(m), T());
1188
- }, f = () => {
1189
- !c || y !== b.current || c.complete && c.naturalWidth > 0 && E(() => {
1203
+ `, At = ({ mimetype: e = "", src: t, ...r }) => {
1204
+ const [o, i] = M(!1), [a, n] = M(!1), s = K(null), f = K(0);
1205
+ return O(() => {
1206
+ const y = f.current + 1;
1207
+ f.current = y, n(!1), i(!1);
1208
+ const l = s.current;
1209
+ let c = !1, h = 0, v = 0, u = 0;
1210
+ const k = (T) => {
1211
+ c || y !== f.current || (c = !0, cancelAnimationFrame(h), window.clearInterval(v), window.clearTimeout(u), T());
1212
+ }, b = () => {
1213
+ !l || y !== f.current || l.complete && l.naturalWidth > 0 && k(() => {
1190
1214
  n(!0), i(!1);
1191
1215
  });
1192
- }, w = () => E(() => {
1216
+ }, E = () => k(() => {
1193
1217
  n(!0), i(!1);
1194
- }), p = () => E(() => {
1218
+ }), m = () => k(() => {
1195
1219
  n(!0), i(!0);
1196
1220
  });
1197
- return c && (c.addEventListener("load", w), c.addEventListener("error", p), typeof c.decode == "function" && c.decode().then(
1198
- () => E(() => {
1221
+ return l && (l.addEventListener("load", E), l.addEventListener("error", m), typeof l.decode == "function" && l.decode().then(
1222
+ () => k(() => {
1199
1223
  n(!0), i(!1);
1200
1224
  })
1201
1225
  ).catch(() => {
1202
- f();
1203
- })), u = requestAnimationFrame(f), h = window.setInterval(f, 250), m = window.setTimeout(() => {
1204
- E(() => {
1205
- c && c.naturalWidth > 0 ? (n(!0), i(!1)) : n(!0);
1226
+ b();
1227
+ })), h = requestAnimationFrame(b), v = window.setInterval(b, 250), u = window.setTimeout(() => {
1228
+ k(() => {
1229
+ l && l.naturalWidth > 0 ? (n(!0), i(!1)) : n(!0);
1206
1230
  });
1207
1231
  }, 1e4), () => {
1208
- cancelAnimationFrame(u), window.clearInterval(h), window.clearTimeout(m), c && (c.removeEventListener("load", w), c.removeEventListener("error", p));
1232
+ cancelAnimationFrame(h), window.clearInterval(v), window.clearTimeout(u), l && (l.removeEventListener("load", E), l.removeEventListener("error", m));
1209
1233
  };
1210
- }, [t]), /* @__PURE__ */ C(bt, { ...r, className: z("file-thumbnail", r.className), children: [
1211
- a ? /* @__PURE__ */ g(R, { icon: Fe(e) }) : /* @__PURE__ */ g(xt, { icon: "progress_activity" }),
1234
+ }, [t]), /* @__PURE__ */ N(jt, { ...r, className: z("file-thumbnail", r.className), children: [
1235
+ a ? /* @__PURE__ */ g(U, { icon: Re(e) }) : /* @__PURE__ */ g(Ft, { icon: "progress_activity" }),
1212
1236
  /* @__PURE__ */ g(
1213
- wt,
1237
+ Ct,
1214
1238
  {
1215
1239
  ref: s,
1216
1240
  src: t,
@@ -1225,7 +1249,7 @@ const Z = [], Ze = (e) => {
1225
1249
  }
1226
1250
  )
1227
1251
  ] });
1228
- }, Et = d.div`
1252
+ }, Nt = d.div`
1229
1253
  display: flex;
1230
1254
  align-items: center;
1231
1255
  overflow: hidden;
@@ -1292,7 +1316,7 @@ const Z = [], Ze = (e) => {
1292
1316
  background-color: var(--md-sys-color-primary-container);
1293
1317
  }
1294
1318
  }
1295
- `, St = d.div`
1319
+ `, $t = d.div`
1296
1320
  display: flex;
1297
1321
  flex-direction: column;
1298
1322
  flex: 1;
@@ -1317,15 +1341,15 @@ const Z = [], Ze = (e) => {
1317
1341
  .name {
1318
1342
  color: var(--md-sys-color-outline);
1319
1343
  }
1320
- `, Tt = d.div`
1344
+ `, Rt = d.div`
1321
1345
  display: flex;
1322
1346
  align-items: center;
1323
1347
  gap: var(--base-gap-small);
1324
1348
 
1325
1349
  h4 {
1326
- ${je.titleSmall}
1350
+ ${ze.titleSmall}
1327
1351
  }
1328
- `, Dt = d(L)`
1352
+ `, zt = d(P)`
1329
1353
  /* hidden by default and show on card hover */
1330
1354
  display: none;
1331
1355
  .icon {
@@ -1337,21 +1361,21 @@ const Z = [], Ze = (e) => {
1337
1361
  }
1338
1362
 
1339
1363
  margin: -2px;
1340
- `, Ft = d(kt)`
1364
+ `, Mt = d(At)`
1341
1365
  width: 71px;
1342
1366
  height: 40px;
1343
1367
 
1344
1368
  border-radius: var(--border-radius-m);
1345
1369
 
1346
1370
  object-fit: cover;
1347
- `, jt = d(R)`
1371
+ `, Ut = d(U)`
1348
1372
  font-size: 25px;
1349
1373
 
1350
1374
  cursor: grab;
1351
1375
 
1352
1376
  /* default hidden */
1353
1377
  opacity: 0;
1354
- `, Qo = Q(
1378
+ `, ir = H(
1355
1379
  ({
1356
1380
  availability: e,
1357
1381
  projectName: t,
@@ -1361,54 +1385,54 @@ const Z = [], Ze = (e) => {
1361
1385
  processing: a,
1362
1386
  mimetype: n,
1363
1387
  isDragOverlay: s,
1364
- isDropPlaceholder: b,
1388
+ isDropPlaceholder: f,
1365
1389
  isSelected: y,
1366
- isDragging: c,
1367
- dragProps: l = {},
1368
- sortingDisabled: u,
1369
- onEdit: h,
1370
- ...m
1371
- }, E) => {
1372
- const f = (l || s) && !u, w = e === "conversionRecommended", p = w && !!a;
1390
+ isDragging: l,
1391
+ dragProps: c = {},
1392
+ sortingDisabled: h,
1393
+ onEdit: v,
1394
+ ...u
1395
+ }, k) => {
1396
+ const b = (c || s) && !h, E = e === "conversionRecommended", m = E && !!a;
1373
1397
  let T = o;
1374
- w && (T = "Unoptimized - conversion recommended"), p && (T = "Unoptimized - queued for conversion");
1375
- let D = i;
1376
- return w && (D = o), /* @__PURE__ */ C(
1377
- Et,
1398
+ E && (T = "Unoptimized - conversion recommended"), m && (T = "Unoptimized - queued for conversion");
1399
+ let j = i;
1400
+ return E && (j = o), /* @__PURE__ */ N(
1401
+ Nt,
1378
1402
  {
1379
1403
  id: r,
1380
- ref: E,
1404
+ ref: k,
1381
1405
  className: z({
1382
- draggable: f,
1383
- "drop-placeholder": b,
1406
+ draggable: b,
1407
+ "drop-placeholder": f,
1384
1408
  "drag-overlay": s,
1385
- dragging: c,
1409
+ dragging: l,
1386
1410
  // is anything dragging
1387
1411
  selected: y,
1388
- editable: !!h
1412
+ editable: !!v
1389
1413
  }),
1390
- ...m,
1414
+ ...u,
1391
1415
  children: [
1392
1416
  /* @__PURE__ */ g(
1393
- Ft,
1417
+ Mt,
1394
1418
  {
1395
1419
  src: `/api/projects/${t}/files/${r}/thumbnail`,
1396
1420
  mimetype: n
1397
1421
  }
1398
1422
  ),
1399
- /* @__PURE__ */ C(St, { children: [
1400
- /* @__PURE__ */ C(Tt, { children: [
1401
- /* @__PURE__ */ g("h4", { children: D }),
1402
- !!h && /* @__PURE__ */ g(Dt, { icon: "edit", variant: "text", className: "edit", onClick: h })
1423
+ /* @__PURE__ */ N($t, { children: [
1424
+ /* @__PURE__ */ N(Rt, { children: [
1425
+ /* @__PURE__ */ g("h4", { children: j }),
1426
+ !!v && /* @__PURE__ */ g(zt, { icon: "edit", variant: "text", className: "edit", onClick: v })
1403
1427
  ] }),
1404
1428
  /* @__PURE__ */ g("span", { className: "name", children: T })
1405
1429
  ] }),
1406
- f && /* @__PURE__ */ g(jt, { className: "handle", ...l, icon: "drag_indicator" })
1430
+ b && /* @__PURE__ */ g(Ut, { className: "handle", ...c, icon: "drag_indicator" })
1407
1431
  ]
1408
1432
  }
1409
1433
  );
1410
1434
  }
1411
- ), Ct = ie`
1435
+ ), Lt = se`
1412
1436
  from {
1413
1437
  transform: rotate(360deg);
1414
1438
  }
@@ -1417,7 +1441,7 @@ const Z = [], Ze = (e) => {
1417
1441
  transform: rotate(0deg);
1418
1442
  }
1419
1443
 
1420
- `, At = d.div`
1444
+ `, Pt = d.div`
1421
1445
  position: relative;
1422
1446
  width: 100%;
1423
1447
  min-height: 50px;
@@ -1483,13 +1507,13 @@ const Z = [], Ze = (e) => {
1483
1507
  & > * {
1484
1508
  z-index: 10;
1485
1509
  }
1486
- `, Nt = d.div`
1510
+ `, Wt = d.div`
1487
1511
  position: absolute;
1488
1512
  inset: 0;
1489
1513
  background-color: var(--md-sys-color-primary-container);
1490
1514
  z-index: 0;
1491
1515
  transition: right 0.2s;
1492
- `, $t = d.div`
1516
+ `, Ot = d.div`
1493
1517
  position: relative;
1494
1518
  width: 71px;
1495
1519
  height: 40px;
@@ -1508,7 +1532,7 @@ const Z = [], Ze = (e) => {
1508
1532
 
1509
1533
  &.spinning {
1510
1534
  /* spin animation */
1511
- animation: ${Ct} 1s infinite linear;
1535
+ animation: ${Lt} 1s infinite linear;
1512
1536
  }
1513
1537
  }
1514
1538
 
@@ -1520,7 +1544,7 @@ const Z = [], Ze = (e) => {
1520
1544
  object-fit: cover;
1521
1545
  opacity: 0.5;
1522
1546
  }
1523
- `, ee = ({
1547
+ `, te = ({
1524
1548
  name: e,
1525
1549
  progress: t,
1526
1550
  size: r,
@@ -1529,54 +1553,54 @@ const Z = [], Ze = (e) => {
1529
1553
  src: a,
1530
1554
  error: n,
1531
1555
  tooltip: s,
1532
- onRemove: b,
1556
+ onRemove: f,
1533
1557
  ...y
1534
1558
  }) => {
1535
- let c = "", l = !1, u = "";
1559
+ let l = "", c = !1, h = "";
1536
1560
  switch (o) {
1537
1561
  case "processing":
1538
- c = "Transcoding", l = !0, u = "settings";
1562
+ l = "Transcoding", c = !0, h = "settings";
1539
1563
  break;
1540
1564
  case "unsupported":
1541
- c = "Unsupported - conversion required", u = "visibility_off";
1565
+ l = "Unsupported - conversion required", h = "visibility_off";
1542
1566
  break;
1543
1567
  case "upload":
1544
- c = "Uploading", l = !0, u = "sync";
1568
+ l = "Uploading", c = !0, h = "sync";
1545
1569
  break;
1546
1570
  case "queued":
1547
- c = "Queued - waiting to be transcoded", u = "hourglass";
1571
+ l = "Queued - waiting to be transcoded", h = "hourglass";
1548
1572
  break;
1549
1573
  case "waiting":
1550
- c = "Waiting for upload", u = "schedule";
1574
+ l = "Waiting for upload", h = "schedule";
1551
1575
  break;
1552
1576
  case "importing":
1553
- c = "Importing", u = "upload_file";
1577
+ l = "Importing", h = "upload_file";
1554
1578
  break;
1555
1579
  case "validating":
1556
- c = "Validating", u = "checklist";
1580
+ l = "Validating", h = "checklist";
1557
1581
  break;
1558
1582
  }
1559
- n && (l = !1, u = "error");
1560
- const h = t !== void 0 ? `- ${t}%` : "";
1561
- return /* @__PURE__ */ C(
1562
- At,
1583
+ n && (c = !1, h = "error");
1584
+ const v = t !== void 0 ? `- ${t}%` : "";
1585
+ return /* @__PURE__ */ N(
1586
+ Pt,
1563
1587
  {
1564
1588
  className: z({ finished: t === 100, error: !!n, [o]: !0 }),
1565
1589
  id: i,
1566
1590
  ...y,
1567
1591
  children: [
1568
- /* @__PURE__ */ C($t, { children: [
1592
+ /* @__PURE__ */ N(Ot, { children: [
1569
1593
  a && /* @__PURE__ */ g("img", { src: a }),
1570
- u && /* @__PURE__ */ g(R, { icon: u, className: z({ spinning: l }) })
1594
+ h && /* @__PURE__ */ g(U, { icon: h, className: z({ spinning: c }) })
1571
1595
  ] }),
1572
- /* @__PURE__ */ C("span", { className: "content", children: [
1596
+ /* @__PURE__ */ N("span", { className: "content", children: [
1573
1597
  /* @__PURE__ */ g("span", { className: "name", children: e }),
1574
- /* @__PURE__ */ g("span", { className: "message", children: n || `${c} ${h}` })
1598
+ /* @__PURE__ */ g("span", { className: "message", children: n || `${l} ${v}` })
1575
1599
  ] }),
1576
- r && /* @__PURE__ */ g("span", { className: "size", children: Ce(r) }),
1577
- s && /* @__PURE__ */ g(R, { icon: "info", className: "info", "data-tooltip": s, "data-tooltip-as": "markdown" }),
1578
- (n || o === "waiting") && /* @__PURE__ */ g(L, { icon: "close", variant: "text", onClick: b }),
1579
- /* @__PURE__ */ g(Nt, { className: "progress", style: { right: `${100 - (t ?? 0)}%` } })
1600
+ r && /* @__PURE__ */ g("span", { className: "size", children: Me(r) }),
1601
+ s && /* @__PURE__ */ g(U, { icon: "info", className: "info", "data-tooltip": s, "data-tooltip-as": "markdown" }),
1602
+ (n || o === "waiting") && /* @__PURE__ */ g(P, { icon: "close", variant: "text", onClick: f }),
1603
+ /* @__PURE__ */ g(Wt, { className: "progress", style: { right: `${100 - (t ?? 0)}%` } })
1580
1604
  ]
1581
1605
  },
1582
1606
  e
@@ -1589,15 +1613,15 @@ d.div`
1589
1613
  min-height: 100%;
1590
1614
  padding-bottom: var(--padding-m);
1591
1615
  `;
1592
- const qo = d.div`
1616
+ const sr = d.div`
1593
1617
  position: relative;
1594
1618
  overflow: hidden;
1595
1619
  border-radius: var(--border-radius-m);
1596
1620
  width: 100%;
1597
1621
  min-height: 50px;
1598
- `, Go = d.div`
1622
+ `, lr = d.div`
1599
1623
  word-break: break-all;
1600
- `, zt = d.div`
1624
+ `, It = d.div`
1601
1625
  display: flex;
1602
1626
  flex-direction: column;
1603
1627
  gap: var(--base-gap-small);
@@ -1614,7 +1638,7 @@ const qo = d.div`
1614
1638
  &.dragging {
1615
1639
  opacity: 0;
1616
1640
  }
1617
- `, Ut = d.div`
1641
+ `, Vt = d.div`
1618
1642
  position: relative;
1619
1643
  min-height: 50px;
1620
1644
  display: flex;
@@ -1643,7 +1667,7 @@ const qo = d.div`
1643
1667
  opacity: 0;
1644
1668
  cursor: pointer;
1645
1669
  }
1646
- `, Rt = d.div`
1670
+ `, Bt = d.div`
1647
1671
  position: absolute;
1648
1672
  inset: var(--padding-s);
1649
1673
  background-color: var(--md-sys-color-surface-container-lowest);
@@ -1665,7 +1689,7 @@ const qo = d.div`
1665
1689
  .icon {
1666
1690
  font-size: 32px;
1667
1691
  }
1668
- `, te = (e) => {
1692
+ `, oe = (e) => {
1669
1693
  if (de.isAxiosError(e)) {
1670
1694
  const t = e.response?.data;
1671
1695
  if (typeof t == "string" && t)
@@ -1678,7 +1702,7 @@ const qo = d.div`
1678
1702
  return e.message || e.response?.statusText || "Unknown upload error";
1679
1703
  }
1680
1704
  return e instanceof Error ? e.message : typeof e == "string" ? e : "Unknown upload error";
1681
- }, Lt = ({
1705
+ }, Ht = ({
1682
1706
  projectName: e,
1683
1707
  versionId: t,
1684
1708
  taskId: r,
@@ -1688,94 +1712,94 @@ const qo = d.div`
1688
1712
  onUpload: n,
1689
1713
  onProgress: s
1690
1714
  }) => {
1691
- const [b, y] = U({}), c = B(
1692
- (u) => {
1693
- t && y((h) => ({
1694
- ...h,
1695
- [t]: h[t]?.filter((m) => m.name !== u) || []
1715
+ const [f, y] = M({}), l = B(
1716
+ (h) => {
1717
+ t && y((v) => ({
1718
+ ...v,
1719
+ [t]: v[t]?.filter((u) => u.name !== h) || []
1696
1720
  }));
1697
1721
  },
1698
1722
  [t]
1699
1723
  );
1700
1724
  return {
1701
1725
  handleFileUpload: B(
1702
- async (u, h) => {
1703
- const m = h || t;
1704
- if (!m || !e) return;
1705
- const E = Array.from(u), f = E.map((v) => ({
1706
- name: M(v.name),
1707
- size: v.size,
1726
+ async (h, v) => {
1727
+ const u = v || t;
1728
+ if (!u || !e) return;
1729
+ const k = Array.from(h), b = k.map((w) => ({
1730
+ name: W(w.name),
1731
+ size: w.size,
1708
1732
  progress: 0
1709
- })), w = [...b[m] || [], ...f];
1710
- y({ ...b, [m]: w });
1711
- const p = (v) => (S) => {
1712
- if (!m) return;
1713
- console.log(`Upload successful for ${v.name}`);
1714
- const A = S.data;
1733
+ })), E = [...f[u] || [], ...b];
1734
+ y({ ...f, [u]: E });
1735
+ const m = (w) => (S) => {
1736
+ if (!u) return;
1737
+ console.log(`Upload successful for ${w.name}`);
1738
+ const F = S.data;
1715
1739
  e && (a(
1716
1740
  // @ts-ignore
1717
- We.util.updateQueryData(
1741
+ Qe.util.updateQueryData(
1718
1742
  "getReviewablesForVersion",
1719
- { projectName: e, versionId: m },
1720
- (F) => {
1721
- F.reviewables || (F.reviewables = []), F.reviewables.push(A);
1743
+ { projectName: e, versionId: u },
1744
+ (D) => {
1745
+ D.reviewables || (D.reviewables = []), D.reviewables.push(F);
1722
1746
  }
1723
1747
  )
1724
- ), i && a(O.util.invalidateTags([{ type: "viewer", id: i }])), a(O.util.invalidateTags([{ type: "viewer", id: m }])), o && a(O.util.invalidateTags([{ type: "viewer", id: o }])), r && a(O.util.invalidateTags([{ type: "viewer", id: r }])), c(M(v.name)));
1725
- }, T = (v) => (S) => {
1726
- m && (console.error(`Upload failed for ${v.name}: ${S}`), y((A) => {
1727
- const N = (A[m] || []).map((j) => j.name !== M(v.name) ? j : {
1728
- ...j,
1729
- error: te(S)
1748
+ ), i && a(I.util.invalidateTags([{ type: "viewer", id: i }])), a(I.util.invalidateTags([{ type: "viewer", id: u }])), o && a(I.util.invalidateTags([{ type: "viewer", id: o }])), r && a(I.util.invalidateTags([{ type: "viewer", id: r }])), l(W(w.name)));
1749
+ }, T = (w) => (S) => {
1750
+ u && (console.error(`Upload failed for ${w.name}: ${S}`), y((F) => {
1751
+ const $ = (F[u] || []).map((C) => C.name !== W(w.name) ? C : {
1752
+ ...C,
1753
+ error: oe(S)
1730
1754
  });
1731
1755
  return {
1732
- ...A,
1733
- [m]: N
1756
+ ...F,
1757
+ [u]: $
1734
1758
  };
1735
1759
  }));
1736
- }, D = (v) => m ? (S) => y((A) => {
1737
- const N = (A[m] || []).map((x) => x.name !== M(v.name) ? x : {
1760
+ }, j = (w) => u ? (S) => y((F) => {
1761
+ const $ = (F[u] || []).map((x) => x.name !== W(w.name) ? x : {
1738
1762
  ...x,
1739
1763
  progress: S.total ? Math.round(S.loaded / S.total * 100) : 0
1740
- }), j = N.reduce(
1741
- (x, k) => x + (k.progress || 0),
1764
+ }), C = $.reduce(
1765
+ (x, p) => x + (p.progress || 0),
1742
1766
  0
1743
- ), $ = Math.round(j / N.length);
1744
- return s?.($), {
1745
- ...A,
1746
- [m]: N
1767
+ ), R = Math.round(C / $.length);
1768
+ return s?.(R), {
1769
+ ...F,
1770
+ [u]: $
1747
1771
  };
1748
1772
  }) : () => {
1749
1773
  };
1750
1774
  try {
1751
- const v = E.map((S) => {
1752
- const A = M(S.name), F = A.split(".").slice(0, -1).join(".") || "unnamed", N = `/api/projects/${e}/versions/${m}/reviewables?label=${F}`, j = { "content-type": S.type, "x-file-name": A };
1753
- return de.post(N, S, { headers: j, onUploadProgress: D(S) }).then(p(S)).catch(($) => {
1754
- throw T(S)($), $;
1775
+ const w = k.map((S) => {
1776
+ const F = W(S.name), D = F.split(".").slice(0, -1).join(".") || "unnamed", $ = `/api/projects/${e}/versions/${u}/reviewables?label=${D}`, C = { "content-type": S.type, "x-file-name": F };
1777
+ return de.post($, S, { headers: C, onUploadProgress: j(S) }).then(m(S)).catch((R) => {
1778
+ throw T(S)(R), R;
1755
1779
  });
1756
1780
  });
1757
- await Promise.all(v), n && n();
1758
- } catch (v) {
1759
- throw console.error(v), H.error(`Failed to upload file/s: ${te(v)}`), v;
1781
+ await Promise.all(w), n && n();
1782
+ } catch (w) {
1783
+ throw console.error(w), Q.error(`Failed to upload file/s: ${oe(w)}`), w;
1760
1784
  }
1761
1785
  },
1762
1786
  [
1763
1787
  t,
1764
1788
  e,
1765
- b,
1789
+ f,
1766
1790
  a,
1767
1791
  i,
1768
1792
  o,
1769
1793
  r,
1770
- c,
1794
+ l,
1771
1795
  n,
1772
1796
  s
1773
1797
  ]
1774
1798
  ),
1775
- handleRemoveUpload: c,
1776
- uploading: b
1799
+ handleRemoveUpload: l,
1800
+ uploading: f
1777
1801
  };
1778
- }, Ko = ({
1802
+ }, cr = ({
1779
1803
  projectName: e,
1780
1804
  taskId: t,
1781
1805
  folderId: r,
@@ -1784,82 +1808,82 @@ const qo = d.div`
1784
1808
  onUpload: a,
1785
1809
  onFilesAdded: n,
1786
1810
  children: s,
1787
- dispatch: b,
1811
+ dispatch: f,
1788
1812
  variant: y = "normal",
1789
- pendingFiles: c = [],
1790
- setPendingFiles: l,
1791
- className: u,
1792
- readOnly: h = !1,
1793
- pt: m,
1794
- ...E
1813
+ pendingFiles: l = [],
1814
+ setPendingFiles: c,
1815
+ className: h,
1816
+ readOnly: v = !1,
1817
+ pt: u,
1818
+ ...k
1795
1819
  }) => {
1796
- const [f, w] = U(!1), {
1797
- handleFileUpload: p,
1820
+ const [b, E] = M(!1), {
1821
+ handleFileUpload: m,
1798
1822
  handleRemoveUpload: T,
1799
- uploading: D
1800
- } = Lt({
1823
+ uploading: j
1824
+ } = Ht({
1801
1825
  projectName: e,
1802
1826
  versionId: o,
1803
1827
  taskId: t,
1804
1828
  folderId: r,
1805
1829
  productId: i,
1806
- dispatch: b,
1830
+ dispatch: f,
1807
1831
  onUpload: a
1808
- }), v = !!o;
1809
- W(() => {
1810
- if (v && o && c.length > 0 && l) {
1811
- const x = c.map((k) => k.file);
1812
- c.forEach((k) => {
1813
- k.preview && URL.revokeObjectURL(k.preview);
1814
- }), l([]), p(x);
1832
+ }), w = !!o;
1833
+ O(() => {
1834
+ if (w && o && l.length > 0 && c) {
1835
+ const x = l.map((p) => p.file);
1836
+ l.forEach((p) => {
1837
+ p.preview && URL.revokeObjectURL(p.preview);
1838
+ }), c([]), m(x);
1815
1839
  }
1816
- }, [v, o, c.length, p, l]);
1817
- const S = (x) => x.type.startsWith("image/"), A = (x) => x.map((k) => ({
1818
- file: k,
1819
- preview: S(k) ? URL.createObjectURL(k) : void 0
1820
- })), F = async (x) => {
1821
- const k = Array.from(x);
1822
- if (n?.(k), !v || !o) {
1823
- l && l((V) => [...V, ...A(k)]);
1840
+ }, [w, o, l.length, m, c]);
1841
+ const S = (x) => x.type.startsWith("image/"), F = (x) => x.map((p) => ({
1842
+ file: p,
1843
+ preview: S(p) ? URL.createObjectURL(p) : void 0
1844
+ })), D = async (x) => {
1845
+ const p = Array.from(x);
1846
+ if (n?.(p), !w || !o) {
1847
+ c && c((A) => [...A, ...F(p)]);
1824
1848
  return;
1825
1849
  }
1826
- await p(x);
1827
- }, N = (x) => {
1828
- const k = x.target.files;
1829
- k && F(k);
1830
- }, j = (x) => {
1831
- x.preventDefault(), w(!1);
1832
- const k = x.dataTransfer.files;
1833
- k && F(k);
1834
- }, $ = y === "large" ? { minWidth: "360px", maxWidth: "480px", alignSelf: "center" } : {};
1835
- return /* @__PURE__ */ C(q, { children: [
1850
+ await m(x);
1851
+ }, $ = (x) => {
1852
+ const p = x.target.files;
1853
+ p && D(p);
1854
+ }, C = (x) => {
1855
+ x.preventDefault(), E(!1);
1856
+ const p = x.dataTransfer.files;
1857
+ p && D(p);
1858
+ }, R = y === "large" ? { minWidth: "360px", maxWidth: "480px", alignSelf: "center" } : {};
1859
+ return /* @__PURE__ */ N(G, { children: [
1836
1860
  /* @__PURE__ */ g(
1837
- zt,
1861
+ It,
1838
1862
  {
1839
- className: z(u, y, { dragging: f }),
1840
- ...E,
1841
- onDragEnter: () => !h && w(!0),
1863
+ className: z(h, y, { dragging: b }),
1864
+ ...k,
1865
+ onDragEnter: () => !v && E(!0),
1842
1866
  onDragOver: (x) => x.preventDefault(),
1843
1867
  onDrop: (x) => {
1844
- h && (x.preventDefault(), x.stopPropagation());
1868
+ v && (x.preventDefault(), x.stopPropagation());
1845
1869
  },
1846
- children: /* @__PURE__ */ C(q, { children: [
1870
+ children: /* @__PURE__ */ N(G, { children: [
1847
1871
  s,
1848
- !v && c?.map((x) => /* @__PURE__ */ g(
1849
- ee,
1872
+ !w && l?.map((x) => /* @__PURE__ */ g(
1873
+ te,
1850
1874
  {
1851
1875
  name: x.file.name,
1852
1876
  size: x.file.size,
1853
1877
  src: x.preview,
1854
1878
  type: "waiting",
1855
1879
  onRemove: () => {
1856
- l && l((k) => k.filter((V) => V.file.name !== x.file.name));
1880
+ c && c((p) => p.filter((A) => A.file.name !== x.file.name));
1857
1881
  }
1858
1882
  },
1859
1883
  x.file.name
1860
1884
  )),
1861
- o && D[o]?.map((x) => /* @__PURE__ */ g(
1862
- ee,
1885
+ o && j[o]?.map((x) => /* @__PURE__ */ g(
1886
+ te,
1863
1887
  {
1864
1888
  ...x,
1865
1889
  type: "upload",
@@ -1867,37 +1891,37 @@ const qo = d.div`
1867
1891
  },
1868
1892
  x.name
1869
1893
  )),
1870
- !h && /* @__PURE__ */ C(
1871
- Ut,
1894
+ !v && /* @__PURE__ */ N(
1895
+ Vt,
1872
1896
  {
1873
1897
  id: "upload",
1874
1898
  className: z("upload", y),
1875
- style: $,
1876
- ...m?.upload,
1899
+ style: R,
1900
+ ...u?.upload,
1877
1901
  children: [
1878
1902
  /* @__PURE__ */ g("span", { children: "Drop or click to upload" }),
1879
- /* @__PURE__ */ g("input", { type: "file", multiple: !0, onChange: N })
1903
+ /* @__PURE__ */ g("input", { type: "file", multiple: !0, onChange: $ })
1880
1904
  ]
1881
1905
  }
1882
1906
  )
1883
1907
  ] })
1884
1908
  }
1885
1909
  ),
1886
- f && !h && /* @__PURE__ */ C(
1887
- Rt,
1910
+ b && !v && /* @__PURE__ */ N(
1911
+ Bt,
1888
1912
  {
1889
1913
  onDragOver: (x) => x.preventDefault(),
1890
- onDragLeave: () => w(!1),
1891
- onDrop: j,
1892
- ...m?.dropzone,
1914
+ onDragLeave: () => E(!1),
1915
+ onDrop: C,
1916
+ ...u?.dropzone,
1893
1917
  children: [
1894
- /* @__PURE__ */ g(R, { icon: "upload" }),
1918
+ /* @__PURE__ */ g(U, { icon: "upload" }),
1895
1919
  /* @__PURE__ */ g("span", { children: "Upload reviewable" })
1896
1920
  ]
1897
1921
  }
1898
1922
  )
1899
1923
  ] });
1900
- }, Zo = d.div`
1924
+ }, dr = d.div`
1901
1925
  position: relative;
1902
1926
  border-radius: var(--border-radius-m);
1903
1927
  display: flex;
@@ -1912,9 +1936,9 @@ const qo = d.div`
1912
1936
  }
1913
1937
 
1914
1938
  flex: 1;
1915
- `, Jo = d.div`
1939
+ `, pr = d.div`
1916
1940
  position: relative;
1917
- `, Xo = d.span`
1941
+ `, ur = d.span`
1918
1942
  position: relative;
1919
1943
  padding: 0px 2px;
1920
1944
  border-radius: var(--border-radius-m);
@@ -1936,29 +1960,29 @@ const qo = d.div`
1936
1960
  color: var(--md-sys-color-on-surface);
1937
1961
  }
1938
1962
  }
1939
- `, Yo = d.span`
1963
+ `, mr = d.span`
1940
1964
  text-overflow: ellipsis;
1941
1965
  overflow: hidden;
1942
1966
  display: inline-block;
1943
1967
  white-space: nowrap;
1944
- `, oe = se`
1968
+ `, re = le`
1945
1969
  background-color: var(--md-sys-color-surface-container);
1946
1970
  &,
1947
1971
  .icon {
1948
1972
  color: var(--md-sys-color-on-surface);
1949
1973
  }
1950
- `, Mt = d.div`
1974
+ `, Qt = d.div`
1951
1975
  & > span,
1952
1976
  & > li {
1953
1977
  cursor: pointer;
1954
1978
  &:hover {
1955
- ${oe}
1979
+ ${re}
1956
1980
  }
1957
1981
  }
1958
1982
 
1959
1983
  &.open {
1960
1984
  & > span {
1961
- ${oe}
1985
+ ${re}
1962
1986
  }
1963
1987
  }
1964
1988
 
@@ -1970,7 +1994,7 @@ const qo = d.div`
1970
1994
  }
1971
1995
  }
1972
1996
  }
1973
- `, er = d.div`
1997
+ `, gr = d.div`
1974
1998
  position: absolute;
1975
1999
  top: 100%;
1976
2000
  left: 0px;
@@ -1979,7 +2003,7 @@ const qo = d.div`
1979
2003
 
1980
2004
  z-index: 200;
1981
2005
  padding-top: 4px;
1982
- `, tr = d.ul`
2006
+ `, hr = d.ul`
1983
2007
  display: flex;
1984
2008
  flex-direction: column;
1985
2009
  gap: var(--base-gap-small);
@@ -1994,46 +2018,46 @@ const qo = d.div`
1994
2018
 
1995
2019
  max-height: 500px;
1996
2020
  overflow: auto;
1997
- `, or = d.li`
2021
+ `, fr = d.li`
1998
2022
  padding: var(--base-gap-small);
1999
2023
  border-radius: var(--border-radius-m);
2000
2024
  color: var(--md-sys-color-on-surface);
2001
2025
  min-width: max-content;
2002
2026
  width: 100%;
2003
- `, rr = Q(
2027
+ `, vr = H(
2004
2028
  ({ children: e, segment: t, isOpen: r, scope: o, projectName: i, ...a }, n) => {
2005
- const { openSlideOut: s } = ce(), b = t?.type !== "product" && t?.type !== "project", y = () => {
2006
- if (!b) return;
2007
- const { type: h, id: m } = t || {};
2008
- !h || h === "project" || h === "product" || !m || s({
2009
- entityType: h,
2010
- entityId: m,
2029
+ const { openSlideOut: s } = q(), f = t?.type !== "product" && t?.type !== "project", y = () => {
2030
+ if (!f) return;
2031
+ const { type: v, id: u } = t || {};
2032
+ !v || v === "project" || v === "product" || !u || s({
2033
+ entityType: v,
2034
+ entityId: u,
2011
2035
  projectName: i
2012
2036
  });
2013
- }, c = (h) => [
2037
+ }, l = (v) => [
2014
2038
  {
2015
- label: `ID: ${h}`,
2039
+ label: `ID: ${v}`,
2016
2040
  icon: "content_copy",
2017
- command: () => _(h)
2041
+ command: () => _(v)
2018
2042
  }
2019
- ], [l] = Qe();
2043
+ ], [c] = ot();
2020
2044
  return /* @__PURE__ */ g(
2021
- Mt,
2045
+ Qt,
2022
2046
  {
2023
2047
  onClick: y,
2024
- onContextMenu: (h) => {
2048
+ onContextMenu: (v) => {
2025
2049
  if (!t) return;
2026
- const m = c(t.id);
2027
- l(h, m);
2050
+ const u = l(t.id);
2051
+ c(v, u);
2028
2052
  },
2029
- className: Ge({ link: b, open: r }),
2053
+ className: tt({ link: f, open: r }),
2030
2054
  ...a,
2031
2055
  ref: n,
2032
2056
  children: e
2033
2057
  }
2034
2058
  );
2035
2059
  }
2036
- ), Pt = d.div`
2060
+ ), _t = d.div`
2037
2061
  position: relative;
2038
2062
  width: 100%;
2039
2063
  height: 52px;
@@ -2123,7 +2147,7 @@ const qo = d.div`
2123
2147
  border: none;
2124
2148
  border-color: transparent;
2125
2149
  }
2126
- `, Wt = d.img`
2150
+ `, qt = d.img`
2127
2151
  width: 100%;
2128
2152
  height: 100%;
2129
2153
  object-fit: contain;
@@ -2135,7 +2159,7 @@ const qo = d.div`
2135
2159
  inset: 0;
2136
2160
 
2137
2161
  transition: scale 0.2s, opacity 0.2s;
2138
- `, Ot = ({
2162
+ `, Gt = ({
2139
2163
  projectName: e = "",
2140
2164
  entityType: t = "",
2141
2165
  entityId: r = "",
@@ -2144,54 +2168,54 @@ const qo = d.div`
2144
2168
  thumbnailHash: a,
2145
2169
  isLoading: n,
2146
2170
  shimmer: s,
2147
- className: b,
2171
+ className: f,
2148
2172
  disabled: y,
2149
- src: c,
2150
- hoverIcon: l,
2151
- showBorder: u = !0,
2152
- ...h
2173
+ src: l,
2174
+ hoverIcon: c,
2175
+ showBorder: h = !0,
2176
+ ...v
2153
2177
  }) => {
2154
- const m = t === "project", E = ["product"].includes(t), f = m ? !!e : !!r;
2155
- let w = "";
2156
- t && (a || m) && f && (c ? w = c : w = Ke({ projectName: e, entityType: t, entityId: r, thumbnailHash: a }) ?? "");
2157
- const [p, T] = U(!1), [D, v] = U(!1);
2158
- return W(() => {
2159
- if (w === "") {
2160
- v(!0), T(!0);
2178
+ const u = t === "project", k = ["product"].includes(t), b = u ? !!e : !!r;
2179
+ let E = "";
2180
+ t && (a || u) && b && (l ? E = l : E = rt({ projectName: e, entityType: t, entityId: r, thumbnailHash: a }) ?? "");
2181
+ const [m, T] = M(!1), [j, w] = M(!1);
2182
+ return O(() => {
2183
+ if (E === "") {
2184
+ w(!0), T(!0);
2161
2185
  return;
2162
2186
  }
2163
- v(!1), T(!1);
2164
- }, [w]), /* @__PURE__ */ C(
2165
- Pt,
2187
+ w(!1), T(!1);
2188
+ }, [E]), /* @__PURE__ */ N(
2189
+ _t,
2166
2190
  {
2167
- className: z(b, "thumbnail", {
2168
- loading: s && (n || !D),
2169
- loaded: D,
2170
- error: p,
2171
- clickable: !!h.onClick,
2172
- border: u
2191
+ className: z(f, "thumbnail", {
2192
+ loading: s && (n || !j),
2193
+ loaded: j,
2194
+ error: m,
2195
+ clickable: !!v.onClick,
2196
+ border: h
2173
2197
  }),
2174
- ...h,
2198
+ ...v,
2175
2199
  children: [
2176
- (!n || !D) && !y && /* @__PURE__ */ g(R, { style: { color: i || void 0 }, icon: o || "image", className: "type-icon" }),
2177
- t && e && !E && f && /* @__PURE__ */ g(
2178
- Wt,
2200
+ (!n || !j) && !y && /* @__PURE__ */ g(U, { style: { color: i || void 0 }, icon: o || "image", className: "type-icon" }),
2201
+ t && e && !k && b && /* @__PURE__ */ g(
2202
+ qt,
2179
2203
  {
2180
2204
  alt: `Entity thumbnail ${r || e}`,
2181
- src: w,
2205
+ src: E,
2182
2206
  onLoad: () => {
2183
- v(!0), T(!1);
2207
+ w(!0), T(!1);
2184
2208
  },
2185
2209
  onError: () => {
2186
- v(!0), T(!0);
2210
+ w(!0), T(!0);
2187
2211
  }
2188
2212
  }
2189
2213
  ),
2190
- l && /* @__PURE__ */ g(R, { icon: l, className: "hover-icon" })
2214
+ c && /* @__PURE__ */ g(U, { icon: c, className: "hover-icon" })
2191
2215
  ]
2192
2216
  }
2193
2217
  );
2194
- }, It = d.div`
2218
+ }, Kt = d.div`
2195
2219
  display: flex;
2196
2220
  z-index: 10;
2197
2221
  height: 100%;
@@ -2212,7 +2236,7 @@ const qo = d.div`
2212
2236
  font-size: 24px;
2213
2237
  }
2214
2238
 
2215
- ${({ $length: e }) => e > 1 && se`
2239
+ ${({ $length: e }) => e > 1 && le`
2216
2240
  :not(:last-child) {
2217
2241
  box-shadow: 0 0 4px 0px black;
2218
2242
  }
@@ -2228,75 +2252,76 @@ const qo = d.div`
2228
2252
  object-fit: cover;
2229
2253
  }
2230
2254
  }
2231
- `, ar = ({
2255
+ `, yr = ({
2232
2256
  thumbnails: e = [],
2233
2257
  isLoading: t,
2234
2258
  className: r,
2235
2259
  style: o,
2236
2260
  ...i
2237
2261
  }) => {
2238
- const { onContextMenu: a } = ke(Ve);
2262
+ const { onContextMenu: a } = ye(Ye);
2239
2263
  e = e.slice(0, 5);
2240
2264
  const n = e.length > 1;
2241
2265
  return e.length ? /* @__PURE__ */ g(
2242
- It,
2266
+ Kt,
2243
2267
  {
2244
2268
  $length: e.length,
2245
2269
  className: z("stacked-thumbnails", r, { stacking: n }),
2246
2270
  children: e.map(
2247
- (s, b) => s ? /* @__PURE__ */ g(
2248
- Ot,
2271
+ (s, f) => s ? /* @__PURE__ */ g(
2272
+ Gt,
2249
2273
  {
2250
2274
  projectName: s.projectName,
2251
2275
  entityType: s.type,
2252
2276
  entityId: s.id,
2253
2277
  icon: s.icon,
2254
2278
  color: s.color,
2255
- style: { ...o, zIndex: -b },
2279
+ style: { ...o, zIndex: -f },
2256
2280
  thumbnailHash: s.thumbnailHash,
2257
2281
  isLoading: t,
2258
2282
  src: s.src,
2259
2283
  onContextMenu: a,
2260
2284
  ...i
2261
2285
  },
2262
- s.id || s.src || b
2286
+ s.id || s.src || f
2263
2287
  ) : null
2264
2288
  )
2265
2289
  }
2266
2290
  ) : null;
2267
- }, nr = Q(
2291
+ }, br = H(
2268
2292
  ({ entities: e, entityType: t, onWatchersUpdate: r, userName: o, ...i }, a) => {
2269
- const n = e.map((l) => ({
2270
- entityId: l.id,
2293
+ const n = e.map((c) => ({
2294
+ entityId: c.id,
2271
2295
  entityType: t,
2272
- projectName: l.projectName
2273
- })), { data: s = [] } = Oe(
2296
+ projectName: c.projectName
2297
+ })), { data: s = [] } = _e(
2274
2298
  {
2275
2299
  entities: n
2276
2300
  },
2277
2301
  { skip: !e.length }
2278
- ), b = Array.from(new Set(s.flatMap((l) => l.watchers))), [y] = Ie();
2302
+ ), f = Array.from(new Set(s.flatMap((c) => c.watchers))), [y] = qe(), l = async (c) => {
2303
+ const h = c.filter((k) => !f.includes(k)), v = f.filter((k) => !c.includes(k)), u = s.map((k) => {
2304
+ const b = k.watchers.filter((E) => !v.includes(E));
2305
+ return b.push(...h), {
2306
+ ...k,
2307
+ watchers: b
2308
+ };
2309
+ });
2310
+ try {
2311
+ await y({ entities: u }).unwrap(), r && r(h, v);
2312
+ } catch {
2313
+ Q.error("Failed to update watchers");
2314
+ }
2315
+ };
2279
2316
  return /* @__PURE__ */ g(
2280
- Ae,
2317
+ Ue,
2281
2318
  {
2282
2319
  align: "right",
2283
2320
  ...i,
2284
- value: b,
2321
+ options: Fe(i.options, f),
2322
+ value: f,
2285
2323
  currentUser: o,
2286
- onChange: async (l) => {
2287
- const u = l.filter((E) => !b.includes(E)), h = b.filter((E) => !l.includes(E)), m = s.map((E) => {
2288
- const f = E.watchers.filter((w) => !h.includes(w));
2289
- return f.push(...u), {
2290
- ...E,
2291
- watchers: f
2292
- };
2293
- });
2294
- try {
2295
- await y({ entities: m }).unwrap(), r && r(u, h);
2296
- } catch {
2297
- H.error("Failed to update watchers");
2298
- }
2299
- },
2324
+ onChange: l,
2300
2325
  ref: a,
2301
2326
  buttonProps: { "data-tooltip": "Watchers" }
2302
2327
  }
@@ -2304,52 +2329,52 @@ const qo = d.div`
2304
2329
  }
2305
2330
  );
2306
2331
  export {
2307
- Ao as A,
2308
- Mo as B,
2309
- Bo as C,
2310
- Vo as D,
2311
- Ro as E,
2312
- Yo as F,
2313
- Fo as G,
2314
- Do as H,
2315
- Lo as I,
2316
- Po as J,
2317
- jo as K,
2318
- qo as L,
2319
- er as M,
2320
- zo as N,
2321
- Wo as O,
2322
- _o as P,
2323
- Uo as Q,
2324
- Qo as R,
2325
- Xo as S,
2326
- No as T,
2327
- Ho as U,
2328
- nr as W,
2329
- rt as a,
2330
- Eo as b,
2331
- nt as c,
2332
- it as d,
2333
- Go as e,
2334
- So as f,
2335
- Ko as g,
2336
- ee as h,
2337
- Lt as i,
2338
- Oo as j,
2339
- Io as k,
2340
- Zo as l,
2341
- tr as m,
2342
- rr as n,
2343
- or as o,
2344
- Jo as p,
2345
- gt as q,
2346
- ft as r,
2347
- To as s,
2332
+ Ho as A,
2333
+ Zo as B,
2334
+ rr as C,
2335
+ or as D,
2336
+ Ko as E,
2337
+ mr as F,
2338
+ Io as G,
2339
+ Oo as H,
2340
+ Yo as I,
2341
+ Jo as J,
2342
+ Vo as K,
2343
+ sr as L,
2344
+ gr as M,
2345
+ qo as N,
2346
+ Xo as O,
2347
+ nr as P,
2348
+ Go as Q,
2349
+ ir as R,
2350
+ ur as S,
2351
+ Qo as T,
2352
+ ar as U,
2353
+ br as W,
2354
+ pt as a,
2355
+ Lo as b,
2356
+ mt as c,
2357
+ gt as d,
2358
+ lr as e,
2359
+ Po as f,
2360
+ cr as g,
2361
+ te as h,
2362
+ Ht as i,
2363
+ er as j,
2364
+ tr as k,
2365
+ dr as l,
2366
+ hr as m,
2367
+ vr as n,
2368
+ fr as o,
2369
+ pr as p,
2370
+ kt as q,
2371
+ Tt as r,
2372
+ Wo as s,
2348
2373
  pe as t,
2349
- Xe as u,
2350
- kt as v,
2351
- ar as w,
2352
- Ot as x,
2353
- Co as y,
2354
- $o as z
2374
+ it as u,
2375
+ At as v,
2376
+ yr as w,
2377
+ Gt as x,
2378
+ Bo as y,
2379
+ _o as z
2355
2380
  };