@datatechsolutions/ui 3.11.2 → 3.13.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 (109) hide show
  1. package/dist/astrlabe/index.js +108 -108
  2. package/dist/astrlabe/index.mjs +4 -4
  3. package/dist/astrlabe/workflow-canvas.js +4 -4
  4. package/dist/astrlabe/workflow-canvas.mjs +3 -3
  5. package/dist/{chunk-HLIMHIRH.js → chunk-2ECLDHAT.js} +12 -12
  6. package/dist/{chunk-HLIMHIRH.js.map → chunk-2ECLDHAT.js.map} +1 -1
  7. package/dist/{chunk-RUWUH7DW.mjs → chunk-4VHFGW7I.mjs} +4 -4
  8. package/dist/{chunk-RUWUH7DW.mjs.map → chunk-4VHFGW7I.mjs.map} +1 -1
  9. package/dist/{chunk-6R5Z2IQ5.js → chunk-5ETT54QS.js} +120 -77
  10. package/dist/chunk-5ETT54QS.js.map +1 -0
  11. package/dist/{chunk-OZEOBZOW.mjs → chunk-6KDTVSZT.mjs} +7 -7
  12. package/dist/{chunk-OZEOBZOW.mjs.map → chunk-6KDTVSZT.mjs.map} +1 -1
  13. package/dist/{chunk-V32NUE5U.js → chunk-6YTYD4P5.js} +66 -66
  14. package/dist/{chunk-V32NUE5U.js.map → chunk-6YTYD4P5.js.map} +1 -1
  15. package/dist/{chunk-LBCUQ4FY.mjs → chunk-7TYNV6SY.mjs} +4 -4
  16. package/dist/{chunk-LBCUQ4FY.mjs.map → chunk-7TYNV6SY.mjs.map} +1 -1
  17. package/dist/{chunk-NDGYIHJ3.mjs → chunk-AHNH2PMI.mjs} +4 -4
  18. package/dist/{chunk-NDGYIHJ3.mjs.map → chunk-AHNH2PMI.mjs.map} +1 -1
  19. package/dist/{chunk-4PUVECVF.mjs → chunk-AKWCT53S.mjs} +4 -4
  20. package/dist/{chunk-4PUVECVF.mjs.map → chunk-AKWCT53S.mjs.map} +1 -1
  21. package/dist/{chunk-TXI3QDYE.js → chunk-AMCFAGK3.js} +34 -34
  22. package/dist/{chunk-TXI3QDYE.js.map → chunk-AMCFAGK3.js.map} +1 -1
  23. package/dist/{chunk-JXROBMRU.mjs → chunk-ANFSQJNI.mjs} +4 -4
  24. package/dist/{chunk-JXROBMRU.mjs.map → chunk-ANFSQJNI.mjs.map} +1 -1
  25. package/dist/{chunk-N7T4X6A7.mjs → chunk-CSOMZ5UM.mjs} +4 -4
  26. package/dist/{chunk-N7T4X6A7.mjs.map → chunk-CSOMZ5UM.mjs.map} +1 -1
  27. package/dist/{chunk-3BFQ3SVG.js → chunk-D5OTZGA2.js} +126 -127
  28. package/dist/chunk-D5OTZGA2.js.map +1 -0
  29. package/dist/{chunk-GDVB7QDZ.js → chunk-IIRS5XZY.js} +104 -40
  30. package/dist/chunk-IIRS5XZY.js.map +1 -0
  31. package/dist/{chunk-N5FWIT7N.js → chunk-K5567JM5.js} +13 -13
  32. package/dist/{chunk-N5FWIT7N.js.map → chunk-K5567JM5.js.map} +1 -1
  33. package/dist/{chunk-KGC5CRS7.mjs → chunk-KWH7JIRP.mjs} +3 -3
  34. package/dist/{chunk-KGC5CRS7.mjs.map → chunk-KWH7JIRP.mjs.map} +1 -1
  35. package/dist/{chunk-Y4YIGEX6.js → chunk-MQDCUBVW.js} +150 -150
  36. package/dist/{chunk-Y4YIGEX6.js.map → chunk-MQDCUBVW.js.map} +1 -1
  37. package/dist/{chunk-D5FL3ZHC.mjs → chunk-MSKKNPRE.mjs} +86 -43
  38. package/dist/chunk-MSKKNPRE.mjs.map +1 -0
  39. package/dist/{chunk-5JS3UFBF.js → chunk-N4YT3QA5.js} +15 -15
  40. package/dist/{chunk-5JS3UFBF.js.map → chunk-N4YT3QA5.js.map} +1 -1
  41. package/dist/{chunk-LW2LFJZ7.js → chunk-NF5DDM5V.js} +40 -40
  42. package/dist/{chunk-LW2LFJZ7.js.map → chunk-NF5DDM5V.js.map} +1 -1
  43. package/dist/{chunk-AVLOGVVA.mjs → chunk-OC4AOYU5.mjs} +4 -4
  44. package/dist/{chunk-AVLOGVVA.mjs.map → chunk-OC4AOYU5.mjs.map} +1 -1
  45. package/dist/{chunk-BGLYJ7GR.js → chunk-OY5HUZSD.js} +44 -44
  46. package/dist/{chunk-BGLYJ7GR.js.map → chunk-OY5HUZSD.js.map} +1 -1
  47. package/dist/{chunk-5Y67PZWC.js → chunk-PPIUMCUZ.js} +6 -6
  48. package/dist/{chunk-5Y67PZWC.js.map → chunk-PPIUMCUZ.js.map} +1 -1
  49. package/dist/{chunk-M64U336M.mjs → chunk-QGRTV35L.mjs} +7 -7
  50. package/dist/{chunk-M64U336M.mjs.map → chunk-QGRTV35L.mjs.map} +1 -1
  51. package/dist/{chunk-3J4E2THD.js → chunk-SDYKXLCU.js} +56 -56
  52. package/dist/{chunk-3J4E2THD.js.map → chunk-SDYKXLCU.js.map} +1 -1
  53. package/dist/{chunk-5TJR3VJ6.mjs → chunk-UPYACFZJ.mjs} +5 -5
  54. package/dist/{chunk-5TJR3VJ6.mjs.map → chunk-UPYACFZJ.mjs.map} +1 -1
  55. package/dist/{chunk-JBXNEOFB.mjs → chunk-UXHJS2SH.mjs} +4 -5
  56. package/dist/chunk-UXHJS2SH.mjs.map +1 -0
  57. package/dist/{chunk-MCHTZ63Q.js → chunk-VI4IUTMX.js} +4 -4
  58. package/dist/{chunk-MCHTZ63Q.js.map → chunk-VI4IUTMX.js.map} +1 -1
  59. package/dist/{chunk-TZA5T4MJ.mjs → chunk-VIB42VMZ.mjs} +81 -17
  60. package/dist/chunk-VIB42VMZ.mjs.map +1 -0
  61. package/dist/{chunk-5NKGJV72.js → chunk-WOTKBKS6.js} +31 -31
  62. package/dist/{chunk-5NKGJV72.js.map → chunk-WOTKBKS6.js.map} +1 -1
  63. package/dist/{chunk-YXN2K77G.js → chunk-Y5VN4SPH.js} +26 -3
  64. package/dist/chunk-Y5VN4SPH.js.map +1 -0
  65. package/dist/{chunk-7VJ7CMMT.mjs → chunk-ZEFNBGYI.mjs} +26 -3
  66. package/dist/chunk-ZEFNBGYI.mjs.map +1 -0
  67. package/dist/{chunk-WSXP645I.mjs → chunk-ZRCXDKBE.mjs} +3 -3
  68. package/dist/{chunk-WSXP645I.mjs.map → chunk-ZRCXDKBE.mjs.map} +1 -1
  69. package/dist/index.d.mts +13 -4
  70. package/dist/index.d.ts +13 -4
  71. package/dist/index.js +668 -668
  72. package/dist/index.mjs +2 -2
  73. package/dist/lib/i18n-context.d.mts +12 -4
  74. package/dist/lib/i18n-context.d.ts +12 -4
  75. package/dist/lib/i18n-context.js +6 -6
  76. package/dist/lib/i18n-context.mjs +1 -1
  77. package/dist/platform/admin/index.js +10 -10
  78. package/dist/platform/admin/index.mjs +4 -4
  79. package/dist/platform/agents-workspace.js +7 -7
  80. package/dist/platform/agents-workspace.mjs +6 -6
  81. package/dist/platform/app-shell.js +4 -4
  82. package/dist/platform/app-shell.mjs +3 -3
  83. package/dist/platform/auth/index.js +22 -22
  84. package/dist/platform/auth/index.mjs +4 -4
  85. package/dist/platform/billing/index.js +4 -4
  86. package/dist/platform/billing/index.mjs +3 -3
  87. package/dist/platform/impersonation/index.js +4 -4
  88. package/dist/platform/impersonation/index.mjs +3 -3
  89. package/dist/platform/index.js +85 -85
  90. package/dist/platform/index.mjs +18 -18
  91. package/dist/platform/pages/index.d.mts +75 -16
  92. package/dist/platform/pages/index.d.ts +75 -16
  93. package/dist/platform/pages/index.js +1089 -505
  94. package/dist/platform/pages/index.js.map +1 -1
  95. package/dist/platform/pages/index.mjs +789 -205
  96. package/dist/platform/pages/index.mjs.map +1 -1
  97. package/dist/platform/settings/index.js +7 -7
  98. package/dist/platform/settings/index.mjs +6 -6
  99. package/dist/platform/workflow-canvas-shell.js +5 -5
  100. package/dist/platform/workflow-canvas-shell.mjs +4 -4
  101. package/package.json +2 -1
  102. package/dist/chunk-3BFQ3SVG.js.map +0 -1
  103. package/dist/chunk-6R5Z2IQ5.js.map +0 -1
  104. package/dist/chunk-7VJ7CMMT.mjs.map +0 -1
  105. package/dist/chunk-D5FL3ZHC.mjs.map +0 -1
  106. package/dist/chunk-GDVB7QDZ.js.map +0 -1
  107. package/dist/chunk-JBXNEOFB.mjs.map +0 -1
  108. package/dist/chunk-TZA5T4MJ.mjs.map +0 -1
  109. package/dist/chunk-YXN2K77G.js.map +0 -1
@@ -2,14 +2,14 @@
2
2
  'use strict';
3
3
 
4
4
  var chunk3T2WGL47_js = require('../../chunk-3T2WGL47.js');
5
- var chunkGDVB7QDZ_js = require('../../chunk-GDVB7QDZ.js');
6
- var chunkTXI3QDYE_js = require('../../chunk-TXI3QDYE.js');
7
- var chunkY4YIGEX6_js = require('../../chunk-Y4YIGEX6.js');
5
+ var chunkIIRS5XZY_js = require('../../chunk-IIRS5XZY.js');
6
+ var chunkAMCFAGK3_js = require('../../chunk-AMCFAGK3.js');
7
+ var chunkMQDCUBVW_js = require('../../chunk-MQDCUBVW.js');
8
8
  require('../../chunk-55H6WZQP.js');
9
9
  require('../../chunk-DJDZIRM6.js');
10
- require('../../chunk-3BFQ3SVG.js');
11
- var chunk6R5Z2IQ5_js = require('../../chunk-6R5Z2IQ5.js');
12
- require('../../chunk-YXN2K77G.js');
10
+ require('../../chunk-D5OTZGA2.js');
11
+ var chunk5ETT54QS_js = require('../../chunk-5ETT54QS.js');
12
+ require('../../chunk-Y5VN4SPH.js');
13
13
  require('../../chunk-22XPYFHJ.js');
14
14
  require('../../chunk-2OZZH2IO.js');
15
15
  require('../../chunk-EZQ2D47U.js');
@@ -23,11 +23,54 @@ var jsxRuntime = require('react/jsx-runtime');
23
23
 
24
24
  function AgentsModelsPageView({ labels, models, loading }) {
25
25
  const [searchTerm, setSearchTerm] = react.useState("");
26
- const allModels = models;
27
- const filteredModels = searchTerm.trim() ? allModels.filter((model) => model.name.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allModels;
28
- const isEmpty = allModels.length === 0;
26
+ const [filtersOpen, setFiltersOpen] = react.useState(false);
27
+ const [selectedProviders, setSelectedProviders] = react.useState([]);
28
+ const [enabledFilter, setEnabledFilter] = react.useState("all");
29
+ const isEmpty = models.length === 0;
30
+ const filteredModels = react.useMemo(() => {
31
+ const term = searchTerm.trim().toLowerCase();
32
+ return models.filter((model) => {
33
+ if (term && !model.name.toLowerCase().includes(term)) return false;
34
+ if (selectedProviders.length > 0 && !selectedProviders.includes(model.provider)) return false;
35
+ if (enabledFilter === "enabled" && !model.enabled) return false;
36
+ if (enabledFilter === "disabled" && model.enabled) return false;
37
+ return true;
38
+ });
39
+ }, [models, searchTerm, selectedProviders, enabledFilter]);
40
+ const providerChipItems = react.useMemo(
41
+ () => [...new Set(models.map((m) => m.provider))].sort().map((p) => ({
42
+ id: p,
43
+ name: p,
44
+ style: { bg: "bg-emerald-500/15 text-emerald-700 dark:text-emerald-300", text: "" }
45
+ })),
46
+ [models]
47
+ );
48
+ const statusLabelFor = (value) => {
49
+ if (value === "enabled") return labels.statusEnabled ?? labels.enabled;
50
+ if (value === "disabled") return labels.statusDisabled ?? labels.disabled;
51
+ return labels.statusAll ?? "Todos";
52
+ };
53
+ const activeFilters = react.useMemo(() => {
54
+ const chips = [];
55
+ for (const value of selectedProviders) {
56
+ chips.push({ type: "provider", value, label: providerChipItems.find((i) => i.id === value)?.name ?? value });
57
+ }
58
+ if (enabledFilter !== "all") {
59
+ chips.push({ type: "enabled", value: enabledFilter, label: statusLabelFor(enabledFilter) });
60
+ }
61
+ return chips;
62
+ }, [selectedProviders, enabledFilter, providerChipItems]);
63
+ const filterCount = activeFilters.length;
64
+ const removeFilter = (filter) => {
65
+ if (filter.type === "provider") setSelectedProviders((prev) => prev.filter((v) => v !== filter.value));
66
+ if (filter.type === "enabled") setEnabledFilter("all");
67
+ };
68
+ const clearAllFilters = () => {
69
+ setSelectedProviders([]);
70
+ setEnabledFilter("all");
71
+ };
29
72
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
30
- chunk6R5Z2IQ5_js.HeroSection,
73
+ chunk5ETT54QS_js.HeroSection,
31
74
  {
32
75
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CubeTransparentIcon, { className: "h-5 w-5" }),
33
76
  label: labels.title,
@@ -35,18 +78,43 @@ function AgentsModelsPageView({ labels, models, loading }) {
35
78
  subtitle: labels.subtitle,
36
79
  gradient: "from-emerald-500 to-teal-700",
37
80
  toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
38
- chunk6R5Z2IQ5_js.SearchBar,
81
+ chunk5ETT54QS_js.SearchBar,
39
82
  {
40
83
  searchTerm,
41
84
  onSearchChange: setSearchTerm,
42
85
  placeholder: labels.searchPlaceholder ?? labels.title,
43
- noBorder: true
86
+ noBorder: true,
87
+ activeFilters,
88
+ onRemoveFilter: removeFilter,
89
+ onClearAll: filterCount > 0 ? clearAllFilters : void 0,
90
+ filtersModal: {
91
+ open: filtersOpen,
92
+ onOpen: () => setFiltersOpen(true),
93
+ onClose: () => setFiltersOpen(false),
94
+ title: labels.filtersTitle ?? "Filtros",
95
+ count: filterCount,
96
+ onClear: filterCount > 0 ? clearAllFilters : void 0,
97
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
98
+ providerChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByProvider ?? "Provedor", children: /* @__PURE__ */ jsxRuntime.jsx(
99
+ chunk5ETT54QS_js.ChipPicker,
100
+ {
101
+ items: providerChipItems,
102
+ selectedIds: selectedProviders,
103
+ onChange: setSelectedProviders,
104
+ selectedLabel: labels.selected ?? "selecionados",
105
+ selectAllLabel: labels.selectAll ?? "Selecionar todos",
106
+ clearLabel: labels.clear ?? "Limpar"
107
+ }
108
+ ) }),
109
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByStatus ?? "Status", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "enabled", "disabled"].map((value) => enabledFilter === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setEnabledFilter(value), children: statusLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEnabledFilter(value), children: statusLabelFor(value) }, value)) }) })
110
+ ] })
111
+ }
44
112
  }
45
113
  ) : void 0
46
114
  }
47
115
  );
48
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredModels.map((model) => /* @__PURE__ */ jsxRuntime.jsx(
49
- chunk6R5Z2IQ5_js.EntityCard,
116
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredModels.map((model) => /* @__PURE__ */ jsxRuntime.jsx(
117
+ chunk5ETT54QS_js.EntityCard,
50
118
  {
51
119
  accentGradient: "from-emerald-500 to-teal-700",
52
120
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-emerald-500/10 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CubeTransparentIcon, { className: "h-6 w-6" }) }),
@@ -65,12 +133,57 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
65
133
  const [editing, setEditing] = react.useState(null);
66
134
  const [createOpen, setCreateOpen] = react.useState(false);
67
135
  const [searchTerm, setSearchTerm] = react.useState("");
136
+ const [filtersOpen, setFiltersOpen] = react.useState(false);
137
+ const [selectedModelIds, setSelectedModelIds] = react.useState([]);
138
+ const [hasActiveVersion, setHasActiveVersion] = react.useState("all");
139
+ const isEmpty = agents.length === 0;
68
140
  const modelOptions = models.map((model) => ({ value: model.id, label: `${model.name} (${model.provider})` }));
69
- const allAgents = agents;
70
- const filteredAgents = searchTerm.trim() ? allAgents.filter((agent) => String(agent.name ?? "").toLowerCase().includes(searchTerm.trim().toLowerCase())) : allAgents;
71
- const isEmpty = allAgents.length === 0;
141
+ const filteredAgents = react.useMemo(() => {
142
+ const term = searchTerm.trim().toLowerCase();
143
+ return agents.filter((agent) => {
144
+ const name = String(agent.name ?? "").toLowerCase();
145
+ if (term && !name.includes(term)) return false;
146
+ const modelId = String(agent.modelId ?? "");
147
+ if (selectedModelIds.length > 0 && !selectedModelIds.includes(modelId)) return false;
148
+ if (hasActiveVersion === "with" && !(agent.activePromptVersion > 0)) return false;
149
+ if (hasActiveVersion === "without" && agent.activePromptVersion > 0) return false;
150
+ return true;
151
+ });
152
+ }, [agents, searchTerm, selectedModelIds, hasActiveVersion]);
153
+ const modelChipItems = react.useMemo(
154
+ () => models.map((m) => ({
155
+ id: m.id,
156
+ name: m.name,
157
+ style: { bg: "bg-violet-500/15 text-violet-700 dark:text-violet-300", text: "" }
158
+ })),
159
+ [models]
160
+ );
161
+ const versionLabelFor = (value) => {
162
+ if (value === "with") return labels.versionWith ?? "Com vers\xE3o ativa";
163
+ if (value === "without") return labels.versionWithout ?? "Sem vers\xE3o ativa";
164
+ return labels.versionAll ?? "Todos";
165
+ };
166
+ const activeFilters = react.useMemo(() => {
167
+ const chips = [];
168
+ for (const value of selectedModelIds) {
169
+ chips.push({ type: "model", value, label: modelChipItems.find((i) => i.id === value)?.name ?? value });
170
+ }
171
+ if (hasActiveVersion !== "all") {
172
+ chips.push({ type: "activeVersion", value: hasActiveVersion, label: versionLabelFor(hasActiveVersion) });
173
+ }
174
+ return chips;
175
+ }, [selectedModelIds, hasActiveVersion, modelChipItems]);
176
+ const filterCount = activeFilters.length;
177
+ const removeFilter = (filter) => {
178
+ if (filter.type === "model") setSelectedModelIds((prev) => prev.filter((v) => v !== filter.value));
179
+ if (filter.type === "activeVersion") setHasActiveVersion("all");
180
+ };
181
+ const clearAllFilters = () => {
182
+ setSelectedModelIds([]);
183
+ setHasActiveVersion("all");
184
+ };
72
185
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
73
- chunk6R5Z2IQ5_js.HeroSection,
186
+ chunk5ETT54QS_js.HeroSection,
74
187
  {
75
188
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
76
189
  label: labels.title,
@@ -78,16 +191,41 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
78
191
  subtitle: labels.subtitle,
79
192
  gradient: "from-violet-500 to-indigo-700",
80
193
  toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
81
- chunk6R5Z2IQ5_js.SearchBar,
194
+ chunk5ETT54QS_js.SearchBar,
82
195
  {
83
196
  searchTerm,
84
197
  onSearchChange: setSearchTerm,
85
198
  placeholder: labels.searchPlaceholder ?? labels.title,
86
- noBorder: true
199
+ noBorder: true,
200
+ activeFilters,
201
+ onRemoveFilter: removeFilter,
202
+ onClearAll: filterCount > 0 ? clearAllFilters : void 0,
203
+ filtersModal: {
204
+ open: filtersOpen,
205
+ onOpen: () => setFiltersOpen(true),
206
+ onClose: () => setFiltersOpen(false),
207
+ title: labels.filtersTitle ?? "Filtros",
208
+ count: filterCount,
209
+ onClear: filterCount > 0 ? clearAllFilters : void 0,
210
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
211
+ modelChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByModel ?? "Modelo", children: /* @__PURE__ */ jsxRuntime.jsx(
212
+ chunk5ETT54QS_js.ChipPicker,
213
+ {
214
+ items: modelChipItems,
215
+ selectedIds: selectedModelIds,
216
+ onChange: setSelectedModelIds,
217
+ selectedLabel: labels.selected ?? "selecionados",
218
+ selectAllLabel: labels.selectAll ?? "Selecionar todos",
219
+ clearLabel: labels.clear ?? "Limpar"
220
+ }
221
+ ) }),
222
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByActiveVersion ?? "Vers\xE3o ativa", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "with", "without"].map((value) => hasActiveVersion === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setHasActiveVersion(value), children: versionLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setHasActiveVersion(value), children: versionLabelFor(value) }, value)) }) })
223
+ ] })
224
+ }
87
225
  }
88
226
  ) : void 0,
89
227
  actions: /* @__PURE__ */ jsxRuntime.jsx(
90
- chunk6R5Z2IQ5_js.CreateActionButton,
228
+ chunk5ETT54QS_js.CreateActionButton,
91
229
  {
92
230
  mode: "desktop",
93
231
  label: labels.addAgent,
@@ -98,7 +236,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
98
236
  }
99
237
  );
