@cobaltcore-dev/aurora 1.3.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/client/DeleteFlavorModal-C2MqUgGR.mjs +801 -0
  2. package/dist/client/DeleteFlavorModal-C2MqUgGR.mjs.map +1 -0
  3. package/dist/client/{FiltersInput-CKI6zWnm.mjs → FiltersInput-Becwxo_J.mjs} +36 -33
  4. package/dist/client/FiltersInput-Becwxo_J.mjs.map +1 -0
  5. package/dist/client/{FloatingIpActionModals-Ch8uozH9.mjs → FloatingIpActionModals-Cq10WljB.mjs} +2 -2
  6. package/dist/client/{FloatingIpActionModals-Ch8uozH9.mjs.map → FloatingIpActionModals-Cq10WljB.mjs.map} +1 -1
  7. package/dist/client/ImageToastNotifications-BWfzOUMc.mjs +1135 -0
  8. package/dist/client/ImageToastNotifications-BWfzOUMc.mjs.map +1 -0
  9. package/dist/client/RouteIdLevelDefaultError-CSseJ1yG.mjs +26 -0
  10. package/dist/client/RouteIdLevelDefaultError-CSseJ1yG.mjs.map +1 -0
  11. package/dist/client/{_flavorId-Dg7MS0Af.mjs → _flavorId-CaA4-Pnf.mjs} +4 -3
  12. package/dist/client/_flavorId-CaA4-Pnf.mjs.map +1 -0
  13. package/dist/client/_flavorId-DYv_StX22.mjs +276 -0
  14. package/dist/client/_flavorId-DYv_StX22.mjs.map +1 -0
  15. package/dist/client/_flavorId-YV3jCS5g.mjs +22 -0
  16. package/dist/client/_flavorId-YV3jCS5g.mjs.map +1 -0
  17. package/dist/client/{_floatingIpId-C9xfRWot.mjs → _floatingIpId-BeYElanB.mjs} +2 -2
  18. package/dist/client/{_floatingIpId-C9xfRWot.mjs.map → _floatingIpId-BeYElanB.mjs.map} +1 -1
  19. package/dist/client/{_floatingIpId-DNn6ABCB.mjs → _floatingIpId-Dpsc7GU4.mjs} +5 -5
  20. package/dist/client/{_floatingIpId-DNn6ABCB.mjs.map → _floatingIpId-Dpsc7GU4.mjs.map} +1 -1
  21. package/dist/client/_imageId-mfKp3JHn.mjs +558 -0
  22. package/dist/client/_imageId-mfKp3JHn.mjs.map +1 -0
  23. package/dist/client/_imageId-mpXUMCh_.mjs +22 -0
  24. package/dist/client/_imageId-mpXUMCh_.mjs.map +1 -0
  25. package/dist/client/{_imageId-8JIbFmGB.mjs → _imageId-pBSS0YcC.mjs} +4 -3
  26. package/dist/client/_imageId-pBSS0YcC.mjs.map +1 -0
  27. package/dist/client/{_projectId-B3wmSala.mjs → _projectId-AjgJX6Gl.mjs} +2 -2
  28. package/dist/client/_projectId-AjgJX6Gl.mjs.map +1 -0
  29. package/dist/client/{_projectId-DPzv0CCp.mjs → _projectId-BnTBxKfp.mjs} +4 -4
  30. package/dist/client/_projectId-BnTBxKfp.mjs.map +1 -0
  31. package/dist/client/{_projectId-DfeVJy0G.mjs → _projectId-CVrdJ52s.mjs} +2 -2
  32. package/dist/client/_projectId-CVrdJ52s.mjs.map +1 -0
  33. package/dist/client/_projectId-DgciZslU.mjs +92 -0
  34. package/dist/client/_projectId-DgciZslU.mjs.map +1 -0
  35. package/dist/client/{_securityGroupId-C6eHmrx_.mjs → _securityGroupId-AO3wnH8g.mjs} +2 -2
  36. package/dist/client/_securityGroupId-AO3wnH8g.mjs.map +1 -0
  37. package/dist/client/{_securityGroupId-DmplhDgt.mjs → _securityGroupId-Bq0ZyG6z.mjs} +750 -741
  38. package/dist/client/_securityGroupId-Bq0ZyG6z.mjs.map +1 -0
  39. package/dist/client/_storageType-c-DAu8qr.mjs +858 -0
  40. package/dist/client/_storageType-c-DAu8qr.mjs.map +1 -0
  41. package/dist/client/components/{Error → Errors}/RouteError.d.ts +5 -0
  42. package/dist/client/components/Errors/RouteIdLevelDefaultError.d.ts +17 -0
  43. package/dist/client/components/Errors/ServiceLevelDefaultError.d.ts +9 -0
  44. package/dist/client/components/ListToolbar/SelectedFilters.d.ts +7 -2
  45. package/dist/client/components/ListToolbar/types.d.ts +6 -0
  46. package/dist/client/components/ListToolbar/valueLabels.d.ts +11 -0
  47. package/dist/client/flavors-Bgq3KZmx.mjs +659 -0
  48. package/dist/client/flavors-Bgq3KZmx.mjs.map +1 -0
  49. package/dist/client/{flavors-B1SDOPDu.mjs → flavors-ZudiAiTU.mjs} +2 -2
  50. package/dist/client/{flavors-B1SDOPDu.mjs.map → flavors-ZudiAiTU.mjs.map} +1 -1
  51. package/dist/client/{floatingips-DrCvtXtT.mjs → floatingips-B1oLH8z6.mjs} +6 -6
  52. package/dist/client/{floatingips-DrCvtXtT.mjs.map → floatingips-B1oLH8z6.mjs.map} +1 -1
  53. package/dist/client/floatingips-BeQEkVH8.mjs +14 -0
  54. package/dist/client/floatingips-BeQEkVH8.mjs.map +1 -0
  55. package/dist/client/floatingips-BtLg3yEQ.mjs +22 -0
  56. package/dist/client/floatingips-BtLg3yEQ.mjs.map +1 -0
  57. package/dist/client/floatingips-Cz9k80cc.mjs.map +1 -1
  58. package/dist/client/{images-BGQv9kKT.mjs → images-CnTW3bpy.mjs} +810 -770
  59. package/dist/client/images-CnTW3bpy.mjs.map +1 -0
  60. package/dist/client/{images-CPmMa4SQ.mjs → images-DZHDYDQu.mjs} +2 -2
  61. package/dist/client/{images-CPmMa4SQ.mjs.map → images-DZHDYDQu.mjs.map} +1 -1
  62. package/dist/client/index.js +412 -409
  63. package/dist/client/index.js.map +1 -1
  64. package/dist/client/{objects-DVccbrL1.mjs → objects-25xsh4Ia.mjs} +2 -2
  65. package/dist/client/objects-25xsh4Ia.mjs.map +1 -0
  66. package/dist/client/objects-KXY6dgwq.mjs +82 -0
  67. package/dist/client/objects-KXY6dgwq.mjs.map +1 -0
  68. package/dist/client/objects-QryuClU3.mjs +82 -0
  69. package/dist/client/objects-QryuClU3.mjs.map +1 -0
  70. package/dist/client/{objects-BR3eeSNH.mjs → objects-jYQBFzwg.mjs} +4668 -4699
  71. package/dist/client/objects-jYQBFzwg.mjs.map +1 -0
  72. package/dist/client/projects-yiK0HGSA.mjs.map +1 -1
  73. package/dist/client/securitygroups--0PS2wbM.mjs +580 -0
  74. package/dist/client/securitygroups--0PS2wbM.mjs.map +1 -0
  75. package/dist/client/{securitygroups-DEJQBcxm.mjs → securitygroups-BRndk7wh.mjs} +2 -2
  76. package/dist/client/{securitygroups-DEJQBcxm.mjs.map → securitygroups-BRndk7wh.mjs.map} +1 -1
  77. package/dist/client/securitygroups-CdN4yAAw.mjs +14 -0
  78. package/dist/client/securitygroups-CdN4yAAw.mjs.map +1 -0
  79. package/dist/client/securitygroups-Cs2Op-tu.mjs +22 -0
  80. package/dist/client/securitygroups-Cs2Op-tu.mjs.map +1 -0
  81. package/dist/client/securitygroups-CtKne8UQ.mjs.map +1 -1
  82. package/dist/client/trpcClient.d.ts +6 -1
  83. package/dist/client/useModalTracking-BYd37pXm.mjs +37 -0
  84. package/dist/client/useModalTracking-BYd37pXm.mjs.map +1 -0
  85. package/dist/client/useSecurityGroupPermissions--hK4aR8Y.mjs +294 -0
  86. package/dist/client/useSecurityGroupPermissions--hK4aR8Y.mjs.map +1 -0
  87. package/dist/server/index.d.ts +6 -1
  88. package/dist/server/index.js +96 -30
  89. package/package.json +4 -4
  90. package/dist/client/DeleteFlavorModal-V44QCJBd.mjs +0 -773
  91. package/dist/client/DeleteFlavorModal-V44QCJBd.mjs.map +0 -1
  92. package/dist/client/FiltersInput-CKI6zWnm.mjs.map +0 -1
  93. package/dist/client/ImageToastNotifications-m6c3tVPb.mjs +0 -1152
  94. package/dist/client/ImageToastNotifications-m6c3tVPb.mjs.map +0 -1
  95. package/dist/client/_flavorId-Dg7MS0Af.mjs.map +0 -1
  96. package/dist/client/_flavorId-kHl-b8rI.mjs +0 -232
  97. package/dist/client/_flavorId-kHl-b8rI.mjs.map +0 -1
  98. package/dist/client/_imageId-8JIbFmGB.mjs.map +0 -1
  99. package/dist/client/_imageId-BBAlRioC.mjs +0 -574
  100. package/dist/client/_imageId-BBAlRioC.mjs.map +0 -1
  101. package/dist/client/_projectId-7Nl1MQTJ.mjs +0 -99
  102. package/dist/client/_projectId-7Nl1MQTJ.mjs.map +0 -1
  103. package/dist/client/_projectId-B3wmSala.mjs.map +0 -1
  104. package/dist/client/_projectId-DPzv0CCp.mjs.map +0 -1
  105. package/dist/client/_projectId-DfeVJy0G.mjs.map +0 -1
  106. package/dist/client/_securityGroupId-C6eHmrx_.mjs.map +0 -1
  107. package/dist/client/_securityGroupId-DmplhDgt.mjs.map +0 -1
  108. package/dist/client/_storageType-C5gS9eut.mjs +0 -845
  109. package/dist/client/_storageType-C5gS9eut.mjs.map +0 -1
  110. package/dist/client/flavors-D8_PzQUB.mjs +0 -628
  111. package/dist/client/flavors-D8_PzQUB.mjs.map +0 -1
  112. package/dist/client/images-BGQv9kKT.mjs.map +0 -1
  113. package/dist/client/objects-AERkhfiM.mjs +0 -66
  114. package/dist/client/objects-AERkhfiM.mjs.map +0 -1
  115. package/dist/client/objects-BR3eeSNH.mjs.map +0 -1
  116. package/dist/client/objects-DVccbrL1.mjs.map +0 -1
  117. package/dist/client/securitygroups-BjhgLBHm.mjs +0 -620
  118. package/dist/client/securitygroups-BjhgLBHm.mjs.map +0 -1
  119. package/dist/client/useModalTracking-BcOKTYRN.mjs +0 -33
  120. package/dist/client/useModalTracking-BcOKTYRN.mjs.map +0 -1
  121. package/dist/client/useSecurityGroupPermissions-BOyLQLdC.mjs +0 -227
  122. package/dist/client/useSecurityGroupPermissions-BOyLQLdC.mjs.map +0 -1
@@ -1,123 +1,123 @@
1
- import { C as e, D as t, K as n, L as r, O as i, Q as a, R as o, S as s, T as c, U as l, V as u, X as d, a as f, c as p, ft as m, g as h, h as g, i as _, it as v, l as y, m as b, o as ee, ot as x, p as S, rt as C, st as te, t as w, x as T } from "./build-WuxXRAqf.mjs";
2
- import { a as E, i as D } from "./trpcClient-D7gpR7YG.mjs";
3
- import { t as O } from "./cn-DM4Cy3jv.mjs";
4
- import { t as k } from "./images-CPmMa4SQ.mjs";
5
- import { t as A } from "./useProjectId-DBc5lpoU.mjs";
6
- import { t as j } from "./SortInput-4g7nSTHW.mjs";
7
- import { t as ne } from "./useModalTracking-BcOKTYRN.mjs";
8
- import { t as M } from "./ContentHeader-CPJbgYWn.mjs";
1
+ import { C as e, D as t, K as n, L as r, O as i, Q as a, R as o, S as s, T as c, U as l, V as u, X as d, a as f, c as p, ft as m, g as h, h as g, i as _, it as v, l as y, m as b, o as x, ot as S, p as C, r as w, rt as T, st as E, t as D, x as O } from "./build-WuxXRAqf.mjs";
2
+ import { a as k, i as A } from "./trpcClient-D7gpR7YG.mjs";
3
+ import { t as j } from "./cn-DM4Cy3jv.mjs";
4
+ import { t as M } from "./images-DZHDYDQu.mjs";
5
+ import { t as N } from "./useProjectId-DBc5lpoU.mjs";
6
+ import { t as ee } from "./SortInput-4g7nSTHW.mjs";
7
+ import { t as P } from "./useModalTracking-BYd37pXm.mjs";
8
+ import { t as F } from "./ContentHeader-CPJbgYWn.mjs";
9
9
  import "./hooks-D0yKIumu.mjs";
10
- import { A as N, C as re, D as ie, E as ae, F as P, I as oe, M as F, N as I, O as L, P as R, S as z, T as B, _ as se, a as ce, b as le, c as ue, d as V, f as H, g as U, h as de, i as W, j as G, k as fe, l as pe, m as me, n as he, o as ge, p as _e, r as ve, s as ye, t as be, u as xe, v as Se, w as Ce, x as we, y as Te } from "./ImageToastNotifications-m6c3tVPb.mjs";
11
- import { n as Ee, t as De } from "./FiltersInput-CKI6zWnm.mjs";
10
+ import { A as I, C as te, D as ne, E as L, F as re, I as R, M as z, N as B, O as ie, P as V, S as H, T as ae, _ as oe, a as se, b as ce, c as U, d as W, f as le, g as ue, h as G, i as de, j as fe, k as pe, l as me, m as he, n as ge, o as _e, p as ve, r as ye, s as be, t as xe, u as Se, v as Ce, w as we, x as Te, y as Ee } from "./ImageToastNotifications-BWfzOUMc.mjs";
11
+ import { n as De, t as Oe } from "./FiltersInput-Becwxo_J.mjs";
12
12
  import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
13
- import { Suspense as Oe, startTransition as ke, use as Ae, useCallback as je, useEffect as Y, useMemo as X, useRef as Me, useState as Z } from "react";
14
- import { useNavigate as Ne, useParams as Pe, useSearch as Fe } from "@tanstack/react-router";
15
- import { TRPCClientError as Ie } from "@trpc/client";
13
+ import { Suspense as ke, startTransition as Ae, use as je, useCallback as Y, useEffect as X, useMemo as Me, useRef as Ne, useState as Z } from "react";
14
+ import { useNavigate as Pe, useParams as Fe, useSearch as Ie } from "@tanstack/react-router";
15
+ import { TRPCClientError as Le } from "@trpc/client";
16
16
  import { Trans as Q, useLingui as $ } from "@lingui/react";
17
- import { z as Le } from "zod";
18
- import { ErrorBoundary as Re } from "react-error-boundary";
19
- import { useForm as ze, useStore as Be } from "@tanstack/react-form";
17
+ import { z as Re } from "zod";
18
+ import { ErrorBoundary as ze } from "react-error-boundary";
19
+ import { useForm as Be, useStore as Ve } from "@tanstack/react-form";
20
20
  import "@trpc/server";
21
21
  //#region src/client/routes/_auth/projects/$projectId/compute/images/-components/ImageTableRow.tsx
