@burdenoff/microfe-technospam 2026.1014.1 → 2026.1030.1

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 (33) hide show
  1. package/dist/node_modules/recharts/es6/cartesian/Brush.js.map +1 -1
  2. package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js.map +1 -1
  3. package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js.map +1 -1
  4. package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js.map +1 -1
  5. package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js.map +1 -1
  6. package/dist/node_modules/recharts/es6/cartesian/XAxis.js.map +1 -1
  7. package/dist/node_modules/recharts/es6/cartesian/YAxis.js.map +1 -1
  8. package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js.map +1 -1
  9. package/dist/node_modules/sonner/dist/index.js.map +1 -1
  10. package/dist/technospam/hooks/useFocusedRecordParam.d.ts +41 -0
  11. package/dist/technospam/hooks/useFocusedRecordParam.d.ts.map +1 -0
  12. package/dist/technospam/hooks/useFocusedRecordParam.js +41 -0
  13. package/dist/technospam/hooks/useFocusedRecordParam.js.map +1 -0
  14. package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.d.ts.map +1 -1
  15. package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js +231 -181
  16. package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js.map +1 -1
  17. package/dist/technospam/pages/CoursesCourseDetailsPagePage.d.ts.map +1 -1
  18. package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +92 -88
  19. package/dist/technospam/pages/CoursesCourseDetailsPagePage.js.map +1 -1
  20. package/dist/technospam/pages/CoursesMyLearningPagePage.d.ts.map +1 -1
  21. package/dist/technospam/pages/CoursesMyLearningPagePage.js +89 -79
  22. package/dist/technospam/pages/CoursesMyLearningPagePage.js.map +1 -1
  23. package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.d.ts.map +1 -1
  24. package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js +155 -147
  25. package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js.map +1 -1
  26. package/dist/technospam/pages/MentorshipSessionsPagePage.d.ts.map +1 -1
  27. package/dist/technospam/pages/MentorshipSessionsPagePage.js +186 -167
  28. package/dist/technospam/pages/MentorshipSessionsPagePage.js.map +1 -1
  29. package/dist/technospam/utils/pageContext.d.ts +54 -5
  30. package/dist/technospam/utils/pageContext.d.ts.map +1 -1
  31. package/dist/technospam/utils/pageContext.js +99 -35
  32. package/dist/technospam/utils/pageContext.js.map +1 -1
  33. package/package.json +1 -1
@@ -1,66 +1,77 @@
1
1
  import { useTechnoSpam as e } from "../providers/TechnoSpamProvider.js";
2
2
  import { useTechnoSpamAnalytics as t } from "../hooks/useTechnoSpamAnalytics.js";
3
- import { PageLayout as n } from "../components/PageLayout.js";
4
- import { StatCard as r } from "../components/StatCard.js";
5
- import { formatDateTime as i, humanizeEnum as a } from "../utils/format.js";
6
- import { StatusBadge as o } from "../components/StatusBadge.js";
7
- import { EmptyView as s, ErrorView as c, LoadingRows as l } from "../components/StateViews.js";
8
- import { TagStrip as u } from "../components/TagStrip.js";
9
- import { PremiumBadge as ee, UpgradeGate as d } from "../components/UpgradeGate.js";
10
- import { CodePanel as f, IoBlock as p, TestResultsPanel as te } from "../components/SubmissionViews.js";
3
+ import { cn as n } from "../utils/cn.js";
4
+ import { PageLayout as r } from "../components/PageLayout.js";
5
+ import { StatCard as i } from "../components/StatCard.js";
6
+ import { formatDateTime as a, humanizeEnum as o } from "../utils/format.js";
7
+ import { StatusBadge as s } from "../components/StatusBadge.js";
8
+ import { EmptyView as c, ErrorView as l, LoadingRows as ee } from "../components/StateViews.js";
9
+ import { TagStrip as te } from "../components/TagStrip.js";
10
+ import { PremiumBadge as ne, UpgradeGate as u } from "../components/UpgradeGate.js";
11
+ import { CodePanel as re, IoBlock as d, TestResultsPanel as ie } from "../components/SubmissionViews.js";
11
12
  import "../components/index.js";
