@cobaltcore-dev/aurora 0.21.0 → 0.23.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 (134) hide show
  1. package/dist/client/{AuthProvider-p1e1DuKU.mjs → AuthProvider-CQ6Yppoh.mjs} +2 -2
  2. package/dist/client/{AuthProvider-p1e1DuKU.mjs.map → AuthProvider-CQ6Yppoh.mjs.map} +1 -1
  3. package/dist/client/{BucketToastNotifications-BGd2wVmh.mjs → BucketToastNotifications-BhPi4WWw.mjs} +3 -3
  4. package/dist/client/{BucketToastNotifications-BGd2wVmh.mjs.map → BucketToastNotifications-BhPi4WWw.mjs.map} +1 -1
  5. package/dist/client/{ContentHeader-CIAzorGI.mjs → ContentHeader-9KZdhOoA.mjs} +4 -3
  6. package/dist/client/{ContentHeader-CIAzorGI.mjs.map → ContentHeader-9KZdhOoA.mjs.map} +1 -1
  7. package/dist/client/{DeleteFlavorModal-lFMExcq_.mjs → DeleteFlavorModal-Be2qZo4w.mjs} +2 -2
  8. package/dist/client/{DeleteFlavorModal-lFMExcq_.mjs.map → DeleteFlavorModal-Be2qZo4w.mjs.map} +1 -1
  9. package/dist/client/{DeletePcaModal-Dg9dej-H.mjs → DeletePcaModal-CIFsGWyj.mjs} +4 -4
  10. package/dist/client/{DeletePcaModal-Dg9dej-H.mjs.map → DeletePcaModal-CIFsGWyj.mjs.map} +1 -1
  11. package/dist/client/{DetailsInfo-DwCo9P1o.mjs → DetailsInfo-CHVD7d-W.mjs} +3 -3
  12. package/dist/client/{DetailsInfo-DwCo9P1o.mjs.map → DetailsInfo-CHVD7d-W.mjs.map} +1 -1
  13. package/dist/client/{FiltersInput-cOaaRpcQ.mjs → FiltersInput-DqT08Ib-.mjs} +2 -2
  14. package/dist/client/{FiltersInput-cOaaRpcQ.mjs.map → FiltersInput-DqT08Ib-.mjs.map} +1 -1
  15. package/dist/client/{FloatingIpActionModals-CDF8LVtX.mjs → FloatingIpActionModals-BcceUHcg.mjs} +4 -4
  16. package/dist/client/{FloatingIpActionModals-CDF8LVtX.mjs.map → FloatingIpActionModals-BcceUHcg.mjs.map} +1 -1
  17. package/dist/client/{ImageToastNotifications-Dzq6jNTm.mjs → ImageToastNotifications-BGyX2J6j.mjs} +5 -5
  18. package/dist/client/ImageToastNotifications-BGyX2J6j.mjs.map +1 -0
  19. package/dist/client/{RouteError-BmZRk_ss.mjs → RouteError-Rm08PcxN.mjs} +2 -2
  20. package/dist/client/{RouteError-BmZRk_ss.mjs.map → RouteError-Rm08PcxN.mjs.map} +1 -1
  21. package/dist/client/Slot-CWb612-_.mjs +28 -0
  22. package/dist/client/Slot-CWb612-_.mjs.map +1 -0
  23. package/dist/client/{SortInput-DjaEHvcO.mjs → SortInput-D_q_jDfe.mjs} +2 -2
  24. package/dist/client/{SortInput-DjaEHvcO.mjs.map → SortInput-D_q_jDfe.mjs.map} +1 -1
  25. package/dist/client/{StatusError-CLB026fg.mjs → StatusError-2ZU1gFpu.mjs} +2 -2
  26. package/dist/client/{StatusError-CLB026fg.mjs.map → StatusError-2ZU1gFpu.mjs.map} +1 -1
  27. package/dist/client/{_auth-Dut7CaMR.mjs → _auth-D5_QNUos.mjs} +2 -2
  28. package/dist/client/{_auth-Dut7CaMR.mjs.map → _auth-D5_QNUos.mjs.map} +1 -1
  29. package/dist/client/{_flavorId-Cu1nWwOq.mjs → _flavorId-BsmqS9hP.mjs} +7 -7
  30. package/dist/client/{_flavorId-Cu1nWwOq.mjs.map → _flavorId-BsmqS9hP.mjs.map} +1 -1
  31. package/dist/client/{_flavorId-BsIWL0XK.mjs → _flavorId-CFmkmg2Y.mjs} +2 -2
  32. package/dist/client/{_flavorId-BsIWL0XK.mjs.map → _flavorId-CFmkmg2Y.mjs.map} +1 -1
  33. package/dist/client/{_floatingIpId-B_M3gyMA.mjs → _floatingIpId-Bb9ZEJ6b.mjs} +6 -6
  34. package/dist/client/{_floatingIpId-B_M3gyMA.mjs.map → _floatingIpId-Bb9ZEJ6b.mjs.map} +1 -1
  35. package/dist/client/{_floatingIpId-8-UPUV8M.mjs → _floatingIpId-Dzh6_JCI.mjs} +2 -2
  36. package/dist/client/{_floatingIpId-8-UPUV8M.mjs.map → _floatingIpId-Dzh6_JCI.mjs.map} +1 -1
  37. package/dist/client/{_imageId-D1Z0xIco.mjs → _imageId-C3As7sHE.mjs} +5 -5
  38. package/dist/client/{_imageId-D1Z0xIco.mjs.map → _imageId-C3As7sHE.mjs.map} +1 -1
  39. package/dist/client/{_pcaId-BcwGho7g.mjs → _pcaId-n0q0aDb6.mjs} +6 -6
  40. package/dist/client/{_pcaId-BcwGho7g.mjs.map → _pcaId-n0q0aDb6.mjs.map} +1 -1
  41. package/dist/client/{_projectId-DJLjspKf.mjs → _projectId-BuBIFdgG.mjs} +25 -24
  42. package/dist/client/{_projectId-DJLjspKf.mjs.map → _projectId-BuBIFdgG.mjs.map} +1 -1
  43. package/dist/client/{_projectId-B4ScifQf.mjs → _projectId-CAQkJHZ4.mjs} +3 -3
  44. package/dist/client/{_projectId-B4ScifQf.mjs.map → _projectId-CAQkJHZ4.mjs.map} +1 -1
  45. package/dist/client/_projectId-D-b7paXE.mjs +29 -0
  46. package/dist/client/_projectId-D-b7paXE.mjs.map +1 -0
  47. package/dist/client/{_projectId-CYq4KZXB.mjs → _projectId-DNZsNxJw.mjs} +4 -4
  48. package/dist/client/{_projectId-CYq4KZXB.mjs.map → _projectId-DNZsNxJw.mjs.map} +1 -1
  49. package/dist/client/{_securityGroupId-B5-gJe1u.mjs → _securityGroupId-DFdNKa2l.mjs} +641 -504
  50. package/dist/client/_securityGroupId-DFdNKa2l.mjs.map +1 -0
  51. package/dist/client/{_securityGroupId-fPJWtDPU.mjs → _securityGroupId-DRkY3Gt6.mjs} +2 -2
  52. package/dist/client/_securityGroupId-DRkY3Gt6.mjs.map +1 -0
  53. package/dist/client/{_storageType-BkhbKG_G.mjs → _storageType-BKfQcpgp.mjs} +2 -2
  54. package/dist/client/{_storageType-BkhbKG_G.mjs.map → _storageType-BKfQcpgp.mjs.map} +1 -1
  55. package/dist/client/{_storageType-ByLL106s.mjs → _storageType-sMj9NEJz.mjs} +7 -7
  56. package/dist/client/{_storageType-ByLL106s.mjs.map → _storageType-sMj9NEJz.mjs.map} +1 -1
  57. package/dist/client/{about-B4sGnxeW.mjs → about-C8tTrQaW.mjs} +2 -2
  58. package/dist/client/{about-B4sGnxeW.mjs.map → about-C8tTrQaW.mjs.map} +1 -1
  59. package/dist/client/assets/objectDownload.worker-BAc5Au4B.js.map +1 -0
  60. package/dist/client/{aurora-Dp_NPGe8.mjs → aurora-jyvXcI4T.mjs} +2 -2
  61. package/dist/client/{aurora-Dp_NPGe8.mjs.map → aurora-jyvXcI4T.mjs.map} +1 -1
  62. package/dist/client/{build-DgeVmENN.mjs → build-CRLQyqu2.mjs} +2616 -3346
  63. package/dist/client/{build-DgeVmENN.mjs.map → build-CRLQyqu2.mjs.map} +1 -1
  64. package/dist/client/{flavors-CT1bHP61.mjs → flavors-BfTXqmoD.mjs} +6 -6
  65. package/dist/client/{flavors-CT1bHP61.mjs.map → flavors-BfTXqmoD.mjs.map} +1 -1
  66. package/dist/client/{flavors-q1j-y3e-.mjs → flavors-Dy-2mRGv.mjs} +2 -2
  67. package/dist/client/{flavors-q1j-y3e-.mjs.map → flavors-Dy-2mRGv.mjs.map} +1 -1
  68. package/dist/client/floatingips-zhNK6Xxn.mjs +562 -0
  69. package/dist/client/floatingips-zhNK6Xxn.mjs.map +1 -0
  70. package/dist/client/{hooks-D0wGUhRF.mjs → hooks-Bw3sHHOg.mjs} +2 -2
  71. package/dist/client/{hooks-D0wGUhRF.mjs.map → hooks-Bw3sHHOg.mjs.map} +1 -1
  72. package/dist/client/{images-CPYewah0.mjs → images-DPKUXryV.mjs} +2 -2
  73. package/dist/client/{images-CPYewah0.mjs.map → images-DPKUXryV.mjs.map} +1 -1
  74. package/dist/client/{images-BklcxYWi.mjs → images-DhZnqUG_.mjs} +29 -29
  75. package/dist/client/images-DhZnqUG_.mjs.map +1 -0
  76. package/dist/client/images-NBf2bV43.mjs.map +1 -1
  77. package/dist/client/index.js +301 -309
  78. package/dist/client/index.js.map +1 -1
  79. package/dist/client/{objects-DvIxpzGI.mjs → objects-BG1saVLZ.mjs} +1153 -862
  80. package/dist/client/objects-BG1saVLZ.mjs.map +1 -0
  81. package/dist/client/{objects-CEBrL7k-.mjs → objects-Dahys529.mjs} +2 -2
  82. package/dist/client/{objects-CEBrL7k-.mjs.map → objects-Dahys529.mjs.map} +1 -1
  83. package/dist/client/{pca-Ddk0YfgK.mjs → pca-B60iWWfG.mjs} +7 -7
  84. package/dist/client/{pca-Ddk0YfgK.mjs.map → pca-B60iWWfG.mjs.map} +1 -1
  85. package/dist/client/{pca-BAuZA0K3.mjs → pca-D0kKxHp4.mjs} +2 -2
  86. package/dist/client/{pca-BAuZA0K3.mjs.map → pca-D0kKxHp4.mjs.map} +1 -1
  87. package/dist/client/projects-yiK0HGSA.mjs.map +1 -1
  88. package/dist/client/routeInfo-CdTRlSxv.mjs +32 -0
  89. package/dist/client/routeInfo-CdTRlSxv.mjs.map +1 -0
  90. package/dist/client/{routes-BzBTVAjK.mjs → routes-BOf-GDMM.mjs} +41 -34
  91. package/dist/client/routes-BOf-GDMM.mjs.map +1 -0
  92. package/dist/client/{routes-DsisKFfG.mjs → routes-CtfnI-aY.mjs} +2 -2
  93. package/dist/client/routes-CtfnI-aY.mjs.map +1 -0
  94. package/dist/client/securitygroups-B8aLyFK7.mjs +17 -0
  95. package/dist/client/securitygroups-B8aLyFK7.mjs.map +1 -0
  96. package/dist/client/securitygroups-DRhFle2O.mjs +589 -0
  97. package/dist/client/securitygroups-DRhFle2O.mjs.map +1 -0
  98. package/dist/client/trpcClient-Di56hpVv.mjs +71 -0
  99. package/dist/client/trpcClient-Di56hpVv.mjs.map +1 -0
  100. package/dist/client/trpcClient.d.ts +40 -4
  101. package/dist/client/useListWithFiltering-aPTUNRaW.mjs +32 -0
  102. package/dist/client/useListWithFiltering-aPTUNRaW.mjs.map +1 -0
  103. package/dist/client/useSecurityGroupPermissions-BPS1ibWq.mjs +161 -0
  104. package/dist/client/useSecurityGroupPermissions-BPS1ibWq.mjs.map +1 -0
  105. package/dist/server/index.d.ts +56 -53
  106. package/dist/server/index.js +297 -20
  107. package/package.json +15 -15
  108. package/dist/client/EditSecurityGroupModal-BGPXglju.mjs +0 -137
  109. package/dist/client/EditSecurityGroupModal-BGPXglju.mjs.map +0 -1
  110. package/dist/client/ImageToastNotifications-Dzq6jNTm.mjs.map +0 -1
  111. package/dist/client/_projectId-DxgPaiA7.mjs +0 -25
  112. package/dist/client/_projectId-DxgPaiA7.mjs.map +0 -1
  113. package/dist/client/_securityGroupId-B5-gJe1u.mjs.map +0 -1
  114. package/dist/client/_securityGroupId-fPJWtDPU.mjs.map +0 -1
  115. package/dist/client/buildFilterParams-DoZzMKX9.mjs +0 -15
  116. package/dist/client/buildFilterParams-DoZzMKX9.mjs.map +0 -1
  117. package/dist/client/floatingips-DC5OrR8h.mjs +0 -434
  118. package/dist/client/floatingips-DC5OrR8h.mjs.map +0 -1
  119. package/dist/client/images-B5ktfqg6.mjs +0 -8
  120. package/dist/client/images-B5ktfqg6.mjs.map +0 -1
  121. package/dist/client/images-BklcxYWi.mjs.map +0 -1
  122. package/dist/client/objects-DvIxpzGI.mjs.map +0 -1
  123. package/dist/client/projects-DvSiI5Vg.mjs +0 -12
  124. package/dist/client/projects-DvSiI5Vg.mjs.map +0 -1
  125. package/dist/client/routeInfo-Ct5r4Gen.mjs +0 -56
  126. package/dist/client/routeInfo-Ct5r4Gen.mjs.map +0 -1
  127. package/dist/client/routes-BzBTVAjK.mjs.map +0 -1
  128. package/dist/client/routes-DsisKFfG.mjs.map +0 -1
  129. package/dist/client/securitygroups-JMvcJLpb.mjs +0 -440
  130. package/dist/client/securitygroups-JMvcJLpb.mjs.map +0 -1
  131. package/dist/client/trpcClient-BxcNKnhv.mjs +0 -65
  132. package/dist/client/trpcClient-BxcNKnhv.mjs.map +0 -1
  133. package/dist/client/useListWithFiltering-BuhE81I6.mjs +0 -157
  134. package/dist/client/useListWithFiltering-BuhE81I6.mjs.map +0 -1
