juneau 0.14.1 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,59 +1,59 @@
1
- import { useState as E, useRef as W, useEffect as oe, useCallback as S, useMemo as fe, useContext as ce, createContext as ge } from "react";
2
- import { jsx as n, jsxs as h, Fragment as _e } from "react/jsx-runtime";
3
- import je from "react-markdown";
4
- import Se from "remark-gfm";
5
- function Ae(e) {
6
- return e.map((t) => t.role !== "assistant" || t.parts.some((a) => a.type === "text") ? t : { ...t, parts: [{ type: "text", text: "" }] });
1
+ import { useState as W, useRef as U, useEffect as ce, useCallback as z, useMemo as _e, useContext as le, createContext as be } from "react";
2
+ import { jsx as a, jsxs as m, Fragment as ve } from "react/jsx-runtime";
3
+ import Ae from "react-markdown";
4
+ import ze from "remark-gfm";
5
+ function Me(e) {
6
+ return e.map((t) => t.role !== "assistant" || t.parts.some((n) => n.type === "text") ? t : { ...t, parts: [{ type: "text", text: "" }] });
7
7
  }
8
- const g = (e) => new Promise((t) => setTimeout(t, e));
9
- function ze(e) {
8
+ const _ = (e) => new Promise((t) => setTimeout(t, e));
9
+ function Ie(e) {
10
10
  return e.parts.filter((t) => t.type === "text").map((t) => t.text).join("");
11
11
  }
12
- async function ue(e, t, a) {
12
+ async function pe(e, t, n) {
13
13
  for await (const r of e)
14
- if (a?.aborted || (t(r), r.type === "done" || r.type === "error")) break;
14
+ if (n?.aborted || (t(r), r.type === "done" || r.type === "error")) break;
15
15
  }
16
- function be(e) {
16
+ function we(e) {
17
17
  return e.type === "proposal";
18
18
  }
19
- function nn(e) {
19
+ function cn(e) {
20
20
  return e.type === "chart" && Array.isArray(e.series);
21
21
  }
22
- const Me = 1;
23
- function sn(e) {
22
+ const Te = 1;
23
+ function ln(e) {
24
24
  return e.map((t) => ({
25
25
  ...t,
26
- v: Me,
26
+ v: Te,
27
27
  createdAt: t.createdAt.toISOString(),
28
- parts: t.parts.filter((a) => !(a.type === "activity" && a.status === "running")).map(Te)
28
+ parts: t.parts.filter((n) => !(n.type === "activity" && n.status === "running")).map(Le)
29
29
  }));
30
30
  }
31
- function Te(e) {
32
- return be(e) && !e.proposal.resolved ? { ...e, proposal: { ...e.proposal, resolved: "expired" } } : e;
31
+ function Le(e) {
32
+ return we(e) && !e.proposal.resolved ? { ...e, proposal: { ...e.proposal, resolved: "expired" } } : e;
33
33
  }
34
- function rn(e) {
35
- return e.map(({ v: t, ...a }) => ({
36
- ...a,
37
- createdAt: new Date(a.createdAt)
34
+ function dn(e) {
35
+ return e.map(({ v: t, ...n }) => ({
36
+ ...n,
37
+ createdAt: new Date(n.createdAt)
38
38
  }));
39
39
  }
40
- function Ie(e, t) {
40
+ function Be(e, t) {
41
41
  if (t <= 0 || e.length <= t) return e;
42
- let a = e.length - t;
43
- for (; a < e.length && e[a].role === "assistant"; )
44
- a++;
45
- return e.slice(a);
42
+ let n = e.length - t;
43
+ for (; n < e.length && e[n].role === "assistant"; )
44
+ n++;
45
+ return e.slice(n);
46
46
  }
47
- function on(e, t) {
48
- return t <= 0 || e.length <= t ? [...e].sort(pe) : [...e].sort(pe).slice(0, t);
47
+ function un(e, t) {
48
+ return t <= 0 || e.length <= t ? [...e].sort(ye) : [...e].sort(ye).slice(0, t);
49
49
  }
50
- const pe = (e, t) => t.updatedAt.getTime() - e.updatedAt.getTime(), cn = {
50
+ const ye = (e, t) => t.updatedAt.getTime() - e.updatedAt.getTime(), pn = {
51
51
  async *sendMessage(e) {
52
- const t = [...e.messages].reverse().find((r) => r.role === "user"), a = t ? ze(t).toLowerCase() : "";
53
- a.includes("activity") || a.includes("progress") || a.includes("document") || a.includes("dokument") ? yield* Le() : a.includes("table") || a.includes("data") || a.includes("list") || a.includes("show") ? yield* Be() : a.includes("proposal") || a.includes("suggest") || a.includes("recommend") ? yield* Pe() : a.includes("entity") || a.includes("card") || a.includes("detail") || a.includes("find") ? yield* $e() : a.includes("help") || a.includes("what can") || a.includes("how do") ? yield* De() : a.includes("error") || a.includes("fail") || a.includes("break") ? yield* Re() : yield* Ee(a);
52
+ const t = [...e.messages].reverse().find((r) => r.role === "user"), n = t ? Ie(t).toLowerCase() : "";
53
+ n.includes("activity") || n.includes("progress") || n.includes("document") || n.includes("dokument") ? yield* $e() : n.includes("table") || n.includes("data") || n.includes("list") || n.includes("show") ? yield* Pe() : n.includes("proposal") || n.includes("suggest") || n.includes("recommend") ? yield* De() : n.includes("entity") || n.includes("card") || n.includes("detail") || n.includes("find") ? yield* Re() : n.includes("help") || n.includes("what can") || n.includes("how do") ? yield* Ee() : n.includes("error") || n.includes("fail") || n.includes("break") ? yield* He() : yield* Ve(n);
54
54
  }
55
55
  };
56
- async function* Le() {
56
+ async function* $e() {
57
57
  yield {
58
58
  type: "part",
59
59
  part: {
@@ -63,7 +63,7 @@ async function* Le() {
63
63
  description: "Looking for the best skill for this request.",
64
64
  status: "running"
65
65
  }
66
- }, await g(700), yield {
66
+ }, await _(700), yield {
67
67
  type: "part",
68
68
  part: {
69
69
  type: "activity",
@@ -72,7 +72,7 @@ async function* Le() {
72
72
  description: "Using Document Search.",
73
73
  status: "done"
74
74
  }
75
- }, await g(300), yield {
75
+ }, await _(300), yield {
76
76
  type: "part",
77
77
  part: {
78
78
  type: "activity",
@@ -81,7 +81,7 @@ async function* Le() {
81
81
  description: "Looking up document by ID.",
82
82
  status: "running"
83
83
  }
84
- }, await g(900), yield {
84
+ }, await _(900), yield {
85
85
  type: "part",
86
86
  part: {
87
87
  type: "activity",
@@ -90,13 +90,13 @@ async function* Le() {
90
90
  description: "Found document INV-2024-0894.",
91
91
  status: "done"
92
92
  }
93
- }, await g(300), yield* x(`
93
+ }, await _(300), yield* x(`
94
94
  Found document **INV-2024-0894** from **DataSys a.s.** for **CZK 390 000**.`, 25), yield { type: "done" };
95
95
  }
96
- async function* Be() {
96
+ async function* Pe() {
97
97
  yield* x(`Here is a summary of the data you requested:
98
98
 
99
- `, 30), await g(400), yield {
99
+ `, 30), await _(400), yield {
100
100
  type: "part",
101
101
  part: {
102
102
  type: "table",
@@ -109,13 +109,13 @@ async function* Be() {
109
109
  { Name: "Item Epsilon", Category: "Type B", Value: "2,200", Status: "Active" }
110
110
  ]
111
111
  }
112
- }, await g(300), yield* x(`
112
+ }, await _(300), yield* x(`
113
113
  Total across all entries: **7,900** — Type A accounts for the largest share at 53%.`, 25), yield { type: "done" };
114
114
  }
115
- async function* Pe() {
115
+ async function* De() {
116
116
  yield* x(`Based on the current data, I have a suggestion for you:
117
117
 
118
- `, 30), await g(500), yield {
118
+ `, 30), await _(500), yield {
119
119
  type: "part",
120
120
  part: {
121
121
  type: "proposal",
@@ -130,10 +130,10 @@ async function* Pe() {
130
130
  }
131
131
  }, yield { type: "done" };
132
132
  }
133
- async function* $e() {
133
+ async function* Re() {
134
134
  yield* x(`I found these records matching your request:
135
135
 
136
- `, 30), await g(400), yield {
136
+ `, 30), await _(400), yield {
137
137
  type: "part",
138
138
  part: {
139
139
  type: "entity-list",
@@ -162,10 +162,10 @@ async function* $e() {
162
162
  }
163
163
  ]
164
164
  }
165
- }, await g(300), yield* x(`
165
+ }, await _(300), yield* x(`
166
166
  Here is the detail of the first one:
167
167
 
168
- `, 25), await g(300), yield {
168
+ `, 25), await _(300), yield {
169
169
  type: "part",
170
170
  part: {
171
171
  type: "entity",
@@ -184,35 +184,35 @@ Here is the detail of the first one:
184
184
  }
185
185
  }, yield { type: "done" };
186
186
  }
187
- async function* De() {
187
+ async function* Ee() {
188
188
  yield* x(`I'm a general-purpose AI assistant. Here's what I can help with:
189
189
 
190
- `, 30), await g(200), yield* x(`- **Summarise data** — ask me to show, list, or summarise information
191
- `, 22), await g(150), yield* x(`- **Make suggestions** — ask me to recommend or propose something
192
- `, 22), await g(150), yield* x(`- **Answer questions** — ask me anything and I'll do my best
193
- `, 22), await g(200), yield* x(`
190
+ `, 30), await _(200), yield* x(`- **Summarise data** — ask me to show, list, or summarise information
191
+ `, 22), await _(150), yield* x(`- **Make suggestions** — ask me to recommend or propose something
192
+ `, 22), await _(150), yield* x(`- **Answer questions** — ask me anything and I'll do my best
193
+ `, 22), await _(200), yield* x(`
194
194
  Try asking: *"Show me the data"* or *"Can you suggest something?"*`, 25), yield { type: "done" };
195
195
  }
196
- async function* Re() {
197
- yield* x("Attempting to process your request…", 30), await g(800), yield { type: "error", message: "Simulated error: the upstream service returned an unexpected response." };
196
+ async function* He() {
197
+ yield* x("Attempting to process your request…", 30), await _(800), yield { type: "error", message: "Simulated error: the upstream service returned an unexpected response." };
198
198
  }
199
- async function* Ee(e) {
199
+ async function* Ve(e) {
200
200
  yield* x(`Got it — you asked about *"${e || "your request"}"*.
201
201
 
202
- `, 30), await g(400), yield* x(`I'm a **mock adapter** used for development. I respond to a few trigger words:
202
+ `, 30), await _(400), yield* x(`I'm a **mock adapter** used for development. I respond to a few trigger words:
203
203
 
204
- `, 25), await g(200), yield* x(`- Say **"show"**, **"list"**, **"data"**, or **"table"** → renders a data table
205
- `, 22), await g(150), yield* x(`- Say **"suggest"**, **"recommend"**, or **"proposal"** → renders a proposal card
206
- `, 22), await g(150), yield* x(`- Say **"entity"**, **"card"**, **"detail"**, or **"find"** → renders entity cards
207
- `, 22), await g(150), yield* x(`- Say **"help"** or **"what can you do"** → shows capabilities
208
- `, 22), await g(150), yield* x(`- Say **"error"** or **"fail"** → simulates an error response
204
+ `, 25), await _(200), yield* x(`- Say **"show"**, **"list"**, **"data"**, or **"table"** → renders a data table
205
+ `, 22), await _(150), yield* x(`- Say **"suggest"**, **"recommend"**, or **"proposal"** → renders a proposal card
206
+ `, 22), await _(150), yield* x(`- Say **"entity"**, **"card"**, **"detail"**, or **"find"** → renders entity cards
207
+ `, 22), await _(150), yield* x(`- Say **"help"** or **"what can you do"** → shows capabilities
208
+ `, 22), await _(150), yield* x(`- Say **"error"** or **"fail"** → simulates an error response
209
209
  `, 22), yield { type: "done" };
210
210
  }
211
211
  async function* x(e, t) {
212
212
  for (let r = 0; r < e.length; r += 3)
213
- yield { type: "text", text: e.slice(r, r + 3) }, await g(t);
213
+ yield { type: "text", text: e.slice(r, r + 3) }, await _(t);
214
214
  }
215
- function ve(e) {
215
+ function xe(e) {
216
216
  if (!e || e === "[DONE]") return [];
217
217
  let t;
218
218
  try {
@@ -245,21 +245,21 @@ function ve(e) {
245
245
  return [];
246
246
  }
247
247
  }
248
- function ln(e, t = {}) {
248
+ function yn(e, t = {}) {
249
249
  const {
250
- method: a = "POST",
250
+ method: n = "POST",
251
251
  headers: r = {},
252
252
  getHeaders: s,
253
- getBody: i,
253
+ getBody: o,
254
254
  getMessages: d,
255
- parseEvent: o = Ve,
256
- credentials: l
255
+ parseEvent: i = qe,
256
+ credentials: c
257
257
  } = t;
258
258
  return {
259
259
  async *sendMessage(u) {
260
- const p = s ? await s(u) : {}, c = d ? await d(u.messages) : u.messages, f = { ...u, messages: c }, C = i ? i(f) : { messages: f.messages, context: f.context }, y = await fetch(e, {
261
- method: a,
262
- credentials: l,
260
+ const p = s ? await s(u) : {}, l = d ? await d(u.messages) : u.messages, f = { ...u, messages: l }, C = o ? o(f) : { messages: f.messages, context: f.context }, y = await fetch(e, {
261
+ method: n,
262
+ credentials: c,
263
263
  headers: {
264
264
  "Content-Type": "application/json",
265
265
  ...r,
@@ -268,76 +268,76 @@ function ln(e, t = {}) {
268
268
  body: JSON.stringify(C)
269
269
  });
270
270
  if (!y.ok) {
271
- const M = await y.text().catch(() => `HTTP ${y.status}`);
272
- yield { type: "error", message: `Request failed (${y.status}): ${M}` };
271
+ const T = await y.text().catch(() => `HTTP ${y.status}`);
272
+ yield { type: "error", message: `Request failed (${y.status}): ${T}` };
273
273
  return;
274
274
  }
275
275
  if (!y.body) {
276
276
  yield { type: "error", message: "Response body is empty — server may not support streaming." };
277
277
  return;
278
278
  }
279
- yield* He(y.body, o);
279
+ yield* Oe(y.body, i);
280
280
  }
281
281
  };
282
282
  }
283
- async function* He(e, t) {
284
- const a = e.getReader(), r = new TextDecoder();
283
+ async function* Oe(e, t) {
284
+ const n = e.getReader(), r = new TextDecoder();
285
285
  let s = "";
286
286
  try {
287
287
  for (; ; ) {
288
- const { done: i, value: d } = await a.read();
289
- if (i) break;
288
+ const { done: o, value: d } = await n.read();
289
+ if (o) break;
290
290
  s += r.decode(d, { stream: !0 });
291
- const o = s.split(`
291
+ const i = s.split(`
292
292
  `);
293
- s = o.pop() ?? "";
294
- for (const l of o) {
295
- const u = l.trim();
293
+ s = i.pop() ?? "";
294
+ for (const c of i) {
295
+ const u = c.trim();
296
296
  if (!(!u || u.startsWith(":")) && u.startsWith("data: ")) {
297
297
  const p = u.slice(6);
298
298
  if (p === "[DONE]") {
299
299
  yield { type: "done" };
300
300
  return;
301
301
  }
302
- const c = t(p);
303
- for (const f of c)
302
+ const l = t(p);
303
+ for (const f of l)
304
304
  if (yield f, f.type === "done" || f.type === "error") return;
305
305
  }
306
306
  }
307
307
  }
308
308
  } finally {
309
- a.releaseLock();
309
+ n.releaseLock();
310
310
  }
311
311
  yield { type: "done" };
312
312
  }
313
- const Ve = (e) => {
313
+ const qe = (e) => {
314
314
  if (!e || e === "[DONE]") return [];
315
- const t = ve(e);
315
+ const t = xe(e);
316
316
  if (t.length > 0) return t;
317
317
  try {
318
- const a = JSON.parse(e);
319
- if (a.error?.message)
320
- return [{ type: "error", message: a.error.message }];
321
- const r = a.choices?.[0]?.delta;
322
- return a.choices?.[0]?.finish_reason === "stop" ? [{ type: "done" }] : r?.content ? [{ type: "text", text: r.content }] : [];
318
+ const n = JSON.parse(e);
319
+ if (n.error?.message)
320
+ return [{ type: "error", message: n.error.message }];
321
+ const r = n.choices?.[0]?.delta;
322
+ return n.choices?.[0]?.finish_reason === "stop" ? [{ type: "done" }] : r?.content ? [{ type: "text", text: r.content }] : [];
323
323
  } catch {
324
324
  return [];
325
325
  }
326
326
  };
327
- function dn(e, t = {}) {
327
+ function mn(e, t = {}) {
328
328
  const {
329
- method: a = "POST",
329
+ method: n = "POST",
330
330
  headers: r = {},
331
331
  getHeaders: s,
332
- getBody: i,
333
- parseChunk: d = qe,
334
- credentials: o
332
+ getBody: o,
333
+ parseChunk: d = Fe,
334
+ credentials: i
335
335
  } = t;
336
336
  return {
337
- async *sendMessage(l) {
338
- const u = s ? await s(l) : {}, p = i ? i(l) : { messages: l.messages, context: l.context }, c = await fetch(e, {
339
- method: a,
340
- credentials: o,
337
+ async *sendMessage(c) {
338
+ const u = s ? await s(c) : {}, p = o ? o(c) : { messages: c.messages, context: c.context }, l = await fetch(e, {
339
+ method: n,
340
+ credentials: i,
341
341
  headers: {
342
342
  "Content-Type": "application/json",
343
343
  ...r,
@@ -345,241 +345,241 @@ function dn(e, t = {}) {
345
345
  },
346
346
  body: JSON.stringify(p)
347
347
  });
348
- if (!c.ok) {
349
- const f = await c.text().catch(() => `HTTP ${c.status}`);
350
- yield { type: "error", message: `Request failed (${c.status}): ${f}` };
348
+ if (!l.ok) {
349
+ const f = await l.text().catch(() => `HTTP ${l.status}`);
350
+ yield { type: "error", message: `Request failed (${l.status}): ${f}` };
351
351
  return;
352
352
  }
353
- if (!c.body) {
353
+ if (!l.body) {
354
354
  yield { type: "error", message: "Response body is empty — server may not support streaming." };
355
355
  return;
356
356
  }
357
- yield* Oe(c.body, d);
357
+ yield* We(l.body, d);
358
358
  }
359
359
  };
360
360
  }
361
- async function* Oe(e, t) {
362
- const a = e.getReader(), r = new TextDecoder();
361
+ async function* We(e, t) {
362
+ const n = e.getReader(), r = new TextDecoder();
363
363
  let s = "";
364
364
  try {
365
365
  for (; ; ) {
366
- const { done: i, value: d } = await a.read();
367
- if (i) break;
366
+ const { done: o, value: d } = await n.read();
367
+ if (o) break;
368
368
  s += r.decode(d, { stream: !0 });
369
- const o = s.split(`
369
+ const i = s.split(`
370
370
  `);
371
- s = o.pop() ?? "";
372
- for (const l of o) {
373
- const u = l.trim();
371
+ s = i.pop() ?? "";
372
+ for (const c of i) {
373
+ const u = c.trim();
374
374
  if (!u) continue;
375
375
  const p = t(u);
376
- for (const c of p)
377
- if (yield c, c.type === "done" || c.type === "error") return;
376
+ for (const l of p)
377
+ if (yield l, l.type === "done" || l.type === "error") return;
378
378
  }
379
379
  }
380
380
  if (s.trim()) {
381
- const i = t(s.trim());
382
- for (const d of i)
381
+ const o = t(s.trim());
382
+ for (const d of o)
383
383
  if (yield d, d.type === "done" || d.type === "error") return;
384
384
  }
385
385
  } finally {
386
- a.releaseLock();
386
+ n.releaseLock();
387
387
  }
388
388
  yield { type: "done" };
389
389
  }
390
- const qe = (e) => {
391
- const t = ve(e);
390
+ const Fe = (e) => {
391
+ const t = xe(e);
392
392
  return t.length > 0 ? t : e ? [{ type: "text", text: e }] : [];
393
393
  };
394
- let We = 0;
395
- const ne = () => `msg-${++We}-${Date.now()}`, ye = Ae;
396
- function Fe({
394
+ let Ze = 0;
395
+ const se = () => `msg-${++Ze}-${Date.now()}`, me = Me;
396
+ function Je({
397
397
  adapter: e,
398
398
  context: t,
399
- onProposalConfirm: a,
399
+ onProposalConfirm: n,
400
400
  onProposalCancel: r,
401
401
  initialMessages: s,
402
- historyLimit: i,
402
+ historyLimit: o,
403
403
  onMessagesChange: d
404
404
  }) {
405
- const [o, l] = E(s ?? []), [u, p] = E(""), [c, f] = E(!1), [C, y] = E(!1), [M, A] = E(null), T = W(null), I = W(!1), F = W(d);
406
- oe(() => {
407
- F.current = d;
408
- }), oe(() => {
409
- !I.current || c || (I.current = !1, F.current?.(o));
410
- }, [o, c]);
411
- const j = S((m) => {
412
- l((v) => {
413
- const _ = v[v.length - 1];
414
- if (!_ || _.role !== "assistant") return v;
415
- if (m.type === "activity" && m.id) {
416
- const w = [..._.parts], b = w.findIndex(
417
- (N) => N.type === "activity" && N.id === m.id
405
+ const [i, c] = W(s ?? []), [u, p] = W(""), [l, f] = W(!1), [C, y] = W(!1), [T, A] = W(null), M = U(null), L = U(!1), V = U(d);
406
+ ce(() => {
407
+ V.current = d;
408
+ }), ce(() => {
409
+ !L.current || l || (L.current = !1, V.current?.(i));
410
+ }, [i, l]);
411
+ const k = z((h) => {
412
+ c((v) => {
413
+ const b = v[v.length - 1];
414
+ if (!b || b.role !== "assistant") return v;
415
+ if (h.type === "activity" && h.id) {
416
+ const w = [...b.parts], g = w.findIndex(
417
+ (N) => N.type === "activity" && N.id === h.id
418
418
  );
419
- if (b !== -1)
420
- return w[b] = m, [...v.slice(0, -1), { ..._, parts: w }];
419
+ if (g !== -1)
420
+ return w[g] = h, [...v.slice(0, -1), { ...b, parts: w }];
421
421
  }
422
422
  return [
423
423
  ...v.slice(0, -1),
424
- { ..._, parts: [..._.parts, m] }
424
+ { ...b, parts: [...b.parts, h] }
425
425
  ];
426
426
  });
427
- }, []), H = S((m) => {
428
- l((v) => {
429
- const _ = v[v.length - 1];
430
- if (!_ || _.role !== "assistant") return v;
431
- const w = [..._.parts], b = w[w.length - 1];
432
- return b?.type === "text" ? w[w.length - 1] = { type: "text", text: b.text + m } : w.push({ type: "text", text: m }), [...v.slice(0, -1), { ..._, parts: w }];
427
+ }, []), S = z((h) => {
428
+ c((v) => {
429
+ const b = v[v.length - 1];
430
+ if (!b || b.role !== "assistant") return v;
431
+ const w = [...b.parts], g = w[w.length - 1];
432
+ return g?.type === "text" ? w[w.length - 1] = { type: "text", text: g.text + h } : w.push({ type: "text", text: h }), [...v.slice(0, -1), { ...b, parts: w }];
433
433
  });
434
- }, []), V = S(async (m, v) => {
434
+ }, []), $ = z(async (h, v) => {
435
435
  A(null);
436
- const _ = {
437
- id: ne(),
436
+ const b = {
437
+ id: se(),
438
438
  role: "user",
439
- parts: [{ type: "text", text: m }],
439
+ parts: [{ type: "text", text: h }],
440
440
  createdAt: /* @__PURE__ */ new Date()
441
- }, w = ne();
442
- let b = !1;
441
+ }, w = se();
442
+ let g = !1;
443
443
  const N = () => {
444
- if (b) return;
445
- b = !0;
446
- const $ = {
444
+ if (g) return;
445
+ g = !0;
446
+ const R = {
447
447
  id: w,
448
448
  role: "assistant",
449
449
  parts: [],
450
450
  createdAt: /* @__PURE__ */ new Date()
451
451
  };
452
- l((q) => [...q, $]);
452
+ c((Z) => [...Z, R]);
453
453
  };
454
- l(($) => [...$, _]), f(!0), y(!0), T.current?.abort();
455
- const de = new AbortController();
456
- T.current = de;
454
+ c((R) => [...R, b]), f(!0), y(!0), M.current?.abort();
455
+ const ue = new AbortController();
456
+ M.current = ue;
457
457
  try {
458
- const $ = Ie(
459
- [...v, _],
460
- i ?? Number.POSITIVE_INFINITY
461
- ), q = e.sendMessage({ messages: ye($), context: t });
462
- await ue(
463
- q,
464
- (Z) => {
465
- switch (y(!1), Z.type) {
458
+ const R = Be(
459
+ [...v, b],
460
+ o ?? Number.POSITIVE_INFINITY
461
+ ), Z = e.sendMessage({ messages: me(R), context: t });
462
+ await pe(
463
+ Z,
464
+ (K) => {
465
+ switch (y(!1), K.type) {
466
466
  case "text":
467
- N(), H(Z.text);
467
+ N(), S(K.text);
468
468
  break;
469
469
  case "part":
470
- N(), j(Z.part);
470
+ N(), k(K.part);
471
471
  break;
472
472
  case "error":
473
- N(), j({ type: "error", message: Z.message }), A(Z.message);
473
+ N(), k({ type: "error", message: K.message }), A(K.message);
474
474
  break;
475
475
  case "done":
476
476
  break;
477
477
  }
478
478
  },
479
- de.signal
479
+ ue.signal
480
480
  );
481
- } catch ($) {
482
- const q = $ instanceof Error ? $.message : "Unknown error occurred";
483
- A(q), N(), j({ type: "error", message: q });
481
+ } catch (R) {
482
+ const Z = R instanceof Error ? R.message : "Unknown error occurred";
483
+ A(Z), N(), k({ type: "error", message: Z });
484
484
  } finally {
485
- I.current = !0, f(!1), y(!1);
485
+ L.current = !0, f(!1), y(!1);
486
486
  }
487
- }, [e, t, i, H, j]), G = S(async () => {
488
- const m = u.trim();
489
- !m || c || (p(""), await V(m, o));
490
- }, [u, c, o, V]), Q = S(async (m) => {
491
- !m.trim() || c || await V(m, o);
492
- }, [c, o, V]), Y = S(async (m) => {
493
- if (c) return;
487
+ }, [e, t, o, S, k]), O = z(async () => {
488
+ const h = u.trim();
489
+ !h || l || (p(""), await $(h, i));
490
+ }, [u, l, i, $]), q = z(async (h) => {
491
+ !h.trim() || l || await $(h, i);
492
+ }, [l, i, $]), X = z(async (h) => {
493
+ if (l) return;
494
494
  A(null), f(!0), y(!0);
495
495
  const v = {
496
- id: ne(),
496
+ id: se(),
497
497
  role: "assistant",
498
498
  parts: [],
499
499
  createdAt: /* @__PURE__ */ new Date()
500
500
  };
501
- l((b) => [...b, v]), T.current?.abort();
502
- const _ = new AbortController();
503
- T.current = _;
501
+ c((g) => [...g, v]), M.current?.abort();
502
+ const b = new AbortController();
503
+ M.current = b;
504
504
  const w = {
505
- id: ne(),
505
+ id: se(),
506
506
  role: "system",
507
- parts: [{ type: "text", text: m }],
507
+ parts: [{ type: "text", text: h }],
508
508
  createdAt: /* @__PURE__ */ new Date()
509
509
  };
510
510
  try {
511
- const b = e.sendMessage({ messages: ye([w]), context: t });
512
- await ue(
513
- b,
511
+ const g = e.sendMessage({ messages: me([w]), context: t });
512
+ await pe(
513
+ g,
514
514
  (N) => {
515
515
  switch (y(!1), N.type) {
516
516
  case "text":
517
- H(N.text);
517
+ S(N.text);
518
518
  break;
519
519
  case "part":
520
- j(N.part);
520
+ k(N.part);
521
521
  break;
522
522
  case "error":
523
- j({ type: "error", message: N.message }), A(N.message);
523
+ k({ type: "error", message: N.message }), A(N.message);
524
524
  break;
525
525
  case "done":
526
526
  break;
527
527
  }
528
528
  },
529
- _.signal
529
+ b.signal
530
530
  );
531
- } catch (b) {
532
- const N = b instanceof Error ? b.message : "Unknown error occurred";
533
- A(N), j({ type: "error", message: N });
531
+ } catch (g) {
532
+ const N = g instanceof Error ? g.message : "Unknown error occurred";
533
+ A(N), k({ type: "error", message: N });
534
534
  } finally {
535
- I.current = !0, f(!1), y(!1);
535
+ L.current = !0, f(!1), y(!1);
536
536
  }
537
- }, [c, e, t, H, j]), X = S(() => {
538
- T.current?.abort(), f(!1), y(!1);
539
- }, []), ee = S((m) => {
540
- T.current?.abort(), I.current = !0, l(m ?? []), p(""), A(null), f(!1), y(!1);
541
- }, []), O = S((m, v) => {
542
- I.current = !0, l((_) => _.map((w) => ({
537
+ }, [l, e, t, S, k]), ee = z(() => {
538
+ M.current?.abort(), f(!1), y(!1);
539
+ }, []), te = z((h) => {
540
+ M.current?.abort(), L.current = !0, c(h ?? []), p(""), A(null), f(!1), y(!1);
541
+ }, []), F = z((h, v) => {
542
+ L.current = !0, c((b) => b.map((w) => ({
543
543
  ...w,
544
544
  parts: w.parts.map(
545
- (b) => be(b) && b.proposal.id === m ? { ...b, proposal: { ...b.proposal, resolved: v } } : b
545
+ (g) => we(g) && g.proposal.id === h ? { ...g, proposal: { ...g.proposal, resolved: v } } : g
546
546
  )
547
547
  })));
548
- }, []), te = S((m, v) => {
549
- O(m, "confirmed"), a?.(m, v);
550
- }, [a, O]), ae = S((m) => {
551
- O(m, "cancelled"), r?.(m);
552
- }, [r, O]);
553
- return fe(() => ({
554
- messages: o,
548
+ }, []), ae = z((h, v) => {
549
+ F(h, "confirmed"), n?.(h, v);
550
+ }, [n, F]), ne = z((h) => {
551
+ F(h, "cancelled"), r?.(h);
552
+ }, [r, F]);
553
+ return _e(() => ({
554
+ messages: i,
555
555
  input: u,
556
556
  setInput: p,
557
- sendMessage: G,
558
- sendMessageWithText: Q,
559
- sendGreeting: Y,
560
- stop: X,
561
- isLoading: c,
557
+ sendMessage: O,
558
+ sendMessageWithText: q,
559
+ sendGreeting: X,
560
+ stop: ee,
561
+ isLoading: l,
562
562
  isConnecting: C,
563
- error: M,
564
- reset: ee,
565
- confirmProposal: te,
566
- cancelProposal: ae
563
+ error: T,
564
+ reset: te,
565
+ confirmProposal: ae,
566
+ cancelProposal: ne
567
567
  }), [
568
- o,
568
+ i,
569
569
  u,
570
- G,
571
- Q,
572
- Y,
570
+ O,
571
+ q,
573
572
  X,
574
- c,
575
- C,
576
- M,
577
573
  ee,
574
+ l,
575
+ C,
576
+ T,
578
577
  te,
579
- ae
578
+ ae,
579
+ ne
580
580
  ]);
581
581
  }
582
- const we = {
582
+ const Ce = {
583
583
  sidebarTitle: "AI Assistant",
584
584
  clearConversation: "Clear conversation",
585
585
  resetConversation: "Reset conversation",
@@ -606,29 +606,29 @@ const we = {
606
606
  actionRules: "Rules",
607
607
  historyEmpty: "No previous chats",
608
608
  historyDeleteChat: "Delete chat"
609
- }, xe = ge(we);
610
- function R() {
611
- return ce(xe);
609
+ }, Ne = be(Ce);
610
+ function H() {
611
+ return le(Ne);
612
612
  }
613
- const Ze = "_root_14q8g_1", Je = {
614
- root: Ze
613
+ const Ue = "_root_14q8g_1", Ke = {
614
+ root: Ue
615
615
  };
616
- function un({ children: e, theme: t, labels: a, defaultTitle: r, className: s, style: i }) {
616
+ function hn({ children: e, theme: t, labels: n, defaultTitle: r, className: s, style: o }) {
617
617
  const d = {
618
- ...we,
618
+ ...Ce,
619
619
  ...r ? { sidebarTitle: r } : {},
620
- ...a
621
- }, o = t ? Ue(t) : void 0;
622
- return /* @__PURE__ */ n(xe.Provider, { value: d, children: /* @__PURE__ */ n(
620
+ ...n
621
+ }, i = t ? Ge(t) : void 0;
622
+ return /* @__PURE__ */ a(Ne.Provider, { value: d, children: /* @__PURE__ */ a(
623
623
  "div",
624
624
  {
625
- className: [Je.root, s].filter(Boolean).join(" "),
626
- style: { ...o, ...i },
625
+ className: [Ke.root, s].filter(Boolean).join(" "),
626
+ style: { ...i, ...o },
627
627
  children: e
628
628
  }
629
629
  ) });
630
630
  }
631
- function Ue(e) {
631
+ function Ge(e) {
632
632
  const t = {
633
633
  "--juneau-color-primary": e.colorPrimary,
634
634
  "--juneau-color-primary-dark": e.colorPrimaryDark,
@@ -674,48 +674,48 @@ function Ue(e) {
674
674
  "--juneau-transition-fast": e.transitionFast
675
675
  };
676
676
  return Object.fromEntries(
677
- Object.entries(t).filter(([, a]) => a !== void 0)
677
+ Object.entries(t).filter(([, n]) => n !== void 0)
678
678
  );
679
679
  }
680
- const le = ge(null);
681
- function Ke() {
682
- const e = ce(le);
680
+ const de = be(null);
681
+ function Qe() {
682
+ const e = le(de);
683
683
  if (!e)
684
684
  throw new Error(
685
685
  "useAiChatContext must be used inside <AiChatProvider>. Wrap your app (or layout) with <AiChatProvider adapter={...}>."
686
686
  );
687
687
  return e;
688
688
  }
689
- function pn() {
690
- return ce(le);
689
+ function fn() {
690
+ return le(de);
691
691
  }
692
- function yn({
692
+ function gn({
693
693
  adapter: e,
694
694
  context: t,
695
- onProposalConfirm: a,
695
+ onProposalConfirm: n,
696
696
  onProposalCancel: r,
697
697
  initialMessages: s,
698
- historyLimit: i,
698
+ historyLimit: o,
699
699
  onMessagesChange: d,
700
- children: o
700
+ children: i
701
701
  }) {
702
- const [l, u] = E(t), p = S((C) => {
702
+ const [c, u] = W(t), p = z((C) => {
703
703
  u(typeof C == "function" ? (y) => C(y) : C);
704
- }, []), c = Fe({
704
+ }, []), l = Je({
705
705
  adapter: e,
706
- context: l,
707
- onProposalConfirm: a,
706
+ context: c,
707
+ onProposalConfirm: n,
708
708
  onProposalCancel: r,
709
709
  initialMessages: s,
710
- historyLimit: i,
710
+ historyLimit: o,
711
711
  onMessagesChange: d
712
- }), f = fe(
713
- () => ({ ...c, setContext: p }),
714
- [c, p]
712
+ }), f = _e(
713
+ () => ({ ...l, setContext: p }),
714
+ [l, p]
715
715
  );
716
- return /* @__PURE__ */ n(le.Provider, { value: f, children: o });
716
+ return /* @__PURE__ */ a(de.Provider, { value: f, children: i });
717
717
  }
718
- const mn = {
718
+ const _n = {
719
719
  sidebarTitle: "AI Asistent",
720
720
  clearConversation: "Vymazat konverzaci",
721
721
  resetConversation: "Resetovat konverzaci",
@@ -743,8 +743,8 @@ const mn = {
743
743
  historyEmpty: "Žádné předchozí konverzace",
744
744
  historyDeleteChat: "Smazat konverzaci"
745
745
  };
746
- function Ce({ className: e, style: t, "aria-hidden": a = !0 }) {
747
- return /* @__PURE__ */ n(
746
+ function je({ className: e, style: t, "aria-hidden": n = !0 }) {
747
+ return /* @__PURE__ */ a(
748
748
  "svg",
749
749
  {
750
750
  xmlns: "http://www.w3.org/2000/svg",
@@ -754,13 +754,13 @@ function Ce({ className: e, style: t, "aria-hidden": a = !0 }) {
754
754
  fill: "currentColor",
755
755
  className: e,
756
756
  style: t,
757
- "aria-hidden": a,
758
- children: /* @__PURE__ */ n("path", { d: "M456 0c-48.6 0-88 39.4-88 88l0 29.2L12.5 390.6c-14 10.8-16.6 30.9-5.9 44.9s30.9 16.6 44.9 5.9L126.1 384l133.1 0 46.6 113.1c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3L311.1 384l40.9 0c1.1 0 2.1 0 3.2 0l46.6 113.2c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3l-42-102C484.9 354.1 544 280 544 192l0-64 0-8 80.5-20.1c8.6-2.1 13.8-10.8 11.6-19.4C629 52 603.4 32 574 32l-50.1 0C507.7 12.5 483.3 0 456 0zm0 64a24 24 0 1 1 0 48 24 24 0 1 1 0-48z" })
757
+ "aria-hidden": n,
758
+ children: /* @__PURE__ */ a("path", { d: "M456 0c-48.6 0-88 39.4-88 88l0 29.2L12.5 390.6c-14 10.8-16.6 30.9-5.9 44.9s30.9 16.6 44.9 5.9L126.1 384l133.1 0 46.6 113.1c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3L311.1 384l40.9 0c1.1 0 2.1 0 3.2 0l46.6 113.2c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3l-42-102C484.9 354.1 544 280 544 192l0-64 0-8 80.5-20.1c8.6-2.1 13.8-10.8 11.6-19.4C629 52 603.4 32 574 32l-50.1 0C507.7 12.5 483.3 0 456 0zm0 64a24 24 0 1 1 0 48 24 24 0 1 1 0-48z" })
759
759
  }
760
760
  );
761
761
  }
762
- function Ge({ className: e, style: t, "aria-hidden": a = !0 }) {
763
- return /* @__PURE__ */ n(
762
+ function Ye({ className: e, style: t, "aria-hidden": n = !0 }) {
763
+ return /* @__PURE__ */ a(
764
764
  "svg",
765
765
  {
766
766
  xmlns: "http://www.w3.org/2000/svg",
@@ -770,13 +770,13 @@ function Ge({ className: e, style: t, "aria-hidden": a = !0 }) {
770
770
  fill: "currentColor",
771
771
  className: e,
772
772
  style: t,
773
- "aria-hidden": a,
774
- children: /* @__PURE__ */ n("path", { d: "M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s6.2-22.8 16.4-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z" })
773
+ "aria-hidden": n,
774
+ children: /* @__PURE__ */ a("path", { d: "M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s6.2-22.8 16.4-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z" })
775
775
  }
776
776
  );
777
777
  }
778
- function Qe({ className: e, style: t, "aria-hidden": a = !0 }) {
779
- return /* @__PURE__ */ n(
778
+ function Xe({ className: e, style: t, "aria-hidden": n = !0 }) {
779
+ return /* @__PURE__ */ a(
780
780
  "svg",
781
781
  {
782
782
  xmlns: "http://www.w3.org/2000/svg",
@@ -786,13 +786,13 @@ function Qe({ className: e, style: t, "aria-hidden": a = !0 }) {
786
786
  fill: "currentColor",
787
787
  className: e,
788
788
  style: t,
789
- "aria-hidden": a,
790
- children: /* @__PURE__ */ n("path", { d: "M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z" })
789
+ "aria-hidden": n,
790
+ children: /* @__PURE__ */ a("path", { d: "M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z" })
791
791
  }
792
792
  );
793
793
  }
794
- function Ye({ className: e, style: t, "aria-hidden": a = !0 }) {
795
- return /* @__PURE__ */ n(
794
+ function et({ className: e, style: t, "aria-hidden": n = !0 }) {
795
+ return /* @__PURE__ */ a(
796
796
  "svg",
797
797
  {
798
798
  xmlns: "http://www.w3.org/2000/svg",
@@ -802,13 +802,13 @@ function Ye({ className: e, style: t, "aria-hidden": a = !0 }) {
802
802
  fill: "currentColor",
803
803
  className: e,
804
804
  style: t,
805
- "aria-hidden": a,
806
- children: /* @__PURE__ */ n("path", { d: "M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288l111.5 0L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7l-111.5 0L349.4 44.6z" })
805
+ "aria-hidden": n,
806
+ children: /* @__PURE__ */ a("path", { d: "M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288l111.5 0L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7l-111.5 0L349.4 44.6z" })
807
807
  }
808
808
  );
809
809
  }
810
- function Xe({ className: e, style: t, "aria-hidden": a = !0 }) {
811
- return /* @__PURE__ */ n(
810
+ function tt({ className: e, style: t, "aria-hidden": n = !0 }) {
811
+ return /* @__PURE__ */ a(
812
812
  "svg",
813
813
  {
814
814
  xmlns: "http://www.w3.org/2000/svg",
@@ -818,13 +818,13 @@ function Xe({ className: e, style: t, "aria-hidden": a = !0 }) {
818
818
  fill: "currentColor",
819
819
  className: e,
820
820
  style: t,
821
- "aria-hidden": a,
822
- children: /* @__PURE__ */ n("path", { d: "M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z" })
821
+ "aria-hidden": n,
822
+ children: /* @__PURE__ */ a("path", { d: "M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z" })
823
823
  }
824
824
  );
825
825
  }
826
- function et({ className: e, style: t, "aria-hidden": a = !0 }) {
827
- return /* @__PURE__ */ n(
826
+ function at({ className: e, style: t, "aria-hidden": n = !0 }) {
827
+ return /* @__PURE__ */ a(
828
828
  "svg",
829
829
  {
830
830
  xmlns: "http://www.w3.org/2000/svg",
@@ -834,13 +834,13 @@ function et({ className: e, style: t, "aria-hidden": a = !0 }) {
834
834
  fill: "currentColor",
835
835
  className: e,
836
836
  style: t,
837
- "aria-hidden": a,
838
- children: /* @__PURE__ */ n("path", { d: "M75 75L41 41C25.9 25.9 0 36.6 0 57.9L0 168c0 13.3 10.7 24 24 24l110.1 0c21.4 0 32.1-25.9 17-41l-31.8-31.8C143.9 83.5 196.2 64 252.6 64C370.8 64 464 157.8 464 276c0 77.5-40.8 145.4-102 182.9c-15.1 9.2-19.9 29-10.7 44.1s29 19.9 44.1 10.7C471 467.5 528 378.4 528 276C528 124.1 404.5 0 252.6 0C186 0 125.3 26.4 80 70.2L75 75zM256 152c-13.3 0-24 10.7-24 24l0 104c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65 0-94.1c0-13.3-10.7-24-24-24z" })
837
+ "aria-hidden": n,
838
+ children: /* @__PURE__ */ a("path", { d: "M75 75L41 41C25.9 25.9 0 36.6 0 57.9L0 168c0 13.3 10.7 24 24 24l110.1 0c21.4 0 32.1-25.9 17-41l-31.8-31.8C143.9 83.5 196.2 64 252.6 64C370.8 64 464 157.8 464 276c0 77.5-40.8 145.4-102 182.9c-15.1 9.2-19.9 29-10.7 44.1s29 19.9 44.1 10.7C471 467.5 528 378.4 528 276C528 124.1 404.5 0 252.6 0C186 0 125.3 26.4 80 70.2L75 75zM256 152c-13.3 0-24 10.7-24 24l0 104c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65 0-94.1c0-13.3-10.7-24-24-24z" })
839
839
  }
840
840
  );
841
841
  }
842
- function tt({ className: e, style: t, "aria-hidden": a = !0 }) {
843
- return /* @__PURE__ */ n(
842
+ function nt({ className: e, style: t, "aria-hidden": n = !0 }) {
843
+ return /* @__PURE__ */ a(
844
844
  "svg",
845
845
  {
846
846
  xmlns: "http://www.w3.org/2000/svg",
@@ -850,13 +850,13 @@ function tt({ className: e, style: t, "aria-hidden": a = !0 }) {
850
850
  fill: "currentColor",
851
851
  className: e,
852
852
  style: t,
853
- "aria-hidden": a,
854
- children: /* @__PURE__ */ n("path", { d: "M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 16 192 0 0-16c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-26.6 0c-25.8 50.9-72.7 88.5-129.4 99.8L384 416l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-72.2C135.3 332.5 88.4 294.9 62.6 244L48 244c-26.5 0-48-21.5-48-48L0 80zM128 240c0 70.7 57.3 128 128 128s128-57.3 128-128l0-128L128 112l0 128zM512 176l0-64-64 0 0 64-48 0 0 16c0 8.8-.7 17.4-2 25.8c3.3 .1 6.6 .2 9.9 .2l56 0c26.5 0 48-21.5 48-48l0-64zM48 176c0 26.5 21.5 48 48 48l56 0c3.4 0 6.7-.1 9.9-.2c-1.3-8.4-2-17-2-25.8l0-16-48 0 0-64-64 0 0 58z" })
853
+ "aria-hidden": n,
854
+ children: /* @__PURE__ */ a("path", { d: "M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 16 192 0 0-16c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-26.6 0c-25.8 50.9-72.7 88.5-129.4 99.8L384 416l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-72.2C135.3 332.5 88.4 294.9 62.6 244L48 244c-26.5 0-48-21.5-48-48L0 80zM128 240c0 70.7 57.3 128 128 128s128-57.3 128-128l0-128L128 112l0 128zM512 176l0-64-64 0 0 64-48 0 0 16c0 8.8-.7 17.4-2 25.8c3.3 .1 6.6 .2 9.9 .2l56 0c26.5 0 48-21.5 48-48l0-64zM48 176c0 26.5 21.5 48 48 48l56 0c3.4 0 6.7-.1 9.9-.2c-1.3-8.4-2-17-2-25.8l0-16-48 0 0-64-64 0 0 58z" })
855
855
  }
856
856
  );
857
857
  }
858
- function at({ className: e, style: t, "aria-hidden": a = !0 }) {
859
- return /* @__PURE__ */ n(
858
+ function st({ className: e, style: t, "aria-hidden": n = !0 }) {
859
+ return /* @__PURE__ */ a(
860
860
  "svg",
861
861
  {
862
862
  xmlns: "http://www.w3.org/2000/svg",
@@ -866,13 +866,13 @@ function at({ className: e, style: t, "aria-hidden": a = !0 }) {
866
866
  fill: "currentColor",
867
867
  className: e,
868
868
  style: t,
869
- "aria-hidden": a,
870
- children: /* @__PURE__ */ n("path", { d: "M32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l448 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416z" })
869
+ "aria-hidden": n,
870
+ children: /* @__PURE__ */ a("path", { d: "M32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l448 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416z" })
871
871
  }
872
872
  );
873
873
  }
874
- function nt({ className: e, style: t, "aria-hidden": a = !0 }) {
875
- return /* @__PURE__ */ n(
874
+ function rt({ className: e, style: t, "aria-hidden": n = !0 }) {
875
+ return /* @__PURE__ */ a(
876
876
  "svg",
877
877
  {
878
878
  xmlns: "http://www.w3.org/2000/svg",
@@ -882,13 +882,13 @@ function nt({ className: e, style: t, "aria-hidden": a = !0 }) {
882
882
  fill: "currentColor",
883
883
  className: e,
884
884
  style: t,
885
- "aria-hidden": a,
886
- children: /* @__PURE__ */ n("path", { d: "M432 64L208 64c-8.8 0-16 7.2-16 16l0 16-64 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-64 16 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zM0 192c0-35.3 28.7-64 64-64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192zm64 32c0 17.7 14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 192c-17.7 0-32 14.3-32 32z" })
885
+ "aria-hidden": n,
886
+ children: /* @__PURE__ */ a("path", { d: "M432 64L208 64c-8.8 0-16 7.2-16 16l0 16-64 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-64 16 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zM0 192c0-35.3 28.7-64 64-64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192zm64 32c0 17.7 14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 192c-17.7 0-32 14.3-32 32z" })
887
887
  }
888
888
  );
889
889
  }
890
- function st({ className: e, style: t, "aria-hidden": a = !0 }) {
891
- return /* @__PURE__ */ n(
890
+ function ot({ className: e, style: t, "aria-hidden": n = !0 }) {
891
+ return /* @__PURE__ */ a(
892
892
  "svg",
893
893
  {
894
894
  xmlns: "http://www.w3.org/2000/svg",
@@ -898,13 +898,13 @@ function st({ className: e, style: t, "aria-hidden": a = !0 }) {
898
898
  fill: "currentColor",
899
899
  className: e,
900
900
  style: t,
901
- "aria-hidden": a,
902
- children: /* @__PURE__ */ n("path", { d: "M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z" })
901
+ "aria-hidden": n,
902
+ children: /* @__PURE__ */ a("path", { d: "M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z" })
903
903
  }
904
904
  );
905
905
  }
906
- function rt({ className: e, style: t, "aria-hidden": a = !0 }) {
907
- return /* @__PURE__ */ n(
906
+ function it({ className: e, style: t, "aria-hidden": n = !0 }) {
907
+ return /* @__PURE__ */ a(
908
908
  "svg",
909
909
  {
910
910
  xmlns: "http://www.w3.org/2000/svg",
@@ -914,63 +914,63 @@ function rt({ className: e, style: t, "aria-hidden": a = !0 }) {
914
914
  fill: "currentColor",
915
915
  className: e,
916
916
  style: t,
917
- "aria-hidden": a,
918
- children: /* @__PURE__ */ n("path", { fillRule: "evenodd", d: "M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })
917
+ "aria-hidden": n,
918
+ children: /* @__PURE__ */ a("path", { fillRule: "evenodd", d: "M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })
919
919
  }
920
920
  );
921
921
  }
922
- const it = "_wrapper_v5oy7_1", ot = "_table_v5oy7_8", ct = "_th_v5oy7_14", lt = "_tr_v5oy7_24", dt = "_td_v5oy7_32", J = {
923
- wrapper: it,
924
- table: ot,
925
- th: ct,
926
- tr: lt,
927
- td: dt
922
+ const ct = "_wrapper_v5oy7_1", lt = "_table_v5oy7_8", dt = "_th_v5oy7_14", ut = "_tr_v5oy7_24", pt = "_td_v5oy7_32", G = {
923
+ wrapper: ct,
924
+ table: lt,
925
+ th: dt,
926
+ tr: ut,
927
+ td: pt
928
928
  };
929
- function ut({ part: e }) {
930
- return /* @__PURE__ */ n("div", { className: J.wrapper, "data-juneau": "table-part", children: /* @__PURE__ */ h("table", { className: J.table, children: [
931
- /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ n("tr", { children: e.columns.map((t) => /* @__PURE__ */ n("th", { className: J.th, children: t }, t)) }) }),
932
- /* @__PURE__ */ n("tbody", { children: e.rows.map((t, a) => /* @__PURE__ */ n("tr", { className: J.tr, children: e.columns.map((r) => /* @__PURE__ */ n("td", { className: J.td, children: String(t[r] ?? "") }, r)) }, a)) })
929
+ function yt({ part: e }) {
930
+ return /* @__PURE__ */ a("div", { className: G.wrapper, "data-juneau": "table-part", children: /* @__PURE__ */ m("table", { className: G.table, children: [
931
+ /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ a("tr", { children: e.columns.map((t) => /* @__PURE__ */ a("th", { className: G.th, children: t }, t)) }) }),
932
+ /* @__PURE__ */ a("tbody", { children: e.rows.map((t, n) => /* @__PURE__ */ a("tr", { className: G.tr, children: e.columns.map((r) => /* @__PURE__ */ a("td", { className: G.td, children: String(t[r] ?? "") }, r)) }, n)) })
933
933
  ] }) });
934
934
  }
935
- const pt = "_card_1un2m_1", yt = "_header_1un2m_9", mt = "_icon_1un2m_16", ht = "_title_1un2m_24", ft = "_description_1un2m_30", gt = "_cardResolved_1un2m_37", _t = "_resolvedBadge_1un2m_41", bt = "_actions_1un2m_52", vt = "_confirm_1un2m_57", wt = "_cancel_1un2m_73", z = {
936
- card: pt,
937
- header: yt,
938
- icon: mt,
939
- title: ht,
940
- description: ft,
941
- cardResolved: gt,
942
- resolvedBadge: _t,
943
- actions: bt,
944
- confirm: vt,
945
- cancel: wt
935
+ const mt = "_card_1un2m_1", ht = "_header_1un2m_9", ft = "_icon_1un2m_16", gt = "_title_1un2m_24", _t = "_description_1un2m_30", bt = "_cardResolved_1un2m_37", vt = "_resolvedBadge_1un2m_41", wt = "_actions_1un2m_52", xt = "_confirm_1un2m_57", Ct = "_cancel_1un2m_73", I = {
936
+ card: mt,
937
+ header: ht,
938
+ icon: ft,
939
+ title: gt,
940
+ description: _t,
941
+ cardResolved: bt,
942
+ resolvedBadge: vt,
943
+ actions: wt,
944
+ confirm: xt,
945
+ cancel: Ct
946
946
  };
947
- function xt({ part: e, onConfirm: t, onCancel: a }) {
948
- const r = R(), { proposal: s } = e, i = s.resolved === "confirmed" ? r.proposalConfirmed : s.resolved === "cancelled" ? r.proposalCancelled : s.resolved === "expired" ? r.proposalExpired : null;
949
- return /* @__PURE__ */ h(
947
+ function Nt({ part: e, onConfirm: t, onCancel: n }) {
948
+ const r = H(), { proposal: s } = e, o = s.resolved === "confirmed" ? r.proposalConfirmed : s.resolved === "cancelled" ? r.proposalCancelled : s.resolved === "expired" ? r.proposalExpired : null;
949
+ return /* @__PURE__ */ m(
950
950
  "div",
951
951
  {
952
- className: s.resolved ? `${z.card} ${z.cardResolved}` : z.card,
952
+ className: s.resolved ? `${I.card} ${I.cardResolved}` : I.card,
953
953
  "data-juneau": "proposal-card",
954
954
  children: [
955
- /* @__PURE__ */ h("div", { className: z.header, children: [
956
- /* @__PURE__ */ n("svg", { className: z.icon, viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M10 1a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 1zM5.05 3.05a.75.75 0 011.06 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06zm9.9 0a.75.75 0 010 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zM10 6a4 4 0 100 8 4 4 0 000-8zm-9 4a.75.75 0 01.75-.75h1.5a.75.75 0 010 1.5h-1.5A.75.75 0 011 10zm15.75-.75a.75.75 0 000 1.5h1.5a.75.75 0 000-1.5h-1.5zM4.11 14.89a.75.75 0 010 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zm11.84 1.06a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 101.06 1.06l1.06-1.06zM10 17.25a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5a.75.75 0 01.75-.75z" }) }),
957
- /* @__PURE__ */ n("span", { className: z.title, children: s.title })
955
+ /* @__PURE__ */ m("div", { className: I.header, children: [
956
+ /* @__PURE__ */ a("svg", { className: I.icon, viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { d: "M10 1a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 1zM5.05 3.05a.75.75 0 011.06 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06zm9.9 0a.75.75 0 010 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zM10 6a4 4 0 100 8 4 4 0 000-8zm-9 4a.75.75 0 01.75-.75h1.5a.75.75 0 010 1.5h-1.5A.75.75 0 011 10zm15.75-.75a.75.75 0 000 1.5h1.5a.75.75 0 000-1.5h-1.5zM4.11 14.89a.75.75 0 010 1.06l-1.06 1.06a.75.75 0 11-1.06-1.06l1.06-1.06a.75.75 0 011.06 0zm11.84 1.06a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 101.06 1.06l1.06-1.06zM10 17.25a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5a.75.75 0 01.75-.75z" }) }),
957
+ /* @__PURE__ */ a("span", { className: I.title, children: s.title })
958
958
  ] }),
959
- s.description && /* @__PURE__ */ n("p", { className: z.description, children: s.description }),
960
- i ? /* @__PURE__ */ n("span", { className: z.resolvedBadge, children: i }) : /* @__PURE__ */ h("div", { className: z.actions, children: [
961
- /* @__PURE__ */ n(
959
+ s.description && /* @__PURE__ */ a("p", { className: I.description, children: s.description }),
960
+ o ? /* @__PURE__ */ a("span", { className: I.resolvedBadge, children: o }) : /* @__PURE__ */ m("div", { className: I.actions, children: [
961
+ /* @__PURE__ */ a(
962
962
  "button",
963
963
  {
964
- className: z.confirm,
964
+ className: I.confirm,
965
965
  onClick: () => t(s.id, s.payload),
966
966
  children: s.confirmLabel ?? r.proposalConfirm
967
967
  }
968
968
  ),
969
- /* @__PURE__ */ n(
969
+ /* @__PURE__ */ a(
970
970
  "button",
971
971
  {
972
- className: z.cancel,
973
- onClick: () => a(s.id),
972
+ className: I.cancel,
973
+ onClick: () => n(s.id),
974
974
  children: s.cancelLabel ?? r.proposalCancel
975
975
  }
976
976
  )
@@ -979,615 +979,651 @@ function xt({ part: e, onConfirm: t, onCancel: a }) {
979
979
  }
980
980
  );
981
981
  }
982
- const Ct = "_activity_2jjfs_1", Nt = "_indicator_2jjfs_13", kt = "_content_2jjfs_36", jt = "_title_2jjfs_40", St = "_description_2jjfs_45", U = {
983
- activity: Ct,
984
- indicator: Nt,
985
- content: kt,
986
- title: jt,
987
- description: St
982
+ const jt = "_activity_2jjfs_1", kt = "_indicator_2jjfs_13", St = "_content_2jjfs_36", At = "_title_2jjfs_40", zt = "_description_2jjfs_45", Q = {
983
+ activity: jt,
984
+ indicator: kt,
985
+ content: St,
986
+ title: At,
987
+ description: zt
988
988
  };
989
- function At({ part: e }) {
990
- return /* @__PURE__ */ h("div", { className: U.activity, "data-status": e.status, "data-juneau": "activity-part", children: [
991
- /* @__PURE__ */ n("span", { className: U.indicator, "aria-hidden": "true" }),
992
- /* @__PURE__ */ h("div", { className: U.content, children: [
993
- /* @__PURE__ */ n("div", { className: U.title, children: e.title }),
994
- e.description && /* @__PURE__ */ n("div", { className: U.description, children: e.description })
989
+ function Mt({ part: e }) {
990
+ return /* @__PURE__ */ m("div", { className: Q.activity, "data-status": e.status, "data-juneau": "activity-part", children: [
991
+ /* @__PURE__ */ a("span", { className: Q.indicator, "aria-hidden": "true" }),
992
+ /* @__PURE__ */ m("div", { className: Q.content, children: [
993
+ /* @__PURE__ */ a("div", { className: Q.title, children: e.title }),
994
+ e.description && /* @__PURE__ */ a("div", { className: Q.description, children: e.description })
995
995
  ] })
996
996
  ] });
997
997
  }
998
- const zt = "_card_jwkcu_1", Mt = "_cardClickable_jwkcu_14", Tt = "_header_jwkcu_24", It = "_title_jwkcu_30", Lt = "_subtitle_jwkcu_36", Bt = "_fields_jwkcu_41", Pt = "_fieldRow_jwkcu_48", $t = "_fieldLabel_jwkcu_55", Dt = "_fieldValue_jwkcu_61", Rt = "_badge_jwkcu_68", Et = "_badgeSuccess_jwkcu_76", Ht = "_badgeWarning_jwkcu_81", Vt = "_badgeDanger_jwkcu_86", Ot = "_badgeNeutral_jwkcu_91", k = {
999
- card: zt,
1000
- cardClickable: Mt,
1001
- header: Tt,
1002
- title: It,
1003
- subtitle: Lt,
1004
- fields: Bt,
1005
- fieldRow: Pt,
1006
- fieldLabel: $t,
1007
- fieldValue: Dt,
1008
- badge: Rt,
1009
- badgeSuccess: Et,
1010
- badgeWarning: Ht,
1011
- badgeDanger: Vt,
1012
- badgeNeutral: Ot
1013
- }, qt = {
1014
- success: k.badgeSuccess,
1015
- warning: k.badgeWarning,
1016
- danger: k.badgeDanger,
1017
- neutral: k.badgeNeutral
998
+ const It = "_card_jwkcu_1", Tt = "_cardClickable_jwkcu_14", Lt = "_header_jwkcu_24", Bt = "_title_jwkcu_30", $t = "_subtitle_jwkcu_36", Pt = "_fields_jwkcu_41", Dt = "_fieldRow_jwkcu_48", Rt = "_fieldLabel_jwkcu_55", Et = "_fieldValue_jwkcu_61", Ht = "_badge_jwkcu_68", Vt = "_badgeSuccess_jwkcu_76", Ot = "_badgeWarning_jwkcu_81", qt = "_badgeDanger_jwkcu_86", Wt = "_badgeNeutral_jwkcu_91", j = {
999
+ card: It,
1000
+ cardClickable: Tt,
1001
+ header: Lt,
1002
+ title: Bt,
1003
+ subtitle: $t,
1004
+ fields: Pt,
1005
+ fieldRow: Dt,
1006
+ fieldLabel: Rt,
1007
+ fieldValue: Et,
1008
+ badge: Ht,
1009
+ badgeSuccess: Vt,
1010
+ badgeWarning: Ot,
1011
+ badgeDanger: qt,
1012
+ badgeNeutral: Wt
1013
+ }, Ft = {
1014
+ success: j.badgeSuccess,
1015
+ warning: j.badgeWarning,
1016
+ danger: j.badgeDanger,
1017
+ neutral: j.badgeNeutral
1018
1018
  };
1019
- function Ne({ part: e, onEntityClick: t }) {
1020
- const { entity: a, entityType: r } = e, s = t !== void 0, i = /* @__PURE__ */ h(_e, { children: [
1021
- /* @__PURE__ */ h("div", { className: k.header, children: [
1022
- /* @__PURE__ */ n("span", { className: k.title, children: a.title }),
1023
- a.subtitle && /* @__PURE__ */ n("span", { className: k.subtitle, children: a.subtitle })
1019
+ function ke({ part: e, onEntityClick: t }) {
1020
+ const { entity: n, entityType: r } = e, s = t !== void 0, o = /* @__PURE__ */ m(ve, { children: [
1021
+ /* @__PURE__ */ m("div", { className: j.header, children: [
1022
+ /* @__PURE__ */ a("span", { className: j.title, children: n.title }),
1023
+ n.subtitle && /* @__PURE__ */ a("span", { className: j.subtitle, children: n.subtitle })
1024
1024
  ] }),
1025
- a.fields && a.fields.length > 0 && /* @__PURE__ */ n("dl", { className: k.fields, children: a.fields.map((d, o) => /* @__PURE__ */ h("div", { className: k.fieldRow, children: [
1026
- /* @__PURE__ */ n("dt", { className: k.fieldLabel, children: d.label }),
1027
- /* @__PURE__ */ n("dd", { className: k.fieldValue, children: d.badge ? /* @__PURE__ */ n("span", { className: `${k.badge} ${qt[d.badge]}`, children: d.value }) : d.value })
1028
- ] }, o)) })
1025
+ n.fields && n.fields.length > 0 && /* @__PURE__ */ a("dl", { className: j.fields, children: n.fields.map((d, i) => /* @__PURE__ */ m("div", { className: j.fieldRow, children: [
1026
+ /* @__PURE__ */ a("dt", { className: j.fieldLabel, children: d.label }),
1027
+ /* @__PURE__ */ a("dd", { className: j.fieldValue, children: d.badge ? /* @__PURE__ */ a("span", { className: `${j.badge} ${Ft[d.badge]}`, children: d.value }) : d.value })
1028
+ ] }, i)) })
1029
1029
  ] });
1030
- return s ? /* @__PURE__ */ n(
1030
+ return s ? /* @__PURE__ */ a(
1031
1031
  "button",
1032
1032
  {
1033
1033
  type: "button",
1034
- className: `${k.card} ${k.cardClickable}`,
1035
- onClick: () => t(a, r),
1034
+ className: `${j.card} ${j.cardClickable}`,
1035
+ onClick: () => t(n, r),
1036
1036
  "data-juneau": "entity-card",
1037
- children: i
1037
+ children: o
1038
1038
  }
1039
- ) : /* @__PURE__ */ n("div", { className: k.card, "data-juneau": "entity-card", children: i });
1039
+ ) : /* @__PURE__ */ a("div", { className: j.card, "data-juneau": "entity-card", children: o });
1040
1040
  }
1041
- const Wt = "_list_a2maw_1", Ft = "_listTitle_a2maw_11", me = {
1042
- list: Wt,
1043
- listTitle: Ft
1041
+ const Zt = "_list_a2maw_1", Jt = "_listTitle_a2maw_11", he = {
1042
+ list: Zt,
1043
+ listTitle: Jt
1044
1044
  };
1045
- function Zt({ part: e, onEntityClick: t }) {
1046
- return /* @__PURE__ */ h("div", { className: me.list, "data-juneau": "entity-list-part", children: [
1047
- e.title && /* @__PURE__ */ n("span", { className: me.listTitle, children: e.title }),
1048
- e.entities.map((a, r) => /* @__PURE__ */ n(
1049
- Ne,
1045
+ function Ut({ part: e, onEntityClick: t }) {
1046
+ return /* @__PURE__ */ m("div", { className: he.list, "data-juneau": "entity-list-part", children: [
1047
+ e.title && /* @__PURE__ */ a("span", { className: he.listTitle, children: e.title }),
1048
+ e.entities.map((n, r) => /* @__PURE__ */ a(
1049
+ ke,
1050
1050
  {
1051
- part: { type: "entity", entity: a, entityType: e.entityType },
1051
+ part: { type: "entity", entity: n, entityType: e.entityType },
1052
1052
  onEntityClick: t
1053
1053
  },
1054
- a.id ?? r
1054
+ n.id ?? r
1055
1055
  ))
1056
1056
  ] });
1057
1057
  }
1058
- const Jt = "_markdown_1yi3y_1", Ut = "_unknownPart_1yi3y_84", Kt = "_errorText_1yi3y_98", Gt = "_errorIcon_1yi3y_106", se = {
1059
- markdown: Jt,
1060
- unknownPart: Ut,
1061
- errorText: Kt,
1062
- errorIcon: Gt
1058
+ const Kt = "_markdown_1yi3y_1", Gt = "_unknownPart_1yi3y_84", Qt = "_errorText_1yi3y_98", Yt = "_errorIcon_1yi3y_106", re = {
1059
+ markdown: Kt,
1060
+ unknownPart: Gt,
1061
+ errorText: Qt,
1062
+ errorIcon: Yt
1063
1063
  };
1064
- function Qt({ part: e, onProposalConfirm: t, onProposalCancel: a, onEntityClick: r, renderPart: s }) {
1064
+ function Xt({ part: e, onProposalConfirm: t, onProposalCancel: n, onEntityClick: r, renderPart: s }) {
1065
1065
  if (s) {
1066
- const i = s(e);
1067
- if (i != null)
1068
- return /* @__PURE__ */ n(_e, { children: i });
1066
+ const o = s(e);
1067
+ if (o != null)
1068
+ return /* @__PURE__ */ a(ve, { children: o });
1069
1069
  }
1070
1070
  switch (e.type) {
1071
1071
  case "text":
1072
- return /* @__PURE__ */ n("div", { className: se.markdown, children: /* @__PURE__ */ n(je, { remarkPlugins: [Se], children: e.text }) });
1072
+ return /* @__PURE__ */ a("div", { className: re.markdown, children: /* @__PURE__ */ a(Ae, { remarkPlugins: [ze], children: e.text }) });
1073
1073
  case "table":
1074
- return /* @__PURE__ */ n(ut, { part: e });
1074
+ return /* @__PURE__ */ a(yt, { part: e });
1075
1075
  case "activity":
1076
- return /* @__PURE__ */ n(At, { part: e });
1076
+ return /* @__PURE__ */ a(Mt, { part: e });
1077
1077
  case "proposal":
1078
- return /* @__PURE__ */ n(
1079
- xt,
1078
+ return /* @__PURE__ */ a(
1079
+ Nt,
1080
1080
  {
1081
1081
  part: e,
1082
1082
  onConfirm: t,
1083
- onCancel: a
1083
+ onCancel: n
1084
1084
  }
1085
1085
  );
1086
1086
  case "entity":
1087
- return /* @__PURE__ */ n(Ne, { part: e, onEntityClick: r });
1087
+ return /* @__PURE__ */ a(ke, { part: e, onEntityClick: r });
1088
1088
  case "entity-list":
1089
- return /* @__PURE__ */ n(Zt, { part: e, onEntityClick: r });
1089
+ return /* @__PURE__ */ a(Ut, { part: e, onEntityClick: r });
1090
1090
  case "error":
1091
- return /* @__PURE__ */ h("span", { className: se.errorText, children: [
1092
- /* @__PURE__ */ n(rt, { className: se.errorIcon }),
1091
+ return /* @__PURE__ */ m("span", { className: re.errorText, children: [
1092
+ /* @__PURE__ */ a(it, { className: re.errorIcon }),
1093
1093
  e.message
1094
1094
  ] });
1095
1095
  default:
1096
- return globalThis.process?.env?.NODE_ENV !== "production" ? /* @__PURE__ */ h("div", { className: se.unknownPart, children: [
1096
+ return globalThis.process?.env?.NODE_ENV !== "production" ? /* @__PURE__ */ m("div", { className: re.unknownPart, children: [
1097
1097
  "Unhandled part type: ",
1098
- /* @__PURE__ */ n("code", { children: e.type }),
1098
+ /* @__PURE__ */ a("code", { children: e.type }),
1099
1099
  " — pass a",
1100
1100
  " ",
1101
- /* @__PURE__ */ n("code", { children: "renderPart" }),
1101
+ /* @__PURE__ */ a("code", { children: "renderPart" }),
1102
1102
  " prop to render it."
1103
1103
  ] }) : null;
1104
1104
  }
1105
1105
  }
1106
- const Yt = "_wrapper_1q20p_1", Xt = "_user_1q20p_8", ea = "_assistant_1q20p_12", ta = "_avatar_1q20p_16", aa = "_content_1q20p_43", na = "_bubble_1q20p_51", sa = "_card_1q20p_70", ra = "_empty_1q20p_92", L = {
1107
- wrapper: Yt,
1108
- user: Xt,
1109
- assistant: ea,
1110
- avatar: ta,
1111
- content: aa,
1112
- bubble: na,
1113
- card: sa,
1114
- empty: ra
1115
- }, ia = /* @__PURE__ */ new Set(["text", "error", "activity"]);
1116
- function ke(e) {
1117
- return !ia.has(e.type);
1106
+ const ea = "_wrapper_1q20p_1", ta = "_user_1q20p_8", aa = "_assistant_1q20p_12", na = "_avatar_1q20p_16", sa = "_content_1q20p_43", ra = "_bubble_1q20p_51", oa = "_card_1q20p_70", ia = "_empty_1q20p_92", B = {
1107
+ wrapper: ea,
1108
+ user: ta,
1109
+ assistant: aa,
1110
+ avatar: na,
1111
+ content: sa,
1112
+ bubble: ra,
1113
+ card: oa,
1114
+ empty: ia
1115
+ }, ca = /* @__PURE__ */ new Set(["text", "error", "activity"]);
1116
+ function Se(e) {
1117
+ return !ca.has(e.type);
1118
1118
  }
1119
- function oa(e) {
1119
+ function la(e) {
1120
1120
  const t = [];
1121
- return e.forEach((a, r) => {
1122
- const s = ke(a), i = t[t.length - 1];
1123
- if (i && !s && !i.card) {
1124
- i.parts.push({ part: a, index: r });
1121
+ return e.forEach((n, r) => {
1122
+ const s = Se(n), o = t[t.length - 1];
1123
+ if (o && !s && !o.card) {
1124
+ o.parts.push({ part: n, index: r });
1125
1125
  return;
1126
1126
  }
1127
- t.push({ card: s, parts: [{ part: a, index: r }] });
1127
+ t.push({ card: s, parts: [{ part: n, index: r }] });
1128
1128
  }), t;
1129
1129
  }
1130
- function ca({ message: e, onProposalConfirm: t, onProposalCancel: a, onEntityClick: r, assistantIcon: s, renderPart: i }) {
1131
- const d = R(), o = e.role === "user", l = (p, c) => /* @__PURE__ */ n(
1132
- Qt,
1130
+ function da({ message: e, onProposalConfirm: t, onProposalCancel: n, onEntityClick: r, assistantIcon: s, renderPart: o }) {
1131
+ const d = H(), i = e.role === "user", c = (p, l) => /* @__PURE__ */ a(
1132
+ Xt,
1133
1133
  {
1134
1134
  part: p,
1135
1135
  onProposalConfirm: t,
1136
- onProposalCancel: a,
1136
+ onProposalCancel: n,
1137
1137
  onEntityClick: r,
1138
- renderPart: i
1138
+ renderPart: o
1139
1139
  },
1140
- c
1141
- ), u = e.parts.some(ke);
1142
- return /* @__PURE__ */ h(
1140
+ l
1141
+ ), u = e.parts.some(Se);
1142
+ return /* @__PURE__ */ m(
1143
1143
  "div",
1144
1144
  {
1145
- className: `${L.wrapper} ${o ? L.user : L.assistant}`,
1145
+ className: `${B.wrapper} ${i ? B.user : B.assistant}`,
1146
1146
  "data-juneau": "message",
1147
1147
  "data-juneau-role": e.role,
1148
1148
  children: [
1149
- !o && /* @__PURE__ */ n("div", { className: L.avatar, "aria-hidden": "true", "data-juneau": "assistant-avatar", children: s ?? /* @__PURE__ */ n(Ce, {}) }),
1150
- u ? /* @__PURE__ */ n("div", { className: L.content, children: oa(e.parts).map((p, c) => /* @__PURE__ */ n(
1149
+ !i && /* @__PURE__ */ a("div", { className: B.avatar, "aria-hidden": "true", "data-juneau": "assistant-avatar", children: s ?? /* @__PURE__ */ a(je, {}) }),
1150
+ u ? /* @__PURE__ */ a("div", { className: B.content, children: la(e.parts).map((p, l) => /* @__PURE__ */ a(
1151
1151
  "div",
1152
1152
  {
1153
- className: p.card ? L.card : L.bubble,
1153
+ className: p.card ? B.card : B.bubble,
1154
1154
  "data-juneau-segment": p.card ? "card" : "bubble",
1155
- children: p.parts.map(({ part: f, index: C }) => l(f, C))
1155
+ children: p.parts.map(({ part: f, index: C }) => c(f, C))
1156
1156
  },
1157
- c
1158
- )) }) : /* @__PURE__ */ h("div", { className: L.bubble, "data-juneau-segment": "bubble", children: [
1159
- e.parts.map((p, c) => l(p, c)),
1160
- e.parts.length === 0 && /* @__PURE__ */ n("span", { className: L.empty })
1157
+ l
1158
+ )) }) : /* @__PURE__ */ m("div", { className: B.bubble, "data-juneau-segment": "bubble", children: [
1159
+ e.parts.map((p, l) => c(p, l)),
1160
+ e.parts.length === 0 && /* @__PURE__ */ a("span", { className: B.empty })
1161
1161
  ] }),
1162
- o && /* @__PURE__ */ n("div", { className: L.avatar, children: d.userLabel })
1162
+ i && /* @__PURE__ */ a("div", { className: B.avatar, children: d.userLabel })
1163
1163
  ]
1164
1164
  }
1165
1165
  );
1166
1166
  }
1167
- const la = "_wrapper_1dvvu_1", da = "_dot_1dvvu_8", ua = "_connectingLabel_1dvvu_19", K = {
1168
- wrapper: la,
1169
- dot: da,
1170
- connectingLabel: ua
1167
+ const ua = "_wrapper_1dvvu_1", pa = "_dot_1dvvu_8", ya = "_connectingLabel_1dvvu_19", Y = {
1168
+ wrapper: ua,
1169
+ dot: pa,
1170
+ connectingLabel: ya
1171
1171
  };
1172
- function pa({ connecting: e = !1 }) {
1173
- const t = R();
1174
- return /* @__PURE__ */ h(
1172
+ function ma({ connecting: e = !1 }) {
1173
+ const t = H();
1174
+ return /* @__PURE__ */ m(
1175
1175
  "div",
1176
1176
  {
1177
- className: K.wrapper,
1177
+ className: Y.wrapper,
1178
1178
  "aria-label": e ? t.connectingMessage : t.typingMessage,
1179
1179
  "data-juneau": "typing-indicator",
1180
1180
  children: [
1181
- /* @__PURE__ */ n("span", { className: K.dot }),
1182
- /* @__PURE__ */ n("span", { className: K.dot }),
1183
- /* @__PURE__ */ n("span", { className: K.dot }),
1184
- e && /* @__PURE__ */ n("span", { className: K.connectingLabel, children: t.connectingMessage })
1181
+ /* @__PURE__ */ a("span", { className: Y.dot }),
1182
+ /* @__PURE__ */ a("span", { className: Y.dot }),
1183
+ /* @__PURE__ */ a("span", { className: Y.dot }),
1184
+ e && /* @__PURE__ */ a("span", { className: Y.connectingLabel, children: t.connectingMessage })
1185
1185
  ]
1186
1186
  }
1187
1187
  );
1188
1188
  }
1189
- const ya = "_list_1f8gn_1", ma = "_empty_1f8gn_11", ha = "_hint_1f8gn_24", fa = "_typing_1f8gn_31", re = {
1190
- list: ya,
1191
- empty: ma,
1192
- hint: ha,
1193
- typing: fa
1189
+ const ha = "_list_1f8gn_1", fa = "_empty_1f8gn_11", ga = "_hint_1f8gn_24", _a = "_typing_1f8gn_31", oe = {
1190
+ list: ha,
1191
+ empty: fa,
1192
+ hint: ga,
1193
+ typing: _a
1194
1194
  };
1195
- function ga({ messages: e, isLoading: t, isConnecting: a, onProposalConfirm: r, onProposalCancel: s, onEntityClick: i, assistantIcon: d, renderPart: o, emptyState: l }) {
1196
- const u = R(), p = W(null);
1197
- return oe(() => {
1195
+ function fe({ messages: e, isLoading: t, isConnecting: n, onProposalConfirm: r, onProposalCancel: s, onEntityClick: o, assistantIcon: d, renderPart: i, emptyState: c }) {
1196
+ const u = H(), p = U(null);
1197
+ return ce(() => {
1198
1198
  p.current?.scrollIntoView({ behavior: "smooth" });
1199
- }, [e, t]), /* @__PURE__ */ h("div", { className: re.list, "data-juneau": "message-list", children: [
1200
- e.length === 0 && (l ?? /* @__PURE__ */ h("div", { className: re.empty, "data-juneau": "empty-state", children: [
1201
- /* @__PURE__ */ n("p", { children: u.emptyStateText }),
1202
- /* @__PURE__ */ n("p", { className: re.hint, children: /* @__PURE__ */ n("em", { children: u.emptyStateHint }) })
1199
+ }, [e, t]), /* @__PURE__ */ m("div", { className: oe.list, "data-juneau": "message-list", children: [
1200
+ e.length === 0 && (c ?? /* @__PURE__ */ m("div", { className: oe.empty, "data-juneau": "empty-state", children: [
1201
+ /* @__PURE__ */ a("p", { children: u.emptyStateText }),
1202
+ /* @__PURE__ */ a("p", { className: oe.hint, children: /* @__PURE__ */ a("em", { children: u.emptyStateHint }) })
1203
1203
  ] })),
1204
- e.map((c) => /* @__PURE__ */ n(
1205
- ca,
1204
+ e.map((l) => /* @__PURE__ */ a(
1205
+ da,
1206
1206
  {
1207
- message: c,
1207
+ message: l,
1208
1208
  onProposalConfirm: r,
1209
1209
  onProposalCancel: s,
1210
- onEntityClick: i,
1210
+ onEntityClick: o,
1211
1211
  assistantIcon: d,
1212
- renderPart: o
1212
+ renderPart: i
1213
1213
  },
1214
- c.id
1214
+ l.id
1215
1215
  )),
1216
- t && /* @__PURE__ */ n("div", { className: re.typing, children: /* @__PURE__ */ n(pa, { connecting: a }) }),
1217
- /* @__PURE__ */ n("div", { ref: p })
1216
+ t && /* @__PURE__ */ a("div", { className: oe.typing, children: /* @__PURE__ */ a(ma, { connecting: n }) }),
1217
+ /* @__PURE__ */ a("div", { ref: p })
1218
1218
  ] });
1219
1219
  }
1220
- const _a = "_wrapper_v8iyr_1", ba = "_textarea_v8iyr_11", va = "_toolbar_v8iyr_35", wa = "_actions_v8iyr_45", xa = "_actionBtn_v8iyr_52", Ca = "_sendBtn_v8iyr_85", Na = "_spinnerIcon_v8iyr_116", ka = "_stopBtn_v8iyr_126", ja = "_stopIcon_v8iyr_149", B = {
1221
- wrapper: _a,
1222
- textarea: ba,
1223
- toolbar: va,
1224
- actions: wa,
1225
- actionBtn: xa,
1226
- sendBtn: Ca,
1227
- spinnerIcon: Na,
1220
+ const ba = "_wrapper_v8iyr_1", va = "_textarea_v8iyr_11", wa = "_toolbar_v8iyr_35", xa = "_actions_v8iyr_45", Ca = "_actionBtn_v8iyr_52", Na = "_sendBtn_v8iyr_85", ja = "_spinnerIcon_v8iyr_116", ka = "_stopBtn_v8iyr_126", Sa = "_stopIcon_v8iyr_149", P = {
1221
+ wrapper: ba,
1222
+ textarea: va,
1223
+ toolbar: wa,
1224
+ actions: xa,
1225
+ actionBtn: Ca,
1226
+ sendBtn: Na,
1227
+ spinnerIcon: ja,
1228
1228
  stopBtn: ka,
1229
- stopIcon: ja
1229
+ stopIcon: Sa
1230
1230
  };
1231
- function Sa({ value: e, onChange: t, onSend: a, onStop: r, isLoading: s, placeholder: i, actions: d, sendIcon: o }) {
1232
- const l = R(), u = W(null), p = W(!1);
1233
- oe(() => {
1231
+ function Aa({ value: e, onChange: t, onSend: n, onStop: r, isLoading: s, placeholder: o, actions: d, sendIcon: i }) {
1232
+ const c = H(), u = U(null), p = U(!1);
1233
+ ce(() => {
1234
1234
  p.current && !s && u.current?.focus(), p.current = s;
1235
1235
  }, [s]);
1236
- const c = [
1237
- { icon: /* @__PURE__ */ n(Qe, {}), label: l.actionAddFile },
1238
- { icon: /* @__PURE__ */ n(Ye, {}), label: l.actionQuickActions },
1239
- { icon: /* @__PURE__ */ n(Xe, {}), label: l.actionNew },
1240
- { icon: /* @__PURE__ */ n(et, {}), label: l.actionHistory },
1241
- { icon: /* @__PURE__ */ n(tt, {}), label: l.actionRules }
1242
- ], f = d ?? c, C = (y) => {
1243
- y.key === "Enter" && !y.shiftKey && (y.preventDefault(), s || a());
1236
+ const l = [
1237
+ { icon: /* @__PURE__ */ a(Xe, {}), label: c.actionAddFile },
1238
+ { icon: /* @__PURE__ */ a(et, {}), label: c.actionQuickActions },
1239
+ { icon: /* @__PURE__ */ a(tt, {}), label: c.actionNew },
1240
+ { icon: /* @__PURE__ */ a(at, {}), label: c.actionHistory },
1241
+ { icon: /* @__PURE__ */ a(nt, {}), label: c.actionRules }
1242
+ ], f = d ?? l, C = (y) => {
1243
+ y.key === "Enter" && !y.shiftKey && (y.preventDefault(), s || n());
1244
1244
  };
1245
- return /* @__PURE__ */ h("div", { className: B.wrapper, "data-juneau": "input", children: [
1246
- /* @__PURE__ */ n(
1245
+ return /* @__PURE__ */ m("div", { className: P.wrapper, "data-juneau": "input", children: [
1246
+ /* @__PURE__ */ a(
1247
1247
  "textarea",
1248
1248
  {
1249
1249
  ref: u,
1250
- className: B.textarea,
1250
+ className: P.textarea,
1251
1251
  "data-juneau": "input-textarea",
1252
1252
  value: e,
1253
1253
  onChange: (y) => t(y.target.value),
1254
1254
  onKeyDown: C,
1255
- placeholder: i ?? l.inputPlaceholder,
1255
+ placeholder: o ?? c.inputPlaceholder,
1256
1256
  rows: 3,
1257
- "aria-label": l.sendMessage
1257
+ "aria-label": c.sendMessage
1258
1258
  }
1259
1259
  ),
1260
- /* @__PURE__ */ h("div", { className: B.toolbar, children: [
1261
- f.length > 0 && /* @__PURE__ */ n("div", { className: B.actions, children: f.map((y, M) => /* @__PURE__ */ h(
1260
+ /* @__PURE__ */ m("div", { className: P.toolbar, children: [
1261
+ f.length > 0 && /* @__PURE__ */ a("div", { className: P.actions, children: f.map((y, T) => /* @__PURE__ */ m(
1262
1262
  "button",
1263
1263
  {
1264
- className: B.actionBtn,
1264
+ className: P.actionBtn,
1265
1265
  type: "button",
1266
1266
  disabled: s,
1267
1267
  "aria-label": y.label,
1268
1268
  onClick: y.onClick,
1269
1269
  children: [
1270
1270
  y.icon,
1271
- /* @__PURE__ */ n("span", { children: y.label })
1271
+ /* @__PURE__ */ a("span", { children: y.label })
1272
1272
  ]
1273
1273
  },
1274
- M
1274
+ T
1275
1275
  )) }),
1276
- s && r ? /* @__PURE__ */ h(
1276
+ s && r ? /* @__PURE__ */ m(
1277
1277
  "button",
1278
1278
  {
1279
- className: B.stopBtn,
1279
+ className: P.stopBtn,
1280
1280
  onClick: r,
1281
- "aria-label": l.stopMessage,
1281
+ "aria-label": c.stopMessage,
1282
1282
  type: "button",
1283
+ "data-juneau": "input-stop",
1283
1284
  children: [
1284
- /* @__PURE__ */ n("svg", { className: B.stopIcon, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ n("rect", { x: "6", y: "6", width: "12", height: "12", rx: "2" }) }),
1285
- /* @__PURE__ */ n("span", { children: l.stopMessage })
1285
+ /* @__PURE__ */ a("svg", { className: P.stopIcon, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ a("rect", { x: "6", y: "6", width: "12", height: "12", rx: "2" }) }),
1286
+ /* @__PURE__ */ a("span", { children: c.stopMessage })
1286
1287
  ]
1287
1288
  }
1288
- ) : /* @__PURE__ */ h(
1289
+ ) : /* @__PURE__ */ m(
1289
1290
  "button",
1290
1291
  {
1291
- className: B.sendBtn,
1292
- onClick: a,
1292
+ className: P.sendBtn,
1293
+ onClick: n,
1293
1294
  disabled: s || !e.trim(),
1294
- "aria-label": l.sendMessage,
1295
+ "aria-label": c.sendMessage,
1295
1296
  type: "button",
1297
+ "data-juneau": "input-send",
1296
1298
  children: [
1297
- s ? /* @__PURE__ */ n("svg", { className: B.spinnerIcon, viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeDasharray: "32", strokeDashoffset: "12" }) }) : o ?? /* @__PURE__ */ n(Ge, {}),
1298
- /* @__PURE__ */ n("span", { children: l.sendMessage })
1299
+ s ? /* @__PURE__ */ a("svg", { className: P.spinnerIcon, viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeDasharray: "32", strokeDashoffset: "12" }) }) : i ?? /* @__PURE__ */ a(Ye, {}),
1300
+ /* @__PURE__ */ a("span", { children: c.sendMessage })
1299
1301
  ]
1300
1302
  }
1301
1303
  )
1302
1304
  ] })
1303
1305
  ] });
1304
1306
  }
1305
- const Aa = "_wrapper_1kefv_1", za = "_icon_1kefv_14", Ma = "_message_1kefv_20", Ta = "_dismiss_1kefv_24", ie = {
1306
- wrapper: Aa,
1307
- icon: za,
1308
- message: Ma,
1307
+ const za = "_wrapper_1kefv_1", Ma = "_icon_1kefv_14", Ia = "_message_1kefv_20", Ta = "_dismiss_1kefv_24", ie = {
1308
+ wrapper: za,
1309
+ icon: Ma,
1310
+ message: Ia,
1309
1311
  dismiss: Ta
1310
1312
  };
1311
- function Ia({ message: e, onDismiss: t }) {
1312
- const a = R();
1313
- return /* @__PURE__ */ h("div", { className: ie.wrapper, role: "alert", "data-juneau": "error", children: [
1314
- /* @__PURE__ */ n("svg", { className: ie.icon, viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { fillRule: "evenodd", d: "M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" }) }),
1315
- /* @__PURE__ */ n("span", { className: ie.message, children: e }),
1316
- t && /* @__PURE__ */ n("button", { className: ie.dismiss, onClick: t, "aria-label": a.errorDismiss, children: /* @__PURE__ */ n("svg", { viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z" }) }) })
1313
+ function La({ message: e, onDismiss: t }) {
1314
+ const n = H();
1315
+ return /* @__PURE__ */ m("div", { className: ie.wrapper, role: "alert", "data-juneau": "error", children: [
1316
+ /* @__PURE__ */ a("svg", { className: ie.icon, viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { fillRule: "evenodd", d: "M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" }) }),
1317
+ /* @__PURE__ */ a("span", { className: ie.message, children: e }),
1318
+ t && /* @__PURE__ */ a("button", { className: ie.dismiss, onClick: t, "aria-label": n.errorDismiss, children: /* @__PURE__ */ a("svg", { viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { d: "M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z" }) }) })
1317
1319
  ] });
1318
1320
  }
1319
- const La = "_chat_1acbe_1", Ba = {
1320
- chat: La
1321
+ const Ba = "_chat_tboxh_1", $a = "_aboveInput_tboxh_8", Pa = "_start_tboxh_15", Da = "_startColumn_tboxh_24", Ra = "_belowInput_tboxh_32", J = {
1322
+ chat: Ba,
1323
+ aboveInput: $a,
1324
+ start: Pa,
1325
+ startColumn: Da,
1326
+ belowInput: Ra
1321
1327
  };
1322
- function Pa({
1328
+ function Ea({
1323
1329
  messages: e,
1324
1330
  input: t,
1325
- isLoading: a,
1331
+ isLoading: n,
1326
1332
  isConnecting: r,
1327
1333
  error: s,
1328
- onInputChange: i,
1334
+ onInputChange: o,
1329
1335
  onSend: d,
1330
- onStop: o,
1331
- onProposalConfirm: l,
1336
+ onStop: i,
1337
+ onProposalConfirm: c,
1332
1338
  onProposalCancel: u,
1333
1339
  onEntityClick: p,
1334
- placeholder: c,
1340
+ placeholder: l,
1335
1341
  assistantIcon: f,
1336
1342
  actions: C,
1337
1343
  sendIcon: y,
1338
- renderPart: M,
1344
+ renderPart: T,
1339
1345
  emptyState: A,
1340
- className: T,
1341
- style: I
1346
+ aboveInput: M,
1347
+ centerInputWhenEmpty: L = !1,
1348
+ belowInput: V,
1349
+ className: k,
1350
+ style: S
1342
1351
  }) {
1343
- return /* @__PURE__ */ h(
1352
+ const $ = s && /* @__PURE__ */ a(La, { message: s }), O = M != null && /* @__PURE__ */ a("div", { className: J.aboveInput, "data-juneau": "above-input", "data-juneau-above-input": "", children: M }), q = /* @__PURE__ */ a(
1353
+ Aa,
1354
+ {
1355
+ value: t,
1356
+ onChange: o,
1357
+ onSend: d,
1358
+ onStop: i,
1359
+ isLoading: n,
1360
+ placeholder: l,
1361
+ actions: C,
1362
+ sendIcon: y
1363
+ }
1364
+ );
1365
+ return L && e.length === 0 ? /* @__PURE__ */ a(
1366
+ "div",
1367
+ {
1368
+ className: [J.chat, k].filter(Boolean).join(" "),
1369
+ style: S,
1370
+ "data-juneau": "chat",
1371
+ children: /* @__PURE__ */ a("div", { className: J.start, "data-juneau": "chat-start", children: /* @__PURE__ */ m("div", { className: J.startColumn, children: [
1372
+ A ?? /* @__PURE__ */ a(
1373
+ fe,
1374
+ {
1375
+ messages: e,
1376
+ isLoading: n,
1377
+ isConnecting: r,
1378
+ onProposalConfirm: c,
1379
+ onProposalCancel: u
1380
+ }
1381
+ ),
1382
+ $,
1383
+ O,
1384
+ q,
1385
+ V != null && /* @__PURE__ */ a("div", { className: J.belowInput, "data-juneau": "below-input", children: V })
1386
+ ] }) })
1387
+ }
1388
+ ) : /* @__PURE__ */ m(
1344
1389
  "div",
1345
1390
  {
1346
- className: [Ba.chat, T].filter(Boolean).join(" "),
1347
- style: I,
1391
+ className: [J.chat, k].filter(Boolean).join(" "),
1392
+ style: S,
1348
1393
  "data-juneau": "chat",
1349
1394
  children: [
1350
- /* @__PURE__ */ n(
1351
- ga,
1395
+ /* @__PURE__ */ a(
1396
+ fe,
1352
1397
  {
1353
1398
  messages: e,
1354
- isLoading: a,
1399
+ isLoading: n,
1355
1400
  isConnecting: r,
1356
- onProposalConfirm: l,
1401
+ onProposalConfirm: c,
1357
1402
  onProposalCancel: u,
1358
1403
  onEntityClick: p,
1359
1404
  assistantIcon: f,
1360
- renderPart: M,
1405
+ renderPart: T,
1361
1406
  emptyState: A
1362
1407
  }
1363
1408
  ),
1364
- s && /* @__PURE__ */ n(Ia, { message: s }),
1365
- /* @__PURE__ */ n(
1366
- Sa,
1367
- {
1368
- value: t,
1369
- onChange: i,
1370
- onSend: d,
1371
- onStop: o,
1372
- isLoading: a,
1373
- placeholder: c,
1374
- actions: C,
1375
- sendIcon: y
1376
- }
1377
- )
1409
+ $,
1410
+ O,
1411
+ q
1378
1412
  ]
1379
1413
  }
1380
1414
  );
1381
1415
  }
1382
- const $a = "_header_1ss3g_1", Da = "_left_1ss3g_12", Ra = "_icon_1ss3g_18", Ea = "_title_1ss3g_23", Ha = "_resetBtn_1ss3g_29", Va = "_actions_1ss3g_50", Oa = "_badge_1ss3g_57", D = {
1383
- header: $a,
1384
- left: Da,
1385
- icon: Ra,
1386
- title: Ea,
1387
- resetBtn: Ha,
1388
- actions: Va,
1389
- badge: Oa
1416
+ const Ha = "_header_1ss3g_1", Va = "_left_1ss3g_12", Oa = "_icon_1ss3g_18", qa = "_title_1ss3g_23", Wa = "_resetBtn_1ss3g_29", Fa = "_actions_1ss3g_50", Za = "_badge_1ss3g_57", E = {
1417
+ header: Ha,
1418
+ left: Va,
1419
+ icon: Oa,
1420
+ title: qa,
1421
+ resetBtn: Wa,
1422
+ actions: Fa,
1423
+ badge: Za
1390
1424
  };
1391
- function qa({
1425
+ function Ja({
1392
1426
  title: e,
1393
1427
  onMinimize: t,
1394
- isMinimized: a,
1428
+ isMinimized: n,
1395
1429
  icon: r,
1396
1430
  onReset: s,
1397
- badge: i,
1431
+ badge: o,
1398
1432
  headerActions: d
1399
1433
  }) {
1400
- const o = R();
1401
- return /* @__PURE__ */ h("div", { className: D.header, "data-juneau": "header", children: [
1402
- /* @__PURE__ */ h("div", { className: D.left, children: [
1403
- /* @__PURE__ */ n("span", { className: D.icon, "aria-hidden": "true", "data-juneau": "header-icon", children: r ?? /* @__PURE__ */ n(Ce, {}) }),
1404
- /* @__PURE__ */ n("span", { className: D.title, children: e ?? o.sidebarTitle }),
1405
- i && /* @__PURE__ */ n("span", { className: D.badge, "data-juneau": "header-badge", children: i })
1434
+ const i = H();
1435
+ return /* @__PURE__ */ m("div", { className: E.header, "data-juneau": "header", children: [
1436
+ /* @__PURE__ */ m("div", { className: E.left, children: [
1437
+ /* @__PURE__ */ a("span", { className: E.icon, "aria-hidden": "true", "data-juneau": "header-icon", children: r ?? /* @__PURE__ */ a(je, {}) }),
1438
+ /* @__PURE__ */ a("span", { className: E.title, children: e ?? i.sidebarTitle }),
1439
+ o && /* @__PURE__ */ a("span", { className: E.badge, "data-juneau": "header-badge", children: o })
1406
1440
  ] }),
1407
- (t || s || d) && /* @__PURE__ */ h("div", { className: D.actions, children: [
1441
+ (t || s || d) && /* @__PURE__ */ m("div", { className: E.actions, children: [
1408
1442
  d,
1409
- s && /* @__PURE__ */ n(
1443
+ s && /* @__PURE__ */ a(
1410
1444
  "button",
1411
1445
  {
1412
- className: D.resetBtn,
1446
+ className: E.resetBtn,
1413
1447
  onClick: s,
1414
- title: o.resetConversation,
1415
- "aria-label": o.resetConversation,
1448
+ title: i.resetConversation,
1449
+ "aria-label": i.resetConversation,
1416
1450
  "data-juneau": "header-reset",
1417
- children: /* @__PURE__ */ n(st, {})
1451
+ children: /* @__PURE__ */ a(ot, {})
1418
1452
  }
1419
1453
  ),
1420
- t && /* @__PURE__ */ n(
1454
+ t && /* @__PURE__ */ a(
1421
1455
  "button",
1422
1456
  {
1423
- className: D.resetBtn,
1457
+ className: E.resetBtn,
1424
1458
  onClick: t,
1425
- title: a ? o.expandSidebar : o.minimizeSidebar,
1426
- "aria-label": a ? o.expandSidebar : o.minimizeSidebar,
1459
+ title: n ? i.expandSidebar : i.minimizeSidebar,
1460
+ "aria-label": n ? i.expandSidebar : i.minimizeSidebar,
1427
1461
  "data-juneau": "header-minimize",
1428
- children: a ? /* @__PURE__ */ n(nt, {}) : /* @__PURE__ */ n(at, {})
1462
+ children: n ? /* @__PURE__ */ a(rt, {}) : /* @__PURE__ */ a(st, {})
1429
1463
  }
1430
1464
  )
1431
1465
  ] })
1432
1466
  ] });
1433
1467
  }
1434
- const Wa = "_sidebar_17ski_1", Fa = "_minimized_17ski_20", he = {
1435
- sidebar: Wa,
1436
- minimized: Fa
1468
+ const Ua = "_sidebar_17ski_1", Ka = "_minimized_17ski_20", ge = {
1469
+ sidebar: Ua,
1470
+ minimized: Ka
1437
1471
  };
1438
- function hn({
1472
+ function bn({
1439
1473
  title: e,
1440
1474
  icon: t,
1441
- assistantIcon: a,
1475
+ assistantIcon: n,
1442
1476
  actions: r,
1443
1477
  sendIcon: s,
1444
- height: i = "60vh",
1478
+ height: o = "60vh",
1445
1479
  className: d,
1446
- style: o,
1447
- onReset: l,
1480
+ style: i,
1481
+ onReset: c,
1448
1482
  confirmReset: u,
1449
1483
  renderPart: p,
1450
- onEntityClick: c,
1484
+ onEntityClick: l,
1451
1485
  headerActions: f,
1452
1486
  badge: C,
1453
1487
  minimized: y,
1454
- onMinimizedChange: M,
1455
- emptyState: A
1488
+ onMinimizedChange: T,
1489
+ emptyState: A,
1490
+ aboveInput: M
1456
1491
  }) {
1457
- const [T, I] = E(!1), F = y !== void 0, j = F ? y : T, H = () => {
1458
- const w = !j;
1459
- F || I(w), M?.(w);
1492
+ const [L, V] = W(!1), k = y !== void 0, S = k ? y : L, $ = () => {
1493
+ const g = !S;
1494
+ k || V(g), T?.(g);
1460
1495
  }, {
1461
- messages: V,
1462
- input: G,
1463
- setInput: Q,
1464
- sendMessage: Y,
1465
- stop: X,
1466
- isLoading: ee,
1467
- isConnecting: O,
1468
- error: te,
1469
- reset: ae,
1470
- confirmProposal: m,
1471
- cancelProposal: v
1472
- } = Ke(), _ = l ? async () => {
1473
- u && !await u() || (ae(), l());
1496
+ messages: O,
1497
+ input: q,
1498
+ setInput: X,
1499
+ sendMessage: ee,
1500
+ stop: te,
1501
+ isLoading: F,
1502
+ isConnecting: ae,
1503
+ error: ne,
1504
+ reset: h,
1505
+ confirmProposal: v,
1506
+ cancelProposal: b
1507
+ } = Qe(), w = c ? async () => {
1508
+ u && !await u() || (h(), c());
1474
1509
  } : void 0;
1475
- return /* @__PURE__ */ h(
1510
+ return /* @__PURE__ */ m(
1476
1511
  "aside",
1477
1512
  {
1478
- className: [he.sidebar, j ? he.minimized : "", d].filter(Boolean).join(" "),
1479
- style: { height: j ? void 0 : i, ...o },
1513
+ className: [ge.sidebar, S ? ge.minimized : "", d].filter(Boolean).join(" "),
1514
+ style: { height: S ? void 0 : o, ...i },
1480
1515
  "data-juneau": "sidebar",
1481
1516
  children: [
1482
- /* @__PURE__ */ n(
1483
- qa,
1517
+ /* @__PURE__ */ a(
1518
+ Ja,
1484
1519
  {
1485
1520
  title: e,
1486
1521
  icon: t,
1487
- onMinimize: H,
1488
- isMinimized: j,
1489
- onReset: _,
1522
+ onMinimize: $,
1523
+ isMinimized: S,
1524
+ onReset: w,
1490
1525
  badge: C,
1491
1526
  headerActions: f
1492
1527
  }
1493
1528
  ),
1494
- !j && /* @__PURE__ */ n(
1495
- Pa,
1529
+ !S && /* @__PURE__ */ a(
1530
+ Ea,
1496
1531
  {
1497
- messages: V,
1498
- input: G,
1499
- isLoading: ee,
1500
- isConnecting: O,
1501
- error: te,
1502
- onInputChange: Q,
1503
- onSend: Y,
1504
- onStop: X,
1505
- onProposalConfirm: m,
1506
- onProposalCancel: v,
1507
- assistantIcon: a ?? t,
1532
+ messages: O,
1533
+ input: q,
1534
+ isLoading: F,
1535
+ isConnecting: ae,
1536
+ error: ne,
1537
+ onInputChange: X,
1538
+ onSend: ee,
1539
+ onStop: te,
1540
+ onProposalConfirm: v,
1541
+ onProposalCancel: b,
1542
+ assistantIcon: n ?? t,
1508
1543
  actions: r,
1509
1544
  sendIcon: s,
1510
1545
  renderPart: p,
1511
- onEntityClick: c,
1512
- emptyState: A
1546
+ onEntityClick: l,
1547
+ emptyState: A,
1548
+ aboveInput: M
1513
1549
  }
1514
1550
  )
1515
1551
  ]
1516
1552
  }
1517
1553
  );
1518
1554
  }
1519
- const Za = "_list_180ms_1", Ja = "_item_180ms_10", Ua = "_chat_180ms_16", Ka = "_chatActive_180ms_36", Ga = "_title_180ms_40", Qa = "_date_180ms_50", Ya = "_empty_180ms_82", P = {
1520
- list: Za,
1521
- item: Ja,
1522
- chat: Ua,
1523
- chatActive: Ka,
1524
- title: Ga,
1525
- date: Qa,
1555
+ const Ga = "_list_180ms_1", Qa = "_item_180ms_10", Ya = "_chat_180ms_16", Xa = "_chatActive_180ms_36", en = "_title_180ms_40", tn = "_date_180ms_50", an = "_empty_180ms_82", D = {
1556
+ list: Ga,
1557
+ item: Qa,
1558
+ chat: Ya,
1559
+ chatActive: Xa,
1560
+ title: en,
1561
+ date: tn,
1526
1562
  delete: "_delete_180ms_56",
1527
- empty: Ya
1563
+ empty: an
1528
1564
  };
1529
- function fn({ chats: e, onSelect: t, activeChatId: a, onDelete: r }) {
1530
- const s = R();
1531
- return e.length === 0 ? /* @__PURE__ */ n("p", { className: P.empty, children: s.historyEmpty }) : /* @__PURE__ */ n("ul", { className: P.list, "data-juneau": "history-list", children: e.map((i) => /* @__PURE__ */ h("li", { className: P.item, children: [
1532
- /* @__PURE__ */ h(
1565
+ function vn({ chats: e, onSelect: t, activeChatId: n, onDelete: r }) {
1566
+ const s = H();
1567
+ return e.length === 0 ? /* @__PURE__ */ a("p", { className: D.empty, children: s.historyEmpty }) : /* @__PURE__ */ a("ul", { className: D.list, "data-juneau": "history-list", children: e.map((o) => /* @__PURE__ */ m("li", { className: D.item, children: [
1568
+ /* @__PURE__ */ m(
1533
1569
  "button",
1534
1570
  {
1535
- className: i.id === a ? `${P.chat} ${P.chatActive}` : P.chat,
1536
- onClick: () => t(i.id),
1571
+ className: o.id === n ? `${D.chat} ${D.chatActive}` : D.chat,
1572
+ onClick: () => t(o.id),
1537
1573
  children: [
1538
- /* @__PURE__ */ n("span", { className: P.title, children: i.title }),
1539
- /* @__PURE__ */ n("span", { className: P.date, children: i.updatedAt.toLocaleDateString(void 0, { day: "numeric", month: "short" }) })
1574
+ /* @__PURE__ */ a("span", { className: D.title, children: o.title }),
1575
+ /* @__PURE__ */ a("span", { className: D.date, children: o.updatedAt.toLocaleDateString(void 0, { day: "numeric", month: "short" }) })
1540
1576
  ]
1541
1577
  }
1542
1578
  ),
1543
- r && /* @__PURE__ */ n(
1579
+ r && /* @__PURE__ */ a(
1544
1580
  "button",
1545
1581
  {
1546
- className: P.delete,
1547
- onClick: () => r(i.id),
1582
+ className: D.delete,
1583
+ onClick: () => r(o.id),
1548
1584
  "aria-label": s.historyDeleteChat,
1549
- children: /* @__PURE__ */ n("svg", { viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z" }) })
1585
+ children: /* @__PURE__ */ a("svg", { viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { d: "M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z" }) })
1550
1586
  }
1551
1587
  )
1552
- ] }, i.id)) });
1588
+ ] }, o.id)) });
1553
1589
  }
1554
1590
  export {
1555
- At as AiActivityPart,
1556
- Pa as AiChat,
1557
- le as AiChatContext,
1558
- qa as AiChatHeader,
1559
- fn as AiChatHistoryList,
1560
- yn as AiChatProvider,
1561
- Ne as AiEntityCard,
1562
- Zt as AiEntityListPart,
1563
- Ia as AiError,
1564
- Sa as AiInput,
1565
- ca as AiMessageBubble,
1566
- ga as AiMessageList,
1567
- Qt as AiMessagePartRenderer,
1568
- xt as AiProposalCard,
1569
- hn as AiSidebar,
1570
- ut as AiTablePart,
1571
- pa as AiTypingIndicator,
1572
- un as JuneauProvider,
1573
- ue as consumeStream,
1574
- dn as createFetchStreamAdapter,
1575
- ln as createSseAdapter,
1576
- g as delay,
1577
- rn as deserializeMessages,
1578
- ze as getMessageText,
1579
- nn as isChartPart,
1580
- be as isProposalPart,
1581
- mn as juneauCs,
1582
- we as juneauEn,
1583
- cn as mockAdapter,
1584
- ve as parseJuneauWire,
1585
- sn as serializeForStorage,
1586
- Ae as serializeMessages,
1587
- on as trimChats,
1588
- Ie as trimHistory,
1589
- Fe as useAiChat,
1590
- Ke as useAiChatContext,
1591
- pn as useAiChatContextSafe
1591
+ Mt as AiActivityPart,
1592
+ Ea as AiChat,
1593
+ de as AiChatContext,
1594
+ Ja as AiChatHeader,
1595
+ vn as AiChatHistoryList,
1596
+ gn as AiChatProvider,
1597
+ ke as AiEntityCard,
1598
+ Ut as AiEntityListPart,
1599
+ La as AiError,
1600
+ Aa as AiInput,
1601
+ da as AiMessageBubble,
1602
+ fe as AiMessageList,
1603
+ Xt as AiMessagePartRenderer,
1604
+ Nt as AiProposalCard,
1605
+ bn as AiSidebar,
1606
+ yt as AiTablePart,
1607
+ ma as AiTypingIndicator,
1608
+ hn as JuneauProvider,
1609
+ pe as consumeStream,
1610
+ mn as createFetchStreamAdapter,
1611
+ yn as createSseAdapter,
1612
+ _ as delay,
1613
+ dn as deserializeMessages,
1614
+ Ie as getMessageText,
1615
+ cn as isChartPart,
1616
+ we as isProposalPart,
1617
+ _n as juneauCs,
1618
+ Ce as juneauEn,
1619
+ pn as mockAdapter,
1620
+ xe as parseJuneauWire,
1621
+ ln as serializeForStorage,
1622
+ Me as serializeMessages,
1623
+ un as trimChats,
1624
+ Be as trimHistory,
1625
+ Je as useAiChat,
1626
+ Qe as useAiChatContext,
1627
+ fn as useAiChatContextSafe
1592
1628
  };
1593
1629
  //# sourceMappingURL=index.js.map