@ynput/ayon-frontend-shared 0.6.5 → 0.6.7

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 (46) hide show
  1. package/dist/DetailsPanel.es.js +3 -3
  2. package/dist/NewEntity.es.js +15 -15
  3. package/dist/ProjectTreeTable.es.js +430 -433
  4. package/dist/Slicer.es.js +11 -11
  5. package/dist/Views.es.js +213 -206
  6. package/dist/chunks/CodeEditor.es.js +30 -0
  7. package/dist/chunks/ColumnDropIndicator.styled.es.js +24 -24
  8. package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
  9. package/dist/chunks/DeleteEntitiesContextInstance.es.js +103 -103
  10. package/dist/chunks/EntityPath.es.js +2 -2
  11. package/dist/chunks/EntityTooltip.es.js +1 -1
  12. package/dist/chunks/Feed.es.js +958 -931
  13. package/dist/chunks/JsonViewer.es.js +1 -1
  14. package/dist/chunks/Menu.es.js +169 -167
  15. package/dist/chunks/MenuItem.es.js +109 -74
  16. package/dist/chunks/MetaWidget.es.js +1537 -1516
  17. package/dist/chunks/PlayableIcon.es.js +127 -127
  18. package/dist/chunks/ReviewablesSelector.es.js +199 -196
  19. package/dist/chunks/SimpleForm.es.js +78 -75
  20. package/dist/chunks/SimpleTable.es.js +110 -110
  21. package/dist/chunks/Slicer.es.js +22 -22
  22. package/dist/chunks/TableSettingsFallback.es.js +1 -1
  23. package/dist/chunks/ThumbnailSimple.es.js +2 -2
  24. package/dist/chunks/VideoPlayer.es.js +1 -1
  25. package/dist/chunks/Watchers.es.js +19 -19
  26. package/dist/chunks/afterStartup.es.js +13 -0
  27. package/dist/chunks/getUris.es.js +926 -964
  28. package/dist/chunks/queryFilterToClientFilter.es.js +90 -81
  29. package/dist/chunks/searchTerms.es.js +1 -0
  30. package/dist/chunks/useHierarchySelection.es.js +2 -2
  31. package/dist/chunks/useLoadModule.es.js +24 -23
  32. package/dist/components.es.js +202 -200
  33. package/dist/context.es.js +521 -492
  34. package/dist/hooks.es.js +190 -166
  35. package/dist/types/ContextMenu.d.ts +1 -0
  36. package/dist/types/Feed.d.ts +1 -1
  37. package/dist/types/ProjectTreeTable.d.ts +4 -5
  38. package/dist/types/Slicer.d.ts +1 -1
  39. package/dist/types/Views.d.ts +13 -2
  40. package/dist/types/api.d.ts +203 -1175
  41. package/dist/types/components.d.ts +14 -3
  42. package/dist/types/context.d.ts +3 -2
  43. package/dist/types/hooks.d.ts +25 -1
  44. package/dist/types/util.d.ts +11 -1
  45. package/dist/util.es.js +44 -41
  46. package/package.json +2 -2
@@ -1,12 +1,12 @@
1
- import { ad as Zt, aL as Se, aF as L, ae as Ne, a5 as D, bj as Ss, az as Q, av as yt, be as F, a as Ps, bi as Ls, aH as js, aA as M, aq as ue, af as Pe, ag as Fs, ai as _s, aj as Rs, al as Gs, bd as Cs, an as Ns, aB as Qs, aD as Ms, b9 as es, aI as Vs, aK as Ds, aM as X, aO as Os, aP as at, aQ as $s, a9 as ce, ar as xs, ba as Us, bb as qs, aS as Bs } from "./searchTerms.es.js";
1
+ import { ad as es, aL as Se, aF as L, ae as Ne, a5 as D, bj as Ps, az as Q, av as yt, be as F, a as Ls, bi as js, aH as Fs, aA as M, aq as ue, af as Pe, ag as _s, ai as Rs, aj as Gs, al as Cs, bd as Ns, an as Qs, aB as Ms, aD as Vs, b9 as ts, aI as Ds, aK as Os, aM as X, aO as $s, aP as at, aQ as xs, a9 as ce, ar as Us, ba as Bs, bb as qs, aS as Hs } from "./searchTerms.es.js";
2
2
  import "lodash";
3
3
  import "primereact/confirmdialog";
