@burdenoff/microfe-sandbox 2026.625.3 → 2026.626.2

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.
@@ -7,20 +7,20 @@ import { SandboxTypeIcon as f } from "../components/SandboxTypeIcon.js";
7
7
  import { CountdownTimer as p } from "../components/CountdownTimer.js";
8
8
  import { useSandboxEvents as m } from "../utils/sandboxEvents.js";
9
9
  import { PageLayout as h } from "../components/PageLayout.js";
10
- import { useDeleteSandboxMutation as g, useExtendSandboxTtlMutation as _, useGetSandboxLogsLazyQuery as v, useGetSandboxQuery as y, useOnSandboxStatusChangedSubscription as ee, useStopSandboxMutation as te } from "../../generated/wspace-operations.js";
11
- import { isNative as b, nativeCopyText as x, nativeImpact as S, nativeNotify as C, nativeToast as w } from "../../utils/nativeBridge.js";
12
- import { ExtendTTLModal as ne } from "../components/ExtendTTLModal.js";
13
- import { SandboxActivityTab as T } from "../components/SandboxActivityTab.js";
14
- import { SandboxAgentAppPanel as re } from "../components/SandboxAgentAppPanel.js";
15
- import { SandboxScriptRunnerPanel as ie } from "../components/SandboxScriptRunnerPanel.js";
16
- import { useCallback as E, useEffect as D, useRef as O, useState as k } from "react";
17
- import { AlertCircle as ae, ArrowLeft as oe, CheckCircle2 as A, Clock as se, Cog as ce, Container as le, Copy as j, Database as M, Download as N, Info as P, Network as F, Play as ue, RefreshCw as I, Shield as de, StopCircle as L, Terminal as R, Timer as z, Trash2 as B } from "lucide-react";
18
- import { useParams as V } from "react-router-dom";
19
- import { useI18n as H } from "@burdenoff/fe-libs/shared/providers/shell";
20
- import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
21
- import { IllustratedEmptyState as fe } from "@burdenoff/fe-libs/ui";
10
+ import { useDeleteSandboxMutation as g, useExtendSandboxTtlMutation as _, useGetSandboxLogsLazyQuery as v, useGetSandboxQuery as ee, useOnSandboxStatusChangedSubscription as te, useStopSandboxMutation as ne } from "../../generated/wspace-operations.js";
11
+ import { isNative as y, nativeCopyText as b, nativeImpact as x, nativeNotify as S, nativeToast as C } from "../../utils/nativeBridge.js";
12
+ import { ExtendTTLModal as re } from "../components/ExtendTTLModal.js";
13
+ import { SandboxActivityTab as ie } from "../components/SandboxActivityTab.js";
14
+ import { SandboxAgentAppPanel as ae } from "../components/SandboxAgentAppPanel.js";
15
+ import { SandboxScriptRunnerPanel as oe } from "../components/SandboxScriptRunnerPanel.js";
16
+ import { useCallback as w, useEffect as T, useRef as E, useState as D } from "react";
17
+ import { AlertCircle as se, ArrowLeft as ce, CheckCircle2 as O, Clock as le, Cog as ue, Container as de, Copy as k, Database as fe, Download as A, Info as j, Network as M, Play as pe, RefreshCw as N, Shield as me, StopCircle as P, Terminal as F, Timer as I, Trash2 as he } from "lucide-react";
18
+ import { useParams as ge } from "react-router-dom";
19
+ import { useI18n as L } from "@burdenoff/fe-libs/shared/providers/shell";
20
+ import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
21
+ import { IllustratedEmptyState as _e, NextSteps as ve, PagePurpose as ye } from "@burdenoff/fe-libs/ui";
22
22
  //#region src/sandbox/pages/SandboxDetailPage.tsx
