@ynput/ayon-frontend-shared 0.5.0 → 0.6.0

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