@factorialco/f0-react 13.11.1 → 13.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/{ArchiveThumbnail-BKLyYbOq.js → ArchiveThumbnail-DmnSGwhP.js} +1 -1
  2. package/dist/{ArchiveViewer-Cz5T16vE.js → ArchiveViewer-RNMB3M36.js} +2 -2
  3. package/dist/{ChatPostComposerDialog-C67F4elc.js → ChatPostComposerDialog-Z8gG_J2L.js} +2 -2
  4. package/dist/{CoachmarkProvider-BuWFPpmG.js → CoachmarkProvider-fehx7Q_o.js} +23651 -23539
  5. package/dist/{CodeThumbnail-D-wJheIP.js → CodeThumbnail-C6HoRhcZ.js} +1 -1
  6. package/dist/{CodeViewer-gDQOS6iI.js → CodeViewer-BZRBu6at.js} +4 -4
  7. package/dist/{DocumentToolbar-DLK2n_-s.js → DocumentToolbar-BHrbd-HZ.js} +4 -4
  8. package/dist/{DocxViewer-9hhmeMbJ.js → DocxViewer-V8WC-PWo.js} +1 -1
  9. package/dist/{F0AiProcessingOverlay-CbHR_I3P.js → F0AiProcessingOverlay-ReygG6pE.js} +172 -172
  10. package/dist/{F0Alert-BibfCJRG.js → F0Alert-D4m2sucP.js} +3 -3
  11. package/dist/F0AudioPlayer-Wj-PKKtF.js +2 -0
  12. package/dist/{F0Button-Cql35ZB4.js → F0Button-DliApWoo.js} +5764 -5335
  13. package/dist/{F0CanvasPanel-DjbzJ4if.js → F0CanvasPanel-BKvyk32z.js} +9616 -9564
  14. package/dist/{F0DocumentViewer-DdQaLXAs.js → F0DocumentViewer-B2vIyYsn.js} +2 -2
  15. package/dist/{F0DocumentViewer-Biac8pVX.js → F0DocumentViewer-CSJh6Ed7.js} +1 -1
  16. package/dist/{F0Map-BgIwfjqD.js → F0Map-DClia8fc.js} +56 -56
  17. package/dist/{F0Select-qyqqfXH7.js → F0Select-DLK87Tv6.js} +187 -187
  18. package/dist/{F0Text-DulwHmaW.js → F0Text-Cb-FVBzx.js} +1 -1
  19. package/dist/F0VideoPlayer-CsCI9jzU.js +1 -0
  20. package/dist/{F0VideoPlayer-BbmoKHh4.js → F0VideoPlayer-WyWePBV8.js} +2 -2
  21. package/dist/{HtmlThumbnail-lVNYvRe4.js → HtmlThumbnail-B_9tldlm.js} +1 -1
  22. package/dist/{HtmlViewer-DTorB5Ni.js → HtmlViewer-BVkwk56S.js} +6 -6
  23. package/dist/LayoutGroup-gwem4ADm.js +57 -0
  24. package/dist/{Map-B6eQeS3P.js → Map-BDMz636c.js} +7 -7
  25. package/dist/{PdfThumbnail-Ds_9D-7B.js → PdfThumbnail-CHPvHqdQ.js} +1 -1
  26. package/dist/{PdfViewer-e2eSdSp-.js → PdfViewer-CBs15JQG.js} +6 -6
  27. package/dist/{SandboxedHtmlFrame-C6RrQ2yQ.js → SandboxedHtmlFrame-CWcJ_fWA.js} +1 -1
  28. package/dist/{SheetViewer-CSkVsC3-.js → SheetViewer-BaqxWzpW.js} +3 -3
  29. package/dist/{TextViewer-10UG7pXL.js → TextViewer-DdEtdDZH.js} +2 -2
  30. package/dist/ai.js +3 -3
  31. package/dist/component-status.js +1 -1
  32. package/dist/{dist-BJcZ_X3W.js → dist-2k-bLufS.js} +1 -1
  33. package/dist/experimental.d.ts +2 -2
  34. package/dist/experimental.js +502 -502
  35. package/dist/f0.d.ts +1 -1
  36. package/dist/f0.js +202 -202
  37. package/dist/{highlight-CKsTraEJ.js → highlight-BFih_ytR.js} +1 -1
  38. package/dist/{maplibre-DZrUxuUr.js → maplibre-DYSBHNua.js} +1 -1
  39. package/dist/{pdfWorker-Dhn7-lDq.js → pdfWorker-C4oRZ-W-.js} +1 -1
  40. package/dist/{scrollarea-NoqKFiLU.js → scrollarea-B6RGaKme.js} +1 -1
  41. package/dist/{toolbarStyles-BgK2AYri.js → toolbarStyles-Bm2pq-KH.js} +1 -1
  42. package/dist/{types-BD4eJ3Ek.d.ts → types-Dp-ibo8p.d.ts} +2 -17
  43. package/dist/{useData-DPmbJ0Mf.js → useData-CuyhVJ87.js} +2 -2
  44. package/icons/animated/PalmTree.js +2 -2
  45. package/package.json +3 -2
  46. package/dist/F0AudioPlayer-CWwt7LV6.js +0 -2
  47. package/dist/F0VideoPlayer-y0zqezdL.js +0 -1
  48. package/dist/LayoutGroup-OL4BUDqc.js +0 -57
@@ -1,12 +1,12 @@
1
1
  import { a as e, r as t } from "./i18n-provider-C_jciu_6.js";
2
2
  import { n, t as r } from "./skeleton-BEiQvWC1.js";
3
3
  import { L as i, R as a } from "./tooltip-BX4dSfeL.js";
4
- import { T as o, U as s, h as c, n as l, r as u, t as d, wt as f, y as p } from "./F0Button-Cql35ZB4.js";
5
- import { $ as m, $t as h, A as g, Aa as _, Ao as v, As as y, B as b, Bt as x, C as S, Cc as C, Di as w, Ds as T, Ei as E, Ft as D, G as O, Gi as ee, Go as k, Gt as A, H as j, Ht as M, J as N, Jo as P, K as F, Kc as I, Ko as L, Kt as te, Lr as ne, Lt as re, M as ie, Ms as ae, Mt as R, O as oe, Oi as z, Ot as B, Po as se, Ps as ce, Pt as le, Q as ue, S as de, Sc as fe, St as pe, U as me, Ui as he, Vi as V, Vo as ge, Vr as _e, W as ve, Ws as ye, Wt as be, Xr as xe, Xt as Se, Y as Ce, Yt as we, Zr as Te, _t as Ee, a as De, an as H, ao as Oe, at as ke, b as U, bo as Ae, bs as je, cn as Me, ct as Ne, dn as Pe, ds as Fe, dt as Ie, en as Le, fn as Re, fs as ze, ft as Be, g as Ve, gn as He, gt as Ue, h as We, in as Ge, io as Ke, it as qe, j as Je, jr as Ye, jt as Xe, k as Ze, ki as Qe, kt as $e, ln as et, lo as tt, ls as nt, lt as rt, m as it, nl as at, nn as ot, ns as st, ot as ct, q as lt, qo as ut, r as dt, rn as ft, rs as pt, rt as W, ss as mt, st as ht, tl as gt, tt as _t, ut as vt, vc as yt, vn as bt, vt as xt, x as St, xn as Ct, y as wt, yi as Tt, yt as Et, zs as Dt } from "./F0CanvasPanel-DjbzJ4if.js";
4
+ import { K as o, T as s, U as c, h as l, n as u, r as d, t as f, y as p } from "./F0Button-DliApWoo.js";
5
+ import { $ as m, $t as h, A as g, Aa as _, Ao as v, As as y, B as b, Bt as x, C as S, Cc as C, Di as w, Ds as T, Ei as E, Ft as D, G as O, Gi as ee, Go as k, Gt as A, H as j, Ht as M, J as N, Jo as P, K as F, Kc as I, Ko as L, Kt as te, Lr as ne, Lt as re, M as ie, Ms as ae, Mt as R, O as oe, Oi as z, Ot as B, Po as se, Ps as ce, Pt as le, Q as ue, S as de, Sc as fe, St as pe, U as me, Ui as he, Vi as V, Vo as ge, Vr as _e, W as ve, Ws as ye, Wt as be, Xr as xe, Xt as Se, Y as Ce, Yt as we, Zr as Te, _t as Ee, a as De, an as H, ao as Oe, at as ke, b as U, bo as Ae, bs as je, cn as Me, ct as Ne, dn as Pe, ds as Fe, dt as Ie, en as Le, fn as Re, fs as ze, ft as Be, g as Ve, gn as He, gt as Ue, h as We, in as Ge, io as Ke, it as qe, j as Je, jr as Ye, jt as Xe, k as Ze, ki as Qe, kt as $e, ln as et, lo as tt, ls as nt, lt as rt, m as it, nl as at, nn as ot, ns as st, ot as ct, q as lt, qo as ut, r as dt, rn as ft, rs as pt, rt as W, ss as mt, st as ht, tl as gt, tt as _t, ut as vt, vc as yt, vn as bt, vt as xt, x as St, xn as Ct, y as wt, yi as Tt, yt as Et, zs as Dt } from "./F0CanvasPanel-BKvyk32z.js";
6
6
  import { o as Ot, t as G } from "./F0Icon-Dw-YD4Mz.js";
7
7
  import { t as kt } from "./i18n-provider-defaults-zH8WIgXQ.js";
8
- import { F as At, H as jt, M as Mt, O as Nt, S as Pt, V as Ft, g as It, h as Lt, l as Rt, m as zt, y as Bt } from "./useData-DPmbJ0Mf.js";
9
- import { Cr as Vt, Dr as Ht, En as Ut, Et as Wt, Nt as Gt, Sr as Kt, Tn as qt, Tr as Jt, _t as Yt, an as Xt, cn as Zt, en as Qt, gt as $t, lt as en, on as tn, vt as nn, xr as rn } from "./F0Select-qyqqfXH7.js";
8
+ import { F as At, H as jt, M as Mt, O as Nt, S as Pt, V as Ft, g as It, h as Lt, l as Rt, m as zt, y as Bt } from "./useData-CuyhVJ87.js";
9
+ import { Cr as Vt, Dr as Ht, En as Ut, Et as Wt, Nt as Gt, Sr as Kt, Tn as qt, Tr as Jt, _t as Yt, an as Xt, cn as Zt, en as Qt, gt as $t, lt as en, on as tn, vt as nn, xr as rn } from "./F0Select-DLK87Tv6.js";
10
10
  import { t as an } from "./Check-DAp9gCRh.js";
11
11
  import { t as on } from "./Ellipsis-CBouJQYY.js";
12
12
  import { t as sn } from "./ExternalLink-RdKU698E.js";
