@burdenoff/microfe-bigconsole 2026.1103.8 → 2026.1103.9

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.
@@ -5,23 +5,24 @@ import { SECTION_FOCUS_RING as n } from "../components/common/sectionStyles.js";
5
5
  import { Section as r, SectionStack as i } from "../components/common/Section.js";
6
6
  import "../components/common/index.js";
7
7
  import a from "../hooks/useBigConsoleAnalytics.js";
8
- import { setActiveGenerationContext as ee } from "../assistant/generationContext.js";
9
- import { isNative as te, nativeImpact as o, nativeNotify as ne } from "../../utils/nativeBridge.js";
10
- import { generationApproval as s } from "../utils/generationApproval.js";
11
- import { isInsightsDraftDirty as re } from "../utils/insightsDraft.js";
12
- import { PromptAnalysisPreview as ie } from "../components/insights/PromptAnalysisPreview.js";
13
- import { GeneratedFormattingReview as ae, GenerationExecutionStatus as oe } from "../components/insights/GeneratedFormattingReview.js";
8
+ import { setActiveGenerationContext as o } from "../assistant/generationContext.js";
9
+ import { isNative as ee, nativeImpact as s, nativeNotify as te } from "../../utils/nativeBridge.js";
10
+ import { generationApproval as c } from "../utils/generationApproval.js";
11
+ import { findParentGeneration as ne, splitSupersededGenerations as re } from "../utils/generationRevisions.js";
12
+ import { isInsightsDraftDirty as ie } from "../utils/insightsDraft.js";
13
+ import { PromptAnalysisPreview as ae } from "../components/insights/PromptAnalysisPreview.js";
14
+ import { GeneratedFormattingReview as oe, GenerationExecutionStatus as se } from "../components/insights/GeneratedFormattingReview.js";
14
15
  /* empty css */
