@actioneer/ads 0.5.5 → 0.5.7

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 (41) hide show
  1. package/components/agent-icon.js +3 -2
  2. package/components/ai-elements/chain-of-thought-icon.d.ts +10 -12
  3. package/components/ai-elements/chain-of-thought-icon.js +341 -201
  4. package/components/ai-elements/chain-of-thought.d.ts +1 -1
  5. package/components/answer-sources.d.ts +42 -0
  6. package/components/answer-sources.js +111 -0
  7. package/components/answer.d.ts +1 -0
  8. package/components/answer.js +665 -671
  9. package/components/assistant-ui/answer-tool-ui.js +11 -7
  10. package/components/assistant-ui/attachment.js +39 -39
  11. package/components/assistant-ui/composer-harness.js +5 -4
  12. package/components/assistant-ui/follow-up-suggestions.d.ts +5 -1
  13. package/components/assistant-ui/follow-up-suggestions.js +47 -19
  14. package/components/assistant-ui/thread-context.d.ts +2 -0
  15. package/components/assistant-ui/thread.js +41 -40
  16. package/components/avatar.js +14 -14
  17. package/components/dropdown.d.ts +1 -1
  18. package/components/dropdown.js +1 -1
  19. package/components/empty-state.d.ts +4 -4
  20. package/components/field.js +16 -16
  21. package/components/index.d.ts +1 -0
  22. package/components/index.js +414 -408
  23. package/components/infinite-canvas.js +1 -1
  24. package/components/pixel-icon.d.ts +3 -1
  25. package/components/pixel-icon.js +294 -214
  26. package/components/segmented.d.ts +4 -1
  27. package/components/segmented.js +9 -8
  28. package/components/sidebar.d.ts +2 -2
  29. package/components/switch.js +22 -4
  30. package/components/table.d.ts +15 -7
  31. package/components/table.js +313 -199
  32. package/components/textarea.js +1 -2
  33. package/components/tooltip.js +1 -1
  34. package/components/ui/tooltip.js +5 -5
  35. package/lib/icons.d.ts +8 -0
  36. package/lib/icons.js +103 -101
  37. package/llms.txt +18 -7
  38. package/manifest.json +125 -13
  39. package/package.json +1 -1
  40. package/styles.css +42 -47
  41. package/theme.css +24 -45
@@ -1,425 +1,427 @@
1
1
  "use client";
2
2
  import { jsxs as n, jsx as t, Fragment as D } from "react/jsx-runtime";
3
- import * as u from "react";
3
+ import * as p from "react";
4
4
  import { cva as H } from "class-variance-authority";
5
- import { z as a } from "zod/v4";
5
+ import { z as e } from "zod/v4";
6
6
  import { Alert as T, AlertTitle as O, AlertDescription as L } from "./alert.js";
7
7
  import { Badge as w } from "./badge.js";
8
8
  import { Button as Ne } from "./button.js";
9
9
  import { CodeBlock as R } from "./code-block.js";
10
10
  import { Popover as we, PopoverTrigger as ve, PopoverContent as ke } from "./popover.js";
11
- import { FollowUpSuggestion as Ae } from "./assistant-ui/follow-up-suggestions.js";
11
+ import { FollowUpQuestion as Ae } from "./assistant-ui/follow-up-suggestions.js";
12
12
  import { Source as je, SourceTitle as Se } from "./assistant-ui/sources.js";
13
13
  import { AreaChart as Ce, BarChart as Re, LineChart as Te } from "./chart.js";
14
14
  import { Progress as Oe } from "./progress.js";
15
- import { Skeleton as p } from "./skeleton.js";
15
+ import { Skeleton as u } from "./skeleton.js";
16
16
  import { Table as Le, TableHeader as ze, TableRow as B, TableColumn as De, TableBody as qe, TableCell as M } from "./table.js";
17
- import { Check as q, Minus as Be, WarningCircle as Ke, Clock as Ee, Database as We } from "../lib/icons.js";
17
+ import { Check as q, Minus as Be, WarningCircle as Ke, Clock as Ee, Database as Fe } from "../lib/icons.js";
18
18
  import { cn as g } from "../lib/cn.js";
