chordia-ui 3.4.3 → 3.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- import { jsxs as i, jsx as r, Fragment as Ge } from "react/jsx-runtime";
2
- import { forwardRef as Ee, useRef as P, useState as f, useCallback as re, useEffect as oe, useImperativeHandle as We } from "react";
3
- import { FileSignal as Me, RotateCcw as ze, Pause as He, Play as Ae, RotateCw as Pe, ChevronDown as $e, AudioLines as ie, PauseCircle as Be, PlayCircle as je } from "lucide-react";
4
- function $(p) {
5
- const d = Math.floor(p / 60), g = Math.round(p % 60);
6
- return `${d}:${g.toString().padStart(2, "0")}`;
1
+ import { jsxs as i, jsx as o, Fragment as Ee } from "react/jsx-runtime";
2
+ import { forwardRef as Ge, useRef as P, useState as f, useCallback as te, useEffect as ne, useImperativeHandle as We } from "react";
3
+ import { FileSignal as Me, RotateCcw as ze, Pause as He, Play as Ae, RotateCw as Pe, ChevronDown as $e, AudioLines as oe, PauseCircle as Be, PlayCircle as je } from "lucide-react";
4
+ function re(g) {
5
+ const d = Math.floor(g / 60), p = Math.round(g % 60);
6
+ return `${d}:${p.toString().padStart(2, "0")}`;
7
7
  }
8
8
  const Le = {
9
9
  Agent: [
@@ -29,64 +29,64 @@ const Le = {
29
29
  { speaker: "Customer", type: "customer", time: "00:20", text: "I'm doing really good. Hey. I brought my vans in last week, and I call it a beeping van, the one that beeps when you back up. Makes the crunchy noise. So I just took it on Saturday after, I think I had the, the Miles. I picked it up on Saturday morning, and I went to an event. So So I don't know if it's the tire or something, but makes it a little crunchy noise. Sometimes when I do the brake, but only if I turn the wheel too." },
30
30
  { speaker: "Agent", type: "agent", time: "00:21", text: "Oh, interesting. Okay. Can you swing by with it one of these days?" }
31
31
  ], _e = [1, 1.25, 1.5, 2];
32
- function ae(p) {
33
- if (!p)
32
+ function ie(g) {
33
+ if (!g)
34
34
  return 0;
35
- const d = p.split(":").map(Number);
35
+ const d = g.split(":").map(Number);
36
36
  return (d[0] || 0) * 60 + (d[1] || 0);
37
37
  }
38
- const Ke = Ee(function({
38
+ const Ke = Ge(function({
39
39
  audioUrl: d,
40
- timelineSegments: g = [],
40
+ timelineSegments: p = [],
41
41
  durationSeconds: R = 0,
42
42
  // Parent-managed audio props (optional — if not provided, component manages its own audio)
43
- currentTimeSeconds: se,
44
- timelinePlaying: B,
45
- playbackRate: le,
46
- onSeek: j,
47
- onTogglePlay: w,
48
- onSeekBack: L,
49
- onSeekForward: _,
50
- onSetPlaybackRate: X,
51
- audioRef: Y,
43
+ currentTimeSeconds: ae,
44
+ timelinePlaying: $,
45
+ playbackRate: se,
46
+ onSeek: B,
47
+ onTogglePlay: S,
48
+ onSeekBack: j,
49
+ onSeekForward: L,
50
+ onSetPlaybackRate: _,
51
+ audioRef: X,
52
52
  // Speaker names
53
53
  agentName: T = "Agent",
54
- customerName: G = "Customer",
54
+ customerName: E = "Customer",
55
55
  // Transcript props
56
56
  transcript: y,
57
- highlightedTurns: ce = /* @__PURE__ */ new Set(),
58
- activeTurnIndex: q,
59
- activeDemoIndex: de = 1,
60
- turnObservations: he = {},
61
- setExpandedSignals: E,
62
- onTurnPlayPause: K
57
+ highlightedTurns: le = /* @__PURE__ */ new Set(),
58
+ activeTurnIndex: Y,
59
+ activeDemoIndex: ce = 1,
60
+ turnObservations: de = {},
61
+ setExpandedSignals: G,
62
+ onTurnPlayPause: q
63
63
  }, ue) {
64
- var ne;
65
- const V = P(null), h = P(null), k = P(null), [Z, m] = f(!1), [W, J] = f(0), [fe, pe] = f(0), [ge, ye] = f(1), [I, me] = f(null), [ve, be] = f(1), [ke, C] = f(!1), [xe, N] = f(!1), [Q, M] = f(de), s = !!Y, x = !d, l = d && !s, F = x ? ke : s ? B ?? !1 : Z, Fe = x ? I ?? 0 : s ? se ?? 0 : W, z = x ? ve : s ? le ?? 1 : ge, H = x ? R || 156 : s ? R : fe || R || 0, A = re(() => {
64
+ var ee;
65
+ const K = P(null), u = P(null), k = P(null), [V, m] = f(!1), [W, Z] = f(0), [he, fe] = f(0), [ge, pe] = f(1), [w, ye] = f(null), [me, ve] = f(1), [be, I] = f(!1), [ke, J] = f(!1), [N, M] = f(ce), s = !!X, x = !d, l = d && !s, F = x ? be : s ? $ ?? !1 : V, xe = x ? w ?? 0 : s ? ae ?? 0 : W, z = x ? me : s ? se ?? 1 : ge, H = x ? R || 156 : s ? R : he || R || 0, A = te(() => {
66
66
  const e = () => {
67
- const t = h.current;
68
- t && J(t.currentTime), k.current = requestAnimationFrame(e);
67
+ const t = u.current;
68
+ t && Z(t.currentTime), k.current = requestAnimationFrame(e);
69
69
  };
70
70
  k.current = requestAnimationFrame(e);
71
- }, []), v = re(() => {
71
+ }, []), v = te(() => {
72
72
  k.current && (cancelAnimationFrame(k.current), k.current = null);
73
73
  }, []);
74
- oe(() => () => v(), [v]), oe(() => {
74
+ ne(() => () => v(), [v]), ne(() => {
75
75
  if (!l)
76
76
  return;
77
- const e = h.current;
77
+ const e = u.current;
78
78
  if (!e)
79
79
  return;
80
- const t = () => pe(e.duration || 0), n = () => {
80
+ const t = () => fe(e.duration || 0), n = () => {
81
81
  m(!1), v();
82
82
  };
83
83
  return e.addEventListener("loadedmetadata", t), e.addEventListener("ended", n), () => {
84
84
  e.removeEventListener("loadedmetadata", t), e.removeEventListener("ended", n);
85
85
  };
86
86
  }, [l, v]);
87
- const O = (e) => {
87
+ const Q = (e) => {
88
88
  for (let t = D.length - 1; t >= 0; t--) {
89
- const n = ae(D[t].time);
89
+ const n = ie(D[t].time);
90
90
  if (e >= n)
91
91
  return t;
92
92
  }
@@ -94,101 +94,101 @@ const Ke = Ee(function({
94
94
  }, b = (e) => {
95
95
  const n = Math.max(0, Math.min(e, H || 156));
96
96
  if (l) {
97
- const o = h.current;
98
- o && (o.currentTime = n), J(n);
97
+ const r = u.current;
98
+ r && (r.currentTime = n), Z(n);
99
99
  } else
100
- s && j && j(n);
101
- me(n), M(O(n));
102
- }, Se = () => {
100
+ s && B && B(n);
101
+ ye(n), M(Q(n));
102
+ }, Fe = () => {
103
103
  if (l) {
104
- const e = h.current;
104
+ const e = u.current;
105
105
  if (!e)
106
106
  return;
107
- Z ? (e.pause(), v(), m(!1)) : e.play().then(() => {
107
+ V ? (e.pause(), v(), m(!1)) : e.play().then(() => {
108
108
  m(!0), A();
109
109
  }).catch(() => {
110
110
  });
111
111
  } else
112
- s && w ? w() : C((e) => !e);
112
+ s && S ? S() : I((e) => !e);
113
+ }, Se = () => {
114
+ s && j ? j() : b(Math.max(0, (l ? W : w ?? 0) - 10));
113
115
  }, we = () => {
114
- s && L ? L() : b(Math.max(0, (l ? W : I ?? 0) - 10));
115
- }, Ie = () => {
116
- s && _ ? _() : b(Math.min(H || 156, (l ? W : I ?? 0) + 10));
117
- }, Ce = (e) => {
116
+ s && L ? L() : b(Math.min(H || 156, (l ? W : w ?? 0) + 10));
117
+ }, Ie = (e) => {
118
118
  if (l) {
119
- const t = h.current;
120
- t && (t.playbackRate = e), ye(e);
119
+ const t = u.current;
120
+ t && (t.playbackRate = e), pe(e);
121
121
  } else
122
- s && X && X(e);
123
- be(e), N(!1);
122
+ s && _ && _(e);
123
+ ve(e), J(!1);
124
124
  };
125
125
  We(ue, () => ({
126
126
  seekTo: (e) => {
127
127
  if (b(e), s)
128
- !B && w && w();
128
+ !$ && S && S();
129
129
  else if (l) {
130
- const n = h.current;
130
+ const n = u.current;
131
131
  n && n.play().then(() => {
132
132
  m(!0), A();
133
133
  }).catch(() => {
134
134
  });
135
135
  } else
136
- C(!0);
137
- const t = O(e);
136
+ I(!0);
137
+ const t = Q(e);
138
138
  M(t), setTimeout(() => {
139
- var o;
140
- const n = (o = V.current) == null ? void 0 : o.children;
139
+ var r;
140
+ const n = (r = K.current) == null ? void 0 : r.children;
141
141
  n != null && n[t] && n[t].scrollIntoView({ behavior: "smooth", block: "nearest" });
142
142
  }, 50);
143
143
  }
144
144
  }));
145
- const De = (e) => {
145
+ const Ce = (e) => {
146
146
  var t;
147
- if (Q === e && F) {
147
+ if (N === e && F) {
148
148
  if (l) {
149
- const n = h.current;
149
+ const n = u.current;
150
150
  n && n.pause(), v(), m(!1);
151
151
  }
152
- C(!1);
152
+ I(!1);
153
153
  } else {
154
- const n = ae((t = D[e]) == null ? void 0 : t.time);
154
+ const n = ie((t = D[e]) == null ? void 0 : t.time);
155
155
  if (M(e), b(n), l) {
156
- const o = h.current;
157
- o && (o.currentTime = n, o.play().then(() => {
156
+ const r = u.current;
157
+ r && (r.currentTime = n, r.play().then(() => {
158
158
  m(!0), A();
159
159
  }).catch(() => {
160
160
  }));
161
161
  }
162
- C(!0);
162
+ I(!0);
163
163
  }
164
- }, Re = (e, t) => {
164
+ }, De = (e, t) => {
165
165
  if (e == null)
166
166
  return;
167
- const n = (o) => {
168
- const a = Math.floor(o / 6e4), c = Math.floor(o % 6e4 / 1e3);
167
+ const n = (r) => {
168
+ const a = Math.floor(r / 6e4), c = Math.floor(r % 6e4 / 1e3);
169
169
  return `${a.toString().padStart(2, "0")}:${c.toString().padStart(2, "0")}`;
170
170
  };
171
171
  return `${n(e)}–${t != null ? n(t) : n(e)}`;
172
- }, U = (ne = y == null ? void 0 : y.messages) != null && ne.length ? y.messages.map((e, t) => {
173
- var n, o;
172
+ }, O = (ee = y == null ? void 0 : y.messages) != null && ee.length ? y.messages.map((e, t) => {
173
+ var n, r;
174
174
  return {
175
- actor: e.actor === "agent" ? ((n = y.actor_map) == null ? void 0 : n.agent) || "Agent" : ((o = y.actor_map) == null ? void 0 : o.customer) || "Customer",
175
+ actor: e.actor === "agent" ? ((n = y.actor_map) == null ? void 0 : n.agent) || "Agent" : ((r = y.actor_map) == null ? void 0 : r.customer) || "Customer",
176
176
  actorType: e.actor === "agent" ? "agent" : "customer",
177
177
  text: e.text || "",
178
- timeRange: Re(e.start ?? e.start_ms, e.end ?? e.end_ms),
179
- isHighlighted: ce.has(t),
180
- highlightColor: F && q === t ? e.actor === "agent" ? "var(--rail-outcome)" : "var(--rail-discovery)" : void 0,
181
- observations: (he[t] || []).map((a) => ({
178
+ timeRange: De(e.start ?? e.start_ms, e.end ?? e.end_ms),
179
+ isHighlighted: le.has(t),
180
+ highlightColor: F && Y === t ? e.actor === "agent" ? "var(--rail-outcome)" : "var(--rail-discovery)" : void 0,
181
+ observations: (de[t] || []).map((a) => ({
182
182
  ...a,
183
183
  onClick: () => {
184
- E == null || E((c) => /* @__PURE__ */ new Set([...c, a.signalKey])), setTimeout(() => {
184
+ G == null || G((c) => /* @__PURE__ */ new Set([...c, a.signalKey])), setTimeout(() => {
185
185
  const c = document.getElementById(`signal-${a.signalKey}`);
186
186
  c && c.scrollIntoView({ behavior: "smooth", block: "nearest" });
187
187
  }, 100);
188
188
  }
189
189
  }))
190
190
  };
191
- }) : null, ee = x ? I ?? 0 : Fe, u = H || 156, S = u > 0 ? ee / u * 100 : 0, te = Math.round(ee);
191
+ }) : null, U = x ? w ?? 0 : xe, h = H || 156, C = h > 0 ? U / h * 100 : 0, Re = Math.round(U);
192
192
  return /* @__PURE__ */ i("div", { style: {
193
193
  display: "flex",
194
194
  flexDirection: "column",
@@ -200,7 +200,7 @@ const Ke = Ee(function({
200
200
  gap: 16,
201
201
  width: "100%"
202
202
  }, children: [
203
- /* @__PURE__ */ r("div", { style: {
203
+ /* @__PURE__ */ o("div", { style: {
204
204
  display: "flex",
205
205
  alignItems: "center",
206
206
  justifyContent: "center",
@@ -209,8 +209,8 @@ const Ke = Ee(function({
209
209
  borderRadius: 9999,
210
210
  background: "var(--surface-hover, #F3F7F7)",
211
211
  flexShrink: 0
212
- }, children: /* @__PURE__ */ r(Me, { size: 20, color: "#2E3236", strokeWidth: 1.5 }) }),
213
- /* @__PURE__ */ r("span", { style: {
212
+ }, children: /* @__PURE__ */ o(Me, { size: 20, color: "#2E3236", strokeWidth: 1.5 }) }),
213
+ /* @__PURE__ */ o("span", { style: {
214
214
  fontSize: 15,
215
215
  fontWeight: 500,
216
216
  color: "var(--Grey-Strong, #2E3236)"
@@ -236,12 +236,12 @@ const Ke = Ee(function({
236
236
  }, children: [
237
237
  T,
238
238
  " / ",
239
- G
239
+ E
240
240
  ] }),
241
241
  /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
242
- /* @__PURE__ */ r("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Muted, #808183)", lineHeight: 1.2 }, children: "10" }),
243
- /* @__PURE__ */ r("button", { onClick: we, style: { background: "none", border: "none", cursor: "pointer", padding: 0, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ r(ze, { size: 20, color: "#808183", strokeWidth: 1.5 }) }),
244
- /* @__PURE__ */ r("button", { onClick: Se, style: {
242
+ /* @__PURE__ */ o("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Muted, #808183)", lineHeight: 1.2 }, children: "10" }),
243
+ /* @__PURE__ */ o("button", { onClick: Se, style: { background: "none", border: "none", cursor: "pointer", padding: 0, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ o(ze, { size: 20, color: "#808183", strokeWidth: 1.5 }) }),
244
+ /* @__PURE__ */ o("button", { onClick: Fe, style: {
245
245
  background: "var(--Grey-Strong, #2E3236)",
246
246
  border: "none",
247
247
  cursor: "pointer",
@@ -252,15 +252,15 @@ const Ke = Ee(function({
252
252
  display: "flex",
253
253
  alignItems: "center",
254
254
  justifyContent: "center"
255
- }, children: F ? /* @__PURE__ */ r(He, { size: 14, color: "#FFF", fill: "#FFF" }) : /* @__PURE__ */ r(Ae, { size: 14, color: "#FFF", fill: "#FFF", strokeWidth: 1.5, style: { marginLeft: 2 } }) }),
256
- /* @__PURE__ */ r("button", { onClick: Ie, style: { background: "none", border: "none", cursor: "pointer", padding: 0, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ r(Pe, { size: 20, color: "#808183", strokeWidth: 1.5 }) }),
257
- /* @__PURE__ */ r("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Muted, #808183)", lineHeight: 1.2 }, children: "10" })
255
+ }, children: F ? /* @__PURE__ */ o(He, { size: 14, color: "#FFF", fill: "#FFF" }) : /* @__PURE__ */ o(Ae, { size: 14, color: "#FFF", fill: "#FFF", strokeWidth: 1.5, style: { marginLeft: 2 } }) }),
256
+ /* @__PURE__ */ o("button", { onClick: we, style: { background: "none", border: "none", cursor: "pointer", padding: 0, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ o(Pe, { size: 20, color: "#808183", strokeWidth: 1.5 }) }),
257
+ /* @__PURE__ */ o("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Muted, #808183)", lineHeight: 1.2 }, children: "10" })
258
258
  ] }),
259
259
  /* @__PURE__ */ i("div", { style: { position: "relative" }, children: [
260
260
  /* @__PURE__ */ i(
261
261
  "button",
262
262
  {
263
- onClick: () => N((e) => !e),
263
+ onClick: () => J((e) => !e),
264
264
  style: {
265
265
  background: "var(--Grey-White, #FFF)",
266
266
  border: "1px solid var(--Grey-absent, #D9D9D9)",
@@ -282,11 +282,11 @@ const Ke = Ee(function({
282
282
  children: [
283
283
  z,
284
284
  "x",
285
- /* @__PURE__ */ r($e, { size: 12, color: "#808183" })
285
+ /* @__PURE__ */ o($e, { size: 12, color: "#808183" })
286
286
  ]
287
287
  }
288
288
  ),
289
- xe && /* @__PURE__ */ r("div", { style: {
289
+ ke && /* @__PURE__ */ o("div", { style: {
290
290
  position: "absolute",
291
291
  top: "100%",
292
292
  right: 0,
@@ -301,7 +301,7 @@ const Ke = Ee(function({
301
301
  }, children: _e.map((e) => /* @__PURE__ */ i(
302
302
  "button",
303
303
  {
304
- onClick: () => Ce(e),
304
+ onClick: () => Ie(e),
305
305
  style: {
306
306
  display: "block",
307
307
  width: "100%",
@@ -326,20 +326,20 @@ const Ke = Ee(function({
326
326
  ] }),
327
327
  /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
328
328
  /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
329
- /* @__PURE__ */ r("span", { style: {
329
+ /* @__PURE__ */ o("span", { style: {
330
330
  fontSize: 13,
331
- fontWeight: 600,
332
- color: S > 0 ? "var(--Green-Primary, #00925F)" : "var(--Grey-Strong, #2E3236)",
331
+ fontWeight: 500,
332
+ color: "var(--Grey-Strong, #2E3236)",
333
333
  fontFamily: "var(--font-sans)",
334
334
  lineHeight: 1.2,
335
335
  minWidth: 60
336
- }, children: $(te) }),
336
+ }, children: re(h) }),
337
337
  /* @__PURE__ */ i(
338
338
  "div",
339
339
  {
340
340
  onClick: (e) => {
341
- const t = e.currentTarget.getBoundingClientRect(), n = e.clientX - t.left, o = Math.max(0, Math.min(1, n / t.width));
342
- b(o * u);
341
+ const t = e.currentTarget.getBoundingClientRect(), n = e.clientX - t.left, r = Math.max(0, Math.min(1, n / t.width));
342
+ b(r * h);
343
343
  },
344
344
  style: {
345
345
  flex: 1,
@@ -350,7 +350,7 @@ const Ke = Ee(function({
350
350
  cursor: "pointer"
351
351
  },
352
352
  children: [
353
- /* @__PURE__ */ r("div", { style: {
353
+ /* @__PURE__ */ o("div", { style: {
354
354
  position: "absolute",
355
355
  left: 0,
356
356
  right: 0,
@@ -359,18 +359,18 @@ const Ke = Ee(function({
359
359
  background: "var(--rail-surface-2, #E3E1D7)",
360
360
  pointerEvents: "none"
361
361
  } }),
362
- /* @__PURE__ */ r("div", { style: {
362
+ /* @__PURE__ */ o("div", { style: {
363
363
  position: "absolute",
364
364
  left: 0,
365
365
  top: "50%",
366
366
  transform: "translateY(-50%)",
367
- width: `${S}%`,
367
+ width: `${C}%`,
368
368
  height: 4,
369
369
  borderRadius: 2,
370
370
  background: "var(--Green-Primary, #00925F)",
371
371
  pointerEvents: "none"
372
372
  } }),
373
- /* @__PURE__ */ r(
373
+ /* @__PURE__ */ o(
374
374
  "svg",
375
375
  {
376
376
  width: "16",
@@ -380,12 +380,12 @@ const Ke = Ee(function({
380
380
  xmlns: "http://www.w3.org/2000/svg",
381
381
  style: {
382
382
  position: "absolute",
383
- left: `${S}%`,
383
+ left: `${C}%`,
384
384
  top: "50%",
385
385
  transform: "translate(-50%, -50%)",
386
386
  pointerEvents: "none"
387
387
  },
388
- children: /* @__PURE__ */ r(
388
+ children: /* @__PURE__ */ o(
389
389
  "path",
390
390
  {
391
391
  d: "M7.875 1C11.6572 1 14.75 4.1191 14.75 8C14.75 11.8809 11.6572 15 7.875 15C4.09284 15 1 11.8809 1 8C1 4.1191 4.09284 1 7.875 1Z",
@@ -395,26 +395,16 @@ const Ke = Ee(function({
395
395
  }
396
396
  )
397
397
  }
398
- ),
399
- /* @__PURE__ */ r("span", { style: {
400
- position: "absolute",
401
- right: -48,
402
- fontSize: 13,
403
- fontWeight: 400,
404
- color: "var(--Grey-Muted, #808183)",
405
- fontFamily: "var(--font-sans)",
406
- lineHeight: 1.2,
407
- whiteSpace: "nowrap"
408
- }, children: $(u) })
398
+ )
409
399
  ]
410
400
  }
411
401
  )
412
402
  ] }),
413
403
  /* @__PURE__ */ i("div", { style: { position: "relative", paddingBottom: 30, cursor: "pointer" }, children: [
414
- [T, G].map((e, t) => {
415
- const n = t === 0, o = g != null && g.length ? g.filter((a) => n ? a.actor === T : a.actor === G).map((a) => ({
416
- start: u > 0 ? a.startTime / u : 0,
417
- end: u > 0 ? a.endTime / u : 0
404
+ [T, E].map((e, t) => {
405
+ const n = t === 0, r = p != null && p.length ? p.filter((a) => n ? a.actor === T : a.actor === E).map((a) => ({
406
+ start: h > 0 ? a.startTime / h : 0,
407
+ end: h > 0 ? a.endTime / h : 0
418
408
  })) : Le[n ? "Agent" : "Customer"] || [];
419
409
  return /* @__PURE__ */ i("div", { style: {
420
410
  display: "flex",
@@ -423,7 +413,7 @@ const Ke = Ee(function({
423
413
  height: 20,
424
414
  marginBottom: t === 0 ? 4 : 0
425
415
  }, children: [
426
- /* @__PURE__ */ r("span", { style: {
416
+ /* @__PURE__ */ o("span", { style: {
427
417
  fontSize: 13,
428
418
  fontWeight: 400,
429
419
  color: "var(--Grey-Muted, #808183)",
@@ -436,7 +426,7 @@ const Ke = Ee(function({
436
426
  {
437
427
  onClick: (a) => {
438
428
  const c = a.currentTarget.getBoundingClientRect(), Te = Math.max(0, Math.min(1, (a.clientX - c.left) / c.width));
439
- b(Te * u);
429
+ b(Te * h);
440
430
  },
441
431
  style: {
442
432
  flex: 1,
@@ -446,7 +436,7 @@ const Ke = Ee(function({
446
436
  cursor: "pointer"
447
437
  },
448
438
  children: [
449
- /* @__PURE__ */ r("div", { style: {
439
+ /* @__PURE__ */ o("div", { style: {
450
440
  position: "absolute",
451
441
  left: 0,
452
442
  right: 0,
@@ -456,7 +446,7 @@ const Ke = Ee(function({
456
446
  borderRadius: 2,
457
447
  background: "var(--rail-surface-2, #E3E1D7)"
458
448
  } }),
459
- o.map((a, c) => /* @__PURE__ */ r("div", { style: {
449
+ r.map((a, c) => /* @__PURE__ */ o("div", { style: {
460
450
  position: "absolute",
461
451
  left: `${a.start * 100}%`,
462
452
  width: `${(a.end - a.start) * 100}%`,
@@ -479,18 +469,18 @@ const Ke = Ee(function({
479
469
  bottom: 0,
480
470
  pointerEvents: "none"
481
471
  }, children: [
482
- /* @__PURE__ */ r("div", { style: {
472
+ /* @__PURE__ */ o("div", { style: {
483
473
  position: "absolute",
484
- left: `${S}%`,
474
+ left: `${C}%`,
485
475
  top: 0,
486
476
  height: 44,
487
477
  transform: "translateX(-50%)",
488
478
  borderLeft: "1.5px dashed var(--Grey-Muted, #808183)",
489
479
  opacity: 0.5
490
480
  } }),
491
- /* @__PURE__ */ r("div", { style: {
481
+ /* @__PURE__ */ o("div", { style: {
492
482
  position: "absolute",
493
- left: `${S}%`,
483
+ left: `${C}%`,
494
484
  bottom: 0,
495
485
  transform: "translateX(-50%)",
496
486
  background: "var(--Grey-Strong, #2E3236)",
@@ -501,11 +491,11 @@ const Ke = Ee(function({
501
491
  padding: "4px 6px",
502
492
  borderRadius: 4,
503
493
  whiteSpace: "nowrap"
504
- }, children: $(te) })
494
+ }, children: re(Re) })
505
495
  ] })
506
496
  ] }),
507
- l && /* @__PURE__ */ r("audio", { ref: h, preload: "auto", style: { display: "none" }, children: /* @__PURE__ */ r("source", { src: d, type: "audio/mpeg" }) }),
508
- s && d && /* @__PURE__ */ r("audio", { ref: Y, preload: "auto", style: { display: "none" }, children: /* @__PURE__ */ r("source", { src: d, type: "audio/mpeg" }) })
497
+ l && /* @__PURE__ */ o("audio", { ref: u, preload: "auto", style: { display: "none" }, children: /* @__PURE__ */ o("source", { src: d, type: "audio/mpeg" }) }),
498
+ s && d && /* @__PURE__ */ o("audio", { ref: X, preload: "auto", style: { display: "none" }, children: /* @__PURE__ */ o("source", { src: d, type: "audio/mpeg" }) })
509
499
  ] })
510
500
  ] }),
511
501
  /* @__PURE__ */ i("div", { style: {
@@ -514,27 +504,27 @@ const Ke = Ee(function({
514
504
  flexDirection: "column",
515
505
  gap: 16
516
506
  }, children: [
517
- /* @__PURE__ */ r("div", { style: {
507
+ /* @__PURE__ */ o("div", { style: {
518
508
  borderBottom: "1px solid var(--Grey-absent, #D9D9D9)",
519
509
  paddingBottom: 16
520
- }, children: /* @__PURE__ */ r("span", { style: {
510
+ }, children: /* @__PURE__ */ o("span", { style: {
521
511
  fontSize: 14,
522
512
  fontWeight: 400,
523
513
  color: "var(--Grey-Strong, #2E3236)",
524
514
  lineHeight: 1.2
525
515
  }, children: "Transcript" }) }),
526
- /* @__PURE__ */ r("div", { id: "transcript-container", ref: V, style: {
516
+ /* @__PURE__ */ o("div", { id: "transcript-container", ref: K, style: {
527
517
  display: "flex",
528
518
  flexDirection: "column",
529
519
  maxHeight: 600,
530
520
  overflowY: "auto"
531
- }, children: (U || D.map((e) => ({
521
+ }, children: (O || D.map((e) => ({
532
522
  actor: e.speaker,
533
523
  actorType: e.type,
534
524
  text: e.text,
535
525
  timeRange: e.time
536
526
  }))).map((e, t) => {
537
- const n = !!U, o = n ? F && q === t : t === Q && F, a = (e.actorType || e.type) === "customer";
527
+ const n = !!O, r = n ? F && Y === t : t === N && F, a = (e.actorType || e.type) === "customer";
538
528
  return /* @__PURE__ */ i("div", { style: {
539
529
  display: "flex",
540
530
  padding: 16,
@@ -543,7 +533,7 @@ const Ke = Ee(function({
543
533
  gap: 16,
544
534
  alignSelf: "stretch",
545
535
  borderTop: t > 0 ? "1px solid var(--Grey-absent, #D9D9D9)" : "none",
546
- background: o ? "var(--surface-hover, #F3F7F7)" : "var(--Grey-White, #FFF)"
536
+ background: r ? "var(--surface-hover, #F3F7F7)" : "var(--Grey-White, #FFF)"
547
537
  }, children: [
548
538
  /* @__PURE__ */ i("div", { style: {
549
539
  display: "flex",
@@ -552,18 +542,18 @@ const Ke = Ee(function({
552
542
  width: "100%",
553
543
  gap: 8
554
544
  }, children: [
555
- /* @__PURE__ */ r("span", { style: {
545
+ /* @__PURE__ */ o("span", { style: {
556
546
  fontSize: 14,
557
547
  fontWeight: 600,
558
548
  lineHeight: 1.2,
559
549
  color: a ? "var(--Grey-Strong, #2E3236)" : "var(--Grey-Muted, #808183)"
560
550
  }, children: e.actor }),
561
551
  /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
562
- o && /* @__PURE__ */ i(Ge, { children: [
563
- /* @__PURE__ */ r(ie, { size: 12, color: "#2E3236" }),
564
- /* @__PURE__ */ r(ie, { size: 12, color: "#2E3236" })
552
+ r && /* @__PURE__ */ i(Ee, { children: [
553
+ /* @__PURE__ */ o(oe, { size: 12, color: "#2E3236" }),
554
+ /* @__PURE__ */ o(oe, { size: 12, color: "#2E3236" })
565
555
  ] }),
566
- /* @__PURE__ */ r("span", { style: {
556
+ /* @__PURE__ */ o("span", { style: {
567
557
  fontSize: 13,
568
558
  fontWeight: 400,
569
559
  lineHeight: 1.2,
@@ -572,11 +562,11 @@ const Ke = Ee(function({
572
562
  ] })
573
563
  ] }),
574
564
  /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "flex-start", gap: 8, width: "100%" }, children: [
575
- /* @__PURE__ */ r(
565
+ /* @__PURE__ */ o(
576
566
  "button",
577
567
  {
578
568
  onClick: () => {
579
- n && K ? K(e, t) : De(t);
569
+ n && q ? q(e, t) : Ce(t);
580
570
  },
581
571
  style: {
582
572
  background: "none",
@@ -586,10 +576,10 @@ const Ke = Ee(function({
586
576
  flexShrink: 0,
587
577
  display: "flex"
588
578
  },
589
- children: o ? /* @__PURE__ */ r(Be, { size: 17, color: "#2E3236", strokeWidth: 1.5 }) : /* @__PURE__ */ r(je, { size: 17, color: "#808183", strokeWidth: 1 })
579
+ children: r ? /* @__PURE__ */ o(Be, { size: 17, color: "#2E3236", strokeWidth: 1.5 }) : /* @__PURE__ */ o(je, { size: 17, color: "#808183", strokeWidth: 1 })
590
580
  }
591
581
  ),
592
- /* @__PURE__ */ r("p", { style: {
582
+ /* @__PURE__ */ o("p", { style: {
593
583
  fontSize: 13,
594
584
  fontWeight: 400,
595
585
  color: "var(--Grey-Strong, #2E3236)",