12
- import { notify as m } from "../lib/toast.js";
13
- import { useProblemQuery as ne, useRegradeSubmission as re, useSubmissionsQuery as ie, useSubmitSolution as ae } from "../api/technospamApi.js";
14
- import { useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
15
- import { Clock as y, Code2 as b, FileText as x, FlaskConical as oe, Layers as S, RefreshCw as se, Send as ce, Trophy as C } from "lucide-react";
16
- import { useSearchParams as w } from "react-router";
17
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
18
- import { Badge as le, Button as D, GlassCard as O, Select as ue, SelectContent as de, SelectItem as fe, SelectTrigger as pe, SelectValue as me, Skeleton as k, Textarea as he } from "@burdenoff/fe-libs/ui";
13
+ import { notify as f } from "../lib/toast.js";
14
+ import { useProblemQuery as ae, useRegradeSubmission as oe, useSubmissionsQuery as se, useSubmitSolution as ce } from "../api/technospamApi.js";
15
+ import { FOCUS_PARAMS as le } from "../utils/pageContext.js";
16
+ import { focusableCardProps as p, useFocusedRecordParam as ue } from "../hooks/useFocusedRecordParam.js";
17
+ import { useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
18
+ import { Clock as v, Code2 as y, FileText as b, FlaskConical as de, Layers as x, RefreshCw as S, Send as fe, Trophy as C } from "lucide-react";
19
+ import { useSearchParams as pe } from "react-router";
20
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
21
+ import { Badge as me, Button as E, GlassCard as D, Select as he, SelectContent as ge, SelectItem as _e, SelectTrigger as ve, SelectValue as ye, Skeleton as O, Textarea as be } from "@burdenoff/fe-libs/ui";
19
22
  //#region src/technospam/pages/ApplicationsProblemDetailsPagePage.tsx
20
- var A = [
23
+ var k = [
21
24
  "javascript",
22
25
  "python",
23
26
  "typescript"
24
- ];
25
- function ge({ s: e }) {
26
- return /* @__PURE__ */ E("div", {
27
- className: "rounded-lg border border-transparent px-2 py-3 transition-colors hover:border-border-seam hover:bg-bg-sunken",
28
- children: [/* @__PURE__ */ E("div", {
27
+ ], xe = 3e3, Se = 3 * 6e4;
28
+ function Ce({ s: e, focused: t, onToggle: r }) {
29
+ return /* @__PURE__ */ T("div", {
30
+ className: n("cursor-pointer rounded-lg border border-transparent px-2 py-3 transition-colors hover:border-border-seam hover:bg-bg-sunken", t && "ring-2 ring-accent-primary"),
31
+ ...p(t, r),
32
+ children: [/* @__PURE__ */ T("div", {
29
33
  className: "flex flex-wrap items-center gap-x-4 gap-y-1",
30
34
  children: [
31
- /* @__PURE__ */ T(o, { status: e.verdict }),
32
- /* @__PURE__ */ E("span", {
35
+ /* @__PURE__ */ w("button", {
36
+ type: "button",
37
+ "aria-pressed": t,
38
+ "aria-label": `Focus submission from ${a(e.createdAt)}`,
39
+ onClick: r,
40
+ className: "rounded-full",
41
+ children: /* @__PURE__ */ w(s, { status: e.verdict })
42
+ }),
43
+ /* @__PURE__ */ T("span", {
33
44
  className: "inline-flex items-center gap-1 text-sm font-medium text-text-primary",
34
45
  children: [
35
- /* @__PURE__ */ T(b, { size: 13 }),
46
+ /* @__PURE__ */ w(y, { size: 13 }),
36
47
  " ",
37
- a(e.language)
48
+ o(e.language)
38
49
  ]
39
50
  }),
40
- /* @__PURE__ */ E("span", {
51
+ /* @__PURE__ */ T("span", {
41
52
  className: "inline-flex items-center gap-1 text-xs text-text-muted",
42
53
  children: [
43
- /* @__PURE__ */ T(y, { size: 12 }),
54
+ /* @__PURE__ */ w(v, { size: 12 }),
44
55
  " ",
45
56
  e.runtimeMs,
46
57
  " ms"
47
58
  ]
48
59
  }),
49
- /* @__PURE__ */ E("span", {
60
+ /* @__PURE__ */ T("span", {
50
61
  className: "inline-flex items-center gap-1 text-xs text-text-muted",
51
62
  children: [
52
- /* @__PURE__ */ T(C, { size: 12 }),
63
+ /* @__PURE__ */ w(C, { size: 12 }),
53
64
  " ",
54
65
  e.pointsAwarded,
55
66
  " pts"
56
67
  ]
57
68
  }),
58
- /* @__PURE__ */ T("span", {
69
+ /* @__PURE__ */ w("span", {
59
70
  className: "ml-auto text-xs text-text-muted",
60
- children: i(e.createdAt)
71
+ children: a(e.createdAt)
61
72
  })
62
73
  ]
63
- }), e.totalCount > 0 ? /* @__PURE__ */ E("p", {
74
+ }), e.totalCount > 0 ? /* @__PURE__ */ T("p", {
64
75
  className: "mt-1 px-0.5 text-xs text-text-muted",
65
76
  children: [
66
77
  "Passed ",
@@ -72,267 +83,296 @@ function ge({ s: e }) {
72
83
  }) : null]
73
84
  });
74
85
  }
75
- function j() {
76
- let [i] = w(), j = i.get("id") ?? "", { currentUser: M, workspaceId: N } = e(), P = M?.id, { emit: F } = t(), { data: I, loading: _e, error: L, refetch: R } = ne(j);
77
- h(() => {
78
- j && F("technospam.problem.viewed", {
79
- workspaceId: N,
80
- entityId: j,
86
+ function A() {
87
+ let [n] = pe(), a = n.get("id") ?? "", [p, A] = ue(le.submission), { currentUser: we, workspaceId: j } = e(), M = we?.id, { emit: N } = t(), { data: Te, loading: Ee, error: P, refetch: F } = ae(a);
88
+ m(() => {
89
+ a && N("technospam.problem.viewed", {
90
+ workspaceId: j,
91
+ entityId: a,
81
92
  entityType: "TEC_PROBLEM"
82
93
  });
83
94
  }, [
95
+ a,
84
96
  j,
85
- N,
86
- F
97
+ N
87
98
  ]);
88
- let { data: z, loading: ve, error: B, refetch: V } = ie({
89
- ...P ? { learnerId: P } : {},
90
- problemId: j
91
- }), [ye, { loading: H }] = ae(), [be, { loading: U }] = re(), W = I?.tecProblem ?? null, G = g(() => W?.languages?.length ? W.languages : A, [W]), [K, q] = v(""), [J, Y] = v(""), X = _(!1);
92
- h(() => {
93
- W && !X.current && (q(W.languages[0] ?? A[0]), Y(W.starterCode ?? ""), X.current = !0);
94
- }, [W]);
95
- let Z = g(() => [...z?.tecListSubmissions?.items ?? []].sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime()), [z]), xe = async () => {
96
- if (!j) return;
97
- if (!K) {
98
- m.error("Pick a language", "Choose a language before submitting.");
99
+ let { data: I, loading: De, error: L, refetch: R } = se({
100
+ ...M ? { learnerId: M } : {},
101
+ problemId: a
102
+ }), [Oe, { loading: z }] = ce(), [ke, { loading: B }] = oe(), V = Te?.tecProblem ?? null, H = h(() => V?.languages?.length ? V.languages : k, [V]), [U, W] = _(""), [G, K] = _(""), q = g(!1);
103
+ m(() => {
104
+ V && !q.current && (W(V.languages[0] ?? k[0]), K(V.starterCode ?? ""), q.current = !0);
105
+ }, [V]);
106
+ let J = h(() => [...I?.tecListSubmissions?.items ?? []].sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime()), [I]), Ae = async () => {
107
+ if (!a) return;
108
+ if (!U) {
109
+ f.error("Pick a language", "Choose a language before submitting.");
99
110
  return;
100
111
  }
101
- if (!J.trim()) {
102
- m.error("Add your solution", "Write some code before submitting.");
112
+ if (!G.trim()) {
113
+ f.error("Add your solution", "Write some code before submitting.");
103
114
  return;
104
115
  }
105
- F("technospam.problem.submit_clicked", {
106
- workspaceId: N,
107
- entityId: j,
116
+ N("technospam.problem.submit_clicked", {
117
+ workspaceId: j,
118
+ entityId: a,
108
119
  entityType: "TEC_PROBLEM",
109
- language: K
120
+ language: U
110
121
  });
111
- let e = await ye({ variables: { input: {
112
- problemId: j,
113
- language: K,
114
- code: J
122
+ let e = await Oe({ variables: { input: {
123
+ problemId: a,
124
+ language: U,
125
+ code: G
115
126
  } } });
116
127
  if (e.data?.tecSubmitSolution) {
117
- F("technospam.problem.submitted", {
118
- workspaceId: N,
119
- entityId: j,
128
+ N("technospam.problem.submitted", {
129
+ workspaceId: j,
130
+ entityId: a,
120
131
  entityType: "TEC_PROBLEM",
121
132
  submissionId: e.data.tecSubmitSolution.id
122
133
  });
123
134
  let t = e.data.tecSubmitSolution;
124
- t.verdict === "PENDING" ? m.info("Solution submitted", "The grader is not available right now — your submission was saved and can be re-run.") : t.verdict === "ACCEPTED" ? m.success("Accepted", `Passed all ${t.totalCount} test cases.`) : m.error(a(t.verdict), `Passed ${t.passedCount} of ${t.totalCount} test cases.`), await Promise.all([R(), V()]);
135
+ t.verdict === "PENDING" ? f.info("Solution submitted", "Grading has started — your verdict will appear here in a moment.") : t.verdict === "ACCEPTED" ? f.success("Accepted", `Passed all ${t.totalCount} test cases.`) : f.error(o(t.verdict), `Passed ${t.passedCount} of ${t.totalCount} test cases.`), await Promise.all([F(), R()]);
136
+ }
137
+ }, je = async (e) => {
138
+ let t = (await ke({ variables: { id: e } })).data?.tecRegradeSubmission;
139
+ t && (t.verdict === "PENDING" ? f.error("Still pending", "The grader is not available yet. Please try again shortly.") : f.success("Grading complete", `Verdict: ${o(t.verdict)}.`), await Promise.all([F(), R()]));
140
+ }, Y = J.find((e) => (e.testResults?.length ?? 0) > 0) ?? null, X = J[0] ?? null, Z = X?.verdict === "PENDING" ? X.id : null, [Q, Me] = _(null), Ne = Z !== null && Q !== Z;
141
+ m(() => {
142
+ if (!Z || Q === Z) return;
143
+ let e = Date.now(), t = window.setInterval(() => {
144
+ if (Date.now() - e > Se) {
145
+ window.clearInterval(t), Me(Z);
146
+ return;
147
+ }
148
+ R();
149
+ }, xe);
150
+ return () => window.clearInterval(t);
151
+ }, [
152
+ Z,
153
+ Q,
154
+ R
155
+ ]);
156
+ let $ = g(null);
157
+ return m(() => {
158
+ if (Z) {
159
+ $.current = Z;
160
+ return;
125
161
  }
126
- }, Se = async (e) => {
127
- let t = (await be({ variables: { id: e } })).data?.tecRegradeSubmission;
128
- t && (t.verdict === "PENDING" ? m.error("Still pending", "The grader is not available yet. Please try again shortly.") : m.success("Grading complete", `Verdict: ${a(t.verdict)}.`), await Promise.all([R(), V()]));
129
- }, Q = Z.find((e) => (e.testResults?.length ?? 0) > 0) ?? null, $ = Z[0] ?? null;
130
- return _e && !W ? /* @__PURE__ */ E(n, {
162
+ let e = $.current;
163
+ if (!e) return;
164
+ let t = J.find((t) => t.id === e);
165
+ !t || t.verdict === "PENDING" || ($.current = null, t.verdict === "ACCEPTED" ? f.success("Accepted", `Passed all ${t.totalCount} test cases.`) : f.error(o(t.verdict), `Passed ${t.passedCount} of ${t.totalCount} test cases.`), F());
166
+ }, [
167
+ Z,
168
+ J,
169
+ F
170
+ ]), Ee && !V ? /* @__PURE__ */ T(r, {
131
171
  title: "Problem",
132
172
  backPath: "/applications/problems-page",
133
- children: [/* @__PURE__ */ T(k, { className: "mb-4 h-28 w-full rounded-xl" }), /* @__PURE__ */ T(k, { className: "h-72 w-full rounded-xl" })]
134
- }) : L || !W ? /* @__PURE__ */ T(n, {
173
+ children: [/* @__PURE__ */ w(O, { className: "mb-4 h-28 w-full rounded-xl" }), /* @__PURE__ */ w(O, { className: "h-72 w-full rounded-xl" })]
174
+ }) : P || !V ? /* @__PURE__ */ w(r, {
135
175
  title: "Problem",
136
176
  backPath: "/applications/problems-page",
137
- children: L ? /* @__PURE__ */ T(c, {
177
+ children: P ? /* @__PURE__ */ w(l, {
138
178
  title: "Couldn't load problem",
139
- error: L
140
- }) : /* @__PURE__ */ T(s, {
179
+ error: P
180
+ }) : /* @__PURE__ */ w(c, {
141
181
  title: "Problem not found",
142
182
  description: "This problem may have been unpublished."
143
183
  })
144
- }) : /* @__PURE__ */ E(n, {
184
+ }) : /* @__PURE__ */ T(r, {
145
185
  hero: !0,
146
186
  backPath: "/applications/problems-page",
147
- title: W.title,
148
- description: W.topic ?? void 0,
187
+ title: V.title,
188
+ description: V.topic ?? void 0,
149
189
  children: [
150
- /* @__PURE__ */ E("div", {
190
+ /* @__PURE__ */ T("div", {
151
191
  className: "mb-5 flex flex-wrap items-center gap-2",
152
192
  children: [
153
- /* @__PURE__ */ T(o, {
154
- status: W.difficulty,
193
+ /* @__PURE__ */ w(s, {
194
+ status: V.difficulty,
155
195
  kind: "level"
156
196
  }),
157
- /* @__PURE__ */ T(o, { status: W.status }),
158
- W.topic ? /* @__PURE__ */ E(le, {
197
+ /* @__PURE__ */ w(s, { status: V.status }),
198
+ V.topic ? /* @__PURE__ */ T(me, {
159
199
  variant: "outline",
160
200
  className: "gap-1",
161
201
  children: [
162
- /* @__PURE__ */ T(S, { size: 12 }),
202
+ /* @__PURE__ */ w(x, { size: 12 }),
163
203
  " ",
164
- W.topic
204
+ V.topic
165
205
  ]
166
206
  }) : null,
167
- W.isPremiumOnly ? /* @__PURE__ */ T(ee, { locked: W.isLocked }) : null,
168
- /* @__PURE__ */ T(u, { tags: W.tags })
207
+ V.isPremiumOnly ? /* @__PURE__ */ w(ne, { locked: V.isLocked }) : null,
208
+ /* @__PURE__ */ w(te, { tags: V.tags })
169
209
  ]
170
210
  }),
171
- /* @__PURE__ */ E("div", {
211
+ /* @__PURE__ */ T("div", {
172
212
  className: "mb-6 grid grid-cols-2 gap-3 sm:grid-cols-4",
173
213
  children: [
174
- /* @__PURE__ */ T(r, {
214
+ /* @__PURE__ */ w(i, {
175
215
  label: "Points",
176
- value: W.points,
216
+ value: V.points,
177
217
  icon: C,
178
218
  tone: "amber"
179
219
  }),
180
- /* @__PURE__ */ T(r, {
220
+ /* @__PURE__ */ w(i, {
181
221
  label: "Languages",
182
- value: G.length,
183
- icon: b,
222
+ value: H.length,
223
+ icon: y,
184
224
  tone: "blue"
185
225
  }),
186
- /* @__PURE__ */ T(r, {
226
+ /* @__PURE__ */ w(i, {
187
227
  label: "Difficulty",
188
- value: a(W.difficulty),
189
- icon: S,
228
+ value: o(V.difficulty),
229
+ icon: x,
190
230
  tone: "purple"
191
231
  }),
192
- /* @__PURE__ */ T(r, {
232
+ /* @__PURE__ */ w(i, {
193
233
  label: "My submissions",
194
- value: Z.length,
195
- icon: x,
234
+ value: J.length,
235
+ icon: b,
196
236
  tone: "teal"
197
237
  })
198
238
  ]
199
239
  }),
200
- /* @__PURE__ */ E("div", {
240
+ /* @__PURE__ */ T("div", {
201
241
  className: "grid grid-cols-1 gap-5 lg:grid-cols-3",
202
- children: [/* @__PURE__ */ E("div", {
242
+ children: [/* @__PURE__ */ T("div", {
203
243
  className: "space-y-5 lg:col-span-2",
204
244
  children: [
205
- /* @__PURE__ */ E(O, {
245
+ /* @__PURE__ */ T(D, {
206
246
  className: "p-5",
207
- children: [/* @__PURE__ */ T("h2", {
247
+ children: [/* @__PURE__ */ w("h2", {
208
248
  className: "mb-2 text-base font-semibold text-text-primary",
209
249
  children: "Problem statement"
210
- }), W.isLocked ? /* @__PURE__ */ T(d, { description: "This problem's statement is part of a paid TechnoSpam plan. Ask a workspace admin to upgrade to unlock it." }) : W.statement ? /* @__PURE__ */ T("p", {
250
+ }), V.isLocked ? /* @__PURE__ */ w(u, { description: "This problem's statement is part of a paid TechnoSpam plan. Ask a workspace admin to upgrade to unlock it." }) : V.statement ? /* @__PURE__ */ w("p", {
211
251
  className: "whitespace-pre-wrap text-sm leading-relaxed text-text-secondary",
212
- children: W.statement
213
- }) : /* @__PURE__ */ T("p", {
252
+ children: V.statement
253
+ }) : /* @__PURE__ */ w("p", {
214
254
  className: "py-4 text-center text-sm text-text-muted",
215
255
  children: "The statement for this problem is being prepared."
216
256
  })]
217
257
  }),
218
- W.isLocked ? /* @__PURE__ */ T(d, {
258
+ V.isLocked ? /* @__PURE__ */ w(u, {
219
259
  compact: !0,
220
260
  description: "Starter code and sample test cases unlock with a paid TechnoSpam plan."
221
- }) : W.starterCode ? /* @__PURE__ */ E(O, {
261
+ }) : V.starterCode ? /* @__PURE__ */ T(D, {
222
262
  className: "p-5",
223
- children: [/* @__PURE__ */ T("h2", {
263
+ children: [/* @__PURE__ */ w("h2", {
224
264
  className: "mb-3 text-base font-semibold text-text-primary",
225
265
  children: "Starter code"
226
- }), /* @__PURE__ */ T(f, {
227
- label: a(G[0] ?? "code"),
266
+ }), /* @__PURE__ */ w(re, {
267
+ label: o(H[0] ?? "code"),
228
268
  bodyClassName: "max-h-72",
229
- children: W.starterCode
269
+ children: V.starterCode
230
270
  })]
231
271
  }) : null,
232
- /* @__PURE__ */ E(O, {
272
+ /* @__PURE__ */ T(D, {
233
273
  className: "p-5",
234
274
  children: [
235
- /* @__PURE__ */ E("div", {
275
+ /* @__PURE__ */ T("div", {
236
276
  className: "mb-3 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",
237
- children: [/* @__PURE__ */ T("h2", {
277
+ children: [/* @__PURE__ */ w("h2", {
238
278
  className: "text-base font-semibold text-text-primary",
239
279
  children: "Submit a solution"
240
- }), /* @__PURE__ */ E("div", {
280
+ }), /* @__PURE__ */ T("div", {
241
281
  className: "flex items-center gap-2",
242
- children: [/* @__PURE__ */ T("span", {
282
+ children: [/* @__PURE__ */ w("span", {
243
283
  className: "text-sm text-text-secondary",
244
284
  children: "Language"
245
- }), /* @__PURE__ */ E(ue, {
246
- value: K,
247
- onValueChange: q,
248
- children: [/* @__PURE__ */ T(pe, {
285
+ }), /* @__PURE__ */ T(he, {
286
+ value: U,
287
+ onValueChange: W,
288
+ children: [/* @__PURE__ */ w(ve, {
249
289
  className: "w-full sm:w-48",
250
- children: /* @__PURE__ */ T(me, { placeholder: "Choose a language" })
251
- }), /* @__PURE__ */ T(de, { children: G.map((e) => /* @__PURE__ */ T(fe, {
290
+ children: /* @__PURE__ */ w(ye, { placeholder: "Choose a language" })
291
+ }), /* @__PURE__ */ w(ge, { children: H.map((e) => /* @__PURE__ */ w(_e, {
252
292
  value: e,
253
- children: a(e)
293
+ children: o(e)
254
294
  }, e)) })]
255
295
  })]
256
296
  })]
257
297
  }),
258
- /* @__PURE__ */ E("div", {
298
+ /* @__PURE__ */ T("div", {
259
299
  className: "overflow-hidden rounded-xl border border-border-strong bg-bg-sunken shadow-sm",
260
- children: [/* @__PURE__ */ E("div", {
300
+ children: [/* @__PURE__ */ T("div", {
261
301
  className: "flex items-center justify-between gap-2 border-b border-border-seam bg-bg-canvas/40 px-4 py-2",
262
- children: [/* @__PURE__ */ E("div", {
302
+ children: [/* @__PURE__ */ T("div", {
263
303
  className: "flex items-center gap-1.5",
264
304
  children: [
265
- /* @__PURE__ */ T("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-border" }),
266
- /* @__PURE__ */ T("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-border" }),
267
- /* @__PURE__ */ T("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-border" })
305
+ /* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-border" }),
306
+ /* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-border" }),
307
+ /* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-border" })
268
308
  ]
269
- }), /* @__PURE__ */ E("span", {
309
+ }), /* @__PURE__ */ T("span", {
270
310
  className: "inline-flex items-center gap-1.5 font-mono text-xs text-text-muted",
271
311
  children: [
272
- /* @__PURE__ */ T(b, { size: 13 }),
312
+ /* @__PURE__ */ w(y, { size: 13 }),
273
313
  " ",
274
- K ? a(K) : "solution"
314
+ U ? o(U) : "solution"
275
315
  ]
276
316
  })]
277
- }), /* @__PURE__ */ T(he, {
278
- value: J,
279
- onChange: (e) => Y(e.target.value),
317
+ }), /* @__PURE__ */ w(be, {
318
+ value: G,
319
+ onChange: (e) => K(e.target.value),
280
320
  placeholder: "Write your solution…",
281
321
  className: "min-h-[280px] resize-y rounded-none border-0 bg-transparent font-mono text-xs leading-relaxed focus-visible:ring-0 focus-visible:ring-offset-0",
282
322
  spellCheck: !1
283
323
  })]
284
324
  }),
285
- /* @__PURE__ */ E(D, {
325
+ /* @__PURE__ */ T(E, {
286
326
  className: "mt-4 w-full",
287
- onClick: xe,
288
- disabled: H || !J.trim(),
327
+ onClick: Ae,
328
+ disabled: z || !G.trim(),
289
329
  children: [
290
- /* @__PURE__ */ T(ce, { size: 16 }),
330
+ /* @__PURE__ */ w(fe, { size: 16 }),
291
331
  " ",
292
- H ? "Running test cases…" : "Run & submit"
332
+ z ? "Running test cases…" : "Run & submit"
293
333
  ]
294
334
  }),
295
- /* @__PURE__ */ T("p", {
335
+ /* @__PURE__ */ w("p", {
296
336
  className: "mt-2 text-center text-xs text-text-muted",
297
337
  children: "Your code runs against this problem's test cases in an isolated sandbox."
298
338
  })
299
339
  ]
300
340
  }),
301
- W.publicTestCases?.length ? /* @__PURE__ */ E(O, {
341
+ V.publicTestCases?.length ? /* @__PURE__ */ T(D, {
302
342
  className: "p-5",
303
343
  children: [
304
- /* @__PURE__ */ E("h2", {
344
+ /* @__PURE__ */ T("h2", {
305
345
  className: "mb-1 flex items-center gap-2 text-base font-semibold text-text-primary",
306
- children: [/* @__PURE__ */ T(oe, { size: 16 }), " Sample test cases"]
346
+ children: [/* @__PURE__ */ w(de, { size: 16 }), " Sample test cases"]
307
347
  }),
308
- /* @__PURE__ */ T("p", {
348
+ /* @__PURE__ */ w("p", {
309
349
  className: "mb-3 text-sm text-text-secondary",
310
350
  children: "Your solution reads each input from stdin and must print the expected output. Hidden test cases are also run when you submit."
311
351
  }),
312
- /* @__PURE__ */ T("div", {
352
+ /* @__PURE__ */ w("div", {
313
353
  className: "space-y-3",
314
- children: W.publicTestCases.map((e) => /* @__PURE__ */ E("div", {
354
+ children: V.publicTestCases.map((e) => /* @__PURE__ */ T("div", {
315
355
  className: "rounded-xl border border-border-seam p-3",
316
- children: [/* @__PURE__ */ E("div", {
356
+ children: [/* @__PURE__ */ T("div", {
317
357
  className: "mb-2 flex flex-wrap items-center gap-x-3 gap-y-1",
318
- children: [/* @__PURE__ */ T("span", {
358
+ children: [/* @__PURE__ */ w("span", {
319
359
  className: "text-sm font-medium text-text-primary",
320
360
  children: e.name
321
- }), /* @__PURE__ */ E("span", {
361
+ }), /* @__PURE__ */ T("span", {
322
362
  className: "inline-flex items-center gap-1 text-xs text-text-muted",
323
363
  children: [
324
- /* @__PURE__ */ T(y, { size: 12 }),
364
+ /* @__PURE__ */ w(v, { size: 12 }),
325
365
  " ",
326
366
  e.timeLimitMs,
327
367
  " ms limit"
328
368
  ]
329
369
  })]
330
- }), /* @__PURE__ */ E("div", {
370
+ }), /* @__PURE__ */ T("div", {
331
371
  className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
332
- children: [/* @__PURE__ */ T(p, {
372
+ children: [/* @__PURE__ */ w(d, {
333
373
  label: "Input",
334
374
  value: e.input
335
- }), /* @__PURE__ */ T(p, {
375
+ }), /* @__PURE__ */ w(d, {
336
376
  label: "Expected output",
337
377
  value: e.expectedOutput
338
378
  })]
@@ -341,56 +381,66 @@ function j() {
341
381
  })
342
382
  ]
343
383
  }) : null,
344
- Q ? /* @__PURE__ */ E(O, {
345
- className: "p-5",
346
- children: [/* @__PURE__ */ T("h2", {
347
- className: "mb-3 text-base font-semibold text-text-primary",
348
- children: "Latest run"
349
- }), /* @__PURE__ */ T(te, { submission: Q })]
350
- }) : $ && $.verdict === "PENDING" ? /* @__PURE__ */ E(O, {
384
+ Z ? /* @__PURE__ */ T(D, {
351
385
  className: "p-5",
352
386
  children: [
353
- /* @__PURE__ */ T("h2", {
387
+ /* @__PURE__ */ w("h2", {
354
388
  className: "mb-2 text-base font-semibold text-text-primary",
355
389
  children: "Latest run"
356
390
  }),
357
- /* @__PURE__ */ T("p", {
391
+ Ne ? /* @__PURE__ */ T("p", {
392
+ className: "mb-3 inline-flex items-center gap-2 text-sm text-text-secondary",
393
+ children: [/* @__PURE__ */ w(S, {
394
+ size: 14,
395
+ className: "animate-spin"
396
+ }), "Grading your submission — the grader is starting up. Your verdict will appear here automatically."]
397
+ }) : /* @__PURE__ */ w("p", {
358
398
  className: "mb-3 text-sm text-text-secondary",
359
- children: "Your most recent submission has not been graded yet — the grader was unavailable when you submitted. You can re-run it without resubmitting your code."
399
+ children: "Your most recent submission has not been graded yet — the grader was unavailable. You can re-run it without resubmitting your code."
360
400
  }),
361
- /* @__PURE__ */ E(D, {
401
+ /* @__PURE__ */ T(E, {
362
402
  variant: "outline",
363
- onClick: () => void Se($.id),
364
- disabled: U,
403
+ onClick: () => void je(Z),
404
+ disabled: B,
365
405
  children: [
366
- /* @__PURE__ */ T(se, { size: 16 }),
406
+ /* @__PURE__ */ w(S, { size: 16 }),
367
407
  " ",
368
- U ? "Re-running…" : "Re-run grader"
408
+ B ? "Re-running…" : "Re-run grader"
369
409
  ]
370
410
  })
371
411
  ]
412
+ }) : Y ? /* @__PURE__ */ T(D, {
413
+ className: "p-5",
414
+ children: [/* @__PURE__ */ w("h2", {
415
+ className: "mb-3 text-base font-semibold text-text-primary",
416
+ children: "Latest run"
417
+ }), /* @__PURE__ */ w(ie, { submission: Y })]
372
418
  }) : null
373
419
  ]
374
- }), /* @__PURE__ */ T("div", {
420
+ }), /* @__PURE__ */ w("div", {
375
421
  className: "lg:col-span-1",
376
- children: /* @__PURE__ */ E(O, {
422
+ children: /* @__PURE__ */ T(D, {
377
423
  className: "p-5",
378
- children: [/* @__PURE__ */ T("h2", {
424
+ children: [/* @__PURE__ */ w("h2", {
379
425
  className: "mb-3 text-base font-semibold text-text-primary",
380
426
  children: "My submissions"
381
- }), ve && !Z.length ? /* @__PURE__ */ T(l, {
427
+ }), De && !J.length ? /* @__PURE__ */ w(ee, {
382
428
  count: 3,
383
429
  height: "h-12"
384
- }) : B ? /* @__PURE__ */ T(c, {
430
+ }) : L ? /* @__PURE__ */ w(l, {
385
431
  title: "Couldn't load submissions",
386
- error: B
387
- }) : Z.length === 0 ? /* @__PURE__ */ T(s, {
388
- icon: /* @__PURE__ */ T(x, { size: 24 }),
432
+ error: L
433
+ }) : J.length === 0 ? /* @__PURE__ */ w(c, {
434
+ icon: /* @__PURE__ */ w(b, { size: 24 }),
389
435
  title: "No submissions yet",
390
436
  description: "Submit a solution above to see your verdicts and points here."
391
- }) : /* @__PURE__ */ T("div", {
437
+ }) : /* @__PURE__ */ w("div", {
392
438
  className: "space-y-1",
393
- children: Z.map((e) => /* @__PURE__ */ T(ge, { s: e }, e.id))
439
+ children: J.map((e) => /* @__PURE__ */ w(Ce, {
440
+ s: e,
441
+ focused: p === e.id,
442
+ onToggle: () => A(p === e.id ? null : e.id)
443
+ }, e.id))
394
444
  })]
395
445
  })
396
446
  })]
@@ -399,6 +449,6 @@ function j() {
399
449
  });
400
450
  }
401
451
  //#endregion
402
- export { j as ApplicationsProblemDetailsPagePage };
452
+ export { A as ApplicationsProblemDetailsPagePage };
403
453
 
404
454
  //# sourceMappingURL=ApplicationsProblemDetailsPagePage.js.map