chordia-ui 4.0.1 → 4.0.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.
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, Fragment as Le, jsx as t } from "react/jsx-runtime";
2
2
  import Se, { useState as I, useRef as $, useEffect as Be, useMemo as We } from "react";
3
- import { u as xe } from "../useMediaQuery.es.js";
3
+ import { u as ve } from "../useMediaQuery.es.js";
4
4
  import { ShieldCheck as Jn, TrendingUp as Un, Lightbulb as en, ThumbsUp as tn, ArrowLeftRight as ei, ArrowDown as Ne, ArrowUp as Pe, ChevronUp as at, ChevronDown as je, Pencil as ti, FileSignal as nn, ScrollText as rn, PauseCircle as ln, PlayCircle as on, Info as an, MessagesSquare as Tt, Check as ni, CircleCheck as ii, Ellipsis as ri, X as At, CornerDownRight as li, Target as sn, ChevronRight as dn, AudioLines as oi, Search as ai, Pause as Rt, ArrowRightLeft as si, CircleDashed as di, MicOff as ci, ClipboardCheck as fi, ArrowLeft as rt, ArrowRight as Lt, ClipboardList as pi, CalendarDays as Bt, PhoneOutgoing as Nt, PhoneIncoming as Pt, Headset as jt, CircleUser as lt, History as gi, ExternalLink as hi, ThumbsDown as ui } from "lucide-react";
5
5
  import { U as yi } from "../UpdatedInteractionRecording.es.js";
6
6
  import { A as mi } from "../AgentLiftAnalysisCard.es.js";