@@ -16,7 +16,7 @@ import { createContext as pn, createElement as mn, forwardRef as hn, memo as gn,
16
16
  import { Fragment as Sn, jsx as Z, jsxs as Q } from "react/jsx-runtime";
17
17
  import { createPortal as Cn } from "react-dom";
18
18
  import { useTrackVolume as wn } from "@livekit/components-react";
19
- //#region ../../node_modules/.pnpm/motion@12.17.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/motion/dist/es/framer-motion/dist/es/utils/use-motion-value-event.mjs
19
+ //#region ../../node_modules/.pnpm/framer-motion@12.43.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-motion-value-event.mjs
20
20
  function Tn(e, t, n) {
21
21
  bn(() => e.on(t, n), [
22
22
  e,
@@ -45,7 +45,7 @@ function Nn(e, t) {
45
45
  }
46
46
  //#endregion
47
47
  //#region src/elements/F0Composer/parts/surface.ts
48
- var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border-secondary bg-f1-background/95 shadow-md transition-colors", Fn = [], In = () => null, Ln = ({ onSend: e, inProgress: t = !1, onStop: n, sendKind: r = "send", hasAttachments: a = !1, sendBlocked: o = !1, maxLength: c, maxLengthError: u, error: d = null, labels: p, placeholders: m, placeholdersPaused: h, role: g = "combobox", name: _, mentions: v, autocomplete: y, voice: b, onTextChange: x, onCleared: S, onEscape: w, onArrowUpWhenEmpty: T, onPasteFiles: E, pastePreferText: D = !1, onStateChange: O, header: ee, tray: k, leading: A, toolbarStart: j, toolbarCenter: M, collapsible: N = !1, collapsed: P = !1, replacement: F, accent: I = !1, asForm: L = !1, className: te, surfaceRef: ne, onSurfaceFocus: re, onSurfaceBlur: ie, handleRef: ae, reducedMotion: R = !1, "data-testid": oe }) => {
48
+ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border-secondary bg-f1-background/95 shadow-md transition-colors", Fn = [], In = () => null, Ln = ({ onSend: e, inProgress: t = !1, onStop: n, sendKind: r = "send", hasAttachments: a = !1, sendBlocked: s = !1, maxLength: l, maxLengthError: d, error: f = null, labels: p, placeholders: m, placeholdersPaused: h, role: g = "combobox", name: _, mentions: v, autocomplete: y, voice: b, onTextChange: x, onCleared: S, onEscape: w, onArrowUpWhenEmpty: T, onPasteFiles: E, pastePreferText: D = !1, onStateChange: O, header: ee, tray: k, leading: A, toolbarStart: j, toolbarCenter: M, collapsible: N = !1, collapsed: P = !1, replacement: F, accent: I = !1, asForm: L = !1, className: te, surfaceRef: ne, onSurfaceFocus: re, onSurfaceBlur: ie, handleRef: ae, reducedMotion: R = !1, "data-testid": oe }) => {
49
49
  let z = rt(p, b), B = F != null, { error: se, show: le, clear: ue } = Ne(), de = Y(() => {}), fe = Y(() => {}), pe = Y(""), me = K((e) => {
50
50
  let t = pe.current, n = t && !/\s$/.test(t) ? " " : "";
51
51
  de.current(`${t}${n}${e}`);
@@ -107,11 +107,11 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
107
107
  Ye,
108
108
  V.status
109
109
  ]);
110
- let [Xe, Ze] = X(!1), Qe = c !== void 0 && Te.trim().length > c;
110
+ let [Xe, Ze] = X(!1), Qe = l !== void 0 && Te.trim().length > l;
111
111
  q(() => {
112
112
  Qe || Ze(!1);
113
113
  }, [Qe]);
114
- let $e = Xe && Qe ? u ?? null : null, et = $e ?? d ?? se, [tt, nt] = X(!1), it = Y(!1), at = (Te.trim().length > 0 || a) && !xe && !o && !tt && !B, ot = t && !ye, lt = K(() => {
114
+ let $e = Xe && Qe ? d ?? null : null, et = $e ?? f ?? se, [tt, nt] = X(!1), it = Y(!1), at = (Te.trim().length > 0 || a) && !xe && !s && !tt && !B, ot = t && !ye, lt = K(() => {
115
115
  if (!at || it.current) return;
116
116
  if (Qe) {
117
117
  Ze(!0);
@@ -206,7 +206,7 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
206
206
  enabled: !!E && !B,
207
207
  onFiles: E ?? (() => {}),
208
208
  preferText: D
209
- }), Dt = vn(), Ot = vn(), G = `chat-composer-mentions-${Dt.replace(/:/g, "")}`, kt = U.isOpen && !Ve && !B && (U.isLoading || U.rows.length > 0), At = U.rows[U.selectedIndex] ?? U.rows[0], jt = kt && At ? ht(G, At.item) : void 0, Mt = (e) => be ? /* @__PURE__ */ Z(l, {
209
+ }), Dt = vn(), Ot = vn(), G = `chat-composer-mentions-${Dt.replace(/:/g, "")}`, kt = U.isOpen && !Ve && !B && (U.isLoading || U.rows.length > 0), At = U.rows[U.selectedIndex] ?? U.rows[0], jt = kt && At ? ht(G, At.item) : void 0, Mt = (e) => be ? /* @__PURE__ */ Z(u, {
210
210
  type: "button",
211
211
  variant: "outline",
212
212
  size: e,
@@ -216,10 +216,10 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
216
216
  onClick: pt,
217
217
  disabled: b?.disabled,
218
218
  loading: ge || ye || !!b?.busy
219
- }) : null, Nt = ot ? "stop" : r, Pt = (e) => /* @__PURE__ */ Z(f, {
219
+ }) : null, Nt = ot ? "stop" : r, Pt = (e) => /* @__PURE__ */ Z(o, {
220
220
  initial: !1,
221
221
  mode: "popLayout",
222
- children: /* @__PURE__ */ Z(s.div, {
222
+ children: /* @__PURE__ */ Z(c.div, {
223
223
  className: "flex",
224
224
  initial: !R && {
225
225
  opacity: 0,
@@ -237,7 +237,7 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
237
237
  duration: .15,
238
238
  ease: Le
239
239
  },
240
- children: ot ? /* @__PURE__ */ Z(l, {
240
+ children: ot ? /* @__PURE__ */ Z(u, {
241
241
  type: L ? "submit" : "button",
242
242
  variant: "neutral",
243
243
  size: e,
@@ -247,7 +247,7 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
247
247
  onClick: L ? void 0 : () => {
248
248
  n?.(), H.current?.focus();
249
249
  }
250
- }) : /* @__PURE__ */ Z(l, {
250
+ }) : /* @__PURE__ */ Z(u, {
251
251
  type: L ? "submit" : "button",
252
252
  variant: "default",
253
253
  size: e,
@@ -260,9 +260,9 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
260
260
  }, `${Nt}-${ot ? 0 : ut}`)
261
261
  }), Ft = { duration: R ? 0 : .15 }, It = typeof j == "function" ? j(V.status) : j, Lt = /* @__PURE__ */ Z("div", {
262
262
  className: "grid",
263
- children: /* @__PURE__ */ Z(f, {
263
+ children: /* @__PURE__ */ Z(o, {
264
264
  initial: !1,
265
- children: ve ? /* @__PURE__ */ Q(s.div, {
265
+ children: ve ? /* @__PURE__ */ Q(c.div, {
266
266
  className: "flex items-center gap-3 p-3 [grid-area:1/1]",
267
267
  initial: { opacity: 0 },
268
268
  animate: { opacity: 1 },
@@ -273,7 +273,7 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
273
273
  className: "min-w-0 flex-1"
274
274
  }), /* @__PURE__ */ Q("div", {
275
275
  className: "flex shrink-0 items-center gap-2",
276
- children: [/* @__PURE__ */ Z(l, {
276
+ children: [/* @__PURE__ */ Z(u, {
277
277
  type: "button",
278
278
  variant: "outline",
279
279
  size: "md",
@@ -281,7 +281,7 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
281
281
  label: z.cancelRecording,
282
282
  icon: C,
283
283
  onClick: mt
284
- }), /* @__PURE__ */ Z(l, {
284
+ }), /* @__PURE__ */ Z(u, {
285
285
  type: "button",
286
286
  variant: "default",
287
287
  size: "md",
@@ -291,7 +291,7 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
291
291
  onClick: V.stop
292
292
  })]
293
293
  })]
294
- }, "recording-row") : /* @__PURE__ */ Q(s.div, {
294
+ }, "recording-row") : /* @__PURE__ */ Q(c.div, {
295
295
  className: "flex items-center gap-2 p-3 [grid-area:1/1]",
296
296
  initial: { opacity: 0 },
297
297
  animate: { opacity: 1 },
@@ -372,9 +372,9 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
372
372
  }) : null
373
373
  ]
374
374
  }),
375
- N ? /* @__PURE__ */ Z(f, {
375
+ N ? /* @__PURE__ */ Z(o, {
376
376
  initial: !1,
377
- children: P ? null : /* @__PURE__ */ Z(s.div, {
377
+ children: P ? null : /* @__PURE__ */ Z(c.div, {
378
378
  className: "overflow-hidden",
379
379
  initial: {
380
380
  opacity: 0,
@@ -407,9 +407,9 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
407
407
  onSelect: U.selectRow,
408
408
  pinnedDescription: z.mentionPinnedDescription
409
409
  }),
410
- F === void 0 ? zt : /* @__PURE__ */ Z(f, {
410
+ F === void 0 ? zt : /* @__PURE__ */ Z(o, {
411
411
  initial: !1,
412
- children: B ? /* @__PURE__ */ Z(s.div, {
412
+ children: B ? /* @__PURE__ */ Z(c.div, {
413
413
  className: "overflow-hidden",
414
414
  initial: {
415
415
  height: 0,
@@ -442,7 +442,7 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
442
442
  ]
443
443
  },
444
444
  children: F
445
- }, "replacement") : /* @__PURE__ */ Z(s.div, {
445
+ }, "replacement") : /* @__PURE__ */ Z(c.div, {
446
446
  className: "overflow-hidden",
447
447
  initial: {
448
448
  height: 0,
@@ -504,7 +504,7 @@ var Pn = "relative flex flex-col rounded-lg border border-solid border-f1-border
504
504
  //#endregion
505
505
  //#region src/addons/ai/F0AiChat/hooks/useRevealOnChange.ts
506
506
  function Rn(e, t, n = .2) {
507
- let r = c(), [i, a] = X(!0), o = Y(e);
507
+ let r = l(), [i, a] = X(!0), o = Y(e);
508
508
  return p(() => {
509
509
  if (o.current === e) return;
510
510
  let n = o.current;
@@ -617,7 +617,7 @@ var zn = (e) => {
617
617
  let { id: t, type: n, ...r } = e;
618
618
  return r;
619
619
  }), Un = ({ actions: e, showAttachEntry: n, onAttachClick: r, attachDisabled: i, attachDisabledTooltip: a, disabled: o, onOpenChange: s }) => {
620
- let c = t(), [u, d] = X(!1), f = (e) => {
620
+ let c = t(), [l, d] = X(!1), f = (e) => {
621
621
  d(e), s?.(e);
622
622
  }, p = [...n ? [{
623
623
  label: c.ai.addFilesOrPhotos,
@@ -632,22 +632,22 @@ var zn = (e) => {
632
632
  items: p,
633
633
  align: "start",
634
634
  disabled: o,
635
- open: u,
635
+ open: l,
636
636
  onOpenChange: f,
637
637
  modal: !1,
638
- children: /* @__PURE__ */ Z(l, {
638
+ children: /* @__PURE__ */ Z(u, {
639
639
  label: c.ai.addToConversation,
640
640
  hideLabel: !0,
641
641
  type: "button",
642
642
  icon: jt,
643
643
  variant: "outline",
644
644
  size: "md",
645
- pressed: u,
645
+ pressed: l,
646
646
  disabled: o
647
647
  })
648
648
  })
649
649
  });
650
- }, Wn = ({ onUploadFiles: e, composerActions: n, isAtMaxFiles: r, maxFiles: i, acceptValue: a, fileInputRef: o, handleFileSelect: s, recordingStatus: c, onComposerActionsOpenChange: u }) => {
650
+ }, Wn = ({ onUploadFiles: e, composerActions: n, isAtMaxFiles: r, maxFiles: i, acceptValue: a, fileInputRef: o, handleFileSelect: s, recordingStatus: c, onComposerActionsOpenChange: l }) => {
651
651
  let d = t(), f = c === "transcribing", p = () => o.current?.click(), m = n?.length ? n : null;
652
652
  return !e && !m ? null : /* @__PURE__ */ Q(Sn, { children: [m ? /* @__PURE__ */ Z(Un, {
653
653
  actions: m,
@@ -656,8 +656,8 @@ var zn = (e) => {
656
656
  attachDisabled: r,
657
657
  attachDisabledTooltip: i === void 0 ? void 0 : d.ai.tooManyFilesError.replace("{{maxFiles}}", String(i)),
658
658
  disabled: f,
659
- onOpenChange: u
660
- }) : /* @__PURE__ */ Z(l, {
659
+ onOpenChange: l
660
+ }) : /* @__PURE__ */ Z(u, {
661
661
  label: d.ai.attachFile,
662
662
  hideLabel: !0,
663
663
  type: "button",
@@ -860,12 +860,12 @@ var zn = (e) => {
860
860
  color: "default"
861
861
  })
862
862
  }),
863
- /* @__PURE__ */ Z(u, {
863
+ /* @__PURE__ */ Z(d, {
864
864
  className: "h-full flex-1 py-0.5 text-[12px] font-medium text-f1-foreground-secondary",
865
865
  lines: 1,
866
866
  children: e.text
867
867
  }),
868
- /* @__PURE__ */ Z(l, {
868
+ /* @__PURE__ */ Z(u, {
869
869
  type: "button",
870
870
  variant: "ghost",
871
871
  label: r.ai.removeQuote,
@@ -1021,17 +1021,17 @@ function cr(e) {
1021
1021
  }
1022
1022
  //#endregion
1023
1023
  //#region src/addons/ai/F0AiChatTextArea/AiChatComposer.tsx
1024
- var lr = ({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholders: o, creditWarning: l, clarifyingUI: u, pendingContext: d = null, onPendingContextChange: p, pendingQuote: m = null, onPendingQuoteChange: h, fileAttachments: g, toolbarStart: _, composerActions: v, onComposerActionsOpenChange: y, onTranscribe: b, searchPersons: x, mentionSources: S, onProcessFilesRef: C, disclaimer: w, usageLimits: T, footer: E, isWelcomeScreen: D = !1, fullscreen: O = !1, welcomeScreenSuggestions: ee, onSuggestionClick: k, welcomeScreenSuggestionsPlacement: A = "above", welcomeScreenSuggestionsCollapsedByDefault: j = !1, welcomeScreenCards: M, padding: N = "default", name: P, ref: F }) => {
1025
- let I = t(), L = !!c(), te = Y(null), [ne, re] = X(null), [ie, ae] = X(!1), [R, oe] = X({
1024
+ var lr = ({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholders: s, creditWarning: u, clarifyingUI: d, pendingContext: f = null, onPendingContextChange: p, pendingQuote: m = null, onPendingQuoteChange: h, fileAttachments: g, toolbarStart: _, composerActions: v, onComposerActionsOpenChange: y, onTranscribe: b, searchPersons: x, mentionSources: S, onProcessFilesRef: C, disclaimer: w, usageLimits: T, footer: E, isWelcomeScreen: D = !1, fullscreen: O = !1, welcomeScreenSuggestions: ee, onSuggestionClick: k, welcomeScreenSuggestionsPlacement: A = "above", welcomeScreenSuggestionsCollapsedByDefault: j = !1, welcomeScreenCards: M, padding: N = "default", name: P, ref: F }) => {
1025
+ let I = t(), L = !!l(), te = Y(null), [ne, re] = X(null), [ie, ae] = X(!1), [R, oe] = X({
1026
1026
  isEmpty: !0,
1027
1027
  recorder: "idle"
1028
1028
  }), z = Y(null), B = Y(null);
1029
1029
  q(() => () => {
1030
1030
  B.current && clearTimeout(B.current);
1031
1031
  }, []);
1032
- let se = u != null, ce = Y(d), le = Y(m);
1032
+ let se = d != null, ce = Y(f), le = Y(m);
1033
1033
  xn(() => {
1034
- ce.current = d, le.current = m;
1034
+ ce.current = f, le.current = m;
1035
1035
  });
1036
1036
  let { tracking: ue, setFocusChatInputFunction: de } = W(), fe = K((e, t) => {
1037
1037
  ue?.onWelcomeSuggestionClick?.({
@@ -1060,7 +1060,7 @@ var lr = ({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholde
1060
1060
  let we = K((e) => void ve(e), [ve]), Te = pe.filter((e) => e.status === "uploaded"), De = pe.some((e) => e.status === "uploading"), H = pe.some((e) => e.status === "error"), Oe = !R.isEmpty || Te.length > 0, ke = async ({ text: t, mentions: n }) => {
1061
1061
  if (H) return Se(I.ai.fileUploadBlockedSubmit), !1;
1062
1062
  if (a && await a() === !1) return !1;
1063
- let r = Te, i = r.flatMap((e) => e.uploadedFile ? [e.uploadedFile] : []), o = d, s = m;
1063
+ let r = Te, i = r.flatMap((e) => e.uploadedFile ? [e.uploadedFile] : []), o = f, s = m;
1064
1064
  o && p?.(null), s && h?.(null);
1065
1065
  try {
1066
1066
  await e({
@@ -1074,7 +1074,7 @@ var lr = ({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholde
1074
1074
  }
1075
1075
  for (let e of r) be(e.id);
1076
1076
  return !0;
1077
- }, U = ne ? ne.prompt ?? ne.title : null, Ae = U ? [U] : o ?? [], je = A === "inside", Me = D && ee && ee.length > 0 && k ? /* @__PURE__ */ Z(Ee, {
1077
+ }, U = ne ? ne.prompt ?? ne.title : null, Ae = U ? [U] : s ?? [], je = A === "inside", Me = D && ee && ee.length > 0 && k ? /* @__PURE__ */ Z(Ee, {
1078
1078
  suggestions: ee,
1079
1079
  onItemClick: fe,
1080
1080
  onItemHover: re,
@@ -1097,7 +1097,7 @@ var lr = ({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholde
1097
1097
  1
1098
1098
  ]
1099
1099
  }, He = D && O && !!M && M.length > 0, Ue = O && D, { motionProps: We } = Rn(D, 160, .5);
1100
- return /* @__PURE__ */ Q(s.div, {
1100
+ return /* @__PURE__ */ Q(c.div, {
1101
1101
  ref: F,
1102
1102
  "data-composer-layout": Ue ? "welcome" : "docked",
1103
1103
  className: i("flex flex-col items-center gap-2", N === "default" && "px-4 pb-3 pt-2", Ue && "min-h-0 flex-1 justify-start -mt-20"),
@@ -1105,9 +1105,9 @@ var lr = ({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholde
1105
1105
  children: [
1106
1106
  /* @__PURE__ */ Q("div", {
1107
1107
  className: "flex w-full max-w-content flex-col gap-2",
1108
- children: [Me && !je ? /* @__PURE__ */ Z("div", { children: j ? /* @__PURE__ */ Z(f, {
1108
+ children: [Me && !je ? /* @__PURE__ */ Z("div", { children: j ? /* @__PURE__ */ Z(o, {
1109
1109
  initial: !1,
1110
- children: Ne ? /* @__PURE__ */ Z(s.div, {
1110
+ children: Ne ? /* @__PURE__ */ Z(c.div, {
1111
1111
  className: "overflow-hidden",
1112
1112
  initial: {
1113
1113
  opacity: 0,
@@ -1125,14 +1125,14 @@ var lr = ({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholde
1125
1125
  children: Me
1126
1126
  }, "welcome-suggestions") : null
1127
1127
  }) : Me }) : null, /* @__PURE__ */ Z(Kn, {
1128
- creditWarning: l,
1128
+ creditWarning: u,
1129
1129
  children: /* @__PURE__ */ Z(Ln, {
1130
1130
  asForm: !0,
1131
1131
  surfaceRef: z,
1132
1132
  handleRef: te,
1133
1133
  className: "isolate z-20 items-stretch p-0 hover:cursor-text",
1134
1134
  accent: se,
1135
- replacement: se ? u : null,
1135
+ replacement: se ? d : null,
1136
1136
  onSurfaceFocus: () => ae(!0),
1137
1137
  onSurfaceBlur: Ie,
1138
1138
  onStateChange: oe,
@@ -1265,7 +1265,7 @@ function mr({ ...e }) {
1265
1265
  //#endregion
1266
1266
  //#region src/addons/ai/F0AiChat/components/markdownRenderers/components/Image.tsx
1267
1267
  function hr({ src: e, alt: n, ...r }) {
1268
- let o = t(), s = ot(), c = ft(), l = H(e || void 0), [u, f] = X(!1), [p, m] = X(!1), g = n || (e ? x(e) : "") || "image";
1268
+ let o = t(), s = ot(), c = ft(), l = H(e || void 0), [u, d] = X(!1), [p, m] = X(!1), g = n || (e ? x(e) : "") || "image";
1269
1269
  if (!e || u || l.status === "error") return n ? /* @__PURE__ */ Z("span", {
1270
1270
  className: "text-f1-foreground-secondary",
1271
1271
  children: n
@@ -1274,7 +1274,7 @@ function hr({ src: e, alt: n, ...r }) {
1274
1274
  ...r,
1275
1275
  src: l.url,
1276
1276
  alt: n,
1277
- onError: () => f(!0),
1277
+ onError: () => d(!0),
1278
1278
  className: i("block max-w-full rounded-md", r.className)
1279
1279
  }) : /* @__PURE__ */ Z("span", { className: "block h-40 w-64 max-w-full animate-pulse rounded-md bg-f1-background-secondary motion-reduce:animate-none" });
1280
1280
  return /* @__PURE__ */ Q("span", {
@@ -1294,7 +1294,7 @@ function hr({ src: e, alt: n, ...r }) {
1294
1294
  children: _
1295
1295
  }) : _, /* @__PURE__ */ Z("span", {
1296
1296
  className: "absolute right-2 top-2 rounded",
1297
- children: /* @__PURE__ */ Z(d, {
1297
+ children: /* @__PURE__ */ Z(f, {
1298
1298
  variant: "neutral",
1299
1299
  label: o.chat.download,
1300
1300
  hideLabel: !0,
@@ -1756,7 +1756,7 @@ function Vr({ children: e, title: n, ...r }) {
1756
1756
  className: "group/table relative my-2 flex flex-col gap-2 rounded-md border border-solid border-f1-border-secondary first:mt-0 last:mb-0",
1757
1757
  children: [/* @__PURE__ */ Q("div", {
1758
1758
  className: "flex items-center justify-between gap-3 border-0 border-b border-solid border-f1-border-secondary px-3 py-2",
1759
- children: [/* @__PURE__ */ Z(u, {
1759
+ children: [/* @__PURE__ */ Z(d, {
1760
1760
  tag: "h2",
1761
1761
  className: "text-base font-medium capitalize text-f1-foreground",
1762
1762
  children: n ?? a.ai.reportCard.tableLabel
@@ -1942,12 +1942,12 @@ var Xr = {
1942
1942
  size: "md"
1943
1943
  }) : null, mi = ({ action: e, isActive: n }) => {
1944
1944
  let r = t();
1945
- return e.type === "open" && e.showButton !== !1 ? /* @__PURE__ */ Z(d, {
1945
+ return e.type === "open" && e.showButton !== !1 ? /* @__PURE__ */ Z(f, {
1946
1946
  variant: "outline",
1947
1947
  size: "md",
1948
1948
  label: n ? r.actions.close : r.ai.reportCard.openButton,
1949
1949
  onClick: n ? e.onClose : e.onOpen
1950
- }) : e.type === "custom" ? /* @__PURE__ */ Z(d, {
1950
+ }) : e.type === "custom" ? /* @__PURE__ */ Z(f, {
1951
1951
  variant: "outline",
1952
1952
  size: "md",
1953
1953
  icon: e.icon,
@@ -1967,10 +1967,10 @@ function hi({ avatar: e, title: t, description: n, isActive: r = !1, action: a,
1967
1967
  /* @__PURE__ */ Z(pi, { avatar: e }),
1968
1968
  /* @__PURE__ */ Q("div", {
1969
1969
  className: "flex min-w-0 flex-1 flex-col",
1970
- children: [/* @__PURE__ */ Z(u, {
1970
+ children: [/* @__PURE__ */ Z(d, {
1971
1971
  className: "text-lg font-semibold text-f1-foreground",
1972
1972
  children: t
1973
- }), n ? /* @__PURE__ */ Z(u, {
1973
+ }), n ? /* @__PURE__ */ Z(d, {
1974
1974
  className: "text-base text-f1-foreground-secondary",
1975
1975
  children: n
1976
1976
  }) : null]
@@ -2610,7 +2610,7 @@ function da({ anchor: e, onReply: n }) {
2610
2610
  visibility: o ? "visible" : "hidden"
2611
2611
  },
2612
2612
  className: i("z-50 rounded-md bg-f1-background p-1 border border-solid border-f1-border-secondary", "drop-shadow"),
2613
- children: /* @__PURE__ */ Z(l, {
2613
+ children: /* @__PURE__ */ Z(u, {
2614
2614
  ref: a,
2615
2615
  type: "button",
2616
2616
  variant: "ghost",
@@ -2767,7 +2767,7 @@ function ba(e) {
2767
2767
  //#endregion
2768
2768
  //#region src/addons/ai/F0AiMessagesContainer/components/feedback/TurnFeedback.tsx
2769
2769
  var xa = ({ content: e, targetMessage: n, onCopy: r }) => {
2770
- let i = t(), { open: a } = ya(), [s, c] = X(null);
2770
+ let i = t(), { open: a } = ya(), [o, c] = X(null);
2771
2771
  return /* @__PURE__ */ Q("div", {
2772
2772
  className: "flex",
2773
2773
  children: [
@@ -2779,9 +2779,9 @@ var xa = ({ content: e, targetMessage: n, onCopy: r }) => {
2779
2779
  t.currentTarget.blur(), r?.(e);
2780
2780
  }
2781
2781
  }),
2782
- /* @__PURE__ */ Z(o, {
2782
+ /* @__PURE__ */ Z(s, {
2783
2783
  onClick: (e) => {
2784
- let t = s === "like" ? null : "like";
2784
+ let t = o === "like" ? null : "like";
2785
2785
  t && a(t, n), c(t), e.currentTarget.blur();
2786
2786
  },
2787
2787
  compact: !0,
@@ -2792,14 +2792,14 @@ var xa = ({ content: e, targetMessage: n, onCopy: r }) => {
2792
2792
  className: "flex min-w-0 flex-1 items-center justify-center gap-1",
2793
2793
  children: /* @__PURE__ */ Z(G, {
2794
2794
  size: "md",
2795
- icon: s === "like" ? k : L,
2795
+ icon: o === "like" ? k : L,
2796
2796
  color: "default"
2797
2797
  })
2798
2798
  })
2799
2799
  }),
2800
- /* @__PURE__ */ Z(o, {
2800
+ /* @__PURE__ */ Z(s, {
2801
2801
  onClick: (e) => {
2802
- let t = s === "dislike" ? null : "dislike";
2802
+ let t = o === "dislike" ? null : "dislike";
2803
2803
  t && a(t, n), c(t), e.currentTarget.blur();
2804
2804
  },
2805
2805
  compact: !0,
@@ -2810,14 +2810,14 @@ var xa = ({ content: e, targetMessage: n, onCopy: r }) => {
2810
2810
  className: "flex min-w-0 flex-1 items-center justify-center gap-1",
2811
2811
  children: /* @__PURE__ */ Z(G, {
2812
2812
  size: "md",
2813
- icon: s === "dislike" ? ut : P,
2813
+ icon: o === "dislike" ? ut : P,
2814
2814
  color: "default"
2815
2815
  })
2816
2816
  })
2817
2817
  })
2818
2818
  ]
2819
2819
  });
2820
- }, Sa = ({ position: e }) => /* @__PURE__ */ Z(s.div, {
2820
+ }, Sa = ({ position: e }) => /* @__PURE__ */ Z(c.div, {
2821
2821
  transition: {
2822
2822
  duration: .2,
2823
2823
  ease: "easeOut"
@@ -2833,17 +2833,17 @@ var xa = ({ content: e, targetMessage: n, onCopy: r }) => {
2833
2833
  "bg-gradient-to-t from-f1-background dark:from-f1-background-secondary to-transparent",
2834
2834
  "after:bottom-0"
2835
2835
  ])
2836
- }), Ca = ({ icon: e, title: t, children: n, open: r, defaultOpen: a = !1, onOpenChange: o, lockOpen: l = !1 }) => {
2837
- let [u, d] = X(a), f = c(), p = r !== void 0, m = p ? r : u;
2836
+ }), Ca = ({ icon: e, title: t, children: n, open: r, defaultOpen: a = !1, onOpenChange: o, lockOpen: s = !1 }) => {
2837
+ let [u, d] = X(a), f = l(), p = r !== void 0, m = p ? r : u;
2838
2838
  return /* @__PURE__ */ Q(E, {
2839
2839
  className: "mb-1 w-full",
2840
2840
  open: m,
2841
2841
  onOpenChange: (e) => {
2842
- l || (p || d(e), o?.(e));
2842
+ s || (p || d(e), o?.(e));
2843
2843
  },
2844
2844
  children: [/* @__PURE__ */ Q(z, {
2845
- disabled: l,
2846
- className: i("gap-1", l ? "flex w-full items-center text-base text-f1-foreground-secondary" : "flex w-full items-center text-base text-f1-foreground-secondary transition-colors duration-150 hover:text-f1-foreground [&[data-state=open]>svg]:rotate-90"),
2845
+ disabled: s,
2846
+ className: i("gap-1", s ? "flex w-full items-center text-base text-f1-foreground-secondary" : "flex w-full items-center text-base text-f1-foreground-secondary transition-colors duration-150 hover:text-f1-foreground [&[data-state=open]>svg]:rotate-90"),
2847
2847
  children: [
2848
2848
  /* @__PURE__ */ Z("span", {
2849
2849
  className: "flex items-center justify-start h-6 w-6",
@@ -2856,12 +2856,12 @@ var xa = ({ content: e, targetMessage: n, onCopy: r }) => {
2856
2856
  className: "min-h-6 flex items-center",
2857
2857
  children: /* @__PURE__ */ Z("span", { children: t })
2858
2858
  }),
2859
- l ? null : /* @__PURE__ */ Z(G, { icon: Kt })
2859
+ s ? null : /* @__PURE__ */ Z(G, { icon: Kt })
2860
2860
  ]
2861
2861
  }), /* @__PURE__ */ Z(w, {
2862
2862
  forceMount: !0,
2863
2863
  className: "data-[state=open]:mt-3",
2864
- children: /* @__PURE__ */ Z(s.div, {
2864
+ children: /* @__PURE__ */ Z(c.div, {
2865
2865
  initial: !1,
2866
2866
  animate: {
2867
2867
  height: m ? "auto" : 0,
@@ -2989,7 +2989,7 @@ var xa = ({ content: e, targetMessage: n, onCopy: r }) => {
2989
2989
  ]
2990
2990
  });
2991
2991
  }, ja = 35, Ma = 22, Na = 400, Pa = 2500, Fa = 220, Ia = ({ phrase: e, typed: t, phraseIndex: n, onClick: r }) => {
2992
- let a = c(), o = !!r;
2992
+ let a = l(), o = !!r;
2993
2993
  return /* @__PURE__ */ Q("p", {
2994
2994
  role: o ? "button" : void 0,
2995
2995
  tabIndex: o ? 0 : void 0,
@@ -3009,9 +3009,9 @@ var xa = ({ content: e, targetMessage: n, onCopy: r }) => {
3009
3009
  })]
3010
3010
  }, n);
3011
3011
  }, La = ({ messages: e, caption: t, subtitle: n, cta: r, onClick: a, fullscreen: o = !1 }) => {
3012
- let [s, u] = X(0), [d, f] = X(0), [p, m] = X("starting"), h = c(), g = e[s] ?? "", _ = e.join("\0"), v = Y(!0);
3012
+ let [s, c] = X(0), [d, f] = X(0), [p, m] = X("starting"), h = l(), g = e[s] ?? "", _ = e.join("\0"), v = Y(!0);
3013
3013
  return q(() => {
3014
- v.current ? v.current = !1 : (u(0), f(0), m("writing"));
3014
+ v.current ? v.current = !1 : (c(0), f(0), m("writing"));
3015
3015
  }, [_]), q(() => {
3016
3016
  if (h) return;
3017
3017
  let t;
@@ -3021,7 +3021,7 @@ var xa = ({ content: e, targetMessage: n, onCopy: r }) => {
3021
3021
  if (e.length <= 1) return;
3022
3022
  t = setTimeout(() => m("erasing"), Pa);
3023
3023
  } else p === "erasing" && (t = d > 0 ? setTimeout(() => f((e) => e - 1), Ma) : setTimeout(() => {
3024
- u((t) => (t + 1) % e.length), m("starting");
3024
+ c((t) => (t + 1) % e.length), m("starting");
3025
3025
  }, Fa));
3026
3026
  return () => {
3027
3027
  t && clearTimeout(t);
@@ -3037,7 +3037,7 @@ var xa = ({ content: e, targetMessage: n, onCopy: r }) => {
3037
3037
  children: /* @__PURE__ */ Q("div", {
3038
3038
  className: "flex flex-col items-center",
3039
3039
  children: [
3040
- r ? /* @__PURE__ */ Z(l, {
3040
+ r ? /* @__PURE__ */ Z(u, {
3041
3041
  variant: "neutral",
3042
3042
  size: "sm",
3043
3043
  className: "mb-4",
@@ -3129,7 +3129,7 @@ var Ba = {
3129
3129
  filePreviews: e.filePreviews,
3130
3130
  children: n
3131
3131
  }) : n;
3132
- }, Ha = ({ turns: e, isLoadingThread: n = !1, interrupt: r, initialMessage: a, initialMessageCaption: o, initialMessageSubtitle: c, initialMessageCta: u, onWelcomeClick: d, renderToolCall: p, onReplyQuote: m, onAssistantMessageRendered: h, autoScrollUserIntoView: g = !0, renderMarkdown: _, feedback: v, freezeLayout: y = !1, noShadows: b = !1, fullscreen: x = !1, children: S, AssistantMessage: C, UserMessage: w, onRegenerate: T, onCopy: E }) => {
3132
+ }, Ha = ({ turns: e, isLoadingThread: n = !1, interrupt: r, initialMessage: a, initialMessageCaption: s, initialMessageSubtitle: l, initialMessageCta: d, onWelcomeClick: f, renderToolCall: p, onReplyQuote: m, onAssistantMessageRendered: h, autoScrollUserIntoView: g = !0, renderMarkdown: _, feedback: v, freezeLayout: y = !1, noShadows: b = !1, fullscreen: x = !1, children: S, AssistantMessage: C, UserMessage: w, onRegenerate: T, onCopy: E }) => {
3133
3133
  let { modal: D, handleSubmit: O, handleClose: ee } = ba(v ?? Ba), k = t(), A = C ?? ha, j = w ?? Aa, M = J(() => {
3134
3134
  let e = a ?? k.ai.defaultInitialMessage;
3135
3135
  return (Array.isArray(e) ? e : [e]).filter((e) => typeof e == "string" && e.length > 0);
@@ -3245,10 +3245,10 @@ var Ba = {
3245
3245
  n ? /* @__PURE__ */ Z(Wa, {}) : null,
3246
3246
  N ? /* @__PURE__ */ Z(La, {
3247
3247
  messages: M,
3248
- caption: o,
3249
- subtitle: c,
3250
- cta: u,
3251
- onClick: d,
3248
+ caption: s,
3249
+ subtitle: l,
3250
+ cta: d,
3251
+ onClick: f,
3252
3252
  fullscreen: x
3253
3253
  }) : null,
3254
3254
  n ? null : e.map((e, t) => B(e, t)),
@@ -3265,7 +3265,7 @@ var Ba = {
3265
3265
  ref: I,
3266
3266
  children: S
3267
3267
  }),
3268
- /* @__PURE__ */ Z(f, { children: ne ? /* @__PURE__ */ Z(s.div, {
3268
+ /* @__PURE__ */ Z(o, { children: ne ? /* @__PURE__ */ Z(c.div, {
3269
3269
  className: "sticky bottom-[calc(0.5rem+var(--f0-ai-composer-overlap,0px))] z-10 flex justify-center",
3270
3270
  initial: {
3271
3271
  opacity: 0,
@@ -3280,7 +3280,7 @@ var Ba = {
3280
3280
  scale: .8
3281
3281
  },
3282
3282
  transition: { duration: .2 },
3283
- children: /* @__PURE__ */ Z(l, {
3283
+ children: /* @__PURE__ */ Z(u, {
3284
3284
  onClick: () => ie(),
3285
3285
  label: k.ai.scrollToBottom,
3286
3286
  variant: "neutral",
@@ -3345,14 +3345,14 @@ var Za = ({ canProceed: e, submitDisabled: n, label: r, onConfirm: i, onSkip: a,
3345
3345
  className: "flex items-center justify-end gap-3 p-3",
3346
3346
  children: [/* @__PURE__ */ Z("div", {
3347
3347
  className: "flex items-center",
3348
- children: o && a ? /* @__PURE__ */ Z(d, {
3348
+ children: o && a ? /* @__PURE__ */ Z(f, {
3349
3349
  variant: "outline",
3350
3350
  type: "button",
3351
3351
  label: s.ai.clarifyingQuestion.skip,
3352
3352
  onClick: a,
3353
3353
  disabled: n
3354
3354
  }) : null
3355
- }), /* @__PURE__ */ Z(d, {
3355
+ }), /* @__PURE__ */ Z(f, {
3356
3356
  disabled: !e || n,
3357
3357
  variant: "default",
3358
3358
  type: "button",
@@ -3430,8 +3430,8 @@ var no = [
3430
3430
  1,
3431
3431
  .32,
3432
3432
  1
3433
- ], ro = .2, io = .03, ao = 4, oo = ({ mode: e, question: t, options: n, selectedOptionIds: r, allowCustomAnswer: i, hasSelection: a, hasCustomText: o, customAnswerText: l, isCustomAnswerActive: u, canProceed: d, customInputRef: f, autoFocus: p, onToggleOption: m, onActivateCustom: h, onChangeCustomText: g, onToggleCustomActive: _, onConfirm: v }) => {
3434
- let y = c(), b = (() => {
3433
+ ], ro = .2, io = .03, ao = 4, oo = ({ mode: e, question: t, options: n, selectedOptionIds: r, allowCustomAnswer: i, hasSelection: a, hasCustomText: o, customAnswerText: s, isCustomAnswerActive: u, canProceed: d, customInputRef: f, autoFocus: p, onToggleOption: m, onActivateCustom: h, onChangeCustomText: g, onToggleCustomActive: _, onConfirm: v }) => {
3434
+ let y = l(), b = (() => {
3435
3435
  if (e !== "single") return 0;
3436
3436
  let t = n.findIndex((e) => r.includes(e.id));
3437
3437
  return t >= 0 ? t : 0;
@@ -3481,7 +3481,7 @@ var no = [
3481
3481
  className: "flex flex-col gap-0 overflow-y-auto px-1.5 pb-1 pt-0.5",
3482
3482
  role: e === "single" ? "radiogroup" : "group",
3483
3483
  "aria-label": t,
3484
- children: [n.map((t, n) => /* @__PURE__ */ Z(s.div, {
3484
+ children: [n.map((t, n) => /* @__PURE__ */ Z(c.div, {
3485
3485
  ...T(n),
3486
3486
  children: /* @__PURE__ */ Z(to, {
3487
3487
  ref: (e) => {
@@ -3494,13 +3494,13 @@ var no = [
3494
3494
  onToggle: m,
3495
3495
  onKeyNavigate: w
3496
3496
  })
3497
- }, t.id)), i ? /* @__PURE__ */ Z(s.div, {
3497
+ }, t.id)), i ? /* @__PURE__ */ Z(c.div, {
3498
3498
  ...T(n.length),
3499
3499
  children: /* @__PURE__ */ Z(eo, {
3500
3500
  mode: e,
3501
3501
  hasSelection: a,
3502
3502
  hasCustomText: o,
3503
- customAnswerText: l,
3503
+ customAnswerText: s,
3504
3504
  isCustomAnswerActive: u,
3505
3505
  canProceed: d,
3506
3506
  inputRef: f,
@@ -3516,7 +3516,7 @@ var no = [
3516
3516
  return /* @__PURE__ */ Q("div", {
3517
3517
  className: "flex items-start gap-0.5 pl-4 pr-3",
3518
3518
  children: [
3519
- /* @__PURE__ */ Z(u, {
3519
+ /* @__PURE__ */ Z(d, {
3520
3520
  className: "mt-0.5 min-w-0 flex-1 pr-3 text-base font-medium text-f1-foreground",
3521
3521
  lines: 3,
3522
3522
  children: e
@@ -3524,7 +3524,7 @@ var no = [
3524
3524
  n ? /* @__PURE__ */ Q("div", {
3525
3525
  className: "flex shrink-0 items-center gap-0.5",
3526
3526
  children: [
3527
- /* @__PURE__ */ Z(d, {
3527
+ /* @__PURE__ */ Z(f, {
3528
3528
  variant: "ghost",
3529
3529
  size: "sm",
3530
3530
  type: "button",
@@ -3538,7 +3538,7 @@ var no = [
3538
3538
  className: "translate-y-px text-sm font-semibold text-f1-foreground-tertiary",
3539
3539
  children: n
3540
3540
  }),
3541
- /* @__PURE__ */ Z(d, {
3541
+ /* @__PURE__ */ Z(f, {
3542
3542
  variant: "ghost",
3543
3543
  size: "sm",
3544
3544
  type: "button",
@@ -3550,7 +3550,7 @@ var no = [
3550
3550
  })
3551
3551
  ]
3552
3552
  }) : null,
3553
- /* @__PURE__ */ Z(d, {
3553
+ /* @__PURE__ */ Z(f, {
3554
3554
  variant: "ghost",
3555
3555
  size: "sm",
3556
3556
  type: "button",
@@ -3565,16 +3565,16 @@ var no = [
3565
3565
  clarifyingQuestion: e,
3566
3566
  isSubmitDisabled: t
3567
3567
  }), po = ({ clarifyingQuestion: e, isSubmitDisabled: n }) => {
3568
- let r = t(), i = c(), { currentStep: a, currentStepIndex: o, totalSteps: l, toggleOption: u, confirm: d, skip: p, cancel: m, back: h, setCustomAnswerText: g, setCustomAnswerActive: _, activateCustomAnswer: v } = e, { question: y, options: b, selectedOptionIds: x, selectionMode: S, optional: C, allowCustomAnswer: w, customAnswerText: T, isCustomAnswerActive: E } = a, D = Y(null), O = S ?? "single", ee = l > 1, k = o === 0, A = o === l - 1, j = ee ? r.t("ai.clarifyingQuestion.stepOf", {
3569
- current: String(o + 1),
3570
- total: String(l)
3568
+ let r = t(), i = l(), { currentStep: a, currentStepIndex: s, totalSteps: u, toggleOption: d, confirm: f, skip: p, cancel: m, back: h, setCustomAnswerText: g, setCustomAnswerActive: _, activateCustomAnswer: v } = e, { question: y, options: b, selectedOptionIds: x, selectionMode: S, optional: C, allowCustomAnswer: w, customAnswerText: T, isCustomAnswerActive: E } = a, D = Y(null), O = S ?? "single", ee = u > 1, k = s === 0, A = s === u - 1, j = ee ? r.t("ai.clarifyingQuestion.stepOf", {
3569
+ current: String(s + 1),
3570
+ total: String(u)
3571
3571
  }) : void 0, M = x.length > 0, N = (T ?? "").trim().length > 0, P = M || E && N || C === !0, F = n === !0 && A, I = () => {
3572
- F || d();
3572
+ F || f();
3573
3573
  }, L = () => {
3574
3574
  F || p();
3575
3575
  }, te = (e) => {
3576
3576
  let t = O === "single" && x.includes(e);
3577
- u(e), O === "single" && !A && !t && Promise.resolve().then(d);
3577
+ d(e), O === "single" && !A && !t && Promise.resolve().then(f);
3578
3578
  }, ne = A ? r.ai.clarifyingQuestion.submit : r.ai.clarifyingQuestion.next, re = C === !0 && !M && !(E && N), ie = () => {
3579
3579
  v(), requestAnimationFrame(() => {
3580
3580
  D.current?.focus();
@@ -3587,10 +3587,10 @@ var no = [
3587
3587
  onKeyDown: ae,
3588
3588
  children: [/* @__PURE__ */ Z("div", {
3589
3589
  className: "flex flex-col gap-3 pt-3",
3590
- children: /* @__PURE__ */ Z(f, {
3590
+ children: /* @__PURE__ */ Z(o, {
3591
3591
  mode: "wait",
3592
3592
  initial: !1,
3593
- children: /* @__PURE__ */ Q(s.div, {
3593
+ children: /* @__PURE__ */ Q(c.div, {
3594
3594
  className: "flex flex-col gap-2",
3595
3595
  initial: { opacity: 0 },
3596
3596
  animate: {
@@ -3614,7 +3614,7 @@ var no = [
3614
3614
  isFinalStep: A,
3615
3615
  canProceed: P,
3616
3616
  onBack: h,
3617
- onNext: d,
3617
+ onNext: f,
3618
3618
  onCancel: m
3619
3619
  }), /* @__PURE__ */ Z(oo, {
3620
3620
  mode: O,
@@ -3634,7 +3634,7 @@ var no = [
3634
3634
  onToggleCustomActive: _,
3635
3635
  onConfirm: I
3636
3636
  })]
3637
- }, o)
3637
+ }, s)
3638
3638
  })
3639
3639
  }), /* @__PURE__ */ Z(Za, {
3640
3640
  canProceed: P,
@@ -4611,17 +4611,17 @@ var fs = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
4611
4611
  } },
4612
4612
  defaultVariants: { selected: !1 }
4613
4613
  }), ms = Ot({ base: "text-lg font-semibold text-f1-foreground line-clamp-3" }), hs = Ot({ base: "text-sm text-f1-foreground-secondary leading-normal" }), gs = Ot({ base: "text-sm font-medium text-f1-foreground leading-normal" }), _s = ({ description: e, isRevealed: n, onAskOne: r }) => {
4614
- let a = t(), o = c();
4614
+ let a = t(), s = l();
4615
4615
  return /* @__PURE__ */ Q(Sn, { children: [e ? /* @__PURE__ */ Z("span", {
4616
4616
  className: i(hs(), "truncate"),
4617
4617
  children: e
4618
- }) : null, /* @__PURE__ */ Z(f, { children: r && n ? /* @__PURE__ */ Z(s.div, {
4618
+ }) : null, /* @__PURE__ */ Z(o, { children: r && n ? /* @__PURE__ */ Z(c.div, {
4619
4619
  className: "absolute bottom-4 left-4 z-10",
4620
4620
  initial: { opacity: 0 },
4621
4621
  animate: { opacity: 1 },
4622
4622
  exit: { opacity: 0 },
4623
4623
  transition: {
4624
- duration: o ? 0 : .2,
4624
+ duration: s ? 0 : .2,
4625
4625
  ease: [
4626
4626
  .33,
4627
4627
  1,
@@ -4697,13 +4697,13 @@ var fs = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
4697
4697
  className: i(ms()),
4698
4698
  children: t
4699
4699
  }),
4700
- /* @__PURE__ */ Z(s.div, {
4700
+ /* @__PURE__ */ Z(c.div, {
4701
4701
  className: "flex flex-1 flex-col justify-end gap-2",
4702
4702
  animate: { opacity: +!a },
4703
4703
  transition: o,
4704
4704
  children: /* @__PURE__ */ Z(xs, { ...e })
4705
4705
  }),
4706
- n && !vs.has(r) ? /* @__PURE__ */ Z(s.span, {
4706
+ n && !vs.has(r) ? /* @__PURE__ */ Z(c.span, {
4707
4707
  className: i(gs()),
4708
4708
  animate: { opacity: +!a },
4709
4709
  transition: o,
@@ -4814,7 +4814,7 @@ var Ts = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4814
4814
  })
4815
4815
  });
4816
4816
  }, Os = hn((e, t) => {
4817
- let { description: n, heading: r, label: o, selected: l = !1, onClick: u, onAskOne: d, ...f } = e, [p, m] = X(!1), [h, g] = X(!1), _ = p || h, v = c(), y = _ && !!d, b = {
4817
+ let { description: n, heading: r, label: o, selected: s = !1, onClick: u, onAskOne: d, ...f } = e, [p, m] = X(!1), [h, g] = X(!1), _ = p || h, v = l(), y = _ && !!d, b = {
4818
4818
  duration: v ? 0 : .2,
4819
4819
  ease: [
4820
4820
  .33,
@@ -4829,7 +4829,7 @@ var Ts = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4829
4829
  }, C = p ? "[animation:rotate-gradient_2s_linear_infinite_running]" : "[animation:rotate-gradient_2s_linear_infinite_paused]";
4830
4830
  return /* @__PURE__ */ Q("div", {
4831
4831
  className: "relative",
4832
- children: [l ? /* @__PURE__ */ Q(Sn, { children: [/* @__PURE__ */ Z("div", {
4832
+ children: [s ? /* @__PURE__ */ Q(Sn, { children: [/* @__PURE__ */ Z("div", {
4833
4833
  "data-testid": "selected-border",
4834
4834
  className: i("absolute -inset-px rounded-2xl", "[--gradient-angle:0deg]", "bg-[conic-gradient(from_var(--gradient-angle),hsla(229,57%,76%,0.7),hsla(348,80%,50%,0.7),hsla(348,80%,50%,0.7),hsla(18,80%,50%,0.7),hsla(229,57%,76%,0.7),hsla(229,57%,76%,0.7))]", C)
4835
4835
  }), /* @__PURE__ */ Z("div", {
@@ -4839,7 +4839,7 @@ var Ts = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4839
4839
  ref: t,
4840
4840
  role: u ? "button" : void 0,
4841
4841
  tabIndex: u ? 0 : void 0,
4842
- className: i(ps({ selected: l }), l && "relative border-transparent", u && "cursor-pointer select-none", u && a()),
4842
+ className: i(ps({ selected: s }), s && "relative border-transparent", u && "cursor-pointer select-none", u && a()),
4843
4843
  onClick: u ? x : void 0,
4844
4844
  onKeyDown: u ? S : void 0,
4845
4845
  onMouseEnter: () => m(!0),
@@ -4855,7 +4855,7 @@ var Ts = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
4855
4855
  children: [/* @__PURE__ */ Z("span", {
4856
4856
  className: i(ms()),
4857
4857
  children: r
4858
- }), /* @__PURE__ */ Z(s.div, {
4858
+ }), /* @__PURE__ */ Z(c.div, {
4859
4859
  className: "-ml-4 flex flex-1 flex-col",
4860
4860
  animate: { opacity: +!y },
4861
4861
  transition: b,
@@ -4901,7 +4901,7 @@ var ks = e(Ae(Os, () => /* @__PURE__ */ Q("div", {
4901
4901
  "sparkline"
4902
4902
  ], js = 180, Ms = (e) => Number.isFinite(e) ? Math.max(0, Math.floor(e)) : js, Ns = (e, t) => e.length <= t ? e : `${e.slice(0, t).trimEnd()}...`, Ps = (e) => e.showActions !== !1, Fs = (e) => Object.fromEntries(Object.entries(e).filter(([e]) => e.startsWith("data-")));
4903
4903
  function Is(e) {
4904
- let { module: t, heading: n, title: r, subtitle: o, description: s, seeMoreLabel: c, maxCollapsedDescriptionLength: l = js } = e, [u, f] = X(!1), p = vn(), m = Y(null), h = Ms(l), g = s.length > h, _ = u ? s : Ns(s, h), v = Ps(e) ? e : null, y = Fs(e);
4904
+ let { module: t, heading: n, title: r, subtitle: o, description: s, seeMoreLabel: c, maxCollapsedDescriptionLength: l = js } = e, [u, d] = X(!1), p = vn(), m = Y(null), h = Ms(l), g = s.length > h, _ = u ? s : Ns(s, h), v = Ps(e) ? e : null, y = Fs(e);
4905
4905
  return q(() => {
4906
4906
  u && m.current?.focus();
4907
4907
  }, [u]), /* @__PURE__ */ Q("section", {
@@ -4939,14 +4939,14 @@ function Is(e) {
4939
4939
  className: i("inline cursor-pointer rounded-none border-0 bg-transparent p-0 text-base text-f1-foreground underline underline-offset-2 hover:text-f1-foreground-secondary", a()),
4940
4940
  "aria-controls": p,
4941
4941
  "aria-expanded": u,
4942
- onClick: () => f(!0),
4942
+ onClick: () => d(!0),
4943
4943
  children: c
4944
4944
  })] }) : null]
4945
4945
  })]
4946
4946
  }),
4947
4947
  v ? /* @__PURE__ */ Z("div", {
4948
4948
  className: "flex items-center justify-end gap-3 border-0 border-t border-solid border-f1-border-secondary px-4 py-3",
4949
- children: /* @__PURE__ */ Z(d, {
4949
+ children: /* @__PURE__ */ Z(f, {
4950
4950
  type: "button",
4951
4951
  label: v.primaryActionLabel,
4952
4952
  icon: v.primaryActionIcon,
@@ -4960,7 +4960,7 @@ Is.displayName = "F0AiProposalCard";
4960
4960
  //#endregion
4961
4961
  //#region src/blocks/ai/F0AiMessageSources/components/CollapsibleMessage.tsx
4962
4962
  var Ls = ({ icon: e, title: t, children: n }) => {
4963
- let [r, i] = X(!1), a = c();
4963
+ let [r, i] = X(!1), a = l();
4964
4964
  return /* @__PURE__ */ Q(E, {
4965
4965
  className: "mb-1 w-full",
4966
4966
  open: r,
@@ -4987,7 +4987,7 @@ var Ls = ({ icon: e, title: t, children: n }) => {
4987
4987
  }), /* @__PURE__ */ Z(w, {
4988
4988
  forceMount: !0,
4989
4989
  className: "data-[state=open]:mt-3",
4990
- children: /* @__PURE__ */ Z(s.div, {
4990
+ children: /* @__PURE__ */ Z(c.div, {
4991
4991
  initial: !1,
4992
4992
  animate: {
4993
4993
  height: r ? "auto" : 0,
@@ -5027,7 +5027,7 @@ function Bs({ sources: e, title: n }) {
5027
5027
  className: "flex flex-col gap-1 rounded-lg border border-solid border-f1-border-secondary p-2",
5028
5028
  children: e.map((e, t) => {
5029
5029
  let n = /* @__PURE__ */ Z(zs, { iconName: e.icon });
5030
- return e.link ? /* @__PURE__ */ Z(o, {
5030
+ return e.link ? /* @__PURE__ */ Z(s, {
5031
5031
  "aria-label": e.title,
5032
5032
  href: e.link,
5033
5033
  size: "md",
@@ -5081,7 +5081,7 @@ function Hs({ dataset: e, title: n, filename: r }) {
5081
5081
  borderColor: "secondary",
5082
5082
  paddingX: "md",
5083
5083
  paddingY: "sm",
5084
- children: [/* @__PURE__ */ Z(u, {
5084
+ children: [/* @__PURE__ */ Z(d, {
5085
5085
  tag: "h2",
5086
5086
  className: "text-base font-medium capitalize text-f1-foreground",
5087
5087
  children: s
@@ -5110,7 +5110,7 @@ function Hs({ dataset: e, title: n, filename: r }) {
5110
5110
  let n = t[e];
5111
5111
  return /* @__PURE__ */ Z("td", {
5112
5112
  className: "max-w-72 border-0 border-b border-solid border-f1-border-secondary px-3 py-2 text-f1-foreground",
5113
- children: /* @__PURE__ */ Z(u, { children: n == null ? "" : String(n) })
5113
+ children: /* @__PURE__ */ Z(d, { children: n == null ? "" : String(n) })
5114
5114
  }, e);
5115
5115
  }) }, n)) })]
5116
5116
  })
@@ -5121,13 +5121,13 @@ Hs.displayName = "F0AiTableCard";
5121
5121
  //#endregion
5122
5122
  //#region src/addons/ai/F0AiChatHeader/components/CreditsPopover.tsx
5123
5123
  function Us({ credits: e, trigger: n }) {
5124
- let r = t(), [i, a] = X(!1), [o, c] = X(!1), [f, p] = X(!1), [m, h] = X(null), g = K((t) => {
5125
- a(t), t && e?.fetchUsage && (c(!0), p(!1), e.fetchUsage().then((e) => {
5124
+ let r = t(), [i, a] = X(!1), [o, s] = X(!1), [l, p] = X(!1), [m, h] = X(null), g = K((t) => {
5125
+ a(t), t && e?.fetchUsage && (s(!0), p(!1), e.fetchUsage().then((e) => {
5126
5126
  h(e), p(!1);
5127
5127
  }).catch(() => {
5128
5128
  p(!0);
5129
5129
  }).finally(() => {
5130
- c(!1);
5130
+ s(!1);
5131
5131
  }));
5132
5132
  }, [e]);
5133
5133
  if (!e) return null;
@@ -5137,7 +5137,7 @@ function Us({ credits: e, trigger: n }) {
5137
5137
  onOpenChange: g,
5138
5138
  children: [/* @__PURE__ */ Z(cn, {
5139
5139
  asChild: !0,
5140
- children: n ?? /* @__PURE__ */ Z(l, {
5140
+ children: n ?? /* @__PURE__ */ Z(u, {
5141
5141
  variant: "ghost",
5142
5142
  hideLabel: !0,
5143
5143
  label: r.t("ai.credits.title"),
@@ -5159,11 +5159,11 @@ function Us({ credits: e, trigger: n }) {
5159
5159
  size: "lg"
5160
5160
  }), /* @__PURE__ */ Q("div", {
5161
5161
  className: "flex min-w-0 flex-col",
5162
- children: [/* @__PURE__ */ Z(u, {
5162
+ children: [/* @__PURE__ */ Z(d, {
5163
5163
  tag: "span",
5164
5164
  className: "font-medium",
5165
5165
  children: e.companyName ?? ""
5166
- }), e.planName ? /* @__PURE__ */ Z(u, {
5166
+ }), e.planName ? /* @__PURE__ */ Z(d, {
5167
5167
  tag: "span",
5168
5168
  className: "text-sm font-medium text-f1-foreground-secondary",
5169
5169
  children: e.planName
@@ -5188,11 +5188,11 @@ function Us({ credits: e, trigger: n }) {
5188
5188
  })
5189
5189
  ]
5190
5190
  }) : null,
5191
- f ? /* @__PURE__ */ Z("span", {
5191
+ l ? /* @__PURE__ */ Z("span", {
5192
5192
  className: "text-sm text-f1-foreground-secondary",
5193
5193
  children: r.t("ai.credits.creditsError")
5194
5194
  }) : null,
5195
- !o && !f && m ? /* @__PURE__ */ Q(Sn, { children: [
5195
+ !o && !l && m ? /* @__PURE__ */ Q(Sn, { children: [
5196
5196
  /* @__PURE__ */ Q("div", {
5197
5197
  className: "flex justify-between",
5198
5198
  children: [/* @__PURE__ */ Z("span", {
@@ -5207,7 +5207,7 @@ function Us({ credits: e, trigger: n }) {
5207
5207
  className: "flex items-center gap-2",
5208
5208
  children: /* @__PURE__ */ Z("div", {
5209
5209
  className: "relative h-2 w-full overflow-hidden rounded-full bg-f1-background-secondary",
5210
- children: /* @__PURE__ */ Z(s.div, {
5210
+ children: /* @__PURE__ */ Z(c.div, {
5211
5211
  className: "h-full rounded-full",
5212
5212
  style: {
5213
5213
  width: `${_}%`,
@@ -5235,7 +5235,7 @@ function Us({ credits: e, trigger: n }) {
5235
5235
  ]
5236
5236
  }), e.upgradePlanUrl ? /* @__PURE__ */ Q("div", {
5237
5237
  className: "flex items-center justify-between border-0 border-t border-solid border-f1-border-secondary p-3",
5238
- children: [/* @__PURE__ */ Z("span", { children: r.t("ai.credits.needMoreCredits") }), /* @__PURE__ */ Z(d, {
5238
+ children: [/* @__PURE__ */ Z("span", { children: r.t("ai.credits.needMoreCredits") }), /* @__PURE__ */ Z(f, {
5239
5239
  variant: "outlinePromote",
5240
5240
  href: e.upgradePlanUrl,
5241
5241
  label: r.t("ai.credits.upgradePlan"),
@@ -5249,7 +5249,7 @@ function Us({ credits: e, trigger: n }) {
5249
5249
  //#endregion
5250
5250
  //#region src/addons/ai/F0AiChatHeader/components/EmployeeCreditsPopover.tsx
5251
5251
  var Ws = "linear-gradient(90deg, #E55619, #A1ADE5, #E51943, #E55619)", Gs = ({ loading: e, error: n, data: r }) => {
5252
- let i = t(), a = c(), o = r && r.total > 0 ? Math.min(100, Math.round(r.used / r.total * 100)) : 0, l = r ? Math.max(0, r.total - r.used) : 0;
5252
+ let i = t(), a = l(), o = r && r.total > 0 ? Math.min(100, Math.round(r.used / r.total * 100)) : 0, s = r ? Math.max(0, r.total - r.used) : 0;
5253
5253
  return /* @__PURE__ */ Z("div", {
5254
5254
  className: "flex flex-col rounded border border-solid border-f1-border-secondary",
5255
5255
  children: /* @__PURE__ */ Q("div", {
@@ -5285,14 +5285,14 @@ var Ws = "linear-gradient(90deg, #E55619, #A1ADE5, #E51943, #E55619)", Gs = ({ l
5285
5285
  children: i.t("ai.credits.employeeCredits")
5286
5286
  }), /* @__PURE__ */ Z("span", {
5287
5287
  className: "font-medium text-f1-foreground-secondary",
5288
- children: i.t("ai.credits.creditsLeft", { total: l.toLocaleString() })
5288
+ children: i.t("ai.credits.creditsLeft", { total: s.toLocaleString() })
5289
5289
  })]
5290
5290
  }),
5291
5291
  /* @__PURE__ */ Z("div", {
5292
5292
  className: "flex items-center gap-2",
5293
5293
  children: /* @__PURE__ */ Z("div", {
5294
5294
  className: "relative h-2 w-full overflow-hidden rounded-full bg-f1-background-secondary",
5295
- children: /* @__PURE__ */ Z(s.div, {
5295
+ children: /* @__PURE__ */ Z(c.div, {
5296
5296
  className: "h-full rounded-full",
5297
5297
  style: {
5298
5298
  width: `${o}%`,
@@ -5323,11 +5323,11 @@ var Ws = "linear-gradient(90deg, #E55619, #A1ADE5, #E51943, #E55619)", Gs = ({ l
5323
5323
  });
5324
5324
  };
5325
5325
  function Ks({ employeeCredits: e, trigger: n }) {
5326
- let r = t(), [i, a] = X(!1), [o, s] = X(!1), [c, d] = X(!1), [f, p] = X(null), m = K((t) => {
5327
- a(t), t && e?.fetchUsage && (s(!0), d(!1), e.fetchUsage().then((e) => {
5328
- p(e), d(!1);
5326
+ let r = t(), [i, a] = X(!1), [o, s] = X(!1), [c, l] = X(!1), [f, p] = X(null), m = K((t) => {
5327
+ a(t), t && e?.fetchUsage && (s(!0), l(!1), e.fetchUsage().then((e) => {
5328
+ p(e), l(!1);
5329
5329
  }).catch(() => {
5330
- d(!0);
5330
+ l(!0);
5331
5331
  }).finally(() => {
5332
5332
  s(!1);
5333
5333
  }));
@@ -5339,7 +5339,7 @@ function Ks({ employeeCredits: e, trigger: n }) {
5339
5339
  onOpenChange: m,
5340
5340
  children: [/* @__PURE__ */ Z(cn, {
5341
5341
  asChild: !0,
5342
- children: n ?? /* @__PURE__ */ Z(l, {
5342
+ children: n ?? /* @__PURE__ */ Z(u, {
5343
5343
  variant: "ghost",
5344
5344
  hideLabel: !0,
5345
5345
  label: r.t("ai.credits.title"),
@@ -5361,11 +5361,11 @@ function Ks({ employeeCredits: e, trigger: n }) {
5361
5361
  size: "lg"
5362
5362
  }), /* @__PURE__ */ Q("div", {
5363
5363
  className: "flex min-w-0 flex-col",
5364
- children: [/* @__PURE__ */ Z(u, {
5364
+ children: [/* @__PURE__ */ Z(d, {
5365
5365
  tag: "span",
5366
5366
  className: "font-medium",
5367
5367
  children: e.companyName ?? ""
5368
- }), e.planName ? /* @__PURE__ */ Z(u, {
5368
+ }), e.planName ? /* @__PURE__ */ Z(d, {
5369
5369
  tag: "span",
5370
5370
  className: "text-sm font-medium text-f1-foreground-secondary",
5371
5371
  children: e.planName
@@ -5387,20 +5387,20 @@ var qs = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
5387
5387
  }) : e ? /* @__PURE__ */ Z(Us, {
5388
5388
  credits: e,
5389
5389
  trigger: n
5390
- }) : null, Js = qs, Ys = ({ historyEnabled: e = !1, title: n, currentThreadTitle: r, fullscreen: a = !1, lockVisualizationMode: d = !1, onToggleVisualizationMode: f, onClose: p, onNewChat: m, onOpenHistory: h, hasMessages: g = !1, credits: _, employeeCredits: v, compact: y = !1, actions: b }) => {
5391
- let x = t(), S = c(), { panelOverlays: w } = W(), E = !d && !w && /* @__PURE__ */ Z(l, {
5390
+ }) : null, Js = qs, Ys = ({ historyEnabled: e = !1, title: n, currentThreadTitle: r, fullscreen: a = !1, lockVisualizationMode: o = !1, onToggleVisualizationMode: f, onClose: p, onNewChat: m, onOpenHistory: h, hasMessages: g = !1, credits: _, employeeCredits: v, compact: y = !1, actions: b }) => {
5391
+ let x = t(), S = l(), { panelOverlays: w } = W(), E = !o && !w && /* @__PURE__ */ Z(u, {
5392
5392
  variant: "ghost",
5393
5393
  hideLabel: !0,
5394
5394
  label: a ? x.ai.collapseChat : x.ai.expandChat,
5395
5395
  icon: a ? ae : Dt,
5396
5396
  onClick: f
5397
- }), D = /* @__PURE__ */ Z(l, {
5397
+ }), D = /* @__PURE__ */ Z(u, {
5398
5398
  variant: "ghost",
5399
5399
  hideLabel: !0,
5400
5400
  label: x.ai.closeChat,
5401
5401
  icon: C,
5402
5402
  onClick: p
5403
- }), O = b?.map((e) => /* @__PURE__ */ Z(l, {
5403
+ }), O = b?.map((e) => /* @__PURE__ */ Z(u, {
5404
5404
  variant: "ghost",
5405
5405
  hideLabel: !0,
5406
5406
  label: e.label,
@@ -5410,11 +5410,11 @@ var qs = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
5410
5410
  }, e.id));
5411
5411
  return y ? /* @__PURE__ */ Q("header", {
5412
5412
  className: i("flex items-center justify-between gap-3 pr-4 pl-5 py-3"),
5413
- children: [/* @__PURE__ */ Z(u, {
5413
+ children: [/* @__PURE__ */ Z(d, {
5414
5414
  lines: 1,
5415
5415
  className: "min-w-0 flex-1 text-left font-semibold text-f1-foreground",
5416
5416
  children: r ?? x.ai.newConversation
5417
- }), /* @__PURE__ */ Q(s.div, {
5417
+ }), /* @__PURE__ */ Q(c.div, {
5418
5418
  className: "flex shrink-0 items-center",
5419
5419
  initial: { opacity: 0 },
5420
5420
  animate: { opacity: 1 },
@@ -5432,14 +5432,14 @@ var qs = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
5432
5432
  className: i("flex justify-between pl-2.5 pr-3 py-3 w-full overflow-hidden gap-3"),
5433
5433
  children: [/* @__PURE__ */ Z("div", {
5434
5434
  className: "flex min-w-0 flex-1 items-center",
5435
- children: d ? null : /* @__PURE__ */ Z(o, {
5435
+ children: o ? null : /* @__PURE__ */ Z(s, {
5436
5436
  variant: "ghost",
5437
5437
  size: "md",
5438
5438
  className: "min-w-0 max-w-full [&>div>span>span]:w-full",
5439
5439
  onClick: h,
5440
5440
  children: /* @__PURE__ */ Q("div", {
5441
5441
  className: "flex min-w-0 items-center gap-1",
5442
- children: [/* @__PURE__ */ Z(u, {
5442
+ children: [/* @__PURE__ */ Z(d, {
5443
5443
  lines: 1,
5444
5444
  className: "min-w-0 text-left",
5445
5445
  children: r ?? x.ai.newConversation
@@ -5450,7 +5450,7 @@ var qs = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
5450
5450
  })]
5451
5451
  })
5452
5452
  })
5453
- }), /* @__PURE__ */ Q(s.div, {
5453
+ }), /* @__PURE__ */ Q(c.div, {
5454
5454
  className: "flex shrink-0 items-center",
5455
5455
  initial: { opacity: 0 },
5456
5456
  animate: { opacity: 1 },
@@ -5476,7 +5476,7 @@ var qs = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
5476
5476
  className: "text-f1-foreground",
5477
5477
  children: n ?? ""
5478
5478
  })
5479
- }), /* @__PURE__ */ Q(s.div, {
5479
+ }), /* @__PURE__ */ Q(c.div, {
5480
5480
  className: "flex items-center",
5481
5481
  initial: { opacity: 0 },
5482
5482
  animate: { opacity: 1 },
@@ -5485,7 +5485,7 @@ var qs = ({ credits: e, employeeCredits: t, trigger: n }) => t ? /* @__PURE__ */
5485
5485
  ease: "easeOut"
5486
5486
  },
5487
5487
  children: [
5488
- g && !d ? /* @__PURE__ */ Z(l, {
5488
+ g && !o ? /* @__PURE__ */ Z(u, {
5489
5489
  variant: "ghost",
5490
5490
  hideLabel: !0,
5491
5491
  label: x.ai.startNewChat,
@@ -5536,11 +5536,11 @@ function Qs(e) {
5536
5536
  }
5537
5537
  //#endregion
5538
5538
  //#region src/addons/ai/F0AiChatHistory/components/ThreadItem.tsx
5539
- function $s({ thread: e, isPinned: n, isActive: r = !1, isPending: o = !1, onSelect: s, onPin: c, onUnpin: d, onDelete: f, className: p }) {
5539
+ function $s({ thread: e, isPinned: n, isActive: r = !1, isPending: o = !1, onSelect: s, onPin: c, onUnpin: l, onDelete: f, className: p }) {
5540
5540
  let m = t(), h = Qt(), g = J(() => [{
5541
5541
  label: n ? m.ai.unpinChat : m.ai.pinChat,
5542
5542
  icon: n ? Fe : ze,
5543
- onClick: () => n ? d(e.id) : c(e.id)
5543
+ onClick: () => n ? l(e.id) : c(e.id)
5544
5544
  }, {
5545
5545
  label: m.ai.deleteChat,
5546
5546
  icon: fe,
@@ -5550,7 +5550,7 @@ function $s({ thread: e, isPinned: n, isActive: r = !1, isPending: o = !1, onSel
5550
5550
  n,
5551
5551
  e.id,
5552
5552
  c,
5553
- d,
5553
+ l,
5554
5554
  f
5555
5555
  ]), _ = J(() => Zs(e.updatedAt, {
5556
5556
  today: m.ai.today,
@@ -5580,7 +5580,7 @@ function $s({ thread: e, isPinned: n, isActive: r = !1, isPending: o = !1, onSel
5580
5580
  className: "mr-1 shrink-0 text-f1-icon",
5581
5581
  "aria-hidden": !0
5582
5582
  }) : null,
5583
- /* @__PURE__ */ Z(u, {
5583
+ /* @__PURE__ */ Z(d, {
5584
5584
  lines: 1,
5585
5585
  className: "py-0.5 text-left font-medium",
5586
5586
  children: e.title
@@ -5603,7 +5603,7 @@ function $s({ thread: e, isPinned: n, isActive: r = !1, isPending: o = !1, onSel
5603
5603
  className: i("hidden items-center", "group-hover:flex group-focus-within:flex", "has-[[aria-expanded=true]]:flex"),
5604
5604
  children: /* @__PURE__ */ Z(tt, {
5605
5605
  items: g,
5606
- children: /* @__PURE__ */ Z(l, {
5606
+ children: /* @__PURE__ */ Z(u, {
5607
5607
  icon: on,
5608
5608
  variant: "ghost",
5609
5609
  size: "sm",
@@ -5683,7 +5683,7 @@ function ic() {
5683
5683
  }
5684
5684
  //#endregion
5685
5685
  //#region src/addons/ai/F0AiChatHistory/F0AiChatHistory.tsx
5686
- var ac = ({ onClose: e, onSelectThread: n, onNewChat: r, threads: a, isLoading: s, error: c, pinnedIds: l, onPinThread: d, onUnpinThread: f, onDeleteThread: p }) => {
5686
+ var ac = ({ onClose: e, onSelectThread: n, onNewChat: r, threads: a, isLoading: o, error: c, pinnedIds: l, onPinThread: u, onUnpinThread: f, onDeleteThread: p }) => {
5687
5687
  let m = t(), [h, g] = X("");
5688
5688
  q(() => {
5689
5689
  let t = (t) => {
@@ -5739,7 +5739,7 @@ var ac = ({ onClose: e, onSelectThread: n, onNewChat: r, threads: a, isLoading:
5739
5739
  }), /* @__PURE__ */ Q("div", {
5740
5740
  className: "flex flex-1 flex-col gap-1 overflow-y-auto p-2",
5741
5741
  children: [
5742
- /* @__PURE__ */ Z(o, {
5742
+ /* @__PURE__ */ Z(s, {
5743
5743
  variant: "ghost",
5744
5744
  size: "md",
5745
5745
  className: "py-1 [&>div>span>span]:w-full",
@@ -5750,37 +5750,37 @@ var ac = ({ onClose: e, onSelectThread: n, onNewChat: r, threads: a, isLoading:
5750
5750
  icon: T,
5751
5751
  color: "default",
5752
5752
  size: "md"
5753
- }), /* @__PURE__ */ Z(u, {
5753
+ }), /* @__PURE__ */ Z(d, {
5754
5754
  lines: 1,
5755
5755
  className: "text-left",
5756
5756
  children: m.ai.startNewChat
5757
5757
  })]
5758
5758
  })
5759
5759
  }),
5760
- s ? /* @__PURE__ */ Z(ic, {}) : null,
5761
- !s && c ? /* @__PURE__ */ Z("p", {
5760
+ o ? /* @__PURE__ */ Z(ic, {}) : null,
5761
+ !o && c ? /* @__PURE__ */ Z("p", {
5762
5762
  className: "py-8 text-center text-base text-f1-foreground-tertiary",
5763
5763
  children: c
5764
5764
  }) : null,
5765
- !s && !c && !E ? /* @__PURE__ */ Z("p", {
5765
+ !o && !c && !E ? /* @__PURE__ */ Z("p", {
5766
5766
  className: "py-8 text-center text-base text-f1-foreground-tertiary",
5767
5767
  children: m.ai.noPreviousChats
5768
5768
  }) : null,
5769
- !s && !c && y.length > 0 ? /* @__PURE__ */ Z(ec, {
5769
+ !o && !c && y.length > 0 ? /* @__PURE__ */ Z(ec, {
5770
5770
  label: m.ai.pinnedChats,
5771
5771
  threads: y,
5772
5772
  pinnedIds: l,
5773
5773
  onSelect: S,
5774
- onPin: d,
5774
+ onPin: u,
5775
5775
  onUnpin: f,
5776
5776
  onDelete: w
5777
5777
  }) : null,
5778
- !s && !c ? x.map((e) => /* @__PURE__ */ Z(ec, {
5778
+ !o && !c ? x.map((e) => /* @__PURE__ */ Z(ec, {
5779
5779
  label: _[e.key],
5780
5780
  threads: e.threads,
5781
5781
  pinnedIds: l,
5782
5782
  onSelect: S,
5783
- onPin: d,
5783
+ onPin: u,
5784
5784
  onUnpin: f,
5785
5785
  onDelete: w
5786
5786
  }, e.key)) : null
@@ -5864,7 +5864,7 @@ function lc({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, u
5864
5864
  }
5865
5865
  //#endregion
5866
5866
  //#region src/addons/ai/F0AiChatUsageLimits/types.ts
5867
- var uc = ["top", "bottom"], dc = s.create(Pe), fc = ({ label: e, reduceMotion: t }) => /* @__PURE__ */ Q("div", {
5867
+ var uc = ["top", "bottom"], dc = c.create(Pe), fc = ({ label: e, reduceMotion: t }) => /* @__PURE__ */ Q("div", {
5868
5868
  role: "status",
5869
5869
  "aria-live": "polite",
5870
5870
  className: "flex flex-row items-center gap-1 rounded-full border border-solid border-f1-border-secondary bg-f1-background px-2 py-1.5 pr-2.5 shadow-md",
@@ -5918,18 +5918,18 @@ var uc = ["top", "bottom"], dc = s.create(Pe), fc = ({ label: e, reduceMotion: t
5918
5918
  children: e
5919
5919
  })]
5920
5920
  }), pc = gn(function({ active: e, label: n, className: r, children: a }) {
5921
- let { t: o } = t(), l = c(), u = n ?? o("ai.applyingChanges");
5921
+ let { t: s } = t(), u = l(), d = n ?? s("ai.applyingChanges");
5922
5922
  return q(() => {
5923
5923
  if (!e) return;
5924
5924
  let t = document.activeElement;
5925
5925
  t && t.getAttribute("name") !== "one-ai-input" && t.blur();
5926
5926
  }, [e]), /* @__PURE__ */ Q("div", {
5927
5927
  className: i("relative flex flex-1 flex-col", r),
5928
- children: [/* @__PURE__ */ Z(f, { children: e ? /* @__PURE__ */ Z(s.div, {
5928
+ children: [/* @__PURE__ */ Z(o, { children: e ? /* @__PURE__ */ Z(c.div, {
5929
5929
  className: "pointer-events-none sticky top-0 z-50 flex h-0 w-full items-start justify-center overflow-visible",
5930
5930
  initial: {
5931
5931
  opacity: 0,
5932
- scale: l ? 1 : .95
5932
+ scale: u ? 1 : .95
5933
5933
  },
5934
5934
  animate: {
5935
5935
  opacity: 1,
@@ -5937,20 +5937,20 @@ var uc = ["top", "bottom"], dc = s.create(Pe), fc = ({ label: e, reduceMotion: t
5937
5937
  },
5938
5938
  exit: {
5939
5939
  opacity: 0,
5940
- scale: l ? 1 : .95
5940
+ scale: u ? 1 : .95
5941
5941
  },
5942
5942
  children: /* @__PURE__ */ Z("div", {
5943
5943
  className: "mt-[40vh]",
5944
5944
  children: /* @__PURE__ */ Z(fc, {
5945
- label: u,
5946
- reduceMotion: l
5945
+ label: d,
5946
+ reduceMotion: u
5947
5947
  })
5948
5948
  })
5949
- }) : null }), /* @__PURE__ */ Z(s.div, {
5949
+ }) : null }), /* @__PURE__ */ Z(c.div, {
5950
5950
  className: i("flex flex-1 flex-col", e && "pointer-events-none"),
5951
5951
  initial: { filter: "blur(0px)" },
5952
5952
  animate: { filter: e ? "blur(2px)" : "blur(0px)" },
5953
- transition: { duration: l ? 0 : .2 },
5953
+ transition: { duration: u ? 0 : .2 },
5954
5954
  children: a
5955
5955
  })]
5956
5956
  });