@factorialco/f0-react 11.4.0 → 11.5.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/{ChatPostComposerDialog-Cc7fvKS6.js → ChatPostComposerDialog-BNPcskpC.js} +3 -3
- package/dist/{CoachmarkProvider-Ci3AcnP8.js → CoachmarkProvider-C0VwFy7C.js} +6 -6
- package/dist/{DocumentToolbar-ROjm7TTq.js → DocumentToolbar-C8mxENP5.js} +5 -5
- package/dist/{DocxViewer-C-hqdAtr.js → DocxViewer-DrVcTEmI.js} +2 -2
- package/dist/{F0AiProcessingOverlay-c1krdBYn.js → F0AiProcessingOverlay-Ce8D6iy4.js} +81 -68
- package/dist/{F0CanvasPanel-CK1xxsUA.js → F0CanvasPanel-BM8XJQxg.js} +901 -823
- package/dist/F0CanvasPanel.css +1 -1
- package/dist/{F0DocumentViewer-BCfJXjvm.js → F0DocumentViewer-2l2m-eh2.js} +6 -6
- package/dist/F0DocumentViewer-D2Ha0lRL.js +3 -0
- package/dist/{F0Map-BiAloAMK.js → F0Map-ClRM1GNy.js} +6 -6
- package/dist/{F0Select-BetgBZSF.js → F0Select-i2dNQl-o.js} +2 -2
- package/dist/{F0Text-C9DFseNJ.js → F0Text-CgSfveNl.js} +2 -2
- package/dist/F0VideoPlayer-Ahs45M0U.js +1 -0
- package/dist/{F0VideoPlayer-BSV-SiM6.js → F0VideoPlayer-CkrzZndG.js} +2 -2
- package/dist/{Map-BMmBgKVH.js → Map-IOe08e6t.js} +6 -6
- package/dist/{PdfThumbnail-BSpty5h1.js → PdfThumbnail-CSm1-nL6.js} +1 -1
- package/dist/{SheetViewer-Gswnolu0.js → SheetViewer-Dr05AACA.js} +4 -4
- package/dist/{TextViewer-Chm6U7Pw.js → TextViewer-B-ElqCqI.js} +2 -2
- package/dist/ai.d.ts +3 -3
- package/dist/ai.js +4 -4
- package/dist/component-status.js +1 -1
- package/dist/{dist-B7gjXV8f.js → dist-CMwSnU0b.js} +1 -1
- package/dist/experimental.d.ts +2 -2
- package/dist/experimental.js +9 -9
- package/dist/{exports-4kSDLHnh.d.ts → exports-BUy6iwlC.d.ts} +27 -11
- package/dist/f0.d.ts +4 -4
- package/dist/f0.js +11 -11
- package/dist/{i18n-provider-defaults-0FwmF5YL.js → i18n-provider-defaults-DuEbMwBE.js} +1 -0
- package/dist/{i18n-provider-defaults-Yf7knX-_.d.ts → i18n-provider-defaults-iUxatyvB.d.ts} +1 -0
- package/dist/i18n-provider-defaults.d.ts +1 -1
- package/dist/i18n-provider-defaults.js +1 -1
- package/dist/{index-D7tei3SJ.d.ts → index-DN2jqF-n.d.ts} +6 -2
- package/dist/{index-DkOgixiu.d.ts → index-DZW6rqbl.d.ts} +2 -2
- package/dist/{maplibre-BK-KYVbw.js → maplibre-FCAkaIHP.js} +1 -1
- package/dist/{pdfWorker-D_jkJFme.js → pdfWorker-BsMaV8KV.js} +1 -1
- package/dist/{popover-CL68oVjH.js → popover-DDzOLSXr.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{useData-DHe37Z81.js → useData-Dics8Os6.js} +1 -1
- package/package.json +1 -1
- package/dist/F0DocumentViewer-C1x5k9E4.js +0 -3
- package/dist/F0VideoPlayer-DSP9Q57g.js +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { o as e, r as t, t as n } from "./rolldown-runtime-BItFwnF5.js";
|
|
2
|
-
import { $n as r, A as i, An as a, B as o, Bt as s, C as c, Ct as l, D as u, Dn as d, Dt as f, E as p, En as m, Et as h, F as g, Fn as _, Gn as v, H as y, Ht as b, In as x, It as S, J as C, K as w, Ln as T, Lt as E, Mn as D, Mt as O, N as k, Nn as A, O as j, On as M, P as N, R as ee, Rn as te, S as ne, St as re, T as ie, Tn as ae, Tt as oe, U as se, Un as ce, Ut as le, V as ue, Vn as de, W as fe, Wn as pe, Wt as P, Xn as me, Xt as he, Zn as ge, _ as _e, _n as ve, an as ye, ar as be, b as xe, bn as Se, dt as Ce, en as we, f as Te, g as Ee, gn as De, h as Oe, hn as ke, in as Ae, ir as je, j as Me, jn as Ne, k as Pe, kn as Fe, ln as Ie, m as Le, mn as Re, p as ze, pn as Be, q as Ve, rn as He, rr as Ue, tr as We, un as Ge, v as Ke, vn as qe, vt as Je, w as Ye, wn as Xe, wt as Ze, x as Qe, y as $e, yn as et, yt as tt, z as nt, zn as rt, zt as it } from "./popover-
|
|
2
|
+
import { $n as r, A as i, An as a, B as o, Bt as s, C as c, Ct as l, D as u, Dn as d, Dt as f, E as p, En as m, Et as h, F as g, Fn as _, Gn as v, H as y, Ht as b, In as x, It as S, J as C, K as w, Ln as T, Lt as E, Mn as D, Mt as O, N as k, Nn as A, O as j, On as M, P as N, R as ee, Rn as te, S as ne, St as re, T as ie, Tn as ae, Tt as oe, U as se, Un as ce, Ut as le, V as ue, Vn as de, W as fe, Wn as pe, Wt as P, Xn as me, Xt as he, Zn as ge, _ as _e, _n as ve, an as ye, ar as be, b as xe, bn as Se, dt as Ce, en as we, f as Te, g as Ee, gn as De, h as Oe, hn as ke, in as Ae, ir as je, j as Me, jn as Ne, k as Pe, kn as Fe, ln as Ie, m as Le, mn as Re, p as ze, pn as Be, q as Ve, rn as He, rr as Ue, tr as We, un as Ge, v as Ke, vn as qe, vt as Je, w as Ye, wn as Xe, wt as Ze, x as Qe, y as $e, yn as et, yt as tt, z as nt, zn as rt, zt as it } from "./popover-DDzOLSXr.js";
|
|
3
3
|
import { L as F, R as at, i as ot, r as st, t as ct, z as lt } from "./tooltip-BX4dSfeL.js";
|
|
4
|
-
import { i as ut, n as dt, r as ft, t as pt } from "./F0Text-
|
|
5
|
-
import { C as mt, D as ht, F as gt, G as _t, H as vt, J as yt, K as bt, M as xt, O as St, S as Ct, U as wt, V as Tt, W as Et, X as Dt, Y as Ot, d as kt, f as At, g as jt, k as Mt, l as Nt, o as Pt, q as Ft, s as It, v as Lt, x as Rt, y as zt, z as Bt } from "./useData-
|
|
6
|
-
import { $n as Vt, Ar as Ht, Bn as Ut, Cr as Wt, Dn as Gt, Dr as Kt, En as qt, Er as Jt, Et as Yt, Ft as Xt, Gn as Zt, Hn as Qt, J as $t, Jn as en, Kn as tn, Ln as nn, Mn as rn, Mr as an, Nn as on, Nr as sn, Nt as cn, On as ln, Or as un, Ot as dn, Pn as fn, Pr as pn, Qn as mn, Rn as hn, Sn as gn, Sr as _n, Tn as vn, Tr as yn, Tt as bn, Un as xn, Vn as Sn, W as Cn, Wn as wn, Xn as Tn, Yn as En, Yt as Dn, Zn as On, _n as kn, _r as An, ar as jn, bn as Mn, br as Nn, cr as Pn, ct as Fn, d as In, dn as Ln, dr as Rn, er as zn, fn as Bn, fr as Vn, ft as Hn, gn as Un, gr as Wn, hr as Gn, ir as Kn, jn as qn, jr as Jn, kn as Yn, kr as Xn, mn as Zn, mr as Qn, nn as $n, nr as er, on as tr, or as nr, pr as rr, pt as ir, q as ar, qn as or, rr as sr, sr as cr, t as lr, tn as ur, tr as dr, un as fr, ur as pr, ut as mr, vr as hr, wr as gr, xn as _r, xr as vr, yn as yr, yr as br, zn as xr } from "./F0Select-
|
|
4
|
+
import { i as ut, n as dt, r as ft, t as pt } from "./F0Text-CgSfveNl.js";
|
|
5
|
+
import { C as mt, D as ht, F as gt, G as _t, H as vt, J as yt, K as bt, M as xt, O as St, S as Ct, U as wt, V as Tt, W as Et, X as Dt, Y as Ot, d as kt, f as At, g as jt, k as Mt, l as Nt, o as Pt, q as Ft, s as It, v as Lt, x as Rt, y as zt, z as Bt } from "./useData-Dics8Os6.js";
|
|
6
|
+
import { $n as Vt, Ar as Ht, Bn as Ut, Cr as Wt, Dn as Gt, Dr as Kt, En as qt, Er as Jt, Et as Yt, Ft as Xt, Gn as Zt, Hn as Qt, J as $t, Jn as en, Kn as tn, Ln as nn, Mn as rn, Mr as an, Nn as on, Nr as sn, Nt as cn, On as ln, Or as un, Ot as dn, Pn as fn, Pr as pn, Qn as mn, Rn as hn, Sn as gn, Sr as _n, Tn as vn, Tr as yn, Tt as bn, Un as xn, Vn as Sn, W as Cn, Wn as wn, Xn as Tn, Yn as En, Yt as Dn, Zn as On, _n as kn, _r as An, ar as jn, bn as Mn, br as Nn, cr as Pn, ct as Fn, d as In, dn as Ln, dr as Rn, er as zn, fn as Bn, fr as Vn, ft as Hn, gn as Un, gr as Wn, hr as Gn, ir as Kn, jn as qn, jr as Jn, kn as Yn, kr as Xn, mn as Zn, mr as Qn, nn as $n, nr as er, on as tr, or as nr, pr as rr, pt as ir, q as ar, qn as or, rr as sr, sr as cr, t as lr, tn as ur, tr as dr, un as fr, ur as pr, ut as mr, vr as hr, wr as gr, xn as _r, xr as vr, yn as yr, yr as br, zn as xr } from "./F0Select-i2dNQl-o.js";
|
|
7
7
|
import { t as Sr } from "./Check-DAp9gCRh.js";
|
|
8
|
-
import { n as Cr, t as wr } from "./dist-
|
|
8
|
+
import { n as Cr, t as wr } from "./dist-CMwSnU0b.js";
|
|
9
9
|
import { a as Tr, n as Er, o as Dr } from "./dist-Cuwaibqg.js";
|
|
10
10
|
import './RichText.css';import './F0CanvasPanel.css';/* empty css */
|
|
11
11
|
import * as I from "react";
|
|
@@ -39753,16 +39753,15 @@ var VQ = {
|
|
|
39753
39753
|
})]
|
|
39754
39754
|
}));
|
|
39755
39755
|
GQ.displayName = "CheckCircleLineAnimated";
|
|
39756
|
-
|
|
39757
|
-
|
|
39758
|
-
|
|
39756
|
+
//#endregion
|
|
39757
|
+
//#region src/elements/ai/F0ActionItem/components/globeSpinMath.ts
|
|
39758
|
+
var KQ = 1.5472, qQ = .9947, JQ = .392, YQ = (e, t) => t === "working" || e >= 56 ? 1 : e >= 28 ? 1.35 : 1.7, XQ = 2.4, ZQ = .055, QQ = 1, $Q = .62, e$ = .085, t$ = .09, n$ = [
|
|
39759
|
+
1,
|
|
39760
|
+
0,
|
|
39761
|
+
0,
|
|
39759
39762
|
0
|
|
39760
|
-
]
|
|
39761
|
-
|
|
39762
|
-
140,
|
|
39763
|
-
220
|
|
39764
|
-
], e$ = 4 * Math.PI;
|
|
39765
|
-
function t$(e, t) {
|
|
39763
|
+
];
|
|
39764
|
+
function r$(e, t) {
|
|
39766
39765
|
return [
|
|
39767
39766
|
e[0] * t[0] - e[1] * t[1] - e[2] * t[2] - e[3] * t[3],
|
|
39768
39767
|
e[0] * t[1] + e[1] * t[0] + e[2] * t[3] - e[3] * t[2],
|
|
@@ -39770,7 +39769,15 @@ function t$(e, t) {
|
|
|
39770
39769
|
e[0] * t[3] + e[1] * t[2] - e[2] * t[1] + e[3] * t[0]
|
|
39771
39770
|
];
|
|
39772
39771
|
}
|
|
39773
|
-
function
|
|
39772
|
+
function i$(e) {
|
|
39773
|
+
return [
|
|
39774
|
+
e[0],
|
|
39775
|
+
-e[1],
|
|
39776
|
+
-e[2],
|
|
39777
|
+
-e[3]
|
|
39778
|
+
];
|
|
39779
|
+
}
|
|
39780
|
+
function a$(e, t, n, r) {
|
|
39774
39781
|
let i = Math.sin(r / 2);
|
|
39775
39782
|
return [
|
|
39776
39783
|
Math.cos(r / 2),
|
|
@@ -39779,229 +39786,293 @@ function n$(e, t, n, r) {
|
|
|
39779
39786
|
n * i
|
|
39780
39787
|
];
|
|
39781
39788
|
}
|
|
39782
|
-
|
|
39789
|
+
function o$(e, t, n) {
|
|
39790
|
+
let r = e[0] * t[0] + e[1] * t[1] + e[2] * t[2] + e[3] * t[3], i = r < 0 ? -1 : 1;
|
|
39791
|
+
if (r *= i, r > .9995) {
|
|
39792
|
+
let r = [
|
|
39793
|
+
e[0] + (i * t[0] - e[0]) * n,
|
|
39794
|
+
e[1] + (i * t[1] - e[1]) * n,
|
|
39795
|
+
e[2] + (i * t[2] - e[2]) * n,
|
|
39796
|
+
e[3] + (i * t[3] - e[3]) * n
|
|
39797
|
+
], a = Math.hypot(r[0], r[1], r[2], r[3]);
|
|
39798
|
+
return [
|
|
39799
|
+
r[0] / a,
|
|
39800
|
+
r[1] / a,
|
|
39801
|
+
r[2] / a,
|
|
39802
|
+
r[3] / a
|
|
39803
|
+
];
|
|
39804
|
+
}
|
|
39805
|
+
let a = Math.acos(r), o = Math.sin(a), s = Math.sin((1 - n) * a) / o, c = i * Math.sin(n * a) / o;
|
|
39806
|
+
return [
|
|
39807
|
+
s * e[0] + c * t[0],
|
|
39808
|
+
s * e[1] + c * t[1],
|
|
39809
|
+
s * e[2] + c * t[2],
|
|
39810
|
+
s * e[3] + c * t[3]
|
|
39811
|
+
];
|
|
39812
|
+
}
|
|
39813
|
+
var s$ = [
|
|
39783
39814
|
0,
|
|
39784
39815
|
0,
|
|
39785
39816
|
0
|
|
39786
39817
|
];
|
|
39787
|
-
function
|
|
39818
|
+
function c$(e, t, n, r, i) {
|
|
39788
39819
|
let a = e[0], o = e[1], s = e[2], c = e[3], l = 2 * (s * r - c * n), u = 2 * (c * t - o * r), d = 2 * (o * n - s * t);
|
|
39789
39820
|
i[0] = t + a * l + s * d - c * u, i[1] = n + a * u + c * l - o * d, i[2] = r + a * d + o * u - s * l;
|
|
39790
39821
|
}
|
|
39791
|
-
var
|
|
39792
|
-
function
|
|
39822
|
+
var l$ = .15;
|
|
39823
|
+
function u$(e) {
|
|
39793
39824
|
if (e <= 0) return 0;
|
|
39794
39825
|
if (e >= 1) return 1;
|
|
39795
39826
|
let t = .85;
|
|
39796
|
-
if (e <=
|
|
39827
|
+
if (e <= l$) return e * e / (2 * l$) / t;
|
|
39797
39828
|
if (e >= .85) {
|
|
39798
39829
|
let n = 1 - e;
|
|
39799
|
-
return (t - n * n / (2 *
|
|
39800
|
-
}
|
|
39801
|
-
return (e -
|
|
39802
|
-
}
|
|
39803
|
-
var
|
|
39804
|
-
let
|
|
39805
|
-
return
|
|
39806
|
-
})
|
|
39807
|
-
|
|
39808
|
-
|
|
39809
|
-
|
|
39810
|
-
|
|
39811
|
-
|
|
39812
|
-
40 / l$,
|
|
39813
|
-
0
|
|
39814
|
-
], d$ = 6, f$ = 41, p$ = 287, m$ = (() => {
|
|
39815
|
-
let e = YQ, t = XQ * XQ;
|
|
39816
|
-
return Array.from({ length: 41 }, (n, r) => {
|
|
39817
|
-
let i = r / JQ * Math.PI * 2, a = Math.sin(i) ** 2, o = a < 1e-9 ? 2.4043997499999996 / (2 * e) : (e - Math.sqrt(e * e - a * (3.3938278399999997 - a - t))) / a;
|
|
39818
|
-
return Math.acos(Math.max(-1, Math.min(1, o)));
|
|
39819
|
-
});
|
|
39820
|
-
})(), h$ = (e) => e / JQ * Math.PI * 2, g$ = Array.from({ length: 41 }, (e, t) => Math.cos(h$(t))), _$ = Array.from({ length: 41 }, (e, t) => Math.sin(h$(t))), v$ = [
|
|
39821
|
-
0,
|
|
39822
|
-
1,
|
|
39823
|
-
2,
|
|
39824
|
-
3
|
|
39825
|
-
].map((e) => n$(0, 0, 1, e * Math.PI / 2)), y$ = [
|
|
39830
|
+
return (t - n * n / (2 * l$)) / t;
|
|
39831
|
+
}
|
|
39832
|
+
return (e - l$ / 2) / t;
|
|
39833
|
+
}
|
|
39834
|
+
var d$ = (e) => {
|
|
39835
|
+
let t = Math.sin(e * 127.1 + 311.7) * 43758.5453;
|
|
39836
|
+
return t - Math.floor(t);
|
|
39837
|
+
}, f$ = (e) => e - Math.floor(e), p$ = [
|
|
39838
|
+
n$,
|
|
39839
|
+
a$(1, 0, 0, Math.PI),
|
|
39840
|
+
a$(0, 1, 0, Math.PI),
|
|
39841
|
+
a$(0, 0, 1, Math.PI)
|
|
39842
|
+
], m$ = [
|
|
39826
39843
|
[
|
|
39827
|
-
0,
|
|
39828
39844
|
0,
|
|
39829
39845
|
0,
|
|
39830
39846
|
0
|
|
39831
39847
|
],
|
|
39832
39848
|
[
|
|
39833
|
-
|
|
39834
|
-
0,
|
|
39849
|
+
1,
|
|
39835
39850
|
0,
|
|
39836
39851
|
0
|
|
39837
39852
|
],
|
|
39838
39853
|
[
|
|
39839
39854
|
0,
|
|
39840
|
-
|
|
39841
|
-
0,
|
|
39855
|
+
1,
|
|
39842
39856
|
0
|
|
39843
39857
|
],
|
|
39844
39858
|
[
|
|
39845
39859
|
0,
|
|
39846
39860
|
0,
|
|
39847
|
-
|
|
39848
|
-
0
|
|
39861
|
+
1
|
|
39849
39862
|
]
|
|
39850
|
-
]
|
|
39851
|
-
function
|
|
39863
|
+
];
|
|
39864
|
+
function h$(e, t) {
|
|
39865
|
+
let n = (t) => 1 + Math.floor(d$(e * 13.77 + t * 1.7) * 3);
|
|
39866
|
+
if (t < 5) return n(t);
|
|
39867
|
+
let r = 0;
|
|
39868
|
+
for (let e = 0; e < 5; e++) r ^= n(e);
|
|
39869
|
+
return r;
|
|
39870
|
+
}
|
|
39871
|
+
var g$ = Math.hypot(.83, .55);
|
|
39872
|
+
function _$(e) {
|
|
39873
|
+
let t = Math.floor(e / 3), n = f$(e / 3), r = XQ / 3, i = n < r ? u$(n / r) : 1, a = e * ZQ * 2 * Math.PI, o = .83 * Math.cos(a) / g$, s = .55 / g$, c = .83 * Math.sin(a) / g$, l = 2 + +(d$(t) < .35);
|
|
39874
|
+
return r$(a$(0, 1, 0, QQ * i * 2 * Math.PI), a$(o, s, c, l * i * 2 * Math.PI));
|
|
39875
|
+
}
|
|
39876
|
+
function v$(e) {
|
|
39877
|
+
let t = Math.floor(e / $Q), n = Math.floor(t / 6), r = t - n * 6, i = (e - t * $Q) / $Q, a = 0;
|
|
39878
|
+
for (let e = 0; e < r; e++) a ^= h$(n, e);
|
|
39879
|
+
let o = h$(n, r), s = .28 + d$(t * 3.1) * .18, c = 1 - (1 - Math.min(Math.max(i / s, 0), 1)) ** 3, l = d$(t * 5.9) < .5 ? 1 : -1, u = m$[o], d = o === 0 ? p$[a] : r$(a$(u[0], u[1], u[2], l * c * Math.PI), p$[a]);
|
|
39880
|
+
return r$(a$(0, 1, 0, e * e$ * 2 * Math.PI), d);
|
|
39881
|
+
}
|
|
39882
|
+
function y$(e, t, n) {
|
|
39883
|
+
let r = t / 1e3 * YQ(n, e);
|
|
39884
|
+
return e === "thinking" ? _$(r) : e === "working" ? v$(r) : a$(0, 1, 0, r * t$ * 2 * Math.PI);
|
|
39885
|
+
}
|
|
39886
|
+
function b$(e, t, n) {
|
|
39887
|
+
return r$(e, i$(y$(t, 0, n)));
|
|
39888
|
+
}
|
|
39889
|
+
function x$(e, t, n) {
|
|
39890
|
+
return r$(o$(e, n$, n), t);
|
|
39891
|
+
}
|
|
39892
|
+
function S$(e, t) {
|
|
39893
|
+
return f$(e / 1e3 * YQ(t, "thinking") / 3) >= XQ / 3;
|
|
39894
|
+
}
|
|
39895
|
+
function C$(e, t) {
|
|
39896
|
+
let n = e / 1e3 * YQ(t, "thinking");
|
|
39897
|
+
return Math.floor(n / 3);
|
|
39898
|
+
}
|
|
39899
|
+
function w$(e, t) {
|
|
39900
|
+
return (e === "thinking" ? 3 : e === "working" ? $Q * 6 : 1 / t$) * 1e3 / YQ(t, e);
|
|
39901
|
+
}
|
|
39902
|
+
var T$ = 40, E$ = Math.PI / 30;
|
|
39903
|
+
function D$(e) {
|
|
39904
|
+
let t = KQ, n = qQ * qQ, r = Math.sin(e) ** 2, i = r < 1e-9 ? 2.4043997499999996 / (2 * t) : (t - Math.sqrt(t * t - r * (3.3938278399999997 - r - n))) / r;
|
|
39905
|
+
return Math.acos(Math.max(-1, Math.min(1, i)));
|
|
39906
|
+
}
|
|
39907
|
+
var O$ = (() => {
|
|
39908
|
+
let e = [];
|
|
39909
|
+
for (let t = 0; t < T$; t++) {
|
|
39910
|
+
let n = t / T$ * 2 * Math.PI, r = D$(n);
|
|
39911
|
+
e.push(Math.sin(r) * Math.cos(n), Math.cos(r), Math.sin(r) * Math.sin(n));
|
|
39912
|
+
}
|
|
39913
|
+
return e;
|
|
39914
|
+
})(), k$ = [
|
|
39915
|
+
0,
|
|
39916
|
+
1,
|
|
39917
|
+
2,
|
|
39918
|
+
3
|
|
39919
|
+
].map((e) => a$(0, 0, 1, e * Math.PI / 2));
|
|
39920
|
+
function A$() {
|
|
39852
39921
|
return {
|
|
39853
|
-
|
|
39854
|
-
|
|
39855
|
-
color: "",
|
|
39856
|
-
avgZ: Infinity
|
|
39857
|
-
})),
|
|
39858
|
-
grid: Array.from({ length: p$ }, () => ({
|
|
39859
|
-
x: 0,
|
|
39860
|
-
y: 0,
|
|
39861
|
-
z: 0,
|
|
39862
|
-
t: 0
|
|
39863
|
-
}))
|
|
39922
|
+
ring: /* @__PURE__ */ new Float64Array(120),
|
|
39923
|
+
path: ""
|
|
39864
39924
|
};
|
|
39865
39925
|
}
|
|
39866
|
-
|
|
39867
|
-
|
|
39868
|
-
|
|
39869
|
-
|
|
39870
|
-
|
|
39871
|
-
|
|
39872
|
-
|
|
39873
|
-
|
|
39874
|
-
|
|
39875
|
-
|
|
39876
|
-
|
|
39877
|
-
|
|
39878
|
-
|
|
39879
|
-
i
|
|
39880
|
-
let
|
|
39881
|
-
|
|
39882
|
-
|
|
39883
|
-
|
|
39884
|
-
|
|
39885
|
-
|
|
39886
|
-
|
|
39887
|
-
|
|
39888
|
-
|
|
39889
|
-
|
|
39890
|
-
|
|
39891
|
-
|
|
39892
|
-
|
|
39893
|
-
|
|
39894
|
-
|
|
39895
|
-
|
|
39896
|
-
|
|
39897
|
-
|
|
39898
|
-
|
|
39899
|
-
|
|
39900
|
-
|
|
39901
|
-
|
|
39902
|
-
|
|
39903
|
-
|
|
39904
|
-
|
|
39926
|
+
var j$ = (e) => Math.round(e * 100) / 100;
|
|
39927
|
+
function M$(e, t) {
|
|
39928
|
+
let n = -1;
|
|
39929
|
+
for (let r = 0; r < T$; r++) c$(e, O$[r * 3], O$[r * 3 + 1], O$[r * 3 + 2], s$), t[r * 3] = s$[0], t[r * 3 + 1] = s$[1], t[r * 3 + 2] = s$[2], n < 0 && s$[2] >= 0 && (n = r);
|
|
39930
|
+
return n;
|
|
39931
|
+
}
|
|
39932
|
+
function N$(e, t, n) {
|
|
39933
|
+
let r = e[t * 3 + 2], i = r / (r - e[n * 3 + 2]), a = e[t * 3] + (e[n * 3] - e[t * 3]) * i, o = e[t * 3 + 1] + (e[n * 3 + 1] - e[t * 3 + 1]) * i;
|
|
39934
|
+
return Math.atan2(o, a);
|
|
39935
|
+
}
|
|
39936
|
+
function P$(e, t, n) {
|
|
39937
|
+
let r = t - e;
|
|
39938
|
+
r -= 2 * Math.PI * Math.round(r / (2 * Math.PI));
|
|
39939
|
+
let i = Math.max(1, Math.ceil(Math.abs(r) / E$)), a = "";
|
|
39940
|
+
for (let t = 0; t <= i; t++) {
|
|
39941
|
+
let o = e + r * t / i;
|
|
39942
|
+
a += "L" + n.x(Math.cos(o)) + " " + n.y(Math.sin(o));
|
|
39943
|
+
}
|
|
39944
|
+
return a;
|
|
39945
|
+
}
|
|
39946
|
+
function F$(e, t, n) {
|
|
39947
|
+
let r = T$, i = "", a = null;
|
|
39948
|
+
for (let o = 0; o < r; o++) {
|
|
39949
|
+
let s = (t + o) % r, c = (s + 1) % r, l = e[s * 3 + 2] >= 0;
|
|
39950
|
+
if (l && (i += (i ? "L" : "M") + n.x(e[s * 3]) + " " + n.y(e[s * 3 + 1])), l === e[c * 3 + 2] >= 0) continue;
|
|
39951
|
+
let u = N$(e, s, c);
|
|
39952
|
+
l ? a = u : a !== null && (i += P$(a, u, n), a = null);
|
|
39953
|
+
}
|
|
39954
|
+
return i + "Z";
|
|
39955
|
+
}
|
|
39956
|
+
function I$(e, t, n) {
|
|
39957
|
+
let r = n * JQ, i = n / 2, a = {
|
|
39958
|
+
x: (e) => j$(i + e * r),
|
|
39959
|
+
y: (e) => j$(i - e * r)
|
|
39960
|
+
}, o = "", s = 0;
|
|
39961
|
+
for (let n = 0; n < 4; n++) {
|
|
39962
|
+
let r = M$(r$(t, k$[n]), e.ring);
|
|
39963
|
+
r < 0 || (o += F$(e.ring, r, a), s++);
|
|
39964
|
+
}
|
|
39965
|
+
return e.path = o, s;
|
|
39966
|
+
}
|
|
39967
|
+
//#endregion
|
|
39968
|
+
//#region src/elements/ai/F0ActionItem/components/ChatSpinner.tsx
|
|
39969
|
+
var L$ = 240, R$ = (e) => 1 - (1 - e) ** 4, z$ = 1e3 / 60, B$ = 2, V$ = (e, t) => Math.abs(e[0] - t[0]) < 1e-9 && Math.abs(e[1] - t[1]) < 1e-9 && Math.abs(e[2] - t[2]) < 1e-9 && Math.abs(e[3] - t[3]) < 1e-9, H$ = (e) => e === "default" ? "thinking" : e === "continuous" ? "working" : e, U$ = R(({ size: e = 20, className: t, style: n, variant: r = "thinking", playing: i = !0 }, a) => {
|
|
39970
|
+
let o = H$(r), s = V(null), c = V(null), l = V(i), u = V(null), d = V(null), f = (e) => {
|
|
39971
|
+
s.current = e, a && (typeof a == "function" ? a(e) : a.current = e);
|
|
39972
|
+
};
|
|
39973
|
+
B(() => {
|
|
39974
|
+
let t = c.current, n = s.current;
|
|
39905
39975
|
if (!t || !n) return;
|
|
39906
|
-
let
|
|
39907
|
-
let
|
|
39908
|
-
|
|
39909
|
-
|
|
39910
|
-
|
|
39911
|
-
|
|
39912
|
-
|
|
39913
|
-
|
|
39914
|
-
|
|
39915
|
-
|
|
39916
|
-
|
|
39917
|
-
},
|
|
39918
|
-
|
|
39919
|
-
|
|
39920
|
-
if (r === "continuous") return (e - f) % KQ / KQ;
|
|
39921
|
-
if (g === "spin") {
|
|
39922
|
-
let t = Math.min((e - f) / KQ, 1);
|
|
39923
|
-
return t >= 1 ? (C(e), 0) : o$(t);
|
|
39924
|
-
}
|
|
39925
|
-
return g === "pause" && e - m >= 300 && w(e), 0;
|
|
39926
|
-
}, E = (t) => {
|
|
39927
|
-
v ||= (f = t, p = t, !0);
|
|
39928
|
-
let n = T(t), r = (t - p) / qQ % 1, i = C$(a, n, e, r);
|
|
39929
|
-
S(i), d = g === "rest" ? null : requestAnimationFrame(E);
|
|
39930
|
-
}, D = () => {
|
|
39931
|
-
d !== null || x || (d = requestAnimationFrame(E));
|
|
39932
|
-
}, O = () => {
|
|
39933
|
-
d !== null && (cancelAnimationFrame(d), d = null);
|
|
39976
|
+
let r = A$(), i = null, a = 0, f = !1, p = d.current, m = o === "thinking" && !l.current && (!p || V$(p, n$)), h = !0, g = null, _ = typeof window < "u" && window.matchMedia ? window.matchMedia("(prefers-reduced-motion: reduce)") : null, v = () => me.skipAnimations || (_?.matches ?? !1), y = v(), b = -1, x = (n) => {
|
|
39977
|
+
let i = d.current;
|
|
39978
|
+
i && b === e && V$(i, n) || (I$(r, n, e), t.setAttribute("d", r.path), d.current = n, b = e);
|
|
39979
|
+
}, S = p, C = p ? b$(p, o, e) : n$, w = null, T = 0, E = -Infinity, D = 0, O = () => {
|
|
39980
|
+
m = !0, i = null, S = null, w = null, x(n$);
|
|
39981
|
+
}, k = (t) => {
|
|
39982
|
+
if (S && !w && (w = d.current ?? S, T = t), w) {
|
|
39983
|
+
let e = Math.min(1, (t - T) / L$);
|
|
39984
|
+
return e >= 1 ? (O(), !0) : (x(o$(w, n$, R$(e))), i = requestAnimationFrame(j), !0);
|
|
39985
|
+
}
|
|
39986
|
+
return S$(t, e) || C$(t, e) > D ? (O(), !0) : !1;
|
|
39987
|
+
}, A = (t) => {
|
|
39988
|
+
let n = y$(o, t, e);
|
|
39989
|
+
return S ? t >= L$ ? (S = null, n) : x$(C, n, R$(t / L$)) : n;
|
|
39934
39990
|
};
|
|
39935
|
-
|
|
39936
|
-
|
|
39937
|
-
|
|
39938
|
-
|
|
39939
|
-
|
|
39940
|
-
|
|
39941
|
-
|
|
39942
|
-
|
|
39943
|
-
|
|
39944
|
-
|
|
39945
|
-
f += e, p += e, m += e;
|
|
39946
|
-
}
|
|
39947
|
-
h = null, D();
|
|
39948
|
-
} else h = performance.now(), O();
|
|
39991
|
+
function j(t) {
|
|
39992
|
+
if (t < E - B$) {
|
|
39993
|
+
i = requestAnimationFrame(j);
|
|
39994
|
+
return;
|
|
39995
|
+
}
|
|
39996
|
+
E += z$, E < t && (E = t + z$), f ||= (a = t, !0);
|
|
39997
|
+
let n = t - a;
|
|
39998
|
+
if (o === "thinking") {
|
|
39999
|
+
if (!l.current && k(n)) return;
|
|
40000
|
+
D = C$(n, e);
|
|
39949
40001
|
}
|
|
39950
|
-
|
|
39951
|
-
|
|
39952
|
-
|
|
40002
|
+
x(A(n)), i = requestAnimationFrame(j);
|
|
40003
|
+
}
|
|
40004
|
+
let M = () => {
|
|
40005
|
+
i !== null || y || m || !h || (i = requestAnimationFrame(j));
|
|
40006
|
+
}, N = () => {
|
|
40007
|
+
i !== null && (cancelAnimationFrame(i), i = null);
|
|
39953
40008
|
};
|
|
39954
|
-
|
|
39955
|
-
|
|
40009
|
+
u.current = () => {
|
|
40010
|
+
m ? (m = !1, f = !1, D = 0) : w && (S = d.current ?? n$, C = b$(S, o, e), w = null, f = !1, D = 0), h && M();
|
|
40011
|
+
}, x(d.current ?? n$);
|
|
40012
|
+
let ee = null;
|
|
40013
|
+
typeof IntersectionObserver < "u" && (ee = new IntersectionObserver((e) => {
|
|
40014
|
+
let t = e[0]?.isIntersecting ?? !0;
|
|
40015
|
+
t !== h && (h = t, t ? (g !== null && f && (a += performance.now() - g), g = null, M()) : (g = performance.now(), N()));
|
|
40016
|
+
}, { threshold: 0 }), ee.observe(n));
|
|
40017
|
+
let te = () => {
|
|
40018
|
+
y = v(), y ? (N(), x(n$)) : M();
|
|
39956
40019
|
};
|
|
39957
|
-
|
|
39958
|
-
|
|
39959
|
-
|
|
39960
|
-
|
|
39961
|
-
|
|
40020
|
+
return _?.addEventListener("change", te), M(), () => {
|
|
40021
|
+
N(), u.current = null, ee?.disconnect(), _?.removeEventListener("change", te);
|
|
40022
|
+
};
|
|
40023
|
+
}, [e, o]), B(() => {
|
|
40024
|
+
l.current = i, i && u.current?.();
|
|
40025
|
+
}, [i]);
|
|
40026
|
+
let p = o === "asking";
|
|
40027
|
+
return /* @__PURE__ */ U("div", {
|
|
40028
|
+
ref: f,
|
|
40029
|
+
...p ? { "aria-hidden": !0 } : {
|
|
40030
|
+
role: "progressbar",
|
|
40031
|
+
"aria-label": "Loading"
|
|
39962
40032
|
},
|
|
39963
|
-
|
|
39964
|
-
"aria-label": "Loading",
|
|
39965
|
-
className: F("shrink-0 globe-spin-anim", t),
|
|
40033
|
+
className: F("shrink-0 text-f1-icon-accent", p ? "globe-spin-enter" : "globe-spin-anim", t),
|
|
39966
40034
|
style: {
|
|
39967
40035
|
width: e,
|
|
39968
40036
|
height: e,
|
|
39969
40037
|
"--globe-spin-blur": `${(e * .05).toFixed(2)}px`,
|
|
39970
|
-
"--globe-spin-cycle": `${
|
|
40038
|
+
"--globe-spin-cycle": `${Math.round(w$(o, e))}ms`,
|
|
39971
40039
|
...n
|
|
39972
40040
|
},
|
|
39973
40041
|
children: /* @__PURE__ */ U("svg", {
|
|
39974
|
-
ref: s,
|
|
39975
40042
|
width: "100%",
|
|
39976
40043
|
height: "100%",
|
|
39977
40044
|
viewBox: `0 0 ${e} ${e}`,
|
|
39978
40045
|
xmlns: "http://www.w3.org/2000/svg",
|
|
39979
40046
|
shapeRendering: "geometricPrecision",
|
|
39980
40047
|
className: "block overflow-visible",
|
|
39981
|
-
children:
|
|
39982
|
-
|
|
39983
|
-
|
|
39984
|
-
}
|
|
40048
|
+
children: /* @__PURE__ */ U("path", {
|
|
40049
|
+
ref: c,
|
|
40050
|
+
fill: "currentColor"
|
|
40051
|
+
})
|
|
39985
40052
|
})
|
|
39986
40053
|
});
|
|
39987
40054
|
});
|
|
39988
|
-
|
|
40055
|
+
U$.displayName = "ChatSpinner";
|
|
39989
40056
|
//#endregion
|
|
39990
40057
|
//#region src/elements/ai/F0ActionItem/F0ActionItem.tsx
|
|
39991
|
-
var
|
|
40058
|
+
var W$ = {
|
|
40059
|
+
executing: "thinking",
|
|
40060
|
+
writing: "working",
|
|
40061
|
+
asking: "asking"
|
|
40062
|
+
}, G$ = {
|
|
39992
40063
|
initial: { opacity: 0 },
|
|
39993
40064
|
animate: { opacity: 1 },
|
|
39994
40065
|
exit: { opacity: 0 }
|
|
39995
|
-
},
|
|
39996
|
-
let i = {
|
|
39997
|
-
duration:
|
|
40066
|
+
}, K$ = ({ title: e, suffix: t, status: n, inGroup: r }) => {
|
|
40067
|
+
let i = O(), a = {
|
|
40068
|
+
duration: i ? 0 : .18,
|
|
39998
40069
|
ease: [
|
|
39999
40070
|
.33,
|
|
40000
40071
|
1,
|
|
40001
40072
|
.68,
|
|
40002
40073
|
1
|
|
40003
40074
|
]
|
|
40004
|
-
},
|
|
40075
|
+
}, o = n === "inProgress", s = n === "completed", c = n ? W$[n] : void 0;
|
|
40005
40076
|
return /* @__PURE__ */ W("div", {
|
|
40006
40077
|
className: "flex w-full items-start gap-1 text-f1-foreground-secondary",
|
|
40007
40078
|
children: [
|
|
@@ -40010,24 +40081,31 @@ var T$ = {
|
|
|
40010
40081
|
children: /* @__PURE__ */ W(ge, {
|
|
40011
40082
|
mode: "wait",
|
|
40012
40083
|
children: [
|
|
40013
|
-
|
|
40084
|
+
o ? /* @__PURE__ */ U(De.div, {
|
|
40014
40085
|
className: "flex h-5 w-5 shrink-0 items-center justify-center",
|
|
40015
|
-
...
|
|
40016
|
-
transition:
|
|
40086
|
+
...G$,
|
|
40087
|
+
transition: a,
|
|
40017
40088
|
children: /* @__PURE__ */ U(Ae, {
|
|
40018
40089
|
state: "animate",
|
|
40019
40090
|
size: r ? "md" : "lg",
|
|
40020
40091
|
icon: Ka
|
|
40021
40092
|
})
|
|
40022
40093
|
}, "inProgress") : null,
|
|
40023
|
-
|
|
40094
|
+
c ? /* @__PURE__ */ U(De.div, {
|
|
40024
40095
|
className: "flex h-5 w-5 shrink-0 items-center justify-center",
|
|
40025
|
-
|
|
40026
|
-
|
|
40096
|
+
initial: !1,
|
|
40097
|
+
animate: { opacity: 1 },
|
|
40098
|
+
exit: { opacity: 0 },
|
|
40099
|
+
transition: {
|
|
40100
|
+
...a,
|
|
40101
|
+
duration: i ? 0 : .12
|
|
40102
|
+
},
|
|
40103
|
+
children: /* @__PURE__ */ U(U$, { variant: c })
|
|
40104
|
+
}, "spinner") : null,
|
|
40027
40105
|
s ? /* @__PURE__ */ U(De.div, {
|
|
40028
|
-
...
|
|
40106
|
+
...G$,
|
|
40029
40107
|
className: "flex h-5 w-5 shrink-0 items-center justify-center",
|
|
40030
|
-
transition:
|
|
40108
|
+
transition: a,
|
|
40031
40109
|
children: /* @__PURE__ */ U(Ae, {
|
|
40032
40110
|
color: "secondary",
|
|
40033
40111
|
state: "animate",
|
|
@@ -40039,7 +40117,7 @@ var T$ = {
|
|
|
40039
40117
|
})
|
|
40040
40118
|
}),
|
|
40041
40119
|
e ? /* @__PURE__ */ U("p", {
|
|
40042
|
-
className: F("text-pretty leading-5",
|
|
40120
|
+
className: F("text-pretty leading-5", c && "shine-text"),
|
|
40043
40121
|
children: e
|
|
40044
40122
|
}) : null,
|
|
40045
40123
|
t ? /* @__PURE__ */ U("span", {
|
|
@@ -40048,20 +40126,20 @@ var T$ = {
|
|
|
40048
40126
|
}) : null
|
|
40049
40127
|
]
|
|
40050
40128
|
});
|
|
40051
|
-
},
|
|
40129
|
+
}, q$ = ["md", "lg"], J$ = ke({
|
|
40052
40130
|
base: "flex w-fit flex-row items-center overflow-hidden bg-f1-background-tertiary rounded-[10px]",
|
|
40053
40131
|
variants: { size: {
|
|
40054
40132
|
md: "max-w-48 gap-2 py-0.5 pl-0.5 pr-1.5",
|
|
40055
40133
|
lg: "max-w-56 gap-2.5 p-1"
|
|
40056
40134
|
} },
|
|
40057
40135
|
defaultVariants: { size: "md" }
|
|
40058
|
-
}),
|
|
40136
|
+
}), Y$ = {
|
|
40059
40137
|
md: "md",
|
|
40060
40138
|
lg: "md"
|
|
40061
|
-
},
|
|
40139
|
+
}, X$ = {
|
|
40062
40140
|
md: "sm",
|
|
40063
40141
|
lg: "md"
|
|
40064
|
-
},
|
|
40142
|
+
}, Z$ = R(({ file: e, actions: t = [], disabled: n = !1, size: r = "md", className: i, ...a }, o) => {
|
|
40065
40143
|
let s = t.length > 0, c = t.length === 1 ? t[0] : null, l = t.map((e) => ({
|
|
40066
40144
|
label: e.label,
|
|
40067
40145
|
icon: e.icon,
|
|
@@ -40070,12 +40148,12 @@ var T$ = {
|
|
|
40070
40148
|
}));
|
|
40071
40149
|
return /* @__PURE__ */ W("div", {
|
|
40072
40150
|
ref: o,
|
|
40073
|
-
className: F(
|
|
40151
|
+
className: F(J$({ size: r }), i),
|
|
40074
40152
|
...a,
|
|
40075
40153
|
children: [
|
|
40076
40154
|
/* @__PURE__ */ U(ht, {
|
|
40077
40155
|
file: e,
|
|
40078
|
-
size:
|
|
40156
|
+
size: Y$[r]
|
|
40079
40157
|
}),
|
|
40080
40158
|
/* @__PURE__ */ U(tt, {
|
|
40081
40159
|
className: F("text-neutral-1000 grow text-sm font-medium", !s && "pr-3"),
|
|
@@ -40083,7 +40161,7 @@ var T$ = {
|
|
|
40083
40161
|
}),
|
|
40084
40162
|
s ? c ? /* @__PURE__ */ U(xe, {
|
|
40085
40163
|
label: c.label,
|
|
40086
|
-
size:
|
|
40164
|
+
size: X$[r],
|
|
40087
40165
|
icon: c.icon ?? yt,
|
|
40088
40166
|
disabled: n,
|
|
40089
40167
|
onClick: n ? void 0 : c.onClick,
|
|
@@ -40092,30 +40170,30 @@ var T$ = {
|
|
|
40092
40170
|
}) : /* @__PURE__ */ U(Wl, {
|
|
40093
40171
|
items: l,
|
|
40094
40172
|
icon: Ya,
|
|
40095
|
-
size:
|
|
40173
|
+
size: X$[r]
|
|
40096
40174
|
}) : null
|
|
40097
40175
|
]
|
|
40098
40176
|
});
|
|
40099
40177
|
});
|
|
40100
|
-
|
|
40101
|
-
var
|
|
40178
|
+
Z$.displayName = "F0FileItem";
|
|
40179
|
+
var Q$ = Ue("F0FileItem", be(Z$)), $$ = Q$, e1 = 2, t1 = 70, n1 = .08, r1 = 6, i1 = .6, a1 = () => {
|
|
40102
40180
|
if (typeof window > "u") return;
|
|
40103
40181
|
let e = window;
|
|
40104
40182
|
return e.AudioContext ?? e.webkitAudioContext;
|
|
40105
|
-
},
|
|
40183
|
+
}, o1 = ({ stream: e, className: t, anchor: n = "right" }) => {
|
|
40106
40184
|
let r = V(null), [i, a] = H(0), [o, s] = H([]);
|
|
40107
40185
|
B(() => {
|
|
40108
40186
|
let e = r.current;
|
|
40109
40187
|
if (!e) return;
|
|
40110
40188
|
let t = () => {
|
|
40111
40189
|
let t = e.clientWidth;
|
|
40112
|
-
a(Math.max(1, Math.floor((t +
|
|
40190
|
+
a(Math.max(1, Math.floor((t + e1) / 4)));
|
|
40113
40191
|
};
|
|
40114
40192
|
if (t(), typeof ResizeObserver > "u") return;
|
|
40115
40193
|
let n = new ResizeObserver(t);
|
|
40116
40194
|
return n.observe(e), () => n.disconnect();
|
|
40117
40195
|
}, []), B(() => {
|
|
40118
|
-
let t =
|
|
40196
|
+
let t = a1();
|
|
40119
40197
|
if (!e || !t || i === 0) {
|
|
40120
40198
|
s([]);
|
|
40121
40199
|
return;
|
|
@@ -40129,12 +40207,12 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40129
40207
|
let n = (t - 128) / 128;
|
|
40130
40208
|
e += n * n;
|
|
40131
40209
|
}
|
|
40132
|
-
let t = Math.sqrt(e / o.length), n = Math.min(1, (t *
|
|
40210
|
+
let t = Math.sqrt(e / o.length), n = Math.min(1, (t * r1) ** +i1);
|
|
40133
40211
|
s((e) => {
|
|
40134
40212
|
let t = e.length >= i ? e.slice(e.length - i + 1) : e.slice();
|
|
40135
40213
|
return t.push(n), t;
|
|
40136
40214
|
});
|
|
40137
|
-
},
|
|
40215
|
+
}, t1);
|
|
40138
40216
|
return () => {
|
|
40139
40217
|
clearInterval(c), r.disconnect(), a.disconnect(), n.close(), s([]);
|
|
40140
40218
|
};
|
|
@@ -40146,10 +40224,10 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40146
40224
|
"aria-hidden": "true",
|
|
40147
40225
|
children: c.map((e, t) => /* @__PURE__ */ U("span", {
|
|
40148
40226
|
className: "shrink-0 rounded-full bg-f1-foreground-secondary w-0.5",
|
|
40149
|
-
style: { height: `${(
|
|
40227
|
+
style: { height: `${(n1 + e * .92) * 100}%` }
|
|
40150
40228
|
}, t))
|
|
40151
40229
|
});
|
|
40152
|
-
},
|
|
40230
|
+
}, s1 = ke({
|
|
40153
40231
|
variants: { size: {
|
|
40154
40232
|
xs: "h-4 w-4",
|
|
40155
40233
|
sm: "h-[1.375rem] w-[1.375rem]",
|
|
@@ -40157,7 +40235,7 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40157
40235
|
lg: "h-10 w-10"
|
|
40158
40236
|
} },
|
|
40159
40237
|
defaultVariants: { size: "md" }
|
|
40160
|
-
}),
|
|
40238
|
+
}), c1 = [
|
|
40161
40239
|
{
|
|
40162
40240
|
id: "bottom",
|
|
40163
40241
|
delay: 2.6,
|
|
@@ -40186,10 +40264,10 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40186
40264
|
rotateAxis: "1, 0, 0",
|
|
40187
40265
|
path: "M15.9939 1.33514e-05C19.6511 1.37386e-05 23.2335 1.22043 26.0525 3.58204C23.2335 5.86737 19.651 7.16115 15.9939 7.16115C12.1849 7.16103 8.67993 5.79089 5.93728 3.58204C8.75621 1.29671 12.3369 0.000125175 15.9939 1.33514e-05Z"
|
|
40188
40266
|
}
|
|
40189
|
-
],
|
|
40267
|
+
], l1 = R(({ spin: e = !1, size: t = "md", background: n, hover: r = !1, ...i }, a) => {
|
|
40190
40268
|
let o = Br(), { onAnimationStart: s, onAnimationEnd: c, onDragStart: l, onDragEnd: u, onDrag: d, className: f, ...p } = i;
|
|
40191
40269
|
return /* @__PURE__ */ U("div", {
|
|
40192
|
-
className: F(
|
|
40270
|
+
className: F(s1({ size: t }), f),
|
|
40193
40271
|
style: {
|
|
40194
40272
|
background: "transparent",
|
|
40195
40273
|
perspective: e ? "10px" : void 0,
|
|
@@ -40210,12 +40288,12 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40210
40288
|
cy: "16",
|
|
40211
40289
|
r: "16"
|
|
40212
40290
|
})
|
|
40213
|
-
}),
|
|
40291
|
+
}), c1.map((e) => /* @__PURE__ */ U("clipPath", {
|
|
40214
40292
|
id: `${o}-${e.id}`,
|
|
40215
40293
|
children: /* @__PURE__ */ U("path", { d: e.path })
|
|
40216
40294
|
}, e.id))] }), /* @__PURE__ */ U("g", {
|
|
40217
40295
|
clipPath: `url(#${o}-circle)`,
|
|
40218
|
-
children:
|
|
40296
|
+
children: c1.map((t) => /* @__PURE__ */ U(De.foreignObject, {
|
|
40219
40297
|
x: "0",
|
|
40220
40298
|
y: "0",
|
|
40221
40299
|
width: "32",
|
|
@@ -40311,25 +40389,25 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40311
40389
|
})]
|
|
40312
40390
|
})
|
|
40313
40391
|
});
|
|
40314
|
-
}),
|
|
40392
|
+
}), u1 = ({ tone: e }) => e === "page" ? /* @__PURE__ */ U("div", { className: "absolute inset-0 bg-f1-special-page" }) : null, d1 = ({ className: e, tone: t = "background" }) => /* @__PURE__ */ W("div", {
|
|
40315
40393
|
"aria-hidden": !0,
|
|
40316
40394
|
"data-composer-backdrop": "",
|
|
40317
40395
|
className: F("pointer-events-none absolute inset-x-0 -top-11 bottom-0", e),
|
|
40318
40396
|
children: [/* @__PURE__ */ U("div", {
|
|
40319
40397
|
"data-composer-backdrop-fade": "",
|
|
40320
40398
|
className: F("absolute inset-x-0 top-0 h-8 bg-f1-background/85", "[mask-image:linear-gradient(to_bottom,transparent,rgb(0_0_0/0.3))]"),
|
|
40321
|
-
children: /* @__PURE__ */ U(
|
|
40399
|
+
children: /* @__PURE__ */ U(u1, { tone: t })
|
|
40322
40400
|
}), /* @__PURE__ */ U("div", {
|
|
40323
40401
|
className: F("absolute inset-x-0 top-8 bottom-0 bg-f1-background/85 backdrop-blur-lg", "[mask-image:linear-gradient(to_bottom,rgb(0_0_0/0.3),#000_24px)]"),
|
|
40324
|
-
children: /* @__PURE__ */ U(
|
|
40402
|
+
children: /* @__PURE__ */ U(u1, { tone: t })
|
|
40325
40403
|
})]
|
|
40326
|
-
}),
|
|
40404
|
+
}), f1 = {
|
|
40327
40405
|
status: "loading",
|
|
40328
40406
|
url: void 0
|
|
40329
|
-
},
|
|
40407
|
+
}, p1 = {
|
|
40330
40408
|
status: "error",
|
|
40331
40409
|
url: void 0
|
|
40332
|
-
},
|
|
40410
|
+
}, m1 = (e) => e.startsWith("blob:") || e.startsWith("data:"), h1 = class {
|
|
40333
40411
|
entries = /* @__PURE__ */ new Map();
|
|
40334
40412
|
queue = [];
|
|
40335
40413
|
running = 0;
|
|
@@ -40340,7 +40418,7 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40340
40418
|
constructor(e, t = {}) {
|
|
40341
40419
|
this.getResolver = typeof e == "function" ? e : () => e.current, this.graceMs = t.graceMs ?? 6e4, this.concurrency = t.concurrency ?? 4, this.maxIdleBytes = t.maxIdleBytes ?? 157286400;
|
|
40342
40420
|
}
|
|
40343
|
-
getSnapshot = (e) => this.entries.get(e)?.snapshot ??
|
|
40421
|
+
getSnapshot = (e) => this.entries.get(e)?.snapshot ?? f1;
|
|
40344
40422
|
subscribe = (e, t) => {
|
|
40345
40423
|
let n = this.ensure(e);
|
|
40346
40424
|
return n.listeners.add(t), () => {
|
|
@@ -40349,7 +40427,7 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40349
40427
|
};
|
|
40350
40428
|
acquire = (e) => {
|
|
40351
40429
|
let t = this.ensure(e);
|
|
40352
|
-
t.refs += 1, t.lastUsed = Date.now(), t.releaseTimer &&= (clearTimeout(t.releaseTimer), null), t.snapshot.status === "error" && this.update(t,
|
|
40430
|
+
t.refs += 1, t.lastUsed = Date.now(), t.releaseTimer &&= (clearTimeout(t.releaseTimer), null), t.snapshot.status === "error" && this.update(t, f1), t.snapshot.status === "loading" && !t.controller && this.enqueue(e);
|
|
40353
40431
|
};
|
|
40354
40432
|
release = (e) => {
|
|
40355
40433
|
let t = this.entries.get(e);
|
|
@@ -40375,7 +40453,7 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40375
40453
|
ensure(e) {
|
|
40376
40454
|
let t = this.entries.get(e);
|
|
40377
40455
|
return t || (t = {
|
|
40378
|
-
snapshot:
|
|
40456
|
+
snapshot: f1,
|
|
40379
40457
|
refs: 0,
|
|
40380
40458
|
controller: null,
|
|
40381
40459
|
objectUrl: null,
|
|
@@ -40411,7 +40489,7 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40411
40489
|
url: r ?? e
|
|
40412
40490
|
}));
|
|
40413
40491
|
}).catch(() => {
|
|
40414
|
-
n.signal.aborted || this.entries.get(e) !== t || this.update(t,
|
|
40492
|
+
n.signal.aborted || this.entries.get(e) !== t || this.update(t, p1);
|
|
40415
40493
|
}).finally(() => {
|
|
40416
40494
|
--this.running, t.controller === n && (t.controller = null), this.pump();
|
|
40417
40495
|
});
|
|
@@ -40434,35 +40512,35 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40434
40512
|
}
|
|
40435
40513
|
}
|
|
40436
40514
|
}
|
|
40437
|
-
},
|
|
40515
|
+
}, g1 = Pr({
|
|
40438
40516
|
reducedMotion: !1,
|
|
40439
40517
|
urlCache: null
|
|
40440
|
-
}),
|
|
40518
|
+
}), _1 = ({ children: e, reducedMotion: t, resolveUrl: n }) => {
|
|
40441
40519
|
let r = V(n);
|
|
40442
40520
|
Hr(() => {
|
|
40443
40521
|
r.current = n;
|
|
40444
40522
|
}, [n]);
|
|
40445
|
-
let i = n !== void 0, a = Ur(() => i ? new
|
|
40523
|
+
let i = n !== void 0, a = Ur(() => i ? new h1(r) : null, [i]);
|
|
40446
40524
|
B(() => () => a?.clear(), [a]);
|
|
40447
40525
|
let o = Ur(() => ({
|
|
40448
40526
|
reducedMotion: t,
|
|
40449
40527
|
urlCache: a
|
|
40450
40528
|
}), [t, a]);
|
|
40451
|
-
return /* @__PURE__ */ U(
|
|
40529
|
+
return /* @__PURE__ */ U(g1.Provider, {
|
|
40452
40530
|
value: o,
|
|
40453
40531
|
children: e
|
|
40454
40532
|
});
|
|
40455
|
-
},
|
|
40533
|
+
}, v1 = () => zr(g1), y1 = /* @__PURE__ */ new Set(["blob:", "data:"]), b1 = /* @__PURE__ */ new Set(["http:", "https:"]), x1 = 52428800, S1 = (e) => {
|
|
40456
40534
|
try {
|
|
40457
40535
|
return new URL(e, window.location.href);
|
|
40458
40536
|
} catch {
|
|
40459
40537
|
return null;
|
|
40460
40538
|
}
|
|
40461
|
-
},
|
|
40539
|
+
}, C1 = (e) => {
|
|
40462
40540
|
let t = e.headers.get("content-length");
|
|
40463
|
-
return t !== null && /^\d+$/.test(t.trim()) && Number(t) >
|
|
40464
|
-
},
|
|
40465
|
-
if (
|
|
40541
|
+
return t !== null && /^\d+$/.test(t.trim()) && Number(t) > x1;
|
|
40542
|
+
}, w1 = async (e) => {
|
|
40543
|
+
if (C1(e)) return null;
|
|
40466
40544
|
let t = e.headers.get("content-type") ?? "";
|
|
40467
40545
|
if (!e.body) return new Blob([], { type: t });
|
|
40468
40546
|
let n = e.body.getReader(), r = [], i = 0;
|
|
@@ -40470,7 +40548,7 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40470
40548
|
for (;;) {
|
|
40471
40549
|
let { done: e, value: t } = await n.read();
|
|
40472
40550
|
if (e) break;
|
|
40473
|
-
if (i += t.byteLength, i >
|
|
40551
|
+
if (i += t.byteLength, i > x1) return await n.cancel(), null;
|
|
40474
40552
|
let a = new Uint8Array(t.byteLength);
|
|
40475
40553
|
a.set(t), r.push(a.buffer);
|
|
40476
40554
|
}
|
|
@@ -40478,22 +40556,22 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40478
40556
|
n.releaseLock();
|
|
40479
40557
|
}
|
|
40480
40558
|
return new Blob(r, { type: t });
|
|
40481
|
-
},
|
|
40559
|
+
}, T1 = (e, t, n = void 0) => {
|
|
40482
40560
|
let r = document.createElement("a");
|
|
40483
40561
|
r.href = e, r.download = t, r.rel = "noreferrer", n && (r.target = n), document.body.appendChild(r), r.click(), r.remove();
|
|
40484
|
-
},
|
|
40562
|
+
}, E1 = (e, t) => {
|
|
40485
40563
|
let n = URL.createObjectURL(e);
|
|
40486
|
-
|
|
40487
|
-
},
|
|
40488
|
-
let n =
|
|
40564
|
+
T1(n, t), setTimeout(() => URL.revokeObjectURL(n), 0);
|
|
40565
|
+
}, D1 = async (e, t) => {
|
|
40566
|
+
let n = S1(e);
|
|
40489
40567
|
if (!n) return;
|
|
40490
|
-
if (
|
|
40491
|
-
|
|
40568
|
+
if (y1.has(n.protocol)) {
|
|
40569
|
+
T1(n.href, t);
|
|
40492
40570
|
return;
|
|
40493
40571
|
}
|
|
40494
|
-
if (!
|
|
40572
|
+
if (!b1.has(n.protocol)) return;
|
|
40495
40573
|
if (n.origin === window.location.origin) {
|
|
40496
|
-
|
|
40574
|
+
T1(n.href, t);
|
|
40497
40575
|
return;
|
|
40498
40576
|
}
|
|
40499
40577
|
let r = new AbortController(), i = null;
|
|
@@ -40502,20 +40580,20 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40502
40580
|
credentials: "omit",
|
|
40503
40581
|
signal: r.signal
|
|
40504
40582
|
});
|
|
40505
|
-
e.ok && (i = await
|
|
40583
|
+
e.ok && (i = await w1(e)), i || r.abort();
|
|
40506
40584
|
} catch {
|
|
40507
40585
|
i = null;
|
|
40508
40586
|
}
|
|
40509
|
-
i ?
|
|
40510
|
-
},
|
|
40587
|
+
i ? E1(i, t) : T1(n.href, t, "_blank");
|
|
40588
|
+
}, O1 = () => () => {}, k1 = {
|
|
40511
40589
|
status: "loading",
|
|
40512
40590
|
url: void 0
|
|
40513
|
-
},
|
|
40514
|
-
let { urlCache: n } =
|
|
40591
|
+
}, A1 = (e, { enabled: t = !0 } = {}) => {
|
|
40592
|
+
let { urlCache: n } = v1(), r = !n || !e || m1(e), i = !r && t, a = z((t) => i && n && e ? n.subscribe(e, t) : O1(), [
|
|
40515
40593
|
i,
|
|
40516
40594
|
n,
|
|
40517
40595
|
e
|
|
40518
|
-
]), o = z(() => i && n && e ? n.getSnapshot(e) :
|
|
40596
|
+
]), o = z(() => i && n && e ? n.getSnapshot(e) : k1, [
|
|
40519
40597
|
i,
|
|
40520
40598
|
n,
|
|
40521
40599
|
e
|
|
@@ -40533,31 +40611,31 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40533
40611
|
status: "error",
|
|
40534
40612
|
url: void 0
|
|
40535
40613
|
} : s;
|
|
40536
|
-
},
|
|
40614
|
+
}, j1 = (e, t) => {
|
|
40537
40615
|
let n = V(t), r = V(!1);
|
|
40538
40616
|
Hr(() => {
|
|
40539
40617
|
n.current = t;
|
|
40540
40618
|
}), B(() => {
|
|
40541
40619
|
e === "error" ? r.current && n.current?.() : r.current = !0;
|
|
40542
40620
|
}, [e]);
|
|
40543
|
-
},
|
|
40544
|
-
let { urlCache: e } =
|
|
40621
|
+
}, M1 = () => {
|
|
40622
|
+
let { urlCache: e } = v1();
|
|
40545
40623
|
return z((t, n) => {
|
|
40546
|
-
!e ||
|
|
40624
|
+
!e || m1(t) ? D1(t, n) : e.resolveNow(t).then((e) => D1(e, n)).catch(() => void 0);
|
|
40547
40625
|
}, [e]);
|
|
40548
|
-
},
|
|
40549
|
-
let e =
|
|
40626
|
+
}, N1 = Pr(null), P1 = Pr(null), F1 = () => zr(N1), I1 = () => zr(P1), L1 = () => {
|
|
40627
|
+
let e = F1();
|
|
40550
40628
|
if (!e) throw Error("useAttachmentImagePreview must be used within an AttachmentPreviewProvider");
|
|
40551
40629
|
return e;
|
|
40552
|
-
},
|
|
40553
|
-
let e =
|
|
40630
|
+
}, R1 = () => {
|
|
40631
|
+
let e = I1();
|
|
40554
40632
|
if (!e) throw Error("useAttachmentDocumentPreview must be used within an AttachmentPreviewProvider");
|
|
40555
40633
|
return e;
|
|
40556
|
-
},
|
|
40634
|
+
}, z1 = Lr(() => import("./F0DocumentViewer-D2Ha0lRL.js").then((e) => ({ default: e.F0DocumentViewer }))), B1 = (e) => {
|
|
40557
40635
|
let t = e.lastIndexOf(".");
|
|
40558
40636
|
return `${t > 0 ? e.slice(0, t) : e}.pdf`;
|
|
40559
|
-
},
|
|
40560
|
-
let e = He(), { documentPreview: t, closeDocumentPreview: n } =
|
|
40637
|
+
}, V1 = () => {
|
|
40638
|
+
let e = He(), { documentPreview: t, closeDocumentPreview: n } = R1(), [r, i] = H(null);
|
|
40561
40639
|
B(() => i(document.body), []);
|
|
40562
40640
|
let a = t?.file, o = t?.kind;
|
|
40563
40641
|
return /* @__PURE__ */ U(DH, {
|
|
@@ -40586,7 +40664,7 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40586
40664
|
className: "pointer-events-none absolute inset-0 flex items-center justify-center px-4 pb-4 pt-4",
|
|
40587
40665
|
children: /* @__PURE__ */ U("div", {
|
|
40588
40666
|
className: "pointer-events-auto h-full w-full max-w-4xl overflow-hidden rounded-lg",
|
|
40589
|
-
children: /* @__PURE__ */ U(
|
|
40667
|
+
children: /* @__PURE__ */ U(H1, {
|
|
40590
40668
|
file: a,
|
|
40591
40669
|
kind: o,
|
|
40592
40670
|
onClose: n
|
|
@@ -40596,8 +40674,8 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40596
40674
|
]
|
|
40597
40675
|
}) : null
|
|
40598
40676
|
});
|
|
40599
|
-
},
|
|
40600
|
-
let r = He(), i =
|
|
40677
|
+
}, H1 = ({ file: e, kind: t, onClose: n }) => {
|
|
40678
|
+
let r = He(), i = M1(), a = !!e.previewUrl && t === "pdf", o = A1(a ? e.previewUrl : e.url);
|
|
40601
40679
|
if (o.status === "loading") return /* @__PURE__ */ U(Ie, { className: "h-full w-full" });
|
|
40602
40680
|
if (o.status === "error") return /* @__PURE__ */ U("div", {
|
|
40603
40681
|
className: "flex h-full w-full items-center justify-center bg-f1-background p-6 text-center text-f1-foreground-secondary",
|
|
@@ -40614,27 +40692,27 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40614
40692
|
}];
|
|
40615
40693
|
return /* @__PURE__ */ U(Mr, {
|
|
40616
40694
|
fallback: /* @__PURE__ */ U(Ie, { className: "h-full w-full" }),
|
|
40617
|
-
children: /* @__PURE__ */ U(
|
|
40695
|
+
children: /* @__PURE__ */ U(z1, {
|
|
40618
40696
|
url: o.url,
|
|
40619
40697
|
kind: t,
|
|
40620
|
-
filename: a ?
|
|
40698
|
+
filename: a ? B1(e.name) : e.name,
|
|
40621
40699
|
mimeType: a ? "application/pdf" : e.mimeType,
|
|
40622
40700
|
initialScale: "page-width",
|
|
40623
40701
|
withCredentials: !1,
|
|
40624
40702
|
actions: s
|
|
40625
40703
|
})
|
|
40626
40704
|
});
|
|
40627
|
-
},
|
|
40705
|
+
}, U1 = Tr.ease.outSwift, W1 = {
|
|
40628
40706
|
duration: .16,
|
|
40629
|
-
ease:
|
|
40630
|
-
},
|
|
40707
|
+
ease: U1
|
|
40708
|
+
}, G1 = {
|
|
40631
40709
|
duration: .12,
|
|
40632
40710
|
ease: "easeIn"
|
|
40633
|
-
},
|
|
40711
|
+
}, K1 = {
|
|
40634
40712
|
duration: .15,
|
|
40635
|
-
ease:
|
|
40636
|
-
},
|
|
40637
|
-
let { reducedMotion: a } =
|
|
40713
|
+
ease: U1
|
|
40714
|
+
}, q1 = ({ className: e, onLoad: t, onLoadedChange: n, eager: r = !1, ...i }) => {
|
|
40715
|
+
let { reducedMotion: a } = v1(), [o, s] = H(!1), c = () => {
|
|
40638
40716
|
s(!0), n?.(!0);
|
|
40639
40717
|
};
|
|
40640
40718
|
return /* @__PURE__ */ U("img", {
|
|
@@ -40649,7 +40727,7 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40649
40727
|
},
|
|
40650
40728
|
className: F(!a && "transition-opacity duration-200", o ? "opacity-100" : "opacity-0", e)
|
|
40651
40729
|
});
|
|
40652
|
-
},
|
|
40730
|
+
}, J1 = ({ icon: e, label: t, onClick: n }) => /* @__PURE__ */ U("span", {
|
|
40653
40731
|
className: "shadow-sm pointer-events-auto z-50 flex rounded bg-f1-background",
|
|
40654
40732
|
children: /* @__PURE__ */ U(Je, {
|
|
40655
40733
|
variant: "outline",
|
|
@@ -40658,10 +40736,10 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40658
40736
|
label: t,
|
|
40659
40737
|
onClick: n
|
|
40660
40738
|
})
|
|
40661
|
-
}),
|
|
40662
|
-
let t = He(), { reducedMotion: n } =
|
|
40739
|
+
}), Y1 = ({ onImageDownloaded: e }) => {
|
|
40740
|
+
let t = He(), { reducedMotion: n } = v1(), { imagePreview: r, closeImagePreview: i, setImagePreviewIndex: a } = L1(), o = M1(), [s, c] = H(null);
|
|
40663
40741
|
B(() => c(document.body), []);
|
|
40664
|
-
let l = r !== null, u = r?.images ?? [], d = u.length, f = r?.index ?? 0, p = u[f], m = d > 1, h =
|
|
40742
|
+
let l = r !== null, u = r?.images ?? [], d = u.length, f = r?.index ?? 0, p = u[f], m = d > 1, h = A1(p?.url), g = z((e) => {
|
|
40665
40743
|
d !== 0 && a((f + e + d) % d);
|
|
40666
40744
|
}, [
|
|
40667
40745
|
d,
|
|
@@ -40721,9 +40799,9 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40721
40799
|
},
|
|
40722
40800
|
transition: {
|
|
40723
40801
|
duration: .2,
|
|
40724
|
-
ease:
|
|
40802
|
+
ease: U1
|
|
40725
40803
|
},
|
|
40726
|
-
children: h.status === "ready" ? /* @__PURE__ */ U(
|
|
40804
|
+
children: h.status === "ready" ? /* @__PURE__ */ U(q1, {
|
|
40727
40805
|
src: h.url,
|
|
40728
40806
|
alt: p.name,
|
|
40729
40807
|
className: "max-h-full max-w-full rounded-lg object-contain"
|
|
@@ -40733,13 +40811,13 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40733
40811
|
}),
|
|
40734
40812
|
/* @__PURE__ */ W("div", {
|
|
40735
40813
|
className: "pointer-events-none absolute inset-x-0 top-0 flex justify-end gap-1.5 p-3",
|
|
40736
|
-
children: [/* @__PURE__ */ U(
|
|
40814
|
+
children: [/* @__PURE__ */ U(J1, {
|
|
40737
40815
|
icon: qa,
|
|
40738
40816
|
label: t.chat.download,
|
|
40739
40817
|
onClick: () => {
|
|
40740
40818
|
o(p.url, p.name), e?.();
|
|
40741
40819
|
}
|
|
40742
|
-
}), /* @__PURE__ */ U(
|
|
40820
|
+
}), /* @__PURE__ */ U(J1, {
|
|
40743
40821
|
icon: ft,
|
|
40744
40822
|
label: t.chat.closePreview,
|
|
40745
40823
|
onClick: i
|
|
@@ -40748,7 +40826,7 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40748
40826
|
m ? /* @__PURE__ */ W("div", {
|
|
40749
40827
|
className: "pointer-events-none absolute inset-x-0 bottom-0 flex items-center justify-center gap-2 p-3",
|
|
40750
40828
|
children: [
|
|
40751
|
-
/* @__PURE__ */ U(
|
|
40829
|
+
/* @__PURE__ */ U(J1, {
|
|
40752
40830
|
icon: un,
|
|
40753
40831
|
label: t.chat.previousImage,
|
|
40754
40832
|
onClick: () => g(-1)
|
|
@@ -40761,7 +40839,7 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40761
40839
|
d
|
|
40762
40840
|
]
|
|
40763
40841
|
}),
|
|
40764
|
-
/* @__PURE__ */ U(
|
|
40842
|
+
/* @__PURE__ */ U(J1, {
|
|
40765
40843
|
icon: Kt,
|
|
40766
40844
|
label: t.chat.nextImage,
|
|
40767
40845
|
onClick: () => g(1)
|
|
@@ -40771,13 +40849,13 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40771
40849
|
]
|
|
40772
40850
|
}) : null
|
|
40773
40851
|
});
|
|
40774
|
-
},
|
|
40852
|
+
}, X1 = /* @__PURE__ */ new Set([
|
|
40775
40853
|
"m4v",
|
|
40776
40854
|
"mov",
|
|
40777
40855
|
"mp4",
|
|
40778
40856
|
"ogv",
|
|
40779
40857
|
"webm"
|
|
40780
|
-
]),
|
|
40858
|
+
]), Z1 = (e) => {
|
|
40781
40859
|
if (e < 1024) return `${e} B`;
|
|
40782
40860
|
if (e < 1048576) {
|
|
40783
40861
|
let t = e / 1024;
|
|
@@ -40789,10 +40867,10 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40789
40867
|
}
|
|
40790
40868
|
let t = e / 1073741824;
|
|
40791
40869
|
return `${Number.isInteger(t) ? t : t.toFixed(1)} GB`;
|
|
40792
|
-
},
|
|
40870
|
+
}, Q1 = (e) => e.mimeType?.toLowerCase().startsWith("video/") ? !0 : [e.name, e.url].some((e) => {
|
|
40793
40871
|
let t = (e.split(/[?#]/, 1)[0] ?? "").split(".").at(-1)?.toLowerCase();
|
|
40794
|
-
return t !== void 0 &&
|
|
40795
|
-
}),
|
|
40872
|
+
return t !== void 0 && X1.has(t);
|
|
40873
|
+
}), $1 = [
|
|
40796
40874
|
["application/pdf", "pdf"],
|
|
40797
40875
|
["spreadsheetml", "sheet"],
|
|
40798
40876
|
["text/csv", "sheet"],
|
|
@@ -40800,7 +40878,7 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40800
40878
|
["text/markdown", "text"],
|
|
40801
40879
|
["text/plain", "text"],
|
|
40802
40880
|
["application/json", "text"]
|
|
40803
|
-
],
|
|
40881
|
+
], e0 = {
|
|
40804
40882
|
pdf: "pdf",
|
|
40805
40883
|
xlsx: "sheet",
|
|
40806
40884
|
csv: "sheet",
|
|
@@ -40810,20 +40888,20 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40810
40888
|
markdown: "text",
|
|
40811
40889
|
log: "text",
|
|
40812
40890
|
json: "text"
|
|
40813
|
-
},
|
|
40891
|
+
}, t0 = (e) => {
|
|
40814
40892
|
let t = e.mimeType?.toLowerCase() ?? "";
|
|
40815
|
-
for (let [e, n] of
|
|
40893
|
+
for (let [e, n] of $1) if (t.includes(e)) return n;
|
|
40816
40894
|
let n = e.name.toLowerCase(), r = n.lastIndexOf(".");
|
|
40817
|
-
return r <= 0 ? null :
|
|
40818
|
-
},
|
|
40895
|
+
return r <= 0 ? null : e0[n.slice(r + 1)] ?? null;
|
|
40896
|
+
}, n0 = {
|
|
40819
40897
|
pdf: Infinity,
|
|
40820
40898
|
sheet: 10485760,
|
|
40821
40899
|
docx: 10485760,
|
|
40822
40900
|
text: 2097152
|
|
40823
|
-
},
|
|
40901
|
+
}, r0 = (e, t) => (e.size ?? 0) <= n0[t], i0 = /^(application\/octet-stream|application\/vnd\.factorial\.)/i, a0 = (e) => {
|
|
40824
40902
|
let t = e?.trim();
|
|
40825
|
-
if (t && !
|
|
40826
|
-
},
|
|
40903
|
+
if (t && !i0.test(t)) return t;
|
|
40904
|
+
}, o0 = {
|
|
40827
40905
|
png: "image/png",
|
|
40828
40906
|
jpg: "image/jpeg",
|
|
40829
40907
|
jpeg: "image/jpeg",
|
|
@@ -40858,55 +40936,55 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40858
40936
|
mp3: "audio/mpeg",
|
|
40859
40937
|
m4a: "audio/mp4",
|
|
40860
40938
|
wav: "audio/wav"
|
|
40861
|
-
},
|
|
40939
|
+
}, s0 = (e) => {
|
|
40862
40940
|
if (!e) return;
|
|
40863
40941
|
let t = (e.split(/[?#]/, 1)[0] ?? "").split("/").at(-1) ?? "", n = t.lastIndexOf(".");
|
|
40864
40942
|
return n > 0 ? t.slice(n + 1).toLowerCase() : void 0;
|
|
40865
|
-
},
|
|
40943
|
+
}, c0 = (e) => {
|
|
40866
40944
|
let t = e.split("?")[1];
|
|
40867
40945
|
if (t) try {
|
|
40868
40946
|
return new URLSearchParams(t.split("#")[0]).get("path") ?? void 0;
|
|
40869
40947
|
} catch {
|
|
40870
40948
|
return;
|
|
40871
40949
|
}
|
|
40872
|
-
},
|
|
40950
|
+
}, l0 = (e) => {
|
|
40873
40951
|
let t = (e.split(/[?#]/, 1)[0] ?? "").split("/").filter(Boolean).at(-1) ?? "";
|
|
40874
40952
|
try {
|
|
40875
40953
|
return decodeURIComponent(t);
|
|
40876
40954
|
} catch {
|
|
40877
40955
|
return t;
|
|
40878
40956
|
}
|
|
40879
|
-
},
|
|
40880
|
-
let t =
|
|
40957
|
+
}, u0 = (e) => {
|
|
40958
|
+
let t = a0(e.mimeType);
|
|
40881
40959
|
if (t) return t;
|
|
40882
40960
|
for (let t of [
|
|
40883
40961
|
e.name,
|
|
40884
|
-
|
|
40962
|
+
c0(e.url),
|
|
40885
40963
|
e.url
|
|
40886
40964
|
]) {
|
|
40887
|
-
let e =
|
|
40888
|
-
if (e &&
|
|
40965
|
+
let e = s0(t);
|
|
40966
|
+
if (e && o0[e]) return o0[e];
|
|
40889
40967
|
}
|
|
40890
|
-
},
|
|
40891
|
-
let t =
|
|
40968
|
+
}, d0 = /^image\/(png|jpeg|gif|webp|avif|bmp|svg\+xml)$/, f0 = (e) => d0.test(u0(e) ?? ""), p0 = (e) => {
|
|
40969
|
+
let t = u0(e);
|
|
40892
40970
|
return t === e.mimeType ? e : {
|
|
40893
40971
|
...e,
|
|
40894
40972
|
mimeType: t
|
|
40895
40973
|
};
|
|
40896
|
-
},
|
|
40974
|
+
}, m0 = (e) => {
|
|
40897
40975
|
if (e.previewUrl) return {
|
|
40898
40976
|
kind: "pdf",
|
|
40899
40977
|
url: e.previewUrl
|
|
40900
40978
|
};
|
|
40901
|
-
let t =
|
|
40979
|
+
let t = t0({
|
|
40902
40980
|
name: e.name,
|
|
40903
|
-
mimeType:
|
|
40981
|
+
mimeType: u0(e)
|
|
40904
40982
|
});
|
|
40905
|
-
return !t || !
|
|
40983
|
+
return !t || !r0(e, t) ? null : {
|
|
40906
40984
|
kind: t,
|
|
40907
40985
|
url: e.url
|
|
40908
40986
|
};
|
|
40909
|
-
},
|
|
40987
|
+
}, h0 = (e) => {
|
|
40910
40988
|
let t = {
|
|
40911
40989
|
images: [],
|
|
40912
40990
|
videos: [],
|
|
@@ -40914,11 +40992,11 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40914
40992
|
files: []
|
|
40915
40993
|
};
|
|
40916
40994
|
for (let n of e) {
|
|
40917
|
-
let e =
|
|
40918
|
-
if (
|
|
40919
|
-
else if (
|
|
40995
|
+
let e = p0(n);
|
|
40996
|
+
if (f0(e)) t.images.push(n);
|
|
40997
|
+
else if (Q1(e)) t.videos.push(n);
|
|
40920
40998
|
else {
|
|
40921
|
-
let r =
|
|
40999
|
+
let r = m0(e);
|
|
40922
41000
|
r ? t.documents.push({
|
|
40923
41001
|
file: n,
|
|
40924
41002
|
kind: r.kind
|
|
@@ -40926,12 +41004,12 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40926
41004
|
}
|
|
40927
41005
|
}
|
|
40928
41006
|
return t;
|
|
40929
|
-
},
|
|
41007
|
+
}, g0 = (e) => ({
|
|
40930
41008
|
url: e.url,
|
|
40931
41009
|
name: e.name,
|
|
40932
41010
|
thumbnailUrl: e.thumbnailUrl,
|
|
40933
|
-
mimeType:
|
|
40934
|
-
}),
|
|
41011
|
+
mimeType: u0(e)
|
|
41012
|
+
}), _0 = ({ children: e, onImageDownloaded: t }) => {
|
|
40935
41013
|
let [n, r] = H(null), [i, a] = H(null), o = V(null), s = () => {
|
|
40936
41014
|
o.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
40937
41015
|
}, c = () => {
|
|
@@ -40950,7 +41028,7 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40950
41028
|
...t,
|
|
40951
41029
|
index: e
|
|
40952
41030
|
}), []), f = z((e) => {
|
|
40953
|
-
let t =
|
|
41031
|
+
let t = m0(e);
|
|
40954
41032
|
t && (s(), a({
|
|
40955
41033
|
file: e,
|
|
40956
41034
|
kind: t.kind
|
|
@@ -40976,63 +41054,63 @@ var M$ = Ue("F0FileItem", be(j$)), N$ = M$, P$ = 2, F$ = 70, I$ = .08, L$ = 6, R
|
|
|
40976
41054
|
f,
|
|
40977
41055
|
p
|
|
40978
41056
|
]);
|
|
40979
|
-
return /* @__PURE__ */ U(
|
|
41057
|
+
return /* @__PURE__ */ U(N1.Provider, {
|
|
40980
41058
|
value: m,
|
|
40981
|
-
children: /* @__PURE__ */ W(
|
|
41059
|
+
children: /* @__PURE__ */ W(P1.Provider, {
|
|
40982
41060
|
value: h,
|
|
40983
41061
|
children: [
|
|
40984
41062
|
e,
|
|
40985
|
-
/* @__PURE__ */ U(
|
|
40986
|
-
/* @__PURE__ */ U(
|
|
41063
|
+
/* @__PURE__ */ U(Y1, { onImageDownloaded: t }),
|
|
41064
|
+
/* @__PURE__ */ U(V1, {})
|
|
40987
41065
|
]
|
|
40988
41066
|
})
|
|
40989
41067
|
});
|
|
40990
|
-
},
|
|
41068
|
+
}, v0 = Pr({
|
|
40991
41069
|
remotePreviews: !1,
|
|
40992
41070
|
provided: !1
|
|
40993
|
-
}),
|
|
41071
|
+
}), y0 = () => zr(v0), b0 = ({ filePreviews: e, children: t }) => {
|
|
40994
41072
|
let n = O(), r = !!(e?.resolveUrl || e?.directUrls);
|
|
40995
|
-
return /* @__PURE__ */ U(
|
|
40996
|
-
value: r ?
|
|
40997
|
-
children: /* @__PURE__ */ U(
|
|
41073
|
+
return /* @__PURE__ */ U(v0.Provider, {
|
|
41074
|
+
value: r ? x0 : S0,
|
|
41075
|
+
children: /* @__PURE__ */ U(_1, {
|
|
40998
41076
|
reducedMotion: n,
|
|
40999
41077
|
resolveUrl: e?.resolveUrl,
|
|
41000
|
-
children: /* @__PURE__ */ U(
|
|
41078
|
+
children: /* @__PURE__ */ U(_0, { children: t })
|
|
41001
41079
|
})
|
|
41002
41080
|
});
|
|
41003
|
-
},
|
|
41081
|
+
}, x0 = {
|
|
41004
41082
|
remotePreviews: !0,
|
|
41005
41083
|
provided: !0
|
|
41006
|
-
},
|
|
41084
|
+
}, S0 = {
|
|
41007
41085
|
remotePreviews: !1,
|
|
41008
41086
|
provided: !0
|
|
41009
|
-
},
|
|
41087
|
+
}, C0 = Dr.min, w0 = Dr.max, T0 = Dr.default, { min: E0, max: D0, default: O0, mainMin: k0, mainHardMin: A0, splitMinFrame: j0 } = Dr, M0 = j0, N0 = (e) => {
|
|
41010
41088
|
if (!Number.isFinite(e) || e <= 0) return {
|
|
41011
|
-
min:
|
|
41012
|
-
max:
|
|
41013
|
-
autoMax:
|
|
41089
|
+
min: E0,
|
|
41090
|
+
max: D0,
|
|
41091
|
+
autoMax: D0,
|
|
41014
41092
|
shouldOverlay: !1
|
|
41015
41093
|
};
|
|
41016
|
-
if (e <
|
|
41017
|
-
min:
|
|
41018
|
-
max:
|
|
41019
|
-
autoMax:
|
|
41094
|
+
if (e < M0) return {
|
|
41095
|
+
min: E0,
|
|
41096
|
+
max: D0,
|
|
41097
|
+
autoMax: D0,
|
|
41020
41098
|
shouldOverlay: !0
|
|
41021
41099
|
};
|
|
41022
|
-
let t = Math.min(
|
|
41100
|
+
let t = Math.min(D0, Math.max(e - k0, E0));
|
|
41023
41101
|
return {
|
|
41024
|
-
min:
|
|
41025
|
-
max: Math.min(
|
|
41102
|
+
min: E0,
|
|
41103
|
+
max: Math.min(D0, Math.max(e - A0, E0)),
|
|
41026
41104
|
autoMax: t,
|
|
41027
41105
|
shouldOverlay: !1
|
|
41028
41106
|
};
|
|
41029
|
-
},
|
|
41030
|
-
let { min: n, max: r, autoMax: i } =
|
|
41031
|
-
return Math.max(n, Math.min(e ===
|
|
41032
|
-
},
|
|
41107
|
+
}, P0 = (e, t) => {
|
|
41108
|
+
let { min: n, max: r, autoMax: i } = N0(t);
|
|
41109
|
+
return Math.max(n, Math.min(e === O0 ? i : r, e));
|
|
41110
|
+
}, F0 = "f0-side-panel-width", I0 = "f0-side-panel-open", L0 = "f0-side-panel-layout", R0 = "f0-side-panel-view-id", z0 = ["ONE-ai-chat-width"], B0 = ["ONE-ai-chat-open"], V0 = ["ONE-ai-chat-visualization-mode"], H0 = ["ONE-ai-chat-panel-content-id"];
|
|
41033
41111
|
//#endregion
|
|
41034
41112
|
//#region src/elements/lib/local-storage.ts
|
|
41035
|
-
function
|
|
41113
|
+
function U0(e, t) {
|
|
41036
41114
|
try {
|
|
41037
41115
|
let n = localStorage.getItem(e);
|
|
41038
41116
|
return n === null ? t : JSON.parse(n);
|
|
@@ -41040,18 +41118,18 @@ function C0(e, t) {
|
|
|
41040
41118
|
return t;
|
|
41041
41119
|
}
|
|
41042
41120
|
}
|
|
41043
|
-
function
|
|
41121
|
+
function W0(e, t) {
|
|
41044
41122
|
try {
|
|
41045
41123
|
localStorage.setItem(e, JSON.stringify(t));
|
|
41046
41124
|
} catch {}
|
|
41047
41125
|
}
|
|
41048
41126
|
//#endregion
|
|
41049
41127
|
//#region src/elements/lib/persisted-state.ts
|
|
41050
|
-
function
|
|
41128
|
+
function G0({ key: e, legacyKeys: t, fallback: n, validate: r, shouldWrite: i, debounceMs: a = 0 }) {
|
|
41051
41129
|
let [o, s] = H(() => {
|
|
41052
41130
|
if (typeof window > "u") return n;
|
|
41053
41131
|
for (let n of [e, ...t ?? []]) {
|
|
41054
|
-
let e =
|
|
41132
|
+
let e = U0(n, null);
|
|
41055
41133
|
if (e !== null && (!r || r(e))) return e;
|
|
41056
41134
|
}
|
|
41057
41135
|
return n;
|
|
@@ -41059,10 +41137,10 @@ function T0({ key: e, legacyKeys: t, fallback: n, validate: r, shouldWrite: i, d
|
|
|
41059
41137
|
return B(() => {
|
|
41060
41138
|
if (typeof window > "u" || i && !i(o)) return;
|
|
41061
41139
|
if (a <= 0) {
|
|
41062
|
-
|
|
41140
|
+
W0(e, o);
|
|
41063
41141
|
return;
|
|
41064
41142
|
}
|
|
41065
|
-
let t = window.setTimeout(() =>
|
|
41143
|
+
let t = window.setTimeout(() => W0(e, o), a);
|
|
41066
41144
|
return () => window.clearTimeout(t);
|
|
41067
41145
|
}, [
|
|
41068
41146
|
e,
|
|
@@ -41073,25 +41151,25 @@ function T0({ key: e, legacyKeys: t, fallback: n, validate: r, shouldWrite: i, d
|
|
|
41073
41151
|
}
|
|
41074
41152
|
//#endregion
|
|
41075
41153
|
//#region src/blocks/ApplicationFrame/SidePanel/SidePanelProvider.tsx
|
|
41076
|
-
var
|
|
41077
|
-
let o = t.some((e) => e.available !== !1), s = t.some((e) => e.available !== !1 && e.restoresContent), [c, l] =
|
|
41078
|
-
key:
|
|
41079
|
-
legacyKeys:
|
|
41080
|
-
fallback:
|
|
41081
|
-
validate: (e) => typeof e == "number" && !isNaN(e) && e >=
|
|
41154
|
+
var K0 = Pr(null), { min: q0, max: J0 } = Dr, Y0 = 5e3, X0 = () => {}, Z0 = [], Q0 = ({ children: e, views: t = Z0, side: n = "right", contentSide: r, resizable: i = !1, defaultLayout: a = "sidepanel" }) => {
|
|
41155
|
+
let o = t.some((e) => e.available !== !1), s = t.some((e) => e.available !== !1 && e.restoresContent), [c, l] = G0({
|
|
41156
|
+
key: F0,
|
|
41157
|
+
legacyKeys: z0,
|
|
41158
|
+
fallback: T0,
|
|
41159
|
+
validate: (e) => typeof e == "number" && !isNaN(e) && e >= q0 && e <= J0,
|
|
41082
41160
|
debounceMs: 150
|
|
41083
41161
|
}), [u, d] = H(!1), [f, p] = H(0), m = Ur(function() {
|
|
41084
|
-
return
|
|
41162
|
+
return N0(f);
|
|
41085
41163
|
}, [f]), h = Ur(function() {
|
|
41086
|
-
return
|
|
41087
|
-
}, [c, f]), g = E("(pointer: coarse)", { initializeWithValue: !0 }), _ = E(`(max-width: ${Er.md}px)`, { initializeWithValue: !0 }), v = g && _ || m.shouldOverlay, [y, b] = H(null), x = o || y !== null, [S, C] =
|
|
41088
|
-
key:
|
|
41089
|
-
legacyKeys:
|
|
41164
|
+
return P0(c, f);
|
|
41165
|
+
}, [c, f]), g = E("(pointer: coarse)", { initializeWithValue: !0 }), _ = E(`(max-width: ${Er.md}px)`, { initializeWithValue: !0 }), v = g && _ || m.shouldOverlay, [y, b] = H(null), x = o || y !== null, [S, C] = G0({
|
|
41166
|
+
key: I0,
|
|
41167
|
+
legacyKeys: B0,
|
|
41090
41168
|
fallback: a === "fullscreen",
|
|
41091
41169
|
validate: (e) => typeof e == "boolean"
|
|
41092
|
-
}), w = S && x, [T, D] =
|
|
41093
|
-
key:
|
|
41094
|
-
legacyKeys:
|
|
41170
|
+
}), w = S && x, [T, D] = G0({
|
|
41171
|
+
key: L0,
|
|
41172
|
+
legacyKeys: V0,
|
|
41095
41173
|
fallback: a,
|
|
41096
41174
|
validate: (e) => e === "sidepanel" || e === "fullscreen"
|
|
41097
41175
|
}), O = z(function(e) {
|
|
@@ -41099,9 +41177,9 @@ var E0 = Pr(null), { min: D0, max: O0 } = Dr, k0 = 5e3, A0 = () => {}, j0 = [],
|
|
|
41099
41177
|
let n = typeof e == "function" ? e(t) : e;
|
|
41100
41178
|
return n === "fullscreen" && C(!0), n;
|
|
41101
41179
|
});
|
|
41102
|
-
}, [D, C]), [k, A] = H(() => T !== "fullscreen"), [j, M] =
|
|
41103
|
-
key:
|
|
41104
|
-
legacyKeys:
|
|
41180
|
+
}, [D, C]), [k, A] = H(() => T !== "fullscreen"), [j, M] = G0({
|
|
41181
|
+
key: R0,
|
|
41182
|
+
legacyKeys: H0,
|
|
41105
41183
|
fallback: null,
|
|
41106
41184
|
validate: (e) => e === null || typeof e == "string"
|
|
41107
41185
|
}), [N, ee] = H(() => w && s ? j : null), [te, ne] = H({
|
|
@@ -41117,7 +41195,7 @@ var E0 = Pr(null), { min: D0, max: O0 } = Dr, k0 = 5e3, A0 = () => {}, j0 = [],
|
|
|
41117
41195
|
}, []), ae = z(function() {
|
|
41118
41196
|
return ee(null);
|
|
41119
41197
|
}, []), oe = z(function() {
|
|
41120
|
-
return l(
|
|
41198
|
+
return l(T0);
|
|
41121
41199
|
}, [l]);
|
|
41122
41200
|
B(function() {
|
|
41123
41201
|
N || M(y?.id ?? null);
|
|
@@ -41131,7 +41209,7 @@ var E0 = Pr(null), { min: D0, max: O0 } = Dr, k0 = 5e3, A0 = () => {}, j0 = [],
|
|
|
41131
41209
|
if (!N) return;
|
|
41132
41210
|
let e = setTimeout(() => {
|
|
41133
41211
|
process.env.NODE_ENV !== "production" && console.warn(`[f0] Side panel restore for "${N}" timed out: no view answered it with present() or cancelRestore().`), ee(null);
|
|
41134
|
-
},
|
|
41212
|
+
}, Y0);
|
|
41135
41213
|
return () => clearTimeout(e);
|
|
41136
41214
|
}, [N]), B(function() {
|
|
41137
41215
|
if (!w) {
|
|
@@ -41197,47 +41275,47 @@ var E0 = Pr(null), { min: D0, max: O0 } = Dr, k0 = 5e3, A0 = () => {}, j0 = [],
|
|
|
41197
41275
|
i,
|
|
41198
41276
|
k
|
|
41199
41277
|
]);
|
|
41200
|
-
return /* @__PURE__ */ U(
|
|
41278
|
+
return /* @__PURE__ */ U(K0.Provider, {
|
|
41201
41279
|
value: fe,
|
|
41202
41280
|
children: e
|
|
41203
41281
|
});
|
|
41204
|
-
},
|
|
41282
|
+
}, $0 = Object.freeze({
|
|
41205
41283
|
hasAvailableView: !1,
|
|
41206
41284
|
open: !1,
|
|
41207
|
-
setOpen:
|
|
41285
|
+
setOpen: X0,
|
|
41208
41286
|
layout: "sidepanel",
|
|
41209
|
-
setLayout:
|
|
41287
|
+
setLayout: X0,
|
|
41210
41288
|
side: "right",
|
|
41211
|
-
setSide:
|
|
41289
|
+
setSide: X0,
|
|
41212
41290
|
contentSide: "right",
|
|
41213
|
-
setContentSide:
|
|
41291
|
+
setContentSide: X0,
|
|
41214
41292
|
activeContent: null,
|
|
41215
|
-
present:
|
|
41216
|
-
clear:
|
|
41293
|
+
present: X0,
|
|
41294
|
+
clear: X0,
|
|
41217
41295
|
restoringViewId: null,
|
|
41218
|
-
cancelRestore:
|
|
41219
|
-
width:
|
|
41220
|
-
setWidth:
|
|
41221
|
-
resetWidth:
|
|
41222
|
-
effectiveWidth:
|
|
41223
|
-
widthBounds:
|
|
41296
|
+
cancelRestore: X0,
|
|
41297
|
+
width: T0,
|
|
41298
|
+
setWidth: X0,
|
|
41299
|
+
resetWidth: X0,
|
|
41300
|
+
effectiveWidth: T0,
|
|
41301
|
+
widthBounds: N0(0),
|
|
41224
41302
|
panelOverlays: !1,
|
|
41225
|
-
setFrameWidth:
|
|
41303
|
+
setFrameWidth: X0,
|
|
41226
41304
|
isResizing: !1,
|
|
41227
|
-
setIsResizing:
|
|
41305
|
+
setIsResizing: X0,
|
|
41228
41306
|
resizable: !1,
|
|
41229
41307
|
shouldPlayEntranceAnimation: !0,
|
|
41230
|
-
setShouldPlayEntranceAnimation:
|
|
41308
|
+
setShouldPlayEntranceAnimation: X0
|
|
41231
41309
|
});
|
|
41232
|
-
function
|
|
41233
|
-
return zr(
|
|
41310
|
+
function e2() {
|
|
41311
|
+
return zr(K0) ?? $0;
|
|
41234
41312
|
}
|
|
41235
|
-
function
|
|
41236
|
-
return zr(
|
|
41313
|
+
function t2() {
|
|
41314
|
+
return zr(K0) !== null;
|
|
41237
41315
|
}
|
|
41238
41316
|
//#endregion
|
|
41239
41317
|
//#region src/blocks/ApplicationFrame/SidePanel/SidePanelResizeHandle.tsx
|
|
41240
|
-
var
|
|
41318
|
+
var n2 = 16, r2 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, flushInnerSeam: i, side: a = "right", value: o, minValue: s, maxValue: c }) => {
|
|
41241
41319
|
let l = V(0), u = V(0), d = V(null), f = He(), p = z((e) => {
|
|
41242
41320
|
e.preventDefault(), l.current = e.clientX, r(!0);
|
|
41243
41321
|
}, [r]), m = z(() => {
|
|
@@ -41268,10 +41346,10 @@ var I0 = 16, L0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41268
41346
|
let r;
|
|
41269
41347
|
switch (n.key) {
|
|
41270
41348
|
case "ArrowLeft":
|
|
41271
|
-
r = a === "left" ? -16 :
|
|
41349
|
+
r = a === "left" ? -16 : n2;
|
|
41272
41350
|
break;
|
|
41273
41351
|
case "ArrowRight":
|
|
41274
|
-
r = a === "left" ?
|
|
41352
|
+
r = a === "left" ? n2 : -16;
|
|
41275
41353
|
break;
|
|
41276
41354
|
case "Home":
|
|
41277
41355
|
r = s - o;
|
|
@@ -41317,20 +41395,20 @@ var I0 = 16, L0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41317
41395
|
})]
|
|
41318
41396
|
})
|
|
41319
41397
|
});
|
|
41320
|
-
}, { duration:
|
|
41398
|
+
}, { duration: i2, ease: a2 } = Tr, o2 = { leaving: ({ exitStyle: e, closedClipPath: t, reducedMotion: n }) => n ? {
|
|
41321
41399
|
opacity: 0,
|
|
41322
41400
|
transition: { duration: 0 }
|
|
41323
41401
|
} : e === "hold" ? {
|
|
41324
41402
|
opacity: 0,
|
|
41325
41403
|
transition: {
|
|
41326
|
-
delay:
|
|
41404
|
+
delay: i2.base,
|
|
41327
41405
|
duration: 0
|
|
41328
41406
|
}
|
|
41329
41407
|
} : {
|
|
41330
41408
|
opacity: 0,
|
|
41331
41409
|
clipPath: t
|
|
41332
|
-
} },
|
|
41333
|
-
let { open: c, layout: l, shouldPlayEntranceAnimation: u, setShouldPlayEntranceAnimation: d, resizable: f, width: p, effectiveWidth: m, setWidth: h, resetWidth: g, widthBounds: _, panelOverlays: v, setIsResizing: y, side: b } =
|
|
41410
|
+
} }, s2 = ({ children: e, visible: t, side: n, exitStyle: r = "shrink", flushInnerSeam: i = !1, surfaceProps: a, surfaceRef: o, decorations: s }) => {
|
|
41411
|
+
let { open: c, layout: l, shouldPlayEntranceAnimation: u, setShouldPlayEntranceAnimation: d, resizable: f, width: p, effectiveWidth: m, setWidth: h, resetWidth: g, widthBounds: _, panelOverlays: v, setIsResizing: y, side: b } = e2(), x = t ?? c, S = O(), C = (n ?? b) === "left", w = V(!1);
|
|
41334
41412
|
B(() => {
|
|
41335
41413
|
w.current = c;
|
|
41336
41414
|
});
|
|
@@ -41339,8 +41417,8 @@ var I0 = 16, L0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41339
41417
|
if (E) return y(!0), () => y(!1);
|
|
41340
41418
|
}, [E, y]);
|
|
41341
41419
|
let { min: k, max: A } = _ ?? {
|
|
41342
|
-
min:
|
|
41343
|
-
max:
|
|
41420
|
+
min: C0,
|
|
41421
|
+
max: w0
|
|
41344
41422
|
}, j = f && !T && !(v ?? !1) && A > k, M = Math.max(k, Math.min(A, m ?? p)), N = z((e) => {
|
|
41345
41423
|
h((t) => {
|
|
41346
41424
|
let n = t + e;
|
|
@@ -41351,8 +41429,8 @@ var I0 = 16, L0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41351
41429
|
k,
|
|
41352
41430
|
A
|
|
41353
41431
|
]), ee = Ur(() => E || S ? { duration: 0 } : {
|
|
41354
|
-
duration:
|
|
41355
|
-
ease:
|
|
41432
|
+
duration: i2.base,
|
|
41433
|
+
ease: a2.outSwift
|
|
41356
41434
|
}, [E, S]), te = C ? "inset(0 100% 0 0)" : "inset(0 0 0 100%)", ne = {
|
|
41357
41435
|
exitStyle: r,
|
|
41358
41436
|
closedClipPath: te,
|
|
@@ -41361,7 +41439,7 @@ var I0 = 16, L0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41361
41439
|
return /* @__PURE__ */ U(ge, {
|
|
41362
41440
|
custom: ne,
|
|
41363
41441
|
children: x ? /* @__PURE__ */ W(De.div, {
|
|
41364
|
-
variants:
|
|
41442
|
+
variants: o2,
|
|
41365
41443
|
className: F("bg-f1-transparent pointer-events-auto relative flex h-full dark:bg-f1-background xs:py-1", T ? "xs:pr-1" : C ? "mr-auto" : "ml-auto xs:pr-1"),
|
|
41366
41444
|
initial: re ? {
|
|
41367
41445
|
opacity: 0,
|
|
@@ -41381,7 +41459,7 @@ var I0 = 16, L0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41381
41459
|
u && d(!1);
|
|
41382
41460
|
},
|
|
41383
41461
|
children: [
|
|
41384
|
-
j && !C ? /* @__PURE__ */ U(
|
|
41462
|
+
j && !C ? /* @__PURE__ */ U(r2, {
|
|
41385
41463
|
onResize: N,
|
|
41386
41464
|
onReset: g,
|
|
41387
41465
|
isResizing: E,
|
|
@@ -41402,7 +41480,7 @@ var I0 = 16, L0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41402
41480
|
children: e
|
|
41403
41481
|
}), s]
|
|
41404
41482
|
}),
|
|
41405
|
-
j && C ? /* @__PURE__ */ U(
|
|
41483
|
+
j && C ? /* @__PURE__ */ U(r2, {
|
|
41406
41484
|
onResize: N,
|
|
41407
41485
|
onReset: g,
|
|
41408
41486
|
isResizing: E,
|
|
@@ -41416,18 +41494,18 @@ var I0 = 16, L0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41416
41494
|
]
|
|
41417
41495
|
}, "chat-wrapper") : null
|
|
41418
41496
|
});
|
|
41419
|
-
},
|
|
41497
|
+
}, c2 = (e, { preferText: t = !1 } = {}) => {
|
|
41420
41498
|
let n = Array.from(e.files ?? []);
|
|
41421
41499
|
return n.length === 0 || t && e.getData("text/plain").trim() !== "" && n.every((e) => e.type.startsWith("image/")) ? [] : n;
|
|
41422
|
-
},
|
|
41500
|
+
}, l2 = ({ enabled: e, onFiles: t, preferText: n = !1 }) => z((r) => {
|
|
41423
41501
|
if (!e) return;
|
|
41424
|
-
let i =
|
|
41502
|
+
let i = c2(r.clipboardData, { preferText: n });
|
|
41425
41503
|
i.length !== 0 && (r.preventDefault(), t(i));
|
|
41426
41504
|
}, [
|
|
41427
41505
|
e,
|
|
41428
41506
|
t,
|
|
41429
41507
|
n
|
|
41430
|
-
]),
|
|
41508
|
+
]), u2 = "text-base leading-5 max-sm:text-[16px] [@media(pointer:coarse)]:text-[16px]", d2 = `whitespace-pre-wrap break-words p-3 ${u2}`, f2 = "min-h-[44px] max-h-[140px]", p2 = ({ placeholders: e, defaultPlaceholder: t, inputValue: n, inProgress: r }) => {
|
|
41431
41509
|
let i = O(), [a, o] = H(""), [s, c] = H(0), [l, u] = H(!1), d = V(null), f = V(null), p = V(null), m = e[s] ?? t;
|
|
41432
41510
|
return B(() => {
|
|
41433
41511
|
let t = () => {
|
|
@@ -41469,7 +41547,7 @@ var I0 = 16, L0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41469
41547
|
animate: { opacity: 1 },
|
|
41470
41548
|
exit: { opacity: 0 },
|
|
41471
41549
|
transition: { duration: i ? 0 : .4 },
|
|
41472
|
-
className: F("col-start-1 row-start-1", "pointer-events-none", "text-f1-foreground-secondary",
|
|
41550
|
+
className: F("col-start-1 row-start-1", "pointer-events-none", "text-f1-foreground-secondary", u2, "font-normal", "p-3"),
|
|
41473
41551
|
children: /* @__PURE__ */ W("div", {
|
|
41474
41552
|
"data-a11y-color-contrast-ignore": !0,
|
|
41475
41553
|
className: F("overflow-hidden text-ellipsis whitespace-nowrap", "whitespace-pre-wrap break-words overflow-visible"),
|
|
@@ -41479,20 +41557,20 @@ var I0 = 16, L0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41479
41557
|
}) : null]
|
|
41480
41558
|
})
|
|
41481
41559
|
}) });
|
|
41482
|
-
},
|
|
41560
|
+
}, m2 = ({ textareaRef: e, highlightRef: t, value: n, placeholder: r, ariaLabel: i, role: a, name: o, onChange: s, onKeyDown: c, onPaste: l, onFocus: u, onBlur: d, onCursorUpdate: f, onScroll: p, highlightSegments: m, hasOverlay: h, isAutocompleteOpen: g = !1, autocompleteListboxId: _, activeAutocompleteOptionId: v, isInvalid: y, errorMessageId: b, className: x }) => {
|
|
41483
41561
|
let S = r.mode === "overlay" ? r.texts : [], C = S.length > 1, w = r.mode === "overlay" && !C && n.length === 0 ? S[0] ?? r.fallback : null;
|
|
41484
41562
|
return /* @__PURE__ */ W("div", {
|
|
41485
41563
|
className: F("grid grid-cols-1 grid-rows-1", x),
|
|
41486
41564
|
children: [
|
|
41487
41565
|
/* @__PURE__ */ U("div", {
|
|
41488
41566
|
"aria-hidden": !0,
|
|
41489
|
-
className: F("col-start-1 row-start-1", "pointer-events-none invisible",
|
|
41567
|
+
className: F("col-start-1 row-start-1", "pointer-events-none invisible", d2, f2),
|
|
41490
41568
|
children: n.endsWith("\n") ? n + "_" : n || " "
|
|
41491
41569
|
}),
|
|
41492
41570
|
h ? /* @__PURE__ */ U("div", {
|
|
41493
41571
|
ref: t,
|
|
41494
41572
|
"aria-hidden": !0,
|
|
41495
|
-
className: F("col-start-1 row-start-1", "pointer-events-none text-f1-foreground",
|
|
41573
|
+
className: F("col-start-1 row-start-1", "pointer-events-none text-f1-foreground", d2, f2, "overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"),
|
|
41496
41574
|
children: m.map((e, t) => e.type === "mention" ? /* @__PURE__ */ U("span", {
|
|
41497
41575
|
className: "text-f1-foreground-secondary",
|
|
41498
41576
|
children: e.text
|
|
@@ -41503,7 +41581,7 @@ var I0 = 16, L0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41503
41581
|
}) : null,
|
|
41504
41582
|
w === null ? null : /* @__PURE__ */ U("p", {
|
|
41505
41583
|
"aria-hidden": !0,
|
|
41506
|
-
className: F("col-start-1 row-start-1", "pointer-events-none text-f1-foreground-secondary",
|
|
41584
|
+
className: F("col-start-1 row-start-1", "pointer-events-none text-f1-foreground-secondary", d2, "overflow-hidden text-ellipsis whitespace-nowrap"),
|
|
41507
41585
|
children: w
|
|
41508
41586
|
}),
|
|
41509
41587
|
/* @__PURE__ */ U("textarea", {
|
|
@@ -41529,9 +41607,9 @@ var I0 = 16, L0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41529
41607
|
"aria-activedescendant": v,
|
|
41530
41608
|
"aria-invalid": y || void 0,
|
|
41531
41609
|
"aria-describedby": y ? b : void 0,
|
|
41532
|
-
className: F("col-start-1 row-start-1", "w-full resize-none bg-transparent outline-none", "placeholder:text-f1-foreground-secondary",
|
|
41610
|
+
className: F("col-start-1 row-start-1", "w-full resize-none bg-transparent outline-none", "placeholder:text-f1-foreground-secondary", d2, f2, "overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", h ? "text-transparent caret-f1-foreground" : "text-f1-foreground", !h && C && n.length === 0 && "caret-transparent")
|
|
41533
41611
|
}),
|
|
41534
|
-
C && r.mode === "overlay" ? /* @__PURE__ */ U(
|
|
41612
|
+
C && r.mode === "overlay" ? /* @__PURE__ */ U(p2, {
|
|
41535
41613
|
placeholders: S,
|
|
41536
41614
|
defaultPlaceholder: r.fallback,
|
|
41537
41615
|
inputValue: n,
|
|
@@ -41539,8 +41617,8 @@ var I0 = 16, L0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41539
41617
|
}) : null
|
|
41540
41618
|
]
|
|
41541
41619
|
});
|
|
41542
|
-
},
|
|
41543
|
-
function
|
|
41620
|
+
}, h2 = 4e3;
|
|
41621
|
+
function g2(e = h2) {
|
|
41544
41622
|
let [t, n] = H(null), r = V(null), i = z(() => {
|
|
41545
41623
|
r.current && clearTimeout(r.current), r.current = null, n(null);
|
|
41546
41624
|
}, []), a = z((t, i) => {
|
|
@@ -41558,7 +41636,7 @@ function X0(e = Y0) {
|
|
|
41558
41636
|
}
|
|
41559
41637
|
//#endregion
|
|
41560
41638
|
//#region src/elements/primitives/_primitives/F0ChatComposer/parts/ComposerMentionPopover.tsx
|
|
41561
|
-
var
|
|
41639
|
+
var _2 = (e, t) => `${e}-option-${`${t.type}-${t.id}`.replace(/[^a-zA-Z0-9_-]/g, "-")}`, v2 = (e) => e.type === "icon" || e.type === "emoji" ? "sm" : "xs", y2 = Rr(R(({ id: e, item: t, source: n, isSelected: r, onSelect: i, description: a }, o) => {
|
|
41562
41640
|
let s = !n;
|
|
41563
41641
|
return /* @__PURE__ */ W("div", {
|
|
41564
41642
|
ref: o,
|
|
@@ -41580,7 +41658,7 @@ var Z0 = (e, t) => `${e}-option-${`${t.type}-${t.id}`.replace(/[^a-zA-Z0-9_-]/g,
|
|
|
41580
41658
|
color: "default"
|
|
41581
41659
|
})
|
|
41582
41660
|
}) : t.avatar ? /* @__PURE__ */ U(zt, {
|
|
41583
|
-
size:
|
|
41661
|
+
size: v2(t.avatar),
|
|
41584
41662
|
avatar: t.avatar
|
|
41585
41663
|
}) : t.type === "person" ? /* @__PURE__ */ U(zt, {
|
|
41586
41664
|
size: "xs",
|
|
@@ -41601,13 +41679,13 @@ var Z0 = (e, t) => `${e}-option-${`${t.type}-${t.id}`.replace(/[^a-zA-Z0-9_-]/g,
|
|
|
41601
41679
|
})]
|
|
41602
41680
|
});
|
|
41603
41681
|
}));
|
|
41604
|
-
|
|
41605
|
-
var
|
|
41682
|
+
y2.displayName = "ComposerMentionRow";
|
|
41683
|
+
var b2 = () => /* @__PURE__ */ U(Gr, { children: Array.from({ length: 3 }, (e, t) => /* @__PURE__ */ W("div", {
|
|
41606
41684
|
className: "flex items-center gap-2 p-2",
|
|
41607
41685
|
"aria-hidden": "true",
|
|
41608
41686
|
children: [/* @__PURE__ */ U(Ie, { className: "size-5 shrink-0 rounded-full" }), /* @__PURE__ */ U(Ie, { className: F("h-4 rounded", t === 1 ? "w-24" : "w-32") })]
|
|
41609
41687
|
}, t)) });
|
|
41610
|
-
function
|
|
41688
|
+
function x2({ isOpen: e, listboxId: t, label: n, rows: r, groups: i, showGroupLabels: a, isLoading: o, selectedIndex: s, position: c, onSelect: l, pinnedDescription: u }) {
|
|
41611
41689
|
let d = V(null), f = V(null), p = V(l);
|
|
41612
41690
|
Hr(() => {
|
|
41613
41691
|
p.current = l;
|
|
@@ -41637,9 +41715,9 @@ function t2({ isOpen: e, listboxId: t, label: n, rows: r, groups: i, showGroupLa
|
|
|
41637
41715
|
},
|
|
41638
41716
|
className: F("z-50", "w-64 max-h-60 overflow-y-auto", "rounded-lg border border-solid border-f1-border-secondary", "bg-f1-background shadow-md", "p-1"),
|
|
41639
41717
|
children: [
|
|
41640
|
-
h ? /* @__PURE__ */ U(
|
|
41718
|
+
h ? /* @__PURE__ */ U(y2, {
|
|
41641
41719
|
ref: s === 0 ? f : void 0,
|
|
41642
|
-
id:
|
|
41720
|
+
id: _2(t, h.item),
|
|
41643
41721
|
item: h.item,
|
|
41644
41722
|
source: h.source,
|
|
41645
41723
|
isSelected: s === 0,
|
|
@@ -41656,9 +41734,9 @@ function t2({ isOpen: e, listboxId: t, label: n, rows: r, groups: i, showGroupLa
|
|
|
41656
41734
|
}) : null, e.items.map((n) => {
|
|
41657
41735
|
_++;
|
|
41658
41736
|
let r = _ === s;
|
|
41659
|
-
return /* @__PURE__ */ U(
|
|
41737
|
+
return /* @__PURE__ */ U(y2, {
|
|
41660
41738
|
ref: r ? f : void 0,
|
|
41661
|
-
id:
|
|
41739
|
+
id: _2(t, n),
|
|
41662
41740
|
item: n,
|
|
41663
41741
|
source: e.source,
|
|
41664
41742
|
isSelected: r,
|
|
@@ -41666,13 +41744,13 @@ function t2({ isOpen: e, listboxId: t, label: n, rows: r, groups: i, showGroupLa
|
|
|
41666
41744
|
}, `${n.type}:${n.id}`);
|
|
41667
41745
|
})]
|
|
41668
41746
|
}, e.source.type)),
|
|
41669
|
-
o && !g ? /* @__PURE__ */ U(
|
|
41747
|
+
o && !g ? /* @__PURE__ */ U(b2, {}) : null
|
|
41670
41748
|
]
|
|
41671
41749
|
});
|
|
41672
41750
|
}
|
|
41673
41751
|
//#endregion
|
|
41674
41752
|
//#region src/elements/primitives/_primitives/F0ChatComposer/parts/ComposerNotices.tsx
|
|
41675
|
-
var
|
|
41753
|
+
var S2 = ({ message: e, id: t, reducedMotion: n }) => /* @__PURE__ */ U(ge, {
|
|
41676
41754
|
initial: !1,
|
|
41677
41755
|
children: e ? /* @__PURE__ */ U(De.div, {
|
|
41678
41756
|
id: t,
|
|
@@ -41710,7 +41788,7 @@ var n2 = ({ message: e, id: t, reducedMotion: n }) => /* @__PURE__ */ U(ge, {
|
|
|
41710
41788
|
})]
|
|
41711
41789
|
})
|
|
41712
41790
|
}, "composer-error") : null
|
|
41713
|
-
}),
|
|
41791
|
+
}), C2 = "relative flex flex-col rounded-lg border border-solid border-f1-border-secondary bg-f1-background/95 shadow-md backdrop-blur-[5px] transition-colors", w2 = (e, t) => {
|
|
41714
41792
|
let n = Math.min(e.length, t.length), r = 0;
|
|
41715
41793
|
for (; r < n && e[r] === t[r];) r++;
|
|
41716
41794
|
let i = 0;
|
|
@@ -41720,16 +41798,16 @@ var n2 = ({ message: e, id: t, reducedMotion: n }) => /* @__PURE__ */ U(ge, {
|
|
|
41720
41798
|
prevEnd: e.length - i,
|
|
41721
41799
|
nextEnd: t.length - i
|
|
41722
41800
|
};
|
|
41723
|
-
},
|
|
41724
|
-
let { start: n, prevEnd: r, nextEnd: i } =
|
|
41801
|
+
}, T2 = 600, E2 = 100, D2 = (e, t) => {
|
|
41802
|
+
let { start: n, prevEnd: r, nextEnd: i } = w2(e, t), a = r - n, o = i - n;
|
|
41725
41803
|
return a === 0 && o === 1 ? /\s/.test(t[n] ?? "") ? "other" : "insert" : o === 0 && a === 1 ? "delete" : "other";
|
|
41726
|
-
},
|
|
41804
|
+
}, O2 = () => {
|
|
41727
41805
|
let e = V([]), t = V([]), n = V("other"), r = V(0);
|
|
41728
41806
|
return {
|
|
41729
41807
|
record: z((i, a) => {
|
|
41730
41808
|
t.current = [];
|
|
41731
|
-
let o =
|
|
41732
|
-
n.current = o, r.current = s, !c && (e.current.push(i), e.current.length >
|
|
41809
|
+
let o = D2(i.value, a.value), s = Date.now(), c = o !== "other" && o === n.current && s - r.current <= T2 && i.mentions === a.mentions && e.current.length > 0;
|
|
41810
|
+
n.current = o, r.current = s, !c && (e.current.push(i), e.current.length > E2 && e.current.shift());
|
|
41733
41811
|
}, []),
|
|
41734
41812
|
undo: z((r) => {
|
|
41735
41813
|
let i = e.current.pop();
|
|
@@ -41743,10 +41821,10 @@ var n2 = ({ message: e, id: t, reducedMotion: n }) => /* @__PURE__ */ U(ge, {
|
|
|
41743
41821
|
e.current = [], t.current = [], n.current = "other", r.current = 0;
|
|
41744
41822
|
}, [])
|
|
41745
41823
|
};
|
|
41746
|
-
},
|
|
41824
|
+
}, k2 = /* @__PURE__ */ "direction.boxSizing.width.height.overflowX.overflowY.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.borderStyle.paddingTop.paddingRight.paddingBottom.paddingLeft.fontStyle.fontVariant.fontWeight.fontStretch.fontSize.fontSizeAdjust.lineHeight.fontFamily.textAlign.textTransform.textIndent.textDecoration.letterSpacing.wordSpacing.tabSize.MozTabSize.whiteSpace.wordWrap.wordBreak".split("."), A2 = (e) => {
|
|
41747
41825
|
let t = document.createElement("div"), n = t.style, r = window.getComputedStyle(e);
|
|
41748
41826
|
n.whiteSpace = "pre-wrap", n.wordWrap = "break-word", n.position = "absolute", n.visibility = "hidden", n.overflow = "hidden";
|
|
41749
|
-
for (let e of
|
|
41827
|
+
for (let e of k2) n.setProperty(e, r.getPropertyValue(e));
|
|
41750
41828
|
let i = document.createTextNode(""), a = document.createElement("span");
|
|
41751
41829
|
return t.appendChild(i), t.appendChild(a), document.body.appendChild(t), {
|
|
41752
41830
|
textarea: e,
|
|
@@ -41755,53 +41833,53 @@ var n2 = ({ message: e, id: t, reducedMotion: n }) => /* @__PURE__ */ U(ge, {
|
|
|
41755
41833
|
prefix: i,
|
|
41756
41834
|
span: a
|
|
41757
41835
|
};
|
|
41758
|
-
},
|
|
41836
|
+
}, j2 = (e) => {
|
|
41759
41837
|
e.div.remove();
|
|
41760
|
-
},
|
|
41838
|
+
}, M2 = (e, t) => {
|
|
41761
41839
|
let { value: n } = e.textarea;
|
|
41762
41840
|
return e.prefix.data = n.substring(0, t), e.span.textContent = n.substring(t) || "", {
|
|
41763
41841
|
left: e.span.offsetLeft,
|
|
41764
41842
|
top: e.span.offsetTop - e.textarea.scrollTop
|
|
41765
41843
|
};
|
|
41766
41844
|
};
|
|
41767
|
-
function
|
|
41768
|
-
let n =
|
|
41845
|
+
function N2(e, t) {
|
|
41846
|
+
let n = A2(e);
|
|
41769
41847
|
try {
|
|
41770
|
-
return
|
|
41848
|
+
return M2(n, t);
|
|
41771
41849
|
} finally {
|
|
41772
|
-
|
|
41850
|
+
j2(n);
|
|
41773
41851
|
}
|
|
41774
41852
|
}
|
|
41775
41853
|
//#endregion
|
|
41776
41854
|
//#region src/elements/primitives/_primitives/F0ChatComposer/utils/sanitize-text.ts
|
|
41777
|
-
var
|
|
41855
|
+
var P2 = /(\p{M}{3})\p{M}+/gu, F2 = /[\u202A-\u202E\u2066-\u2069]/g, I2 = "NFC", L2 = (e) => e.normalize(I2).replace(P2, "$1").replace(F2, ""), R2 = /[\s\S]\p{M}*/uy, z2 = /[\p{M}\u1161-\u1175\u11A8-\u11C2]/uy, B2 = (e, t) => (z2.lastIndex = t, z2.test(e)), V2 = /\P{ASCII}/u, H2 = (e, t) => (R2.lastIndex = t, R2.exec(e), Math.max(R2.lastIndex, t + 1)), U2 = (e, t, n) => {
|
|
41778
41856
|
let r = t;
|
|
41779
41857
|
for (;;) {
|
|
41780
|
-
let i =
|
|
41781
|
-
if (i === n) return
|
|
41782
|
-
if (r === e.length || !n.startsWith(i) && !
|
|
41783
|
-
r =
|
|
41858
|
+
let i = L2(e.slice(t, r));
|
|
41859
|
+
if (i === n) return B2(e, r) ? -1 : r;
|
|
41860
|
+
if (r === e.length || !n.startsWith(i) && !B2(e, r)) return -1;
|
|
41861
|
+
r = H2(e, r);
|
|
41784
41862
|
}
|
|
41785
|
-
},
|
|
41863
|
+
}, W2 = (e, t, n) => {
|
|
41786
41864
|
let r = t + n.length;
|
|
41787
|
-
return e.startsWith(n, t) && !
|
|
41788
|
-
},
|
|
41789
|
-
let a =
|
|
41865
|
+
return e.startsWith(n, t) && !B2(e, r) ? r : -1;
|
|
41866
|
+
}, G2 = (e, t, { pattern: n, asWritten: r, foldable: i }) => {
|
|
41867
|
+
let a = W2(e, t, n);
|
|
41790
41868
|
if (a !== -1) return a;
|
|
41791
41869
|
if (r !== n) {
|
|
41792
|
-
let n =
|
|
41870
|
+
let n = W2(e, t, r);
|
|
41793
41871
|
if (n !== -1) return n;
|
|
41794
41872
|
}
|
|
41795
|
-
return i ?
|
|
41796
|
-
},
|
|
41873
|
+
return i ? U2(e, t, n) : -1;
|
|
41874
|
+
}, K2 = (e, t) => {
|
|
41797
41875
|
let n = ((t) => {
|
|
41798
|
-
let n = [], r =
|
|
41876
|
+
let n = [], r = V2.test(e);
|
|
41799
41877
|
for (let i of t) {
|
|
41800
41878
|
let t = 0;
|
|
41801
41879
|
for (;;) {
|
|
41802
41880
|
let a = e.indexOf("@", t);
|
|
41803
41881
|
if (a === -1) break;
|
|
41804
|
-
let o = i.candidates.reduce((t, { asWritten: n }) => Math.max(t,
|
|
41882
|
+
let o = i.candidates.reduce((t, { asWritten: n }) => Math.max(t, G2(e, a, {
|
|
41805
41883
|
pattern: i.pattern,
|
|
41806
41884
|
asWritten: n,
|
|
41807
41885
|
foldable: r
|
|
@@ -41822,7 +41900,7 @@ var m2 = /(\p{M}{3})\p{M}+/gu, h2 = /[\u202A-\u202E\u2066-\u2069]/g, g2 = "NFC",
|
|
|
41822
41900
|
return {
|
|
41823
41901
|
entry: n,
|
|
41824
41902
|
asWritten: e,
|
|
41825
|
-
pattern:
|
|
41903
|
+
pattern: L2(e)
|
|
41826
41904
|
};
|
|
41827
41905
|
})(), r = e.get(t.pattern);
|
|
41828
41906
|
r ? r.candidates.push(t) : e.set(t.pattern, {
|
|
@@ -41840,7 +41918,7 @@ var m2 = /(\p{M}{3})\p{M}+/gu, h2 = /[\u202A-\u202E\u2066-\u2069]/g, g2 = "NFC",
|
|
|
41840
41918
|
let o = t.candidates.map((e, t) => ({
|
|
41841
41919
|
candidate: e,
|
|
41842
41920
|
index: t
|
|
41843
|
-
})).filter(({ candidate: t }) =>
|
|
41921
|
+
})).filter(({ candidate: t }) => W2(e, n, t.asWritten) === r), s = o.find(({ index: e }) => !i.has(e)) ?? o.at(-1) ?? t.candidates.map((e, t) => ({
|
|
41844
41922
|
candidate: e,
|
|
41845
41923
|
index: t
|
|
41846
41924
|
})).find(({ index: e }) => !i.has(e)) ?? {
|
|
@@ -41853,7 +41931,7 @@ var m2 = /(\p{M}{3})\p{M}+/gu, h2 = /[\u202A-\u202E\u2066-\u2069]/g, g2 = "NFC",
|
|
|
41853
41931
|
end: r
|
|
41854
41932
|
};
|
|
41855
41933
|
});
|
|
41856
|
-
},
|
|
41934
|
+
}, q2 = (e) => e.start + e.length, J2 = ({ type: e, id: t, label: n, start: r }) => ({
|
|
41857
41935
|
type: e,
|
|
41858
41936
|
id: t,
|
|
41859
41937
|
label: n,
|
|
@@ -41861,7 +41939,7 @@ var m2 = /(\p{M}{3})\p{M}+/gu, h2 = /[\u202A-\u202E\u2066-\u2069]/g, g2 = "NFC",
|
|
|
41861
41939
|
});
|
|
41862
41940
|
//#endregion
|
|
41863
41941
|
//#region src/elements/primitives/_primitives/F0ChatComposer/mentions/anchors.ts
|
|
41864
|
-
function
|
|
41942
|
+
function Y2(e, t, n) {
|
|
41865
41943
|
let r = e.slice(0, t).lastIndexOf("@");
|
|
41866
41944
|
if (r === -1) return null;
|
|
41867
41945
|
if (r > 0) {
|
|
@@ -41874,7 +41952,7 @@ function k2(e, t, n) {
|
|
|
41874
41952
|
query: i
|
|
41875
41953
|
};
|
|
41876
41954
|
}
|
|
41877
|
-
var
|
|
41955
|
+
var X2 = (e, t, n) => n.at >= 0 && t.slice(0, n.at) === e.slice(0, n.at) && t.slice(n.at + n.inserted) === e.slice(n.at + n.removed), Z2 = (e, t) => e.every((e) => e.start >= q2(t) || q2(e) <= t.start), Q2 = (e, t, n, r) => e >= r || t <= n, $2 = ({ start: e, end: t, editStart: n, previousEditEnd: r, nextEditEnd: i, delta: a }) => {
|
|
41878
41956
|
let o = e < n, s = t > r;
|
|
41879
41957
|
if (o && s) return [{
|
|
41880
41958
|
start: e,
|
|
@@ -41888,11 +41966,11 @@ var A2 = (e, t, n) => n.at >= 0 && t.slice(0, n.at) === e.slice(0, n.at) && t.sl
|
|
|
41888
41966
|
start: i,
|
|
41889
41967
|
end: t + a
|
|
41890
41968
|
}), c;
|
|
41891
|
-
},
|
|
41892
|
-
let { start: r, prevEnd: i, nextEnd: a } =
|
|
41969
|
+
}, e4 = (e, t, n) => {
|
|
41970
|
+
let { start: r, prevEnd: i, nextEnd: a } = w2(e, t), o = t.length - e.length, s = i - r, c = a - r, l = [], u = [];
|
|
41893
41971
|
for (let d of n) {
|
|
41894
|
-
let n = d.start, f =
|
|
41895
|
-
if (
|
|
41972
|
+
let n = d.start, f = q2(d);
|
|
41973
|
+
if (Q2(r, i, n, f)) {
|
|
41896
41974
|
let e = n < r ? 0 : o;
|
|
41897
41975
|
l.push({
|
|
41898
41976
|
...d,
|
|
@@ -41904,11 +41982,11 @@ var A2 = (e, t, n) => n.at >= 0 && t.slice(0, n.at) === e.slice(0, n.at) && t.sl
|
|
|
41904
41982
|
...d,
|
|
41905
41983
|
start: n + o
|
|
41906
41984
|
};
|
|
41907
|
-
|
|
41985
|
+
Z2(l, p) && X2(e, t, {
|
|
41908
41986
|
at: n - s,
|
|
41909
41987
|
removed: s,
|
|
41910
41988
|
inserted: c
|
|
41911
|
-
}) ? l.push(p) : u.push(
|
|
41989
|
+
}) ? l.push(p) : u.push(...$2({
|
|
41912
41990
|
start: n,
|
|
41913
41991
|
end: f,
|
|
41914
41992
|
editStart: r,
|
|
@@ -41921,7 +41999,7 @@ var A2 = (e, t, n) => n.at >= 0 && t.slice(0, n.at) === e.slice(0, n.at) && t.sl
|
|
|
41921
41999
|
kept: l,
|
|
41922
42000
|
touched: u
|
|
41923
42001
|
};
|
|
41924
|
-
},
|
|
42002
|
+
}, t4 = (e, t, n, r) => {
|
|
41925
42003
|
let i = [];
|
|
41926
42004
|
for (let e of [...t].sort((e, t) => e.start - t.start)) {
|
|
41927
42005
|
let t = i[i.length - 1];
|
|
@@ -41941,10 +42019,10 @@ var A2 = (e, t, n) => n.at >= 0 && t.slice(0, n.at) === e.slice(0, n.at) && t.sl
|
|
|
41941
42019
|
})),
|
|
41942
42020
|
caret: r - a(r)
|
|
41943
42021
|
};
|
|
41944
|
-
},
|
|
42022
|
+
}, n4 = {
|
|
41945
42023
|
query: "",
|
|
41946
42024
|
groups: []
|
|
41947
|
-
},
|
|
42025
|
+
}, r4 = (e, t) => !!e && e.atIndex === t.atIndex && t.query.startsWith(e.query), i4 = (e) => e.normalize("NFC"), a4 = (e, t) => e.toLowerCase().startsWith(t.toLowerCase()), o4 = (e, t, n) => t === n || n.length === 0 || a4(e.label, n), s4 = (e, t) => typeof e.order == "function" ? e.order(t) : e.order ?? 0, c4 = (e, t, n) => Promise.all(e.map((e) => e.search(t, n).then((t) => ({
|
|
41948
42026
|
source: e,
|
|
41949
42027
|
items: t,
|
|
41950
42028
|
failed: !1
|
|
@@ -41952,16 +42030,16 @@ var A2 = (e, t, n) => n.at >= 0 && t.slice(0, n.at) === e.slice(0, n.at) && t.sl
|
|
|
41952
42030
|
source: e,
|
|
41953
42031
|
items: [],
|
|
41954
42032
|
failed: !0
|
|
41955
|
-
})))),
|
|
42033
|
+
})))), l4 = (e, t) => e.filter((e) => e.items.length > 0).map(({ source: e, items: t }) => ({
|
|
41956
42034
|
source: e,
|
|
41957
42035
|
items: t
|
|
41958
|
-
})).sort((e, n) =>
|
|
42036
|
+
})).sort((e, n) => s4(e.source, t) - s4(n.source, t)), u4 = (e, t) => e.length === t.length && e.every((e, n) => {
|
|
41959
42037
|
let r = t[n];
|
|
41960
42038
|
return r !== void 0 && r.id === e.id && r.type === e.type && r.label === e.label && r.start === e.start && r.length === e.length;
|
|
41961
42039
|
});
|
|
41962
|
-
function
|
|
41963
|
-
let [f, p] = H(!1), [m, h] = H(""), [g, _] = H(
|
|
41964
|
-
|
|
42040
|
+
function d4({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosition: r, requestSelection: i, onMentionErased: a, textareaRef: o, enabled: s, sources: c, pinned: l, scopeKey: u, onInserted: d }) {
|
|
42041
|
+
let [f, p] = H(!1), [m, h] = H(""), [g, _] = H(n4), [v, y] = H(!1), [b, x] = H(0), [S, C] = H([]), w = V(S), T = z((e) => {
|
|
42042
|
+
u4(w.current, e) || (w.current = e, C(e));
|
|
41965
42043
|
}, []), E = V(e), D = V(e);
|
|
41966
42044
|
D.current = e;
|
|
41967
42045
|
let O = V(-1), k = V(null), A = V(0), j = V(null), M = V(null), N = V(c), ee = V(d), te = V(u);
|
|
@@ -41969,15 +42047,15 @@ function G2({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
41969
42047
|
N.current = c, ee.current = d;
|
|
41970
42048
|
});
|
|
41971
42049
|
let ne = s && (c.length > 0 || !!l), re = z(() => {
|
|
41972
|
-
k.current &&= (clearTimeout(k.current), null), A.current++, y(!1), _((e) => e.groups.length === 0 ? e :
|
|
42050
|
+
k.current &&= (clearTimeout(k.current), null), A.current++, y(!1), _((e) => e.groups.length === 0 ? e : n4);
|
|
41973
42051
|
}, []), ie = te.current === u;
|
|
41974
42052
|
Hr(() => {
|
|
41975
42053
|
te.current !== u && (te.current = u, j.current = null, re());
|
|
41976
42054
|
}, [u, re]);
|
|
41977
42055
|
let ae = z(() => {
|
|
41978
42056
|
let e = M.current;
|
|
41979
|
-
e && (M.current = null,
|
|
41980
|
-
}, []), oe = z((e) => !!l && l.matches(e), [l]), se = Ur(() => oe(m), [oe, m]), ce = Ur(() => g.groups.map((e) => e.items.map((e) => ie &&
|
|
42057
|
+
e && (M.current = null, j2(e));
|
|
42058
|
+
}, []), oe = z((e) => !!l && l.matches(e), [l]), se = Ur(() => oe(m), [oe, m]), ce = Ur(() => g.groups.map((e) => e.items.map((e) => ie && o4(e, g.query, m) ? "1" : "0").join("")).join("|"), [
|
|
41981
42059
|
g,
|
|
41982
42060
|
ie,
|
|
41983
42061
|
m
|
|
@@ -42005,12 +42083,12 @@ function G2({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42005
42083
|
re(), p(!1);
|
|
42006
42084
|
return;
|
|
42007
42085
|
}
|
|
42008
|
-
let t =
|
|
42086
|
+
let t = Y2(e, n, S);
|
|
42009
42087
|
if (!t) {
|
|
42010
42088
|
re(), p(!1), h(""), x(0), O.current = -1, j.current = null;
|
|
42011
42089
|
return;
|
|
42012
42090
|
}
|
|
42013
|
-
if (
|
|
42091
|
+
if (r4(j.current, t)) {
|
|
42014
42092
|
re();
|
|
42015
42093
|
return;
|
|
42016
42094
|
}
|
|
@@ -42018,14 +42096,14 @@ function G2({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42018
42096
|
let r = ++A.current, i = {
|
|
42019
42097
|
text: e,
|
|
42020
42098
|
cursor: n,
|
|
42021
|
-
mentionsBefore: S.filter((e) =>
|
|
42099
|
+
mentionsBefore: S.filter((e) => q2(e) <= t.atIndex).map(J2)
|
|
42022
42100
|
};
|
|
42023
42101
|
return k.current = setTimeout(() => {
|
|
42024
42102
|
let e = N.current;
|
|
42025
|
-
e.length === 0 ? r === A.current && y(!1) :
|
|
42103
|
+
e.length === 0 ? r === A.current && y(!1) : c4(e, t.query, i).then((e) => {
|
|
42026
42104
|
if (r !== A.current) return;
|
|
42027
42105
|
y(!1);
|
|
42028
|
-
let n =
|
|
42106
|
+
let n = l4(e, i);
|
|
42029
42107
|
_({
|
|
42030
42108
|
query: t.query,
|
|
42031
42109
|
groups: n
|
|
@@ -42058,7 +42136,7 @@ function G2({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42058
42136
|
if (a === -1) return;
|
|
42059
42137
|
let { item: o } = r, s = e.slice(0, a), c = e.slice(n), l = `@${o.label} `, u = s + l + c, d = s.length + l.length;
|
|
42060
42138
|
t(u);
|
|
42061
|
-
let f = l.length - (n - a), p = w.current.filter((e) =>
|
|
42139
|
+
let f = l.length - (n - a), p = w.current.filter((e) => q2(e) <= a || e.start >= n).map((e) => e.start >= n ? {
|
|
42062
42140
|
...e,
|
|
42063
42141
|
start: e.start + f
|
|
42064
42142
|
} : e);
|
|
@@ -42084,12 +42162,12 @@ function G2({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42084
42162
|
case "ArrowUp": return e.preventDefault(), x((e) => (e + ue.length - 1) % ue.length), !0;
|
|
42085
42163
|
case "Tab": {
|
|
42086
42164
|
let t = ue[b];
|
|
42087
|
-
return t && (m.length === 0 ||
|
|
42165
|
+
return t && (m.length === 0 || a4(t.item.label, m)) ? (e.preventDefault(), pe(t), !0) : !1;
|
|
42088
42166
|
}
|
|
42089
42167
|
case "Enter": {
|
|
42090
42168
|
e.preventDefault();
|
|
42091
42169
|
let t = ue[b];
|
|
42092
|
-
return t &&
|
|
42170
|
+
return t && o4(t.item, g.query, m) && pe(t), !0;
|
|
42093
42171
|
}
|
|
42094
42172
|
default: return !1;
|
|
42095
42173
|
}
|
|
@@ -42107,12 +42185,12 @@ function G2({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42107
42185
|
E.current = n;
|
|
42108
42186
|
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
42109
42187
|
for (let t of e) {
|
|
42110
|
-
let e =
|
|
42188
|
+
let e = i4(t.label), n = r.get(e);
|
|
42111
42189
|
n ? n.push(t) : r.set(e, [t]), i.add(t.label);
|
|
42112
42190
|
}
|
|
42113
42191
|
let a = /* @__PURE__ */ new Set();
|
|
42114
|
-
T(
|
|
42115
|
-
let o = r.get(
|
|
42192
|
+
T(K2(n, [...i].map((e) => ({ name: e }))).flatMap(({ entry: { name: e }, start: t, end: i }) => {
|
|
42193
|
+
let o = r.get(i4(e)) ?? [], s = o.filter((e) => !a.has(e)), c = n.slice(t + 1, i), l = s.find((e) => e.label === c) ?? s[0] ?? o[o.length - 1];
|
|
42116
42194
|
return l && a.add(l), l ? [{
|
|
42117
42195
|
...l,
|
|
42118
42196
|
start: t,
|
|
@@ -42128,12 +42206,12 @@ function G2({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42128
42206
|
E.current = e;
|
|
42129
42207
|
let s = w.current;
|
|
42130
42208
|
if (s.length === 0) return;
|
|
42131
|
-
let { kept: c, touched: l } =
|
|
42209
|
+
let { kept: c, touched: l } = e4(o, e, s);
|
|
42132
42210
|
if (l.length === 0) {
|
|
42133
42211
|
T(c);
|
|
42134
42212
|
return;
|
|
42135
42213
|
}
|
|
42136
|
-
let u =
|
|
42214
|
+
let u = t4(e, l, c, n);
|
|
42137
42215
|
E.current = u.text, T(u.mentions), t(u.text), r(u.caret), i(u.caret, u.text), a?.(u.text);
|
|
42138
42216
|
}, [
|
|
42139
42217
|
e,
|
|
@@ -42156,8 +42234,8 @@ function G2({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42156
42234
|
return;
|
|
42157
42235
|
}
|
|
42158
42236
|
let t = M.current;
|
|
42159
|
-
(!t || t.textarea !== e || t.width !== e.clientWidth) && (t &&
|
|
42160
|
-
let n =
|
|
42237
|
+
(!t || t.textarea !== e || t.width !== e.clientWidth) && (t && j2(t), t = A2(e), M.current = t);
|
|
42238
|
+
let n = M2(t, O.current), r = e.offsetLeft + n.left, i = e.offsetParent, a = (i instanceof HTMLElement ? i.offsetHeight : 0) - (e.offsetTop + n.top);
|
|
42161
42239
|
_e((e) => e?.left === r && e.bottom === a ? e : {
|
|
42162
42240
|
left: r,
|
|
42163
42241
|
bottom: a
|
|
@@ -42183,7 +42261,7 @@ function G2({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42183
42261
|
let e = ue[b];
|
|
42184
42262
|
if (!e) return null;
|
|
42185
42263
|
let t = e.item.label;
|
|
42186
|
-
return m.length === 0 ? t :
|
|
42264
|
+
return m.length === 0 ? t : a4(t, m) ? t.slice(m.length) : null;
|
|
42187
42265
|
}, [
|
|
42188
42266
|
f,
|
|
42189
42267
|
ue,
|
|
@@ -42200,10 +42278,10 @@ function G2({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosit
|
|
|
42200
42278
|
}
|
|
42201
42279
|
//#endregion
|
|
42202
42280
|
//#region src/elements/primitives/_primitives/F0ChatComposer/utils/highlight.ts
|
|
42203
|
-
function
|
|
42281
|
+
function f4(e, t, n) {
|
|
42204
42282
|
let r = n?.cursorPosition ?? e.length, i = n?.inlineCompletion ?? null, a = t.map((e) => ({
|
|
42205
42283
|
start: e.start,
|
|
42206
|
-
end:
|
|
42284
|
+
end: q2(e)
|
|
42207
42285
|
})).filter((t) => t.start >= 0 && t.end <= e.length).sort((e, t) => e.start - t.start), o = [], s = 0, c = !1, l = (t) => {
|
|
42208
42286
|
!i || c || r < s || r > t ? (t > s && o.push({
|
|
42209
42287
|
type: "text",
|
|
@@ -42233,19 +42311,19 @@ function K2(e, t, n) {
|
|
|
42233
42311
|
}
|
|
42234
42312
|
//#endregion
|
|
42235
42313
|
//#region src/elements/primitives/_primitives/F0ChatComposer/useComposerEditor.ts
|
|
42236
|
-
var
|
|
42237
|
-
function
|
|
42314
|
+
var p4 = 1500, m4 = (e) => e.nativeEvent.isComposing || e.keyCode === 229;
|
|
42315
|
+
function h4({ mentions: e, transformChange: t, onTextChange: n, historySuspended: r = !1 }) {
|
|
42238
42316
|
let [i, a] = H(""), [o, s] = H(0), c = V(null), l = V(null), u = V(null), d = z((e, t, n = !1) => {
|
|
42239
42317
|
u.current = {
|
|
42240
42318
|
caret: e,
|
|
42241
42319
|
forText: t,
|
|
42242
42320
|
focus: n
|
|
42243
42321
|
};
|
|
42244
|
-
}, []), f =
|
|
42322
|
+
}, []), f = O2(), p = V({
|
|
42245
42323
|
value: "",
|
|
42246
42324
|
caret: 0,
|
|
42247
42325
|
mentions: []
|
|
42248
|
-
}), m = V(!1), h = V(null), g = V(!1), _ =
|
|
42326
|
+
}), m = V(!1), h = V(null), g = V(!1), _ = d4({
|
|
42249
42327
|
inputValue: i,
|
|
42250
42328
|
setInputValue: a,
|
|
42251
42329
|
cursorPosition: o,
|
|
@@ -42339,7 +42417,7 @@ function Y2({ mentions: e, transformChange: t, onTextChange: n, historySuspended
|
|
|
42339
42417
|
S
|
|
42340
42418
|
]), N = z((e) => e.key !== "Escape" || i.length === 0 ? !1 : (e.preventDefault(), e.stopPropagation(), y ? (M(), !0) : (b(!0), x.current && clearTimeout(x.current), x.current = setTimeout(() => {
|
|
42341
42419
|
x.current = null, b(!1);
|
|
42342
|
-
},
|
|
42420
|
+
}, p4), !0)), [
|
|
42343
42421
|
i.length,
|
|
42344
42422
|
y,
|
|
42345
42423
|
M
|
|
@@ -42372,10 +42450,10 @@ function Y2({ mentions: e, transformChange: t, onTextChange: n, historySuspended
|
|
|
42372
42450
|
breakHistory: ee
|
|
42373
42451
|
};
|
|
42374
42452
|
}
|
|
42375
|
-
function
|
|
42453
|
+
function g4(e, { suppressGhost: t = !1 } = {}) {
|
|
42376
42454
|
let { value: n, cursorPosition: r, mentions: i } = e, a = t ? null : i.inlineCompletion;
|
|
42377
42455
|
return {
|
|
42378
|
-
highlightSegments: Ur(() =>
|
|
42456
|
+
highlightSegments: Ur(() => f4(n, i.mentions, {
|
|
42379
42457
|
cursorPosition: r,
|
|
42380
42458
|
inlineCompletion: a
|
|
42381
42459
|
}), [
|
|
@@ -42389,7 +42467,7 @@ function X2(e, { suppressGhost: t = !1 } = {}) {
|
|
|
42389
42467
|
}
|
|
42390
42468
|
//#endregion
|
|
42391
42469
|
//#region src/elements/primitives/_primitives/F0ChatComposer/F0ChatComposer.tsx
|
|
42392
|
-
var
|
|
42470
|
+
var _4 = [], v4 = () => null, y4 = ({ onSend: e, inProgress: t = !1, onStop: n, sendKind: r = "send", hasAttachments: i = !1, sendBlocked: a = !1, maxLength: o, maxLengthError: s, error: c = null, labels: l, placeholders: u, placeholdersPaused: d, role: f = "combobox", name: p, mentions: m, autocomplete: h, voice: g, onTextChange: _, onCleared: v, onEscape: y, onArrowUpWhenEmpty: b, onPasteFiles: x, pastePreferText: S = !1, onStateChange: C, header: w, tray: T, leading: E, toolbarStart: D, toolbarCenter: O, collapsible: k = !1, collapsed: A = !1, replacement: j, accent: M = !1, asForm: N = !1, className: ee, surfaceRef: te, onSurfaceFocus: ne, onSurfaceBlur: re, handleRef: ie, reducedMotion: ae = !1, "data-testid": oe }) => {
|
|
42393
42471
|
let se = He(), ce = {
|
|
42394
42472
|
placeholder: se.chat.placeholder,
|
|
42395
42473
|
listening: se.chat.listening,
|
|
@@ -42404,7 +42482,7 @@ var Z2 = [], Q2 = () => null, $2 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
42404
42482
|
micError: se.chat.micError,
|
|
42405
42483
|
transcriptionError: se.chat.transcriptionError,
|
|
42406
42484
|
...l
|
|
42407
|
-
}, le = j != null, { error: ue, show: de, clear: fe } =
|
|
42485
|
+
}, le = j != null, { error: ue, show: de, clear: fe } = g2(), pe = V(() => {}), P = V(() => {}), me = V(""), he = z((e) => {
|
|
42408
42486
|
let t = me.current, n = t && !/\s$/.test(t) ? " " : "";
|
|
42409
42487
|
pe.current(`${t}${n}${e}`);
|
|
42410
42488
|
}, []), _e = {
|
|
@@ -42419,10 +42497,10 @@ var Z2 = [], Q2 = () => null, $2 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
42419
42497
|
},
|
|
42420
42498
|
onError: (e) => de(_e[e]),
|
|
42421
42499
|
onAudio: g?.onAudio
|
|
42422
|
-
}), [ye, be] = H(!1), xe = ve.status === "recording", Se = ve.status === "transcribing", Ce = !!g && (!!g.onTranscribe || !!g.onAudio) && ve.isSupported, we = !g?.onAudio && (ve.status !== "idle" || ye), [Te, Ee] = H(!1), Oe =
|
|
42500
|
+
}), [ye, be] = H(!1), xe = ve.status === "recording", Se = ve.status === "transcribing", Ce = !!g && (!!g.onTranscribe || !!g.onAudio) && ve.isSupported, we = !g?.onAudio && (ve.status !== "idle" || ye), [Te, Ee] = H(!1), Oe = h4({
|
|
42423
42501
|
mentions: {
|
|
42424
42502
|
enabled: !!m && m.sources.length + +!!m.pinned > 0 && !Te && !le,
|
|
42425
|
-
sources: m?.sources ??
|
|
42503
|
+
sources: m?.sources ?? _4,
|
|
42426
42504
|
pinned: m?.pinned,
|
|
42427
42505
|
scopeKey: m?.scopeKey,
|
|
42428
42506
|
onInserted: m?.onInserted
|
|
@@ -42438,11 +42516,11 @@ var Z2 = [], Q2 = () => null, $2 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
42438
42516
|
Re.current = ke;
|
|
42439
42517
|
let ze = V(Pe.mentions);
|
|
42440
42518
|
ze.current = Pe.mentions;
|
|
42441
|
-
let Be = (h?.useAutocomplete ??
|
|
42519
|
+
let Be = (h?.useAutocomplete ?? v4)(Oe), Ve = Be?.isOpen ?? !1, Ue = Pe.dismissCurrentTrigger;
|
|
42442
42520
|
B(() => {
|
|
42443
42521
|
Ee(Ve), Ve && Ue();
|
|
42444
42522
|
}, [Ve, Ue]);
|
|
42445
|
-
let { highlightSegments: We, hasOverlay: Ge } =
|
|
42523
|
+
let { highlightSegments: We, hasOverlay: Ge } = g4(Oe, { suppressGhost: Ve }), Ke = z((e) => {
|
|
42446
42524
|
let t = Me.current;
|
|
42447
42525
|
if (!t) return;
|
|
42448
42526
|
t.focus(e);
|
|
@@ -42557,14 +42635,14 @@ var Z2 = [], Q2 = () => null, $2 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
42557
42635
|
let t = gt;
|
|
42558
42636
|
return _t(e) ? (t && (Ze(!1), v?.()), !0) : !1;
|
|
42559
42637
|
}, bt = (e) => {
|
|
42560
|
-
le ||
|
|
42638
|
+
le || m4(e) || vt(e) || Be?.handleKeyDown(e) || Pe.handleKeyDown(e) || yt(e) || (e.key === "ArrowUp" && !e.shiftKey && !e.altKey && !e.metaKey && !e.ctrlKey && ke === "" && ve.status === "idle" && !ye && !g?.busy && b?.() ? e.preventDefault() : e.key === "Enter" && !e.shiftKey && (e.preventDefault(), t || ot()));
|
|
42561
42639
|
}, xt = (e) => {
|
|
42562
42640
|
e.preventDefault(), !le && (t && !we ? (Pe.close(), n?.(), Me.current?.focus()) : ot());
|
|
42563
|
-
}, St =
|
|
42641
|
+
}, St = l2({
|
|
42564
42642
|
enabled: !!x && !le,
|
|
42565
42643
|
onFiles: x ?? (() => {}),
|
|
42566
42644
|
preferText: S
|
|
42567
|
-
}), Ct = Br(), wt = Br(), Tt = `chat-composer-mentions-${Ct.replace(/:/g, "")}`, Et = Pe.isOpen && !Ve && !le && (Pe.isLoading || Pe.rows.length > 0), Dt = Pe.rows[Pe.selectedIndex] ?? Pe.rows[0], Ot = Et && Dt ?
|
|
42645
|
+
}), Ct = Br(), wt = Br(), Tt = `chat-composer-mentions-${Ct.replace(/:/g, "")}`, Et = Pe.isOpen && !Ve && !le && (Pe.isLoading || Pe.rows.length > 0), Dt = Pe.rows[Pe.selectedIndex] ?? Pe.rows[0], Ot = Et && Dt ? _2(Tt, Dt.item) : void 0, kt = (e) => Ce ? /* @__PURE__ */ U(Je, {
|
|
42568
42646
|
type: "button",
|
|
42569
42647
|
variant: "outline",
|
|
42570
42648
|
size: e,
|
|
@@ -42593,7 +42671,7 @@ var Z2 = [], Q2 = () => null, $2 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
42593
42671
|
},
|
|
42594
42672
|
transition: {
|
|
42595
42673
|
duration: .15,
|
|
42596
|
-
ease:
|
|
42674
|
+
ease: U1
|
|
42597
42675
|
},
|
|
42598
42676
|
children: at ? /* @__PURE__ */ U(Je, {
|
|
42599
42677
|
type: N ? "submit" : "button",
|
|
@@ -42626,7 +42704,7 @@ var Z2 = [], Q2 = () => null, $2 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
42626
42704
|
animate: { opacity: 1 },
|
|
42627
42705
|
exit: { opacity: 0 },
|
|
42628
42706
|
transition: Mt,
|
|
42629
|
-
children: [/* @__PURE__ */ U(
|
|
42707
|
+
children: [/* @__PURE__ */ U(o1, {
|
|
42630
42708
|
stream: ve.stream,
|
|
42631
42709
|
className: "min-w-0 flex-1"
|
|
42632
42710
|
}), /* @__PURE__ */ W("div", {
|
|
@@ -42681,7 +42759,7 @@ var Z2 = [], Q2 = () => null, $2 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
42681
42759
|
]
|
|
42682
42760
|
}, It = /* @__PURE__ */ W(Gr, { children: [
|
|
42683
42761
|
w,
|
|
42684
|
-
/* @__PURE__ */ U(
|
|
42762
|
+
/* @__PURE__ */ U(S2, {
|
|
42685
42763
|
message: et,
|
|
42686
42764
|
id: wt,
|
|
42687
42765
|
reducedMotion: ae
|
|
@@ -42691,7 +42769,7 @@ var Z2 = [], Q2 = () => null, $2 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
42691
42769
|
className: F((E || A) && "flex items-end", A && "pr-3"),
|
|
42692
42770
|
children: [
|
|
42693
42771
|
E,
|
|
42694
|
-
/* @__PURE__ */ U(
|
|
42772
|
+
/* @__PURE__ */ U(m2, {
|
|
42695
42773
|
className: "min-w-0 flex-1",
|
|
42696
42774
|
textareaRef: Me,
|
|
42697
42775
|
highlightRef: Ne,
|
|
@@ -42752,7 +42830,7 @@ var Z2 = [], Q2 = () => null, $2 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
42752
42830
|
}) : Pt
|
|
42753
42831
|
] }), Lt = /* @__PURE__ */ W(Gr, { children: [
|
|
42754
42832
|
Be?.popover,
|
|
42755
|
-
/* @__PURE__ */ U(
|
|
42833
|
+
/* @__PURE__ */ U(x2, {
|
|
42756
42834
|
isOpen: Et,
|
|
42757
42835
|
listboxId: Tt,
|
|
42758
42836
|
label: ce.mentionSuggestions,
|
|
@@ -42835,7 +42913,7 @@ var Z2 = [], Q2 = () => null, $2 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
42835
42913
|
children: It
|
|
42836
42914
|
}, "input")
|
|
42837
42915
|
})
|
|
42838
|
-
] }), Rt = F(
|
|
42916
|
+
] }), Rt = F(C2, M && "!border-f1-border-selected", ee);
|
|
42839
42917
|
return N ? /* @__PURE__ */ U("form", {
|
|
42840
42918
|
ref: te,
|
|
42841
42919
|
"data-testid": oe,
|
|
@@ -42861,7 +42939,7 @@ var Z2 = [], Q2 = () => null, $2 = ({ onSend: e, inProgress: t = !1, onStop: n,
|
|
|
42861
42939
|
};
|
|
42862
42940
|
//#endregion
|
|
42863
42941
|
//#region src/addons/ai/ai/F0AiChat/hooks/useRevealOnChange.ts
|
|
42864
|
-
function
|
|
42942
|
+
function b4(e, t, n = .2) {
|
|
42865
42943
|
let r = O(), [i, a] = H(!0), o = V(e);
|
|
42866
42944
|
return S(() => {
|
|
42867
42945
|
if (o.current === e) return;
|
|
@@ -42885,10 +42963,10 @@ function e4(e, t, n = .2) {
|
|
|
42885
42963
|
}
|
|
42886
42964
|
//#endregion
|
|
42887
42965
|
//#region src/addons/ai/ai/F0AiChat/providers/AiChatStateProvider.tsx
|
|
42888
|
-
var
|
|
42966
|
+
var x4 = Pr(null), S4 = () => {}, C4 = [{
|
|
42889
42967
|
id: "ai",
|
|
42890
42968
|
restoresContent: !0
|
|
42891
|
-
}],
|
|
42969
|
+
}], w4 = (e) => ({
|
|
42892
42970
|
open: e.open,
|
|
42893
42971
|
setOpen: e.setOpen,
|
|
42894
42972
|
resizable: e.resizable,
|
|
@@ -42911,15 +42989,15 @@ var t4 = Pr(null), n4 = () => {}, r4 = [{
|
|
|
42911
42989
|
setPanelContentSide: e.setContentSide,
|
|
42912
42990
|
shouldPlayEntranceAnimation: e.shouldPlayEntranceAnimation,
|
|
42913
42991
|
setShouldPlayEntranceAnimation: e.setShouldPlayEntranceAnimation
|
|
42914
|
-
}),
|
|
42915
|
-
views:
|
|
42992
|
+
}), T4 = (e) => t2() ? /* @__PURE__ */ U(E4, { ...e }) : /* @__PURE__ */ U(Q0, {
|
|
42993
|
+
views: C4,
|
|
42916
42994
|
side: e.side,
|
|
42917
42995
|
contentSide: e.panelContentSide,
|
|
42918
42996
|
resizable: e.resizable,
|
|
42919
42997
|
defaultLayout: e.defaultVisualizationMode === "fullscreen" ? "fullscreen" : "sidepanel",
|
|
42920
|
-
children: /* @__PURE__ */ U(
|
|
42921
|
-
}),
|
|
42922
|
-
let [D, O] = H(p), [k, A] = H(t), j =
|
|
42998
|
+
children: /* @__PURE__ */ U(E4, { ...e })
|
|
42999
|
+
}), E4 = ({ children: e, enabled: t, agent: n, initialMessage: r, chatHeader: i, chatMessages: a, chatInput: o, chatOverlay: s, welcomeScreenSuggestions: c = [], welcomeScreenCards: l = [], disclaimer: u, lockVisualizationMode: d = !1, historyEnabled: f = !1, footer: p, VoiceMode: m, entityRefs: h, canvasActions: g, canvasEntities: _, credits: v, employeeCredits: y, creditWarning: b, fileAttachments: x, filePreviews: S, onTranscribe: C, onThumbsDown: w, onThumbsUp: T, tracking: E }) => {
|
|
43000
|
+
let [D, O] = H(p), [k, A] = H(t), j = e2(), { open: M, setOpen: N, layout: ee, setLayout: te } = j, [ne, re] = H("chat"), [ie, ae] = H(n), [oe, se] = H(c), [ce, le] = H(l), ue = He(), { currentPath: de } = Be(), [fe, pe] = H([ue.t("ai.inputPlaceholder")]), [P, me] = H(r), [he, ge] = H(null), _e = he ? "canvas" : ee, ve = V(he);
|
|
42923
43001
|
ve.current = he;
|
|
42924
43002
|
let ye = V(ee);
|
|
42925
43003
|
ye.current = ee;
|
|
@@ -42972,7 +43050,7 @@ var t4 = Pr(null), n4 = () => {}, r4 = [{
|
|
|
42972
43050
|
let Xe = z((e) => {
|
|
42973
43051
|
e && ge(null), j.present(e);
|
|
42974
43052
|
}, [j]);
|
|
42975
|
-
return /* @__PURE__ */ U(
|
|
43053
|
+
return /* @__PURE__ */ U(x4.Provider, {
|
|
42976
43054
|
value: {
|
|
42977
43055
|
enabled: k,
|
|
42978
43056
|
setEnabled: A,
|
|
@@ -43034,18 +43112,18 @@ var t4 = Pr(null), n4 = () => {}, r4 = [{
|
|
|
43034
43112
|
},
|
|
43035
43113
|
children: e
|
|
43036
43114
|
});
|
|
43037
|
-
},
|
|
43115
|
+
}, D4 = /* @__PURE__ */ new Set([
|
|
43038
43116
|
"enabled",
|
|
43039
43117
|
"fileDragOver",
|
|
43040
43118
|
"lockVisualizationMode",
|
|
43041
43119
|
"historyEnabled",
|
|
43042
43120
|
"isClarifying"
|
|
43043
|
-
]),
|
|
43121
|
+
]), O4 = /* @__PURE__ */ new Set([
|
|
43044
43122
|
"canvasContent",
|
|
43045
43123
|
"pendingContext",
|
|
43046
43124
|
"pendingQuote",
|
|
43047
43125
|
"activeGame"
|
|
43048
|
-
]),
|
|
43126
|
+
]), k4 = /* @__PURE__ */ new Set([
|
|
43049
43127
|
"agent",
|
|
43050
43128
|
"initialMessage",
|
|
43051
43129
|
"chatHeader",
|
|
@@ -43067,34 +43145,34 @@ var t4 = Pr(null), n4 = () => {}, r4 = [{
|
|
|
43067
43145
|
"onTranscribe",
|
|
43068
43146
|
"onThumbsUp",
|
|
43069
43147
|
"onThumbsDown"
|
|
43070
|
-
]),
|
|
43148
|
+
]), A4 = {
|
|
43071
43149
|
visualizationMode: "sidepanel",
|
|
43072
43150
|
mode: "chat",
|
|
43073
43151
|
placeholders: [],
|
|
43074
43152
|
welcomeScreenSuggestions: [],
|
|
43075
43153
|
welcomeScreenCards: [],
|
|
43076
43154
|
focusChatInput: () => !1
|
|
43077
|
-
},
|
|
43155
|
+
}, j4 = (e) => {
|
|
43078
43156
|
let t = e;
|
|
43079
|
-
if (t in
|
|
43080
|
-
if (
|
|
43081
|
-
if (!
|
|
43157
|
+
if (t in A4) return A4[t];
|
|
43158
|
+
if (O4.has(t)) return null;
|
|
43159
|
+
if (!k4.has(t)) return !D4.has(t) && S4;
|
|
43082
43160
|
};
|
|
43083
|
-
function
|
|
43084
|
-
let e = zr(
|
|
43161
|
+
function M4() {
|
|
43162
|
+
let e = zr(x4), t = e2();
|
|
43085
43163
|
return Ur(() => {
|
|
43086
|
-
let n =
|
|
43164
|
+
let n = w4(t);
|
|
43087
43165
|
return e ? {
|
|
43088
43166
|
...e,
|
|
43089
43167
|
...n
|
|
43090
43168
|
} : new Proxy({}, { get(e, t) {
|
|
43091
|
-
if (typeof t == "string") return t in n ? n[t] :
|
|
43169
|
+
if (typeof t == "string") return t in n ? n[t] : j4(t);
|
|
43092
43170
|
} });
|
|
43093
43171
|
}, [e, t]);
|
|
43094
43172
|
}
|
|
43095
43173
|
//#endregion
|
|
43096
43174
|
//#region src/elements/primitives/_primitives/F0Attachments/hooks/useMountOnVisible.ts
|
|
43097
|
-
var
|
|
43175
|
+
var N4 = () => {
|
|
43098
43176
|
let [e, t] = H(() => typeof IntersectionObserver > "u"), n = V(null), r = V(e);
|
|
43099
43177
|
return {
|
|
43100
43178
|
ref: z((e) => {
|
|
@@ -43106,7 +43184,7 @@ var p4 = () => {
|
|
|
43106
43184
|
}, []),
|
|
43107
43185
|
shouldMount: e
|
|
43108
43186
|
};
|
|
43109
|
-
},
|
|
43187
|
+
}, P4 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ */ U("span", {
|
|
43110
43188
|
title: e,
|
|
43111
43189
|
className: F("line-clamp-1 min-w-0 max-w-full overflow-hidden whitespace-normal", t),
|
|
43112
43190
|
style: {
|
|
@@ -43118,25 +43196,25 @@ var p4 = () => {
|
|
|
43118
43196
|
title: e,
|
|
43119
43197
|
className: F("block min-w-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap", t),
|
|
43120
43198
|
children: e
|
|
43121
|
-
}),
|
|
43199
|
+
}), F4 = () => import("./PdfThumbnail-CSm1-nL6.js"), I4 = () => import("./SheetThumbnail-HtGezPp4.js"), L4 = () => import("./DocxThumbnail-kHTNnwW0.js"), R4 = () => import("./TextThumbnail-X04JgaNI.js"), z4 = Lr(F4), B4 = Lr(I4), V4 = Lr(L4), H4 = Lr(R4), U4 = 384, W4 = 160, G4 = ({ kind: e, url: t, width: n, onError: r, onRendered: i }) => e === "pdf" ? /* @__PURE__ */ U(z4, {
|
|
43122
43200
|
url: t,
|
|
43123
43201
|
width: n,
|
|
43124
43202
|
onError: r,
|
|
43125
43203
|
onRendered: i
|
|
43126
|
-
}) : e === "sheet" ? /* @__PURE__ */ U(
|
|
43204
|
+
}) : e === "sheet" ? /* @__PURE__ */ U(B4, {
|
|
43127
43205
|
url: t,
|
|
43128
43206
|
onError: r,
|
|
43129
43207
|
onRendered: i
|
|
43130
|
-
}) : e === "docx" ? /* @__PURE__ */ U(
|
|
43208
|
+
}) : e === "docx" ? /* @__PURE__ */ U(V4, {
|
|
43131
43209
|
url: t,
|
|
43132
43210
|
width: n,
|
|
43133
43211
|
onError: r,
|
|
43134
43212
|
onRendered: i
|
|
43135
|
-
}) : e === "text" ? /* @__PURE__ */ U(
|
|
43213
|
+
}) : e === "text" ? /* @__PURE__ */ U(H4, {
|
|
43136
43214
|
url: t,
|
|
43137
43215
|
onError: r,
|
|
43138
43216
|
onRendered: i
|
|
43139
|
-
}) : null,
|
|
43217
|
+
}) : null, K4 = ({ file: e, action: t, cornerClass: n, surfaceClassName: r, testIdPrefix: i }) => {
|
|
43140
43218
|
let a = {
|
|
43141
43219
|
name: e.name,
|
|
43142
43220
|
type: e.mimeType ?? ""
|
|
@@ -43163,21 +43241,21 @@ var p4 = () => {
|
|
|
43163
43241
|
children: e.name
|
|
43164
43242
|
})] }) : null]
|
|
43165
43243
|
});
|
|
43166
|
-
},
|
|
43167
|
-
let h = He(), g =
|
|
43244
|
+
}, q4 = ({ file: e, kind: t, cornerClass: n = "rounded-xl", action: r, previewDisabled: i = !1, compact: a = !1, surfaceClassName: o, onOpened: s, onBeforeOpen: c, onDownloaded: l, testIdPrefix: u = "chat", lazyMount: d = !1, failedAction: f, fitWidth: p = !1, decorativeSnapshot: m = !1 }) => {
|
|
43245
|
+
let h = He(), g = I1(), _ = M1(), [v, y] = H(!1), b = N4(), x = !d || b.shouldMount, S = A1(t === "pdf" ? e.previewUrl ?? e.url : e.url, { enabled: x }), C = r ?? {
|
|
43168
43246
|
label: h.t("chat.downloadNamedFile", { name: e.name }),
|
|
43169
43247
|
icon: qa,
|
|
43170
43248
|
onClick: () => {
|
|
43171
43249
|
_(e.url, e.name), l?.();
|
|
43172
43250
|
}
|
|
43173
|
-
}, w = a ? 64 :
|
|
43251
|
+
}, w = a ? 64 : U4, T = J4(p && !a, w), E = b.ref, D = T.setElement, O = z((e) => {
|
|
43174
43252
|
d && E(e), D(e);
|
|
43175
43253
|
}, [
|
|
43176
43254
|
d,
|
|
43177
43255
|
E,
|
|
43178
43256
|
D
|
|
43179
43257
|
]), k = v || S.status === "error";
|
|
43180
|
-
return k && a ? /* @__PURE__ */ U(
|
|
43258
|
+
return k && a ? /* @__PURE__ */ U(K4, {
|
|
43181
43259
|
file: e,
|
|
43182
43260
|
action: f === void 0 ? C : f,
|
|
43183
43261
|
cornerClass: n,
|
|
@@ -43200,7 +43278,7 @@ var p4 = () => {
|
|
|
43200
43278
|
},
|
|
43201
43279
|
size: "md"
|
|
43202
43280
|
}),
|
|
43203
|
-
/* @__PURE__ */ U(
|
|
43281
|
+
/* @__PURE__ */ U(P4, {
|
|
43204
43282
|
className: "grow text-sm font-medium text-f1-foreground",
|
|
43205
43283
|
children: e.name
|
|
43206
43284
|
}),
|
|
@@ -43215,18 +43293,18 @@ var p4 = () => {
|
|
|
43215
43293
|
}) : null
|
|
43216
43294
|
]
|
|
43217
43295
|
}),
|
|
43218
|
-
k ? /* @__PURE__ */ U(
|
|
43219
|
-
height:
|
|
43296
|
+
k ? /* @__PURE__ */ U(Y4, {
|
|
43297
|
+
height: W4,
|
|
43220
43298
|
surfaceClassName: o,
|
|
43221
43299
|
testIdPrefix: u,
|
|
43222
43300
|
download: r ? void 0 : C
|
|
43223
|
-
}) : /* @__PURE__ */ U(
|
|
43301
|
+
}) : /* @__PURE__ */ U(X4, {
|
|
43224
43302
|
file: e,
|
|
43225
43303
|
kind: t,
|
|
43226
43304
|
compact: a,
|
|
43227
43305
|
url: x && S.status === "ready" ? S.url : void 0,
|
|
43228
43306
|
width: w - 2,
|
|
43229
|
-
height: a ? "100%" :
|
|
43307
|
+
height: a ? "100%" : W4,
|
|
43230
43308
|
scale: T.value,
|
|
43231
43309
|
previewDisabled: i,
|
|
43232
43310
|
decorative: m,
|
|
@@ -43254,7 +43332,7 @@ var p4 = () => {
|
|
|
43254
43332
|
})] }) : null
|
|
43255
43333
|
]
|
|
43256
43334
|
});
|
|
43257
|
-
},
|
|
43335
|
+
}, J4 = (e, t) => {
|
|
43258
43336
|
let [n, r] = H(null), [i, a] = H(1);
|
|
43259
43337
|
return Hr(() => {
|
|
43260
43338
|
if (!e || !n) return;
|
|
@@ -43273,7 +43351,7 @@ var p4 = () => {
|
|
|
43273
43351
|
setElement: r,
|
|
43274
43352
|
value: i
|
|
43275
43353
|
};
|
|
43276
|
-
},
|
|
43354
|
+
}, Y4 = ({ height: e, surfaceClassName: t, testIdPrefix: n, download: r }) => {
|
|
43277
43355
|
let i = He();
|
|
43278
43356
|
return /* @__PURE__ */ W("div", {
|
|
43279
43357
|
className: F("flex flex-col items-center justify-center gap-2 border-0 border-t border-solid border-f1-border-secondary bg-f1-background-secondary px-4", t),
|
|
@@ -43292,8 +43370,8 @@ var p4 = () => {
|
|
|
43292
43370
|
onClick: r.onClick
|
|
43293
43371
|
}) : null]
|
|
43294
43372
|
});
|
|
43295
|
-
},
|
|
43296
|
-
let p = He(), { reducedMotion: m } =
|
|
43373
|
+
}, X4 = ({ file: e, kind: t, compact: n, url: r, width: i, height: a, scale: o, previewDisabled: s, decorative: c, surfaceClassName: l, testIdPrefix: u, onOpen: d, onFailed: f }) => {
|
|
43374
|
+
let p = He(), { reducedMotion: m } = v1(), [h, g] = H(!1);
|
|
43297
43375
|
return /* @__PURE__ */ W("button", {
|
|
43298
43376
|
type: "button",
|
|
43299
43377
|
onClick: d,
|
|
@@ -43313,7 +43391,7 @@ var p4 = () => {
|
|
|
43313
43391
|
"data-testid": `${u}-document-snapshot`,
|
|
43314
43392
|
children: /* @__PURE__ */ U(Mr, {
|
|
43315
43393
|
fallback: null,
|
|
43316
|
-
children: r ? /* @__PURE__ */ U(
|
|
43394
|
+
children: r ? /* @__PURE__ */ U(G4, {
|
|
43317
43395
|
kind: t,
|
|
43318
43396
|
url: r,
|
|
43319
43397
|
width: i,
|
|
@@ -43323,14 +43401,14 @@ var p4 = () => {
|
|
|
43323
43401
|
})
|
|
43324
43402
|
})]
|
|
43325
43403
|
});
|
|
43326
|
-
},
|
|
43404
|
+
}, Z4 = ({ attachment: e, status: t, errorMessage: n, removeLabel: r, onRemove: i, testIdPrefix: a = "chat" }) => {
|
|
43327
43405
|
let o = t === "uploading", s = t === "error", [c, l] = H(null), u = c === e.url, d, f, p = "";
|
|
43328
|
-
if (e.kind === "image") f = "image-preview", p = "h-16 w-16", d = /* @__PURE__ */ U(
|
|
43406
|
+
if (e.kind === "image") f = "image-preview", p = "h-16 w-16", d = /* @__PURE__ */ U(q1, {
|
|
43329
43407
|
src: e.thumbnailUrl ?? e.url,
|
|
43330
43408
|
alt: e.name,
|
|
43331
43409
|
className: "h-16 w-16 rounded-lg border border-solid border-f1-border-secondary object-cover"
|
|
43332
43410
|
});
|
|
43333
|
-
else if (
|
|
43411
|
+
else if (Q1(e) && !u) f = "video-preview", p = "box-border h-16 w-28 border border-solid border-f1-border-secondary bg-f1-background-secondary", d = /* @__PURE__ */ U("div", {
|
|
43334
43412
|
className: "h-full w-full",
|
|
43335
43413
|
children: /* @__PURE__ */ U("video", {
|
|
43336
43414
|
src: e.url,
|
|
@@ -43350,8 +43428,8 @@ var p4 = () => {
|
|
|
43350
43428
|
})
|
|
43351
43429
|
});
|
|
43352
43430
|
else {
|
|
43353
|
-
let t =
|
|
43354
|
-
t &&
|
|
43431
|
+
let t = t0(e);
|
|
43432
|
+
t && r0(e, t) ? (f = "document-preview", d = /* @__PURE__ */ U(q4, {
|
|
43355
43433
|
file: e,
|
|
43356
43434
|
kind: t,
|
|
43357
43435
|
cornerClass: "rounded-lg",
|
|
@@ -43378,11 +43456,11 @@ var p4 = () => {
|
|
|
43378
43456
|
"data-testid": `${a}-composer-${f}`,
|
|
43379
43457
|
"data-status": t,
|
|
43380
43458
|
children: [
|
|
43381
|
-
/* @__PURE__ */ U(
|
|
43459
|
+
/* @__PURE__ */ U(Q4, {
|
|
43382
43460
|
active: o,
|
|
43383
43461
|
children: d
|
|
43384
43462
|
}),
|
|
43385
|
-
/* @__PURE__ */ U(
|
|
43463
|
+
/* @__PURE__ */ U($4, {
|
|
43386
43464
|
uploading: o,
|
|
43387
43465
|
failed: s,
|
|
43388
43466
|
testIdPrefix: a
|
|
@@ -43409,14 +43487,14 @@ var p4 = () => {
|
|
|
43409
43487
|
label: n,
|
|
43410
43488
|
children: m
|
|
43411
43489
|
}) : m;
|
|
43412
|
-
},
|
|
43413
|
-
let { reducedMotion: n } =
|
|
43490
|
+
}, Q4 = ({ active: e, children: t }) => {
|
|
43491
|
+
let { reducedMotion: n } = v1();
|
|
43414
43492
|
return /* @__PURE__ */ U("div", {
|
|
43415
43493
|
className: F("flex h-full w-full", !n && "transition-[filter,transform] duration-200 ease-out", e && "scale-[1.08] blur-[4px]"),
|
|
43416
43494
|
children: t
|
|
43417
43495
|
});
|
|
43418
|
-
},
|
|
43419
|
-
let { reducedMotion: r } =
|
|
43496
|
+
}, $4 = ({ uploading: e, failed: t, testIdPrefix: n }) => {
|
|
43497
|
+
let { reducedMotion: r } = v1(), i = {
|
|
43420
43498
|
duration: r ? 0 : .18,
|
|
43421
43499
|
ease: "easeOut"
|
|
43422
43500
|
};
|
|
@@ -43454,7 +43532,7 @@ var p4 = () => {
|
|
|
43454
43532
|
})
|
|
43455
43533
|
}, "overlay") : null
|
|
43456
43534
|
});
|
|
43457
|
-
},
|
|
43535
|
+
}, e3 = ({ items: e, label: t, busy: n, reducedMotion: r, stripRef: i, testIdPrefix: a = "chat" }) => /* @__PURE__ */ U(ge, {
|
|
43458
43536
|
initial: !1,
|
|
43459
43537
|
children: e.length > 0 ? /* @__PURE__ */ U(De.div, {
|
|
43460
43538
|
className: "overflow-hidden",
|
|
@@ -43472,7 +43550,7 @@ var p4 = () => {
|
|
|
43472
43550
|
},
|
|
43473
43551
|
transition: {
|
|
43474
43552
|
duration: r ? 0 : .18,
|
|
43475
|
-
ease:
|
|
43553
|
+
ease: U1
|
|
43476
43554
|
},
|
|
43477
43555
|
children: /* @__PURE__ */ U("div", {
|
|
43478
43556
|
ref: i,
|
|
@@ -43500,11 +43578,11 @@ var p4 = () => {
|
|
|
43500
43578
|
exit: r ? void 0 : {
|
|
43501
43579
|
opacity: 0,
|
|
43502
43580
|
scale: .95,
|
|
43503
|
-
transition:
|
|
43581
|
+
transition: G1
|
|
43504
43582
|
},
|
|
43505
43583
|
transition: {
|
|
43506
|
-
...
|
|
43507
|
-
layout:
|
|
43584
|
+
...W1,
|
|
43585
|
+
layout: K1
|
|
43508
43586
|
},
|
|
43509
43587
|
children: /* @__PURE__ */ U(De.div, {
|
|
43510
43588
|
className: "flex",
|
|
@@ -43517,7 +43595,7 @@ var p4 = () => {
|
|
|
43517
43595
|
})
|
|
43518
43596
|
})
|
|
43519
43597
|
}, "attachments-row") : null
|
|
43520
|
-
}),
|
|
43598
|
+
}), t3 = ke({
|
|
43521
43599
|
base: "flex gap-md",
|
|
43522
43600
|
variants: {
|
|
43523
43601
|
align: {
|
|
@@ -43577,11 +43655,11 @@ var p4 = () => {
|
|
|
43577
43655
|
fullWidthOnStack: !1,
|
|
43578
43656
|
reverseOnStack: !1
|
|
43579
43657
|
}
|
|
43580
|
-
}),
|
|
43658
|
+
}), n3 = {
|
|
43581
43659
|
sm: 640,
|
|
43582
43660
|
md: 768,
|
|
43583
43661
|
"container-md": 448
|
|
43584
|
-
},
|
|
43662
|
+
}, r3 = (e) => "type" in e && e.type === "separator", i3 = (e) => "type" in e && e.type === "split", a3 = (e) => !("type" in e), o3 = (e, t, n) => /* @__PURE__ */ U(xe, {
|
|
43585
43663
|
label: e.label,
|
|
43586
43664
|
icon: e.icon,
|
|
43587
43665
|
iconPosition: e.iconPosition,
|
|
@@ -43595,29 +43673,29 @@ var p4 = () => {
|
|
|
43595
43673
|
href: e.href,
|
|
43596
43674
|
target: e.target
|
|
43597
43675
|
}
|
|
43598
|
-
}, e.id),
|
|
43676
|
+
}, e.id), s3 = (e, t, n) => {
|
|
43599
43677
|
let { id: r, type: i, ...a } = e;
|
|
43600
43678
|
return /* @__PURE__ */ U(KB, {
|
|
43601
43679
|
...a,
|
|
43602
43680
|
size: t,
|
|
43603
43681
|
variant: n
|
|
43604
43682
|
}, r);
|
|
43605
|
-
},
|
|
43683
|
+
}, c3 = (e, t) => /* @__PURE__ */ U(xe, {
|
|
43606
43684
|
label: e.label,
|
|
43607
43685
|
variant: "outline",
|
|
43608
43686
|
size: t,
|
|
43609
43687
|
disabled: e.disabled,
|
|
43610
43688
|
href: e.href,
|
|
43611
43689
|
target: e.target
|
|
43612
|
-
}, "secondary-link"),
|
|
43690
|
+
}, "secondary-link"), l3 = (e, t) => {
|
|
43613
43691
|
let n = e.variant ?? "default";
|
|
43614
|
-
return
|
|
43692
|
+
return i3(e) ? s3(e, t, n) : o3(e, t, n);
|
|
43615
43693
|
};
|
|
43616
|
-
function
|
|
43694
|
+
function u3({ primaryAction: e, secondaryActions: t, otherActions: n = [], size: r = "md", align: i = "end", stack: a = "none", fullWidthOnStack: o = !1, reverseOnStack: s = !1, canOverflow: c = !0, className: l }) {
|
|
43617
43695
|
let u = V(null), { width: d = 0 } = it({
|
|
43618
43696
|
ref: u,
|
|
43619
43697
|
box: "border-box"
|
|
43620
|
-
}), f = a === "sm" || a === "md" ?
|
|
43698
|
+
}), f = a === "sm" || a === "md" ? n3[a] : n3.md, p = E(`(min-width: ${f}px)`, { initializeWithValue: !1 }), m = a === "none" ? !0 : a === "container-md" ? d >= n3["container-md"] : p, h = typeof r == "string" ? r : r.base, g = typeof r == "string" ? r : r.md, _ = m ? g : h, v = {
|
|
43621
43699
|
primaryAction: e,
|
|
43622
43700
|
secondaryItems: Array.isArray(t) ? t : [],
|
|
43623
43701
|
secondaryLink: t != null && !Array.isArray(t) ? t : void 0,
|
|
@@ -43629,26 +43707,26 @@ function W4({ primaryAction: e, secondaryActions: t, otherActions: n = [], size:
|
|
|
43629
43707
|
return /* @__PURE__ */ U("div", {
|
|
43630
43708
|
ref: u,
|
|
43631
43709
|
role: "group",
|
|
43632
|
-
className: F(m ? "flex w-full items-center gap-md [&>*:not(:first-child)]:shrink-0" :
|
|
43710
|
+
className: F(m ? "flex w-full items-center gap-md [&>*:not(:first-child)]:shrink-0" : t3({
|
|
43633
43711
|
align: i,
|
|
43634
43712
|
stack: a,
|
|
43635
43713
|
fullWidthOnStack: o,
|
|
43636
43714
|
reverseOnStack: s
|
|
43637
43715
|
}), l),
|
|
43638
|
-
children: m ? /* @__PURE__ */ U(
|
|
43716
|
+
children: m ? /* @__PURE__ */ U(f3, { ...v }, "row") : /* @__PURE__ */ U(d3, { ...v }, "stacked")
|
|
43639
43717
|
});
|
|
43640
43718
|
}
|
|
43641
|
-
function
|
|
43642
|
-
let a = t.filter((e) => !
|
|
43719
|
+
function d3({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherActions: r, size: i }) {
|
|
43720
|
+
let a = t.filter((e) => !r3(e)).map((e) => i3(e) ? s3(e, i, "outline") : o3(e, i, "outline"));
|
|
43643
43721
|
return /* @__PURE__ */ W(Gr, { children: [
|
|
43644
43722
|
r.length > 0 ? /* @__PURE__ */ U(nf, { items: r }) : null,
|
|
43645
43723
|
a,
|
|
43646
|
-
n ?
|
|
43647
|
-
e ?
|
|
43724
|
+
n ? c3(n, i) : null,
|
|
43725
|
+
e ? l3(e, i) : null
|
|
43648
43726
|
] });
|
|
43649
43727
|
}
|
|
43650
|
-
function
|
|
43651
|
-
let s = Ur(() => t.filter(
|
|
43728
|
+
function f3({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherActions: r, size: i, align: a, canOverflow: o }) {
|
|
43729
|
+
let s = Ur(() => t.filter(a3), [t]), { containerRef: c, measurementContainerRef: l, customOverflowIndicatorRef: u, visibleItems: d, overflowItems: f, isInitialized: p } = Lt(s, 8);
|
|
43652
43730
|
B(() => {
|
|
43653
43731
|
l.current?.setAttribute("inert", "");
|
|
43654
43732
|
}, [l]);
|
|
@@ -43658,14 +43736,14 @@ function K4({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherAction
|
|
|
43658
43736
|
} : {
|
|
43659
43737
|
shown: d,
|
|
43660
43738
|
overflowed: f
|
|
43661
|
-
}, g = new Set(m.map((e) => e.id)), _ = e ?
|
|
43739
|
+
}, g = new Set(m.map((e) => e.id)), _ = e ? l3(e, i) : null, v = t.filter(i3), y = t[t.length - 1], b = y != null && r3(y) && (v.length > 0 || _ != null), x = [];
|
|
43662
43740
|
t.forEach((e, t) => {
|
|
43663
|
-
|
|
43741
|
+
i3(e) || (r3(e) ? x.push({
|
|
43664
43742
|
kind: "sep",
|
|
43665
43743
|
key: `sep-${t}`
|
|
43666
43744
|
}) : g.has(e.id) && x.push({
|
|
43667
43745
|
kind: "node",
|
|
43668
|
-
node:
|
|
43746
|
+
node: o3(e, i, "outline")
|
|
43669
43747
|
}));
|
|
43670
43748
|
});
|
|
43671
43749
|
let S = x.filter((e, t) => e.kind === "node" || x[t - 1]?.kind === "node" && x[t + 1]?.kind === "node"), C = [
|
|
@@ -43688,7 +43766,7 @@ function K4({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherAction
|
|
|
43688
43766
|
ref: l,
|
|
43689
43767
|
"aria-hidden": "true",
|
|
43690
43768
|
className: "pointer-events-none invisible absolute left-0 top-0 flex items-center gap-md whitespace-nowrap",
|
|
43691
|
-
children: s.map((e) =>
|
|
43769
|
+
children: s.map((e) => o3(e, i, "outline"))
|
|
43692
43770
|
}) : null,
|
|
43693
43771
|
C.length > 0 ? /* @__PURE__ */ U("div", {
|
|
43694
43772
|
ref: u,
|
|
@@ -43698,16 +43776,16 @@ function K4({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherAction
|
|
|
43698
43776
|
size: i
|
|
43699
43777
|
})
|
|
43700
43778
|
}) : null,
|
|
43701
|
-
S.map((e) => e.kind === "sep" ? /* @__PURE__ */ U(
|
|
43702
|
-
n ?
|
|
43779
|
+
S.map((e) => e.kind === "sep" ? /* @__PURE__ */ U(p3, {}, e.key) : e.node),
|
|
43780
|
+
n ? c3(n, i) : null
|
|
43703
43781
|
]
|
|
43704
43782
|
}),
|
|
43705
|
-
v.map((e) =>
|
|
43706
|
-
b ? /* @__PURE__ */ U(
|
|
43783
|
+
v.map((e) => s3(e, i, "outline")),
|
|
43784
|
+
b ? /* @__PURE__ */ U(p3, {}) : null,
|
|
43707
43785
|
_
|
|
43708
43786
|
] });
|
|
43709
43787
|
}
|
|
43710
|
-
function
|
|
43788
|
+
function p3() {
|
|
43711
43789
|
return /* @__PURE__ */ U("div", {
|
|
43712
43790
|
role: "separator",
|
|
43713
43791
|
"aria-orientation": "vertical",
|
|
@@ -43716,22 +43794,22 @@ function q4() {
|
|
|
43716
43794
|
}
|
|
43717
43795
|
//#endregion
|
|
43718
43796
|
//#region src/elements/F0CardHorizontal/components/CardHorizontalActions.tsx
|
|
43719
|
-
var
|
|
43797
|
+
var m3 = {
|
|
43720
43798
|
sm: "flex flex-col @xs:flex-row @xs:items-start @xs:justify-between @xs:gap-4",
|
|
43721
43799
|
md: "flex flex-col @md:flex-row @md:items-start @md:justify-between @md:gap-4",
|
|
43722
43800
|
lg: "flex flex-col @lg:flex-row @lg:items-start @lg:justify-between @lg:gap-4",
|
|
43723
43801
|
never: "flex flex-row items-start justify-between gap-4"
|
|
43724
|
-
},
|
|
43802
|
+
}, h3 = {
|
|
43725
43803
|
sm: "@xs:self-center",
|
|
43726
43804
|
md: "@md:self-center",
|
|
43727
43805
|
lg: "@lg:self-center",
|
|
43728
43806
|
never: "self-center"
|
|
43729
|
-
},
|
|
43807
|
+
}, g3 = {
|
|
43730
43808
|
sm: "@xs:flex-1",
|
|
43731
43809
|
md: "@md:flex-1",
|
|
43732
43810
|
lg: "@lg:flex-1",
|
|
43733
43811
|
never: "flex-1"
|
|
43734
|
-
},
|
|
43812
|
+
}, _3 = {
|
|
43735
43813
|
sm: {
|
|
43736
43814
|
sm: "@xs:pt-2",
|
|
43737
43815
|
md: "@md:pt-2",
|
|
@@ -43744,46 +43822,46 @@ var J4 = {
|
|
|
43744
43822
|
lg: "@lg:pt-1",
|
|
43745
43823
|
never: "pt-1"
|
|
43746
43824
|
}
|
|
43747
|
-
},
|
|
43825
|
+
}, v3 = {
|
|
43748
43826
|
sm: "@xs:min-h-10",
|
|
43749
43827
|
md: "@md:min-h-10",
|
|
43750
43828
|
lg: "@lg:min-h-10",
|
|
43751
43829
|
never: "min-h-10"
|
|
43752
|
-
},
|
|
43830
|
+
}, y3 = {
|
|
43753
43831
|
sm: "hidden @xs:flex",
|
|
43754
43832
|
md: "hidden @md:flex",
|
|
43755
43833
|
lg: "hidden @lg:flex",
|
|
43756
43834
|
never: "flex"
|
|
43757
|
-
},
|
|
43835
|
+
}, b3 = {
|
|
43758
43836
|
sm: "flex @xs:hidden",
|
|
43759
43837
|
md: "flex @md:hidden",
|
|
43760
43838
|
lg: "flex @lg:hidden",
|
|
43761
43839
|
never: "hidden"
|
|
43762
|
-
},
|
|
43840
|
+
}, x3 = {
|
|
43763
43841
|
sm: "-mx-4 mt-4 border-0 border-t border-solid border-t-f1-border-secondary px-4 pt-4 @xs:mx-0 @xs:mt-0 @xs:border-t-0 @xs:px-0 @xs:pt-0",
|
|
43764
43842
|
md: "-mx-4 mt-4 border-0 border-t border-solid border-t-f1-border-secondary px-4 pt-4 @md:mx-0 @md:mt-0 @md:border-t-0 @md:px-0 @md:pt-0",
|
|
43765
43843
|
lg: "-mx-4 mt-4 border-0 border-t border-solid border-t-f1-border-secondary px-4 pt-4 @lg:mx-0 @lg:mt-0 @lg:border-t-0 @lg:px-0 @lg:pt-0",
|
|
43766
43844
|
never: ""
|
|
43767
|
-
},
|
|
43845
|
+
}, S3 = {
|
|
43768
43846
|
neutral: "secondary",
|
|
43769
43847
|
info: "info",
|
|
43770
43848
|
positive: "positive",
|
|
43771
43849
|
warning: "warning",
|
|
43772
43850
|
critical: "critical"
|
|
43773
43851
|
};
|
|
43774
|
-
function
|
|
43775
|
-
let l = c ?
|
|
43852
|
+
function C3({ primaryAction: e, secondaryActions: t, otherActions: n, size: r = "md", confirmAction: i, rejectAction: a, status: o, stackAt: s = "never", hasAvatar: c = !1 }) {
|
|
43853
|
+
let l = c ? _3[r][s] : void 0;
|
|
43776
43854
|
if (o) return /* @__PURE__ */ U("div", {
|
|
43777
|
-
className: F("flex items-center justify-end", c &&
|
|
43855
|
+
className: F("flex items-center justify-end", c && v3[s], x3[s]),
|
|
43778
43856
|
children: /* @__PURE__ */ U(Ae, {
|
|
43779
43857
|
icon: o.icon,
|
|
43780
|
-
color:
|
|
43858
|
+
color: S3[o.variant],
|
|
43781
43859
|
size: "lg",
|
|
43782
43860
|
role: "img",
|
|
43783
43861
|
"aria-label": o.label
|
|
43784
43862
|
})
|
|
43785
43863
|
});
|
|
43786
|
-
let u = F("relative z-[1]",
|
|
43864
|
+
let u = F("relative z-[1]", g3[s], x3[s], l), d = (e) => /* @__PURE__ */ U("div", {
|
|
43787
43865
|
className: u,
|
|
43788
43866
|
onClick: (e) => e.stopPropagation(),
|
|
43789
43867
|
children: e
|
|
@@ -43805,19 +43883,19 @@ function r3({ primaryAction: e, secondaryActions: t, otherActions: n, size: r =
|
|
|
43805
43883
|
disabled: i.disabled,
|
|
43806
43884
|
onClick: i.onClick
|
|
43807
43885
|
} : void 0;
|
|
43808
|
-
return /* @__PURE__ */ U(
|
|
43886
|
+
return /* @__PURE__ */ U(u3, {
|
|
43809
43887
|
primaryAction: n,
|
|
43810
43888
|
secondaryActions: t ? [t] : void 0,
|
|
43811
43889
|
size: r,
|
|
43812
43890
|
canOverflow: !1
|
|
43813
43891
|
});
|
|
43814
43892
|
}, t = /* @__PURE__ */ U("div", {
|
|
43815
|
-
className: F("relative z-[1] flex-1", l,
|
|
43893
|
+
className: F("relative z-[1] flex-1", l, y3[s]),
|
|
43816
43894
|
onClick: (e) => e.stopPropagation(),
|
|
43817
43895
|
children: e(!0)
|
|
43818
43896
|
});
|
|
43819
43897
|
return s === "never" ? t : /* @__PURE__ */ W(Gr, { children: [t, /* @__PURE__ */ U("div", {
|
|
43820
|
-
className: F("relative z-[1]",
|
|
43898
|
+
className: F("relative z-[1]", b3[s], x3[s]),
|
|
43821
43899
|
onClick: (e) => e.stopPropagation(),
|
|
43822
43900
|
children: e(!1)
|
|
43823
43901
|
})] });
|
|
@@ -43839,7 +43917,7 @@ function r3({ primaryAction: e, secondaryActions: t, otherActions: n, size: r =
|
|
|
43839
43917
|
onClick: e.onClick,
|
|
43840
43918
|
variant: e.variant
|
|
43841
43919
|
} : void 0;
|
|
43842
|
-
return p || (Array.isArray(t) ? t.length > 0 : t) || (n?.length ?? 0) > 0 ? d(/* @__PURE__ */ U(
|
|
43920
|
+
return p || (Array.isArray(t) ? t.length > 0 : t) || (n?.length ?? 0) > 0 ? d(/* @__PURE__ */ U(u3, {
|
|
43843
43921
|
primaryAction: p,
|
|
43844
43922
|
secondaryActions: f,
|
|
43845
43923
|
otherActions: n,
|
|
@@ -43848,7 +43926,7 @@ function r3({ primaryAction: e, secondaryActions: t, otherActions: n, size: r =
|
|
|
43848
43926
|
}
|
|
43849
43927
|
//#endregion
|
|
43850
43928
|
//#region src/elements/F0CardHorizontal/F0CardHorizontal.tsx
|
|
43851
|
-
var
|
|
43929
|
+
var w3 = ({ title: e, tag: t, inactive: n }) => {
|
|
43852
43930
|
let r = /* @__PURE__ */ U(Bt, {
|
|
43853
43931
|
variant: "body",
|
|
43854
43932
|
content: e,
|
|
@@ -43865,14 +43943,14 @@ var i3 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
43865
43943
|
})
|
|
43866
43944
|
})]
|
|
43867
43945
|
}) : r;
|
|
43868
|
-
},
|
|
43869
|
-
className: F("flex min-w-0 flex-row gap-3",
|
|
43946
|
+
}, T3 = ({ avatar: e, title: t, tag: n, description: r, inactive: i, descriptionAsSingleLine: a, stackAt: o }) => /* @__PURE__ */ W("div", {
|
|
43947
|
+
className: F("flex min-w-0 flex-row gap-3", h3[o], e ? "items-start" : "items-center"),
|
|
43870
43948
|
children: [e ? /* @__PURE__ */ U(iH, {
|
|
43871
43949
|
avatar: e,
|
|
43872
43950
|
size: "lg"
|
|
43873
43951
|
}) : null, /* @__PURE__ */ W("div", {
|
|
43874
43952
|
className: "flex min-w-0 flex-col gap-0",
|
|
43875
|
-
children: [/* @__PURE__ */ U(
|
|
43953
|
+
children: [/* @__PURE__ */ U(w3, {
|
|
43876
43954
|
title: t,
|
|
43877
43955
|
tag: n,
|
|
43878
43956
|
inactive: i
|
|
@@ -43883,7 +43961,7 @@ var i3 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
43883
43961
|
className: F(!a && "break-words", i && "line-through")
|
|
43884
43962
|
}) : null]
|
|
43885
43963
|
})]
|
|
43886
|
-
}),
|
|
43964
|
+
}), E3 = R(function({ title: e, tag: t, description: n, avatar: r, primaryAction: i, secondaryActions: a, otherActions: o, actionsSize: s = "md", confirmAction: c, rejectAction: l, status: u, inactive: d = !1, fullHeight: f = !1, alert: p, link: m, onClick: h, disableOverlayLink: g = !1, stackAt: _ = "never", disabled: v = !1, descriptionAsSingleLine: y = !1 }, b) {
|
|
43887
43965
|
let x = !!p && p.visible !== !1, S = /* @__PURE__ */ W(vl, {
|
|
43888
43966
|
ref: x ? void 0 : b,
|
|
43889
43967
|
className: F("group relative @container bg-f1-background shadow-none transition-all", f && "h-full", (!!m || !!h) && !v && "cursor-pointer focus-within:border-f1-border-hover focus-within:shadow-md hover:border-f1-border-hover hover:shadow-md", v && "pointer-events-none opacity-50"),
|
|
@@ -43900,8 +43978,8 @@ var i3 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
43900
43978
|
"aria-label": t ? `${e}, ${t.text}` : e,
|
|
43901
43979
|
children: "\xA0"
|
|
43902
43980
|
}) : null, /* @__PURE__ */ W("div", {
|
|
43903
|
-
className:
|
|
43904
|
-
children: [/* @__PURE__ */ U(
|
|
43981
|
+
className: m3[_],
|
|
43982
|
+
children: [/* @__PURE__ */ U(T3, {
|
|
43905
43983
|
avatar: r,
|
|
43906
43984
|
title: e,
|
|
43907
43985
|
tag: t,
|
|
@@ -43909,7 +43987,7 @@ var i3 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
43909
43987
|
inactive: d,
|
|
43910
43988
|
descriptionAsSingleLine: y,
|
|
43911
43989
|
stackAt: _
|
|
43912
|
-
}), /* @__PURE__ */ U(
|
|
43990
|
+
}), /* @__PURE__ */ U(C3, {
|
|
43913
43991
|
primaryAction: i,
|
|
43914
43992
|
secondaryActions: a,
|
|
43915
43993
|
otherActions: o,
|
|
@@ -43929,8 +44007,8 @@ var i3 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
43929
44007
|
children: S
|
|
43930
44008
|
}) : S;
|
|
43931
44009
|
});
|
|
43932
|
-
|
|
43933
|
-
var
|
|
44010
|
+
E3.displayName = "F0CardHorizontal";
|
|
44011
|
+
var D3 = be(Ue("F0CardHorizontal", Gl(E3, () => /* @__PURE__ */ U(vl, {
|
|
43934
44012
|
className: F("group relative bg-f1-background shadow-none"),
|
|
43935
44013
|
"aria-busy": "true",
|
|
43936
44014
|
"aria-live": "polite",
|
|
@@ -43944,7 +44022,7 @@ var s3 = be(Ue("F0CardHorizontal", Gl(o3, () => /* @__PURE__ */ U(vl, {
|
|
|
43944
44022
|
})]
|
|
43945
44023
|
}), /* @__PURE__ */ U(Ie, { className: "h-9 w-24 rounded-md" })]
|
|
43946
44024
|
})
|
|
43947
|
-
})))),
|
|
44025
|
+
})))), O3 = ({ visible: e, onFilesDropped: t, mode: n = "files" }) => {
|
|
43948
44026
|
let r = He(), i = n === "discuss";
|
|
43949
44027
|
return /* @__PURE__ */ W("div", {
|
|
43950
44028
|
"aria-hidden": !e,
|
|
@@ -43977,7 +44055,7 @@ var s3 = be(Ue("F0CardHorizontal", Gl(o3, () => /* @__PURE__ */ U(vl, {
|
|
|
43977
44055
|
};
|
|
43978
44056
|
//#endregion
|
|
43979
44057
|
//#region src/addons/ai/ai/F0AiPong/components/PongBall.tsx
|
|
43980
|
-
function
|
|
44058
|
+
function k3({ size: e = 40, className: t, style: n }) {
|
|
43981
44059
|
return /* @__PURE__ */ U("div", {
|
|
43982
44060
|
className: F(t, "rounded-full"),
|
|
43983
44061
|
style: {
|
|
@@ -43990,38 +44068,38 @@ function l3({ size: e = 40, className: t, style: n }) {
|
|
|
43990
44068
|
}
|
|
43991
44069
|
//#endregion
|
|
43992
44070
|
//#region src/addons/ai/ai/F0AiPong/F0AiPong.tsx
|
|
43993
|
-
var
|
|
43994
|
-
function
|
|
44071
|
+
var A3 = 40, j3 = 93, M3 = j3 * .5, N3 = 32, P3 = 24, F3 = 8, I3 = 48, L3 = 10, R3 = 7, z3 = 18, B3 = .25, V3 = .15, H3 = 800, U3 = Math.PI / 3, W3 = A3 / 2, G3 = .12, K3 = 8, q3 = 5, J3 = .08;
|
|
44072
|
+
function Y3(e, t, n) {
|
|
43995
44073
|
return Math.max(t, Math.min(n, e));
|
|
43996
44074
|
}
|
|
43997
|
-
function
|
|
44075
|
+
function X3() {
|
|
43998
44076
|
let e = (Math.random() * 50 + 65) * Math.PI / 180, t = Math.random() > .5 ? 1 : -1, n = Math.random() > .5 ? 1 : -1;
|
|
43999
44077
|
return {
|
|
44000
|
-
vx: Math.cos(e) *
|
|
44001
|
-
vy: Math.sin(e) *
|
|
44078
|
+
vx: Math.cos(e) * R3 * t,
|
|
44079
|
+
vy: Math.sin(e) * R3 * n
|
|
44002
44080
|
};
|
|
44003
44081
|
}
|
|
44004
|
-
var
|
|
44082
|
+
var Z3 = ({ onClose: e }) => {
|
|
44005
44083
|
let t = He(), n = O(), r = V(null), i = V(null), a = V(null), o = V(null), [c, l] = H(null), u = V(/* @__PURE__ */ new Set()), d = V({
|
|
44006
44084
|
x: 0,
|
|
44007
44085
|
y: 0,
|
|
44008
44086
|
vx: 0,
|
|
44009
44087
|
vy: 0,
|
|
44010
|
-
speed:
|
|
44088
|
+
speed: R3
|
|
44011
44089
|
}), f = V(0), p = V(0), m = V(0), h = V({
|
|
44012
44090
|
player: 0,
|
|
44013
44091
|
ai: 0
|
|
44014
44092
|
}), g = V("countdown"), _ = V(0), v = V(0), y = V([]), b = V(0), x = V(0), S = V({
|
|
44015
44093
|
width: 0,
|
|
44016
44094
|
height: 0
|
|
44017
|
-
}), C = V(0), w = V(0), T = V(
|
|
44095
|
+
}), C = V(0), w = V(0), T = V(j3), E = V(0), D = V(0), k = V(0), A = V(0), j = V(null), [M, N] = H({
|
|
44018
44096
|
x: 0,
|
|
44019
44097
|
y: 0
|
|
44020
44098
|
}), [ee, te] = H(0), [ne, re] = H(0), [ie, ae] = H({
|
|
44021
44099
|
player: 0,
|
|
44022
44100
|
ai: 0
|
|
44023
|
-
}), [oe, se] = H(
|
|
44024
|
-
let { width: e, height: t } = S.current, n =
|
|
44101
|
+
}), [oe, se] = H(j3), [ce, le] = H("countdown"), [ue, de] = H(3), [fe, pe] = H([]), [P, me] = H(0), [he, ge] = H(0), [_e, ve] = H(null), [ye, be] = H(null), Se = z(() => {
|
|
44102
|
+
let { width: e, height: t } = S.current, n = R3 + E.current;
|
|
44025
44103
|
d.current = {
|
|
44026
44104
|
x: e / 2,
|
|
44027
44105
|
y: t / 2,
|
|
@@ -44030,7 +44108,7 @@ var j3 = ({ onClose: e }) => {
|
|
|
44030
44108
|
speed: n
|
|
44031
44109
|
}, y.current = [], v.current = 0;
|
|
44032
44110
|
}, []), Ce = z(() => {
|
|
44033
|
-
let e =
|
|
44111
|
+
let e = R3 + E.current, { vx: t, vy: n } = X3(), r = e / R3;
|
|
44034
44112
|
d.current.vx = t * r, d.current.vy = n * r, d.current.speed = e, g.current = "playing", le("playing"), j.current = null, be(null);
|
|
44035
44113
|
}, []), we = z(() => {
|
|
44036
44114
|
Se(), g.current = "countdown", le("countdown"), de(3);
|
|
@@ -44056,9 +44134,9 @@ var j3 = ({ onClose: e }) => {
|
|
|
44056
44134
|
});
|
|
44057
44135
|
}, [n]), Ee = z((n) => {
|
|
44058
44136
|
let r = { ...h.current };
|
|
44059
|
-
n === "player" ? r.player++ : r.ai++, h.current = r, ae(r), C.current = 8, j.current = n, be(n), E.current = Math.min(11, E.current +
|
|
44137
|
+
n === "player" ? r.player++ : r.ai++, h.current = r, ae(r), C.current = 8, j.current = n, be(n), E.current = Math.min(11, E.current + V3), n === "player" && Te(), r.player >= 3 || r.ai >= 3 ? (g.current = "gameover", le("gameover"), Se(), ve(r.player >= 3 ? t.ai.pong.youWin : t.ai.pong.youLose), setTimeout(() => e(), 2e3)) : (g.current = "scored", le("scored"), Se(), _.current = H3, setTimeout(() => {
|
|
44060
44138
|
g.current === "scored" && we();
|
|
44061
|
-
},
|
|
44139
|
+
}, H3));
|
|
44062
44140
|
}, [
|
|
44063
44141
|
Se,
|
|
44064
44142
|
we,
|
|
@@ -44099,10 +44177,10 @@ var j3 = ({ onClose: e }) => {
|
|
|
44099
44177
|
}, ae({
|
|
44100
44178
|
player: 0,
|
|
44101
44179
|
ai: 0
|
|
44102
|
-
}), w.current = 0, T.current =
|
|
44180
|
+
}), w.current = 0, T.current = j3, se(j3), E.current = 0, D.current = 0;
|
|
44103
44181
|
let r = we(), a = (t) => {
|
|
44104
44182
|
let n = e.getBoundingClientRect(), r = T.current;
|
|
44105
|
-
f.current =
|
|
44183
|
+
f.current = Y3(t.clientX - n.left, r / 2 + F3, n.width - r / 2 - F3);
|
|
44106
44184
|
};
|
|
44107
44185
|
e.addEventListener("pointermove", a);
|
|
44108
44186
|
let o = (e) => {
|
|
@@ -44110,34 +44188,34 @@ var j3 = ({ onClose: e }) => {
|
|
|
44110
44188
|
let t = (e - b.current) / 16.667, n = Math.min(t, 3);
|
|
44111
44189
|
b.current = e;
|
|
44112
44190
|
let { width: r, height: i } = S.current, a = d.current, s = T.current;
|
|
44113
|
-
if (u.current.has("ArrowLeft") && (f.current =
|
|
44191
|
+
if (u.current.has("ArrowLeft") && (f.current = Y3(f.current - L3 * n, s / 2 + F3, r - s / 2 - F3)), u.current.has("ArrowRight") && (f.current = Y3(f.current + L3 * n, s / 2 + F3, r - s / 2 - F3)), C.current > 0 && (C.current *= .85, C.current < .5 && (C.current = 0)), g.current === "playing") {
|
|
44114
44192
|
y.current.push({
|
|
44115
44193
|
x: a.x,
|
|
44116
44194
|
y: a.y
|
|
44117
|
-
}), y.current.length >
|
|
44118
|
-
let e = r -
|
|
44195
|
+
}), y.current.length > q3 && (y.current = y.current.slice(-5)), a.x += a.vx * n, a.y += a.vy * n, k.current += A.current * n, A.current *= .96;
|
|
44196
|
+
let e = r - F3 - A3 / 2;
|
|
44119
44197
|
a.x <= 28 && (a.x = 28, a.vx = Math.abs(a.vx), A.current *= -.5), a.x >= e && (a.x = e, a.vx = -Math.abs(a.vx), A.current *= -.5);
|
|
44120
|
-
let t = i -
|
|
44121
|
-
if (a.y +
|
|
44122
|
-
a.y = t -
|
|
44123
|
-
let e =
|
|
44124
|
-
a.speed = Math.min(a.speed +
|
|
44125
|
-
let n = e *
|
|
44198
|
+
let t = i - P3 - N3, o = s / 2;
|
|
44199
|
+
if (a.y + W3 >= t && a.y - W3 <= t + N3 && a.vy > 0 && a.x >= f.current - o - W3 && a.x <= f.current + o + W3) {
|
|
44200
|
+
a.y = t - W3;
|
|
44201
|
+
let e = Y3((a.x - f.current) / o, -1, 1);
|
|
44202
|
+
a.speed = Math.min(a.speed + B3, z3);
|
|
44203
|
+
let n = e * U3;
|
|
44126
44204
|
a.vx = Math.sin(n) * a.speed, a.vy = -Math.cos(n) * a.speed, A.current = e * 1.2, v.current++, w.current++;
|
|
44127
|
-
let r =
|
|
44128
|
-
T.current =
|
|
44205
|
+
let r = M3 / j3 + (1 - M3 / j3) * Math.exp(-w.current * .03);
|
|
44206
|
+
T.current = j3 * r;
|
|
44129
44207
|
}
|
|
44130
|
-
let c =
|
|
44131
|
-
if (a.y -
|
|
44208
|
+
let c = j3 / 2;
|
|
44209
|
+
if (a.y - W3 <= 56 && a.y + W3 >= P3 && a.vy < 0 && a.x >= p.current - c - W3 && a.x <= p.current + c + W3) {
|
|
44132
44210
|
a.y = 76;
|
|
44133
|
-
let e =
|
|
44134
|
-
a.speed = Math.min(a.speed +
|
|
44135
|
-
let t = e *
|
|
44211
|
+
let e = Y3((a.x - p.current) / c, -1, 1);
|
|
44212
|
+
a.speed = Math.min(a.speed + B3, z3);
|
|
44213
|
+
let t = e * U3;
|
|
44136
44214
|
a.vx = Math.sin(t) * a.speed, a.vy = Math.cos(t) * a.speed, A.current = e * 1.2, v.current++;
|
|
44137
44215
|
}
|
|
44138
44216
|
if (a.y < -80 ? Ee("player") : a.y > i + 80 && Ee("ai"), a.vy < 0) {
|
|
44139
|
-
let e = Math.max(1, (a.y -
|
|
44140
|
-
m.current += i *
|
|
44217
|
+
let e = Math.max(1, (a.y - P3) / -a.vy), t = a.x + a.vx * e, r = K3 * (1 + a.speed / z3), i = t + (Math.random() - .5) * r - m.current;
|
|
44218
|
+
m.current += i * G3 * n;
|
|
44141
44219
|
} else {
|
|
44142
44220
|
let e = Math.sin(Date.now() * .002) * 15;
|
|
44143
44221
|
m.current += (r / 2 + e - m.current) * .025 * n;
|
|
@@ -44145,7 +44223,7 @@ var j3 = ({ onClose: e }) => {
|
|
|
44145
44223
|
let l = (m.current - p.current) * .1 * n;
|
|
44146
44224
|
D.current += l, D.current *= .88;
|
|
44147
44225
|
let u = 6 + v.current * .12;
|
|
44148
|
-
D.current =
|
|
44226
|
+
D.current = Y3(D.current, -u, u), p.current += D.current * n, p.current = Y3(p.current, 54.5, r - j3 / 2 - F3);
|
|
44149
44227
|
}
|
|
44150
44228
|
N({
|
|
44151
44229
|
x: a.x,
|
|
@@ -44191,13 +44269,13 @@ var j3 = ({ onClose: e }) => {
|
|
|
44191
44269
|
children: [
|
|
44192
44270
|
/* @__PURE__ */ U("div", { className: "pointer-events-none absolute left-0 right-0 top-1/2 h-px translate-y-1/2 bg-f1-border" }),
|
|
44193
44271
|
fe.map((e, t) => {
|
|
44194
|
-
let n = (t + 1) / fe.length, r =
|
|
44272
|
+
let n = (t + 1) / fe.length, r = A3 * (.15 + n * .25);
|
|
44195
44273
|
return /* @__PURE__ */ U("div", {
|
|
44196
44274
|
className: "pointer-events-none absolute rounded-full bg-f1-foreground-secondary/40",
|
|
44197
44275
|
style: {
|
|
44198
44276
|
width: r,
|
|
44199
44277
|
height: r,
|
|
44200
|
-
opacity: n *
|
|
44278
|
+
opacity: n * J3,
|
|
44201
44279
|
transform: `translate(${e.x - r / 2}px, ${e.y - r / 2}px)`
|
|
44202
44280
|
}
|
|
44203
44281
|
}, t);
|
|
@@ -44205,19 +44283,19 @@ var j3 = ({ onClose: e }) => {
|
|
|
44205
44283
|
/* @__PURE__ */ U("div", {
|
|
44206
44284
|
className: F("absolute isolate rounded", "border border-solid border-f1-border", "before:pointer-events-none before:absolute before:inset-0 before:z-[-1]", "before:rounded-[inherit] before:bg-f1-special-page before:content-['']", "after:pointer-events-none after:absolute after:inset-0.5 after:z-[-2]", "after:rounded-[inherit] after:blur-[5px] after:content-['']", "after:bg-[conic-gradient(from_var(--gradient-angle),var(--tw-gradient-stops))]", "from-[#E55619] via-[#A1ADE5] to-[#E51943]", "after:scale-100 after:opacity-100"),
|
|
44207
44285
|
style: {
|
|
44208
|
-
width:
|
|
44209
|
-
height:
|
|
44210
|
-
top:
|
|
44211
|
-
transform: `translateX(${ne -
|
|
44286
|
+
width: j3,
|
|
44287
|
+
height: N3,
|
|
44288
|
+
top: P3,
|
|
44289
|
+
transform: `translateX(${ne - j3 / 2}px)`,
|
|
44212
44290
|
animation: "pong-ai-glow 4s linear infinite",
|
|
44213
44291
|
"--gradient-angle": "0deg"
|
|
44214
44292
|
}
|
|
44215
44293
|
}),
|
|
44216
|
-
/* @__PURE__ */ U(
|
|
44217
|
-
size:
|
|
44294
|
+
/* @__PURE__ */ U(k3, {
|
|
44295
|
+
size: A3,
|
|
44218
44296
|
className: "pointer-events-none absolute z-30",
|
|
44219
44297
|
style: {
|
|
44220
|
-
transform: `translate(${M.x -
|
|
44298
|
+
transform: `translate(${M.x - A3 / 2}px, ${M.y - A3 / 2}px) rotate(${he}rad)`,
|
|
44221
44299
|
opacity: ce === "countdown" ? 0 : 1,
|
|
44222
44300
|
transition: "opacity 0.3s ease-in"
|
|
44223
44301
|
}
|
|
@@ -44226,8 +44304,8 @@ var j3 = ({ onClose: e }) => {
|
|
|
44226
44304
|
className: "absolute rounded border-2 border-solid border-f1-border",
|
|
44227
44305
|
style: {
|
|
44228
44306
|
width: oe,
|
|
44229
|
-
height:
|
|
44230
|
-
bottom:
|
|
44307
|
+
height: N3,
|
|
44308
|
+
bottom: P3,
|
|
44231
44309
|
transform: `translateX(${ee - oe / 2}px)`,
|
|
44232
44310
|
transition: "width 0.3s ease-out"
|
|
44233
44311
|
},
|
|
@@ -44265,7 +44343,7 @@ var j3 = ({ onClose: e }) => {
|
|
|
44265
44343
|
]
|
|
44266
44344
|
}), /* @__PURE__ */ U("div", {
|
|
44267
44345
|
className: "pointer-events-none absolute inset-y-0 right-0 flex flex-col items-center justify-center",
|
|
44268
|
-
style: { width:
|
|
44346
|
+
style: { width: I3 },
|
|
44269
44347
|
children: /* @__PURE__ */ W("div", {
|
|
44270
44348
|
className: "flex flex-col items-center gap-6",
|
|
44271
44349
|
children: [/* @__PURE__ */ U("span", {
|
|
@@ -44288,8 +44366,8 @@ var j3 = ({ onClose: e }) => {
|
|
|
44288
44366
|
]
|
|
44289
44367
|
})]
|
|
44290
44368
|
}), c);
|
|
44291
|
-
},
|
|
44292
|
-
let { fileAttachments: n, isClarifying: r, setFileDragOver: i, processDroppedFiles: a, setPendingQuote: o, focusChatInput: s, activeGame: c } =
|
|
44369
|
+
}, Q3 = "f0:widget-drag-start", $3 = "f0:widget-drag-end", e6 = ({ isVisible: e, acceptsWidgetDrop: t }) => {
|
|
44370
|
+
let { fileAttachments: n, isClarifying: r, setFileDragOver: i, processDroppedFiles: a, setPendingQuote: o, focusChatInput: s, activeGame: c } = M4(), l = t && c === null && e && !r, u = V(l);
|
|
44293
44371
|
u.current = l;
|
|
44294
44372
|
let d = V(null), f = V(0), p = n?.onUploadFiles != null && !r;
|
|
44295
44373
|
B(() => {
|
|
@@ -44312,8 +44390,8 @@ var j3 = ({ onClose: e }) => {
|
|
|
44312
44390
|
let t = e.detail;
|
|
44313
44391
|
typeof t?.id == "string" && t.id && typeof t.title == "string" && t.title.trim() && x(t);
|
|
44314
44392
|
}, t = () => x(null);
|
|
44315
|
-
return window.addEventListener(
|
|
44316
|
-
window.removeEventListener(
|
|
44393
|
+
return window.addEventListener(Q3, e), window.addEventListener($3, t), () => {
|
|
44394
|
+
window.removeEventListener(Q3, e), window.removeEventListener($3, t);
|
|
44317
44395
|
};
|
|
44318
44396
|
}, [l, x]), B(() => {
|
|
44319
44397
|
l || x(null);
|
|
@@ -44362,32 +44440,32 @@ var j3 = ({ onClose: e }) => {
|
|
|
44362
44440
|
} : void 0
|
|
44363
44441
|
}
|
|
44364
44442
|
};
|
|
44365
|
-
},
|
|
44366
|
-
let { open: a, visualizationMode: o, fileDragOver: s, activeGame: c, closeGame: l } =
|
|
44443
|
+
}, t6 = ({ children: e, visible: t, side: n, exitStyle: r = "shrink", acceptsWidgetDrop: i = !1 }) => {
|
|
44444
|
+
let { open: a, visualizationMode: o, fileDragOver: s, activeGame: c, closeGame: l } = M4(), u = t ?? a, d = o === "canvas", { surfaceRef: f, surfaceProps: p, decorations: m } = e6({
|
|
44367
44445
|
isVisible: u,
|
|
44368
44446
|
acceptsWidgetDrop: i
|
|
44369
44447
|
});
|
|
44370
|
-
return /* @__PURE__ */ U(
|
|
44448
|
+
return /* @__PURE__ */ U(s2, {
|
|
44371
44449
|
visible: t,
|
|
44372
44450
|
side: n,
|
|
44373
44451
|
exitStyle: r,
|
|
44374
44452
|
flushInnerSeam: d,
|
|
44375
44453
|
surfaceRef: f,
|
|
44376
44454
|
surfaceProps: p,
|
|
44377
|
-
decorations: /* @__PURE__ */ W(Gr, { children: [m.canDrop || m.canAcceptWidgetDrop && m.dragQuote !== null ? /* @__PURE__ */ U(
|
|
44455
|
+
decorations: /* @__PURE__ */ W(Gr, { children: [m.canDrop || m.canAcceptWidgetDrop && m.dragQuote !== null ? /* @__PURE__ */ U(O3, {
|
|
44378
44456
|
visible: m.canDrop && s || m.dragQuote !== null,
|
|
44379
44457
|
mode: m.dragQuote === null ? "files" : "discuss",
|
|
44380
44458
|
onFilesDropped: m.onFilesDropped
|
|
44381
|
-
}) : null, c === "pong" ? /* @__PURE__ */ U(
|
|
44459
|
+
}) : null, c === "pong" ? /* @__PURE__ */ U(Z3, { onClose: l }) : null] }),
|
|
44382
44460
|
children: e
|
|
44383
44461
|
});
|
|
44384
|
-
},
|
|
44462
|
+
}, n6 = "--f0-ai-composer-overlap", r6 = () => {
|
|
44385
44463
|
let [e, t] = H(null), [n, r] = H(null), [i, a] = H(!1), [o, s] = H(!1);
|
|
44386
44464
|
return Hr(() => {
|
|
44387
44465
|
if (!e || !n) return;
|
|
44388
44466
|
let t = -1, r = () => {
|
|
44389
44467
|
let r = n.querySelector("[data-composer-layout=\"welcome\"]") !== null, i = r ? 0 : Math.ceil(n.getBoundingClientRect().height);
|
|
44390
|
-
s(r), a(!r && (n.querySelector("[data-composer-layout=\"docked\"]") !== null || i > 0)), i !== t && (t = i, e.style.setProperty(
|
|
44468
|
+
s(r), a(!r && (n.querySelector("[data-composer-layout=\"docked\"]") !== null || i > 0)), i !== t && (t = i, e.style.setProperty(n6, `${i}px`));
|
|
44391
44469
|
};
|
|
44392
44470
|
if (r(), typeof ResizeObserver > "u") return;
|
|
44393
44471
|
let i = new ResizeObserver(r);
|
|
@@ -44399,7 +44477,7 @@ var j3 = ({ onClose: e }) => {
|
|
|
44399
44477
|
attributes: !0,
|
|
44400
44478
|
attributeFilter: ["data-composer-layout"]
|
|
44401
44479
|
}), () => {
|
|
44402
|
-
i.disconnect(), o.disconnect(), e.style.removeProperty(
|
|
44480
|
+
i.disconnect(), o.disconnect(), e.style.removeProperty(n6);
|
|
44403
44481
|
};
|
|
44404
44482
|
}, [e, n]), {
|
|
44405
44483
|
setShell: t,
|
|
@@ -44407,7 +44485,7 @@ var j3 = ({ onClose: e }) => {
|
|
|
44407
44485
|
floating: i,
|
|
44408
44486
|
welcome: o
|
|
44409
44487
|
};
|
|
44410
|
-
},
|
|
44488
|
+
}, i6 = Tr.duration.reveal * 1e3, a6 = ({ enabled: e = !1, side: t, panelContentSide: n, initialMessage: r, chatHeader: i, chatMessages: a, chatInput: o, chatOverlay: s, welcomeScreenSuggestions: c, welcomeScreenCards: l, disclaimer: u, resizable: d = !1, defaultVisualizationMode: f, lockVisualizationMode: p, historyEnabled: m, footer: h, VoiceMode: g, entityRefs: _, canvasActions: v, canvasEntities: y, credits: b, employeeCredits: x, creditWarning: S, fileAttachments: C, filePreviews: w, onTranscribe: T, onThumbsUp: E, onThumbsDown: D, children: O, agent: k, tracking: A }) => /* @__PURE__ */ U(T4, {
|
|
44411
44489
|
enabled: e,
|
|
44412
44490
|
side: t,
|
|
44413
44491
|
panelContentSide: n,
|
|
@@ -44439,8 +44517,8 @@ var j3 = ({ onClose: e }) => {
|
|
|
44439
44517
|
filePreviews: w,
|
|
44440
44518
|
onTranscribe: T,
|
|
44441
44519
|
children: O
|
|
44442
|
-
}),
|
|
44443
|
-
let { enabled: i, open: a, setOpen: o, mode: s, visualizationMode: c, VoiceMode: l, tracking: u, chatHeader: d, chatMessages: f, chatInput: p, chatOverlay: m, panelContent: h, panelSide: g, panelContentSide: _, restoringPanelContentId: v, filePreviews: y } =
|
|
44520
|
+
}), o6 = Ue("F0AiChat", ({ header: e, messages: t, input: n, overlay: r }) => {
|
|
44521
|
+
let { enabled: i, open: a, setOpen: o, mode: s, visualizationMode: c, VoiceMode: l, tracking: u, chatHeader: d, chatMessages: f, chatInput: p, chatOverlay: m, panelContent: h, panelSide: g, panelContentSide: _, restoringPanelContentId: v, filePreviews: y } = M4(), b = He(), x = _ !== g, { motionProps: S } = b4(a ? c === "fullscreen" ? "fullscreen" : "docked" : "closed", (e, t) => t === "closed" ? 0 : i6), C = O(), w = r6(), T = e ?? d, E = t ?? f, D = n ?? p, k = r ?? m;
|
|
44444
44522
|
if (!i) return null;
|
|
44445
44523
|
let { viewKey: A, viewContent: j } = h && !x ? {
|
|
44446
44524
|
viewKey: `panel:${h.id}`,
|
|
@@ -44488,7 +44566,7 @@ var j3 = ({ onClose: e }) => {
|
|
|
44488
44566
|
}), /* @__PURE__ */ W("div", {
|
|
44489
44567
|
ref: w.setComposer,
|
|
44490
44568
|
className: F("relative z-10 flex min-h-0 flex-col", w.welcome && "flex-1"),
|
|
44491
|
-
children: [w.floating ? /* @__PURE__ */ U(
|
|
44569
|
+
children: [w.floating ? /* @__PURE__ */ U(d1, { tone: "page" }) : null, /* @__PURE__ */ U("div", {
|
|
44492
44570
|
className: F("relative flex min-h-0 flex-col", w.welcome && "flex-1", "[&_[data-composer-layout=docked]]:pt-0"),
|
|
44493
44571
|
children: D
|
|
44494
44572
|
})]
|
|
@@ -44500,9 +44578,9 @@ var j3 = ({ onClose: e }) => {
|
|
|
44500
44578
|
}) : null]
|
|
44501
44579
|
})
|
|
44502
44580
|
};
|
|
44503
|
-
return /* @__PURE__ */ U(
|
|
44581
|
+
return /* @__PURE__ */ U(b0, {
|
|
44504
44582
|
filePreviews: y,
|
|
44505
|
-
children: /* @__PURE__ */ U(
|
|
44583
|
+
children: /* @__PURE__ */ U(t6, {
|
|
44506
44584
|
visible: x ? a && !h && !v : void 0,
|
|
44507
44585
|
exitStyle: x && a ? "hold" : "shrink",
|
|
44508
44586
|
acceptsWidgetDrop: A === "chat" && !k,
|
|
@@ -44522,23 +44600,23 @@ var j3 = ({ onClose: e }) => {
|
|
|
44522
44600
|
})
|
|
44523
44601
|
})
|
|
44524
44602
|
});
|
|
44525
|
-
}),
|
|
44603
|
+
}), s6 = Ue("F0AiChatProvider", a6), c6 = 31, l6 = async (e) => {
|
|
44526
44604
|
let { default: t } = await import("./browser-Chetd4xB.js");
|
|
44527
44605
|
return t(e.map(({ name: e, rows: t }) => ({
|
|
44528
|
-
sheet: e.slice(0,
|
|
44606
|
+
sheet: e.slice(0, c6),
|
|
44529
44607
|
data: t,
|
|
44530
44608
|
dateFormat: "yyyy-mm-dd"
|
|
44531
44609
|
}))).toBlob();
|
|
44532
|
-
},
|
|
44610
|
+
}, u6 = async (t) => {
|
|
44533
44611
|
let { default: n } = await import("./papaparse.min-BwPbUAd9.js").then((t) => /* @__PURE__ */ e(t.t(), 1)), r = n.unparse(t.map((e) => e.map((e) => e instanceof Date ? e.toISOString() : e)));
|
|
44534
44612
|
return new Blob([r], { type: "text/csv;charset=utf-8;" });
|
|
44535
|
-
},
|
|
44613
|
+
}, d6 = /^-?\d+(\.\d+)?$/, f6 = (e) => Array.from(e.rows, (e) => Array.from(e.cells, (e) => {
|
|
44536
44614
|
let t = e.textContent?.trim() ?? "";
|
|
44537
|
-
return
|
|
44538
|
-
})),
|
|
44615
|
+
return d6.test(t) ? Number(t) : t;
|
|
44616
|
+
})), p6 = (e, t) => {
|
|
44539
44617
|
let n = document.createElement("a");
|
|
44540
44618
|
n.href = URL.createObjectURL(e), n.download = t, n.click(), URL.revokeObjectURL(n.href);
|
|
44541
|
-
},
|
|
44619
|
+
}, m6 = Ue("F0PersonCard", ({ name: e, avatar: t, subtitle: n, profileHref: r, actions: i = [], dataTestId: a }) => {
|
|
44542
44620
|
let o = He();
|
|
44543
44621
|
return /* @__PURE__ */ U(je, {
|
|
44544
44622
|
dataTestId: a,
|
|
@@ -44567,7 +44645,7 @@ var j3 = ({ onClose: e }) => {
|
|
|
44567
44645
|
}) : null
|
|
44568
44646
|
})
|
|
44569
44647
|
});
|
|
44570
|
-
}),
|
|
44648
|
+
}), h6 = ke({
|
|
44571
44649
|
base: F("inline-flex items-center justify-center rounded-sm text-sm font-medium transition-colors hover:bg-f1-background-secondary hover:text-f1-foreground-secondary disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-f1-background-secondary data-[state=on]:text-f1-foreground", at()),
|
|
44572
44650
|
variants: {
|
|
44573
44651
|
variant: {
|
|
@@ -44584,26 +44662,26 @@ var j3 = ({ onClose: e }) => {
|
|
|
44584
44662
|
variant: "default",
|
|
44585
44663
|
size: "default"
|
|
44586
44664
|
}
|
|
44587
|
-
}),
|
|
44665
|
+
}), g6 = I.forwardRef(({ className: e, variant: t, size: n, ...r }, i) => /* @__PURE__ */ U(bn, {
|
|
44588
44666
|
ref: i,
|
|
44589
|
-
className: F(
|
|
44667
|
+
className: F(h6({
|
|
44590
44668
|
variant: t,
|
|
44591
44669
|
size: n,
|
|
44592
44670
|
className: e
|
|
44593
44671
|
})),
|
|
44594
44672
|
...r
|
|
44595
44673
|
}));
|
|
44596
|
-
|
|
44674
|
+
g6.displayName = bn.displayName;
|
|
44597
44675
|
//#endregion
|
|
44598
44676
|
//#region src/elements/ToggleGroup/ToggleGroup.tsx
|
|
44599
|
-
var
|
|
44677
|
+
var _6 = I.createContext({
|
|
44600
44678
|
size: "default",
|
|
44601
44679
|
variant: "default"
|
|
44602
|
-
}),
|
|
44680
|
+
}), v6 = I.forwardRef(({ className: e, variant: t, size: n, children: r, ...i }, a) => /* @__PURE__ */ U(kV, {
|
|
44603
44681
|
ref: a,
|
|
44604
44682
|
className: F("flex items-center justify-center gap-1.5", e),
|
|
44605
44683
|
...i,
|
|
44606
|
-
children: /* @__PURE__ */ U(
|
|
44684
|
+
children: /* @__PURE__ */ U(_6.Provider, {
|
|
44607
44685
|
value: {
|
|
44608
44686
|
variant: t,
|
|
44609
44687
|
size: n
|
|
@@ -44611,12 +44689,12 @@ var Z3 = I.createContext({
|
|
|
44611
44689
|
children: r
|
|
44612
44690
|
})
|
|
44613
44691
|
}));
|
|
44614
|
-
|
|
44615
|
-
var
|
|
44616
|
-
let o = I.useContext(
|
|
44692
|
+
v6.displayName = kV.displayName;
|
|
44693
|
+
var y6 = I.forwardRef(({ className: e, children: t, variant: n, size: r, ...i }, a) => {
|
|
44694
|
+
let o = I.useContext(_6);
|
|
44617
44695
|
return /* @__PURE__ */ U(AV, {
|
|
44618
44696
|
ref: a,
|
|
44619
|
-
className: F(
|
|
44697
|
+
className: F(h6({
|
|
44620
44698
|
variant: o.variant || n,
|
|
44621
44699
|
size: o.size || r
|
|
44622
44700
|
}), e),
|
|
@@ -44624,10 +44702,10 @@ var $3 = I.forwardRef(({ className: e, children: t, variant: n, size: r, ...i },
|
|
|
44624
44702
|
children: t
|
|
44625
44703
|
});
|
|
44626
44704
|
});
|
|
44627
|
-
|
|
44705
|
+
y6.displayName = AV.displayName;
|
|
44628
44706
|
//#endregion
|
|
44629
44707
|
//#region src/blocks/Widgets/Content/Weekdays/Weekdays.tsx
|
|
44630
|
-
var
|
|
44708
|
+
var b6 = [
|
|
44631
44709
|
"Monday",
|
|
44632
44710
|
"Tuesday",
|
|
44633
44711
|
"Wednesday",
|
|
@@ -44635,26 +44713,26 @@ var e6 = [
|
|
|
44635
44713
|
"Friday",
|
|
44636
44714
|
"Saturday",
|
|
44637
44715
|
"Sunday"
|
|
44638
|
-
],
|
|
44716
|
+
], x6 = R(function({ daysOfTheWeek: e = b6, activatedDays: t = [] }, n) {
|
|
44639
44717
|
let r = t.map((t) => `${t}-${e[t]}`);
|
|
44640
|
-
return /* @__PURE__ */ U(
|
|
44718
|
+
return /* @__PURE__ */ U(v6, {
|
|
44641
44719
|
type: "multiple",
|
|
44642
44720
|
value: r,
|
|
44643
44721
|
disabled: !0,
|
|
44644
44722
|
className: "flex justify-start",
|
|
44645
44723
|
ref: n,
|
|
44646
|
-
children: e.map((e, t) => /* @__PURE__ */ U(
|
|
44724
|
+
children: e.map((e, t) => /* @__PURE__ */ U(y6, {
|
|
44647
44725
|
"aria-label": e,
|
|
44648
44726
|
value: `${t}-${e}`,
|
|
44649
44727
|
className: "h-6 w-6 shrink-0 grow-0 basis-6 p-0 text-sm font-medium disabled:select-none disabled:bg-f1-background-tertiary disabled:text-f1-foreground-secondary disabled:opacity-100 disabled:data-[state=on]:border disabled:data-[state=on]:border-solid disabled:data-[state=on]:border-f1-border-selected disabled:data-[state=on]:bg-f1-background-selected disabled:data-[state=on]:text-f1-foreground-selected",
|
|
44650
44728
|
children: e[0]
|
|
44651
44729
|
}, t))
|
|
44652
44730
|
});
|
|
44653
|
-
}),
|
|
44731
|
+
}), S6 = 750, C6 = ({ text: e, children: t }) => {
|
|
44654
44732
|
let [n, r] = H(!1);
|
|
44655
44733
|
return B(() => {
|
|
44656
44734
|
if (n) {
|
|
44657
|
-
let e = setTimeout(() => r(!1),
|
|
44735
|
+
let e = setTimeout(() => r(!1), S6);
|
|
44658
44736
|
return () => clearTimeout(e);
|
|
44659
44737
|
}
|
|
44660
44738
|
}, [n]), /* @__PURE__ */ W("button", {
|
|
@@ -44718,7 +44796,7 @@ var e6 = [
|
|
|
44718
44796
|
})
|
|
44719
44797
|
})]
|
|
44720
44798
|
});
|
|
44721
|
-
},
|
|
44799
|
+
}, w6 = Rr(({ children: e, className: t, ...n }) => /* @__PURE__ */ W(Ge, {
|
|
44722
44800
|
...n,
|
|
44723
44801
|
className: F("text-inherit group flex items-center gap-1.5 rounded p-1.5 text-f1-foreground", "no-underline hover:bg-f1-background-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-f1-border-selected-bold active:bg-f1-background-secondary-hover", t),
|
|
44724
44802
|
children: [e, /* @__PURE__ */ U("div", {
|
|
@@ -44730,10 +44808,10 @@ var e6 = [
|
|
|
44730
44808
|
})
|
|
44731
44809
|
})]
|
|
44732
44810
|
}));
|
|
44733
|
-
|
|
44811
|
+
w6.displayName = "NavigateAction";
|
|
44734
44812
|
//#endregion
|
|
44735
44813
|
//#region src/elements/DataList/actions/OpenLinkAction.tsx
|
|
44736
|
-
var
|
|
44814
|
+
var T6 = Rr(({ children: e, className: t, href: n, ...r }) => /* @__PURE__ */ W(Ge, {
|
|
44737
44815
|
...r,
|
|
44738
44816
|
target: "_blank",
|
|
44739
44817
|
href: n,
|
|
@@ -44749,15 +44827,15 @@ var a6 = Rr(({ children: e, className: t, href: n, ...r }) => /* @__PURE__ */ W(
|
|
|
44749
44827
|
})
|
|
44750
44828
|
})]
|
|
44751
44829
|
}));
|
|
44752
|
-
|
|
44830
|
+
T6.displayName = "OpenLinkAction";
|
|
44753
44831
|
//#endregion
|
|
44754
44832
|
//#region src/elements/DataList/ItemContainer.tsx
|
|
44755
|
-
var
|
|
44833
|
+
var E6 = R((e, t) => {
|
|
44756
44834
|
let { text: n, leftIcon: r, className: i, action: a = { type: "noop" } } = e;
|
|
44757
44835
|
return /* @__PURE__ */ U("li", {
|
|
44758
44836
|
className: "flex rounded font-medium text-f1-foreground *:flex-1",
|
|
44759
44837
|
ref: t,
|
|
44760
|
-
children: /* @__PURE__ */ W(
|
|
44838
|
+
children: /* @__PURE__ */ W(D6, {
|
|
44761
44839
|
action: a,
|
|
44762
44840
|
className: F("flex items-center gap-1.5 p-1.5", i),
|
|
44763
44841
|
children: [r ? typeof r == "function" ? r({}) : /* @__PURE__ */ U(Ae, {
|
|
@@ -44771,21 +44849,21 @@ var o6 = R((e, t) => {
|
|
|
44771
44849
|
})
|
|
44772
44850
|
});
|
|
44773
44851
|
});
|
|
44774
|
-
|
|
44775
|
-
var
|
|
44852
|
+
E6.displayName = "ItemContainer";
|
|
44853
|
+
var D6 = ({ children: e, action: t, ...n }) => {
|
|
44776
44854
|
let r = t.type;
|
|
44777
44855
|
switch (r) {
|
|
44778
|
-
case "copy": return /* @__PURE__ */ U(
|
|
44856
|
+
case "copy": return /* @__PURE__ */ U(C6, {
|
|
44779
44857
|
...t,
|
|
44780
44858
|
...n,
|
|
44781
44859
|
children: e
|
|
44782
44860
|
});
|
|
44783
|
-
case "navigate": return /* @__PURE__ */ U(
|
|
44861
|
+
case "navigate": return /* @__PURE__ */ U(w6, {
|
|
44784
44862
|
...t,
|
|
44785
44863
|
...n,
|
|
44786
44864
|
children: e
|
|
44787
44865
|
});
|
|
44788
|
-
case "open-link": return /* @__PURE__ */ U(
|
|
44866
|
+
case "open-link": return /* @__PURE__ */ U(T6, {
|
|
44789
44867
|
...t,
|
|
44790
44868
|
...n,
|
|
44791
44869
|
children: e
|
|
@@ -44796,19 +44874,19 @@ var s6 = ({ children: e, action: t, ...n }) => {
|
|
|
44796
44874
|
});
|
|
44797
44875
|
default: return r;
|
|
44798
44876
|
}
|
|
44799
|
-
},
|
|
44877
|
+
}, O6 = (e, t) => e && e.type === "copy" ? {
|
|
44800
44878
|
type: "copy",
|
|
44801
44879
|
text: e.text ?? t
|
|
44802
|
-
} : e,
|
|
44880
|
+
} : e, k6 = R(({ text: e, icon: t, action: n }, r) => /* @__PURE__ */ U(E6, {
|
|
44803
44881
|
ref: r,
|
|
44804
44882
|
text: e,
|
|
44805
44883
|
leftIcon: t,
|
|
44806
|
-
action:
|
|
44884
|
+
action: O6(n, e)
|
|
44807
44885
|
}));
|
|
44808
|
-
|
|
44809
|
-
var
|
|
44886
|
+
k6.displayName = "DataList.Item";
|
|
44887
|
+
var A6 = Ue("DataList.Item", k6), j6 = R(({ action: e, avatarUrl: t, firstName: n, lastName: r }, i) => {
|
|
44810
44888
|
let a = `${n} ${r}`;
|
|
44811
|
-
return /* @__PURE__ */ U(
|
|
44889
|
+
return /* @__PURE__ */ U(E6, {
|
|
44812
44890
|
ref: i,
|
|
44813
44891
|
leftIcon: () => /* @__PURE__ */ U(Ct, {
|
|
44814
44892
|
size: "xs",
|
|
@@ -44817,11 +44895,11 @@ var u6 = Ue("DataList.Item", l6), d6 = R(({ action: e, avatarUrl: t, firstName:
|
|
|
44817
44895
|
lastName: r
|
|
44818
44896
|
}),
|
|
44819
44897
|
text: a,
|
|
44820
|
-
action:
|
|
44898
|
+
action: O6(e, a)
|
|
44821
44899
|
});
|
|
44822
44900
|
});
|
|
44823
|
-
|
|
44824
|
-
var
|
|
44901
|
+
j6.displayName = "PersonItem";
|
|
44902
|
+
var M6 = Ue("PersonItem", j6), N6 = R(({ avatarUrl: e, name: t, action: n }, r) => /* @__PURE__ */ U(E6, {
|
|
44825
44903
|
ref: r,
|
|
44826
44904
|
leftIcon: () => /* @__PURE__ */ U(Mt, {
|
|
44827
44905
|
name: t,
|
|
@@ -44829,62 +44907,62 @@ var f6 = Ue("PersonItem", d6), p6 = R(({ avatarUrl: e, name: t, action: n }, r)
|
|
|
44829
44907
|
src: e
|
|
44830
44908
|
}),
|
|
44831
44909
|
text: t,
|
|
44832
|
-
action:
|
|
44910
|
+
action: O6(n, t)
|
|
44833
44911
|
}));
|
|
44834
|
-
|
|
44835
|
-
var
|
|
44912
|
+
N6.displayName = "CompanyItem";
|
|
44913
|
+
var P6 = Ue("CompanyItem", N6), F6 = R(({ action: e, name: t }, n) => /* @__PURE__ */ U(E6, {
|
|
44836
44914
|
ref: n,
|
|
44837
44915
|
leftIcon: () => /* @__PURE__ */ U(Rt, {
|
|
44838
44916
|
name: t,
|
|
44839
44917
|
size: "xs"
|
|
44840
44918
|
}),
|
|
44841
44919
|
text: t,
|
|
44842
|
-
action:
|
|
44920
|
+
action: O6(e, t)
|
|
44843
44921
|
}));
|
|
44844
|
-
|
|
44845
|
-
var
|
|
44922
|
+
F6.displayName = "TeamItem";
|
|
44923
|
+
var I6 = Ue("TeamItem", F6), L6 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
44846
44924
|
ref: t,
|
|
44847
44925
|
className: "flex items-start pt-1",
|
|
44848
44926
|
children: /* @__PURE__ */ U(cn, { ...e })
|
|
44849
44927
|
}));
|
|
44850
|
-
|
|
44851
|
-
var
|
|
44928
|
+
L6.displayName = "DotTagItem";
|
|
44929
|
+
var R6 = Ue("DotTagItem", L6), z6 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
44852
44930
|
ref: t,
|
|
44853
44931
|
className: "flex items-start pt-1",
|
|
44854
44932
|
children: /* @__PURE__ */ U(ln, { ...e })
|
|
44855
44933
|
}));
|
|
44856
|
-
|
|
44857
|
-
var
|
|
44934
|
+
z6.displayName = "AlertTagItem";
|
|
44935
|
+
var B6 = Ue("AlertTagItem", z6), V6 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
44858
44936
|
ref: t,
|
|
44859
44937
|
className: "flex items-start pt-1",
|
|
44860
44938
|
children: /* @__PURE__ */ U(Xt, { ...e })
|
|
44861
44939
|
}));
|
|
44862
|
-
|
|
44863
|
-
var
|
|
44940
|
+
V6.displayName = "BalanceTagItem";
|
|
44941
|
+
var H6 = Ue("BalanceTagItem", V6), U6 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
44864
44942
|
ref: t,
|
|
44865
44943
|
className: "flex items-start pt-1",
|
|
44866
44944
|
children: /* @__PURE__ */ U(Gt, { ...e })
|
|
44867
44945
|
}));
|
|
44868
|
-
|
|
44869
|
-
var
|
|
44946
|
+
U6.displayName = "StatusTagItem";
|
|
44947
|
+
var W6 = Ue("StatusTagItem", U6), G6 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
44870
44948
|
ref: t,
|
|
44871
44949
|
className: "flex items-start pt-1",
|
|
44872
44950
|
children: /* @__PURE__ */ U(Yn, { ...e })
|
|
44873
44951
|
}));
|
|
44874
|
-
|
|
44875
|
-
var
|
|
44952
|
+
G6.displayName = "RawTagItem";
|
|
44953
|
+
var K6 = Ue("RawTagItem", G6);
|
|
44876
44954
|
//#endregion
|
|
44877
44955
|
//#region src/elements/DataList/items/TagListItem.tsx
|
|
44878
|
-
function
|
|
44956
|
+
function q6(e, t) {
|
|
44879
44957
|
return /* @__PURE__ */ U("li", {
|
|
44880
44958
|
ref: t,
|
|
44881
44959
|
className: "flex items-start pt-1",
|
|
44882
44960
|
children: /* @__PURE__ */ U(ir, { ...e })
|
|
44883
44961
|
});
|
|
44884
44962
|
}
|
|
44885
|
-
var
|
|
44886
|
-
|
|
44887
|
-
var
|
|
44963
|
+
var J6 = R(q6);
|
|
44964
|
+
J6.displayName = "TagListItem";
|
|
44965
|
+
var Y6 = Ue("TagListItem", J6), X6 = R(({ children: e, label: t, isHorizontal: n = !1 }, r) => /* @__PURE__ */ W("div", {
|
|
44888
44966
|
className: F(n ? "flex min-h-12 flex-1 flex-col py-1.5 pl-3 pr-1.5 xs:flex-row" : "min-w-32"),
|
|
44889
44967
|
children: [t ? /* @__PURE__ */ U("p", {
|
|
44890
44968
|
className: F("px-1.5 text-f1-foreground-secondary", n ? "mt-2 w-44 xs:px-0" : "mb-0.5"),
|
|
@@ -44895,33 +44973,33 @@ var k6 = Ue("TagListItem", O6), A6 = R(({ children: e, label: t, isHorizontal: n
|
|
|
44895
44973
|
children: e
|
|
44896
44974
|
})]
|
|
44897
44975
|
}));
|
|
44898
|
-
|
|
44899
|
-
var
|
|
44900
|
-
Item:
|
|
44901
|
-
CompanyItem:
|
|
44902
|
-
PersonItem:
|
|
44903
|
-
TeamItem:
|
|
44904
|
-
DotTagItem:
|
|
44905
|
-
AlertTagItem:
|
|
44906
|
-
BalanceTagItem:
|
|
44907
|
-
StatusTagItem:
|
|
44908
|
-
RawTagItem:
|
|
44909
|
-
TagListItem:
|
|
44910
|
-
}),
|
|
44976
|
+
X6.displayName = "DataList";
|
|
44977
|
+
var Z6 = Ue("DataList", X6), Q6 = Object.assign(Z6, {
|
|
44978
|
+
Item: A6,
|
|
44979
|
+
CompanyItem: P6,
|
|
44980
|
+
PersonItem: M6,
|
|
44981
|
+
TeamItem: I6,
|
|
44982
|
+
DotTagItem: R6,
|
|
44983
|
+
AlertTagItem: B6,
|
|
44984
|
+
BalanceTagItem: H6,
|
|
44985
|
+
StatusTagItem: W6,
|
|
44986
|
+
RawTagItem: K6,
|
|
44987
|
+
TagListItem: Y6
|
|
44988
|
+
}), $6 = ({ content: e }) => /* @__PURE__ */ W(Gr, { children: [
|
|
44911
44989
|
e.type === "weekdays" ? /* @__PURE__ */ U("li", {
|
|
44912
44990
|
className: "list-none px-1.5 py-1",
|
|
44913
|
-
children: /* @__PURE__ */ U(
|
|
44991
|
+
children: /* @__PURE__ */ U(x6, { ...e })
|
|
44914
44992
|
}) : null,
|
|
44915
|
-
e.type === "person" ? /* @__PURE__ */ U(
|
|
44916
|
-
e.type === "item" ? /* @__PURE__ */ U(
|
|
44917
|
-
e.type === "team" ? /* @__PURE__ */ U(
|
|
44918
|
-
e.type === "company" ? /* @__PURE__ */ U(
|
|
44919
|
-
e.type === "dot-tag" ? /* @__PURE__ */ U(
|
|
44920
|
-
e.type === "alert-tag" ? /* @__PURE__ */ U(
|
|
44921
|
-
e.type === "balance-tag" ? /* @__PURE__ */ U(
|
|
44922
|
-
e.type === "status-tag" ? /* @__PURE__ */ U(
|
|
44923
|
-
e.type === "raw-tag" ? /* @__PURE__ */ U(
|
|
44924
|
-
e.type === "tag-list" ? /* @__PURE__ */ U(
|
|
44993
|
+
e.type === "person" ? /* @__PURE__ */ U(Q6.PersonItem, { ...e }) : null,
|
|
44994
|
+
e.type === "item" ? /* @__PURE__ */ U(Q6.Item, { ...e }) : null,
|
|
44995
|
+
e.type === "team" ? /* @__PURE__ */ U(Q6.TeamItem, { ...e }) : null,
|
|
44996
|
+
e.type === "company" ? /* @__PURE__ */ U(Q6.CompanyItem, { ...e }) : null,
|
|
44997
|
+
e.type === "dot-tag" ? /* @__PURE__ */ U(Q6.DotTagItem, { ...e }) : null,
|
|
44998
|
+
e.type === "alert-tag" ? /* @__PURE__ */ U(Q6.AlertTagItem, { ...e }) : null,
|
|
44999
|
+
e.type === "balance-tag" ? /* @__PURE__ */ U(Q6.BalanceTagItem, { ...e }) : null,
|
|
45000
|
+
e.type === "status-tag" ? /* @__PURE__ */ U(Q6.StatusTagItem, { ...e }) : null,
|
|
45001
|
+
e.type === "raw-tag" ? /* @__PURE__ */ U(Q6.RawTagItem, { ...e }) : null,
|
|
45002
|
+
e.type === "tag-list" ? /* @__PURE__ */ U(Q6.TagListItem, { ...e.tagList }) : null,
|
|
44925
45003
|
e.type === "avatar-list" ? /* @__PURE__ */ U("li", {
|
|
44926
45004
|
className: "list-none px-1.5 py-1",
|
|
44927
45005
|
children: /* @__PURE__ */ U(Nt, { ...e.avatarList })
|
|
@@ -44930,28 +45008,28 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
44930
45008
|
let { type: t, ...n } = e;
|
|
44931
45009
|
return /* @__PURE__ */ U("li", {
|
|
44932
45010
|
className: "list-none px-1.5 py-1",
|
|
44933
|
-
children: /* @__PURE__ */ U(
|
|
45011
|
+
children: /* @__PURE__ */ U(Q$, { ...n })
|
|
44934
45012
|
});
|
|
44935
45013
|
})() : null
|
|
44936
|
-
] }),
|
|
45014
|
+
] }), e8 = R(function({ title: e, content: t, isHorizontal: n = !1, verticalLayout: r = !1, spacingAtTheBottom: i }, a) {
|
|
44937
45015
|
let o = Array.isArray(t) ? t : [t];
|
|
44938
45016
|
return /* @__PURE__ */ U("div", {
|
|
44939
45017
|
ref: a,
|
|
44940
45018
|
className: F("flex flex-col gap-0.5", i && !n && "pb-3", n && !r && "xs:[&_ul>li]:p-0 [&_ul]:flex-1", n && r && "[&_ul>li>*]:px-0 [&_ul]:flex-1 xs:[&>div]:flex-col"),
|
|
44941
|
-
children: /* @__PURE__ */ U(
|
|
45019
|
+
children: /* @__PURE__ */ U(Q6, {
|
|
44942
45020
|
label: e,
|
|
44943
45021
|
isHorizontal: n,
|
|
44944
|
-
children: o.map((e, t) => /* @__PURE__ */ U(
|
|
45022
|
+
children: o.map((e, t) => /* @__PURE__ */ U($6, { content: e }, t))
|
|
44945
45023
|
})
|
|
44946
45024
|
});
|
|
44947
|
-
}),
|
|
45025
|
+
}), t8 = be(Ue("DetailsItem", e8)), n8 = ({ onClick: e }) => {
|
|
44948
45026
|
let t = He();
|
|
44949
45027
|
return /* @__PURE__ */ U(xe, {
|
|
44950
45028
|
label: t.actions.seeMore,
|
|
44951
45029
|
onClick: e,
|
|
44952
45030
|
variant: "neutral"
|
|
44953
45031
|
});
|
|
44954
|
-
},
|
|
45032
|
+
}, r8 = R(function({ title: e, tableView: t = !1, details: n, dataTestId: r, showSeeMore: i, onClickSeeMore: a }, o) {
|
|
44955
45033
|
return /* @__PURE__ */ U(je, {
|
|
44956
45034
|
dataTestId: r,
|
|
44957
45035
|
children: /* @__PURE__ */ W("div", {
|
|
@@ -44964,7 +45042,7 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
44964
45042
|
}) : null,
|
|
44965
45043
|
/* @__PURE__ */ U("div", {
|
|
44966
45044
|
className: F("flex flex-col", t ? "rounded-md border border-solid border-f1-border-secondary" : "gap-3"),
|
|
44967
|
-
children: n?.map((e, r) => /* @__PURE__ */ W(L.Fragment, { children: [/* @__PURE__ */ U(
|
|
45045
|
+
children: n?.map((e, r) => /* @__PURE__ */ W(L.Fragment, { children: [/* @__PURE__ */ U(t8, {
|
|
44968
45046
|
title: e.title,
|
|
44969
45047
|
content: e.content,
|
|
44970
45048
|
spacingAtTheBottom: e.spacingAtTheBottom,
|
|
@@ -44972,13 +45050,13 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
44972
45050
|
verticalLayout: e.verticalLayout
|
|
44973
45051
|
}, e.title), t && r !== n.length - 1 ? /* @__PURE__ */ U("div", { className: "h-[1px] w-full bg-f1-border-secondary" }) : null] }, e.title))
|
|
44974
45052
|
}),
|
|
44975
|
-
i ? /* @__PURE__ */ U(
|
|
45053
|
+
i ? /* @__PURE__ */ U(n8, { onClick: a }) : null
|
|
44976
45054
|
]
|
|
44977
45055
|
})
|
|
44978
45056
|
});
|
|
44979
|
-
}),
|
|
44980
|
-
let { reducedMotion: f } =
|
|
44981
|
-
return
|
|
45057
|
+
}), i8 = Ue("DetailsItemsList", r8), a8 = ({ image: e, aspectRatio: t, spanFull: n, inset: r, surfaceClassName: i, label: a, onOpen: o, overlay: s, eager: c = !0, onImageError: l, testIdPrefix: u = "chat", preventDrag: d = !1 }) => {
|
|
45058
|
+
let { reducedMotion: f } = v1(), [p, m] = H(!1), h = A1(e.thumbnailUrl ?? e.url);
|
|
45059
|
+
return j1(h.status, l), /* @__PURE__ */ W("button", {
|
|
44982
45060
|
type: "button",
|
|
44983
45061
|
onClick: o,
|
|
44984
45062
|
style: { aspectRatio: t },
|
|
@@ -44994,7 +45072,7 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
44994
45072
|
className: "pointer-events-none absolute inset-0 h-full w-full scale-105 object-cover blur-md",
|
|
44995
45073
|
"data-testid": `${u}-image-blur`
|
|
44996
45074
|
}) : null,
|
|
44997
|
-
h.status === "ready" ? /* @__PURE__ */ U(
|
|
45075
|
+
h.status === "ready" ? /* @__PURE__ */ U(q1, {
|
|
44998
45076
|
src: h.url,
|
|
44999
45077
|
alt: e.name,
|
|
45000
45078
|
eager: c,
|
|
@@ -45010,8 +45088,8 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
45010
45088
|
s
|
|
45011
45089
|
]
|
|
45012
45090
|
});
|
|
45013
|
-
},
|
|
45014
|
-
let s = He(), { urlCache: c } =
|
|
45091
|
+
}, o8 = "w-[24rem] max-w-full", s8 = "w-[32rem] max-w-full", c8 = "gap-0.5", l8 = "pointer-events-none absolute inset-x-0 bottom-0 h-[46%] bg-[linear-gradient(to_top,rgba(0,0,0,0.5),rgba(0,0,0,0.18)_45%,transparent)]", u8 = "bg-[hsl(222_31%_11%)]", d8 = "bg-[hsl(220_39%_6%/0.72)]", f8 = "bg-[hsl(220_39%_6%/0.6)]", p8 = "bg-[hsl(220_39%_6%/0.55)]", m8 = Lr(() => import("./F0VideoPlayer-Ahs45M0U.js").then((e) => ({ default: e.F0VideoPlayer }))), h8 = ({ file: e, cornerClass: t, className: n, surfaceClassName: r, meta: i, onDownloaded: a, testIdPrefix: o = "chat" }) => {
|
|
45092
|
+
let s = He(), { urlCache: c } = v1(), l = M1(), [u, d] = H(!1), [f, p] = H(!1), m = c !== null && !m1(e.url), [h, g] = H(!1), _ = A1(e.url, { enabled: !m || h }), v = A1(e.thumbnailUrl), y = v.status === "ready" ? v.url : void 0, b = e.size == null ? null : Z1(e.size), x = {
|
|
45015
45093
|
label: s.t("chat.downloadNamedFile", { name: e.name }),
|
|
45016
45094
|
icon: qa,
|
|
45017
45095
|
onClick: () => {
|
|
@@ -45021,7 +45099,7 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
45021
45099
|
return /* @__PURE__ */ W("figure", {
|
|
45022
45100
|
"aria-label": e.name,
|
|
45023
45101
|
"aria-busy": !f && !S || void 0,
|
|
45024
|
-
className: F("group/video relative m-0 aspect-video max-w-full overflow-hidden",
|
|
45102
|
+
className: F("group/video relative m-0 aspect-video max-w-full overflow-hidden", o8, u8, t, n),
|
|
45025
45103
|
onErrorCapture: (e) => {
|
|
45026
45104
|
e.target instanceof HTMLVideoElement && d(!0);
|
|
45027
45105
|
},
|
|
@@ -45034,7 +45112,7 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
45034
45112
|
S ? /* @__PURE__ */ W("div", {
|
|
45035
45113
|
className: "absolute inset-0 flex flex-col items-center justify-center gap-2 p-4",
|
|
45036
45114
|
"data-testid": `${o}-video-error`,
|
|
45037
|
-
children: [/* @__PURE__ */ U(
|
|
45115
|
+
children: [/* @__PURE__ */ U(Q$, {
|
|
45038
45116
|
size: "md",
|
|
45039
45117
|
file: {
|
|
45040
45118
|
name: e.name,
|
|
@@ -45051,7 +45129,7 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
45051
45129
|
"aria-hidden": f ? !0 : void 0,
|
|
45052
45130
|
"data-testid": `${o}-video-placeholder`,
|
|
45053
45131
|
children: [
|
|
45054
|
-
/* @__PURE__ */ U(
|
|
45132
|
+
/* @__PURE__ */ U(g8, {
|
|
45055
45133
|
name: e.name,
|
|
45056
45134
|
poster: y,
|
|
45057
45135
|
announce: !f,
|
|
@@ -45059,11 +45137,11 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
45059
45137
|
}),
|
|
45060
45138
|
/* @__PURE__ */ U("span", { className: "absolute inset-0 bg-[hsl(0_0%_0%/0.2)]" }),
|
|
45061
45139
|
/* @__PURE__ */ U("span", {
|
|
45062
|
-
className: F("absolute left-1/2 top-1/2 flex size-14 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full text-f1-foreground-inverse",
|
|
45140
|
+
className: F("absolute left-1/2 top-1/2 flex size-14 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full text-f1-foreground-inverse", d8),
|
|
45063
45141
|
children: /* @__PURE__ */ U(Ac, { className: "size-6" })
|
|
45064
45142
|
}),
|
|
45065
45143
|
b ? /* @__PURE__ */ U("span", {
|
|
45066
|
-
className: F("absolute bottom-2 left-2 rounded-full px-2 py-0.5 text-sm font-medium text-f1-foreground-inverse",
|
|
45144
|
+
className: F("absolute bottom-2 left-2 rounded-full px-2 py-0.5 text-sm font-medium text-f1-foreground-inverse", f8),
|
|
45067
45145
|
"data-testid": `${o}-video-size`,
|
|
45068
45146
|
children: b
|
|
45069
45147
|
}) : null
|
|
@@ -45081,7 +45159,7 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
45081
45159
|
"data-testid": `${o}-video-player-shell`,
|
|
45082
45160
|
children: /* @__PURE__ */ U(Mr, {
|
|
45083
45161
|
fallback: null,
|
|
45084
|
-
children: _.status === "ready" ? /* @__PURE__ */ U(
|
|
45162
|
+
children: _.status === "ready" ? /* @__PURE__ */ U(m8, {
|
|
45085
45163
|
src: _.url,
|
|
45086
45164
|
ariaLabel: s.t("chat.videoPlayerLabel", { name: e.name }),
|
|
45087
45165
|
poster: y,
|
|
@@ -45107,25 +45185,25 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
45107
45185
|
})
|
|
45108
45186
|
]
|
|
45109
45187
|
});
|
|
45110
|
-
},
|
|
45188
|
+
}, g8 = ({ name: e, poster: t, announce: n = !0, surfaceClassName: r }) => {
|
|
45111
45189
|
let i = He();
|
|
45112
45190
|
return /* @__PURE__ */ U("div", {
|
|
45113
45191
|
role: n ? "status" : void 0,
|
|
45114
45192
|
"aria-label": n ? i.t("chat.loadingVideo", { name: e }) : void 0,
|
|
45115
45193
|
"aria-hidden": !n || void 0,
|
|
45116
45194
|
className: "relative h-full w-full",
|
|
45117
|
-
children: t ? /* @__PURE__ */ U(
|
|
45195
|
+
children: t ? /* @__PURE__ */ U(q1, {
|
|
45118
45196
|
src: t,
|
|
45119
45197
|
alt: "",
|
|
45120
45198
|
"aria-hidden": "true",
|
|
45121
45199
|
className: "h-full w-full object-contain"
|
|
45122
45200
|
}) : /* @__PURE__ */ U(Ie, { className: F("h-full w-full", n ? "motion-reduce:animate-none" : "animate-none", r) })
|
|
45123
45201
|
});
|
|
45124
|
-
},
|
|
45125
|
-
let t =
|
|
45202
|
+
}, _8 = /* @__PURE__ */ new Map(), v8 = /* @__PURE__ */ new Set(), y8 = /* @__PURE__ */ new Map(), b8 = (e) => _8.get(e) ?? (v8.has(e) ? null : void 0), x8 = (e) => {
|
|
45203
|
+
let t = _8.get(e);
|
|
45126
45204
|
if (t) return Promise.resolve(t);
|
|
45127
|
-
if (
|
|
45128
|
-
let n =
|
|
45205
|
+
if (v8.has(e)) return Promise.resolve(null);
|
|
45206
|
+
let n = y8.get(e);
|
|
45129
45207
|
if (n) return n;
|
|
45130
45208
|
if (typeof Image > "u") return Promise.resolve(null);
|
|
45131
45209
|
let r = new Promise((t) => {
|
|
@@ -45135,20 +45213,20 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
45135
45213
|
width: n.naturalWidth,
|
|
45136
45214
|
height: n.naturalHeight
|
|
45137
45215
|
};
|
|
45138
|
-
r.width > 0 && r.height > 0 ? (
|
|
45216
|
+
r.width > 0 && r.height > 0 ? (_8.set(e, r), t(r)) : (v8.add(e), t(null));
|
|
45139
45217
|
}, n.onerror = () => {
|
|
45140
|
-
|
|
45218
|
+
v8.add(e), t(null);
|
|
45141
45219
|
}, n.src = e;
|
|
45142
45220
|
}).finally(() => {
|
|
45143
|
-
|
|
45221
|
+
y8.delete(e);
|
|
45144
45222
|
});
|
|
45145
|
-
return
|
|
45146
|
-
},
|
|
45223
|
+
return y8.set(e, r), r;
|
|
45224
|
+
}, S8 = (e, t) => {
|
|
45147
45225
|
let n = t?.width, r = t?.height, i = !!(n && r), [, a] = H(null);
|
|
45148
45226
|
return B(() => {
|
|
45149
45227
|
if (!e || i) return;
|
|
45150
45228
|
let t = !1;
|
|
45151
|
-
return
|
|
45229
|
+
return x8(e).then((n) => {
|
|
45152
45230
|
t || a({
|
|
45153
45231
|
src: e,
|
|
45154
45232
|
size: n
|
|
@@ -45159,8 +45237,8 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
45159
45237
|
}, [e, i]), n && r ? {
|
|
45160
45238
|
width: n,
|
|
45161
45239
|
height: r
|
|
45162
|
-
} : e ?
|
|
45163
|
-
},
|
|
45240
|
+
} : e ? b8(e) : void 0;
|
|
45241
|
+
}, C8 = 1.3, w8 = .6, T8 = (e, t) => {
|
|
45164
45242
|
if (!e || !t) return null;
|
|
45165
45243
|
let n = Math.min(e, 384), r = n * t / e;
|
|
45166
45244
|
r > 512 && (r = 512, n = r * e / t);
|
|
@@ -45171,10 +45249,10 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
45171
45249
|
scaleX: Math.min(1, n / i),
|
|
45172
45250
|
scaleY: Math.min(1, r / a)
|
|
45173
45251
|
};
|
|
45174
|
-
},
|
|
45252
|
+
}, E8 = (e) => {
|
|
45175
45253
|
if (e.length === 0) return [];
|
|
45176
45254
|
if (e.length === 1) {
|
|
45177
|
-
let t =
|
|
45255
|
+
let t = T8(e[0]?.width, e[0]?.height), n = t ? t.scaleX < 1 || t.scaleY < 1 : !1;
|
|
45178
45256
|
return [{
|
|
45179
45257
|
index: 0,
|
|
45180
45258
|
span: 2,
|
|
@@ -45189,14 +45267,14 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
45189
45267
|
if (e.length === 2) return e.map((e, t) => ({
|
|
45190
45268
|
index: t,
|
|
45191
45269
|
span: 1,
|
|
45192
|
-
aspectRatio: 1 /
|
|
45270
|
+
aspectRatio: 1 / C8,
|
|
45193
45271
|
hiddenCount: 0
|
|
45194
45272
|
}));
|
|
45195
45273
|
if (e.length === 3) return [
|
|
45196
45274
|
{
|
|
45197
45275
|
index: 0,
|
|
45198
45276
|
span: 2,
|
|
45199
|
-
aspectRatio: 1 /
|
|
45277
|
+
aspectRatio: 1 / w8,
|
|
45200
45278
|
hiddenCount: 0
|
|
45201
45279
|
},
|
|
45202
45280
|
{
|
|
@@ -45219,7 +45297,7 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
45219
45297
|
aspectRatio: 1,
|
|
45220
45298
|
hiddenCount: n === 3 ? t : 0
|
|
45221
45299
|
}));
|
|
45222
|
-
},
|
|
45300
|
+
}, D8 = ({ position: e }) => /* @__PURE__ */ U(De.div, {
|
|
45223
45301
|
transition: {
|
|
45224
45302
|
duration: .2,
|
|
45225
45303
|
ease: "easeOut"
|
|
@@ -45238,8 +45316,8 @@ var j6 = Ue("DataList", A6), M6 = Object.assign(j6, {
|
|
|
45238
45316
|
});
|
|
45239
45317
|
//#endregion
|
|
45240
45318
|
//#region src/addons/ai/ai/F0AiChat/providers/useAiChatToggle.ts
|
|
45241
|
-
function
|
|
45242
|
-
let { enabled: e, open: t, setOpen: n, panelContent: r, clearPanelContent: i, restoringPanelContentId: a } =
|
|
45319
|
+
function O8() {
|
|
45320
|
+
let { enabled: e, open: t, setOpen: n, panelContent: r, clearPanelContent: i, restoringPanelContentId: a } = M4();
|
|
45243
45321
|
return {
|
|
45244
45322
|
enabled: e,
|
|
45245
45323
|
open: t && !r && !a,
|
|
@@ -45250,8 +45328,8 @@ function c8() {
|
|
|
45250
45328
|
}
|
|
45251
45329
|
//#endregion
|
|
45252
45330
|
//#region src/addons/ai/ai/F0OneSwitch/F0OneSwitch.tsx
|
|
45253
|
-
var
|
|
45254
|
-
let c =
|
|
45331
|
+
var k8 = ({ className: e, disabled: t, onVisible: n, tooltip: r, autoOpen: i = !1, onToggle: a, checked: o, onCheckedChange: s }) => {
|
|
45332
|
+
let c = O8(), l = He(), u = s !== void 0, d = u ? !0 : c.enabled, f = u ? !!o : c.open, p = u ? s : c.setOpen, [m, h] = H(!1), [g, _] = H(!1), [v, y] = H(i), b = t && r?.whenDisabled ? r?.whenDisabled : r?.whenEnabled ?? l.ai.welcome, x = i ? v : g;
|
|
45255
45333
|
return B(() => {
|
|
45256
45334
|
i && y(!0);
|
|
45257
45335
|
}, [i]), B(() => {
|
|
@@ -45282,7 +45360,7 @@ var l8 = ({ className: e, disabled: t, onVisible: n, tooltip: r, autoOpen: i = !
|
|
|
45282
45360
|
children: /* @__PURE__ */ U(fn, {
|
|
45283
45361
|
className: F("block h-[1.375rem] w-[1.375rem] translate-x-[0.3125rem] rounded-full transition-transform duration-300 data-[state=checked]:translate-x-[1.3125rem]"),
|
|
45284
45362
|
style: { transitionTimingFunction: "cubic-bezier(0.175,0.885,0.32,1.5)" },
|
|
45285
|
-
children: /* @__PURE__ */ U("div", { children: /* @__PURE__ */ U(
|
|
45363
|
+
children: /* @__PURE__ */ U("div", { children: /* @__PURE__ */ U(l1, {
|
|
45286
45364
|
size: "sm",
|
|
45287
45365
|
background: f ? "white" : void 0,
|
|
45288
45366
|
hover: m
|
|
@@ -45300,7 +45378,7 @@ var l8 = ({ className: e, disabled: t, onVisible: n, tooltip: r, autoOpen: i = !
|
|
|
45300
45378
|
};
|
|
45301
45379
|
//#endregion
|
|
45302
45380
|
//#region src/addons/ai/ai/F0CanvasPanel/F0CanvasPanel.tsx
|
|
45303
|
-
function
|
|
45381
|
+
function A8({ content: e, onClose: t, entities: n, side: r = "right" }) {
|
|
45304
45382
|
let i = r === "left", a = e?.coversChat === !0, o = O(), [s, c] = H(0), l = V(e);
|
|
45305
45383
|
B(() => {
|
|
45306
45384
|
e && l.current && e !== l.current && c((e) => e + 1), l.current = e;
|
|
@@ -45360,6 +45438,6 @@ function u8({ content: e, onClose: t, entities: n, side: r = "right" }) {
|
|
|
45360
45438
|
})
|
|
45361
45439
|
}) : null });
|
|
45362
45440
|
}
|
|
45363
|
-
|
|
45441
|
+
A8.displayName = "F0CanvasPanel";
|
|
45364
45442
|
//#endregion
|
|
45365
|
-
export {
|
|
45443
|
+
export { W0 as $, Xc as $a, tp as $i, bG as $n, $o, ez as $r, zi as $s, nZ as $t, Z3 as A, Wl as Aa, BT as Ai, Gq as An, Hs as Ao, NH as Ar, Ka as As, Q$ as At, b4 as B, hl as Ba, zv as Bi, cq as Bn, Os as Bo, lH as Br, ga as Bs, SQ as Bt, p6 as C, Hd as Ca, $D as Ci, vJ as Cn, oc as Co, WH as Cr, to as Cs, A1 as Ct, s6 as D, Eu as Da, cD as Di, Zq as Dn, Ys as Do, RH as Dr, Ya as Ds, d1 as Dt, o6 as E, ku as Ea, OD as Ei, hJ as En, Zs as Eo, IH as Er, Xa as Es, m1 as Et, Z4 as F, Tl as Fa, jx as Fi, _q as Fn, Fs as Fo, SH as Fr, Da as Fs, BQ as Ft, N2 as G, al as Ga, xg as Gi, nq as Gn, _s as Go, KV as Gr, da as Gs, vQ as Gt, q2 as H, ml as Ha, mv as Hi, aq as Hn, bs as Ho, aH as Hr, ma as Hs, _Q as Ht, q4 as I, yl as Ia, sx as Ii, vq as In, Ps as Io, yH as Ir, wa as Is, FQ as It, Q0 as J, nl as Ja, Kp as Ji, wG as Jn, ls as Jo, DV as Jr, na as Js, lZ as Jt, g2 as K, il as Ka, Hh as Ki, sq as Kn, hs as Ko, MV as Kr, ua as Ks, sZ as Kt, P4 as L, xl as La, ib as Li, gq as Ln, Ns as Lo, mH as Lr, xa as Ls, kQ as Lt, O3 as M, vl as Ma, Ux as Mi, xq as Mn, Bs as Mo, EH as Mr, Ra as Ms, q$ as Mt, D3 as N, El as Na, Hx as Ni, bq as Nn, zs as No, TH as Nr, Ia as Ns, K$ as Nt, $3 as O, Kl as Oa, LE as Oi, Iq as On, Ks as Oo, LH as Or, Ja as Os, l1 as Ot, e3 as P, wl as Pa, Ix as Pi, mq as Pn, Is as Po, wH as Pr, Oa as Ps, U$ as Pt, U0 as Q, Zc as Qa, pp as Qi, SG as Qn, ts as Qo, _z as Qr, Bi as Qs, uZ as Qt, N4 as R, bl as Ra, ey as Ri, yq as Rn, Ms as Ro, uH as Rr, ba as Rs, IQ as Rt, u6 as S, Gd as Sa, TO as Si, yJ as Sn, sc as So, qH as Sr, no as Ss, j1 as St, l6 as T, Mu as Ta, VD as Ti, mJ as Tn, ec as To, VH as Tr, $a as Ts, _1 as Tt, K2 as U, dl as Ua, C_ as Ui, rq as Un, ys as Uo, GV as Ur, pa as Us, bQ as Ut, y4 as V, pl as Va, Nv as Vi, iq as Vn, Ss as Vo, oH as Vr, ha as Vs, xQ as Vt, L2 as W, ol as Wa, t_ as Wi, lq as Wn, vs as Wo, qV as Wr, fa as Ws, CQ as Wt, e2 as X, $c as Xa, wp as Xi, _G as Xn, ss as Xo, VB as Xr, qi as Xs, iZ as Xt, t2 as Y, tl as Ya, jp as Yi, TG as Yn, cs as Yo, KB as Yr, ea as Ys, fZ as Yt, G0 as Z, Qc as Za, kp as Zi, gG as Zn, is as Zo, BB as Zr, Gi as Zs, aZ as Zt, t8 as _, af as _a, ak as _i, AJ as _n, _c as _o, rU as _r, lo as _s, P1 as _t, T8 as a, Pf as aa, Ai as ac, vI as ai, eZ as an, Wc as ao, oG as ar, Vo as as, Z1 as at, y6 as b, zd as ba, EO as bi, wJ as bn, uc as bo, YH as br, ao as bs, F1 as bt, x8 as c, yf as ca, Ei as cc, VF as ci, QX as cn, Rc as co, JW as cr, Oo as cs, Q1 as ct, p8 as d, _f as da, aN as di, zY as dn, jc as do, IU as dr, Co as ds, p0 as dt, Xf as ea, Ri as ec, LR as ei, JX as en, Yc as eo, yG as er, Zo as es, T0 as et, l8 as f, vf as fa, rN as fi, BY as fn, Ac as fo, kU as fr, So as fs, r0 as ft, i8 as g, sf as ga, Tk as gi, MJ as gn, Sc as go, oU as gr, po as gs, V1 as gt, a8 as h, cf as ha, tA as hi, jJ as hn, Cc as ho, uU as hr, go as hs, U1 as ht, E8 as i, Yf as ia, ji as ic, yI as ii, tZ as in, Gc as io, pG as ir, Uo as is, t0 as it, k3 as j, Il as ja, zT as ji, wq as jn, Vs as jo, DH as jr, za as js, $$ as jt, Q3 as k, Gl as ka, HT as ki, Wq as kn, Gs as ko, PH as kr, qa as ks, o1 as kt, h8 as l, pf as la, Ti as lc, jF as li, LX as ln, Lc as lo, FU as lr, Do as ls, h0 as lt, o8 as m, df as ma, dA as mi, lY as mn, Oc as mo, lU as mr, _o as ms, q1 as mt, k8 as n, G as na, Ni as nc, GL as ni, KX as nn, qc as no, hG as nr, qo as ns, y0 as nt, S8 as o, Nf as oa, ki as oc, _I as oi, GX as on, Vc as oo, qW as or, Lo as os, u0 as ot, s8 as p, ff as pa, BM as pi, FY as pn, kc as po, hU as pr, vo as ps, Y1 as pt, s2 as q, rl as qa, Jp as qi, Y as qn, ds as qo, vV as qr, ca as qs, cZ as qt, D8 as r, Gf as ra, Mi as rc, pI as ri, $X as rn, Kc as ro, mG as rr, Wo as rs, l0 as rt, b8 as s, xf as sa, Oi as sc, mI as si, WX as sn, zc as so, YW as sr, Fo as ss, f0 as st, A8 as t, $f as ta, Pi as tc, mR as ti, rZ as tn, Jc as to, xG as tr, Xo as ts, b0 as tt, c8 as u, mf as ua, Jr as uc, QN as ui, IX as un, Ic as uo, jU as ur, Eo as us, g0 as ut, x6 as v, qd as va, nk as vi, kJ as vn, gc as vo, nU as vr, so as vs, N1 as vt, f6 as w, Au as wa, BD as wi, gJ as wn, ic as wo, GH as wr, eo as ws, D1 as wt, m6 as x, Ud as xa, NO as xi, CJ as xn, cc as xo, XH as xr, ro as xs, M1 as xt, v6 as y, nf as ya, DO as yi, OJ as yn, dc as yo, ZH as yr, oo as ys, L1 as yt, M4 as z, _l as za, $v as zi, oq as zn, As as zo, cH as zr, ya as zs, yQ as zt };
|