chordia-ui 3.4.0 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/Timeline.cjs.js +1 -6
  2. package/dist/Timeline.cjs.js.map +1 -1
  3. package/dist/Timeline.es.js +129 -597
  4. package/dist/Timeline.es.js.map +1 -1
  5. package/dist/TranscriptCard.cjs.js +7 -0
  6. package/dist/TranscriptCard.cjs.js.map +1 -0
  7. package/dist/TranscriptCard.es.js +474 -0
  8. package/dist/TranscriptCard.es.js.map +1 -0
  9. package/dist/UpdatedInteractionRecording.cjs.js +1 -1
  10. package/dist/UpdatedInteractionRecording.cjs.js.map +1 -1
  11. package/dist/UpdatedInteractionRecording.es.js +516 -420
  12. package/dist/UpdatedInteractionRecording.es.js.map +1 -1
  13. package/dist/components/UpdatedInteractionDetails.cjs.js +2 -2
  14. package/dist/components/UpdatedInteractionDetails.cjs.js.map +1 -1
  15. package/dist/components/UpdatedInteractionDetails.es.js +304 -285
  16. package/dist/components/UpdatedInteractionDetails.es.js.map +1 -1
  17. package/dist/components/media.cjs.js +1 -1
  18. package/dist/components/media.cjs.js.map +1 -1
  19. package/dist/components/media.es.js +9 -8
  20. package/dist/components/media.es.js.map +1 -1
  21. package/dist/index.cjs.js +1 -1
  22. package/dist/index.cjs2.js +1 -1
  23. package/dist/index.cjs2.js.map +1 -1
  24. package/dist/index.cjs3.js +2 -2
  25. package/dist/index.cjs3.js.map +1 -1
  26. package/dist/index.es.js +53 -52
  27. package/dist/index.es.js.map +1 -1
  28. package/dist/index.es2.js +1 -1
  29. package/dist/index.es2.js.map +1 -1
  30. package/dist/index.es3.js +11 -4
  31. package/dist/index.es3.js.map +1 -1
  32. package/dist/pages/interactionDetails.cjs.js +2 -2
  33. package/dist/pages/interactionDetails.cjs.js.map +1 -1
  34. package/dist/pages/interactionDetails.es.js +17 -16
  35. package/dist/pages/interactionDetails.es.js.map +1 -1
  36. package/package.json +1 -1
  37. package/src/components/UpdatedInteractionDetails/UpdatedInteractionDetails.jsx +125 -107
  38. package/src/components/UpdatedInteractionDetails/UpdatedInteractionRecording.jsx +342 -178
