@factorialco/f0-react 3.8.2 → 3.8.4
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/ai.d.ts +0 -4
- package/dist/ai.js +1 -1
- package/dist/experimental.js +2 -2
- package/dist/f0.d.ts +1 -7
- package/dist/f0.js +4 -4
- package/dist/styles.css +1 -1
- package/dist/{useChatHistory-CwVDNwKK.js → useChatHistory-CiI4OwLF.js} +706 -685
- package/dist/{useDataCollectionSource-3nlB3zIW.js → useDataCollectionSource-DwEawB2h.js} +1 -1
- package/dist/useDataCollectionSource.css +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as c, jsx as r, Fragment as xe } from "react/jsx-runtime";
|
|
2
2
|
import { useInsertionEffect as rn, forwardRef as p, createElement as $e, useRef as I, useMemo as ee, useEffect as X, useLayoutEffect as vt, useState as P, useCallback as q, createContext as Ye, useContext as Pe, useId as wt } from "react";
|
|
3
|
-
import { cj as nn, ck as on, cl as sn, cm as an, cn as xt, co as cn, cp as ln, cq as dn, cr as fn, cs as un, ct as kt, cu as hn, cv as gn, cw as pn, cx as mn, cy as Cn, cz as vn, cA as wn, cB as We, cC as xn, cD as kn, cE as bn, cF as Ln, cG as yn, Z as bt, cH as Mn, cI as En, cJ as Rn, cK as Fn, cL as Nn, cM as Lt, cN as Sn, cO as Vn, a6 as m1, cP as Tn, aJ as Hn, cQ as An, cR as Bn, cS as $n, ag as In, cT as Pn, bO as jn, aa as C1, ad as Dn, cU as Zn, ba as v1, a1 as yt, S as Ke, cV as Mt, b9 as _n, cW as On, cX as Un, b2 as zn, bN as Gn, $ as Le, au as Wn, be as Et, cY as qn, bL as Xn, cZ as Re, bH as Yn, c_ as Kn, c$ as Rt, b1 as Ft, d0 as Qn, d1 as Jn, d2 as eo, d3 as to, d4 as ro, d5 as Nt, bz as no, bA as oo, d6 as so, d7 as io, d8 as ao, d9 as co, da as lo, db as fo, dc as uo, dd as ho, de as go, df as po, dg as mo, dh as Co, di as vo, dj as wo, bM as xo, ab as ko, bv as bo, dk as Lo, dl as yo, dm as Mo, dn as Eo, dp as Ro, dq as Fo, dr as No, ap as So, ds as St, M as Vo, a0 as To, dt as Vt, du as Tt, dv as Ho, bd as Ao, bc as Bo, dw as $o, dx as Io, dy as Ht, dz as Po, b0 as jo, ay as Do, dA as Zo, as as _o, b7 as Oo, dB as At, b6 as Uo, dC as zo, bi as w1, dD as Go, dE as Wo, dF as x1, bJ as qo, bI as Xo, bK as Bt, dG as Yo, G as Ko, E as Qo, dH as Jo, dI as es, dJ as ts, dK as rs, dL as ns, dM as $t, dN as os, ac as ss, dO as is, L as fe, q as Fe, o as
|
|
3
|
+
import { cj as nn, ck as on, cl as sn, cm as an, cn as xt, co as cn, cp as ln, cq as dn, cr as fn, cs as un, ct as kt, cu as hn, cv as gn, cw as pn, cx as mn, cy as Cn, cz as vn, cA as wn, cB as We, cC as xn, cD as kn, cE as bn, cF as Ln, cG as yn, Z as bt, cH as Mn, cI as En, cJ as Rn, cK as Fn, cL as Nn, cM as Lt, cN as Sn, cO as Vn, a6 as m1, cP as Tn, aJ as Hn, cQ as An, cR as Bn, cS as $n, ag as In, cT as Pn, bO as jn, aa as C1, ad as Dn, cU as Zn, ba as v1, a1 as yt, S as Ke, cV as Mt, b9 as _n, cW as On, cX as Un, b2 as zn, bN as Gn, $ as Le, au as Wn, be as Et, cY as qn, bL as Xn, cZ as Re, bH as Yn, c_ as Kn, c$ as Rt, b1 as Ft, d0 as Qn, d1 as Jn, d2 as eo, d3 as to, d4 as ro, d5 as Nt, bz as no, bA as oo, d6 as so, d7 as io, d8 as ao, d9 as co, da as lo, db as fo, dc as uo, dd as ho, de as go, df as po, dg as mo, dh as Co, di as vo, dj as wo, bM as xo, ab as ko, bv as bo, dk as Lo, dl as yo, dm as Mo, dn as Eo, dp as Ro, dq as Fo, dr as No, ap as So, ds as St, M as Vo, a0 as To, dt as Vt, du as Tt, dv as Ho, bd as Ao, bc as Bo, dw as $o, dx as Io, dy as Ht, dz as Po, b0 as jo, ay as Do, dA as Zo, as as _o, b7 as Oo, dB as At, b6 as Uo, dC as zo, bi as w1, dD as Go, dE as Wo, dF as x1, bJ as qo, bI as Xo, bK as Bt, dG as Yo, G as Ko, E as Qo, dH as Jo, dI as es, dJ as ts, dK as rs, dL as ns, dM as $t, dN as os, ac as ss, dO as is, L as fe, q as Fe, o as k, ae as ce, dP as as, bp as cs, bC as ls, y as It, dQ as ds, a5 as Qe, b$ as fs, Q as pe, at as us, H as le, a8 as Pt, a9 as hs, af as jt, bq as Dt, dR as gs, a$ as Zt, v as me, dS as ps, dT as ms, U as ue, u as Y, dU as Cs, cg as _t, a2 as vs, dV as ws, aP as ye, A as Ne, p as oe, aD as k1, dW as xs, aE as b1, aF as L1, b as Me, dX as ks, dY as bs, bD as Ls, V as ys, dZ as Ms, d_ as Es, d$ as Rs, e0 as $1, a3 as Fs, ak as Ot, aS as Ut, e1 as Ns, b_ as Ss, e2 as Vs, e3 as Ts, aX as zt, e4 as Hs, bU as As, e5 as Bs, aU as Ie, bg as Gt, e6 as Wt, bh as qt, c as u1, e7 as Xt, e8 as $s, bk as Is, e9 as Ps, b8 as y1, bw as js, ea as Ds, eb as Zs, ec as _s, ed as Os, ee as Us, z as zs, ef as Yt, eg as Kt, eh as Gs, aj as I1, ei as Ws, ai as qs, ej as Xs, ek as Ys } from "./F0CanvasPanel-DUO4iIQa.js";
|
|
4
4
|
import { createPortal as Qt } from "react-dom";
|
|
5
5
|
import { defaultTranslations as Ks } from "./i18n-provider-defaults.js";
|
|
6
6
|
import { useTrackVolume as Qs } from "@livekit/components-react";
|
|
@@ -61,9 +61,9 @@ function ci(e, { defaultTransition: t = {}, ...n } = {}, o, s) {
|
|
|
61
61
|
u.set(C.name, P1(g, C.at, f, u));
|
|
62
62
|
continue;
|
|
63
63
|
}
|
|
64
|
-
let [v, w,
|
|
65
|
-
|
|
66
|
-
let
|
|
64
|
+
let [v, w, x = {}] = C;
|
|
65
|
+
x.at !== void 0 && (g = P1(g, x.at, f, u));
|
|
66
|
+
let S = 0;
|
|
67
67
|
const T = (E, L, b, A = 0, H = 0) => {
|
|
68
68
|
const y = li(E), { delay: R = 0, times: F = cn(y), type: $ = "keyframes", repeat: _, repeatType: z, repeatDelay: G = 0, ...re } = L;
|
|
69
69
|
let { ease: K = t.ease || "easeOut", duration: O } = L;
|
|
@@ -96,41 +96,41 @@ function ci(e, { defaultTransition: t = {}, ...n } = {}, o, s) {
|
|
|
96
96
|
oi(F, _);
|
|
97
97
|
}
|
|
98
98
|
const ge = W + O;
|
|
99
|
-
ni(b, y, K, F, W, ge),
|
|
99
|
+
ni(b, y, K, F, W, ge), S = Math.max(Z + O, S), m = Math.max(ge, m);
|
|
100
100
|
};
|
|
101
101
|
if (xt(v)) {
|
|
102
102
|
const E = j1(v, d);
|
|
103
|
-
T(w,
|
|
103
|
+
T(w, x, D1("default", E));
|
|
104
104
|
} else {
|
|
105
105
|
const E = Jt(v, w, o, l), L = E.length;
|
|
106
106
|
for (let b = 0; b < L; b++) {
|
|
107
|
-
w = w,
|
|
107
|
+
w = w, x = x;
|
|
108
108
|
const A = E[b], H = j1(A, d);
|
|
109
109
|
for (const y in w)
|
|
110
|
-
T(w[y], di(
|
|
110
|
+
T(w[y], di(x, y), D1(y, H), b, L);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
f = g, g +=
|
|
113
|
+
f = g, g += S;
|
|
114
114
|
}
|
|
115
115
|
return d.forEach((h, C) => {
|
|
116
116
|
for (const v in h) {
|
|
117
117
|
const w = h[v];
|
|
118
118
|
w.sort(si);
|
|
119
|
-
const
|
|
119
|
+
const x = [], S = [], T = [];
|
|
120
120
|
for (let L = 0; L < w.length; L++) {
|
|
121
121
|
const { at: b, value: A, easing: H } = w[L];
|
|
122
|
-
|
|
122
|
+
x.push(A), S.push(hn(0, m, b)), T.push(H || "easeOut");
|
|
123
123
|
}
|
|
124
|
-
|
|
124
|
+
S[0] !== 0 && (S.unshift(0), x.unshift(x[0]), T.unshift(ii)), S[S.length - 1] !== 1 && (S.push(1), x.push(null)), a.has(C) || a.set(C, {
|
|
125
125
|
keyframes: {},
|
|
126
126
|
transition: {}
|
|
127
127
|
});
|
|
128
128
|
const E = a.get(C);
|
|
129
|
-
E.keyframes[v] =
|
|
129
|
+
E.keyframes[v] = x, E.transition[v] = {
|
|
130
130
|
...t,
|
|
131
131
|
duration: m,
|
|
132
132
|
ease: T,
|
|
133
|
-
times:
|
|
133
|
+
times: S,
|
|
134
134
|
...n
|
|
135
135
|
};
|
|
136
136
|
}
|
|
@@ -5992,7 +5992,7 @@ const Ae = Fe({
|
|
|
5992
5992
|
g,
|
|
5993
5993
|
{
|
|
5994
5994
|
...u,
|
|
5995
|
-
className:
|
|
5995
|
+
className: k(
|
|
5996
5996
|
Ae({ variant: t, align: n }),
|
|
5997
5997
|
o,
|
|
5998
5998
|
"inline-flex gap-0.5"
|
|
@@ -6018,7 +6018,7 @@ const Ae = Fe({
|
|
|
6018
6018
|
lines: h,
|
|
6019
6019
|
noTooltip: a,
|
|
6020
6020
|
tag: g,
|
|
6021
|
-
className:
|
|
6021
|
+
className: k(Ae({ variant: t, align: n }), o),
|
|
6022
6022
|
markdown: d,
|
|
6023
6023
|
...u,
|
|
6024
6024
|
children: e
|
|
@@ -6031,14 +6031,14 @@ const Ae = Fe({
|
|
|
6031
6031
|
g,
|
|
6032
6032
|
{
|
|
6033
6033
|
...u,
|
|
6034
|
-
className:
|
|
6034
|
+
className: k(Ae({ variant: t, align: n }), o),
|
|
6035
6035
|
ref: f
|
|
6036
6036
|
},
|
|
6037
6037
|
/* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: h } }),
|
|
6038
6038
|
m
|
|
6039
6039
|
) : $e(g, {
|
|
6040
6040
|
...u,
|
|
6041
|
-
className:
|
|
6041
|
+
className: k(Ae({ variant: t, align: n }), o),
|
|
6042
6042
|
ref: f,
|
|
6043
6043
|
dangerouslySetInnerHTML: { __html: h }
|
|
6044
6044
|
});
|
|
@@ -6047,7 +6047,7 @@ const Ae = Fe({
|
|
|
6047
6047
|
g,
|
|
6048
6048
|
{
|
|
6049
6049
|
...u,
|
|
6050
|
-
className:
|
|
6050
|
+
className: k(Ae({ variant: t, align: n }), o),
|
|
6051
6051
|
ref: f
|
|
6052
6052
|
},
|
|
6053
6053
|
e,
|
|
@@ -7017,8 +7017,8 @@ const Jl = Fe({
|
|
|
7017
7017
|
margin: C,
|
|
7018
7018
|
marginX: v,
|
|
7019
7019
|
marginY: w,
|
|
7020
|
-
marginTop:
|
|
7021
|
-
marginBottom:
|
|
7020
|
+
marginTop: x,
|
|
7021
|
+
marginBottom: S,
|
|
7022
7022
|
marginLeft: T,
|
|
7023
7023
|
marginRight: E,
|
|
7024
7024
|
// Gap
|
|
@@ -7052,7 +7052,7 @@ const Jl = Fe({
|
|
|
7052
7052
|
borderRadiusBottomRight: de,
|
|
7053
7053
|
borderStyle: M,
|
|
7054
7054
|
// Overflow
|
|
7055
|
-
overflow:
|
|
7055
|
+
overflow: V,
|
|
7056
7056
|
overflowX: N,
|
|
7057
7057
|
overflowY: j,
|
|
7058
7058
|
// Divider
|
|
@@ -7081,7 +7081,7 @@ const Jl = Fe({
|
|
|
7081
7081
|
"div",
|
|
7082
7082
|
{
|
|
7083
7083
|
ref: Se,
|
|
7084
|
-
className:
|
|
7084
|
+
className: k(
|
|
7085
7085
|
He && "border-0",
|
|
7086
7086
|
Jl({
|
|
7087
7087
|
display: e,
|
|
@@ -7101,8 +7101,8 @@ const Jl = Fe({
|
|
|
7101
7101
|
margin: C,
|
|
7102
7102
|
marginX: v,
|
|
7103
7103
|
marginY: w,
|
|
7104
|
-
marginTop:
|
|
7105
|
-
marginBottom:
|
|
7104
|
+
marginTop: x,
|
|
7105
|
+
marginBottom: S,
|
|
7106
7106
|
marginLeft: T,
|
|
7107
7107
|
marginRight: E,
|
|
7108
7108
|
gap: L,
|
|
@@ -7130,7 +7130,7 @@ const Jl = Fe({
|
|
|
7130
7130
|
borderRadiusBottomLeft: se,
|
|
7131
7131
|
borderRadiusBottomRight: de,
|
|
7132
7132
|
borderStyle: M,
|
|
7133
|
-
overflow:
|
|
7133
|
+
overflow: V,
|
|
7134
7134
|
overflowX: N,
|
|
7135
7135
|
overflowY: j,
|
|
7136
7136
|
divider: B,
|
|
@@ -7294,14 +7294,14 @@ function Z1({
|
|
|
7294
7294
|
box: "border-box"
|
|
7295
7295
|
}), h = a === "sm" || a === "md" ? c1[a] : c1.md, C = It(`(min-width: ${h}px)`, {
|
|
7296
7296
|
initializeWithValue: !1
|
|
7297
|
-
}), v = a === "none" ? !0 : a === "container-md" ? m >= c1["container-md"] : C, w = typeof o == "string" ? o : o.base,
|
|
7297
|
+
}), v = a === "none" ? !0 : a === "container-md" ? m >= c1["container-md"] : C, w = typeof o == "string" ? o : o.base, x = typeof o == "string" ? o : o.md, S = v ? x : w, T = Array.isArray(
|
|
7298
7298
|
t
|
|
7299
7299
|
) ? t : [], E = t != null && !Array.isArray(t) ? t : void 0, L = {
|
|
7300
7300
|
primaryAction: e,
|
|
7301
7301
|
secondaryItems: T,
|
|
7302
7302
|
secondaryLink: E,
|
|
7303
7303
|
otherActions: n,
|
|
7304
|
-
size:
|
|
7304
|
+
size: S,
|
|
7305
7305
|
gap: s,
|
|
7306
7306
|
align: i,
|
|
7307
7307
|
canOverflow: u
|
|
@@ -7311,7 +7311,7 @@ function Z1({
|
|
|
7311
7311
|
{
|
|
7312
7312
|
ref: g,
|
|
7313
7313
|
role: "group",
|
|
7314
|
-
className:
|
|
7314
|
+
className: k(
|
|
7315
7315
|
v ? (
|
|
7316
7316
|
// Keep the pinned trailing items (splits, divider, primary) at their
|
|
7317
7317
|
// natural width; only the first child — the flex-1 cluster — shrinks,
|
|
@@ -7373,14 +7373,14 @@ function o2({
|
|
|
7373
7373
|
X(() => {
|
|
7374
7374
|
f.current?.setAttribute("inert", "");
|
|
7375
7375
|
}, [f]);
|
|
7376
|
-
const v = d && C ? m : l, w = d ? C ? h : [] : [],
|
|
7376
|
+
const v = d && C ? m : l, w = d ? C ? h : [] : [], x = new Set(v.map((y) => y.id)), S = e ? Mr(e, s) : null, T = t.filter(qe), E = t[t.length - 1], L = E != null && g1(E) && (T.length > 0 || S != null), b = [];
|
|
7377
7377
|
t.forEach((y, R) => {
|
|
7378
7378
|
if (!qe(y)) {
|
|
7379
7379
|
if (g1(y)) {
|
|
7380
7380
|
b.push({ kind: "sep", key: `sep-${R}` });
|
|
7381
7381
|
return;
|
|
7382
7382
|
}
|
|
7383
|
-
|
|
7383
|
+
x.has(y.id) && b.push({
|
|
7384
7384
|
kind: "node",
|
|
7385
7385
|
node: Xe(y, s, "outline")
|
|
7386
7386
|
});
|
|
@@ -7406,7 +7406,7 @@ function o2({
|
|
|
7406
7406
|
"div",
|
|
7407
7407
|
{
|
|
7408
7408
|
ref: u,
|
|
7409
|
-
className:
|
|
7409
|
+
className: k(
|
|
7410
7410
|
// `[&>*]:shrink-0` keeps each rendered secondary, separator, link and
|
|
7411
7411
|
// the "⋯" trigger at its natural width: the row overflows by shedding
|
|
7412
7412
|
// into the menu, never by squeezing a button to nothing.
|
|
@@ -7439,7 +7439,7 @@ function o2({
|
|
|
7439
7439
|
(y) => F1(y, s, "outline")
|
|
7440
7440
|
),
|
|
7441
7441
|
L && /* @__PURE__ */ r(_1, {}),
|
|
7442
|
-
|
|
7442
|
+
S
|
|
7443
7443
|
] });
|
|
7444
7444
|
}
|
|
7445
7445
|
function _1() {
|
|
@@ -7453,21 +7453,36 @@ function _1() {
|
|
|
7453
7453
|
);
|
|
7454
7454
|
}
|
|
7455
7455
|
const O1 = 8, s2 = {
|
|
7456
|
-
sm: "flex flex-col @xs:flex-row @xs:items-
|
|
7457
|
-
md: "flex flex-col @md:flex-row @md:items-
|
|
7458
|
-
lg: "flex flex-col @lg:flex-row @lg:items-
|
|
7459
|
-
never: "flex flex-row items-
|
|
7456
|
+
sm: "flex flex-col @xs:flex-row @xs:items-start @xs:justify-between @xs:gap-4",
|
|
7457
|
+
md: "flex flex-col @md:flex-row @md:items-start @md:justify-between @md:gap-4",
|
|
7458
|
+
lg: "flex flex-col @lg:flex-row @lg:items-start @lg:justify-between @lg:gap-4",
|
|
7459
|
+
never: "flex flex-row items-start justify-between gap-4"
|
|
7460
7460
|
}, i2 = {
|
|
7461
|
-
sm: "@xs:
|
|
7462
|
-
md: "@md:
|
|
7463
|
-
lg: "@lg:
|
|
7464
|
-
never: "
|
|
7461
|
+
sm: "@xs:self-center",
|
|
7462
|
+
md: "@md:self-center",
|
|
7463
|
+
lg: "@lg:self-center",
|
|
7464
|
+
never: "self-center"
|
|
7465
7465
|
}, a2 = {
|
|
7466
|
+
sm: "@xs:flex-1",
|
|
7467
|
+
md: "@md:flex-1",
|
|
7468
|
+
lg: "@lg:flex-1",
|
|
7469
|
+
never: "flex-1"
|
|
7470
|
+
}, c2 = {
|
|
7471
|
+
sm: "@xs:pt-1",
|
|
7472
|
+
md: "@md:pt-1",
|
|
7473
|
+
lg: "@lg:pt-1",
|
|
7474
|
+
never: "pt-1"
|
|
7475
|
+
}, l2 = {
|
|
7476
|
+
sm: "@xs:min-h-10",
|
|
7477
|
+
md: "@md:min-h-10",
|
|
7478
|
+
lg: "@lg:min-h-10",
|
|
7479
|
+
never: "min-h-10"
|
|
7480
|
+
}, d2 = {
|
|
7466
7481
|
sm: "hidden @xs:flex",
|
|
7467
7482
|
md: "hidden @md:flex",
|
|
7468
7483
|
lg: "hidden @lg:flex",
|
|
7469
7484
|
never: "flex"
|
|
7470
|
-
},
|
|
7485
|
+
}, f2 = {
|
|
7471
7486
|
sm: "flex @xs:hidden",
|
|
7472
7487
|
md: "flex @md:hidden",
|
|
7473
7488
|
lg: "flex @lg:hidden",
|
|
@@ -7477,38 +7492,38 @@ const O1 = 8, s2 = {
|
|
|
7477
7492
|
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",
|
|
7478
7493
|
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",
|
|
7479
7494
|
never: ""
|
|
7480
|
-
},
|
|
7495
|
+
}, u2 = {
|
|
7481
7496
|
neutral: "secondary",
|
|
7482
7497
|
info: "info",
|
|
7483
7498
|
positive: "positive",
|
|
7484
7499
|
warning: "warning",
|
|
7485
7500
|
critical: "critical"
|
|
7486
7501
|
};
|
|
7487
|
-
function
|
|
7502
|
+
function h2({
|
|
7488
7503
|
primaryAction: e,
|
|
7489
7504
|
secondaryActions: t,
|
|
7490
7505
|
otherActions: n,
|
|
7491
7506
|
confirmAction: o,
|
|
7492
7507
|
rejectAction: s,
|
|
7493
7508
|
status: i,
|
|
7494
|
-
|
|
7495
|
-
|
|
7509
|
+
stackAt: a = "never",
|
|
7510
|
+
hasAvatar: d = !1
|
|
7496
7511
|
}) {
|
|
7497
|
-
const
|
|
7512
|
+
const u = d ? c2[a] : void 0;
|
|
7498
7513
|
if (i)
|
|
7499
7514
|
return /* @__PURE__ */ r(
|
|
7500
7515
|
"div",
|
|
7501
7516
|
{
|
|
7502
|
-
className:
|
|
7517
|
+
className: k(
|
|
7503
7518
|
"flex items-center justify-end",
|
|
7504
|
-
|
|
7505
|
-
|
|
7519
|
+
d && l2[a],
|
|
7520
|
+
l1[a]
|
|
7506
7521
|
),
|
|
7507
7522
|
children: /* @__PURE__ */ r(
|
|
7508
7523
|
le,
|
|
7509
7524
|
{
|
|
7510
7525
|
icon: i.icon,
|
|
7511
|
-
color:
|
|
7526
|
+
color: u2[i.variant],
|
|
7512
7527
|
size: "lg",
|
|
7513
7528
|
role: "img",
|
|
7514
7529
|
"aria-label": i.label
|
|
@@ -7516,79 +7531,81 @@ function d2({
|
|
|
7516
7531
|
)
|
|
7517
7532
|
}
|
|
7518
7533
|
);
|
|
7519
|
-
const
|
|
7534
|
+
const f = k(
|
|
7520
7535
|
"relative z-[1]",
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7536
|
+
a2[a],
|
|
7537
|
+
// After stackedChrome: its `@{bp}:pt-0` reset and our `@{bp}:pt-1` are the
|
|
7538
|
+
// same utility, so ours must come last to win once the row goes inline.
|
|
7539
|
+
l1[a],
|
|
7540
|
+
u
|
|
7541
|
+
), g = (v) => (
|
|
7525
7542
|
// Keep action clicks from bubbling to the row's onClick / overlay link.
|
|
7526
|
-
/* @__PURE__ */ r("div", { className:
|
|
7543
|
+
/* @__PURE__ */ r("div", { className: f, onClick: (w) => w.stopPropagation(), children: v })
|
|
7527
7544
|
);
|
|
7528
7545
|
if (o || s) {
|
|
7529
|
-
const
|
|
7530
|
-
const
|
|
7546
|
+
const v = (x) => {
|
|
7547
|
+
const S = s ? {
|
|
7531
7548
|
id: "reject",
|
|
7532
7549
|
icon: Le,
|
|
7533
7550
|
label: s.label ?? "Reject",
|
|
7534
|
-
hideLabel:
|
|
7551
|
+
hideLabel: x,
|
|
7535
7552
|
disabled: s.disabled,
|
|
7536
7553
|
onClick: s.onClick
|
|
7537
|
-
} : void 0,
|
|
7554
|
+
} : void 0, T = o ? {
|
|
7538
7555
|
id: "confirm",
|
|
7539
7556
|
icon: C1,
|
|
7540
7557
|
label: o.label ?? "Confirm",
|
|
7541
|
-
hideLabel:
|
|
7558
|
+
hideLabel: x,
|
|
7542
7559
|
disabled: o.disabled,
|
|
7543
7560
|
onClick: o.onClick
|
|
7544
7561
|
} : void 0;
|
|
7545
7562
|
return /* @__PURE__ */ r(
|
|
7546
7563
|
Z1,
|
|
7547
7564
|
{
|
|
7548
|
-
primaryAction:
|
|
7549
|
-
secondaryActions:
|
|
7550
|
-
size:
|
|
7565
|
+
primaryAction: T,
|
|
7566
|
+
secondaryActions: S ? [S] : void 0,
|
|
7567
|
+
size: "md",
|
|
7551
7568
|
gap: O1,
|
|
7552
7569
|
canOverflow: !1
|
|
7553
7570
|
}
|
|
7554
7571
|
);
|
|
7555
|
-
},
|
|
7572
|
+
}, w = (
|
|
7556
7573
|
// Icon-only, inline at the trailing edge.
|
|
7557
7574
|
/* @__PURE__ */ r(
|
|
7558
7575
|
"div",
|
|
7559
7576
|
{
|
|
7560
|
-
className:
|
|
7577
|
+
className: k(
|
|
7561
7578
|
"relative z-[1] min-w-0 flex-1",
|
|
7562
|
-
|
|
7579
|
+
u,
|
|
7580
|
+
d2[a]
|
|
7563
7581
|
),
|
|
7564
|
-
onClick: (
|
|
7565
|
-
children:
|
|
7582
|
+
onClick: (x) => x.stopPropagation(),
|
|
7583
|
+
children: v(!0)
|
|
7566
7584
|
}
|
|
7567
7585
|
)
|
|
7568
7586
|
);
|
|
7569
|
-
return
|
|
7570
|
-
|
|
7587
|
+
return a === "never" ? w : /* @__PURE__ */ c(xe, { children: [
|
|
7588
|
+
w,
|
|
7571
7589
|
/* @__PURE__ */ r(
|
|
7572
7590
|
"div",
|
|
7573
7591
|
{
|
|
7574
|
-
className:
|
|
7592
|
+
className: k(
|
|
7575
7593
|
"relative z-[1]",
|
|
7576
|
-
|
|
7577
|
-
l1[
|
|
7578
|
-
a && "mt-3 pt-3"
|
|
7594
|
+
f2[a],
|
|
7595
|
+
l1[a]
|
|
7579
7596
|
),
|
|
7580
|
-
onClick: (
|
|
7581
|
-
children:
|
|
7597
|
+
onClick: (x) => x.stopPropagation(),
|
|
7598
|
+
children: v(!1)
|
|
7582
7599
|
}
|
|
7583
7600
|
)
|
|
7584
7601
|
] });
|
|
7585
7602
|
}
|
|
7586
|
-
const
|
|
7587
|
-
(
|
|
7588
|
-
id: `secondary-${
|
|
7589
|
-
label:
|
|
7590
|
-
icon:
|
|
7591
|
-
onClick:
|
|
7603
|
+
const m = Array.isArray(t) ? t.map(
|
|
7604
|
+
(v, w) => ({
|
|
7605
|
+
id: `secondary-${w}`,
|
|
7606
|
+
label: v.label,
|
|
7607
|
+
icon: v.icon,
|
|
7608
|
+
onClick: v.onClick
|
|
7592
7609
|
})
|
|
7593
7610
|
) : t ? {
|
|
7594
7611
|
label: t.label,
|
|
@@ -7597,21 +7614,21 @@ function d2({
|
|
|
7597
7614
|
href: t.href,
|
|
7598
7615
|
target: t.target,
|
|
7599
7616
|
disabled: t.disabled
|
|
7600
|
-
} : void 0,
|
|
7617
|
+
} : void 0, h = e ? {
|
|
7601
7618
|
id: "primary",
|
|
7602
7619
|
label: e.label,
|
|
7603
7620
|
icon: e.icon,
|
|
7604
7621
|
onClick: e.onClick,
|
|
7605
7622
|
variant: e.variant
|
|
7606
7623
|
} : void 0;
|
|
7607
|
-
return !!
|
|
7624
|
+
return !!h || (Array.isArray(t) ? t.length > 0 : !!t) || (n?.length ?? 0) > 0 ? g(
|
|
7608
7625
|
/* @__PURE__ */ r(
|
|
7609
7626
|
Z1,
|
|
7610
7627
|
{
|
|
7611
|
-
primaryAction:
|
|
7612
|
-
secondaryActions:
|
|
7628
|
+
primaryAction: h,
|
|
7629
|
+
secondaryActions: m,
|
|
7613
7630
|
otherActions: n,
|
|
7614
|
-
size:
|
|
7631
|
+
size: "md",
|
|
7615
7632
|
gap: O1
|
|
7616
7633
|
}
|
|
7617
7634
|
)
|
|
@@ -7629,69 +7646,81 @@ const Er = p(
|
|
|
7629
7646
|
rejectAction: l,
|
|
7630
7647
|
status: u,
|
|
7631
7648
|
inactive: f = !1,
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
const T = !!h && h.visible !== !1, L = /* @__PURE__ */ c(
|
|
7649
|
+
fullHeight: g = !1,
|
|
7650
|
+
alert: m,
|
|
7651
|
+
link: h,
|
|
7652
|
+
onClick: C,
|
|
7653
|
+
disableOverlayLink: v = !1,
|
|
7654
|
+
stackAt: w = "never"
|
|
7655
|
+
}, x) {
|
|
7656
|
+
const S = !!m && m.visible !== !1, E = /* @__PURE__ */ c(
|
|
7641
7657
|
Dt,
|
|
7642
7658
|
{
|
|
7643
|
-
ref:
|
|
7644
|
-
className:
|
|
7659
|
+
ref: S ? void 0 : x,
|
|
7660
|
+
className: k(
|
|
7645
7661
|
"group relative @container bg-f1-background shadow-none transition-all",
|
|
7646
|
-
g && "
|
|
7647
|
-
m && "h-full",
|
|
7662
|
+
g && "h-full",
|
|
7648
7663
|
// Pointer + hover/focus affordance only when the whole row is clickable.
|
|
7649
|
-
(!!
|
|
7664
|
+
(!!h || !!C) && "cursor-pointer focus-within:border-f1-border-hover focus-within:shadow-md hover:border-f1-border-hover hover:shadow-md"
|
|
7650
7665
|
),
|
|
7651
|
-
style:
|
|
7652
|
-
borderColor: gs[
|
|
7666
|
+
style: S ? {
|
|
7667
|
+
borderColor: gs[m.variant],
|
|
7653
7668
|
borderWidth: "2px"
|
|
7654
7669
|
} : void 0,
|
|
7655
|
-
onClick:
|
|
7670
|
+
onClick: C,
|
|
7656
7671
|
"data-testid": "card",
|
|
7657
7672
|
children: [
|
|
7658
|
-
|
|
7673
|
+
h && !v && /* @__PURE__ */ r(
|
|
7659
7674
|
Zt,
|
|
7660
7675
|
{
|
|
7661
|
-
href:
|
|
7676
|
+
href: h,
|
|
7662
7677
|
variant: "unstyled",
|
|
7663
|
-
className:
|
|
7678
|
+
className: k("z-1 absolute inset-0 block rounded-xl", me()),
|
|
7664
7679
|
"aria-label": t,
|
|
7665
7680
|
children: " "
|
|
7666
7681
|
}
|
|
7667
7682
|
),
|
|
7668
|
-
/* @__PURE__ */ c("div", { className: s2[
|
|
7669
|
-
/* @__PURE__ */ c(
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
)
|
|
7681
|
-
}
|
|
7683
|
+
/* @__PURE__ */ c("div", { className: s2[w], children: [
|
|
7684
|
+
/* @__PURE__ */ c(
|
|
7685
|
+
"div",
|
|
7686
|
+
{
|
|
7687
|
+
className: k(
|
|
7688
|
+
"flex min-w-0 flex-row gap-3",
|
|
7689
|
+
// Centre a short single-line group against the taller controls, but
|
|
7690
|
+
// let it fill from the top once it grows (see the class doc).
|
|
7691
|
+
i2[w],
|
|
7692
|
+
// Keep the avatar pinned to the top so it stays aligned with the
|
|
7693
|
+
// title when the row grows (e.g. a long wrapping description).
|
|
7694
|
+
o ? "items-start" : "items-center"
|
|
7682
7695
|
),
|
|
7683
|
-
|
|
7684
|
-
|
|
7685
|
-
{
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
|
|
7692
|
-
|
|
7696
|
+
children: [
|
|
7697
|
+
o && /* @__PURE__ */ r(ps, { avatar: o, size: "lg" }),
|
|
7698
|
+
/* @__PURE__ */ c("div", { className: "flex min-w-0 flex-col gap-0", children: [
|
|
7699
|
+
/* @__PURE__ */ r(
|
|
7700
|
+
h1,
|
|
7701
|
+
{
|
|
7702
|
+
variant: "body",
|
|
7703
|
+
content: t,
|
|
7704
|
+
className: k(
|
|
7705
|
+
"break-words font-medium",
|
|
7706
|
+
f && "text-f1-foreground-secondary line-through"
|
|
7707
|
+
)
|
|
7708
|
+
}
|
|
7709
|
+
),
|
|
7710
|
+
n && /* @__PURE__ */ r(
|
|
7711
|
+
h1,
|
|
7712
|
+
{
|
|
7713
|
+
variant: "description",
|
|
7714
|
+
content: n,
|
|
7715
|
+
className: k("break-words", f && "line-through")
|
|
7716
|
+
}
|
|
7717
|
+
)
|
|
7718
|
+
] })
|
|
7719
|
+
]
|
|
7720
|
+
}
|
|
7721
|
+
),
|
|
7693
7722
|
/* @__PURE__ */ r(
|
|
7694
|
-
|
|
7723
|
+
h2,
|
|
7695
7724
|
{
|
|
7696
7725
|
primaryAction: s,
|
|
7697
7726
|
secondaryActions: i,
|
|
@@ -7699,35 +7728,27 @@ const Er = p(
|
|
|
7699
7728
|
confirmAction: d,
|
|
7700
7729
|
rejectAction: l,
|
|
7701
7730
|
status: u,
|
|
7702
|
-
|
|
7703
|
-
|
|
7731
|
+
stackAt: w,
|
|
7732
|
+
hasAvatar: !!o
|
|
7704
7733
|
}
|
|
7705
7734
|
)
|
|
7706
7735
|
] })
|
|
7707
7736
|
]
|
|
7708
7737
|
}
|
|
7709
7738
|
);
|
|
7710
|
-
return
|
|
7739
|
+
return S ? /* @__PURE__ */ r(ms, { ref: x, alert: m, fullHeight: g, children: E }) : E;
|
|
7711
7740
|
}
|
|
7712
7741
|
);
|
|
7713
7742
|
Er.displayName = "F0CardRow";
|
|
7714
|
-
const
|
|
7743
|
+
const g2 = () => /* @__PURE__ */ r(
|
|
7715
7744
|
Dt,
|
|
7716
7745
|
{
|
|
7717
|
-
className:
|
|
7718
|
-
"group relative bg-f1-background shadow-none",
|
|
7719
|
-
e && "p-3"
|
|
7720
|
-
),
|
|
7746
|
+
className: k("group relative bg-f1-background shadow-none"),
|
|
7721
7747
|
"aria-busy": "true",
|
|
7722
7748
|
"aria-live": "polite",
|
|
7723
7749
|
children: /* @__PURE__ */ c("div", { className: "flex flex-row items-center justify-between gap-4", children: [
|
|
7724
7750
|
/* @__PURE__ */ c("div", { className: "flex min-w-0 flex-row items-center gap-3", children: [
|
|
7725
|
-
/* @__PURE__ */ r(
|
|
7726
|
-
ue,
|
|
7727
|
-
{
|
|
7728
|
-
className: x("h-10 w-10 rounded-full", e && "h-8 w-8")
|
|
7729
|
-
}
|
|
7730
|
-
),
|
|
7751
|
+
/* @__PURE__ */ r(ue, { className: "h-10 w-10 rounded-full" }),
|
|
7731
7752
|
/* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
|
|
7732
7753
|
/* @__PURE__ */ r(ue, { className: "h-3 w-32 rounded-md" }),
|
|
7733
7754
|
/* @__PURE__ */ r(ue, { className: "h-3 w-20 rounded-md" })
|
|
@@ -7736,17 +7757,17 @@ const f2 = ({ compact: e = !1 }) => /* @__PURE__ */ r(
|
|
|
7736
7757
|
/* @__PURE__ */ r(ue, { className: "h-9 w-24 rounded-md" })
|
|
7737
7758
|
] })
|
|
7738
7759
|
}
|
|
7739
|
-
),
|
|
7760
|
+
), p2 = Pt(
|
|
7740
7761
|
hs(
|
|
7741
7762
|
"F0CardRow",
|
|
7742
|
-
jt(Er,
|
|
7763
|
+
jt(Er, g2)
|
|
7743
7764
|
)
|
|
7744
|
-
),
|
|
7765
|
+
), f9 = ["xs", "sm", "md", "lg"], u9 = [
|
|
7745
7766
|
"inProgress",
|
|
7746
7767
|
"executing",
|
|
7747
7768
|
"writing",
|
|
7748
7769
|
"completed"
|
|
7749
|
-
],
|
|
7770
|
+
], m2 = ({
|
|
7750
7771
|
onUploadFiles: e,
|
|
7751
7772
|
isAtMaxFiles: t,
|
|
7752
7773
|
maxFiles: n,
|
|
@@ -7865,7 +7886,7 @@ const f2 = ({ compact: e = !1 }) => /* @__PURE__ */ r(
|
|
|
7865
7886
|
)
|
|
7866
7887
|
] })
|
|
7867
7888
|
] });
|
|
7868
|
-
},
|
|
7889
|
+
}, C2 = ({
|
|
7869
7890
|
attachedFiles: e,
|
|
7870
7891
|
isUploading: t,
|
|
7871
7892
|
onRemove: n,
|
|
@@ -7878,7 +7899,7 @@ const f2 = ({ compact: e = !1 }) => /* @__PURE__ */ r(
|
|
|
7878
7899
|
className: "flex flex-wrap gap-1 px-1 pt-1",
|
|
7879
7900
|
children: e.map(
|
|
7880
7901
|
(s) => s.status === "uploading" ? /* @__PURE__ */ r(ue, { className: "h-9 w-36 rounded-[10px]" }, s.id) : s.status === "error" ? /* @__PURE__ */ r(
|
|
7881
|
-
|
|
7902
|
+
v2,
|
|
7882
7903
|
{
|
|
7883
7904
|
att: s,
|
|
7884
7905
|
onRemove: n,
|
|
@@ -7903,7 +7924,7 @@ const f2 = ({ compact: e = !1 }) => /* @__PURE__ */ r(
|
|
|
7903
7924
|
)
|
|
7904
7925
|
}
|
|
7905
7926
|
);
|
|
7906
|
-
function
|
|
7927
|
+
function v2({
|
|
7907
7928
|
att: e,
|
|
7908
7929
|
onRemove: t,
|
|
7909
7930
|
removeLabel: n
|
|
@@ -7926,33 +7947,33 @@ function p2({
|
|
|
7926
7947
|
] });
|
|
7927
7948
|
return e.errorMessage ? /* @__PURE__ */ r(vs, { label: e.errorMessage, children: o }) : o;
|
|
7928
7949
|
}
|
|
7929
|
-
const
|
|
7950
|
+
const w2 = {
|
|
7930
7951
|
soft: {
|
|
7931
7952
|
text: "",
|
|
7932
7953
|
bg: "bg-f1-background-info",
|
|
7933
7954
|
fontColor: "text-f1-foreground-info",
|
|
7934
7955
|
formBorder: "[&_form]:border-f1-border-info"
|
|
7935
7956
|
}
|
|
7936
|
-
},
|
|
7957
|
+
}, x2 = ({
|
|
7937
7958
|
creditWarning: e,
|
|
7938
7959
|
children: t
|
|
7939
7960
|
}) => {
|
|
7940
7961
|
const n = Y();
|
|
7941
7962
|
if (!e) return t;
|
|
7942
7963
|
const o = {
|
|
7943
|
-
...
|
|
7964
|
+
...w2[e.level],
|
|
7944
7965
|
text: n.ai.creditWarning.soft
|
|
7945
7966
|
};
|
|
7946
7967
|
return /* @__PURE__ */ c(
|
|
7947
7968
|
"div",
|
|
7948
7969
|
{
|
|
7949
|
-
className:
|
|
7970
|
+
className: k("flex flex-col rounded-xl", o.bg, o.formBorder),
|
|
7950
7971
|
children: [
|
|
7951
7972
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between gap-2 px-4 pb-1.5 pt-2", children: [
|
|
7952
7973
|
/* @__PURE__ */ r(
|
|
7953
7974
|
"p",
|
|
7954
7975
|
{
|
|
7955
|
-
className:
|
|
7976
|
+
className: k("min-w-0 flex-1 text-sm font-medium", o.fontColor),
|
|
7956
7977
|
children: o.text
|
|
7957
7978
|
}
|
|
7958
7979
|
),
|
|
@@ -7985,7 +8006,7 @@ const m2 = {
|
|
|
7985
8006
|
}
|
|
7986
8007
|
);
|
|
7987
8008
|
};
|
|
7988
|
-
function
|
|
8009
|
+
function k2({
|
|
7989
8010
|
isOpen: e,
|
|
7990
8011
|
results: t,
|
|
7991
8012
|
isLoading: n,
|
|
@@ -8013,7 +8034,7 @@ function v2({
|
|
|
8013
8034
|
bottom: s ? `${s.bottom}px` : "100%",
|
|
8014
8035
|
left: s ? `${s.left}px` : 0
|
|
8015
8036
|
},
|
|
8016
|
-
className:
|
|
8037
|
+
className: k(
|
|
8017
8038
|
"z-50",
|
|
8018
8039
|
"w-64 max-h-60 overflow-y-auto",
|
|
8019
8040
|
"rounded-lg border border-solid border-f1-border-secondary",
|
|
@@ -8030,7 +8051,7 @@ function v2({
|
|
|
8030
8051
|
/* @__PURE__ */ r(
|
|
8031
8052
|
ue,
|
|
8032
8053
|
{
|
|
8033
|
-
className:
|
|
8054
|
+
className: k("h-4 rounded", g === 1 ? "w-24" : "w-32")
|
|
8034
8055
|
}
|
|
8035
8056
|
)
|
|
8036
8057
|
]
|
|
@@ -8044,7 +8065,7 @@ function v2({
|
|
|
8044
8065
|
ref: m ? d : void 0,
|
|
8045
8066
|
role: "option",
|
|
8046
8067
|
"aria-selected": m,
|
|
8047
|
-
className:
|
|
8068
|
+
className: k(
|
|
8048
8069
|
"flex cursor-pointer items-center gap-2 p-2 rounded",
|
|
8049
8070
|
"transition-colors",
|
|
8050
8071
|
m ? "bg-f1-background-secondary" : "hover:bg-f1-background-secondary-hover"
|
|
@@ -8073,7 +8094,7 @@ function v2({
|
|
|
8073
8094
|
}
|
|
8074
8095
|
);
|
|
8075
8096
|
}
|
|
8076
|
-
const
|
|
8097
|
+
const b2 = ({
|
|
8077
8098
|
quote: e,
|
|
8078
8099
|
onRemove: t
|
|
8079
8100
|
}) => {
|
|
@@ -8081,7 +8102,7 @@ const w2 = ({
|
|
|
8081
8102
|
return /* @__PURE__ */ r("div", { className: "p-1", children: /* @__PURE__ */ c(
|
|
8082
8103
|
"div",
|
|
8083
8104
|
{
|
|
8084
|
-
className:
|
|
8105
|
+
className: k(
|
|
8085
8106
|
"flex items-start gap-2 justify-center",
|
|
8086
8107
|
"rounded-[10px] bg-f1-background-hover pl-2 py-1.5 pr-1.5"
|
|
8087
8108
|
),
|
|
@@ -8109,7 +8130,7 @@ const w2 = ({
|
|
|
8109
8130
|
]
|
|
8110
8131
|
}
|
|
8111
8132
|
) });
|
|
8112
|
-
},
|
|
8133
|
+
}, L2 = ({
|
|
8113
8134
|
placeholders: e,
|
|
8114
8135
|
defaultPlaceholder: t,
|
|
8115
8136
|
inputValue: n,
|
|
@@ -8133,7 +8154,7 @@ const w2 = ({
|
|
|
8133
8154
|
};
|
|
8134
8155
|
f(!0), a("");
|
|
8135
8156
|
let w = 0;
|
|
8136
|
-
const
|
|
8157
|
+
const x = 50, S = 30, T = 2e3, E = 1e3;
|
|
8137
8158
|
return m.current = setInterval(() => {
|
|
8138
8159
|
w < C.length ? (a(C.slice(0, w + 1)), w++) : (m.current && (clearInterval(m.current), m.current = null), g.current = setTimeout(() => {
|
|
8139
8160
|
h.current = setInterval(() => {
|
|
@@ -8141,9 +8162,9 @@ const w2 = ({
|
|
|
8141
8162
|
const L = (d + 1) % Math.max(e.length, 1);
|
|
8142
8163
|
l(L);
|
|
8143
8164
|
}, E));
|
|
8144
|
-
},
|
|
8165
|
+
}, S);
|
|
8145
8166
|
}, T));
|
|
8146
|
-
},
|
|
8167
|
+
}, x), () => {
|
|
8147
8168
|
v();
|
|
8148
8169
|
};
|
|
8149
8170
|
}, [
|
|
@@ -8160,7 +8181,7 @@ const w2 = ({
|
|
|
8160
8181
|
animate: { opacity: 1 },
|
|
8161
8182
|
exit: { opacity: 0 },
|
|
8162
8183
|
transition: { duration: s ? 0 : 0.4 },
|
|
8163
|
-
className:
|
|
8184
|
+
className: k(
|
|
8164
8185
|
"col-start-1 row-start-1",
|
|
8165
8186
|
"pointer-events-none",
|
|
8166
8187
|
"text-f1-foreground-secondary",
|
|
@@ -8170,7 +8191,7 @@ const w2 = ({
|
|
|
8170
8191
|
children: /* @__PURE__ */ c(
|
|
8171
8192
|
"div",
|
|
8172
8193
|
{
|
|
8173
|
-
className:
|
|
8194
|
+
className: k(
|
|
8174
8195
|
"overflow-hidden text-ellipsis whitespace-nowrap",
|
|
8175
8196
|
"whitespace-pre-wrap break-words overflow-visible"
|
|
8176
8197
|
),
|
|
@@ -8182,7 +8203,7 @@ const w2 = ({
|
|
|
8182
8203
|
)
|
|
8183
8204
|
}
|
|
8184
8205
|
) });
|
|
8185
|
-
},
|
|
8206
|
+
}, y2 = ({
|
|
8186
8207
|
textareaRef: e,
|
|
8187
8208
|
highlightRef: t,
|
|
8188
8209
|
inputValue: n,
|
|
@@ -8199,13 +8220,13 @@ const w2 = ({
|
|
|
8199
8220
|
}) => /* @__PURE__ */ c(
|
|
8200
8221
|
"div",
|
|
8201
8222
|
{
|
|
8202
|
-
className:
|
|
8223
|
+
className: k("grid flex-1 grid-cols-1 grid-rows-1", "min-h-[20px] py-0"),
|
|
8203
8224
|
children: [
|
|
8204
8225
|
/* @__PURE__ */ r(
|
|
8205
8226
|
"div",
|
|
8206
8227
|
{
|
|
8207
8228
|
"aria-hidden": !0,
|
|
8208
|
-
className:
|
|
8229
|
+
className: k(
|
|
8209
8230
|
"col-start-1 row-start-1",
|
|
8210
8231
|
"pointer-events-none invisible",
|
|
8211
8232
|
"min-h-[20px] max-h-[240px]",
|
|
@@ -8222,7 +8243,7 @@ const w2 = ({
|
|
|
8222
8243
|
{
|
|
8223
8244
|
ref: t,
|
|
8224
8245
|
"aria-hidden": !0,
|
|
8225
|
-
className:
|
|
8246
|
+
className: k(
|
|
8226
8247
|
"col-start-1 row-start-1",
|
|
8227
8248
|
"pointer-events-none",
|
|
8228
8249
|
"min-h-[20px] max-h-[240px]",
|
|
@@ -8246,7 +8267,7 @@ const w2 = ({
|
|
|
8246
8267
|
!n && !u && /* @__PURE__ */ r(
|
|
8247
8268
|
"p",
|
|
8248
8269
|
{
|
|
8249
|
-
className:
|
|
8270
|
+
className: k(
|
|
8250
8271
|
"col-start-1 row-start-1",
|
|
8251
8272
|
"pointer-events-none",
|
|
8252
8273
|
"text-f1-foreground-secondary",
|
|
@@ -8273,7 +8294,7 @@ const w2 = ({
|
|
|
8273
8294
|
onClick: i,
|
|
8274
8295
|
onSelect: i,
|
|
8275
8296
|
onScroll: a,
|
|
8276
|
-
className:
|
|
8297
|
+
className: k(
|
|
8277
8298
|
"col-start-1 row-start-1",
|
|
8278
8299
|
"min-h-[20px] max-h-[240px] h-auto",
|
|
8279
8300
|
"resize-none",
|
|
@@ -8288,7 +8309,7 @@ const w2 = ({
|
|
|
8288
8309
|
}
|
|
8289
8310
|
),
|
|
8290
8311
|
u && /* @__PURE__ */ r(
|
|
8291
|
-
|
|
8312
|
+
L2,
|
|
8292
8313
|
{
|
|
8293
8314
|
placeholders: f,
|
|
8294
8315
|
defaultPlaceholder: g,
|
|
@@ -8298,11 +8319,11 @@ const w2 = ({
|
|
|
8298
8319
|
)
|
|
8299
8320
|
]
|
|
8300
8321
|
}
|
|
8301
|
-
),
|
|
8302
|
-
function
|
|
8322
|
+
), M2 = 5;
|
|
8323
|
+
function E2(e, t = M2) {
|
|
8303
8324
|
return e.length <= t ? e : [...e].sort(() => 0.5 - Math.random()).slice(0, t);
|
|
8304
8325
|
}
|
|
8305
|
-
const
|
|
8326
|
+
const R2 = ({
|
|
8306
8327
|
suggestions: e,
|
|
8307
8328
|
onItemClick: t,
|
|
8308
8329
|
onItemHover: n,
|
|
@@ -8336,7 +8357,7 @@ const y2 = ({
|
|
|
8336
8357
|
align: "start",
|
|
8337
8358
|
sideOffset: 8,
|
|
8338
8359
|
onOpenAutoFocus: (d) => d.preventDefault(),
|
|
8339
|
-
className:
|
|
8360
|
+
className: k(
|
|
8340
8361
|
"flex flex-col gap-1 rounded-md border border-solid border-f1-border-secondary bg-f1-background p-2",
|
|
8341
8362
|
"w-[var(--radix-popover-trigger-width)]"
|
|
8342
8363
|
),
|
|
@@ -8345,7 +8366,7 @@ const y2 = ({
|
|
|
8345
8366
|
/* @__PURE__ */ r(le, { icon: a.icon, size: "sm" }),
|
|
8346
8367
|
/* @__PURE__ */ r("span", { children: a.label })
|
|
8347
8368
|
] }),
|
|
8348
|
-
/* @__PURE__ */ r("div", { className: "flex flex-col", children:
|
|
8369
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col", children: E2(a.items).map((d, l) => /* @__PURE__ */ c(
|
|
8349
8370
|
"button",
|
|
8350
8371
|
{
|
|
8351
8372
|
type: "button",
|
|
@@ -8356,7 +8377,7 @@ const y2 = ({
|
|
|
8356
8377
|
onMouseLeave: () => n?.(null),
|
|
8357
8378
|
onFocus: () => n?.(d),
|
|
8358
8379
|
onBlur: () => n?.(null),
|
|
8359
|
-
className:
|
|
8380
|
+
className: k(
|
|
8360
8381
|
"group flex items-center justify-between gap-2 rounded-sm px-2 py-2 text-left text-base font-medium text-f1-foreground transition-colors hover:bg-f1-background-hover focus-visible:bg-f1-background-hover",
|
|
8361
8382
|
me()
|
|
8362
8383
|
),
|
|
@@ -8384,7 +8405,7 @@ const y2 = ({
|
|
|
8384
8405
|
function U1(e) {
|
|
8385
8406
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
8386
8407
|
}
|
|
8387
|
-
function
|
|
8408
|
+
function F2(e, t, n) {
|
|
8388
8409
|
const o = n?.cursorPosition ?? e.length, s = n?.inlineCompletion ?? null, i = [];
|
|
8389
8410
|
for (const f of t) {
|
|
8390
8411
|
const g = `@${f.name}`;
|
|
@@ -8409,7 +8430,7 @@ function M2(e, t, n) {
|
|
|
8409
8430
|
u(f.start), a.push({ type: "mention", text: e.slice(f.start, f.end) }), d = f.end;
|
|
8410
8431
|
return u(e.length), !l && s && o >= d && a.push({ type: "ghost", text: s }), a.length === 0 ? [{ type: "text", text: e }] : a;
|
|
8411
8432
|
}
|
|
8412
|
-
function
|
|
8433
|
+
function N2(e, t) {
|
|
8413
8434
|
if (t === "*/*") return !0;
|
|
8414
8435
|
if (t.endsWith("/*")) {
|
|
8415
8436
|
const n = t.slice(0, t.indexOf("/"));
|
|
@@ -8417,15 +8438,15 @@ function E2(e, t) {
|
|
|
8417
8438
|
}
|
|
8418
8439
|
return e === t;
|
|
8419
8440
|
}
|
|
8420
|
-
function
|
|
8441
|
+
function S2(e, t) {
|
|
8421
8442
|
if (!t) return e;
|
|
8422
8443
|
const n = Array.isArray(t) ? t : [t];
|
|
8423
8444
|
return n.length === 0 ? e : e.filter(
|
|
8424
|
-
(o) => n.some((s) =>
|
|
8445
|
+
(o) => n.some((s) => N2(o.type, s))
|
|
8425
8446
|
);
|
|
8426
8447
|
}
|
|
8427
|
-
const
|
|
8428
|
-
function
|
|
8448
|
+
const V2 = 4e3;
|
|
8449
|
+
function T2(e) {
|
|
8429
8450
|
const [t, n] = P([]), [o, s] = P(null), i = I(
|
|
8430
8451
|
null
|
|
8431
8452
|
), a = I(null), d = Y(), l = e?.onUploadFiles, u = e?.allowedMimeTypes, f = e?.maxFiles, g = ee(() => {
|
|
@@ -8438,7 +8459,7 @@ function N2(e) {
|
|
|
8438
8459
|
const C = q((T) => {
|
|
8439
8460
|
i.current && clearTimeout(i.current), s(T), i.current = setTimeout(() => {
|
|
8440
8461
|
s(null), i.current = null;
|
|
8441
|
-
},
|
|
8462
|
+
}, V2);
|
|
8442
8463
|
}, []);
|
|
8443
8464
|
X(
|
|
8444
8465
|
() => () => {
|
|
@@ -8449,7 +8470,7 @@ function N2(e) {
|
|
|
8449
8470
|
const v = q(
|
|
8450
8471
|
async (T) => {
|
|
8451
8472
|
if (T.length === 0 || !l) return;
|
|
8452
|
-
const E =
|
|
8473
|
+
const E = S2(T, u);
|
|
8453
8474
|
if (E.length === 0) return;
|
|
8454
8475
|
if (f !== void 0 && h.current + E.length > f) {
|
|
8455
8476
|
C(
|
|
@@ -8509,9 +8530,9 @@ function N2(e) {
|
|
|
8509
8530
|
await v(Array.from(T.target.files ?? [])), T.target.value = "";
|
|
8510
8531
|
},
|
|
8511
8532
|
[v]
|
|
8512
|
-
),
|
|
8533
|
+
), x = q((T) => {
|
|
8513
8534
|
n((E) => E.filter((L) => L.id !== T));
|
|
8514
|
-
}, []),
|
|
8535
|
+
}, []), S = q(() => {
|
|
8515
8536
|
n([]);
|
|
8516
8537
|
}, []);
|
|
8517
8538
|
return {
|
|
@@ -8523,13 +8544,13 @@ function N2(e) {
|
|
|
8523
8544
|
maxFiles: f,
|
|
8524
8545
|
processFiles: v,
|
|
8525
8546
|
handleFileSelect: w,
|
|
8526
|
-
handleRemoveFile:
|
|
8527
|
-
clearFiles:
|
|
8547
|
+
handleRemoveFile: x,
|
|
8548
|
+
clearFiles: S,
|
|
8528
8549
|
transientError: o,
|
|
8529
8550
|
showTransientError: C
|
|
8530
8551
|
};
|
|
8531
8552
|
}
|
|
8532
|
-
function
|
|
8553
|
+
function H2(e, t, n) {
|
|
8533
8554
|
const s = e.slice(0, t).lastIndexOf("@");
|
|
8534
8555
|
if (s === -1) return null;
|
|
8535
8556
|
if (s > 0) {
|
|
@@ -8552,7 +8573,7 @@ function S2(e, t, n) {
|
|
|
8552
8573
|
}
|
|
8553
8574
|
return { atIndex: s, query: i };
|
|
8554
8575
|
}
|
|
8555
|
-
const
|
|
8576
|
+
const A2 = [
|
|
8556
8577
|
"direction",
|
|
8557
8578
|
"boxSizing",
|
|
8558
8579
|
"width",
|
|
@@ -8588,10 +8609,10 @@ const V2 = [
|
|
|
8588
8609
|
"wordWrap",
|
|
8589
8610
|
"wordBreak"
|
|
8590
8611
|
];
|
|
8591
|
-
function
|
|
8612
|
+
function B2(e, t) {
|
|
8592
8613
|
const n = document.createElement("div"), o = n.style, s = window.getComputedStyle(e);
|
|
8593
8614
|
o.whiteSpace = "pre-wrap", o.wordWrap = "break-word", o.position = "absolute", o.visibility = "hidden", o.overflow = "hidden";
|
|
8594
|
-
for (const l of
|
|
8615
|
+
for (const l of A2)
|
|
8595
8616
|
o.setProperty(l, s.getPropertyValue(l));
|
|
8596
8617
|
n.textContent = e.value.substring(0, t);
|
|
8597
8618
|
const i = document.createElement("span");
|
|
@@ -8599,30 +8620,30 @@ function T2(e, t) {
|
|
|
8599
8620
|
const a = i.offsetLeft, d = i.offsetTop - e.scrollTop;
|
|
8600
8621
|
return document.body.removeChild(n), { left: a, top: d };
|
|
8601
8622
|
}
|
|
8602
|
-
const
|
|
8603
|
-
function
|
|
8623
|
+
const $2 = 250;
|
|
8624
|
+
function I2({
|
|
8604
8625
|
inputValue: e,
|
|
8605
8626
|
setInputValue: t,
|
|
8606
8627
|
cursorPosition: n,
|
|
8607
8628
|
searchPersons: o,
|
|
8608
8629
|
textareaRef: s
|
|
8609
8630
|
}) {
|
|
8610
|
-
const [i, a] = P(!1), [d, l] = P(""), [u, f] = P([]), [g, m] = P(!1), [h, C] = P(0), [v, w] = P([]),
|
|
8631
|
+
const [i, a] = P(!1), [d, l] = P(""), [u, f] = P([]), [g, m] = P(!1), [h, C] = P(0), [v, w] = P([]), x = I(-1), S = I(null), T = I(0), E = I(-1);
|
|
8611
8632
|
X(() => {
|
|
8612
8633
|
if (!o) {
|
|
8613
8634
|
a(!1);
|
|
8614
8635
|
return;
|
|
8615
8636
|
}
|
|
8616
|
-
const F =
|
|
8637
|
+
const F = H2(e, n, v);
|
|
8617
8638
|
if (!F) {
|
|
8618
|
-
a(!1), l(""), f([]), C(0),
|
|
8639
|
+
a(!1), l(""), f([]), C(0), x.current = -1, E.current = -1;
|
|
8619
8640
|
return;
|
|
8620
8641
|
}
|
|
8621
8642
|
if (F.atIndex === E.current)
|
|
8622
8643
|
return;
|
|
8623
|
-
|
|
8644
|
+
x.current = F.atIndex, l(F.query), a(!0), C(0), m(!0), S.current && clearTimeout(S.current);
|
|
8624
8645
|
const $ = ++T.current;
|
|
8625
|
-
return
|
|
8646
|
+
return S.current = setTimeout(() => {
|
|
8626
8647
|
o(F.query).then((_) => {
|
|
8627
8648
|
$ === T.current && (f(_), C(0), _.length === 0 && F.query.length > 0 && (E.current = F.atIndex, a(!1)));
|
|
8628
8649
|
}).catch(() => {
|
|
@@ -8630,15 +8651,15 @@ function A2({
|
|
|
8630
8651
|
}).finally(() => {
|
|
8631
8652
|
$ === T.current && m(!1);
|
|
8632
8653
|
});
|
|
8633
|
-
},
|
|
8634
|
-
|
|
8654
|
+
}, $2), () => {
|
|
8655
|
+
S.current && clearTimeout(S.current);
|
|
8635
8656
|
};
|
|
8636
8657
|
}, [e, n, o, v]);
|
|
8637
8658
|
const L = q(() => {
|
|
8638
|
-
a(!1), l(""), f([]), C(0),
|
|
8659
|
+
a(!1), l(""), f([]), C(0), x.current = -1;
|
|
8639
8660
|
}, []), b = q(
|
|
8640
8661
|
(F) => {
|
|
8641
|
-
const $ =
|
|
8662
|
+
const $ = x.current;
|
|
8642
8663
|
if ($ === -1) return;
|
|
8643
8664
|
const _ = `${F.firstName} ${F.lastName}`.trim(), z = String(F.id), G = e.slice(0, $), re = e.slice(n), K = `@${_} `, O = G + K + re, Z = G.length + K.length;
|
|
8644
8665
|
t(O), w((D) => [...D.filter((W) => !(W.id === z && W.name === _)), { id: z, name: _ }]), L(), requestAnimationFrame(() => {
|
|
@@ -8702,10 +8723,10 @@ function A2({
|
|
|
8702
8723
|
);
|
|
8703
8724
|
}, [e]);
|
|
8704
8725
|
const y = ee(() => {
|
|
8705
|
-
if (!i ||
|
|
8726
|
+
if (!i || x.current === -1) return null;
|
|
8706
8727
|
const F = s.current;
|
|
8707
8728
|
if (!F) return null;
|
|
8708
|
-
const $ =
|
|
8729
|
+
const $ = B2(F, x.current), _ = F.offsetLeft + $.left, G = (F.offsetParent ? F.offsetParent.offsetHeight : 0) - (F.offsetTop + $.top);
|
|
8709
8730
|
return { left: _, bottom: G };
|
|
8710
8731
|
}, [i, e, n, s]), R = ee(() => {
|
|
8711
8732
|
if (!i || u.length === 0) return null;
|
|
@@ -8729,7 +8750,7 @@ function A2({
|
|
|
8729
8750
|
close: L
|
|
8730
8751
|
};
|
|
8731
8752
|
}
|
|
8732
|
-
const
|
|
8753
|
+
const P2 = /[\\`*_{}[\]()#+\-.!|~>]/g, j2 = (e) => e.split(/(<entity-ref\b[^>]*>[\s\S]*?<\/entity-ref>)/g).map((t, n) => n % 2 === 1 ? t : t.replace(/&/g, "&").replace(/</g, "<").replace(P2, "\\$&")).join(""), h9 = ({
|
|
8733
8754
|
onSubmit: e,
|
|
8734
8755
|
onStop: t,
|
|
8735
8756
|
inProgress: n,
|
|
@@ -8747,8 +8768,8 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
8747
8768
|
onProcessFilesRef: C,
|
|
8748
8769
|
disclaimer: v,
|
|
8749
8770
|
footer: w,
|
|
8750
|
-
isWelcomeScreen:
|
|
8751
|
-
fullscreen:
|
|
8771
|
+
isWelcomeScreen: x = !1,
|
|
8772
|
+
fullscreen: S = !1,
|
|
8752
8773
|
welcomeScreenSuggestions: T,
|
|
8753
8774
|
onSuggestionClick: E,
|
|
8754
8775
|
ref: L
|
|
@@ -8769,13 +8790,13 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
8769
8790
|
acceptValue: se,
|
|
8770
8791
|
isAtMaxFiles: de,
|
|
8771
8792
|
maxFiles: M,
|
|
8772
|
-
processFiles:
|
|
8793
|
+
processFiles: V,
|
|
8773
8794
|
handleFileSelect: N,
|
|
8774
8795
|
handleRemoveFile: j,
|
|
8775
8796
|
clearFiles: B,
|
|
8776
8797
|
transientError: U,
|
|
8777
8798
|
showTransientError: ae
|
|
8778
|
-
} =
|
|
8799
|
+
} = T2(g), J = I2({
|
|
8779
8800
|
inputValue: H,
|
|
8780
8801
|
setInputValue: y,
|
|
8781
8802
|
cursorPosition: R,
|
|
@@ -8805,11 +8826,11 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
8805
8826
|
}, []), X(() => {
|
|
8806
8827
|
if (C)
|
|
8807
8828
|
return C((te) => {
|
|
8808
|
-
|
|
8829
|
+
V(te);
|
|
8809
8830
|
}), () => {
|
|
8810
8831
|
C(null);
|
|
8811
8832
|
};
|
|
8812
|
-
}, [C,
|
|
8833
|
+
}, [C, V]);
|
|
8813
8834
|
const je = Ce.status === "recording", r1 = je ? b.ai.listening : b.ai.inputPlaceholder, n1 = ge.filter((te) => te.status === "uploaded"), Se = ge.some((te) => te.status === "uploading"), He = ge.some((te) => te.status === "error"), De = H.trim().length > 0;
|
|
8814
8835
|
X(() => {
|
|
8815
8836
|
if (!(!z || Se)) {
|
|
@@ -8846,7 +8867,7 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
8846
8867
|
_(!1);
|
|
8847
8868
|
}
|
|
8848
8869
|
}
|
|
8849
|
-
const ke = J.transformMentions(H.trim()), i1 =
|
|
8870
|
+
const ke = J.transformMentions(H.trim()), i1 = j2(ke), Ue = n1.flatMap(
|
|
8850
8871
|
(B1) => B1.uploadedFile ? [B1.uploadedFile] : []
|
|
8851
8872
|
), H1 = d, A1 = u;
|
|
8852
8873
|
H1 && l?.(null), A1 && f?.(null), await e({
|
|
@@ -8864,19 +8885,19 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
8864
8885
|
F(Z.current?.selectionStart ?? 0);
|
|
8865
8886
|
}, _e = () => {
|
|
8866
8887
|
D.current && Z.current && (D.current.scrollTop = Z.current.scrollTop);
|
|
8867
|
-
}, S1 = re ? re.prompt ?? re.title : null, V1 = je ? [b.ai.listening] : S1 ? [S1] : s ?? [], Qr = V1.length > 1, Jr = ee(() =>
|
|
8888
|
+
}, S1 = re ? re.prompt ?? re.title : null, V1 = je ? [b.ai.listening] : S1 ? [S1] : s ?? [], Qr = V1.length > 1, Jr = ee(() => F2(H, J.mentions, {
|
|
8868
8889
|
cursorPosition: R,
|
|
8869
8890
|
inlineCompletion: J.inlineCompletion
|
|
8870
|
-
}), [H, J.mentions, R, J.inlineCompletion]), en = J.mentions.length > 0 || J.inlineCompletion !== null, Oe =
|
|
8871
|
-
|
|
8891
|
+
}), [H, J.mentions, R, J.inlineCompletion]), en = J.mentions.length > 0 || J.inlineCompletion !== null, Oe = x && !!T && T.length > 0 && !!E ? /* @__PURE__ */ r(
|
|
8892
|
+
R2,
|
|
8872
8893
|
{
|
|
8873
8894
|
suggestions: T,
|
|
8874
8895
|
onItemClick: he,
|
|
8875
8896
|
onItemHover: K,
|
|
8876
|
-
side:
|
|
8897
|
+
side: S ? "bottom" : "top"
|
|
8877
8898
|
}
|
|
8878
|
-
) : null, T1 =
|
|
8879
|
-
|
|
8899
|
+
) : null, T1 = S && x, { motionProps: tn } = bs(
|
|
8900
|
+
x,
|
|
8880
8901
|
160,
|
|
8881
8902
|
0.5
|
|
8882
8903
|
);
|
|
@@ -8884,20 +8905,20 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
8884
8905
|
oe.div,
|
|
8885
8906
|
{
|
|
8886
8907
|
ref: L,
|
|
8887
|
-
className:
|
|
8908
|
+
className: k(
|
|
8888
8909
|
"flex flex-col items-center gap-2 px-4 pb-3 pt-2",
|
|
8889
8910
|
T1 && "min-h-0 flex-1 justify-start -mt-20"
|
|
8890
8911
|
),
|
|
8891
|
-
...
|
|
8912
|
+
...S ? tn : {},
|
|
8892
8913
|
children: [
|
|
8893
8914
|
/* @__PURE__ */ c("div", { className: "flex w-full max-w-content flex-col gap-2", children: [
|
|
8894
|
-
Oe && !
|
|
8895
|
-
/* @__PURE__ */ r(
|
|
8915
|
+
Oe && !S && /* @__PURE__ */ r("div", { children: Oe }),
|
|
8916
|
+
/* @__PURE__ */ r(x2, { creditWarning: i, children: /* @__PURE__ */ c(
|
|
8896
8917
|
oe.form,
|
|
8897
8918
|
{
|
|
8898
8919
|
"aria-busy": n,
|
|
8899
8920
|
ref: O,
|
|
8900
|
-
className:
|
|
8921
|
+
className: k(
|
|
8901
8922
|
"relative isolate z-20",
|
|
8902
8923
|
"flex flex-col items-stretch md:gap-3 gap-2",
|
|
8903
8924
|
"rounded-lg border border-solid border-f1-border has-[textarea:focus]:border-f1-background-tertiary",
|
|
@@ -8931,7 +8952,7 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
8931
8952
|
onSubmit: o1,
|
|
8932
8953
|
children: [
|
|
8933
8954
|
/* @__PURE__ */ r(
|
|
8934
|
-
|
|
8955
|
+
k2,
|
|
8935
8956
|
{
|
|
8936
8957
|
isOpen: J.isOpen,
|
|
8937
8958
|
results: J.results,
|
|
@@ -8982,7 +9003,7 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
8982
9003
|
},
|
|
8983
9004
|
children: [
|
|
8984
9005
|
u && /* @__PURE__ */ r(
|
|
8985
|
-
|
|
9006
|
+
b2,
|
|
8986
9007
|
{
|
|
8987
9008
|
quote: u,
|
|
8988
9009
|
onRemove: () => f?.(null)
|
|
@@ -9004,7 +9025,7 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
9004
9025
|
children: /* @__PURE__ */ c(
|
|
9005
9026
|
"div",
|
|
9006
9027
|
{
|
|
9007
|
-
className:
|
|
9028
|
+
className: k(
|
|
9008
9029
|
"flex w-full flex-row items-center gap-2 rounded-md p-2 pr-3",
|
|
9009
9030
|
"bg-f1-background-critical text-f1-foreground"
|
|
9010
9031
|
),
|
|
@@ -9018,7 +9039,7 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
9018
9039
|
"transient-error"
|
|
9019
9040
|
) }),
|
|
9020
9041
|
/* @__PURE__ */ r(
|
|
9021
|
-
|
|
9042
|
+
C2,
|
|
9022
9043
|
{
|
|
9023
9044
|
attachedFiles: ge,
|
|
9024
9045
|
isUploading: Se,
|
|
@@ -9027,7 +9048,7 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
9027
9048
|
}
|
|
9028
9049
|
),
|
|
9029
9050
|
/* @__PURE__ */ r(
|
|
9030
|
-
|
|
9051
|
+
y2,
|
|
9031
9052
|
{
|
|
9032
9053
|
textareaRef: Z,
|
|
9033
9054
|
highlightRef: D,
|
|
@@ -9047,7 +9068,7 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
9047
9068
|
}
|
|
9048
9069
|
),
|
|
9049
9070
|
/* @__PURE__ */ r(
|
|
9050
|
-
|
|
9071
|
+
m2,
|
|
9051
9072
|
{
|
|
9052
9073
|
onUploadFiles: ne,
|
|
9053
9074
|
isAtMaxFiles: de,
|
|
@@ -9074,8 +9095,8 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
9074
9095
|
}
|
|
9075
9096
|
) })
|
|
9076
9097
|
] }),
|
|
9077
|
-
Oe &&
|
|
9078
|
-
w &&
|
|
9098
|
+
Oe && S && /* @__PURE__ */ r("div", { className: "w-full max-w-content", children: Oe }),
|
|
9099
|
+
w && x && S && /* @__PURE__ */ r("div", { className: "w-full py-4 mx-auto flex max-w-content justify-center", children: w }),
|
|
9079
9100
|
/* @__PURE__ */ r(Ne, { mode: "wait", initial: !1, children: Q ? /* @__PURE__ */ c(
|
|
9080
9101
|
oe.div,
|
|
9081
9102
|
{
|
|
@@ -9120,7 +9141,7 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
9120
9141
|
{
|
|
9121
9142
|
type: "button",
|
|
9122
9143
|
onClick: v.onClick,
|
|
9123
|
-
className:
|
|
9144
|
+
className: k(
|
|
9124
9145
|
"group min-w-0 cursor-pointer bg-transparent p-0 text-inherit",
|
|
9125
9146
|
"transition-transform duration-700 ease-out",
|
|
9126
9147
|
"hover:scale-[1.02] focus-visible:scale-[1.02]",
|
|
@@ -9129,7 +9150,7 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
9129
9150
|
children: /* @__PURE__ */ r(
|
|
9130
9151
|
ce,
|
|
9131
9152
|
{
|
|
9132
|
-
className:
|
|
9153
|
+
className: k(
|
|
9133
9154
|
"text-sm font-medium text-f1-foreground-tertiary transition-colors duration-700 ease-out",
|
|
9134
9155
|
"group-hover:bg-gradient-to-r group-hover:from-[#E55619] group-hover:to-[#A1ADE5] group-hover:bg-clip-text group-hover:text-transparent",
|
|
9135
9156
|
"group-focus-visible:bg-gradient-to-r group-focus-visible:from-[#E55619] group-focus-visible:to-[#A1ADE5] group-focus-visible:bg-clip-text group-focus-visible:text-transparent"
|
|
@@ -9157,7 +9178,7 @@ const B2 = /[\\`*_{}[\]()#+\-.!|~>]/g, $2 = (e) => e.split(/(<entity-ref\b[^>]*>
|
|
|
9157
9178
|
}
|
|
9158
9179
|
);
|
|
9159
9180
|
};
|
|
9160
|
-
function
|
|
9181
|
+
function D2({
|
|
9161
9182
|
children: e,
|
|
9162
9183
|
...t
|
|
9163
9184
|
}) {
|
|
@@ -9165,7 +9186,7 @@ function I2({
|
|
|
9165
9186
|
"pre",
|
|
9166
9187
|
{
|
|
9167
9188
|
...t,
|
|
9168
|
-
className:
|
|
9189
|
+
className: k(
|
|
9169
9190
|
"relative mx-0 overflow-x-auto whitespace-pre-wrap rounded-md bg-f1-background-secondary p-2",
|
|
9170
9191
|
t.className
|
|
9171
9192
|
),
|
|
@@ -9173,7 +9194,7 @@ function I2({
|
|
|
9173
9194
|
}
|
|
9174
9195
|
);
|
|
9175
9196
|
}
|
|
9176
|
-
function
|
|
9197
|
+
function Z2({
|
|
9177
9198
|
children: e,
|
|
9178
9199
|
...t
|
|
9179
9200
|
}) {
|
|
@@ -9181,7 +9202,7 @@ function P2({
|
|
|
9181
9202
|
"code",
|
|
9182
9203
|
{
|
|
9183
9204
|
...t,
|
|
9184
|
-
className:
|
|
9205
|
+
className: k(
|
|
9185
9206
|
// Inline default
|
|
9186
9207
|
"rounded bg-f1-background-secondary px-1 py-0.5 font-mono text-base text-f1-foreground",
|
|
9187
9208
|
// Reset inside <pre> — let the parent handle the surface
|
|
@@ -9192,7 +9213,7 @@ function P2({
|
|
|
9192
9213
|
}
|
|
9193
9214
|
);
|
|
9194
9215
|
}
|
|
9195
|
-
function
|
|
9216
|
+
function _2({
|
|
9196
9217
|
children: e,
|
|
9197
9218
|
...t
|
|
9198
9219
|
}) {
|
|
@@ -9200,7 +9221,7 @@ function j2({
|
|
|
9200
9221
|
"blockquote",
|
|
9201
9222
|
{
|
|
9202
9223
|
...t,
|
|
9203
|
-
className:
|
|
9224
|
+
className: k(
|
|
9204
9225
|
"mr-1 my-2 mb-2.5 border-0 border-l-4 border-solid border-f1-border pl-3 text-base",
|
|
9205
9226
|
t.className
|
|
9206
9227
|
),
|
|
@@ -9208,16 +9229,16 @@ function j2({
|
|
|
9208
9229
|
}
|
|
9209
9230
|
);
|
|
9210
9231
|
}
|
|
9211
|
-
function
|
|
9232
|
+
function O2({ ...e }) {
|
|
9212
9233
|
return /* @__PURE__ */ r(
|
|
9213
9234
|
"hr",
|
|
9214
9235
|
{
|
|
9215
9236
|
...e,
|
|
9216
|
-
className:
|
|
9237
|
+
className: k("my-3 border-0 border-t border-f1-border", e.className)
|
|
9217
9238
|
}
|
|
9218
9239
|
);
|
|
9219
9240
|
}
|
|
9220
|
-
function
|
|
9241
|
+
function U2({
|
|
9221
9242
|
src: e,
|
|
9222
9243
|
alt: t,
|
|
9223
9244
|
...n
|
|
@@ -9235,7 +9256,7 @@ function Z2({
|
|
|
9235
9256
|
...n,
|
|
9236
9257
|
src: e,
|
|
9237
9258
|
alt: t,
|
|
9238
|
-
className:
|
|
9259
|
+
className: k("max-w-full rounded-md", n.className)
|
|
9239
9260
|
}
|
|
9240
9261
|
),
|
|
9241
9262
|
/* @__PURE__ */ r("div", { className: "absolute right-2 top-2 rounded", children: /* @__PURE__ */ r(
|
|
@@ -9250,13 +9271,13 @@ function Z2({
|
|
|
9250
9271
|
) })
|
|
9251
9272
|
] });
|
|
9252
9273
|
}
|
|
9253
|
-
function
|
|
9274
|
+
function z2({
|
|
9254
9275
|
children: e,
|
|
9255
9276
|
...t
|
|
9256
9277
|
}) {
|
|
9257
9278
|
return /* @__PURE__ */ r(Zt, { ...t, variant: "link", href: t.href, children: e });
|
|
9258
9279
|
}
|
|
9259
|
-
function
|
|
9280
|
+
function G2({
|
|
9260
9281
|
children: e,
|
|
9261
9282
|
...t
|
|
9262
9283
|
}) {
|
|
@@ -9264,7 +9285,7 @@ function O2({
|
|
|
9264
9285
|
"ul",
|
|
9265
9286
|
{
|
|
9266
9287
|
...t,
|
|
9267
|
-
className:
|
|
9288
|
+
className: k(
|
|
9268
9289
|
"list-disc pl-5 [&>li>ol]:mt-2 [&>li>ul]:mt-2",
|
|
9269
9290
|
t.className
|
|
9270
9291
|
),
|
|
@@ -9272,7 +9293,7 @@ function O2({
|
|
|
9272
9293
|
}
|
|
9273
9294
|
);
|
|
9274
9295
|
}
|
|
9275
|
-
function
|
|
9296
|
+
function W2({
|
|
9276
9297
|
children: e,
|
|
9277
9298
|
...t
|
|
9278
9299
|
}) {
|
|
@@ -9280,7 +9301,7 @@ function U2({
|
|
|
9280
9301
|
"ol",
|
|
9281
9302
|
{
|
|
9282
9303
|
...t,
|
|
9283
|
-
className:
|
|
9304
|
+
className: k(
|
|
9284
9305
|
"list-decimal pl-5 [&>li>ol]:mt-2 [&>li>ul]:mt-2",
|
|
9285
9306
|
t.className
|
|
9286
9307
|
),
|
|
@@ -9288,17 +9309,17 @@ function U2({
|
|
|
9288
9309
|
}
|
|
9289
9310
|
);
|
|
9290
9311
|
}
|
|
9291
|
-
function
|
|
9312
|
+
function q2({
|
|
9292
9313
|
children: e,
|
|
9293
9314
|
...t
|
|
9294
9315
|
}) {
|
|
9295
|
-
return /* @__PURE__ */ r("li", { ...t, className:
|
|
9316
|
+
return /* @__PURE__ */ r("li", { ...t, className: k("mb-2", t.className), children: e });
|
|
9296
9317
|
}
|
|
9297
|
-
async function
|
|
9318
|
+
async function X2(e, t, n) {
|
|
9298
9319
|
const o = await import("./xlsx-Bedf3nwD.js"), s = o.utils.table_to_book(e, { sheet: "Data" });
|
|
9299
9320
|
o.writeFile(s, `${n}.${t}`);
|
|
9300
9321
|
}
|
|
9301
|
-
function
|
|
9322
|
+
function Y2({
|
|
9302
9323
|
children: e,
|
|
9303
9324
|
title: t,
|
|
9304
9325
|
...n
|
|
@@ -9307,7 +9328,7 @@ function W2({
|
|
|
9307
9328
|
(a) => {
|
|
9308
9329
|
if (!s.current) return;
|
|
9309
9330
|
const d = t?.replace(/\s+/g, "_").toLowerCase() || "table";
|
|
9310
|
-
|
|
9331
|
+
X2(s.current, a, d);
|
|
9311
9332
|
},
|
|
9312
9333
|
[t]
|
|
9313
9334
|
);
|
|
@@ -9350,7 +9371,7 @@ function W2({
|
|
|
9350
9371
|
{
|
|
9351
9372
|
ref: s,
|
|
9352
9373
|
...n,
|
|
9353
|
-
className:
|
|
9374
|
+
className: k(
|
|
9354
9375
|
"w-full border-separate border-spacing-0 [&_tbody_tr:last-child_td]:border-b-0",
|
|
9355
9376
|
n.className
|
|
9356
9377
|
),
|
|
@@ -9359,7 +9380,7 @@ function W2({
|
|
|
9359
9380
|
) })
|
|
9360
9381
|
] });
|
|
9361
9382
|
}
|
|
9362
|
-
function
|
|
9383
|
+
function K2({
|
|
9363
9384
|
children: e,
|
|
9364
9385
|
...t
|
|
9365
9386
|
}) {
|
|
@@ -9367,7 +9388,7 @@ function q2({
|
|
|
9367
9388
|
"th",
|
|
9368
9389
|
{
|
|
9369
9390
|
...t,
|
|
9370
|
-
className:
|
|
9391
|
+
className: k(
|
|
9371
9392
|
"sticky top-0 z-10 whitespace-nowrap border-0 border-b border-solid border-f1-border-secondary bg-f1-background px-3 py-2 text-left font-medium text-f1-foreground-secondary",
|
|
9372
9393
|
t.className
|
|
9373
9394
|
),
|
|
@@ -9375,7 +9396,7 @@ function q2({
|
|
|
9375
9396
|
}
|
|
9376
9397
|
);
|
|
9377
9398
|
}
|
|
9378
|
-
function
|
|
9399
|
+
function Q2({
|
|
9379
9400
|
children: e,
|
|
9380
9401
|
...t
|
|
9381
9402
|
}) {
|
|
@@ -9383,7 +9404,7 @@ function X2({
|
|
|
9383
9404
|
"td",
|
|
9384
9405
|
{
|
|
9385
9406
|
...t,
|
|
9386
|
-
className:
|
|
9407
|
+
className: k(
|
|
9387
9408
|
"max-w-80 truncate border-0 border-b border-solid border-f1-border-secondary px-3 py-2",
|
|
9388
9409
|
t.className
|
|
9389
9410
|
),
|
|
@@ -9391,13 +9412,13 @@ function X2({
|
|
|
9391
9412
|
}
|
|
9392
9413
|
);
|
|
9393
9414
|
}
|
|
9394
|
-
function
|
|
9415
|
+
function J2({
|
|
9395
9416
|
children: e,
|
|
9396
9417
|
...t
|
|
9397
9418
|
}) {
|
|
9398
|
-
return /* @__PURE__ */ r("p", { ...t, className:
|
|
9419
|
+
return /* @__PURE__ */ r("p", { ...t, className: k("text-base font-normal", t.className), children: e });
|
|
9399
9420
|
}
|
|
9400
|
-
function
|
|
9421
|
+
function e4({
|
|
9401
9422
|
children: e,
|
|
9402
9423
|
...t
|
|
9403
9424
|
}) {
|
|
@@ -9405,7 +9426,7 @@ function K2({
|
|
|
9405
9426
|
"h1",
|
|
9406
9427
|
{
|
|
9407
9428
|
...t,
|
|
9408
|
-
className:
|
|
9429
|
+
className: k(
|
|
9409
9430
|
"mb-2.5 mt-4 text-2xl font-medium first:mt-0 last:mb-0",
|
|
9410
9431
|
t.className
|
|
9411
9432
|
),
|
|
@@ -9413,7 +9434,7 @@ function K2({
|
|
|
9413
9434
|
}
|
|
9414
9435
|
);
|
|
9415
9436
|
}
|
|
9416
|
-
function
|
|
9437
|
+
function t4({
|
|
9417
9438
|
children: e,
|
|
9418
9439
|
...t
|
|
9419
9440
|
}) {
|
|
@@ -9421,7 +9442,7 @@ function Q2({
|
|
|
9421
9442
|
"h2",
|
|
9422
9443
|
{
|
|
9423
9444
|
...t,
|
|
9424
|
-
className:
|
|
9445
|
+
className: k(
|
|
9425
9446
|
"mb-2.5 mt-4 text-lg font-medium leading-6 first:mt-0 last:mb-0",
|
|
9426
9447
|
t.className
|
|
9427
9448
|
),
|
|
@@ -9429,7 +9450,7 @@ function Q2({
|
|
|
9429
9450
|
}
|
|
9430
9451
|
);
|
|
9431
9452
|
}
|
|
9432
|
-
function
|
|
9453
|
+
function r4({
|
|
9433
9454
|
children: e,
|
|
9434
9455
|
...t
|
|
9435
9456
|
}) {
|
|
@@ -9437,7 +9458,7 @@ function J2({
|
|
|
9437
9458
|
"h3",
|
|
9438
9459
|
{
|
|
9439
9460
|
...t,
|
|
9440
|
-
className:
|
|
9461
|
+
className: k(
|
|
9441
9462
|
"mb-2 mt-3.5 text-base font-semibold first:mt-0 last:mb-0",
|
|
9442
9463
|
t.className
|
|
9443
9464
|
),
|
|
@@ -9445,17 +9466,17 @@ function J2({
|
|
|
9445
9466
|
}
|
|
9446
9467
|
);
|
|
9447
9468
|
}
|
|
9448
|
-
function
|
|
9469
|
+
function n4({
|
|
9449
9470
|
children: e,
|
|
9450
9471
|
...t
|
|
9451
9472
|
}) {
|
|
9452
|
-
return /* @__PURE__ */ r("strong", { ...t, className:
|
|
9473
|
+
return /* @__PURE__ */ r("strong", { ...t, className: k("font-semibold", t.className), children: e });
|
|
9453
9474
|
}
|
|
9454
|
-
function
|
|
9475
|
+
function o4({
|
|
9455
9476
|
children: e,
|
|
9456
9477
|
...t
|
|
9457
9478
|
}) {
|
|
9458
|
-
return /* @__PURE__ */ r("em", { ...t, className:
|
|
9479
|
+
return /* @__PURE__ */ r("em", { ...t, className: k("italic", t.className), children: e });
|
|
9459
9480
|
}
|
|
9460
9481
|
function Ve({
|
|
9461
9482
|
id: e,
|
|
@@ -9514,7 +9535,7 @@ const Rr = p(
|
|
|
9514
9535
|
{
|
|
9515
9536
|
ref: n,
|
|
9516
9537
|
type: "button",
|
|
9517
|
-
className:
|
|
9538
|
+
className: k(
|
|
9518
9539
|
"cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground",
|
|
9519
9540
|
me()
|
|
9520
9541
|
),
|
|
@@ -9524,7 +9545,7 @@ const Rr = p(
|
|
|
9524
9545
|
)
|
|
9525
9546
|
);
|
|
9526
9547
|
Rr.displayName = "CandidateTrigger";
|
|
9527
|
-
function
|
|
9548
|
+
function s4({
|
|
9528
9549
|
id: e,
|
|
9529
9550
|
label: t
|
|
9530
9551
|
}) {
|
|
@@ -9589,7 +9610,7 @@ const Fr = p(
|
|
|
9589
9610
|
{
|
|
9590
9611
|
ref: n,
|
|
9591
9612
|
type: "button",
|
|
9592
|
-
className:
|
|
9613
|
+
className: k(
|
|
9593
9614
|
"cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground",
|
|
9594
9615
|
me()
|
|
9595
9616
|
),
|
|
@@ -9599,7 +9620,7 @@ const Fr = p(
|
|
|
9599
9620
|
)
|
|
9600
9621
|
);
|
|
9601
9622
|
Fr.displayName = "ExpenseTrigger";
|
|
9602
|
-
function
|
|
9623
|
+
function i4({ id: e, label: t }) {
|
|
9603
9624
|
const { entityRefs: n } = Me(), o = n?.resolvers?.expense, s = Y(), i = n?.urls?.expense?.(e), a = ee(
|
|
9604
9625
|
() => (l) => ({
|
|
9605
9626
|
avatar: {
|
|
@@ -9645,7 +9666,7 @@ const Nr = p(
|
|
|
9645
9666
|
{
|
|
9646
9667
|
ref: n,
|
|
9647
9668
|
type: "button",
|
|
9648
|
-
className:
|
|
9669
|
+
className: k(
|
|
9649
9670
|
"cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground",
|
|
9650
9671
|
me()
|
|
9651
9672
|
),
|
|
@@ -9655,7 +9676,7 @@ const Nr = p(
|
|
|
9655
9676
|
)
|
|
9656
9677
|
);
|
|
9657
9678
|
Nr.displayName = "JobPostingTrigger";
|
|
9658
|
-
function
|
|
9679
|
+
function a4({
|
|
9659
9680
|
id: e,
|
|
9660
9681
|
label: t
|
|
9661
9682
|
}) {
|
|
@@ -9694,7 +9715,7 @@ function o4({
|
|
|
9694
9715
|
}
|
|
9695
9716
|
) : /* @__PURE__ */ r("span", { children: t });
|
|
9696
9717
|
}
|
|
9697
|
-
function
|
|
9718
|
+
function c4({ rows: e }) {
|
|
9698
9719
|
return e.length === 0 ? null : /* @__PURE__ */ r("div", { className: "flex flex-col gap-2", children: e.map((t, n) => /* @__PURE__ */ c("div", { className: "flex flex-col", children: [
|
|
9699
9720
|
t.label && /* @__PURE__ */ r("p", { className: "text-f1-foreground-secondary", children: t.label }),
|
|
9700
9721
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 font-medium text-f1-foreground", children: t.value })
|
|
@@ -9706,7 +9727,7 @@ const Sr = p(
|
|
|
9706
9727
|
{
|
|
9707
9728
|
ref: n,
|
|
9708
9729
|
type: "button",
|
|
9709
|
-
className:
|
|
9730
|
+
className: k(
|
|
9710
9731
|
"cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground",
|
|
9711
9732
|
me()
|
|
9712
9733
|
),
|
|
@@ -9716,7 +9737,7 @@ const Sr = p(
|
|
|
9716
9737
|
)
|
|
9717
9738
|
);
|
|
9718
9739
|
Sr.displayName = "RequisitionTrigger";
|
|
9719
|
-
function
|
|
9740
|
+
function l4({
|
|
9720
9741
|
id: e,
|
|
9721
9742
|
label: t
|
|
9722
9743
|
}) {
|
|
@@ -9759,7 +9780,7 @@ function i4({
|
|
|
9759
9780
|
title: l.title,
|
|
9760
9781
|
...l.location && { description: l.location },
|
|
9761
9782
|
...g.length > 0 && {
|
|
9762
|
-
children: /* @__PURE__ */ r(
|
|
9783
|
+
children: /* @__PURE__ */ r(c4, { rows: g })
|
|
9763
9784
|
},
|
|
9764
9785
|
...i && {
|
|
9765
9786
|
secondaryActions: {
|
|
@@ -9799,7 +9820,7 @@ const Vr = p(
|
|
|
9799
9820
|
{
|
|
9800
9821
|
ref: n,
|
|
9801
9822
|
type: "button",
|
|
9802
|
-
className:
|
|
9823
|
+
className: k(
|
|
9803
9824
|
"cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground",
|
|
9804
9825
|
me()
|
|
9805
9826
|
),
|
|
@@ -9812,7 +9833,7 @@ const Vr = p(
|
|
|
9812
9833
|
)
|
|
9813
9834
|
);
|
|
9814
9835
|
Vr.displayName = "PersonTrigger";
|
|
9815
|
-
function
|
|
9836
|
+
function d4({ id: e, label: t }) {
|
|
9816
9837
|
const { entityRefs: n } = Me(), o = n?.resolvers?.person, s = Y(), i = n?.urls?.person?.(e), a = ee(
|
|
9817
9838
|
() => (l) => ({
|
|
9818
9839
|
avatar: {
|
|
@@ -9860,7 +9881,7 @@ const Tr = p(
|
|
|
9860
9881
|
{
|
|
9861
9882
|
ref: n,
|
|
9862
9883
|
type: "button",
|
|
9863
|
-
className:
|
|
9884
|
+
className: k(
|
|
9864
9885
|
"cursor-pointer font-medium text-f1-foreground-secondary hover:text-f1-foreground",
|
|
9865
9886
|
me()
|
|
9866
9887
|
),
|
|
@@ -9870,7 +9891,7 @@ const Tr = p(
|
|
|
9870
9891
|
)
|
|
9871
9892
|
);
|
|
9872
9893
|
Tr.displayName = "VacancyTrigger";
|
|
9873
|
-
function
|
|
9894
|
+
function f4({ id: e, label: t }) {
|
|
9874
9895
|
const { entityRefs: n } = Me(), o = n?.resolvers?.vacancy, s = Y(), i = n?.urls?.vacancy?.(e), a = ee(
|
|
9875
9896
|
() => (l) => ({
|
|
9876
9897
|
title: l.name,
|
|
@@ -9906,50 +9927,50 @@ function c4({ id: e, label: t }) {
|
|
|
9906
9927
|
}
|
|
9907
9928
|
) : /* @__PURE__ */ r("span", { children: t });
|
|
9908
9929
|
}
|
|
9909
|
-
const
|
|
9910
|
-
person:
|
|
9911
|
-
candidate:
|
|
9912
|
-
expense:
|
|
9913
|
-
"job-posting":
|
|
9914
|
-
requisition:
|
|
9915
|
-
vacancy:
|
|
9930
|
+
const u4 = {
|
|
9931
|
+
person: d4,
|
|
9932
|
+
candidate: s4,
|
|
9933
|
+
expense: i4,
|
|
9934
|
+
"job-posting": a4,
|
|
9935
|
+
requisition: l4,
|
|
9936
|
+
vacancy: f4
|
|
9916
9937
|
};
|
|
9917
|
-
function
|
|
9918
|
-
return
|
|
9938
|
+
function h4(e) {
|
|
9939
|
+
return u4[e];
|
|
9919
9940
|
}
|
|
9920
9941
|
function p1(e) {
|
|
9921
9942
|
return typeof e == "string" ? e : typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(p1).join("") : e && typeof e == "object" && "props" in e ? p1(e.props.children) : "";
|
|
9922
9943
|
}
|
|
9923
|
-
function
|
|
9944
|
+
function g4({
|
|
9924
9945
|
type: e,
|
|
9925
9946
|
id: t,
|
|
9926
9947
|
children: n
|
|
9927
9948
|
}) {
|
|
9928
9949
|
if (!t || !e)
|
|
9929
9950
|
return /* @__PURE__ */ r("span", { children: n });
|
|
9930
|
-
const o = p1(n), s =
|
|
9951
|
+
const o = p1(n), s = h4(e);
|
|
9931
9952
|
return s ? /* @__PURE__ */ r(s, { id: t, label: o }) : /* @__PURE__ */ r("span", { children: n });
|
|
9932
9953
|
}
|
|
9933
|
-
const
|
|
9934
|
-
p:
|
|
9935
|
-
h1:
|
|
9936
|
-
h2:
|
|
9937
|
-
h3:
|
|
9938
|
-
a:
|
|
9939
|
-
strong:
|
|
9940
|
-
em:
|
|
9941
|
-
li:
|
|
9942
|
-
pre:
|
|
9943
|
-
code:
|
|
9944
|
-
blockquote:
|
|
9945
|
-
hr:
|
|
9946
|
-
ul:
|
|
9947
|
-
ol:
|
|
9948
|
-
table:
|
|
9949
|
-
th:
|
|
9950
|
-
td:
|
|
9951
|
-
img:
|
|
9952
|
-
"entity-ref":
|
|
9954
|
+
const g9 = {
|
|
9955
|
+
p: J2,
|
|
9956
|
+
h1: e4,
|
|
9957
|
+
h2: t4,
|
|
9958
|
+
h3: r4,
|
|
9959
|
+
a: z2,
|
|
9960
|
+
strong: n4,
|
|
9961
|
+
em: o4,
|
|
9962
|
+
li: q2,
|
|
9963
|
+
pre: D2,
|
|
9964
|
+
code: Z2,
|
|
9965
|
+
blockquote: _2,
|
|
9966
|
+
hr: O2,
|
|
9967
|
+
ul: G2,
|
|
9968
|
+
ol: W2,
|
|
9969
|
+
table: Y2,
|
|
9970
|
+
th: K2,
|
|
9971
|
+
td: Q2,
|
|
9972
|
+
img: U2,
|
|
9973
|
+
"entity-ref": g4
|
|
9953
9974
|
};
|
|
9954
9975
|
function Hr({
|
|
9955
9976
|
avatar: e,
|
|
@@ -9963,7 +9984,7 @@ function Hr({
|
|
|
9963
9984
|
return /* @__PURE__ */ c(
|
|
9964
9985
|
"div",
|
|
9965
9986
|
{
|
|
9966
|
-
className:
|
|
9987
|
+
className: k(
|
|
9967
9988
|
"flex flex-col items-center justify-between gap-3 rounded-lg border border-solid px-3 py-2",
|
|
9968
9989
|
d && "cursor-pointer",
|
|
9969
9990
|
o ? "border-f1-border-hover" : "border-f1-border-secondary"
|
|
@@ -10005,7 +10026,7 @@ function Hr({
|
|
|
10005
10026
|
}
|
|
10006
10027
|
Hr.displayName = "F0CanvasCard";
|
|
10007
10028
|
const N1 = Ye(null);
|
|
10008
|
-
function
|
|
10029
|
+
function p9({
|
|
10009
10030
|
children: e
|
|
10010
10031
|
}) {
|
|
10011
10032
|
const [t, n] = P(0), o = I([]), s = q(
|
|
@@ -10026,7 +10047,7 @@ function u9({
|
|
|
10026
10047
|
);
|
|
10027
10048
|
return /* @__PURE__ */ r(N1.Provider, { value: i, children: e });
|
|
10028
10049
|
}
|
|
10029
|
-
function
|
|
10050
|
+
function p4(e) {
|
|
10030
10051
|
const n = Pe(N1)?.formatters;
|
|
10031
10052
|
return ee(() => !n || n.length === 0 ? null : (o, s, i) => {
|
|
10032
10053
|
let a, d = -1;
|
|
@@ -10040,7 +10061,7 @@ function u4(e) {
|
|
|
10040
10061
|
return a.format(s, { key: o, ...i });
|
|
10041
10062
|
}, [n, e]);
|
|
10042
10063
|
}
|
|
10043
|
-
function
|
|
10064
|
+
function m9() {
|
|
10044
10065
|
const e = Pe(N1);
|
|
10045
10066
|
if (!e)
|
|
10046
10067
|
throw new Error(
|
|
@@ -10048,14 +10069,14 @@ function h9() {
|
|
|
10048
10069
|
);
|
|
10049
10070
|
return e.setFormCardValueFormatter;
|
|
10050
10071
|
}
|
|
10051
|
-
const z1 = 7,
|
|
10052
|
-
function
|
|
10072
|
+
const z1 = 7, m4 = 625, G1 = /* @__PURE__ */ new Set();
|
|
10073
|
+
function C4(e) {
|
|
10053
10074
|
return typeof DOMParser < "u" ? new DOMParser().parseFromString(e, "text/html").body.textContent?.replace(/\s+/g, " ").trim() ?? "" : e.replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
|
|
10054
10075
|
}
|
|
10055
|
-
function
|
|
10076
|
+
function v4(e) {
|
|
10056
10077
|
return e && e.charAt(0).toUpperCase() + e.slice(1);
|
|
10057
10078
|
}
|
|
10058
|
-
function
|
|
10079
|
+
function w4(e) {
|
|
10059
10080
|
const { days: t, hours: n, minutes: o, seconds: s } = Vs(e), i = [];
|
|
10060
10081
|
return t > 0 && i.push(`${t}d`), n > 0 && i.push(`${n}h`), o > 0 && i.push(`${o}m`), (s > 0 || i.length === 0) && i.push(`${s}s`), i.join(" ");
|
|
10061
10082
|
}
|
|
@@ -10074,10 +10095,10 @@ function X1(e) {
|
|
|
10074
10095
|
function Ar(e, t) {
|
|
10075
10096
|
if (e == null || e === "") return { type: "item", text: "—" };
|
|
10076
10097
|
if (t === "duration" && typeof e == "number")
|
|
10077
|
-
return { type: "item", text:
|
|
10098
|
+
return { type: "item", text: w4(e) };
|
|
10078
10099
|
if (t === "richtext" && typeof e == "object" && e !== null && "value" in e) {
|
|
10079
10100
|
const n = e.value;
|
|
10080
|
-
return { type: "item", text: (n ?
|
|
10101
|
+
return { type: "item", text: (n ? C4(n) : "") || "—" };
|
|
10081
10102
|
}
|
|
10082
10103
|
if (t === "daterange" && typeof e == "object" && e !== null && "from" in e && "to" in e) {
|
|
10083
10104
|
const { from: n, to: o } = e, s = W1(n) ? q1(n) : String(n), i = W1(o) ? q1(o) : String(o);
|
|
@@ -10096,7 +10117,7 @@ function Ar(e, t) {
|
|
|
10096
10117
|
const n = e;
|
|
10097
10118
|
return typeof n.label == "string" ? { type: "item", text: n.label } : typeof n.name == "string" ? { type: "item", text: n.name } : typeof n.text == "string" ? { type: "item", text: n.text } : { type: "item", text: JSON.stringify(e) };
|
|
10098
10119
|
}
|
|
10099
|
-
return { type: "item", text:
|
|
10120
|
+
return { type: "item", text: v4(String(e)) };
|
|
10100
10121
|
}
|
|
10101
10122
|
function Br({
|
|
10102
10123
|
formName: e,
|
|
@@ -10108,8 +10129,8 @@ function Br({
|
|
|
10108
10129
|
formValues: a,
|
|
10109
10130
|
valueFormatter: d
|
|
10110
10131
|
}) {
|
|
10111
|
-
const { canvasContent: l, openCanvas: u, closeCanvas: f } = Me(), g =
|
|
10112
|
-
}), C = o ?? e, v = s ?? t ?? "", w = l?.type === "form" && l.formName === e,
|
|
10132
|
+
const { canvasContent: l, openCanvas: u, closeCanvas: f } = Me(), g = p4(e), m = d ?? g, h = I(() => {
|
|
10133
|
+
}), C = o ?? e, v = s ?? t ?? "", w = l?.type === "form" && l.formName === e, x = () => u({
|
|
10113
10134
|
type: "form",
|
|
10114
10135
|
title: C,
|
|
10115
10136
|
description: v,
|
|
@@ -10117,10 +10138,10 @@ function Br({
|
|
|
10117
10138
|
formDescription: t,
|
|
10118
10139
|
formModule: n
|
|
10119
10140
|
});
|
|
10120
|
-
h.current =
|
|
10121
|
-
typeof window > "u" || window.innerWidth <
|
|
10141
|
+
h.current = x, X(() => {
|
|
10142
|
+
typeof window > "u" || window.innerWidth < m4 || G1.has(e) || (G1.add(e), h.current());
|
|
10122
10143
|
}, [e]);
|
|
10123
|
-
const
|
|
10144
|
+
const S = i && a ? Object.entries(i).map(([L, b]) => {
|
|
10124
10145
|
const A = a[L], H = m?.(L, A, {
|
|
10125
10146
|
fieldType: b.fieldType,
|
|
10126
10147
|
customFieldName: b.customFieldName
|
|
@@ -10137,7 +10158,7 @@ function Br({
|
|
|
10137
10158
|
if (!L) return !1;
|
|
10138
10159
|
const b = Array.isArray(L.content) ? L.content[0] : L.content;
|
|
10139
10160
|
return !(b?.type === "item" && b.text === "—");
|
|
10140
|
-
}) : [], T =
|
|
10161
|
+
}) : [], T = S.slice(0, z1), E = S.length > z1;
|
|
10141
10162
|
return /* @__PURE__ */ r(
|
|
10142
10163
|
Hr,
|
|
10143
10164
|
{
|
|
@@ -10147,7 +10168,7 @@ function Br({
|
|
|
10147
10168
|
isActive: w,
|
|
10148
10169
|
action: {
|
|
10149
10170
|
type: "open",
|
|
10150
|
-
onOpen:
|
|
10171
|
+
onOpen: x,
|
|
10151
10172
|
onClose: f,
|
|
10152
10173
|
showButton: w
|
|
10153
10174
|
},
|
|
@@ -10160,7 +10181,7 @@ function Br({
|
|
|
10160
10181
|
...L.verticalLayout && { verticalLayout: !0 }
|
|
10161
10182
|
})),
|
|
10162
10183
|
showSeeMore: E,
|
|
10163
|
-
onClickSeeMore:
|
|
10184
|
+
onClickSeeMore: x,
|
|
10164
10185
|
tableView: !0
|
|
10165
10186
|
}
|
|
10166
10187
|
) })
|
|
@@ -10168,7 +10189,7 @@ function Br({
|
|
|
10168
10189
|
);
|
|
10169
10190
|
}
|
|
10170
10191
|
Br.displayName = "FormCard";
|
|
10171
|
-
function
|
|
10192
|
+
function x4() {
|
|
10172
10193
|
const e = Ts(), t = e?.activeForm;
|
|
10173
10194
|
if (!t) return null;
|
|
10174
10195
|
const n = t.cardTitle, o = t.cardDescription, s = (e?.getFillVersion(t.formName) ?? 0) > 0;
|
|
@@ -10185,15 +10206,15 @@ function C4() {
|
|
|
10185
10206
|
}
|
|
10186
10207
|
) });
|
|
10187
10208
|
}
|
|
10188
|
-
const
|
|
10189
|
-
function
|
|
10209
|
+
const k4 = 2;
|
|
10210
|
+
function b4(e, t) {
|
|
10190
10211
|
if (!e.intersectsNode(t)) return null;
|
|
10191
10212
|
const n = document.createRange();
|
|
10192
10213
|
n.selectNodeContents(t);
|
|
10193
10214
|
const o = e.cloneRange();
|
|
10194
10215
|
o.compareBoundaryPoints(Range.START_TO_START, n) < 0 && o.setStart(n.startContainer, n.startOffset), o.compareBoundaryPoints(Range.END_TO_END, n) > 0 && o.setEnd(n.endContainer, n.endOffset);
|
|
10195
10216
|
const s = o.toString().trim();
|
|
10196
|
-
if (s.length <
|
|
10217
|
+
if (s.length < k4) return null;
|
|
10197
10218
|
const i = o.getBoundingClientRect();
|
|
10198
10219
|
return { rect: i.width > 0 || i.height > 0 ? i : t.getBoundingClientRect(), text: s };
|
|
10199
10220
|
}
|
|
@@ -10212,7 +10233,7 @@ function $r({
|
|
|
10212
10233
|
o(null);
|
|
10213
10234
|
return;
|
|
10214
10235
|
}
|
|
10215
|
-
o(
|
|
10236
|
+
o(b4(u.getRangeAt(0), i));
|
|
10216
10237
|
}, d = () => {
|
|
10217
10238
|
window.setTimeout(a, 0);
|
|
10218
10239
|
}, l = () => {
|
|
@@ -10259,7 +10280,7 @@ function Ir({ anchor: e, onReply: t }) {
|
|
|
10259
10280
|
left: s?.left ?? -9999,
|
|
10260
10281
|
visibility: s ? "visible" : "hidden"
|
|
10261
10282
|
},
|
|
10262
|
-
className:
|
|
10283
|
+
className: k(
|
|
10263
10284
|
"z-50 rounded-md bg-f1-background p-1 border border-solid border-f1-border-secondary",
|
|
10264
10285
|
"drop-shadow"
|
|
10265
10286
|
),
|
|
@@ -10281,7 +10302,7 @@ function Ir({ anchor: e, onReply: t }) {
|
|
|
10281
10302
|
document.body
|
|
10282
10303
|
);
|
|
10283
10304
|
}
|
|
10284
|
-
const Pr = Ye(void 0),
|
|
10305
|
+
const Pr = Ye(void 0), C9 = () => Pe(Pr), L4 = (e) => /* @__PURE__ */ r(zt, { content: e, format: "markdown" }), y4 = ({
|
|
10285
10306
|
isGenerating: e,
|
|
10286
10307
|
isLoading: t,
|
|
10287
10308
|
message: n,
|
|
@@ -10302,7 +10323,7 @@ const Pr = Ye(void 0), g9 = () => Pe(Pr), x4 = (e) => /* @__PURE__ */ r(zt, { co
|
|
|
10302
10323
|
{
|
|
10303
10324
|
ref: g,
|
|
10304
10325
|
className: "w-full max-w-full [&>div]:flex [&>div]:flex-col [&>div]:gap-1",
|
|
10305
|
-
children: (a ??
|
|
10326
|
+
children: (a ?? L4)(d)
|
|
10306
10327
|
}
|
|
10307
10328
|
),
|
|
10308
10329
|
!!l && /* @__PURE__ */ r("div", { className: "w-full", children: l }),
|
|
@@ -10316,7 +10337,7 @@ const Pr = Ye(void 0), g9 = () => Pe(Pr), x4 = (e) => /* @__PURE__ */ r(zt, { co
|
|
|
10316
10337
|
}
|
|
10317
10338
|
)
|
|
10318
10339
|
] }) });
|
|
10319
|
-
},
|
|
10340
|
+
}, M4 = ({
|
|
10320
10341
|
onClose: e,
|
|
10321
10342
|
onSubmit: t,
|
|
10322
10343
|
reactionType: n,
|
|
@@ -10365,7 +10386,7 @@ const Pr = Ye(void 0), g9 = () => Pe(Pr), x4 = (e) => /* @__PURE__ */ r(zt, { co
|
|
|
10365
10386
|
) })
|
|
10366
10387
|
}
|
|
10367
10388
|
);
|
|
10368
|
-
}, jr = Ye(null),
|
|
10389
|
+
}, jr = Ye(null), E4 = ({ children: e }) => {
|
|
10369
10390
|
const [t, n] = P(null), o = t ? {
|
|
10370
10391
|
isOpen: !0,
|
|
10371
10392
|
currentReaction: t.action,
|
|
@@ -10388,7 +10409,7 @@ const Pr = Ye(void 0), g9 = () => Pe(Pr), x4 = (e) => /* @__PURE__ */ r(zt, { co
|
|
|
10388
10409
|
);
|
|
10389
10410
|
return e;
|
|
10390
10411
|
};
|
|
10391
|
-
function
|
|
10412
|
+
function R4(e) {
|
|
10392
10413
|
const t = Dr();
|
|
10393
10414
|
return { modal: t, handleSubmit: (s, i) => {
|
|
10394
10415
|
(t.currentReaction === "like" ? e.onThumbsUp : e.onThumbsDown)?.(s, { threadId: e.threadId, feedback: i }), t.close();
|
|
@@ -10396,7 +10417,7 @@ function y4(e) {
|
|
|
10396
10417
|
(t.currentReaction === "like" ? e.onThumbsUp : e.onThumbsDown)?.(s, { threadId: e.threadId, feedback: "" }), t.close();
|
|
10397
10418
|
} };
|
|
10398
10419
|
}
|
|
10399
|
-
const
|
|
10420
|
+
const F4 = ({
|
|
10400
10421
|
content: e,
|
|
10401
10422
|
targetMessage: t,
|
|
10402
10423
|
onCopy: n
|
|
@@ -10461,7 +10482,7 @@ const M4 = ({
|
|
|
10461
10482
|
oe.div,
|
|
10462
10483
|
{
|
|
10463
10484
|
transition: { duration: 0.2, ease: "easeOut" },
|
|
10464
|
-
className:
|
|
10485
|
+
className: k(
|
|
10465
10486
|
// Inset 1px on both sides so the gradient and the thin `::after` rule
|
|
10466
10487
|
// never sit flush against the chat panel's left/right edge. Matters in
|
|
10467
10488
|
// canvas mode: the chat has `border-l-0` there and the ResizeHandle
|
|
@@ -10483,7 +10504,7 @@ const M4 = ({
|
|
|
10483
10504
|
]
|
|
10484
10505
|
)
|
|
10485
10506
|
}
|
|
10486
|
-
),
|
|
10507
|
+
), N4 = ({
|
|
10487
10508
|
icon: e,
|
|
10488
10509
|
title: t,
|
|
10489
10510
|
children: n,
|
|
@@ -10506,7 +10527,7 @@ const M4 = ({
|
|
|
10506
10527
|
Wt,
|
|
10507
10528
|
{
|
|
10508
10529
|
disabled: a,
|
|
10509
|
-
className:
|
|
10530
|
+
className: k(
|
|
10510
10531
|
"gap-1",
|
|
10511
10532
|
a ? "flex w-full items-center text-base text-f1-foreground-secondary" : "flex w-full items-center text-base text-f1-foreground-secondary transition-colors duration-150 hover:text-f1-foreground [&[data-state=open]>svg]:rotate-90"
|
|
10512
10533
|
),
|
|
@@ -10537,7 +10558,7 @@ const M4 = ({
|
|
|
10537
10558
|
]
|
|
10538
10559
|
}
|
|
10539
10560
|
);
|
|
10540
|
-
},
|
|
10561
|
+
}, S4 = ({
|
|
10541
10562
|
titles: e,
|
|
10542
10563
|
title: t,
|
|
10543
10564
|
inProgress: n,
|
|
@@ -10549,7 +10570,7 @@ const M4 = ({
|
|
|
10549
10570
|
}, [n, i]);
|
|
10550
10571
|
const l = n ? s.ai.thoughtsGroupTitle : t ?? s.ai.thoughtsGroupTitle, u = e.length - 1, f = (g) => !n || o ? "completed" : g === u ? "executing" : "completed";
|
|
10551
10572
|
return /* @__PURE__ */ r(
|
|
10552
|
-
|
|
10573
|
+
N4,
|
|
10553
10574
|
{
|
|
10554
10575
|
icon: rr,
|
|
10555
10576
|
title: l,
|
|
@@ -10576,14 +10597,14 @@ const M4 = ({
|
|
|
10576
10597
|
}
|
|
10577
10598
|
);
|
|
10578
10599
|
};
|
|
10579
|
-
function
|
|
10600
|
+
function V4(e) {
|
|
10580
10601
|
if (typeof e == "string") return e;
|
|
10581
10602
|
if (Array.isArray(e)) {
|
|
10582
10603
|
const t = e.filter((n) => n.type === "text").map((n) => n.text).filter((n) => typeof n == "string");
|
|
10583
10604
|
return t[t.length - 1];
|
|
10584
10605
|
}
|
|
10585
10606
|
}
|
|
10586
|
-
function
|
|
10607
|
+
function T4(e, t) {
|
|
10587
10608
|
const n = Array.isArray(e) ? e.filter((o) => o.type === "binary").map((o) => ({
|
|
10588
10609
|
url: o.url,
|
|
10589
10610
|
filename: o.filename,
|
|
@@ -10595,13 +10616,13 @@ function N4(e, t) {
|
|
|
10595
10616
|
(o) => typeof o?.filename == "string" && typeof o?.mimetype == "string" && typeof o?.url == "string"
|
|
10596
10617
|
);
|
|
10597
10618
|
}
|
|
10598
|
-
const Zr = (e) => /* @__PURE__ */ r(zt, { content: e, format: "markdown" }),
|
|
10619
|
+
const Zr = (e) => /* @__PURE__ */ r(zt, { content: e, format: "markdown" }), H4 = ({
|
|
10599
10620
|
text: e,
|
|
10600
10621
|
renderMarkdown: t
|
|
10601
10622
|
}) => /* @__PURE__ */ c("div", { className: "flex max-w-[90%] items-start gap-2 self-end pb-1 pr-2 text-f1-foreground-tertiary", children: [
|
|
10602
10623
|
/* @__PURE__ */ r("div", { className: "flex h-5 items-center", children: /* @__PURE__ */ r(le, { icon: R1 }) }),
|
|
10603
10624
|
/* @__PURE__ */ r("div", { className: "min-w-0 whitespace-pre-wrap text-base leading-5 [&>div]:flex [&>div]:flex-col [&>div]:gap-1 [&_p]:m-0", children: (t ?? Zr)(e) })
|
|
10604
|
-
] }),
|
|
10625
|
+
] }), A4 = ({
|
|
10605
10626
|
message: e,
|
|
10606
10627
|
onReplyQuote: t,
|
|
10607
10628
|
autoScrollIntoView: n = !0,
|
|
@@ -10613,10 +10634,10 @@ const Zr = (e) => /* @__PURE__ */ r(zt, { content: e, format: "markdown" }), S4
|
|
|
10613
10634
|
behavior: "smooth"
|
|
10614
10635
|
});
|
|
10615
10636
|
}, [n]);
|
|
10616
|
-
const a = e.rawData, d =
|
|
10637
|
+
const a = e.rawData, d = T4(
|
|
10617
10638
|
e?.content,
|
|
10618
10639
|
a
|
|
10619
|
-
), l = (
|
|
10640
|
+
), l = (V4(e?.content) ?? "").trim(), u = e?.replyQuote ?? null, f = l.length > 0, { anchor: g, clear: m } = $r({
|
|
10620
10641
|
containerRef: i,
|
|
10621
10642
|
enabled: f
|
|
10622
10643
|
});
|
|
@@ -10626,7 +10647,7 @@ const Zr = (e) => /* @__PURE__ */ r(zt, { content: e, format: "markdown" }), S4
|
|
|
10626
10647
|
ref: s,
|
|
10627
10648
|
className: "my-4 flex w-full flex-col items-end gap-2 first:mt-0 last:mb-0",
|
|
10628
10649
|
children: [
|
|
10629
|
-
u && /* @__PURE__ */ r(
|
|
10650
|
+
u && /* @__PURE__ */ r(H4, { text: u, renderMarkdown: o }),
|
|
10630
10651
|
d.length > 0 && /* @__PURE__ */ r("div", { className: "flex max-w-[90%] flex-wrap justify-end gap-1.5", children: d.map((h, C) => /* @__PURE__ */ r(
|
|
10631
10652
|
_t,
|
|
10632
10653
|
{
|
|
@@ -10655,7 +10676,7 @@ const Zr = (e) => /* @__PURE__ */ r(zt, { content: e, format: "markdown" }), S4
|
|
|
10655
10676
|
]
|
|
10656
10677
|
}
|
|
10657
10678
|
);
|
|
10658
|
-
},
|
|
10679
|
+
}, B4 = 35, $4 = 22, I4 = 400, P4 = 2500, j4 = 220, D4 = ({
|
|
10659
10680
|
messages: e,
|
|
10660
10681
|
onClick: t,
|
|
10661
10682
|
fullscreen: n = !1
|
|
@@ -10666,15 +10687,15 @@ const Zr = (e) => /* @__PURE__ */ r(zt, { content: e, format: "markdown" }), S4
|
|
|
10666
10687
|
}, [e.length, o]), X(() => {
|
|
10667
10688
|
let m;
|
|
10668
10689
|
if (d === "starting")
|
|
10669
|
-
m = setTimeout(() => l("writing"),
|
|
10690
|
+
m = setTimeout(() => l("writing"), I4);
|
|
10670
10691
|
else if (d === "writing")
|
|
10671
|
-
i < u.length ? m = setTimeout(() => a((h) => h + 1),
|
|
10692
|
+
i < u.length ? m = setTimeout(() => a((h) => h + 1), B4) : l("holding");
|
|
10672
10693
|
else if (d === "holding") {
|
|
10673
10694
|
if (e.length <= 1) return;
|
|
10674
|
-
m = setTimeout(() => l("erasing"),
|
|
10675
|
-
} else d === "erasing" && (i > 0 ? m = setTimeout(() => a((h) => h - 1),
|
|
10695
|
+
m = setTimeout(() => l("erasing"), P4);
|
|
10696
|
+
} else d === "erasing" && (i > 0 ? m = setTimeout(() => a((h) => h - 1), $4) : m = setTimeout(() => {
|
|
10676
10697
|
s((h) => (h + 1) % e.length), l("starting");
|
|
10677
|
-
},
|
|
10698
|
+
}, j4));
|
|
10678
10699
|
return () => {
|
|
10679
10700
|
m && clearTimeout(m);
|
|
10680
10701
|
};
|
|
@@ -10685,7 +10706,7 @@ const Zr = (e) => /* @__PURE__ */ r(zt, { content: e, format: "markdown" }), S4
|
|
|
10685
10706
|
return /* @__PURE__ */ r(
|
|
10686
10707
|
"div",
|
|
10687
10708
|
{
|
|
10688
|
-
className:
|
|
10709
|
+
className: k(
|
|
10689
10710
|
"flex w-full flex-1 justify-center px-4",
|
|
10690
10711
|
n ? "items-end pb-24" : "items-center"
|
|
10691
10712
|
),
|
|
@@ -10696,9 +10717,9 @@ const Zr = (e) => /* @__PURE__ */ r(zt, { content: e, format: "markdown" }), S4
|
|
|
10696
10717
|
tabIndex: f ? 0 : void 0,
|
|
10697
10718
|
onClick: t,
|
|
10698
10719
|
onKeyDown: g,
|
|
10699
|
-
className:
|
|
10720
|
+
className: k(
|
|
10700
10721
|
"bg-gradient-to-r from-[#E55619] via-[#E51943] to-[#A1ADE5] bg-clip-text text-center text-2xl font-semibold leading-[28px] text-transparent",
|
|
10701
|
-
f &&
|
|
10722
|
+
f && k(
|
|
10702
10723
|
"cursor-pointer transition-transform duration-200",
|
|
10703
10724
|
"hover:scale-[1.02] focus-visible:scale-[1.02]",
|
|
10704
10725
|
"motion-reduce:transition-none motion-reduce:hover:scale-100 motion-reduce:focus-visible:scale-100"
|
|
@@ -10713,7 +10734,7 @@ const Zr = (e) => /* @__PURE__ */ r(zt, { content: e, format: "markdown" }), S4
|
|
|
10713
10734
|
}
|
|
10714
10735
|
);
|
|
10715
10736
|
};
|
|
10716
|
-
function
|
|
10737
|
+
function Z4({
|
|
10717
10738
|
viewportRef: e,
|
|
10718
10739
|
contentRef: t,
|
|
10719
10740
|
endRef: n,
|
|
@@ -10734,16 +10755,16 @@ function P4({
|
|
|
10734
10755
|
if (!C || !v) return;
|
|
10735
10756
|
const w = new ResizeObserver(() => {
|
|
10736
10757
|
if (g.current) return;
|
|
10737
|
-
const
|
|
10738
|
-
d(C.clientHeight -
|
|
10758
|
+
const x = parseFloat(getComputedStyle(v).paddingTop) + parseFloat(getComputedStyle(v).paddingBottom) + 1;
|
|
10759
|
+
d(C.clientHeight - x);
|
|
10739
10760
|
});
|
|
10740
10761
|
return w.observe(C), w.observe(v), () => w.disconnect();
|
|
10741
10762
|
}, [e, t]);
|
|
10742
10763
|
const h = q(() => {
|
|
10743
10764
|
const C = e.current;
|
|
10744
10765
|
if (!C) return;
|
|
10745
|
-
const { scrollTop: v, scrollHeight: w, clientHeight:
|
|
10746
|
-
u(
|
|
10766
|
+
const { scrollTop: v, scrollHeight: w, clientHeight: x } = C, S = w - v - x;
|
|
10767
|
+
u(S > x);
|
|
10747
10768
|
}, [e]);
|
|
10748
10769
|
return X(() => {
|
|
10749
10770
|
const C = e.current;
|
|
@@ -10754,19 +10775,19 @@ function P4({
|
|
|
10754
10775
|
requestAnimationFrame(() => {
|
|
10755
10776
|
const C = e.current, v = o.current;
|
|
10756
10777
|
if (!C || !v) return;
|
|
10757
|
-
const w = C.getBoundingClientRect(),
|
|
10758
|
-
C.scrollTo({ top:
|
|
10778
|
+
const w = C.getBoundingClientRect(), x = v.getBoundingClientRect(), S = C.scrollTop + (x.top - w.top);
|
|
10779
|
+
C.scrollTo({ top: S, behavior: "smooth" });
|
|
10759
10780
|
});
|
|
10760
10781
|
}), s === 0 && u(!1), f.current = s;
|
|
10761
10782
|
}, [s, o, e]), { showScrollBtn: l, turnMinHeight: a, scrollToBottom: m };
|
|
10762
10783
|
}
|
|
10763
|
-
const
|
|
10784
|
+
const _4 = {
|
|
10764
10785
|
threadId: "",
|
|
10765
10786
|
onThumbsUp: () => {
|
|
10766
10787
|
},
|
|
10767
10788
|
onThumbsDown: () => {
|
|
10768
10789
|
}
|
|
10769
|
-
},
|
|
10790
|
+
}, v9 = (e) => /* @__PURE__ */ r(E4, { children: /* @__PURE__ */ r(O4, { ...e }) }), O4 = ({
|
|
10770
10791
|
turns: e,
|
|
10771
10792
|
isLoadingThread: t = !1,
|
|
10772
10793
|
interrupt: n,
|
|
@@ -10784,15 +10805,15 @@ const j4 = {
|
|
|
10784
10805
|
children: C,
|
|
10785
10806
|
AssistantMessage: v,
|
|
10786
10807
|
UserMessage: w,
|
|
10787
|
-
onRegenerate:
|
|
10788
|
-
onCopy:
|
|
10808
|
+
onRegenerate: x,
|
|
10809
|
+
onCopy: S
|
|
10789
10810
|
}) => {
|
|
10790
|
-
const { modal: T, handleSubmit: E, handleClose: L } =
|
|
10791
|
-
f ??
|
|
10792
|
-
), b = Y(), A = v ??
|
|
10811
|
+
const { modal: T, handleSubmit: E, handleClose: L } = R4(
|
|
10812
|
+
f ?? _4
|
|
10813
|
+
), b = Y(), A = v ?? y4, H = w ?? A4, y = ee(() => {
|
|
10793
10814
|
const D = o ?? b.ai.defaultInitialMessage;
|
|
10794
10815
|
return (Array.isArray(D) ? D : [D]).filter((W) => typeof W == "string" && W.length > 0);
|
|
10795
|
-
}, [o, b.ai.defaultInitialMessage]), R = !t && e.length === 0 && y.length > 0, F = I(null), $ = I(null), _ = I(null), z = I(null), G = I(null), { showScrollBtn: re, turnMinHeight: K, scrollToBottom: O } =
|
|
10816
|
+
}, [o, b.ai.defaultInitialMessage]), R = !t && e.length === 0 && y.length > 0, F = I(null), $ = I(null), _ = I(null), z = I(null), G = I(null), { showScrollBtn: re, turnMinHeight: K, scrollToBottom: O } = Z4({
|
|
10796
10817
|
viewportRef: F,
|
|
10797
10818
|
contentRef: $,
|
|
10798
10819
|
endRef: _,
|
|
@@ -10814,8 +10835,8 @@ const j4 = {
|
|
|
10814
10835
|
isCurrentMessage: !1,
|
|
10815
10836
|
AssistantMessage: A,
|
|
10816
10837
|
UserMessage: H,
|
|
10817
|
-
onRegenerate:
|
|
10818
|
-
onCopy:
|
|
10838
|
+
onRegenerate: x,
|
|
10839
|
+
onCopy: S,
|
|
10819
10840
|
rawData: ne.rawData || {},
|
|
10820
10841
|
...he
|
|
10821
10842
|
};
|
|
@@ -10827,22 +10848,22 @@ const j4 = {
|
|
|
10827
10848
|
`${Q}-u-${se}`
|
|
10828
10849
|
);
|
|
10829
10850
|
}, ie = (ne, se) => {
|
|
10830
|
-
const de = W && se === D.assistantMessages.length - 1, M = D.userMessages.length + se,
|
|
10851
|
+
const de = W && se === D.assistantMessages.length - 1, M = D.userMessages.length + se, V = {
|
|
10831
10852
|
message: ne,
|
|
10832
10853
|
inProgress: D.isInProgress,
|
|
10833
10854
|
index: M,
|
|
10834
10855
|
isCurrentMessage: de,
|
|
10835
10856
|
AssistantMessage: A,
|
|
10836
10857
|
UserMessage: H,
|
|
10837
|
-
onRegenerate:
|
|
10838
|
-
onCopy:
|
|
10858
|
+
onRegenerate: x,
|
|
10859
|
+
onCopy: S,
|
|
10839
10860
|
rawData: ne.rawData || {},
|
|
10840
10861
|
...he
|
|
10841
10862
|
};
|
|
10842
10863
|
return /* @__PURE__ */ r(
|
|
10843
10864
|
A,
|
|
10844
10865
|
{
|
|
10845
|
-
...
|
|
10866
|
+
...V,
|
|
10846
10867
|
isGenerating: D.isInProgress && de,
|
|
10847
10868
|
isLoading: D.isInProgress && de && !ne.content
|
|
10848
10869
|
},
|
|
@@ -10853,7 +10874,7 @@ const j4 = {
|
|
|
10853
10874
|
"div",
|
|
10854
10875
|
{
|
|
10855
10876
|
ref: W ? G : void 0,
|
|
10856
|
-
className:
|
|
10877
|
+
className: k(
|
|
10857
10878
|
"flex flex-col items-start justify-start gap-2 px-1",
|
|
10858
10879
|
W && "pb-5"
|
|
10859
10880
|
),
|
|
@@ -10865,7 +10886,7 @@ const j4 = {
|
|
|
10865
10886
|
(ne, se) => ge(ne, se)
|
|
10866
10887
|
),
|
|
10867
10888
|
D.thinking && D.thinking.titles.length > 0 && /* @__PURE__ */ r(
|
|
10868
|
-
|
|
10889
|
+
S4,
|
|
10869
10890
|
{
|
|
10870
10891
|
titles: D.thinking.titles,
|
|
10871
10892
|
title: b.ai.thoughtsGroupTitle,
|
|
@@ -10879,14 +10900,14 @@ const j4 = {
|
|
|
10879
10900
|
D.endIndicator === "thinking" && /* @__PURE__ */ r(u1, { title: b.ai.thinking, status: "executing" }),
|
|
10880
10901
|
D.endIndicator === "activity" && /* @__PURE__ */ r(u1, { status: "writing" }),
|
|
10881
10902
|
D.feedback && /* @__PURE__ */ r(
|
|
10882
|
-
|
|
10903
|
+
F4,
|
|
10883
10904
|
{
|
|
10884
10905
|
content: D.feedback.content,
|
|
10885
10906
|
targetMessage: D.feedback.targetMessage,
|
|
10886
|
-
onCopy:
|
|
10907
|
+
onCopy: S
|
|
10887
10908
|
}
|
|
10888
10909
|
),
|
|
10889
|
-
W && /* @__PURE__ */ r(
|
|
10910
|
+
W && /* @__PURE__ */ r(x4, {})
|
|
10890
10911
|
]
|
|
10891
10912
|
},
|
|
10892
10913
|
`turn-${Q}`
|
|
@@ -10898,7 +10919,7 @@ const j4 = {
|
|
|
10898
10919
|
"div",
|
|
10899
10920
|
{
|
|
10900
10921
|
ref: F,
|
|
10901
|
-
className:
|
|
10922
|
+
className: k(
|
|
10902
10923
|
"flex-1 overflow-y-scroll",
|
|
10903
10924
|
"[scrollbar-width:thin] [scrollbar-color:transparent_transparent]",
|
|
10904
10925
|
"hover:[scrollbar-color:var(--scrollbar-thumb)_transparent]",
|
|
@@ -10910,19 +10931,19 @@ const j4 = {
|
|
|
10910
10931
|
"div",
|
|
10911
10932
|
{
|
|
10912
10933
|
ref: $,
|
|
10913
|
-
className:
|
|
10934
|
+
className: k("flex h-full flex-col items-center p-4"),
|
|
10914
10935
|
children: [
|
|
10915
10936
|
/* @__PURE__ */ c(
|
|
10916
10937
|
"div",
|
|
10917
10938
|
{
|
|
10918
|
-
className:
|
|
10939
|
+
className: k(
|
|
10919
10940
|
R ? "flex flex-1" : "flex flex-col gap-6",
|
|
10920
10941
|
"w-full max-w-content"
|
|
10921
10942
|
),
|
|
10922
10943
|
children: [
|
|
10923
|
-
t && /* @__PURE__ */ r(
|
|
10944
|
+
t && /* @__PURE__ */ r(U4, {}),
|
|
10924
10945
|
R && /* @__PURE__ */ r(
|
|
10925
|
-
|
|
10946
|
+
D4,
|
|
10926
10947
|
{
|
|
10927
10948
|
messages: y,
|
|
10928
10949
|
onClick: s,
|
|
@@ -10967,7 +10988,7 @@ const j4 = {
|
|
|
10967
10988
|
] })
|
|
10968
10989
|
] }),
|
|
10969
10990
|
T.isOpen && /* @__PURE__ */ r(
|
|
10970
|
-
|
|
10991
|
+
M4,
|
|
10971
10992
|
{
|
|
10972
10993
|
onSubmit: E,
|
|
10973
10994
|
onClose: L,
|
|
@@ -10976,21 +10997,21 @@ const j4 = {
|
|
|
10976
10997
|
}
|
|
10977
10998
|
)
|
|
10978
10999
|
] });
|
|
10979
|
-
},
|
|
11000
|
+
}, U4 = () => /* @__PURE__ */ r("div", { className: "flex h-full w-full max-w-content flex-col gap-6", children: /* @__PURE__ */ c("div", { className: "flex flex-col gap-2", children: [
|
|
10980
11001
|
/* @__PURE__ */ r("div", { className: "flex justify-end", children: /* @__PURE__ */ r(ue, { className: "h-12 w-2/5 rounded-full" }) }),
|
|
10981
11002
|
/* @__PURE__ */ r(ue, { className: "mt-6 h-5 w-full rounded-md" }),
|
|
10982
11003
|
/* @__PURE__ */ r(ue, { className: "h-5 w-2/5 rounded-md" }),
|
|
10983
11004
|
/* @__PURE__ */ r(ue, { className: "h-5 w-4/5 rounded-md" })
|
|
10984
|
-
] }) }),
|
|
11005
|
+
] }) }), w9 = {
|
|
10985
11006
|
ai: Ks.ai
|
|
10986
11007
|
}, _r = Ye(null);
|
|
10987
|
-
function
|
|
11008
|
+
function x9({
|
|
10988
11009
|
children: e,
|
|
10989
11010
|
translations: t
|
|
10990
11011
|
}) {
|
|
10991
11012
|
return /* @__PURE__ */ r(_r.Provider, { value: t, children: e });
|
|
10992
11013
|
}
|
|
10993
|
-
function
|
|
11014
|
+
function k9() {
|
|
10994
11015
|
const e = Pe(_r);
|
|
10995
11016
|
if (e === null)
|
|
10996
11017
|
throw new Error(
|
|
@@ -10998,16 +11019,16 @@ function v9() {
|
|
|
10998
11019
|
);
|
|
10999
11020
|
return e;
|
|
11000
11021
|
}
|
|
11001
|
-
function
|
|
11022
|
+
function z4() {
|
|
11002
11023
|
const { canvasEntities: e } = Me();
|
|
11003
11024
|
return e;
|
|
11004
11025
|
}
|
|
11005
|
-
function
|
|
11006
|
-
const t =
|
|
11026
|
+
function b9(e) {
|
|
11027
|
+
const t = z4();
|
|
11007
11028
|
if (!(!e || !t))
|
|
11008
11029
|
return t[e];
|
|
11009
11030
|
}
|
|
11010
|
-
const
|
|
11031
|
+
const G4 = ({
|
|
11011
11032
|
canProceed: e,
|
|
11012
11033
|
submitDisabled: t,
|
|
11013
11034
|
label: n,
|
|
@@ -11039,13 +11060,13 @@ const O4 = ({
|
|
|
11039
11060
|
}, Or = ({ isSelected: e }) => /* @__PURE__ */ r(
|
|
11040
11061
|
"div",
|
|
11041
11062
|
{
|
|
11042
|
-
className:
|
|
11063
|
+
className: k(
|
|
11043
11064
|
"flex h-5 w-5 shrink-0 items-center justify-center rounded-full transition-colors",
|
|
11044
11065
|
e ? "bg-f1-background-selected-bold" : "border-2 border-solid border-f1-border bg-f1-background"
|
|
11045
11066
|
),
|
|
11046
11067
|
children: e && /* @__PURE__ */ r("div", { className: "h-2 w-2 rounded-full bg-f1-background" })
|
|
11047
11068
|
}
|
|
11048
|
-
),
|
|
11069
|
+
), W4 = ({
|
|
11049
11070
|
mode: e,
|
|
11050
11071
|
hasSelection: t,
|
|
11051
11072
|
hasCustomText: n,
|
|
@@ -11070,7 +11091,7 @@ const O4 = ({
|
|
|
11070
11091
|
return /* @__PURE__ */ c(
|
|
11071
11092
|
"div",
|
|
11072
11093
|
{
|
|
11073
|
-
className:
|
|
11094
|
+
className: k(
|
|
11074
11095
|
"flex items-center gap-2 rounded-md px-2 py-2",
|
|
11075
11096
|
"transition-colors hover:bg-f1-background-hover"
|
|
11076
11097
|
),
|
|
@@ -11103,7 +11124,7 @@ const O4 = ({
|
|
|
11103
11124
|
role: "radio",
|
|
11104
11125
|
"aria-checked": t,
|
|
11105
11126
|
tabIndex: o ? 0 : -1,
|
|
11106
|
-
className:
|
|
11127
|
+
className: k(
|
|
11107
11128
|
"flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 transition-colors hover:bg-f1-background-secondary",
|
|
11108
11129
|
me()
|
|
11109
11130
|
),
|
|
@@ -11124,7 +11145,7 @@ const O4 = ({
|
|
|
11124
11145
|
"div",
|
|
11125
11146
|
{
|
|
11126
11147
|
ref: a,
|
|
11127
|
-
className:
|
|
11148
|
+
className: k(
|
|
11128
11149
|
"flex cursor-pointer items-center rounded-md pl-2 transition-colors hover:bg-f1-background-secondary"
|
|
11129
11150
|
),
|
|
11130
11151
|
children: [
|
|
@@ -11150,7 +11171,7 @@ const O4 = ({
|
|
|
11150
11171
|
)
|
|
11151
11172
|
);
|
|
11152
11173
|
Ur.displayName = "OptionRow";
|
|
11153
|
-
const
|
|
11174
|
+
const q4 = ({
|
|
11154
11175
|
mode: e,
|
|
11155
11176
|
question: t,
|
|
11156
11177
|
options: n,
|
|
@@ -11169,11 +11190,11 @@ const z4 = ({
|
|
|
11169
11190
|
onToggleCustomActive: v,
|
|
11170
11191
|
onConfirm: w
|
|
11171
11192
|
}) => {
|
|
11172
|
-
const
|
|
11193
|
+
const x = ye(), S = (() => {
|
|
11173
11194
|
if (e !== "single") return 0;
|
|
11174
11195
|
const A = n.findIndex((H) => o.includes(H.id));
|
|
11175
11196
|
return A >= 0 ? A : 0;
|
|
11176
|
-
})(), [T, E] = P(
|
|
11197
|
+
})(), [T, E] = P(S), L = I([]);
|
|
11177
11198
|
X(() => {
|
|
11178
11199
|
g && e === "single" && L.current[T]?.focus();
|
|
11179
11200
|
}, []);
|
|
@@ -11212,12 +11233,12 @@ const z4 = ({
|
|
|
11212
11233
|
n.map((A, H) => /* @__PURE__ */ r(
|
|
11213
11234
|
oe.div,
|
|
11214
11235
|
{
|
|
11215
|
-
initial:
|
|
11236
|
+
initial: x ? !1 : { opacity: 0, y: 4 },
|
|
11216
11237
|
animate: { opacity: 1, y: 0 },
|
|
11217
11238
|
transition: {
|
|
11218
|
-
duration:
|
|
11239
|
+
duration: x ? 0 : 0.2,
|
|
11219
11240
|
ease: [0.4, 0, 0.2, 1],
|
|
11220
|
-
delay:
|
|
11241
|
+
delay: x ? 0 : 0.12 + H * 0.06
|
|
11221
11242
|
},
|
|
11222
11243
|
children: /* @__PURE__ */ r(
|
|
11223
11244
|
Ur,
|
|
@@ -11237,7 +11258,7 @@ const z4 = ({
|
|
|
11237
11258
|
A.id
|
|
11238
11259
|
)),
|
|
11239
11260
|
s && /* @__PURE__ */ r(
|
|
11240
|
-
|
|
11261
|
+
W4,
|
|
11241
11262
|
{
|
|
11242
11263
|
mode: e,
|
|
11243
11264
|
hasSelection: i,
|
|
@@ -11255,7 +11276,7 @@ const z4 = ({
|
|
|
11255
11276
|
]
|
|
11256
11277
|
}
|
|
11257
11278
|
);
|
|
11258
|
-
},
|
|
11279
|
+
}, X4 = ({
|
|
11259
11280
|
question: e,
|
|
11260
11281
|
stepLabel: t,
|
|
11261
11282
|
isFirstStep: n,
|
|
@@ -11314,16 +11335,16 @@ const z4 = ({
|
|
|
11314
11335
|
}
|
|
11315
11336
|
)
|
|
11316
11337
|
] });
|
|
11317
|
-
},
|
|
11338
|
+
}, Y4 = "easeOut", K4 = 0.3, L9 = ({
|
|
11318
11339
|
clarifyingQuestion: e,
|
|
11319
11340
|
isSubmitDisabled: t
|
|
11320
11341
|
}) => /* @__PURE__ */ r(
|
|
11321
|
-
|
|
11342
|
+
Q4,
|
|
11322
11343
|
{
|
|
11323
11344
|
clarifyingQuestion: e,
|
|
11324
11345
|
isSubmitDisabled: t
|
|
11325
11346
|
}
|
|
11326
|
-
),
|
|
11347
|
+
), Q4 = ({
|
|
11327
11348
|
clarifyingQuestion: e,
|
|
11328
11349
|
isSubmitDisabled: t
|
|
11329
11350
|
}) => {
|
|
@@ -11342,21 +11363,21 @@ const z4 = ({
|
|
|
11342
11363
|
} = e, {
|
|
11343
11364
|
question: v,
|
|
11344
11365
|
options: w,
|
|
11345
|
-
selectedOptionIds:
|
|
11346
|
-
selectionMode:
|
|
11366
|
+
selectedOptionIds: x,
|
|
11367
|
+
selectionMode: S,
|
|
11347
11368
|
optional: T,
|
|
11348
11369
|
allowCustomAnswer: E,
|
|
11349
11370
|
customAnswerText: L,
|
|
11350
11371
|
isCustomAnswerActive: b
|
|
11351
|
-
} = s, A = I(null), H =
|
|
11372
|
+
} = s, A = I(null), H = S ?? "single", y = a > 1, R = i === 0, F = i === a - 1, $ = y ? n.t("ai.clarifyingQuestion.stepOf", {
|
|
11352
11373
|
current: String(i + 1),
|
|
11353
11374
|
total: String(a)
|
|
11354
|
-
}) : void 0, _ =
|
|
11375
|
+
}) : void 0, _ = x.length > 0, z = (L ?? "").trim().length > 0, G = _ || b && z || T === !0, re = t === !0 && F, K = () => {
|
|
11355
11376
|
re || l();
|
|
11356
11377
|
}, O = () => {
|
|
11357
11378
|
re || u();
|
|
11358
11379
|
}, Z = (ie) => {
|
|
11359
|
-
const ne = H === "single" &&
|
|
11380
|
+
const ne = H === "single" && x.includes(ie);
|
|
11360
11381
|
d(ie), H === "single" && !F && !ne && Promise.resolve().then(l);
|
|
11361
11382
|
}, D = F ? n.ai.clarifyingQuestion.submit : n.ai.clarifyingQuestion.next, Q = T === !0 && !_ && !(b && z), W = () => {
|
|
11362
11383
|
C(), requestAnimationFrame(() => {
|
|
@@ -11364,7 +11385,7 @@ const z4 = ({
|
|
|
11364
11385
|
});
|
|
11365
11386
|
}, he = (ie) => {
|
|
11366
11387
|
ie.key === "Escape" && (ie.preventDefault(), f());
|
|
11367
|
-
}, ge = o ? 0 :
|
|
11388
|
+
}, ge = o ? 0 : K4 / 2;
|
|
11368
11389
|
return /* @__PURE__ */ c("div", { className: "flex flex-col", onKeyDown: he, children: [
|
|
11369
11390
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-3 pt-3", children: /* @__PURE__ */ r(Ne, { mode: "wait", initial: !1, children: /* @__PURE__ */ c(
|
|
11370
11391
|
oe.div,
|
|
@@ -11373,10 +11394,10 @@ const z4 = ({
|
|
|
11373
11394
|
initial: { opacity: 0 },
|
|
11374
11395
|
animate: { opacity: 1 },
|
|
11375
11396
|
exit: { opacity: 0 },
|
|
11376
|
-
transition: { duration: ge, ease:
|
|
11397
|
+
transition: { duration: ge, ease: Y4 },
|
|
11377
11398
|
children: [
|
|
11378
11399
|
/* @__PURE__ */ r(
|
|
11379
|
-
|
|
11400
|
+
X4,
|
|
11380
11401
|
{
|
|
11381
11402
|
question: v,
|
|
11382
11403
|
stepLabel: $,
|
|
@@ -11389,12 +11410,12 @@ const z4 = ({
|
|
|
11389
11410
|
}
|
|
11390
11411
|
),
|
|
11391
11412
|
/* @__PURE__ */ r(
|
|
11392
|
-
|
|
11413
|
+
q4,
|
|
11393
11414
|
{
|
|
11394
11415
|
mode: H,
|
|
11395
11416
|
question: v,
|
|
11396
11417
|
options: w,
|
|
11397
|
-
selectedOptionIds:
|
|
11418
|
+
selectedOptionIds: x,
|
|
11398
11419
|
allowCustomAnswer: E,
|
|
11399
11420
|
hasSelection: _,
|
|
11400
11421
|
hasCustomText: z,
|
|
@@ -11414,7 +11435,7 @@ const z4 = ({
|
|
|
11414
11435
|
i
|
|
11415
11436
|
) }) }),
|
|
11416
11437
|
/* @__PURE__ */ r(
|
|
11417
|
-
|
|
11438
|
+
G4,
|
|
11418
11439
|
{
|
|
11419
11440
|
canProceed: G,
|
|
11420
11441
|
submitDisabled: re,
|
|
@@ -11427,7 +11448,7 @@ const z4 = ({
|
|
|
11427
11448
|
] });
|
|
11428
11449
|
};
|
|
11429
11450
|
function Q1(e, t, n, o) {
|
|
11430
|
-
const s = Math.max(1, Math.min(e, t)), i = Math.min(n, 20), d = Math.min(i + o, s), l = Math.min(d, Math.floor(e / 2)), u = Math.min(d, Math.floor(t / 2)), f = (W) => W / e * 2 - 1, g = (W) => W / t * 2 - 1, m = 0, h = e, C = 0, v = t, w = l,
|
|
11451
|
+
const s = Math.max(1, Math.min(e, t)), i = Math.min(n, 20), d = Math.min(i + o, s), l = Math.min(d, Math.floor(e / 2)), u = Math.min(d, Math.floor(t / 2)), f = (W) => W / e * 2 - 1, g = (W) => W / t * 2 - 1, m = 0, h = e, C = 0, v = t, w = l, x = e - l, S = u, T = t - u, E = f(m), L = f(h), b = g(C), A = g(v), H = f(w), y = f(x), R = g(S), F = g(T), $ = 0, _ = 0, z = 1, G = 1, re = l / e, K = 1 - l / e, O = u / t, Z = 1 - u / t, D = new Float32Array([
|
|
11431
11452
|
// Top strip
|
|
11432
11453
|
E,
|
|
11433
11454
|
b,
|
|
@@ -11545,7 +11566,7 @@ function J1(e, t, n) {
|
|
|
11545
11566
|
}
|
|
11546
11567
|
return o;
|
|
11547
11568
|
}
|
|
11548
|
-
function
|
|
11569
|
+
function J4(e, t, n) {
|
|
11549
11570
|
const o = J1(e, e.VERTEX_SHADER, t), s = J1(e, e.FRAGMENT_SHADER, n), i = e.createProgram();
|
|
11550
11571
|
if (!i) throw new Error("Failed to create program");
|
|
11551
11572
|
if (e.attachShader(i, o), e.attachShader(i, s), e.linkProgram(i), !e.getProgramParameter(i, e.LINK_STATUS)) {
|
|
@@ -11554,7 +11575,7 @@ function Y4(e, t, n) {
|
|
|
11554
11575
|
}
|
|
11555
11576
|
return e.deleteShader(o), e.deleteShader(s), i;
|
|
11556
11577
|
}
|
|
11557
|
-
const
|
|
11578
|
+
const e6 = `#version 300 es
|
|
11558
11579
|
precision lowp float;
|
|
11559
11580
|
|
|
11560
11581
|
in vec2 vUV;
|
|
@@ -11761,7 +11782,7 @@ void main() {
|
|
|
11761
11782
|
|
|
11762
11783
|
outColor = vec4(color, alpha);
|
|
11763
11784
|
}
|
|
11764
|
-
`,
|
|
11785
|
+
`, t6 = `#version 300 es
|
|
11765
11786
|
|
|
11766
11787
|
in vec2 aPosition;
|
|
11767
11788
|
in vec2 aUV;
|
|
@@ -11770,7 +11791,7 @@ void main() {
|
|
|
11770
11791
|
vUV = aUV;
|
|
11771
11792
|
gl_Position = vec4(aPosition, 0.0, 1.0);
|
|
11772
11793
|
}
|
|
11773
|
-
`,
|
|
11794
|
+
`, r6 = [
|
|
11774
11795
|
"rgb(229, 25, 67)",
|
|
11775
11796
|
// #E51943 red
|
|
11776
11797
|
"rgb(229, 86, 25)",
|
|
@@ -11780,14 +11801,14 @@ void main() {
|
|
|
11780
11801
|
"rgb(161, 173, 229)"
|
|
11781
11802
|
// #A1ADE5 light blue
|
|
11782
11803
|
];
|
|
11783
|
-
function
|
|
11804
|
+
function n6(e) {
|
|
11784
11805
|
const t = e.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
|
|
11785
11806
|
if (!t)
|
|
11786
11807
|
throw new Error(`Invalid color format: ${e}`);
|
|
11787
11808
|
const [, n, o, s] = t;
|
|
11788
11809
|
return [parseInt(n) / 255, parseInt(o) / 255, parseInt(s) / 255];
|
|
11789
11810
|
}
|
|
11790
|
-
class
|
|
11811
|
+
class y9 {
|
|
11791
11812
|
element;
|
|
11792
11813
|
canvas;
|
|
11793
11814
|
options;
|
|
@@ -11863,10 +11884,10 @@ class k9 {
|
|
|
11863
11884
|
s.enableVertexAttribArray(v), s.vertexAttribPointer(v, 2, s.FLOAT, !1, 0, 0), this.checkGLError(s, "resize: after position buffer update"), s.bindBuffer(s.ARRAY_BUFFER, l), s.bufferData(s.ARRAY_BUFFER, C, s.STATIC_DRAW);
|
|
11864
11885
|
const w = s.getAttribLocation(i, "aUV");
|
|
11865
11886
|
s.enableVertexAttribArray(w), s.vertexAttribPointer(w, 2, s.FLOAT, !1, 0, 0), this.checkGLError(s, "resize: after UV buffer update"), s.useProgram(i), s.uniform2f(u, this.canvas.width, this.canvas.height), s.uniform1f(this.glr.uBorderWidth, this.options.borderWidth * f), s.uniform1f(this.glr.uGlowWidth, this.options.glowWidth * f), s.uniform1f(this.glr.uBorderRadius, this.options.borderRadius * f), this.checkGLError(s, "resize: after uniform updates");
|
|
11866
|
-
const
|
|
11867
|
-
this.lastTime =
|
|
11868
|
-
const
|
|
11869
|
-
this.render(
|
|
11887
|
+
const x = performance.now();
|
|
11888
|
+
this.lastTime = x;
|
|
11889
|
+
const S = (x - this.startTime) * 1e-3;
|
|
11890
|
+
this.render(S);
|
|
11870
11891
|
}
|
|
11871
11892
|
/**
|
|
11872
11893
|
* Automatically resizes the canvas to match the dimensions of the given element.
|
|
@@ -11937,7 +11958,7 @@ class k9 {
|
|
|
11937
11958
|
});
|
|
11938
11959
|
if (!t)
|
|
11939
11960
|
throw new Error("WebGL2 is required but not available.");
|
|
11940
|
-
const n =
|
|
11961
|
+
const n = J4(t, t6, e6);
|
|
11941
11962
|
this.checkGLError(t, "setupGL: after createProgram");
|
|
11942
11963
|
const o = t.createVertexArray();
|
|
11943
11964
|
t.bindVertexArray(o), this.checkGLError(t, "setupGL: after VAO creation");
|
|
@@ -11954,9 +11975,9 @@ class k9 {
|
|
|
11954
11975
|
t.bindBuffer(t.ARRAY_BUFFER, f), t.bufferData(t.ARRAY_BUFFER, d, t.STATIC_DRAW);
|
|
11955
11976
|
const g = t.getAttribLocation(n, "aUV");
|
|
11956
11977
|
t.enableVertexAttribArray(g), t.vertexAttribPointer(g, 2, t.FLOAT, !1, 0, 0), this.checkGLError(t, "setupGL: after UV buffer setup");
|
|
11957
|
-
const m = t.getUniformLocation(n, "uResolution"), h = t.getUniformLocation(n, "uTime"), C = t.getUniformLocation(n, "uBorderWidth"), v = t.getUniformLocation(n, "uGlowWidth"), w = t.getUniformLocation(n, "uBorderRadius"),
|
|
11958
|
-
t.useProgram(n), t.uniform1f(C, this.options.borderWidth), t.uniform1f(v, this.options.glowWidth), t.uniform1f(w, this.options.borderRadius), this.options.mode === "dark" ? (t.uniform1f(
|
|
11959
|
-
const E = (this.options.colors ||
|
|
11978
|
+
const m = t.getUniformLocation(n, "uResolution"), h = t.getUniformLocation(n, "uTime"), C = t.getUniformLocation(n, "uBorderWidth"), v = t.getUniformLocation(n, "uGlowWidth"), w = t.getUniformLocation(n, "uBorderRadius"), x = t.getUniformLocation(n, "uColors"), S = t.getUniformLocation(n, "uGlowExponent"), T = t.getUniformLocation(n, "uGlowFactor");
|
|
11979
|
+
t.useProgram(n), t.uniform1f(C, this.options.borderWidth), t.uniform1f(v, this.options.glowWidth), t.uniform1f(w, this.options.borderRadius), this.options.mode === "dark" ? (t.uniform1f(S, 2), t.uniform1f(T, 1.8)) : (t.uniform1f(S, 1), t.uniform1f(T, 1));
|
|
11980
|
+
const E = (this.options.colors || r6).map(n6);
|
|
11960
11981
|
for (let L = 0; L < E.length; L++)
|
|
11961
11982
|
t.uniform3f(
|
|
11962
11983
|
t.getUniformLocation(n, `uColors[${L}]`),
|
|
@@ -11973,7 +11994,7 @@ class k9 {
|
|
|
11973
11994
|
uBorderWidth: C,
|
|
11974
11995
|
uGlowWidth: v,
|
|
11975
11996
|
uBorderRadius: w,
|
|
11976
|
-
uColors:
|
|
11997
|
+
uColors: x
|
|
11977
11998
|
};
|
|
11978
11999
|
}
|
|
11979
12000
|
render(t) {
|
|
@@ -11982,30 +12003,30 @@ class k9 {
|
|
|
11982
12003
|
n.useProgram(o), n.bindVertexArray(s), n.uniform1f(i, t), n.disable(n.DEPTH_TEST), n.disable(n.CULL_FACE), n.disable(n.BLEND), n.clearColor(0, 0, 0, 0), n.clear(n.COLOR_BUFFER_BIT), n.drawArrays(n.TRIANGLES, 0, 24), this.checkGLError(n, "render: after draw call"), n.bindVertexArray(null);
|
|
11983
12004
|
}
|
|
11984
12005
|
}
|
|
11985
|
-
const et = ["lowp", "mediump", "highp"],
|
|
12006
|
+
const et = ["lowp", "mediump", "highp"], o6 = `
|
|
11986
12007
|
void main(void){
|
|
11987
12008
|
vec4 color = vec4(0.0,0.0,0.0,1.0);
|
|
11988
12009
|
mainImage( color, gl_FragCoord.xy );
|
|
11989
12010
|
gl_FragColor = color;
|
|
11990
|
-
}`,
|
|
12011
|
+
}`, s6 = `void mainImage( out vec4 fragColor, in vec2 fragCoord ) {
|
|
11991
12012
|
vec2 uv = fragCoord/iResolution.xy;
|
|
11992
12013
|
vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4));
|
|
11993
12014
|
fragColor = vec4(col,1.0);
|
|
11994
12015
|
}`, tt = `attribute vec3 aVertexPosition;
|
|
11995
12016
|
void main(void) {
|
|
11996
12017
|
gl_Position = vec4(aVertexPosition, 1.0);
|
|
11997
|
-
}`, rt = "iTime", nt = "iTimeDelta", ot = "iDate", st = "iFrame", it = "iMouse", at = "iResolution",
|
|
11998
|
-
function
|
|
12018
|
+
}`, rt = "iTime", nt = "iTimeDelta", ot = "iDate", st = "iFrame", it = "iMouse", at = "iResolution", i6 = "iChannel", ct = "iChannelResolution", lt = "iDeviceOrientation";
|
|
12019
|
+
function a6(e, t) {
|
|
11999
12020
|
return e.includes("Matrix") && Array.isArray(t);
|
|
12000
12021
|
}
|
|
12001
|
-
function
|
|
12022
|
+
function c6(e, t) {
|
|
12002
12023
|
return e.includes("v") && Array.isArray(t) && t.length > Number.parseInt(e.charAt(0));
|
|
12003
12024
|
}
|
|
12004
|
-
function
|
|
12025
|
+
function l6(e, t) {
|
|
12005
12026
|
return !e.includes("v") && Array.isArray(t) && t.length > Number.parseInt(e.charAt(0));
|
|
12006
12027
|
}
|
|
12007
|
-
const
|
|
12008
|
-
if (
|
|
12028
|
+
const d6 = (e, t, n, o) => {
|
|
12029
|
+
if (l6(n, o))
|
|
12009
12030
|
switch (n) {
|
|
12010
12031
|
case "2f":
|
|
12011
12032
|
return e.uniform2f(t, o[0], o[1]);
|
|
@@ -12046,7 +12067,7 @@ const a6 = (e, t, n, o) => {
|
|
|
12046
12067
|
case "Matrix4fv":
|
|
12047
12068
|
return e.uniformMatrix4fv(t, !1, o);
|
|
12048
12069
|
}
|
|
12049
|
-
},
|
|
12070
|
+
}, f6 = (e) => {
|
|
12050
12071
|
switch (e) {
|
|
12051
12072
|
case "1f":
|
|
12052
12073
|
return "float";
|
|
@@ -12093,8 +12114,8 @@ const a6 = (e, t, n, o) => {
|
|
|
12093
12114
|
)
|
|
12094
12115
|
);
|
|
12095
12116
|
}
|
|
12096
|
-
}, d1 = 9729, dt = 9728,
|
|
12097
|
-
class
|
|
12117
|
+
}, d1 = 9729, dt = 9728, u6 = 9987, ft = 33071, ut = 10497;
|
|
12118
|
+
class h6 {
|
|
12098
12119
|
gl;
|
|
12099
12120
|
url;
|
|
12100
12121
|
wrapS;
|
|
@@ -12182,7 +12203,7 @@ class d6 {
|
|
|
12182
12203
|
)
|
|
12183
12204
|
);
|
|
12184
12205
|
Object.assign(this, { url: o, wrapS: s, wrapT: i, minFilter: a, magFilter: d, flipY: l });
|
|
12185
|
-
const g = 0, m = n.RGBA, h = 1, C = 1, v = 0, w = n.RGBA,
|
|
12206
|
+
const g = 0, m = n.RGBA, h = 1, C = 1, v = 0, w = n.RGBA, x = n.UNSIGNED_BYTE, S = new Uint8Array([255, 255, 255, 0]), T = n.createTexture();
|
|
12186
12207
|
if (n.bindTexture(n.TEXTURE_2D, T), n.texImage2D(
|
|
12187
12208
|
n.TEXTURE_2D,
|
|
12188
12209
|
g,
|
|
@@ -12191,8 +12212,8 @@ class d6 {
|
|
|
12191
12212
|
C,
|
|
12192
12213
|
v,
|
|
12193
12214
|
w,
|
|
12194
|
-
|
|
12195
|
-
|
|
12215
|
+
x,
|
|
12216
|
+
S
|
|
12196
12217
|
), f) {
|
|
12197
12218
|
const A = this.setupVideo(o);
|
|
12198
12219
|
return n.texParameteri(n.TEXTURE_2D, n.TEXTURE_WRAP_S, n.CLAMP_TO_EDGE), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_WRAP_T, n.CLAMP_TO_EDGE), n.texParameteri(n.TEXTURE_2D, n.TEXTURE_MIN_FILTER, n.LINEAR), this._webglTexture = T, this.source = A, this.isVideo = !0, A.play().then(() => this);
|
|
@@ -12213,7 +12234,7 @@ class d6 {
|
|
|
12213
12234
|
g,
|
|
12214
12235
|
m,
|
|
12215
12236
|
w,
|
|
12216
|
-
|
|
12237
|
+
x,
|
|
12217
12238
|
L
|
|
12218
12239
|
), b && t.minFilter !== dt && t.minFilter !== d1 && n.generateMipmap(n.TEXTURE_2D), n.texParameteri(
|
|
12219
12240
|
n.TEXTURE_2D,
|
|
@@ -12226,7 +12247,7 @@ class d6 {
|
|
|
12226
12247
|
), n.texParameteri(
|
|
12227
12248
|
n.TEXTURE_2D,
|
|
12228
12249
|
n.TEXTURE_MIN_FILTER,
|
|
12229
|
-
this.minFilter ||
|
|
12250
|
+
this.minFilter || u6
|
|
12230
12251
|
), n.texParameteri(
|
|
12231
12252
|
n.TEXTURE_2D,
|
|
12232
12253
|
n.TEXTURE_MAG_FILTER,
|
|
@@ -12240,8 +12261,8 @@ const be = (e) => `react-shaders: ${e}`, ht = (e) => {
|
|
|
12240
12261
|
return [t?.clientX ?? 0, t?.clientY ?? 0];
|
|
12241
12262
|
}
|
|
12242
12263
|
return [e.clientX, e.clientY];
|
|
12243
|
-
}, gt = (e, t, n) => e * (1 - n) + t * n,
|
|
12244
|
-
function
|
|
12264
|
+
}, gt = (e, t, n) => e * (1 - n) + t * n, g6 = (e, t, n) => n > 0 ? e.substring(0, n) + t + e.substring(n, e.length) : t + e;
|
|
12265
|
+
function p6({
|
|
12245
12266
|
fs: e,
|
|
12246
12267
|
vs: t = tt,
|
|
12247
12268
|
textures: n = [],
|
|
@@ -12256,7 +12277,7 @@ function u6({
|
|
|
12256
12277
|
onError: g = console.error,
|
|
12257
12278
|
onWarning: m = console.warn
|
|
12258
12279
|
}) {
|
|
12259
|
-
const h = I(null), C = I(null), v = I(null), w = I(null),
|
|
12280
|
+
const h = I(null), C = I(null), v = I(null), w = I(null), x = I(void 0), S = I(void 0), T = I(!1), E = I(void 0), L = I(0), b = I([0, 0]), A = I([]), H = I(0), y = I(void 0), R = I({
|
|
12260
12281
|
[rt]: { type: "float", isNeeded: !1, value: 0 },
|
|
12261
12282
|
[nt]: { type: "float", isNeeded: !1, value: 0 },
|
|
12262
12283
|
[ot]: { type: "vec4", isNeeded: !1, value: [0, 0, 0, 0] },
|
|
@@ -12268,11 +12289,11 @@ function u6({
|
|
|
12268
12289
|
isNeeded: !1,
|
|
12269
12290
|
value: [0, 0, 0, 0]
|
|
12270
12291
|
}
|
|
12271
|
-
}), F = I(o), $ = (M,
|
|
12292
|
+
}), F = I(o), $ = (M, V) => {
|
|
12272
12293
|
const N = "width" in M ? M.width ?? 0 : 0, j = "height" in M ? M.height ?? 0 : 0, B = R.current.iChannelResolution;
|
|
12273
12294
|
if (!B) return;
|
|
12274
12295
|
const U = Array.isArray(B.value) ? B.value : B.value = [];
|
|
12275
|
-
U[
|
|
12296
|
+
U[V * 3] = N * u, U[V * 3 + 1] = j * u, U[V * 3 + 2] = 0;
|
|
12276
12297
|
}, _ = () => {
|
|
12277
12298
|
h.current && (C.current = h.current.getContext("webgl", d) || h.current.getContext(
|
|
12278
12299
|
"experimental-webgl",
|
|
@@ -12281,7 +12302,7 @@ function u6({
|
|
|
12281
12302
|
}, z = () => {
|
|
12282
12303
|
const M = C.current;
|
|
12283
12304
|
v.current = M?.createBuffer() ?? null, M?.bindBuffer(M.ARRAY_BUFFER, v.current);
|
|
12284
|
-
const
|
|
12305
|
+
const V = [
|
|
12285
12306
|
1,
|
|
12286
12307
|
1,
|
|
12287
12308
|
0,
|
|
@@ -12295,26 +12316,26 @@ function u6({
|
|
|
12295
12316
|
-1,
|
|
12296
12317
|
0
|
|
12297
12318
|
];
|
|
12298
|
-
M?.bufferData(M.ARRAY_BUFFER, new Float32Array(
|
|
12319
|
+
M?.bufferData(M.ARRAY_BUFFER, new Float32Array(V), M.STATIC_DRAW);
|
|
12299
12320
|
}, G = ({
|
|
12300
12321
|
alpha: M,
|
|
12301
|
-
beta:
|
|
12322
|
+
beta: V,
|
|
12302
12323
|
gamma: N
|
|
12303
12324
|
}) => {
|
|
12304
12325
|
R.current.iDeviceOrientation.value = [
|
|
12305
12326
|
M ?? 0,
|
|
12306
|
-
|
|
12327
|
+
V ?? 0,
|
|
12307
12328
|
N ?? 0,
|
|
12308
12329
|
window.orientation ?? 0
|
|
12309
12330
|
];
|
|
12310
12331
|
}, re = (M) => {
|
|
12311
|
-
const [
|
|
12332
|
+
const [V = 0, N = 0] = ht(M), j = V - (E.current?.left ?? 0) - window.pageXOffset, B = (E.current?.height ?? 0) - N - (E.current?.top ?? 0) - window.pageYOffset;
|
|
12312
12333
|
T.current = !0;
|
|
12313
12334
|
const U = Array.isArray(R.current.iMouse?.value) ? R.current.iMouse.value : void 0;
|
|
12314
12335
|
U && (U[2] = j, U[3] = B), b.current[0] = j, b.current[1] = B;
|
|
12315
12336
|
}, K = (M) => {
|
|
12316
12337
|
E.current = h.current?.getBoundingClientRect();
|
|
12317
|
-
const [
|
|
12338
|
+
const [V = 0, N = 0] = ht(M), j = V - (E.current?.left ?? 0), B = (E.current?.height ?? 0) - N - (E.current?.top ?? 0);
|
|
12318
12339
|
if (l !== 1)
|
|
12319
12340
|
b.current[0] = j, b.current[1] = B;
|
|
12320
12341
|
else {
|
|
@@ -12328,10 +12349,10 @@ function u6({
|
|
|
12328
12349
|
const M = C.current;
|
|
12329
12350
|
if (!M) return;
|
|
12330
12351
|
E.current = h.current?.getBoundingClientRect();
|
|
12331
|
-
const
|
|
12332
|
-
(E.current?.width ?? 1) *
|
|
12352
|
+
const V = u, N = Math.floor(
|
|
12353
|
+
(E.current?.width ?? 1) * V
|
|
12333
12354
|
), j = Math.floor(
|
|
12334
|
-
(E.current?.height ?? 1) *
|
|
12355
|
+
(E.current?.height ?? 1) * V
|
|
12335
12356
|
);
|
|
12336
12357
|
if (M.canvas.width = N, M.canvas.height = j, R.current.iResolution?.isNeeded && w.current) {
|
|
12337
12358
|
const B = M.getUniformLocation(
|
|
@@ -12340,22 +12361,22 @@ function u6({
|
|
|
12340
12361
|
);
|
|
12341
12362
|
M.uniform2fv(B, [M.canvas.width, M.canvas.height]);
|
|
12342
12363
|
}
|
|
12343
|
-
}, D = (M,
|
|
12364
|
+
}, D = (M, V) => {
|
|
12344
12365
|
const N = C.current;
|
|
12345
12366
|
if (!N) return null;
|
|
12346
12367
|
const j = N.createShader(M);
|
|
12347
12368
|
if (!j) return null;
|
|
12348
|
-
if (N.shaderSource(j,
|
|
12369
|
+
if (N.shaderSource(j, V), N.compileShader(j), !N.getShaderParameter(j, N.COMPILE_STATUS)) {
|
|
12349
12370
|
m?.(be(`Error compiling the shader:
|
|
12350
|
-
${
|
|
12371
|
+
${V}`));
|
|
12351
12372
|
const B = N.getShaderInfoLog(j);
|
|
12352
12373
|
N.deleteShader(j), g?.(be(`Shader compiler log: ${B}`));
|
|
12353
12374
|
}
|
|
12354
12375
|
return j;
|
|
12355
|
-
}, Q = (M,
|
|
12376
|
+
}, Q = (M, V) => {
|
|
12356
12377
|
const N = C.current;
|
|
12357
12378
|
if (!N) return;
|
|
12358
|
-
const j = D(N.FRAGMENT_SHADER, M), B = D(N.VERTEX_SHADER,
|
|
12379
|
+
const j = D(N.FRAGMENT_SHADER, M), B = D(N.VERTEX_SHADER, V);
|
|
12359
12380
|
if (w.current = N.createProgram(), !(!w.current || !B || !j)) {
|
|
12360
12381
|
if (N.attachShader(w.current, B), N.attachShader(w.current, j), N.linkProgram(w.current), !N.getProgramParameter(w.current, N.LINK_STATUS)) {
|
|
12361
12382
|
g?.(
|
|
@@ -12367,23 +12388,23 @@ ${S}`));
|
|
|
12367
12388
|
);
|
|
12368
12389
|
return;
|
|
12369
12390
|
}
|
|
12370
|
-
N.useProgram(w.current),
|
|
12391
|
+
N.useProgram(w.current), x.current = N.getAttribLocation(
|
|
12371
12392
|
w.current,
|
|
12372
12393
|
"aVertexPosition"
|
|
12373
|
-
), N.enableVertexAttribArray(
|
|
12394
|
+
), N.enableVertexAttribArray(x.current);
|
|
12374
12395
|
}
|
|
12375
12396
|
}, W = () => {
|
|
12376
12397
|
if (o)
|
|
12377
12398
|
for (const M of Object.keys(o)) {
|
|
12378
|
-
const
|
|
12379
|
-
if (!
|
|
12380
|
-
const { value: N, type: j } =
|
|
12399
|
+
const V = o[M];
|
|
12400
|
+
if (!V) continue;
|
|
12401
|
+
const { value: N, type: j } = V, B = f6(j);
|
|
12381
12402
|
if (!B) continue;
|
|
12382
12403
|
const U = {};
|
|
12383
|
-
if (
|
|
12404
|
+
if (a6(j, N)) {
|
|
12384
12405
|
const ae = j.length, J = Number.parseInt(j.charAt(ae - 3)), we = Math.floor(N.length / (J * J));
|
|
12385
12406
|
N.length > J * J && (U.arraySize = `[${we}]`);
|
|
12386
|
-
} else
|
|
12407
|
+
} else c6(j, N) && (U.arraySize = `[${Math.floor(N.length / Number.parseInt(j.charAt(0)))}]`);
|
|
12387
12408
|
R.current[M] = {
|
|
12388
12409
|
type: B,
|
|
12389
12410
|
isNeeded: !1,
|
|
@@ -12401,24 +12422,24 @@ ${S}`));
|
|
|
12401
12422
|
arraySize: `[${n.length}]`,
|
|
12402
12423
|
value: []
|
|
12403
12424
|
};
|
|
12404
|
-
const
|
|
12405
|
-
(N, j) => (R.current[`${
|
|
12425
|
+
const V = n.map(
|
|
12426
|
+
(N, j) => (R.current[`${i6}${j}`] = {
|
|
12406
12427
|
type: "sampler2D",
|
|
12407
12428
|
isNeeded: !1
|
|
12408
|
-
}, $(N, j), A.current[j] = new
|
|
12429
|
+
}, $(N, j), A.current[j] = new h6(M), A.current[j]?.load(N).then((B) => {
|
|
12409
12430
|
$(B, j);
|
|
12410
12431
|
}))
|
|
12411
12432
|
);
|
|
12412
|
-
Promise.all(
|
|
12433
|
+
Promise.all(V).then(() => {
|
|
12413
12434
|
f && f();
|
|
12414
12435
|
}).catch((N) => {
|
|
12415
12436
|
g?.(N), f && f();
|
|
12416
12437
|
});
|
|
12417
12438
|
} else f && f();
|
|
12418
12439
|
}, ge = (M) => {
|
|
12419
|
-
const
|
|
12440
|
+
const V = et.includes(i ?? "highp"), N = `precision ${V ? i : et[1]} float;
|
|
12420
12441
|
`;
|
|
12421
|
-
|
|
12442
|
+
V || m?.(
|
|
12422
12443
|
be(
|
|
12423
12444
|
`wrong precision type ${i}, please make sure to pass one of a valid precision lowp, mediump, highp, by default you shader precision will be set to highp.`
|
|
12424
12445
|
)
|
|
@@ -12429,17 +12450,17 @@ ${S}`));
|
|
|
12429
12450
|
if (M.includes(U)) {
|
|
12430
12451
|
const ae = R.current[U];
|
|
12431
12452
|
if (!ae) continue;
|
|
12432
|
-
j =
|
|
12453
|
+
j = g6(
|
|
12433
12454
|
j,
|
|
12434
12455
|
`uniform ${ae.type} ${U}${ae.arraySize || ""};
|
|
12435
12456
|
`,
|
|
12436
12457
|
j.lastIndexOf(N) + N.length
|
|
12437
12458
|
), ae.isNeeded = !0;
|
|
12438
12459
|
}
|
|
12439
|
-
return M.includes("mainImage") && (j = j.concat(
|
|
12460
|
+
return M.includes("mainImage") && (j = j.concat(o6)), j;
|
|
12440
12461
|
}, ie = (M) => {
|
|
12441
|
-
const
|
|
12442
|
-
if (!
|
|
12462
|
+
const V = C.current;
|
|
12463
|
+
if (!V || !w.current) return;
|
|
12443
12464
|
const N = H.current ? (M - H.current) / 1e3 : 0;
|
|
12444
12465
|
H.current = M;
|
|
12445
12466
|
const j = F.current;
|
|
@@ -12448,13 +12469,13 @@ ${S}`));
|
|
|
12448
12469
|
const U = j[B];
|
|
12449
12470
|
if (U && R.current[B]?.isNeeded) {
|
|
12450
12471
|
if (!w.current) return;
|
|
12451
|
-
const ae =
|
|
12472
|
+
const ae = V.getUniformLocation(
|
|
12452
12473
|
w.current,
|
|
12453
12474
|
B
|
|
12454
12475
|
);
|
|
12455
12476
|
if (!ae) return;
|
|
12456
|
-
|
|
12457
|
-
|
|
12477
|
+
d6(
|
|
12478
|
+
V,
|
|
12458
12479
|
ae,
|
|
12459
12480
|
U.type,
|
|
12460
12481
|
U.value
|
|
@@ -12462,59 +12483,59 @@ ${S}`));
|
|
|
12462
12483
|
}
|
|
12463
12484
|
}
|
|
12464
12485
|
if (R.current.iMouse?.isNeeded) {
|
|
12465
|
-
const B =
|
|
12486
|
+
const B = V.getUniformLocation(
|
|
12466
12487
|
w.current,
|
|
12467
12488
|
it
|
|
12468
12489
|
);
|
|
12469
|
-
|
|
12490
|
+
V.uniform4fv(B, R.current.iMouse.value);
|
|
12470
12491
|
}
|
|
12471
12492
|
if (R.current.iChannelResolution?.isNeeded) {
|
|
12472
|
-
const B =
|
|
12493
|
+
const B = V.getUniformLocation(
|
|
12473
12494
|
w.current,
|
|
12474
12495
|
ct
|
|
12475
12496
|
);
|
|
12476
|
-
|
|
12497
|
+
V.uniform3fv(
|
|
12477
12498
|
B,
|
|
12478
12499
|
R.current.iChannelResolution.value
|
|
12479
12500
|
);
|
|
12480
12501
|
}
|
|
12481
12502
|
if (R.current.iDeviceOrientation?.isNeeded) {
|
|
12482
|
-
const B =
|
|
12503
|
+
const B = V.getUniformLocation(
|
|
12483
12504
|
w.current,
|
|
12484
12505
|
lt
|
|
12485
12506
|
);
|
|
12486
|
-
|
|
12507
|
+
V.uniform4fv(
|
|
12487
12508
|
B,
|
|
12488
12509
|
R.current.iDeviceOrientation.value
|
|
12489
12510
|
);
|
|
12490
12511
|
}
|
|
12491
12512
|
if (R.current.iTime?.isNeeded) {
|
|
12492
|
-
const B =
|
|
12513
|
+
const B = V.getUniformLocation(
|
|
12493
12514
|
w.current,
|
|
12494
12515
|
rt
|
|
12495
12516
|
);
|
|
12496
|
-
|
|
12517
|
+
V.uniform1f(B, L.current += N);
|
|
12497
12518
|
}
|
|
12498
12519
|
if (R.current.iTimeDelta?.isNeeded) {
|
|
12499
|
-
const B =
|
|
12520
|
+
const B = V.getUniformLocation(
|
|
12500
12521
|
w.current,
|
|
12501
12522
|
nt
|
|
12502
12523
|
);
|
|
12503
|
-
|
|
12524
|
+
V.uniform1f(B, N);
|
|
12504
12525
|
}
|
|
12505
12526
|
if (R.current.iDate?.isNeeded) {
|
|
12506
|
-
const B = /* @__PURE__ */ new Date(), U = B.getMonth() + 1, ae = B.getDate(), J = B.getFullYear(), we = B.getHours() * 60 * 60 + B.getMinutes() * 60 + B.getSeconds() + B.getMilliseconds() * 1e-3, Ee =
|
|
12527
|
+
const B = /* @__PURE__ */ new Date(), U = B.getMonth() + 1, ae = B.getDate(), J = B.getFullYear(), we = B.getHours() * 60 * 60 + B.getMinutes() * 60 + B.getSeconds() + B.getMilliseconds() * 1e-3, Ee = V.getUniformLocation(
|
|
12507
12528
|
w.current,
|
|
12508
12529
|
ot
|
|
12509
12530
|
);
|
|
12510
|
-
|
|
12531
|
+
V.uniform4fv(Ee, [J, U, ae, we]);
|
|
12511
12532
|
}
|
|
12512
12533
|
if (R.current.iFrame?.isNeeded) {
|
|
12513
|
-
const B =
|
|
12534
|
+
const B = V.getUniformLocation(
|
|
12514
12535
|
w.current,
|
|
12515
12536
|
st
|
|
12516
12537
|
), U = R.current.iFrame.value;
|
|
12517
|
-
|
|
12538
|
+
V.uniform1i(B, U), R.current.iFrame.value = U + 1;
|
|
12518
12539
|
}
|
|
12519
12540
|
if (A.current.length > 0)
|
|
12520
12541
|
for (let B = 0; B < A.current.length; B++) {
|
|
@@ -12524,11 +12545,11 @@ ${S}`));
|
|
|
12524
12545
|
if (!Te || !J || !we) return;
|
|
12525
12546
|
if (R.current[`iChannel${B}`]?.isNeeded) {
|
|
12526
12547
|
if (!w.current) return;
|
|
12527
|
-
const Ce =
|
|
12548
|
+
const Ce = V.getUniformLocation(
|
|
12528
12549
|
w.current,
|
|
12529
12550
|
`iChannel${B}`
|
|
12530
12551
|
);
|
|
12531
|
-
|
|
12552
|
+
V.activeTexture(V.TEXTURE0 + B), V.bindTexture(V.TEXTURE_2D, J), V.uniform1i(Ce, B), ae && U.updateTexture(
|
|
12532
12553
|
J,
|
|
12533
12554
|
we,
|
|
12534
12555
|
Ee
|
|
@@ -12536,22 +12557,22 @@ ${S}`));
|
|
|
12536
12557
|
}
|
|
12537
12558
|
}
|
|
12538
12559
|
}, ne = (M) => {
|
|
12539
|
-
const
|
|
12540
|
-
if (!
|
|
12541
|
-
|
|
12542
|
-
|
|
12560
|
+
const V = C.current;
|
|
12561
|
+
if (!V) return;
|
|
12562
|
+
V.viewport(0, 0, V.drawingBufferWidth, V.drawingBufferHeight), V.clear(V.COLOR_BUFFER_BIT | V.DEPTH_BUFFER_BIT), V.bindBuffer(V.ARRAY_BUFFER, v.current), V.vertexAttribPointer(
|
|
12563
|
+
x.current ?? 0,
|
|
12543
12564
|
3,
|
|
12544
|
-
|
|
12565
|
+
V.FLOAT,
|
|
12545
12566
|
!1,
|
|
12546
12567
|
0,
|
|
12547
12568
|
0
|
|
12548
|
-
), ie(M),
|
|
12569
|
+
), ie(M), V.drawArrays(V.TRIANGLE_STRIP, 0, 4);
|
|
12549
12570
|
const N = R.current.iMouse?.value;
|
|
12550
12571
|
if (R.current.iMouse?.isNeeded && l !== 1 && Array.isArray(N)) {
|
|
12551
12572
|
const j = N[0] ?? 0, B = N[1] ?? 0;
|
|
12552
12573
|
N[0] = gt(j, b.current[0] ?? 0, l), N[1] = gt(B, b.current[1] ?? 0, l);
|
|
12553
12574
|
}
|
|
12554
|
-
|
|
12575
|
+
S.current = requestAnimationFrame(ne);
|
|
12555
12576
|
}, se = () => {
|
|
12556
12577
|
const M = { passive: !0 };
|
|
12557
12578
|
R.current.iMouse?.isNeeded && h.current && (h.current.addEventListener("mousemove", K, M), h.current.addEventListener("mouseout", O, M), h.current.addEventListener("mouseup", O, M), h.current.addEventListener("mousedown", re, M), h.current.addEventListener("touchmove", K, M), h.current.addEventListener("touchend", O, M), h.current.addEventListener("touchstart", re, M)), R.current.iDeviceOrientation?.isNeeded && window.addEventListener(
|
|
@@ -12571,12 +12592,12 @@ ${S}`));
|
|
|
12571
12592
|
F.current = o;
|
|
12572
12593
|
}, [o]), X(() => {
|
|
12573
12594
|
const M = A.current;
|
|
12574
|
-
function
|
|
12595
|
+
function V() {
|
|
12575
12596
|
_();
|
|
12576
12597
|
const N = C.current;
|
|
12577
|
-
N && h.current && (N.clearColor(...s), N.clearDepth(1), N.enable(N.DEPTH_TEST), N.depthFunc(N.LEQUAL), N.viewport(0, 0, h.current.width, h.current.height), h.current.height = h.current.clientHeight, h.current.width = h.current.clientWidth, W(), he(), Q(ge(e ||
|
|
12598
|
+
N && h.current && (N.clearColor(...s), N.clearDepth(1), N.enable(N.DEPTH_TEST), N.depthFunc(N.LEQUAL), N.viewport(0, 0, h.current.width, h.current.height), h.current.height = h.current.clientHeight, h.current.width = h.current.clientWidth, W(), he(), Q(ge(e || s6), t || tt), z(), requestAnimationFrame(ne), se(), Z());
|
|
12578
12599
|
}
|
|
12579
|
-
return requestAnimationFrame(
|
|
12600
|
+
return requestAnimationFrame(V), () => {
|
|
12580
12601
|
const N = C.current;
|
|
12581
12602
|
if (N) {
|
|
12582
12603
|
if (N.getExtension("WEBGL_lose_context")?.loseContext(), N.useProgram(null), N.deleteProgram(w.current ?? null), M.length > 0)
|
|
@@ -12584,7 +12605,7 @@ ${S}`));
|
|
|
12584
12605
|
N.deleteTexture(j._webglTexture);
|
|
12585
12606
|
w.current = null;
|
|
12586
12607
|
}
|
|
12587
|
-
de(), cancelAnimationFrame(
|
|
12608
|
+
de(), cancelAnimationFrame(S.current ?? 0);
|
|
12588
12609
|
};
|
|
12589
12610
|
}, []), /* @__PURE__ */ r(
|
|
12590
12611
|
"canvas",
|
|
@@ -12594,7 +12615,7 @@ ${S}`));
|
|
|
12594
12615
|
}
|
|
12595
12616
|
);
|
|
12596
12617
|
}
|
|
12597
|
-
const
|
|
12618
|
+
const m6 = `
|
|
12598
12619
|
const float TAU = 6.283185;
|
|
12599
12620
|
|
|
12600
12621
|
// Noise for dithering
|
|
@@ -12761,7 +12782,7 @@ void mainImage(out vec4 fragColor, in vec2 fragCoord) {
|
|
|
12761
12782
|
float alpha = mappedBrightness * clamp(uMix, 1.0, 2.0);
|
|
12762
12783
|
fragColor = vec4(color, alpha);
|
|
12763
12784
|
}
|
|
12764
|
-
}`,
|
|
12785
|
+
}`, C6 = 10, v6 = 2, w6 = 0.5, x6 = 0.2, k6 = 1.5, ve = {
|
|
12765
12786
|
duration: 0.5,
|
|
12766
12787
|
ease: "easeOut"
|
|
12767
12788
|
}, pt = {
|
|
@@ -12781,12 +12802,12 @@ function ze(e) {
|
|
|
12781
12802
|
);
|
|
12782
12803
|
return { value: t, motionValue: o, controls: s, animate: i };
|
|
12783
12804
|
}
|
|
12784
|
-
function
|
|
12785
|
-
const [n, o] = P(
|
|
12805
|
+
function b6(e, t) {
|
|
12806
|
+
const [n, o] = P(C6), {
|
|
12786
12807
|
value: s,
|
|
12787
12808
|
animate: i,
|
|
12788
12809
|
motionValue: a
|
|
12789
|
-
} = ze(
|
|
12810
|
+
} = ze(x6), { value: d, animate: l } = ze(v6), { value: u, animate: f } = ze(w6), { value: g, animate: m } = ze(k6), h = Qs(t, {
|
|
12790
12811
|
fftSize: 512,
|
|
12791
12812
|
smoothingTimeConstant: 0.55
|
|
12792
12813
|
});
|
|
@@ -12834,7 +12855,7 @@ function w6(e, t) {
|
|
|
12834
12855
|
brightness: g
|
|
12835
12856
|
};
|
|
12836
12857
|
}
|
|
12837
|
-
const
|
|
12858
|
+
const L6 = Fe({
|
|
12838
12859
|
base: "aspect-square",
|
|
12839
12860
|
variants: {
|
|
12840
12861
|
size: {
|
|
@@ -12849,7 +12870,7 @@ const x6 = Fe({
|
|
|
12849
12870
|
size: "lg"
|
|
12850
12871
|
}
|
|
12851
12872
|
});
|
|
12852
|
-
function
|
|
12873
|
+
function y6(e) {
|
|
12853
12874
|
const t = e.match(
|
|
12854
12875
|
/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
12855
12876
|
);
|
|
@@ -12873,11 +12894,11 @@ function zr({
|
|
|
12873
12894
|
className: g,
|
|
12874
12895
|
...m
|
|
12875
12896
|
}) {
|
|
12876
|
-
const h = ee(() =>
|
|
12897
|
+
const h = ee(() => y6(a), [a]);
|
|
12877
12898
|
return /* @__PURE__ */ r("div", { ref: f, className: g, ...m, children: /* @__PURE__ */ r(
|
|
12878
|
-
|
|
12899
|
+
p6,
|
|
12879
12900
|
{
|
|
12880
|
-
fs:
|
|
12901
|
+
fs: m6,
|
|
12881
12902
|
devicePixelRatio: globalThis.devicePixelRatio ?? 1,
|
|
12882
12903
|
uniforms: {
|
|
12883
12904
|
// Aurora wave speed
|
|
@@ -12920,7 +12941,7 @@ function zr({
|
|
|
12920
12941
|
) });
|
|
12921
12942
|
}
|
|
12922
12943
|
zr.displayName = "AuraShader";
|
|
12923
|
-
function
|
|
12944
|
+
function M9({
|
|
12924
12945
|
size: e = "lg",
|
|
12925
12946
|
state: t,
|
|
12926
12947
|
color: n,
|
|
@@ -12931,7 +12952,7 @@ function b9({
|
|
|
12931
12952
|
ref: d,
|
|
12932
12953
|
...l
|
|
12933
12954
|
}) {
|
|
12934
|
-
const { speed: u, scale: f, amplitude: g, frequency: m, brightness: h } =
|
|
12955
|
+
const { speed: u, scale: f, amplitude: g, frequency: m, brightness: h } = b6(t, s);
|
|
12935
12956
|
return /* @__PURE__ */ r(
|
|
12936
12957
|
zr,
|
|
12937
12958
|
{
|
|
@@ -12945,8 +12966,8 @@ function b9({
|
|
|
12945
12966
|
amplitude: g,
|
|
12946
12967
|
frequency: m,
|
|
12947
12968
|
brightness: h,
|
|
12948
|
-
className:
|
|
12949
|
-
|
|
12969
|
+
className: k(
|
|
12970
|
+
L6({ size: e }),
|
|
12950
12971
|
"overflow-hidden rounded-full",
|
|
12951
12972
|
a
|
|
12952
12973
|
),
|
|
@@ -12954,7 +12975,7 @@ function b9({
|
|
|
12954
12975
|
}
|
|
12955
12976
|
);
|
|
12956
12977
|
}
|
|
12957
|
-
const
|
|
12978
|
+
const E9 = ({
|
|
12958
12979
|
text: e,
|
|
12959
12980
|
description: t,
|
|
12960
12981
|
avatar: n,
|
|
@@ -12964,7 +12985,7 @@ const L9 = ({
|
|
|
12964
12985
|
onCancel: a,
|
|
12965
12986
|
stackAt: d = "sm"
|
|
12966
12987
|
}) => /* @__PURE__ */ r(
|
|
12967
|
-
|
|
12988
|
+
p2,
|
|
12968
12989
|
{
|
|
12969
12990
|
title: e,
|
|
12970
12991
|
description: t,
|
|
@@ -12979,7 +13000,7 @@ const L9 = ({
|
|
|
12979
13000
|
onClick: a
|
|
12980
13001
|
}
|
|
12981
13002
|
}
|
|
12982
|
-
),
|
|
13003
|
+
), M6 = Fe({
|
|
12983
13004
|
base: [
|
|
12984
13005
|
"relative flex flex-col rounded-2xl bg-f1-background",
|
|
12985
13006
|
"border border-solid border-f1-border-secondary",
|
|
@@ -12997,18 +13018,18 @@ const L9 = ({
|
|
|
12997
13018
|
}
|
|
12998
13019
|
}), Gr = Fe({
|
|
12999
13020
|
base: "text-lg font-semibold text-f1-foreground line-clamp-3"
|
|
13000
|
-
}),
|
|
13021
|
+
}), E6 = Fe({
|
|
13001
13022
|
base: "text-sm text-f1-foreground-secondary leading-normal"
|
|
13002
13023
|
}), Ge = Fe({
|
|
13003
13024
|
base: "text-sm font-medium text-f1-foreground leading-normal"
|
|
13004
|
-
}),
|
|
13025
|
+
}), R6 = ({
|
|
13005
13026
|
description: e,
|
|
13006
13027
|
isRevealed: t,
|
|
13007
13028
|
onAskOne: n
|
|
13008
13029
|
}) => {
|
|
13009
13030
|
const o = Y(), s = ye();
|
|
13010
13031
|
return /* @__PURE__ */ c(xe, { children: [
|
|
13011
|
-
e && /* @__PURE__ */ r("span", { className:
|
|
13032
|
+
e && /* @__PURE__ */ r("span", { className: k(E6(), "truncate"), children: e }),
|
|
13012
13033
|
/* @__PURE__ */ r(Ne, { children: n && t && /* @__PURE__ */ r(
|
|
13013
13034
|
oe.div,
|
|
13014
13035
|
{
|
|
@@ -13033,14 +13054,14 @@ const L9 = ({
|
|
|
13033
13054
|
}
|
|
13034
13055
|
) })
|
|
13035
13056
|
] });
|
|
13036
|
-
},
|
|
13057
|
+
}, F6 = /* @__PURE__ */ new Set([
|
|
13037
13058
|
"person",
|
|
13038
13059
|
"people",
|
|
13039
13060
|
"team",
|
|
13040
13061
|
"company",
|
|
13041
13062
|
"alert",
|
|
13042
13063
|
"balance"
|
|
13043
|
-
]),
|
|
13064
|
+
]), N6 = ({ balance: e }) => /* @__PURE__ */ r(
|
|
13044
13065
|
Ds,
|
|
13045
13066
|
{
|
|
13046
13067
|
amount: e.amount,
|
|
@@ -13048,7 +13069,7 @@ const L9 = ({
|
|
|
13048
13069
|
invertStatus: e.invertStatus,
|
|
13049
13070
|
hint: e.hint
|
|
13050
13071
|
}
|
|
13051
|
-
),
|
|
13072
|
+
), S6 = (e) => {
|
|
13052
13073
|
const {
|
|
13053
13074
|
heading: t,
|
|
13054
13075
|
label: n,
|
|
@@ -13057,7 +13078,7 @@ const L9 = ({
|
|
|
13057
13078
|
fadeTransition: i
|
|
13058
13079
|
} = e;
|
|
13059
13080
|
return /* @__PURE__ */ c("div", { className: "flex flex-1 flex-col gap-2", children: [
|
|
13060
|
-
/* @__PURE__ */ r("span", { className:
|
|
13081
|
+
/* @__PURE__ */ r("span", { className: k(Gr()), children: t }),
|
|
13061
13082
|
/* @__PURE__ */ c(
|
|
13062
13083
|
oe.div,
|
|
13063
13084
|
{
|
|
@@ -13075,7 +13096,7 @@ const L9 = ({
|
|
|
13075
13096
|
size: "xs"
|
|
13076
13097
|
}
|
|
13077
13098
|
),
|
|
13078
|
-
n && /* @__PURE__ */ r("span", { className:
|
|
13099
|
+
n && /* @__PURE__ */ r("span", { className: k(Ge()), children: n })
|
|
13079
13100
|
] }),
|
|
13080
13101
|
o === "people" && /* @__PURE__ */ r(
|
|
13081
13102
|
Is,
|
|
@@ -13095,7 +13116,7 @@ const L9 = ({
|
|
|
13095
13116
|
size: "xs"
|
|
13096
13117
|
}
|
|
13097
13118
|
),
|
|
13098
|
-
n && /* @__PURE__ */ r("span", { className:
|
|
13119
|
+
n && /* @__PURE__ */ r("span", { className: k(Ge()), children: n })
|
|
13099
13120
|
] }),
|
|
13100
13121
|
o === "company" && /* @__PURE__ */ c("div", { className: "flex items-center gap-1", children: [
|
|
13101
13122
|
/* @__PURE__ */ r(
|
|
@@ -13106,17 +13127,17 @@ const L9 = ({
|
|
|
13106
13127
|
size: "xs"
|
|
13107
13128
|
}
|
|
13108
13129
|
),
|
|
13109
|
-
n && /* @__PURE__ */ r("span", { className:
|
|
13130
|
+
n && /* @__PURE__ */ r("span", { className: k(Ge()), children: n })
|
|
13110
13131
|
] }),
|
|
13111
13132
|
o === "alert" && /* @__PURE__ */ r(js, { text: e.alertLabel, level: e.level }),
|
|
13112
|
-
o === "balance" && /* @__PURE__ */ r(
|
|
13133
|
+
o === "balance" && /* @__PURE__ */ r(N6, { balance: e.balance })
|
|
13113
13134
|
]
|
|
13114
13135
|
}
|
|
13115
13136
|
),
|
|
13116
|
-
n && !
|
|
13137
|
+
n && !F6.has(o) && /* @__PURE__ */ r(
|
|
13117
13138
|
oe.span,
|
|
13118
13139
|
{
|
|
13119
|
-
className:
|
|
13140
|
+
className: k(Ge()),
|
|
13120
13141
|
animate: { opacity: s ? 0 : 1 },
|
|
13121
13142
|
transition: i,
|
|
13122
13143
|
children: n
|
|
@@ -13140,17 +13161,17 @@ const L9 = ({
|
|
|
13140
13161
|
border: "border-f1-border"
|
|
13141
13162
|
}
|
|
13142
13163
|
};
|
|
13143
|
-
function
|
|
13164
|
+
function V6(e, t) {
|
|
13144
13165
|
const n = e[0]?.value ?? 0, o = e[e.length - 1]?.value ?? 0, s = Math.sign(o - n), i = t ? s * -1 : s;
|
|
13145
13166
|
return i > 0 ? "positive" : i < 0 ? "negative" : "neutral";
|
|
13146
13167
|
}
|
|
13147
|
-
const
|
|
13168
|
+
const T6 = ({
|
|
13148
13169
|
cx: e,
|
|
13149
13170
|
cy: t,
|
|
13150
13171
|
index: n,
|
|
13151
13172
|
dataLength: o,
|
|
13152
13173
|
color: s
|
|
13153
|
-
}) => n !== o - 1 || e == null || t == null ? null : /* @__PURE__ */ r("circle", { cx: e, cy: t, r: 2, fill: s, stroke: "none" }),
|
|
13174
|
+
}) => n !== o - 1 || e == null || t == null ? null : /* @__PURE__ */ r("circle", { cx: e, cy: t, r: 2, fill: s, stroke: "none" }), H6 = ({
|
|
13154
13175
|
label: e,
|
|
13155
13176
|
direction: t
|
|
13156
13177
|
}) => {
|
|
@@ -13158,7 +13179,7 @@ const N6 = ({
|
|
|
13158
13179
|
return /* @__PURE__ */ r(
|
|
13159
13180
|
"span",
|
|
13160
13181
|
{
|
|
13161
|
-
className:
|
|
13182
|
+
className: k(
|
|
13162
13183
|
"absolute right-0 inline-flex items-center rounded-full border border-solid bg-f1-background px-1.5 py-px text-xs font-medium shadow",
|
|
13163
13184
|
t === "negative" ? "bottom-0 translate-y-full" : "top-0 -translate-y-full",
|
|
13164
13185
|
n.border,
|
|
@@ -13172,12 +13193,12 @@ const N6 = ({
|
|
|
13172
13193
|
children: e
|
|
13173
13194
|
}
|
|
13174
13195
|
);
|
|
13175
|
-
},
|
|
13196
|
+
}, A6 = ({
|
|
13176
13197
|
data: e,
|
|
13177
13198
|
label: t,
|
|
13178
13199
|
invertStatus: n
|
|
13179
13200
|
}) => {
|
|
13180
|
-
const s = `sparkline-gradient-${wt().replace(/:/g, "")}`, i =
|
|
13201
|
+
const s = `sparkline-gradient-${wt().replace(/:/g, "")}`, i = V6(e, n), a = Wr[i];
|
|
13181
13202
|
return /* @__PURE__ */ r("div", { className: "flex flex-1 flex-col", children: /* @__PURE__ */ c(
|
|
13182
13203
|
"div",
|
|
13183
13204
|
{
|
|
@@ -13207,7 +13228,7 @@ const N6 = ({
|
|
|
13207
13228
|
fillOpacity: 1,
|
|
13208
13229
|
isAnimationActive: !1,
|
|
13209
13230
|
dot: (d) => /* @__PURE__ */ $e(
|
|
13210
|
-
|
|
13231
|
+
T6,
|
|
13211
13232
|
{
|
|
13212
13233
|
...d,
|
|
13213
13234
|
key: d.index,
|
|
@@ -13221,7 +13242,7 @@ const N6 = ({
|
|
|
13221
13242
|
]
|
|
13222
13243
|
}
|
|
13223
13244
|
) }),
|
|
13224
|
-
/* @__PURE__ */ r(
|
|
13245
|
+
/* @__PURE__ */ r(H6, { label: t, direction: i })
|
|
13225
13246
|
]
|
|
13226
13247
|
}
|
|
13227
13248
|
) });
|
|
@@ -13236,10 +13257,10 @@ const N6 = ({
|
|
|
13236
13257
|
onAskOne: d,
|
|
13237
13258
|
className: l,
|
|
13238
13259
|
...u
|
|
13239
|
-
} = e, [f, g] = P(!1), [m, h] = P(!1), C = f || m, v = ye(), w = C && !!d,
|
|
13260
|
+
} = e, [f, g] = P(!1), [m, h] = P(!1), C = f || m, v = ye(), w = C && !!d, x = {
|
|
13240
13261
|
duration: v ? 0 : 0.2,
|
|
13241
13262
|
ease: [0.33, 1, 0.68, 1]
|
|
13242
|
-
},
|
|
13263
|
+
}, S = () => {
|
|
13243
13264
|
a?.();
|
|
13244
13265
|
}, T = (E) => {
|
|
13245
13266
|
E.currentTarget === E.target && (E.key === "Enter" || E.key === " ") && (E.preventDefault(), a?.());
|
|
@@ -13250,7 +13271,7 @@ const N6 = ({
|
|
|
13250
13271
|
"div",
|
|
13251
13272
|
{
|
|
13252
13273
|
"data-testid": "selected-border",
|
|
13253
|
-
className:
|
|
13274
|
+
className: k(
|
|
13254
13275
|
"absolute -inset-px rounded-2xl",
|
|
13255
13276
|
"[--gradient-angle:0deg]",
|
|
13256
13277
|
"bg-[conic-gradient(from_var(--gradient-angle),hsla(229,57%,76%,0.7),hsla(348,80%,50%,0.7),hsla(348,80%,50%,0.7),hsla(18,80%,50%,0.7),hsla(229,57%,76%,0.7),hsla(229,57%,76%,0.7))]",
|
|
@@ -13262,7 +13283,7 @@ const N6 = ({
|
|
|
13262
13283
|
"div",
|
|
13263
13284
|
{
|
|
13264
13285
|
"aria-hidden": !0,
|
|
13265
|
-
className:
|
|
13286
|
+
className: k(
|
|
13266
13287
|
"pointer-events-none absolute -inset-px rounded-2xl",
|
|
13267
13288
|
"[--gradient-angle:0deg]",
|
|
13268
13289
|
"bg-[conic-gradient(from_var(--gradient-angle),hsla(229,57%,76%,0.7),hsla(348,80%,50%,0.7),hsla(348,80%,50%,0.7),hsla(18,80%,50%,0.7),hsla(229,57%,76%,0.7),hsla(229,57%,76%,0.7))]",
|
|
@@ -13277,14 +13298,14 @@ const N6 = ({
|
|
|
13277
13298
|
ref: t,
|
|
13278
13299
|
role: a ? "button" : void 0,
|
|
13279
13300
|
tabIndex: a ? 0 : void 0,
|
|
13280
|
-
className:
|
|
13281
|
-
|
|
13301
|
+
className: k(
|
|
13302
|
+
M6({ selected: i }),
|
|
13282
13303
|
i && "relative border-transparent",
|
|
13283
13304
|
a && "cursor-pointer select-none",
|
|
13284
13305
|
a && me(),
|
|
13285
13306
|
l
|
|
13286
13307
|
),
|
|
13287
|
-
onClick: a ?
|
|
13308
|
+
onClick: a ? S : void 0,
|
|
13288
13309
|
onKeyDown: a ? T : void 0,
|
|
13289
13310
|
onMouseEnter: () => g(!0),
|
|
13290
13311
|
onMouseLeave: () => g(!1),
|
|
@@ -13292,7 +13313,7 @@ const N6 = ({
|
|
|
13292
13313
|
onBlur: () => h(!1),
|
|
13293
13314
|
children: [
|
|
13294
13315
|
/* @__PURE__ */ r(
|
|
13295
|
-
|
|
13316
|
+
R6,
|
|
13296
13317
|
{
|
|
13297
13318
|
description: n,
|
|
13298
13319
|
isRevealed: C,
|
|
@@ -13300,15 +13321,15 @@ const N6 = ({
|
|
|
13300
13321
|
}
|
|
13301
13322
|
),
|
|
13302
13323
|
u.content === "sparkline" ? /* @__PURE__ */ c("div", { className: "flex flex-1 flex-col gap-2", children: [
|
|
13303
|
-
/* @__PURE__ */ r("span", { className:
|
|
13324
|
+
/* @__PURE__ */ r("span", { className: k(Gr()), children: o }),
|
|
13304
13325
|
/* @__PURE__ */ r(
|
|
13305
13326
|
oe.div,
|
|
13306
13327
|
{
|
|
13307
13328
|
className: "-ml-4 flex flex-1 flex-col",
|
|
13308
13329
|
animate: { opacity: w ? 0 : 1 },
|
|
13309
|
-
transition:
|
|
13330
|
+
transition: x,
|
|
13310
13331
|
children: /* @__PURE__ */ r(
|
|
13311
|
-
|
|
13332
|
+
A6,
|
|
13312
13333
|
{
|
|
13313
13334
|
data: u.data,
|
|
13314
13335
|
label: s ?? "",
|
|
@@ -13318,12 +13339,12 @@ const N6 = ({
|
|
|
13318
13339
|
}
|
|
13319
13340
|
)
|
|
13320
13341
|
] }) : /* @__PURE__ */ r(
|
|
13321
|
-
|
|
13342
|
+
S6,
|
|
13322
13343
|
{
|
|
13323
13344
|
heading: o,
|
|
13324
13345
|
label: s,
|
|
13325
13346
|
shouldFadeContent: w,
|
|
13326
|
-
fadeTransition:
|
|
13347
|
+
fadeTransition: x,
|
|
13327
13348
|
...u
|
|
13328
13349
|
}
|
|
13329
13350
|
)
|
|
@@ -13334,15 +13355,15 @@ const N6 = ({
|
|
|
13334
13355
|
}
|
|
13335
13356
|
);
|
|
13336
13357
|
qr.displayName = "F0AiInsightCardInternal";
|
|
13337
|
-
const
|
|
13338
|
-
const n =
|
|
13358
|
+
const B6 = ["className"], Xr = p((e, t) => {
|
|
13359
|
+
const n = B6.reduce((o, s) => {
|
|
13339
13360
|
const { [s]: i, ...a } = o;
|
|
13340
13361
|
return a;
|
|
13341
13362
|
}, e);
|
|
13342
13363
|
return /* @__PURE__ */ r(qr, { ref: t, ...n });
|
|
13343
13364
|
});
|
|
13344
13365
|
Xr.displayName = "F0AiInsightCard";
|
|
13345
|
-
const
|
|
13366
|
+
const $6 = () => /* @__PURE__ */ c(
|
|
13346
13367
|
"div",
|
|
13347
13368
|
{
|
|
13348
13369
|
className: "flex w-[217px] h-[200px] flex-col gap-2 rounded-2xl border border-solid border-f1-border-secondary bg-f1-background p-4",
|
|
@@ -13362,9 +13383,9 @@ const H6 = () => /* @__PURE__ */ c(
|
|
|
13362
13383
|
] })
|
|
13363
13384
|
]
|
|
13364
13385
|
}
|
|
13365
|
-
),
|
|
13366
|
-
jt(Xr,
|
|
13367
|
-
),
|
|
13386
|
+
), R9 = Pt(
|
|
13387
|
+
jt(Xr, $6)
|
|
13388
|
+
), F9 = [
|
|
13368
13389
|
"text",
|
|
13369
13390
|
"person",
|
|
13370
13391
|
"people",
|
|
@@ -13373,10 +13394,10 @@ const H6 = () => /* @__PURE__ */ c(
|
|
|
13373
13394
|
"alert",
|
|
13374
13395
|
"balance",
|
|
13375
13396
|
"sparkline"
|
|
13376
|
-
], Yr = 180,
|
|
13397
|
+
], Yr = 180, I6 = (e) => Number.isFinite(e) ? Math.max(0, Math.floor(e)) : Yr, P6 = (e, t) => e.length <= t ? e : `${e.slice(0, t).trimEnd()}...`, j6 = (e) => e.showActions !== !1, D6 = (e) => Object.fromEntries(
|
|
13377
13398
|
Object.entries(e).filter(([t]) => t.startsWith("data-"))
|
|
13378
13399
|
);
|
|
13379
|
-
function
|
|
13400
|
+
function Z6(e) {
|
|
13380
13401
|
const {
|
|
13381
13402
|
module: t,
|
|
13382
13403
|
heading: n,
|
|
@@ -13385,9 +13406,9 @@ function P6(e) {
|
|
|
13385
13406
|
description: i,
|
|
13386
13407
|
seeMoreLabel: a,
|
|
13387
13408
|
maxCollapsedDescriptionLength: d = Yr
|
|
13388
|
-
} = e, [l, u] = P(!1), f = wt(), g = I(null), m =
|
|
13409
|
+
} = e, [l, u] = P(!1), f = wt(), g = I(null), m = I6(
|
|
13389
13410
|
d
|
|
13390
|
-
), h = i.length > m, C = l ? i :
|
|
13411
|
+
), h = i.length > m, C = l ? i : P6(i, m), v = j6(e) ? e : null, w = D6(e);
|
|
13391
13412
|
return X(() => {
|
|
13392
13413
|
l && g.current?.focus();
|
|
13393
13414
|
}, [l]), /* @__PURE__ */ c(
|
|
@@ -13411,7 +13432,7 @@ function P6(e) {
|
|
|
13411
13432
|
id: f,
|
|
13412
13433
|
ref: g,
|
|
13413
13434
|
tabIndex: l ? -1 : void 0,
|
|
13414
|
-
className:
|
|
13435
|
+
className: k(
|
|
13415
13436
|
"text-base text-f1-foreground whitespace-pre-wrap break-words",
|
|
13416
13437
|
l && me(),
|
|
13417
13438
|
!l && "inline"
|
|
@@ -13424,7 +13445,7 @@ function P6(e) {
|
|
|
13424
13445
|
"button",
|
|
13425
13446
|
{
|
|
13426
13447
|
type: "button",
|
|
13427
|
-
className:
|
|
13448
|
+
className: k(
|
|
13428
13449
|
"inline cursor-pointer rounded-none border-0 bg-transparent p-0 text-base text-f1-foreground underline underline-offset-2 hover:text-f1-foreground-secondary",
|
|
13429
13450
|
me()
|
|
13430
13451
|
),
|
|
@@ -13452,8 +13473,8 @@ function P6(e) {
|
|
|
13452
13473
|
}
|
|
13453
13474
|
);
|
|
13454
13475
|
}
|
|
13455
|
-
|
|
13456
|
-
const
|
|
13476
|
+
Z6.displayName = "F0AiProposalCard";
|
|
13477
|
+
const _6 = ({
|
|
13457
13478
|
icon: e,
|
|
13458
13479
|
title: t,
|
|
13459
13480
|
children: n
|
|
@@ -13497,8 +13518,8 @@ const j6 = ({
|
|
|
13497
13518
|
]
|
|
13498
13519
|
}
|
|
13499
13520
|
);
|
|
13500
|
-
},
|
|
13501
|
-
function
|
|
13521
|
+
}, O6 = (e) => Tl[e] ?? Nt, U6 = ({ iconName: e }) => e ? /* @__PURE__ */ r("div", { className: "mr-1 flex items-center justify-center", children: /* @__PURE__ */ r(le, { icon: O6(e), size: "md", color: "default" }) }) : null;
|
|
13522
|
+
function z6({
|
|
13502
13523
|
sources: e,
|
|
13503
13524
|
title: t
|
|
13504
13525
|
}) {
|
|
@@ -13506,8 +13527,8 @@ function _6({
|
|
|
13506
13527
|
if (!e || e.length === 0 || !Array.isArray(e))
|
|
13507
13528
|
return null;
|
|
13508
13529
|
const o = t ?? n.ai.resourcesGroupTitle;
|
|
13509
|
-
return /* @__PURE__ */ r(
|
|
13510
|
-
const a = /* @__PURE__ */ r(
|
|
13530
|
+
return /* @__PURE__ */ r(_6, { icon: w1, title: o, children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-1 rounded-lg border border-solid border-f1-border-secondary p-2", children: e.map((s, i) => {
|
|
13531
|
+
const a = /* @__PURE__ */ r(U6, { iconName: s.icon });
|
|
13511
13532
|
return s.link ? /* @__PURE__ */ r(
|
|
13512
13533
|
Ie,
|
|
13513
13534
|
{
|
|
@@ -13535,12 +13556,12 @@ function _6({
|
|
|
13535
13556
|
);
|
|
13536
13557
|
}) }) });
|
|
13537
13558
|
}
|
|
13538
|
-
|
|
13539
|
-
async function
|
|
13559
|
+
z6.displayName = "F0AiMessageSources";
|
|
13560
|
+
async function G6(e, t, n) {
|
|
13540
13561
|
const o = await import("./xlsx-Bedf3nwD.js"), s = o.utils.table_to_book(e, { sheet: "Data" });
|
|
13541
13562
|
o.writeFile(s, `${n}.${t}`);
|
|
13542
13563
|
}
|
|
13543
|
-
function
|
|
13564
|
+
function W6({
|
|
13544
13565
|
dataset: e,
|
|
13545
13566
|
title: t,
|
|
13546
13567
|
filename: n
|
|
@@ -13549,7 +13570,7 @@ function U6({
|
|
|
13549
13570
|
(d) => {
|
|
13550
13571
|
if (!s.current) return;
|
|
13551
13572
|
const l = n ?? (i.replace(/\s+/g, "_").toLowerCase() || "table");
|
|
13552
|
-
|
|
13573
|
+
G6(s.current, d, l);
|
|
13553
13574
|
},
|
|
13554
13575
|
[i, n]
|
|
13555
13576
|
);
|
|
@@ -13610,7 +13631,7 @@ function U6({
|
|
|
13610
13631
|
"table",
|
|
13611
13632
|
{
|
|
13612
13633
|
ref: s,
|
|
13613
|
-
className:
|
|
13634
|
+
className: k(
|
|
13614
13635
|
"w-full border-separate border-spacing-0 text-md",
|
|
13615
13636
|
"[&_tbody_tr:last-child_td]:border-b-0"
|
|
13616
13637
|
),
|
|
@@ -13641,8 +13662,8 @@ function U6({
|
|
|
13641
13662
|
}
|
|
13642
13663
|
) : null;
|
|
13643
13664
|
}
|
|
13644
|
-
|
|
13645
|
-
function
|
|
13665
|
+
W6.displayName = "F0AiTableCard";
|
|
13666
|
+
function q6({ credits: e }) {
|
|
13646
13667
|
const t = Y(), [n, o] = P(!1), [s, i] = P(!1), [a, d] = P(!1), [l, u] = P(null), f = q(
|
|
13647
13668
|
(h) => {
|
|
13648
13669
|
o(h), h && e?.fetchUsage && (i(!0), d(!1), e.fetchUsage().then((C) => {
|
|
@@ -13766,8 +13787,8 @@ function z6({ credits: e }) {
|
|
|
13766
13787
|
)
|
|
13767
13788
|
] });
|
|
13768
13789
|
}
|
|
13769
|
-
const
|
|
13770
|
-
function
|
|
13790
|
+
const X6 = "linear-gradient(90deg, #E55619, #A1ADE5, #E51943, #E55619)";
|
|
13791
|
+
function Y6({
|
|
13771
13792
|
employeeCredits: e
|
|
13772
13793
|
}) {
|
|
13773
13794
|
const t = Y(), n = ye(), [o, s] = P(!1), [i, a] = P(!1), [d, l] = P(!1), [u, f] = P(null), g = q(
|
|
@@ -13859,7 +13880,7 @@ function W6({
|
|
|
13859
13880
|
className: "h-full rounded-full",
|
|
13860
13881
|
style: {
|
|
13861
13882
|
width: `${h}%`,
|
|
13862
|
-
backgroundImage:
|
|
13883
|
+
backgroundImage: X6,
|
|
13863
13884
|
backgroundSize: "300% 100%"
|
|
13864
13885
|
},
|
|
13865
13886
|
animate: n ? void 0 : { backgroundPosition: ["0% 0%", "100% 0%"] },
|
|
@@ -13885,7 +13906,7 @@ function W6({
|
|
|
13885
13906
|
const mt = ({
|
|
13886
13907
|
credits: e,
|
|
13887
13908
|
employeeCredits: t
|
|
13888
|
-
}) => t ? /* @__PURE__ */ r(
|
|
13909
|
+
}) => t ? /* @__PURE__ */ r(Y6, { employeeCredits: t }) : e ? /* @__PURE__ */ r(q6, { credits: e }) : null, N9 = ({
|
|
13889
13910
|
historyEnabled: e = !1,
|
|
13890
13911
|
title: t,
|
|
13891
13912
|
currentThreadTitle: n,
|
|
@@ -13923,7 +13944,7 @@ const mt = ({
|
|
|
13923
13944
|
return e ? /* @__PURE__ */ c(
|
|
13924
13945
|
"header",
|
|
13925
13946
|
{
|
|
13926
|
-
className:
|
|
13947
|
+
className: k(
|
|
13927
13948
|
"flex justify-between pl-2.5 pr-3 py-3 w-full overflow-hidden gap-3"
|
|
13928
13949
|
),
|
|
13929
13950
|
children: [
|
|
@@ -13962,7 +13983,7 @@ const mt = ({
|
|
|
13962
13983
|
)
|
|
13963
13984
|
]
|
|
13964
13985
|
}
|
|
13965
|
-
) : /* @__PURE__ */ c("header", { className:
|
|
13986
|
+
) : /* @__PURE__ */ c("header", { className: k("flex justify-between px-4 py-3"), children: [
|
|
13966
13987
|
/* @__PURE__ */ r("div", { className: "flex items-center", children: /* @__PURE__ */ r("h2", { className: "text-f1-foreground", children: t ?? "" }) }),
|
|
13967
13988
|
/* @__PURE__ */ c(
|
|
13968
13989
|
oe.div,
|
|
@@ -13996,16 +14017,16 @@ const mt = ({
|
|
|
13996
14017
|
)
|
|
13997
14018
|
] });
|
|
13998
14019
|
};
|
|
13999
|
-
function
|
|
14020
|
+
function K6() {
|
|
14000
14021
|
if (!(typeof navigator > "u"))
|
|
14001
14022
|
return qs(navigator.language);
|
|
14002
14023
|
}
|
|
14003
|
-
function
|
|
14024
|
+
function Q6(e) {
|
|
14004
14025
|
const t = new Date(e), n = /* @__PURE__ */ new Date();
|
|
14005
14026
|
return Yt(t) ? "today" : Kt(t) ? "yesterday" : Gs(t, n) ? "thisMonth" : "older";
|
|
14006
14027
|
}
|
|
14007
|
-
function
|
|
14008
|
-
const n = new Date(e), o =
|
|
14028
|
+
function J6(e, t) {
|
|
14029
|
+
const n = new Date(e), o = K6(), s = I1(n, "p", { locale: o });
|
|
14009
14030
|
if (Yt(n)) return `${t.today}, ${s}`;
|
|
14010
14031
|
if (Kt(n)) return `${t.yesterday}, ${s}`;
|
|
14011
14032
|
const i = !Ws(n, /* @__PURE__ */ new Date());
|
|
@@ -14013,7 +14034,7 @@ function Y6(e, t) {
|
|
|
14013
14034
|
locale: o
|
|
14014
14035
|
})}, ${s}`;
|
|
14015
14036
|
}
|
|
14016
|
-
function
|
|
14037
|
+
function e9(e) {
|
|
14017
14038
|
const t = {
|
|
14018
14039
|
today: [],
|
|
14019
14040
|
yesterday: [],
|
|
@@ -14021,12 +14042,12 @@ function K6(e) {
|
|
|
14021
14042
|
older: []
|
|
14022
14043
|
};
|
|
14023
14044
|
for (const o of e) {
|
|
14024
|
-
const s =
|
|
14045
|
+
const s = Q6(o.updatedAt);
|
|
14025
14046
|
t[s].push(o);
|
|
14026
14047
|
}
|
|
14027
14048
|
return ["today", "yesterday", "thisMonth", "older"].filter((o) => t[o].length > 0).map((o) => ({ key: o, threads: t[o] }));
|
|
14028
14049
|
}
|
|
14029
|
-
function
|
|
14050
|
+
function t9({
|
|
14030
14051
|
thread: e,
|
|
14031
14052
|
isPinned: t,
|
|
14032
14053
|
onSelect: n,
|
|
@@ -14050,7 +14071,7 @@ function Q6({
|
|
|
14050
14071
|
],
|
|
14051
14072
|
[t, e.id, o, s, i]
|
|
14052
14073
|
), l = ee(
|
|
14053
|
-
() =>
|
|
14074
|
+
() => J6(e.updatedAt, {
|
|
14054
14075
|
today: a.ai.today,
|
|
14055
14076
|
yesterday: a.ai.yesterday
|
|
14056
14077
|
}),
|
|
@@ -14059,7 +14080,7 @@ function Q6({
|
|
|
14059
14080
|
return /* @__PURE__ */ c(
|
|
14060
14081
|
"div",
|
|
14061
14082
|
{
|
|
14062
|
-
className:
|
|
14083
|
+
className: k(
|
|
14063
14084
|
"group flex cursor-pointer items-center justify-between rounded-md py-1.5 pl-3 pr-1.5 hover:bg-f1-background-hover",
|
|
14064
14085
|
me("rounded")
|
|
14065
14086
|
),
|
|
@@ -14083,7 +14104,7 @@ function Q6({
|
|
|
14083
14104
|
/* @__PURE__ */ r(
|
|
14084
14105
|
"div",
|
|
14085
14106
|
{
|
|
14086
|
-
className:
|
|
14107
|
+
className: k(
|
|
14087
14108
|
"flex items-center opacity-0 transition-opacity duration-150",
|
|
14088
14109
|
"group-hover:opacity-100 focus-within:opacity-100",
|
|
14089
14110
|
"has-[[aria-expanded=true]]:opacity-100"
|
|
@@ -14129,7 +14150,7 @@ function Ct({
|
|
|
14129
14150
|
tabIndex: 0,
|
|
14130
14151
|
onClick: u,
|
|
14131
14152
|
onKeyDown: f,
|
|
14132
|
-
className:
|
|
14153
|
+
className: k(
|
|
14133
14154
|
"flex cursor-pointer items-center p-3 gap-1 hover:bg-f1-background-hover",
|
|
14134
14155
|
me("rounded")
|
|
14135
14156
|
),
|
|
@@ -14147,7 +14168,7 @@ function Ct({
|
|
|
14147
14168
|
}
|
|
14148
14169
|
),
|
|
14149
14170
|
d && /* @__PURE__ */ r("div", { className: "flex flex-col", children: t.map((g) => /* @__PURE__ */ r(
|
|
14150
|
-
|
|
14171
|
+
t9,
|
|
14151
14172
|
{
|
|
14152
14173
|
thread: g,
|
|
14153
14174
|
isPinned: n.has(g.id),
|
|
@@ -14160,7 +14181,7 @@ function Ct({
|
|
|
14160
14181
|
)) })
|
|
14161
14182
|
] });
|
|
14162
14183
|
}
|
|
14163
|
-
function
|
|
14184
|
+
function r9() {
|
|
14164
14185
|
return /* @__PURE__ */ r("div", { className: "flex flex-col gap-2 py-3", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ c(
|
|
14165
14186
|
"div",
|
|
14166
14187
|
{
|
|
@@ -14173,7 +14194,7 @@ function J6() {
|
|
|
14173
14194
|
t
|
|
14174
14195
|
)) });
|
|
14175
14196
|
}
|
|
14176
|
-
const
|
|
14197
|
+
const S9 = ({
|
|
14177
14198
|
onClose: e,
|
|
14178
14199
|
onSelectThread: t,
|
|
14179
14200
|
onNewChat: n,
|
|
@@ -14215,10 +14236,10 @@ const R9 = ({
|
|
|
14215
14236
|
), w = ee(
|
|
14216
14237
|
() => C.filter((b) => !a.has(b.id)),
|
|
14217
14238
|
[C, a]
|
|
14218
|
-
),
|
|
14219
|
-
() =>
|
|
14239
|
+
), x = ee(
|
|
14240
|
+
() => e9(w),
|
|
14220
14241
|
[w]
|
|
14221
|
-
),
|
|
14242
|
+
), S = q(
|
|
14222
14243
|
(b, A) => {
|
|
14223
14244
|
t(b, A), e();
|
|
14224
14245
|
},
|
|
@@ -14230,7 +14251,7 @@ const R9 = ({
|
|
|
14230
14251
|
u(b);
|
|
14231
14252
|
},
|
|
14232
14253
|
[u]
|
|
14233
|
-
), L = v.length > 0 ||
|
|
14254
|
+
), L = v.length > 0 || x.length > 0;
|
|
14234
14255
|
return Qt(
|
|
14235
14256
|
/* @__PURE__ */ c(xe, { children: [
|
|
14236
14257
|
/* @__PURE__ */ r(
|
|
@@ -14247,7 +14268,7 @@ const R9 = ({
|
|
|
14247
14268
|
role: "dialog",
|
|
14248
14269
|
"aria-modal": "true",
|
|
14249
14270
|
"aria-label": f.ai.chatHistory,
|
|
14250
|
-
className:
|
|
14271
|
+
className: k(
|
|
14251
14272
|
"fixed inset-0 z-50 flex items-center justify-center",
|
|
14252
14273
|
"pointer-events-none",
|
|
14253
14274
|
"animate-in fade-in-0 zoom-in-95"
|
|
@@ -14255,7 +14276,7 @@ const R9 = ({
|
|
|
14255
14276
|
children: /* @__PURE__ */ c(
|
|
14256
14277
|
"div",
|
|
14257
14278
|
{
|
|
14258
|
-
className:
|
|
14279
|
+
className: k(
|
|
14259
14280
|
"pointer-events-auto relative flex w-full max-w-[600px] flex-col",
|
|
14260
14281
|
"rounded-xl bg-f1-background shadow-lg",
|
|
14261
14282
|
"max-h-[min(600px,80vh)]"
|
|
@@ -14270,7 +14291,7 @@ const R9 = ({
|
|
|
14270
14291
|
value: g,
|
|
14271
14292
|
onChange: (b) => m(b.target.value),
|
|
14272
14293
|
placeholder: f.ai.searchChats,
|
|
14273
|
-
className:
|
|
14294
|
+
className: k(
|
|
14274
14295
|
"w-full",
|
|
14275
14296
|
"py-2.5 pr-3",
|
|
14276
14297
|
"text-base text-f1-foreground-secondary placeholder:text-f1-foreground-tertiary focus:outline-none",
|
|
@@ -14293,7 +14314,7 @@ const R9 = ({
|
|
|
14293
14314
|
] })
|
|
14294
14315
|
}
|
|
14295
14316
|
),
|
|
14296
|
-
s && /* @__PURE__ */ r(
|
|
14317
|
+
s && /* @__PURE__ */ r(r9, {}),
|
|
14297
14318
|
!s && i && /* @__PURE__ */ r("p", { className: "py-8 text-center text-base text-f1-foreground-tertiary", children: i }),
|
|
14298
14319
|
!s && !i && !L && /* @__PURE__ */ r("p", { className: "py-8 text-center text-base text-f1-foreground-tertiary", children: f.ai.noPreviousChats }),
|
|
14299
14320
|
!s && !i && v.length > 0 && /* @__PURE__ */ r(
|
|
@@ -14302,19 +14323,19 @@ const R9 = ({
|
|
|
14302
14323
|
label: f.ai.pinnedChats,
|
|
14303
14324
|
threads: v,
|
|
14304
14325
|
pinnedIds: a,
|
|
14305
|
-
onSelect:
|
|
14326
|
+
onSelect: S,
|
|
14306
14327
|
onPin: d,
|
|
14307
14328
|
onUnpin: l,
|
|
14308
14329
|
onDelete: E
|
|
14309
14330
|
}
|
|
14310
14331
|
),
|
|
14311
|
-
!s && !i &&
|
|
14332
|
+
!s && !i && x.map((b) => /* @__PURE__ */ r(
|
|
14312
14333
|
Ct,
|
|
14313
14334
|
{
|
|
14314
14335
|
label: h[b.key],
|
|
14315
14336
|
threads: b.threads,
|
|
14316
14337
|
pinnedIds: a,
|
|
14317
|
-
onSelect:
|
|
14338
|
+
onSelect: S,
|
|
14318
14339
|
onPin: d,
|
|
14319
14340
|
onUnpin: l,
|
|
14320
14341
|
onDelete: E
|
|
@@ -14331,19 +14352,19 @@ const R9 = ({
|
|
|
14331
14352
|
document.body
|
|
14332
14353
|
);
|
|
14333
14354
|
}, Kr = "f0-ai-pinned-threads";
|
|
14334
|
-
function
|
|
14355
|
+
function n9() {
|
|
14335
14356
|
const e = Xs(Kr, []);
|
|
14336
14357
|
return new Set(Array.isArray(e) ? e : []);
|
|
14337
14358
|
}
|
|
14338
14359
|
function f1(e) {
|
|
14339
14360
|
Ys(Kr, [...e]);
|
|
14340
14361
|
}
|
|
14341
|
-
function
|
|
14362
|
+
function V9({
|
|
14342
14363
|
enabled: e = !1,
|
|
14343
14364
|
fetchThreads: t,
|
|
14344
14365
|
deleteThread: n
|
|
14345
14366
|
}) {
|
|
14346
|
-
const [o, s] = P([]), [i, a] = P(!1), [d, l] = P(null), [u, f] = P(
|
|
14367
|
+
const [o, s] = P([]), [i, a] = P(!1), [d, l] = P(null), [u, f] = P(n9), g = q(async () => {
|
|
14347
14368
|
a(!0), l(null);
|
|
14348
14369
|
try {
|
|
14349
14370
|
const v = await t();
|
|
@@ -14360,21 +14381,21 @@ function F9({
|
|
|
14360
14381
|
}, [e, g]);
|
|
14361
14382
|
const m = q((v) => {
|
|
14362
14383
|
f((w) => {
|
|
14363
|
-
const
|
|
14364
|
-
return
|
|
14384
|
+
const x = new Set(w);
|
|
14385
|
+
return x.add(v), f1(x), x;
|
|
14365
14386
|
});
|
|
14366
14387
|
}, []), h = q((v) => {
|
|
14367
14388
|
f((w) => {
|
|
14368
|
-
const
|
|
14369
|
-
return
|
|
14389
|
+
const x = new Set(w);
|
|
14390
|
+
return x.delete(v), f1(x), x;
|
|
14370
14391
|
});
|
|
14371
14392
|
}, []), C = q(
|
|
14372
14393
|
async (v) => {
|
|
14373
14394
|
try {
|
|
14374
|
-
await n(v), s((w) => w.filter((
|
|
14395
|
+
await n(v), s((w) => w.filter((x) => x.id !== v)), f((w) => {
|
|
14375
14396
|
if (!w.has(v)) return w;
|
|
14376
|
-
const
|
|
14377
|
-
return
|
|
14397
|
+
const x = new Set(w);
|
|
14398
|
+
return x.delete(v), f1(x), x;
|
|
14378
14399
|
});
|
|
14379
14400
|
} catch {
|
|
14380
14401
|
g();
|
|
@@ -14394,12 +14415,12 @@ function F9({
|
|
|
14394
14415
|
};
|
|
14395
14416
|
}
|
|
14396
14417
|
export {
|
|
14397
|
-
|
|
14418
|
+
x9 as A,
|
|
14398
14419
|
Li as B,
|
|
14399
14420
|
q0 as C,
|
|
14400
14421
|
c0 as D,
|
|
14401
14422
|
_0 as E,
|
|
14402
|
-
|
|
14423
|
+
p9 as F,
|
|
14403
14424
|
Mi as G,
|
|
14404
14425
|
Z5 as H,
|
|
14405
14426
|
wa as I,
|
|
@@ -14409,32 +14430,32 @@ export {
|
|
|
14409
14430
|
ha as M,
|
|
14410
14431
|
la as N,
|
|
14411
14432
|
pa as O,
|
|
14412
|
-
|
|
14433
|
+
p2 as P,
|
|
14413
14434
|
h1 as T,
|
|
14414
|
-
|
|
14415
|
-
|
|
14416
|
-
|
|
14417
|
-
|
|
14435
|
+
w9 as a,
|
|
14436
|
+
k9 as b,
|
|
14437
|
+
p4 as c,
|
|
14438
|
+
m9 as d,
|
|
14418
14439
|
Hr as e,
|
|
14419
|
-
|
|
14420
|
-
|
|
14421
|
-
|
|
14422
|
-
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
|
|
14427
|
-
|
|
14428
|
-
|
|
14429
|
-
|
|
14430
|
-
|
|
14431
|
-
|
|
14432
|
-
|
|
14433
|
-
|
|
14434
|
-
|
|
14435
|
-
|
|
14436
|
-
|
|
14437
|
-
|
|
14440
|
+
b9 as f,
|
|
14441
|
+
L9 as g,
|
|
14442
|
+
u9 as h,
|
|
14443
|
+
y9 as i,
|
|
14444
|
+
M9 as j,
|
|
14445
|
+
E9 as k,
|
|
14446
|
+
R9 as l,
|
|
14447
|
+
g9 as m,
|
|
14448
|
+
F9 as n,
|
|
14449
|
+
f9 as o,
|
|
14450
|
+
Z6 as p,
|
|
14451
|
+
z6 as q,
|
|
14452
|
+
W6 as r,
|
|
14453
|
+
N9 as s,
|
|
14454
|
+
S9 as t,
|
|
14455
|
+
C9 as u,
|
|
14456
|
+
V9 as v,
|
|
14457
|
+
h9 as w,
|
|
14458
|
+
v9 as x,
|
|
14438
14459
|
dr as y,
|
|
14439
14460
|
Al as z
|
|
14440
14461
|
};
|