100
238
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
101
- chunk6R5Z2IQ5_js.CreateActionButton,
239
+ chunk5ETT54QS_js.CreateActionButton,
102
240
  {
103
241
  mode: "mobile",
104
242
  label: labels.addAgent,
@@ -106,10 +244,10 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
106
244
  accent: "violet"
107
245
  }
108
246
  );
109
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredAgents.map((agent) => {
247
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredAgents.map((agent) => {
110
248
  const modelRecord = models.find((model) => model.id === String(agent.modelId ?? ""));
111
249
  return /* @__PURE__ */ jsxRuntime.jsx(
112
- chunk6R5Z2IQ5_js.EntityCard,
250
+ chunk5ETT54QS_js.EntityCard,
113
251
  {
114
252
  accentGradient: "from-violet-500 to-indigo-700",
115
253
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-violet-500/10 text-violet-600 dark:bg-violet-500/20 dark:text-violet-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-6 w-6" }) }),
@@ -146,7 +284,7 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
146
284
  );
147
285
  }) });
148
286
  const renderForm = (initial, onSubmit) => /* @__PURE__ */ jsxRuntime.jsx(
149
- chunk6R5Z2IQ5_js.GlassModal,
287
+ chunk5ETT54QS_js.GlassModal,
150
288
  {
151
289
  open: true,
152
290
  onClose: () => {
@@ -169,13 +307,13 @@ function AgentsConfigPageView({ labels, agents, models, loading, onCreate, onUpd
169
307
  outputSchema: String(form.get("outputSchema") ?? "").trim() || void 0
170
308
  });
171
309
  },
172
- children: /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
173
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormInput, { name: "name", label: labels.name, defaultValue: initial.name ?? "", required: true }),
174
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormSelect, { name: "modelId", label: labels.model, options: modelOptions, defaultValue: initial.modelId ?? modelOptions[0]?.value ?? "", required: true }),
175
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormInput, { name: "maxTokens", label: String(labels.maxTokens), type: "number", defaultValue: String(initial.maxTokens ?? 2048) }),
176
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormInput, { name: "temperature", label: labels.temperature, type: "number", step: 0.1, min: 0, max: 2, defaultValue: String(initial.temperature ?? 0.2) }),
177
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, defaultValue: initial.systemPrompt ?? "", rows: 4 }),
178
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormTextarea, { name: "outputSchema", label: labels.outputSchema, placeholder: labels.outputSchemaPlaceholder, defaultValue: initial.outputSchema ?? "", rows: 4 })
310
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
311
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormInput, { name: "name", label: labels.name, defaultValue: initial.name ?? "", required: true }),
312
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSelect, { name: "modelId", label: labels.model, options: modelOptions, defaultValue: initial.modelId ?? modelOptions[0]?.value ?? "", required: true }),
313
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormInput, { name: "maxTokens", label: String(labels.maxTokens), type: "number", defaultValue: String(initial.maxTokens ?? 2048) }),
314
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormInput, { name: "temperature", label: labels.temperature, type: "number", step: 0.1, min: 0, max: 2, defaultValue: String(initial.temperature ?? 0.2) }),
315
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, defaultValue: initial.systemPrompt ?? "", rows: 4 }),
316
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormTextarea, { name: "outputSchema", label: labels.outputSchema, placeholder: labels.outputSchemaPlaceholder, defaultValue: initial.outputSchema ?? "", rows: 4 })
179
317
  ] })
180
318
  }
181
319
  );
@@ -218,6 +356,11 @@ var LOCALE_OPTIONS = [
218
356
  function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onActivate, onDelete }) {
219
357
  const [createOpen, setCreateOpen] = react.useState(false);
220
358
  const [searchTerm, setSearchTerm] = react.useState("");
359
+ const [filtersOpen, setFiltersOpen] = react.useState(false);
360
+ const [selectedAgentIds, setSelectedAgentIds] = react.useState([]);
361
+ const [selectedLocales, setSelectedLocales] = react.useState([]);
362
+ const [activeFilter, setActiveFilter] = react.useState("all");
363
+ const isEmpty = prompts.length === 0;
221
364
  const agentOptions = react.useMemo(
222
365
  () => agents.map((agent) => ({
223
366
  value: String(agent.agentId ?? agent.id ?? ""),
@@ -233,24 +376,121 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
233
376
  }
234
377
  return map;
235
378
  }, [agents]);
236
- const allPrompts = prompts;
237
- const filteredPrompts = searchTerm.trim() ? allPrompts.filter((prompt) => {
379
+ const filteredPrompts = react.useMemo(() => {
238
380
  const term = searchTerm.trim().toLowerCase();
239
- const agentName = agentNameById.get(prompt.agentId) ?? prompt.agentId;
240
- const promptText = prompt.prompt ?? "";
241
- return agentName.toLowerCase().includes(term) || promptText.toLowerCase().includes(term);
242
- }) : allPrompts;
243
- const isEmpty = allPrompts.length === 0;
381
+ return prompts.filter((prompt) => {
382
+ if (term) {
383
+ const agentName = (agentNameById.get(prompt.agentId) ?? prompt.agentId).toLowerCase();
384
+ const promptText = (prompt.prompt ?? "").toLowerCase();
385
+ if (!agentName.includes(term) && !promptText.includes(term)) return false;
386
+ }
387
+ if (selectedAgentIds.length > 0 && !selectedAgentIds.includes(prompt.agentId)) return false;
388
+ if (selectedLocales.length > 0 && !selectedLocales.includes(prompt.locale)) return false;
389
+ if (activeFilter === "active" && !prompt.isActive) return false;
390
+ if (activeFilter === "inactive" && prompt.isActive) return false;
391
+ return true;
392
+ });
393
+ }, [prompts, searchTerm, selectedAgentIds, selectedLocales, activeFilter, agentNameById]);
394
+ const agentChipItems = react.useMemo(
395
+ () => agents.map((agent) => ({
396
+ id: String(agent.agentId ?? agent.id ?? ""),
397
+ name: String(agent.name ?? agent.agentId ?? agent.id ?? ""),
398
+ style: { bg: "bg-sky-500/15 text-sky-700 dark:text-sky-300", text: "" }
399
+ })).filter((item) => item.id.length > 0),
400
+ [agents]
401
+ );
402
+ const localeChipItems = react.useMemo(
403
+ () => LOCALE_OPTIONS.map((opt) => ({
404
+ id: opt.value,
405
+ name: opt.label,
406
+ style: { bg: "bg-indigo-500/15 text-indigo-700 dark:text-indigo-300", text: "" }
407
+ })),
408
+ []
409
+ );
410
+ const activeLabelFor = (value) => {
411
+ if (value === "active") return labels.activeYes ?? labels.isActive;
412
+ if (value === "inactive") return labels.activeNo ?? "Inativo";
413
+ return labels.activeAll ?? "Todos";
414
+ };
415
+ const activeFilters = react.useMemo(() => {
416
+ const chips = [];
417
+ for (const value of selectedAgentIds) {
418
+ chips.push({ type: "agent", value, label: agentChipItems.find((i) => i.id === value)?.name ?? value });
419
+ }
420
+ for (const value of selectedLocales) {
421
+ chips.push({ type: "locale", value, label: localeChipItems.find((i) => i.id === value)?.name ?? value });
422
+ }
423
+ if (activeFilter !== "all") {
424
+ chips.push({ type: "active", value: activeFilter, label: activeLabelFor(activeFilter) });
425
+ }
426
+ return chips;
427
+ }, [selectedAgentIds, selectedLocales, activeFilter, agentChipItems, localeChipItems]);
428
+ const filterCount = activeFilters.length;
429
+ const removeFilter = (filter) => {
430
+ if (filter.type === "agent") setSelectedAgentIds((prev) => prev.filter((v) => v !== filter.value));
431
+ if (filter.type === "locale") setSelectedLocales((prev) => prev.filter((v) => v !== filter.value));
432
+ if (filter.type === "active") setActiveFilter("all");
433
+ };
434
+ const clearAllFilters = () => {
435
+ setSelectedAgentIds([]);
436
+ setSelectedLocales([]);
437
+ setActiveFilter("all");
438
+ };
244
439
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
245
- chunk6R5Z2IQ5_js.HeroSection,
440
+ chunk5ETT54QS_js.HeroSection,
246
441
  {
247
442
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ChatBubbleLeftEllipsisIcon, { className: "h-5 w-5" }),
248
443
  label: labels.title,
249
444
  title: labels.title,
250
445
  subtitle: labels.subtitle,
251
446
  gradient: "from-sky-500 to-blue-700",
252
- toolbar: /* @__PURE__ */ jsxRuntime.jsx(
253
- chunk6R5Z2IQ5_js.CreateActionButton,
447
+ toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
448
+ chunk5ETT54QS_js.SearchBar,
449
+ {
450
+ searchTerm,
451
+ onSearchChange: setSearchTerm,
452
+ placeholder: labels.searchPlaceholder ?? labels.title,
453
+ noBorder: true,
454
+ activeFilters,
455
+ onRemoveFilter: removeFilter,
456
+ onClearAll: filterCount > 0 ? clearAllFilters : void 0,
457
+ filtersModal: {
458
+ open: filtersOpen,
459
+ onOpen: () => setFiltersOpen(true),
460
+ onClose: () => setFiltersOpen(false),
461
+ title: labels.filtersTitle ?? "Filtros",
462
+ count: filterCount,
463
+ onClear: filterCount > 0 ? clearAllFilters : void 0,
464
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
465
+ agentChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByAgent ?? "Agente", children: /* @__PURE__ */ jsxRuntime.jsx(
466
+ chunk5ETT54QS_js.ChipPicker,
467
+ {
468
+ items: agentChipItems,
469
+ selectedIds: selectedAgentIds,
470
+ onChange: setSelectedAgentIds,
471
+ selectedLabel: labels.selected ?? "selecionados",
472
+ selectAllLabel: labels.selectAll ?? "Selecionar todos",
473
+ clearLabel: labels.clear ?? "Limpar"
474
+ }
475
+ ) }),
476
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByLocale ?? "Idioma", children: /* @__PURE__ */ jsxRuntime.jsx(
477
+ chunk5ETT54QS_js.ChipPicker,
478
+ {
479
+ items: localeChipItems,
480
+ selectedIds: selectedLocales,
481
+ onChange: setSelectedLocales,
482
+ selectedLabel: labels.selected ?? "selecionados",
483
+ selectAllLabel: labels.selectAll ?? "Selecionar todos",
484
+ clearLabel: labels.clear ?? "Limpar"
485
+ }
486
+ ) }),
487
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByActive ?? "Status", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "active", "inactive"].map((value) => activeFilter === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setActiveFilter(value), children: activeLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setActiveFilter(value), children: activeLabelFor(value) }, value)) }) })
488
+ ] })
489
+ }
490
+ }
491
+ ) : void 0,
492
+ actions: /* @__PURE__ */ jsxRuntime.jsx(
493
+ chunk5ETT54QS_js.CreateActionButton,
254
494
  {
255
495
  mode: "desktop",
256
496
  label: labels.addPrompt,
@@ -261,7 +501,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
261
501
  }
262
502
  );
263
503
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
264
- chunk6R5Z2IQ5_js.CreateActionButton,
504
+ chunk5ETT54QS_js.CreateActionButton,
265
505
  {
266
506
  mode: "mobile",
267
507
  label: labels.addPrompt,
@@ -269,47 +509,37 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
269
509
  accent: "sky"
270
510
  }
271
511
  );
272
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
273
- /* @__PURE__ */ jsxRuntime.jsx(
274
- chunk6R5Z2IQ5_js.SearchBar,
512
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredPrompts.map((prompt) => {
513
+ const agentName = agentNameById.get(prompt.agentId) ?? prompt.agentId;
514
+ const key = `${prompt.agentId}:${prompt.locale}:${prompt.version}`;
515
+ return /* @__PURE__ */ jsxRuntime.jsx(
516
+ chunk5ETT54QS_js.EntityCard,
275
517
  {
276
- searchTerm,
277
- onSearchChange: setSearchTerm,
278
- placeholder: labels.searchPlaceholder ?? labels.title
279
- }
280
- ),
281
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredPrompts.map((prompt) => {
282
- const agentName = agentNameById.get(prompt.agentId) ?? prompt.agentId;
283
- const key = `${prompt.agentId}:${prompt.locale}:${prompt.version}`;
284
- return /* @__PURE__ */ jsxRuntime.jsx(
285
- chunk6R5Z2IQ5_js.EntityCard,
286
- {
287
- accentGradient: "from-sky-500 to-blue-700",
288
- icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-sky-500/10 text-sky-600 dark:bg-sky-500/20 dark:text-sky-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.ChatBubbleLeftEllipsisIcon, { className: "h-6 w-6" }) }),
289
- title: agentName,
290
- subtitle: `${prompt.locale} \xB7 v${prompt.version}`,
291
- status: prompt.isActive ? /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: "emerald", children: labels.isActive }) : null,
292
- footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
293
- !prompt.isActive && /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onActivate(prompt), children: labels.activate }),
294
- /* @__PURE__ */ jsxRuntime.jsx(
295
- chunkBHOT22QL_js.Button,
296
- {
297
- type: "button",
298
- size: "sm",
299
- color: "rose",
300
- onClick: () => {
301
- if (window.confirm(labels.deleteConfirm)) onDelete(prompt);
302
- },
303
- children: labels.delete
304
- }
305
- )
306
- ] }),
307
- children: prompt.prompt && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 line-clamp-3 text-xs text-slate-500 dark:text-slate-400", children: prompt.prompt })
308
- },
309
- key
310
- );
311
- }) })
312
- ] });
518
+ accentGradient: "from-sky-500 to-blue-700",
519
+ icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-sky-500/10 text-sky-600 dark:bg-sky-500/20 dark:text-sky-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.ChatBubbleLeftEllipsisIcon, { className: "h-6 w-6" }) }),
520
+ title: agentName,
521
+ subtitle: `${prompt.locale} \xB7 v${prompt.version}`,
522
+ status: prompt.isActive ? /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: "emerald", children: labels.isActive }) : null,
523
+ footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
524
+ !prompt.isActive && /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onActivate(prompt), children: labels.activate }),
525
+ /* @__PURE__ */ jsxRuntime.jsx(
526
+ chunkBHOT22QL_js.Button,
527
+ {
528
+ type: "button",
529
+ size: "sm",
530
+ color: "rose",
531
+ onClick: () => {
532
+ if (window.confirm(labels.deleteConfirm)) onDelete(prompt);
533
+ },
534
+ children: labels.delete
535
+ }
536
+ )
537
+ ] }),
538
+ children: prompt.prompt && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 line-clamp-3 text-xs text-slate-500 dark:text-slate-400", children: prompt.prompt })
539
+ },
540
+ key
541
+ );
542
+ }) });
313
543
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
314
544
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
315
545
  hero,
@@ -317,7 +547,7 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
317
547
  mobileAction
318
548
  ] }),
319
549
  /* @__PURE__ */ jsxRuntime.jsx(
320
- chunk6R5Z2IQ5_js.GlassModal,
550
+ chunk5ETT54QS_js.GlassModal,
321
551
  {
322
552
  open: createOpen,
323
553
  onClose: () => setCreateOpen(false),
@@ -341,11 +571,11 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
341
571
  });
342
572
  setCreateOpen(false);
343
573
  },
344
- children: /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
345
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormSelect, { name: "agentId", label: labels.agent, options: agentOptions, required: true }),
346
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormSelect, { name: "locale", label: labels.locale, options: LOCALE_OPTIONS, defaultValue: "en" }),
574
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
575
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSelect, { name: "agentId", label: labels.agent, options: agentOptions, required: true }),
576
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSelect, { name: "locale", label: labels.locale, options: LOCALE_OPTIONS, defaultValue: "en" }),
347
577
  /* @__PURE__ */ jsxRuntime.jsx(
348
- chunk6R5Z2IQ5_js.FormSelect,
578
+ chunk5ETT54QS_js.FormSelect,
349
579
  {
350
580
  name: "isActive",
351
581
  label: labels.isActive,
@@ -353,10 +583,10 @@ function AgentsPromptsPageView({ labels, agents, prompts, loading, onCreate, onA
353
583
  defaultValue: "true"
354
584
  }
355
585
  ),
356
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormInput, { name: "reason", label: labels.reason }),
357
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, rows: 3 }),
358
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormTextarea, { name: "userTemplate", label: labels.userTemplate, rows: 3 }),
359
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormTextarea, { name: "prompt", label: labels.prompt, rows: 6, required: true })
586
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormInput, { name: "reason", label: labels.reason }),
587
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormTextarea, { name: "systemPrompt", label: labels.systemPrompt, rows: 3 }),
588
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormTextarea, { name: "userTemplate", label: labels.userTemplate, rows: 3 }),
589
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormTextarea, { name: "prompt", label: labels.prompt, rows: 6, required: true })
360
590
  ] })
361
591
  }
362
592
  )
@@ -387,19 +617,88 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
387
617
  const [editing, setEditing] = react.useState(null);
388
618
  const [createOpen, setCreateOpen] = react.useState(false);
389
619
  const [searchTerm, setSearchTerm] = react.useState("");
620
+ const [filtersOpen, setFiltersOpen] = react.useState(false);
621
+ const [selectedToolTypes, setSelectedToolTypes] = react.useState([]);
390
622
  const allTools = tools;
391
- const filteredTools = searchTerm.trim() ? allTools.filter((tool) => tool.name.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allTools;
392
623
  const isEmpty = allTools.length === 0;
624
+ const toolTypeOf = (tool) => {
625
+ const raw = tool;
626
+ const t = raw.toolType ?? raw.tool_type ?? tool.category;
627
+ return typeof t === "string" ? t : "";
628
+ };
629
+ const filteredTools = react.useMemo(() => {
630
+ const term = searchTerm.trim().toLowerCase();
631
+ return allTools.filter((tool) => {
632
+ if (term && !tool.name.toLowerCase().includes(term)) return false;
633
+ if (selectedToolTypes.length > 0) {
634
+ const t = toolTypeOf(tool);
635
+ if (!selectedToolTypes.includes(t)) return false;
636
+ }
637
+ return true;
638
+ });
639
+ }, [allTools, searchTerm, selectedToolTypes]);
640
+ const toolTypeChipItems = react.useMemo(
641
+ () => TOOL_TYPE_OPTIONS.map((opt) => ({
642
+ id: opt.value,
643
+ name: opt.label,
644
+ style: { bg: "bg-amber-500/15 text-amber-700 dark:text-amber-300", text: "" }
645
+ })),
646
+ []
647
+ );
648
+ const activeFilters = react.useMemo(() => {
649
+ return selectedToolTypes.map((value) => {
650
+ const label = toolTypeChipItems.find((i) => i.id === value)?.name ?? value;
651
+ return { type: "toolType", value, label };
652
+ });
653
+ }, [selectedToolTypes, toolTypeChipItems]);
654
+ const filterCount = activeFilters.length;
655
+ const removeFilter = (filter) => {
656
+ if (filter.type === "toolType") setSelectedToolTypes((prev) => prev.filter((t) => t !== filter.value));
657
+ };
658
+ const clearAllFilters = () => {
659
+ setSelectedToolTypes([]);
660
+ };
393
661
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
394
- chunk6R5Z2IQ5_js.HeroSection,
662
+ chunk5ETT54QS_js.HeroSection,
395
663
  {
396
664
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5" }),
397
665
  label: labels.title,
398
666
  title: labels.title,
399
667
  subtitle: labels.subtitle,
400
668
  gradient: "from-amber-500 to-orange-700",
401
- toolbar: /* @__PURE__ */ jsxRuntime.jsx(
402
- chunk6R5Z2IQ5_js.CreateActionButton,
669
+ toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
670
+ chunk5ETT54QS_js.SearchBar,
671
+ {
672
+ searchTerm,
673
+ onSearchChange: setSearchTerm,
674
+ placeholder: labels.searchPlaceholder ?? labels.title,
675
+ noBorder: true,
676
+ activeFilters,
677
+ onRemoveFilter: removeFilter,
678
+ onClearAll: filterCount > 0 ? clearAllFilters : void 0,
679
+ filtersModal: {
680
+ open: filtersOpen,
681
+ onOpen: () => setFiltersOpen(true),
682
+ onClose: () => setFiltersOpen(false),
683
+ title: labels.filtersTitle ?? "Filtros",
684
+ count: filterCount,
685
+ onClear: filterCount > 0 ? clearAllFilters : void 0,
686
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-5", children: /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByToolType ?? "Tipo de ferramenta", children: /* @__PURE__ */ jsxRuntime.jsx(
687
+ chunk5ETT54QS_js.ChipPicker,
688
+ {
689
+ items: toolTypeChipItems,
690
+ selectedIds: selectedToolTypes,
691
+ onChange: setSelectedToolTypes,
692
+ selectedLabel: labels.selected ?? "selecionados",
693
+ selectAllLabel: labels.selectAll ?? "Selecionar todos",
694
+ clearLabel: labels.clear ?? "Limpar"
695
+ }
696
+ ) }) })
697
+ }
698
+ }
699
+ ) : void 0,
700
+ actions: /* @__PURE__ */ jsxRuntime.jsx(
701
+ chunk5ETT54QS_js.CreateActionButton,
403
702
  {
404
703
  mode: "desktop",
405
704
  label: labels.addTool,
@@ -410,7 +709,7 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
410
709
  }
411
710
  );