15
- import { memo as c, useCallback as l, useEffect as u, useState as d } from "react";
16
- import { AlertCircle as se, ArrowRight as f, Ban as ce, CheckCircle as p, Clock as m, Eye as le, History as ue, Lightbulb as de, Loader2 as h, RefreshCw as fe, Sparkles as g, Trash2 as pe, Wand2 as _, X as me, XCircle as v } from "lucide-react";
17
- import { AuroraBackground as he, GlassCard as ge, GradientText as _e, IllustratedEmptyState as ve, PagePurpose as ye } from "@burdenoff/fe-libs/ui";
18
- import { useUnsavedChanges as be } from "@burdenoff/fe-libs/shared/hooks";
19
- import { useI18n as xe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
20
- import { useMutation as y, useQuery as Se } from "@apollo/client/react";
21
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
22
- import { gql as S } from "@apollo/client";
16
+ import { memo as l, useCallback as u, useEffect as d, useState as f } from "react";
17
+ import { AlertCircle as ce, ArrowRight as p, Ban as le, CheckCircle as m, Clock as h, Eye as ue, History as de, Lightbulb as fe, Loader2 as g, RefreshCw as pe, Sparkles as _, Trash2 as me, Wand2 as v, X as he, XCircle as y } from "lucide-react";
18
+ import { AuroraBackground as ge, GlassCard as _e, GradientText as ve, IllustratedEmptyState as ye, PagePurpose as be } from "@burdenoff/fe-libs/ui";
19
+ import { useUnsavedChanges as xe } from "@burdenoff/fe-libs/shared/hooks";
20
+ import { useI18n as Se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
+ import { useMutation as b, useQuery as Ce } from "@apollo/client/react";
22
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
23
+ import { gql as C } from "@apollo/client";
23
24
  //#region src/bigconsole/pages/InsightsPage.tsx
24
- var Ce = S`
25
+ var we = C`
25
26
  query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
26
27
  listPromptGenerations(status: $status, first: $first) {
27
28
  edges {
@@ -30,6 +31,7 @@ var Ce = S`
30
31
  prompt
31
32
  status
32
33
  dashboardId
34
+ parentGenerationId
33
35
  generatedSpecDigest
34
36
  updatedAt
35
37
  errorMessage
@@ -65,7 +67,7 @@ var Ce = S`
65
67
  totalCount
66
68
  }
67
69
  }
68
- `, we = S`
70
+ `, Te = C`
69
71
  query GetPromptSuggestions($category: String, $limit: Int) {
70
72
  getPromptSuggestions(category: $category, limit: $limit) {
71
73
  id
@@ -76,7 +78,7 @@ var Ce = S`
76
78
  tags
77
79
  }
78
80
  }
79
- `, Te = S`
81
+ `, Ee = C`
80
82
  mutation GenerateDashboardFromPrompt($input: BigConsoleGenerateDashboardFromPromptInput!) {
81
83
  generateDashboardFromPrompt(input: $input) {
82
84
  id
@@ -84,24 +86,24 @@ var Ce = S`
84
86
  prompt
85
87
  }
86
88
  }
87
- `, Ee = S`
89
+ `, De = C`
88
90
  mutation CreateDashboardFromGeneration($input: BigConsoleCreateDashboardFromGenerationInput!) {
89
91
  createDashboardFromGeneration(input: $input) {
90
92
  id
91
93
  }
92
94
  }
93
- `, De = S`
95
+ `, Oe = C`
94
96
  mutation DeletePromptGeneration($generationId: ID!) {
95
97
  deletePromptGeneration(generationId: $generationId)
96
98
  }
97
- `, Oe = S`
99
+ `, ke = C`
98
100
  mutation CancelPromptGeneration($generationId: ID!) {
99
101
  cancelPromptGeneration(generationId: $generationId) {
100
102
  id
101
103
  status
102
104
  }
103
105
  }
104
- `, ke = S`
106
+ `, Ae = C`
105
107
  mutation RegenerateDashboard($input: BigConsoleRegenerateDashboardInput!) {
106
108
  regenerateDashboard(input: $input) {
107
109
  id
@@ -109,7 +111,7 @@ var Ce = S`
109
111
  prompt
110
112
  }
111
113
  }
112
- `, Ae = S`
114
+ `, je = C`
113
115
  mutation RefineGeneratedDashboard($input: BigConsoleRefineGeneratedDashboardInput!) {
114
116
  refineGeneratedDashboard(input: $input) {
115
117
  id
@@ -117,11 +119,11 @@ var Ce = S`
117
119
  prompt
118
120
  }
119
121
  }
120
- `, C = [
122
+ `, Me = [
121
123
  "PENDING",
122
124
  "PROCESSING",
123
125
  "GENERATING"
124
- ], je = 12, Me = 8, Ne = [
126
+ ], Ne = 12, Pe = 8, Fe = [
125
127
  {
126
128
  value: "MODERN",
127
129
  label: "Modern"
@@ -142,7 +144,7 @@ var Ce = S`
142
144
  value: "VIBRANT",
143
145
  label: "Vibrant"
144
146
  }
145
- ], Pe = [
147
+ ], Ie = [
146
148
  {
147
149
  value: "GRID",
148
150
  label: "Grid"
@@ -167,13 +169,13 @@ var Ce = S`
167
169
  value: "THREE_COLUMN",
168
170
  label: "Three column"
169
171
  }
170
- ], Fe = [
172
+ ], Le = [
171
173
  6,
172
174
  8,
173
175
  12,
174
176
  16,
175
177
  24
176
- ], Ie = [
178
+ ], Re = [
177
179
  4,
178
180
  6,
179
181
  8,
@@ -202,12 +204,12 @@ var Ce = S`
202
204
  border: "1px solid transparent",
203
205
  backgroundColor: "var(--color-action-primary-bg)",
204
206
  color: "var(--color-action-primary-text)"
205
- }, Le = {
207
+ }, ze = {
206
208
  ...w,
207
209
  border: "1px solid var(--color-status-warning-border)",
208
210
  backgroundColor: "transparent",
209
211
  color: "var(--color-status-warning-text)"
210
- }, Re = {
212
+ }, Be = {
211
213
  ...w,
212
214
  minWidth: "var(--size-controlHeight-md)",
213
215
  padding: "0 var(--space-controlGap)",
@@ -273,29 +275,29 @@ var j = {
273
275
  border: "var(--color-border-subtle)"
274
276
  }
275
277
  };
276
- function ze(e) {
278
+ function Ve(e) {
277
279
  let t = j[A(e)].text;
278
280
  switch (e) {
279
- case "COMPLETED": return /* @__PURE__ */ b(p, {
281
+ case "COMPLETED": return /* @__PURE__ */ x(m, {
280
282
  size: 14,
281
283
  style: { color: t },
282
284
  "aria-hidden": "true"
283
285
  });
284
286
  case "FAILED":
285
- case "CANCELLED": return /* @__PURE__ */ b(v, {
287
+ case "CANCELLED": return /* @__PURE__ */ x(y, {
286
288
  size: 14,
287
289
  style: { color: t },
288
290
  "aria-hidden": "true"
289
291
  });
290
292
  case "PENDING":
291
293
  case "PROCESSING":
292
- case "GENERATING": return /* @__PURE__ */ b(h, {
294
+ case "GENERATING": return /* @__PURE__ */ x(g, {
293
295
  size: 14,
294
296
  className: "animate-spin",
295
297
  style: { color: t },
296
298
  "aria-hidden": "true"
297
299
  });
298
- default: return /* @__PURE__ */ b(m, {
300
+ default: return /* @__PURE__ */ x(h, {
299
301
  size: 14,
300
302
  style: { color: t },
301
303
  "aria-hidden": "true"
@@ -313,9 +315,9 @@ function M(e, t) {
313
315
  default: return e;
314
316
  }
315
317
  }
316
- var Be = ({ status: e }) => {
317
- let { t } = xe(), n = j[A(e)];
318
- return /* @__PURE__ */ x("span", {
318
+ var He = ({ status: e }) => {
319
+ let { t } = Se(), n = j[A(e)];
320
+ return /* @__PURE__ */ S("span", {
319
321
  "data-status": e,
320
322
  style: {
321
323
  ...k,
@@ -323,10 +325,10 @@ var Be = ({ status: e }) => {
323
325
  backgroundColor: n.bg,
324
326
  color: n.text
325
327
  },
326
- children: [ze(e), M(e, t)]
328
+ children: [Ve(e), M(e, t)]
327
329
  });
328
330
  };
329
- function Ve(e) {
331
+ function Ue(e) {
330
332
  let t = j[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
331
333
  return {
332
334
  ...k,
@@ -338,19 +340,19 @@ function Ve(e) {
338
340
  function N(e) {
339
341
  return e.pages.reduce((e, t) => e + t.widgets.length, 0);
340
342
  }
341
- function He(e) {
343
+ function We(e) {
342
344
  let t = e?.toUpperCase();
343
345
  return t === "HIGH" || t === "MEDIUM" || t === "LOW" ? t : null;
344
346
  }
345
- var Ue = {
347
+ var Ge = {
346
348
  HIGH: "success",
347
349
  MEDIUM: "neutral",
348
350
  LOW: "danger"
349
351
  };
350
- function We(e) {
352
+ function Ke(e) {
351
353
  return { "--proposal-columns": Math.max(1, Math.min(24, Math.trunc(e))) };
352
354
  }
353
- function Ge(e, t) {
355
+ function qe(e, t) {
354
356
  let n = Math.max(1, Math.min(24, Math.trunc(t))), r = Math.max(0, Math.min(n - 1, Math.trunc(e.x)));
355
357
  return {
356
358
  "--proposal-column": r + 1,
@@ -359,8 +361,8 @@ function Ge(e, t) {
359
361
  "--proposal-height": Math.max(1, Math.min(24, Math.trunc(e.height)))
360
362
  };
361
363
  }
362
- function Ke(e) {
363
- let t = j[Ue[e]];
364
+ function Je(e) {
365
+ let t = j[Ge[e]];
364
366
  return {
365
367
  ...k,
366
368
  padding: "0 var(--space-controlGap)",
@@ -372,53 +374,53 @@ function Ke(e) {
372
374
  color: t.text
373
375
  };
374
376
  }
375
- var P = c(function() {
376
- let { t: c } = xe(), p = e(), m = a(), [v, S] = d(""), [w, A] = d("MODERN"), [j, ze] = d("GRID"), [M, Ue] = d(je), [P, qe] = d(Me), [F, Je] = d(!1), [Ye, I] = d(null), [L, Xe] = d(() => /* @__PURE__ */ new Set()), [R, z] = d(null), [B, V] = d(null), [H, U] = d("");
377
- be({
377
+ var P = l(function() {
378
+ let { t: l } = Se(), m = e(), h = a(), [y, C] = f(""), [w, A] = f("MODERN"), [j, Ve] = f("GRID"), [M, Ge] = f(Ne), [P, Ye] = f(Pe), [F, Xe] = f(!1), [Ze, I] = f(null), [L, Qe] = f(() => /* @__PURE__ */ new Set()), [R, z] = f(null), [B, V] = f(null), [H, U] = f(""), [W, $e] = f(!1);
379
+ xe({
378
380
  id: "insights-prompt",
379
- label: c("bigconsole.assistant.unsaved.insightsPrompt", "the dashboard description"),
380
- dirty: re({
381
- promptText: v,
381
+ label: l("bigconsole.assistant.unsaved.insightsPrompt", "the dashboard description"),
382
+ dirty: ie({
383
+ promptText: y,
382
384
  isGenerating: F,
383
385
  refineOpen: B !== null,
384
386
  refineText: H,
385
387
  refineBusy: B !== null && L.has(B.id)
386
388
  })
387
- }), u(() => (ee(B?.id ?? R?.id ?? null), () => ee(null)), [B, R]);
388
- let W = l((e) => {
389
- Xe((t) => new Set(t).add(e));
390
- }, []), G = l((e) => {
391
- Xe((t) => {
389
+ }), d(() => (o(B?.id ?? R?.id ?? null), () => o(null)), [B, R]);
390
+ let G = u((e) => {
391
+ Qe((t) => new Set(t).add(e));
392
+ }, []), K = u((e) => {
393
+ Qe((t) => {
392
394
  let n = new Set(t);
393
395
  return n.delete(e), n;
394
396
  });
395
- }, []), { data: Ze, loading: Qe, error: K, refetch: q, startPolling: $e, stopPolling: J } = Se(Ce, {
397
+ }, []), { data: et, loading: tt, error: q, refetch: J, startPolling: nt, stopPolling: Y } = Ce(we, {
396
398
  variables: { first: 20 },
397
399
  fetchPolicy: "cache-and-network"
398
- }), Y = Ze?.listPromptGenerations?.edges?.some((e) => C.includes(e.node.status)) ?? !1, { data: et, error: tt, refetch: nt } = Se(we, { variables: { limit: 6 } }), [rt] = y(Te), [it] = y(Ee), [X] = y(De), [at] = y(Oe), [ot] = y(ke), [st] = y(Ae), Z = Ze?.listPromptGenerations?.edges?.map((e) => e.node) || [], ct = et?.getPromptSuggestions || [];
399
- u(() => (Y || F ? $e(2e3) : J(), () => J()), [
400
- Y,
400
+ }), X = et?.listPromptGenerations?.edges?.some((e) => Me.includes(e.node.status)) ?? !1, { data: rt, error: it, refetch: at } = Ce(Te, { variables: { limit: 6 } }), [ot] = b(Ee), [st] = b(De), [ct] = b(Oe), [lt] = b(ke), [ut] = b(Ae), [dt] = b(je), Z = et?.listPromptGenerations?.edges?.map((e) => e.node) || [], ft = rt?.getPromptSuggestions || [], { current: pt, superseded: mt } = re(Z), Q = W ? Z : pt;
401
+ d(() => (X || F ? nt(2e3) : Y(), () => Y()), [
402
+ X,
401
403
  F,
402
- $e,
403
- J
404
- ]), u(() => {
404
+ nt,
405
+ Y
406
+ ]), d(() => {
405
407
  if (!R && !B) return;
406
408
  let e = (e) => {
407
409
  e.key === "Escape" && (z(null), V(null));
408
410
  };
409
411
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
410
412
  }, [R, B]);
411
- let lt = l(async () => {
412
- if (!(!v.trim() || F)) {
413
- if (v.length > 2e3) {
414
- I(c("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
413
+ let ht = u(async () => {
414
+ if (!(!y.trim() || F)) {
415
+ if (y.length > 2e3) {
416
+ I(l("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
415
417
  return;
416
418
  }
417
- I(null), Je(!0);
419
+ I(null), Xe(!0);
418
420
  try {
419
- m("bigconsole.ai.generate_clicked", { maxWidgets: P });
420
- let e = await rt({ variables: { input: {
421
- prompt: v.trim(),
421
+ h("bigconsole.ai.generate_clicked", { maxWidgets: P });
422
+ let e = await ot({ variables: { input: {
423
+ prompt: y.trim(),
422
424
  styleType: w,
423
425
  layoutType: j,
424
426
  gridColumns: M,
@@ -426,139 +428,139 @@ var P = c(function() {
426
428
  } } });
427
429
  if (t(e, "command")) return;
428
430
  let n = e.data?.generateDashboardFromPrompt?.id;
429
- n && m("bigconsole.ai.dashboard_generated", {
431
+ n && h("bigconsole.ai.dashboard_generated", {
430
432
  generationId: n,
431
433
  maxWidgets: P
432
- }), S(""), q();
434
+ }), C(""), J();
433
435
  } catch (e) {
434
436
  if (t(e, "command")) return;
435
- I(e instanceof Error ? e.message : c("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
437
+ I(e instanceof Error ? e.message : l("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
436
438
  } finally {
437
- Je(!1);
439
+ Xe(!1);
438
440
  }
439
441
  }
440
442
  }, [
441
- m,
442
- v,
443
+ h,
444
+ y,
443
445
  F,
444
- rt,
445
- q,
446
+ ot,
447
+ J,
446
448
  w,
447
449
  j,
448
450
  M,
449
451
  P,
450
- c
451
- ]), Q = l(async (e) => {
452
+ l
453
+ ]), gt = u(async (e) => {
452
454
  I(null);
453
- let n = s(e);
455
+ let n = c(e);
454
456
  if (n.kind === "view") {
455
- p(`/dashboards/${n.dashboardId}`);
457
+ m(`/dashboards/${n.dashboardId}`);
456
458
  return;
457
459
  }
458
460
  if (n.kind === "hold") {
459
- I(c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard."));
461
+ I(l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard."));
460
462
  return;
461
463
  }
462
464
  let r = e.id;
463
465
  try {
464
- m("bigconsole.ai.create_dashboard_clicked", { generationId: r });
465
- let e = await it({ variables: { input: n.input } });
466
+ h("bigconsole.ai.create_dashboard_clicked", { generationId: r });
467
+ let e = await st({ variables: { input: n.input } });
466
468
  if (t(e, "project")) return;
467
469
  let i = e.data?.createDashboardFromGeneration?.id;
468
- i && (m("bigconsole.ai.dashboard_created", {
470
+ i && (h("bigconsole.ai.dashboard_created", {
469
471
  generationId: r,
470
472
  dashboardId: i
471
- }), p(`/dashboards/${i}`));
473
+ }), m(`/dashboards/${i}`));
472
474
  } catch (e) {
473
475
  if (t(e, "project")) return;
474
- I(e instanceof Error ? e.message : c("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
476
+ I(e instanceof Error ? e.message : l("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
475
477
  }
476
478
  }, [
477
- it,
479
+ st,
480
+ h,
478
481
  m,
479
- p,
480
- c
481
- ]), ut = l(async (e) => {
482
+ l
483
+ ]), _t = u(async (e) => {
482
484
  I(null);
483
485
  try {
484
- await X({ variables: { generationId: e } }), te() && ne("success"), q();
486
+ await ct({ variables: { generationId: e } }), ee() && te("success"), J();
485
487
  } catch (e) {
486
- I(e instanceof Error ? e.message : c("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), te() && ne("error");
488
+ I(e instanceof Error ? e.message : l("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), ee() && te("error");
487
489
  }
488
490
  }, [
489
- X,
490
- q,
491
- c
492
- ]), dt = l(async (e) => {
493
- I(null), W(e);
491
+ ct,
492
+ J,
493
+ l
494
+ ]), vt = u(async (e) => {
495
+ I(null), G(e);
494
496
  try {
495
- await at({ variables: { generationId: e } }), q();
497
+ await lt({ variables: { generationId: e } }), J();
496
498
  } catch (e) {
497
- I(e instanceof Error ? e.message : c("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
499
+ I(e instanceof Error ? e.message : l("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
498
500
  } finally {
499
- G(e);
501
+ K(e);
500
502
  }
501
503
  }, [
502
- at,
503
- q,
504
- c
505
- ]), ft = l(async (e) => {
506
- I(null), W(e);
504
+ lt,
505
+ J,
506
+ l
507
+ ]), yt = u(async (e) => {
508
+ I(null), G(e);
507
509
  try {
508
- if (t(await ot({ variables: { input: { generationId: e } } }), "command")) return;
509
- q();
510
+ if (t(await ut({ variables: { input: { generationId: e } } }), "command")) return;
511
+ J();
510
512
  } catch (e) {
511
513
  if (t(e, "command")) return;
512
- I(e instanceof Error ? e.message : c("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
514
+ I(e instanceof Error ? e.message : l("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
513
515
  } finally {
514
- G(e);
516
+ K(e);
515
517
  }
516
518
  }, [
517
- ot,
518
- q,
519
- c
520
- ]), pt = l(async () => {
519
+ ut,
520
+ J,
521
+ l
522
+ ]), bt = u(async () => {
521
523
  if (!B || !H.trim()) return;
522
524
  let e = B.id;
523
- I(null), W(e);
525
+ I(null), G(e);
524
526
  let n = !1;
525
527
  try {
526
- if (t(await st({ variables: { input: {
528
+ if (t(await dt({ variables: { input: {
527
529
  generationId: e,
528
530
  refinementPrompt: H.trim()
529
531
  } } }), "command")) {
530
532
  n = !0;
531
533
  return;
532
534
  }
533
- n = !0, q();
535
+ n = !0, J();
534
536
  } catch (e) {
535
537
  if (t(e, "command")) {
536
538
  n = !0;
537
539
  return;
538
540
  }
539
- I(e instanceof Error ? e.message : c("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
541
+ I(e instanceof Error ? e.message : l("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
540
542
  } finally {
541
- n && (V(null), U("")), G(e);
543
+ n && (V(null), U("")), K(e);
542
544
  }
543
545
  }, [
544
546
  B,
545
547
  H,
546
- st,
547
- q,
548
- c
549
- ]), mt = l((e) => {
550
- S(e);
548
+ dt,
549
+ J,
550
+ l
551
+ ]), xt = u((e) => {
552
+ C(e);
551
553
  }, []), $ = R?.generatedSpec;
552
- return /* @__PURE__ */ x("div", {
554
+ return /* @__PURE__ */ S("div", {
553
555
  "data-tour": "bigconsole-ai-insights",
554
556
  className: "min-w-0",
555
557
  style: { backgroundColor: "var(--color-bg-canvas)" },
556
558
  children: [
557
- /* @__PURE__ */ x("header", {
559
+ /* @__PURE__ */ S("header", {
558
560
  className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
559
- children: [/* @__PURE__ */ b(he, { intensity: "subtle" }), /* @__PURE__ */ b("div", {
561
+ children: [/* @__PURE__ */ x(ge, { intensity: "subtle" }), /* @__PURE__ */ x("div", {
560
562
  style: { padding: "var(--space-pagePadding)" },
561
- children: /* @__PURE__ */ x("div", {
563
+ children: /* @__PURE__ */ S("div", {
562
564
  style: {
563
565
  display: "flex",
564
566
  alignItems: "center",
@@ -566,7 +568,7 @@ var P = c(function() {
566
568
  flexWrap: "wrap",
567
569
  minWidth: 0
568
570
  },
569
- children: [/* @__PURE__ */ b("div", {
571
+ children: [/* @__PURE__ */ x("div", {
570
572
  style: {
571
573
  display: "flex",
572
574
  height: "var(--size-controlHeight-lg)",
@@ -577,90 +579,90 @@ var P = c(function() {
577
579
  borderRadius: "var(--radius-card)",
578
580
  backgroundColor: "var(--color-action-primary-bg)"
579
581
  },
580
- children: /* @__PURE__ */ b(g, { style: {
582
+ children: /* @__PURE__ */ x(_, { style: {
581
583
  height: "var(--size-icon-lg)",
582
584
  width: "var(--size-icon-lg)",
583
585
  color: "var(--color-action-primary-text)"
584
586
  } })
585
- }), /* @__PURE__ */ x("div", {
587
+ }), /* @__PURE__ */ S("div", {
586
588
  style: { minWidth: 0 },
587
- children: [/* @__PURE__ */ b("h1", {
589
+ children: [/* @__PURE__ */ x("h1", {
588
590
  className: "m-0 text-2xl font-bold text-text-primary",
589
- children: /* @__PURE__ */ b(_e, { children: c("bigconsole.insights.header.title", "AI Insights") })
590
- }), /* @__PURE__ */ b("p", {
591
+ children: /* @__PURE__ */ x(ve, { children: l("bigconsole.insights.header.title", "AI Insights") })
592
+ }), /* @__PURE__ */ x("p", {
591
593
  className: "m-0 text-sm text-text-secondary",
592
- children: c("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
594
+ children: l("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
593
595
  })]
594
596
  })]
595
597
  })
596
598
  })]
597
599
  }),
598
- /* @__PURE__ */ x("div", {
600
+ /* @__PURE__ */ S("div", {
599
601
  style: { padding: "var(--space-pagePadding)" },
600
- children: [/* @__PURE__ */ b(ye, {
602
+ children: [/* @__PURE__ */ x(be, {
601
603
  className: "mb-[var(--space-sectionGap)]",
602
604
  children: "Describe the dashboard you need in plain English and BigConsole proposes the pages, widgets and layout for it. Review the proposal, refine it in place, then create the real dashboard in one step — a generation is only a proposal until you accept it."
603
- }), /* @__PURE__ */ x(i, { children: [
604
- Ye && /* @__PURE__ */ b(r, {
605
+ }), /* @__PURE__ */ S(i, { children: [
606
+ Ze && /* @__PURE__ */ x(r, {
605
607
  headingLevel: 2,
606
608
  tone: "danger",
607
609
  padding: "compact",
608
610
  title: "That request did not go through",
609
- description: Ye,
610
- icon: /* @__PURE__ */ b(se, { className: "h-icon-sm w-icon-sm" }),
611
+ description: Ze,
612
+ icon: /* @__PURE__ */ x(ce, { className: "h-icon-sm w-icon-sm" }),
611
613
  "data-testid": "insights-error",
612
- actions: /* @__PURE__ */ b("button", {
614
+ actions: /* @__PURE__ */ x("button", {
613
615
  type: "button",
614
616
  onClick: () => I(null),
615
- "aria-label": c("bigconsole.insights.error.dismiss", "Dismiss error"),
617
+ "aria-label": l("bigconsole.insights.error.dismiss", "Dismiss error"),
616
618
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
617
619
  style: T,
618
620
  children: "Dismiss"
619
621
  })
620
622
  }),
621
- (K || tt) && /* @__PURE__ */ b("div", {
623
+ (q || it) && /* @__PURE__ */ x("div", {
622
624
  role: "alert",
623
- children: /* @__PURE__ */ b(r, {
625
+ children: /* @__PURE__ */ x(r, {
624
626
  tone: "danger",
625
627
  padding: "compact",
626
628
  headingLevel: 2,
627
- title: c("bigconsole.insights.error.loadFailed", "AI Insights could not be loaded"),
628
- description: c("bigconsole.insights.error.loadFailedDescription", "Your saved generations and suggestions may be unavailable. Retry the failed request."),
629
+ title: l("bigconsole.insights.error.loadFailed", "AI Insights could not be loaded"),
630
+ description: l("bigconsole.insights.error.loadFailedDescription", "Your saved generations and suggestions may be unavailable. Retry the failed request."),
629
631
  "data-testid": "insights-load-error",
630
- actions: /* @__PURE__ */ x("button", {
632
+ actions: /* @__PURE__ */ S("button", {
631
633
  type: "button",
632
634
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
633
635
  style: T,
634
636
  onClick: () => {
635
- K && q().catch(() => void 0), tt && nt().catch(() => void 0);
637
+ q && J().catch(() => void 0), it && at().catch(() => void 0);
636
638
  },
637
639
  children: [
638
- /* @__PURE__ */ b(fe, {
640
+ /* @__PURE__ */ x(pe, {
639
641
  size: 14,
640
642
  "aria-hidden": "true"
641
643
  }),
642
644
  " ",
643
- c("bigconsole.insights.error.retry", "Retry")
645
+ l("bigconsole.insights.error.retry", "Retry")
644
646
  ]
645
647
  })
646
648
  })
647
649
  }),
648
- /* @__PURE__ */ b(r, {
650
+ /* @__PURE__ */ x(r, {
649
651
  id: "insights-prompt",
650
652
  emphasis: "primary",
651
653
  headingLevel: 2,
652
654
  title: "Describe your dashboard",
653
655
  description: "One or two sentences is enough — name the metrics, the breakdowns and who will read it.",
654
- icon: /* @__PURE__ */ b(g, { className: "h-icon-sm w-icon-sm" }),
656
+ icon: /* @__PURE__ */ x(_, { className: "h-icon-sm w-icon-sm" }),
655
657
  "data-testid": "insights-prompt",
656
- children: /* @__PURE__ */ x("div", {
658
+ children: /* @__PURE__ */ S("div", {
657
659
  style: {
658
660
  display: "flex",
659
661
  flexDirection: "column",
660
662
  gap: "var(--space-controlGap)"
661
663
  },
662
664
  children: [
663
- /* @__PURE__ */ b("label", {
665
+ /* @__PURE__ */ x("label", {
664
666
  htmlFor: "prompt-input",
665
667
  style: {
666
668
  display: "block",
@@ -668,13 +670,13 @@ var P = c(function() {
668
670
  fontWeight: "var(--font-weight-medium)",
669
671
  color: "var(--color-text-primary)"
670
672
  },
671
- children: c("bigconsole.insights.prompt.label", "Your prompt")
673
+ children: l("bigconsole.insights.prompt.label", "Your prompt")
672
674
  }),
673
- /* @__PURE__ */ b("textarea", {
675
+ /* @__PURE__ */ x("textarea", {
674
676
  id: "prompt-input",
675
- value: v,
676
- onChange: (e) => S(e.target.value),
677
- placeholder: c("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
677
+ value: y,
678
+ onChange: (e) => C(e.target.value),
679
+ placeholder: l("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
678
680
  rows: 3,
679
681
  maxLength: 2e3,
680
682
  className: n,
@@ -690,12 +692,12 @@ var P = c(function() {
690
692
  resize: "vertical"
691
693
  },
692
694
  onKeyDown: (e) => {
693
- e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), lt());
695
+ e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), ht());
694
696
  }
695
697
  }),
696
- /* @__PURE__ */ x("div", {
698
+ /* @__PURE__ */ S("div", {
697
699
  role: "group",
698
- "aria-label": c("bigconsole.insights.prompt.optionsLabel", "Generation options"),
700
+ "aria-label": l("bigconsole.insights.prompt.optionsLabel", "Generation options"),
699
701
  "data-testid": "insights-generation-options",
700
702
  style: {
701
703
  display: "grid",
@@ -703,73 +705,73 @@ var P = c(function() {
703
705
  gap: "var(--space-controlGap)"
704
706
  },
705
707
  children: [
706
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
708
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
707
709
  htmlFor: "prompt-style",
708
710
  style: D,
709
- children: c("bigconsole.insights.prompt.style", "Style")
710
- }), /* @__PURE__ */ b("select", {
711
+ children: l("bigconsole.insights.prompt.style", "Style")
712
+ }), /* @__PURE__ */ x("select", {
711
713
  id: "prompt-style",
712
714
  value: w,
713
715
  onChange: (e) => A(e.target.value),
714
716
  className: n,
715
717
  style: O,
716
- children: Ne.map((e) => /* @__PURE__ */ b("option", {
718
+ children: Fe.map((e) => /* @__PURE__ */ x("option", {
717
719
  value: e.value,
718
720
  children: e.label
719
721
  }, e.value))
720
722
  })] }),
721
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
723
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
722
724
  htmlFor: "prompt-layout",
723
725
  style: D,
724
- children: c("bigconsole.insights.prompt.layout", "Layout")
725
- }), /* @__PURE__ */ b("select", {
726
+ children: l("bigconsole.insights.prompt.layout", "Layout")
727
+ }), /* @__PURE__ */ x("select", {
726
728
  id: "prompt-layout",
727
729
  value: j,
728
- onChange: (e) => ze(e.target.value),
730
+ onChange: (e) => Ve(e.target.value),
729
731
  className: n,
730
732
  style: O,
731
- children: Pe.map((e) => /* @__PURE__ */ b("option", {
733
+ children: Ie.map((e) => /* @__PURE__ */ x("option", {
732
734
  value: e.value,
733
735
  children: e.label
734
736
  }, e.value))
735
737
  })] }),
736
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
738
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
737
739
  htmlFor: "prompt-columns",
738
740
  style: D,
739
- children: c("bigconsole.insights.prompt.columns", "Columns")
740
- }), /* @__PURE__ */ b("select", {
741
+ children: l("bigconsole.insights.prompt.columns", "Columns")
742
+ }), /* @__PURE__ */ x("select", {
741
743
  id: "prompt-columns",
742
744
  value: M,
743
- onChange: (e) => Ue(Number(e.target.value)),
745
+ onChange: (e) => Ge(Number(e.target.value)),
744
746
  className: n,
745
747
  style: O,
746
- children: Fe.map((e) => /* @__PURE__ */ b("option", {
748
+ children: Le.map((e) => /* @__PURE__ */ x("option", {
747
749
  value: e,
748
750
  children: e
749
751
  }, e))
750
752
  })] }),
751
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
753
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
752
754
  htmlFor: "prompt-max-widgets",
753
755
  style: D,
754
- children: c("bigconsole.insights.prompt.maxWidgets", "Max widgets")
755
- }), /* @__PURE__ */ b("select", {
756
+ children: l("bigconsole.insights.prompt.maxWidgets", "Max widgets")
757
+ }), /* @__PURE__ */ x("select", {
756
758
  id: "prompt-max-widgets",
757
759
  value: P,
758
- onChange: (e) => qe(Number(e.target.value)),
760
+ onChange: (e) => Ye(Number(e.target.value)),
759
761
  className: n,
760
762
  style: O,
761
- children: Ie.map((e) => /* @__PURE__ */ b("option", {
763
+ children: Re.map((e) => /* @__PURE__ */ x("option", {
762
764
  value: e,
763
765
  children: e
764
766
  }, e))
765
767
  })] })
766
768
  ]
767
769
  }),
768
- /* @__PURE__ */ b(ie, {
769
- prompt: v,
770
+ /* @__PURE__ */ x(ae, {
771
+ prompt: y,
770
772
  disabled: F
771
773
  }),
772
- /* @__PURE__ */ x("div", {
774
+ /* @__PURE__ */ S("div", {
773
775
  style: {
774
776
  display: "flex",
775
777
  alignItems: "center",
@@ -778,7 +780,7 @@ var P = c(function() {
778
780
  borderTop: "1px solid var(--color-border-subtle)",
779
781
  paddingTop: "var(--space-controlGap)"
780
782
  },
781
- children: [/* @__PURE__ */ x("span", {
783
+ children: [/* @__PURE__ */ S("span", {
782
784
  style: {
783
785
  flex: "1 1 12rem",
784
786
  minWidth: 0,
@@ -786,51 +788,51 @@ var P = c(function() {
786
788
  color: "var(--color-text-muted)"
787
789
  },
788
790
  children: [
789
- c("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
791
+ l("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
790
792
  " · ",
791
- v.length,
793
+ y.length,
792
794
  "/2000"
793
795
  ]
794
- }), /* @__PURE__ */ x("button", {
796
+ }), /* @__PURE__ */ S("button", {
795
797
  type: "button",
796
- onClick: lt,
797
- disabled: !v.trim() || F,
798
+ onClick: ht,
799
+ disabled: !y.trim() || F,
798
800
  className: n,
799
801
  style: {
800
802
  ...E,
801
803
  marginLeft: "auto",
802
- cursor: !v.trim() || F ? "not-allowed" : "pointer",
803
- opacity: !v.trim() || F ? .5 : 1
804
+ cursor: !y.trim() || F ? "not-allowed" : "pointer",
805
+ opacity: !y.trim() || F ? .5 : 1
804
806
  },
805
- children: [F ? /* @__PURE__ */ b(h, {
807
+ children: [F ? /* @__PURE__ */ x(g, {
806
808
  size: 16,
807
809
  className: "animate-spin",
808
810
  "aria-hidden": "true"
809
- }) : /* @__PURE__ */ b(g, {
811
+ }) : /* @__PURE__ */ x(_, {
810
812
  size: 16,
811
813
  "aria-hidden": "true"
812
- }), c("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
814
+ }), l("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
813
815
  })]
814
816
  })
815
817
  ]
816
818
  })
817
819
  }),
818
- ct.length > 0 && /* @__PURE__ */ b(r, {
820
+ ft.length > 0 && /* @__PURE__ */ x(r, {
819
821
  emphasis: "muted",
820
822
  headingLevel: 2,
821
- title: c("bigconsole.insights.suggestions.heading", "Starting points"),
823
+ title: l("bigconsole.insights.suggestions.heading", "Starting points"),
822
824
  description: "Pick one to drop it into the prompt box above, then edit it before generating.",
823
- icon: /* @__PURE__ */ b(de, { className: "h-icon-sm w-icon-sm" }),
825
+ icon: /* @__PURE__ */ x(fe, { className: "h-icon-sm w-icon-sm" }),
824
826
  "data-testid": "insights-suggestions",
825
- children: /* @__PURE__ */ b("div", {
827
+ children: /* @__PURE__ */ x("div", {
826
828
  style: {
827
829
  display: "grid",
828
830
  gridTemplateColumns: "repeat(auto-fill, minmax(min(260px, 100%), 1fr))",
829
831
  gap: "var(--space-controlGap)"
830
832
  },
831
- children: ct.map((e) => /* @__PURE__ */ x("button", {
833
+ children: ft.map((e) => /* @__PURE__ */ S("button", {
832
834
  type: "button",
833
- onClick: () => mt(e.prompt),
835
+ onClick: () => xt(e.prompt),
834
836
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
835
837
  style: {
836
838
  textAlign: "left",
@@ -843,7 +845,7 @@ var P = c(function() {
843
845
  cursor: "pointer"
844
846
  },
845
847
  children: [
846
- /* @__PURE__ */ b("span", {
848
+ /* @__PURE__ */ x("span", {
847
849
  style: {
848
850
  display: "block",
849
851
  fontWeight: "var(--font-weight-medium)",
@@ -853,7 +855,7 @@ var P = c(function() {
853
855
  },
854
856
  children: e.title
855
857
  }),
856
- /* @__PURE__ */ b("span", {
858
+ /* @__PURE__ */ x("span", {
857
859
  style: {
858
860
  display: "block",
859
861
  fontSize: "var(--font-size-body-sm)",
@@ -862,14 +864,14 @@ var P = c(function() {
862
864
  },
863
865
  children: e.exampleDescription || e.prompt
864
866
  }),
865
- e.tags.length > 0 && /* @__PURE__ */ b("span", {
867
+ e.tags.length > 0 && /* @__PURE__ */ x("span", {
866
868
  style: {
867
869
  display: "flex",
868
870
  gap: "var(--space-iconGap)",
869
871
  marginTop: "var(--space-controlGap)",
870
872
  flexWrap: "wrap"
871
873
  },
872
- children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ b("span", {
874
+ children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ x("span", {
873
875
  style: k,
874
876
  children: e
875
877
  }, e))
@@ -878,29 +880,29 @@ var P = c(function() {
878
880
  }, e.id))
879
881
  })
880
882
  }),
881
- /* @__PURE__ */ b(r, {
883
+ /* @__PURE__ */ x(r, {
882
884
  emphasis: "bare",
883
885
  padding: "none",
884
886
  headingLevel: 2,
885
- title: c("bigconsole.insights.generations.heading", "Recent generations"),
887
+ title: l("bigconsole.insights.generations.heading", "Recent generations"),
886
888
  description: "Newest first. A generation stays a proposal until you create the dashboard from it.",
887
- icon: /* @__PURE__ */ b(ue, { className: "h-icon-sm w-icon-sm" }),
888
- meta: Z.length > 0 ? /* @__PURE__ */ x("span", {
889
+ icon: /* @__PURE__ */ x(de, { className: "h-icon-sm w-icon-sm" }),
890
+ meta: Q.length > 0 ? /* @__PURE__ */ S("span", {
889
891
  style: k,
890
892
  children: [
891
- Z.length,
893
+ Q.length,
892
894
  " generation",
893
- Z.length === 1 ? "" : "s"
895
+ Q.length === 1 ? "" : "s"
894
896
  ]
895
897
  }) : void 0,
896
898
  "data-testid": "insights-generations",
897
- children: Qe && Z.length === 0 ? /* @__PURE__ */ b(r, {
899
+ children: tt && Z.length === 0 ? /* @__PURE__ */ x(r, {
898
900
  emphasis: "muted",
899
901
  headingLevel: 3,
900
902
  "aria-label": "Loading generations",
901
903
  className: "min-h-[10rem]",
902
904
  "data-testid": "insights-generations-loading",
903
- children: /* @__PURE__ */ x("div", {
905
+ children: /* @__PURE__ */ S("div", {
904
906
  style: {
905
907
  display: "flex",
906
908
  minHeight: "8rem",
@@ -910,240 +912,257 @@ var P = c(function() {
910
912
  gap: "var(--space-controlGap)",
911
913
  color: "var(--color-text-muted)"
912
914
  },
913
- children: [/* @__PURE__ */ b(h, {
915
+ children: [/* @__PURE__ */ x(g, {
914
916
  size: 24,
915
917
  className: "animate-spin",
916
918
  "aria-hidden": "true"
917
- }), /* @__PURE__ */ b("p", {
919
+ }), /* @__PURE__ */ x("p", {
918
920
  style: { fontSize: "var(--font-size-body-sm)" },
919
- children: c("bigconsole.insights.generations.loading", "Loading generations…")
921
+ children: l("bigconsole.insights.generations.loading", "Loading generations…")
920
922
  })]
921
923
  })
922
- }) : Z.length === 0 && !F && !K ? /* @__PURE__ */ b(ge, {
924
+ }) : Z.length === 0 && !F && !q ? /* @__PURE__ */ x(_e, {
923
925
  treatment: "insight",
924
926
  className: "border-[var(--color-border-seam)]",
925
- children: /* @__PURE__ */ b(ve, {
927
+ children: /* @__PURE__ */ x(ye, {
926
928
  illustration: "onboarding",
927
- title: c("bigconsole.insights.generations.emptyTitle", "No generations yet"),
928
- description: c("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
929
+ title: l("bigconsole.insights.generations.emptyTitle", "No generations yet"),
930
+ description: l("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
929
931
  })
930
- }) : /* @__PURE__ */ x("div", {
932
+ }) : /* @__PURE__ */ S("div", {
931
933
  className: "flex flex-col gap-list-gap",
932
- children: [F && !Y && /* @__PURE__ */ b(r, {
933
- emphasis: "muted",
934
- tone: "info",
935
- padding: "compact",
936
- headingLevel: 3,
937
- title: "Sending your prompt…",
938
- description: "The new generation appears here as soon as the backend accepts it.",
939
- icon: /* @__PURE__ */ b(h, { className: "h-icon-sm w-icon-sm animate-spin" }),
940
- "data-testid": "insights-generation-pending"
941
- }), Z.map((e) => {
942
- let t = e.generatedSpec, i = L.has(e.id), a = C.includes(e.status);
943
- return /* @__PURE__ */ x(r, {
944
- emphasis: "standard",
934
+ children: [
935
+ F && !X && /* @__PURE__ */ x(r, {
936
+ emphasis: "muted",
937
+ tone: "info",
945
938
  padding: "compact",
946
939
  headingLevel: 3,
947
- title: t?.name || (a ? c("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
948
- meta: /* @__PURE__ */ b(Be, { status: e.status }),
949
- description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
950
- "data-testid": "insights-generation-card",
951
- bodyClassName: "flex flex-col gap-control-gap",
952
- children: [
953
- t && /* @__PURE__ */ x("div", {
954
- style: {
955
- display: "flex",
956
- flexWrap: "wrap",
957
- gap: "var(--space-iconGap)"
958
- },
959
- children: [
960
- /* @__PURE__ */ x("span", {
961
- style: k,
962
- children: [
963
- N(t),
964
- " widget",
965
- N(t) === 1 ? "" : "s"
966
- ]
967
- }),
968
- /* @__PURE__ */ x("span", {
969
- style: k,
970
- children: [
971
- t.pages.length,
972
- " page",
973
- t.pages.length === 1 ? "" : "s"
974
- ]
975
- }),
976
- /* @__PURE__ */ x("span", {
977
- style: Ve(t.overallConfidence),
978
- children: [Math.round(t.overallConfidence * 100), "% confidence"]
979
- })
980
- ]
981
- }),
982
- e.errorMessage && /* @__PURE__ */ b(r, {
983
- headingLevel: 4,
984
- tone: "danger",
985
- padding: "compact",
986
- title: "Generation failed",
987
- description: e.errorMessage,
988
- icon: /* @__PURE__ */ b(se, { className: "h-icon-sm w-icon-sm" })
989
- }),
990
- /* @__PURE__ */ x("div", {
991
- style: {
992
- display: "flex",
993
- flexWrap: "wrap",
994
- alignItems: "center",
995
- gap: "var(--space-controlGap)",
996
- borderTop: "1px solid var(--color-border-subtle)",
997
- paddingTop: "var(--space-controlGap)"
998
- },
999
- children: [
1000
- a && /* @__PURE__ */ x("button", {
1001
- type: "button",
1002
- onClick: () => {
1003
- o("medium"), dt(e.id);
1004
- },
1005
- disabled: i,
1006
- title: c("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
1007
- className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1008
- style: {
1009
- ...Le,
1010
- cursor: i ? "wait" : "pointer"
1011
- },
1012
- children: [
1013
- /* @__PURE__ */ b(ce, {
1014
- size: 14,
1015
- "aria-hidden": "true"
1016
- }),
1017
- " ",
1018
- c("bigconsole.insights.actions.cancel", "Cancel")
1019
- ]
1020
- }),
1021
- e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
1022
- type: "button",
1023
- onClick: () => z(e),
1024
- title: c("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
1025
- className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1026
- style: T,
1027
- children: [
1028
- /* @__PURE__ */ b(le, {
1029
- size: 14,
1030
- "aria-hidden": "true"
1031
- }),
1032
- " ",
1033
- c("bigconsole.insights.actions.preview", "Preview")
1034
- ]
1035
- }),
1036
- e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
1037
- type: "button",
1038
- onClick: () => {
1039
- V(e), U("");
1040
- },
1041
- title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1042
- className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1043
- style: T,
1044
- children: [
1045
- /* @__PURE__ */ b(_, {
1046
- size: 14,
1047
- "aria-hidden": "true"
1048
- }),
1049
- " ",
1050
- c("bigconsole.insights.actions.refine", "Refine")
1051
- ]
1052
- }),
1053
- (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ x("button", {
1054
- type: "button",
1055
- onClick: () => {
1056
- o("medium"), ft(e.id);
1057
- },
1058
- disabled: i,
1059
- title: c("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
1060
- className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1061
- style: {
1062
- ...T,
1063
- cursor: i ? "wait" : "pointer"
1064
- },
1065
- children: [
1066
- /* @__PURE__ */ b(fe, {
1067
- size: 14,
1068
- className: i ? "animate-spin" : "",
1069
- "aria-hidden": "true"
1070
- }),
1071
- " ",
1072
- c("bigconsole.insights.actions.regenerate", "Regenerate")
1073
- ]
1074
- }),
1075
- /* @__PURE__ */ x("div", {
1076
- style: {
1077
- display: "flex",
1078
- flexWrap: "wrap",
1079
- alignItems: "center",
1080
- gap: "var(--space-controlGap)",
1081
- marginLeft: "auto"
1082
- },
1083
- children: [
1084
- e.status === "COMPLETED" && s(e).kind === "hold" && /* @__PURE__ */ b("span", {
1085
- role: "status",
1086
- children: c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1087
- }),
1088
- e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ x("button", {
1089
- type: "button",
1090
- onClick: () => Q(e),
1091
- disabled: s(e).kind !== "create",
1092
- title: s(e).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1093
- className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1094
- style: E,
1095
- children: [
1096
- c("bigconsole.insights.actions.create", "Create dashboard"),
1097
- " ",
1098
- /* @__PURE__ */ b(f, {
1099
- size: 14,
1100
- "aria-hidden": "true"
1101
- })
1102
- ]
1103
- }),
1104
- e.dashboardId && /* @__PURE__ */ x("button", {
1105
- type: "button",
1106
- onClick: () => p(`/dashboards/${e.dashboardId ?? ""}`),
1107
- className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1108
- style: T,
1109
- children: [
1110
- c("bigconsole.insights.actions.viewDashboard", "View dashboard"),
1111
- " ",
1112
- /* @__PURE__ */ b(f, {
940
+ title: "Sending your prompt…",
941
+ description: "The new generation appears here as soon as the backend accepts it.",
942
+ icon: /* @__PURE__ */ x(g, { className: "h-icon-sm w-icon-sm animate-spin" }),
943
+ "data-testid": "insights-generation-pending"
944
+ }),
945
+ Q.map((e) => {
946
+ let t = e.generatedSpec, i = ne(Z, e), a = L.has(e.id), o = Me.includes(e.status);
947
+ return /* @__PURE__ */ S(r, {
948
+ emphasis: "standard",
949
+ padding: "compact",
950
+ headingLevel: 3,
951
+ title: t?.name || (o ? l("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
952
+ meta: /* @__PURE__ */ x(He, { status: e.status }),
953
+ description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
954
+ "data-testid": "insights-generation-card",
955
+ bodyClassName: "flex flex-col gap-control-gap",
956
+ children: [
957
+ t && /* @__PURE__ */ S("div", {
958
+ style: {
959
+ display: "flex",
960
+ flexWrap: "wrap",
961
+ gap: "var(--space-iconGap)"
962
+ },
963
+ children: [
964
+ e.parentGenerationId && /* @__PURE__ */ x("span", {
965
+ style: k,
966
+ "data-testid": "insights-generation-revision",
967
+ children: i ? l("bigconsole.insights.generations.revisionOf", "Revision of {{name}}", { name: i.generatedSpec?.name || l("bigconsole.insights.generations.untitled", "Untitled generation") }) : l("bigconsole.insights.generations.revisionOfEarlier", "Revision of an earlier generation")
968
+ }),
969
+ /* @__PURE__ */ S("span", {
970
+ style: k,
971
+ children: [
972
+ N(t),
973
+ " widget",
974
+ N(t) === 1 ? "" : "s"
975
+ ]
976
+ }),
977
+ /* @__PURE__ */ S("span", {
978
+ style: k,
979
+ children: [
980
+ t.pages.length,
981
+ " page",
982
+ t.pages.length === 1 ? "" : "s"
983
+ ]
984
+ }),
985
+ /* @__PURE__ */ S("span", {
986
+ style: Ue(t.overallConfidence),
987
+ children: [Math.round(t.overallConfidence * 100), "% confidence"]
988
+ })
989
+ ]
990
+ }),
991
+ e.errorMessage && /* @__PURE__ */ x(r, {
992
+ headingLevel: 4,
993
+ tone: "danger",
994
+ padding: "compact",
995
+ title: "Generation failed",
996
+ description: e.errorMessage,
997
+ icon: /* @__PURE__ */ x(ce, { className: "h-icon-sm w-icon-sm" })
998
+ }),
999
+ /* @__PURE__ */ S("div", {
1000
+ style: {
1001
+ display: "flex",
1002
+ flexWrap: "wrap",
1003
+ alignItems: "center",
1004
+ gap: "var(--space-controlGap)",
1005
+ borderTop: "1px solid var(--color-border-subtle)",
1006
+ paddingTop: "var(--space-controlGap)"
1007
+ },
1008
+ children: [
1009
+ o && /* @__PURE__ */ S("button", {
1010
+ type: "button",
1011
+ onClick: () => {
1012
+ s("medium"), vt(e.id);
1013
+ },
1014
+ disabled: a,
1015
+ title: l("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
1016
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1017
+ style: {
1018
+ ...ze,
1019
+ cursor: a ? "wait" : "pointer"
1020
+ },
1021
+ children: [
1022
+ /* @__PURE__ */ x(le, {
1023
+ size: 14,
1024
+ "aria-hidden": "true"
1025
+ }),
1026
+ " ",
1027
+ l("bigconsole.insights.actions.cancel", "Cancel")
1028
+ ]
1029
+ }),
1030
+ e.status === "COMPLETED" && t && /* @__PURE__ */ S("button", {
1031
+ type: "button",
1032
+ onClick: () => z(e),
1033
+ title: l("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
1034
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1035
+ style: T,
1036
+ children: [
1037
+ /* @__PURE__ */ x(ue, {
1038
+ size: 14,
1039
+ "aria-hidden": "true"
1040
+ }),
1041
+ " ",
1042
+ l("bigconsole.insights.actions.preview", "Preview")
1043
+ ]
1044
+ }),
1045
+ e.status === "COMPLETED" && t && /* @__PURE__ */ S("button", {
1046
+ type: "button",
1047
+ onClick: () => {
1048
+ V(e), U("");
1049
+ },
1050
+ title: l("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1051
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1052
+ style: T,
1053
+ children: [
1054
+ /* @__PURE__ */ x(v, {
1055
+ size: 14,
1056
+ "aria-hidden": "true"
1057
+ }),
1058
+ " ",
1059
+ l("bigconsole.insights.actions.refine", "Refine")
1060
+ ]
1061
+ }),
1062
+ (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ S("button", {
1063
+ type: "button",
1064
+ onClick: () => {
1065
+ s("medium"), yt(e.id);
1066
+ },
1067
+ disabled: a,
1068
+ title: l("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
1069
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1070
+ style: {
1071
+ ...T,
1072
+ cursor: a ? "wait" : "pointer"
1073
+ },
1074
+ children: [
1075
+ /* @__PURE__ */ x(pe, {
1076
+ size: 14,
1077
+ className: a ? "animate-spin" : "",
1078
+ "aria-hidden": "true"
1079
+ }),
1080
+ " ",
1081
+ l("bigconsole.insights.actions.regenerate", "Regenerate")
1082
+ ]
1083
+ }),
1084
+ /* @__PURE__ */ S("div", {
1085
+ style: {
1086
+ display: "flex",
1087
+ flexWrap: "wrap",
1088
+ alignItems: "center",
1089
+ gap: "var(--space-controlGap)",
1090
+ marginLeft: "auto"
1091
+ },
1092
+ children: [
1093
+ e.status === "COMPLETED" && c(e).kind === "hold" && /* @__PURE__ */ x("span", {
1094
+ role: "status",
1095
+ children: l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1096
+ }),
1097
+ e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ S("button", {
1098
+ type: "button",
1099
+ onClick: () => gt(e),
1100
+ disabled: c(e).kind !== "create",
1101
+ title: c(e).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1102
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1103
+ style: E,
1104
+ children: [
1105
+ l("bigconsole.insights.actions.create", "Create dashboard"),
1106
+ " ",
1107
+ /* @__PURE__ */ x(p, {
1108
+ size: 14,
1109
+ "aria-hidden": "true"
1110
+ })
1111
+ ]
1112
+ }),
1113
+ e.dashboardId && /* @__PURE__ */ S("button", {
1114
+ type: "button",
1115
+ onClick: () => m(`/dashboards/${e.dashboardId ?? ""}`),
1116
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1117
+ style: T,
1118
+ children: [
1119
+ l("bigconsole.insights.actions.viewDashboard", "View dashboard"),
1120
+ " ",
1121
+ /* @__PURE__ */ x(p, {
1122
+ size: 14,
1123
+ "aria-hidden": "true"
1124
+ })
1125
+ ]
1126
+ }),
1127
+ /* @__PURE__ */ x("button", {
1128
+ type: "button",
1129
+ onClick: () => {
1130
+ s("medium"), _t(e.id);
1131
+ },
1132
+ title: l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1133
+ "aria-label": l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1134
+ className: n,
1135
+ style: Be,
1136
+ children: /* @__PURE__ */ x(me, {
1113
1137
  size: 14,
1114
1138
  "aria-hidden": "true"
1115
1139
  })
1116
- ]
1117
- }),
1118
- /* @__PURE__ */ b("button", {
1119
- type: "button",
1120
- onClick: () => {
1121
- o("medium"), ut(e.id);
1122
- },
1123
- title: c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1124
- "aria-label": c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1125
- className: n,
1126
- style: Re,
1127
- children: /* @__PURE__ */ b(pe, {
1128
- size: 14,
1129
- "aria-hidden": "true"
1130
1140
  })
1131
- })
1132
- ]
1133
- })
1134
- ]
1135
- })
1136
- ]
1137
- }, e.id);
1138
- })]
1141
+ ]
1142
+ })
1143
+ ]
1144
+ })
1145
+ ]
1146
+ }, e.id);
1147
+ }),
1148
+ mt.length > 0 && /* @__PURE__ */ x("button", {
1149
+ type: "button",
1150
+ onClick: () => $e((e) => !e),
1151
+ "aria-expanded": W,
1152
+ className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1153
+ style: T,
1154
+ "data-testid": "insights-earlier-versions-toggle",
1155
+ children: W ? l("bigconsole.insights.generations.hideEarlier", "Hide earlier versions") : l("bigconsole.insights.generations.showEarlier", "Show {{count}} earlier version(s)", { count: mt.length })
1156
+ })
1157
+ ]
1139
1158
  })
1140
1159
  })
1141
1160
  ] })]
1142
1161
  }),
1143
- R && $ && /* @__PURE__ */ b("div", {
1162
+ R && $ && /* @__PURE__ */ x("div", {
1144
1163
  role: "dialog",
1145
1164
  "aria-modal": "true",
1146
- "aria-label": c("bigconsole.insights.preview.ariaLabel", "Generation preview"),
1165
+ "aria-label": l("bigconsole.insights.preview.ariaLabel", "Generation preview"),
1147
1166
  onClick: () => z(null),
1148
1167
  style: {
1149
1168
  position: "fixed",
@@ -1155,7 +1174,7 @@ var P = c(function() {
1155
1174
  justifyContent: "center",
1156
1175
  padding: "var(--space-pagePadding)"
1157
1176
  },
1158
- children: /* @__PURE__ */ x("div", {
1177
+ children: /* @__PURE__ */ S("div", {
1159
1178
  onClick: (e) => e.stopPropagation(),
1160
1179
  style: {
1161
1180
  display: "flex",
@@ -1169,7 +1188,7 @@ var P = c(function() {
1169
1188
  boxShadow: "var(--shadow-elevation-3)"
1170
1189
  },
1171
1190
  children: [
1172
- /* @__PURE__ */ x("div", {
1191
+ /* @__PURE__ */ S("div", {
1173
1192
  style: {
1174
1193
  display: "flex",
1175
1194
  justifyContent: "space-between",
@@ -1178,16 +1197,16 @@ var P = c(function() {
1178
1197
  padding: "var(--space-cardPadding)",
1179
1198
  borderBottom: "1px solid var(--color-border-subtle)"
1180
1199
  },
1181
- children: [/* @__PURE__ */ x("div", {
1200
+ children: [/* @__PURE__ */ S("div", {
1182
1201
  style: { minWidth: 0 },
1183
- children: [/* @__PURE__ */ b("h2", {
1202
+ children: [/* @__PURE__ */ x("h2", {
1184
1203
  style: {
1185
1204
  fontSize: "var(--font-size-heading-h4)",
1186
1205
  fontWeight: "var(--font-weight-semibold)",
1187
1206
  color: "var(--color-text-primary)"
1188
1207
  },
1189
1208
  children: $.name
1190
- }), $.description && /* @__PURE__ */ b("p", {
1209
+ }), $.description && /* @__PURE__ */ x("p", {
1191
1210
  style: {
1192
1211
  fontSize: "var(--font-size-body-sm)",
1193
1212
  color: "var(--color-text-secondary)",
@@ -1195,22 +1214,22 @@ var P = c(function() {
1195
1214
  },
1196
1215
  children: $.description
1197
1216
  })]
1198
- }), /* @__PURE__ */ b("button", {
1217
+ }), /* @__PURE__ */ x("button", {
1199
1218
  type: "button",
1200
1219
  onClick: () => z(null),
1201
- "aria-label": c("bigconsole.insights.preview.close", "Close preview"),
1220
+ "aria-label": l("bigconsole.insights.preview.close", "Close preview"),
1202
1221
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1203
1222
  style: {
1204
- ...Re,
1223
+ ...Be,
1205
1224
  color: "var(--color-text-muted)"
1206
1225
  },
1207
- children: /* @__PURE__ */ b(me, {
1226
+ children: /* @__PURE__ */ x(he, {
1208
1227
  size: 18,
1209
1228
  "aria-hidden": "true"
1210
1229
  })
1211
1230
  })]
1212
1231
  }),
1213
- /* @__PURE__ */ x("div", {
1232
+ /* @__PURE__ */ S("div", {
1214
1233
  style: {
1215
1234
  flex: "1 1 auto",
1216
1235
  minHeight: 0,
@@ -1221,14 +1240,14 @@ var P = c(function() {
1221
1240
  gap: "var(--space-controlGap)"
1222
1241
  },
1223
1242
  children: [
1224
- /* @__PURE__ */ x("div", {
1243
+ /* @__PURE__ */ S("div", {
1225
1244
  style: {
1226
1245
  display: "flex",
1227
1246
  flexWrap: "wrap",
1228
1247
  gap: "var(--space-iconGap)"
1229
1248
  },
1230
1249
  children: [
1231
- /* @__PURE__ */ x("span", {
1250
+ /* @__PURE__ */ S("span", {
1232
1251
  style: k,
1233
1252
  children: [
1234
1253
  N($),
@@ -1236,7 +1255,7 @@ var P = c(function() {
1236
1255
  N($) === 1 ? "" : "s"
1237
1256
  ]
1238
1257
  }),
1239
- /* @__PURE__ */ x("span", {
1258
+ /* @__PURE__ */ S("span", {
1240
1259
  style: k,
1241
1260
  children: [
1242
1261
  $.pages.length,
@@ -1244,16 +1263,16 @@ var P = c(function() {
1244
1263
  $.pages.length === 1 ? "" : "s"
1245
1264
  ]
1246
1265
  }),
1247
- /* @__PURE__ */ x("span", {
1248
- style: Ve($.overallConfidence),
1266
+ /* @__PURE__ */ S("span", {
1267
+ style: Ue($.overallConfidence),
1249
1268
  children: [Math.round($.overallConfidence * 100), "% confidence"]
1250
1269
  })
1251
1270
  ]
1252
1271
  }),
1253
- /* @__PURE__ */ b(oe, { metadata: R.processingMetadata }),
1254
- $.reasoning && /* @__PURE__ */ x("details", {
1272
+ /* @__PURE__ */ x(se, { metadata: R.processingMetadata }),
1273
+ $.reasoning && /* @__PURE__ */ S("details", {
1255
1274
  "data-testid": "preview-reasoning",
1256
- children: [/* @__PURE__ */ b("summary", {
1275
+ children: [/* @__PURE__ */ x("summary", {
1257
1276
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1258
1277
  style: {
1259
1278
  cursor: "pointer",
@@ -1262,8 +1281,8 @@ var P = c(function() {
1262
1281
  color: "var(--color-text-secondary)",
1263
1282
  borderRadius: "var(--radius-button)"
1264
1283
  },
1265
- children: c("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
1266
- }), /* @__PURE__ */ b("p", {
1284
+ children: l("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
1285
+ }), /* @__PURE__ */ x("p", {
1267
1286
  style: {
1268
1287
  marginTop: "var(--space-controlGap)",
1269
1288
  fontSize: "var(--font-size-body-sm)",
@@ -1273,12 +1292,12 @@ var P = c(function() {
1273
1292
  children: $.reasoning
1274
1293
  })]
1275
1294
  }),
1276
- $.pages.map((e, t) => /* @__PURE__ */ x(r, {
1295
+ $.pages.map((e, t) => /* @__PURE__ */ S(r, {
1277
1296
  emphasis: "muted",
1278
1297
  padding: "compact",
1279
1298
  headingLevel: 3,
1280
1299
  title: e.name,
1281
- meta: /* @__PURE__ */ x("span", {
1300
+ meta: /* @__PURE__ */ S("span", {
1282
1301
  style: k,
1283
1302
  children: [
1284
1303
  e.widgets.length,
@@ -1286,31 +1305,31 @@ var P = c(function() {
1286
1305
  e.widgets.length === 1 ? "" : "s"
1287
1306
  ]
1288
1307
  }),
1289
- children: [/* @__PURE__ */ x("p", {
1308
+ children: [/* @__PURE__ */ S("p", {
1290
1309
  style: {
1291
1310
  fontSize: "var(--font-size-body-sm)",
1292
1311
  color: "var(--color-text-secondary)",
1293
1312
  marginBottom: "var(--space-controlGap)"
1294
1313
  },
1295
1314
  children: [
1296
- c("bigconsole.insights.preview.proposedLayout", "Proposed layout"),
1315
+ l("bigconsole.insights.preview.proposedLayout", "Proposed layout"),
1297
1316
  " · ",
1298
1317
  e.gridColumns,
1299
1318
  " ",
1300
- c("bigconsole.insights.preview.columns", "columns"),
1319
+ l("bigconsole.insights.preview.columns", "columns"),
1301
1320
  " ·",
1302
1321
  " ",
1303
1322
  e.layout.toLowerCase().replaceAll("_", " ")
1304
1323
  ]
1305
- }), /* @__PURE__ */ b("div", {
1324
+ }), /* @__PURE__ */ x("div", {
1306
1325
  className: "insights-proposal-grid",
1307
- style: We(e.gridColumns),
1326
+ style: Ke(e.gridColumns),
1308
1327
  children: e.widgets.map((t, n) => {
1309
- let r = He(t.confidence);
1310
- return /* @__PURE__ */ x("div", {
1328
+ let r = We(t.confidence);
1329
+ return /* @__PURE__ */ S("div", {
1311
1330
  className: "insights-proposal-widget",
1312
1331
  style: {
1313
- ...Ge(t.position, e.gridColumns),
1332
+ ...qe(t.position, e.gridColumns),
1314
1333
  display: "flex",
1315
1334
  flexDirection: "column",
1316
1335
  gap: "2px",
@@ -1320,7 +1339,7 @@ var P = c(function() {
1320
1339
  border: "1px solid var(--color-border-subtle)"
1321
1340
  },
1322
1341
  children: [
1323
- /* @__PURE__ */ x("div", {
1342
+ /* @__PURE__ */ S("div", {
1324
1343
  style: {
1325
1344
  display: "flex",
1326
1345
  flexWrap: "wrap",
@@ -1328,7 +1347,7 @@ var P = c(function() {
1328
1347
  gap: "var(--space-iconGap)"
1329
1348
  },
1330
1349
  children: [
1331
- /* @__PURE__ */ b("span", {
1350
+ /* @__PURE__ */ x("span", {
1332
1351
  style: {
1333
1352
  fontSize: "var(--font-size-body-sm)",
1334
1353
  fontWeight: "var(--font-weight-medium)",
@@ -1337,7 +1356,7 @@ var P = c(function() {
1337
1356
  },
1338
1357
  children: t.title
1339
1358
  }),
1340
- /* @__PURE__ */ b("span", {
1359
+ /* @__PURE__ */ x("span", {
1341
1360
  style: {
1342
1361
  fontSize: "var(--font-size-xs)",
1343
1362
  color: "var(--color-text-muted)"
@@ -1345,9 +1364,9 @@ var P = c(function() {
1345
1364
  "data-testid": "preview-widget-type",
1346
1365
  children: t.type
1347
1366
  }),
1348
- r && /* @__PURE__ */ b("span", {
1367
+ r && /* @__PURE__ */ x("span", {
1349
1368
  style: {
1350
- ...Ke(r),
1369
+ ...Je(r),
1351
1370
  marginLeft: "auto"
1352
1371
  },
1353
1372
  "data-testid": "preview-widget-confidence",
@@ -1355,7 +1374,7 @@ var P = c(function() {
1355
1374
  })
1356
1375
  ]
1357
1376
  }),
1358
- t.reasoning && /* @__PURE__ */ b("p", {
1377
+ t.reasoning && /* @__PURE__ */ x("p", {
1359
1378
  style: {
1360
1379
  margin: 0,
1361
1380
  fontSize: "var(--font-size-xs)",
@@ -1364,7 +1383,7 @@ var P = c(function() {
1364
1383
  },
1365
1384
  children: t.reasoning
1366
1385
  }),
1367
- /* @__PURE__ */ b(ae, { config: t.config })
1386
+ /* @__PURE__ */ x(oe, { config: t.config })
1368
1387
  ]
1369
1388
  }, n);
1370
1389
  })
@@ -1372,7 +1391,7 @@ var P = c(function() {
1372
1391
  }, t))
1373
1392
  ]
1374
1393
  }),
1375
- /* @__PURE__ */ x("div", {
1394
+ /* @__PURE__ */ S("div", {
1376
1395
  style: {
1377
1396
  display: "flex",
1378
1397
  justifyContent: "flex-end",
@@ -1382,56 +1401,56 @@ var P = c(function() {
1382
1401
  borderTop: "1px solid var(--color-border-subtle)"
1383
1402
  },
1384
1403
  children: [
1385
- /* @__PURE__ */ b("button", {
1404
+ /* @__PURE__ */ x("button", {
1386
1405
  type: "button",
1387
1406
  onClick: () => z(null),
1388
1407
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1389
1408
  style: T,
1390
1409
  children: "Close"
1391
1410
  }),
1392
- R.status === "COMPLETED" && $ && /* @__PURE__ */ x("button", {
1411
+ R.status === "COMPLETED" && $ && /* @__PURE__ */ S("button", {
1393
1412
  type: "button",
1394
1413
  onClick: () => {
1395
1414
  let e = R;
1396
1415
  z(null), V(e), U("");
1397
1416
  },
1398
- title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1417
+ title: l("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1399
1418
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1400
1419
  style: T,
1401
1420
  children: [
1402
- /* @__PURE__ */ b(_, {
1421
+ /* @__PURE__ */ x(v, {
1403
1422
  size: 14,
1404
1423
  "aria-hidden": "true"
1405
1424
  }),
1406
1425
  " ",
1407
- c("bigconsole.insights.actions.refine", "Refine")
1426
+ l("bigconsole.insights.actions.refine", "Refine")
1408
1427
  ]
1409
1428
  }),
1410
- R.status === "COMPLETED" && s(R).kind === "hold" && /* @__PURE__ */ b("span", {
1429
+ R.status === "COMPLETED" && c(R).kind === "hold" && /* @__PURE__ */ x("span", {
1411
1430
  role: "status",
1412
- children: c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1431
+ children: l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1413
1432
  }),
1414
- R.dashboardId && /* @__PURE__ */ b("button", {
1433
+ R.dashboardId && /* @__PURE__ */ x("button", {
1415
1434
  type: "button",
1416
1435
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1417
1436
  style: T,
1418
- onClick: () => p(`/dashboards/${R.dashboardId}`),
1419
- children: c("bigconsole.insights.actions.viewDashboard", "View dashboard")
1437
+ onClick: () => m(`/dashboards/${R.dashboardId}`),
1438
+ children: l("bigconsole.insights.actions.viewDashboard", "View dashboard")
1420
1439
  }),
1421
- R.status === "COMPLETED" && !R.dashboardId && /* @__PURE__ */ x("button", {
1440
+ R.status === "COMPLETED" && !R.dashboardId && /* @__PURE__ */ S("button", {
1422
1441
  type: "button",
1423
- disabled: s(R).kind !== "create",
1424
- title: s(R).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1442
+ disabled: c(R).kind !== "create",
1443
+ title: c(R).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1425
1444
  onClick: () => {
1426
1445
  let e = R;
1427
- z(null), Q(e);
1446
+ z(null), gt(e);
1428
1447
  },
1429
1448
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1430
1449
  style: E,
1431
1450
  children: [
1432
- c("bigconsole.insights.actions.create", "Create dashboard"),
1451
+ l("bigconsole.insights.actions.create", "Create dashboard"),
1433
1452
  " ",
1434
- /* @__PURE__ */ b(f, {
1453
+ /* @__PURE__ */ x(p, {
1435
1454
  size: 14,
1436
1455
  "aria-hidden": "true"
1437
1456
  })
@@ -1442,10 +1461,10 @@ var P = c(function() {
1442
1461
  ]
1443
1462
  })
1444
1463
  }),
1445
- B && /* @__PURE__ */ b("div", {
1464
+ B && /* @__PURE__ */ x("div", {
1446
1465
  role: "dialog",
1447
1466
  "aria-modal": "true",
1448
- "aria-label": c("bigconsole.insights.refine.ariaLabel", "Refine generation"),
1467
+ "aria-label": l("bigconsole.insights.refine.ariaLabel", "Refine generation"),
1449
1468
  onClick: () => V(null),
1450
1469
  style: {
1451
1470
  position: "fixed",
@@ -1457,7 +1476,7 @@ var P = c(function() {
1457
1476
  justifyContent: "center",
1458
1477
  padding: "var(--space-pagePadding)"
1459
1478
  },
1460
- children: /* @__PURE__ */ x("div", {
1479
+ children: /* @__PURE__ */ S("div", {
1461
1480
  onClick: (e) => e.stopPropagation(),
1462
1481
  style: {
1463
1482
  display: "flex",
@@ -1471,28 +1490,28 @@ var P = c(function() {
1471
1490
  boxShadow: "var(--shadow-elevation-3)"
1472
1491
  },
1473
1492
  children: [
1474
- /* @__PURE__ */ x("div", {
1493
+ /* @__PURE__ */ S("div", {
1475
1494
  style: {
1476
1495
  padding: "var(--space-cardPadding)",
1477
1496
  borderBottom: "1px solid var(--color-border-subtle)"
1478
1497
  },
1479
- children: [/* @__PURE__ */ b("h2", {
1498
+ children: [/* @__PURE__ */ x("h2", {
1480
1499
  style: {
1481
1500
  fontSize: "var(--font-size-heading-h4)",
1482
1501
  fontWeight: "var(--font-weight-semibold)",
1483
1502
  color: "var(--color-text-primary)"
1484
1503
  },
1485
- children: c("bigconsole.insights.refine.heading", "Refine dashboard")
1486
- }), /* @__PURE__ */ b("p", {
1504
+ children: l("bigconsole.insights.refine.heading", "Refine dashboard")
1505
+ }), /* @__PURE__ */ x("p", {
1487
1506
  style: {
1488
1507
  fontSize: "var(--font-size-body-sm)",
1489
1508
  color: "var(--color-text-secondary)",
1490
1509
  marginTop: 2
1491
1510
  },
1492
- children: c("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
1511
+ children: l("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
1493
1512
  })]
1494
1513
  }),
1495
- /* @__PURE__ */ x("div", {
1514
+ /* @__PURE__ */ S("div", {
1496
1515
  style: {
1497
1516
  flex: "1 1 auto",
1498
1517
  minHeight: 0,
@@ -1502,20 +1521,20 @@ var P = c(function() {
1502
1521
  flexDirection: "column",
1503
1522
  gap: "var(--space-controlGap)"
1504
1523
  },
1505
- children: [/* @__PURE__ */ b(r, {
1524
+ children: [/* @__PURE__ */ x(r, {
1506
1525
  emphasis: "muted",
1507
1526
  padding: "compact",
1508
1527
  headingLevel: 3,
1509
1528
  title: B.generatedSpec?.name || "Current proposal",
1510
1529
  description: B.prompt.length > 240 ? `${B.prompt.slice(0, 240)}…` : B.prompt,
1511
- icon: /* @__PURE__ */ b(g, { className: "h-icon-sm w-icon-sm" })
1512
- }), /* @__PURE__ */ x("div", {
1530
+ icon: /* @__PURE__ */ x(_, { className: "h-icon-sm w-icon-sm" })
1531
+ }), /* @__PURE__ */ S("div", {
1513
1532
  style: {
1514
1533
  display: "flex",
1515
1534
  flexDirection: "column",
1516
1535
  gap: "var(--space-controlGap)"
1517
1536
  },
1518
- children: [/* @__PURE__ */ b("label", {
1537
+ children: [/* @__PURE__ */ x("label", {
1519
1538
  htmlFor: "refine-input",
1520
1539
  style: {
1521
1540
  display: "block",
@@ -1524,13 +1543,13 @@ var P = c(function() {
1524
1543
  color: "var(--color-text-primary)"
1525
1544
  },
1526
1545
  children: "What should change?"
1527
- }), /* @__PURE__ */ b("textarea", {
1546
+ }), /* @__PURE__ */ x("textarea", {
1528
1547
  id: "refine-input",
1529
1548
  value: H,
1530
1549
  onChange: (e) => U(e.target.value),
1531
1550
  maxLength: 2e3,
1532
1551
  rows: 4,
1533
- placeholder: c("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
1552
+ placeholder: l("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
1534
1553
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1535
1554
  style: {
1536
1555
  width: "100%",
@@ -1546,7 +1565,7 @@ var P = c(function() {
1546
1565
  })]
1547
1566
  })]
1548
1567
  }),
1549
- /* @__PURE__ */ x("div", {
1568
+ /* @__PURE__ */ S("div", {
1550
1569
  style: {
1551
1570
  display: "flex",
1552
1571
  justifyContent: "flex-end",
@@ -1555,15 +1574,15 @@ var P = c(function() {
1555
1574
  padding: "var(--space-cardPadding)",
1556
1575
  borderTop: "1px solid var(--color-border-subtle)"
1557
1576
  },
1558
- children: [/* @__PURE__ */ b("button", {
1577
+ children: [/* @__PURE__ */ x("button", {
1559
1578
  type: "button",
1560
1579
  onClick: () => V(null),
1561
1580
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1562
1581
  style: T,
1563
- children: c("bigconsole.insights.actions.cancel", "Cancel")
1564
- }), /* @__PURE__ */ x("button", {
1582
+ children: l("bigconsole.insights.actions.cancel", "Cancel")
1583
+ }), /* @__PURE__ */ S("button", {
1565
1584
  type: "button",
1566
- onClick: () => void pt(),
1585
+ onClick: () => void bt(),
1567
1586
  disabled: !H.trim() || L.has(B.id),
1568
1587
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1569
1588
  style: {
@@ -1571,14 +1590,14 @@ var P = c(function() {
1571
1590
  cursor: !H.trim() || L.has(B.id) ? "not-allowed" : "pointer",
1572
1591
  opacity: H.trim() ? 1 : .6
1573
1592
  },
1574
- children: [L.has(B.id) ? /* @__PURE__ */ b(h, {
1593
+ children: [L.has(B.id) ? /* @__PURE__ */ x(g, {
1575
1594
  size: 14,
1576
1595
  className: "animate-spin",
1577
1596
  "aria-hidden": "true"
1578
- }) : /* @__PURE__ */ b(_, {
1597
+ }) : /* @__PURE__ */ x(v, {
1579
1598
  size: 14,
1580
1599
  "aria-hidden": "true"
1581
- }), c("bigconsole.insights.refine.apply", "Apply refinement")]
1600
+ }), l("bigconsole.insights.refine.apply", "Apply refinement")]
1582
1601
  })]
1583
1602
  })
1584
1603
  ]