4
- import { toast as ts } from "react-toastify";
5
- import { v4 as Hs } from "uuid";
6
- import { R as Ws, D as zs, j as H, c as U, i as pe, d as De, a as ie, w as J, h as He, g as ss } from "./realtimeUpdatesUtils.es.js";
7
- import "react";
8
- import { current as Ks } from "@reduxjs/toolkit";
9
- const Oe = Zt.injectEndpoints({
4
+ import { toast as ss } from "react-toastify";
5
+ import { v4 as Ws } from "uuid";
6
+ import { R as zs, D as Ks, j as H, c as U, i as pe, d as De, a as ie, w as J, h as He, g as ns } from "./realtimeUpdatesUtils.es.js";
7
+ import { useMemo as Js } from "react";
8
+ import { current as Ys } from "@reduxjs/toolkit";
9
+ const Oe = es.injectEndpoints({
10
10
  endpoints: (t) => ({
11
11
  getProjectsAccess: t.query({
12
12
  async queryFn({ projects: e = [] }, { dispatch: s, forced: n }) {
@@ -60,12 +60,12 @@ Oe.enhanceEndpoints({
60
60
  }
61
61
  });
62
62
  const {
63
- useGetStudioAccessGroupsQuery: Pr,
64
- useGetAccessGroupsQuery: Lr,
65
- useGetAccessGroupQuery: jr,
66
- useGetAccessGroupSchemaQuery: Fr,
67
- useGetProjectsAccessQuery: _r
68
- } = Oe, Js = Oe.enhanceEndpoints({
63
+ useGetStudioAccessGroupsQuery: Fr,
64
+ useGetAccessGroupsQuery: _r,
65
+ useGetAccessGroupQuery: Rr,
66
+ useGetAccessGroupSchemaQuery: Gr,
67
+ useGetProjectsAccessQuery: Cr
68
+ } = Oe, Xs = Oe.enhanceEndpoints({
69
69
  endpoints: {
70
70
  setProjectsAccess: {
71
71
  async onQueryStarted({ payload: t }, { dispatch: e, queryFulfilled: s }) {
@@ -117,15 +117,15 @@ const {
117
117
  }
118
118
  }
119
119
  }), {
120
- useSetProjectsAccessMutation: Rr,
121
- useSaveAccessGroupMutation: Gr,
122
- useDeleteAccessGroupMutation: Cr
123
- } = Js, Ys = Ne.enhanceEndpoints({
120
+ useSetProjectsAccessMutation: Nr,
121
+ useSaveAccessGroupMutation: Qr,
122
+ useDeleteAccessGroupMutation: Mr
123
+ } = Xs, Zs = Ne.enhanceEndpoints({
124
124
  endpoints: {
125
125
  executeAction: {},
126
126
  listAvailableActionsForContext: {}
127
127
  }
128
- }), Xs = Ys.injectEndpoints({
128
+ }), en = Zs.injectEndpoints({
129
129
  endpoints: (t) => ({
130
130
  getActionsFromContext: t.query({
131
131
  queryFn: async (e, { dispatch: s }) => {
@@ -157,30 +157,30 @@ const {
157
157
  // End of endpoints
158
158
  })
159
159
  }), {
160
- useGetActionsFromContextQuery: Nr,
161
- useLazyGetActionsFromContextQuery: Qr,
162
- useExecuteActionMutation: Mr,
163
- useGetActionConfigQuery: Vr,
164
- useSetActionConfigMutation: Dr
165
- } = Xs, Zs = (t, e) => e.split(".").reduce((s, n) => s && s[n] !== void 0 ? s[n] : void 0, t), en = (t, e) => {
160
+ useGetActionsFromContextQuery: Vr,
161
+ useLazyGetActionsFromContextQuery: Dr,
162
+ useExecuteActionMutation: Or,
163
+ useGetActionConfigQuery: $r,
164
+ useSetActionConfigMutation: xr
165
+ } = en, tn = (t, e) => e.split(".").reduce((s, n) => s && s[n] !== void 0 ? s[n] : void 0, t), sn = (t, e) => {
166
166
  const s = e.split("."), n = s.pop(), i = s.reduce((r, a) => r && r[a] !== void 0 ? r[a] : void 0, t);
167
167
  i && n && delete i[n];
168
168
  };
169
- function tn(t, e) {
169
+ function nn(t, e) {
170
170
  const s = { ...t };
171
171
  for (const [n, i] of Object.entries(e)) {
172
- const r = Zs(s, n);
173
- r !== void 0 && (s[i] = r, en(s, n));
172
+ const r = tn(s, n);
173
+ r !== void 0 && (s[i] = r, sn(s, n));
174
174
  }
175
175
  return s;
176
176
  }
177
- const bt = (t = [], e) => {
177
+ const It = (t = [], e) => {
178
178
  const s = [];
179
179
  return t.forEach((n) => {
180
180
  const i = n.node;
181
181
  if (!i)
182
182
  return;
183
- const r = i, c = tn(
183
+ const r = i, c = nn(
184
184
  r,
185
185
  {
186
186
  "author.name": "authorName",
@@ -196,7 +196,7 @@ const bt = (t = [], e) => {
196
196
  }
197
197
  s.push(c);
198
198
  }), { activities: s, pageInfo: e };
199
- }, sn = (t) => {
199
+ }, rn = (t) => {
200
200
  const {
201
201
  id: e,
202
202
  label: s,
@@ -223,7 +223,7 @@ const bt = (t = [], e) => {
223
223
  users: c?.map((p) => ({ name: p, avatarUrl: `/api/users/${p}/avatar` })) || [],
224
224
  path: o?.path.split("/").splice(-2, 1).join("")
225
225
  };
226
- }, nn = (t) => {
226
+ }, an = (t) => {
227
227
  const { id: e, name: s, status: n, thumbnailId: i, author: r, updatedAt: a, product: c } = t;
228
228
  return {
229
229
  id: e,
@@ -238,7 +238,7 @@ const bt = (t = [], e) => {
238
238
  productType: c?.productType,
239
239
  path: c?.folder?.path?.split("/").pop()
240
240
  };
241
- }, rn = (t) => {
241
+ }, on = (t) => {
242
242
  const { id: e, name: s, label: n, status: i, thumbnailId: r, thumbnailHash: a, updatedAt: c, folderType: d, parents: u } = t || {};
243
243
  return {
244
244
  id: e,
@@ -254,7 +254,7 @@ const bt = (t = [], e) => {
254
254
  users: [],
255
255
  path: u?.[u.length - 2]
256
256
  };
257
- }, an = (t) => {
257
+ }, cn = (t) => {
258
258
  const { id: e, name: s, status: n, thumbnailId: i, thumbnailHash: r, updatedAt: a, task: c } = t || {};
259
259
  return {
260
260
  id: e,
@@ -270,20 +270,20 @@ const bt = (t = [], e) => {
270
270
  users: [],
271
271
  path: c?.folder?.path?.split("/").pop()
272
272
  };
273
- }, on = (t, e) => {
273
+ }, dn = (t, e) => {
274
274
  switch (e) {
275
275
  case "task":
276
- return sn(t.task);
276
+ return rn(t.task);
277
277
  case "version":
278
- return nn(t.version);
278
+ return an(t.version);
279
279
  case "folder":
280
- return rn(t.folder);
280
+ return on(t.folder);
281
281
  case "workfile":
282
- return an(t.workfile);
282
+ return cn(t.workfile);
283
283
  default:
284
284
  return {};
285
285
  }
286
- }, cn = (t) => {
286
+ }, un = (t) => {
287
287
  const e = t?.project?.activities?.edges?.map((a) => a?.node), s = e.map((a) => a.body), n = e.map((a) => a.activityId), i = s.reduce((a, c) => {
288
288
  if (!c) return a;
289
289
  const d = c.match(/\*\s\[\s\]/g);
@@ -294,21 +294,21 @@ const bt = (t = [], e) => {
294
294
  return a + (d ? d.length : 0);
295
295
  }, 0);
296
296
  return { total: i + r, checked: r, unChecked: i, ids: n };
297
- }, dn = (t, e = "task", s = "task") => t?.length ? [
297
+ }, ln = (t, e = "task", s = "task") => t?.length ? [
298
298
  ...t.map(({ id: n }) => ({ type: e, id: n })),
299
299
  { type: e, id: s.toUpperCase() + "S" },
300
300
  {
301
301
  type: `kanBan${s.charAt(0).toUpperCase() + s.slice(1)}`,
302
302
  id: s.toUpperCase() + "S"
303
303
  }
304
- ] : [{ type: e, id: s.toUpperCase() + "S" }], ns = (t) => {
304
+ ] : [{ type: e, id: s.toUpperCase() + "S" }], is = (t) => {
305
305
  if (typeof t == "string") return t;
306
306
  try {
307
307
  return JSON.stringify(t) ?? "";
308
308
  } catch {
309
309
  return "";
310
310
  }
311
- }, is = (t, e, s) => {
311
+ }, rs = (t, e, s) => {
312
312
  if (!t)
313
313
  return [{ type: "activity", id: "LIST" }];
314
314
  const { entityIds: n, activityTypes: i, filter: r } = s, a = (o) => (Array.isArray(o) ? o : [o]).filter(Boolean), c = a(n), d = a(i), u = t.pages ? t.pages.flatMap((o) => o.activities) : t.activities || [];
@@ -324,7 +324,7 @@ const bt = (t = [], e) => {
324
324
  // Filtered Entity Activity Tags
325
325
  ...c.map((o) => ({
326
326
  type: "entityActivities",
327
- id: `${o}-${ns(r)}`
327
+ id: `${o}-${is(r)}`
328
328
  })),
329
329
  // Published Version Tags
330
330
  ...u.filter((o) => o.activityType === "version.publish").map((o) => ({
@@ -355,7 +355,7 @@ const bt = (t = [], e) => {
355
355
  "subtype.change"
356
356
  ],
357
357
  checklists: ["checklist"]
358
- }, Or = (t) => {
358
+ }, Ur = (t) => {
359
359
  if (typeof t == "string")
360
360
  return t in se ? se[t] : null;
361
361
  if (t && typeof t == "object" && t.conditions) {
@@ -366,7 +366,7 @@ const bt = (t = [], e) => {
366
366
  }), s ? Array.from(new Set(e)) : se.activity;
367
367
  }
368
368
  return se.activity;
369
- }, un = (t) => {
369
+ }, pn = (t) => {
370
370
  switch (t) {
371
371
  case "task":
372
372
  return `
@@ -410,7 +410,7 @@ const bt = (t = [], e) => {
410
410
  default:
411
411
  return "";
412
412
  }
413
- }, ln = (t) => `
413
+ }, fn = (t) => `
414
414
  query EntityTooltip($projectName: String!, $entityId: String!) {
415
415
  project(name: $projectName) {
416
416
  ${t}(id: $entityId) {
@@ -420,15 +420,15 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
420
420
  thumbnailId
421
421
  updatedAt
422
422
  thumbnailHash
423
- ${un(t)}
423
+ ${pn(t)}
424
424
  }
425
425
  }
426
426
  }
427
- `, pn = (t) => t.replace(/_([a-z0-9])/g, (e, s) => s.toUpperCase()), It = {
427
+ `, yn = (t) => t.replace(/_([a-z0-9])/g, (e, s) => s.toUpperCase()), Tt = {
428
428
  task_type: "subType",
429
429
  folder_type: "subType",
430
430
  product_type: "subType"
431
- }, fe = (t) => t in It ? It[t] : t.startsWith("project_attributes_") ? "attrib_" + t.slice(19) : t.startsWith("inherited_attributes_") ? "attrib_" + t.slice(21) : t.startsWith("attrib_") ? t : pn(t), fn = (t) => {
431
+ }, fe = (t) => t in Tt ? Tt[t] : t.startsWith("project_attributes_") ? "attrib_" + t.slice(19) : t.startsWith("inherited_attributes_") ? "attrib_" + t.slice(21) : t.startsWith("attrib_") ? t : yn(t), gn = (t) => {
432
432
  if (Array.isArray(t)) return t;
433
433
  if (typeof t == "string") {
434
434
  const e = t.trim();
@@ -440,7 +440,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
440
440
  }
441
441
  }
442
442
  return [t];
443
- }, yn = (t) => {
443
+ }, hn = (t) => {
444
444
  if (t == null) return;
445
445
  let e = t;
446
446
  if (typeof e == "string")
@@ -453,7 +453,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
453
453
  const s = /* @__PURE__ */ new Map();
454
454
  for (const n of e) {
455
455
  if (!n || n.value == null) continue;
456
- const i = fn(n.value);
456
+ const i = gn(n.value);
457
457
  for (const r of i) {
458
458
  const a = String(r), c = s.get(a);
459
459
  s.set(a, { ...n, value: a, count: (c?.count ?? 0) + (Number(n.count) || 0) });
@@ -466,7 +466,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
466
466
  value: s,
467
467
  count: Number(n) || 0
468
468
  }));
469
- }, ge = (t, e) => t == null && e == null ? void 0 : (t ?? 0) + (e ?? 0), gn = (t, e) => t == null ? e ?? void 0 : e == null || t < e ? t : e, hn = (t, e) => t == null ? e ?? void 0 : e == null || t > e ? t : e, Le = (t, e) => t != null && e != null && t + e > 0 ? Math.round(t / (t + e) * 1e4) / 100 : void 0, mn = (t, e) => {
469
+ }, ge = (t, e) => t == null && e == null ? void 0 : (t ?? 0) + (e ?? 0), mn = (t, e) => t == null ? e ?? void 0 : e == null || t < e ? t : e, vn = (t, e) => t == null ? e ?? void 0 : e == null || t > e ? t : e, Le = (t, e) => t != null && e != null && t + e > 0 ? Math.round(t / (t + e) * 1e4) / 100 : void 0, bn = (t, e) => {
470
470
  const s = ge(t.valueFilledCount, e.valueFilledCount), n = ge(t.valueNotFilledCount, e.valueNotFilledCount), i = ge(t.checkedCount, e.checkedCount), r = ge(t.notCheckedCount, e.notCheckedCount);
471
471
  let a;
472
472
  if (t.avg != null && e.avg != null) {
@@ -485,8 +485,8 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
485
485
  }
486
486
  return {
487
487
  columnName: t.columnName,
488
- min: gn(t.min, e.min),
489
- max: hn(t.max, e.max),
488
+ min: mn(t.min, e.min),
489
+ max: vn(t.max, e.max),
490
490
  avg: a,
491
491
  sum: ge(t.sum, e.sum),
492
492
  valueFilledCount: s,
@@ -504,8 +504,8 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
504
504
  }, ke = (t) => t.map((e) => ({
505
505
  ...e,
506
506
  columnName: fe(e.columnName),
507
- distribution: yn(e.distribution)
508
- })), Ae = (t = [], e = []) => {
507
+ distribution: hn(e.distribution)
508
+ })), we = (t = [], e = []) => {
509
509
  const s = /* @__PURE__ */ new Map();
510
510
  for (const n of e) s.set(fe(n.columnName), { ...n });
511
511
  for (const n of t) {
@@ -515,20 +515,20 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
515
515
  s.set(i, r);
516
516
  }
517
517
  return [...s.values()];
518
- }, $r = (t) => t.reduce(
518
+ }, Br = (t) => t.reduce(
519
519
  (e, s) => Math.max(e, (s.valueFilledCount ?? 0) + (s.valueNotFilledCount ?? 0)),
520
520
  0
521
- ), xr = (t, e = []) => {
521
+ ), qr = (t, e = []) => {
522
522
  const s = /* @__PURE__ */ new Map();
523
523
  for (const i of t) s.set(fe(i.columnName), i);
524
524
  const n = new Map(s);
525
525
  for (const i of e) {
526
526
  const r = fe(i.columnName), a = s.get(r);
527
- n.set(r, a ? mn(a, i) : i);
527
+ n.set(r, a ? bn(a, i) : i);
528
528
  }
529
529
  return [...n.values()];
530
- }, rs = [Ws, zs], as = (t, e, s) => {
531
- if (rs.includes(e))
530
+ }, as = [zs, Ks], os = (t, e, s) => {
531
+ if (as.includes(e))
532
532
  return !0;
533
533
  if (t[e] !== void 0 && t[e] !== null)
534
534
  return t[e];
@@ -551,32 +551,32 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
551
551
  return s[r];
552
552
  }
553
553
  return !1;
554
- }, Ur = (t, e) => e.filter(
555
- (n) => !rs.includes(n) && t[n]
554
+ }, Hr = (t, e) => e.filter(
555
+ (n) => !as.includes(n) && t[n]
556
556
  ).length === 0 && e.includes("name") ? {
557
557
  ...t,
558
558
  name: !0
559
- } : t, Tt = (t) => {
559
+ } : t, kt = (t) => {
560
560
  const e = t?.targets;
561
561
  return Array.isArray(e) ? e : e ? [e] : [];
562
562
  }, ot = (t, e, s) => {
563
563
  const n = e?.[t], i = s?.[t];
564
564
  return n === "none" || i === "none" ? !1 : n != null || i != null;
565
- }, vn = (t, e, s, n) => {
565
+ }, In = (t, e, s, n) => {
566
566
  const i = /* @__PURE__ */ new Set([
567
567
  ...Object.keys(t ?? {}),
568
568
  ...Object.keys(e ?? {})
569
569
  ]);
570
570
  for (const r of i)
571
- if (!(s && !as(s, r, n)) && ot(r, t, e))
571
+ if (!(s && !os(s, r, n)) && ot(r, t, e))
572
572
  return !0;
573
573
  return !1;
574
- }, qr = (t, e, s, n) => e?.name === "none" && !vn(t, e, s, n), we = (t, e) => {
574
+ }, Wr = (t, e, s, n) => e?.name === "none" && !In(t, e, s, n), Ae = (t, e) => {
575
575
  if (!t) return !1;
576
576
  if (!e) return !0;
577
- const s = new Set(Tt(e).map((n) => n.field));
578
- return Tt(t).some((n) => !s.has(n.field));
579
- }, We = [D.Filled, D.NotFilled], bn = [
577
+ const s = new Set(kt(e).map((n) => n.field));
578
+ return kt(t).some((n) => !s.has(n.field));
579
+ }, We = [D.Filled, D.NotFilled], Tn = [
580
580
  D.Min,
581
581
  D.Max,
582
582
  D.Avg,
@@ -587,12 +587,12 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
587
587
  D.Filled,
588
588
  D.NotFilled,
589
589
  D.Distribution
590
- ], In = {
590
+ ], kn = {
591
591
  folder: "folder_type",
592
592
  task: "task_type",
593
593
  product: "product_type",
594
594
  version: null
595
- }, Br = ({
595
+ }, zr = ({
596
596
  entity: t,
597
597
  attribs: e,
598
598
  columnVisibility: s,
@@ -601,9 +601,9 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
601
601
  columnSummaryScopes: r,
602
602
  extraFields: a = []
603
603
  }) => {
604
- const c = (y) => as(s, y, n), d = (y) => c(y) && ot(y, i, r), u = [];
604
+ const c = (y) => os(s, y, n), d = (y) => c(y) && ot(y, i, r), u = [];
605
605
  t === "version" ? u.push({ field: "status", aggregations: d("status") ? Y : We }) : (u.push({ field: "name", aggregations: We }), d("status") && u.push({ field: "status", aggregations: Y })), d("tags") && u.push({ field: "tags", aggregations: Y }), t === "task" && d("assignees") && u.push({ field: "assignees", aggregations: Y });
606
- const o = r?.name ?? "all", l = ["folder", "product"].includes(t) ? o === "all" || o === "primary" : o === "all" || o === "secondary", p = i?.name === "breakdown" && ot("name", i, r) && l, f = In[t];
606
+ const o = r?.name ?? "all", l = ["folder", "product"].includes(t) ? o === "all" || o === "primary" : o === "all" || o === "secondary", p = i?.name === "breakdown" && ot("name", i, r) && l, f = kn[t];
607
607
  f && (d("subType") || p) && u.push({ field: f, aggregations: Y });
608
608
  for (const y of a)
609
609
  u.push({ field: y, aggregations: Y });
@@ -612,38 +612,38 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
612
612
  let h = `attrib.${y.name}`;
613
613
  ["folder", "task"].includes(t) && (h = `inherited_attributes.${y.name}`);
614
614
  const g = y.data?.type;
615
- g === "integer" || g === "float" ? u.push({ field: h, aggregations: bn }) : g === "string" ? u.push({ field: h, aggregations: Ss(y.data) ? Y : We }) : (g === "list_of_strings" || g === "list_of_integers") && u.push({ field: h, aggregations: Y });
615
+ g === "integer" || g === "float" ? u.push({ field: h, aggregations: Tn }) : g === "string" ? u.push({ field: h, aggregations: Ps(y.data) ? Y : We }) : (g === "list_of_strings" || g === "list_of_integers") && u.push({ field: h, aggregations: Y });
616
616
  }
617
617
  return u;
618
- }, kt = [
618
+ }, wt = [
619
619
  D.Distribution,
620
620
  D.Filled,
621
621
  D.NotFilled
622
- ], Tn = {
622
+ ], wn = {
623
623
  status: "status",
624
624
  assignees: "assignees",
625
625
  tags: "tags",
626
626
  taskType: "task_type"
627
- }, kn = {
627
+ }, An = {
628
628
  status: "status",
629
629
  tags: "tags",
630
630
  author: "author",
631
631
  productType: "product_type"
632
- }, Hr = (t, e) => {
633
- const n = (e === "version" || e === "product" ? kn : Tn)[t.id];
634
- if (n) return { field: n, aggregations: kt };
632
+ }, Kr = (t, e) => {
633
+ const n = (e === "version" || e === "product" ? An : wn)[t.id];
634
+ if (n) return { field: n, aggregations: wt };
635
635
  if (t.id.startsWith("attrib.")) {
636
636
  const i = t.id.slice(7);
637
- return { field: e === "task" || e === "folder" ? `inherited_attributes.${i}` : `attrib.${i}`, aggregations: kt };
637
+ return { field: e === "task" || e === "folder" ? `inherited_attributes.${i}` : `attrib.${i}`, aggregations: wt };
638
638
  }
639
639
  return null;
640
- }, An = (t) => {
640
+ }, En = (t) => {
641
641
  const e = t.indexOf(".");
642
642
  return e !== -1 ? "attrib_" + t.slice(e + 1) : fe(t);
643
- }, Wr = (t, e) => {
643
+ }, Jr = (t, e) => {
644
644
  const s = /* @__PURE__ */ new Map(), n = { count: 0, percentage: 0 };
645
645
  if (!e) return { counts: s, total: 0, ungrouped: n, complete: !1 };
646
- const i = An(e.field), r = t.find((f) => f.columnName === i), a = r?.distribution || [], c = r?.valueNotFilledCount ?? 0, d = r?.valueFilledCount ?? 0, u = !!r && (a.length > 0 || d === 0), o = a.reduce((f, y) => f + (y.count || 0), 0), l = d ? d + c : o + c;
646
+ const i = En(e.field), r = t.find((f) => f.columnName === i), a = r?.distribution || [], c = r?.valueNotFilledCount ?? 0, d = r?.valueFilledCount ?? 0, u = !!r && (a.length > 0 || d === 0), o = a.reduce((f, y) => f + (y.count || 0), 0), l = d ? d + c : o + c;
647
647
  for (const f of a) {
648
648
  const y = f.count || 0, h = l > 0 ? Math.round(y / l * 100) : 0;
649
649
  s.set(String(f.value), { count: y, percentage: h });
@@ -661,7 +661,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
661
661
  } catch {
662
662
  return {};
663
663
  }
664
- }, zr = R, At = (t) => {
664
+ }, Yr = R, At = (t) => {
665
665
  if (!t.project)
666
666
  return [];
667
667
  const e = [];
@@ -713,27 +713,27 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
713
713
  GetFolderColumnStats: {
714
714
  transformResponse: (t) => ke(t?.project?.folders?.fieldStats ?? []),
715
715
  serializeQueryArgs: ({ queryArgs: { targets: t, ...e } }) => e,
716
- merge: (t, e) => Ae(e, t),
717
- forceRefetch: ({ currentArg: t, previousArg: e }) => we(t, e),
716
+ merge: (t, e) => we(e, t),
717
+ forceRefetch: ({ currentArg: t, previousArg: e }) => Ae(t, e),
718
718
  providesTags: (t, e, { projectName: s }) => [{ type: "folderColumnStats", id: s }],
719
719
  keepUnusedDataFor: Z
720
720
  },
721
721
  GetTaskColumnStats: {
722
722
  transformResponse: (t) => ke(t?.project?.tasks?.fieldStats ?? []),
723
723
  serializeQueryArgs: ({ queryArgs: { targets: t, ...e } }) => e,
724
- merge: (t, e) => Ae(e, t),
725
- forceRefetch: ({ currentArg: t, previousArg: e }) => we(t, e),
724
+ merge: (t, e) => we(e, t),
725
+ forceRefetch: ({ currentArg: t, previousArg: e }) => Ae(t, e),
726
726
  providesTags: (t, e, { projectName: s }) => [{ type: "taskColumnStats", id: s }],
727
727
  keepUnusedDataFor: Z
728
728
  }
729
729
  }
730
- }), wn = yt.enhanceEndpoints({
730
+ }), Sn = yt.enhanceEndpoints({
731
731
  endpoints: {
732
732
  searchFolders: {}
733
733
  }
734
- }), ze = 100, be = {}, Ke = (t, e, s, n, i) => JSON.stringify({ projectName: t, filter: e, folderFilter: s, search: n, showComments: i }), En = (t, e) => {
734
+ }), ze = 100, be = {}, Ke = (t, e, s, n, i) => JSON.stringify({ projectName: t, filter: e, folderFilter: s, search: n, showComments: i }), Pn = (t, e) => {
735
735
  be[t] || (be[t] = /* @__PURE__ */ new Set()), e.forEach((s) => be[t].add(s));
736
- }, wt = (t) => be[t] || /* @__PURE__ */ new Set(), x = re.injectEndpoints({
736
+ }, Et = (t) => be[t] || /* @__PURE__ */ new Set(), x = re.injectEndpoints({
737
737
  endpoints: (t) => ({
738
738
  // Each project has one cache for all the tasks of the expanded folders
739
739
  // Changing the expanded folders will trigger a refetch but not a new cache
@@ -745,7 +745,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
745
745
  try {
746
746
  const o = d(), l = { projectName: e, filter: n, folderFilter: i, search: r, showComments: a }, f = x.endpoints.getOverviewTasksByFolders.select(
747
747
  l
748
- )(o)?.data || [], y = Ke(e, n, i, r, a), h = wt(y), g = u ? s : s.filter((E) => !h.has(E));
748
+ )(o)?.data || [], y = Ke(e, n, i, r, a), h = Et(y), g = u ? s : s.filter((E) => !h.has(E));
749
749
  if (g.length === 0)
750
750
  return { data: f };
751
751
  const m = [], v = 100, b = 20, I = 10, k = 1e3, T = v * b;
@@ -783,10 +783,10 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
783
783
  S = C?.hasNextPage || !1, j = C?.endCursor || void 0;
784
784
  }
785
785
  }
786
- En(y, g);
787
- const A = [...f, ...m], w = new Map(A.map((E) => [E.id, E]));
786
+ Pn(y, g);
787
+ const w = [...f, ...m], A = new Map(w.map((E) => [E.id, E]));
788
788
  return {
789
- data: Array.from(w.values())
789
+ data: Array.from(A.values())
790
790
  };
791
791
  } catch (o) {
792
792
  return console.error(o), { error: L(o) };
@@ -805,17 +805,17 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
805
805
  let p;
806
806
  const y = U(
807
807
  async (m, v) => {
808
- const b = wt(
808
+ const b = Et(
809
809
  Ke(e, n, i, r, a)
810
810
  ), I = new Set(
811
- l().data?.map((w) => w.id) || []
811
+ l().data?.map((A) => A.id) || []
812
812
  ), k = /* @__PURE__ */ new Set(), T = [];
813
- m.filter((w) => w.project === e).filter((w) => b.has(w.summary?.parentId)).forEach((w) => {
814
- const E = w.summary?.entityId;
813
+ m.filter((A) => A.project === e).filter((A) => b.has(A.summary?.parentId)).forEach((A) => {
814
+ const E = A.summary?.entityId;
815
815
  if (!E || !I.has(E)) return;
816
- const P = w.topic?.split(".")[2]?.replace("_changed", ""), S = pe(
816
+ const P = A.topic?.split(".")[2]?.replace("_changed", ""), S = pe(
817
817
  P,
818
- w.summary,
818
+ A.summary,
819
819
  De
820
820
  );
821
821
  S ? T.push({
@@ -823,21 +823,21 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
823
823
  field: S.field,
824
824
  value: S.value
825
825
  }) : k.add(E);
826
- }), T.length && u((w) => {
826
+ }), T.length && u((A) => {
827
827
  T.forEach(({ taskId: E, field: P, value: S }) => {
828
- const j = w.find((_) => _.id === E);
828
+ const j = A.find((_) => _.id === E);
829
829
  j && Object.assign(j, { [P === "type" ? "taskType" : P]: S });
830
830
  });
831
831
  });
832
- const A = Array.from(k);
833
- if (!(!A.length || A.length > ie))
832
+ const w = Array.from(k);
833
+ if (!(!w.length || w.length > ie))
834
834
  try {
835
835
  await J();
836
836
  const E = (await o(
837
837
  re.endpoints.GetTasksList.initiate(
838
838
  {
839
839
  projectName: e,
840
- taskIds: A,
840
+ taskIds: w,
841
841
  showComments: !!a
842
842
  },
843
843
  { forceRefetch: !0 }
@@ -850,14 +850,14 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
850
850
  const _ = S.findIndex((G) => G.id === j.id);
851
851
  _ > -1 ? S[_] = j : S.push(j);
852
852
  }
853
- for (const j of A)
853
+ for (const j of w)
854
854
  if (!P.has(j)) {
855
855
  const _ = S.findIndex((G) => G.id === j);
856
856
  _ > -1 && S.splice(_, 1);
857
857
  }
858
858
  });
859
- } catch (w) {
860
- console.error("Realtime overview batch update failed", w);
859
+ } catch (A) {
860
+ console.error("Realtime overview batch update failed", A);
861
861
  }
862
862
  },
863
863
  (m) => `${m.project ?? e}:${m.summary?.entityId}:${m.topic}`
@@ -896,7 +896,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
896
896
  async queryFn({ projectName: e, folderSearchRequest: s }, { dispatch: n }) {
897
897
  try {
898
898
  const i = await n(
899
- wn.endpoints.searchFolders.initiate({
899
+ Sn.endpoints.searchFolders.initiate({
900
900
  projectName: e,
901
901
  folderSearchRequest: s
902
902
  })
@@ -994,7 +994,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
994
994
  }), h.length && i((m) => {
995
995
  h.forEach(({ taskId: v, field: b, value: I }) => {
996
996
  for (const k of m.pages) {
997
- const T = k.tasks.find((A) => A.id === v);
997
+ const T = k.tasks.find((w) => w.id === v);
998
998
  if (T) {
999
999
  Object.assign(T, { [b === "type" ? "taskType" : b]: I });
1000
1000
  break;
@@ -1022,10 +1022,10 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
1022
1022
  i((I) => {
1023
1023
  for (const k of v) {
1024
1024
  let T = !1;
1025
- for (const A of I.pages) {
1026
- const w = A.tasks.findIndex((E) => E.id === k.id);
1027
- if (w !== -1) {
1028
- A.tasks[w] = k, T = !0;
1025
+ for (const w of I.pages) {
1026
+ const A = w.tasks.findIndex((E) => E.id === k.id);
1027
+ if (A !== -1) {
1028
+ w.tasks[A] = k, T = !0;
1029
1029
  break;
1030
1030
  }
1031
1031
  }
@@ -1042,9 +1042,9 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
1042
1042
  for (const k of g)
1043
1043
  if (!b.has(k))
1044
1044
  for (const T of I.pages) {
1045
- const A = T.tasks.findIndex((w) => w.id === k);
1046
- if (A !== -1) {
1047
- T.tasks.splice(A, 1);
1045
+ const w = T.tasks.findIndex((A) => A.id === k);
1046
+ if (w !== -1) {
1047
+ T.tasks.splice(w, 1);
1048
1048
  break;
1049
1049
  }
1050
1050
  }
@@ -1104,10 +1104,10 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
1104
1104
  let m = h.filter, v = i;
1105
1105
  if (h.filter)
1106
1106
  try {
1107
- const k = JSON.parse(h.filter), T = k.conditions || [], A = T.filter((E) => !p.has(E.key)), w = T.filter((E) => p.has(E.key));
1108
- if (w.length > 0) {
1109
- m = A.length ? JSON.stringify({ ...k, conditions: A }) : void 0;
1110
- const E = i ? JSON.parse(i) : null, S = [...E && Array.isArray(E.conditions) ? E.conditions : [], ...w];
1107
+ const k = JSON.parse(h.filter), T = k.conditions || [], w = T.filter((E) => !p.has(E.key)), A = T.filter((E) => p.has(E.key));
1108
+ if (A.length > 0) {
1109
+ m = w.length ? JSON.stringify({ ...k, conditions: w }) : void 0;
1110
+ const E = i ? JSON.parse(i) : null, S = [...E && Array.isArray(E.conditions) ? E.conditions : [], ...A];
1111
1111
  v = JSON.stringify(
1112
1112
  E ? { ...E, conditions: S } : { conditions: S }
1113
1113
  );
@@ -1160,15 +1160,15 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
1160
1160
  })
1161
1161
  })
1162
1162
  }), {
1163
- useGetOverviewTasksByFoldersQuery: Kr,
1164
- useGetSearchFoldersQuery: Jr,
1165
- useGetTasksListQuery: Yr,
1166
- useGetTasksListInfiniteInfiniteQuery: Xr,
1167
- useLazyGetTasksByParentQuery: Zr,
1168
- useGetGroupedTasksListQuery: ea,
1169
- useGetFolderColumnStatsQuery: ta,
1170
- useGetTaskColumnStatsQuery: sa
1171
- } = x, Sn = Q.enhanceEndpoints({
1163
+ useGetOverviewTasksByFoldersQuery: Xr,
1164
+ useGetSearchFoldersQuery: Zr,
1165
+ useGetTasksListQuery: ea,
1166
+ useGetTasksListInfiniteInfiniteQuery: ta,
1167
+ useLazyGetTasksByParentQuery: sa,
1168
+ useGetGroupedTasksListQuery: na,
1169
+ useGetFolderColumnStatsQuery: ia,
1170
+ useGetTaskColumnStatsQuery: ra
1171
+ } = x, Ln = Q.enhanceEndpoints({
1172
1172
  endpoints: {
1173
1173
  GetUpdatedAndNewFolders: {
1174
1174
  transformResponse: (t) => t.project.folders.edges.map(({ node: e }) => ({
@@ -1183,7 +1183,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
1183
1183
  }))
1184
1184
  }
1185
1185
  }
1186
- }), Pn = ie, $e = yt.enhanceEndpoints({
1186
+ }), jn = ie, $e = yt.enhanceEndpoints({
1187
1187
  endpoints: {
1188
1188
  getFolderHierarchy: {
1189
1189
  providesTags: ["hierarchy"]
@@ -1207,64 +1207,64 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
1207
1207
  async (y, h) => {
1208
1208
  if (!a) return;
1209
1209
  const g = /* @__PURE__ */ new Set(), m = i().data;
1210
- m && Array.isArray(m.folders) && m.folders.forEach((A) => g.add(A.id));
1210
+ m && Array.isArray(m.folders) && m.folders.forEach((w) => g.add(w.id));
1211
1211
  const v = [], b = [], I = /* @__PURE__ */ new Map(), k = [];
1212
- y.forEach((A) => {
1213
- const w = A.summary?.entityId;
1214
- if (!w) return;
1215
- if (A.topic === "entity.folder.deleted") {
1216
- v.push(w);
1212
+ y.forEach((w) => {
1213
+ const A = w.summary?.entityId;
1214
+ if (!A) return;
1215
+ if (w.topic === "entity.folder.deleted") {
1216
+ v.push(A);
1217
1217
  return;
1218
1218
  }
1219
- if (A.topic === "entity.folder.created") {
1220
- b.push(w);
1219
+ if (w.topic === "entity.folder.created") {
1220
+ b.push(A);
1221
1221
  return;
1222
1222
  }
1223
- if (!g.has(w)) return;
1223
+ if (!g.has(A)) return;
1224
1224
  const E = pe(
1225
- d[A.topic],
1226
- A.summary,
1225
+ d[w.topic],
1226
+ w.summary,
1227
1227
  c
1228
1228
  );
1229
- if (E) k.push({ folderId: w, ...E });
1229
+ if (E) k.push({ folderId: A, ...E });
1230
1230
  else {
1231
- const P = d[A.topic];
1231
+ const P = d[w.topic];
1232
1232
  if (!P) return;
1233
- const S = I.get(w) || /* @__PURE__ */ new Set();
1234
- S.add(P), I.set(w, S);
1233
+ const S = I.get(A) || /* @__PURE__ */ new Set();
1234
+ S.add(P), I.set(A, S);
1235
1235
  }
1236
- }), v.length && n((A) => {
1237
- !A || !Array.isArray(A.folders) || (A.folders = A.folders.filter((w) => !v.includes(w.id)));
1238
- }), k.length && n((A) => {
1239
- !A || !Array.isArray(A.folders) || k.forEach(({ folderId: w, field: E, value: P }) => {
1240
- const S = A.folders.find((j) => j.id === w);
1236
+ }), v.length && n((w) => {
1237
+ !w || !Array.isArray(w.folders) || (w.folders = w.folders.filter((A) => !v.includes(A.id)));
1238
+ }), k.length && n((w) => {
1239
+ !w || !Array.isArray(w.folders) || k.forEach(({ folderId: A, field: E, value: P }) => {
1240
+ const S = w.folders.find((j) => j.id === A);
1241
1241
  S && (S[E] = P);
1242
1242
  });
1243
1243
  });
1244
1244
  const T = [.../* @__PURE__ */ new Set([...b, ...I.keys()])];
1245
- if (!(T.length > Pn) && T.length) {
1245
+ if (!(T.length > jn) && T.length) {
1246
1246
  await J();
1247
- const A = await r(
1248
- Sn.endpoints.GetUpdatedAndNewFolders.initiate({
1247
+ const w = await r(
1248
+ Ln.endpoints.GetUpdatedAndNewFolders.initiate({
1249
1249
  projectName: a,
1250
1250
  folderIds: T,
1251
1251
  first: T.length
1252
1252
  })
1253
1253
  ).unwrap().catch(() => []);
1254
1254
  if (!h()) return;
1255
- const w = new Set(b);
1255
+ const A = new Set(b);
1256
1256
  n((E) => {
1257
1257
  if (!E || !Array.isArray(E.folders)) return;
1258
1258
  const P = new Map(
1259
- A.filter(Boolean).map((S) => [S.id, S])
1259
+ w.filter(Boolean).map((S) => [S.id, S])
1260
1260
  );
1261
1261
  E.folders.forEach((S, j) => {
1262
1262
  const _ = P.get(S.id);
1263
- _ && (w.has(S.id) ? E.folders[j] = { ...S, ..._ } : (I.get(S.id) || /* @__PURE__ */ new Set()).forEach((O) => {
1263
+ _ && (A.has(S.id) ? E.folders[j] = { ...S, ..._ } : (I.get(S.id) || /* @__PURE__ */ new Set()).forEach((O) => {
1264
1264
  S[O] = _[O];
1265
1265
  }), P.delete(S.id));
1266
1266
  }), P.forEach((S, j) => {
1267
- w.has(j) && E.folders.push(S);
1267
+ A.has(j) && E.folders.push(S);
1268
1268
  });
1269
1269
  });
1270
1270
  }
@@ -1298,7 +1298,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
1298
1298
  }
1299
1299
  }
1300
1300
  }
1301
- }), { useGetFolderHierarchyQuery: na, useGetFolderListQuery: ia } = $e, Ln = Q.enhanceEndpoints({
1301
+ }), { useGetFolderHierarchyQuery: aa, useGetFolderListQuery: oa } = $e, Fn = Q.enhanceEndpoints({
1302
1302
  endpoints: {
1303
1303
  GetFolderDeleteInfo: {
1304
1304
  transformResponse: (t) => (t?.project?.folders?.edges || []).map((s) => ({
@@ -1316,7 +1316,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
1316
1316
  ] : [{ type: "folder", id: "DELETE_INFO" }]
1317
1317
  }
1318
1318
  }
1319
- }), { useGetFolderDeleteInfoQuery: ra, useLazyGetFolderDeleteInfoQuery: aa } = Ln, jn = ["task", "version", "folder", "representation"], je = ({
1319
+ }), { useGetFolderDeleteInfoQuery: ca, useLazyGetFolderDeleteInfoQuery: da } = Fn, _n = ["task", "version", "folder", "representation"], je = ({
1320
1320
  entity: t,
1321
1321
  entityType: e,
1322
1322
  projectName: s
@@ -1492,7 +1492,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
1492
1492
  }
1493
1493
  }
1494
1494
  }
1495
- }), Et = (t) => {
1495
+ }), St = (t) => {
1496
1496
  switch (t) {
1497
1497
  case "task":
1498
1498
  return "GetDetailsPanelTask";
@@ -1507,11 +1507,11 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
1507
1507
  endpoints: (t) => ({
1508
1508
  getEntitiesDetailsPanel: t.query({
1509
1509
  async queryFn({ entities: e = [], entityType: s }, { dispatch: n }) {
1510
- if (!jn.includes(s))
1510
+ if (!_n.includes(s))
1511
1511
  return { error: L("Entity type not supported", 400) };
1512
1512
  try {
1513
1513
  const i = e.map((c) => n(
1514
- Je.endpoints[Et(s)].initiate(
1514
+ Je.endpoints[St(s)].initiate(
1515
1515
  {
1516
1516
  projectName: c.projectName,
1517
1517
  entityId: c.id
@@ -1534,10 +1534,10 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
1534
1534
  l.forEach(({ topic: b, message: I }) => {
1535
1535
  const k = I.summary?.entityId, T = I.project;
1536
1536
  if (!k || !T) return;
1537
- const A = `${T}:${k}`;
1538
- if (!y.has(A)) return;
1539
- const w = b.split(".")[2]?.replace("_changed", ""), E = pe(
1540
- w,
1537
+ const w = `${T}:${k}`;
1538
+ if (!y.has(w)) return;
1539
+ const A = b.split(".")[2]?.replace("_changed", ""), E = pe(
1540
+ A,
1541
1541
  I.summary,
1542
1542
  De
1543
1543
  );
@@ -1546,16 +1546,16 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
1546
1546
  projectName: T,
1547
1547
  field: E.field,
1548
1548
  value: E.value
1549
- }) : h.set(A, { id: k, projectName: T });
1549
+ }) : h.set(w, { id: k, projectName: T });
1550
1550
  }), g.length && s((b) => {
1551
- g.forEach(({ id: I, projectName: k, field: T, value: A }) => {
1552
- const w = b.find(
1551
+ g.forEach(({ id: I, projectName: k, field: T, value: w }) => {
1552
+ const A = b.find(
1553
1553
  (E) => E.id === I && E.projectName === k
1554
1554
  );
1555
- w && (Object.assign(w, {
1556
- ...T === "status" || T === "tags" ? { [T]: A } : {},
1557
- ...T === "type" ? { entitySubType: A } : {}
1558
- }), T === "assignees" && w.task && (w.task.assignees = A), T === "type" && w.task && (w.task.taskType = A));
1555
+ A && (Object.assign(A, {
1556
+ ...T === "status" || T === "tags" ? { [T]: w } : {},
1557
+ ...T === "type" ? { entitySubType: w } : {}
1558
+ }), T === "assignees" && A.task && (A.task.assignees = w), T === "type" && A.task && (A.task.taskType = w));
1559
1559
  });
1560
1560
  });
1561
1561
  const m = Array.from(h.values());
@@ -1566,7 +1566,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
1566
1566
  m.map(async (b) => {
1567
1567
  try {
1568
1568
  const I = await r(
1569
- Je.endpoints[Et(e)].initiate(
1569
+ Je.endpoints[St(e)].initiate(
1570
1570
  {
1571
1571
  projectName: b.projectName,
1572
1572
  entityId: b.id
@@ -1633,7 +1633,7 @@ query EntityTooltip($projectName: String!, $entityId: String!) {
1633
1633
  ]
1634
1634
  })
1635
1635
  })
1636
- }), { useGetEntitiesDetailsPanelQuery: oa, useLazyGetEntitiesDetailsPanelQuery: ca } = de, Fn = `
1636
+ }), { useGetEntitiesDetailsPanelQuery: ua, useLazyGetEntitiesDetailsPanelQuery: la } = de, Rn = `
1637
1637
  fragment taskTileFragment on TaskNode {
1638
1638
  id
1639
1639
  name
@@ -1650,7 +1650,7 @@ fragment taskTileFragment on TaskNode {
1650
1650
  path
1651
1651
  }
1652
1652
  }
1653
- `, _n = `
1653
+ `, Gn = `
1654
1654
  fragment versionTileFragment on VersionNode {
1655
1655
  id
1656
1656
  name: product {
@@ -1674,7 +1674,7 @@ fragment versionTileFragment on VersionNode {
1674
1674
  }
1675
1675
  version
1676
1676
  }
1677
- `, Rn = `
1677
+ `, Cn = `
1678
1678
  fragment productTileFragment on ProductNode {
1679
1679
  id
1680
1680
  name
@@ -1690,7 +1690,7 @@ fragment productTileFragment on ProductNode {
1690
1690
  path
1691
1691
  }
1692
1692
  }
1693
- `, Gn = `
1693
+ `, Nn = `
1694
1694
  fragment folderTileFragment on FolderNode {
1695
1695
  id
1696
1696
  name
@@ -1703,7 +1703,7 @@ fragment folderTileFragment on FolderNode {
1703
1703
  path: parent {
1704
1704
  path
1705
1705
  }
1706
- }`, Cn = (t) => `
1706
+ }`, Qn = (t) => `
1707
1707
  query EventTile($projectName: String!, $id: String!) {
1708
1708
  project(name: $projectName) {
1709
1709
  ${t}(id: $id) {
@@ -1714,7 +1714,7 @@ fragment folderTileFragment on FolderNode {
1714
1714
  }
1715
1715
  }
1716
1716
  }
1717
- `, Nn = (t) => {
1717
+ `, Mn = (t) => {
1718
1718
  let s = `
1719
1719
  query EntityTiles($projectName: String!) {
1720
1720
  project(name: $projectName) {
@@ -1733,23 +1733,23 @@ fragment folderTileFragment on FolderNode {
1733
1733
  }
1734
1734
  `;
1735
1735
  const n = {
1736
- folder: Gn,
1737
- product: Rn,
1738
- version: _n,
1739
- task: Fn
1736
+ folder: Nn,
1737
+ product: Cn,
1738
+ version: Gn,
1739
+ task: Rn
1740
1740
  };
1741
1741
  for (const i in t)
1742
1742
  s += n[i];
1743
1743
  return s;
1744
1744
  };
1745
- function os(t) {
1745
+ function cs(t) {
1746
1746
  if (typeof t != "object" || t === null)
1747
1747
  return t;
1748
1748
  let e = Object.keys(t);
1749
1749
  if (e.length > 0)
1750
- return os(t[e[0]]);
1750
+ return cs(t[e[0]]);
1751
1751
  }
1752
- const Qn = (t, e) => {
1752
+ const Vn = (t, e) => {
1753
1753
  if (Array.isArray(e)) {
1754
1754
  const n = {};
1755
1755
  for (const i of e)
@@ -1764,18 +1764,18 @@ const Qn = (t, e) => {
1764
1764
  }
1765
1765
  for (const n of s) {
1766
1766
  for (const i in n)
1767
- n[i] && (Array.isArray(n[i]) ? n[i] = n[i][0] : typeof n[i] == "object" && (n[i] = os(Object.values(n[i])[0])), n.type === "version" && i === "version" && (n[i] = "v" + n[i].toString().padStart(3, "0")));
1767
+ n[i] && (Array.isArray(n[i]) ? n[i] = n[i][0] : typeof n[i] == "object" && (n[i] = cs(Object.values(n[i])[0])), n.type === "version" && i === "version" && (n[i] = "v" + n[i].toString().padStart(3, "0")));
1768
1768
  n.thumbnailEntityType = n.type, n.type === "product" && (n.thumbnailEntityId = n.latestVersion.thumbnailEntityId, n.thumbnailId = n.latestVersion.thumbnailId, n.thumbnailEntityType = "version");
1769
1769
  }
1770
1770
  return s;
1771
- }, Mn = Q.injectEndpoints({
1771
+ }, Dn = Q.injectEndpoints({
1772
1772
  endpoints: (t) => ({
1773
1773
  getEventTile: t.query({
1774
1774
  query: ({ projectName: e, id: s, type: n }) => ({
1775
1775
  url: "/graphql",
1776
1776
  method: "POST",
1777
1777
  body: {
1778
- query: Cn(n),
1778
+ query: Qn(n),
1779
1779
  variables: { projectName: e, id: s }
1780
1780
  }
1781
1781
  }),
@@ -1786,11 +1786,11 @@ const Qn = (t, e) => {
1786
1786
  url: "/graphql",
1787
1787
  method: "POST",
1788
1788
  body: {
1789
- query: Nn(s),
1789
+ query: Mn(s),
1790
1790
  variables: { projectName: e }
1791
1791
  }
1792
1792
  }),
1793
- transformResponse: (e, s, { entities: n }) => Qn(e.data?.project, n)
1793
+ transformResponse: (e, s, { entities: n }) => Vn(e.data?.project, n)
1794
1794
  }),
1795
1795
  getEntity: t.query({
1796
1796
  query: ({ projectName: e, entityType: s, entityId: n }) => ({
@@ -1800,17 +1800,17 @@ const Qn = (t, e) => {
1800
1800
  })
1801
1801
  }),
1802
1802
  overrideExisting: !0
1803
- }), me = Mn.enhanceEndpoints({
1803
+ }), me = Dn.enhanceEndpoints({
1804
1804
  endpoints: {
1805
1805
  GetProductVersions: {}
1806
1806
  }
1807
1807
  }), {
1808
- useGetEventTileQuery: da,
1809
- useGetEntityTilesQuery: ua,
1810
- useGetEntityQuery: la,
1811
- useLazyGetEntityQuery: pa,
1812
- useGetProductVersionsQuery: fa,
1813
- useGetSearchedEntitiesInfiniteQuery: ya
1808
+ useGetEventTileQuery: pa,
1809
+ useGetEntityTilesQuery: fa,
1810
+ useGetEntityQuery: ya,
1811
+ useLazyGetEntityQuery: ga,
1812
+ useGetProductVersionsQuery: ha,
1813
+ useGetSearchedEntitiesInfiniteQuery: ma
1814
1814
  } = me, ee = Se.enhanceEndpoints({
1815
1815
  endpoints: {
1816
1816
  getProject: {
@@ -1828,7 +1828,7 @@ const Qn = (t, e) => {
1828
1828
  providesTags: (t, e, { projectName: s }) => [{ type: "project", id: s }]
1829
1829
  }
1830
1830
  }
1831
- }), { useGetProjectQuery: ga, useListProjectsQuery: ha, useGetProjectAnatomyQuery: ma } = ee, St = 2e3, Pt = Q.enhanceEndpoints({
1831
+ }), { useGetProjectQuery: va, useListProjectsQuery: ba, useGetProjectAnatomyQuery: Ia } = ee, Pt = 2e3, Lt = Q.enhanceEndpoints({
1832
1832
  endpoints: {
1833
1833
  GetProjects: {
1834
1834
  transformResponse: (t) => ({
@@ -1840,17 +1840,17 @@ const Qn = (t, e) => {
1840
1840
  })
1841
1841
  }
1842
1842
  }
1843
- }), gt = Pt.injectEndpoints({
1843
+ }), gt = Lt.injectEndpoints({
1844
1844
  endpoints: (t) => ({
1845
1845
  getProjectsInfinite: t.infiniteQuery({
1846
1846
  infiniteQueryOptions: {
1847
- initialPageParam: { cursor: "", first: St },
1847
+ initialPageParam: { cursor: "", first: Pt },
1848
1848
  getNextPageParam: (e) => {
1849
1849
  const { pageInfo: s } = e;
1850
1850
  if (!(!s.hasNextPage || !s.endCursor))
1851
1851
  return {
1852
1852
  cursor: s.endCursor,
1853
- first: St
1853
+ first: Pt
1854
1854
  };
1855
1855
  }
1856
1856
  },
@@ -1861,7 +1861,7 @@ const Qn = (t, e) => {
1861
1861
  after: s?.cursor || void 0,
1862
1862
  first: s?.first
1863
1863
  }, r = await n.dispatch(
1864
- Pt.endpoints.GetProjects.initiate(i, { forceRefetch: !0 })
1864
+ Lt.endpoints.GetProjects.initiate(i, { forceRefetch: !0 })
1865
1865
  );
1866
1866
  if (r.error) throw r.error;
1867
1867
  return {
@@ -1889,7 +1889,7 @@ const Qn = (t, e) => {
1889
1889
  })
1890
1890
  }),
1891
1891
  overrideExisting: !0
1892
- }), { useGetProjectsInfiniteInfiniteQuery: va } = gt, Ye = (t, e) => {
1892
+ }), { useGetProjectsInfiniteInfiniteQuery: Ta } = gt, Ye = (t, e) => {
1893
1893
  for (const [s, n] of Object.entries(e)) {
1894
1894
  if (s === "attrib" && n && typeof n == "object" && !Array.isArray(n)) {
1895
1895
  t.attrib = {
@@ -1900,7 +1900,7 @@ const Qn = (t, e) => {
1900
1900
  }
1901
1901
  t[s] = n;
1902
1902
  }
1903
- }, Vn = ee.enhanceEndpoints({
1903
+ }, On = ee.enhanceEndpoints({
1904
1904
  endpoints: {
1905
1905
  deployProject: {
1906
1906
  invalidatesTags: () => [
@@ -1968,21 +1968,21 @@ const Qn = (t, e) => {
1968
1968
  }
1969
1969
  }
1970
1970
  }), {
1971
- useDeployProjectMutation: ba,
1972
- useDeleteProjectMutation: Ia,
1973
- useSetProjectAnatomyMutation: Ta,
1974
- useUpdateProjectMutation: ka,
1975
- useSetProjectBundleMutation: Aa
1976
- } = Vn, Dn = (t) => {
1971
+ useDeployProjectMutation: ka,
1972
+ useDeleteProjectMutation: wa,
1973
+ useSetProjectAnatomyMutation: Aa,
1974
+ useUpdateProjectMutation: Ea,
1975
+ useSetProjectBundleMutation: Sa
1976
+ } = On, $n = (t) => {
1977
1977
  try {
1978
1978
  return JSON.parse(t);
1979
1979
  } catch {
1980
1980
  return {};
1981
1981
  }
1982
- }, On = (t) => Object.keys(t), Lt = (t) => t.kanban.edges.map(({ node: e }) => e).sort((e, s) => {
1982
+ }, xn = (t) => Object.keys(t), jt = (t) => t.kanban.edges.map(({ node: e }) => e).sort((e, s) => {
1983
1983
  const n = e.label || e.name, i = s.label || s.name;
1984
1984
  return n.localeCompare(i);
1985
- }), jt = (t, e, s) => t?.length ? [
1985
+ }), Ft = (t, e, s) => t?.length ? [
1986
1986
  { type: "kanBanTask", id: "LIST" },
1987
1987
  ...t.flatMap(({ id: n, projectName: i, assignees: r = [] }) => [
1988
1988
  { type: "task", id: n },
@@ -1994,7 +1994,7 @@ const Qn = (t, e) => {
1994
1994
  })),
1995
1995
  { type: "kanban", id: JSON.stringify(s) }
1996
1996
  ])
1997
- ] : [{ type: "kanBanTask", id: "LIST" }], cs = async ({
1997
+ ] : [{ type: "kanBanTask", id: "LIST" }], ds = async ({
1998
1998
  projects: t = [],
1999
1999
  taskIds: e = []
2000
2000
  }, s) => {
@@ -2015,41 +2015,41 @@ const Qn = (t, e) => {
2015
2015
  }, ht = Q.enhanceEndpoints({
2016
2016
  endpoints: {
2017
2017
  GetKanban: {
2018
- transformResponse: Lt,
2019
- providesTags: jt,
2018
+ transformResponse: jt,
2019
+ providesTags: Ft,
2020
2020
  async onCacheEntryAdded(t = {}, { updateCachedData: e, cacheDataLoaded: s, cacheEntryRemoved: n, dispatch: i, getCacheEntry: r }) {
2021
2021
  let a, c;
2022
2022
  const u = U(
2023
2023
  async (o, l) => {
2024
2024
  const p = Array.isArray(t?.projects) ? t.projects : [], f = Array.isArray(t?.assignees) ? t.assignees : [], y = r().data ?? [], h = new Set(y.map((T) => `${T.projectName}:${T.id}`)), g = /* @__PURE__ */ new Map(), m = [];
2025
- o.forEach(({ topic: T, message: A }) => {
2026
- const w = A.project;
2027
- if (!w || !p.includes(w)) return;
2028
- const E = A.summary?.entityId;
2025
+ o.forEach(({ topic: T, message: w }) => {
2026
+ const A = w.project;
2027
+ if (!A || !p.includes(A)) return;
2028
+ const E = w.summary?.entityId;
2029
2029
  if (!E) return;
2030
2030
  const P = T.split(".")[2]?.replace("_changed", ""), S = pe(
2031
2031
  P,
2032
- A.summary,
2032
+ w.summary,
2033
2033
  De
2034
2034
  );
2035
2035
  if (!S) return;
2036
- const j = `${w}:${E}`, _ = h.has(j), G = S.value, O = S.field === "assignees" && G.some(($) => f.includes($));
2036
+ const j = `${A}:${E}`, _ = h.has(j), G = S.value, O = S.field === "assignees" && G.some(($) => f.includes($));
2037
2037
  if (!(!_ && !O)) {
2038
2038
  if (!_) {
2039
- g.set(j, { taskId: E, project: w });
2039
+ g.set(j, { taskId: E, project: A });
2040
2040
  return;
2041
2041
  }
2042
2042
  m.push({
2043
2043
  taskId: E,
2044
- project: w,
2044
+ project: A,
2045
2045
  field: S.field,
2046
2046
  value: S.value
2047
2047
  });
2048
2048
  }
2049
2049
  }), m.length && e((T) => {
2050
- m.forEach(({ taskId: A, project: w, field: E, value: P }) => {
2050
+ m.forEach(({ taskId: w, project: A, field: E, value: P }) => {
2051
2051
  const S = T.find(
2052
- (j) => j.id === A && j.projectName === w
2052
+ (j) => j.id === w && j.projectName === A
2053
2053
  );
2054
2054
  if (S && (Object.assign(S, { [E === "type" ? "taskType" : E]: P }), E === "assignees" && f.length > 0 && !P.some((j) => f.includes(j)))) {
2055
2055
  const j = T.indexOf(S);
@@ -2060,7 +2060,7 @@ const Qn = (t, e) => {
2060
2060
  const v = Array.from(g.values());
2061
2061
  if (!v.length || v.length > ie) return;
2062
2062
  await J();
2063
- const b = await cs(
2063
+ const b = await ds(
2064
2064
  {
2065
2065
  projects: [...new Set(v.map(({ project: T }) => T))],
2066
2066
  taskIds: [...new Set(v.map(({ taskId: T }) => T))]
@@ -2069,17 +2069,17 @@ const Qn = (t, e) => {
2069
2069
  );
2070
2070
  if (!l()) return;
2071
2071
  const I = b.filter(
2072
- (T) => !f.length || (T.assignees ?? []).some((A) => f.includes(A))
2072
+ (T) => !f.length || (T.assignees ?? []).some((w) => f.includes(w))
2073
2073
  ), k = b.filter(
2074
- (T) => f.length > 0 && !(T.assignees ?? []).some((A) => f.includes(A))
2074
+ (T) => f.length > 0 && !(T.assignees ?? []).some((w) => f.includes(w))
2075
2075
  );
2076
2076
  e((T) => {
2077
- I.forEach((A) => {
2078
- const w = T.findIndex((E) => E.id === A.id);
2079
- w === -1 ? T.push(A) : T[w] = A;
2080
- }), k.forEach((A) => {
2081
- const w = T.findIndex((E) => E.id === A.id);
2082
- w !== -1 && T.splice(w, 1);
2077
+ I.forEach((w) => {
2078
+ const A = T.findIndex((E) => E.id === w.id);
2079
+ A === -1 ? T.push(w) : T[A] = w;
2080
+ }), k.forEach((w) => {
2081
+ const A = T.findIndex((E) => E.id === w.id);
2082
+ A !== -1 && T.splice(A, 1);
2083
2083
  });
2084
2084
  });
2085
2085
  },
@@ -2126,14 +2126,14 @@ const Qn = (t, e) => {
2126
2126
  // same query as GetKanban but for specific tasks
2127
2127
  // used mainly for patching tasks into the kanban cache
2128
2128
  GetKanbanTasks: {
2129
- transformResponse: Lt,
2130
- providesTags: jt
2129
+ transformResponse: jt,
2130
+ providesTags: Ft
2131
2131
  },
2132
2132
  // get all users on all selected projects
2133
2133
  GetKanbanProjectUsers: {
2134
2134
  transformResponse: (t, e, { projects: s } = {}) => t.users.edges.map(({ node: n }) => {
2135
- const i = Dn(n.accessGroups);
2136
- let a = !n.isManager && !n.isAdmin ? On(i) : s;
2135
+ const i = $n(n.accessGroups);
2136
+ let a = !n.isManager && !n.isAdmin ? xn(i) : s;
2137
2137
  (typeof a == "string" || !a) && (a = []);
2138
2138
  const c = `/api/users/${n.name}/avatar`;
2139
2139
  return {
@@ -2149,7 +2149,7 @@ const Qn = (t, e) => {
2149
2149
  ] : [{ type: "user", id: "LIST" }]
2150
2150
  }
2151
2151
  }
2152
- }), { useGetKanbanQuery: wa, useGetKanbanProjectUsersQuery: Ea } = ht, Ie = ht.injectEndpoints({
2152
+ }), { useGetKanbanQuery: Pa, useGetKanbanProjectUsersQuery: La } = ht, Ie = ht.injectEndpoints({
2153
2153
  endpoints: (t) => ({
2154
2154
  getProjectsInfo: t.query({
2155
2155
  async queryFn({ projects: e = [], anatomy: s = !0 }, { dispatch: n }) {
@@ -2177,7 +2177,7 @@ const Qn = (t, e) => {
2177
2177
  providesTags: (e, s, { projects: n }) => n.map((i) => ({ type: "project", id: i }))
2178
2178
  })
2179
2179
  })
2180
- }), { useGetProjectsInfoQuery: Sa } = Ie, $n = (t, e) => {
2180
+ }), { useGetProjectsInfoQuery: ja } = Ie, Un = (t, e) => {
2181
2181
  const s = {
2182
2182
  name: t.name,
2183
2183
  attrib: t.attrib,
@@ -2224,11 +2224,11 @@ const Qn = (t, e) => {
2224
2224
  ...s
2225
2225
  };
2226
2226
  }
2227
- }, ds = (t = [], e) => {
2227
+ }, us = (t = [], e) => {
2228
2228
  const s = t.find((c) => c.entityId === e.id), n = s?.data;
2229
2229
  if (!n || s.entityType === "product" || s.entityType === "workfile")
2230
2230
  return console.warn("No operation data found or entity type not supported");
2231
- const i = $n(n, s.entityType);
2231
+ const i = Un(n, s.entityType);
2232
2232
  if (s.entityType === "folder" && n.name && e.path) {
2233
2233
  const c = e.path.split("/");
2234
2234
  c[c.length - 1] = n.name, i.path = c.join("/");
@@ -2260,14 +2260,14 @@ const Qn = (t, e) => {
2260
2260
  }
2261
2261
  };
2262
2262
  Object.assign(e, a);
2263
- }, us = (t, {
2263
+ }, ls = (t, {
2264
2264
  state: e,
2265
2265
  dispatch: s
2266
2266
  }, n) => {
2267
2267
  const i = t.map((a) => ({
2268
2268
  type: "entities",
2269
2269
  id: a.entityId
2270
- })), r = Ps.util.selectInvalidatedBy(e, i);
2270
+ })), r = Ls.util.selectInvalidatedBy(e, i);
2271
2271
  for (const a of r)
2272
2272
  if (a.endpointName === "getEntitiesDetailsPanel") {
2273
2273
  const c = s(
@@ -2276,7 +2276,7 @@ const Qn = (t, e) => {
2276
2276
  a.originalArgs,
2277
2277
  (d) => {
2278
2278
  for (const u of d)
2279
- ds(t, u);
2279
+ us(t, u);
2280
2280
  }
2281
2281
  )
2282
2282
  );
@@ -2299,7 +2299,7 @@ const Qn = (t, e) => {
2299
2299
  }
2300
2300
  )
2301
2301
  ), c];
2302
- }, xn = ({
2302
+ }, Bn = ({
2303
2303
  operations: t,
2304
2304
  state: e,
2305
2305
  dispatch: s,
@@ -2342,7 +2342,7 @@ const Qn = (t, e) => {
2342
2342
  } catch (a) {
2343
2343
  return console.error(a), s(Q.util.invalidateTags(i)), [];
2344
2344
  }
2345
- }, ls = me.injectEndpoints({
2345
+ }, ps = me.injectEndpoints({
2346
2346
  endpoints: (t) => ({
2347
2347
  updateEntity: t.mutation({
2348
2348
  query: ({ projectName: e, entityId: s, data: n, entityType: i }) => ({
@@ -2365,7 +2365,7 @@ const Qn = (t, e) => {
2365
2365
  { newAssignees: g, taskId: s, data: n },
2366
2366
  { dispatch: a }
2367
2367
  );
2368
- j && o.push(S), j || cs({ projects: [e], taskIds: [s] }, a).then(
2368
+ j && o.push(S), j || ds({ projects: [e], taskIds: [s] }, a).then(
2369
2369
  // use .then so that the rest of the code can run
2370
2370
  (_) => {
2371
2371
  let G = _.find((O) => O.id === s);
@@ -2396,9 +2396,9 @@ const Qn = (t, e) => {
2396
2396
  ])
2397
2397
  );
2398
2398
  }
2399
- const A = Ie.util.selectInvalidatedBy(u, T).filter((S) => S.endpointName === "GetKanban");
2400
- let w = [];
2401
- for (const S of A) {
2399
+ const w = Ie.util.selectInvalidatedBy(u, T).filter((S) => S.endpointName === "GetKanban");
2400
+ let A = [];
2401
+ for (const S of w) {
2402
2402
  const [j, _] = Xe(
2403
2403
  {
2404
2404
  assignees: S.originalArgs.assignees,
@@ -2411,23 +2411,23 @@ const Qn = (t, e) => {
2411
2411
  },
2412
2412
  { dispatch: a }
2413
2413
  );
2414
- _ ? o.push(j) : w.push(S);
2414
+ _ ? o.push(j) : A.push(S);
2415
2415
  }
2416
2416
  const E = { projects: f, assignees: m };
2417
- w = w.filter(
2417
+ A = A.filter(
2418
2418
  (S) => JSON.stringify(S.originalArgs) !== JSON.stringify(E)
2419
2419
  );
2420
- const P = A.map((S) => ({
2420
+ const P = w.map((S) => ({
2421
2421
  type: "kanban",
2422
2422
  id: JSON.stringify(S.originalArgs)
2423
2423
  }));
2424
2424
  l.push(...P);
2425
2425
  }
2426
- us([{ entityId: s, data: n, entityType: r }], { state: u, dispatch: a }, o);
2426
+ ls([{ entityId: s, data: n, entityType: r }], { state: u, dispatch: a }, o);
2427
2427
  try {
2428
2428
  await c, l.length && a(Ie.util.invalidateTags(l));
2429
2429
  } catch (p) {
2430
- ts.error(Ls(p) || "Failed to update task"), o.forEach((f) => f?.undo());
2430
+ ss.error(js(p) || "Failed to update task"), o.forEach((f) => f?.undo());
2431
2431
  }
2432
2432
  }
2433
2433
  }),
@@ -2437,7 +2437,7 @@ const Qn = (t, e) => {
2437
2437
  const r = i(), a = [];
2438
2438
  for (const { projectName: p, data: f, id: y, currentAssignees: h = [] } of e) {
2439
2439
  const g = n(
2440
- ls.endpoints.updateEntity.initiate({
2440
+ ps.endpoints.updateEntity.initiate({
2441
2441
  projectName: p,
2442
2442
  entityId: y,
2443
2443
  data: f,
@@ -2448,9 +2448,9 @@ const Qn = (t, e) => {
2448
2448
  a.push(g);
2449
2449
  }
2450
2450
  let c = [];
2451
- (s === "task" || s === "folder") && (c = xn({ operations: e, state: r, dispatch: n, entityType: s }));
2451
+ (s === "task" || s === "folder") && (c = Bn({ operations: e, state: r, dispatch: n, entityType: s }));
2452
2452
  const d = [], u = e.map((p) => ({ ...p, entityId: p.id }));
2453
- return (s === "task" || s === "folder") && (s === "task" && Ee(u, { state: r, dispatch: n }, d), s === "folder" && (qe(u, { state: r, dispatch: n }, d), console.log("invalidate overview folders"), n(me.util.invalidateTags([{ type: "folder", id: "LIST" }])), n(
2453
+ return (s === "task" || s === "folder") && (s === "task" && Ee(u, { state: r, dispatch: n }, d), s === "folder" && (Be(u, { state: r, dispatch: n }, d), console.log("invalidate overview folders"), n(me.util.invalidateTags([{ type: "folder", id: "LIST" }])), n(
2454
2454
  me.util.invalidateTags(
2455
2455
  u.map((p) => ({ type: "overviewTask", id: p.entityId }))
2456
2456
  )
@@ -2474,7 +2474,7 @@ const Qn = (t, e) => {
2474
2474
  })
2475
2475
  }),
2476
2476
  overrideExisting: !0
2477
- }), { useUpdateEntitiesMutation: Pa, useUpdateEntityMutation: La } = ls, Ft = (t) => [...new Set(t.map((e) => e.entityId).filter(Boolean))], Un = async ({
2477
+ }), { useUpdateEntitiesMutation: Fa, useUpdateEntityMutation: _a } = ps, _t = (t) => [...new Set(t.map((e) => e.entityId).filter(Boolean))], qn = async ({
2478
2478
  dispatch: t,
2479
2479
  projectName: e,
2480
2480
  updatedTaskIds: s,
@@ -2512,7 +2512,7 @@ const Qn = (t, e) => {
2512
2512
  } catch (i) {
2513
2513
  return console.error("Background entity refetch failed:", i), null;
2514
2514
  }
2515
- }, qn = async ({
2515
+ }, Hn = async ({
2516
2516
  dispatch: t,
2517
2517
  projectName: e,
2518
2518
  updatedTaskIds: s,
@@ -2544,40 +2544,40 @@ const Qn = (t, e) => {
2544
2544
  } catch (i) {
2545
2545
  return console.error("Background overview tasks refetch failed:", i), null;
2546
2546
  }
2547
- }, ps = "version", Bn = { type: ps, id: "LIST" }, fs = "product", mt = { type: fs, id: "LIST" }, Ze = {
2548
- version: { type: ps, list: Bn },
2549
- product: { type: fs, list: mt }
2547
+ }, fs = "version", Wn = { type: fs, id: "LIST" }, ys = "product", mt = { type: ys, id: "LIST" }, Ze = {
2548
+ version: { type: fs, list: Wn },
2549
+ product: { type: ys, list: mt }
2550
2550
  }, W = (t, e) => t ? [
2551
2551
  ...t.map(
2552
2552
  (s) => ({ type: Ze[e].type, id: s.id })
2553
2553
  ),
2554
2554
  Ze[e].list
2555
- ] : [Ze[e].list], ys = (t) => {
2555
+ ] : [Ze[e].list], gs = (t) => {
2556
2556
  const e = W(t, "version"), s = W(
2557
2557
  t.map((n) => n.product).filter((n) => !!n),
2558
2558
  "product"
2559
2559
  );
2560
2560
  return [...e, ...s];
2561
- }, xe = (t) => t ? ys(t.versions) : W(void 0, "version"), Hn = (t) => t ? ys(Jn(t)) : W(void 0, "version"), Wn = (t) => {
2561
+ }, xe = (t) => t ? gs(t.versions) : W(void 0, "version"), zn = (t) => t ? gs(Xn(t)) : W(void 0, "version"), Kn = (t) => {
2562
2562
  if (!t) return [mt, ...W(void 0, "product")];
2563
- const e = Yn(t), s = W(e, "product"), n = W(
2563
+ const e = Zn(t), s = W(e, "product"), n = W(
2564
2564
  e.map((i) => i.featuredVersion).filter((i) => !!i),
2565
2565
  "version"
2566
2566
  );
2567
2567
  return [...s, ...n];
2568
- }, zn = (t) => {
2568
+ }, Jn = (t) => {
2569
2569
  if (!t) return [mt, ...W(void 0, "product")];
2570
2570
  const e = W(t.products, "product"), s = W(
2571
2571
  t.products.map((n) => n.featuredVersion).filter((n) => !!n),
2572
2572
  "version"
2573
2573
  );
2574
2574
  return [...e, ...s];
2575
- }, Kn = (t) => {
2575
+ }, Yn = (t) => {
2576
2576
  const e = [];
2577
2577
  for (const { node: s } of t)
2578
2578
  Math.sign(s.version) !== -1 && e.push(s);
2579
2579
  return e;
2580
- }, Jn = (t) => t ? t.pages.flatMap((e) => e.versions) : [], Yn = (t) => t ? t.pages.flatMap((e) => e.products) : [], gs = (t) => {
2580
+ }, Xn = (t) => t ? t.pages.flatMap((e) => e.versions) : [], Zn = (t) => t ? t.pages.flatMap((e) => e.products) : [], hs = (t) => {
2581
2581
  const e = R(t.allAttrib), s = t.task ? {
2582
2582
  ...t.task,
2583
2583
  attrib: R(t.task.allAttrib),
@@ -2596,10 +2596,10 @@ const Qn = (t, e) => {
2596
2596
  task: s,
2597
2597
  product: n
2598
2598
  };
2599
- }, _t = (t) => {
2600
- const e = t.project.versions.pageInfo, n = Kn(t.project.versions.edges).map((i) => gs(i));
2599
+ }, Rt = (t) => {
2600
+ const e = t.project.versions.pageInfo, n = Yn(t.project.versions.edges).map((i) => hs(i));
2601
2601
  return { pageInfo: e, versions: n };
2602
- }, Xn = (t) => t.featuredVersion ? gs({
2602
+ }, ei = (t) => t.featuredVersion ? hs({
2603
2603
  ...t.featuredVersion,
2604
2604
  product: {
2605
2605
  id: t.id,
@@ -2610,7 +2610,7 @@ const Qn = (t, e) => {
2610
2610
  allAttrib: t.folder.allAttrib
2611
2611
  }
2612
2612
  }
2613
- }) : null, Zn = (t) => {
2613
+ }) : null, ti = (t) => {
2614
2614
  const e = t.project.products.pageInfo, s = t.project.products.edges.map((n) => {
2615
2615
  const i = n.node, r = R(i.allAttrib), a = {
2616
2616
  ...i.folder,
@@ -2624,11 +2624,11 @@ const Qn = (t, e) => {
2624
2624
  attrib: r,
2625
2625
  folder: a,
2626
2626
  versions: d,
2627
- featuredVersion: Xn(i)
2627
+ featuredVersion: ei(i)
2628
2628
  };
2629
2629
  });
2630
2630
  return { pageInfo: e, products: s };
2631
- }, Rt = (t) => {
2631
+ }, Gt = (t) => {
2632
2632
  try {
2633
2633
  const e = t.match(/:\s*({.*})$/);
2634
2634
  if (!e)
@@ -2643,7 +2643,7 @@ const Qn = (t, e) => {
2643
2643
  return t.split(":")[0] || t;
2644
2644
  }
2645
2645
  }, K = 10;
2646
- function hs(t, e, s, n) {
2646
+ function ms(t, e, s, n) {
2647
2647
  for (let i = 0; i < t.length; i++) {
2648
2648
  const r = e[s], a = t[i][s];
2649
2649
  if (n ? r > a : r < a)
@@ -2651,7 +2651,7 @@ function hs(t, e, s, n) {
2651
2651
  }
2652
2652
  return t.length;
2653
2653
  }
2654
- function ei(t, e, s, n, i, r) {
2654
+ function si(t, e, s, n, i, r) {
2655
2655
  for (const a of t) {
2656
2656
  const c = a[n], d = c.findIndex((u) => u.id === e);
2657
2657
  if (d !== -1) {
@@ -2660,7 +2660,7 @@ function ei(t, e, s, n, i, r) {
2660
2660
  }
2661
2661
  }
2662
2662
  if (s && t.length > 0) {
2663
- const a = t[0][n], c = hs(a, s, i, r);
2663
+ const a = t[0][n], c = ms(a, s, i, r);
2664
2664
  a.splice(c, 0, s);
2665
2665
  }
2666
2666
  }
@@ -2679,10 +2679,10 @@ function Qe(t, e, s, n, i, r = !0) {
2679
2679
  return t[c] = e, !0;
2680
2680
  if (!r) return !1;
2681
2681
  }
2682
- const a = hs(t, e, n, i);
2682
+ const a = ms(t, e, n, i);
2683
2683
  return t.splice(a, 0, e), !0;
2684
2684
  }
2685
- function ti(t, e, s, n, i) {
2685
+ function ni(t, e, s, n, i) {
2686
2686
  if (s)
2687
2687
  for (const r of t)
2688
2688
  Qe(r.versions, e, !0, n, i, !1);
@@ -2696,20 +2696,20 @@ const z = Q.enhanceEndpoints({
2696
2696
  endpoints: {
2697
2697
  // used by both stacked and non-stacked views
2698
2698
  GetVersions: {
2699
- transformResponse: _t,
2699
+ transformResponse: Rt,
2700
2700
  providesTags: xe,
2701
2701
  keepUnusedDataFor: K
2702
2702
  },
2703
2703
  // used by getVersionsByProducts only
2704
2704
  GetVersionsByProductId: {
2705
- transformResponse: _t,
2705
+ transformResponse: Rt,
2706
2706
  providesTags: xe,
2707
2707
  keepUnusedDataFor: K
2708
2708
  },
2709
2709
  // used by getProductsInfinite only
2710
2710
  GetProducts: {
2711
- transformResponse: Zn,
2712
- providesTags: zn,
2711
+ transformResponse: ti,
2712
+ providesTags: Jn,
2713
2713
  keepUnusedDataFor: K
2714
2714
  },
2715
2715
  // footer stats: `targets` excluded from cache key + responses merged,
@@ -2717,21 +2717,21 @@ const z = Q.enhanceEndpoints({
2717
2717
  GetProductsColumnStats: {
2718
2718
  transformResponse: (t) => ke(t?.project?.products?.fieldStats ?? []),
2719
2719
  serializeQueryArgs: ({ queryArgs: { targets: t, ...e } }) => e,
2720
- merge: (t, e) => Ae(e, t),
2721
- forceRefetch: ({ currentArg: t, previousArg: e }) => we(t, e),
2720
+ merge: (t, e) => we(e, t),
2721
+ forceRefetch: ({ currentArg: t, previousArg: e }) => Ae(t, e),
2722
2722
  providesTags: (t, e, { projectName: s }) => [{ type: "productColumnStats", id: s }],
2723
2723
  keepUnusedDataFor: K
2724
2724
  },
2725
2725
  GetVersionsColumnStats: {
2726
2726
  transformResponse: (t) => ke(t?.project?.versions?.fieldStats ?? []),
2727
2727
  serializeQueryArgs: ({ queryArgs: { targets: t, ...e } }) => e,
2728
- merge: (t, e) => Ae(e, t),
2729
- forceRefetch: ({ currentArg: t, previousArg: e }) => we(t, e),
2728
+ merge: (t, e) => we(e, t),
2729
+ forceRefetch: ({ currentArg: t, previousArg: e }) => Ae(t, e),
2730
2730
  providesTags: (t, e, { projectName: s }) => [{ type: "versionColumnStats", id: s }],
2731
2731
  keepUnusedDataFor: K
2732
2732
  }
2733
2733
  }
2734
- }), ae = 250, Gt = 1e3, si = 10, ni = ["status", "tags"];
2734
+ }), ae = 250, Ct = 1e3, ii = 10, ri = ["status", "tags"];
2735
2735
  function Fe(t, e, s) {
2736
2736
  const i = U(
2737
2737
  async (a, c) => {
@@ -2750,7 +2750,7 @@ function Fe(t, e, s) {
2750
2750
  o.add(g);
2751
2751
  continue;
2752
2752
  }
2753
- const I = pe(b, h.summary, ni);
2753
+ const I = pe(b, h.summary, ri);
2754
2754
  if (!I) {
2755
2755
  l.add(g);
2756
2756
  continue;
@@ -2855,7 +2855,7 @@ const N = z.injectEndpoints({
2855
2855
  return console.error("Error in getVersionsInfiniteQuery queryFn:", i), { error: L(i) };
2856
2856
  }
2857
2857
  },
2858
- providesTags: Hn,
2858
+ providesTags: zn,
2859
2859
  // Subscribes to version entity changes and updates cache accordingly
2860
2860
  // Handles: create, update, delete operations
2861
2861
  onCacheEntryAdded: async (e, { getCacheEntry: s, updateCachedData: n, cacheEntryRemoved: i, dispatch: r }) => {
@@ -2922,7 +2922,7 @@ const N = z.injectEndpoints({
2922
2922
  }
2923
2923
  if (p)
2924
2924
  for (const g of p)
2925
- ti(
2925
+ ni(
2926
2926
  y.pages,
2927
2927
  g,
2928
2928
  e.latestPerFolder === !0 && f?.has(g.id) === !0,
@@ -2946,7 +2946,7 @@ const N = z.injectEndpoints({
2946
2946
  ...a,
2947
2947
  productIds: [p]
2948
2948
  };
2949
- return r ? (f && (y.before = f), y.last = Gt) : (f && (y.after = f), y.first = Gt), s(
2949
+ return r ? (f && (y.before = f), y.last = Ct) : (f && (y.after = f), y.first = Ct), s(
2950
2950
  z.endpoints.GetVersionsByProductId.initiate(y, {
2951
2951
  forceRefetch: n
2952
2952
  })
@@ -2955,7 +2955,7 @@ const N = z.injectEndpoints({
2955
2955
  for (let p = 0; p < u.length; p++) {
2956
2956
  const f = u[p], y = i[p];
2957
2957
  if (f.status === "rejected") {
2958
- console.error(`Error fetching versions for product ${y}:`, f.reason), l.push({ productId: y, error: Rt(f.reason) });
2958
+ console.error(`Error fetching versions for product ${y}:`, f.reason), l.push({ productId: y, error: Gt(f.reason) });
2959
2959
  continue;
2960
2960
  }
2961
2961
  const h = f.value;
@@ -2963,14 +2963,14 @@ const N = z.injectEndpoints({
2963
2963
  console.error(`Error fetching versions for product ${y}:`, h.error), l.push({
2964
2964
  productId: y,
2965
2965
  // @ts-expect-error - message
2966
- error: Rt(h.error?.message || "Unknown error")
2966
+ error: Gt(h.error?.message || "Unknown error")
2967
2967
  });
2968
2968
  continue;
2969
2969
  }
2970
2970
  if (!h.data) continue;
2971
2971
  o.push(...h.data.versions);
2972
2972
  let g = h.data.pageInfo, m = 1;
2973
- for (; g && m < si; ) {
2973
+ for (; g && m < ii; ) {
2974
2974
  const v = r ? g.hasPreviousPage : g.hasNextPage, b = g.endCursor;
2975
2975
  if (!v || !b) break;
2976
2976
  const I = await c(y, b);
@@ -3106,7 +3106,7 @@ const N = z.injectEndpoints({
3106
3106
  return console.error("Error in getProductsInfiniteQuery queryFn:", r), { error: L(r) };
3107
3107
  }
3108
3108
  },
3109
- providesTags: Wn,
3109
+ providesTags: Kn,
3110
3110
  // Subscribes to product entity changes and updates cache accordingly
3111
3111
  // Handles: create, update, delete operations
3112
3112
  // Often triggered together with version changes (new product + version)
@@ -3146,7 +3146,7 @@ const N = z.injectEndpoints({
3146
3146
  (g.data?.products || []).map((b) => [b.id, b])
3147
3147
  );
3148
3148
  f.forEach((b) => {
3149
- ei(
3149
+ si(
3150
3150
  m.pages,
3151
3151
  b,
3152
3152
  v.get(b),
@@ -3196,11 +3196,11 @@ const N = z.injectEndpoints({
3196
3196
  const I = b.featuredVersion?.id;
3197
3197
  if (I) {
3198
3198
  if (f && f.some((k) => k.entityId === I && k.parentId === b.id) && p.add(b.id), y)
3199
- for (const { entityId: k, field: T, value: A, parentId: w } of y)
3200
- b.id === w && I === k && b.featuredVersion && (b.featuredVersion[T] = A);
3199
+ for (const { entityId: k, field: T, value: w, parentId: A } of y)
3200
+ b.id === A && I === k && b.featuredVersion && (b.featuredVersion[T] = w);
3201
3201
  if (h)
3202
- for (const { entityId: k, allAttrib: T, parsedAttrib: A } of h)
3203
- I === k && b.featuredVersion && (b.featuredVersion.allAttrib = T, b.featuredVersion.attrib = A);
3202
+ for (const { entityId: k, allAttrib: T, parsedAttrib: w } of h)
3203
+ I === k && b.featuredVersion && (b.featuredVersion.allAttrib = T, b.featuredVersion.attrib = w);
3204
3204
  if (g)
3205
3205
  for (const k of g)
3206
3206
  I === k.id && b.featuredVersion && (b.featuredVersion = k);
@@ -3243,7 +3243,7 @@ const N = z.injectEndpoints({
3243
3243
  try {
3244
3244
  const v = [];
3245
3245
  for (const k of s) {
3246
- const T = k.count || 500, A = {
3246
+ const T = k.count || 500, w = {
3247
3247
  projectName: e,
3248
3248
  // base filters
3249
3249
  productFilter: r,
@@ -3262,30 +3262,30 @@ const N = z.injectEndpoints({
3262
3262
  hasReviewables: g,
3263
3263
  group: k.value
3264
3264
  };
3265
- l ? A.last = T : A.first = T;
3266
- const w = m.dispatch(
3265
+ l ? w.last = T : w.first = T;
3266
+ const A = m.dispatch(
3267
3267
  z.endpoints.GetVersions.initiate(
3268
- A,
3268
+ w,
3269
3269
  {
3270
3270
  forceRefetch: !0
3271
3271
  }
3272
3272
  )
3273
3273
  );
3274
- v.push(w);
3274
+ v.push(A);
3275
3275
  }
3276
3276
  const b = await Promise.all(v), I = [];
3277
3277
  for (const k of b) {
3278
3278
  if (k.error) throw k.error;
3279
- const T = k.originalArgs?.group, A = k.data?.pageInfo?.hasNextPage || k.data?.pageInfo?.hasPreviousPage || !1, w = k.data?.versions.map((E, P, S) => ({
3279
+ const T = k.originalArgs?.group, w = k.data?.pageInfo?.hasNextPage || k.data?.pageInfo?.hasPreviousPage || !1, A = k.data?.versions.map((E, P, S) => ({
3280
3280
  ...E,
3281
3281
  groups: [
3282
3282
  {
3283
3283
  value: T,
3284
- hasNextPage: P === S.length - 1 && A ? T : void 0
3284
+ hasNextPage: P === S.length - 1 && w ? T : void 0
3285
3285
  }
3286
3286
  ]
3287
3287
  })) || [];
3288
- I.push(...w);
3288
+ I.push(...A);
3289
3289
  }
3290
3290
  return {
3291
3291
  data: {
@@ -3368,15 +3368,15 @@ const N = z.injectEndpoints({
3368
3368
  })
3369
3369
  })
3370
3370
  }), {
3371
- useGetVersionsQuery: ja,
3372
- useGetProductsColumnStatsQuery: Fa,
3373
- useGetVersionsColumnStatsQuery: _a
3371
+ useGetVersionsQuery: Ra,
3372
+ useGetProductsColumnStatsQuery: Ga,
3373
+ useGetVersionsColumnStatsQuery: Ca
3374
3374
  } = z, {
3375
- useGetVersionsInfiniteInfiniteQuery: Ra,
3376
- useGetVersionsByProductsQuery: Ga,
3377
- useGetProductsInfiniteInfiniteQuery: Ca,
3378
- useGetGroupedVersionsListQuery: Na
3379
- } = N, Ct = (t) => [
3375
+ useGetVersionsInfiniteInfiniteQuery: Na,
3376
+ useGetVersionsByProductsQuery: Qa,
3377
+ useGetProductsInfiniteInfiniteQuery: Ma,
3378
+ useGetGroupedVersionsListQuery: Va
3379
+ } = N, Nt = (t) => [
3380
3380
  { type: "version", id: "LIST" },
3381
3381
  ...t.map((e) => ({ type: "version", id: e.entityId }))
3382
3382
  ], _e = (t, e) => {
@@ -3387,26 +3387,26 @@ const N = z.injectEndpoints({
3387
3387
  ...s.attrib,
3388
3388
  ...e.attrib
3389
3389
  }), s;
3390
- }, ms = (t, e) => {
3390
+ }, vs = (t, e) => {
3391
3391
  e.data && (Object.entries(e.data).forEach(([s, n]) => {
3392
3392
  s !== "attrib" && (t[s] = n);
3393
3393
  }), e.data.attrib && (t.attrib = { ...t.attrib, ...e.data.attrib }));
3394
- }, Nt = (t, e) => {
3394
+ }, Qt = (t, e) => {
3395
3395
  t.forEach((s) => {
3396
3396
  [s.task, s.product, s.product?.folder].forEach((i) => {
3397
3397
  if (!i) return;
3398
3398
  const r = e.get(i.id);
3399
- r && ms(i, r);
3399
+ r && vs(i, r);
3400
3400
  });
3401
3401
  });
3402
- }, Qt = (t, e) => {
3402
+ }, Mt = (t, e) => {
3403
3403
  t.forEach((s) => {
3404
3404
  const n = s.folder;
3405
3405
  if (!n) return;
3406
3406
  const i = e.get(n.id);
3407
- i && ms(n, i);
3407
+ i && vs(n, i);
3408
3408
  });
3409
- }, ii = (t, {
3409
+ }, ai = (t, {
3410
3410
  state: e,
3411
3411
  dispatch: s
3412
3412
  }, n) => {
@@ -3428,7 +3428,7 @@ const N = z.injectEndpoints({
3428
3428
  a.originalArgs,
3429
3429
  (d) => {
3430
3430
  for (const u of d.pages)
3431
- Nt(u.versions, i);
3431
+ Qt(u.versions, i);
3432
3432
  }
3433
3433
  )
3434
3434
  );
@@ -3440,7 +3440,7 @@ const N = z.injectEndpoints({
3440
3440
  a.originalArgs,
3441
3441
  (d) => {
3442
3442
  for (const u of d.pages)
3443
- Qt(u.products, i);
3443
+ Mt(u.products, i);
3444
3444
  }
3445
3445
  )
3446
3446
  );
@@ -3450,7 +3450,7 @@ const N = z.injectEndpoints({
3450
3450
  N.util.updateQueryData(
3451
3451
  a.endpointName,
3452
3452
  a.originalArgs,
3453
- (d) => Nt(d.versions, i)
3453
+ (d) => Qt(d.versions, i)
3454
3454
  )
3455
3455
  );
3456
3456
  n?.push(c);
@@ -3459,17 +3459,17 @@ const N = z.injectEndpoints({
3459
3459
  N.util.updateQueryData(
3460
3460
  a.endpointName,
3461
3461
  a.originalArgs,
3462
- (d) => Qt(d.products, i)
3462
+ (d) => Mt(d.products, i)
3463
3463
  )
3464
3464
  );
3465
3465
  n?.push(c);
3466
3466
  }
3467
- }, ri = (t, {
3467
+ }, oi = (t, {
3468
3468
  state: e,
3469
3469
  dispatch: s
3470
3470
  }, n) => {
3471
3471
  if (!t.length) return;
3472
- const i = Ct(t), r = N.util.selectInvalidatedBy(e, i), a = new Set(t.filter((d) => d.type === "delete").map((d) => d.entityId));
3472
+ const i = Nt(t), r = N.util.selectInvalidatedBy(e, i), a = new Set(t.filter((d) => d.type === "delete").map((d) => d.entityId));
3473
3473
  for (const d of r)
3474
3474
  if (d.endpointName === "getVersionsInfinite") {
3475
3475
  const u = s(
@@ -3556,11 +3556,11 @@ const N = z.injectEndpoints({
3556
3556
  n?.push(u);
3557
3557
  }
3558
3558
  const c = t.filter((d) => d.type !== "delete");
3559
- c.length > 0 && s(N.util.invalidateTags(Ct(c)));
3560
- }, Mt = (t) => [
3559
+ c.length > 0 && s(N.util.invalidateTags(Nt(c)));
3560
+ }, Vt = (t) => [
3561
3561
  { type: "product", id: "LIST" },
3562
3562
  ...t.map((e) => ({ type: "product", id: e.entityId }))
3563
- ], ai = (t, e) => {
3563
+ ], ci = (t, e) => {
3564
3564
  const s = { ...t };
3565
3565
  return Object.keys(e).forEach((n) => {
3566
3566
  n !== "attrib" && e[n] !== void 0 && (s[n] = e[n]);
@@ -3568,12 +3568,12 @@ const N = z.injectEndpoints({
3568
3568
  ...s.attrib,
3569
3569
  ...e.attrib
3570
3570
  }), s;
3571
- }, oi = (t, {
3571
+ }, di = (t, {
3572
3572
  state: e,
3573
3573
  dispatch: s
3574
3574
  }, n) => {
3575
3575
  if (!t.length) return;
3576
- const i = Mt(t), r = N.util.selectInvalidatedBy(e, i), a = new Set(t.filter((u) => u.type === "delete").map((u) => u.entityId)), c = (u) => {
3576
+ const i = Vt(t), r = N.util.selectInvalidatedBy(e, i), a = new Set(t.filter((u) => u.type === "delete").map((u) => u.entityId)), c = (u) => {
3577
3577
  for (let o = u.length - 1; o >= 0; o--)
3578
3578
  a.has(u[o].product?.id) && u.splice(o, 1);
3579
3579
  };
@@ -3591,7 +3591,7 @@ const N = z.injectEndpoints({
3591
3591
  const y = p.products[f], h = t.find(
3592
3592
  (g) => g.entityId === y.id && g.type !== "delete"
3593
3593
  );
3594
- h?.data && (p.products[f] = ai(y, h.data));
3594
+ h?.data && (p.products[f] = ci(y, h.data));
3595
3595
  }
3596
3596
  }
3597
3597
  }
@@ -3623,7 +3623,7 @@ const N = z.injectEndpoints({
3623
3623
  n?.push(o);
3624
3624
  }
3625
3625
  const d = t.filter((u) => u.type !== "delete");
3626
- d.length > 0 && s(N.util.invalidateTags(Mt(d)));
3626
+ d.length > 0 && s(N.util.invalidateTags(Vt(d)));
3627
3627
  }, Ue = (t, e) => {
3628
3628
  if (Object.keys(e).forEach((s) => {
3629
3629
  s === "attrib" || s === "links" || s === "deleteLinks" || (t[s] = e[s]);
@@ -3643,7 +3643,7 @@ const N = z.injectEndpoints({
3643
3643
  t.links = t.links.filter((i) => i.id !== n);
3644
3644
  });
3645
3645
  }
3646
- }, ci = (t) => [
3646
+ }, ui = (t) => [
3647
3647
  { type: "overviewTask", id: "LIST" },
3648
3648
  ...t.map((e) => ({ type: "overviewTask", id: e.entityId })),
3649
3649
  // we also add the projectName so that tasks that do not exist in the cache can still invalidate
@@ -3651,31 +3651,31 @@ const N = z.injectEndpoints({
3651
3651
  type: "overviewTask",
3652
3652
  id: e.data?.projectName
3653
3653
  }))
3654
- ], di = (t) => [
3654
+ ], li = (t) => [
3655
3655
  ...t.map((e) => ({ type: "folder", id: e.entityId })),
3656
3656
  // we also add the projectName so that tasks that do not exist in the cache can still invalidate
3657
3657
  ...t.filter((e) => e.data?.projectName).map((e) => ({
3658
3658
  type: "folder",
3659
3659
  id: e.data?.projectName
3660
3660
  }))
3661
- ], ui = (t, e, s) => ({
3661
+ ], pi = (t, e, s) => ({
3662
3662
  entityId: t,
3663
3663
  entityType: e,
3664
3664
  type: "update",
3665
3665
  data: { deleteLinks: s }
3666
- }), Qa = (t, e) => t.map(
3667
- (s) => ui(s.entityId, s.entityType, e)
3668
- ), Ma = (t, {
3666
+ }), Da = (t, e) => t.map(
3667
+ (s) => pi(s.entityId, s.entityType, e)
3668
+ ), Oa = (t, {
3669
3669
  state: e,
3670
3670
  dispatch: s
3671
3671
  }, n) => {
3672
3672
  const i = t.reduce((r, a) => (r[a.entityType] || (r[a.entityType] = []), r[a.entityType].push(a), r), {});
3673
- i.task && Ee(i.task, { state: e, dispatch: s }, n), i.folder && qe(i.folder, { state: e, dispatch: s }, n);
3673
+ i.task && Ee(i.task, { state: e, dispatch: s }, n), i.folder && Be(i.folder, { state: e, dispatch: s }, n);
3674
3674
  }, Ee = (t, {
3675
3675
  state: e,
3676
3676
  dispatch: s
3677
3677
  }, n) => {
3678
- const i = ci(t), r = x.util.selectInvalidatedBy(e, i), a = new Set(
3678
+ const i = ui(t), r = x.util.selectInvalidatedBy(e, i), a = new Set(
3679
3679
  t.filter((d) => d.type === "delete" && d.entityId).map((d) => d.entityId)
3680
3680
  ), c = (d) => {
3681
3681
  for (let u = d.length - 1; u >= 0; u--)
@@ -3721,7 +3721,7 @@ const N = z.injectEndpoints({
3721
3721
  );
3722
3722
  n?.push(u);
3723
3723
  }
3724
- }, et = /* @__PURE__ */ new Map(), Vt = (t, e, s) => {
3724
+ }, et = /* @__PURE__ */ new Map(), Dt = (t, e, s) => {
3725
3725
  const n = `${e}:${s.join()}`, i = et.get(n);
3726
3726
  i && clearTimeout(i), et.set(
3727
3727
  n,
@@ -3731,11 +3731,11 @@ const N = z.injectEndpoints({
3731
3731
  );
3732
3732
  }, 500)
3733
3733
  );
3734
- }, qe = (t, {
3734
+ }, Be = (t, {
3735
3735
  state: e,
3736
3736
  dispatch: s
3737
3737
  }, n) => {
3738
- const i = $e.util.selectInvalidatedBy(e, di(t)).filter((a) => a.endpointName === "getFolderList"), r = new Set(
3738
+ const i = $e.util.selectInvalidatedBy(e, li(t)).filter((a) => a.endpointName === "getFolderList"), r = new Set(
3739
3739
  t.filter((a) => a.type === "delete" && a.entityId).map((a) => a.entityId)
3740
3740
  );
3741
3741
  for (const a of i) {
@@ -3763,17 +3763,17 @@ const N = z.injectEndpoints({
3763
3763
  );
3764
3764
  n?.push(c);
3765
3765
  }
3766
- }, li = (t, {
3766
+ }, fi = (t, {
3767
3767
  state: e,
3768
3768
  dispatch: s
3769
3769
  }, n) => {
3770
- const i = t.map((c) => ({ type: "entityListItem", id: c.entityId })), r = q.util.selectInvalidatedBy(e, i), a = new Set(
3770
+ const i = t.map((c) => ({ type: "entityListItem", id: c.entityId })), r = B.util.selectInvalidatedBy(e, i), a = new Set(
3771
3771
  t.filter((c) => c.type === "delete" && c.entityId).map((c) => c.entityId)
3772
3772
  );
3773
3773
  for (const c of r)
3774
3774
  if (c.endpointName === "getListItemsInfinite") {
3775
3775
  const d = s(
3776
- q.util.updateQueryData(
3776
+ B.util.updateQueryData(
3777
3777
  "getListItemsInfinite",
3778
3778
  c.originalArgs,
3779
3779
  (u) => {
@@ -3792,23 +3792,23 @@ const N = z.injectEndpoints({
3792
3792
  );
3793
3793
  n?.push(d);
3794
3794
  }
3795
- }, Dt = (t) => t.reduce(
3795
+ }, Ot = (t) => t.reduce(
3796
3796
  (e, s) => (e[s.type].push(s), e),
3797
3797
  {
3798
3798
  create: [],
3799
3799
  update: [],
3800
3800
  delete: []
3801
3801
  }
3802
- ), Ot = js.enhanceEndpoints({
3802
+ ), $t = Fs.enhanceEndpoints({
3803
3803
  endpoints: {
3804
3804
  operations: {}
3805
3805
  }
3806
- }), pi = Ot.injectEndpoints({
3806
+ }), yi = $t.injectEndpoints({
3807
3807
  endpoints: (t) => ({
3808
3808
  updateOverviewEntities: t.mutation({
3809
3809
  async queryFn(e, { dispatch: s }) {
3810
3810
  try {
3811
- const n = await s(Ot.endpoints.operations.initiate(e));
3811
+ const n = await s($t.endpoints.operations.initiate(e));
3812
3812
  if (n.error)
3813
3813
  return { error: L(n.error) };
3814
3814
  const i = n.data, r = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
@@ -3846,23 +3846,23 @@ const N = z.injectEndpoints({
3846
3846
  }
3847
3847
  ), u = a(), o = [];
3848
3848
  if (d.task?.length) {
3849
- const { delete: v, update: b } = Dt(d.task), I = b.filter(
3849
+ const { delete: v, update: b } = Ot(d.task), I = b.filter(
3850
3850
  (k) => !s.some((T) => T.entityId === k.entityId)
3851
3851
  );
3852
3852
  Ee([...I, ...v], { state: u, dispatch: i }, o);
3853
3853
  }
3854
3854
  if (d.folder?.length) {
3855
- const { delete: v, update: b } = Dt(d.folder), I = b.filter(
3855
+ const { delete: v, update: b } = Ot(d.folder), I = b.filter(
3856
3856
  (k) => !s.some((T) => T.entityId === k.entityId)
3857
3857
  );
3858
- qe([...I, ...v], { state: u, dispatch: i }, o);
3858
+ Be([...I, ...v], { state: u, dispatch: i }, o);
3859
3859
  }
3860
3860
  const l = s.filter((v) => v.entityType === "task"), p = s.filter((v) => v.entityType === "folder");
3861
- l.length && Ee(l, { state: u, dispatch: i }, o), p.length && qe(p, { state: u, dispatch: i }, o), ii(
3861
+ l.length && Ee(l, { state: u, dispatch: i }, o), p.length && Be(p, { state: u, dispatch: i }, o), ai(
3862
3862
  [...c, ...s],
3863
3863
  { state: u, dispatch: i },
3864
3864
  o
3865
- ), li([...c, ...s], { state: u, dispatch: i }, o), d.version?.length && ri(d.version, { state: u, dispatch: i }, o), d.product?.length && oi(d.product, { state: u, dispatch: i }, o);
3865
+ ), fi([...c, ...s], { state: u, dispatch: i }, o), d.version?.length && oi(d.version, { state: u, dispatch: i }, o), d.product?.length && di(d.product, { state: u, dispatch: i }, o);
3866
3866
  const f = c.map((v) => ({
3867
3867
  id: v.entityId,
3868
3868
  type: v.entityType
@@ -3884,7 +3884,7 @@ const N = z.injectEndpoints({
3884
3884
  v.originalArgs,
3885
3885
  (I) => {
3886
3886
  for (const k of I)
3887
- ds(c, k);
3887
+ us(c, k);
3888
3888
  }
3889
3889
  )
3890
3890
  );
@@ -3893,35 +3893,35 @@ const N = z.injectEndpoints({
3893
3893
  try {
3894
3894
  await r;
3895
3895
  const v = d.task || [], b = d.folder || [], I = d.version || [], k = d.product || [];
3896
- if (n && ((v.length || b.length) && Vt(i, n, [
3896
+ if (n && ((v.length || b.length) && Dt(i, n, [
3897
3897
  "folderColumnStats",
3898
3898
  "taskColumnStats",
3899
3899
  "entityListItemsColumnStats"
3900
- ]), (I.length || k.length) && Vt(i, n, [
3900
+ ]), (I.length || k.length) && Dt(i, n, [
3901
3901
  "productColumnStats",
3902
3902
  "versionColumnStats",
3903
3903
  "entityListItemsColumnStats"
3904
3904
  ])), v.length === 0 && b.length === 0)
3905
3905
  return;
3906
- const T = Ft(v), A = Ft(b), w = T.map((P) => ({ type: "overviewTask", id: P })), E = x.util.selectInvalidatedBy(u, w).filter((P) => P.endpointName === "getTasksListInfinite");
3906
+ const T = _t(v), w = _t(b), A = T.map((P) => ({ type: "overviewTask", id: P })), E = x.util.selectInvalidatedBy(u, A).filter((P) => P.endpointName === "getTasksListInfinite");
3907
3907
  if (T.length > 0 && n) {
3908
3908
  for (const S of E)
3909
- await Un({
3909
+ await qn({
3910
3910
  dispatch: i,
3911
3911
  projectName: n,
3912
3912
  updatedTaskIds: T,
3913
3913
  cacheEntry: S
3914
3914
  });
3915
- const P = x.util.selectInvalidatedBy(u, w).filter((S) => S.endpointName === "getOverviewTasksByFolders");
3915
+ const P = x.util.selectInvalidatedBy(u, A).filter((S) => S.endpointName === "getOverviewTasksByFolders");
3916
3916
  for (const S of P)
3917
- await qn({
3917
+ await Hn({
3918
3918
  dispatch: i,
3919
3919
  projectName: n,
3920
3920
  updatedTaskIds: T,
3921
3921
  cacheEntry: S
3922
3922
  });
3923
3923
  }
3924
- A.length > 0 && n && i($e.util.invalidateTags([{ type: "folder", id: "LIST" }]));
3924
+ w.length > 0 && n && i($e.util.invalidateTags([{ type: "folder", id: "LIST" }]));
3925
3925
  } catch {
3926
3926
  for (const b of o)
3927
3927
  b.undo();
@@ -3953,17 +3953,17 @@ const N = z.injectEndpoints({
3953
3953
  }
3954
3954
  })
3955
3955
  })
3956
- }), { useUpdateOverviewEntitiesMutation: Va } = pi, ct = (t) => {
3956
+ }), { useUpdateOverviewEntitiesMutation: $a } = yi, ct = (t) => {
3957
3957
  if (t)
3958
3958
  return t.label;
3959
- }, $t = {
3959
+ }, xt = {
3960
3960
  folder: "GetFoldersLinks",
3961
3961
  task: "GetTasksLinks",
3962
3962
  product: "GetProductsLinks",
3963
3963
  version: "GetVersionsLinks",
3964
3964
  representation: "GetRepresentationsLinks",
3965
3965
  workfile: "GetWorkfilesLinks"
3966
- }, xt = {
3966
+ }, Ut = {
3967
3967
  folder: "folders",
3968
3968
  task: "tasks",
3969
3969
  product: "products",
@@ -3978,7 +3978,7 @@ const N = z.injectEndpoints({
3978
3978
  const d = i(), u = JSON.stringify({ projectName: e, entityType: n }), l = d.restApi?.queries?.[a || `getEntityLinks(${u})`]?.data || [], p = new Set(l.map((v) => v.id)), f = s.filter((v) => !p?.has(v) || c);
3979
3979
  if (f.length === 0)
3980
3980
  return { data: l };
3981
- const y = $t[n], h = xt[n];
3981
+ const y = xt[n], h = Ut[n];
3982
3982
  return { data: (await r(
3983
3983
  M.endpoints[y].initiate(
3984
3984
  { projectName: e, entityIds: f },
@@ -4016,7 +4016,7 @@ const N = z.injectEndpoints({
4016
4016
  };
4017
4017
  }) || [] };
4018
4018
  } catch (d) {
4019
- return console.error(`Error in getEntityLinks queryFn for ${n}:`, d), ts.error(`Error fetching ${n} links`), { error: L(d) };
4019
+ return console.error(`Error in getEntityLinks queryFn for ${n}:`, d), ss.error(`Error fetching ${n} links`), { error: L(d) };
4020
4020
  }
4021
4021
  },
4022
4022
  // 2. We should not create new caches when the entityIds argument changes.
@@ -4051,7 +4051,7 @@ const N = z.injectEndpoints({
4051
4051
  let c;
4052
4052
  const d = U(
4053
4053
  async (u, o) => {
4054
- const l = $t[s], p = xt[s];
4054
+ const l = xt[s], p = Ut[s];
4055
4055
  try {
4056
4056
  await J();
4057
4057
  const f = await a(
@@ -4105,7 +4105,7 @@ const N = z.injectEndpoints({
4105
4105
  }
4106
4106
  })
4107
4107
  })
4108
- }), { useGetEntityLinksQuery: Da } = le, ne = 10, Ut = (t) => {
4108
+ }), { useGetEntityLinksQuery: xa } = le, ne = 10, Bt = (t) => {
4109
4109
  if (!t) return {};
4110
4110
  try {
4111
4111
  return typeof t != "string" ? t ?? {} : JSON.parse(t);
@@ -4119,8 +4119,8 @@ const N = z.injectEndpoints({
4119
4119
  // @ts-expect-error - entityType is string
4120
4120
  lists: t.project.entityLists.edges.map((e) => ({
4121
4121
  ...e.node,
4122
- data: Ut(e.node.data),
4123
- attrib: Ut(e.node.allAttrib)
4122
+ data: Bt(e.node.data),
4123
+ attrib: Bt(e.node.allAttrib)
4124
4124
  })),
4125
4125
  pageInfo: t.project.entityLists.pageInfo
4126
4126
  }),
@@ -4152,7 +4152,7 @@ const N = z.injectEndpoints({
4152
4152
  keepUnusedDataFor: ne
4153
4153
  }
4154
4154
  }
4155
- }), q = Re.injectEndpoints({
4155
+ }), B = Re.injectEndpoints({
4156
4156
  endpoints: (t) => ({
4157
4157
  getListsInfinite: t.infiniteQuery({
4158
4158
  infiniteQueryOptions: {
@@ -4220,7 +4220,6 @@ const N = z.injectEndpoints({
4220
4220
  allAttrib: "",
4221
4221
  attrib: {},
4222
4222
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
4223
- updatedAt: "",
4224
4223
  active: !0,
4225
4224
  access: "",
4226
4225
  accessLevel: 30,
@@ -4231,8 +4230,8 @@ const N = z.injectEndpoints({
4231
4230
  entityListType: p.entity_list_type,
4232
4231
  count: p.count,
4233
4232
  entityListFolderId: p.entity_list_folder_id ?? null,
4234
- updatedBy: l.createdAt,
4235
- // estimate the event creation time is about the same as list updated at
4233
+ // the event's own timestamps have no timezone, so the client clock is the closer estimate
4234
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
4236
4235
  owner: h?.owner || ""
4237
4236
  // mainly to shut up typescript
4238
4237
  });
@@ -4332,8 +4331,8 @@ const N = z.injectEndpoints({
4332
4331
  r((b) => {
4333
4332
  b?.pages && v.forEach((I) => {
4334
4333
  b.pages.forEach((k) => {
4335
- (k.items || []).forEach((A) => {
4336
- A.entityId === I.summary.entityId && A.entityType === I.summary.entityType && I.summary.thumbnailHash && (A.thumbnailHash = I.summary.thumbnailHash);
4334
+ (k.items || []).forEach((w) => {
4335
+ w.entityId === I.summary.entityId && w.entityType === I.summary.entityType && I.summary.thumbnailHash && (w.thumbnailHash = I.summary.thumbnailHash);
4337
4336
  });
4338
4337
  });
4339
4338
  });
@@ -4403,7 +4402,7 @@ const N = z.injectEndpoints({
4403
4402
  keepUnusedDataFor: ne
4404
4403
  })
4405
4404
  })
4406
- }), fi = ue.enhanceEndpoints({
4405
+ }), gi = ue.enhanceEndpoints({
4407
4406
  endpoints: {
4408
4407
  getEntityList: {
4409
4408
  providesTags: (t, e, { listId: s, projectName: n }) => [
@@ -4421,12 +4420,12 @@ const N = z.injectEndpoints({
4421
4420
  }
4422
4421
  }
4423
4422
  }), {
4424
- useGetListsInfiniteInfiniteQuery: Oa,
4425
- useGetListItemsInfiniteInfiniteQuery: $a,
4426
- useGetListsItemsForReviewSessionInfiniteQuery: xa,
4427
- useLazyGetListsItemsForReviewSessionQuery: Ua,
4428
- useLazyGetListItemsQuery: qa
4429
- } = q, { useGetEntityListQuery: Ba } = fi, yi = ue.enhanceEndpoints({
4423
+ useGetListsInfiniteInfiniteQuery: Ua,
4424
+ useGetListItemsInfiniteInfiniteQuery: Ba,
4425
+ useGetListsItemsForReviewSessionInfiniteQuery: qa,
4426
+ useLazyGetListsItemsForReviewSessionQuery: Ha,
4427
+ useLazyGetListItemsQuery: Wa
4428
+ } = B, { useGetEntityListQuery: za } = gi, hi = ue.enhanceEndpoints({
4430
4429
  endpoints: {
4431
4430
  // LIST MUTATIONS
4432
4431
  createEntityList: {
@@ -4434,11 +4433,11 @@ const N = z.injectEndpoints({
4434
4433
  },
4435
4434
  updateEntityList: {
4436
4435
  async onQueryStarted({ listId: t, entityListPatchModel: e }, { dispatch: s, queryFulfilled: n, getState: i }) {
4437
- const r = i(), a = [{ type: "entityList", id: t }], c = q.util.selectInvalidatedBy(r, a).filter((o) => o.endpointName === "getListsInfinite");
4436
+ const r = i(), a = [{ type: "entityList", id: t }], c = B.util.selectInvalidatedBy(r, a).filter((o) => o.endpointName === "getListsInfinite");
4438
4437
  let d = [];
4439
4438
  for (const o of c) {
4440
4439
  const l = s(
4441
- q.util.updateQueryData("getListsInfinite", o.originalArgs, (p) => {
4440
+ B.util.updateQueryData("getListsInfinite", o.originalArgs, (p) => {
4442
4441
  for (const f of p.pages) {
4443
4442
  const y = f.lists.findIndex((h) => h.id === t);
4444
4443
  if (y !== -1) {
@@ -4479,7 +4478,7 @@ const N = z.injectEndpoints({
4479
4478
  // LIST ITEM MUTATIONS
4480
4479
  updateEntityListItems: {
4481
4480
  async onQueryStarted({ listId: t, entityListMultiPatchModel: e }, { dispatch: s, queryFulfilled: n, getState: i }) {
4482
- const r = i(), a = [{ type: "entityListItem", id: t }], c = q.util.selectInvalidatedBy(r, a).filter((u) => u.endpointName === "getListItemsInfinite");
4481
+ const r = i(), a = [{ type: "entityListItem", id: t }], c = B.util.selectInvalidatedBy(r, a).filter((u) => u.endpointName === "getListItemsInfinite");
4483
4482
  let d = [];
4484
4483
  if (!e.items || e.items.length === 0) {
4485
4484
  await n;
@@ -4488,7 +4487,7 @@ const N = z.injectEndpoints({
4488
4487
  for (const u of c) {
4489
4488
  if (u.originalArgs.listId !== t) continue;
4490
4489
  const o = s(
4491
- q.util.updateQueryData("getListItemsInfinite", u.originalArgs, (l) => {
4490
+ B.util.updateQueryData("getListItemsInfinite", u.originalArgs, (l) => {
4492
4491
  let p = !1;
4493
4492
  for (const f of l.pages)
4494
4493
  e.items?.forEach((y) => {
@@ -4552,11 +4551,11 @@ const N = z.injectEndpoints({
4552
4551
  },
4553
4552
  updateEntityListItem: {
4554
4553
  async onQueryStarted({ listItemId: t, entityListItemPatchModel: e }, { dispatch: s, queryFulfilled: n, getState: i }) {
4555
- const r = i(), a = [{ type: "entityListItem", id: t }], c = q.util.selectInvalidatedBy(r, a).filter((u) => u.endpointName === "getListItemsInfinite");
4554
+ const r = i(), a = [{ type: "entityListItem", id: t }], c = B.util.selectInvalidatedBy(r, a).filter((u) => u.endpointName === "getListItemsInfinite");
4556
4555
  let d = [];
4557
4556
  for (const u of c) {
4558
4557
  const o = s(
4559
- q.util.updateQueryData("getListItemsInfinite", u.originalArgs, (l) => {
4558
+ B.util.updateQueryData("getListItemsInfinite", u.originalArgs, (l) => {
4560
4559
  for (const p of l.pages) {
4561
4560
  const f = p.items.findIndex((y) => y.id === t);
4562
4561
  if (f !== -1) {
@@ -4609,7 +4608,7 @@ const N = z.injectEndpoints({
4609
4608
  ]
4610
4609
  }
4611
4610
  }
4612
- }), gi = yi.injectEndpoints({
4611
+ }), mi = hi.injectEndpoints({
4613
4612
  endpoints: (t) => ({
4614
4613
  createSessionFromList: t.mutation({
4615
4614
  query: (e) => ({
@@ -4622,21 +4621,21 @@ const N = z.injectEndpoints({
4622
4621
  })
4623
4622
  }), {
4624
4623
  // LIST MUTATIONS
4625
- useCreateEntityListMutation: Ha,
4626
- useUpdateEntityListMutation: Wa,
4627
- useDeleteEntityListMutation: za,
4624
+ useCreateEntityListMutation: Ka,
4625
+ useUpdateEntityListMutation: Ja,
4626
+ useDeleteEntityListMutation: Ya,
4628
4627
  // LIST ITEM MUTATIONS
4629
- useUpdateEntityListItemsMutation: Ka,
4630
- useUpdateEntityListItemMutation: Ja,
4631
- useCreateEntityListItemMutation: Ya,
4632
- useDeleteEntityListItemMutation: Xa,
4628
+ useUpdateEntityListItemsMutation: Xa,
4629
+ useUpdateEntityListItemMutation: Za,
4630
+ useCreateEntityListItemMutation: eo,
4631
+ useDeleteEntityListItemMutation: to,
4633
4632
  // REVIEW SESSION MUTATIONS
4634
- useCreateSessionFromListMutation: Za
4635
- } = gi, Bt = 5, Te = (t) => (t || "").replace(/-/g, ""), hi = (t, e, s) => {
4633
+ useCreateSessionFromListMutation: so
4634
+ } = mi, Ht = 5, Te = (t) => (t || "").replace(/-/g, ""), vi = (t, e, s) => {
4636
4635
  Array.isArray(t.latestComments) || (t.latestComments = []);
4637
4636
  const n = t.latestComments, i = Te(e.activityId), r = n.findIndex((a) => Te(a.activityId) === i);
4638
- s === "delete" ? r !== -1 && n.splice(r, 1) : s === "update" ? r !== -1 && (n[r].body = e.body) : (r !== -1 && n.splice(r, 1), n.unshift(e), n.length > Bt && n.splice(Bt));
4639
- }, mi = [
4637
+ s === "delete" ? r !== -1 && n.splice(r, 1) : s === "update" ? r !== -1 && (n[r].body = e.body) : (r !== -1 && n.splice(r, 1), n.unshift(e), n.length > Ht && n.splice(Ht));
4638
+ }, bi = [
4640
4639
  {
4641
4640
  api: x,
4642
4641
  tag: "overviewTask",
@@ -4647,7 +4646,7 @@ const N = z.injectEndpoints({
4647
4646
  }
4648
4647
  },
4649
4648
  {
4650
- api: q,
4649
+ api: B,
4651
4650
  tag: "entityListItem",
4652
4651
  selectors: {
4653
4652
  getListItemsInfinite: (t) => t?.pages?.flatMap((e) => e.items ?? []) ?? []
@@ -4663,7 +4662,7 @@ const N = z.injectEndpoints({
4663
4662
  getProductsInfinite: (t) => (t?.pages?.flatMap((e) => e.products ?? []) ?? []).map((e) => e.featuredVersion).filter(Boolean)
4664
4663
  }
4665
4664
  }
4666
- ], vi = (t, { dispatch: e, getState: s }, n) => {
4665
+ ], Ii = (t, { dispatch: e, getState: s }, n) => {
4667
4666
  const { patch: i } = t, r = t.entityId ?? i?.entityId, a = i?.activityId ?? t.activityId;
4668
4667
  if (!r || !a) return [];
4669
4668
  if (n === "create" && !(i?.activityType === "comment" && i?.referenceType === "origin"))
@@ -4676,7 +4675,7 @@ const N = z.injectEndpoints({
4676
4675
  author: i?.authorName ?? null,
4677
4676
  createdAt: i?.createdAt ?? ""
4678
4677
  }, d = s(), u = Te(r), o = [];
4679
- for (const { api: l, tag: p, selectors: f } of mi) {
4678
+ for (const { api: l, tag: p, selectors: f } of bi) {
4680
4679
  const y = l.util.selectInvalidatedBy(d, [{ type: p, id: r }]);
4681
4680
  for (const { endpointName: h, originalArgs: g } of y) {
4682
4681
  const m = f[h];
@@ -4684,14 +4683,14 @@ const N = z.injectEndpoints({
4684
4683
  e(
4685
4684
  l.util.updateQueryData(h, g, (v) => {
4686
4685
  for (const b of m(v))
4687
- (Te(b?.id) === u || Te(b?.entityId) === u) && hi(b, c, n);
4686
+ (Te(b?.id) === u || Te(b?.entityId) === u) && vi(b, c, n);
4688
4687
  })
4689
4688
  )
4690
4689
  );
4691
4690
  }
4692
4691
  }
4693
4692
  return o;
4694
- }, bi = (t) => t ? t.includes("* [ ]") || t.includes("* [x]") : !1, Ii = async (t, {
4693
+ }, Ti = (t) => t ? t.includes("* [ ]") || t.includes("* [x]") : !1, ki = async (t, {
4695
4694
  updateCachedData: e,
4696
4695
  cacheDataLoaded: s,
4697
4696
  cacheEntryRemoved: n,
@@ -4704,20 +4703,20 @@ const N = z.injectEndpoints({
4704
4703
  async (o, l) => {
4705
4704
  const p = Array.isArray(t.entityIds) ? t.entityIds : [t.entityIds], f = ["origin", "mention", "relation"], y = t.activityTypes, h = Array.isArray(y) ? y : y ? [y] : [], g = [], m = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set();
4706
4705
  o.forEach(({ topic: k, message: T }) => {
4707
- const A = T.summary?.activity_id;
4708
- if (!A) return;
4709
- const w = (T.summary?.references || []).filter((P) => f.includes(P.reference_type)).map((P) => P.entity_id);
4710
- if (!(!p.some((P) => w.includes(P)) && p.length > 0)) {
4706
+ const w = T.summary?.activity_id;
4707
+ if (!w) return;
4708
+ const A = (T.summary?.references || []).filter((P) => f.includes(P.reference_type)).map((P) => P.entity_id);
4709
+ if (!(!p.some((P) => A.includes(P)) && p.length > 0)) {
4711
4710
  if (k === "activity.deleted") {
4712
- g.push(A);
4711
+ g.push(w);
4713
4712
  return;
4714
4713
  }
4715
- T.summary?.activity_type && (v.add(A), m.set(A, k), w.forEach((P) => b.add(P)));
4714
+ T.summary?.activity_type && (v.add(w), m.set(w, k), A.forEach((P) => b.add(P)));
4716
4715
  }
4717
4716
  }), g.length && e((k) => {
4718
4717
  k.pages?.forEach((T) => {
4719
4718
  T.activities = T.activities?.filter(
4720
- (A) => !g.includes(A.activityId)
4719
+ (w) => !g.includes(w.activityId)
4721
4720
  );
4722
4721
  });
4723
4722
  });
@@ -4737,18 +4736,18 @@ const N = z.injectEndpoints({
4737
4736
  );
4738
4737
  if ("error" in T && T.error) throw new Error("Failed to fetch activities");
4739
4738
  if (!l()) return;
4740
- const A = T.data?.activities || [], w = new Map(
4741
- A.map((E) => [E.activityId, E])
4739
+ const w = T.data?.activities || [], A = new Map(
4740
+ w.map((E) => [E.activityId, E])
4742
4741
  );
4743
4742
  e((E) => {
4744
- w.forEach((P, S) => {
4743
+ A.forEach((P, S) => {
4745
4744
  const j = [P.activityType];
4746
- if (P.activityType === "comment" && bi(P.body || "") && j.push("checklist"), h.length > 0 && !h.some(($) => j.includes($)))
4745
+ if (P.activityType === "comment" && Ti(P.body || "") && j.push("checklist"), h.length > 0 && !h.some(($) => j.includes($)))
4747
4746
  return;
4748
4747
  let _ = !1;
4749
4748
  if (E.pages?.forEach(($) => {
4750
4749
  const C = $.activities?.findIndex(
4751
- (Es) => Es.activityId === S
4750
+ (Ss) => Ss.activityId === S
4752
4751
  );
4753
4752
  C !== void 0 && C !== -1 && $.activities && ($.activities[C] = P, _ = !0);
4754
4753
  }), !_ && m.get(S) === "activity.created" && E.pages?.[0]?.activities?.unshift(P), P.activityType !== "status.change" || P.origin?.type !== "version")
@@ -4806,14 +4805,14 @@ const N = z.injectEndpoints({
4806
4805
  endpoints: {
4807
4806
  // Only used by the infinite query below
4808
4807
  GetActivities: {
4809
- transformResponse: (t) => bt(t.project.activities.edges, t.project.activities.pageInfo),
4810
- providesTags: is
4808
+ transformResponse: (t) => It(t.project.activities.edges, t.project.activities.pageInfo),
4809
+ providesTags: rs
4811
4810
  },
4812
4811
  GetActivitiesById: {
4813
- transformResponse: (t) => bt(t.project.activities.edges, t.project.activities.pageInfo)
4812
+ transformResponse: (t) => It(t.project.activities.edges, t.project.activities.pageInfo)
4814
4813
  },
4815
4814
  GetEntitiesChecklists: {
4816
- transformResponse: (t) => cn(t),
4815
+ transformResponse: (t) => un(t),
4817
4816
  providesTags: (t, e, { entityIds: s }) => t ? [
4818
4817
  { type: "activity", id: "LIST" },
4819
4818
  ...t.ids.map((n) => ({ type: "activity", id: "checklist-" + n })),
@@ -4828,18 +4827,18 @@ const N = z.injectEndpoints({
4828
4827
  providesTags: (t) => t?.length ? [{ type: "user", id: "LIST" }, ...t.map(({ name: e }) => ({ type: "user", id: e }))] : [{ type: "user", id: "LIST" }]
4829
4828
  }
4830
4829
  }
4831
- }), Ht = 30, ye = st.injectEndpoints({
4830
+ }), Wt = 30, ye = st.injectEndpoints({
4832
4831
  endpoints: (t) => ({
4833
4832
  getActivitiesInfinite: t.infiniteQuery({
4834
4833
  infiniteQueryOptions: {
4835
- initialPageParam: { cursor: "", last: Ht },
4834
+ initialPageParam: { cursor: "", last: Wt },
4836
4835
  // Calculate the next page param based on current page response and params
4837
4836
  getNextPageParam: (e) => {
4838
4837
  const s = e.pageInfo;
4839
4838
  if (!(!s.hasPreviousPage || !s.endCursor))
4840
4839
  return {
4841
4840
  cursor: s.endCursor,
4842
- last: Ht
4841
+ last: Wt
4843
4842
  };
4844
4843
  }
4845
4844
  },
@@ -4872,7 +4871,7 @@ const N = z.injectEndpoints({
4872
4871
  }
4873
4872
  },
4874
4873
  async onCacheEntryAdded(e, { updateCachedData: s, cacheDataLoaded: n, cacheEntryRemoved: i, dispatch: r, getCacheEntry: a }) {
4875
- await Ii(e, {
4874
+ await ki(e, {
4876
4875
  updateCachedData: s,
4877
4876
  cacheDataLoaded: n,
4878
4877
  cacheEntryRemoved: i,
@@ -4881,7 +4880,7 @@ const N = z.injectEndpoints({
4881
4880
  gqlApi: st
4882
4881
  });
4883
4882
  },
4884
- providesTags: is
4883
+ providesTags: rs
4885
4884
  }),
4886
4885
  // get data for a reference tooltip based on type,id and projectName
4887
4886
  getEntityTooltip: t.query({
@@ -4889,24 +4888,24 @@ const N = z.injectEndpoints({
4889
4888
  url: "/graphql",
4890
4889
  method: "POST",
4891
4890
  body: {
4892
- query: ln(n),
4891
+ query: fn(n),
4893
4892
  variables: { projectName: e, entityId: s }
4894
4893
  }
4895
4894
  }),
4896
- transformResponse: (e, s, { entityType: n }) => on(e?.data?.project, n),
4897
- providesTags: (e, s, { entityType: n }) => dn([e], "task", n)
4895
+ transformResponse: (e, s, { entityType: n }) => dn(e?.data?.project, n),
4896
+ providesTags: (e, s, { entityType: n }) => ln([e], "task", n)
4898
4897
  })
4899
4898
  }),
4900
4899
  overrideExisting: !0
4901
4900
  }), {
4902
- useGetEntityTooltipQuery: eo,
4903
- useGetActivitiesByIdQuery: to,
4904
- useLazyGetActivitiesByIdQuery: so,
4905
- useGetEntitiesChecklistsQuery: no,
4906
- useGetActivitiesQuery: io,
4907
- useGetActivitiesInfiniteInfiniteQuery: ro,
4908
- useGetActivityUsersQuery: ao
4909
- } = ye, Ti = (t, e, s) => {
4901
+ useGetEntityTooltipQuery: no,
4902
+ useGetActivitiesByIdQuery: io,
4903
+ useLazyGetActivitiesByIdQuery: ro,
4904
+ useGetEntitiesChecklistsQuery: ao,
4905
+ useGetActivitiesQuery: oo,
4906
+ useGetActivitiesInfiniteInfiniteQuery: co,
4907
+ useGetActivityUsersQuery: uo
4908
+ } = ye, wi = (t, e, s) => {
4910
4909
  if (s)
4911
4910
  for (const n of t.pages) {
4912
4911
  const i = n.activities.findIndex((r) => r.activityId === e.activityId);
@@ -4926,12 +4925,12 @@ const N = z.injectEndpoints({
4926
4925
  }
4927
4926
  !n && t.pages.length > 0 && t.pages[0].activities.unshift(e);
4928
4927
  }
4929
- }, ki = (t) => t == null ? "" : typeof t == "string" ? t : JSON.stringify(t), nt = async ({ patch: t, entityIds: e = [], filter: s, refs: n = [], ...i }, r, a) => {
4928
+ }, Ai = (t) => t == null ? "" : typeof t == "string" ? t : JSON.stringify(t), nt = async ({ patch: t, entityIds: e = [], filter: s, refs: n = [], ...i }, r, a) => {
4930
4929
  const { dispatch: c, queryFulfilled: d, getState: u } = r, o = n.map((g) => g.id) || [];
4931
- ki(s);
4930
+ Ai(s);
4932
4931
  const l = [...e, ...o].map((g) => ({
4933
4932
  type: "entityActivities",
4934
- id: g + "-" + ns(s)
4933
+ id: g + "-" + is(s)
4935
4934
  })), p = u(), f = ye.util.selectInvalidatedBy(p, l);
4936
4935
  a !== "delete" && t.data && (t.activityData = { ...t.activityData, ...t.data });
4937
4936
  const y = f.map(
@@ -4939,10 +4938,10 @@ const N = z.injectEndpoints({
4939
4938
  ye.util.updateQueryData(
4940
4939
  "getActivitiesInfinite",
4941
4940
  g,
4942
- (m) => Ti(m, t, a === "delete")
4941
+ (m) => wi(m, t, a === "delete")
4943
4942
  )
4944
4943
  )
4945
- ), h = vi(
4944
+ ), h = Ii(
4946
4945
  { patch: t, ...i },
4947
4946
  r,
4948
4947
  a
@@ -4959,7 +4958,7 @@ const N = z.injectEndpoints({
4959
4958
  id: t + "-" + i
4960
4959
  }));
4961
4960
  return n.push({ type: "activity", id: "LIST" }), n.push({ type: "watchers", id: t }), n;
4962
- }, Ai = ye.injectEndpoints({
4961
+ }, Ei = ye.injectEndpoints({
4963
4962
  endpoints: (t) => ({
4964
4963
  createEntityActivity: t.mutation({
4965
4964
  query: ({ projectName: e, entityType: s, entityId: n, data: i = {} }) => ({
@@ -5000,10 +4999,10 @@ const N = z.injectEndpoints({
5000
4999
  }),
5001
5000
  overrideExisting: !0
5002
5001
  }), {
5003
- useCreateEntityActivityMutation: oo,
5004
- useDeleteActivityMutation: co,
5005
- useUpdateActivityMutation: uo
5006
- } = Ai, Wt = ({ activityId: t, userName: e, reaction: s }, { getState: n, dispatch: i }, r) => {
5002
+ useCreateEntityActivityMutation: lo,
5003
+ useDeleteActivityMutation: po,
5004
+ useUpdateActivityMutation: fo
5005
+ } = Ei, zt = ({ activityId: t, userName: e, reaction: s }, { getState: n, dispatch: i }, r) => {
5007
5006
  const a = [{ type: "activity", id: t }];
5008
5007
  return ye.util.selectInvalidatedBy(n(), a).map((d) => i(
5009
5008
  // @ts-ignore
@@ -5041,11 +5040,11 @@ const N = z.injectEndpoints({
5041
5040
  }
5042
5041
  )
5043
5042
  ));
5044
- }, wi = Pe.enhanceEndpoints({
5043
+ }, Si = Pe.enhanceEndpoints({
5045
5044
  endpoints: {
5046
5045
  createReactionToActivity: {
5047
5046
  async onQueryStarted(t, { getState: e, dispatch: s, queryFulfilled: n }) {
5048
- const i = Wt(
5047
+ const i = zt(
5049
5048
  {
5050
5049
  activityId: t.activityId,
5051
5050
  // @ts-ignore
@@ -5065,7 +5064,7 @@ const N = z.injectEndpoints({
5065
5064
  },
5066
5065
  deleteReactionToActivity: {
5067
5066
  async onQueryStarted(t, { getState: e, dispatch: s, queryFulfilled: n }) {
5068
- const i = Wt(
5067
+ const i = zt(
5069
5068
  // @ts-ignore
5070
5069
  { activityId: t.activityId, userName: t.userName, reaction: t.reaction },
5071
5070
  { getState: e, dispatch: s },
@@ -5080,23 +5079,23 @@ const N = z.injectEndpoints({
5080
5079
  }
5081
5080
  }
5082
5081
  }
5083
- }), { useCreateReactionToActivityMutation: lo, useDeleteReactionToActivityMutation: po } = wi, zt = Pe.enhanceEndpoints({
5082
+ }), { useCreateReactionToActivityMutation: yo, useDeleteReactionToActivityMutation: go } = Si, Kt = Pe.enhanceEndpoints({
5084
5083
  endpoints: {
5085
5084
  suggestEntityMention: {}
5086
5085
  }
5087
- }), Ei = zt.injectEndpoints({
5086
+ }), Pi = Kt.injectEndpoints({
5088
5087
  endpoints: (t) => ({
5089
5088
  getEntityMentions: t.query({
5090
5089
  queryFn: async (e, { dispatch: s }) => {
5091
5090
  const n = await s(
5092
- zt.endpoints.suggestEntityMention.initiate(e)
5091
+ Kt.endpoints.suggestEntityMention.initiate(e)
5093
5092
  );
5094
5093
  return n.error ? { error: L(n.error) } : { data: n.data };
5095
5094
  },
5096
5095
  providesTags: [{ type: "team", id: "LIST" }]
5097
5096
  })
5098
5097
  })
5099
- }), { useGetEntityMentionsQuery: fo } = Ei, dt = { type: "category", id: "LIST" }, ut = { type: "addonSettings", id: "powerpack" }, lt = Pe.enhanceEndpoints({
5098
+ }), { useGetEntityMentionsQuery: ho } = Pi, dt = { type: "category", id: "LIST" }, ut = { type: "addonSettings", id: "powerpack" }, lt = Pe.enhanceEndpoints({
5100
5099
  endpoints: {
5101
5100
  getActivityCategories: {
5102
5101
  transformResponse: (t) => t.categories,
@@ -5107,7 +5106,7 @@ const N = z.injectEndpoints({
5107
5106
  ] : [dt, ut]
5108
5107
  }
5109
5108
  }
5110
- }), Si = lt.injectEndpoints({
5109
+ }), Li = lt.injectEndpoints({
5111
5110
  endpoints: (t) => ({
5112
5111
  getProjectsCategories: t.query({
5113
5112
  async queryFn({ projects: e = [] }, { dispatch: s }) {
@@ -5128,86 +5127,33 @@ const N = z.injectEndpoints({
5128
5127
  providesTags: [dt, ut]
5129
5128
  })
5130
5129
  })
5131
- }), { useGetActivityCategoriesQuery: yo } = lt, { useGetProjectsCategoriesQuery: go } = Si, vs = Fs.enhanceEndpoints({
5130
+ }), { useGetActivityCategoriesQuery: mo } = lt, { useGetProjectsCategoriesQuery: vo } = Li, bs = _s.enhanceEndpoints({
5132
5131
  endpoints: {
5133
5132
  listAddons: {
5134
5133
  providesTags: ["addonList"]
5135
5134
  }
5136
5135
  }
5137
- }), { useListAddonsQuery: ho } = vs, bs = vs.injectEndpoints({
5138
- endpoints: (t) => ({
5139
- // Return a list of addons which have project-scoped frontend
5140
- getProjectAddons: t.query({
5141
- query: () => ({
5142
- url: "/api/addons",
5143
- method: "GET"
5144
- }),
5145
- providesTags: ["projectAddons"],
5146
- transformResponse: (e) => {
5147
- let s = [];
5148
- for (const n of e.addons) {
5149
- const i = n.versions[n.productionVersion];
5150
- if (!i) continue;
5151
- const r = i.frontendScopes.project;
5152
- r && s.push({
5153
- name: n.name,
5154
- title: n.title,
5155
- version: n.productionVersion,
5156
- settings: r
5157
- });
5158
- }
5159
- return s;
5160
- }
5161
- }),
5162
- // Return a list of addons with settings-scoped frontend
5163
- getSettingsAddons: t.query({
5164
- query: () => ({
5165
- url: "/api/addons",
5166
- method: "GET"
5167
- }),
5168
- providesTags: ["settingsAddons"],
5169
- transformResponse: (e) => {
5170
- let s = [];
5171
- for (const n of e.addons) {
5172
- const i = n.versions[n.productionVersion];
5173
- if (!i) continue;
5174
- const r = i.frontendScopes.settings;
5175
- r && s.push({
5176
- name: n.name,
5177
- title: n.title,
5178
- version: n.productionVersion,
5179
- settings: r
5180
- });
5181
- }
5182
- return s;
5183
- }
5184
- }),
5185
- // Return a list of addons with dashboard-scoped frontend
5186
- getDashboardAddons: t.query({
5187
- query: () => ({
5188
- url: "/api/addons",
5189
- method: "GET"
5190
- }),
5191
- providesTags: ["dashboardAddons"],
5192
- transformResponse: (e) => {
5193
- let s = [];
5194
- for (const n of e.addons) {
5195
- const i = n.versions[n.productionVersion];
5196
- if (!i) continue;
5197
- const r = i.frontendScopes.dashboard;
5198
- r && s.push({
5199
- name: n.name,
5200
- title: n.title,
5201
- version: n.productionVersion,
5202
- settings: r
5203
- });
5204
- }
5205
- return s;
5206
- }
5207
- })
5208
- }),
5209
- overrideExisting: !0
5210
- }), { useGetProjectAddonsQuery: mo, useGetSettingsAddonsQuery: vo, useGetDashboardAddonsQuery: bo } = bs, rt = bs.enhanceEndpoints({
5136
+ }), { useListAddonsQuery: ji } = bs, Fi = (t, e) => {
5137
+ const s = [];
5138
+ for (const n of t.addons) {
5139
+ const i = n.versions[n.productionVersion];
5140
+ if (!i) continue;
5141
+ const r = i.frontendScopes?.[e];
5142
+ r && s.push({
5143
+ name: n.name,
5144
+ title: n.title,
5145
+ version: n.productionVersion,
5146
+ settings: r
5147
+ });
5148
+ }
5149
+ return s;
5150
+ }, vt = (t) => (e, s) => {
5151
+ const n = ji({}, s), i = Js(
5152
+ () => n.data ? Fi(n.data, t) : void 0,
5153
+ [n.data]
5154
+ );
5155
+ return { ...n, data: i };
5156
+ }, bo = vt("project"), Io = vt("settings"), To = vt("dashboard"), rt = bs.enhanceEndpoints({
5211
5157
  endpoints: {
5212
5158
  deleteAddonVersion: {
5213
5159
  invalidatesTags: ["addonList"]
@@ -5271,7 +5217,7 @@ const N = z.injectEndpoints({
5271
5217
  }),
5272
5218
  // endpoints
5273
5219
  overrideExisting: !0
5274
- }), { useDeleteAddonVersionsMutation: Io, useDownloadAddonsMutation: To } = Is, Ts = _s.enhanceEndpoints({
5220
+ }), { useDeleteAddonVersionsMutation: ko, useDownloadAddonsMutation: wo } = Is, Ts = Rs.enhanceEndpoints({
5275
5221
  endpoints: {
5276
5222
  getAttributeList: {
5277
5223
  transformResponse: (t) => t.attributes || [],
@@ -5284,7 +5230,7 @@ const N = z.injectEndpoints({
5284
5230
  ]
5285
5231
  }
5286
5232
  }
5287
- }), { useGetAttributeListQuery: ko, useGetAttributeConfigQuery: Ao } = Ts, Pi = Ts.enhanceEndpoints({
5233
+ }), { useGetAttributeListQuery: Ao, useGetAttributeConfigQuery: Eo } = Ts, _i = Ts.enhanceEndpoints({
5288
5234
  endpoints: {
5289
5235
  setAttributeList: {
5290
5236
  invalidatesTags: ["attribute"]
@@ -5296,21 +5242,21 @@ const N = z.injectEndpoints({
5296
5242
  invalidatesTags: (t, e, { attributeName: s }) => [{ type: "attribute", id: s }]
5297
5243
  }
5298
5244
  }
5299
- }), { useSetAttributeListMutation: wo, usePatchAttributeConfigMutation: Eo } = Pi, Li = Rs.enhanceEndpoints({
5245
+ }), { useSetAttributeListMutation: So, usePatchAttributeConfigMutation: Po } = _i, Ri = Gs.enhanceEndpoints({
5300
5246
  endpoints: {
5301
5247
  createSession: {},
5302
5248
  getUserPools: {
5303
5249
  providesTags: [{ type: "userPool", id: "LIST" }]
5304
5250
  }
5305
5251
  }
5306
- }), { useCreateSessionMutation: So, useGetUserPoolsQuery: Po } = Li, pt = Gs.enhanceEndpoints({
5252
+ }), { useCreateSessionMutation: Lo, useGetUserPoolsQuery: jo } = Ri, pt = Cs.enhanceEndpoints({
5307
5253
  endpoints: {
5308
5254
  listBundles: {
5309
5255
  providesTags: () => [{ type: "bundleList" }]
5310
5256
  },
5311
5257
  checkBundleCompatibility: {}
5312
5258
  }
5313
- }), ji = Se.enhanceEndpoints({
5259
+ }), Gi = Se.enhanceEndpoints({
5314
5260
  endpoints: {
5315
5261
  getProjectBundleInfo: {
5316
5262
  providesTags: (t, e, { projectName: s }) => [
@@ -5319,7 +5265,7 @@ const N = z.injectEndpoints({
5319
5265
  ]
5320
5266
  }
5321
5267
  }
5322
- }), { useListBundlesQuery: Lo, useLazyListBundlesQuery: jo, useCheckBundleCompatibilityQuery: Fo } = pt, { useGetProjectBundleInfoQuery: _o } = ji, Fi = pt.enhanceEndpoints({
5268
+ }), { useListBundlesQuery: Fo, useLazyListBundlesQuery: _o, useCheckBundleCompatibilityQuery: Ro } = pt, { useGetProjectBundleInfoQuery: Go } = Gi, Ci = pt.enhanceEndpoints({
5323
5269
  endpoints: {
5324
5270
  migrateSettingsByBundle: {
5325
5271
  invalidatesTags: () => [
@@ -5350,11 +5296,12 @@ const N = z.injectEndpoints({
5350
5296
  { type: "bundleList" },
5351
5297
  { type: "addonList" },
5352
5298
  { type: "addonSettingsList" },
5353
- { type: "marketAddon" }
5299
+ { type: "marketAddon" },
5300
+ { type: "frontendModules" }
5354
5301
  ]
5355
5302
  }
5356
5303
  }
5357
- }), _i = Se.enhanceEndpoints({
5304
+ }), Ni = Se.enhanceEndpoints({
5358
5305
  endpoints: {
5359
5306
  unsetProjectBundle: {
5360
5307
  invalidatesTags: (t, e, { projectName: s }) => [
@@ -5367,7 +5314,7 @@ const N = z.injectEndpoints({
5367
5314
  ]
5368
5315
  }
5369
5316
  }
5370
- }), Ri = Fi.injectEndpoints({
5317
+ }), Qi = Ci.injectEndpoints({
5371
5318
  endpoints: (t) => ({
5372
5319
  deleteBundle: t.mutation({
5373
5320
  query: ({ name: e }) => ({
@@ -5378,7 +5325,8 @@ const N = z.injectEndpoints({
5378
5325
  invalidatesTags: () => [
5379
5326
  { type: "bundleList" },
5380
5327
  { type: "addonList" },
5381
- { type: "addonSettingsList" }
5328
+ { type: "addonSettingsList" },
5329
+ { type: "frontendModules" }
5382
5330
  ]
5383
5331
  }),
5384
5332
  promoteBundle: t.mutation({
@@ -5394,7 +5342,8 @@ const N = z.injectEndpoints({
5394
5342
  { type: "addonSettingsList" },
5395
5343
  { type: "addonSettings" },
5396
5344
  { type: "addonSettingsOverrides" },
5397
- { type: "marketAddon" }
5345
+ { type: "marketAddon" },
5346
+ { type: "frontendModules" }
5398
5347
  ]
5399
5348
  }),
5400
5349
  createBundle: t.mutation({
@@ -5414,19 +5363,20 @@ const N = z.injectEndpoints({
5414
5363
  // TODO: invalidate settings
5415
5364
  { type: "addonSettings" },
5416
5365
  { type: "addonSettingsOverrides" },
5417
- { type: "addonSettingsList" }
5366
+ { type: "addonSettingsList" },
5367
+ { type: "frontendModules" }
5418
5368
  ]
5419
5369
  })
5420
5370
  }),
5421
5371
  // endpoints
5422
5372
  overrideExisting: !0
5423
5373
  }), {
5424
- useDeleteBundleMutation: Ro,
5425
- useCreateBundleMutation: Go,
5426
- usePromoteBundleMutation: Co,
5427
- useMigrateSettingsByBundleMutation: No,
5428
- useUpdateBundleMutation: Qo
5429
- } = Ri, { useUnsetProjectBundleMutation: Mo } = _i, Gi = Cs.enhanceEndpoints({
5374
+ useDeleteBundleMutation: Co,
5375
+ useCreateBundleMutation: No,
5376
+ usePromoteBundleMutation: Qo,
5377
+ useMigrateSettingsByBundleMutation: Mo,
5378
+ useUpdateBundleMutation: Vo
5379
+ } = Qi, { useUnsetProjectBundleMutation: Do } = Ni, Mi = Ns.enhanceEndpoints({
5430
5380
  endpoints: {
5431
5381
  getYnputCloudInfo: {
5432
5382
  providesTags: ["connections"]
@@ -5442,11 +5392,11 @@ const N = z.injectEndpoints({
5442
5392
  }
5443
5393
  }
5444
5394
  }), {
5445
- useGetYnputCloudInfoQuery: Vo,
5446
- useSetYnputCloudKeyMutation: Do,
5447
- useDeleteYnputCloudKeyMutation: Oo,
5448
- useGetFeedbackVerificationQuery: $o
5449
- } = Gi, ks = Ns.enhanceEndpoints({
5395
+ useGetYnputCloudInfoQuery: Oo,
5396
+ useSetYnputCloudKeyMutation: $o,
5397
+ useDeleteYnputCloudKeyMutation: xo,
5398
+ useGetFeedbackVerificationQuery: Uo
5399
+ } = Mi, ks = Qs.enhanceEndpoints({
5450
5400
  endpoints: {
5451
5401
  getServerConfig: {
5452
5402
  providesTags: ["config"]
@@ -5460,17 +5410,17 @@ const N = z.injectEndpoints({
5460
5410
  }
5461
5411
  }
5462
5412
  }), {
5463
- useGetServerConfigQuery: xo,
5464
- useGetServerConfigOverridesQuery: Uo,
5465
- useGetServerConfigSchemaQuery: qo,
5466
- useGetConfigValueQuery: Bo
5467
- } = ks, Ci = ks.enhanceEndpoints({
5413
+ useGetServerConfigQuery: Bo,
5414
+ useGetServerConfigOverridesQuery: qo,
5415
+ useGetServerConfigSchemaQuery: Ho,
5416
+ useGetConfigValueQuery: Wo
5417
+ } = ks, Vi = ks.enhanceEndpoints({
5468
5418
  endpoints: {
5469
5419
  setServerConfig: {
5470
5420
  invalidatesTags: ["config"]
5471
5421
  }
5472
5422
  }
5473
- }), { useSetServerConfigMutation: Ho } = Ci, ft = ue.enhanceEndpoints({
5423
+ }), { useSetServerConfigMutation: zo } = Vi, ft = ue.enhanceEndpoints({
5474
5424
  endpoints: {
5475
5425
  getEntityListAttributesDefinition: {
5476
5426
  providesTags: (t, e, { listId: s }) => t ? [
@@ -5479,7 +5429,7 @@ const N = z.injectEndpoints({
5479
5429
  ] : [{ type: "entityListAttribute", id: "LIST" }]
5480
5430
  }
5481
5431
  }
5482
- }), { useGetEntityListAttributesDefinitionQuery: Wo } = ft, Ni = (t) => t.startsWith("attrib.") ? `_all_attrib.${t.slice(7)}` : t.startsWith("inherited_attributes.") ? `_all_attrib.${t.slice(21)}` : `_entity_${t}`, Qi = (t) => t.startsWith("_all_attrib_") ? `attrib_${t.slice(12)}` : t.startsWith("_entity_") ? t.slice(8) : t, zo = (t) => t.map((e) => ({ ...e, field: Ni(e.field) })), Mi = Q.enhanceEndpoints({
5432
+ }), { useGetEntityListAttributesDefinitionQuery: Ko } = ft, Di = (t) => t.startsWith("attrib.") ? `_all_attrib.${t.slice(7)}` : t.startsWith("inherited_attributes.") ? `_all_attrib.${t.slice(21)}` : `_entity_${t}`, Oi = (t) => t.startsWith("_all_attrib_") ? `attrib_${t.slice(12)}` : t.startsWith("_entity_") ? t.slice(8) : t, Jo = (t) => t.map((e) => ({ ...e, field: Di(e.field) })), $i = Q.enhanceEndpoints({
5483
5433
  endpoints: {
5484
5434
  // same caching as the other column stats endpoints: `targets` excluded
5485
5435
  // from the cache key, responses merged, only added targets refetch
@@ -5487,19 +5437,19 @@ const N = z.injectEndpoints({
5487
5437
  transformResponse: (t) => {
5488
5438
  const e = t?.project?.entityLists?.edges?.[0]?.node?.items?.fieldStats ?? [];
5489
5439
  return ke(
5490
- e.map((s) => ({ ...s, columnName: Qi(s.columnName) }))
5440
+ e.map((s) => ({ ...s, columnName: Oi(s.columnName) }))
5491
5441
  );
5492
5442
  },
5493
5443
  serializeQueryArgs: ({ queryArgs: { targets: t, ...e } }) => e,
5494
- merge: (t, e) => Ae(e, t),
5495
- forceRefetch: ({ currentArg: t, previousArg: e }) => we(t, e),
5444
+ merge: (t, e) => we(e, t),
5445
+ forceRefetch: ({ currentArg: t, previousArg: e }) => Ae(t, e),
5496
5446
  providesTags: (t, e, { listId: s, projectName: n }) => [
5497
5447
  { type: "entityListItemsColumnStats", id: s },
5498
5448
  { type: "entityListItemsColumnStats", id: n }
5499
5449
  ]
5500
5450
  }
5501
5451
  }
5502
- }), { useGetListItemsColumnStatsQuery: Ko } = Mi, Vi = ft.enhanceEndpoints({
5452
+ }), { useGetListItemsColumnStatsQuery: Yo } = $i, xi = ft.enhanceEndpoints({
5503
5453
  endpoints: {
5504
5454
  setEntityListAttributesDefinition: {
5505
5455
  onQueryStarted: async (t, { dispatch: e, queryFulfilled: s }) => {
@@ -5519,7 +5469,7 @@ const N = z.injectEndpoints({
5519
5469
  invalidatesTags: (t, e, { listId: s }) => [{ type: "entityListAttribute", id: s }]
5520
5470
  }
5521
5471
  }
5522
- }), { useSetEntityListAttributesDefinitionMutation: Jo } = Vi, Ge = { type: "entityListFolder", id: "LIST" }, Me = ue.enhanceEndpoints({
5472
+ }), { useSetEntityListAttributesDefinitionMutation: Xo } = xi, Ge = { type: "entityListFolder", id: "LIST" }, Me = ue.enhanceEndpoints({
5523
5473
  endpoints: {
5524
5474
  getEntityListFolders: {
5525
5475
  transformResponse: (t) => t.folders || [],
@@ -5537,7 +5487,7 @@ const N = z.injectEndpoints({
5537
5487
  (r) => {
5538
5488
  const a = {
5539
5489
  ...e,
5540
- id: e.id || ss()
5490
+ id: e.id || ns()
5541
5491
  };
5542
5492
  r.push(a);
5543
5493
  }
@@ -5607,15 +5557,15 @@ const N = z.injectEndpoints({
5607
5557
  }
5608
5558
  }
5609
5559
  }), {
5610
- useGetEntityListFoldersQuery: Yo,
5611
- useCreateEntityListFolderMutation: Xo,
5612
- useDeleteEntityListFolderMutation: Zo,
5613
- useUpdateEntityListFolderMutation: ec
5614
- } = Me, Di = Qs.enhanceEndpoints({
5560
+ useGetEntityListFoldersQuery: Zo,
5561
+ useCreateEntityListFolderMutation: ec,
5562
+ useDeleteEntityListFolderMutation: tc,
5563
+ useUpdateEntityListFolderMutation: sc
5564
+ } = Me, Ui = Ms.enhanceEndpoints({
5615
5565
  endpoints: {
5616
5566
  getEntityGroups: {}
5617
5567
  }
5618
- }), { useGetEntityGroupsQuery: tc } = Di, Kt = async (t, e, s, n) => {
5568
+ }), { useGetEntityGroupsQuery: nc } = Ui, Jt = async (t, e, s, n) => {
5619
5569
  switch (t) {
5620
5570
  case "task":
5621
5571
  return (await n(
@@ -5662,7 +5612,7 @@ const N = z.injectEndpoints({
5662
5612
  default:
5663
5613
  throw new Error(`Unknown entity type: ${t}`);
5664
5614
  }
5665
- }, Jt = ({
5615
+ }, Yt = ({
5666
5616
  projectName: t,
5667
5617
  sourceEntity: e,
5668
5618
  targetEntity: s,
@@ -5706,13 +5656,13 @@ const N = z.injectEndpoints({
5706
5656
  parents: f.parents,
5707
5657
  subType: f.subType
5708
5658
  }
5709
- }, A = k.links.findIndex(
5710
- (w) => w.id === n
5659
+ }, w = k.links.findIndex(
5660
+ (A) => A.id === n
5711
5661
  );
5712
- A !== -1 ? k.links[A] = T : (console.log(
5662
+ w !== -1 ? k.links[w] = T : (console.log(
5713
5663
  `Adding new link to ${p.entityType} links cache`,
5714
5664
  T,
5715
- Ks(k)
5665
+ Ys(k)
5716
5666
  ), k.links.push(T));
5717
5667
  }
5718
5668
  }
@@ -5733,7 +5683,7 @@ const N = z.injectEndpoints({
5733
5683
  ));
5734
5684
  };
5735
5685
  o(e, s, r), o(s, e, r === "in" ? "out" : "in");
5736
- }, Oi = Ms.enhanceEndpoints({
5686
+ }, Bi = Vs.enhanceEndpoints({
5737
5687
  endpoints: {
5738
5688
  deleteEntityLink: {
5739
5689
  async onQueryStarted({ linkId: t, projectName: e, patch: s }, { dispatch: n, getState: i, queryFulfilled: r }) {
@@ -5742,7 +5692,7 @@ const N = z.injectEndpoints({
5742
5692
  const d = s?.source, u = s?.target, o = s?.linkType || "", l = s?.direction || "out";
5743
5693
  if (d && u)
5744
5694
  try {
5745
- Jt(
5695
+ Yt(
5746
5696
  {
5747
5697
  projectName: e,
5748
5698
  sourceEntity: d,
@@ -5777,12 +5727,12 @@ const N = z.injectEndpoints({
5777
5727
  const o = s?.source, l = o?.entityType, p = o?.entityId, f = s?.target, y = f?.entityType, h = f?.entityId, g = s?.direction || "out", m = a?.split("|")[0];
5778
5728
  try {
5779
5729
  if (o && o.entityType && f) {
5780
- const v = Kt(
5730
+ const v = Jt(
5781
5731
  l,
5782
5732
  p,
5783
5733
  t,
5784
5734
  n
5785
- ), b = Kt(
5735
+ ), b = Jt(
5786
5736
  y,
5787
5737
  h,
5788
5738
  t,
@@ -5792,14 +5742,14 @@ const N = z.injectEndpoints({
5792
5742
  throw new Error("Source or target entity data not found");
5793
5743
  if (!c)
5794
5744
  throw new Error("Link ID not found in cache entry");
5795
- const A = {
5745
+ const w = {
5796
5746
  entityType: l,
5797
5747
  entityId: p,
5798
5748
  name: k.name,
5799
5749
  label: "label" in k ? k.label : void 0,
5800
5750
  parents: k.parents || [],
5801
5751
  subType: "subType" in k ? k.subType : void 0
5802
- }, w = {
5752
+ }, A = {
5803
5753
  entityType: y,
5804
5754
  entityId: h,
5805
5755
  name: T.name,
@@ -5807,11 +5757,11 @@ const N = z.injectEndpoints({
5807
5757
  parents: T.parents || [],
5808
5758
  subType: "subType" in T ? T.subType : void 0
5809
5759
  };
5810
- Jt(
5760
+ Yt(
5811
5761
  {
5812
5762
  projectName: t,
5813
- sourceEntity: A,
5814
- targetEntity: w,
5763
+ sourceEntity: w,
5764
+ targetEntity: A,
5815
5765
  linkId: c,
5816
5766
  linkType: m,
5817
5767
  direction: g,
@@ -5835,7 +5785,7 @@ const N = z.injectEndpoints({
5835
5785
  }
5836
5786
  }
5837
5787
  }
5838
- }), { useDeleteEntityLinkMutation: sc, useCreateEntityLinkMutation: nc } = Oi, $i = 50, he = (t, e) => e ? { entityType: t, entityId: e.id, thumbnailHash: e.thumbnailHash || void 0 } : void 0, xi = M.injectEndpoints({
5788
+ }), { useDeleteEntityLinkMutation: ic, useCreateEntityLinkMutation: rc } = Bi, qi = 50, he = (t, e) => e ? { entityType: t, entityId: e.id, thumbnailHash: e.thumbnailHash || void 0 } : void 0, Hi = M.injectEndpoints({
5839
5789
  endpoints: (t) => ({
5840
5790
  getSearchedEntitiesLinks: t.infiniteQuery({
5841
5791
  infiniteQueryOptions: {
@@ -5852,7 +5802,7 @@ const N = z.injectEndpoints({
5852
5802
  try {
5853
5803
  const { projectName: i, entityType: r, search: a, parentIds: c, hasReviewables: d, includeTask: u } = e, { cursor: o } = s, l = {
5854
5804
  projectName: i,
5855
- first: $i
5805
+ first: qi
5856
5806
  };
5857
5807
  o && (l.after = o), l.search = a || "", l.parentIds = c, l.hasReviewables = d, l.includeTask = !!u;
5858
5808
  let p;
@@ -5990,7 +5940,7 @@ const N = z.injectEndpoints({
5990
5940
  }
5991
5941
  })
5992
5942
  })
5993
- }), { useGetSearchedEntitiesLinksInfiniteQuery: ic } = xi, Ui = 5e3, qi = 5e4, Bi = M.injectEndpoints({
5943
+ }), { useGetSearchedEntitiesLinksInfiniteQuery: ac } = Hi, Wi = 5e3, zi = 5e4, Ki = M.injectEndpoints({
5994
5944
  endpoints: (t) => ({
5995
5945
  /**
5996
5946
  * All links into or out of a set of entities, grouped by entity like
@@ -6007,7 +5957,7 @@ const N = z.injectEndpoints({
6007
5957
  do {
6008
5958
  const o = await i(
6009
5959
  M.endpoints[r].initiate(
6010
- { projectName: e, entityIds: s, first: Ui, after: c },
5960
+ { projectName: e, entityIds: s, first: Wi, after: c },
6011
5961
  { forceRefetch: !0, subscribe: !1 }
6012
5962
  )
6013
5963
  ).unwrap(), { edges: l, pageInfo: p } = o.project.links;
@@ -6028,7 +5978,7 @@ const N = z.injectEndpoints({
6028
5978
  isRestricted: !g
6029
5979
  });
6030
5980
  }
6031
- d += l.length, c = p.hasNextPage ? p.endCursor : void 0, u = !!c && d >= qi;
5981
+ d += l.length, c = p.hasNextPage ? p.endCursor : void 0, u = !!c && d >= zi;
6032
5982
  } while (c && !u);
6033
5983
  } catch (o) {
6034
5984
  return { error: L(o) };
@@ -6042,7 +5992,7 @@ const N = z.injectEndpoints({
6042
5992
  }
6043
5993
  })
6044
5994
  })
6045
- }), { useGetLinksOfEntitiesQuery: rc } = Bi, Hi = es.enhanceEndpoints({
5995
+ }), { useGetLinksOfEntitiesQuery: oc } = Ki, Ji = ts.enhanceEndpoints({
6046
5996
  endpoints: {
6047
5997
  getMyPermissions: {
6048
5998
  providesTags: (t) => [{ type: "userPermissions" }]
@@ -6051,13 +6001,13 @@ const N = z.injectEndpoints({
6051
6001
  providesTags: (t, e, s) => [{ type: "userProjectPermissions" }]
6052
6002
  }
6053
6003
  }
6054
- }), { useGetMyPermissionsQuery: ac, useGetMyProjectPermissionsQuery: oc } = Hi, As = Vs.enhanceEndpoints({
6004
+ }), { useGetMyPermissionsQuery: cc, useGetMyProjectPermissionsQuery: dc } = Ji, ws = Ds.enhanceEndpoints({
6055
6005
  endpoints: {
6056
6006
  getProductTypes: {
6057
6007
  providesTags: (t, e, s) => [{ type: "productType", id: "LIST" }]
6058
6008
  }
6059
6009
  }
6060
- }), { useGetProductTypesQuery: cc } = As, Wi = As.enhanceEndpoints({
6010
+ }), { useGetProductTypesQuery: uc } = ws, Yi = ws.enhanceEndpoints({
6061
6011
  endpoints: {
6062
6012
  createProduct: {
6063
6013
  invalidatesTags: (t, e, { productPostModel: s }) => [
@@ -6065,7 +6015,7 @@ const N = z.injectEndpoints({
6065
6015
  ]
6066
6016
  }
6067
6017
  }
6068
- }), { useCreateProductMutation: dc } = Wi, zi = Q.enhanceEndpoints({
6018
+ }), { useCreateProductMutation: lc } = Yi, Xi = Q.enhanceEndpoints({
6069
6019
  endpoints: {
6070
6020
  GetFolderProducts: {
6071
6021
  transformResponse: (t) => (t?.project?.products?.edges || []).map((s) => ({
@@ -6089,7 +6039,7 @@ const N = z.injectEndpoints({
6089
6039
  ] : [{ type: "product", id: s }]
6090
6040
  }
6091
6041
  }
6092
- }), { useGetFolderProductsQuery: uc } = zi, oe = { type: "projectFolder", id: "LIST" }, Ve = Ds.enhanceEndpoints({
6042
+ }), { useGetFolderProductsQuery: pc } = Xi, oe = { type: "projectFolder", id: "LIST" }, Ve = Os.enhanceEndpoints({
6093
6043
  endpoints: {
6094
6044
  getProjectFolders: {
6095
6045
  transformResponse: (t) => t.folders || [],
@@ -6107,7 +6057,7 @@ const N = z.injectEndpoints({
6107
6057
  (i) => {
6108
6058
  const r = {
6109
6059
  ...t,
6110
- id: t.id || ss()
6060
+ id: t.id || ns()
6111
6061
  };
6112
6062
  i.push(r);
6113
6063
  }
@@ -6218,13 +6168,13 @@ const N = z.injectEndpoints({
6218
6168
  }
6219
6169
  }
6220
6170
  }), {
6221
- useGetProjectFoldersQuery: lc,
6222
- useCreateProjectFolderMutation: pc,
6223
- useDeleteProjectFolderMutation: fc,
6224
- useUpdateProjectFolderMutation: yc,
6225
- useSetProjectFoldersOrderMutation: gc,
6226
- useAssignProjectsToFolderMutation: hc
6227
- } = Ve, ws = (t, {
6171
+ useGetProjectFoldersQuery: fc,
6172
+ useCreateProjectFolderMutation: yc,
6173
+ useDeleteProjectFolderMutation: gc,
6174
+ useUpdateProjectFolderMutation: hc,
6175
+ useSetProjectFoldersOrderMutation: mc,
6176
+ useAssignProjectsToFolderMutation: vc
6177
+ } = Ve, As = (t, {
6228
6178
  productId: e,
6229
6179
  taskId: s,
6230
6180
  folderId: n,
@@ -6259,11 +6209,11 @@ const N = z.injectEndpoints({
6259
6209
  a.push(...u);
6260
6210
  }
6261
6211
  return a;
6262
- }, Ki = X.enhanceEndpoints({
6212
+ }, Zi = X.enhanceEndpoints({
6263
6213
  endpoints: {
6264
6214
  getReviewablesForVersion: {
6265
6215
  keepUnusedDataFor: 1,
6266
- providesTags: (t, e, { versionId: s }) => ws([t], { versionId: s, productId: t?.productId }),
6216
+ providesTags: (t, e, { versionId: s }) => As([t], { versionId: s, productId: t?.productId }),
6267
6217
  async onCacheEntryAdded({ versionId: t }, { updateCachedData: e, cacheDataLoaded: s, cacheEntryRemoved: n, dispatch: i, getCacheEntry: r }) {
6268
6218
  let a;
6269
6219
  const c = U(
@@ -6322,7 +6272,7 @@ const N = z.injectEndpoints({
6322
6272
  }
6323
6273
  }
6324
6274
  }
6325
- }), vt = Ki.injectEndpoints({
6275
+ }), bt = Zi.injectEndpoints({
6326
6276
  endpoints: (t) => ({
6327
6277
  // custom endpoint to get reviewables from product/task/folder
6328
6278
  // utilizes getReviewablesForProduct, getReviewablesForTask, getReviewablesForFolder
@@ -6357,7 +6307,7 @@ const N = z.injectEndpoints({
6357
6307
  const c = await r(a);
6358
6308
  return c.error ? { error: L(c.error) } : { data: c.data };
6359
6309
  },
6360
- providesTags: (e, s, n) => ws(e, n, !0),
6310
+ providesTags: (e, s, n) => As(e, n, !0),
6361
6311
  async onCacheEntryAdded({ productId: e, taskId: s, folderId: n }, { cacheDataLoaded: i, cacheEntryRemoved: r, dispatch: a, getCacheEntry: c }) {
6362
6312
  let d;
6363
6313
  const u = U(
@@ -6389,10 +6339,10 @@ const N = z.injectEndpoints({
6389
6339
  })
6390
6340
  })
6391
6341
  }), {
6392
- useGetViewerReviewablesQuery: mc,
6393
- useGetReviewablesForVersionQuery: vc,
6394
- useHasTranscoderQuery: bc
6395
- } = vt, Ji = vt.injectEndpoints({
6342
+ useGetViewerReviewablesQuery: bc,
6343
+ useGetReviewablesForVersionQuery: Ic,
6344
+ useHasTranscoderQuery: Tc
6345
+ } = bt, er = bt.injectEndpoints({
6396
6346
  endpoints: (t) => ({
6397
6347
  deleteReviewable: t.mutation(
6398
6348
  {
@@ -6410,13 +6360,13 @@ const N = z.injectEndpoints({
6410
6360
  }
6411
6361
  )
6412
6362
  })
6413
- }), Yi = Ji.enhanceEndpoints({
6363
+ }), tr = er.enhanceEndpoints({
6414
6364
  endpoints: {
6415
6365
  // reviewables list is updated optimistically
6416
6366
  sortVersionReviewables: {
6417
6367
  async onQueryStarted({ projectName: t, versionId: e, sortReviewablesRequest: s }, { dispatch: n, queryFulfilled: i }) {
6418
6368
  const r = n(
6419
- vt.util.updateQueryData(
6369
+ bt.util.updateQueryData(
6420
6370
  "getReviewablesForVersion",
6421
6371
  { projectName: t, versionId: e },
6422
6372
  (a) => {
@@ -6443,16 +6393,16 @@ const N = z.injectEndpoints({
6443
6393
  }
6444
6394
  }
6445
6395
  }), {
6446
- useDeleteReviewableMutation: Ic,
6447
- useSortVersionReviewablesMutation: Tc,
6448
- useUpdateReviewableMutation: kc
6449
- } = Yi, Yt = (t) => {
6396
+ useDeleteReviewableMutation: kc,
6397
+ useSortVersionReviewablesMutation: wc,
6398
+ useUpdateReviewableMutation: Ac
6399
+ } = tr, Xt = (t) => {
6450
6400
  const e = [{ type: "shared", id: "LIST" }];
6451
6401
  return t && e.push({
6452
6402
  type: "shared",
6453
6403
  id: t.toUpperCase()
6454
6404
  }), e;
6455
- }, Xi = (t) => {
6405
+ }, sr = (t) => {
6456
6406
  const e = [];
6457
6407
  for (const s of t) {
6458
6408
  const n = { type: "shared", id: s.value };
@@ -6478,14 +6428,14 @@ const N = z.injectEndpoints({
6478
6428
  }
6479
6429
  }
6480
6430
  return e;
6481
- }, Zi = Zt.enhanceEndpoints({
6431
+ }, nr = es.enhanceEndpoints({
6482
6432
  endpoints: {
6483
6433
  getShareOptions: {
6484
6434
  transformResponse: (t) => t?.options || [],
6485
- providesTags: (t, e, { projectName: s }) => t ? [...Xi(t), ...Yt(s)] : Yt(s)
6435
+ providesTags: (t, e, { projectName: s }) => t ? [...sr(t), ...Xt(s)] : Xt(s)
6486
6436
  }
6487
6437
  }
6488
- }), { useGetShareOptionsQuery: Ac } = Zi, er = Os.enhanceEndpoints({
6438
+ }), { useGetShareOptionsQuery: Ec } = nr, Es = $s.enhanceEndpoints({
6489
6439
  endpoints: {
6490
6440
  getSiteInfo: {
6491
6441
  providesTags: (t) => t ? [
@@ -6499,10 +6449,22 @@ const N = z.injectEndpoints({
6499
6449
  ] : ["info", "attribute"]
6500
6450
  },
6501
6451
  listFrontendModules: {
6502
- providesTags: ["info"]
6452
+ providesTags: ["info", "frontendModules"],
6453
+ // production addon versions can change without a server restart (bundle edits),
6454
+ // so refetch on bundle events to pick up the new versions
6455
+ async onCacheEntryAdded(t, { dispatch: e, cacheDataLoaded: s, cacheEntryRemoved: n }) {
6456
+ let i;
6457
+ try {
6458
+ await s, i = F.subscribe("bundle", () => {
6459
+ e(Es.util.invalidateTags(["frontendModules"]));
6460
+ });
6461
+ } catch {
6462
+ }
6463
+ await n, F.unsubscribe(i);
6464
+ }
6503
6465
  }
6504
6466
  }
6505
- }), { useGetSiteInfoQuery: wc, useLazyGetSiteInfoQuery: Ec, useListFrontendModulesQuery: Sc } = er, tr = at.enhanceEndpoints({
6467
+ }), { useGetSiteInfoQuery: Sc, useLazyGetSiteInfoQuery: Pc, useListFrontendModulesQuery: Lc } = Es, ir = at.enhanceEndpoints({
6506
6468
  endpoints: {
6507
6469
  getTask: {
6508
6470
  providesTags: (t, e, { taskId: s }) => [
@@ -6510,11 +6472,11 @@ const N = z.injectEndpoints({
6510
6472
  ]
6511
6473
  }
6512
6474
  }
6513
- }), { useGetTaskQuery: Pc } = tr, sr = (t, e, { state: s, dispatch: n }, i) => {
6514
- const r = [{ type: "entityListItem", id: t }], a = q.util.selectInvalidatedBy(s, r).filter((c) => c.endpointName === "getListItemsInfinite");
6475
+ }), { useGetTaskQuery: jc } = ir, rr = (t, e, { state: s, dispatch: n }, i) => {
6476
+ const r = [{ type: "entityListItem", id: t }], a = B.util.selectInvalidatedBy(s, r).filter((c) => c.endpointName === "getListItemsInfinite");
6515
6477
  for (const c of a) {
6516
6478
  const d = n(
6517
- q.util.updateQueryData("getListItemsInfinite", c.originalArgs, (u) => {
6479
+ B.util.updateQueryData("getListItemsInfinite", c.originalArgs, (u) => {
6518
6480
  for (const o of u.pages) {
6519
6481
  const l = o.items.findIndex((p) => p.entityId === t);
6520
6482
  if (l !== -1) {
@@ -6526,7 +6488,7 @@ const N = z.injectEndpoints({
6526
6488
  );
6527
6489
  i.push(d);
6528
6490
  }
6529
- }, nr = at.injectEndpoints({
6491
+ }, ar = at.injectEndpoints({
6530
6492
  endpoints: (t) => ({
6531
6493
  updateSubtasks: t.mutation({
6532
6494
  queryFn: async ({ projectName: e, taskId: s, subtasks: n }, { dispatch: i }) => {
@@ -6552,7 +6514,7 @@ const N = z.injectEndpoints({
6552
6514
  data: { subtasks: s }
6553
6515
  }
6554
6516
  ];
6555
- Ee(d, { state: a, dispatch: n }, c), us(d, { state: a, dispatch: n }, c), sr(e, s, { state: a, dispatch: n }, c);
6517
+ Ee(d, { state: a, dispatch: n }, c), ls(d, { state: a, dispatch: n }, c), rr(e, s, { state: a, dispatch: n }, c);
6556
6518
  try {
6557
6519
  await i;
6558
6520
  } catch {
@@ -6561,7 +6523,7 @@ const N = z.injectEndpoints({
6561
6523
  }
6562
6524
  })
6563
6525
  })
6564
- }), { useUpdateSubtasksMutation: Lc } = nr, te = { type: "team", id: "LIST" }, ir = $s.enhanceEndpoints({
6526
+ }), { useUpdateSubtasksMutation: Fc } = ar, te = { type: "team", id: "LIST" }, or = xs.enhanceEndpoints({
6565
6527
  endpoints: {
6566
6528
  getTeams: {
6567
6529
  providesTags: (t) => t ? [te, ...t.map((e) => ({ type: "team", id: e.name }))] : [te]
@@ -6599,13 +6561,13 @@ const N = z.injectEndpoints({
6599
6561
  }
6600
6562
  }
6601
6563
  }), {
6602
- useGetTeamsQuery: jc,
6603
- useUpdateTeamsMutation: Fc,
6604
- useSaveTeamMutation: _c,
6605
- useDeleteTeamMutation: Rc,
6606
- useSaveTeamMemberMutation: Gc,
6607
- useDeleteTeamMemberMutation: Cc
6608
- } = ir, rr = `
6564
+ useGetTeamsQuery: _c,
6565
+ useUpdateTeamsMutation: Rc,
6566
+ useSaveTeamMutation: Gc,
6567
+ useDeleteTeamMutation: Cc,
6568
+ useSaveTeamMemberMutation: Nc,
6569
+ useDeleteTeamMemberMutation: Qc
6570
+ } = or, cr = `
6609
6571
  query UserList($name:String!) {
6610
6572
  users(name: $name) {
6611
6573
  edges {
@@ -6627,7 +6589,7 @@ const N = z.injectEndpoints({
6627
6589
  }
6628
6590
  }
6629
6591
  }
6630
- `, ar = `
6592
+ `, dr = `
6631
6593
  query UserList {
6632
6594
  users(last: 5000, isSupport: false) {
6633
6595
  edges {
@@ -6655,7 +6617,7 @@ const N = z.injectEndpoints({
6655
6617
  }
6656
6618
  }
6657
6619
  }
6658
- `, or = `
6620
+ `, ur = `
6659
6621
  query Assignees($names: [String!]!){
6660
6622
  users(names: $names, isSupport: false) {
6661
6623
  edges {
@@ -6667,7 +6629,7 @@ query Assignees($names: [String!]!){
6667
6629
  }
6668
6630
  }
6669
6631
  }
6670
- }`, cr = `
6632
+ }`, lr = `
6671
6633
  query Assignees($projectName: String) {
6672
6634
  users(last: 5000, projectName: $projectName, isSupport: false) {
6673
6635
  edges {
@@ -6679,7 +6641,7 @@ query Assignees($projectName: String) {
6679
6641
  }
6680
6642
  }
6681
6643
  }
6682
- }`, dr = (t) => {
6644
+ }`, pr = (t) => {
6683
6645
  const e = String(t.value);
6684
6646
  return {
6685
6647
  name: e,
@@ -6687,7 +6649,7 @@ query Assignees($projectName: String) {
6687
6649
  avatarUrl: `/api/users/${e}/avatar`,
6688
6650
  hidden: t.hidden
6689
6651
  };
6690
- }, ur = es.enhanceEndpoints({
6652
+ }, fr = ts.enhanceEndpoints({
6691
6653
  endpoints: {
6692
6654
  getCurrentUser: {
6693
6655
  providesTags: [{ type: "user", id: "LIST" }]
@@ -6700,14 +6662,14 @@ query Assignees($projectName: String) {
6700
6662
  providesTags: (t, e, { userName: s }) => [{ type: "session", id: s }]
6701
6663
  }
6702
6664
  }
6703
- }), lr = Q.injectEndpoints({
6665
+ }), yr = Q.injectEndpoints({
6704
6666
  endpoints: (t) => ({
6705
6667
  getUsers: t.query({
6706
6668
  query: () => ({
6707
6669
  url: "/graphql",
6708
6670
  method: "POST",
6709
6671
  body: {
6710
- query: ar,
6672
+ query: dr,
6711
6673
  variables: {}
6712
6674
  }
6713
6675
  }),
@@ -6729,7 +6691,7 @@ query Assignees($projectName: String) {
6729
6691
  url: "/graphql",
6730
6692
  method: "POST",
6731
6693
  body: {
6732
- query: rr,
6694
+ query: cr,
6733
6695
  variables: { name: e }
6734
6696
  }
6735
6697
  }),
@@ -6744,7 +6706,7 @@ query Assignees($projectName: String) {
6744
6706
  async queryFn({ names: e, projectName: s }, n, i, r) {
6745
6707
  if (!e && s) {
6746
6708
  const d = await n.dispatch(
6747
- xs.endpoints.getEnumOptions.initiate(
6709
+ Us.endpoints.getEnumOptions.initiate(
6748
6710
  {
6749
6711
  enumName: "users",
6750
6712
  params: { project_name: s, mode: "users", hide_inactive: !0 }
@@ -6752,13 +6714,13 @@ query Assignees($projectName: String) {
6752
6714
  { subscribe: !1, forceRefetch: n.forced }
6753
6715
  )
6754
6716
  ).unwrap();
6755
- return d.error ? { error: L(d.error) } : { data: d.items.map(dr) };
6717
+ return d.error ? { error: L(d.error) } : { data: d.items.map(pr) };
6756
6718
  }
6757
6719
  const a = await r({
6758
6720
  url: "/graphql",
6759
6721
  method: "POST",
6760
6722
  body: {
6761
- query: e ? or : cr,
6723
+ query: e ? ur : lr,
6762
6724
  variables: { names: e, projectName: s }
6763
6725
  }
6764
6726
  });
@@ -6782,7 +6744,7 @@ query Assignees($projectName: String) {
6782
6744
  })
6783
6745
  }),
6784
6746
  overrideExisting: !0
6785
- }), pr = lr.enhanceEndpoints({
6747
+ }), gr = yr.enhanceEndpoints({
6786
6748
  endpoints: {
6787
6749
  GetAllProjectUsersAsAssignee: {
6788
6750
  transformResponse: (t) => t.users.edges.map((e) => ({
@@ -6806,14 +6768,14 @@ query Assignees($projectName: String) {
6806
6768
  }
6807
6769
  }
6808
6770
  }), {
6809
- useGetAllProjectUsersAsAssigneeQuery: Nc,
6810
- useLazyGetAllProjectUsersAsAssigneeQuery: Qc,
6811
- useGetActiveUsersCountQuery: Mc,
6812
- useGetAllAssigneesQuery: Vc,
6813
- useGetUsersQuery: Dc,
6814
- useGetUserByNameQuery: Oc,
6815
- useGetUsersAssigneeQuery: $c
6816
- } = pr, { useGetUserSessionsQuery: xc, useGetCurrentUserQuery: Uc, useGetUserQuery: qc } = ur, fr = Se.enhanceEndpoints({
6771
+ useGetAllProjectUsersAsAssigneeQuery: Mc,
6772
+ useLazyGetAllProjectUsersAsAssigneeQuery: Vc,
6773
+ useGetActiveUsersCountQuery: Dc,
6774
+ useGetAllAssigneesQuery: Oc,
6775
+ useGetUsersQuery: $c,
6776
+ useGetUserByNameQuery: xc,
6777
+ useGetUsersAssigneeQuery: Uc
6778
+ } = gr, { useGetUserSessionsQuery: Bc, useGetCurrentUserQuery: qc, useGetUserQuery: Hc } = fr, hr = Se.enhanceEndpoints({
6817
6779
  endpoints: {
6818
6780
  listGuestUsers: {
6819
6781
  providesTags: (t) => t?.users ? [
@@ -6828,7 +6790,7 @@ query Assignees($projectName: String) {
6828
6790
  invalidatesTags: (t, e, s) => [{ type: "guest", id: s.email }]
6829
6791
  }
6830
6792
  }
6831
- }), { useListGuestUsersQuery: Bc, useAddGuestUserMutation: Hc, useRemoveGuestUserMutation: Wc } = fr, yr = Q.enhanceEndpoints({
6793
+ }), { useListGuestUsersQuery: Wc, useAddGuestUserMutation: zc, useRemoveGuestUserMutation: Kc } = hr, mr = Q.enhanceEndpoints({
6832
6794
  endpoints: {
6833
6795
  GetLatestProductVersion: {
6834
6796
  transformResponse: (t) => t.project.versions.edges[0]?.node,
@@ -6838,7 +6800,7 @@ query Assignees($projectName: String) {
6838
6800
  ] : [{ type: "product", id: s }]
6839
6801
  }
6840
6802
  }
6841
- }), { useGetLatestProductVersionQuery: zc } = yr, gr = Us.enhanceEndpoints({
6803
+ }), { useGetLatestProductVersionQuery: Jc } = mr, vr = Bs.enhanceEndpoints({
6842
6804
  endpoints: {
6843
6805
  getVersion: {},
6844
6806
  createVersion: {
@@ -6857,7 +6819,7 @@ query Assignees($projectName: String) {
6857
6819
  ]
6858
6820
  }
6859
6821
  }
6860
- }), { useGetVersionQuery: Kc, useCreateVersionMutation: Jc, useDeleteVersionMutation: Yc } = gr, B = (t, e) => ({
6822
+ }), { useGetVersionQuery: Yc, useCreateVersionMutation: Xc, useDeleteVersionMutation: Zc } = vr, q = (t, e) => ({
6861
6823
  type: "view",
6862
6824
  id: `${t.toUpperCase()}${e ? `:${e.toUpperCase()}` : ""}`
6863
6825
  }), Ce = { type: "view", id: "LIST" }, V = qs.enhanceEndpoints({
@@ -6866,14 +6828,14 @@ query Assignees($projectName: String) {
6866
6828
  transformResponse: (t) => t?.views || [],
6867
6829
  providesTags: (t, e, { viewType: s, projectName: n }) => t ? [
6868
6830
  Ce,
6869
- B(s, n),
6831
+ q(s, n),
6870
6832
  ...t.filter((i) => i.id != null).map((i) => ({ type: "view", id: i.id }))
6871
6833
  ] : [Ce]
6872
6834
  },
6873
6835
  getWorkingView: {
6874
6836
  providesTags: (t, e, { viewType: s, projectName: n }) => [
6875
6837
  { type: "view", id: t?.id },
6876
- B(s, n),
6838
+ q(s, n),
6877
6839
  Ce
6878
6840
  ]
6879
6841
  },
@@ -6881,19 +6843,19 @@ query Assignees($projectName: String) {
6881
6843
  providesTags: (t, e, s) => [{ type: "view", id: s.viewId }, Ce]
6882
6844
  },
6883
6845
  getDefaultView: {
6884
- providesTags: (t, e, { viewType: s, projectName: n }) => t ? [{ type: "view", id: t.id }, B(s, n)] : [B(s, n)]
6846
+ providesTags: (t, e, { viewType: s, projectName: n }) => t ? [{ type: "view", id: t.id }, q(s, n)] : [q(s, n)]
6885
6847
  },
6886
6848
  getBaseView: {
6887
- providesTags: (t, e, { viewType: s, projectName: n }) => t ? [{ type: "view", id: t.id }, B(s, n)] : [B(s, n)]
6849
+ providesTags: (t, e, { viewType: s, projectName: n }) => t ? [{ type: "view", id: t.id }, q(s, n)] : [q(s, n)]
6888
6850
  }
6889
6851
  }
6890
6852
  }), {
6891
- useListViewsQuery: Xc,
6892
- useGetWorkingViewQuery: Zc,
6893
- useGetViewQuery: ed,
6894
- useGetDefaultViewQuery: td,
6895
- useGetBaseViewQuery: sd
6896
- } = V, hr = V.enhanceEndpoints({
6853
+ useListViewsQuery: ed,
6854
+ useGetWorkingViewQuery: td,
6855
+ useGetViewQuery: sd,
6856
+ useGetDefaultViewQuery: nd,
6857
+ useGetBaseViewQuery: id
6858
+ } = V, br = V.enhanceEndpoints({
6897
6859
  endpoints: {
6898
6860
  createView: {
6899
6861
  onQueryStarted: async (t, { dispatch: e, queryFulfilled: s, getState: n }) => {
@@ -6947,7 +6909,7 @@ query Assignees($projectName: String) {
6947
6909
  let u;
6948
6910
  if (i.label === "__base__") {
6949
6911
  const o = {
6950
- id: Hs(),
6912
+ id: Ws(),
6951
6913
  ...i,
6952
6914
  working: !1,
6953
6915
  scope: t.projectName ? "project" : "studio",
@@ -6981,7 +6943,7 @@ query Assignees($projectName: String) {
6981
6943
  // updates the view list cache for a specific view type and project
6982
6944
  invalidatesTags: (t, e, { viewType: s, projectName: n, payload: i }) => [
6983
6945
  { type: "view", id: i.id },
6984
- B(s, n)
6946
+ q(s, n)
6985
6947
  ]
6986
6948
  },
6987
6949
  updateView: {
@@ -7041,7 +7003,7 @@ query Assignees($projectName: String) {
7041
7003
  "accessLevel",
7042
7004
  "working"
7043
7005
  ];
7044
- return Object.keys(r).some((u) => c.includes(u)) && (a.push({ type: "view", id: i }), a.push(B(s, n))), a;
7006
+ return Object.keys(r).some((u) => c.includes(u)) && (a.push({ type: "view", id: i }), a.push(q(s, n))), a;
7045
7007
  }
7046
7008
  },
7047
7009
  deleteView: {
@@ -7082,8 +7044,8 @@ query Assignees($projectName: String) {
7082
7044
  // updates the view list cache for a specific view type and project
7083
7045
  invalidatesTags: (t, e, { viewType: s, projectName: n, viewId: i }) => [
7084
7046
  { type: "view", id: i },
7085
- B(s, n),
7086
- B(s, void 0)
7047
+ q(s, n),
7048
+ q(s, void 0)
7087
7049
  ]
7088
7050
  },
7089
7051
  setDefaultView: {
@@ -7121,21 +7083,21 @@ query Assignees($projectName: String) {
7121
7083
  // updates the default view cache for a specific view type and project
7122
7084
  invalidatesTags: (t, e, { viewType: s, projectName: n, setDefaultViewRequestModel: i }) => [
7123
7085
  { type: "view", id: i.viewId },
7124
- B(s, n)
7086
+ q(s, n)
7125
7087
  ]
7126
7088
  }
7127
7089
  }
7128
7090
  }), {
7129
- useCreateViewMutation: nd,
7130
- useUpdateViewMutation: id,
7131
- useDeleteViewMutation: rd,
7132
- useSetDefaultViewMutation: ad
7133
- } = hr, Be = Pe.enhanceEndpoints({
7091
+ useCreateViewMutation: rd,
7092
+ useUpdateViewMutation: ad,
7093
+ useDeleteViewMutation: od,
7094
+ useSetDefaultViewMutation: cd
7095
+ } = br, qe = Pe.enhanceEndpoints({
7134
7096
  endpoints: {
7135
7097
  getEntityWatchers: {},
7136
7098
  setEntityWatchers: {}
7137
7099
  }
7138
- }), Xt = Be.injectEndpoints({
7100
+ }), Zt = qe.injectEndpoints({
7139
7101
  endpoints: (t) => ({
7140
7102
  getEntitiesWatchers: t.query({
7141
7103
  async queryFn({ entities: e = [] }, { dispatch: s }) {
@@ -7143,7 +7105,7 @@ query Assignees($projectName: String) {
7143
7105
  return { data: await Promise.all(
7144
7106
  e.map(async (i) => {
7145
7107
  const r = await s(
7146
- Be.endpoints.getEntityWatchers.initiate(i, { forceRefetch: !0 })
7108
+ qe.endpoints.getEntityWatchers.initiate(i, { forceRefetch: !0 })
7147
7109
  );
7148
7110
  if (r.error) throw r.error;
7149
7111
  return {
@@ -7162,13 +7124,13 @@ query Assignees($projectName: String) {
7162
7124
  ])
7163
7125
  })
7164
7126
  })
7165
- }), mr = Xt.injectEndpoints({
7127
+ }), Ir = Zt.injectEndpoints({
7166
7128
  endpoints: (t) => ({
7167
7129
  setEntitiesWatchers: t.mutation({
7168
7130
  async queryFn({ entities: e = [] }, { dispatch: s }) {
7169
7131
  const n = e.map(async (i) => {
7170
7132
  const r = await s(
7171
- Be.endpoints.setEntityWatchers.initiate({
7133
+ qe.endpoints.setEntityWatchers.initiate({
7172
7134
  entityId: i.entityId,
7173
7135
  entityType: i.entityType,
7174
7136
  projectName: i.projectName,
@@ -7184,12 +7146,12 @@ query Assignees($projectName: String) {
7184
7146
  }
7185
7147
  },
7186
7148
  async onQueryStarted({ entities: e }, { dispatch: s, queryFulfilled: n, getState: i }) {
7187
- const r = i(), a = e.map((u) => ({ type: "watchers", id: u.entityId })), c = Be.util.selectInvalidatedBy(r, a);
7149
+ const r = i(), a = e.map((u) => ({ type: "watchers", id: u.entityId })), c = qe.util.selectInvalidatedBy(r, a);
7188
7150
  let d = [];
7189
7151
  try {
7190
7152
  c.forEach((u) => {
7191
7153
  const o = s(
7192
- Xt.util.updateQueryData(
7154
+ Zt.util.updateQueryData(
7193
7155
  "getEntitiesWatchers",
7194
7156
  u.originalArgs,
7195
7157
  (l) => {
@@ -7214,295 +7176,295 @@ query Assignees($projectName: String) {
7214
7176
  invalidatesTags: (e, s, { entities: n }) => n.some((i) => i.entityType === "task") ? [{ type: "watchers", id: "VERSION-LIST" }] : []
7215
7177
  })
7216
7178
  })
7217
- }), { useGetEntitiesWatchersQuery: od, useSetEntitiesWatchersMutation: cd } = mr, vr = Bs.enhanceEndpoints({
7179
+ }), { useGetEntitiesWatchersQuery: dd, useSetEntitiesWatchersMutation: ud } = Ir, Tr = Hs.enhanceEndpoints({
7218
7180
  endpoints: {
7219
7181
  resolveUris: {}
7220
7182
  }
7221
- }), { useResolveUrisMutation: dd } = vr;
7183
+ }), { useResolveUrisMutation: ld } = Tr;
7222
7184
  export {
7223
7185
  ot as $,
7224
- q as A,
7225
- gi as B,
7226
- Kn as C,
7186
+ B as A,
7187
+ mi as B,
7188
+ Yn as C,
7227
7189
  se as D,
7228
- $i as E,
7229
- Gn as F,
7230
- Yn as G,
7231
- Jn as H,
7190
+ qi as E,
7191
+ Nn as F,
7192
+ Zn as G,
7193
+ Xn as H,
7232
7194
  $e as I,
7233
- Qn as J,
7195
+ Vn as J,
7234
7196
  ye as K,
7235
7197
  qt as L,
7236
- Pn as M,
7237
- Or as N,
7238
- cs as O,
7239
- Rn as P,
7240
- fi as Q,
7198
+ jn as M,
7199
+ Ur as N,
7200
+ ds as O,
7201
+ Cn as P,
7202
+ gi as Q,
7241
7203
  gt as R,
7242
- vt as S,
7204
+ bt as S,
7243
7205
  ze as T,
7244
- B as U,
7245
- _n as V,
7206
+ q as U,
7207
+ Gn as V,
7246
7208
  V as W,
7247
- Hr as X,
7248
- Di as Y,
7249
- we as Z,
7209
+ Kr as X,
7210
+ Ui as Y,
7211
+ Ae as Z,
7250
7212
  N as _,
7251
7213
  tt as a,
7252
- po as a$,
7253
- Ei as a0,
7254
- Ae as a1,
7214
+ go as a$,
7215
+ Pi as a0,
7216
+ we as a1,
7255
7217
  ke as a2,
7256
- zr as a3,
7257
- Rt as a4,
7218
+ Yr as a3,
7219
+ Gt as a4,
7258
7220
  R as a5,
7259
- us as a6,
7260
- ds as a7,
7261
- sr as a8,
7262
- Ma as a9,
7263
- _t as aA,
7264
- Hc as aB,
7265
- hc as aC,
7266
- Fo as aD,
7267
- Go as aE,
7268
- oo as aF,
7269
- nc as aG,
7270
- Xo as aH,
7271
- Ya as aI,
7272
- Ha as aJ,
7273
- dc as aK,
7274
- pc as aL,
7275
- lo as aM,
7276
- Za as aN,
7277
- So as aO,
7278
- Jc as aP,
7279
- nd as aQ,
7280
- Cr as aR,
7281
- co as aS,
7282
- Io as aT,
7283
- Ro as aU,
7284
- sc as aV,
7285
- Zo as aW,
7286
- Xa as aX,
7287
- za as aY,
7288
- fc as aZ,
7289
- Ia as a_,
7290
- qe as aa,
7221
+ ls as a6,
7222
+ us as a7,
7223
+ rr as a8,
7224
+ Oa as a9,
7225
+ Rt as aA,
7226
+ zc as aB,
7227
+ vc as aC,
7228
+ Ro as aD,
7229
+ No as aE,
7230
+ lo as aF,
7231
+ rc as aG,
7232
+ ec as aH,
7233
+ eo as aI,
7234
+ Ka as aJ,
7235
+ lc as aK,
7236
+ yc as aL,
7237
+ yo as aM,
7238
+ so as aN,
7239
+ Lo as aO,
7240
+ Xc as aP,
7241
+ rd as aQ,
7242
+ Mr as aR,
7243
+ po as aS,
7244
+ ko as aT,
7245
+ Co as aU,
7246
+ ic as aV,
7247
+ tc as aW,
7248
+ to as aX,
7249
+ Ya as aY,
7250
+ gc as aZ,
7251
+ wa as a_,
7252
+ Be as aa,
7291
7253
  Ee as ab,
7292
- ii as ac,
7293
- oi as ad,
7294
- ri as ae,
7295
- Hi as af,
7254
+ ai as ac,
7255
+ di as ad,
7256
+ oi as ae,
7257
+ Ji as af,
7296
7258
  mt as ag,
7297
7259
  ee as ah,
7298
7260
  W as ai,
7299
- Wn as aj,
7300
- zn as ak,
7301
- Hn as al,
7261
+ Kn as aj,
7262
+ Jn as ak,
7263
+ zn as al,
7302
7264
  xe as am,
7303
- wi as an,
7304
- Yi as ao,
7305
- Wr as ap,
7306
- Zi as aq,
7307
- qr as ar,
7308
- er as as,
7309
- An as at,
7310
- ir as au,
7311
- zo as av,
7312
- $r as aw,
7265
+ Si as an,
7266
+ tr as ao,
7267
+ Jr as ap,
7268
+ nr as aq,
7269
+ Wr as ar,
7270
+ Es as as,
7271
+ En as at,
7272
+ or as au,
7273
+ Jo as av,
7274
+ Br as aw,
7313
7275
  je as ax,
7314
- Zn as ay,
7315
- gs as az,
7316
- qi as b,
7317
- Ca as b$,
7318
- Ic as b0,
7319
- Cc as b1,
7320
- Rc as b2,
7321
- Yc as b3,
7322
- rd as b4,
7323
- Oo as b5,
7324
- ba as b6,
7325
- To as b7,
7326
- Mr as b8,
7327
- jr as b9,
7328
- Ba as bA,
7329
- fo as bB,
7330
- la as bC,
7331
- ua as bD,
7332
- eo as bE,
7333
- da as bF,
7334
- $o as bG,
7335
- ta as bH,
7336
- ra as bI,
7337
- na as bJ,
7338
- ia as bK,
7339
- uc as bL,
7340
- ea as bM,
7341
- Na as bN,
7342
- Ea as bO,
7343
- wa as bP,
7344
- zc as bQ,
7345
- rc as bR,
7346
- Ko as bS,
7347
- $a as bT,
7348
- Oa as bU,
7349
- xa as bV,
7350
- ac as bW,
7351
- oc as bX,
7352
- Kr as bY,
7353
- fa as bZ,
7354
- Fa as b_,
7355
- Fr as ba,
7356
- Lr as bb,
7357
- Vr as bc,
7358
- Nr as bd,
7359
- Mc as be,
7360
- to as bf,
7361
- ro as bg,
7362
- io as bh,
7363
- yo as bi,
7364
- ao as bj,
7365
- Vc as bk,
7366
- Nc as bl,
7367
- Ao as bm,
7368
- ko as bn,
7369
- sd as bo,
7370
- Bo as bp,
7371
- Uc as bq,
7372
- bo as br,
7373
- td as bs,
7374
- no as bt,
7375
- oa as bu,
7376
- od as bv,
7377
- tc as bw,
7378
- Da as bx,
7379
- Wo as by,
7380
- Yo as bz,
7381
- St as c,
7382
- Gr as c$,
7383
- mo as c0,
7384
- ma as c1,
7385
- _o as c2,
7386
- lc as c3,
7387
- ga as c4,
7388
- _r as c5,
7389
- go as c6,
7390
- va as c7,
7391
- Sa as c8,
7392
- vc as c9,
7393
- ed as cA,
7394
- mc as cB,
7395
- Zc as cC,
7396
- Vo as cD,
7397
- bc as cE,
7398
- Qr as cF,
7399
- so as cG,
7400
- Qc as cH,
7401
- ca as cI,
7402
- pa as cJ,
7403
- aa as cK,
7404
- qa as cL,
7405
- Ua as cM,
7406
- Ec as cN,
7407
- Zr as cO,
7408
- jo as cP,
7409
- ho as cQ,
7410
- Lo as cR,
7411
- Sc as cS,
7412
- Bc as cT,
7413
- ha as cU,
7414
- Xc as cV,
7415
- No as cW,
7416
- Eo as cX,
7417
- Co as cY,
7418
- Wc as cZ,
7419
- dd as c_,
7420
- Jr as ca,
7421
- ya as cb,
7422
- ic as cc,
7423
- Uo as cd,
7424
- xo as ce,
7425
- qo as cf,
7426
- vo as cg,
7427
- Ac as ch,
7428
- wc as ci,
7429
- Pr as cj,
7430
- sa as ck,
7431
- Pc as cl,
7432
- Xr as cm,
7433
- Yr as cn,
7434
- jc as co,
7435
- Oc as cp,
7436
- Po as cq,
7437
- qc as cr,
7438
- xc as cs,
7439
- $c as ct,
7440
- Dc as cu,
7441
- Kc as cv,
7442
- Ga as cw,
7443
- _a as cx,
7444
- Ra as cy,
7445
- ja as cz,
7446
- Fn as d,
7447
- Gc as d0,
7448
- _c as d1,
7449
- Dr as d2,
7450
- wo as d3,
7451
- ad as d4,
7452
- cd as d5,
7453
- Jo as d6,
7454
- Ta as d7,
7455
- Aa as d8,
7456
- gc as d9,
7457
- cc as dA,
7458
- as as dB,
7459
- Ur as dC,
7460
- rs as dD,
7461
- Rr as da,
7462
- Ho as db,
7463
- Do as dc,
7464
- Tc as dd,
7465
- Mo as de,
7466
- uo as df,
7467
- Qo as dg,
7468
- Pa as dh,
7469
- ec as di,
7470
- Ja as dj,
7471
- Ka as dk,
7472
- Wa as dl,
7473
- La as dm,
7474
- Va as dn,
7475
- yc as dp,
7476
- ka as dq,
7477
- kc as dr,
7478
- Lc as ds,
7479
- Fc as dt,
7480
- id as du,
7481
- Bn as dv,
7482
- gr as dw,
7483
- hr as dx,
7484
- mr as dy,
7485
- Gi as dz,
7276
+ ti as ay,
7277
+ hs as az,
7278
+ zi as b,
7279
+ Ma as b$,
7280
+ kc as b0,
7281
+ Qc as b1,
7282
+ Cc as b2,
7283
+ Zc as b3,
7284
+ od as b4,
7285
+ xo as b5,
7286
+ ka as b6,
7287
+ wo as b7,
7288
+ Or as b8,
7289
+ Rr as b9,
7290
+ za as bA,
7291
+ ho as bB,
7292
+ ya as bC,
7293
+ fa as bD,
7294
+ no as bE,
7295
+ pa as bF,
7296
+ Uo as bG,
7297
+ ia as bH,
7298
+ ca as bI,
7299
+ aa as bJ,
7300
+ oa as bK,
7301
+ pc as bL,
7302
+ na as bM,
7303
+ Va as bN,
7304
+ La as bO,
7305
+ Pa as bP,
7306
+ Jc as bQ,
7307
+ oc as bR,
7308
+ Yo as bS,
7309
+ Ba as bT,
7310
+ Ua as bU,
7311
+ qa as bV,
7312
+ cc as bW,
7313
+ dc as bX,
7314
+ Xr as bY,
7315
+ ha as bZ,
7316
+ Ga as b_,
7317
+ Gr as ba,
7318
+ _r as bb,
7319
+ $r as bc,
7320
+ Vr as bd,
7321
+ Dc as be,
7322
+ io as bf,
7323
+ co as bg,
7324
+ oo as bh,
7325
+ mo as bi,
7326
+ uo as bj,
7327
+ Oc as bk,
7328
+ Mc as bl,
7329
+ Eo as bm,
7330
+ Ao as bn,
7331
+ id as bo,
7332
+ Wo as bp,
7333
+ qc as bq,
7334
+ To as br,
7335
+ nd as bs,
7336
+ ao as bt,
7337
+ ua as bu,
7338
+ dd as bv,
7339
+ nc as bw,
7340
+ xa as bx,
7341
+ Ko as by,
7342
+ Zo as bz,
7343
+ Pt as c,
7344
+ Qr as c$,
7345
+ bo as c0,
7346
+ Ia as c1,
7347
+ Go as c2,
7348
+ fc as c3,
7349
+ va as c4,
7350
+ Cr as c5,
7351
+ vo as c6,
7352
+ Ta as c7,
7353
+ ja as c8,
7354
+ Ic as c9,
7355
+ sd as cA,
7356
+ bc as cB,
7357
+ td as cC,
7358
+ Oo as cD,
7359
+ Tc as cE,
7360
+ Dr as cF,
7361
+ ro as cG,
7362
+ Vc as cH,
7363
+ la as cI,
7364
+ ga as cJ,
7365
+ da as cK,
7366
+ Wa as cL,
7367
+ Ha as cM,
7368
+ Pc as cN,
7369
+ sa as cO,
7370
+ _o as cP,
7371
+ ji as cQ,
7372
+ Fo as cR,
7373
+ Lc as cS,
7374
+ Wc as cT,
7375
+ ba as cU,
7376
+ ed as cV,
7377
+ Mo as cW,
7378
+ Po as cX,
7379
+ Qo as cY,
7380
+ Kc as cZ,
7381
+ ld as c_,
7382
+ Zr as ca,
7383
+ ma as cb,
7384
+ ac as cc,
7385
+ qo as cd,
7386
+ Bo as ce,
7387
+ Ho as cf,
7388
+ Io as cg,
7389
+ Ec as ch,
7390
+ Sc as ci,
7391
+ Fr as cj,
7392
+ ra as ck,
7393
+ jc as cl,
7394
+ ta as cm,
7395
+ ea as cn,
7396
+ _c as co,
7397
+ xc as cp,
7398
+ jo as cq,
7399
+ Hc as cr,
7400
+ Bc as cs,
7401
+ Uc as ct,
7402
+ $c as cu,
7403
+ Yc as cv,
7404
+ Qa as cw,
7405
+ Ca as cx,
7406
+ Na as cy,
7407
+ Ra as cz,
7408
+ Rn as d,
7409
+ Nc as d0,
7410
+ Gc as d1,
7411
+ xr as d2,
7412
+ So as d3,
7413
+ cd as d4,
7414
+ ud as d5,
7415
+ Xo as d6,
7416
+ Aa as d7,
7417
+ Sa as d8,
7418
+ mc as d9,
7419
+ uc as dA,
7420
+ os as dB,
7421
+ Hr as dC,
7422
+ as as dD,
7423
+ Nr as da,
7424
+ zo as db,
7425
+ $o as dc,
7426
+ wc as dd,
7427
+ Do as de,
7428
+ fo as df,
7429
+ Vo as dg,
7430
+ Fa as dh,
7431
+ sc as di,
7432
+ Za as dj,
7433
+ Xa as dk,
7434
+ Ja as dl,
7435
+ _a as dm,
7436
+ $a as dn,
7437
+ hc as dp,
7438
+ Ea as dq,
7439
+ Ac as dr,
7440
+ Fc as ds,
7441
+ Rc as dt,
7442
+ ad as du,
7443
+ Wn as dv,
7444
+ vr as dw,
7445
+ br as dx,
7446
+ Ir as dy,
7447
+ Mi as dz,
7486
7448
  ae as e,
7487
- Ai as f,
7449
+ Ei as f,
7488
7450
  Is as g,
7489
- vn as h,
7490
- Xs as i,
7491
- Pi as j,
7492
- Li as k,
7493
- Br as l,
7494
- Ri as m,
7451
+ In as h,
7452
+ en as i,
7453
+ _i as j,
7454
+ Ri as k,
7455
+ zr as l,
7456
+ Qi as m,
7495
7457
  fe as n,
7496
- xr as o,
7497
- Ci as p,
7498
- ui as q,
7458
+ qr as o,
7459
+ Vi as p,
7460
+ pi as q,
7499
7461
  Ie as r,
7500
- Qa as s,
7501
- jn as t,
7502
- Js as u,
7462
+ Da as s,
7463
+ _n as t,
7464
+ Xs as u,
7503
7465
  de as v,
7504
7466
  z as w,
7505
- ls as x,
7467
+ ps as x,
7506
7468
  le as y,
7507
- Vi as z
7469
+ xi as z
7508
7470
  };