412
711
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
413
- chunk6R5Z2IQ5_js.CreateActionButton,
712
+ chunk5ETT54QS_js.CreateActionButton,
414
713
  {
415
714
  mode: "mobile",
416
715
  label: labels.addTool,
@@ -418,43 +717,33 @@ function AgentsToolDefinitionsPageView({ labels, tools, loading, onCreate, onUpd
418
717
  accent: "amber"
419
718
  }
420
719
  );
421
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
422
- /* @__PURE__ */ jsxRuntime.jsx(
423
- chunk6R5Z2IQ5_js.SearchBar,
424
- {
425
- searchTerm,
426
- onSearchChange: setSearchTerm,
427
- placeholder: labels.searchPlaceholder ?? labels.title
428
- }
429
- ),
430
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsx(
431
- chunk6R5Z2IQ5_js.EntityCard,
432
- {
433
- accentGradient: "from-amber-500 to-orange-700",
434
- icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-amber-500/10 text-amber-600 dark:bg-amber-500/20 dark:text-amber-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-6 w-6" }) }),
435
- title: tool.name,
436
- subtitle: toolTypeLabel(tool),
437
- status: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: tool.enabled ? "emerald" : "zinc", children: tool.enabled ? labels.enabled : labels.disabled }),
438
- footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
439
- /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(tool), children: labels.edit }),
440
- /* @__PURE__ */ jsxRuntime.jsx(
441
- chunkBHOT22QL_js.Button,
442
- {
443
- type: "button",
444
- size: "sm",
445
- color: "rose",
446
- onClick: () => {
447
- if (window.confirm(labels.deleteConfirm)) onDelete(tool);
448
- },
449
- children: labels.delete
450
- }
451
- )
452
- ] }),
453
- children: tool.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: tool.description })
454
- },
455
- tool.agentToolId
456
- )) })
457
- ] });
720
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsx(
721
+ chunk5ETT54QS_js.EntityCard,
722
+ {
723
+ accentGradient: "from-amber-500 to-orange-700",
724
+ icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-amber-500/10 text-amber-600 dark:bg-amber-500/20 dark:text-amber-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-6 w-6" }) }),
725
+ title: tool.name,
726
+ subtitle: toolTypeLabel(tool),
727
+ status: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: tool.enabled ? "emerald" : "zinc", children: tool.enabled ? labels.enabled : labels.disabled }),
728
+ footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
729
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEditing(tool), children: labels.edit }),
730
+ /* @__PURE__ */ jsxRuntime.jsx(
731
+ chunkBHOT22QL_js.Button,
732
+ {
733
+ type: "button",
734
+ size: "sm",
735
+ color: "rose",
736
+ onClick: () => {
737
+ if (window.confirm(labels.deleteConfirm)) onDelete(tool);
738
+ },
739
+ children: labels.delete
740
+ }
741
+ )
742
+ ] }),
743
+ children: tool.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: tool.description })
744
+ },
745
+ tool.agentToolId
746
+ )) });
458
747
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
459
748
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
460
749
  hero,