22
- function Ve({ image: e, isSelected: r, isPending: i, isAccepted: a, permissions: o, onEditDetails: s, onEditMetadata: l, onDelete: u, onSelect: d, onActivationStatusChange: f, onManageAccess: p, onUpdateVisibility: m, uploadId: g, uploadProgressPercent: _, onMemberStatusChanged: v, showSelectColumn: y = !1 }) {
23
- let { i18n: b, _: ee } = $(), { id: S, name: C, status: D, visibility: O, size: k, disk_format: A, created_at: j, owner: ne } = e, M = C || b._({ id: "MEIAzV" }), { projectId: N } = Pe({ from: "/_auth/projects/$projectId/compute/images/" }), re = Ne(), ie = E.useUtils(), ae = E.compute.updateImageMember.useMutation({ onSuccess: () => {
24
- ie.compute.listImagesWithPagination.invalidate(), ie.compute.listSharedImagesByMemberStatus.invalidate();
25
- } }), F = async (e) => {
22
+ function He({ image: e, isSelected: r, isPending: i, isAccepted: a, permissions: o, onEditDetails: s, onEditMetadata: l, onDelete: u, onSelect: d, onActivationStatusChange: f, onManageAccess: p, onUpdateVisibility: m, uploadId: g, uploadProgressPercent: _, onMemberStatusChanged: v, showSelectColumn: y = !1 }) {
23
+ let { i18n: b, _: x } = $(), { id: C, name: T, status: A, visibility: j, size: M, disk_format: N, created_at: ee, owner: P } = e, F = T || b._({ id: "MEIAzV" }), { projectId: I } = Fe({ from: "/_auth/projects/$projectId/compute/images/" }), te = Pe(), ne = k.useUtils(), L = k.compute.updateImageMember.useMutation({ onSuccess: () => {
24
+ ne.compute.listImagesWithPagination.invalidate(), ne.compute.listSharedImagesByMemberStatus.invalidate();
25
+ } }), z = async (e) => {
26
26
  try {
27
- await ae.mutateAsync({
28
- project_id: N,
29
- imageId: S,
30
- memberId: N,
27
+ await L.mutateAsync({
28
+ project_id: I,
29
+ imageId: C,
30
+ memberId: I,
31
31
  status: e
32
32
  });
33
- let { message: t, ...n } = V(e);
34
- x.info(t, n), v?.();
33
+ let { message: t, ...n } = W(e);
34
+ S.info(t, n), v?.();
35
35
  } catch (e) {
36
- let t = e?.message, { message: n, ...r } = xe(t);
37
- x.error(n, r);
36
+ let t = e?.message, { message: n, ...r } = Se(t);
37
+ S.error(n, r);
38
38
  }
39
- }, L = N === ne, z = i || a, B = ae.isPending;
39
+ }, ie = I === P, H = i || a, ae = L.isPending;
40
40
  return /*#__PURE__*/ J(c, {
41
- "data-testid": `image-row-${S}`,
42
- onClick: () => re({
41
+ "data-testid": `image-row-${C}`,
42
+ onClick: () => te({
43
43
  to: "/projects/$projectId/compute/images/$imageId",
44
44
  params: {
45
- projectId: N,
46
- imageId: S
45
+ projectId: I,
46
+ imageId: C
47
47
  }
48
48
  }),
49
49
  children: [
50
- y && /*#__PURE__*/ q(w, {
50
+ y && /*#__PURE__*/ q(D, {
51
51
  onClick: (e) => e.stopPropagation(),
52
- children: /*#__PURE__*/ q(te, {
52
+ children: /*#__PURE__*/ q(E, {
53
53
  checked: r,
54
54
  onChange: () => d(e)
55
55
  })
56
56
  }),
57
- /*#__PURE__*/ q(w, { children: D }),
58
- /*#__PURE__*/ q(w, { children: M }),
59
- /*#__PURE__*/ q(w, { children: O }),
60
- /*#__PURE__*/ q(w, { children: e.protected ? b._({ id: "l75CjT" }) : b._({ id: "1UzENP" }) }),
61
- /*#__PURE__*/ q(w, { children: g && g === S ? `${_}%` : /*#__PURE__*/ q(oe, { size: k }) }),
62
- /*#__PURE__*/ q(w, { children: A || b._({ id: "fj5byd" }) }),
63
- /*#__PURE__*/ q(w, { children: j ? new Date(j).toLocaleDateString() : b._({ id: "fj5byd" }) }),
64
- /*#__PURE__*/ q(w, {
57
+ /*#__PURE__*/ q(D, { children: A }),
58
+ /*#__PURE__*/ q(D, { children: F }),
59
+ /*#__PURE__*/ q(D, { children: j }),
60
+ /*#__PURE__*/ q(D, { children: e.protected ? b._({ id: "l75CjT" }) : b._({ id: "1UzENP" }) }),
61
+ /*#__PURE__*/ q(D, { children: g && g === C ? `${_}%` : /*#__PURE__*/ q(R, { size: M }) }),
62
+ /*#__PURE__*/ q(D, { children: N || b._({ id: "fj5byd" }) }),
63
+ /*#__PURE__*/ q(D, { children: ee ? new Date(ee).toLocaleDateString() : b._({ id: "fj5byd" }) }),
64
+ /*#__PURE__*/ q(D, {
65
65
  onClick: (e) => e.stopPropagation(),
66
- children: B ? /*#__PURE__*/ q(n, {
66
+ children: ae ? /*#__PURE__*/ q(n, {
67
67
  variant: "primary",
68
68
  size: "small"
69
69
  }) : /*#__PURE__*/ q(t, { children: /*#__PURE__*/ J(h, { children: [
70
- /*#__PURE__*/ q(T, {
71
- label: b._({ id: "v0hPHE" }),
72
- onClick: () => re({
73
- to: "/projects/$projectId/compute/images/$imageId",
74
- params: {
75
- projectId: N,
76
- imageId: S
77
- }
78
- })
79
- }),
80
- z && o.canUpdateMember && /*#__PURE__*/ J(K, { children: [i && /*#__PURE__*/ q(T, {
70
+ H && o.canUpdateMember && /*#__PURE__*/ J(K, { children: [i && /*#__PURE__*/ q(O, {
81
71
  label: b._({ id: "g3UF2V" }),
82
- onClick: () => F(P.ACCEPTED)
83
- }), /*#__PURE__*/ q(T, {
72
+ onClick: () => z(re.ACCEPTED)
73
+ }), /*#__PURE__*/ q(O, {
84
74
  label: b._({ id: "1t/NnN" }),
85
- onClick: () => F(P.REJECTED)
75
+ onClick: () => z(re.REJECTED)
86
76
  })] }),
87
- !z && o.canUpdate && /*#__PURE__*/ J(K, { children: [
88
- /*#__PURE__*/ q(T, {
77
+ !H && o.canUpdate && /*#__PURE__*/ J(K, { children: [
78
+ /*#__PURE__*/ q(O, {
79
+ label: e.status === B.DEACTIVATED ? b._({ id: "FQBaXG" }) : b._({ id: "5y3O+A" }),
80
+ onClick: () => f(e)
81
+ }),
82
+ /*#__PURE__*/ q(O, {
89
83
  label: b._({ id: "Y1YKad" }),
90
84
  onClick: () => s(e)
91
85
  }),
92
- /*#__PURE__*/ q(T, {
86
+ /*#__PURE__*/ q(O, {
93
87
  label: b._({ id: "SIfYq6" }),
94
88
  onClick: () => l(e)
95
89
  }),
96
- /*#__PURE__*/ q(T, {
97
- label: e.status === I.DEACTIVATED ? b._({ id: "FQBaXG" }) : b._({ id: "5y3O+A" }),
98
- onClick: () => f(e)
99
- }),
100
- e.visibility === R.SHARED && L && (o.canCreateMember || o.canDeleteMember) && /*#__PURE__*/ q(T, {
90
+ e.visibility === V.SHARED && ie && (o.canCreateMember || o.canDeleteMember) && /*#__PURE__*/ q(O, {
101
91
  label: b._({ id: "cWbW6w" }),
102
92
  onClick: () => p(e)
103
93
  }),
104
- e.visibility === R.PRIVATE && /*#__PURE__*/ q(T, {
94
+ e.visibility === V.PRIVATE && /*#__PURE__*/ q(O, {
105
95
  label: b._({ id: "gMYsdZ" }),
106
- onClick: () => m(e.id, R.SHARED, M)
96
+ onClick: () => m(e.id, V.SHARED, F)
107
97
  })
108
98
  ] }),
109
- !z && o.canDelete && !e.protected && /*#__PURE__*/ q(T, {
99
+ /*#__PURE__*/ q(O, {
100
+ label: b._({ id: "v0hPHE" }),
101
+ onClick: () => te({
102
+ to: "/projects/$projectId/compute/images/$imageId",
103
+ params: {
104
+ projectId: I,
105
+ imageId: C
106
+ }
107
+ })
108
+ }),
109
+ !H && o.canDelete && !e.protected && /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ q(w, {}), /*#__PURE__*/ q(O, {
110
110
  label: b._({ id: "cnGeoo" }),
111
111
  onClick: () => u(e)
112
- })
112
+ })] })
113
113
  ] }) })
114
114
  })
115
115
  ]
116
- }, S);
116
+ }, C);
117
117
  }
118
118
  //#endregion
119
119
  //#region src/server/Compute/helpers/imageHelpers.ts
120
- var He = {
120
+ var Ue = {
121
121
  qcow2: [
122
122
  "bare",
123
123
  "ova",
@@ -137,7 +137,7 @@ var He = {
137
137
  aki: ["aki"],
138
138
  ari: ["ari"],
139
139
  ploop: ["bare"]
140
- }, Ue = {
140
+ }, We = {
141
141
  qcow2: "bare",
142
142
  raw: "bare",
143
143
  vmdk: "bare",
@@ -150,28 +150,28 @@ var He = {
150
150
  ari: "ari",
151
151
  ploop: "bare"
152
152
  };
153
- function We(e) {
154
- return He[e] || [];
155
- }
156
153
  function Ge(e) {
157
- return Ue[e] || "";
154
+ return Ue[e] || [];
158
155
  }
159
- function Ke(e, t) {
160
- return We(e).includes(t);
156
+ function Ke(e) {
157
+ return We[e] || "";
158
+ }
159
+ function qe(e, t) {
160
+ return Ge(e).includes(t);
161
161
  }
162
162
  //#endregion
163
163
  //#region src/client/routes/_auth/projects/$projectId/compute/images/-components/CreateImageModal.tsx
164
- var qe = {
164
+ var Je = {
165
165
  name: "",
166
166
  tags: [],
167
- visibility: R.PRIVATE,
167
+ visibility: V.PRIVATE,
168
168
  disk_format: void 0,
169
169
  container_format: void 0,
170
170
  protected: !1,
171
171
  min_disk: 0,
172
172
  min_ram: 0
173
- }, Je = ({ isOpen: e, onClose: t, onCreate: i, isLoading: s = !1, isUploadPending: c = !1, uploadProgressPercent: u }) => {
174
- let { i18n: f, _: p } = $(), [h, y] = Z({ ...qe }), [ee, x] = Z(""), [C, w] = Z(null), [T, E] = Z({}), [D, k] = Z(!1), [A, j] = Z(null), ne = h.name.trim() !== "" && C !== null && h.disk_format !== void 0 && h.disk_format.trim() !== "" && h.container_format !== void 0 && h.container_format.trim() !== "" && h.min_disk >= 0 && h.min_ram >= 0, M = X(() => h.disk_format ? We(h.disk_format) : [], [h.disk_format]), N = [
173
+ }, Ye = ({ isOpen: e, onClose: t, onCreate: n, isLoading: i = !1, isUploadPending: s = !1, uploadProgressPercent: c }) => {
174
+ let { i18n: u, _: f } = $(), [p, h] = Z({ ...Je }), [y, x] = Z(""), [S, w] = Z(null), [D, O] = Z({}), [k, A] = Z(!1), [M, N] = Z(null), ee = p.name.trim() !== "" && S !== null && p.disk_format !== void 0 && p.disk_format.trim() !== "" && p.container_format !== void 0 && p.container_format.trim() !== "" && p.min_disk >= 0 && p.min_ram >= 0, P = Me(() => p.disk_format ? Ge(p.disk_format) : [], [p.disk_format]), F = [
175
175
  ".qcow2",
176
176
  ".raw",
177
177
  ".vmdk",
@@ -184,163 +184,158 @@ var qe = {
184
184
  ".iso",
185
185
  ".ploop",
186
186
  ".img"
187
- ], re = N.join(", "), ie = (e) => {
187
+ ], I = F.join(", "), te = (e) => {
188
188
  let { name: t, value: n, type: r, checked: i } = e.target;
189
- y((e) => ({
189
+ h((e) => ({
190
190
  ...e,
191
191
  [t]: r === "checkbox" ? i : n
192
- })), T[t] && E((e) => {
192
+ })), D[t] && O((e) => {
193
193
  let n = { ...e };
194
194
  return delete n[t], n;
195
195
  });
196
- }, ae = (e) => {
196
+ }, ne = (e) => {
197
197
  let { name: t, value: n } = e.target;
198
- t === "name" && (!n || n.trim() === "") && E((e) => ({
198
+ t === "name" && (!n || n.trim() === "") && O((e) => ({
199
199
  ...e,
200
- name: f._({ id: "wyIOMP" })
200
+ name: u._({ id: "wyIOMP" })
201
201
  }));
202
- }, P = (e, t) => {
202
+ }, L = (e, t) => {
203
203
  if (e === "disk_format") {
204
- let e = t, n = Ge(e);
205
- y((t) => ({
204
+ let e = t, n = Ke(e);
205
+ h((t) => ({
206
206
  ...t,
207
207
  disk_format: e,
208
208
  container_format: n
209
209
  }));
210
- } else y((n) => ({
210
+ } else h((n) => ({
211
211
  ...n,
212
212
  [e]: t
213
213
  }));
214
- T[e] && E((t) => {
214
+ D[e] && O((t) => {
215
215
  let n = { ...t };
216
216
  return delete n[e], n;
217
217
  });
218
- }, oe = (e, t) => {
218
+ }, re = (e, t) => {
219
219
  let n = t === "" ? 0 : parseInt(t, 10);
220
- isNaN(n) || (y((t) => ({
220
+ isNaN(n) || (h((t) => ({
221
221
  ...t,
222
222
  [e]: n
223
- })), T[e] && E((t) => {
223
+ })), D[e] && O((t) => {
224
224
  let n = { ...t };
225
225
  return delete n[e], n;
226
226
  }));
227
- }, I = (e, t) => {
228
- t < 0 && (e === "min_disk" ? E((e) => ({
227
+ }, R = (e, t) => {
228
+ t < 0 && (e === "min_disk" ? O((e) => ({
229
229
  ...e,
230
- min_disk: f._({ id: "K3bUTE" })
231
- })) : e === "min_ram" && E((e) => ({
230
+ min_disk: u._({ id: "K3bUTE" })
231
+ })) : e === "min_ram" && O((e) => ({
232
232
  ...e,
233
- min_ram: f._({ id: "PEGvy+" })
233
+ min_ram: u._({ id: "PEGvy+" })
234
234
  })));
235
- }, L = (e) => {
235
+ }, B = (e) => {
236
236
  let t = e.name.toLowerCase();
237
- N.some((e) => t.endsWith(e)) ? (w(e), T.file && E((e) => {
237
+ F.some((e) => t.endsWith(e)) ? (w(e), D.file && O((e) => {
238
238
  let t = { ...e };
239
239
  return delete t.file, t;
240
- })) : E((e) => ({
240
+ })) : O((e) => ({
241
241
  ...e,
242
- file: f._({
242
+ file: u._({
243
243
  id: "qzIZOL",
244
- values: { supportedFileFormats: re }
244
+ values: { supportedFileFormats: I }
245
245
  })
246
246
  }));
247
- }, z = (e) => {
247
+ }, ie = (e) => {
248
248
  let t = e.target.files?.[0];
249
- t && L(t);
250
- }, B = (e) => {
251
- e.preventDefault(), e.stopPropagation(), k(!0);
252
- }, se = (e) => {
253
- e.preventDefault(), e.stopPropagation(), k(!1);
254
- }, ce = (e) => {
255
- e.preventDefault(), e.stopPropagation(), k(!1);
249
+ t && B(t);
250
+ }, H = (e) => {
251
+ e.preventDefault(), e.stopPropagation(), A(!0);
252
+ }, ae = (e) => {
253
+ e.preventDefault(), e.stopPropagation(), A(!1);
254
+ }, oe = (e) => {
255
+ e.preventDefault(), e.stopPropagation(), A(!1);
256
256
  let t = e.dataTransfer.files;
257
- t && t.length > 0 && L(t[0]);
258
- }, le = (e) => {
257
+ t && t.length > 0 && B(t[0]);
258
+ }, se = (e) => {
259
259
  x(e.target.value);
260
- }, ue = () => {
261
- let e = ee.trim();
260
+ }, ce = () => {
261
+ let e = y.trim();
262
262
  if (e !== "") {
263
- if (h.tags.includes(e)) {
263
+ if (p.tags.includes(e)) {
264
264
  x("");
265
265
  return;
266
266
  }
267
- y((t) => ({
267
+ h((t) => ({
268
268
  ...t,
269
269
  tags: [...t.tags, e]
270
270
  })), x("");
271
271
  }
272
- }, V = (e) => {
273
- e.key === "Enter" && (e.preventDefault(), ue());
274
- }, H = (e) => {
275
- y((t) => ({
272
+ }, U = (e) => {
273
+ e.key === "Enter" && (e.preventDefault(), ce());
274
+ }, W = (e) => {
275
+ h((t) => ({
276
276
  ...t,
277
277
  tags: t.tags.filter((t) => t !== e)
278
278
  }));
279
- }, U = () => {
279
+ }, le = () => {
280
280
  let e = {};
281
- return (!h.name || h.name.trim() === "") && (e.name = f._({ id: "wyIOMP" })), C || (e.file = f._({ id: "aTqCTq" })), (!h.disk_format || h.disk_format.trim() === "") && (e.disk_format = f._({ id: "LK0pQN" })), (!h.container_format || h.container_format.trim() === "") && (e.container_format = f._({ id: "J4DKSM" })), h.disk_format && h.container_format && (Ke(h.disk_format, h.container_format) || (e.container_format = f._({ id: "BgMp/T" }))), h.min_disk < 0 && (e.min_disk = f._({ id: "K3bUTE" })), h.min_ram < 0 && (e.min_ram = f._({ id: "PEGvy+" })), E(e), Object.keys(e).length === 0;
282
- }, de = async (e) => {
283
- if (e.preventDefault(), j(null), !U()) {
284
- j(f._({ id: "CBFSfX" }));
281
+ return (!p.name || p.name.trim() === "") && (e.name = u._({ id: "wyIOMP" })), S || (e.file = u._({ id: "aTqCTq" })), (!p.disk_format || p.disk_format.trim() === "") && (e.disk_format = u._({ id: "LK0pQN" })), (!p.container_format || p.container_format.trim() === "") && (e.container_format = u._({ id: "J4DKSM" })), p.disk_format && p.container_format && (qe(p.disk_format, p.container_format) || (e.container_format = u._({ id: "BgMp/T" }))), p.min_disk < 0 && (e.min_disk = u._({ id: "K3bUTE" })), p.min_ram < 0 && (e.min_ram = u._({ id: "PEGvy+" })), O(e), Object.keys(e).length === 0;
282
+ }, ue = async (e) => {
283
+ if (e.preventDefault(), N(null), !le()) {
284
+ N(u._({ id: "CBFSfX" }));
285
285
  return;
286
286
  }
287
287
  try {
288
- await i({
289
- name: h.name.trim(),
290
- tags: h.tags,
291
- visibility: h.visibility,
292
- disk_format: h.disk_format,
293
- container_format: h.container_format,
294
- protected: h.protected,
295
- min_disk: h.min_disk,
296
- min_ram: h.min_ram
297
- }, C), W();
288
+ await n({
289
+ name: p.name.trim(),
290
+ tags: p.tags,
291
+ visibility: p.visibility,
292
+ disk_format: p.disk_format,
293
+ container_format: p.container_format,
294
+ protected: p.protected,
295
+ min_disk: p.min_disk,
296
+ min_ram: p.min_ram
297
+ }, S), G();
298
298
  } catch (e) {
299
- let t = e instanceof Error ? e.message : f._({ id: "TQn3hH" });
300
- j(t);
299
+ let t = e instanceof Error ? e.message : u._({ id: "TQn3hH" });
300
+ N(t);
301
301
  }
302
- }, W = () => {
303
- y({ ...qe }), x(""), w(null), E({}), j(null), t();
302
+ }, G = () => {
303
+ h({ ...Je }), x(""), w(null), O({}), N(null), t();
304
304
  };
305
305
  return /*#__PURE__*/ J(d, {
306
306
  open: e,
307
- onCancel: s ? void 0 : W,
307
+ onCancel: i ? void 0 : G,
308
308
  size: "large",
309
- title: f._({ id: "xw2UtT" }),
310
- onConfirm: de,
311
- confirmButtonLabel: f._({ id: "a/nTb8" }),
312
- cancelButtonLabel: f._({ id: "dEgA5A" }),
313
- disableConfirmButton: s || !ne,
314
- closeable: !s,
315
- closeOnEsc: !s,
309
+ title: u._({ id: "xw2UtT" }),
310
+ onConfirm: ue,
311
+ confirmButtonLabel: u._({ id: "a/nTb8" }),
312
+ cancelButtonLabel: u._({ id: "dEgA5A" }),
313
+ disableConfirmButton: i || !ee,
314
+ closeable: !i,
315
+ closeOnEsc: !i,
316
316
  children: [
317
- s && !u && /*#__PURE__*/ J(a, {
318
- distribution: "center",
319
- alignment: "center",
320
- className: "mt-4",
321
- children: [
322
- /*#__PURE__*/ q(n, { variant: "primary" }),
323
- !c && /*#__PURE__*/ q(Q, { id: "98Fs4G" }),
324
- c && /*#__PURE__*/ q(Q, { id: "3q1GLx" })
325
- ]
317
+ i && !c && /*#__PURE__*/ q(T, {
318
+ status: "progress",
319
+ title: s ? u._({ id: "JGNFec" }) : u._({ id: "T6jnH+" }),
320
+ className: "mt-4"
326
321
  }),
327
- s && !!u && /*#__PURE__*/ q("div", {
322
+ i && !!c && /*#__PURE__*/ q("div", {
328
323
  className: "bg-neutral-quaternary mt-4 w-full rounded-full",
329
324
  children: /*#__PURE__*/ J("div", {
330
325
  className: "bg-theme-info flex h-4 items-center justify-center rounded-full p-0.5 text-center text-xs leading-none font-medium text-white",
331
- style: { width: `${u}%` },
332
- children: [u, "%"]
326
+ style: { width: `${c}%` },
327
+ children: [c, "%"]
333
328
  })
334
329
  }),
335
- !s && /*#__PURE__*/ J(m, {
330
+ !i && /*#__PURE__*/ J(m, {
336
331
  className: "mb-6",
337
332
  children: [
338
- A && /*#__PURE__*/ q(r, {
333
+ M && /*#__PURE__*/ q(r, {
339
334
  variant: "error",
340
335
  className: "mb-6",
341
- children: A
336
+ children: M
342
337
  }),
343
- /*#__PURE__*/ q(S, {
338
+ /*#__PURE__*/ q(C, {
344
339
  className: "mb-6",
345
340
  children: /*#__PURE__*/ q(g, { children: /*#__PURE__*/ J("div", {
346
341
  className: "w-full",
@@ -348,7 +343,7 @@ var qe = {
348
343
  /*#__PURE__*/ J("label", {
349
344
  htmlFor: "image-file",
350
345
  className: "mb-2 block text-sm font-medium text-gray-900",
351
- children: [f._({ id: "UKwOYH" }), /*#__PURE__*/ q("span", {
346
+ children: [u._({ id: "UKwOYH" }), /*#__PURE__*/ q("span", {
352
347
  className: "ml-1 text-red-500",
353
348
  children: "*"
354
349
  })]
@@ -357,15 +352,15 @@ var qe = {
357
352
  className: "flex w-full items-center justify-center",
358
353
  children: /*#__PURE__*/ J("label", {
359
354
  htmlFor: "image-file",
360
- onDragOver: B,
361
- onDragLeave: se,
362
- onDrop: ce,
363
- className: O("flex h-24 w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed transition-all", D ? "border-blue-500 bg-blue-50" : "border-gray-300 bg-gray-50 hover:bg-gray-100"),
355
+ onDragOver: H,
356
+ onDragLeave: ae,
357
+ onDrop: oe,
358
+ className: j("flex h-24 w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed transition-all", k ? "border-blue-500 bg-blue-50" : "border-gray-300 bg-gray-50 hover:bg-gray-100"),
364
359
  children: [/*#__PURE__*/ J("div", {
365
360
  className: "flex flex-col items-center justify-center pt-3 pb-3",
366
361
  children: [
367
362
  /*#__PURE__*/ q("svg", {
368
- className: O("mb-1 h-6 w-6 transition-colors", D ? "text-blue-500" : "text-gray-500"),
363
+ className: j("mb-1 h-6 w-6 transition-colors", k ? "text-blue-500" : "text-gray-500"),
369
364
  "aria-hidden": "true",
370
365
  xmlns: "http://www.w3.org/2000/svg",
371
366
  fill: "none",
@@ -379,32 +374,32 @@ var qe = {
379
374
  })
380
375
  }),
381
376
  /*#__PURE__*/ q("p", {
382
- className: O("text-xs transition-colors", D ? "font-semibold text-blue-600" : "text-gray-500"),
383
- children: D ? /*#__PURE__*/ q("span", { children: f._({ id: "vXmL4D" }) }) : /*#__PURE__*/ J(K, { children: [
377
+ className: j("text-xs transition-colors", k ? "font-semibold text-blue-600" : "text-gray-500"),
378
+ children: k ? /*#__PURE__*/ q("span", { children: u._({ id: "vXmL4D" }) }) : /*#__PURE__*/ J(K, { children: [
384
379
  /*#__PURE__*/ q("span", {
385
380
  className: "font-semibold",
386
- children: f._({ id: "gYe+hC" })
381
+ children: u._({ id: "gYe+hC" })
387
382
  }),
388
383
  " ",
389
- f._({ id: "Np28ib" })
384
+ u._({ id: "Np28ib" })
390
385
  ] })
391
386
  }),
392
387
  /*#__PURE__*/ q("p", {
393
388
  className: "text-xs text-gray-400",
394
- children: f._({ id: "jBIkmi" })
389
+ children: u._({ id: "jBIkmi" })
395
390
  })
396
391
  ]
397
392
  }), /*#__PURE__*/ q("input", {
398
393
  id: "image-file",
399
394
  type: "file",
400
395
  className: "hidden",
401
- onChange: z,
402
- accept: re,
403
- disabled: s
396
+ onChange: ie,
397
+ accept: I,
398
+ disabled: i
404
399
  })]
405
400
  })
406
401
  }),
407
- C && /*#__PURE__*/ J("div", {
402
+ S && /*#__PURE__*/ J("div", {
408
403
  className: "mt-2 flex items-center justify-between rounded-lg border border-green-200 bg-green-50 p-2 text-xs",
409
404
  children: [/*#__PURE__*/ J("div", {
410
405
  className: "flex items-center",
@@ -419,29 +414,29 @@ var qe = {
419
414
  })
420
415
  }), /*#__PURE__*/ q("span", {
421
416
  className: "text-gray-700",
422
- children: C.name
417
+ children: S.name
423
418
  })]
424
419
  }), /*#__PURE__*/ q("button", {
425
420
  type: "button",
426
421
  onClick: () => {
427
- w(null), T.file && E((e) => {
422
+ w(null), D.file && O((e) => {
428
423
  let t = { ...e };
429
424
  return delete t.file, t;
430
425
  });
431
426
  },
432
427
  className: "font-medium text-red-600 hover:text-red-800",
433
- disabled: s,
434
- children: f._({ id: "t/YqKh" })
428
+ disabled: i,
429
+ children: u._({ id: "t/YqKh" })
435
430
  })]
436
431
  }),
437
- T.file && /*#__PURE__*/ q("p", {
432
+ D.file && /*#__PURE__*/ q("p", {
438
433
  className: "text-theme-error mt-1 text-xs text-red-600",
439
- children: T.file
434
+ children: D.file
440
435
  })
441
436
  ]
442
437
  }) })
443
438
  }),
444
- /*#__PURE__*/ J(S, {
439
+ /*#__PURE__*/ J(C, {
445
440
  className: "mb-6",
446
441
  children: [
447
442
  /*#__PURE__*/ q(g, {
@@ -449,14 +444,14 @@ var qe = {
449
444
  children: /*#__PURE__*/ q(b, {
450
445
  id: "name",
451
446
  name: "name",
452
- label: f._({ id: "ExLULX" }),
453
- value: h.name,
454
- onChange: ie,
455
- onBlur: ae,
447
+ label: u._({ id: "ExLULX" }),
448
+ value: p.name,
449
+ onChange: te,
450
+ onBlur: ne,
456
451
  required: !0,
457
- errortext: T.name,
458
- placeholder: f._({ id: "PsEGri" }),
459
- disabled: s
452
+ errortext: D.name,
453
+ placeholder: u._({ id: "ZgyEqj" }),
454
+ disabled: i
460
455
  })
461
456
  }),
462
457
  /*#__PURE__*/ q(g, {
@@ -472,30 +467,30 @@ var qe = {
472
467
  children: /*#__PURE__*/ q(b, {
473
468
  id: "tags",
474
469
  name: "tags",
475
- label: f._({ id: "OYHzN1" }),
476
- value: ee,
477
- onChange: le,
478
- onKeyDown: V,
479
- helptext: f._({ id: "AN0DBJ" }),
480
- placeholder: f._({ id: "tmpGvt" }),
481
- disabled: s
470
+ label: u._({ id: "OYHzN1" }),
471
+ value: y,
472
+ onChange: se,
473
+ onKeyDown: U,
474
+ helptext: u._({ id: "PpMrSG" }),
475
+ placeholder: u._({ id: "qzx7aY" }),
476
+ disabled: i
482
477
  })
483
478
  }), /*#__PURE__*/ q(_, {
484
479
  variant: "primary",
485
- onClick: ue,
486
- disabled: s || ee.trim() === "",
480
+ onClick: ce,
481
+ disabled: i || y.trim() === "",
487
482
  children: /*#__PURE__*/ q(Q, { id: "m16xKo" })
488
483
  })]
489
- }), h.tags.length > 0 && /*#__PURE__*/ q(a, {
484
+ }), p.tags.length > 0 && /*#__PURE__*/ q(a, {
490
485
  gap: "1",
491
486
  wrap: !0,
492
487
  alignment: "center",
493
488
  className: "mt-1",
494
- children: h.tags.map((e) => /*#__PURE__*/ q(l, {
489
+ children: p.tags.map((e) => /*#__PURE__*/ q(l, {
495
490
  closeable: !0,
496
491
  pillKey: "",
497
492
  pillValue: e,
498
- onClose: () => H(e)
493
+ onClose: () => W(e)
499
494
  }, e))
500
495
  })]
501
496
  })
@@ -505,27 +500,27 @@ var qe = {
505
500
  children: /*#__PURE__*/ J(v, {
506
501
  id: "visibility",
507
502
  name: "visibility",
508
- label: f._({ id: "2q/Q7x" }),
509
- value: h.visibility,
510
- onChange: (e) => P("visibility", e),
511
- disabled: s,
512
- loading: s,
503
+ label: u._({ id: "2q/Q7x" }),
504
+ value: p.visibility,
505
+ onChange: (e) => L("visibility", e),
506
+ disabled: i,
507
+ loading: i,
513
508
  children: [
514
509
  /*#__PURE__*/ q(o, {
515
- value: R.PUBLIC,
516
- label: f._({ id: "7d1a0d" })
510
+ value: V.PUBLIC,
511
+ label: u._({ id: "7d1a0d" })
517
512
  }),
518
513
  /*#__PURE__*/ q(o, {
519
- value: R.PRIVATE,
520
- label: f._({ id: "zwBp5t" })
514
+ value: V.PRIVATE,
515
+ label: u._({ id: "zwBp5t" })
521
516
  }),
522
517
  /*#__PURE__*/ q(o, {
523
- value: R.SHARED,
524
- label: f._({ id: "0Gd0NU" })
518
+ value: V.SHARED,
519
+ label: u._({ id: "0Gd0NU" })
525
520
  }),
526
521
  /*#__PURE__*/ q(o, {
527
- value: R.COMMUNITY,
528
- label: f._({ id: "chL5IG" })
522
+ value: V.COMMUNITY,
523
+ label: u._({ id: "chL5IG" })
529
524
  })
530
525
  ]
531
526
  })
@@ -542,56 +537,56 @@ var qe = {
542
537
  children: /*#__PURE__*/ J(v, {
543
538
  id: "disk_format",
544
539
  name: "disk_format",
545
- label: f._({ id: "NopYGU" }),
546
- value: h.disk_format,
547
- onChange: (e) => P("disk_format", e),
548
- disabled: s,
549
- loading: s,
540
+ label: u._({ id: "NopYGU" }),
541
+ value: p.disk_format,
542
+ onChange: (e) => L("disk_format", e),
543
+ disabled: i,
544
+ loading: i,
550
545
  required: !0,
551
- errortext: T.disk_format,
546
+ errortext: D.disk_format,
552
547
  children: [
553
548
  /*#__PURE__*/ q(o, {
554
- value: F.QCOW2,
549
+ value: z.QCOW2,
555
550
  label: "QCOW2 - QEMU Emulator"
556
551
  }),
557
552
  /*#__PURE__*/ q(o, {
558
- value: F.RAW,
553
+ value: z.RAW,
559
554
  label: "Raw"
560
555
  }),
561
556
  /*#__PURE__*/ q(o, {
562
- value: F.VMDK,
557
+ value: z.VMDK,
563
558
  label: "VMDK - Virtual Machine Disk"
564
559
  }),
565
560
  /*#__PURE__*/ q(o, {
566
- value: F.VHD,
561
+ value: z.VHD,
567
562
  label: "VHD - Virtual Hard Disk"
568
563
  }),
569
564
  /*#__PURE__*/ q(o, {
570
- value: F.VHDX,
565
+ value: z.VHDX,
571
566
  label: "VHDX - Virtual Hard Disk Extended"
572
567
  }),
573
568
  /*#__PURE__*/ q(o, {
574
- value: F.VDI,
569
+ value: z.VDI,
575
570
  label: "VDI - Virtual Disk Image"
576
571
  }),
577
572
  /*#__PURE__*/ q(o, {
578
- value: F.AMI,
573
+ value: z.AMI,
579
574
  label: "AMI - Amazon Machine Image"
580
575
  }),
581
576
  /*#__PURE__*/ q(o, {
582
- value: F.ARI,
577
+ value: z.ARI,
583
578
  label: "ARI - Amazon Ramdisk Image"
584
579
  }),
585
580
  /*#__PURE__*/ q(o, {
586
- value: F.AKI,
581
+ value: z.AKI,
587
582
  label: "AKI - Amazon Kernel Image"
588
583
  }),
589
584
  /*#__PURE__*/ q(o, {
590
- value: F.ISO,
585
+ value: z.ISO,
591
586
  label: "ISO - Optical Disk Image"
592
587
  }),
593
588
  /*#__PURE__*/ q(o, {
594
- value: F.PLOOP,
589
+ value: z.PLOOP,
595
590
  label: "PLOOP - Virtuozzo/Parallels Loopback Disk"
596
591
  })
597
592
  ]
@@ -601,14 +596,14 @@ var qe = {
601
596
  children: /*#__PURE__*/ q(v, {
602
597
  id: "container_format",
603
598
  name: "container_format",
604
- label: f._({ id: "6/xipy" }),
605
- value: h.container_format,
606
- onChange: (e) => P("container_format", e),
607
- disabled: s || !h.disk_format || !M.length,
599
+ label: u._({ id: "6/xipy" }),
600
+ value: p.container_format,
601
+ onChange: (e) => L("container_format", e),
602
+ disabled: i || !p.disk_format || !P.length,
608
603
  required: !0,
609
- errortext: T.container_format,
610
- helptext: !M.length && f._({ id: "A7CVME" }),
611
- children: M.map((e) => /*#__PURE__*/ q(o, {
604
+ errortext: D.container_format,
605
+ helptext: !P.length && u._({ id: "A7CVME" }),
606
+ children: P.map((e) => /*#__PURE__*/ q(o, {
612
607
  value: e,
613
608
  label: e.toUpperCase()
614
609
  }, e))
@@ -618,19 +613,19 @@ var qe = {
618
613
  }),
619
614
  /*#__PURE__*/ q(g, {
620
615
  className: "mb-0",
621
- children: /*#__PURE__*/ q(te, {
616
+ children: /*#__PURE__*/ q(E, {
622
617
  id: "protected",
623
618
  name: "protected",
624
- label: f._({ id: "644xgx" }),
625
- checked: h.protected,
626
- onChange: ie,
627
- helptext: f._({ id: "aV6KPH" }),
628
- disabled: s
619
+ label: u._({ id: "644xgx" }),
620
+ checked: p.protected,
621
+ onChange: te,
622
+ helptext: u._({ id: "aV6KPH" }),
623
+ disabled: i
629
624
  })
630
625
  })
631
626
  ]
632
627
  }),
633
- /*#__PURE__*/ q(S, {
628
+ /*#__PURE__*/ q(C, {
634
629
  className: "mb-6",
635
630
  children: /*#__PURE__*/ q(g, {
636
631
  className: "mb-0",
@@ -644,28 +639,28 @@ var qe = {
644
639
  children: /*#__PURE__*/ q(b, {
645
640
  id: "min_disk",
646
641
  name: "min_disk",
647
- label: f._({ id: "NixRmA" }),
642
+ label: u._({ id: "NixRmA" }),
648
643
  type: "number",
649
- value: String(h.min_disk),
650
- onChange: (e) => oe("min_disk", e.target.value),
651
- onBlur: () => I("min_disk", h.min_disk),
652
- helptext: f._({ id: "4fh0Wj" }),
653
- errortext: T.min_disk,
654
- disabled: s
644
+ value: String(p.min_disk),
645
+ onChange: (e) => re("min_disk", e.target.value),
646
+ onBlur: () => R("min_disk", p.min_disk),
647
+ helptext: u._({ id: "4fh0Wj" }),
648
+ errortext: D.min_disk,
649
+ disabled: i
655
650
  })
656
651
  }), /*#__PURE__*/ q("div", {
657
652
  className: "flex-1",
658
653
  children: /*#__PURE__*/ q(b, {
659
654
  id: "min_ram",
660
655
  name: "min_ram",
661
- label: f._({ id: "CgZxr7" }),
656
+ label: u._({ id: "CgZxr7" }),
662
657
  type: "number",
663
- value: String(h.min_ram),
664
- onChange: (e) => oe("min_ram", e.target.value),
665
- onBlur: () => I("min_ram", h.min_ram),
666
- helptext: f._({ id: "KsIM0b" }),
667
- errortext: T.min_ram,
668
- disabled: s
658
+ value: String(p.min_ram),
659
+ onChange: (e) => re("min_ram", e.target.value),
660
+ onBlur: () => R("min_ram", p.min_ram),
661
+ helptext: u._({ id: "KsIM0b" }),
662
+ errortext: D.min_ram,
663
+ disabled: i
669
664
  })
670
665
  })]
671
666
  })
@@ -675,24 +670,24 @@ var qe = {
675
670
  })
676
671
  ]
677
672
  });
678
- }, Ye = 20, Xe = 100, Ze = ({ deletableImages: e, protectedImages: t, isOpen: n, isLoading: r, onClose: i, onDelete: o }) => {
679
- let { i18n: s, _: c } = $(), [l, u] = Z(null), { trackClose: f, markSubmitted: p, resetTracking: h } = ne({
673
+ }, Xe = 20, Ze = 100, Qe = ({ deletableImages: e, protectedImages: t, isOpen: n, isLoading: r, onClose: i, onDelete: o }) => {
674
+ let { i18n: s, _: c } = $(), [l, u] = Z(null), { trackClose: f, markSubmitted: p, resetTracking: h } = P({
680
675
  isOpen: n,
681
676
  actionPrefix: "compute.images.delete"
682
- }), g = Le.object({ confirm: Le.string().refine((e) => e === "delete", { message: s._({ id: "QytzQr" }) }) }), _ = ze({
677
+ }), g = Re.object({ confirm: Re.string().refine((e) => e === "delete", { message: s._({ id: "QytzQr" }) }) }), _ = Be({
683
678
  defaultValues: { confirm: "" },
684
679
  validators: { onSubmit: g },
685
680
  onSubmit: async () => {
686
- l === null && !r ? (p(), o(e)) : x();
681
+ l === null && !r ? (p(), o(e.map((e) => e.id))) : S();
687
682
  }
688
- }), v = Be(_.store, (e) => e.isSubmitting || e.values.confirm !== "delete"), y = e.length, ee = t.length, x = () => {
683
+ }), v = Ve(_.store, (e) => e.isSubmitting || e.values.confirm !== "delete"), y = e.length, x = t.length, S = () => {
689
684
  f(), u(null), _.reset(), h(), i();
690
685
  };
691
686
  if (l !== null) {
692
- let e = l.errors.slice(0, Xe), t = l.errors.length - e.length;
687
+ let e = l.errors.slice(0, Ze), t = l.errors.length - e.length;
693
688
  return /*#__PURE__*/ q(d, {
694
689
  open: n,
695
- onCancel: x,
690
+ onCancel: S,
696
691
  title: /*#__PURE__*/ q(Q, { id: "ExvQL2" }),
697
692
  size: "large",
698
693
  confirmButtonLabel: s._({ id: "DPfwMq" }),
@@ -742,16 +737,16 @@ var qe = {
742
737
  })
743
738
  });
744
739
  }
745
- let C = e.slice(0, Ye), te = e.length - C.length, w = t.slice(0, Ye), T = t.length - w.length, E = r ? s._({ id: "EF2EU9" }) : y === 1 ? s._({ id: "KWa0gi" }) : s._({ id: "JtHgVz" });
740
+ let w = e.slice(0, Xe), T = e.length - w.length, E = t.slice(0, Xe), D = t.length - E.length, O = r ? s._({ id: "EF2EU9" }) : y === 1 ? s._({ id: "KWa0gi" }) : s._({ id: "JtHgVz" });
746
741
  return /*#__PURE__*/ q(d, {
747
742
  open: n,
748
- onCancel: x,
743
+ onCancel: S,
749
744
  title: /*#__PURE__*/ q(Q, {
750
745
  id: "FZc7ea",
751
746
  values: { deletableCount: y }
752
747
  }),
753
748
  size: "large",
754
- confirmButtonLabel: E,
749
+ confirmButtonLabel: O,
755
750
  confirmButtonVariant: "primary-danger",
756
751
  onConfirm: _.handleSubmit,
757
752
  cancelButtonLabel: s._({ id: "dEgA5A" }),
@@ -768,41 +763,67 @@ var qe = {
768
763
  }),
769
764
  /*#__PURE__*/ J("div", {
770
765
  className: "space-y-3",
771
- children: [y > 0 && /*#__PURE__*/ J("div", { children: [/*#__PURE__*/ q("p", {
766
+ children: [x > 0 && /*#__PURE__*/ J("div", { children: [/*#__PURE__*/ q("p", {
772
767
  className: "text-sm font-semibold",
773
- children: /*#__PURE__*/ q(Q, { id: "MJtNLd" })
768
+ children: /*#__PURE__*/ q(Q, {
769
+ id: "k1lWHA",
770
+ values: { protectedCount: x }
771
+ })
774
772
  }), /*#__PURE__*/ q("div", {
775
773
  className: "bg-theme-background-lvl-2 mt-2 max-h-48 overflow-y-auto rounded p-3",
776
774
  children: /*#__PURE__*/ J(a, {
777
775
  direction: "vertical",
778
776
  gap: "1",
779
- children: [C.map((e) => /*#__PURE__*/ q("div", {
780
- className: "text-theme-default overflow-x-hidden text-sm [overflow-wrap:anywhere]",
781
- children: e
782
- }, e)), te > 0 && /*#__PURE__*/ q("div", {
777
+ children: [E.map((e) => /*#__PURE__*/ J("div", {
778
+ className: "text-theme-default text-sm",
779
+ children: [/*#__PURE__*/ q("span", {
780
+ className: "font-medium",
781
+ children: e.name || s._({ id: "MEIAzV" })
782
+ }), /*#__PURE__*/ J("span", {
783
+ className: "text-theme-light ml-2 text-xs",
784
+ children: [
785
+ "(",
786
+ e.id,
787
+ ")"
788
+ ]
789
+ })]
790
+ }, e.id)), D > 0 && /*#__PURE__*/ q("div", {
783
791
  className: "text-theme-light pt-2 text-sm",
784
792
  children: /*#__PURE__*/ q(Q, {
785
- id: "0TREPo",
786
- values: { hiddenDeletableCount: te }
793
+ id: "yZrrKY",
794
+ values: { hiddenProtectedCount: D }
787
795
  })
788
796
  })]
789
797
  })
790
- })] }), ee > 0 && /*#__PURE__*/ J("div", { children: [/*#__PURE__*/ q("p", {
798
+ })] }), y > 0 && /*#__PURE__*/ J("div", { children: [/*#__PURE__*/ q("p", {
791
799
  className: "text-sm font-semibold",
792
- children: /*#__PURE__*/ q(Q, { id: "8tFjKD" })
800
+ children: /*#__PURE__*/ q(Q, {
801
+ id: "A1M+ku",
802
+ values: { deletableCount: y }
803
+ })
793
804
  }), /*#__PURE__*/ q("div", {
794
- className: "bg-theme-warning/10 mt-2 max-h-48 overflow-y-auto rounded border border-yellow-500/20 p-3",
805
+ className: "bg-theme-background-lvl-2 mt-2 max-h-48 overflow-y-auto rounded p-3",
795
806
  children: /*#__PURE__*/ J(a, {
796
807
  direction: "vertical",
797
808
  gap: "1",
798
- children: [w.map((e) => /*#__PURE__*/ q("div", {
799
- className: "text-theme-default overflow-x-hidden text-sm [overflow-wrap:anywhere]",
800
- children: e
801
- }, e)), T > 0 && /*#__PURE__*/ q("div", {
809
+ children: [w.map((e) => /*#__PURE__*/ J("div", {
810
+ className: "text-theme-default text-sm",
811
+ children: [/*#__PURE__*/ q("span", {
812
+ className: "font-medium",
813
+ children: e.name || s._({ id: "MEIAzV" })
814
+ }), /*#__PURE__*/ J("span", {
815
+ className: "text-theme-light ml-2 text-xs",
816
+ children: [
817
+ "(",
818
+ e.id,
819
+ ")"
820
+ ]
821
+ })]
822
+ }, e.id)), T > 0 && /*#__PURE__*/ q("div", {
802
823
  className: "text-theme-light pt-2 text-sm",
803
824
  children: /*#__PURE__*/ q(Q, {
804
- id: "yZrrKY",
805
- values: { hiddenProtectedCount: T }
825
+ id: "0TREPo",
826
+ values: { hiddenDeletableCount: T }
806
827
  })
807
828
  })]
808
829
  })
@@ -814,7 +835,7 @@ var qe = {
814
835
  onSubmit: (e) => {
815
836
  e.preventDefault(), _.handleSubmit();
816
837
  },
817
- children: /*#__PURE__*/ q(S, { children: /*#__PURE__*/ q(_.Field, {
838
+ children: /*#__PURE__*/ q(C, { children: /*#__PURE__*/ q(_.Field, {
818
839
  name: "confirm",
819
840
  children: (e) => /*#__PURE__*/ q(b, {
820
841
  label: s._({ id: "QytzQr" }),
@@ -834,156 +855,190 @@ var qe = {
834
855
  ]
835
856
  })
836
857
  });
837
- }, Qe = ({ activeImages: e, deactivatedImages: t, isOpen: r, isLoading: i, onClose: o, onDeactivate: s }) => {
838
- let { i18n: c, _: l } = $(), u = e.length, f = t.length, p = (t) => {
839
- t.preventDefault(), s(e);
858
+ }, $e = ({ activeImages: e, deactivatedImages: t, isOpen: n, isLoading: r, onClose: i, onDeactivate: a }) => {
859
+ let { i18n: o, _: s } = $(), c = e.length, l = t.length, u = (t) => {
860
+ t.preventDefault(), a(e.map((e) => e.id));
840
861
  };
841
- return /*#__PURE__*/ J(d, {
842
- onCancel: o,
862
+ return /*#__PURE__*/ q(d, {
863
+ onCancel: i,
843
864
  size: "small",
844
- title: c._({ id: "+9CXS9" }),
845
- open: r,
865
+ title: /*#__PURE__*/ q(Q, {
866
+ id: "9SJ9QF",
867
+ values: { activeCount: c }
868
+ }),
869
+ open: n,
846
870
  onConfirm: (e) => {
847
- p(e), o();
871
+ u(e), i();
848
872
  },
849
- confirmButtonLabel: c._({ id: "5y3O+A" }),
850
- cancelButtonLabel: c._({ id: "dEgA5A" }),
851
- disableConfirmButton: i,
852
- children: [i && /*#__PURE__*/ q(a, {
853
- distribution: "center",
854
- alignment: "center",
855
- children: /*#__PURE__*/ q(n, { variant: "primary" })
856
- }), !i && /*#__PURE__*/ J("div", {
873
+ confirmButtonLabel: o._({ id: "5y3O+A" }),
874
+ cancelButtonLabel: o._({ id: "dEgA5A" }),
875
+ disableConfirmButton: r,
876
+ disableCancelButton: r,
877
+ disableCloseButton: r,
878
+ children: r ? /*#__PURE__*/ q(T, {
879
+ status: "progress",
880
+ title: o._({ id: "ZVOPtb" }),
881
+ className: "mt-0"
882
+ }) : /*#__PURE__*/ q("div", {
857
883
  className: "my-6",
858
- children: [u > 0 && /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ q("p", {
859
- className: "mb-6",
860
- children: /*#__PURE__*/ q(Q, {
861
- id: "zm7+/D",
862
- values: { activeCount: u },
863
- components: { 0: /*#__PURE__*/ q("strong", {}) }
884
+ children: c > 0 && /*#__PURE__*/ J(K, { children: [
885
+ /*#__PURE__*/ q("p", {
886
+ className: "mb-6",
887
+ children: /*#__PURE__*/ q(Q, { id: "d3QRaL" })
888
+ }),
889
+ l > 0 && /*#__PURE__*/ J("div", {
890
+ className: "mb-6",
891
+ children: [/*#__PURE__*/ q("p", {
892
+ className: "text-sm font-semibold",
893
+ children: /*#__PURE__*/ q(Q, {
894
+ id: "6enkjl",
895
+ values: { deactivatedCount: l }
896
+ })
897
+ }), /*#__PURE__*/ q("div", {
898
+ className: "jn:bg-theme-background-lvl-1 mt-2 max-h-24 overflow-y-auto rounded p-4",
899
+ children: /*#__PURE__*/ q("div", {
900
+ className: "space-y-1",
901
+ children: t.map((e) => /*#__PURE__*/ J("div", {
902
+ className: "text-theme-default text-sm",
903
+ children: [/*#__PURE__*/ q("span", {
904
+ className: "font-medium",
905
+ children: e.name || o._({ id: "MEIAzV" })
906
+ }), /*#__PURE__*/ J("span", {
907
+ className: "text-theme-light ml-2 text-xs",
908
+ children: [
909
+ "(",
910
+ e.id,
911
+ ")"
912
+ ]
913
+ })]
914
+ }, e.id))
915
+ })
916
+ })]
917
+ }),
918
+ /*#__PURE__*/ J("div", {
919
+ className: "mb-6",
920
+ children: [/*#__PURE__*/ q("p", {
921
+ className: "text-sm font-semibold",
922
+ children: /*#__PURE__*/ q(Q, {
923
+ id: "v8OJPu",
924
+ values: { activeCount: c }
925
+ })
926
+ }), /*#__PURE__*/ q("div", {
927
+ className: "jn:bg-theme-background-lvl-1 mt-2 max-h-24 overflow-y-auto rounded p-4",
928
+ children: /*#__PURE__*/ q("div", {
929
+ className: "space-y-1",
930
+ children: e.map((e) => /*#__PURE__*/ J("div", {
931
+ className: "text-theme-default text-sm",
932
+ children: [/*#__PURE__*/ q("span", {
933
+ className: "font-medium",
934
+ children: e.name || o._({ id: "MEIAzV" })
935
+ }), /*#__PURE__*/ J("span", {
936
+ className: "text-theme-light ml-2 text-xs",
937
+ children: [
938
+ "(",
939
+ e.id,
940
+ ")"
941
+ ]
942
+ })]
943
+ }, e.id))
944
+ })
945
+ })]
864
946
  })
865
- }), /*#__PURE__*/ J("div", {
866
- className: "mb-6",
867
- children: [/*#__PURE__*/ q("p", {
868
- className: "text-sm font-semibold",
869
- children: /*#__PURE__*/ q(Q, { id: "rD9yV1" })
870
- }), /*#__PURE__*/ q("div", {
871
- className: "jn:bg-theme-background-lvl-1 mt-2 max-h-24 overflow-y-auto rounded p-4",
872
- children: /*#__PURE__*/ q("ul", {
873
- className: "space-y-2",
874
- children: e.map((e) => /*#__PURE__*/ q("li", {
875
- className: "jn:text-theme-default",
876
- children: e
877
- }, e))
878
- })
879
- })]
880
- })] }), f > 0 && /*#__PURE__*/ J("div", {
881
- className: "mb-6",
882
- children: [/*#__PURE__*/ q("p", {
883
- className: "text-sm font-semibold",
884
- children: /*#__PURE__*/ q(Q, { id: "NH2fsP" })
885
- }), /*#__PURE__*/ q("div", {
886
- className: "jn:bg-theme-background-lvl-1 mt-2 max-h-24 overflow-y-auto rounded p-4",
887
- children: /*#__PURE__*/ q("ul", {
888
- className: "space-y-2",
889
- children: t.map((e) => /*#__PURE__*/ q("li", {
890
- className: "jn:text-theme-default",
891
- children: e
892
- }, e))
893
- })
894
- })]
895
- })]
896
- })]
947
+ ] })
948
+ })
897
949
  });
898
- }, $e = ({ deactivatedImages: e, activeImages: t, isOpen: r, isLoading: i, onClose: o, onActivate: s }) => {
899
- let { i18n: c, _: l } = $(), u = e.length, f = t.length;
900
- return /*#__PURE__*/ J(d, {
901
- onCancel: o,
950
+ }, et = ({ deactivatedImages: e, activeImages: t, isOpen: n, isLoading: r, onClose: i, onActivate: a }) => {
951
+ let { i18n: o, _: s } = $(), c = e.length, l = t.length;
952
+ return /*#__PURE__*/ q(d, {
953
+ onCancel: i,
902
954
  size: "small",
903
- title: c._({ id: "UdcGJu" }),
904
- open: r,
955
+ title: /*#__PURE__*/ q(Q, {
956
+ id: "yETT/b",
957
+ values: { deactivatedCount: c }
958
+ }),
959
+ open: n,
905
960
  onConfirm: (t) => {
906
- t.preventDefault(), s(e);
961
+ t.preventDefault(), a(e.map((e) => e.id));
907
962
  },
908
- confirmButtonLabel: c._({ id: "FQBaXG" }),
909
- cancelButtonLabel: c._({ id: "dEgA5A" }),
910
- disableConfirmButton: i,
911
- children: [i && /*#__PURE__*/ q(a, {
912
- distribution: "center",
913
- alignment: "center",
914
- children: /*#__PURE__*/ q(n, { variant: "primary" })
915
- }), !i && /*#__PURE__*/ J("div", {
963
+ confirmButtonLabel: o._({ id: "FQBaXG" }),
964
+ cancelButtonLabel: o._({ id: "dEgA5A" }),
965
+ disableConfirmButton: r,
966
+ disableCancelButton: r,
967
+ disableCloseButton: r,
968
+ children: r ? /*#__PURE__*/ q(T, {
969
+ status: "progress",
970
+ title: o._({ id: "nuetDT" }),
971
+ className: "mt-0"
972
+ }) : /*#__PURE__*/ q("div", {
916
973
  className: "my-6",
917
- children: [
918
- u > 0 && /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ q("p", {
974
+ children: c > 0 && /*#__PURE__*/ J(K, { children: [
975
+ /*#__PURE__*/ q("p", {
919
976
  className: "mb-6",
920
- children: /*#__PURE__*/ q(Q, {
921
- id: "MgZyuJ",
922
- values: { deactivatedCount: u },
923
- components: { 0: /*#__PURE__*/ q("strong", {}) }
924
- })
925
- }), /*#__PURE__*/ J("div", {
977
+ children: /*#__PURE__*/ q(Q, { id: "5UiM8J" })
978
+ }),
979
+ l > 0 && /*#__PURE__*/ J("div", {
926
980
  className: "mb-6",
927
- children: [/*#__PURE__*/ q("h3", {
928
- className: "jn:text-theme-high mb-3 font-semibold",
981
+ children: [/*#__PURE__*/ q("p", {
982
+ className: "text-sm font-semibold",
929
983
  children: /*#__PURE__*/ q(Q, {
930
- id: "shKIZu",
931
- values: { deactivatedCount: u }
984
+ id: "QoVs5e",
985
+ values: { activeCount: l }
932
986
  })
933
987
  }), /*#__PURE__*/ q("div", {
934
- className: "jn:bg-theme-background-lvl-1 max-h-24 overflow-y-auto rounded p-4",
935
- children: /*#__PURE__*/ q("ul", {
936
- className: "space-y-2",
937
- children: e.map((e) => /*#__PURE__*/ q("li", {
938
- className: "jn:text-theme-default",
939
- children: e
940
- }, e))
988
+ className: "jn:bg-theme-background-lvl-1 mt-2 max-h-24 overflow-y-auto rounded p-4",
989
+ children: /*#__PURE__*/ q("div", {
990
+ className: "space-y-1",
991
+ children: t.map((e) => /*#__PURE__*/ J("div", {
992
+ className: "text-theme-default text-sm",
993
+ children: [/*#__PURE__*/ q("span", {
994
+ className: "font-medium",
995
+ children: e.name || o._({ id: "MEIAzV" })
996
+ }), /*#__PURE__*/ J("span", {
997
+ className: "text-theme-light ml-2 text-xs",
998
+ children: [
999
+ "(",
1000
+ e.id,
1001
+ ")"
1002
+ ]
1003
+ })]
1004
+ }, e.id))
941
1005
  })
942
1006
  })]
943
- })] }),
944
- f > 0 && /*#__PURE__*/ J("div", {
1007
+ }),
1008
+ /*#__PURE__*/ J("div", {
945
1009
  className: "mb-6",
946
- children: [/*#__PURE__*/ q("h3", {
947
- className: "jn:text-theme-high mb-3 font-semibold",
948
- children: /*#__PURE__*/ q(Q, { id: "pOPvlj" })
1010
+ children: [/*#__PURE__*/ q("p", {
1011
+ className: "text-sm font-semibold",
1012
+ children: /*#__PURE__*/ q(Q, {
1013
+ id: "ezGecL",
1014
+ values: { deactivatedCount: c }
1015
+ })
949
1016
  }), /*#__PURE__*/ q("div", {
950
- className: "jn:bg-theme-warning/10 max-h-24 overflow-y-auto rounded border border-yellow-500/20 p-4",
951
- children: /*#__PURE__*/ q("ul", {
952
- className: "space-y-2",
953
- children: t.map((e) => /*#__PURE__*/ q("li", {
954
- className: "jn:text-theme-default",
955
- children: e
956
- }, e))
1017
+ className: "jn:bg-theme-background-lvl-1 mt-2 max-h-24 overflow-y-auto rounded p-4",
1018
+ children: /*#__PURE__*/ q("div", {
1019
+ className: "space-y-1",
1020
+ children: e.map((e) => /*#__PURE__*/ J("div", {
1021
+ className: "text-theme-default text-sm",
1022
+ children: [/*#__PURE__*/ q("span", {
1023
+ className: "font-medium",
1024
+ children: e.name || o._({ id: "MEIAzV" })
1025
+ }), /*#__PURE__*/ J("span", {
1026
+ className: "text-theme-light ml-2 text-xs",
1027
+ children: [
1028
+ "(",
1029
+ e.id,
1030
+ ")"
1031
+ ]
1032
+ })]
1033
+ }, e.id))
957
1034
  })
958
1035
  })]
959
- }),
960
- /*#__PURE__*/ J("div", {
961
- className: "jn:bg-theme-background-lvl-2 mb-6 rounded p-4",
962
- children: [u > 0 && /*#__PURE__*/ J("div", {
963
- className: "mb-2 flex justify-between",
964
- children: [/*#__PURE__*/ q("span", {
965
- className: "jn:text-theme-default",
966
- children: /*#__PURE__*/ q(Q, { id: "4fvDRe" })
967
- }), /*#__PURE__*/ q("span", {
968
- className: "jn:text-theme-highest font-semibold",
969
- children: u
970
- })]
971
- }), f > 0 && /*#__PURE__*/ J("div", {
972
- className: "flex justify-between",
973
- children: [/*#__PURE__*/ q("span", {
974
- className: "jn:text-theme-default",
975
- children: /*#__PURE__*/ q(Q, { id: "x5l/TK" })
976
- }), /*#__PURE__*/ q("span", {
977
- className: "jn:text-theme-warning font-semibold",
978
- children: f
979
- })]
980
- })]
981
1036
  })
982
- ]
983
- })]
1037
+ ] })
1038
+ })
984
1039
  });
985
- }, et = ({ isOpen: e, onClose: t, image: n, permissions: { canCreateMember: i, canDeleteMember: a } }) => {
986
- let { i18n: o, _: s } = $(), c = A(), [l, u] = Z(null), [f, p] = Z(!1), { data: m, isLoading: h } = E.compute.listImageMembers.useQuery({
1040
+ }, tt = ({ isOpen: e, onClose: t, image: n, permissions: { canCreateMember: i, canDeleteMember: a } }) => {
1041
+ let { i18n: o, _: s } = $(), c = N(), [l, u] = Z(null), [f, p] = Z(!1), { data: m, isLoading: h } = k.compute.listImageMembers.useQuery({
987
1042
  project_id: c,
988
1043
  imageId: n?.id || ""
989
1044
  }, { enabled: e && !!n?.id }), g = () => {
@@ -1004,7 +1059,7 @@ var qe = {
1004
1059
  text: l.text,
1005
1060
  variant: l.type,
1006
1061
  className: "mb-4"
1007
- }), /*#__PURE__*/ q(N, {
1062
+ }), /*#__PURE__*/ q(I, {
1008
1063
  projectId: c,
1009
1064
  image: n,
1010
1065
  imageMembers: m,
@@ -1019,40 +1074,40 @@ var qe = {
1019
1074
  };
1020
1075
  //#endregion
1021
1076
  //#region src/client/routes/_auth/projects/$projectId/compute/images/-components/ImageListView.tsx
1022
- function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r, isFetching: i, currentPage: a = 1, totalPages: o = 1, onPageChange: l, children: d, selectedImages: f, setSelectedImages: p, deleteAllModalOpen: m, setDeleteAllModalOpen: h, deactivateAllModalOpen: g, setDeactivateAllModalOpen: _, activateAllModalOpen: v, setActivateAllModalOpen: y, createModalOpen: b, setCreateModalOpen: S, deletableImages: te, protectedImages: T, activeImages: O, deactivatedImages: k, onImageUpdated: j, onImageDeleted: ne, onMemberStatusChanged: M, hasAnyBulkAction: N }) {
1023
- let P = A(), [oe, F] = Z(!1), [R, V] = Z(!1), [G, xe] = Z(!1), [Ee, De] = Z(!1), [Oe, ke] = Z(!1), [Ae, je] = Z(!1), [Y, X] = Z(null), [Me, Ne] = Z(!1), [Pe, Fe] = Z(null), [Le, Re] = Z(!1), { i18n: ze, _: Be } = $(), He = E.useUtils(), Ue = E.compute.deleteImage.useMutation(), We = E.compute.deactivateImage.useMutation({ onSuccess: () => {
1024
- He.compute.getImageById.invalidate();
1025
- } }), Ge = E.compute.reactivateImage.useMutation({ onSuccess: () => {
1026
- He.compute.getImageById.invalidate();
1027
- } }), Ke = E.compute.deleteImages.useMutation({ onSuccess: () => {
1077
+ function nt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r, isFetching: i, currentPage: a = 1, totalPages: o = 1, onPageChange: l, children: d, selectedImages: f, setSelectedImages: p, deleteAllModalOpen: m, setDeleteAllModalOpen: h, deactivateAllModalOpen: g, setDeactivateAllModalOpen: _, activateAllModalOpen: v, setActivateAllModalOpen: y, createModalOpen: b, setCreateModalOpen: C, deletableImages: w, protectedImages: E, activeImages: O, deactivatedImages: j, onImageUpdated: M, onImageDeleted: ee, onMemberStatusChanged: P, hasAnyBulkAction: F }) {
1078
+ let I = N(), [re, R] = Z(!1), [z, V] = Z(!1), [W, fe] = Z(!1), [Se, De] = Z(!1), [Oe, ke] = Z(!1), [Ae, je] = Z(!1), [Y, X] = Z(null), [Me, Ne] = Z(!1), [Pe, Fe] = Z(null), [Ie, Re] = Z(!1), { i18n: ze, _: Be } = $(), Ve = k.useUtils(), Ue = k.compute.deleteImage.useMutation(), We = k.compute.deactivateImage.useMutation({ onSuccess: () => {
1079
+ Ve.compute.getImageById.invalidate();
1080
+ } }), Ge = k.compute.reactivateImage.useMutation({ onSuccess: () => {
1081
+ Ve.compute.getImageById.invalidate();
1082
+ } }), Ke = k.compute.deleteImages.useMutation({ onSuccess: () => {
1028
1083
  p([]);
1029
- } }), qe = E.compute.activateImages.useMutation({ onSuccess: () => {
1084
+ } }), qe = k.compute.activateImages.useMutation({ onSuccess: () => {
1030
1085
  p([]);
1031
- } }), Ye = E.compute.deactivateImages.useMutation({ onSuccess: () => {
1086
+ } }), Je = k.compute.deactivateImages.useMutation({ onSuccess: () => {
1032
1087
  p([]);
1033
- } }), Xe = E.compute.updateImage.useMutation({ onSuccess: (e) => {
1034
- He.compute.getImageById.setData({
1035
- project_id: P,
1088
+ } }), Xe = k.compute.updateImage.useMutation({ onSuccess: (e) => {
1089
+ Ve.compute.getImageById.setData({
1090
+ project_id: I,
1036
1091
  imageId: e.id
1037
1092
  }, e);
1038
- } }), tt = E.compute.createImage.useMutation(), nt = E.compute.updateImageVisibility.useMutation(), { data: rt } = E.compute.watchUploadProgress.useSubscription({
1039
- project_id: P,
1093
+ } }), Ze = k.compute.createImage.useMutation(), nt = k.compute.updateImageVisibility.useMutation(), { data: rt } = k.compute.watchUploadProgress.useSubscription({
1094
+ project_id: I,
1040
1095
  uploadId: Pe || ""
1041
- }, { enabled: !!Pe && Le }), it = Ue.isPending || We.isPending || Ge.isPending || Ke.isPending || qe.isPending || Ye.isPending || Xe.isPending, at = async (e, t, n) => {
1096
+ }, { enabled: !!Pe && Ie }), it = Ue.isPending || We.isPending || Ge.isPending || Ke.isPending || qe.isPending || Je.isPending || Xe.isPending, at = async (e, t, n) => {
1042
1097
  try {
1043
- j(await nt.mutateAsync({
1044
- project_id: P,
1098
+ M(await nt.mutateAsync({
1099
+ project_id: I,
1045
1100
  imageId: e,
1046
1101
  visibility: t
1047
1102
  }));
1048
- let { message: r, ...i } = Ce(n, t);
1049
- x.success(r, i);
1103
+ let { message: r, ...i } = we(n, t);
1104
+ S.success(r, i);
1050
1105
  } catch (e) {
1051
1106
  let r = e?.message || ze._({
1052
1107
  id: "J9cmxx",
1053
1108
  values: { newVisibility: t }
1054
- }), { message: i, ...a } = re(n, r);
1055
- x.error(i, a);
1109
+ }), { message: i, ...a } = te(n, r);
1110
+ S.error(i, a);
1056
1111
  }
1057
1112
  }, ot = (e, t) => {
1058
1113
  let n = [];
@@ -1076,106 +1131,106 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
1076
1131
  let t = Y.id, n = e.name || Y.name || t;
1077
1132
  try {
1078
1133
  let r = ot(e, Y), i = await Xe.mutateAsync({
1079
- project_id: P,
1134
+ project_id: I,
1080
1135
  imageId: t,
1081
1136
  operations: r
1082
1137
  });
1083
- F(!1);
1084
- let { message: a, ...o } = z(n);
1085
- return x.success(a, o), X(i), j(i), !0;
1138
+ R(!1);
1139
+ let { message: a, ...o } = H(n);
1140
+ return S.success(a, o), X(i), M(i), !0;
1086
1141
  } catch (e) {
1087
- let t = e?.message ?? "", { message: r, ...i } = we(n, t);
1088
- return x.error(r, i), X(null), !1;
1142
+ let t = e?.message ?? "", { message: r, ...i } = Te(n, t);
1143
+ return S.error(r, i), X(null), !1;
1089
1144
  }
1090
1145
  }, ct = async (e, t) => {
1091
1146
  let n = e.name || "Unnamed";
1092
1147
  try {
1093
1148
  Ne(!0);
1094
- let r = await tt.mutateAsync({
1095
- project_id: P,
1149
+ let r = await Ze.mutateAsync({
1150
+ project_id: I,
1096
1151
  ...e
1097
1152
  });
1098
- Fe(r.id), Re(!0), await D.compute.uploadImage.mutate(t, { context: { headers: {
1099
- "x-project-id": P,
1153
+ Fe(r.id), Re(!0), await A.compute.uploadImage.mutate(t, { context: { headers: {
1154
+ "x-project-id": I,
1100
1155
  "x-upload-id": r.id,
1101
1156
  "x-upload-size": String(t.size)
1102
1157
  } } });
1103
- let { message: i, ...a } = de(n);
1104
- x.success(i, a), j(r), M();
1158
+ let { message: i, ...a } = G(n);
1159
+ S.success(i, a), M(r), P();
1105
1160
  } catch (e) {
1106
- if (e instanceof Ie && e.data?.path === "compute.createImage") {
1107
- let { message: t, ...r } = me(n, e.message);
1108
- x.error(t, r);
1161
+ if (e instanceof Le && e.data?.path === "compute.createImage") {
1162
+ let { message: t, ...r } = he(n, e.message);
1163
+ S.error(t, r);
1109
1164
  } else {
1110
- let n = e?.message ?? "", { message: r, ...i } = le(t.name, n);
1111
- x.error(r, i);
1165
+ let n = e?.message ?? "", { message: r, ...i } = ce(t.name, n);
1166
+ S.error(r, i);
1112
1167
  }
1113
1168
  } finally {
1114
- Ne(!1), S(!1), Re(!1), Fe(null);
1169
+ Ne(!1), C(!1), Re(!1), Fe(null);
1115
1170
  }
1116
1171
  }, lt = async (e) => {
1117
- F(!1), V(!1);
1172
+ R(!1), V(!1);
1118
1173
  let t = e.name || e.id, n = e.id;
1119
1174
  try {
1120
1175
  await Ue.mutateAsync({
1121
- project_id: P,
1176
+ project_id: I,
1122
1177
  imageId: n
1123
1178
  });
1124
- let { message: e, ...r } = Te(t);
1125
- x.success(e, r), ne(n);
1179
+ let { message: e, ...r } = Ee(t);
1180
+ S.success(e, r), ee(n);
1126
1181
  } catch (e) {
1127
- let t = e?.message ?? "", { message: r, ...i } = Se(n, t);
1128
- x.error(r, i);
1182
+ let t = e?.message ?? "", { message: r, ...i } = Ce(n, t);
1183
+ S.error(r, i);
1129
1184
  }
1130
1185
  X(null);
1131
1186
  }, ut = async (e) => {
1132
- e.status === I.DEACTIVATED ? (X(e), ke(!0)) : (X(e), De(!0));
1187
+ e.status === B.DEACTIVATED ? (X(e), ke(!0)) : (X(e), De(!0));
1133
1188
  }, dt = async (e) => {
1134
1189
  let t = e.name || e.id, n = e.id;
1135
1190
  try {
1136
1191
  await Ge.mutateAsync({
1137
- project_id: P,
1192
+ project_id: I,
1138
1193
  imageId: n
1139
- }), j({
1194
+ }), M({
1140
1195
  ...e,
1141
- status: I.ACTIVE
1196
+ status: B.ACTIVE
1142
1197
  }), ke(!1), X(null);
1143
- let { message: r, ...i } = H(t);
1144
- x.success(r, i);
1198
+ let { message: r, ...i } = le(t);
1199
+ S.success(r, i);
1145
1200
  } catch (e) {
1146
- let t = e?.message ?? "", { message: r, ...i } = _e(n, t);
1147
- x.error(r, i);
1201
+ let t = e?.message ?? "", { message: r, ...i } = ve(n, t);
1202
+ S.error(r, i);
1148
1203
  }
1149
1204
  }, ft = async (e) => {
1150
1205
  let t = e.name || e.id, n = e.id;
1151
1206
  try {
1152
1207
  await We.mutateAsync({
1153
- project_id: P,
1208
+ project_id: I,
1154
1209
  imageId: n
1155
- }), j({
1210
+ }), M({
1156
1211
  ...e,
1157
- status: I.DEACTIVATED
1212
+ status: B.DEACTIVATED
1158
1213
  }), De(!1), X(null);
1159
- let { message: r, ...i } = U(t);
1160
- x.success(r, i);
1214
+ let { message: r, ...i } = ue(t);
1215
+ S.success(r, i);
1161
1216
  } catch (e) {
1162
- let t = e?.message ?? "", { message: r, ...i } = se(n, t);
1163
- x.error(r, i);
1217
+ let t = e?.message ?? "", { message: r, ...i } = oe(n, t);
1218
+ S.error(r, i);
1164
1219
  }
1165
1220
  }, pt = (e) => {
1166
- X(e), F(!0);
1221
+ X(e), R(!0);
1167
1222
  }, mt = (e) => {
1168
1223
  X(e), V(!0);
1169
1224
  }, ht = (e) => {
1170
- X(e), xe(!0);
1225
+ X(e), fe(!0);
1171
1226
  }, gt = (e) => {
1172
1227
  X(e), je(!0);
1173
1228
  }, _t = () => {
1174
- X(null), F(!1);
1229
+ X(null), R(!1);
1175
1230
  }, vt = () => {
1176
1231
  X(null), V(!1);
1177
1232
  }, yt = () => {
1178
- X(null), xe(!1);
1233
+ X(null), fe(!1);
1179
1234
  }, bt = () => {
1180
1235
  X(null), De(!1);
1181
1236
  }, xt = () => {
@@ -1186,92 +1241,92 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
1186
1241
  h(!1);
1187
1242
  try {
1188
1243
  let t = await Ke.mutateAsync({
1189
- project_id: P,
1244
+ project_id: I,
1190
1245
  imageIds: e
1191
1246
  }), n = t.successful.length, r = t.failed.length, i = e.length;
1192
1247
  if (r === 0) {
1193
- let { message: e, ...t } = pe(n, i);
1194
- x.success(e, t);
1248
+ let { message: e, ...t } = me(n, i);
1249
+ S.success(e, t);
1195
1250
  } else if (n === 0) {
1196
- let { message: e, ...t } = ye(r, i);
1197
- x.error(e, t);
1251
+ let { message: e, ...t } = be(r, i);
1252
+ S.error(e, t);
1198
1253
  } else {
1199
- let { message: e, ...t } = ue(n, r);
1200
- x.warning(e, t);
1254
+ let { message: e, ...t } = U(n, r);
1255
+ S.warning(e, t);
1201
1256
  }
1202
- t.successful.length > 0 && ne(t.successful);
1257
+ t.successful.length > 0 && ee(t.successful);
1203
1258
  } catch (t) {
1204
1259
  let n = t?.message ?? "";
1205
1260
  console.log("Bulk delete error: ", n);
1206
- let { message: r, ...i } = ye(e.length, e.length);
1207
- x.error(r, i);
1261
+ let { message: r, ...i } = be(e.length, e.length);
1262
+ S.error(r, i);
1208
1263
  }
1209
1264
  }, wt = async (t) => {
1210
1265
  y(!1);
1211
1266
  try {
1212
1267
  let n = await qe.mutateAsync({
1213
- project_id: P,
1268
+ project_id: I,
1214
1269
  imageIds: t
1215
1270
  }), r = n.successful.length, i = n.failed.length, a = t.length;
1216
1271
  if (n.successful.forEach((t) => {
1217
1272
  let n = e.find((e) => e.id === t);
1218
- n && j({
1273
+ n && M({
1219
1274
  ...n,
1220
- status: I.ACTIVE
1275
+ status: B.ACTIVE
1221
1276
  });
1222
1277
  }), i === 0) {
1223
- let { message: e, ...t } = ve(r, a);
1224
- x.success(e, t);
1278
+ let { message: e, ...t } = ye(r, a);
1279
+ S.success(e, t);
1225
1280
  } else if (r === 0) {
1226
- let { message: e, ...t } = be(i, a);
1227
- x.error(e, t);
1281
+ let { message: e, ...t } = xe(i, a);
1282
+ S.error(e, t);
1228
1283
  } else {
1229
- let { message: e, ...t } = he(r, i);
1230
- x.warning(e, t);
1284
+ let { message: e, ...t } = ge(r, i);
1285
+ S.warning(e, t);
1231
1286
  }
1232
1287
  } catch (e) {
1233
1288
  let n = e?.message ?? "";
1234
1289
  console.log("Bulk activate error: ", n);
1235
- let { message: r, ...i } = be(t.length, t.length);
1236
- x.error(r, i);
1290
+ let { message: r, ...i } = xe(t.length, t.length);
1291
+ S.error(r, i);
1237
1292
  }
1238
1293
  }, Tt = async (t) => {
1239
1294
  _(!1);
1240
1295
  try {
1241
- let n = await Ye.mutateAsync({
1242
- project_id: P,
1296
+ let n = await Je.mutateAsync({
1297
+ project_id: I,
1243
1298
  imageIds: t
1244
1299
  }), r = n.successful.length, i = n.failed.length, a = t.length;
1245
1300
  if (n.successful.forEach((t) => {
1246
1301
  let n = e.find((e) => e.id === t);
1247
- n && j({
1302
+ n && M({
1248
1303
  ...n,
1249
- status: I.DEACTIVATED
1304
+ status: B.DEACTIVATED
1250
1305
  });
1251
1306
  }), i === 0) {
1252
- let { message: e, ...t } = ge(r, a);
1253
- x.success(e, t);
1307
+ let { message: e, ...t } = _e(r, a);
1308
+ S.success(e, t);
1254
1309
  } else if (r === 0) {
1255
- let { message: e, ...t } = W(i, a);
1256
- x.error(e, t);
1310
+ let { message: e, ...t } = de(i, a);
1311
+ S.error(e, t);
1257
1312
  } else {
1258
- let { message: e, ...t } = ce(r, i);
1259
- x.warning(e, t);
1313
+ let { message: e, ...t } = se(r, i);
1314
+ S.warning(e, t);
1260
1315
  }
1261
1316
  } catch (e) {
1262
1317
  let n = e?.message ?? "";
1263
1318
  console.log("Bulk deactivate error: ", n);
1264
- let { message: r, ...i } = W(t.length, t.length);
1265
- x.error(r, i);
1319
+ let { message: r, ...i } = de(t.length, t.length);
1320
+ S.error(r, i);
1266
1321
  }
1267
1322
  }, Et = (e) => {
1268
1323
  e >= 1 && e <= o && l?.(e);
1269
1324
  };
1270
1325
  return it ? /*#__PURE__*/ q("div", {
1271
1326
  "data-testid": "loading",
1272
- children: /*#__PURE__*/ q(c, { children: /*#__PURE__*/ q(w, {
1327
+ children: /*#__PURE__*/ q(c, { children: /*#__PURE__*/ q(D, {
1273
1328
  colSpan: 3,
1274
- children: /*#__PURE__*/ q(C, {
1329
+ children: /*#__PURE__*/ q(T, {
1275
1330
  status: "progress",
1276
1331
  title: ze._({ id: "Z3FXyt" })
1277
1332
  })
@@ -1281,18 +1336,18 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
1281
1336
  children: [
1282
1337
  i && /*#__PURE__*/ q("div", {
1283
1338
  className: "bg-theme-background-lvl-0/50 absolute inset-0 z-10 flex items-center justify-center backdrop-blur-sm",
1284
- children: /*#__PURE__*/ q(C, {
1339
+ children: /*#__PURE__*/ q(T, {
1285
1340
  status: "progress",
1286
1341
  title: ze._({ id: "HBpi4q" })
1287
1342
  })
1288
1343
  }),
1289
- /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ J(ee, {
1290
- columns: N ? 9 : 8,
1291
- minContentColumns: N ? [0, 8] : [7],
1344
+ /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ J(x, {
1345
+ columns: F ? 9 : 8,
1346
+ minContentColumns: F ? [0, 8] : [7],
1292
1347
  className: "images",
1293
1348
  "data-testid": "images-table",
1294
1349
  children: [/*#__PURE__*/ J(c, { children: [
1295
- N && /*#__PURE__*/ q(s, {}),
1350
+ F && /*#__PURE__*/ q(s, {}),
1296
1351
  /*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "uAQUqI" }) }),
1297
1352
  /*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "ExLULX" }) }),
1298
1353
  /*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "2q/Q7x" }) }),
@@ -1301,7 +1356,7 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
1301
1356
  /*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "NopYGU" }) }),
1302
1357
  /*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "d+F6q9" }) }),
1303
1358
  /*#__PURE__*/ q(s, {})
1304
- ] }), e.length > 0 ? e.map((e) => /*#__PURE__*/ q(Ve, {
1359
+ ] }), e.length > 0 ? e.map((e) => /*#__PURE__*/ q(He, {
1305
1360
  image: e,
1306
1361
  isSelected: f.includes(e.id),
1307
1362
  isPending: !!t.find(({ id: t }) => t === e.id),
@@ -1311,7 +1366,7 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
1311
1366
  onEditMetadata: mt,
1312
1367
  onDelete: ht,
1313
1368
  onManageAccess: gt,
1314
- showSelectColumn: N,
1369
+ showSelectColumn: F,
1315
1370
  onSelect: (e) => {
1316
1371
  if (f.includes(e.id)) return p(f.filter((t) => t !== e.id));
1317
1372
  p([...f, e.id]);
@@ -1320,10 +1375,10 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
1320
1375
  onUpdateVisibility: at,
1321
1376
  uploadId: Pe,
1322
1377
  uploadProgressPercent: rt?.percent,
1323
- onMemberStatusChanged: M
1324
- }, e.id)) : /*#__PURE__*/ q(c, { children: /*#__PURE__*/ q(w, {
1325
- colSpan: N ? 9 : 8,
1326
- children: /*#__PURE__*/ q(C, {
1378
+ onMemberStatusChanged: P
1379
+ }, e.id)) : /*#__PURE__*/ q(c, { children: /*#__PURE__*/ q(D, {
1380
+ colSpan: F ? 9 : 8,
1381
+ children: /*#__PURE__*/ q(T, {
1327
1382
  status: "empty",
1328
1383
  title: ze._({ id: "eYlnXt" }),
1329
1384
  body: ze._({ id: "qvF2D8" })
@@ -1353,79 +1408,79 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
1353
1408
  })
1354
1409
  })] }),
1355
1410
  Y && /*#__PURE__*/ J(K, { children: [
1356
- /*#__PURE__*/ q(fe, {
1357
- isOpen: oe,
1411
+ /*#__PURE__*/ q(pe, {
1412
+ isOpen: re,
1358
1413
  onClose: _t,
1359
1414
  image: Y,
1360
1415
  onSave: st,
1361
1416
  isLoading: Xe.isPending
1362
1417
  }),
1363
- /*#__PURE__*/ q(L, {
1364
- isOpen: R,
1418
+ /*#__PURE__*/ q(ie, {
1419
+ isOpen: z,
1365
1420
  onClose: vt,
1366
1421
  image: Y,
1367
1422
  onSave: st,
1368
1423
  isLoading: Xe.isPending
1369
1424
  }),
1370
- /*#__PURE__*/ q(ie, {
1425
+ /*#__PURE__*/ q(ne, {
1371
1426
  image: Y,
1372
- isOpen: G,
1427
+ isOpen: W,
1373
1428
  isLoading: it,
1374
1429
  isDisabled: Y.protected || !r.canDelete,
1375
1430
  onClose: yt,
1376
1431
  onDelete: lt
1377
1432
  }),
1378
- /*#__PURE__*/ q(B, {
1433
+ /*#__PURE__*/ q(ae, {
1379
1434
  image: Y,
1380
- isOpen: Ee,
1435
+ isOpen: Se,
1381
1436
  isLoading: We.isPending,
1382
1437
  onClose: bt,
1383
1438
  onDeactivate: ft
1384
1439
  }),
1385
- /*#__PURE__*/ q(ae, {
1440
+ /*#__PURE__*/ q(L, {
1386
1441
  image: Y,
1387
1442
  isOpen: Oe,
1388
1443
  isLoading: Ge.isPending,
1389
1444
  onClose: xt,
1390
1445
  onActivate: dt
1391
1446
  }),
1392
- /*#__PURE__*/ q(et, {
1447
+ /*#__PURE__*/ q(tt, {
1393
1448
  image: Y,
1394
1449
  isOpen: Ae,
1395
1450
  onClose: St,
1396
1451
  permissions: r
1397
1452
  })
1398
1453
  ] }),
1399
- /*#__PURE__*/ q(Ze, {
1454
+ /*#__PURE__*/ q(Qe, {
1400
1455
  isOpen: m,
1401
- deletableImages: te,
1402
- protectedImages: T,
1456
+ deletableImages: w,
1457
+ protectedImages: E,
1403
1458
  isLoading: it,
1404
1459
  onClose: () => h(!1),
1405
1460
  onDelete: Ct
1406
1461
  }),
1407
- /*#__PURE__*/ q(Qe, {
1462
+ /*#__PURE__*/ q($e, {
1408
1463
  isOpen: g,
1409
1464
  activeImages: O,
1410
- deactivatedImages: k,
1465
+ deactivatedImages: j,
1411
1466
  isLoading: it,
1412
1467
  onClose: () => _(!1),
1413
1468
  onDeactivate: Tt
1414
1469
  }),
1415
- /*#__PURE__*/ q($e, {
1470
+ /*#__PURE__*/ q(et, {
1416
1471
  isOpen: v,
1417
- deactivatedImages: k,
1472
+ deactivatedImages: j,
1418
1473
  activeImages: O,
1419
1474
  isLoading: it,
1420
1475
  onClose: () => y(!1),
1421
1476
  onActivate: wt
1422
1477
  }),
1423
- /*#__PURE__*/ q(Je, {
1478
+ /*#__PURE__*/ q(Ye, {
1424
1479
  isOpen: b,
1425
- onClose: () => S(!1),
1480
+ onClose: () => C(!1),
1426
1481
  onCreate: ct,
1427
- isLoading: tt.isPending || Le || Me,
1428
- isUploadPending: Le && !!Pe,
1482
+ isLoading: Ze.isPending || Ie || Me,
1483
+ isUploadPending: Ie && !!Pe,
1429
1484
  uploadProgressPercent: rt?.percent
1430
1485
  })
1431
1486
  ]
@@ -1433,7 +1488,7 @@ function tt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
1433
1488
  }
1434
1489
  //#endregion
1435
1490
  //#region src/client/routes/_auth/projects/$projectId/compute/images/urlHelpers.ts
1436
- var nt = (e) => {
1491
+ var rt = (e) => {
1437
1492
  let t = [];
1438
1493
  return e.status && (e.status.startsWith("in:") ? e.status.replace("in:", "").split(",") : [e.status]).forEach((e) => {
1439
1494
  t.push({
@@ -1457,14 +1512,14 @@ var nt = (e) => {
1457
1512
  name: "protected",
1458
1513
  value: e.protected
1459
1514
  }), t;
1460
- }, rt = (e, t) => {
1515
+ }, it = (e, t) => {
1461
1516
  let n = {};
1462
1517
  if (!e?.length) return n;
1463
1518
  let r = e.filter((e) => !e.inactive).reduce((e, t) => (e[t.name] || (e[t.name] = []), e[t.name].push(t.value), e), {});
1464
1519
  return Object.entries(r).forEach(([e, r]) => {
1465
1520
  t.find((t) => t.filterName === e)?.supportsMultiValue && r.length > 1 ? n[e] = `in:${r.join(",")}` : n[e] = r[0];
1466
1521
  }), n;
1467
- }, it = (e, t, n) => e.some((e) => e.name === t.name && e.value === t.value) ? e : n.find((e) => e.filterName === t.name)?.supportsMultiValue ? [...e, t] : [...e.filter((e) => e.name !== t.name), t], at = (e, t, n) => {
1522
+ }, at = (e, t, n) => e.some((e) => e.name === t.name && e.value === t.value) ? e : n.find((e) => e.filterName === t.name)?.supportsMultiValue ? [...e, t] : [...e.filter((e) => e.name !== t.name), t], ot = (e, t, n) => {
1468
1523
  let r = {
1469
1524
  search: n.search,
1470
1525
  sortBy: n.sortBy,
@@ -1476,13 +1531,13 @@ var nt = (e) => {
1476
1531
  return Object.entries(i).forEach(([e, n]) => {
1477
1532
  t.find((t) => t.filterName === e)?.supportsMultiValue && n.length > 1 ? r[e] = `in:${n.join(",")}` : r[e] = n[0];
1478
1533
  }), r;
1479
- }, ot = {
1534
+ }, st = {
1480
1535
  images: [],
1481
1536
  first: void 0,
1482
1537
  next: void 0,
1483
1538
  schema: "/v2/schemas/images",
1484
1539
  listError: void 0
1485
- }, st = (e, t, n, r, i, a, o) => a.member_status && a.member_status !== "all" ? e.compute.listSharedImagesByMemberStatus.query({
1540
+ }, ct = (e, t, n, r, i, a, o) => a.member_status && a.member_status !== "all" ? e.compute.listSharedImagesByMemberStatus.query({
1486
1541
  project_id: t,
1487
1542
  memberStatus: a.member_status,
1488
1543
  name: i || void 0,
@@ -1492,11 +1547,11 @@ var nt = (e) => {
1492
1547
  protected: a.protected,
1493
1548
  sort: `${n}:${r}`
1494
1549
  }).then((e) => ({
1495
- ...ot,
1550
+ ...st,
1496
1551
  images: e
1497
1552
  })).catch((e) => {
1498
- if (e instanceof Ie && e.data?.code === "FORBIDDEN") return {
1499
- ...ot,
1553
+ if (e instanceof Le && e.data?.code === "FORBIDDEN") return {
1554
+ ...st,
1500
1555
  listError: e.message
1501
1556
  };
1502
1557
  throw e;
@@ -1511,12 +1566,12 @@ var nt = (e) => {
1511
1566
  ...e,
1512
1567
  listError: void 0
1513
1568
  })).catch((e) => {
1514
- if (e instanceof Ie && e.data?.code === "FORBIDDEN") return {
1515
- ...ot,
1569
+ if (e instanceof Le && e.data?.code === "FORBIDDEN") return {
1570
+ ...st,
1516
1571
  listError: e.message
1517
1572
  };
1518
1573
  throw e;
1519
- }), ct = (e, t) => e.compute.canUser.query({
1574
+ }), lt = (e, t) => e.compute.canUser.query({
1520
1575
  project_id: t,
1521
1576
  permission: [
1522
1577
  "images:create",
@@ -1536,53 +1591,41 @@ var nt = (e) => {
1536
1591
  }));
1537
1592
  //#endregion
1538
1593
  //#region src/client/routes/_auth/projects/$projectId/compute/images/-components/List.tsx
1539
- function lt(e) {
1594
+ function ut(e) {
1540
1595
  if (e) return e.includes("?") ? new URL(e, "http://dummy.com").searchParams.get("marker") || void 0 : e;
1541
1596
  }
1542
- function ut({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissionsPromise: s, searchTerm: c, setSearchTerm: l, sortSettings: u, handleSortChange: d, filterSettings: m, handleFilterChange: g, selectedImages: v, setSelectedImages: b, createModalOpen: ee, setCreateModalOpen: x, deleteAllModalOpen: S, setDeleteAllModalOpen: C, deactivateAllModalOpen: w, setDeactivateAllModalOpen: E, activateAllModalOpen: D, setActivateAllModalOpen: O, memberStatusView: k, setMemberStatusView: A, isFetching: ne, currentPage: M, onPageChange: N, onImageUpdated: re, onImageDeleted: ie, onMemberStatusChanged: ae }) {
1543
- let { i18n: P, _: oe } = $(), F = Ae(n), L = Ae(s), [R, z] = Z(c), B = Me(void 0);
1544
- if (Y(() => () => clearTimeout(B.current), []), F.listError) return /*#__PURE__*/ q("p", { children: F.listError });
1545
- let se = F.images.filter((e) => !o.has(e.id)).map((e) => r.get(e.id) ?? e), ce = !!F.next, le = F.totalCount ?? (ce ? 50 * (M + 1) : se.length), ue = Math.max(1, Math.ceil(le / 50)), V = Math.min(M, ue);
1546
- Y(() => {
1547
- M !== V && N(V);
1597
+ function dt({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissionsPromise: s, searchTerm: c, setSearchTerm: l, sortSettings: u, handleSortChange: d, filterSettings: m, handleFilterChange: g, selectedImages: v, setSelectedImages: b, createModalOpen: x, setCreateModalOpen: S, deleteAllModalOpen: C, setDeleteAllModalOpen: w, deactivateAllModalOpen: T, setDeactivateAllModalOpen: D, activateAllModalOpen: k, setActivateAllModalOpen: A, memberStatusView: j, setMemberStatusView: M, isFetching: N, currentPage: P, onPageChange: F, onImageUpdated: I, onImageDeleted: te, onMemberStatusChanged: ne }) {
1598
+ let { i18n: L, _: re } = $(), R = je(n), z = je(s), [ie, V] = Z(c), H = Ne(void 0);
1599
+ if (X(() => () => clearTimeout(H.current), []), R.listError) return /*#__PURE__*/ q("p", { children: R.listError });
1600
+ let ae = R.images.filter((e) => !o.has(e.id)).map((e) => r.get(e.id) ?? e), oe = !!R.next, se = R.totalCount ?? (oe ? 50 * (P + 1) : ae.length), ce = Math.max(1, Math.ceil(se / 50)), U = Math.min(P, ce);
1601
+ X(() => {
1602
+ P !== U && F(U);
1548
1603
  }, [
1549
- M,
1550
- V,
1551
- N
1604
+ P,
1605
+ U,
1606
+ F
1552
1607
  ]);
1553
- let H = k === "pending" || k === "accepted" ? {
1608
+ let W = j === "pending" || j === "accepted" ? {
1554
1609
  ...m,
1555
1610
  filters: m.filters.filter((e) => e.filterName !== "visibility"),
1556
1611
  selectedFilters: (m.selectedFilters || []).filter((e) => e.name !== "visibility")
1557
- } : m, U = F.totalCount === void 0 ? se.slice((V - 1) * 50, V * 50) : se, de = new Set(U.map((e) => e.id)), W = v.filter((e) => de.has(e)), G = U, fe = W.filter((e) => {
1558
- let t = U.find((t) => t.id === e);
1559
- return t && !t.protected;
1560
- }), pe = W.filter((e) => {
1561
- let t = U.find((t) => t.id === e);
1562
- return t && t.protected;
1563
- }), me = W.filter((e) => {
1564
- let t = U.find((t) => t.id === e);
1565
- return t && t.status === I.ACTIVE;
1566
- }), he = W.filter((e) => {
1567
- let t = U.find((t) => t.id === e);
1568
- return t && t.status === I.DEACTIVATED;
1569
- }), ge = !L.canDelete || W.length === 0 || U.filter((e) => W.includes(e.id)).every((e) => e.protected), _e = !L.canUpdate || W.length === 0 || U.filter((e) => W.includes(e.id)).every((e) => e.status === I.DEACTIVATED), ve = !L.canUpdate || W.length === 0 || U.filter((e) => W.includes(e.id)).every((e) => e.status === I.ACTIVE), ye = {
1612
+ } : m, le = R.totalCount === void 0 ? ae.slice((U - 1) * 50, U * 50) : ae, ue = new Set(le.map((e) => e.id)), G = v.filter((e) => ue.has(e)), de = le, fe = new Map(le.map((e) => [e.id, e])), pe = G.map((e) => fe.get(e)).filter(Boolean), me = pe.filter((e) => e.protected !== !0), he = pe.filter((e) => e.protected === !0), ge = pe.filter((e) => e.status === B.ACTIVE), _e = pe.filter((e) => e.status === B.DEACTIVATED), ve = !z.canDelete || G.length === 0 || le.filter((e) => G.includes(e.id)).every((e) => e.protected), ye = !z.canUpdate || G.length === 0 || le.filter((e) => G.includes(e.id)).every((e) => e.status === B.DEACTIVATED), be = !z.canUpdate || G.length === 0 || le.filter((e) => G.includes(e.id)).every((e) => e.status === B.ACTIVE), xe = {
1570
1613
  items: [
1571
1614
  {
1572
- label: P._({ id: "SFo0kK" }),
1615
+ label: L._({ id: "SFo0kK" }),
1573
1616
  value: "all"
1574
1617
  },
1575
1618
  {
1576
- label: P._({ id: "thHAVL" }),
1619
+ label: L._({ id: "thHAVL" }),
1577
1620
  value: "accepted"
1578
1621
  },
1579
1622
  {
1580
- label: P._({ id: "E4QYe7" }),
1623
+ label: L._({ id: "E4QYe7" }),
1581
1624
  value: "pending"
1582
1625
  }
1583
1626
  ],
1584
- activeItem: k,
1585
- onActiveItemChange: (e) => A(e)
1627
+ activeItem: j,
1628
+ onActiveItemChange: (e) => M(e)
1586
1629
  };
1587
1630
  return /*#__PURE__*/ J(K, { children: [
1588
1631
  /*#__PURE__*/ J(a, {
@@ -1591,16 +1634,16 @@ function ut({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissio
1591
1634
  gap: "2",
1592
1635
  className: "pb-2",
1593
1636
  children: [/*#__PURE__*/ q(i, {
1594
- activeItem: k,
1595
- onActiveItemChange: ye.onActiveItemChange,
1596
- children: ye.items.map((e) => /*#__PURE__*/ q(f, {
1637
+ activeItem: j,
1638
+ onActiveItemChange: xe.onActiveItemChange,
1639
+ children: xe.items.map((e) => /*#__PURE__*/ q(f, {
1597
1640
  label: e.label,
1598
1641
  value: e.value
1599
1642
  }, e.value))
1600
1643
  }), /*#__PURE__*/ J(a, {
1601
1644
  gap: "2",
1602
1645
  alignment: "center",
1603
- children: [/*#__PURE__*/ q(j, {
1646
+ children: [/*#__PURE__*/ q(ee, {
1604
1647
  options: u.options,
1605
1648
  sortBy: u.sortBy,
1606
1649
  sortDirection: u.sortDirection ?? "desc",
@@ -1614,8 +1657,8 @@ function ut({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissio
1614
1657
  ...u,
1615
1658
  sortDirection: e
1616
1659
  })
1617
- }), L.canCreate && /*#__PURE__*/ q(_, {
1618
- onClick: () => x(!0),
1660
+ }), z.canCreate && /*#__PURE__*/ q(_, {
1661
+ onClick: () => S(!0),
1619
1662
  variant: "primary",
1620
1663
  children: /*#__PURE__*/ q(Q, { id: "a/nTb8" })
1621
1664
  })]
@@ -1627,34 +1670,34 @@ function ut({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissio
1627
1670
  children: [/*#__PURE__*/ J(a, {
1628
1671
  distribution: "between",
1629
1672
  alignment: "center",
1630
- children: [/*#__PURE__*/ q(De, {
1631
- filters: H.filters,
1673
+ children: [/*#__PURE__*/ q(Oe, {
1674
+ filters: W.filters,
1632
1675
  selectClassName: "sm:min-w-40",
1633
1676
  comboboxClassName: "sm:min-w-40",
1634
1677
  onChange: (e) => {
1635
- let t = it(H.selectedFilters || [], e, H.filters);
1636
- t !== (H.selectedFilters || []) && g({
1678
+ let t = at(W.selectedFilters || [], e, W.filters);
1679
+ t !== (W.selectedFilters || []) && g({
1637
1680
  ...m,
1638
1681
  selectedFilters: t
1639
1682
  });
1640
1683
  }
1641
1684
  }), /*#__PURE__*/ q(e, {
1642
- placeholder: P._({ id: "0cl0a5" }),
1685
+ placeholder: L._({ id: "0cl0a5" }),
1643
1686
  "data-testid": "searchbar",
1644
- value: R,
1687
+ value: ie,
1645
1688
  onInput: (e) => {
1646
1689
  let t = e.currentTarget.value;
1647
- z(t), clearTimeout(B.current), B.current = window.setTimeout(() => l(t), 500);
1690
+ V(t), clearTimeout(H.current), H.current = window.setTimeout(() => l(t), 500);
1648
1691
  },
1649
1692
  onSearch: (e) => {
1650
- clearTimeout(B.current), l(typeof e == "string" ? e : "");
1693
+ clearTimeout(H.current), l(typeof e == "string" ? e : "");
1651
1694
  },
1652
1695
  onClear: () => {
1653
- clearTimeout(B.current), z(""), l("");
1696
+ clearTimeout(H.current), V(""), l("");
1654
1697
  }
1655
1698
  })]
1656
- }), H.selectedFilters && H.selectedFilters.length > 0 && /*#__PURE__*/ q(Ee, {
1657
- selectedFilters: H.selectedFilters,
1699
+ }), W.selectedFilters && W.selectedFilters.length > 0 && /*#__PURE__*/ q(De, {
1700
+ selectedFilters: W.selectedFilters,
1658
1701
  onDelete: (e) => g({
1659
1702
  ...m,
1660
1703
  selectedFilters: (m.selectedFilters || []).filter((t) => t.name !== e.name || t.value !== e.value)
@@ -1665,88 +1708,84 @@ function ut({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissio
1665
1708
  })
1666
1709
  })]
1667
1710
  }) }),
1668
- (L.canDelete || L.canUpdate) && /*#__PURE__*/ q(y, { children: /*#__PURE__*/ q(a, {
1711
+ (z.canDelete || z.canUpdate) && /*#__PURE__*/ q(y, { children: /*#__PURE__*/ q(a, {
1669
1712
  distribution: "between",
1670
1713
  alignment: "center",
1671
1714
  children: /*#__PURE__*/ J(a, {
1672
1715
  gap: "2",
1673
1716
  alignment: "center",
1674
- children: [/*#__PURE__*/ q(te, {
1675
- checked: W.length > 0 && G.every((e) => W.includes(e.id)),
1676
- indeterminate: W.length > 0 && !G.every((e) => W.includes(e.id)),
1717
+ children: [/*#__PURE__*/ q(E, {
1718
+ checked: G.length > 0 && de.every((e) => G.includes(e.id)),
1719
+ indeterminate: G.length > 0 && !de.every((e) => G.includes(e.id)),
1677
1720
  onChange: () => {
1678
- let e = G.map((e) => e.id);
1679
- e.every((e) => W.includes(e)) ? b(W.filter((t) => !e.includes(t))) : b([.../* @__PURE__ */ new Set([...W, ...e])]);
1721
+ let e = de.map((e) => e.id);
1722
+ e.every((e) => G.includes(e)) ? b(G.filter((t) => !e.includes(t))) : b([.../* @__PURE__ */ new Set([...G, ...e])]);
1680
1723
  }
1681
1724
  }), /*#__PURE__*/ J(t, { children: [/*#__PURE__*/ q(p, {
1682
1725
  as: "div",
1683
1726
  children: /*#__PURE__*/ q(_, {
1684
1727
  size: "small",
1685
1728
  icon: "moreVert",
1686
- label: P._({ id: "7L01XJ" })
1729
+ label: L._({ id: "7L01XJ" })
1687
1730
  })
1688
1731
  }), /*#__PURE__*/ J(h, { children: [
1689
- L.canDelete && /*#__PURE__*/ q(T, {
1690
- disabled: ge,
1691
- label: P._({ id: "c6b6fz" }),
1692
- onClick: () => C(!0)
1732
+ z.canDelete && /*#__PURE__*/ q(O, {
1733
+ disabled: ve,
1734
+ label: L._({ id: "c6b6fz" }),
1735
+ onClick: () => w(!0)
1693
1736
  }),
1694
- L.canUpdate && /*#__PURE__*/ q(T, {
1695
- disabled: _e,
1696
- label: P._({ id: "UmQ3/m" }),
1697
- onClick: () => E(!0)
1737
+ z.canUpdate && /*#__PURE__*/ q(O, {
1738
+ disabled: ye,
1739
+ label: L._({ id: "UmQ3/m" }),
1740
+ onClick: () => D(!0)
1698
1741
  }),
1699
- L.canUpdate && /*#__PURE__*/ q(T, {
1700
- disabled: ve,
1701
- label: P._({ id: "d/I0J3" }),
1702
- onClick: () => O(!0)
1742
+ z.canUpdate && /*#__PURE__*/ q(O, {
1743
+ disabled: be,
1744
+ label: L._({ id: "d/I0J3" }),
1745
+ onClick: () => A(!0)
1703
1746
  })
1704
1747
  ] })] })]
1705
1748
  })
1706
1749
  }) }),
1707
- /*#__PURE__*/ q(tt, {
1708
- images: G,
1709
- suggestedImages: k === "pending" ? G : [],
1710
- acceptedImages: k === "accepted" ? G : [],
1711
- permissions: L,
1712
- isFetching: ne,
1713
- currentPage: V,
1714
- totalPages: ue,
1715
- onPageChange: N,
1750
+ /*#__PURE__*/ q(nt, {
1751
+ images: de,
1752
+ suggestedImages: j === "pending" ? de : [],
1753
+ acceptedImages: j === "accepted" ? de : [],
1754
+ permissions: z,
1755
+ isFetching: N,
1756
+ currentPage: U,
1757
+ totalPages: ce,
1758
+ onPageChange: F,
1716
1759
  selectedImages: v,
1717
1760
  setSelectedImages: b,
1718
- deleteAllModalOpen: S,
1719
- setDeleteAllModalOpen: C,
1720
- deactivateAllModalOpen: w,
1721
- setDeactivateAllModalOpen: E,
1722
- activateAllModalOpen: D,
1723
- setActivateAllModalOpen: O,
1724
- createModalOpen: ee,
1725
- setCreateModalOpen: x,
1726
- deletableImages: fe,
1727
- protectedImages: pe,
1728
- activeImages: me,
1729
- deactivatedImages: he,
1730
- onImageUpdated: re,
1731
- onImageDeleted: ie,
1732
- onMemberStatusChanged: ae,
1733
- hasAnyBulkAction: L.canDelete || L.canUpdate
1761
+ deleteAllModalOpen: C,
1762
+ setDeleteAllModalOpen: w,
1763
+ deactivateAllModalOpen: T,
1764
+ setDeactivateAllModalOpen: D,
1765
+ activateAllModalOpen: k,
1766
+ setActivateAllModalOpen: A,
1767
+ createModalOpen: x,
1768
+ setCreateModalOpen: S,
1769
+ deletableImages: me,
1770
+ protectedImages: he,
1771
+ activeImages: ge,
1772
+ deactivatedImages: _e,
1773
+ onImageUpdated: I,
1774
+ onImageDeleted: te,
1775
+ onMemberStatusChanged: ne,
1776
+ hasAnyBulkAction: z.canDelete || z.canUpdate
1734
1777
  })
1735
1778
  ] });
1736
1779
  }
1737
- var dt = ({ client: e, project: t }) => {
1738
- let { i18n: n, _: i } = $(), a = Ne(), o = Fe({ strict: !1 }), [s, c] = Z({
1780
+ var ft = ({ client: e, project: t }) => {
1781
+ let { i18n: n, _: r } = $(), i = Pe(), a = Ie({ strict: !1 }), [o, s] = Z({
1739
1782
  options: [
1740
1783
  {
1741
1784
  label: n._({ id: "88kg0+" }),
1742
1785
  value: "created_at"
1743
1786
  },
1744
1787
  {
1745
- label: n._({ id: "Llcakz" }),
1746
- value: "updated_at"
1747
- },
1748
- {
1749
- label: n._({ id: "6YtxFj" }),
1788
+ label: n._({ id: "ExLULX" }),
1750
1789
  value: "name"
1751
1790
  },
1752
1791
  {
@@ -1758,32 +1797,32 @@ var dt = ({ client: e, project: t }) => {
1758
1797
  value: "status"
1759
1798
  }
1760
1799
  ],
1761
- sortBy: o.sortBy || "created_at",
1762
- sortDirection: o.sortDirection || "desc"
1763
- }), [l, u] = Z({
1800
+ sortBy: a.sortBy || "created_at",
1801
+ sortDirection: a.sortDirection || "desc"
1802
+ }), [c, l] = Z({
1764
1803
  filters: [
1765
1804
  {
1766
1805
  displayName: n._({ id: "uAQUqI" }),
1767
1806
  filterName: "status",
1768
- values: Object.values(I),
1807
+ values: Object.values(B),
1769
1808
  supportsMultiValue: !0
1770
1809
  },
1771
1810
  {
1772
1811
  displayName: n._({ id: "2q/Q7x" }),
1773
1812
  filterName: "visibility",
1774
- values: Object.values(R),
1813
+ values: Object.values(V),
1775
1814
  supportsMultiValue: !1
1776
1815
  },
1777
1816
  {
1778
1817
  displayName: n._({ id: "NopYGU" }),
1779
1818
  filterName: "disk_format",
1780
- values: Object.values(F),
1819
+ values: Object.values(z),
1781
1820
  supportsMultiValue: !0
1782
1821
  },
1783
1822
  {
1784
1823
  displayName: n._({ id: "6/xipy" }),
1785
1824
  filterName: "container_format",
1786
- values: Object.values(G),
1825
+ values: Object.values(fe),
1787
1826
  supportsMultiValue: !0
1788
1827
  },
1789
1828
  {
@@ -1793,90 +1832,90 @@ var dt = ({ client: e, project: t }) => {
1793
1832
  supportsMultiValue: !1
1794
1833
  }
1795
1834
  ],
1796
- selectedFilters: nt(o)
1797
- }), [d, f] = Z(o.search || ""), p = o.page ?? 1, [m, h] = Z([]), [g, _] = Z(!1), [v, y] = Z(!1), [b, ee] = Z(!1), [x, S] = Z(!1), te = o.memberStatus ?? "all", [w, T] = Z(!0), [E, D] = Z(/* @__PURE__ */ new Map()), [O, k] = Z(/* @__PURE__ */ new Set()), [A, j] = Z(/* @__PURE__ */ new Map([[1, void 0]])), [ne, M] = Z(() => new Promise(() => {})), [N] = Z(() => ct(e, t)), re = je((e) => {
1798
- D((t) => new Map(t).set(e.id, e));
1799
- }, []), ie = je((e) => {
1800
- k((t) => {
1835
+ selectedFilters: rt(a)
1836
+ }), [u, d] = Z(a.search || ""), f = a.page ?? 1, [p, m] = Z([]), [h, g] = Z(!1), [_, v] = Z(!1), [y, b] = Z(!1), [x, S] = Z(!1), C = a.memberStatus ?? "all", [w, E] = Z(!0), [D, O] = Z(/* @__PURE__ */ new Map()), [k, A] = Z(/* @__PURE__ */ new Set()), [j, M] = Z(/* @__PURE__ */ new Map([[1, void 0]])), [N, ee] = Z(() => new Promise(() => {})), [P] = Z(() => lt(e, t)), F = Y((e) => {
1837
+ O((t) => new Map(t).set(e.id, e));
1838
+ }, []), I = Y((e) => {
1839
+ A((t) => {
1801
1840
  let n = new Set(t);
1802
1841
  return Array.isArray(e) ? e.forEach((e) => n.add(e)) : n.add(e), n;
1803
1842
  });
1804
- }, []), ae = je(() => {
1805
- D(/* @__PURE__ */ new Map()), T(!0);
1806
- let n = o.memberStatus ?? "all", r = n === "all" ? void 0 : n;
1807
- ke(() => {
1808
- let i = n === "pending" || n === "accepted" ? (l.selectedFilters || []).filter((e) => e.name !== "visibility") : l.selectedFilters || [], a = A.get(p), o = st(e, t, s.sortBy, s.sortDirection, d, {
1809
- ...rt(i, l.filters),
1843
+ }, []), te = Y(() => {
1844
+ O(/* @__PURE__ */ new Map()), E(!0);
1845
+ let n = a.memberStatus ?? "all", r = n === "all" ? void 0 : n;
1846
+ Ae(() => {
1847
+ let i = n === "pending" || n === "accepted" ? (c.selectedFilters || []).filter((e) => e.name !== "visibility") : c.selectedFilters || [], a = j.get(f), s = ct(e, t, o.sortBy, o.sortDirection, u, {
1848
+ ...it(i, c.filters),
1810
1849
  member_status: r
1811
1850
  }, a);
1812
- o.then((e) => {
1813
- j((t) => {
1851
+ s.then((e) => {
1852
+ M((t) => {
1814
1853
  if (!e.next) return t;
1815
- let n = p + 1;
1816
- return t.has(n) ? t : new Map(t).set(n, lt(e.next));
1854
+ let n = f + 1;
1855
+ return t.has(n) ? t : new Map(t).set(n, ut(e.next));
1817
1856
  });
1818
- }).catch(() => {}).finally(() => T(!1)), M(o);
1857
+ }).catch(() => {}).finally(() => E(!1)), ee(s);
1819
1858
  });
1820
1859
  }, [
1821
1860
  e,
1822
- s,
1823
- d,
1824
- l,
1825
- o.memberStatus,
1826
- p,
1827
- A
1861
+ o,
1862
+ u,
1863
+ c,
1864
+ a.memberStatus,
1865
+ f,
1866
+ j
1828
1867
  ]);
1829
- Y(() => {
1830
- let n = nt(o), r = o.sortBy || "created_at", i = o.sortDirection || "desc", s = o.search || "", d = o.page ?? 1;
1831
- u((e) => ({
1868
+ X(() => {
1869
+ let n = rt(a), r = a.sortBy || "created_at", o = a.sortDirection || "desc", u = a.search || "", f = a.page ?? 1;
1870
+ l((e) => ({
1832
1871
  ...e,
1833
1872
  selectedFilters: n
1834
- })), c((e) => ({
1873
+ })), s((e) => ({
1835
1874
  ...e,
1836
1875
  sortBy: r,
1837
- sortDirection: i
1838
- })), f(s), h([]), D(/* @__PURE__ */ new Map()), T(!0);
1839
- let p = o.memberStatus ?? "all", m = p === "all" ? void 0 : p;
1840
- ke(() => {
1841
- let o = p === "pending" || p === "accepted" ? (n || []).filter((e) => e.name !== "visibility") : n || [], c = A.get(d);
1842
- if (!c && d > 1) {
1843
- a({ search: (e) => ({
1876
+ sortDirection: o
1877
+ })), d(u), m([]), O(/* @__PURE__ */ new Map()), E(!0);
1878
+ let p = a.memberStatus ?? "all", h = p === "all" ? void 0 : p;
1879
+ Ae(() => {
1880
+ let a = p === "pending" || p === "accepted" ? (n || []).filter((e) => e.name !== "visibility") : n || [], s = j.get(f);
1881
+ if (!s && f > 1) {
1882
+ i({ search: (e) => ({
1844
1883
  ...e,
1845
1884
  page: void 0
1846
- }) }), T(!1);
1885
+ }) }), E(!1);
1847
1886
  return;
1848
1887
  }
1849
- let u = st(e, t, r, i, s, {
1850
- ...rt(o, l.filters),
1851
- member_status: m
1852
- }, c);
1853
- u.then((e) => {
1854
- j((t) => {
1888
+ let l = ct(e, t, r, o, u, {
1889
+ ...it(a, c.filters),
1890
+ member_status: h
1891
+ }, s);
1892
+ l.then((e) => {
1893
+ M((t) => {
1855
1894
  if (!e.next) return t;
1856
- let n = d + 1;
1857
- return t.has(n) ? t : new Map(t).set(n, lt(e.next));
1895
+ let n = f + 1;
1896
+ return t.has(n) ? t : new Map(t).set(n, ut(e.next));
1858
1897
  });
1859
- }).catch(() => {}).finally(() => T(!1)), M(u);
1898
+ }).catch(() => {}).finally(() => E(!1)), ee(l);
1860
1899
  });
1861
1900
  }, [
1862
- o.status,
1863
- o.visibility,
1864
- o.disk_format,
1865
- o.container_format,
1866
- o.protected,
1867
- o.sortBy,
1868
- o.sortDirection,
1869
- o.search,
1870
- o.memberStatus,
1871
- o.page
1901
+ a.status,
1902
+ a.visibility,
1903
+ a.disk_format,
1904
+ a.container_format,
1905
+ a.protected,
1906
+ a.sortBy,
1907
+ a.sortDirection,
1908
+ a.search,
1909
+ a.memberStatus,
1910
+ a.page
1872
1911
  ]);
1873
- let P = (e) => {
1912
+ let ne = (e) => {
1874
1913
  let t = {
1875
1914
  options: e.options,
1876
1915
  sortBy: e.sortBy?.toString() || "created_at",
1877
1916
  sortDirection: e.sortDirection || "desc"
1878
1917
  };
1879
- c(t), j(/* @__PURE__ */ new Map([[1, void 0]])), a({
1918
+ s(t), M(/* @__PURE__ */ new Map([[1, void 0]])), i({
1880
1919
  search: (e) => ({
1881
1920
  ...e,
1882
1921
  sortBy: t.sortBy,
@@ -1885,9 +1924,9 @@ var dt = ({ client: e, project: t }) => {
1885
1924
  }),
1886
1925
  replace: !0
1887
1926
  });
1888
- }, oe = (e) => {
1889
- u(e), j(/* @__PURE__ */ new Map([[1, void 0]])), a({
1890
- search: (t) => at(e.selectedFilters || [], e.filters, {
1927
+ }, L = (e) => {
1928
+ l(e), M(/* @__PURE__ */ new Map([[1, void 0]])), i({
1929
+ search: (t) => ot(e.selectedFilters || [], e.filters, {
1891
1930
  search: t.search,
1892
1931
  sortBy: t.sortBy,
1893
1932
  sortDirection: t.sortDirection,
@@ -1895,9 +1934,9 @@ var dt = ({ client: e, project: t }) => {
1895
1934
  }),
1896
1935
  replace: !0
1897
1936
  });
1898
- }, L = (e) => {
1937
+ }, re = (e) => {
1899
1938
  let t = typeof e == "string" ? e : "";
1900
- f(t), j(/* @__PURE__ */ new Map([[1, void 0]])), a({
1939
+ d(t), M(/* @__PURE__ */ new Map([[1, void 0]])), i({
1901
1940
  search: (e) => ({
1902
1941
  ...e,
1903
1942
  search: t || void 0,
@@ -1905,60 +1944,61 @@ var dt = ({ client: e, project: t }) => {
1905
1944
  }),
1906
1945
  replace: !0
1907
1946
  });
1908
- }, z = (e) => {
1909
- j(/* @__PURE__ */ new Map([[1, void 0]])), a({ search: (t) => ({
1947
+ }, R = (e) => {
1948
+ M(/* @__PURE__ */ new Map([[1, void 0]])), i({ search: (t) => ({
1910
1949
  sortBy: t.sortBy,
1911
1950
  sortDirection: t.sortDirection,
1912
1951
  search: t.search,
1913
1952
  memberStatus: e === "all" ? void 0 : e
1914
1953
  }) });
1915
- }, B = je((e) => {
1916
- a({ search: (t) => ({
1954
+ }, ie = Y((e) => {
1955
+ i({ search: (t) => ({
1917
1956
  ...t,
1918
1957
  page: e === 1 ? void 0 : e
1919
1958
  }) });
1920
- }, [a]);
1959
+ }, [i]);
1921
1960
  return /*#__PURE__*/ q("div", {
1922
1961
  className: "relative",
1923
- children: /*#__PURE__*/ q(Re, {
1924
- fallbackRender: ({ error: e }) => /*#__PURE__*/ q(r, {
1925
- variant: "error",
1926
- text: e instanceof Error ? e.message : n._({ id: "W5A0Ly" })
1962
+ children: /*#__PURE__*/ q(ze, {
1963
+ fallbackRender: ({ error: e }) => /*#__PURE__*/ q(T, {
1964
+ status: "error",
1965
+ title: n._({ id: "v2JOoQ" }),
1966
+ body: e instanceof Error ? e.message : n._({ id: "6YfMI7" })
1927
1967
  }),
1928
- children: /*#__PURE__*/ q(Oe, {
1929
- fallback: /*#__PURE__*/ q(C, {
1968
+ children: /*#__PURE__*/ q(ke, {
1969
+ fallback: /*#__PURE__*/ q(T, {
1930
1970
  status: "progress",
1931
1971
  title: n._({ id: "HBpi4q" })
1932
1972
  }),
1933
- children: /*#__PURE__*/ q(ut, {
1934
- imagesPromise: ne,
1935
- imageOverrides: E,
1936
- deletedImageIds: O,
1937
- permissionsPromise: N,
1938
- searchTerm: d,
1939
- setSearchTerm: L,
1940
- sortSettings: s,
1941
- handleSortChange: P,
1942
- filterSettings: l,
1943
- handleFilterChange: oe,
1944
- selectedImages: m,
1945
- setSelectedImages: h,
1946
- createModalOpen: g,
1947
- setCreateModalOpen: _,
1948
- deleteAllModalOpen: v,
1949
- setDeleteAllModalOpen: y,
1950
- deactivateAllModalOpen: b,
1951
- setDeactivateAllModalOpen: ee,
1973
+ children: /*#__PURE__*/ q(dt, {
1974
+ imagesPromise: N,
1975
+ imageOverrides: D,
1976
+ deletedImageIds: k,
1977
+ permissionsPromise: P,
1978
+ searchTerm: u,
1979
+ setSearchTerm: re,
1980
+ sortSettings: o,
1981
+ handleSortChange: ne,
1982
+ filterSettings: c,
1983
+ handleFilterChange: L,
1984
+ selectedImages: p,
1985
+ setSelectedImages: m,
1986
+ createModalOpen: h,
1987
+ setCreateModalOpen: g,
1988
+ deleteAllModalOpen: _,
1989
+ setDeleteAllModalOpen: v,
1990
+ deactivateAllModalOpen: y,
1991
+ setDeactivateAllModalOpen: b,
1952
1992
  activateAllModalOpen: x,
1953
1993
  setActivateAllModalOpen: S,
1954
- memberStatusView: te,
1955
- setMemberStatusView: z,
1994
+ memberStatusView: C,
1995
+ setMemberStatusView: R,
1956
1996
  isFetching: w,
1957
- currentPage: p,
1958
- onPageChange: B,
1959
- onImageUpdated: re,
1960
- onImageDeleted: ie,
1961
- onMemberStatusChanged: ae
1997
+ currentPage: f,
1998
+ onPageChange: ie,
1999
+ onImageUpdated: F,
2000
+ onImageDeleted: I,
2001
+ onMemberStatusChanged: te
1962
2002
  })
1963
2003
  })
1964
2004
  })
@@ -1966,18 +2006,18 @@ var dt = ({ client: e, project: t }) => {
1966
2006
  };
1967
2007
  //#endregion
1968
2008
  //#region src/client/routes/_auth/projects/$projectId/compute/images/index.tsx?tsr-split=component
1969
- function ft() {
1970
- let { i18n: e, _: t } = $(), { projectId: n } = k.useParams(), { trpcClient: r } = k.useRouteContext();
2009
+ function pt() {
2010
+ let { i18n: e, _: t } = $(), { projectId: n } = M.useParams(), { trpcClient: r } = M.useRouteContext();
1971
2011
  if (!r) throw Error("trpcClient is not available in route context");
1972
- return /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ q(M, {
2012
+ return /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ q(F, {
1973
2013
  title: e._({ id: "an5hVd" }),
1974
2014
  projectId: n
1975
- }), /*#__PURE__*/ q(dt, {
2015
+ }), /*#__PURE__*/ q(ft, {
1976
2016
  client: r,
1977
2017
  project: n
1978
2018
  })] });
1979
2019
  }
1980
2020
  //#endregion
1981
- export { ft as component };
2021
+ export { pt as component };
1982
2022
 
1983
- //# sourceMappingURL=images-BGQv9kKT.mjs.map
2023
+ //# sourceMappingURL=images-CnTW3bpy.mjs.map