23
- function K(e) {
23
+ function V(e) {
24
24
  return new Date(e).toLocaleString(void 0, {
25
25
  year: "numeric",
26
26
  month: "short",
@@ -29,380 +29,417 @@ function K(e) {
29
29
  minute: "2-digit"
30
30
  });
31
31
  }
32
- function pe(e) {
32
+ function be(e) {
33
33
  let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60);
34
34
  return t > 0 ? `${t}h ${n}m` : `${n}m`;
35
35
  }
36
- function me(e) {
36
+ function xe(e) {
37
37
  if (!e) return null;
38
38
  let t = new Date(e).getTime() - Date.now();
39
39
  if (t <= 0) return "Expired";
40
40
  let n = Math.floor(t / 36e5), r = Math.floor(t % 36e5 / 6e4);
41
41
  return n > 0 ? `${n}h ${r}m remaining` : `${r}m remaining`;
42
42
  }
43
- function q({ isCopied: e, onCopy: t, ariaLabel: n }) {
44
- return /* @__PURE__ */ W("button", {
43
+ function H({ isCopied: e, onCopy: t, ariaLabel: n }) {
44
+ return /* @__PURE__ */ z("button", {
45
45
  type: "button",
46
46
  onClick: t,
47
47
  className: "p-1 rounded hover:bg-bg-sunken transition-colors",
48
48
  "aria-label": n,
49
- children: e ? /* @__PURE__ */ W(A, {
49
+ children: e ? /* @__PURE__ */ z(O, {
50
50
  size: 14,
51
51
  className: "text-status-success-text"
52
- }) : /* @__PURE__ */ W(j, {
52
+ }) : /* @__PURE__ */ z(k, {
53
53
  size: 14,
54
54
  className: "text-text-secondary"
55
55
  })
56
56
  });
57
57
  }
58
- function J({ value: e, field: t, copiedField: n, onCopy: r, ariaLabel: i }) {
59
- return /* @__PURE__ */ W(q, {
58
+ function U({ value: e, field: t, copiedField: n, onCopy: r, ariaLabel: i }) {
59
+ return /* @__PURE__ */ z(H, {
60
60
  isCopied: n === t,
61
61
  onCopy: () => r(e, t),
62
62
  ariaLabel: i
63
63
  });
64
64
  }
65
- function he({ enabled: e, collapsedHeight: t, children: n }) {
66
- return e ? /* @__PURE__ */ W(c, {
65
+ function Se({ enabled: e, collapsedHeight: t, children: n }) {
66
+ return e ? /* @__PURE__ */ z(c, {
67
67
  collapsedHeight: t,
68
68
  children: n
69
- }) : /* @__PURE__ */ W(U, { children: n });
69
+ }) : /* @__PURE__ */ z(R, { children: n });
70
70
  }
71
- function Y() {
72
- let { sandboxId: c } = V(), { basePath: v = "/", navigate: E, workspaceId: D } = e(), { t: O } = H(), [A, j] = k(null), [N, R] = k(!1), [q, Y] = k(!1), { data: _e, loading: ve, refetch: X } = y({
71
+ function W() {
72
+ let { sandboxId: c } = ge(), { basePath: v = "/", navigate: w, workspaceId: T } = e(), { t: E } = L(), [O, k] = D(null), [A, H] = D(!1), [W, G] = D(!1), { data: we, loading: Te, refetch: K } = ee({
73
73
  variables: {
74
- context: { workspaceId: D },
74
+ context: { workspaceId: T },
75
75
  id: c
76
76
  },
77
- skip: !c || !D
77
+ skip: !c || !T
78
78
  });
79
- ee({
79
+ te({
80
80
  variables: {
81
- workspaceId: D,
81
+ workspaceId: T,
82
82
  sandboxId: c
83
83
  },
84
- skip: !c || !D
84
+ skip: !c || !T
85
85
  });
86
- let [ye] = te(), [be] = g(), [xe] = _(), Se = m(), Z = _e?.getSandbox, Ce = async (e, t) => {
87
- S("light"), await x(e) ? (C("success"), b() && w(`Copied ${t}`), j(t), setTimeout(() => j(null), 2e3)) : C("error");
88
- }, Q = (e, t) => {
89
- Ce(e, t);
90
- }, $ = (e) => l(O, "sandbox.detail.actions.copy.ariaLabel", "Copy {field}", { field: e });
91
- if (ve) return /* @__PURE__ */ W(h, {
86
+ let [q] = ne(), [Ee] = g(), [De] = _(), Oe = m(), J = we?.getSandbox, ke = async (e, t) => {
87
+ x("light"), await b(e) ? (S("success"), y() && C(`Copied ${t}`), k(t), setTimeout(() => k(null), 2e3)) : S("error");
88
+ }, Y = (e, t) => {
89
+ ke(e, t);
90
+ }, X = (e) => l(E, "sandbox.detail.actions.copy.ariaLabel", "Copy {field}", { field: e });
91
+ if (Te) return /* @__PURE__ */ z(h, {
92
92
  showHeader: !1,
93
- children: /* @__PURE__ */ W("div", {
93
+ children: /* @__PURE__ */ z("div", {
94
94
  className: "flex items-center justify-center h-64",
95
- children: /* @__PURE__ */ W(I, {
95
+ children: /* @__PURE__ */ z(N, {
96
96
  size: 24,
97
97
  className: "animate-spin text-text-secondary"
98
98
  })
99
99
  })
100
100
  });
101
- if (!Z) return /* @__PURE__ */ W(h, {
101
+ if (!J) return /* @__PURE__ */ z(h, {
102
102
  showHeader: !1,
103
- children: /* @__PURE__ */ W(fe, {
103
+ children: /* @__PURE__ */ z(_e, {
104
104
  illustration: "empty-generic",
105
- title: l(O, "sandbox.detail.notFound.message", "Sandbox not found"),
106
- action: /* @__PURE__ */ W(n, {
105
+ title: l(E, "sandbox.detail.notFound.message", "Sandbox not found"),
106
+ action: /* @__PURE__ */ z(n, {
107
107
  variant: "outline",
108
- onClick: () => E?.(v),
109
- children: l(O, "sandbox.detail.notFound.backButton", "Back to Sandboxes")
108
+ onClick: () => w?.(v),
109
+ children: l(E, "sandbox.detail.notFound.backButton", "Back to Sandboxes")
110
110
  })
111
111
  })
112
112
  });
113
- let we = Z.status === "RUNNING" || Z.status === "PROVISIONING" || Z.status === "PENDING", Te = Z.status === "RUNNING", Ee = Z.status === "STOPPED" || Z.status === "ERROR" || Z.status === "EXPIRED" || Z.status === "FAILED", De = [
114
- ...Z.status === "RUNNING" ? [{
115
- label: l(O, "sandbox.detail.actions.extendTtl", "Extend TTL"),
116
- onSelect: () => R(!0),
117
- icon: /* @__PURE__ */ W(z, { size: 16 })
113
+ let Ae = J.status === "RUNNING" || J.status === "PROVISIONING" || J.status === "PENDING", Z = J.status === "RUNNING", je = J.status === "STOPPED" || J.status === "ERROR" || J.status === "EXPIRED" || J.status === "FAILED", Q = J.status === "RUNNING", Me = [
114
+ ...Q ? [{
115
+ label: l(E, "sandbox.detail.actions.extendTtl", "Extend TTL"),
116
+ onSelect: () => H(!0),
117
+ icon: /* @__PURE__ */ z(I, { size: 16 })
118
118
  }] : [],
119
- ...Te ? [{
120
- label: l(O, "sandbox.detail.actions.stop", "Stop"),
121
- onSelect: () => void ye({ variables: {
122
- context: { workspaceId: D },
123
- id: Z.id
124
- } }).then(() => X()),
125
- icon: /* @__PURE__ */ W(L, { size: 16 })
119
+ ...Z ? [{
120
+ label: l(E, "sandbox.detail.actions.stop", "Stop"),
121
+ onSelect: () => void q({ variables: {
122
+ context: { workspaceId: T },
123
+ id: J.id
124
+ } }).then(() => K()),
125
+ icon: /* @__PURE__ */ z(P, { size: 16 })
126
126
  }] : [],
127
- ...Ee ? [{
128
- label: l(O, "sandbox.detail.actions.delete", "Delete"),
129
- onSelect: () => void be({ variables: {
130
- context: { workspaceId: D },
131
- id: Z.id
127
+ ...je ? [{
128
+ label: l(E, "sandbox.detail.actions.delete", "Delete"),
129
+ onSelect: () => void Ee({ variables: {
130
+ context: { workspaceId: T },
131
+ id: J.id
132
132
  } }).then(() => {
133
- E?.(v);
133
+ w?.(v);
134
134
  }),
135
- icon: /* @__PURE__ */ W(B, { size: 16 }),
135
+ icon: /* @__PURE__ */ z(he, { size: 16 }),
136
136
  intent: "destructive"
137
137
  }] : []
138
- ];
139
- return /* @__PURE__ */ G(h, {
138
+ ], $ = [
139
+ J.network?.internalUrl && J.status === "RUNNING" ? {
140
+ id: "copy-url",
141
+ label: l(E, "sandbox.detail.nextSteps.copyUrl.label", "Copy the internal URL to connect"),
142
+ description: l(E, "sandbox.detail.nextSteps.copyUrl.desc", "Use it to reach the running service from another sandbox or tool."),
143
+ icon: /* @__PURE__ */ z(M, { size: 16 }),
144
+ onClick: () => Y(J.network.internalUrl, "internalUrl")
145
+ } : null,
146
+ J.status === "RUNNING" ? {
147
+ id: "run-script",
148
+ label: l(E, "sandbox.detail.nextSteps.runScript.label", "Run a script inside the sandbox"),
149
+ description: l(E, "sandbox.detail.nextSteps.runScript.desc", "Execute a command or generated script, review the output, then promote it."),
150
+ icon: /* @__PURE__ */ z(F, { size: 16 }),
151
+ href: "#sandbox-script-runner"
152
+ } : null,
153
+ Q ? {
154
+ id: "extend-ttl",
155
+ label: l(E, "sandbox.detail.nextSteps.extendTtl.label", "Extend the time-to-live"),
156
+ description: l(E, "sandbox.detail.nextSteps.extendTtl.desc", "Keep this sandbox alive longer before it auto-expires."),
157
+ icon: /* @__PURE__ */ z(I, { size: 16 }),
158
+ onClick: () => H(!0)
159
+ } : null,
160
+ Z ? {
161
+ id: "stop",
162
+ label: l(E, "sandbox.detail.nextSteps.stop.label", "Stop the sandbox when you are done"),
163
+ description: l(E, "sandbox.detail.nextSteps.stop.desc", "Frees up resources and concurrency for your workspace."),
164
+ icon: /* @__PURE__ */ z(P, { size: 16 }),
165
+ onClick: () => void q({ variables: {
166
+ context: { workspaceId: T },
167
+ id: J.id
168
+ } }).then(() => K())
169
+ } : null
170
+ ].filter((e) => e !== null);
171
+ return /* @__PURE__ */ B(h, {
140
172
  showHeader: !1,
141
173
  children: [
142
- /* @__PURE__ */ G(o, {
174
+ /* @__PURE__ */ B(o, {
143
175
  className: "overflow-hidden bg-hero-mesh",
144
176
  children: [
145
- /* @__PURE__ */ G("div", {
177
+ /* @__PURE__ */ B("div", {
146
178
  className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
147
- children: [/* @__PURE__ */ G("div", {
179
+ children: [/* @__PURE__ */ B("div", {
148
180
  className: "flex items-center gap-3 min-w-0",
149
181
  children: [
150
- /* @__PURE__ */ W("button", {
182
+ /* @__PURE__ */ z("button", {
151
183
  type: "button",
152
- onClick: () => E?.(v),
184
+ onClick: () => w?.(v),
153
185
  className: "flex size-11 flex-shrink-0 items-center justify-center rounded-lg hover:bg-bg-sunken/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border",
154
- "aria-label": l(O, "sandbox.detail.header.back.ariaLabel", "Back to sandboxes"),
155
- children: /* @__PURE__ */ W(oe, { size: 20 })
186
+ "aria-label": l(E, "sandbox.detail.header.back.ariaLabel", "Back to sandboxes"),
187
+ children: /* @__PURE__ */ z(ce, { size: 20 })
156
188
  }),
157
- /* @__PURE__ */ W(f, {
158
- type: Z.template,
189
+ /* @__PURE__ */ z(f, {
190
+ type: J.template,
159
191
  size: 28
160
192
  }),
161
- /* @__PURE__ */ G("div", {
193
+ /* @__PURE__ */ B("div", {
162
194
  className: "min-w-0",
163
- children: [/* @__PURE__ */ W("h1", {
195
+ children: [/* @__PURE__ */ z("h1", {
164
196
  className: "truncate text-2xl sm:text-3xl font-bold",
165
- children: Z.name
166
- }), /* @__PURE__ */ G("div", {
197
+ children: J.name
198
+ }), /* @__PURE__ */ B("div", {
167
199
  className: "flex flex-wrap items-center gap-2 mt-1",
168
200
  children: [
169
- /* @__PURE__ */ W(u, {
170
- status: Z.status,
201
+ /* @__PURE__ */ z(u, {
202
+ status: J.status,
171
203
  size: "md"
172
204
  }),
173
- /* @__PURE__ */ W("span", {
205
+ /* @__PURE__ */ z("span", {
174
206
  className: "text-sm text-text-secondary font-mono truncate",
175
- children: Z.id
207
+ children: J.id
176
208
  }),
177
- /* @__PURE__ */ W(J, {
178
- value: Z.id,
209
+ /* @__PURE__ */ z(U, {
210
+ value: J.id,
179
211
  field: "id",
180
- copiedField: A,
181
- onCopy: Q,
182
- ariaLabel: $("id")
212
+ copiedField: O,
213
+ onCopy: Y,
214
+ ariaLabel: X("id")
183
215
  })
184
216
  ]
185
217
  })]
186
218
  })
187
219
  ]
188
- }), /* @__PURE__ */ W(r, {
220
+ }), /* @__PURE__ */ z(r, {
189
221
  className: "flex-shrink-0",
190
222
  primary: {
191
- label: l(O, "sandbox.detail.actions.refresh", "Refresh"),
192
- onSelect: () => void X(),
193
- icon: /* @__PURE__ */ W(I, { size: 16 })
223
+ label: l(E, "sandbox.detail.actions.refresh", "Refresh"),
224
+ onSelect: () => void K(),
225
+ icon: /* @__PURE__ */ z(N, { size: 16 })
194
226
  },
195
- actions: De
227
+ actions: Me
196
228
  })]
197
229
  }),
198
- Z.network?.internalUrl && Z.status === "RUNNING" && /* @__PURE__ */ W("div", {
230
+ J.network?.internalUrl && J.status === "RUNNING" && /* @__PURE__ */ z("div", {
199
231
  className: "mt-4",
200
- children: /* @__PURE__ */ G(t, {
232
+ children: /* @__PURE__ */ B(t, {
201
233
  variant: "outline",
202
234
  className: "gap-1.5 px-3 py-1.5 text-sm border-border-seam",
203
235
  children: [
204
- /* @__PURE__ */ W(F, { size: 14 }),
205
- Z.network.internalUrl,
206
- /* @__PURE__ */ W(J, {
207
- value: Z.network.internalUrl,
236
+ /* @__PURE__ */ z(M, { size: 14 }),
237
+ J.network.internalUrl,
238
+ /* @__PURE__ */ z(U, {
239
+ value: J.network.internalUrl,
208
240
  field: "internalUrl",
209
- copiedField: A,
210
- onCopy: Q,
211
- ariaLabel: $("internalUrl")
241
+ copiedField: O,
242
+ onCopy: Y,
243
+ ariaLabel: X("internalUrl")
212
244
  })
213
245
  ]
214
246
  })
215
247
  }),
216
- Z.status === "RUNNING" && Z.expiresAt && /* @__PURE__ */ W("div", {
248
+ J.status === "RUNNING" && J.expiresAt && /* @__PURE__ */ z("div", {
217
249
  className: "mt-4",
218
- children: /* @__PURE__ */ W(p, {
219
- expiresAt: Z.expiresAt,
220
- onExpired: () => X(),
221
- onExtend: () => R(!0)
250
+ children: /* @__PURE__ */ z(p, {
251
+ expiresAt: J.expiresAt,
252
+ onExpired: () => K(),
253
+ onExtend: () => H(!0)
222
254
  })
223
255
  })
224
256
  ]
225
257
  }),
226
- Z.description && /* @__PURE__ */ W(i, {
258
+ /* @__PURE__ */ z(ye, { children: l(E, "sandbox.detail.purpose", "This is the control room for a single sandbox — inspect its status, networking, containers, storage and live logs, run scripts inside it, extend its lifetime, or tear it down. Everything you do here is isolated to this one disposable environment.") }),
259
+ $.length > 0 && /* @__PURE__ */ z(ve, {
260
+ storageKey: "sandbox-detail",
261
+ steps: $
262
+ }),
263
+ J.description && /* @__PURE__ */ z(i, {
227
264
  className: "border-border-seam",
228
- children: /* @__PURE__ */ W(a, {
265
+ children: /* @__PURE__ */ z(a, {
229
266
  className: "p-5",
230
- children: /* @__PURE__ */ G("div", {
267
+ children: /* @__PURE__ */ B("div", {
231
268
  className: "flex items-start gap-3",
232
- children: [/* @__PURE__ */ W(P, {
269
+ children: [/* @__PURE__ */ z(j, {
233
270
  size: 18,
234
271
  className: "text-primary flex-shrink-0 mt-0.5"
235
- }), /* @__PURE__ */ W("p", {
272
+ }), /* @__PURE__ */ z("p", {
236
273
  className: "text-sm text-text-secondary leading-relaxed",
237
- children: Z.description
274
+ children: J.description
238
275
  })]
239
276
  })
240
277
  })
241
278
  }),
242
- /* @__PURE__ */ G("div", {
279
+ /* @__PURE__ */ B("div", {
243
280
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
244
281
  children: [
245
- /* @__PURE__ */ W(s, {
282
+ /* @__PURE__ */ z(s, {
246
283
  treatment: "plain",
247
284
  className: "border-border-seam",
248
- children: /* @__PURE__ */ G("div", {
285
+ children: /* @__PURE__ */ B("div", {
249
286
  className: "p-5",
250
- children: [/* @__PURE__ */ G("h3", {
287
+ children: [/* @__PURE__ */ B("h3", {
251
288
  className: "font-semibold mb-4 flex items-center gap-2",
252
- children: [/* @__PURE__ */ W("div", {
289
+ children: [/* @__PURE__ */ z("div", {
253
290
  className: "p-1.5 rounded-lg bg-action-primary-bg/10",
254
- children: /* @__PURE__ */ W(I, {
291
+ children: /* @__PURE__ */ z(N, {
255
292
  size: 14,
256
293
  className: "text-primary"
257
294
  })
258
- }), l(O, "sandbox.detail.cards.resources.title", "Resources")]
259
- }), /* @__PURE__ */ W(d, {
260
- cpuRequest: Z.resources?.cpuRequest ?? "0",
261
- cpuLimit: Z.resources?.cpuLimit,
262
- memoryRequest: Z.resources?.memoryRequest ?? "0",
263
- memoryLimit: Z.resources?.memoryLimit,
264
- containerCount: Z.containers?.length,
295
+ }), l(E, "sandbox.detail.cards.resources.title", "Resources")]
296
+ }), /* @__PURE__ */ z(d, {
297
+ cpuRequest: J.resources?.cpuRequest ?? "0",
298
+ cpuLimit: J.resources?.cpuLimit,
299
+ memoryRequest: J.resources?.memoryRequest ?? "0",
300
+ memoryLimit: J.resources?.memoryLimit,
301
+ containerCount: J.containers?.length,
265
302
  layout: "grid"
266
303
  })]
267
304
  })
268
305
  }),
269
- /* @__PURE__ */ W(s, {
306
+ /* @__PURE__ */ z(s, {
270
307
  treatment: "plain",
271
308
  className: "border-border-seam",
272
- children: /* @__PURE__ */ G("div", {
309
+ children: /* @__PURE__ */ B("div", {
273
310
  className: "p-5",
274
- children: [/* @__PURE__ */ G("h3", {
311
+ children: [/* @__PURE__ */ B("h3", {
275
312
  className: "font-semibold mb-4 flex items-center gap-2",
276
- children: [/* @__PURE__ */ W("div", {
313
+ children: [/* @__PURE__ */ z("div", {
277
314
  className: "p-1.5 rounded-lg bg-action-primary-bg/10",
278
- children: /* @__PURE__ */ W(de, {
315
+ children: /* @__PURE__ */ z(me, {
279
316
  size: 14,
280
317
  className: "text-primary"
281
318
  })
282
- }), l(O, "sandbox.detail.cards.kubernetes.title", "Kubernetes")]
283
- }), /* @__PURE__ */ G("div", {
319
+ }), l(E, "sandbox.detail.cards.kubernetes.title", "Kubernetes")]
320
+ }), /* @__PURE__ */ B("div", {
284
321
  className: "space-y-3",
285
322
  children: [
286
- Z.crdName && /* @__PURE__ */ G("div", {
323
+ J.crdName && /* @__PURE__ */ B("div", {
287
324
  className: "flex items-center justify-between",
288
- children: [/* @__PURE__ */ W("span", {
325
+ children: [/* @__PURE__ */ z("span", {
289
326
  className: "text-sm text-text-secondary",
290
- children: l(O, "sandbox.detail.cards.kubernetes.crdName", "CRD Name")
291
- }), /* @__PURE__ */ G("div", {
327
+ children: l(E, "sandbox.detail.cards.kubernetes.crdName", "CRD Name")
328
+ }), /* @__PURE__ */ B("div", {
292
329
  className: "flex items-center gap-1.5",
293
- children: [/* @__PURE__ */ W("span", {
330
+ children: [/* @__PURE__ */ z("span", {
294
331
  className: "text-sm font-mono",
295
- children: Z.crdName
296
- }), /* @__PURE__ */ W(J, {
297
- value: Z.crdName,
332
+ children: J.crdName
333
+ }), /* @__PURE__ */ z(U, {
334
+ value: J.crdName,
298
335
  field: "crdName",
299
- copiedField: A,
300
- onCopy: Q,
301
- ariaLabel: $("crdName")
336
+ copiedField: O,
337
+ onCopy: Y,
338
+ ariaLabel: X("crdName")
302
339
  })]
303
340
  })]
304
341
  }),
305
- Z.podName && /* @__PURE__ */ G("div", {
342
+ J.podName && /* @__PURE__ */ B("div", {
306
343
  className: "flex items-center justify-between",
307
- children: [/* @__PURE__ */ W("span", {
344
+ children: [/* @__PURE__ */ z("span", {
308
345
  className: "text-sm text-text-secondary",
309
- children: l(O, "sandbox.detail.cards.kubernetes.podName", "Pod Name")
310
- }), /* @__PURE__ */ G("div", {
346
+ children: l(E, "sandbox.detail.cards.kubernetes.podName", "Pod Name")
347
+ }), /* @__PURE__ */ B("div", {
311
348
  className: "flex items-center gap-1.5",
312
- children: [/* @__PURE__ */ W("span", {
349
+ children: [/* @__PURE__ */ z("span", {
313
350
  className: "text-sm font-mono",
314
- children: Z.podName
315
- }), /* @__PURE__ */ W(J, {
316
- value: Z.podName,
351
+ children: J.podName
352
+ }), /* @__PURE__ */ z(U, {
353
+ value: J.podName,
317
354
  field: "podName",
318
- copiedField: A,
319
- onCopy: Q,
320
- ariaLabel: $("podName")
355
+ copiedField: O,
356
+ onCopy: Y,
357
+ ariaLabel: X("podName")
321
358
  })]
322
359
  })]
323
360
  }),
324
- /* @__PURE__ */ G("div", {
361
+ /* @__PURE__ */ B("div", {
325
362
  className: "flex items-center justify-between",
326
- children: [/* @__PURE__ */ W("span", {
363
+ children: [/* @__PURE__ */ z("span", {
327
364
  className: "text-sm text-text-secondary",
328
- children: l(O, "sandbox.detail.cards.kubernetes.namespace", "Namespace")
329
- }), /* @__PURE__ */ W("span", {
365
+ children: l(E, "sandbox.detail.cards.kubernetes.namespace", "Namespace")
366
+ }), /* @__PURE__ */ z("span", {
330
367
  className: "text-sm font-mono",
331
- children: Z.namespace
368
+ children: J.namespace
332
369
  })]
333
370
  }),
334
- /* @__PURE__ */ G("div", {
371
+ /* @__PURE__ */ B("div", {
335
372
  className: "flex items-center justify-between",
336
- children: [/* @__PURE__ */ W("span", {
373
+ children: [/* @__PURE__ */ z("span", {
337
374
  className: "text-sm text-text-secondary",
338
- children: l(O, "sandbox.detail.cards.kubernetes.runtimeClass", "Runtime Class")
339
- }), /* @__PURE__ */ W(t, {
375
+ children: l(E, "sandbox.detail.cards.kubernetes.runtimeClass", "Runtime Class")
376
+ }), /* @__PURE__ */ z(t, {
340
377
  variant: "secondary",
341
378
  className: "font-mono text-xs",
342
- children: Z.runtimeClass
379
+ children: J.runtimeClass
343
380
  })]
344
381
  }),
345
- Z.network?.serviceName && /* @__PURE__ */ G("div", {
382
+ J.network?.serviceName && /* @__PURE__ */ B("div", {
346
383
  className: "flex items-center justify-between",
347
- children: [/* @__PURE__ */ W("span", {
384
+ children: [/* @__PURE__ */ z("span", {
348
385
  className: "text-sm text-text-secondary",
349
- children: l(O, "sandbox.detail.cards.kubernetes.serviceName", "Service Name")
350
- }), /* @__PURE__ */ G("div", {
386
+ children: l(E, "sandbox.detail.cards.kubernetes.serviceName", "Service Name")
387
+ }), /* @__PURE__ */ B("div", {
351
388
  className: "flex items-center gap-1.5",
352
- children: [/* @__PURE__ */ W("span", {
389
+ children: [/* @__PURE__ */ z("span", {
353
390
  className: "text-sm font-mono",
354
- children: Z.network.serviceName
355
- }), /* @__PURE__ */ W(J, {
356
- value: Z.network.serviceName,
391
+ children: J.network.serviceName
392
+ }), /* @__PURE__ */ z(U, {
393
+ value: J.network.serviceName,
357
394
  field: "serviceName",
358
- copiedField: A,
359
- onCopy: Q,
360
- ariaLabel: $("serviceName")
395
+ copiedField: O,
396
+ onCopy: Y,
397
+ ariaLabel: X("serviceName")
361
398
  })]
362
399
  })]
363
400
  }),
364
- Z.network?.internalUrl && /* @__PURE__ */ G("div", {
401
+ J.network?.internalUrl && /* @__PURE__ */ B("div", {
365
402
  className: "flex items-center justify-between",
366
- children: [/* @__PURE__ */ W("span", {
403
+ children: [/* @__PURE__ */ z("span", {
367
404
  className: "text-sm text-text-secondary",
368
- children: l(O, "sandbox.detail.cards.kubernetes.internalUrl", "Internal URL")
369
- }), /* @__PURE__ */ G("div", {
405
+ children: l(E, "sandbox.detail.cards.kubernetes.internalUrl", "Internal URL")
406
+ }), /* @__PURE__ */ B("div", {
370
407
  className: "flex items-center gap-1.5",
371
- children: [/* @__PURE__ */ W("span", {
408
+ children: [/* @__PURE__ */ z("span", {
372
409
  className: "text-sm text-primary font-mono truncate max-w-48",
373
- children: Z.network.internalUrl
374
- }), /* @__PURE__ */ W(J, {
375
- value: Z.network.internalUrl,
410
+ children: J.network.internalUrl
411
+ }), /* @__PURE__ */ z(U, {
412
+ value: J.network.internalUrl,
376
413
  field: "internalUrl",
377
- copiedField: A,
378
- onCopy: Q,
379
- ariaLabel: $("internalUrl")
414
+ copiedField: O,
415
+ onCopy: Y,
416
+ ariaLabel: X("internalUrl")
380
417
  })]
381
418
  })]
382
419
  }),
383
- Z.network?.containerUrls && typeof Z.network.containerUrls == "object" && Object.keys(Z.network.containerUrls).filter((e) => !e.includes(":")).length > 1 && /* @__PURE__ */ G("div", {
420
+ J.network?.containerUrls && typeof J.network.containerUrls == "object" && Object.keys(J.network.containerUrls).filter((e) => !e.includes(":")).length > 1 && /* @__PURE__ */ B("div", {
384
421
  className: "mt-3 pt-3 border-t border-border-subtle/30",
385
- children: [/* @__PURE__ */ W("p", {
422
+ children: [/* @__PURE__ */ z("p", {
386
423
  className: "text-xs font-semibold text-text-secondary mb-2",
387
- children: l(O, "sandbox.detail.cards.kubernetes.containerEndpoints", "Container Endpoints")
388
- }), /* @__PURE__ */ W("div", {
424
+ children: l(E, "sandbox.detail.cards.kubernetes.containerEndpoints", "Container Endpoints")
425
+ }), /* @__PURE__ */ z("div", {
389
426
  className: "space-y-1.5",
390
- children: Object.entries(Z.network.containerUrls).reduce((e, [t, n]) => (t.includes(":") || e.push(/* @__PURE__ */ G("div", {
427
+ children: Object.entries(J.network.containerUrls).reduce((e, [t, n]) => (t.includes(":") || e.push(/* @__PURE__ */ B("div", {
391
428
  className: "flex items-center justify-between",
392
- children: [/* @__PURE__ */ W("span", {
429
+ children: [/* @__PURE__ */ z("span", {
393
430
  className: "text-xs text-text-secondary font-mono",
394
431
  children: t
395
- }), /* @__PURE__ */ G("div", {
432
+ }), /* @__PURE__ */ B("div", {
396
433
  className: "flex items-center gap-1.5",
397
- children: [/* @__PURE__ */ W("span", {
434
+ children: [/* @__PURE__ */ z("span", {
398
435
  className: "text-xs text-primary font-mono truncate max-w-40",
399
436
  children: n
400
- }), /* @__PURE__ */ W(J, {
437
+ }), /* @__PURE__ */ z(U, {
401
438
  value: n,
402
439
  field: `container-${t}`,
403
- copiedField: A,
404
- onCopy: Q,
405
- ariaLabel: $(`container-${t}`)
440
+ copiedField: O,
441
+ onCopy: Y,
442
+ ariaLabel: X(`container-${t}`)
406
443
  })]
407
444
  })]
408
445
  }, t)), e), [])
@@ -412,142 +449,142 @@ function Y() {
412
449
  })]
413
450
  })
414
451
  }),
415
- /* @__PURE__ */ W(s, {
452
+ /* @__PURE__ */ z(s, {
416
453
  treatment: "plain",
417
454
  className: "border-border-seam",
418
- children: /* @__PURE__ */ G("div", {
455
+ children: /* @__PURE__ */ B("div", {
419
456
  className: "p-5",
420
- children: [/* @__PURE__ */ G("h3", {
457
+ children: [/* @__PURE__ */ B("h3", {
421
458
  className: "font-semibold mb-4 flex items-center gap-2",
422
- children: [/* @__PURE__ */ W("div", {
459
+ children: [/* @__PURE__ */ z("div", {
423
460
  className: "p-1.5 rounded-lg bg-action-primary-bg/10",
424
- children: /* @__PURE__ */ W(se, {
461
+ children: /* @__PURE__ */ z(le, {
425
462
  size: 14,
426
463
  className: "text-primary"
427
464
  })
428
- }), l(O, "sandbox.detail.cards.lifecycle.title", "Lifecycle")]
429
- }), /* @__PURE__ */ G("div", {
465
+ }), l(E, "sandbox.detail.cards.lifecycle.title", "Lifecycle")]
466
+ }), /* @__PURE__ */ B("div", {
430
467
  className: "space-y-3",
431
468
  children: [
432
- /* @__PURE__ */ G("div", {
469
+ /* @__PURE__ */ B("div", {
433
470
  className: "flex items-center justify-between",
434
- children: [/* @__PURE__ */ W("span", {
471
+ children: [/* @__PURE__ */ z("span", {
435
472
  className: "text-sm text-text-secondary",
436
- children: l(O, "sandbox.detail.cards.lifecycle.ttl", "TTL")
437
- }), /* @__PURE__ */ W("span", {
473
+ children: l(E, "sandbox.detail.cards.lifecycle.ttl", "TTL")
474
+ }), /* @__PURE__ */ z("span", {
438
475
  className: "text-sm font-medium",
439
- children: pe(Z.ttlSeconds)
476
+ children: be(J.ttlSeconds)
440
477
  })]
441
478
  }),
442
- Z.expiresAt && we && /* @__PURE__ */ G("div", {
479
+ J.expiresAt && Ae && /* @__PURE__ */ B("div", {
443
480
  className: "flex items-center justify-between",
444
- children: [/* @__PURE__ */ W("span", {
481
+ children: [/* @__PURE__ */ z("span", {
445
482
  className: "text-sm text-text-secondary",
446
- children: l(O, "sandbox.detail.cards.lifecycle.expires", "Expires")
447
- }), /* @__PURE__ */ G(t, {
483
+ children: l(E, "sandbox.detail.cards.lifecycle.expires", "Expires")
484
+ }), /* @__PURE__ */ B(t, {
448
485
  variant: "outline",
449
486
  className: "gap-1",
450
- children: [/* @__PURE__ */ W(z, { size: 12 }), me(Z.expiresAt)]
487
+ children: [/* @__PURE__ */ z(I, { size: 12 }), xe(J.expiresAt)]
451
488
  })]
452
489
  }),
453
- /* @__PURE__ */ G("div", {
490
+ /* @__PURE__ */ B("div", {
454
491
  className: "flex items-center justify-between",
455
- children: [/* @__PURE__ */ W("span", {
492
+ children: [/* @__PURE__ */ z("span", {
456
493
  className: "text-sm text-text-secondary",
457
- children: l(O, "sandbox.detail.cards.lifecycle.created", "Created")
458
- }), /* @__PURE__ */ W("span", {
494
+ children: l(E, "sandbox.detail.cards.lifecycle.created", "Created")
495
+ }), /* @__PURE__ */ z("span", {
459
496
  className: "text-sm",
460
- children: K(Z.createdAt)
497
+ children: V(J.createdAt)
461
498
  })]
462
499
  }),
463
- /* @__PURE__ */ G("div", {
500
+ /* @__PURE__ */ B("div", {
464
501
  className: "flex items-center justify-between",
465
- children: [/* @__PURE__ */ W("span", {
502
+ children: [/* @__PURE__ */ z("span", {
466
503
  className: "text-sm text-text-secondary",
467
- children: l(O, "sandbox.detail.cards.lifecycle.updated", "Updated")
468
- }), /* @__PURE__ */ W("span", {
504
+ children: l(E, "sandbox.detail.cards.lifecycle.updated", "Updated")
505
+ }), /* @__PURE__ */ z("span", {
469
506
  className: "text-sm",
470
- children: K(Z.updatedAt)
507
+ children: V(J.updatedAt)
471
508
  })]
472
509
  }),
473
- Z.stoppedAt && /* @__PURE__ */ G("div", {
510
+ J.stoppedAt && /* @__PURE__ */ B("div", {
474
511
  className: "flex items-center justify-between",
475
- children: [/* @__PURE__ */ W("span", {
512
+ children: [/* @__PURE__ */ z("span", {
476
513
  className: "text-sm text-text-secondary",
477
- children: l(O, "sandbox.detail.cards.lifecycle.stopped", "Stopped")
478
- }), /* @__PURE__ */ W("span", {
514
+ children: l(E, "sandbox.detail.cards.lifecycle.stopped", "Stopped")
515
+ }), /* @__PURE__ */ z("span", {
479
516
  className: "text-sm",
480
- children: K(Z.stoppedAt)
517
+ children: V(J.stoppedAt)
481
518
  })]
482
519
  })
483
520
  ]
484
521
  })]
485
522
  })
486
523
  }),
487
- /* @__PURE__ */ W(s, {
524
+ /* @__PURE__ */ z(s, {
488
525
  treatment: "plain",
489
526
  className: "border-border-seam",
490
- children: /* @__PURE__ */ G("div", {
527
+ children: /* @__PURE__ */ B("div", {
491
528
  className: "p-5",
492
- children: [/* @__PURE__ */ G("h3", {
529
+ children: [/* @__PURE__ */ B("h3", {
493
530
  className: "font-semibold mb-4 flex items-center gap-2",
494
- children: [/* @__PURE__ */ W("div", {
531
+ children: [/* @__PURE__ */ z("div", {
495
532
  className: "p-1.5 rounded-lg bg-action-primary-bg/10",
496
- children: /* @__PURE__ */ W(P, {
533
+ children: /* @__PURE__ */ z(j, {
497
534
  size: 14,
498
535
  className: "text-primary"
499
536
  })
500
- }), l(O, "sandbox.detail.cards.details.title", "Details")]
501
- }), /* @__PURE__ */ G("div", {
537
+ }), l(E, "sandbox.detail.cards.details.title", "Details")]
538
+ }), /* @__PURE__ */ B("div", {
502
539
  className: "space-y-3",
503
540
  children: [
504
- /* @__PURE__ */ G("div", {
541
+ /* @__PURE__ */ B("div", {
505
542
  className: "flex items-center justify-between",
506
- children: [/* @__PURE__ */ W("span", {
543
+ children: [/* @__PURE__ */ z("span", {
507
544
  className: "text-sm text-text-secondary",
508
- children: l(O, "sandbox.detail.cards.details.template", "Template")
509
- }), /* @__PURE__ */ W(f, {
510
- type: Z.template,
545
+ children: l(E, "sandbox.detail.cards.details.template", "Template")
546
+ }), /* @__PURE__ */ z(f, {
547
+ type: J.template,
511
548
  showLabel: !0
512
549
  })]
513
550
  }),
514
- /* @__PURE__ */ G("div", {
551
+ /* @__PURE__ */ B("div", {
515
552
  className: "flex items-center justify-between",
516
- children: [/* @__PURE__ */ W("span", {
553
+ children: [/* @__PURE__ */ z("span", {
517
554
  className: "text-sm text-text-secondary",
518
- children: l(O, "sandbox.detail.cards.details.mode", "Mode")
519
- }), /* @__PURE__ */ W(t, {
555
+ children: l(E, "sandbox.detail.cards.details.mode", "Mode")
556
+ }), /* @__PURE__ */ z(t, {
520
557
  variant: "outline",
521
558
  className: "gap-1 text-xs font-mono",
522
- children: Z.mode === "JOB" ? /* @__PURE__ */ G(U, { children: [
523
- /* @__PURE__ */ W(ue, { size: 12 }),
559
+ children: J.mode === "JOB" ? /* @__PURE__ */ B(R, { children: [
560
+ /* @__PURE__ */ z(pe, { size: 12 }),
524
561
  " ",
525
- l(O, "sandbox.detail.cards.details.mode.job", "Job")
526
- ] }) : /* @__PURE__ */ G(U, { children: [
527
- /* @__PURE__ */ W(ce, { size: 12 }),
562
+ l(E, "sandbox.detail.cards.details.mode.job", "Job")
563
+ ] }) : /* @__PURE__ */ B(R, { children: [
564
+ /* @__PURE__ */ z(ue, { size: 12 }),
528
565
  " ",
529
- l(O, "sandbox.detail.cards.details.mode.deployment", "Deployment")
566
+ l(E, "sandbox.detail.cards.details.mode.deployment", "Deployment")
530
567
  ] })
531
568
  })]
532
569
  }),
533
- /* @__PURE__ */ G("div", {
570
+ /* @__PURE__ */ B("div", {
534
571
  className: "flex items-center justify-between",
535
- children: [/* @__PURE__ */ W("span", {
572
+ children: [/* @__PURE__ */ z("span", {
536
573
  className: "text-sm text-text-secondary",
537
- children: l(O, "sandbox.detail.cards.details.workspace", "Workspace")
538
- }), /* @__PURE__ */ W("span", {
574
+ children: l(E, "sandbox.detail.cards.details.workspace", "Workspace")
575
+ }), /* @__PURE__ */ z("span", {
539
576
  className: "text-sm font-mono",
540
- children: Z.workspaceId
577
+ children: J.workspaceId
541
578
  })]
542
579
  }),
543
- /* @__PURE__ */ G("div", {
580
+ /* @__PURE__ */ B("div", {
544
581
  className: "flex items-center justify-between",
545
- children: [/* @__PURE__ */ W("span", {
582
+ children: [/* @__PURE__ */ z("span", {
546
583
  className: "text-sm text-text-secondary",
547
- children: l(O, "sandbox.detail.cards.details.createdBy", "Created By")
548
- }), /* @__PURE__ */ W("span", {
584
+ children: l(E, "sandbox.detail.cards.details.createdBy", "Created By")
585
+ }), /* @__PURE__ */ z("span", {
549
586
  className: "text-sm",
550
- children: Z.createdBy
587
+ children: J.createdBy
551
588
  })]
552
589
  })
553
590
  ]
@@ -556,53 +593,53 @@ function Y() {
556
593
  })
557
594
  ]
558
595
  }),
559
- Z.containers && Z.containers.length > 0 && /* @__PURE__ */ W(s, {
596
+ J.containers && J.containers.length > 0 && /* @__PURE__ */ z(s, {
560
597
  treatment: "plain",
561
598
  className: "border-border-seam",
562
- children: /* @__PURE__ */ G("div", {
599
+ children: /* @__PURE__ */ B("div", {
563
600
  className: "p-5",
564
- children: [/* @__PURE__ */ G("h3", {
601
+ children: [/* @__PURE__ */ B("h3", {
565
602
  className: "font-semibold mb-4 flex items-center gap-2",
566
603
  children: [
567
- /* @__PURE__ */ W("div", {
604
+ /* @__PURE__ */ z("div", {
568
605
  className: "p-1.5 rounded-lg bg-action-primary-bg/10",
569
- children: /* @__PURE__ */ W(le, {
606
+ children: /* @__PURE__ */ z(de, {
570
607
  size: 14,
571
608
  className: "text-primary"
572
609
  })
573
610
  }),
574
- l(O, "sandbox.detail.cards.containers.title", "Containers"),
575
- /* @__PURE__ */ W(t, {
611
+ l(E, "sandbox.detail.cards.containers.title", "Containers"),
612
+ /* @__PURE__ */ z(t, {
576
613
  variant: "secondary",
577
614
  className: "ml-1",
578
- children: Z.containers.length
615
+ children: J.containers.length
579
616
  })
580
617
  ]
581
- }), /* @__PURE__ */ W(he, {
582
- enabled: Z.containers.length > 4,
618
+ }), /* @__PURE__ */ z(Se, {
619
+ enabled: J.containers.length > 4,
583
620
  collapsedHeight: 220,
584
- children: /* @__PURE__ */ W("div", {
621
+ children: /* @__PURE__ */ z("div", {
585
622
  className: "space-y-3",
586
- children: Z.containers.map((e, n) => {
587
- let r = Z.containerStatuses?.find((t) => t.name === e.name);
588
- return /* @__PURE__ */ G("div", {
623
+ children: J.containers.map((e, n) => {
624
+ let r = J.containerStatuses?.find((t) => t.name === e.name);
625
+ return /* @__PURE__ */ B("div", {
589
626
  className: "flex items-center justify-between p-3 rounded-lg border border-border-seam hover:bg-bg-sunken/30 transition-colors",
590
- children: [/* @__PURE__ */ G("div", {
627
+ children: [/* @__PURE__ */ B("div", {
591
628
  className: "flex items-center gap-3 min-w-0",
592
- children: [/* @__PURE__ */ W("div", { className: `w-2.5 h-2.5 rounded-full flex-shrink-0 ${r?.ready ? "bg-status-success-text motion-safe:animate-vc-glow-pulse" : r ? "bg-status-warning-text animate-pulse" : "bg-text-tertiary"}` }), /* @__PURE__ */ G("div", {
629
+ children: [/* @__PURE__ */ z("div", { className: `w-2.5 h-2.5 rounded-full flex-shrink-0 ${r?.ready ? "bg-status-success-text motion-safe:animate-vc-glow-pulse" : r ? "bg-status-warning-text animate-pulse" : "bg-text-tertiary"}` }), /* @__PURE__ */ B("div", {
593
630
  className: "min-w-0",
594
- children: [/* @__PURE__ */ W("p", {
631
+ children: [/* @__PURE__ */ z("p", {
595
632
  className: "text-sm font-medium",
596
633
  children: e.name
597
- }), /* @__PURE__ */ W("p", {
634
+ }), /* @__PURE__ */ z("p", {
598
635
  className: "text-xs text-text-secondary font-mono truncate",
599
636
  children: e.image
600
637
  })]
601
638
  })]
602
- }), /* @__PURE__ */ G("div", {
639
+ }), /* @__PURE__ */ B("div", {
603
640
  className: "flex items-center gap-2 flex-shrink-0",
604
641
  children: [
605
- e.ports?.map((e) => /* @__PURE__ */ G(t, {
642
+ e.ports?.map((e) => /* @__PURE__ */ B(t, {
606
643
  variant: "outline",
607
644
  className: "text-xs font-mono",
608
645
  children: [
@@ -611,12 +648,12 @@ function Y() {
611
648
  e.name ? ` (${e.name})` : ""
612
649
  ]
613
650
  }, e.containerPort)),
614
- r && /* @__PURE__ */ W(t, {
651
+ r && /* @__PURE__ */ z(t, {
615
652
  variant: r.ready ? "default" : "secondary",
616
653
  className: `text-xs ${r.ready ? "bg-status-success-bg-subtle text-status-success-text" : ""}`,
617
- children: r.ready ? l(O, "sandbox.detail.cards.containers.status.ready", "Ready") : l(O, "sandbox.detail.cards.containers.status.notReady", "Not Ready")
654
+ children: r.ready ? l(E, "sandbox.detail.cards.containers.status.ready", "Ready") : l(E, "sandbox.detail.cards.containers.status.notReady", "Not Ready")
618
655
  }),
619
- r?.restartCount !== void 0 && r.restartCount > 0 && /* @__PURE__ */ G(t, {
656
+ r?.restartCount !== void 0 && r.restartCount > 0 && /* @__PURE__ */ B(t, {
620
657
  variant: "outline",
621
658
  className: "text-xs text-status-warning-text",
622
659
  children: [
@@ -633,88 +670,88 @@ function Y() {
633
670
  })]
634
671
  })
635
672
  }),
636
- Z.storage && Z.storage.mode !== "NONE" && /* @__PURE__ */ W(s, {
673
+ J.storage && J.storage.mode !== "NONE" && /* @__PURE__ */ z(s, {
637
674
  treatment: "plain",
638
675
  className: "border-border-seam",
639
- children: /* @__PURE__ */ G("div", {
676
+ children: /* @__PURE__ */ B("div", {
640
677
  className: "p-5",
641
- children: [/* @__PURE__ */ G("h3", {
678
+ children: [/* @__PURE__ */ B("h3", {
642
679
  className: "font-semibold mb-4 flex items-center gap-2",
643
- children: [/* @__PURE__ */ W("div", {
680
+ children: [/* @__PURE__ */ z("div", {
644
681
  className: "p-1.5 rounded-lg bg-action-primary-bg/10",
645
- children: /* @__PURE__ */ W(M, {
682
+ children: /* @__PURE__ */ z(fe, {
646
683
  size: 14,
647
684
  className: "text-primary"
648
685
  })
649
- }), l(O, "sandbox.detail.cards.storage.title", "Storage")]
650
- }), /* @__PURE__ */ G("div", {
686
+ }), l(E, "sandbox.detail.cards.storage.title", "Storage")]
687
+ }), /* @__PURE__ */ B("div", {
651
688
  className: "space-y-3",
652
689
  children: [
653
- /* @__PURE__ */ G("div", {
690
+ /* @__PURE__ */ B("div", {
654
691
  className: "flex items-center justify-between",
655
- children: [/* @__PURE__ */ W("span", {
692
+ children: [/* @__PURE__ */ z("span", {
656
693
  className: "text-sm text-text-secondary",
657
- children: l(O, "sandbox.detail.cards.storage.mode", "Mode")
658
- }), /* @__PURE__ */ W(t, {
694
+ children: l(E, "sandbox.detail.cards.storage.mode", "Mode")
695
+ }), /* @__PURE__ */ z(t, {
659
696
  variant: "outline",
660
- children: Z.storage.mode === "EPHEMERAL" ? l(O, "sandbox.detail.cards.storage.ephemeral", "Ephemeral") : l(O, "sandbox.detail.cards.storage.persistent", "Persistent")
697
+ children: J.storage.mode === "EPHEMERAL" ? l(E, "sandbox.detail.cards.storage.ephemeral", "Ephemeral") : l(E, "sandbox.detail.cards.storage.persistent", "Persistent")
661
698
  })]
662
699
  }),
663
- Z.storage.sizeGi && /* @__PURE__ */ G("div", {
700
+ J.storage.sizeGi && /* @__PURE__ */ B("div", {
664
701
  className: "flex items-center justify-between",
665
- children: [/* @__PURE__ */ W("span", {
702
+ children: [/* @__PURE__ */ z("span", {
666
703
  className: "text-sm text-text-secondary",
667
- children: l(O, "sandbox.detail.cards.storage.size", "Size")
668
- }), /* @__PURE__ */ G("span", {
704
+ children: l(E, "sandbox.detail.cards.storage.size", "Size")
705
+ }), /* @__PURE__ */ B("span", {
669
706
  className: "text-sm font-medium",
670
- children: [Z.storage.sizeGi, " GiB"]
707
+ children: [J.storage.sizeGi, " GiB"]
671
708
  })]
672
709
  }),
673
- Z.storage.mountPath && /* @__PURE__ */ G("div", {
710
+ J.storage.mountPath && /* @__PURE__ */ B("div", {
674
711
  className: "flex items-center justify-between",
675
- children: [/* @__PURE__ */ W("span", {
712
+ children: [/* @__PURE__ */ z("span", {
676
713
  className: "text-sm text-text-secondary",
677
- children: l(O, "sandbox.detail.cards.storage.mountPath", "Mount Path")
678
- }), /* @__PURE__ */ W("span", {
714
+ children: l(E, "sandbox.detail.cards.storage.mountPath", "Mount Path")
715
+ }), /* @__PURE__ */ z("span", {
679
716
  className: "text-sm font-mono",
680
- children: Z.storage.mountPath
717
+ children: J.storage.mountPath
681
718
  })]
682
719
  }),
683
- /* @__PURE__ */ G("div", {
720
+ /* @__PURE__ */ B("div", {
684
721
  className: "flex items-center justify-between",
685
- children: [/* @__PURE__ */ W("span", {
722
+ children: [/* @__PURE__ */ z("span", {
686
723
  className: "text-sm text-text-secondary",
687
- children: l(O, "sandbox.detail.cards.storage.retainOnDelete", "Retain on Delete")
688
- }), /* @__PURE__ */ W(t, {
689
- variant: Z.storage.retainOnDelete ? "default" : "secondary",
690
- children: Z.storage.retainOnDelete ? l(O, "sandbox.detail.cards.storage.retainYes", "Yes") : l(O, "sandbox.detail.cards.storage.retainNo", "No")
724
+ children: l(E, "sandbox.detail.cards.storage.retainOnDelete", "Retain on Delete")
725
+ }), /* @__PURE__ */ z(t, {
726
+ variant: J.storage.retainOnDelete ? "default" : "secondary",
727
+ children: J.storage.retainOnDelete ? l(E, "sandbox.detail.cards.storage.retainYes", "Yes") : l(E, "sandbox.detail.cards.storage.retainNo", "No")
691
728
  })]
692
729
  })
693
730
  ]
694
731
  })]
695
732
  })
696
733
  }),
697
- Z.errorMessage && /* @__PURE__ */ W(i, {
734
+ J.errorMessage && /* @__PURE__ */ z(i, {
698
735
  className: "border-status-error-border/50 bg-status-error-bg/5",
699
- children: /* @__PURE__ */ G(a, {
736
+ children: /* @__PURE__ */ B(a, {
700
737
  className: "p-5",
701
- children: [/* @__PURE__ */ G("h3", {
738
+ children: [/* @__PURE__ */ B("h3", {
702
739
  className: "font-semibold text-status-error-text mb-2 flex items-center gap-2",
703
- children: [/* @__PURE__ */ W(ae, { size: 18 }), l(O, "sandbox.detail.cards.errorDetails.title", "Error Details")]
704
- }), /* @__PURE__ */ W("p", {
740
+ children: [/* @__PURE__ */ z(se, { size: 18 }), l(E, "sandbox.detail.cards.errorDetails.title", "Error Details")]
741
+ }), /* @__PURE__ */ z("p", {
705
742
  className: "text-sm text-status-error-text/80 font-mono bg-status-error-bg/5 rounded-lg p-3",
706
- children: Z.errorMessage
743
+ children: J.errorMessage
707
744
  })]
708
745
  })
709
746
  }),
710
747
  (() => {
711
- let e = Z.metadata ?? null, t = e?.devPortalApplicationId ?? e?.appId, n = e?.clientId, r = e?.clientSecretRevealOnce;
712
- return !t && !n ? null : /* @__PURE__ */ W(s, {
748
+ let e = J.metadata ?? null, t = e?.devPortalApplicationId ?? e?.appId, n = e?.clientId, r = e?.clientSecretRevealOnce;
749
+ return !t && !n ? null : /* @__PURE__ */ z(s, {
713
750
  treatment: "plain",
714
751
  className: "border-border-seam",
715
- children: /* @__PURE__ */ W("div", {
752
+ children: /* @__PURE__ */ z("div", {
716
753
  className: "p-5",
717
- children: /* @__PURE__ */ W(re, {
754
+ children: /* @__PURE__ */ z(ae, {
718
755
  appId: t,
719
756
  clientId: n,
720
757
  clientSecret: r
@@ -722,57 +759,60 @@ function Y() {
722
759
  })
723
760
  });
724
761
  })(),
725
- /* @__PURE__ */ W(s, {
762
+ /* @__PURE__ */ z(s, {
726
763
  treatment: "plain",
727
764
  className: "border-border-seam",
728
- children: /* @__PURE__ */ G("div", {
765
+ children: /* @__PURE__ */ B("div", {
729
766
  className: "p-5",
730
- children: [/* @__PURE__ */ W("h3", {
767
+ children: [/* @__PURE__ */ z("h3", {
731
768
  className: "mb-3 text-sm font-semibold text-text-primary",
732
- children: l(O, "sandbox.detail.cards.activity.title", "Activity")
733
- }), /* @__PURE__ */ W(T, {
734
- sandboxId: Z.id,
735
- workspaceId: D ?? ""
769
+ children: l(E, "sandbox.detail.cards.activity.title", "Activity")
770
+ }), /* @__PURE__ */ z(ie, {
771
+ sandboxId: J.id,
772
+ workspaceId: T ?? ""
736
773
  })]
737
774
  })
738
775
  }),
739
- /* @__PURE__ */ W(ge, {
740
- sandbox: Z,
741
- workspaceId: D ?? ""
776
+ /* @__PURE__ */ z(Ce, {
777
+ sandbox: J,
778
+ workspaceId: T ?? ""
742
779
  }),
743
- /* @__PURE__ */ W(ie, {
744
- sandbox: Z,
745
- workspaceId: D ?? ""
780
+ /* @__PURE__ */ z("div", {
781
+ id: "sandbox-script-runner",
782
+ children: /* @__PURE__ */ z(oe, {
783
+ sandbox: J,
784
+ workspaceId: T ?? ""
785
+ })
746
786
  }),
747
- Z.expiresAt && /* @__PURE__ */ W(ne, {
748
- isOpen: N,
749
- onClose: () => R(!1),
750
- currentExpiresAt: Z.expiresAt,
751
- isLoading: q,
787
+ J.expiresAt && /* @__PURE__ */ z(re, {
788
+ isOpen: A,
789
+ onClose: () => H(!1),
790
+ currentExpiresAt: J.expiresAt,
791
+ isLoading: W,
752
792
  onExtend: (e) => {
753
- Y(!0), xe({ variables: {
754
- context: { workspaceId: D },
755
- id: Z.id,
793
+ G(!0), De({ variables: {
794
+ context: { workspaceId: T },
795
+ id: J.id,
756
796
  additionalSeconds: e
757
797
  } }).then((t) => {
758
798
  let n = t.data?.extendSandboxTTL;
759
- n && Se.sandboxExtended({
799
+ n && Oe.sandboxExtended({
760
800
  sandboxId: n.id,
761
801
  addedSeconds: e,
762
802
  newExpiresAt: n.expiresAt
763
- }), X();
803
+ }), K();
764
804
  }).catch((e) => {
765
805
  console.error("Failed to extend TTL:", e);
766
806
  }).finally(() => {
767
- Y(!1), R(!1);
807
+ G(!1), H(!1);
768
808
  });
769
809
  }
770
810
  })
771
811
  ]
772
812
  });
773
813
  }
774
- function ge({ sandbox: e, workspaceId: t }) {
775
- let { t: r } = H(), [i, a] = k(e.containers?.[0]?.name ?? ""), [o, c] = k(100), u = O(null), [d, { data: f, loading: p, error: m }] = v(), h = e.status === "RUNNING" || e.status === "PROVISIONING", g = E(() => {
814
+ function Ce({ sandbox: e, workspaceId: t }) {
815
+ let { t: r } = L(), [i, a] = D(e.containers?.[0]?.name ?? ""), [o, c] = D(100), u = E(null), [d, { data: f, loading: p, error: m }] = v(), h = e.status === "RUNNING" || e.status === "PROVISIONING", g = w(() => {
776
816
  !i || !h || d({ variables: {
777
817
  context: { workspaceId: t },
778
818
  id: e.id,
@@ -787,88 +827,88 @@ function ge({ sandbox: e, workspaceId: t }) {
787
827
  o,
788
828
  h
789
829
  ]);
790
- D(() => {
830
+ T(() => {
791
831
  h && i && g();
792
832
  }, [
793
833
  i,
794
834
  h,
795
835
  g
796
- ]), D(() => {
836
+ ]), T(() => {
797
837
  u.current?.scrollIntoView({ behavior: "smooth" });
798
838
  }, [f]);
799
839
  let _ = f?.getSandboxLogs?.split("\n") ?? [];
800
- return /* @__PURE__ */ W(s, {
840
+ return /* @__PURE__ */ z(s, {
801
841
  treatment: "plain",
802
842
  className: "border-border-seam",
803
- children: /* @__PURE__ */ G("div", {
843
+ children: /* @__PURE__ */ B("div", {
804
844
  className: "p-5",
805
- children: [/* @__PURE__ */ G("div", {
845
+ children: [/* @__PURE__ */ B("div", {
806
846
  className: "flex items-center justify-between mb-4",
807
- children: [/* @__PURE__ */ G("h3", {
847
+ children: [/* @__PURE__ */ B("h3", {
808
848
  className: "font-semibold flex items-center gap-2",
809
- children: [/* @__PURE__ */ W("div", {
849
+ children: [/* @__PURE__ */ z("div", {
810
850
  className: "p-1.5 rounded-lg bg-action-primary-bg/10",
811
- children: /* @__PURE__ */ W(R, {
851
+ children: /* @__PURE__ */ z(F, {
812
852
  size: 14,
813
853
  className: "text-primary"
814
854
  })
815
855
  }), l(r, "sandbox.detail.logs.title", "Logs")]
816
- }), /* @__PURE__ */ G("div", {
856
+ }), /* @__PURE__ */ B("div", {
817
857
  className: "flex items-center gap-2",
818
858
  children: [
819
- e.containers && e.containers.length > 1 && /* @__PURE__ */ W("select", {
859
+ e.containers && e.containers.length > 1 && /* @__PURE__ */ z("select", {
820
860
  value: i,
821
861
  onChange: (e) => a(e.target.value),
822
862
  className: "px-2 py-1 text-xs border rounded-lg bg-bg-surface font-mono",
823
- children: e.containers.map((e) => /* @__PURE__ */ W("option", {
863
+ children: e.containers.map((e) => /* @__PURE__ */ z("option", {
824
864
  value: e.name,
825
865
  children: e.name
826
866
  }, e.name))
827
867
  }),
828
- /* @__PURE__ */ G("select", {
868
+ /* @__PURE__ */ B("select", {
829
869
  value: o,
830
870
  onChange: (e) => c(Number(e.target.value)),
831
871
  className: "px-2 py-1 text-xs border rounded-lg bg-bg-surface font-mono",
832
872
  children: [
833
- /* @__PURE__ */ W("option", {
873
+ /* @__PURE__ */ z("option", {
834
874
  value: 50,
835
875
  children: l(r, "sandbox.detail.logs.tailLines.50", "50 lines")
836
876
  }),
837
- /* @__PURE__ */ W("option", {
877
+ /* @__PURE__ */ z("option", {
838
878
  value: 100,
839
879
  children: l(r, "sandbox.detail.logs.tailLines.100", "100 lines")
840
880
  }),
841
- /* @__PURE__ */ W("option", {
881
+ /* @__PURE__ */ z("option", {
842
882
  value: 500,
843
883
  children: l(r, "sandbox.detail.logs.tailLines.500", "500 lines")
844
884
  }),
845
- /* @__PURE__ */ W("option", {
885
+ /* @__PURE__ */ z("option", {
846
886
  value: 1e3,
847
887
  children: l(r, "sandbox.detail.logs.tailLines.1000", "1000 lines")
848
888
  })
849
889
  ]
850
890
  }),
851
- /* @__PURE__ */ G(n, {
891
+ /* @__PURE__ */ B(n, {
852
892
  variant: "ghost",
853
893
  size: "sm",
854
894
  onClick: g,
855
895
  disabled: !h || p,
856
- children: [/* @__PURE__ */ W(I, {
896
+ children: [/* @__PURE__ */ z(N, {
857
897
  size: 14,
858
898
  className: p ? "animate-spin" : ""
859
899
  }), l(r, "sandbox.detail.logs.refresh", "Refresh")]
860
900
  }),
861
- _.length > 0 && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(n, {
901
+ _.length > 0 && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(n, {
862
902
  variant: "ghost",
863
903
  size: "sm",
864
904
  onClick: () => {
865
- S("light"), x(_.join("\n")).then((e) => {
866
- e ? (C("success"), b() && w("Copied logs")) : C("error");
905
+ x("light"), b(_.join("\n")).then((e) => {
906
+ e ? (S("success"), y() && C("Copied logs")) : S("error");
867
907
  });
868
908
  },
869
909
  title: l(r, "sandbox.detail.logs.copy.title", "Copy logs to clipboard"),
870
- children: /* @__PURE__ */ W(j, { size: 14 })
871
- }), /* @__PURE__ */ W(n, {
910
+ children: /* @__PURE__ */ z(k, { size: 14 })
911
+ }), /* @__PURE__ */ z(n, {
872
912
  variant: "ghost",
873
913
  size: "sm",
874
914
  onClick: () => {
@@ -876,39 +916,39 @@ function ge({ sandbox: e, workspaceId: t }) {
876
916
  r.href = n, r.download = `sandbox-${e.name}-logs.txt`, r.click(), URL.revokeObjectURL(n);
877
917
  },
878
918
  title: l(r, "sandbox.detail.logs.download.title", "Download logs"),
879
- children: /* @__PURE__ */ W(N, { size: 14 })
919
+ children: /* @__PURE__ */ z(A, { size: 14 })
880
920
  })] })
881
921
  ]
882
922
  })]
883
- }), /* @__PURE__ */ G("div", {
923
+ }), /* @__PURE__ */ B("div", {
884
924
  className: "bg-zinc-950 text-zinc-300 rounded-lg p-4 font-mono text-xs leading-relaxed min-h-[200px] max-h-[500px] overflow-y-auto",
885
925
  children: [
886
- !h && /* @__PURE__ */ W("p", {
926
+ !h && /* @__PURE__ */ z("p", {
887
927
  className: "text-zinc-500",
888
928
  children: l(r, "sandbox.detail.logs.unavailable", "Logs are available when the sandbox is running.")
889
929
  }),
890
- p && /* @__PURE__ */ W("p", {
930
+ p && /* @__PURE__ */ z("p", {
891
931
  className: "text-zinc-500 animate-pulse",
892
932
  children: l(r, "sandbox.detail.logs.fetching", "Fetching logs...")
893
933
  }),
894
- m && /* @__PURE__ */ W("p", {
934
+ m && /* @__PURE__ */ z("p", {
895
935
  className: "text-status-error-text",
896
936
  children: l(r, "sandbox.detail.logs.fetchError", "Failed to fetch logs: {message}", { message: m.message })
897
937
  }),
898
- _.length > 0 && !p ? _.map((e, t) => /* @__PURE__ */ W("p", {
938
+ _.length > 0 && !p ? _.map((e, t) => /* @__PURE__ */ z("p", {
899
939
  className: e.toLowerCase().includes("error") ? "text-status-error-text" : e.toLowerCase().includes("warn") ? "text-status-warning-text" : "text-zinc-300",
900
940
  children: e
901
- }, `${t}:${e}`)) : !p && h && !m && /* @__PURE__ */ W("p", {
941
+ }, `${t}:${e}`)) : !p && h && !m && /* @__PURE__ */ z("p", {
902
942
  className: "text-zinc-500",
903
943
  children: l(r, "sandbox.detail.logs.empty", "No logs yet. Click Refresh to fetch.")
904
944
  }),
905
- /* @__PURE__ */ W("div", { ref: u })
945
+ /* @__PURE__ */ z("div", { ref: u })
906
946
  ]
907
947
  })]
908
948
  })
909
949
  });
910
950
  }
911
951
  //#endregion
912
- export { Y as SandboxDetailPage };
952
+ export { W as SandboxDetailPage };
913
953
 
914
954
  //# sourceMappingURL=SandboxDetailPage.js.map