@@ -159,7 +159,7 @@ const Fi = ({ data: e, loading: n, error: r }) => {
159
159
  Se.useEffect(() => {
160
160
  bi();
161
161
  }, []);
162
- const o = xe("(max-width: 900px)");
162
+ const o = ve("(max-width: 900px)");
163
163
  if (n)
164
164
  return /* @__PURE__ */ i(Le, { children: [
165
165
  /* @__PURE__ */ t("style", { children: `
@@ -373,7 +373,7 @@ const Yt = {
373
373
  // Customer Intent, Paradigm) plus a "Number" (interaction id) render inline.
374
374
  flatView: k = !1
375
375
  }) => {
376
- const [S, W] = I(!1), D = $(null), L = xe("(max-width: 640px)"), C = e.duration_seconds != null ? Wi(e.duration_seconds) : null, z = e.message_count, T = n.interaction_driver, Y = r.interaction_paradigm, N = (h) => o.find((R) => (R.key || "").toLowerCase().includes(h)), q = N("resolution_outcome"), ee = N("customer_intent"), A = N("location"), y = N("outcome_quality"), m = (h) => h ? h.replace(/_/g, " ").replace(/\b\w/g, (R) => R.toUpperCase()) : null, u = a !== "Neutral" ? a : y ? m(y.value) : a, te = f ?? (q ? m(q.value) : null), re = p ?? (ee ? m(ee.value) : null), le = b ?? (A ? m(A.value) : null), ne = Y != null ? m(Y) : null, se = new Set(["resolution_outcome", "customer_intent", "location", "outcome_quality"].map((h) => `dim.${h}`)), B = o.filter((h) => !se.has(h.key)), de = [], ge = [
376
+ const [S, W] = I(!1), D = $(null), L = ve("(max-width: 640px)"), C = e.duration_seconds != null ? Wi(e.duration_seconds) : null, z = e.message_count, T = n.interaction_driver, Y = r.interaction_paradigm, N = (h) => o.find((R) => (R.key || "").toLowerCase().includes(h)), q = N("resolution_outcome"), ee = N("customer_intent"), A = N("location"), y = N("outcome_quality"), m = (h) => h ? h.replace(/_/g, " ").replace(/\b\w/g, (R) => R.toUpperCase()) : null, u = a !== "Neutral" ? a : y ? m(y.value) : a, te = f ?? (q ? m(q.value) : null), re = p ?? (ee ? m(ee.value) : null), le = b ?? (A ? m(A.value) : null), ne = Y != null ? m(Y) : null, se = new Set(["resolution_outcome", "customer_intent", "location", "outcome_quality"].map((h) => `dim.${h}`)), B = o.filter((h) => !se.has(h.key)), xe = [], pe = [
377
377
  [
378
378
  C != null ? { label: "Duration", value: C } : null,
379
379
  z != null ? { label: "Messages", value: z } : null
@@ -385,20 +385,20 @@ const Yt = {
385
385
  ]
386
386
  ];
387
387
  for (let h = 0; h < B.length; h += 2) {
388
- const R = B[h] ? { label: B[h].display_name || B[h].label || B[h].key, value: m(B[h].value) } : null, ue = B[h + 1] ? { label: B[h + 1].display_name || B[h + 1].label || B[h + 1].key, value: m(B[h + 1].value) } : null;
389
- ge.push([R, ue]);
388
+ const R = B[h] ? { label: B[h].display_name || B[h].label || B[h].key, value: m(B[h].value) } : null, he = B[h + 1] ? { label: B[h + 1].display_name || B[h + 1].label || B[h + 1].key, value: m(B[h + 1].value) } : null;
389
+ pe.push([R, he]);
390
390
  }
391
- ge.push([
391
+ pe.push([
392
392
  { label: "Outcome Quality", value: u },
393
393
  { isMoreDetails: !0 }
394
- ]), ge.forEach((h) => de.push(h));
395
- const ce = [
394
+ ]), pe.forEach((h) => xe.push(h));
395
+ const de = [
396
396
  te != null && { label: "Resolution Outcome", value: te },
397
397
  re != null && { label: "Customer Intent", value: re },
398
398
  // resolvedLocation != null && { label: 'Location', value: resolvedLocation },
399
399
  ne != null && { label: "Paradigm", value: ne },
400
400
  ...d || []
401
- ].filter(Boolean), he = [];
401
+ ].filter(Boolean), ge = [];
402
402
  if (k) {
403
403
  const h = [
404
404
  C != null && { label: "Duration", value: C },
@@ -417,9 +417,9 @@ const Yt = {
417
417
  w != null && w !== "" && { label: "Number", value: w }
418
418
  ].filter(Boolean);
419
419
  for (let R = 0; R < h.length; R += 2)
420
- he.push([h[R], h[R + 1] || null]);
420
+ ge.push([h[R], h[R + 1] || null]);
421
421
  }
422
- const c = k ? he : de;
422
+ const c = k ? ge : xe;
423
423
  Be(() => {
424
424
  if (!S)
425
425
  return;
@@ -544,7 +544,7 @@ const Yt = {
544
544
  },
545
545
  children: [
546
546
  c.map((h, R) => {
547
- var ue;
547
+ var he;
548
548
  return /* @__PURE__ */ i(
549
549
  "div",
550
550
  {
@@ -558,13 +558,13 @@ const Yt = {
558
558
  },
559
559
  children: [
560
560
  /* @__PURE__ */ t("div", { style: Yt, children: h[0] && !h[0].isMoreDetails ? Q(h[0]) : /* @__PURE__ */ t("div", { style: { flex: 1 } }) }),
561
- /* @__PURE__ */ t("div", { style: Yt, children: h[1] && !h[1].isMoreDetails ? Q(h[1]) : (ue = h[1]) != null && ue.isMoreDetails ? Oe() : /* @__PURE__ */ t("div", { style: { flex: 1 } }) })
561
+ /* @__PURE__ */ t("div", { style: Yt, children: h[1] && !h[1].isMoreDetails ? Q(h[1]) : (he = h[1]) != null && he.isMoreDetails ? Oe() : /* @__PURE__ */ t("div", { style: { flex: 1 } }) })
562
562
  ]
563
563
  },
564
564
  R
565
565
  );
566
566
  }),
567
- !k && S && ce.length > 0 && /* @__PURE__ */ i(
567
+ !k && S && de.length > 0 && /* @__PURE__ */ i(
568
568
  "div",
569
569
  {
570
570
  style: {
@@ -594,7 +594,7 @@ const Yt = {
594
594
  borderBottom: "1px solid var(--Grey-absent, #D9D9D9)",
595
595
  alignSelf: "stretch"
596
596
  }, children: "More details" }),
597
- ce.map((h) => /* @__PURE__ */ i(
597
+ de.map((h) => /* @__PURE__ */ i(
598
598
  "div",
599
599
  {
600
600
  style: {
@@ -1069,7 +1069,7 @@ const Yt = {
1069
1069
  { label: "Communication", value: 3 }
1070
1070
  ]
1071
1071
  }) => {
1072
- const p = xe("(max-width: 640px)"), b = Number(e), w = Number.isFinite(b) ? Math.min(Math.max(b, n), r) : n, H = w.toFixed(1), g = H.endsWith(".0") ? H.slice(0, -2) : H;
1072
+ const p = ve("(max-width: 640px)"), b = Number(e), w = Number.isFinite(b) ? Math.min(Math.max(b, n), r) : n, H = w.toFixed(1), g = H.endsWith(".0") ? H.slice(0, -2) : H;
1073
1073
  return /* @__PURE__ */ i("div", { style: {
1074
1074
  display: "flex",
1075
1075
  flexDirection: "column",
@@ -1307,8 +1307,8 @@ const Yt = {
1307
1307
  onMenuClick: f,
1308
1308
  showReply: p = !0
1309
1309
  }) => {
1310
- var ce, he;
1311
- const [b, w] = I(!1), [H, g] = I(!1), [k, S] = I(!1), [W, D] = I(""), [L, C] = I(!1), [z, T] = I(""), [Y, N] = I(!1), q = $(null), ee = $(null), A = $(null), y = e.author || {}, m = y.name || e.author_name || "Unknown", u = y.initials || $e(m), te = y.role || e.author_role, re = y.color || cn(te) || "#6B7C93", le = y.avatar || e.avatar, ne = e.timestamp || e.created_at, se = Bi(ne), B = Li(ne), de = !!(e.isEdited || e.is_edited || e.edited), ge = Array.isArray(e.content) ? e.content : [e.content || e.text || ""];
1310
+ var de, ge;
1311
+ const [b, w] = I(!1), [H, g] = I(!1), [k, S] = I(!1), [W, D] = I(""), [L, C] = I(!1), [z, T] = I(""), [Y, N] = I(!1), q = $(null), ee = $(null), A = $(null), y = e.author || {}, m = y.name || e.author_name || "Unknown", u = y.initials || $e(m), te = y.role || e.author_role, re = y.color || cn(te) || "#6B7C93", le = y.avatar || e.avatar, ne = e.timestamp || e.created_at, se = Bi(ne), B = Li(ne), xe = !!(e.isEdited || e.is_edited || e.edited), pe = Array.isArray(e.content) ? e.content : [e.content || e.text || ""];
1312
1312
  return Se.useEffect(() => {
1313
1313
  if (!H)
1314
1314
  return;
@@ -1391,7 +1391,7 @@ const Yt = {
1391
1391
  children: se
1392
1392
  }
1393
1393
  ),
1394
- de && /* @__PURE__ */ t(
1394
+ xe && /* @__PURE__ */ t(
1395
1395
  "span",
1396
1396
  {
1397
1397
  style: {
@@ -1596,7 +1596,7 @@ const Yt = {
1596
1596
  children: [
1597
1597
  "“",
1598
1598
  " ",
1599
- ((ce = e.author) == null ? void 0 : ce.name) || "Unknown"
1599
+ ((de = e.author) == null ? void 0 : de.name) || "Unknown"
1600
1600
  ]
1601
1601
  }
1602
1602
  ),
@@ -1700,7 +1700,7 @@ const Yt = {
1700
1700
  }
1701
1701
  ) : (
1702
1702
  /* Message bubbles — stacked, gap: 4px, fit content */
1703
- /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 4, alignItems: "flex-start" }, children: ge.map((c, Q) => /* @__PURE__ */ t(
1703
+ /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 4, alignItems: "flex-start" }, children: pe.map((c, Q) => /* @__PURE__ */ t(
1704
1704
  "div",
1705
1705
  {
1706
1706
  style: {
@@ -1861,7 +1861,7 @@ const Yt = {
1861
1861
  children: [
1862
1862
  "“",
1863
1863
  " ",
1864
- ((he = e.author) == null ? void 0 : he.name) || "Unknown"
1864
+ ((ge = e.author) == null ? void 0 : ge.name) || "Unknown"
1865
1865
  ]
1866
1866
  }
1867
1867
  ),
@@ -2232,7 +2232,7 @@ const Yt = {
2232
2232
  replies: (y[u.id] || []).map(m)
2233
2233
  });
2234
2234
  return D.filter((u) => !u.parentId).map(m);
2235
- }, [D]), q = n ?? D.length, ee = xe("(max-width: 900px)"), A = xe("(max-width: 640px)");
2235
+ }, [D]), q = n ?? D.length, ee = ve("(max-width: 900px)"), A = ve("(max-width: 640px)");
2236
2236
  return /* @__PURE__ */ i(
2237
2237
  "div",
2238
2238
  {
@@ -3560,7 +3560,7 @@ const Yt = {
3560
3560
  ]
3561
3561
  }
3562
3562
  );
3563
- }, ve = ({ text: e, children: n }) => {
3563
+ }, me = ({ text: e, children: n }) => {
3564
3564
  const [r, o] = I(!1), a = $(null), [l, d] = I({ top: 0, left: 0 });
3565
3565
  return e ? /* @__PURE__ */ i(
3566
3566
  "div",
@@ -3668,14 +3668,14 @@ const br = ({
3668
3668
  interactionId: se,
3669
3669
  moreDetails: B,
3670
3670
  // Compass score props
3671
- compassScore: de,
3671
+ compassScore: xe,
3672
3672
  // gauge meter value — compass_score, range 0.5-5
3673
- compassMaxScore: ge = 5,
3673
+ compassMaxScore: pe = 5,
3674
3674
  // Compass score as a backend-computed percentage (0–100), shown in the
3675
3675
  // bracket next to the score, e.g. "3.5 (62.5%)". Prefer this over any local
3676
3676
  // score→percent conversion; null hides the bracket.
3677
- compassScorePct: ce = null,
3678
- predictedCsat: he,
3677
+ compassScorePct: de = null,
3678
+ predictedCsat: ge,
3679
3679
  // predicted objective number (e.g. compass_score) — shown as "03" top-right
3680
3680
  predictedLabel: c = "Predicted Objective",
3681
3681
  compassLegends: Q,
@@ -3683,12 +3683,12 @@ const br = ({
3683
3683
  customerSessions: Oe,
3684
3684
  customerSessionCount: h,
3685
3685
  onSessionClick: R,
3686
- onViewAllSessions: ue,
3686
+ onViewAllSessions: he,
3687
3687
  // Footer navigation
3688
3688
  prevSessionDesc: st,
3689
- prevSessionDisabled: fe = !1,
3689
+ prevSessionDisabled: ce = !1,
3690
3690
  nextSessionDesc: dt,
3691
- nextSessionDisabled: pe = !1,
3691
+ nextSessionDisabled: fe = !1,
3692
3692
  onPreviousSession: De,
3693
3693
  onNextSession: ze,
3694
3694
  // Comments
@@ -3722,7 +3722,7 @@ const br = ({
3722
3722
  commentsResolved: Fn
3723
3723
  }) => {
3724
3724
  var Mt;
3725
- const [Ve, Me] = I("overview"), [Wn, ft] = I(/* @__PURE__ */ new Set()), [In, Ge] = I(!1), [Dn, pt] = I(null), [gt, ht] = I(!1), [ut, zn] = I(0), [yt, Mn] = I(!1), _ = xe("(max-width: 640px)"), ye = $(null), qe = $(null), mt = $(null), He = $(null), vt = $(null), xt = $(null), bt = {
3725
+ const [Ve, Me] = I("overview"), [Wn, ft] = I(/* @__PURE__ */ new Set()), [In, Ge] = I(!1), [Dn, pt] = I(null), [gt, ht] = I(!1), [ut, zn] = I(0), [yt, Mn] = I(!1), _ = ve("(max-width: 640px)"), ue = $(null), qe = $(null), mt = $(null), He = $(null), vt = $(null), xt = $(null), bt = {
3726
3726
  overview: qe,
3727
3727
  coaching: mt,
3728
3728
  signals: He,
@@ -3807,7 +3807,7 @@ const br = ({
3807
3807
  const x = s / 1e3;
3808
3808
  setTimeout(() => {
3809
3809
  var F;
3810
- (F = ye.current) != null && F.scrollToTranscript && ye.current.scrollToTranscript(x);
3810
+ (F = ue.current) != null && F.scrollToTranscript && ue.current.scrollToTranscript(x);
3811
3811
  }, 220);
3812
3812
  }, Ct = (s) => {
3813
3813
  Me("signals");
@@ -3825,10 +3825,10 @@ const br = ({
3825
3825
  const x = (s == null ? void 0 : s.start_ms) ?? (s == null ? void 0 : s.startMs);
3826
3826
  setTimeout(() => {
3827
3827
  var F, M;
3828
- if (x != null && ((F = ye.current) != null && F.scrollToTranscript) && ye.current.scrollToTranscript(x / 1e3), A)
3828
+ if (x != null && ((F = ue.current) != null && F.scrollToTranscript) && ue.current.scrollToTranscript(x / 1e3), A)
3829
3829
  A(s);
3830
- else if (x != null && ((M = ye.current) != null && M.seekTo)) {
3831
- ye.current.seekTo(x / 1e3), ht(!0), zn(x / 1e3);
3830
+ else if (x != null && ((M = ue.current) != null && M.seekTo)) {
3831
+ ue.current.seekTo(x / 1e3), ht(!0), zn(x / 1e3);
3832
3832
  const j = (s.end_ms ?? s.endMs ?? x + 5e3) - x;
3833
3833
  setTimeout(() => ht(!1), j);
3834
3834
  }
@@ -3885,11 +3885,11 @@ const br = ({
3885
3885
  flexShrink: 0,
3886
3886
  ..._ ? { width: "100%", justifyContent: "space-between", order: 1 } : {}
3887
3887
  }, children: [
3888
- /* @__PURE__ */ t(ve, { text: st, children: /* @__PURE__ */ i(
3888
+ /* @__PURE__ */ t(me, { text: st, children: /* @__PURE__ */ i(
3889
3889
  "button",
3890
3890
  {
3891
- onClick: fe ? void 0 : De,
3892
- disabled: fe,
3891
+ onClick: ce ? void 0 : De,
3892
+ disabled: ce,
3893
3893
  style: {
3894
3894
  display: "flex",
3895
3895
  alignItems: "center",
@@ -3897,8 +3897,8 @@ const br = ({
3897
3897
  padding: "4px 12px",
3898
3898
  background: "none",
3899
3899
  border: "none",
3900
- cursor: fe ? "default" : "pointer",
3901
- opacity: fe ? 0.4 : 1
3900
+ cursor: ce ? "default" : "pointer",
3901
+ opacity: ce ? 0.4 : 1
3902
3902
  },
3903
3903
  children: [
3904
3904
  /* @__PURE__ */ t(rt, { size: 16, color: "var(--Neutral-800, #323232)", strokeWidth: 1.5 }),
@@ -3919,11 +3919,11 @@ const br = ({
3919
3919
  background: "var(--Grey-absent, #D9D9D9)",
3920
3920
  flexShrink: 0
3921
3921
  } }),
3922
- /* @__PURE__ */ t(ve, { text: dt, children: /* @__PURE__ */ i(
3922
+ /* @__PURE__ */ t(me, { text: dt, children: /* @__PURE__ */ i(
3923
3923
  "button",
3924
3924
  {
3925
- onClick: pe ? void 0 : ze,
3926
- disabled: pe,
3925
+ onClick: fe ? void 0 : ze,
3926
+ disabled: fe,
3927
3927
  style: {
3928
3928
  display: "flex",
3929
3929
  alignItems: "center",
@@ -3931,8 +3931,8 @@ const br = ({
3931
3931
  padding: "4px 12px",
3932
3932
  background: "none",
3933
3933
  border: "none",
3934
- cursor: pe ? "default" : "pointer",
3935
- opacity: pe ? 0.4 : 1
3934
+ cursor: fe ? "default" : "pointer",
3935
+ opacity: fe ? 0.4 : 1
3936
3936
  },
3937
3937
  children: [
3938
3938
  /* @__PURE__ */ t("span", { style: {
@@ -4000,11 +4000,11 @@ const br = ({
4000
4000
  }
4001
4001
  ),
4002
4002
  (De || ze) && yt && /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", flexShrink: 0 }, children: [
4003
- /* @__PURE__ */ t(ve, { text: st, children: /* @__PURE__ */ i(
4003
+ /* @__PURE__ */ t(me, { text: st, children: /* @__PURE__ */ i(
4004
4004
  "button",
4005
4005
  {
4006
- onClick: fe ? void 0 : De,
4007
- disabled: fe,
4006
+ onClick: ce ? void 0 : De,
4007
+ disabled: ce,
4008
4008
  style: {
4009
4009
  display: "flex",
4010
4010
  alignItems: "center",
@@ -4012,8 +4012,8 @@ const br = ({
4012
4012
  padding: "4px 12px",
4013
4013
  background: "none",
4014
4014
  border: "none",
4015
- cursor: fe ? "default" : "pointer",
4016
- opacity: fe ? 0.4 : 1
4015
+ cursor: ce ? "default" : "pointer",
4016
+ opacity: ce ? 0.4 : 1
4017
4017
  },
4018
4018
  children: [
4019
4019
  /* @__PURE__ */ t(rt, { size: 16, color: "var(--Neutral-800, #323232)", strokeWidth: 1.5 }),
@@ -4034,11 +4034,11 @@ const br = ({
4034
4034
  background: "var(--Grey-absent, #D9D9D9)",
4035
4035
  flexShrink: 0
4036
4036
  } }),
4037
- /* @__PURE__ */ t(ve, { text: dt, children: /* @__PURE__ */ i(
4037
+ /* @__PURE__ */ t(me, { text: dt, children: /* @__PURE__ */ i(
4038
4038
  "button",
4039
4039
  {
4040
- onClick: pe ? void 0 : ze,
4041
- disabled: pe,
4040
+ onClick: fe ? void 0 : ze,
4041
+ disabled: fe,
4042
4042
  style: {
4043
4043
  display: "flex",
4044
4044
  alignItems: "center",
@@ -4046,8 +4046,8 @@ const br = ({
4046
4046
  padding: "4px 12px",
4047
4047
  background: "none",
4048
4048
  border: "none",
4049
- cursor: pe ? "default" : "pointer",
4050
- opacity: pe ? 0.4 : 1
4049
+ cursor: fe ? "default" : "pointer",
4050
+ opacity: fe ? 0.4 : 1
4051
4051
  },
4052
4052
  children: [
4053
4053
  /* @__PURE__ */ t("span", { style: {
@@ -4110,11 +4110,11 @@ const br = ({
4110
4110
  gap: _ ? 12 : 16,
4111
4111
  ..._ ? { flexBasis: "100%", width: "100%" } : { paddingLeft: 16, borderLeft: "1px solid var(--Grey-absent, #D9D9D9)" }
4112
4112
  }, children: [
4113
- /* @__PURE__ */ t(ve, { text: jn, children: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 6, padding: "8px 0", cursor: "pointer" }, children: [
4113
+ /* @__PURE__ */ t(me, { text: jn, children: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 6, padding: "8px 0", cursor: "pointer" }, children: [
4114
4114
  /* @__PURE__ */ t(jt, { size: 16, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.5 }),
4115
4115
  /* @__PURE__ */ t("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Strong, #2E3236)", fontFamily: "var(--font-sans)", lineHeight: 1.2 }, children: Ue })
4116
4116
  ] }) }),
4117
- tt > 1 ? /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(ve, { text: Dt, children: /* @__PURE__ */ i(
4117
+ tt > 1 ? /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(me, { text: Dt, children: /* @__PURE__ */ i(
4118
4118
  "button",
4119
4119
  {
4120
4120
  onClick: () => Ge(!0),
@@ -4145,7 +4145,7 @@ const br = ({
4145
4145
  /* @__PURE__ */ t(dn, { size: 16, color: "var(--Grey-Strong, #2E3236)", strokeWidth: 1.7 })
4146
4146
  ]
4147
4147
  }
4148
- ) }) }) : /* @__PURE__ */ t(ve, { text: Dt, children: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 4, padding: "8px 0", cursor: "pointer" }, children: [
4148
+ ) }) }) : /* @__PURE__ */ t(me, { text: Dt, children: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 4, padding: "8px 0", cursor: "pointer" }, children: [
4149
4149
  /* @__PURE__ */ t(lt, { size: 16, color: "var(--Grey-Muted, #808183)", strokeWidth: 1.5 }),
4150
4150
  /* @__PURE__ */ t("span", { style: { fontSize: 13, fontWeight: 400, color: "var(--Grey-Strong, #2E3236)", lineHeight: 1.2 }, children: Fe })
4151
4151
  ] }) })
@@ -4162,13 +4162,13 @@ const br = ({
4162
4162
  /* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0, display: "flex" }, children: /* @__PURE__ */ t(
4163
4163
  Ai,
4164
4164
  {
4165
- score: de ?? 0.5,
4165
+ score: xe ?? 0.5,
4166
4166
  minScore: 0,
4167
- maxScore: ge,
4168
- predictedScore: he ?? 0.5,
4167
+ maxScore: pe,
4168
+ predictedScore: ge ?? 0.5,
4169
4169
  predictedLabel: c,
4170
4170
  legends: Q,
4171
- outcomePercent: ce ?? (de != null ? Math.min(100, Math.max(0, Math.round((de - 1) / 4 * 1e3) / 10)) : null)
4171
+ outcomePercent: de ?? null
4172
4172
  }
4173
4173
  ) }),
4174
4174
  /* @__PURE__ */ i("div", { style: {
@@ -4203,16 +4203,16 @@ const br = ({
4203
4203
  const s = Wt || {}, v = s.difficulty, x = s.difficulty_band, F = s.p_expected, M = s.score_impact ?? F, P = s.lift_raw, j = s.lift_display, ie = (_t = s.interpretation) == null ? void 0 : _t.lift_band, we = s.p_full, ae = (Et = s.interpretation) == null ? void 0 : Et.description;
4204
4204
  if (!(v != null || x != null || P != null || ie != null || we != null || ae != null))
4205
4205
  return null;
4206
- const it = (me, Ae, Xn) => Math.max(Ae, Math.min(Xn, me)), Kn = v != null ? it((v - 50) / 50, -1, 1) : 0, Vn = P != null ? it(P * 3, -1, 1) : 0, Gt = M != null ? Math.round(M * 100) : null, Ht = (me) => {
4207
- if (me)
4208
- return String(me).split("_").map(
4206
+ const it = (ye, Ae, Xn) => Math.max(Ae, Math.min(Xn, ye)), Kn = v != null ? it((v - 50) / 50, -1, 1) : 0, Vn = P != null ? it(P * 3, -1, 1) : 0, Gt = M != null ? Math.round(M * 100) : null, Ht = (ye) => {
4207
+ if (ye)
4208
+ return String(ye).split("_").map(
4209
4209
  (Ae) => Ae.charAt(0).toUpperCase() + Ae.slice(1).toLowerCase()
4210
4210
  ).join(" ");
4211
4211
  }, qn = Ht(x), Qn = Ht(ie), Zn = (() => {
4212
4212
  if (typeof j == "string") {
4213
- const me = parseFloat(j.replace("%", ""));
4214
- if (Number.isFinite(me))
4215
- return me;
4213
+ const ye = parseFloat(j.replace("%", ""));
4214
+ if (Number.isFinite(ye))
4215
+ return ye;
4216
4216
  }
4217
4217
  return P != null ? Math.round(P * 100) : null;
4218
4218
  })();
@@ -4293,7 +4293,7 @@ const br = ({
4293
4293
  /* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(
4294
4294
  yi,
4295
4295
  {
4296
- ref: ye,
4296
+ ref: ue,
4297
4297
  audioUrl: l,
4298
4298
  durationSeconds: Ft.duration_seconds,
4299
4299
  audioRef: d,
@@ -4414,7 +4414,7 @@ const br = ({
4414
4414
  "button",
4415
4415
  {
4416
4416
  onClick: () => {
4417
- ue && ue(), Ge(!1);
4417
+ he && he(), Ge(!1);
4418
4418
  },
4419
4419
  style: {
4420
4420
  display: "flex",
@@ -4565,7 +4565,7 @@ const br = ({
4565
4565
  return e > 0 ? `+${n}pp` : `${n}pp`;
4566
4566
  }, wr = ({ outcomeLift: e, driverLabels: n = [], showOutcomeOnly: r = !1 }) => {
4567
4567
  var S;
4568
- const o = xe("(max-width: 640px)");
4568
+ const o = ve("(max-width: 640px)");
4569
4569
  if (!e || e.lift == null)
4570
4570
  return null;
4571
4571
  const a = e.p_expected, l = e.p_full, d = e.lift_raw ?? (l != null && a != null ? l - a : null), f = e.lift, p = (S = e.interpretation) != null && S.lift_band ? e.interpretation.lift_band.replace(/_/g, " ") : f >= 0 ? "Positive" : "Negative", b = p.charAt(0).toUpperCase() + p.slice(1), H = /negative/i.test(p) ? ui : tn, g = n.slice(0, Jt), k = n.length - Jt;