@@ -1,201 +1,203 @@
1
- import { A as e, B as t, E as n, G as r, H as i, K as a, P as o, Q as s, R as c, U as l, Y as u, Z as d, at as f, c as p, dt as m, et as h, g, h as _, m as v, nt as y, o as b, p as x, r as S, rt as C, tt as w, ut as T, y as E } from "./build-DgeVmENN.mjs";
2
- import { r as D } from "./trpcClient-BxcNKnhv.mjs";
3
- import { t as O } from "./_securityGroupId-fPJWtDPU.mjs";
4
- import { t as k } from "./useProjectId-DBc5lpoU.mjs";
5
- import "./hooks-D0wGUhRF.mjs";
6
- import { t as A } from "./useModal-DCs1OJh7.mjs";
7
- import { n as j, t as M } from "./useListWithFiltering-BuhE81I6.mjs";
8
- import { t as N } from "./EditSecurityGroupModal-BGPXglju.mjs";
9
- import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
10
- import { useEffect as L, useMemo as R, useState as z } from "react";
11
- import { useNavigate as B } from "@tanstack/react-router";
12
- import { Trans as V, useLingui as H } from "@lingui/react";
13
- import { z as U } from "zod";
14
- import { useForm as W, useStore as G } from "@tanstack/react-form";
1
+ import { A as e, B as t, E as n, G as r, H as i, K as a, P as o, Q as s, R as c, U as l, Y as u, Z as d, at as f, c as p, ct as m, dt as h, et as g, g as _, h as v, m as y, n as b, nt as x, o as S, p as C, r as w, rt as T, tt as E, ut as D, y as O } from "./build-CRLQyqu2.mjs";
2
+ import { a as k } from "./trpcClient-Di56hpVv.mjs";
3
+ import { t as A } from "./_securityGroupId-DRkY3Gt6.mjs";
4
+ import { t as j } from "./useProjectId-DBc5lpoU.mjs";
5
+ import "./hooks-Bw3sHHOg.mjs";
6
+ import { t as M } from "./useModal-DCs1OJh7.mjs";
7
+ import { t as N } from "./SortInput-D_q_jDfe.mjs";
8
+ import { n as P, t as F } from "./FiltersInput-DqT08Ib-.mjs";
9
+ import { t as I } from "./useListWithFiltering-aPTUNRaW.mjs";
10
+ import { n as L, t as ee } from "./useSecurityGroupPermissions-BPS1ibWq.mjs";
11
+ import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
12
+ import { useEffect as V, useMemo as H, useRef as U, useState as W } from "react";
13
+ import { useNavigate as G } from "@tanstack/react-router";
14
+ import { Trans as K, useLingui as q } from "@lingui/react";
15
+ import { z as J } from "zod";
16
+ import { useForm as Y, useStore as X } from "@tanstack/react-form";
15
17
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupHeader.tsx
16
- function K({ name: e, id: t }) {
17
- return /*#__PURE__*/ I("div", {
18
+ function te({ name: e, id: t }) {
19
+ return /*#__PURE__*/ B("div", {
18
20
  className: "mb-2",
19
- children: [/*#__PURE__*/ F(u, { children: `'${e || t}' Details` }), /*#__PURE__*/ F("p", {
21
+ children: [/*#__PURE__*/ z(u, { children: `'${e || t}' Details` }), /*#__PURE__*/ z("p", {
20
22
  className: "text-theme-secondary mt-2 text-sm",
21
- children: /*#__PURE__*/ F(V, { id: "kIuDMT" })
23
+ children: /*#__PURE__*/ z(K, { id: "kIuDMT" })
22
24
  })]
23
25
  });
24
26
  }
25
27
  //#endregion
26
28
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupBasicInfo.tsx
27
- function q({ securityGroup: e, onEdit: t, isReadOnly: i = !1 }) {
28
- let { i18n: a, _: s } = H(), l = ({ value: e }) => /*#__PURE__*/ F("span", { children: e ? a._({ id: "l75CjT" }) : a._({ id: "1UzENP" }) });
29
- return /*#__PURE__*/ I("div", { children: [/*#__PURE__*/ F("div", {
29
+ function Z({ securityGroup: e, onEdit: t, canUpdate: i }) {
30
+ let { i18n: a, _: s } = q(), l = ({ value: e }) => /*#__PURE__*/ z("span", { children: e ? a._({ id: "l75CjT" }) : a._({ id: "1UzENP" }) });
31
+ return /*#__PURE__*/ B("div", { children: [/*#__PURE__*/ z("div", {
30
32
  className: "mb-4 flex flex-row-reverse",
31
- children: t && !i && /*#__PURE__*/ F(E, {
33
+ children: t && i && /*#__PURE__*/ z(O, {
32
34
  variant: "primary",
33
35
  onClick: t,
34
- disabled: i,
35
- children: /*#__PURE__*/ F(V, { id: "ePK91l" })
36
+ disabled: !i,
37
+ children: /*#__PURE__*/ z(K, { id: "ePK91l" })
36
38
  })
37
- }), /*#__PURE__*/ I(o, {
39
+ }), /*#__PURE__*/ B(o, {
38
40
  columns: 4,
39
41
  gridColumnTemplate: "15% 35% 15% 35%",
40
42
  children: [
41
- /*#__PURE__*/ I(n, { children: [/*#__PURE__*/ F(c, { children: a._({ id: "Nu4oKW" }) }), /*#__PURE__*/ F(r, {
43
+ /*#__PURE__*/ B(n, { children: [/*#__PURE__*/ z(c, { children: a._({ id: "Nu4oKW" }) }), /*#__PURE__*/ z(r, {
42
44
  colSpan: 3,
43
- children: /*#__PURE__*/ F("div", {
45
+ children: /*#__PURE__*/ z("div", {
44
46
  className: "overflow-hidden text-ellipsis whitespace-nowrap",
45
47
  title: e.description || void 0,
46
48
  children: e.description || a._({ id: "h47p9L" })
47
49
  })
48
50
  })] }),
49
- /*#__PURE__*/ I(n, { children: [
50
- /*#__PURE__*/ F(c, { children: a._({ id: "S0kLOH" }) }),
51
- /*#__PURE__*/ F(r, { children: /*#__PURE__*/ F("div", {
51
+ /*#__PURE__*/ B(n, { children: [
52
+ /*#__PURE__*/ z(c, { children: a._({ id: "S0kLOH" }) }),
53
+ /*#__PURE__*/ z(r, { children: /*#__PURE__*/ z("div", {
52
54
  className: "overflow-hidden text-ellipsis whitespace-nowrap",
53
55
  title: e.id,
54
56
  children: e.id
55
57
  }) }),
56
- /*#__PURE__*/ F(c, { children: a._({ id: "OYHzN1" }) }),
57
- /*#__PURE__*/ F(r, { children: /*#__PURE__*/ F("div", {
58
+ /*#__PURE__*/ z(c, { children: a._({ id: "OYHzN1" }) }),
59
+ /*#__PURE__*/ z(r, { children: /*#__PURE__*/ z("div", {
58
60
  className: "overflow-hidden text-ellipsis whitespace-nowrap",
59
61
  title: e.tags?.join(", ") || void 0,
60
62
  children: e.tags?.join(", ") || a._({ id: "h47p9L" })
61
63
  }) })
62
64
  ] }),
63
- /*#__PURE__*/ I(n, { children: [
64
- /*#__PURE__*/ F(c, { children: a._({ id: "6YtxFj" }) }),
65
- /*#__PURE__*/ F(r, { children: /*#__PURE__*/ F("div", {
65
+ /*#__PURE__*/ B(n, { children: [
66
+ /*#__PURE__*/ z(c, { children: a._({ id: "6YtxFj" }) }),
67
+ /*#__PURE__*/ z(r, { children: /*#__PURE__*/ z("div", {
66
68
  className: "overflow-hidden text-ellipsis whitespace-nowrap",
67
69
  title: e.name || void 0,
68
70
  children: e.name
69
71
  }) }),
70
- /*#__PURE__*/ F(c, { children: a._({ id: "Jim5X9" }) }),
71
- /*#__PURE__*/ F(r, { children: /*#__PURE__*/ F(l, { value: e.stateful }) })
72
+ /*#__PURE__*/ z(c, { children: a._({ id: "Jim5X9" }) }),
73
+ /*#__PURE__*/ z(r, { children: /*#__PURE__*/ z(l, { value: e.stateful }) })
72
74
  ] }),
73
- /*#__PURE__*/ I(n, { children: [
74
- /*#__PURE__*/ F(c, { children: a._({ id: "aI8Tgp" }) }),
75
- /*#__PURE__*/ F(r, { children: /*#__PURE__*/ F("div", {
75
+ /*#__PURE__*/ B(n, { children: [
76
+ /*#__PURE__*/ z(c, { children: a._({ id: "aI8Tgp" }) }),
77
+ /*#__PURE__*/ z(r, { children: /*#__PURE__*/ z("div", {
76
78
  className: "overflow-hidden text-ellipsis whitespace-nowrap",
77
79
  title: e.project_id || void 0,
78
80
  children: e.project_id || a._({ id: "h47p9L" })
79
81
  }) }),
80
- /*#__PURE__*/ F(c, { children: a._({ id: "0Gd0NU" }) }),
81
- /*#__PURE__*/ F(r, { children: /*#__PURE__*/ F(l, { value: e.shared }) })
82
+ /*#__PURE__*/ z(c, { children: a._({ id: "0Gd0NU" }) }),
83
+ /*#__PURE__*/ z(r, { children: /*#__PURE__*/ z(l, { value: e.shared }) })
82
84
  ] })
83
85
  ]
84
86
  })] });
85
87
  }
86
88
  //#endregion
87
89
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupTabs.tsx
88
- function J({ activeTab: e, onTabChange: t, showRBACTab: n = !0 }) {
90
+ function Q({ activeTab: e, onTabChange: t, showRBACTab: n = !0 }) {
89
91
  let r = (t) => `px-6 py-3 font-semibold border-b-2 transition-colors ${e === t ? "border-theme-accent text-theme-highest" : "border-transparent text-theme-secondary hover:text-theme-high"}`;
90
- return /*#__PURE__*/ F("div", {
92
+ return /*#__PURE__*/ z("div", {
91
93
  className: "border-theme-background-lvl-3 mt-1 border-b",
92
- children: /*#__PURE__*/ I(w, {
94
+ children: /*#__PURE__*/ B(E, {
93
95
  direction: "horizontal",
94
96
  gap: "0",
95
- children: [/*#__PURE__*/ F("button", {
97
+ children: [/*#__PURE__*/ z("button", {
96
98
  className: r("rules"),
97
99
  onClick: () => t("rules"),
98
- children: /*#__PURE__*/ F(V, { id: "4EZrJN" })
99
- }), n && /*#__PURE__*/ F("button", {
100
+ children: /*#__PURE__*/ z(K, { id: "4EZrJN" })
101
+ }), n && /*#__PURE__*/ z("button", {
100
102
  className: r("rbac"),
101
103
  onClick: () => t("rbac"),
102
- children: /*#__PURE__*/ F(V, { id: "/eFtWI" })
104
+ children: /*#__PURE__*/ z(K, { id: "/eFtWI" })
103
105
  })]
104
106
  })
105
107
  });
106
108
  }
107
109
  //#endregion
108
110
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/DeleteRuleDialog.tsx
109
- function Y({ rule: e, open: n, onClose: r, onConfirm: i, isLoading: a, error: o }) {
110
- let { i18n: s, _: c } = H(), [u, d] = z(""), f = () => {
111
+ function ne({ rule: e, open: n, onClose: r, onConfirm: i, isLoading: a, error: o }) {
112
+ let { i18n: s, _: c } = q(), [u, d] = W(""), f = () => {
111
113
  e && u === "delete" && i(e.id);
112
114
  }, p = () => {
113
115
  d(""), r();
114
116
  }, m = u !== "delete" || a;
115
- return e ? /*#__PURE__*/ F(S, {
117
+ return e ? /*#__PURE__*/ z(w, {
116
118
  open: n,
117
119
  onCancel: p,
118
120
  size: "small",
119
121
  title: s._({ id: "TM93nK" }),
120
- modalFooter: /*#__PURE__*/ F(g, {
122
+ modalFooter: /*#__PURE__*/ z(_, {
121
123
  className: "flex justify-end",
122
- children: /*#__PURE__*/ I(T, { children: [/*#__PURE__*/ F(E, {
124
+ children: /*#__PURE__*/ B(D, { children: [/*#__PURE__*/ z(O, {
123
125
  variant: "default",
124
126
  onClick: p,
125
127
  disabled: a,
126
- children: /*#__PURE__*/ F(V, { id: "dEgA5A" })
127
- }), /*#__PURE__*/ F(E, {
128
+ children: /*#__PURE__*/ z(K, { id: "dEgA5A" })
129
+ }), /*#__PURE__*/ z(O, {
128
130
  variant: "primary-danger",
129
131
  onClick: f,
130
132
  disabled: m,
131
133
  "data-testid": "confirm-delete-rule-button",
132
- children: a ? /*#__PURE__*/ F(V, { id: "EF2EU9" }) : /*#__PURE__*/ F(V, { id: "lN3xvy" })
134
+ children: a ? /*#__PURE__*/ z(K, { id: "EF2EU9" }) : /*#__PURE__*/ z(K, { id: "lN3xvy" })
133
135
  })] })
134
136
  }),
135
- children: /*#__PURE__*/ I("div", { children: [
136
- o && /*#__PURE__*/ F(t, {
137
+ children: /*#__PURE__*/ B("div", { children: [
138
+ o && /*#__PURE__*/ z(t, {
137
139
  dismissible: !1,
138
140
  variant: "error",
139
141
  className: "mt-4",
140
142
  children: o
141
143
  }),
142
- /*#__PURE__*/ F(V, { id: "CMVP7y" }),
143
- /*#__PURE__*/ I("div", {
144
+ /*#__PURE__*/ z(K, { id: "CMVP7y" }),
145
+ /*#__PURE__*/ B("div", {
144
146
  className: "bg-theme-background-lvl-1 mt-4 mb-4 rounded p-4",
145
- children: [/*#__PURE__*/ F("p", {
147
+ children: [/*#__PURE__*/ z("p", {
146
148
  className: "mb-2 font-semibold",
147
- children: /*#__PURE__*/ F(V, { id: "uly9ET" })
148
- }), /*#__PURE__*/ I("ul", {
149
+ children: /*#__PURE__*/ z(K, { id: "uly9ET" })
150
+ }), /*#__PURE__*/ B("ul", {
149
151
  className: "list-inside list-disc space-y-1 text-sm",
150
152
  children: [
151
- /*#__PURE__*/ I("li", { children: [
152
- /*#__PURE__*/ F(V, { id: "MRB7nI" }),
153
+ /*#__PURE__*/ B("li", { children: [
154
+ /*#__PURE__*/ z(K, { id: "MRB7nI" }),
153
155
  ": ",
154
156
  e.direction
155
157
  ] }),
156
- e.description && /*#__PURE__*/ I("li", { children: [
157
- /*#__PURE__*/ F(V, { id: "Nu4oKW" }),
158
+ e.description && /*#__PURE__*/ B("li", { children: [
159
+ /*#__PURE__*/ z(K, { id: "Nu4oKW" }),
158
160
  ": ",
159
161
  e.description
160
162
  ] }),
161
- /*#__PURE__*/ I("li", { children: [
162
- /*#__PURE__*/ F(V, { id: "yp0UjB" }),
163
+ /*#__PURE__*/ B("li", { children: [
164
+ /*#__PURE__*/ z(K, { id: "yp0UjB" }),
163
165
  ": ",
164
166
  e.ethertype
165
167
  ] }),
166
- e.protocol && /*#__PURE__*/ I("li", { children: [
167
- /*#__PURE__*/ F(V, { id: "6+OdGi" }),
168
+ e.protocol && /*#__PURE__*/ B("li", { children: [
169
+ /*#__PURE__*/ z(K, { id: "6+OdGi" }),
168
170
  ": ",
169
171
  e.protocol
170
172
  ] }),
171
- e.port_range_min !== null && e.port_range_max !== null && /*#__PURE__*/ I("li", { children: [
172
- /*#__PURE__*/ F(V, { id: "tV/Ozb" }),
173
+ e.port_range_min !== null && e.port_range_max !== null && /*#__PURE__*/ B("li", { children: [
174
+ /*#__PURE__*/ z(K, { id: "tV/Ozb" }),
173
175
  ":",
174
176
  " ",
175
177
  e.port_range_min === e.port_range_max ? e.port_range_min : `${e.port_range_min}-${e.port_range_max}`
176
178
  ] }),
177
- e.remote_ip_prefix && /*#__PURE__*/ I("li", { children: [
178
- /*#__PURE__*/ F(V, { id: "WoSkGY" }),
179
+ e.remote_ip_prefix && /*#__PURE__*/ B("li", { children: [
180
+ /*#__PURE__*/ z(K, { id: "WoSkGY" }),
179
181
  ": ",
180
182
  e.remote_ip_prefix
181
183
  ] }),
182
- e.remote_group_id && /*#__PURE__*/ I("li", { children: [
183
- /*#__PURE__*/ F(V, { id: "i9TIyi" }),
184
+ e.remote_group_id && /*#__PURE__*/ B("li", { children: [
185
+ /*#__PURE__*/ z(K, { id: "i9TIyi" }),
184
186
  ": ",
185
187
  e.remote_group_id
186
188
  ] })
187
189
  ]
188
190
  })]
189
191
  }),
190
- /*#__PURE__*/ I("div", {
192
+ /*#__PURE__*/ B("div", {
191
193
  className: "mt-4",
192
- children: [/*#__PURE__*/ F("p", {
194
+ children: [/*#__PURE__*/ z("p", {
193
195
  className: "mb-2 text-sm",
194
- children: /*#__PURE__*/ F(V, {
196
+ children: /*#__PURE__*/ z(K, {
195
197
  id: "PHt+EV",
196
- components: { 0: /*#__PURE__*/ F("strong", {}) }
198
+ components: { 0: /*#__PURE__*/ z("strong", {}) }
197
199
  })
198
- }), /*#__PURE__*/ F(l, {
200
+ }), /*#__PURE__*/ z(l, {
199
201
  value: u,
200
202
  onChange: (e) => d(e.target.value),
201
203
  placeholder: s._({ id: "HNlEFZ" }),
@@ -209,10 +211,10 @@ function Y({ rule: e, open: n, onClose: r, onConfirm: i, isLoading: a, error: o
209
211
  }
210
212
  //#endregion
211
213
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/validation/validationHelpers.ts
212
- function ee(e) {
214
+ function $(e) {
213
215
  return e.includes(".") ? "IPv4" : e.includes(":") ? "IPv6" : null;
214
216
  }
215
- function X(e, t, n) {
217
+ function re(e, t, n) {
216
218
  if (e != null && isNaN(e) || t != null && isNaN(t)) return {
217
219
  valid: !1,
218
220
  error: "Port must be a valid number"
@@ -231,7 +233,7 @@ function X(e, t, n) {
231
233
  error: "port_range_min must be less than or equal to port_range_max"
232
234
  } : { valid: !0 };
233
235
  }
234
- function te(e, t) {
236
+ function ie(e, t) {
235
237
  return e != null && isNaN(e) ? {
236
238
  valid: !1,
237
239
  error: "ICMP type must be a valid number"
@@ -246,7 +248,7 @@ function te(e, t) {
246
248
  error: "ICMP code must be between 0 and 255"
247
249
  } : { valid: !0 };
248
250
  }
249
- function ne(e) {
251
+ function ae(e) {
250
252
  let t = e.split("/");
251
253
  if (t.length !== 2) return !1;
252
254
  let [n, r] = t;
@@ -275,61 +277,61 @@ function ne(e) {
275
277
  }
276
278
  //#endregion
277
279
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/constants.ts
278
- var Z = "0.0.0.0/0", re = "::/0", ie = "other-protocol", ae = U.object({
279
- ruleType: U.string().min(1, "Rule type is required"),
280
- direction: U.enum(["ingress", "egress"]),
281
- ethertype: U.enum(["IPv4", "IPv6"]),
282
- description: U.string(),
283
- protocol: U.string().nullable(),
284
- portFrom: U.string(),
285
- portTo: U.string(),
286
- icmpType: U.string(),
287
- icmpCode: U.string(),
288
- remoteSourceType: U.enum(["cidr", "security_group"]),
289
- remoteCidr: U.string(),
290
- remoteSecurityGroupId: U.string()
280
+ var oe = "0.0.0.0/0", se = "::/0", ce = "other-protocol", le = J.object({
281
+ ruleType: J.string().min(1, "Rule type is required"),
282
+ direction: J.enum(["ingress", "egress"]),
283
+ ethertype: J.enum(["IPv4", "IPv6"]),
284
+ description: J.string(),
285
+ protocol: J.string().nullable(),
286
+ portFrom: J.string(),
287
+ portTo: J.string(),
288
+ icmpType: J.string(),
289
+ icmpCode: J.string(),
290
+ remoteSourceType: J.enum(["cidr", "security_group"]),
291
+ remoteCidr: J.string(),
292
+ remoteSecurityGroupId: J.string()
291
293
  }).superRefine((e, t) => {
292
- let n = e.protocol === "tcp" || e.protocol === "udp", r = e.protocol === "icmp" || e.protocol === "ipv6-icmp", i = e.ruleType === ie, a = n && ["custom-tcp", "custom-udp"].includes(e.ruleType);
294
+ let n = e.protocol === "tcp" || e.protocol === "udp", r = e.protocol === "icmp" || e.protocol === "ipv6-icmp", i = e.ruleType === ce, a = n && ["custom-tcp", "custom-udp"].includes(e.ruleType);
293
295
  if (i && !e.protocol && t.addIssue({
294
- code: U.ZodIssueCode.custom,
296
+ code: J.ZodIssueCode.custom,
295
297
  message: "Protocol is required",
296
298
  path: ["protocol"]
297
299
  }), a) if (!e.portFrom) t.addIssue({
298
- code: U.ZodIssueCode.custom,
300
+ code: J.ZodIssueCode.custom,
299
301
  message: "Port (from) is required",
300
302
  path: ["portFrom"]
301
303
  });
302
304
  else {
303
305
  let n = parseInt(e.portFrom, 10);
304
306
  if (isNaN(n)) t.addIssue({
305
- code: U.ZodIssueCode.custom,
307
+ code: J.ZodIssueCode.custom,
306
308
  message: "Port must be a valid number",
307
309
  path: ["portFrom"]
308
310
  });
309
311
  else if (e.portTo) {
310
312
  let r = parseInt(e.portTo, 10);
311
313
  if (isNaN(r)) t.addIssue({
312
- code: U.ZodIssueCode.custom,
314
+ code: J.ZodIssueCode.custom,
313
315
  message: "Port must be a valid number",
314
316
  path: ["portTo"]
315
317
  });
316
318
  else if (n >= r) t.addIssue({
317
- code: U.ZodIssueCode.custom,
319
+ code: J.ZodIssueCode.custom,
318
320
  message: "\"Port (from)\" must be less than \"Port (to)\"",
319
321
  path: ["portFrom"]
320
322
  });
321
323
  else {
322
- let i = X(n, r, e.protocol);
324
+ let i = re(n, r, e.protocol);
323
325
  i.valid || t.addIssue({
324
- code: U.ZodIssueCode.custom,
326
+ code: J.ZodIssueCode.custom,
325
327
  message: i.error || "Invalid port range",
326
328
  path: ["portFrom"]
327
329
  });
328
330
  }
329
331
  } else {
330
- let r = X(n, n, e.protocol);
332
+ let r = re(n, n, e.protocol);
331
333
  r.valid || t.addIssue({
332
- code: U.ZodIssueCode.custom,
334
+ code: J.ZodIssueCode.custom,
333
335
  message: r.error || "Invalid port",
334
336
  path: ["portFrom"]
335
337
  });
@@ -338,44 +340,44 @@ var Z = "0.0.0.0/0", re = "::/0", ie = "other-protocol", ae = U.object({
338
340
  if (r) {
339
341
  let n = e.icmpType ? parseInt(e.icmpType, 10) : null, r = e.icmpCode ? parseInt(e.icmpCode, 10) : null;
340
342
  if (e.icmpType && isNaN(n) && t.addIssue({
341
- code: U.ZodIssueCode.custom,
343
+ code: J.ZodIssueCode.custom,
342
344
  message: "ICMP type must be a valid number",
343
345
  path: ["icmpType"]
344
346
  }), e.icmpCode && isNaN(r) && t.addIssue({
345
- code: U.ZodIssueCode.custom,
347
+ code: J.ZodIssueCode.custom,
346
348
  message: "ICMP code must be a valid number",
347
349
  path: ["icmpCode"]
348
350
  }), e.icmpCode && !e.icmpType && t.addIssue({
349
- code: U.ZodIssueCode.custom,
351
+ code: J.ZodIssueCode.custom,
350
352
  message: "ICMP type is required when ICMP code is specified",
351
353
  path: ["icmpType"]
352
354
  }), n !== null || r !== null) {
353
- let e = te(n, r);
355
+ let e = ie(n, r);
354
356
  e.valid || (e.error?.includes("type") && t.addIssue({
355
- code: U.ZodIssueCode.custom,
357
+ code: J.ZodIssueCode.custom,
356
358
  message: "ICMP type must be between 0 and 255",
357
359
  path: ["icmpType"]
358
360
  }), e.error?.includes("code") && t.addIssue({
359
- code: U.ZodIssueCode.custom,
361
+ code: J.ZodIssueCode.custom,
360
362
  message: "ICMP code must be between 0 and 255",
361
363
  path: ["icmpCode"]
362
364
  }));
363
365
  }
364
366
  }
365
- if (e.remoteSourceType === "cidr" && e.remoteCidr) if (!ne(e.remoteCidr)) t.addIssue({
366
- code: U.ZodIssueCode.custom,
367
+ if (e.remoteSourceType === "cidr" && e.remoteCidr) if (!ae(e.remoteCidr)) t.addIssue({
368
+ code: J.ZodIssueCode.custom,
367
369
  message: "Invalid CIDR format. Examples: 0.0.0.0/0 (IPv4) or ::/0 (IPv6)",
368
370
  path: ["remoteCidr"]
369
371
  });
370
372
  else {
371
- let n = ee(e.remoteCidr);
373
+ let n = $(e.remoteCidr);
372
374
  n && n !== e.ethertype && t.addIssue({
373
- code: U.ZodIssueCode.custom,
375
+ code: J.ZodIssueCode.custom,
374
376
  message: `CIDR family (${n}) must match Ethertype (${e.ethertype})`,
375
377
  path: ["remoteCidr"]
376
378
  });
377
379
  }
378
- }), oe = {
380
+ }), ue = {
379
381
  ruleType: "",
380
382
  direction: "ingress",
381
383
  ethertype: "IPv4",
@@ -386,9 +388,9 @@ var Z = "0.0.0.0/0", re = "::/0", ie = "other-protocol", ae = U.object({
386
388
  icmpType: "",
387
389
  icmpCode: "",
388
390
  remoteSourceType: "cidr",
389
- remoteCidr: Z,
391
+ remoteCidr: oe,
390
392
  remoteSecurityGroupId: ""
391
- }, Q = [
393
+ }, de = [
392
394
  {
393
395
  value: "",
394
396
  label: "",
@@ -546,14 +548,14 @@ var Z = "0.0.0.0/0", re = "::/0", ie = "other-protocol", ae = U.object({
546
548
  ];
547
549
  //#endregion
548
550
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/RuleTypeSection.tsx
549
- function se({ form: e, disabled: t = !1 }) {
550
- let { i18n: n, _: r } = H();
551
- return /*#__PURE__*/ F(e.Field, {
551
+ function fe({ form: e, disabled: t = !1 }) {
552
+ let { i18n: n, _: r } = q();
553
+ return /*#__PURE__*/ z(e.Field, {
552
554
  name: "ruleType",
553
555
  mode: "value",
554
- children: (r) => /*#__PURE__*/ F(p, {
556
+ children: (r) => /*#__PURE__*/ z(p, {
555
557
  className: "mb-6",
556
- children: /*#__PURE__*/ F(m, {
558
+ children: /*#__PURE__*/ z(h, {
557
559
  id: "ruleType",
558
560
  label: n._({ id: "YuGQWb" }),
559
561
  value: r.state.value,
@@ -563,14 +565,14 @@ function se({ form: e, disabled: t = !1 }) {
563
565
  e.setFieldValue("protocol", null), e.setFieldValue("portFrom", ""), e.setFieldValue("portTo", ""), e.setFieldValue("icmpType", ""), e.setFieldValue("icmpCode", "");
564
566
  return;
565
567
  }
566
- let i = Q.find((e) => e.value === n);
568
+ let i = de.find((e) => e.value === n);
567
569
  i && (e.setFieldValue("protocol", i.protocol), (i.protocol === "tcp" || i.protocol === "udp") && i.portRangeMin !== null && i.portRangeMax !== null ? (e.setFieldValue("portFrom", String(i.portRangeMin)), e.setFieldValue("portTo", String(i.portRangeMax))) : (e.setFieldValue("portFrom", ""), e.setFieldValue("portTo", "")), i.protocol !== "icmp" && i.protocol !== "ipv6-icmp" && (e.setFieldValue("icmpType", ""), e.setFieldValue("icmpCode", "")));
568
570
  },
569
571
  disabled: t,
570
- children: Q.map((e) => e.value === "" ? /*#__PURE__*/ F(v, {
572
+ children: de.map((e) => e.value === "" ? /*#__PURE__*/ z(y, {
571
573
  value: e.value,
572
574
  label: n._({ id: "eh/k36" })
573
- }, e.value) : /*#__PURE__*/ F(v, {
575
+ }, e.value) : /*#__PURE__*/ z(y, {
574
576
  value: e.value,
575
577
  label: e.label
576
578
  }, e.value))
@@ -580,23 +582,23 @@ function se({ form: e, disabled: t = !1 }) {
580
582
  }
581
583
  //#endregion
582
584
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/DirectionEthertypeSection.tsx
583
- function ce({ form: e, disabled: t = !1 }) {
584
- let { i18n: n, _: r } = H();
585
- return /*#__PURE__*/ F(e.Field, {
585
+ function pe({ form: e, disabled: t = !1 }) {
586
+ let { i18n: n, _: r } = q();
587
+ return /*#__PURE__*/ z(e.Field, {
586
588
  name: "direction",
587
- children: (e) => /*#__PURE__*/ F(p, { children: /*#__PURE__*/ F(_, {
589
+ children: (e) => /*#__PURE__*/ z(p, { children: /*#__PURE__*/ z(v, {
588
590
  name: "direction",
589
591
  label: n._({ id: "MRB7nI" }),
590
592
  selected: e.state.value,
591
593
  onChange: (t) => e.handleChange(String(t)),
592
594
  required: !0,
593
595
  disabled: t,
594
- children: /*#__PURE__*/ I("div", {
596
+ children: /*#__PURE__*/ B("div", {
595
597
  className: "flex gap-4",
596
- children: [/*#__PURE__*/ F(x, {
598
+ children: [/*#__PURE__*/ z(C, {
597
599
  value: "ingress",
598
600
  label: n._({ id: "fzfAAa" })
599
- }), /*#__PURE__*/ F(x, {
601
+ }), /*#__PURE__*/ z(C, {
600
602
  value: "egress",
601
603
  label: n._({ id: "nETBrc" })
602
604
  })]
@@ -604,23 +606,23 @@ function ce({ form: e, disabled: t = !1 }) {
604
606
  }) })
605
607
  });
606
608
  }
607
- function le({ form: e, disabled: t = !1 }) {
608
- let { i18n: n, _: r } = H();
609
- return /*#__PURE__*/ F(e.Field, {
609
+ function me({ form: e, disabled: t = !1 }) {
610
+ let { i18n: n, _: r } = q();
611
+ return /*#__PURE__*/ z(e.Field, {
610
612
  name: "ethertype",
611
- children: (e) => /*#__PURE__*/ F(p, { children: /*#__PURE__*/ F(_, {
613
+ children: (e) => /*#__PURE__*/ z(p, { children: /*#__PURE__*/ z(v, {
612
614
  name: "ethertype",
613
615
  label: n._({ id: "16085O" }),
614
616
  selected: e.state.value,
615
617
  onChange: (t) => e.handleChange(String(t)),
616
618
  required: !0,
617
619
  disabled: t,
618
- children: /*#__PURE__*/ I("div", {
620
+ children: /*#__PURE__*/ B("div", {
619
621
  className: "flex gap-4",
620
- children: [/*#__PURE__*/ F(x, {
622
+ children: [/*#__PURE__*/ z(C, {
621
623
  value: "IPv4",
622
624
  label: "IPv4"
623
- }), /*#__PURE__*/ F(x, {
625
+ }), /*#__PURE__*/ z(C, {
624
626
  value: "IPv6",
625
627
  label: "IPv6"
626
628
  })]
@@ -630,13 +632,13 @@ function le({ form: e, disabled: t = !1 }) {
630
632
  }
631
633
  //#endregion
632
634
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/ProtocolSection.tsx
633
- function ue({ form: e, disabled: t = !1 }) {
634
- let { i18n: n, _: r } = H();
635
- return /*#__PURE__*/ F(e.Field, {
635
+ function he({ form: e, disabled: t = !1 }) {
636
+ let { i18n: n, _: r } = q();
637
+ return /*#__PURE__*/ z(e.Field, {
636
638
  name: "protocol",
637
- children: (e) => /*#__PURE__*/ F(p, {
639
+ children: (e) => /*#__PURE__*/ z(p, {
638
640
  className: "mb-6",
639
- children: /*#__PURE__*/ F(l, {
641
+ children: /*#__PURE__*/ z(l, {
640
642
  id: "protocol",
641
643
  name: "protocol",
642
644
  label: n._({ id: "6+OdGi" }),
@@ -651,19 +653,19 @@ function ue({ form: e, disabled: t = !1 }) {
651
653
  }
652
654
  //#endregion
653
655
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/PortRangeSection.tsx
654
- function de({ form: e, disabled: t = !1 }) {
655
- let { i18n: n, _: r } = H(), i = G(e.store, (e) => e.values.portFrom), a = G(e.store, (e) => e.fieldMeta.portFrom?.errors[0]?.message), o = G(e.store, (e) => e.fieldMeta.portTo?.errors[0]?.message), s = t || !i || i.trim() === "";
656
- return /*#__PURE__*/ I(p, {
656
+ function ge({ form: e, disabled: t = !1 }) {
657
+ let { i18n: n, _: r } = q(), i = X(e.store, (e) => e.values.portFrom), a = X(e.store, (e) => e.fieldMeta.portFrom?.errors[0]?.message), o = X(e.store, (e) => e.fieldMeta.portTo?.errors[0]?.message), s = t || !i || i.trim() === "";
658
+ return /*#__PURE__*/ B(p, {
657
659
  className: "mb-6",
658
660
  children: [
659
- /*#__PURE__*/ I("div", {
661
+ /*#__PURE__*/ B("div", {
660
662
  className: "flex items-center gap-4",
661
663
  children: [
662
- /*#__PURE__*/ F(e.Field, {
664
+ /*#__PURE__*/ z(e.Field, {
663
665
  name: "portFrom",
664
- children: (r) => /*#__PURE__*/ F("div", {
666
+ children: (r) => /*#__PURE__*/ z("div", {
665
667
  className: "flex-1",
666
- children: /*#__PURE__*/ F(l, {
668
+ children: /*#__PURE__*/ z(l, {
667
669
  id: "portFrom",
668
670
  name: "portFrom",
669
671
  label: n._({ id: "LMdsuJ" }),
@@ -678,15 +680,15 @@ function de({ form: e, disabled: t = !1 }) {
678
680
  })
679
681
  })
680
682
  }),
681
- /*#__PURE__*/ F("div", {
683
+ /*#__PURE__*/ z("div", {
682
684
  className: "text-theme-secondary flex items-center justify-center",
683
685
  children: "—"
684
686
  }),
685
- /*#__PURE__*/ F(e.Field, {
687
+ /*#__PURE__*/ z(e.Field, {
686
688
  name: "portTo",
687
- children: (t) => /*#__PURE__*/ F("div", {
689
+ children: (t) => /*#__PURE__*/ z("div", {
688
690
  className: "flex-1",
689
- children: /*#__PURE__*/ F(l, {
691
+ children: /*#__PURE__*/ z(l, {
690
692
  id: "portTo",
691
693
  name: "portTo",
692
694
  label: n._({ id: "a12lSo" }),
@@ -702,11 +704,11 @@ function de({ form: e, disabled: t = !1 }) {
702
704
  })
703
705
  ]
704
706
  }),
705
- (a || o) && /*#__PURE__*/ I("div", {
707
+ (a || o) && /*#__PURE__*/ B("div", {
706
708
  className: "text-theme-error mt-2 text-sm",
707
- children: [a && /*#__PURE__*/ F("div", { children: a }), o && /*#__PURE__*/ F("div", { children: o })]
709
+ children: [a && /*#__PURE__*/ z("div", { children: a }), o && /*#__PURE__*/ z("div", { children: o })]
708
710
  }),
709
- /*#__PURE__*/ F("p", {
711
+ /*#__PURE__*/ z("p", {
710
712
  className: "mt-2 text-sm",
711
713
  children: n._({ id: "QAUa4B" })
712
714
  })
@@ -715,17 +717,17 @@ function de({ form: e, disabled: t = !1 }) {
715
717
  }
716
718
  //#endregion
717
719
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/IcmpSection.tsx
718
- function fe({ form: e, disabled: t = !1 }) {
719
- let { i18n: n, _: r } = H();
720
- return /*#__PURE__*/ F(p, {
720
+ function _e({ form: e, disabled: t = !1 }) {
721
+ let { i18n: n, _: r } = q();
722
+ return /*#__PURE__*/ z(p, {
721
723
  className: "mb-6",
722
- children: /*#__PURE__*/ I("div", {
724
+ children: /*#__PURE__*/ B("div", {
723
725
  className: "flex w-full gap-4",
724
- children: [/*#__PURE__*/ F(e.Field, {
726
+ children: [/*#__PURE__*/ z(e.Field, {
725
727
  name: "icmpType",
726
- children: (e) => /*#__PURE__*/ F("div", {
728
+ children: (e) => /*#__PURE__*/ z("div", {
727
729
  className: "flex-1",
728
- children: /*#__PURE__*/ F(l, {
730
+ children: /*#__PURE__*/ z(l, {
729
731
  id: "icmpType",
730
732
  name: "icmpType",
731
733
  label: n._({ id: "yPWFWy" }),
@@ -736,11 +738,11 @@ function fe({ form: e, disabled: t = !1 }) {
736
738
  disabled: t
737
739
  })
738
740
  })
739
- }), /*#__PURE__*/ F(e.Field, {
741
+ }), /*#__PURE__*/ z(e.Field, {
740
742
  name: "icmpCode",
741
- children: (e) => /*#__PURE__*/ F("div", {
743
+ children: (e) => /*#__PURE__*/ z("div", {
742
744
  className: "flex-1",
743
- children: /*#__PURE__*/ F(l, {
745
+ children: /*#__PURE__*/ z(l, {
744
746
  id: "icmpCode",
745
747
  name: "icmpCode",
746
748
  label: n._({ id: "76RKuS" }),
@@ -757,15 +759,15 @@ function fe({ form: e, disabled: t = !1 }) {
757
759
  }
758
760
  //#endregion
759
761
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/RemoteSourceSection.tsx
760
- function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
761
- let { i18n: r, _: i } = H();
762
- return /*#__PURE__*/ I(P, { children: [
763
- /*#__PURE__*/ F(e.Field, {
762
+ function ve({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
763
+ let { i18n: r, _: i } = q();
764
+ return /*#__PURE__*/ B(R, { children: [
765
+ /*#__PURE__*/ z(e.Field, {
764
766
  name: "remoteSourceType",
765
767
  mode: "value",
766
- children: (n) => /*#__PURE__*/ F(p, {
768
+ children: (n) => /*#__PURE__*/ z(p, {
767
769
  className: "mb-1",
768
- children: /*#__PURE__*/ F(_, {
770
+ children: /*#__PURE__*/ z(v, {
769
771
  name: "remoteSourceType",
770
772
  label: r._({ id: "I5kZVK" }),
771
773
  selected: n.state.value,
@@ -774,12 +776,12 @@ function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
774
776
  n.handleChange(r), r !== "security_group" && e.setFieldValue("ethertype", "IPv4");
775
777
  },
776
778
  disabled: t,
777
- children: /*#__PURE__*/ I("div", {
779
+ children: /*#__PURE__*/ B("div", {
778
780
  className: "flex gap-4",
779
- children: [/*#__PURE__*/ F(x, {
781
+ children: [/*#__PURE__*/ z(C, {
780
782
  value: "cidr",
781
783
  label: r._({ id: "4uXhtt" })
782
- }), /*#__PURE__*/ F(x, {
784
+ }), /*#__PURE__*/ z(C, {
783
785
  value: "security_group",
784
786
  label: r._({ id: "bwhBhT" })
785
787
  })]
@@ -787,45 +789,45 @@ function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
787
789
  })
788
790
  })
789
791
  }),
790
- /*#__PURE__*/ F(e.Field, {
792
+ /*#__PURE__*/ z(e.Field, {
791
793
  name: "remoteSourceType",
792
- children: (n) => n.state.value === "cidr" ? /*#__PURE__*/ F(e.Field, {
794
+ children: (n) => n.state.value === "cidr" ? /*#__PURE__*/ z(e.Field, {
793
795
  name: "remoteCidr",
794
- children: (n) => /*#__PURE__*/ F(e.Field, {
796
+ children: (n) => /*#__PURE__*/ z(e.Field, {
795
797
  name: "ethertype",
796
- children: (e) => /*#__PURE__*/ F(p, {
798
+ children: (e) => /*#__PURE__*/ z(p, {
797
799
  className: "mb-6",
798
- children: /*#__PURE__*/ F(l, {
800
+ children: /*#__PURE__*/ z(l, {
799
801
  id: "remoteCidr",
800
802
  name: "remoteCidr",
801
803
  label: r._({ id: "vmYyLY" }),
802
804
  value: n.state.value,
803
805
  onChange: (e) => n.handleChange(e.target.value),
804
806
  errortext: n.state.meta.errors[0]?.message,
805
- placeholder: e.state.value === "IPv4" ? Z : re,
807
+ placeholder: e.state.value === "IPv4" ? oe : se,
806
808
  disabled: t
807
809
  })
808
810
  })
809
811
  })
810
812
  }) : null
811
813
  }),
812
- /*#__PURE__*/ F(e.Field, {
814
+ /*#__PURE__*/ z(e.Field, {
813
815
  name: "remoteSourceType",
814
- children: (i) => i.state.value === "security_group" ? /*#__PURE__*/ F(e.Field, {
816
+ children: (i) => i.state.value === "security_group" ? /*#__PURE__*/ z(e.Field, {
815
817
  name: "remoteSecurityGroupId",
816
- children: (e) => /*#__PURE__*/ F(p, {
818
+ children: (e) => /*#__PURE__*/ z(p, {
817
819
  className: "mb-6",
818
- children: /*#__PURE__*/ I(m, {
820
+ children: /*#__PURE__*/ B(h, {
819
821
  id: "remoteSecurityGroupId",
820
822
  label: r._({ id: "i9TIyi" }),
821
823
  value: e.state.value,
822
824
  onChange: (t) => e.handleChange(String(t)),
823
825
  errortext: e.state.meta.errors[0]?.message,
824
826
  disabled: t,
825
- children: [/*#__PURE__*/ F(v, {
827
+ children: [/*#__PURE__*/ z(y, {
826
828
  value: "",
827
829
  label: r._({ id: "ZvIpwi" })
828
- }), n.map((e) => /*#__PURE__*/ F(v, {
830
+ }), n.map((e) => /*#__PURE__*/ z(y, {
829
831
  value: e.id,
830
832
  label: e.name || e.id
831
833
  }, e.id))]
@@ -837,13 +839,13 @@ function pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
837
839
  }
838
840
  //#endregion
839
841
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/DescriptionSection.tsx
840
- function me({ form: e, disabled: t = !1 }) {
841
- let { i18n: n, _: r } = H();
842
- return /*#__PURE__*/ F(e.Field, {
842
+ function ye({ form: e, disabled: t = !1 }) {
843
+ let { i18n: n, _: r } = q();
844
+ return /*#__PURE__*/ z(e.Field, {
843
845
  name: "description",
844
- children: (e) => /*#__PURE__*/ F(p, {
846
+ children: (e) => /*#__PURE__*/ z(p, {
845
847
  className: "mb-0",
846
- children: /*#__PURE__*/ F(h, {
848
+ children: /*#__PURE__*/ z(g, {
847
849
  id: "description",
848
850
  name: "description",
849
851
  label: n._({ id: "Nu4oKW" }),
@@ -858,10 +860,10 @@ function me({ form: e, disabled: t = !1 }) {
858
860
  }
859
861
  //#endregion
860
862
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/AddRuleModal.tsx
861
- var he = ({ securityGroupId: e, open: n, onClose: r, onCreate: o, isLoading: s = !1, error: c = null, availableSecurityGroups: l = [] }) => {
862
- let { i18n: u, _: d } = H(), f = W({
863
- defaultValues: oe,
864
- validators: { onSubmit: ae },
863
+ var be = ({ securityGroupId: e, open: n, onClose: r, onCreate: o, isLoading: s = !1, error: c = null, availableSecurityGroups: l = [] }) => {
864
+ let { i18n: u, _: d } = q(), f = Y({
865
+ defaultValues: ue,
866
+ validators: { onSubmit: le },
865
867
  onSubmit: async ({ value: t }) => {
866
868
  if (s) return;
867
869
  let n = {
@@ -883,84 +885,84 @@ var he = ({ securityGroupId: e, open: n, onClose: r, onCreate: o, isLoading: s =
883
885
  }), p = () => {
884
886
  f.reset(), r();
885
887
  };
886
- return /*#__PURE__*/ I(S, {
888
+ return /*#__PURE__*/ B(w, {
887
889
  open: n,
888
890
  onCancel: p,
889
891
  size: "large",
890
892
  title: u._({ id: "b2BLBa" }),
891
- modalFooter: /*#__PURE__*/ F(g, {
893
+ modalFooter: /*#__PURE__*/ z(_, {
892
894
  className: "flex justify-end",
893
- children: /*#__PURE__*/ F(f.Subscribe, { children: (e) => {
895
+ children: /*#__PURE__*/ z(f.Subscribe, { children: (e) => {
894
896
  let t = !!e.values.ruleType;
895
- return /*#__PURE__*/ I(T, { children: [/*#__PURE__*/ F(E, {
897
+ return /*#__PURE__*/ B(D, { children: [/*#__PURE__*/ z(O, {
896
898
  variant: "default",
897
899
  onClick: p,
898
900
  disabled: s || e.isSubmitting,
899
- children: /*#__PURE__*/ F(V, { id: "dEgA5A" })
900
- }), /*#__PURE__*/ F(E, {
901
+ children: /*#__PURE__*/ z(K, { id: "dEgA5A" })
902
+ }), /*#__PURE__*/ z(O, {
901
903
  variant: "primary",
902
904
  type: "button",
903
905
  onClick: () => f.handleSubmit(),
904
906
  disabled: s || e.isSubmitting || !t,
905
907
  "data-testid": "add-rule-button",
906
- children: e.isSubmitting || s ? /*#__PURE__*/ F(a, { size: "small" }) : /*#__PURE__*/ F(V, { id: "bmQLn5" })
908
+ children: e.isSubmitting || s ? /*#__PURE__*/ z(a, { size: "small" }) : /*#__PURE__*/ z(K, { id: "bmQLn5" })
907
909
  })] });
908
910
  } })
909
911
  }),
910
912
  children: [
911
- c && /*#__PURE__*/ F(t, {
913
+ c && /*#__PURE__*/ z(t, {
912
914
  dismissible: !1,
913
915
  variant: "error",
914
916
  className: "mb-4",
915
917
  children: c
916
918
  }),
917
- s && /*#__PURE__*/ I("div", {
919
+ s && /*#__PURE__*/ B("div", {
918
920
  className: "mb-4 flex items-center justify-center gap-2",
919
- children: [/*#__PURE__*/ F(a, { variant: "primary" }), /*#__PURE__*/ F("span", {
921
+ children: [/*#__PURE__*/ z(a, { variant: "primary" }), /*#__PURE__*/ z("span", {
920
922
  className: "text-theme-secondary text-sm",
921
- children: /*#__PURE__*/ F(V, { id: "gU7JFm" })
923
+ children: /*#__PURE__*/ z(K, { id: "gU7JFm" })
922
924
  })]
923
925
  }),
924
- /*#__PURE__*/ F(b, {
926
+ /*#__PURE__*/ z(S, {
925
927
  className: "mb-6",
926
928
  onSubmit: (e) => {
927
929
  e.preventDefault(), f.handleSubmit();
928
930
  },
929
- children: /*#__PURE__*/ I(i, {
931
+ children: /*#__PURE__*/ B(i, {
930
932
  className: "mb-6",
931
- children: [/*#__PURE__*/ F(se, {
933
+ children: [/*#__PURE__*/ z(fe, {
932
934
  form: f,
933
935
  disabled: s
934
- }), /*#__PURE__*/ F(f.Subscribe, { children: (e) => {
936
+ }), /*#__PURE__*/ z(f.Subscribe, { children: (e) => {
935
937
  if (!e.values.ruleType) return null;
936
938
  let t = (e.values.protocol === "tcp" || e.values.protocol === "udp") && ["custom-tcp", "custom-udp"].includes(e.values.ruleType), n = e.values.protocol === "icmp" || e.values.protocol === "ipv6-icmp";
937
- return /*#__PURE__*/ I(P, { children: [
938
- /*#__PURE__*/ F(ce, {
939
+ return /*#__PURE__*/ B(R, { children: [
940
+ /*#__PURE__*/ z(pe, {
939
941
  form: f,
940
942
  disabled: s
941
943
  }),
942
- e.values.ruleType === "other-protocol" && /*#__PURE__*/ F(ue, {
944
+ e.values.ruleType === "other-protocol" && /*#__PURE__*/ z(he, {
943
945
  form: f,
944
946
  disabled: s
945
947
  }),
946
- t && /*#__PURE__*/ F(de, {
948
+ t && /*#__PURE__*/ z(ge, {
947
949
  form: f,
948
950
  disabled: s
949
951
  }),
950
- n && /*#__PURE__*/ F(fe, {
952
+ n && /*#__PURE__*/ z(_e, {
951
953
  form: f,
952
954
  disabled: s
953
955
  }),
954
- /*#__PURE__*/ F(pe, {
956
+ /*#__PURE__*/ z(ve, {
955
957
  form: f,
956
958
  disabled: s,
957
959
  availableSecurityGroups: l
958
960
  }),
959
- e.values.remoteSourceType === "security_group" && /*#__PURE__*/ F(le, {
961
+ e.values.remoteSourceType === "security_group" && /*#__PURE__*/ z(me, {
960
962
  form: f,
961
963
  disabled: s
962
964
  }),
963
- /*#__PURE__*/ F(me, {
965
+ /*#__PURE__*/ z(ye, {
964
966
  form: f,
965
967
  disabled: s
966
968
  })
@@ -973,22 +975,24 @@ var he = ({ securityGroupId: e, open: n, onClose: r, onCreate: o, isLoading: s =
973
975
  };
974
976
  //#endregion
975
977
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupRulesTable.tsx
976
- function ge({ rules: t, totalRulesCount: i, onDeleteRule: a, isDeletingRule: s, deleteError: l, searchTerm: u = "", onSearchChange: d, sortSettings: p, onSortChange: m, filterSettings: h, onFilterChange: g, securityGroupId: _, onCreateRule: v, isCreatingRule: y = !1, createRuleError: b = null, availableSecurityGroups: x = [], readOnly: S = !1 }) {
977
- let { i18n: T, _: D } = H(), [O, k] = z(null), [M, N] = A(), R = (e) => {
978
- k(e);
979
- }, B = (e) => {
978
+ function xe({ rules: t, totalRulesCount: i, onDeleteRule: a, isDeletingRule: s, deleteError: l, searchTerm: u = "", onSearchChange: d, sortSettings: p, onSortChange: h, filterSettings: g, onFilterChange: _, securityGroupId: v, onCreateRule: y, isCreatingRule: x = !1, createRuleError: S = null, availableSecurityGroups: C = [], canCreateRule: w, canDeleteRule: D }) {
979
+ let { i18n: k, _: A } = q(), [j, I] = W(null), [L, ee] = M(), [H, G] = W(u), J = U(void 0);
980
+ V(() => () => clearTimeout(J.current), []);
981
+ let Y = (e) => {
982
+ I(e);
983
+ }, X = (e) => {
980
984
  a(e);
981
- }, U = () => {
982
- s || k(null);
985
+ }, te = () => {
986
+ s || I(null);
983
987
  };
984
- L(() => {
985
- !s && !l && k(null);
988
+ V(() => {
989
+ !s && !l && I(null);
986
990
  }, [s, l]);
987
- let W = (e) => {
991
+ let Z = (e) => {
988
992
  if (e.protocol === "icmp" || e.protocol === "ipv6-icmp") {
989
993
  if (e.port_range_min !== null && e.port_range_max !== null) {
990
994
  let t = e.port_range_min, n = e.port_range_max;
991
- return T._({
995
+ return k._({
992
996
  id: "0p+s6m",
993
997
  values: {
994
998
  typeValue: t,
@@ -996,91 +1000,161 @@ function ge({ rules: t, totalRulesCount: i, onDeleteRule: a, isDeletingRule: s,
996
1000
  }
997
1001
  });
998
1002
  }
999
- return T._({ id: "eKC+EC" });
1003
+ return k._({ id: "eKC+EC" });
1000
1004
  }
1001
- return e.port_range_min === null || e.port_range_max === null ? T._({ id: "eKC+EC" }) : e.port_range_min === e.port_range_max ? String(e.port_range_min) : `${e.port_range_min}-${e.port_range_max}`;
1002
- };
1003
- return /*#__PURE__*/ I(P, { children: [
1004
- /*#__PURE__*/ I(w, {
1005
+ return e.port_range_min === null || e.port_range_max === null ? k._({ id: "eKC+EC" }) : e.port_range_min === e.port_range_max ? String(e.port_range_min) : `${e.port_range_min}-${e.port_range_max}`;
1006
+ }, Q = t.length, $ = i;
1007
+ return /*#__PURE__*/ B(R, { children: [
1008
+ /*#__PURE__*/ B(E, {
1005
1009
  direction: "vertical",
1006
1010
  gap: "4",
1007
- children: [/*#__PURE__*/ F(j, {
1008
- totalCount: i ?? t.length,
1009
- filteredCount: t.length,
1010
- itemName: T._({ id: "j9hkgJ" }),
1011
- filterSettings: h,
1012
- onFilter: g,
1013
- sortSettings: p,
1014
- onSort: m,
1015
- searchTerm: u,
1016
- onSearch: d,
1017
- actions: !S && v && /*#__PURE__*/ F(E, {
1018
- variant: "primary",
1019
- icon: "addCircle",
1020
- onClick: N,
1021
- children: /*#__PURE__*/ F(V, { id: "O8tK4v" })
1022
- })
1023
- }), t.length === 0 ? /*#__PURE__*/ F(V, { id: "nnxwBn" }) : /*#__PURE__*/ I(o, {
1024
- columns: S ? 5 : 6,
1025
- className: "security-group-rules-table",
1026
- children: [/*#__PURE__*/ I(n, { children: [
1027
- /*#__PURE__*/ F(c, { children: T._({ id: "MRB7nI" }) }),
1028
- /*#__PURE__*/ F(c, { children: T._({ id: "Nu4oKW" }) }),
1029
- /*#__PURE__*/ F(c, { children: T._({ id: "yp0UjB" }) }),
1030
- /*#__PURE__*/ F(c, { children: T._({ id: "6+OdGi" }) }),
1031
- /*#__PURE__*/ F(c, { children: T._({ id: "6jAi8c" }) }),
1032
- !S && /*#__PURE__*/ F(c, { children: T._({ id: "7L01XJ" }) })
1033
- ] }), t.map((t) => /*#__PURE__*/ I(n, {
1034
- "data-testid": `rule-row-${t.id}`,
1035
- children: [
1036
- /*#__PURE__*/ F(r, { children: t.direction || T._({ id: "h47p9L" }) }),
1037
- /*#__PURE__*/ F(r, { children: t.description || T._({ id: "h47p9L" }) }),
1038
- /*#__PURE__*/ F(r, { children: t.ethertype }),
1039
- /*#__PURE__*/ F(r, { children: t.protocol || T._({ id: "eKC+EC" }) }),
1040
- /*#__PURE__*/ F(r, { children: W(t) }),
1041
- !S && /*#__PURE__*/ F(r, {
1042
- onClick: (e) => e.stopPropagation(),
1043
- className: "items-end justify-end pr-0",
1044
- children: /*#__PURE__*/ F(C, { children: /*#__PURE__*/ F(e, { children: /*#__PURE__*/ F(f, {
1045
- label: T._({ id: "cnGeoo" }),
1046
- onClick: () => R(t)
1047
- }) }) })
1011
+ children: [
1012
+ /*#__PURE__*/ B(E, {
1013
+ distribution: "between",
1014
+ alignment: "center",
1015
+ gap: "2",
1016
+ className: "pb-2",
1017
+ children: [/*#__PURE__*/ z("span", {
1018
+ className: "theme-color-text-light text-sm",
1019
+ children: $ !== void 0 && Q !== $ ? /*#__PURE__*/ z(K, {
1020
+ id: "xuVMLX",
1021
+ values: {
1022
+ rulesLength: Q,
1023
+ totalCount: $
1024
+ }
1025
+ }) : /*#__PURE__*/ z(K, {
1026
+ id: "UHciG3",
1027
+ values: { rulesLength: Q }
1048
1028
  })
1049
- ]
1050
- }, t.id))]
1051
- })]
1029
+ }), /*#__PURE__*/ B(E, {
1030
+ gap: "2",
1031
+ children: [p && h && /*#__PURE__*/ z(N, {
1032
+ options: p.options,
1033
+ sortBy: p.sortBy,
1034
+ sortDirection: p.sortDirection ?? "asc",
1035
+ onSortByChange: (e) => h({
1036
+ ...p,
1037
+ sortBy: e,
1038
+ sortDirection: p.sortDirection
1039
+ }),
1040
+ onSortDirectionChange: (e) => h({
1041
+ ...p,
1042
+ sortDirection: e
1043
+ })
1044
+ }), w && y && /*#__PURE__*/ z(O, {
1045
+ variant: "primary",
1046
+ icon: "addCircle",
1047
+ onClick: ee,
1048
+ className: "whitespace-nowrap",
1049
+ children: /*#__PURE__*/ z(K, { id: "O8tK4v" })
1050
+ })]
1051
+ })]
1052
+ }),
1053
+ (g || d) && /*#__PURE__*/ z(m, { children: /*#__PURE__*/ B(E, {
1054
+ direction: "vertical",
1055
+ gap: "2",
1056
+ children: [/*#__PURE__*/ B(E, {
1057
+ distribution: "between",
1058
+ alignment: "center",
1059
+ children: [g && _ && /*#__PURE__*/ z(F, {
1060
+ filters: g.filters,
1061
+ onChange: (e) => {
1062
+ if ((g.selectedFilters || []).some((t) => t.name === e.name && t.value === e.value)) return;
1063
+ let t = g.filters.find((t) => t.filterName === e.name)?.supportsMultiValue ? [...g.selectedFilters || [], e] : [...(g.selectedFilters || []).filter((t) => t.name !== e.name), e];
1064
+ _({
1065
+ ...g,
1066
+ selectedFilters: t
1067
+ });
1068
+ }
1069
+ }), d && /*#__PURE__*/ z(b, {
1070
+ placeholder: k._({ id: "HMV+cw" }),
1071
+ "data-testid": "searchbar",
1072
+ value: H,
1073
+ onInput: (e) => {
1074
+ let t = e.currentTarget.value;
1075
+ G(t), clearTimeout(J.current), J.current = window.setTimeout(() => d(t), 500);
1076
+ },
1077
+ onSearch: (e) => {
1078
+ clearTimeout(J.current), d(typeof e == "string" ? e : "");
1079
+ },
1080
+ onClear: () => {
1081
+ clearTimeout(J.current), G(""), d("");
1082
+ }
1083
+ })]
1084
+ }), g?.selectedFilters && g.selectedFilters.length > 0 && /*#__PURE__*/ z(P, {
1085
+ selectedFilters: g.selectedFilters,
1086
+ onDelete: (e) => _?.({
1087
+ ...g,
1088
+ selectedFilters: (g.selectedFilters || []).filter((t) => !(t.name === e.name && t.value === e.value))
1089
+ }),
1090
+ onClear: () => _?.({
1091
+ ...g,
1092
+ selectedFilters: []
1093
+ })
1094
+ })]
1095
+ }) }),
1096
+ t.length === 0 ? /*#__PURE__*/ z(K, { id: "nnxwBn" }) : /*#__PURE__*/ B(o, {
1097
+ columns: D ? 6 : 5,
1098
+ className: "security-group-rules-table",
1099
+ children: [/*#__PURE__*/ B(n, { children: [
1100
+ /*#__PURE__*/ z(c, { children: k._({ id: "MRB7nI" }) }),
1101
+ /*#__PURE__*/ z(c, { children: k._({ id: "Nu4oKW" }) }),
1102
+ /*#__PURE__*/ z(c, { children: k._({ id: "yp0UjB" }) }),
1103
+ /*#__PURE__*/ z(c, { children: k._({ id: "6+OdGi" }) }),
1104
+ /*#__PURE__*/ z(c, { children: k._({ id: "6jAi8c" }) }),
1105
+ D && /*#__PURE__*/ z(c, { children: k._({ id: "7L01XJ" }) })
1106
+ ] }), t.map((t) => /*#__PURE__*/ B(n, {
1107
+ "data-testid": `rule-row-${t.id}`,
1108
+ children: [
1109
+ /*#__PURE__*/ z(r, { children: t.direction || k._({ id: "h47p9L" }) }),
1110
+ /*#__PURE__*/ z(r, { children: t.description || k._({ id: "h47p9L" }) }),
1111
+ /*#__PURE__*/ z(r, { children: t.ethertype }),
1112
+ /*#__PURE__*/ z(r, { children: t.protocol || k._({ id: "eKC+EC" }) }),
1113
+ /*#__PURE__*/ z(r, { children: Z(t) }),
1114
+ D && /*#__PURE__*/ z(r, {
1115
+ onClick: (e) => e.stopPropagation(),
1116
+ className: "items-end justify-end pr-0",
1117
+ children: /*#__PURE__*/ z(T, { children: /*#__PURE__*/ z(e, { children: /*#__PURE__*/ z(f, {
1118
+ label: k._({ id: "cnGeoo" }),
1119
+ onClick: () => Y(t)
1120
+ }) }) })
1121
+ })
1122
+ ]
1123
+ }, t.id))]
1124
+ })
1125
+ ]
1052
1126
  }),
1053
- !S && /*#__PURE__*/ F(Y, {
1054
- rule: O,
1055
- open: !!O,
1056
- onClose: U,
1057
- onConfirm: B,
1127
+ D && /*#__PURE__*/ z(ne, {
1128
+ rule: j,
1129
+ open: !!j,
1130
+ onClose: te,
1131
+ onConfirm: X,
1058
1132
  isLoading: s,
1059
1133
  error: l
1060
1134
  }),
1061
- !S && _ && v && M && /*#__PURE__*/ F(he, {
1062
- securityGroupId: _,
1063
- open: M,
1064
- onClose: N,
1065
- onCreate: v,
1066
- isLoading: y,
1067
- error: b,
1068
- availableSecurityGroups: x
1135
+ w && v && y && L && /*#__PURE__*/ z(be, {
1136
+ securityGroupId: v,
1137
+ open: L,
1138
+ onClose: ee,
1139
+ onCreate: y,
1140
+ isLoading: x,
1141
+ error: S,
1142
+ availableSecurityGroups: C
1069
1143
  })
1070
1144
  ] });
1071
1145
  }
1072
1146
  //#endregion
1073
1147
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/RBACPolicyRow.tsx
1074
- function _e({ policy: t, onDelete: i }) {
1075
- let { i18n: a, _: o } = H();
1076
- return /*#__PURE__*/ I(n, { children: [
1077
- /*#__PURE__*/ F(r, { children: t.target_tenant }),
1078
- /*#__PURE__*/ F(r, { children: t.action }),
1079
- /*#__PURE__*/ F(r, {
1148
+ function Se({ policy: t, onDelete: i, canDelete: a }) {
1149
+ let { i18n: o, _: s } = q();
1150
+ return /*#__PURE__*/ B(n, { children: [
1151
+ /*#__PURE__*/ z(r, { children: t.target_tenant }),
1152
+ /*#__PURE__*/ z(r, { children: t.action }),
1153
+ /*#__PURE__*/ z(r, {
1080
1154
  onClick: (e) => e.stopPropagation(),
1081
1155
  className: "items-end justify-end pr-0",
1082
- children: /*#__PURE__*/ F(C, { children: /*#__PURE__*/ F(e, { children: /*#__PURE__*/ F(f, {
1083
- label: a._({ id: "t/YqKh" }),
1156
+ children: a && /*#__PURE__*/ z(T, { children: /*#__PURE__*/ z(e, { children: /*#__PURE__*/ z(f, {
1157
+ label: o._({ id: "t/YqKh" }),
1084
1158
  onClick: i
1085
1159
  }) }) })
1086
1160
  })
@@ -1088,12 +1162,12 @@ function _e({ policy: t, onDelete: i }) {
1088
1162
  }
1089
1163
  //#endregion
1090
1164
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRBACPolicyModal.tsx
1091
- var ve = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, ye = /^[0-9a-f]{32}$/i;
1092
- function $(e) {
1093
- return ve.test(e) || ye.test(e);
1165
+ var Ce = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, we = /^[0-9a-f]{32}$/i;
1166
+ function Te(e) {
1167
+ return Ce.test(e) || we.test(e);
1094
1168
  }
1095
- function be({ isOpen: e, onClose: n, securityGroupId: r }) {
1096
- let { i18n: a, _: o } = H(), s = D.useUtils(), c = k(), [u, d] = z(!1), f = U.object({ targetTenant: U.string().min(1, a._({ id: "1RwosK" })).refine($, { message: a._({ id: "CunRry" }) }) }), p = D.network.rbacPolicy.create.useMutation({ onSuccess: () => {
1169
+ function Ee({ isOpen: e, onClose: n, securityGroupId: r }) {
1170
+ let { i18n: a, _: o } = q(), s = k.useUtils(), c = j(), [u, d] = W(!1), f = J.object({ targetTenant: J.string().min(1, a._({ id: "1RwosK" })).refine(Te, { message: a._({ id: "CunRry" }) }) }), p = k.network.rbacPolicy.create.useMutation({ onSuccess: () => {
1097
1171
  s.network.rbacPolicy.list.invalidate({
1098
1172
  project_id: c,
1099
1173
  securityGroupId: r
@@ -1101,7 +1175,7 @@ function be({ isOpen: e, onClose: n, securityGroupId: r }) {
1101
1175
  project_id: c,
1102
1176
  securityGroupId: r
1103
1177
  }), h();
1104
- } }), m = W({
1178
+ } }), m = Y({
1105
1179
  defaultValues: { targetTenant: "" },
1106
1180
  validators: { onSubmit: f },
1107
1181
  onSubmit: async ({ value: e }) => {
@@ -1116,7 +1190,7 @@ function be({ isOpen: e, onClose: n, securityGroupId: r }) {
1116
1190
  }, g = async () => {
1117
1191
  d(!0), await m.handleSubmit();
1118
1192
  };
1119
- return /*#__PURE__*/ I(S, {
1193
+ return /*#__PURE__*/ B(w, {
1120
1194
  open: e,
1121
1195
  onCancel: h,
1122
1196
  title: a._({ id: "vmRPFm" }),
@@ -1126,7 +1200,7 @@ function be({ isOpen: e, onClose: n, securityGroupId: r }) {
1126
1200
  confirmButtonLabel: a._({ id: "Z8lGw6" }),
1127
1201
  disableConfirmButton: p.isPending,
1128
1202
  children: [
1129
- p.error && /*#__PURE__*/ F(t, {
1203
+ p.error && /*#__PURE__*/ z(t, {
1130
1204
  variant: "error",
1131
1205
  className: "mb-4",
1132
1206
  children: (() => {
@@ -1134,33 +1208,33 @@ function be({ isOpen: e, onClose: n, securityGroupId: r }) {
1134
1208
  return e.includes("conflict") || e.includes("409") ? a._({ id: "rbuO5A" }) : e.includes("not found") || e.includes("404") ? a._({ id: "FwSyEp" }) : e.includes("forbidden") || e.includes("403") ? a._({ id: "kqJVBO" }) : p.error.message;
1135
1209
  })()
1136
1210
  }),
1137
- /*#__PURE__*/ F("p", {
1211
+ /*#__PURE__*/ z("p", {
1138
1212
  className: "mb-4",
1139
- children: /*#__PURE__*/ F(V, { id: "cjEOmc" })
1213
+ children: /*#__PURE__*/ z(K, { id: "cjEOmc" })
1140
1214
  }),
1141
- /*#__PURE__*/ F(b, {
1215
+ /*#__PURE__*/ z(S, {
1142
1216
  className: "mb-0",
1143
1217
  onSubmit: (e) => {
1144
1218
  e.preventDefault(), g();
1145
1219
  },
1146
- children: /*#__PURE__*/ F(i, { children: /*#__PURE__*/ F(m.Field, {
1220
+ children: /*#__PURE__*/ z(i, { children: /*#__PURE__*/ z(m.Field, {
1147
1221
  name: "targetTenant",
1148
1222
  validators: {
1149
1223
  onBlur: ({ value: e }) => {
1150
1224
  let t = e.trim();
1151
1225
  if (!t) return a._({ id: "1RwosK" });
1152
- if (!$(t)) return a._({ id: "CunRry" });
1226
+ if (!Te(t)) return a._({ id: "CunRry" });
1153
1227
  },
1154
1228
  onChange: ({ value: e }) => {
1155
1229
  if (!u) return;
1156
1230
  let t = e.trim();
1157
1231
  if (!t) return a._({ id: "1RwosK" });
1158
- if (!$(t)) return a._({ id: "CunRry" });
1232
+ if (!Te(t)) return a._({ id: "CunRry" });
1159
1233
  }
1160
1234
  },
1161
1235
  children: (e) => {
1162
1236
  let t = (e.state.meta.isTouched || u) && e.state.meta.errors.length > 0, n = e.state.meta.errors[0], r = t ? typeof n == "string" ? n : n?.message : void 0;
1163
- return /*#__PURE__*/ F(l, {
1237
+ return /*#__PURE__*/ z(l, {
1164
1238
  id: e.name,
1165
1239
  name: e.name,
1166
1240
  label: a._({ id: "WzVwU0" }),
@@ -1182,17 +1256,17 @@ function be({ isOpen: e, onClose: n, securityGroupId: r }) {
1182
1256
  }
1183
1257
  //#endregion
1184
1258
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/DeleteRBACPolicyDialog.tsx
1185
- function xe({ policy: e, open: n, onClose: r, onConfirm: a, isLoading: o, error: s }) {
1186
- let { i18n: c, _: u } = H(), d = W({
1259
+ function De({ policy: e, open: n, onClose: r, onConfirm: a, isLoading: o, error: s }) {
1260
+ let { i18n: c, _: u } = q(), d = Y({
1187
1261
  defaultValues: { confirmText: "" },
1188
- validators: { onSubmit: U.object({ confirmText: U.string().refine((e) => e === "remove", { message: c._({ id: "SVLToM" }) }) }) },
1262
+ validators: { onSubmit: J.object({ confirmText: J.string().refine((e) => e === "remove", { message: c._({ id: "SVLToM" }) }) }) },
1189
1263
  onSubmit: async () => {
1190
1264
  o || (a(e.id), p());
1191
1265
  }
1192
- }), f = G(d.store, (e) => e.isSubmitting || e.values.confirmText !== "remove"), p = () => {
1266
+ }), f = X(d.store, (e) => e.isSubmitting || e.values.confirmText !== "remove"), p = () => {
1193
1267
  d.reset(), r();
1194
1268
  };
1195
- return /*#__PURE__*/ F(S, {
1269
+ return /*#__PURE__*/ z(w, {
1196
1270
  open: n,
1197
1271
  onCancel: p,
1198
1272
  size: "small",
@@ -1201,54 +1275,54 @@ function xe({ policy: e, open: n, onClose: r, onConfirm: a, isLoading: o, error:
1201
1275
  cancelButtonLabel: c._({ id: "dEgA5A" }),
1202
1276
  confirmButtonLabel: o ? c._({ id: "M5RhXF" }) : c._({ id: "qh5W8q" }),
1203
1277
  disableConfirmButton: o || f,
1204
- children: /*#__PURE__*/ I("div", { children: [
1205
- s && /*#__PURE__*/ F(t, {
1278
+ children: /*#__PURE__*/ B("div", { children: [
1279
+ s && /*#__PURE__*/ z(t, {
1206
1280
  dismissible: !1,
1207
1281
  variant: "error",
1208
1282
  className: "mt-4",
1209
1283
  children: s
1210
1284
  }),
1211
- /*#__PURE__*/ F(V, { id: "BMTd81" }),
1212
- /*#__PURE__*/ I("div", {
1285
+ /*#__PURE__*/ z(K, { id: "BMTd81" }),
1286
+ /*#__PURE__*/ B("div", {
1213
1287
  className: "bg-theme-background-lvl-1 mt-4 mb-4 rounded p-4",
1214
- children: [/*#__PURE__*/ F("p", {
1288
+ children: [/*#__PURE__*/ z("p", {
1215
1289
  className: "mb-2 font-semibold",
1216
- children: /*#__PURE__*/ F(V, { id: "nLvo6K" })
1217
- }), /*#__PURE__*/ I("ul", {
1290
+ children: /*#__PURE__*/ z(K, { id: "nLvo6K" })
1291
+ }), /*#__PURE__*/ B("ul", {
1218
1292
  className: "list-inside list-disc space-y-1 text-sm",
1219
1293
  children: [
1220
- /*#__PURE__*/ I("li", { children: [
1221
- /*#__PURE__*/ F(V, { id: "WzVwU0" }),
1294
+ /*#__PURE__*/ B("li", { children: [
1295
+ /*#__PURE__*/ z(K, { id: "WzVwU0" }),
1222
1296
  ": ",
1223
1297
  e.target_tenant
1224
1298
  ] }),
1225
- /*#__PURE__*/ I("li", { children: [
1226
- /*#__PURE__*/ F(V, { id: "bwRvnp" }),
1299
+ /*#__PURE__*/ B("li", { children: [
1300
+ /*#__PURE__*/ z(K, { id: "bwRvnp" }),
1227
1301
  ": ",
1228
1302
  e.action
1229
1303
  ] }),
1230
- /*#__PURE__*/ I("li", { children: [
1231
- /*#__PURE__*/ F(V, { id: "UGhVPl" }),
1304
+ /*#__PURE__*/ B("li", { children: [
1305
+ /*#__PURE__*/ z(K, { id: "UGhVPl" }),
1232
1306
  ": ",
1233
1307
  e.object_type
1234
1308
  ] })
1235
1309
  ]
1236
1310
  })]
1237
1311
  }),
1238
- !o && /*#__PURE__*/ F(b, {
1312
+ !o && /*#__PURE__*/ z(S, {
1239
1313
  className: "mt-4 mb-0",
1240
1314
  onSubmit: (e) => {
1241
1315
  e.preventDefault(), d.handleSubmit();
1242
1316
  },
1243
- children: /*#__PURE__*/ I(i, { children: [/*#__PURE__*/ F("p", {
1317
+ children: /*#__PURE__*/ B(i, { children: [/*#__PURE__*/ z("p", {
1244
1318
  className: "mb-2 text-sm",
1245
- children: /*#__PURE__*/ F(V, {
1319
+ children: /*#__PURE__*/ z(K, {
1246
1320
  id: "Enpdmy",
1247
- components: { 0: /*#__PURE__*/ F("strong", {}) }
1321
+ components: { 0: /*#__PURE__*/ z("strong", {}) }
1248
1322
  })
1249
- }), /*#__PURE__*/ F(d.Field, {
1323
+ }), /*#__PURE__*/ z(d.Field, {
1250
1324
  name: "confirmText",
1251
- children: (e) => /*#__PURE__*/ F(l, {
1325
+ children: (e) => /*#__PURE__*/ z(l, {
1252
1326
  id: e.name,
1253
1327
  name: e.name,
1254
1328
  value: e.state.value,
@@ -1265,126 +1339,161 @@ function xe({ policy: e, open: n, onClose: r, onConfirm: a, isLoading: o, error:
1265
1339
  }
1266
1340
  //#endregion
1267
1341
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupRBACPolicies.tsx
1268
- function Se({ securityGroupId: e }) {
1269
- let r = D.useUtils(), { i18n: i, _: s } = H(), l = k(), [u, d] = A(), [f, p] = z(null), [m, h] = z(""), { data: g, isPending: _, isError: v, error: y } = D.network.rbacPolicy.list.useQuery({
1270
- project_id: l,
1342
+ function Oe({ securityGroupId: e, canManageAccess: r }) {
1343
+ let i = k.useUtils(), { i18n: s, _: l } = q(), u = j(), [d, f] = M(), [p, h] = W(null), [g, _] = W(""), [v, y] = W(""), x = U(void 0);
1344
+ V(() => () => clearTimeout(x.current), []);
1345
+ let { data: S, isPending: C, isError: w, error: T } = k.network.rbacPolicy.list.useQuery({
1346
+ project_id: u,
1271
1347
  securityGroupId: e
1272
- }, { refetchOnWindowFocus: !1 }), b = D.network.rbacPolicy.delete.useMutation({ onSuccess: () => {
1273
- r.network.rbacPolicy.list.invalidate({
1274
- project_id: l,
1348
+ }, { refetchOnWindowFocus: !1 }), D = k.network.rbacPolicy.delete.useMutation({ onSuccess: () => {
1349
+ i.network.rbacPolicy.list.invalidate({
1350
+ project_id: u,
1275
1351
  securityGroupId: e
1276
- }), r.network.securityGroup.getById.invalidate({
1277
- project_id: l,
1352
+ }), i.network.securityGroup.getById.invalidate({
1353
+ project_id: u,
1278
1354
  securityGroupId: e
1279
1355
  });
1280
- } }), x = (e) => {
1281
- p(e);
1282
- }, S = (e) => {
1283
- b.mutate({
1284
- project_id: l,
1356
+ } }), A = (e) => {
1357
+ h(e);
1358
+ }, N = (e) => {
1359
+ D.mutate({
1360
+ project_id: u,
1285
1361
  policyId: e
1286
1362
  });
1287
- }, C = () => {
1288
- b.isPending || p(null);
1363
+ }, P = () => {
1364
+ D.isPending || h(null);
1289
1365
  };
1290
- L(() => {
1291
- !b.isPending && !b.error && b.isSuccess && p(null);
1366
+ V(() => {
1367
+ !D.isPending && !D.error && D.isSuccess && h(null);
1292
1368
  }, [
1293
- b.isPending,
1294
- b.error,
1295
- b.isSuccess
1369
+ D.isPending,
1370
+ D.error,
1371
+ D.isSuccess
1296
1372
  ]);
1297
- let T = R(() => {
1298
- if (!g) return [];
1299
- if (!m) return g;
1300
- let e = m.toLowerCase();
1301
- return g.filter((t) => t.target_tenant?.toLowerCase().includes(e) || t.action?.toLowerCase().includes(e));
1302
- }, [g, m]), O = (e) => {
1303
- h(typeof e == "string" ? e : "");
1304
- };
1305
- if (_) return /*#__PURE__*/ F(w, {
1373
+ let F = H(() => {
1374
+ if (!S) return [];
1375
+ if (!g) return S;
1376
+ let e = g.toLowerCase();
1377
+ return S.filter((t) => t.target_tenant?.toLowerCase().includes(e) || t.action?.toLowerCase().includes(e));
1378
+ }, [S, g]);
1379
+ if (C) return /*#__PURE__*/ z(E, {
1306
1380
  distribution: "center",
1307
1381
  alignment: "center",
1308
1382
  className: "py-8",
1309
- children: /*#__PURE__*/ F(a, { variant: "primary" })
1383
+ children: /*#__PURE__*/ z(a, { variant: "primary" })
1310
1384
  });
1311
- if (v) return /*#__PURE__*/ F(t, {
1385
+ if (w) return /*#__PURE__*/ z(t, {
1312
1386
  variant: "error",
1313
1387
  className: "mb-4",
1314
- children: y.message
1388
+ children: T.message
1315
1389
  });
1316
- let M = g?.length || 0, N = T.length;
1317
- return /*#__PURE__*/ I(P, { children: [
1318
- /*#__PURE__*/ I(w, {
1390
+ let I = S?.length || 0, L = F.length;
1391
+ return /*#__PURE__*/ B(R, { children: [
1392
+ /*#__PURE__*/ B(E, {
1319
1393
  direction: "vertical",
1320
1394
  gap: "4",
1321
- children: [/*#__PURE__*/ F(j, {
1322
- totalCount: M,
1323
- filteredCount: N,
1324
- itemName: i._({ id: "M9H+/G" }),
1325
- searchTerm: m,
1326
- onSearch: O,
1327
- actions: /*#__PURE__*/ F(E, {
1328
- variant: "primary",
1329
- icon: "addCircle",
1330
- onClick: d,
1331
- children: /*#__PURE__*/ F(V, { id: "vmRPFm" })
1395
+ children: [
1396
+ /*#__PURE__*/ B(E, {
1397
+ distribution: "between",
1398
+ alignment: "center",
1399
+ gap: "2",
1400
+ className: "pb-2",
1401
+ children: [/*#__PURE__*/ z("span", {
1402
+ className: "theme-color-text-light text-sm",
1403
+ children: I === L ? /*#__PURE__*/ z(K, {
1404
+ id: "xx2KP5",
1405
+ values: { totalCount: I }
1406
+ }) : /*#__PURE__*/ z(K, {
1407
+ id: "VcWhM0",
1408
+ values: {
1409
+ filteredCount: L,
1410
+ totalCount: I
1411
+ }
1412
+ })
1413
+ }), r && /*#__PURE__*/ z(O, {
1414
+ variant: "primary",
1415
+ icon: "addCircle",
1416
+ onClick: f,
1417
+ className: "whitespace-nowrap",
1418
+ children: /*#__PURE__*/ z(K, { id: "vmRPFm" })
1419
+ })]
1420
+ }),
1421
+ /*#__PURE__*/ z(m, { children: /*#__PURE__*/ z(E, {
1422
+ distribution: "between",
1423
+ alignment: "center",
1424
+ children: /*#__PURE__*/ z(b, {
1425
+ placeholder: s._({ id: "mlxk2U" }),
1426
+ "data-testid": "searchbar",
1427
+ value: v,
1428
+ onInput: (e) => {
1429
+ let t = e.currentTarget.value;
1430
+ y(t), clearTimeout(x.current), x.current = window.setTimeout(() => _(t), 500);
1431
+ },
1432
+ onSearch: (e) => {
1433
+ clearTimeout(x.current), _(typeof e == "string" ? e : "");
1434
+ },
1435
+ onClear: () => {
1436
+ clearTimeout(x.current), y(""), _("");
1437
+ }
1438
+ })
1439
+ }) }),
1440
+ L === 0 ? g ? /*#__PURE__*/ z(K, { id: "qxxo7y" }) : /*#__PURE__*/ z(K, { id: "Dia2Ue" }) : /*#__PURE__*/ B(o, {
1441
+ columns: 3,
1442
+ children: [/*#__PURE__*/ B(n, { children: [
1443
+ /*#__PURE__*/ z(c, { children: /*#__PURE__*/ z(K, { id: "WzVwU0" }) }),
1444
+ /*#__PURE__*/ z(c, { children: /*#__PURE__*/ z(K, { id: "bwRvnp" }) }),
1445
+ /*#__PURE__*/ z(c, { children: /*#__PURE__*/ z(K, { id: "7L01XJ" }) })
1446
+ ] }), F.map((e) => /*#__PURE__*/ z(Se, {
1447
+ policy: e,
1448
+ onDelete: () => A(e),
1449
+ canDelete: r
1450
+ }, e.id))]
1332
1451
  })
1333
- }), N === 0 ? m ? /*#__PURE__*/ F(V, { id: "qxxo7y" }) : /*#__PURE__*/ F(V, { id: "Dia2Ue" }) : /*#__PURE__*/ I(o, {
1334
- columns: 3,
1335
- children: [/*#__PURE__*/ I(n, { children: [
1336
- /*#__PURE__*/ F(c, { children: /*#__PURE__*/ F(V, { id: "WzVwU0" }) }),
1337
- /*#__PURE__*/ F(c, { children: /*#__PURE__*/ F(V, { id: "bwRvnp" }) }),
1338
- /*#__PURE__*/ F(c, { children: /*#__PURE__*/ F(V, { id: "7L01XJ" }) })
1339
- ] }), T.map((e) => /*#__PURE__*/ F(_e, {
1340
- policy: e,
1341
- onDelete: () => x(e)
1342
- }, e.id))]
1343
- })]
1452
+ ]
1344
1453
  }),
1345
- !!f && /*#__PURE__*/ F(xe, {
1346
- policy: f,
1347
- open: !!f,
1348
- onClose: C,
1349
- onConfirm: S,
1350
- isLoading: b.isPending,
1351
- error: b.error?.message || null
1454
+ !!p && /*#__PURE__*/ z(De, {
1455
+ policy: p,
1456
+ open: !!p,
1457
+ onClose: P,
1458
+ onConfirm: N,
1459
+ isLoading: D.isPending,
1460
+ error: D.error?.message || null
1352
1461
  }),
1353
- u && /*#__PURE__*/ F(be, {
1354
- isOpen: u,
1355
- onClose: d,
1462
+ d && /*#__PURE__*/ z(Ee, {
1463
+ isOpen: d,
1464
+ onClose: f,
1356
1465
  securityGroupId: e
1357
1466
  })
1358
1467
  ] });
1359
1468
  }
1360
1469
  //#endregion
1361
1470
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/SecurityGroupDetailsView.tsx
1362
- function Ce({ securityGroup: e, filteredAndSortedRules: t, onEdit: n, onDeleteRule: r, isDeletingRule: i = !1, deleteRuleError: a = null, filterControls: o, onCreateRule: s, isCreatingRule: c = !1, createRuleError: l = null, availableSecurityGroups: u = [], currentProjectId: f }) {
1363
- let [p, m] = z("rules"), h = e.project_id === f, g = !h, _ = h;
1364
- return /*#__PURE__*/ F(d, {
1471
+ function ke({ securityGroup: e, filteredAndSortedRules: t, onEdit: n, onDeleteRule: r, isDeletingRule: i = !1, deleteRuleError: a = null, filterControls: o, onCreateRule: s, isCreatingRule: c = !1, createRuleError: l = null, availableSecurityGroups: u = [], currentProjectId: f, permissions: p }) {
1472
+ let [m, h] = W("rules"), g = e.project_id === f && p.canViewRBAC;
1473
+ return /*#__PURE__*/ z(d, {
1365
1474
  px: !1,
1366
1475
  py: !0,
1367
- children: /*#__PURE__*/ I(w, {
1476
+ children: /*#__PURE__*/ B(E, {
1368
1477
  direction: "vertical",
1369
1478
  gap: "4",
1370
1479
  children: [
1371
- /*#__PURE__*/ F(K, {
1480
+ /*#__PURE__*/ z(te, {
1372
1481
  name: e.name,
1373
1482
  id: e.id
1374
1483
  }),
1375
- /*#__PURE__*/ F(q, {
1484
+ /*#__PURE__*/ z(Z, {
1376
1485
  securityGroup: e,
1377
1486
  onEdit: n,
1378
- isReadOnly: g
1487
+ canUpdate: p.canUpdate
1379
1488
  }),
1380
- !g && /*#__PURE__*/ F(J, {
1381
- activeTab: p,
1382
- onTabChange: m,
1383
- showRBACTab: _
1489
+ /*#__PURE__*/ z(Q, {
1490
+ activeTab: m,
1491
+ onTabChange: h,
1492
+ showRBACTab: g
1384
1493
  }),
1385
- /*#__PURE__*/ I("div", {
1494
+ /*#__PURE__*/ B("div", {
1386
1495
  className: "mt-6",
1387
- children: [p === "rules" && /*#__PURE__*/ F(ge, {
1496
+ children: [m === "rules" && /*#__PURE__*/ z(xe, {
1388
1497
  rules: t,
1389
1498
  totalRulesCount: e.security_group_rules?.length,
1390
1499
  onDeleteRule: r,
@@ -1397,12 +1506,16 @@ function Ce({ securityGroup: e, filteredAndSortedRules: t, onEdit: n, onDeleteRu
1397
1506
  filterSettings: o.filterSettings,
1398
1507
  onFilterChange: o.onFilterChange,
1399
1508
  securityGroupId: e.id,
1400
- onCreateRule: g ? void 0 : s,
1509
+ onCreateRule: p.canCreateRule ? s : void 0,
1401
1510
  isCreatingRule: c,
1402
1511
  createRuleError: l,
1403
1512
  availableSecurityGroups: u,
1404
- readOnly: g
1405
- }), p === "rbac" && /*#__PURE__*/ F(Se, { securityGroupId: e.id })]
1513
+ canCreateRule: p.canCreateRule,
1514
+ canDeleteRule: p.canDeleteRule
1515
+ }), m === "rbac" && /*#__PURE__*/ z(Oe, {
1516
+ securityGroupId: e.id,
1517
+ canManageAccess: p.canManageAccess
1518
+ })]
1406
1519
  })
1407
1520
  ]
1408
1521
  })
@@ -1410,14 +1523,14 @@ function Ce({ securityGroup: e, filteredAndSortedRules: t, onEdit: n, onDeleteRu
1410
1523
  }
1411
1524
  //#endregion
1412
1525
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-hooks/useSecurityGroupDetails.ts
1413
- function we({ securityGroupId: e, filterControls: t }) {
1414
- let [n, r] = z(!1), i = k(), a = D.useUtils(), o = D.network.securityGroup.getById.useQuery({
1526
+ function Ae({ securityGroupId: e, filterControls: t }) {
1527
+ let [n, r] = W(!1), i = j(), a = k.useUtils(), o = k.network.securityGroup.getById.useQuery({
1415
1528
  project_id: i,
1416
1529
  securityGroupId: e
1417
1530
  }, { placeholderData: () => a.network.securityGroup.getById.getData({
1418
1531
  project_id: i,
1419
1532
  securityGroupId: e
1420
- }) }), s = R(() => {
1533
+ }) }), s = H(() => {
1421
1534
  let e = o.data?.security_group_rules || [], n = t.filterSettings.selectedFilters?.find((e) => e.name === "direction")?.value, r = t.filterSettings.selectedFilters?.find((e) => e.name === "ethertype")?.value, i = t.filterSettings.selectedFilters?.find((e) => e.name === "protocol")?.value;
1422
1535
  if (n && n !== "all" && (e = e.filter((e) => e.direction === n)), r && r !== "all" && (e = e.filter((e) => e.ethertype === r)), i && i !== "all" && (e = e.filter((e) => e.protocol === null ? !1 : e.protocol === i)), t.searchTerm) {
1423
1536
  let n = t.searchTerm.toLowerCase();
@@ -1431,17 +1544,17 @@ function we({ securityGroupId: e, filterControls: t }) {
1431
1544
  });
1432
1545
  }
1433
1546
  return e;
1434
- }, [o.data?.security_group_rules, t]), c = D.network.securityGroup.update.useMutation({ onSuccess: () => {
1547
+ }, [o.data?.security_group_rules, t]), c = k.network.securityGroup.update.useMutation({ onSuccess: () => {
1435
1548
  a.network.securityGroup.getById.invalidate({
1436
1549
  project_id: i,
1437
1550
  securityGroupId: e
1438
1551
  }), a.network.securityGroup.list.invalidate(), r(!1);
1439
- } }), l = D.network.securityGroupRule.delete.useMutation({ onSuccess: () => {
1552
+ } }), l = k.network.securityGroupRule.delete.useMutation({ onSuccess: () => {
1440
1553
  a.network.securityGroup.getById.invalidate({
1441
1554
  project_id: i,
1442
1555
  securityGroupId: e
1443
1556
  }), a.network.securityGroup.list.invalidate();
1444
- } }), u = D.network.securityGroupRule.create.useMutation({ onSuccess: () => {
1557
+ } }), u = k.network.securityGroupRule.create.useMutation({ onSuccess: () => {
1445
1558
  a.network.securityGroup.getById.invalidate({
1446
1559
  project_id: i,
1447
1560
  securityGroupId: e
@@ -1489,39 +1602,41 @@ function we({ securityGroupId: e, filterControls: t }) {
1489
1602
  }
1490
1603
  //#endregion
1491
1604
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/index.tsx?tsr-split=component
1492
- function Te() {
1493
- let { securityGroupId: e } = O.useParams(), t = k(), n = B(), { i18n: r, _: i } = H(), { searchTerm: o, sortSettings: c, filterSettings: l, handleSearchChange: d, handleSortChange: f, handleFilterChange: p } = M({
1605
+ function je() {
1606
+ let { securityGroupId: e } = A.useParams(), { trpcClient: t } = A.useRouteContext(), n = j(), r = G(), { i18n: i, _: o } = q();
1607
+ if (!t) throw Error("trpcClient is not available in route context");
1608
+ let { permissions: c, isLoading: l, isError: d } = ee(n), { searchTerm: f, sortSettings: p, filterSettings: m, handleSearchChange: h, handleSortChange: g, handleFilterChange: _ } = I({
1494
1609
  defaultSortKey: "direction",
1495
1610
  defaultSortDir: "asc",
1496
1611
  sortOptions: [
1497
1612
  {
1498
- label: r._({ id: "MRB7nI" }),
1613
+ label: i._({ id: "MRB7nI" }),
1499
1614
  value: "direction"
1500
1615
  },
1501
1616
  {
1502
- label: r._({ id: "6+OdGi" }),
1617
+ label: i._({ id: "6+OdGi" }),
1503
1618
  value: "protocol"
1504
1619
  },
1505
1620
  {
1506
- label: r._({ id: "Nu4oKW" }),
1621
+ label: i._({ id: "Nu4oKW" }),
1507
1622
  value: "description"
1508
1623
  }
1509
1624
  ],
1510
1625
  filterSettings: { filters: [
1511
1626
  {
1512
- displayName: r._({ id: "MRB7nI" }),
1627
+ displayName: i._({ id: "MRB7nI" }),
1513
1628
  filterName: "direction",
1514
1629
  values: ["ingress", "egress"],
1515
1630
  supportsMultiValue: !1
1516
1631
  },
1517
1632
  {
1518
- displayName: r._({ id: "yp0UjB" }),
1633
+ displayName: i._({ id: "yp0UjB" }),
1519
1634
  filterName: "ethertype",
1520
1635
  values: ["IPv4", "IPv6"],
1521
1636
  supportsMultiValue: !1
1522
1637
  },
1523
1638
  {
1524
- displayName: r._({ id: "6+OdGi" }),
1639
+ displayName: i._({ id: "6+OdGi" }),
1525
1640
  filterName: "protocol",
1526
1641
  values: [
1527
1642
  "tcp",
@@ -1532,115 +1647,137 @@ function Te() {
1532
1647
  supportsMultiValue: !1
1533
1648
  }
1534
1649
  ] }
1535
- }), m = {
1536
- searchTerm: o,
1537
- onSearchChange: d,
1538
- sortSettings: c,
1539
- onSortChange: f,
1540
- filterSettings: l,
1541
- onFilterChange: p
1542
- }, { securityGroup: h, filteredAndSortedRules: g, isLoading: _, isError: v, error: b, isUpdating: x, updateError: S, isDeletingRule: C, deleteRuleError: T, isCreatingRule: A, createRuleError: j, editModalOpen: P, handleEdit: L, handleCloseEditModal: z, handleUpdate: U, handleDeleteRule: W, handleCreateRule: G } = we({
1650
+ }), v = {
1651
+ searchTerm: f,
1652
+ onSearchChange: h,
1653
+ sortSettings: p,
1654
+ onSortChange: g,
1655
+ filterSettings: m,
1656
+ onFilterChange: _
1657
+ }, { securityGroup: y, filteredAndSortedRules: b, isLoading: S, isError: C, error: w, isUpdating: T, updateError: D, isDeletingRule: M, deleteRuleError: N, isCreatingRule: P, createRuleError: F, editModalOpen: R, handleEdit: V, handleCloseEditModal: U, handleUpdate: W, handleDeleteRule: J, handleCreateRule: Y } = Ae({
1543
1658
  securityGroupId: e,
1544
- filterControls: m
1545
- }), { data: K } = D.network.securityGroup.list.useQuery({ project_id: t }), q = R(() => (K || []).filter((t) => t.id !== e).map((e) => ({
1659
+ filterControls: v
1660
+ }), { data: X } = k.network.securityGroup.list.useQuery({ project_id: n }), te = H(() => (X || []).filter((t) => t.id !== e).map((e) => ({
1546
1661
  id: e.id,
1547
1662
  name: e.name || e.id
1548
- })), [K, e]), J = () => {
1549
- n({
1663
+ })), [X, e]), Z = () => {
1664
+ r({
1550
1665
  to: "/projects/$projectId/network/securitygroups",
1551
- params: { projectId: t }
1666
+ params: { projectId: n }
1552
1667
  });
1553
1668
  };
1554
- if (_) return /*#__PURE__*/ I(w, {
1669
+ if (l) return /*#__PURE__*/ B(E, {
1670
+ className: "fixed inset-0",
1671
+ distribution: "center",
1672
+ alignment: "center",
1673
+ direction: "vertical",
1674
+ children: [/*#__PURE__*/ z(a, {
1675
+ variant: "primary",
1676
+ size: "large",
1677
+ className: "mb-2"
1678
+ }), /*#__PURE__*/ z(K, { id: "EpWoJ9" })]
1679
+ });
1680
+ let Q = d ? {
1681
+ canView: !1,
1682
+ canCreate: !1,
1683
+ canUpdate: !1,
1684
+ canDelete: !1,
1685
+ canCreateRule: !1,
1686
+ canDeleteRule: !1,
1687
+ canManageAccess: !1,
1688
+ canViewRBAC: !1
1689
+ } : c;
1690
+ if (S) return /*#__PURE__*/ B(E, {
1555
1691
  className: "fixed inset-0",
1556
1692
  distribution: "center",
1557
1693
  alignment: "center",
1558
1694
  direction: "vertical",
1559
- children: [/*#__PURE__*/ F(a, {
1695
+ children: [/*#__PURE__*/ z(a, {
1560
1696
  variant: "primary",
1561
1697
  size: "large",
1562
1698
  className: "mb-2"
1563
- }), /*#__PURE__*/ F(V, { id: "3x7Sws" })]
1699
+ }), /*#__PURE__*/ z(K, { id: "3x7Sws" })]
1564
1700
  });
1565
- if (v) {
1566
- let e = b?.message || "Unknown error";
1567
- return /*#__PURE__*/ I(w, {
1701
+ if (C) {
1702
+ let e = w?.message || "Unknown error";
1703
+ return /*#__PURE__*/ B(E, {
1568
1704
  className: "fixed inset-0",
1569
1705
  distribution: "center",
1570
1706
  alignment: "center",
1571
1707
  direction: "vertical",
1572
1708
  gap: "5",
1573
1709
  children: [
1574
- /*#__PURE__*/ F("p", {
1710
+ /*#__PURE__*/ z("p", {
1575
1711
  className: "text-theme-error font-semibold",
1576
- children: /*#__PURE__*/ F(V, { id: "FjPnAE" })
1712
+ children: /*#__PURE__*/ z(K, { id: "FjPnAE" })
1577
1713
  }),
1578
- /*#__PURE__*/ F("p", {
1714
+ /*#__PURE__*/ z("p", {
1579
1715
  className: "text-theme-highest",
1580
1716
  children: e
1581
1717
  }),
1582
- /*#__PURE__*/ F(E, {
1583
- onClick: J,
1718
+ /*#__PURE__*/ z(O, {
1719
+ onClick: Z,
1584
1720
  variant: "primary",
1585
- children: /*#__PURE__*/ F(V, { id: "U9q4M7" })
1721
+ children: /*#__PURE__*/ z(K, { id: "U9q4M7" })
1586
1722
  })
1587
1723
  ]
1588
1724
  });
1589
1725
  }
1590
- return h ? /*#__PURE__*/ I(w, {
1726
+ return y ? /*#__PURE__*/ B(E, {
1591
1727
  direction: "vertical",
1592
1728
  children: [
1593
- /*#__PURE__*/ F(u, { children: h.name || h.id }),
1594
- /*#__PURE__*/ I(y, {
1729
+ /*#__PURE__*/ z(u, { children: y.name || y.id }),
1730
+ /*#__PURE__*/ B(x, {
1595
1731
  className: "my-6",
1596
- children: [/*#__PURE__*/ F(s, {
1597
- onClick: J,
1598
- label: r._({ id: "4opp4r" })
1599
- }), /*#__PURE__*/ F(s, {
1732
+ children: [/*#__PURE__*/ z(s, {
1733
+ onClick: Z,
1734
+ label: i._({ id: "4opp4r" })
1735
+ }), /*#__PURE__*/ z(s, {
1600
1736
  active: !0,
1601
- label: h.id
1737
+ label: y.id
1602
1738
  })]
1603
1739
  }),
1604
- /*#__PURE__*/ F(Ce, {
1605
- securityGroup: h,
1606
- filteredAndSortedRules: g,
1607
- onEdit: L,
1608
- onDeleteRule: W,
1609
- isDeletingRule: C,
1610
- deleteRuleError: T,
1611
- filterControls: m,
1612
- onCreateRule: G,
1613
- isCreatingRule: A,
1614
- createRuleError: j,
1615
- availableSecurityGroups: q,
1616
- currentProjectId: t
1740
+ /*#__PURE__*/ z(ke, {
1741
+ securityGroup: y,
1742
+ filteredAndSortedRules: b,
1743
+ onEdit: V,
1744
+ onDeleteRule: J,
1745
+ isDeletingRule: M,
1746
+ deleteRuleError: N,
1747
+ filterControls: v,
1748
+ onCreateRule: Y,
1749
+ isCreatingRule: P,
1750
+ createRuleError: F,
1751
+ availableSecurityGroups: te,
1752
+ currentProjectId: n,
1753
+ permissions: Q
1617
1754
  }),
1618
- /*#__PURE__*/ F(N, {
1619
- securityGroup: h,
1620
- open: P,
1621
- onClose: z,
1622
- onUpdate: U,
1623
- isLoading: x,
1624
- error: S
1755
+ /*#__PURE__*/ z(L, {
1756
+ securityGroup: y,
1757
+ open: R,
1758
+ onClose: U,
1759
+ onUpdate: W,
1760
+ isLoading: T,
1761
+ error: D
1625
1762
  })
1626
1763
  ]
1627
- }) : /*#__PURE__*/ I(w, {
1764
+ }) : /*#__PURE__*/ B(E, {
1628
1765
  className: "fixed inset-0",
1629
1766
  distribution: "center",
1630
1767
  alignment: "center",
1631
1768
  direction: "vertical",
1632
1769
  gap: "5",
1633
- children: [/*#__PURE__*/ F("p", {
1770
+ children: [/*#__PURE__*/ z("p", {
1634
1771
  className: "text-theme-secondary",
1635
- children: /*#__PURE__*/ F(V, { id: "Zw8Q49" })
1636
- }), /*#__PURE__*/ F(E, {
1637
- onClick: J,
1772
+ children: /*#__PURE__*/ z(K, { id: "Zw8Q49" })
1773
+ }), /*#__PURE__*/ z(O, {
1774
+ onClick: Z,
1638
1775
  variant: "primary",
1639
- children: /*#__PURE__*/ F(V, { id: "U9q4M7" })
1776
+ children: /*#__PURE__*/ z(K, { id: "U9q4M7" })
1640
1777
  })]
1641
1778
  });
1642
1779
  }
1643
1780
  //#endregion
1644
- export { Te as component };
1781
+ export { je as component };
1645
1782
 
1646
- //# sourceMappingURL=_securityGroupId-B5-gJe1u.mjs.map
1783
+ //# sourceMappingURL=_securityGroupId-DFdNKa2l.mjs.map