@@ -518,7 +807,7 @@ function ToolEditor({
518
807
  setValue((v) => ({ ...v, [key]: next }));
519
808
  };
520
809
  return /* @__PURE__ */ jsxRuntime.jsx(
521
- chunk6R5Z2IQ5_js.GlassModal,
810
+ chunk5ETT54QS_js.GlassModal,
522
811
  {
523
812
  open: true,
524
813
  onClose,
@@ -531,9 +820,9 @@ function ToolEditor({
531
820
  handleSubmit();
532
821
  },
533
822
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
534
- /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
823
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
535
824
  /* @__PURE__ */ jsxRuntime.jsx(
536
- chunk6R5Z2IQ5_js.FormInput,
825
+ chunk5ETT54QS_js.FormInput,
537
826
  {
538
827
  label: "Name",
539
828
  required: true,
@@ -543,7 +832,7 @@ function ToolEditor({
543
832
  }
544
833
  ),
545
834
  /* @__PURE__ */ jsxRuntime.jsx(
546
- chunk6R5Z2IQ5_js.FormSelect,
835
+ chunk5ETT54QS_js.FormSelect,
547
836
  {
548
837
  label: "Tool type",
549
838
  value: value.toolType,
@@ -553,7 +842,7 @@ function ToolEditor({
553
842
  }
554
843
  ),
555
844
  /* @__PURE__ */ jsxRuntime.jsx(
556
- chunk6R5Z2IQ5_js.FormSelect,
845
+ chunk5ETT54QS_js.FormSelect,
557
846
  {
558
847
  label: "Enabled",
559
848
  value: value.enabled ? "true" : "false",
@@ -562,7 +851,7 @@ function ToolEditor({
562
851
  }
563
852
  ),
564
853
  /* @__PURE__ */ jsxRuntime.jsx(
565
- chunk6R5Z2IQ5_js.FormInput,
854
+ chunk5ETT54QS_js.FormInput,
566
855
  {
567
856
  label: "Icon (optional)",
568
857
  value: value.icon ?? "",
@@ -572,7 +861,7 @@ function ToolEditor({
572
861
  )
573
862
  ] }),
574
863
  /* @__PURE__ */ jsxRuntime.jsx(
575
- chunk6R5Z2IQ5_js.FormTextarea,
864
+ chunk5ETT54QS_js.FormTextarea,
576
865
  {
577
866
  label: "Description",
578
867
  rows: 2,
@@ -620,7 +909,7 @@ function ParametersEditor({
620
909
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
621
910
  parameters.map((param, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_160px_1fr_110px_auto] items-end gap-2", children: [
622
911
  /* @__PURE__ */ jsxRuntime.jsx(
623
- chunk6R5Z2IQ5_js.FormInput,
912
+ chunk5ETT54QS_js.FormInput,
624
913
  {
625
914
  label: "Name",
626
915
  value: param.name,
@@ -629,7 +918,7 @@ function ParametersEditor({
629
918
  }
630
919
  ),
631
920
  /* @__PURE__ */ jsxRuntime.jsx(
632
- chunk6R5Z2IQ5_js.FormSelect,
921
+ chunk5ETT54QS_js.FormSelect,
633
922
  {
634
923
  label: "Type",
635
924
  value: param.type,
@@ -638,7 +927,7 @@ function ParametersEditor({
638
927
  }
639
928
  ),
640
929
  /* @__PURE__ */ jsxRuntime.jsx(
641
- chunk6R5Z2IQ5_js.FormInput,
930
+ chunk5ETT54QS_js.FormInput,
642
931
  {
643
932
  label: "Description",
644
933
  value: param.description,
@@ -672,9 +961,9 @@ function HandlerConfigEditor({
672
961
  if (toolType === "http") {
673
962
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
674
963
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "HTTP handler" }),
675
- /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
964
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
676
965
  /* @__PURE__ */ jsxRuntime.jsx(
677
- chunk6R5Z2IQ5_js.FormSelect,
966
+ chunk5ETT54QS_js.FormSelect,
678
967
  {
679
968
  label: "Method",
680
969
  value: stringProp(config, "method", "GET"),
@@ -683,7 +972,7 @@ function HandlerConfigEditor({
683
972
  }
684
973
  ),
685
974
  /* @__PURE__ */ jsxRuntime.jsx(
686
- chunk6R5Z2IQ5_js.FormInput,
975
+ chunk5ETT54QS_js.FormInput,
687
976
  {
688
977
  label: "URL template",
689
978
  value: stringProp(config, "url"),
@@ -693,7 +982,7 @@ function HandlerConfigEditor({
693
982
  )
694
983
  ] }),
695
984
  /* @__PURE__ */ jsxRuntime.jsx(
696
- chunk6R5Z2IQ5_js.FormTextarea,
985
+ chunk5ETT54QS_js.FormTextarea,
697
986
  {
698
987
  label: "Headers (JSON)",
699
988
  rows: 3,
@@ -703,7 +992,7 @@ function HandlerConfigEditor({
703
992
  }
704
993
  ),
705
994
  /* @__PURE__ */ jsxRuntime.jsx(
706
- chunk6R5Z2IQ5_js.FormTextarea,
995
+ chunk5ETT54QS_js.FormTextarea,
707
996
  {
708
997
  label: "Body template",
709
998
  rows: 3,
@@ -718,7 +1007,7 @@ function HandlerConfigEditor({
718
1007
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
719
1008
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Function handler" }),
720
1009
  /* @__PURE__ */ jsxRuntime.jsx(
721
- chunk6R5Z2IQ5_js.FormInput,
1010
+ chunk5ETT54QS_js.FormInput,
722
1011
  {
723
1012
  label: "Implementation key",
724
1013
  value: stringProp(config, "implementationKey"),
@@ -732,9 +1021,9 @@ function HandlerConfigEditor({
732
1021
  if (toolType === "database_query") {
733
1022
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
734
1023
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Database query handler" }),
735
- /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
1024
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
736
1025
  /* @__PURE__ */ jsxRuntime.jsx(
737
- chunk6R5Z2IQ5_js.FormInput,
1026
+ chunk5ETT54QS_js.FormInput,
738
1027
  {
739
1028
  label: "Datasource ID",
740
1029
  value: stringProp(config, "datasourceId"),
@@ -743,7 +1032,7 @@ function HandlerConfigEditor({
743
1032
  }
744
1033
  ),
745
1034
  /* @__PURE__ */ jsxRuntime.jsx(
746
- chunk6R5Z2IQ5_js.FormInput,
1035
+ chunk5ETT54QS_js.FormInput,
747
1036
  {
748
1037
  label: "Max rows",
749
1038
  type: "number",
@@ -753,7 +1042,7 @@ function HandlerConfigEditor({
753
1042
  )
754
1043
  ] }),
755
1044
  /* @__PURE__ */ jsxRuntime.jsx(
756
- chunk6R5Z2IQ5_js.FormTextarea,
1045
+ chunk5ETT54QS_js.FormTextarea,
757
1046
  {
758
1047
  label: "Query template",
759
1048
  rows: 4,
@@ -769,7 +1058,7 @@ function HandlerConfigEditor({
769
1058
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "Code execution handler" }),
770
1059
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-xs text-amber-600 dark:text-amber-400", children: "Experimental \u2014 sandbox is not yet enforced. Only enable for trusted tools." }),
771
1060
  /* @__PURE__ */ jsxRuntime.jsx(
772
- chunk6R5Z2IQ5_js.FormSelect,
1061
+ chunk5ETT54QS_js.FormSelect,
773
1062
  {
774
1063
  label: "Language",
775
1064
  value: stringProp(config, "language", "javascript"),
@@ -781,7 +1070,7 @@ function HandlerConfigEditor({
781
1070
  }
782
1071
  ),
783
1072
  /* @__PURE__ */ jsxRuntime.jsx(
784
- chunk6R5Z2IQ5_js.FormTextarea,
1073
+ chunk5ETT54QS_js.FormTextarea,
785
1074
  {
786
1075
  label: "Code",
787
1076
  rows: 6,
@@ -794,9 +1083,9 @@ function HandlerConfigEditor({
794
1083
  }
795
1084
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
796
1085
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-700 dark:text-slate-200", children: "API call handler" }),
797
- /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
1086
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
798
1087
  /* @__PURE__ */ jsxRuntime.jsx(
799
- chunk6R5Z2IQ5_js.FormInput,
1088
+ chunk5ETT54QS_js.FormInput,
800
1089
  {
801
1090
  label: "URL",
802
1091
  value: stringProp(config, "url"),
@@ -804,7 +1093,7 @@ function HandlerConfigEditor({
804
1093
  }
805
1094
  ),
806
1095
  /* @__PURE__ */ jsxRuntime.jsx(
807
- chunk6R5Z2IQ5_js.FormSelect,
1096
+ chunk5ETT54QS_js.FormSelect,
808
1097
  {
809
1098
  label: "Auth",
810
1099
  value: stringProp(config, "authType", "bearer"),
@@ -818,7 +1107,7 @@ function HandlerConfigEditor({
818
1107
  }
819
1108
  ),
820
1109
  /* @__PURE__ */ jsxRuntime.jsx(
821
- chunk6R5Z2IQ5_js.FormInput,
1110
+ chunk5ETT54QS_js.FormInput,
822
1111
  {
823
1112
  label: "Credential secret id",
824
1113
  value: stringProp(config, "credentialRef"),
@@ -943,19 +1232,57 @@ function setFromJson(set, key, raw) {
943
1232
  set(key, raw);
944
1233
  }
945
1234
  }
946
- function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete, onAddClick }) {
1235
+ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete }) {
947
1236
  const [createOpen, setCreateOpen] = react.useState(false);
948
- const openCreate = () => {
949
- if (onAddClick) onAddClick();
950
- else setCreateOpen(true);
951
- };
952
1237
  const [editing, setEditing] = react.useState(null);
953
1238
  const [searchTerm, setSearchTerm] = react.useState("");
954
- const allRules = rules;
955
- const filteredRules = searchTerm.trim() ? allRules.filter((rule) => (rule.name ?? "").toLowerCase().includes(searchTerm.trim().toLowerCase())) : allRules;
956
- const isEmpty = allRules.length === 0;
1239
+ const [filtersOpen, setFiltersOpen] = react.useState(false);
1240
+ const [enabledFilter, setEnabledFilter] = react.useState("all");
1241
+ const [expiryFilter, setExpiryFilter] = react.useState("all");
1242
+ const isEmpty = rules.length === 0;
1243
+ const filteredRules = react.useMemo(() => {
1244
+ const term = searchTerm.trim().toLowerCase();
1245
+ return rules.filter((rule) => {
1246
+ if (term && !rule.name.toLowerCase().includes(term)) return false;
1247
+ if (enabledFilter === "enabled" && !rule.enabled) return false;
1248
+ if (enabledFilter === "disabled" && rule.enabled) return false;
1249
+ const hasExpiry = typeof rule.validUntil === "string" && rule.validUntil.length > 0;
1250
+ if (expiryFilter === "expiring" && !hasExpiry) return false;
1251
+ if (expiryFilter === "noExpiry" && hasExpiry) return false;
1252
+ return true;
1253
+ });
1254
+ }, [rules, searchTerm, enabledFilter, expiryFilter]);
1255
+ const statusLabelFor = (value) => {
1256
+ if (value === "enabled") return labels.statusEnabled ?? labels.enabled;
1257
+ if (value === "disabled") return labels.statusDisabled ?? labels.disabled;
1258
+ return labels.statusAll ?? "Todos";
1259
+ };
1260
+ const expiryLabelFor = (value) => {
1261
+ if (value === "expiring") return labels.expiryExpiring ?? "Com validade";
1262
+ if (value === "noExpiry") return labels.expiryNoExpiry ?? "Sem validade";
1263
+ return labels.expiryAll ?? "Todos";
1264
+ };
1265
+ const activeFilters = react.useMemo(() => {
1266
+ const chips = [];
1267
+ if (enabledFilter !== "all") {
1268
+ chips.push({ type: "enabled", value: enabledFilter, label: statusLabelFor(enabledFilter) });
1269
+ }
1270
+ if (expiryFilter !== "all") {
1271
+ chips.push({ type: "expiry", value: expiryFilter, label: expiryLabelFor(expiryFilter) });
1272
+ }
1273
+ return chips;
1274
+ }, [enabledFilter, expiryFilter]);
1275
+ const filterCount = activeFilters.length;
1276
+ const removeFilter = (filter) => {
1277
+ if (filter.type === "enabled") setEnabledFilter("all");
1278
+ if (filter.type === "expiry") setExpiryFilter("all");
1279
+ };
1280
+ const clearAllFilters = () => {
1281
+ setEnabledFilter("all");
1282
+ setExpiryFilter("all");
1283
+ };
957
1284
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
958
- chunk6R5Z2IQ5_js.HeroSection,
1285
+ chunk5ETT54QS_js.HeroSection,
959
1286
  {
960
1287
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.AdjustmentsHorizontalIcon, { className: "h-5 w-5" }),
961
1288
  label: labels.title,
@@ -963,36 +1290,51 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete, o
963
1290
  subtitle: labels.subtitle,
964
1291
  gradient: "from-fuchsia-500 to-purple-700",
965
1292
  toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
966
- chunk6R5Z2IQ5_js.SearchBar,
1293
+ chunk5ETT54QS_js.SearchBar,
967
1294
  {
968
1295
  searchTerm,
969
1296
  onSearchChange: setSearchTerm,
970
1297
  placeholder: labels.searchPlaceholder ?? labels.title,
971
- noBorder: true
1298
+ noBorder: true,
1299
+ activeFilters,
1300
+ onRemoveFilter: removeFilter,
1301
+ onClearAll: filterCount > 0 ? clearAllFilters : void 0,
1302
+ filtersModal: {
1303
+ open: filtersOpen,
1304
+ onOpen: () => setFiltersOpen(true),
1305
+ onClose: () => setFiltersOpen(false),
1306
+ title: labels.filtersTitle ?? "Filtros",
1307
+ count: filterCount,
1308
+ onClear: filterCount > 0 ? clearAllFilters : void 0,
1309
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
1310
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByStatus ?? "Status", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "enabled", "disabled"].map((value) => enabledFilter === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setEnabledFilter(value), children: statusLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEnabledFilter(value), children: statusLabelFor(value) }, value)) }) }),
1311
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByExpiry ?? "Validade", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "expiring", "noExpiry"].map((value) => expiryFilter === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setExpiryFilter(value), children: expiryLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setExpiryFilter(value), children: expiryLabelFor(value) }, value)) }) })
1312
+ ] })
1313
+ }
972
1314
  }
973
1315
  ) : void 0,
974
1316
  actions: /* @__PURE__ */ jsxRuntime.jsx(
975
- chunk6R5Z2IQ5_js.CreateActionButton,
1317
+ chunk5ETT54QS_js.CreateActionButton,
976
1318
  {
977
1319
  mode: "desktop",
978
1320
  label: labels.addRule,
979
- onClick: openCreate,
1321
+ onClick: () => setCreateOpen(true),
980
1322
  accent: "fuchsia"
981
1323
  }
982
1324
  )
983
1325
  }
984
1326
  );
985
1327
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
986
- chunk6R5Z2IQ5_js.CreateActionButton,
1328
+ chunk5ETT54QS_js.CreateActionButton,
987
1329
  {
988
1330
  mode: "mobile",
989
1331
  label: labels.addRule,
990
- onClick: openCreate,
1332
+ onClick: () => setCreateOpen(true),
991
1333
  accent: "fuchsia"
992
1334
  }
993
1335
  );
994
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredRules.map((rule) => /* @__PURE__ */ jsxRuntime.jsx(
995
- chunk6R5Z2IQ5_js.EntityCard,
1336
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredRules.map((rule) => /* @__PURE__ */ jsxRuntime.jsx(
1337
+ chunk5ETT54QS_js.EntityCard,
996
1338
  {
997
1339
  accentGradient: "from-fuchsia-500 to-purple-700",
998
1340
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-fuchsia-500/10 text-fuchsia-600 dark:bg-fuchsia-500/20 dark:text-fuchsia-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.AdjustmentsHorizontalIcon, { className: "h-6 w-6" }) }),
@@ -1029,7 +1371,7 @@ function RulesPageView({ labels, rules, loading, onCreate, onUpdate, onDelete, o
1029
1371
  {
1030
1372
  title: labels.createTitle,
1031
1373
  saveLabel: labels.save,
1032
- initial: chunkY4YIGEX6_js.defaultRuleForm(),
1374
+ initial: chunkMQDCUBVW_js.defaultRuleForm(),
1033
1375
  onClose: () => setCreateOpen(false),
1034
1376
  onSubmit: (value) => {
1035
1377
  onCreate(value);
@@ -1061,7 +1403,7 @@ function RuleEditor({
1061
1403
  }) {
1062
1404
  const [value, setValue] = react.useState(initial);
1063
1405
  return /* @__PURE__ */ jsxRuntime.jsx(
1064
- chunk6R5Z2IQ5_js.GlassModal,
1406
+ chunk5ETT54QS_js.GlassModal,
1065
1407
  {
1066
1408
  open: true,
1067
1409
  onClose,
@@ -1073,12 +1415,12 @@ function RuleEditor({
1073
1415
  event.preventDefault();
1074
1416
  onSubmit(value);
1075
1417
  },
1076
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkY4YIGEX6_js.RuleForm, { value, onChange: setValue })
1418
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkMQDCUBVW_js.RuleForm, { value, onChange: setValue })
1077
1419
  }
1078
1420
  );
1079
1421
  }
1080
1422
  function ruleToFormValue(rule) {
1081
- const base = chunkY4YIGEX6_js.defaultRuleForm();
1423
+ const base = chunkMQDCUBVW_js.defaultRuleForm();
1082
1424
  const rawCondition = rule.condition ?? rule.conditions;
1083
1425
  const rawAction = pickAction(rule);
1084
1426
  return {
@@ -1093,10 +1435,7 @@ function ruleToFormValue(rule) {
1093
1435
  status: typeof rule.status === "string" ? rule.status : base.status,
1094
1436
  validFrom: typeof rule.validFrom === "string" ? rule.validFrom : base.validFrom,
1095
1437
  validUntil: typeof rule.validUntil === "string" ? rule.validUntil : base.validUntil,
1096
- tags: Array.isArray(rule.tags) ? rule.tags.filter((tag) => typeof tag === "string") : base.tags,
1097
- // Round-trip recurrence (Fallback 4) — backend persists it as the
1098
- // structured `{ kind, ... }` blob the wizard sends.
1099
- recurrence: rule.recurrence ?? null
1438
+ tags: Array.isArray(rule.tags) ? rule.tags.filter((tag) => typeof tag === "string") : base.tags
1100
1439
  };
1101
1440
  }
1102
1441
  function pickAction(rule) {
@@ -1218,7 +1557,7 @@ var SAMPLE_DATASOURCES = [
1218
1557
  ];
1219
1558
  function getDialectLabel(dialect) {
1220
1559
  if (!dialect) return "Unknown";
1221
- for (const category of chunkTXI3QDYE_js.DIALECT_CATEGORIES) {
1560
+ for (const category of chunkAMCFAGK3_js.DIALECT_CATEGORIES) {
1222
1561
  const found = category.dialects.find((d) => d.value === dialect);
1223
1562
  if (found) return found.label;
1224
1563
  }
@@ -1226,12 +1565,12 @@ function getDialectLabel(dialect) {
1226
1565
  }
1227
1566
  function getDialectGradient(dialect) {
1228
1567
  if (!dialect) return "from-gray-400 to-gray-500";
1229
- const category = chunkTXI3QDYE_js.findCategory(dialect);
1568
+ const category = chunkAMCFAGK3_js.findCategory(dialect);
1230
1569
  return category?.gradient ?? "from-gray-400 to-gray-500";
1231
1570
  }
1232
1571
  function getDialectIcon(dialect) {
1233
1572
  if (!dialect) return outline.CircleStackIcon;
1234
- const category = chunkTXI3QDYE_js.findCategory(dialect);
1573
+ const category = chunkAMCFAGK3_js.findCategory(dialect);
1235
1574
  return category?.icon ?? outline.CircleStackIcon;
1236
1575
  }
1237
1576
  var DIALECT_LOGO = {
@@ -1256,11 +1595,7 @@ var DIALECT_LOGO = {
1256
1595
  cockroachdb: "/logos/datasources/cockroachdb.svg",
1257
1596
  supabase: "/logos/datasources/supabase.svg",
1258
1597
  firebase: "/logos/datasources/firebase.svg",
1259
- neo4j: "/logos/datasources/neo4j.svg",
1260
- // AWS managed services (icepanel.io / official AWS Architecture Icons)
1261
- neptune: "/logos/datasources/neptune.svg",
1262
- timestream: "/logos/datasources/timestream.svg",
1263
- opensearch: "/logos/datasources/opensearch.svg"
1598
+ neo4j: "/logos/datasources/neo4j.svg"
1264
1599
  };
1265
1600
  function getDialectLogoSrc(dialect) {
1266
1601
  if (!dialect) return null;
@@ -1270,21 +1605,76 @@ function DatasourcesPageView({
1270
1605
  labels,
1271
1606
  datasources: externalDatasources,
1272
1607
  useSampleData = false,
1273
- onCreate,
1274
- onAddClick
1608
+ onCreate
1275
1609
  }) {
1276
1610
  const [modalOpen, setModalOpen] = react.useState(false);
1277
- const openCreate = () => {
1278
- if (onAddClick) onAddClick();
1279
- else setModalOpen(true);
1280
- };
1281
- const [searchTerm, setSearchTerm] = react.useState("");
1282
1611
  const [localDatasources, setLocalDatasources] = react.useState(
1283
1612
  useSampleData ? SAMPLE_DATASOURCES : []
1284
1613
  );
1285
- const allDatasources = externalDatasources ?? localDatasources;
1286
- const datasources = searchTerm.trim() ? allDatasources.filter((ds) => (ds.name ?? "").toLowerCase().includes(searchTerm.trim().toLowerCase())) : allDatasources;
1287
- const isEmpty = allDatasources.length === 0;
1614
+ const [searchTerm, setSearchTerm] = react.useState("");
1615
+ const [filtersOpen, setFiltersOpen] = react.useState(false);
1616
+ const [selectedDialects, setSelectedDialects] = react.useState([]);
1617
+ const [enabledFilter, setEnabledFilter] = react.useState("all");
1618
+ const [readOnlyFilter, setReadOnlyFilter] = react.useState("all");
1619
+ const datasources = externalDatasources ?? localDatasources;
1620
+ const isEmpty = datasources.length === 0;
1621
+ const filteredDatasources = react.useMemo(() => {
1622
+ const term = searchTerm.trim().toLowerCase();
1623
+ return datasources.filter((ds) => {
1624
+ const name = (ds.name ?? "").toLowerCase();
1625
+ if (term && !name.includes(term)) return false;
1626
+ if (selectedDialects.length > 0 && (!ds.dialect || !selectedDialects.includes(ds.dialect))) return false;
1627
+ if (enabledFilter === "enabled" && !ds.enabled) return false;
1628
+ if (enabledFilter === "disabled" && ds.enabled) return false;
1629
+ if (readOnlyFilter === "readOnly" && !ds.readOnly) return false;
1630
+ if (readOnlyFilter === "writable" && ds.readOnly) return false;
1631
+ return true;
1632
+ });
1633
+ }, [datasources, searchTerm, selectedDialects, enabledFilter, readOnlyFilter]);
1634
+ const dialectChipItems = react.useMemo(
1635
+ () => chunkAMCFAGK3_js.DIALECT_CATEGORIES.flatMap(
1636
+ (cat) => cat.dialects.map((d) => ({
1637
+ id: d.value,
1638
+ name: d.label,
1639
+ style: { bg: `bg-gradient-to-br ${cat.gradient} text-white`, text: "" }
1640
+ }))
1641
+ ),
1642
+ []
1643
+ );
1644
+ const enabledLabelFor = (value) => {
1645
+ if (value === "enabled") return labels.statusEnabled ?? labels.enabled ?? "Ativos";
1646
+ if (value === "disabled") return labels.statusDisabled ?? labels.disabled ?? "Inativos";
1647
+ return labels.statusAll ?? "Todos";
1648
+ };
1649
+ const readOnlyLabelFor = (value) => {
1650
+ if (value === "readOnly") return labels.readOnlyOnly ?? "Somente leitura";
1651
+ if (value === "writable") return labels.writable ?? "Grava\xE7\xE3o";
1652
+ return labels.readOnlyAll ?? "Todos";
1653
+ };
1654
+ const activeFilters = react.useMemo(() => {
1655
+ const chips = [];
1656
+ for (const value of selectedDialects) {
1657
+ chips.push({ type: "dialect", value, label: dialectChipItems.find((i) => i.id === value)?.name ?? value });
1658
+ }
1659
+ if (enabledFilter !== "all") {
1660
+ chips.push({ type: "enabled", value: enabledFilter, label: enabledLabelFor(enabledFilter) });
1661
+ }
1662
+ if (readOnlyFilter !== "all") {
1663
+ chips.push({ type: "readOnly", value: readOnlyFilter, label: readOnlyLabelFor(readOnlyFilter) });
1664
+ }
1665
+ return chips;
1666
+ }, [selectedDialects, enabledFilter, readOnlyFilter, dialectChipItems]);
1667
+ const filterCount = activeFilters.length;
1668
+ const removeFilter = (filter) => {
1669
+ if (filter.type === "dialect") setSelectedDialects((prev) => prev.filter((v) => v !== filter.value));
1670
+ if (filter.type === "enabled") setEnabledFilter("all");
1671
+ if (filter.type === "readOnly") setReadOnlyFilter("all");
1672
+ };
1673
+ const clearAllFilters = () => {
1674
+ setSelectedDialects([]);
1675
+ setEnabledFilter("all");
1676
+ setReadOnlyFilter("all");
1677
+ };
1288
1678
  function handleCreate(data) {
1289
1679
  if (onCreate) {
1290
1680
  onCreate(data);
@@ -1311,7 +1701,7 @@ function DatasourcesPageView({
1311
1701
  }
1312
1702
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
1313
1703
  /* @__PURE__ */ jsxRuntime.jsx(
1314
- chunk6R5Z2IQ5_js.HeroSection,
1704
+ chunk5ETT54QS_js.HeroSection,
1315
1705
  {
1316
1706
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-5 w-5" }),
1317
1707
  label: labels.title,
@@ -1319,70 +1709,96 @@ function DatasourcesPageView({
1319
1709
  subtitle: labels.subtitle,
1320
1710
  gradient: "from-amber-500 to-orange-600",
1321
1711
  toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
1322
- chunk6R5Z2IQ5_js.SearchBar,
1712
+ chunk5ETT54QS_js.SearchBar,
1323
1713
  {
1324
1714
  searchTerm,
1325
1715
  onSearchChange: setSearchTerm,
1326
1716
  placeholder: labels.searchPlaceholder ?? labels.title,
1327
- noBorder: true
1717
+ noBorder: true,
1718
+ activeFilters,
1719
+ onRemoveFilter: removeFilter,
1720
+ onClearAll: filterCount > 0 ? clearAllFilters : void 0,
1721
+ filtersModal: {
1722
+ open: filtersOpen,
1723
+ onOpen: () => setFiltersOpen(true),
1724
+ onClose: () => setFiltersOpen(false),
1725
+ title: labels.filtersTitle ?? "Filtros",
1726
+ count: filterCount,
1727
+ onClear: filterCount > 0 ? clearAllFilters : void 0,
1728
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
1729
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByDialect ?? labels.dialect ?? "Dialeto", children: /* @__PURE__ */ jsxRuntime.jsx(
1730
+ chunk5ETT54QS_js.ChipPicker,
1731
+ {
1732
+ items: dialectChipItems,
1733
+ selectedIds: selectedDialects,
1734
+ onChange: setSelectedDialects,
1735
+ selectedLabel: labels.selected ?? "selecionados",
1736
+ selectAllLabel: labels.selectAll ?? "Selecionar todos",
1737
+ clearLabel: labels.clear ?? "Limpar"
1738
+ }
1739
+ ) }),
1740
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByStatus ?? "Status", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "enabled", "disabled"].map((value) => enabledFilter === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setEnabledFilter(value), children: enabledLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setEnabledFilter(value), children: enabledLabelFor(value) }, value)) }) }),
1741
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByReadOnly ?? "Modo de acesso", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "readOnly", "writable"].map((value) => readOnlyFilter === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setReadOnlyFilter(value), children: readOnlyLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setReadOnlyFilter(value), children: readOnlyLabelFor(value) }, value)) }) })
1742
+ ] })
1743
+ }
1328
1744
  }
1329
1745
  ) : void 0,
1330
1746
  actions: /* @__PURE__ */ jsxRuntime.jsx(
1331
- chunk6R5Z2IQ5_js.CreateActionButton,
1747
+ chunk5ETT54QS_js.CreateActionButton,
1332
1748
  {
1333
1749
  mode: "desktop",
1334
1750
  label: labels.addDatasource,
1335
- onClick: openCreate,
1751
+ onClick: () => setModalOpen(true),
1336
1752
  accent: "amber"
1337
1753
  }
1338
1754
  )
1339
1755
  }
1340
1756
  ),
1341
1757
  /* @__PURE__ */ jsxRuntime.jsx(
1342
- chunk6R5Z2IQ5_js.CreateActionButton,
1758
+ chunk5ETT54QS_js.CreateActionButton,
1343
1759
  {
1344
1760
  mode: "mobile",
1345
1761
  label: labels.addDatasource,
1346
- onClick: openCreate,
1762
+ onClick: () => setModalOpen(true),
1347
1763
  accent: "amber"
1348
1764
  }
1349
1765
  ),
1350
1766
  isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
1351
- chunk6R5Z2IQ5_js.PageEmptyState,
1767
+ chunk5ETT54QS_js.PageEmptyState,
1352
1768
  {
1353
1769
  title: labels.emptyTitle,
1354
1770
  message: labels.emptyDescription,
1355
1771
  iconName: "link",
1356
1772
  customIcon: /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-10 w-10 text-amber-500 dark:text-amber-400" })
1357
1773
  }
1358
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: datasources.map((ds) => {
1774
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredDatasources.map((ds) => {
1359
1775
  const Icon = getDialectIcon(ds.dialect);
1360
1776
  const gradient = getDialectGradient(ds.dialect);
1361
1777
  const dialectLabel = getDialectLabel(ds.dialect);
1362
1778
  const logoSrc = getDialectLogoSrc(ds.dialect);
1363
- const iconElement = logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liquid-surface flex h-11 w-11 items-center justify-center rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSrc, alt: dialectLabel, className: "h-7 w-7 object-contain" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-11 w-11 items-center justify-center rounded-lg bg-gradient-to-br ${gradient} shadow-lg`, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-6 w-6 text-white" }) });
1779
+ const iconElement = logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-white shadow-sm ring-1 ring-black/5 dark:bg-white/10 dark:ring-white/10", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSrc, alt: dialectLabel, className: "h-7 w-7 object-contain" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-11 w-11 items-center justify-center rounded-lg bg-gradient-to-br ${gradient} shadow-lg`, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-6 w-6 text-white" }) });
1364
1780
  return /* @__PURE__ */ jsxRuntime.jsx(
1365
- chunk6R5Z2IQ5_js.EntityCard,
1781
+ chunk5ETT54QS_js.EntityCard,
1366
1782
  {
1367
1783
  accentGradient: gradient,
1368
1784
  icon: iconElement,
1369
1785
  title: ds.name ?? ds.id,
1370
1786
  subtitle: dialectLabel,
1371
1787
  status: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: ds.enabled ? "emerald" : "zinc", children: ds.enabled ? labels.enabled : labels.disabled }),
1372
- footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs text-slate-500 dark:text-slate-400", children: [
1373
- ds.readOnly && /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: "blue", size: "xs", children: "Read-only" }),
1788
+ footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-400 dark:text-gray-500", children: [
1789
+ ds.readOnly && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-blue-100 px-2 py-0.5 text-[10px] font-semibold text-blue-700 dark:bg-blue-900/30 dark:text-blue-300", children: "Read-only" }),
1374
1790
  ds.timeoutMs && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
1375
1791
  ds.timeoutMs / 1e3,
1376
1792
  "s timeout"
1377
1793
  ] })
1378
1794
  ] }),
1379
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 text-xs text-slate-500 dark:text-slate-400", children: [
1795
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 text-xs text-gray-500 dark:text-gray-400", children: [
1380
1796
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1381
1797
  labels.dialect,
1382
1798
  ": ",
1383
1799
  dialectLabel
1384
1800
  ] }),
1385
- ds.slug && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "truncate text-slate-400 dark:text-slate-500", children: [
1801
+ ds.slug && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "truncate text-gray-400", children: [
1386
1802
  "/",
1387
1803
  ds.slug
1388
1804
  ] })
@@ -1392,7 +1808,7 @@ function DatasourcesPageView({
1392
1808
  );
1393
1809
  }) }),
1394
1810
  /* @__PURE__ */ jsxRuntime.jsx(
1395
- chunkTXI3QDYE_js.DatasourceModal,
1811
+ chunkAMCFAGK3_js.DatasourceModal,
1396
1812
  {
1397
1813
  open: modalOpen,
1398
1814
  onClose: () => setModalOpen(false),
@@ -1421,7 +1837,7 @@ function AgentsIndexPageView({ labels }) {
1421
1837
  const filteredTiles = searchTerm.trim() ? allTiles.filter((tile) => tile.title.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allTiles;
1422
1838
  const isEmpty = allTiles.length === 0;
1423
1839
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
1424
- chunk6R5Z2IQ5_js.HeroSection,
1840
+ chunk5ETT54QS_js.HeroSection,
1425
1841
  {
1426
1842
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
1427
1843
  label: labels.title,
@@ -1429,7 +1845,7 @@ function AgentsIndexPageView({ labels }) {
1429
1845
  subtitle: labels.subtitle,
1430
1846
  gradient: "from-violet-500 to-indigo-700",
1431
1847
  toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
1432
- chunk6R5Z2IQ5_js.SearchBar,
1848
+ chunk5ETT54QS_js.SearchBar,
1433
1849
  {
1434
1850
  searchTerm,
1435
1851
  onSearchChange: setSearchTerm,
@@ -1442,7 +1858,7 @@ function AgentsIndexPageView({ labels }) {
1442
1858
  const content = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4", children: filteredTiles.map((tile) => {
1443
1859
  const Icon = tile.icon;
1444
1860
  return /* @__PURE__ */ jsxRuntime.jsx(Link, { href: tile.href, className: "block focus:outline-none", children: /* @__PURE__ */ jsxRuntime.jsx(
1445
- chunk6R5Z2IQ5_js.EntityCard,
1861
+ chunk5ETT54QS_js.EntityCard,
1446
1862
  {
1447
1863
  accentGradient: tile.gradient,
1448
1864
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-11 w-11 items-center justify-center rounded-lg bg-gradient-to-br ${tile.gradient} shadow-lg`, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-6 w-6 text-white" }) }),
@@ -1460,7 +1876,7 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
1460
1876
  const selectedWorkflow = workflows[0] ?? null;
1461
1877
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
1462
1878
  /* @__PURE__ */ jsxRuntime.jsx(
1463
- chunk6R5Z2IQ5_js.SectionHeader,
1879
+ chunk5ETT54QS_js.SectionHeader,
1464
1880
  {
1465
1881
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.RectangleStackIcon, { className: "h-5 w-5 text-white" }),
1466
1882
  title: labels.title,
@@ -1469,9 +1885,9 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
1469
1885
  }
1470
1886
  ),
1471
1887
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
1472
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.add }),
1888
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.add }),
1473
1889
  /* @__PURE__ */ jsxRuntime.jsx(
1474
- chunk6R5Z2IQ5_js.Form,
1890
+ chunk5ETT54QS_js.Form,
1475
1891
  {
1476
1892
  onSubmit: (event) => {
1477
1893
  event.preventDefault();
@@ -1482,32 +1898,32 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
1482
1898
  onCreate({ name, description });
1483
1899
  event.currentTarget.reset();
1484
1900
  },
1485
- children: /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
1486
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormInput, { name: "name", label: labels.workflowName, placeholder: labels.workflowNamePlaceholder, required: true }),
1487
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.workflowDescriptionPlaceholder, rows: 3 }),
1488
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormActionsRow, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "submit", children: labels.create }) })
1901
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
1902
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormInput, { name: "name", label: labels.workflowName, placeholder: labels.workflowNamePlaceholder, required: true }),
1903
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.workflowDescriptionPlaceholder, rows: 3 }),
1904
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormActionsRow, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "submit", children: labels.create }) })
1489
1905
  ] })
1490
1906
  }
1491
1907
  )
1492
1908
  ] }),
1493
1909
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
1494
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.registry }),
1495
- /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.Table, { children: [
1496
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TableHead, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.TableRow, { children: [
1497
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TableHeader, { children: labels.name }),
1498
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TableHeader, { children: labels.description }),
1499
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TableHeader, { children: labels.version }),
1500
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TableHeader, { children: labels.status }),
1501
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TableHeader, { children: labels.actions })
1910
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.registry }),
1911
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.Table, { children: [
1912
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TableHead, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.TableRow, { children: [
1913
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TableHeader, { children: labels.name }),
1914
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TableHeader, { children: labels.description }),
1915
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TableHeader, { children: labels.version }),
1916
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TableHeader, { children: labels.status }),
1917
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TableHeader, { children: labels.actions })
1502
1918
  ] }) }),
1503
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TableBody, { children: workflows.map((workflow) => /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.TableRow, { children: [
1504
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TableCell, { children: workflow.name }),
1505
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TableCell, { children: workflow.description }),
1506
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TableCell, { children: String(workflow.version) }),
1507
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { children: workflow.isDraft ? labels.statusDraft : labels.statusPublished }) }),
1508
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
1919
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TableBody, { children: workflows.map((workflow) => /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.TableRow, { children: [
1920
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TableCell, { children: workflow.name }),
1921
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TableCell, { children: workflow.description }),
1922
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TableCell, { children: String(workflow.version) }),
1923
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { children: workflow.isDraft ? labels.statusDraft : labels.statusPublished }) }),
1924
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
1509
1925
  /* @__PURE__ */ jsxRuntime.jsx(
1510
- chunk6R5Z2IQ5_js.Form,
1926
+ chunk5ETT54QS_js.Form,
1511
1927
  {
1512
1928
  onSubmit: (event) => {
1513
1929
  event.preventDefault();
@@ -1517,7 +1933,7 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
1517
1933
  description: workflow.description ?? ""
1518
1934
  });
1519
1935
  },
1520
- children: /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.InlineForm, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "submit", outline: true, children: labels.saveMeta }) })
1936
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.InlineForm, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "submit", outline: true, children: labels.saveMeta }) })
1521
1937
  }
1522
1938
  ),
1523
1939
  /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", color: "sky", onClick: () => onPublish(workflow.id), children: labels.publish })
@@ -1526,8 +1942,8 @@ function WorkflowsPageView({ labels, workflows, onCreate, onUpdateMeta, onPublis
1526
1942
  ] })
1527
1943
  ] }),
1528
1944
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "liquid-surface rounded-2xl p-4 space-y-3", children: [
1529
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.workspace }),
1530
- selectedWorkflow ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-[680px] rounded-2xl border border-white/65 dark:border-white/12 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(chunkGDVB7QDZ_js.WorkflowWorkspace, { graph: chunk3T2WGL47_js.adaptWorkflowGraphToUi(selectedWorkflow.graph) }) }) : /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.Text, { children: labels.empty })
1945
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.Text, { className: "font-semibold text-slate-900 dark:text-slate-100", children: labels.workspace }),
1946
+ selectedWorkflow ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-[680px] rounded-2xl border border-white/65 dark:border-white/12 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(chunkIIRS5XZY_js.WorkflowWorkspace, { graph: chunk3T2WGL47_js.adaptWorkflowGraphToUi(selectedWorkflow.graph) }) }) : /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.Text, { children: labels.empty })
1531
1947
  ] })
1532
1948
  ] });
1533
1949
  }
@@ -1577,7 +1993,7 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
1577
1993
  });
1578
1994
  const isEmpty = allRuns.length === 0;
1579
1995
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
1580
- chunk6R5Z2IQ5_js.HeroSection,
1996
+ chunk5ETT54QS_js.HeroSection,
1581
1997
  {
1582
1998
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-5 w-5" }),
1583
1999
  label: labels.title,
@@ -1585,7 +2001,7 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
1585
2001
  subtitle: labels.subtitle,
1586
2002
  gradient: "from-indigo-500 to-sky-700",
1587
2003
  toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
1588
- chunk6R5Z2IQ5_js.SearchBar,
2004
+ chunk5ETT54QS_js.SearchBar,
1589
2005
  {
1590
2006
  searchTerm,
1591
2007
  onSearchChange: setSearchTerm,
@@ -1599,7 +2015,7 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
1599
2015
  count: statusFilter !== "all" ? 1 : 0,
1600
2016
  onClear: statusFilter !== "all" ? () => setStatusFilter("all") : void 0,
1601
2017
  children: /* @__PURE__ */ jsxRuntime.jsx(
1602
- chunk6R5Z2IQ5_js.FormSelect,
2018
+ chunk5ETT54QS_js.FormSelect,
1603
2019
  {
1604
2020
  name: "statusFilter",
1605
2021
  label: labels.filterStatus,
@@ -1613,8 +2029,8 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
1613
2029
  ) : void 0
1614
2030
  }
1615
2031
  );
1616
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageLoadingState, {}) : filteredRuns.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredRuns.map((run) => /* @__PURE__ */ jsxRuntime.jsxs(
1617
- chunk6R5Z2IQ5_js.EntityCard,
2032
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageLoadingState, {}) : filteredRuns.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredRuns.map((run) => /* @__PURE__ */ jsxRuntime.jsxs(
2033
+ chunk5ETT54QS_js.EntityCard,
1618
2034
  {
1619
2035
  accentGradient: "from-indigo-500 to-sky-700",
1620
2036
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-indigo-500/10 text-indigo-600 dark:bg-indigo-500/20 dark:text-indigo-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-6 w-6" }) }),
@@ -1646,7 +2062,7 @@ function WorkflowRunsPageView({ labels, runs, loading, onCancel, onReplay, onVie
1646
2062
  }
1647
2063
  function RunTimelinePageView({ labels, entries, loading, runId }) {
1648
2064
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
1649
- chunk6R5Z2IQ5_js.HeroSection,
2065
+ chunk5ETT54QS_js.HeroSection,
1650
2066
  {
1651
2067
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ClockIcon, { className: "h-5 w-5" }),
1652
2068
  label: labels.title,
@@ -1658,19 +2074,19 @@ function RunTimelinePageView({ labels, entries, loading, runId }) {
1658
2074
  if (loading) {
1659
2075
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
1660
2076
  hero,
1661
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageLoadingState, {})
2077
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageLoadingState, {})
1662
2078
  ] });
1663
2079
  }
1664
2080
  if (entries.length === 0) {
1665
2081
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
1666
2082
  hero,
1667
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageEmptyState, { title: labels.empty ?? "", message: "", iconName: "folder-open" })
2083
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageEmptyState, { title: labels.empty ?? "", message: "", iconName: "folder-open" })
1668
2084
  ] });
1669
2085
  }
1670
2086
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
1671
2087
  hero,
1672
2088
  /* @__PURE__ */ jsxRuntime.jsx(
1673
- chunkY4YIGEX6_js.ExecutionTimelinePanel,
2089
+ chunkMQDCUBVW_js.ExecutionTimelinePanel,
1674
2090
  {
1675
2091
  entries,
1676
2092
  labels
@@ -1746,16 +2162,74 @@ function ConnectionsPageView({
1746
2162
  onUpdate,
1747
2163
  onDelete,
1748
2164
  onCreateSecret,
1749
- secretNamePrefix = "platform"
2165
+ secretNamePrefix = "platform",
2166
+ onAddClick
1750
2167
  }) {
2168
+ const openCreate = () => {
2169
+ if (onAddClick) onAddClick();
2170
+ else setCreateOpen(true);
2171
+ };
1751
2172
  const [createOpen, setCreateOpen] = react.useState(false);
1752
2173
  const [editing, setEditing] = react.useState(null);
1753
2174
  const [searchTerm, setSearchTerm] = react.useState("");
2175
+ const [filtersOpen, setFiltersOpen] = react.useState(false);
2176
+ const [selectedProviders, setSelectedProviders] = react.useState([]);
2177
+ const [selectedRegions, setSelectedRegions] = react.useState([]);
1754
2178
  const allConnections = connections;
1755
- const filteredConnections = searchTerm.trim() ? allConnections.filter((conn) => conn.name.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allConnections;
1756
2179
  const isEmpty = allConnections.length === 0;
2180
+ const filteredConnections = react.useMemo(() => {
2181
+ const term = searchTerm.trim().toLowerCase();
2182
+ return allConnections.filter((conn) => {
2183
+ if (term && !conn.name.toLowerCase().includes(term)) return false;
2184
+ if (selectedProviders.length > 0) {
2185
+ const provider = conn.providerSlug ?? "";
2186
+ if (!selectedProviders.includes(provider)) return false;
2187
+ }
2188
+ if (selectedRegions.length > 0) {
2189
+ const region = conn.region ?? "";
2190
+ if (!selectedRegions.includes(region)) return false;
2191
+ }
2192
+ return true;
2193
+ });
2194
+ }, [allConnections, searchTerm, selectedProviders, selectedRegions]);
2195
+ const providerChipItems = react.useMemo(
2196
+ () => [...new Set(allConnections.map((c) => c.providerSlug ?? "").filter((p) => p.length > 0))].sort().map((slug) => ({
2197
+ id: slug,
2198
+ name: providerLabel(slug),
2199
+ style: { bg: "bg-sky-500/15 text-sky-700 dark:text-sky-300", text: "" }
2200
+ })),
2201
+ [allConnections]
2202
+ );
2203
+ const regionChipItems = react.useMemo(
2204
+ () => [...new Set(allConnections.map((c) => c.region ?? "").filter((r) => r.length > 0))].sort().map((region) => ({
2205
+ id: region,
2206
+ name: region,
2207
+ style: { bg: "bg-indigo-500/15 text-indigo-700 dark:text-indigo-300", text: "" }
2208
+ })),
2209
+ [allConnections]
2210
+ );
2211
+ const activeFilters = react.useMemo(() => {
2212
+ const chips = [];
2213
+ for (const value of selectedProviders) {
2214
+ const label = providerChipItems.find((i) => i.id === value)?.name ?? providerLabel(value);
2215
+ chips.push({ type: "provider", value, label });
2216
+ }
2217
+ for (const value of selectedRegions) {
2218
+ chips.push({ type: "region", value, label: value });
2219
+ }
2220
+ return chips;
2221
+ }, [selectedProviders, selectedRegions, providerChipItems]);
2222
+ const filterCount = activeFilters.length;
2223
+ const removeFilter = (filter) => {
2224
+ if (filter.type === "provider") setSelectedProviders((prev) => prev.filter((p) => p !== filter.value));
2225
+ if (filter.type === "region") setSelectedRegions((prev) => prev.filter((r) => r !== filter.value));
2226
+ };
2227
+ const clearAllFilters = () => {
2228
+ setSelectedProviders([]);
2229
+ setSelectedRegions([]);
2230
+ };
1757
2231
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
1758
- chunk6R5Z2IQ5_js.HeroSection,
2232
+ chunk5ETT54QS_js.HeroSection,
1759
2233
  {
1760
2234
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.LinkIcon, { className: "h-5 w-5" }),
1761
2235
  label: labels.title,
@@ -1763,27 +2237,62 @@ function ConnectionsPageView({
1763
2237
  subtitle: labels.subtitle,
1764
2238
  gradient: "from-sky-500 to-indigo-600",
1765
2239
  toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
1766
- chunk6R5Z2IQ5_js.SearchBar,
2240
+ chunk5ETT54QS_js.SearchBar,
1767
2241
  {
1768
2242
  searchTerm,
1769
2243
  onSearchChange: setSearchTerm,
1770
2244
  placeholder: labels.searchPlaceholder ?? labels.title,
1771
- noBorder: true
2245
+ noBorder: true,
2246
+ activeFilters,
2247
+ onRemoveFilter: removeFilter,
2248
+ onClearAll: filterCount > 0 ? clearAllFilters : void 0,
2249
+ filtersModal: {
2250
+ open: filtersOpen,
2251
+ onOpen: () => setFiltersOpen(true),
2252
+ onClose: () => setFiltersOpen(false),
2253
+ title: labels.filtersTitle ?? "Filtros",
2254
+ count: filterCount,
2255
+ onClear: filterCount > 0 ? clearAllFilters : void 0,
2256
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
2257
+ providerChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByProvider ?? "Provedor", children: /* @__PURE__ */ jsxRuntime.jsx(
2258
+ chunk5ETT54QS_js.ChipPicker,
2259
+ {
2260
+ items: providerChipItems,
2261
+ selectedIds: selectedProviders,
2262
+ onChange: setSelectedProviders,
2263
+ selectedLabel: labels.selected ?? "selecionados",
2264
+ selectAllLabel: labels.selectAll ?? "Selecionar todos",
2265
+ clearLabel: labels.clear ?? "Limpar"
2266
+ }
2267
+ ) }),
2268
+ regionChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByRegion ?? "Regi\xE3o", children: /* @__PURE__ */ jsxRuntime.jsx(
2269
+ chunk5ETT54QS_js.ChipPicker,
2270
+ {
2271
+ items: regionChipItems,
2272
+ selectedIds: selectedRegions,
2273
+ onChange: setSelectedRegions,
2274
+ selectedLabel: labels.selected ?? "selecionados",
2275
+ selectAllLabel: labels.selectAll ?? "Selecionar todos",
2276
+ clearLabel: labels.clear ?? "Limpar"
2277
+ }
2278
+ ) })
2279
+ ] })
2280
+ }
1772
2281
  }
1773
2282
  ) : void 0,
1774
2283
  actions: /* @__PURE__ */ jsxRuntime.jsx(
1775
- chunk6R5Z2IQ5_js.CreateActionButton,
2284
+ chunk5ETT54QS_js.CreateActionButton,
1776
2285
  {
1777
2286
  mode: "desktop",
1778
2287
  label: labels.add,
1779
- onClick: () => setCreateOpen(true),
2288
+ onClick: openCreate,
1780
2289
  accent: "sky"
1781
2290
  }
1782
2291
  )
1783
2292
  }
1784
2293
  );
1785
2294
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
1786
- chunk6R5Z2IQ5_js.CreateActionButton,
2295
+ chunk5ETT54QS_js.CreateActionButton,
1787
2296
  {
1788
2297
  mode: "mobile",
1789
2298
  label: labels.add,
@@ -1791,8 +2300,8 @@ function ConnectionsPageView({
1791
2300
  accent: "sky"
1792
2301
  }
1793
2302
  );
1794
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredConnections.map((conn) => /* @__PURE__ */ jsxRuntime.jsx(
1795
- chunk6R5Z2IQ5_js.EntityCard,
2303
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredConnections.map((conn) => /* @__PURE__ */ jsxRuntime.jsx(
2304
+ chunk5ETT54QS_js.EntityCard,
1796
2305
  {
1797
2306
  accentGradient: "from-sky-500 to-indigo-600",
1798
2307
  icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-sky-500/10 text-sky-600 dark:bg-sky-500/20 dark:text-sky-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.LinkIcon, { className: "h-6 w-6" }) }),
@@ -1944,7 +2453,7 @@ function ConnectionEditor({
1944
2453
  return preset.exampleModels?.join(", ") ?? "";
1945
2454
  }, [preset]);
1946
2455
  return /* @__PURE__ */ jsxRuntime.jsx(
1947
- chunk6R5Z2IQ5_js.GlassModal,
2456
+ chunk5ETT54QS_js.GlassModal,
1948
2457
  {
1949
2458
  open: true,
1950
2459
  onClose,
@@ -1957,9 +2466,9 @@ function ConnectionEditor({
1957
2466
  void handleSubmit();
1958
2467
  },
1959
2468
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
1960
- /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
2469
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
1961
2470
  /* @__PURE__ */ jsxRuntime.jsx(
1962
- chunk6R5Z2IQ5_js.FormSelect,
2471
+ chunk5ETT54QS_js.FormSelect,
1963
2472
  {
1964
2473
  label: "Provider",
1965
2474
  value: value.providerSlug,
@@ -1970,7 +2479,7 @@ function ConnectionEditor({
1970
2479
  }
1971
2480
  ),
1972
2481
  /* @__PURE__ */ jsxRuntime.jsx(
1973
- chunk6R5Z2IQ5_js.FormInput,
2482
+ chunk5ETT54QS_js.FormInput,
1974
2483
  {
1975
2484
  label: "Display name",
1976
2485
  required: true,
@@ -1980,7 +2489,7 @@ function ConnectionEditor({
1980
2489
  }
1981
2490
  ),
1982
2491
  preset.needsRegion && /* @__PURE__ */ jsxRuntime.jsx(
1983
- chunk6R5Z2IQ5_js.FormInput,
2492
+ chunk5ETT54QS_js.FormInput,
1984
2493
  {
1985
2494
  label: "Region",
1986
2495
  value: value.region,
@@ -1989,7 +2498,7 @@ function ConnectionEditor({
1989
2498
  }
1990
2499
  ),
1991
2500
  preset.needsEndpoint && /* @__PURE__ */ jsxRuntime.jsx(
1992
- chunk6R5Z2IQ5_js.FormInput,
2501
+ chunk5ETT54QS_js.FormInput,
1993
2502
  {
1994
2503
  label: "Endpoint URL",
1995
2504
  value: value.endpoint,
@@ -1999,7 +2508,7 @@ function ConnectionEditor({
1999
2508
  )
2000
2509
  ] }),
2001
2510
  /* @__PURE__ */ jsxRuntime.jsx(
2002
- chunk6R5Z2IQ5_js.FormInput,
2511
+ chunk5ETT54QS_js.FormInput,
2003
2512
  {
2004
2513
  label: value.credentialRef ? "Rotate API key (leave blank to keep current)" : "API key",
2005
2514
  type: "password",
@@ -2010,7 +2519,7 @@ function ConnectionEditor({
2010
2519
  }
2011
2520
  ),
2012
2521
  /* @__PURE__ */ jsxRuntime.jsx(
2013
- chunk6R5Z2IQ5_js.FormInput,
2522
+ chunk5ETT54QS_js.FormInput,
2014
2523
  {
2015
2524
  label: "Model filter (comma-separated, optional)",
2016
2525
  value: value.modelFilter,
@@ -2022,7 +2531,7 @@ function ConnectionEditor({
2022
2531
  /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 text-sm dark:border-slate-700 dark:bg-slate-900/40", children: [
2023
2532
  /* @__PURE__ */ jsxRuntime.jsx("summary", { className: "cursor-pointer font-medium text-slate-700 dark:text-slate-200", children: "Advanced config (JSON)" }),
2024
2533
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsx(
2025
- chunk6R5Z2IQ5_js.FormTextarea,
2534
+ chunk5ETT54QS_js.FormTextarea,
2026
2535
  {
2027
2536
  rows: 4,
2028
2537
  value: value.configJson,
@@ -2082,25 +2591,110 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
2082
2591
  const [createOpen, setCreateOpen] = react.useState(false);
2083
2592
  const [rotateFor, setRotateFor] = react.useState(null);
2084
2593
  const [searchTerm, setSearchTerm] = react.useState("");
2085
- const allCredentials = credentials;
2086
- const filteredCredentials = searchTerm.trim() ? allCredentials.filter((secret) => secret.name.toLowerCase().includes(searchTerm.trim().toLowerCase())) : allCredentials;
2087
- const isEmpty = allCredentials.length === 0;
2594
+ const [filtersOpen, setFiltersOpen] = react.useState(false);
2595
+ const [selectedTypes, setSelectedTypes] = react.useState([]);
2596
+ const [disabledFilter, setDisabledFilter] = react.useState("all");
2597
+ const isEmpty = credentials.length === 0;
2088
2598
  const typeOptions = [
2089
2599
  { value: "generic", label: labels.typeGeneric },
2090
2600
  { value: "api_key", label: labels.typeApiKey },
2091
2601
  { value: "oauth", label: labels.typeOAuth },
2092
2602
  { value: "password", label: labels.typePassword }
2093
2603
  ];
2604
+ const typeLabelMap = {
2605
+ generic: labels.typeGeneric,
2606
+ api_key: labels.typeApiKey,
2607
+ oauth: labels.typeOAuth,
2608
+ password: labels.typePassword
2609
+ };
2610
+ const filteredCredentials = react.useMemo(() => {
2611
+ const term = searchTerm.trim().toLowerCase();
2612
+ return credentials.filter((secret) => {
2613
+ if (term && !secret.name.toLowerCase().includes(term)) return false;
2614
+ if (selectedTypes.length > 0 && !selectedTypes.includes(secret.secretType)) return false;
2615
+ if (disabledFilter === "active" && secret.disabled) return false;
2616
+ if (disabledFilter === "disabled" && !secret.disabled) return false;
2617
+ return true;
2618
+ });
2619
+ }, [credentials, searchTerm, selectedTypes, disabledFilter]);
2620
+ const typeChipItems = react.useMemo(
2621
+ () => [...new Set(credentials.map((c) => c.secretType).filter((t) => t.length > 0))].sort().map((type) => ({
2622
+ id: type,
2623
+ name: typeLabelMap[type] ?? type,
2624
+ style: { bg: "bg-rose-500/15 text-rose-700 dark:text-rose-300", text: "" }
2625
+ })),
2626
+ // typeLabelMap is derived from `labels` props — re-derive when those change
2627
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2628
+ [credentials, labels.typeGeneric, labels.typeApiKey, labels.typeOAuth, labels.typePassword]
2629
+ );
2630
+ const statusLabelFor = (value) => {
2631
+ if (value === "active") return labels.statusActive ?? "Ativo";
2632
+ if (value === "disabled") return labels.statusDisabled ?? labels.disable;
2633
+ return labels.statusAll ?? "Todos";
2634
+ };
2635
+ const activeFilters = react.useMemo(() => {
2636
+ const chips = [];
2637
+ for (const value of selectedTypes) {
2638
+ chips.push({ type: "secretType", value, label: typeChipItems.find((i) => i.id === value)?.name ?? value });
2639
+ }
2640
+ if (disabledFilter !== "all") {
2641
+ chips.push({ type: "disabled", value: disabledFilter, label: statusLabelFor(disabledFilter) });
2642
+ }
2643
+ return chips;
2644
+ }, [selectedTypes, disabledFilter, typeChipItems]);
2645
+ const filterCount = activeFilters.length;
2646
+ const removeFilter = (filter) => {
2647
+ if (filter.type === "secretType") setSelectedTypes((prev) => prev.filter((v) => v !== filter.value));
2648
+ if (filter.type === "disabled") setDisabledFilter("all");
2649
+ };
2650
+ const clearAllFilters = () => {
2651
+ setSelectedTypes([]);
2652
+ setDisabledFilter("all");
2653
+ };
2094
2654
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
2095
- chunk6R5Z2IQ5_js.HeroSection,
2655
+ chunk5ETT54QS_js.HeroSection,
2096
2656
  {
2097
2657
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-5 w-5" }),
2098
2658
  label: labels.title,
2099
2659
  title: labels.title,
2100
2660
  subtitle: labels.subtitle,
2101
2661
  gradient: "from-rose-500 to-orange-600",
2102
- toolbar: /* @__PURE__ */ jsxRuntime.jsx(
2103
- chunk6R5Z2IQ5_js.CreateActionButton,
2662
+ toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
2663
+ chunk5ETT54QS_js.SearchBar,
2664
+ {
2665
+ searchTerm,
2666
+ onSearchChange: setSearchTerm,
2667
+ placeholder: labels.searchPlaceholder ?? labels.title,
2668
+ noBorder: true,
2669
+ activeFilters,
2670
+ onRemoveFilter: removeFilter,
2671
+ onClearAll: filterCount > 0 ? clearAllFilters : void 0,
2672
+ filtersModal: {
2673
+ open: filtersOpen,
2674
+ onOpen: () => setFiltersOpen(true),
2675
+ onClose: () => setFiltersOpen(false),
2676
+ title: labels.filtersTitle ?? "Filtros",
2677
+ count: filterCount,
2678
+ onClear: filterCount > 0 ? clearAllFilters : void 0,
2679
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
2680
+ typeChipItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByType ?? "Tipo", children: /* @__PURE__ */ jsxRuntime.jsx(
2681
+ chunk5ETT54QS_js.ChipPicker,
2682
+ {
2683
+ items: typeChipItems,
2684
+ selectedIds: selectedTypes,
2685
+ onChange: setSelectedTypes,
2686
+ selectedLabel: labels.selected ?? "selecionados",
2687
+ selectAllLabel: labels.selectAll ?? "Selecionar todos",
2688
+ clearLabel: labels.clear ?? "Limpar"
2689
+ }
2690
+ ) }),
2691
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSection, { title: labels.filterByStatus ?? "Status", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: ["all", "active", "disabled"].map((value) => disabledFilter === value ? /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", color: "ios-glass-blue", onClick: () => setDisabledFilter(value), children: statusLabelFor(value) }, value) : /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setDisabledFilter(value), children: statusLabelFor(value) }, value)) }) })
2692
+ ] })
2693
+ }
2694
+ }
2695
+ ) : void 0,
2696
+ actions: /* @__PURE__ */ jsxRuntime.jsx(
2697
+ chunk5ETT54QS_js.CreateActionButton,
2104
2698
  {
2105
2699
  mode: "desktop",
2106
2700
  label: labels.addCredential,
@@ -2111,7 +2705,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
2111
2705
  }
2112
2706
  );
2113
2707
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
2114
- chunk6R5Z2IQ5_js.CreateActionButton,
2708
+ chunk5ETT54QS_js.CreateActionButton,
2115
2709
  {
2116
2710
  mode: "mobile",
2117
2711
  label: labels.addCredential,
@@ -2119,60 +2713,50 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
2119
2713
  accent: "rose"
2120
2714
  }
2121
2715
  );
2122
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2123
- /* @__PURE__ */ jsxRuntime.jsx(
2124
- chunk6R5Z2IQ5_js.SearchBar,
2125
- {
2126
- searchTerm,
2127
- onSearchChange: setSearchTerm,
2128
- placeholder: labels.searchPlaceholder ?? labels.title
2129
- }
2130
- ),
2131
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredCredentials.map((secret) => /* @__PURE__ */ jsxRuntime.jsxs(
2132
- chunk6R5Z2IQ5_js.EntityCard,
2133
- {
2134
- accentGradient: "from-rose-500 to-orange-700",
2135
- icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-rose-500/10 text-rose-600 dark:bg-rose-500/20 dark:text-rose-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-6 w-6" }) }),
2136
- title: secret.name,
2137
- subtitle: secret.secretType,
2138
- status: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: secret.disabled ? "zinc" : "emerald", children: secret.disabled ? labels.disable : "Active" }),
2139
- footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
2140
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.CopyableId, { id: secret.secretId }),
2141
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
2142
- /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setRotateFor(secret), children: [
2143
- /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathIcon, { className: "mr-1 h-3.5 w-3.5" }),
2144
- labels.rotate
2145
- ] }),
2146
- !secret.disabled && /* @__PURE__ */ jsxRuntime.jsxs(
2147
- chunkBHOT22QL_js.Button,
2148
- {
2149
- type: "button",
2150
- size: "sm",
2151
- color: "rose",
2152
- onClick: () => {
2153
- if (window.confirm(labels.disableConfirm)) onDisable(secret);
2154
- },
2155
- children: [
2156
- /* @__PURE__ */ jsxRuntime.jsx(outline.TrashIcon, { className: "mr-1 h-3.5 w-3.5" }),
2157
- labels.disable
2158
- ]
2159
- }
2160
- )
2161
- ] })
2162
- ] }),
2163
- children: [
2164
- secret.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: secret.description }),
2165
- /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-2 grid grid-cols-2 gap-1 text-xs text-slate-500 dark:text-slate-400", children: [
2166
- /* @__PURE__ */ jsxRuntime.jsx("dt", { children: labels.createdAt }),
2167
- /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-right", children: new Date(secret.createdAt).toLocaleDateString() }),
2168
- /* @__PURE__ */ jsxRuntime.jsx("dt", { children: labels.expiresAt }),
2169
- /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-right", children: secret.expiresAt ? new Date(secret.expiresAt).toLocaleDateString() : labels.neverExpires })
2170
- ] })
2171
- ]
2172
- },
2173
- secret.secretId
2174
- )) })
2175
- ] });
2716
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageEmptyState, { title: labels.empty, message: labels.subtitle, iconName: "folder-open" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: filteredCredentials.map((secret) => /* @__PURE__ */ jsxRuntime.jsxs(
2717
+ chunk5ETT54QS_js.EntityCard,
2718
+ {
2719
+ accentGradient: "from-rose-500 to-orange-700",
2720
+ icon: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-11 w-11 items-center justify-center rounded-lg bg-rose-500/10 text-rose-600 dark:bg-rose-500/20 dark:text-rose-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-6 w-6" }) }),
2721
+ title: secret.name,
2722
+ subtitle: secret.secretType,
2723
+ status: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: secret.disabled ? "zinc" : "emerald", children: secret.disabled ? labels.disable : "Active" }),
2724
+ footer: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
2725
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.CopyableId, { id: secret.secretId }),
2726
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
2727
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => setRotateFor(secret), children: [
2728
+ /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathIcon, { className: "mr-1 h-3.5 w-3.5" }),
2729
+ labels.rotate
2730
+ ] }),
2731
+ !secret.disabled && /* @__PURE__ */ jsxRuntime.jsxs(
2732
+ chunkBHOT22QL_js.Button,
2733
+ {
2734
+ type: "button",
2735
+ size: "sm",
2736
+ color: "rose",
2737
+ onClick: () => {
2738
+ if (window.confirm(labels.disableConfirm)) onDisable(secret);
2739
+ },
2740
+ children: [
2741
+ /* @__PURE__ */ jsxRuntime.jsx(outline.TrashIcon, { className: "mr-1 h-3.5 w-3.5" }),
2742
+ labels.disable
2743
+ ]
2744
+ }
2745
+ )
2746
+ ] })
2747
+ ] }),
2748
+ children: [
2749
+ secret.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-500 dark:text-slate-400", children: secret.description }),
2750
+ /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-2 grid grid-cols-2 gap-1 text-xs text-slate-500 dark:text-slate-400", children: [
2751
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { children: labels.createdAt }),
2752
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-right", children: new Date(secret.createdAt).toLocaleDateString() }),
2753
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { children: labels.expiresAt }),
2754
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-right", children: secret.expiresAt ? new Date(secret.expiresAt).toLocaleDateString() : labels.neverExpires })
2755
+ ] })
2756
+ ]
2757
+ },
2758
+ secret.secretId
2759
+ )) });
2176
2760
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2177
2761
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
2178
2762
  hero,
@@ -2180,7 +2764,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
2180
2764
  mobileAction
2181
2765
  ] }),
2182
2766
  /* @__PURE__ */ jsxRuntime.jsx(
2183
- chunk6R5Z2IQ5_js.GlassModal,
2767
+ chunk5ETT54QS_js.GlassModal,
2184
2768
  {
2185
2769
  open: createOpen,
2186
2770
  onClose: () => setCreateOpen(false),
@@ -2198,16 +2782,16 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
2198
2782
  onCreate({ name, value, secretType, description });
2199
2783
  setCreateOpen(false);
2200
2784
  },
2201
- children: /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
2202
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormInput, { name: "name", label: labels.name, placeholder: labels.namePlaceholder, required: true }),
2203
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormSelect, { name: "secretType", label: labels.type, options: typeOptions, defaultValue: "generic" }),
2204
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }),
2205
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.descriptionPlaceholder, rows: 2 })
2785
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
2786
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormInput, { name: "name", label: labels.name, placeholder: labels.namePlaceholder, required: true }),
2787
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSelect, { name: "secretType", label: labels.type, options: typeOptions, defaultValue: "generic" }),
2788
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }),
2789
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormTextarea, { name: "description", label: labels.description, placeholder: labels.descriptionPlaceholder, rows: 2 })
2206
2790
  ] })
2207
2791
  }
2208
2792
  ),
2209
2793
  /* @__PURE__ */ jsxRuntime.jsx(
2210
- chunk6R5Z2IQ5_js.GlassModal,
2794
+ chunk5ETT54QS_js.GlassModal,
2211
2795
  {
2212
2796
  open: rotateFor !== null,
2213
2797
  onClose: () => setRotateFor(null),
@@ -2222,7 +2806,7 @@ function CredentialsPageView({ labels, credentials, loading, onCreate, onRotate,
2222
2806
  onRotate(rotateFor, value);
2223
2807
  setRotateFor(null);
2224
2808
  },
2225
- children: /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormGrid, { children: /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }) })
2809
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormGrid, { children: /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormInput, { name: "value", label: labels.value, placeholder: labels.valuePlaceholder, required: true, type: "password" }) })
2226
2810
  }
2227
2811
  )
2228
2812
  ] });
@@ -2275,7 +2859,7 @@ function AgentsWorkspacePageView({
2275
2859
  }, [agents, selectedId]);
2276
2860
  const isEmpty = agents.length === 0;
2277
2861
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
2278
- chunk6R5Z2IQ5_js.HeroSection,
2862
+ chunk5ETT54QS_js.HeroSection,
2279
2863
  {
2280
2864
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-5 w-5" }),
2281
2865
  label: labels.title,
@@ -2283,7 +2867,7 @@ function AgentsWorkspacePageView({
2283
2867
  subtitle: labels.subtitle,
2284
2868
  gradient: "from-violet-500 to-indigo-700",
2285
2869
  toolbar: !isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
2286
- chunk6R5Z2IQ5_js.SearchBar,
2870
+ chunk5ETT54QS_js.SearchBar,
2287
2871
  {
2288
2872
  searchTerm,
2289
2873
  onSearchChange: setSearchTerm,
@@ -2292,7 +2876,7 @@ function AgentsWorkspacePageView({
2292
2876
  }
2293
2877
  ) : void 0,
2294
2878
  actions: /* @__PURE__ */ jsxRuntime.jsx(
2295
- chunk6R5Z2IQ5_js.CreateActionButton,
2879
+ chunk5ETT54QS_js.CreateActionButton,
2296
2880
  {
2297
2881
  mode: "desktop",
2298
2882
  label: labels.addAgent,
@@ -2303,7 +2887,7 @@ function AgentsWorkspacePageView({
2303
2887
  }
2304
2888
  );
2305
2889
  const mobileAction = /* @__PURE__ */ jsxRuntime.jsx(
2306
- chunk6R5Z2IQ5_js.CreateActionButton,
2890
+ chunk5ETT54QS_js.CreateActionButton,
2307
2891
  {
2308
2892
  mode: "mobile",
2309
2893
  label: labels.addAgent,
@@ -2311,23 +2895,23 @@ function AgentsWorkspacePageView({
2311
2895
  accent: "violet"
2312
2896
  }
2313
2897
  );
2314
- const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
2315
- chunk6R5Z2IQ5_js.PageEmptyState,
2898
+ const content = loading ? /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.PageLoadingState, {}) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
2899
+ chunk5ETT54QS_js.PageEmptyState,
2316
2900
  {
2317
2901
  title: labels.empty,
2318
2902
  message: labels.emptyMessage,
2319
2903
  iconName: "folder-open"
2320
2904
  }
2321
2905
  ) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-[20rem_minmax(0,1fr)]", children: [
2322
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:sticky lg:top-4", children: /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.ListCard, { variant: "glass", children: filteredAgents.map((agent) => {
2906
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:sticky lg:top-4", children: /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.ListCard, { variant: "glass", children: filteredAgents.map((agent) => {
2323
2907
  const id = String(agent.agentId ?? agent.id ?? "");
2324
2908
  const active = id === selectedId;
2325
2909
  const initials = deriveInitials(String(agent.name ?? id));
2326
2910
  const modelName = models.find((m) => m.id === String(agent.modelId ?? ""))?.name ?? String(agent.modelId ?? "");
2327
2911
  return /* @__PURE__ */ jsxRuntime.jsx(
2328
- chunk6R5Z2IQ5_js.ListCardItem,
2912
+ chunk5ETT54QS_js.ListCardItem,
2329
2913
  {
2330
- leading: /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.Avatar, { tone: active ? "violet" : "slate", initials }),
2914
+ leading: /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.Avatar, { tone: active ? "violet" : "slate", initials }),
2331
2915
  trailing: agent.activePromptVersion > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Badge, { color: "emerald", children: [
2332
2916
  "v",
2333
2917
  agent.activePromptVersion
@@ -2369,7 +2953,7 @@ function AgentsWorkspacePageView({
2369
2953
  },
2370
2954
  String(selectedAgent.agentId ?? selectedAgent.id ?? "")
2371
2955
  ) : /* @__PURE__ */ jsxRuntime.jsx(
2372
- chunk6R5Z2IQ5_js.SectionCard,
2956
+ chunk5ETT54QS_js.SectionCard,
2373
2957
  {
2374
2958
  header: {
2375
2959
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-4 w-4" }),
@@ -2377,7 +2961,7 @@ function AgentsWorkspacePageView({
2377
2961
  subtitle: labels.noSelectionMessage
2378
2962
  },
2379
2963
  children: /* @__PURE__ */ jsxRuntime.jsx(
2380
- chunk6R5Z2IQ5_js.PageEmptyState,
2964
+ chunk5ETT54QS_js.PageEmptyState,
2381
2965
  {
2382
2966
  title: labels.noSelection,
2383
2967
  message: labels.noSelectionMessage,
@@ -2411,7 +2995,7 @@ function AgentDetail({
2411
2995
  }) {
2412
2996
  const agentId = String(agent.agentId ?? agent.id ?? "");
2413
2997
  return /* @__PURE__ */ jsxRuntime.jsx(
2414
- chunk6R5Z2IQ5_js.SectionCard,
2998
+ chunk5ETT54QS_js.SectionCard,
2415
2999
  {
2416
3000
  header: {
2417
3001
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-4 w-4" }),
@@ -2436,15 +3020,15 @@ function AgentDetail({
2436
3020
  ]
2437
3021
  }
2438
3022
  ),
2439
- children: /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.Tabs, { defaultValue: "general", className: "w-full", children: [
2440
- /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.TabsList, { className: "bg-white/40 dark:bg-white/[0.06]", children: [
2441
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TabsTrigger, { value: "general", children: labels.generalTab }),
2442
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TabsTrigger, { value: "prompt", children: labels.promptTab }),
2443
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TabsTrigger, { value: "tools", children: labels.toolsTab }),
2444
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TabsTrigger, { value: "model", children: labels.modelTab })
3023
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.Tabs, { defaultValue: "general", className: "w-full", children: [
3024
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.TabsList, { className: "bg-white/40 dark:bg-white/[0.06]", children: [
3025
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TabsTrigger, { value: "general", children: labels.generalTab }),
3026
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TabsTrigger, { value: "prompt", children: labels.promptTab }),
3027
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TabsTrigger, { value: "tools", children: labels.toolsTab }),
3028
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TabsTrigger, { value: "model", children: labels.modelTab })
2445
3029
  ] }),
2446
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TabsContent, { value: "general", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(GeneralTab, { agent, labels, onSubmit: (input) => onUpdateAgent(agentId, input) }) }),
2447
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TabsContent, { value: "prompt", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
3030
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TabsContent, { value: "general", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(GeneralTab, { agent, labels, onSubmit: (input) => onUpdateAgent(agentId, input) }) }),
3031
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TabsContent, { value: "prompt", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
2448
3032
  PromptTab,
2449
3033
  {
2450
3034
  agent,
@@ -2454,7 +3038,7 @@ function AgentDetail({
2454
3038
  onActivate: (promptId) => onActivatePrompt(agentId, promptId)
2455
3039
  }
2456
3040
  ) }),
2457
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TabsContent, { value: "tools", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
3041
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TabsContent, { value: "tools", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
2458
3042
  ToolsTab,
2459
3043
  {
2460
3044
  agent,
@@ -2464,7 +3048,7 @@ function AgentDetail({
2464
3048
  onDetach: (toolId) => onDetachTool(agentId, toolId)
2465
3049
  }
2466
3050
  ) }),
2467
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.TabsContent, { value: "model", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
3051
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.TabsContent, { value: "model", className: "space-y-4 pt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
2468
3052
  ModelTab,
2469
3053
  {
2470
3054
  agent,
@@ -2496,7 +3080,7 @@ function GeneralTab({
2496
3080
  const initialRole = String(agent.role ?? "");
2497
3081
  const initialStatus = String(agent.status ?? "draft");
2498
3082
  return /* @__PURE__ */ jsxRuntime.jsx(
2499
- chunk6R5Z2IQ5_js.SectionCard,
3083
+ chunk5ETT54QS_js.SectionCard,
2500
3084
  {
2501
3085
  variant: "glass",
2502
3086
  header: {
@@ -2525,10 +3109,10 @@ function GeneralTab({
2525
3109
  },
2526
3110
  className: "space-y-4",
2527
3111
  children: [
2528
- /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
2529
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormInput, { name: "name", label: labels.name, defaultValue: initial.name, required: true }),
3112
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
3113
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormInput, { name: "name", label: labels.name, defaultValue: initial.name, required: true }),
2530
3114
  /* @__PURE__ */ jsxRuntime.jsx(
2531
- chunk6R5Z2IQ5_js.FormSelect,
3115
+ chunk5ETT54QS_js.FormSelect,
2532
3116
  {
2533
3117
  name: "status",
2534
3118
  label: labels.status,
@@ -2540,9 +3124,9 @@ function GeneralTab({
2540
3124
  ]
2541
3125
  }
2542
3126
  ),
2543
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormInput, { name: "role", label: labels.role, placeholder: labels.rolePlaceholder, defaultValue: initialRole }),
3127
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormInput, { name: "role", label: labels.role, placeholder: labels.rolePlaceholder, defaultValue: initialRole }),
2544
3128
  /* @__PURE__ */ jsxRuntime.jsx(
2545
- chunk6R5Z2IQ5_js.FormInput,
3129
+ chunk5ETT54QS_js.FormInput,
2546
3130
  {
2547
3131
  name: "maxTokens",
2548
3132
  label: labels.maxTokens,
@@ -2551,7 +3135,7 @@ function GeneralTab({
2551
3135
  }
2552
3136
  ),
2553
3137
  /* @__PURE__ */ jsxRuntime.jsx(
2554
- chunk6R5Z2IQ5_js.FormInput,
3138
+ chunk5ETT54QS_js.FormInput,
2555
3139
  {
2556
3140
  name: "temperature",
2557
3141
  label: labels.temperature,
@@ -2563,7 +3147,7 @@ function GeneralTab({
2563
3147
  }
2564
3148
  )
2565
3149
  ] }),
2566
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormTextarea, { name: "description", label: labels.description, defaultValue: initialDescription, rows: 3 }),
3150
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormTextarea, { name: "description", label: labels.description, defaultValue: initialDescription, rows: 3 }),
2567
3151
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "submit", color: "indigo", disabled: submitting, children: submitting ? labels.saving : labels.save }) })
2568
3152
  ]
2569
3153
  }
@@ -2583,7 +3167,7 @@ function PromptTab({
2583
3167
  const currentSystem = String(agent.systemPrompt ?? "");
2584
3168
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
2585
3169
  /* @__PURE__ */ jsxRuntime.jsx(
2586
- chunk6R5Z2IQ5_js.SectionCard,
3170
+ chunk5ETT54QS_js.SectionCard,
2587
3171
  {
2588
3172
  variant: "glass",
2589
3173
  header: {
@@ -2595,7 +3179,7 @@ function PromptTab({
2595
3179
  }
2596
3180
  ),
2597
3181
  /* @__PURE__ */ jsxRuntime.jsx(
2598
- chunk6R5Z2IQ5_js.SectionCard,
3182
+ chunk5ETT54QS_js.SectionCard,
2599
3183
  {
2600
3184
  variant: "glass",
2601
3185
  header: {
@@ -2606,10 +3190,10 @@ function PromptTab({
2606
3190
  /* @__PURE__ */ jsxRuntime.jsx(outline.PlusIcon, { className: "h-4 w-4" }),
2607
3191
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1.5", children: labels.addPrompt })
2608
3192
  ] }),
2609
- children: prompts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.promptVersionsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.ListCard, { children: prompts.map((prompt) => {
3193
+ children: prompts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.promptVersionsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.ListCard, { children: prompts.map((prompt) => {
2610
3194
  const id = `${prompt.agentId}:${prompt.locale}:${prompt.version}`;
2611
3195
  return /* @__PURE__ */ jsxRuntime.jsxs(
2612
- chunk6R5Z2IQ5_js.ListCardItem,
3196
+ chunk5ETT54QS_js.ListCardItem,
2613
3197
  {
2614
3198
  leading: /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Badge, { color: prompt.isActive ? "emerald" : "zinc", children: [
2615
3199
  "v",
@@ -2627,7 +3211,7 @@ function PromptTab({
2627
3211
  }
2628
3212
  ),
2629
3213
  addOpen && /* @__PURE__ */ jsxRuntime.jsx(
2630
- chunk6R5Z2IQ5_js.GlassModal,
3214
+ chunk5ETT54QS_js.GlassModal,
2631
3215
  {
2632
3216
  open: true,
2633
3217
  onClose: () => setAddOpen(false),
@@ -2648,10 +3232,10 @@ function PromptTab({
2648
3232
  });
2649
3233
  setAddOpen(false);
2650
3234
  },
2651
- children: /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
2652
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormSelect, { name: "locale", label: labels.promptLocale, options: LOCALE_OPTIONS2, defaultValue: "en" }),
3235
+ children: /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
3236
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormSelect, { name: "locale", label: labels.promptLocale, options: LOCALE_OPTIONS2, defaultValue: "en" }),
2653
3237
  /* @__PURE__ */ jsxRuntime.jsx(
2654
- chunk6R5Z2IQ5_js.FormSelect,
3238
+ chunk5ETT54QS_js.FormSelect,
2655
3239
  {
2656
3240
  name: "isActive",
2657
3241
  label: labels.promptIsActive,
@@ -2662,10 +3246,10 @@ function PromptTab({
2662
3246
  defaultValue: "true"
2663
3247
  }
2664
3248
  ),
2665
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormInput, { name: "reason", label: labels.promptReason }),
2666
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormTextarea, { name: "systemPrompt", label: labels.promptSystemPrompt, rows: 3 }),
2667
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormTextarea, { name: "userTemplate", label: labels.promptUserTemplate, rows: 3 }),
2668
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormTextarea, { name: "prompt", label: labels.promptText, rows: 6, required: true })
3249
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormInput, { name: "reason", label: labels.promptReason }),
3250
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormTextarea, { name: "systemPrompt", label: labels.promptSystemPrompt, rows: 3 }),
3251
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormTextarea, { name: "userTemplate", label: labels.promptUserTemplate, rows: 3 }),
3252
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormTextarea, { name: "prompt", label: labels.promptText, rows: 6, required: true })
2669
3253
  ] })
2670
3254
  }
2671
3255
  )
@@ -2688,15 +3272,15 @@ function ToolsTab({
2688
3272
  const availableTools = tools.filter((tool) => !attachedSet.has(tool.agentToolId));
2689
3273
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
2690
3274
  /* @__PURE__ */ jsxRuntime.jsx(
2691
- chunk6R5Z2IQ5_js.SectionCard,
3275
+ chunk5ETT54QS_js.SectionCard,
2692
3276
  {
2693
3277
  variant: "glass",
2694
3278
  header: {
2695
3279
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-4 w-4" }),
2696
3280
  title: labels.toolsAttached
2697
3281
  },
2698
- children: attachedTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.toolsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.ListCard, { children: attachedTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsxs(
2699
- chunk6R5Z2IQ5_js.ListCardItem,
3282
+ children: attachedTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.toolsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.ListCard, { children: attachedTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsxs(
3283
+ chunk5ETT54QS_js.ListCardItem,
2700
3284
  {
2701
3285
  leading: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-amber-500/10 text-amber-600 dark:bg-amber-500/20 dark:text-amber-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5" }) }),
2702
3286
  trailing: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", size: "sm", outline: true, onClick: () => onDetach(tool.agentToolId), children: labels.detachTool }),
@@ -2710,15 +3294,15 @@ function ToolsTab({
2710
3294
  }
2711
3295
  ),
2712
3296
  /* @__PURE__ */ jsxRuntime.jsx(
2713
- chunk6R5Z2IQ5_js.SectionCard,
3297
+ chunk5ETT54QS_js.SectionCard,
2714
3298
  {
2715
3299
  variant: "glass",
2716
3300
  header: {
2717
3301
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-4 w-4" }),
2718
3302
  title: labels.toolsAvailable
2719
3303
  },
2720
- children: availableTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.toolsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.ListCard, { children: availableTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsxs(
2721
- chunk6R5Z2IQ5_js.ListCardItem,
3304
+ children: availableTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-500 dark:text-slate-400", children: labels.toolsEmpty }) : /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.ListCard, { children: availableTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsxs(
3305
+ chunk5ETT54QS_js.ListCardItem,
2722
3306
  {
2723
3307
  leading: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-slate-500/10 text-slate-600 dark:bg-slate-500/20 dark:text-slate-300", children: /* @__PURE__ */ jsxRuntime.jsx(outline.WrenchScrewdriverIcon, { className: "h-5 w-5" }) }),
2724
3308
  trailing: /* @__PURE__ */ jsxRuntime.jsxs(chunkBHOT22QL_js.Button, { type: "button", size: "sm", color: "indigo", onClick: () => onAttach(tool.agentToolId), children: [
@@ -2759,7 +3343,7 @@ function ModelTab({
2759
3343
  return matches.length > 0 ? matches : connections;
2760
3344
  }, [selectedModel, connections]);
2761
3345
  return /* @__PURE__ */ jsxRuntime.jsx(
2762
- chunk6R5Z2IQ5_js.SectionCard,
3346
+ chunk5ETT54QS_js.SectionCard,
2763
3347
  {
2764
3348
  variant: "glass",
2765
3349
  header: {
@@ -2780,9 +3364,9 @@ function ModelTab({
2780
3364
  },
2781
3365
  className: "space-y-4",
2782
3366
  children: [
2783
- /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
3367
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
2784
3368
  /* @__PURE__ */ jsxRuntime.jsx(
2785
- chunk6R5Z2IQ5_js.FormSelect,
3369
+ chunk5ETT54QS_js.FormSelect,
2786
3370
  {
2787
3371
  label: labels.model,
2788
3372
  value: modelId,
@@ -2791,7 +3375,7 @@ function ModelTab({
2791
3375
  }
2792
3376
  ),
2793
3377
  /* @__PURE__ */ jsxRuntime.jsx(
2794
- chunk6R5Z2IQ5_js.FormSelect,
3378
+ chunk5ETT54QS_js.FormSelect,
2795
3379
  {
2796
3380
  label: labels.connection,
2797
3381
  value: connectionId,
@@ -3081,7 +3665,7 @@ function AgentNewWizardPageView({
3081
3665
  }
3082
3666
  const counter = labels.wizardStepCounter.replace("{current}", String(step)).replace("{total}", String(TOTAL_STEPS));
3083
3667
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
3084
- chunk6R5Z2IQ5_js.HeroSection,
3668
+ chunk5ETT54QS_js.HeroSection,
3085
3669
  {
3086
3670
  icon: /* @__PURE__ */ jsxRuntime.jsx(
3087
3671
  "div",
@@ -3096,7 +3680,7 @@ function AgentNewWizardPageView({
3096
3680
  subtitle: stepSubtitles[step - 1],
3097
3681
  gradient: activePreset.accent,
3098
3682
  children: /* @__PURE__ */ jsxRuntime.jsx(
3099
- chunk6R5Z2IQ5_js.StepIndicator,
3683
+ chunk5ETT54QS_js.StepIndicator,
3100
3684
  {
3101
3685
  accent: "indigo",
3102
3686
  currentStep: step - 1,
@@ -3109,7 +3693,7 @@ function AgentNewWizardPageView({
3109
3693
  );
3110
3694
  function renderStep1() {
3111
3695
  return /* @__PURE__ */ jsxRuntime.jsx(
3112
- chunk6R5Z2IQ5_js.SectionCard,
3696
+ chunk5ETT54QS_js.SectionCard,
3113
3697
  {
3114
3698
  variant: "glass",
3115
3699
  header: {
@@ -3125,7 +3709,7 @@ function AgentNewWizardPageView({
3125
3709
  children: AGENT_PRESETS.map((preset) => {
3126
3710
  const selected = preset.id === presetId;
3127
3711
  return /* @__PURE__ */ jsxRuntime.jsx(
3128
- chunk6R5Z2IQ5_js.FilterTileButton,
3712
+ chunk5ETT54QS_js.FilterTileButton,
3129
3713
  {
3130
3714
  isActive: selected,
3131
3715
  color: preset.tileColor,
@@ -3144,7 +3728,7 @@ function AgentNewWizardPageView({
3144
3728
  }
3145
3729
  function renderStep2() {
3146
3730
  return /* @__PURE__ */ jsxRuntime.jsx(
3147
- chunk6R5Z2IQ5_js.SectionCard,
3731
+ chunk5ETT54QS_js.SectionCard,
3148
3732
  {
3149
3733
  variant: "glass",
3150
3734
  header: {
@@ -3172,9 +3756,9 @@ function AgentNewWizardPageView({
3172
3756
  e
3173
3757
  )) })
3174
3758
  ] }),
3175
- /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
3759
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
3176
3760
  /* @__PURE__ */ jsxRuntime.jsx(
3177
- chunk6R5Z2IQ5_js.FormInput,
3761
+ chunk5ETT54QS_js.FormInput,
3178
3762
  {
3179
3763
  label: labels.name,
3180
3764
  value: name,
@@ -3187,7 +3771,7 @@ function AgentNewWizardPageView({
3187
3771
  }
3188
3772
  ),
3189
3773
  /* @__PURE__ */ jsxRuntime.jsx(
3190
- chunk6R5Z2IQ5_js.FormInput,
3774
+ chunk5ETT54QS_js.FormInput,
3191
3775
  {
3192
3776
  label: labels.role,
3193
3777
  value: role,
@@ -3200,7 +3784,7 @@ function AgentNewWizardPageView({
3200
3784
  )
3201
3785
  ] }),
3202
3786
  /* @__PURE__ */ jsxRuntime.jsx(
3203
- chunk6R5Z2IQ5_js.FormTextarea,
3787
+ chunk5ETT54QS_js.FormTextarea,
3204
3788
  {
3205
3789
  label: labels.descriptionLabel,
3206
3790
  value: description,
@@ -3218,7 +3802,7 @@ function AgentNewWizardPageView({
3218
3802
  }
3219
3803
  function renderStep3() {
3220
3804
  return /* @__PURE__ */ jsxRuntime.jsx(
3221
- chunk6R5Z2IQ5_js.SectionCard,
3805
+ chunk5ETT54QS_js.SectionCard,
3222
3806
  {
3223
3807
  variant: "glass",
3224
3808
  header: {
@@ -3226,9 +3810,9 @@ function AgentNewWizardPageView({
3226
3810
  subtitle: labels.connectionPickPrompt
3227
3811
  },
3228
3812
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
3229
- /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
3813
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
3230
3814
  /* @__PURE__ */ jsxRuntime.jsx(
3231
- chunk6R5Z2IQ5_js.FormSelect,
3815
+ chunk5ETT54QS_js.FormSelect,
3232
3816
  {
3233
3817
  label: labels.connectionLabel,
3234
3818
  value: connectionId,
@@ -3241,7 +3825,7 @@ function AgentNewWizardPageView({
3241
3825
  }
3242
3826
  ),
3243
3827
  /* @__PURE__ */ jsxRuntime.jsx(
3244
- chunk6R5Z2IQ5_js.FormSelect,
3828
+ chunk5ETT54QS_js.FormSelect,
3245
3829
  {
3246
3830
  label: labels.frameworkLabel,
3247
3831
  value: framework,
@@ -3253,7 +3837,7 @@ function AgentNewWizardPageView({
3253
3837
  }
3254
3838
  ),
3255
3839
  /* @__PURE__ */ jsxRuntime.jsx(
3256
- chunk6R5Z2IQ5_js.FormSelect,
3840
+ chunk5ETT54QS_js.FormSelect,
3257
3841
  {
3258
3842
  label: labels.model,
3259
3843
  value: modelId,
@@ -3266,7 +3850,7 @@ function AgentNewWizardPageView({
3266
3850
  )
3267
3851
  ] }),
3268
3852
  /* @__PURE__ */ jsxRuntime.jsx(
3269
- chunk6R5Z2IQ5_js.FormTextarea,
3853
+ chunk5ETT54QS_js.FormTextarea,
3270
3854
  {
3271
3855
  label: labels.outputSchemaLabel,
3272
3856
  value: outputSchema,
@@ -3285,7 +3869,7 @@ function AgentNewWizardPageView({
3285
3869
  function renderStep4() {
3286
3870
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
3287
3871
  /* @__PURE__ */ jsxRuntime.jsx(
3288
- chunk6R5Z2IQ5_js.SectionCard,
3872
+ chunk5ETT54QS_js.SectionCard,
3289
3873
  {
3290
3874
  variant: "glass",
3291
3875
  header: {
@@ -3445,7 +4029,7 @@ function AgentNewWizardPageView({
3445
4029
  }
3446
4030
  ),
3447
4031
  /* @__PURE__ */ jsxRuntime.jsx(
3448
- chunk6R5Z2IQ5_js.SectionCard,
4032
+ chunk5ETT54QS_js.SectionCard,
3449
4033
  {
3450
4034
  variant: "glass",
3451
4035
  header: {
@@ -3488,7 +4072,7 @@ function AgentNewWizardPageView({
3488
4072
  }) })
3489
4073
  ] }),
3490
4074
  /* @__PURE__ */ jsxRuntime.jsx(
3491
- chunk6R5Z2IQ5_js.FormInput,
4075
+ chunk5ETT54QS_js.FormInput,
3492
4076
  {
3493
4077
  label: labels.tagsLabel,
3494
4078
  value: tagsInput,
@@ -3509,7 +4093,7 @@ function AgentNewWizardPageView({
3509
4093
  const connectionLabel = connectionId ? connections.find((c) => c.id === connectionId)?.name ?? labels.connectionInline : labels.connectionInline;
3510
4094
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
3511
4095
  /* @__PURE__ */ jsxRuntime.jsx(
3512
- chunk6R5Z2IQ5_js.SectionCard,
4096
+ chunk5ETT54QS_js.SectionCard,
3513
4097
  {
3514
4098
  variant: "glass",
3515
4099
  header: {
@@ -3524,7 +4108,7 @@ function AgentNewWizardPageView({
3524
4108
  }
3525
4109
  ),
3526
4110
  /* @__PURE__ */ jsxRuntime.jsx(
3527
- chunk6R5Z2IQ5_js.SectionCard,
4111
+ chunk5ETT54QS_js.SectionCard,
3528
4112
  {
3529
4113
  variant: "glass",
3530
4114
  header: {
@@ -3553,7 +4137,7 @@ function AgentNewWizardPageView({
3553
4137
  }
3554
4138
  ),
3555
4139
  /* @__PURE__ */ jsxRuntime.jsx(
3556
- chunk6R5Z2IQ5_js.SectionCard,
4140
+ chunk5ETT54QS_js.SectionCard,
3557
4141
  {
3558
4142
  variant: "glass",
3559
4143
  header: {
@@ -3573,7 +4157,7 @@ function AgentNewWizardPageView({
3573
4157
  }
3574
4158
  ),
3575
4159
  /* @__PURE__ */ jsxRuntime.jsxs(
3576
- chunk6R5Z2IQ5_js.SectionCard,
4160
+ chunk5ETT54QS_js.SectionCard,
3577
4161
  {
3578
4162
  variant: "glass",
3579
4163
  header: {
@@ -3722,8 +4306,8 @@ function DatasourceNewWizardPageView({
3722
4306
  const [submitting, setSubmitting] = react.useState(false);
3723
4307
  const [touched, setTouched] = react.useState(false);
3724
4308
  const [testStatus, setTestStatus] = react.useState("idle");
3725
- const dialectOption = react.useMemo(() => dialect ? chunkTXI3QDYE_js.findDialect(dialect) : null, [dialect]);
3726
- const category = react.useMemo(() => dialect ? chunkTXI3QDYE_js.findCategory(dialect) : null, [dialect]);
4309
+ const dialectOption = react.useMemo(() => dialect ? chunkAMCFAGK3_js.findDialect(dialect) : null, [dialect]);
4310
+ const category = react.useMemo(() => dialect ? chunkAMCFAGK3_js.findCategory(dialect) : null, [dialect]);
3727
4311
  react.useEffect(() => {
3728
4312
  if (dialectOption?.defaultPort && (port === "" || /^[0-9]+$/.test(port))) {
3729
4313
  setPort(String(dialectOption.defaultPort));
@@ -3848,7 +4432,7 @@ function DatasourceNewWizardPageView({
3848
4432
  }));
3849
4433
  const counter = labels.wizardStepCounter.replace("{current}", String(step)).replace("{total}", String(TOTAL_STEPS2));
3850
4434
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
3851
- chunk6R5Z2IQ5_js.HeroSection,
4435
+ chunk5ETT54QS_js.HeroSection,
3852
4436
  {
3853
4437
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CircleStackIcon, { className: "h-5 w-5" }),
3854
4438
  label: counter,
@@ -3856,7 +4440,7 @@ function DatasourceNewWizardPageView({
3856
4440
  subtitle: stepSubtitles[step - 1] ?? labels.pageSubtitle,
3857
4441
  gradient: category?.gradient ?? "from-amber-500 to-orange-600",
3858
4442
  children: /* @__PURE__ */ jsxRuntime.jsx(
3859
- chunk6R5Z2IQ5_js.StepIndicator,
4443
+ chunk5ETT54QS_js.StepIndicator,
3860
4444
  {
3861
4445
  accent: "indigo",
3862
4446
  currentStep: step - 1,
@@ -3868,11 +4452,11 @@ function DatasourceNewWizardPageView({
3868
4452
  }
3869
4453
  );
3870
4454
  function renderStep1() {
3871
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-6", children: chunkTXI3QDYE_js.DIALECT_CATEGORIES.map((cat) => {
4455
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-6", children: chunkAMCFAGK3_js.DIALECT_CATEGORIES.map((cat) => {
3872
4456
  const color = CATEGORY_COLOR[cat.id] ?? "slate";
3873
4457
  const categoryLabel = labels[cat.labelKey] ?? cat.id;
3874
4458
  return /* @__PURE__ */ jsxRuntime.jsx(
3875
- chunk6R5Z2IQ5_js.SectionCard,
4459
+ chunk5ETT54QS_js.SectionCard,
3876
4460
  {
3877
4461
  variant: "glass",
3878
4462
  header: {
@@ -3890,7 +4474,7 @@ function DatasourceNewWizardPageView({
3890
4474
  const selected = opt.value === dialect;
3891
4475
  const logoSrc = DIALECT_LOGO_SRC[opt.value.toLowerCase()];
3892
4476
  return /* @__PURE__ */ jsxRuntime.jsx(
3893
- chunk6R5Z2IQ5_js.FilterTileButton,
4477
+ chunk5ETT54QS_js.FilterTileButton,
3894
4478
  {
3895
4479
  isActive: selected,
3896
4480
  color,
@@ -3918,7 +4502,7 @@ function DatasourceNewWizardPageView({
3918
4502
  case "standard":
3919
4503
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3920
4504
  /* @__PURE__ */ jsxRuntime.jsx(
3921
- chunk6R5Z2IQ5_js.FormInput,
4505
+ chunk5ETT54QS_js.FormInput,
3922
4506
  {
3923
4507
  label: labels.fieldHost,
3924
4508
  value: host,
@@ -3931,7 +4515,7 @@ function DatasourceNewWizardPageView({
3931
4515
  }
3932
4516
  ),
3933
4517
  /* @__PURE__ */ jsxRuntime.jsx(
3934
- chunk6R5Z2IQ5_js.FormInput,
4518
+ chunk5ETT54QS_js.FormInput,
3935
4519
  {
3936
4520
  label: labels.fieldPort,
3937
4521
  type: "number",
@@ -3943,7 +4527,7 @@ function DatasourceNewWizardPageView({
3943
4527
  }
3944
4528
  ),
3945
4529
  /* @__PURE__ */ jsxRuntime.jsx(
3946
- chunk6R5Z2IQ5_js.FormInput,
4530
+ chunk5ETT54QS_js.FormInput,
3947
4531
  {
3948
4532
  label: labels.fieldDatabase,
3949
4533
  value: database,
@@ -3956,7 +4540,7 @@ function DatasourceNewWizardPageView({
3956
4540
  }
3957
4541
  ),
3958
4542
  /* @__PURE__ */ jsxRuntime.jsx(
3959
- chunk6R5Z2IQ5_js.FormInput,
4543
+ chunk5ETT54QS_js.FormInput,
3960
4544
  {
3961
4545
  label: labels.fieldUsername,
3962
4546
  value: username,
@@ -3968,7 +4552,7 @@ function DatasourceNewWizardPageView({
3968
4552
  }
3969
4553
  ),
3970
4554
  /* @__PURE__ */ jsxRuntime.jsx(
3971
- chunk6R5Z2IQ5_js.FormInput,
4555
+ chunk5ETT54QS_js.FormInput,
3972
4556
  {
3973
4557
  label: labels.fieldPassword,
3974
4558
  type: "password",
@@ -3981,7 +4565,7 @@ function DatasourceNewWizardPageView({
3981
4565
  }
3982
4566
  ),
3983
4567
  /* @__PURE__ */ jsxRuntime.jsx(
3984
- chunk6R5Z2IQ5_js.FormInput,
4568
+ chunk5ETT54QS_js.FormInput,
3985
4569
  {
3986
4570
  label: labels.fieldSchema,
3987
4571
  value: schema,
@@ -3995,7 +4579,7 @@ function DatasourceNewWizardPageView({
3995
4579
  ] });
3996
4580
  case "connection-string":
3997
4581
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-full", children: /* @__PURE__ */ jsxRuntime.jsx(
3998
- chunk6R5Z2IQ5_js.FormInput,
4582
+ chunk5ETT54QS_js.FormInput,
3999
4583
  {
4000
4584
  label: labels.fieldConnectionString,
4001
4585
  value: connectionString,
@@ -4010,7 +4594,7 @@ function DatasourceNewWizardPageView({
4010
4594
  case "cloud-bigquery":
4011
4595
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4012
4596
  /* @__PURE__ */ jsxRuntime.jsx(
4013
- chunk6R5Z2IQ5_js.FormInput,
4597
+ chunk5ETT54QS_js.FormInput,
4014
4598
  {
4015
4599
  label: labels.fieldProjectId,
4016
4600
  value: projectId,
@@ -4023,7 +4607,7 @@ function DatasourceNewWizardPageView({
4023
4607
  }
4024
4608
  ),
4025
4609
  /* @__PURE__ */ jsxRuntime.jsx(
4026
- chunk6R5Z2IQ5_js.FormInput,
4610
+ chunk5ETT54QS_js.FormInput,
4027
4611
  {
4028
4612
  label: labels.fieldDataset,
4029
4613
  value: dataset,
@@ -4036,7 +4620,7 @@ function DatasourceNewWizardPageView({
4036
4620
  }
4037
4621
  ),
4038
4622
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-full", children: /* @__PURE__ */ jsxRuntime.jsx(
4039
- chunk6R5Z2IQ5_js.FormInput,
4623
+ chunk5ETT54QS_js.FormInput,
4040
4624
  {
4041
4625
  label: labels.fieldKeyFile,
4042
4626
  value: keyFile,
@@ -4051,7 +4635,7 @@ function DatasourceNewWizardPageView({
4051
4635
  case "cloud-snowflake":
4052
4636
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4053
4637
  /* @__PURE__ */ jsxRuntime.jsx(
4054
- chunk6R5Z2IQ5_js.FormInput,
4638
+ chunk5ETT54QS_js.FormInput,
4055
4639
  {
4056
4640
  label: labels.fieldAccount,
4057
4641
  value: account,
@@ -4064,7 +4648,7 @@ function DatasourceNewWizardPageView({
4064
4648
  }
4065
4649
  ),
4066
4650
  /* @__PURE__ */ jsxRuntime.jsx(
4067
- chunk6R5Z2IQ5_js.FormInput,
4651
+ chunk5ETT54QS_js.FormInput,
4068
4652
  {
4069
4653
  label: labels.fieldWarehouse,
4070
4654
  value: warehouseField,
@@ -4077,7 +4661,7 @@ function DatasourceNewWizardPageView({
4077
4661
  }
4078
4662
  ),
4079
4663
  /* @__PURE__ */ jsxRuntime.jsx(
4080
- chunk6R5Z2IQ5_js.FormInput,
4664
+ chunk5ETT54QS_js.FormInput,
4081
4665
  {
4082
4666
  label: labels.fieldDatabase,
4083
4667
  value: database,
@@ -4090,7 +4674,7 @@ function DatasourceNewWizardPageView({
4090
4674
  }
4091
4675
  ),
4092
4676
  /* @__PURE__ */ jsxRuntime.jsx(
4093
- chunk6R5Z2IQ5_js.FormInput,
4677
+ chunk5ETT54QS_js.FormInput,
4094
4678
  {
4095
4679
  label: labels.fieldUsername,
4096
4680
  value: username,
@@ -4103,7 +4687,7 @@ function DatasourceNewWizardPageView({
4103
4687
  }
4104
4688
  ),
4105
4689
  /* @__PURE__ */ jsxRuntime.jsx(
4106
- chunk6R5Z2IQ5_js.FormInput,
4690
+ chunk5ETT54QS_js.FormInput,
4107
4691
  {
4108
4692
  label: labels.fieldPassword,
4109
4693
  type: "password",
@@ -4116,7 +4700,7 @@ function DatasourceNewWizardPageView({
4116
4700
  }
4117
4701
  ),
4118
4702
  /* @__PURE__ */ jsxRuntime.jsx(
4119
- chunk6R5Z2IQ5_js.FormInput,
4703
+ chunk5ETT54QS_js.FormInput,
4120
4704
  {
4121
4705
  label: labels.fieldSchema,
4122
4706
  value: schema,
@@ -4131,7 +4715,7 @@ function DatasourceNewWizardPageView({
4131
4715
  case "cloud-key":
4132
4716
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4133
4717
  /* @__PURE__ */ jsxRuntime.jsx(
4134
- chunk6R5Z2IQ5_js.FormInput,
4718
+ chunk5ETT54QS_js.FormInput,
4135
4719
  {
4136
4720
  label: labels.fieldRegion,
4137
4721
  value: region,
@@ -4144,7 +4728,7 @@ function DatasourceNewWizardPageView({
4144
4728
  }
4145
4729
  ),
4146
4730
  /* @__PURE__ */ jsxRuntime.jsx(
4147
- chunk6R5Z2IQ5_js.FormInput,
4731
+ chunk5ETT54QS_js.FormInput,
4148
4732
  {
4149
4733
  label: labels.fieldToken,
4150
4734
  type: "password",
@@ -4158,7 +4742,7 @@ function DatasourceNewWizardPageView({
4158
4742
  }
4159
4743
  ),
4160
4744
  /* @__PURE__ */ jsxRuntime.jsx(
4161
- chunk6R5Z2IQ5_js.FormInput,
4745
+ chunk5ETT54QS_js.FormInput,
4162
4746
  {
4163
4747
  label: labels.fieldBucket,
4164
4748
  value: bucket,
@@ -4173,7 +4757,7 @@ function DatasourceNewWizardPageView({
4173
4757
  case "vector-key":
4174
4758
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4175
4759
  /* @__PURE__ */ jsxRuntime.jsx(
4176
- chunk6R5Z2IQ5_js.FormInput,
4760
+ chunk5ETT54QS_js.FormInput,
4177
4761
  {
4178
4762
  label: labels.fieldApiKey,
4179
4763
  type: "password",
@@ -4187,7 +4771,7 @@ function DatasourceNewWizardPageView({
4187
4771
  }
4188
4772
  ),
4189
4773
  /* @__PURE__ */ jsxRuntime.jsx(
4190
- chunk6R5Z2IQ5_js.FormInput,
4774
+ chunk5ETT54QS_js.FormInput,
4191
4775
  {
4192
4776
  label: labels.fieldEnvironment,
4193
4777
  value: environment,
@@ -4200,7 +4784,7 @@ function DatasourceNewWizardPageView({
4200
4784
  }
4201
4785
  ),
4202
4786
  /* @__PURE__ */ jsxRuntime.jsx(
4203
- chunk6R5Z2IQ5_js.FormInput,
4787
+ chunk5ETT54QS_js.FormInput,
4204
4788
  {
4205
4789
  label: labels.fieldIndex,
4206
4790
  value: index,
@@ -4216,13 +4800,13 @@ function DatasourceNewWizardPageView({
4216
4800
  }
4217
4801
  function renderStep2() {
4218
4802
  if (!dialectOption) {
4219
- return /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.SectionCard, { variant: "glass", header: { title: labels.wizardStep1Title }, children: [
4803
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.SectionCard, { variant: "glass", header: { title: labels.wizardStep1Title }, children: [
4220
4804
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-slate-700 dark:text-slate-200", children: labels.wizardStep1Subtitle }),
4221
4805
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Button, { type: "button", outline: true, onClick: () => goToStep(1), children: labels.wizardBack }) })
4222
4806
  ] });
4223
4807
  }
4224
4808
  return /* @__PURE__ */ jsxRuntime.jsx(
4225
- chunk6R5Z2IQ5_js.SectionCard,
4809
+ chunk5ETT54QS_js.SectionCard,
4226
4810
  {
4227
4811
  variant: "glass",
4228
4812
  header: {
@@ -4233,7 +4817,7 @@ function DatasourceNewWizardPageView({
4233
4817
  },
4234
4818
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
4235
4819
  /* @__PURE__ */ jsxRuntime.jsx(
4236
- chunk6R5Z2IQ5_js.FormInput,
4820
+ chunk5ETT54QS_js.FormInput,
4237
4821
  {
4238
4822
  label: labels.fieldName,
4239
4823
  value: name,
@@ -4245,10 +4829,10 @@ function DatasourceNewWizardPageView({
4245
4829
  required: true
4246
4830
  }
4247
4831
  ),
4248
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.FormGrid, { children: renderConnectionFields() }),
4832
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.FormGrid, { children: renderConnectionFields() }),
4249
4833
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-6 pt-1", children: [
4250
4834
  /* @__PURE__ */ jsxRuntime.jsx(
4251
- chunk6R5Z2IQ5_js.FormToggle,
4835
+ chunk5ETT54QS_js.FormToggle,
4252
4836
  {
4253
4837
  checked: ssl,
4254
4838
  onChange: (v) => {
@@ -4260,7 +4844,7 @@ function DatasourceNewWizardPageView({
4260
4844
  }
4261
4845
  ),
4262
4846
  /* @__PURE__ */ jsxRuntime.jsx(
4263
- chunk6R5Z2IQ5_js.FormToggle,
4847
+ chunk5ETT54QS_js.FormToggle,
4264
4848
  {
4265
4849
  checked: readOnly,
4266
4850
  onChange: (v) => {
@@ -4282,13 +4866,13 @@ function DatasourceNewWizardPageView({
4282
4866
  onClick: () => void handleTestConnection(),
4283
4867
  disabled: testStatus === "testing",
4284
4868
  children: testStatus === "testing" ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
4285
- /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.Spinner, { size: "xs" }),
4869
+ /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.Spinner, { size: "xs" }),
4286
4870
  labels.testing
4287
4871
  ] }) : labels.testConnection
4288
4872
  }
4289
4873
  ),
4290
- testStatus === "success" && /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.StatusBadge, { status: "success", label: labels.connectionSuccess }),
4291
- testStatus === "failed" && /* @__PURE__ */ jsxRuntime.jsx(chunk6R5Z2IQ5_js.StatusBadge, { status: "error", label: labels.connectionFailed })
4874
+ testStatus === "success" && /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.StatusBadge, { status: "success", label: labels.connectionSuccess }),
4875
+ testStatus === "failed" && /* @__PURE__ */ jsxRuntime.jsx(chunk5ETT54QS_js.StatusBadge, { status: "error", label: labels.connectionFailed })
4292
4876
  ] })
4293
4877
  ] })
4294
4878
  }
@@ -4296,7 +4880,7 @@ function DatasourceNewWizardPageView({
4296
4880
  }
4297
4881
  function renderStep3() {
4298
4882
  return /* @__PURE__ */ jsxRuntime.jsx(
4299
- chunk6R5Z2IQ5_js.SectionCard,
4883
+ chunk5ETT54QS_js.SectionCard,
4300
4884
  {
4301
4885
  variant: "glass",
4302
4886
  header: {
@@ -4304,9 +4888,9 @@ function DatasourceNewWizardPageView({
4304
4888
  subtitle: labels.governanceSectionSubtitle
4305
4889
  },
4306
4890
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
4307
- /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
4891
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
4308
4892
  /* @__PURE__ */ jsxRuntime.jsx(
4309
- chunk6R5Z2IQ5_js.FormInput,
4893
+ chunk5ETT54QS_js.FormInput,
4310
4894
  {
4311
4895
  label: labels.fieldMaxPoolSize,
4312
4896
  type: "number",
@@ -4321,7 +4905,7 @@ function DatasourceNewWizardPageView({
4321
4905
  }
4322
4906
  ),
4323
4907
  /* @__PURE__ */ jsxRuntime.jsx(
4324
- chunk6R5Z2IQ5_js.FormInput,
4908
+ chunk5ETT54QS_js.FormInput,
4325
4909
  {
4326
4910
  label: labels.fieldTimeoutMs,
4327
4911
  type: "number",
@@ -4338,7 +4922,7 @@ function DatasourceNewWizardPageView({
4338
4922
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
4339
4923
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.fieldAllowedTables }),
4340
4924
  /* @__PURE__ */ jsxRuntime.jsx(
4341
- chunk6R5Z2IQ5_js.ChipPicker,
4925
+ chunk5ETT54QS_js.ChipPicker,
4342
4926
  {
4343
4927
  items: allowedTablesItems,
4344
4928
  selectedIds: allowedTablesSelected,
@@ -4362,7 +4946,7 @@ function DatasourceNewWizardPageView({
4362
4946
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
4363
4947
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-medium text-gray-500 dark:text-gray-400", children: labels.fieldBlockedColumns }),
4364
4948
  /* @__PURE__ */ jsxRuntime.jsx(
4365
- chunk6R5Z2IQ5_js.ChipPicker,
4949
+ chunk5ETT54QS_js.ChipPicker,
4366
4950
  {
4367
4951
  items: blockedColumnsItems,
4368
4952
  selectedIds: blockedColumnsSelected,
@@ -4384,7 +4968,7 @@ function DatasourceNewWizardPageView({
4384
4968
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: labels.fieldBlockedColumnsHint })
4385
4969
  ] }),
4386
4970
  /* @__PURE__ */ jsxRuntime.jsx(
4387
- chunk6R5Z2IQ5_js.FormCheckbox,
4971
+ chunk5ETT54QS_js.FormCheckbox,
4388
4972
  {
4389
4973
  checked: maskPii,
4390
4974
  onChange: (v) => {
@@ -4406,7 +4990,7 @@ function DatasourceNewWizardPageView({
4406
4990
  const blocked = blockedColumnsSelected;
4407
4991
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
4408
4992
  /* @__PURE__ */ jsxRuntime.jsx(
4409
- chunk6R5Z2IQ5_js.SectionCard,
4993
+ chunk5ETT54QS_js.SectionCard,
4410
4994
  {
4411
4995
  variant: "glass",
4412
4996
  header: {
@@ -4424,7 +5008,7 @@ function DatasourceNewWizardPageView({
4424
5008
  }
4425
5009
  ),
4426
5010
  /* @__PURE__ */ jsxRuntime.jsx(
4427
- chunk6R5Z2IQ5_js.SectionCard,
5011
+ chunk5ETT54QS_js.SectionCard,
4428
5012
  {
4429
5013
  variant: "glass",
4430
5014
  header: {
@@ -4444,7 +5028,7 @@ function DatasourceNewWizardPageView({
4444
5028
  }
4445
5029
  ),
4446
5030
  /* @__PURE__ */ jsxRuntime.jsx(
4447
- chunk6R5Z2IQ5_js.SectionCard,
5031
+ chunk5ETT54QS_js.SectionCard,
4448
5032
  {
4449
5033
  variant: "glass",
4450
5034
  header: {
@@ -4633,9 +5217,9 @@ function RuleNewWizardPageView({
4633
5217
  text: "text-fuchsia-700 dark:text-fuchsia-300"
4634
5218
  };
4635
5219
  const [combinator, setCombinator] = react.useState("and");
4636
- const [condition, setCondition] = react.useState(chunkY4YIGEX6_js.defaultRuleCondition());
5220
+ const [condition, setCondition] = react.useState(chunkMQDCUBVW_js.defaultRuleCondition());
4637
5221
  const [actionTileId, setActionTileId] = react.useState("");
4638
- const [action, setAction] = react.useState(chunkY4YIGEX6_js.defaultRuleAction());
5222
+ const [action, setAction] = react.useState(chunkMQDCUBVW_js.defaultRuleAction());
4639
5223
  const [validFromDate, setValidFromDate] = react.useState(null);
4640
5224
  const [validFromTime, setValidFromTime] = react.useState(null);
4641
5225
  const [validUntilDate, setValidUntilDate] = react.useState(null);
@@ -4764,7 +5348,7 @@ function RuleNewWizardPageView({
4764
5348
  }));
4765
5349
  const counter = labels.wizardStepCounter.replace("{current}", String(step)).replace("{total}", String(TOTAL_STEPS3));
4766
5350
  const hero = /* @__PURE__ */ jsxRuntime.jsx(
4767
- chunk6R5Z2IQ5_js.HeroSection,
5351
+ chunk5ETT54QS_js.HeroSection,
4768
5352
  {
4769
5353
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.AdjustmentsHorizontalIcon, { className: "h-5 w-5" }),
4770
5354
  label: counter,
@@ -4772,7 +5356,7 @@ function RuleNewWizardPageView({
4772
5356
  subtitle: stepSubtitles[step - 1] ?? labels.pageSubtitle,
4773
5357
  gradient: "from-fuchsia-500 to-purple-700",
4774
5358
  children: /* @__PURE__ */ jsxRuntime.jsx(
4775
- chunk6R5Z2IQ5_js.StepIndicator,
5359
+ chunk5ETT54QS_js.StepIndicator,
4776
5360
  {
4777
5361
  accent: "violet",
4778
5362
  currentStep: step - 1,
@@ -4785,7 +5369,7 @@ function RuleNewWizardPageView({
4785
5369
  );
4786
5370
  function renderStep1() {
4787
5371
  return /* @__PURE__ */ jsxRuntime.jsx(
4788
- chunk6R5Z2IQ5_js.SectionCard,
5372
+ chunk5ETT54QS_js.SectionCard,
4789
5373
  {
4790
5374
  variant: "glass",
4791
5375
  header: {
@@ -4794,7 +5378,7 @@ function RuleNewWizardPageView({
4794
5378
  },
4795
5379
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
4796
5380
  /* @__PURE__ */ jsxRuntime.jsx(
4797
- chunk6R5Z2IQ5_js.FormInput,
5381
+ chunk5ETT54QS_js.FormInput,
4798
5382
  {
4799
5383
  label: labels.nameLabel,
4800
5384
  value: name,
@@ -4807,7 +5391,7 @@ function RuleNewWizardPageView({
4807
5391
  }
4808
5392
  ),
4809
5393
  /* @__PURE__ */ jsxRuntime.jsx(
4810
- chunk6R5Z2IQ5_js.FormTextarea,
5394
+ chunk5ETT54QS_js.FormTextarea,
4811
5395
  {
4812
5396
  label: labels.descriptionLabel,
4813
5397
  value: description,
@@ -4843,7 +5427,7 @@ function RuleNewWizardPageView({
4843
5427
  }
4844
5428
  ),
4845
5429
  /* @__PURE__ */ jsxRuntime.jsx(
4846
- chunk6R5Z2IQ5_js.FormToggle,
5430
+ chunk5ETT54QS_js.FormToggle,
4847
5431
  {
4848
5432
  checked: enabled,
4849
5433
  onChange: (v) => {
@@ -4860,7 +5444,7 @@ function RuleNewWizardPageView({
4860
5444
  }
4861
5445
  function renderStep2() {
4862
5446
  return /* @__PURE__ */ jsxRuntime.jsx(
4863
- chunk6R5Z2IQ5_js.SectionCard,
5447
+ chunk5ETT54QS_js.SectionCard,
4864
5448
  {
4865
5449
  variant: "glass",
4866
5450
  header: {
@@ -4871,7 +5455,7 @@ function RuleNewWizardPageView({
4871
5455
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4872
5456
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.combinatorLabel }),
4873
5457
  /* @__PURE__ */ jsxRuntime.jsx(
4874
- chunk6R5Z2IQ5_js.SegmentedControl,
5458
+ chunk5ETT54QS_js.SegmentedControl,
4875
5459
  {
4876
5460
  segments: [
4877
5461
  { value: "and", label: labels.combinatorAnd },
@@ -4888,7 +5472,7 @@ function RuleNewWizardPageView({
4888
5472
  )
4889
5473
  ] }),
4890
5474
  /* @__PURE__ */ jsxRuntime.jsx(
4891
- chunkY4YIGEX6_js.RuleConditionBuilder,
5475
+ chunkMQDCUBVW_js.RuleConditionBuilder,
4892
5476
  {
4893
5477
  value: condition,
4894
5478
  onChange: (next) => {
@@ -4904,7 +5488,7 @@ function RuleNewWizardPageView({
4904
5488
  function renderStep3() {
4905
5489
  const selectedTile = ACTION_TILES.find((t) => t.id === actionTileId) ?? null;
4906
5490
  return /* @__PURE__ */ jsxRuntime.jsx(
4907
- chunk6R5Z2IQ5_js.SectionCard,
5491
+ chunk5ETT54QS_js.SectionCard,
4908
5492
  {
4909
5493
  variant: "glass",
4910
5494
  header: {
@@ -4924,7 +5508,7 @@ function RuleNewWizardPageView({
4924
5508
  const label = labels[tile.labelKey] ?? tile.id;
4925
5509
  const description2 = labels[tile.descriptionKey] ?? "";
4926
5510
  return /* @__PURE__ */ jsxRuntime.jsx(
4927
- chunk6R5Z2IQ5_js.FilterTileButton,
5511
+ chunk5ETT54QS_js.FilterTileButton,
4928
5512
  {
4929
5513
  isActive: selected,
4930
5514
  color: tile.color,
@@ -4942,7 +5526,7 @@ function RuleNewWizardPageView({
4942
5526
  }
4943
5527
  ),
4944
5528
  selectedTile && /* @__PURE__ */ jsxRuntime.jsx(
4945
- chunk6R5Z2IQ5_js.SectionCard,
5529
+ chunk5ETT54QS_js.SectionCard,
4946
5530
  {
4947
5531
  variant: "glass",
4948
5532
  header: {
@@ -4950,7 +5534,7 @@ function RuleNewWizardPageView({
4950
5534
  subtitle: labels.actionConfigSubtitle
4951
5535
  },
4952
5536
  children: /* @__PURE__ */ jsxRuntime.jsx(
4953
- chunkY4YIGEX6_js.RuleActionBuilder,
5537
+ chunkMQDCUBVW_js.RuleActionBuilder,
4954
5538
  {
4955
5539
  value: action,
4956
5540
  onChange: (next) => {
@@ -4967,7 +5551,7 @@ function RuleNewWizardPageView({
4967
5551
  }
4968
5552
  function renderStep4() {
4969
5553
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx(
4970
- chunk6R5Z2IQ5_js.SectionCard,
5554
+ chunk5ETT54QS_js.SectionCard,
4971
5555
  {
4972
5556
  variant: "glass",
4973
5557
  header: {
@@ -4975,12 +5559,12 @@ function RuleNewWizardPageView({
4975
5559
  subtitle: labels.scheduleSectionSubtitle
4976
5560
  },
4977
5561
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
4978
- /* @__PURE__ */ jsxRuntime.jsxs(chunk6R5Z2IQ5_js.FormGrid, { children: [
5562
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk5ETT54QS_js.FormGrid, { children: [
4979
5563
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
4980
5564
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.validFromLabel }),
4981
5565
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
4982
5566
  /* @__PURE__ */ jsxRuntime.jsx(
4983
- chunk6R5Z2IQ5_js.DatePicker,
5567
+ chunk5ETT54QS_js.DatePicker,
4984
5568
  {
4985
5569
  value: validFromDate,
4986
5570
  onChange: (d) => {
@@ -4991,7 +5575,7 @@ function RuleNewWizardPageView({
4991
5575
  }
4992
5576
  ),
4993
5577
  /* @__PURE__ */ jsxRuntime.jsx(
4994
- chunk6R5Z2IQ5_js.TimePicker,
5578
+ chunk5ETT54QS_js.TimePicker,
4995
5579
  {
4996
5580
  value: validFromTime,
4997
5581
  onChange: (t) => {
@@ -5007,7 +5591,7 @@ function RuleNewWizardPageView({
5007
5591
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.validUntilLabel }),
5008
5592
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
5009
5593
  /* @__PURE__ */ jsxRuntime.jsx(
5010
- chunk6R5Z2IQ5_js.DatePicker,
5594
+ chunk5ETT54QS_js.DatePicker,
5011
5595
  {
5012
5596
  value: validUntilDate,
5013
5597
  onChange: (d) => {
@@ -5018,7 +5602,7 @@ function RuleNewWizardPageView({
5018
5602
  }
5019
5603
  ),
5020
5604
  /* @__PURE__ */ jsxRuntime.jsx(
5021
- chunk6R5Z2IQ5_js.TimePicker,
5605
+ chunk5ETT54QS_js.TimePicker,
5022
5606
  {
5023
5607
  value: validUntilTime,
5024
5608
  onChange: (t) => {
@@ -5032,7 +5616,7 @@ function RuleNewWizardPageView({
5032
5616
  ] })
5033
5617
  ] }),
5034
5618
  /* @__PURE__ */ jsxRuntime.jsx(
5035
- chunk6R5Z2IQ5_js.FormCheckbox,
5619
+ chunk5ETT54QS_js.FormCheckbox,
5036
5620
  {
5037
5621
  checked: noExpiry,
5038
5622
  onChange: (v) => {
@@ -5046,7 +5630,7 @@ function RuleNewWizardPageView({
5046
5630
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
5047
5631
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.statusLabel }),
5048
5632
  /* @__PURE__ */ jsxRuntime.jsx(
5049
- chunk6R5Z2IQ5_js.SegmentedControl,
5633
+ chunk5ETT54QS_js.SegmentedControl,
5050
5634
  {
5051
5635
  segments: [
5052
5636
  { value: "active", label: labels.statusActive },
@@ -5065,7 +5649,7 @@ function RuleNewWizardPageView({
5065
5649
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
5066
5650
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.tagsLabel }),
5067
5651
  /* @__PURE__ */ jsxRuntime.jsx(
5068
- chunk6R5Z2IQ5_js.ChipPicker,
5652
+ chunk5ETT54QS_js.ChipPicker,
5069
5653
  {
5070
5654
  items: tagsItems,
5071
5655
  selectedIds: tagsSelected,
@@ -5089,7 +5673,7 @@ function RuleNewWizardPageView({
5089
5673
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
5090
5674
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.recurrenceLabel }),
5091
5675
  /* @__PURE__ */ jsxRuntime.jsx(
5092
- chunk6R5Z2IQ5_js.SegmentedControl,
5676
+ chunk5ETT54QS_js.SegmentedControl,
5093
5677
  {
5094
5678
  segments: [
5095
5679
  { value: "one-off", label: labels.recurrenceOneOff },
@@ -5106,7 +5690,7 @@ function RuleNewWizardPageView({
5106
5690
  )
5107
5691
  ] }),
5108
5692
  recurrence === "cron" && /* @__PURE__ */ jsxRuntime.jsx(
5109
- chunk6R5Z2IQ5_js.FormInput,
5693
+ chunk5ETT54QS_js.FormInput,
5110
5694
  {
5111
5695
  label: labels.cronExpressionLabel,
5112
5696
  value: cronExpression,
@@ -5122,7 +5706,7 @@ function RuleNewWizardPageView({
5122
5706
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
5123
5707
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.weekdaysLabel }),
5124
5708
  /* @__PURE__ */ jsxRuntime.jsx(
5125
- chunk6R5Z2IQ5_js.ChipPicker,
5709
+ chunk5ETT54QS_js.ChipPicker,
5126
5710
  {
5127
5711
  items: WEEKDAYS.map((d) => ({
5128
5712
  id: d.id,
@@ -5144,7 +5728,7 @@ function RuleNewWizardPageView({
5144
5728
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
5145
5729
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-2 block text-xs font-semibold uppercase tracking-wider text-slate-600 dark:text-slate-400", children: labels.timeOfDayLabel }),
5146
5730
  /* @__PURE__ */ jsxRuntime.jsx(
5147
- chunk6R5Z2IQ5_js.TimePicker,
5731
+ chunk5ETT54QS_js.TimePicker,
5148
5732
  {
5149
5733
  value: recurringTime,
5150
5734
  onChange: (t) => {
@@ -5166,7 +5750,7 @@ function RuleNewWizardPageView({
5166
5750
  const actionSentence = humanReadableAction(payload.action, labels, ACTION_TILES, actionTileId);
5167
5751
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
5168
5752
  /* @__PURE__ */ jsxRuntime.jsx(
5169
- chunk6R5Z2IQ5_js.SectionCard,
5753
+ chunk5ETT54QS_js.SectionCard,
5170
5754
  {
5171
5755
  variant: "glass",
5172
5756
  header: {
@@ -5192,7 +5776,7 @@ function RuleNewWizardPageView({
5192
5776
  }
5193
5777
  ),
5194
5778
  /* @__PURE__ */ jsxRuntime.jsxs(
5195
- chunk6R5Z2IQ5_js.SectionCard,
5779
+ chunk5ETT54QS_js.SectionCard,
5196
5780
  {
5197
5781
  variant: "glass",
5198
5782
  header: {
@@ -5211,7 +5795,7 @@ function RuleNewWizardPageView({
5211
5795
  }
5212
5796
  ),
5213
5797
  /* @__PURE__ */ jsxRuntime.jsxs(
5214
- chunk6R5Z2IQ5_js.SectionCard,
5798
+ chunk5ETT54QS_js.SectionCard,
5215
5799
  {
5216
5800
  variant: "glass",
5217
5801
  header: {
@@ -5229,7 +5813,7 @@ function RuleNewWizardPageView({
5229
5813
  }
5230
5814
  ),
5231
5815
  /* @__PURE__ */ jsxRuntime.jsx(
5232
- chunk6R5Z2IQ5_js.SectionCard,
5816
+ chunk5ETT54QS_js.SectionCard,
5233
5817
  {
5234
5818
  variant: "glass",
5235
5819
  header: {
@@ -5363,31 +5947,31 @@ function humanReadableAction(action, labels, tiles, actionTileId) {
5363
5947
 
5364
5948
  Object.defineProperty(exports, "RolesPageView", {
5365
5949
  enumerable: true,
5366
- get: function () { return chunkGDVB7QDZ_js.RolesPageView; }
5950
+ get: function () { return chunkIIRS5XZY_js.RolesPageView; }
5367
5951
  });
5368
5952
  Object.defineProperty(exports, "UsersPageView", {
5369
5953
  enumerable: true,
5370
- get: function () { return chunkGDVB7QDZ_js.UsersPageView; }
5954
+ get: function () { return chunkIIRS5XZY_js.UsersPageView; }
5371
5955
  });
5372
5956
  Object.defineProperty(exports, "DIALECT_CATEGORIES", {
5373
5957
  enumerable: true,
5374
- get: function () { return chunkTXI3QDYE_js.DIALECT_CATEGORIES; }
5958
+ get: function () { return chunkAMCFAGK3_js.DIALECT_CATEGORIES; }
5375
5959
  });
5376
5960
  Object.defineProperty(exports, "DatasourceFormModal", {
5377
5961
  enumerable: true,
5378
- get: function () { return chunkTXI3QDYE_js.DatasourceFormModal; }
5962
+ get: function () { return chunkAMCFAGK3_js.DatasourceFormModal; }
5379
5963
  });
5380
5964
  Object.defineProperty(exports, "DatasourceModal", {
5381
5965
  enumerable: true,
5382
- get: function () { return chunkTXI3QDYE_js.DatasourceModal; }
5966
+ get: function () { return chunkAMCFAGK3_js.DatasourceModal; }
5383
5967
  });
5384
5968
  Object.defineProperty(exports, "findCategory", {
5385
5969
  enumerable: true,
5386
- get: function () { return chunkTXI3QDYE_js.findCategory; }
5970
+ get: function () { return chunkAMCFAGK3_js.findCategory; }
5387
5971
  });
5388
5972
  Object.defineProperty(exports, "findDialect", {
5389
5973
  enumerable: true,
5390
- get: function () { return chunkTXI3QDYE_js.findDialect; }
5974
+ get: function () { return chunkAMCFAGK3_js.findDialect; }
5391
5975
  });
5392
5976
  exports.AgentNewWizardPageView = AgentNewWizardPageView;
5393
5977
  exports.AgentsConfigPageView = AgentsConfigPageView;