19
- const Fe = "render_answer", Pe = "Render the final answer with one curated ADS template. Choose the semantic kind that best matches the answer — data kinds (fact, table, ranking, trend, comparison, breakdown, report), narrative kinds (explanation, knowledge, decision, status), task kinds (confirmation), and situation kinds (clarification, empty, error, refusal) — and provide only validated data; the application owns the layout.", N = a.enum([
19
+ const We = "render_answer", Pe = "Render the final answer with one curated ADS template. Choose the semantic kind that best matches the answer — data kinds (fact, table, ranking, trend, comparison, breakdown, report), narrative kinds (explanation, knowledge, decision, status), task kinds (confirmation), and situation kinds (clarification, empty, error, refusal) — and provide only validated data; the application owns the layout.", N = e.enum([
20
20
  "default",
21
21
  "primary",
22
22
  "success",
23
23
  "warning",
24
24
  "danger",
25
25
  "info"
26
- ]), $e = a.object({
27
- id: a.string().min(1),
28
- label: a.string().min(1),
29
- prompt: a.string().min(1).optional()
30
- }), Ve = a.object({
31
- id: a.string().min(1),
32
- label: a.string().min(1),
33
- description: a.string().optional(),
34
- prompt: a.string().min(1).optional()
35
- }), Me = a.object({
36
- id: a.string().min(1),
37
- label: a.string().min(1),
38
- description: a.string().optional(),
39
- href: a.string().min(1).refine((e) => {
40
- if (e.startsWith("/") || e.startsWith("#")) return !0;
26
+ ]), $e = e.object({
27
+ id: e.string().min(1),
28
+ label: e.string().min(1),
29
+ prompt: e.string().min(1).optional()
30
+ }), Ve = e.object({
31
+ id: e.string().min(1),
32
+ label: e.string().min(1),
33
+ description: e.string().optional(),
34
+ prompt: e.string().min(1).optional()
35
+ }), Me = e.object({
36
+ id: e.string().min(1),
37
+ label: e.string().min(1),
38
+ description: e.string().optional(),
39
+ href: e.string().min(1).refine((a) => {
40
+ if (a.startsWith("/") || a.startsWith("#")) return !0;
41
41
  try {
42
- const l = new URL(e).protocol;
42
+ const l = new URL(a).protocol;
43
43
  return l === "http:" || l === "https:";
44
44
  } catch {
45
45
  return !1;
46
46
  }
47
- }, "Source link must be HTTP(S) or app-relative").optional().describe("Destination opened in a new tab when the source is selected")
48
- }), v = a.object({
49
- label: a.string().optional(),
50
- text: a.string().min(1),
47
+ }, "Source link must be HTTP(S) or app-relative").optional().describe(
48
+ "Fallback destination when the host does not handle source selection in its inspector"
49
+ )
50
+ }), v = e.object({
51
+ label: e.string().optional(),
52
+ text: e.string().min(1),
51
53
  tone: N.optional()
52
- }), _e = a.union([
53
- a.string().min(1),
54
- a.object({
55
- label: a.string().min(1),
56
- query: a.string().optional().describe("The SQL that produced the cited value — shown when opened"),
57
- source: a.string().optional().describe("Connection or table the query ran against"),
58
- rows: a.number().int().nonnegative().optional().describe("Row count the query returned")
54
+ }), _e = e.union([
55
+ e.string().min(1),
56
+ e.object({
57
+ label: e.string().min(1),
58
+ query: e.string().optional().describe("The SQL that produced the cited value — shown when opened"),
59
+ source: e.string().optional().describe("Connection or table the query ran against"),
60
+ rows: e.number().int().nonnegative().optional().describe("Row count the query returned")
59
61
  })
60
- ]), S = a.array(_e).max(6), P = a.object({
61
- label: a.string().min(1),
62
- value: a.string().min(1),
63
- code: a.boolean().optional().describe("Render the value monospace — table paths, filters, identifiers"),
62
+ ]), S = e.array(_e).max(6), P = e.object({
63
+ label: e.string().min(1),
64
+ value: e.string().min(1),
65
+ code: e.boolean().optional().describe("Render the value monospace — table paths, filters, identifiers"),
64
66
  tone: N.optional()
65
- }), Q = a.object({
66
- label: a.string().min(1),
67
- value: a.string().min(1),
68
- change: a.string().optional(),
67
+ }), Q = e.object({
68
+ label: e.string().min(1),
69
+ value: e.string().min(1),
70
+ change: e.string().optional(),
69
71
  tone: N.optional()
70
72
  }), x = {
71
- eyebrow: a.string().optional(),
72
- headline: a.string().min(1),
73
- summary: a.string().optional(),
74
- method: a.string().optional().describe("One-line methodology note — how the number was computed"),
75
- caveats: a.array(a.string().min(1)).max(4).optional().describe("Assumptions, limitations, freshness or partial-period notes"),
76
- followUps: a.array($e).max(3).optional(),
77
- sources: a.array(Me).max(8).optional()
78
- }, _ = a.object({
79
- value: a.string().min(1),
80
- detail: a.string().optional(),
73
+ eyebrow: e.string().optional(),
74
+ headline: e.string().min(1),
75
+ summary: e.string().optional(),
76
+ method: e.string().optional().describe("One-line methodology note — how the number was computed"),
77
+ caveats: e.array(e.string().min(1)).max(4).optional().describe("Assumptions, limitations, freshness or partial-period notes"),
78
+ followUps: e.array($e).max(3).optional(),
79
+ sources: e.array(Me).max(8).optional()
80
+ }, _ = e.object({
81
+ value: e.string().min(1),
82
+ detail: e.string().optional(),
81
83
  tone: N.optional()
82
- }), Ie = a.object({
84
+ }), Ie = e.object({
83
85
  ...x,
84
- kind: a.literal("comparison"),
85
- subjects: a.tuple([
86
- a.object({ label: a.string().min(1), description: a.string().optional() }),
87
- a.object({ label: a.string().min(1), description: a.string().optional() })
86
+ kind: e.literal("comparison"),
87
+ subjects: e.tuple([
88
+ e.object({ label: e.string().min(1), description: e.string().optional() }),
89
+ e.object({ label: e.string().min(1), description: e.string().optional() })
88
90
  ]),
89
- rows: a.array(
90
- a.object({
91
- label: a.string().min(1),
92
- description: a.string().min(1).optional().describe("Methodology, grain, or scope shown beneath the measure"),
93
- values: a.tuple([_, _]),
94
- delta: a.object({
95
- value: a.string().min(1),
91
+ rows: e.array(
92
+ e.object({
93
+ label: e.string().min(1),
94
+ description: e.string().min(1).optional().describe("Methodology, grain, or scope shown beneath the measure"),
95
+ values: e.tuple([_, _]),
96
+ delta: e.object({
97
+ value: e.string().min(1),
96
98
  tone: N.optional()
97
99
  }).optional()
98
100
  })
99
101
  ).min(1).max(8),
100
102
  takeaway: v.optional()
101
- }), K = a.enum([
103
+ }), K = e.enum([
102
104
  "primary",
103
105
  "success",
104
106
  "warning",
105
107
  "danger",
106
108
  "info"
107
- ]), He = a.discriminatedUnion("kind", [
108
- a.object({
109
- kind: a.literal("line"),
110
- value: a.union([a.number(), a.string()]),
111
- axis: a.enum(["x", "y"]).optional(),
112
- label: a.string().optional(),
109
+ ]), He = e.discriminatedUnion("kind", [
110
+ e.object({
111
+ kind: e.literal("line"),
112
+ value: e.union([e.number(), e.string()]),
113
+ axis: e.enum(["x", "y"]).optional(),
114
+ label: e.string().optional(),
113
115
  color: K.optional()
114
116
  }),
115
- a.object({
116
- kind: a.literal("band"),
117
- from: a.union([a.number(), a.string()]),
118
- to: a.union([a.number(), a.string()]),
119
- axis: a.enum(["x", "y"]).optional(),
120
- label: a.string().optional(),
117
+ e.object({
118
+ kind: e.literal("band"),
119
+ from: e.union([e.number(), e.string()]),
120
+ to: e.union([e.number(), e.string()]),
121
+ axis: e.enum(["x", "y"]).optional(),
122
+ label: e.string().optional(),
121
123
  color: K.optional()
122
124
  }),
123
- a.object({
124
- kind: a.literal("point"),
125
- x: a.union([a.number(), a.string()]),
126
- y: a.number(),
127
- label: a.string().min(1),
128
- description: a.string().optional(),
125
+ e.object({
126
+ kind: e.literal("point"),
127
+ x: e.union([e.number(), e.string()]),
128
+ y: e.number(),
129
+ label: e.string().min(1),
130
+ description: e.string().optional(),
129
131
  color: K.optional()
130
132
  })
131
- ]), Qe = a.record(
132
- a.string(),
133
- a.union([a.string(), a.number(), a.null()])
134
- ), Y = a.object({
135
- type: a.enum(["line", "area", "bar"]),
136
- data: a.array(Qe).min(1).max(100),
137
- categoryKey: a.string().min(1),
138
- series: a.array(a.string().min(1)).min(1).max(4),
139
- seriesLabels: a.record(a.string(), a.string()).optional(),
140
- highlight: a.string().optional(),
141
- forecastKeys: a.array(a.string().min(1)).max(2).optional().describe("Series keys drawn dashed as projections (line and area only)"),
142
- unit: a.string().optional(),
143
- annotations: a.array(He).max(8).optional()
144
- }), Ye = a.object({
133
+ ]), Qe = e.record(
134
+ e.string(),
135
+ e.union([e.string(), e.number(), e.null()])
136
+ ), Y = e.object({
137
+ type: e.enum(["line", "area", "bar"]),
138
+ data: e.array(Qe).min(1).max(100),
139
+ categoryKey: e.string().min(1),
140
+ series: e.array(e.string().min(1)).min(1).max(4),
141
+ seriesLabels: e.record(e.string(), e.string()).optional(),
142
+ highlight: e.string().optional(),
143
+ forecastKeys: e.array(e.string().min(1)).max(2).optional().describe("Series keys drawn dashed as projections (line and area only)"),
144
+ unit: e.string().optional(),
145
+ annotations: e.array(He).max(8).optional()
146
+ }), Ye = e.object({
145
147
  ...x,
146
- kind: a.literal("trend"),
147
- metric: a.object({
148
- label: a.string().min(1),
149
- value: a.string().min(1),
150
- change: a.string().optional(),
148
+ kind: e.literal("trend"),
149
+ metric: e.object({
150
+ label: e.string().min(1),
151
+ value: e.string().min(1),
152
+ change: e.string().optional(),
151
153
  tone: N.optional()
152
154
  }).optional(),
153
155
  chart: Y,
154
156
  insight: v.optional()
155
- }), Ge = a.object({
157
+ }), Ge = e.object({
156
158
  ...x,
157
- kind: a.literal("status"),
158
- overall: a.object({
159
- label: a.string().min(1),
160
- value: a.string().min(1),
159
+ kind: e.literal("status"),
160
+ overall: e.object({
161
+ label: e.string().min(1),
162
+ value: e.string().min(1),
161
163
  tone: N.optional()
162
164
  }).optional(),
163
- items: a.array(
164
- a.object({
165
- label: a.string().min(1),
166
- status: a.string().min(1),
167
- detail: a.string().optional(),
168
- meta: a.string().optional(),
165
+ items: e.array(
166
+ e.object({
167
+ label: e.string().min(1),
168
+ status: e.string().min(1),
169
+ detail: e.string().optional(),
170
+ meta: e.string().optional(),
169
171
  tone: N.optional()
170
172
  })
171
173
  ).min(1).max(12),
172
174
  recommendation: v.optional()
173
- }), Xe = a.object({
175
+ }), Xe = e.object({
174
176
  ...x,
175
- kind: a.literal("breakdown"),
176
- total: a.object({ label: a.string().min(1), value: a.string().min(1) }).optional(),
177
- items: a.array(
178
- a.object({
179
- label: a.string().min(1),
180
- value: a.string().min(1),
181
- share: a.number().min(0).max(100),
182
- detail: a.string().optional(),
177
+ kind: e.literal("breakdown"),
178
+ total: e.object({ label: e.string().min(1), value: e.string().min(1) }).optional(),
179
+ items: e.array(
180
+ e.object({
181
+ label: e.string().min(1),
182
+ value: e.string().min(1),
183
+ share: e.number().min(0).max(100),
184
+ detail: e.string().optional(),
183
185
  tone: N.optional()
184
186
  })
185
187
  ).min(1).max(12),
186
188
  insight: v.optional()
187
- }), Je = a.object({
189
+ }), Je = e.object({
188
190
  ...x,
189
- kind: a.literal("explanation"),
190
- sections: a.array(
191
- a.object({
192
- title: a.string().min(1),
193
- body: a.string().optional(),
194
- bullets: a.array(a.string().min(1)).max(5).optional(),
195
- code: a.string().optional().describe("A formula or query illustrating the section"),
196
- codeLanguage: a.string().optional()
191
+ kind: e.literal("explanation"),
192
+ sections: e.array(
193
+ e.object({
194
+ title: e.string().min(1),
195
+ body: e.string().optional(),
196
+ bullets: e.array(e.string().min(1)).max(5).optional(),
197
+ code: e.string().optional().describe("A formula or query illustrating the section"),
198
+ codeLanguage: e.string().optional()
197
199
  })
198
200
  ).min(1).max(6),
199
201
  takeaway: v.optional()
200
- }), Ze = a.object({
202
+ }), Ze = e.object({
201
203
  ...x,
202
- kind: a.literal("narrative"),
203
- lead: a.string().optional().describe("The opening framing paragraph — supports blank-line breaks"),
204
- blocks: a.array(
205
- a.object({
206
- heading: a.string().optional(),
207
- lead: a.string().optional().describe("Bold lead phrase before the body — the finding, the claim"),
208
- body: a.string().min(1).describe("Prose; blank lines (\\n\\n) split into paragraphs"),
209
- bullets: a.array(a.string().min(1)).max(6).optional(),
204
+ kind: e.literal("narrative"),
205
+ lead: e.string().optional().describe("The opening framing paragraph — supports blank-line breaks"),
206
+ blocks: e.array(
207
+ e.object({
208
+ heading: e.string().optional(),
209
+ lead: e.string().optional().describe("Bold lead phrase before the body — the finding, the claim"),
210
+ body: e.string().min(1).describe("Prose; blank lines (\\n\\n) split into paragraphs"),
211
+ bullets: e.array(e.string().min(1)).max(6).optional(),
210
212
  citations: S.optional(),
211
213
  tone: N.optional()
212
214
  })
213
215
  ).min(1).max(10),
214
- takeaways: a.array(
215
- a.object({ lead: a.string().optional(), body: a.string().min(1) })
216
+ takeaways: e.array(
217
+ e.object({ lead: e.string().optional(), body: e.string().min(1) })
216
218
  ).max(6).optional().describe("Key-takeaways tail — bold lead, then elaboration"),
217
219
  bottomLine: v.optional().describe(
218
220
  "The emphasized closing verdict"
219
221
  )
220
- }), Ue = a.object({
222
+ }), Ue = e.object({
221
223
  ...x,
222
- kind: a.literal("fact"),
223
- value: a.object({
224
- label: a.string().min(1),
225
- value: a.string().min(1),
226
- change: a.string().optional(),
227
- asOf: a.string().optional().describe('Freshness qualifier, e.g. "as of Apr 18, latest ingested"'),
224
+ kind: e.literal("fact"),
225
+ value: e.object({
226
+ label: e.string().min(1),
227
+ value: e.string().min(1),
228
+ change: e.string().optional(),
229
+ asOf: e.string().optional().describe('Freshness qualifier, e.g. "as of Apr 18, latest ingested"'),
228
230
  tone: N.optional()
229
231
  }),
230
- facts: a.array(Q).max(6).optional(),
232
+ facts: e.array(Q).max(6).optional(),
231
233
  citations: S.optional(),
232
234
  insight: v.optional()
233
- }), ea = a.union([
234
- a.string(),
235
- a.object({ value: a.string(), tone: N.optional() })
235
+ }), ea = e.union([
236
+ e.string(),
237
+ e.object({ value: e.string(), tone: N.optional() })
236
238
  ]), G = {
237
- columns: a.array(
238
- a.object({
239
- key: a.string().min(1),
240
- label: a.string().min(1),
241
- align: a.enum(["left", "right"]).optional()
239
+ columns: e.array(
240
+ e.object({
241
+ key: e.string().min(1),
242
+ label: e.string().min(1),
243
+ align: e.enum(["left", "right"]).optional()
242
244
  })
243
245
  ).min(2).max(6),
244
- rows: a.array(
245
- a.object({
246
- cells: a.record(a.string(), ea),
247
- emphasis: a.boolean().optional().describe("Bold the row — the winner, the current period")
246
+ rows: e.array(
247
+ e.object({
248
+ cells: e.record(e.string(), ea),
249
+ emphasis: e.boolean().optional().describe("Bold the row — the winner, the current period")
248
250
  })
249
251
  ).min(1).max(12),
250
- totals: a.object({
251
- label: a.string().min(1).optional(),
252
- cells: a.record(a.string(), a.string())
252
+ totals: e.object({
253
+ label: e.string().min(1).optional(),
254
+ cells: e.record(e.string(), e.string())
253
255
  }).optional(),
254
- note: a.string().optional().describe(
256
+ note: e.string().optional().describe(
255
257
  'Footnote under the table — row caps ("showing 10 of 1,000"), provenance, partial periods'
256
258
  ),
257
259
  citations: S.optional()
258
- }, aa = a.object({
260
+ }, aa = e.object({
259
261
  ...x,
260
- kind: a.literal("table"),
262
+ kind: e.literal("table"),
261
263
  ...G,
262
264
  insight: v.optional()
263
- }), ta = a.object({
265
+ }), ta = e.object({
264
266
  ...x,
265
- kind: a.literal("ranking"),
266
- metricLabel: a.string().optional().describe('What the ranked value measures, e.g. "Total fee · EUR"'),
267
- items: a.array(
268
- a.object({
269
- label: a.string().min(1),
270
- value: a.string().min(1),
271
- detail: a.string().optional().describe("Secondary metric, coverage, or an ineligibility reason"),
272
- delta: a.object({
273
- value: a.string().min(1),
267
+ kind: e.literal("ranking"),
268
+ metricLabel: e.string().optional().describe('What the ranked value measures, e.g. "Total fee · EUR"'),
269
+ items: e.array(
270
+ e.object({
271
+ label: e.string().min(1),
272
+ value: e.string().min(1),
273
+ detail: e.string().optional().describe("Secondary metric, coverage, or an ineligibility reason"),
274
+ delta: e.object({
275
+ value: e.string().min(1),
274
276
  tone: N.optional()
275
277
  }).optional(),
276
- highlight: a.boolean().optional().describe("Mark the winner — set on every member of a tie group"),
278
+ highlight: e.boolean().optional().describe("Mark the winner — set on every member of a tie group"),
277
279
  tone: N.optional()
278
280
  })
279
281
  ).min(1).max(10),
280
- tiebreak: a.string().optional().describe("How a tie between highlighted items resolves"),
282
+ tiebreak: e.string().optional().describe("How a tie between highlighted items resolves"),
281
283
  citations: S.optional(),
282
284
  insight: v.optional()
283
- }), na = a.object({
285
+ }), na = e.object({
284
286
  ...x,
285
- kind: a.literal("confirmation"),
286
- outcome: a.object({
287
- label: a.string().min(1).describe('The receipt verdict, e.g. "Deployed"'),
288
- detail: a.string().optional().describe('e.g. "schema version 62"'),
287
+ kind: e.literal("confirmation"),
288
+ outcome: e.object({
289
+ label: e.string().min(1).describe('The receipt verdict, e.g. "Deployed"'),
290
+ detail: e.string().optional().describe('e.g. "schema version 62"'),
289
291
  tone: N.optional()
290
292
  }),
291
- changes: a.array(P).max(8).optional().describe("What was added or configured, as label–value pairs"),
292
- steps: a.array(
293
- a.object({
294
- label: a.string().min(1),
295
- status: a.enum(["done", "pending", "failed", "skipped"]),
296
- detail: a.string().optional()
293
+ changes: e.array(P).max(8).optional().describe("What was added or configured, as label–value pairs"),
294
+ steps: e.array(
295
+ e.object({
296
+ label: e.string().min(1),
297
+ status: e.enum(["done", "pending", "failed", "skipped"]),
298
+ detail: e.string().optional()
297
299
  })
298
300
  ).max(10).optional(),
299
- safety: a.string().optional().describe('The no-side-effects line, e.g. "No existing cubes were modified."'),
300
- next: a.string().optional().describe("Forward behavior or the step the system takes next"),
301
+ safety: e.string().optional().describe('The no-side-effects line, e.g. "No existing cubes were modified."'),
302
+ next: e.string().optional().describe("Forward behavior or the step the system takes next"),
301
303
  warning: v.optional()
302
- }), ra = a.object({
304
+ }), ra = e.object({
303
305
  ...x,
304
- kind: a.literal("clarification"),
305
- findings: a.array(P).max(6).optional().describe("What was already established — the facts that framed the ask"),
306
- question: a.string().min(1),
307
- options: a.array(Ve).min(1).max(4).optional()
308
- }), ia = a.object({
306
+ kind: e.literal("clarification"),
307
+ findings: e.array(P).max(6).optional().describe("What was already established — the facts that framed the ask"),
308
+ question: e.string().min(1),
309
+ options: e.array(Ve).min(1).max(4).optional()
310
+ }), ia = e.object({
309
311
  ...x,
310
- kind: a.literal("empty"),
311
- checks: a.array(
312
- a.object({
313
- label: a.string().min(1),
314
- result: a.string().min(1).describe('e.g. "0 rows"'),
312
+ kind: e.literal("empty"),
313
+ checks: e.array(
314
+ e.object({
315
+ label: e.string().min(1),
316
+ result: e.string().min(1).describe('e.g. "0 rows"'),
315
317
  tone: N.optional()
316
318
  })
317
319
  ).max(8).optional().describe("What was searched, with each probe's outcome — the proof of absence"),
318
- reason: a.string().optional().describe("Why the result is empty — cause hypothesis or table semantics"),
319
- baseline: a.object({ label: a.string().min(1), value: a.string().min(1) }).optional().describe("An adjacent known-good value for calibration"),
320
+ reason: e.string().optional().describe("Why the result is empty — cause hypothesis or table semantics"),
321
+ baseline: e.object({ label: e.string().min(1), value: e.string().min(1) }).optional().describe("An adjacent known-good value for calibration"),
320
322
  citations: S.optional(),
321
323
  alternative: v.optional()
322
- }), la = a.object({
324
+ }), la = e.object({
323
325
  ...x,
324
- kind: a.literal("error"),
325
- failure: a.object({
326
- summary: a.string().min(1),
327
- tally: a.string().optional().describe('Repeat-attempt tally, e.g. "12+ attempts over 7 weeks"'),
328
- detail: a.string().optional().describe("The verbatim error, rendered monospace")
326
+ kind: e.literal("error"),
327
+ failure: e.object({
328
+ summary: e.string().min(1),
329
+ tally: e.string().optional().describe('Repeat-attempt tally, e.g. "12+ attempts over 7 weeks"'),
330
+ detail: e.string().optional().describe("The verbatim error, rendered monospace")
329
331
  }),
330
- attempts: a.array(
331
- a.object({
332
- label: a.string().min(1).describe("What was tried — a path, a query"),
333
- result: a.string().min(1)
332
+ attempts: e.array(
333
+ e.object({
334
+ label: e.string().min(1).describe("What was tried — a path, a query"),
335
+ result: e.string().min(1)
334
336
  })
335
337
  ).max(6).optional(),
336
- resolution: a.array(
337
- a.object({
338
- action: a.string().min(1),
339
- owner: a.enum(["user", "admin", "platform", "agent"]).optional()
338
+ resolution: e.array(
339
+ e.object({
340
+ action: e.string().min(1),
341
+ owner: e.enum(["user", "admin", "platform", "agent"]).optional()
340
342
  })
341
343
  ).max(5).optional(),
342
- preserved: a.object({
343
- label: a.string().optional(),
344
- code: a.string().min(1),
345
- language: a.string().optional()
344
+ preserved: e.object({
345
+ label: e.string().optional(),
346
+ code: e.string().min(1),
347
+ language: e.string().optional()
346
348
  }).optional().describe("Prepared work that survives the failure — ready-to-run SQL, a chart config")
347
- }), sa = a.object({
349
+ }), sa = e.object({
348
350
  ...x,
349
- kind: a.literal("refusal"),
350
- reason: a.string().min(1),
351
- scope: a.string().optional().describe('The role statement, e.g. "read-only data analysis assistant"'),
352
- completed: a.string().optional().describe("The allowed portion that WAS carried out before declining"),
353
- alternatives: a.array(
354
- a.object({
355
- label: a.string().min(1),
356
- description: a.string().optional()
351
+ kind: e.literal("refusal"),
352
+ reason: e.string().min(1),
353
+ scope: e.string().optional().describe('The role statement, e.g. "read-only data analysis assistant"'),
354
+ completed: e.string().optional().describe("The allowed portion that WAS carried out before declining"),
355
+ alternatives: e.array(
356
+ e.object({
357
+ label: e.string().min(1),
358
+ description: e.string().optional()
357
359
  })
358
360
  ).max(4).optional()
359
- }), oa = a.object({
361
+ }), oa = e.object({
360
362
  ...x,
361
- kind: a.literal("knowledge"),
362
- entries: a.array(
363
- a.object({
364
- term: a.string().min(1),
365
- category: a.string().optional().describe('e.g. "Formula", "Field", "Rule"'),
366
- body: a.string().optional(),
367
- formula: a.string().optional(),
368
- items: a.array(P).max(6).optional()
363
+ kind: e.literal("knowledge"),
364
+ entries: e.array(
365
+ e.object({
366
+ term: e.string().min(1),
367
+ category: e.string().optional().describe('e.g. "Formula", "Field", "Rule"'),
368
+ body: e.string().optional(),
369
+ formula: e.string().optional(),
370
+ items: e.array(P).max(6).optional()
369
371
  })
370
372
  ).min(1).max(6),
371
- gaps: a.array(a.string().min(1)).max(5).optional().describe("What the knowledge base does NOT cover"),
372
- compliance: a.string().optional().describe('The constraint honored, e.g. "No SQL was executed."'),
373
+ gaps: e.array(e.string().min(1)).max(5).optional().describe("What the knowledge base does NOT cover"),
374
+ compliance: e.string().optional().describe('The constraint honored, e.g. "No SQL was executed."'),
373
375
  citations: S.optional()
374
- }), da = a.object({
376
+ }), da = e.object({
375
377
  ...x,
376
- kind: a.literal("decision"),
377
- options: a.array(
378
- a.object({
379
- name: a.string().min(1),
380
- tag: a.string().optional().describe('e.g. "Forward-looking", "Requires input"'),
381
- description: a.string().optional(),
382
- pros: a.array(a.string().min(1)).max(5).optional(),
383
- cons: a.array(a.string().min(1)).max(5).optional(),
384
- recommended: a.boolean().optional()
378
+ kind: e.literal("decision"),
379
+ options: e.array(
380
+ e.object({
381
+ name: e.string().min(1),
382
+ tag: e.string().optional().describe('e.g. "Forward-looking", "Requires input"'),
383
+ description: e.string().optional(),
384
+ pros: e.array(e.string().min(1)).max(5).optional(),
385
+ cons: e.array(e.string().min(1)).max(5).optional(),
386
+ recommended: e.boolean().optional()
385
387
  })
386
388
  ).min(2).max(4),
387
- guidance: a.array(a.object({ when: a.string().min(1), choose: a.string().min(1) })).max(5).optional().describe('Goal-to-option mapping — "if you want X, pick Y"')
388
- }), ca = a.discriminatedUnion("type", [
389
- a.object({
390
- type: a.literal("text"),
391
- title: a.string().optional(),
392
- body: a.string().min(1)
389
+ guidance: e.array(e.object({ when: e.string().min(1), choose: e.string().min(1) })).max(5).optional().describe('Goal-to-option mapping — "if you want X, pick Y"')
390
+ }), ca = e.discriminatedUnion("type", [
391
+ e.object({
392
+ type: e.literal("text"),
393
+ title: e.string().optional(),
394
+ body: e.string().min(1)
393
395
  }),
394
- a.object({
395
- type: a.literal("metrics"),
396
- title: a.string().optional(),
397
- items: a.array(Q).min(2).max(4)
396
+ e.object({
397
+ type: e.literal("metrics"),
398
+ title: e.string().optional(),
399
+ items: e.array(Q).min(2).max(4)
398
400
  }),
399
- a.object({
400
- type: a.literal("table"),
401
- title: a.string().optional(),
401
+ e.object({
402
+ type: e.literal("table"),
403
+ title: e.string().optional(),
402
404
  ...G
403
405
  }),
404
- a.object({
405
- type: a.literal("chart"),
406
- title: a.string().optional(),
406
+ e.object({
407
+ type: e.literal("chart"),
408
+ title: e.string().optional(),
407
409
  chart: Y,
408
- note: a.string().optional()
410
+ note: e.string().optional()
409
411
  }),
410
- a.object({
411
- type: a.literal("list"),
412
- title: a.string().optional(),
413
- items: a.array(
414
- a.object({ lead: a.string().optional(), body: a.string().min(1) })
412
+ e.object({
413
+ type: e.literal("list"),
414
+ title: e.string().optional(),
415
+ items: e.array(
416
+ e.object({ lead: e.string().optional(), body: e.string().min(1) })
415
417
  ).min(1).max(6)
416
418
  })
417
- ]), ma = a.object({
419
+ ]), ma = e.object({
418
420
  ...x,
419
- kind: a.literal("report"),
420
- sections: a.array(ca).min(2).max(8),
421
- definitions: a.array(a.object({ term: a.string().min(1), meaning: a.string().min(1) })).max(8).optional()
422
- }), ha = a.discriminatedUnion("kind", [
421
+ kind: e.literal("report"),
422
+ sections: e.array(ca).min(2).max(8),
423
+ definitions: e.array(e.object({ term: e.string().min(1), meaning: e.string().min(1) })).max(8).optional()
424
+ }), ha = e.discriminatedUnion("kind", [
423
425
  Ie,
424
426
  Ye,
425
427
  Ge,
@@ -437,7 +439,7 @@ const Fe = "render_answer", Pe = "Render the final answer with one curated ADS t
437
439
  oa,
438
440
  da,
439
441
  ma
440
- ]), Wa = [
442
+ ]), Fa = [
441
443
  "comparison",
442
444
  "trend",
443
445
  "status",
@@ -455,8 +457,8 @@ const Fe = "render_answer", Pe = "Render the final answer with one curated ADS t
455
457
  "knowledge",
456
458
  "decision",
457
459
  "report"
458
- ], Fa = {
459
- name: Fe,
460
+ ], Wa = {
461
+ name: We,
460
462
  description: Pe,
461
463
  inputSchema: ha
462
464
  }, A = H("font-semibold tabular-nums text-foreground", {
@@ -486,67 +488,71 @@ const Fe = "render_answer", Pe = "Render the final answer with one curated ADS t
486
488
  }), ga = new Intl.NumberFormat("en-US", {
487
489
  notation: "compact",
488
490
  maximumFractionDigits: 1
489
- }), X = (e) => e === "success" || e === "warning" || e === "danger" || e === "info" ? e : "default", ba = (e) => e === "success" || e === "warning" || e === "danger" || e === "info" ? e : "primary", J = u.createContext(void 0);
490
- function f({ spec: e }) {
491
- return /* @__PURE__ */ n("div", { className: "space-y-2", children: [
492
- e.eyebrow && /* @__PURE__ */ t("p", { className: "text-base font-normal text-tertiary", children: e.eyebrow }),
493
- /* @__PURE__ */ t("h2", { className: "max-w-2xl text-xl font-normal leading-tight tracking-tight text-foreground", children: e.headline }),
494
- e.summary && /* @__PURE__ */ t("p", { className: "max-w-2xl text-base leading-6 text-secondary", children: e.summary })
495
- ] });
491
+ }), X = (a) => a === "success" || a === "warning" || a === "danger" || a === "info" ? a : "default", ba = (a) => a === "success" || a === "warning" || a === "danger" || a === "info" ? a : "primary", J = p.createContext(void 0);
492
+ function f({ spec: a }) {
493
+ return (
494
+ // `flex-1 min-w-0` lets the header fill its available width, including in
495
+ // answer kinds that intentionally pair it with a trailing metric.
496
+ /* @__PURE__ */ n("div", { className: "min-w-0 flex-1 space-y-3", children: [
497
+ a.eyebrow && /* @__PURE__ */ t("p", { className: "text-base font-normal text-tertiary", children: a.eyebrow }),
498
+ /* @__PURE__ */ t("h2", { className: "text-xl font-normal leading-tight tracking-tight text-foreground", children: a.headline }),
499
+ a.summary && /* @__PURE__ */ t("p", { className: "text-base leading-6 text-secondary", children: a.summary })
500
+ ] })
501
+ );
496
502
  }
497
- function k({ signal: e }) {
503
+ function k({ signal: a }) {
498
504
  return /* @__PURE__ */ n(
499
505
  T,
500
506
  {
501
- variant: X(e.tone),
507
+ variant: X(a.tone),
502
508
  className: "border border-border bg-card",
503
509
  children: [
504
- /* @__PURE__ */ t(O, { children: e.label ?? "Takeaway" }),
505
- /* @__PURE__ */ t(L, { className: "text-base leading-6", children: e.text })
510
+ /* @__PURE__ */ t(O, { children: a.label ?? "Takeaway" }),
511
+ /* @__PURE__ */ t(L, { className: "text-base leading-6", children: a.text })
506
512
  ]
507
513
  }
508
514
  );
509
515
  }
510
- function F({
511
- text: e,
516
+ function W({
517
+ text: a,
512
518
  lead: l,
513
519
  className: c
514
520
  }) {
515
- const d = e.split(/\n{2,}/).map((m) => m.trim()).filter(Boolean);
516
- return /* @__PURE__ */ t("div", { className: g("space-y-2 text-sm leading-6 text-secondary", c), children: d.map((m, s) => /* @__PURE__ */ n("p", { children: [
517
- s === 0 && l && /* @__PURE__ */ n("span", { className: "font-semibold text-foreground", children: [
521
+ const d = a.split(/\n{2,}/).map((m) => m.trim()).filter(Boolean);
522
+ return /* @__PURE__ */ t("div", { className: g("space-y-2 text-sm leading-6 text-secondary", c), children: d.map((m, o) => /* @__PURE__ */ n("p", { children: [
523
+ o === 0 && l && /* @__PURE__ */ n("span", { className: "font-semibold text-foreground", children: [
518
524
  l,
519
525
  " — "
520
526
  ] }),
521
527
  m
522
- ] }, s)) });
528
+ ] }, o)) });
523
529
  }
524
- const Z = (e) => typeof e == "string" ? { label: e } : e, ua = (e) => e == null ? void 0 : e.split(" · ")[0], E = "inline-flex items-center gap-1 rounded-md px-2 py-0.5 font-mono text-xs tabular-nums", I = "cursor-pointer bg-info-50 text-info-700 outline-none transition-colors hover:bg-info-100 focus-visible:ring-3 focus-visible:ring-info/40 active:scale-(--scale-press)";
525
- function W({ citation: e }) {
526
- const l = ua(e.source);
530
+ const Z = (a) => typeof a == "string" ? { label: a } : a, pa = (a) => a == null ? void 0 : a.split(" · ")[0], E = "inline-flex items-center gap-1 rounded-md px-2 py-0.5 font-mono text-xs tabular-nums", I = "cursor-pointer bg-info-50 text-info-700 outline-none transition-colors hover:bg-info-100 focus-visible:ring-3 focus-visible:ring-info/40 active:scale-(--scale-press)";
531
+ function F({ citation: a }) {
532
+ const l = pa(a.source);
527
533
  return /* @__PURE__ */ n(D, { children: [
528
- /* @__PURE__ */ t(We, { "aria-hidden": !0, className: "size-3 shrink-0 opacity-70" }),
529
- /* @__PURE__ */ t("span", { children: e.label }),
534
+ /* @__PURE__ */ t(Fe, { "aria-hidden": !0, className: "size-3 shrink-0 opacity-70" }),
535
+ /* @__PURE__ */ t("span", { children: a.label }),
530
536
  l && /* @__PURE__ */ n("span", { className: "max-w-[12ch] truncate font-normal opacity-70", children: [
531
537
  "· ",
532
538
  l
533
539
  ] }),
534
- e.rows != null && /* @__PURE__ */ n("span", { className: "font-normal opacity-60", children: [
540
+ a.rows != null && /* @__PURE__ */ n("span", { className: "font-normal opacity-60", children: [
535
541
  "· ",
536
- e.rows.toLocaleString()
542
+ a.rows.toLocaleString()
537
543
  ] })
538
544
  ] });
539
545
  }
540
- function U({ citation: e }) {
541
- const l = u.useContext(J), c = !!(e.query || e.source || e.rows != null);
546
+ function U({ citation: a }) {
547
+ const l = p.useContext(J), c = !!(a.query || a.source || a.rows != null);
542
548
  return l ? /* @__PURE__ */ t(
543
549
  "button",
544
550
  {
545
551
  type: "button",
546
552
  className: g(E, I),
547
- "aria-label": `Inspect the query behind ${e.label}`,
548
- onClick: () => l(e),
549
- children: /* @__PURE__ */ t(W, { citation: e })
553
+ "aria-label": `Inspect the query behind ${a.label}`,
554
+ onClick: () => l(a),
555
+ children: /* @__PURE__ */ t(F, { citation: a })
550
556
  }
551
557
  ) : c ? /* @__PURE__ */ n(we, { children: [
552
558
  /* @__PURE__ */ t(ve, { children: /* @__PURE__ */ t(
@@ -554,8 +560,8 @@ function U({ citation: e }) {
554
560
  {
555
561
  type: "button",
556
562
  className: g(E, I),
557
- "aria-label": `Show the query behind ${e.label}`,
558
- children: /* @__PURE__ */ t(W, { citation: e })
563
+ "aria-label": `Show the query behind ${a.label}`,
564
+ children: /* @__PURE__ */ t(F, { citation: a })
559
565
  }
560
566
  ) }),
561
567
  /* @__PURE__ */ n(
@@ -566,42 +572,42 @@ function U({ citation: e }) {
566
572
  children: [
567
573
  /* @__PURE__ */ n("div", { className: "space-y-1 px-3 pb-2 pt-3", children: [
568
574
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between gap-3", children: [
569
- /* @__PURE__ */ t("span", { className: "font-mono text-xs font-semibold text-foreground", children: e.label }),
570
- e.rows != null && /* @__PURE__ */ n("span", { className: "text-xs tabular-nums text-tertiary", children: [
571
- e.rows.toLocaleString(),
575
+ /* @__PURE__ */ t("span", { className: "font-mono text-xs font-semibold text-foreground", children: a.label }),
576
+ a.rows != null && /* @__PURE__ */ n("span", { className: "text-xs tabular-nums text-tertiary", children: [
577
+ a.rows.toLocaleString(),
572
578
  " ",
573
- e.rows === 1 ? "row" : "rows"
579
+ a.rows === 1 ? "row" : "rows"
574
580
  ] })
575
581
  ] }),
576
- e.source && /* @__PURE__ */ t("p", { className: "text-xs text-tertiary", children: e.source })
582
+ a.source && /* @__PURE__ */ t("p", { className: "text-xs text-tertiary", children: a.source })
577
583
  ] }),
578
- e.query && /* @__PURE__ */ t(
584
+ a.query && /* @__PURE__ */ t(
579
585
  R,
580
586
  {
581
587
  language: "sql",
582
588
  className: "max-h-56 rounded-none",
583
- children: e.query
589
+ children: a.query
584
590
  }
585
591
  )
586
592
  ]
587
593
  }
588
594
  )
589
- ] }) : /* @__PURE__ */ t("span", { className: g(E, "bg-surface text-tertiary"), children: /* @__PURE__ */ t(W, { citation: e }) });
595
+ ] }) : /* @__PURE__ */ t("span", { className: g(E, "bg-surface text-tertiary"), children: /* @__PURE__ */ t(F, { citation: a }) });
590
596
  }
591
597
  function z({
592
- citations: e,
598
+ citations: a,
593
599
  className: l
594
600
  }) {
595
- return e != null && e.length ? /* @__PURE__ */ t("div", { className: g("flex flex-wrap items-center gap-1", l), children: e.map((c, d) => {
601
+ return a != null && a.length ? /* @__PURE__ */ t("div", { className: g("flex flex-wrap items-center gap-1", l), children: a.map((c, d) => {
596
602
  const m = Z(c);
597
603
  return /* @__PURE__ */ t(U, { citation: m }, `${m.label}-${d}`);
598
604
  }) }) : null;
599
605
  }
600
606
  function ee({
601
- items: e,
607
+ items: a,
602
608
  className: l
603
609
  }) {
604
- return /* @__PURE__ */ t("dl", { className: g("rounded-2xl border border-border bg-card px-4 py-2", l), children: e.map((c) => /* @__PURE__ */ n(
610
+ return /* @__PURE__ */ t("dl", { className: g("rounded-2xl border border-border bg-card px-4 py-2", l), children: a.map((c) => /* @__PURE__ */ n(
605
611
  "div",
606
612
  {
607
613
  className: "flex items-baseline justify-between gap-4 py-1.5",
@@ -622,8 +628,8 @@ function ee({
622
628
  c.label
623
629
  )) });
624
630
  }
625
- function pa({ items: e }) {
626
- return /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-2 @lg:grid-cols-3", children: e.map((l) => /* @__PURE__ */ n("div", { className: "rounded-xl border border-border bg-card px-4 py-3", children: [
631
+ function ua({ items: a }) {
632
+ return /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-2 @lg:grid-cols-3", children: a.map((l) => /* @__PURE__ */ n("div", { className: "rounded-xl border border-border bg-card px-4 py-3", children: [
627
633
  /* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: l.label }),
628
634
  /* @__PURE__ */ t(
629
635
  "p",
@@ -639,10 +645,10 @@ function pa({ items: e }) {
639
645
  ] }, l.label)) });
640
646
  }
641
647
  function ae({
642
- table: e,
648
+ table: a,
643
649
  caption: l
644
650
  }) {
645
- const c = (s) => s === void 0 ? void 0 : typeof s == "string" ? s : s.value, d = (s) => s !== void 0 && typeof s == "object" ? s.tone : void 0, m = (s, h, { first: r, emphasis: i }) => s === void 0 || s === "" ? /* @__PURE__ */ t("span", { "aria-label": "Not available", className: "text-tertiary", children: "—" }) : /* @__PURE__ */ t(
651
+ const c = (o) => o === void 0 ? void 0 : typeof o == "string" ? o : o.value, d = (o) => o !== void 0 && typeof o == "object" ? o.tone : void 0, m = (o, h, { first: r, emphasis: i }) => o === void 0 || o === "" ? /* @__PURE__ */ t("span", { "aria-label": "Not available", className: "text-tertiary", children: "—" }) : /* @__PURE__ */ t(
646
652
  "span",
647
653
  {
648
654
  className: g(
@@ -652,22 +658,22 @@ function ae({
652
658
  i && "font-semibold"
653
659
  )
654
660
  ),
655
- children: s
661
+ children: o
656
662
  }
657
663
  );
658
664
  return /* @__PURE__ */ n("div", { className: "space-y-3", children: [
659
665
  /* @__PURE__ */ n(Le, { "aria-label": l, isStatic: !0, children: [
660
- /* @__PURE__ */ t(ze, { children: /* @__PURE__ */ t(B, { children: e.columns.map((s) => /* @__PURE__ */ t(De, { align: s.align, children: s.label }, s.key)) }) }),
666
+ /* @__PURE__ */ t(ze, { children: /* @__PURE__ */ t(B, { children: a.columns.map((o) => /* @__PURE__ */ t(De, { align: o.align, children: o.label }, o.key)) }) }),
661
667
  /* @__PURE__ */ n(qe, { children: [
662
- e.rows.map((s, h) => /* @__PURE__ */ t(B, { children: e.columns.map((r, i) => /* @__PURE__ */ t(M, { align: r.align, children: m(
663
- c(s.cells[r.key]),
664
- d(s.cells[r.key]),
665
- { first: i === 0, emphasis: s.emphasis }
668
+ a.rows.map((o, h) => /* @__PURE__ */ t(B, { children: a.columns.map((r, i) => /* @__PURE__ */ t(M, { align: r.align, children: m(
669
+ c(o.cells[r.key]),
670
+ d(o.cells[r.key]),
671
+ { first: i === 0, emphasis: o.emphasis }
666
672
  ) }, r.key)) }, h)),
667
- e.totals && /* @__PURE__ */ t(B, { children: e.columns.map((s, h) => {
668
- var i, o;
669
- const r = ((i = e.totals) == null ? void 0 : i.cells[s.key]) ?? (h === 0 ? ((o = e.totals) == null ? void 0 : o.label) ?? "Total" : "");
670
- return /* @__PURE__ */ t(M, { align: s.align, children: /* @__PURE__ */ t(
673
+ a.totals && /* @__PURE__ */ t(B, { children: a.columns.map((o, h) => {
674
+ var i, s;
675
+ const r = ((i = a.totals) == null ? void 0 : i.cells[o.key]) ?? (h === 0 ? ((s = a.totals) == null ? void 0 : s.label) ?? "Total" : "");
676
+ return /* @__PURE__ */ t(M, { align: o.align, children: /* @__PURE__ */ t(
671
677
  "span",
672
678
  {
673
679
  className: g(
@@ -676,37 +682,37 @@ function ae({
676
682
  ),
677
683
  children: r
678
684
  }
679
- ) }, s.key);
685
+ ) }, o.key);
680
686
  }) })
681
687
  ] })
682
688
  ] }),
683
- e.note && /* @__PURE__ */ t("p", { className: "text-base leading-6 text-tertiary", children: e.note }),
684
- /* @__PURE__ */ t(z, { citations: e.citations })
689
+ a.note && /* @__PURE__ */ t("p", { className: "text-base leading-6 text-tertiary", children: a.note }),
690
+ /* @__PURE__ */ t(z, { citations: a.citations })
685
691
  ] });
686
692
  }
687
- function te({ chart: e }) {
688
- const l = u.useMemo(
689
- () => e.unit ? (d) => `${ga.format(d)}${e.unit}` : void 0,
690
- [e.unit]
693
+ function te({ chart: a }) {
694
+ const l = p.useMemo(
695
+ () => a.unit ? (d) => `${ga.format(d)}${a.unit}` : void 0,
696
+ [a.unit]
691
697
  ), c = {
692
- data: e.data,
693
- categoryKey: e.categoryKey,
694
- series: e.series,
695
- seriesLabels: e.seriesLabels,
696
- highlight: e.highlight,
697
- annotations: e.annotations,
698
+ data: a.data,
699
+ categoryKey: a.categoryKey,
700
+ series: a.series,
701
+ seriesLabels: a.seriesLabels,
702
+ highlight: a.highlight,
703
+ annotations: a.annotations,
698
704
  formatValue: l,
699
705
  height: 224
700
706
  };
701
- return /* @__PURE__ */ t("div", { className: "rounded-2xl border border-border bg-card px-3 pb-2 pt-4 @md:px-4", children: e.type === "area" ? /* @__PURE__ */ t(Ce, { ...c, forecastKeys: e.forecastKeys }) : e.type === "bar" ? /* @__PURE__ */ t(Re, { ...c }) : /* @__PURE__ */ t(Te, { ...c, forecastKeys: e.forecastKeys }) });
707
+ return /* @__PURE__ */ t("div", { className: "rounded-2xl border border-border bg-card px-3 pb-2 pt-4 @md:px-4", children: a.type === "area" ? /* @__PURE__ */ t(Ce, { ...c, forecastKeys: a.forecastKeys }) : a.type === "bar" ? /* @__PURE__ */ t(Re, { ...c }) : /* @__PURE__ */ t(Te, { ...c, forecastKeys: a.forecastKeys }) });
702
708
  }
703
709
  function y({
704
- spec: e,
710
+ spec: a,
705
711
  citations: l,
706
712
  onFollowUp: c,
707
713
  onSourceSelect: d
708
714
  }) {
709
- const { method: m, caveats: s, followUps: h, sources: r } = e, i = !!(m || s != null && s.length || l != null && l.length || r != null && r.length);
715
+ const { method: m, caveats: o, followUps: h, sources: r } = a, i = !!(m || o != null && o.length || l != null && l.length || r != null && r.length);
710
716
  return !i && !(h != null && h.length) ? null : /* @__PURE__ */ n("div", { className: "space-y-4 pt-1", children: [
711
717
  i && /* @__PURE__ */ n("div", { className: "space-y-3", children: [
712
718
  (m || !!(l != null && l.length)) && /* @__PURE__ */ n("p", { className: "text-base leading-6 text-tertiary", children: [
@@ -715,12 +721,12 @@ function y({
715
721
  " · ",
716
722
  m
717
723
  ] }),
718
- l == null ? void 0 : l.map((o, b) => /* @__PURE__ */ n(u.Fragment, { children: [
724
+ l == null ? void 0 : l.map((s, b) => /* @__PURE__ */ n(p.Fragment, { children: [
719
725
  " ",
720
- /* @__PURE__ */ t(U, { citation: Z(o) })
726
+ /* @__PURE__ */ t(U, { citation: Z(s) })
721
727
  ] }, b))
722
728
  ] }),
723
- !!(s != null && s.length) && /* @__PURE__ */ t("ul", { className: "space-y-1", children: s.map((o) => /* @__PURE__ */ n(
729
+ !!(o != null && o.length) && /* @__PURE__ */ t("ul", { className: "space-y-1", children: o.map((s) => /* @__PURE__ */ n(
724
730
  "li",
725
731
  {
726
732
  className: "flex items-start gap-2 text-base leading-6 text-tertiary",
@@ -732,67 +738,70 @@ function y({
732
738
  className: "mt-2.5 size-1 shrink-0 rounded-dot bg-muted-foreground"
733
739
  }
734
740
  ),
735
- /* @__PURE__ */ t("span", { children: o })
741
+ /* @__PURE__ */ t("span", { children: s })
736
742
  ]
737
743
  },
738
- o
744
+ s
739
745
  )) }),
740
746
  !!(r != null && r.length) && /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-1.5", children: [
741
747
  /* @__PURE__ */ t("span", { className: "mx-0.5 text-xs font-normal text-tertiary", children: "Sources" }),
742
748
  r == null ? void 0 : r.map(
743
- (o) => o.href ? /* @__PURE__ */ n(
749
+ (s) => d ? /* @__PURE__ */ t(
750
+ Ne,
751
+ {
752
+ type: "button",
753
+ size: "xs",
754
+ variant: "ghost",
755
+ title: s.description,
756
+ className: "h-6 rounded-full bg-info-50 px-2 text-info-700 hover:bg-info-100 focus-visible:ring-info/40",
757
+ onClick: () => d(s),
758
+ children: s.label
759
+ },
760
+ s.id
761
+ ) : s.href ? /* @__PURE__ */ n(
744
762
  je,
745
763
  {
746
- href: o.href,
747
- variant: "muted",
764
+ href: s.href,
765
+ variant: "info",
748
766
  size: "sm",
749
- title: o.description,
767
+ title: s.description,
750
768
  className: "h-6 rounded-full px-2",
751
769
  children: [
752
- /* @__PURE__ */ t(Se, { children: o.label }),
770
+ /* @__PURE__ */ t(Se, { children: s.label }),
753
771
  /* @__PURE__ */ t("span", { className: "sr-only", children: " (opens in a new tab)" })
754
772
  ]
755
773
  },
756
- o.id
757
- ) : d ? /* @__PURE__ */ t(
758
- Ne,
759
- {
760
- type: "button",
761
- size: "xs",
762
- variant: "ghost",
763
- title: o.description,
764
- className: "h-6 rounded-full px-2 text-muted-foreground",
765
- onClick: () => d(o),
766
- children: o.label
767
- },
768
- o.id
769
- ) : /* @__PURE__ */ t(w, { variant: "soft", title: o.description, children: o.label }, o.id)
774
+ s.id
775
+ ) : /* @__PURE__ */ t(w, { variant: "soft", title: s.description, children: s.label }, s.id)
770
776
  )
771
777
  ] })
772
778
  ] }),
773
- !!(h != null && h.length) && /* @__PURE__ */ t("div", { className: "flex flex-wrap gap-2", children: h.map((o) => /* @__PURE__ */ t(
774
- Ae,
775
- {
776
- type: "button",
777
- disabled: !c,
778
- onClick: () => c == null ? void 0 : c(o),
779
- children: o.label
780
- },
781
- o.id
782
- )) })
779
+ !!(h != null && h.length) && /* @__PURE__ */ n("div", { className: "space-y-3", children: [
780
+ /* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: "Ask a follow-up" }),
781
+ /* @__PURE__ */ t("div", { className: "flex flex-col gap-2", children: h.map((s) => /* @__PURE__ */ t(
782
+ Ae,
783
+ {
784
+ type: "button",
785
+ disabled: !c,
786
+ onClick: () => c == null ? void 0 : c(s),
787
+ children: s.prompt ?? s.label
788
+ },
789
+ s.id
790
+ )) })
791
+ ] })
783
792
  ] });
784
793
  }
785
- const ne = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => /* @__PURE__ */ n(
794
+ const ne = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
786
795
  "div",
787
796
  {
788
797
  ref: h,
789
- "data-answer-kind": e.kind,
798
+ "data-answer-kind": a.kind,
790
799
  className: g("@container w-full max-w-2xl space-y-5", m),
791
- ...s,
800
+ ...o,
792
801
  children: [
793
- /* @__PURE__ */ t(f, { spec: e }),
802
+ /* @__PURE__ */ t(f, { spec: a }),
794
803
  /* @__PURE__ */ t("div", { className: "overflow-x-auto", children: /* @__PURE__ */ n("table", { className: "w-full min-w-[32rem] border-separate border-spacing-y-1 text-left", children: [
795
- /* @__PURE__ */ t("caption", { className: "sr-only", children: e.headline }),
804
+ /* @__PURE__ */ t("caption", { className: "sr-only", children: a.headline }),
796
805
  /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ n("tr", { children: [
797
806
  /* @__PURE__ */ t(
798
807
  "th",
@@ -802,7 +811,7 @@ const ne = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
802
811
  children: "Measure"
803
812
  }
804
813
  ),
805
- e.subjects.map((r) => /* @__PURE__ */ n(
814
+ a.subjects.map((r) => /* @__PURE__ */ n(
806
815
  "th",
807
816
  {
808
817
  scope: "col",
@@ -817,14 +826,14 @@ const ne = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
817
826
  /* @__PURE__ */ n("th", { scope: "col", className: "px-3 py-2 align-bottom", children: [
818
827
  /* @__PURE__ */ t("span", { className: "block text-sm font-semibold text-foreground", children: "Difference" }),
819
828
  /* @__PURE__ */ n("span", { className: "mt-0.5 block text-xs font-normal text-tertiary", children: [
820
- e.subjects[1].label,
829
+ a.subjects[1].label,
821
830
  " − ",
822
- e.subjects[0].label
831
+ a.subjects[0].label
823
832
  ] })
824
833
  ] })
825
834
  ] }) }),
826
- /* @__PURE__ */ t("tbody", { children: e.rows.map((r) => {
827
- const i = r.values[0].detail === r.values[1].detail ? r.values[0].detail : void 0, o = r.description ?? i;
835
+ /* @__PURE__ */ t("tbody", { children: a.rows.map((r) => {
836
+ const i = r.values[0].detail === r.values[1].detail ? r.values[0].detail : void 0, s = r.description ?? i;
828
837
  return /* @__PURE__ */ n("tr", { className: "[&>*]:bg-surface", children: [
829
838
  /* @__PURE__ */ n(
830
839
  "th",
@@ -833,7 +842,7 @@ const ne = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
833
842
  className: "rounded-l-xl px-3 py-3 align-top text-left",
834
843
  children: [
835
844
  /* @__PURE__ */ t("span", { className: "block text-base font-normal text-secondary", children: r.label }),
836
- o && /* @__PURE__ */ t("span", { className: "mt-0.5 block text-xs font-normal text-tertiary", children: o })
845
+ s && /* @__PURE__ */ t("span", { className: "mt-0.5 block text-xs font-normal text-tertiary", children: s })
837
846
  ]
838
847
  }
839
848
  ),
@@ -852,7 +861,7 @@ const ne = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
852
861
  }
853
862
  )
854
863
  },
855
- `${r.label}-${e.subjects[j].label}`
864
+ `${r.label}-${a.subjects[j].label}`
856
865
  )),
857
866
  /* @__PURE__ */ t("td", { className: "rounded-r-xl px-3 py-3 align-top", children: r.delta ? /* @__PURE__ */ t(
858
867
  "span",
@@ -867,11 +876,11 @@ const ne = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
867
876
  ] }, r.label);
868
877
  }) })
869
878
  ] }) }),
870
- e.takeaway && /* @__PURE__ */ t(k, { signal: e.takeaway }),
879
+ a.takeaway && /* @__PURE__ */ t(k, { signal: a.takeaway }),
871
880
  /* @__PURE__ */ t(
872
881
  y,
873
882
  {
874
- spec: e,
883
+ spec: a,
875
884
  onFollowUp: l,
876
885
  onSourceSelect: d
877
886
  }
@@ -880,38 +889,38 @@ const ne = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
880
889
  }
881
890
  ));
882
891
  ne.displayName = "ComparisonAnswer";
883
- const re = u.forwardRef(
884
- ({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => /* @__PURE__ */ n(
892
+ const re = p.forwardRef(
893
+ ({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
885
894
  "div",
886
895
  {
887
896
  ref: h,
888
- "data-answer-kind": e.kind,
897
+ "data-answer-kind": a.kind,
889
898
  className: g("@container w-full max-w-2xl space-y-5", m),
890
- ...s,
899
+ ...o,
891
900
  children: [
892
901
  /* @__PURE__ */ n("div", { className: "flex flex-col justify-between gap-4 @md:flex-row @md:items-end", children: [
893
- /* @__PURE__ */ t(f, { spec: e }),
894
- e.metric && /* @__PURE__ */ n("div", { className: "shrink-0 rounded-xl border border-border bg-card px-4 py-3 text-left", children: [
895
- /* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: e.metric.label }),
902
+ /* @__PURE__ */ t(f, { spec: a }),
903
+ a.metric && /* @__PURE__ */ n("div", { className: "shrink-0 rounded-xl border border-border bg-card px-4 py-3 text-left", children: [
904
+ /* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: a.metric.label }),
896
905
  /* @__PURE__ */ t(
897
906
  "p",
898
907
  {
899
908
  className: g(
900
- A({ tone: e.metric.tone }),
909
+ A({ tone: a.metric.tone }),
901
910
  "mt-1 text-2xl tracking-tight"
902
911
  ),
903
- children: e.metric.value
912
+ children: a.metric.value
904
913
  }
905
914
  ),
906
- e.metric.change && /* @__PURE__ */ t("p", { className: "mt-0.5 text-xs text-secondary", children: e.metric.change })
915
+ a.metric.change && /* @__PURE__ */ t("p", { className: "mt-0.5 text-xs text-secondary", children: a.metric.change })
907
916
  ] })
908
917
  ] }),
909
- /* @__PURE__ */ t(te, { chart: e.chart }),
910
- e.insight && /* @__PURE__ */ t(k, { signal: e.insight }),
918
+ /* @__PURE__ */ t(te, { chart: a.chart }),
919
+ a.insight && /* @__PURE__ */ t(k, { signal: a.insight }),
911
920
  /* @__PURE__ */ t(
912
921
  y,
913
922
  {
914
- spec: e,
923
+ spec: a,
915
924
  onFollowUp: l,
916
925
  onSourceSelect: d
917
926
  }
@@ -921,32 +930,17 @@ const re = u.forwardRef(
921
930
  )
922
931
  );
923
932
  re.displayName = "TrendAnswer";
924
- const ie = u.forwardRef(
925
- ({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => /* @__PURE__ */ n(
933
+ const ie = p.forwardRef(
934
+ ({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
926
935
  "div",
927
936
  {
928
937
  ref: h,
929
- "data-answer-kind": e.kind,
930
- className: g("@container w-full max-w-2xl space-y-5", m),
931
- ...s,
938
+ "data-answer-kind": a.kind,
939
+ className: g("@container w-full max-w-2xl space-y-6", m),
940
+ ...o,
932
941
  children: [
933
- /* @__PURE__ */ n("div", { className: "flex flex-col justify-between gap-3 @md:flex-row @md:items-start", children: [
934
- /* @__PURE__ */ t(f, { spec: e }),
935
- e.overall && /* @__PURE__ */ n(
936
- w,
937
- {
938
- variant: "soft",
939
- color: e.overall.tone ?? "default",
940
- className: "self-start",
941
- children: [
942
- e.overall.label,
943
- " · ",
944
- e.overall.value
945
- ]
946
- }
947
- )
948
- ] }),
949
- /* @__PURE__ */ t("ul", { className: "space-y-2", children: e.items.map((r) => /* @__PURE__ */ n(
942
+ /* @__PURE__ */ t(f, { spec: a }),
943
+ /* @__PURE__ */ t("div", { className: "space-y-3", children: /* @__PURE__ */ t("ul", { className: "space-y-2", children: a.items.map((r) => /* @__PURE__ */ n(
950
944
  "li",
951
945
  {
952
946
  className: "flex items-start justify-between gap-4 rounded-xl border border-border bg-card px-4 py-3",
@@ -962,12 +956,12 @@ const ie = u.forwardRef(
962
956
  ]
963
957
  },
964
958
  r.label
965
- )) }),
966
- e.recommendation && /* @__PURE__ */ t(k, { signal: e.recommendation }),
959
+ )) }) }),
960
+ a.recommendation && /* @__PURE__ */ t(k, { signal: a.recommendation }),
967
961
  /* @__PURE__ */ t(
968
962
  y,
969
963
  {
970
- spec: e,
964
+ spec: a,
971
965
  onFollowUp: l,
972
966
  onSourceSelect: d
973
967
  }
@@ -977,22 +971,22 @@ const ie = u.forwardRef(
977
971
  )
978
972
  );
979
973
  ie.displayName = "StatusAnswer";
980
- const le = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => /* @__PURE__ */ n(
974
+ const le = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
981
975
  "div",
982
976
  {
983
977
  ref: h,
984
- "data-answer-kind": e.kind,
978
+ "data-answer-kind": a.kind,
985
979
  className: g("@container w-full max-w-2xl space-y-5", m),
986
- ...s,
980
+ ...o,
987
981
  children: [
988
982
  /* @__PURE__ */ n("div", { className: "flex flex-col justify-between gap-3 @md:flex-row @md:items-end", children: [
989
- /* @__PURE__ */ t(f, { spec: e }),
990
- e.total && /* @__PURE__ */ n("div", { className: "shrink-0 @md:text-right", children: [
991
- /* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: e.total.label }),
992
- /* @__PURE__ */ t("p", { className: "mt-1 text-2xl font-semibold tabular-nums tracking-tight text-foreground", children: e.total.value })
983
+ /* @__PURE__ */ t(f, { spec: a }),
984
+ a.total && /* @__PURE__ */ n("div", { className: "shrink-0 @md:text-right", children: [
985
+ /* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: a.total.label }),
986
+ /* @__PURE__ */ t("p", { className: "mt-1 text-2xl font-semibold tabular-nums tracking-tight text-foreground", children: a.total.value })
993
987
  ] })
994
988
  ] }),
995
- /* @__PURE__ */ t("ol", { className: "space-y-2", children: e.items.map((r, i) => /* @__PURE__ */ n("li", { className: "rounded-xl border border-border bg-card px-4 py-3", children: [
989
+ /* @__PURE__ */ t("ol", { className: "space-y-2", children: a.items.map((r, i) => /* @__PURE__ */ n("li", { className: "rounded-xl border border-border bg-card px-4 py-3", children: [
996
990
  /* @__PURE__ */ n("div", { className: "mb-2 flex items-start justify-between gap-4", children: [
997
991
  /* @__PURE__ */ n("div", { className: "flex min-w-0 items-start gap-2.5", children: [
998
992
  /* @__PURE__ */ t(w, { variant: "soft", className: "mt-0.5 tabular-nums", children: i + 1 }),
@@ -1019,11 +1013,11 @@ const le = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
1019
1013
  }
1020
1014
  )
1021
1015
  ] }, r.label)) }),
1022
- e.insight && /* @__PURE__ */ t(k, { signal: e.insight }),
1016
+ a.insight && /* @__PURE__ */ t(k, { signal: a.insight }),
1023
1017
  /* @__PURE__ */ t(
1024
1018
  y,
1025
1019
  {
1026
- spec: e,
1020
+ spec: a,
1027
1021
  onFollowUp: l,
1028
1022
  onSourceSelect: d
1029
1023
  }
@@ -1032,23 +1026,23 @@ const le = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
1032
1026
  }
1033
1027
  ));
1034
1028
  le.displayName = "BreakdownAnswer";
1035
- const se = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => /* @__PURE__ */ n(
1029
+ const se = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
1036
1030
  "div",
1037
1031
  {
1038
1032
  ref: h,
1039
- "data-answer-kind": e.kind,
1033
+ "data-answer-kind": a.kind,
1040
1034
  className: g("@container w-full max-w-2xl space-y-5", m),
1041
- ...s,
1035
+ ...o,
1042
1036
  children: [
1043
- /* @__PURE__ */ t(f, { spec: e }),
1044
- /* @__PURE__ */ t("ol", { className: "space-y-2", children: e.sections.map((r, i) => {
1045
- var o;
1037
+ /* @__PURE__ */ t(f, { spec: a }),
1038
+ /* @__PURE__ */ t("ol", { className: "space-y-2", children: a.sections.map((r, i) => {
1039
+ var s;
1046
1040
  return /* @__PURE__ */ n("li", { className: "flex gap-3 rounded-xl border border-border bg-card px-4 py-3.5", children: [
1047
1041
  /* @__PURE__ */ t(w, { variant: "soft", className: "mt-0.5 h-fit tabular-nums", children: i + 1 }),
1048
1042
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
1049
1043
  /* @__PURE__ */ t("h3", { className: "text-sm font-semibold text-foreground", children: r.title }),
1050
1044
  r.body && /* @__PURE__ */ t("p", { className: "mt-1 text-sm leading-6 text-secondary", children: r.body }),
1051
- !!((o = r.bullets) != null && o.length) && /* @__PURE__ */ t("ul", { className: "mt-2 space-y-1.5", children: r.bullets.map((b) => /* @__PURE__ */ n("li", { className: "flex items-start gap-2 text-xs leading-5 text-secondary", children: [
1045
+ !!((s = r.bullets) != null && s.length) && /* @__PURE__ */ t("ul", { className: "mt-2 space-y-1.5", children: r.bullets.map((b) => /* @__PURE__ */ n("li", { className: "flex items-start gap-2 text-xs leading-5 text-secondary", children: [
1052
1046
  /* @__PURE__ */ t(
1053
1047
  "span",
1054
1048
  {
@@ -1070,11 +1064,11 @@ const se = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
1070
1064
  ] })
1071
1065
  ] }, r.title);
1072
1066
  }) }),
1073
- e.takeaway && /* @__PURE__ */ t(k, { signal: e.takeaway }),
1067
+ a.takeaway && /* @__PURE__ */ t(k, { signal: a.takeaway }),
1074
1068
  /* @__PURE__ */ t(
1075
1069
  y,
1076
1070
  {
1077
- spec: e,
1071
+ spec: a,
1078
1072
  onFollowUp: l,
1079
1073
  onSourceSelect: d
1080
1074
  }
@@ -1083,19 +1077,19 @@ const se = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
1083
1077
  }
1084
1078
  ));
1085
1079
  se.displayName = "ExplanationAnswer";
1086
- const oe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => {
1080
+ const oe = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
1087
1081
  var r;
1088
1082
  return /* @__PURE__ */ n(
1089
1083
  "div",
1090
1084
  {
1091
1085
  ref: h,
1092
- "data-answer-kind": e.kind,
1086
+ "data-answer-kind": a.kind,
1093
1087
  className: g("@container w-full max-w-2xl space-y-5", m),
1094
- ...s,
1088
+ ...o,
1095
1089
  children: [
1096
- /* @__PURE__ */ t(f, { spec: e }),
1097
- e.lead && /* @__PURE__ */ t(F, { text: e.lead, className: "text-base" }),
1098
- /* @__PURE__ */ t("div", { className: "space-y-5", children: e.blocks.map((i, o) => {
1090
+ /* @__PURE__ */ t(f, { spec: a }),
1091
+ a.lead && /* @__PURE__ */ t(W, { text: a.lead, className: "text-base" }),
1092
+ /* @__PURE__ */ t("div", { className: "space-y-5", children: a.blocks.map((i, s) => {
1099
1093
  var b;
1100
1094
  return /* @__PURE__ */ n("div", { className: "space-y-2", children: [
1101
1095
  i.heading && /* @__PURE__ */ t("h3", { className: "text-sm font-semibold text-foreground", children: i.heading }),
@@ -1109,7 +1103,7 @@ const oe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
1109
1103
  /* @__PURE__ */ t(L, { className: "text-base leading-6", children: i.body })
1110
1104
  ]
1111
1105
  }
1112
- ) : /* @__PURE__ */ t(F, { text: i.body, lead: i.lead }),
1106
+ ) : /* @__PURE__ */ t(W, { text: i.body, lead: i.lead }),
1113
1107
  !!((b = i.bullets) != null && b.length) && /* @__PURE__ */ t("ul", { className: "space-y-1.5", children: i.bullets.map((j) => /* @__PURE__ */ n(
1114
1108
  "li",
1115
1109
  {
@@ -1128,11 +1122,11 @@ const oe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
1128
1122
  j
1129
1123
  )) }),
1130
1124
  /* @__PURE__ */ t(z, { citations: i.citations })
1131
- ] }, o);
1125
+ ] }, s);
1132
1126
  }) }),
1133
- !!((r = e.takeaways) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-2 rounded-2xl border border-border bg-card px-4 py-3.5", children: [
1127
+ !!((r = a.takeaways) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-2 rounded-2xl border border-border bg-card px-4 py-3.5", children: [
1134
1128
  /* @__PURE__ */ t("p", { className: "text-xs font-semibold uppercase tracking-wider text-tertiary", children: "Key takeaways" }),
1135
- /* @__PURE__ */ t("ul", { className: "space-y-1.5", children: e.takeaways.map((i, o) => /* @__PURE__ */ n(
1129
+ /* @__PURE__ */ t("ul", { className: "space-y-1.5", children: a.takeaways.map((i, s) => /* @__PURE__ */ n(
1136
1130
  "li",
1137
1131
  {
1138
1132
  className: "flex items-start gap-2 text-sm leading-6 text-secondary",
@@ -1154,14 +1148,14 @@ const oe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
1154
1148
  ] })
1155
1149
  ]
1156
1150
  },
1157
- o
1151
+ s
1158
1152
  )) })
1159
1153
  ] }),
1160
- e.bottomLine && /* @__PURE__ */ t(k, { signal: e.bottomLine }),
1154
+ a.bottomLine && /* @__PURE__ */ t(k, { signal: a.bottomLine }),
1161
1155
  /* @__PURE__ */ t(
1162
1156
  y,
1163
1157
  {
1164
- spec: e,
1158
+ spec: a,
1165
1159
  onFollowUp: l,
1166
1160
  onSourceSelect: d
1167
1161
  }
@@ -1171,53 +1165,53 @@ const oe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
1171
1165
  );
1172
1166
  });
1173
1167
  oe.displayName = "NarrativeAnswer";
1174
- const de = u.forwardRef(
1175
- ({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => {
1168
+ const de = p.forwardRef(
1169
+ ({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
1176
1170
  var i;
1177
- const r = [e.value.change, e.value.asOf].filter(Boolean).join(" · ");
1171
+ const r = [a.value.change, a.value.asOf].filter(Boolean).join(" · ");
1178
1172
  return /* @__PURE__ */ n(
1179
1173
  "div",
1180
1174
  {
1181
1175
  ref: h,
1182
- "data-answer-kind": e.kind,
1176
+ "data-answer-kind": a.kind,
1183
1177
  className: g("@container w-full max-w-2xl space-y-5", m),
1184
- ...s,
1178
+ ...o,
1185
1179
  children: [
1186
- /* @__PURE__ */ t(f, { spec: e }),
1180
+ /* @__PURE__ */ t(f, { spec: a }),
1187
1181
  /* @__PURE__ */ n("div", { className: "rounded-2xl border border-border px-5 py-4", children: [
1188
- /* @__PURE__ */ t("p", { className: "text-base font-normal text-tertiary", children: e.value.label }),
1182
+ /* @__PURE__ */ t("p", { className: "text-base font-normal text-tertiary", children: a.value.label }),
1189
1183
  /* @__PURE__ */ t(
1190
1184
  "p",
1191
1185
  {
1192
1186
  className: g(
1193
- A({ tone: e.value.tone }),
1187
+ A({ tone: a.value.tone }),
1194
1188
  "mt-1 text-3xl font-normal tracking-tight"
1195
1189
  ),
1196
- children: e.value.value
1190
+ children: a.value.value
1197
1191
  }
1198
1192
  ),
1199
1193
  r && /* @__PURE__ */ t("p", { className: "mt-1 text-base text-secondary", children: r }),
1200
- !!((i = e.facts) != null && i.length) && /* @__PURE__ */ t("dl", { className: "mt-4 flex flex-wrap items-baseline gap-x-6 gap-y-1.5 border-t border-border pt-3", children: e.facts.map((o) => /* @__PURE__ */ n("div", { className: "flex items-baseline gap-1.5", children: [
1201
- /* @__PURE__ */ t("dt", { className: "text-xs font-normal text-tertiary", children: o.label }),
1194
+ !!((i = a.facts) != null && i.length) && /* @__PURE__ */ t("dl", { className: "mt-4 flex flex-wrap items-baseline gap-x-6 gap-y-1.5 border-t border-border pt-3", children: a.facts.map((s) => /* @__PURE__ */ n("div", { className: "flex items-baseline gap-1.5", children: [
1195
+ /* @__PURE__ */ t("dt", { className: "text-xs font-normal text-tertiary", children: s.label }),
1202
1196
  /* @__PURE__ */ t(
1203
1197
  "dd",
1204
1198
  {
1205
1199
  className: g(
1206
- A({ tone: o.tone }),
1200
+ A({ tone: s.tone }),
1207
1201
  "text-base font-normal tabular-nums"
1208
1202
  ),
1209
- children: o.value
1203
+ children: s.value
1210
1204
  }
1211
1205
  ),
1212
- o.change && /* @__PURE__ */ t("dd", { className: "text-xs text-secondary", children: o.change })
1213
- ] }, o.label)) })
1206
+ s.change && /* @__PURE__ */ t("dd", { className: "text-xs text-secondary", children: s.change })
1207
+ ] }, s.label)) })
1214
1208
  ] }),
1215
- e.insight && /* @__PURE__ */ t(k, { signal: e.insight }),
1209
+ a.insight && /* @__PURE__ */ t(k, { signal: a.insight }),
1216
1210
  /* @__PURE__ */ t(
1217
1211
  y,
1218
1212
  {
1219
- spec: e,
1220
- citations: e.citations,
1213
+ spec: a,
1214
+ citations: a.citations,
1221
1215
  onFollowUp: l,
1222
1216
  onSourceSelect: d
1223
1217
  }
@@ -1228,22 +1222,22 @@ const de = u.forwardRef(
1228
1222
  }
1229
1223
  );
1230
1224
  de.displayName = "FactAnswer";
1231
- const ce = u.forwardRef(
1232
- ({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => /* @__PURE__ */ n(
1225
+ const ce = p.forwardRef(
1226
+ ({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
1233
1227
  "div",
1234
1228
  {
1235
1229
  ref: h,
1236
- "data-answer-kind": e.kind,
1230
+ "data-answer-kind": a.kind,
1237
1231
  className: g("@container w-full max-w-2xl space-y-5", m),
1238
- ...s,
1232
+ ...o,
1239
1233
  children: [
1240
- /* @__PURE__ */ t(f, { spec: e }),
1241
- /* @__PURE__ */ t(ae, { table: e, caption: e.headline }),
1242
- e.insight && /* @__PURE__ */ t(k, { signal: e.insight }),
1234
+ /* @__PURE__ */ t(f, { spec: a }),
1235
+ /* @__PURE__ */ t(ae, { table: a, caption: a.headline }),
1236
+ a.insight && /* @__PURE__ */ t(k, { signal: a.insight }),
1243
1237
  /* @__PURE__ */ t(
1244
1238
  y,
1245
1239
  {
1246
- spec: e,
1240
+ spec: a,
1247
1241
  onFollowUp: l,
1248
1242
  onSourceSelect: d
1249
1243
  }
@@ -1253,19 +1247,19 @@ const ce = u.forwardRef(
1253
1247
  )
1254
1248
  );
1255
1249
  ce.displayName = "TableAnswer";
1256
- const me = u.forwardRef(
1257
- ({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => /* @__PURE__ */ n(
1250
+ const me = p.forwardRef(
1251
+ ({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => /* @__PURE__ */ n(
1258
1252
  "div",
1259
1253
  {
1260
1254
  ref: h,
1261
- "data-answer-kind": e.kind,
1255
+ "data-answer-kind": a.kind,
1262
1256
  className: g("@container w-full max-w-2xl space-y-5", m),
1263
- ...s,
1257
+ ...o,
1264
1258
  children: [
1265
- /* @__PURE__ */ t(f, { spec: e }),
1259
+ /* @__PURE__ */ t(f, { spec: a }),
1266
1260
  /* @__PURE__ */ n("div", { className: "space-y-3", children: [
1267
- e.metricLabel && /* @__PURE__ */ t("p", { className: "text-base font-normal text-tertiary", children: e.metricLabel }),
1268
- /* @__PURE__ */ t("ol", { className: "space-y-2", children: e.items.map((r, i) => /* @__PURE__ */ n(
1261
+ a.metricLabel && /* @__PURE__ */ t("p", { className: "text-base font-normal text-tertiary", children: a.metricLabel }),
1262
+ /* @__PURE__ */ t("ol", { className: "space-y-2", children: a.items.map((r, i) => /* @__PURE__ */ n(
1269
1263
  "li",
1270
1264
  {
1271
1265
  className: "flex items-start justify-between gap-4 rounded-xl border border-border bg-card px-4 py-3",
@@ -1321,14 +1315,14 @@ const me = u.forwardRef(
1321
1315
  },
1322
1316
  r.label
1323
1317
  )) }),
1324
- e.tiebreak && /* @__PURE__ */ t("p", { className: "text-base leading-6 text-tertiary", children: e.tiebreak }),
1325
- /* @__PURE__ */ t(z, { citations: e.citations })
1318
+ a.tiebreak && /* @__PURE__ */ t("p", { className: "text-base leading-6 text-tertiary", children: a.tiebreak }),
1319
+ /* @__PURE__ */ t(z, { citations: a.citations })
1326
1320
  ] }),
1327
- e.insight && /* @__PURE__ */ t(k, { signal: e.insight }),
1321
+ a.insight && /* @__PURE__ */ t(k, { signal: a.insight }),
1328
1322
  /* @__PURE__ */ t(
1329
1323
  y,
1330
1324
  {
1331
- spec: e,
1325
+ spec: a,
1332
1326
  onFollowUp: l,
1333
1327
  onSourceSelect: d
1334
1328
  }
@@ -1348,71 +1342,71 @@ const xa = {
1348
1342
  pending: "Pending",
1349
1343
  failed: "Failed",
1350
1344
  skipped: "Skipped"
1351
- }, he = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => {
1345
+ }, he = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
1352
1346
  var r, i;
1353
1347
  return /* @__PURE__ */ n(
1354
1348
  "div",
1355
1349
  {
1356
1350
  ref: h,
1357
- "data-answer-kind": e.kind,
1351
+ "data-answer-kind": a.kind,
1358
1352
  className: g("@container w-full max-w-2xl space-y-5", m),
1359
- ...s,
1353
+ ...o,
1360
1354
  children: [
1361
1355
  /* @__PURE__ */ n("div", { className: "flex flex-col justify-between gap-3 @md:flex-row @md:items-start", children: [
1362
- /* @__PURE__ */ t(f, { spec: e }),
1356
+ /* @__PURE__ */ t(f, { spec: a }),
1363
1357
  /* @__PURE__ */ n(
1364
1358
  w,
1365
1359
  {
1366
1360
  variant: "soft",
1367
- color: e.outcome.tone ?? "success",
1361
+ color: a.outcome.tone ?? "success",
1368
1362
  className: "self-start",
1369
1363
  children: [
1370
- e.outcome.label,
1371
- e.outcome.detail && ` · ${e.outcome.detail}`
1364
+ a.outcome.label,
1365
+ a.outcome.detail && ` · ${a.outcome.detail}`
1372
1366
  ]
1373
1367
  }
1374
1368
  )
1375
1369
  ] }),
1376
- !!((r = e.changes) != null && r.length) && /* @__PURE__ */ t(ee, { items: e.changes }),
1377
- !!((i = e.steps) != null && i.length) && /* @__PURE__ */ t("ul", { className: "space-y-2", children: e.steps.map((o) => /* @__PURE__ */ n(
1370
+ !!((r = a.changes) != null && r.length) && /* @__PURE__ */ t(ee, { items: a.changes }),
1371
+ !!((i = a.steps) != null && i.length) && /* @__PURE__ */ t("ul", { className: "space-y-2", children: a.steps.map((s) => /* @__PURE__ */ n(
1378
1372
  "li",
1379
1373
  {
1380
1374
  className: "flex items-start gap-3 rounded-xl border border-border bg-card px-4 py-3",
1381
1375
  children: [
1382
- /* @__PURE__ */ t("span", { className: "mt-0.5 flex size-4 shrink-0 items-center justify-center [&_svg]:size-4", children: xa[o.status] }),
1376
+ /* @__PURE__ */ t("span", { className: "mt-0.5 flex size-4 shrink-0 items-center justify-center [&_svg]:size-4", children: xa[s.status] }),
1383
1377
  /* @__PURE__ */ n("div", { className: "min-w-0", children: [
1384
1378
  /* @__PURE__ */ n(
1385
1379
  "p",
1386
1380
  {
1387
1381
  className: g(
1388
1382
  "text-sm font-normal",
1389
- o.status === "skipped" ? "text-tertiary" : "text-foreground"
1383
+ s.status === "skipped" ? "text-tertiary" : "text-foreground"
1390
1384
  ),
1391
1385
  children: [
1392
- o.label,
1386
+ s.label,
1393
1387
  /* @__PURE__ */ n("span", { className: "sr-only", children: [
1394
1388
  " — ",
1395
- fa[o.status]
1389
+ fa[s.status]
1396
1390
  ] })
1397
1391
  ]
1398
1392
  }
1399
1393
  ),
1400
- o.detail && /* @__PURE__ */ t("p", { className: "mt-0.5 text-xs leading-5 text-secondary", children: o.detail })
1394
+ s.detail && /* @__PURE__ */ t("p", { className: "mt-0.5 text-xs leading-5 text-secondary", children: s.detail })
1401
1395
  ] })
1402
1396
  ]
1403
1397
  },
1404
- o.label
1398
+ s.label
1405
1399
  )) }),
1406
- e.safety && /* @__PURE__ */ n("p", { className: "flex items-center gap-1.5 text-xs text-tertiary", children: [
1400
+ a.safety && /* @__PURE__ */ n("p", { className: "flex items-center gap-1.5 text-xs text-tertiary", children: [
1407
1401
  /* @__PURE__ */ t(q, { "aria-hidden": !0, className: "size-3.5 shrink-0 text-success-700" }),
1408
- e.safety
1402
+ a.safety
1409
1403
  ] }),
1410
- e.next && /* @__PURE__ */ t("p", { className: "text-sm leading-6 text-secondary", children: e.next }),
1411
- e.warning && /* @__PURE__ */ t(k, { signal: e.warning }),
1404
+ a.next && /* @__PURE__ */ t("p", { className: "text-sm leading-6 text-secondary", children: a.next }),
1405
+ a.warning && /* @__PURE__ */ t(k, { signal: a.warning }),
1412
1406
  /* @__PURE__ */ t(
1413
1407
  y,
1414
1408
  {
1415
- spec: e,
1409
+ spec: a,
1416
1410
  onFollowUp: l,
1417
1411
  onSourceSelect: d
1418
1412
  }
@@ -1422,21 +1416,21 @@ const xa = {
1422
1416
  );
1423
1417
  });
1424
1418
  he.displayName = "ConfirmationAnswer";
1425
- const ge = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => {
1426
- var i, o;
1419
+ const ge = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
1420
+ var i, s;
1427
1421
  const r = c ?? l;
1428
1422
  return /* @__PURE__ */ n(
1429
1423
  "div",
1430
1424
  {
1431
1425
  ref: h,
1432
- "data-answer-kind": e.kind,
1426
+ "data-answer-kind": a.kind,
1433
1427
  className: g("@container w-full max-w-2xl space-y-5", m),
1434
- ...s,
1428
+ ...o,
1435
1429
  children: [
1436
- /* @__PURE__ */ t(f, { spec: e }),
1437
- !!((i = e.findings) != null && i.length) && /* @__PURE__ */ t(ee, { items: e.findings }),
1438
- /* @__PURE__ */ t("p", { className: "text-sm font-semibold leading-6 text-foreground", children: e.question }),
1439
- !!((o = e.options) != null && o.length) && /* @__PURE__ */ t("div", { className: "space-y-2", children: e.options.map((b) => /* @__PURE__ */ n(
1430
+ /* @__PURE__ */ t(f, { spec: a }),
1431
+ !!((i = a.findings) != null && i.length) && /* @__PURE__ */ t(ee, { items: a.findings }),
1432
+ /* @__PURE__ */ t("p", { className: "text-sm font-semibold leading-6 text-foreground", children: a.question }),
1433
+ !!((s = a.options) != null && s.length) && /* @__PURE__ */ t("div", { className: "space-y-2", children: a.options.map((b) => /* @__PURE__ */ n(
1440
1434
  "button",
1441
1435
  {
1442
1436
  type: "button",
@@ -1459,7 +1453,7 @@ const ge = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
1459
1453
  /* @__PURE__ */ t(
1460
1454
  y,
1461
1455
  {
1462
- spec: e,
1456
+ spec: a,
1463
1457
  onFollowUp: l,
1464
1458
  onSourceSelect: d
1465
1459
  }
@@ -1469,20 +1463,20 @@ const ge = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
1469
1463
  );
1470
1464
  });
1471
1465
  ge.displayName = "ClarificationAnswer";
1472
- const be = u.forwardRef(
1473
- ({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => {
1466
+ const be = p.forwardRef(
1467
+ ({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
1474
1468
  var r;
1475
1469
  return /* @__PURE__ */ n(
1476
1470
  "div",
1477
1471
  {
1478
1472
  ref: h,
1479
- "data-answer-kind": e.kind,
1473
+ "data-answer-kind": a.kind,
1480
1474
  className: g("@container w-full max-w-2xl space-y-5", m),
1481
- ...s,
1475
+ ...o,
1482
1476
  children: [
1483
- /* @__PURE__ */ t(f, { spec: e }),
1484
- !!((r = e.checks) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
1485
- /* @__PURE__ */ t("ul", { className: "space-y-2", children: e.checks.map((i) => /* @__PURE__ */ n(
1477
+ /* @__PURE__ */ t(f, { spec: a }),
1478
+ !!((r = a.checks) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
1479
+ /* @__PURE__ */ t("ul", { className: "space-y-2", children: a.checks.map((i) => /* @__PURE__ */ n(
1486
1480
  "li",
1487
1481
  {
1488
1482
  className: "flex items-start justify-between gap-4 rounded-xl border border-border bg-card px-4 py-2.5",
@@ -1502,18 +1496,18 @@ const be = u.forwardRef(
1502
1496
  },
1503
1497
  i.label
1504
1498
  )) }),
1505
- /* @__PURE__ */ t(z, { citations: e.citations })
1499
+ /* @__PURE__ */ t(z, { citations: a.citations })
1506
1500
  ] }),
1507
- e.reason && /* @__PURE__ */ t("p", { className: "text-sm leading-6 text-secondary", children: e.reason }),
1508
- e.baseline && /* @__PURE__ */ n("div", { className: "rounded-xl border border-border bg-card px-4 py-3", children: [
1509
- /* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: e.baseline.label }),
1510
- /* @__PURE__ */ t("p", { className: "mt-1 text-lg font-semibold tabular-nums tracking-tight text-foreground", children: e.baseline.value })
1501
+ a.reason && /* @__PURE__ */ t("p", { className: "text-sm leading-6 text-secondary", children: a.reason }),
1502
+ a.baseline && /* @__PURE__ */ n("div", { className: "rounded-xl border border-border bg-card px-4 py-3", children: [
1503
+ /* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: a.baseline.label }),
1504
+ /* @__PURE__ */ t("p", { className: "mt-1 text-lg font-semibold tabular-nums tracking-tight text-foreground", children: a.baseline.value })
1511
1505
  ] }),
1512
- e.alternative && /* @__PURE__ */ t(k, { signal: e.alternative }),
1506
+ a.alternative && /* @__PURE__ */ t(k, { signal: a.alternative }),
1513
1507
  /* @__PURE__ */ t(
1514
1508
  y,
1515
1509
  {
1516
- spec: e,
1510
+ spec: a,
1517
1511
  onFollowUp: l,
1518
1512
  onSourceSelect: d
1519
1513
  }
@@ -1529,64 +1523,64 @@ const ya = {
1529
1523
  admin: "Workspace admin",
1530
1524
  platform: "Platform team",
1531
1525
  agent: "Agent"
1532
- }, ue = u.forwardRef(
1533
- ({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => {
1526
+ }, pe = p.forwardRef(
1527
+ ({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
1534
1528
  var r, i;
1535
1529
  return /* @__PURE__ */ n(
1536
1530
  "div",
1537
1531
  {
1538
1532
  ref: h,
1539
- "data-answer-kind": e.kind,
1533
+ "data-answer-kind": a.kind,
1540
1534
  className: g("@container w-full max-w-2xl space-y-5", m),
1541
- ...s,
1535
+ ...o,
1542
1536
  children: [
1543
- /* @__PURE__ */ t(f, { spec: e }),
1537
+ /* @__PURE__ */ t(f, { spec: a }),
1544
1538
  /* @__PURE__ */ n(T, { variant: "danger", className: "border border-border bg-card", children: [
1545
- /* @__PURE__ */ t(O, { children: e.failure.summary }),
1546
- e.failure.tally && /* @__PURE__ */ t(L, { className: "text-base leading-6", children: e.failure.tally })
1539
+ /* @__PURE__ */ t(O, { children: a.failure.summary }),
1540
+ a.failure.tally && /* @__PURE__ */ t(L, { className: "text-base leading-6", children: a.failure.tally })
1547
1541
  ] }),
1548
- e.failure.detail && /* @__PURE__ */ t(R, { isCopyable: !1, children: e.failure.detail }),
1549
- !!((r = e.attempts) != null && r.length) && /* @__PURE__ */ t("ul", { className: "space-y-2", children: e.attempts.map((o) => /* @__PURE__ */ n(
1542
+ a.failure.detail && /* @__PURE__ */ t(R, { isCopyable: !1, children: a.failure.detail }),
1543
+ !!((r = a.attempts) != null && r.length) && /* @__PURE__ */ t("ul", { className: "space-y-2", children: a.attempts.map((s) => /* @__PURE__ */ n(
1550
1544
  "li",
1551
1545
  {
1552
1546
  className: "flex items-start justify-between gap-4 rounded-xl border border-border bg-card px-4 py-2.5",
1553
1547
  children: [
1554
- /* @__PURE__ */ t("span", { className: "min-w-0 break-all font-mono text-xs leading-5 text-foreground", children: o.label }),
1555
- /* @__PURE__ */ t("span", { className: "shrink-0 text-xs text-danger-700", children: o.result })
1548
+ /* @__PURE__ */ t("span", { className: "min-w-0 break-all font-mono text-xs leading-5 text-foreground", children: s.label }),
1549
+ /* @__PURE__ */ t("span", { className: "shrink-0 text-xs text-danger-700", children: s.result })
1556
1550
  ]
1557
1551
  },
1558
- o.label
1552
+ s.label
1559
1553
  )) }),
1560
- !!((i = e.resolution) != null && i.length) && /* @__PURE__ */ t("ol", { className: "space-y-2", children: e.resolution.map((o, b) => /* @__PURE__ */ n(
1554
+ !!((i = a.resolution) != null && i.length) && /* @__PURE__ */ t("ol", { className: "space-y-2", children: a.resolution.map((s, b) => /* @__PURE__ */ n(
1561
1555
  "li",
1562
1556
  {
1563
1557
  className: "flex items-start justify-between gap-4 rounded-xl border border-border bg-card px-4 py-3",
1564
1558
  children: [
1565
1559
  /* @__PURE__ */ n("div", { className: "flex min-w-0 items-start gap-2.5", children: [
1566
1560
  /* @__PURE__ */ t(w, { variant: "soft", className: "mt-0.5 tabular-nums", children: b + 1 }),
1567
- /* @__PURE__ */ t("p", { className: "text-sm leading-6 text-foreground", children: o.action })
1561
+ /* @__PURE__ */ t("p", { className: "text-sm leading-6 text-foreground", children: s.action })
1568
1562
  ] }),
1569
- o.owner && /* @__PURE__ */ t(w, { variant: "soft", className: "shrink-0", children: ya[o.owner] })
1563
+ s.owner && /* @__PURE__ */ t(w, { variant: "soft", className: "shrink-0", children: ya[s.owner] })
1570
1564
  ]
1571
1565
  },
1572
- o.action
1566
+ s.action
1573
1567
  )) }),
1574
- e.preserved && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
1568
+ a.preserved && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
1575
1569
  /* @__PURE__ */ t("p", { className: "text-xs font-normal text-tertiary", children: "Ready to run once the connection is back" }),
1576
1570
  /* @__PURE__ */ t(
1577
1571
  R,
1578
1572
  {
1579
- language: e.preserved.language,
1580
- filename: e.preserved.label,
1573
+ language: a.preserved.language,
1574
+ filename: a.preserved.label,
1581
1575
  className: "max-h-64",
1582
- children: e.preserved.code
1576
+ children: a.preserved.code
1583
1577
  }
1584
1578
  )
1585
1579
  ] }),
1586
1580
  /* @__PURE__ */ t(
1587
1581
  y,
1588
1582
  {
1589
- spec: e,
1583
+ spec: a,
1590
1584
  onFollowUp: l,
1591
1585
  onSourceSelect: d
1592
1586
  }
@@ -1596,31 +1590,31 @@ const ya = {
1596
1590
  );
1597
1591
  }
1598
1592
  );
1599
- ue.displayName = "ErrorAnswer";
1600
- const pe = u.forwardRef(
1601
- ({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => {
1593
+ pe.displayName = "ErrorAnswer";
1594
+ const ue = p.forwardRef(
1595
+ ({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
1602
1596
  var r;
1603
1597
  return /* @__PURE__ */ n(
1604
1598
  "div",
1605
1599
  {
1606
1600
  ref: h,
1607
- "data-answer-kind": e.kind,
1601
+ "data-answer-kind": a.kind,
1608
1602
  className: g("@container w-full max-w-2xl space-y-5", m),
1609
- ...s,
1603
+ ...o,
1610
1604
  children: [
1611
- /* @__PURE__ */ t(f, { spec: e }),
1612
- e.completed && /* @__PURE__ */ n("p", { className: "flex items-start gap-2 text-sm leading-6 text-secondary", children: [
1605
+ /* @__PURE__ */ t(f, { spec: a }),
1606
+ a.completed && /* @__PURE__ */ n("p", { className: "flex items-start gap-2 text-sm leading-6 text-secondary", children: [
1613
1607
  /* @__PURE__ */ t(q, { "aria-hidden": !0, className: "mt-1 size-4 shrink-0 text-success-700" }),
1614
- /* @__PURE__ */ t("span", { children: e.completed })
1608
+ /* @__PURE__ */ t("span", { children: a.completed })
1615
1609
  ] }),
1616
1610
  /* @__PURE__ */ n(T, { variant: "warning", className: "border border-border bg-card", children: [
1617
1611
  /* @__PURE__ */ t(O, { children: "Declined" }),
1618
- /* @__PURE__ */ t(L, { className: "text-base leading-6", children: e.reason })
1612
+ /* @__PURE__ */ t(L, { className: "text-base leading-6", children: a.reason })
1619
1613
  ] }),
1620
- e.scope && /* @__PURE__ */ t("p", { className: "text-xs leading-5 text-tertiary", children: e.scope }),
1621
- !!((r = e.alternatives) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
1614
+ a.scope && /* @__PURE__ */ t("p", { className: "text-xs leading-5 text-tertiary", children: a.scope }),
1615
+ !!((r = a.alternatives) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
1622
1616
  /* @__PURE__ */ t("p", { className: "text-xs font-semibold uppercase tracking-wider text-tertiary", children: "Available instead" }),
1623
- /* @__PURE__ */ t("ul", { className: "space-y-2", children: e.alternatives.map((i) => /* @__PURE__ */ n(
1617
+ /* @__PURE__ */ t("ul", { className: "space-y-2", children: a.alternatives.map((i) => /* @__PURE__ */ n(
1624
1618
  "li",
1625
1619
  {
1626
1620
  className: "rounded-xl border border-border bg-card px-4 py-3",
@@ -1635,7 +1629,7 @@ const pe = u.forwardRef(
1635
1629
  /* @__PURE__ */ t(
1636
1630
  y,
1637
1631
  {
1638
- spec: e,
1632
+ spec: a,
1639
1633
  onFollowUp: l,
1640
1634
  onSourceSelect: d
1641
1635
  }
@@ -1645,21 +1639,21 @@ const pe = u.forwardRef(
1645
1639
  );
1646
1640
  }
1647
1641
  );
1648
- pe.displayName = "RefusalAnswer";
1649
- const xe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => {
1642
+ ue.displayName = "RefusalAnswer";
1643
+ const xe = p.forwardRef(({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
1650
1644
  var r;
1651
1645
  return /* @__PURE__ */ n(
1652
1646
  "div",
1653
1647
  {
1654
1648
  ref: h,
1655
- "data-answer-kind": e.kind,
1649
+ "data-answer-kind": a.kind,
1656
1650
  className: g("@container w-full max-w-2xl space-y-5", m),
1657
- ...s,
1651
+ ...o,
1658
1652
  children: [
1659
- /* @__PURE__ */ t(f, { spec: e }),
1653
+ /* @__PURE__ */ t(f, { spec: a }),
1660
1654
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
1661
- e.entries.map((i) => {
1662
- var o;
1655
+ a.entries.map((i) => {
1656
+ var s;
1663
1657
  return /* @__PURE__ */ n("div", { className: "rounded-xl border border-border bg-card px-4 py-3.5", children: [
1664
1658
  /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-2", children: [
1665
1659
  /* @__PURE__ */ t("h3", { className: "text-sm font-semibold text-foreground", children: i.term }),
@@ -1667,7 +1661,7 @@ const xe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
1667
1661
  ] }),
1668
1662
  i.body && /* @__PURE__ */ t("p", { className: "mt-1 text-sm leading-6 text-secondary", children: i.body }),
1669
1663
  i.formula && /* @__PURE__ */ t(R, { isCopyable: !1, className: "mt-2", children: i.formula }),
1670
- !!((o = i.items) != null && o.length) && /* @__PURE__ */ t("ul", { className: "mt-2 space-y-1.5", children: i.items.map((b) => /* @__PURE__ */ n(
1664
+ !!((s = i.items) != null && s.length) && /* @__PURE__ */ t("ul", { className: "mt-2 space-y-1.5", children: i.items.map((b) => /* @__PURE__ */ n(
1671
1665
  "li",
1672
1666
  {
1673
1667
  className: "flex items-baseline justify-between gap-4 text-xs leading-5",
@@ -1689,20 +1683,20 @@ const xe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
1689
1683
  )) })
1690
1684
  ] }, i.term);
1691
1685
  }),
1692
- /* @__PURE__ */ t(z, { citations: e.citations })
1686
+ /* @__PURE__ */ t(z, { citations: a.citations })
1693
1687
  ] }),
1694
- !!((r = e.gaps) != null && r.length) && /* @__PURE__ */ n(T, { variant: "warning", className: "border border-border bg-card", children: [
1688
+ !!((r = a.gaps) != null && r.length) && /* @__PURE__ */ n(T, { variant: "warning", className: "border border-border bg-card", children: [
1695
1689
  /* @__PURE__ */ t(O, { children: "Not found" }),
1696
- /* @__PURE__ */ t(L, { className: "text-base leading-6", children: e.gaps.map((i) => /* @__PURE__ */ t("span", { className: "mt-1 block first:mt-0", children: i }, i)) })
1690
+ /* @__PURE__ */ t(L, { className: "text-base leading-6", children: a.gaps.map((i) => /* @__PURE__ */ t("span", { className: "mt-1 block first:mt-0", children: i }, i)) })
1697
1691
  ] }),
1698
- e.compliance && /* @__PURE__ */ n("p", { className: "flex items-center gap-1.5 text-xs text-tertiary", children: [
1692
+ a.compliance && /* @__PURE__ */ n("p", { className: "flex items-center gap-1.5 text-xs text-tertiary", children: [
1699
1693
  /* @__PURE__ */ t(q, { "aria-hidden": !0, className: "size-3.5 shrink-0 text-success-700" }),
1700
- e.compliance
1694
+ a.compliance
1701
1695
  ] }),
1702
1696
  /* @__PURE__ */ t(
1703
1697
  y,
1704
1698
  {
1705
- spec: e,
1699
+ spec: a,
1706
1700
  onFollowUp: l,
1707
1701
  onSourceSelect: d
1708
1702
  }
@@ -1712,20 +1706,20 @@ const xe = u.forwardRef(({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSe
1712
1706
  );
1713
1707
  });
1714
1708
  xe.displayName = "KnowledgeAnswer";
1715
- const fe = u.forwardRef(
1716
- ({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => {
1709
+ const fe = p.forwardRef(
1710
+ ({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
1717
1711
  var r;
1718
1712
  return /* @__PURE__ */ n(
1719
1713
  "div",
1720
1714
  {
1721
1715
  ref: h,
1722
- "data-answer-kind": e.kind,
1716
+ "data-answer-kind": a.kind,
1723
1717
  className: g("@container w-full max-w-2xl space-y-5", m),
1724
- ...s,
1718
+ ...o,
1725
1719
  children: [
1726
- /* @__PURE__ */ t(f, { spec: e }),
1727
- /* @__PURE__ */ t("div", { className: "space-y-2", children: e.options.map((i) => {
1728
- var o, b, j, V;
1720
+ /* @__PURE__ */ t(f, { spec: a }),
1721
+ /* @__PURE__ */ t("div", { className: "space-y-2", children: a.options.map((i) => {
1722
+ var s, b, j, V;
1729
1723
  return /* @__PURE__ */ n("div", { className: "rounded-2xl border border-border bg-card p-4", children: [
1730
1724
  /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-2", children: [
1731
1725
  /* @__PURE__ */ t("h3", { className: "text-sm font-semibold text-foreground", children: i.name }),
@@ -1733,7 +1727,7 @@ const fe = u.forwardRef(
1733
1727
  i.recommended && /* @__PURE__ */ t(w, { variant: "soft", color: "primary", children: "Recommended" })
1734
1728
  ] }),
1735
1729
  i.description && /* @__PURE__ */ t("p", { className: "mt-1 text-sm leading-6 text-secondary", children: i.description }),
1736
- (!!((o = i.pros) != null && o.length) || !!((b = i.cons) != null && b.length)) && /* @__PURE__ */ n("div", { className: "mt-3 grid gap-x-6 gap-y-1.5 @lg:grid-cols-2", children: [
1730
+ (!!((s = i.pros) != null && s.length) || !!((b = i.cons) != null && b.length)) && /* @__PURE__ */ n("div", { className: "mt-3 grid gap-x-6 gap-y-1.5 @lg:grid-cols-2", children: [
1737
1731
  !!((j = i.pros) != null && j.length) && /* @__PURE__ */ t("ul", { className: "space-y-1.5", children: i.pros.map((C) => /* @__PURE__ */ n(
1738
1732
  "li",
1739
1733
  {
@@ -1771,7 +1765,7 @@ const fe = u.forwardRef(
1771
1765
  ] })
1772
1766
  ] }, i.name);
1773
1767
  }) }),
1774
- !!((r = e.guidance) != null && r.length) && /* @__PURE__ */ t("dl", { className: "rounded-2xl border border-border bg-card px-4 py-2", children: e.guidance.map((i) => /* @__PURE__ */ n(
1768
+ !!((r = a.guidance) != null && r.length) && /* @__PURE__ */ t("dl", { className: "rounded-2xl border border-border bg-card px-4 py-2", children: a.guidance.map((i) => /* @__PURE__ */ n(
1775
1769
  "div",
1776
1770
  {
1777
1771
  className: "flex items-baseline justify-between gap-4 py-1.5",
@@ -1785,7 +1779,7 @@ const fe = u.forwardRef(
1785
1779
  /* @__PURE__ */ t(
1786
1780
  y,
1787
1781
  {
1788
- spec: e,
1782
+ spec: a,
1789
1783
  onFollowUp: l,
1790
1784
  onSourceSelect: d
1791
1785
  }
@@ -1796,27 +1790,27 @@ const fe = u.forwardRef(
1796
1790
  }
1797
1791
  );
1798
1792
  fe.displayName = "DecisionAnswer";
1799
- const ye = u.forwardRef(
1800
- ({ spec: e, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...s }, h) => {
1793
+ const ye = p.forwardRef(
1794
+ ({ spec: a, onFollowUp: l, onOptionSelect: c, onSourceSelect: d, className: m, ...o }, h) => {
1801
1795
  var r;
1802
1796
  return /* @__PURE__ */ n(
1803
1797
  "div",
1804
1798
  {
1805
1799
  ref: h,
1806
- "data-answer-kind": e.kind,
1800
+ "data-answer-kind": a.kind,
1807
1801
  className: g("@container w-full max-w-2xl space-y-5", m),
1808
- ...s,
1802
+ ...o,
1809
1803
  children: [
1810
- /* @__PURE__ */ t(f, { spec: e }),
1811
- e.sections.map((i, o) => /* @__PURE__ */ n("section", { className: "space-y-2", children: [
1804
+ /* @__PURE__ */ t(f, { spec: a }),
1805
+ a.sections.map((i, s) => /* @__PURE__ */ n("section", { className: "space-y-2", children: [
1812
1806
  i.title && /* @__PURE__ */ t("h3", { className: "text-sm font-semibold text-foreground", children: i.title }),
1813
- i.type === "text" && /* @__PURE__ */ t(F, { text: i.body }),
1814
- i.type === "metrics" && /* @__PURE__ */ t(pa, { items: i.items }),
1807
+ i.type === "text" && /* @__PURE__ */ t(W, { text: i.body }),
1808
+ i.type === "metrics" && /* @__PURE__ */ t(ua, { items: i.items }),
1815
1809
  i.type === "table" && /* @__PURE__ */ t(
1816
1810
  ae,
1817
1811
  {
1818
1812
  table: i,
1819
- caption: i.title ?? e.headline
1813
+ caption: i.title ?? a.headline
1820
1814
  }
1821
1815
  ),
1822
1816
  i.type === "chart" && /* @__PURE__ */ n(D, { children: [
@@ -1847,10 +1841,10 @@ const ye = u.forwardRef(
1847
1841
  },
1848
1842
  b.body
1849
1843
  )) })
1850
- ] }, o)),
1851
- !!((r = e.definitions) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-1.5 pt-1", children: [
1844
+ ] }, s)),
1845
+ !!((r = a.definitions) != null && r.length) && /* @__PURE__ */ n("div", { className: "space-y-1.5 pt-1", children: [
1852
1846
  /* @__PURE__ */ t("p", { className: "text-xs font-semibold uppercase tracking-wider text-tertiary", children: "Definitions" }),
1853
- /* @__PURE__ */ t("dl", { className: "space-y-1", children: e.definitions.map((i) => /* @__PURE__ */ n("div", { className: "text-xs leading-5", children: [
1847
+ /* @__PURE__ */ t("dl", { className: "space-y-1", children: a.definitions.map((i) => /* @__PURE__ */ n("div", { className: "text-xs leading-5", children: [
1854
1848
  /* @__PURE__ */ t("dt", { className: "inline font-semibold text-secondary", children: i.term }),
1855
1849
  " ",
1856
1850
  /* @__PURE__ */ n("dd", { className: "inline text-tertiary", children: [
@@ -1862,7 +1856,7 @@ const ye = u.forwardRef(
1862
1856
  /* @__PURE__ */ t(
1863
1857
  y,
1864
1858
  {
1865
- spec: e,
1859
+ spec: a,
1866
1860
  onFollowUp: l,
1867
1861
  onSourceSelect: d
1868
1862
  }
@@ -1873,89 +1867,89 @@ const ye = u.forwardRef(
1873
1867
  }
1874
1868
  );
1875
1869
  ye.displayName = "ReportAnswer";
1876
- const Na = u.forwardRef(
1877
- ({ kind: e, className: l, ...c }, d) => {
1878
- const m = e === "trend" ? "chart" : e === "fact" ? "tiles" : e === "table" || e === "comparison" || e === "report" ? "table" : e === "narrative" || e === "explanation" || e === "refusal" ? "prose" : e ? "rows" : "block";
1870
+ const Na = p.forwardRef(
1871
+ ({ kind: a, className: l, ...c }, d) => {
1872
+ const m = a === "trend" ? "chart" : a === "fact" ? "tiles" : a === "table" || a === "comparison" || a === "report" ? "table" : a === "narrative" || a === "explanation" || a === "refusal" ? "prose" : a ? "rows" : "block";
1879
1873
  return /* @__PURE__ */ n(
1880
1874
  "div",
1881
1875
  {
1882
1876
  ref: d,
1883
- "data-answer-kind": e,
1877
+ "data-answer-kind": a,
1884
1878
  "aria-label": "Building answer",
1885
1879
  className: g("w-full max-w-2xl space-y-4", l),
1886
1880
  ...c,
1887
1881
  children: [
1888
1882
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
1889
- /* @__PURE__ */ t(p, { className: "h-3 w-24" }),
1890
- /* @__PURE__ */ t(p, { className: "h-7 w-4/5" }),
1891
- /* @__PURE__ */ t(p, { className: "h-4 w-full" })
1883
+ /* @__PURE__ */ t(u, { className: "h-3 w-24" }),
1884
+ /* @__PURE__ */ t(u, { className: "h-7 w-4/5" }),
1885
+ /* @__PURE__ */ t(u, { className: "h-4 w-full" })
1892
1886
  ] }),
1893
- m === "chart" && /* @__PURE__ */ t(p, { className: "h-56 w-full rounded-2xl" }),
1887
+ m === "chart" && /* @__PURE__ */ t(u, { className: "h-56 w-full rounded-2xl" }),
1894
1888
  m === "tiles" && /* @__PURE__ */ n(D, { children: [
1895
- /* @__PURE__ */ t(p, { className: "h-24 w-full rounded-2xl" }),
1889
+ /* @__PURE__ */ t(u, { className: "h-24 w-full rounded-2xl" }),
1896
1890
  /* @__PURE__ */ n("div", { className: "grid grid-cols-2 gap-2", children: [
1897
- /* @__PURE__ */ t(p, { className: "h-16 rounded-xl" }),
1898
- /* @__PURE__ */ t(p, { className: "h-16 rounded-xl" })
1891
+ /* @__PURE__ */ t(u, { className: "h-16 rounded-xl" }),
1892
+ /* @__PURE__ */ t(u, { className: "h-16 rounded-xl" })
1899
1893
  ] })
1900
1894
  ] }),
1901
- m === "table" && /* @__PURE__ */ t(p, { className: "h-48 w-full rounded-2xl" }),
1895
+ m === "table" && /* @__PURE__ */ t(u, { className: "h-48 w-full rounded-2xl" }),
1902
1896
  m === "rows" && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
1903
- /* @__PURE__ */ t(p, { className: "h-12 w-full rounded-xl" }),
1904
- /* @__PURE__ */ t(p, { className: "h-12 w-full rounded-xl" }),
1905
- /* @__PURE__ */ t(p, { className: "h-12 w-full rounded-xl" })
1897
+ /* @__PURE__ */ t(u, { className: "h-12 w-full rounded-xl" }),
1898
+ /* @__PURE__ */ t(u, { className: "h-12 w-full rounded-xl" }),
1899
+ /* @__PURE__ */ t(u, { className: "h-12 w-full rounded-xl" })
1906
1900
  ] }),
1907
1901
  m === "prose" && /* @__PURE__ */ n("div", { className: "space-y-2", children: [
1908
- /* @__PURE__ */ t(p, { className: "h-4 w-full" }),
1909
- /* @__PURE__ */ t(p, { className: "h-4 w-full" }),
1910
- /* @__PURE__ */ t(p, { className: "h-4 w-11/12" }),
1911
- /* @__PURE__ */ t(p, { className: "h-4 w-full" }),
1912
- /* @__PURE__ */ t(p, { className: "h-4 w-4/5" })
1902
+ /* @__PURE__ */ t(u, { className: "h-4 w-full" }),
1903
+ /* @__PURE__ */ t(u, { className: "h-4 w-full" }),
1904
+ /* @__PURE__ */ t(u, { className: "h-4 w-11/12" }),
1905
+ /* @__PURE__ */ t(u, { className: "h-4 w-full" }),
1906
+ /* @__PURE__ */ t(u, { className: "h-4 w-4/5" })
1913
1907
  ] }),
1914
- m === "block" && /* @__PURE__ */ t(p, { className: "h-48 w-full rounded-2xl" })
1908
+ m === "block" && /* @__PURE__ */ t(u, { className: "h-48 w-full rounded-2xl" })
1915
1909
  ]
1916
1910
  }
1917
1911
  );
1918
1912
  }
1919
1913
  );
1920
1914
  Na.displayName = "AnswerSkeleton";
1921
- const wa = u.forwardRef(
1922
- ({ spec: e, onCitationSelect: l, ...c }, d) => {
1915
+ const wa = p.forwardRef(
1916
+ ({ spec: a, onCitationSelect: l, ...c }, d) => {
1923
1917
  const m = (() => {
1924
- switch (e.kind) {
1918
+ switch (a.kind) {
1925
1919
  case "comparison":
1926
- return /* @__PURE__ */ t(ne, { ref: d, spec: e, ...c });
1920
+ return /* @__PURE__ */ t(ne, { ref: d, spec: a, ...c });
1927
1921
  case "trend":
1928
- return /* @__PURE__ */ t(re, { ref: d, spec: e, ...c });
1922
+ return /* @__PURE__ */ t(re, { ref: d, spec: a, ...c });
1929
1923
  case "status":
1930
- return /* @__PURE__ */ t(ie, { ref: d, spec: e, ...c });
1924
+ return /* @__PURE__ */ t(ie, { ref: d, spec: a, ...c });
1931
1925
  case "breakdown":
1932
- return /* @__PURE__ */ t(le, { ref: d, spec: e, ...c });
1926
+ return /* @__PURE__ */ t(le, { ref: d, spec: a, ...c });
1933
1927
  case "explanation":
1934
- return /* @__PURE__ */ t(se, { ref: d, spec: e, ...c });
1928
+ return /* @__PURE__ */ t(se, { ref: d, spec: a, ...c });
1935
1929
  case "narrative":
1936
- return /* @__PURE__ */ t(oe, { ref: d, spec: e, ...c });
1930
+ return /* @__PURE__ */ t(oe, { ref: d, spec: a, ...c });
1937
1931
  case "fact":
1938
- return /* @__PURE__ */ t(de, { ref: d, spec: e, ...c });
1932
+ return /* @__PURE__ */ t(de, { ref: d, spec: a, ...c });
1939
1933
  case "table":
1940
- return /* @__PURE__ */ t(ce, { ref: d, spec: e, ...c });
1934
+ return /* @__PURE__ */ t(ce, { ref: d, spec: a, ...c });
1941
1935
  case "ranking":
1942
- return /* @__PURE__ */ t(me, { ref: d, spec: e, ...c });
1936
+ return /* @__PURE__ */ t(me, { ref: d, spec: a, ...c });
1943
1937
  case "confirmation":
1944
- return /* @__PURE__ */ t(he, { ref: d, spec: e, ...c });
1938
+ return /* @__PURE__ */ t(he, { ref: d, spec: a, ...c });
1945
1939
  case "clarification":
1946
- return /* @__PURE__ */ t(ge, { ref: d, spec: e, ...c });
1940
+ return /* @__PURE__ */ t(ge, { ref: d, spec: a, ...c });
1947
1941
  case "empty":
1948
- return /* @__PURE__ */ t(be, { ref: d, spec: e, ...c });
1942
+ return /* @__PURE__ */ t(be, { ref: d, spec: a, ...c });
1949
1943
  case "error":
1950
- return /* @__PURE__ */ t(ue, { ref: d, spec: e, ...c });
1944
+ return /* @__PURE__ */ t(pe, { ref: d, spec: a, ...c });
1951
1945
  case "refusal":
1952
- return /* @__PURE__ */ t(pe, { ref: d, spec: e, ...c });
1946
+ return /* @__PURE__ */ t(ue, { ref: d, spec: a, ...c });
1953
1947
  case "knowledge":
1954
- return /* @__PURE__ */ t(xe, { ref: d, spec: e, ...c });
1948
+ return /* @__PURE__ */ t(xe, { ref: d, spec: a, ...c });
1955
1949
  case "decision":
1956
- return /* @__PURE__ */ t(fe, { ref: d, spec: e, ...c });
1950
+ return /* @__PURE__ */ t(fe, { ref: d, spec: a, ...c });
1957
1951
  case "report":
1958
- return /* @__PURE__ */ t(ye, { ref: d, spec: e, ...c });
1952
+ return /* @__PURE__ */ t(ye, { ref: d, spec: a, ...c });
1959
1953
  }
1960
1954
  })();
1961
1955
  return /* @__PURE__ */ t(J.Provider, { value: l, children: m });
@@ -1963,9 +1957,9 @@ const wa = u.forwardRef(
1963
1957
  );
1964
1958
  wa.displayName = "AnswerRenderer";
1965
1959
  export {
1966
- Wa as ANSWER_KINDS,
1960
+ Fa as ANSWER_KINDS,
1967
1961
  Pe as ANSWER_TOOL_DESCRIPTION,
1968
- Fe as ANSWER_TOOL_NAME,
1962
+ We as ANSWER_TOOL_NAME,
1969
1963
  Y as AnswerChartSchema,
1970
1964
  _e as AnswerCitationSchema,
1971
1965
  S as AnswerCitationsSchema,
@@ -1991,7 +1985,7 @@ export {
1991
1985
  da as DecisionAnswerSchema,
1992
1986
  be as EmptyAnswer,
1993
1987
  ia as EmptyAnswerSchema,
1994
- ue as ErrorAnswer,
1988
+ pe as ErrorAnswer,
1995
1989
  la as ErrorAnswerSchema,
1996
1990
  se as ExplanationAnswer,
1997
1991
  Je as ExplanationAnswerSchema,
@@ -2003,7 +1997,7 @@ export {
2003
1997
  Ze as NarrativeAnswerSchema,
2004
1998
  me as RankingAnswer,
2005
1999
  ta as RankingAnswerSchema,
2006
- pe as RefusalAnswer,
2000
+ ue as RefusalAnswer,
2007
2001
  sa as RefusalAnswerSchema,
2008
2002
  ye as ReportAnswer,
2009
2003
  ma as ReportAnswerSchema,
@@ -2013,5 +2007,5 @@ export {
2013
2007
  aa as TableAnswerSchema,
2014
2008
  re as TrendAnswer,
2015
2009
  Ye as TrendAnswerSchema,
2016
- Fa as answerTool
2010
+ Wa as answerTool
2017
2011
  };