@nevuto/novi 0.3.54 → 0.3.56
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/NoviInput/NoviInput.d.ts +33 -0
- package/dist/NoviInput/NoviInput.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1436 -1284
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as a, jsxs as g, Fragment as
|
|
3
|
-
import { useState as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
2
|
+
import { jsx as a, jsxs as g, Fragment as wt } from "react/jsx-runtime";
|
|
3
|
+
import { useState as at, useEffect as nt, useRef as H, useId as Ct, useMemo as hn, forwardRef as Qt, useLayoutEffect as pe, useCallback as fn } from "react";
|
|
4
|
+
import { Scrollable as Ft, Button as vt, IconButton as K, Kbd as pn, Spinner as _n } from "@nevuto/components";
|
|
5
|
+
import { ChevronDownIcon as mn, RotateCcwClockIcon as yn, PlusIcon as _e, AudioWaveformIcon as Ye, ArrowUpIcon as Ue, Minimize2Icon as gn, Maximize2Icon as xn, XIcon as Xe, ArrowDownIcon as bn, ArrowBigUpIcon as vn, CornerDownLeftIcon as kn, SquareIcon as Nn, PanelRightIcon as $n, MinusIcon as An, ZapIcon as Mn, MessagesSquareIcon as wn, CircleAlertIcon as me, CheckIcon as Ge, CopyIcon as zn, ThumbsUpIcon as In, ThumbsDownIcon as Rn, ChevronRightIcon as Bn, SparklesIcon as Tn, CaretDownIcon as We, CaretRightIcon as Qe, CircleDashedIcon as Cn } from "@nevuto/icons";
|
|
6
|
+
const G = Math.PI * 2, z = (t, n = 0, e = 1) => t < n ? n : t > e ? e : t, R = (t, n, e) => t + (n - t) * e, V = {
|
|
7
7
|
easeOutCubic: (t) => 1 - (1 - t) ** 3,
|
|
8
8
|
easeInOutCubic: (t) => t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2,
|
|
9
9
|
easeOutQuint: (t) => 1 - (1 - t) ** 5
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
const s = t / n *
|
|
11
|
+
function kt(t, n, e = 0) {
|
|
12
|
+
const s = t / n * G;
|
|
13
13
|
return 0.55 * Math.sin(s + e) + 0.3 * Math.sin(2 * s + e * 1.7 + 1.1) + 0.15 * Math.sin(3 * s + e * 2.3 + 2.4);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Vt(t) {
|
|
16
16
|
let n = t >>> 0;
|
|
17
17
|
return () => {
|
|
18
18
|
n = n + 1831565813 >>> 0;
|
|
@@ -20,51 +20,51 @@ function Gt(t) {
|
|
|
20
20
|
return e = e + Math.imul(e ^ e >>> 7, 61 | e) ^ e, ((e ^ e >>> 14) >>> 0) / 4294967296;
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
function
|
|
23
|
+
const M = (t) => Math.round(t * 100) / 100;
|
|
24
|
+
function te(t, n = 0.55, e = 0.62) {
|
|
25
25
|
const s = (t % 360 + 360) % 360, o = (1 - Math.abs(2 * e - 1)) * n, i = o * (1 - Math.abs(s / 60 % 2 - 1)), r = e - o / 2, [c, l, d] = s < 60 ? [o, i, 0] : s < 120 ? [i, o, 0] : s < 180 ? [0, o, i] : s < 240 ? [0, i, o] : s < 300 ? [i, 0, o] : [o, 0, i], u = (h) => Math.round((h + r) * 255).toString(16).padStart(2, "0");
|
|
26
26
|
return `#${u(c)}${u(l)}${u(d)}`;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const i = t.phase + n * t.speed *
|
|
30
|
-
let h = "",
|
|
31
|
-
for (let
|
|
32
|
-
const
|
|
33
|
-
|
|
28
|
+
function En(t, n, e, s, o = 1) {
|
|
29
|
+
const i = t.phase + n * t.speed * G, r = Math.cos(t.tilt), c = Math.sin(t.tilt), l = Math.sqrt(Math.max(0, 1 - t.k * t.k)), d = 64, u = t.sweep * G;
|
|
30
|
+
let h = "", p = "", f = null;
|
|
31
|
+
for (let A = 0; A <= d; A++) {
|
|
32
|
+
const _ = i + A / d * u, $ = Math.cos(_), b = Math.sin(_), m = t.a * ($ * r + b * -c * t.k) + t.cx, k = t.a * ($ * c + b * r * t.k) + t.cy, w = t.a * b * l < 0, I = M(m * e), j = M(k * e), F = w !== f ? "M" : "L";
|
|
33
|
+
w ? p += `${F}${I} ${j}` : h += `${F}${I} ${j}`, f = w;
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const y = Math.cos(t.tilt) * t.a * e, v = Math.sin(t.tilt) * t.a * e;
|
|
36
36
|
return {
|
|
37
37
|
id: s,
|
|
38
38
|
front: h,
|
|
39
|
-
back:
|
|
39
|
+
back: p,
|
|
40
40
|
width: t.width * e,
|
|
41
41
|
opacity: o,
|
|
42
42
|
grad: {
|
|
43
|
-
x1:
|
|
44
|
-
y1:
|
|
45
|
-
x2:
|
|
46
|
-
y2:
|
|
43
|
+
x1: M(t.cx * e - y),
|
|
44
|
+
y1: M(t.cy * e - v),
|
|
45
|
+
x2: M(t.cx * e + y),
|
|
46
|
+
y2: M(t.cy * e + v),
|
|
47
47
|
stops: [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
te(t.hue),
|
|
49
|
+
te(t.hue + t.hueSpan * 0.5),
|
|
50
|
+
te(t.hue + t.hueSpan)
|
|
51
51
|
]
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
const mt =
|
|
55
|
+
const mt = Vt(659918), be = Array.from({ length: 6 }, (t, n) => ({
|
|
56
56
|
a: 1.3 + mt() * 0.1,
|
|
57
57
|
k: 0.05 + mt() * 0.4,
|
|
58
58
|
tilt: n / 6 * Math.PI + mt() * 0.5,
|
|
59
59
|
speed: 3 + mt() * 0.7,
|
|
60
|
-
phase: mt() *
|
|
60
|
+
phase: mt() * G,
|
|
61
61
|
sweep: 0.6 + mt() * 0.25,
|
|
62
62
|
hue: n * 360 / 6 + mt() * 30,
|
|
63
63
|
hueSpan: 60 + mt() * 60,
|
|
64
64
|
width: 0.05 + mt() * 0.012,
|
|
65
65
|
cx: 0,
|
|
66
66
|
cy: 0.1
|
|
67
|
-
})),
|
|
67
|
+
})), Pn = Array.from({ length: 4 }, (t, n) => ({
|
|
68
68
|
a: 0.78 + n * 0.2,
|
|
69
69
|
k: 0.05 + n * 0.02,
|
|
70
70
|
tilt: -0.62 + n * 0.05,
|
|
@@ -76,28 +76,28 @@ const mt = Gt(659918), _e = Array.from({ length: 6 }, (t, n) => ({
|
|
|
76
76
|
width: 0.05,
|
|
77
77
|
cx: 0,
|
|
78
78
|
cy: -0.12
|
|
79
|
-
})),
|
|
79
|
+
})), ve = [-0.557, -0.013, 0.532], ke = 0.165, Ne = 1.25, $e = Vt(48879), On = Array.from({ length: 5 }, (t, n) => ({
|
|
80
80
|
birth: n * 0.2,
|
|
81
|
-
angle:
|
|
82
|
-
rho: 0.58 +
|
|
81
|
+
angle: $e() * G,
|
|
82
|
+
rho: 0.58 + $e() * 0.18
|
|
83
83
|
}));
|
|
84
|
-
function
|
|
84
|
+
function Sn(t, n) {
|
|
85
85
|
const e = [];
|
|
86
|
-
for (const s of
|
|
86
|
+
for (const s of On) {
|
|
87
87
|
const o = t - s.birth;
|
|
88
88
|
if (o < 0 || o > 0.62) continue;
|
|
89
89
|
const i = s.rho * Math.pow(0.75, o * 10), r = s.angle + o * 100 * Math.PI / 180;
|
|
90
90
|
e.push({
|
|
91
91
|
x: Math.cos(r) * i * n,
|
|
92
92
|
y: Math.sin(r) * i * n,
|
|
93
|
-
r: (0.04 + 0.028 *
|
|
94
|
-
depth:
|
|
95
|
-
opacity:
|
|
93
|
+
r: (0.04 + 0.028 * z(o / 0.55)) * n,
|
|
94
|
+
depth: z(1 - i / 0.8),
|
|
95
|
+
opacity: z(o / 0.06) * z((0.62 - o) / 0.08)
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
return e;
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const Ae = Vt(49383), jn = Array.from({ length: 4 }, (t, n) => {
|
|
101
101
|
const e = n - 1.5;
|
|
102
102
|
return {
|
|
103
103
|
a: 0.85 * (1 + e * 0.03),
|
|
@@ -106,27 +106,27 @@ const ve = Gt(49383), Cn = Array.from({ length: 4 }, (t, n) => {
|
|
|
106
106
|
tilt: 34 * Math.PI / 180 + e * 0.035,
|
|
107
107
|
speed: 210 / 360,
|
|
108
108
|
// measured phase shift: 10 to 20 degrees between ribbons, no more
|
|
109
|
-
phase: -n * 0.045 +
|
|
109
|
+
phase: -n * 0.045 + Ae() * 0.012,
|
|
110
110
|
sweep: 0.34,
|
|
111
|
-
hue: n * 85 +
|
|
111
|
+
hue: n * 85 + Ae() * 20,
|
|
112
112
|
hueSpan: 80,
|
|
113
113
|
width: 0.095,
|
|
114
114
|
cx: 0,
|
|
115
115
|
cy: 0
|
|
116
116
|
};
|
|
117
|
-
}),
|
|
118
|
-
function
|
|
117
|
+
}), qn = 0.129, Ln = "var(--backgrounds-bg-interactive)", Fn = -42, Me = 1.003, Hn = 0.15, Dn = 1.14, Yn = 0.054, ye = 15.46, ce = 0.186, le = 0.412, Ve = { yaw: 28.49, pitch: 28.62, roll: -13 }, Xt = (t) => t * Math.PI / 180;
|
|
118
|
+
function Gt(t, n, e) {
|
|
119
119
|
const s = Math.cos(e), o = Math.sin(e);
|
|
120
120
|
return [
|
|
121
121
|
[t[0] * s + n[0] * o, t[1] * s + n[1] * o, t[2] * s + n[2] * o],
|
|
122
122
|
[n[0] * s - t[0] * o, n[1] * s - t[1] * o, n[2] * s - t[2] * o]
|
|
123
123
|
];
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Ke(t, n, e = ye) {
|
|
126
126
|
let s = [0, 0, 1], o = [1, 0, 0], i = [0, 1, 0];
|
|
127
|
-
[s, o] =
|
|
127
|
+
[s, o] = Gt(s, o, Xt(t.yaw)), [i, s] = Gt(i, s, Xt(t.pitch)), [o, i] = Gt(o, i, Xt(t.roll));
|
|
128
128
|
const r = (c) => {
|
|
129
|
-
const [l, d] =
|
|
129
|
+
const [l, d] = Gt(s, o, Xt(e * c));
|
|
130
130
|
return {
|
|
131
131
|
x: l[0] * n,
|
|
132
132
|
y: l[1] * n,
|
|
@@ -139,171 +139,171 @@ function Ge(t, n, e = fe) {
|
|
|
139
139
|
};
|
|
140
140
|
return [r(-1), r(1)];
|
|
141
141
|
}
|
|
142
|
-
const
|
|
142
|
+
const we = Vt(24301), ze = (() => {
|
|
143
143
|
const t = [];
|
|
144
144
|
let n = 1.4;
|
|
145
145
|
for (; n < 900; )
|
|
146
|
-
t.push(n), n += 1.9 +
|
|
146
|
+
t.push(n), n += 1.9 + we() * 2.7, we() < 0.18 && (t.push(n), n += 0.24);
|
|
147
147
|
return t;
|
|
148
|
-
})(),
|
|
149
|
-
function
|
|
150
|
-
for (let n = 0; n <
|
|
151
|
-
const e =
|
|
148
|
+
})(), Un = 0.18;
|
|
149
|
+
function Xn(t) {
|
|
150
|
+
for (let n = 0; n < ze.length; n++) {
|
|
151
|
+
const e = ze[n];
|
|
152
152
|
if (t < e) break;
|
|
153
|
-
const s = (t - e) /
|
|
153
|
+
const s = (t - e) / Un;
|
|
154
154
|
if (s >= 0 && s <= 1)
|
|
155
155
|
return s < 0.45 ? 1 - s / 0.45 : (s - 0.45) / 0.55;
|
|
156
156
|
}
|
|
157
157
|
return 1;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Gn(t, n = {}) {
|
|
160
160
|
const { wander: e = 1, blink: s = !0, float: o = !0 } = n;
|
|
161
161
|
return {
|
|
162
|
-
dYaw: (
|
|
163
|
-
dPitch: (
|
|
164
|
-
dRoll:
|
|
165
|
-
lid: s ?
|
|
162
|
+
dYaw: (kt(t, 11.3, 0.4) * 5.5 + kt(t, 3.7, 2.1) * 1.6) * e,
|
|
163
|
+
dPitch: (kt(t, 9.1, 1.3) * 4.2 + kt(t, 4.3, 0.7) * 1.3) * e,
|
|
164
|
+
dRoll: kt(t, 13.7, 3.2) * 2.2 * e,
|
|
165
|
+
lid: s ? Xn(t) : 1,
|
|
166
166
|
// At rest the reference is almost still (centre stable to +-0.003, constant
|
|
167
167
|
// radius): all the life goes through the gaze and the blinks. Just enough is
|
|
168
168
|
// kept here not to freeze the image completely.
|
|
169
|
-
driftX: o ?
|
|
170
|
-
driftY: o ?
|
|
169
|
+
driftX: o ? kt(t, 7.9, 1.9) * 6e-3 : 0,
|
|
170
|
+
driftY: o ? kt(t, 5.3, 0.3) * 7e-3 : 0,
|
|
171
171
|
// Width is constant, only the height breathes very slightly.
|
|
172
172
|
breath: o ? 1 + Math.sin(t / 3.4 * Math.PI * 2) * 5e-3 : 1
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return 0.06 + 0.94 *
|
|
175
|
+
function Wn(t) {
|
|
176
|
+
return 0.06 + 0.94 * z(t);
|
|
177
177
|
}
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
],
|
|
178
|
+
const _t = (t, n, e = 0, s = 1) => ({ w: t, h: n, tilt: e, open: s }), ct = (t, n, e = 0, s = 1) => [
|
|
179
|
+
_t(t, n, e, s),
|
|
180
|
+
_t(t, n, -e, s)
|
|
181
|
+
], Q = { yaw: 0, pitch: 0, roll: 0 }, Ze = [
|
|
182
182
|
{
|
|
183
183
|
id: "neutral",
|
|
184
|
-
gaze: { ...
|
|
185
|
-
split:
|
|
186
|
-
eyes: [
|
|
184
|
+
gaze: { ...Q },
|
|
185
|
+
split: ye,
|
|
186
|
+
eyes: [_t(ce, le), _t(ce, le)]
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
id: "attentive",
|
|
190
|
-
gaze: { ...
|
|
190
|
+
gaze: { ...Q },
|
|
191
191
|
split: 16,
|
|
192
|
-
eyes:
|
|
192
|
+
eyes: ct(0.21, 0.44)
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
195
|
id: "surprised",
|
|
196
|
-
gaze: { ...
|
|
196
|
+
gaze: { ...Q },
|
|
197
197
|
split: 19,
|
|
198
|
-
eyes:
|
|
198
|
+
eyes: ct(0.45, 0.47)
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
201
|
id: "excited",
|
|
202
|
-
gaze: { ...
|
|
202
|
+
gaze: { ...Q },
|
|
203
203
|
split: 19.5,
|
|
204
|
-
eyes:
|
|
204
|
+
eyes: ct(0.4, 0.56, -10)
|
|
205
205
|
},
|
|
206
206
|
{
|
|
207
207
|
// eyes narrowed into arcs: the tops converge slightly
|
|
208
208
|
id: "happy",
|
|
209
|
-
gaze: { ...
|
|
209
|
+
gaze: { ...Q },
|
|
210
210
|
split: 17,
|
|
211
|
-
eyes:
|
|
211
|
+
eyes: ct(0.27, 0.17, 14)
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
id: "laughing",
|
|
215
|
-
gaze: { ...
|
|
215
|
+
gaze: { ...Q },
|
|
216
216
|
split: 18,
|
|
217
|
-
eyes:
|
|
217
|
+
eyes: ct(0.34, 0.13, 20)
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
220
|
// eye tops converging hard towards the centre + narrowed eyes
|
|
221
221
|
id: "angry",
|
|
222
|
-
gaze: { ...
|
|
222
|
+
gaze: { ...Q },
|
|
223
223
|
split: 17,
|
|
224
|
-
eyes:
|
|
224
|
+
eyes: ct(0.34, 0.15, 30)
|
|
225
225
|
},
|
|
226
226
|
{
|
|
227
227
|
// the reverse: the eye tops diverge
|
|
228
228
|
id: "sad",
|
|
229
|
-
gaze: { ...
|
|
229
|
+
gaze: { ...Q },
|
|
230
230
|
split: 16,
|
|
231
|
-
eyes:
|
|
231
|
+
eyes: ct(0.22, 0.4, -28)
|
|
232
232
|
},
|
|
233
233
|
{
|
|
234
234
|
id: "scared",
|
|
235
|
-
gaze: { ...
|
|
235
|
+
gaze: { ...Q },
|
|
236
236
|
split: 20.5,
|
|
237
|
-
eyes:
|
|
237
|
+
eyes: ct(0.4, 0.6)
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
240
|
// one eye distinctly more closed than the other
|
|
241
241
|
id: "suspicious",
|
|
242
|
-
gaze: { ...
|
|
242
|
+
gaze: { ...Q },
|
|
243
243
|
split: 16,
|
|
244
|
-
eyes: [
|
|
244
|
+
eyes: [_t(0.21, 0.4), _t(0.22, 0.15)]
|
|
245
245
|
},
|
|
246
246
|
{
|
|
247
247
|
// asymmetric on both axes: mismatched sizes AND tilts.
|
|
248
248
|
// The narrowed eye is deliberately flat (ratio 1.6): at a ratio near 1 it
|
|
249
249
|
// would read as round and its tilt would not show.
|
|
250
250
|
id: "confused",
|
|
251
|
-
gaze: { ...
|
|
251
|
+
gaze: { ...Q },
|
|
252
252
|
split: 16.5,
|
|
253
|
-
eyes: [
|
|
253
|
+
eyes: [_t(0.2, 0.44, -18), _t(0.28, 0.17, 14)]
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
id: "curious",
|
|
257
|
-
gaze: { ...
|
|
257
|
+
gaze: { ...Q },
|
|
258
258
|
split: 16.5,
|
|
259
|
-
eyes: [
|
|
259
|
+
eyes: [_t(0.24, 0.46, -8), _t(0.2, 0.38, -8)]
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
262
|
id: "proud",
|
|
263
|
-
gaze: { ...
|
|
263
|
+
gaze: { ...Q },
|
|
264
264
|
split: 17,
|
|
265
|
-
eyes:
|
|
265
|
+
eyes: ct(0.3, 0.15, 18)
|
|
266
266
|
},
|
|
267
267
|
{
|
|
268
268
|
id: "shy",
|
|
269
|
-
gaze: { ...
|
|
269
|
+
gaze: { ...Q },
|
|
270
270
|
split: 14,
|
|
271
|
-
eyes:
|
|
271
|
+
eyes: ct(0.17, 0.3)
|
|
272
272
|
},
|
|
273
273
|
{
|
|
274
274
|
// horizontal slits
|
|
275
275
|
id: "unimpressed",
|
|
276
|
-
gaze: { ...
|
|
276
|
+
gaze: { ...Q },
|
|
277
277
|
split: 16,
|
|
278
|
-
eyes:
|
|
278
|
+
eyes: ct(0.3, 0.12)
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
281
|
// half-dropped lids: goes through `open`, i.e. the vertical squash on screen,
|
|
282
282
|
// the same mechanism as a blink
|
|
283
283
|
id: "sleepy",
|
|
284
|
-
gaze: { ...
|
|
284
|
+
gaze: { ...Q },
|
|
285
285
|
split: 16,
|
|
286
|
-
eyes:
|
|
286
|
+
eyes: ct(0.2, 0.42, 0, 0.42)
|
|
287
287
|
}
|
|
288
|
-
],
|
|
289
|
-
w:
|
|
290
|
-
h:
|
|
291
|
-
tilt:
|
|
292
|
-
open:
|
|
288
|
+
], Qn = new Map(Ze.map((t) => [t.id, t])), Vn = "neutral", Ie = (t, n, e) => ({
|
|
289
|
+
w: R(t.w, n.w, e),
|
|
290
|
+
h: R(t.h, n.h, e),
|
|
291
|
+
tilt: R(t.tilt ?? 0, n.tilt ?? 0, e),
|
|
292
|
+
open: R(t.open, n.open, e)
|
|
293
293
|
});
|
|
294
|
-
function
|
|
294
|
+
function Kn(t, n, e) {
|
|
295
295
|
return {
|
|
296
296
|
id: n.id,
|
|
297
297
|
gaze: {
|
|
298
|
-
yaw:
|
|
299
|
-
pitch:
|
|
300
|
-
roll:
|
|
298
|
+
yaw: R(t.gaze.yaw, n.gaze.yaw, e),
|
|
299
|
+
pitch: R(t.gaze.pitch, n.gaze.pitch, e),
|
|
300
|
+
roll: R(t.gaze.roll, n.gaze.roll, e)
|
|
301
301
|
},
|
|
302
|
-
split:
|
|
303
|
-
eyes: [
|
|
302
|
+
split: R(t.split, n.split, e),
|
|
303
|
+
eyes: [Ie(t.eyes[0], n.eyes[0], e), Ie(t.eyes[1], n.eyes[1], e)]
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
|
-
const
|
|
306
|
+
const st = 64, Zn = {
|
|
307
307
|
// egg: same height as the ball, narrowed
|
|
308
308
|
// frame 164, measured footprint 1.647 x 2.000
|
|
309
309
|
egg: [0.8369, 0.8424, 0.8497, 0.8585, 0.8674, 0.8775, 0.8878, 0.8983, 0.9089, 0.9185, 0.9288, 0.9374, 0.9445, 0.9504, 0.9543, 0.9559, 0.9555, 0.9519, 0.9466, 0.9389, 0.9302, 0.9193, 0.9085, 0.8969, 0.8852, 0.8734, 0.8625, 0.8513, 0.8411, 0.8325, 0.8243, 0.8179, 0.8137, 0.8112, 0.8102, 0.8128, 0.8178, 0.8262, 0.8374, 0.8518, 0.8702, 0.8922, 0.9169, 0.9446, 0.9741, 1.0023, 1.0267, 1.0433, 1.0481, 1.0393, 1.0216, 0.997, 0.9697, 0.9418, 0.9169, 0.8949, 0.876, 0.8604, 0.849, 0.8394, 0.8337, 0.8314, 0.8305, 0.8326],
|
|
@@ -313,10 +313,10 @@ const tt = 64, Vn = {
|
|
|
313
313
|
// triangle, point up, very rounded corners
|
|
314
314
|
// frame 190, measured footprint 1.995 x 1.884
|
|
315
315
|
triangle: [0.7819, 0.8211, 0.8747, 0.944, 1.0223, 1.096, 1.1401, 1.134, 1.0808, 1.0047, 0.9265, 0.8603, 0.8104, 0.773, 0.745, 0.7273, 0.7151, 0.7118, 0.7148, 0.7245, 0.7427, 0.768, 0.8037, 0.8518, 0.9148, 0.9876, 1.0583, 1.1073, 1.1109, 1.0667, 0.994, 0.9164, 0.8482, 0.7948, 0.7555, 0.7261, 0.7056, 0.6925, 0.6859, 0.6869, 0.6938, 0.7084, 0.7305, 0.7615, 0.804, 0.8595, 0.9311, 1.0092, 1.0791, 1.1171, 1.1054, 1.0501, 0.9779, 0.905, 0.845, 0.799, 0.7656, 0.7413, 0.7258, 0.716, 0.7146, 0.7204, 0.733, 0.7528]
|
|
316
|
-
},
|
|
317
|
-
function
|
|
316
|
+
}, ge = Array.from({ length: st }, (t, n) => n / st * G), Kt = ge.map(Math.cos), Zt = ge.map(Math.sin);
|
|
317
|
+
function de(t, n = {}) {
|
|
318
318
|
return {
|
|
319
|
-
radii: [...
|
|
319
|
+
radii: [...Zn[t]],
|
|
320
320
|
rot: 0,
|
|
321
321
|
cx: 0,
|
|
322
322
|
cy: 0,
|
|
@@ -325,9 +325,9 @@ function ce(t, n = {}) {
|
|
|
325
325
|
...n
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Rt(t, n = {}) {
|
|
329
329
|
return {
|
|
330
|
-
radii: new Array(
|
|
330
|
+
radii: new Array(st).fill(t),
|
|
331
331
|
rot: 0,
|
|
332
332
|
cx: 0,
|
|
333
333
|
cy: 0,
|
|
@@ -336,82 +336,82 @@ function It(t, n = {}) {
|
|
|
336
336
|
...n
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function Jn(t, n, e, s) {
|
|
340
340
|
const o = s ?? {
|
|
341
|
-
radii: new Array(
|
|
341
|
+
radii: new Array(st),
|
|
342
342
|
rot: 0,
|
|
343
343
|
cx: 0,
|
|
344
344
|
cy: 0,
|
|
345
345
|
sx: 1,
|
|
346
346
|
sy: 1
|
|
347
347
|
};
|
|
348
|
-
for (let r = 0; r <
|
|
349
|
-
o.radii[r] =
|
|
348
|
+
for (let r = 0; r < st; r++)
|
|
349
|
+
o.radii[r] = R(t.radii[r] ?? 1, n.radii[r] ?? 1, e);
|
|
350
350
|
let i = n.rot - t.rot;
|
|
351
|
-
for (; i > Math.PI; ) i -=
|
|
352
|
-
for (; i < -Math.PI; ) i +=
|
|
353
|
-
return o.rot = t.rot + i * e, o.cx =
|
|
351
|
+
for (; i > Math.PI; ) i -= G;
|
|
352
|
+
for (; i < -Math.PI; ) i += G;
|
|
353
|
+
return o.rot = t.rot + i * e, o.cx = R(t.cx, n.cx, e), o.cy = R(t.cy, n.cy, e), o.sx = R(t.sx, n.sx, e), o.sy = R(t.sy, n.sy, e), o;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function ue(t, n, e = []) {
|
|
356
356
|
const s = Math.cos(t.rot), o = Math.sin(t.rot);
|
|
357
|
-
for (let i = 0; i <
|
|
358
|
-
const r = t.radii[i] ?? 1, c = r * (
|
|
357
|
+
for (let i = 0; i < st; i++) {
|
|
358
|
+
const r = t.radii[i] ?? 1, c = r * (Kt[i] ?? 0), l = r * (Zt[i] ?? 0), d = c * s - l * o, u = c * o + l * s, h = e[i] ?? { x: 0, y: 0 };
|
|
359
359
|
h.x = (d * t.sx + t.cx) * n, h.y = (u * t.sy + t.cy) * n, e[i] = h;
|
|
360
360
|
}
|
|
361
|
-
return e.length =
|
|
361
|
+
return e.length = st, e;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function ts(t, n = 1 / 6) {
|
|
364
364
|
const e = t.length;
|
|
365
365
|
if (e < 3) return "";
|
|
366
366
|
const s = t[0];
|
|
367
|
-
let o = `M${
|
|
367
|
+
let o = `M${M(s.x)} ${M(s.y)}`;
|
|
368
368
|
for (let i = 0; i < e; i++) {
|
|
369
|
-
const r = t[(i - 1 + e) % e], c = t[i], l = t[(i + 1) % e], d = t[(i + 2) % e], u = c.x + (l.x - r.x) * n, h = c.y + (l.y - r.y) * n,
|
|
370
|
-
o += `C${
|
|
369
|
+
const r = t[(i - 1 + e) % e], c = t[i], l = t[(i + 1) % e], d = t[(i + 2) % e], u = c.x + (l.x - r.x) * n, h = c.y + (l.y - r.y) * n, p = l.x - (d.x - c.x) * n, f = l.y - (d.y - c.y) * n;
|
|
370
|
+
o += `C${M(u)} ${M(h)} ${M(p)} ${M(f)} ${M(l.x)} ${M(l.y)}`;
|
|
371
371
|
}
|
|
372
372
|
return `${o}Z`;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
const s = new Array(
|
|
376
|
-
for (let i = 0; i <
|
|
377
|
-
const r =
|
|
374
|
+
function Ht(t, n, e) {
|
|
375
|
+
const s = new Array(st).fill(0), o = t.length;
|
|
376
|
+
for (let i = 0; i < st; i++) {
|
|
377
|
+
const r = Kt[i] ?? 0, c = Zt[i] ?? 0;
|
|
378
378
|
let l = 0;
|
|
379
379
|
for (let d = 0; d < o; d++) {
|
|
380
|
-
const u = t[d], h = t[(d + 1) % o],
|
|
381
|
-
if (Math.abs(
|
|
382
|
-
const
|
|
383
|
-
|
|
380
|
+
const u = t[d], h = t[(d + 1) % o], p = h.x - u.x, f = h.y - u.y, y = r * f - c * p;
|
|
381
|
+
if (Math.abs(y) < 1e-9) continue;
|
|
382
|
+
const v = u.x - n, A = u.y - e, _ = (v * f - A * p) / y, $ = (v * c - A * r) / y;
|
|
383
|
+
_ > l && $ >= 0 && $ <= 1 && (l = _);
|
|
384
384
|
}
|
|
385
385
|
s[i] = l;
|
|
386
386
|
}
|
|
387
387
|
return s;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
const c = s - t, l = o - n, d = Math.hypot(c, l) || 1e-6, u = Math.atan2(l, c), h = Math.acos(Math.max(-1, Math.min(1, (e - i) / d))),
|
|
391
|
-
for (let
|
|
392
|
-
const
|
|
393
|
-
|
|
389
|
+
function Dt(t, n, e, s, o, i, r = 96) {
|
|
390
|
+
const c = s - t, l = o - n, d = Math.hypot(c, l) || 1e-6, u = Math.atan2(l, c), h = Math.acos(Math.max(-1, Math.min(1, (e - i) / d))), p = [];
|
|
391
|
+
for (let f = 0; f <= r / 2; f++) {
|
|
392
|
+
const y = u + h + (G - 2 * h) * f / (r / 2);
|
|
393
|
+
p.push({ x: t + Math.cos(y) * e, y: n + Math.sin(y) * e });
|
|
394
394
|
}
|
|
395
|
-
for (let
|
|
396
|
-
const
|
|
397
|
-
|
|
395
|
+
for (let f = 0; f <= r / 2; f++) {
|
|
396
|
+
const y = u - h + 2 * h * f / (r / 2);
|
|
397
|
+
p.push({ x: s + Math.cos(y) * i, y: o + Math.sin(y) * i });
|
|
398
398
|
}
|
|
399
|
-
return
|
|
399
|
+
return p;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
const e = t.length, s = (n /
|
|
403
|
-
return
|
|
401
|
+
function Je(t, n) {
|
|
402
|
+
const e = t.length, s = (n / G % 1 + 1) % 1 * e, o = Math.floor(s);
|
|
403
|
+
return R(t[o % e] ?? 1, t[(o + 1) % e] ?? 1, s - o);
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
return
|
|
407
|
-
const i = Math.abs((
|
|
405
|
+
function es(t, n = 1, e = 1) {
|
|
406
|
+
return ge.map((s, o) => {
|
|
407
|
+
const i = Math.abs((Kt[o] ?? 0) / n) ** t, r = Math.abs((Zt[o] ?? 0) / e) ** t;
|
|
408
408
|
return (i + r) ** (-1 / t);
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
|
-
function
|
|
412
|
-
const n = new Array(
|
|
413
|
-
for (let e = 0; e <
|
|
414
|
-
const s =
|
|
411
|
+
function ns(t) {
|
|
412
|
+
const n = new Array(st).fill(0);
|
|
413
|
+
for (let e = 0; e < st; e++) {
|
|
414
|
+
const s = Kt[e] ?? 0, o = Zt[e] ?? 0;
|
|
415
415
|
let i = 0;
|
|
416
416
|
for (const r of t) {
|
|
417
417
|
const c = s * r.x + o * r.y, l = c * c - (r.x * r.x + r.y * r.y - r.r * r.r);
|
|
@@ -423,57 +423,57 @@ function ts(t) {
|
|
|
423
423
|
}
|
|
424
424
|
return n;
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function ss(t, n, e = 10) {
|
|
427
427
|
const s = t.length, o = [], i = (r, c) => {
|
|
428
428
|
const l = c.x - r.x, d = c.y - r.y, u = Math.hypot(l, d) || 1;
|
|
429
429
|
return Math.atan2(-l / u, d / u);
|
|
430
430
|
};
|
|
431
431
|
for (let r = 0; r < s; r++) {
|
|
432
432
|
const c = t[(r - 1 + s) % s], l = t[r], d = t[(r + 1) % s], u = i(c, l);
|
|
433
|
-
let
|
|
434
|
-
for (;
|
|
435
|
-
for (;
|
|
436
|
-
for (let
|
|
437
|
-
const
|
|
438
|
-
o.push({ x: l.x + Math.cos(
|
|
433
|
+
let p = i(l, d) - u;
|
|
434
|
+
for (; p > Math.PI; ) p -= G;
|
|
435
|
+
for (; p < -Math.PI; ) p += G;
|
|
436
|
+
for (let f = 0; f <= e; f++) {
|
|
437
|
+
const y = u + p * f / e;
|
|
438
|
+
o.push({ x: l.x + Math.cos(y) * n, y: l.y + Math.sin(y) * n });
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
return o;
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function Re(t, n, e, s = 0) {
|
|
444
444
|
const o = s * Math.PI / 180, i = Array.from({ length: t }, (r, c) => {
|
|
445
|
-
const l = o + c / t *
|
|
445
|
+
const l = o + c / t * G;
|
|
446
446
|
return { x: Math.cos(l) * (n - e), y: Math.sin(l) * (n - e) };
|
|
447
447
|
});
|
|
448
|
-
return
|
|
448
|
+
return Ht(ss(i, e), 0, 0);
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function os(t, n = 1) {
|
|
451
451
|
if (t.length < 3) return "";
|
|
452
452
|
let e = "";
|
|
453
453
|
for (let s = 0; s < t.length; s++) {
|
|
454
454
|
const o = t[s];
|
|
455
|
-
e += `${s === 0 ? "M" : "L"}${
|
|
455
|
+
e += `${s === 0 ? "M" : "L"}${M(o.x * n)} ${M(o.y * n)}`;
|
|
456
456
|
}
|
|
457
457
|
return `${e}Z`;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function rs(t, n) {
|
|
460
460
|
const e = Math.max(t, 0.01) / 2, s = Math.max(n, 0.01) / 2, o = Math.min(e, s);
|
|
461
|
-
return `M${
|
|
461
|
+
return `M${M(-e)} ${M(-s + o)}A${M(o)} ${M(o)} 0 0 1 ${M(-e + o)} ${M(-s)}L${M(e - o)} ${M(-s)}A${M(o)} ${M(o)} 0 0 1 ${M(e)} ${M(-s + o)}L${M(e)} ${M(s - o)}A${M(o)} ${M(o)} 0 0 1 ${M(e - o)} ${M(s)}L${M(-e + o)} ${M(s)}A${M(o)} ${M(o)} 0 0 1 ${M(-e)} ${M(s - o)}Z`;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function Jt(t, n = 1) {
|
|
464
464
|
const e = Math.max(...t);
|
|
465
465
|
if (e <= 0) return t;
|
|
466
466
|
const s = n / e;
|
|
467
467
|
return t.map((o) => o * s);
|
|
468
468
|
}
|
|
469
|
-
const
|
|
470
|
-
{ length:
|
|
471
|
-
(t, n) => n /
|
|
472
|
-
),
|
|
473
|
-
|
|
469
|
+
const is = Array.from(
|
|
470
|
+
{ length: st },
|
|
471
|
+
(t, n) => n / st * Math.PI * 2
|
|
472
|
+
), as = Jt(
|
|
473
|
+
is.map((t) => 1 + 0.075 * Math.cos(2 * t + 0.5) + 0.035 * Math.cos(3 * t + 2.1)),
|
|
474
474
|
1.02
|
|
475
|
-
),
|
|
476
|
-
|
|
475
|
+
), cs = Jt(
|
|
476
|
+
ns([
|
|
477
477
|
{ x: -0.44, y: 0.2, r: 0.54 },
|
|
478
478
|
{ x: 0.46, y: 0.2, r: 0.5 },
|
|
479
479
|
{ x: 0.02, y: 0.3, r: 0.6 },
|
|
@@ -481,23 +481,23 @@ const os = Array.from(
|
|
|
481
481
|
{ x: 0.3, y: -0.24, r: 0.44 }
|
|
482
482
|
]),
|
|
483
483
|
1.02
|
|
484
|
-
),
|
|
485
|
-
|
|
484
|
+
), ls = Jt(
|
|
485
|
+
Ht(Dt(0, 0.28, 0.66, 0, -0.96, 0.05), 0, 0),
|
|
486
486
|
1.04
|
|
487
|
-
),
|
|
488
|
-
{ id: "circle", radii: new Array(
|
|
489
|
-
{ id: "pebble", radii:
|
|
487
|
+
), ds = Ht(Dt(-0.42, 0, 0.62, 0.42, 0, 0.62), 0, 0), tn = [
|
|
488
|
+
{ id: "circle", radii: new Array(st).fill(1) },
|
|
489
|
+
{ id: "pebble", radii: as },
|
|
490
490
|
// 1.15 and not 1.02: on a superellipse the peak radius is the diagonal, so
|
|
491
491
|
// normalising on it yields a shape that looks smaller than the circle.
|
|
492
|
-
{ id: "squircle", radii:
|
|
493
|
-
{ id: "capsule", radii:
|
|
492
|
+
{ id: "squircle", radii: Jt(es(4.2), 1.15) },
|
|
493
|
+
{ id: "capsule", radii: ds },
|
|
494
494
|
// -90deg: one vertex towards the top of the screen (y points down)
|
|
495
|
-
{ id: "triangle", radii:
|
|
495
|
+
{ id: "triangle", radii: Re(3, 1.12, 0.34, -90) },
|
|
496
496
|
// 0deg: vertices left and right, so the top and bottom edges come out flat
|
|
497
|
-
{ id: "hexagon", radii:
|
|
498
|
-
{ id: "cloud", radii:
|
|
499
|
-
{ id: "droplet", radii:
|
|
500
|
-
],
|
|
497
|
+
{ id: "hexagon", radii: Re(6, 1.04, 0.26, 0) },
|
|
498
|
+
{ id: "cloud", radii: cs },
|
|
499
|
+
{ id: "droplet", radii: ls }
|
|
500
|
+
], us = new Map(tn.map((t) => [t.id, t])), hs = "circle", fs = [
|
|
501
501
|
{ id: "ink", hex: "var(--novi-color-ink)" },
|
|
502
502
|
{ id: "brown", hex: "var(--novi-color-brown)" },
|
|
503
503
|
{ id: "red", hex: "var(--novi-color-red)" },
|
|
@@ -510,26 +510,26 @@ const os = Array.from(
|
|
|
510
510
|
{ id: "pink", hex: "var(--novi-color-pink)" },
|
|
511
511
|
{ id: "gray", hex: "var(--novi-color-gray)" },
|
|
512
512
|
{ id: "cream", hex: "var(--novi-color-cream)" }
|
|
513
|
-
],
|
|
514
|
-
function
|
|
513
|
+
], ps = new Map(fs.map((t) => [t.id, t])), _s = "ink";
|
|
514
|
+
function ms(t, n, e) {
|
|
515
515
|
const s = (c) => {
|
|
516
516
|
const l = parseInt(c.slice(1), 16);
|
|
517
517
|
return [l >> 16 & 255, l >> 8 & 255, l & 255];
|
|
518
518
|
}, o = s(t), i = s(n);
|
|
519
519
|
return `#${o.map((c, l) => Math.round(c + (i[l] - c) * e)).map((c) => c.toString(16).padStart(2, "0")).join("")}`;
|
|
520
520
|
}
|
|
521
|
-
const
|
|
521
|
+
const Mt = (t, n) => [
|
|
522
522
|
{ w: t, h: n, open: 1 },
|
|
523
523
|
{ w: t, h: n, open: 1 }
|
|
524
524
|
];
|
|
525
|
-
function
|
|
525
|
+
function J(t = {}) {
|
|
526
526
|
return {
|
|
527
|
-
sil:
|
|
527
|
+
sil: Rt(1),
|
|
528
528
|
offX: 0,
|
|
529
529
|
offY: 0,
|
|
530
|
-
gaze: { ...
|
|
531
|
-
split:
|
|
532
|
-
eyes:
|
|
530
|
+
gaze: { ...Ve },
|
|
531
|
+
split: ye,
|
|
532
|
+
eyes: Mt(ce, le),
|
|
533
533
|
eyeAlpha: 1,
|
|
534
534
|
bodyAlpha: 1,
|
|
535
535
|
dots: [],
|
|
@@ -539,39 +539,39 @@ function W(t = {}) {
|
|
|
539
539
|
...t
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
const
|
|
543
|
-
|
|
542
|
+
const en = -0.1875, ys = Ht(
|
|
543
|
+
Dt(0, -0.505, 0.132, 0, 0.13, 0.075),
|
|
544
544
|
0,
|
|
545
|
-
|
|
546
|
-
),
|
|
547
|
-
radii: [...
|
|
545
|
+
en
|
|
546
|
+
), gs = Ht(Dt(0, -0.2535, 0.1345, 0, 0.2535, 0.1345), 0, 0), xs = (t = {}) => ({
|
|
547
|
+
radii: [...ys],
|
|
548
548
|
rot: 0,
|
|
549
549
|
cx: 0,
|
|
550
|
-
cy:
|
|
550
|
+
cy: en,
|
|
551
551
|
sx: 1,
|
|
552
552
|
sy: 1,
|
|
553
553
|
...t
|
|
554
|
-
}),
|
|
555
|
-
radii: [...
|
|
554
|
+
}), bs = (t = {}) => ({
|
|
555
|
+
radii: [...gs],
|
|
556
556
|
rot: 0,
|
|
557
557
|
cx: 0,
|
|
558
558
|
cy: 0,
|
|
559
559
|
sx: 1,
|
|
560
560
|
sy: 1,
|
|
561
561
|
...t
|
|
562
|
-
}),
|
|
563
|
-
function
|
|
564
|
-
return
|
|
562
|
+
}), vs = os(Dt(0, 0, 0.118, 0, 0.172, 0.012)), Be = 0.213;
|
|
563
|
+
function Te(t) {
|
|
564
|
+
return de("triangle", {
|
|
565
565
|
rot: t,
|
|
566
|
-
cx: -
|
|
567
|
-
cy:
|
|
566
|
+
cx: -Be * Math.sin(t),
|
|
567
|
+
cy: Be * Math.cos(t)
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
const e = ((t - n * 0.5) / 1.5 % 1 + 1) % 1, s = e < 0.5 ? 0.5 - 0.5 * Math.cos(e *
|
|
572
|
-
return
|
|
570
|
+
function Ce(t, n) {
|
|
571
|
+
const e = ((t - n * 0.5) / 1.5 % 1 + 1) % 1, s = e < 0.5 ? 0.5 - 0.5 * Math.cos(e * G) : 0;
|
|
572
|
+
return z(s * 2);
|
|
573
573
|
}
|
|
574
|
-
const
|
|
574
|
+
const nn = [
|
|
575
575
|
{
|
|
576
576
|
id: "idle",
|
|
577
577
|
duration: 2.4,
|
|
@@ -579,7 +579,7 @@ const Ze = [
|
|
|
579
579
|
blinkIn: !1,
|
|
580
580
|
baseFace: !0,
|
|
581
581
|
baseBody: !0,
|
|
582
|
-
pose: () =>
|
|
582
|
+
pose: () => J()
|
|
583
583
|
},
|
|
584
584
|
{
|
|
585
585
|
id: "thinking",
|
|
@@ -589,17 +589,17 @@ const Ze = [
|
|
|
589
589
|
baseBody: !1,
|
|
590
590
|
blinkIn: !0,
|
|
591
591
|
pose: (t) => {
|
|
592
|
-
const n =
|
|
593
|
-
return
|
|
592
|
+
const n = Ce(t, 1), e = 0.3 + 0.7 * V.easeOutCubic(z(t / 0.3));
|
|
593
|
+
return J({
|
|
594
594
|
// the ball BECOMES the middle dot: the morph stays continuous
|
|
595
|
-
sil:
|
|
595
|
+
sil: Rt(ke * (1 + (Ne - 1) * n), { cx: ve[1] }),
|
|
596
596
|
eyeAlpha: 0,
|
|
597
597
|
dots: [0, 2].map((s) => {
|
|
598
|
-
const o =
|
|
598
|
+
const o = Ce(t, s);
|
|
599
599
|
return {
|
|
600
|
-
x:
|
|
600
|
+
x: ve[s] * e,
|
|
601
601
|
y: 0,
|
|
602
|
-
r:
|
|
602
|
+
r: ke * (1 + (Ne - 1) * o),
|
|
603
603
|
opacity: 0.55 + 0.45 * o
|
|
604
604
|
};
|
|
605
605
|
})
|
|
@@ -613,7 +613,7 @@ const Ze = [
|
|
|
613
613
|
blinkIn: !0,
|
|
614
614
|
baseFace: !1,
|
|
615
615
|
baseBody: !0,
|
|
616
|
-
pose: () =>
|
|
616
|
+
pose: () => J({
|
|
617
617
|
gaze: { yaw: -5.37, pitch: 4.55, roll: 6.7 },
|
|
618
618
|
split: 16.25,
|
|
619
619
|
// The closed eye is not the open eye squashed: it is a horizontal dash
|
|
@@ -631,10 +631,10 @@ const Ze = [
|
|
|
631
631
|
blinkIn: !0,
|
|
632
632
|
baseFace: !1,
|
|
633
633
|
baseBody: !0,
|
|
634
|
-
pose: () =>
|
|
634
|
+
pose: () => J({
|
|
635
635
|
gaze: { yaw: 6.92, pitch: -21.96, roll: 11.6 },
|
|
636
636
|
split: 18.43,
|
|
637
|
-
eyes:
|
|
637
|
+
eyes: Mt(0.356, 0.875)
|
|
638
638
|
})
|
|
639
639
|
},
|
|
640
640
|
{
|
|
@@ -647,9 +647,9 @@ const Ze = [
|
|
|
647
647
|
baseBody: !1,
|
|
648
648
|
blinkIn: !1,
|
|
649
649
|
pose: (t) => {
|
|
650
|
-
const n =
|
|
651
|
-
return
|
|
652
|
-
sil:
|
|
650
|
+
const n = z(t / 1.5), e = V.easeInOutCubic(n) * 0.82 - 0.087, s = t > 1.6 ? z((t - 1.6) / 0.4) : 0, o = e * (1 - s) + 0.1 * s, i = Math.sin(t * 2.5 * G) * 5e-3, r = 17.7 * Math.PI / 180;
|
|
651
|
+
return J({
|
|
652
|
+
sil: bs({ rot: r, cx: o, cy: -0.325 - i }),
|
|
653
653
|
eyeAlpha: 0,
|
|
654
654
|
dots: [
|
|
655
655
|
{
|
|
@@ -657,7 +657,7 @@ const Ze = [
|
|
|
657
657
|
x: o - Math.sin(r) * 0.58,
|
|
658
658
|
y: -0.325 + Math.cos(r) * 0.58 + i * 2.8,
|
|
659
659
|
r: 0.118,
|
|
660
|
-
d:
|
|
660
|
+
d: vs,
|
|
661
661
|
rot: r * 180 / Math.PI,
|
|
662
662
|
opacity: 1
|
|
663
663
|
}
|
|
@@ -673,17 +673,17 @@ const Ze = [
|
|
|
673
673
|
baseFace: !1,
|
|
674
674
|
baseBody: !0,
|
|
675
675
|
pose: (t) => {
|
|
676
|
-
const n =
|
|
677
|
-
return
|
|
676
|
+
const n = z(t / 0.45), e = 1 + (Dn - 1) * Math.sin(n * Math.PI) * (1 - n * 0.35), s = Hn * (n < 1 ? e : 1), o = Fn * Math.PI / 180;
|
|
677
|
+
return J({
|
|
678
678
|
// the gaze goes to the opposite side from the pip
|
|
679
679
|
gaze: { yaw: -21.94, pitch: -5.82, roll: -12.2 },
|
|
680
680
|
split: 18.89,
|
|
681
|
-
eyes:
|
|
681
|
+
eyes: Mt(0.505, 0.498),
|
|
682
682
|
notif: {
|
|
683
|
-
x: Math.cos(o) *
|
|
684
|
-
y: Math.sin(o) *
|
|
683
|
+
x: Math.cos(o) * Me,
|
|
684
|
+
y: Math.sin(o) * Me,
|
|
685
685
|
r: s,
|
|
686
|
-
notch: s +
|
|
686
|
+
notch: s + Yn
|
|
687
687
|
}
|
|
688
688
|
});
|
|
689
689
|
}
|
|
@@ -695,8 +695,8 @@ const Ze = [
|
|
|
695
695
|
baseFace: !1,
|
|
696
696
|
baseBody: !1,
|
|
697
697
|
blinkIn: !1,
|
|
698
|
-
pose: () =>
|
|
699
|
-
sil:
|
|
698
|
+
pose: () => J({
|
|
699
|
+
sil: xs(),
|
|
700
700
|
eyeAlpha: 0,
|
|
701
701
|
dots: [{ x: -0.012, y: 0.526, r: 0.113, opacity: 1 }]
|
|
702
702
|
})
|
|
@@ -708,9 +708,9 @@ const Ze = [
|
|
|
708
708
|
baseFace: !1,
|
|
709
709
|
baseBody: !1,
|
|
710
710
|
blinkIn: !1,
|
|
711
|
-
pose: (t) =>
|
|
711
|
+
pose: (t) => J({
|
|
712
712
|
// Measured vertical bounce: +-0.19 about +0.11, period 0.6 s.
|
|
713
|
-
sil:
|
|
713
|
+
sil: Rt(0.1585, { cy: 0.11 + Math.sin(t * (G / 0.6)) * 0.19 }),
|
|
714
714
|
eyeAlpha: 0
|
|
715
715
|
})
|
|
716
716
|
},
|
|
@@ -721,12 +721,12 @@ const Ze = [
|
|
|
721
721
|
baseFace: !1,
|
|
722
722
|
baseBody: !1,
|
|
723
723
|
blinkIn: !0,
|
|
724
|
-
pose: () =>
|
|
725
|
-
sil:
|
|
724
|
+
pose: () => J({
|
|
725
|
+
sil: de("egg"),
|
|
726
726
|
gaze: { yaw: 19.97, pitch: 26.01, roll: -17.1 },
|
|
727
727
|
// the eyes narrow along with the body
|
|
728
728
|
split: 11.07,
|
|
729
|
-
eyes:
|
|
729
|
+
eyes: Mt(0.164, 0.385)
|
|
730
730
|
})
|
|
731
731
|
},
|
|
732
732
|
{
|
|
@@ -736,11 +736,11 @@ const Ze = [
|
|
|
736
736
|
baseFace: !1,
|
|
737
737
|
baseBody: !1,
|
|
738
738
|
blinkIn: !0,
|
|
739
|
-
pose: () =>
|
|
740
|
-
sil:
|
|
739
|
+
pose: () => J({
|
|
740
|
+
sil: de("hexagon"),
|
|
741
741
|
gaze: { yaw: 23.11, pitch: 24.42, roll: -13.3 },
|
|
742
742
|
split: 13.37,
|
|
743
|
-
eyes:
|
|
743
|
+
eyes: Mt(0.177, 0.411)
|
|
744
744
|
})
|
|
745
745
|
},
|
|
746
746
|
{
|
|
@@ -751,14 +751,14 @@ const Ze = [
|
|
|
751
751
|
baseBody: !1,
|
|
752
752
|
blinkIn: !0,
|
|
753
753
|
pose: (t) => {
|
|
754
|
-
const n =
|
|
755
|
-
return
|
|
756
|
-
sil:
|
|
754
|
+
const n = z(t / 0.35) * z((2.2 - t) / 0.5);
|
|
755
|
+
return J({
|
|
756
|
+
sil: Te(0),
|
|
757
757
|
gaze: { yaw: 12, pitch: -8, roll: -6 },
|
|
758
758
|
split: 15,
|
|
759
|
-
eyes:
|
|
759
|
+
eyes: Mt(0.18, 0.34),
|
|
760
760
|
// the bundle sweeps right to left over the triangle
|
|
761
|
-
arcs:
|
|
761
|
+
arcs: Pn.map((e, s) => ({
|
|
762
762
|
id: `sw${s}`,
|
|
763
763
|
seed: { ...e, cx: 0.45 - t * 0.42 },
|
|
764
764
|
t,
|
|
@@ -777,29 +777,29 @@ const Ze = [
|
|
|
777
777
|
baseBody: !1,
|
|
778
778
|
blinkIn: !1,
|
|
779
779
|
pose: (t) => {
|
|
780
|
-
const n =
|
|
780
|
+
const n = V.easeInOutCubic(z(t / 0.35)), e = -G * 1.25 * t * n, s = V.easeInOutCubic(z((t - 1.6) / 0.9)), o = Te(e), i = Rt(1, { rot: e }), r = {
|
|
781
781
|
radii: o.radii.map((l, d) => l + (i.radii[d] - l) * s),
|
|
782
782
|
rot: e,
|
|
783
783
|
cx: o.cx * (1 - s),
|
|
784
784
|
cy: o.cy * (1 - s),
|
|
785
785
|
sx: 1,
|
|
786
786
|
sy: 1
|
|
787
|
-
}, c =
|
|
788
|
-
return
|
|
787
|
+
}, c = z(t / 0.8) * z((3.6 - t) / 0.9);
|
|
788
|
+
return J({
|
|
789
789
|
sil: r,
|
|
790
790
|
// the eyes race around the sphere ~3x faster than the silhouette
|
|
791
791
|
gaze: {
|
|
792
|
-
yaw:
|
|
792
|
+
yaw: Ve.yaw + Math.sin(t * 6.5) * 65 * (1 - s),
|
|
793
793
|
pitch: -4 + s * 32,
|
|
794
794
|
roll: -13
|
|
795
795
|
},
|
|
796
|
-
eyes:
|
|
796
|
+
eyes: Mt(0.18, 0.34 + s * 0.07),
|
|
797
797
|
// the rings come in one by one over 0.8 s
|
|
798
|
-
arcs:
|
|
798
|
+
arcs: be.map((l, d) => ({
|
|
799
799
|
id: `rg${d}`,
|
|
800
800
|
seed: l,
|
|
801
801
|
t,
|
|
802
|
-
opacity: c *
|
|
802
|
+
opacity: c * z((t - d * 0.13) / 0.3)
|
|
803
803
|
}))
|
|
804
804
|
});
|
|
805
805
|
}
|
|
@@ -833,16 +833,16 @@ const Ze = [
|
|
|
833
833
|
baseBody: !0,
|
|
834
834
|
// the shape morph is hidden behind a blink, as everywhere else
|
|
835
835
|
blinkIn: !0,
|
|
836
|
-
pose: (t) =>
|
|
836
|
+
pose: (t) => J({
|
|
837
837
|
// three of `orbit`'s six rings: half the bundle is enough to recognise it,
|
|
838
838
|
// and that is as many arcs fewer to rasterise per frame
|
|
839
|
-
arcs:
|
|
839
|
+
arcs: be.slice(0, 3).map((n, e) => ({
|
|
840
840
|
id: `sw${e}`,
|
|
841
841
|
seed: n,
|
|
842
842
|
t,
|
|
843
843
|
// they come in one after another then fade before the block ends, so the
|
|
844
844
|
// return to rest happens on an already clean frame
|
|
845
|
-
opacity:
|
|
845
|
+
opacity: z((t - e * 0.06) / 0.14) * z((1.22 - t) / 0.34)
|
|
846
846
|
}))
|
|
847
847
|
})
|
|
848
848
|
},
|
|
@@ -856,11 +856,11 @@ const Ze = [
|
|
|
856
856
|
baseBody: !1,
|
|
857
857
|
blinkIn: !1,
|
|
858
858
|
pose: (t) => {
|
|
859
|
-
const n = 1 - 0.834 *
|
|
860
|
-
return
|
|
861
|
-
sil:
|
|
862
|
-
eyeAlpha:
|
|
863
|
-
dots:
|
|
859
|
+
const n = 1 - 0.834 * V.easeOutQuint(z(t / 0.7)), e = V.easeOutQuint(z((t - 1.7) / 0.7));
|
|
860
|
+
return J({
|
|
861
|
+
sil: Rt(n + (1 - n) * e),
|
|
862
|
+
eyeAlpha: z((t - 1.85) / 0.4),
|
|
863
|
+
dots: Sn(t, 1),
|
|
864
864
|
dotsBehind: !0
|
|
865
865
|
});
|
|
866
866
|
}
|
|
@@ -877,18 +877,18 @@ const Ze = [
|
|
|
877
877
|
baseBody: !1,
|
|
878
878
|
blinkIn: !1,
|
|
879
879
|
pose: (t) => {
|
|
880
|
-
const n = 1 - (1 -
|
|
881
|
-
return
|
|
880
|
+
const n = 1 - (1 - qn) * V.easeOutQuint(z(t / 0.55)), e = V.easeOutQuint(z((t - 1.85) / 0.6)), s = z((t - 0.15) / 0.25) * z((1.95 - t) / 0.3);
|
|
881
|
+
return J({
|
|
882
882
|
// The dot drifts 0.035 downwards then comes back (measured wobble).
|
|
883
|
-
sil:
|
|
884
|
-
cy: Math.sin(
|
|
883
|
+
sil: Rt(n + (1 - n) * e, {
|
|
884
|
+
cy: Math.sin(z(t / 1.7) * Math.PI) * 0.035
|
|
885
885
|
}),
|
|
886
|
-
eyeAlpha:
|
|
887
|
-
arcs:
|
|
886
|
+
eyeAlpha: z((t - 2) / 0.35),
|
|
887
|
+
arcs: jn.map((o, i) => ({ id: `cm${i}`, seed: o, t, opacity: s }))
|
|
888
888
|
});
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
|
-
],
|
|
891
|
+
], Bt = new Map(nn.map((t) => [t.id, t])), ks = {
|
|
892
892
|
idle: 1,
|
|
893
893
|
thinking: 1.1,
|
|
894
894
|
wink: 0.8,
|
|
@@ -904,7 +904,7 @@ const Ze = [
|
|
|
904
904
|
swirl: 0.5,
|
|
905
905
|
burst: 0.45,
|
|
906
906
|
comet: 1.15
|
|
907
|
-
},
|
|
907
|
+
}, oa = [
|
|
908
908
|
"idle",
|
|
909
909
|
"thinking",
|
|
910
910
|
"wink",
|
|
@@ -919,163 +919,163 @@ const Ze = [
|
|
|
919
919
|
"orbit",
|
|
920
920
|
"burst",
|
|
921
921
|
"comet"
|
|
922
|
-
],
|
|
923
|
-
function
|
|
924
|
-
const s = [], o =
|
|
922
|
+
], gt = 100, Ee = 5.5 + 1.6, Pe = 4.2 + 1.3, Ns = 6e-3, $s = 7e-3;
|
|
923
|
+
function Oe(t, n, e) {
|
|
924
|
+
const s = [], o = Ke(t.gaze, gt, t.split);
|
|
925
925
|
for (let i = 0; i < 2; i++) {
|
|
926
926
|
const r = o[i];
|
|
927
927
|
if (r.depth <= 0.02) continue;
|
|
928
|
-
const c = t.eyes[i], l = (c.tilt ?? 0) * Math.PI / 180, d = Math.cos(l), u = Math.sin(l), h = r.a * d + r.c * u,
|
|
928
|
+
const c = t.eyes[i], l = (c.tilt ?? 0) * Math.PI / 180, d = Math.cos(l), u = Math.sin(l), h = r.a * d + r.c * u, p = r.b * d + r.d * u, f = -r.a * u + r.c * d, y = -r.b * u + r.d * d, v = Math.max(c.w * gt, 0.01) / 2, A = Math.max(c.h * gt, 0.01) / 2, _ = Math.min(v, A), $ = A > v, b = $ ? A - _ : v - _, m = Je(e, Math.atan2(r.y, r.x) - n.rot);
|
|
929
929
|
s.push({
|
|
930
|
-
x: r.x *
|
|
931
|
-
y: r.y *
|
|
932
|
-
ax: (
|
|
933
|
-
ay: (
|
|
934
|
-
r:
|
|
935
|
-
m: [h,
|
|
930
|
+
x: r.x * m,
|
|
931
|
+
y: r.y * m,
|
|
932
|
+
ax: ($ ? f : h) * b,
|
|
933
|
+
ay: ($ ? y : p) * b,
|
|
934
|
+
r: _,
|
|
935
|
+
m: [h, p, f, y]
|
|
936
936
|
});
|
|
937
937
|
}
|
|
938
938
|
return s;
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function As(t, n, e, s, o) {
|
|
941
941
|
const i = s - n, r = o - e, c = i * i + r * r;
|
|
942
942
|
let l = 1 / 0, d = 0, u = 0;
|
|
943
|
-
for (let
|
|
944
|
-
const
|
|
945
|
-
let
|
|
946
|
-
|
|
947
|
-
const
|
|
948
|
-
|
|
943
|
+
for (let p = 0; p < t.length; p++) {
|
|
944
|
+
const f = t[p];
|
|
945
|
+
let y = c > 0 ? ((f.x - n) * i + (f.y - e) * r) / c : 0;
|
|
946
|
+
y = y < 0 ? 0 : y > 1 ? 1 : y;
|
|
947
|
+
const v = n + y * i - f.x, A = e + y * r - f.y, _ = v * v + A * A;
|
|
948
|
+
_ < l && (l = _, d = v, u = A);
|
|
949
949
|
}
|
|
950
950
|
const h = Math.sqrt(l);
|
|
951
951
|
return { d: h, ux: h > 1e-9 ? d / h : 0, uy: h > 1e-9 ? u / h : 0 };
|
|
952
952
|
}
|
|
953
|
-
const
|
|
954
|
-
function
|
|
953
|
+
const Ms = Math.hypot(Ns, $s) * gt;
|
|
954
|
+
function Se(t, n, e, s) {
|
|
955
955
|
let o = 1 / 0, i = 0, r = 0;
|
|
956
956
|
for (const c of n) {
|
|
957
|
-
const l = c.x + e, d = c.y + s, u =
|
|
958
|
-
u.d -
|
|
957
|
+
const l = c.x + e, d = c.y + s, u = As(t, l - c.ax, d - c.ay, l + c.ax, d + c.ay), [h, p, f, y] = c.m, v = c.r * Math.hypot(h * u.ux + p * u.uy, f * u.ux + y * u.uy) + Ms;
|
|
958
|
+
u.d - v < o && (o = u.d - v, i = u.ux, r = u.uy);
|
|
959
959
|
}
|
|
960
960
|
return { margin: o, ux: i, uy: r };
|
|
961
961
|
}
|
|
962
|
-
const
|
|
963
|
-
function
|
|
962
|
+
const je = 12, ws = 8;
|
|
963
|
+
function zs(t) {
|
|
964
964
|
if (!t.length) return { x: 0, y: 0 };
|
|
965
|
-
const n = (
|
|
966
|
-
let
|
|
967
|
-
for (const
|
|
968
|
-
return
|
|
965
|
+
const n = (_, $) => {
|
|
966
|
+
let b = 1 / 0;
|
|
967
|
+
for (const m of t) b = Math.min(b, Se(m.outline, m.footprints, _, $).margin);
|
|
968
|
+
return b;
|
|
969
969
|
};
|
|
970
970
|
let e = 1 / 0;
|
|
971
|
-
for (const
|
|
972
|
-
e = Math.min(e,
|
|
971
|
+
for (const _ of t)
|
|
972
|
+
e = Math.min(e, Se(_.refOutline, _.reference, 0, 0).margin);
|
|
973
973
|
let s = 0, o = 0;
|
|
974
974
|
const i = t[0].footprints;
|
|
975
|
-
for (const
|
|
976
|
-
s -=
|
|
977
|
-
const r = Math.max(0.35 *
|
|
975
|
+
for (const _ of i)
|
|
976
|
+
s -= _.x / i.length, o -= _.y / i.length;
|
|
977
|
+
const r = Math.max(0.35 * gt, Math.hypot(s, o) * 1.25);
|
|
978
978
|
e = Math.min(e, n(s, o));
|
|
979
979
|
const c = n(0, 0);
|
|
980
980
|
if (c >= e && c >= 0) return { x: 0, y: 0 };
|
|
981
981
|
const l = Math.max(e, 0);
|
|
982
|
-
let d = 0, u = 0, h = 1 / 0,
|
|
983
|
-
for (let
|
|
984
|
-
const
|
|
985
|
-
if (n(
|
|
986
|
-
for (const
|
|
987
|
-
const
|
|
988
|
-
|
|
982
|
+
let d = 0, u = 0, h = 1 / 0, p = 0, f = 0, y = c;
|
|
983
|
+
for (let _ = 0; _ < je; _++) {
|
|
984
|
+
const $ = _ / je * Math.PI * 2, b = Math.cos($), m = Math.sin($);
|
|
985
|
+
if (n(b * r, m * r) < l) {
|
|
986
|
+
for (const w of [0.3, 0.6, 1]) {
|
|
987
|
+
const I = n(b * r * w, m * r * w);
|
|
988
|
+
I > y && (y = I, p = b * r * w, f = m * r * w);
|
|
989
989
|
}
|
|
990
990
|
continue;
|
|
991
991
|
}
|
|
992
|
-
let
|
|
993
|
-
for (let
|
|
994
|
-
const
|
|
995
|
-
n(
|
|
992
|
+
let k = 0, O = r;
|
|
993
|
+
for (let w = 0; w < ws; w++) {
|
|
994
|
+
const I = (k + O) / 2;
|
|
995
|
+
n(b * I, m * I) >= l ? O = I : k = I;
|
|
996
996
|
}
|
|
997
|
-
|
|
997
|
+
O < h && (h = O, d = b * O, u = m * O);
|
|
998
998
|
}
|
|
999
|
-
const
|
|
1000
|
-
return { x: +(
|
|
999
|
+
const v = h === 1 / 0 ? p : d, A = h === 1 / 0 ? f : u;
|
|
1000
|
+
return { x: +(v / gt).toFixed(6), y: +(A / gt).toFixed(6) };
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function Is(t, n, e) {
|
|
1003
1003
|
return t.baseFace && e ? { gaze: e.gaze, split: e.split, eyes: e.eyes } : { gaze: n.gaze, split: n.split, eyes: n.eyes };
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function Rs(t) {
|
|
1006
1006
|
const n = (s) => JSON.stringify([s.gaze, s.split, s.eyes, s.sil.rot, s.sil.cx, s.sil.cy, s.sil.sx, s.sil.sy]);
|
|
1007
1007
|
if (n(t.pose(0)) === n(t.pose(t.duration))) return [0];
|
|
1008
1008
|
const e = 3;
|
|
1009
1009
|
return Array.from({ length: e }, (s, o) => o / (e - 1) * t.duration);
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1011
|
+
function Bs(t, n, e) {
|
|
1012
1012
|
const s = [];
|
|
1013
|
-
for (const o of
|
|
1014
|
-
const i = t.pose(o), r =
|
|
1015
|
-
for (const u of [-
|
|
1016
|
-
for (const h of [-
|
|
1013
|
+
for (const o of Rs(t)) {
|
|
1014
|
+
const i = t.pose(o), r = ue({ ...i.sil, radii: n }, gt), c = ue(i.sil, gt), l = Is(t, i, e), d = [];
|
|
1015
|
+
for (const u of [-Ee, Ee])
|
|
1016
|
+
for (const h of [-Pe, Pe])
|
|
1017
1017
|
d.push({
|
|
1018
1018
|
...l,
|
|
1019
1019
|
gaze: { yaw: l.gaze.yaw + u, pitch: l.gaze.pitch + h, roll: l.gaze.roll }
|
|
1020
1020
|
});
|
|
1021
1021
|
for (const u of d)
|
|
1022
1022
|
s.push({
|
|
1023
|
-
footprints:
|
|
1024
|
-
reference:
|
|
1023
|
+
footprints: Oe(u, i.sil, n),
|
|
1024
|
+
reference: Oe(u, i.sil, i.sil.radii),
|
|
1025
1025
|
outline: r,
|
|
1026
1026
|
refOutline: c
|
|
1027
1027
|
});
|
|
1028
1028
|
}
|
|
1029
|
-
return
|
|
1029
|
+
return zs(s);
|
|
1030
1030
|
}
|
|
1031
|
-
const
|
|
1032
|
-
function
|
|
1031
|
+
const ee = { x: 0, y: 0 }, he = (t, n) => `${t}|${n ?? ""}`;
|
|
1032
|
+
function Ts() {
|
|
1033
1033
|
return new Map(
|
|
1034
|
-
|
|
1034
|
+
tn.map((t) => {
|
|
1035
1035
|
const n = /* @__PURE__ */ new Map();
|
|
1036
|
-
for (const e of
|
|
1036
|
+
for (const e of nn) {
|
|
1037
1037
|
if (!e.baseBody) continue;
|
|
1038
|
-
const s = e.baseFace ? [null, ...
|
|
1038
|
+
const s = e.baseFace ? [null, ...Ze] : [null];
|
|
1039
1039
|
for (const o of s)
|
|
1040
|
-
n.set(
|
|
1040
|
+
n.set(he(e.id, (o == null ? void 0 : o.id) ?? null), Bs(e, t.radii, o));
|
|
1041
1041
|
}
|
|
1042
1042
|
return [t.radii, n];
|
|
1043
1043
|
})
|
|
1044
1044
|
);
|
|
1045
1045
|
}
|
|
1046
|
-
const
|
|
1047
|
-
function
|
|
1048
|
-
if (!t) return
|
|
1049
|
-
const s =
|
|
1050
|
-
return s ? s.get(
|
|
1051
|
-
}
|
|
1052
|
-
const
|
|
1053
|
-
yaw:
|
|
1054
|
-
pitch:
|
|
1055
|
-
mix:
|
|
1056
|
-
spin:
|
|
1057
|
-
wander:
|
|
1058
|
-
}),
|
|
1059
|
-
w:
|
|
1060
|
-
h:
|
|
1061
|
-
open:
|
|
1062
|
-
tilt:
|
|
1046
|
+
const Cs = Ts();
|
|
1047
|
+
function qe(t, n, e) {
|
|
1048
|
+
if (!t) return ee;
|
|
1049
|
+
const s = Cs.get(t);
|
|
1050
|
+
return s ? s.get(he(n, e)) ?? s.get(he(n, null)) ?? ee : ee;
|
|
1051
|
+
}
|
|
1052
|
+
const ne = { yaw: 0, pitch: 0, mix: 0, spin: 0, wander: 1 }, Es = (t, n, e) => ({
|
|
1053
|
+
yaw: R(t.yaw, n.yaw, e),
|
|
1054
|
+
pitch: R(t.pitch, n.pitch, e),
|
|
1055
|
+
mix: R(t.mix, n.mix, e),
|
|
1056
|
+
spin: R(t.spin, n.spin, e),
|
|
1057
|
+
wander: R(t.wander, n.wander, e)
|
|
1058
|
+
}), Le = (t, n, e) => ({
|
|
1059
|
+
w: R(t.w, n.w, e),
|
|
1060
|
+
h: R(t.h, n.h, e),
|
|
1061
|
+
open: R(t.open, n.open, e),
|
|
1062
|
+
tilt: R(t.tilt ?? 0, n.tilt ?? 0, e)
|
|
1063
1063
|
});
|
|
1064
|
-
function
|
|
1064
|
+
function Fe(t, n, e) {
|
|
1065
1065
|
const s = 1 - e;
|
|
1066
1066
|
return {
|
|
1067
|
-
sil:
|
|
1068
|
-
offX:
|
|
1069
|
-
offY:
|
|
1067
|
+
sil: Jn(t.sil, n.sil, e),
|
|
1068
|
+
offX: R(t.offX, n.offX, e),
|
|
1069
|
+
offY: R(t.offY, n.offY, e),
|
|
1070
1070
|
gaze: {
|
|
1071
|
-
yaw:
|
|
1072
|
-
pitch:
|
|
1073
|
-
roll:
|
|
1071
|
+
yaw: R(t.gaze.yaw, n.gaze.yaw, e),
|
|
1072
|
+
pitch: R(t.gaze.pitch, n.gaze.pitch, e),
|
|
1073
|
+
roll: R(t.gaze.roll, n.gaze.roll, e)
|
|
1074
1074
|
},
|
|
1075
|
-
split:
|
|
1076
|
-
eyes: [
|
|
1077
|
-
eyeAlpha:
|
|
1078
|
-
bodyAlpha:
|
|
1075
|
+
split: R(t.split, n.split, e),
|
|
1076
|
+
eyes: [Le(t.eyes[0], n.eyes[0], e), Le(t.eyes[1], n.eyes[1], e)],
|
|
1077
|
+
eyeAlpha: R(t.eyeAlpha, n.eyeAlpha, e),
|
|
1078
|
+
bodyAlpha: R(t.bodyAlpha, n.bodyAlpha, e),
|
|
1079
1079
|
dots: [
|
|
1080
1080
|
...t.dots.map((o) => ({ ...o, opacity: o.opacity * s })),
|
|
1081
1081
|
...n.dots.map((o) => ({ ...o, opacity: o.opacity * e }))
|
|
@@ -1089,9 +1089,9 @@ function Se(t, n, e) {
|
|
|
1089
1089
|
dotsBehind: e < 0.5 ? t.dotsBehind : n.dotsBehind
|
|
1090
1090
|
};
|
|
1091
1091
|
}
|
|
1092
|
-
const
|
|
1092
|
+
const yt = class yt {
|
|
1093
1093
|
constructor(n = 100, e = "idle", s = null, o = null) {
|
|
1094
|
-
this.prev = null, this.frozenStart = null, this.tCur = 0, this.tPrev = 0, this.blinkAt = -10, this.pts = [], this.shape = null, this.shapePrev = null, this.shapeAt = -10, this.expr = null, this.exprPrev = null, this.exprAt = -10, this.look =
|
|
1094
|
+
this.prev = null, this.frozenStart = null, this.tCur = 0, this.tPrev = 0, this.blinkAt = -10, this.pts = [], this.shape = null, this.shapePrev = null, this.shapeAt = -10, this.expr = null, this.exprPrev = null, this.exprAt = -10, this.look = ne, this.lookPrev = ne, this.lookAt = -10, this.lookMorph = 0.24, this.scale = n, this.cur = e, this.shape = s, this.expr = o;
|
|
1095
1095
|
}
|
|
1096
1096
|
/**
|
|
1097
1097
|
* The resting expression chosen in the customiser. Like the shape, it glides
|
|
@@ -1104,8 +1104,8 @@ const _t = class _t {
|
|
|
1104
1104
|
exprAtTime(n) {
|
|
1105
1105
|
const e = this.expr, s = this.exprPrev;
|
|
1106
1106
|
if (!e || !s) return e;
|
|
1107
|
-
const o = (n - this.exprAt) /
|
|
1108
|
-
return o >= 1 ? e :
|
|
1107
|
+
const o = (n - this.exprAt) / yt.SHAPE_MORPH;
|
|
1108
|
+
return o >= 1 ? e : Kn(s, e, V.easeOutQuint(z(o)));
|
|
1109
1109
|
}
|
|
1110
1110
|
/**
|
|
1111
1111
|
* The shape chosen in the customiser. It only replaces the body on the resting
|
|
@@ -1128,10 +1128,10 @@ const _t = class _t {
|
|
|
1128
1128
|
shapeAtTime(n) {
|
|
1129
1129
|
const e = this.shape, s = this.shapePrev;
|
|
1130
1130
|
if (!e || !s) return e;
|
|
1131
|
-
const o = (n - this.shapeAt) /
|
|
1131
|
+
const o = (n - this.shapeAt) / yt.SHAPE_MORPH;
|
|
1132
1132
|
if (o >= 1) return e;
|
|
1133
|
-
const i =
|
|
1134
|
-
return e.map((r, c) =>
|
|
1133
|
+
const i = V.easeOutQuint(z(o));
|
|
1134
|
+
return e.map((r, c) => R(s[c] ?? r, r, i));
|
|
1135
1135
|
}
|
|
1136
1136
|
/**
|
|
1137
1137
|
* A new gaze target, `null` to fall back to the state's own.
|
|
@@ -1145,13 +1145,13 @@ const _t = class _t {
|
|
|
1145
1145
|
* setter, never through a variable read during `sample`, or the engine stops being
|
|
1146
1146
|
* a pure function of time.
|
|
1147
1147
|
*/
|
|
1148
|
-
setLook(n, e, s =
|
|
1149
|
-
n && !Number.isFinite(n.yaw + n.pitch + n.mix + n.spin + n.wander) || (this.lookPrev = this.lookAtTime(e), this.look = n ??
|
|
1148
|
+
setLook(n, e, s = yt.LOOK_MORPH) {
|
|
1149
|
+
n && !Number.isFinite(n.yaw + n.pitch + n.mix + n.spin + n.wander) || (this.lookPrev = this.lookAtTime(e), this.look = n ?? ne, this.lookAt = e, this.lookMorph = s);
|
|
1150
1150
|
}
|
|
1151
1151
|
/** The effective gaze at `now`, catch-up in progress included. */
|
|
1152
1152
|
lookAtTime(n) {
|
|
1153
1153
|
const e = (n - this.lookAt) / this.lookMorph;
|
|
1154
|
-
return e >= 1 ? this.look :
|
|
1154
|
+
return e >= 1 ? this.look : Es(this.lookPrev, this.look, V.easeOutQuint(z(e)));
|
|
1155
1155
|
}
|
|
1156
1156
|
posed(n, e, s, o) {
|
|
1157
1157
|
let i = n.pose(e);
|
|
@@ -1174,20 +1174,20 @@ const _t = class _t {
|
|
|
1174
1174
|
if (c === l) return l;
|
|
1175
1175
|
const d = (n - i) / r;
|
|
1176
1176
|
if (d >= 1) return l;
|
|
1177
|
-
const u =
|
|
1178
|
-
return { x:
|
|
1177
|
+
const u = V.easeOutQuint(z(d));
|
|
1178
|
+
return { x: R(c.x, l.x, u), y: R(c.y, l.y, u) };
|
|
1179
1179
|
}, o = (i) => {
|
|
1180
1180
|
var r, c;
|
|
1181
1181
|
return s(
|
|
1182
1182
|
this.exprAt,
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1183
|
+
yt.SHAPE_MORPH,
|
|
1184
|
+
qe(i, e, ((r = this.exprPrev) == null ? void 0 : r.id) ?? null),
|
|
1185
|
+
qe(i, e, ((c = this.expr) == null ? void 0 : c.id) ?? null)
|
|
1186
1186
|
);
|
|
1187
1187
|
};
|
|
1188
1188
|
return s(
|
|
1189
1189
|
this.shapeAt,
|
|
1190
|
-
|
|
1190
|
+
yt.SHAPE_MORPH,
|
|
1191
1191
|
o(this.shapePrev),
|
|
1192
1192
|
o(this.shape)
|
|
1193
1193
|
);
|
|
@@ -1219,7 +1219,7 @@ const _t = class _t {
|
|
|
1219
1219
|
fadeOrigin(n, e, s) {
|
|
1220
1220
|
if (this.frozenStart) return this.frozenStart;
|
|
1221
1221
|
if (!this.prev) return null;
|
|
1222
|
-
const o =
|
|
1222
|
+
const o = Bt.get(this.prev);
|
|
1223
1223
|
return this.posed(o, Math.max(0, n - this.tPrev), e, s);
|
|
1224
1224
|
}
|
|
1225
1225
|
/**
|
|
@@ -1228,10 +1228,10 @@ const _t = class _t {
|
|
|
1228
1228
|
* freeze it.
|
|
1229
1229
|
*/
|
|
1230
1230
|
composedPose(n) {
|
|
1231
|
-
const e =
|
|
1231
|
+
const e = Bt.get(this.cur), s = this.shapeAtTime(n), o = this.exprAtTime(n), i = this.posed(e, Math.max(0, n - this.tCur), s, o), r = n - this.tCur;
|
|
1232
1232
|
if (r >= e.morph) return i;
|
|
1233
1233
|
const c = this.fadeOrigin(n, s, o);
|
|
1234
|
-
return c ?
|
|
1234
|
+
return c ? Fe(c, i, V.easeOutQuint(z(r / e.morph))) : i;
|
|
1235
1235
|
}
|
|
1236
1236
|
/**
|
|
1237
1237
|
* A dated state change.
|
|
@@ -1254,109 +1254,109 @@ const _t = class _t {
|
|
|
1254
1254
|
setState(n, e) {
|
|
1255
1255
|
var i;
|
|
1256
1256
|
if (n === this.cur) return;
|
|
1257
|
-
const s =
|
|
1258
|
-
this.frozenStart = o ? this.composedPose(e) : null, this.prev = this.cur, this.tPrev = this.tCur, this.cur = n, this.tCur = e, (i =
|
|
1257
|
+
const s = Bt.get(this.cur).morph, o = this.prev !== null && e - this.tCur < s;
|
|
1258
|
+
this.frozenStart = o ? this.composedPose(e) : null, this.prev = this.cur, this.tPrev = this.tCur, this.cur = n, this.tCur = e, (i = Bt.get(n)) != null && i.blinkIn && (this.blinkAt = e);
|
|
1259
1259
|
}
|
|
1260
1260
|
sample(n) {
|
|
1261
|
-
const e = this.scale, s =
|
|
1261
|
+
const e = this.scale, s = Bt.get(this.cur), o = this.shapeAtTime(n), i = this.exprAtTime(n);
|
|
1262
1262
|
let r = this.posed(s, Math.max(0, n - this.tCur), o, i), c = this.eyeOffsetAtTime(n, this.cur);
|
|
1263
1263
|
const l = n - this.tCur, d = l < s.morph ? this.fadeOrigin(n, o, i) : null;
|
|
1264
1264
|
if (d) {
|
|
1265
|
-
const
|
|
1266
|
-
r =
|
|
1267
|
-
const
|
|
1268
|
-
if (
|
|
1269
|
-
const B = this.eyeOffsetAtTime(n,
|
|
1265
|
+
const C = V.easeOutQuint(z(l / s.morph));
|
|
1266
|
+
r = Fe(d, r, C);
|
|
1267
|
+
const q = this.prev;
|
|
1268
|
+
if (q) {
|
|
1269
|
+
const B = this.eyeOffsetAtTime(n, q);
|
|
1270
1270
|
c = {
|
|
1271
|
-
x:
|
|
1272
|
-
y:
|
|
1271
|
+
x: R(B.x, c.x, C),
|
|
1272
|
+
y: R(B.y, c.y, C)
|
|
1273
1273
|
};
|
|
1274
1274
|
}
|
|
1275
1275
|
}
|
|
1276
|
-
const u = r.eyeAlpha > 0.01, h = this.lookAtTime(n),
|
|
1276
|
+
const u = r.eyeAlpha > 0.01, h = this.lookAtTime(n), p = Gn(n, { wander: u ? h.wander : 0, blink: u }), f = {
|
|
1277
1277
|
// Both aims REPLACE the pose's instead of adding to them (see `Look`), and the
|
|
1278
1278
|
// turn is subtracted on the way. The drift is added AFTER the mix, otherwise
|
|
1279
1279
|
// the target would cancel it along with the pose — and it has to survive a
|
|
1280
1280
|
// turned head with no pointer.
|
|
1281
|
-
yaw:
|
|
1282
|
-
pitch:
|
|
1281
|
+
yaw: R(r.gaze.yaw, h.yaw, h.mix) + p.dYaw - h.spin,
|
|
1282
|
+
pitch: R(r.gaze.pitch, h.pitch, h.mix) + p.dPitch,
|
|
1283
1283
|
// the roll follows nothing: Novi's head is tilted -13deg in the reference, and
|
|
1284
1284
|
// rolling it with the cursor breaks that signature
|
|
1285
|
-
roll: r.gaze.roll +
|
|
1286
|
-
},
|
|
1285
|
+
roll: r.gaze.roll + p.dRoll
|
|
1286
|
+
}, y = z((n - this.blinkAt) / 0.2), v = y < 1 ? Math.abs(y * 2 - 1) : 1, A = Math.min(p.lid, v), _ = r.offX + p.driftX, $ = r.offY + p.driftY, b = {
|
|
1287
1287
|
...r.sil,
|
|
1288
|
-
cx: r.sil.cx +
|
|
1289
|
-
cy: r.sil.cy +
|
|
1290
|
-
sy: r.sil.sy *
|
|
1291
|
-
},
|
|
1288
|
+
cx: r.sil.cx + _,
|
|
1289
|
+
cy: r.sil.cy + $,
|
|
1290
|
+
sy: r.sil.sy * p.breath
|
|
1291
|
+
}, m = ts(ue(b, e, this.pts)), k = (C, q) => Je(r.sil.radii, Math.atan2(q, C) - r.sil.rot), O = [];
|
|
1292
1292
|
if (r.eyeAlpha > 0.01) {
|
|
1293
|
-
const
|
|
1294
|
-
for (let
|
|
1295
|
-
const B =
|
|
1293
|
+
const C = Ke(f, e, r.split);
|
|
1294
|
+
for (let q = 0; q < 2; q++) {
|
|
1295
|
+
const B = C[q];
|
|
1296
1296
|
if (B.depth <= 0.02) continue;
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1299
|
-
d:
|
|
1300
|
-
matrix: `matrix(${
|
|
1301
|
-
alpha: r.eyeAlpha *
|
|
1297
|
+
const W = r.eyes[q], L = k(B.x, B.y), ot = (W.tilt ?? 0) * Math.PI / 180, X = Math.cos(ot), D = Math.sin(ot), rt = B.a * X + B.c * D, N = B.b * X + B.d * D, S = -B.a * D + B.c * X, x = -B.b * D + B.d * X, Y = Wn(Math.min(A, W.open));
|
|
1298
|
+
O.push({
|
|
1299
|
+
d: rs(W.w * e, W.h * e),
|
|
1300
|
+
matrix: `matrix(${M(rt)},${M(N * Y)},${M(S)},${M(x * Y)},${M(B.x * L + (_ + c.x) * e)},${M(B.y * L + ($ + c.y) * e)})`,
|
|
1301
|
+
alpha: r.eyeAlpha * z(B.depth / 0.12)
|
|
1302
1302
|
});
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
1305
|
-
const
|
|
1305
|
+
const w = r.dots.filter((C) => C.opacity > 0.01 && C.r > 5e-4).map((C) => ({ ...C, x: (C.x + _) * e, y: (C.y + $) * e, r: C.r * e })), I = r.notif ? k(r.notif.x, r.notif.y) : 1, j = r.notif ? (r.notif.x * I + _) * e : 0, F = r.notif ? (r.notif.y * I + $) * e : 0, E = r.notif ? { x: j, y: F, r: r.notif.r * e } : null, Z = r.notif ? { x: j, y: F, r: r.notif.notch * e } : null;
|
|
1306
1306
|
return {
|
|
1307
|
-
bodyPath:
|
|
1307
|
+
bodyPath: m,
|
|
1308
1308
|
bodyAlpha: r.bodyAlpha,
|
|
1309
|
-
eyes:
|
|
1310
|
-
dots:
|
|
1309
|
+
eyes: O,
|
|
1310
|
+
dots: w,
|
|
1311
1311
|
dotsBehind: r.dotsBehind,
|
|
1312
1312
|
// States declare arcs in ball-radius units; the engine alone knows the viewBox
|
|
1313
1313
|
// scale, so the engine is what rasterises them.
|
|
1314
|
-
arcs: r.arcs.filter((
|
|
1315
|
-
notif:
|
|
1316
|
-
notch:
|
|
1314
|
+
arcs: r.arcs.filter((C) => C.opacity > 0.01).map((C) => En(C.seed, C.t, e, C.id, C.opacity)),
|
|
1315
|
+
notif: E,
|
|
1316
|
+
notch: Z
|
|
1317
1317
|
};
|
|
1318
1318
|
}
|
|
1319
1319
|
};
|
|
1320
|
-
|
|
1321
|
-
let
|
|
1322
|
-
const
|
|
1320
|
+
yt.SHAPE_MORPH = 0.45, yt.LOOK_MORPH = 0.24;
|
|
1321
|
+
let fe = yt;
|
|
1322
|
+
const sn = 100, Ps = 158, Os = 16, Ss = 13, js = 10, on = 360, se = 1.1, qs = 1.5, ra = (t) => ({
|
|
1323
1323
|
yaw: 0,
|
|
1324
1324
|
pitch: 0,
|
|
1325
1325
|
mix: 0,
|
|
1326
|
-
spin:
|
|
1326
|
+
spin: on * (1 - V.easeInOutCubic(z(t / qs))),
|
|
1327
1327
|
wander: 1
|
|
1328
1328
|
});
|
|
1329
|
-
function
|
|
1329
|
+
function Ls({ nx: t, ny: n, progress: e, pointer: s, turn: o = 0 }) {
|
|
1330
1330
|
return {
|
|
1331
|
-
yaw: o + t *
|
|
1331
|
+
yaw: o + t * Os,
|
|
1332
1332
|
// positive pitch = looking up, whereas the screen's y goes down
|
|
1333
|
-
pitch:
|
|
1333
|
+
pitch: js - n * Ss,
|
|
1334
1334
|
mix: e,
|
|
1335
|
-
spin:
|
|
1335
|
+
spin: on * (1 - e),
|
|
1336
1336
|
// With no pointer the head stays turned, but its drift is given back: otherwise
|
|
1337
1337
|
// Novi stares at a dead point, and arriving by keyboard or touch gave a
|
|
1338
1338
|
// completely motionless avatar.
|
|
1339
1339
|
wander: s ? 0 : 1
|
|
1340
1340
|
};
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function Fs(t, n) {
|
|
1343
1343
|
if (/^#[0-9a-f]{6}$/i.test(t)) return t;
|
|
1344
1344
|
const e = t.match(/-?\d*\.?\d+/g);
|
|
1345
1345
|
return !e || e.length < 3 ? n : `#${e.slice(0, 3).map(
|
|
1346
1346
|
(s) => Math.max(0, Math.min(255, Math.round(Number(s)))).toString(16).padStart(2, "0")
|
|
1347
1347
|
).join("")}`;
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function He(t, n) {
|
|
1350
1350
|
if (typeof document > "u") return n;
|
|
1351
1351
|
const e = document.createElement("span");
|
|
1352
1352
|
e.style.color = t, e.style.position = "absolute", e.style.visibility = "hidden", e.style.pointerEvents = "none", document.documentElement.appendChild(e);
|
|
1353
1353
|
const s = getComputedStyle(e).color;
|
|
1354
|
-
return e.remove(),
|
|
1354
|
+
return e.remove(), Fs(s, n);
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1357
|
-
const [e, s] =
|
|
1358
|
-
return
|
|
1359
|
-
const o = () => s(
|
|
1356
|
+
function oe(t, n) {
|
|
1357
|
+
const [e, s] = at(() => He(t, n));
|
|
1358
|
+
return nt(() => {
|
|
1359
|
+
const o = () => s(He(t, n));
|
|
1360
1360
|
o();
|
|
1361
1361
|
const i = new MutationObserver(o);
|
|
1362
1362
|
return i.observe(document.documentElement, {
|
|
@@ -1365,20 +1365,20 @@ function ne(t, n) {
|
|
|
1365
1365
|
}), () => i.disconnect();
|
|
1366
1366
|
}, [n, t]), e;
|
|
1367
1367
|
}
|
|
1368
|
-
const
|
|
1369
|
-
function
|
|
1370
|
-
const o = { fill: t.color ?? (t.depth === void 0 ? n :
|
|
1368
|
+
const re = 1 / 60;
|
|
1369
|
+
function Hs(t, n, e) {
|
|
1370
|
+
const o = { fill: t.color ?? (t.depth === void 0 ? n : ms(e, n, t.depth)), opacity: t.opacity };
|
|
1371
1371
|
return t.d ? {
|
|
1372
1372
|
...o,
|
|
1373
1373
|
d: t.d,
|
|
1374
|
-
transform: `translate(${t.x} ${t.y}) rotate(${t.rot ?? 0}) scale(${
|
|
1374
|
+
transform: `translate(${t.x} ${t.y}) rotate(${t.rot ?? 0}) scale(${sn})`
|
|
1375
1375
|
} : { ...o, cx: t.x, cy: t.y, r: t.r };
|
|
1376
1376
|
}
|
|
1377
|
-
function
|
|
1377
|
+
function Yt({
|
|
1378
1378
|
size: t = 320,
|
|
1379
|
-
shape: n =
|
|
1380
|
-
color: e =
|
|
1381
|
-
expression: s =
|
|
1379
|
+
shape: n = hs,
|
|
1380
|
+
color: e = _s,
|
|
1381
|
+
expression: s = Vn,
|
|
1382
1382
|
paper: o = "var(--backgrounds-bg-base)",
|
|
1383
1383
|
state: i = "idle",
|
|
1384
1384
|
frozenAt: r,
|
|
@@ -1388,154 +1388,377 @@ function Kt({
|
|
|
1388
1388
|
label: u,
|
|
1389
1389
|
className: h
|
|
1390
1390
|
}) {
|
|
1391
|
-
var
|
|
1392
|
-
const
|
|
1393
|
-
|
|
1394
|
-
const
|
|
1395
|
-
|
|
1391
|
+
var D, rt;
|
|
1392
|
+
const p = ((D = us.get(n)) == null ? void 0 : D.radii) ?? null, f = ((rt = ps.get(e)) == null ? void 0 : rt.hex) ?? "var(--novi-color-ink)", y = oe(f, "#18181b"), v = oe(o, "#ffffff"), A = oe(Ln, "#3b82f6"), _ = Qn.get(s) ?? null, $ = H(null), b = H();
|
|
1393
|
+
b.current || (b.current = new fe(sn, i, p, _));
|
|
1394
|
+
const m = b.current, [k, O] = at(() => m.sample(r ?? 0)), w = Ct().replace(/[^a-zA-Z0-9_-]/g, ""), I = `novi-mask-${w}`, j = H(0), F = H(null), E = H(!1), Z = H(0), C = H(0), q = H({ follow: c, turn: l, gaze: d, state: i });
|
|
1395
|
+
q.current = { follow: c, turn: l, gaze: d, state: i };
|
|
1396
1396
|
const B = r !== void 0;
|
|
1397
|
-
function
|
|
1398
|
-
var
|
|
1399
|
-
const
|
|
1400
|
-
if (!((
|
|
1401
|
-
|
|
1397
|
+
function W() {
|
|
1398
|
+
var xt, dt;
|
|
1399
|
+
const N = b.current, S = j.current;
|
|
1400
|
+
if (!((xt = Bt.get(q.current.state)) != null && xt.baseFace)) {
|
|
1401
|
+
E.current && (N.setLook(null, S, se), E.current = !1);
|
|
1402
1402
|
return;
|
|
1403
1403
|
}
|
|
1404
|
-
const
|
|
1405
|
-
if (!
|
|
1406
|
-
|
|
1407
|
-
const
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
nx:
|
|
1411
|
-
ny:
|
|
1412
|
-
progress:
|
|
1413
|
-
pointer:
|
|
1414
|
-
turn:
|
|
1404
|
+
const x = (dt = $.current) == null ? void 0 : dt.getBoundingClientRect();
|
|
1405
|
+
if (!x || x.width === 0 || x.height === 0) return;
|
|
1406
|
+
E.current || (Z.current = S);
|
|
1407
|
+
const Y = F.current, P = Math.max(1, window.innerWidth / 2), lt = Math.max(1, window.innerHeight / 2);
|
|
1408
|
+
N.setLook(
|
|
1409
|
+
Ls({
|
|
1410
|
+
nx: Y ? z((Y.x - (x.left + x.width / 2)) / P, -1, 1) : 0,
|
|
1411
|
+
ny: Y ? z((Y.y - (x.top + x.height / 2)) / lt, -1, 1) : 0,
|
|
1412
|
+
progress: V.easeOutQuint(z((S - Z.current) / se)),
|
|
1413
|
+
pointer: Y !== null,
|
|
1414
|
+
turn: q.current.turn
|
|
1415
1415
|
}),
|
|
1416
|
-
|
|
1417
|
-
),
|
|
1416
|
+
S
|
|
1417
|
+
), E.current = !0;
|
|
1418
1418
|
}
|
|
1419
|
-
|
|
1419
|
+
nt(() => {
|
|
1420
1420
|
if (B) return;
|
|
1421
|
-
const
|
|
1422
|
-
let
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1425
|
-
const
|
|
1426
|
-
|
|
1427
|
-
|
|
1421
|
+
const N = b.current;
|
|
1422
|
+
let S = 0, x = 0;
|
|
1423
|
+
const Y = (P) => {
|
|
1424
|
+
S = requestAnimationFrame(Y);
|
|
1425
|
+
const lt = x ? Math.min((P - x) / 1e3, 0.064) : 0;
|
|
1426
|
+
x = P, j.current += lt, q.current.follow ? W() : q.current.gaze && N.setLook(
|
|
1427
|
+
q.current.gaze(j.current - C.current),
|
|
1428
1428
|
j.current,
|
|
1429
|
-
|
|
1430
|
-
),
|
|
1429
|
+
re
|
|
1430
|
+
), O(N.sample(j.current));
|
|
1431
1431
|
};
|
|
1432
|
-
return
|
|
1433
|
-
}, [B]),
|
|
1432
|
+
return S = requestAnimationFrame(Y), () => cancelAnimationFrame(S);
|
|
1433
|
+
}, [B]), nt(() => {
|
|
1434
1434
|
if (!c || B) return;
|
|
1435
|
-
const
|
|
1436
|
-
|
|
1437
|
-
},
|
|
1438
|
-
|
|
1435
|
+
const N = (x) => {
|
|
1436
|
+
x.pointerType !== "touch" && (F.current = { x: x.clientX, y: x.clientY });
|
|
1437
|
+
}, S = () => {
|
|
1438
|
+
F.current = null;
|
|
1439
1439
|
};
|
|
1440
|
-
return window.addEventListener("pointermove",
|
|
1441
|
-
window.removeEventListener("pointermove",
|
|
1440
|
+
return window.addEventListener("pointermove", N), document.addEventListener("pointerleave", S), () => {
|
|
1441
|
+
window.removeEventListener("pointermove", N), document.removeEventListener("pointerleave", S), F.current = null, E.current && (b.current.setLook(null, j.current, se), E.current = !1);
|
|
1442
1442
|
};
|
|
1443
|
-
}, [c, B]),
|
|
1444
|
-
const
|
|
1443
|
+
}, [c, B]), nt(() => {
|
|
1444
|
+
const N = b.current;
|
|
1445
1445
|
if (d)
|
|
1446
|
-
return
|
|
1447
|
-
|
|
1446
|
+
return C.current = j.current, N.setLook(d(0), j.current - re, re), () => {
|
|
1447
|
+
N.setLook(null, j.current);
|
|
1448
1448
|
};
|
|
1449
|
-
}, [d]),
|
|
1450
|
-
|
|
1451
|
-
}, [i]),
|
|
1452
|
-
|
|
1453
|
-
}, [
|
|
1454
|
-
|
|
1455
|
-
}, [
|
|
1456
|
-
B &&
|
|
1457
|
-
}, [B, r,
|
|
1458
|
-
const
|
|
1459
|
-
() =>
|
|
1449
|
+
}, [d]), nt(() => {
|
|
1450
|
+
b.current.setState(i, j.current);
|
|
1451
|
+
}, [i]), nt(() => {
|
|
1452
|
+
b.current.setShape(p, j.current);
|
|
1453
|
+
}, [p]), nt(() => {
|
|
1454
|
+
b.current.setExpression(_, j.current);
|
|
1455
|
+
}, [_]), nt(() => {
|
|
1456
|
+
B && O(b.current.sample(r));
|
|
1457
|
+
}, [B, r, p, _, i]);
|
|
1458
|
+
const L = Ps, ot = hn(
|
|
1459
|
+
() => k.arcs.map((N) => /* @__PURE__ */ a(
|
|
1460
1460
|
"linearGradient",
|
|
1461
1461
|
{
|
|
1462
|
-
id: `${
|
|
1462
|
+
id: `${w}-${N.id}`,
|
|
1463
1463
|
gradientUnits: "userSpaceOnUse",
|
|
1464
|
-
x1:
|
|
1465
|
-
y1:
|
|
1466
|
-
x2:
|
|
1467
|
-
y2:
|
|
1468
|
-
children:
|
|
1464
|
+
x1: N.grad.x1,
|
|
1465
|
+
y1: N.grad.y1,
|
|
1466
|
+
x2: N.grad.x2,
|
|
1467
|
+
y2: N.grad.y2,
|
|
1468
|
+
children: N.grad.stops.map((S, x) => /* @__PURE__ */ a("stop", { offset: x / (N.grad.stops.length - 1), stopColor: S }, x))
|
|
1469
1469
|
},
|
|
1470
|
-
|
|
1470
|
+
N.id
|
|
1471
1471
|
)),
|
|
1472
|
-
[
|
|
1473
|
-
),
|
|
1474
|
-
const
|
|
1475
|
-
return
|
|
1472
|
+
[k.arcs, w]
|
|
1473
|
+
), X = k.dots.map((N, S) => {
|
|
1474
|
+
const x = Hs(N, y, v);
|
|
1475
|
+
return N.d ? /* @__PURE__ */ a("path", { ...x }, S) : /* @__PURE__ */ a("circle", { ...x }, S);
|
|
1476
1476
|
});
|
|
1477
1477
|
return /* @__PURE__ */ g(
|
|
1478
1478
|
"svg",
|
|
1479
1479
|
{
|
|
1480
|
-
ref:
|
|
1480
|
+
ref: $,
|
|
1481
1481
|
className: h,
|
|
1482
1482
|
width: t,
|
|
1483
1483
|
height: t,
|
|
1484
|
-
viewBox: `${-
|
|
1484
|
+
viewBox: `${-L} ${-L} ${L * 2} ${L * 2}`,
|
|
1485
1485
|
role: u ? "img" : void 0,
|
|
1486
1486
|
"aria-label": u,
|
|
1487
1487
|
"aria-hidden": u ? void 0 : !0,
|
|
1488
1488
|
children: [
|
|
1489
1489
|
/* @__PURE__ */ g("defs", { children: [
|
|
1490
|
-
/* @__PURE__ */ g("mask", { id:
|
|
1491
|
-
/* @__PURE__ */ a("path", { d:
|
|
1492
|
-
|
|
1493
|
-
|
|
1490
|
+
/* @__PURE__ */ g("mask", { id: I, maskUnits: "userSpaceOnUse", x: -L, y: -L, width: L * 2, height: L * 2, children: [
|
|
1491
|
+
/* @__PURE__ */ a("path", { d: k.bodyPath, fill: "#fff" }),
|
|
1492
|
+
k.eyes.map((N, S) => /* @__PURE__ */ a("path", { d: N.d, transform: N.matrix, opacity: N.alpha, fill: "#000" }, S)),
|
|
1493
|
+
k.notch && /* @__PURE__ */ a("circle", { cx: k.notch.x, cy: k.notch.y, r: k.notch.r, fill: "#000" })
|
|
1494
1494
|
] }),
|
|
1495
|
-
|
|
1495
|
+
ot
|
|
1496
1496
|
] }),
|
|
1497
|
-
/* @__PURE__ */ a("g", { fill: "none", strokeLinecap: "round", children:
|
|
1497
|
+
/* @__PURE__ */ a("g", { fill: "none", strokeLinecap: "round", children: k.arcs.map((N) => /* @__PURE__ */ a(
|
|
1498
1498
|
"path",
|
|
1499
1499
|
{
|
|
1500
|
-
d:
|
|
1501
|
-
stroke: `url(#${
|
|
1502
|
-
strokeWidth:
|
|
1503
|
-
opacity:
|
|
1500
|
+
d: N.back,
|
|
1501
|
+
stroke: `url(#${w}-${N.id})`,
|
|
1502
|
+
strokeWidth: N.width,
|
|
1503
|
+
opacity: N.opacity
|
|
1504
1504
|
},
|
|
1505
|
-
`b${
|
|
1505
|
+
`b${N.id}`
|
|
1506
1506
|
)) }),
|
|
1507
|
-
|
|
1508
|
-
/* @__PURE__ */ g("g", { opacity:
|
|
1509
|
-
/* @__PURE__ */ a("path", { d:
|
|
1510
|
-
/* @__PURE__ */ a("g", { mask: `url(#${
|
|
1507
|
+
k.dotsBehind && /* @__PURE__ */ a("g", { children: X }),
|
|
1508
|
+
/* @__PURE__ */ g("g", { opacity: k.bodyAlpha, children: [
|
|
1509
|
+
/* @__PURE__ */ a("path", { d: k.bodyPath, fill: v }),
|
|
1510
|
+
/* @__PURE__ */ a("g", { mask: `url(#${I})`, children: /* @__PURE__ */ a("rect", { x: -L, y: -L, width: L * 2, height: L * 2, fill: y }) })
|
|
1511
1511
|
] }),
|
|
1512
|
-
!
|
|
1513
|
-
|
|
1514
|
-
/* @__PURE__ */ a("g", { fill: "none", strokeLinecap: "round", children:
|
|
1512
|
+
!k.dotsBehind && /* @__PURE__ */ a("g", { children: X }),
|
|
1513
|
+
k.notif && /* @__PURE__ */ a("circle", { cx: k.notif.x, cy: k.notif.y, r: k.notif.r, fill: A }),
|
|
1514
|
+
/* @__PURE__ */ a("g", { fill: "none", strokeLinecap: "round", children: k.arcs.map((N) => /* @__PURE__ */ a(
|
|
1515
1515
|
"path",
|
|
1516
1516
|
{
|
|
1517
|
-
d:
|
|
1518
|
-
stroke: `url(#${
|
|
1519
|
-
strokeWidth:
|
|
1520
|
-
opacity:
|
|
1517
|
+
d: N.front,
|
|
1518
|
+
stroke: `url(#${w}-${N.id})`,
|
|
1519
|
+
strokeWidth: N.width,
|
|
1520
|
+
opacity: N.opacity
|
|
1521
1521
|
},
|
|
1522
|
-
`f${
|
|
1522
|
+
`f${N.id}`
|
|
1523
1523
|
)) })
|
|
1524
1524
|
]
|
|
1525
1525
|
}
|
|
1526
1526
|
);
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1529
|
-
return /* @__PURE__ */ a(
|
|
1528
|
+
function ia({ size: t = 60, state: n = "idle", frozenAt: e, ...s }) {
|
|
1529
|
+
return /* @__PURE__ */ a(Yt, { ...s, state: n, size: t, frozenAt: e ?? ks[n] ?? 1 });
|
|
1530
|
+
}
|
|
1531
|
+
const Ds = "_menu_dpnsn_2", Ys = "_menuVisible_dpnsn_21", Us = "_menuClip_dpnsn_29", Xs = "_menuSize_dpnsn_35", Gs = "_menuContent_dpnsn_42", Ws = "_menuFade_dpnsn_69", Qs = "_scrollHint_dpnsn_74", Nt = {
|
|
1532
|
+
menu: Ds,
|
|
1533
|
+
menuVisible: Ys,
|
|
1534
|
+
menuClip: Us,
|
|
1535
|
+
menuSize: Xs,
|
|
1536
|
+
menuContent: Gs,
|
|
1537
|
+
menuFade: Ws,
|
|
1538
|
+
scrollHint: Qs
|
|
1539
|
+
}, xe = Qt(
|
|
1540
|
+
function({ menu: n, id: e, label: s = "Add to prompt", maxHeight: o = 240, disabled: i = !1, restoreFocusRef: r }, c) {
|
|
1541
|
+
const l = H(null), d = H(null), u = H(null), [h, p] = at(!1), [f, y] = at(), [v, A] = at(n), _ = n != null && n !== !1;
|
|
1542
|
+
nt(() => {
|
|
1543
|
+
var m;
|
|
1544
|
+
_ && A(n), l.current && (!_ && l.current.contains(document.activeElement) && ((m = r.current) == null || m.focus()), l.current.inert = !_ || i);
|
|
1545
|
+
}, [n, _, i, r]), pe(() => {
|
|
1546
|
+
const m = d.current;
|
|
1547
|
+
if (!m) return;
|
|
1548
|
+
function k() {
|
|
1549
|
+
m && (y(m.getBoundingClientRect().height), $(m));
|
|
1550
|
+
}
|
|
1551
|
+
k();
|
|
1552
|
+
const O = new ResizeObserver(k);
|
|
1553
|
+
return O.observe(m), u.current && O.observe(u.current), () => O.disconnect();
|
|
1554
|
+
}, [v, o]);
|
|
1555
|
+
function $(m) {
|
|
1556
|
+
p(m.scrollHeight - m.clientHeight - m.scrollTop > 1);
|
|
1557
|
+
}
|
|
1558
|
+
function b(m) {
|
|
1559
|
+
l.current = m, typeof c == "function" ? c(m) : c && (c.current = m);
|
|
1560
|
+
}
|
|
1561
|
+
return /* @__PURE__ */ a(
|
|
1562
|
+
"div",
|
|
1563
|
+
{
|
|
1564
|
+
ref: b,
|
|
1565
|
+
id: e,
|
|
1566
|
+
role: "region",
|
|
1567
|
+
"aria-label": s,
|
|
1568
|
+
"aria-hidden": !_,
|
|
1569
|
+
className: [Nt.menu, _ && Nt.menuVisible].filter(Boolean).join(" "),
|
|
1570
|
+
onTransitionEnd: (m) => {
|
|
1571
|
+
m.target === m.currentTarget && m.propertyName === "grid-template-rows" && !_ && A(null);
|
|
1572
|
+
},
|
|
1573
|
+
children: /* @__PURE__ */ a("div", { className: Nt.menuClip, children: /* @__PURE__ */ g("div", { className: Nt.menuSize, style: { height: f }, children: [
|
|
1574
|
+
/* @__PURE__ */ a(
|
|
1575
|
+
Ft,
|
|
1576
|
+
{
|
|
1577
|
+
ref: d,
|
|
1578
|
+
direction: "y",
|
|
1579
|
+
size: "thin",
|
|
1580
|
+
className: [Nt.menuContent, h && Nt.menuFade].filter(Boolean).join(" "),
|
|
1581
|
+
onScroll: (m) => $(m.currentTarget),
|
|
1582
|
+
style: {
|
|
1583
|
+
maxHeight: `min(${typeof o == "number" ? `${o}px` : o}, 50dvh)`
|
|
1584
|
+
},
|
|
1585
|
+
children: /* @__PURE__ */ a("div", { ref: u, children: v })
|
|
1586
|
+
}
|
|
1587
|
+
),
|
|
1588
|
+
_ && h && /* @__PURE__ */ a("span", { className: Nt.scrollHint, "aria-hidden": !0, children: /* @__PURE__ */ a(mn, { size: 14 }) })
|
|
1589
|
+
] }) })
|
|
1590
|
+
}
|
|
1591
|
+
);
|
|
1592
|
+
}
|
|
1593
|
+
);
|
|
1594
|
+
function zt(t, n, e) {
|
|
1595
|
+
const s = H(t !== void 0).current, [o, i] = at(n), r = s ? t : o, c = fn(
|
|
1596
|
+
(l) => {
|
|
1597
|
+
s || i(l), e == null || e(l);
|
|
1598
|
+
},
|
|
1599
|
+
[s, e]
|
|
1600
|
+
);
|
|
1601
|
+
return [r, c];
|
|
1530
1602
|
}
|
|
1531
|
-
const
|
|
1532
|
-
root:
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1603
|
+
const Vs = "_root_blhro_2 _root_6xqta_30", Ks = "_references_blhro_17 _referencesRow_6xqta_84", Zs = "_field_blhro_22", Js = "_textarea_blhro_27 _input_6xqta_136", to = "_footer_blhro_37", eo = "_avatar_blhro_45 _avatar_6xqta_129", no = "_actions_blhro_49 _actions_6xqta_154", so = "_recents_blhro_56", oo = "_divider_blhro_60", ro = "_disabled_blhro_68 _disabled_6xqta_124", ht = {
|
|
1604
|
+
root: Vs,
|
|
1605
|
+
references: Ks,
|
|
1606
|
+
field: Zs,
|
|
1607
|
+
textarea: Js,
|
|
1608
|
+
footer: to,
|
|
1609
|
+
avatar: eo,
|
|
1610
|
+
actions: no,
|
|
1611
|
+
recents: so,
|
|
1612
|
+
divider: oo,
|
|
1613
|
+
disabled: ro
|
|
1614
|
+
}, aa = Qt(function({
|
|
1615
|
+
value: n,
|
|
1616
|
+
defaultValue: e = "",
|
|
1617
|
+
onValueChange: s,
|
|
1618
|
+
onSubmit: o,
|
|
1619
|
+
submitOnEnter: i = !0,
|
|
1620
|
+
submitLabel: r = "Send",
|
|
1621
|
+
maxHeight: c = "240px",
|
|
1622
|
+
placeholder: l = "Work with Novi",
|
|
1623
|
+
"aria-label": d = "Work with Novi",
|
|
1624
|
+
avatar: u,
|
|
1625
|
+
noviProps: h,
|
|
1626
|
+
references: p,
|
|
1627
|
+
menu: f,
|
|
1628
|
+
menuLabel: y = "Add to prompt",
|
|
1629
|
+
menuMaxHeight: v = 240,
|
|
1630
|
+
onMenuClose: A,
|
|
1631
|
+
actions: _,
|
|
1632
|
+
onRecents: $,
|
|
1633
|
+
onAdd: b,
|
|
1634
|
+
onVoice: m,
|
|
1635
|
+
recentsLabel: k = "Recents",
|
|
1636
|
+
addLabel: O = "Add",
|
|
1637
|
+
voiceLabel: w = "Use voice",
|
|
1638
|
+
disabled: I = !1,
|
|
1639
|
+
readOnly: j = !1,
|
|
1640
|
+
className: F,
|
|
1641
|
+
onKeyDown: E,
|
|
1642
|
+
rows: Z = 2,
|
|
1643
|
+
...C
|
|
1644
|
+
}, q) {
|
|
1645
|
+
const [B, W] = zt(n, e, s), L = H(null), ot = Ct(), X = f != null && f !== !1, D = B.trim().length > 0, rt = !!(_ || $ || b || m || o && D), N = D && !I && !j && !!o;
|
|
1646
|
+
pe(() => {
|
|
1647
|
+
const x = L.current;
|
|
1648
|
+
x && (x.style.height = "auto", x.style.height = `${x.scrollHeight}px`);
|
|
1649
|
+
}, [B, Z]);
|
|
1650
|
+
function S() {
|
|
1651
|
+
var x;
|
|
1652
|
+
N && (o == null || o(B.trim()), W(""), (x = L.current) == null || x.focus());
|
|
1653
|
+
}
|
|
1654
|
+
return /* @__PURE__ */ g(
|
|
1655
|
+
"div",
|
|
1656
|
+
{
|
|
1657
|
+
className: [ht.root, I && ht.disabled, F].filter(Boolean).join(" "),
|
|
1658
|
+
onKeyDown: (x) => {
|
|
1659
|
+
x.key === "Escape" && !x.defaultPrevented && X && A && (x.preventDefault(), A());
|
|
1660
|
+
},
|
|
1661
|
+
children: [
|
|
1662
|
+
/* @__PURE__ */ a(
|
|
1663
|
+
xe,
|
|
1664
|
+
{
|
|
1665
|
+
id: ot,
|
|
1666
|
+
menu: f,
|
|
1667
|
+
label: y,
|
|
1668
|
+
maxHeight: v,
|
|
1669
|
+
disabled: I,
|
|
1670
|
+
restoreFocusRef: L
|
|
1671
|
+
}
|
|
1672
|
+
),
|
|
1673
|
+
p && /* @__PURE__ */ a("div", { className: ht.references, children: p }),
|
|
1674
|
+
/* @__PURE__ */ a(Ft, { direction: "y", size: "thin", maxHeight: c, className: ht.field, children: /* @__PURE__ */ a(
|
|
1675
|
+
"textarea",
|
|
1676
|
+
{
|
|
1677
|
+
...C,
|
|
1678
|
+
ref: (x) => {
|
|
1679
|
+
L.current = x, typeof q == "function" ? q(x) : q && (q.current = x);
|
|
1680
|
+
},
|
|
1681
|
+
className: ht.textarea,
|
|
1682
|
+
rows: Z,
|
|
1683
|
+
"aria-label": d,
|
|
1684
|
+
value: B,
|
|
1685
|
+
placeholder: l,
|
|
1686
|
+
disabled: I,
|
|
1687
|
+
readOnly: j,
|
|
1688
|
+
onChange: (x) => W(x.target.value),
|
|
1689
|
+
onKeyDown: (x) => {
|
|
1690
|
+
E == null || E(x), !(x.defaultPrevented || x.nativeEvent.isComposing) && i && o && x.key === "Enter" && !x.shiftKey && (x.preventDefault(), S());
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
) }),
|
|
1694
|
+
/* @__PURE__ */ g("div", { className: ht.footer, children: [
|
|
1695
|
+
/* @__PURE__ */ a("span", { className: ht.avatar, "aria-hidden": !0, children: u ?? /* @__PURE__ */ a(Yt, { size: 28, expression: "happy", frozenAt: 1, paper: "var(--backgrounds-bg-base)", ...h }) }),
|
|
1696
|
+
rt && /* @__PURE__ */ g("div", { className: ht.actions, children: [
|
|
1697
|
+
_,
|
|
1698
|
+
$ && /* @__PURE__ */ a(
|
|
1699
|
+
vt,
|
|
1700
|
+
{
|
|
1701
|
+
variant: "transparent",
|
|
1702
|
+
size: "sm",
|
|
1703
|
+
className: ht.recents,
|
|
1704
|
+
leftIcon: /* @__PURE__ */ a(yn, { size: 18 }),
|
|
1705
|
+
disabled: I,
|
|
1706
|
+
onClick: $,
|
|
1707
|
+
children: k
|
|
1708
|
+
}
|
|
1709
|
+
),
|
|
1710
|
+
$ && (b || m || o && D) && /* @__PURE__ */ a("span", { className: ht.divider, "aria-hidden": !0 }),
|
|
1711
|
+
b && /* @__PURE__ */ a(
|
|
1712
|
+
K,
|
|
1713
|
+
{
|
|
1714
|
+
variant: "transparent",
|
|
1715
|
+
radius: "full",
|
|
1716
|
+
size: "sm",
|
|
1717
|
+
icon: /* @__PURE__ */ a(_e, { size: 18 }),
|
|
1718
|
+
"aria-label": O,
|
|
1719
|
+
"aria-expanded": X,
|
|
1720
|
+
"aria-controls": ot,
|
|
1721
|
+
disabled: I,
|
|
1722
|
+
onClick: b
|
|
1723
|
+
}
|
|
1724
|
+
),
|
|
1725
|
+
m && /* @__PURE__ */ a(
|
|
1726
|
+
K,
|
|
1727
|
+
{
|
|
1728
|
+
variant: "transparent",
|
|
1729
|
+
radius: "full",
|
|
1730
|
+
size: "sm",
|
|
1731
|
+
icon: /* @__PURE__ */ a(Ye, { size: 18 }),
|
|
1732
|
+
"aria-label": w,
|
|
1733
|
+
disabled: I,
|
|
1734
|
+
onClick: m
|
|
1735
|
+
}
|
|
1736
|
+
),
|
|
1737
|
+
o && D && /* @__PURE__ */ a(
|
|
1738
|
+
K,
|
|
1739
|
+
{
|
|
1740
|
+
variant: "inverted",
|
|
1741
|
+
radius: "full",
|
|
1742
|
+
size: "sm",
|
|
1743
|
+
icon: /* @__PURE__ */ a(Ue, { size: 15 }),
|
|
1744
|
+
"aria-label": r,
|
|
1745
|
+
disabled: !N,
|
|
1746
|
+
onClick: S
|
|
1747
|
+
}
|
|
1748
|
+
)
|
|
1749
|
+
] })
|
|
1750
|
+
] })
|
|
1751
|
+
]
|
|
1752
|
+
}
|
|
1753
|
+
);
|
|
1754
|
+
}), io = "_root_1ynah_1", ao = "_title_1ynah_10", co = "_titleText_1ynah_24", lo = "_avatar_1ynah_31", uo = "_actions_1ynah_37", Pt = {
|
|
1755
|
+
root: io,
|
|
1756
|
+
title: ao,
|
|
1757
|
+
titleText: co,
|
|
1758
|
+
avatar: lo,
|
|
1759
|
+
actions: uo
|
|
1537
1760
|
};
|
|
1538
|
-
function
|
|
1761
|
+
function ho({
|
|
1539
1762
|
title: t,
|
|
1540
1763
|
titleAs: n = "h2",
|
|
1541
1764
|
avatar: e,
|
|
@@ -1549,30 +1772,30 @@ function Xs({
|
|
|
1549
1772
|
className: u,
|
|
1550
1773
|
...h
|
|
1551
1774
|
}) {
|
|
1552
|
-
return /* @__PURE__ */ g("header", { className: [
|
|
1553
|
-
/* @__PURE__ */ g(n, { className:
|
|
1554
|
-
e && /* @__PURE__ */ a("span", { className:
|
|
1555
|
-
/* @__PURE__ */ a("span", { className:
|
|
1775
|
+
return /* @__PURE__ */ g("header", { className: [Pt.root, u].filter(Boolean).join(" "), ...h, children: [
|
|
1776
|
+
/* @__PURE__ */ g(n, { className: Pt.title, children: [
|
|
1777
|
+
e && /* @__PURE__ */ a("span", { className: Pt.avatar, children: e }),
|
|
1778
|
+
/* @__PURE__ */ a("span", { className: Pt.titleText, children: t })
|
|
1556
1779
|
] }),
|
|
1557
|
-
/* @__PURE__ */ g("div", { className:
|
|
1780
|
+
/* @__PURE__ */ g("div", { className: Pt.actions, children: [
|
|
1558
1781
|
r,
|
|
1559
1782
|
s && /* @__PURE__ */ a(
|
|
1560
|
-
|
|
1783
|
+
K,
|
|
1561
1784
|
{
|
|
1562
1785
|
variant: "transparent",
|
|
1563
1786
|
size: "xsmall",
|
|
1564
|
-
icon: o ? /* @__PURE__ */ a(
|
|
1787
|
+
icon: o ? /* @__PURE__ */ a(gn, { size: 15 }) : /* @__PURE__ */ a(xn, { size: 15 }),
|
|
1565
1788
|
"aria-label": o ? l : c,
|
|
1566
1789
|
"aria-expanded": o,
|
|
1567
1790
|
onClick: s
|
|
1568
1791
|
}
|
|
1569
1792
|
),
|
|
1570
1793
|
i && /* @__PURE__ */ a(
|
|
1571
|
-
|
|
1794
|
+
K,
|
|
1572
1795
|
{
|
|
1573
1796
|
variant: "transparent",
|
|
1574
1797
|
size: "xsmall",
|
|
1575
|
-
icon: /* @__PURE__ */ a(
|
|
1798
|
+
icon: /* @__PURE__ */ a(Xe, { size: 15 }),
|
|
1576
1799
|
"aria-label": d,
|
|
1577
1800
|
onClick: i
|
|
1578
1801
|
}
|
|
@@ -1580,14 +1803,14 @@ function Xs({
|
|
|
1580
1803
|
] })
|
|
1581
1804
|
] });
|
|
1582
1805
|
}
|
|
1583
|
-
const
|
|
1584
|
-
root:
|
|
1585
|
-
threadWrap:
|
|
1586
|
-
thread:
|
|
1587
|
-
jump:
|
|
1588
|
-
threadInner:
|
|
1589
|
-
},
|
|
1590
|
-
function
|
|
1806
|
+
const fo = "_root_1wg4e_1", po = "_threadWrap_1wg4e_13", _o = "_thread_1wg4e_13", mo = "_jump_1wg4e_32", yo = "_threadInner_1wg4e_59", Ot = {
|
|
1807
|
+
root: fo,
|
|
1808
|
+
threadWrap: po,
|
|
1809
|
+
thread: _o,
|
|
1810
|
+
jump: mo,
|
|
1811
|
+
threadInner: yo
|
|
1812
|
+
}, go = 64;
|
|
1813
|
+
function ca({
|
|
1591
1814
|
children: t,
|
|
1592
1815
|
title: n = "Ask anything",
|
|
1593
1816
|
titleAs: e,
|
|
@@ -1600,36 +1823,36 @@ function Qi({
|
|
|
1600
1823
|
input: d,
|
|
1601
1824
|
bottom: u,
|
|
1602
1825
|
height: h = "480px",
|
|
1603
|
-
autoScroll:
|
|
1604
|
-
scrollToBottomLabel:
|
|
1605
|
-
className:
|
|
1606
|
-
style:
|
|
1607
|
-
|
|
1826
|
+
autoScroll: p = !0,
|
|
1827
|
+
scrollToBottomLabel: f = "Jump to the newest message",
|
|
1828
|
+
className: y,
|
|
1829
|
+
style: v,
|
|
1830
|
+
...A
|
|
1608
1831
|
}) {
|
|
1609
|
-
const
|
|
1610
|
-
|
|
1611
|
-
const
|
|
1612
|
-
!
|
|
1613
|
-
}, [t,
|
|
1614
|
-
function
|
|
1615
|
-
const
|
|
1616
|
-
if (!
|
|
1617
|
-
const
|
|
1618
|
-
|
|
1832
|
+
const _ = H(null), $ = H(!0), [b, m] = at(!0);
|
|
1833
|
+
nt(() => {
|
|
1834
|
+
const w = _.current;
|
|
1835
|
+
!w || !p || !$.current || (w.scrollTop = w.scrollHeight);
|
|
1836
|
+
}, [t, p]);
|
|
1837
|
+
function k() {
|
|
1838
|
+
const w = _.current;
|
|
1839
|
+
if (!w) return;
|
|
1840
|
+
const I = w.scrollHeight - w.scrollTop - w.clientHeight;
|
|
1841
|
+
$.current = I <= go, m($.current);
|
|
1619
1842
|
}
|
|
1620
|
-
function
|
|
1621
|
-
const
|
|
1622
|
-
|
|
1843
|
+
function O() {
|
|
1844
|
+
const w = _.current;
|
|
1845
|
+
w && (w.scrollTo({ top: w.scrollHeight, behavior: "smooth" }), $.current = !0, m(!0));
|
|
1623
1846
|
}
|
|
1624
1847
|
return /* @__PURE__ */ g(
|
|
1625
1848
|
"div",
|
|
1626
1849
|
{
|
|
1627
|
-
className: [
|
|
1628
|
-
style: { height: h, ...
|
|
1629
|
-
|
|
1850
|
+
className: [Ot.root, y].filter(Boolean).join(" "),
|
|
1851
|
+
style: { height: h, ...v },
|
|
1852
|
+
...A,
|
|
1630
1853
|
children: [
|
|
1631
1854
|
s ?? /* @__PURE__ */ a(
|
|
1632
|
-
|
|
1855
|
+
ho,
|
|
1633
1856
|
{
|
|
1634
1857
|
title: n,
|
|
1635
1858
|
titleAs: e,
|
|
@@ -1640,27 +1863,27 @@ function Qi({
|
|
|
1640
1863
|
actions: l
|
|
1641
1864
|
}
|
|
1642
1865
|
),
|
|
1643
|
-
/* @__PURE__ */ g("div", { className:
|
|
1866
|
+
/* @__PURE__ */ g("div", { className: Ot.threadWrap, children: [
|
|
1644
1867
|
/* @__PURE__ */ a(
|
|
1645
|
-
|
|
1868
|
+
Ft,
|
|
1646
1869
|
{
|
|
1647
|
-
ref:
|
|
1870
|
+
ref: _,
|
|
1648
1871
|
direction: "y",
|
|
1649
1872
|
size: "thin",
|
|
1650
|
-
className:
|
|
1651
|
-
onScroll:
|
|
1652
|
-
children: /* @__PURE__ */ a("div", { className:
|
|
1873
|
+
className: Ot.thread,
|
|
1874
|
+
onScroll: k,
|
|
1875
|
+
children: /* @__PURE__ */ a("div", { className: Ot.threadInner, children: t })
|
|
1653
1876
|
}
|
|
1654
1877
|
),
|
|
1655
|
-
!
|
|
1656
|
-
|
|
1878
|
+
!b && /* @__PURE__ */ a("div", { className: Ot.jump, children: /* @__PURE__ */ a(
|
|
1879
|
+
K,
|
|
1657
1880
|
{
|
|
1658
1881
|
variant: "neutral",
|
|
1659
1882
|
radius: "full",
|
|
1660
1883
|
size: "sm",
|
|
1661
|
-
icon: /* @__PURE__ */ a(
|
|
1662
|
-
"aria-label":
|
|
1663
|
-
onClick:
|
|
1884
|
+
icon: /* @__PURE__ */ a(bn, { size: 15 }),
|
|
1885
|
+
"aria-label": f,
|
|
1886
|
+
onClick: O
|
|
1664
1887
|
}
|
|
1665
1888
|
) })
|
|
1666
1889
|
] }),
|
|
@@ -1670,57 +1893,57 @@ function Qi({
|
|
|
1670
1893
|
}
|
|
1671
1894
|
);
|
|
1672
1895
|
}
|
|
1673
|
-
const
|
|
1674
|
-
root:
|
|
1675
|
-
label:
|
|
1676
|
-
action:
|
|
1896
|
+
const xo = "_root_15sqm_1", bo = "_label_15sqm_9", vo = "_action_15sqm_20", ie = {
|
|
1897
|
+
root: xo,
|
|
1898
|
+
label: bo,
|
|
1899
|
+
action: vo
|
|
1677
1900
|
};
|
|
1678
|
-
function
|
|
1679
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
1680
|
-
/* @__PURE__ */ a("span", { className:
|
|
1681
|
-
n && /* @__PURE__ */ a("span", { className:
|
|
1901
|
+
function la({ children: t, action: n, className: e, ...s }) {
|
|
1902
|
+
return /* @__PURE__ */ g("div", { className: [ie.root, e].filter(Boolean).join(" "), ...s, children: [
|
|
1903
|
+
/* @__PURE__ */ a("span", { className: ie.label, children: t }),
|
|
1904
|
+
n && /* @__PURE__ */ a("span", { className: ie.action, children: n })
|
|
1682
1905
|
] });
|
|
1683
1906
|
}
|
|
1684
|
-
const
|
|
1685
|
-
root:
|
|
1686
|
-
leading:
|
|
1687
|
-
meta:
|
|
1688
|
-
hint:
|
|
1689
|
-
divider:
|
|
1690
|
-
shortcut:
|
|
1691
|
-
keys:
|
|
1692
|
-
},
|
|
1693
|
-
/* @__PURE__ */ a(
|
|
1694
|
-
/* @__PURE__ */ a(
|
|
1907
|
+
const ko = "_root_s1zb4_1", No = "_leading_s1zb4_11", $o = "_meta_s1zb4_18", Ao = "_hint_s1zb4_28", Mo = "_divider_s1zb4_32", wo = "_shortcut_s1zb4_39", zo = "_keys_s1zb4_46", bt = {
|
|
1908
|
+
root: ko,
|
|
1909
|
+
leading: No,
|
|
1910
|
+
meta: $o,
|
|
1911
|
+
hint: Ao,
|
|
1912
|
+
divider: Mo,
|
|
1913
|
+
shortcut: wo,
|
|
1914
|
+
keys: zo
|
|
1915
|
+
}, Io = [
|
|
1916
|
+
/* @__PURE__ */ a(vn, { size: 12 }, "shift"),
|
|
1917
|
+
/* @__PURE__ */ a(kn, { size: 12 }, "enter")
|
|
1695
1918
|
];
|
|
1696
|
-
function
|
|
1919
|
+
function da({
|
|
1697
1920
|
hint: t,
|
|
1698
1921
|
shortcutLabel: n,
|
|
1699
|
-
shortcutKeys: e =
|
|
1922
|
+
shortcutKeys: e = Io,
|
|
1700
1923
|
leading: s,
|
|
1701
1924
|
className: o,
|
|
1702
1925
|
...i
|
|
1703
1926
|
}) {
|
|
1704
1927
|
const r = !!n || e.length > 0;
|
|
1705
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
1706
|
-
s && /* @__PURE__ */ a("div", { className:
|
|
1707
|
-
/* @__PURE__ */ g("div", { className:
|
|
1708
|
-
t && /* @__PURE__ */ a("span", { className:
|
|
1709
|
-
t && r && /* @__PURE__ */ a("span", { className:
|
|
1710
|
-
r && /* @__PURE__ */ g("span", { className:
|
|
1711
|
-
n && /* @__PURE__ */ a("span", { className:
|
|
1712
|
-
/* @__PURE__ */ a("span", { className:
|
|
1928
|
+
return /* @__PURE__ */ g("div", { className: [bt.root, o].filter(Boolean).join(" "), ...i, children: [
|
|
1929
|
+
s && /* @__PURE__ */ a("div", { className: bt.leading, children: s }),
|
|
1930
|
+
/* @__PURE__ */ g("div", { className: bt.meta, children: [
|
|
1931
|
+
t && /* @__PURE__ */ a("span", { className: bt.hint, children: t }),
|
|
1932
|
+
t && r && /* @__PURE__ */ a("span", { className: bt.divider, "aria-hidden": "true" }),
|
|
1933
|
+
r && /* @__PURE__ */ g("span", { className: bt.shortcut, children: [
|
|
1934
|
+
n && /* @__PURE__ */ a("span", { className: bt.shortcutLabel, children: n }),
|
|
1935
|
+
/* @__PURE__ */ a("span", { className: bt.keys, children: e.map((c, l) => /* @__PURE__ */ a(pn, { bg: "bg-field-component", children: c }, l)) })
|
|
1713
1936
|
] })
|
|
1714
1937
|
] })
|
|
1715
1938
|
] });
|
|
1716
1939
|
}
|
|
1717
|
-
const
|
|
1718
|
-
root:
|
|
1719
|
-
selected:
|
|
1720
|
-
label:
|
|
1721
|
-
icon:
|
|
1940
|
+
const Ro = "_root_19z6n_1", Bo = "_selected_19z6n_38", To = "_label_19z6n_48", Co = "_icon_19z6n_56", St = {
|
|
1941
|
+
root: Ro,
|
|
1942
|
+
selected: Bo,
|
|
1943
|
+
label: To,
|
|
1944
|
+
icon: Co
|
|
1722
1945
|
};
|
|
1723
|
-
function
|
|
1946
|
+
function ua({
|
|
1724
1947
|
children: t,
|
|
1725
1948
|
leftIcon: n,
|
|
1726
1949
|
rightIcon: e,
|
|
@@ -1728,10 +1951,10 @@ function Zi({
|
|
|
1728
1951
|
className: o,
|
|
1729
1952
|
...i
|
|
1730
1953
|
}) {
|
|
1731
|
-
const r = [
|
|
1732
|
-
n && /* @__PURE__ */ a("span", { className:
|
|
1733
|
-
/* @__PURE__ */ a("span", { className:
|
|
1734
|
-
e && /* @__PURE__ */ a("span", { className:
|
|
1954
|
+
const r = [St.root, s && St.selected, o].filter(Boolean).join(" "), c = /* @__PURE__ */ g(wt, { children: [
|
|
1955
|
+
n && /* @__PURE__ */ a("span", { className: St.icon, children: n }),
|
|
1956
|
+
/* @__PURE__ */ a("span", { className: St.label, children: t }),
|
|
1957
|
+
e && /* @__PURE__ */ a("span", { className: St.icon, children: e })
|
|
1735
1958
|
] });
|
|
1736
1959
|
if (i.href !== void 0) {
|
|
1737
1960
|
const { href: u, ...h } = i;
|
|
@@ -1740,90 +1963,18 @@ function Zi({
|
|
|
1740
1963
|
const { type: l = "button", ...d } = i;
|
|
1741
1964
|
return /* @__PURE__ */ a("button", { className: r, type: l, "aria-current": s ? "true" : void 0, ...d, children: c });
|
|
1742
1965
|
}
|
|
1743
|
-
const
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
var y;
|
|
1756
|
-
m && $(n), l.current && (!m && l.current.contains(document.activeElement) && ((y = r.current) == null || y.focus()), l.current.inert = !m || i);
|
|
1757
|
-
}, [n, m, i, r]), Le(() => {
|
|
1758
|
-
const y = d.current;
|
|
1759
|
-
if (!y) return;
|
|
1760
|
-
function b() {
|
|
1761
|
-
y && (_(y.getBoundingClientRect().height), A(y));
|
|
1762
|
-
}
|
|
1763
|
-
b();
|
|
1764
|
-
const P = new ResizeObserver(b);
|
|
1765
|
-
return P.observe(y), u.current && P.observe(u.current), () => P.disconnect();
|
|
1766
|
-
}, [x, o]);
|
|
1767
|
-
function A(y) {
|
|
1768
|
-
f(y.scrollHeight - y.clientHeight - y.scrollTop > 1);
|
|
1769
|
-
}
|
|
1770
|
-
function v(y) {
|
|
1771
|
-
l.current = y, typeof c == "function" ? c(y) : c && (c.current = y);
|
|
1772
|
-
}
|
|
1773
|
-
return /* @__PURE__ */ a(
|
|
1774
|
-
"div",
|
|
1775
|
-
{
|
|
1776
|
-
ref: v,
|
|
1777
|
-
id: e,
|
|
1778
|
-
role: "region",
|
|
1779
|
-
"aria-label": s,
|
|
1780
|
-
"aria-hidden": !m,
|
|
1781
|
-
className: [vt.menu, m && vt.menuVisible].filter(Boolean).join(" "),
|
|
1782
|
-
onTransitionEnd: (y) => {
|
|
1783
|
-
y.target === y.currentTarget && y.propertyName === "grid-template-rows" && !m && $(null);
|
|
1784
|
-
},
|
|
1785
|
-
children: /* @__PURE__ */ a("div", { className: vt.menuClip, children: /* @__PURE__ */ g("div", { className: vt.menuSize, style: { height: p }, children: [
|
|
1786
|
-
/* @__PURE__ */ a(
|
|
1787
|
-
Xt,
|
|
1788
|
-
{
|
|
1789
|
-
ref: d,
|
|
1790
|
-
direction: "y",
|
|
1791
|
-
size: "thin",
|
|
1792
|
-
className: [vt.menuContent, h && vt.menuFade].filter(Boolean).join(" "),
|
|
1793
|
-
onScroll: (y) => A(y.currentTarget),
|
|
1794
|
-
style: {
|
|
1795
|
-
maxHeight: `min(${typeof o == "number" ? `${o}px` : o}, 50dvh)`
|
|
1796
|
-
},
|
|
1797
|
-
children: /* @__PURE__ */ a("div", { ref: u, children: x })
|
|
1798
|
-
}
|
|
1799
|
-
),
|
|
1800
|
-
m && h && /* @__PURE__ */ a("span", { className: vt.scrollHint, "aria-hidden": !0, children: /* @__PURE__ */ a(gn, { size: 14 }) })
|
|
1801
|
-
] }) })
|
|
1802
|
-
}
|
|
1803
|
-
);
|
|
1804
|
-
}
|
|
1805
|
-
);
|
|
1806
|
-
function Tt(t, n, e) {
|
|
1807
|
-
const s = H(t !== void 0).current, [o, i] = st(n), r = s ? t : o, c = dn(
|
|
1808
|
-
(l) => {
|
|
1809
|
-
s || i(l), e == null || e(l);
|
|
1810
|
-
},
|
|
1811
|
-
[s, e]
|
|
1812
|
-
);
|
|
1813
|
-
return [r, c];
|
|
1814
|
-
}
|
|
1815
|
-
const ko = "_root_193n0_1", No = "_dragging_193n0_21", $o = "_srOnly_193n0_26", Ao = "_references_193n0_37", Mo = "_field_193n0_44", wo = "_textarea_193n0_49", Io = "_stop_193n0_77", zo = "_footer_193n0_81", Ro = "_actions_193n0_88", To = "_disabled_193n0_95", dt = {
|
|
1816
|
-
root: ko,
|
|
1817
|
-
dragging: No,
|
|
1818
|
-
srOnly: $o,
|
|
1819
|
-
references: Ao,
|
|
1820
|
-
field: Mo,
|
|
1821
|
-
textarea: wo,
|
|
1822
|
-
stop: Io,
|
|
1823
|
-
footer: zo,
|
|
1824
|
-
actions: Ro,
|
|
1825
|
-
disabled: To
|
|
1826
|
-
}, Ji = he(
|
|
1966
|
+
const Eo = "_root_193n0_1", Po = "_dragging_193n0_21", Oo = "_srOnly_193n0_26", So = "_references_193n0_37", jo = "_field_193n0_44", qo = "_textarea_193n0_49", Lo = "_stop_193n0_77", Fo = "_footer_193n0_81", Ho = "_actions_193n0_88", Do = "_disabled_193n0_95", ut = {
|
|
1967
|
+
root: Eo,
|
|
1968
|
+
dragging: Po,
|
|
1969
|
+
srOnly: Oo,
|
|
1970
|
+
references: So,
|
|
1971
|
+
field: jo,
|
|
1972
|
+
textarea: qo,
|
|
1973
|
+
stop: Lo,
|
|
1974
|
+
footer: Fo,
|
|
1975
|
+
actions: Ho,
|
|
1976
|
+
disabled: Do
|
|
1977
|
+
}, ha = Qt(
|
|
1827
1978
|
function({
|
|
1828
1979
|
value: n,
|
|
1829
1980
|
defaultValue: e = "",
|
|
@@ -1836,149 +1987,149 @@ const ko = "_root_193n0_1", No = "_dragging_193n0_21", $o = "_srOnly_193n0_26",
|
|
|
1836
1987
|
menuLabel: d = "Add to prompt",
|
|
1837
1988
|
menuMaxHeight: u = 240,
|
|
1838
1989
|
onMenuClose: h,
|
|
1839
|
-
onAdd:
|
|
1840
|
-
addLabel:
|
|
1841
|
-
trailing:
|
|
1842
|
-
submit:
|
|
1843
|
-
submitIcon:
|
|
1844
|
-
submitLabel:
|
|
1845
|
-
onStop:
|
|
1846
|
-
stopIcon:
|
|
1847
|
-
stopLabel:
|
|
1848
|
-
loading:
|
|
1849
|
-
submitOnEnter:
|
|
1850
|
-
maxHeight:
|
|
1851
|
-
onFilesDrop:
|
|
1990
|
+
onAdd: p,
|
|
1991
|
+
addLabel: f = "Add",
|
|
1992
|
+
trailing: y,
|
|
1993
|
+
submit: v,
|
|
1994
|
+
submitIcon: A,
|
|
1995
|
+
submitLabel: _ = "Send",
|
|
1996
|
+
onStop: $,
|
|
1997
|
+
stopIcon: b,
|
|
1998
|
+
stopLabel: m = "Stop",
|
|
1999
|
+
loading: k = !1,
|
|
2000
|
+
submitOnEnter: O = !0,
|
|
2001
|
+
maxHeight: w = "160px",
|
|
2002
|
+
onFilesDrop: I,
|
|
1852
2003
|
dropLabel: j = "Drop files to attach them",
|
|
1853
|
-
disabled:
|
|
1854
|
-
className:
|
|
1855
|
-
onKeyDown:
|
|
1856
|
-
onPaste:
|
|
1857
|
-
...
|
|
2004
|
+
disabled: F = !1,
|
|
2005
|
+
className: E,
|
|
2006
|
+
onKeyDown: Z,
|
|
2007
|
+
onPaste: C,
|
|
2008
|
+
...q
|
|
1858
2009
|
}, B) {
|
|
1859
|
-
const [
|
|
1860
|
-
|
|
1861
|
-
const
|
|
1862
|
-
|
|
1863
|
-
}, [
|
|
1864
|
-
function
|
|
1865
|
-
|
|
2010
|
+
const [W, L] = zt(n, e, s), ot = Ct(), X = l != null && l !== !1, [D, rt] = at(!1), N = H(null), S = H(0), x = W.trim().length > 0 && !F && !k, Y = k && !!$;
|
|
2011
|
+
pe(() => {
|
|
2012
|
+
const T = N.current;
|
|
2013
|
+
T && (T.style.height = "auto", T.style.height = `${T.scrollHeight}px`);
|
|
2014
|
+
}, [W]);
|
|
2015
|
+
function P(T) {
|
|
2016
|
+
N.current = T, typeof B == "function" ? B(T) : B && (B.current = T);
|
|
1866
2017
|
}
|
|
1867
|
-
function
|
|
1868
|
-
|
|
2018
|
+
function lt(T) {
|
|
2019
|
+
L(T.target.value);
|
|
1869
2020
|
}
|
|
1870
|
-
function
|
|
1871
|
-
|
|
2021
|
+
function xt() {
|
|
2022
|
+
x && (o == null || o(W.trim()), L(""));
|
|
1872
2023
|
}
|
|
1873
|
-
const
|
|
1874
|
-
function
|
|
1875
|
-
|
|
2024
|
+
const dt = !!I && !F;
|
|
2025
|
+
function Ut(T) {
|
|
2026
|
+
dt && (T.preventDefault(), S.current += 1, rt(!0));
|
|
1876
2027
|
}
|
|
1877
|
-
function
|
|
1878
|
-
|
|
2028
|
+
function an(T) {
|
|
2029
|
+
dt && (T.preventDefault(), T.dataTransfer.dropEffect = "copy");
|
|
1879
2030
|
}
|
|
1880
|
-
function
|
|
1881
|
-
|
|
2031
|
+
function cn(T) {
|
|
2032
|
+
dt && (T.preventDefault(), S.current = Math.max(0, S.current - 1), S.current === 0 && rt(!1));
|
|
1882
2033
|
}
|
|
1883
|
-
function
|
|
1884
|
-
if (!
|
|
1885
|
-
|
|
1886
|
-
const
|
|
1887
|
-
|
|
2034
|
+
function ln(T) {
|
|
2035
|
+
if (!dt) return;
|
|
2036
|
+
T.preventDefault(), S.current = 0, rt(!1);
|
|
2037
|
+
const Et = Array.from(T.dataTransfer.files);
|
|
2038
|
+
Et.length > 0 && (I == null || I(Et));
|
|
1888
2039
|
}
|
|
1889
|
-
function
|
|
1890
|
-
if (
|
|
1891
|
-
const
|
|
1892
|
-
|
|
2040
|
+
function dn(T) {
|
|
2041
|
+
if (C == null || C(T), !dt || T.defaultPrevented) return;
|
|
2042
|
+
const Et = Array.from(T.clipboardData.files);
|
|
2043
|
+
Et.length > 0 && (T.preventDefault(), I == null || I(Et));
|
|
1893
2044
|
}
|
|
1894
|
-
function
|
|
1895
|
-
|
|
2045
|
+
function un(T) {
|
|
2046
|
+
Z == null || Z(T), !T.defaultPrevented && O && T.key === "Enter" && !T.shiftKey && (T.preventDefault(), xt());
|
|
1896
2047
|
}
|
|
1897
2048
|
return /* @__PURE__ */ g(
|
|
1898
2049
|
"div",
|
|
1899
2050
|
{
|
|
1900
2051
|
className: [
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
2052
|
+
ut.root,
|
|
2053
|
+
D && ut.dragging,
|
|
2054
|
+
F && ut.disabled,
|
|
2055
|
+
E
|
|
1905
2056
|
].filter(Boolean).join(" "),
|
|
1906
|
-
onKeyDown: (
|
|
1907
|
-
|
|
2057
|
+
onKeyDown: (T) => {
|
|
2058
|
+
T.key === "Escape" && !T.defaultPrevented && X && h && (T.preventDefault(), h());
|
|
1908
2059
|
},
|
|
1909
|
-
onDragEnter:
|
|
1910
|
-
onDragOver:
|
|
1911
|
-
onDragLeave:
|
|
1912
|
-
onDrop:
|
|
2060
|
+
onDragEnter: Ut,
|
|
2061
|
+
onDragOver: an,
|
|
2062
|
+
onDragLeave: cn,
|
|
2063
|
+
onDrop: ln,
|
|
1913
2064
|
children: [
|
|
1914
|
-
/* @__PURE__ */ a("span", { className:
|
|
2065
|
+
/* @__PURE__ */ a("span", { className: ut.srOnly, "aria-live": "polite", children: D ? j : "" }),
|
|
1915
2066
|
/* @__PURE__ */ a(
|
|
1916
|
-
|
|
2067
|
+
xe,
|
|
1917
2068
|
{
|
|
1918
|
-
id:
|
|
2069
|
+
id: ot,
|
|
1919
2070
|
menu: l,
|
|
1920
2071
|
label: d,
|
|
1921
2072
|
maxHeight: u,
|
|
1922
|
-
disabled:
|
|
1923
|
-
restoreFocusRef:
|
|
2073
|
+
disabled: F,
|
|
2074
|
+
restoreFocusRef: N
|
|
1924
2075
|
}
|
|
1925
2076
|
),
|
|
1926
|
-
r && /* @__PURE__ */ a("div", { className:
|
|
1927
|
-
/* @__PURE__ */ a(
|
|
2077
|
+
r && /* @__PURE__ */ a("div", { className: ut.references, children: r }),
|
|
2078
|
+
/* @__PURE__ */ a(Ft, { direction: "y", size: "thin", maxHeight: w, className: ut.field, children: /* @__PURE__ */ a(
|
|
1928
2079
|
"textarea",
|
|
1929
2080
|
{
|
|
1930
|
-
ref:
|
|
1931
|
-
className:
|
|
2081
|
+
ref: P,
|
|
2082
|
+
className: ut.textarea,
|
|
1932
2083
|
rows: 1,
|
|
1933
|
-
value:
|
|
2084
|
+
value: W,
|
|
1934
2085
|
placeholder: i,
|
|
1935
|
-
disabled:
|
|
1936
|
-
onChange:
|
|
1937
|
-
onKeyDown:
|
|
1938
|
-
onPaste:
|
|
1939
|
-
...
|
|
2086
|
+
disabled: F,
|
|
2087
|
+
onChange: lt,
|
|
2088
|
+
onKeyDown: un,
|
|
2089
|
+
onPaste: dn,
|
|
2090
|
+
...q
|
|
1940
2091
|
}
|
|
1941
2092
|
) }),
|
|
1942
|
-
/* @__PURE__ */ g("div", { className:
|
|
1943
|
-
/* @__PURE__ */ a("div", { className:
|
|
1944
|
-
/* @__PURE__ */ g("div", { className:
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
2093
|
+
/* @__PURE__ */ g("div", { className: ut.footer, children: [
|
|
2094
|
+
/* @__PURE__ */ a("div", { className: ut.actions, children: c }),
|
|
2095
|
+
/* @__PURE__ */ g("div", { className: ut.actions, children: [
|
|
2096
|
+
y,
|
|
2097
|
+
p && /* @__PURE__ */ a(
|
|
2098
|
+
K,
|
|
1948
2099
|
{
|
|
1949
2100
|
variant: "transparent",
|
|
1950
2101
|
radius: "full",
|
|
1951
2102
|
size: "sm",
|
|
1952
|
-
icon: /* @__PURE__ */ a(
|
|
1953
|
-
"aria-label":
|
|
1954
|
-
"aria-expanded":
|
|
1955
|
-
"aria-controls":
|
|
1956
|
-
disabled:
|
|
1957
|
-
onClick:
|
|
2103
|
+
icon: /* @__PURE__ */ a(_e, { size: 18 }),
|
|
2104
|
+
"aria-label": f,
|
|
2105
|
+
"aria-expanded": X,
|
|
2106
|
+
"aria-controls": ot,
|
|
2107
|
+
disabled: F,
|
|
2108
|
+
onClick: p
|
|
1958
2109
|
}
|
|
1959
2110
|
),
|
|
1960
|
-
|
|
1961
|
-
|
|
2111
|
+
v ?? (Y ? /* @__PURE__ */ a(
|
|
2112
|
+
K,
|
|
1962
2113
|
{
|
|
1963
2114
|
variant: "neutral",
|
|
1964
2115
|
radius: "full",
|
|
1965
2116
|
size: "sm",
|
|
1966
|
-
className:
|
|
1967
|
-
icon:
|
|
1968
|
-
"aria-label":
|
|
1969
|
-
onClick:
|
|
2117
|
+
className: ut.stop,
|
|
2118
|
+
icon: b ?? /* @__PURE__ */ a(Nn, { size: 12, fill: "currentColor" }),
|
|
2119
|
+
"aria-label": m,
|
|
2120
|
+
onClick: $
|
|
1970
2121
|
}
|
|
1971
2122
|
) : /* @__PURE__ */ a(
|
|
1972
|
-
|
|
2123
|
+
K,
|
|
1973
2124
|
{
|
|
1974
2125
|
variant: "inverted",
|
|
1975
2126
|
radius: "full",
|
|
1976
2127
|
size: "sm",
|
|
1977
|
-
icon:
|
|
1978
|
-
"aria-label":
|
|
1979
|
-
disabled: !
|
|
1980
|
-
loading:
|
|
1981
|
-
onClick:
|
|
2128
|
+
icon: A ?? /* @__PURE__ */ a(Ue, { size: 15 }),
|
|
2129
|
+
"aria-label": _,
|
|
2130
|
+
disabled: !x,
|
|
2131
|
+
loading: k,
|
|
2132
|
+
onClick: xt
|
|
1982
2133
|
}
|
|
1983
2134
|
))
|
|
1984
2135
|
] })
|
|
@@ -1987,21 +2138,21 @@ const ko = "_root_193n0_1", No = "_dragging_193n0_21", $o = "_srOnly_193n0_26",
|
|
|
1987
2138
|
}
|
|
1988
2139
|
);
|
|
1989
2140
|
}
|
|
1990
|
-
),
|
|
1991
|
-
root:
|
|
1992
|
-
expanded:
|
|
1993
|
-
promptRow:
|
|
1994
|
-
references:
|
|
1995
|
-
referencesVisible:
|
|
1996
|
-
referencesClip:
|
|
1997
|
-
referencesRow:
|
|
1998
|
-
closing:
|
|
1999
|
-
disabled:
|
|
2000
|
-
avatar:
|
|
2001
|
-
input:
|
|
2002
|
-
actions:
|
|
2003
|
-
divider:
|
|
2004
|
-
},
|
|
2141
|
+
), Yo = "_root_6xqta_30", Uo = "_expanded_6xqta_50", Xo = "_promptRow_6xqta_54", Go = "_references_6xqta_62", Wo = "_referencesVisible_6xqta_73", Qo = "_referencesClip_6xqta_79", Vo = "_referencesRow_6xqta_84", Ko = "_closing_6xqta_90", Zo = "_disabled_6xqta_124", Jo = "_avatar_6xqta_129", tr = "_input_6xqta_136", er = "_actions_6xqta_154", nr = "_divider_6xqta_161", it = {
|
|
2142
|
+
root: Yo,
|
|
2143
|
+
expanded: Uo,
|
|
2144
|
+
promptRow: Xo,
|
|
2145
|
+
references: Go,
|
|
2146
|
+
referencesVisible: Wo,
|
|
2147
|
+
referencesClip: Qo,
|
|
2148
|
+
referencesRow: Vo,
|
|
2149
|
+
closing: Ko,
|
|
2150
|
+
disabled: Zo,
|
|
2151
|
+
avatar: Jo,
|
|
2152
|
+
input: tr,
|
|
2153
|
+
actions: er,
|
|
2154
|
+
divider: nr
|
|
2155
|
+
}, fa = Qt(
|
|
2005
2156
|
function({
|
|
2006
2157
|
value: n,
|
|
2007
2158
|
open: e = !0,
|
|
@@ -2014,84 +2165,84 @@ const ko = "_root_193n0_1", No = "_dragging_193n0_21", $o = "_srOnly_193n0_26",
|
|
|
2014
2165
|
references: d,
|
|
2015
2166
|
actions: u,
|
|
2016
2167
|
menu: h,
|
|
2017
|
-
menuLabel:
|
|
2018
|
-
menuMaxHeight:
|
|
2019
|
-
onMenuClose:
|
|
2020
|
-
onAdd:
|
|
2021
|
-
onVoice:
|
|
2022
|
-
onOpen:
|
|
2023
|
-
addLabel:
|
|
2024
|
-
voiceLabel:
|
|
2025
|
-
openLabel:
|
|
2026
|
-
disabled:
|
|
2027
|
-
className:
|
|
2028
|
-
onKeyDown:
|
|
2029
|
-
...
|
|
2168
|
+
menuLabel: p = "Add to prompt",
|
|
2169
|
+
menuMaxHeight: f = 240,
|
|
2170
|
+
onMenuClose: y,
|
|
2171
|
+
onAdd: v,
|
|
2172
|
+
onVoice: A,
|
|
2173
|
+
onOpen: _,
|
|
2174
|
+
addLabel: $ = "Add",
|
|
2175
|
+
voiceLabel: b = "Use voice",
|
|
2176
|
+
openLabel: m = "Open assistant",
|
|
2177
|
+
disabled: k = !1,
|
|
2178
|
+
className: O,
|
|
2179
|
+
onKeyDown: w,
|
|
2180
|
+
...I
|
|
2030
2181
|
}, j) {
|
|
2031
|
-
const [
|
|
2032
|
-
|
|
2033
|
-
e ? (
|
|
2034
|
-
}, [e,
|
|
2035
|
-
d != null && d !== !1 &&
|
|
2182
|
+
const [F, E] = zt(n, s, o), [Z, C] = at(e), [q, B] = at(!1), [W, L] = at(d), ot = Ct(), X = H(null), D = h != null && h !== !1, rt = H(null);
|
|
2183
|
+
nt(() => {
|
|
2184
|
+
e ? (C(!0), B(!1)) : Z && B(!0);
|
|
2185
|
+
}, [e, Z]), nt(() => {
|
|
2186
|
+
d != null && d !== !1 && L(d);
|
|
2036
2187
|
}, [d]);
|
|
2037
|
-
function
|
|
2038
|
-
|
|
2188
|
+
function N(P) {
|
|
2189
|
+
rt.current = P, typeof j == "function" ? j(P) : j && (j.current = P);
|
|
2039
2190
|
}
|
|
2040
|
-
function
|
|
2041
|
-
|
|
2191
|
+
function S(P) {
|
|
2192
|
+
E(P.target.value);
|
|
2042
2193
|
}
|
|
2043
|
-
const
|
|
2044
|
-
return
|
|
2194
|
+
const x = !!(u || v || A || _), Y = d != null && d !== !1;
|
|
2195
|
+
return Z ? /* @__PURE__ */ g(
|
|
2045
2196
|
"form",
|
|
2046
2197
|
{
|
|
2047
2198
|
className: [
|
|
2048
|
-
|
|
2049
|
-
(
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2199
|
+
it.root,
|
|
2200
|
+
(Y || D) && it.expanded,
|
|
2201
|
+
q && it.closing,
|
|
2202
|
+
k && it.disabled,
|
|
2203
|
+
O
|
|
2053
2204
|
].filter(Boolean).join(" "),
|
|
2054
|
-
onKeyDown: (
|
|
2055
|
-
|
|
2205
|
+
onKeyDown: (P) => {
|
|
2206
|
+
P.key === "Escape" && !P.defaultPrevented && D && y && (P.preventDefault(), y());
|
|
2056
2207
|
},
|
|
2057
|
-
onAnimationEnd: (
|
|
2058
|
-
|
|
2208
|
+
onAnimationEnd: (P) => {
|
|
2209
|
+
P.target === P.currentTarget && q && C(!1);
|
|
2059
2210
|
},
|
|
2060
|
-
onSubmit: (
|
|
2061
|
-
var
|
|
2062
|
-
|
|
2063
|
-
const
|
|
2064
|
-
if (
|
|
2065
|
-
const
|
|
2066
|
-
(
|
|
2211
|
+
onSubmit: (P) => {
|
|
2212
|
+
var dt, Ut;
|
|
2213
|
+
P.preventDefault();
|
|
2214
|
+
const lt = F.trim();
|
|
2215
|
+
if (P.target !== P.currentTarget || !lt || k) return;
|
|
2216
|
+
const xt = P.nativeEvent.submitter;
|
|
2217
|
+
(dt = X.current) != null && dt.contains(document.activeElement) || xt && ((Ut = X.current) != null && Ut.contains(xt)) || (i == null || i(lt), E(""));
|
|
2067
2218
|
},
|
|
2068
2219
|
children: [
|
|
2069
2220
|
/* @__PURE__ */ a(
|
|
2070
|
-
|
|
2221
|
+
xe,
|
|
2071
2222
|
{
|
|
2072
|
-
ref:
|
|
2073
|
-
id:
|
|
2223
|
+
ref: X,
|
|
2224
|
+
id: ot,
|
|
2074
2225
|
menu: h,
|
|
2075
|
-
label:
|
|
2076
|
-
maxHeight:
|
|
2077
|
-
disabled:
|
|
2078
|
-
restoreFocusRef:
|
|
2226
|
+
label: p,
|
|
2227
|
+
maxHeight: f,
|
|
2228
|
+
disabled: k,
|
|
2229
|
+
restoreFocusRef: rt
|
|
2079
2230
|
}
|
|
2080
2231
|
),
|
|
2081
2232
|
/* @__PURE__ */ a(
|
|
2082
2233
|
"div",
|
|
2083
2234
|
{
|
|
2084
|
-
className: [
|
|
2085
|
-
"aria-hidden": !
|
|
2086
|
-
onTransitionEnd: (
|
|
2087
|
-
|
|
2235
|
+
className: [it.references, Y && it.referencesVisible].filter(Boolean).join(" "),
|
|
2236
|
+
"aria-hidden": !Y,
|
|
2237
|
+
onTransitionEnd: (P) => {
|
|
2238
|
+
P.propertyName === "grid-template-rows" && !Y && L(null);
|
|
2088
2239
|
},
|
|
2089
|
-
children: /* @__PURE__ */ a("div", { className:
|
|
2240
|
+
children: /* @__PURE__ */ a("div", { className: it.referencesClip, children: /* @__PURE__ */ a("div", { className: it.referencesRow, children: W }) })
|
|
2090
2241
|
}
|
|
2091
2242
|
),
|
|
2092
|
-
/* @__PURE__ */ g("div", { className:
|
|
2093
|
-
/* @__PURE__ */ a("span", { className:
|
|
2094
|
-
|
|
2243
|
+
/* @__PURE__ */ g("div", { className: it.promptRow, children: [
|
|
2244
|
+
/* @__PURE__ */ a("span", { className: it.avatar, "aria-hidden": !0, children: c ?? /* @__PURE__ */ a(
|
|
2245
|
+
Yt,
|
|
2095
2246
|
{
|
|
2096
2247
|
size: 28,
|
|
2097
2248
|
expression: "happy",
|
|
@@ -2103,60 +2254,60 @@ const ko = "_root_193n0_1", No = "_dragging_193n0_21", $o = "_srOnly_193n0_26",
|
|
|
2103
2254
|
/* @__PURE__ */ a(
|
|
2104
2255
|
"input",
|
|
2105
2256
|
{
|
|
2106
|
-
...
|
|
2107
|
-
ref:
|
|
2257
|
+
...I,
|
|
2258
|
+
ref: N,
|
|
2108
2259
|
type: "text",
|
|
2109
|
-
className:
|
|
2110
|
-
value:
|
|
2260
|
+
className: it.input,
|
|
2261
|
+
value: F,
|
|
2111
2262
|
placeholder: r,
|
|
2112
|
-
disabled:
|
|
2113
|
-
onChange:
|
|
2114
|
-
onKeyDown: (
|
|
2115
|
-
var
|
|
2116
|
-
|
|
2263
|
+
disabled: k,
|
|
2264
|
+
onChange: S,
|
|
2265
|
+
onKeyDown: (P) => {
|
|
2266
|
+
var lt;
|
|
2267
|
+
w == null || w(P), !P.defaultPrevented && P.key === "Enter" && !P.nativeEvent.isComposing && (P.preventDefault(), (lt = P.currentTarget.form) == null || lt.requestSubmit());
|
|
2117
2268
|
}
|
|
2118
2269
|
}
|
|
2119
2270
|
),
|
|
2120
|
-
|
|
2271
|
+
x && /* @__PURE__ */ g("div", { className: it.actions, children: [
|
|
2121
2272
|
u,
|
|
2122
|
-
|
|
2123
|
-
|
|
2273
|
+
v && /* @__PURE__ */ a(
|
|
2274
|
+
K,
|
|
2124
2275
|
{
|
|
2125
2276
|
variant: "transparent",
|
|
2126
2277
|
radius: "full",
|
|
2127
2278
|
size: "sm",
|
|
2128
|
-
"aria-expanded":
|
|
2129
|
-
"aria-controls":
|
|
2130
|
-
icon: /* @__PURE__ */ a(
|
|
2131
|
-
"aria-label":
|
|
2132
|
-
disabled:
|
|
2133
|
-
onClick:
|
|
2279
|
+
"aria-expanded": D,
|
|
2280
|
+
"aria-controls": ot,
|
|
2281
|
+
icon: /* @__PURE__ */ a(_e, { size: 18 }),
|
|
2282
|
+
"aria-label": $,
|
|
2283
|
+
disabled: k,
|
|
2284
|
+
onClick: v
|
|
2134
2285
|
}
|
|
2135
2286
|
),
|
|
2136
|
-
|
|
2137
|
-
|
|
2287
|
+
A && /* @__PURE__ */ a(
|
|
2288
|
+
K,
|
|
2138
2289
|
{
|
|
2139
2290
|
variant: "transparent",
|
|
2140
2291
|
radius: "full",
|
|
2141
2292
|
size: "sm",
|
|
2142
|
-
icon: /* @__PURE__ */ a(
|
|
2143
|
-
"aria-label":
|
|
2144
|
-
disabled:
|
|
2145
|
-
onClick:
|
|
2293
|
+
icon: /* @__PURE__ */ a(Ye, { size: 18 }),
|
|
2294
|
+
"aria-label": b,
|
|
2295
|
+
disabled: k,
|
|
2296
|
+
onClick: A
|
|
2146
2297
|
}
|
|
2147
2298
|
),
|
|
2148
|
-
|
|
2149
|
-
/* @__PURE__ */ a("span", { className:
|
|
2299
|
+
_ && /* @__PURE__ */ g(wt, { children: [
|
|
2300
|
+
/* @__PURE__ */ a("span", { className: it.divider, "aria-hidden": !0 }),
|
|
2150
2301
|
/* @__PURE__ */ a(
|
|
2151
|
-
|
|
2302
|
+
K,
|
|
2152
2303
|
{
|
|
2153
2304
|
variant: "transparent",
|
|
2154
2305
|
radius: "full",
|
|
2155
2306
|
size: "sm",
|
|
2156
|
-
icon: /* @__PURE__ */ a(
|
|
2157
|
-
"aria-label":
|
|
2158
|
-
disabled:
|
|
2159
|
-
onClick:
|
|
2307
|
+
icon: /* @__PURE__ */ a($n, { size: 18 }),
|
|
2308
|
+
"aria-label": m,
|
|
2309
|
+
disabled: k,
|
|
2310
|
+
onClick: _
|
|
2160
2311
|
}
|
|
2161
2312
|
)
|
|
2162
2313
|
] })
|
|
@@ -2166,35 +2317,35 @@ const ko = "_root_193n0_1", No = "_dragging_193n0_21", $o = "_srOnly_193n0_26",
|
|
|
2166
2317
|
}
|
|
2167
2318
|
) : null;
|
|
2168
2319
|
}
|
|
2169
|
-
),
|
|
2170
|
-
root:
|
|
2171
|
-
image:
|
|
2172
|
-
base:
|
|
2173
|
-
small:
|
|
2174
|
-
button:
|
|
2320
|
+
), sr = "_root_1deeq_1", or = "_image_1deeq_11", rr = "_base_1deeq_18", ir = "_small_1deeq_23", ar = "_button_1deeq_29", jt = {
|
|
2321
|
+
root: sr,
|
|
2322
|
+
image: or,
|
|
2323
|
+
base: rr,
|
|
2324
|
+
small: ir,
|
|
2325
|
+
button: ar
|
|
2175
2326
|
};
|
|
2176
|
-
function
|
|
2327
|
+
function cr({
|
|
2177
2328
|
images: t,
|
|
2178
2329
|
onImageClick: n,
|
|
2179
2330
|
size: e = "base",
|
|
2180
2331
|
className: s,
|
|
2181
2332
|
...o
|
|
2182
2333
|
}) {
|
|
2183
|
-
return t.length === 0 ? null : /* @__PURE__ */ a("div", { className: [
|
|
2334
|
+
return t.length === 0 ? null : /* @__PURE__ */ a("div", { className: [jt.root, jt[e], s].filter(Boolean).join(" "), ...o, children: t.map(
|
|
2184
2335
|
(i, r) => n ? /* @__PURE__ */ a(
|
|
2185
2336
|
"button",
|
|
2186
2337
|
{
|
|
2187
2338
|
type: "button",
|
|
2188
|
-
className:
|
|
2339
|
+
className: jt.button,
|
|
2189
2340
|
"aria-label": i.alt || `Open image ${r + 1} of ${t.length}`,
|
|
2190
2341
|
onClick: () => n(r),
|
|
2191
|
-
children: /* @__PURE__ */ a("img", { className:
|
|
2342
|
+
children: /* @__PURE__ */ a("img", { className: jt.image, src: i.src, alt: i.alt ?? "" })
|
|
2192
2343
|
},
|
|
2193
2344
|
`${i.src}-${r}`
|
|
2194
2345
|
) : /* @__PURE__ */ a(
|
|
2195
2346
|
"img",
|
|
2196
2347
|
{
|
|
2197
|
-
className:
|
|
2348
|
+
className: jt.image,
|
|
2198
2349
|
src: i.src,
|
|
2199
2350
|
alt: i.alt ?? ""
|
|
2200
2351
|
},
|
|
@@ -2202,17 +2353,17 @@ function Vo({
|
|
|
2202
2353
|
)
|
|
2203
2354
|
) });
|
|
2204
2355
|
}
|
|
2205
|
-
const
|
|
2206
|
-
pill:
|
|
2207
|
-
root:
|
|
2208
|
-
header:
|
|
2209
|
-
title:
|
|
2210
|
-
prefix:
|
|
2211
|
-
mark:
|
|
2212
|
-
error:
|
|
2213
|
-
body:
|
|
2356
|
+
const lr = "_pill_1o1q3_2", dr = "_root_1o1q3_29", ur = "_header_1o1q3_39", hr = "_title_1o1q3_50", fr = "_prefix_1o1q3_54", pr = "_mark_1o1q3_60", _r = "_error_1o1q3_67", mr = "_body_1o1q3_78", ft = {
|
|
2357
|
+
pill: lr,
|
|
2358
|
+
root: dr,
|
|
2359
|
+
header: ur,
|
|
2360
|
+
title: hr,
|
|
2361
|
+
prefix: fr,
|
|
2362
|
+
mark: pr,
|
|
2363
|
+
error: _r,
|
|
2364
|
+
body: mr
|
|
2214
2365
|
};
|
|
2215
|
-
function
|
|
2366
|
+
function pa({
|
|
2216
2367
|
title: t,
|
|
2217
2368
|
children: n,
|
|
2218
2369
|
icon: e,
|
|
@@ -2225,55 +2376,55 @@ function ea({
|
|
|
2225
2376
|
expandLabel: d = "Open",
|
|
2226
2377
|
collapseLabel: u = "Collapse",
|
|
2227
2378
|
className: h,
|
|
2228
|
-
...
|
|
2379
|
+
...p
|
|
2229
2380
|
}) {
|
|
2230
|
-
const [
|
|
2231
|
-
return
|
|
2232
|
-
/* @__PURE__ */ g("div", { className:
|
|
2233
|
-
|
|
2234
|
-
/* @__PURE__ */ a("span", { className:
|
|
2381
|
+
const [f, y] = zt(i, r, c), v = e && /* @__PURE__ */ a("span", { className: [ft.mark, o === "error" && ft.error].filter(Boolean).join(" "), children: e });
|
|
2382
|
+
return f ? /* @__PURE__ */ g("div", { className: [ft.root, h].filter(Boolean).join(" "), ...p, children: [
|
|
2383
|
+
/* @__PURE__ */ g("div", { className: ft.header, children: [
|
|
2384
|
+
v,
|
|
2385
|
+
/* @__PURE__ */ a("span", { className: ft.title, children: t }),
|
|
2235
2386
|
/* @__PURE__ */ a(
|
|
2236
|
-
|
|
2387
|
+
K,
|
|
2237
2388
|
{
|
|
2238
2389
|
variant: "transparent",
|
|
2239
2390
|
size: "2xsmall",
|
|
2240
|
-
icon: /* @__PURE__ */ a(
|
|
2391
|
+
icon: /* @__PURE__ */ a(An, { size: 15 }),
|
|
2241
2392
|
"aria-label": u,
|
|
2242
2393
|
"aria-expanded": !0,
|
|
2243
|
-
onClick: () =>
|
|
2394
|
+
onClick: () => y(!f)
|
|
2244
2395
|
}
|
|
2245
2396
|
)
|
|
2246
2397
|
] }),
|
|
2247
|
-
l ? /* @__PURE__ */ a(
|
|
2398
|
+
l ? /* @__PURE__ */ a(Ft, { direction: "y", size: "thin", maxHeight: l, className: ft.body, children: n }) : /* @__PURE__ */ a("div", { className: ft.body, children: n })
|
|
2248
2399
|
] }) : /* @__PURE__ */ g(
|
|
2249
2400
|
"button",
|
|
2250
2401
|
{
|
|
2251
2402
|
type: "button",
|
|
2252
|
-
className: [
|
|
2403
|
+
className: [ft.pill, h].filter(Boolean).join(" "),
|
|
2253
2404
|
"aria-expanded": !1,
|
|
2254
2405
|
"aria-label": typeof t == "string" ? `${d}: ${t}` : d,
|
|
2255
|
-
onClick: () =>
|
|
2406
|
+
onClick: () => y(!f),
|
|
2256
2407
|
children: [
|
|
2257
|
-
s && /* @__PURE__ */ a("span", { className:
|
|
2258
|
-
|
|
2259
|
-
/* @__PURE__ */ a("span", { className:
|
|
2408
|
+
s && /* @__PURE__ */ a("span", { className: ft.prefix, children: s }),
|
|
2409
|
+
v,
|
|
2410
|
+
/* @__PURE__ */ a("span", { className: ft.title, children: t })
|
|
2260
2411
|
]
|
|
2261
2412
|
}
|
|
2262
2413
|
);
|
|
2263
2414
|
}
|
|
2264
|
-
const
|
|
2265
|
-
root:
|
|
2266
|
-
header:
|
|
2267
|
-
mark:
|
|
2268
|
-
title:
|
|
2269
|
-
meta:
|
|
2270
|
-
body:
|
|
2271
|
-
description:
|
|
2272
|
-
footer:
|
|
2273
|
-
footerStart:
|
|
2274
|
-
footerEnd:
|
|
2415
|
+
const yr = "_root_exebp_6", gr = "_header_exebp_18", xr = "_mark_exebp_30", br = "_title_exebp_37", vr = "_meta_exebp_42", kr = "_body_exebp_50", Nr = "_description_exebp_60", $r = "_footer_exebp_67", Ar = "_footerStart_exebp_77", Mr = "_footerEnd_exebp_84", U = {
|
|
2416
|
+
root: yr,
|
|
2417
|
+
header: gr,
|
|
2418
|
+
mark: xr,
|
|
2419
|
+
title: br,
|
|
2420
|
+
meta: vr,
|
|
2421
|
+
body: kr,
|
|
2422
|
+
description: Nr,
|
|
2423
|
+
footer: $r,
|
|
2424
|
+
footerStart: Ar,
|
|
2425
|
+
footerEnd: Mr
|
|
2275
2426
|
};
|
|
2276
|
-
function
|
|
2427
|
+
function _a({
|
|
2277
2428
|
title: t,
|
|
2278
2429
|
description: n,
|
|
2279
2430
|
children: e,
|
|
@@ -2286,13 +2437,13 @@ function na({
|
|
|
2286
2437
|
cancelLabel: d = "Cancel",
|
|
2287
2438
|
disabled: u = !1,
|
|
2288
2439
|
running: h = !1,
|
|
2289
|
-
className:
|
|
2290
|
-
...
|
|
2440
|
+
className: p,
|
|
2441
|
+
...f
|
|
2291
2442
|
}) {
|
|
2292
|
-
const
|
|
2293
|
-
r && /* @__PURE__ */ a(
|
|
2443
|
+
const y = s === null ? null : s ?? /* @__PURE__ */ a(Mn, { size: 16 }), v = c ?? /* @__PURE__ */ g(wt, { children: [
|
|
2444
|
+
r && /* @__PURE__ */ a(vt, { variant: "neutral", size: "sm", onClick: r, children: d }),
|
|
2294
2445
|
i && /* @__PURE__ */ a(
|
|
2295
|
-
|
|
2446
|
+
vt,
|
|
2296
2447
|
{
|
|
2297
2448
|
variant: "inverted",
|
|
2298
2449
|
size: "sm",
|
|
@@ -2302,21 +2453,21 @@ function na({
|
|
|
2302
2453
|
children: l
|
|
2303
2454
|
}
|
|
2304
2455
|
)
|
|
2305
|
-
] }),
|
|
2306
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
2307
|
-
/* @__PURE__ */ g("div", { className:
|
|
2308
|
-
|
|
2309
|
-
/* @__PURE__ */ a("span", { className:
|
|
2310
|
-
o && /* @__PURE__ */ a("span", { className:
|
|
2456
|
+
] }), A = !!n || !!e, _ = !!c || !!i || !!r;
|
|
2457
|
+
return /* @__PURE__ */ g("div", { className: [U.root, p].filter(Boolean).join(" "), ...f, children: [
|
|
2458
|
+
/* @__PURE__ */ g("div", { className: U.header, children: [
|
|
2459
|
+
y && /* @__PURE__ */ a("span", { className: U.mark, children: y }),
|
|
2460
|
+
/* @__PURE__ */ a("span", { className: U.title, children: t }),
|
|
2461
|
+
o && /* @__PURE__ */ a("span", { className: U.meta, children: o })
|
|
2311
2462
|
] }),
|
|
2312
|
-
|
|
2313
|
-
n && /* @__PURE__ */ a("p", { className:
|
|
2463
|
+
A && /* @__PURE__ */ g("div", { className: U.body, children: [
|
|
2464
|
+
n && /* @__PURE__ */ a("p", { className: U.description, children: n }),
|
|
2314
2465
|
e
|
|
2315
2466
|
] }),
|
|
2316
|
-
|
|
2467
|
+
_ && /* @__PURE__ */ a("div", { className: U.footer, children: /* @__PURE__ */ a("span", { className: U.footerEnd, children: v }) })
|
|
2317
2468
|
] });
|
|
2318
2469
|
}
|
|
2319
|
-
function
|
|
2470
|
+
function ma({
|
|
2320
2471
|
title: t,
|
|
2321
2472
|
children: n,
|
|
2322
2473
|
icon: e,
|
|
@@ -2329,50 +2480,50 @@ function sa({
|
|
|
2329
2480
|
skipLabel: d = "Skip for now",
|
|
2330
2481
|
previousLabel: u = "Previous",
|
|
2331
2482
|
nextLabel: h = "Next",
|
|
2332
|
-
submitLabel:
|
|
2333
|
-
disabled:
|
|
2334
|
-
submitting:
|
|
2335
|
-
className:
|
|
2336
|
-
|
|
2483
|
+
submitLabel: p = "Submit",
|
|
2484
|
+
disabled: f = !1,
|
|
2485
|
+
submitting: y = !1,
|
|
2486
|
+
className: v,
|
|
2487
|
+
...A
|
|
2337
2488
|
}) {
|
|
2338
|
-
const
|
|
2339
|
-
|
|
2340
|
-
o && /* @__PURE__ */ a(
|
|
2341
|
-
i && /* @__PURE__ */ a(
|
|
2489
|
+
const _ = e === null ? null : e ?? /* @__PURE__ */ a(wn, { size: 16 }), $ = !!o || !!i, b = c && /* @__PURE__ */ a(vt, { variant: "neutral", size: "sm", onClick: c, children: d }), m = l ?? /* @__PURE__ */ g(wt, { children: [
|
|
2490
|
+
!$ && b,
|
|
2491
|
+
o && /* @__PURE__ */ a(vt, { variant: "neutral", size: "sm", onClick: o, children: u }),
|
|
2492
|
+
i && /* @__PURE__ */ a(vt, { variant: "neutral", size: "sm", disabled: f, onClick: i, children: h }),
|
|
2342
2493
|
r && /* @__PURE__ */ a(
|
|
2343
|
-
|
|
2494
|
+
vt,
|
|
2344
2495
|
{
|
|
2345
2496
|
variant: "neutral",
|
|
2346
2497
|
size: "sm",
|
|
2347
|
-
disabled:
|
|
2348
|
-
loading:
|
|
2498
|
+
disabled: f,
|
|
2499
|
+
loading: y,
|
|
2349
2500
|
onClick: r,
|
|
2350
|
-
children:
|
|
2501
|
+
children: p
|
|
2351
2502
|
}
|
|
2352
2503
|
)
|
|
2353
|
-
] }),
|
|
2354
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
2355
|
-
/* @__PURE__ */ g("div", { className:
|
|
2356
|
-
|
|
2357
|
-
/* @__PURE__ */ a("span", { className:
|
|
2358
|
-
s && /* @__PURE__ */ a("span", { className:
|
|
2504
|
+
] }), k = !!l || !!o || !!i || !!r || !!c;
|
|
2505
|
+
return /* @__PURE__ */ g("div", { className: [U.root, v].filter(Boolean).join(" "), ...A, children: [
|
|
2506
|
+
/* @__PURE__ */ g("div", { className: U.header, children: [
|
|
2507
|
+
_ && /* @__PURE__ */ a("span", { className: U.mark, children: _ }),
|
|
2508
|
+
/* @__PURE__ */ a("span", { className: U.title, children: t }),
|
|
2509
|
+
s && /* @__PURE__ */ a("span", { className: U.meta, children: s })
|
|
2359
2510
|
] }),
|
|
2360
|
-
/* @__PURE__ */ a("div", { className:
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
/* @__PURE__ */ a("span", { className:
|
|
2511
|
+
/* @__PURE__ */ a("div", { className: U.body, children: n }),
|
|
2512
|
+
k && /* @__PURE__ */ g("div", { className: U.footer, children: [
|
|
2513
|
+
$ && !l && /* @__PURE__ */ a("span", { className: U.footerStart, children: b }),
|
|
2514
|
+
/* @__PURE__ */ a("span", { className: U.footerEnd, children: m })
|
|
2364
2515
|
] })
|
|
2365
2516
|
] });
|
|
2366
2517
|
}
|
|
2367
|
-
const
|
|
2368
|
-
root:
|
|
2369
|
-
label:
|
|
2370
|
-
name:
|
|
2371
|
-
key:
|
|
2372
|
-
description:
|
|
2373
|
-
control:
|
|
2518
|
+
const wr = "_root_1tlwe_1", zr = "_label_1tlwe_8", Ir = "_name_1tlwe_17", Rr = "_key_1tlwe_22", Br = "_description_1tlwe_28", Tr = "_control_1tlwe_34", It = {
|
|
2519
|
+
root: wr,
|
|
2520
|
+
label: zr,
|
|
2521
|
+
name: Ir,
|
|
2522
|
+
key: Rr,
|
|
2523
|
+
description: Br,
|
|
2524
|
+
control: Tr
|
|
2374
2525
|
};
|
|
2375
|
-
function
|
|
2526
|
+
function ya({
|
|
2376
2527
|
label: t,
|
|
2377
2528
|
name: n,
|
|
2378
2529
|
children: e,
|
|
@@ -2380,37 +2531,37 @@ function oa({
|
|
|
2380
2531
|
className: o,
|
|
2381
2532
|
...i
|
|
2382
2533
|
}) {
|
|
2383
|
-
return /* @__PURE__ */ g("label", { className: [
|
|
2384
|
-
/* @__PURE__ */ g("span", { className:
|
|
2385
|
-
/* @__PURE__ */ a("span", { className:
|
|
2386
|
-
n && /* @__PURE__ */ g("code", { className:
|
|
2534
|
+
return /* @__PURE__ */ g("label", { className: [It.root, o].filter(Boolean).join(" "), ...i, children: [
|
|
2535
|
+
/* @__PURE__ */ g("span", { className: It.label, children: [
|
|
2536
|
+
/* @__PURE__ */ a("span", { className: It.name, children: t }),
|
|
2537
|
+
n && /* @__PURE__ */ g("code", { className: It.key, children: [
|
|
2387
2538
|
"(",
|
|
2388
2539
|
n,
|
|
2389
2540
|
")"
|
|
2390
2541
|
] })
|
|
2391
2542
|
] }),
|
|
2392
|
-
s && /* @__PURE__ */ a("span", { className:
|
|
2393
|
-
/* @__PURE__ */ a("span", { className:
|
|
2543
|
+
s && /* @__PURE__ */ a("span", { className: It.description, children: s }),
|
|
2544
|
+
/* @__PURE__ */ a("span", { className: It.control, children: e })
|
|
2394
2545
|
] });
|
|
2395
2546
|
}
|
|
2396
|
-
const
|
|
2397
|
-
root:
|
|
2398
|
-
chip:
|
|
2399
|
-
plain:
|
|
2547
|
+
const Cr = "_root_8yfcy_1", Er = "_chip_8yfcy_20", Pr = "_plain_8yfcy_28", Or = "_interactive_8yfcy_37", Sr = "_prefix_8yfcy_62", jr = "_marks_8yfcy_72", qr = "_marksThumb_8yfcy_82", Lr = "_thumbnail_8yfcy_89", Fr = "_icon_8yfcy_102", Hr = "_remove_8yfcy_103", Dr = "_toneError_8yfcy_114", Yr = "_removable_8yfcy_124", Ur = "_label_8yfcy_139", Xr = "_mono_8yfcy_146", tt = {
|
|
2548
|
+
root: Cr,
|
|
2549
|
+
chip: Er,
|
|
2550
|
+
plain: Pr,
|
|
2400
2551
|
static: "_static_8yfcy_33",
|
|
2401
|
-
interactive:
|
|
2402
|
-
prefix:
|
|
2403
|
-
marks:
|
|
2404
|
-
marksThumb:
|
|
2405
|
-
thumbnail:
|
|
2406
|
-
icon:
|
|
2407
|
-
remove:
|
|
2408
|
-
toneError:
|
|
2409
|
-
removable:
|
|
2410
|
-
label:
|
|
2411
|
-
mono:
|
|
2552
|
+
interactive: Or,
|
|
2553
|
+
prefix: Sr,
|
|
2554
|
+
marks: jr,
|
|
2555
|
+
marksThumb: qr,
|
|
2556
|
+
thumbnail: Lr,
|
|
2557
|
+
icon: Fr,
|
|
2558
|
+
remove: Hr,
|
|
2559
|
+
toneError: Dr,
|
|
2560
|
+
removable: Yr,
|
|
2561
|
+
label: Ur,
|
|
2562
|
+
mono: Xr
|
|
2412
2563
|
};
|
|
2413
|
-
function
|
|
2564
|
+
function ga({
|
|
2414
2565
|
children: t,
|
|
2415
2566
|
icon: n,
|
|
2416
2567
|
thumbnail: e,
|
|
@@ -2423,61 +2574,61 @@ function ra({
|
|
|
2423
2574
|
mono: d = !1,
|
|
2424
2575
|
className: u,
|
|
2425
2576
|
onClick: h,
|
|
2426
|
-
...
|
|
2577
|
+
...p
|
|
2427
2578
|
}) {
|
|
2428
|
-
const
|
|
2579
|
+
const f = r === "chip" ? o : void 0, y = !!f || !!h, v = /* @__PURE__ */ g(
|
|
2429
2580
|
"span",
|
|
2430
2581
|
{
|
|
2431
2582
|
className: [
|
|
2432
|
-
|
|
2433
|
-
e &&
|
|
2434
|
-
l === "error" &&
|
|
2583
|
+
tt.marks,
|
|
2584
|
+
e && tt.marksThumb,
|
|
2585
|
+
l === "error" && tt.toneError
|
|
2435
2586
|
].filter(Boolean).join(" "),
|
|
2436
2587
|
"aria-hidden": "true",
|
|
2437
2588
|
children: [
|
|
2438
2589
|
e ? /* @__PURE__ */ a(
|
|
2439
2590
|
"img",
|
|
2440
2591
|
{
|
|
2441
|
-
className:
|
|
2592
|
+
className: tt.thumbnail,
|
|
2442
2593
|
src: e,
|
|
2443
2594
|
alt: s,
|
|
2444
2595
|
width: 14,
|
|
2445
2596
|
height: 14
|
|
2446
2597
|
}
|
|
2447
|
-
) : n && /* @__PURE__ */ a("span", { className:
|
|
2448
|
-
|
|
2598
|
+
) : n && /* @__PURE__ */ a("span", { className: tt.icon, children: n }),
|
|
2599
|
+
f && /* @__PURE__ */ a("span", { className: tt.remove, children: /* @__PURE__ */ a(Xe, { size: 14 }) })
|
|
2449
2600
|
]
|
|
2450
2601
|
}
|
|
2451
|
-
),
|
|
2452
|
-
c && /* @__PURE__ */ a("span", { className:
|
|
2453
|
-
(n || e ||
|
|
2454
|
-
/* @__PURE__ */ a("span", { className: [
|
|
2455
|
-
] }),
|
|
2456
|
-
|
|
2457
|
-
r === "plain" ?
|
|
2458
|
-
|
|
2459
|
-
|
|
2602
|
+
), A = /* @__PURE__ */ g(wt, { children: [
|
|
2603
|
+
c && /* @__PURE__ */ a("span", { className: tt.prefix, children: c }),
|
|
2604
|
+
(n || e || f) && v,
|
|
2605
|
+
/* @__PURE__ */ a("span", { className: [tt.label, d && tt.mono].filter(Boolean).join(" "), children: t })
|
|
2606
|
+
] }), _ = [
|
|
2607
|
+
tt.root,
|
|
2608
|
+
r === "plain" ? tt.plain : tt.chip,
|
|
2609
|
+
y ? tt.interactive : tt.static,
|
|
2610
|
+
f && tt.removable,
|
|
2460
2611
|
u
|
|
2461
2612
|
].filter(Boolean).join(" ");
|
|
2462
|
-
return
|
|
2613
|
+
return y ? /* @__PURE__ */ a(
|
|
2463
2614
|
"button",
|
|
2464
2615
|
{
|
|
2465
2616
|
type: "button",
|
|
2466
|
-
className:
|
|
2467
|
-
"aria-label":
|
|
2468
|
-
onClick:
|
|
2469
|
-
...
|
|
2470
|
-
children:
|
|
2617
|
+
className: _,
|
|
2618
|
+
"aria-label": f ? i : void 0,
|
|
2619
|
+
onClick: f ? () => f() : h,
|
|
2620
|
+
...p,
|
|
2621
|
+
children: A
|
|
2471
2622
|
}
|
|
2472
|
-
) : /* @__PURE__ */ a("span", { className:
|
|
2623
|
+
) : /* @__PURE__ */ a("span", { className: _, children: A });
|
|
2473
2624
|
}
|
|
2474
|
-
const
|
|
2475
|
-
root:
|
|
2476
|
-
bubble:
|
|
2477
|
-
references:
|
|
2478
|
-
animated:
|
|
2625
|
+
const Gr = "_root_7cjvl_1", Wr = "_bubble_7cjvl_9", Qr = "_references_7cjvl_21", Vr = "_animated_7cjvl_29", Wt = {
|
|
2626
|
+
root: Gr,
|
|
2627
|
+
bubble: Wr,
|
|
2628
|
+
references: Qr,
|
|
2629
|
+
animated: Vr
|
|
2479
2630
|
};
|
|
2480
|
-
function
|
|
2631
|
+
function xa({
|
|
2481
2632
|
children: t,
|
|
2482
2633
|
images: n = [],
|
|
2483
2634
|
onImageClick: e,
|
|
@@ -2489,31 +2640,31 @@ function ia({
|
|
|
2489
2640
|
return /* @__PURE__ */ g(
|
|
2490
2641
|
"div",
|
|
2491
2642
|
{
|
|
2492
|
-
className: [
|
|
2643
|
+
className: [Wt.root, o && Wt.animated, i].filter(Boolean).join(" "),
|
|
2493
2644
|
...r,
|
|
2494
2645
|
children: [
|
|
2495
|
-
s && /* @__PURE__ */ a("div", { className:
|
|
2496
|
-
n.length > 0 && /* @__PURE__ */ a(
|
|
2497
|
-
t && /* @__PURE__ */ a("div", { className:
|
|
2646
|
+
s && /* @__PURE__ */ a("div", { className: Wt.references, children: s }),
|
|
2647
|
+
n.length > 0 && /* @__PURE__ */ a(cr, { images: n, onImageClick: e }),
|
|
2648
|
+
t && /* @__PURE__ */ a("div", { className: Wt.bubble, children: t })
|
|
2498
2649
|
]
|
|
2499
2650
|
}
|
|
2500
2651
|
);
|
|
2501
2652
|
}
|
|
2502
|
-
const
|
|
2503
|
-
root:
|
|
2504
|
-
body:
|
|
2505
|
-
error:
|
|
2506
|
-
errorMark:
|
|
2507
|
-
errorText:
|
|
2508
|
-
footer:
|
|
2509
|
-
sources:
|
|
2510
|
-
sourceItem:
|
|
2511
|
-
source:
|
|
2512
|
-
actions:
|
|
2513
|
-
actionsVisible:
|
|
2514
|
-
voted:
|
|
2515
|
-
},
|
|
2516
|
-
function
|
|
2653
|
+
const Kr = "_root_1axqb_1", Zr = "_body_1axqb_8", Jr = "_error_1axqb_26", ti = "_errorMark_1axqb_35", ei = "_errorText_1axqb_41", ni = "_footer_1axqb_46", si = "_sources_1axqb_53", oi = "_sourceItem_1axqb_64", ri = "_source_1axqb_53", ii = "_actions_1axqb_108", ai = "_actionsVisible_1axqb_120", ci = "_voted_1axqb_126", et = {
|
|
2654
|
+
root: Kr,
|
|
2655
|
+
body: Zr,
|
|
2656
|
+
error: Jr,
|
|
2657
|
+
errorMark: ti,
|
|
2658
|
+
errorText: ei,
|
|
2659
|
+
footer: ni,
|
|
2660
|
+
sources: si,
|
|
2661
|
+
sourceItem: oi,
|
|
2662
|
+
source: ri,
|
|
2663
|
+
actions: ii,
|
|
2664
|
+
actionsVisible: ai,
|
|
2665
|
+
voted: ci
|
|
2666
|
+
}, li = 1600;
|
|
2667
|
+
function ba({
|
|
2517
2668
|
children: t,
|
|
2518
2669
|
textValue: n,
|
|
2519
2670
|
sources: e = [],
|
|
@@ -2526,80 +2677,80 @@ function aa({
|
|
|
2526
2677
|
defaultFeedback: d = null,
|
|
2527
2678
|
actions: u,
|
|
2528
2679
|
actionsVisible: h = !1,
|
|
2529
|
-
copyLabel:
|
|
2530
|
-
copiedLabel:
|
|
2531
|
-
likeLabel:
|
|
2532
|
-
dislikeLabel:
|
|
2533
|
-
className:
|
|
2534
|
-
...
|
|
2680
|
+
copyLabel: p = "Copy",
|
|
2681
|
+
copiedLabel: f = "Copied",
|
|
2682
|
+
likeLabel: y = "Good answer",
|
|
2683
|
+
dislikeLabel: v = "Bad answer",
|
|
2684
|
+
className: A,
|
|
2685
|
+
..._
|
|
2535
2686
|
}) {
|
|
2536
|
-
const [
|
|
2537
|
-
|
|
2687
|
+
const [$, b] = at(!1), [m, k] = zt(l, d, c), O = H(null), w = n ?? (typeof t == "string" ? t : ""), I = !!r || !!c || !!u;
|
|
2688
|
+
nt(
|
|
2538
2689
|
() => () => {
|
|
2539
|
-
|
|
2690
|
+
O.current && clearTimeout(O.current);
|
|
2540
2691
|
},
|
|
2541
2692
|
[]
|
|
2542
2693
|
);
|
|
2543
2694
|
async function j() {
|
|
2544
|
-
var
|
|
2695
|
+
var E;
|
|
2545
2696
|
try {
|
|
2546
|
-
await ((
|
|
2697
|
+
await ((E = navigator.clipboard) == null ? void 0 : E.writeText(w)), b(!0), O.current && clearTimeout(O.current), O.current = setTimeout(() => b(!1), li);
|
|
2547
2698
|
} finally {
|
|
2548
|
-
r == null || r(
|
|
2699
|
+
r == null || r(w);
|
|
2549
2700
|
}
|
|
2550
2701
|
}
|
|
2551
|
-
function
|
|
2552
|
-
|
|
2702
|
+
function F(E) {
|
|
2703
|
+
k(m === E ? null : E);
|
|
2553
2704
|
}
|
|
2554
2705
|
return /* @__PURE__ */ g(
|
|
2555
2706
|
"div",
|
|
2556
2707
|
{
|
|
2557
|
-
className: [
|
|
2558
|
-
...
|
|
2708
|
+
className: [et.root, h && et.actionsVisible, A].filter(Boolean).join(" "),
|
|
2709
|
+
..._,
|
|
2559
2710
|
children: [
|
|
2560
|
-
t && /* @__PURE__ */ a("div", { className:
|
|
2561
|
-
s && /* @__PURE__ */ g("div", { className:
|
|
2562
|
-
/* @__PURE__ */ a("span", { className:
|
|
2563
|
-
/* @__PURE__ */ a("span", { className:
|
|
2564
|
-
o && /* @__PURE__ */ a(
|
|
2711
|
+
t && /* @__PURE__ */ a("div", { className: et.body, children: t }),
|
|
2712
|
+
s && /* @__PURE__ */ g("div", { className: et.error, role: "alert", children: [
|
|
2713
|
+
/* @__PURE__ */ a("span", { className: et.errorMark, children: /* @__PURE__ */ a(me, { size: 15 }) }),
|
|
2714
|
+
/* @__PURE__ */ a("span", { className: et.errorText, children: s }),
|
|
2715
|
+
o && /* @__PURE__ */ a(vt, { variant: "neutral", size: "sm", onClick: o, children: i })
|
|
2565
2716
|
] }),
|
|
2566
|
-
(e.length > 0 ||
|
|
2567
|
-
e.length > 0 && /* @__PURE__ */ a("ul", { className:
|
|
2568
|
-
|
|
2717
|
+
(e.length > 0 || I) && /* @__PURE__ */ g("div", { className: et.footer, children: [
|
|
2718
|
+
e.length > 0 && /* @__PURE__ */ a("ul", { className: et.sources, children: e.map((E) => /* @__PURE__ */ a("li", { className: et.sourceItem, children: E.href ? /* @__PURE__ */ a("a", { className: et.source, href: E.href, onClick: E.onClick, children: E.label }) : E.onClick ? /* @__PURE__ */ a("button", { type: "button", className: et.source, onClick: E.onClick, children: E.label }) : /* @__PURE__ */ a("span", { className: et.source, children: E.label }) }, E.id)) }),
|
|
2719
|
+
I && /* @__PURE__ */ g("div", { className: et.actions, children: [
|
|
2569
2720
|
u,
|
|
2570
2721
|
r && /* @__PURE__ */ a(
|
|
2571
|
-
|
|
2722
|
+
K,
|
|
2572
2723
|
{
|
|
2573
2724
|
variant: "transparent",
|
|
2574
2725
|
size: "xsmall",
|
|
2575
|
-
icon:
|
|
2576
|
-
"aria-label":
|
|
2726
|
+
icon: $ ? /* @__PURE__ */ a(Ge, { size: 15 }) : /* @__PURE__ */ a(zn, { size: 15 }),
|
|
2727
|
+
"aria-label": $ ? f : p,
|
|
2577
2728
|
onClick: j
|
|
2578
2729
|
}
|
|
2579
2730
|
),
|
|
2580
|
-
c && /* @__PURE__ */ g(
|
|
2731
|
+
c && /* @__PURE__ */ g(wt, { children: [
|
|
2581
2732
|
/* @__PURE__ */ a(
|
|
2582
|
-
|
|
2733
|
+
K,
|
|
2583
2734
|
{
|
|
2584
2735
|
variant: "transparent",
|
|
2585
2736
|
size: "xsmall",
|
|
2586
|
-
className:
|
|
2587
|
-
icon: /* @__PURE__ */ a(
|
|
2588
|
-
"aria-label":
|
|
2589
|
-
"aria-pressed":
|
|
2590
|
-
onClick: () =>
|
|
2737
|
+
className: m === "like" ? et.voted : void 0,
|
|
2738
|
+
icon: /* @__PURE__ */ a(In, { size: 15 }),
|
|
2739
|
+
"aria-label": y,
|
|
2740
|
+
"aria-pressed": m === "like",
|
|
2741
|
+
onClick: () => F("like")
|
|
2591
2742
|
}
|
|
2592
2743
|
),
|
|
2593
2744
|
/* @__PURE__ */ a(
|
|
2594
|
-
|
|
2745
|
+
K,
|
|
2595
2746
|
{
|
|
2596
2747
|
variant: "transparent",
|
|
2597
2748
|
size: "xsmall",
|
|
2598
|
-
className:
|
|
2599
|
-
icon: /* @__PURE__ */ a(
|
|
2600
|
-
"aria-label":
|
|
2601
|
-
"aria-pressed":
|
|
2602
|
-
onClick: () =>
|
|
2749
|
+
className: m === "dislike" ? et.voted : void 0,
|
|
2750
|
+
icon: /* @__PURE__ */ a(Rn, { size: 15 }),
|
|
2751
|
+
"aria-label": v,
|
|
2752
|
+
"aria-pressed": m === "dislike",
|
|
2753
|
+
onClick: () => F("dislike")
|
|
2603
2754
|
}
|
|
2604
2755
|
)
|
|
2605
2756
|
] })
|
|
@@ -2609,47 +2760,47 @@ function aa({
|
|
|
2609
2760
|
}
|
|
2610
2761
|
);
|
|
2611
2762
|
}
|
|
2612
|
-
const
|
|
2613
|
-
root:
|
|
2614
|
-
label:
|
|
2615
|
-
row:
|
|
2616
|
-
pill:
|
|
2617
|
-
icon:
|
|
2618
|
-
text:
|
|
2763
|
+
const di = "_root_15ubm_1", ui = "_label_15ubm_8", hi = "_row_15ubm_14", fi = "_pill_15ubm_20", pi = "_icon_15ubm_55", _i = "_text_15ubm_62", Tt = {
|
|
2764
|
+
root: di,
|
|
2765
|
+
label: ui,
|
|
2766
|
+
row: hi,
|
|
2767
|
+
pill: fi,
|
|
2768
|
+
icon: pi,
|
|
2769
|
+
text: _i
|
|
2619
2770
|
};
|
|
2620
|
-
function
|
|
2771
|
+
function va({
|
|
2621
2772
|
children: t,
|
|
2622
2773
|
label: n,
|
|
2623
2774
|
className: e,
|
|
2624
2775
|
...s
|
|
2625
2776
|
}) {
|
|
2626
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
2627
|
-
n && /* @__PURE__ */ a("span", { className:
|
|
2628
|
-
/* @__PURE__ */ a("div", { className:
|
|
2777
|
+
return /* @__PURE__ */ g("div", { className: [Tt.root, e].filter(Boolean).join(" "), ...s, children: [
|
|
2778
|
+
n && /* @__PURE__ */ a("span", { className: Tt.label, children: n }),
|
|
2779
|
+
/* @__PURE__ */ a("div", { className: Tt.row, children: t })
|
|
2629
2780
|
] });
|
|
2630
2781
|
}
|
|
2631
|
-
function
|
|
2782
|
+
function ka({
|
|
2632
2783
|
children: t,
|
|
2633
2784
|
icon: n,
|
|
2634
2785
|
className: e,
|
|
2635
2786
|
type: s = "button",
|
|
2636
2787
|
...o
|
|
2637
2788
|
}) {
|
|
2638
|
-
return /* @__PURE__ */ g("button", { type: s, className: [
|
|
2639
|
-
n && /* @__PURE__ */ a("span", { className:
|
|
2640
|
-
/* @__PURE__ */ a("span", { className:
|
|
2789
|
+
return /* @__PURE__ */ g("button", { type: s, className: [Tt.pill, e].filter(Boolean).join(" "), ...o, children: [
|
|
2790
|
+
n && /* @__PURE__ */ a("span", { className: Tt.icon, children: n }),
|
|
2791
|
+
/* @__PURE__ */ a("span", { className: Tt.text, children: t })
|
|
2641
2792
|
] });
|
|
2642
2793
|
}
|
|
2643
|
-
const
|
|
2644
|
-
root:
|
|
2645
|
-
content:
|
|
2646
|
-
titleRow:
|
|
2647
|
-
icon:
|
|
2648
|
-
title:
|
|
2649
|
-
description:
|
|
2650
|
-
trailing:
|
|
2794
|
+
const mi = "_root_1ojxj_1", yi = "_content_1ojxj_38", gi = "_titleRow_1ojxj_46", xi = "_icon_1ojxj_52", bi = "_title_1ojxj_46", vi = "_description_1ojxj_61", ki = "_trailing_1ojxj_95", $t = {
|
|
2795
|
+
root: mi,
|
|
2796
|
+
content: yi,
|
|
2797
|
+
titleRow: gi,
|
|
2798
|
+
icon: xi,
|
|
2799
|
+
title: bi,
|
|
2800
|
+
description: vi,
|
|
2801
|
+
trailing: ki
|
|
2651
2802
|
};
|
|
2652
|
-
function
|
|
2803
|
+
function Na({
|
|
2653
2804
|
title: t,
|
|
2654
2805
|
description: n,
|
|
2655
2806
|
icon: e,
|
|
@@ -2657,33 +2808,33 @@ function da({
|
|
|
2657
2808
|
className: o,
|
|
2658
2809
|
...i
|
|
2659
2810
|
}) {
|
|
2660
|
-
const r = [
|
|
2661
|
-
/* @__PURE__ */ g("span", { className:
|
|
2662
|
-
/* @__PURE__ */ g("span", { className:
|
|
2663
|
-
c && /* @__PURE__ */ a("span", { className:
|
|
2664
|
-
/* @__PURE__ */ a("span", { className:
|
|
2811
|
+
const r = [$t.root, o].filter(Boolean).join(" "), c = e === null ? null : e ?? /* @__PURE__ */ a(Tn, { size: 16 }), l = s === null ? null : s ?? /* @__PURE__ */ a(Bn, { size: 16 }), d = /* @__PURE__ */ g(wt, { children: [
|
|
2812
|
+
/* @__PURE__ */ g("span", { className: $t.content, children: [
|
|
2813
|
+
/* @__PURE__ */ g("span", { className: $t.titleRow, children: [
|
|
2814
|
+
c && /* @__PURE__ */ a("span", { className: $t.icon, children: c }),
|
|
2815
|
+
/* @__PURE__ */ a("span", { className: $t.title, children: t })
|
|
2665
2816
|
] }),
|
|
2666
|
-
n && /* @__PURE__ */ a("span", { className:
|
|
2817
|
+
n && /* @__PURE__ */ a("span", { className: $t.description, children: n })
|
|
2667
2818
|
] }),
|
|
2668
|
-
l && /* @__PURE__ */ a("span", { className:
|
|
2819
|
+
l && /* @__PURE__ */ a("span", { className: $t.trailing, children: l })
|
|
2669
2820
|
] });
|
|
2670
2821
|
if (i.href !== void 0) {
|
|
2671
|
-
const { href:
|
|
2672
|
-
return /* @__PURE__ */ a("a", { className: r, href:
|
|
2822
|
+
const { href: p, ...f } = i;
|
|
2823
|
+
return /* @__PURE__ */ a("a", { className: r, href: p, ...f, children: d });
|
|
2673
2824
|
}
|
|
2674
2825
|
const { type: u = "button", ...h } = i;
|
|
2675
2826
|
return /* @__PURE__ */ a("button", { className: r, type: u, ...h, children: d });
|
|
2676
2827
|
}
|
|
2677
|
-
const
|
|
2678
|
-
root:
|
|
2679
|
-
row:
|
|
2680
|
-
error:
|
|
2681
|
-
mark:
|
|
2682
|
-
label:
|
|
2683
|
-
code:
|
|
2684
|
-
details:
|
|
2828
|
+
const Ni = "_root_15073_1", $i = "_row_15073_8", Ai = "_error_15073_19", Mi = "_mark_15073_23", wi = "_label_15073_30", zi = "_code_15073_41 _code_1hqe1_6", Ii = "_details_15073_46", At = {
|
|
2829
|
+
root: Ni,
|
|
2830
|
+
row: $i,
|
|
2831
|
+
error: Ai,
|
|
2832
|
+
mark: Mi,
|
|
2833
|
+
label: wi,
|
|
2834
|
+
code: zi,
|
|
2835
|
+
details: Ii
|
|
2685
2836
|
};
|
|
2686
|
-
function
|
|
2837
|
+
function $a({
|
|
2687
2838
|
children: t,
|
|
2688
2839
|
icon: n,
|
|
2689
2840
|
code: e,
|
|
@@ -2693,24 +2844,24 @@ function ua({
|
|
|
2693
2844
|
className: r,
|
|
2694
2845
|
...c
|
|
2695
2846
|
}) {
|
|
2696
|
-
const l = s === "error", d = l ? i ?? /* @__PURE__ */ a(
|
|
2697
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
2698
|
-
/* @__PURE__ */ g("div", { className: [
|
|
2699
|
-
d && /* @__PURE__ */ a("span", { className:
|
|
2700
|
-
/* @__PURE__ */ a("span", { className:
|
|
2701
|
-
e != null && /* @__PURE__ */ a("code", { className:
|
|
2847
|
+
const l = s === "error", d = l ? i ?? /* @__PURE__ */ a(me, { size: 16 }) : n;
|
|
2848
|
+
return /* @__PURE__ */ g("div", { className: [At.root, r].filter(Boolean).join(" "), ...c, children: [
|
|
2849
|
+
/* @__PURE__ */ g("div", { className: [At.row, l && At.error].filter(Boolean).join(" "), children: [
|
|
2850
|
+
d && /* @__PURE__ */ a("span", { className: At.mark, children: d }),
|
|
2851
|
+
/* @__PURE__ */ a("span", { className: At.label, children: t }),
|
|
2852
|
+
e != null && /* @__PURE__ */ a("code", { className: At.code, children: e })
|
|
2702
2853
|
] }),
|
|
2703
|
-
o && /* @__PURE__ */ a("div", { className:
|
|
2854
|
+
o && /* @__PURE__ */ a("div", { className: At.details, children: o })
|
|
2704
2855
|
] });
|
|
2705
2856
|
}
|
|
2706
|
-
const
|
|
2707
|
-
root:
|
|
2708
|
-
trigger:
|
|
2709
|
-
caret:
|
|
2710
|
-
title:
|
|
2711
|
-
items:
|
|
2857
|
+
const Ri = "_root_1sq2g_1", Bi = "_trigger_1sq2g_8", Ti = "_caret_1sq2g_31", Ci = "_title_1sq2g_39", Ei = "_items_1sq2g_47", qt = {
|
|
2858
|
+
root: Ri,
|
|
2859
|
+
trigger: Bi,
|
|
2860
|
+
caret: Ti,
|
|
2861
|
+
title: Ci,
|
|
2862
|
+
items: Ei
|
|
2712
2863
|
};
|
|
2713
|
-
function
|
|
2864
|
+
function Aa({
|
|
2714
2865
|
title: t,
|
|
2715
2866
|
children: n,
|
|
2716
2867
|
open: e,
|
|
@@ -2719,35 +2870,35 @@ function ha({
|
|
|
2719
2870
|
className: i,
|
|
2720
2871
|
...r
|
|
2721
2872
|
}) {
|
|
2722
|
-
const [c, l] =
|
|
2723
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
2873
|
+
const [c, l] = zt(e, s, o), d = Ct();
|
|
2874
|
+
return /* @__PURE__ */ g("div", { className: [qt.root, i].filter(Boolean).join(" "), ...r, children: [
|
|
2724
2875
|
/* @__PURE__ */ g(
|
|
2725
2876
|
"button",
|
|
2726
2877
|
{
|
|
2727
2878
|
type: "button",
|
|
2728
|
-
className:
|
|
2879
|
+
className: qt.trigger,
|
|
2729
2880
|
"aria-expanded": c,
|
|
2730
2881
|
"aria-controls": d,
|
|
2731
2882
|
onClick: () => l(!c),
|
|
2732
2883
|
children: [
|
|
2733
|
-
/* @__PURE__ */ a("span", { className:
|
|
2734
|
-
/* @__PURE__ */ a("span", { className:
|
|
2884
|
+
/* @__PURE__ */ a("span", { className: qt.caret, children: c ? /* @__PURE__ */ a(We, { size: 14 }) : /* @__PURE__ */ a(Qe, { size: 14 }) }),
|
|
2885
|
+
/* @__PURE__ */ a("span", { className: qt.title, children: t })
|
|
2735
2886
|
]
|
|
2736
2887
|
}
|
|
2737
2888
|
),
|
|
2738
|
-
c && /* @__PURE__ */ a("div", { id: d, className:
|
|
2889
|
+
c && /* @__PURE__ */ a("div", { id: d, className: qt.items, children: n })
|
|
2739
2890
|
] });
|
|
2740
2891
|
}
|
|
2741
|
-
const
|
|
2742
|
-
root:
|
|
2743
|
-
pending:
|
|
2744
|
-
error:
|
|
2745
|
-
mark:
|
|
2746
|
-
label:
|
|
2747
|
-
done:
|
|
2748
|
-
code:
|
|
2892
|
+
const Pi = "_root_1dvwc_1", Oi = "_pending_1dvwc_11", Si = "_error_1dvwc_15", ji = "_mark_1dvwc_19", qi = "_label_1dvwc_29", Li = "_done_1dvwc_37", Fi = "_code_1dvwc_41 _code_1hqe1_6", Lt = {
|
|
2893
|
+
root: Pi,
|
|
2894
|
+
pending: Oi,
|
|
2895
|
+
error: Si,
|
|
2896
|
+
mark: ji,
|
|
2897
|
+
label: qi,
|
|
2898
|
+
done: Li,
|
|
2899
|
+
code: Fi
|
|
2749
2900
|
};
|
|
2750
|
-
function
|
|
2901
|
+
function Ma({
|
|
2751
2902
|
children: t,
|
|
2752
2903
|
code: n,
|
|
2753
2904
|
state: e = "pending",
|
|
@@ -2756,15 +2907,15 @@ function pa({
|
|
|
2756
2907
|
className: i,
|
|
2757
2908
|
...r
|
|
2758
2909
|
}) {
|
|
2759
|
-
const c = s ?? (e === "done" ? /* @__PURE__ */ a(
|
|
2760
|
-
return /* @__PURE__ */ g("div", { className: [
|
|
2761
|
-
/* @__PURE__ */ a("span", { className:
|
|
2762
|
-
/* @__PURE__ */ a("span", { className:
|
|
2763
|
-
n != null && /* @__PURE__ */ a("code", { className:
|
|
2910
|
+
const c = s ?? (e === "done" ? /* @__PURE__ */ a(Ge, { size: 14 }) : e === "error" ? /* @__PURE__ */ a(me, { size: 14 }) : e === "running" ? /* @__PURE__ */ a(_n, { size: "xs", label: o }) : /* @__PURE__ */ a(Cn, { size: 14 }));
|
|
2911
|
+
return /* @__PURE__ */ g("div", { className: [Lt.root, Lt[e], i].filter(Boolean).join(" "), ...r, children: [
|
|
2912
|
+
/* @__PURE__ */ a("span", { className: Lt.mark, children: c }),
|
|
2913
|
+
/* @__PURE__ */ a("span", { className: Lt.label, children: t }),
|
|
2914
|
+
n != null && /* @__PURE__ */ a("code", { className: Lt.code, children: n })
|
|
2764
2915
|
] });
|
|
2765
2916
|
}
|
|
2766
|
-
const
|
|
2767
|
-
function
|
|
2917
|
+
const Hi = "--backgrounds-bg-base";
|
|
2918
|
+
function Di(t, n) {
|
|
2768
2919
|
const e = t.trim();
|
|
2769
2920
|
if (/^#[0-9a-f]{6}$/i.test(e)) return e;
|
|
2770
2921
|
if (/^#[0-9a-f]{3}$/i.test(e))
|
|
@@ -2774,19 +2925,19 @@ function Ti(t, n) {
|
|
|
2774
2925
|
(o) => Math.max(0, Math.min(255, Math.round(Number(o)))).toString(16).padStart(2, "0")
|
|
2775
2926
|
).join("")}`;
|
|
2776
2927
|
}
|
|
2777
|
-
function
|
|
2928
|
+
function De(t) {
|
|
2778
2929
|
if (typeof window > "u") return t;
|
|
2779
|
-
const n = getComputedStyle(document.documentElement).getPropertyValue(
|
|
2780
|
-
return n ?
|
|
2930
|
+
const n = getComputedStyle(document.documentElement).getPropertyValue(Hi);
|
|
2931
|
+
return n ? Di(n, t) : t;
|
|
2781
2932
|
}
|
|
2782
|
-
function
|
|
2783
|
-
const [e, s] =
|
|
2784
|
-
return
|
|
2933
|
+
function rn(t, n = "rgb(255 255 255)") {
|
|
2934
|
+
const [e, s] = at(() => t ?? De(n));
|
|
2935
|
+
return nt(() => {
|
|
2785
2936
|
if (t) {
|
|
2786
2937
|
s(t);
|
|
2787
2938
|
return;
|
|
2788
2939
|
}
|
|
2789
|
-
const o = () => s(
|
|
2940
|
+
const o = () => s(De(n));
|
|
2790
2941
|
o();
|
|
2791
2942
|
const i = new MutationObserver(o);
|
|
2792
2943
|
return i.observe(document.documentElement, {
|
|
@@ -2795,16 +2946,16 @@ function nn(t, n = "rgb(255 255 255)") {
|
|
|
2795
2946
|
}), () => i.disconnect();
|
|
2796
2947
|
}, [t, n]), e;
|
|
2797
2948
|
}
|
|
2798
|
-
const
|
|
2799
|
-
root:
|
|
2800
|
-
header:
|
|
2801
|
-
trigger:
|
|
2802
|
-
mark:
|
|
2803
|
-
caret:
|
|
2804
|
-
body:
|
|
2805
|
-
peek:
|
|
2949
|
+
const Yi = "_root_1gc8h_1", Ui = "_header_1gc8h_8", Xi = "_trigger_1gc8h_23", Gi = "_mark_1gc8h_34", Wi = "_caret_1gc8h_35", Qi = "_body_1gc8h_50", Vi = "_peek_1gc8h_65", pt = {
|
|
2950
|
+
root: Yi,
|
|
2951
|
+
header: Ui,
|
|
2952
|
+
trigger: Xi,
|
|
2953
|
+
mark: Gi,
|
|
2954
|
+
caret: Wi,
|
|
2955
|
+
body: Qi,
|
|
2956
|
+
peek: Vi
|
|
2806
2957
|
};
|
|
2807
|
-
function
|
|
2958
|
+
function wa({
|
|
2808
2959
|
children: t,
|
|
2809
2960
|
label: n = "Reasoning",
|
|
2810
2961
|
workingLabel: e = "Reasoning…",
|
|
@@ -2817,38 +2968,38 @@ function fa({
|
|
|
2817
2968
|
paper: d,
|
|
2818
2969
|
avatarSize: u = 20,
|
|
2819
2970
|
className: h,
|
|
2820
|
-
...
|
|
2971
|
+
...p
|
|
2821
2972
|
}) {
|
|
2822
|
-
const [
|
|
2823
|
-
|
|
2973
|
+
const [f, y] = zt(o, i, r), v = H(null), A = Ct(), _ = rn(d), $ = s || f;
|
|
2974
|
+
nt(() => {
|
|
2824
2975
|
if (!s) return;
|
|
2825
|
-
const
|
|
2826
|
-
|
|
2976
|
+
const m = v.current;
|
|
2977
|
+
m && (m.scrollTop = m.scrollHeight);
|
|
2827
2978
|
}, [t, s]);
|
|
2828
|
-
const
|
|
2829
|
-
return /* @__PURE__ */ g("div", { className: [pt.root, h].filter(Boolean).join(" "), ...
|
|
2979
|
+
const b = l === null ? null : l ?? /* @__PURE__ */ a(Yt, { size: u, state: "thinking", paper: _ });
|
|
2980
|
+
return /* @__PURE__ */ g("div", { className: [pt.root, h].filter(Boolean).join(" "), ...p, children: [
|
|
2830
2981
|
s ? /* @__PURE__ */ g("div", { className: pt.header, role: "status", "aria-live": "polite", children: [
|
|
2831
|
-
|
|
2982
|
+
b && /* @__PURE__ */ a("span", { className: pt.mark, children: b }),
|
|
2832
2983
|
/* @__PURE__ */ a("span", { className: pt.label, children: e })
|
|
2833
2984
|
] }) : /* @__PURE__ */ g(
|
|
2834
2985
|
"button",
|
|
2835
2986
|
{
|
|
2836
2987
|
type: "button",
|
|
2837
2988
|
className: [pt.header, pt.trigger].join(" "),
|
|
2838
|
-
"aria-expanded":
|
|
2839
|
-
"aria-controls":
|
|
2840
|
-
onClick: () =>
|
|
2989
|
+
"aria-expanded": f,
|
|
2990
|
+
"aria-controls": A,
|
|
2991
|
+
onClick: () => y(!f),
|
|
2841
2992
|
children: [
|
|
2842
|
-
/* @__PURE__ */ a("span", { className: pt.caret, children:
|
|
2993
|
+
/* @__PURE__ */ a("span", { className: pt.caret, children: f ? /* @__PURE__ */ a(We, { size: 14 }) : /* @__PURE__ */ a(Qe, { size: 14 }) }),
|
|
2843
2994
|
/* @__PURE__ */ a("span", { className: pt.label, children: n })
|
|
2844
2995
|
]
|
|
2845
2996
|
}
|
|
2846
2997
|
),
|
|
2847
|
-
|
|
2998
|
+
$ && /* @__PURE__ */ a(
|
|
2848
2999
|
"div",
|
|
2849
3000
|
{
|
|
2850
|
-
id:
|
|
2851
|
-
ref:
|
|
3001
|
+
id: A,
|
|
3002
|
+
ref: v,
|
|
2852
3003
|
className: [pt.body, s && pt.peek].filter(Boolean).join(" "),
|
|
2853
3004
|
style: s ? { maxHeight: c } : void 0,
|
|
2854
3005
|
children: t
|
|
@@ -2856,12 +3007,12 @@ function fa({
|
|
|
2856
3007
|
)
|
|
2857
3008
|
] });
|
|
2858
3009
|
}
|
|
2859
|
-
const
|
|
2860
|
-
root:
|
|
2861
|
-
avatar:
|
|
2862
|
-
label:
|
|
3010
|
+
const Ki = "_root_1d7vi_1", Zi = "_avatar_1d7vi_8", Ji = "_label_1d7vi_14", ae = {
|
|
3011
|
+
root: Ki,
|
|
3012
|
+
avatar: Zi,
|
|
3013
|
+
label: Ji
|
|
2863
3014
|
};
|
|
2864
|
-
function
|
|
3015
|
+
function za({
|
|
2865
3016
|
label: t = "Thinking…",
|
|
2866
3017
|
size: n = 24,
|
|
2867
3018
|
shape: e,
|
|
@@ -2870,71 +3021,72 @@ function ma({
|
|
|
2870
3021
|
className: i,
|
|
2871
3022
|
...r
|
|
2872
3023
|
}) {
|
|
2873
|
-
const c =
|
|
3024
|
+
const c = rn(o);
|
|
2874
3025
|
return /* @__PURE__ */ g(
|
|
2875
3026
|
"div",
|
|
2876
3027
|
{
|
|
2877
|
-
className: [
|
|
3028
|
+
className: [ae.root, i].filter(Boolean).join(" "),
|
|
2878
3029
|
role: "status",
|
|
2879
3030
|
"aria-live": "polite",
|
|
2880
3031
|
...r,
|
|
2881
3032
|
children: [
|
|
2882
|
-
/* @__PURE__ */ a("span", { className:
|
|
2883
|
-
/* @__PURE__ */ a("span", { className:
|
|
3033
|
+
/* @__PURE__ */ a("span", { className: ae.avatar, children: /* @__PURE__ */ a(Yt, { size: n, state: "thinking", shape: e, color: s, paper: c }) }),
|
|
3034
|
+
/* @__PURE__ */ a("span", { className: ae.label, children: t })
|
|
2884
3035
|
]
|
|
2885
3036
|
}
|
|
2886
3037
|
);
|
|
2887
3038
|
}
|
|
2888
3039
|
export {
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
3040
|
+
_a as AiAssistantActionCard,
|
|
3041
|
+
ba as AiAssistantAnswer,
|
|
3042
|
+
da as AiAssistantBottom,
|
|
3043
|
+
ho as AiAssistantHeader,
|
|
3044
|
+
cr as AiAssistantImageGroup,
|
|
3045
|
+
ha as AiAssistantInput,
|
|
3046
|
+
fa as AiAssistantLauncher,
|
|
3047
|
+
ua as AiAssistantLink,
|
|
3048
|
+
ca as AiAssistantModal,
|
|
3049
|
+
xa as AiAssistantQuestion,
|
|
3050
|
+
ma as AiAssistantQuestionCard,
|
|
3051
|
+
wa as AiAssistantReasoning,
|
|
3052
|
+
Na as AiAssistantRecommendation,
|
|
3053
|
+
ga as AiAssistantReference,
|
|
3054
|
+
pa as AiAssistantReferencePanel,
|
|
3055
|
+
ya as AiAssistantSecretField,
|
|
3056
|
+
ka as AiAssistantSuggestion,
|
|
3057
|
+
va as AiAssistantSuggestions,
|
|
3058
|
+
Ma as AiAssistantTask,
|
|
3059
|
+
za as AiAssistantThinking,
|
|
3060
|
+
la as AiAssistantTitle,
|
|
3061
|
+
$a as AiAssistantToolCall,
|
|
3062
|
+
Aa as AiAssistantToolCallGroup,
|
|
3063
|
+
fs as COLORS,
|
|
3064
|
+
ps as COLOR_BY_ID,
|
|
3065
|
+
_s as DEFAULT_COLOR,
|
|
3066
|
+
Vn as DEFAULT_EXPRESSION,
|
|
3067
|
+
hs as DEFAULT_SHAPE,
|
|
3068
|
+
Ze as EXPRESSIONS,
|
|
3069
|
+
Qn as EXPRESSION_BY_ID,
|
|
3070
|
+
Ps as HALF_VIEWBOX,
|
|
3071
|
+
Yt as Novi,
|
|
3072
|
+
fe as NoviEngine,
|
|
3073
|
+
aa as NoviInput,
|
|
3074
|
+
ia as NoviTile,
|
|
3075
|
+
js as PITCH,
|
|
3076
|
+
Ss as PITCH_MAX,
|
|
3077
|
+
ks as POSES,
|
|
3078
|
+
sn as RADIUS,
|
|
3079
|
+
oa as SEQUENCE,
|
|
3080
|
+
tn as SHAPES,
|
|
3081
|
+
us as SHAPE_BY_ID,
|
|
3082
|
+
on as SPIN,
|
|
3083
|
+
qs as SPIN_TIME,
|
|
3084
|
+
nn as STATES,
|
|
3085
|
+
Bt as STATE_BY_ID,
|
|
3086
|
+
se as TURN_TIME,
|
|
3087
|
+
Os as YAW_MAX,
|
|
3088
|
+
Ls as lookTarget,
|
|
3089
|
+
ms as mixHex,
|
|
3090
|
+
ra as spinLook,
|
|
3091
|
+
rn as usePaper
|
|
2940
3092
|
};
|