juneau 0.15.0 → 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 H, useRef as F, useEffect as ie, useCallback as j, useMemo as ge, useContext as ce, createContext as be } from "react";
2
- import { jsx as n, jsxs as m, Fragment as _e } from "react/jsx-runtime";
3
- import Se from "react-markdown";
4
- import Ae from "remark-gfm";
5
- function ze(e) {
6
- return e.map((t) => t.role !== "assistant" || t.parts.some((a) => a.type === "text") ? t : { ...t, parts: [{ type: "text", text: "" }] });
7
- }
8
- const b = (e) => new Promise((t) => setTimeout(t, e));
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";
9
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
+ }
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 ve(e) {
16
+ function we(e) {
17
17
  return e.type === "proposal";
18
18
  }
19
- function sn(e) {
19
+ function cn(e) {
20
20
  return e.type === "chart" && Array.isArray(e.series);
21
21
  }
22
- const Ie = 1;
23
- function rn(e) {
22
+ const Te = 1;
23
+ function ln(e) {
24
24
  return e.map((t) => ({
25
25
  ...t,
26
- v: Ie,
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 ve(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 on(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 Le(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 cn(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(), ln = {
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 ? Me(t).toLowerCase() : "";
53
- a.includes("activity") || a.includes("progress") || a.includes("document") || a.includes("dokument") ? yield* Be() : a.includes("table") || a.includes("data") || a.includes("list") || a.includes("show") ? yield* Pe() : a.includes("proposal") || a.includes("suggest") || a.includes("recommend") ? yield* $e() : a.includes("entity") || a.includes("card") || a.includes("detail") || a.includes("find") ? yield* De() : a.includes("help") || a.includes("what can") || a.includes("how do") ? yield* Re() : a.includes("error") || a.includes("fail") || a.includes("break") ? yield* Ee() : yield* He(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* Be() {
56
+ async function* $e() {
57
57
  yield {
58
58
  type: "part",
59
59
  part: {
@@ -63,7 +63,7 @@ async function* Be() {
63
63
  description: "Looking for the best skill for this request.",
64
64
  status: "running"
65
65
  }
66
- }, await b(700), yield {
66
+ }, await _(700), yield {
67
67
  type: "part",
68
68
  part: {
69
69
  type: "activity",
@@ -72,7 +72,7 @@ async function* Be() {
72
72
  description: "Using Document Search.",
73
73
  status: "done"
74
74
  }
75
- }, await b(300), yield {
75
+ }, await _(300), yield {
76
76
  type: "part",
77
77
  part: {
78
78
  type: "activity",
@@ -81,7 +81,7 @@ async function* Be() {
81
81
  description: "Looking up document by ID.",
82
82
  status: "running"
83
83
  }
84
- }, await b(900), yield {
84
+ }, await _(900), yield {
85
85
  type: "part",
86
86
  part: {
87
87
  type: "activity",
@@ -90,13 +90,13 @@ async function* Be() {
90
90
  description: "Found document INV-2024-0894.",
91
91
  status: "done"
92
92
  }
93
- }, await b(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
96
  async function* Pe() {
97
97
  yield* x(`Here is a summary of the data you requested:
98
98
 
99
- `, 30), await b(400), yield {
99
+ `, 30), await _(400), yield {
100
100
  type: "part",
101
101
  part: {
102
102
  type: "table",
@@ -109,13 +109,13 @@ async function* Pe() {
109
109
  { Name: "Item Epsilon", Category: "Type B", Value: "2,200", Status: "Active" }
110
110
  ]
111
111
  }
112
- }, await b(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* $e() {
115
+ async function* De() {
116
116
  yield* x(`Based on the current data, I have a suggestion for you:
117
117
 
118
- `, 30), await b(500), yield {
118
+ `, 30), await _(500), yield {
119
119
  type: "part",
120
120
  part: {
121
121
  type: "proposal",
@@ -130,10 +130,10 @@ async function* $e() {
130
130
  }
131
131
  }, yield { type: "done" };
132
132
  }
133
- async function* De() {
133
+ async function* Re() {
134
134
  yield* x(`I found these records matching your request:
135
135
 
136
- `, 30), await b(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* De() {
162
162
  }
163
163
  ]
164
164
  }
165
- }, await b(300), yield* x(`
165
+ }, await _(300), yield* x(`
166
166
  Here is the detail of the first one:
167
167
 
168
- `, 25), await b(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* Re() {
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 b(200), yield* x(`- **Summarise data** — ask me to show, list, or summarise information
191
- `, 22), await b(150), yield* x(`- **Make suggestions** — ask me to recommend or propose something
192
- `, 22), await b(150), yield* x(`- **Answer questions** — ask me anything and I'll do my best
193
- `, 22), await b(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* Ee() {
197
- yield* x("Attempting to process your request…", 30), await b(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* He(e) {
199
+ async function* Ve(e) {
200
200
  yield* x(`Got it — you asked about *"${e || "your request"}"*.
201
201
 
202
- `, 30), await b(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 b(200), yield* x(`- Say **"show"**, **"list"**, **"data"**, or **"table"** → renders a data table
205
- `, 22), await b(150), yield* x(`- Say **"suggest"**, **"recommend"**, or **"proposal"** → renders a proposal card
206
- `, 22), await b(150), yield* x(`- Say **"entity"**, **"card"**, **"detail"**, or **"find"** → renders entity cards
207
- `, 22), await b(150), yield* x(`- Say **"help"** or **"what can you do"** → shows capabilities
208
- `, 22), await b(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 b(t);
213
+ yield { type: "text", text: e.slice(r, r + 3) }, await _(t);
214
214
  }
215
- function we(e) {
215
+ function xe(e) {
216
216
  if (!e || e === "[DONE]") return [];
217
217
  let t;
218
218
  try {
@@ -245,21 +245,21 @@ function we(e) {
245
245
  return [];
246
246
  }
247
247
  }
248
- function dn(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
253
  getBody: o,
254
254
  getMessages: d,
255
- parseEvent: i = 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 = o ? o(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,75 +268,75 @@ function dn(e, t = {}) {
268
268
  body: JSON.stringify(C)
269
269
  });
270
270
  if (!y.ok) {
271
- const I = await y.text().catch(() => `HTTP ${y.status}`);
272
- yield { type: "error", message: `Request failed (${y.status}): ${I}` };
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* qe(y.body, i);
279
+ yield* Oe(y.body, i);
280
280
  }
281
281
  };
282
282
  }
283
- async function* qe(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: o, value: d } = await a.read();
288
+ const { done: o, value: d } = await n.read();
289
289
  if (o) break;
290
290
  s += r.decode(d, { stream: !0 });
291
291
  const i = s.split(`
292
292
  `);
293
293
  s = i.pop() ?? "";
294
- for (const l of i) {
295
- const u = l.trim();
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 = we(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 un(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
332
  getBody: o,
333
- parseChunk: d = We,
333
+ parseChunk: d = Fe,
334
334
  credentials: i
335
335
  } = t;
336
336
  return {
337
- async *sendMessage(l) {
338
- const u = s ? await s(l) : {}, p = o ? o(l) : { messages: l.messages, context: l.context }, c = await fetch(e, {
339
- method: a,
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
340
  credentials: i,
341
341
  headers: {
342
342
  "Content-Type": "application/json",
@@ -345,36 +345,36 @@ function un(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: o, value: d } = await a.read();
366
+ const { done: o, value: d } = await n.read();
367
367
  if (o) break;
368
368
  s += r.decode(d, { stream: !0 });
369
369
  const i = s.split(`
370
370
  `);
371
371
  s = i.pop() ?? "";
372
- for (const l of i) {
373
- const u = l.trim();
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()) {
@@ -383,203 +383,203 @@ async function* Oe(e, t) {
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 We = (e) => {
391
- const t = we(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 Fe = 0;
395
- const ne = () => `msg-${++Fe}-${Date.now()}`, ye = ze;
396
- function Ze({
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
402
  historyLimit: o,
403
403
  onMessagesChange: d
404
404
  }) {
405
- const [i, l] = H(s ?? []), [u, p] = H(""), [c, f] = H(!1), [C, y] = H(!1), [I, S] = H(null), A = F(null), T = F(!1), q = F(d);
406
- ie(() => {
407
- q.current = d;
408
- }), ie(() => {
409
- !T.current || c || (T.current = !1, q.current?.(i));
410
- }, [i, c]);
411
- const z = j((h) => {
412
- l((v) => {
413
- const _ = v[v.length - 1];
414
- if (!_ || _.role !== "assistant") return v;
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
415
  if (h.type === "activity" && h.id) {
416
- const w = [..._.parts], g = w.findIndex(
416
+ const w = [...b.parts], g = w.findIndex(
417
417
  (N) => N.type === "activity" && N.id === h.id
418
418
  );
419
419
  if (g !== -1)
420
- return w[g] = h, [...v.slice(0, -1), { ..._, parts: w }];
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, h] }
424
+ { ...b, parts: [...b.parts, h] }
425
425
  ];
426
426
  });
427
- }, []), L = j((h) => {
428
- l((v) => {
429
- const _ = v[v.length - 1];
430
- if (!_ || _.role !== "assistant") return v;
431
- const w = [..._.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), { ..._, 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 = j(async (h, v) => {
435
- S(null);
436
- const _ = {
437
- id: ne(),
434
+ }, []), $ = z(async (h, v) => {
435
+ A(null);
436
+ const b = {
437
+ id: se(),
438
438
  role: "user",
439
439
  parts: [{ type: "text", text: h }],
440
440
  createdAt: /* @__PURE__ */ new Date()
441
- }, w = ne();
441
+ }, w = se();
442
442
  let g = !1;
443
443
  const N = () => {
444
444
  if (g) return;
445
445
  g = !0;
446
- const D = {
446
+ const R = {
447
447
  id: w,
448
448
  role: "assistant",
449
449
  parts: [],
450
450
  createdAt: /* @__PURE__ */ new Date()
451
451
  };
452
- l((W) => [...W, D]);
452
+ c((Z) => [...Z, R]);
453
453
  };
454
- l((D) => [...D, _]), f(!0), y(!0), A.current?.abort();
455
- const de = new AbortController();
456
- A.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 D = Le(
459
- [...v, _],
458
+ const R = Be(
459
+ [...v, b],
460
460
  o ?? Number.POSITIVE_INFINITY
461
- ), W = e.sendMessage({ messages: ye(D), context: t });
462
- await ue(
463
- W,
464
- (Z) => {
465
- switch (y(!1), Z.type) {
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(), L(Z.text);
467
+ N(), S(K.text);
468
468
  break;
469
469
  case "part":
470
- N(), z(Z.part);
470
+ N(), k(K.part);
471
471
  break;
472
472
  case "error":
473
- N(), z({ type: "error", message: Z.message }), S(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 (D) {
482
- const W = D instanceof Error ? D.message : "Unknown error occurred";
483
- S(W), N(), z({ type: "error", message: W });
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
- T.current = !0, f(!1), y(!1);
485
+ L.current = !0, f(!1), y(!1);
486
486
  }
487
- }, [e, t, o, L, z]), G = j(async () => {
487
+ }, [e, t, o, S, k]), O = z(async () => {
488
488
  const h = u.trim();
489
- !h || c || (p(""), await V(h, i));
490
- }, [u, c, i, V]), Q = j(async (h) => {
491
- !h.trim() || c || await V(h, i);
492
- }, [c, i, V]), Y = j(async (h) => {
493
- if (c) return;
494
- S(null), f(!0), y(!0);
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
+ 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((g) => [...g, v]), A.current?.abort();
502
- const _ = new AbortController();
503
- A.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
507
  parts: [{ type: "text", text: h }],
508
508
  createdAt: /* @__PURE__ */ new Date()
509
509
  };
510
510
  try {
511
- const g = e.sendMessage({ messages: ye([w]), context: t });
512
- await ue(
511
+ const g = e.sendMessage({ messages: me([w]), context: t });
512
+ await pe(
513
513
  g,
514
514
  (N) => {
515
515
  switch (y(!1), N.type) {
516
516
  case "text":
517
- L(N.text);
517
+ S(N.text);
518
518
  break;
519
519
  case "part":
520
- z(N.part);
520
+ k(N.part);
521
521
  break;
522
522
  case "error":
523
- z({ type: "error", message: N.message }), S(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
531
  } catch (g) {
532
532
  const N = g instanceof Error ? g.message : "Unknown error occurred";
533
- S(N), z({ type: "error", message: N });
533
+ A(N), k({ type: "error", message: N });
534
534
  } finally {
535
- T.current = !0, f(!1), y(!1);
535
+ L.current = !0, f(!1), y(!1);
536
536
  }
537
- }, [c, e, t, L, z]), X = j(() => {
538
- A.current?.abort(), f(!1), y(!1);
539
- }, []), ee = j((h) => {
540
- A.current?.abort(), T.current = !0, l(h ?? []), p(""), S(null), f(!1), y(!1);
541
- }, []), O = j((h, v) => {
542
- T.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
- (g) => ve(g) && g.proposal.id === h ? { ...g, proposal: { ...g.proposal, resolved: v } } : g
545
+ (g) => we(g) && g.proposal.id === h ? { ...g, proposal: { ...g.proposal, resolved: v } } : g
546
546
  )
547
547
  })));
548
- }, []), te = j((h, v) => {
549
- O(h, "confirmed"), a?.(h, v);
550
- }, [a, O]), ae = j((h) => {
551
- O(h, "cancelled"), r?.(h);
552
- }, [r, O]);
553
- return ge(() => ({
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
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: I,
564
- reset: ee,
565
- confirmProposal: te,
566
- cancelProposal: ae
563
+ error: T,
564
+ reset: te,
565
+ confirmProposal: ae,
566
+ cancelProposal: ne
567
567
  }), [
568
568
  i,
569
569
  u,
570
- G,
571
- Q,
572
- Y,
570
+ O,
571
+ q,
573
572
  X,
574
- c,
575
- C,
576
- I,
577
573
  ee,
574
+ l,
575
+ C,
576
+ T,
578
577
  te,
579
- ae
578
+ ae,
579
+ ne
580
580
  ]);
581
581
  }
582
- const xe = {
582
+ const Ce = {
583
583
  sidebarTitle: "AI Assistant",
584
584
  clearConversation: "Clear conversation",
585
585
  resetConversation: "Reset conversation",
@@ -606,29 +606,29 @@ const xe = {
606
606
  actionRules: "Rules",
607
607
  historyEmpty: "No previous chats",
608
608
  historyDeleteChat: "Delete chat"
609
- }, Ce = be(xe);
610
- function E() {
611
- return ce(Ce);
609
+ }, Ne = be(Ce);
610
+ function H() {
611
+ return le(Ne);
612
612
  }
613
- const Je = "_root_1etc2_1", Ue = {
614
- root: Je
613
+ const Ue = "_root_14q8g_1", Ke = {
614
+ root: Ue
615
615
  };
616
- function pn({ children: e, theme: t, labels: a, defaultTitle: r, className: s, style: o }) {
616
+ function hn({ children: e, theme: t, labels: n, defaultTitle: r, className: s, style: o }) {
617
617
  const d = {
618
- ...xe,
618
+ ...Ce,
619
619
  ...r ? { sidebarTitle: r } : {},
620
- ...a
621
- }, i = t ? Ke(t) : void 0;
622
- return /* @__PURE__ */ n(Ce.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: [Ue.root, s].filter(Boolean).join(" "),
625
+ className: [Ke.root, s].filter(Boolean).join(" "),
626
626
  style: { ...i, ...o },
627
627
  children: e
628
628
  }
629
629
  ) });
630
630
  }
631
- function Ke(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 Ke(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 = be(null);
681
- function Ge() {
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 yn() {
690
- return ce(le);
689
+ function fn() {
690
+ return le(de);
691
691
  }
692
- function hn({
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
698
  historyLimit: o,
699
699
  onMessagesChange: d,
700
700
  children: i
701
701
  }) {
702
- const [l, u] = H(t), p = j((C) => {
702
+ const [c, u] = W(t), p = z((C) => {
703
703
  u(typeof C == "function" ? (y) => C(y) : C);
704
- }, []), c = Ze({
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
710
  historyLimit: o,
711
711
  onMessagesChange: d
712
- }), f = ge(
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: i });
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 Ne({ 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 Ne({ 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 Qe({ 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 Qe({ 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 Ye({ 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 Ye({ 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 Xe({ 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 Xe({ 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 et({ 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 et({ 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 tt({ 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 tt({ 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 at({ 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 at({ 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 nt({ 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 nt({ 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 st({ 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 st({ 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 rt({ 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 rt({ 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 ot({ 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 ot({ 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_izvjy_1", ct = "_table_izvjy_15", lt = "_th_izvjy_27", dt = "_tr_izvjy_47", ut = "_td_izvjy_63", J = {
923
- wrapper: it,
924
- table: ct,
925
- th: lt,
926
- tr: dt,
927
- td: ut
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 pt({ part: e }) {
930
- return /* @__PURE__ */ n("div", { className: J.wrapper, "data-juneau": "table-part", children: /* @__PURE__ */ m("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 yt = "_card_99bqr_1", ht = "_header_99bqr_17", mt = "_icon_99bqr_31", ft = "_title_99bqr_47", gt = "_description_99bqr_59", bt = "_cardResolved_99bqr_73", _t = "_resolvedBadge_99bqr_81", vt = "_actions_99bqr_103", wt = "_confirm_99bqr_113", xt = "_cancel_99bqr_145", M = {
936
- card: yt,
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
937
  header: ht,
938
- icon: mt,
939
- title: ft,
940
- description: gt,
938
+ icon: ft,
939
+ title: gt,
940
+ description: _t,
941
941
  cardResolved: bt,
942
- resolvedBadge: _t,
943
- actions: vt,
944
- confirm: wt,
945
- cancel: xt
942
+ resolvedBadge: vt,
943
+ actions: wt,
944
+ confirm: xt,
945
+ cancel: Ct
946
946
  };
947
- function Ct({ part: e, onConfirm: t, onCancel: a }) {
948
- const r = E(), { proposal: s } = e, o = s.resolved === "confirmed" ? r.proposalConfirmed : s.resolved === "cancelled" ? r.proposalCancelled : s.resolved === "expired" ? r.proposalExpired : null;
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
949
  return /* @__PURE__ */ m(
950
950
  "div",
951
951
  {
952
- className: s.resolved ? `${M.card} ${M.cardResolved}` : M.card,
952
+ className: s.resolved ? `${I.card} ${I.cardResolved}` : I.card,
953
953
  "data-juneau": "proposal-card",
954
954
  children: [
955
- /* @__PURE__ */ m("div", { className: M.header, children: [
956
- /* @__PURE__ */ n("svg", { className: M.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: M.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: M.description, children: s.description }),
960
- o ? /* @__PURE__ */ n("span", { className: M.resolvedBadge, children: o }) : /* @__PURE__ */ m("div", { className: M.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: M.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: M.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,166 +979,166 @@ function Ct({ part: e, onConfirm: t, onCancel: a }) {
979
979
  }
980
980
  );
981
981
  }
982
- const Nt = "_activity_1661l_1", kt = "_indicator_1661l_25", jt = "_content_1661l_71", St = "_title_1661l_79", At = "_description_1661l_89", U = {
983
- activity: Nt,
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
984
  indicator: kt,
985
- content: jt,
986
- title: St,
987
- description: At
985
+ content: St,
986
+ title: At,
987
+ description: zt
988
988
  };
989
- function zt({ part: e }) {
990
- return /* @__PURE__ */ m("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__ */ m("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 Mt = "_card_jwkcu_1", It = "_cardClickable_jwkcu_14", Tt = "_header_jwkcu_24", Lt = "_title_jwkcu_30", Bt = "_subtitle_jwkcu_36", Pt = "_fields_jwkcu_41", $t = "_fieldRow_jwkcu_48", Dt = "_fieldLabel_jwkcu_55", Rt = "_fieldValue_jwkcu_61", Et = "_badge_jwkcu_68", Ht = "_badgeSuccess_jwkcu_76", qt = "_badgeWarning_jwkcu_81", Vt = "_badgeDanger_jwkcu_86", Ot = "_badgeNeutral_jwkcu_91", k = {
999
- card: Mt,
1000
- cardClickable: It,
1001
- header: Tt,
1002
- title: Lt,
1003
- subtitle: Bt,
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
1004
  fields: Pt,
1005
- fieldRow: $t,
1006
- fieldLabel: Dt,
1007
- fieldValue: Rt,
1008
- badge: Et,
1009
- badgeSuccess: Ht,
1010
- badgeWarning: qt,
1011
- badgeDanger: Vt,
1012
- badgeNeutral: Ot
1013
- }, Wt = {
1014
- success: k.badgeSuccess,
1015
- warning: k.badgeWarning,
1016
- danger: k.badgeDanger,
1017
- neutral: k.badgeNeutral
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
1019
  function ke({ part: e, onEntityClick: t }) {
1020
- const { entity: a, entityType: r } = e, s = t !== void 0, o = /* @__PURE__ */ m(_e, { children: [
1021
- /* @__PURE__ */ m("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 })
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, i) => /* @__PURE__ */ m("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} ${Wt[d.badge]}`, children: d.value }) : d.value })
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
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
1037
  children: o
1038
1038
  }
1039
- ) : /* @__PURE__ */ n("div", { className: k.card, "data-juneau": "entity-card", children: o });
1039
+ ) : /* @__PURE__ */ a("div", { className: j.card, "data-juneau": "entity-card", children: o });
1040
1040
  }
1041
- const Ft = "_list_a2maw_1", Zt = "_listTitle_a2maw_11", he = {
1042
- list: Ft,
1043
- listTitle: Zt
1041
+ const Zt = "_list_a2maw_1", Jt = "_listTitle_a2maw_11", he = {
1042
+ list: Zt,
1043
+ listTitle: Jt
1044
1044
  };
1045
- function Jt({ part: e, onEntityClick: t }) {
1045
+ function Ut({ part: e, onEntityClick: t }) {
1046
1046
  return /* @__PURE__ */ m("div", { className: he.list, "data-juneau": "entity-list-part", children: [
1047
- e.title && /* @__PURE__ */ n("span", { className: he.listTitle, children: e.title }),
1048
- e.entities.map((a, r) => /* @__PURE__ */ n(
1047
+ e.title && /* @__PURE__ */ a("span", { className: he.listTitle, children: e.title }),
1048
+ e.entities.map((n, r) => /* @__PURE__ */ a(
1049
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 Ut = "_markdown_sznoh_1", Kt = "_unknownPart_sznoh_167", Gt = "_errorText_sznoh_195", Qt = "_errorIcon_sznoh_211", se = {
1059
- markdown: Ut,
1060
- unknownPart: Kt,
1061
- errorText: Gt,
1062
- errorIcon: Qt
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 Yt({ 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
1066
  const o = s(e);
1067
1067
  if (o != null)
1068
- return /* @__PURE__ */ n(_e, { children: o });
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(Se, { remarkPlugins: [Ae], 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(pt, { part: e });
1074
+ return /* @__PURE__ */ a(yt, { part: e });
1075
1075
  case "activity":
1076
- return /* @__PURE__ */ n(zt, { part: e });
1076
+ return /* @__PURE__ */ a(Mt, { part: e });
1077
1077
  case "proposal":
1078
- return /* @__PURE__ */ n(
1079
- Ct,
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(ke, { part: e, onEntityClick: r });
1087
+ return /* @__PURE__ */ a(ke, { part: e, onEntityClick: r });
1088
1088
  case "entity-list":
1089
- return /* @__PURE__ */ n(Jt, { part: e, onEntityClick: r });
1089
+ return /* @__PURE__ */ a(Ut, { part: e, onEntityClick: r });
1090
1090
  case "error":
1091
- return /* @__PURE__ */ m("span", { className: se.errorText, children: [
1092
- /* @__PURE__ */ n(ot, { 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__ */ m("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 Xt = "_wrapper_1q20p_1", ea = "_user_1q20p_8", ta = "_assistant_1q20p_12", aa = "_avatar_1q20p_16", na = "_content_1q20p_43", sa = "_bubble_1q20p_51", ra = "_card_1q20p_70", oa = "_empty_1q20p_92", B = {
1107
- wrapper: Xt,
1108
- user: ea,
1109
- assistant: ta,
1110
- avatar: aa,
1111
- content: na,
1112
- bubble: sa,
1113
- card: ra,
1114
- empty: oa
1115
- }, ia = /* @__PURE__ */ new Set(["text", "error", "activity"]);
1116
- function je(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 ca(e) {
1119
+ function la(e) {
1120
1120
  const t = [];
1121
- return e.forEach((a, r) => {
1122
- const s = je(a), o = t[t.length - 1];
1121
+ return e.forEach((n, r) => {
1122
+ const s = Se(n), o = t[t.length - 1];
1123
1123
  if (o && !s && !o.card) {
1124
- o.parts.push({ part: a, index: r });
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 la({ message: e, onProposalConfirm: t, onProposalCancel: a, onEntityClick: r, assistantIcon: s, renderPart: o }) {
1131
- const d = E(), i = e.role === "user", l = (p, c) => /* @__PURE__ */ n(
1132
- Yt,
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
1138
  renderPart: o
1139
1139
  },
1140
- c
1141
- ), u = e.parts.some(je);
1140
+ l
1141
+ ), u = e.parts.some(Se);
1142
1142
  return /* @__PURE__ */ m(
1143
1143
  "div",
1144
1144
  {
@@ -1146,104 +1146,104 @@ function la({ message: e, onProposalConfirm: t, onProposalCancel: a, onEntityCli
1146
1146
  "data-juneau": "message",
1147
1147
  "data-juneau-role": e.role,
1148
1148
  children: [
1149
- !i && /* @__PURE__ */ n("div", { className: B.avatar, "aria-hidden": "true", "data-juneau": "assistant-avatar", children: s ?? /* @__PURE__ */ n(Ne, {}) }),
1150
- u ? /* @__PURE__ */ n("div", { className: B.content, children: ca(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
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
1157
+ l
1158
1158
  )) }) : /* @__PURE__ */ m("div", { className: B.bubble, "data-juneau-segment": "bubble", children: [
1159
- e.parts.map((p, c) => l(p, c)),
1160
- e.parts.length === 0 && /* @__PURE__ */ n("span", { className: B.empty })
1159
+ e.parts.map((p, l) => c(p, l)),
1160
+ e.parts.length === 0 && /* @__PURE__ */ a("span", { className: B.empty })
1161
1161
  ] }),
1162
- i && /* @__PURE__ */ n("div", { className: B.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 da = "_wrapper_1oco7_1", ua = "_dot_1oco7_15", pa = "_connectingLabel_1oco7_37", K = {
1168
- wrapper: da,
1169
- dot: ua,
1170
- connectingLabel: pa
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 ya({ connecting: e = !1 }) {
1173
- const t = E();
1172
+ function ma({ connecting: e = !1 }) {
1173
+ const t = H();
1174
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 ha = "_list_ixto8_1", ma = "_empty_ixto8_21", fa = "_hint_ixto8_47", ga = "_typing_ixto8_61", re = {
1189
+ const ha = "_list_1f8gn_1", fa = "_empty_1f8gn_11", ga = "_hint_1f8gn_24", _a = "_typing_1f8gn_31", oe = {
1190
1190
  list: ha,
1191
- empty: ma,
1192
- hint: fa,
1193
- typing: ga
1191
+ empty: fa,
1192
+ hint: ga,
1193
+ typing: _a
1194
1194
  };
1195
- function ba({ messages: e, isLoading: t, isConnecting: a, onProposalConfirm: r, onProposalCancel: s, onEntityClick: o, assistantIcon: d, renderPart: i, emptyState: l }) {
1196
- const u = E(), p = F(null);
1197
- return ie(() => {
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__ */ m("div", { className: re.list, "data-juneau": "message-list", children: [
1200
- e.length === 0 && (l ?? /* @__PURE__ */ m("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
- la,
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
1210
  onEntityClick: o,
1211
1211
  assistantIcon: d,
1212
1212
  renderPart: i
1213
1213
  },
1214
- c.id
1214
+ l.id
1215
1215
  )),
1216
- t && /* @__PURE__ */ n("div", { className: re.typing, children: /* @__PURE__ */ n(ya, { 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_ehrkb_1", va = "_textarea_ehrkb_21", wa = "_toolbar_ehrkb_69", xa = "_actions_ehrkb_89", Ca = "_actionBtn_ehrkb_103", Na = "_sendBtn_ehrkb_169", ka = "_spinnerIcon_ehrkb_231", ja = "_stopBtn_ehrkb_251", Sa = "_stopIcon_ehrkb_297", P = {
1221
- wrapper: _a,
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
1222
  textarea: va,
1223
1223
  toolbar: wa,
1224
1224
  actions: xa,
1225
1225
  actionBtn: Ca,
1226
1226
  sendBtn: Na,
1227
- spinnerIcon: ka,
1228
- stopBtn: ja,
1227
+ spinnerIcon: ja,
1228
+ stopBtn: ka,
1229
1229
  stopIcon: Sa
1230
1230
  };
1231
- function Aa({ value: e, onChange: t, onSend: a, onStop: r, isLoading: s, placeholder: o, actions: d, sendIcon: i }) {
1232
- const l = E(), u = F(null), p = F(!1);
1233
- ie(() => {
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(Ye, {}), label: l.actionAddFile },
1238
- { icon: /* @__PURE__ */ n(Xe, {}), label: l.actionQuickActions },
1239
- { icon: /* @__PURE__ */ n(et, {}), label: l.actionNew },
1240
- { icon: /* @__PURE__ */ n(tt, {}), label: l.actionHistory },
1241
- { icon: /* @__PURE__ */ n(at, {}), 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
1245
  return /* @__PURE__ */ m("div", { className: P.wrapper, "data-juneau": "input", children: [
1246
- /* @__PURE__ */ n(
1246
+ /* @__PURE__ */ a(
1247
1247
  "textarea",
1248
1248
  {
1249
1249
  ref: u,
@@ -1252,13 +1252,13 @@ function Aa({ value: e, onChange: t, onSend: a, onStop: r, isLoading: s, placeho
1252
1252
  value: e,
1253
1253
  onChange: (y) => t(y.target.value),
1254
1254
  onKeyDown: C,
1255
- placeholder: o ?? 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
1260
  /* @__PURE__ */ m("div", { className: P.toolbar, children: [
1261
- f.length > 0 && /* @__PURE__ */ n("div", { className: P.actions, children: f.map((y, I) => /* @__PURE__ */ m(
1261
+ f.length > 0 && /* @__PURE__ */ a("div", { className: P.actions, children: f.map((y, T) => /* @__PURE__ */ m(
1262
1262
  "button",
1263
1263
  {
1264
1264
  className: P.actionBtn,
@@ -1268,331 +1268,362 @@ function Aa({ value: e, onChange: t, onSend: a, onStop: r, isLoading: s, placeho
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
- I
1274
+ T
1275
1275
  )) }),
1276
1276
  s && r ? /* @__PURE__ */ m(
1277
1277
  "button",
1278
1278
  {
1279
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: P.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
1289
  ) : /* @__PURE__ */ m(
1289
1290
  "button",
1290
1291
  {
1291
1292
  className: P.sendBtn,
1292
- onClick: a,
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: P.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" }) }) : i ?? /* @__PURE__ */ n(Qe, {}),
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 za = "_wrapper_1e3w5_1", Ma = "_icon_1e3w5_27", Ia = "_message_1e3w5_39", Ta = "_dismiss_1e3w5_47", oe = {
1307
+ const za = "_wrapper_1kefv_1", Ma = "_icon_1kefv_14", Ia = "_message_1kefv_20", Ta = "_dismiss_1kefv_24", ie = {
1306
1308
  wrapper: za,
1307
1309
  icon: Ma,
1308
1310
  message: Ia,
1309
1311
  dismiss: Ta
1310
1312
  };
1311
1313
  function La({ message: e, onDismiss: t }) {
1312
- const a = E();
1313
- return /* @__PURE__ */ m("div", { className: oe.wrapper, role: "alert", "data-juneau": "error", children: [
1314
- /* @__PURE__ */ n("svg", { className: oe.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: oe.message, children: e }),
1316
- t && /* @__PURE__ */ n("button", { className: oe.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" }) }) })
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 Ba = "_chat_nablk_1", Pa = "_aboveInput_nablk_15", me = {
1321
+ const Ba = "_chat_tboxh_1", $a = "_aboveInput_tboxh_8", Pa = "_start_tboxh_15", Da = "_startColumn_tboxh_24", Ra = "_belowInput_tboxh_32", J = {
1320
1322
  chat: Ba,
1321
- aboveInput: Pa
1323
+ aboveInput: $a,
1324
+ start: Pa,
1325
+ startColumn: Da,
1326
+ belowInput: Ra
1322
1327
  };
1323
- function $a({
1328
+ function Ea({
1324
1329
  messages: e,
1325
1330
  input: t,
1326
- isLoading: a,
1331
+ isLoading: n,
1327
1332
  isConnecting: r,
1328
1333
  error: s,
1329
1334
  onInputChange: o,
1330
1335
  onSend: d,
1331
1336
  onStop: i,
1332
- onProposalConfirm: l,
1337
+ onProposalConfirm: c,
1333
1338
  onProposalCancel: u,
1334
1339
  onEntityClick: p,
1335
- placeholder: c,
1340
+ placeholder: l,
1336
1341
  assistantIcon: f,
1337
1342
  actions: C,
1338
1343
  sendIcon: y,
1339
- renderPart: I,
1340
- emptyState: S,
1341
- aboveInput: A,
1342
- className: T,
1343
- style: q
1344
+ renderPart: T,
1345
+ emptyState: A,
1346
+ aboveInput: M,
1347
+ centerInputWhenEmpty: L = !1,
1348
+ belowInput: V,
1349
+ className: k,
1350
+ style: S
1344
1351
  }) {
1345
- return /* @__PURE__ */ m(
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(
1346
1366
  "div",
1347
1367
  {
1348
- className: [me.chat, T].filter(Boolean).join(" "),
1349
- style: q,
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(
1389
+ "div",
1390
+ {
1391
+ className: [J.chat, k].filter(Boolean).join(" "),
1392
+ style: S,
1350
1393
  "data-juneau": "chat",
1351
1394
  children: [
1352
- /* @__PURE__ */ n(
1353
- ba,
1395
+ /* @__PURE__ */ a(
1396
+ fe,
1354
1397
  {
1355
1398
  messages: e,
1356
- isLoading: a,
1399
+ isLoading: n,
1357
1400
  isConnecting: r,
1358
- onProposalConfirm: l,
1401
+ onProposalConfirm: c,
1359
1402
  onProposalCancel: u,
1360
1403
  onEntityClick: p,
1361
1404
  assistantIcon: f,
1362
- renderPart: I,
1363
- emptyState: S
1405
+ renderPart: T,
1406
+ emptyState: A
1364
1407
  }
1365
1408
  ),
1366
- s && /* @__PURE__ */ n(La, { message: s }),
1367
- A != null && /* @__PURE__ */ n("div", { className: me.aboveInput, "data-juneau": "above-input", "data-juneau-above-input": "", children: A }),
1368
- /* @__PURE__ */ n(
1369
- Aa,
1370
- {
1371
- value: t,
1372
- onChange: o,
1373
- onSend: d,
1374
- onStop: i,
1375
- isLoading: a,
1376
- placeholder: c,
1377
- actions: C,
1378
- sendIcon: y
1379
- }
1380
- )
1409
+ $,
1410
+ O,
1411
+ q
1381
1412
  ]
1382
1413
  }
1383
1414
  );
1384
1415
  }
1385
- const Da = "_header_1br16_1", Ra = "_left_1br16_23", Ea = "_icon_1br16_35", Ha = "_title_1br16_45", qa = "_resetBtn_1br16_57", Va = "_actions_1br16_99", Oa = "_badge_1br16_113", R = {
1386
- header: Da,
1387
- left: Ra,
1388
- icon: Ea,
1389
- title: Ha,
1390
- resetBtn: qa,
1391
- actions: Va,
1392
- 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
1393
1424
  };
1394
- function Wa({
1425
+ function Ja({
1395
1426
  title: e,
1396
1427
  onMinimize: t,
1397
- isMinimized: a,
1428
+ isMinimized: n,
1398
1429
  icon: r,
1399
1430
  onReset: s,
1400
1431
  badge: o,
1401
1432
  headerActions: d
1402
1433
  }) {
1403
- const i = E();
1404
- return /* @__PURE__ */ m("div", { className: R.header, "data-juneau": "header", children: [
1405
- /* @__PURE__ */ m("div", { className: R.left, children: [
1406
- /* @__PURE__ */ n("span", { className: R.icon, "aria-hidden": "true", "data-juneau": "header-icon", children: r ?? /* @__PURE__ */ n(Ne, {}) }),
1407
- /* @__PURE__ */ n("span", { className: R.title, children: e ?? i.sidebarTitle }),
1408
- o && /* @__PURE__ */ n("span", { className: R.badge, "data-juneau": "header-badge", children: o })
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 })
1409
1440
  ] }),
1410
- (t || s || d) && /* @__PURE__ */ m("div", { className: R.actions, children: [
1441
+ (t || s || d) && /* @__PURE__ */ m("div", { className: E.actions, children: [
1411
1442
  d,
1412
- s && /* @__PURE__ */ n(
1443
+ s && /* @__PURE__ */ a(
1413
1444
  "button",
1414
1445
  {
1415
- className: R.resetBtn,
1446
+ className: E.resetBtn,
1416
1447
  onClick: s,
1417
1448
  title: i.resetConversation,
1418
1449
  "aria-label": i.resetConversation,
1419
1450
  "data-juneau": "header-reset",
1420
- children: /* @__PURE__ */ n(rt, {})
1451
+ children: /* @__PURE__ */ a(ot, {})
1421
1452
  }
1422
1453
  ),
1423
- t && /* @__PURE__ */ n(
1454
+ t && /* @__PURE__ */ a(
1424
1455
  "button",
1425
1456
  {
1426
- className: R.resetBtn,
1457
+ className: E.resetBtn,
1427
1458
  onClick: t,
1428
- title: a ? i.expandSidebar : i.minimizeSidebar,
1429
- "aria-label": a ? i.expandSidebar : i.minimizeSidebar,
1459
+ title: n ? i.expandSidebar : i.minimizeSidebar,
1460
+ "aria-label": n ? i.expandSidebar : i.minimizeSidebar,
1430
1461
  "data-juneau": "header-minimize",
1431
- children: a ? /* @__PURE__ */ n(st, {}) : /* @__PURE__ */ n(nt, {})
1462
+ children: n ? /* @__PURE__ */ a(rt, {}) : /* @__PURE__ */ a(st, {})
1432
1463
  }
1433
1464
  )
1434
1465
  ] })
1435
1466
  ] });
1436
1467
  }
1437
- const Fa = "_sidebar_u9ybt_1", Za = "_minimized_u9ybt_39", fe = {
1438
- sidebar: Fa,
1439
- minimized: Za
1468
+ const Ua = "_sidebar_17ski_1", Ka = "_minimized_17ski_20", ge = {
1469
+ sidebar: Ua,
1470
+ minimized: Ka
1440
1471
  };
1441
- function fn({
1472
+ function bn({
1442
1473
  title: e,
1443
1474
  icon: t,
1444
- assistantIcon: a,
1475
+ assistantIcon: n,
1445
1476
  actions: r,
1446
1477
  sendIcon: s,
1447
1478
  height: o = "60vh",
1448
1479
  className: d,
1449
1480
  style: i,
1450
- onReset: l,
1481
+ onReset: c,
1451
1482
  confirmReset: u,
1452
1483
  renderPart: p,
1453
- onEntityClick: c,
1484
+ onEntityClick: l,
1454
1485
  headerActions: f,
1455
1486
  badge: C,
1456
1487
  minimized: y,
1457
- onMinimizedChange: I,
1458
- emptyState: S,
1459
- aboveInput: A
1488
+ onMinimizedChange: T,
1489
+ emptyState: A,
1490
+ aboveInput: M
1460
1491
  }) {
1461
- const [T, q] = H(!1), z = y !== void 0, L = z ? y : T, V = () => {
1462
- const g = !L;
1463
- z || q(g), I?.(g);
1492
+ const [L, V] = W(!1), k = y !== void 0, S = k ? y : L, $ = () => {
1493
+ const g = !S;
1494
+ k || V(g), T?.(g);
1464
1495
  }, {
1465
- messages: G,
1466
- input: Q,
1467
- setInput: Y,
1468
- sendMessage: X,
1469
- stop: ee,
1470
- isLoading: O,
1471
- isConnecting: te,
1472
- error: ae,
1496
+ messages: O,
1497
+ input: q,
1498
+ setInput: X,
1499
+ sendMessage: ee,
1500
+ stop: te,
1501
+ isLoading: F,
1502
+ isConnecting: ae,
1503
+ error: ne,
1473
1504
  reset: h,
1474
1505
  confirmProposal: v,
1475
- cancelProposal: _
1476
- } = Ge(), w = l ? async () => {
1477
- u && !await u() || (h(), l());
1506
+ cancelProposal: b
1507
+ } = Qe(), w = c ? async () => {
1508
+ u && !await u() || (h(), c());
1478
1509
  } : void 0;
1479
1510
  return /* @__PURE__ */ m(
1480
1511
  "aside",
1481
1512
  {
1482
- className: [fe.sidebar, L ? fe.minimized : "", d].filter(Boolean).join(" "),
1483
- style: { height: L ? void 0 : o, ...i },
1513
+ className: [ge.sidebar, S ? ge.minimized : "", d].filter(Boolean).join(" "),
1514
+ style: { height: S ? void 0 : o, ...i },
1484
1515
  "data-juneau": "sidebar",
1485
1516
  children: [
1486
- /* @__PURE__ */ n(
1487
- Wa,
1517
+ /* @__PURE__ */ a(
1518
+ Ja,
1488
1519
  {
1489
1520
  title: e,
1490
1521
  icon: t,
1491
- onMinimize: V,
1492
- isMinimized: L,
1522
+ onMinimize: $,
1523
+ isMinimized: S,
1493
1524
  onReset: w,
1494
1525
  badge: C,
1495
1526
  headerActions: f
1496
1527
  }
1497
1528
  ),
1498
- !L && /* @__PURE__ */ n(
1499
- $a,
1529
+ !S && /* @__PURE__ */ a(
1530
+ Ea,
1500
1531
  {
1501
- messages: G,
1502
- input: Q,
1503
- isLoading: O,
1504
- isConnecting: te,
1505
- error: ae,
1506
- onInputChange: Y,
1507
- onSend: X,
1508
- onStop: ee,
1532
+ messages: O,
1533
+ input: q,
1534
+ isLoading: F,
1535
+ isConnecting: ae,
1536
+ error: ne,
1537
+ onInputChange: X,
1538
+ onSend: ee,
1539
+ onStop: te,
1509
1540
  onProposalConfirm: v,
1510
- onProposalCancel: _,
1511
- assistantIcon: a ?? t,
1541
+ onProposalCancel: b,
1542
+ assistantIcon: n ?? t,
1512
1543
  actions: r,
1513
1544
  sendIcon: s,
1514
1545
  renderPart: p,
1515
- onEntityClick: c,
1516
- emptyState: S,
1517
- aboveInput: A
1546
+ onEntityClick: l,
1547
+ emptyState: A,
1548
+ aboveInput: M
1518
1549
  }
1519
1550
  )
1520
1551
  ]
1521
1552
  }
1522
1553
  );
1523
1554
  }
1524
- const Ja = "_list_j7fvh_1", Ua = "_item_j7fvh_19", Ka = "_chat_j7fvh_31", Ga = "_chatActive_j7fvh_71", Qa = "_title_j7fvh_79", Ya = "_date_j7fvh_99", Xa = "_empty_j7fvh_163", $ = {
1525
- list: Ja,
1526
- item: Ua,
1527
- chat: Ka,
1528
- chatActive: Ga,
1529
- title: Qa,
1530
- date: Ya,
1531
- delete: "_delete_j7fvh_111",
1532
- empty: Xa
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,
1562
+ delete: "_delete_180ms_56",
1563
+ empty: an
1533
1564
  };
1534
- function gn({ chats: e, onSelect: t, activeChatId: a, onDelete: r }) {
1535
- const s = E();
1536
- return e.length === 0 ? /* @__PURE__ */ n("p", { className: $.empty, children: s.historyEmpty }) : /* @__PURE__ */ n("ul", { className: $.list, "data-juneau": "history-list", children: e.map((o) => /* @__PURE__ */ m("li", { className: $.item, children: [
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: [
1537
1568
  /* @__PURE__ */ m(
1538
1569
  "button",
1539
1570
  {
1540
- className: o.id === a ? `${$.chat} ${$.chatActive}` : $.chat,
1571
+ className: o.id === n ? `${D.chat} ${D.chatActive}` : D.chat,
1541
1572
  onClick: () => t(o.id),
1542
1573
  children: [
1543
- /* @__PURE__ */ n("span", { className: $.title, children: o.title }),
1544
- /* @__PURE__ */ n("span", { className: $.date, children: o.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" }) })
1545
1576
  ]
1546
1577
  }
1547
1578
  ),
1548
- r && /* @__PURE__ */ n(
1579
+ r && /* @__PURE__ */ a(
1549
1580
  "button",
1550
1581
  {
1551
- className: $.delete,
1582
+ className: D.delete,
1552
1583
  onClick: () => r(o.id),
1553
1584
  "aria-label": s.historyDeleteChat,
1554
- 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" }) })
1555
1586
  }
1556
1587
  )
1557
1588
  ] }, o.id)) });
1558
1589
  }
1559
1590
  export {
1560
- zt as AiActivityPart,
1561
- $a as AiChat,
1562
- le as AiChatContext,
1563
- Wa as AiChatHeader,
1564
- gn as AiChatHistoryList,
1565
- hn as AiChatProvider,
1591
+ Mt as AiActivityPart,
1592
+ Ea as AiChat,
1593
+ de as AiChatContext,
1594
+ Ja as AiChatHeader,
1595
+ vn as AiChatHistoryList,
1596
+ gn as AiChatProvider,
1566
1597
  ke as AiEntityCard,
1567
- Jt as AiEntityListPart,
1598
+ Ut as AiEntityListPart,
1568
1599
  La as AiError,
1569
1600
  Aa as AiInput,
1570
- la as AiMessageBubble,
1571
- ba as AiMessageList,
1572
- Yt as AiMessagePartRenderer,
1573
- Ct as AiProposalCard,
1574
- fn as AiSidebar,
1575
- pt as AiTablePart,
1576
- ya as AiTypingIndicator,
1577
- pn as JuneauProvider,
1578
- ue as consumeStream,
1579
- un as createFetchStreamAdapter,
1580
- dn as createSseAdapter,
1581
- b as delay,
1582
- on as deserializeMessages,
1583
- Me as getMessageText,
1584
- sn as isChartPart,
1585
- ve as isProposalPart,
1586
- mn as juneauCs,
1587
- xe as juneauEn,
1588
- ln as mockAdapter,
1589
- we as parseJuneauWire,
1590
- rn as serializeForStorage,
1591
- ze as serializeMessages,
1592
- cn as trimChats,
1593
- Le as trimHistory,
1594
- Ze as useAiChat,
1595
- Ge as useAiChatContext,
1596
- yn as useAiChatContextSafe
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
1597
1628
  };
1598
1629
  //# sourceMappingURL=index.js.map