@@ -1,556 +1,90 @@
1
- import { jsx as t, jsxs as u } from "react/jsx-runtime";
2
- import { useEffect as A, useState as H, useRef as W, useMemo as X } from "react";
3
- import { Pause as F, Play as D, RotateCcw as Y, RotateCw as _ } from "lucide-react";
4
- const P = {
5
- customer: {
6
- label: "Customer",
7
- railColor: "var(--rail-discovery)",
8
- cardBg: "var(--card-customer)",
9
- cardBgHighlight: "rgba(94, 136, 176, 0.12)",
10
- borderColor: "var(--border-subtle)"
11
- },
12
- agent: {
13
- label: "Agent",
14
- railColor: "var(--rail-outcome)",
15
- cardBg: "var(--card-agent)",
16
- cardBgHighlight: "rgba(107, 124, 147, 0.10)",
17
- borderColor: "var(--border-subtle)"
18
- },
19
- assistant: {
20
- label: "AI Assistant",
21
- railColor: "var(--rail-purple)",
22
- cardBg: "var(--card-assistant)",
23
- cardBgHighlight: "rgba(155, 122, 168, 0.10)",
24
- borderColor: "var(--border-subtle)"
25
- },
26
- system: {
27
- label: "System",
28
- railColor: "var(--text-faint)",
29
- cardBg: "transparent",
30
- cardBgHighlight: "transparent",
31
- borderColor: "transparent"
32
- }
33
- }, j = "conversation-turn-keyframes";
34
- function K() {
35
- if (typeof document > "u" || document.getElementById(j))
36
- return;
37
- const s = document.createElement("style");
38
- s.id = j, s.textContent = `
39
- @keyframes turn-playing-pulse {
40
- 0%, 100% { opacity: 0.4; }
41
- 50% { opacity: 0.9; }
42
- }
43
- `, document.head.appendChild(s);
44
- }
45
- function O({
46
- role: s = "agent",
47
- text: h,
48
- actorLabel: f,
49
- actorRailColor: B,
50
- actionKicker: b,
51
- toolBadges: y,
52
- streaming: g = !1,
53
- meta: S,
54
- timeRange: E,
55
- isHighlighted: T = !1,
56
- highlightRailColor: n,
57
- observations: i,
58
- onObservationClick: x,
59
- children: R
60
- }) {
61
- A(() => {
62
- K();
63
- }, []);
64
- const C = P[s] || P.agent, w = f || C.label, k = B || C.railColor, o = T || g;
65
- return s === "system" ? /* @__PURE__ */ t(
66
- "div",
67
- {
68
- style: {
69
- textAlign: "center",
70
- padding: "6px 0",
71
- flexShrink: 0,
72
- fontSize: "var(--text-sm, 11px)",
73
- color: "var(--text-faint, rgba(30,33,37,0.36))",
74
- fontWeight: 500,
75
- letterSpacing: "0.02em"
76
- },
77
- children: h
78
- }
79
- ) : /* @__PURE__ */ u(
80
- "div",
81
- {
82
- style: {
83
- position: "relative",
84
- padding: "10px 14px 10px 18px",
85
- borderRadius: 10,
86
- overflow: "hidden",
87
- flexShrink: 0,
88
- background: o ? C.cardBgHighlight : C.cardBg,
89
- border: `1px solid ${g ? k : C.borderColor}`,
90
- boxShadow: g ? `0 0 8px ${C.cardBgHighlight}` : "none",
91
- transition: "background 0.2s, border-color 0.2s, box-shadow 0.2s"
92
- },
93
- children: [
94
- /* @__PURE__ */ t(
95
- "div",
96
- {
97
- style: {
98
- position: "absolute",
99
- left: 0,
100
- top: 0,
101
- bottom: 0,
102
- width: "var(--rail-width-thin, 4px)",
103
- backgroundColor: k,
104
- borderRadius: "10px 0 0 10px"
105
- }
106
- }
107
- ),
108
- /* @__PURE__ */ u(
109
- "div",
110
- {
111
- style: {
112
- display: "flex",
113
- alignItems: "flex-start",
114
- justifyContent: "space-between",
115
- gap: 8,
116
- marginBottom: 4
117
- },
118
- children: [
119
- /* @__PURE__ */ u("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
120
- b ? /* @__PURE__ */ t(
121
- "div",
122
- {
123
- style: {
124
- fontSize: "var(--text-xs-plus, 10.5px)",
125
- fontWeight: 650,
126
- textTransform: "uppercase",
127
- letterSpacing: "var(--tracking-label, 0.16em)",
128
- color: k
129
- },
130
- children: b
131
- }
132
- ) : null,
133
- /* @__PURE__ */ t(
134
- "div",
135
- {
136
- style: {
137
- fontSize: "var(--text-xs-plus, 10.5px)",
138
- fontWeight: 650,
139
- textTransform: "uppercase",
140
- letterSpacing: "var(--tracking-label, 0.16em)",
141
- color: "var(--text-faint, rgba(30,33,37,0.36))"
142
- },
143
- children: w
144
- }
145
- )
146
- ] }),
147
- y && y.length > 0 ? /* @__PURE__ */ t("div", { style: { display: "flex", flexWrap: "wrap", gap: 4, flexShrink: 0, justifyContent: "flex-end" }, children: y.map((e, l) => {
148
- const d = e.pending, c = !d && e.success === !1;
149
- return /* @__PURE__ */ u(
150
- "span",
151
- {
152
- style: {
153
- display: "inline-flex",
154
- alignItems: "center",
155
- gap: 5,
156
- fontSize: "var(--text-xs, 10px)",
157
- padding: "2px 8px 2px 6px",
158
- borderRadius: 999,
159
- background: "var(--paper, rgba(255,255,255,0.78))",
160
- border: "1px solid var(--border-subtle, rgba(52,58,64,0.08))",
161
- color: "var(--text-faint, rgba(30,33,37,0.36))",
162
- fontWeight: 500,
163
- fontFamily: "var(--font-fira-code, var(--font-mono, monospace))",
164
- letterSpacing: "0.01em",
165
- lineHeight: 1.4,
166
- whiteSpace: "nowrap"
167
- },
168
- children: [
169
- /* @__PURE__ */ t(
170
- "span",
171
- {
172
- style: {
173
- width: 5,
174
- height: 5,
175
- borderRadius: "50%",
176
- backgroundColor: d ? "var(--rail-discovery, #5E88B0)" : c ? "var(--rail-compliance, #C98A5A)" : "var(--text-xfaint, rgba(30,33,37,0.28))",
177
- flexShrink: 0
178
- }
179
- }
180
- ),
181
- e.name
182
- ]
183
- },
184
- l
185
- );
186
- }) }) : null
187
- ]
188
- }
189
- ),
190
- /* @__PURE__ */ u(
191
- "div",
192
- {
193
- style: {
194
- fontSize: "var(--text-md, 13px)",
195
- lineHeight: "var(--leading-normal, 1.5)",
196
- color: g ? "var(--text-strong, rgba(30,33,37,0.92))" : "var(--text-base, rgba(30,33,37,0.78))",
197
- fontWeight: g ? 550 : 400
198
- },
199
- children: [
200
- h,
201
- g ? /* @__PURE__ */ t(
202
- "span",
203
- {
204
- style: {
205
- display: "inline-block",
206
- width: 6,
207
- height: 14,
208
- background: k,
209
- marginLeft: 2,
210
- borderRadius: 1,
211
- animation: "cursorBlink 0.8s ease-in-out infinite",
212
- verticalAlign: "text-bottom"
213
- }
214
- }
215
- ) : null
216
- ]
217
- }
218
- ),
219
- E || R || i && i.length > 0 ? /* @__PURE__ */ u("div", { style: { marginTop: 6, display: "flex", alignItems: "center", gap: 6 }, children: [
220
- R,
221
- E ? /* @__PURE__ */ t(
222
- "span",
223
- {
224
- style: {
225
- fontSize: "var(--text-sm, 11px)",
226
- padding: "2px 8px",
227
- borderRadius: 999,
228
- border: "1px solid var(--border, rgba(52,58,64,0.12))",
229
- background: "var(--timestamp-bg, rgba(255,255,255,0.70))",
230
- color: "var(--text-muted, rgba(30,33,37,0.56))",
231
- fontFamily: "var(--font-mono, monospace)"
232
- },
233
- children: E
234
- }
235
- ) : null,
236
- i && i.length > 0 ? /* @__PURE__ */ t("div", { style: { display: "flex", flexWrap: "wrap", gap: 4, marginLeft: "auto" }, children: i.map((e, l) => /* @__PURE__ */ u(
237
- "span",
238
- {
239
- onClick: e.onClick || (x ? () => x(e) : void 0),
240
- style: {
241
- display: "inline-flex",
242
- alignItems: "center",
243
- gap: 4,
244
- fontSize: "var(--text-xs, 10px)",
245
- padding: "2px 8px",
246
- borderRadius: 999,
247
- background: `color-mix(in srgb, ${e.color || "var(--state-present)"} 12%, transparent)`,
248
- border: `1px solid color-mix(in srgb, ${e.color || "var(--state-present)"} 25%, transparent)`,
249
- color: e.color || "var(--state-present)",
250
- fontWeight: 550,
251
- lineHeight: 1.4,
252
- whiteSpace: "nowrap",
253
- cursor: e.onClick || x ? "pointer" : "default",
254
- transition: "background 0.15s"
255
- },
256
- title: e.reason || e.label,
257
- children: [
258
- /* @__PURE__ */ t("span", { style: {
259
- width: 4,
260
- height: 4,
261
- borderRadius: "50%",
262
- backgroundColor: e.color || "var(--state-present)",
263
- flexShrink: 0,
264
- opacity: 0.7
265
- } }),
266
- e.label
267
- ]
268
- },
269
- l
270
- )) }) : null
271
- ] }) : null,
272
- S ? /* @__PURE__ */ t(
273
- "div",
274
- {
275
- style: {
276
- marginTop: 6,
277
- fontSize: "var(--text-xs-plus, 10.5px)",
278
- color: "var(--text-faint, rgba(30,33,37,0.36))",
279
- fontFamily: "var(--font-mono, monospace)"
280
- },
281
- children: S
282
- }
283
- ) : null,
284
- o && n ? /* @__PURE__ */ t(
285
- "div",
286
- {
287
- style: {
288
- position: "absolute",
289
- right: 8,
290
- top: 8,
291
- bottom: 8,
292
- width: 6,
293
- borderRadius: 4,
294
- backgroundColor: n,
295
- opacity: 0.7,
296
- animation: "turn-playing-pulse 1.5s ease-in-out infinite"
297
- }
298
- }
299
- ) : null
300
- ]
301
- }
302
- );
303
- }
304
- const V = (s) => {
305
- const [h, f] = s.split("–").map((B) => {
306
- const [b, y] = B.split(":").map(Number);
307
- return b * 60 + y;
308
- });
309
- return { start: h, end: f };
310
- }, q = (s) => ({
311
- customer: "customer",
312
- agent: "agent",
313
- third_party: "agent",
314
- system: "system",
315
- assistant: "assistant"
316
- })[s] || "agent";
317
- function U({
318
- turns: s,
319
- audioUrl: h,
320
- activeTurnIndex: f = -1,
321
- autoScrollActiveTurn: B = !1,
322
- isExternalPlaying: b = !1,
323
- onTurnPlayPause: y
324
- }) {
325
- const [g, S] = H(null), [E, T] = H(!1), n = W(null), i = W(null), x = W([]), R = W(null), C = W(-1), w = typeof y == "function", k = b !== void 0;
326
- A(() => {
327
- if (h)
328
- return n.current = new Audio(h), n.current.preload = "auto", () => {
329
- n.current && (n.current.pause(), n.current = null);
330
- };
331
- }, [h]), A(() => () => {
332
- n.current && (n.current.pause(), i.current && n.current.removeEventListener("timeupdate", i.current));
333
- }, []), A(() => {
334
- if (!B || f < 0)
335
- return;
336
- const e = R.current, l = x.current[f];
337
- if (!l || !e)
338
- return;
339
- const d = e.getBoundingClientRect(), c = l.getBoundingClientRect(), v = 12, m = c.top >= d.top + v && c.bottom <= d.bottom - 8;
340
- if (!(C.current === f) || !m) {
341
- const M = c.top - d.top + e.scrollTop;
342
- e.scrollTop = Math.max(M - v, 0);
343
- }
344
- C.current = f;
345
- }, [f, B]);
346
- const o = (e, l) => {
347
- if (w) {
348
- y(s[l], l);
349
- return;
350
- }
351
- if (g === l && E)
352
- n.current && (n.current.pause(), i.current && (n.current.removeEventListener("timeupdate", i.current), i.current = null)), T(!1);
353
- else {
354
- const d = g;
355
- if (S(l), h && n.current) {
356
- const { start: c, end: v } = V(e);
357
- d !== null && d !== l && (n.current.pause(), i.current && (n.current.removeEventListener("timeupdate", i.current), i.current = null));
358
- const m = () => {
359
- if (n.current) {
360
- if (n.current.currentTime = c, v) {
361
- const $ = () => {
362
- n.current && n.current.currentTime >= v && (n.current.pause(), T(!1), S(null), i.current && (n.current.removeEventListener("timeupdate", i.current), i.current = null));
363
- };
364
- i.current = $, n.current.addEventListener("timeupdate", $);
365
- }
366
- n.current.play().then(() => T(!0)).catch(($) => {
367
- $ && $.name === "AbortError" || (T(!1), S(null));
368
- });
369
- }
370
- };
371
- n.current.readyState >= 2 ? m() : (n.current.addEventListener("loadedmetadata", m, { once: !0 }), n.current.load());
372
- } else
373
- T(!0);
374
- }
375
- };
376
- return /* @__PURE__ */ u(
377
- "div",
378
- {
379
- ref: R,
380
- className: "custom-thin-scrollbar-library",
381
- style: {
382
- maxHeight: 560,
383
- overflowY: "auto",
384
- scrollBehavior: "smooth",
385
- border: "1px solid var(--border, rgba(52,58,64,0.12))",
386
- // borderRadius: "var(--radius-lg, 12px)",
387
- borderRadius: "12px 0px 0px 12px",
388
- background: "var(--paper-elevated, rgba(255,255,255,0.82))",
389
- padding: 16
390
- },
391
- children: [
392
- /* @__PURE__ */ t(
393
- "div",
394
- {
395
- style: {
396
- fontSize: "var(--text-xs-plus, 10.5px)",
397
- fontWeight: 650,
398
- textTransform: "uppercase",
399
- letterSpacing: "var(--tracking-label, 0.16em)",
400
- color: "var(--text-faint, rgba(30,33,37,0.36))",
401
- marginBottom: 12
402
- },
403
- children: "Transcript"
404
- }
405
- ),
406
- /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: s.map((e, l) => {
407
- const d = w || k ? !!b && f === l : g === l && E, c = !!e.isHighlighted || d, v = q(e.actorType);
408
- return /* @__PURE__ */ t(
409
- "div",
410
- {
411
- ref: (m) => {
412
- x.current[l] = m;
413
- },
414
- children: /* @__PURE__ */ t(
415
- O,
416
- {
417
- role: v,
418
- text: e.text,
419
- actorLabel: e.actor,
420
- actorRailColor: e.actorColor,
421
- timeRange: e.timeRange,
422
- isHighlighted: c,
423
- highlightRailColor: d ? e.highlightColor || (v === "agent" ? "var(--rail-outcome)" : "var(--rail-discovery)") : e.highlightColor,
424
- toolBadges: e.toolBadges,
425
- observations: e.observations,
426
- onObservationClick: e.onObservationClick,
427
- children: e.timeRange ? /* @__PURE__ */ t(
428
- "button",
429
- {
430
- onClick: () => o(e.timeRange, l),
431
- style: {
432
- width: 24,
433
- height: 24,
434
- borderRadius: "50%",
435
- border: "1px solid var(--border, rgba(52,58,64,0.12))",
436
- background: d ? "var(--rail-discovery, #5E88B0)" : "var(--paper, rgba(255,255,255,0.78))",
437
- display: "inline-flex",
438
- alignItems: "center",
439
- justifyContent: "center",
440
- cursor: "pointer",
441
- padding: 0,
442
- transition: "all 0.15s"
443
- },
444
- "aria-label": d ? `Pause segment ${e.timeRange}` : `Play segment ${e.timeRange}`,
445
- children: d ? /* @__PURE__ */ t(
446
- F,
447
- {
448
- style: { width: 12, height: 12, color: "var(--paper, #fff)", fill: "var(--paper, #fff)" },
449
- strokeWidth: 0
450
- }
451
- ) : /* @__PURE__ */ t(
452
- D,
453
- {
454
- style: { width: 12, height: 12, color: "var(--text-muted, rgba(30,33,37,0.56))", fill: "var(--text-muted, rgba(30,33,37,0.56))", marginLeft: 1 },
455
- strokeWidth: 0
456
- }
457
- )
458
- }
459
- ) : null
460
- }
461
- )
462
- },
463
- l
464
- );
465
- }) })
466
- ]
467
- }
468
- );
469
- }
470
- function tt({
471
- segments: s = [],
472
- durationSeconds: h = 0,
473
- actorRows: f = [],
474
- currentTimeSeconds: B = 0,
475
- onSeek: b,
476
- showControls: y = !1,
477
- hasRecording: g = !1,
478
- timelinePlaying: S = !1,
479
- playbackRate: E = 1,
480
- speedOptions: T = [1, 1.25, 1.5, 2],
481
- onTogglePlay: n,
482
- onSeekBack: i,
483
- onSeekForward: x,
484
- onSetPlaybackRate: R,
485
- totalDurationLabel: C
1
+ import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
+ import { useState as L, useEffect as D, useMemo as P } from "react";
3
+ import { RotateCcw as S, Pause as X, Play as A, RotateCw as N } from "lucide-react";
4
+ function J({
5
+ segments: d = [],
6
+ durationSeconds: T = 0,
7
+ actorRows: b = [],
8
+ currentTimeSeconds: w = 0,
9
+ onSeek: f,
10
+ showControls: M = !1,
11
+ hasRecording: m = !1,
12
+ timelinePlaying: x = !1,
13
+ playbackRate: k = 1,
14
+ speedOptions: E = [1, 1.25, 1.5, 2],
15
+ onTogglePlay: I,
16
+ onSeekBack: h,
17
+ onSeekForward: y,
18
+ onSetPlaybackRate: g,
19
+ totalDurationLabel: F
486
20
  }) {
487
- const [w, k] = H(null);
488
- A(() => {
489
- if (!w)
21
+ const [u, v] = L(null);
22
+ D(() => {
23
+ if (!u)
490
24
  return;
491
- const r = setTimeout(() => k(null), 220);
492
- return () => clearTimeout(r);
493
- }, [w]);
494
- const o = Math.max(
495
- Number(h) || 0,
496
- ...s.map((r) => Number(r.endTime) || 0),
25
+ const t = setTimeout(() => v(null), 220);
26
+ return () => clearTimeout(t);
27
+ }, [u]);
28
+ const a = Math.max(
29
+ Number(T) || 0,
30
+ ...d.map((t) => Number(t.endTime) || 0),
497
31
  1
498
- ), e = Math.max(0, Math.min(Number(B) || 0, o)), l = o > 0 ? e / o * 100 : 0, d = `calc(${l}% + ${(5 * (1 - l / 100)).toFixed(4)}rem)`, c = (r) => {
499
- const p = Math.floor(r / 60), a = Math.floor(r % 60);
500
- return `${p.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}`;
501
- }, v = X(() => {
502
- if (f.length)
503
- return f.map((a) => ({
504
- ...a,
505
- segments: s.filter((I) => I.actor === a.key)
32
+ ), C = Math.max(0, Math.min(Number(w) || 0, a)), $ = a > 0 ? C / a * 100 : 0, z = `calc(${$}% + ${(5 * (1 - $ / 100)).toFixed(4)}rem)`, n = (t) => {
33
+ const i = Math.floor(t / 60), e = Math.floor(t % 60);
34
+ return `${i.toString().padStart(2, "0")}:${e.toString().padStart(2, "0")}`;
35
+ }, B = P(() => {
36
+ if (b.length)
37
+ return b.map((e) => ({
38
+ ...e,
39
+ segments: d.filter((c) => c.actor === e.key)
506
40
  }));
507
- const r = Array.from(new Set(s.map((a) => a.actor))), p = new Map(s.map((a) => [a.actor, a.actorColor]));
508
- return r.map((a) => ({
509
- key: a,
510
- label: a,
511
- color: p.get(a) || "#6B7C93",
512
- segments: s.filter((I) => I.actor === a)
41
+ const t = Array.from(new Set(d.map((e) => e.actor))), i = new Map(d.map((e) => [e.actor, e.actorColor]));
42
+ return t.map((e) => ({
43
+ key: e,
44
+ label: e,
45
+ color: i.get(e) || "#6B7C93",
46
+ segments: d.filter((c) => c.actor === e)
513
47
  }));
514
- }, [f, s]), m = [], $ = 120;
515
- for (let r = 0; r <= o; r += $)
516
- m.push(r);
517
- (!m.length || m[m.length - 1] < o) && m.push(o);
518
- const M = (r) => {
519
- if (!b)
48
+ }, [b, d]), l = [], j = 120;
49
+ for (let t = 0; t <= a; t += j)
50
+ l.push(t);
51
+ (!l.length || l[l.length - 1] < a) && l.push(a);
52
+ const R = (t) => {
53
+ if (!f)
520
54
  return;
521
- const p = r.currentTarget.getBoundingClientRect();
522
- if (!p.width)
55
+ const i = t.currentTarget.getBoundingClientRect();
56
+ if (!i.width)
523
57
  return;
524
- const a = Math.max(0, Math.min((r.clientX - p.left) / p.width, 1));
525
- b(a * o);
58
+ const e = Math.max(0, Math.min((t.clientX - i.left) / i.width, 1));
59
+ f(e * a);
526
60
  };
527
- return /* @__PURE__ */ u("div", { style: {
61
+ return /* @__PURE__ */ o("div", { style: {
528
62
  padding: "10px 0"
529
63
  }, children: [
530
- y && /* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 8 }, children: [
531
- /* @__PURE__ */ u("div", { style: {
64
+ M && /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 8 }, children: [
65
+ /* @__PURE__ */ o("div", { style: {
532
66
  fontSize: "var(--text-sm, 11px)",
533
67
  fontFamily: "var(--font-mono, monospace)",
534
68
  color: "var(--text-muted, rgba(30,33,37,0.56))",
535
69
  fontWeight: 500,
536
70
  minWidth: 70
537
71
  }, children: [
538
- c(e),
72
+ n(C),
539
73
  " ",
540
- /* @__PURE__ */ u("span", { style: { color: "var(--text-faint, rgba(30,33,37,0.36))" }, children: [
74
+ /* @__PURE__ */ o("span", { style: { color: "var(--text-faint, rgba(30,33,37,0.36))" }, children: [
541
75
  "/ ",
542
- c(o)
76
+ n(a)
543
77
  ] })
544
78
  ] }),
545
- /* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
546
- /* @__PURE__ */ t(
79
+ /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
80
+ /* @__PURE__ */ r(
547
81
  "button",
548
82
  {
549
83
  type: "button",
550
84
  onClick: () => {
551
- k("rewind"), i == null || i();
85
+ v("rewind"), h == null || h();
552
86
  },
553
- disabled: !g,
87
+ disabled: !m,
554
88
  title: "Rewind 15s",
555
89
  style: {
556
90
  display: "inline-flex",
@@ -559,20 +93,20 @@ function tt({
559
93
  width: 28,
560
94
  height: 28,
561
95
  borderRadius: "50%",
562
- border: `1px solid ${w === "rewind" ? "var(--rail-discovery, #5E88B0)" : "var(--border, rgba(52,58,64,0.12))"}`,
96
+ border: `1px solid ${u === "rewind" ? "var(--rail-discovery, #5E88B0)" : "var(--border, rgba(52,58,64,0.12))"}`,
563
97
  background: "var(--paper, rgba(255,255,255,0.78))",
564
98
  cursor: "pointer",
565
99
  padding: 0
566
100
  },
567
- children: /* @__PURE__ */ t(Y, { size: 13, stroke: "var(--rail-discovery, #5E88B0)" })
101
+ children: /* @__PURE__ */ r(S, { size: 13, stroke: "var(--rail-discovery, #5E88B0)" })
568
102
  }
569
103
  ),
570
- /* @__PURE__ */ t(
104
+ /* @__PURE__ */ r(
571
105
  "button",
572
106
  {
573
107
  type: "button",
574
- onClick: n,
575
- disabled: !g,
108
+ onClick: I,
109
+ disabled: !m,
576
110
  style: {
577
111
  display: "inline-flex",
578
112
  alignItems: "center",
@@ -586,18 +120,18 @@ function tt({
586
120
  cursor: "pointer",
587
121
  padding: 0
588
122
  },
589
- "aria-label": S ? "Pause recording" : "Play recording",
590
- children: S ? /* @__PURE__ */ t(F, { size: 14 }) : /* @__PURE__ */ t(D, { size: 14, style: { marginLeft: 1 } })
123
+ "aria-label": x ? "Pause recording" : "Play recording",
124
+ children: x ? /* @__PURE__ */ r(X, { size: 14 }) : /* @__PURE__ */ r(A, { size: 14, style: { marginLeft: 1 } })
591
125
  }
592
126
  ),
593
- /* @__PURE__ */ t(
127
+ /* @__PURE__ */ r(
594
128
  "button",
595
129
  {
596
130
  type: "button",
597
131
  onClick: () => {
598
- k("forward"), x == null || x();
132
+ v("forward"), y == null || y();
599
133
  },
600
- disabled: !g,
134
+ disabled: !m,
601
135
  title: "Forward 15s",
602
136
  style: {
603
137
  display: "inline-flex",
@@ -606,23 +140,23 @@ function tt({
606
140
  width: 28,
607
141
  height: 28,
608
142
  borderRadius: "50%",
609
- border: `1px solid ${w === "forward" ? "var(--rail-discovery, #5E88B0)" : "var(--border, rgba(52,58,64,0.12))"}`,
143
+ border: `1px solid ${u === "forward" ? "var(--rail-discovery, #5E88B0)" : "var(--border, rgba(52,58,64,0.12))"}`,
610
144
  background: "var(--paper, rgba(255,255,255,0.78))",
611
145
  cursor: "pointer",
612
146
  padding: 0
613
147
  },
614
- children: /* @__PURE__ */ t(_, { size: 13, stroke: "var(--rail-discovery, #5E88B0)" })
148
+ children: /* @__PURE__ */ r(N, { size: 13, stroke: "var(--rail-discovery, #5E88B0)" })
615
149
  }
616
150
  ),
617
- /* @__PURE__ */ t("div", { style: { display: "inline-flex", alignItems: "center", gap: 4, borderRadius: 999, border: "1px solid var(--border, rgba(52,58,64,0.12))", padding: "2px 3px", background: "var(--paper, rgba(255,255,255,0.78))", marginLeft: 4 }, children: T.map((r) => {
618
- const p = E === r;
619
- return /* @__PURE__ */ t(
151
+ /* @__PURE__ */ r("div", { style: { display: "inline-flex", alignItems: "center", gap: 4, borderRadius: 999, border: "1px solid var(--border, rgba(52,58,64,0.12))", padding: "2px 3px", background: "var(--paper, rgba(255,255,255,0.78))", marginLeft: 4 }, children: E.map((t) => {
152
+ const i = k === t;
153
+ return /* @__PURE__ */ r(
620
154
  "button",
621
155
  {
622
156
  type: "button",
623
- onClick: () => R == null ? void 0 : R(r),
624
- disabled: !g,
625
- title: `Speed: ${r}x`,
157
+ onClick: () => g == null ? void 0 : g(t),
158
+ disabled: !m,
159
+ title: `Speed: ${t}x`,
626
160
  style: {
627
161
  display: "inline-flex",
628
162
  alignItems: "center",
@@ -631,49 +165,49 @@ function tt({
631
165
  minWidth: 38,
632
166
  padding: "0 6px",
633
167
  borderRadius: 999,
634
- border: `1px solid ${p ? "var(--rail-discovery, #5E88B0)" : "transparent"}`,
635
- background: p ? "var(--rail-discovery, #5E88B0)" : "transparent",
636
- color: p ? "#fff" : "var(--text-muted, rgba(30,33,37,0.56))",
168
+ border: `1px solid ${i ? "var(--rail-discovery, #5E88B0)" : "transparent"}`,
169
+ background: i ? "var(--rail-discovery, #5E88B0)" : "transparent",
170
+ color: i ? "#fff" : "var(--text-muted, rgba(30,33,37,0.56))",
637
171
  fontSize: "var(--text-xs, 10px)",
638
172
  fontWeight: 600,
639
173
  cursor: "pointer"
640
174
  },
641
- children: r === 1.5 ? "1.50x" : `${r}x`
175
+ children: t === 1.5 ? "1.50x" : `${t}x`
642
176
  },
643
- r
177
+ t
644
178
  );
645
179
  }) })
646
180
  ] })
647
181
  ] }),
648
- /* @__PURE__ */ t("div", { style: {
182
+ /* @__PURE__ */ r("div", { style: {
649
183
  background: "var(--paper, rgba(255,255,255,0.78))",
650
184
  border: "1px solid var(--border, rgba(52,58,64,0.12))",
651
185
  borderRadius: 10,
652
186
  padding: "12px 16px 10px"
653
- }, children: /* @__PURE__ */ u("div", { style: { position: "relative" }, children: [
654
- /* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center", marginBottom: 6, height: 16 }, children: [
655
- /* @__PURE__ */ t("div", { style: { width: "5rem", flexShrink: 0 } }),
656
- /* @__PURE__ */ t("div", { style: { position: "relative", flex: 1 }, children: m.map((r) => {
657
- const p = o > 0 ? r / o * 100 : 0;
658
- return /* @__PURE__ */ t(
187
+ }, children: /* @__PURE__ */ o("div", { style: { position: "relative" }, children: [
188
+ /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", marginBottom: 6, height: 16 }, children: [
189
+ /* @__PURE__ */ r("div", { style: { width: "5rem", flexShrink: 0 } }),
190
+ /* @__PURE__ */ r("div", { style: { position: "relative", flex: 1 }, children: l.map((t) => {
191
+ const i = a > 0 ? t / a * 100 : 0;
192
+ return /* @__PURE__ */ r(
659
193
  "div",
660
194
  {
661
195
  style: {
662
196
  position: "absolute",
663
197
  fontSize: "var(--text-xs, 10px)",
664
198
  color: "var(--text-faint, rgba(30,33,37,0.36))",
665
- left: `${p}%`,
199
+ left: `${i}%`,
666
200
  transform: "translateX(-50%)",
667
201
  fontFamily: "var(--font-mono, monospace)",
668
202
  whiteSpace: "nowrap"
669
203
  },
670
- children: c(r)
204
+ children: n(t)
671
205
  },
672
- r
206
+ t
673
207
  );
674
208
  }) })
675
209
  ] }),
676
- /* @__PURE__ */ t(
210
+ /* @__PURE__ */ r(
677
211
  "div",
678
212
  {
679
213
  style: {
@@ -685,29 +219,29 @@ function tt({
685
219
  width: "calc(100% - 5rem)",
686
220
  zIndex: 20
687
221
  },
688
- children: m.map((r) => {
689
- const p = o > 0 ? r / o * 100 : 0;
690
- return /* @__PURE__ */ t(
222
+ children: l.map((t) => {
223
+ const i = a > 0 ? t / a * 100 : 0;
224
+ return /* @__PURE__ */ r(
691
225
  "div",
692
226
  {
693
227
  style: {
694
228
  position: "absolute",
695
229
  top: 0,
696
230
  bottom: 0,
697
- left: `${p}%`,
231
+ left: `${i}%`,
698
232
  borderLeft: "1px dashed var(--border, rgba(52,58,64,0.12))",
699
233
  transform: "translateX(-1px)"
700
234
  }
701
235
  },
702
- r
236
+ t
703
237
  );
704
238
  })
705
239
  }
706
240
  ),
707
- /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 10, marginTop: 8 }, children: v.map((r) => {
708
- const p = r.key === "system" || r.label === "System";
709
- return /* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center" }, children: [
710
- /* @__PURE__ */ t(
241
+ /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: 10, marginTop: 8 }, children: B.map((t) => {
242
+ const i = t.key === "system" || t.label === "System";
243
+ return /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center" }, children: [
244
+ /* @__PURE__ */ r(
711
245
  "div",
712
246
  {
713
247
  style: {
@@ -719,10 +253,10 @@ function tt({
719
253
  fontFamily: "var(--font-sans, system-ui, sans-serif)",
720
254
  paddingRight: 8
721
255
  },
722
- children: r.label
256
+ children: t.label
723
257
  }
724
258
  ),
725
- /* @__PURE__ */ t(
259
+ /* @__PURE__ */ r(
726
260
  "div",
727
261
  {
728
262
  style: {
@@ -733,54 +267,54 @@ function tt({
733
267
  backgroundColor: "var(--paper-secondary, rgba(244,241,230,0.6))",
734
268
  border: "1px solid var(--border-subtle, rgba(52,58,64,0.08))"
735
269
  },
736
- children: r.segments.map((a, I) => {
737
- let z = o > 0 ? a.startTime / o * 100 : 0, L = o > 0 ? (a.endTime - a.startTime) / o * 100 : 0;
738
- z = Math.max(0, Math.min(100, z)), z + L > 100 && (L = 100 - z), L = Math.max(0, L);
739
- const N = a.endTime - a.startTime;
740
- return p && N <= 5 ? /* @__PURE__ */ t(
270
+ children: t.segments.map((e, c) => {
271
+ let s = a > 0 ? e.startTime / a * 100 : 0, p = a > 0 ? (e.endTime - e.startTime) / a * 100 : 0;
272
+ s = Math.max(0, Math.min(100, s)), s + p > 100 && (p = 100 - s), p = Math.max(0, p);
273
+ const W = e.endTime - e.startTime;
274
+ return i && W <= 5 ? /* @__PURE__ */ r(
741
275
  "div",
742
276
  {
743
277
  style: {
744
278
  position: "absolute",
745
279
  cursor: "pointer",
746
- left: `${z}%`,
280
+ left: `${s}%`,
747
281
  top: "50%",
748
282
  transform: "translateY(-50%)",
749
283
  width: 10,
750
284
  height: 10,
751
285
  borderRadius: "50%",
752
- backgroundColor: r.color,
286
+ backgroundColor: t.color,
753
287
  opacity: 0.85
754
288
  },
755
- title: `${r.label}: ${c(a.startTime)}-${c(a.endTime)}`
289
+ title: `${t.label}: ${n(e.startTime)}-${n(e.endTime)}`
756
290
  },
757
- I
758
- ) : /* @__PURE__ */ t(
291
+ c
292
+ ) : /* @__PURE__ */ r(
759
293
  "div",
760
294
  {
761
295
  style: {
762
296
  position: "absolute",
763
297
  top: 0,
764
298
  bottom: 0,
765
- left: `${z}%`,
766
- width: `${Math.max(L, 0.7)}%`,
767
- maxWidth: `${100 - z}%`,
768
- backgroundColor: r.color,
299
+ left: `${s}%`,
300
+ width: `${Math.max(p, 0.7)}%`,
301
+ maxWidth: `${100 - s}%`,
302
+ backgroundColor: t.color,
769
303
  opacity: 0.85,
770
304
  borderRadius: 2,
771
305
  cursor: "pointer",
772
306
  transition: "opacity 0.15s"
773
307
  },
774
- title: `${r.label}: ${c(a.startTime)}-${c(a.endTime)}`
308
+ title: `${t.label}: ${n(e.startTime)}-${n(e.endTime)}`
775
309
  },
776
- I
310
+ c
777
311
  );
778
312
  })
779
313
  }
780
314
  )
781
- ] }, r.key);
315
+ ] }, t.key);
782
316
  }) }),
783
- /* @__PURE__ */ t(
317
+ /* @__PURE__ */ r(
784
318
  "div",
785
319
  {
786
320
  style: {
@@ -793,16 +327,16 @@ function tt({
793
327
  backgroundColor: "var(--rail-discovery, #5E88B0)",
794
328
  opacity: 0.55,
795
329
  boxShadow: "0 0 0 1px rgba(94,136,176,0.10)",
796
- left: d,
330
+ left: z,
797
331
  transform: "translateX(-50%)"
798
332
  }
799
333
  }
800
334
  ),
801
- b ? /* @__PURE__ */ t(
335
+ f ? /* @__PURE__ */ r(
802
336
  "button",
803
337
  {
804
338
  type: "button",
805
- onClick: M,
339
+ onClick: R,
806
340
  style: {
807
341
  position: "absolute",
808
342
  cursor: "pointer",
@@ -825,8 +359,6 @@ function tt({
825
359
  ] });
826
360
  }
827
361
  export {
828
- O as C,
829
- U as T,
830
- tt as a
362
+ J as T
831
363
  };
832
364
  //# sourceMappingURL=Timeline.es.js.map